qpidc-0.16/0000775000076400007640000000000011752725714013147 5ustar00jrossjross00000000000000qpidc-0.16/configure0000775000076400007640000241111111752725663015062 0ustar00jrossjross00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for qpidc 0.16. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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 more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: dev@qpid.apache.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='qpidc' PACKAGE_TARNAME='qpidc' PACKAGE_VERSION='0.16' PACKAGE_STRING='qpidc 0.16' PACKAGE_BUGREPORT='dev@qpid.apache.org' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS builddir_lib_suffix SOCKLIBS LIB_ACL SUNOS_FALSE SUNOS_TRUE USE_EPOLL_FALSE USE_EPOLL_TRUE USE_POLL_FALSE USE_POLL_TRUE USE_ECF_FALSE USE_ECF_TRUE SSL_LDFLAGS SSL_CFLAGS SSL_FALSE SSL_TRUE NSS_CONFIG NSPR_CONFIG RDMA_FALSE RDMA_TRUE HAVE_XML_FALSE HAVE_XML_TRUE HAVE_SASL_FALSE HAVE_SASL_TRUE SASL_PASSWD HAVE_LIBCMAN_FALSE HAVE_LIBCMAN_TRUE HAVE_LIBCPG_FALSE HAVE_LIBCPG_TRUE DOWNLOAD_URL URL GENERATE_FALSE GENERATE_TRUE AMQP_FINAL_XML HAVE_PERL_DEVEL_FALSE HAVE_PERL_DEVEL_TRUE PERL_ARCHLIB PERL_INC PERL HAVE_PYTHON_DEVEL_FALSE HAVE_PYTHON_DEVEL_TRUE PYTHON_LIBS PYTHON_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON HAVE_RUBY_DEVEL_FALSE HAVE_RUBY_DEVEL_TRUE RUBY_DLEXT RUBY_LIBS RUBY_LIB_ARCH RUBY_LIB RUBY_INC_ARCH RUBY_INC HAVE_SWIG_FALSE HAVE_SWIG_TRUE SWIG_LIB SWIG RUBY HAS_RPMLINT_FALSE HAS_RPMLINT_TRUE RPMLINT VALGRIND LIB_CLOCK_GETTIME LIB_DLOPEN LIBTOOL_DEPS CXXCPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL SUNCC_RUNTIME_LIBS WARNING_CFLAGS COMPILER_FLAGS HAVE_DOXYGEN_FALSE HAVE_DOXYGEN_TRUE DOXYGEN HAVE_HELP2MAN_FALSE HAVE_HELP2MAN_TRUE HELP2MAN EGREP GREP CPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking with_help2man with_doxygen enable_warnings enable_static enable_shared with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_valgrind with_swig with_cpg with_libcman with_sasl with_xml with_rdma with_ssl with_poller with_probes ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP CXXCPP RUBY RUBY_INC RUBY_INC_ARCH RUBY_LIB RUBY_LIB_ARCH PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PYTHON_CFLAGS PYTHON_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # 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. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= 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 case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -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) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$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 ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$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 ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 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 ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$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_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=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 ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_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'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 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 $as_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 ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # 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 the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | 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 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # 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 qpidc 0.16 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 \`..'] 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] --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] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/qpidc] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _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 qpidc 0.16:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-warnings turn on lots of compiler warnings (recommended) --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-valgrind run valgrind memory checker on tests, if available (default yes) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-help2man Use help2man to generate man pages. --with-doxygen Use doxygen to generate API documentation. --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-swig Use swig to generate qmf bindings. --with-cpg Build with CPG support for clustering. --with-libcman Integration with libcman quorum service. --with-sasl Build with SASL authentication support --with-xml Build with XML Exchange --with-rdma Build with support for Remote DMA protocols --with-ssl Build with support for SSL --with-poller The low level poller implementation: poll/solaris-ecf/epoll --with-probes Build with dtrace/systemtap static probes 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 LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor RUBY Ruby interpreter RUBY_INC Directory where ruby.h can be found RUBY_INC_ARCH Directory where ruby/config.h can be found (needed from Ruby 1.9) RUBY_LIB Directory to install ruby files into RUBY_LIB_ARCH Directory to install ruby binary modules into PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path PYTHON_CFLAGS C compiler flags for PYTHON, overriding pkg-config PYTHON_LIBS linker flags for PYTHON, overriding pkg-config 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 ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested 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 else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF qpidc configure 0.16 generated by GNU Autoconf 2.68 Copyright (C) 2010 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 fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------- ## ## Report this to dev@qpid.apache.org ## ## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_cxx_check_decl LINENO SYMBOL VAR INCLUDES # ----------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_cxx_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_decl # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* 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_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------- ## ## Report this to dev@qpid.apache.org ## ## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by qpidc $as_me 0.16, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { 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` /usr/bin/hostinfo = `(/usr/bin/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=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&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_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=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append 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 as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset 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: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > 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 cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } 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. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_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 $ac_precious_vars; 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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_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 # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_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. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## 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 ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; 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 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.11' # 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. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir 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. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$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' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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 $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi 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='qpidc' VERSION='0.16' 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"} # 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"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 $as_echo_n "checking how to create a ustar tar archive... " >&6; } # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' _am_tools=${am_cv_prog_tar_ustar-$_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 { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' am__tar_="$_am_tar --format=ustar -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 ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' am__tar_='find "$tardir" -print | cpio -o -H ustar -L' am__untar='cpio -i -H ustar -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_ustar}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_ustar+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } # Minimum Autoconf version required. ac_config_headers="$ac_config_headers src/config.h" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$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 case $ac_cv_prog_cc_stdc in #( no) : ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 -std 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 -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 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 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 else ac_cv_prog_cc_stdc=no fi fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi case $ac_cv_prog_cc_stdc in #( no) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; #( '') : { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; #( *) : { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; esac if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=cpp 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 -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$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 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= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&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 am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #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)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h 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=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h ac_ext=cpp 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 # Check for optional use of help2man # Extract the first word of "help2man", so it can be a program name with args. set dummy help2man; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_HELP2MAN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$HELP2MAN"; then ac_cv_prog_HELP2MAN="$HELP2MAN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HELP2MAN="help2man" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi HELP2MAN=$ac_cv_prog_HELP2MAN if test -n "$HELP2MAN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 $as_echo "$HELP2MAN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-help2man was given. if test "${with_help2man+set}" = set; then : withval=$with_help2man; case "$withval" in yes) test -z "$HELP2MAN" && as_fn_error $? "help2man not found." "$LINENO" 5 ;; no) HELP2MAN="" ;; *) as_fn_error $? "Bad value ${withval} for --with-help2man." "$LINENO" 5 ;; esac fi if test -n "$HELP2MAN"; then HAVE_HELP2MAN_TRUE= HAVE_HELP2MAN_FALSE='#' else HAVE_HELP2MAN_TRUE='#' HAVE_HELP2MAN_FALSE= fi # Check for optional use of doxygen # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DOXYGEN"; then ac_cv_prog_DOXYGEN="$DOXYGEN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DOXYGEN="doxygen" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DOXYGEN=$ac_cv_prog_DOXYGEN if test -n "$DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 $as_echo "$DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Check whether --with-doxygen was given. if test "${with_doxygen+set}" = set; then : withval=$with_doxygen; case "$withval" in yes) test -z "$DOXYGEN" && as_fn_error $? "doxygen not found." "$LINENO" 5 ;; no) DOXYGEN="" ;; *) as_fn_error $? "Bad value ${withval} for --with-doxygen." "$LINENO" 5 ;; esac fi if test -n "$DOXYGEN"; then HAVE_DOXYGEN_TRUE= HAVE_DOXYGEN_FALSE='#' else HAVE_DOXYGEN_TRUE='#' HAVE_DOXYGEN_FALSE= fi # Check whether --enable-warnings was given. if test "${enable_warnings+set}" = set; then : enableval=$enable_warnings; case "${enableval}" in yes|no) ;; *) as_fn_error $? "bad value ${enableval} for warnings option" "$LINENO" 5 ;; esac else enableval=yes fi # Set up for gcc as compiler if test x$GXX = xyes; then # Warnings: Enable as many as possible, keep the code clean. Please # do not disable warnings or remove -Werror without discussing on # qpid-dev list. # # The following warnings are deliberately omitted, they warn on valid code. # -Wunreachable-code -Wpadded -Winline # -Wshadow - warns about boost headers. # Can't test for -Werror as whether it fails or not depends on what's in # CFLAGS/CXXFLAGS. In any case it's been in gcc for a long time (since 2.95 at least) if test "${enableval}" = yes; then COMPILER_FLAGS="-Werror" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -pedantic" >&5 $as_echo_n "checking whether compiler accepts -pedantic... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -pedantic" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -pedantic" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -pedantic" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Wall" >&5 $as_echo_n "checking whether compiler accepts -Wall... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wall" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wall" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Wall" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Wextra" >&5 $as_echo_n "checking whether compiler accepts -Wextra... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wextra" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wextra" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Wextra" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Wno-shadow" >&5 $as_echo_n "checking whether compiler accepts -Wno-shadow... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-shadow" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wno-shadow" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Wno-shadow" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Wpointer-arith" >&5 $as_echo_n "checking whether compiler accepts -Wpointer-arith... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wpointer-arith" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wpointer-arith" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Wpointer-arith" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Wcast-qual" >&5 $as_echo_n "checking whether compiler accepts -Wcast-qual... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wcast-qual" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wcast-qual" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Wcast-qual" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Wcast-align" >&5 $as_echo_n "checking whether compiler accepts -Wcast-align... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wcast-align" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wcast-align" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Wcast-align" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Wno-long-long" >&5 $as_echo_n "checking whether compiler accepts -Wno-long-long... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-long-long" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wno-long-long" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Wno-long-long" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Wvolatile-register-var" >&5 $as_echo_n "checking whether compiler accepts -Wvolatile-register-var... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wvolatile-register-var" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wvolatile-register-var" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Wvolatile-register-var" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Winvalid-pch" >&5 $as_echo_n "checking whether compiler accepts -Winvalid-pch... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Winvalid-pch" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Winvalid-pch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Winvalid-pch" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Wno-system-headers" >&5 $as_echo_n "checking whether compiler accepts -Wno-system-headers... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-system-headers" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Wno-system-headers" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Wno-system-headers" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler accepts -Woverloaded-virtual" >&5 $as_echo_n "checking whether compiler accepts -Woverloaded-virtual... " >&6; } ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Woverloaded-virtual" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -Woverloaded-virtual" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { int x; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : COMPILER_FLAGS="$COMPILER_FLAGS -Woverloaded-virtual" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" WARNING_CFLAGS=$COMPILER_FLAGS $as_echo "#define lint 1" >>confdefs.h COMPILER_FLAGS= fi else ac_fn_cxx_check_decl "$LINENO" "__SUNPRO_CC" "ac_cv_have_decl___SUNPRO_CC" "$ac_includes_default" if test "x$ac_cv_have_decl___SUNPRO_CC" = xyes; then : SUNCC=yes else SUNCC=no fi # Set up for sun CC compiler if test x$SUNCC = xyes; then if test "${enableval}" = yes; then WARNING_FLAGS=+w fi CXXFLAGS="$CXXFLAGS -library=stlport4 -mt" LD="$CXX" LDFLAGS="$LDFLAGS -library=stlport4 -mt" SUNCC_RUNTIME_LIBS=-lCrun fi fi # Check whether --enable-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=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. 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 delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST 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_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&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 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&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 : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&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* | cegcc*) # 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; ;; mint*) # On MiNT this can take a long time and run out of memory. 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 ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then 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` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 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` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$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 cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; 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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&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 aix[4-9]*) 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', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | 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 ;; haiku*) 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])(-bit)?( [LM]SB)? 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 ;; interix[3-9]*) # 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* | k*bsd*-gnu | kopensolaris*-gnu) 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=pass_all ;; 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 ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 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 ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi 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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 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 case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # 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 for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&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]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' 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 # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # 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 # Try without a prefix underscore, 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. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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 <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_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 -rf 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-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\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; 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-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$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\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-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 --with-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 # Check whether --enable-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 # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF 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 # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&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 <<_LT_EOF 1>&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 _LT_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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&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 <<_LT_EOF 1>&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 _LT_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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script 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;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # 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 the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$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 echo "$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 -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$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= 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*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # 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' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries 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' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # 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 ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -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 ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # 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' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_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 # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$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 "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # 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_|_GLOBAL__F[ID]_.*' # 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. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # 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 # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = 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>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [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 aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, 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 install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) 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 ;; esac ;; 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* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' 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/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' 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 ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) 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' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' 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; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # 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; func_echo_all \"$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' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; 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~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac 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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $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 <<_LT_EOF 1>&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. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $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 ;; *) # 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. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 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 ;; 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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $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 ;; aix[4-9]*) 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 # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". 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") || (\$ 2 == "W")) && (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].*|aix[5-9]*) 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_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' 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 : 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 export_dynamic_flag_spec='${wl}-bexpall' # 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. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ 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 func_echo_all "${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. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ 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' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi 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*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) 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 ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # 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. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # 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 $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' 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' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper 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 `func_echo_all "$deplibs" | $SED '\''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' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no 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* | dragonfly*) archive_cmds='$CC -shared $pic_flag -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 $pic_flag ${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 && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${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_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=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 && test "$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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${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' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$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 "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${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 ;; 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_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=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 $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes 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 ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes 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 else ld_shlibs=no 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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' 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} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${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='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-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; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_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 archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${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 $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) 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' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $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 -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac 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 and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; 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* | sco3.2v5.0.[024]*) 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='${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,$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 ;; 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 if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 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\":${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # 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. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi 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" 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' ;; aix[4-9]*) 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*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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=`func_echo_all "$lib" | $SED '\''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' ;; esac ;; 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* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc 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~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' 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="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; 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 dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. 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 # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # 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' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # 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}${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`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" 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 ;; 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 ;; *) # from 4.6 on, and DragonFly 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 ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" 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=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 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' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) 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* | k*bsd*-gnu | kopensolaris*-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' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # 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/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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' ;; 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=qnx 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='ldqnx.so' ;; 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" ;; rdos*) dynamic_linker=no ;; 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 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 shlibpath_overrides_runpath=yes 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' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 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' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/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}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$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 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent 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_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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; 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 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* | cegcc*) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; 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 ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&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 <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$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\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&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 <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$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 striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&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" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&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 ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=cpp 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 CC="$lt_save_CC" 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=cpp 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp 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 else _lt_caught_CXX_error=yes fi ac_ext=cpp 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= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_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 inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # 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 echo "$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 echo "$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 -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS 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++"} CFLAGS=$CXXFLAGS 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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when 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 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&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 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$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 $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -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 -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) 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].*|aix[5-9]*) 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_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' 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 : 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 export_dynamic_flag_spec_CXX='${wl}-bexpall' # 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. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX 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 func_echo_all "${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. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX 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' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi 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* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # 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_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' 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 ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then 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${_lt_dsymutil}" archive_expsym_cmds_CXX="sed '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${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no 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* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; 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) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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*) ;; *) 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_direct_absolute_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; func_echo_all "$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 $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${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 ;; interix[3-9]*) 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" && func_echo_all "-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 $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${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=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) 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; func_echo_all "$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* | ecpc* ) # 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* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols 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' ;; esac 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; func_echo_all \"$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=`func_echo_all "$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; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 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='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # 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' ;; esac ;; 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::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes 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=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | 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. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) 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" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) 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" && func_echo_all "-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' ;; esac 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=`func_echo_all "$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; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac 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 -v "^Configured with:" | $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* | sunCC*) # 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 compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # 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 $pic_flag -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 $pic_flag -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 -v "^Configured with:" | $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 -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac 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. 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='${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,$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' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) 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 ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # 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= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; 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 for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${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 fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} 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 prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$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 CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # 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= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # 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. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # 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*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # 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' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries 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= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # 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 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # 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_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 ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # 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' ;; 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* | 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* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # 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' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; 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* | sunCC*) # 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 ;; 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 ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_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 # # 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\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$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 "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # 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 # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". 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") || (\$ 2 == "W")) && (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* | cegcc*) case $cc_basename in cl*) ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 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\":${as_lineno-$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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&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" 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' ;; aix[4-9]*) 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*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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=`func_echo_all "$lib" | $SED '\''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' ;; esac ;; 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* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc 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~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' 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}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; 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 dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. 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 # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # 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' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # 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}${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`' 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 ;; 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 ;; *) # from 4.6 on, and DragonFly 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 ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" 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=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 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' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) 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* | k*bsd*-gnu | kopensolaris*-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' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # 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/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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' ;; 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=qnx 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='ldqnx.so' ;; 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" ;; rdos*) dynamic_linker=no ;; 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 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 shlibpath_overrides_runpath=yes 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' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 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' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/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}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$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 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&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-existent 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_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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; 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 fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC 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 fi # test "$_lt_caught_CXX_error" != yes ac_ext=cpp 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 ac_config_commands="$ac_config_commands libtool" # Only expand once: # For libraries (libcommon) that use dlopen, dlerror, etc., # test whether we need to link with -ldl. gl_saved_libs=$LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" test "$ac_cv_search_dlopen" = "none required" || LIB_DLOPEN=$ac_cv_search_dlopen fi LIBS=$gl_saved_libs # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* # programs in the package would end up linked with that potentially-shared # library, inducing unnecessary run-time overhead. gl_saved_libs=$LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt posix4; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" test "$ac_cv_search_clock_gettime" = "none required" || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime fi for ac_func in clock_gettime clock_settime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS=$gl_saved_libs # Enable Valgrind # Check whether --enable-valgrind was given. if test "${enable_valgrind+set}" = set; then : enableval=$enable_valgrind; case $enableval in yes|no) enable_VALGRIND=$enableval;; *) as_fn_error $? "Invalid value for --enable-valgrind: $enableval" "$LINENO" 5;; esac else enable_VALGRIND=yes fi # We use valgrind for the tests. See if it's available. # Check for it unconditionally, so we don't have to duplicate its # use of AC_SUBST([VALGRIND]). # Extract the first word of "valgrind", so it can be a program name with args. set dummy valgrind; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_VALGRIND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$VALGRIND"; then ac_cv_prog_VALGRIND="$VALGRIND" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_VALGRIND="valgrind" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi VALGRIND=$ac_cv_prog_VALGRIND if test -n "$VALGRIND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5 $as_echo "$VALGRIND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test "$enable_VALGRIND" = no && VALGRIND= # If rpmlint is available we'll run it when building RPMs. # Extract the first word of "rpmlint", so it can be a program name with args. set dummy rpmlint; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RPMLINT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RPMLINT"; then ac_cv_prog_RPMLINT="$RPMLINT" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RPMLINT="rpmlint" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RPMLINT=$ac_cv_prog_RPMLINT if test -n "$RPMLINT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RPMLINT" >&5 $as_echo "$RPMLINT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$RPMLINT"; then HAS_RPMLINT_TRUE= HAS_RPMLINT_FALSE='#' else HAS_RPMLINT_TRUE='#' HAS_RPMLINT_FALSE= fi # Code generation: generated code is included in the distribution # so code generation is only required in an svn checkout. # It requires several external tools and files, which we check for here. # Extract the first word of "ruby", so it can be a program name with args. set dummy ruby; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RUBY+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RUBY"; then ac_cv_prog_RUBY="$RUBY" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RUBY="ruby" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RUBY=$ac_cv_prog_RUBY if test -n "$RUBY"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY" >&5 $as_echo "$RUBY" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Swig binding generator is needed for the script (Ruby, Python, etc.) bindings. # Extract the first word of "swig", so it can be a program name with args. set dummy swig; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SWIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SWIG in [\\/]* | ?:[\\/]*) ac_cv_path_SWIG="$SWIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SWIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi SWIG=$ac_cv_path_SWIG if test -n "$SWIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SWIG" >&5 $as_echo "$SWIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$SWIG" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&5 $as_echo "$as_me: WARNING: cannot find 'swig' program. You should look at http://www.swig.org" >&2;} SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false' elif test -n "1.3.26" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SWIG version" >&5 $as_echo_n "checking for SWIG version... " >&6; } swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $swig_version" >&5 $as_echo "$swig_version" >&6; } if test -n "$swig_version" ; then # Calculate the required version number components required=1.3.26 required_major=`echo $required | sed 's/[^0-9].*//'` if test -z "$required_major" ; then required_major=0 fi required=`echo $required | sed 's/[0-9]*[^0-9]//'` required_minor=`echo $required | sed 's/[^0-9].*//'` if test -z "$required_minor" ; then required_minor=0 fi required=`echo $required | sed 's/[0-9]*[^0-9]//'` required_patch=`echo $required | sed 's/[^0-9].*//'` if test -z "$required_patch" ; then required_patch=0 fi # Calculate the available version number components available=$swig_version available_major=`echo $available | sed 's/[^0-9].*//'` if test -z "$available_major" ; then available_major=0 fi available=`echo $available | sed 's/[0-9]*[^0-9]//'` available_minor=`echo $available | sed 's/[^0-9].*//'` if test -z "$available_minor" ; then available_minor=0 fi available=`echo $available | sed 's/[0-9]*[^0-9]//'` available_patch=`echo $available | sed 's/[^0-9].*//'` if test -z "$available_patch" ; then available_patch=0 fi required_full=`printf %2.2d%2.2d%2.2d%2.2d $required_major $required_minor $required_patch` available_full=`printf %2.2d%2.2d%2.2d%2.2d $available_major $available_minor $available_patch` if test $available_full -lt $required_full; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SWIG version >= 1.3.26 is required. You have $swig_version. You should look at http://www.swig.org" >&5 $as_echo "$as_me: WARNING: SWIG version >= 1.3.26 is required. You have $swig_version. You should look at http://www.swig.org" >&2;} SWIG='echo "Error: SWIG version >= 1.3.26 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' else { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG executable is '$SWIG'" >&5 $as_echo "$as_me: SWIG executable is '$SWIG'" >&6;} SWIG_LIB=`$SWIG -swiglib` { $as_echo "$as_me:${as_lineno-$LINENO}: SWIG library directory is '$SWIG_LIB'" >&5 $as_echo "$as_me: SWIG library directory is '$SWIG_LIB'" >&6;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine SWIG version" >&5 $as_echo "$as_me: WARNING: cannot determine SWIG version" >&2;} SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' fi fi test ! -x "$SWIG" && SWIG="" # Check whether --with-swig was given. if test "${with_swig+set}" = set; then : withval=$with_swig; case "$withval" in yes) test -z "$SWIG" && as_fn_error $? "swig not found." "$LINENO" 5 ;; no) SWIG="" ;; *) as_fn_error $? "Bad value ${withval} for --with-swig." "$LINENO" 5 ;; esac fi if test -n "$SWIG"; then HAVE_SWIG_TRUE= HAVE_SWIG_FALSE='#' else HAVE_SWIG_TRUE='#' HAVE_SWIG_FALSE= fi # Ruby bindings: To build ruby wrappers, the ruby-devel files must be present. for ac_prog in ruby1.8 ruby do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_RUBY+:} false; then : $as_echo_n "(cached) " >&6 else case $RUBY in [\\/]* | ?:[\\/]*) ac_cv_path_RUBY="$RUBY" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_RUBY="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi RUBY=$ac_cv_path_RUBY if test -n "$RUBY"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RUBY" >&5 $as_echo "$RUBY" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$RUBY" && break done if test -n "$RUBY" ; then if test -z "$RUBY_INC" ; then RUBY_INC=`$RUBY -rrbconfig -e 'puts Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"]'` fi if test -z "$RUBY_INC_ARCH" ; then RUBY_INC_ARCH=`$RUBY -rrbconfig -e 'd = Config::CONFIG["rubyhdrdir"];if d != nil; print d + "/" + Config::CONFIG["arch"]; end'` test x"$RUBY_INC_ARCH" != x || RUBY_INC_ARCH=$RUBY_INC fi if test -z "$RUBY_LIB" ; then RUBY_LIB=`$RUBY -rrbconfig -e 'puts Config::CONFIG["sitelibdir"].gsub("/usr", "${prefix}")'` fi if test -z "$RUBY_LIB_ARCH" ; then RUBY_LIB_ARCH=`$RUBY -rrbconfig -e 'puts Config::CONFIG["sitearchdir"].gsub("/usr", "${prefix}")'` fi RUBY_LIBS= case $host_os in cygwin*) RUBY_LIBS=-lruby ;; esac RUBY_DLEXT=`$RUBY -rrbconfig -e 'puts Config::CONFIG["DLEXT"]'` fi if test -f $RUBY_INC/ruby.h && test -n "$SWIG"; then HAVE_RUBY_DEVEL_TRUE= HAVE_RUBY_DEVEL_FALSE='#' else HAVE_RUBY_DEVEL_TRUE='#' HAVE_RUBY_DEVEL_FALSE= fi # Python bindings: To build python wrappers, the python-devel files must be present. # Find any Python interpreter. if test -z "$PYTHON"; then for ac_prog in python python2 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PYTHON" && break done test -n "$PYTHON" || PYTHON=":" fi am_display_PYTHON=python if test "$PYTHON" = :; then as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; print sys.version[:3]"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi if test -n "$PYTHON"; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PYTHON" >&5 $as_echo_n "checking for PYTHON... " >&6; } if test -n "$PYTHON_CFLAGS"; then pkg_cv_PYTHON_CFLAGS="$PYTHON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-\$PYTHON_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "python-$PYTHON_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PYTHON_CFLAGS=`$PKG_CONFIG --cflags "python-$PYTHON_VERSION" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PYTHON_LIBS"; then pkg_cv_PYTHON_LIBS="$PYTHON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"python-\$PYTHON_VERSION\""; } >&5 ($PKG_CONFIG --exists --print-errors "python-$PYTHON_VERSION") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PYTHON_LIBS=`$PKG_CONFIG --libs "python-$PYTHON_VERSION" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PYTHON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "python-$PYTHON_VERSION" 2>&1` else PYTHON_PKG_ERRORS=`$PKG_CONFIG --print-errors "python-$PYTHON_VERSION" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PYTHON_PKG_ERRORS" >&5 # We didn't find pkg-config information for python-2.7 this # may mean we have an earlier python version: # Try to find the include and library files directly in the default # location { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Didn't find Python 2.7 developer libs - looking for older version" >&5 $as_echo "$as_me: WARNING: Didn't find Python 2.7 developer libs - looking for older version" >&2;} PYTHON_INC=$($PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()') as_ac_Lib=`$as_echo "ac_cv_lib_python$PYTHON_VERSION''_Py_Initialize" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Py_Initialize in -lpython$PYTHON_VERSION" >&5 $as_echo_n "checking for Py_Initialize in -lpython$PYTHON_VERSION... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpython$PYTHON_VERSION $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Py_Initialize (); int main () { return Py_Initialize (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_LIBpython$PYTHON_VERSION" | $as_tr_cpp` 1 _ACEOF LIBS="-lpython$PYTHON_VERSION $LIBS" fi as_ac_File=`$as_echo "ac_cv_file_"$PYTHON_INC/Python.h"" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$PYTHON_INC/Python.h\"" >&5 $as_echo_n "checking for \"$PYTHON_INC/Python.h\"... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r ""$PYTHON_INC/Python.h""; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : PYTHON_CFLAGS="-I$PYTHON_INC" PYTHON_LIBS="-lpython$PYTHON_VERSION" have_python_dev=yes else if test yes = "$with_python" ; then as_fn_error $? "Couldn't find Python developer libs - you probably need to install a python-dev or python-devel package" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Couldn't find Python developer libs - you probably don't have a python-dev or python-devel package installed" >&5 $as_echo "$as_me: WARNING: Couldn't find Python developer libs - you probably don't have a python-dev or python-devel package installed" >&2;} fi fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # We didn't find pkg-config information for python-2.7 this # may mean we have an earlier python version: # Try to find the include and library files directly in the default # location { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Didn't find Python 2.7 developer libs - looking for older version" >&5 $as_echo "$as_me: WARNING: Didn't find Python 2.7 developer libs - looking for older version" >&2;} PYTHON_INC=$($PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()') as_ac_Lib=`$as_echo "ac_cv_lib_python$PYTHON_VERSION''_Py_Initialize" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Py_Initialize in -lpython$PYTHON_VERSION" >&5 $as_echo_n "checking for Py_Initialize in -lpython$PYTHON_VERSION... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpython$PYTHON_VERSION $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Py_Initialize (); int main () { return Py_Initialize (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_LIBpython$PYTHON_VERSION" | $as_tr_cpp` 1 _ACEOF LIBS="-lpython$PYTHON_VERSION $LIBS" fi as_ac_File=`$as_echo "ac_cv_file_"$PYTHON_INC/Python.h"" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$PYTHON_INC/Python.h\"" >&5 $as_echo_n "checking for \"$PYTHON_INC/Python.h\"... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r ""$PYTHON_INC/Python.h""; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : PYTHON_CFLAGS="-I$PYTHON_INC" PYTHON_LIBS="-lpython$PYTHON_VERSION" have_python_dev=yes else if test yes = "$with_python" ; then as_fn_error $? "Couldn't find Python developer libs - you probably need to install a python-dev or python-devel package" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Couldn't find Python developer libs - you probably don't have a python-dev or python-devel package installed" >&5 $as_echo "$as_me: WARNING: Couldn't find Python developer libs - you probably don't have a python-dev or python-devel package installed" >&2;} fi fi else PYTHON_CFLAGS=$pkg_cv_PYTHON_CFLAGS PYTHON_LIBS=$pkg_cv_PYTHON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_python_dev=yes fi fi if test x$have_python_dev = xyes && test -n "$SWIG"; then HAVE_PYTHON_DEVEL_TRUE= HAVE_PYTHON_DEVEL_FALSE='#' else HAVE_PYTHON_DEVEL_TRUE='#' HAVE_PYTHON_DEVEL_FALSE= fi # Perl bindings: # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PERL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_PERL="perl" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PERL=$ac_cv_prog_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$PERL"; then PERL_ARCHLIB=`perl -MConfig -e 'print "$Config{archlib}";'` as_ac_File=`$as_echo "ac_cv_file_"$PERL_ARCHLIB/CORE/perl.h"" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"$PERL_ARCHLIB/CORE/perl.h\"" >&5 $as_echo_n "checking for \"$PERL_ARCHLIB/CORE/perl.h\"... " >&6; } if eval \${$as_ac_File+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r ""$PERL_ARCHLIB/CORE/perl.h""; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_File"\" = x"yes"; then : PERL_INC="$PERL_ARCHLIB/CORE" fi fi if test -n "$PERL" && test -n "$SWIG" && test -n "$PERL_INC"; then HAVE_PERL_DEVEL_TRUE= HAVE_PERL_DEVEL_FALSE='#' else HAVE_PERL_DEVEL_TRUE='#' HAVE_PERL_DEVEL_FALSE= fi specdir=`pwd`/$srcdir/../specs AMQP_FINAL_XML=$specdir/amqp.0-10-qpid-errata.xml if test -f $AMQP_FINAL_XML; then GENERATE_TRUE= GENERATE_FALSE='#' else GENERATE_TRUE='#' GENERATE_FALSE= fi test -f $AMQP_FINAL_XML -a -z "$RUBY" && as_fn_error $? "Missing ruby installation (try \"yum install ruby\")." "$LINENO" 5 # URL and download URL for the package. URL=http://rhm.et.redhat.com/qpidc DOWNLOAD_URL=http://rhm.et.redhat.com/download # Check for headers from required devel kits. for ac_header in boost/shared_ptr.hpp uuid/uuid.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else as_fn_error $? "Missing required header files." "$LINENO" 5 fi done # Check for optional cluster requirements. tmp_LIBS=$LIBS tmp_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpg_local_get in -lcpg" >&5 $as_echo_n "checking for cpg_local_get in -lcpg... " >&6; } if ${ac_cv_lib_cpg_cpg_local_get+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcpg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cpg_local_get (); int main () { return cpg_local_get (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_cpg_cpg_local_get=yes else ac_cv_lib_cpg_cpg_local_get=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cpg_cpg_local_get" >&5 $as_echo "$ac_cv_lib_cpg_cpg_local_get" >&6; } if test "x$ac_cv_lib_cpg_cpg_local_get" = xyes; then : have_libcpg=yes fi for ac_header in openais/cpg.h corosync/cpg.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF have_cpg_h=yes fi done # Check whether --with-cpg was given. if test "${with_cpg+set}" = set; then : withval=$with_cpg; case "${withval}" in yes) # yes - require dependencies test x$have_libcpg = xyes || as_fn_error $? "libcpg not found, install openais-devel or corosync-devel" "$LINENO" 5 test x$have_cpg_h = xyes || as_fn_error $? "cpg.h not found, install openais-devel or corosync-devel" "$LINENO" 5 with_cpg=yes ;; no) with_cpg=no ;; *) as_fn_error $? "Bad value ${withval} for --with-cpg option" "$LINENO" 5 ;; esac else # not specified - use if present test x$have_libcpg = xyes -a x$have_cpg_h = xyes && with_cpg=yes fi if test x$with_cpg = xyes; then HAVE_LIBCPG_TRUE= HAVE_LIBCPG_FALSE='#' else HAVE_LIBCPG_TRUE='#' HAVE_LIBCPG_FALSE= fi # Clean up unnceccassary flags if we don't use clustering if test ! x$with_cpg = xyes; then : LDFLAGS=$tmp_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cman_is_quorate in -lcman" >&5 $as_echo_n "checking for cman_is_quorate in -lcman... " >&6; } if ${ac_cv_lib_cman_cman_is_quorate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcman $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cman_is_quorate (); int main () { return cman_is_quorate (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_cman_cman_is_quorate=yes else ac_cv_lib_cman_cman_is_quorate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cman_cman_is_quorate" >&5 $as_echo "$ac_cv_lib_cman_cman_is_quorate" >&6; } if test "x$ac_cv_lib_cman_cman_is_quorate" = xyes; then : have_libcman=yes fi for ac_header in libcman.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "libcman.h" "ac_cv_header_libcman_h" "$ac_includes_default" if test "x$ac_cv_header_libcman_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCMAN_H 1 _ACEOF have_libcman_h=yes fi done # Check whether --with-libcman was given. if test "${with_libcman+set}" = set; then : withval=$with_libcman; case "${withval}" in yes) # yes - require dependencies test x$have_libcman = xyes || as_fn_error $? "libcman not found, install cman-devel or cmanlib-devel" "$LINENO" 5 test x$have_libcman_h = xyes || as_fn_error $? "libcman.h not found, install cman-devel or cmanlib-devel" "$LINENO" 5 with_libcman=yes ;; no) with_libcman=no ;; *) as_fn_error $? "Bad value ${withval} for --with-libcman option" "$LINENO" 5 ;; esac else # not specified - use if present and we're using with_cpg test x$have_libcman = xyes -a x$have_libcman_h = xyes -a x$with_cpg = xyes && with_libcman=yes fi if test x$with_libcman = xyes; then HAVE_LIBCMAN_TRUE= HAVE_LIBCMAN_FALSE='#' else HAVE_LIBCMAN_TRUE='#' HAVE_LIBCMAN_FALSE= fi LIBS=$tmp_LIBS # Setup --with-sasl/--without-sasl as arguments to configure # Check whether --with-sasl was given. if test "${with_sasl+set}" = set; then : withval=$with_sasl; WANT_SASL="$withval" else WANT_SASL=check fi # Make sure --with-sasl/--without-sasl were only give yes|no|check if test "x$WANT_SASL" != xyes -a \ "x$WANT_SASL" != xno -a \ "x$WANT_SASL" != xcheck; then : as_fn_error $? "Bad value for --with-sasl: $withval" "$LINENO" 5 fi # If we weren't explicitly asked /not/ to test, i.e. not given --without-sasl have_sasl=no if test "x$WANT_SASL" != xno; then : # Perform tests for headers and libraries. Remember, AC_CHECK_LIB # will give you some useful default behavior, e.g. setup LDFLAGS, if # you do not give it a second argument, so try not to ac_fn_cxx_check_header_mongrel "$LINENO" "sasl/sasl.h" "ac_cv_header_sasl_sasl_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_sasl_h" = xyes; then : else HAVE_SASL_H=no fi tmp_LIBS=$LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_checkpass in -lsasl2" >&5 $as_echo_n "checking for sasl_checkpass in -lsasl2... " >&6; } if ${ac_cv_lib_sasl2_sasl_checkpass+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsasl2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sasl_checkpass (); int main () { return sasl_checkpass (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_sasl2_sasl_checkpass=yes else ac_cv_lib_sasl2_sasl_checkpass=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sasl2_sasl_checkpass" >&5 $as_echo "$ac_cv_lib_sasl2_sasl_checkpass" >&6; } if test "x$ac_cv_lib_sasl2_sasl_checkpass" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSASL2 1 _ACEOF LIBS="-lsasl2 $LIBS" else HAVE_SASL_LIB=no fi # Remove from LIBS, we will link it explicitly in make files. LIBS=$tmp_LIBS # If any of the tests failed if test "x$HAVE_SASL_H" = xno -o \ "x$HAVE_SASL_LIB" = xno; then : # And we were given --with, then fail if test "x$WANT_SASL" = xyes; then : as_fn_error $? "sasl requested but not available" "$LINENO" 5 fi else # Otherwise, no tests failed, setup AC_SUBST/AC_DEFINE/vars for AM_CONDITIONALs $as_echo "#define BROKER_SASL_NAME \"qpidd\"" >>confdefs.h $as_echo "#define HAVE_SASL 1" >>confdefs.h have_sasl=yes fi # Extract the first word of "saslpasswd2", so it can be a program name with args. set dummy saslpasswd2; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SASL_PASSWD+:} false; then : $as_echo_n "(cached) " >&6 else case $SASL_PASSWD in [\\/]* | ?:[\\/]*) ac_cv_path_SASL_PASSWD="$SASL_PASSWD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/sbin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_SASL_PASSWD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi SASL_PASSWD=$ac_cv_path_SASL_PASSWD if test -n "$SASL_PASSWD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SASL_PASSWD" >&5 $as_echo "$SASL_PASSWD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$SASL_PASSWD = x; then : as_fn_error $? "saslpasswd2 not found" "$LINENO" 5 fi fi if test "x$have_sasl" = xyes; then HAVE_SASL_TRUE= HAVE_SASL_FALSE='#' else HAVE_SASL_TRUE='#' HAVE_SASL_FALSE= fi # Setup --with-xml/--without-xml as arguments to configure use_xml=yes want_xml=check # Check whether --with-xml was given. if test "${with_xml+set}" = set; then : withval=$with_xml; want_xml=$withval fi case $want_xml in yes|no|check) ;; *) as_fn_error $? "Bad value for --with-xml: $withval" "$LINENO" 5 ;; esac test $want_xml = no && use_xml=no # If the user doesn't say not to use XML, see if it's available. if test $use_xml != no; then # Then see if XQilla is available tmp_LIBS=$LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _init in -lxerces-c" >&5 $as_echo_n "checking for _init in -lxerces-c... " >&6; } if ${ac_cv_lib_xerces_c__init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxerces-c $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _init (); int main () { return _init (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_xerces_c__init=yes else ac_cv_lib_xerces_c__init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xerces_c__init" >&5 $as_echo "$ac_cv_lib_xerces_c__init" >&6; } if test "x$ac_cv_lib_xerces_c__init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXERCES_C 1 _ACEOF LIBS="-lxerces-c $LIBS" else use_xml=no fi ac_fn_cxx_check_header_mongrel "$LINENO" "xercesc/framework/MemBufInputSource.hpp" "ac_cv_header_xercesc_framework_MemBufInputSource_hpp" "$ac_includes_default" if test "x$ac_cv_header_xercesc_framework_MemBufInputSource_hpp" = xyes; then : else use_xml=no fi ac_fn_cxx_check_header_mongrel "$LINENO" "xqilla/xqilla-simple.hpp" "ac_cv_header_xqilla_xqilla_simple_hpp" "$ac_includes_default" if test "x$ac_cv_header_xqilla_xqilla_simple_hpp" = xyes; then : else use_xml=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _init in -lxqilla" >&5 $as_echo_n "checking for _init in -lxqilla... " >&6; } if ${ac_cv_lib_xqilla__init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lxqilla $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _init (); int main () { return _init (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_xqilla__init=yes else ac_cv_lib_xqilla__init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xqilla__init" >&5 $as_echo "$ac_cv_lib_xqilla__init" >&6; } if test "x$ac_cv_lib_xqilla__init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXQILLA 1 _ACEOF LIBS="-lxqilla $LIBS" else use_xml=no fi # Remove from LIBS, we will link it explicitly in make files. LIBS=$tmp_LIBS # If XQilla is not available, yet specifically requested, die. test $use_xml:$want_xml = no:yes && as_fn_error $? "XML Exchange requested, but XQilla or Xerces-C not available" "$LINENO" 5 # Else XQilla is available - use it to build test $use_xml = yes && $as_echo "#define HAVE_XML 1" >>confdefs.h # Check to see if we need to use legacy calls for effective boolean value xqilla_has_ebv=yes ac_fn_cxx_check_header_mongrel "$LINENO" "xqilla/ast/XQEffectiveBooleanValue.hpp" "ac_cv_header_xqilla_ast_XQEffectiveBooleanValue_hpp" "$ac_includes_default" if test "x$ac_cv_header_xqilla_ast_XQEffectiveBooleanValue_hpp" = xyes; then : else xqilla_has_ebv=no fi test $xqilla_has_ebv = yes && $as_echo "#define XQ_EFFECTIVE_BOOLEAN_VALUE_HPP 1" >>confdefs.h fi if test $use_xml = yes; then HAVE_XML_TRUE= HAVE_XML_FALSE='#' else HAVE_XML_TRUE='#' HAVE_XML_FALSE= fi # Setup --with-rdma/--without-rdma as arguments to configure tmp_LIBS=$LIBS # Check whether --with-rdma was given. if test "${with_rdma+set}" = set; then : withval=$with_rdma; case ${withval} in yes) with_RDMA=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_create_qp in -libverbs" >&5 $as_echo_n "checking for ibv_create_qp in -libverbs... " >&6; } if ${ac_cv_lib_ibverbs_ibv_create_qp+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-libverbs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ibv_create_qp (); int main () { return ibv_create_qp (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_ibverbs_ibv_create_qp=yes else ac_cv_lib_ibverbs_ibv_create_qp=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_create_qp" >&5 $as_echo "$ac_cv_lib_ibverbs_ibv_create_qp" >&6; } if test "x$ac_cv_lib_ibverbs_ibv_create_qp" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBIBVERBS 1 _ACEOF LIBS="-libverbs $LIBS" else as_fn_error $? "libibverbs not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rdma_create_id in -lrdmacm" >&5 $as_echo_n "checking for rdma_create_id in -lrdmacm... " >&6; } if ${ac_cv_lib_rdmacm_rdma_create_id+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrdmacm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rdma_create_id (); int main () { return rdma_create_id (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_rdmacm_rdma_create_id=yes else ac_cv_lib_rdmacm_rdma_create_id=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rdmacm_rdma_create_id" >&5 $as_echo "$ac_cv_lib_rdmacm_rdma_create_id" >&6; } if test "x$ac_cv_lib_rdmacm_rdma_create_id" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRDMACM 1 _ACEOF LIBS="-lrdmacm $LIBS" else as_fn_error $? "librdmacm not found" "$LINENO" 5 fi for ac_header in infiniband/verbs.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default" if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INFINIBAND_VERBS_H 1 _ACEOF else as_fn_error $? "ibverbs header files not found" "$LINENO" 5 fi done for ac_header in rdma/rdma_cma.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "rdma/rdma_cma.h" "ac_cv_header_rdma_rdma_cma_h" "$ac_includes_default" if test "x$ac_cv_header_rdma_rdma_cma_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_RDMA_RDMA_CMA_H 1 _ACEOF else as_fn_error $? "rdma_cm header files not found" "$LINENO" 5 fi done ;; no) with_RDMA=no ;; *) as_fn_error $? "Bad value for --with-rdma: ${withval}" "$LINENO" 5 ;; esac else with_RDMA=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_create_qp in -libverbs" >&5 $as_echo_n "checking for ibv_create_qp in -libverbs... " >&6; } if ${ac_cv_lib_ibverbs_ibv_create_qp+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-libverbs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ibv_create_qp (); int main () { return ibv_create_qp (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_ibverbs_ibv_create_qp=yes else ac_cv_lib_ibverbs_ibv_create_qp=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_create_qp" >&5 $as_echo "$ac_cv_lib_ibverbs_ibv_create_qp" >&6; } if test "x$ac_cv_lib_ibverbs_ibv_create_qp" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBIBVERBS 1 _ACEOF LIBS="-libverbs $LIBS" else with_RDMA=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rdma_create_id in -lrdmacm" >&5 $as_echo_n "checking for rdma_create_id in -lrdmacm... " >&6; } if ${ac_cv_lib_rdmacm_rdma_create_id+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrdmacm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char rdma_create_id (); int main () { return rdma_create_id (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_rdmacm_rdma_create_id=yes else ac_cv_lib_rdmacm_rdma_create_id=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rdmacm_rdma_create_id" >&5 $as_echo "$ac_cv_lib_rdmacm_rdma_create_id" >&6; } if test "x$ac_cv_lib_rdmacm_rdma_create_id" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRDMACM 1 _ACEOF LIBS="-lrdmacm $LIBS" else with_RDMA=no fi for ac_header in infiniband/verbs.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default" if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INFINIBAND_VERBS_H 1 _ACEOF else with_RDMA=no fi done for ac_header in rdma/rdma_cma.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "rdma/rdma_cma.h" "ac_cv_header_rdma_rdma_cma_h" "$ac_includes_default" if test "x$ac_cv_header_rdma_rdma_cma_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_RDMA_RDMA_CMA_H 1 _ACEOF else with_RDMA=no fi done fi # Remove from LIBS, we will link it explicitly in make files. LIBS=$tmp_LIBS if test x$with_RDMA = xyes; then RDMA_TRUE= RDMA_FALSE='#' else RDMA_TRUE='#' RDMA_FALSE= fi # Setup --with-ssl/--without-ssl as arguments to configure SSL_CFLAGS="" SSL_LDFLAGS="" # Check whether --with-ssl was given. if test "${with_ssl+set}" = set; then : withval=$with_ssl; case ${withval} in yes) with_SSL=yes # Extract the first word of "nspr-config", so it can be a program name with args. set dummy nspr-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_NSPR_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $NSPR_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NSPR_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi NSPR_CONFIG=$ac_cv_path_NSPR_CONFIG if test -n "$NSPR_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSPR_CONFIG" >&5 $as_echo "$NSPR_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$NSPR_CONFIG = x; then : as_fn_error $? "libnspr not found" "$LINENO" 5 fi # Extract the first word of "nss-config", so it can be a program name with args. set dummy nss-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_NSS_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $NSS_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NSS_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi NSS_CONFIG=$ac_cv_path_NSS_CONFIG if test -n "$NSS_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSS_CONFIG" >&5 $as_echo "$NSS_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$NSS_CONFIG = x; then : as_fn_error $? "libnss not found" "$LINENO" 5 fi SSL_CFLAGS="`$NSPR_CONFIG --cflags` `$NSS_CONFIG --cflags`" SSL_LDFLAGS="`$NSPR_CONFIG --libs` `$NSS_CONFIG --libs`" ;; no) with_SSL=no ;; *) as_fn_error $? "Bad value for --with-ssl: ${withval}" "$LINENO" 5 ;; esac else with_SSL=yes # Extract the first word of "nspr-config", so it can be a program name with args. set dummy nspr-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_NSPR_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $NSPR_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_NSPR_CONFIG="$NSPR_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NSPR_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi NSPR_CONFIG=$ac_cv_path_NSPR_CONFIG if test -n "$NSPR_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSPR_CONFIG" >&5 $as_echo "$NSPR_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$NSPR_CONFIG = x; then : with_SSL=no else # Extract the first word of "nss-config", so it can be a program name with args. set dummy nss-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_NSS_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $NSS_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_NSS_CONFIG="$NSS_CONFIG" # 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_NSS_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi NSS_CONFIG=$ac_cv_path_NSS_CONFIG if test -n "$NSS_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NSS_CONFIG" >&5 $as_echo "$NSS_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x$NSS_CONFIG = x; then : with_SSL=no else SSL_CFLAGS="`$NSPR_CONFIG --cflags` `$NSS_CONFIG --cflags`" SSL_LDFLAGS="`$NSPR_CONFIG --libs` `$NSS_CONFIG --libs`" fi fi fi # Remove from LIBS, we will link it explicitly in make files. if test x$with_SSL = xyes; then SSL_TRUE= SSL_FALSE='#' else SSL_TRUE='#' SSL_FALSE= fi poller=no # Check whether --with-poller was given. if test "${with_poller+set}" = set; then : withval=$with_poller; case ${withval} in poll) for ac_header in sys/poll.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default" if test "x$ac_cv_header_sys_poll_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_POLL_H 1 _ACEOF poller=poll else as_fn_error $? "Can't find poll.h header file for poll" "$LINENO" 5 fi done ;; solaris-ecf) for ac_header in port.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "port.h" "ac_cv_header_port_h" "$ac_includes_default" if test "x$ac_cv_header_port_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PORT_H 1 _ACEOF poller=solaris-ecf else as_fn_error $? "Can't find port.h header file for solaris-ecf" "$LINENO" 5 fi done ;; epoll) for ac_header in sys/epoll.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default" if test "x$ac_cv_header_sys_epoll_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_EPOLL_H 1 _ACEOF poller=epoll else as_fn_error $? "Can't find epoll.h header file for epoll" "$LINENO" 5 fi done ;; esac else # We check for poll first so that it is overridden for ac_header in sys/poll.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "sys/poll.h" "ac_cv_header_sys_poll_h" "$ac_includes_default" if test "x$ac_cv_header_sys_poll_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_POLL_H 1 _ACEOF poller=poll fi done # Not currently supported - WIP #AC_CHECK_HEADERS([port.h],[poller=solaris-ecf],) for ac_header in sys/epoll.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default" if test "x$ac_cv_header_sys_epoll_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_EPOLL_H 1 _ACEOF poller=epoll fi done fi if test x$poller = xsolaris-ecf; then USE_ECF_TRUE= USE_ECF_FALSE='#' else USE_ECF_TRUE='#' USE_ECF_FALSE= fi if test x$poller = xpoll; then USE_POLL_TRUE= USE_POLL_FALSE='#' else USE_POLL_TRUE='#' USE_POLL_FALSE= fi if test x$poller = xepoll; then USE_EPOLL_TRUE= USE_EPOLL_FALSE='#' else USE_EPOLL_TRUE='#' USE_EPOLL_FALSE= fi #Filter not implemented or invalid mechanisms if test $poller = xno; then as_fn_error $? "Polling mechanism not implemented for $host" "$LINENO" 5 fi #Guess host architecture, to choose platform-dependent objects case "$host" in *sun-solaris*) arch=solaris ;; esac if test x$arch = xsolaris; then SUNOS_TRUE= SUNOS_FALSE='#' else SUNOS_TRUE='#' SUNOS_FALSE= fi # Check whether we've got the header for dtrace static probes # Check whether --with-probes was given. if test "${with_probes+set}" = set; then : withval=$with_probes; case ${withval} in yes) for ac_header in sys/sdt.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sdt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SDT_H 1 _ACEOF fi done ;; no) ;; *) as_fn_error $? "Bad value for --with-probes: ${withval}" "$LINENO" 5 ;; esac else for ac_header in sys/sdt.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sdt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SDT_H 1 _ACEOF fi done fi # Check for some syslog capabilities not present in all systems cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int v = LOG_AUTHPRIV; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define HAVE_LOG_AUTHPRIV 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int v = LOG_FTP; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define HAVE_LOG_FTP 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext #Check if we need to include libacl to provide acl API gl_saved_libs=$LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl" >&5 $as_echo_n "checking for library containing acl... " >&6; } if ${ac_cv_search_acl+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char acl (); int main () { return acl (); ; return 0; } _ACEOF for ac_lib in '' acl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_acl=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_acl+:} false; then : break fi done if ${ac_cv_search_acl+:} false; then : else ac_cv_search_acl=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl" >&5 $as_echo "$ac_cv_search_acl" >&6; } ac_res=$ac_cv_search_acl if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" test "$ac_cv_search_acl" = "none required" || LIB_ACL=$ac_cv_search_acl fi LIBS=$gl_saved_libs SOCKLIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : SOCKET_LIB="-lsocket" else SOCKET_LIB="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getipnodebyname in -lnsl" >&5 $as_echo_n "checking for getipnodebyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_getipnodebyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getipnodebyname (); int main () { return getipnodebyname (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_nsl_getipnodebyname=yes else ac_cv_lib_nsl_getipnodebyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_getipnodebyname" >&5 $as_echo "$ac_cv_lib_nsl_getipnodebyname" >&6; } if test "x$ac_cv_lib_nsl_getipnodebyname" = xyes; then : NSL_LIB="-lnsl" else NSL_LIB="" fi SOCKLIBS="$SOCKET_LIB $NSL_LIB" # Used by env scripts to find libraries in cmake or autoconf builds. builddir_lib_suffix="/.libs" # Files to generate ac_config_files="$ac_config_files Makefile examples/Makefile examples/old_api/Makefile examples/old_api/direct/Makefile examples/old_api/fanout/Makefile examples/old_api/pub-sub/Makefile examples/old_api/request-response/Makefile examples/old_api/failover/Makefile examples/old_api/xml-exchange/Makefile examples/qmf-console/Makefile examples/old_api/tradedemo/Makefile examples/messaging/Makefile bindings/qpid/Makefile bindings/qpid/ruby/Makefile bindings/qpid/python/Makefile bindings/qpid/perl/Makefile.PL bindings/qpid/dotnet/Makefile bindings/qmf/Makefile bindings/qmf/ruby/Makefile bindings/qmf/python/Makefile bindings/qmf/tests/Makefile bindings/qmf2/Makefile bindings/qmf2/ruby/Makefile bindings/qmf2/python/Makefile bindings/qmf2/examples/cpp/Makefile managementgen/Makefile etc/Makefile src/Makefile src/tests/Makefile src/tests/test_env.sh src/tests/install_env.sh src/qpid.pc src/qmf2.pc docs/man/Makefile docs/api/Makefile docs/api/user.doxygen docs/api/developer.doxygen" 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, we kill variables containing newlines. # 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. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 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}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_HELP2MAN_TRUE}" && test -z "${HAVE_HELP2MAN_FALSE}"; then as_fn_error $? "conditional \"HAVE_HELP2MAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RPMLINT_TRUE}" && test -z "${HAS_RPMLINT_FALSE}"; then as_fn_error $? "conditional \"HAS_RPMLINT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SWIG_TRUE}" && test -z "${HAVE_SWIG_FALSE}"; then as_fn_error $? "conditional \"HAVE_SWIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_RUBY_DEVEL_TRUE}" && test -z "${HAVE_RUBY_DEVEL_FALSE}"; then as_fn_error $? "conditional \"HAVE_RUBY_DEVEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PYTHON_DEVEL_TRUE}" && test -z "${HAVE_PYTHON_DEVEL_FALSE}"; then as_fn_error $? "conditional \"HAVE_PYTHON_DEVEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PERL_DEVEL_TRUE}" && test -z "${HAVE_PERL_DEVEL_FALSE}"; then as_fn_error $? "conditional \"HAVE_PERL_DEVEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GENERATE_TRUE}" && test -z "${GENERATE_FALSE}"; then as_fn_error $? "conditional \"GENERATE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBCPG_TRUE}" && test -z "${HAVE_LIBCPG_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBCPG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBCMAN_TRUE}" && test -z "${HAVE_LIBCMAN_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBCMAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SASL_TRUE}" && test -z "${HAVE_SASL_FALSE}"; then as_fn_error $? "conditional \"HAVE_SASL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XML_TRUE}" && test -z "${HAVE_XML_FALSE}"; then as_fn_error $? "conditional \"HAVE_XML\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RDMA_TRUE}" && test -z "${RDMA_FALSE}"; then as_fn_error $? "conditional \"RDMA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SSL_TRUE}" && test -z "${SSL_FALSE}"; then as_fn_error $? "conditional \"SSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_ECF_TRUE}" && test -z "${USE_ECF_FALSE}"; then as_fn_error $? "conditional \"USE_ECF\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_POLL_TRUE}" && test -z "${USE_POLL_FALSE}"; then as_fn_error $? "conditional \"USE_POLL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_EPOLL_TRUE}" && test -z "${USE_EPOLL_FALSE}"; then as_fn_error $? "conditional \"USE_EPOLL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SUNOS_TRUE}" && test -z "${SUNOS_FALSE}"; then as_fn_error $? "conditional \"SUNOS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $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} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # 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 ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by qpidc $as_me 0.16, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent 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_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ qpidc config.status 0.16 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. 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=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "examples/old_api/Makefile") CONFIG_FILES="$CONFIG_FILES examples/old_api/Makefile" ;; "examples/old_api/direct/Makefile") CONFIG_FILES="$CONFIG_FILES examples/old_api/direct/Makefile" ;; "examples/old_api/fanout/Makefile") CONFIG_FILES="$CONFIG_FILES examples/old_api/fanout/Makefile" ;; "examples/old_api/pub-sub/Makefile") CONFIG_FILES="$CONFIG_FILES examples/old_api/pub-sub/Makefile" ;; "examples/old_api/request-response/Makefile") CONFIG_FILES="$CONFIG_FILES examples/old_api/request-response/Makefile" ;; "examples/old_api/failover/Makefile") CONFIG_FILES="$CONFIG_FILES examples/old_api/failover/Makefile" ;; "examples/old_api/xml-exchange/Makefile") CONFIG_FILES="$CONFIG_FILES examples/old_api/xml-exchange/Makefile" ;; "examples/qmf-console/Makefile") CONFIG_FILES="$CONFIG_FILES examples/qmf-console/Makefile" ;; "examples/old_api/tradedemo/Makefile") CONFIG_FILES="$CONFIG_FILES examples/old_api/tradedemo/Makefile" ;; "examples/messaging/Makefile") CONFIG_FILES="$CONFIG_FILES examples/messaging/Makefile" ;; "bindings/qpid/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qpid/Makefile" ;; "bindings/qpid/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qpid/ruby/Makefile" ;; "bindings/qpid/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qpid/python/Makefile" ;; "bindings/qpid/perl/Makefile.PL") CONFIG_FILES="$CONFIG_FILES bindings/qpid/perl/Makefile.PL" ;; "bindings/qpid/dotnet/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qpid/dotnet/Makefile" ;; "bindings/qmf/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qmf/Makefile" ;; "bindings/qmf/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qmf/ruby/Makefile" ;; "bindings/qmf/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qmf/python/Makefile" ;; "bindings/qmf/tests/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qmf/tests/Makefile" ;; "bindings/qmf2/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qmf2/Makefile" ;; "bindings/qmf2/ruby/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qmf2/ruby/Makefile" ;; "bindings/qmf2/python/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qmf2/python/Makefile" ;; "bindings/qmf2/examples/cpp/Makefile") CONFIG_FILES="$CONFIG_FILES bindings/qmf2/examples/cpp/Makefile" ;; "managementgen/Makefile") CONFIG_FILES="$CONFIG_FILES managementgen/Makefile" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/tests/Makefile" ;; "src/tests/test_env.sh") CONFIG_FILES="$CONFIG_FILES src/tests/test_env.sh" ;; "src/tests/install_env.sh") CONFIG_FILES="$CONFIG_FILES src/tests/install_env.sh" ;; "src/qpid.pc") CONFIG_FILES="$CONFIG_FILES src/qpid.pc" ;; "src/qmf2.pc") CONFIG_FILES="$CONFIG_FILES src/qmf2.pc" ;; "docs/man/Makefile") CONFIG_FILES="$CONFIG_FILES docs/man/Makefile" ;; "docs/api/Makefile") CONFIG_FILES="$CONFIG_FILES docs/api/Makefile" ;; "docs/api/user.doxygen") CONFIG_FILES="$CONFIG_FILES docs/api/user.doxygen" ;; "docs/api/developer.doxygen") CONFIG_FILES="$CONFIG_FILES docs/api/developer.doxygen" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 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 against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #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. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_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=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # 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 cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # 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 # 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//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # 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 # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # 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 # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # 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 # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # 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 # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # 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 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # 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 # 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 # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # 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 a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # 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 DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # 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 # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # 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 # 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 # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_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 _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # 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) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # 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 # 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 # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # 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 a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # 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 DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_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 # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_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 # 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 # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # 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 || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi qpidc-0.16/BuildInstallSettings.cmake0000664000076400007640000001651111654522741020260 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings related to the Qpid build and install CMake/CTest/CPack procedure. # These are used by both the C++ and WCF components. # Parse the version from QPID_VERSION.txt. # Use the top level qpid/ file if we're in an SVN checkout, source dir otherwise. if(EXISTS "${PROJECT_SOURCE_DIR}/../QPID_VERSION.txt") file(READ "${PROJECT_SOURCE_DIR}/../QPID_VERSION.txt" QPID_VERSION) elseif (EXISTS "${PROJECT_SOURCE_DIR}/QPID_VERSION.txt") file(READ "${PROJECT_SOURCE_DIR}/QPID_VERSION.txt" QPID_VERSION) else() message(FATAL_ERROR "Cannot find QPID_VERSION.txt") endif(EXISTS "${PROJECT_SOURCE_DIR}/../QPID_VERSION.txt") string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\n" "\\1" QPID_VERSION_MAJOR "${QPID_VERSION}") string(REGEX REPLACE "^([0-9]+)\\.([0-9]+)\n" "\\2" QPID_VERSION_MINOR "${QPID_VERSION}") # When doing installs, there are a number of components that the item can # be associated with. Since there may be different sets of components desired # for the various platforms, the component names are defined here. When # setting the COMPONENT in an install directive, use these to ensure that # the item is installed correctly. if (WIN32) # Install types; these defines the component sets that are installed. # Each component (below) indicates which of these install type(s) it is # included in. The user can refine the components at install time. set (CPACK_ALL_INSTALL_TYPES Broker Development Full) set (QPID_COMPONENT_COMMON Common) set (CPACK_COMPONENT_COMMON_INSTALL_TYPES Broker Development Full) set (CPACK_COMPONENT_COMMON_DISPLAY_NAME "Required common runtime items") set (CPACK_COMPONENT_COMMON_DESCRIPTION "Run-time library common to all runtime components in Qpid.\nThis item is required by both broker and client components.") set (QPID_COMPONENT_BROKER Broker) set (CPACK_COMPONENT_BROKER_DEPENDS Common) set (CPACK_COMPONENT_BROKER_INSTALL_TYPES Broker Full) set (CPACK_COMPONENT_BROKER_DISPLAY_NAME "Broker") set (CPACK_COMPONENT_BROKER_DESCRIPTION "Messaging broker; controls message flow within the system.\nAt least one broker is required to run any messaging application.") set (QPID_COMPONENT_CLIENT Client) set (CPACK_COMPONENT_CLIENT_DEPENDS Common) set (CPACK_COMPONENT_CLIENT_INSTALL_TYPES Development Full) set (CPACK_COMPONENT_CLIENT_DISPLAY_NAME "Client runtime libraries") set (CPACK_COMPONENT_CLIENT_DESCRIPTION "Runtime library components required to build and execute a client application.") set (QPID_COMPONENT_CLIENT_INCLUDE ClientInclude) set (CPACK_COMPONENT_CLIENTINCLUDE_INSTALL_TYPES Development Full) set (CPACK_COMPONENT_CLIENTINCLUDE_DISPLAY_NAME "Client programming header files") set (CPACK_COMPONENT_CLIENTINCLUDE_DESCRIPTION "C++ header files required to build any Qpid messaging application.") set (QPID_COMPONENT_EXAMPLES Examples) set (CPACK_COMPONENT_EXAMPLES_INSTALL_TYPES Development Full) set (CPACK_COMPONENT_EXAMPLES_DISPLAY_NAME "C++ Client programming examples") set (CPACK_COMPONENT_EXAMPLES_DESCRIPTION "Example source code for using the C++ Client.") set (QPID_COMPONENT_QMF QMF) set (CPACK_COMPONENT_QMF_INSTALL_TYPES Development Full) set (CPACK_COMPONENT_QMF_DISPLAY_NAME "Qpid Management Framework (QMF)") set (CPACK_COMPONENT_QMF_DESCRIPTION "QMF Agent allows you to embed QMF management in your program.\nQMF Console allows you to build management programs using QMF.") set (QPID_INSTALL_BINDIR bin CACHE STRING "Directory to install user executables") set (QPID_INSTALL_CONFDIR conf CACHE STRING "Directory to install configuration files") set (QPID_INSTALL_SASLDIR conf CACHE STRING "Directory to install SASL configuration files") set (QPID_INSTALL_DATADIR conf CACHE STRING "Directory to install read-only arch.-independent data root") set (QPID_INSTALL_EXAMPLESDIR examples CACHE STRING "Directory to install programming examples in") set (QPID_INSTALL_HTMLDIR docs/api/html CACHE STRING "Directory to install HTML documentation") set (QPID_INSTALL_INCLUDEDIR include CACHE STRING "Directory to install programming header files") set (QPID_INSTALL_LIBDIR bin CACHE STRING "Directory to install library files") set (QPID_INSTALL_SBINDIR bin CACHE STRING "Directory to install system admin executables") set (QPIDC_MODULE_DIR plugins/client CACHE STRING "Directory to load client plug-in modules from") set (QPIDD_MODULE_DIR plugins/broker CACHE STRING "Directory to load broker plug-in modules from") endif (WIN32) if (UNIX) set (QPID_COMPONENT_BROKER runtime) set (QPID_COMPONENT_CLIENT runtime) set (QPID_COMPONENT_COMMON runtime) set (CPACK_COMPONENT_RUNTIME_DISPLAY_NAME "Items required to run broker and/or client programs") set (QPID_COMPONENT_CLIENT_INCLUDE development) set (QPID_COMPONENT_EXAMPLES development) set (QPID_COMPONENT_QMF development) set (CPACK_COMPONENT_DEVELOPMENT_DISPLAY_NAME "Items required to build new C++ Qpid client programs") set (QPID_INSTALL_BINDIR bin CACHE STRING "Directory to install user executables") set (QPID_INSTALL_CONFDIR etc/qpid CACHE STRING "Directory to install configuration files") set (QPID_INSTALL_DATADIR share/qpid CACHE STRING "Directory to install read-only arch.-independent data root") set (QPID_INSTALL_SASLDIR etc/sasl2 CACHE STRING "Directory to install SASL configuration files") set (QPID_INSTALL_EXAMPLESDIR share/examples CACHE STRING "Directory to install programming examples in") set (QPID_INSTALL_HTMLDIR html CACHE STRING "Directory to install HTML documentation") set (QPID_INSTALL_INCLUDEDIR include CACHE STRING "Directory to install programming header files") set (QPID_INSTALL_LIBDIR lib CACHE STRING "Directory to install library files") set (QPID_INSTALL_SBINDIR sbin CACHE STRING "Directory to install system admin executables") set (QPIDC_MODULE_DIR ${QPID_INSTALL_LIBDIR}/qpid/client CACHE STRING "Directory to load client plug-in modules from") set (QPIDD_MODULE_DIR ${QPID_INSTALL_LIBDIR}/qpid/daemon CACHE STRING "Directory to load broker plug-in modules from") set (QPID_LIBEXEC_DIR libexec/qpid CACHE STRING "Directory for executables used by qpid libs") set (QPID_LOCALSTATE_DIR var CACHE STRING "Directory to store local state data") set (QPID_MAN_DIR man CACHE STRING "Directory to install manual files") endif (UNIX) qpidc-0.16/Makefile.in0000664000076400007640000006101211752725662015216 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in \ $(top_srcdir)/bindings/qpid/perl/Makefile.PL.in \ $(top_srcdir)/configure INSTALL build-aux/compile \ build-aux/config.guess build-aux/config.rpath \ build-aux/config.sub build-aux/depcomp build-aux/install-sh \ build-aux/ltmain.sh build-aux/mdate-sh build-aux/missing \ build-aux/py-compile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(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 config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = bindings/qpid/perl/Makefile.PL CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck 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)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = 1.9.2 foreign ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ LICENSE NOTICE README.txt SSL RELEASE_NOTES DESIGN \ xml/cluster.xml INSTALL-WINDOWS CMakeLists.txt BuildInstallSettings.cmake \ packaging/NSIS QPID_VERSION.txt bindings/swig_python_typemaps.i \ bindings/swig_ruby_typemaps.i bindings/swig_perl_typemaps.i SUBDIRS = managementgen etc src docs/api docs/man examples bindings/qmf bindings/qpid bindings/qmf2 all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign 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) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): bindings/qpid/perl/Makefile.PL: $(top_builddir)/config.status $(top_srcdir)/bindings/qpid/perl/Makefile.PL.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # 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): @fail= 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; \ ($(am__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" $(RECURSIVE_CLEAN_TARGETS): @fail= 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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 $(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-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(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 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(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) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__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 \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__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 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 $(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 html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am # Update libtool, if needed. libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck check-long: all $(MAKE) -C src/tests check-long # 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: qpidc-0.16/src/0000775000076400007640000000000011752725716013740 5ustar00jrossjross00000000000000qpidc-0.16/src/rubygen.mk0000664000076400007640000012077511752725705015756 0ustar00jrossjross00000000000000# Generated makefile fragment. # Including makefile defines $(rgen_dir) $(rgen_cmd) and $(specs). rgen_generator=$(rgen_dir)/framing.0-10/OperationsInvoker.rb \ $(rgen_dir)/framing.0-10/MethodBodyConstVisitor.rb \ $(rgen_dir)/framing.0-10/frame_body_lists.rb \ $(rgen_dir)/framing.0-10/Proxy.rb \ $(rgen_dir)/framing.0-10/structs.rb \ $(rgen_dir)/framing.0-10/constants.rb \ $(rgen_dir)/framing.0-10/Operations.rb \ $(rgen_dir)/framing.0-10/all_method_bodies.rb \ $(rgen_dir)/framing.0-10/MethodBodyFactory.rb \ $(rgen_dir)/framing.0-10/Session.rb \ $(rgen_dir)/framing.0-10/MethodBodyDefaultVisitor.rb \ $(rgen_dir)/amqpgen.rb \ $(rgen_dir)/0-10/handlers.rb \ $(rgen_dir)/0-10/typecode.rb \ $(rgen_dir)/0-10/allsegmenttypes.rb \ $(rgen_dir)/0-10/exceptions.rb \ $(rgen_dir)/0-10/specification.rb \ $(rgen_dir)/cppgen.rb \ $(rgen_dir)/MethodBodyDefaultVisitor.rb \ $(rgen_dir)/generate rgen_amqp_0_10_srcs = ./qpid/amqp_0_10/ApplyCommand.h \ ./qpid/amqp_0_10/handlers.h \ ./qpid/amqp_0_10/structs.h \ ./qpid/amqp_0_10/ApplyStruct.h \ ./qpid/amqp_0_10/ControlVisitor.h \ ./qpid/amqp_0_10/StructHolder.h \ ./qpid/amqp_0_10/CodeForType.h \ ./qpid/amqp_0_10/StructHolder.cpp \ ./qpid/amqp_0_10/ControlHolder.cpp \ ./qpid/amqp_0_10/specification.h \ ./qpid/amqp_0_10/specification.cpp \ ./qpid/amqp_0_10/ControlHolder.h \ ./qpid/amqp_0_10/TypeForCode.cpp \ ./qpid/amqp_0_10/ApplyControl.h \ ./qpid/amqp_0_10/TypeForCode.h \ ./qpid/amqp_0_10/CommandHolder.h \ ./qpid/amqp_0_10/StructVisitor.h \ ./qpid/amqp_0_10/CommandVisitor.h \ ./qpid/amqp_0_10/CodeForType.cpp \ ./qpid/amqp_0_10/specification_fwd.h \ ./qpid/amqp_0_10/CommandHolder.cpp \ ./qpid/amqp_0_10/ProxyTemplate.h \ ./qpid/amqp_0_10/exceptions.h \ ./qpid/amqp_0_10/structs.cpp rgen_framing_srcs = ./qpid/framing/ClusterConnectionTxPublishBody.cpp \ ./qpid/framing/ClusterConnectionTxAcceptBody.cpp \ ../include/qpid/framing/XaResult.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.cpp \ ./qpid/framing/SessionExpectedBody.h \ ./qpid/framing/ExchangeUnbindBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.cpp \ ./qpid/framing/SessionCommandPointBody.h \ ./qpid/framing/QueuePurgeBody.h \ ./qpid/framing/ExchangeQueryResult.cpp \ ../include/qpid/framing/constants.h \ ./qpid/framing/ClusterConnectionTxStartBody.cpp \ ./qpid/framing/ExecutionResultBody.h \ ./qpid/framing/DtxStartBody.cpp \ ./qpid/framing/QueueDeclareBody.h \ ./qpid/framing/FilePublishBody.h \ ./qpid/framing/FileRejectBody.cpp \ ./qpid/framing/ClusterConnectionTxEnqueueBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.h \ ./qpid/framing/MessageResumeBody.h \ ./qpid/framing/ClusterReadyBody.h \ ./qpid/framing/ConnectionSecureOkBody.h \ ./qpid/framing/FileStageBody.h \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.h \ ./qpid/framing/ConnectionOpenOkBody.cpp \ ./qpid/framing/ServerInvoker.h \ ./qpid/framing/FileConsumeOkBody.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.h \ ./qpid/framing/ClusterTimerDropBody.h \ ../include/qpid/framing/MessageResumeResult.h \ ./qpid/framing/SessionAttachedBody.h \ ./qpid/framing/ExchangeBindBody.h \ ./qpid/framing/DtxRecoverBody.h \ ./qpid/framing/ClusterConnectionTxEndBody.cpp \ ./qpid/framing/ClusterTimerDropBody.cpp \ ./qpid/framing/ClusterReadyBody.cpp \ ./qpid/framing/SessionExpectedBody.cpp \ ./qpid/framing/StreamConsumeOkBody.cpp \ ./qpid/framing/MessageReleaseBody.cpp \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.h \ ./qpid/framing/ClusterClockBody.cpp \ ./qpid/framing/FileDeliverBody.h \ ./qpid/framing/FileQosBody.cpp \ ./qpid/framing/MessageTransferBody.cpp \ ./qpid/framing/FileCancelBody.cpp \ ../include/qpid/framing/reply_exceptions.h \ ./qpid/framing/AllInvoker.cpp \ ./qpid/framing/FileDeliverBody.cpp \ ./qpid/framing/Header.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.cpp \ ./qpid/framing/ConnectionSecureBody.cpp \ ./qpid/framing/MessageAcceptBody.cpp \ ./qpid/framing/AMQP_AllOperations.h \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxAckBody.h \ ./qpid/framing/ClusterConnectionAbortBody.h \ ./qpid/framing/SessionConfirmedBody.cpp \ ./qpid/framing/StreamReturnBody.h \ ./qpid/framing/StreamCancelBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.h \ ./qpid/framing/SessionDetachedBody.h \ ./qpid/framing/StreamConsumeOkBody.h \ ./qpid/framing/MessageFlowBody.h \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.h \ ./qpid/framing/SessionCommandPointBody.cpp \ ./qpid/framing/SessionDetachedBody.cpp \ ./qpid/framing/AMQP_ServerOperations.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.cpp \ ./qpid/framing/QueuePurgeBody.cpp \ ./qpid/framing/StreamReturnBody.cpp \ ./qpid/framing/ServerInvoker.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.cpp \ ./qpid/framing/ClusterConnectionQueuePositionBody.cpp \ ./qpid/framing/ClusterDeliverToQueueBody.cpp \ ./qpid/framing/frame_body_lists.h \ ./qpid/framing/StreamQosBody.cpp \ ./qpid/framing/ConnectionStartOkBody.cpp \ ./qpid/framing/StreamCancelBody.h \ ./qpid/framing/ClusterConnectionDtxStartBody.cpp \ ../include/qpid/framing/ReplyTo.h \ ./qpid/framing/DtxEndBody.h \ ./qpid/framing/ClusterTimerWakeupBody.cpp \ ./qpid/framing/XaResult.cpp \ ./qpid/framing/DtxRecoverBody.cpp \ ./qpid/framing/DtxSetTimeoutBody.h \ ../include/qpid/framing/QueueQueryResult.h \ ./qpid/framing/ConnectionOpenBody.h \ ./qpid/framing/StreamDeliverBody.h \ ./qpid/framing/FileRejectBody.h \ ./qpid/framing/ClusterConnectionClockBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.h \ ./qpid/framing/DtxCommitBody.cpp \ ./qpid/framing/FileProperties.cpp \ ./qpid/framing/MessageSubscribeBody.h \ ./qpid/framing/ExecutionExceptionBody.h \ ./qpid/framing/ConnectionStartOkBody.h \ ./qpid/framing/FileQosOkBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.cpp \ ./qpid/framing/MessageResumeBody.cpp \ ./qpid/framing/ExchangeQueryBody.h \ ./qpid/framing/FileCancelBody.h \ ./qpid/framing/TxSelectBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.h \ ./qpid/framing/ClusterConnectionDeliverCloseBody.cpp \ ./qpid/framing/ClusterErrorCheckBody.h \ ./qpid/framing/DtxStartBody.h \ ./qpid/framing/TxSelectBody.cpp \ ./qpid/framing/FileReturnBody.cpp \ ./qpid/framing/MessageRejectBody.cpp \ ./qpid/framing/AMQP_AllProxy.h \ ./qpid/framing/MessageProperties.cpp \ ./qpid/framing/MessageFlushBody.h \ ./qpid/framing/DtxRollbackBody.h \ ./qpid/framing/ClientInvoker.cpp \ ./qpid/framing/MessageResumeResult.cpp \ ./qpid/framing/ClusterRetractOfferBody.h \ ../include/qpid/framing/MessageAcquireResult.h \ ./qpid/framing/ClusterConnectionDtxStartBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.cpp \ ./qpid/framing/MessageFlushBody.cpp \ ./qpid/framing/ConnectionStartBody.cpp \ ./qpid/framing/ExecutionExceptionBody.cpp \ ./qpid/framing/StreamQosOkBody.h \ ./qpid/framing/ExchangeDeleteBody.h \ ../include/qpid/framing/amqp_structs.h \ ./qpid/framing/FragmentProperties.cpp \ ./qpid/framing/MessageSetFlowModeBody.cpp \ ./qpid/framing/SessionTimeoutBody.h \ ./qpid/framing/ConnectionSecureOkBody.cpp \ ./qpid/framing/StreamConsumeBody.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.cpp \ ./qpid/framing/ConnectionHeartbeatBody.cpp \ ./qpid/framing/StreamConsumeBody.cpp \ ./qpid/framing/ClusterConnectionConfigBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.cpp \ ./qpid/framing/ClusterShutdownBody.h \ ./qpid/framing/ConnectionRedirectBody.h \ ./qpid/framing/MessageCancelBody.h \ ./qpid/framing/ConnectionStartBody.h \ ./qpid/framing/StreamProperties.cpp \ ./qpid/framing/FileAckBody.cpp \ ./qpid/framing/MethodBodyFactory.cpp \ ./qpid/framing/ClusterErrorCheckBody.cpp \ ./qpid/framing/ExchangeBindBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.h \ ./qpid/framing/TypeCode.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.cpp \ ./qpid/framing/ClusterTimerWakeupBody.h \ ./qpid/framing/MessageSubscribeBody.cpp \ ./qpid/framing/StreamQosOkBody.cpp \ ./qpid/framing/DeliveryProperties.cpp \ ./qpid/framing/QueueQueryResult.cpp \ ./qpid/framing/MessageAcquireBody.cpp \ ./qpid/framing/SessionAttachBody.h \ ./qpid/framing/MessageAcceptBody.h \ ./qpid/framing/DtxSelectBody.h \ ./qpid/framing/ExchangeQueryBody.cpp \ ./qpid/framing/ConnectionTuneBody.h \ ./qpid/framing/StreamPublishBody.cpp \ ./qpid/framing/ReplyTo.cpp \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.cpp \ ./qpid/framing/StreamDeliverBody.cpp \ ./qpid/framing/DtxGetTimeoutResult.cpp \ ./qpid/framing/MessageAcquireResult.cpp \ ./qpid/framing/DtxCommitBody.h \ ./qpid/framing/ClusterConnectionTxEnqueueBody.cpp \ ./qpid/framing/ClusterConnectionTxDequeueBody.cpp \ ./qpid/framing/ClusterConnectionDeliverCloseBody.h \ ./qpid/framing/ConnectionTuneOkBody.h \ ./qpid/framing/DtxGetTimeoutBody.cpp \ ./qpid/framing/ClusterRetractOfferBody.cpp \ ./qpid/framing/ExchangeBoundResult.cpp \ ./qpid/framing/ExchangeBoundBody.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h \ ./qpid/framing/ClusterConnectionAbortBody.cpp \ ./qpid/framing/SessionFlushBody.cpp \ ./qpid/framing/ConnectionOpenOkBody.h \ ./qpid/framing/all_method_bodies.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h \ ../include/qpid/framing/FragmentProperties.h \ ./qpid/framing/ClusterConnectionRetractOfferBody.h \ ./qpid/framing/ClusterConnectionTxAcceptBody.h \ ./qpid/framing/SessionAttachedBody.cpp \ ./qpid/framing/ExchangeBoundBody.h \ ./qpid/framing/QueueQueryBody.h \ ./qpid/framing/ExecutionResultBody.cpp \ ../include/qpid/framing/MessageProperties.h \ ../include/qpid/framing/Xid.h \ ./qpid/framing/SessionTimeoutBody.cpp \ ../include/qpid/framing/DtxGetTimeoutResult.h \ ./qpid/framing/DtxPrepareBody.h \ ./qpid/framing/SessionCompletedBody.h \ ./qpid/framing/FileReturnBody.h \ ./qpid/framing/MessageStopBody.h \ ./qpid/framing/ClusterUpdateRequestBody.cpp \ ./qpid/framing/DtxEndBody.cpp \ ./qpid/framing/DtxForgetBody.h \ ./qpid/framing/FileOpenOkBody.h \ ./qpid/framing/ClusterConnectionExchangeBody.h \ ./qpid/framing/ConnectionCloseOkBody.h \ ./qpid/framing/SessionKnownCompletedBody.h \ ./qpid/framing/DtxSelectBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.cpp \ ./qpid/framing/MessageStopBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.cpp \ ../include/qpid/framing/DeliveryProperties.h \ ./qpid/framing/AMQP_ServerProxy.h \ ./qpid/framing/ConnectionSecureBody.h \ ./qpid/framing/FileConsumeOkBody.cpp \ ./qpid/framing/StreamQosBody.h \ ./qpid/framing/DtxGetTimeoutBody.h \ ./qpid/framing/ClusterConnectionConfigBody.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.h \ ./qpid/framing/ClusterConnectionShadowPrepareBody.cpp \ ./qpid/framing/QueueQueryBody.cpp \ ./qpid/framing/AMQP_ServerProxy.cpp \ ./qpid/framing/MessageFlowBody.cpp \ ./qpid/framing/FileConsumeBody.h \ ./qpid/framing/SessionConfirmedBody.h \ ./qpid/framing/ClusterConnectionTxDequeueBody.h \ ./qpid/framing/SessionRequestTimeoutBody.cpp \ ./qpid/framing/SessionGapBody.h \ ../include/qpid/framing/ExchangeBoundResult.h \ ./qpid/framing/DtxRecoverResult.cpp \ ./qpid/framing/DtxPrepareBody.cpp \ ./qpid/framing/FilePublishBody.cpp \ ./qpid/framing/MessageTransferBody.h \ ./qpid/framing/ConnectionHeartbeatBody.h \ ./qpid/framing/MessageReleaseBody.h \ ./qpid/framing/ConnectionCloseOkBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.h \ ./qpid/framing/AMQP_AllProxy.cpp \ ./qpid/framing/FileAckBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h \ ./qpid/framing/MessageRejectBody.h \ ./qpid/framing/ExchangeUnbindBody.h \ ./qpid/framing/FileOpenOkBody.cpp \ ./qpid/framing/ExecutionSyncBody.h \ ./qpid/framing/ClientInvoker.h \ ./qpid/framing/AllInvoker.h \ ./qpid/framing/FileOpenBody.h \ ./qpid/framing/SessionDetachBody.h \ ./qpid/framing/ExchangeDeclareBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.cpp \ ../include/qpid/framing/FileProperties.h \ ./qpid/framing/FileStageBody.cpp \ ./qpid/framing/ClusterConnectionTxEndBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.cpp \ ./qpid/framing/ClusterConfigChangeBody.h \ ./qpid/framing/Xid.cpp \ ./qpid/framing/FileConsumeBody.cpp \ ./qpid/framing/SessionKnownCompletedBody.cpp \ ./qpid/framing/ConnectionRedirectBody.cpp \ ./qpid/framing/ConnectionTuneOkBody.cpp \ ./qpid/framing/ClusterConnectionMembershipBody.h \ ./qpid/framing/ClusterConnectionMembershipBody.cpp \ ./qpid/framing/ClusterConnectionShadowPrepareBody.h \ ./qpid/framing/FileQosOkBody.cpp \ ./qpid/framing/TxRollbackBody.cpp \ ./qpid/framing/ConnectionTuneBody.cpp \ ./qpid/framing/ExecutionSyncBody.cpp \ ./qpid/framing/ClusterConnectionRetractOfferBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.cpp \ ./qpid/framing/SessionAttachBody.cpp \ ./qpid/framing/ConnectionCloseBody.cpp \ ./qpid/framing/SessionGapBody.cpp \ ./qpid/framing/ClusterConnectionClockBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.h \ ../include/qpid/framing/DtxRecoverResult.h \ ./qpid/framing/MessageSetFlowModeBody.h \ ./qpid/framing/TxRollbackBody.h \ ../include/qpid/framing/TypeCode.h \ ./qpid/framing/ClusterConnectionTxPublishBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.h \ ./qpid/framing/ClusterConfigChangeBody.cpp \ ./qpid/framing/MessageAcquireBody.h \ ./qpid/framing/FileQosBody.h \ ./qpid/framing/ClusterDeliverToQueueBody.h \ ../include/qpid/framing/ExchangeQueryResult.h \ ./qpid/framing/ClusterUpdateRequestBody.h \ ./qpid/framing/MethodBodyConstVisitor.h \ ./qpid/framing/ClusterConnectionExchangeBody.cpp \ ./qpid/framing/ClusterConnectionTxStartBody.h \ ./qpid/framing/ExchangeDeclareBody.h \ ./qpid/framing/DtxForgetBody.cpp \ ./qpid/framing/TxCommitBody.h \ ./qpid/framing/ExchangeDeleteBody.cpp \ ./qpid/framing/DtxRollbackBody.cpp \ ./qpid/framing/ConnectionOpenBody.cpp \ ./qpid/framing/SessionRequestTimeoutBody.h \ ./qpid/framing/reply_exceptions.cpp \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h \ ./qpid/framing/ClusterConnectionQueuePositionBody.h \ ./qpid/framing/TxCommitBody.cpp \ ./qpid/framing/SessionFlushBody.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.cpp \ ./qpid/framing/AMQP_ClientProxy.cpp \ ./qpid/framing/QueueDeclareBody.cpp \ ../include/qpid/framing/Header.h \ ./qpid/framing/SessionCompletedBody.cpp \ ./qpid/framing/ConnectionCloseBody.h \ ./qpid/framing/AMQP_ClientOperations.h \ ../include/qpid/framing/enum.h \ ./qpid/framing/ClusterConnectionDtxAckBody.cpp \ ./qpid/framing/ClusterShutdownBody.cpp \ ../include/qpid/framing/StreamProperties.h \ ./qpid/framing/FileOpenBody.cpp \ ./qpid/framing/MessageCancelBody.cpp \ ./qpid/framing/SessionDetachBody.cpp \ ./qpid/framing/QueueDeleteBody.h \ ./qpid/framing/DtxSetTimeoutBody.cpp \ ./qpid/framing/ClusterClockBody.h \ ./qpid/framing/AMQP_ClientProxy.h \ ./qpid/framing/QueueDeleteBody.cpp \ ./qpid/framing/StreamPublishBody.h rgen_client_srcs = ../include/qpid/client/arg.h \ ./qpid/client/no_keyword/AsyncSession_0_10.cpp \ ../include/qpid/client/AsyncSession_0_10.h \ ../include/qpid/client/Session_0_10.h \ ../include/qpid/client/no_keyword/AsyncSession_0_10.h \ ./qpid/client/no_keyword/Session_0_10.cpp \ ../include/qpid/client/no_keyword/Session_0_10.h rgen_srcs=./qpid/amqp_0_10/ApplyCommand.h \ ./qpid/amqp_0_10/handlers.h \ ./qpid/framing/ClusterConnectionTxPublishBody.cpp \ ./qpid/framing/ClusterConnectionTxAcceptBody.cpp \ ../include/qpid/framing/XaResult.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.cpp \ ./qpid/framing/SessionExpectedBody.h \ ./qpid/framing/ExchangeUnbindBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.cpp \ ./qpid/framing/SessionCommandPointBody.h \ ./qpid/framing/QueuePurgeBody.h \ ./qpid/framing/ExchangeQueryResult.cpp \ ../include/qpid/framing/constants.h \ ./qpid/framing/ClusterConnectionTxStartBody.cpp \ ./qpid/framing/ExecutionResultBody.h \ ./qpid/framing/DtxStartBody.cpp \ ./qpid/framing/QueueDeclareBody.h \ ./qpid/framing/FilePublishBody.h \ ./qpid/framing/FileRejectBody.cpp \ ./qpid/amqp_0_10/structs.h \ ./qpid/framing/ClusterConnectionTxEnqueueBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.h \ ./qpid/framing/MessageResumeBody.h \ ./qpid/amqp_0_10/ApplyStruct.h \ ./qpid/framing/ClusterReadyBody.h \ ./qpid/framing/ConnectionSecureOkBody.h \ ./qpid/framing/FileStageBody.h \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.h \ ./qpid/framing/ConnectionOpenOkBody.cpp \ ./qpid/framing/ServerInvoker.h \ ./qpid/framing/FileConsumeOkBody.h \ ./tests/allSegmentTypes.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.h \ ./qpid/framing/ClusterTimerDropBody.h \ ../include/qpid/framing/MessageResumeResult.h \ ./qpid/framing/SessionAttachedBody.h \ ./qpid/framing/ExchangeBindBody.h \ ./qpid/framing/DtxRecoverBody.h \ ./qpid/amqp_0_10/ControlVisitor.h \ ./qpid/framing/ClusterConnectionTxEndBody.cpp \ ./qpid/framing/ClusterTimerDropBody.cpp \ ./qpid/framing/ClusterReadyBody.cpp \ ./qpid/framing/SessionExpectedBody.cpp \ ./qpid/framing/StreamConsumeOkBody.cpp \ ./qpid/framing/MessageReleaseBody.cpp \ ./qpid/amqp_0_10/StructHolder.h \ ../include/qpid/client/arg.h \ ./qpid/client/no_keyword/AsyncSession_0_10.cpp \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.h \ ./qpid/framing/ClusterClockBody.cpp \ ./qpid/framing/FileDeliverBody.h \ ./qpid/framing/FileQosBody.cpp \ ./qpid/framing/MessageTransferBody.cpp \ ./qpid/framing/FileCancelBody.cpp \ ../include/qpid/framing/reply_exceptions.h \ ./qpid/framing/AllInvoker.cpp \ ./qpid/framing/FileDeliverBody.cpp \ ./qpid/framing/Header.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.cpp \ ./qpid/framing/ConnectionSecureBody.cpp \ ./qpid/framing/MessageAcceptBody.cpp \ ./qpid/framing/AMQP_AllOperations.h \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxAckBody.h \ ./qpid/framing/ClusterConnectionAbortBody.h \ ./qpid/framing/SessionConfirmedBody.cpp \ ./qpid/framing/StreamReturnBody.h \ ./qpid/framing/StreamCancelBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.h \ ./qpid/framing/SessionDetachedBody.h \ ./qpid/framing/StreamConsumeOkBody.h \ ./qpid/framing/MessageFlowBody.h \ ../include/qpid/client/AsyncSession_0_10.h \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.h \ ./qpid/framing/SessionCommandPointBody.cpp \ ./qpid/framing/SessionDetachedBody.cpp \ ./qpid/framing/AMQP_ServerOperations.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.cpp \ ./qpid/framing/QueuePurgeBody.cpp \ ./qpid/framing/StreamReturnBody.cpp \ ./qpid/framing/ServerInvoker.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.cpp \ ./qpid/framing/ClusterConnectionQueuePositionBody.cpp \ ./qpid/framing/ClusterDeliverToQueueBody.cpp \ ./qpid/framing/frame_body_lists.h \ ./qpid/framing/StreamQosBody.cpp \ ./qpid/framing/ConnectionStartOkBody.cpp \ ./qpid/framing/StreamCancelBody.h \ ./qpid/framing/ClusterConnectionDtxStartBody.cpp \ ../include/qpid/framing/ReplyTo.h \ ./qpid/framing/DtxEndBody.h \ ./qpid/amqp_0_10/CodeForType.h \ ./qpid/framing/ClusterTimerWakeupBody.cpp \ ./qpid/framing/XaResult.cpp \ ./qpid/framing/DtxRecoverBody.cpp \ ./qpid/framing/DtxSetTimeoutBody.h \ ../include/qpid/framing/QueueQueryResult.h \ ./qpid/framing/ConnectionOpenBody.h \ ./qpid/framing/StreamDeliverBody.h \ ./qpid/framing/FileRejectBody.h \ ./qpid/framing/ClusterConnectionClockBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.h \ ./qpid/framing/DtxCommitBody.cpp \ ./qpid/framing/FileProperties.cpp \ ./qpid/framing/MessageSubscribeBody.h \ ./qpid/framing/ExecutionExceptionBody.h \ ./qpid/framing/ConnectionStartOkBody.h \ ./qpid/framing/FileQosOkBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.cpp \ ./qpid/framing/MessageResumeBody.cpp \ ./qpid/framing/ExchangeQueryBody.h \ ./qpid/framing/FileCancelBody.h \ ./qpid/framing/TxSelectBody.h \ ./qpid/amqp_0_10/StructHolder.cpp \ ./qpid/framing/MethodBodyDefaultVisitor.h \ ./qpid/framing/ClusterConnectionDeliverCloseBody.cpp \ ./qpid/framing/ClusterErrorCheckBody.h \ ./qpid/framing/DtxStartBody.h \ ./qpid/framing/TxSelectBody.cpp \ ./qpid/framing/FileReturnBody.cpp \ ./qpid/framing/MessageRejectBody.cpp \ ./qpid/framing/AMQP_AllProxy.h \ ./qpid/framing/MessageProperties.cpp \ ./qpid/framing/MessageFlushBody.h \ ./qpid/framing/DtxRollbackBody.h \ ./qpid/framing/ClientInvoker.cpp \ ./qpid/framing/MessageResumeResult.cpp \ ./qpid/framing/ClusterRetractOfferBody.h \ ../include/qpid/framing/MessageAcquireResult.h \ ./qpid/amqp_0_10/ControlHolder.cpp \ ../include/qpid/client/Session_0_10.h \ ./qpid/framing/ClusterConnectionDtxStartBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.cpp \ ./qpid/framing/MessageFlushBody.cpp \ ./qpid/framing/ConnectionStartBody.cpp \ ./qpid/framing/ExecutionExceptionBody.cpp \ ./qpid/framing/StreamQosOkBody.h \ ./qpid/framing/ExchangeDeleteBody.h \ ../include/qpid/framing/amqp_structs.h \ ./qpid/framing/FragmentProperties.cpp \ ./qpid/framing/MessageSetFlowModeBody.cpp \ ./qpid/framing/SessionTimeoutBody.h \ ./qpid/framing/ConnectionSecureOkBody.cpp \ ./qpid/framing/StreamConsumeBody.h \ ./qpid/amqp_0_10/specification.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.cpp \ ./qpid/framing/ConnectionHeartbeatBody.cpp \ ./qpid/framing/StreamConsumeBody.cpp \ ./qpid/amqp_0_10/specification.cpp \ ./qpid/framing/ClusterConnectionConfigBody.h \ ./qpid/amqp_0_10/ControlHolder.h \ ./qpid/amqp_0_10/TypeForCode.cpp \ ./qpid/framing/ClusterConnectionShadowSetUserBody.cpp \ ./qpid/framing/ClusterShutdownBody.h \ ./qpid/framing/ConnectionRedirectBody.h \ ./qpid/framing/MessageCancelBody.h \ ./qpid/framing/ConnectionStartBody.h \ ./qpid/framing/StreamProperties.cpp \ ./qpid/framing/FileAckBody.cpp \ ./qpid/framing/MethodBodyFactory.cpp \ ./qpid/framing/ClusterErrorCheckBody.cpp \ ./qpid/framing/ExchangeBindBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.h \ ./qpid/amqp_0_10/ApplyControl.h \ ./qpid/amqp_0_10/TypeForCode.h \ ./qpid/framing/TypeCode.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.cpp \ ./qpid/framing/ClusterTimerWakeupBody.h \ ./qpid/framing/MessageSubscribeBody.cpp \ ./qpid/framing/StreamQosOkBody.cpp \ ./qpid/framing/DeliveryProperties.cpp \ ./qpid/framing/QueueQueryResult.cpp \ ./qpid/framing/MessageAcquireBody.cpp \ ./qpid/framing/SessionAttachBody.h \ ./qpid/framing/MessageAcceptBody.h \ ./qpid/framing/DtxSelectBody.h \ ./qpid/framing/ExchangeQueryBody.cpp \ ./qpid/framing/ConnectionTuneBody.h \ ./qpid/framing/StreamPublishBody.cpp \ ./qpid/framing/ReplyTo.cpp \ ../include/qpid/client/no_keyword/AsyncSession_0_10.h \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.cpp \ ./qpid/framing/StreamDeliverBody.cpp \ ./qpid/framing/DtxGetTimeoutResult.cpp \ ./qpid/framing/MessageAcquireResult.cpp \ ./qpid/framing/DtxCommitBody.h \ ./qpid/framing/ClusterConnectionTxEnqueueBody.cpp \ ./qpid/framing/ClusterConnectionTxDequeueBody.cpp \ ./qpid/framing/ClusterConnectionDeliverCloseBody.h \ ./qpid/framing/ConnectionTuneOkBody.h \ ./qpid/framing/DtxGetTimeoutBody.cpp \ ./qpid/framing/ClusterRetractOfferBody.cpp \ ./qpid/framing/ExchangeBoundResult.cpp \ ./qpid/framing/ExchangeBoundBody.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h \ ./qpid/framing/ClusterConnectionAbortBody.cpp \ ./qpid/framing/SessionFlushBody.cpp \ ./qpid/framing/ConnectionOpenOkBody.h \ ./qpid/framing/all_method_bodies.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h \ ../include/qpid/framing/FragmentProperties.h \ ./qpid/framing/ClusterConnectionRetractOfferBody.h \ ./qpid/framing/ClusterConnectionTxAcceptBody.h \ ./qpid/framing/SessionAttachedBody.cpp \ ./qpid/framing/ExchangeBoundBody.h \ ./qpid/framing/QueueQueryBody.h \ ./qpid/framing/ExecutionResultBody.cpp \ ./qpid/amqp_0_10/CommandHolder.h \ ../include/qpid/framing/MessageProperties.h \ ../include/qpid/framing/Xid.h \ ./qpid/framing/SessionTimeoutBody.cpp \ ../include/qpid/framing/DtxGetTimeoutResult.h \ ./qpid/framing/DtxPrepareBody.h \ ./qpid/framing/SessionCompletedBody.h \ ./qpid/framing/FileReturnBody.h \ ./qpid/framing/MessageStopBody.h \ ./qpid/framing/ClusterUpdateRequestBody.cpp \ ./qpid/framing/DtxEndBody.cpp \ ./qpid/framing/DtxForgetBody.h \ ./qpid/framing/FileOpenOkBody.h \ ./qpid/framing/ClusterConnectionExchangeBody.h \ ./qpid/framing/ConnectionCloseOkBody.h \ ./qpid/framing/SessionKnownCompletedBody.h \ ./qpid/framing/DtxSelectBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.cpp \ ./qpid/framing/MessageStopBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.cpp \ ../include/qpid/framing/DeliveryProperties.h \ ./qpid/framing/AMQP_ServerProxy.h \ ./qpid/framing/ConnectionSecureBody.h \ ./qpid/framing/FileConsumeOkBody.cpp \ ./qpid/framing/StreamQosBody.h \ ./qpid/framing/DtxGetTimeoutBody.h \ ./qpid/framing/ClusterConnectionConfigBody.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.h \ ./qpid/framing/ClusterConnectionShadowPrepareBody.cpp \ ./qpid/framing/QueueQueryBody.cpp \ ./qpid/framing/AMQP_ServerProxy.cpp \ ./qpid/framing/MessageFlowBody.cpp \ ./qpid/framing/FileConsumeBody.h \ ./qpid/framing/SessionConfirmedBody.h \ ./qpid/framing/ClusterConnectionTxDequeueBody.h \ ./qpid/framing/SessionRequestTimeoutBody.cpp \ ./qpid/framing/SessionGapBody.h \ ../include/qpid/framing/ExchangeBoundResult.h \ ./qpid/framing/DtxRecoverResult.cpp \ ./qpid/framing/DtxPrepareBody.cpp \ ./qpid/framing/FilePublishBody.cpp \ ./qpid/framing/MessageTransferBody.h \ ./qpid/framing/ConnectionHeartbeatBody.h \ ./qpid/framing/MessageReleaseBody.h \ ./qpid/framing/ConnectionCloseOkBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.h \ ./qpid/framing/AMQP_AllProxy.cpp \ ./qpid/framing/FileAckBody.h \ ./qpid/amqp_0_10/StructVisitor.h \ ./qpid/amqp_0_10/CommandVisitor.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h \ ./qpid/framing/MessageRejectBody.h \ ./qpid/framing/ExchangeUnbindBody.h \ ./qpid/framing/FileOpenOkBody.cpp \ ./qpid/framing/ExecutionSyncBody.h \ ./qpid/framing/ClientInvoker.h \ ./qpid/amqp_0_10/CodeForType.cpp \ ./qpid/framing/AllInvoker.h \ ./qpid/framing/FileOpenBody.h \ ./qpid/framing/SessionDetachBody.h \ ./qpid/framing/ExchangeDeclareBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.cpp \ ../include/qpid/framing/FileProperties.h \ ./qpid/framing/FileStageBody.cpp \ ./qpid/amqp_0_10/specification_fwd.h \ ./qpid/framing/ClusterConnectionTxEndBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.cpp \ ./qpid/framing/ClusterConfigChangeBody.h \ ./qpid/framing/Xid.cpp \ ./qpid/framing/FileConsumeBody.cpp \ ./qpid/framing/SessionKnownCompletedBody.cpp \ ./qpid/framing/ConnectionRedirectBody.cpp \ ./qpid/framing/ConnectionTuneOkBody.cpp \ ./qpid/client/no_keyword/Session_0_10.cpp \ ./qpid/framing/ClusterConnectionMembershipBody.h \ ../include/qpid/client/no_keyword/Session_0_10.h \ ./qpid/framing/ClusterConnectionMembershipBody.cpp \ ./qpid/framing/ClusterConnectionShadowPrepareBody.h \ ./qpid/framing/FileQosOkBody.cpp \ ./qpid/framing/TxRollbackBody.cpp \ ./qpid/framing/ConnectionTuneBody.cpp \ ./qpid/framing/ExecutionSyncBody.cpp \ ./qpid/amqp_0_10/CommandHolder.cpp \ ./qpid/framing/ClusterConnectionRetractOfferBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.cpp \ ./qpid/framing/SessionAttachBody.cpp \ ./qpid/framing/ConnectionCloseBody.cpp \ ./qpid/framing/SessionGapBody.cpp \ ./qpid/framing/ClusterConnectionClockBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.h \ ../include/qpid/framing/DtxRecoverResult.h \ ./qpid/framing/MessageSetFlowModeBody.h \ ./qpid/framing/TxRollbackBody.h \ ./qpid/amqp_0_10/ProxyTemplate.h \ ../include/qpid/framing/TypeCode.h \ ./qpid/framing/ClusterConnectionTxPublishBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.h \ ./qpid/framing/ClusterConfigChangeBody.cpp \ ./qpid/framing/MessageAcquireBody.h \ ./qpid/framing/FileQosBody.h \ ./qpid/framing/ClusterDeliverToQueueBody.h \ ../include/qpid/framing/ExchangeQueryResult.h \ ./qpid/framing/ClusterUpdateRequestBody.h \ ./qpid/framing/MethodBodyConstVisitor.h \ ./qpid/framing/ClusterConnectionExchangeBody.cpp \ ./qpid/framing/ClusterConnectionTxStartBody.h \ ./qpid/framing/ExchangeDeclareBody.h \ ./qpid/framing/DtxForgetBody.cpp \ ./qpid/framing/TxCommitBody.h \ ./qpid/framing/ExchangeDeleteBody.cpp \ ./qpid/framing/DtxRollbackBody.cpp \ ./qpid/framing/ConnectionOpenBody.cpp \ ./qpid/framing/SessionRequestTimeoutBody.h \ ./qpid/framing/reply_exceptions.cpp \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h \ ./qpid/framing/ClusterConnectionQueuePositionBody.h \ ./qpid/framing/TxCommitBody.cpp \ ./qpid/framing/SessionFlushBody.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.cpp \ ./qpid/framing/AMQP_ClientProxy.cpp \ ./qpid/framing/QueueDeclareBody.cpp \ ../include/qpid/framing/Header.h \ ./qpid/framing/SessionCompletedBody.cpp \ ./qpid/framing/ConnectionCloseBody.h \ ./qpid/framing/AMQP_ClientOperations.h \ ../include/qpid/framing/enum.h \ ./qpid/framing/ClusterConnectionDtxAckBody.cpp \ ./qpid/framing/ClusterShutdownBody.cpp \ ../include/qpid/framing/StreamProperties.h \ ./qpid/framing/FileOpenBody.cpp \ ./qpid/framing/MessageCancelBody.cpp \ ./qpid/framing/SessionDetachBody.cpp \ ./qpid/framing/QueueDeleteBody.h \ ./qpid/framing/DtxSetTimeoutBody.cpp \ ./qpid/amqp_0_10/exceptions.h \ ./qpid/framing/ClusterClockBody.h \ ./qpid/framing/AMQP_ClientProxy.h \ ./qpid/framing/QueueDeleteBody.cpp \ ./qpid/amqp_0_10/structs.cpp \ ./qpid/framing/StreamPublishBody.h # Header file install rules. qpid_amqp_0_10dir = $(includedir)/qpid/amqp_0_10 dist_qpid_amqp_0_10_HEADERS = ./qpid/amqp_0_10/ApplyCommand.h \ ./qpid/amqp_0_10/handlers.h \ ./qpid/amqp_0_10/structs.h \ ./qpid/amqp_0_10/ApplyStruct.h \ ./qpid/amqp_0_10/ControlVisitor.h \ ./qpid/amqp_0_10/StructHolder.h \ ./qpid/amqp_0_10/CodeForType.h \ ./qpid/amqp_0_10/specification.h \ ./qpid/amqp_0_10/ControlHolder.h \ ./qpid/amqp_0_10/ApplyControl.h \ ./qpid/amqp_0_10/TypeForCode.h \ ./qpid/amqp_0_10/CommandHolder.h \ ./qpid/amqp_0_10/StructVisitor.h \ ./qpid/amqp_0_10/CommandVisitor.h \ ./qpid/amqp_0_10/specification_fwd.h \ ./qpid/amqp_0_10/ProxyTemplate.h \ ./qpid/amqp_0_10/exceptions.h qpid_framingdir = $(includedir)/qpid/framing dist_qpid_framing_HEADERS = ../include/qpid/framing/XaResult.h \ ./qpid/framing/SessionExpectedBody.h \ ./qpid/framing/SessionCommandPointBody.h \ ./qpid/framing/QueuePurgeBody.h \ ../include/qpid/framing/constants.h \ ./qpid/framing/ExecutionResultBody.h \ ./qpid/framing/QueueDeclareBody.h \ ./qpid/framing/FilePublishBody.h \ ./qpid/framing/ClusterConnectionTxEnqueueBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.h \ ./qpid/framing/MessageResumeBody.h \ ./qpid/framing/ClusterReadyBody.h \ ./qpid/framing/ConnectionSecureOkBody.h \ ./qpid/framing/FileStageBody.h \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.h \ ./qpid/framing/ServerInvoker.h \ ./qpid/framing/FileConsumeOkBody.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.h \ ./qpid/framing/ClusterTimerDropBody.h \ ../include/qpid/framing/MessageResumeResult.h \ ./qpid/framing/SessionAttachedBody.h \ ./qpid/framing/ExchangeBindBody.h \ ./qpid/framing/DtxRecoverBody.h \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.h \ ./qpid/framing/FileDeliverBody.h \ ../include/qpid/framing/reply_exceptions.h \ ./qpid/framing/AMQP_AllOperations.h \ ./qpid/framing/ClusterConnectionDtxAckBody.h \ ./qpid/framing/ClusterConnectionAbortBody.h \ ./qpid/framing/StreamReturnBody.h \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.h \ ./qpid/framing/SessionDetachedBody.h \ ./qpid/framing/StreamConsumeOkBody.h \ ./qpid/framing/MessageFlowBody.h \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.h \ ./qpid/framing/AMQP_ServerOperations.h \ ./qpid/framing/frame_body_lists.h \ ./qpid/framing/StreamCancelBody.h \ ../include/qpid/framing/ReplyTo.h \ ./qpid/framing/DtxEndBody.h \ ./qpid/framing/DtxSetTimeoutBody.h \ ../include/qpid/framing/QueueQueryResult.h \ ./qpid/framing/ConnectionOpenBody.h \ ./qpid/framing/StreamDeliverBody.h \ ./qpid/framing/FileRejectBody.h \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.h \ ./qpid/framing/MessageSubscribeBody.h \ ./qpid/framing/ExecutionExceptionBody.h \ ./qpid/framing/ConnectionStartOkBody.h \ ./qpid/framing/FileQosOkBody.h \ ./qpid/framing/ExchangeQueryBody.h \ ./qpid/framing/FileCancelBody.h \ ./qpid/framing/TxSelectBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.h \ ./qpid/framing/ClusterErrorCheckBody.h \ ./qpid/framing/DtxStartBody.h \ ./qpid/framing/AMQP_AllProxy.h \ ./qpid/framing/MessageFlushBody.h \ ./qpid/framing/DtxRollbackBody.h \ ./qpid/framing/ClusterRetractOfferBody.h \ ../include/qpid/framing/MessageAcquireResult.h \ ./qpid/framing/ClusterConnectionDtxStartBody.h \ ./qpid/framing/StreamQosOkBody.h \ ./qpid/framing/ExchangeDeleteBody.h \ ../include/qpid/framing/amqp_structs.h \ ./qpid/framing/SessionTimeoutBody.h \ ./qpid/framing/StreamConsumeBody.h \ ./qpid/framing/ClusterConnectionConfigBody.h \ ./qpid/framing/ClusterShutdownBody.h \ ./qpid/framing/ConnectionRedirectBody.h \ ./qpid/framing/MessageCancelBody.h \ ./qpid/framing/ConnectionStartBody.h \ ./qpid/framing/ClusterUpdateOfferBody.h \ ./qpid/framing/ClusterTimerWakeupBody.h \ ./qpid/framing/SessionAttachBody.h \ ./qpid/framing/MessageAcceptBody.h \ ./qpid/framing/DtxSelectBody.h \ ./qpid/framing/ConnectionTuneBody.h \ ./qpid/framing/DtxCommitBody.h \ ./qpid/framing/ClusterConnectionDeliverCloseBody.h \ ./qpid/framing/ConnectionTuneOkBody.h \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h \ ./qpid/framing/ConnectionOpenOkBody.h \ ./qpid/framing/all_method_bodies.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h \ ../include/qpid/framing/FragmentProperties.h \ ./qpid/framing/ClusterConnectionRetractOfferBody.h \ ./qpid/framing/ClusterConnectionTxAcceptBody.h \ ./qpid/framing/ExchangeBoundBody.h \ ./qpid/framing/QueueQueryBody.h \ ../include/qpid/framing/MessageProperties.h \ ../include/qpid/framing/Xid.h \ ../include/qpid/framing/DtxGetTimeoutResult.h \ ./qpid/framing/DtxPrepareBody.h \ ./qpid/framing/SessionCompletedBody.h \ ./qpid/framing/FileReturnBody.h \ ./qpid/framing/MessageStopBody.h \ ./qpid/framing/DtxForgetBody.h \ ./qpid/framing/FileOpenOkBody.h \ ./qpid/framing/ClusterConnectionExchangeBody.h \ ./qpid/framing/ConnectionCloseOkBody.h \ ./qpid/framing/SessionKnownCompletedBody.h \ ../include/qpid/framing/DeliveryProperties.h \ ./qpid/framing/AMQP_ServerProxy.h \ ./qpid/framing/ConnectionSecureBody.h \ ./qpid/framing/StreamQosBody.h \ ./qpid/framing/DtxGetTimeoutBody.h \ ./qpid/framing/ClusterConnectionDtxEndBody.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.h \ ./qpid/framing/FileConsumeBody.h \ ./qpid/framing/SessionConfirmedBody.h \ ./qpid/framing/ClusterConnectionTxDequeueBody.h \ ./qpid/framing/SessionGapBody.h \ ../include/qpid/framing/ExchangeBoundResult.h \ ./qpid/framing/MessageTransferBody.h \ ./qpid/framing/ConnectionHeartbeatBody.h \ ./qpid/framing/MessageReleaseBody.h \ ./qpid/framing/ClusterInitialStatusBody.h \ ./qpid/framing/FileAckBody.h \ ./qpid/framing/ClusterConnectionSessionStateBody.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h \ ./qpid/framing/MessageRejectBody.h \ ./qpid/framing/ExchangeUnbindBody.h \ ./qpid/framing/ExecutionSyncBody.h \ ./qpid/framing/ClientInvoker.h \ ./qpid/framing/AllInvoker.h \ ./qpid/framing/FileOpenBody.h \ ./qpid/framing/SessionDetachBody.h \ ../include/qpid/framing/FileProperties.h \ ./qpid/framing/ClusterConnectionTxEndBody.h \ ./qpid/framing/ClusterConfigChangeBody.h \ ./qpid/framing/ClusterConnectionMembershipBody.h \ ./qpid/framing/ClusterConnectionShadowPrepareBody.h \ ./qpid/framing/ClusterConnectionClockBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.h \ ../include/qpid/framing/DtxRecoverResult.h \ ./qpid/framing/MessageSetFlowModeBody.h \ ./qpid/framing/TxRollbackBody.h \ ../include/qpid/framing/TypeCode.h \ ./qpid/framing/ClusterConnectionTxPublishBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.h \ ./qpid/framing/MessageAcquireBody.h \ ./qpid/framing/FileQosBody.h \ ./qpid/framing/ClusterDeliverToQueueBody.h \ ../include/qpid/framing/ExchangeQueryResult.h \ ./qpid/framing/ClusterUpdateRequestBody.h \ ./qpid/framing/MethodBodyConstVisitor.h \ ./qpid/framing/ClusterConnectionTxStartBody.h \ ./qpid/framing/ExchangeDeclareBody.h \ ./qpid/framing/TxCommitBody.h \ ./qpid/framing/SessionRequestTimeoutBody.h \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h \ ./qpid/framing/ClusterConnectionQueuePositionBody.h \ ./qpid/framing/SessionFlushBody.h \ ../include/qpid/framing/Header.h \ ./qpid/framing/ConnectionCloseBody.h \ ./qpid/framing/AMQP_ClientOperations.h \ ../include/qpid/framing/enum.h \ ../include/qpid/framing/StreamProperties.h \ ./qpid/framing/QueueDeleteBody.h \ ./qpid/framing/ClusterClockBody.h \ ./qpid/framing/AMQP_ClientProxy.h \ ./qpid/framing/StreamPublishBody.h qpid_client_no_keyworddir = $(includedir)/qpid/client/no_keyword dist_qpid_client_no_keyword_HEADERS = ../include/qpid/client/no_keyword/AsyncSession_0_10.h \ ../include/qpid/client/no_keyword/Session_0_10.h qpid_clientdir = $(includedir)/qpid/client dist_qpid_client_HEADERS = ../include/qpid/client/arg.h \ ../include/qpid/client/AsyncSession_0_10.h \ ../include/qpid/client/Session_0_10.h qpid_brokerdir = $(includedir)/qpid/broker dist_qpid_broker_HEADERS = qpidc-0.16/src/Makefile.in0000664000076400007640000163003411752725706016013 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Generated makefile fragment. # Including makefile defines $(rgen_dir) $(rgen_cmd) and $(specs). # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # This source file was created by a code generator. # Please do not edit. # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Cluster library makefile fragment, to be included in Makefile.am # # Optional CMAN support # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # HA plugin makefile fragment, to be included in Makefile.am # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # Make file for building two plugins for asynchronously replicating # queues. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(dist_org_apache_qpid_acl_HEADERS) \ $(dist_org_apache_qpid_broker_HEADERS) \ $(dist_org_apache_qpid_cluster_HEADERS) \ $(dist_org_apache_qpid_ha_HEADERS) \ $(dist_qpid_amqp_0_10_HEADERS) $(dist_qpid_broker_HEADERS) \ $(dist_qpid_client_HEADERS) \ $(dist_qpid_client_no_keyword_HEADERS) \ $(dist_qpid_framing_HEADERS) $(nobase_include_HEADERS) \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in $(srcdir)/acl.mk \ $(srcdir)/cluster.mk $(srcdir)/config.h.in $(srcdir)/ha.mk \ $(srcdir)/managementgen.mk $(srcdir)/qmf.mk \ $(srcdir)/qmf2.pc.in $(srcdir)/qmfc.mk $(srcdir)/qpid.pc.in \ $(srcdir)/replication.mk $(srcdir)/rubygen.mk $(srcdir)/ssl.mk \ $(srcdir)/xml.mk qpidexec_PROGRAMS = $(am__EXEEXT_1) qpidtest_PROGRAMS = sbin_PROGRAMS = qpidd$(EXEEXT) # The watchdog plugin and helper executable @HAVE_LIBCPG_TRUE@am__append_1 = cluster.la watchdog.la @HAVE_LIBCPG_TRUE@am__append_2 = qpidd_watchdog @SUNOS_TRUE@am__append_3 = libqmfagent.la libqmfconsole.la libqpidcommon.la -lboost_program_options $(SUNCC_RUNTIME_LIBS) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # @HAVE_XML_TRUE@am__append_4 = xml.la @SUNOS_TRUE@am__append_5 = libqpidcommon.la -lboost_program_options -luuid $(SUNCC_RUNTIME_LIBS) @SUNOS_TRUE@am__append_6 = libqpidcommon.la -lboost_program_options $(SUNCC_RUNTIME_LIBS) -luuid @RDMA_TRUE@am__append_7 = \ @RDMA_TRUE@ librdmawrap.la @RDMA_TRUE@am__append_8 = \ @RDMA_TRUE@ rdma.la @RDMA_TRUE@am__append_9 = \ @RDMA_TRUE@ rdmaconnector.la @RDMA_TRUE@noinst_PROGRAMS = RdmaServer$(EXEEXT) RdmaClient$(EXEEXT) @SSL_TRUE@am__append_10 = libsslcommon.la @SSL_TRUE@am__append_11 = ssl.la @SSL_TRUE@am__append_12 = \ @SSL_TRUE@ sslconnector.la @HAVE_SASL_TRUE@am__append_13 = qpid/sys/cyrus/CyrusSecurityLayer.h \ @HAVE_SASL_TRUE@ qpid/sys/cyrus/CyrusSecurityLayer.cpp @HAVE_SASL_TRUE@am__append_14 = -lsasl2 subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = qpid.pc qmf2.pc CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(cmoduleexecdir)" \ "$(DESTDIR)$(dmoduleexecdir)" "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(tmoduleexecdir)" "$(DESTDIR)$(qpidexecdir)" \ "$(DESTDIR)$(qpidtestdir)" "$(DESTDIR)$(sbindir)" \ "$(DESTDIR)$(qpidexecdir)" "$(DESTDIR)$(qpidtestdir)" \ "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(org_apache_qpid_acldir)" \ "$(DESTDIR)$(org_apache_qpid_brokerdir)" \ "$(DESTDIR)$(org_apache_qpid_clusterdir)" \ "$(DESTDIR)$(org_apache_qpid_hadir)" \ "$(DESTDIR)$(qpid_amqp_0_10dir)" "$(DESTDIR)$(qpid_brokerdir)" \ "$(DESTDIR)$(qpid_clientdir)" \ "$(DESTDIR)$(qpid_client_no_keyworddir)" \ "$(DESTDIR)$(qpid_framingdir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(cmoduleexec_LTLIBRARIES) $(dmoduleexec_LTLIBRARIES) \ $(lib_LTLIBRARIES) $(tmoduleexec_LTLIBRARIES) am__DEPENDENCIES_1 = @SUNOS_TRUE@am__DEPENDENCIES_2 = libqmfagent.la libqmfconsole.la \ @SUNOS_TRUE@ libqpidcommon.la $(am__DEPENDENCIES_1) acl_la_DEPENDENCIES = libqpidbroker.la $(am__DEPENDENCIES_2) am__dirstamp = $(am__leading_dot)dirstamp am_acl_la_OBJECTS = qpid/acl/Acl.lo qpid/acl/AclData.lo \ qpid/acl/AclPlugin.lo qpid/acl/AclReader.lo \ qpid/acl/AclValidator.lo acl_la_OBJECTS = $(am_acl_la_OBJECTS) acl_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(acl_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_LIBCPG_TRUE@cluster_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_LIBCPG_TRUE@ libqpidbroker.la libqpidclient.la am__cluster_la_SOURCES_DIST = qpid/cluster/Quorum_null.h \ qpid/cluster/Quorum_cman.h qpid/cluster/Quorum_cman.cpp \ qpid/cluster/Cluster.cpp qpid/cluster/Cluster.h \ qpid/cluster/ClusterTimer.cpp qpid/cluster/ClusterTimer.h \ qpid/cluster/Decoder.cpp qpid/cluster/Decoder.h \ qpid/cluster/PollableQueue.h qpid/cluster/ClusterMap.cpp \ qpid/cluster/ClusterMap.h qpid/cluster/ClusterPlugin.cpp \ qpid/cluster/ClusterSettings.h qpid/cluster/Connection.cpp \ qpid/cluster/Connection.h qpid/cluster/ConnectionCodec.cpp \ qpid/cluster/ConnectionCodec.h qpid/cluster/Cpg.cpp \ qpid/cluster/Cpg.h qpid/cluster/CredentialsExchange.cpp \ qpid/cluster/CredentialsExchange.h qpid/cluster/Dispatchable.h \ qpid/cluster/UpdateClient.cpp qpid/cluster/UpdateClient.h \ qpid/cluster/RetractClient.cpp qpid/cluster/RetractClient.h \ qpid/cluster/ErrorCheck.cpp qpid/cluster/ErrorCheck.h \ qpid/cluster/Event.cpp qpid/cluster/Event.h \ qpid/cluster/EventFrame.h qpid/cluster/EventFrame.cpp \ qpid/cluster/ExpiryPolicy.h qpid/cluster/ExpiryPolicy.cpp \ qpid/cluster/FailoverExchange.cpp \ qpid/cluster/FailoverExchange.h qpid/cluster/UpdateExchange.h \ qpid/cluster/UpdateExchange.cpp qpid/cluster/UpdateReceiver.h \ qpid/cluster/LockedConnectionMap.h \ qpid/cluster/Multicaster.cpp qpid/cluster/Multicaster.h \ qpid/cluster/McastFrameHandler.h \ qpid/cluster/NoOpConnectionOutputHandler.h \ qpid/cluster/Numbering.h qpid/cluster/OutputInterceptor.cpp \ qpid/cluster/OutputInterceptor.h \ qpid/cluster/PollerDispatch.cpp qpid/cluster/PollerDispatch.h \ qpid/cluster/ProxyInputHandler.h qpid/cluster/Quorum.h \ qpid/cluster/InitialStatusMap.h \ qpid/cluster/InitialStatusMap.cpp qpid/cluster/MemberSet.h \ qpid/cluster/MemberSet.cpp qpid/cluster/types.h \ qpid/cluster/SecureConnectionFactory.h \ qpid/cluster/SecureConnectionFactory.cpp \ qpid/cluster/StoreStatus.h qpid/cluster/StoreStatus.cpp \ qpid/cluster/UpdateDataExchange.h \ qpid/cluster/UpdateDataExchange.cpp @HAVE_LIBCMAN_TRUE@am__objects_1 = \ @HAVE_LIBCMAN_TRUE@ qpid/cluster/cluster_la-Quorum_cman.lo @HAVE_LIBCPG_TRUE@am_cluster_la_OBJECTS = $(am__objects_1) \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-Cluster.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-ClusterTimer.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-Decoder.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-ClusterMap.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-ClusterPlugin.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-Connection.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-ConnectionCodec.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-Cpg.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-CredentialsExchange.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-UpdateClient.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-RetractClient.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-ErrorCheck.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-Event.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-EventFrame.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-ExpiryPolicy.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-FailoverExchange.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-UpdateExchange.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-Multicaster.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-OutputInterceptor.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-PollerDispatch.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-InitialStatusMap.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-MemberSet.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-SecureConnectionFactory.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-StoreStatus.lo \ @HAVE_LIBCPG_TRUE@ qpid/cluster/cluster_la-UpdateDataExchange.lo cluster_la_OBJECTS = $(am_cluster_la_OBJECTS) cluster_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(cluster_la_CXXFLAGS) \ $(CXXFLAGS) $(cluster_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_LIBCPG_TRUE@am_cluster_la_rpath = -rpath $(dmoduleexecdir) ha_la_DEPENDENCIES = libqpidbroker.la am_ha_la_OBJECTS = qpid/ha/Backup.lo qpid/ha/HaBroker.lo \ qpid/ha/HaPlugin.lo qpid/ha/QueueReplicator.lo \ qpid/ha/ReplicatingSubscription.lo qpid/ha/BrokerReplicator.lo \ qpid/ha/ConnectionExcluder.lo ha_la_OBJECTS = $(am_ha_la_OBJECTS) ha_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(ha_la_LDFLAGS) $(LDFLAGS) -o $@ libqmf_la_DEPENDENCIES = libqmfengine.la am__objects_2 = am_libqmf_la_OBJECTS = $(am__objects_2) \ qpid/agent/ManagementAgentImpl.lo libqmf_la_OBJECTS = $(am_libqmf_la_OBJECTS) libqmf_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libqmf_la_LDFLAGS) $(LDFLAGS) -o $@ libqmf2_la_DEPENDENCIES = libqpidmessaging.la libqpidtypes.la am_libqmf2_la_OBJECTS = $(am__objects_2) qmf/Agent.lo \ qmf/AgentEvent.lo qmf/AgentSession.lo qmf/AgentSubscription.lo \ qmf/ConsoleEvent.lo qmf/ConsoleSession.lo qmf/constants.lo \ qmf/DataAddr.lo qmf/Data.lo qmf/EventNotifierImpl.lo \ qmf/exceptions.lo qmf/Expression.lo qmf/Hash.lo \ qmf/PosixEventNotifier.lo qmf/PosixEventNotifierImpl.lo \ qmf/Query.lo qmf/SchemaCache.lo qmf/Schema.lo qmf/SchemaId.lo \ qmf/SchemaMethod.lo qmf/SchemaProperty.lo qmf/Subscription.lo libqmf2_la_OBJECTS = $(am_libqmf2_la_OBJECTS) libqmf2_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libqmf2_la_LDFLAGS) $(LDFLAGS) -o $@ libqmfconsole_la_DEPENDENCIES = libqpidclient.la am_libqmfconsole_la_OBJECTS = qpid/console/Agent.lo \ qpid/console/Broker.lo qpid/console/ClassKey.lo \ qpid/console/Event.lo qpid/console/Object.lo \ qpid/console/ObjectId.lo qpid/console/Package.lo \ qpid/console/Schema.lo qpid/console/SequenceManager.lo \ qpid/console/SessionManager.lo qpid/console/Value.lo libqmfconsole_la_OBJECTS = $(am_libqmfconsole_la_OBJECTS) libqmfconsole_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libqmfconsole_la_LDFLAGS) $(LDFLAGS) -o $@ libqmfengine_la_DEPENDENCIES = libqpidclient.la am_libqmfengine_la_OBJECTS = $(am__objects_2) qmf/engine/Agent.lo \ qmf/engine/BrokerProxyImpl.lo \ qmf/engine/ConnectionSettingsImpl.lo qmf/engine/ConsoleImpl.lo \ qmf/engine/EventImpl.lo qmf/engine/MessageImpl.lo \ qmf/engine/ObjectIdImpl.lo qmf/engine/ObjectImpl.lo \ qmf/engine/Protocol.lo qmf/engine/QueryImpl.lo \ qmf/engine/ResilientConnection.lo \ qmf/engine/SequenceManager.lo qmf/engine/SchemaImpl.lo \ qmf/engine/ValueImpl.lo libqmfengine_la_OBJECTS = $(am_libqmfengine_la_OBJECTS) libqmfengine_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libqmfengine_la_LDFLAGS) $(LDFLAGS) -o $@ libqpidbroker_la_DEPENDENCIES = libqpidcommon.la am__objects_3 = qmf/org/apache/qpid/broker/System.lo \ qmf/org/apache/qpid/broker/Memory.lo \ qmf/org/apache/qpid/broker/Broker.lo \ qmf/org/apache/qpid/broker/Agent.lo \ qmf/org/apache/qpid/broker/Vhost.lo \ qmf/org/apache/qpid/broker/Queue.lo \ qmf/org/apache/qpid/broker/Exchange.lo \ qmf/org/apache/qpid/broker/Binding.lo \ qmf/org/apache/qpid/broker/Subscription.lo \ qmf/org/apache/qpid/broker/Connection.lo \ qmf/org/apache/qpid/broker/Link.lo \ qmf/org/apache/qpid/broker/Bridge.lo \ qmf/org/apache/qpid/broker/Session.lo \ qmf/org/apache/qpid/broker/ManagementSetupState.lo \ qmf/org/apache/qpid/broker/EventClientConnect.lo \ qmf/org/apache/qpid/broker/EventClientConnectFail.lo \ qmf/org/apache/qpid/broker/EventClientDisconnect.lo \ qmf/org/apache/qpid/broker/EventBrokerLinkUp.lo \ qmf/org/apache/qpid/broker/EventBrokerLinkDown.lo \ qmf/org/apache/qpid/broker/EventQueueDeclare.lo \ qmf/org/apache/qpid/broker/EventQueueDelete.lo \ qmf/org/apache/qpid/broker/EventExchangeDeclare.lo \ qmf/org/apache/qpid/broker/EventExchangeDelete.lo \ qmf/org/apache/qpid/broker/EventBind.lo \ qmf/org/apache/qpid/broker/EventUnbind.lo \ qmf/org/apache/qpid/broker/EventSubscribe.lo \ qmf/org/apache/qpid/broker/EventUnsubscribe.lo \ qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.lo \ qmf/org/apache/qpid/broker/Package.lo \ qmf/org/apache/qpid/acl/Acl.lo \ qmf/org/apache/qpid/acl/EventAllow.lo \ qmf/org/apache/qpid/acl/EventDeny.lo \ qmf/org/apache/qpid/acl/EventFileLoaded.lo \ qmf/org/apache/qpid/acl/EventFileLoadFailed.lo \ qmf/org/apache/qpid/acl/Package.lo \ qmf/org/apache/qpid/cluster/Cluster.lo \ qmf/org/apache/qpid/cluster/Package.lo \ qmf/org/apache/qpid/ha/HaBroker.lo \ qmf/org/apache/qpid/ha/Package.lo am__objects_4 = qpid/broker/posix/BrokerDefaults.lo am_libqpidbroker_la_OBJECTS = $(am__objects_3) $(am__objects_4) \ qpid/amqp_0_10/Connection.lo qpid/broker/Bridge.lo \ qpid/broker/Broker.lo qpid/broker/Connection.lo \ qpid/broker/ConnectionFactory.lo \ qpid/broker/ConnectionHandler.lo qpid/broker/Credit.lo \ qpid/broker/Daemon.lo qpid/broker/DeliverableMessage.lo \ qpid/broker/DeliveryRecord.lo qpid/broker/DirectExchange.lo \ qpid/broker/DtxAck.lo qpid/broker/DtxBuffer.lo \ qpid/broker/DtxManager.lo qpid/broker/DtxTimeout.lo \ qpid/broker/DtxWorkRecord.lo qpid/broker/Exchange.lo \ qpid/broker/ExchangeRegistry.lo qpid/broker/ExpiryPolicy.lo \ qpid/broker/Fairshare.lo qpid/broker/FanOutExchange.lo \ qpid/broker/HeadersExchange.lo qpid/broker/LegacyLVQ.lo \ qpid/broker/Link.lo qpid/broker/LinkRegistry.lo \ qpid/broker/Message.lo qpid/broker/MessageAdapter.lo \ qpid/broker/MessageBuilder.lo qpid/broker/MessageDeque.lo \ qpid/broker/MessageMap.lo qpid/broker/MessageStoreModule.lo \ qpid/broker/PriorityQueue.lo qpid/broker/NameGenerator.lo \ qpid/broker/NullMessageStore.lo \ qpid/broker/PersistableMessage.lo qpid/broker/Queue.lo \ qpid/broker/QueueBindings.lo qpid/broker/QueueCleaner.lo \ qpid/broker/QueueEvents.lo qpid/broker/QueueListeners.lo \ qpid/broker/QueuePolicy.lo qpid/broker/QueueRegistry.lo \ qpid/broker/QueueFlowLimit.lo qpid/broker/RecoveredDequeue.lo \ qpid/broker/RecoveredEnqueue.lo \ qpid/broker/RecoveryManagerImpl.lo qpid/broker/RetryList.lo \ qpid/broker/SaslAuthenticator.lo \ qpid/broker/SecureConnection.lo \ qpid/broker/SecureConnectionFactory.lo \ qpid/broker/SemanticState.lo qpid/broker/SessionAdapter.lo \ qpid/broker/SessionHandler.lo qpid/broker/SessionManager.lo \ qpid/broker/SessionState.lo qpid/broker/SignalHandler.lo \ qpid/broker/System.lo qpid/broker/ThresholdAlerts.lo \ qpid/broker/TopicExchange.lo qpid/broker/TxAccept.lo \ qpid/broker/TxBuffer.lo qpid/broker/TxPublish.lo \ qpid/broker/Vhost.lo qpid/broker/FifoDistributor.lo \ qpid/broker/MessageGroupManager.lo \ qpid/management/ManagementAgent.lo \ qpid/management/ManagementDirectExchange.lo \ qpid/management/ManagementTopicExchange.lo \ qpid/sys/TCPIOPlugin.lo libqpidbroker_la_OBJECTS = $(am_libqpidbroker_la_OBJECTS) libqpidbroker_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libqpidbroker_la_LDFLAGS) $(LDFLAGS) -o $@ libqpidclient_la_DEPENDENCIES = libqpidcommon.la am__objects_5 = ./qpid/client/no_keyword/libqpidclient_la-AsyncSession_0_10.lo \ ./qpid/client/no_keyword/libqpidclient_la-Session_0_10.lo am_libqpidclient_la_OBJECTS = $(am__objects_5) \ qpid/client/libqpidclient_la-Bounds.lo \ qpid/client/libqpidclient_la-Completion.lo \ qpid/client/libqpidclient_la-Connection.lo \ qpid/client/libqpidclient_la-ConnectionHandler.lo \ qpid/client/libqpidclient_la-ConnectionImpl.lo \ qpid/client/libqpidclient_la-ConnectionSettings.lo \ qpid/client/libqpidclient_la-Connector.lo \ qpid/client/libqpidclient_la-Demux.lo \ qpid/client/libqpidclient_la-Dispatcher.lo \ qpid/client/libqpidclient_la-FailoverListener.lo \ qpid/client/libqpidclient_la-FailoverManager.lo \ qpid/client/libqpidclient_la-Future.lo \ qpid/client/libqpidclient_la-FutureCompletion.lo \ qpid/client/libqpidclient_la-FutureResult.lo \ qpid/client/libqpidclient_la-LoadPlugins.lo \ qpid/client/libqpidclient_la-LocalQueue.lo \ qpid/client/libqpidclient_la-LocalQueueImpl.lo \ qpid/client/libqpidclient_la-Message.lo \ qpid/client/libqpidclient_la-MessageImpl.lo \ qpid/client/libqpidclient_la-MessageListener.lo \ qpid/client/libqpidclient_la-MessageReplayTracker.lo \ qpid/client/libqpidclient_la-QueueOptions.lo \ qpid/client/libqpidclient_la-Results.lo \ qpid/client/libqpidclient_la-SessionBase_0_10.lo \ qpid/client/libqpidclient_la-SessionImpl.lo \ qpid/client/libqpidclient_la-StateManager.lo \ qpid/client/libqpidclient_la-Subscription.lo \ qpid/client/libqpidclient_la-SubscriptionImpl.lo \ qpid/client/libqpidclient_la-SubscriptionManager.lo \ qpid/client/libqpidclient_la-SubscriptionManagerImpl.lo \ qpid/client/libqpidclient_la-TCPConnector.lo libqpidclient_la_OBJECTS = $(am_libqpidclient_la_OBJECTS) libqpidclient_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) \ $(libqpidclient_la_LDFLAGS) $(LDFLAGS) -o $@ libqpidcommon_la_DEPENDENCIES = libqpidtypes.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__libqpidcommon_la_SOURCES_DIST = qpid/log/posix/SinkOptions.cpp \ qpid/sys/posix/IOHandle.cpp qpid/sys/posix/Socket.cpp \ qpid/sys/posix/SocketAddress.cpp qpid/sys/posix/AsynchIO.cpp \ qpid/sys/posix/FileSysDir.cpp qpid/sys/posix/LockFile.cpp \ qpid/sys/posix/Time.cpp qpid/sys/posix/Thread.cpp \ qpid/sys/posix/Shlib.cpp qpid/sys/posix/MemStat.cpp \ qpid/sys/posix/Mutex.cpp qpid/sys/posix/Fork.cpp \ qpid/sys/posix/StrError.cpp \ qpid/sys/posix/PollableCondition.cpp qpid/sys/posix/PidFile.h \ qpid/sys/posix/PipeHandle.cpp qpid/log/posix/SinkOptions.h \ qpid/sys/posix/Fork.h qpid/sys/solaris/ECFPoller.cpp \ qpid/sys/epoll/EpollPoller.cpp qpid/sys/posix/PosixPoller.cpp \ qpid/sys/posix/SystemInfo.cpp qpid/sys/solaris/SystemInfo.cpp \ ./qpid/framing/ClusterConnectionTxPublishBody.cpp \ ./qpid/framing/ClusterConnectionTxAcceptBody.cpp \ ../include/qpid/framing/XaResult.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.cpp \ ./qpid/framing/SessionExpectedBody.h \ ./qpid/framing/ExchangeUnbindBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.cpp \ ./qpid/framing/SessionCommandPointBody.h \ ./qpid/framing/QueuePurgeBody.h \ ./qpid/framing/ExchangeQueryResult.cpp \ ../include/qpid/framing/constants.h \ ./qpid/framing/ClusterConnectionTxStartBody.cpp \ ./qpid/framing/ExecutionResultBody.h \ ./qpid/framing/DtxStartBody.cpp \ ./qpid/framing/QueueDeclareBody.h \ ./qpid/framing/FilePublishBody.h \ ./qpid/framing/FileRejectBody.cpp \ ./qpid/framing/ClusterConnectionTxEnqueueBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.h \ ./qpid/framing/MessageResumeBody.h \ ./qpid/framing/ClusterReadyBody.h \ ./qpid/framing/ConnectionSecureOkBody.h \ ./qpid/framing/FileStageBody.h \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.h \ ./qpid/framing/ConnectionOpenOkBody.cpp \ ./qpid/framing/ServerInvoker.h \ ./qpid/framing/FileConsumeOkBody.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.h \ ./qpid/framing/ClusterTimerDropBody.h \ ../include/qpid/framing/MessageResumeResult.h \ ./qpid/framing/SessionAttachedBody.h \ ./qpid/framing/ExchangeBindBody.h \ ./qpid/framing/DtxRecoverBody.h \ ./qpid/framing/ClusterConnectionTxEndBody.cpp \ ./qpid/framing/ClusterTimerDropBody.cpp \ ./qpid/framing/ClusterReadyBody.cpp \ ./qpid/framing/SessionExpectedBody.cpp \ ./qpid/framing/StreamConsumeOkBody.cpp \ ./qpid/framing/MessageReleaseBody.cpp \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.h \ ./qpid/framing/ClusterClockBody.cpp \ ./qpid/framing/FileDeliverBody.h \ ./qpid/framing/FileQosBody.cpp \ ./qpid/framing/MessageTransferBody.cpp \ ./qpid/framing/FileCancelBody.cpp \ ../include/qpid/framing/reply_exceptions.h \ ./qpid/framing/AllInvoker.cpp \ ./qpid/framing/FileDeliverBody.cpp ./qpid/framing/Header.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.cpp \ ./qpid/framing/ConnectionSecureBody.cpp \ ./qpid/framing/MessageAcceptBody.cpp \ ./qpid/framing/AMQP_AllOperations.h \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxAckBody.h \ ./qpid/framing/ClusterConnectionAbortBody.h \ ./qpid/framing/SessionConfirmedBody.cpp \ ./qpid/framing/StreamReturnBody.h \ ./qpid/framing/StreamCancelBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.h \ ./qpid/framing/SessionDetachedBody.h \ ./qpid/framing/StreamConsumeOkBody.h \ ./qpid/framing/MessageFlowBody.h \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.h \ ./qpid/framing/SessionCommandPointBody.cpp \ ./qpid/framing/SessionDetachedBody.cpp \ ./qpid/framing/AMQP_ServerOperations.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.cpp \ ./qpid/framing/QueuePurgeBody.cpp \ ./qpid/framing/StreamReturnBody.cpp \ ./qpid/framing/ServerInvoker.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.cpp \ ./qpid/framing/ClusterConnectionQueuePositionBody.cpp \ ./qpid/framing/ClusterDeliverToQueueBody.cpp \ ./qpid/framing/frame_body_lists.h \ ./qpid/framing/StreamQosBody.cpp \ ./qpid/framing/ConnectionStartOkBody.cpp \ ./qpid/framing/StreamCancelBody.h \ ./qpid/framing/ClusterConnectionDtxStartBody.cpp \ ../include/qpid/framing/ReplyTo.h ./qpid/framing/DtxEndBody.h \ ./qpid/framing/ClusterTimerWakeupBody.cpp \ ./qpid/framing/XaResult.cpp ./qpid/framing/DtxRecoverBody.cpp \ ./qpid/framing/DtxSetTimeoutBody.h \ ../include/qpid/framing/QueueQueryResult.h \ ./qpid/framing/ConnectionOpenBody.h \ ./qpid/framing/StreamDeliverBody.h \ ./qpid/framing/FileRejectBody.h \ ./qpid/framing/ClusterConnectionClockBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.h \ ./qpid/framing/DtxCommitBody.cpp \ ./qpid/framing/FileProperties.cpp \ ./qpid/framing/MessageSubscribeBody.h \ ./qpid/framing/ExecutionExceptionBody.h \ ./qpid/framing/ConnectionStartOkBody.h \ ./qpid/framing/FileQosOkBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.cpp \ ./qpid/framing/MessageResumeBody.cpp \ ./qpid/framing/ExchangeQueryBody.h \ ./qpid/framing/FileCancelBody.h ./qpid/framing/TxSelectBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.h \ ./qpid/framing/ClusterConnectionDeliverCloseBody.cpp \ ./qpid/framing/ClusterErrorCheckBody.h \ ./qpid/framing/DtxStartBody.h ./qpid/framing/TxSelectBody.cpp \ ./qpid/framing/FileReturnBody.cpp \ ./qpid/framing/MessageRejectBody.cpp \ ./qpid/framing/AMQP_AllProxy.h \ ./qpid/framing/MessageProperties.cpp \ ./qpid/framing/MessageFlushBody.h \ ./qpid/framing/DtxRollbackBody.h \ ./qpid/framing/ClientInvoker.cpp \ ./qpid/framing/MessageResumeResult.cpp \ ./qpid/framing/ClusterRetractOfferBody.h \ ../include/qpid/framing/MessageAcquireResult.h \ ./qpid/framing/ClusterConnectionDtxStartBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.cpp \ ./qpid/framing/MessageFlushBody.cpp \ ./qpid/framing/ConnectionStartBody.cpp \ ./qpid/framing/ExecutionExceptionBody.cpp \ ./qpid/framing/StreamQosOkBody.h \ ./qpid/framing/ExchangeDeleteBody.h \ ../include/qpid/framing/amqp_structs.h \ ./qpid/framing/FragmentProperties.cpp \ ./qpid/framing/MessageSetFlowModeBody.cpp \ ./qpid/framing/SessionTimeoutBody.h \ ./qpid/framing/ConnectionSecureOkBody.cpp \ ./qpid/framing/StreamConsumeBody.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.cpp \ ./qpid/framing/ConnectionHeartbeatBody.cpp \ ./qpid/framing/StreamConsumeBody.cpp \ ./qpid/framing/ClusterConnectionConfigBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.cpp \ ./qpid/framing/ClusterShutdownBody.h \ ./qpid/framing/ConnectionRedirectBody.h \ ./qpid/framing/MessageCancelBody.h \ ./qpid/framing/ConnectionStartBody.h \ ./qpid/framing/StreamProperties.cpp \ ./qpid/framing/FileAckBody.cpp \ ./qpid/framing/MethodBodyFactory.cpp \ ./qpid/framing/ClusterErrorCheckBody.cpp \ ./qpid/framing/ExchangeBindBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.h \ ./qpid/framing/TypeCode.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.cpp \ ./qpid/framing/ClusterTimerWakeupBody.h \ ./qpid/framing/MessageSubscribeBody.cpp \ ./qpid/framing/StreamQosOkBody.cpp \ ./qpid/framing/DeliveryProperties.cpp \ ./qpid/framing/QueueQueryResult.cpp \ ./qpid/framing/MessageAcquireBody.cpp \ ./qpid/framing/SessionAttachBody.h \ ./qpid/framing/MessageAcceptBody.h \ ./qpid/framing/DtxSelectBody.h \ ./qpid/framing/ExchangeQueryBody.cpp \ ./qpid/framing/ConnectionTuneBody.h \ ./qpid/framing/StreamPublishBody.cpp \ ./qpid/framing/ReplyTo.cpp \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.cpp \ ./qpid/framing/StreamDeliverBody.cpp \ ./qpid/framing/DtxGetTimeoutResult.cpp \ ./qpid/framing/MessageAcquireResult.cpp \ ./qpid/framing/DtxCommitBody.h \ ./qpid/framing/ClusterConnectionTxEnqueueBody.cpp \ ./qpid/framing/ClusterConnectionTxDequeueBody.cpp \ ./qpid/framing/ClusterConnectionDeliverCloseBody.h \ ./qpid/framing/ConnectionTuneOkBody.h \ ./qpid/framing/DtxGetTimeoutBody.cpp \ ./qpid/framing/ClusterRetractOfferBody.cpp \ ./qpid/framing/ExchangeBoundResult.cpp \ ./qpid/framing/ExchangeBoundBody.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h \ ./qpid/framing/ClusterConnectionAbortBody.cpp \ ./qpid/framing/SessionFlushBody.cpp \ ./qpid/framing/ConnectionOpenOkBody.h \ ./qpid/framing/all_method_bodies.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h \ ../include/qpid/framing/FragmentProperties.h \ ./qpid/framing/ClusterConnectionRetractOfferBody.h \ ./qpid/framing/ClusterConnectionTxAcceptBody.h \ ./qpid/framing/SessionAttachedBody.cpp \ ./qpid/framing/ExchangeBoundBody.h \ ./qpid/framing/QueueQueryBody.h \ ./qpid/framing/ExecutionResultBody.cpp \ ../include/qpid/framing/MessageProperties.h \ ../include/qpid/framing/Xid.h \ ./qpid/framing/SessionTimeoutBody.cpp \ ../include/qpid/framing/DtxGetTimeoutResult.h \ ./qpid/framing/DtxPrepareBody.h \ ./qpid/framing/SessionCompletedBody.h \ ./qpid/framing/FileReturnBody.h \ ./qpid/framing/MessageStopBody.h \ ./qpid/framing/ClusterUpdateRequestBody.cpp \ ./qpid/framing/DtxEndBody.cpp ./qpid/framing/DtxForgetBody.h \ ./qpid/framing/FileOpenOkBody.h \ ./qpid/framing/ClusterConnectionExchangeBody.h \ ./qpid/framing/ConnectionCloseOkBody.h \ ./qpid/framing/SessionKnownCompletedBody.h \ ./qpid/framing/DtxSelectBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.cpp \ ./qpid/framing/MessageStopBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.cpp \ ../include/qpid/framing/DeliveryProperties.h \ ./qpid/framing/AMQP_ServerProxy.h \ ./qpid/framing/ConnectionSecureBody.h \ ./qpid/framing/FileConsumeOkBody.cpp \ ./qpid/framing/StreamQosBody.h \ ./qpid/framing/DtxGetTimeoutBody.h \ ./qpid/framing/ClusterConnectionConfigBody.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.h \ ./qpid/framing/ClusterConnectionShadowPrepareBody.cpp \ ./qpid/framing/QueueQueryBody.cpp \ ./qpid/framing/AMQP_ServerProxy.cpp \ ./qpid/framing/MessageFlowBody.cpp \ ./qpid/framing/FileConsumeBody.h \ ./qpid/framing/SessionConfirmedBody.h \ ./qpid/framing/ClusterConnectionTxDequeueBody.h \ ./qpid/framing/SessionRequestTimeoutBody.cpp \ ./qpid/framing/SessionGapBody.h \ ../include/qpid/framing/ExchangeBoundResult.h \ ./qpid/framing/DtxRecoverResult.cpp \ ./qpid/framing/DtxPrepareBody.cpp \ ./qpid/framing/FilePublishBody.cpp \ ./qpid/framing/MessageTransferBody.h \ ./qpid/framing/ConnectionHeartbeatBody.h \ ./qpid/framing/MessageReleaseBody.h \ ./qpid/framing/ConnectionCloseOkBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.h \ ./qpid/framing/AMQP_AllProxy.cpp ./qpid/framing/FileAckBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h \ ./qpid/framing/MessageRejectBody.h \ ./qpid/framing/ExchangeUnbindBody.h \ ./qpid/framing/FileOpenOkBody.cpp \ ./qpid/framing/ExecutionSyncBody.h \ ./qpid/framing/ClientInvoker.h ./qpid/framing/AllInvoker.h \ ./qpid/framing/FileOpenBody.h \ ./qpid/framing/SessionDetachBody.h \ ./qpid/framing/ExchangeDeclareBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.cpp \ ../include/qpid/framing/FileProperties.h \ ./qpid/framing/FileStageBody.cpp \ ./qpid/framing/ClusterConnectionTxEndBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.cpp \ ./qpid/framing/ClusterConfigChangeBody.h \ ./qpid/framing/Xid.cpp ./qpid/framing/FileConsumeBody.cpp \ ./qpid/framing/SessionKnownCompletedBody.cpp \ ./qpid/framing/ConnectionRedirectBody.cpp \ ./qpid/framing/ConnectionTuneOkBody.cpp \ ./qpid/framing/ClusterConnectionMembershipBody.h \ ./qpid/framing/ClusterConnectionMembershipBody.cpp \ ./qpid/framing/ClusterConnectionShadowPrepareBody.h \ ./qpid/framing/FileQosOkBody.cpp \ ./qpid/framing/TxRollbackBody.cpp \ ./qpid/framing/ConnectionTuneBody.cpp \ ./qpid/framing/ExecutionSyncBody.cpp \ ./qpid/framing/ClusterConnectionRetractOfferBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.cpp \ ./qpid/framing/SessionAttachBody.cpp \ ./qpid/framing/ConnectionCloseBody.cpp \ ./qpid/framing/SessionGapBody.cpp \ ./qpid/framing/ClusterConnectionClockBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.h \ ../include/qpid/framing/DtxRecoverResult.h \ ./qpid/framing/MessageSetFlowModeBody.h \ ./qpid/framing/TxRollbackBody.h \ ../include/qpid/framing/TypeCode.h \ ./qpid/framing/ClusterConnectionTxPublishBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.h \ ./qpid/framing/ClusterConfigChangeBody.cpp \ ./qpid/framing/MessageAcquireBody.h \ ./qpid/framing/FileQosBody.h \ ./qpid/framing/ClusterDeliverToQueueBody.h \ ../include/qpid/framing/ExchangeQueryResult.h \ ./qpid/framing/ClusterUpdateRequestBody.h \ ./qpid/framing/MethodBodyConstVisitor.h \ ./qpid/framing/ClusterConnectionExchangeBody.cpp \ ./qpid/framing/ClusterConnectionTxStartBody.h \ ./qpid/framing/ExchangeDeclareBody.h \ ./qpid/framing/DtxForgetBody.cpp ./qpid/framing/TxCommitBody.h \ ./qpid/framing/ExchangeDeleteBody.cpp \ ./qpid/framing/DtxRollbackBody.cpp \ ./qpid/framing/ConnectionOpenBody.cpp \ ./qpid/framing/SessionRequestTimeoutBody.h \ ./qpid/framing/reply_exceptions.cpp \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h \ ./qpid/framing/ClusterConnectionQueuePositionBody.h \ ./qpid/framing/TxCommitBody.cpp \ ./qpid/framing/SessionFlushBody.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.cpp \ ./qpid/framing/AMQP_ClientProxy.cpp \ ./qpid/framing/QueueDeclareBody.cpp \ ../include/qpid/framing/Header.h \ ./qpid/framing/SessionCompletedBody.cpp \ ./qpid/framing/ConnectionCloseBody.h \ ./qpid/framing/AMQP_ClientOperations.h \ ../include/qpid/framing/enum.h \ ./qpid/framing/ClusterConnectionDtxAckBody.cpp \ ./qpid/framing/ClusterShutdownBody.cpp \ ../include/qpid/framing/StreamProperties.h \ ./qpid/framing/FileOpenBody.cpp \ ./qpid/framing/MessageCancelBody.cpp \ ./qpid/framing/SessionDetachBody.cpp \ ./qpid/framing/QueueDeleteBody.h \ ./qpid/framing/DtxSetTimeoutBody.cpp \ ./qpid/framing/ClusterClockBody.h \ ./qpid/framing/AMQP_ClientProxy.h \ ./qpid/framing/QueueDeleteBody.cpp \ ./qpid/framing/StreamPublishBody.h qpid/Address.cpp \ qpid/DataDir.cpp qpid/DataDir.h qpid/DisableExceptionLogging.h \ qpid/Exception.cpp qpid/Modules.cpp qpid/Modules.h \ qpid/Options.cpp qpid/Plugin.cpp qpid/Plugin.h \ qpid/RefCounted.h qpid/RefCountedBuffer.cpp \ qpid/RefCountedBuffer.h qpid/BufferRef.h qpid/Sasl.h \ qpid/SaslFactory.cpp qpid/SaslFactory.h qpid/Serializer.h \ qpid/SessionId.cpp qpid/SessionState.cpp qpid/SessionState.h \ qpid/SharedObject.h qpid/StringUtils.cpp qpid/StringUtils.h \ qpid/Url.cpp qpid/UrlArray.cpp qpid/UrlArray.h qpid/Version.h \ qpid/amqp_0_10/Exception.h qpid/amqp_0_10/SessionHandler.cpp \ qpid/amqp_0_10/SessionHandler.h qpid/amqp_0_10/apply.h \ qpid/assert.cpp qpid/assert.h qpid/framing/AMQBody.cpp \ qpid/framing/AMQBody.h qpid/framing/AMQCommandControlBody.h \ qpid/framing/AMQContentBody.cpp qpid/framing/AMQContentBody.h \ qpid/framing/AMQDataBlock.h qpid/framing/AMQFrame.cpp \ qpid/framing/AMQFrame.h qpid/framing/AMQHeaderBody.cpp \ qpid/framing/AMQHeaderBody.h qpid/framing/AMQHeartbeatBody.cpp \ qpid/framing/AMQHeartbeatBody.h qpid/framing/AMQMethodBody.cpp \ qpid/framing/AMQMethodBody.h \ qpid/framing/AMQP_HighestVersion.h \ qpid/framing/AccumulatedAck.cpp qpid/framing/AccumulatedAck.h \ qpid/framing/Array.cpp qpid/framing/BodyFactory.h \ qpid/framing/BodyHandler.cpp qpid/framing/BodyHandler.h \ qpid/framing/Buffer.cpp qpid/framing/ResizableBuffer.h \ qpid/framing/ChannelHandler.h qpid/framing/Endian.cpp \ qpid/framing/Endian.h qpid/framing/FieldTable.cpp \ qpid/framing/FieldValue.cpp qpid/framing/FrameDecoder.cpp \ qpid/framing/FrameDecoder.h qpid/framing/FrameDefaultVisitor.h \ qpid/framing/FrameHandler.h qpid/framing/FrameSet.cpp \ qpid/framing/FrameSet.h qpid/framing/Handler.h \ qpid/framing/HeaderProperties.h \ qpid/framing/InitiationHandler.h qpid/framing/InputHandler.h \ qpid/framing/Invoker.h qpid/framing/IsInSequenceSet.h \ qpid/framing/List.cpp qpid/framing/MethodBodyFactory.h \ qpid/framing/MethodContent.h qpid/framing/ModelMethod.h \ qpid/framing/OutputHandler.h \ qpid/framing/ProtocolInitiation.cpp \ qpid/framing/ProtocolInitiation.h \ qpid/framing/ProtocolVersion.cpp qpid/framing/Proxy.cpp \ qpid/framing/Proxy.h qpid/framing/SendContent.cpp \ qpid/framing/SendContent.h qpid/framing/SequenceNumber.cpp \ qpid/framing/SequenceNumberSet.cpp \ qpid/framing/SequenceNumberSet.h qpid/framing/SequenceSet.cpp \ qpid/framing/TransferContent.cpp \ qpid/framing/TransferContent.h qpid/framing/TypeFilter.h \ qpid/framing/Uuid.cpp qpid/framing/Visitor.h \ qpid/framing/amqp_framing.h qpid/framing/frame_functors.h \ qpid/framing/variant.h qpid/log/Helpers.h qpid/log/Logger.cpp \ qpid/log/Options.cpp qpid/log/OstreamOutput.cpp \ qpid/log/OstreamOutput.h qpid/log/Selector.cpp \ qpid/log/Statement.cpp qpid/management/Buffer.cpp \ qpid/management/ConnectionSettings.cpp \ qpid/management/Manageable.cpp \ qpid/management/ManagementObject.cpp qpid/management/Mutex.cpp \ qpid/memory.h qpid/pointer_to_other.h qpid/ptr_map.h \ qpid/sys/AggregateOutput.cpp qpid/sys/AggregateOutput.h \ qpid/sys/AsynchIO.h qpid/sys/AsynchIOHandler.cpp \ qpid/sys/AsynchIOHandler.h qpid/sys/AtomicCount.h \ qpid/sys/AtomicValue.h qpid/sys/AtomicValue_gcc.h \ qpid/sys/AtomicValue_mutex.h qpid/sys/BlockingQueue.h \ qpid/sys/ClusterSafe.h qpid/sys/ClusterSafe.cpp \ qpid/sys/Codec.h qpid/sys/ConnectionCodec.h \ qpid/sys/ConnectionInputHandler.h \ qpid/sys/ConnectionInputHandlerFactory.h \ qpid/sys/ConnectionOutputHandler.h \ qpid/sys/ConnectionOutputHandlerPtr.h \ qpid/sys/CopyOnWriteArray.h qpid/sys/DeletionManager.h \ qpid/sys/DispatchHandle.cpp qpid/sys/DispatchHandle.h \ qpid/sys/Dispatcher.cpp qpid/sys/Dispatcher.h \ qpid/sys/FileSysDir.h qpid/sys/Fork.h qpid/sys/LockFile.h \ qpid/sys/LockPtr.h qpid/sys/MemStat.h qpid/sys/OutputControl.h \ qpid/sys/OutputTask.h qpid/sys/PipeHandle.h \ qpid/sys/PollableCondition.h qpid/sys/PollableQueue.h \ qpid/sys/Poller.h qpid/sys/Probes.h qpid/sys/ProtocolFactory.h \ qpid/sys/Runnable.cpp qpid/sys/ScopedIncrement.h \ qpid/sys/SecurityLayer.h qpid/sys/SecuritySettings.h \ qpid/sys/Semaphore.h qpid/sys/Shlib.cpp qpid/sys/Shlib.h \ qpid/sys/ShutdownHandler.h qpid/sys/Socket.h \ qpid/sys/SocketAddress.h qpid/sys/StateMonitor.h \ qpid/sys/TimeoutHandler.h qpid/sys/Timer.cpp qpid/sys/Timer.h \ qpid/sys/TimerWarnings.cpp qpid/sys/TimerWarnings.h \ qpid/sys/Waitable.h qpid/sys/alloca.h qpid/sys/uuid.h \ qpid/sys/unordered_map.h qpid/amqp_0_10/Codecs.cpp \ qpid/sys/cyrus/CyrusSecurityLayer.h \ qpid/sys/cyrus/CyrusSecurityLayer.cpp @USE_ECF_FALSE@@USE_EPOLL_FALSE@@USE_POLL_TRUE@am__objects_6 = qpid/sys/posix/PosixPoller.lo @USE_ECF_FALSE@@USE_EPOLL_TRUE@am__objects_6 = \ @USE_ECF_FALSE@@USE_EPOLL_TRUE@ qpid/sys/epoll/EpollPoller.lo @USE_ECF_TRUE@am__objects_6 = qpid/sys/solaris/ECFPoller.lo @SUNOS_FALSE@am__objects_7 = qpid/sys/posix/SystemInfo.lo @SUNOS_TRUE@am__objects_7 = qpid/sys/solaris/SystemInfo.lo am__objects_8 = ./qpid/framing/ClusterConnectionTxPublishBody.lo \ ./qpid/framing/ClusterConnectionTxAcceptBody.lo \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.lo \ ./qpid/framing/ExchangeUnbindBody.lo \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.lo \ ./qpid/framing/ExchangeQueryResult.lo \ ./qpid/framing/ClusterConnectionTxStartBody.lo \ ./qpid/framing/DtxStartBody.lo \ ./qpid/framing/FileRejectBody.lo \ ./qpid/framing/ConnectionOpenOkBody.lo \ ./qpid/framing/ClusterConnectionTxEndBody.lo \ ./qpid/framing/ClusterTimerDropBody.lo \ ./qpid/framing/ClusterReadyBody.lo \ ./qpid/framing/SessionExpectedBody.lo \ ./qpid/framing/StreamConsumeOkBody.lo \ ./qpid/framing/MessageReleaseBody.lo \ ./qpid/framing/ClusterClockBody.lo \ ./qpid/framing/FileQosBody.lo \ ./qpid/framing/MessageTransferBody.lo \ ./qpid/framing/FileCancelBody.lo ./qpid/framing/AllInvoker.lo \ ./qpid/framing/FileDeliverBody.lo ./qpid/framing/Header.lo \ ./qpid/framing/ClusterConnectionDtxEndBody.lo \ ./qpid/framing/ConnectionSecureBody.lo \ ./qpid/framing/MessageAcceptBody.lo \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.lo \ ./qpid/framing/SessionConfirmedBody.lo \ ./qpid/framing/StreamCancelBody.lo \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.lo \ ./qpid/framing/SessionCommandPointBody.lo \ ./qpid/framing/SessionDetachedBody.lo \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.lo \ ./qpid/framing/QueuePurgeBody.lo \ ./qpid/framing/StreamReturnBody.lo \ ./qpid/framing/ServerInvoker.lo \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.lo \ ./qpid/framing/ClusterConnectionQueuePositionBody.lo \ ./qpid/framing/ClusterDeliverToQueueBody.lo \ ./qpid/framing/StreamQosBody.lo \ ./qpid/framing/ConnectionStartOkBody.lo \ ./qpid/framing/ClusterConnectionDtxStartBody.lo \ ./qpid/framing/ClusterTimerWakeupBody.lo \ ./qpid/framing/XaResult.lo ./qpid/framing/DtxRecoverBody.lo \ ./qpid/framing/ClusterConnectionClockBody.lo \ ./qpid/framing/DtxCommitBody.lo \ ./qpid/framing/FileProperties.lo \ ./qpid/framing/MethodBodyDefaultVisitor.lo \ ./qpid/framing/MessageResumeBody.lo \ ./qpid/framing/ClusterConnectionDeliverCloseBody.lo \ ./qpid/framing/TxSelectBody.lo \ ./qpid/framing/FileReturnBody.lo \ ./qpid/framing/MessageRejectBody.lo \ ./qpid/framing/MessageProperties.lo \ ./qpid/framing/ClientInvoker.lo \ ./qpid/framing/MessageResumeResult.lo \ ./qpid/framing/ClusterConnectionConsumerStateBody.lo \ ./qpid/framing/MessageFlushBody.lo \ ./qpid/framing/ConnectionStartBody.lo \ ./qpid/framing/ExecutionExceptionBody.lo \ ./qpid/framing/FragmentProperties.lo \ ./qpid/framing/MessageSetFlowModeBody.lo \ ./qpid/framing/ConnectionSecureOkBody.lo \ ./qpid/framing/ClusterConnectionOutputTaskBody.lo \ ./qpid/framing/ConnectionHeartbeatBody.lo \ ./qpid/framing/StreamConsumeBody.lo \ ./qpid/framing/ClusterConnectionShadowSetUserBody.lo \ ./qpid/framing/StreamProperties.lo \ ./qpid/framing/FileAckBody.lo \ ./qpid/framing/MethodBodyFactory.lo \ ./qpid/framing/ClusterErrorCheckBody.lo \ ./qpid/framing/ExchangeBindBody.lo ./qpid/framing/TypeCode.lo \ ./qpid/framing/ClusterConnectionSessionStateBody.lo \ ./qpid/framing/MessageSubscribeBody.lo \ ./qpid/framing/StreamQosOkBody.lo \ ./qpid/framing/DeliveryProperties.lo \ ./qpid/framing/QueueQueryResult.lo \ ./qpid/framing/MessageAcquireBody.lo \ ./qpid/framing/ExchangeQueryBody.lo \ ./qpid/framing/StreamPublishBody.lo ./qpid/framing/ReplyTo.lo \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.lo \ ./qpid/framing/StreamDeliverBody.lo \ ./qpid/framing/DtxGetTimeoutResult.lo \ ./qpid/framing/MessageAcquireResult.lo \ ./qpid/framing/ClusterConnectionTxEnqueueBody.lo \ ./qpid/framing/ClusterConnectionTxDequeueBody.lo \ ./qpid/framing/DtxGetTimeoutBody.lo \ ./qpid/framing/ClusterRetractOfferBody.lo \ ./qpid/framing/ExchangeBoundResult.lo \ ./qpid/framing/ExchangeBoundBody.lo \ ./qpid/framing/ClusterConnectionAbortBody.lo \ ./qpid/framing/SessionFlushBody.lo \ ./qpid/framing/SessionAttachedBody.lo \ ./qpid/framing/ExecutionResultBody.lo \ ./qpid/framing/SessionTimeoutBody.lo \ ./qpid/framing/ClusterUpdateRequestBody.lo \ ./qpid/framing/DtxEndBody.lo ./qpid/framing/DtxSelectBody.lo \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.lo \ ./qpid/framing/MessageStopBody.lo \ ./qpid/framing/ClusterInitialStatusBody.lo \ ./qpid/framing/FileConsumeOkBody.lo \ ./qpid/framing/ClusterConnectionConfigBody.lo \ ./qpid/framing/ClusterConnectionShadowPrepareBody.lo \ ./qpid/framing/QueueQueryBody.lo \ ./qpid/framing/AMQP_ServerProxy.lo \ ./qpid/framing/MessageFlowBody.lo \ ./qpid/framing/SessionRequestTimeoutBody.lo \ ./qpid/framing/DtxRecoverResult.lo \ ./qpid/framing/DtxPrepareBody.lo \ ./qpid/framing/FilePublishBody.lo \ ./qpid/framing/ConnectionCloseOkBody.lo \ ./qpid/framing/AMQP_AllProxy.lo \ ./qpid/framing/ClusterConnectionShadowReadyBody.lo \ ./qpid/framing/FileOpenOkBody.lo \ ./qpid/framing/ExchangeDeclareBody.lo \ ./qpid/framing/ClusterUpdateOfferBody.lo \ ./qpid/framing/FileStageBody.lo \ ./qpid/framing/ClusterConnectionAnnounceBody.lo \ ./qpid/framing/Xid.lo ./qpid/framing/FileConsumeBody.lo \ ./qpid/framing/SessionKnownCompletedBody.lo \ ./qpid/framing/ConnectionRedirectBody.lo \ ./qpid/framing/ConnectionTuneOkBody.lo \ ./qpid/framing/ClusterConnectionMembershipBody.lo \ ./qpid/framing/FileQosOkBody.lo \ ./qpid/framing/TxRollbackBody.lo \ ./qpid/framing/ConnectionTuneBody.lo \ ./qpid/framing/ExecutionSyncBody.lo \ ./qpid/framing/ClusterConnectionRetractOfferBody.lo \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.lo \ ./qpid/framing/SessionAttachBody.lo \ ./qpid/framing/ConnectionCloseBody.lo \ ./qpid/framing/SessionGapBody.lo \ ./qpid/framing/ClusterConfigChangeBody.lo \ ./qpid/framing/ClusterConnectionExchangeBody.lo \ ./qpid/framing/DtxForgetBody.lo \ ./qpid/framing/ExchangeDeleteBody.lo \ ./qpid/framing/DtxRollbackBody.lo \ ./qpid/framing/ConnectionOpenBody.lo \ ./qpid/framing/reply_exceptions.lo \ ./qpid/framing/TxCommitBody.lo \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.lo \ ./qpid/framing/AMQP_ClientProxy.lo \ ./qpid/framing/QueueDeclareBody.lo \ ./qpid/framing/SessionCompletedBody.lo \ ./qpid/framing/ClusterConnectionDtxAckBody.lo \ ./qpid/framing/ClusterShutdownBody.lo \ ./qpid/framing/FileOpenBody.lo \ ./qpid/framing/MessageCancelBody.lo \ ./qpid/framing/SessionDetachBody.lo \ ./qpid/framing/DtxSetTimeoutBody.lo \ ./qpid/framing/QueueDeleteBody.lo @HAVE_SASL_TRUE@am__objects_9 = qpid/sys/cyrus/CyrusSecurityLayer.lo am_libqpidcommon_la_OBJECTS = qpid/log/posix/SinkOptions.lo \ qpid/sys/posix/IOHandle.lo qpid/sys/posix/Socket.lo \ qpid/sys/posix/SocketAddress.lo qpid/sys/posix/AsynchIO.lo \ qpid/sys/posix/FileSysDir.lo qpid/sys/posix/LockFile.lo \ qpid/sys/posix/Time.lo qpid/sys/posix/Thread.lo \ qpid/sys/posix/Shlib.lo qpid/sys/posix/MemStat.lo \ qpid/sys/posix/Mutex.lo qpid/sys/posix/Fork.lo \ qpid/sys/posix/StrError.lo qpid/sys/posix/PollableCondition.lo \ qpid/sys/posix/PipeHandle.lo $(am__objects_6) $(am__objects_7) \ $(am__objects_8) qpid/Address.lo qpid/DataDir.lo \ qpid/Exception.lo qpid/Modules.lo qpid/Options.lo \ qpid/Plugin.lo qpid/RefCountedBuffer.lo qpid/SaslFactory.lo \ qpid/SessionId.lo qpid/SessionState.lo qpid/StringUtils.lo \ qpid/Url.lo qpid/UrlArray.lo qpid/amqp_0_10/SessionHandler.lo \ qpid/assert.lo qpid/framing/AMQBody.lo \ qpid/framing/AMQContentBody.lo qpid/framing/AMQFrame.lo \ qpid/framing/AMQHeaderBody.lo qpid/framing/AMQHeartbeatBody.lo \ qpid/framing/AMQMethodBody.lo qpid/framing/AccumulatedAck.lo \ qpid/framing/Array.lo qpid/framing/BodyHandler.lo \ qpid/framing/Buffer.lo qpid/framing/Endian.lo \ qpid/framing/FieldTable.lo qpid/framing/FieldValue.lo \ qpid/framing/FrameDecoder.lo qpid/framing/FrameSet.lo \ qpid/framing/List.lo qpid/framing/ProtocolInitiation.lo \ qpid/framing/ProtocolVersion.lo qpid/framing/Proxy.lo \ qpid/framing/SendContent.lo qpid/framing/SequenceNumber.lo \ qpid/framing/SequenceNumberSet.lo qpid/framing/SequenceSet.lo \ qpid/framing/TransferContent.lo qpid/framing/Uuid.lo \ qpid/log/Logger.lo qpid/log/Options.lo \ qpid/log/OstreamOutput.lo qpid/log/Selector.lo \ qpid/log/Statement.lo qpid/management/Buffer.lo \ qpid/management/ConnectionSettings.lo \ qpid/management/Manageable.lo \ qpid/management/ManagementObject.lo qpid/management/Mutex.lo \ qpid/sys/AggregateOutput.lo qpid/sys/AsynchIOHandler.lo \ qpid/sys/ClusterSafe.lo qpid/sys/DispatchHandle.lo \ qpid/sys/Dispatcher.lo qpid/sys/Runnable.lo qpid/sys/Shlib.lo \ qpid/sys/Timer.lo qpid/sys/TimerWarnings.lo \ qpid/amqp_0_10/Codecs.lo $(am__objects_9) libqpidcommon_la_OBJECTS = $(am_libqpidcommon_la_OBJECTS) libqpidcommon_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libqpidcommon_la_LDFLAGS) $(LDFLAGS) -o $@ libqpidmessaging_la_DEPENDENCIES = libqpidclient.la libqpidtypes.la am_libqpidmessaging_la_OBJECTS = qpid/messaging/Address.lo \ qpid/messaging/AddressParser.lo qpid/messaging/Connection.lo \ qpid/messaging/Duration.lo qpid/messaging/exceptions.lo \ qpid/messaging/Message.lo qpid/messaging/MessageImpl.lo \ qpid/messaging/Sender.lo qpid/messaging/Receiver.lo \ qpid/messaging/Session.lo qpid/messaging/FailoverUpdates.lo \ qpid/client/amqp0_10/AcceptTracker.lo \ qpid/client/amqp0_10/AddressResolution.lo \ qpid/client/amqp0_10/ConnectionImpl.lo \ qpid/client/amqp0_10/IncomingMessages.lo \ qpid/client/amqp0_10/OutgoingMessage.lo \ qpid/client/amqp0_10/ReceiverImpl.lo \ qpid/client/amqp0_10/SessionImpl.lo \ qpid/client/amqp0_10/SenderImpl.lo libqpidmessaging_la_OBJECTS = $(am_libqpidmessaging_la_OBJECTS) libqpidmessaging_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libqpidmessaging_la_LDFLAGS) $(LDFLAGS) -o $@ libqpidtypes_la_DEPENDENCIES = am_libqpidtypes_la_OBJECTS = qpid/types/Exception.lo \ qpid/types/Uuid.lo qpid/types/Variant.lo libqpidtypes_la_OBJECTS = $(am_libqpidtypes_la_OBJECTS) libqpidtypes_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libqpidtypes_la_LDFLAGS) $(LDFLAGS) -o $@ @RDMA_TRUE@librdmawrap_la_DEPENDENCIES = libqpidcommon.la am__librdmawrap_la_SOURCES_DIST = qpid/sys/rdma/rdma_exception.h \ qpid/sys/rdma/rdma_factories.cpp \ qpid/sys/rdma/rdma_factories.h qpid/sys/rdma/RdmaIO.cpp \ qpid/sys/rdma/RdmaIO.h qpid/sys/rdma/rdma_wrap.cpp \ qpid/sys/rdma/rdma_wrap.h @RDMA_TRUE@am_librdmawrap_la_OBJECTS = \ @RDMA_TRUE@ qpid/sys/rdma/librdmawrap_la-rdma_factories.lo \ @RDMA_TRUE@ qpid/sys/rdma/librdmawrap_la-RdmaIO.lo \ @RDMA_TRUE@ qpid/sys/rdma/librdmawrap_la-rdma_wrap.lo librdmawrap_la_OBJECTS = $(am_librdmawrap_la_OBJECTS) librdmawrap_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(librdmawrap_la_CXXFLAGS) $(CXXFLAGS) \ $(librdmawrap_la_LDFLAGS) $(LDFLAGS) -o $@ @RDMA_TRUE@am_librdmawrap_la_rpath = -rpath $(libdir) @SSL_TRUE@libsslcommon_la_DEPENDENCIES = libqpidcommon.la am__libsslcommon_la_SOURCES_DIST = qpid/sys/ssl/check.h \ qpid/sys/ssl/check.cpp qpid/sys/ssl/util.h \ qpid/sys/ssl/util.cpp qpid/sys/ssl/SslSocket.h \ qpid/sys/ssl/SslSocket.cpp qpid/sys/ssl/SslIo.h \ qpid/sys/ssl/SslIo.cpp @SSL_TRUE@am_libsslcommon_la_OBJECTS = \ @SSL_TRUE@ qpid/sys/ssl/libsslcommon_la-check.lo \ @SSL_TRUE@ qpid/sys/ssl/libsslcommon_la-util.lo \ @SSL_TRUE@ qpid/sys/ssl/libsslcommon_la-SslSocket.lo \ @SSL_TRUE@ qpid/sys/ssl/libsslcommon_la-SslIo.lo libsslcommon_la_OBJECTS = $(am_libsslcommon_la_OBJECTS) libsslcommon_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(libsslcommon_la_CXXFLAGS) $(CXXFLAGS) \ $(libsslcommon_la_LDFLAGS) $(LDFLAGS) -o $@ @SSL_TRUE@am_libsslcommon_la_rpath = -rpath $(libdir) @RDMA_TRUE@rdma_la_DEPENDENCIES = libqpidbroker.la librdmawrap.la am__rdma_la_SOURCES_DIST = qpid/sys/RdmaIOPlugin.cpp @RDMA_TRUE@am_rdma_la_OBJECTS = qpid/sys/rdma_la-RdmaIOPlugin.lo rdma_la_OBJECTS = $(am_rdma_la_OBJECTS) rdma_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(rdma_la_CXXFLAGS) $(CXXFLAGS) \ $(rdma_la_LDFLAGS) $(LDFLAGS) -o $@ @RDMA_TRUE@am_rdma_la_rpath = -rpath $(dmoduleexecdir) @RDMA_TRUE@rdmaconnector_la_DEPENDENCIES = libqpidclient.la \ @RDMA_TRUE@ librdmawrap.la am__rdmaconnector_la_SOURCES_DIST = qpid/client/RdmaConnector.cpp @RDMA_TRUE@am_rdmaconnector_la_OBJECTS = \ @RDMA_TRUE@ qpid/client/rdmaconnector_la-RdmaConnector.lo rdmaconnector_la_OBJECTS = $(am_rdmaconnector_la_OBJECTS) rdmaconnector_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(rdmaconnector_la_CXXFLAGS) $(CXXFLAGS) \ $(rdmaconnector_la_LDFLAGS) $(LDFLAGS) -o $@ @RDMA_TRUE@am_rdmaconnector_la_rpath = -rpath $(cmoduleexecdir) @SUNOS_TRUE@am__DEPENDENCIES_3 = libqpidcommon.la \ @SUNOS_TRUE@ $(am__DEPENDENCIES_1) replicating_listener_la_DEPENDENCIES = libqpidbroker.la \ $(am__DEPENDENCIES_3) am_replicating_listener_la_OBJECTS = \ qpid/replication/ReplicatingEventListener.lo replicating_listener_la_OBJECTS = \ $(am_replicating_listener_la_OBJECTS) replicating_listener_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(replicating_listener_la_LDFLAGS) $(LDFLAGS) -o \ $@ replication_exchange_la_DEPENDENCIES = libqpidbroker.la \ $(am__DEPENDENCIES_3) am_replication_exchange_la_OBJECTS = \ qpid/replication/ReplicationExchange.lo replication_exchange_la_OBJECTS = \ $(am_replication_exchange_la_OBJECTS) replication_exchange_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(replication_exchange_la_LDFLAGS) $(LDFLAGS) -o \ $@ @SSL_TRUE@ssl_la_DEPENDENCIES = libqpidbroker.la libsslcommon.la am__ssl_la_SOURCES_DIST = qpid/sys/SslPlugin.cpp \ qpid/sys/ssl/SslHandler.h qpid/sys/ssl/SslHandler.cpp @SSL_TRUE@am_ssl_la_OBJECTS = qpid/sys/ssl_la-SslPlugin.lo \ @SSL_TRUE@ qpid/sys/ssl/ssl_la-SslHandler.lo ssl_la_OBJECTS = $(am_ssl_la_OBJECTS) ssl_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(ssl_la_CXXFLAGS) $(CXXFLAGS) \ $(ssl_la_LDFLAGS) $(LDFLAGS) -o $@ @SSL_TRUE@am_ssl_la_rpath = -rpath $(dmoduleexecdir) @SSL_TRUE@sslconnector_la_DEPENDENCIES = libqpidclient.la \ @SSL_TRUE@ libsslcommon.la am__sslconnector_la_SOURCES_DIST = qpid/client/SslConnector.cpp @SSL_TRUE@am_sslconnector_la_OBJECTS = \ @SSL_TRUE@ qpid/client/sslconnector_la-SslConnector.lo sslconnector_la_OBJECTS = $(am_sslconnector_la_OBJECTS) sslconnector_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(sslconnector_la_CXXFLAGS) $(CXXFLAGS) \ $(sslconnector_la_LDFLAGS) $(LDFLAGS) -o $@ @SSL_TRUE@am_sslconnector_la_rpath = -rpath $(cmoduleexecdir) @HAVE_LIBCPG_TRUE@watchdog_la_DEPENDENCIES = libqpidbroker.la am__watchdog_la_SOURCES_DIST = qpid/cluster/WatchDogPlugin.cpp @HAVE_LIBCPG_TRUE@am_watchdog_la_OBJECTS = \ @HAVE_LIBCPG_TRUE@ qpid/cluster/WatchDogPlugin.lo watchdog_la_OBJECTS = $(am_watchdog_la_OBJECTS) watchdog_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(watchdog_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_LIBCPG_TRUE@am_watchdog_la_rpath = -rpath $(dmoduleexecdir) @HAVE_XML_TRUE@xml_la_DEPENDENCIES = libqpidbroker.la am__xml_la_SOURCES_DIST = qpid/xml/XmlExchange.cpp \ qpid/xml/XmlExchange.h qpid/xml/XmlExchangePlugin.cpp @HAVE_XML_TRUE@am_xml_la_OBJECTS = qpid/xml/XmlExchange.lo \ @HAVE_XML_TRUE@ qpid/xml/XmlExchangePlugin.lo xml_la_OBJECTS = $(am_xml_la_OBJECTS) xml_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ $(xml_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_XML_TRUE@am_xml_la_rpath = -rpath $(dmoduleexecdir) @HAVE_LIBCPG_TRUE@am__EXEEXT_1 = qpidd_watchdog$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) $(qpidexec_PROGRAMS) \ $(qpidtest_PROGRAMS) $(sbin_PROGRAMS) am__RdmaClient_SOURCES_DIST = qpid/sys/rdma/RdmaClient.cpp @RDMA_TRUE@am_RdmaClient_OBJECTS = \ @RDMA_TRUE@ qpid/sys/rdma/RdmaClient-RdmaClient.$(OBJEXT) RdmaClient_OBJECTS = $(am_RdmaClient_OBJECTS) @RDMA_TRUE@RdmaClient_DEPENDENCIES = librdmawrap.la libqpidcommon.la RdmaClient_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(RdmaClient_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__RdmaServer_SOURCES_DIST = qpid/sys/rdma/RdmaServer.cpp @RDMA_TRUE@am_RdmaServer_OBJECTS = qpid/sys/rdma/RdmaServer.$(OBJEXT) RdmaServer_OBJECTS = $(am_RdmaServer_OBJECTS) @RDMA_TRUE@RdmaServer_DEPENDENCIES = librdmawrap.la libqpidcommon.la am__objects_10 = posix/qpidd-QpiddBroker.$(OBJEXT) am_qpidd_OBJECTS = qpidd-qpidd.$(OBJEXT) $(am__objects_10) qpidd_OBJECTS = $(am_qpidd_OBJECTS) qpidd_DEPENDENCIES = libqpidbroker.la libqpidcommon.la qpidd_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(qpidd_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__qpidd_watchdog_SOURCES_DIST = qpid/cluster/qpidd_watchdog.cpp @HAVE_LIBCPG_TRUE@am_qpidd_watchdog_OBJECTS = \ @HAVE_LIBCPG_TRUE@ qpid/cluster/qpidd_watchdog.$(OBJEXT) qpidd_watchdog_OBJECTS = $(am_qpidd_watchdog_OBJECTS) qpidd_watchdog_LDADD = $(LDADD) SCRIPTS = $(qpidexec_SCRIPTS) $(qpidtest_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(acl_la_SOURCES) $(cluster_la_SOURCES) $(ha_la_SOURCES) \ $(libqmf_la_SOURCES) $(libqmf2_la_SOURCES) \ $(libqmfconsole_la_SOURCES) $(libqmfengine_la_SOURCES) \ $(libqpidbroker_la_SOURCES) $(libqpidclient_la_SOURCES) \ $(libqpidcommon_la_SOURCES) $(libqpidmessaging_la_SOURCES) \ $(libqpidtypes_la_SOURCES) $(librdmawrap_la_SOURCES) \ $(libsslcommon_la_SOURCES) $(rdma_la_SOURCES) \ $(rdmaconnector_la_SOURCES) $(replicating_listener_la_SOURCES) \ $(replication_exchange_la_SOURCES) $(ssl_la_SOURCES) \ $(sslconnector_la_SOURCES) $(watchdog_la_SOURCES) \ $(xml_la_SOURCES) $(RdmaClient_SOURCES) $(RdmaServer_SOURCES) \ $(qpidd_SOURCES) $(qpidd_watchdog_SOURCES) DIST_SOURCES = $(acl_la_SOURCES) $(am__cluster_la_SOURCES_DIST) \ $(ha_la_SOURCES) $(libqmf_la_SOURCES) $(libqmf2_la_SOURCES) \ $(libqmfconsole_la_SOURCES) $(libqmfengine_la_SOURCES) \ $(libqpidbroker_la_SOURCES) $(libqpidclient_la_SOURCES) \ $(am__libqpidcommon_la_SOURCES_DIST) \ $(libqpidmessaging_la_SOURCES) $(libqpidtypes_la_SOURCES) \ $(am__librdmawrap_la_SOURCES_DIST) \ $(am__libsslcommon_la_SOURCES_DIST) \ $(am__rdma_la_SOURCES_DIST) \ $(am__rdmaconnector_la_SOURCES_DIST) \ $(replicating_listener_la_SOURCES) \ $(replication_exchange_la_SOURCES) $(am__ssl_la_SOURCES_DIST) \ $(am__sslconnector_la_SOURCES_DIST) \ $(am__watchdog_la_SOURCES_DIST) $(am__xml_la_SOURCES_DIST) \ $(am__RdmaClient_SOURCES_DIST) $(am__RdmaServer_SOURCES_DIST) \ $(qpidd_SOURCES) $(am__qpidd_watchdog_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive DATA = $(pkgconfig_DATA) HEADERS = $(dist_org_apache_qpid_acl_HEADERS) \ $(dist_org_apache_qpid_broker_HEADERS) \ $(dist_org_apache_qpid_cluster_HEADERS) \ $(dist_org_apache_qpid_ha_HEADERS) \ $(dist_qpid_amqp_0_10_HEADERS) $(dist_qpid_broker_HEADERS) \ $(dist_qpid_client_HEADERS) \ $(dist_qpid_client_no_keyword_HEADERS) \ $(dist_qpid_framing_HEADERS) $(nobase_include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = . tests # The Windows-only sources are not compiled using this Makefile, but # are listed here to ensure they're included in releases. They are built # using Visual Studio solutions/projects. windows_dist = \ qpid/client/windows/SaslFactory.cpp \ qpid/client/windows/SslConnector.cpp \ qpid/log/windows/SinkOptions.cpp \ qpid/log/windows/SinkOptions.h \ ../include/qpid/sys/windows/check.h \ qpid/sys/windows/AsynchIO.cpp \ qpid/sys/windows/AsynchIoResult.h \ ../include/qpid/sys/windows/Condition.h \ qpid/sys/windows/FileSysDir.cpp \ ../include/qpid/sys/windows/IntegerTypes.h \ qpid/sys/windows/IocpPoller.cpp \ qpid/sys/windows/IOHandle.cpp \ qpid/sys/windows/IoHandlePrivate.h \ qpid/sys/windows/LockFile.cpp \ qpid/sys/windows/mingw32_compat.h \ qpid/sys/windows/PollableCondition.cpp \ qpid/sys/windows/PipeHandle.cpp \ ../include/qpid/sys/windows/Mutex.h \ qpid/sys/windows/Shlib.cpp \ qpid/sys/windows/SocketAddress.cpp \ qpid/sys/windows/Socket.cpp \ qpid/sys/windows/SslAsynchIO.cpp \ qpid/sys/windows/SslAsynchIO.h \ qpid/sys/windows/StrError.cpp \ qpid/sys/windows/SystemInfo.cpp \ qpid/sys/windows/Thread.cpp \ qpid/sys/windows/Time.cpp \ ../include/qpid/sys/windows/Time.h \ qpid/sys/windows/uuid.cpp \ qpid/sys/windows/uuid.h \ qpid/sys/windows/MemStat.cpp \ windows/QpiddBroker.cpp \ windows/SCM.h \ windows/SCM.cpp \ qpid/broker/windows/BrokerDefaults.cpp \ qpid/broker/windows/SaslAuthenticator.cpp \ qpid/broker/windows/SslProtocolFactory.cpp \ qpid/messaging/HandleInstantiator.cpp \ windows/resources/template-resource.rc \ windows/resources/version-resource.h \ windows/resources/qpid-icon.ico # Distribute all sources. EXTRA_DIST = $(platform_dist) $(rgen_srcs) $(windows_dist) \ qpid/cluster/Quorum_cman.h qpid/cluster/Quorum_cman.cpp \ qpid/cluster/Quorum_null.h CMakeLists.txt cluster.cmake \ config.h.cmake rdma.cmake ssl.cmake managementgen.cmake \ rubygen.cmake versions.cmake $(rgen_amqp_0_10_srcs) \ qpid/amqp_0_10/apply.h qpid/amqp_0_10/built_in_types.h \ qpid/amqp_0_10/complex_types.cpp qpid/amqp_0_10/Array.h \ qpid/amqp_0_10/Array.cpp qpid/amqp_0_10/Body.h \ qpid/amqp_0_10/Command.h qpid/amqp_0_10/CommmandPacker.h \ qpid/amqp_0_10/Control.h qpid/amqp_0_10/Header.h \ qpid/amqp_0_10/Header.cpp qpid/amqp_0_10/FrameHeader.h \ qpid/amqp_0_10/FrameHeader.cpp qpid/amqp_0_10/Holder.h \ qpid/amqp_0_10/Codec.h qpid/amqp_0_10/Packer.h \ qpid/amqp_0_10/Decimal.h qpid/amqp_0_10/SerializableString.h \ qpid/amqp_0_10/Map.h qpid/amqp_0_10/Map.cpp \ qpid/amqp_0_10/Struct.h qpid/amqp_0_10/Struct32.h \ qpid/amqp_0_10/Struct32.cpp qpid/amqp_0_10/Unit.h \ qpid/amqp_0_10/Unit.cpp qpid/amqp_0_10/UnitHandler.h \ qpid/amqp_0_10/UnknownType.h qpid/amqp_0_10/UnknownType.cpp \ qpid/amqp_0_10/UnknownStruct.h \ qpid/amqp_0_10/UnknownStruct.cpp qpid/store # Define variables that are be appended to by this file and included .mk files. # Public header files # Public header files. # NOTE: only public header files (which should be in ../include) # should go in this list. Private headers should go in the SOURCES # list for one of the libraries or executables that includes it. nobase_include_HEADERS = ../include/qpid/sys/posix/Condition.h \ ../include/qpid/sys/posix/IntegerTypes.h \ ../include/qpid/sys/posix/Mutex.h \ ../include/qpid/sys/posix/PrivatePosix.h \ ../include/qpid/sys/posix/Time.h \ ../include/qpid/sys/posix/check.h $(QMF_API) $(QMF_ENGINE_API) \ $(QMF2_API) ../include/qpid/console/Agent.h \ ../include/qpid/console/Broker.h \ ../include/qpid/console/ClassKey.h \ ../include/qpid/console/ConsoleImportExport.h \ ../include/qpid/console/ConsoleListener.h \ ../include/qpid/console/Event.h \ ../include/qpid/console/Object.h \ ../include/qpid/console/ObjectId.h \ ../include/qpid/console/Package.h \ ../include/qpid/console/Schema.h \ ../include/qpid/console/SequenceManager.h \ ../include/qpid/console/SessionManager.h \ ../include/qpid/console/Value.h ../include/qpid/Address.h \ ../include/qpid/CommonImportExport.h \ ../include/qpid/Exception.h ../include/qpid/ImportExport.h \ ../include/qpid/InlineAllocator.h \ ../include/qpid/InlineVector.h ../include/qpid/Msg.h \ ../include/qpid/Options.h ../include/qpid/RangeSet.h \ ../include/qpid/SessionId.h ../include/qpid/Url.h \ ../include/qpid/amqp_0_10/Codecs.h \ ../include/qpid/client/AsyncSession.h \ ../include/qpid/client/ClientImportExport.h \ ../include/qpid/client/Completion.h \ ../include/qpid/client/Connection.h \ ../include/qpid/client/ConnectionSettings.h \ ../include/qpid/client/FailoverListener.h \ ../include/qpid/client/FailoverManager.h \ ../include/qpid/client/FlowControl.h \ ../include/qpid/client/Future.h \ ../include/qpid/client/FutureCompletion.h \ ../include/qpid/client/FutureResult.h \ ../include/qpid/client/Handle.h \ ../include/qpid/client/LocalQueue.h \ ../include/qpid/client/Message.h \ ../include/qpid/client/MessageListener.h \ ../include/qpid/client/MessageReplayTracker.h \ ../include/qpid/client/QueueOptions.h \ ../include/qpid/client/Session.h \ ../include/qpid/client/SessionBase_0_10.h \ ../include/qpid/client/Subscription.h \ ../include/qpid/client/SubscriptionManager.h \ ../include/qpid/client/SubscriptionSettings.h \ ../include/qpid/client/TypedResult.h \ ../include/qpid/framing/Array.h \ ../include/qpid/framing/Buffer.h \ ../include/qpid/framing/FieldTable.h \ ../include/qpid/framing/FieldValue.h \ ../include/qpid/framing/List.h \ ../include/qpid/framing/ProtocolVersion.h \ ../include/qpid/framing/SequenceNumber.h \ ../include/qpid/framing/SequenceSet.h \ ../include/qpid/framing/StructHelper.h \ ../include/qpid/framing/Uuid.h \ ../include/qpid/framing/amqp_types.h \ ../include/qpid/framing/amqp_types_full.h \ ../include/qpid/log/Logger.h ../include/qpid/log/Options.h \ ../include/qpid/log/Selector.h \ ../include/qpid/log/SinkOptions.h \ ../include/qpid/log/Statement.h \ ../include/qpid/management/Args.h \ ../include/qpid/management/Buffer.h \ ../include/qpid/management/ConnectionSettings.h \ ../include/qpid/management/Manageable.h \ ../include/qpid/management/ManagementEvent.h \ ../include/qpid/management/ManagementObject.h \ ../include/qpid/management/Mutex.h \ ../include/qpid/sys/Condition.h \ ../include/qpid/sys/ExceptionHolder.h \ ../include/qpid/sys/IOHandle.h \ ../include/qpid/sys/IntegerTypes.h \ ../include/qpid/sys/Monitor.h ../include/qpid/sys/Mutex.h \ ../include/qpid/sys/Runnable.h ../include/qpid/sys/StrError.h \ ../include/qpid/sys/SystemInfo.h ../include/qpid/sys/Thread.h \ ../include/qpid/sys/Time.h ../include/qpid/messaging/Address.h \ ../include/qpid/messaging/Connection.h \ ../include/qpid/messaging/Duration.h \ ../include/qpid/messaging/exceptions.h \ ../include/qpid/messaging/Handle.h \ ../include/qpid/messaging/ImportExport.h \ ../include/qpid/messaging/Message.h \ ../include/qpid/messaging/Receiver.h \ ../include/qpid/messaging/Sender.h \ ../include/qpid/messaging/Session.h \ ../include/qpid/messaging/FailoverUpdates.h \ ../include/qpid/types/Exception.h ../include/qpid/types/Uuid.h \ ../include/qpid/types/Variant.h \ ../include/qpid/types/ImportExport.h # Posix-specific code libqpidcommon_la_SOURCES = qpid/log/posix/SinkOptions.cpp \ qpid/sys/posix/IOHandle.cpp qpid/sys/posix/Socket.cpp \ qpid/sys/posix/SocketAddress.cpp qpid/sys/posix/AsynchIO.cpp \ qpid/sys/posix/FileSysDir.cpp qpid/sys/posix/LockFile.cpp \ qpid/sys/posix/Time.cpp qpid/sys/posix/Thread.cpp \ qpid/sys/posix/Shlib.cpp qpid/sys/posix/MemStat.cpp \ qpid/sys/posix/Mutex.cpp qpid/sys/posix/Fork.cpp \ qpid/sys/posix/StrError.cpp \ qpid/sys/posix/PollableCondition.cpp qpid/sys/posix/PidFile.h \ qpid/sys/posix/PipeHandle.cpp qpid/log/posix/SinkOptions.h \ qpid/sys/posix/Fork.h $(poller) $(systeminfo) \ $(rgen_framing_srcs) $(platform_src) qpid/Address.cpp \ qpid/DataDir.cpp qpid/DataDir.h qpid/DisableExceptionLogging.h \ qpid/Exception.cpp qpid/Modules.cpp qpid/Modules.h \ qpid/Options.cpp qpid/Plugin.cpp qpid/Plugin.h \ qpid/RefCounted.h qpid/RefCountedBuffer.cpp \ qpid/RefCountedBuffer.h qpid/BufferRef.h qpid/Sasl.h \ qpid/SaslFactory.cpp qpid/SaslFactory.h qpid/Serializer.h \ qpid/SessionId.cpp qpid/SessionState.cpp qpid/SessionState.h \ qpid/SessionState.h qpid/SharedObject.h qpid/StringUtils.cpp \ qpid/StringUtils.h qpid/Url.cpp qpid/UrlArray.cpp \ qpid/UrlArray.h qpid/Version.h qpid/amqp_0_10/Exception.h \ qpid/amqp_0_10/SessionHandler.cpp \ qpid/amqp_0_10/SessionHandler.h qpid/amqp_0_10/apply.h \ qpid/assert.cpp qpid/assert.h qpid/assert.h \ qpid/framing/AMQBody.cpp qpid/framing/AMQBody.h \ qpid/framing/AMQCommandControlBody.h \ qpid/framing/AMQContentBody.cpp qpid/framing/AMQContentBody.h \ qpid/framing/AMQDataBlock.h qpid/framing/AMQFrame.cpp \ qpid/framing/AMQFrame.h qpid/framing/AMQHeaderBody.cpp \ qpid/framing/AMQHeaderBody.h qpid/framing/AMQHeartbeatBody.cpp \ qpid/framing/AMQHeartbeatBody.h qpid/framing/AMQMethodBody.cpp \ qpid/framing/AMQMethodBody.h \ qpid/framing/AMQP_HighestVersion.h \ qpid/framing/AMQP_HighestVersion.h \ qpid/framing/AccumulatedAck.cpp qpid/framing/AccumulatedAck.h \ qpid/framing/Array.cpp qpid/framing/BodyFactory.h \ qpid/framing/BodyHandler.cpp qpid/framing/BodyHandler.h \ qpid/framing/Buffer.cpp qpid/framing/ResizableBuffer.h \ qpid/framing/ChannelHandler.h qpid/framing/Endian.cpp \ qpid/framing/Endian.h qpid/framing/FieldTable.cpp \ qpid/framing/FieldValue.cpp qpid/framing/FrameDecoder.cpp \ qpid/framing/FrameDecoder.h qpid/framing/FrameDefaultVisitor.h \ qpid/framing/FrameHandler.h qpid/framing/FrameSet.cpp \ qpid/framing/FrameSet.h qpid/framing/Handler.h \ qpid/framing/HeaderProperties.h \ qpid/framing/InitiationHandler.h qpid/framing/InputHandler.h \ qpid/framing/Invoker.h qpid/framing/IsInSequenceSet.h \ qpid/framing/List.cpp qpid/framing/MethodBodyFactory.h \ qpid/framing/MethodContent.h qpid/framing/ModelMethod.h \ qpid/framing/OutputHandler.h \ qpid/framing/ProtocolInitiation.cpp \ qpid/framing/ProtocolInitiation.h \ qpid/framing/ProtocolVersion.cpp qpid/framing/Proxy.cpp \ qpid/framing/Proxy.h qpid/framing/SendContent.cpp \ qpid/framing/SendContent.h qpid/framing/SequenceNumber.cpp \ qpid/framing/SequenceNumberSet.cpp \ qpid/framing/SequenceNumberSet.h qpid/framing/SequenceSet.cpp \ qpid/framing/TransferContent.cpp \ qpid/framing/TransferContent.h qpid/framing/TypeFilter.h \ qpid/framing/Uuid.cpp qpid/framing/Visitor.h \ qpid/framing/amqp_framing.h qpid/framing/frame_functors.h \ qpid/framing/variant.h qpid/log/Helpers.h qpid/log/Logger.cpp \ qpid/log/Options.cpp qpid/log/OstreamOutput.cpp \ qpid/log/OstreamOutput.h qpid/log/Selector.cpp \ qpid/log/Statement.cpp qpid/management/Buffer.cpp \ qpid/management/ConnectionSettings.cpp \ qpid/management/Manageable.cpp \ qpid/management/ManagementObject.cpp qpid/management/Mutex.cpp \ qpid/memory.h qpid/pointer_to_other.h qpid/ptr_map.h \ qpid/sys/AggregateOutput.cpp qpid/sys/AggregateOutput.h \ qpid/sys/AsynchIO.h qpid/sys/AsynchIOHandler.cpp \ qpid/sys/AsynchIOHandler.h qpid/sys/AtomicCount.h \ qpid/sys/AtomicValue.h qpid/sys/AtomicValue_gcc.h \ qpid/sys/AtomicValue_mutex.h qpid/sys/BlockingQueue.h \ qpid/sys/ClusterSafe.h qpid/sys/ClusterSafe.cpp \ qpid/sys/Codec.h qpid/sys/ConnectionCodec.h \ qpid/sys/ConnectionInputHandler.h \ qpid/sys/ConnectionInputHandlerFactory.h \ qpid/sys/ConnectionOutputHandler.h \ qpid/sys/ConnectionOutputHandlerPtr.h \ qpid/sys/CopyOnWriteArray.h qpid/sys/DeletionManager.h \ qpid/sys/DispatchHandle.cpp qpid/sys/DispatchHandle.h \ qpid/sys/Dispatcher.cpp qpid/sys/Dispatcher.h \ qpid/sys/FileSysDir.h qpid/sys/Fork.h qpid/sys/LockFile.h \ qpid/sys/LockPtr.h qpid/sys/MemStat.h qpid/sys/OutputControl.h \ qpid/sys/OutputTask.h qpid/sys/PipeHandle.h \ qpid/sys/PollableCondition.h qpid/sys/PollableQueue.h \ qpid/sys/Poller.h qpid/sys/Probes.h qpid/sys/ProtocolFactory.h \ qpid/sys/Runnable.cpp qpid/sys/ScopedIncrement.h \ qpid/sys/SecurityLayer.h qpid/sys/SecuritySettings.h \ qpid/sys/Semaphore.h qpid/sys/Shlib.cpp qpid/sys/Shlib.h \ qpid/sys/ShutdownHandler.h qpid/sys/Socket.h \ qpid/sys/SocketAddress.h qpid/sys/StateMonitor.h \ qpid/sys/TimeoutHandler.h qpid/sys/Timer.cpp qpid/sys/Timer.h \ qpid/sys/TimerWarnings.cpp qpid/sys/TimerWarnings.h \ qpid/sys/Waitable.h qpid/sys/alloca.h qpid/sys/uuid.h \ qpid/sys/unordered_map.h qpid/amqp_0_10/Codecs.cpp \ $(am__append_13) pkgconfig_DATA = qmf2.pc qpid.pc # AMQP_FINAL_XML is defined in ../configure.ac @GENERATE_TRUE@amqp_0_10_xml = @AMQP_FINAL_XML@ @GENERATE_TRUE@specs = $(amqp_0_10_xml) $(top_srcdir)/xml/cluster.xml # Ruby generator. @GENERATE_TRUE@rgen_dir = $(top_srcdir)/rubygen @GENERATE_TRUE@rgen_cmd = ruby -I $(rgen_dir) $(rgen_dir)/generate . ../include $(specs) all # Management generator. @GENERATE_TRUE@mgen_dir = $(top_srcdir)/managementgen @GENERATE_TRUE@mgen_xml = $(top_srcdir)/../specs/management-schema.xml \ @GENERATE_TRUE@ $(srcdir)/qpid/acl/management-schema.xml \ @GENERATE_TRUE@ $(srcdir)/qpid/cluster/management-schema.xml \ @GENERATE_TRUE@ $(srcdir)/qpid/ha/management-schema.xml @GENERATE_TRUE@mgen_cmd = $(mgen_dir)/qmf-gen -m $(srcdir)/managementgen.mk \ @GENERATE_TRUE@ -c $(srcdir)/managementgen.cmake -q -b -o qmf \ @GENERATE_TRUE@ $(mgen_xml) rgen_generator = $(rgen_dir)/framing.0-10/OperationsInvoker.rb \ $(rgen_dir)/framing.0-10/MethodBodyConstVisitor.rb \ $(rgen_dir)/framing.0-10/frame_body_lists.rb \ $(rgen_dir)/framing.0-10/Proxy.rb \ $(rgen_dir)/framing.0-10/structs.rb \ $(rgen_dir)/framing.0-10/constants.rb \ $(rgen_dir)/framing.0-10/Operations.rb \ $(rgen_dir)/framing.0-10/all_method_bodies.rb \ $(rgen_dir)/framing.0-10/MethodBodyFactory.rb \ $(rgen_dir)/framing.0-10/Session.rb \ $(rgen_dir)/framing.0-10/MethodBodyDefaultVisitor.rb \ $(rgen_dir)/amqpgen.rb \ $(rgen_dir)/0-10/handlers.rb \ $(rgen_dir)/0-10/typecode.rb \ $(rgen_dir)/0-10/allsegmenttypes.rb \ $(rgen_dir)/0-10/exceptions.rb \ $(rgen_dir)/0-10/specification.rb \ $(rgen_dir)/cppgen.rb \ $(rgen_dir)/MethodBodyDefaultVisitor.rb \ $(rgen_dir)/generate rgen_amqp_0_10_srcs = ./qpid/amqp_0_10/ApplyCommand.h \ ./qpid/amqp_0_10/handlers.h \ ./qpid/amqp_0_10/structs.h \ ./qpid/amqp_0_10/ApplyStruct.h \ ./qpid/amqp_0_10/ControlVisitor.h \ ./qpid/amqp_0_10/StructHolder.h \ ./qpid/amqp_0_10/CodeForType.h \ ./qpid/amqp_0_10/StructHolder.cpp \ ./qpid/amqp_0_10/ControlHolder.cpp \ ./qpid/amqp_0_10/specification.h \ ./qpid/amqp_0_10/specification.cpp \ ./qpid/amqp_0_10/ControlHolder.h \ ./qpid/amqp_0_10/TypeForCode.cpp \ ./qpid/amqp_0_10/ApplyControl.h \ ./qpid/amqp_0_10/TypeForCode.h \ ./qpid/amqp_0_10/CommandHolder.h \ ./qpid/amqp_0_10/StructVisitor.h \ ./qpid/amqp_0_10/CommandVisitor.h \ ./qpid/amqp_0_10/CodeForType.cpp \ ./qpid/amqp_0_10/specification_fwd.h \ ./qpid/amqp_0_10/CommandHolder.cpp \ ./qpid/amqp_0_10/ProxyTemplate.h \ ./qpid/amqp_0_10/exceptions.h \ ./qpid/amqp_0_10/structs.cpp rgen_framing_srcs = ./qpid/framing/ClusterConnectionTxPublishBody.cpp \ ./qpid/framing/ClusterConnectionTxAcceptBody.cpp \ ../include/qpid/framing/XaResult.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.cpp \ ./qpid/framing/SessionExpectedBody.h \ ./qpid/framing/ExchangeUnbindBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.cpp \ ./qpid/framing/SessionCommandPointBody.h \ ./qpid/framing/QueuePurgeBody.h \ ./qpid/framing/ExchangeQueryResult.cpp \ ../include/qpid/framing/constants.h \ ./qpid/framing/ClusterConnectionTxStartBody.cpp \ ./qpid/framing/ExecutionResultBody.h \ ./qpid/framing/DtxStartBody.cpp \ ./qpid/framing/QueueDeclareBody.h \ ./qpid/framing/FilePublishBody.h \ ./qpid/framing/FileRejectBody.cpp \ ./qpid/framing/ClusterConnectionTxEnqueueBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.h \ ./qpid/framing/MessageResumeBody.h \ ./qpid/framing/ClusterReadyBody.h \ ./qpid/framing/ConnectionSecureOkBody.h \ ./qpid/framing/FileStageBody.h \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.h \ ./qpid/framing/ConnectionOpenOkBody.cpp \ ./qpid/framing/ServerInvoker.h \ ./qpid/framing/FileConsumeOkBody.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.h \ ./qpid/framing/ClusterTimerDropBody.h \ ../include/qpid/framing/MessageResumeResult.h \ ./qpid/framing/SessionAttachedBody.h \ ./qpid/framing/ExchangeBindBody.h \ ./qpid/framing/DtxRecoverBody.h \ ./qpid/framing/ClusterConnectionTxEndBody.cpp \ ./qpid/framing/ClusterTimerDropBody.cpp \ ./qpid/framing/ClusterReadyBody.cpp \ ./qpid/framing/SessionExpectedBody.cpp \ ./qpid/framing/StreamConsumeOkBody.cpp \ ./qpid/framing/MessageReleaseBody.cpp \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.h \ ./qpid/framing/ClusterClockBody.cpp \ ./qpid/framing/FileDeliverBody.h \ ./qpid/framing/FileQosBody.cpp \ ./qpid/framing/MessageTransferBody.cpp \ ./qpid/framing/FileCancelBody.cpp \ ../include/qpid/framing/reply_exceptions.h \ ./qpid/framing/AllInvoker.cpp \ ./qpid/framing/FileDeliverBody.cpp \ ./qpid/framing/Header.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.cpp \ ./qpid/framing/ConnectionSecureBody.cpp \ ./qpid/framing/MessageAcceptBody.cpp \ ./qpid/framing/AMQP_AllOperations.h \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxAckBody.h \ ./qpid/framing/ClusterConnectionAbortBody.h \ ./qpid/framing/SessionConfirmedBody.cpp \ ./qpid/framing/StreamReturnBody.h \ ./qpid/framing/StreamCancelBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.h \ ./qpid/framing/SessionDetachedBody.h \ ./qpid/framing/StreamConsumeOkBody.h \ ./qpid/framing/MessageFlowBody.h \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.h \ ./qpid/framing/SessionCommandPointBody.cpp \ ./qpid/framing/SessionDetachedBody.cpp \ ./qpid/framing/AMQP_ServerOperations.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.cpp \ ./qpid/framing/QueuePurgeBody.cpp \ ./qpid/framing/StreamReturnBody.cpp \ ./qpid/framing/ServerInvoker.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.cpp \ ./qpid/framing/ClusterConnectionQueuePositionBody.cpp \ ./qpid/framing/ClusterDeliverToQueueBody.cpp \ ./qpid/framing/frame_body_lists.h \ ./qpid/framing/StreamQosBody.cpp \ ./qpid/framing/ConnectionStartOkBody.cpp \ ./qpid/framing/StreamCancelBody.h \ ./qpid/framing/ClusterConnectionDtxStartBody.cpp \ ../include/qpid/framing/ReplyTo.h \ ./qpid/framing/DtxEndBody.h \ ./qpid/framing/ClusterTimerWakeupBody.cpp \ ./qpid/framing/XaResult.cpp \ ./qpid/framing/DtxRecoverBody.cpp \ ./qpid/framing/DtxSetTimeoutBody.h \ ../include/qpid/framing/QueueQueryResult.h \ ./qpid/framing/ConnectionOpenBody.h \ ./qpid/framing/StreamDeliverBody.h \ ./qpid/framing/FileRejectBody.h \ ./qpid/framing/ClusterConnectionClockBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.h \ ./qpid/framing/DtxCommitBody.cpp \ ./qpid/framing/FileProperties.cpp \ ./qpid/framing/MessageSubscribeBody.h \ ./qpid/framing/ExecutionExceptionBody.h \ ./qpid/framing/ConnectionStartOkBody.h \ ./qpid/framing/FileQosOkBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.cpp \ ./qpid/framing/MessageResumeBody.cpp \ ./qpid/framing/ExchangeQueryBody.h \ ./qpid/framing/FileCancelBody.h \ ./qpid/framing/TxSelectBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.h \ ./qpid/framing/ClusterConnectionDeliverCloseBody.cpp \ ./qpid/framing/ClusterErrorCheckBody.h \ ./qpid/framing/DtxStartBody.h \ ./qpid/framing/TxSelectBody.cpp \ ./qpid/framing/FileReturnBody.cpp \ ./qpid/framing/MessageRejectBody.cpp \ ./qpid/framing/AMQP_AllProxy.h \ ./qpid/framing/MessageProperties.cpp \ ./qpid/framing/MessageFlushBody.h \ ./qpid/framing/DtxRollbackBody.h \ ./qpid/framing/ClientInvoker.cpp \ ./qpid/framing/MessageResumeResult.cpp \ ./qpid/framing/ClusterRetractOfferBody.h \ ../include/qpid/framing/MessageAcquireResult.h \ ./qpid/framing/ClusterConnectionDtxStartBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.cpp \ ./qpid/framing/MessageFlushBody.cpp \ ./qpid/framing/ConnectionStartBody.cpp \ ./qpid/framing/ExecutionExceptionBody.cpp \ ./qpid/framing/StreamQosOkBody.h \ ./qpid/framing/ExchangeDeleteBody.h \ ../include/qpid/framing/amqp_structs.h \ ./qpid/framing/FragmentProperties.cpp \ ./qpid/framing/MessageSetFlowModeBody.cpp \ ./qpid/framing/SessionTimeoutBody.h \ ./qpid/framing/ConnectionSecureOkBody.cpp \ ./qpid/framing/StreamConsumeBody.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.cpp \ ./qpid/framing/ConnectionHeartbeatBody.cpp \ ./qpid/framing/StreamConsumeBody.cpp \ ./qpid/framing/ClusterConnectionConfigBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.cpp \ ./qpid/framing/ClusterShutdownBody.h \ ./qpid/framing/ConnectionRedirectBody.h \ ./qpid/framing/MessageCancelBody.h \ ./qpid/framing/ConnectionStartBody.h \ ./qpid/framing/StreamProperties.cpp \ ./qpid/framing/FileAckBody.cpp \ ./qpid/framing/MethodBodyFactory.cpp \ ./qpid/framing/ClusterErrorCheckBody.cpp \ ./qpid/framing/ExchangeBindBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.h \ ./qpid/framing/TypeCode.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.cpp \ ./qpid/framing/ClusterTimerWakeupBody.h \ ./qpid/framing/MessageSubscribeBody.cpp \ ./qpid/framing/StreamQosOkBody.cpp \ ./qpid/framing/DeliveryProperties.cpp \ ./qpid/framing/QueueQueryResult.cpp \ ./qpid/framing/MessageAcquireBody.cpp \ ./qpid/framing/SessionAttachBody.h \ ./qpid/framing/MessageAcceptBody.h \ ./qpid/framing/DtxSelectBody.h \ ./qpid/framing/ExchangeQueryBody.cpp \ ./qpid/framing/ConnectionTuneBody.h \ ./qpid/framing/StreamPublishBody.cpp \ ./qpid/framing/ReplyTo.cpp \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.cpp \ ./qpid/framing/StreamDeliverBody.cpp \ ./qpid/framing/DtxGetTimeoutResult.cpp \ ./qpid/framing/MessageAcquireResult.cpp \ ./qpid/framing/DtxCommitBody.h \ ./qpid/framing/ClusterConnectionTxEnqueueBody.cpp \ ./qpid/framing/ClusterConnectionTxDequeueBody.cpp \ ./qpid/framing/ClusterConnectionDeliverCloseBody.h \ ./qpid/framing/ConnectionTuneOkBody.h \ ./qpid/framing/DtxGetTimeoutBody.cpp \ ./qpid/framing/ClusterRetractOfferBody.cpp \ ./qpid/framing/ExchangeBoundResult.cpp \ ./qpid/framing/ExchangeBoundBody.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h \ ./qpid/framing/ClusterConnectionAbortBody.cpp \ ./qpid/framing/SessionFlushBody.cpp \ ./qpid/framing/ConnectionOpenOkBody.h \ ./qpid/framing/all_method_bodies.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h \ ../include/qpid/framing/FragmentProperties.h \ ./qpid/framing/ClusterConnectionRetractOfferBody.h \ ./qpid/framing/ClusterConnectionTxAcceptBody.h \ ./qpid/framing/SessionAttachedBody.cpp \ ./qpid/framing/ExchangeBoundBody.h \ ./qpid/framing/QueueQueryBody.h \ ./qpid/framing/ExecutionResultBody.cpp \ ../include/qpid/framing/MessageProperties.h \ ../include/qpid/framing/Xid.h \ ./qpid/framing/SessionTimeoutBody.cpp \ ../include/qpid/framing/DtxGetTimeoutResult.h \ ./qpid/framing/DtxPrepareBody.h \ ./qpid/framing/SessionCompletedBody.h \ ./qpid/framing/FileReturnBody.h \ ./qpid/framing/MessageStopBody.h \ ./qpid/framing/ClusterUpdateRequestBody.cpp \ ./qpid/framing/DtxEndBody.cpp \ ./qpid/framing/DtxForgetBody.h \ ./qpid/framing/FileOpenOkBody.h \ ./qpid/framing/ClusterConnectionExchangeBody.h \ ./qpid/framing/ConnectionCloseOkBody.h \ ./qpid/framing/SessionKnownCompletedBody.h \ ./qpid/framing/DtxSelectBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.cpp \ ./qpid/framing/MessageStopBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.cpp \ ../include/qpid/framing/DeliveryProperties.h \ ./qpid/framing/AMQP_ServerProxy.h \ ./qpid/framing/ConnectionSecureBody.h \ ./qpid/framing/FileConsumeOkBody.cpp \ ./qpid/framing/StreamQosBody.h \ ./qpid/framing/DtxGetTimeoutBody.h \ ./qpid/framing/ClusterConnectionConfigBody.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.h \ ./qpid/framing/ClusterConnectionShadowPrepareBody.cpp \ ./qpid/framing/QueueQueryBody.cpp \ ./qpid/framing/AMQP_ServerProxy.cpp \ ./qpid/framing/MessageFlowBody.cpp \ ./qpid/framing/FileConsumeBody.h \ ./qpid/framing/SessionConfirmedBody.h \ ./qpid/framing/ClusterConnectionTxDequeueBody.h \ ./qpid/framing/SessionRequestTimeoutBody.cpp \ ./qpid/framing/SessionGapBody.h \ ../include/qpid/framing/ExchangeBoundResult.h \ ./qpid/framing/DtxRecoverResult.cpp \ ./qpid/framing/DtxPrepareBody.cpp \ ./qpid/framing/FilePublishBody.cpp \ ./qpid/framing/MessageTransferBody.h \ ./qpid/framing/ConnectionHeartbeatBody.h \ ./qpid/framing/MessageReleaseBody.h \ ./qpid/framing/ConnectionCloseOkBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.h \ ./qpid/framing/AMQP_AllProxy.cpp \ ./qpid/framing/FileAckBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h \ ./qpid/framing/MessageRejectBody.h \ ./qpid/framing/ExchangeUnbindBody.h \ ./qpid/framing/FileOpenOkBody.cpp \ ./qpid/framing/ExecutionSyncBody.h \ ./qpid/framing/ClientInvoker.h \ ./qpid/framing/AllInvoker.h \ ./qpid/framing/FileOpenBody.h \ ./qpid/framing/SessionDetachBody.h \ ./qpid/framing/ExchangeDeclareBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.cpp \ ../include/qpid/framing/FileProperties.h \ ./qpid/framing/FileStageBody.cpp \ ./qpid/framing/ClusterConnectionTxEndBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.cpp \ ./qpid/framing/ClusterConfigChangeBody.h \ ./qpid/framing/Xid.cpp \ ./qpid/framing/FileConsumeBody.cpp \ ./qpid/framing/SessionKnownCompletedBody.cpp \ ./qpid/framing/ConnectionRedirectBody.cpp \ ./qpid/framing/ConnectionTuneOkBody.cpp \ ./qpid/framing/ClusterConnectionMembershipBody.h \ ./qpid/framing/ClusterConnectionMembershipBody.cpp \ ./qpid/framing/ClusterConnectionShadowPrepareBody.h \ ./qpid/framing/FileQosOkBody.cpp \ ./qpid/framing/TxRollbackBody.cpp \ ./qpid/framing/ConnectionTuneBody.cpp \ ./qpid/framing/ExecutionSyncBody.cpp \ ./qpid/framing/ClusterConnectionRetractOfferBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.cpp \ ./qpid/framing/SessionAttachBody.cpp \ ./qpid/framing/ConnectionCloseBody.cpp \ ./qpid/framing/SessionGapBody.cpp \ ./qpid/framing/ClusterConnectionClockBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.h \ ../include/qpid/framing/DtxRecoverResult.h \ ./qpid/framing/MessageSetFlowModeBody.h \ ./qpid/framing/TxRollbackBody.h \ ../include/qpid/framing/TypeCode.h \ ./qpid/framing/ClusterConnectionTxPublishBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.h \ ./qpid/framing/ClusterConfigChangeBody.cpp \ ./qpid/framing/MessageAcquireBody.h \ ./qpid/framing/FileQosBody.h \ ./qpid/framing/ClusterDeliverToQueueBody.h \ ../include/qpid/framing/ExchangeQueryResult.h \ ./qpid/framing/ClusterUpdateRequestBody.h \ ./qpid/framing/MethodBodyConstVisitor.h \ ./qpid/framing/ClusterConnectionExchangeBody.cpp \ ./qpid/framing/ClusterConnectionTxStartBody.h \ ./qpid/framing/ExchangeDeclareBody.h \ ./qpid/framing/DtxForgetBody.cpp \ ./qpid/framing/TxCommitBody.h \ ./qpid/framing/ExchangeDeleteBody.cpp \ ./qpid/framing/DtxRollbackBody.cpp \ ./qpid/framing/ConnectionOpenBody.cpp \ ./qpid/framing/SessionRequestTimeoutBody.h \ ./qpid/framing/reply_exceptions.cpp \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h \ ./qpid/framing/ClusterConnectionQueuePositionBody.h \ ./qpid/framing/TxCommitBody.cpp \ ./qpid/framing/SessionFlushBody.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.cpp \ ./qpid/framing/AMQP_ClientProxy.cpp \ ./qpid/framing/QueueDeclareBody.cpp \ ../include/qpid/framing/Header.h \ ./qpid/framing/SessionCompletedBody.cpp \ ./qpid/framing/ConnectionCloseBody.h \ ./qpid/framing/AMQP_ClientOperations.h \ ../include/qpid/framing/enum.h \ ./qpid/framing/ClusterConnectionDtxAckBody.cpp \ ./qpid/framing/ClusterShutdownBody.cpp \ ../include/qpid/framing/StreamProperties.h \ ./qpid/framing/FileOpenBody.cpp \ ./qpid/framing/MessageCancelBody.cpp \ ./qpid/framing/SessionDetachBody.cpp \ ./qpid/framing/QueueDeleteBody.h \ ./qpid/framing/DtxSetTimeoutBody.cpp \ ./qpid/framing/ClusterClockBody.h \ ./qpid/framing/AMQP_ClientProxy.h \ ./qpid/framing/QueueDeleteBody.cpp \ ./qpid/framing/StreamPublishBody.h rgen_client_srcs = ../include/qpid/client/arg.h \ ./qpid/client/no_keyword/AsyncSession_0_10.cpp \ ../include/qpid/client/AsyncSession_0_10.h \ ../include/qpid/client/Session_0_10.h \ ../include/qpid/client/no_keyword/AsyncSession_0_10.h \ ./qpid/client/no_keyword/Session_0_10.cpp \ ../include/qpid/client/no_keyword/Session_0_10.h rgen_srcs = ./qpid/amqp_0_10/ApplyCommand.h \ ./qpid/amqp_0_10/handlers.h \ ./qpid/framing/ClusterConnectionTxPublishBody.cpp \ ./qpid/framing/ClusterConnectionTxAcceptBody.cpp \ ../include/qpid/framing/XaResult.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.cpp \ ./qpid/framing/SessionExpectedBody.h \ ./qpid/framing/ExchangeUnbindBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.cpp \ ./qpid/framing/SessionCommandPointBody.h \ ./qpid/framing/QueuePurgeBody.h \ ./qpid/framing/ExchangeQueryResult.cpp \ ../include/qpid/framing/constants.h \ ./qpid/framing/ClusterConnectionTxStartBody.cpp \ ./qpid/framing/ExecutionResultBody.h \ ./qpid/framing/DtxStartBody.cpp \ ./qpid/framing/QueueDeclareBody.h \ ./qpid/framing/FilePublishBody.h \ ./qpid/framing/FileRejectBody.cpp \ ./qpid/amqp_0_10/structs.h \ ./qpid/framing/ClusterConnectionTxEnqueueBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.h \ ./qpid/framing/MessageResumeBody.h \ ./qpid/amqp_0_10/ApplyStruct.h \ ./qpid/framing/ClusterReadyBody.h \ ./qpid/framing/ConnectionSecureOkBody.h \ ./qpid/framing/FileStageBody.h \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.h \ ./qpid/framing/ConnectionOpenOkBody.cpp \ ./qpid/framing/ServerInvoker.h \ ./qpid/framing/FileConsumeOkBody.h \ ./tests/allSegmentTypes.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.h \ ./qpid/framing/ClusterTimerDropBody.h \ ../include/qpid/framing/MessageResumeResult.h \ ./qpid/framing/SessionAttachedBody.h \ ./qpid/framing/ExchangeBindBody.h \ ./qpid/framing/DtxRecoverBody.h \ ./qpid/amqp_0_10/ControlVisitor.h \ ./qpid/framing/ClusterConnectionTxEndBody.cpp \ ./qpid/framing/ClusterTimerDropBody.cpp \ ./qpid/framing/ClusterReadyBody.cpp \ ./qpid/framing/SessionExpectedBody.cpp \ ./qpid/framing/StreamConsumeOkBody.cpp \ ./qpid/framing/MessageReleaseBody.cpp \ ./qpid/amqp_0_10/StructHolder.h \ ../include/qpid/client/arg.h \ ./qpid/client/no_keyword/AsyncSession_0_10.cpp \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.h \ ./qpid/framing/ClusterClockBody.cpp \ ./qpid/framing/FileDeliverBody.h \ ./qpid/framing/FileQosBody.cpp \ ./qpid/framing/MessageTransferBody.cpp \ ./qpid/framing/FileCancelBody.cpp \ ../include/qpid/framing/reply_exceptions.h \ ./qpid/framing/AllInvoker.cpp \ ./qpid/framing/FileDeliverBody.cpp \ ./qpid/framing/Header.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.cpp \ ./qpid/framing/ConnectionSecureBody.cpp \ ./qpid/framing/MessageAcceptBody.cpp \ ./qpid/framing/AMQP_AllOperations.h \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxAckBody.h \ ./qpid/framing/ClusterConnectionAbortBody.h \ ./qpid/framing/SessionConfirmedBody.cpp \ ./qpid/framing/StreamReturnBody.h \ ./qpid/framing/StreamCancelBody.cpp \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.h \ ./qpid/framing/SessionDetachedBody.h \ ./qpid/framing/StreamConsumeOkBody.h \ ./qpid/framing/MessageFlowBody.h \ ../include/qpid/client/AsyncSession_0_10.h \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.h \ ./qpid/framing/SessionCommandPointBody.cpp \ ./qpid/framing/SessionDetachedBody.cpp \ ./qpid/framing/AMQP_ServerOperations.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.cpp \ ./qpid/framing/QueuePurgeBody.cpp \ ./qpid/framing/StreamReturnBody.cpp \ ./qpid/framing/ServerInvoker.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.cpp \ ./qpid/framing/ClusterConnectionQueuePositionBody.cpp \ ./qpid/framing/ClusterDeliverToQueueBody.cpp \ ./qpid/framing/frame_body_lists.h \ ./qpid/framing/StreamQosBody.cpp \ ./qpid/framing/ConnectionStartOkBody.cpp \ ./qpid/framing/StreamCancelBody.h \ ./qpid/framing/ClusterConnectionDtxStartBody.cpp \ ../include/qpid/framing/ReplyTo.h \ ./qpid/framing/DtxEndBody.h \ ./qpid/amqp_0_10/CodeForType.h \ ./qpid/framing/ClusterTimerWakeupBody.cpp \ ./qpid/framing/XaResult.cpp \ ./qpid/framing/DtxRecoverBody.cpp \ ./qpid/framing/DtxSetTimeoutBody.h \ ../include/qpid/framing/QueueQueryResult.h \ ./qpid/framing/ConnectionOpenBody.h \ ./qpid/framing/StreamDeliverBody.h \ ./qpid/framing/FileRejectBody.h \ ./qpid/framing/ClusterConnectionClockBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.h \ ./qpid/framing/DtxCommitBody.cpp \ ./qpid/framing/FileProperties.cpp \ ./qpid/framing/MessageSubscribeBody.h \ ./qpid/framing/ExecutionExceptionBody.h \ ./qpid/framing/ConnectionStartOkBody.h \ ./qpid/framing/FileQosOkBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.cpp \ ./qpid/framing/MessageResumeBody.cpp \ ./qpid/framing/ExchangeQueryBody.h \ ./qpid/framing/FileCancelBody.h \ ./qpid/framing/TxSelectBody.h \ ./qpid/amqp_0_10/StructHolder.cpp \ ./qpid/framing/MethodBodyDefaultVisitor.h \ ./qpid/framing/ClusterConnectionDeliverCloseBody.cpp \ ./qpid/framing/ClusterErrorCheckBody.h \ ./qpid/framing/DtxStartBody.h \ ./qpid/framing/TxSelectBody.cpp \ ./qpid/framing/FileReturnBody.cpp \ ./qpid/framing/MessageRejectBody.cpp \ ./qpid/framing/AMQP_AllProxy.h \ ./qpid/framing/MessageProperties.cpp \ ./qpid/framing/MessageFlushBody.h \ ./qpid/framing/DtxRollbackBody.h \ ./qpid/framing/ClientInvoker.cpp \ ./qpid/framing/MessageResumeResult.cpp \ ./qpid/framing/ClusterRetractOfferBody.h \ ../include/qpid/framing/MessageAcquireResult.h \ ./qpid/amqp_0_10/ControlHolder.cpp \ ../include/qpid/client/Session_0_10.h \ ./qpid/framing/ClusterConnectionDtxStartBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.cpp \ ./qpid/framing/MessageFlushBody.cpp \ ./qpid/framing/ConnectionStartBody.cpp \ ./qpid/framing/ExecutionExceptionBody.cpp \ ./qpid/framing/StreamQosOkBody.h \ ./qpid/framing/ExchangeDeleteBody.h \ ../include/qpid/framing/amqp_structs.h \ ./qpid/framing/FragmentProperties.cpp \ ./qpid/framing/MessageSetFlowModeBody.cpp \ ./qpid/framing/SessionTimeoutBody.h \ ./qpid/framing/ConnectionSecureOkBody.cpp \ ./qpid/framing/StreamConsumeBody.h \ ./qpid/amqp_0_10/specification.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.cpp \ ./qpid/framing/ConnectionHeartbeatBody.cpp \ ./qpid/framing/StreamConsumeBody.cpp \ ./qpid/amqp_0_10/specification.cpp \ ./qpid/framing/ClusterConnectionConfigBody.h \ ./qpid/amqp_0_10/ControlHolder.h \ ./qpid/amqp_0_10/TypeForCode.cpp \ ./qpid/framing/ClusterConnectionShadowSetUserBody.cpp \ ./qpid/framing/ClusterShutdownBody.h \ ./qpid/framing/ConnectionRedirectBody.h \ ./qpid/framing/MessageCancelBody.h \ ./qpid/framing/ConnectionStartBody.h \ ./qpid/framing/StreamProperties.cpp \ ./qpid/framing/FileAckBody.cpp \ ./qpid/framing/MethodBodyFactory.cpp \ ./qpid/framing/ClusterErrorCheckBody.cpp \ ./qpid/framing/ExchangeBindBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.h \ ./qpid/amqp_0_10/ApplyControl.h \ ./qpid/amqp_0_10/TypeForCode.h \ ./qpid/framing/TypeCode.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.cpp \ ./qpid/framing/ClusterTimerWakeupBody.h \ ./qpid/framing/MessageSubscribeBody.cpp \ ./qpid/framing/StreamQosOkBody.cpp \ ./qpid/framing/DeliveryProperties.cpp \ ./qpid/framing/QueueQueryResult.cpp \ ./qpid/framing/MessageAcquireBody.cpp \ ./qpid/framing/SessionAttachBody.h \ ./qpid/framing/MessageAcceptBody.h \ ./qpid/framing/DtxSelectBody.h \ ./qpid/framing/ExchangeQueryBody.cpp \ ./qpid/framing/ConnectionTuneBody.h \ ./qpid/framing/StreamPublishBody.cpp \ ./qpid/framing/ReplyTo.cpp \ ../include/qpid/client/no_keyword/AsyncSession_0_10.h \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.cpp \ ./qpid/framing/StreamDeliverBody.cpp \ ./qpid/framing/DtxGetTimeoutResult.cpp \ ./qpid/framing/MessageAcquireResult.cpp \ ./qpid/framing/DtxCommitBody.h \ ./qpid/framing/ClusterConnectionTxEnqueueBody.cpp \ ./qpid/framing/ClusterConnectionTxDequeueBody.cpp \ ./qpid/framing/ClusterConnectionDeliverCloseBody.h \ ./qpid/framing/ConnectionTuneOkBody.h \ ./qpid/framing/DtxGetTimeoutBody.cpp \ ./qpid/framing/ClusterRetractOfferBody.cpp \ ./qpid/framing/ExchangeBoundResult.cpp \ ./qpid/framing/ExchangeBoundBody.cpp \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h \ ./qpid/framing/ClusterConnectionAbortBody.cpp \ ./qpid/framing/SessionFlushBody.cpp \ ./qpid/framing/ConnectionOpenOkBody.h \ ./qpid/framing/all_method_bodies.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h \ ../include/qpid/framing/FragmentProperties.h \ ./qpid/framing/ClusterConnectionRetractOfferBody.h \ ./qpid/framing/ClusterConnectionTxAcceptBody.h \ ./qpid/framing/SessionAttachedBody.cpp \ ./qpid/framing/ExchangeBoundBody.h \ ./qpid/framing/QueueQueryBody.h \ ./qpid/framing/ExecutionResultBody.cpp \ ./qpid/amqp_0_10/CommandHolder.h \ ../include/qpid/framing/MessageProperties.h \ ../include/qpid/framing/Xid.h \ ./qpid/framing/SessionTimeoutBody.cpp \ ../include/qpid/framing/DtxGetTimeoutResult.h \ ./qpid/framing/DtxPrepareBody.h \ ./qpid/framing/SessionCompletedBody.h \ ./qpid/framing/FileReturnBody.h \ ./qpid/framing/MessageStopBody.h \ ./qpid/framing/ClusterUpdateRequestBody.cpp \ ./qpid/framing/DtxEndBody.cpp \ ./qpid/framing/DtxForgetBody.h \ ./qpid/framing/FileOpenOkBody.h \ ./qpid/framing/ClusterConnectionExchangeBody.h \ ./qpid/framing/ConnectionCloseOkBody.h \ ./qpid/framing/SessionKnownCompletedBody.h \ ./qpid/framing/DtxSelectBody.cpp \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.cpp \ ./qpid/framing/MessageStopBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.cpp \ ../include/qpid/framing/DeliveryProperties.h \ ./qpid/framing/AMQP_ServerProxy.h \ ./qpid/framing/ConnectionSecureBody.h \ ./qpid/framing/FileConsumeOkBody.cpp \ ./qpid/framing/StreamQosBody.h \ ./qpid/framing/DtxGetTimeoutBody.h \ ./qpid/framing/ClusterConnectionConfigBody.cpp \ ./qpid/framing/ClusterConnectionDtxEndBody.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.h \ ./qpid/framing/ClusterConnectionShadowPrepareBody.cpp \ ./qpid/framing/QueueQueryBody.cpp \ ./qpid/framing/AMQP_ServerProxy.cpp \ ./qpid/framing/MessageFlowBody.cpp \ ./qpid/framing/FileConsumeBody.h \ ./qpid/framing/SessionConfirmedBody.h \ ./qpid/framing/ClusterConnectionTxDequeueBody.h \ ./qpid/framing/SessionRequestTimeoutBody.cpp \ ./qpid/framing/SessionGapBody.h \ ../include/qpid/framing/ExchangeBoundResult.h \ ./qpid/framing/DtxRecoverResult.cpp \ ./qpid/framing/DtxPrepareBody.cpp \ ./qpid/framing/FilePublishBody.cpp \ ./qpid/framing/MessageTransferBody.h \ ./qpid/framing/ConnectionHeartbeatBody.h \ ./qpid/framing/MessageReleaseBody.h \ ./qpid/framing/ConnectionCloseOkBody.cpp \ ./qpid/framing/ClusterInitialStatusBody.h \ ./qpid/framing/AMQP_AllProxy.cpp \ ./qpid/framing/FileAckBody.h \ ./qpid/amqp_0_10/StructVisitor.h \ ./qpid/amqp_0_10/CommandVisitor.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.cpp \ ./qpid/framing/ClusterConnectionSessionStateBody.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h \ ./qpid/framing/MessageRejectBody.h \ ./qpid/framing/ExchangeUnbindBody.h \ ./qpid/framing/FileOpenOkBody.cpp \ ./qpid/framing/ExecutionSyncBody.h \ ./qpid/framing/ClientInvoker.h \ ./qpid/amqp_0_10/CodeForType.cpp \ ./qpid/framing/AllInvoker.h \ ./qpid/framing/FileOpenBody.h \ ./qpid/framing/SessionDetachBody.h \ ./qpid/framing/ExchangeDeclareBody.cpp \ ./qpid/framing/ClusterUpdateOfferBody.cpp \ ../include/qpid/framing/FileProperties.h \ ./qpid/framing/FileStageBody.cpp \ ./qpid/amqp_0_10/specification_fwd.h \ ./qpid/framing/ClusterConnectionTxEndBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.cpp \ ./qpid/framing/ClusterConfigChangeBody.h \ ./qpid/framing/Xid.cpp \ ./qpid/framing/FileConsumeBody.cpp \ ./qpid/framing/SessionKnownCompletedBody.cpp \ ./qpid/framing/ConnectionRedirectBody.cpp \ ./qpid/framing/ConnectionTuneOkBody.cpp \ ./qpid/client/no_keyword/Session_0_10.cpp \ ./qpid/framing/ClusterConnectionMembershipBody.h \ ../include/qpid/client/no_keyword/Session_0_10.h \ ./qpid/framing/ClusterConnectionMembershipBody.cpp \ ./qpid/framing/ClusterConnectionShadowPrepareBody.h \ ./qpid/framing/FileQosOkBody.cpp \ ./qpid/framing/TxRollbackBody.cpp \ ./qpid/framing/ConnectionTuneBody.cpp \ ./qpid/framing/ExecutionSyncBody.cpp \ ./qpid/amqp_0_10/CommandHolder.cpp \ ./qpid/framing/ClusterConnectionRetractOfferBody.cpp \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.cpp \ ./qpid/framing/SessionAttachBody.cpp \ ./qpid/framing/ConnectionCloseBody.cpp \ ./qpid/framing/SessionGapBody.cpp \ ./qpid/framing/ClusterConnectionClockBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.h \ ../include/qpid/framing/DtxRecoverResult.h \ ./qpid/framing/MessageSetFlowModeBody.h \ ./qpid/framing/TxRollbackBody.h \ ./qpid/amqp_0_10/ProxyTemplate.h \ ../include/qpid/framing/TypeCode.h \ ./qpid/framing/ClusterConnectionTxPublishBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.h \ ./qpid/framing/ClusterConfigChangeBody.cpp \ ./qpid/framing/MessageAcquireBody.h \ ./qpid/framing/FileQosBody.h \ ./qpid/framing/ClusterDeliverToQueueBody.h \ ../include/qpid/framing/ExchangeQueryResult.h \ ./qpid/framing/ClusterUpdateRequestBody.h \ ./qpid/framing/MethodBodyConstVisitor.h \ ./qpid/framing/ClusterConnectionExchangeBody.cpp \ ./qpid/framing/ClusterConnectionTxStartBody.h \ ./qpid/framing/ExchangeDeclareBody.h \ ./qpid/framing/DtxForgetBody.cpp \ ./qpid/framing/TxCommitBody.h \ ./qpid/framing/ExchangeDeleteBody.cpp \ ./qpid/framing/DtxRollbackBody.cpp \ ./qpid/framing/ConnectionOpenBody.cpp \ ./qpid/framing/SessionRequestTimeoutBody.h \ ./qpid/framing/reply_exceptions.cpp \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h \ ./qpid/framing/ClusterConnectionQueuePositionBody.h \ ./qpid/framing/TxCommitBody.cpp \ ./qpid/framing/SessionFlushBody.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.cpp \ ./qpid/framing/AMQP_ClientProxy.cpp \ ./qpid/framing/QueueDeclareBody.cpp \ ../include/qpid/framing/Header.h \ ./qpid/framing/SessionCompletedBody.cpp \ ./qpid/framing/ConnectionCloseBody.h \ ./qpid/framing/AMQP_ClientOperations.h \ ../include/qpid/framing/enum.h \ ./qpid/framing/ClusterConnectionDtxAckBody.cpp \ ./qpid/framing/ClusterShutdownBody.cpp \ ../include/qpid/framing/StreamProperties.h \ ./qpid/framing/FileOpenBody.cpp \ ./qpid/framing/MessageCancelBody.cpp \ ./qpid/framing/SessionDetachBody.cpp \ ./qpid/framing/QueueDeleteBody.h \ ./qpid/framing/DtxSetTimeoutBody.cpp \ ./qpid/amqp_0_10/exceptions.h \ ./qpid/framing/ClusterClockBody.h \ ./qpid/framing/AMQP_ClientProxy.h \ ./qpid/framing/QueueDeleteBody.cpp \ ./qpid/amqp_0_10/structs.cpp \ ./qpid/framing/StreamPublishBody.h # Header file install rules. qpid_amqp_0_10dir = $(includedir)/qpid/amqp_0_10 dist_qpid_amqp_0_10_HEADERS = ./qpid/amqp_0_10/ApplyCommand.h \ ./qpid/amqp_0_10/handlers.h \ ./qpid/amqp_0_10/structs.h \ ./qpid/amqp_0_10/ApplyStruct.h \ ./qpid/amqp_0_10/ControlVisitor.h \ ./qpid/amqp_0_10/StructHolder.h \ ./qpid/amqp_0_10/CodeForType.h \ ./qpid/amqp_0_10/specification.h \ ./qpid/amqp_0_10/ControlHolder.h \ ./qpid/amqp_0_10/ApplyControl.h \ ./qpid/amqp_0_10/TypeForCode.h \ ./qpid/amqp_0_10/CommandHolder.h \ ./qpid/amqp_0_10/StructVisitor.h \ ./qpid/amqp_0_10/CommandVisitor.h \ ./qpid/amqp_0_10/specification_fwd.h \ ./qpid/amqp_0_10/ProxyTemplate.h \ ./qpid/amqp_0_10/exceptions.h qpid_framingdir = $(includedir)/qpid/framing dist_qpid_framing_HEADERS = ../include/qpid/framing/XaResult.h \ ./qpid/framing/SessionExpectedBody.h \ ./qpid/framing/SessionCommandPointBody.h \ ./qpid/framing/QueuePurgeBody.h \ ../include/qpid/framing/constants.h \ ./qpid/framing/ExecutionResultBody.h \ ./qpid/framing/QueueDeclareBody.h \ ./qpid/framing/FilePublishBody.h \ ./qpid/framing/ClusterConnectionTxEnqueueBody.h \ ./qpid/framing/ClusterConnectionConsumerStateBody.h \ ./qpid/framing/MessageResumeBody.h \ ./qpid/framing/ClusterReadyBody.h \ ./qpid/framing/ConnectionSecureOkBody.h \ ./qpid/framing/FileStageBody.h \ ./qpid/framing/ClusterConnectionAddQueueListenerBody.h \ ./qpid/framing/ServerInvoker.h \ ./qpid/framing/FileConsumeOkBody.h \ ./qpid/framing/ClusterConnectionOutputTaskBody.h \ ./qpid/framing/ClusterTimerDropBody.h \ ../include/qpid/framing/MessageResumeResult.h \ ./qpid/framing/SessionAttachedBody.h \ ./qpid/framing/ExchangeBindBody.h \ ./qpid/framing/DtxRecoverBody.h \ ./qpid/framing/ClusterConnectionQueueObserverStateBody.h \ ./qpid/framing/FileDeliverBody.h \ ../include/qpid/framing/reply_exceptions.h \ ./qpid/framing/AMQP_AllOperations.h \ ./qpid/framing/ClusterConnectionDtxAckBody.h \ ./qpid/framing/ClusterConnectionAbortBody.h \ ./qpid/framing/StreamReturnBody.h \ ./qpid/framing/ClusterConnectionDeliveryRecordBody.h \ ./qpid/framing/ClusterConnectionAnnounceBody.h \ ./qpid/framing/SessionDetachedBody.h \ ./qpid/framing/StreamConsumeOkBody.h \ ./qpid/framing/MessageFlowBody.h \ ./qpid/framing/ClusterConnectionDtxBufferRefBody.h \ ./qpid/framing/AMQP_ServerOperations.h \ ./qpid/framing/frame_body_lists.h \ ./qpid/framing/StreamCancelBody.h \ ../include/qpid/framing/ReplyTo.h \ ./qpid/framing/DtxEndBody.h \ ./qpid/framing/DtxSetTimeoutBody.h \ ../include/qpid/framing/QueueQueryResult.h \ ./qpid/framing/ConnectionOpenBody.h \ ./qpid/framing/StreamDeliverBody.h \ ./qpid/framing/FileRejectBody.h \ ./qpid/framing/ClusterConnectionManagementSetupStateBody.h \ ./qpid/framing/MessageSubscribeBody.h \ ./qpid/framing/ExecutionExceptionBody.h \ ./qpid/framing/ConnectionStartOkBody.h \ ./qpid/framing/FileQosOkBody.h \ ./qpid/framing/ExchangeQueryBody.h \ ./qpid/framing/FileCancelBody.h \ ./qpid/framing/TxSelectBody.h \ ./qpid/framing/MethodBodyDefaultVisitor.h \ ./qpid/framing/ClusterErrorCheckBody.h \ ./qpid/framing/DtxStartBody.h \ ./qpid/framing/AMQP_AllProxy.h \ ./qpid/framing/MessageFlushBody.h \ ./qpid/framing/DtxRollbackBody.h \ ./qpid/framing/ClusterRetractOfferBody.h \ ../include/qpid/framing/MessageAcquireResult.h \ ./qpid/framing/ClusterConnectionDtxStartBody.h \ ./qpid/framing/StreamQosOkBody.h \ ./qpid/framing/ExchangeDeleteBody.h \ ../include/qpid/framing/amqp_structs.h \ ./qpid/framing/SessionTimeoutBody.h \ ./qpid/framing/StreamConsumeBody.h \ ./qpid/framing/ClusterConnectionConfigBody.h \ ./qpid/framing/ClusterShutdownBody.h \ ./qpid/framing/ConnectionRedirectBody.h \ ./qpid/framing/MessageCancelBody.h \ ./qpid/framing/ConnectionStartBody.h \ ./qpid/framing/ClusterUpdateOfferBody.h \ ./qpid/framing/ClusterTimerWakeupBody.h \ ./qpid/framing/SessionAttachBody.h \ ./qpid/framing/MessageAcceptBody.h \ ./qpid/framing/DtxSelectBody.h \ ./qpid/framing/ConnectionTuneBody.h \ ./qpid/framing/DtxCommitBody.h \ ./qpid/framing/ClusterConnectionDeliverCloseBody.h \ ./qpid/framing/ConnectionTuneOkBody.h \ ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h \ ./qpid/framing/ConnectionOpenOkBody.h \ ./qpid/framing/all_method_bodies.h \ ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h \ ../include/qpid/framing/FragmentProperties.h \ ./qpid/framing/ClusterConnectionRetractOfferBody.h \ ./qpid/framing/ClusterConnectionTxAcceptBody.h \ ./qpid/framing/ExchangeBoundBody.h \ ./qpid/framing/QueueQueryBody.h \ ../include/qpid/framing/MessageProperties.h \ ../include/qpid/framing/Xid.h \ ../include/qpid/framing/DtxGetTimeoutResult.h \ ./qpid/framing/DtxPrepareBody.h \ ./qpid/framing/SessionCompletedBody.h \ ./qpid/framing/FileReturnBody.h \ ./qpid/framing/MessageStopBody.h \ ./qpid/framing/DtxForgetBody.h \ ./qpid/framing/FileOpenOkBody.h \ ./qpid/framing/ClusterConnectionExchangeBody.h \ ./qpid/framing/ConnectionCloseOkBody.h \ ./qpid/framing/SessionKnownCompletedBody.h \ ../include/qpid/framing/DeliveryProperties.h \ ./qpid/framing/AMQP_ServerProxy.h \ ./qpid/framing/ConnectionSecureBody.h \ ./qpid/framing/StreamQosBody.h \ ./qpid/framing/DtxGetTimeoutBody.h \ ./qpid/framing/ClusterConnectionDtxEndBody.h \ ./qpid/framing/ClusterConnectionAccumulatedAckBody.h \ ./qpid/framing/FileConsumeBody.h \ ./qpid/framing/SessionConfirmedBody.h \ ./qpid/framing/ClusterConnectionTxDequeueBody.h \ ./qpid/framing/SessionGapBody.h \ ../include/qpid/framing/ExchangeBoundResult.h \ ./qpid/framing/MessageTransferBody.h \ ./qpid/framing/ConnectionHeartbeatBody.h \ ./qpid/framing/MessageReleaseBody.h \ ./qpid/framing/ClusterInitialStatusBody.h \ ./qpid/framing/FileAckBody.h \ ./qpid/framing/ClusterConnectionSessionStateBody.h \ ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h \ ./qpid/framing/MessageRejectBody.h \ ./qpid/framing/ExchangeUnbindBody.h \ ./qpid/framing/ExecutionSyncBody.h \ ./qpid/framing/ClientInvoker.h \ ./qpid/framing/AllInvoker.h \ ./qpid/framing/FileOpenBody.h \ ./qpid/framing/SessionDetachBody.h \ ../include/qpid/framing/FileProperties.h \ ./qpid/framing/ClusterConnectionTxEndBody.h \ ./qpid/framing/ClusterConfigChangeBody.h \ ./qpid/framing/ClusterConnectionMembershipBody.h \ ./qpid/framing/ClusterConnectionShadowPrepareBody.h \ ./qpid/framing/ClusterConnectionClockBody.h \ ./qpid/framing/ClusterConnectionShadowReadyBody.h \ ../include/qpid/framing/DtxRecoverResult.h \ ./qpid/framing/MessageSetFlowModeBody.h \ ./qpid/framing/TxRollbackBody.h \ ../include/qpid/framing/TypeCode.h \ ./qpid/framing/ClusterConnectionTxPublishBody.h \ ./qpid/framing/ClusterConnectionShadowSetUserBody.h \ ./qpid/framing/MessageAcquireBody.h \ ./qpid/framing/FileQosBody.h \ ./qpid/framing/ClusterDeliverToQueueBody.h \ ../include/qpid/framing/ExchangeQueryResult.h \ ./qpid/framing/ClusterUpdateRequestBody.h \ ./qpid/framing/MethodBodyConstVisitor.h \ ./qpid/framing/ClusterConnectionTxStartBody.h \ ./qpid/framing/ExchangeDeclareBody.h \ ./qpid/framing/TxCommitBody.h \ ./qpid/framing/SessionRequestTimeoutBody.h \ ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h \ ./qpid/framing/ClusterConnectionQueuePositionBody.h \ ./qpid/framing/SessionFlushBody.h \ ../include/qpid/framing/Header.h \ ./qpid/framing/ConnectionCloseBody.h \ ./qpid/framing/AMQP_ClientOperations.h \ ../include/qpid/framing/enum.h \ ../include/qpid/framing/StreamProperties.h \ ./qpid/framing/QueueDeleteBody.h \ ./qpid/framing/ClusterClockBody.h \ ./qpid/framing/AMQP_ClientProxy.h \ ./qpid/framing/StreamPublishBody.h qpid_client_no_keyworddir = $(includedir)/qpid/client/no_keyword dist_qpid_client_no_keyword_HEADERS = ../include/qpid/client/no_keyword/AsyncSession_0_10.h \ ../include/qpid/client/no_keyword/Session_0_10.h qpid_clientdir = $(includedir)/qpid/client dist_qpid_client_HEADERS = ../include/qpid/client/arg.h \ ../include/qpid/client/AsyncSession_0_10.h \ ../include/qpid/client/Session_0_10.h qpid_brokerdir = $(includedir)/qpid/broker dist_qpid_broker_HEADERS = mgen_generator = $(mgen_dir)/qmf-gen \ $(mgen_dir)/qmfgen/generate.py \ $(mgen_dir)/qmfgen/schema.py \ $(mgen_dir)/qmfgen/management-types.xml \ $(top_srcdir)/../specs/management-schema.xml \ $(mgen_dir)/qmfgen/templates/Class.h \ $(mgen_dir)/qmfgen/templates/Class.cpp \ $(mgen_dir)/qmfgen/templates/Args.h \ $(mgen_dir)/qmfgen/templates/Event.h \ $(mgen_dir)/qmfgen/templates/Event.cpp \ $(mgen_dir)/qmfgen/templates/Package.h \ $(mgen_dir)/qmfgen/templates/Package.cpp \ $(mgen_dir)/qmfgen/templates/Class.h \ $(mgen_dir)/qmfgen/templates/Class.cpp \ $(mgen_dir)/qmfgen/templates/Args.h \ $(mgen_dir)/qmfgen/templates/Event.h \ $(mgen_dir)/qmfgen/templates/Event.cpp \ $(mgen_dir)/qmfgen/templates/Package.h \ $(mgen_dir)/qmfgen/templates/Package.cpp \ $(mgen_dir)/qmfgen/templates/Class.h \ $(mgen_dir)/qmfgen/templates/Class.cpp \ $(mgen_dir)/qmfgen/templates/Args.h \ $(mgen_dir)/qmfgen/templates/Event.h \ $(mgen_dir)/qmfgen/templates/Event.cpp \ $(mgen_dir)/qmfgen/templates/Package.h \ $(mgen_dir)/qmfgen/templates/Package.cpp \ $(mgen_dir)/qmfgen/templates/Class.h \ $(mgen_dir)/qmfgen/templates/Class.cpp \ $(mgen_dir)/qmfgen/templates/Args.h \ $(mgen_dir)/qmfgen/templates/Event.h \ $(mgen_dir)/qmfgen/templates/Event.cpp \ $(mgen_dir)/qmfgen/templates/Package.h \ $(mgen_dir)/qmfgen/templates/Package.cpp \ $(mgen_dir)/qmfgen/templates/Makefile.mk mgen_broker_cpp = qmf/org/apache/qpid/broker/System.cpp \ qmf/org/apache/qpid/broker/Memory.cpp \ qmf/org/apache/qpid/broker/Broker.cpp \ qmf/org/apache/qpid/broker/Agent.cpp \ qmf/org/apache/qpid/broker/Vhost.cpp \ qmf/org/apache/qpid/broker/Queue.cpp \ qmf/org/apache/qpid/broker/Exchange.cpp \ qmf/org/apache/qpid/broker/Binding.cpp \ qmf/org/apache/qpid/broker/Subscription.cpp \ qmf/org/apache/qpid/broker/Connection.cpp \ qmf/org/apache/qpid/broker/Link.cpp \ qmf/org/apache/qpid/broker/Bridge.cpp \ qmf/org/apache/qpid/broker/Session.cpp \ qmf/org/apache/qpid/broker/ManagementSetupState.cpp \ qmf/org/apache/qpid/broker/EventClientConnect.cpp \ qmf/org/apache/qpid/broker/EventClientConnectFail.cpp \ qmf/org/apache/qpid/broker/EventClientDisconnect.cpp \ qmf/org/apache/qpid/broker/EventBrokerLinkUp.cpp \ qmf/org/apache/qpid/broker/EventBrokerLinkDown.cpp \ qmf/org/apache/qpid/broker/EventQueueDeclare.cpp \ qmf/org/apache/qpid/broker/EventQueueDelete.cpp \ qmf/org/apache/qpid/broker/EventExchangeDeclare.cpp \ qmf/org/apache/qpid/broker/EventExchangeDelete.cpp \ qmf/org/apache/qpid/broker/EventBind.cpp \ qmf/org/apache/qpid/broker/EventUnbind.cpp \ qmf/org/apache/qpid/broker/EventSubscribe.cpp \ qmf/org/apache/qpid/broker/EventUnsubscribe.cpp \ qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.cpp \ qmf/org/apache/qpid/broker/Package.cpp \ qmf/org/apache/qpid/acl/Acl.cpp \ qmf/org/apache/qpid/acl/EventAllow.cpp \ qmf/org/apache/qpid/acl/EventDeny.cpp \ qmf/org/apache/qpid/acl/EventFileLoaded.cpp \ qmf/org/apache/qpid/acl/EventFileLoadFailed.cpp \ qmf/org/apache/qpid/acl/Package.cpp \ qmf/org/apache/qpid/cluster/Cluster.cpp \ qmf/org/apache/qpid/cluster/Package.cpp \ qmf/org/apache/qpid/ha/HaBroker.cpp \ qmf/org/apache/qpid/ha/Package.cpp # Header file install rules. org_apache_qpid_brokerdir = $(includedir)/qmf/org/apache/qpid/broker dist_org_apache_qpid_broker_HEADERS = qmf/org/apache/qpid/broker/System.h \ qmf/org/apache/qpid/broker/Memory.h \ qmf/org/apache/qpid/broker/Broker.h \ qmf/org/apache/qpid/broker/Agent.h \ qmf/org/apache/qpid/broker/Vhost.h \ qmf/org/apache/qpid/broker/Queue.h \ qmf/org/apache/qpid/broker/Exchange.h \ qmf/org/apache/qpid/broker/Binding.h \ qmf/org/apache/qpid/broker/Subscription.h \ qmf/org/apache/qpid/broker/Connection.h \ qmf/org/apache/qpid/broker/Link.h \ qmf/org/apache/qpid/broker/Bridge.h \ qmf/org/apache/qpid/broker/Session.h \ qmf/org/apache/qpid/broker/ManagementSetupState.h \ qmf/org/apache/qpid/broker/ArgsBrokerEcho.h \ qmf/org/apache/qpid/broker/ArgsBrokerConnect.h \ qmf/org/apache/qpid/broker/ArgsBrokerQueueMoveMessages.h \ qmf/org/apache/qpid/broker/ArgsBrokerSetLogLevel.h \ qmf/org/apache/qpid/broker/ArgsBrokerGetLogLevel.h \ qmf/org/apache/qpid/broker/ArgsBrokerGetTimestampConfig.h \ qmf/org/apache/qpid/broker/ArgsBrokerSetTimestampConfig.h \ qmf/org/apache/qpid/broker/ArgsBrokerCreate.h \ qmf/org/apache/qpid/broker/ArgsBrokerDelete.h \ qmf/org/apache/qpid/broker/ArgsBrokerQuery.h \ qmf/org/apache/qpid/broker/ArgsQueuePurge.h \ qmf/org/apache/qpid/broker/ArgsQueueReroute.h \ qmf/org/apache/qpid/broker/ArgsLinkBridge.h \ qmf/org/apache/qpid/broker/EventClientConnect.h \ qmf/org/apache/qpid/broker/EventClientConnectFail.h \ qmf/org/apache/qpid/broker/EventClientDisconnect.h \ qmf/org/apache/qpid/broker/EventBrokerLinkUp.h \ qmf/org/apache/qpid/broker/EventBrokerLinkDown.h \ qmf/org/apache/qpid/broker/EventQueueDeclare.h \ qmf/org/apache/qpid/broker/EventQueueDelete.h \ qmf/org/apache/qpid/broker/EventExchangeDeclare.h \ qmf/org/apache/qpid/broker/EventExchangeDelete.h \ qmf/org/apache/qpid/broker/EventBind.h \ qmf/org/apache/qpid/broker/EventUnbind.h \ qmf/org/apache/qpid/broker/EventSubscribe.h \ qmf/org/apache/qpid/broker/EventUnsubscribe.h \ qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.h \ qmf/org/apache/qpid/broker/Package.h org_apache_qpid_acldir = $(includedir)/qmf/org/apache/qpid/acl dist_org_apache_qpid_acl_HEADERS = qmf/org/apache/qpid/acl/Acl.h \ qmf/org/apache/qpid/acl/EventAllow.h \ qmf/org/apache/qpid/acl/EventDeny.h \ qmf/org/apache/qpid/acl/EventFileLoaded.h \ qmf/org/apache/qpid/acl/EventFileLoadFailed.h \ qmf/org/apache/qpid/acl/Package.h org_apache_qpid_clusterdir = $(includedir)/qmf/org/apache/qpid/cluster dist_org_apache_qpid_cluster_HEADERS = qmf/org/apache/qpid/cluster/Cluster.h \ qmf/org/apache/qpid/cluster/ArgsClusterStopClusterNode.h \ qmf/org/apache/qpid/cluster/Package.h org_apache_qpid_hadir = $(includedir)/qmf/org/apache/qpid/ha dist_org_apache_qpid_ha_HEADERS = qmf/org/apache/qpid/ha/HaBroker.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetBrokers.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetPublicBrokers.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetExpectedBackups.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerReplicate.h \ qmf/org/apache/qpid/ha/Package.h qmfgen_sources = qmf/org/apache/qpid/broker/System.h \ qmf/org/apache/qpid/broker/Memory.h \ qmf/org/apache/qpid/broker/Broker.h \ qmf/org/apache/qpid/broker/Agent.h \ qmf/org/apache/qpid/broker/Vhost.h \ qmf/org/apache/qpid/broker/Queue.h \ qmf/org/apache/qpid/broker/Exchange.h \ qmf/org/apache/qpid/broker/Binding.h \ qmf/org/apache/qpid/broker/Subscription.h \ qmf/org/apache/qpid/broker/Connection.h \ qmf/org/apache/qpid/broker/Link.h \ qmf/org/apache/qpid/broker/Bridge.h \ qmf/org/apache/qpid/broker/Session.h \ qmf/org/apache/qpid/broker/ManagementSetupState.h \ qmf/org/apache/qpid/broker/ArgsBrokerEcho.h \ qmf/org/apache/qpid/broker/ArgsBrokerConnect.h \ qmf/org/apache/qpid/broker/ArgsBrokerQueueMoveMessages.h \ qmf/org/apache/qpid/broker/ArgsBrokerSetLogLevel.h \ qmf/org/apache/qpid/broker/ArgsBrokerGetLogLevel.h \ qmf/org/apache/qpid/broker/ArgsBrokerGetTimestampConfig.h \ qmf/org/apache/qpid/broker/ArgsBrokerSetTimestampConfig.h \ qmf/org/apache/qpid/broker/ArgsBrokerCreate.h \ qmf/org/apache/qpid/broker/ArgsBrokerDelete.h \ qmf/org/apache/qpid/broker/ArgsBrokerQuery.h \ qmf/org/apache/qpid/broker/ArgsQueuePurge.h \ qmf/org/apache/qpid/broker/ArgsQueueReroute.h \ qmf/org/apache/qpid/broker/ArgsLinkBridge.h \ qmf/org/apache/qpid/broker/EventClientConnect.h \ qmf/org/apache/qpid/broker/EventClientConnectFail.h \ qmf/org/apache/qpid/broker/EventClientDisconnect.h \ qmf/org/apache/qpid/broker/EventBrokerLinkUp.h \ qmf/org/apache/qpid/broker/EventBrokerLinkDown.h \ qmf/org/apache/qpid/broker/EventQueueDeclare.h \ qmf/org/apache/qpid/broker/EventQueueDelete.h \ qmf/org/apache/qpid/broker/EventExchangeDeclare.h \ qmf/org/apache/qpid/broker/EventExchangeDelete.h \ qmf/org/apache/qpid/broker/EventBind.h \ qmf/org/apache/qpid/broker/EventUnbind.h \ qmf/org/apache/qpid/broker/EventSubscribe.h \ qmf/org/apache/qpid/broker/EventUnsubscribe.h \ qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.h \ qmf/org/apache/qpid/broker/Package.h \ qmf/org/apache/qpid/acl/Acl.h \ qmf/org/apache/qpid/acl/EventAllow.h \ qmf/org/apache/qpid/acl/EventDeny.h \ qmf/org/apache/qpid/acl/EventFileLoaded.h \ qmf/org/apache/qpid/acl/EventFileLoadFailed.h \ qmf/org/apache/qpid/acl/Package.h \ qmf/org/apache/qpid/cluster/Cluster.h \ qmf/org/apache/qpid/cluster/ArgsClusterStopClusterNode.h \ qmf/org/apache/qpid/cluster/Package.h \ qmf/org/apache/qpid/ha/HaBroker.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetBrokers.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetPublicBrokers.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetExpectedBackups.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerReplicate.h \ qmf/org/apache/qpid/ha/Package.h \ qmf/org/apache/qpid/broker/System.cpp \ qmf/org/apache/qpid/broker/Memory.cpp \ qmf/org/apache/qpid/broker/Broker.cpp \ qmf/org/apache/qpid/broker/Agent.cpp \ qmf/org/apache/qpid/broker/Vhost.cpp \ qmf/org/apache/qpid/broker/Queue.cpp \ qmf/org/apache/qpid/broker/Exchange.cpp \ qmf/org/apache/qpid/broker/Binding.cpp \ qmf/org/apache/qpid/broker/Subscription.cpp \ qmf/org/apache/qpid/broker/Connection.cpp \ qmf/org/apache/qpid/broker/Link.cpp \ qmf/org/apache/qpid/broker/Bridge.cpp \ qmf/org/apache/qpid/broker/Session.cpp \ qmf/org/apache/qpid/broker/ManagementSetupState.cpp \ qmf/org/apache/qpid/broker/EventClientConnect.cpp \ qmf/org/apache/qpid/broker/EventClientConnectFail.cpp \ qmf/org/apache/qpid/broker/EventClientDisconnect.cpp \ qmf/org/apache/qpid/broker/EventBrokerLinkUp.cpp \ qmf/org/apache/qpid/broker/EventBrokerLinkDown.cpp \ qmf/org/apache/qpid/broker/EventQueueDeclare.cpp \ qmf/org/apache/qpid/broker/EventQueueDelete.cpp \ qmf/org/apache/qpid/broker/EventExchangeDeclare.cpp \ qmf/org/apache/qpid/broker/EventExchangeDelete.cpp \ qmf/org/apache/qpid/broker/EventBind.cpp \ qmf/org/apache/qpid/broker/EventUnbind.cpp \ qmf/org/apache/qpid/broker/EventSubscribe.cpp \ qmf/org/apache/qpid/broker/EventUnsubscribe.cpp \ qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.cpp \ qmf/org/apache/qpid/broker/Package.cpp \ qmf/org/apache/qpid/acl/Acl.cpp \ qmf/org/apache/qpid/acl/EventAllow.cpp \ qmf/org/apache/qpid/acl/EventDeny.cpp \ qmf/org/apache/qpid/acl/EventFileLoaded.cpp \ qmf/org/apache/qpid/acl/EventFileLoadFailed.cpp \ qmf/org/apache/qpid/acl/Package.cpp \ qmf/org/apache/qpid/cluster/Cluster.cpp \ qmf/org/apache/qpid/cluster/Package.cpp \ qmf/org/apache/qpid/ha/HaBroker.cpp \ qmf/org/apache/qpid/ha/Package.cpp AM_CXXFLAGS = $(WARNING_CFLAGS) -DQPID_LIBEXEC_DIR=\"$(qpidexecdir)\" \ -DBOOST_FILESYSTEM_VERSION=2 INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(srcdir) -I=$(builddir) # # Destination for intalled programs and tests defined here # qpidexecdir = $(libexecdir)/qpid qpidexec_SCRIPTS = qpidtestdir = $(qpidexecdir)/tests qpidtest_SCRIPTS = tmoduleexecdir = $(libdir)/qpid/tests tmoduleexec_LTLIBRARIES = qpidd_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDD_MODULE_DIR=\"$(dmoduleexecdir)\" -DQPIDD_CONF_FILE=\"$(sysconfdir)/qpidd.conf\" libqpidclient_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_MODULE_DIR=\"$(cmoduleexecdir)\" -DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\" qpidd_LDADD = \ libqpidbroker.la \ libqpidcommon.la posix_qpidd_src = posix/QpiddBroker.cpp qpidd_SOURCES = qpidd.cpp qpidd.h $(posix_qpidd_src) @USE_ECF_TRUE@poller = qpid/sys/solaris/ECFPoller.cpp @USE_EPOLL_TRUE@poller = qpid/sys/epoll/EpollPoller.cpp @USE_POLL_TRUE@poller = qpid/sys/posix/PosixPoller.cpp @SUNOS_FALSE@systeminfo = qpid/sys/posix/SystemInfo.cpp @SUNOS_TRUE@systeminfo = qpid/sys/solaris/SystemInfo.cpp posix_broker_src = \ qpid/broker/posix/BrokerDefaults.cpp # # qmf library makefile fragment, to be included in Makefile.am # # # qmf console library makefile fragment, to be included in Makefile.am # lib_LTLIBRARIES = libqpidtypes.la libqpidcommon.la libqpidbroker.la \ libqpidclient.la libqpidmessaging.la libqmf.la libqmfengine.la \ libqmf2.la libqmfconsole.la $(am__append_7) $(am__append_10) # Definitions for client and daemon plugins PLUGINLDFLAGS = -no-undefined -module -avoid-version confdir = $(sysconfdir)/qpid dmoduleexecdir = $(libdir)/qpid/daemon cmoduleexecdir = $(libdir)/qpid/client # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # acl library makefile fragment, to be included in Makefile.am # dmoduleexec_LTLIBRARIES = $(am__append_1) ha.la acl.la $(am__append_4) \ replicating_listener.la replication_exchange.la \ $(am__append_8) $(am__append_11) cmoduleexec_LTLIBRARIES = $(am__append_9) $(am__append_12) @HAVE_LIBCMAN_FALSE@CMAN_SOURCES = qpid/cluster/Quorum_null.h @HAVE_LIBCMAN_TRUE@CMAN_SOURCES = qpid/cluster/Quorum_cman.h qpid/cluster/Quorum_cman.cpp @HAVE_LIBCMAN_TRUE@libcman = -lcman @HAVE_LIBCPG_TRUE@cluster_la_SOURCES = \ @HAVE_LIBCPG_TRUE@ $(CMAN_SOURCES) \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Cluster.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Cluster.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ClusterTimer.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ClusterTimer.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Decoder.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Decoder.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/PollableQueue.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ClusterMap.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ClusterMap.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ClusterPlugin.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ClusterSettings.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Connection.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Connection.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ConnectionCodec.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ConnectionCodec.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Cpg.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Cpg.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/CredentialsExchange.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/CredentialsExchange.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Dispatchable.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/UpdateClient.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/UpdateClient.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/RetractClient.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/RetractClient.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ErrorCheck.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ErrorCheck.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Event.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Event.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/EventFrame.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/EventFrame.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ExpiryPolicy.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ExpiryPolicy.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/FailoverExchange.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/FailoverExchange.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/UpdateExchange.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/UpdateExchange.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/UpdateReceiver.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/LockedConnectionMap.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Multicaster.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Multicaster.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/McastFrameHandler.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/NoOpConnectionOutputHandler.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Numbering.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/OutputInterceptor.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/OutputInterceptor.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/PollerDispatch.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/PollerDispatch.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/ProxyInputHandler.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/Quorum.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/InitialStatusMap.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/InitialStatusMap.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/MemberSet.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/MemberSet.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/types.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/SecureConnectionFactory.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/SecureConnectionFactory.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/StoreStatus.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/StoreStatus.cpp \ @HAVE_LIBCPG_TRUE@ qpid/cluster/UpdateDataExchange.h \ @HAVE_LIBCPG_TRUE@ qpid/cluster/UpdateDataExchange.cpp @HAVE_LIBCPG_TRUE@cluster_la_LIBADD = -lcpg $(libcman) libqpidbroker.la libqpidclient.la @HAVE_LIBCPG_TRUE@cluster_la_CXXFLAGS = $(AM_CXXFLAGS) -fno-strict-aliasing @HAVE_LIBCPG_TRUE@cluster_la_LDFLAGS = $(PLUGINLDFLAGS) @HAVE_LIBCPG_TRUE@watchdog_la_SOURCES = qpid/cluster/WatchDogPlugin.cpp @HAVE_LIBCPG_TRUE@watchdog_la_LIBADD = libqpidbroker.la @HAVE_LIBCPG_TRUE@watchdog_la_LDFLAGS = $(PLUGINLDFLAGS) @HAVE_LIBCPG_TRUE@qpidd_watchdog_SOURCES = qpid/cluster/qpidd_watchdog.cpp ha_la_SOURCES = \ qpid/ha/Backup.cpp \ qpid/ha/Backup.h \ qpid/ha/HaBroker.cpp \ qpid/ha/HaBroker.h \ qpid/ha/HaPlugin.cpp \ qpid/ha/Settings.h \ qpid/ha/QueueReplicator.h \ qpid/ha/QueueReplicator.cpp \ qpid/ha/ReplicatingSubscription.h \ qpid/ha/ReplicatingSubscription.cpp \ qpid/ha/BrokerReplicator.cpp \ qpid/ha/BrokerReplicator.h \ qpid/ha/ConnectionExcluder.cpp \ qpid/ha/ConnectionExcluder.h ha_la_LIBADD = libqpidbroker.la ha_la_LDFLAGS = $(PLUGINLDFLAGS) acl_la_SOURCES = \ qpid/acl/Acl.cpp \ qpid/acl/Acl.h \ qpid/acl/AclData.cpp \ qpid/acl/AclData.h \ qpid/acl/AclPlugin.cpp \ qpid/acl/AclReader.cpp \ qpid/acl/AclReader.h \ qpid/acl/AclValidator.cpp \ qpid/acl/AclValidator.h acl_la_LIBADD = libqpidbroker.la $(am__append_3) acl_la_LDFLAGS = $(PLUGINLDFLAGS) # # Public headers for the QMF API # QMF_API = \ ../include/qpid/agent/ManagementAgent.h \ ../include/qpid/agent/QmfAgentImportExport.h # # Public headers for the QMF2 API # QMF2_API = \ ../include/qmf/AgentEvent.h \ ../include/qmf/Agent.h \ ../include/qmf/AgentSession.h \ ../include/qmf/ConsoleEvent.h \ ../include/qmf/ConsoleSession.h \ ../include/qmf/DataAddr.h \ ../include/qmf/Data.h \ ../include/qmf/posix/EventNotifier.h \ ../include/qmf/exceptions.h \ ../include/qmf/Handle.h \ ../include/qmf/ImportExport.h \ ../include/qmf/Query.h \ ../include/qmf/Schema.h \ ../include/qmf/SchemaId.h \ ../include/qmf/SchemaMethod.h \ ../include/qmf/SchemaProperty.h \ ../include/qmf/SchemaTypes.h \ ../include/qmf/Subscription.h # # Public headers for the QMF Engine API # QMF_ENGINE_API = \ ../include/qmf/engine/Agent.h \ ../include/qmf/engine/ConnectionSettings.h \ ../include/qmf/engine/Console.h \ ../include/qmf/engine/Event.h \ ../include/qmf/engine/Message.h \ ../include/qmf/engine/Object.h \ ../include/qmf/engine/ObjectId.h \ ../include/qmf/engine/QmfEngineImportExport.h \ ../include/qmf/engine/Query.h \ ../include/qmf/engine/ResilientConnection.h \ ../include/qmf/engine/Schema.h \ ../include/qmf/engine/Typecode.h \ ../include/qmf/engine/Value.h libqmf_la_SOURCES = \ $(QMF_API) \ qpid/agent/ManagementAgentImpl.cpp \ qpid/agent/ManagementAgentImpl.h libqmf2_la_SOURCES = \ $(QMF2_API) \ qmf/agentCapability.h \ qmf/Agent.cpp \ qmf/AgentEvent.cpp \ qmf/AgentEventImpl.h \ qmf/AgentImpl.h \ qmf/AgentSession.cpp \ qmf/AgentSessionImpl.h \ qmf/AgentSubscription.cpp \ qmf/AgentSubscription.h \ qmf/BrokerImportExport.h \ qmf/ConsoleEvent.cpp \ qmf/ConsoleEventImpl.h \ qmf/ConsoleSession.cpp \ qmf/ConsoleSessionImpl.h \ qmf/constants.cpp \ qmf/constants.h \ qmf/DataAddr.cpp \ qmf/DataAddrImpl.h \ qmf/Data.cpp \ qmf/DataImpl.h \ qmf/EventNotifierImpl.cpp \ qmf/EventNotifierImpl.h \ qmf/exceptions.cpp \ qmf/Expression.cpp \ qmf/Expression.h \ qmf/Hash.cpp \ qmf/Hash.h \ qmf/PosixEventNotifier.cpp \ qmf/PosixEventNotifierImpl.cpp \ qmf/PosixEventNotifierImpl.h \ qmf/PrivateImplRef.h \ qmf/Query.cpp \ qmf/QueryImpl.h \ qmf/SchemaCache.cpp \ qmf/SchemaCache.h \ qmf/Schema.cpp \ qmf/SchemaId.cpp \ qmf/SchemaIdImpl.h \ qmf/SchemaImpl.h \ qmf/SchemaMethod.cpp \ qmf/SchemaMethodImpl.h \ qmf/SchemaProperty.cpp \ qmf/SchemaPropertyImpl.h \ qmf/Subscription.cpp \ qmf/SubscriptionImpl.h libqmfengine_la_SOURCES = \ $(QMF_ENGINE_API) \ qmf/engine/Agent.cpp \ qmf/engine/BrokerProxyImpl.cpp \ qmf/engine/BrokerProxyImpl.h \ qmf/engine/ConnectionSettingsImpl.cpp \ qmf/engine/ConnectionSettingsImpl.h \ qmf/engine/ConsoleImpl.cpp \ qmf/engine/ConsoleImpl.h \ qmf/engine/EventImpl.cpp \ qmf/engine/EventImpl.h \ qmf/engine/MessageImpl.cpp \ qmf/engine/MessageImpl.h \ qmf/engine/ObjectIdImpl.cpp \ qmf/engine/ObjectIdImpl.h \ qmf/engine/ObjectImpl.cpp \ qmf/engine/ObjectImpl.h \ qmf/engine/Protocol.cpp \ qmf/engine/Protocol.h \ qmf/engine/QueryImpl.cpp \ qmf/engine/QueryImpl.h \ qmf/engine/ResilientConnection.cpp \ qmf/engine/SequenceManager.cpp \ qmf/engine/SequenceManager.h \ qmf/engine/SchemaImpl.cpp \ qmf/engine/SchemaImpl.h \ qmf/engine/ValueImpl.cpp \ qmf/engine/ValueImpl.h libqmf_la_LIBADD = libqmfengine.la libqmf2_la_LIBADD = libqpidmessaging.la libqpidtypes.la libqmfengine_la_LIBADD = libqpidclient.la QMF_VERSION_INFO = 1:0:0 QMF2_VERSION_INFO = 1:0:0 QMFENGINE_VERSION_INFO = 1:1:0 libqmf_la_LDFLAGS = -version-info $(QMF_VERSION_INFO) libqmf2_la_LDFLAGS = -version-info $(QMF2_VERSION_INFO) libqmfengine_la_LDFLAGS = -version-info $(QMFENGINE_VERSION_INFO) libqmfconsole_la_SOURCES = \ qpid/console/Agent.cpp \ qpid/console/Broker.cpp \ qpid/console/ClassKey.cpp \ qpid/console/Event.cpp \ qpid/console/Object.cpp \ qpid/console/ObjectId.cpp \ qpid/console/Package.cpp \ qpid/console/Schema.cpp \ qpid/console/SequenceManager.cpp \ qpid/console/SessionManager.cpp \ qpid/console/Value.cpp libqmfconsole_la_LIBADD = libqpidclient.la QMFCONSOLE_VERSION_INFO = 2:0:0 libqmfconsole_la_LDFLAGS = -version-info $(QMFCONSOLE_VERSION_INFO) @HAVE_XML_TRUE@xml_la_SOURCES = \ @HAVE_XML_TRUE@ qpid/xml/XmlExchange.cpp \ @HAVE_XML_TRUE@ qpid/xml/XmlExchange.h \ @HAVE_XML_TRUE@ qpid/xml/XmlExchangePlugin.cpp @HAVE_XML_TRUE@xml_la_LIBADD = -lxerces-c -lxqilla libqpidbroker.la @HAVE_XML_TRUE@xml_la_LDFLAGS = $(PLUGINLDFLAGS) # a queue event listener plugin that creates messages on a replication # queue corresponding to enqueue and dequeue events: replicating_listener_la_SOURCES = \ qpid/replication/constants.h \ qpid/replication/ReplicatingEventListener.cpp \ qpid/replication/ReplicatingEventListener.h replicating_listener_la_LIBADD = libqpidbroker.la $(am__append_5) replicating_listener_la_LDFLAGS = $(PLUGINLDFLAGS) # a custom exchange plugin that allows an exchange to be created that # can process the messages from a replication queue (populated on the # source system by the replicating listener plugin above) and take the # corresponding action on the local queues replication_exchange_la_SOURCES = \ qpid/replication/constants.h \ qpid/replication/ReplicationExchange.cpp \ qpid/replication/ReplicationExchange.h replication_exchange_la_LIBADD = libqpidbroker.la $(am__append_6) replication_exchange_la_LDFLAGS = $(PLUGINLDFLAGS) # RDMA (Infiniband) protocol code @RDMA_TRUE@librdmawrap_la_SOURCES = \ @RDMA_TRUE@ qpid/sys/rdma/rdma_exception.h \ @RDMA_TRUE@ qpid/sys/rdma/rdma_factories.cpp \ @RDMA_TRUE@ qpid/sys/rdma/rdma_factories.h \ @RDMA_TRUE@ qpid/sys/rdma/RdmaIO.cpp \ @RDMA_TRUE@ qpid/sys/rdma/RdmaIO.h \ @RDMA_TRUE@ qpid/sys/rdma/rdma_wrap.cpp \ @RDMA_TRUE@ qpid/sys/rdma/rdma_wrap.h @RDMA_TRUE@librdmawrap_la_LIBADD = \ @RDMA_TRUE@ libqpidcommon.la \ @RDMA_TRUE@ -lrdmacm \ @RDMA_TRUE@ -libverbs @RDMA_TRUE@librdmawrap_la_CXXFLAGS = \ @RDMA_TRUE@ $(AM_CXXFLAGS) -Wno-missing-field-initializers @RDMA_TRUE@RDMAWRAP_VERSION_INFO = 2:0:0 @RDMA_TRUE@librdmawrap_la_LDFLAGS = -version-info $(RDMAWRAP_VERSION_INFO) -no-undefined @RDMA_TRUE@rdma_la_SOURCES = \ @RDMA_TRUE@ qpid/sys/RdmaIOPlugin.cpp @RDMA_TRUE@rdma_la_LIBADD = \ @RDMA_TRUE@ libqpidbroker.la \ @RDMA_TRUE@ librdmawrap.la \ @RDMA_TRUE@ -libverbs @RDMA_TRUE@rdma_la_LDFLAGS = $(PLUGINLDFLAGS) @RDMA_TRUE@rdma_la_CXXFLAGS = \ @RDMA_TRUE@ $(AM_CXXFLAGS) -Wno-missing-field-initializers @RDMA_TRUE@rdmaconnector_la_SOURCES = \ @RDMA_TRUE@ qpid/client/RdmaConnector.cpp @RDMA_TRUE@rdmaconnector_la_LIBADD = \ @RDMA_TRUE@ libqpidclient.la \ @RDMA_TRUE@ librdmawrap.la \ @RDMA_TRUE@ -libverbs @RDMA_TRUE@rdmaconnector_la_LDFLAGS = $(PLUGINLDFLAGS) @RDMA_TRUE@rdmaconnector_la_CXXFLAGS = \ @RDMA_TRUE@ $(AM_CXXFLAGS) -Wno-missing-field-initializers @RDMA_TRUE@RdmaServer_SOURCES = qpid/sys/rdma/RdmaServer.cpp @RDMA_TRUE@RdmaServer_LDADD = \ @RDMA_TRUE@ librdmawrap.la libqpidcommon.la @RDMA_TRUE@RdmaClient_SOURCES = qpid/sys/rdma/RdmaClient.cpp @RDMA_TRUE@RdmaClient_CXXFLAGS = \ @RDMA_TRUE@ $(AM_CXXFLAGS) -Wno-missing-field-initializers @RDMA_TRUE@RdmaClient_LDADD = \ @RDMA_TRUE@ librdmawrap.la libqpidcommon.la # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Makefile fragment, conditionally included in Makefile.am # @SSL_TRUE@libsslcommon_la_SOURCES = \ @SSL_TRUE@ qpid/sys/ssl/check.h \ @SSL_TRUE@ qpid/sys/ssl/check.cpp \ @SSL_TRUE@ qpid/sys/ssl/util.h \ @SSL_TRUE@ qpid/sys/ssl/util.cpp \ @SSL_TRUE@ qpid/sys/ssl/SslSocket.h \ @SSL_TRUE@ qpid/sys/ssl/SslSocket.cpp \ @SSL_TRUE@ qpid/sys/ssl/SslIo.h \ @SSL_TRUE@ qpid/sys/ssl/SslIo.cpp @SSL_TRUE@SSLCOMMON_VERSION_INFO = 2:0:0 @SSL_TRUE@libsslcommon_la_LDFLAGS = -version-info $(SSLCOMMON_VERSION_INFO) @SSL_TRUE@libsslcommon_la_LIBADD = -lnss3 -lssl3 -lnspr4 libqpidcommon.la @SSL_TRUE@libsslcommon_la_CXXFLAGS = $(AM_CXXFLAGS) $(SSL_CFLAGS) @SSL_TRUE@ssl_la_SOURCES = \ @SSL_TRUE@ qpid/sys/SslPlugin.cpp \ @SSL_TRUE@ qpid/sys/ssl/SslHandler.h \ @SSL_TRUE@ qpid/sys/ssl/SslHandler.cpp @SSL_TRUE@ssl_la_LIBADD = libqpidbroker.la libsslcommon.la @SSL_TRUE@ssl_la_CXXFLAGS = $(AM_CXXFLAGS) $(SSL_CFLAGS) @SSL_TRUE@ssl_la_LDFLAGS = $(PLUGINLDFLAGS) @SSL_TRUE@sslconnector_la_SOURCES = \ @SSL_TRUE@ qpid/client/SslConnector.cpp @SSL_TRUE@sslconnector_la_LIBADD = \ @SSL_TRUE@ libqpidclient.la \ @SSL_TRUE@ libsslcommon.la @SSL_TRUE@sslconnector_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\" $(SSL_CFLAGS) @SSL_TRUE@sslconnector_la_LDFLAGS = $(PLUGINLDFLAGS) libqpidcommon_la_LIBADD = libqpidtypes.la -lboost_program_options \ -lboost_filesystem -luuid $(LIB_DLOPEN) $(LIB_CLOCK_GETTIME) \ $(am__append_14) QPIDCOMMON_VERSION_INFO = 2:0:0 libqpidcommon_la_LDFLAGS = -version-info $(QPIDCOMMON_VERSION_INFO) libqpidbroker_la_LIBADD = libqpidcommon.la libqpidbroker_la_SOURCES = \ $(mgen_broker_cpp) \ $(posix_broker_src) \ qpid/amqp_0_10/Connection.cpp \ qpid/amqp_0_10/Connection.h \ qpid/broker/AclModule.h \ qpid/broker/Bridge.cpp \ qpid/broker/Bridge.h \ qpid/broker/Broker.cpp \ qpid/broker/Broker.h \ qpid/broker/BrokerImportExport.h \ qpid/broker/Connection.cpp \ qpid/broker/Connection.h \ qpid/broker/ConnectionFactory.cpp \ qpid/broker/ConnectionFactory.h \ qpid/broker/ConnectionHandler.cpp \ qpid/broker/ConnectionHandler.h \ qpid/broker/ConnectionState.h \ qpid/broker/ConnectionToken.h \ qpid/broker/Consumer.h \ qpid/broker/Credit.h \ qpid/broker/Credit.cpp \ qpid/broker/ConsumerFactory.h \ qpid/broker/ConnectionObserver.h \ qpid/broker/ConnectionObservers.h \ qpid/broker/Daemon.cpp \ qpid/broker/Daemon.h \ qpid/broker/Deliverable.h \ qpid/broker/DeliverableMessage.cpp \ qpid/broker/DeliverableMessage.h \ qpid/broker/DeliveryAdapter.h \ qpid/broker/DeliveryId.h \ qpid/broker/DeliveryRecord.cpp \ qpid/broker/DeliveryRecord.h \ qpid/broker/DirectExchange.cpp \ qpid/broker/DirectExchange.h \ qpid/broker/DtxAck.cpp \ qpid/broker/DtxAck.h \ qpid/broker/DtxBuffer.cpp \ qpid/broker/DtxBuffer.h \ qpid/broker/DtxManager.cpp \ qpid/broker/DtxManager.h \ qpid/broker/DtxTimeout.cpp \ qpid/broker/DtxTimeout.h \ qpid/broker/DtxWorkRecord.cpp \ qpid/broker/DtxWorkRecord.h \ qpid/broker/Exchange.cpp \ qpid/broker/Exchange.h \ qpid/broker/ExchangeRegistry.cpp \ qpid/broker/ExchangeRegistry.h \ qpid/broker/ExpiryPolicy.cpp \ qpid/broker/ExpiryPolicy.h \ qpid/broker/Fairshare.h \ qpid/broker/Fairshare.cpp \ qpid/broker/FanOutExchange.cpp \ qpid/broker/FanOutExchange.h \ qpid/broker/FedOps.h \ qpid/broker/HandlerImpl.h \ qpid/broker/HeadersExchange.cpp \ qpid/broker/HeadersExchange.h \ qpid/broker/AsyncCompletion.h \ qpid/broker/LegacyLVQ.h \ qpid/broker/LegacyLVQ.cpp \ qpid/broker/Link.cpp \ qpid/broker/Link.h \ qpid/broker/LinkRegistry.cpp \ qpid/broker/LinkRegistry.h \ qpid/broker/Message.cpp \ qpid/broker/Message.h \ qpid/broker/MessageAdapter.cpp \ qpid/broker/MessageAdapter.h \ qpid/broker/MessageBuilder.cpp \ qpid/broker/MessageBuilder.h \ qpid/broker/MessageDeque.h \ qpid/broker/MessageDeque.cpp \ qpid/broker/MessageMap.h \ qpid/broker/MessageMap.cpp \ qpid/broker/Messages.h \ qpid/broker/MessageStore.h \ qpid/broker/MessageStoreModule.cpp \ qpid/broker/MessageStoreModule.h \ qpid/broker/PriorityQueue.h \ qpid/broker/PriorityQueue.cpp \ qpid/broker/NameGenerator.cpp \ qpid/broker/NameGenerator.h \ qpid/broker/NullMessageStore.cpp \ qpid/broker/NullMessageStore.h \ qpid/broker/OwnershipToken.h \ qpid/broker/Persistable.h \ qpid/broker/PersistableConfig.h \ qpid/broker/PersistableExchange.h \ qpid/broker/PersistableMessage.cpp \ qpid/broker/PersistableMessage.h \ qpid/broker/PersistableQueue.h \ qpid/broker/Queue.cpp \ qpid/broker/Queue.h \ qpid/broker/QueueBindings.cpp \ qpid/broker/QueueBindings.h \ qpid/broker/QueueCleaner.cpp \ qpid/broker/QueueCleaner.h \ qpid/broker/QueueEvents.cpp \ qpid/broker/QueueEvents.h \ qpid/broker/QueueListeners.cpp \ qpid/broker/QueueListeners.h \ qpid/broker/QueueObserver.h \ qpid/broker/QueuePolicy.cpp \ qpid/broker/QueuePolicy.h \ qpid/broker/QueueRegistry.cpp \ qpid/broker/QueueRegistry.h \ qpid/broker/QueuedMessage.h \ qpid/broker/QueueFlowLimit.h \ qpid/broker/QueueFlowLimit.cpp \ qpid/broker/RecoverableConfig.h \ qpid/broker/RecoverableExchange.h \ qpid/broker/RecoverableMessage.h \ qpid/broker/RecoverableQueue.h \ qpid/broker/RecoverableTransaction.h \ qpid/broker/RecoveredDequeue.cpp \ qpid/broker/RecoveredDequeue.h \ qpid/broker/RecoveredEnqueue.cpp \ qpid/broker/RecoveredEnqueue.h \ qpid/broker/RecoveryManager.h \ qpid/broker/RecoveryManagerImpl.cpp \ qpid/broker/RecoveryManagerImpl.h \ qpid/broker/RetryList.cpp \ qpid/broker/RetryList.h \ qpid/broker/SaslAuthenticator.cpp \ qpid/broker/SaslAuthenticator.h \ qpid/broker/SecureConnection.cpp \ qpid/broker/SecureConnection.h \ qpid/broker/SecureConnectionFactory.cpp \ qpid/broker/SecureConnectionFactory.h \ qpid/broker/SemanticState.cpp \ qpid/broker/SemanticState.h \ qpid/broker/SessionAdapter.cpp \ qpid/broker/SessionAdapter.h \ qpid/broker/SessionAdapter.h \ qpid/broker/SessionContext.h \ qpid/broker/SessionHandler.cpp \ qpid/broker/SessionHandler.h \ qpid/broker/SessionManager.cpp \ qpid/broker/SessionManager.h \ qpid/broker/SessionManager.h \ qpid/broker/SessionOutputException.h \ qpid/broker/SessionState.cpp \ qpid/broker/SessionState.h \ qpid/broker/SignalHandler.cpp \ qpid/broker/SignalHandler.h \ qpid/broker/StatefulQueueObserver.h \ qpid/broker/System.cpp \ qpid/broker/System.h \ qpid/broker/ThresholdAlerts.cpp \ qpid/broker/ThresholdAlerts.h \ qpid/broker/TopicExchange.cpp \ qpid/broker/TopicExchange.h \ qpid/broker/TransactionalStore.h \ qpid/broker/TxAccept.cpp \ qpid/broker/TxAccept.h \ qpid/broker/TxBuffer.cpp \ qpid/broker/TxBuffer.h \ qpid/broker/TxOp.h \ qpid/broker/TxOpVisitor.h \ qpid/broker/TxPublish.cpp \ qpid/broker/TxPublish.h \ qpid/broker/Vhost.cpp \ qpid/broker/Vhost.h \ qpid/broker/MessageDistributor.h \ qpid/broker/FifoDistributor.h \ qpid/broker/FifoDistributor.cpp \ qpid/broker/MessageGroupManager.cpp \ qpid/broker/MessageGroupManager.h \ qpid/management/ManagementAgent.cpp \ qpid/management/ManagementAgent.h \ qpid/management/ManagementDirectExchange.cpp \ qpid/management/ManagementDirectExchange.h \ qpid/management/ManagementTopicExchange.cpp \ qpid/management/ManagementTopicExchange.h \ qpid/sys/TCPIOPlugin.cpp QPIDBROKER_VERSION_INFO = 2:0:0 libqpidbroker_la_LDFLAGS = -version-info $(QPIDBROKER_VERSION_INFO) libqpidclient_la_LIBADD = libqpidcommon.la -luuid libqpidclient_la_SOURCES = \ $(rgen_client_srcs) \ qpid/client/Bounds.cpp \ qpid/client/Bounds.h \ qpid/client/ChainableFrameHandler.h \ qpid/client/Completion.cpp \ qpid/client/CompletionImpl.h \ qpid/client/Connection.cpp \ qpid/client/ConnectionAccess.h \ qpid/client/ConnectionHandler.cpp \ qpid/client/ConnectionHandler.h \ qpid/client/ConnectionImpl.cpp \ qpid/client/ConnectionImpl.h \ qpid/client/ConnectionSettings.cpp \ qpid/client/Connector.cpp \ qpid/client/Connector.h \ qpid/client/Demux.cpp \ qpid/client/Demux.h \ qpid/client/Dispatcher.cpp \ qpid/client/Dispatcher.h \ qpid/client/Execution.h \ qpid/client/FailoverListener.cpp \ qpid/client/FailoverManager.cpp \ qpid/client/Future.cpp \ qpid/client/FutureCompletion.cpp \ qpid/client/FutureResult.cpp \ qpid/client/LoadPlugins.h \ qpid/client/LoadPlugins.cpp \ qpid/client/LocalQueue.cpp \ qpid/client/LocalQueueImpl.cpp \ qpid/client/LocalQueueImpl.h \ qpid/client/Message.cpp \ qpid/client/MessageImpl.cpp \ qpid/client/MessageImpl.h \ qpid/client/MessageListener.cpp \ qpid/client/MessageReplayTracker.cpp \ qpid/client/PrivateImplRef.h \ qpid/client/QueueOptions.cpp \ qpid/client/Results.cpp \ qpid/client/Results.h \ qpid/client/SessionBase_0_10.cpp \ qpid/client/SessionBase_0_10Access.h \ qpid/client/SessionImpl.cpp \ qpid/client/SessionImpl.h \ qpid/client/StateManager.cpp \ qpid/client/StateManager.h \ qpid/client/Subscription.cpp \ qpid/client/SubscriptionImpl.cpp \ qpid/client/SubscriptionImpl.h \ qpid/client/SubscriptionManager.cpp \ qpid/client/SubscriptionManagerImpl.cpp \ qpid/client/SubscriptionManagerImpl.h \ qpid/client/TCPConnector.cpp \ qpid/client/TCPConnector.h QPIDCLIENT_VERSION_INFO = 2:0:0 libqpidclient_la_LDFLAGS = -version-info $(QPIDCLIENT_VERSION_INFO) libqpidtypes_la_LIBADD = -luuid libqpidtypes_la_SOURCES = \ qpid/types/Exception.cpp \ qpid/types/Uuid.cpp \ qpid/types/Variant.cpp \ ../include/qpid/types/ImportExport.h QPIDTYPES_VERSION_INFO = 1:0:0 libqpidtypes_la_LDFLAGS = -version-info $(QPIDTYPES_VERSION_INFO) libqpidmessaging_la_LIBADD = libqpidclient.la libqpidtypes.la libqpidmessaging_la_SOURCES = \ qpid/messaging/Address.cpp \ qpid/messaging/AddressParser.h \ qpid/messaging/AddressParser.cpp \ qpid/messaging/Connection.cpp \ qpid/messaging/Duration.cpp \ qpid/messaging/exceptions.cpp \ qpid/messaging/Message.cpp \ qpid/messaging/MessageImpl.h \ qpid/messaging/MessageImpl.cpp \ qpid/messaging/PrivateImplRef.h \ qpid/messaging/Sender.cpp \ qpid/messaging/Receiver.cpp \ qpid/messaging/Session.cpp \ qpid/messaging/ConnectionImpl.h \ qpid/messaging/SenderImpl.h \ qpid/messaging/ReceiverImpl.h \ qpid/messaging/SessionImpl.h \ qpid/messaging/FailoverUpdates.cpp \ qpid/client/amqp0_10/AcceptTracker.h \ qpid/client/amqp0_10/AcceptTracker.cpp \ qpid/client/amqp0_10/AddressResolution.h \ qpid/client/amqp0_10/AddressResolution.cpp \ qpid/client/amqp0_10/ConnectionImpl.h \ qpid/client/amqp0_10/ConnectionImpl.cpp \ qpid/client/amqp0_10/IncomingMessages.h \ qpid/client/amqp0_10/IncomingMessages.cpp \ qpid/client/amqp0_10/MessageSink.h \ qpid/client/amqp0_10/MessageSource.h \ qpid/client/amqp0_10/OutgoingMessage.h \ qpid/client/amqp0_10/OutgoingMessage.cpp \ qpid/client/amqp0_10/ReceiverImpl.h \ qpid/client/amqp0_10/ReceiverImpl.cpp \ qpid/client/amqp0_10/SessionImpl.h \ qpid/client/amqp0_10/SessionImpl.cpp \ qpid/client/amqp0_10/SenderImpl.h \ qpid/client/amqp0_10/SenderImpl.cpp QPIDMESSAGING_VERSION_INFO = 2:0:0 libqpidmessaging_la_LDFLAGS = -version-info $(QPIDMESSAGING_VERSION_INFO) # Support for pkg-config pkgconfigdir = $(libdir)/pkgconfig all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/rubygen.mk $(srcdir)/managementgen.mk $(srcdir)/cluster.mk $(srcdir)/ha.mk $(srcdir)/acl.mk $(srcdir)/qmf.mk $(srcdir)/qmfc.mk $(srcdir)/xml.mk $(srcdir)/replication.mk $(srcdir)/ssl.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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 $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 qpid.pc: $(top_builddir)/config.status $(srcdir)/qpid.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ qmf2.pc: $(top_builddir)/config.status $(srcdir)/qmf2.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-cmoduleexecLTLIBRARIES: $(cmoduleexec_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(cmoduleexecdir)" || $(MKDIR_P) "$(DESTDIR)$(cmoduleexecdir)" @list='$(cmoduleexec_LTLIBRARIES)'; test -n "$(cmoduleexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(cmoduleexecdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(cmoduleexecdir)"; \ } uninstall-cmoduleexecLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(cmoduleexec_LTLIBRARIES)'; test -n "$(cmoduleexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(cmoduleexecdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(cmoduleexecdir)/$$f"; \ done clean-cmoduleexecLTLIBRARIES: -test -z "$(cmoduleexec_LTLIBRARIES)" || rm -f $(cmoduleexec_LTLIBRARIES) @list='$(cmoduleexec_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 install-dmoduleexecLTLIBRARIES: $(dmoduleexec_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(dmoduleexecdir)" || $(MKDIR_P) "$(DESTDIR)$(dmoduleexecdir)" @list='$(dmoduleexec_LTLIBRARIES)'; test -n "$(dmoduleexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dmoduleexecdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dmoduleexecdir)"; \ } uninstall-dmoduleexecLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(dmoduleexec_LTLIBRARIES)'; test -n "$(dmoduleexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dmoduleexecdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dmoduleexecdir)/$$f"; \ done clean-dmoduleexecLTLIBRARIES: -test -z "$(dmoduleexec_LTLIBRARIES)" || rm -f $(dmoduleexec_LTLIBRARIES) @list='$(dmoduleexec_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 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ 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 install-tmoduleexecLTLIBRARIES: $(tmoduleexec_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(tmoduleexecdir)" || $(MKDIR_P) "$(DESTDIR)$(tmoduleexecdir)" @list='$(tmoduleexec_LTLIBRARIES)'; test -n "$(tmoduleexecdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(tmoduleexecdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(tmoduleexecdir)"; \ } uninstall-tmoduleexecLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(tmoduleexec_LTLIBRARIES)'; test -n "$(tmoduleexecdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(tmoduleexecdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(tmoduleexecdir)/$$f"; \ done clean-tmoduleexecLTLIBRARIES: -test -z "$(tmoduleexec_LTLIBRARIES)" || rm -f $(tmoduleexec_LTLIBRARIES) @list='$(tmoduleexec_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 qpid/acl/$(am__dirstamp): @$(MKDIR_P) qpid/acl @: > qpid/acl/$(am__dirstamp) qpid/acl/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/acl/$(DEPDIR) @: > qpid/acl/$(DEPDIR)/$(am__dirstamp) qpid/acl/Acl.lo: qpid/acl/$(am__dirstamp) \ qpid/acl/$(DEPDIR)/$(am__dirstamp) qpid/acl/AclData.lo: qpid/acl/$(am__dirstamp) \ qpid/acl/$(DEPDIR)/$(am__dirstamp) qpid/acl/AclPlugin.lo: qpid/acl/$(am__dirstamp) \ qpid/acl/$(DEPDIR)/$(am__dirstamp) qpid/acl/AclReader.lo: qpid/acl/$(am__dirstamp) \ qpid/acl/$(DEPDIR)/$(am__dirstamp) qpid/acl/AclValidator.lo: qpid/acl/$(am__dirstamp) \ qpid/acl/$(DEPDIR)/$(am__dirstamp) acl.la: $(acl_la_OBJECTS) $(acl_la_DEPENDENCIES) $(acl_la_LINK) -rpath $(dmoduleexecdir) $(acl_la_OBJECTS) $(acl_la_LIBADD) $(LIBS) qpid/cluster/$(am__dirstamp): @$(MKDIR_P) qpid/cluster @: > qpid/cluster/$(am__dirstamp) qpid/cluster/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/cluster/$(DEPDIR) @: > qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-Quorum_cman.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-Cluster.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-ClusterTimer.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-Decoder.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-ClusterMap.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-ClusterPlugin.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-Connection.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-ConnectionCodec.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-Cpg.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-CredentialsExchange.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-UpdateClient.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-RetractClient.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-ErrorCheck.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-Event.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-EventFrame.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-ExpiryPolicy.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-FailoverExchange.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-UpdateExchange.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-Multicaster.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-OutputInterceptor.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-PollerDispatch.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-InitialStatusMap.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-MemberSet.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-SecureConnectionFactory.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-StoreStatus.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpid/cluster/cluster_la-UpdateDataExchange.lo: \ qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) cluster.la: $(cluster_la_OBJECTS) $(cluster_la_DEPENDENCIES) $(cluster_la_LINK) $(am_cluster_la_rpath) $(cluster_la_OBJECTS) $(cluster_la_LIBADD) $(LIBS) qpid/ha/$(am__dirstamp): @$(MKDIR_P) qpid/ha @: > qpid/ha/$(am__dirstamp) qpid/ha/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/ha/$(DEPDIR) @: > qpid/ha/$(DEPDIR)/$(am__dirstamp) qpid/ha/Backup.lo: qpid/ha/$(am__dirstamp) \ qpid/ha/$(DEPDIR)/$(am__dirstamp) qpid/ha/HaBroker.lo: qpid/ha/$(am__dirstamp) \ qpid/ha/$(DEPDIR)/$(am__dirstamp) qpid/ha/HaPlugin.lo: qpid/ha/$(am__dirstamp) \ qpid/ha/$(DEPDIR)/$(am__dirstamp) qpid/ha/QueueReplicator.lo: qpid/ha/$(am__dirstamp) \ qpid/ha/$(DEPDIR)/$(am__dirstamp) qpid/ha/ReplicatingSubscription.lo: qpid/ha/$(am__dirstamp) \ qpid/ha/$(DEPDIR)/$(am__dirstamp) qpid/ha/BrokerReplicator.lo: qpid/ha/$(am__dirstamp) \ qpid/ha/$(DEPDIR)/$(am__dirstamp) qpid/ha/ConnectionExcluder.lo: qpid/ha/$(am__dirstamp) \ qpid/ha/$(DEPDIR)/$(am__dirstamp) ha.la: $(ha_la_OBJECTS) $(ha_la_DEPENDENCIES) $(ha_la_LINK) -rpath $(dmoduleexecdir) $(ha_la_OBJECTS) $(ha_la_LIBADD) $(LIBS) qpid/agent/$(am__dirstamp): @$(MKDIR_P) qpid/agent @: > qpid/agent/$(am__dirstamp) qpid/agent/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/agent/$(DEPDIR) @: > qpid/agent/$(DEPDIR)/$(am__dirstamp) qpid/agent/ManagementAgentImpl.lo: qpid/agent/$(am__dirstamp) \ qpid/agent/$(DEPDIR)/$(am__dirstamp) libqmf.la: $(libqmf_la_OBJECTS) $(libqmf_la_DEPENDENCIES) $(libqmf_la_LINK) -rpath $(libdir) $(libqmf_la_OBJECTS) $(libqmf_la_LIBADD) $(LIBS) qmf/$(am__dirstamp): @$(MKDIR_P) qmf @: > qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qmf/$(DEPDIR) @: > qmf/$(DEPDIR)/$(am__dirstamp) qmf/Agent.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/AgentEvent.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/AgentSession.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/AgentSubscription.lo: qmf/$(am__dirstamp) \ qmf/$(DEPDIR)/$(am__dirstamp) qmf/ConsoleEvent.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/ConsoleSession.lo: qmf/$(am__dirstamp) \ qmf/$(DEPDIR)/$(am__dirstamp) qmf/constants.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/DataAddr.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/Data.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/EventNotifierImpl.lo: qmf/$(am__dirstamp) \ qmf/$(DEPDIR)/$(am__dirstamp) qmf/exceptions.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/Expression.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/Hash.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/PosixEventNotifier.lo: qmf/$(am__dirstamp) \ qmf/$(DEPDIR)/$(am__dirstamp) qmf/PosixEventNotifierImpl.lo: qmf/$(am__dirstamp) \ qmf/$(DEPDIR)/$(am__dirstamp) qmf/Query.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/SchemaCache.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/Schema.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/SchemaId.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/SchemaMethod.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) qmf/SchemaProperty.lo: qmf/$(am__dirstamp) \ qmf/$(DEPDIR)/$(am__dirstamp) qmf/Subscription.lo: qmf/$(am__dirstamp) qmf/$(DEPDIR)/$(am__dirstamp) libqmf2.la: $(libqmf2_la_OBJECTS) $(libqmf2_la_DEPENDENCIES) $(libqmf2_la_LINK) -rpath $(libdir) $(libqmf2_la_OBJECTS) $(libqmf2_la_LIBADD) $(LIBS) qpid/console/$(am__dirstamp): @$(MKDIR_P) qpid/console @: > qpid/console/$(am__dirstamp) qpid/console/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/console/$(DEPDIR) @: > qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/Agent.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/Broker.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/ClassKey.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/Event.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/Object.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/ObjectId.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/Package.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/Schema.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/SequenceManager.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/SessionManager.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) qpid/console/Value.lo: qpid/console/$(am__dirstamp) \ qpid/console/$(DEPDIR)/$(am__dirstamp) libqmfconsole.la: $(libqmfconsole_la_OBJECTS) $(libqmfconsole_la_DEPENDENCIES) $(libqmfconsole_la_LINK) -rpath $(libdir) $(libqmfconsole_la_OBJECTS) $(libqmfconsole_la_LIBADD) $(LIBS) qmf/engine/$(am__dirstamp): @$(MKDIR_P) qmf/engine @: > qmf/engine/$(am__dirstamp) qmf/engine/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qmf/engine/$(DEPDIR) @: > qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/Agent.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/BrokerProxyImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/ConnectionSettingsImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/ConsoleImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/EventImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/MessageImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/ObjectIdImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/ObjectImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/Protocol.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/QueryImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/ResilientConnection.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/SequenceManager.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/SchemaImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) qmf/engine/ValueImpl.lo: qmf/engine/$(am__dirstamp) \ qmf/engine/$(DEPDIR)/$(am__dirstamp) libqmfengine.la: $(libqmfengine_la_OBJECTS) $(libqmfengine_la_DEPENDENCIES) $(libqmfengine_la_LINK) -rpath $(libdir) $(libqmfengine_la_OBJECTS) $(libqmfengine_la_LIBADD) $(LIBS) qmf/org/apache/qpid/broker/$(am__dirstamp): @$(MKDIR_P) qmf/org/apache/qpid/broker @: > qmf/org/apache/qpid/broker/$(am__dirstamp) qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qmf/org/apache/qpid/broker/$(DEPDIR) @: > qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/System.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Memory.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Broker.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Agent.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Vhost.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Queue.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Exchange.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Binding.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Subscription.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Connection.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Link.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Bridge.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Session.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/ManagementSetupState.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventClientConnect.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventClientConnectFail.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventClientDisconnect.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventBrokerLinkUp.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventBrokerLinkDown.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventQueueDeclare.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventQueueDelete.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventExchangeDeclare.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventExchangeDelete.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventBind.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventUnbind.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventSubscribe.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventUnsubscribe.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/broker/Package.lo: \ qmf/org/apache/qpid/broker/$(am__dirstamp) \ qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/acl/$(am__dirstamp): @$(MKDIR_P) qmf/org/apache/qpid/acl @: > qmf/org/apache/qpid/acl/$(am__dirstamp) qmf/org/apache/qpid/acl/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qmf/org/apache/qpid/acl/$(DEPDIR) @: > qmf/org/apache/qpid/acl/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/acl/Acl.lo: \ qmf/org/apache/qpid/acl/$(am__dirstamp) \ qmf/org/apache/qpid/acl/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/acl/EventAllow.lo: \ qmf/org/apache/qpid/acl/$(am__dirstamp) \ qmf/org/apache/qpid/acl/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/acl/EventDeny.lo: \ qmf/org/apache/qpid/acl/$(am__dirstamp) \ qmf/org/apache/qpid/acl/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/acl/EventFileLoaded.lo: \ qmf/org/apache/qpid/acl/$(am__dirstamp) \ qmf/org/apache/qpid/acl/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/acl/EventFileLoadFailed.lo: \ qmf/org/apache/qpid/acl/$(am__dirstamp) \ qmf/org/apache/qpid/acl/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/acl/Package.lo: \ qmf/org/apache/qpid/acl/$(am__dirstamp) \ qmf/org/apache/qpid/acl/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/cluster/$(am__dirstamp): @$(MKDIR_P) qmf/org/apache/qpid/cluster @: > qmf/org/apache/qpid/cluster/$(am__dirstamp) qmf/org/apache/qpid/cluster/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qmf/org/apache/qpid/cluster/$(DEPDIR) @: > qmf/org/apache/qpid/cluster/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/cluster/Cluster.lo: \ qmf/org/apache/qpid/cluster/$(am__dirstamp) \ qmf/org/apache/qpid/cluster/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/cluster/Package.lo: \ qmf/org/apache/qpid/cluster/$(am__dirstamp) \ qmf/org/apache/qpid/cluster/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/ha/$(am__dirstamp): @$(MKDIR_P) qmf/org/apache/qpid/ha @: > qmf/org/apache/qpid/ha/$(am__dirstamp) qmf/org/apache/qpid/ha/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qmf/org/apache/qpid/ha/$(DEPDIR) @: > qmf/org/apache/qpid/ha/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/ha/HaBroker.lo: \ qmf/org/apache/qpid/ha/$(am__dirstamp) \ qmf/org/apache/qpid/ha/$(DEPDIR)/$(am__dirstamp) qmf/org/apache/qpid/ha/Package.lo: \ qmf/org/apache/qpid/ha/$(am__dirstamp) \ qmf/org/apache/qpid/ha/$(DEPDIR)/$(am__dirstamp) qpid/broker/posix/$(am__dirstamp): @$(MKDIR_P) qpid/broker/posix @: > qpid/broker/posix/$(am__dirstamp) qpid/broker/posix/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/broker/posix/$(DEPDIR) @: > qpid/broker/posix/$(DEPDIR)/$(am__dirstamp) qpid/broker/posix/BrokerDefaults.lo: \ qpid/broker/posix/$(am__dirstamp) \ qpid/broker/posix/$(DEPDIR)/$(am__dirstamp) qpid/amqp_0_10/$(am__dirstamp): @$(MKDIR_P) qpid/amqp_0_10 @: > qpid/amqp_0_10/$(am__dirstamp) qpid/amqp_0_10/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/amqp_0_10/$(DEPDIR) @: > qpid/amqp_0_10/$(DEPDIR)/$(am__dirstamp) qpid/amqp_0_10/Connection.lo: qpid/amqp_0_10/$(am__dirstamp) \ qpid/amqp_0_10/$(DEPDIR)/$(am__dirstamp) qpid/broker/$(am__dirstamp): @$(MKDIR_P) qpid/broker @: > qpid/broker/$(am__dirstamp) qpid/broker/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/broker/$(DEPDIR) @: > qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Bridge.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Broker.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Connection.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/ConnectionFactory.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/ConnectionHandler.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Credit.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Daemon.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/DeliverableMessage.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/DeliveryRecord.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/DirectExchange.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/DtxAck.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/DtxBuffer.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/DtxManager.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/DtxTimeout.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/DtxWorkRecord.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Exchange.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/ExchangeRegistry.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/ExpiryPolicy.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Fairshare.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/FanOutExchange.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/HeadersExchange.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/LegacyLVQ.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Link.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/LinkRegistry.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Message.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/MessageAdapter.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/MessageBuilder.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/MessageDeque.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/MessageMap.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/MessageStoreModule.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/PriorityQueue.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/NameGenerator.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/NullMessageStore.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/PersistableMessage.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Queue.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/QueueBindings.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/QueueCleaner.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/QueueEvents.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/QueueListeners.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/QueuePolicy.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/QueueRegistry.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/QueueFlowLimit.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/RecoveredDequeue.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/RecoveredEnqueue.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/RecoveryManagerImpl.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/RetryList.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/SaslAuthenticator.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/SecureConnection.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/SecureConnectionFactory.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/SemanticState.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/SessionAdapter.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/SessionHandler.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/SessionManager.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/SessionState.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/SignalHandler.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/System.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/ThresholdAlerts.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/TopicExchange.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/TxAccept.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/TxBuffer.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/TxPublish.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/Vhost.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/FifoDistributor.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/broker/MessageGroupManager.lo: qpid/broker/$(am__dirstamp) \ qpid/broker/$(DEPDIR)/$(am__dirstamp) qpid/management/$(am__dirstamp): @$(MKDIR_P) qpid/management @: > qpid/management/$(am__dirstamp) qpid/management/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/management/$(DEPDIR) @: > qpid/management/$(DEPDIR)/$(am__dirstamp) qpid/management/ManagementAgent.lo: qpid/management/$(am__dirstamp) \ qpid/management/$(DEPDIR)/$(am__dirstamp) qpid/management/ManagementDirectExchange.lo: \ qpid/management/$(am__dirstamp) \ qpid/management/$(DEPDIR)/$(am__dirstamp) qpid/management/ManagementTopicExchange.lo: \ qpid/management/$(am__dirstamp) \ qpid/management/$(DEPDIR)/$(am__dirstamp) qpid/sys/$(am__dirstamp): @$(MKDIR_P) qpid/sys @: > qpid/sys/$(am__dirstamp) qpid/sys/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/sys/$(DEPDIR) @: > qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/TCPIOPlugin.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) libqpidbroker.la: $(libqpidbroker_la_OBJECTS) $(libqpidbroker_la_DEPENDENCIES) $(libqpidbroker_la_LINK) -rpath $(libdir) $(libqpidbroker_la_OBJECTS) $(libqpidbroker_la_LIBADD) $(LIBS) qpid/client/no_keyword/$(am__dirstamp): @$(MKDIR_P) ./qpid/client/no_keyword @: > qpid/client/no_keyword/$(am__dirstamp) qpid/client/no_keyword/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ./qpid/client/no_keyword/$(DEPDIR) @: > qpid/client/no_keyword/$(DEPDIR)/$(am__dirstamp) ./qpid/client/no_keyword/libqpidclient_la-AsyncSession_0_10.lo: \ qpid/client/no_keyword/$(am__dirstamp) \ qpid/client/no_keyword/$(DEPDIR)/$(am__dirstamp) ./qpid/client/no_keyword/libqpidclient_la-Session_0_10.lo: \ qpid/client/no_keyword/$(am__dirstamp) \ qpid/client/no_keyword/$(DEPDIR)/$(am__dirstamp) qpid/client/$(am__dirstamp): @$(MKDIR_P) qpid/client @: > qpid/client/$(am__dirstamp) qpid/client/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/client/$(DEPDIR) @: > qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Bounds.lo: qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Completion.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Connection.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-ConnectionHandler.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-ConnectionImpl.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-ConnectionSettings.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Connector.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Demux.lo: qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Dispatcher.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-FailoverListener.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-FailoverManager.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Future.lo: qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-FutureCompletion.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-FutureResult.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-LoadPlugins.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-LocalQueue.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-LocalQueueImpl.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Message.lo: qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-MessageImpl.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-MessageListener.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-MessageReplayTracker.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-QueueOptions.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Results.lo: qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-SessionBase_0_10.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-SessionImpl.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-StateManager.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-Subscription.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-SubscriptionImpl.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-SubscriptionManager.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-SubscriptionManagerImpl.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) qpid/client/libqpidclient_la-TCPConnector.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) libqpidclient.la: $(libqpidclient_la_OBJECTS) $(libqpidclient_la_DEPENDENCIES) $(libqpidclient_la_LINK) -rpath $(libdir) $(libqpidclient_la_OBJECTS) $(libqpidclient_la_LIBADD) $(LIBS) qpid/log/posix/$(am__dirstamp): @$(MKDIR_P) qpid/log/posix @: > qpid/log/posix/$(am__dirstamp) qpid/log/posix/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/log/posix/$(DEPDIR) @: > qpid/log/posix/$(DEPDIR)/$(am__dirstamp) qpid/log/posix/SinkOptions.lo: qpid/log/posix/$(am__dirstamp) \ qpid/log/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/$(am__dirstamp): @$(MKDIR_P) qpid/sys/posix @: > qpid/sys/posix/$(am__dirstamp) qpid/sys/posix/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/sys/posix/$(DEPDIR) @: > qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/IOHandle.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/Socket.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/SocketAddress.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/AsynchIO.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/FileSysDir.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/LockFile.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/Time.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/Thread.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/Shlib.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/MemStat.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/Mutex.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/Fork.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/StrError.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/PollableCondition.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/PipeHandle.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/solaris/$(am__dirstamp): @$(MKDIR_P) qpid/sys/solaris @: > qpid/sys/solaris/$(am__dirstamp) qpid/sys/solaris/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/sys/solaris/$(DEPDIR) @: > qpid/sys/solaris/$(DEPDIR)/$(am__dirstamp) qpid/sys/solaris/ECFPoller.lo: qpid/sys/solaris/$(am__dirstamp) \ qpid/sys/solaris/$(DEPDIR)/$(am__dirstamp) qpid/sys/epoll/$(am__dirstamp): @$(MKDIR_P) qpid/sys/epoll @: > qpid/sys/epoll/$(am__dirstamp) qpid/sys/epoll/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/sys/epoll/$(DEPDIR) @: > qpid/sys/epoll/$(DEPDIR)/$(am__dirstamp) qpid/sys/epoll/EpollPoller.lo: qpid/sys/epoll/$(am__dirstamp) \ qpid/sys/epoll/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/PosixPoller.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/posix/SystemInfo.lo: qpid/sys/posix/$(am__dirstamp) \ qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) qpid/sys/solaris/SystemInfo.lo: qpid/sys/solaris/$(am__dirstamp) \ qpid/sys/solaris/$(DEPDIR)/$(am__dirstamp) qpid/framing/$(am__dirstamp): @$(MKDIR_P) ./qpid/framing @: > qpid/framing/$(am__dirstamp) qpid/framing/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ./qpid/framing/$(DEPDIR) @: > qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionTxPublishBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionTxAcceptBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionDtxWorkRecordBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExchangeUnbindBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionDeliveryRecordBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExchangeQueryResult.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionTxStartBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxStartBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileRejectBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionOpenOkBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionTxEndBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterTimerDropBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterReadyBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionExpectedBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/StreamConsumeOkBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageReleaseBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterClockBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileQosBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageTransferBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileCancelBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/AllInvoker.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileDeliverBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/Header.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionDtxEndBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionSecureBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageAcceptBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionConfirmedBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/StreamCancelBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionQueueObserverStateBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionCommandPointBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionDetachedBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionAccumulatedAckBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/QueuePurgeBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/StreamReturnBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ServerInvoker.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionQueueFairshareStateBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionQueuePositionBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterDeliverToQueueBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/StreamQosBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionStartOkBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionDtxStartBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterTimerWakeupBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/XaResult.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxRecoverBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionClockBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxCommitBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileProperties.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MethodBodyDefaultVisitor.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageResumeBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionDeliverCloseBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/TxSelectBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileReturnBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageRejectBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageProperties.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClientInvoker.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageResumeResult.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionConsumerStateBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageFlushBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionStartBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExecutionExceptionBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FragmentProperties.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageSetFlowModeBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionSecureOkBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionOutputTaskBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionHeartbeatBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/StreamConsumeBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionShadowSetUserBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/StreamProperties.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileAckBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MethodBodyFactory.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterErrorCheckBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExchangeBindBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/TypeCode.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionSessionStateBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageSubscribeBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/StreamQosOkBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DeliveryProperties.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/QueueQueryResult.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageAcquireBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExchangeQueryBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/StreamPublishBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ReplyTo.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionAddQueueListenerBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/StreamDeliverBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxGetTimeoutResult.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageAcquireResult.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionTxEnqueueBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionTxDequeueBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxGetTimeoutBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterRetractOfferBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExchangeBoundResult.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExchangeBoundBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionAbortBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionFlushBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionAttachedBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExecutionResultBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionTimeoutBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterUpdateRequestBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxEndBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxSelectBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionManagementSetupStateBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageStopBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterInitialStatusBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileConsumeOkBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionConfigBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionShadowPrepareBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/QueueQueryBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/AMQP_ServerProxy.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageFlowBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionRequestTimeoutBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxRecoverResult.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxPrepareBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FilePublishBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionCloseOkBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/AMQP_AllProxy.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionShadowReadyBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileOpenOkBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExchangeDeclareBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterUpdateOfferBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileStageBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionAnnounceBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/Xid.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileConsumeBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionKnownCompletedBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionRedirectBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionTuneOkBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionMembershipBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileQosOkBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/TxRollbackBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionTuneBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExecutionSyncBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionRetractOfferBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionDtxBufferRefBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionAttachBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionCloseBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionGapBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConfigChangeBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionExchangeBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxForgetBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ExchangeDeleteBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxRollbackBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ConnectionOpenBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/reply_exceptions.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/TxCommitBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionDeliverDoOutputBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/AMQP_ClientProxy.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/QueueDeclareBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionCompletedBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterConnectionDtxAckBody.lo: \ qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/ClusterShutdownBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/FileOpenBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/MessageCancelBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/SessionDetachBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/DtxSetTimeoutBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) ./qpid/framing/QueueDeleteBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/$(am__dirstamp): @$(MKDIR_P) qpid @: > qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/$(DEPDIR) @: > qpid/$(DEPDIR)/$(am__dirstamp) qpid/Address.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/DataDir.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/Exception.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/Modules.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/Options.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/Plugin.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/RefCountedBuffer.lo: qpid/$(am__dirstamp) \ qpid/$(DEPDIR)/$(am__dirstamp) qpid/SaslFactory.lo: qpid/$(am__dirstamp) \ qpid/$(DEPDIR)/$(am__dirstamp) qpid/SessionId.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/SessionState.lo: qpid/$(am__dirstamp) \ qpid/$(DEPDIR)/$(am__dirstamp) qpid/StringUtils.lo: qpid/$(am__dirstamp) \ qpid/$(DEPDIR)/$(am__dirstamp) qpid/Url.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/UrlArray.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/amqp_0_10/SessionHandler.lo: qpid/amqp_0_10/$(am__dirstamp) \ qpid/amqp_0_10/$(DEPDIR)/$(am__dirstamp) qpid/assert.lo: qpid/$(am__dirstamp) qpid/$(DEPDIR)/$(am__dirstamp) qpid/framing/AMQBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/AMQContentBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/AMQFrame.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/AMQHeaderBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/AMQHeartbeatBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/AMQMethodBody.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/AccumulatedAck.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/Array.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/BodyHandler.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/Buffer.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/Endian.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/FieldTable.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/FieldValue.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/FrameDecoder.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/FrameSet.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/List.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/ProtocolInitiation.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/ProtocolVersion.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/Proxy.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/SendContent.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/SequenceNumber.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/SequenceNumberSet.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/SequenceSet.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/TransferContent.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/framing/Uuid.lo: qpid/framing/$(am__dirstamp) \ qpid/framing/$(DEPDIR)/$(am__dirstamp) qpid/log/$(am__dirstamp): @$(MKDIR_P) qpid/log @: > qpid/log/$(am__dirstamp) qpid/log/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/log/$(DEPDIR) @: > qpid/log/$(DEPDIR)/$(am__dirstamp) qpid/log/Logger.lo: qpid/log/$(am__dirstamp) \ qpid/log/$(DEPDIR)/$(am__dirstamp) qpid/log/Options.lo: qpid/log/$(am__dirstamp) \ qpid/log/$(DEPDIR)/$(am__dirstamp) qpid/log/OstreamOutput.lo: qpid/log/$(am__dirstamp) \ qpid/log/$(DEPDIR)/$(am__dirstamp) qpid/log/Selector.lo: qpid/log/$(am__dirstamp) \ qpid/log/$(DEPDIR)/$(am__dirstamp) qpid/log/Statement.lo: qpid/log/$(am__dirstamp) \ qpid/log/$(DEPDIR)/$(am__dirstamp) qpid/management/Buffer.lo: qpid/management/$(am__dirstamp) \ qpid/management/$(DEPDIR)/$(am__dirstamp) qpid/management/ConnectionSettings.lo: \ qpid/management/$(am__dirstamp) \ qpid/management/$(DEPDIR)/$(am__dirstamp) qpid/management/Manageable.lo: qpid/management/$(am__dirstamp) \ qpid/management/$(DEPDIR)/$(am__dirstamp) qpid/management/ManagementObject.lo: qpid/management/$(am__dirstamp) \ qpid/management/$(DEPDIR)/$(am__dirstamp) qpid/management/Mutex.lo: qpid/management/$(am__dirstamp) \ qpid/management/$(DEPDIR)/$(am__dirstamp) qpid/sys/AggregateOutput.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/AsynchIOHandler.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/ClusterSafe.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/DispatchHandle.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/Dispatcher.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/Runnable.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/Shlib.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/Timer.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/TimerWarnings.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/amqp_0_10/Codecs.lo: qpid/amqp_0_10/$(am__dirstamp) \ qpid/amqp_0_10/$(DEPDIR)/$(am__dirstamp) qpid/sys/cyrus/$(am__dirstamp): @$(MKDIR_P) qpid/sys/cyrus @: > qpid/sys/cyrus/$(am__dirstamp) qpid/sys/cyrus/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/sys/cyrus/$(DEPDIR) @: > qpid/sys/cyrus/$(DEPDIR)/$(am__dirstamp) qpid/sys/cyrus/CyrusSecurityLayer.lo: qpid/sys/cyrus/$(am__dirstamp) \ qpid/sys/cyrus/$(DEPDIR)/$(am__dirstamp) libqpidcommon.la: $(libqpidcommon_la_OBJECTS) $(libqpidcommon_la_DEPENDENCIES) $(libqpidcommon_la_LINK) -rpath $(libdir) $(libqpidcommon_la_OBJECTS) $(libqpidcommon_la_LIBADD) $(LIBS) qpid/messaging/$(am__dirstamp): @$(MKDIR_P) qpid/messaging @: > qpid/messaging/$(am__dirstamp) qpid/messaging/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/messaging/$(DEPDIR) @: > qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/Address.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/AddressParser.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/Connection.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/Duration.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/exceptions.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/Message.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/MessageImpl.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/Sender.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/Receiver.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/Session.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/messaging/FailoverUpdates.lo: qpid/messaging/$(am__dirstamp) \ qpid/messaging/$(DEPDIR)/$(am__dirstamp) qpid/client/amqp0_10/$(am__dirstamp): @$(MKDIR_P) qpid/client/amqp0_10 @: > qpid/client/amqp0_10/$(am__dirstamp) qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/client/amqp0_10/$(DEPDIR) @: > qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) qpid/client/amqp0_10/AcceptTracker.lo: \ qpid/client/amqp0_10/$(am__dirstamp) \ qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) qpid/client/amqp0_10/AddressResolution.lo: \ qpid/client/amqp0_10/$(am__dirstamp) \ qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) qpid/client/amqp0_10/ConnectionImpl.lo: \ qpid/client/amqp0_10/$(am__dirstamp) \ qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) qpid/client/amqp0_10/IncomingMessages.lo: \ qpid/client/amqp0_10/$(am__dirstamp) \ qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) qpid/client/amqp0_10/OutgoingMessage.lo: \ qpid/client/amqp0_10/$(am__dirstamp) \ qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) qpid/client/amqp0_10/ReceiverImpl.lo: \ qpid/client/amqp0_10/$(am__dirstamp) \ qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) qpid/client/amqp0_10/SessionImpl.lo: \ qpid/client/amqp0_10/$(am__dirstamp) \ qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) qpid/client/amqp0_10/SenderImpl.lo: \ qpid/client/amqp0_10/$(am__dirstamp) \ qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) libqpidmessaging.la: $(libqpidmessaging_la_OBJECTS) $(libqpidmessaging_la_DEPENDENCIES) $(libqpidmessaging_la_LINK) -rpath $(libdir) $(libqpidmessaging_la_OBJECTS) $(libqpidmessaging_la_LIBADD) $(LIBS) qpid/types/$(am__dirstamp): @$(MKDIR_P) qpid/types @: > qpid/types/$(am__dirstamp) qpid/types/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/types/$(DEPDIR) @: > qpid/types/$(DEPDIR)/$(am__dirstamp) qpid/types/Exception.lo: qpid/types/$(am__dirstamp) \ qpid/types/$(DEPDIR)/$(am__dirstamp) qpid/types/Uuid.lo: qpid/types/$(am__dirstamp) \ qpid/types/$(DEPDIR)/$(am__dirstamp) qpid/types/Variant.lo: qpid/types/$(am__dirstamp) \ qpid/types/$(DEPDIR)/$(am__dirstamp) libqpidtypes.la: $(libqpidtypes_la_OBJECTS) $(libqpidtypes_la_DEPENDENCIES) $(libqpidtypes_la_LINK) -rpath $(libdir) $(libqpidtypes_la_OBJECTS) $(libqpidtypes_la_LIBADD) $(LIBS) qpid/sys/rdma/$(am__dirstamp): @$(MKDIR_P) qpid/sys/rdma @: > qpid/sys/rdma/$(am__dirstamp) qpid/sys/rdma/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/sys/rdma/$(DEPDIR) @: > qpid/sys/rdma/$(DEPDIR)/$(am__dirstamp) qpid/sys/rdma/librdmawrap_la-rdma_factories.lo: \ qpid/sys/rdma/$(am__dirstamp) \ qpid/sys/rdma/$(DEPDIR)/$(am__dirstamp) qpid/sys/rdma/librdmawrap_la-RdmaIO.lo: qpid/sys/rdma/$(am__dirstamp) \ qpid/sys/rdma/$(DEPDIR)/$(am__dirstamp) qpid/sys/rdma/librdmawrap_la-rdma_wrap.lo: \ qpid/sys/rdma/$(am__dirstamp) \ qpid/sys/rdma/$(DEPDIR)/$(am__dirstamp) librdmawrap.la: $(librdmawrap_la_OBJECTS) $(librdmawrap_la_DEPENDENCIES) $(librdmawrap_la_LINK) $(am_librdmawrap_la_rpath) $(librdmawrap_la_OBJECTS) $(librdmawrap_la_LIBADD) $(LIBS) qpid/sys/ssl/$(am__dirstamp): @$(MKDIR_P) qpid/sys/ssl @: > qpid/sys/ssl/$(am__dirstamp) qpid/sys/ssl/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/sys/ssl/$(DEPDIR) @: > qpid/sys/ssl/$(DEPDIR)/$(am__dirstamp) qpid/sys/ssl/libsslcommon_la-check.lo: qpid/sys/ssl/$(am__dirstamp) \ qpid/sys/ssl/$(DEPDIR)/$(am__dirstamp) qpid/sys/ssl/libsslcommon_la-util.lo: qpid/sys/ssl/$(am__dirstamp) \ qpid/sys/ssl/$(DEPDIR)/$(am__dirstamp) qpid/sys/ssl/libsslcommon_la-SslSocket.lo: \ qpid/sys/ssl/$(am__dirstamp) \ qpid/sys/ssl/$(DEPDIR)/$(am__dirstamp) qpid/sys/ssl/libsslcommon_la-SslIo.lo: qpid/sys/ssl/$(am__dirstamp) \ qpid/sys/ssl/$(DEPDIR)/$(am__dirstamp) libsslcommon.la: $(libsslcommon_la_OBJECTS) $(libsslcommon_la_DEPENDENCIES) $(libsslcommon_la_LINK) $(am_libsslcommon_la_rpath) $(libsslcommon_la_OBJECTS) $(libsslcommon_la_LIBADD) $(LIBS) qpid/sys/rdma_la-RdmaIOPlugin.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) rdma.la: $(rdma_la_OBJECTS) $(rdma_la_DEPENDENCIES) $(rdma_la_LINK) $(am_rdma_la_rpath) $(rdma_la_OBJECTS) $(rdma_la_LIBADD) $(LIBS) qpid/client/rdmaconnector_la-RdmaConnector.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) rdmaconnector.la: $(rdmaconnector_la_OBJECTS) $(rdmaconnector_la_DEPENDENCIES) $(rdmaconnector_la_LINK) $(am_rdmaconnector_la_rpath) $(rdmaconnector_la_OBJECTS) $(rdmaconnector_la_LIBADD) $(LIBS) qpid/replication/$(am__dirstamp): @$(MKDIR_P) qpid/replication @: > qpid/replication/$(am__dirstamp) qpid/replication/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/replication/$(DEPDIR) @: > qpid/replication/$(DEPDIR)/$(am__dirstamp) qpid/replication/ReplicatingEventListener.lo: \ qpid/replication/$(am__dirstamp) \ qpid/replication/$(DEPDIR)/$(am__dirstamp) replicating_listener.la: $(replicating_listener_la_OBJECTS) $(replicating_listener_la_DEPENDENCIES) $(replicating_listener_la_LINK) -rpath $(dmoduleexecdir) $(replicating_listener_la_OBJECTS) $(replicating_listener_la_LIBADD) $(LIBS) qpid/replication/ReplicationExchange.lo: \ qpid/replication/$(am__dirstamp) \ qpid/replication/$(DEPDIR)/$(am__dirstamp) replication_exchange.la: $(replication_exchange_la_OBJECTS) $(replication_exchange_la_DEPENDENCIES) $(replication_exchange_la_LINK) -rpath $(dmoduleexecdir) $(replication_exchange_la_OBJECTS) $(replication_exchange_la_LIBADD) $(LIBS) qpid/sys/ssl_la-SslPlugin.lo: qpid/sys/$(am__dirstamp) \ qpid/sys/$(DEPDIR)/$(am__dirstamp) qpid/sys/ssl/ssl_la-SslHandler.lo: qpid/sys/ssl/$(am__dirstamp) \ qpid/sys/ssl/$(DEPDIR)/$(am__dirstamp) ssl.la: $(ssl_la_OBJECTS) $(ssl_la_DEPENDENCIES) $(ssl_la_LINK) $(am_ssl_la_rpath) $(ssl_la_OBJECTS) $(ssl_la_LIBADD) $(LIBS) qpid/client/sslconnector_la-SslConnector.lo: \ qpid/client/$(am__dirstamp) \ qpid/client/$(DEPDIR)/$(am__dirstamp) sslconnector.la: $(sslconnector_la_OBJECTS) $(sslconnector_la_DEPENDENCIES) $(sslconnector_la_LINK) $(am_sslconnector_la_rpath) $(sslconnector_la_OBJECTS) $(sslconnector_la_LIBADD) $(LIBS) qpid/cluster/WatchDogPlugin.lo: qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) watchdog.la: $(watchdog_la_OBJECTS) $(watchdog_la_DEPENDENCIES) $(watchdog_la_LINK) $(am_watchdog_la_rpath) $(watchdog_la_OBJECTS) $(watchdog_la_LIBADD) $(LIBS) qpid/xml/$(am__dirstamp): @$(MKDIR_P) qpid/xml @: > qpid/xml/$(am__dirstamp) qpid/xml/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) qpid/xml/$(DEPDIR) @: > qpid/xml/$(DEPDIR)/$(am__dirstamp) qpid/xml/XmlExchange.lo: qpid/xml/$(am__dirstamp) \ qpid/xml/$(DEPDIR)/$(am__dirstamp) qpid/xml/XmlExchangePlugin.lo: qpid/xml/$(am__dirstamp) \ qpid/xml/$(DEPDIR)/$(am__dirstamp) xml.la: $(xml_la_OBJECTS) $(xml_la_DEPENDENCIES) $(xml_la_LINK) $(am_xml_la_rpath) $(xml_la_OBJECTS) $(xml_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-qpidexecPROGRAMS: $(qpidexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(qpidexecdir)" || $(MKDIR_P) "$(DESTDIR)$(qpidexecdir)" @list='$(qpidexec_PROGRAMS)'; test -n "$(qpidexecdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(qpidexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(qpidexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-qpidexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(qpidexec_PROGRAMS)'; test -n "$(qpidexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpidexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpidexecdir)" && rm -f $$files clean-qpidexecPROGRAMS: @list='$(qpidexec_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-qpidtestPROGRAMS: $(qpidtest_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(qpidtestdir)" || $(MKDIR_P) "$(DESTDIR)$(qpidtestdir)" @list='$(qpidtest_PROGRAMS)'; test -n "$(qpidtestdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(qpidtestdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(qpidtestdir)$$dir" || exit $$?; \ } \ ; done uninstall-qpidtestPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(qpidtest_PROGRAMS)'; test -n "$(qpidtestdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpidtestdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpidtestdir)" && rm -f $$files clean-qpidtestPROGRAMS: @list='$(qpidtest_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list qpid/sys/rdma/RdmaClient-RdmaClient.$(OBJEXT): \ qpid/sys/rdma/$(am__dirstamp) \ qpid/sys/rdma/$(DEPDIR)/$(am__dirstamp) RdmaClient$(EXEEXT): $(RdmaClient_OBJECTS) $(RdmaClient_DEPENDENCIES) @rm -f RdmaClient$(EXEEXT) $(RdmaClient_LINK) $(RdmaClient_OBJECTS) $(RdmaClient_LDADD) $(LIBS) qpid/sys/rdma/RdmaServer.$(OBJEXT): qpid/sys/rdma/$(am__dirstamp) \ qpid/sys/rdma/$(DEPDIR)/$(am__dirstamp) RdmaServer$(EXEEXT): $(RdmaServer_OBJECTS) $(RdmaServer_DEPENDENCIES) @rm -f RdmaServer$(EXEEXT) $(CXXLINK) $(RdmaServer_OBJECTS) $(RdmaServer_LDADD) $(LIBS) posix/$(am__dirstamp): @$(MKDIR_P) posix @: > posix/$(am__dirstamp) posix/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) posix/$(DEPDIR) @: > posix/$(DEPDIR)/$(am__dirstamp) posix/qpidd-QpiddBroker.$(OBJEXT): posix/$(am__dirstamp) \ posix/$(DEPDIR)/$(am__dirstamp) qpidd$(EXEEXT): $(qpidd_OBJECTS) $(qpidd_DEPENDENCIES) @rm -f qpidd$(EXEEXT) $(qpidd_LINK) $(qpidd_OBJECTS) $(qpidd_LDADD) $(LIBS) qpid/cluster/qpidd_watchdog.$(OBJEXT): qpid/cluster/$(am__dirstamp) \ qpid/cluster/$(DEPDIR)/$(am__dirstamp) qpidd_watchdog$(EXEEXT): $(qpidd_watchdog_OBJECTS) $(qpidd_watchdog_DEPENDENCIES) @rm -f qpidd_watchdog$(EXEEXT) $(CXXLINK) $(qpidd_watchdog_OBJECTS) $(qpidd_watchdog_LDADD) $(LIBS) install-qpidexecSCRIPTS: $(qpidexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(qpidexecdir)" || $(MKDIR_P) "$(DESTDIR)$(qpidexecdir)" @list='$(qpidexec_SCRIPTS)'; test -n "$(qpidexecdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(qpidexecdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(qpidexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-qpidexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(qpidexec_SCRIPTS)'; test -n "$(qpidexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpidexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpidexecdir)" && rm -f $$files install-qpidtestSCRIPTS: $(qpidtest_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(qpidtestdir)" || $(MKDIR_P) "$(DESTDIR)$(qpidtestdir)" @list='$(qpidtest_SCRIPTS)'; test -n "$(qpidtestdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(qpidtestdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(qpidtestdir)$$dir" || exit $$?; \ } \ ; done uninstall-qpidtestSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(qpidtest_SCRIPTS)'; test -n "$(qpidtestdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpidtestdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpidtestdir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f ./qpid/client/no_keyword/libqpidclient_la-AsyncSession_0_10.$(OBJEXT) -rm -f ./qpid/client/no_keyword/libqpidclient_la-AsyncSession_0_10.lo -rm -f ./qpid/client/no_keyword/libqpidclient_la-Session_0_10.$(OBJEXT) -rm -f ./qpid/client/no_keyword/libqpidclient_la-Session_0_10.lo -rm -f ./qpid/framing/AMQP_AllProxy.$(OBJEXT) -rm -f ./qpid/framing/AMQP_AllProxy.lo -rm -f ./qpid/framing/AMQP_ClientProxy.$(OBJEXT) -rm -f ./qpid/framing/AMQP_ClientProxy.lo -rm -f ./qpid/framing/AMQP_ServerProxy.$(OBJEXT) -rm -f ./qpid/framing/AMQP_ServerProxy.lo -rm -f ./qpid/framing/AllInvoker.$(OBJEXT) -rm -f ./qpid/framing/AllInvoker.lo -rm -f ./qpid/framing/ClientInvoker.$(OBJEXT) -rm -f ./qpid/framing/ClientInvoker.lo -rm -f ./qpid/framing/ClusterClockBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterClockBody.lo -rm -f ./qpid/framing/ClusterConfigChangeBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConfigChangeBody.lo -rm -f ./qpid/framing/ClusterConnectionAbortBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionAbortBody.lo -rm -f ./qpid/framing/ClusterConnectionAccumulatedAckBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionAccumulatedAckBody.lo -rm -f ./qpid/framing/ClusterConnectionAddQueueListenerBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionAddQueueListenerBody.lo -rm -f ./qpid/framing/ClusterConnectionAnnounceBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionAnnounceBody.lo -rm -f ./qpid/framing/ClusterConnectionClockBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionClockBody.lo -rm -f ./qpid/framing/ClusterConnectionConfigBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionConfigBody.lo -rm -f ./qpid/framing/ClusterConnectionConsumerStateBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionConsumerStateBody.lo -rm -f ./qpid/framing/ClusterConnectionDeliverCloseBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionDeliverCloseBody.lo -rm -f ./qpid/framing/ClusterConnectionDeliverDoOutputBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionDeliverDoOutputBody.lo -rm -f ./qpid/framing/ClusterConnectionDeliveryRecordBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionDeliveryRecordBody.lo -rm -f ./qpid/framing/ClusterConnectionDtxAckBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionDtxAckBody.lo -rm -f ./qpid/framing/ClusterConnectionDtxBufferRefBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionDtxBufferRefBody.lo -rm -f ./qpid/framing/ClusterConnectionDtxEndBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionDtxEndBody.lo -rm -f ./qpid/framing/ClusterConnectionDtxStartBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionDtxStartBody.lo -rm -f ./qpid/framing/ClusterConnectionDtxWorkRecordBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionDtxWorkRecordBody.lo -rm -f ./qpid/framing/ClusterConnectionExchangeBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionExchangeBody.lo -rm -f ./qpid/framing/ClusterConnectionManagementSetupStateBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionManagementSetupStateBody.lo -rm -f ./qpid/framing/ClusterConnectionMembershipBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionMembershipBody.lo -rm -f ./qpid/framing/ClusterConnectionOutputTaskBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionOutputTaskBody.lo -rm -f ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.lo -rm -f ./qpid/framing/ClusterConnectionQueueFairshareStateBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionQueueFairshareStateBody.lo -rm -f ./qpid/framing/ClusterConnectionQueueObserverStateBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionQueueObserverStateBody.lo -rm -f ./qpid/framing/ClusterConnectionQueuePositionBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionQueuePositionBody.lo -rm -f ./qpid/framing/ClusterConnectionRetractOfferBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionRetractOfferBody.lo -rm -f ./qpid/framing/ClusterConnectionSessionStateBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionSessionStateBody.lo -rm -f ./qpid/framing/ClusterConnectionShadowPrepareBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionShadowPrepareBody.lo -rm -f ./qpid/framing/ClusterConnectionShadowReadyBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionShadowReadyBody.lo -rm -f ./qpid/framing/ClusterConnectionShadowSetUserBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionShadowSetUserBody.lo -rm -f ./qpid/framing/ClusterConnectionTxAcceptBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionTxAcceptBody.lo -rm -f ./qpid/framing/ClusterConnectionTxDequeueBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionTxDequeueBody.lo -rm -f ./qpid/framing/ClusterConnectionTxEndBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionTxEndBody.lo -rm -f ./qpid/framing/ClusterConnectionTxEnqueueBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionTxEnqueueBody.lo -rm -f ./qpid/framing/ClusterConnectionTxPublishBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionTxPublishBody.lo -rm -f ./qpid/framing/ClusterConnectionTxStartBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterConnectionTxStartBody.lo -rm -f ./qpid/framing/ClusterDeliverToQueueBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterDeliverToQueueBody.lo -rm -f ./qpid/framing/ClusterErrorCheckBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterErrorCheckBody.lo -rm -f ./qpid/framing/ClusterInitialStatusBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterInitialStatusBody.lo -rm -f ./qpid/framing/ClusterReadyBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterReadyBody.lo -rm -f ./qpid/framing/ClusterRetractOfferBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterRetractOfferBody.lo -rm -f ./qpid/framing/ClusterShutdownBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterShutdownBody.lo -rm -f ./qpid/framing/ClusterTimerDropBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterTimerDropBody.lo -rm -f ./qpid/framing/ClusterTimerWakeupBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterTimerWakeupBody.lo -rm -f ./qpid/framing/ClusterUpdateOfferBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterUpdateOfferBody.lo -rm -f ./qpid/framing/ClusterUpdateRequestBody.$(OBJEXT) -rm -f ./qpid/framing/ClusterUpdateRequestBody.lo -rm -f ./qpid/framing/ConnectionCloseBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionCloseBody.lo -rm -f ./qpid/framing/ConnectionCloseOkBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionCloseOkBody.lo -rm -f ./qpid/framing/ConnectionHeartbeatBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionHeartbeatBody.lo -rm -f ./qpid/framing/ConnectionOpenBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionOpenBody.lo -rm -f ./qpid/framing/ConnectionOpenOkBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionOpenOkBody.lo -rm -f ./qpid/framing/ConnectionRedirectBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionRedirectBody.lo -rm -f ./qpid/framing/ConnectionSecureBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionSecureBody.lo -rm -f ./qpid/framing/ConnectionSecureOkBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionSecureOkBody.lo -rm -f ./qpid/framing/ConnectionStartBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionStartBody.lo -rm -f ./qpid/framing/ConnectionStartOkBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionStartOkBody.lo -rm -f ./qpid/framing/ConnectionTuneBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionTuneBody.lo -rm -f ./qpid/framing/ConnectionTuneOkBody.$(OBJEXT) -rm -f ./qpid/framing/ConnectionTuneOkBody.lo -rm -f ./qpid/framing/DeliveryProperties.$(OBJEXT) -rm -f ./qpid/framing/DeliveryProperties.lo -rm -f ./qpid/framing/DtxCommitBody.$(OBJEXT) -rm -f ./qpid/framing/DtxCommitBody.lo -rm -f ./qpid/framing/DtxEndBody.$(OBJEXT) -rm -f ./qpid/framing/DtxEndBody.lo -rm -f ./qpid/framing/DtxForgetBody.$(OBJEXT) -rm -f ./qpid/framing/DtxForgetBody.lo -rm -f ./qpid/framing/DtxGetTimeoutBody.$(OBJEXT) -rm -f ./qpid/framing/DtxGetTimeoutBody.lo -rm -f ./qpid/framing/DtxGetTimeoutResult.$(OBJEXT) -rm -f ./qpid/framing/DtxGetTimeoutResult.lo -rm -f ./qpid/framing/DtxPrepareBody.$(OBJEXT) -rm -f ./qpid/framing/DtxPrepareBody.lo -rm -f ./qpid/framing/DtxRecoverBody.$(OBJEXT) -rm -f ./qpid/framing/DtxRecoverBody.lo -rm -f ./qpid/framing/DtxRecoverResult.$(OBJEXT) -rm -f ./qpid/framing/DtxRecoverResult.lo -rm -f ./qpid/framing/DtxRollbackBody.$(OBJEXT) -rm -f ./qpid/framing/DtxRollbackBody.lo -rm -f ./qpid/framing/DtxSelectBody.$(OBJEXT) -rm -f ./qpid/framing/DtxSelectBody.lo -rm -f ./qpid/framing/DtxSetTimeoutBody.$(OBJEXT) -rm -f ./qpid/framing/DtxSetTimeoutBody.lo -rm -f ./qpid/framing/DtxStartBody.$(OBJEXT) -rm -f ./qpid/framing/DtxStartBody.lo -rm -f ./qpid/framing/ExchangeBindBody.$(OBJEXT) -rm -f ./qpid/framing/ExchangeBindBody.lo -rm -f ./qpid/framing/ExchangeBoundBody.$(OBJEXT) -rm -f ./qpid/framing/ExchangeBoundBody.lo -rm -f ./qpid/framing/ExchangeBoundResult.$(OBJEXT) -rm -f ./qpid/framing/ExchangeBoundResult.lo -rm -f ./qpid/framing/ExchangeDeclareBody.$(OBJEXT) -rm -f ./qpid/framing/ExchangeDeclareBody.lo -rm -f ./qpid/framing/ExchangeDeleteBody.$(OBJEXT) -rm -f ./qpid/framing/ExchangeDeleteBody.lo -rm -f ./qpid/framing/ExchangeQueryBody.$(OBJEXT) -rm -f ./qpid/framing/ExchangeQueryBody.lo -rm -f ./qpid/framing/ExchangeQueryResult.$(OBJEXT) -rm -f ./qpid/framing/ExchangeQueryResult.lo -rm -f ./qpid/framing/ExchangeUnbindBody.$(OBJEXT) -rm -f ./qpid/framing/ExchangeUnbindBody.lo -rm -f ./qpid/framing/ExecutionExceptionBody.$(OBJEXT) -rm -f ./qpid/framing/ExecutionExceptionBody.lo -rm -f ./qpid/framing/ExecutionResultBody.$(OBJEXT) -rm -f ./qpid/framing/ExecutionResultBody.lo -rm -f ./qpid/framing/ExecutionSyncBody.$(OBJEXT) -rm -f ./qpid/framing/ExecutionSyncBody.lo -rm -f ./qpid/framing/FileAckBody.$(OBJEXT) -rm -f ./qpid/framing/FileAckBody.lo -rm -f ./qpid/framing/FileCancelBody.$(OBJEXT) -rm -f ./qpid/framing/FileCancelBody.lo -rm -f ./qpid/framing/FileConsumeBody.$(OBJEXT) -rm -f ./qpid/framing/FileConsumeBody.lo -rm -f ./qpid/framing/FileConsumeOkBody.$(OBJEXT) -rm -f ./qpid/framing/FileConsumeOkBody.lo -rm -f ./qpid/framing/FileDeliverBody.$(OBJEXT) -rm -f ./qpid/framing/FileDeliverBody.lo -rm -f ./qpid/framing/FileOpenBody.$(OBJEXT) -rm -f ./qpid/framing/FileOpenBody.lo -rm -f ./qpid/framing/FileOpenOkBody.$(OBJEXT) -rm -f ./qpid/framing/FileOpenOkBody.lo -rm -f ./qpid/framing/FileProperties.$(OBJEXT) -rm -f ./qpid/framing/FileProperties.lo -rm -f ./qpid/framing/FilePublishBody.$(OBJEXT) -rm -f ./qpid/framing/FilePublishBody.lo -rm -f ./qpid/framing/FileQosBody.$(OBJEXT) -rm -f ./qpid/framing/FileQosBody.lo -rm -f ./qpid/framing/FileQosOkBody.$(OBJEXT) -rm -f ./qpid/framing/FileQosOkBody.lo -rm -f ./qpid/framing/FileRejectBody.$(OBJEXT) -rm -f ./qpid/framing/FileRejectBody.lo -rm -f ./qpid/framing/FileReturnBody.$(OBJEXT) -rm -f ./qpid/framing/FileReturnBody.lo -rm -f ./qpid/framing/FileStageBody.$(OBJEXT) -rm -f ./qpid/framing/FileStageBody.lo -rm -f ./qpid/framing/FragmentProperties.$(OBJEXT) -rm -f ./qpid/framing/FragmentProperties.lo -rm -f ./qpid/framing/Header.$(OBJEXT) -rm -f ./qpid/framing/Header.lo -rm -f ./qpid/framing/MessageAcceptBody.$(OBJEXT) -rm -f ./qpid/framing/MessageAcceptBody.lo -rm -f ./qpid/framing/MessageAcquireBody.$(OBJEXT) -rm -f ./qpid/framing/MessageAcquireBody.lo -rm -f ./qpid/framing/MessageAcquireResult.$(OBJEXT) -rm -f ./qpid/framing/MessageAcquireResult.lo -rm -f ./qpid/framing/MessageCancelBody.$(OBJEXT) -rm -f ./qpid/framing/MessageCancelBody.lo -rm -f ./qpid/framing/MessageFlowBody.$(OBJEXT) -rm -f ./qpid/framing/MessageFlowBody.lo -rm -f ./qpid/framing/MessageFlushBody.$(OBJEXT) -rm -f ./qpid/framing/MessageFlushBody.lo -rm -f ./qpid/framing/MessageProperties.$(OBJEXT) -rm -f ./qpid/framing/MessageProperties.lo -rm -f ./qpid/framing/MessageRejectBody.$(OBJEXT) -rm -f ./qpid/framing/MessageRejectBody.lo -rm -f ./qpid/framing/MessageReleaseBody.$(OBJEXT) -rm -f ./qpid/framing/MessageReleaseBody.lo -rm -f ./qpid/framing/MessageResumeBody.$(OBJEXT) -rm -f ./qpid/framing/MessageResumeBody.lo -rm -f ./qpid/framing/MessageResumeResult.$(OBJEXT) -rm -f ./qpid/framing/MessageResumeResult.lo -rm -f ./qpid/framing/MessageSetFlowModeBody.$(OBJEXT) -rm -f ./qpid/framing/MessageSetFlowModeBody.lo -rm -f ./qpid/framing/MessageStopBody.$(OBJEXT) -rm -f ./qpid/framing/MessageStopBody.lo -rm -f ./qpid/framing/MessageSubscribeBody.$(OBJEXT) -rm -f ./qpid/framing/MessageSubscribeBody.lo -rm -f ./qpid/framing/MessageTransferBody.$(OBJEXT) -rm -f ./qpid/framing/MessageTransferBody.lo -rm -f ./qpid/framing/MethodBodyDefaultVisitor.$(OBJEXT) -rm -f ./qpid/framing/MethodBodyDefaultVisitor.lo -rm -f ./qpid/framing/MethodBodyFactory.$(OBJEXT) -rm -f ./qpid/framing/MethodBodyFactory.lo -rm -f ./qpid/framing/QueueDeclareBody.$(OBJEXT) -rm -f ./qpid/framing/QueueDeclareBody.lo -rm -f ./qpid/framing/QueueDeleteBody.$(OBJEXT) -rm -f ./qpid/framing/QueueDeleteBody.lo -rm -f ./qpid/framing/QueuePurgeBody.$(OBJEXT) -rm -f ./qpid/framing/QueuePurgeBody.lo -rm -f ./qpid/framing/QueueQueryBody.$(OBJEXT) -rm -f ./qpid/framing/QueueQueryBody.lo -rm -f ./qpid/framing/QueueQueryResult.$(OBJEXT) -rm -f ./qpid/framing/QueueQueryResult.lo -rm -f ./qpid/framing/ReplyTo.$(OBJEXT) -rm -f ./qpid/framing/ReplyTo.lo -rm -f ./qpid/framing/ServerInvoker.$(OBJEXT) -rm -f ./qpid/framing/ServerInvoker.lo -rm -f ./qpid/framing/SessionAttachBody.$(OBJEXT) -rm -f ./qpid/framing/SessionAttachBody.lo -rm -f ./qpid/framing/SessionAttachedBody.$(OBJEXT) -rm -f ./qpid/framing/SessionAttachedBody.lo -rm -f ./qpid/framing/SessionCommandPointBody.$(OBJEXT) -rm -f ./qpid/framing/SessionCommandPointBody.lo -rm -f ./qpid/framing/SessionCompletedBody.$(OBJEXT) -rm -f ./qpid/framing/SessionCompletedBody.lo -rm -f ./qpid/framing/SessionConfirmedBody.$(OBJEXT) -rm -f ./qpid/framing/SessionConfirmedBody.lo -rm -f ./qpid/framing/SessionDetachBody.$(OBJEXT) -rm -f ./qpid/framing/SessionDetachBody.lo -rm -f ./qpid/framing/SessionDetachedBody.$(OBJEXT) -rm -f ./qpid/framing/SessionDetachedBody.lo -rm -f ./qpid/framing/SessionExpectedBody.$(OBJEXT) -rm -f ./qpid/framing/SessionExpectedBody.lo -rm -f ./qpid/framing/SessionFlushBody.$(OBJEXT) -rm -f ./qpid/framing/SessionFlushBody.lo -rm -f ./qpid/framing/SessionGapBody.$(OBJEXT) -rm -f ./qpid/framing/SessionGapBody.lo -rm -f ./qpid/framing/SessionKnownCompletedBody.$(OBJEXT) -rm -f ./qpid/framing/SessionKnownCompletedBody.lo -rm -f ./qpid/framing/SessionRequestTimeoutBody.$(OBJEXT) -rm -f ./qpid/framing/SessionRequestTimeoutBody.lo -rm -f ./qpid/framing/SessionTimeoutBody.$(OBJEXT) -rm -f ./qpid/framing/SessionTimeoutBody.lo -rm -f ./qpid/framing/StreamCancelBody.$(OBJEXT) -rm -f ./qpid/framing/StreamCancelBody.lo -rm -f ./qpid/framing/StreamConsumeBody.$(OBJEXT) -rm -f ./qpid/framing/StreamConsumeBody.lo -rm -f ./qpid/framing/StreamConsumeOkBody.$(OBJEXT) -rm -f ./qpid/framing/StreamConsumeOkBody.lo -rm -f ./qpid/framing/StreamDeliverBody.$(OBJEXT) -rm -f ./qpid/framing/StreamDeliverBody.lo -rm -f ./qpid/framing/StreamProperties.$(OBJEXT) -rm -f ./qpid/framing/StreamProperties.lo -rm -f ./qpid/framing/StreamPublishBody.$(OBJEXT) -rm -f ./qpid/framing/StreamPublishBody.lo -rm -f ./qpid/framing/StreamQosBody.$(OBJEXT) -rm -f ./qpid/framing/StreamQosBody.lo -rm -f ./qpid/framing/StreamQosOkBody.$(OBJEXT) -rm -f ./qpid/framing/StreamQosOkBody.lo -rm -f ./qpid/framing/StreamReturnBody.$(OBJEXT) -rm -f ./qpid/framing/StreamReturnBody.lo -rm -f ./qpid/framing/TxCommitBody.$(OBJEXT) -rm -f ./qpid/framing/TxCommitBody.lo -rm -f ./qpid/framing/TxRollbackBody.$(OBJEXT) -rm -f ./qpid/framing/TxRollbackBody.lo -rm -f ./qpid/framing/TxSelectBody.$(OBJEXT) -rm -f ./qpid/framing/TxSelectBody.lo -rm -f ./qpid/framing/TypeCode.$(OBJEXT) -rm -f ./qpid/framing/TypeCode.lo -rm -f ./qpid/framing/XaResult.$(OBJEXT) -rm -f ./qpid/framing/XaResult.lo -rm -f ./qpid/framing/Xid.$(OBJEXT) -rm -f ./qpid/framing/Xid.lo -rm -f ./qpid/framing/reply_exceptions.$(OBJEXT) -rm -f ./qpid/framing/reply_exceptions.lo -rm -f posix/qpidd-QpiddBroker.$(OBJEXT) -rm -f qmf/Agent.$(OBJEXT) -rm -f qmf/Agent.lo -rm -f qmf/AgentEvent.$(OBJEXT) -rm -f qmf/AgentEvent.lo -rm -f qmf/AgentSession.$(OBJEXT) -rm -f qmf/AgentSession.lo -rm -f qmf/AgentSubscription.$(OBJEXT) -rm -f qmf/AgentSubscription.lo -rm -f qmf/ConsoleEvent.$(OBJEXT) -rm -f qmf/ConsoleEvent.lo -rm -f qmf/ConsoleSession.$(OBJEXT) -rm -f qmf/ConsoleSession.lo -rm -f qmf/Data.$(OBJEXT) -rm -f qmf/Data.lo -rm -f qmf/DataAddr.$(OBJEXT) -rm -f qmf/DataAddr.lo -rm -f qmf/EventNotifierImpl.$(OBJEXT) -rm -f qmf/EventNotifierImpl.lo -rm -f qmf/Expression.$(OBJEXT) -rm -f qmf/Expression.lo -rm -f qmf/Hash.$(OBJEXT) -rm -f qmf/Hash.lo -rm -f qmf/PosixEventNotifier.$(OBJEXT) -rm -f qmf/PosixEventNotifier.lo -rm -f qmf/PosixEventNotifierImpl.$(OBJEXT) -rm -f qmf/PosixEventNotifierImpl.lo -rm -f qmf/Query.$(OBJEXT) -rm -f qmf/Query.lo -rm -f qmf/Schema.$(OBJEXT) -rm -f qmf/Schema.lo -rm -f qmf/SchemaCache.$(OBJEXT) -rm -f qmf/SchemaCache.lo -rm -f qmf/SchemaId.$(OBJEXT) -rm -f qmf/SchemaId.lo -rm -f qmf/SchemaMethod.$(OBJEXT) -rm -f qmf/SchemaMethod.lo -rm -f qmf/SchemaProperty.$(OBJEXT) -rm -f qmf/SchemaProperty.lo -rm -f qmf/Subscription.$(OBJEXT) -rm -f qmf/Subscription.lo -rm -f qmf/constants.$(OBJEXT) -rm -f qmf/constants.lo -rm -f qmf/engine/Agent.$(OBJEXT) -rm -f qmf/engine/Agent.lo -rm -f qmf/engine/BrokerProxyImpl.$(OBJEXT) -rm -f qmf/engine/BrokerProxyImpl.lo -rm -f qmf/engine/ConnectionSettingsImpl.$(OBJEXT) -rm -f qmf/engine/ConnectionSettingsImpl.lo -rm -f qmf/engine/ConsoleImpl.$(OBJEXT) -rm -f qmf/engine/ConsoleImpl.lo -rm -f qmf/engine/EventImpl.$(OBJEXT) -rm -f qmf/engine/EventImpl.lo -rm -f qmf/engine/MessageImpl.$(OBJEXT) -rm -f qmf/engine/MessageImpl.lo -rm -f qmf/engine/ObjectIdImpl.$(OBJEXT) -rm -f qmf/engine/ObjectIdImpl.lo -rm -f qmf/engine/ObjectImpl.$(OBJEXT) -rm -f qmf/engine/ObjectImpl.lo -rm -f qmf/engine/Protocol.$(OBJEXT) -rm -f qmf/engine/Protocol.lo -rm -f qmf/engine/QueryImpl.$(OBJEXT) -rm -f qmf/engine/QueryImpl.lo -rm -f qmf/engine/ResilientConnection.$(OBJEXT) -rm -f qmf/engine/ResilientConnection.lo -rm -f qmf/engine/SchemaImpl.$(OBJEXT) -rm -f qmf/engine/SchemaImpl.lo -rm -f qmf/engine/SequenceManager.$(OBJEXT) -rm -f qmf/engine/SequenceManager.lo -rm -f qmf/engine/ValueImpl.$(OBJEXT) -rm -f qmf/engine/ValueImpl.lo -rm -f qmf/exceptions.$(OBJEXT) -rm -f qmf/exceptions.lo -rm -f qmf/org/apache/qpid/acl/Acl.$(OBJEXT) -rm -f qmf/org/apache/qpid/acl/Acl.lo -rm -f qmf/org/apache/qpid/acl/EventAllow.$(OBJEXT) -rm -f qmf/org/apache/qpid/acl/EventAllow.lo -rm -f qmf/org/apache/qpid/acl/EventDeny.$(OBJEXT) -rm -f qmf/org/apache/qpid/acl/EventDeny.lo -rm -f qmf/org/apache/qpid/acl/EventFileLoadFailed.$(OBJEXT) -rm -f qmf/org/apache/qpid/acl/EventFileLoadFailed.lo -rm -f qmf/org/apache/qpid/acl/EventFileLoaded.$(OBJEXT) -rm -f qmf/org/apache/qpid/acl/EventFileLoaded.lo -rm -f qmf/org/apache/qpid/acl/Package.$(OBJEXT) -rm -f qmf/org/apache/qpid/acl/Package.lo -rm -f qmf/org/apache/qpid/broker/Agent.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Agent.lo -rm -f qmf/org/apache/qpid/broker/Binding.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Binding.lo -rm -f qmf/org/apache/qpid/broker/Bridge.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Bridge.lo -rm -f qmf/org/apache/qpid/broker/Broker.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Broker.lo -rm -f qmf/org/apache/qpid/broker/Connection.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Connection.lo -rm -f qmf/org/apache/qpid/broker/EventBind.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventBind.lo -rm -f qmf/org/apache/qpid/broker/EventBrokerLinkDown.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventBrokerLinkDown.lo -rm -f qmf/org/apache/qpid/broker/EventBrokerLinkUp.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventBrokerLinkUp.lo -rm -f qmf/org/apache/qpid/broker/EventClientConnect.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventClientConnect.lo -rm -f qmf/org/apache/qpid/broker/EventClientConnectFail.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventClientConnectFail.lo -rm -f qmf/org/apache/qpid/broker/EventClientDisconnect.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventClientDisconnect.lo -rm -f qmf/org/apache/qpid/broker/EventExchangeDeclare.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventExchangeDeclare.lo -rm -f qmf/org/apache/qpid/broker/EventExchangeDelete.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventExchangeDelete.lo -rm -f qmf/org/apache/qpid/broker/EventQueueDeclare.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventQueueDeclare.lo -rm -f qmf/org/apache/qpid/broker/EventQueueDelete.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventQueueDelete.lo -rm -f qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.lo -rm -f qmf/org/apache/qpid/broker/EventSubscribe.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventSubscribe.lo -rm -f qmf/org/apache/qpid/broker/EventUnbind.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventUnbind.lo -rm -f qmf/org/apache/qpid/broker/EventUnsubscribe.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/EventUnsubscribe.lo -rm -f qmf/org/apache/qpid/broker/Exchange.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Exchange.lo -rm -f qmf/org/apache/qpid/broker/Link.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Link.lo -rm -f qmf/org/apache/qpid/broker/ManagementSetupState.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/ManagementSetupState.lo -rm -f qmf/org/apache/qpid/broker/Memory.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Memory.lo -rm -f qmf/org/apache/qpid/broker/Package.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Package.lo -rm -f qmf/org/apache/qpid/broker/Queue.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Queue.lo -rm -f qmf/org/apache/qpid/broker/Session.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Session.lo -rm -f qmf/org/apache/qpid/broker/Subscription.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Subscription.lo -rm -f qmf/org/apache/qpid/broker/System.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/System.lo -rm -f qmf/org/apache/qpid/broker/Vhost.$(OBJEXT) -rm -f qmf/org/apache/qpid/broker/Vhost.lo -rm -f qmf/org/apache/qpid/cluster/Cluster.$(OBJEXT) -rm -f qmf/org/apache/qpid/cluster/Cluster.lo -rm -f qmf/org/apache/qpid/cluster/Package.$(OBJEXT) -rm -f qmf/org/apache/qpid/cluster/Package.lo -rm -f qmf/org/apache/qpid/ha/HaBroker.$(OBJEXT) -rm -f qmf/org/apache/qpid/ha/HaBroker.lo -rm -f qmf/org/apache/qpid/ha/Package.$(OBJEXT) -rm -f qmf/org/apache/qpid/ha/Package.lo -rm -f qpid/Address.$(OBJEXT) -rm -f qpid/Address.lo -rm -f qpid/DataDir.$(OBJEXT) -rm -f qpid/DataDir.lo -rm -f qpid/Exception.$(OBJEXT) -rm -f qpid/Exception.lo -rm -f qpid/Modules.$(OBJEXT) -rm -f qpid/Modules.lo -rm -f qpid/Options.$(OBJEXT) -rm -f qpid/Options.lo -rm -f qpid/Plugin.$(OBJEXT) -rm -f qpid/Plugin.lo -rm -f qpid/RefCountedBuffer.$(OBJEXT) -rm -f qpid/RefCountedBuffer.lo -rm -f qpid/SaslFactory.$(OBJEXT) -rm -f qpid/SaslFactory.lo -rm -f qpid/SessionId.$(OBJEXT) -rm -f qpid/SessionId.lo -rm -f qpid/SessionState.$(OBJEXT) -rm -f qpid/SessionState.lo -rm -f qpid/StringUtils.$(OBJEXT) -rm -f qpid/StringUtils.lo -rm -f qpid/Url.$(OBJEXT) -rm -f qpid/Url.lo -rm -f qpid/UrlArray.$(OBJEXT) -rm -f qpid/UrlArray.lo -rm -f qpid/acl/Acl.$(OBJEXT) -rm -f qpid/acl/Acl.lo -rm -f qpid/acl/AclData.$(OBJEXT) -rm -f qpid/acl/AclData.lo -rm -f qpid/acl/AclPlugin.$(OBJEXT) -rm -f qpid/acl/AclPlugin.lo -rm -f qpid/acl/AclReader.$(OBJEXT) -rm -f qpid/acl/AclReader.lo -rm -f qpid/acl/AclValidator.$(OBJEXT) -rm -f qpid/acl/AclValidator.lo -rm -f qpid/agent/ManagementAgentImpl.$(OBJEXT) -rm -f qpid/agent/ManagementAgentImpl.lo -rm -f qpid/amqp_0_10/Codecs.$(OBJEXT) -rm -f qpid/amqp_0_10/Codecs.lo -rm -f qpid/amqp_0_10/Connection.$(OBJEXT) -rm -f qpid/amqp_0_10/Connection.lo -rm -f qpid/amqp_0_10/SessionHandler.$(OBJEXT) -rm -f qpid/amqp_0_10/SessionHandler.lo -rm -f qpid/assert.$(OBJEXT) -rm -f qpid/assert.lo -rm -f qpid/broker/Bridge.$(OBJEXT) -rm -f qpid/broker/Bridge.lo -rm -f qpid/broker/Broker.$(OBJEXT) -rm -f qpid/broker/Broker.lo -rm -f qpid/broker/Connection.$(OBJEXT) -rm -f qpid/broker/Connection.lo -rm -f qpid/broker/ConnectionFactory.$(OBJEXT) -rm -f qpid/broker/ConnectionFactory.lo -rm -f qpid/broker/ConnectionHandler.$(OBJEXT) -rm -f qpid/broker/ConnectionHandler.lo -rm -f qpid/broker/Credit.$(OBJEXT) -rm -f qpid/broker/Credit.lo -rm -f qpid/broker/Daemon.$(OBJEXT) -rm -f qpid/broker/Daemon.lo -rm -f qpid/broker/DeliverableMessage.$(OBJEXT) -rm -f qpid/broker/DeliverableMessage.lo -rm -f qpid/broker/DeliveryRecord.$(OBJEXT) -rm -f qpid/broker/DeliveryRecord.lo -rm -f qpid/broker/DirectExchange.$(OBJEXT) -rm -f qpid/broker/DirectExchange.lo -rm -f qpid/broker/DtxAck.$(OBJEXT) -rm -f qpid/broker/DtxAck.lo -rm -f qpid/broker/DtxBuffer.$(OBJEXT) -rm -f qpid/broker/DtxBuffer.lo -rm -f qpid/broker/DtxManager.$(OBJEXT) -rm -f qpid/broker/DtxManager.lo -rm -f qpid/broker/DtxTimeout.$(OBJEXT) -rm -f qpid/broker/DtxTimeout.lo -rm -f qpid/broker/DtxWorkRecord.$(OBJEXT) -rm -f qpid/broker/DtxWorkRecord.lo -rm -f qpid/broker/Exchange.$(OBJEXT) -rm -f qpid/broker/Exchange.lo -rm -f qpid/broker/ExchangeRegistry.$(OBJEXT) -rm -f qpid/broker/ExchangeRegistry.lo -rm -f qpid/broker/ExpiryPolicy.$(OBJEXT) -rm -f qpid/broker/ExpiryPolicy.lo -rm -f qpid/broker/Fairshare.$(OBJEXT) -rm -f qpid/broker/Fairshare.lo -rm -f qpid/broker/FanOutExchange.$(OBJEXT) -rm -f qpid/broker/FanOutExchange.lo -rm -f qpid/broker/FifoDistributor.$(OBJEXT) -rm -f qpid/broker/FifoDistributor.lo -rm -f qpid/broker/HeadersExchange.$(OBJEXT) -rm -f qpid/broker/HeadersExchange.lo -rm -f qpid/broker/LegacyLVQ.$(OBJEXT) -rm -f qpid/broker/LegacyLVQ.lo -rm -f qpid/broker/Link.$(OBJEXT) -rm -f qpid/broker/Link.lo -rm -f qpid/broker/LinkRegistry.$(OBJEXT) -rm -f qpid/broker/LinkRegistry.lo -rm -f qpid/broker/Message.$(OBJEXT) -rm -f qpid/broker/Message.lo -rm -f qpid/broker/MessageAdapter.$(OBJEXT) -rm -f qpid/broker/MessageAdapter.lo -rm -f qpid/broker/MessageBuilder.$(OBJEXT) -rm -f qpid/broker/MessageBuilder.lo -rm -f qpid/broker/MessageDeque.$(OBJEXT) -rm -f qpid/broker/MessageDeque.lo -rm -f qpid/broker/MessageGroupManager.$(OBJEXT) -rm -f qpid/broker/MessageGroupManager.lo -rm -f qpid/broker/MessageMap.$(OBJEXT) -rm -f qpid/broker/MessageMap.lo -rm -f qpid/broker/MessageStoreModule.$(OBJEXT) -rm -f qpid/broker/MessageStoreModule.lo -rm -f qpid/broker/NameGenerator.$(OBJEXT) -rm -f qpid/broker/NameGenerator.lo -rm -f qpid/broker/NullMessageStore.$(OBJEXT) -rm -f qpid/broker/NullMessageStore.lo -rm -f qpid/broker/PersistableMessage.$(OBJEXT) -rm -f qpid/broker/PersistableMessage.lo -rm -f qpid/broker/PriorityQueue.$(OBJEXT) -rm -f qpid/broker/PriorityQueue.lo -rm -f qpid/broker/Queue.$(OBJEXT) -rm -f qpid/broker/Queue.lo -rm -f qpid/broker/QueueBindings.$(OBJEXT) -rm -f qpid/broker/QueueBindings.lo -rm -f qpid/broker/QueueCleaner.$(OBJEXT) -rm -f qpid/broker/QueueCleaner.lo -rm -f qpid/broker/QueueEvents.$(OBJEXT) -rm -f qpid/broker/QueueEvents.lo -rm -f qpid/broker/QueueFlowLimit.$(OBJEXT) -rm -f qpid/broker/QueueFlowLimit.lo -rm -f qpid/broker/QueueListeners.$(OBJEXT) -rm -f qpid/broker/QueueListeners.lo -rm -f qpid/broker/QueuePolicy.$(OBJEXT) -rm -f qpid/broker/QueuePolicy.lo -rm -f qpid/broker/QueueRegistry.$(OBJEXT) -rm -f qpid/broker/QueueRegistry.lo -rm -f qpid/broker/RecoveredDequeue.$(OBJEXT) -rm -f qpid/broker/RecoveredDequeue.lo -rm -f qpid/broker/RecoveredEnqueue.$(OBJEXT) -rm -f qpid/broker/RecoveredEnqueue.lo -rm -f qpid/broker/RecoveryManagerImpl.$(OBJEXT) -rm -f qpid/broker/RecoveryManagerImpl.lo -rm -f qpid/broker/RetryList.$(OBJEXT) -rm -f qpid/broker/RetryList.lo -rm -f qpid/broker/SaslAuthenticator.$(OBJEXT) -rm -f qpid/broker/SaslAuthenticator.lo -rm -f qpid/broker/SecureConnection.$(OBJEXT) -rm -f qpid/broker/SecureConnection.lo -rm -f qpid/broker/SecureConnectionFactory.$(OBJEXT) -rm -f qpid/broker/SecureConnectionFactory.lo -rm -f qpid/broker/SemanticState.$(OBJEXT) -rm -f qpid/broker/SemanticState.lo -rm -f qpid/broker/SessionAdapter.$(OBJEXT) -rm -f qpid/broker/SessionAdapter.lo -rm -f qpid/broker/SessionHandler.$(OBJEXT) -rm -f qpid/broker/SessionHandler.lo -rm -f qpid/broker/SessionManager.$(OBJEXT) -rm -f qpid/broker/SessionManager.lo -rm -f qpid/broker/SessionState.$(OBJEXT) -rm -f qpid/broker/SessionState.lo -rm -f qpid/broker/SignalHandler.$(OBJEXT) -rm -f qpid/broker/SignalHandler.lo -rm -f qpid/broker/System.$(OBJEXT) -rm -f qpid/broker/System.lo -rm -f qpid/broker/ThresholdAlerts.$(OBJEXT) -rm -f qpid/broker/ThresholdAlerts.lo -rm -f qpid/broker/TopicExchange.$(OBJEXT) -rm -f qpid/broker/TopicExchange.lo -rm -f qpid/broker/TxAccept.$(OBJEXT) -rm -f qpid/broker/TxAccept.lo -rm -f qpid/broker/TxBuffer.$(OBJEXT) -rm -f qpid/broker/TxBuffer.lo -rm -f qpid/broker/TxPublish.$(OBJEXT) -rm -f qpid/broker/TxPublish.lo -rm -f qpid/broker/Vhost.$(OBJEXT) -rm -f qpid/broker/Vhost.lo -rm -f qpid/broker/posix/BrokerDefaults.$(OBJEXT) -rm -f qpid/broker/posix/BrokerDefaults.lo -rm -f qpid/client/amqp0_10/AcceptTracker.$(OBJEXT) -rm -f qpid/client/amqp0_10/AcceptTracker.lo -rm -f qpid/client/amqp0_10/AddressResolution.$(OBJEXT) -rm -f qpid/client/amqp0_10/AddressResolution.lo -rm -f qpid/client/amqp0_10/ConnectionImpl.$(OBJEXT) -rm -f qpid/client/amqp0_10/ConnectionImpl.lo -rm -f qpid/client/amqp0_10/IncomingMessages.$(OBJEXT) -rm -f qpid/client/amqp0_10/IncomingMessages.lo -rm -f qpid/client/amqp0_10/OutgoingMessage.$(OBJEXT) -rm -f qpid/client/amqp0_10/OutgoingMessage.lo -rm -f qpid/client/amqp0_10/ReceiverImpl.$(OBJEXT) -rm -f qpid/client/amqp0_10/ReceiverImpl.lo -rm -f qpid/client/amqp0_10/SenderImpl.$(OBJEXT) -rm -f qpid/client/amqp0_10/SenderImpl.lo -rm -f qpid/client/amqp0_10/SessionImpl.$(OBJEXT) -rm -f qpid/client/amqp0_10/SessionImpl.lo -rm -f qpid/client/libqpidclient_la-Bounds.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Bounds.lo -rm -f qpid/client/libqpidclient_la-Completion.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Completion.lo -rm -f qpid/client/libqpidclient_la-Connection.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Connection.lo -rm -f qpid/client/libqpidclient_la-ConnectionHandler.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-ConnectionHandler.lo -rm -f qpid/client/libqpidclient_la-ConnectionImpl.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-ConnectionImpl.lo -rm -f qpid/client/libqpidclient_la-ConnectionSettings.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-ConnectionSettings.lo -rm -f qpid/client/libqpidclient_la-Connector.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Connector.lo -rm -f qpid/client/libqpidclient_la-Demux.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Demux.lo -rm -f qpid/client/libqpidclient_la-Dispatcher.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Dispatcher.lo -rm -f qpid/client/libqpidclient_la-FailoverListener.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-FailoverListener.lo -rm -f qpid/client/libqpidclient_la-FailoverManager.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-FailoverManager.lo -rm -f qpid/client/libqpidclient_la-Future.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Future.lo -rm -f qpid/client/libqpidclient_la-FutureCompletion.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-FutureCompletion.lo -rm -f qpid/client/libqpidclient_la-FutureResult.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-FutureResult.lo -rm -f qpid/client/libqpidclient_la-LoadPlugins.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-LoadPlugins.lo -rm -f qpid/client/libqpidclient_la-LocalQueue.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-LocalQueue.lo -rm -f qpid/client/libqpidclient_la-LocalQueueImpl.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-LocalQueueImpl.lo -rm -f qpid/client/libqpidclient_la-Message.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Message.lo -rm -f qpid/client/libqpidclient_la-MessageImpl.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-MessageImpl.lo -rm -f qpid/client/libqpidclient_la-MessageListener.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-MessageListener.lo -rm -f qpid/client/libqpidclient_la-MessageReplayTracker.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-MessageReplayTracker.lo -rm -f qpid/client/libqpidclient_la-QueueOptions.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-QueueOptions.lo -rm -f qpid/client/libqpidclient_la-Results.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Results.lo -rm -f qpid/client/libqpidclient_la-SessionBase_0_10.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-SessionBase_0_10.lo -rm -f qpid/client/libqpidclient_la-SessionImpl.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-SessionImpl.lo -rm -f qpid/client/libqpidclient_la-StateManager.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-StateManager.lo -rm -f qpid/client/libqpidclient_la-Subscription.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-Subscription.lo -rm -f qpid/client/libqpidclient_la-SubscriptionImpl.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-SubscriptionImpl.lo -rm -f qpid/client/libqpidclient_la-SubscriptionManager.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-SubscriptionManager.lo -rm -f qpid/client/libqpidclient_la-SubscriptionManagerImpl.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-SubscriptionManagerImpl.lo -rm -f qpid/client/libqpidclient_la-TCPConnector.$(OBJEXT) -rm -f qpid/client/libqpidclient_la-TCPConnector.lo -rm -f qpid/client/rdmaconnector_la-RdmaConnector.$(OBJEXT) -rm -f qpid/client/rdmaconnector_la-RdmaConnector.lo -rm -f qpid/client/sslconnector_la-SslConnector.$(OBJEXT) -rm -f qpid/client/sslconnector_la-SslConnector.lo -rm -f qpid/cluster/WatchDogPlugin.$(OBJEXT) -rm -f qpid/cluster/WatchDogPlugin.lo -rm -f qpid/cluster/cluster_la-Cluster.$(OBJEXT) -rm -f qpid/cluster/cluster_la-Cluster.lo -rm -f qpid/cluster/cluster_la-ClusterMap.$(OBJEXT) -rm -f qpid/cluster/cluster_la-ClusterMap.lo -rm -f qpid/cluster/cluster_la-ClusterPlugin.$(OBJEXT) -rm -f qpid/cluster/cluster_la-ClusterPlugin.lo -rm -f qpid/cluster/cluster_la-ClusterTimer.$(OBJEXT) -rm -f qpid/cluster/cluster_la-ClusterTimer.lo -rm -f qpid/cluster/cluster_la-Connection.$(OBJEXT) -rm -f qpid/cluster/cluster_la-Connection.lo -rm -f qpid/cluster/cluster_la-ConnectionCodec.$(OBJEXT) -rm -f qpid/cluster/cluster_la-ConnectionCodec.lo -rm -f qpid/cluster/cluster_la-Cpg.$(OBJEXT) -rm -f qpid/cluster/cluster_la-Cpg.lo -rm -f qpid/cluster/cluster_la-CredentialsExchange.$(OBJEXT) -rm -f qpid/cluster/cluster_la-CredentialsExchange.lo -rm -f qpid/cluster/cluster_la-Decoder.$(OBJEXT) -rm -f qpid/cluster/cluster_la-Decoder.lo -rm -f qpid/cluster/cluster_la-ErrorCheck.$(OBJEXT) -rm -f qpid/cluster/cluster_la-ErrorCheck.lo -rm -f qpid/cluster/cluster_la-Event.$(OBJEXT) -rm -f qpid/cluster/cluster_la-Event.lo -rm -f qpid/cluster/cluster_la-EventFrame.$(OBJEXT) -rm -f qpid/cluster/cluster_la-EventFrame.lo -rm -f qpid/cluster/cluster_la-ExpiryPolicy.$(OBJEXT) -rm -f qpid/cluster/cluster_la-ExpiryPolicy.lo -rm -f qpid/cluster/cluster_la-FailoverExchange.$(OBJEXT) -rm -f qpid/cluster/cluster_la-FailoverExchange.lo -rm -f qpid/cluster/cluster_la-InitialStatusMap.$(OBJEXT) -rm -f qpid/cluster/cluster_la-InitialStatusMap.lo -rm -f qpid/cluster/cluster_la-MemberSet.$(OBJEXT) -rm -f qpid/cluster/cluster_la-MemberSet.lo -rm -f qpid/cluster/cluster_la-Multicaster.$(OBJEXT) -rm -f qpid/cluster/cluster_la-Multicaster.lo -rm -f qpid/cluster/cluster_la-OutputInterceptor.$(OBJEXT) -rm -f qpid/cluster/cluster_la-OutputInterceptor.lo -rm -f qpid/cluster/cluster_la-PollerDispatch.$(OBJEXT) -rm -f qpid/cluster/cluster_la-PollerDispatch.lo -rm -f qpid/cluster/cluster_la-Quorum_cman.$(OBJEXT) -rm -f qpid/cluster/cluster_la-Quorum_cman.lo -rm -f qpid/cluster/cluster_la-RetractClient.$(OBJEXT) -rm -f qpid/cluster/cluster_la-RetractClient.lo -rm -f qpid/cluster/cluster_la-SecureConnectionFactory.$(OBJEXT) -rm -f qpid/cluster/cluster_la-SecureConnectionFactory.lo -rm -f qpid/cluster/cluster_la-StoreStatus.$(OBJEXT) -rm -f qpid/cluster/cluster_la-StoreStatus.lo -rm -f qpid/cluster/cluster_la-UpdateClient.$(OBJEXT) -rm -f qpid/cluster/cluster_la-UpdateClient.lo -rm -f qpid/cluster/cluster_la-UpdateDataExchange.$(OBJEXT) -rm -f qpid/cluster/cluster_la-UpdateDataExchange.lo -rm -f qpid/cluster/cluster_la-UpdateExchange.$(OBJEXT) -rm -f qpid/cluster/cluster_la-UpdateExchange.lo -rm -f qpid/cluster/qpidd_watchdog.$(OBJEXT) -rm -f qpid/console/Agent.$(OBJEXT) -rm -f qpid/console/Agent.lo -rm -f qpid/console/Broker.$(OBJEXT) -rm -f qpid/console/Broker.lo -rm -f qpid/console/ClassKey.$(OBJEXT) -rm -f qpid/console/ClassKey.lo -rm -f qpid/console/Event.$(OBJEXT) -rm -f qpid/console/Event.lo -rm -f qpid/console/Object.$(OBJEXT) -rm -f qpid/console/Object.lo -rm -f qpid/console/ObjectId.$(OBJEXT) -rm -f qpid/console/ObjectId.lo -rm -f qpid/console/Package.$(OBJEXT) -rm -f qpid/console/Package.lo -rm -f qpid/console/Schema.$(OBJEXT) -rm -f qpid/console/Schema.lo -rm -f qpid/console/SequenceManager.$(OBJEXT) -rm -f qpid/console/SequenceManager.lo -rm -f qpid/console/SessionManager.$(OBJEXT) -rm -f qpid/console/SessionManager.lo -rm -f qpid/console/Value.$(OBJEXT) -rm -f qpid/console/Value.lo -rm -f qpid/framing/AMQBody.$(OBJEXT) -rm -f qpid/framing/AMQBody.lo -rm -f qpid/framing/AMQContentBody.$(OBJEXT) -rm -f qpid/framing/AMQContentBody.lo -rm -f qpid/framing/AMQFrame.$(OBJEXT) -rm -f qpid/framing/AMQFrame.lo -rm -f qpid/framing/AMQHeaderBody.$(OBJEXT) -rm -f qpid/framing/AMQHeaderBody.lo -rm -f qpid/framing/AMQHeartbeatBody.$(OBJEXT) -rm -f qpid/framing/AMQHeartbeatBody.lo -rm -f qpid/framing/AMQMethodBody.$(OBJEXT) -rm -f qpid/framing/AMQMethodBody.lo -rm -f qpid/framing/AccumulatedAck.$(OBJEXT) -rm -f qpid/framing/AccumulatedAck.lo -rm -f qpid/framing/Array.$(OBJEXT) -rm -f qpid/framing/Array.lo -rm -f qpid/framing/BodyHandler.$(OBJEXT) -rm -f qpid/framing/BodyHandler.lo -rm -f qpid/framing/Buffer.$(OBJEXT) -rm -f qpid/framing/Buffer.lo -rm -f qpid/framing/Endian.$(OBJEXT) -rm -f qpid/framing/Endian.lo -rm -f qpid/framing/FieldTable.$(OBJEXT) -rm -f qpid/framing/FieldTable.lo -rm -f qpid/framing/FieldValue.$(OBJEXT) -rm -f qpid/framing/FieldValue.lo -rm -f qpid/framing/FrameDecoder.$(OBJEXT) -rm -f qpid/framing/FrameDecoder.lo -rm -f qpid/framing/FrameSet.$(OBJEXT) -rm -f qpid/framing/FrameSet.lo -rm -f qpid/framing/List.$(OBJEXT) -rm -f qpid/framing/List.lo -rm -f qpid/framing/ProtocolInitiation.$(OBJEXT) -rm -f qpid/framing/ProtocolInitiation.lo -rm -f qpid/framing/ProtocolVersion.$(OBJEXT) -rm -f qpid/framing/ProtocolVersion.lo -rm -f qpid/framing/Proxy.$(OBJEXT) -rm -f qpid/framing/Proxy.lo -rm -f qpid/framing/SendContent.$(OBJEXT) -rm -f qpid/framing/SendContent.lo -rm -f qpid/framing/SequenceNumber.$(OBJEXT) -rm -f qpid/framing/SequenceNumber.lo -rm -f qpid/framing/SequenceNumberSet.$(OBJEXT) -rm -f qpid/framing/SequenceNumberSet.lo -rm -f qpid/framing/SequenceSet.$(OBJEXT) -rm -f qpid/framing/SequenceSet.lo -rm -f qpid/framing/TransferContent.$(OBJEXT) -rm -f qpid/framing/TransferContent.lo -rm -f qpid/framing/Uuid.$(OBJEXT) -rm -f qpid/framing/Uuid.lo -rm -f qpid/ha/Backup.$(OBJEXT) -rm -f qpid/ha/Backup.lo -rm -f qpid/ha/BrokerReplicator.$(OBJEXT) -rm -f qpid/ha/BrokerReplicator.lo -rm -f qpid/ha/ConnectionExcluder.$(OBJEXT) -rm -f qpid/ha/ConnectionExcluder.lo -rm -f qpid/ha/HaBroker.$(OBJEXT) -rm -f qpid/ha/HaBroker.lo -rm -f qpid/ha/HaPlugin.$(OBJEXT) -rm -f qpid/ha/HaPlugin.lo -rm -f qpid/ha/QueueReplicator.$(OBJEXT) -rm -f qpid/ha/QueueReplicator.lo -rm -f qpid/ha/ReplicatingSubscription.$(OBJEXT) -rm -f qpid/ha/ReplicatingSubscription.lo -rm -f qpid/log/Logger.$(OBJEXT) -rm -f qpid/log/Logger.lo -rm -f qpid/log/Options.$(OBJEXT) -rm -f qpid/log/Options.lo -rm -f qpid/log/OstreamOutput.$(OBJEXT) -rm -f qpid/log/OstreamOutput.lo -rm -f qpid/log/Selector.$(OBJEXT) -rm -f qpid/log/Selector.lo -rm -f qpid/log/Statement.$(OBJEXT) -rm -f qpid/log/Statement.lo -rm -f qpid/log/posix/SinkOptions.$(OBJEXT) -rm -f qpid/log/posix/SinkOptions.lo -rm -f qpid/management/Buffer.$(OBJEXT) -rm -f qpid/management/Buffer.lo -rm -f qpid/management/ConnectionSettings.$(OBJEXT) -rm -f qpid/management/ConnectionSettings.lo -rm -f qpid/management/Manageable.$(OBJEXT) -rm -f qpid/management/Manageable.lo -rm -f qpid/management/ManagementAgent.$(OBJEXT) -rm -f qpid/management/ManagementAgent.lo -rm -f qpid/management/ManagementDirectExchange.$(OBJEXT) -rm -f qpid/management/ManagementDirectExchange.lo -rm -f qpid/management/ManagementObject.$(OBJEXT) -rm -f qpid/management/ManagementObject.lo -rm -f qpid/management/ManagementTopicExchange.$(OBJEXT) -rm -f qpid/management/ManagementTopicExchange.lo -rm -f qpid/management/Mutex.$(OBJEXT) -rm -f qpid/management/Mutex.lo -rm -f qpid/messaging/Address.$(OBJEXT) -rm -f qpid/messaging/Address.lo -rm -f qpid/messaging/AddressParser.$(OBJEXT) -rm -f qpid/messaging/AddressParser.lo -rm -f qpid/messaging/Connection.$(OBJEXT) -rm -f qpid/messaging/Connection.lo -rm -f qpid/messaging/Duration.$(OBJEXT) -rm -f qpid/messaging/Duration.lo -rm -f qpid/messaging/FailoverUpdates.$(OBJEXT) -rm -f qpid/messaging/FailoverUpdates.lo -rm -f qpid/messaging/Message.$(OBJEXT) -rm -f qpid/messaging/Message.lo -rm -f qpid/messaging/MessageImpl.$(OBJEXT) -rm -f qpid/messaging/MessageImpl.lo -rm -f qpid/messaging/Receiver.$(OBJEXT) -rm -f qpid/messaging/Receiver.lo -rm -f qpid/messaging/Sender.$(OBJEXT) -rm -f qpid/messaging/Sender.lo -rm -f qpid/messaging/Session.$(OBJEXT) -rm -f qpid/messaging/Session.lo -rm -f qpid/messaging/exceptions.$(OBJEXT) -rm -f qpid/messaging/exceptions.lo -rm -f qpid/replication/ReplicatingEventListener.$(OBJEXT) -rm -f qpid/replication/ReplicatingEventListener.lo -rm -f qpid/replication/ReplicationExchange.$(OBJEXT) -rm -f qpid/replication/ReplicationExchange.lo -rm -f qpid/sys/AggregateOutput.$(OBJEXT) -rm -f qpid/sys/AggregateOutput.lo -rm -f qpid/sys/AsynchIOHandler.$(OBJEXT) -rm -f qpid/sys/AsynchIOHandler.lo -rm -f qpid/sys/ClusterSafe.$(OBJEXT) -rm -f qpid/sys/ClusterSafe.lo -rm -f qpid/sys/DispatchHandle.$(OBJEXT) -rm -f qpid/sys/DispatchHandle.lo -rm -f qpid/sys/Dispatcher.$(OBJEXT) -rm -f qpid/sys/Dispatcher.lo -rm -f qpid/sys/Runnable.$(OBJEXT) -rm -f qpid/sys/Runnable.lo -rm -f qpid/sys/Shlib.$(OBJEXT) -rm -f qpid/sys/Shlib.lo -rm -f qpid/sys/TCPIOPlugin.$(OBJEXT) -rm -f qpid/sys/TCPIOPlugin.lo -rm -f qpid/sys/Timer.$(OBJEXT) -rm -f qpid/sys/Timer.lo -rm -f qpid/sys/TimerWarnings.$(OBJEXT) -rm -f qpid/sys/TimerWarnings.lo -rm -f qpid/sys/cyrus/CyrusSecurityLayer.$(OBJEXT) -rm -f qpid/sys/cyrus/CyrusSecurityLayer.lo -rm -f qpid/sys/epoll/EpollPoller.$(OBJEXT) -rm -f qpid/sys/epoll/EpollPoller.lo -rm -f qpid/sys/posix/AsynchIO.$(OBJEXT) -rm -f qpid/sys/posix/AsynchIO.lo -rm -f qpid/sys/posix/FileSysDir.$(OBJEXT) -rm -f qpid/sys/posix/FileSysDir.lo -rm -f qpid/sys/posix/Fork.$(OBJEXT) -rm -f qpid/sys/posix/Fork.lo -rm -f qpid/sys/posix/IOHandle.$(OBJEXT) -rm -f qpid/sys/posix/IOHandle.lo -rm -f qpid/sys/posix/LockFile.$(OBJEXT) -rm -f qpid/sys/posix/LockFile.lo -rm -f qpid/sys/posix/MemStat.$(OBJEXT) -rm -f qpid/sys/posix/MemStat.lo -rm -f qpid/sys/posix/Mutex.$(OBJEXT) -rm -f qpid/sys/posix/Mutex.lo -rm -f qpid/sys/posix/PipeHandle.$(OBJEXT) -rm -f qpid/sys/posix/PipeHandle.lo -rm -f qpid/sys/posix/PollableCondition.$(OBJEXT) -rm -f qpid/sys/posix/PollableCondition.lo -rm -f qpid/sys/posix/PosixPoller.$(OBJEXT) -rm -f qpid/sys/posix/PosixPoller.lo -rm -f qpid/sys/posix/Shlib.$(OBJEXT) -rm -f qpid/sys/posix/Shlib.lo -rm -f qpid/sys/posix/Socket.$(OBJEXT) -rm -f qpid/sys/posix/Socket.lo -rm -f qpid/sys/posix/SocketAddress.$(OBJEXT) -rm -f qpid/sys/posix/SocketAddress.lo -rm -f qpid/sys/posix/StrError.$(OBJEXT) -rm -f qpid/sys/posix/StrError.lo -rm -f qpid/sys/posix/SystemInfo.$(OBJEXT) -rm -f qpid/sys/posix/SystemInfo.lo -rm -f qpid/sys/posix/Thread.$(OBJEXT) -rm -f qpid/sys/posix/Thread.lo -rm -f qpid/sys/posix/Time.$(OBJEXT) -rm -f qpid/sys/posix/Time.lo -rm -f qpid/sys/rdma/RdmaClient-RdmaClient.$(OBJEXT) -rm -f qpid/sys/rdma/RdmaServer.$(OBJEXT) -rm -f qpid/sys/rdma/librdmawrap_la-RdmaIO.$(OBJEXT) -rm -f qpid/sys/rdma/librdmawrap_la-RdmaIO.lo -rm -f qpid/sys/rdma/librdmawrap_la-rdma_factories.$(OBJEXT) -rm -f qpid/sys/rdma/librdmawrap_la-rdma_factories.lo -rm -f qpid/sys/rdma/librdmawrap_la-rdma_wrap.$(OBJEXT) -rm -f qpid/sys/rdma/librdmawrap_la-rdma_wrap.lo -rm -f qpid/sys/rdma_la-RdmaIOPlugin.$(OBJEXT) -rm -f qpid/sys/rdma_la-RdmaIOPlugin.lo -rm -f qpid/sys/solaris/ECFPoller.$(OBJEXT) -rm -f qpid/sys/solaris/ECFPoller.lo -rm -f qpid/sys/solaris/SystemInfo.$(OBJEXT) -rm -f qpid/sys/solaris/SystemInfo.lo -rm -f qpid/sys/ssl/libsslcommon_la-SslIo.$(OBJEXT) -rm -f qpid/sys/ssl/libsslcommon_la-SslIo.lo -rm -f qpid/sys/ssl/libsslcommon_la-SslSocket.$(OBJEXT) -rm -f qpid/sys/ssl/libsslcommon_la-SslSocket.lo -rm -f qpid/sys/ssl/libsslcommon_la-check.$(OBJEXT) -rm -f qpid/sys/ssl/libsslcommon_la-check.lo -rm -f qpid/sys/ssl/libsslcommon_la-util.$(OBJEXT) -rm -f qpid/sys/ssl/libsslcommon_la-util.lo -rm -f qpid/sys/ssl/ssl_la-SslHandler.$(OBJEXT) -rm -f qpid/sys/ssl/ssl_la-SslHandler.lo -rm -f qpid/sys/ssl_la-SslPlugin.$(OBJEXT) -rm -f qpid/sys/ssl_la-SslPlugin.lo -rm -f qpid/types/Exception.$(OBJEXT) -rm -f qpid/types/Exception.lo -rm -f qpid/types/Uuid.$(OBJEXT) -rm -f qpid/types/Uuid.lo -rm -f qpid/types/Variant.$(OBJEXT) -rm -f qpid/types/Variant.lo -rm -f qpid/xml/XmlExchange.$(OBJEXT) -rm -f qpid/xml/XmlExchange.lo -rm -f qpid/xml/XmlExchangePlugin.$(OBJEXT) -rm -f qpid/xml/XmlExchangePlugin.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpidd-qpidd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/client/no_keyword/$(DEPDIR)/libqpidclient_la-AsyncSession_0_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/client/no_keyword/$(DEPDIR)/libqpidclient_la-Session_0_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/AMQP_AllProxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/AMQP_ClientProxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/AMQP_ServerProxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/AllInvoker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClientInvoker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterClockBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConfigChangeBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionAbortBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionAccumulatedAckBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionAddQueueListenerBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionAnnounceBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionClockBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionConfigBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionConsumerStateBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionDeliverCloseBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionDeliverDoOutputBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionDeliveryRecordBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionDtxAckBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionDtxBufferRefBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionDtxEndBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionDtxStartBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionDtxWorkRecordBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionExchangeBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionManagementSetupStateBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionMembershipBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionOutputTaskBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionQueueDequeueSincePurgeStateBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionQueueFairshareStateBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionQueueObserverStateBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionQueuePositionBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionRetractOfferBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionSessionStateBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionShadowPrepareBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionShadowReadyBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionShadowSetUserBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionTxAcceptBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionTxDequeueBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionTxEndBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionTxEnqueueBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionTxPublishBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterConnectionTxStartBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterDeliverToQueueBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterErrorCheckBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterInitialStatusBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterReadyBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterRetractOfferBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterShutdownBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterTimerDropBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterTimerWakeupBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterUpdateOfferBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ClusterUpdateRequestBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionCloseBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionCloseOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionHeartbeatBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionOpenBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionOpenOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionRedirectBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionSecureBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionSecureOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionStartBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionStartOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionTuneBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ConnectionTuneOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DeliveryProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxCommitBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxEndBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxForgetBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxGetTimeoutBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxGetTimeoutResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxPrepareBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxRecoverBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxRecoverResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxRollbackBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxSelectBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxSetTimeoutBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/DtxStartBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExchangeBindBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExchangeBoundBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExchangeBoundResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExchangeDeclareBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExchangeDeleteBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExchangeQueryBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExchangeQueryResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExchangeUnbindBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExecutionExceptionBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExecutionResultBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ExecutionSyncBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileAckBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileCancelBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileConsumeBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileConsumeOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileDeliverBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileOpenBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileOpenOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FilePublishBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileQosBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileQosOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileRejectBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileReturnBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FileStageBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/FragmentProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/Header.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageAcceptBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageAcquireBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageAcquireResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageCancelBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageFlowBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageFlushBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageRejectBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageReleaseBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageResumeBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageResumeResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageSetFlowModeBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageStopBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageSubscribeBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MessageTransferBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MethodBodyDefaultVisitor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/MethodBodyFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/QueueDeclareBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/QueueDeleteBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/QueuePurgeBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/QueueQueryBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/QueueQueryResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ReplyTo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/ServerInvoker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionAttachBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionAttachedBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionCommandPointBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionCompletedBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionConfirmedBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionDetachBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionDetachedBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionExpectedBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionFlushBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionGapBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionKnownCompletedBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionRequestTimeoutBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/SessionTimeoutBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/StreamCancelBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/StreamConsumeBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/StreamConsumeOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/StreamDeliverBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/StreamProperties.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/StreamPublishBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/StreamQosBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/StreamQosOkBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/StreamReturnBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/TxCommitBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/TxRollbackBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/TxSelectBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/TypeCode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/XaResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/Xid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./qpid/framing/$(DEPDIR)/reply_exceptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@posix/$(DEPDIR)/qpidd-QpiddBroker.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/Agent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/AgentEvent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/AgentSession.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/AgentSubscription.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/ConsoleEvent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/ConsoleSession.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/Data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/DataAddr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/EventNotifierImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/Expression.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/Hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/PosixEventNotifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/PosixEventNotifierImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/Query.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/Schema.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/SchemaCache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/SchemaId.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/SchemaMethod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/SchemaProperty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/Subscription.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/constants.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/$(DEPDIR)/exceptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/Agent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/BrokerProxyImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/ConnectionSettingsImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/ConsoleImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/EventImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/MessageImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/ObjectIdImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/ObjectImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/Protocol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/QueryImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/ResilientConnection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/SchemaImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/SequenceManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/engine/$(DEPDIR)/ValueImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/acl/$(DEPDIR)/Acl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/acl/$(DEPDIR)/EventAllow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/acl/$(DEPDIR)/EventDeny.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/acl/$(DEPDIR)/EventFileLoadFailed.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/acl/$(DEPDIR)/EventFileLoaded.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/acl/$(DEPDIR)/Package.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Agent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Binding.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Broker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventBind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventBrokerLinkDown.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventBrokerLinkUp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventClientConnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventClientConnectFail.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventClientDisconnect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventExchangeDeclare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventExchangeDelete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventQueueDeclare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventQueueDelete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventQueueThresholdExceeded.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventSubscribe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventUnbind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/EventUnsubscribe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Exchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Link.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/ManagementSetupState.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Memory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Package.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Queue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Session.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Subscription.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/System.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/broker/$(DEPDIR)/Vhost.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/cluster/$(DEPDIR)/Cluster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/cluster/$(DEPDIR)/Package.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/ha/$(DEPDIR)/HaBroker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qmf/org/apache/qpid/ha/$(DEPDIR)/Package.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/Address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/DataDir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/Exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/Modules.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/Options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/Plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/RefCountedBuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/SaslFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/SessionId.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/SessionState.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/StringUtils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/Url.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/UrlArray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/$(DEPDIR)/assert.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/acl/$(DEPDIR)/Acl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/acl/$(DEPDIR)/AclData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/acl/$(DEPDIR)/AclPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/acl/$(DEPDIR)/AclReader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/acl/$(DEPDIR)/AclValidator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/agent/$(DEPDIR)/ManagementAgentImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/amqp_0_10/$(DEPDIR)/Codecs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/amqp_0_10/$(DEPDIR)/Connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/amqp_0_10/$(DEPDIR)/SessionHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Bridge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Broker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/ConnectionFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/ConnectionHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Credit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Daemon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/DeliverableMessage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/DeliveryRecord.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/DirectExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/DtxAck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/DtxBuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/DtxManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/DtxTimeout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/DtxWorkRecord.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Exchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/ExchangeRegistry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/ExpiryPolicy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Fairshare.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/FanOutExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/FifoDistributor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/HeadersExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/LegacyLVQ.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Link.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/LinkRegistry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/MessageAdapter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/MessageBuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/MessageDeque.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/MessageGroupManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/MessageMap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/MessageStoreModule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/NameGenerator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/NullMessageStore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/PersistableMessage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/PriorityQueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Queue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/QueueBindings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/QueueCleaner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/QueueEvents.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/QueueFlowLimit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/QueueListeners.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/QueuePolicy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/QueueRegistry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/RecoveredDequeue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/RecoveredEnqueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/RecoveryManagerImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/RetryList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/SaslAuthenticator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/SecureConnection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/SecureConnectionFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/SemanticState.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/SessionAdapter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/SessionHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/SessionManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/SessionState.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/SignalHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/System.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/ThresholdAlerts.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/TopicExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/TxAccept.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/TxBuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/TxPublish.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/$(DEPDIR)/Vhost.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/broker/posix/$(DEPDIR)/BrokerDefaults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Bounds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Completion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionSettings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Connector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Demux.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Dispatcher.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-FailoverListener.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-FailoverManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Future.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-FutureCompletion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-FutureResult.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-LoadPlugins.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-LocalQueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-LocalQueueImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-MessageImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-MessageListener.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-MessageReplayTracker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-QueueOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Results.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-SessionBase_0_10.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-SessionImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-StateManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-Subscription.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionManagerImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/libqpidclient_la-TCPConnector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/rdmaconnector_la-RdmaConnector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/$(DEPDIR)/sslconnector_la-SslConnector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/amqp0_10/$(DEPDIR)/AcceptTracker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/amqp0_10/$(DEPDIR)/AddressResolution.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/amqp0_10/$(DEPDIR)/ConnectionImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/amqp0_10/$(DEPDIR)/IncomingMessages.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/amqp0_10/$(DEPDIR)/OutgoingMessage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/amqp0_10/$(DEPDIR)/ReceiverImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/amqp0_10/$(DEPDIR)/SenderImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/client/amqp0_10/$(DEPDIR)/SessionImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/WatchDogPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-Cluster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-ClusterMap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-ClusterPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-ClusterTimer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-Connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-ConnectionCodec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-Cpg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-CredentialsExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-Decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-ErrorCheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-Event.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-EventFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-ExpiryPolicy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-FailoverExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-InitialStatusMap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-MemberSet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-Multicaster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-OutputInterceptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-PollerDispatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-Quorum_cman.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-RetractClient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-SecureConnectionFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-StoreStatus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-UpdateClient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-UpdateDataExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/cluster_la-UpdateExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/cluster/$(DEPDIR)/qpidd_watchdog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/Agent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/Broker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/ClassKey.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/Event.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/Object.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/ObjectId.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/Package.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/Schema.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/SequenceManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/SessionManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/console/$(DEPDIR)/Value.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/AMQBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/AMQContentBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/AMQFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/AMQHeaderBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/AMQHeartbeatBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/AMQMethodBody.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/AccumulatedAck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/Array.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/BodyHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/Buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/Endian.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/FieldTable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/FieldValue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/FrameDecoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/FrameSet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/List.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/ProtocolInitiation.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/ProtocolVersion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/Proxy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/SendContent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/SequenceNumber.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/SequenceNumberSet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/SequenceSet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/TransferContent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/framing/$(DEPDIR)/Uuid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/ha/$(DEPDIR)/Backup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/ha/$(DEPDIR)/BrokerReplicator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/ha/$(DEPDIR)/ConnectionExcluder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/ha/$(DEPDIR)/HaBroker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/ha/$(DEPDIR)/HaPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/ha/$(DEPDIR)/QueueReplicator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/ha/$(DEPDIR)/ReplicatingSubscription.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/log/$(DEPDIR)/Logger.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/log/$(DEPDIR)/Options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/log/$(DEPDIR)/OstreamOutput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/log/$(DEPDIR)/Selector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/log/$(DEPDIR)/Statement.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/log/posix/$(DEPDIR)/SinkOptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/management/$(DEPDIR)/Buffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/management/$(DEPDIR)/ConnectionSettings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/management/$(DEPDIR)/Manageable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/management/$(DEPDIR)/ManagementAgent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/management/$(DEPDIR)/ManagementDirectExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/management/$(DEPDIR)/ManagementObject.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/management/$(DEPDIR)/ManagementTopicExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/management/$(DEPDIR)/Mutex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/Address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/AddressParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/Connection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/Duration.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/FailoverUpdates.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/Message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/MessageImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/Receiver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/Sender.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/Session.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/messaging/$(DEPDIR)/exceptions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/replication/$(DEPDIR)/ReplicatingEventListener.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/replication/$(DEPDIR)/ReplicationExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/AggregateOutput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/AsynchIOHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/ClusterSafe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/DispatchHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/Dispatcher.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/Runnable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/Shlib.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/TCPIOPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/Timer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/TimerWarnings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/rdma_la-RdmaIOPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/$(DEPDIR)/ssl_la-SslPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/cyrus/$(DEPDIR)/CyrusSecurityLayer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/epoll/$(DEPDIR)/EpollPoller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/AsynchIO.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/FileSysDir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/Fork.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/IOHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/LockFile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/MemStat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/Mutex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/PipeHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/PollableCondition.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/PosixPoller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/Shlib.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/Socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/SocketAddress.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/StrError.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/SystemInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/Thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/posix/$(DEPDIR)/Time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/rdma/$(DEPDIR)/RdmaClient-RdmaClient.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/rdma/$(DEPDIR)/RdmaServer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-RdmaIO.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-rdma_factories.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-rdma_wrap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/solaris/$(DEPDIR)/ECFPoller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/solaris/$(DEPDIR)/SystemInfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-SslIo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-SslSocket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/sys/ssl/$(DEPDIR)/ssl_la-SslHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/types/$(DEPDIR)/Exception.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/types/$(DEPDIR)/Uuid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/types/$(DEPDIR)/Variant.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/xml/$(DEPDIR)/XmlExchange.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@qpid/xml/$(DEPDIR)/XmlExchangePlugin.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 $@ $< qpid/cluster/cluster_la-Quorum_cman.lo: qpid/cluster/Quorum_cman.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-Quorum_cman.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-Quorum_cman.Tpo -c -o qpid/cluster/cluster_la-Quorum_cman.lo `test -f 'qpid/cluster/Quorum_cman.cpp' || echo '$(srcdir)/'`qpid/cluster/Quorum_cman.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-Quorum_cman.Tpo qpid/cluster/$(DEPDIR)/cluster_la-Quorum_cman.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/Quorum_cman.cpp' object='qpid/cluster/cluster_la-Quorum_cman.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-Quorum_cman.lo `test -f 'qpid/cluster/Quorum_cman.cpp' || echo '$(srcdir)/'`qpid/cluster/Quorum_cman.cpp qpid/cluster/cluster_la-Cluster.lo: qpid/cluster/Cluster.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-Cluster.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-Cluster.Tpo -c -o qpid/cluster/cluster_la-Cluster.lo `test -f 'qpid/cluster/Cluster.cpp' || echo '$(srcdir)/'`qpid/cluster/Cluster.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-Cluster.Tpo qpid/cluster/$(DEPDIR)/cluster_la-Cluster.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/Cluster.cpp' object='qpid/cluster/cluster_la-Cluster.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-Cluster.lo `test -f 'qpid/cluster/Cluster.cpp' || echo '$(srcdir)/'`qpid/cluster/Cluster.cpp qpid/cluster/cluster_la-ClusterTimer.lo: qpid/cluster/ClusterTimer.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-ClusterTimer.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-ClusterTimer.Tpo -c -o qpid/cluster/cluster_la-ClusterTimer.lo `test -f 'qpid/cluster/ClusterTimer.cpp' || echo '$(srcdir)/'`qpid/cluster/ClusterTimer.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-ClusterTimer.Tpo qpid/cluster/$(DEPDIR)/cluster_la-ClusterTimer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/ClusterTimer.cpp' object='qpid/cluster/cluster_la-ClusterTimer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-ClusterTimer.lo `test -f 'qpid/cluster/ClusterTimer.cpp' || echo '$(srcdir)/'`qpid/cluster/ClusterTimer.cpp qpid/cluster/cluster_la-Decoder.lo: qpid/cluster/Decoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-Decoder.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-Decoder.Tpo -c -o qpid/cluster/cluster_la-Decoder.lo `test -f 'qpid/cluster/Decoder.cpp' || echo '$(srcdir)/'`qpid/cluster/Decoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-Decoder.Tpo qpid/cluster/$(DEPDIR)/cluster_la-Decoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/Decoder.cpp' object='qpid/cluster/cluster_la-Decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-Decoder.lo `test -f 'qpid/cluster/Decoder.cpp' || echo '$(srcdir)/'`qpid/cluster/Decoder.cpp qpid/cluster/cluster_la-ClusterMap.lo: qpid/cluster/ClusterMap.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-ClusterMap.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-ClusterMap.Tpo -c -o qpid/cluster/cluster_la-ClusterMap.lo `test -f 'qpid/cluster/ClusterMap.cpp' || echo '$(srcdir)/'`qpid/cluster/ClusterMap.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-ClusterMap.Tpo qpid/cluster/$(DEPDIR)/cluster_la-ClusterMap.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/ClusterMap.cpp' object='qpid/cluster/cluster_la-ClusterMap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-ClusterMap.lo `test -f 'qpid/cluster/ClusterMap.cpp' || echo '$(srcdir)/'`qpid/cluster/ClusterMap.cpp qpid/cluster/cluster_la-ClusterPlugin.lo: qpid/cluster/ClusterPlugin.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-ClusterPlugin.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-ClusterPlugin.Tpo -c -o qpid/cluster/cluster_la-ClusterPlugin.lo `test -f 'qpid/cluster/ClusterPlugin.cpp' || echo '$(srcdir)/'`qpid/cluster/ClusterPlugin.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-ClusterPlugin.Tpo qpid/cluster/$(DEPDIR)/cluster_la-ClusterPlugin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/ClusterPlugin.cpp' object='qpid/cluster/cluster_la-ClusterPlugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-ClusterPlugin.lo `test -f 'qpid/cluster/ClusterPlugin.cpp' || echo '$(srcdir)/'`qpid/cluster/ClusterPlugin.cpp qpid/cluster/cluster_la-Connection.lo: qpid/cluster/Connection.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-Connection.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-Connection.Tpo -c -o qpid/cluster/cluster_la-Connection.lo `test -f 'qpid/cluster/Connection.cpp' || echo '$(srcdir)/'`qpid/cluster/Connection.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-Connection.Tpo qpid/cluster/$(DEPDIR)/cluster_la-Connection.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/Connection.cpp' object='qpid/cluster/cluster_la-Connection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-Connection.lo `test -f 'qpid/cluster/Connection.cpp' || echo '$(srcdir)/'`qpid/cluster/Connection.cpp qpid/cluster/cluster_la-ConnectionCodec.lo: qpid/cluster/ConnectionCodec.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-ConnectionCodec.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-ConnectionCodec.Tpo -c -o qpid/cluster/cluster_la-ConnectionCodec.lo `test -f 'qpid/cluster/ConnectionCodec.cpp' || echo '$(srcdir)/'`qpid/cluster/ConnectionCodec.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-ConnectionCodec.Tpo qpid/cluster/$(DEPDIR)/cluster_la-ConnectionCodec.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/ConnectionCodec.cpp' object='qpid/cluster/cluster_la-ConnectionCodec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-ConnectionCodec.lo `test -f 'qpid/cluster/ConnectionCodec.cpp' || echo '$(srcdir)/'`qpid/cluster/ConnectionCodec.cpp qpid/cluster/cluster_la-Cpg.lo: qpid/cluster/Cpg.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-Cpg.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-Cpg.Tpo -c -o qpid/cluster/cluster_la-Cpg.lo `test -f 'qpid/cluster/Cpg.cpp' || echo '$(srcdir)/'`qpid/cluster/Cpg.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-Cpg.Tpo qpid/cluster/$(DEPDIR)/cluster_la-Cpg.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/Cpg.cpp' object='qpid/cluster/cluster_la-Cpg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-Cpg.lo `test -f 'qpid/cluster/Cpg.cpp' || echo '$(srcdir)/'`qpid/cluster/Cpg.cpp qpid/cluster/cluster_la-CredentialsExchange.lo: qpid/cluster/CredentialsExchange.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-CredentialsExchange.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-CredentialsExchange.Tpo -c -o qpid/cluster/cluster_la-CredentialsExchange.lo `test -f 'qpid/cluster/CredentialsExchange.cpp' || echo '$(srcdir)/'`qpid/cluster/CredentialsExchange.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-CredentialsExchange.Tpo qpid/cluster/$(DEPDIR)/cluster_la-CredentialsExchange.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/CredentialsExchange.cpp' object='qpid/cluster/cluster_la-CredentialsExchange.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-CredentialsExchange.lo `test -f 'qpid/cluster/CredentialsExchange.cpp' || echo '$(srcdir)/'`qpid/cluster/CredentialsExchange.cpp qpid/cluster/cluster_la-UpdateClient.lo: qpid/cluster/UpdateClient.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-UpdateClient.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-UpdateClient.Tpo -c -o qpid/cluster/cluster_la-UpdateClient.lo `test -f 'qpid/cluster/UpdateClient.cpp' || echo '$(srcdir)/'`qpid/cluster/UpdateClient.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-UpdateClient.Tpo qpid/cluster/$(DEPDIR)/cluster_la-UpdateClient.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/UpdateClient.cpp' object='qpid/cluster/cluster_la-UpdateClient.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-UpdateClient.lo `test -f 'qpid/cluster/UpdateClient.cpp' || echo '$(srcdir)/'`qpid/cluster/UpdateClient.cpp qpid/cluster/cluster_la-RetractClient.lo: qpid/cluster/RetractClient.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-RetractClient.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-RetractClient.Tpo -c -o qpid/cluster/cluster_la-RetractClient.lo `test -f 'qpid/cluster/RetractClient.cpp' || echo '$(srcdir)/'`qpid/cluster/RetractClient.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-RetractClient.Tpo qpid/cluster/$(DEPDIR)/cluster_la-RetractClient.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/RetractClient.cpp' object='qpid/cluster/cluster_la-RetractClient.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-RetractClient.lo `test -f 'qpid/cluster/RetractClient.cpp' || echo '$(srcdir)/'`qpid/cluster/RetractClient.cpp qpid/cluster/cluster_la-ErrorCheck.lo: qpid/cluster/ErrorCheck.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-ErrorCheck.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-ErrorCheck.Tpo -c -o qpid/cluster/cluster_la-ErrorCheck.lo `test -f 'qpid/cluster/ErrorCheck.cpp' || echo '$(srcdir)/'`qpid/cluster/ErrorCheck.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-ErrorCheck.Tpo qpid/cluster/$(DEPDIR)/cluster_la-ErrorCheck.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/ErrorCheck.cpp' object='qpid/cluster/cluster_la-ErrorCheck.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-ErrorCheck.lo `test -f 'qpid/cluster/ErrorCheck.cpp' || echo '$(srcdir)/'`qpid/cluster/ErrorCheck.cpp qpid/cluster/cluster_la-Event.lo: qpid/cluster/Event.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-Event.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-Event.Tpo -c -o qpid/cluster/cluster_la-Event.lo `test -f 'qpid/cluster/Event.cpp' || echo '$(srcdir)/'`qpid/cluster/Event.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-Event.Tpo qpid/cluster/$(DEPDIR)/cluster_la-Event.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/Event.cpp' object='qpid/cluster/cluster_la-Event.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-Event.lo `test -f 'qpid/cluster/Event.cpp' || echo '$(srcdir)/'`qpid/cluster/Event.cpp qpid/cluster/cluster_la-EventFrame.lo: qpid/cluster/EventFrame.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-EventFrame.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-EventFrame.Tpo -c -o qpid/cluster/cluster_la-EventFrame.lo `test -f 'qpid/cluster/EventFrame.cpp' || echo '$(srcdir)/'`qpid/cluster/EventFrame.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-EventFrame.Tpo qpid/cluster/$(DEPDIR)/cluster_la-EventFrame.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/EventFrame.cpp' object='qpid/cluster/cluster_la-EventFrame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-EventFrame.lo `test -f 'qpid/cluster/EventFrame.cpp' || echo '$(srcdir)/'`qpid/cluster/EventFrame.cpp qpid/cluster/cluster_la-ExpiryPolicy.lo: qpid/cluster/ExpiryPolicy.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-ExpiryPolicy.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-ExpiryPolicy.Tpo -c -o qpid/cluster/cluster_la-ExpiryPolicy.lo `test -f 'qpid/cluster/ExpiryPolicy.cpp' || echo '$(srcdir)/'`qpid/cluster/ExpiryPolicy.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-ExpiryPolicy.Tpo qpid/cluster/$(DEPDIR)/cluster_la-ExpiryPolicy.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/ExpiryPolicy.cpp' object='qpid/cluster/cluster_la-ExpiryPolicy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-ExpiryPolicy.lo `test -f 'qpid/cluster/ExpiryPolicy.cpp' || echo '$(srcdir)/'`qpid/cluster/ExpiryPolicy.cpp qpid/cluster/cluster_la-FailoverExchange.lo: qpid/cluster/FailoverExchange.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-FailoverExchange.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-FailoverExchange.Tpo -c -o qpid/cluster/cluster_la-FailoverExchange.lo `test -f 'qpid/cluster/FailoverExchange.cpp' || echo '$(srcdir)/'`qpid/cluster/FailoverExchange.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-FailoverExchange.Tpo qpid/cluster/$(DEPDIR)/cluster_la-FailoverExchange.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/FailoverExchange.cpp' object='qpid/cluster/cluster_la-FailoverExchange.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-FailoverExchange.lo `test -f 'qpid/cluster/FailoverExchange.cpp' || echo '$(srcdir)/'`qpid/cluster/FailoverExchange.cpp qpid/cluster/cluster_la-UpdateExchange.lo: qpid/cluster/UpdateExchange.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-UpdateExchange.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-UpdateExchange.Tpo -c -o qpid/cluster/cluster_la-UpdateExchange.lo `test -f 'qpid/cluster/UpdateExchange.cpp' || echo '$(srcdir)/'`qpid/cluster/UpdateExchange.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-UpdateExchange.Tpo qpid/cluster/$(DEPDIR)/cluster_la-UpdateExchange.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/UpdateExchange.cpp' object='qpid/cluster/cluster_la-UpdateExchange.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-UpdateExchange.lo `test -f 'qpid/cluster/UpdateExchange.cpp' || echo '$(srcdir)/'`qpid/cluster/UpdateExchange.cpp qpid/cluster/cluster_la-Multicaster.lo: qpid/cluster/Multicaster.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-Multicaster.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-Multicaster.Tpo -c -o qpid/cluster/cluster_la-Multicaster.lo `test -f 'qpid/cluster/Multicaster.cpp' || echo '$(srcdir)/'`qpid/cluster/Multicaster.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-Multicaster.Tpo qpid/cluster/$(DEPDIR)/cluster_la-Multicaster.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/Multicaster.cpp' object='qpid/cluster/cluster_la-Multicaster.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-Multicaster.lo `test -f 'qpid/cluster/Multicaster.cpp' || echo '$(srcdir)/'`qpid/cluster/Multicaster.cpp qpid/cluster/cluster_la-OutputInterceptor.lo: qpid/cluster/OutputInterceptor.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-OutputInterceptor.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-OutputInterceptor.Tpo -c -o qpid/cluster/cluster_la-OutputInterceptor.lo `test -f 'qpid/cluster/OutputInterceptor.cpp' || echo '$(srcdir)/'`qpid/cluster/OutputInterceptor.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-OutputInterceptor.Tpo qpid/cluster/$(DEPDIR)/cluster_la-OutputInterceptor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/OutputInterceptor.cpp' object='qpid/cluster/cluster_la-OutputInterceptor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-OutputInterceptor.lo `test -f 'qpid/cluster/OutputInterceptor.cpp' || echo '$(srcdir)/'`qpid/cluster/OutputInterceptor.cpp qpid/cluster/cluster_la-PollerDispatch.lo: qpid/cluster/PollerDispatch.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-PollerDispatch.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-PollerDispatch.Tpo -c -o qpid/cluster/cluster_la-PollerDispatch.lo `test -f 'qpid/cluster/PollerDispatch.cpp' || echo '$(srcdir)/'`qpid/cluster/PollerDispatch.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-PollerDispatch.Tpo qpid/cluster/$(DEPDIR)/cluster_la-PollerDispatch.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/PollerDispatch.cpp' object='qpid/cluster/cluster_la-PollerDispatch.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-PollerDispatch.lo `test -f 'qpid/cluster/PollerDispatch.cpp' || echo '$(srcdir)/'`qpid/cluster/PollerDispatch.cpp qpid/cluster/cluster_la-InitialStatusMap.lo: qpid/cluster/InitialStatusMap.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-InitialStatusMap.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-InitialStatusMap.Tpo -c -o qpid/cluster/cluster_la-InitialStatusMap.lo `test -f 'qpid/cluster/InitialStatusMap.cpp' || echo '$(srcdir)/'`qpid/cluster/InitialStatusMap.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-InitialStatusMap.Tpo qpid/cluster/$(DEPDIR)/cluster_la-InitialStatusMap.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/InitialStatusMap.cpp' object='qpid/cluster/cluster_la-InitialStatusMap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-InitialStatusMap.lo `test -f 'qpid/cluster/InitialStatusMap.cpp' || echo '$(srcdir)/'`qpid/cluster/InitialStatusMap.cpp qpid/cluster/cluster_la-MemberSet.lo: qpid/cluster/MemberSet.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-MemberSet.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-MemberSet.Tpo -c -o qpid/cluster/cluster_la-MemberSet.lo `test -f 'qpid/cluster/MemberSet.cpp' || echo '$(srcdir)/'`qpid/cluster/MemberSet.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-MemberSet.Tpo qpid/cluster/$(DEPDIR)/cluster_la-MemberSet.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/MemberSet.cpp' object='qpid/cluster/cluster_la-MemberSet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-MemberSet.lo `test -f 'qpid/cluster/MemberSet.cpp' || echo '$(srcdir)/'`qpid/cluster/MemberSet.cpp qpid/cluster/cluster_la-SecureConnectionFactory.lo: qpid/cluster/SecureConnectionFactory.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-SecureConnectionFactory.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-SecureConnectionFactory.Tpo -c -o qpid/cluster/cluster_la-SecureConnectionFactory.lo `test -f 'qpid/cluster/SecureConnectionFactory.cpp' || echo '$(srcdir)/'`qpid/cluster/SecureConnectionFactory.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-SecureConnectionFactory.Tpo qpid/cluster/$(DEPDIR)/cluster_la-SecureConnectionFactory.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/SecureConnectionFactory.cpp' object='qpid/cluster/cluster_la-SecureConnectionFactory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-SecureConnectionFactory.lo `test -f 'qpid/cluster/SecureConnectionFactory.cpp' || echo '$(srcdir)/'`qpid/cluster/SecureConnectionFactory.cpp qpid/cluster/cluster_la-StoreStatus.lo: qpid/cluster/StoreStatus.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-StoreStatus.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-StoreStatus.Tpo -c -o qpid/cluster/cluster_la-StoreStatus.lo `test -f 'qpid/cluster/StoreStatus.cpp' || echo '$(srcdir)/'`qpid/cluster/StoreStatus.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-StoreStatus.Tpo qpid/cluster/$(DEPDIR)/cluster_la-StoreStatus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/StoreStatus.cpp' object='qpid/cluster/cluster_la-StoreStatus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-StoreStatus.lo `test -f 'qpid/cluster/StoreStatus.cpp' || echo '$(srcdir)/'`qpid/cluster/StoreStatus.cpp qpid/cluster/cluster_la-UpdateDataExchange.lo: qpid/cluster/UpdateDataExchange.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/cluster/cluster_la-UpdateDataExchange.lo -MD -MP -MF qpid/cluster/$(DEPDIR)/cluster_la-UpdateDataExchange.Tpo -c -o qpid/cluster/cluster_la-UpdateDataExchange.lo `test -f 'qpid/cluster/UpdateDataExchange.cpp' || echo '$(srcdir)/'`qpid/cluster/UpdateDataExchange.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/cluster/$(DEPDIR)/cluster_la-UpdateDataExchange.Tpo qpid/cluster/$(DEPDIR)/cluster_la-UpdateDataExchange.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/cluster/UpdateDataExchange.cpp' object='qpid/cluster/cluster_la-UpdateDataExchange.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cluster_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/cluster/cluster_la-UpdateDataExchange.lo `test -f 'qpid/cluster/UpdateDataExchange.cpp' || echo '$(srcdir)/'`qpid/cluster/UpdateDataExchange.cpp ./qpid/client/no_keyword/libqpidclient_la-AsyncSession_0_10.lo: ./qpid/client/no_keyword/AsyncSession_0_10.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT ./qpid/client/no_keyword/libqpidclient_la-AsyncSession_0_10.lo -MD -MP -MF ./qpid/client/no_keyword/$(DEPDIR)/libqpidclient_la-AsyncSession_0_10.Tpo -c -o ./qpid/client/no_keyword/libqpidclient_la-AsyncSession_0_10.lo `test -f './qpid/client/no_keyword/AsyncSession_0_10.cpp' || echo '$(srcdir)/'`./qpid/client/no_keyword/AsyncSession_0_10.cpp @am__fastdepCXX_TRUE@ $(am__mv) ./qpid/client/no_keyword/$(DEPDIR)/libqpidclient_la-AsyncSession_0_10.Tpo ./qpid/client/no_keyword/$(DEPDIR)/libqpidclient_la-AsyncSession_0_10.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='./qpid/client/no_keyword/AsyncSession_0_10.cpp' object='./qpid/client/no_keyword/libqpidclient_la-AsyncSession_0_10.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o ./qpid/client/no_keyword/libqpidclient_la-AsyncSession_0_10.lo `test -f './qpid/client/no_keyword/AsyncSession_0_10.cpp' || echo '$(srcdir)/'`./qpid/client/no_keyword/AsyncSession_0_10.cpp ./qpid/client/no_keyword/libqpidclient_la-Session_0_10.lo: ./qpid/client/no_keyword/Session_0_10.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT ./qpid/client/no_keyword/libqpidclient_la-Session_0_10.lo -MD -MP -MF ./qpid/client/no_keyword/$(DEPDIR)/libqpidclient_la-Session_0_10.Tpo -c -o ./qpid/client/no_keyword/libqpidclient_la-Session_0_10.lo `test -f './qpid/client/no_keyword/Session_0_10.cpp' || echo '$(srcdir)/'`./qpid/client/no_keyword/Session_0_10.cpp @am__fastdepCXX_TRUE@ $(am__mv) ./qpid/client/no_keyword/$(DEPDIR)/libqpidclient_la-Session_0_10.Tpo ./qpid/client/no_keyword/$(DEPDIR)/libqpidclient_la-Session_0_10.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='./qpid/client/no_keyword/Session_0_10.cpp' object='./qpid/client/no_keyword/libqpidclient_la-Session_0_10.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o ./qpid/client/no_keyword/libqpidclient_la-Session_0_10.lo `test -f './qpid/client/no_keyword/Session_0_10.cpp' || echo '$(srcdir)/'`./qpid/client/no_keyword/Session_0_10.cpp qpid/client/libqpidclient_la-Bounds.lo: qpid/client/Bounds.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Bounds.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Bounds.Tpo -c -o qpid/client/libqpidclient_la-Bounds.lo `test -f 'qpid/client/Bounds.cpp' || echo '$(srcdir)/'`qpid/client/Bounds.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Bounds.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Bounds.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Bounds.cpp' object='qpid/client/libqpidclient_la-Bounds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Bounds.lo `test -f 'qpid/client/Bounds.cpp' || echo '$(srcdir)/'`qpid/client/Bounds.cpp qpid/client/libqpidclient_la-Completion.lo: qpid/client/Completion.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Completion.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Completion.Tpo -c -o qpid/client/libqpidclient_la-Completion.lo `test -f 'qpid/client/Completion.cpp' || echo '$(srcdir)/'`qpid/client/Completion.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Completion.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Completion.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Completion.cpp' object='qpid/client/libqpidclient_la-Completion.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Completion.lo `test -f 'qpid/client/Completion.cpp' || echo '$(srcdir)/'`qpid/client/Completion.cpp qpid/client/libqpidclient_la-Connection.lo: qpid/client/Connection.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Connection.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Connection.Tpo -c -o qpid/client/libqpidclient_la-Connection.lo `test -f 'qpid/client/Connection.cpp' || echo '$(srcdir)/'`qpid/client/Connection.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Connection.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Connection.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Connection.cpp' object='qpid/client/libqpidclient_la-Connection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Connection.lo `test -f 'qpid/client/Connection.cpp' || echo '$(srcdir)/'`qpid/client/Connection.cpp qpid/client/libqpidclient_la-ConnectionHandler.lo: qpid/client/ConnectionHandler.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-ConnectionHandler.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionHandler.Tpo -c -o qpid/client/libqpidclient_la-ConnectionHandler.lo `test -f 'qpid/client/ConnectionHandler.cpp' || echo '$(srcdir)/'`qpid/client/ConnectionHandler.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionHandler.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionHandler.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/ConnectionHandler.cpp' object='qpid/client/libqpidclient_la-ConnectionHandler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-ConnectionHandler.lo `test -f 'qpid/client/ConnectionHandler.cpp' || echo '$(srcdir)/'`qpid/client/ConnectionHandler.cpp qpid/client/libqpidclient_la-ConnectionImpl.lo: qpid/client/ConnectionImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-ConnectionImpl.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionImpl.Tpo -c -o qpid/client/libqpidclient_la-ConnectionImpl.lo `test -f 'qpid/client/ConnectionImpl.cpp' || echo '$(srcdir)/'`qpid/client/ConnectionImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionImpl.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/ConnectionImpl.cpp' object='qpid/client/libqpidclient_la-ConnectionImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-ConnectionImpl.lo `test -f 'qpid/client/ConnectionImpl.cpp' || echo '$(srcdir)/'`qpid/client/ConnectionImpl.cpp qpid/client/libqpidclient_la-ConnectionSettings.lo: qpid/client/ConnectionSettings.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-ConnectionSettings.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionSettings.Tpo -c -o qpid/client/libqpidclient_la-ConnectionSettings.lo `test -f 'qpid/client/ConnectionSettings.cpp' || echo '$(srcdir)/'`qpid/client/ConnectionSettings.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionSettings.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-ConnectionSettings.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/ConnectionSettings.cpp' object='qpid/client/libqpidclient_la-ConnectionSettings.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-ConnectionSettings.lo `test -f 'qpid/client/ConnectionSettings.cpp' || echo '$(srcdir)/'`qpid/client/ConnectionSettings.cpp qpid/client/libqpidclient_la-Connector.lo: qpid/client/Connector.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Connector.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Connector.Tpo -c -o qpid/client/libqpidclient_la-Connector.lo `test -f 'qpid/client/Connector.cpp' || echo '$(srcdir)/'`qpid/client/Connector.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Connector.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Connector.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Connector.cpp' object='qpid/client/libqpidclient_la-Connector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Connector.lo `test -f 'qpid/client/Connector.cpp' || echo '$(srcdir)/'`qpid/client/Connector.cpp qpid/client/libqpidclient_la-Demux.lo: qpid/client/Demux.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Demux.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Demux.Tpo -c -o qpid/client/libqpidclient_la-Demux.lo `test -f 'qpid/client/Demux.cpp' || echo '$(srcdir)/'`qpid/client/Demux.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Demux.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Demux.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Demux.cpp' object='qpid/client/libqpidclient_la-Demux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Demux.lo `test -f 'qpid/client/Demux.cpp' || echo '$(srcdir)/'`qpid/client/Demux.cpp qpid/client/libqpidclient_la-Dispatcher.lo: qpid/client/Dispatcher.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Dispatcher.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Dispatcher.Tpo -c -o qpid/client/libqpidclient_la-Dispatcher.lo `test -f 'qpid/client/Dispatcher.cpp' || echo '$(srcdir)/'`qpid/client/Dispatcher.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Dispatcher.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Dispatcher.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Dispatcher.cpp' object='qpid/client/libqpidclient_la-Dispatcher.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Dispatcher.lo `test -f 'qpid/client/Dispatcher.cpp' || echo '$(srcdir)/'`qpid/client/Dispatcher.cpp qpid/client/libqpidclient_la-FailoverListener.lo: qpid/client/FailoverListener.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-FailoverListener.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-FailoverListener.Tpo -c -o qpid/client/libqpidclient_la-FailoverListener.lo `test -f 'qpid/client/FailoverListener.cpp' || echo '$(srcdir)/'`qpid/client/FailoverListener.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-FailoverListener.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-FailoverListener.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/FailoverListener.cpp' object='qpid/client/libqpidclient_la-FailoverListener.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-FailoverListener.lo `test -f 'qpid/client/FailoverListener.cpp' || echo '$(srcdir)/'`qpid/client/FailoverListener.cpp qpid/client/libqpidclient_la-FailoverManager.lo: qpid/client/FailoverManager.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-FailoverManager.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-FailoverManager.Tpo -c -o qpid/client/libqpidclient_la-FailoverManager.lo `test -f 'qpid/client/FailoverManager.cpp' || echo '$(srcdir)/'`qpid/client/FailoverManager.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-FailoverManager.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-FailoverManager.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/FailoverManager.cpp' object='qpid/client/libqpidclient_la-FailoverManager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-FailoverManager.lo `test -f 'qpid/client/FailoverManager.cpp' || echo '$(srcdir)/'`qpid/client/FailoverManager.cpp qpid/client/libqpidclient_la-Future.lo: qpid/client/Future.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Future.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Future.Tpo -c -o qpid/client/libqpidclient_la-Future.lo `test -f 'qpid/client/Future.cpp' || echo '$(srcdir)/'`qpid/client/Future.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Future.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Future.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Future.cpp' object='qpid/client/libqpidclient_la-Future.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Future.lo `test -f 'qpid/client/Future.cpp' || echo '$(srcdir)/'`qpid/client/Future.cpp qpid/client/libqpidclient_la-FutureCompletion.lo: qpid/client/FutureCompletion.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-FutureCompletion.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-FutureCompletion.Tpo -c -o qpid/client/libqpidclient_la-FutureCompletion.lo `test -f 'qpid/client/FutureCompletion.cpp' || echo '$(srcdir)/'`qpid/client/FutureCompletion.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-FutureCompletion.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-FutureCompletion.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/FutureCompletion.cpp' object='qpid/client/libqpidclient_la-FutureCompletion.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-FutureCompletion.lo `test -f 'qpid/client/FutureCompletion.cpp' || echo '$(srcdir)/'`qpid/client/FutureCompletion.cpp qpid/client/libqpidclient_la-FutureResult.lo: qpid/client/FutureResult.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-FutureResult.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-FutureResult.Tpo -c -o qpid/client/libqpidclient_la-FutureResult.lo `test -f 'qpid/client/FutureResult.cpp' || echo '$(srcdir)/'`qpid/client/FutureResult.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-FutureResult.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-FutureResult.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/FutureResult.cpp' object='qpid/client/libqpidclient_la-FutureResult.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-FutureResult.lo `test -f 'qpid/client/FutureResult.cpp' || echo '$(srcdir)/'`qpid/client/FutureResult.cpp qpid/client/libqpidclient_la-LoadPlugins.lo: qpid/client/LoadPlugins.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-LoadPlugins.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-LoadPlugins.Tpo -c -o qpid/client/libqpidclient_la-LoadPlugins.lo `test -f 'qpid/client/LoadPlugins.cpp' || echo '$(srcdir)/'`qpid/client/LoadPlugins.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-LoadPlugins.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-LoadPlugins.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/LoadPlugins.cpp' object='qpid/client/libqpidclient_la-LoadPlugins.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-LoadPlugins.lo `test -f 'qpid/client/LoadPlugins.cpp' || echo '$(srcdir)/'`qpid/client/LoadPlugins.cpp qpid/client/libqpidclient_la-LocalQueue.lo: qpid/client/LocalQueue.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-LocalQueue.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-LocalQueue.Tpo -c -o qpid/client/libqpidclient_la-LocalQueue.lo `test -f 'qpid/client/LocalQueue.cpp' || echo '$(srcdir)/'`qpid/client/LocalQueue.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-LocalQueue.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-LocalQueue.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/LocalQueue.cpp' object='qpid/client/libqpidclient_la-LocalQueue.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-LocalQueue.lo `test -f 'qpid/client/LocalQueue.cpp' || echo '$(srcdir)/'`qpid/client/LocalQueue.cpp qpid/client/libqpidclient_la-LocalQueueImpl.lo: qpid/client/LocalQueueImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-LocalQueueImpl.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-LocalQueueImpl.Tpo -c -o qpid/client/libqpidclient_la-LocalQueueImpl.lo `test -f 'qpid/client/LocalQueueImpl.cpp' || echo '$(srcdir)/'`qpid/client/LocalQueueImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-LocalQueueImpl.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-LocalQueueImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/LocalQueueImpl.cpp' object='qpid/client/libqpidclient_la-LocalQueueImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-LocalQueueImpl.lo `test -f 'qpid/client/LocalQueueImpl.cpp' || echo '$(srcdir)/'`qpid/client/LocalQueueImpl.cpp qpid/client/libqpidclient_la-Message.lo: qpid/client/Message.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Message.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Message.Tpo -c -o qpid/client/libqpidclient_la-Message.lo `test -f 'qpid/client/Message.cpp' || echo '$(srcdir)/'`qpid/client/Message.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Message.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Message.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Message.cpp' object='qpid/client/libqpidclient_la-Message.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Message.lo `test -f 'qpid/client/Message.cpp' || echo '$(srcdir)/'`qpid/client/Message.cpp qpid/client/libqpidclient_la-MessageImpl.lo: qpid/client/MessageImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-MessageImpl.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-MessageImpl.Tpo -c -o qpid/client/libqpidclient_la-MessageImpl.lo `test -f 'qpid/client/MessageImpl.cpp' || echo '$(srcdir)/'`qpid/client/MessageImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-MessageImpl.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-MessageImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/MessageImpl.cpp' object='qpid/client/libqpidclient_la-MessageImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-MessageImpl.lo `test -f 'qpid/client/MessageImpl.cpp' || echo '$(srcdir)/'`qpid/client/MessageImpl.cpp qpid/client/libqpidclient_la-MessageListener.lo: qpid/client/MessageListener.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-MessageListener.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-MessageListener.Tpo -c -o qpid/client/libqpidclient_la-MessageListener.lo `test -f 'qpid/client/MessageListener.cpp' || echo '$(srcdir)/'`qpid/client/MessageListener.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-MessageListener.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-MessageListener.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/MessageListener.cpp' object='qpid/client/libqpidclient_la-MessageListener.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-MessageListener.lo `test -f 'qpid/client/MessageListener.cpp' || echo '$(srcdir)/'`qpid/client/MessageListener.cpp qpid/client/libqpidclient_la-MessageReplayTracker.lo: qpid/client/MessageReplayTracker.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-MessageReplayTracker.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-MessageReplayTracker.Tpo -c -o qpid/client/libqpidclient_la-MessageReplayTracker.lo `test -f 'qpid/client/MessageReplayTracker.cpp' || echo '$(srcdir)/'`qpid/client/MessageReplayTracker.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-MessageReplayTracker.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-MessageReplayTracker.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/MessageReplayTracker.cpp' object='qpid/client/libqpidclient_la-MessageReplayTracker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-MessageReplayTracker.lo `test -f 'qpid/client/MessageReplayTracker.cpp' || echo '$(srcdir)/'`qpid/client/MessageReplayTracker.cpp qpid/client/libqpidclient_la-QueueOptions.lo: qpid/client/QueueOptions.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-QueueOptions.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-QueueOptions.Tpo -c -o qpid/client/libqpidclient_la-QueueOptions.lo `test -f 'qpid/client/QueueOptions.cpp' || echo '$(srcdir)/'`qpid/client/QueueOptions.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-QueueOptions.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-QueueOptions.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/QueueOptions.cpp' object='qpid/client/libqpidclient_la-QueueOptions.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-QueueOptions.lo `test -f 'qpid/client/QueueOptions.cpp' || echo '$(srcdir)/'`qpid/client/QueueOptions.cpp qpid/client/libqpidclient_la-Results.lo: qpid/client/Results.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Results.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Results.Tpo -c -o qpid/client/libqpidclient_la-Results.lo `test -f 'qpid/client/Results.cpp' || echo '$(srcdir)/'`qpid/client/Results.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Results.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Results.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Results.cpp' object='qpid/client/libqpidclient_la-Results.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Results.lo `test -f 'qpid/client/Results.cpp' || echo '$(srcdir)/'`qpid/client/Results.cpp qpid/client/libqpidclient_la-SessionBase_0_10.lo: qpid/client/SessionBase_0_10.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-SessionBase_0_10.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-SessionBase_0_10.Tpo -c -o qpid/client/libqpidclient_la-SessionBase_0_10.lo `test -f 'qpid/client/SessionBase_0_10.cpp' || echo '$(srcdir)/'`qpid/client/SessionBase_0_10.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-SessionBase_0_10.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-SessionBase_0_10.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/SessionBase_0_10.cpp' object='qpid/client/libqpidclient_la-SessionBase_0_10.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-SessionBase_0_10.lo `test -f 'qpid/client/SessionBase_0_10.cpp' || echo '$(srcdir)/'`qpid/client/SessionBase_0_10.cpp qpid/client/libqpidclient_la-SessionImpl.lo: qpid/client/SessionImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-SessionImpl.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-SessionImpl.Tpo -c -o qpid/client/libqpidclient_la-SessionImpl.lo `test -f 'qpid/client/SessionImpl.cpp' || echo '$(srcdir)/'`qpid/client/SessionImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-SessionImpl.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-SessionImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/SessionImpl.cpp' object='qpid/client/libqpidclient_la-SessionImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-SessionImpl.lo `test -f 'qpid/client/SessionImpl.cpp' || echo '$(srcdir)/'`qpid/client/SessionImpl.cpp qpid/client/libqpidclient_la-StateManager.lo: qpid/client/StateManager.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-StateManager.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-StateManager.Tpo -c -o qpid/client/libqpidclient_la-StateManager.lo `test -f 'qpid/client/StateManager.cpp' || echo '$(srcdir)/'`qpid/client/StateManager.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-StateManager.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-StateManager.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/StateManager.cpp' object='qpid/client/libqpidclient_la-StateManager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-StateManager.lo `test -f 'qpid/client/StateManager.cpp' || echo '$(srcdir)/'`qpid/client/StateManager.cpp qpid/client/libqpidclient_la-Subscription.lo: qpid/client/Subscription.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-Subscription.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-Subscription.Tpo -c -o qpid/client/libqpidclient_la-Subscription.lo `test -f 'qpid/client/Subscription.cpp' || echo '$(srcdir)/'`qpid/client/Subscription.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-Subscription.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-Subscription.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/Subscription.cpp' object='qpid/client/libqpidclient_la-Subscription.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-Subscription.lo `test -f 'qpid/client/Subscription.cpp' || echo '$(srcdir)/'`qpid/client/Subscription.cpp qpid/client/libqpidclient_la-SubscriptionImpl.lo: qpid/client/SubscriptionImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-SubscriptionImpl.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionImpl.Tpo -c -o qpid/client/libqpidclient_la-SubscriptionImpl.lo `test -f 'qpid/client/SubscriptionImpl.cpp' || echo '$(srcdir)/'`qpid/client/SubscriptionImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionImpl.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/SubscriptionImpl.cpp' object='qpid/client/libqpidclient_la-SubscriptionImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-SubscriptionImpl.lo `test -f 'qpid/client/SubscriptionImpl.cpp' || echo '$(srcdir)/'`qpid/client/SubscriptionImpl.cpp qpid/client/libqpidclient_la-SubscriptionManager.lo: qpid/client/SubscriptionManager.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-SubscriptionManager.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionManager.Tpo -c -o qpid/client/libqpidclient_la-SubscriptionManager.lo `test -f 'qpid/client/SubscriptionManager.cpp' || echo '$(srcdir)/'`qpid/client/SubscriptionManager.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionManager.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionManager.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/SubscriptionManager.cpp' object='qpid/client/libqpidclient_la-SubscriptionManager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-SubscriptionManager.lo `test -f 'qpid/client/SubscriptionManager.cpp' || echo '$(srcdir)/'`qpid/client/SubscriptionManager.cpp qpid/client/libqpidclient_la-SubscriptionManagerImpl.lo: qpid/client/SubscriptionManagerImpl.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-SubscriptionManagerImpl.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionManagerImpl.Tpo -c -o qpid/client/libqpidclient_la-SubscriptionManagerImpl.lo `test -f 'qpid/client/SubscriptionManagerImpl.cpp' || echo '$(srcdir)/'`qpid/client/SubscriptionManagerImpl.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionManagerImpl.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-SubscriptionManagerImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/SubscriptionManagerImpl.cpp' object='qpid/client/libqpidclient_la-SubscriptionManagerImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-SubscriptionManagerImpl.lo `test -f 'qpid/client/SubscriptionManagerImpl.cpp' || echo '$(srcdir)/'`qpid/client/SubscriptionManagerImpl.cpp qpid/client/libqpidclient_la-TCPConnector.lo: qpid/client/TCPConnector.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/libqpidclient_la-TCPConnector.lo -MD -MP -MF qpid/client/$(DEPDIR)/libqpidclient_la-TCPConnector.Tpo -c -o qpid/client/libqpidclient_la-TCPConnector.lo `test -f 'qpid/client/TCPConnector.cpp' || echo '$(srcdir)/'`qpid/client/TCPConnector.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/libqpidclient_la-TCPConnector.Tpo qpid/client/$(DEPDIR)/libqpidclient_la-TCPConnector.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/TCPConnector.cpp' object='qpid/client/libqpidclient_la-TCPConnector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libqpidclient_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/libqpidclient_la-TCPConnector.lo `test -f 'qpid/client/TCPConnector.cpp' || echo '$(srcdir)/'`qpid/client/TCPConnector.cpp qpid/sys/rdma/librdmawrap_la-rdma_factories.lo: qpid/sys/rdma/rdma_factories.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librdmawrap_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/rdma/librdmawrap_la-rdma_factories.lo -MD -MP -MF qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-rdma_factories.Tpo -c -o qpid/sys/rdma/librdmawrap_la-rdma_factories.lo `test -f 'qpid/sys/rdma/rdma_factories.cpp' || echo '$(srcdir)/'`qpid/sys/rdma/rdma_factories.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-rdma_factories.Tpo qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-rdma_factories.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/rdma/rdma_factories.cpp' object='qpid/sys/rdma/librdmawrap_la-rdma_factories.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librdmawrap_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/rdma/librdmawrap_la-rdma_factories.lo `test -f 'qpid/sys/rdma/rdma_factories.cpp' || echo '$(srcdir)/'`qpid/sys/rdma/rdma_factories.cpp qpid/sys/rdma/librdmawrap_la-RdmaIO.lo: qpid/sys/rdma/RdmaIO.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librdmawrap_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/rdma/librdmawrap_la-RdmaIO.lo -MD -MP -MF qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-RdmaIO.Tpo -c -o qpid/sys/rdma/librdmawrap_la-RdmaIO.lo `test -f 'qpid/sys/rdma/RdmaIO.cpp' || echo '$(srcdir)/'`qpid/sys/rdma/RdmaIO.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-RdmaIO.Tpo qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-RdmaIO.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/rdma/RdmaIO.cpp' object='qpid/sys/rdma/librdmawrap_la-RdmaIO.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librdmawrap_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/rdma/librdmawrap_la-RdmaIO.lo `test -f 'qpid/sys/rdma/RdmaIO.cpp' || echo '$(srcdir)/'`qpid/sys/rdma/RdmaIO.cpp qpid/sys/rdma/librdmawrap_la-rdma_wrap.lo: qpid/sys/rdma/rdma_wrap.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librdmawrap_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/rdma/librdmawrap_la-rdma_wrap.lo -MD -MP -MF qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-rdma_wrap.Tpo -c -o qpid/sys/rdma/librdmawrap_la-rdma_wrap.lo `test -f 'qpid/sys/rdma/rdma_wrap.cpp' || echo '$(srcdir)/'`qpid/sys/rdma/rdma_wrap.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-rdma_wrap.Tpo qpid/sys/rdma/$(DEPDIR)/librdmawrap_la-rdma_wrap.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/rdma/rdma_wrap.cpp' object='qpid/sys/rdma/librdmawrap_la-rdma_wrap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(librdmawrap_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/rdma/librdmawrap_la-rdma_wrap.lo `test -f 'qpid/sys/rdma/rdma_wrap.cpp' || echo '$(srcdir)/'`qpid/sys/rdma/rdma_wrap.cpp qpid/sys/ssl/libsslcommon_la-check.lo: qpid/sys/ssl/check.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsslcommon_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/ssl/libsslcommon_la-check.lo -MD -MP -MF qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-check.Tpo -c -o qpid/sys/ssl/libsslcommon_la-check.lo `test -f 'qpid/sys/ssl/check.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/check.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-check.Tpo qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-check.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/ssl/check.cpp' object='qpid/sys/ssl/libsslcommon_la-check.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsslcommon_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/ssl/libsslcommon_la-check.lo `test -f 'qpid/sys/ssl/check.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/check.cpp qpid/sys/ssl/libsslcommon_la-util.lo: qpid/sys/ssl/util.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsslcommon_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/ssl/libsslcommon_la-util.lo -MD -MP -MF qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-util.Tpo -c -o qpid/sys/ssl/libsslcommon_la-util.lo `test -f 'qpid/sys/ssl/util.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/util.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-util.Tpo qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-util.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/ssl/util.cpp' object='qpid/sys/ssl/libsslcommon_la-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsslcommon_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/ssl/libsslcommon_la-util.lo `test -f 'qpid/sys/ssl/util.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/util.cpp qpid/sys/ssl/libsslcommon_la-SslSocket.lo: qpid/sys/ssl/SslSocket.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsslcommon_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/ssl/libsslcommon_la-SslSocket.lo -MD -MP -MF qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-SslSocket.Tpo -c -o qpid/sys/ssl/libsslcommon_la-SslSocket.lo `test -f 'qpid/sys/ssl/SslSocket.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/SslSocket.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-SslSocket.Tpo qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-SslSocket.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/ssl/SslSocket.cpp' object='qpid/sys/ssl/libsslcommon_la-SslSocket.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsslcommon_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/ssl/libsslcommon_la-SslSocket.lo `test -f 'qpid/sys/ssl/SslSocket.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/SslSocket.cpp qpid/sys/ssl/libsslcommon_la-SslIo.lo: qpid/sys/ssl/SslIo.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsslcommon_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/ssl/libsslcommon_la-SslIo.lo -MD -MP -MF qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-SslIo.Tpo -c -o qpid/sys/ssl/libsslcommon_la-SslIo.lo `test -f 'qpid/sys/ssl/SslIo.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/SslIo.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-SslIo.Tpo qpid/sys/ssl/$(DEPDIR)/libsslcommon_la-SslIo.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/ssl/SslIo.cpp' object='qpid/sys/ssl/libsslcommon_la-SslIo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libsslcommon_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/ssl/libsslcommon_la-SslIo.lo `test -f 'qpid/sys/ssl/SslIo.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/SslIo.cpp qpid/sys/rdma_la-RdmaIOPlugin.lo: qpid/sys/RdmaIOPlugin.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rdma_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/rdma_la-RdmaIOPlugin.lo -MD -MP -MF qpid/sys/$(DEPDIR)/rdma_la-RdmaIOPlugin.Tpo -c -o qpid/sys/rdma_la-RdmaIOPlugin.lo `test -f 'qpid/sys/RdmaIOPlugin.cpp' || echo '$(srcdir)/'`qpid/sys/RdmaIOPlugin.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/$(DEPDIR)/rdma_la-RdmaIOPlugin.Tpo qpid/sys/$(DEPDIR)/rdma_la-RdmaIOPlugin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/RdmaIOPlugin.cpp' object='qpid/sys/rdma_la-RdmaIOPlugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rdma_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/rdma_la-RdmaIOPlugin.lo `test -f 'qpid/sys/RdmaIOPlugin.cpp' || echo '$(srcdir)/'`qpid/sys/RdmaIOPlugin.cpp qpid/client/rdmaconnector_la-RdmaConnector.lo: qpid/client/RdmaConnector.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rdmaconnector_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/rdmaconnector_la-RdmaConnector.lo -MD -MP -MF qpid/client/$(DEPDIR)/rdmaconnector_la-RdmaConnector.Tpo -c -o qpid/client/rdmaconnector_la-RdmaConnector.lo `test -f 'qpid/client/RdmaConnector.cpp' || echo '$(srcdir)/'`qpid/client/RdmaConnector.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/rdmaconnector_la-RdmaConnector.Tpo qpid/client/$(DEPDIR)/rdmaconnector_la-RdmaConnector.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/RdmaConnector.cpp' object='qpid/client/rdmaconnector_la-RdmaConnector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rdmaconnector_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/rdmaconnector_la-RdmaConnector.lo `test -f 'qpid/client/RdmaConnector.cpp' || echo '$(srcdir)/'`qpid/client/RdmaConnector.cpp qpid/sys/ssl_la-SslPlugin.lo: qpid/sys/SslPlugin.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ssl_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/ssl_la-SslPlugin.lo -MD -MP -MF qpid/sys/$(DEPDIR)/ssl_la-SslPlugin.Tpo -c -o qpid/sys/ssl_la-SslPlugin.lo `test -f 'qpid/sys/SslPlugin.cpp' || echo '$(srcdir)/'`qpid/sys/SslPlugin.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/$(DEPDIR)/ssl_la-SslPlugin.Tpo qpid/sys/$(DEPDIR)/ssl_la-SslPlugin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/SslPlugin.cpp' object='qpid/sys/ssl_la-SslPlugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ssl_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/ssl_la-SslPlugin.lo `test -f 'qpid/sys/SslPlugin.cpp' || echo '$(srcdir)/'`qpid/sys/SslPlugin.cpp qpid/sys/ssl/ssl_la-SslHandler.lo: qpid/sys/ssl/SslHandler.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ssl_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/ssl/ssl_la-SslHandler.lo -MD -MP -MF qpid/sys/ssl/$(DEPDIR)/ssl_la-SslHandler.Tpo -c -o qpid/sys/ssl/ssl_la-SslHandler.lo `test -f 'qpid/sys/ssl/SslHandler.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/SslHandler.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/ssl/$(DEPDIR)/ssl_la-SslHandler.Tpo qpid/sys/ssl/$(DEPDIR)/ssl_la-SslHandler.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/ssl/SslHandler.cpp' object='qpid/sys/ssl/ssl_la-SslHandler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ssl_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/ssl/ssl_la-SslHandler.lo `test -f 'qpid/sys/ssl/SslHandler.cpp' || echo '$(srcdir)/'`qpid/sys/ssl/SslHandler.cpp qpid/client/sslconnector_la-SslConnector.lo: qpid/client/SslConnector.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sslconnector_la_CXXFLAGS) $(CXXFLAGS) -MT qpid/client/sslconnector_la-SslConnector.lo -MD -MP -MF qpid/client/$(DEPDIR)/sslconnector_la-SslConnector.Tpo -c -o qpid/client/sslconnector_la-SslConnector.lo `test -f 'qpid/client/SslConnector.cpp' || echo '$(srcdir)/'`qpid/client/SslConnector.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/client/$(DEPDIR)/sslconnector_la-SslConnector.Tpo qpid/client/$(DEPDIR)/sslconnector_la-SslConnector.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/client/SslConnector.cpp' object='qpid/client/sslconnector_la-SslConnector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sslconnector_la_CXXFLAGS) $(CXXFLAGS) -c -o qpid/client/sslconnector_la-SslConnector.lo `test -f 'qpid/client/SslConnector.cpp' || echo '$(srcdir)/'`qpid/client/SslConnector.cpp qpid/sys/rdma/RdmaClient-RdmaClient.o: qpid/sys/rdma/RdmaClient.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(RdmaClient_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/rdma/RdmaClient-RdmaClient.o -MD -MP -MF qpid/sys/rdma/$(DEPDIR)/RdmaClient-RdmaClient.Tpo -c -o qpid/sys/rdma/RdmaClient-RdmaClient.o `test -f 'qpid/sys/rdma/RdmaClient.cpp' || echo '$(srcdir)/'`qpid/sys/rdma/RdmaClient.cpp @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/rdma/$(DEPDIR)/RdmaClient-RdmaClient.Tpo qpid/sys/rdma/$(DEPDIR)/RdmaClient-RdmaClient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/rdma/RdmaClient.cpp' object='qpid/sys/rdma/RdmaClient-RdmaClient.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(RdmaClient_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/rdma/RdmaClient-RdmaClient.o `test -f 'qpid/sys/rdma/RdmaClient.cpp' || echo '$(srcdir)/'`qpid/sys/rdma/RdmaClient.cpp qpid/sys/rdma/RdmaClient-RdmaClient.obj: qpid/sys/rdma/RdmaClient.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(RdmaClient_CXXFLAGS) $(CXXFLAGS) -MT qpid/sys/rdma/RdmaClient-RdmaClient.obj -MD -MP -MF qpid/sys/rdma/$(DEPDIR)/RdmaClient-RdmaClient.Tpo -c -o qpid/sys/rdma/RdmaClient-RdmaClient.obj `if test -f 'qpid/sys/rdma/RdmaClient.cpp'; then $(CYGPATH_W) 'qpid/sys/rdma/RdmaClient.cpp'; else $(CYGPATH_W) '$(srcdir)/qpid/sys/rdma/RdmaClient.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) qpid/sys/rdma/$(DEPDIR)/RdmaClient-RdmaClient.Tpo qpid/sys/rdma/$(DEPDIR)/RdmaClient-RdmaClient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpid/sys/rdma/RdmaClient.cpp' object='qpid/sys/rdma/RdmaClient-RdmaClient.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(RdmaClient_CXXFLAGS) $(CXXFLAGS) -c -o qpid/sys/rdma/RdmaClient-RdmaClient.obj `if test -f 'qpid/sys/rdma/RdmaClient.cpp'; then $(CYGPATH_W) 'qpid/sys/rdma/RdmaClient.cpp'; else $(CYGPATH_W) '$(srcdir)/qpid/sys/rdma/RdmaClient.cpp'; fi` qpidd-qpidd.o: qpidd.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qpidd_CXXFLAGS) $(CXXFLAGS) -MT qpidd-qpidd.o -MD -MP -MF $(DEPDIR)/qpidd-qpidd.Tpo -c -o qpidd-qpidd.o `test -f 'qpidd.cpp' || echo '$(srcdir)/'`qpidd.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/qpidd-qpidd.Tpo $(DEPDIR)/qpidd-qpidd.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpidd.cpp' object='qpidd-qpidd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qpidd_CXXFLAGS) $(CXXFLAGS) -c -o qpidd-qpidd.o `test -f 'qpidd.cpp' || echo '$(srcdir)/'`qpidd.cpp qpidd-qpidd.obj: qpidd.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qpidd_CXXFLAGS) $(CXXFLAGS) -MT qpidd-qpidd.obj -MD -MP -MF $(DEPDIR)/qpidd-qpidd.Tpo -c -o qpidd-qpidd.obj `if test -f 'qpidd.cpp'; then $(CYGPATH_W) 'qpidd.cpp'; else $(CYGPATH_W) '$(srcdir)/qpidd.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/qpidd-qpidd.Tpo $(DEPDIR)/qpidd-qpidd.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qpidd.cpp' object='qpidd-qpidd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qpidd_CXXFLAGS) $(CXXFLAGS) -c -o qpidd-qpidd.obj `if test -f 'qpidd.cpp'; then $(CYGPATH_W) 'qpidd.cpp'; else $(CYGPATH_W) '$(srcdir)/qpidd.cpp'; fi` posix/qpidd-QpiddBroker.o: posix/QpiddBroker.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qpidd_CXXFLAGS) $(CXXFLAGS) -MT posix/qpidd-QpiddBroker.o -MD -MP -MF posix/$(DEPDIR)/qpidd-QpiddBroker.Tpo -c -o posix/qpidd-QpiddBroker.o `test -f 'posix/QpiddBroker.cpp' || echo '$(srcdir)/'`posix/QpiddBroker.cpp @am__fastdepCXX_TRUE@ $(am__mv) posix/$(DEPDIR)/qpidd-QpiddBroker.Tpo posix/$(DEPDIR)/qpidd-QpiddBroker.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='posix/QpiddBroker.cpp' object='posix/qpidd-QpiddBroker.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qpidd_CXXFLAGS) $(CXXFLAGS) -c -o posix/qpidd-QpiddBroker.o `test -f 'posix/QpiddBroker.cpp' || echo '$(srcdir)/'`posix/QpiddBroker.cpp posix/qpidd-QpiddBroker.obj: posix/QpiddBroker.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qpidd_CXXFLAGS) $(CXXFLAGS) -MT posix/qpidd-QpiddBroker.obj -MD -MP -MF posix/$(DEPDIR)/qpidd-QpiddBroker.Tpo -c -o posix/qpidd-QpiddBroker.obj `if test -f 'posix/QpiddBroker.cpp'; then $(CYGPATH_W) 'posix/QpiddBroker.cpp'; else $(CYGPATH_W) '$(srcdir)/posix/QpiddBroker.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) posix/$(DEPDIR)/qpidd-QpiddBroker.Tpo posix/$(DEPDIR)/qpidd-QpiddBroker.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='posix/QpiddBroker.cpp' object='posix/qpidd-QpiddBroker.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qpidd_CXXFLAGS) $(CXXFLAGS) -c -o posix/qpidd-QpiddBroker.obj `if test -f 'posix/QpiddBroker.cpp'; then $(CYGPATH_W) 'posix/QpiddBroker.cpp'; else $(CYGPATH_W) '$(srcdir)/posix/QpiddBroker.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf ./qpid/client/no_keyword/.libs ./qpid/client/no_keyword/_libs -rm -rf ./qpid/framing/.libs ./qpid/framing/_libs -rm -rf qmf/.libs qmf/_libs -rm -rf qmf/engine/.libs qmf/engine/_libs -rm -rf qmf/org/apache/qpid/acl/.libs qmf/org/apache/qpid/acl/_libs -rm -rf qmf/org/apache/qpid/broker/.libs qmf/org/apache/qpid/broker/_libs -rm -rf qmf/org/apache/qpid/cluster/.libs qmf/org/apache/qpid/cluster/_libs -rm -rf qmf/org/apache/qpid/ha/.libs qmf/org/apache/qpid/ha/_libs -rm -rf qpid/.libs qpid/_libs -rm -rf qpid/acl/.libs qpid/acl/_libs -rm -rf qpid/agent/.libs qpid/agent/_libs -rm -rf qpid/amqp_0_10/.libs qpid/amqp_0_10/_libs -rm -rf qpid/broker/.libs qpid/broker/_libs -rm -rf qpid/broker/posix/.libs qpid/broker/posix/_libs -rm -rf qpid/client/.libs qpid/client/_libs -rm -rf qpid/client/amqp0_10/.libs qpid/client/amqp0_10/_libs -rm -rf qpid/cluster/.libs qpid/cluster/_libs -rm -rf qpid/console/.libs qpid/console/_libs -rm -rf qpid/framing/.libs qpid/framing/_libs -rm -rf qpid/ha/.libs qpid/ha/_libs -rm -rf qpid/log/.libs qpid/log/_libs -rm -rf qpid/log/posix/.libs qpid/log/posix/_libs -rm -rf qpid/management/.libs qpid/management/_libs -rm -rf qpid/messaging/.libs qpid/messaging/_libs -rm -rf qpid/replication/.libs qpid/replication/_libs -rm -rf qpid/sys/.libs qpid/sys/_libs -rm -rf qpid/sys/cyrus/.libs qpid/sys/cyrus/_libs -rm -rf qpid/sys/epoll/.libs qpid/sys/epoll/_libs -rm -rf qpid/sys/posix/.libs qpid/sys/posix/_libs -rm -rf qpid/sys/rdma/.libs qpid/sys/rdma/_libs -rm -rf qpid/sys/solaris/.libs qpid/sys/solaris/_libs -rm -rf qpid/sys/ssl/.libs qpid/sys/ssl/_libs -rm -rf qpid/types/.libs qpid/types/_libs -rm -rf qpid/xml/.libs qpid/xml/_libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files install-dist_org_apache_qpid_aclHEADERS: $(dist_org_apache_qpid_acl_HEADERS) @$(NORMAL_INSTALL) test -z "$(org_apache_qpid_acldir)" || $(MKDIR_P) "$(DESTDIR)$(org_apache_qpid_acldir)" @list='$(dist_org_apache_qpid_acl_HEADERS)'; test -n "$(org_apache_qpid_acldir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(org_apache_qpid_acldir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(org_apache_qpid_acldir)" || exit $$?; \ done uninstall-dist_org_apache_qpid_aclHEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_org_apache_qpid_acl_HEADERS)'; test -n "$(org_apache_qpid_acldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(org_apache_qpid_acldir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(org_apache_qpid_acldir)" && rm -f $$files install-dist_org_apache_qpid_brokerHEADERS: $(dist_org_apache_qpid_broker_HEADERS) @$(NORMAL_INSTALL) test -z "$(org_apache_qpid_brokerdir)" || $(MKDIR_P) "$(DESTDIR)$(org_apache_qpid_brokerdir)" @list='$(dist_org_apache_qpid_broker_HEADERS)'; test -n "$(org_apache_qpid_brokerdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(org_apache_qpid_brokerdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(org_apache_qpid_brokerdir)" || exit $$?; \ done uninstall-dist_org_apache_qpid_brokerHEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_org_apache_qpid_broker_HEADERS)'; test -n "$(org_apache_qpid_brokerdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(org_apache_qpid_brokerdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(org_apache_qpid_brokerdir)" && rm -f $$files install-dist_org_apache_qpid_clusterHEADERS: $(dist_org_apache_qpid_cluster_HEADERS) @$(NORMAL_INSTALL) test -z "$(org_apache_qpid_clusterdir)" || $(MKDIR_P) "$(DESTDIR)$(org_apache_qpid_clusterdir)" @list='$(dist_org_apache_qpid_cluster_HEADERS)'; test -n "$(org_apache_qpid_clusterdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(org_apache_qpid_clusterdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(org_apache_qpid_clusterdir)" || exit $$?; \ done uninstall-dist_org_apache_qpid_clusterHEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_org_apache_qpid_cluster_HEADERS)'; test -n "$(org_apache_qpid_clusterdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(org_apache_qpid_clusterdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(org_apache_qpid_clusterdir)" && rm -f $$files install-dist_org_apache_qpid_haHEADERS: $(dist_org_apache_qpid_ha_HEADERS) @$(NORMAL_INSTALL) test -z "$(org_apache_qpid_hadir)" || $(MKDIR_P) "$(DESTDIR)$(org_apache_qpid_hadir)" @list='$(dist_org_apache_qpid_ha_HEADERS)'; test -n "$(org_apache_qpid_hadir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(org_apache_qpid_hadir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(org_apache_qpid_hadir)" || exit $$?; \ done uninstall-dist_org_apache_qpid_haHEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_org_apache_qpid_ha_HEADERS)'; test -n "$(org_apache_qpid_hadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(org_apache_qpid_hadir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(org_apache_qpid_hadir)" && rm -f $$files install-dist_qpid_amqp_0_10HEADERS: $(dist_qpid_amqp_0_10_HEADERS) @$(NORMAL_INSTALL) test -z "$(qpid_amqp_0_10dir)" || $(MKDIR_P) "$(DESTDIR)$(qpid_amqp_0_10dir)" @list='$(dist_qpid_amqp_0_10_HEADERS)'; test -n "$(qpid_amqp_0_10dir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(qpid_amqp_0_10dir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(qpid_amqp_0_10dir)" || exit $$?; \ done uninstall-dist_qpid_amqp_0_10HEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_qpid_amqp_0_10_HEADERS)'; test -n "$(qpid_amqp_0_10dir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpid_amqp_0_10dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpid_amqp_0_10dir)" && rm -f $$files install-dist_qpid_brokerHEADERS: $(dist_qpid_broker_HEADERS) @$(NORMAL_INSTALL) test -z "$(qpid_brokerdir)" || $(MKDIR_P) "$(DESTDIR)$(qpid_brokerdir)" @list='$(dist_qpid_broker_HEADERS)'; test -n "$(qpid_brokerdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(qpid_brokerdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(qpid_brokerdir)" || exit $$?; \ done uninstall-dist_qpid_brokerHEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_qpid_broker_HEADERS)'; test -n "$(qpid_brokerdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpid_brokerdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpid_brokerdir)" && rm -f $$files install-dist_qpid_clientHEADERS: $(dist_qpid_client_HEADERS) @$(NORMAL_INSTALL) test -z "$(qpid_clientdir)" || $(MKDIR_P) "$(DESTDIR)$(qpid_clientdir)" @list='$(dist_qpid_client_HEADERS)'; test -n "$(qpid_clientdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(qpid_clientdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(qpid_clientdir)" || exit $$?; \ done uninstall-dist_qpid_clientHEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_qpid_client_HEADERS)'; test -n "$(qpid_clientdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpid_clientdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpid_clientdir)" && rm -f $$files install-dist_qpid_client_no_keywordHEADERS: $(dist_qpid_client_no_keyword_HEADERS) @$(NORMAL_INSTALL) test -z "$(qpid_client_no_keyworddir)" || $(MKDIR_P) "$(DESTDIR)$(qpid_client_no_keyworddir)" @list='$(dist_qpid_client_no_keyword_HEADERS)'; test -n "$(qpid_client_no_keyworddir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(qpid_client_no_keyworddir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(qpid_client_no_keyworddir)" || exit $$?; \ done uninstall-dist_qpid_client_no_keywordHEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_qpid_client_no_keyword_HEADERS)'; test -n "$(qpid_client_no_keyworddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpid_client_no_keyworddir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpid_client_no_keyworddir)" && rm -f $$files install-dist_qpid_framingHEADERS: $(dist_qpid_framing_HEADERS) @$(NORMAL_INSTALL) test -z "$(qpid_framingdir)" || $(MKDIR_P) "$(DESTDIR)$(qpid_framingdir)" @list='$(dist_qpid_framing_HEADERS)'; test -n "$(qpid_framingdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(qpid_framingdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(qpid_framingdir)" || exit $$?; \ done uninstall-dist_qpid_framingHEADERS: @$(NORMAL_UNINSTALL) @list='$(dist_qpid_framing_HEADERS)'; test -n "$(qpid_framingdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpid_framingdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpid_framingdir)" && rm -f $$files install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo "$(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ done uninstall-nobase_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files # 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): @fail= 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; \ ($(am__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" $(RECURSIVE_CLEAN_TARGETS): @fail= 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ $(HEADERS) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(cmoduleexecdir)" "$(DESTDIR)$(dmoduleexecdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(tmoduleexecdir)" "$(DESTDIR)$(qpidexecdir)" "$(DESTDIR)$(qpidtestdir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(qpidexecdir)" "$(DESTDIR)$(qpidtestdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(org_apache_qpid_acldir)" "$(DESTDIR)$(org_apache_qpid_brokerdir)" "$(DESTDIR)$(org_apache_qpid_clusterdir)" "$(DESTDIR)$(org_apache_qpid_hadir)" "$(DESTDIR)$(qpid_amqp_0_10dir)" "$(DESTDIR)$(qpid_brokerdir)" "$(DESTDIR)$(qpid_clientdir)" "$(DESTDIR)$(qpid_client_no_keyworddir)" "$(DESTDIR)$(qpid_framingdir)" "$(DESTDIR)$(includedir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f posix/$(DEPDIR)/$(am__dirstamp) -rm -f posix/$(am__dirstamp) -rm -f qmf/$(DEPDIR)/$(am__dirstamp) -rm -f qmf/$(am__dirstamp) -rm -f qmf/engine/$(DEPDIR)/$(am__dirstamp) -rm -f qmf/engine/$(am__dirstamp) -rm -f qmf/org/apache/qpid/acl/$(DEPDIR)/$(am__dirstamp) -rm -f qmf/org/apache/qpid/acl/$(am__dirstamp) -rm -f qmf/org/apache/qpid/broker/$(DEPDIR)/$(am__dirstamp) -rm -f qmf/org/apache/qpid/broker/$(am__dirstamp) -rm -f qmf/org/apache/qpid/cluster/$(DEPDIR)/$(am__dirstamp) -rm -f qmf/org/apache/qpid/cluster/$(am__dirstamp) -rm -f qmf/org/apache/qpid/ha/$(DEPDIR)/$(am__dirstamp) -rm -f qmf/org/apache/qpid/ha/$(am__dirstamp) -rm -f qpid/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/$(am__dirstamp) -rm -f qpid/acl/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/acl/$(am__dirstamp) -rm -f qpid/agent/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/agent/$(am__dirstamp) -rm -f qpid/amqp_0_10/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/amqp_0_10/$(am__dirstamp) -rm -f qpid/broker/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/broker/$(am__dirstamp) -rm -f qpid/broker/posix/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/broker/posix/$(am__dirstamp) -rm -f qpid/client/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/client/$(am__dirstamp) -rm -f qpid/client/amqp0_10/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/client/amqp0_10/$(am__dirstamp) -rm -f qpid/client/no_keyword/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/client/no_keyword/$(am__dirstamp) -rm -f qpid/cluster/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/cluster/$(am__dirstamp) -rm -f qpid/console/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/console/$(am__dirstamp) -rm -f qpid/framing/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/framing/$(am__dirstamp) -rm -f qpid/ha/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/ha/$(am__dirstamp) -rm -f qpid/log/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/log/$(am__dirstamp) -rm -f qpid/log/posix/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/log/posix/$(am__dirstamp) -rm -f qpid/management/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/management/$(am__dirstamp) -rm -f qpid/messaging/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/messaging/$(am__dirstamp) -rm -f qpid/replication/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/replication/$(am__dirstamp) -rm -f qpid/sys/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/sys/$(am__dirstamp) -rm -f qpid/sys/cyrus/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/sys/cyrus/$(am__dirstamp) -rm -f qpid/sys/epoll/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/sys/epoll/$(am__dirstamp) -rm -f qpid/sys/posix/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/sys/posix/$(am__dirstamp) -rm -f qpid/sys/rdma/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/sys/rdma/$(am__dirstamp) -rm -f qpid/sys/solaris/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/sys/solaris/$(am__dirstamp) -rm -f qpid/sys/ssl/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/sys/ssl/$(am__dirstamp) -rm -f qpid/types/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/types/$(am__dirstamp) -rm -f qpid/xml/$(DEPDIR)/$(am__dirstamp) -rm -f qpid/xml/$(am__dirstamp) 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-cmoduleexecLTLIBRARIES clean-dmoduleexecLTLIBRARIES \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstPROGRAMS clean-qpidexecPROGRAMS \ clean-qpidtestPROGRAMS clean-sbinPROGRAMS \ clean-tmoduleexecLTLIBRARIES mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) ./qpid/client/no_keyword/$(DEPDIR) ./qpid/framing/$(DEPDIR) posix/$(DEPDIR) qmf/$(DEPDIR) qmf/engine/$(DEPDIR) qmf/org/apache/qpid/acl/$(DEPDIR) qmf/org/apache/qpid/broker/$(DEPDIR) qmf/org/apache/qpid/cluster/$(DEPDIR) qmf/org/apache/qpid/ha/$(DEPDIR) qpid/$(DEPDIR) qpid/acl/$(DEPDIR) qpid/agent/$(DEPDIR) qpid/amqp_0_10/$(DEPDIR) qpid/broker/$(DEPDIR) qpid/broker/posix/$(DEPDIR) qpid/client/$(DEPDIR) qpid/client/amqp0_10/$(DEPDIR) qpid/cluster/$(DEPDIR) qpid/console/$(DEPDIR) qpid/framing/$(DEPDIR) qpid/ha/$(DEPDIR) qpid/log/$(DEPDIR) qpid/log/posix/$(DEPDIR) qpid/management/$(DEPDIR) qpid/messaging/$(DEPDIR) qpid/replication/$(DEPDIR) qpid/sys/$(DEPDIR) qpid/sys/cyrus/$(DEPDIR) qpid/sys/epoll/$(DEPDIR) qpid/sys/posix/$(DEPDIR) qpid/sys/rdma/$(DEPDIR) qpid/sys/solaris/$(DEPDIR) qpid/sys/ssl/$(DEPDIR) qpid/types/$(DEPDIR) qpid/xml/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local \ install-dist_org_apache_qpid_aclHEADERS \ install-dist_org_apache_qpid_brokerHEADERS \ install-dist_org_apache_qpid_clusterHEADERS \ install-dist_org_apache_qpid_haHEADERS \ install-dist_qpid_amqp_0_10HEADERS \ install-dist_qpid_brokerHEADERS \ install-dist_qpid_clientHEADERS \ install-dist_qpid_client_no_keywordHEADERS \ install-dist_qpid_framingHEADERS install-nobase_includeHEADERS \ install-pkgconfigDATA install-qpidtestPROGRAMS \ install-qpidtestSCRIPTS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-cmoduleexecLTLIBRARIES \ install-dmoduleexecLTLIBRARIES install-libLTLIBRARIES \ install-qpidexecPROGRAMS install-qpidexecSCRIPTS \ install-sbinPROGRAMS install-tmoduleexecLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) ./qpid/client/no_keyword/$(DEPDIR) ./qpid/framing/$(DEPDIR) posix/$(DEPDIR) qmf/$(DEPDIR) qmf/engine/$(DEPDIR) qmf/org/apache/qpid/acl/$(DEPDIR) qmf/org/apache/qpid/broker/$(DEPDIR) qmf/org/apache/qpid/cluster/$(DEPDIR) qmf/org/apache/qpid/ha/$(DEPDIR) qpid/$(DEPDIR) qpid/acl/$(DEPDIR) qpid/agent/$(DEPDIR) qpid/amqp_0_10/$(DEPDIR) qpid/broker/$(DEPDIR) qpid/broker/posix/$(DEPDIR) qpid/client/$(DEPDIR) qpid/client/amqp0_10/$(DEPDIR) qpid/cluster/$(DEPDIR) qpid/console/$(DEPDIR) qpid/framing/$(DEPDIR) qpid/ha/$(DEPDIR) qpid/log/$(DEPDIR) qpid/log/posix/$(DEPDIR) qpid/management/$(DEPDIR) qpid/messaging/$(DEPDIR) qpid/replication/$(DEPDIR) qpid/sys/$(DEPDIR) qpid/sys/cyrus/$(DEPDIR) qpid/sys/epoll/$(DEPDIR) qpid/sys/posix/$(DEPDIR) qpid/sys/rdma/$(DEPDIR) qpid/sys/solaris/$(DEPDIR) qpid/sys/ssl/$(DEPDIR) qpid/types/$(DEPDIR) qpid/xml/$(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-cmoduleexecLTLIBRARIES \ uninstall-dist_org_apache_qpid_aclHEADERS \ uninstall-dist_org_apache_qpid_brokerHEADERS \ uninstall-dist_org_apache_qpid_clusterHEADERS \ uninstall-dist_org_apache_qpid_haHEADERS \ uninstall-dist_qpid_amqp_0_10HEADERS \ uninstall-dist_qpid_brokerHEADERS \ uninstall-dist_qpid_clientHEADERS \ uninstall-dist_qpid_client_no_keywordHEADERS \ uninstall-dist_qpid_framingHEADERS \ uninstall-dmoduleexecLTLIBRARIES uninstall-libLTLIBRARIES \ uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA \ uninstall-qpidexecPROGRAMS uninstall-qpidexecSCRIPTS \ uninstall-qpidtestPROGRAMS uninstall-qpidtestSCRIPTS \ uninstall-sbinPROGRAMS uninstall-tmoduleexecLTLIBRARIES .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-cmoduleexecLTLIBRARIES \ clean-dmoduleexecLTLIBRARIES clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \ clean-qpidexecPROGRAMS clean-qpidtestPROGRAMS \ clean-sbinPROGRAMS clean-tmoduleexecLTLIBRARIES ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-cmoduleexecLTLIBRARIES install-data install-data-am \ install-data-local install-dist_org_apache_qpid_aclHEADERS \ install-dist_org_apache_qpid_brokerHEADERS \ install-dist_org_apache_qpid_clusterHEADERS \ install-dist_org_apache_qpid_haHEADERS \ install-dist_qpid_amqp_0_10HEADERS \ install-dist_qpid_brokerHEADERS \ install-dist_qpid_clientHEADERS \ install-dist_qpid_client_no_keywordHEADERS \ install-dist_qpid_framingHEADERS \ install-dmoduleexecLTLIBRARIES install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLTLIBRARIES \ install-man install-nobase_includeHEADERS install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-qpidexecPROGRAMS install-qpidexecSCRIPTS \ install-qpidtestPROGRAMS install-qpidtestSCRIPTS \ install-sbinPROGRAMS install-strip \ install-tmoduleexecLTLIBRARIES installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-cmoduleexecLTLIBRARIES \ uninstall-dist_org_apache_qpid_aclHEADERS \ uninstall-dist_org_apache_qpid_brokerHEADERS \ uninstall-dist_org_apache_qpid_clusterHEADERS \ uninstall-dist_org_apache_qpid_haHEADERS \ uninstall-dist_qpid_amqp_0_10HEADERS \ uninstall-dist_qpid_brokerHEADERS \ uninstall-dist_qpid_clientHEADERS \ uninstall-dist_qpid_client_no_keywordHEADERS \ uninstall-dist_qpid_framingHEADERS \ uninstall-dmoduleexecLTLIBRARIES uninstall-libLTLIBRARIES \ uninstall-nobase_includeHEADERS uninstall-pkgconfigDATA \ uninstall-qpidexecPROGRAMS uninstall-qpidexecSCRIPTS \ uninstall-qpidtestPROGRAMS uninstall-qpidtestSCRIPTS \ uninstall-sbinPROGRAMS uninstall-tmoduleexecLTLIBRARIES # Note: generated soure and makefiles included in distribution so a # distribution can be built without code generation tools and XML # sources. # This phony target is needed by generated makefile fragments: force: @GENERATE_TRUE@$(rgen_srcs) $(srcdir)/rubygen.mk: rgen.timestamp @GENERATE_TRUE@rgen.timestamp: $(rgen_generator) $(specs) @GENERATE_TRUE@ $(rgen_cmd) $(srcdir)/rubygen.mk && touch $@ @GENERATE_TRUE@$(rgen_generator): # The CMake version is needed for dist @GENERATE_TRUE@$(srcdir)/rubygen.cmake: $(rgen_generator) $(specs) @GENERATE_TRUE@ $(rgen_cmd) $(srcdir)/rubygen.cmake @GENERATE_TRUE@$(srcdir)/managementgen.mk $(mgen_broker_cpp) $(dist_qpid_management_HEADERS): mgen.timestamp @GENERATE_TRUE@mgen.timestamp: $(mgen_generator) $(mgen_xml) @GENERATE_TRUE@ $(mgen_cmd); touch $@ @GENERATE_TRUE@$(mgen_generator): @GENERATE_TRUE@$(srcdir)/managementgen.mk: $(mgen_generator) @GENERATE_TRUE@ $(mgen_cmd) @GENERATE_TRUE@$(mgen_generator): # Create the default data directory install-data-local: $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/lib/qpidd # 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: qpidc-0.16/src/ha.mk0000664000076400007640000000263111717465066014663 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # HA plugin makefile fragment, to be included in Makefile.am # dmoduleexec_LTLIBRARIES += ha.la ha_la_SOURCES = \ qpid/ha/Backup.cpp \ qpid/ha/Backup.h \ qpid/ha/HaBroker.cpp \ qpid/ha/HaBroker.h \ qpid/ha/HaPlugin.cpp \ qpid/ha/Settings.h \ qpid/ha/QueueReplicator.h \ qpid/ha/QueueReplicator.cpp \ qpid/ha/ReplicatingSubscription.h \ qpid/ha/ReplicatingSubscription.cpp \ qpid/ha/BrokerReplicator.cpp \ qpid/ha/BrokerReplicator.h \ qpid/ha/ConnectionExcluder.cpp \ qpid/ha/ConnectionExcluder.h ha_la_LIBADD = libqpidbroker.la ha_la_LDFLAGS = $(PLUGINLDFLAGS) qpidc-0.16/src/Makefile.am0000664000076400007640000007147411721766633016010 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # SUBDIRS = . tests # The Windows-only sources are not compiled using this Makefile, but # are listed here to ensure they're included in releases. They are built # using Visual Studio solutions/projects. windows_dist = \ qpid/client/windows/SaslFactory.cpp \ qpid/client/windows/SslConnector.cpp \ qpid/log/windows/SinkOptions.cpp \ qpid/log/windows/SinkOptions.h \ ../include/qpid/sys/windows/check.h \ qpid/sys/windows/AsynchIO.cpp \ qpid/sys/windows/AsynchIoResult.h \ ../include/qpid/sys/windows/Condition.h \ qpid/sys/windows/FileSysDir.cpp \ ../include/qpid/sys/windows/IntegerTypes.h \ qpid/sys/windows/IocpPoller.cpp \ qpid/sys/windows/IOHandle.cpp \ qpid/sys/windows/IoHandlePrivate.h \ qpid/sys/windows/LockFile.cpp \ qpid/sys/windows/mingw32_compat.h \ qpid/sys/windows/PollableCondition.cpp \ qpid/sys/windows/PipeHandle.cpp \ ../include/qpid/sys/windows/Mutex.h \ qpid/sys/windows/Shlib.cpp \ qpid/sys/windows/SocketAddress.cpp \ qpid/sys/windows/Socket.cpp \ qpid/sys/windows/SslAsynchIO.cpp \ qpid/sys/windows/SslAsynchIO.h \ qpid/sys/windows/StrError.cpp \ qpid/sys/windows/SystemInfo.cpp \ qpid/sys/windows/Thread.cpp \ qpid/sys/windows/Time.cpp \ ../include/qpid/sys/windows/Time.h \ qpid/sys/windows/uuid.cpp \ qpid/sys/windows/uuid.h \ qpid/sys/windows/MemStat.cpp \ windows/QpiddBroker.cpp \ windows/SCM.h \ windows/SCM.cpp \ qpid/broker/windows/BrokerDefaults.cpp \ qpid/broker/windows/SaslAuthenticator.cpp \ qpid/broker/windows/SslProtocolFactory.cpp \ qpid/messaging/HandleInstantiator.cpp \ windows/resources/template-resource.rc \ windows/resources/version-resource.h \ windows/resources/qpid-icon.ico EXTRA_DIST= $(platform_dist) $(rgen_srcs) $(windows_dist) # Define variables that are be appended to by this file and included .mk files. nobase_include_HEADERS = libqpidcommon_la_SOURCES = pkgconfig_DATA = ## Generated code # Note: generated soure and makefiles included in distribution so a # distribution can be built without code generation tools and XML # sources. # This phony target is needed by generated makefile fragments: force: if GENERATE # AMQP_FINAL_XML is defined in ../configure.ac amqp_0_10_xml=@AMQP_FINAL_XML@ specs=$(amqp_0_10_xml) $(top_srcdir)/xml/cluster.xml # Ruby generator. rgen_dir=$(top_srcdir)/rubygen rgen_cmd=ruby -I $(rgen_dir) $(rgen_dir)/generate . ../include $(specs) all $(rgen_srcs) $(srcdir)/rubygen.mk: rgen.timestamp rgen.timestamp: $(rgen_generator) $(specs) $(rgen_cmd) $(srcdir)/rubygen.mk && touch $@ $(rgen_generator): # The CMake version is needed for dist $(srcdir)/rubygen.cmake: $(rgen_generator) $(specs) $(rgen_cmd) $(srcdir)/rubygen.cmake # Management generator. mgen_dir=$(top_srcdir)/managementgen mgen_xml=$(top_srcdir)/../specs/management-schema.xml \ $(srcdir)/qpid/acl/management-schema.xml \ $(srcdir)/qpid/cluster/management-schema.xml \ $(srcdir)/qpid/ha/management-schema.xml mgen_cmd=$(mgen_dir)/qmf-gen -m $(srcdir)/managementgen.mk \ -c $(srcdir)/managementgen.cmake -q -b -o qmf \ $(mgen_xml) $(srcdir)/managementgen.mk $(mgen_broker_cpp) $(dist_qpid_management_HEADERS): mgen.timestamp mgen.timestamp: $(mgen_generator) $(mgen_xml) $(mgen_cmd); touch $@ $(mgen_generator): endif # GENERATE include $(srcdir)/rubygen.mk include $(srcdir)/managementgen.mk ## Compiler flags AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(srcdir) -I=$(builddir) # # Destination for intalled programs and tests defined here # qpidexecdir = $(libexecdir)/qpid AM_CXXFLAGS += -DQPID_LIBEXEC_DIR=\"$(qpidexecdir)\" qpidexec_PROGRAMS = qpidexec_SCRIPTS = qpidtestdir = $(qpidexecdir)/tests qpidtest_PROGRAMS = qpidtest_SCRIPTS = tmoduleexecdir = $(libdir)/qpid/tests tmoduleexec_LTLIBRARIES= AM_CXXFLAGS += -DBOOST_FILESYSTEM_VERSION=2 ## Automake macros to build libraries and executables. qpidd_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDD_MODULE_DIR=\"$(dmoduleexecdir)\" -DQPIDD_CONF_FILE=\"$(sysconfdir)/qpidd.conf\" libqpidclient_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_MODULE_DIR=\"$(cmoduleexecdir)\" -DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\" qpidd_LDADD = \ libqpidbroker.la \ libqpidcommon.la posix_qpidd_src = posix/QpiddBroker.cpp sbin_PROGRAMS = qpidd qpidd_SOURCES = qpidd.cpp qpidd.h $(posix_qpidd_src) ## Platform specific code. # Posix-specific code libqpidcommon_la_SOURCES += \ qpid/log/posix/SinkOptions.cpp \ qpid/sys/posix/IOHandle.cpp \ qpid/sys/posix/Socket.cpp \ qpid/sys/posix/SocketAddress.cpp \ qpid/sys/posix/AsynchIO.cpp \ qpid/sys/posix/FileSysDir.cpp \ qpid/sys/posix/LockFile.cpp \ qpid/sys/posix/Time.cpp \ qpid/sys/posix/Thread.cpp \ qpid/sys/posix/Shlib.cpp \ qpid/sys/posix/MemStat.cpp \ qpid/sys/posix/Mutex.cpp \ qpid/sys/posix/Fork.cpp \ qpid/sys/posix/StrError.cpp \ qpid/sys/posix/PollableCondition.cpp \ qpid/sys/posix/PidFile.h \ qpid/sys/posix/PipeHandle.cpp \ qpid/log/posix/SinkOptions.h \ qpid/sys/posix/Fork.h nobase_include_HEADERS += \ ../include/qpid/sys/posix/Condition.h \ ../include/qpid/sys/posix/IntegerTypes.h \ ../include/qpid/sys/posix/Mutex.h \ ../include/qpid/sys/posix/PrivatePosix.h \ ../include/qpid/sys/posix/Time.h \ ../include/qpid/sys/posix/check.h if USE_EPOLL poller = qpid/sys/epoll/EpollPoller.cpp endif if USE_POLL poller = qpid/sys/posix/PosixPoller.cpp endif if USE_ECF poller = qpid/sys/solaris/ECFPoller.cpp endif if SUNOS systeminfo = qpid/sys/solaris/SystemInfo.cpp else systeminfo = qpid/sys/posix/SystemInfo.cpp endif libqpidcommon_la_SOURCES += $(poller) $(systeminfo) posix_broker_src = \ qpid/broker/posix/BrokerDefaults.cpp lib_LTLIBRARIES = libqpidtypes.la libqpidcommon.la libqpidbroker.la libqpidclient.la libqpidmessaging.la # Definitions for client and daemon plugins PLUGINLDFLAGS=-no-undefined -module -avoid-version confdir=$(sysconfdir)/qpid dmoduleexecdir=$(libdir)/qpid/daemon cmoduleexecdir=$(libdir)/qpid/client dmoduleexec_LTLIBRARIES = cmoduleexec_LTLIBRARIES = include cluster.mk include ha.mk include acl.mk include qmf.mk include qmfc.mk if HAVE_XML include xml.mk endif include replication.mk if RDMA # RDMA (Infiniband) protocol code librdmawrap_la_SOURCES = \ qpid/sys/rdma/rdma_exception.h \ qpid/sys/rdma/rdma_factories.cpp \ qpid/sys/rdma/rdma_factories.h \ qpid/sys/rdma/RdmaIO.cpp \ qpid/sys/rdma/RdmaIO.h \ qpid/sys/rdma/rdma_wrap.cpp \ qpid/sys/rdma/rdma_wrap.h librdmawrap_la_LIBADD = \ libqpidcommon.la \ -lrdmacm \ -libverbs librdmawrap_la_CXXFLAGS = \ $(AM_CXXFLAGS) -Wno-missing-field-initializers lib_LTLIBRARIES += \ librdmawrap.la RDMAWRAP_VERSION_INFO = 2:0:0 librdmawrap_la_LDFLAGS = -version-info $(RDMAWRAP_VERSION_INFO) -no-undefined rdma_la_SOURCES = \ qpid/sys/RdmaIOPlugin.cpp rdma_la_LIBADD = \ libqpidbroker.la \ librdmawrap.la \ -libverbs rdma_la_LDFLAGS = $(PLUGINLDFLAGS) rdma_la_CXXFLAGS = \ $(AM_CXXFLAGS) -Wno-missing-field-initializers dmoduleexec_LTLIBRARIES += \ rdma.la rdmaconnector_la_SOURCES = \ qpid/client/RdmaConnector.cpp rdmaconnector_la_LIBADD = \ libqpidclient.la \ librdmawrap.la \ -libverbs rdmaconnector_la_LDFLAGS = $(PLUGINLDFLAGS) rdmaconnector_la_CXXFLAGS = \ $(AM_CXXFLAGS) -Wno-missing-field-initializers cmoduleexec_LTLIBRARIES += \ rdmaconnector.la # RDMA test/sample programs noinst_PROGRAMS = RdmaServer RdmaClient RdmaServer_SOURCES = qpid/sys/rdma/RdmaServer.cpp RdmaServer_LDADD = \ librdmawrap.la libqpidcommon.la RdmaClient_SOURCES = qpid/sys/rdma/RdmaClient.cpp RdmaClient_CXXFLAGS = \ $(AM_CXXFLAGS) -Wno-missing-field-initializers RdmaClient_LDADD = \ librdmawrap.la libqpidcommon.la endif if SSL include ssl.mk endif EXTRA_DIST +=\ CMakeLists.txt \ cluster.cmake \ config.h.cmake \ rdma.cmake \ ssl.cmake \ managementgen.cmake \ rubygen.cmake \ versions.cmake \ $(rgen_amqp_0_10_srcs) \ qpid/amqp_0_10/apply.h \ qpid/amqp_0_10/built_in_types.h \ qpid/amqp_0_10/complex_types.cpp \ qpid/amqp_0_10/Array.h \ qpid/amqp_0_10/Array.cpp \ qpid/amqp_0_10/Body.h \ qpid/amqp_0_10/Command.h \ qpid/amqp_0_10/CommmandPacker.h \ qpid/amqp_0_10/Control.h \ qpid/amqp_0_10/Header.h \ qpid/amqp_0_10/Header.cpp \ qpid/amqp_0_10/FrameHeader.h \ qpid/amqp_0_10/FrameHeader.cpp \ qpid/amqp_0_10/Holder.h \ qpid/amqp_0_10/Codec.h \ qpid/amqp_0_10/Packer.h \ qpid/amqp_0_10/Decimal.h \ qpid/amqp_0_10/SerializableString.h \ qpid/amqp_0_10/Map.h \ qpid/amqp_0_10/Map.cpp \ qpid/amqp_0_10/Struct.h \ qpid/amqp_0_10/Struct32.h \ qpid/amqp_0_10/Struct32.cpp \ qpid/amqp_0_10/Unit.h \ qpid/amqp_0_10/Unit.cpp \ qpid/amqp_0_10/UnitHandler.h \ qpid/amqp_0_10/UnknownType.h \ qpid/amqp_0_10/UnknownType.cpp \ qpid/amqp_0_10/UnknownStruct.h \ qpid/amqp_0_10/UnknownStruct.cpp \ qpid/store libqpidcommon_la_LIBADD = \ libqpidtypes.la \ -lboost_program_options \ -lboost_filesystem \ -luuid \ $(LIB_DLOPEN) \ $(LIB_CLOCK_GETTIME) libqpidcommon_la_SOURCES += \ $(rgen_framing_srcs) \ $(platform_src) \ qpid/Address.cpp \ qpid/DataDir.cpp \ qpid/DataDir.h \ qpid/DisableExceptionLogging.h \ qpid/Exception.cpp \ qpid/Modules.cpp \ qpid/Modules.h \ qpid/Options.cpp \ qpid/Plugin.cpp \ qpid/Plugin.h \ qpid/RefCounted.h \ qpid/RefCountedBuffer.cpp \ qpid/RefCountedBuffer.h \ qpid/BufferRef.h \ qpid/Sasl.h \ qpid/SaslFactory.cpp \ qpid/SaslFactory.h \ qpid/Serializer.h \ qpid/SessionId.cpp \ qpid/SessionState.cpp \ qpid/SessionState.h \ qpid/SessionState.h \ qpid/SharedObject.h \ qpid/StringUtils.cpp \ qpid/StringUtils.h \ qpid/Url.cpp \ qpid/UrlArray.cpp \ qpid/UrlArray.h \ qpid/Version.h \ qpid/amqp_0_10/Exception.h \ qpid/amqp_0_10/SessionHandler.cpp \ qpid/amqp_0_10/SessionHandler.h \ qpid/amqp_0_10/apply.h \ qpid/assert.cpp qpid/assert.h \ qpid/assert.h \ qpid/framing/AMQBody.cpp \ qpid/framing/AMQBody.h \ qpid/framing/AMQCommandControlBody.h \ qpid/framing/AMQContentBody.cpp \ qpid/framing/AMQContentBody.h \ qpid/framing/AMQDataBlock.h \ qpid/framing/AMQFrame.cpp \ qpid/framing/AMQFrame.h \ qpid/framing/AMQHeaderBody.cpp \ qpid/framing/AMQHeaderBody.h \ qpid/framing/AMQHeartbeatBody.cpp \ qpid/framing/AMQHeartbeatBody.h \ qpid/framing/AMQMethodBody.cpp \ qpid/framing/AMQMethodBody.h \ qpid/framing/AMQP_HighestVersion.h \ qpid/framing/AMQP_HighestVersion.h \ qpid/framing/AccumulatedAck.cpp \ qpid/framing/AccumulatedAck.h \ qpid/framing/Array.cpp \ qpid/framing/BodyFactory.h \ qpid/framing/BodyHandler.cpp \ qpid/framing/BodyHandler.h \ qpid/framing/Buffer.cpp \ qpid/framing/ResizableBuffer.h \ qpid/framing/ChannelHandler.h \ qpid/framing/Endian.cpp \ qpid/framing/Endian.h \ qpid/framing/FieldTable.cpp \ qpid/framing/FieldValue.cpp \ qpid/framing/FrameDecoder.cpp \ qpid/framing/FrameDecoder.h \ qpid/framing/FrameDefaultVisitor.h \ qpid/framing/FrameHandler.h \ qpid/framing/FrameSet.cpp \ qpid/framing/FrameSet.h \ qpid/framing/Handler.h \ qpid/framing/HeaderProperties.h \ qpid/framing/InitiationHandler.h \ qpid/framing/InputHandler.h \ qpid/framing/Invoker.h \ qpid/framing/IsInSequenceSet.h \ qpid/framing/List.cpp \ qpid/framing/MethodBodyFactory.h \ qpid/framing/MethodContent.h \ qpid/framing/ModelMethod.h \ qpid/framing/OutputHandler.h \ qpid/framing/ProtocolInitiation.cpp \ qpid/framing/ProtocolInitiation.h \ qpid/framing/ProtocolVersion.cpp \ qpid/framing/Proxy.cpp \ qpid/framing/Proxy.h \ qpid/framing/SendContent.cpp \ qpid/framing/SendContent.h \ qpid/framing/SequenceNumber.cpp \ qpid/framing/SequenceNumberSet.cpp \ qpid/framing/SequenceNumberSet.h \ qpid/framing/SequenceSet.cpp \ qpid/framing/TransferContent.cpp \ qpid/framing/TransferContent.h \ qpid/framing/TypeFilter.h \ qpid/framing/Uuid.cpp \ qpid/framing/Visitor.h \ qpid/framing/amqp_framing.h \ qpid/framing/frame_functors.h \ qpid/framing/variant.h \ qpid/log/Helpers.h \ qpid/log/Logger.cpp \ qpid/log/Options.cpp \ qpid/log/OstreamOutput.cpp \ qpid/log/OstreamOutput.h \ qpid/log/Selector.cpp \ qpid/log/Statement.cpp \ qpid/management/Buffer.cpp \ qpid/management/ConnectionSettings.cpp \ qpid/management/Manageable.cpp \ qpid/management/ManagementObject.cpp \ qpid/management/Mutex.cpp \ qpid/memory.h \ qpid/pointer_to_other.h \ qpid/ptr_map.h \ qpid/sys/AggregateOutput.cpp \ qpid/sys/AggregateOutput.h \ qpid/sys/AsynchIO.h \ qpid/sys/AsynchIOHandler.cpp \ qpid/sys/AsynchIOHandler.h \ qpid/sys/AtomicCount.h \ qpid/sys/AtomicValue.h \ qpid/sys/AtomicValue_gcc.h \ qpid/sys/AtomicValue_mutex.h \ qpid/sys/BlockingQueue.h \ qpid/sys/ClusterSafe.h \ qpid/sys/ClusterSafe.cpp \ qpid/sys/Codec.h \ qpid/sys/ConnectionCodec.h \ qpid/sys/ConnectionInputHandler.h \ qpid/sys/ConnectionInputHandlerFactory.h \ qpid/sys/ConnectionOutputHandler.h \ qpid/sys/ConnectionOutputHandlerPtr.h \ qpid/sys/CopyOnWriteArray.h \ qpid/sys/DeletionManager.h \ qpid/sys/DispatchHandle.cpp \ qpid/sys/DispatchHandle.h \ qpid/sys/Dispatcher.cpp \ qpid/sys/Dispatcher.h \ qpid/sys/FileSysDir.h \ qpid/sys/Fork.h \ qpid/sys/LockFile.h \ qpid/sys/LockPtr.h \ qpid/sys/MemStat.h \ qpid/sys/OutputControl.h \ qpid/sys/OutputTask.h \ qpid/sys/PipeHandle.h \ qpid/sys/PollableCondition.h \ qpid/sys/PollableQueue.h \ qpid/sys/Poller.h \ qpid/sys/Probes.h \ qpid/sys/ProtocolFactory.h \ qpid/sys/Runnable.cpp \ qpid/sys/ScopedIncrement.h \ qpid/sys/SecurityLayer.h \ qpid/sys/SecuritySettings.h \ qpid/sys/Semaphore.h \ qpid/sys/Shlib.cpp \ qpid/sys/Shlib.h \ qpid/sys/ShutdownHandler.h \ qpid/sys/Socket.h \ qpid/sys/SocketAddress.h \ qpid/sys/StateMonitor.h \ qpid/sys/TimeoutHandler.h \ qpid/sys/Timer.cpp \ qpid/sys/Timer.h \ qpid/sys/TimerWarnings.cpp \ qpid/sys/TimerWarnings.h \ qpid/sys/Waitable.h \ qpid/sys/alloca.h \ qpid/sys/uuid.h \ qpid/sys/unordered_map.h \ qpid/amqp_0_10/Codecs.cpp if HAVE_SASL libqpidcommon_la_SOURCES += qpid/sys/cyrus/CyrusSecurityLayer.h libqpidcommon_la_SOURCES += qpid/sys/cyrus/CyrusSecurityLayer.cpp libqpidcommon_la_LIBADD += -lsasl2 endif QPIDCOMMON_VERSION_INFO = 2:0:0 libqpidcommon_la_LDFLAGS=-version-info $(QPIDCOMMON_VERSION_INFO) libqpidbroker_la_LIBADD = libqpidcommon.la libqpidbroker_la_SOURCES = \ $(mgen_broker_cpp) \ $(posix_broker_src) \ qpid/amqp_0_10/Connection.cpp \ qpid/amqp_0_10/Connection.h \ qpid/broker/AclModule.h \ qpid/broker/Bridge.cpp \ qpid/broker/Bridge.h \ qpid/broker/Broker.cpp \ qpid/broker/Broker.h \ qpid/broker/BrokerImportExport.h \ qpid/broker/Connection.cpp \ qpid/broker/Connection.h \ qpid/broker/ConnectionFactory.cpp \ qpid/broker/ConnectionFactory.h \ qpid/broker/ConnectionHandler.cpp \ qpid/broker/ConnectionHandler.h \ qpid/broker/ConnectionState.h \ qpid/broker/ConnectionToken.h \ qpid/broker/Consumer.h \ qpid/broker/Credit.h \ qpid/broker/Credit.cpp \ qpid/broker/ConsumerFactory.h \ qpid/broker/ConnectionObserver.h \ qpid/broker/ConnectionObservers.h \ qpid/broker/Daemon.cpp \ qpid/broker/Daemon.h \ qpid/broker/Deliverable.h \ qpid/broker/DeliverableMessage.cpp \ qpid/broker/DeliverableMessage.h \ qpid/broker/DeliveryAdapter.h \ qpid/broker/DeliveryId.h \ qpid/broker/DeliveryRecord.cpp \ qpid/broker/DeliveryRecord.h \ qpid/broker/DirectExchange.cpp \ qpid/broker/DirectExchange.h \ qpid/broker/DtxAck.cpp \ qpid/broker/DtxAck.h \ qpid/broker/DtxBuffer.cpp \ qpid/broker/DtxBuffer.h \ qpid/broker/DtxManager.cpp \ qpid/broker/DtxManager.h \ qpid/broker/DtxTimeout.cpp \ qpid/broker/DtxTimeout.h \ qpid/broker/DtxWorkRecord.cpp \ qpid/broker/DtxWorkRecord.h \ qpid/broker/Exchange.cpp \ qpid/broker/Exchange.h \ qpid/broker/ExchangeRegistry.cpp \ qpid/broker/ExchangeRegistry.h \ qpid/broker/ExpiryPolicy.cpp \ qpid/broker/ExpiryPolicy.h \ qpid/broker/Fairshare.h \ qpid/broker/Fairshare.cpp \ qpid/broker/FanOutExchange.cpp \ qpid/broker/FanOutExchange.h \ qpid/broker/FedOps.h \ qpid/broker/HandlerImpl.h \ qpid/broker/HeadersExchange.cpp \ qpid/broker/HeadersExchange.h \ qpid/broker/AsyncCompletion.h \ qpid/broker/LegacyLVQ.h \ qpid/broker/LegacyLVQ.cpp \ qpid/broker/Link.cpp \ qpid/broker/Link.h \ qpid/broker/LinkRegistry.cpp \ qpid/broker/LinkRegistry.h \ qpid/broker/Message.cpp \ qpid/broker/Message.h \ qpid/broker/MessageAdapter.cpp \ qpid/broker/MessageAdapter.h \ qpid/broker/MessageBuilder.cpp \ qpid/broker/MessageBuilder.h \ qpid/broker/MessageDeque.h \ qpid/broker/MessageDeque.cpp \ qpid/broker/MessageMap.h \ qpid/broker/MessageMap.cpp \ qpid/broker/Messages.h \ qpid/broker/MessageStore.h \ qpid/broker/MessageStoreModule.cpp \ qpid/broker/MessageStoreModule.h \ qpid/broker/PriorityQueue.h \ qpid/broker/PriorityQueue.cpp \ qpid/broker/NameGenerator.cpp \ qpid/broker/NameGenerator.h \ qpid/broker/NullMessageStore.cpp \ qpid/broker/NullMessageStore.h \ qpid/broker/OwnershipToken.h \ qpid/broker/Persistable.h \ qpid/broker/PersistableConfig.h \ qpid/broker/PersistableExchange.h \ qpid/broker/PersistableMessage.cpp \ qpid/broker/PersistableMessage.h \ qpid/broker/PersistableQueue.h \ qpid/broker/Queue.cpp \ qpid/broker/Queue.h \ qpid/broker/QueueBindings.cpp \ qpid/broker/QueueBindings.h \ qpid/broker/QueueCleaner.cpp \ qpid/broker/QueueCleaner.h \ qpid/broker/QueueEvents.cpp \ qpid/broker/QueueEvents.h \ qpid/broker/QueueListeners.cpp \ qpid/broker/QueueListeners.h \ qpid/broker/QueueObserver.h \ qpid/broker/QueuePolicy.cpp \ qpid/broker/QueuePolicy.h \ qpid/broker/QueueRegistry.cpp \ qpid/broker/QueueRegistry.h \ qpid/broker/QueuedMessage.h \ qpid/broker/QueueFlowLimit.h \ qpid/broker/QueueFlowLimit.cpp \ qpid/broker/RecoverableConfig.h \ qpid/broker/RecoverableExchange.h \ qpid/broker/RecoverableMessage.h \ qpid/broker/RecoverableQueue.h \ qpid/broker/RecoverableTransaction.h \ qpid/broker/RecoveredDequeue.cpp \ qpid/broker/RecoveredDequeue.h \ qpid/broker/RecoveredEnqueue.cpp \ qpid/broker/RecoveredEnqueue.h \ qpid/broker/RecoveryManager.h \ qpid/broker/RecoveryManagerImpl.cpp \ qpid/broker/RecoveryManagerImpl.h \ qpid/broker/RetryList.cpp \ qpid/broker/RetryList.h \ qpid/broker/SaslAuthenticator.cpp \ qpid/broker/SaslAuthenticator.h \ qpid/broker/SecureConnection.cpp \ qpid/broker/SecureConnection.h \ qpid/broker/SecureConnectionFactory.cpp \ qpid/broker/SecureConnectionFactory.h \ qpid/broker/SemanticState.cpp \ qpid/broker/SemanticState.h \ qpid/broker/SessionAdapter.cpp \ qpid/broker/SessionAdapter.h \ qpid/broker/SessionAdapter.h \ qpid/broker/SessionContext.h \ qpid/broker/SessionHandler.cpp \ qpid/broker/SessionHandler.h \ qpid/broker/SessionManager.cpp \ qpid/broker/SessionManager.h \ qpid/broker/SessionManager.h \ qpid/broker/SessionOutputException.h \ qpid/broker/SessionState.cpp \ qpid/broker/SessionState.h \ qpid/broker/SignalHandler.cpp \ qpid/broker/SignalHandler.h \ qpid/broker/StatefulQueueObserver.h \ qpid/broker/System.cpp \ qpid/broker/System.h \ qpid/broker/ThresholdAlerts.cpp \ qpid/broker/ThresholdAlerts.h \ qpid/broker/TopicExchange.cpp \ qpid/broker/TopicExchange.h \ qpid/broker/TransactionalStore.h \ qpid/broker/TxAccept.cpp \ qpid/broker/TxAccept.h \ qpid/broker/TxBuffer.cpp \ qpid/broker/TxBuffer.h \ qpid/broker/TxOp.h \ qpid/broker/TxOpVisitor.h \ qpid/broker/TxPublish.cpp \ qpid/broker/TxPublish.h \ qpid/broker/Vhost.cpp \ qpid/broker/Vhost.h \ qpid/broker/MessageDistributor.h \ qpid/broker/FifoDistributor.h \ qpid/broker/FifoDistributor.cpp \ qpid/broker/MessageGroupManager.cpp \ qpid/broker/MessageGroupManager.h \ qpid/management/ManagementAgent.cpp \ qpid/management/ManagementAgent.h \ qpid/management/ManagementDirectExchange.cpp \ qpid/management/ManagementDirectExchange.h \ qpid/management/ManagementTopicExchange.cpp \ qpid/management/ManagementTopicExchange.h \ qpid/sys/TCPIOPlugin.cpp QPIDBROKER_VERSION_INFO = 2:0:0 libqpidbroker_la_LDFLAGS = -version-info $(QPIDBROKER_VERSION_INFO) libqpidclient_la_LIBADD = libqpidcommon.la -luuid libqpidclient_la_SOURCES = \ $(rgen_client_srcs) \ qpid/client/Bounds.cpp \ qpid/client/Bounds.h \ qpid/client/ChainableFrameHandler.h \ qpid/client/Completion.cpp \ qpid/client/CompletionImpl.h \ qpid/client/Connection.cpp \ qpid/client/ConnectionAccess.h \ qpid/client/ConnectionHandler.cpp \ qpid/client/ConnectionHandler.h \ qpid/client/ConnectionImpl.cpp \ qpid/client/ConnectionImpl.h \ qpid/client/ConnectionSettings.cpp \ qpid/client/Connector.cpp \ qpid/client/Connector.h \ qpid/client/Demux.cpp \ qpid/client/Demux.h \ qpid/client/Dispatcher.cpp \ qpid/client/Dispatcher.h \ qpid/client/Execution.h \ qpid/client/FailoverListener.cpp \ qpid/client/FailoverManager.cpp \ qpid/client/Future.cpp \ qpid/client/FutureCompletion.cpp \ qpid/client/FutureResult.cpp \ qpid/client/LoadPlugins.h \ qpid/client/LoadPlugins.cpp \ qpid/client/LocalQueue.cpp \ qpid/client/LocalQueueImpl.cpp \ qpid/client/LocalQueueImpl.h \ qpid/client/Message.cpp \ qpid/client/MessageImpl.cpp \ qpid/client/MessageImpl.h \ qpid/client/MessageListener.cpp \ qpid/client/MessageReplayTracker.cpp \ qpid/client/PrivateImplRef.h \ qpid/client/QueueOptions.cpp \ qpid/client/Results.cpp \ qpid/client/Results.h \ qpid/client/SessionBase_0_10.cpp \ qpid/client/SessionBase_0_10Access.h \ qpid/client/SessionImpl.cpp \ qpid/client/SessionImpl.h \ qpid/client/StateManager.cpp \ qpid/client/StateManager.h \ qpid/client/Subscription.cpp \ qpid/client/SubscriptionImpl.cpp \ qpid/client/SubscriptionImpl.h \ qpid/client/SubscriptionManager.cpp \ qpid/client/SubscriptionManagerImpl.cpp \ qpid/client/SubscriptionManagerImpl.h \ qpid/client/TCPConnector.cpp \ qpid/client/TCPConnector.h QPIDCLIENT_VERSION_INFO = 2:0:0 libqpidclient_la_LDFLAGS = -version-info $(QPIDCLIENT_VERSION_INFO) libqpidtypes_la_LIBADD= -luuid libqpidtypes_la_SOURCES= \ qpid/types/Exception.cpp \ qpid/types/Uuid.cpp \ qpid/types/Variant.cpp \ ../include/qpid/types/ImportExport.h QPIDTYPES_VERSION_INFO = 1:0:0 libqpidtypes_la_LDFLAGS = -version-info $(QPIDTYPES_VERSION_INFO) libqpidmessaging_la_LIBADD = libqpidclient.la libqpidtypes.la libqpidmessaging_la_SOURCES = \ qpid/messaging/Address.cpp \ qpid/messaging/AddressParser.h \ qpid/messaging/AddressParser.cpp \ qpid/messaging/Connection.cpp \ qpid/messaging/Duration.cpp \ qpid/messaging/exceptions.cpp \ qpid/messaging/Message.cpp \ qpid/messaging/MessageImpl.h \ qpid/messaging/MessageImpl.cpp \ qpid/messaging/PrivateImplRef.h \ qpid/messaging/Sender.cpp \ qpid/messaging/Receiver.cpp \ qpid/messaging/Session.cpp \ qpid/messaging/ConnectionImpl.h \ qpid/messaging/SenderImpl.h \ qpid/messaging/ReceiverImpl.h \ qpid/messaging/SessionImpl.h \ qpid/messaging/FailoverUpdates.cpp \ qpid/client/amqp0_10/AcceptTracker.h \ qpid/client/amqp0_10/AcceptTracker.cpp \ qpid/client/amqp0_10/AddressResolution.h \ qpid/client/amqp0_10/AddressResolution.cpp \ qpid/client/amqp0_10/ConnectionImpl.h \ qpid/client/amqp0_10/ConnectionImpl.cpp \ qpid/client/amqp0_10/IncomingMessages.h \ qpid/client/amqp0_10/IncomingMessages.cpp \ qpid/client/amqp0_10/MessageSink.h \ qpid/client/amqp0_10/MessageSource.h \ qpid/client/amqp0_10/OutgoingMessage.h \ qpid/client/amqp0_10/OutgoingMessage.cpp \ qpid/client/amqp0_10/ReceiverImpl.h \ qpid/client/amqp0_10/ReceiverImpl.cpp \ qpid/client/amqp0_10/SessionImpl.h \ qpid/client/amqp0_10/SessionImpl.cpp \ qpid/client/amqp0_10/SenderImpl.h \ qpid/client/amqp0_10/SenderImpl.cpp QPIDMESSAGING_VERSION_INFO = 2:0:0 libqpidmessaging_la_LDFLAGS = -version-info $(QPIDMESSAGING_VERSION_INFO) # NOTE: only public header files (which should be in ../include) # should go in this list. Private headers should go in the SOURCES # list for one of the libraries or executables that includes it. nobase_include_HEADERS += \ ../include/qpid/Address.h \ ../include/qpid/CommonImportExport.h \ ../include/qpid/Exception.h \ ../include/qpid/ImportExport.h \ ../include/qpid/InlineAllocator.h \ ../include/qpid/InlineVector.h \ ../include/qpid/Msg.h \ ../include/qpid/Options.h \ ../include/qpid/RangeSet.h \ ../include/qpid/SessionId.h \ ../include/qpid/Url.h \ ../include/qpid/amqp_0_10/Codecs.h \ ../include/qpid/client/AsyncSession.h \ ../include/qpid/client/ClientImportExport.h \ ../include/qpid/client/Completion.h \ ../include/qpid/client/Connection.h \ ../include/qpid/client/ConnectionSettings.h \ ../include/qpid/client/FailoverListener.h \ ../include/qpid/client/FailoverManager.h \ ../include/qpid/client/FlowControl.h \ ../include/qpid/client/Future.h \ ../include/qpid/client/FutureCompletion.h \ ../include/qpid/client/FutureResult.h \ ../include/qpid/client/Handle.h \ ../include/qpid/client/LocalQueue.h \ ../include/qpid/client/Message.h \ ../include/qpid/client/MessageListener.h \ ../include/qpid/client/MessageReplayTracker.h \ ../include/qpid/client/QueueOptions.h \ ../include/qpid/client/Session.h \ ../include/qpid/client/SessionBase_0_10.h \ ../include/qpid/client/Subscription.h \ ../include/qpid/client/SubscriptionManager.h \ ../include/qpid/client/SubscriptionSettings.h \ ../include/qpid/client/TypedResult.h \ ../include/qpid/framing/Array.h \ ../include/qpid/framing/Buffer.h \ ../include/qpid/framing/FieldTable.h \ ../include/qpid/framing/FieldValue.h \ ../include/qpid/framing/List.h \ ../include/qpid/framing/ProtocolVersion.h \ ../include/qpid/framing/SequenceNumber.h \ ../include/qpid/framing/SequenceSet.h \ ../include/qpid/framing/StructHelper.h \ ../include/qpid/framing/Uuid.h \ ../include/qpid/framing/amqp_types.h \ ../include/qpid/framing/amqp_types_full.h \ ../include/qpid/log/Logger.h \ ../include/qpid/log/Options.h \ ../include/qpid/log/Selector.h \ ../include/qpid/log/SinkOptions.h \ ../include/qpid/log/Statement.h \ ../include/qpid/management/Args.h \ ../include/qpid/management/Buffer.h \ ../include/qpid/management/ConnectionSettings.h \ ../include/qpid/management/Manageable.h \ ../include/qpid/management/ManagementEvent.h \ ../include/qpid/management/ManagementObject.h \ ../include/qpid/management/Mutex.h \ ../include/qpid/sys/Condition.h \ ../include/qpid/sys/ExceptionHolder.h \ ../include/qpid/sys/IOHandle.h \ ../include/qpid/sys/IntegerTypes.h \ ../include/qpid/sys/Monitor.h \ ../include/qpid/sys/Mutex.h \ ../include/qpid/sys/Runnable.h \ ../include/qpid/sys/StrError.h \ ../include/qpid/sys/SystemInfo.h \ ../include/qpid/sys/Thread.h \ ../include/qpid/sys/Time.h \ ../include/qpid/messaging/Address.h \ ../include/qpid/messaging/Connection.h \ ../include/qpid/messaging/Duration.h \ ../include/qpid/messaging/exceptions.h \ ../include/qpid/messaging/Handle.h \ ../include/qpid/messaging/ImportExport.h \ ../include/qpid/messaging/Message.h \ ../include/qpid/messaging/Receiver.h \ ../include/qpid/messaging/Sender.h \ ../include/qpid/messaging/Session.h \ ../include/qpid/messaging/FailoverUpdates.h \ ../include/qpid/types/Exception.h \ ../include/qpid/types/Uuid.h \ ../include/qpid/types/Variant.h \ ../include/qpid/types/ImportExport.h # Create the default data directory install-data-local: $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/lib/qpidd # Support for pkg-config pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA += qpid.pc qpidc-0.16/src/managementgen.cmake0000664000076400007640000003014711752725673017557 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # This source file was created by a code generator. # Please do not edit. set(mgen_generator ${mgen_dir}/qmf-gen ${mgen_dir}/qmfgen/generate.py ${mgen_dir}/qmfgen/schema.py ${mgen_dir}/qmfgen/management-types.xml ${qpid-cpp_SOURCE_DIR}/../specs/management-schema.xml ${mgen_dir}/qmfgen/templates/Class.h ${mgen_dir}/qmfgen/templates/Class.cpp ${mgen_dir}/qmfgen/templates/Args.h ${mgen_dir}/qmfgen/templates/Event.h ${mgen_dir}/qmfgen/templates/Event.cpp ${mgen_dir}/qmfgen/templates/Package.h ${mgen_dir}/qmfgen/templates/Package.cpp ${mgen_dir}/qmfgen/templates/Class.h ${mgen_dir}/qmfgen/templates/Class.cpp ${mgen_dir}/qmfgen/templates/Args.h ${mgen_dir}/qmfgen/templates/Event.h ${mgen_dir}/qmfgen/templates/Event.cpp ${mgen_dir}/qmfgen/templates/Package.h ${mgen_dir}/qmfgen/templates/Package.cpp ${mgen_dir}/qmfgen/templates/Class.h ${mgen_dir}/qmfgen/templates/Class.cpp ${mgen_dir}/qmfgen/templates/Args.h ${mgen_dir}/qmfgen/templates/Event.h ${mgen_dir}/qmfgen/templates/Event.cpp ${mgen_dir}/qmfgen/templates/Package.h ${mgen_dir}/qmfgen/templates/Package.cpp ${mgen_dir}/qmfgen/templates/Class.h ${mgen_dir}/qmfgen/templates/Class.cpp ${mgen_dir}/qmfgen/templates/Args.h ${mgen_dir}/qmfgen/templates/Event.h ${mgen_dir}/qmfgen/templates/Event.cpp ${mgen_dir}/qmfgen/templates/Package.h ${mgen_dir}/qmfgen/templates/Package.cpp ${mgen_dir}/qmfgen/templates/Makefile.mk ${mgen_dir}/qmfgen/templates/CMakeLists.cmake) set(mgen_broker_cpp qmf/org/apache/qpid/broker/System.cpp qmf/org/apache/qpid/broker/Memory.cpp qmf/org/apache/qpid/broker/Broker.cpp qmf/org/apache/qpid/broker/Agent.cpp qmf/org/apache/qpid/broker/Vhost.cpp qmf/org/apache/qpid/broker/Queue.cpp qmf/org/apache/qpid/broker/Exchange.cpp qmf/org/apache/qpid/broker/Binding.cpp qmf/org/apache/qpid/broker/Subscription.cpp qmf/org/apache/qpid/broker/Connection.cpp qmf/org/apache/qpid/broker/Link.cpp qmf/org/apache/qpid/broker/Bridge.cpp qmf/org/apache/qpid/broker/Session.cpp qmf/org/apache/qpid/broker/ManagementSetupState.cpp qmf/org/apache/qpid/broker/EventClientConnect.cpp qmf/org/apache/qpid/broker/EventClientConnectFail.cpp qmf/org/apache/qpid/broker/EventClientDisconnect.cpp qmf/org/apache/qpid/broker/EventBrokerLinkUp.cpp qmf/org/apache/qpid/broker/EventBrokerLinkDown.cpp qmf/org/apache/qpid/broker/EventQueueDeclare.cpp qmf/org/apache/qpid/broker/EventQueueDelete.cpp qmf/org/apache/qpid/broker/EventExchangeDeclare.cpp qmf/org/apache/qpid/broker/EventExchangeDelete.cpp qmf/org/apache/qpid/broker/EventBind.cpp qmf/org/apache/qpid/broker/EventUnbind.cpp qmf/org/apache/qpid/broker/EventSubscribe.cpp qmf/org/apache/qpid/broker/EventUnsubscribe.cpp qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.cpp qmf/org/apache/qpid/broker/Package.cpp qmf/org/apache/qpid/acl/Acl.cpp qmf/org/apache/qpid/acl/EventAllow.cpp qmf/org/apache/qpid/acl/EventDeny.cpp qmf/org/apache/qpid/acl/EventFileLoaded.cpp qmf/org/apache/qpid/acl/EventFileLoadFailed.cpp qmf/org/apache/qpid/acl/Package.cpp qmf/org/apache/qpid/cluster/Cluster.cpp qmf/org/apache/qpid/cluster/Package.cpp qmf/org/apache/qpid/ha/HaBroker.cpp qmf/org/apache/qpid/ha/Package.cpp) # Header file install rules. ##Come back to this later... #org_apache_qpid_brokerdir = $(includedir)/qmf/org/apache/qpid/broker #dist_org_apache_qpid_broker_HEADERS = #qmf/org/apache/qpid/broker/System.h #qmf/org/apache/qpid/broker/Memory.h #qmf/org/apache/qpid/broker/Broker.h #qmf/org/apache/qpid/broker/Agent.h #qmf/org/apache/qpid/broker/Vhost.h #qmf/org/apache/qpid/broker/Queue.h #qmf/org/apache/qpid/broker/Exchange.h #qmf/org/apache/qpid/broker/Binding.h #qmf/org/apache/qpid/broker/Subscription.h #qmf/org/apache/qpid/broker/Connection.h #qmf/org/apache/qpid/broker/Link.h #qmf/org/apache/qpid/broker/Bridge.h #qmf/org/apache/qpid/broker/Session.h #qmf/org/apache/qpid/broker/ManagementSetupState.h #qmf/org/apache/qpid/broker/ArgsBrokerEcho.h #qmf/org/apache/qpid/broker/ArgsBrokerConnect.h #qmf/org/apache/qpid/broker/ArgsBrokerQueueMoveMessages.h #qmf/org/apache/qpid/broker/ArgsBrokerSetLogLevel.h #qmf/org/apache/qpid/broker/ArgsBrokerGetLogLevel.h #qmf/org/apache/qpid/broker/ArgsBrokerGetTimestampConfig.h #qmf/org/apache/qpid/broker/ArgsBrokerSetTimestampConfig.h #qmf/org/apache/qpid/broker/ArgsBrokerCreate.h #qmf/org/apache/qpid/broker/ArgsBrokerDelete.h #qmf/org/apache/qpid/broker/ArgsBrokerQuery.h #qmf/org/apache/qpid/broker/ArgsQueuePurge.h #qmf/org/apache/qpid/broker/ArgsQueueReroute.h #qmf/org/apache/qpid/broker/ArgsLinkBridge.h #qmf/org/apache/qpid/broker/EventClientConnect.h #qmf/org/apache/qpid/broker/EventClientConnectFail.h #qmf/org/apache/qpid/broker/EventClientDisconnect.h #qmf/org/apache/qpid/broker/EventBrokerLinkUp.h #qmf/org/apache/qpid/broker/EventBrokerLinkDown.h #qmf/org/apache/qpid/broker/EventQueueDeclare.h #qmf/org/apache/qpid/broker/EventQueueDelete.h #qmf/org/apache/qpid/broker/EventExchangeDeclare.h #qmf/org/apache/qpid/broker/EventExchangeDelete.h #qmf/org/apache/qpid/broker/EventBind.h #qmf/org/apache/qpid/broker/EventUnbind.h #qmf/org/apache/qpid/broker/EventSubscribe.h #qmf/org/apache/qpid/broker/EventUnsubscribe.h #qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.h #qmf/org/apache/qpid/broker/Package.h #Come back to this later... #org_apache_qpid_acldir = $(includedir)/qmf/org/apache/qpid/acl #dist_org_apache_qpid_acl_HEADERS = #qmf/org/apache/qpid/acl/Acl.h #qmf/org/apache/qpid/acl/EventAllow.h #qmf/org/apache/qpid/acl/EventDeny.h #qmf/org/apache/qpid/acl/EventFileLoaded.h #qmf/org/apache/qpid/acl/EventFileLoadFailed.h #qmf/org/apache/qpid/acl/Package.h #Come back to this later... #org_apache_qpid_clusterdir = $(includedir)/qmf/org/apache/qpid/cluster #dist_org_apache_qpid_cluster_HEADERS = #qmf/org/apache/qpid/cluster/Cluster.h #qmf/org/apache/qpid/cluster/ArgsClusterStopClusterNode.h #qmf/org/apache/qpid/cluster/Package.h #Come back to this later... #org_apache_qpid_hadir = $(includedir)/qmf/org/apache/qpid/ha #dist_org_apache_qpid_ha_HEADERS = #qmf/org/apache/qpid/ha/HaBroker.h #qmf/org/apache/qpid/ha/ArgsHaBrokerSetBrokers.h #qmf/org/apache/qpid/ha/ArgsHaBrokerSetPublicBrokers.h #qmf/org/apache/qpid/ha/ArgsHaBrokerSetExpectedBackups.h #qmf/org/apache/qpid/ha/ArgsHaBrokerReplicate.h #qmf/org/apache/qpid/ha/Package.h #if GENERATE #$(srcdir)/managementgen.mk: $(mgen_generator) # $(mgen_cmd) # #$(mgen_generator): #endif # set(qmfgen_sources qmf/org/apache/qpid/broker/System.h qmf/org/apache/qpid/broker/Memory.h qmf/org/apache/qpid/broker/Broker.h qmf/org/apache/qpid/broker/Agent.h qmf/org/apache/qpid/broker/Vhost.h qmf/org/apache/qpid/broker/Queue.h qmf/org/apache/qpid/broker/Exchange.h qmf/org/apache/qpid/broker/Binding.h qmf/org/apache/qpid/broker/Subscription.h qmf/org/apache/qpid/broker/Connection.h qmf/org/apache/qpid/broker/Link.h qmf/org/apache/qpid/broker/Bridge.h qmf/org/apache/qpid/broker/Session.h qmf/org/apache/qpid/broker/ManagementSetupState.h qmf/org/apache/qpid/broker/ArgsBrokerEcho.h qmf/org/apache/qpid/broker/ArgsBrokerConnect.h qmf/org/apache/qpid/broker/ArgsBrokerQueueMoveMessages.h qmf/org/apache/qpid/broker/ArgsBrokerSetLogLevel.h qmf/org/apache/qpid/broker/ArgsBrokerGetLogLevel.h qmf/org/apache/qpid/broker/ArgsBrokerGetTimestampConfig.h qmf/org/apache/qpid/broker/ArgsBrokerSetTimestampConfig.h qmf/org/apache/qpid/broker/ArgsBrokerCreate.h qmf/org/apache/qpid/broker/ArgsBrokerDelete.h qmf/org/apache/qpid/broker/ArgsBrokerQuery.h qmf/org/apache/qpid/broker/ArgsQueuePurge.h qmf/org/apache/qpid/broker/ArgsQueueReroute.h qmf/org/apache/qpid/broker/ArgsLinkBridge.h qmf/org/apache/qpid/broker/EventClientConnect.h qmf/org/apache/qpid/broker/EventClientConnectFail.h qmf/org/apache/qpid/broker/EventClientDisconnect.h qmf/org/apache/qpid/broker/EventBrokerLinkUp.h qmf/org/apache/qpid/broker/EventBrokerLinkDown.h qmf/org/apache/qpid/broker/EventQueueDeclare.h qmf/org/apache/qpid/broker/EventQueueDelete.h qmf/org/apache/qpid/broker/EventExchangeDeclare.h qmf/org/apache/qpid/broker/EventExchangeDelete.h qmf/org/apache/qpid/broker/EventBind.h qmf/org/apache/qpid/broker/EventUnbind.h qmf/org/apache/qpid/broker/EventSubscribe.h qmf/org/apache/qpid/broker/EventUnsubscribe.h qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.h qmf/org/apache/qpid/broker/Package.h qmf/org/apache/qpid/acl/Acl.h qmf/org/apache/qpid/acl/EventAllow.h qmf/org/apache/qpid/acl/EventDeny.h qmf/org/apache/qpid/acl/EventFileLoaded.h qmf/org/apache/qpid/acl/EventFileLoadFailed.h qmf/org/apache/qpid/acl/Package.h qmf/org/apache/qpid/cluster/Cluster.h qmf/org/apache/qpid/cluster/ArgsClusterStopClusterNode.h qmf/org/apache/qpid/cluster/Package.h qmf/org/apache/qpid/ha/HaBroker.h qmf/org/apache/qpid/ha/ArgsHaBrokerSetBrokers.h qmf/org/apache/qpid/ha/ArgsHaBrokerSetPublicBrokers.h qmf/org/apache/qpid/ha/ArgsHaBrokerSetExpectedBackups.h qmf/org/apache/qpid/ha/ArgsHaBrokerReplicate.h qmf/org/apache/qpid/ha/Package.h qmf/org/apache/qpid/broker/System.cpp qmf/org/apache/qpid/broker/Memory.cpp qmf/org/apache/qpid/broker/Broker.cpp qmf/org/apache/qpid/broker/Agent.cpp qmf/org/apache/qpid/broker/Vhost.cpp qmf/org/apache/qpid/broker/Queue.cpp qmf/org/apache/qpid/broker/Exchange.cpp qmf/org/apache/qpid/broker/Binding.cpp qmf/org/apache/qpid/broker/Subscription.cpp qmf/org/apache/qpid/broker/Connection.cpp qmf/org/apache/qpid/broker/Link.cpp qmf/org/apache/qpid/broker/Bridge.cpp qmf/org/apache/qpid/broker/Session.cpp qmf/org/apache/qpid/broker/ManagementSetupState.cpp qmf/org/apache/qpid/broker/EventClientConnect.cpp qmf/org/apache/qpid/broker/EventClientConnectFail.cpp qmf/org/apache/qpid/broker/EventClientDisconnect.cpp qmf/org/apache/qpid/broker/EventBrokerLinkUp.cpp qmf/org/apache/qpid/broker/EventBrokerLinkDown.cpp qmf/org/apache/qpid/broker/EventQueueDeclare.cpp qmf/org/apache/qpid/broker/EventQueueDelete.cpp qmf/org/apache/qpid/broker/EventExchangeDeclare.cpp qmf/org/apache/qpid/broker/EventExchangeDelete.cpp qmf/org/apache/qpid/broker/EventBind.cpp qmf/org/apache/qpid/broker/EventUnbind.cpp qmf/org/apache/qpid/broker/EventSubscribe.cpp qmf/org/apache/qpid/broker/EventUnsubscribe.cpp qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.cpp qmf/org/apache/qpid/broker/Package.cpp qmf/org/apache/qpid/acl/Acl.cpp qmf/org/apache/qpid/acl/EventAllow.cpp qmf/org/apache/qpid/acl/EventDeny.cpp qmf/org/apache/qpid/acl/EventFileLoaded.cpp qmf/org/apache/qpid/acl/EventFileLoadFailed.cpp qmf/org/apache/qpid/acl/Package.cpp qmf/org/apache/qpid/cluster/Cluster.cpp qmf/org/apache/qpid/cluster/Package.cpp qmf/org/apache/qpid/ha/HaBroker.cpp qmf/org/apache/qpid/ha/Package.cpp) qpidc-0.16/src/config.h.in0000664000076400007640000001073411752725660015766 0ustar00jrossjross00000000000000/* src/config.h.in. Generated from configure.ac by autoheader. */ /* The SASL app name for the qpid Broker */ #undef BROKER_SASL_NAME /* Define to 1 if you have the header file. */ #undef HAVE_BOOST_SHARED_PTR_HPP /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the `clock_settime' function. */ #undef HAVE_CLOCK_SETTIME /* Define to 1 if you have the header file. */ #undef HAVE_COROSYNC_CPG_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_INFINIBAND_VERBS_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBCMAN_H /* Define to 1 if you have the `ibverbs' library (-libverbs). */ #undef HAVE_LIBIBVERBS /* Define to 1 if you have the `rdmacm' library (-lrdmacm). */ #undef HAVE_LIBRDMACM /* Define to 1 if you have the `sasl2' library (-lsasl2). */ #undef HAVE_LIBSASL2 /* Define to 1 if you have the `xerces-c' library (-lxerces-c). */ #undef HAVE_LIBXERCES_C /* Define to 1 if you have the `xqilla' library (-lxqilla). */ #undef HAVE_LIBXQILLA /* Set to 1 whether LOG_AUTHPRIV is supported. */ #undef HAVE_LOG_AUTHPRIV /* Set to 1 whether LOG_FTP is supported. */ #undef HAVE_LOG_FTP /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENAIS_CPG_H /* Define to 1 if you have the header file. */ #undef HAVE_PORT_H /* Define to 1 if you have the header file. */ #undef HAVE_RDMA_RDMA_CMA_H /* Enable if libsasl is present */ #undef HAVE_SASL /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EPOLL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_POLL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SDT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_UUID_UUID_H /* Compile-in XML Exchange support. */ #undef HAVE_XML /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Version number of package */ #undef VERSION /* XQilla version has xqilla/ast/XQEffectiveBooleanValue.hpp. */ #undef XQ_EFFECTIVE_BOOLEAN_VALUE_HPP /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 1 if the compiler is checking for lint. */ #undef lint qpidc-0.16/src/versions.cmake0000664000076400007640000000263411654522741016611 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Library Version Information (CURRENT.REVISION.AGE): # # CURRENT => API/ABI version. Bump this if the interface changes # REVISION => Version of underlying implementation. # Bump if implementation changes but API/ABI doesn't # AGE => Number of API/ABI versions this is backward compatible with set (qmf_version 1.0.0) set (qmf2_version 1.0.0) set (qmfconsole_version 2.0.0) set (qmfengine_version 1.1.0) set (qpidbroker_version 2.0.0) set (qpidclient_version 2.0.0) set (qpidcommon_version 2.0.0) set (qpidmessaging_version 2.0.0) set (qpidtypes_version 1.0.0) set (rdmawrap_version 2.0.0) set (sslcommon_version 2.0.0) qpidc-0.16/src/xml.mk0000664000076400007640000000177411540750270015066 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # dmoduleexec_LTLIBRARIES += xml.la xml_la_SOURCES = \ qpid/xml/XmlExchange.cpp \ qpid/xml/XmlExchange.h \ qpid/xml/XmlExchangePlugin.cpp xml_la_LIBADD = -lxerces-c -lxqilla libqpidbroker.la xml_la_LDFLAGS = $(PLUGINLDFLAGS) qpidc-0.16/src/tests/0000775000076400007640000000000011752725716015102 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/run_federation_tests.ps10000664000076400007640000000541111721742044021743 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the federation tests. $srcdir = Split-Path $myInvocation.InvocationName $PYTHON_DIR = "$srcdir\..\..\..\python" if (!(Test-Path $PYTHON_DIR -pathType Container)) { "Skipping federation tests as python libs not found" exit 1 } . .\test_env.ps1 # Test runs from the tests directory but the broker executable is one level # up, and most likely in a subdirectory from there based on what build type. # Look around for it before trying to start it. $subs = "Debug","Release","MinSizeRel","RelWithDebInfo" foreach ($sub in $subs) { $prog = "..\$sub\qpidd.exe" if (Test-Path $prog) { break } } if (!(Test-Path $prog)) { "Cannot locate qpidd.exe" exit 1 } $cmdline = "$prog --auth=no --no-module-dir --no-data-dir --port=0 --ssl-port=0 --log-to-file qpidd.log $args | foreach { set-content qpidd.port `$_ }" $cmdblock = $executioncontext.invokecommand.NewScriptBlock($cmdline) function start_brokers { # Start 2 brokers, saving the port numbers in LOCAL_PORT, REMOTE_PORT. . $srcdir\background.ps1 $cmdblock while (!(Test-Path qpidd.port)) { Start-Sleep 2 } set-item -path env:LOCAL_PORT -value (get-content -path qpidd.port -totalcount 1) Remove-Item qpidd.port . $srcdir\background.ps1 $cmdblock while (!(Test-Path qpidd.port)) { Start-Sleep 2 } set-item -path env:REMOTE_PORT -value (get-content -path qpidd.port -totalcount 1) } function stop_brokers { Invoke-Expression "$prog -q --port $env:LOCAL_PORT" | Out-Default Invoke-Expression "$prog -q --port $env:REMOTE_PORT" | Out-Default } trap { &stop_brokers break } &start_brokers "Running federation tests using brokers on ports $env:LOCAL_PORT $env:REMOTE_PORT" $env:PYTHONPATH="$srcdir;$PYTHON_DIR;$PYTHON_TEST_DIR;$env:PYTHONPATH;$QMF_LIB" $tests = "*" Invoke-Expression "python $PYTHON_DIR/qpid-python-test -m federation -b localhost:$env:LOCAL_PORT -Dremote-port=$env:REMOTE_PORT $tests" | Out-Default $RETCODE=$LASTEXITCODE &stop_brokers if ($RETCODE -ne 0) { "FAIL federation tests" exit 1 } qpidc-0.16/src/tests/test_env.sh.in0000664000076400007640000000620011721766633017667 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # absdir() { echo `cd $1 && pwd`; } # Environment variables substituted by configure/cmake. srcdir=`absdir @abs_srcdir@` builddir=`absdir @abs_builddir@` top_srcdir=`absdir @abs_top_srcdir@` top_builddir=`absdir @abs_top_builddir@` moduledir=$top_builddir/src@builddir_lib_suffix@ testmoduledir=$builddir@builddir_lib_suffix@ export QPID_INSTALL_PREFIX=@prefix@ # Python paths and directories export PYTHON_DIR=$builddir/python export QPID_PYTHON_TEST=$PYTHON_DIR/commands/qpid-python-test if [ ! -d $PYTHON_DIR -a -d $top_srcdir/../python ]; then export PYTHON_DIR=$top_srcdir/../python export QPID_PYTHON_TEST=$PYTHON_DIR/qpid-python-test fi export QPID_TESTS=$top_srcdir/../tests export QPID_TESTS_PY=$QPID_TESTS/src/py export QPID_TOOLS=$top_srcdir/../tools export QMF_LIB=$top_srcdir/../extras/qmf/src/py export PYTHON_COMMANDS=$QPID_TOOLS/src/py export PYTHONPATH=$srcdir:$PYTHON_DIR:$PYTHON_COMMANDS:$QPID_TESTS_PY:$QMF_LIB:$PYTHONPATH export QPID_CONFIG_EXEC=$PYTHON_COMMANDS/qpid-config export QPID_ROUTE_EXEC=$PYTHON_COMMANDS/qpid-route export QPID_CLUSTER_EXEC=$PYTHON_COMMANDS/qpid-cluster export QPID_HA_EXEC=$PYTHON_COMMANDS/qpid-ha # Executables export QPIDD_EXEC=$top_builddir/src/qpidd export QPID_WATCHDOG_EXEC=$top_builddir/src/qpidd_watchdog # Test executables export QPID_TEST_EXEC_DIR=$builddir export RECEIVER_EXEC=$QPID_TEST_EXEC_DIR/receiver export SENDER_EXEC=$QPID_TEST_EXEC_DIR/sender # Path export PATH=$top_builddir/src:$builddir:$srcdir:$PYTHON_COMMANDS:$QPID_TEST_EXEC_DIR:$PYTHON_DIR/commands:$PATH # Modules export TEST_STORE_LIB=$testmoduledir/test_store.so exportmodule() { test -f $moduledir/$2 && eval "export $1=$moduledir/$2"; } exportmodule ACL_LIB acl.so exportmodule CLUSTER_LIB cluster.so exportmodule HA_LIB ha.so exportmodule REPLICATING_LISTENER_LIB replicating_listener.so exportmodule REPLICATION_EXCHANGE_LIB replication_exchange.so exportmodule SSLCONNECTOR_LIB sslconnector.so exportmodule SSL_LIB ssl.so exportmodule WATCHDOG_LIB watchdog.so exportmodule XML_LIB xml.so # Qpid options export QPID_NO_MODULE_DIR=1 # Don't accidentally load installed modules export QPID_DATA_DIR= # Use temporary directory if $HOME does not exist if [ ! -e "$HOME" ]; then export QPID_DATA_DIR=/tmp/qpid export QPID_PID_DIR=/tmp/qpid fi # Options for boost test framework export BOOST_TEST_SHOW_PROGRESS=yes export BOOST_TEST_CATCH_SYSTEM_ERRORS=no qpidc-0.16/src/tests/unit_test.h0000664000076400007640000000415411216171573017264 0ustar00jrossjross00000000000000#ifndef QPIPD_TEST_UNIT_TEST_H_ #define QPIPD_TEST_UNIT_TEST_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ // Workaround so we can build against boost 1.33 and boost 1.34. // Remove when we no longer need to support 1.33. // #include #include // Must be inclued beofre boost/test headers. // #include the correct header file. // #if (BOOST_VERSION < 103400) # include #else # include #endif // BOOST_VERSION // Workarounds for BOOST_AUTO_TEST_CASE|SUITE|SUITE_END // #if (BOOST_VERSION < 103300) # define QPID_AUTO_TEST_SUITE(name) # define QPID_AUTO_TEST_CASE(name) BOOST_AUTO_UNIT_TEST(name) # define QPID_AUTO_TEST_SUITE_END() #elif (BOOST_VERSION < 103400) // Note the trailing ';' # define QPID_AUTO_TEST_SUITE(name) BOOST_AUTO_TEST_SUITE(name); # define QPID_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END(); #endif // Workarounds for BOOST_AUTO_TEST_CASE|SUITE|SUITE_END // // Default definitions for latest version of boost. // #ifndef QPID_AUTO_TEST_SUITE # define QPID_AUTO_TEST_SUITE(name) BOOST_AUTO_TEST_SUITE(name) #endif #ifndef QPID_AUTO_TEST_CASE # define QPID_AUTO_TEST_CASE(name) BOOST_AUTO_TEST_CASE(name) #endif #ifndef QPID_AUTO_TEST_SUITE_END # define QPID_AUTO_TEST_SUITE_END() BOOST_AUTO_TEST_SUITE_END() #endif #endif // !QPIPD_TEST_UNIT_TEST_H_ qpidc-0.16/src/tests/InlineAllocator.cpp0000664000076400007640000000342611252003060020642 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/InlineAllocator.h" #include "unit_test.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(InlineAllocatorTestSuite) using namespace qpid; using namespace std; QPID_AUTO_TEST_CASE(testAllocate) { InlineAllocator, 2> alloc; char* p = alloc.allocate(1); BOOST_CHECK(p == (char*)&alloc); alloc.deallocate(p,1); p = alloc.allocate(2); BOOST_CHECK(p == (char*)&alloc); alloc.deallocate(p,2); p = alloc.allocate(3); BOOST_CHECK(p != (char*)&alloc); alloc.deallocate(p,3); } QPID_AUTO_TEST_CASE(testAllocateFull) { InlineAllocator, 1> alloc; char* p = alloc.allocate(1); BOOST_CHECK(p == (char*)&alloc); char* q = alloc.allocate(1); BOOST_CHECK(q != (char*)&alloc); alloc.deallocate(p,1); p = alloc.allocate(1); BOOST_CHECK(p == (char*)&alloc); alloc.deallocate(p,1); alloc.deallocate(q,1); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/QueuePolicyTest.cpp0000664000076400007640000003502411623224255020703 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "unit_test.h" #include "test_tools.h" #include "qpid/broker/QueuePolicy.h" #include "qpid/broker/QueueFlowLimit.h" #include "qpid/client/QueueOptions.h" #include "qpid/sys/Time.h" #include "qpid/framing/reply_exceptions.h" #include "MessageUtils.h" #include "BrokerFixture.h" using namespace qpid::broker; using namespace qpid::client; using namespace qpid::framing; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(QueuePolicyTestSuite) namespace { QueuedMessage createMessage(uint32_t size) { QueuedMessage msg; msg.payload = MessageUtils::createMessage(); MessageUtils::addContent(msg.payload, std::string (size, 'x')); return msg; } } QPID_AUTO_TEST_CASE(testCount) { std::auto_ptr policy(QueuePolicy::createQueuePolicy("test", 5, 0)); BOOST_CHECK_EQUAL((uint64_t) 0, policy->getMaxSize()); BOOST_CHECK_EQUAL((uint32_t) 5, policy->getMaxCount()); QueuedMessage msg = createMessage(10); for (size_t i = 0; i < 5; i++) { policy->tryEnqueue(msg.payload); } try { policy->tryEnqueue(msg.payload); BOOST_FAIL("Policy did not fail on enqueuing sixth message"); } catch (const ResourceLimitExceededException&) {} policy->dequeued(msg); policy->tryEnqueue(msg.payload); try { policy->tryEnqueue(msg.payload); BOOST_FAIL("Policy did not fail on enqueuing sixth message (after dequeue)"); } catch (const ResourceLimitExceededException&) {} } QPID_AUTO_TEST_CASE(testSize) { std::auto_ptr policy(QueuePolicy::createQueuePolicy("test", 0, 50)); QueuedMessage msg = createMessage(10); for (size_t i = 0; i < 5; i++) { policy->tryEnqueue(msg.payload); } try { policy->tryEnqueue(msg.payload); BOOST_FAIL("Policy did not fail on aggregate size exceeding 50. " << *policy); } catch (const ResourceLimitExceededException&) {} policy->dequeued(msg); policy->tryEnqueue(msg.payload); try { policy->tryEnqueue(msg.payload); BOOST_FAIL("Policy did not fail on aggregate size exceeding 50 (after dequeue). " << *policy); } catch (const ResourceLimitExceededException&) {} } QPID_AUTO_TEST_CASE(testBoth) { std::auto_ptr policy(QueuePolicy::createQueuePolicy("test", 5, 50)); try { QueuedMessage msg = createMessage(51); policy->tryEnqueue(msg.payload); BOOST_FAIL("Policy did not fail on single message exceeding 50. " << *policy); } catch (const ResourceLimitExceededException&) {} std::vector messages; messages.push_back(createMessage(15)); messages.push_back(createMessage(10)); messages.push_back(createMessage(11)); messages.push_back(createMessage(2)); messages.push_back(createMessage(7)); for (size_t i = 0; i < messages.size(); i++) { policy->tryEnqueue(messages[i].payload); } //size = 45 at this point, count = 5 try { QueuedMessage msg = createMessage(5); policy->tryEnqueue(msg.payload); BOOST_FAIL("Policy did not fail on count exceeding 6. " << *policy); } catch (const ResourceLimitExceededException&) {} try { QueuedMessage msg = createMessage(10); policy->tryEnqueue(msg.payload); BOOST_FAIL("Policy did not fail on aggregate size exceeding 50. " << *policy); } catch (const ResourceLimitExceededException&) {} policy->dequeued(messages[0]); try { QueuedMessage msg = createMessage(20); policy->tryEnqueue(msg.payload); } catch (const ResourceLimitExceededException&) { BOOST_FAIL("Policy failed incorrectly after dequeue. " << *policy); } } QPID_AUTO_TEST_CASE(testSettings) { //test reading and writing the policy from/to field table std::auto_ptr a(QueuePolicy::createQueuePolicy("test", 101, 303)); FieldTable settings; a->update(settings); std::auto_ptr b(QueuePolicy::createQueuePolicy("test", settings)); BOOST_CHECK_EQUAL(a->getMaxCount(), b->getMaxCount()); BOOST_CHECK_EQUAL(a->getMaxSize(), b->getMaxSize()); } QPID_AUTO_TEST_CASE(testRingPolicyCount) { FieldTable args; std::auto_ptr policy = QueuePolicy::createQueuePolicy("test", 5, 0, QueuePolicy::RING); policy->update(args); SessionFixture f; std::string q("my-ring-queue"); f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); for (int i = 0; i < 10; i++) { f.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } client::Message msg; for (int i = 5; i < 10; i++) { BOOST_CHECK(f.subs.get(msg, q, qpid::sys::TIME_SEC)); BOOST_CHECK_EQUAL((boost::format("%1%_%2%") % "Message" % (i+1)).str(), msg.getData()); } BOOST_CHECK(!f.subs.get(msg, q)); for (int i = 10; i < 20; i++) { f.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } for (int i = 15; i < 20; i++) { BOOST_CHECK(f.subs.get(msg, q, qpid::sys::TIME_SEC)); BOOST_CHECK_EQUAL((boost::format("%1%_%2%") % "Message" % (i+1)).str(), msg.getData()); } BOOST_CHECK(!f.subs.get(msg, q)); } QPID_AUTO_TEST_CASE(testRingPolicySize) { std::string hundredBytes = std::string(100, 'h'); std::string fourHundredBytes = std::string (400, 'f'); std::string thousandBytes = std::string(1000, 't'); // Ring queue, 500 bytes maxSize FieldTable args; std::auto_ptr policy = QueuePolicy::createQueuePolicy("test", 0, 500, QueuePolicy::RING); policy->update(args); SessionFixture f; std::string q("my-ring-queue"); f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); // A. Send messages 0 .. 5, each 100 bytes client::Message m(hundredBytes, q); for (int i = 0; i < 6; i++) { std::stringstream id; id << i; m.getMessageProperties().setCorrelationId(id.str()); f.session.messageTransfer(arg::content=m); } // should find 1 .. 5 on the queue, 0 is displaced by 5 client::Message msg; for (int i = 1; i < 6; i++) { std::stringstream id; id << i; BOOST_CHECK(f.subs.get(msg, q, qpid::sys::TIME_SEC)); BOOST_CHECK_EQUAL(msg.getMessageProperties().getCorrelationId(), id.str()); } BOOST_CHECK(!f.subs.get(msg, q)); // B. Now make sure that one 400 byte message displaces four 100 byte messages // Send messages 0 .. 5, each 100 bytes for (int i = 0; i < 6; i++) { client::Message m(hundredBytes, q); std::stringstream id; id << i; m.getMessageProperties().setCorrelationId(id.str()); f.session.messageTransfer(arg::content=m); } // Now send one 400 byte message client::Message m2(fourHundredBytes, q); m2.getMessageProperties().setCorrelationId("6"); f.session.messageTransfer(arg::content=m2); // expect to see 5, 6 on the queue for (int i = 5; i < 7; i++) { std::stringstream id; id << i; BOOST_CHECK(f.subs.get(msg, q, qpid::sys::TIME_SEC)); BOOST_CHECK_EQUAL(msg.getMessageProperties().getCorrelationId(), id.str()); } BOOST_CHECK(!f.subs.get(msg, q)); // C. Try sending a 1000-byte message, should fail - exceeds maxSize of queue client::Message m3(thousandBytes, q); m3.getMessageProperties().setCorrelationId("6"); try { ScopedSuppressLogging sl; f.session.messageTransfer(arg::content=m3); BOOST_FAIL("Ooops - successfully added a 1000 byte message to a 512 byte ring queue ..."); } catch (...) { } } QPID_AUTO_TEST_CASE(testStrictRingPolicy) { FieldTable args; std::auto_ptr policy = QueuePolicy::createQueuePolicy("test", 5, 0, QueuePolicy::RING_STRICT); policy->update(args); SessionFixture f; std::string q("my-ring-queue"); f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); LocalQueue incoming; SubscriptionSettings settings(FlowControl::unlimited()); settings.autoAck = 0; // no auto ack. Subscription sub = f.subs.subscribe(incoming, q, settings); for (int i = 0; i < 5; i++) { f.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } for (int i = 0; i < 5; i++) { BOOST_CHECK_EQUAL(incoming.pop().getData(), (boost::format("%1%_%2%") % "Message" % (i+1)).str()); } try { ScopedSuppressLogging sl; // Suppress messages for expected errors. f.session.messageTransfer(arg::content=client::Message("Message_6", q)); BOOST_FAIL("expecting ResourceLimitExceededException."); } catch (const ResourceLimitExceededException&) {} } QPID_AUTO_TEST_CASE(testPolicyWithDtx) { FieldTable args; std::auto_ptr policy = QueuePolicy::createQueuePolicy("test", 5, 0, QueuePolicy::REJECT); policy->update(args); SessionFixture f; std::string q("my-policy-queue"); f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); LocalQueue incoming; SubscriptionSettings settings(FlowControl::unlimited()); settings.autoAck = 0; // no auto ack. Subscription sub = f.subs.subscribe(incoming, q, settings); f.session.dtxSelect(); Xid tx1(1, "test-dtx-mgr", "tx1"); f.session.dtxStart(arg::xid=tx1); for (int i = 0; i < 5; i++) { f.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } f.session.dtxEnd(arg::xid=tx1); f.session.dtxCommit(arg::xid=tx1, arg::onePhase=true); Xid tx2(1, "test-dtx-mgr", "tx2"); f.session.dtxStart(arg::xid=tx2); for (int i = 0; i < 5; i++) { BOOST_CHECK_EQUAL(incoming.pop().getData(), (boost::format("%1%_%2%") % "Message" % (i+1)).str()); } SequenceSet accepting=sub.getUnaccepted(); f.session.messageAccept(accepting); f.session.dtxEnd(arg::xid=tx2); f.session.dtxPrepare(arg::xid=tx2); f.session.dtxRollback(arg::xid=tx2); f.session.messageRelease(accepting); Xid tx3(1, "test-dtx-mgr", "tx3"); f.session.dtxStart(arg::xid=tx3); for (int i = 0; i < 5; i++) { incoming.pop(); } accepting=sub.getUnaccepted(); f.session.messageAccept(accepting); f.session.dtxEnd(arg::xid=tx3); f.session.dtxPrepare(arg::xid=tx3); Session other = f.connection.newSession(); try { ScopedSuppressLogging sl; // Suppress messages for expected errors. other.messageTransfer(arg::content=client::Message("Message_6", q)); BOOST_FAIL("expecting ResourceLimitExceededException."); } catch (const ResourceLimitExceededException&) {} f.session.dtxCommit(arg::xid=tx3); //now retry and this time should succeed other = f.connection.newSession(); other.messageTransfer(arg::content=client::Message("Message_6", q)); } QPID_AUTO_TEST_CASE(testFlowToDiskWithNoStore) { //Ensure that with no store loaded, we don't flow to disk but //fallback to rejecting messages QueueOptions args; args.setSizePolicy(FLOW_TO_DISK, 0, 5); // Disable flow control, or else we'll never hit the max limit args.setInt(QueueFlowLimit::flowStopCountKey, 0); SessionFixture f; std::string q("my-queue"); f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); LocalQueue incoming; SubscriptionSettings settings(FlowControl::unlimited()); settings.autoAck = 0; // no auto ack. Subscription sub = f.subs.subscribe(incoming, q, settings); for (int i = 0; i < 5; i++) { f.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } for (int i = 0; i < 5; i++) { BOOST_CHECK_EQUAL(incoming.pop().getData(), (boost::format("%1%_%2%") % "Message" % (i+1)).str()); } try { ScopedSuppressLogging sl; // Suppress messages for expected errors. f.session.messageTransfer(arg::content=client::Message("Message_6", q)); BOOST_FAIL("expecting ResourceLimitExceededException."); } catch (const ResourceLimitExceededException&) {} } QPID_AUTO_TEST_CASE(testPolicyFailureOnCommit) { FieldTable args; std::auto_ptr policy = QueuePolicy::createQueuePolicy("test", 5, 0, QueuePolicy::REJECT); policy->update(args); SessionFixture f; std::string q("q"); f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); f.session.txSelect(); for (int i = 0; i < 10; i++) { f.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } ScopedSuppressLogging sl; // Suppress messages for expected errors. BOOST_CHECK_THROW(f.session.txCommit(), InternalErrorException); } QPID_AUTO_TEST_CASE(testCapacityConversion) { FieldTable args; args.setString("qpid.max_count", "5"); args.setString("qpid.flow_stop_count", "0"); SessionFixture f; std::string q("q"); f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); for (int i = 0; i < 5; i++) { f.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } try { ScopedSuppressLogging sl; // Suppress messages for expected errors. f.session.messageTransfer(arg::content=client::Message("Message_6", q)); BOOST_FAIL("expecting ResourceLimitExceededException."); } catch (const ResourceLimitExceededException&) {} } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/qpid-client-test.cpp0000664000076400007640000001067011376517702020774 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * This file provides a simple test (and example) of basic * functionality including declaring an exchange and a queue, binding * these together, publishing a message and receiving that message * asynchronously. */ #include #include "TestOptions.h" #include "qpid/client/Connection.h" #include "qpid/client/Message.h" #include "qpid/client/Session.h" #include "qpid/client/SubscriptionManager.h" using namespace qpid; using namespace qpid::client; using namespace qpid::framing; using std::string; namespace qpid { namespace tests { struct Args : public TestOptions { uint msgSize; bool verbose; Args() : TestOptions("Simple test of Qpid c++ client; sends and receives a single message."), msgSize(26) { addOptions() ("size", optValue(msgSize, "N"), "message size") ("verbose", optValue(verbose), "print out some status messages"); } }; const std::string chars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); std::string generateData(uint size) { if (size < chars.length()) { return chars.substr(0, size); } std::string data; for (uint i = 0; i < (size / chars.length()); i++) { data += chars; } data += chars.substr(0, size % chars.length()); return data; } void print(const std::string& text, const Message& msg) { std::cout << text; if (msg.getData().size() > 16) { std::cout << msg.getData().substr(0, 16) << "..."; } else { std::cout << msg.getData(); } std::cout << std::endl; } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { try { Args opts; opts.parse(argc, argv); //Connect to the broker: Connection connection; opts.open(connection); if (opts.verbose) std::cout << "Opened connection." << std::endl; //Create and open a session on the connection through which //most functionality is exposed: Session session = connection.newSession(); if (opts.verbose) std::cout << "Opened session." << std::endl; //'declare' the exchange and the queue, which will create them //as they don't exist session.exchangeDeclare(arg::exchange="MyExchange", arg::type="direct"); if (opts.verbose) std::cout << "Declared exchange." << std::endl; session.queueDeclare(arg::queue="MyQueue", arg::autoDelete=true, arg::exclusive=true); if (opts.verbose) std::cout << "Declared queue." << std::endl; //now bind the queue to the exchange session.exchangeBind(arg::exchange="MyExchange", arg::queue="MyQueue", arg::bindingKey="MyKey"); if (opts.verbose) std::cout << "Bound queue to exchange." << std::endl; //create and send a message to the exchange using the routing //key we bound our queue with: Message msgOut(generateData(opts.msgSize)); msgOut.getDeliveryProperties().setRoutingKey("MyKey"); session.messageTransfer(arg::destination="MyExchange", arg::content=msgOut, arg::acceptMode=1); if (opts.verbose) print("Published message: ", msgOut); // Using the SubscriptionManager, get the message from the queue. SubscriptionManager subs(session); Message msgIn = subs.get("MyQueue"); if (msgIn.getData() == msgOut.getData()) if (opts.verbose) std::cout << "Received the exepected message." << std::endl; //close the session & connection session.close(); if (opts.verbose) std::cout << "Closed session." << std::endl; connection.close(); if (opts.verbose) std::cout << "Closed connection." << std::endl; return 0; } catch(const std::exception& e) { std::cout << e.what() << std::endl; } return 1; } qpidc-0.16/src/tests/MessageReplayTracker.cpp0000664000076400007640000000612411623224255021653 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "unit_test.h" #include "BrokerFixture.h" #include "qpid/client/MessageReplayTracker.h" #include "qpid/sys/Time.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(MessageReplayTrackerTests) using namespace qpid::client; using namespace qpid::sys; using std::string; class ReplayBufferChecker { public: ReplayBufferChecker(uint from, uint to) : end(to), i(from) {} void operator()(const Message& m) { if (i > end) BOOST_FAIL("Extra message found: " + m.getData()); BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i++)).str(), m.getData()); } private: const uint end; uint i; }; QPID_AUTO_TEST_CASE(testReplay) { SessionFixture fix; fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true); MessageReplayTracker tracker(10); tracker.init(fix.session); for (uint i = 0; i < 5; i++) { Message message((boost::format("Message_%1%") % (i+1)).str(), "my-queue"); tracker.send(message); } ReplayBufferChecker checker(1, 10); tracker.foreach(checker); tracker.replay(fix.session); for (uint j = 0; j < 2; j++) {//each message should have been sent twice for (uint i = 0; i < 5; i++) { Message m; BOOST_CHECK(fix.subs.get(m, "my-queue", TIME_SEC)); BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), m.getData()); } } Message m; BOOST_CHECK(!fix.subs.get(m, "my-queue")); } QPID_AUTO_TEST_CASE(testCheckCompletion) { SessionFixture fix; fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true); MessageReplayTracker tracker(10); tracker.init(fix.session); for (uint i = 0; i < 5; i++) { Message message((boost::format("Message_%1%") % (i+1)).str(), "my-queue"); tracker.send(message); } fix.session.sync();//ensures all messages are complete tracker.checkCompletion(); tracker.replay(fix.session); Message received; for (uint i = 0; i < 5; i++) { BOOST_CHECK(fix.subs.get(received, "my-queue")); BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), received.getData()); } BOOST_CHECK(!fix.subs.get(received, "my-queue")); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/Makefile.in0000664000076400007640000030631211752725662017154 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Include cluster scripts and extra files in distribution even if # we're not configured for cluster. # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Build a simple qmf agent for test purposes. # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Build a unit test for the broker's internal management agent. VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = unit_test$(EXEEXT) $(am__EXEEXT_1) echotest$(EXEEXT) \ publish$(EXEEXT) consume$(EXEEXT) header_test$(EXEEXT) \ failover_soak$(EXEEXT) declare_queues$(EXEEXT) \ replaying_sender$(EXEEXT) resuming_receiver$(EXEEXT) \ txshift$(EXEEXT) txjob$(EXEEXT) PollerTest$(EXEEXT) \ DispatcherTest$(EXEEXT) datagen$(EXEEXT) qpid-stream$(EXEEXT) \ msg_group_test$(EXEEXT) TESTS = unit_test$(EXEEXT) $(am__append_2) $(am__append_9) \ $(am__append_12) start_broker $(am__EXEEXT_3) python_tests \ stop_broker run_ha_tests run_federation_tests \ run_federation_sys_tests run_acl_tests run_cli_tests \ replication_test dynamic_log_level_test \ run_queue_flow_limit_tests ipv6_test qpidexec_PROGRAMS = qpidexectest_PROGRAMS = $(am__EXEEXT_2) receiver$(EXEEXT) \ sender$(EXEEXT) qpid-receive$(EXEEXT) qpid-send$(EXEEXT) \ qpid-perftest$(EXEEXT) qpid-txtest$(EXEEXT) \ qpid-latency-test$(EXEEXT) qpid-client-test$(EXEEXT) \ qpid-topic-listener$(EXEEXT) qpid-topic-publisher$(EXEEXT) \ qpid-ping$(EXEEXT) testagent$(EXEEXT) @HAVE_XML_TRUE@am__append_1 = XmlClientSessionTest.cpp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/brokermgmt.mk $(srcdir)/cluster.mk \ $(srcdir)/install_env.sh.in $(srcdir)/sasl.mk $(srcdir)/ssl.mk \ $(srcdir)/test_env.sh.in $(srcdir)/testagent.mk # # Cluster tests makefile fragment, to be included in Makefile.am # # NOTE: Programs using the openais library must be run with gid=ais # You should do "newgrp ais" before running the tests to run these. # # ais_check checks pre-requisites for cluster tests and runs them if ok. @HAVE_LIBCPG_TRUE@am__append_2 = \ @HAVE_LIBCPG_TRUE@ run_cluster_test \ @HAVE_LIBCPG_TRUE@ cluster_read_credit \ @HAVE_LIBCPG_TRUE@ test_watchdog \ @HAVE_LIBCPG_TRUE@ run_cluster_tests \ @HAVE_LIBCPG_TRUE@ federated_cluster_test \ @HAVE_LIBCPG_TRUE@ clustered_replication_test # Clean up after cluster_test and start_cluster @HAVE_LIBCPG_TRUE@am__append_3 = cluster_test.acl cluster.ports @HAVE_LIBCPG_TRUE@am__append_4 = \ @HAVE_LIBCPG_TRUE@ run_long_cluster_tests \ @HAVE_LIBCPG_TRUE@ start_cluster \ @HAVE_LIBCPG_TRUE@ cluster_python_tests \ @HAVE_LIBCPG_TRUE@ stop_cluster @HAVE_LIBCPG_TRUE@am__append_5 = cluster_test # Moved this file here from cluster_test_SOURCES as it breaks the autotools build, but not the cmake # build and so we need to make sure it is present in the tarball @HAVE_LIBCPG_TRUE@am__append_6 = StoreStatus.cpp @HAVE_LIBCPG_TRUE@am__append_7 = run_cluster_tests brokertest.py \ @HAVE_LIBCPG_TRUE@ cluster_tests.py cluster_test_logs.py \ @HAVE_LIBCPG_TRUE@ run_long_cluster_tests long_cluster_tests.py \ @HAVE_LIBCPG_TRUE@ testlib.py cluster_tests.fail \ @HAVE_LIBCPG_TRUE@ $(CLUSTER_TEST_SCRIPTS_LIST) # Test that are only relevant if SASL is enabled. # Note: sasl_version is not a test -- it is a tool used by tests. @HAVE_SASL_TRUE@am__append_8 = cluster_authentication_soak \ @HAVE_SASL_TRUE@ sasl_version @HAVE_SASL_TRUE@am__append_9 = run_cluster_authentication_test sasl_fed sasl_fed_ex_dynamic sasl_fed_ex_link sasl_fed_ex_queue sasl_fed_ex_route sasl_fed_ex_route_cluster sasl_fed_ex_link_cluster sasl_fed_ex_queue_cluster sasl_fed_ex_dynamic_cluster sasl_no_dir @HAVE_SASL_TRUE@am__append_10 = run_cluster_authentication_soak @HAVE_SASL_TRUE@am__append_11 = run_cluster_authentication_test \ @HAVE_SASL_TRUE@ sasl_fed \ @HAVE_SASL_TRUE@ sasl_fed_ex \ @HAVE_SASL_TRUE@ run_cluster_authentication_soak \ @HAVE_SASL_TRUE@ sasl_fed_ex_dynamic \ @HAVE_SASL_TRUE@ sasl_fed_ex_link \ @HAVE_SASL_TRUE@ sasl_fed_ex_queue \ @HAVE_SASL_TRUE@ sasl_fed_ex_route \ @HAVE_SASL_TRUE@ sasl_fed_ex_dynamic_cluster \ @HAVE_SASL_TRUE@ sasl_fed_ex_link_cluster \ @HAVE_SASL_TRUE@ sasl_fed_ex_queue_cluster \ @HAVE_SASL_TRUE@ sasl_fed_ex_route_cluster \ @HAVE_SASL_TRUE@ sasl_no_dir @SSL_TRUE@am__append_12 = ssl_test @SSL_TRUE@am__append_13 = ssl_test @SSL_TRUE@am__append_14 = test_cert_db cert.password subdir = src/tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = test_env.sh install_env.sh CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(tmoduledir)" "$(DESTDIR)$(qpidexecdir)" \ "$(DESTDIR)$(qpidexectestdir)" "$(DESTDIR)$(qpidexecdir)" \ "$(DESTDIR)$(qpidexectestdir)" LTLIBRARIES = $(tmodule_LTLIBRARIES) libdlclose_noop_la_LIBADD = am_libdlclose_noop_la_OBJECTS = dlclose_noop.lo libdlclose_noop_la_OBJECTS = $(am_libdlclose_noop_la_OBJECTS) libdlclose_noop_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdlclose_noop_la_LDFLAGS) $(LDFLAGS) -o $@ libshlibtest_la_LIBADD = am_libshlibtest_la_OBJECTS = shlibtest.lo libshlibtest_la_OBJECTS = $(am_libshlibtest_la_OBJECTS) libshlibtest_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(libshlibtest_la_LDFLAGS) $(LDFLAGS) -o $@ test_store_la_DEPENDENCIES = $(lib_broker) am_test_store_la_OBJECTS = test_store.lo test_store_la_OBJECTS = $(am_test_store_la_OBJECTS) test_store_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(test_store_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_SASL_TRUE@am__EXEEXT_1 = cluster_authentication_soak$(EXEEXT) \ @HAVE_SASL_TRUE@ sasl_version$(EXEEXT) @HAVE_LIBCPG_TRUE@am__EXEEXT_2 = cluster_test$(EXEEXT) PROGRAMS = $(qpidexec_PROGRAMS) $(qpidexectest_PROGRAMS) am_DispatcherTest_OBJECTS = DispatcherTest.$(OBJEXT) DispatcherTest_OBJECTS = $(am_DispatcherTest_OBJECTS) am__DEPENDENCIES_1 = DispatcherTest_DEPENDENCIES = $(lib_common) $(lib_client) \ $(am__DEPENDENCIES_1) am_PollerTest_OBJECTS = PollerTest.$(OBJEXT) PollerTest_OBJECTS = $(am_PollerTest_OBJECTS) PollerTest_DEPENDENCIES = $(lib_common) $(lib_client) \ $(am__DEPENDENCIES_1) am__cluster_authentication_soak_SOURCES_DIST = \ cluster_authentication_soak.cpp ForkedBroker.h \ ForkedBroker.cpp @HAVE_SASL_TRUE@am_cluster_authentication_soak_OBJECTS = \ @HAVE_SASL_TRUE@ cluster_authentication_soak.$(OBJEXT) \ @HAVE_SASL_TRUE@ ForkedBroker.$(OBJEXT) cluster_authentication_soak_OBJECTS = \ $(am_cluster_authentication_soak_OBJECTS) @HAVE_SASL_TRUE@cluster_authentication_soak_DEPENDENCIES = \ @HAVE_SASL_TRUE@ $(lib_client) $(lib_broker) am__cluster_test_SOURCES_DIST = cluster_test.cpp unit_test.cpp \ ClusterFixture.cpp ClusterFixture.h ForkedBroker.h \ ForkedBroker.cpp PartialFailure.cpp ClusterFailover.cpp \ InitialStatusMap.cpp @HAVE_LIBCPG_TRUE@am_cluster_test_OBJECTS = cluster_test.$(OBJEXT) \ @HAVE_LIBCPG_TRUE@ unit_test.$(OBJEXT) ClusterFixture.$(OBJEXT) \ @HAVE_LIBCPG_TRUE@ ForkedBroker.$(OBJEXT) \ @HAVE_LIBCPG_TRUE@ PartialFailure.$(OBJEXT) \ @HAVE_LIBCPG_TRUE@ ClusterFailover.$(OBJEXT) \ @HAVE_LIBCPG_TRUE@ InitialStatusMap.$(OBJEXT) cluster_test_OBJECTS = $(am_cluster_test_OBJECTS) @HAVE_LIBCPG_TRUE@cluster_test_DEPENDENCIES = $(lib_client) \ @HAVE_LIBCPG_TRUE@ $(lib_broker) ../cluster.la am_consume_OBJECTS = consume.$(OBJEXT) consume_OBJECTS = $(am_consume_OBJECTS) consume_DEPENDENCIES = $(lib_client) am_datagen_OBJECTS = datagen.$(OBJEXT) datagen_OBJECTS = $(am_datagen_OBJECTS) datagen_DEPENDENCIES = $(lib_common) $(lib_client) am_declare_queues_OBJECTS = declare_queues.$(OBJEXT) declare_queues_OBJECTS = $(am_declare_queues_OBJECTS) declare_queues_DEPENDENCIES = $(lib_client) am_echotest_OBJECTS = echotest.$(OBJEXT) echotest_OBJECTS = $(am_echotest_OBJECTS) echotest_DEPENDENCIES = $(lib_client) am_failover_soak_OBJECTS = failover_soak.$(OBJEXT) \ ForkedBroker.$(OBJEXT) failover_soak_OBJECTS = $(am_failover_soak_OBJECTS) failover_soak_DEPENDENCIES = $(lib_client) $(lib_broker) am_header_test_OBJECTS = header_test.$(OBJEXT) header_test_OBJECTS = $(am_header_test_OBJECTS) header_test_DEPENDENCIES = $(lib_client) am_msg_group_test_OBJECTS = msg_group_test.$(OBJEXT) msg_group_test_OBJECTS = $(am_msg_group_test_OBJECTS) msg_group_test_DEPENDENCIES = $(lib_messaging) am_publish_OBJECTS = publish.$(OBJEXT) publish_OBJECTS = $(am_publish_OBJECTS) publish_DEPENDENCIES = $(lib_client) am_qpid_client_test_OBJECTS = qpid-client-test.$(OBJEXT) qpid_client_test_OBJECTS = $(am_qpid_client_test_OBJECTS) qpid_client_test_DEPENDENCIES = $(lib_client) am_qpid_latency_test_OBJECTS = qpid-latency-test.$(OBJEXT) qpid_latency_test_OBJECTS = $(am_qpid_latency_test_OBJECTS) qpid_latency_test_DEPENDENCIES = $(lib_client) am_qpid_perftest_OBJECTS = qpid-perftest.$(OBJEXT) qpid_perftest_OBJECTS = $(am_qpid_perftest_OBJECTS) qpid_perftest_DEPENDENCIES = $(lib_client) am_qpid_ping_OBJECTS = qpid-ping.$(OBJEXT) qpid_ping_OBJECTS = $(am_qpid_ping_OBJECTS) qpid_ping_DEPENDENCIES = $(lib_client) am_qpid_receive_OBJECTS = qpid-receive.$(OBJEXT) Statistics.$(OBJEXT) qpid_receive_OBJECTS = $(am_qpid_receive_OBJECTS) qpid_receive_DEPENDENCIES = $(lib_messaging) am_qpid_send_OBJECTS = qpid-send.$(OBJEXT) Statistics.$(OBJEXT) qpid_send_OBJECTS = $(am_qpid_send_OBJECTS) qpid_send_DEPENDENCIES = $(lib_messaging) am_qpid_stream_OBJECTS = qpid-stream.$(OBJEXT) qpid_stream_OBJECTS = $(am_qpid_stream_OBJECTS) qpid_stream_DEPENDENCIES = $(lib_messaging) am_qpid_topic_listener_OBJECTS = qpid-topic-listener.$(OBJEXT) qpid_topic_listener_OBJECTS = $(am_qpid_topic_listener_OBJECTS) qpid_topic_listener_DEPENDENCIES = $(lib_client) am_qpid_topic_publisher_OBJECTS = qpid-topic-publisher.$(OBJEXT) qpid_topic_publisher_OBJECTS = $(am_qpid_topic_publisher_OBJECTS) qpid_topic_publisher_DEPENDENCIES = $(lib_client) am_qpid_txtest_OBJECTS = qpid-txtest.$(OBJEXT) qpid_txtest_OBJECTS = $(am_qpid_txtest_OBJECTS) qpid_txtest_DEPENDENCIES = $(lib_client) am_receiver_OBJECTS = receiver.$(OBJEXT) receiver_OBJECTS = $(am_receiver_OBJECTS) receiver_DEPENDENCIES = $(lib_client) am_replaying_sender_OBJECTS = replaying_sender.$(OBJEXT) replaying_sender_OBJECTS = $(am_replaying_sender_OBJECTS) replaying_sender_DEPENDENCIES = $(lib_client) am_resuming_receiver_OBJECTS = resuming_receiver.$(OBJEXT) resuming_receiver_OBJECTS = $(am_resuming_receiver_OBJECTS) resuming_receiver_DEPENDENCIES = $(lib_client) am__sasl_version_SOURCES_DIST = sasl_version.cpp @HAVE_SASL_TRUE@am_sasl_version_OBJECTS = sasl_version.$(OBJEXT) sasl_version_OBJECTS = $(am_sasl_version_OBJECTS) @HAVE_SASL_TRUE@sasl_version_DEPENDENCIES = $(lib_client) am_sender_OBJECTS = sender.$(OBJEXT) Statistics.$(OBJEXT) sender_OBJECTS = $(am_sender_OBJECTS) sender_DEPENDENCIES = $(lib_messaging) am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.$(OBJEXT) \ testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.$(OBJEXT) \ testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.$(OBJEXT) \ testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.$(OBJEXT) \ testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.$(OBJEXT) am_testagent_OBJECTS = testagent-testagent.$(OBJEXT) $(am__objects_1) testagent_OBJECTS = $(am_testagent_OBJECTS) testagent_DEPENDENCIES = $(top_builddir)/src/libqmf.la testagent_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(testagent_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_txjob_OBJECTS = txjob.$(OBJEXT) txjob_OBJECTS = $(am_txjob_OBJECTS) txjob_DEPENDENCIES = $(lib_client) am_txshift_OBJECTS = txshift.$(OBJEXT) txshift_OBJECTS = $(am_txshift_OBJECTS) txshift_DEPENDENCIES = $(lib_client) am__unit_test_SOURCES_DIST = unit_test.cpp unit_test.h \ MessagingSessionTests.cpp MessagingThreadTests.cpp \ MessagingFixture.h ClientSessionTest.cpp BrokerFixture.h \ exception_test.cpp RefCounted.cpp SessionState.cpp logging.cpp \ AsyncCompletion.cpp Url.cpp Uuid.cpp Shlib.cpp FieldValue.cpp \ FieldTable.cpp Array.cpp QueueOptionsTest.cpp \ InlineAllocator.cpp InlineVector.cpp SequenceSet.cpp \ StringUtils.cpp RangeSet.cpp AtomicValue.cpp QueueTest.cpp \ AccumulatedAckTest.cpp DtxWorkRecordTest.cpp \ DeliveryRecordTest.cpp ExchangeTest.cpp \ HeadersExchangeTest.cpp MessageTest.cpp QueueRegistryTest.cpp \ QueuePolicyTest.cpp QueueFlowLimitTest.cpp FramingTest.cpp \ HeaderTest.cpp SequenceNumberTest.cpp TimerTest.cpp \ TopicExchangeTest.cpp TxBufferTest.cpp TxPublishTest.cpp \ MessageBuilderTest.cpp ConnectionOptions.h ForkedBroker.h \ ForkedBroker.cpp ManagementTest.cpp MessageReplayTracker.cpp \ ConsoleTest.cpp QueueEvents.cpp ProxyTest.cpp RetryList.cpp \ FrameDecoder.cpp ReplicationTest.cpp ClientMessageTest.cpp \ PollableCondition.cpp Variant.cpp Address.cpp \ ClientMessage.cpp Qmf2.cpp BrokerOptions.cpp \ XmlClientSessionTest.cpp BrokerMgmtAgent.cpp \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.cpp \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.h \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.h \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.cpp @HAVE_XML_TRUE@am__objects_2 = XmlClientSessionTest.$(OBJEXT) am__objects_3 = brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.$(OBJEXT) \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.$(OBJEXT) am_unit_test_OBJECTS = unit_test.$(OBJEXT) \ MessagingSessionTests.$(OBJEXT) MessagingThreadTests.$(OBJEXT) \ ClientSessionTest.$(OBJEXT) exception_test.$(OBJEXT) \ RefCounted.$(OBJEXT) SessionState.$(OBJEXT) logging.$(OBJEXT) \ AsyncCompletion.$(OBJEXT) Url.$(OBJEXT) Uuid.$(OBJEXT) \ Shlib.$(OBJEXT) FieldValue.$(OBJEXT) FieldTable.$(OBJEXT) \ Array.$(OBJEXT) QueueOptionsTest.$(OBJEXT) \ InlineAllocator.$(OBJEXT) InlineVector.$(OBJEXT) \ SequenceSet.$(OBJEXT) StringUtils.$(OBJEXT) RangeSet.$(OBJEXT) \ AtomicValue.$(OBJEXT) QueueTest.$(OBJEXT) \ AccumulatedAckTest.$(OBJEXT) DtxWorkRecordTest.$(OBJEXT) \ DeliveryRecordTest.$(OBJEXT) ExchangeTest.$(OBJEXT) \ HeadersExchangeTest.$(OBJEXT) MessageTest.$(OBJEXT) \ QueueRegistryTest.$(OBJEXT) QueuePolicyTest.$(OBJEXT) \ QueueFlowLimitTest.$(OBJEXT) FramingTest.$(OBJEXT) \ HeaderTest.$(OBJEXT) SequenceNumberTest.$(OBJEXT) \ TimerTest.$(OBJEXT) TopicExchangeTest.$(OBJEXT) \ TxBufferTest.$(OBJEXT) TxPublishTest.$(OBJEXT) \ MessageBuilderTest.$(OBJEXT) ForkedBroker.$(OBJEXT) \ ManagementTest.$(OBJEXT) MessageReplayTracker.$(OBJEXT) \ ConsoleTest.$(OBJEXT) QueueEvents.$(OBJEXT) \ ProxyTest.$(OBJEXT) RetryList.$(OBJEXT) FrameDecoder.$(OBJEXT) \ ReplicationTest.$(OBJEXT) ClientMessageTest.$(OBJEXT) \ PollableCondition.$(OBJEXT) Variant.$(OBJEXT) \ Address.$(OBJEXT) ClientMessage.$(OBJEXT) Qmf2.$(OBJEXT) \ BrokerOptions.$(OBJEXT) $(am__objects_2) \ BrokerMgmtAgent.$(OBJEXT) $(am__objects_3) unit_test_OBJECTS = $(am_unit_test_OBJECTS) unit_test_DEPENDENCIES = $(lib_messaging) $(lib_broker) $(lib_console) \ $(lib_qmf2) SCRIPTS = $(qpidexec_SCRIPTS) $(qpidexectest_SCRIPTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(libdlclose_noop_la_SOURCES) $(libshlibtest_la_SOURCES) \ $(test_store_la_SOURCES) $(DispatcherTest_SOURCES) \ $(PollerTest_SOURCES) $(cluster_authentication_soak_SOURCES) \ $(cluster_test_SOURCES) $(consume_SOURCES) $(datagen_SOURCES) \ $(declare_queues_SOURCES) $(echotest_SOURCES) \ $(failover_soak_SOURCES) $(header_test_SOURCES) \ $(msg_group_test_SOURCES) $(publish_SOURCES) \ $(qpid_client_test_SOURCES) $(qpid_latency_test_SOURCES) \ $(qpid_perftest_SOURCES) $(qpid_ping_SOURCES) \ $(qpid_receive_SOURCES) $(qpid_send_SOURCES) \ $(qpid_stream_SOURCES) $(qpid_topic_listener_SOURCES) \ $(qpid_topic_publisher_SOURCES) $(qpid_txtest_SOURCES) \ $(receiver_SOURCES) $(replaying_sender_SOURCES) \ $(resuming_receiver_SOURCES) $(sasl_version_SOURCES) \ $(sender_SOURCES) $(testagent_SOURCES) $(txjob_SOURCES) \ $(txshift_SOURCES) $(unit_test_SOURCES) DIST_SOURCES = $(libdlclose_noop_la_SOURCES) \ $(libshlibtest_la_SOURCES) $(test_store_la_SOURCES) \ $(DispatcherTest_SOURCES) $(PollerTest_SOURCES) \ $(am__cluster_authentication_soak_SOURCES_DIST) \ $(am__cluster_test_SOURCES_DIST) $(consume_SOURCES) \ $(datagen_SOURCES) $(declare_queues_SOURCES) \ $(echotest_SOURCES) $(failover_soak_SOURCES) \ $(header_test_SOURCES) $(msg_group_test_SOURCES) \ $(publish_SOURCES) $(qpid_client_test_SOURCES) \ $(qpid_latency_test_SOURCES) $(qpid_perftest_SOURCES) \ $(qpid_ping_SOURCES) $(qpid_receive_SOURCES) \ $(qpid_send_SOURCES) $(qpid_stream_SOURCES) \ $(qpid_topic_listener_SOURCES) $(qpid_topic_publisher_SOURCES) \ $(qpid_txtest_SOURCES) $(receiver_SOURCES) \ $(replaying_sender_SOURCES) $(resuming_receiver_SOURCES) \ $(am__sasl_version_SOURCES_DIST) $(sender_SOURCES) \ $(testagent_SOURCES) $(txjob_SOURCES) $(txshift_SOURCES) \ $(am__unit_test_SOURCES_DIST) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= am__EXEEXT_3 = qpid-client-test$(EXEEXT) quick_perftest \ quick_topictest run_header_test quick_txtest \ run_msg_group_tests DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CXXFLAGS = $(WARNING_CFLAGS) -DBOOST_TEST_DYN_LINK INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/src -I$(top_builddir)/src -Ibrokermgmt_gen PUBLIC_INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include # Use public API only QMF_GEN = $(top_srcdir)/managementgen/qmf-gen extra_libs = lib_client = $(abs_builddir)/../libqpidclient.la lib_messaging = $(abs_builddir)/../libqpidmessaging.la lib_common = $(abs_builddir)/../libqpidcommon.la lib_broker = $(abs_builddir)/../libqpidbroker.la lib_console = $(abs_builddir)/../libqmfconsole.la lib_qmf2 = $(abs_builddir)/../libqmf2.la check_LTLIBRARIES = libshlibtest.la libdlclose_noop.la EXTRA_DIST = $(CLUSTER_TEST_SCRIPTS_LIST) ais_check run_cluster_test \ cluster_read_credit test_watchdog start_cluster stop_cluster \ restart_cluster cluster_python_tests \ cluster_python_tests_failing.txt federated_cluster_test \ clustered_replication_test run_cluster_tests \ run_long_cluster_tests testlib.py brokertest.py \ cluster_tests.py cluster_test_logs.py long_cluster_tests.py \ cluster_tests.fail $(am__append_6) $(am__append_11) \ $(am__append_13) qpid-cpp-benchmark qpid-cluster-benchmark \ install_env.sh run_test vg_check run-unit-tests start_broker \ python_tests stop_broker quick_topictest quick_perftest \ quick_txtest topictest run_header_test header_test.py ssl_test \ config.null ais_check run_federation_tests \ run_federation_sys_tests run_long_federation_sys_tests \ run_cli_tests run_acl_tests .valgrind.supp MessageUtils.h \ TestMessageStore.h TxMocks.h replication_test run_perftest \ ring_queue_test run_ring_queue_test dynamic_log_level_test \ qpid-ctrl CMakeLists.txt cluster.cmake \ windows/DisableWin32ErrorWindows.cpp background.ps1 \ find_prog.ps1 python_tests.ps1 quick_topictest.ps1 \ run_federation_tests.ps1 run_header_test.ps1 run_test.ps1 \ start_broker.ps1 stop_broker.ps1 topictest.ps1 \ run_queue_flow_limit_tests run_msg_group_tests ipv6_test \ run_ha_tests ha_tests.py test_env.ps1.in fanout_perftest \ shared_perftest multiq_perftest topic_perftest \ run_failover_soak reliable_replication_test \ federated_cluster_test_with_node_failure sasl_test_setup.sh \ run_msg_group_tests_soak testagent.xml BrokerMgmtAgent.xml CLEANFILES = $(am__append_3) valgrind.out *.log *.vglog* dummy_test \ qpidd.port $(unit_wrappers) $(TESTAGENT_GEN_SRC) \ testagent_gen.timestamp $(BROKERMGMT_GEN_SRC) \ brokermgmt_gen.timestamp # Longer running stability tests, not run by default check: target. # Not run under valgrind, too slow LONG_TESTS = $(am__append_4) $(am__append_10) start_broker \ fanout_perftest shared_perftest multiq_perftest topic_perftest \ run_ring_queue_test run_msg_group_tests_soak stop_broker \ run_long_federation_sys_tests run_failover_soak \ reliable_replication_test \ federated_cluster_test_with_node_failure CLEAN_LOCAL = $(am__append_14) sasl_config # # Destination for intalled programs and tests defined here # qpidexecdir = $(libexecdir)/qpid qpidexec_SCRIPTS = qpidexectestdir = $(qpidexecdir)/tests # Test programs that are installed and therefore built as part of make, not make check qpidexectest_SCRIPTS = $(am__append_7) qpid-cpp-benchmark \ install_env.sh tmoduledir = $(libdir)/qpid/tests tmodule_LTLIBRARIES = test_store.la unit_test_LDADD = -lboost_unit_test_framework \ $(lib_messaging) $(lib_broker) $(lib_console) $(lib_qmf2) unit_test_SOURCES = unit_test.cpp unit_test.h \ MessagingSessionTests.cpp MessagingThreadTests.cpp \ MessagingFixture.h ClientSessionTest.cpp BrokerFixture.h \ exception_test.cpp RefCounted.cpp SessionState.cpp logging.cpp \ AsyncCompletion.cpp Url.cpp Uuid.cpp Shlib.cpp FieldValue.cpp \ FieldTable.cpp Array.cpp QueueOptionsTest.cpp \ InlineAllocator.cpp InlineVector.cpp SequenceSet.cpp \ StringUtils.cpp RangeSet.cpp AtomicValue.cpp QueueTest.cpp \ AccumulatedAckTest.cpp DtxWorkRecordTest.cpp \ DeliveryRecordTest.cpp ExchangeTest.cpp \ HeadersExchangeTest.cpp MessageTest.cpp QueueRegistryTest.cpp \ QueuePolicyTest.cpp QueueFlowLimitTest.cpp FramingTest.cpp \ HeaderTest.cpp SequenceNumberTest.cpp TimerTest.cpp \ TopicExchangeTest.cpp TxBufferTest.cpp TxPublishTest.cpp \ MessageBuilderTest.cpp ConnectionOptions.h ForkedBroker.h \ ForkedBroker.cpp ManagementTest.cpp MessageReplayTracker.cpp \ ConsoleTest.cpp QueueEvents.cpp ProxyTest.cpp RetryList.cpp \ FrameDecoder.cpp ReplicationTest.cpp ClientMessageTest.cpp \ PollableCondition.cpp Variant.cpp Address.cpp \ ClientMessage.cpp Qmf2.cpp BrokerOptions.cpp $(am__append_1) \ BrokerMgmtAgent.cpp ${BROKERMGMT_GEN_SRC} TESTLIBFLAGS = -module -rpath $(abs_builddir) libshlibtest_la_LDFLAGS = $(TESTLIBFLAGS) libshlibtest_la_SOURCES = shlibtest.cpp test_store_la_SOURCES = test_store.cpp test_store_la_LIBADD = $(lib_broker) test_store_la_LDFLAGS = -module # Useful scripts for doing cluster testing. CLUSTER_TEST_SCRIPTS_LIST = \ allhosts rsynchosts \ qpid-build-rinstall qpid-src-rinstall \ qpid-test-cluster \ qpid-cluster-benchmark @HAVE_LIBCPG_TRUE@cluster_test_SOURCES = \ @HAVE_LIBCPG_TRUE@ cluster_test.cpp \ @HAVE_LIBCPG_TRUE@ unit_test.cpp \ @HAVE_LIBCPG_TRUE@ ClusterFixture.cpp \ @HAVE_LIBCPG_TRUE@ ClusterFixture.h \ @HAVE_LIBCPG_TRUE@ ForkedBroker.h \ @HAVE_LIBCPG_TRUE@ ForkedBroker.cpp \ @HAVE_LIBCPG_TRUE@ PartialFailure.cpp \ @HAVE_LIBCPG_TRUE@ ClusterFailover.cpp \ @HAVE_LIBCPG_TRUE@ InitialStatusMap.cpp @HAVE_LIBCPG_TRUE@cluster_test_LDADD = $(lib_client) $(lib_broker) ../cluster.la -lboost_unit_test_framework @HAVE_SASL_TRUE@cluster_authentication_soak_INCLUDES = $(PUBLIC_INCLUDES) @HAVE_SASL_TRUE@cluster_authentication_soak_SOURCES = cluster_authentication_soak.cpp ForkedBroker.h ForkedBroker.cpp @HAVE_SASL_TRUE@cluster_authentication_soak_LDADD = $(lib_client) $(lib_broker) @HAVE_SASL_TRUE@sasl_version_SOURCES = sasl_version.cpp @HAVE_SASL_TRUE@sasl_version_LDADD = $(lib_client) receiver_SOURCES = \ receiver.cpp \ TestOptions.h \ ConnectionOptions.h receiver_LDADD = $(lib_client) sender_SOURCES = \ sender.cpp \ TestOptions.h \ ConnectionOptions.h \ Statistics.cpp sender_LDADD = $(lib_messaging) qpid_receive_SOURCES = \ qpid-receive.cpp \ TestOptions.h \ ConnectionOptions.h \ Statistics.h \ Statistics.cpp qpid_receive_LDADD = $(lib_messaging) qpid_send_SOURCES = \ qpid-send.cpp \ TestOptions.h \ ConnectionOptions.h \ Statistics.h \ Statistics.cpp qpid_send_LDADD = $(lib_messaging) qpid_perftest_SOURCES = qpid-perftest.cpp test_tools.h TestOptions.h ConnectionOptions.h qpid_perftest_INCLUDES = $(PUBLIC_INCLUDES) qpid_perftest_LDADD = $(lib_client) qpid_txtest_INCLUDES = $(PUBLIC_INCLUDES) qpid_txtest_SOURCES = qpid-txtest.cpp TestOptions.h ConnectionOptions.h qpid_txtest_LDADD = $(lib_client) qpid_latency_test_INCLUDES = $(PUBLIC_INCLUDES) qpid_latency_test_SOURCES = qpid-latency-test.cpp TestOptions.h ConnectionOptions.h qpid_latency_test_LDADD = $(lib_client) qpid_client_test_INCLUDES = $(PUBLIC_INCLUDES) qpid_client_test_SOURCES = qpid-client-test.cpp TestOptions.h ConnectionOptions.h qpid_client_test_LDADD = $(lib_client) qpid_topic_listener_INCLUDES = $(PUBLIC_INCLUDES) qpid_topic_listener_SOURCES = qpid-topic-listener.cpp TestOptions.h ConnectionOptions.h qpid_topic_listener_LDADD = $(lib_client) qpid_topic_publisher_INCLUDES = $(PUBLIC_INCLUDES) qpid_topic_publisher_SOURCES = qpid-topic-publisher.cpp TestOptions.h ConnectionOptions.h qpid_topic_publisher_LDADD = $(lib_client) qpid_ping_INCLUDES = $(PUBLIC_INCLUDES) qpid_ping_SOURCES = qpid-ping.cpp test_tools.h TestOptions.h ConnectionOptions.h qpid_ping_LDADD = $(lib_client) echotest_INCLUDES = $(PUBLIC_INCLUDES) echotest_SOURCES = echotest.cpp TestOptions.h ConnectionOptions.h echotest_LDADD = $(lib_client) publish_INCLUDES = $(PUBLIC_INCLUDES) publish_SOURCES = publish.cpp TestOptions.h ConnectionOptions.h publish_LDADD = $(lib_client) consume_INCLUDES = $(PUBLIC_INCLUDES) consume_SOURCES = consume.cpp TestOptions.h ConnectionOptions.h consume_LDADD = $(lib_client) header_test_INCLUDES = $(PUBLIC_INCLUDES) header_test_SOURCES = header_test.cpp TestOptions.h ConnectionOptions.h header_test_LDADD = $(lib_client) failover_soak_INCLUDES = $(PUBLIC_INCLUDES) failover_soak_SOURCES = failover_soak.cpp ForkedBroker.h ForkedBroker.cpp failover_soak_LDADD = $(lib_client) $(lib_broker) declare_queues_INCLUDES = $(PUBLIC_INCLUDES) declare_queues_SOURCES = declare_queues.cpp declare_queues_LDADD = $(lib_client) replaying_sender_INCLUDES = $(PUBLIC_INCLUDES) replaying_sender_SOURCES = replaying_sender.cpp replaying_sender_LDADD = $(lib_client) resuming_receiver_INCLUDES = $(PUBLIC_INCLUDES) resuming_receiver_SOURCES = resuming_receiver.cpp resuming_receiver_LDADD = $(lib_client) txshift_INCLUDES = $(PUBLIC_INCLUDES) txshift_SOURCES = txshift.cpp TestOptions.h ConnectionOptions.h txshift_LDADD = $(lib_client) txjob_INCLUDES = $(PUBLIC_INCLUDES) txjob_SOURCES = txjob.cpp TestOptions.h ConnectionOptions.h txjob_LDADD = $(lib_client) PollerTest_SOURCES = PollerTest.cpp PollerTest_LDADD = $(lib_common) $(lib_client) $(SOCKLIBS) DispatcherTest_SOURCES = DispatcherTest.cpp DispatcherTest_LDADD = $(lib_common) $(lib_client) $(SOCKLIBS) datagen_SOURCES = datagen.cpp datagen_LDADD = $(lib_common) $(lib_client) qpid_stream_INCLUDES = $(PUBLIC_INCLUDES) qpid_stream_SOURCES = qpid-stream.cpp qpid_stream_LDADD = $(lib_messaging) msg_group_test_INCLUDES = $(PUBLIC_INCLUDES) msg_group_test_SOURCES = msg_group_test.cpp msg_group_test_LDADD = $(lib_messaging) TESTS_ENVIRONMENT = \ VALGRIND=$(VALGRIND) \ LIBTOOL="$(LIBTOOL)" \ QPID_DATA_DIR= \ $(srcdir)/run_test system_tests = qpid-client-test quick_perftest quick_topictest run_header_test quick_txtest \ run_msg_group_tests libdlclose_noop_la_LDFLAGS = -module -rpath $(abs_builddir) libdlclose_noop_la_SOURCES = dlclose_noop.c PYTHON_SRC_DIR = $(abs_srcdir)/../../../python PYTHON_BLD_DIR = $(abs_builddir)/python TESTAGENT_GEN_SRC = \ testagent_gen/qmf/org/apache/qpid/agent/example/Parent.h \ testagent_gen/qmf/org/apache/qpid/agent/example/Child.h \ testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp \ testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp \ testagent_gen/qmf/org/apache/qpid/agent/example/ArgsParentCreate_child.h \ testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.h \ testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.h \ testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp \ testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp \ testagent_gen/qmf/org/apache/qpid/agent/example/Package.h \ testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp @GENERATE_TRUE@TESTAGENT_DEPS = ../mgen.timestamp testagent_CXXFLAGS = $(CXXFLAGS) -Itestagent_gen testagent_SOURCES = testagent.cpp $(TESTAGENT_GEN_SRC) testagent_LDADD = $(top_builddir)/src/libqmf.la BROKERMGMT_GEN_SRC = \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.cpp \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.h \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.h \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.cpp @GENERATE_TRUE@BROKERMGMT_DEPS = ../mgen.timestamp all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/cluster.mk $(srcdir)/sasl.mk $(srcdir)/ssl.mk $(srcdir)/testagent.mk $(srcdir)/brokermgmt.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/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 $(am__aclocal_m4_deps): test_env.sh: $(top_builddir)/config.status $(srcdir)/test_env.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install_env.sh: $(top_builddir)/config.status $(srcdir)/install_env.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ clean-checkLTLIBRARIES: -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES) @list='$(check_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 install-tmoduleLTLIBRARIES: $(tmodule_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(tmoduledir)" || $(MKDIR_P) "$(DESTDIR)$(tmoduledir)" @list='$(tmodule_LTLIBRARIES)'; test -n "$(tmoduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(tmoduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(tmoduledir)"; \ } uninstall-tmoduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(tmodule_LTLIBRARIES)'; test -n "$(tmoduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(tmoduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(tmoduledir)/$$f"; \ done clean-tmoduleLTLIBRARIES: -test -z "$(tmodule_LTLIBRARIES)" || rm -f $(tmodule_LTLIBRARIES) @list='$(tmodule_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 libdlclose_noop.la: $(libdlclose_noop_la_OBJECTS) $(libdlclose_noop_la_DEPENDENCIES) $(libdlclose_noop_la_LINK) $(libdlclose_noop_la_OBJECTS) $(libdlclose_noop_la_LIBADD) $(LIBS) libshlibtest.la: $(libshlibtest_la_OBJECTS) $(libshlibtest_la_DEPENDENCIES) $(libshlibtest_la_LINK) $(libshlibtest_la_OBJECTS) $(libshlibtest_la_LIBADD) $(LIBS) test_store.la: $(test_store_la_OBJECTS) $(test_store_la_DEPENDENCIES) $(test_store_la_LINK) -rpath $(tmoduledir) $(test_store_la_OBJECTS) $(test_store_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-qpidexecPROGRAMS: $(qpidexec_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(qpidexecdir)" || $(MKDIR_P) "$(DESTDIR)$(qpidexecdir)" @list='$(qpidexec_PROGRAMS)'; test -n "$(qpidexecdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(qpidexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(qpidexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-qpidexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(qpidexec_PROGRAMS)'; test -n "$(qpidexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpidexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpidexecdir)" && rm -f $$files clean-qpidexecPROGRAMS: @list='$(qpidexec_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-qpidexectestPROGRAMS: $(qpidexectest_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(qpidexectestdir)" || $(MKDIR_P) "$(DESTDIR)$(qpidexectestdir)" @list='$(qpidexectest_PROGRAMS)'; test -n "$(qpidexectestdir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(qpidexectestdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(qpidexectestdir)$$dir" || exit $$?; \ } \ ; done uninstall-qpidexectestPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(qpidexectest_PROGRAMS)'; test -n "$(qpidexectestdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpidexectestdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpidexectestdir)" && rm -f $$files clean-qpidexectestPROGRAMS: @list='$(qpidexectest_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list DispatcherTest$(EXEEXT): $(DispatcherTest_OBJECTS) $(DispatcherTest_DEPENDENCIES) @rm -f DispatcherTest$(EXEEXT) $(CXXLINK) $(DispatcherTest_OBJECTS) $(DispatcherTest_LDADD) $(LIBS) PollerTest$(EXEEXT): $(PollerTest_OBJECTS) $(PollerTest_DEPENDENCIES) @rm -f PollerTest$(EXEEXT) $(CXXLINK) $(PollerTest_OBJECTS) $(PollerTest_LDADD) $(LIBS) cluster_authentication_soak$(EXEEXT): $(cluster_authentication_soak_OBJECTS) $(cluster_authentication_soak_DEPENDENCIES) @rm -f cluster_authentication_soak$(EXEEXT) $(CXXLINK) $(cluster_authentication_soak_OBJECTS) $(cluster_authentication_soak_LDADD) $(LIBS) cluster_test$(EXEEXT): $(cluster_test_OBJECTS) $(cluster_test_DEPENDENCIES) @rm -f cluster_test$(EXEEXT) $(CXXLINK) $(cluster_test_OBJECTS) $(cluster_test_LDADD) $(LIBS) consume$(EXEEXT): $(consume_OBJECTS) $(consume_DEPENDENCIES) @rm -f consume$(EXEEXT) $(CXXLINK) $(consume_OBJECTS) $(consume_LDADD) $(LIBS) datagen$(EXEEXT): $(datagen_OBJECTS) $(datagen_DEPENDENCIES) @rm -f datagen$(EXEEXT) $(CXXLINK) $(datagen_OBJECTS) $(datagen_LDADD) $(LIBS) declare_queues$(EXEEXT): $(declare_queues_OBJECTS) $(declare_queues_DEPENDENCIES) @rm -f declare_queues$(EXEEXT) $(CXXLINK) $(declare_queues_OBJECTS) $(declare_queues_LDADD) $(LIBS) echotest$(EXEEXT): $(echotest_OBJECTS) $(echotest_DEPENDENCIES) @rm -f echotest$(EXEEXT) $(CXXLINK) $(echotest_OBJECTS) $(echotest_LDADD) $(LIBS) failover_soak$(EXEEXT): $(failover_soak_OBJECTS) $(failover_soak_DEPENDENCIES) @rm -f failover_soak$(EXEEXT) $(CXXLINK) $(failover_soak_OBJECTS) $(failover_soak_LDADD) $(LIBS) header_test$(EXEEXT): $(header_test_OBJECTS) $(header_test_DEPENDENCIES) @rm -f header_test$(EXEEXT) $(CXXLINK) $(header_test_OBJECTS) $(header_test_LDADD) $(LIBS) msg_group_test$(EXEEXT): $(msg_group_test_OBJECTS) $(msg_group_test_DEPENDENCIES) @rm -f msg_group_test$(EXEEXT) $(CXXLINK) $(msg_group_test_OBJECTS) $(msg_group_test_LDADD) $(LIBS) publish$(EXEEXT): $(publish_OBJECTS) $(publish_DEPENDENCIES) @rm -f publish$(EXEEXT) $(CXXLINK) $(publish_OBJECTS) $(publish_LDADD) $(LIBS) qpid-client-test$(EXEEXT): $(qpid_client_test_OBJECTS) $(qpid_client_test_DEPENDENCIES) @rm -f qpid-client-test$(EXEEXT) $(CXXLINK) $(qpid_client_test_OBJECTS) $(qpid_client_test_LDADD) $(LIBS) qpid-latency-test$(EXEEXT): $(qpid_latency_test_OBJECTS) $(qpid_latency_test_DEPENDENCIES) @rm -f qpid-latency-test$(EXEEXT) $(CXXLINK) $(qpid_latency_test_OBJECTS) $(qpid_latency_test_LDADD) $(LIBS) qpid-perftest$(EXEEXT): $(qpid_perftest_OBJECTS) $(qpid_perftest_DEPENDENCIES) @rm -f qpid-perftest$(EXEEXT) $(CXXLINK) $(qpid_perftest_OBJECTS) $(qpid_perftest_LDADD) $(LIBS) qpid-ping$(EXEEXT): $(qpid_ping_OBJECTS) $(qpid_ping_DEPENDENCIES) @rm -f qpid-ping$(EXEEXT) $(CXXLINK) $(qpid_ping_OBJECTS) $(qpid_ping_LDADD) $(LIBS) qpid-receive$(EXEEXT): $(qpid_receive_OBJECTS) $(qpid_receive_DEPENDENCIES) @rm -f qpid-receive$(EXEEXT) $(CXXLINK) $(qpid_receive_OBJECTS) $(qpid_receive_LDADD) $(LIBS) qpid-send$(EXEEXT): $(qpid_send_OBJECTS) $(qpid_send_DEPENDENCIES) @rm -f qpid-send$(EXEEXT) $(CXXLINK) $(qpid_send_OBJECTS) $(qpid_send_LDADD) $(LIBS) qpid-stream$(EXEEXT): $(qpid_stream_OBJECTS) $(qpid_stream_DEPENDENCIES) @rm -f qpid-stream$(EXEEXT) $(CXXLINK) $(qpid_stream_OBJECTS) $(qpid_stream_LDADD) $(LIBS) qpid-topic-listener$(EXEEXT): $(qpid_topic_listener_OBJECTS) $(qpid_topic_listener_DEPENDENCIES) @rm -f qpid-topic-listener$(EXEEXT) $(CXXLINK) $(qpid_topic_listener_OBJECTS) $(qpid_topic_listener_LDADD) $(LIBS) qpid-topic-publisher$(EXEEXT): $(qpid_topic_publisher_OBJECTS) $(qpid_topic_publisher_DEPENDENCIES) @rm -f qpid-topic-publisher$(EXEEXT) $(CXXLINK) $(qpid_topic_publisher_OBJECTS) $(qpid_topic_publisher_LDADD) $(LIBS) qpid-txtest$(EXEEXT): $(qpid_txtest_OBJECTS) $(qpid_txtest_DEPENDENCIES) @rm -f qpid-txtest$(EXEEXT) $(CXXLINK) $(qpid_txtest_OBJECTS) $(qpid_txtest_LDADD) $(LIBS) receiver$(EXEEXT): $(receiver_OBJECTS) $(receiver_DEPENDENCIES) @rm -f receiver$(EXEEXT) $(CXXLINK) $(receiver_OBJECTS) $(receiver_LDADD) $(LIBS) replaying_sender$(EXEEXT): $(replaying_sender_OBJECTS) $(replaying_sender_DEPENDENCIES) @rm -f replaying_sender$(EXEEXT) $(CXXLINK) $(replaying_sender_OBJECTS) $(replaying_sender_LDADD) $(LIBS) resuming_receiver$(EXEEXT): $(resuming_receiver_OBJECTS) $(resuming_receiver_DEPENDENCIES) @rm -f resuming_receiver$(EXEEXT) $(CXXLINK) $(resuming_receiver_OBJECTS) $(resuming_receiver_LDADD) $(LIBS) sasl_version$(EXEEXT): $(sasl_version_OBJECTS) $(sasl_version_DEPENDENCIES) @rm -f sasl_version$(EXEEXT) $(CXXLINK) $(sasl_version_OBJECTS) $(sasl_version_LDADD) $(LIBS) sender$(EXEEXT): $(sender_OBJECTS) $(sender_DEPENDENCIES) @rm -f sender$(EXEEXT) $(CXXLINK) $(sender_OBJECTS) $(sender_LDADD) $(LIBS) testagent_gen/qmf/org/apache/qpid/agent/example/$(am__dirstamp): @$(MKDIR_P) testagent_gen/qmf/org/apache/qpid/agent/example @: > testagent_gen/qmf/org/apache/qpid/agent/example/$(am__dirstamp) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR) @: > testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/$(am__dirstamp) testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.$(OBJEXT): testagent_gen/qmf/org/apache/qpid/agent/example/$(am__dirstamp) \ testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/$(am__dirstamp) testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.$(OBJEXT): testagent_gen/qmf/org/apache/qpid/agent/example/$(am__dirstamp) \ testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/$(am__dirstamp) testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.$(OBJEXT): testagent_gen/qmf/org/apache/qpid/agent/example/$(am__dirstamp) \ testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/$(am__dirstamp) testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.$(OBJEXT): testagent_gen/qmf/org/apache/qpid/agent/example/$(am__dirstamp) \ testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/$(am__dirstamp) testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.$(OBJEXT): testagent_gen/qmf/org/apache/qpid/agent/example/$(am__dirstamp) \ testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/$(am__dirstamp) testagent$(EXEEXT): $(testagent_OBJECTS) $(testagent_DEPENDENCIES) @rm -f testagent$(EXEEXT) $(testagent_LINK) $(testagent_OBJECTS) $(testagent_LDADD) $(LIBS) txjob$(EXEEXT): $(txjob_OBJECTS) $(txjob_DEPENDENCIES) @rm -f txjob$(EXEEXT) $(CXXLINK) $(txjob_OBJECTS) $(txjob_LDADD) $(LIBS) txshift$(EXEEXT): $(txshift_OBJECTS) $(txshift_DEPENDENCIES) @rm -f txshift$(EXEEXT) $(CXXLINK) $(txshift_OBJECTS) $(txshift_LDADD) $(LIBS) brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(am__dirstamp): @$(MKDIR_P) brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test @: > brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(am__dirstamp) brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR) @: > brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR)/$(am__dirstamp) brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.$(OBJEXT): brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(am__dirstamp) \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR)/$(am__dirstamp) brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.$(OBJEXT): brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(am__dirstamp) \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR)/$(am__dirstamp) unit_test$(EXEEXT): $(unit_test_OBJECTS) $(unit_test_DEPENDENCIES) @rm -f unit_test$(EXEEXT) $(CXXLINK) $(unit_test_OBJECTS) $(unit_test_LDADD) $(LIBS) install-qpidexecSCRIPTS: $(qpidexec_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(qpidexecdir)" || $(MKDIR_P) "$(DESTDIR)$(qpidexecdir)" @list='$(qpidexec_SCRIPTS)'; test -n "$(qpidexecdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(qpidexecdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(qpidexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-qpidexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(qpidexec_SCRIPTS)'; test -n "$(qpidexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpidexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpidexecdir)" && rm -f $$files install-qpidexectestSCRIPTS: $(qpidexectest_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(qpidexectestdir)" || $(MKDIR_P) "$(DESTDIR)$(qpidexectestdir)" @list='$(qpidexectest_SCRIPTS)'; test -n "$(qpidexectestdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(qpidexectestdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(qpidexectestdir)$$dir" || exit $$?; \ } \ ; done uninstall-qpidexectestSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(qpidexectest_SCRIPTS)'; test -n "$(qpidexectestdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(qpidexectestdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qpidexectestdir)" && rm -f $$files mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.$(OBJEXT) -rm -f brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.$(OBJEXT) -rm -f testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.$(OBJEXT) -rm -f testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.$(OBJEXT) -rm -f testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.$(OBJEXT) -rm -f testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.$(OBJEXT) -rm -f testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AccumulatedAckTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Address.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Array.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AsyncCompletion.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AtomicValue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BrokerMgmtAgent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BrokerOptions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ClientMessage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ClientMessageTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ClientSessionTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ClusterFailover.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ClusterFixture.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ConsoleTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DeliveryRecordTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DispatcherTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DtxWorkRecordTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ExchangeTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FieldTable.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FieldValue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ForkedBroker.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FrameDecoder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FramingTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HeaderTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HeadersExchangeTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitialStatusMap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InlineAllocator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InlineVector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ManagementTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageBuilderTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageReplayTracker.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessagingSessionTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessagingThreadTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PartialFailure.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PollableCondition.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PollerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ProxyTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Qmf2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueueEvents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueueFlowLimitTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueueOptionsTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueuePolicyTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueueRegistryTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/QueueTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RangeSet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RefCounted.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ReplicationTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RetryList.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SequenceNumberTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SequenceSet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SessionState.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Shlib.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Statistics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StringUtils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TimerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TopicExchangeTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TxBufferTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TxPublishTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Url.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Uuid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Variant.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XmlClientSessionTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cluster_authentication_soak.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cluster_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/consume.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datagen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/declare_queues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dlclose_noop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/echotest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exception_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/failover_soak.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/header_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logging.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msg_group_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/publish.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-client-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-latency-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-perftest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-ping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-receive.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-send.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-stream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-topic-listener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-topic-publisher.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qpid-txtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/receiver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replaying_sender.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resuming_receiver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sasl_version.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sender.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shlibtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_store.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testagent-testagent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txjob.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txshift.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unit_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR)/Package.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR)/TestObject.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Child.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildCreated.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildDestroyed.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Package.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Parent.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 $@ $< testagent-testagent.o: testagent.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent-testagent.o -MD -MP -MF $(DEPDIR)/testagent-testagent.Tpo -c -o testagent-testagent.o `test -f 'testagent.cpp' || echo '$(srcdir)/'`testagent.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/testagent-testagent.Tpo $(DEPDIR)/testagent-testagent.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent.cpp' object='testagent-testagent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent-testagent.o `test -f 'testagent.cpp' || echo '$(srcdir)/'`testagent.cpp testagent-testagent.obj: testagent.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent-testagent.obj -MD -MP -MF $(DEPDIR)/testagent-testagent.Tpo -c -o testagent-testagent.obj `if test -f 'testagent.cpp'; then $(CYGPATH_W) 'testagent.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/testagent-testagent.Tpo $(DEPDIR)/testagent-testagent.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent.cpp' object='testagent-testagent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent-testagent.obj `if test -f 'testagent.cpp'; then $(CYGPATH_W) 'testagent.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent.cpp'; fi` testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.o: testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.o -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Parent.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Parent.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Parent.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.obj: testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.obj -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Parent.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Parent.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Parent.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Parent.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp'; fi` testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.o: testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.o -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Child.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Child.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Child.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.obj: testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.obj -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Child.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Child.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Child.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Child.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp'; fi` testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.o: testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.o -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildCreated.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildCreated.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildCreated.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.obj: testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.obj -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildCreated.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildCreated.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildCreated.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildCreated.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp'; fi` testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.o: testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.o -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildDestroyed.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildDestroyed.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildDestroyed.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.obj: testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.obj -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildDestroyed.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildDestroyed.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-EventChildDestroyed.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-EventChildDestroyed.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp'; fi` testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.o: testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.o -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Package.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Package.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Package.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.o `test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp' || echo '$(srcdir)/'`testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.obj: testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp @am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -MT testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.obj -MD -MP -MF testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Package.Tpo -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp'; fi` @am__fastdepCXX_TRUE@ $(am__mv) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Package.Tpo testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/testagent-Package.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp' object='testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(testagent_CXXFLAGS) $(CXXFLAGS) -c -o testagent_gen/qmf/org/apache/qpid/agent/example/testagent-Package.obj `if test -f 'testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp'; then $(CYGPATH_W) 'testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp'; else $(CYGPATH_W) '$(srcdir)/testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__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) '; \ $(am__tty_colors); \ 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`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ 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 \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ 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`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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_LTLIBRARIES) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(tmoduledir)" "$(DESTDIR)$(qpidexecdir)" "$(DESTDIR)$(qpidexectestdir)" "$(DESTDIR)$(qpidexecdir)" "$(DESTDIR)$(qpidexectestdir)"; 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR)/$(am__dirstamp) -rm -f brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(am__dirstamp) -rm -f testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR)/$(am__dirstamp) -rm -f testagent_gen/qmf/org/apache/qpid/agent/example/$(am__dirstamp) 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-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ clean-libtool clean-local clean-qpidexecPROGRAMS \ clean-qpidexectestPROGRAMS clean-tmoduleLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR) testagent_gen/qmf/org/apache/qpid/agent/example/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-tmoduleLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-qpidexecPROGRAMS install-qpidexecSCRIPTS \ install-qpidexectestPROGRAMS install-qpidexectestSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/$(DEPDIR) testagent_gen/qmf/org/apache/qpid/agent/example/$(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-qpidexecPROGRAMS uninstall-qpidexecSCRIPTS \ uninstall-qpidexectestPROGRAMS uninstall-qpidexectestSCRIPTS \ uninstall-tmoduleLTLIBRARIES .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkLTLIBRARIES clean-checkPROGRAMS clean-generic \ clean-libtool clean-local clean-qpidexecPROGRAMS \ clean-qpidexectestPROGRAMS clean-tmoduleLTLIBRARIES ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-qpidexecPROGRAMS \ install-qpidexecSCRIPTS install-qpidexectestPROGRAMS \ install-qpidexectestSCRIPTS install-strip \ install-tmoduleLTLIBRARIES 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-qpidexecPROGRAMS \ uninstall-qpidexecSCRIPTS uninstall-qpidexectestPROGRAMS \ uninstall-qpidexectestSCRIPTS uninstall-tmoduleLTLIBRARIES check-long: $(MAKE) check TESTS="$(LONG_TESTS)" VALGRIND= # Things that should be built before the check target runs. check-am: python_prep test_env.sh install_env.sh sasl_config # Generate python client as part of the all-am target so it gets built before tests. all-am: python_prep python_prep: if test -d $(PYTHON_SRC_DIR); \ then cd $(PYTHON_SRC_DIR) && python $(PYTHON_SRC_DIR)/setup.py install \ --prefix=$(PYTHON_BLD_DIR) --install-lib=$(PYTHON_BLD_DIR) \ --install-scripts=$(PYTHON_BLD_DIR)/commands; \ else echo "WARNING: python client not built, missing $(PYTHON_SRC_DIR)"; fi sasl_config: sasl_test_setup.sh sh $(srcdir)/sasl_test_setup.sh touch sasl_config clean-local: rm -rf $(CLEAN_LOCAL) $(TESTAGENT_GEN_SRC): testagent_gen.timestamp testagent_gen.timestamp: testagent.xml ${TESTAGENT_DEPS} $(QMF_GEN) -o testagent_gen/qmf $(srcdir)/testagent.xml touch $@ testagent-testagent.$(OBJEXT): $(TESTAGENT_GEN_SRC) $(BROKERMGMT_GEN_SRC): brokermgmt_gen.timestamp brokermgmt_gen.timestamp: BrokerMgmtAgent.xml ${BROKERMGMT_DEPS} $(QMF_GEN) -b -o brokermgmt_gen/qmf $(srcdir)/BrokerMgmtAgent.xml touch $@ BrokerMgmtAgent.$(OBJEXT): $(BROKERMGMT_GEN_SRC) # 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: qpidc-0.16/src/tests/ClientMessageTest.cpp0000664000076400007640000000257411252003060021151 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /**@file Unit tests for the client::Message class. */ #include "unit_test.h" #include "qpid/client/Message.h" using namespace qpid::client; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ClientMessageTestSuite) QPID_AUTO_TEST_CASE(MessageCopyAssign) { // Verify that message has normal copy semantics. Message m("foo"); BOOST_CHECK_EQUAL("foo", m.getData()); Message c(m); BOOST_CHECK_EQUAL("foo", c.getData()); Message a; BOOST_CHECK_EQUAL("", a.getData()); a = m; BOOST_CHECK_EQUAL("foo", a.getData()); a.setData("a"); BOOST_CHECK_EQUAL("a", a.getData()); c.setData("c"); BOOST_CHECK_EQUAL("c", c.getData()); BOOST_CHECK_EQUAL("foo", m.getData()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/sasl_fed_ex_route0000775000076400007640000000153311532765114020514 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh ${srcdir}/sasl_fed_ex route qpidc-0.16/src/tests/dlclose_noop.c0000664000076400007640000000161611235655057017726 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /* * Loaded via LD_PRELOAD this will turn dlclose into a no-op. * * Allows valgrind to generate useful reports from programs that * dynamically unload libraries before exit, such as CppUnit's * DllPlugInTester. * */ #include void* dlclose(void* handle) { return 0; } qpidc-0.16/src/tests/Makefile.am0000664000076400007640000002765611752551467017156 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # AM_CXXFLAGS = $(WARNING_CFLAGS) -DBOOST_TEST_DYN_LINK INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src PUBLIC_INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include # Use public API only QMF_GEN=$(top_srcdir)/managementgen/qmf-gen abs_builddir=@abs_builddir@ abs_srcdir=@abs_srcdir@ extra_libs = lib_client = $(abs_builddir)/../libqpidclient.la lib_messaging = $(abs_builddir)/../libqpidmessaging.la lib_common = $(abs_builddir)/../libqpidcommon.la lib_broker = $(abs_builddir)/../libqpidbroker.la lib_console = $(abs_builddir)/../libqmfconsole.la lib_qmf2 = $(abs_builddir)/../libqmf2.la # lib_amqp_0_10 = $(abs_builddir)/../libqpidamqp_0_10.la # # Initialize variables that are incremented with += # check_PROGRAMS= check_LTLIBRARIES= TESTS= EXTRA_DIST= CLEANFILES= LONG_TESTS= CLEAN_LOCAL= # # Destination for intalled programs and tests defined here # qpidexecdir = $(libexecdir)/qpid qpidexec_PROGRAMS = qpidexec_SCRIPTS = qpidexectestdir = $(qpidexecdir)/tests qpidexectest_PROGRAMS = qpidexectest_SCRIPTS = tmoduledir = $(libdir)/qpid/tests tmodule_LTLIBRARIES= # # Unit test program # # Unit tests are built as a single program to reduce valgrind overhead # when running the tests. If you want to build a subset of the tests do # rm -f unit_test; make unit_test unit_test_OBJECTS="unit_test.o SelectedTest.o" # TESTS+=unit_test check_PROGRAMS+=unit_test unit_test_LDADD=-lboost_unit_test_framework \ $(lib_messaging) $(lib_broker) $(lib_console) $(lib_qmf2) unit_test_SOURCES= unit_test.cpp unit_test.h \ MessagingSessionTests.cpp \ MessagingThreadTests.cpp \ MessagingFixture.h \ ClientSessionTest.cpp \ BrokerFixture.h \ exception_test.cpp \ RefCounted.cpp \ SessionState.cpp logging.cpp \ AsyncCompletion.cpp \ Url.cpp Uuid.cpp \ Shlib.cpp FieldValue.cpp FieldTable.cpp Array.cpp \ QueueOptionsTest.cpp \ InlineAllocator.cpp \ InlineVector.cpp \ SequenceSet.cpp \ StringUtils.cpp \ RangeSet.cpp \ AtomicValue.cpp \ QueueTest.cpp \ AccumulatedAckTest.cpp \ DtxWorkRecordTest.cpp \ DeliveryRecordTest.cpp \ ExchangeTest.cpp \ HeadersExchangeTest.cpp \ MessageTest.cpp \ QueueRegistryTest.cpp \ QueuePolicyTest.cpp \ QueueFlowLimitTest.cpp \ FramingTest.cpp \ HeaderTest.cpp \ SequenceNumberTest.cpp \ TimerTest.cpp \ TopicExchangeTest.cpp \ TxBufferTest.cpp \ TxPublishTest.cpp \ MessageBuilderTest.cpp \ ConnectionOptions.h \ ForkedBroker.h \ ForkedBroker.cpp \ ManagementTest.cpp \ MessageReplayTracker.cpp \ ConsoleTest.cpp \ QueueEvents.cpp \ ProxyTest.cpp \ RetryList.cpp \ FrameDecoder.cpp \ ReplicationTest.cpp \ ClientMessageTest.cpp \ PollableCondition.cpp \ Variant.cpp \ Address.cpp \ ClientMessage.cpp \ Qmf2.cpp \ BrokerOptions.cpp if HAVE_XML unit_test_SOURCES+= XmlClientSessionTest.cpp endif TESTLIBFLAGS = -module -rpath $(abs_builddir) check_LTLIBRARIES += libshlibtest.la libshlibtest_la_LDFLAGS = $(TESTLIBFLAGS) libshlibtest_la_SOURCES = shlibtest.cpp tmodule_LTLIBRARIES += test_store.la test_store_la_SOURCES = test_store.cpp test_store_la_LIBADD = $(lib_broker) test_store_la_LDFLAGS = -module include cluster.mk include sasl.mk if SSL include ssl.mk endif # Test programs that are installed and therefore built as part of make, not make check qpidexectest_SCRIPTS += qpid-cpp-benchmark install_env.sh EXTRA_DIST += qpid-cpp-benchmark qpid-cluster-benchmark install_env.sh qpidexectest_PROGRAMS += receiver receiver_SOURCES = \ receiver.cpp \ TestOptions.h \ ConnectionOptions.h receiver_LDADD = $(lib_client) qpidexectest_PROGRAMS += sender sender_SOURCES = \ sender.cpp \ TestOptions.h \ ConnectionOptions.h \ Statistics.cpp sender_LDADD = $(lib_messaging) qpidexectest_PROGRAMS += qpid-receive qpid_receive_SOURCES = \ qpid-receive.cpp \ TestOptions.h \ ConnectionOptions.h \ Statistics.h \ Statistics.cpp qpid_receive_LDADD = $(lib_messaging) qpidexectest_PROGRAMS += qpid-send qpid_send_SOURCES = \ qpid-send.cpp \ TestOptions.h \ ConnectionOptions.h \ Statistics.h \ Statistics.cpp qpid_send_LDADD = $(lib_messaging) qpidexectest_PROGRAMS+=qpid-perftest qpid_perftest_SOURCES=qpid-perftest.cpp test_tools.h TestOptions.h ConnectionOptions.h qpid_perftest_INCLUDES=$(PUBLIC_INCLUDES) qpid_perftest_LDADD=$(lib_client) qpidexectest_PROGRAMS+=qpid-txtest qpid_txtest_INCLUDES=$(PUBLIC_INCLUDES) qpid_txtest_SOURCES=qpid-txtest.cpp TestOptions.h ConnectionOptions.h qpid_txtest_LDADD=$(lib_client) qpidexectest_PROGRAMS+=qpid-latency-test qpid_latency_test_INCLUDES=$(PUBLIC_INCLUDES) qpid_latency_test_SOURCES=qpid-latency-test.cpp TestOptions.h ConnectionOptions.h qpid_latency_test_LDADD=$(lib_client) qpidexectest_PROGRAMS+=qpid-client-test qpid_client_test_INCLUDES=$(PUBLIC_INCLUDES) qpid_client_test_SOURCES=qpid-client-test.cpp TestOptions.h ConnectionOptions.h qpid_client_test_LDADD=$(lib_client) qpidexectest_PROGRAMS+=qpid-topic-listener qpid_topic_listener_INCLUDES=$(PUBLIC_INCLUDES) qpid_topic_listener_SOURCES=qpid-topic-listener.cpp TestOptions.h ConnectionOptions.h qpid_topic_listener_LDADD=$(lib_client) qpidexectest_PROGRAMS+=qpid-topic-publisher qpid_topic_publisher_INCLUDES=$(PUBLIC_INCLUDES) qpid_topic_publisher_SOURCES=qpid-topic-publisher.cpp TestOptions.h ConnectionOptions.h qpid_topic_publisher_LDADD=$(lib_client) qpidexectest_PROGRAMS+=qpid-ping qpid_ping_INCLUDES=$(PUBLIC_INCLUDES) qpid_ping_SOURCES=qpid-ping.cpp test_tools.h TestOptions.h ConnectionOptions.h qpid_ping_LDADD=$(lib_client) # # Other test programs # check_PROGRAMS+=echotest echotest_INCLUDES=$(PUBLIC_INCLUDES) echotest_SOURCES=echotest.cpp TestOptions.h ConnectionOptions.h echotest_LDADD=$(lib_client) check_PROGRAMS+=publish publish_INCLUDES=$(PUBLIC_INCLUDES) publish_SOURCES=publish.cpp TestOptions.h ConnectionOptions.h publish_LDADD=$(lib_client) check_PROGRAMS+=consume consume_INCLUDES=$(PUBLIC_INCLUDES) consume_SOURCES=consume.cpp TestOptions.h ConnectionOptions.h consume_LDADD=$(lib_client) check_PROGRAMS+=header_test header_test_INCLUDES=$(PUBLIC_INCLUDES) header_test_SOURCES=header_test.cpp TestOptions.h ConnectionOptions.h header_test_LDADD=$(lib_client) check_PROGRAMS+=failover_soak failover_soak_INCLUDES=$(PUBLIC_INCLUDES) failover_soak_SOURCES=failover_soak.cpp ForkedBroker.h ForkedBroker.cpp failover_soak_LDADD=$(lib_client) $(lib_broker) check_PROGRAMS+=declare_queues declare_queues_INCLUDES=$(PUBLIC_INCLUDES) declare_queues_SOURCES=declare_queues.cpp declare_queues_LDADD=$(lib_client) check_PROGRAMS+=replaying_sender replaying_sender_INCLUDES=$(PUBLIC_INCLUDES) replaying_sender_SOURCES=replaying_sender.cpp replaying_sender_LDADD=$(lib_client) check_PROGRAMS+=resuming_receiver resuming_receiver_INCLUDES=$(PUBLIC_INCLUDES) resuming_receiver_SOURCES=resuming_receiver.cpp resuming_receiver_LDADD=$(lib_client) check_PROGRAMS+=txshift txshift_INCLUDES=$(PUBLIC_INCLUDES) txshift_SOURCES=txshift.cpp TestOptions.h ConnectionOptions.h txshift_LDADD=$(lib_client) check_PROGRAMS+=txjob txjob_INCLUDES=$(PUBLIC_INCLUDES) txjob_SOURCES=txjob.cpp TestOptions.h ConnectionOptions.h txjob_LDADD=$(lib_client) check_PROGRAMS+=PollerTest PollerTest_SOURCES=PollerTest.cpp PollerTest_LDADD=$(lib_common) $(lib_client) $(SOCKLIBS) check_PROGRAMS+=DispatcherTest DispatcherTest_SOURCES=DispatcherTest.cpp DispatcherTest_LDADD=$(lib_common) $(lib_client) $(SOCKLIBS) check_PROGRAMS+=datagen datagen_SOURCES=datagen.cpp datagen_LDADD=$(lib_common) $(lib_client) check_PROGRAMS+=qpid-stream qpid_stream_INCLUDES=$(PUBLIC_INCLUDES) qpid_stream_SOURCES=qpid-stream.cpp qpid_stream_LDADD=$(lib_messaging) check_PROGRAMS+=msg_group_test msg_group_test_INCLUDES=$(PUBLIC_INCLUDES) msg_group_test_SOURCES=msg_group_test.cpp msg_group_test_LDADD=$(lib_messaging) TESTS_ENVIRONMENT = \ VALGRIND=$(VALGRIND) \ LIBTOOL="$(LIBTOOL)" \ QPID_DATA_DIR= \ $(srcdir)/run_test system_tests = qpid-client-test quick_perftest quick_topictest run_header_test quick_txtest \ run_msg_group_tests TESTS += start_broker $(system_tests) python_tests stop_broker \ run_ha_tests run_federation_tests run_federation_sys_tests \ run_acl_tests run_cli_tests replication_test dynamic_log_level_test \ run_queue_flow_limit_tests ipv6_test EXTRA_DIST += \ run_test vg_check \ run-unit-tests start_broker python_tests stop_broker \ quick_topictest \ quick_perftest \ quick_txtest \ topictest \ run_header_test \ header_test.py \ ssl_test \ config.null \ ais_check \ run_federation_tests \ run_federation_sys_tests \ run_long_federation_sys_tests \ run_cli_tests \ run_acl_tests \ .valgrind.supp \ MessageUtils.h \ TestMessageStore.h \ TxMocks.h \ replication_test \ run_perftest \ ring_queue_test \ run_ring_queue_test \ dynamic_log_level_test \ qpid-ctrl \ CMakeLists.txt \ cluster.cmake \ windows/DisableWin32ErrorWindows.cpp \ background.ps1 \ find_prog.ps1 \ python_tests.ps1 \ quick_topictest.ps1 \ run_federation_tests.ps1 \ run_header_test.ps1 \ run_test.ps1 \ start_broker.ps1 \ stop_broker.ps1 \ topictest.ps1 \ run_queue_flow_limit_tests \ run_msg_group_tests \ ipv6_test \ run_ha_tests \ ha_tests.py \ test_env.ps1.in check_LTLIBRARIES += libdlclose_noop.la libdlclose_noop_la_LDFLAGS = -module -rpath $(abs_builddir) libdlclose_noop_la_SOURCES = dlclose_noop.c CLEANFILES+=valgrind.out *.log *.vglog* dummy_test qpidd.port $(unit_wrappers) # Longer running stability tests, not run by default check: target. # Not run under valgrind, too slow LONG_TESTS+=start_broker \ fanout_perftest shared_perftest multiq_perftest topic_perftest run_ring_queue_test \ run_msg_group_tests_soak \ stop_broker \ run_long_federation_sys_tests \ run_failover_soak reliable_replication_test \ federated_cluster_test_with_node_failure EXTRA_DIST+= \ fanout_perftest \ shared_perftest \ multiq_perftest \ topic_perftest \ run_failover_soak \ reliable_replication_test \ federated_cluster_test_with_node_failure \ sasl_test_setup.sh \ run_msg_group_tests_soak check-long: $(MAKE) check TESTS="$(LONG_TESTS)" VALGRIND= # Things that should be built before the check target runs. check-am: python_prep test_env.sh install_env.sh sasl_config PYTHON_SRC_DIR=$(abs_srcdir)/../../../python PYTHON_BLD_DIR=$(abs_builddir)/python # Generate python client as part of the all-am target so it gets built before tests. all-am: python_prep python_prep: if test -d $(PYTHON_SRC_DIR); \ then cd $(PYTHON_SRC_DIR) && python $(PYTHON_SRC_DIR)/setup.py install \ --prefix=$(PYTHON_BLD_DIR) --install-lib=$(PYTHON_BLD_DIR) \ --install-scripts=$(PYTHON_BLD_DIR)/commands; \ else echo "WARNING: python client not built, missing $(PYTHON_SRC_DIR)"; fi sasl_config: sasl_test_setup.sh sh $(srcdir)/sasl_test_setup.sh touch sasl_config CLEAN_LOCAL += sasl_config clean-local: rm -rf $(CLEAN_LOCAL) include testagent.mk include brokermgmt.mk qpidc-0.16/src/tests/sasl_fed0000775000076400007640000001314011721215323016567 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh # This minimum value corresponds to sasl version 2.1.22 minimum_sasl_version=131350 sasl_version=`$QPID_TEST_EXEC_DIR/sasl_version` # This test is necessary becasue this sasl version is the first one that permits # redirection of the sasl config file path. if [ "$sasl_version" -lt "$minimum_sasl_version" ]; then echo "sasl_fed: must have sasl version 2.1.22 or greater. ( Integer value: $minimum_sasl_version ) Version is: $sasl_version" exit 0 fi # In a distribution, the python tools will be absent. if [ ! -f $QPID_CONFIG_EXEC ] || [ ! -f $QPID_ROUTE_EXEC ] ; then echo "python tools absent - skipping sasl_fed." exit 0 fi sasl_config_file=$builddir/sasl_config my_random_number=$RANDOM tmp_root=/tmp/sasl_fed_$my_random_number mkdir -p $tmp_root #-------------------------------------------------- #echo " Starting broker 1" #-------------------------------------------------- $QPIDD_EXEC \ -p 0 \ --data-dir $tmp_root/data_1 \ --auth=yes \ --mgmt-enable=yes \ --log-enable info+ \ --log-source yes \ --log-to-file $tmp_root/qpidd_1.log \ --sasl-config=$sasl_config_file \ -d > $tmp_root/broker_1_port broker_1_port=`cat $tmp_root/broker_1_port` #-------------------------------------------------- #echo " Starting broker 2" #-------------------------------------------------- $QPIDD_EXEC \ -p 0 \ --data-dir $tmp_root/data_2 \ --auth=yes \ --mgmt-enable=yes \ --log-enable info+ \ --log-source yes \ --log-to-file $tmp_root/qpidd_2.log \ --sasl-config=$sasl_config_file \ -d > $tmp_root/broker_2_port broker_2_port=`cat $tmp_root/broker_2_port` sleep 2 # I am not randomizing these names, because the test creates its own brokers. QUEUE_NAME=sasl_fed_queue ROUTING_KEY=sasl_fed_queue EXCHANGE_NAME=sasl_fedex #-------------------------------------------------- #echo " add exchanges" #-------------------------------------------------- $QPID_CONFIG_EXEC -b localhost:$broker_1_port add exchange direct $EXCHANGE_NAME $QPID_CONFIG_EXEC -b localhost:$broker_2_port add exchange direct $EXCHANGE_NAME #-------------------------------------------------- #echo " add queues" #-------------------------------------------------- $QPID_CONFIG_EXEC -b localhost:$broker_1_port add queue $QUEUE_NAME $QPID_CONFIG_EXEC -b localhost:$broker_2_port add queue $QUEUE_NAME sleep 5 #-------------------------------------------------- #echo " create bindings" #-------------------------------------------------- $QPID_CONFIG_EXEC -b localhost:$broker_1_port bind $EXCHANGE_NAME $QUEUE_NAME $ROUTING_KEY $QPID_CONFIG_EXEC -b localhost:$broker_2_port bind $EXCHANGE_NAME $QUEUE_NAME $ROUTING_KEY sleep 5 #-------------------------------------------------- #echo " qpid-route route add" #-------------------------------------------------- $QPID_ROUTE_EXEC route add zag/zag@localhost:$broker_2_port zag/zag@localhost:$broker_1_port $EXCHANGE_NAME $ROUTING_KEY "" "" DIGEST-MD5 sleep 5 n_messages=100 #-------------------------------------------------- #echo " Sending 100 messages to $broker_1_port " #-------------------------------------------------- $builddir/datagen --count $n_messages | $SENDER_EXEC --mechanism DIGEST-MD5 --username zag --password zag --exchange $EXCHANGE_NAME --routing-key $ROUTING_KEY --port $broker_1_port sleep 5 #-------------------------------------------------- #echo " Examine Broker $broker_1_port" #-------------------------------------------------- broker_1_message_count=`$PYTHON_COMMANDS/qpid-stat -q -b localhost:$broker_1_port | grep sasl_fed_queue | awk '{print $2}'` #echo " " #-------------------------------------------------- #echo " Examine Broker $broker_2_port" #-------------------------------------------------- broker_2_message_count=`$PYTHON_COMMANDS/qpid-stat -q -b localhost:$broker_2_port | grep sasl_fed_queue | awk '{print $2}'` #echo " " #-------------------------------------------------- #echo " Asking brokers to quit." #-------------------------------------------------- $QPIDD_EXEC --port $broker_1_port --quit $QPIDD_EXEC --port $broker_2_port --quit #-------------------------------------------------- #echo "Removing temporary directory $tmp_root" #-------------------------------------------------- rm -rf $tmp_root if [ "$broker_2_message_count" -eq "$n_messages" ]; then # echo "good: |$broker_2_message_count| == |$n_messages|" exit 0 else # echo "not ideal: |$broker_1_message_count| != |$n_messages|" exit 1 fi qpidc-0.16/src/tests/allhosts0000775000076400007640000000427111654250703016653 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # usage() { echo "Usage: $0 [options] command. Run a command on each host in \$HOSTS. Options: -l USER passed to ssh - run as USER. -t passed to ssh - create a terminal. -b run in background, wait for commands to complete. -d run in background, don't wait for commands to complete. -s SECONDS sleep between starting commands. -q don't print banner lines for each host. -o SUFFIX log output of each command to .SUFFIX -X passed to ssh - forward X connection. " exit 1 } while getopts "tl:bs:dqo:X" opt; do case $opt in l) SSHOPTS="-l$OPTARG $SSHOPTS" ;; t) SSHOPTS="-t $SSHOPTS" ;; b) BACKGROUND=1 ;; d) BACKGROUND=1; DISOWN=1 ;; s) SLEEP="sleep $OPTARG" ;; q) NOBANNER=1 ;; o) SUFFIX=$OPTARG ;; X) SSHOPTS="-X $SSHOPTS" ;; *) usage;; esac done shift `expr $OPTIND - 1` test "$*" || usage; OK_FILE=`mktemp` # Will be deleted if anything goes wrong. trap "rm -f $OK_FILE" EXIT do_ssh() { h=$1; shift if test $SUFFIX ; then ssh $SSHOPTS $h "$@" &> $h.$SUFFIX else ssh $SSHOPTS $h "$@"; fi || rm -rf $OK_FILE; } for h in $HOSTS ; do test "$NOBANNER" || echo "== ssh $SSHOPTS $h $@ ==" if [ "$BACKGROUND" = 1 ]; then do_ssh $h "$@" & CHILDREN="$! $CHILDREN" else do_ssh $h "$@" fi $SLEEP done if [ "$DISOWN" = 1 ]; then for c in $CHILDREN; do disown $c; done else wait fi test -f $OK_FILE qpidc-0.16/src/tests/find_prog.ps10000664000076400007640000000240011265467372017472 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Locate the subdirectory where the specified program resides; the program # must have a directory and a file name, even if the directory is . param( [string] $prog # program to look for somewhere below cwd ) $dir = Split-Path $prog $exe = Split-Path $prog -leaf $sub = "" $subs = "Debug","Release","MinSizeRel","RelWithDebInfo" foreach ($try in $subs) { $prog = "$dir\$try\$exe" if (Test-Path $prog) { $sub = $try break } } qpidc-0.16/src/tests/run_header_test0000775000076400007640000000232411534154741020174 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Simple test of encode/decode of a double in application headers # TODO: this should be expanded to cover a wider set of types and go # in both directions srcdir=`dirname $0` source ./test_env.sh test -f qpidd.port && QPID_PORT=`cat qpidd.port` if test -d ${PYTHON_DIR} ; then ./header_test -p $QPID_PORT $srcdir/header_test.py "localhost" $QPID_PORT else echo "Skipping header test as python libs not found" fi qpidc-0.16/src/tests/ha_tests.py0000775000076400007640000006461511725230316017270 0ustar00jrossjross00000000000000#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import os, signal, sys, time, imp, re, subprocess, glob, random, logging, shutil, math from qpid.messaging import Message, NotFound, ConnectionError, Connection from qpid.datatypes import uuid4 from brokertest import * from threading import Thread, Lock, Condition from logging import getLogger, WARN, ERROR, DEBUG from qpidtoollibs import BrokerAgent log = getLogger("qpid.ha-tests") class HaBroker(Broker): def __init__(self, test, args=[], broker_url=None, ha_cluster=True, **kwargs): assert BrokerTest.ha_lib, "Cannot locate HA plug-in" args = copy(args) args.extend(["--load-module", BrokerTest.ha_lib, # FIXME aconway 2012-02-13: workaround slow link failover. "--link-maintenace-interval=0.1", "--ha-cluster=%s"%ha_cluster]) if broker_url: args.extend([ "--ha-brokers", broker_url ]) Broker.__init__(self, test, args, **kwargs) self.commands=os.getenv("PYTHON_COMMANDS") assert os.path.isdir(self.commands) def promote(self): assert os.system("%s/qpid-ha promote -b %s"%(self.commands, self.host_port())) == 0 def set_client_url(self, url): assert os.system( "%s/qpid-ha set --public-brokers=%s -b %s"%(self.commands, url,self.host_port())) == 0 def set_broker_url(self, url): assert os.system( "%s/qpid-ha set --brokers=%s -b %s"%(self.commands, url, self.host_port())) == 0 def replicate(self, from_broker, queue): assert os.system( "%s/qpid-ha replicate -b %s %s %s"%(self.commands, self.host_port(), from_broker, queue)) == 0 def config_replicate(self, from_broker, queue): assert os.system( "%s/qpid-config --broker=%s add queue --start-replica %s %s"%(self.commands, self.host_port(), from_broker, queue)) == 0 def config_declare(self, queue, replication): assert os.system( "%s/qpid-config --broker=%s add queue %s --replicate %s"%(self.commands, self.host_port(), queue, replication)) == 0 class HaCluster(object): _cluster_count = 0 def __init__(self, test, n, **kwargs): """Start a cluster of n brokers""" self.test = test self._brokers = [ HaBroker(test, name="broker%s-%s"%(HaCluster._cluster_count, i), **kwargs) for i in xrange(n)] HaCluster._cluster_count += 1 self[0].promote() self.url = ",".join([b.host_port() for b in self]) for b in self: b.set_broker_url(self.url) def connect(self, i): """Connect with reconnect_urls""" return self[i].connect(reconnect=True, reconnect_urls=self.url.split(",")) def kill(self, i): """Kill broker i, promote broker i+1""" self[i].kill() self[i].expect = EXPECT_EXIT_FAIL self[(i+1) % len(self)].promote() def bounce(self, i): """Stop and restart a broker in a cluster.""" self.kill(i) b = self[i] self._brokers[i] = HaBroker(self.test, name=b.name, port=b.port(), broker_url=self.url) # Behave like a list of brokers. def __len__(self): return len(self._brokers) def __getitem__(self,index): return self._brokers[index] def __iter__(self): return self._brokers.__iter__() def qr_node(value="all"): return "node:{x-declare:{arguments:{'qpid.replicate':%s}}}" % value class ShortTests(BrokerTest): """Short HA functionality tests.""" # Wait for an address to become valid. def wait(self, session, address): def check(): try: session.sender(address) return True except NotFound: return False assert retry(check), "Timed out waiting for address %s"%(address) # Wait for address to become valid on a backup broker. def wait_backup(self, backup, address): bs = self.connect_admin(backup).session() self.wait(bs, address) bs.connection.close() # Combines wait_backup and assert_browse_retry def assert_browse_backup(self, backup, queue, expected, **kwargs): bs = self.connect_admin(backup).session() self.wait(bs, queue) self.assert_browse_retry(bs, queue, expected, **kwargs) bs.connection.close() def assert_missing(self, session, address): try: session.receiver(address) self.fail("Should not have been replicated: %s"%(address)) except NotFound: pass def connect_admin(self, backup, **kwargs): """Connect to a backup broker as an admin connection""" return backup.connect(client_properties={"qpid.ha-admin":1}, **kwargs) def test_replication(self): """Test basic replication of configuration and messages before and after backup has connected""" getLogger().setLevel(ERROR) # Hide expected WARNING log messages from failover. def queue(name, replicate): return "%s;{create:always,node:{x-declare:{arguments:{'qpid.replicate':%s}}}}"%(name, replicate) def exchange(name, replicate, bindq): return"%s;{create:always,node:{type:topic,x-declare:{arguments:{'qpid.replicate':%s}, type:'fanout'},x-bindings:[{exchange:'%s',queue:'%s'}]}}"%(name, replicate, name, bindq) def setup(p, prefix, primary): """Create config, send messages on the primary p""" s = p.sender(queue(prefix+"q1", "all")) for m in ["a", "b", "1"]: s.send(Message(m)) # Test replication of dequeue self.assertEqual(p.receiver(prefix+"q1").fetch(timeout=0).content, "a") p.acknowledge() p.sender(queue(prefix+"q2", "configuration")).send(Message("2")) p.sender(queue(prefix+"q3", "none")).send(Message("3")) p.sender(exchange(prefix+"e1", "all", prefix+"q1")).send(Message("4")) p.sender(exchange(prefix+"e2", "all", prefix+"q2")).send(Message("5")) # Test unbind p.sender(queue(prefix+"q4", "all")).send(Message("6")) s3 = p.sender(exchange(prefix+"e4", "all", prefix+"q4")) s3.send(Message("7")) # Use old connection to unbind us = primary.connect_old().session(str(uuid4())) us.exchange_unbind(exchange=prefix+"e4", binding_key="", queue=prefix+"q4") p.sender(prefix+"e4").send(Message("drop1")) # Should be dropped # Need a marker so we can wait till sync is done. p.sender(queue(prefix+"x", "configuration")) def verify(b, prefix, p): """Verify setup was replicated to backup b""" # Wait for configuration to replicate. self.wait(b, prefix+"x"); self.assert_browse_retry(b, prefix+"q1", ["b", "1", "4"]) self.assertEqual(p.receiver(prefix+"q1").fetch(timeout=0).content, "b") p.acknowledge() self.assert_browse_retry(b, prefix+"q1", ["1", "4"]) self.assert_browse_retry(b, prefix+"q2", []) # configuration only self.assert_missing(b, prefix+"q3") b.sender(prefix+"e1").send(Message(prefix+"e1")) # Verify binds with replicate=all self.assert_browse_retry(b, prefix+"q1", ["1", "4", prefix+"e1"]) b.sender(prefix+"e2").send(Message(prefix+"e2")) # Verify binds with replicate=configuration self.assert_browse_retry(b, prefix+"q2", [prefix+"e2"]) b.sender(prefix+"e4").send(Message("drop2")) # Verify unbind. self.assert_browse_retry(b, prefix+"q4", ["6","7"]) primary = HaBroker(self, name="primary") primary.promote() p = primary.connect().session() # Create config, send messages before starting the backup, to test catch-up replication. setup(p, "1", primary) backup = HaBroker(self, name="backup", broker_url=primary.host_port()) # Create config, send messages after starting the backup, to test steady-state replication. setup(p, "2", primary) # Verify the data on the backup b = self.connect_admin(backup).session() verify(b, "1", p) verify(b, "2", p) # Test a series of messages, enqueue all then dequeue all. s = p.sender(queue("foo","all")) self.wait(b, "foo") msgs = [str(i) for i in range(10)] for m in msgs: s.send(Message(m)) self.assert_browse_retry(p, "foo", msgs) self.assert_browse_retry(b, "foo", msgs) r = p.receiver("foo") for m in msgs: self.assertEqual(m, r.fetch(timeout=0).content) p.acknowledge() self.assert_browse_retry(p, "foo", []) self.assert_browse_retry(b, "foo", []) # Another series, this time verify each dequeue individually. for m in msgs: s.send(Message(m)) self.assert_browse_retry(p, "foo", msgs) self.assert_browse_retry(b, "foo", msgs) for i in range(len(msgs)): self.assertEqual(msgs[i], r.fetch(timeout=0).content) p.acknowledge() self.assert_browse_retry(p, "foo", msgs[i+1:]) self.assert_browse_retry(b, "foo", msgs[i+1:]) def test_sync(self): def queue(name, replicate): return "%s;{create:always,%s}"%(name, qr_node(replicate)) primary = HaBroker(self, name="primary") primary.promote() p = primary.connect().session() s = p.sender(queue("q","all")) for m in [str(i) for i in range(0,10)]: s.send(m) s.sync() backup1 = HaBroker(self, name="backup1", broker_url=primary.host_port()) for m in [str(i) for i in range(10,20)]: s.send(m) s.sync() backup2 = HaBroker(self, name="backup2", broker_url=primary.host_port()) for m in [str(i) for i in range(20,30)]: s.send(m) s.sync() msgs = [str(i) for i in range(30)] b1 = self.connect_admin(backup1).session() self.wait(b1, "q"); self.assert_browse_retry(b1, "q", msgs) b2 = self.connect_admin(backup2).session() self.wait(b2, "q"); self.assert_browse_retry(b2, "q", msgs) def test_send_receive(self): """Verify sequence numbers of messages sent by qpid-send""" getLogger().setLevel(ERROR) # Hide expected WARNING log messages from failover. primary = HaBroker(self, name="primary") primary.promote() backup1 = HaBroker(self, name="backup1", broker_url=primary.host_port()) backup2 = HaBroker(self, name="backup2", broker_url=primary.host_port()) sender = self.popen( ["qpid-send", "--broker", primary.host_port(), "--address", "q;{create:always,%s}"%(qr_node("all")), "--messages=1000", "--content-string=x" ]) receiver = self.popen( ["qpid-receive", "--broker", primary.host_port(), "--address", "q;{create:always,%s}"%(qr_node("all")), "--messages=990", "--timeout=10" ]) try: self.assertEqual(sender.wait(), 0) self.assertEqual(receiver.wait(), 0) expect = [long(i) for i in range(991, 1001)] sn = lambda m: m.properties["sn"] self.assert_browse_retry(self.connect_admin(backup1).session(), "q", expect, transform=sn) self.assert_browse_retry(self.connect_admin(backup2).session(), "q", expect, transform=sn) except: print self.browse(primary.connect().session(), "q", transform=sn) print self.browse(self.connect_admin(backup1).session(), "q", transform=sn) print self.browse(self.connect_admin(backup2).session(), "q", transform=sn) raise def test_failover_python(self): """Verify that backups rejects connections and that fail-over works in python client""" getLogger().setLevel(ERROR) # Hide expected WARNING log messages from failover. primary = HaBroker(self, name="primary", expect=EXPECT_EXIT_FAIL) primary.promote() backup = HaBroker(self, name="backup", broker_url=primary.host_port()) # Check that backup rejects normal connections try: backup.connect().session() self.fail("Expected connection to backup to fail") except ConnectionError: pass # Check that admin connections are allowed to backup. self.connect_admin(backup).close() # Test discovery: should connect to primary after reject by backup c = backup.connect(reconnect_urls=[primary.host_port(), backup.host_port()], reconnect=True) s = c.session() sender = s.sender("q;{create:always,%s}"%(qr_node())) self.wait_backup(backup, "q") sender.send("foo") primary.kill() assert retry(lambda: not is_running(primary.pid)) backup.promote() self.assert_browse_retry(s, "q", ["foo"]) c.close() def test_failover_cpp(self): """Verify that failover works in the C++ client.""" primary = HaBroker(self, name="primary", expect=EXPECT_EXIT_FAIL) primary.promote() backup = HaBroker(self, name="backup", broker_url=primary.host_port()) url="%s,%s"%(primary.host_port(), backup.host_port()) primary.connect().session().sender("q;{create:always,%s}"%(qr_node())) self.wait_backup(backup, "q") sender = NumberedSender(primary, url=url, queue="q", failover_updates = False) receiver = NumberedReceiver(primary, url=url, queue="q", failover_updates = False) receiver.start() sender.start() self.wait_backup(backup, "q") assert retry(lambda: receiver.received > 10) # Wait for some messages to get thru primary.kill() assert retry(lambda: not is_running(primary.pid)) # Wait for primary to die backup.promote() n = receiver.received # Make sure we are still running assert retry(lambda: receiver.received > n + 10) sender.stop() receiver.stop() def test_backup_failover(self): """Verify that a backup broker fails over and recovers queue state""" brokers = HaCluster(self, 3) brokers[0].connect().session().sender( "q;{create:always,%s}"%(qr_node())).send("a") for b in brokers[1:]: self.assert_browse_backup(b, "q", ["a"]) brokers[0].expect = EXPECT_EXIT_FAIL brokers.kill(0) brokers[1].connect().session().sender("q").send("b") self.assert_browse_backup(brokers[2], "q", ["a","b"]) s = brokers[1].connect().session() self.assertEqual("a", s.receiver("q").fetch().content) s.acknowledge() self.assert_browse_backup(brokers[2], "q", ["b"]) def test_qpid_config_replication(self): """Set up replication via qpid-config""" brokers = HaCluster(self,2) brokers[0].config_declare("q","all") brokers[0].connect().session().sender("q").send("foo") self.assert_browse_backup(brokers[1], "q", ["foo"]) def test_standalone_queue_replica(self): """Test replication of individual queues outside of cluster mode""" getLogger().setLevel(ERROR) # Hide expected WARNING log messages from failover. primary = HaBroker(self, name="primary", ha_cluster=False, args=["--log-enable=debug+"]) pc = primary.connect() ps = pc.session().sender("q;{create:always}") pr = pc.session().receiver("q;{create:always}") backup = HaBroker(self, name="backup", ha_cluster=False, args=["--log-enable=debug+"]) br = backup.connect().session().receiver("q;{create:always}") # Set up replication with qpid-ha backup.replicate(primary.host_port(), "q") ps.send("a") self.assert_browse_backup(backup, "q", ["a"]) ps.send("b") self.assert_browse_backup(backup, "q", ["a", "b"]) self.assertEqual("a", pr.fetch().content) pr.session.acknowledge() self.assert_browse_backup(backup, "q", ["b"]) # Set up replication with qpid-config ps2 = pc.session().sender("q2;{create:always}") backup.config_replicate(primary.host_port(), "q2"); ps2.send("x") self.assert_browse_backup(backup, "q2", ["x"]) def test_queue_replica_failover(self): """Test individual queue replication from a cluster to a standalone backup broker, verify it fails over.""" getLogger().setLevel(ERROR) # Hide expected WARNING log messages from failover. cluster = HaCluster(self, 2) primary = cluster[0] pc = cluster.connect(0) ps = pc.session().sender("q;{create:always,%s}"%qr_node("all")) pr = pc.session().receiver("q;{create:always,%s}"%qr_node("all")) backup = HaBroker(self, name="backup", ha_cluster=False, args=["--log-enable=debug+"]) br = backup.connect().session().receiver("q;{create:always}") backup.replicate(cluster.url, "q") ps.send("a") self.assert_browse_backup(backup, "q", ["a"]) cluster.bounce(0) self.assert_browse_backup(backup, "q", ["a"]) ps.send("b") self.assert_browse_backup(backup, "q", ["a", "b"]) cluster.bounce(1) self.assertEqual("a", pr.fetch().content) pr.session.acknowledge() self.assert_browse_backup(backup, "q", ["b"]) def test_lvq(self): """Verify that we replicate to an LVQ correctly""" primary = HaBroker(self, name="primary") primary.promote() backup = HaBroker(self, name="backup", broker_url=primary.host_port()) s = primary.connect().session().sender("lvq; {create:always, node:{x-declare:{arguments:{'qpid.last_value_queue_key':lvq-key, 'qpid.replicate':all}}}}") def send(key,value): s.send(Message(content=value,properties={"lvq-key":key})) for kv in [("a","a-1"),("b","b-1"),("a","a-2"),("a","a-3"),("c","c-1"),("c","c-2")]: send(*kv) self.assert_browse_backup(backup, "lvq", ["b-1", "a-3", "c-2"]) send("b","b-2") self.assert_browse_backup(backup, "lvq", ["a-3", "c-2", "b-2"]) send("c","c-3") self.assert_browse_backup(backup, "lvq", ["a-3", "b-2", "c-3"]) send("d","d-1") self.assert_browse_backup(backup, "lvq", ["a-3", "b-2", "c-3", "d-1"]) def test_ring(self): primary = HaBroker(self, name="primary") primary.promote() backup = HaBroker(self, name="backup", broker_url=primary.host_port()) s = primary.connect().session().sender("q; {create:always, node:{x-declare:{arguments:{'qpid.policy_type':ring, 'qpid.max_count':5, 'qpid.replicate':all}}}}") for i in range(10): s.send(Message(str(i))) self.assert_browse_backup(backup, "q", [str(i) for i in range(5,10)]) def test_reject(self): getLogger().setLevel(ERROR) # Hide expected WARNING log messages from failover. primary = HaBroker(self, name="primary") primary.promote() backup = HaBroker(self, name="backup", broker_url=primary.host_port()) s = primary.connect().session().sender("q; {create:always, node:{x-declare:{arguments:{'qpid.policy_type':reject, 'qpid.max_count':5, 'qpid.replicate':all}}}}") try: for i in range(10): s.send(Message(str(i)), sync=False) except qpid.messaging.exceptions.TargetCapacityExceeded: pass self.assert_browse_backup(backup, "q", [str(i) for i in range(0,5)]) def test_priority(self): """Verify priority queues replicate correctly""" primary = HaBroker(self, name="primary") primary.promote() backup = HaBroker(self, name="backup", broker_url=primary.host_port()) session = primary.connect().session() s = session.sender("priority-queue; {create:always, node:{x-declare:{arguments:{'qpid.priorities':10, 'qpid.replicate':all}}}}") priorities = [8,9,5,1,2,2,3,4,9,7,8,9,9,2] for p in priorities: s.send(Message(priority=p)) # Can't use browse_backup as browser sees messages in delivery order not priority. self.wait_backup(backup, "priority-queue") r = self.connect_admin(backup).session().receiver("priority-queue") received = [r.fetch().priority for i in priorities] self.assertEqual(sorted(priorities, reverse=True), received) def test_priority_fairshare(self): """Verify priority queues replicate correctly""" primary = HaBroker(self, name="primary") primary.promote() backup = HaBroker(self, name="backup", broker_url=primary.host_port()) session = primary.connect().session() levels = 8 priorities = [4,5,3,7,8,8,2,8,2,8,8,16,6,6,6,6,6,6,8,3,5,8,3,5,5,3,3,8,8,3,7,3,7,7,7,8,8,8,2,3] limits={7:0,6:4,5:3,4:2,3:2,2:2,1:2} limit_policy = ",".join(["'qpid.fairshare':5"] + ["'qpid.fairshare-%s':%s"%(i[0],i[1]) for i in limits.iteritems()]) s = session.sender("priority-queue; {create:always, node:{x-declare:{arguments:{'qpid.priorities':%s, %s, 'qpid.replicate':all}}}}"%(levels,limit_policy)) messages = [Message(content=str(uuid4()), priority = p) for p in priorities] for m in messages: s.send(m) self.wait_backup(backup, s.target) r = self.connect_admin(backup).session().receiver("priority-queue") received = [r.fetch().content for i in priorities] sort = sorted(messages, key=lambda m: priority_level(m.priority, levels), reverse=True) fair = [m.content for m in fairshare(sort, lambda l: limits.get(l,0), levels)] self.assertEqual(received, fair) def test_priority_ring(self): primary = HaBroker(self, name="primary") primary.promote() backup = HaBroker(self, name="backup", broker_url=primary.host_port()) s = primary.connect().session().sender("q; {create:always, node:{x-declare:{arguments:{'qpid.policy_type':ring, 'qpid.max_count':5, 'qpid.priorities':10, 'qpid.replicate':all}}}}") priorities = [8,9,5,1,2,2,3,4,9,7,8,9,9,2] for p in priorities: s.send(Message(priority=p)) # FIXME aconway 2012-02-22: there is a bug in priority ring queues that allows a low # priority message to displace a high one. The following commented-out assert_browse # is for the correct result, the uncommented one is for the actualy buggy result. # See https://issues.apache.org/jira/browse/QPID-3866 # # self.assert_browse_backup(backup, "q", sorted(priorities,reverse=True)[0:5], transform=lambda m: m.priority) self.assert_browse_backup(backup, "q", [9,9,9,9,2], transform=lambda m: m.priority) def fairshare(msgs, limit, levels): """ Generator to return prioritised messages in expected order for a given fairshare limit """ count = 0 last_priority = None postponed = [] while msgs or postponed: if not msgs: msgs = postponed count = 0 last_priority = None postponed = [] msg = msgs.pop(0) if last_priority and priority_level(msg.priority, levels) == last_priority: count += 1 else: last_priority = priority_level(msg.priority, levels) count = 1 l = limit(last_priority) if (l and count > l): postponed.append(msg) else: yield msg return def priority_level(value, levels): """ Method to determine which of a distinct number of priority levels a given value falls into. """ offset = 5-math.ceil(levels/2.0) return min(max(value - offset, 0), levels-1) class LongTests(BrokerTest): """Tests that can run for a long time if -DDURATION= is set""" def duration(self): d = self.config.defines.get("DURATION") if d: return float(d)*60 else: return 3 # Default is to be quick def disable_test_failover(self): """Test failover with continuous send-receive""" # FIXME aconway 2012-02-03: fails due to dropped messages, # known issue: sending messages to new primary before # backups are ready. Enable when fixed. # Start a cluster, all members will be killed during the test. brokers = [ HaBroker(self, name=name, expect=EXPECT_EXIT_FAIL) for name in ["ha0","ha1","ha2"] ] url = ",".join([b.host_port() for b in brokers]) for b in brokers: b.set_broker_url(url) brokers[0].promote() # Start sender and receiver threads sender = NumberedSender(brokers[0], max_depth=1000, failover_updates=False) receiver = NumberedReceiver(brokers[0], sender=sender, failover_updates=False) receiver.start() sender.start() # Wait for sender & receiver to get up and running assert retry(lambda: receiver.received > 100) # Kill and restart brokers in a cycle: endtime = time.time() + self.duration() i = 0 while time.time() < endtime or i < 3: # At least 3 iterations sender.sender.assert_running() receiver.receiver.assert_running() port = brokers[i].port() brokers[i].kill() brokers.append( HaBroker(self, name="ha%d"%(i+3), broker_url=url, port=port, expect=EXPECT_EXIT_FAIL)) i += 1 brokers[i].promote() n = receiver.received # Verify we're still running def enough(): receiver.check() # Verify no exceptions return receiver.received > n + 100 assert retry(enough, timeout=5) sender.stop() receiver.stop() for b in brokers[i:]: b.kill() if __name__ == "__main__": shutil.rmtree("brokertest.tmp", True) qpid_ha = os.getenv("QPID_HA_EXEC") if qpid_ha and os.path.exists(qpid_ha): os.execvp("qpid-python-test", ["qpid-python-test", "-m", "ha_tests"] + sys.argv[1:]) else: print "Skipping ha_tests, qpid_ha not available" qpidc-0.16/src/tests/run_federation_tests0000775000076400007640000000431311675733206021254 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the federation tests. source ./test_env.sh #set -x trap stop_brokers INT TERM QUIT if [ -f ../.libs/xml.so ] ; then MODULES="--load-module xml" # Load the XML exchange and run XML exchange federation tests SKIPTESTS= else MODULES="--no-module-dir" SKIPTESTS='-i *_xml' # note: single quotes prevent expansion of * fi start_brokers() { ../qpidd --daemon --port 0 --no-data-dir $MODULES --auth no > qpidd.port LOCAL_PORT=`cat qpidd.port` ../qpidd --daemon --port 0 --no-data-dir $MODULES --auth no > qpidd.port REMOTE_PORT=`cat qpidd.port` ../qpidd --daemon --port 0 --no-data-dir $MODULES --auth no > qpidd.port REMOTE_B1=`cat qpidd.port` ../qpidd --daemon --port 0 --no-data-dir $MODULES --auth no > qpidd.port REMOTE_B2=`cat qpidd.port` } stop_brokers() { $QPIDD_EXEC $MODULES -q --port $LOCAL_PORT $QPIDD_EXEC $MODULES -q --port $REMOTE_PORT $QPIDD_EXEC $MODULES -q --port $REMOTE_B1 $QPIDD_EXEC $MODULES -q --port $REMOTE_B2 } if test -d ${PYTHON_DIR} ; then start_brokers echo "Running federation tests using brokers on ports $LOCAL_PORT $REMOTE_PORT $REMOTE_B1 $REMOTE_B2" $QPID_PYTHON_TEST -m federation ${SKIPTESTS} -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dextra-brokers="$REMOTE_B1 $REMOTE_B2" $@ RETCODE=$? stop_brokers if test x$RETCODE != x0; then echo "FAIL federation tests"; exit 1; fi fi qpidc-0.16/src/tests/ConsoleTest.cpp0000664000076400007640000000301011252003060020012 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/Package.h" #include "qpid/console/ClassKey.h" #include "unit_test.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ConsoleTestSuite) using namespace qpid::framing; using namespace qpid::console; QPID_AUTO_TEST_CASE(testClassKey) { uint8_t hash[16] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; ClassKey k("com.redhat.test", "class", hash); BOOST_CHECK_EQUAL(k.getPackageName(), "com.redhat.test"); BOOST_CHECK_EQUAL(k.getClassName(), "class"); BOOST_CHECK_EQUAL(k.getHashString(), "00010203-04050607-08090a0b-0c0d0e0f"); BOOST_CHECK_EQUAL(k.str(), "com.redhat.test:class(00010203-04050607-08090a0b-0c0d0e0f)"); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/run_federation_sys_tests0000775000076400007640000000736411611360622022147 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the federation system tests. source ./test_env.sh MODULENAME=federation_sys # Test for clustering ps -u root | grep 'aisexec\|corosync' > /dev/null if (( $? == 0 )); then CLUSTERING_ENABLED=1 else echo "WARNING: No clustering detected; tests using it will be ignored." fi # Test for long test if [[ "$1" == "LONG_TEST" ]]; then USE_LONG_TEST=1 shift # get rid of this param so it is not treated as a test name fi trap stop_brokers INT TERM QUIT SKIPTESTS="-i federation_sys.E_* -i federation_sys.F_* -i federation_sys.G_* -i federation_sys.H_*" if [ -z ${USE_LONG_TEST} ]; then SKIPTESTS="-i federation_sys.A_Long* -i federation_sys.B_Long* ${SKIPTESTS}" fi echo "WARNING: Tests using persistence will be ignored." if [ -z ${CLUSTERING_ENABLED} ]; then SKIPTESTS="${SKIPTESTS} -i federation_sys.C_* -i federation_sys.D_*" elif [ -z ${USE_LONG_TEST} ]; then SKIPTESTS="${SKIPTESTS} -i federation_sys.C_Long* -i federation_sys.D_Long*" fi start_brokers() { start_broker() { ${QPIDD_EXEC} --daemon --port 0 --auth no --no-data-dir $1 > qpidd.port PORT=`cat qpidd.port` eval "$2=${PORT}" } start_broker "" LOCAL_PORT start_broker "" REMOTE_PORT if [ -n "${CLUSTERING_ENABLED}" ]; then start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-1" CLUSTER_C1_1 start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-1" CLUSTER_C1_2 start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-2" CLUSTER_C2_1 start_broker "--load-module ${CLUSTER_LIB} --cluster-name test-cluster-2" CLUSTER_C2_2 fi rm qpidd.port } stop_brokers() { ${QPIDD_EXEC} -q --port ${LOCAL_PORT} ${QPIDD_EXEC} -q --port ${REMOTE_PORT} if [ -n "${CLUSTERING_ENABLED}" ]; then ${QPID_CLUSTER_EXEC} --all-stop --force localhost:${CLUSTER_C1_1} ${QPID_CLUSTER_EXEC} --all-stop --force localhost:${CLUSTER_C2_1} fi } if test -d ${PYTHON_DIR} ; then start_brokers if [ -z ${CLUSTERING_ENABLED} ]; then echo "Running federation tests using brokers on local port ${LOCAL_PORT}, remote port ${REMOTE_PORT} (NOTE: clustering is DISABLED)" else echo "Running federation tests using brokers on local port ${LOCAL_PORT}, remote port ${REMOTE_PORT}, local cluster nodes ${CLUSTER_C1_1} ${CLUSTER_C1_2}, remote cluster nodes ${CLUSTER_C2_1} ${CLUSTER_C2_2}" fi if [ -z ${USE_LONG_TEST} ]; then echo "NOTE: To run a full set of federation system tests, use \"make check-long\". To test with persistence, run the store version of this script." fi ${QPID_PYTHON_TEST} -m ${MODULENAME} ${SKIPTESTS} -b localhost:${REMOTE_PORT} -Dlocal-port=${LOCAL_PORT} -Dremote-port=${REMOTE_PORT} -Dlocal-cluster-ports="${CLUSTER_C1_1} ${CLUSTER_C1_2}" -Dremote-cluster-ports="${CLUSTER_C2_1} ${CLUSTER_C2_2}" $@ RETCODE=$? stop_brokers if test x${RETCODE} != x0; then echo "FAIL federation tests"; exit 1; fi fi qpidc-0.16/src/tests/qpid-topic-publisher.cpp0000664000076400007640000002007611376517702021653 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * This file provides one half of a test and example of a pub-sub * style of interaction. See qpid-topic-listener.cpp for the other half, in * which the logic for subscribers is defined. * * This file contains the publisher logic. The publisher will send a * number of messages to the exchange with the appropriate routing key * for the logical 'topic'. Once it has done this it will then send a * request that each subscriber report back with the number of message * it has received and the time that elapsed between receiving the * first one and receiving the report request. Once the expected * number of reports are received, it sends out a request that each * subscriber shutdown. */ #include "TestOptions.h" #include "qpid/client/Connection.h" #include "qpid/client/MessageListener.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Time.h" #include #include using namespace qpid; using namespace qpid::client; using namespace qpid::sys; using namespace std; namespace qpid { namespace tests { /** * The publishing logic is defined in this class. It implements * message listener and can therfore be used to receive messages sent * back by the subscribers. */ class Publisher { AsyncSession session; SubscriptionManager mgr; LocalQueue queue; const string controlTopic; const bool transactional; const bool durable; string generateData(int size); public: Publisher(const AsyncSession& session, const string& controlTopic, bool tx, bool durable); int64_t publish(int msgs, int listeners, int size); void terminate(); }; /** * A utility class for managing the options passed in to the test */ struct Args : public TestOptions { int messages; int subscribers; bool transactional; bool durable; int batches; int delay; int size; string statusqueue; Args() : messages(1000), subscribers(1), transactional(false), durable(false), batches(1), delay(0), size(256) { addOptions() ("messages", optValue(messages, "N"), "how many messages to send") ("subscribers", optValue(subscribers, "N"), "how many subscribers to expect reports from") ("transactional", optValue(transactional), "client should use transactions") ("durable", optValue(durable), "messages should be durable") ("batches", optValue(batches, "N"), "how many batches to run") ("delay", optValue(delay, "SECONDS"), "Causes a delay between each batch") ("size", optValue(size, "BYTES"), "size of the published messages") ("status-queue", optValue(statusqueue, "QUEUE-NAME"), "Message queue to read status messages from"); } }; Publisher::Publisher(const AsyncSession& _session, const string& _controlTopic, bool tx, bool d) : session(_session), mgr(session), controlTopic(_controlTopic), transactional(tx), durable(d) { mgr.subscribe(queue, "response"); } int64_t Publisher::publish(int msgs, int listeners, int size){ Message msg(generateData(size), controlTopic); if (durable) { msg.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); } AbsTime start = now(); for(int i = 0; i < msgs; i++){ session.messageTransfer(arg::content=msg, arg::destination="amq.topic", arg::acceptMode=1); } //send report request Message reportRequest("", controlTopic); reportRequest.getHeaders().setString("TYPE", "REPORT_REQUEST"); session.messageTransfer(arg::content=reportRequest, arg::destination="amq.topic", arg::acceptMode=1); if(transactional){ sync(session).txCommit(); } //wait for a response from each listener (TODO, could log these) for (int i = 0; i < listeners; i++) { Message report = queue.pop(); } if(transactional){ sync(session).txCommit(); } AbsTime finish = now(); return Duration(start, finish); } string Publisher::generateData(int size){ string data; for(int i = 0; i < size; i++){ data += ('A' + (i / 26)); } return data; } void Publisher::terminate(){ //send termination request Message terminationRequest("", controlTopic); terminationRequest.getHeaders().setString("TYPE", "TERMINATION_REQUEST"); session.messageTransfer(arg::content=terminationRequest, arg::destination="amq.topic", arg::acceptMode=1); if(transactional){ session.txCommit(); } } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { try{ Args args; args.parse(argc, argv); if(args.help) cout << args << endl; else { Connection connection; args.open(connection); AsyncSession session = connection.newSession(); // If status-queue is defined, wait for all expected listeners to join in before we start if( args.statusqueue.length() > 0 ) { cout << "Waiting for " << args.subscribers << " listeners..." << endl; SubscriptionManager statusSubs(session); LocalQueue statusQ; statusSubs.subscribe(statusQ, args.statusqueue); for (int i = 0; i < args.subscribers; i++) { Message m = statusQ.get(); if( m.getData().find("topic_listener: ", 0) == 0 ) { cout << "Listener " << (i+1) << " of " << args.subscribers << " is ready (pid " << m.getData().substr(16, m.getData().length() - 16) << ")" << endl; } else { throw Exception(QPID_MSG("Unexpected message received on status queue: " << m.getData())); } } } if (args.transactional) { session.txSelect(); } session.queueDeclare(arg::queue="response"); session.exchangeBind(arg::exchange="amq.direct", arg::queue="response", arg::bindingKey="response"); Publisher publisher(session, "topic_control", args.transactional, args.durable); int batchSize(args.batches); int64_t max(0); int64_t min(0); int64_t sum(0); for(int i = 0; i < batchSize; i++){ if(i > 0 && args.delay) qpid::sys::sleep(args.delay); int64_t msecs = publisher.publish(args.messages, args.subscribers, args.size) / TIME_MSEC; if(!max || msecs > max) max = msecs; if(!min || msecs < min) min = msecs; sum += msecs; cout << "Completed " << (i+1) << " of " << batchSize << " in " << msecs << "ms" << endl; } publisher.terminate(); int64_t avg = sum / batchSize; if(batchSize > 1){ cout << batchSize << " batches completed. avg=" << avg << ", max=" << max << ", min=" << min << endl; } session.close(); connection.close(); } return 0; }catch(exception& error) { cout << error.what() << endl; } return 1; } qpidc-0.16/src/tests/sasl_fed_ex_route_cluster0000775000076400007640000000161511540546671022262 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh source ${srcdir}/ais_check with_ais_group ${srcdir}/sasl_fed_ex route cluster qpidc-0.16/src/tests/run_long_federation_sys_tests0000664000076400007640000000160111611360622023147 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the federation system tests (long version). ./run_federation_sys_tests LONG_TEST $@ qpidc-0.16/src/tests/StoreStatus.cpp0000664000076400007640000000613011355156410020072 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "qpid/cluster/StoreStatus.h" #include "qpid/framing/Uuid.h" #include #include using namespace std; using namespace qpid::cluster; using namespace qpid::framing; using namespace qpid::framing::cluster; using namespace boost::assign; using namespace boost::filesystem; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(StoreStatusTestSuite) const char* TEST_DIR = "StoreStatus.tmp"; struct TestDir { TestDir() { remove_all(TEST_DIR); create_directory(TEST_DIR); } ~TestDir() { remove_all(TEST_DIR); } }; QPID_AUTO_TEST_CASE(testLoadEmpty) { TestDir td; StoreStatus ss(TEST_DIR); BOOST_CHECK_EQUAL(ss.getState(), STORE_STATE_NO_STORE); BOOST_CHECK(!ss.getClusterId()); BOOST_CHECK(!ss.getShutdownId()); ss.load(); BOOST_CHECK_EQUAL(ss.getState(), STORE_STATE_EMPTY_STORE); BOOST_CHECK(!ss.getShutdownId()); } QPID_AUTO_TEST_CASE(testSaveLoadDirty) { TestDir td; Uuid clusterId = Uuid(true); StoreStatus ss(TEST_DIR); ss.load(); ss.setClusterId(clusterId); ss.dirty(); BOOST_CHECK_EQUAL(ss.getState(), STORE_STATE_DIRTY_STORE); StoreStatus ss2(TEST_DIR); ss2.load(); BOOST_CHECK_EQUAL(ss2.getState(), STORE_STATE_DIRTY_STORE); BOOST_CHECK_EQUAL(ss2.getClusterId(), clusterId); BOOST_CHECK(!ss2.getShutdownId()); } QPID_AUTO_TEST_CASE(testSaveLoadClean) { TestDir td; Uuid clusterId = Uuid(true); Uuid shutdownId = Uuid(true); StoreStatus ss(TEST_DIR); ss.load(); ss.setClusterId(clusterId); ss.clean(shutdownId); BOOST_CHECK_EQUAL(ss.getState(), STORE_STATE_CLEAN_STORE); StoreStatus ss2(TEST_DIR); ss2.load(); BOOST_CHECK_EQUAL(ss2.getState(), STORE_STATE_CLEAN_STORE); BOOST_CHECK_EQUAL(ss2.getClusterId(), clusterId); BOOST_CHECK_EQUAL(ss2.getShutdownId(), shutdownId); } QPID_AUTO_TEST_CASE(testMarkDirty) { // Save clean then mark to dirty. TestDir td; Uuid clusterId = Uuid(true); Uuid shutdownId = Uuid(true); StoreStatus ss(TEST_DIR); ss.load(); ss.setClusterId(clusterId); ss.dirty(); ss.clean(shutdownId); ss.dirty(); StoreStatus ss2(TEST_DIR); ss2.load(); BOOST_CHECK_EQUAL(ss2.getState(), STORE_STATE_DIRTY_STORE); BOOST_CHECK_EQUAL(ss2.getClusterId(), clusterId); BOOST_CHECK(!ss2.getShutdownId()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/TimerTest.cpp0000664000076400007640000000701011564625557017527 0ustar00jrossjross00000000000000 /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Timer.h" #include "qpid/sys/Monitor.h" #include "unit_test.h" #include #include #include #include #include using namespace qpid::sys; using boost::intrusive_ptr; using boost::dynamic_pointer_cast; namespace qpid { namespace tests { class Counter { Mutex lock; uint counter; public: Counter() : counter(0) {} uint next() { Mutex::ScopedLock l(lock); return ++counter; } }; class TestTask : public TimerTask { const AbsTime start; const Duration expected; AbsTime end; bool fired; uint position; Monitor monitor; Counter& counter; public: TestTask(Duration timeout, Counter& _counter) : TimerTask(timeout, "Test"), start(now()), expected(timeout), end(start), fired(false), counter(_counter) {} void fire() { Monitor::ScopedLock l(monitor); fired = true; position = counter.next(); end = now(); monitor.notify(); } void check(uint expected_position, uint64_t tolerance = 500 * TIME_MSEC) { Monitor::ScopedLock l(monitor); BOOST_CHECK(fired); BOOST_CHECK_EQUAL(expected_position, position); Duration actual(start, end); #ifdef _MSC_VER uint64_t difference = _abs64(expected - actual); #elif defined(_WIN32) uint64_t difference = labs(expected - actual); #else uint64_t difference = abs(expected - actual); #endif std::string msg(boost::lexical_cast(boost::format("tolerance = %1%, difference = %2%") % tolerance % difference)); BOOST_CHECK_MESSAGE(difference < tolerance, msg); } void wait(Duration d) { Monitor::ScopedLock l(monitor); monitor.wait(AbsTime(now(), d)); } }; class DummyRunner : public Runnable { public: void run() {} }; QPID_AUTO_TEST_SUITE(TimerTestSuite) QPID_AUTO_TEST_CASE(testGeneral) { Counter counter; Timer timer; intrusive_ptr task1(new TestTask(Duration(3 * TIME_SEC), counter)); intrusive_ptr task2(new TestTask(Duration(1 * TIME_SEC), counter)); intrusive_ptr task3(new TestTask(Duration(4 * TIME_SEC), counter)); intrusive_ptr task4(new TestTask(Duration(2 * TIME_SEC), counter)); timer.add(task1); timer.add(task2); timer.add(task3); timer.add(task4); dynamic_pointer_cast(task3)->wait(Duration(6 * TIME_SEC)); dynamic_pointer_cast(task1)->check(3); dynamic_pointer_cast(task2)->check(1); dynamic_pointer_cast(task3)->check(4); dynamic_pointer_cast(task4)->check(2); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/MessageTest.cpp0000664000076400007640000000655311252003060020013 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Message.h" #include "qpid/framing/AMQP_HighestVersion.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/FieldValue.h" #include "qpid/framing/Uuid.h" #include "qpid/sys/alloca.h" #include "unit_test.h" #include using namespace qpid::broker; using namespace qpid::framing; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(MessageTestSuite) QPID_AUTO_TEST_CASE(testEncodeDecode) { string exchange = "MyExchange"; string routingKey = "MyRoutingKey"; Uuid messageId(true); string data1("abcdefg"); string data2("hijklmn"); boost::intrusive_ptr msg(new Message()); AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0))); AMQFrame header((AMQHeaderBody())); AMQFrame content1((AMQContentBody(data1))); AMQFrame content2((AMQContentBody(data2))); msg->getFrames().append(method); msg->getFrames().append(header); msg->getFrames().append(content1); msg->getFrames().append(content2); MessageProperties* mProps = msg->getFrames().getHeaders()->get(true); mProps->setContentLength(data1.size() + data2.size()); mProps->setMessageId(messageId); FieldTable applicationHeaders; applicationHeaders.setString("abc", "xyz"); mProps->setApplicationHeaders(applicationHeaders); DeliveryProperties* dProps = msg->getFrames().getHeaders()->get(true); dProps->setRoutingKey(routingKey); dProps->setDeliveryMode(PERSISTENT); BOOST_CHECK(msg->isPersistent()); char* buff = static_cast(::alloca(msg->encodedSize())); Buffer wbuffer(buff, msg->encodedSize()); msg->encode(wbuffer); Buffer rbuffer(buff, msg->encodedSize()); msg = new Message(); msg->decodeHeader(rbuffer); msg->decodeContent(rbuffer); BOOST_CHECK_EQUAL(exchange, msg->getExchangeName()); BOOST_CHECK_EQUAL(routingKey, msg->getRoutingKey()); BOOST_CHECK_EQUAL((uint64_t) data1.size() + data2.size(), msg->contentSize()); BOOST_CHECK_EQUAL((uint64_t) data1.size() + data2.size(), msg->getProperties()->getContentLength()); BOOST_CHECK_EQUAL(messageId, msg->getProperties()->getMessageId()); BOOST_CHECK_EQUAL(string("xyz"), msg->getProperties()->getApplicationHeaders().getAsString("abc")); BOOST_CHECK_EQUAL((uint8_t) PERSISTENT, msg->getProperties()->getDeliveryMode()); BOOST_CHECK(msg->isPersistent()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/test_store.cpp0000664000076400007640000001330111310530721017753 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /**@file * Plug-in message store for tests. * * Add functionality as required, build up a comprehensive set of * features to support persistent behavior tests. * * Current features special "action" messages can: * - raise exception from enqueue. * - force host process to exit. * - do async completion after a delay. */ #include "qpid/broker/NullMessageStore.h" #include "qpid/broker/Broker.h" #include "qpid/framing/AMQFrame.h" #include "qpid/log/Statement.h" #include "qpid/Plugin.h" #include "qpid/Options.h" #include #include #include #include using namespace qpid; using namespace broker; using namespace std; using namespace qpid::sys; namespace qpid { namespace tests { struct TestStoreOptions : public Options { string name; string dump; TestStoreOptions() : Options("Test Store Options") { addOptions() ("test-store-name", optValue(name, "NAME"), "Name of test store instance.") ("test-store-dump", optValue(dump, "FILE"), "File to dump enqueued messages.") ; } }; struct Completer : public Runnable { boost::intrusive_ptr message; int usecs; Completer(boost::intrusive_ptr m, int u) : message(m), usecs(u) {} void run() { qpid::sys::usleep(usecs); message->enqueueComplete(); delete this; } }; class TestStore : public NullMessageStore { public: TestStore(const TestStoreOptions& opts, Broker& broker_) : options(opts), name(opts.name), broker(broker_) { QPID_LOG(info, "TestStore name=" << name << " dump=" << options.dump); if (!options.dump.empty()) dump.reset(new ofstream(options.dump.c_str())); } ~TestStore() { for_each(threads.begin(), threads.end(), boost::bind(&Thread::join, _1)); } virtual bool isNull() const { return false; } void enqueue(TransactionContext* , const boost::intrusive_ptr& pmsg, const PersistableQueue& ) { Message* msg = dynamic_cast(pmsg.get()); assert(msg); // Dump the message if there is a dump file. if (dump.get()) { msg->getFrames().getMethod()->print(*dump); *dump << endl << " "; msg->getFrames().getHeaders()->print(*dump); *dump << endl << " "; *dump << msg->getFrames().getContentSize() << endl; } // Check the message for special instructions. string data = msg->getFrames().getContent(); size_t i = string::npos; size_t j = string::npos; if (strncmp(data.c_str(), TEST_STORE_DO.c_str(), strlen(TEST_STORE_DO.c_str())) == 0 && (i = data.find(name+"[")) != string::npos && (j = data.find("]", i)) != string::npos) { size_t start = i+name.size()+1; string action = data.substr(start, j-start); if (action == EXCEPTION) { throw Exception(QPID_MSG("TestStore " << name << " throwing exception for: " << data)); } else if (action == EXIT_PROCESS) { // FIXME aconway 2009-04-10: this is a dubious way to // close the process at best, it can cause assertions or seg faults // rather than clean exit. QPID_LOG(critical, "TestStore " << name << " forcing process exit for: " << data); exit(0); } else if (strncmp(action.c_str(), ASYNC.c_str(), strlen(ASYNC.c_str())) == 0) { std::string delayStr(action.substr(ASYNC.size())); int delay = boost::lexical_cast(delayStr); threads.push_back(Thread(*new Completer(msg, delay))); } else { QPID_LOG(error, "TestStore " << name << " unknown action " << action); msg->enqueueComplete(); } } else msg->enqueueComplete(); } private: static const string TEST_STORE_DO, EXCEPTION, EXIT_PROCESS, ASYNC; TestStoreOptions options; string name; Broker& broker; vector threads; std::auto_ptr dump; }; const string TestStore::TEST_STORE_DO = "TEST_STORE_DO: "; const string TestStore::EXCEPTION = "exception"; const string TestStore::EXIT_PROCESS = "exit_process"; const string TestStore::ASYNC="async "; struct TestStorePlugin : public Plugin { TestStoreOptions options; Options* getOptions() { return &options; } void earlyInitialize (Plugin::Target& target) { Broker* broker = dynamic_cast(&target); if (!broker) return; boost::shared_ptr p(new TestStore(options, *broker)); broker->setStore (p); } void initialize(qpid::Plugin::Target&) {} }; static TestStorePlugin pluginInstance; }} // namespace qpid::tests qpidc-0.16/src/tests/fanout_perftest0000775000076400007640000000157011654250703020231 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # exec `dirname $0`/run_perftest 10000 --mode fanout --npubs 16 --nsubs 16 --size 64 qpidc-0.16/src/tests/sasl_test_setup.sh0000775000076400007640000000262111631672433020654 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # SASL_PW=/usr/sbin/saslpasswd2 test -x $SASL_PW || { echo Skipping SASL test, saslpasswd2 not found; exit 0; } mkdir -p sasl_config # Create configuration file. cat > sasl_config/qpidd.conf < qpidd-repl.port BROKER_A=`cat qpidd-repl.port` $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATION_EXCHANGE_LIB --log-enable info+ --log-to-file replication-dest.log --log-to-stderr 0 > qpidd-repl.port BROKER_B=`cat qpidd-repl.port` echo "Testing replication from port $BROKER_A to port $BROKER_B" $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add exchange replication replication $PYTHON_COMMANDS/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication #create test queue (only replicate enqueues for this test): $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add queue queue-a --generate-queue-events 1 $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add queue queue-a } send() { ./sender --port $BROKER_A --routing-key queue-a --send-eos 1 < replicated.expected } receive() { rm -f replicated.actual ./receiver --port $BROKER_B --queue queue-a > replicated.actual } bounce_link() { $PYTHON_COMMANDS/qpid-route link del "localhost:$BROKER_B" "localhost:$BROKER_A" $PYTHON_COMMANDS/qpid-route --ack 500 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication } if test -d ${PYTHON_DIR} && test -e $REPLICATING_LISTENER_LIB && test -e $REPLICATION_EXCHANGE_LIB ; then setup for i in `seq 1 100000`; do echo Message $i; done > replicated.expected send & receive & for i in `seq 1 3`; do sleep 1; bounce_link; done; wait #check that received list is identical to sent list diff replicated.actual replicated.expected || exit 1 rm -f replication.actual replication.expected replication-source.log replication-dest.log qpidd-repl.port true fi qpidc-0.16/src/tests/topictest0000775000076400007640000000323011376517702017040 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the C++ topic test # Clean up old log files rm -f subscriber_*.log # Defaults values SUBSCRIBERS=10 MESSAGES=2000 BATCHES=10 while getopts "s:m:b:h:t" opt ; do case $opt in s) SUBSCRIBERS=$OPTARG ;; m) MESSAGES=$OPTARG ;; b) BATCHES=$OPTARG ;; h) HOST=-h$OPTARG ;; t) TRANSACTIONAL="--transactional --durable" ;; ?) echo "Usage: %0 [-s ] [-m ]" exit 1 ;; esac done subscribe() { echo Start subscriber $1 LOG="subscriber_$1.log" ./qpid-topic-listener $TRANSACTIONAL > $LOG 2>&1 && rm -f $LOG } publish() { ./qpid-topic-publisher --messages $MESSAGES --batches $BATCHES --subscribers $SUBSCRIBERS $HOST $TRANSACTIONAL } for ((i=$SUBSCRIBERS ; i--; )); do subscribe $i & done # FIXME aconway 2007-03-27: Hack around startup race. Fix topic test. sleep 2 publish 2>&1 || exit 1 qpidc-0.16/src/tests/long_cluster_tests.py0000775000076400007640000000247411224720215021367 0ustar00jrossjross00000000000000#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import os, signal, sys, unittest from testlib import TestBaseCluster class LongClusterTests(TestBaseCluster): """Long/Soak cluster tests with async store ability""" def test_LongCluster_01_DummyTest(self): """Dummy test - a placeholder for the first of the long/soak python cluster tests""" pass # Start the test here if __name__ == '__main__': if os.getenv("STORE_LIB") != None: print "NOTE: Store enabled for the following tests:" if not unittest.main(): sys.exit(1) qpidc-0.16/src/tests/Statistics.h0000664000076400007640000000541511363610120017366 0ustar00jrossjross00000000000000#ifndef TESTS_STATISTICS_H #define TESTS_STATISTICS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include namespace qpid { namespace messaging { class Message; } namespace tests { class Statistic { public: virtual ~Statistic(); virtual void message(const messaging::Message&) = 0; virtual void report(std::ostream&) const = 0; virtual void header(std::ostream&) const = 0; }; class Throughput : public Statistic { public: Throughput(); virtual void message(const messaging::Message&); virtual void report(std::ostream&) const; virtual void header(std::ostream&) const; protected: int messages; private: bool started; sys::AbsTime start; }; class ThroughputAndLatency : public Throughput { public: ThroughputAndLatency(); virtual void message(const messaging::Message&); virtual void report(std::ostream&) const; virtual void header(std::ostream&) const; private: double total, min, max; // Milliseconds int samples; }; /** Report batch and overall statistics */ class ReporterBase { public: virtual ~ReporterBase(); /** Count message in the statistics */ void message(const messaging::Message& m); /** Print overall report. */ void report(); protected: ReporterBase(std::ostream& o, int batchSize, bool wantHeader); virtual std::auto_ptr create() = 0; private: void header(); void report(const Statistic& s); std::auto_ptr overall; std::auto_ptr batch; int batchSize, batchCount; bool stopped, headerPrinted; std::ostream& out; }; template class Reporter : public ReporterBase { public: Reporter(std::ostream& o, int batchSize, bool wantHeader) : ReporterBase(o, batchSize, wantHeader) {} virtual std::auto_ptr create() { return std::auto_ptr(new Stats); } }; }} // namespace qpid::tests #endif /*!TESTS_STATISTICS_H*/ qpidc-0.16/src/tests/exception_test.cpp0000664000076400007640000000756211623224255020642 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "BrokerFixture.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/MessageListener.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Thread.h" #include "qpid/framing/reply_exceptions.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(exception_test) // FIXME aconway 2008-06-12: need to update our exception handling to // 0-10 handling and extend this test to provoke all the exceptional // conditions we know of and verify the correct exception is thrown. using namespace std; using namespace qpid; using namespace sys; using namespace client; using namespace framing; using qpid::broker::Broker; using boost::bind; using boost::function; template struct Catcher : public Runnable { function f; bool caught; Thread thread; Catcher(function f_) : f(f_), caught(false), thread(this) {} ~Catcher() { join(); } void run() { try { ScopedSuppressLogging sl; // Suppress messages for expected errors. f(); } catch(const Ex& e) { caught=true; BOOST_MESSAGE(string("Caught expected exception: ")+e.what()+"["+typeid(e).name()+"]"); } catch(const std::exception& e) { BOOST_ERROR(string("Bad exception: ")+e.what()+"["+typeid(e).name()+"] expected: "+typeid(Ex).name()); } catch(...) { BOOST_ERROR(string("Bad exception: unknown")); } } bool join() { if (thread) { thread.join(); thread=Thread(); } return caught; } }; QPID_AUTO_TEST_CASE(TestSessionBusy) { SessionFixture f; try { ScopedSuppressLogging sl; // Suppress messages for expected errors. f.connection.newSession(f.session.getId().getName()); BOOST_FAIL("Expected SessionBusyException for " << f.session.getId().getName()); } catch (const SessionBusyException&) {} // FIXME aconway 2008-09-22: client is not throwing correct exception. } QPID_AUTO_TEST_CASE(DisconnectedPop) { SessionFixture fix; fix.session.queueDeclare(arg::queue="q"); fix.subs.subscribe(fix.lq, "q"); Catcher pop(bind(&LocalQueue::pop, &fix.lq, sys::TIME_SEC)); fix.shutdownBroker(); BOOST_CHECK(pop.join()); } QPID_AUTO_TEST_CASE(DisconnectedListen) { SessionFixture fix; struct NullListener : public MessageListener { void received(Message&) { BOOST_FAIL("Unexpected message"); } } l; fix.session.queueDeclare(arg::queue="q"); fix.subs.subscribe(l, "q"); Catcher runner(bind(&SubscriptionManager::run, boost::ref(fix.subs))); fix.shutdownBroker(); runner.join(); BOOST_CHECK_THROW(fix.session.queueDeclare(arg::queue="x"), TransportFailure); } QPID_AUTO_TEST_CASE(NoSuchQueueTest) { SessionFixture fix; ScopedSuppressLogging sl; // Suppress messages for expected errors. BOOST_CHECK_THROW(fix.subs.subscribe(fix.lq, "no such queue"), NotFoundException); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/QueueOptionsTest.cpp0000664000076400007640000000574211252003060021066 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/Array.h" #include "qpid/client/QueueOptions.h" #include "unit_test.h" using namespace qpid::client; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(QueueOptionsTestSuite) QPID_AUTO_TEST_CASE(testSizePolicy) { QueueOptions ft; ft.setSizePolicy(REJECT,1,2); BOOST_CHECK(QueueOptions::strREJECT == ft.getAsString(QueueOptions::strTypeKey)); BOOST_CHECK(1 == ft.getAsInt(QueueOptions::strMaxSizeKey)); BOOST_CHECK(2 == ft.getAsInt(QueueOptions::strMaxCountKey)); ft.setSizePolicy(FLOW_TO_DISK,0,2); BOOST_CHECK(QueueOptions::strFLOW_TO_DISK == ft.getAsString(QueueOptions::strTypeKey)); BOOST_CHECK(1 == ft.getAsInt(QueueOptions::strMaxSizeKey)); BOOST_CHECK(2 == ft.getAsInt(QueueOptions::strMaxCountKey)); ft.setSizePolicy(RING,1,0); BOOST_CHECK(QueueOptions::strRING == ft.getAsString(QueueOptions::strTypeKey)); ft.setSizePolicy(RING_STRICT,1,0); BOOST_CHECK(QueueOptions::strRING_STRICT == ft.getAsString(QueueOptions::strTypeKey)); ft.clearSizePolicy(); BOOST_CHECK(!ft.isSet(QueueOptions::strTypeKey)); BOOST_CHECK(!ft.isSet(QueueOptions::strMaxSizeKey)); BOOST_CHECK(!ft.isSet(QueueOptions::strMaxCountKey)); } QPID_AUTO_TEST_CASE(testFlags) { QueueOptions ft; ft.setPersistLastNode(); ft.setOrdering(LVQ); BOOST_CHECK(1 == ft.getAsInt(QueueOptions::strPersistLastNode)); BOOST_CHECK(1 == ft.getAsInt(QueueOptions::strLastValueQueue)); ft.clearPersistLastNode(); ft.setOrdering(FIFO); BOOST_CHECK(!ft.isSet(QueueOptions::strPersistLastNode)); BOOST_CHECK(!ft.isSet(QueueOptions::strLastValueQueue)); } QPID_AUTO_TEST_CASE(testSetOrdering) { //ensure setOrdering(FIFO) works even if not preceded by a call to //setOrdering(LVQ) QueueOptions ft; ft.setOrdering(FIFO); BOOST_CHECK(!ft.isSet(QueueOptions::strLastValueQueue)); } QPID_AUTO_TEST_CASE(testClearPersistLastNode) { //ensure clear works even if not preceded by the setting on the //option QueueOptions ft; ft.clearPersistLastNode(); BOOST_CHECK(!ft.isSet(QueueOptions::strPersistLastNode)); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/run_ring_queue_test0000775000076400007640000000223211305017114021071 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # #script to run a sequence of ring queue tests via make #setup path to find qpid-config and sender/receiver test progs source ./test_env.sh export PATH=$PWD:$srcdir:$PYTHON_COMMANDS:$PATH #set port to connect to via env var test -s qpidd.port && QPID_PORT=`cat qpidd.port` export QPID_PORT ring_queue_test -c -s 4 -r 4 ring_queue_test -s 4 -r 0 ring_queue_test -s 1 -r 1 qpidc-0.16/src/tests/qpid-cluster-benchmark0000775000076400007640000000376311717465066021405 0ustar00jrossjross00000000000000#!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Benchmark script for comparing cluster performance. # Default options MESSAGES="-m 10000" FLOW="--flow-control 100" # Flow control limit on queue depth for latency. REPEAT="--repeat 10" QUEUES="-q 6" SENDERS="-s 3" RECEIVERS="-r 3" BROKERS= # Local broker CLIENT_HOSTS= # No ssh, all clients are local while getopts "m:f:n:b:q:s:r:c:txyv-" opt; do case $opt in m) MESSAGES="-m $OPTARG";; f) FLOW="--flow-control $OPTARG";; n) REPEAT="--repeat $OPTARG";; b) BROKERS="-b $OPTARG";; q) QUEUES="-q $OPTARG";; s) SENDERS="-s $OPTARG";; r) RECEIVERS="-r $OPTARG";; c) CLIENT_HOSTS="-c $OPTARG";; t) TCP_NODELAY="--connection-options {tcp-nodelay:true}";; x) SAVE_RECEIVED="--save-received";; y) NO_DELETE="--no-delete";; v) OPTS="--verbose";; -) break ;; *) echo "Unknown option"; exit 1;; esac done shift $(($OPTIND-1)) REPLICATE="node:{x-declare:{arguments:{'qpid.replicate':all}}}" BROKER=$(echo $BROKERS | sed s/,.*//) run_test() { echo $*; shift; "$@"; echo; echo; echo; } OPTS="$OPTS $REPEAT $BROKERS --summarize $QUEUES $SENDERS $RECEIVERS $MESSAGES $CLIENT_HOSTS $SAVE_RECEIVED $TCP_NODELAY $NO_DELETE" OPTS="$OPTS --create-option $REPLICATE" run_test "Benchmark:" qpid-cpp-benchmark $OPTS "$@" qpidc-0.16/src/tests/run_cluster_tests0000775000076400007640000000251611462064367020617 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh source $srcdir/ais_check test -x $QPID_PYTHON_TEST || { echo Skipping test, $QPID_PYTHON_TEST not found; exit 0; } # Delete old cluster test data OUTDIR=${OUTDIR:-brokertest.tmp} rm -rf $OUTDIR mkdir -p $OUTDIR # Ignore tests requiring a store by default. CLUSTER_TESTS_IGNORE=${CLUSTER_TESTS_IGNORE:--i cluster_tests.StoreTests.* -I $srcdir/cluster_tests.fail} CLUSTER_TESTS=${CLUSTER_TESTS:-$*} with_ais_group $QPID_PYTHON_TEST -DOUTDIR=$OUTDIR -m cluster_tests $CLUSTER_TESTS_IGNORE $CLUSTER_TESTS || exit 1 rm -rf $OUTDIR qpidc-0.16/src/tests/stop_broker.ps10000664000076400007640000000350111261750600020040 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Stop the broker, check for errors. Get-Content -path qpidd.port -totalCount 1 | Set-Variable -name qpid_port Remove-Item qpidd.port # Test runs from the tests directory but the broker executable is one level # up, and most likely in a subdirectory from there based on what build type. # Look around for it before trying to start it. $subs = "Debug","Release","MinSizeRel","RelWithDebInfo" foreach ($sub in $subs) { $prog = "..\$sub\qpidd.exe" if (Test-Path $prog) { break } } if (!(Test-Path $prog)) { "Cannot locate qpidd.exe" exit 1 } # Piping the output makes the script wait for qpidd to finish. Invoke-Expression "$prog --quit --port $qpid_port" | Write-Output $stopped = $? # Check qpidd.log. filter bad_stuff { $_ -match "( warning | error | critical )" } $qpidd_errors = $false Get-Content -path qpidd.log | where { bad_stuff } | Out-Default | Set-Variable -name qpidd_errors -value $true if ($qpidd_errors -eq $true) { "WARNING: Suspicious broker log entries in qpidd.log, above." } if ($stopped -eq $true) { exit 0 } exit 1 qpidc-0.16/src/tests/BrokerFixture.h0000664000076400007640000001122611623224255020035 0ustar00jrossjross00000000000000#ifndef TESTS_BROKERFIXTURE_H #define TESTS_BROKERFIXTURE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Broker.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/client/Session.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/LocalQueue.h" #include "qpid/log/Logger.h" #include "qpid/log/Options.h" #include "qpid/sys/Thread.h" #include namespace qpid { namespace tests { /** * A fixture with an in-process broker. */ struct BrokerFixture : private boost::noncopyable { typedef qpid::broker::Broker Broker; typedef boost::intrusive_ptr BrokerPtr; BrokerPtr broker; qpid::sys::Thread brokerThread; BrokerFixture(Broker::Options opts=Broker::Options(), bool enableMgmt=false) { // Keep the tests quiet unless logging env. vars have been set by user. if (!::getenv("QPID_LOG_ENABLE") && !::getenv("QPID_TRACE")) { qpid::log::Options logOpts; logOpts.selectors.clear(); logOpts.selectors.push_back("error+"); qpid::log::Logger::instance().configure(logOpts); } opts.port=0; // Management doesn't play well with multiple in-process brokers. opts.enableMgmt=enableMgmt; opts.workerThreads=1; opts.dataDir=""; opts.auth=false; broker = Broker::create(opts); // TODO aconway 2007-12-05: At one point BrokerFixture // tests could hang in Connection ctor if the following // line is removed. This may not be an issue anymore. broker->accept(); broker->getPort(qpid::broker::Broker::TCP_TRANSPORT); brokerThread = qpid::sys::Thread(*broker); }; void shutdownBroker() { if (broker) { broker->shutdown(); brokerThread.join(); broker = BrokerPtr(); } } ~BrokerFixture() { shutdownBroker(); } /** Open a connection to the broker. */ void open(qpid::client::Connection& c) { c.open("localhost", broker->getPort(qpid::broker::Broker::TCP_TRANSPORT)); } uint16_t getPort() { return broker->getPort(qpid::broker::Broker::TCP_TRANSPORT); } }; /** Connection that opens in its constructor */ struct LocalConnection : public qpid::client::Connection { LocalConnection(uint16_t port) { open("localhost", port); } LocalConnection(const qpid::client::ConnectionSettings& s) { open(s); } ~LocalConnection() { close(); } }; /** Convenience class to create and open a connection and session * and some related useful objects. */ template struct ClientT { ConnectionType connection; SessionType session; qpid::client::SubscriptionManager subs; qpid::client::LocalQueue lq; std::string name; ClientT(uint16_t port, const std::string& name_=std::string(), int timeout=0) : connection(port), session(connection.newSession(name_,timeout)), subs(session), name(name_) {} ClientT(const qpid::client::ConnectionSettings& settings, const std::string& name_=std::string(), int timeout=0) : connection(settings), session(connection.newSession(name_, timeout)), subs(session), name(name_) {} ~ClientT() { close(); } void close() { session.close(); connection.close(); } }; typedef ClientT<> Client; /** * A BrokerFixture and ready-connected BrokerFixture::Client all in one. */ template struct SessionFixtureT : BrokerFixture, ClientT { SessionFixtureT(Broker::Options opts=Broker::Options()) : BrokerFixture(opts), ClientT(broker->getPort(qpid::broker::Broker::TCP_TRANSPORT)) {} }; typedef SessionFixtureT SessionFixture; }} // namespace qpid::tests #endif /*!TESTS_BROKERFIXTURE_H*/ qpidc-0.16/src/tests/MessageBuilderTest.cpp0000664000076400007640000001320711361633572021336 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Message.h" #include "qpid/broker/MessageBuilder.h" #include "qpid/broker/NullMessageStore.h" #include "qpid/framing/frame_functors.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/TypeFilter.h" #include "unit_test.h" #include using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::sys; namespace qpid { namespace tests { class MockMessageStore : public NullMessageStore { enum Op {STAGE=1, APPEND=2}; uint64_t id; boost::intrusive_ptr expectedMsg; string expectedData; std::list ops; void checkExpectation(Op actual) { BOOST_CHECK_EQUAL(ops.front(), actual); ops.pop_front(); } public: MockMessageStore() : id(0), expectedMsg(0) {} void expectStage(PersistableMessage& msg) { expectedMsg = &msg; ops.push_back(STAGE); } void expectAppendContent(PersistableMessage& msg, const string& data) { expectedMsg = &msg; expectedData = data; ops.push_back(APPEND); } void stage(const boost::intrusive_ptr& msg) { checkExpectation(STAGE); BOOST_CHECK_EQUAL(expectedMsg, msg); msg->setPersistenceId(++id); } void appendContent(const boost::intrusive_ptr& msg, const string& data) { checkExpectation(APPEND); BOOST_CHECK_EQUAL(boost::static_pointer_cast(expectedMsg), msg); BOOST_CHECK_EQUAL(expectedData, data); } bool expectationsMet() { return ops.empty(); } //don't treat this store as a null impl bool isNull() const { return false; } }; QPID_AUTO_TEST_SUITE(MessageBuilderTestSuite) QPID_AUTO_TEST_CASE(testHeaderOnly) { MessageBuilder builder(0); builder.start(SequenceNumber()); std::string exchange("builder-exchange"); std::string key("builder-exchange"); AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0))); AMQFrame header((AMQHeaderBody())); header.castBody()->get(true)->setContentLength(0); header.castBody()->get(true)->setRoutingKey(key); builder.handle(method); builder.handle(header); BOOST_CHECK(builder.getMessage()); BOOST_CHECK_EQUAL(exchange, builder.getMessage()->getExchangeName()); BOOST_CHECK_EQUAL(key, builder.getMessage()->getRoutingKey()); BOOST_CHECK(builder.getMessage()->getFrames().isComplete()); } QPID_AUTO_TEST_CASE(test1ContentFrame) { MessageBuilder builder(0); builder.start(SequenceNumber()); std::string data("abcdefg"); std::string exchange("builder-exchange"); std::string key("builder-exchange"); AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0))); AMQFrame header((AMQHeaderBody())); AMQFrame content((AMQContentBody(data))); method.setEof(false); header.setBof(false); header.setEof(false); content.setBof(false); header.castBody()->get(true)->setContentLength(data.size()); header.castBody()->get(true)->setRoutingKey(key); builder.handle(method); BOOST_CHECK(builder.getMessage()); BOOST_CHECK(!builder.getMessage()->getFrames().isComplete()); builder.handle(header); BOOST_CHECK(builder.getMessage()); BOOST_CHECK(!builder.getMessage()->getFrames().isComplete()); builder.handle(content); BOOST_CHECK(builder.getMessage()); BOOST_CHECK(builder.getMessage()->getFrames().isComplete()); } QPID_AUTO_TEST_CASE(test2ContentFrames) { MessageBuilder builder(0); builder.start(SequenceNumber()); std::string data1("abcdefg"); std::string data2("hijklmn"); std::string exchange("builder-exchange"); std::string key("builder-exchange"); AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0))); AMQFrame header((AMQHeaderBody())); AMQFrame content1((AMQContentBody(data1))); AMQFrame content2((AMQContentBody(data2))); method.setEof(false); header.setBof(false); header.setEof(false); content1.setBof(false); content1.setEof(false); content2.setBof(false); header.castBody()->get(true)->setContentLength(data1.size() + data2.size()); header.castBody()->get(true)->setRoutingKey(key); builder.handle(method); builder.handle(header); builder.handle(content1); BOOST_CHECK(builder.getMessage()); BOOST_CHECK(!builder.getMessage()->getFrames().isComplete()); builder.handle(content2); BOOST_CHECK(builder.getMessage()); BOOST_CHECK(builder.getMessage()->getFrames().isComplete()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/XmlClientSessionTest.cpp0000664000076400007640000002422711623224255021705 0ustar00jrossjross00000000000000/* * * Licensed to the Apachef Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "BrokerFixture.h" #include "qpid/sys/Shlib.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/client/Message.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/client/Connection.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/LocalQueue.h" #include "qpid/client/Session.h" #include "qpid/client/SubscriptionManager.h" #include #include #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(XmlClientSessionTest) using namespace qpid::client; using namespace qpid::client::arg; using namespace qpid::framing; using namespace qpid; using qpid::sys::Shlib; using qpid::sys::Monitor; using std::string; using std::cout; using std::endl; Shlib shlib(getLibPath("XML_LIB")); class SubscribedLocalQueue : public LocalQueue { private: SubscriptionManager& subscriptions; public: SubscribedLocalQueue(SubscriptionManager& subs) : subscriptions(subs) {} Message get () { return pop(); } Message get (sys::Duration timeout) { return pop(timeout); } virtual ~SubscribedLocalQueue() {} }; struct SimpleListener : public MessageListener { Monitor lock; std::vector messages; void received(Message& msg) { Monitor::ScopedLock l(lock); messages.push_back(msg); lock.notifyAll(); } void waitFor(const uint n) { Monitor::ScopedLock l(lock); while (messages.size() < n) { lock.wait(); } } }; struct ClientSessionFixture : public SessionFixture { void declareSubscribe(const string& q="odd_blue", const string& dest="xml") { session.queueDeclare(queue=q); session.messageSubscribe(queue=q, destination=dest, acquireMode=1); session.messageFlow(destination=dest, unit=0, value=0xFFFFFFFF);//messages session.messageFlow(destination=dest, unit=1, value=0xFFFFFFFF);//bytes } }; // ########### START HERE #################################### QPID_AUTO_TEST_CASE(testXmlBinding) { ClientSessionFixture f; SubscriptionManager subscriptions(f.session); SubscribedLocalQueue localQueue(subscriptions); f.session.exchangeDeclare(qpid::client::arg::exchange="xml", qpid::client::arg::type="xml"); f.session.queueDeclare(qpid::client::arg::queue="odd_blue"); subscriptions.subscribe(localQueue, "odd_blue"); FieldTable binding; binding.setString("xquery", "declare variable $color external;" "(./message/id mod 2 = 1) and ($color = 'blue')"); f.session.exchangeBind(qpid::client::arg::exchange="xml", qpid::client::arg::queue="odd_blue", qpid::client::arg::bindingKey="query_name", qpid::client::arg::arguments=binding); Message message; message.getDeliveryProperties().setRoutingKey("query_name"); message.getHeaders().setString("color", "blue"); string m = "1"; message.setData(m); f.session.messageTransfer(qpid::client::arg::content=message, qpid::client::arg::destination="xml"); Message m2 = localQueue.get(1*qpid::sys::TIME_SEC); BOOST_CHECK_EQUAL(m, m2.getData()); } /** * Ensure that multiple queues can be bound using the same routing key */ QPID_AUTO_TEST_CASE(testXMLBindMultipleQueues) { ClientSessionFixture f; f.session.exchangeDeclare(arg::exchange="xml", arg::type="xml"); f.session.queueDeclare(arg::queue="blue", arg::exclusive=true, arg::autoDelete=true); f.session.queueDeclare(arg::queue="red", arg::exclusive=true, arg::autoDelete=true); FieldTable blue; blue.setString("xquery", "./colour = 'blue'"); f.session.exchangeBind(arg::exchange="xml", arg::queue="blue", arg::bindingKey="by-colour", arg::arguments=blue); FieldTable red; red.setString("xquery", "./colour = 'red'"); f.session.exchangeBind(arg::exchange="xml", arg::queue="red", arg::bindingKey="by-colour", arg::arguments=red); Message sent1("blue", "by-colour"); f.session.messageTransfer(arg::content=sent1, arg::destination="xml"); Message sent2("red", "by-colour"); f.session.messageTransfer(arg::content=sent2, arg::destination="xml"); Message received; BOOST_CHECK(f.subs.get(received, "blue")); BOOST_CHECK_EQUAL(sent1.getData(), received.getData()); BOOST_CHECK(f.subs.get(received, "red")); BOOST_CHECK_EQUAL(sent2.getData(), received.getData()); } //### Test: Bad XML does not kill the server - and does not even // raise an exception, the content is not required to be XML. QPID_AUTO_TEST_CASE(testXMLSendBadXML) { ClientSessionFixture f; f.session.exchangeDeclare(arg::exchange="xml", arg::type="xml"); f.session.queueDeclare(arg::queue="blue", arg::exclusive=true, arg::autoDelete=true)\ ; f.session.queueDeclare(arg::queue="red", arg::exclusive=true, arg::autoDelete=true); FieldTable blue; blue.setString("xquery", "./colour = 'blue'"); f.session.exchangeBind(arg::exchange="xml", arg::queue="blue", arg::bindingKey="by-c\ olour", arg::arguments=blue); FieldTable red; red.setString("xquery", "./colour = 'red'"); f.session.exchangeBind(arg::exchange="xml", arg::queue="red", arg::bindingKey="by-co\ lour", arg::arguments=red); Message sent1("<>colour>blue", "by-colour"); f.session.messageTransfer(arg::content=sent1, arg::destination="xml"); BOOST_CHECK_EQUAL(1, 1); } //### Test: Bad XQuery does not kill the server, but does raise an exception QPID_AUTO_TEST_CASE(testXMLBadXQuery) { ClientSessionFixture f; f.session.exchangeDeclare(arg::exchange="xml", arg::type="xml"); f.session.queueDeclare(arg::queue="blue", arg::exclusive=true, arg::autoDelete=true)\ ; try { ScopedSuppressLogging sl; // Supress logging of error messages for expected error. FieldTable blue; blue.setString("xquery", "./colour $=! 'blue'"); f.session.exchangeBind(arg::exchange="xml", arg::queue="blue", arg::bindingKey="by-c\ olour", arg::arguments=blue); } catch (const InternalErrorException& e) { return; } BOOST_ERROR("A bad XQuery must raise an exception when used in an XML Binding."); } //### Test: double, string, and integer field values can all be bound to queries QPID_AUTO_TEST_CASE(testXmlBindingUntyped) { ClientSessionFixture f; SubscriptionManager subscriptions(f.session); SubscribedLocalQueue localQueue(subscriptions); f.session.exchangeDeclare(qpid::client::arg::exchange="xml", qpid::client::arg::type="xml"); f.session.queueDeclare(qpid::client::arg::queue="odd_blue"); subscriptions.subscribe(localQueue, "odd_blue"); FieldTable binding; binding.setString("xquery", "declare variable $s external;" "declare variable $i external;" "declare variable $d external;" "$s = 'string' and $i = 1 and $d < 1"); f.session.exchangeBind(qpid::client::arg::exchange="xml", qpid::client::arg::queue="odd_blue", qpid::client::arg::bindingKey="query_name", qpid::client::arg::arguments=binding); Message message; message.getDeliveryProperties().setRoutingKey("query_name"); message.getHeaders().setString("s", "string"); message.getHeaders().setInt("i", 1); message.getHeaders().setDouble("d", 0.5); string m = "Hi, Mom!"; message.setData(m); f.session.messageTransfer(qpid::client::arg::content=message, qpid::client::arg::destination="xml"); Message m2 = localQueue.get(1*qpid::sys::TIME_SEC); BOOST_CHECK_EQUAL(m, m2.getData()); } //### Test: double, string, and integer field values can all be bound to queries QPID_AUTO_TEST_CASE(testXmlBindingTyped) { ClientSessionFixture f; SubscriptionManager subscriptions(f.session); SubscribedLocalQueue localQueue(subscriptions); f.session.exchangeDeclare(qpid::client::arg::exchange="xml", qpid::client::arg::type="xml"); f.session.queueDeclare(qpid::client::arg::queue="odd_blue"); subscriptions.subscribe(localQueue, "odd_blue"); FieldTable binding; binding.setString("xquery", "declare variable $s as xs:string external;" "declare variable $i as xs:integer external;" "declare variable $d external;" // XQilla bug when declaring xs:float, xs:double types? Fine if untyped, acts as float. "$s = 'string' and $i = 1 and $d < 1"); f.session.exchangeBind(qpid::client::arg::exchange="xml", qpid::client::arg::queue="odd_blue", qpid::client::arg::bindingKey="query_name", qpid::client::arg::arguments=binding); Message message; message.getDeliveryProperties().setRoutingKey("query_name"); message.getHeaders().setString("s", "string"); message.getHeaders().setInt("i", 1); message.getHeaders().setDouble("d", 0.5); string m = "Hi, Mom!"; message.setData(m); f.session.messageTransfer(qpid::client::arg::content=message, qpid::client::arg::destination="xml"); Message m2 = localQueue.get(1*qpid::sys::TIME_SEC); BOOST_CHECK_EQUAL(m, m2.getData()); } //### Test: Each session can provide its own definition for a query name //### Test: Bindings persist, surviving broker restart QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/declare_queues.cpp0000664000076400007640000000626211300333133020553 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include using namespace qpid::client; using namespace std; int main(int argc, char ** argv) { ConnectionSettings settings; if ( argc != 6 ) { cerr << "Usage: declare_queues host port durability queue_name_prefix n_queues\n"; return 1; } settings.host = argv[1]; settings.port = atoi(argv[2]); int durability = atoi(argv[3]); char const * queue_name_prefix = argv[4]; int n_queues = atoi(argv[5]); FailoverManager connection(settings); int max_fail = 13; for ( int i = 0; i < n_queues; ++ i ) { stringstream queue_name; queue_name << queue_name_prefix << '_' << i; bool queue_created = false; int failure_count; // Any non-transport failure is Bad. try { while ( ! queue_created ) { Session session = connection.connect().newSession(); // TransportFailures aren't too bad -- they might happen because // we are doing a cluster failover test. But if we get too many, // we will still bug out. failure_count = 0; try { if ( durability ) session.queueDeclare(arg::queue=queue_name.str(), arg::durable=true); else session.queueDeclare(arg::queue=queue_name.str()); queue_created = true; cout << "declare_queues: Created queue " << queue_name.str() << endl; } catch ( const qpid::TransportFailure& ) { if ( ++ failure_count >= max_fail ) { cerr << "declare_queues failed: too many transport errors.\n"; cerr << " host: " << settings.host << " port: " << settings.port << endl; return 1; } qpid::sys::sleep ( 1 ); } } } catch ( const exception & error) { cerr << "declare_queues failed:" << error.what() << endl; cerr << " host: " << settings.host << " port: " << settings.port << endl; return 1; } } } qpidc-0.16/src/tests/Statistics.cpp0000664000076400007640000000701111451166714017730 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Statistics.h" #include #include #include namespace qpid { namespace tests { using namespace std; Statistic::~Statistic() {} Throughput::Throughput() : messages(0), started(false) {} void Throughput::message(const messaging::Message&) { ++messages; if (!started) { start = sys::now(); started = true; } } void Throughput::header(ostream& o) const { o << "tp(m/s)"; } void Throughput::report(ostream& o) const { double elapsed(int64_t(sys::Duration(start, sys::now()))/double(sys::TIME_SEC)); o << fixed << setprecision(0) << messages/elapsed; } ThroughputAndLatency::ThroughputAndLatency() : total(0), min(numeric_limits::max()), max(numeric_limits::min()), samples(0) {} const std::string TS = "ts"; void ThroughputAndLatency::message(const messaging::Message& m) { Throughput::message(m); types::Variant::Map::const_iterator i = m.getProperties().find(TS); if (i != m.getProperties().end()) { ++samples; int64_t start(i->second.asInt64()); int64_t end(sys::Duration(sys::EPOCH, sys::now())); double latency = double(end - start)/sys::TIME_MSEC; if (latency > 0) { total += latency; if (latency < min) min = latency; if (latency > max) max = latency; } } } void ThroughputAndLatency::header(ostream& o) const { Throughput::header(o); o << '\t' << "l-min" << '\t' << "l-max" << '\t' << "l-avg"; } void ThroughputAndLatency::report(ostream& o) const { Throughput::report(o); if (samples) { o << fixed << setprecision(2) << '\t' << min << '\t' << max << '\t' << total/samples; } } ReporterBase::ReporterBase(ostream& o, int batch, bool wantHeader) : batchSize(batch), batchCount(0), headerPrinted(!wantHeader), out(o) {} ReporterBase::~ReporterBase() {} /** Count message in the statistics */ void ReporterBase::message(const messaging::Message& m) { if (!overall.get()) overall = create(); overall->message(m); if (batchSize) { if (!batch.get()) batch = create(); batch->message(m); if (++batchCount == batchSize) { header(); batch->report(out); out << endl; batch = create(); batchCount = 0; } } } /** Print overall report. */ void ReporterBase::report() { if (!overall.get()) overall = create(); header(); overall->report(out); out << endl; } void ReporterBase::header() { if (!headerPrinted) { if (!overall.get()) overall = create(); overall->header(out); out << endl; headerPrinted = true; } } }} // namespace qpid::tests qpidc-0.16/src/tests/qpid-perftest.cpp0000664000076400007640000006563411725210014020367 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "TestOptions.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/Connection.h" #include "qpid/client/Completion.h" #include "qpid/client/Message.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/Time.h" #include "qpid/sys/Thread.h" #include #include #include #include #include #include #include #include #include using namespace std; using namespace qpid; using namespace client; using namespace sys; using boost::lexical_cast; using boost::bind; namespace qpid { namespace tests { enum Mode { SHARED, FANOUT, TOPIC }; const char* modeNames[] = { "shared", "fanout", "topic" }; // istream/ostream ops so Options can read/display Mode. istream& operator>>(istream& in, Mode& mode) { string s; in >> s; int i = find(modeNames, modeNames+3, s) - modeNames; if (i >= 3) throw Exception("Invalid mode: "+s); mode = Mode(i); return in; } ostream& operator<<(ostream& out, Mode mode) { return out << modeNames[mode]; } struct Opts : public TestOptions { // Actions bool setup, control, publish, subscribe; // Queue policy uint32_t queueMaxCount; uint64_t queueMaxSize; std::string baseName; bool queueDurable; // Publisher size_t pubs; size_t count ; size_t size; size_t headers; bool confirm; bool durable; bool uniqueData; bool syncPub; // Subscriber size_t subs; size_t ack; // General size_t qt; bool singleConnect; size_t iterations; Mode mode; bool summary; uint32_t intervalSub; uint32_t intervalPub; size_t tx; size_t txPub; size_t txSub; bool commitAsync; static const std::string helpText; Opts() : TestOptions(helpText), setup(false), control(false), publish(false), subscribe(false), baseName("qpid-perftest"), pubs(1), count(500000), size(1024), headers(0), confirm(true), durable(false), uniqueData(false), syncPub(false), subs(1), ack(0), qt(1),singleConnect(false), iterations(1), mode(SHARED), summary(false), intervalSub(0), intervalPub(0), tx(0), txPub(0), txSub(0), commitAsync(false) { addOptions() ("setup", optValue(setup), "Create shared queues.") ("control", optValue(control), "Run test, print report.") ("publish", optValue(publish), "Publish messages.") ("subscribe", optValue(subscribe), "Subscribe for messages.") ("mode", optValue(mode, "shared|fanout|topic"), "Test mode." "\nshared: --qt queues, --npubs publishers and --nsubs subscribers per queue.\n" "\nfanout: --npubs publishers, --nsubs subscribers, fanout exchange." "\ntopic: --qt topics, --npubs publishers and --nsubs subscribers per topic.\n") ("npubs", optValue(pubs, "N"), "Create N publishers.") ("count", optValue(count, "N"), "Each publisher sends N messages.") ("size", optValue(size, "BYTES"), "Size of messages in bytes.") ("headers", optValue(headers, "N"), "Number of headers to add to each message.") ("pub-confirm", optValue(confirm, "yes|no"), "Publisher use confirm-mode.") ("durable", optValue(durable, "yes|no"), "Publish messages as durable.") ("unique-data", optValue(uniqueData, "yes|no"), "Make data for each message unique.") ("sync-publish", optValue(syncPub, "yes|no"), "Wait for confirmation of each message before sending the next one.") ("nsubs", optValue(subs, "N"), "Create N subscribers.") ("sub-ack", optValue(ack, "N"), "N>0: Subscriber acks batches of N.\n" "N==0: Subscriber uses unconfirmed mode") ("qt", optValue(qt, "N"), "Create N queues or topics.") ("single-connection", optValue(singleConnect, "yes|no"), "Use one connection for multiple sessions.") ("iterations", optValue(iterations, "N"), "Desired number of iterations of the test.") ("summary,s", optValue(summary), "Summary output: pubs/sec subs/sec transfers/sec Mbytes/sec") ("queue-max-count", optValue(queueMaxCount, "N"), "queue policy: count to trigger 'flow to disk'") ("queue-max-size", optValue(queueMaxSize, "N"), "queue policy: accumulated size to trigger 'flow to disk'") ("base-name", optValue(baseName, "NAME"), "base name used for queues or topics") ("queue-durable", optValue(queueDurable, "N"), "Make queue durable (implied if durable set)") ("interval_sub", optValue(intervalSub, "ms"), ">=0 delay between msg consume") ("interval_pub", optValue(intervalPub, "ms"), ">=0 delay between msg publish") ("tx", optValue(tx, "N"), "if non-zero, the transaction batch size for publishing and consuming") ("pub-tx", optValue(txPub, "N"), "if non-zero, the transaction batch size for publishing") ("async-commit", optValue(commitAsync, "yes|no"), "Don't wait for completion of commit") ("sub-tx", optValue(txSub, "N"), "if non-zero, the transaction batch size for consuming"); } // Computed values size_t totalPubs; size_t totalSubs; size_t transfers; size_t subQuota; void parse(int argc, char** argv) { TestOptions::parse(argc, argv); switch (mode) { case SHARED: if (count % subs) { count += subs - (count % subs); cout << "WARNING: Adjusted --count to " << count << " the next multiple of --nsubs" << endl; } totalPubs = pubs*qt; totalSubs = subs*qt; subQuota = (pubs*count)/subs; break; case FANOUT: if (qt != 1) cerr << "WARNING: Fanout mode, ignoring --qt=" << qt << endl; qt=1; totalPubs = pubs; totalSubs = subs; subQuota = totalPubs*count; break; case TOPIC: totalPubs = pubs*qt; totalSubs = subs*qt; subQuota = pubs*count; break; } transfers=(totalPubs*count) + (totalSubs*subQuota); if (tx) { if (txPub) { cerr << "WARNING: Using overriden tx value for publishers: " << txPub << std::endl; } else { txPub = tx; } if (txSub) { cerr << "WARNING: Using overriden tx value for subscribers: " << txSub << std::endl; } else { txSub = tx; } } } }; const std::string Opts::helpText= "There are two ways to use qpid-perftest: single process or multi-process.\n\n" "If none of the --setup, --publish, --subscribe or --control options\n" "are given qpid-perftest will run a single-process test.\n" "For a multi-process test first run:\n" " qpid-perftest --setup \n" "and wait for it to complete. The remaining process should run concurrently::\n" "Run --npubs times: qpid-perftest --publish \n" "Run --nsubs times: qpid-perftest --subscribe \n" "Run once: qpid-perftest --control \n" "Note the must be identical for all processes.\n"; Opts opts; Connection globalConnection; std::string fqn(const std::string& name) { ostringstream fqn; fqn << opts.baseName << "_" << name; return fqn.str(); } struct Client : public Runnable { Connection* connection; Connection localConnection; AsyncSession session; Thread thread; Client() { if (opts.singleConnect){ connection = &globalConnection; if (!globalConnection.isOpen()) opts.open(globalConnection); }else{ connection = &localConnection; opts.open(localConnection); } session = connection->newSession(); } ~Client() { try { if (connection->isOpen()) { session.close(); connection->close(); } } catch (const std::exception& e) { std::cerr << "Error in shutdown: " << e.what() << std::endl; } } }; struct Setup : public Client { void queueInit(string name, bool durable=false, const framing::FieldTable& settings=framing::FieldTable()) { session.queueDeclare(arg::queue=name, arg::durable=durable, arg::arguments=settings); session.queuePurge(arg::queue=name); session.sync(); } void run() { queueInit(fqn("pub_start")); queueInit(fqn("pub_done")); queueInit(fqn("sub_ready")); queueInit(fqn("sub_done")); if (opts.iterations > 1) queueInit(fqn("sub_iteration")); if (opts.mode==SHARED) { framing::FieldTable settings;//queue policy settings settings.setInt("qpid.max_count", opts.queueMaxCount); settings.setInt("qpid.max_size", opts.queueMaxSize); for (size_t i = 0; i < opts.qt; ++i) { ostringstream qname; qname << opts.baseName << i; queueInit(qname.str(), opts.durable || opts.queueDurable, settings); } } } }; void expect(string actual, string expect) { if (expect != actual) throw Exception("Expecting "+expect+" but received "+actual); } double secs(Duration d) { return double(d)/TIME_SEC; } double secs(AbsTime start, AbsTime finish) { return secs(Duration(start,finish)); } // Collect rates & print stats. class Stats { vector values; double sum; public: Stats() : sum(0) {} // Functor to collect rates. void operator()(const string& data) { try { double d=lexical_cast(data); values.push_back(d); sum += d; } catch (const std::exception&) { throw Exception("Bad report: "+data); } } double mean() const { return sum/values.size(); } double stdev() const { if (values.size() <= 1) return 0; double avg = mean(); double ssq = 0; for (vector::const_iterator i = values.begin(); i != values.end(); ++i) { double x=*i; x -= avg; ssq += x*x; } return sqrt(ssq/(values.size()-1)); } ostream& print(ostream& out) { ostream_iterator o(out, "\n"); copy(values.begin(), values.end(), o); out << "Average: " << mean(); if (values.size() > 1) out << " (std.dev. " << stdev() << ")"; return out << endl; } }; // Manage control queues, collect and print reports. struct Controller : public Client { SubscriptionManager subs; Controller() : subs(session) {} /** Process messages from queue by applying a functor. */ void process(size_t n, string queue, boost::function msgFn) { if (!opts.summary) cout << "Processing " << n << " messages from " << queue << " " << flush; LocalQueue lq; subs.setFlowControl(n, SubscriptionManager::UNLIMITED, false); subs.subscribe(lq, queue); for (size_t i = 0; i < n; ++i) { if (!opts.summary) cout << "." << flush; msgFn(lq.pop().getData()); } if (!opts.summary) cout << " done." << endl; } void process(size_t n, LocalQueue lq, string queue, boost::function msgFn) { session.messageFlow(queue, 0, n); if (!opts.summary) cout << "Processing " << n << " messages from " << queue << " " << flush; for (size_t i = 0; i < n; ++i) { if (!opts.summary) cout << "." << flush; msgFn(lq.pop().getData()); } if (!opts.summary) cout << " done." << endl; } void send(size_t n, string queue, string data) { if (!opts.summary) cout << "Sending " << data << " " << n << " times to " << queue << endl; Message msg(data, queue); for (size_t i = 0; i < n; ++i) session.messageTransfer(arg::content=msg, arg::acceptMode=1); } void run() { // Controller try { // Wait for subscribers to be ready. process(opts.totalSubs, fqn("sub_ready"), boost::bind(expect, _1, "ready")); LocalQueue pubDone; LocalQueue subDone; subs.setFlowControl(0, SubscriptionManager::UNLIMITED, false); subs.subscribe(pubDone, fqn("pub_done")); subs.subscribe(subDone, fqn("sub_done")); double txrateTotal(0); double mbytesTotal(0); double pubRateTotal(0); double subRateTotal(0); for (size_t j = 0; j < opts.iterations; ++j) { AbsTime start=now(); send(opts.totalPubs, fqn("pub_start"), "start"); // Start publishers if (j) { send(opts.totalSubs, fqn("sub_iteration"), "next"); // Start subscribers on next iteration } Stats pubRates; Stats subRates; process(opts.totalPubs, pubDone, fqn("pub_done"), boost::ref(pubRates)); process(opts.totalSubs, subDone, fqn("sub_done"), boost::ref(subRates)); AbsTime end=now(); double time=secs(start, end); if (time <= 0.0) { throw Exception("ERROR: Test completed in zero seconds. Try again with a larger message count."); } double txrate=opts.transfers/time; double mbytes=(txrate*opts.size)/(1024*1024); if (!opts.summary) { cout << endl << "Total " << opts.transfers << " transfers of " << opts.size << " bytes in " << time << " seconds." << endl; cout << endl << "Publish transfers/sec: " << endl; pubRates.print(cout); cout << endl << "Subscribe transfers/sec: " << endl; subRates.print(cout); cout << endl << "Total transfers/sec: " << txrate << endl << "Total Mbytes/sec: " << mbytes << endl; } else { cout << pubRates.mean() << "\t" << subRates.mean() << "\t" << txrate << "\t" << mbytes << endl; } txrateTotal += txrate; mbytesTotal += mbytes; pubRateTotal += pubRates.mean(); subRateTotal += subRates.mean(); } if (opts.iterations > 1) { cout << "Averages: "<< endl << (pubRateTotal / opts.iterations) << "\t" << (subRateTotal / opts.iterations) << "\t" << (txrateTotal / opts.iterations) << "\t" << (mbytesTotal / opts.iterations) << endl; } } catch (const std::exception& e) { cout << "Controller exception: " << e.what() << endl; } } }; struct PublishThread : public Client { string destination; string routingKey; PublishThread() {}; PublishThread(string key, string dest=string()) { destination=dest; routingKey=key; } void run() { // Publisher try { string data; size_t offset(0); if (opts.uniqueData) { offset = 5; data += "data:";//marker (requested for latency testing tool scripts) data += string(sizeof(size_t), 'X');//space for seq no data += session.getId().str(); if (opts.size > data.size()) { data += string(opts.size - data.size(), 'X'); } else if(opts.size < data.size()) { cout << "WARNING: Increased --size to " << data.size() << " to honour --unique-data" << endl; } } else { size_t msgSize=max(opts.size, sizeof(size_t)); data = string(msgSize, 'X'); } Message msg(data, routingKey); if (opts.durable) msg.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); if (opts.headers) { for (size_t i = 0; i < opts.headers; ++i) { std::stringstream h; h << "hdr" << i; msg.getMessageProperties().getApplicationHeaders().setString(h.str(), h.str()); } } if (opts.txPub){ session.txSelect(); } SubscriptionManager subs(session); LocalQueue lq; subs.setFlowControl(0, SubscriptionManager::UNLIMITED, false); Subscription cs = subs.subscribe(lq, fqn("pub_start")); for (size_t j = 0; j < opts.iterations; ++j) { cs.grantMessageCredit(1); expect(lq.pop().getData(), "start"); AbsTime start=now(); for (size_t i=0; i(msg.getData()).replace(offset, sizeof(size_t), reinterpret_cast(&i), sizeof(size_t)); if (opts.syncPub) { sync(session).messageTransfer( arg::destination=destination, arg::content=msg, arg::acceptMode=1); } else { session.messageTransfer( arg::destination=destination, arg::content=msg, arg::acceptMode=1); } if (opts.txPub && ((i+1) % opts.txPub == 0)){ if (opts.commitAsync){ session.txCommit(); } else { sync(session).txCommit(); } } if (opts.intervalPub) qpid::sys::usleep(opts.intervalPub*1000); } if (opts.confirm) session.sync(); AbsTime end=now(); double time=secs(start,end); if (time <= 0.0) { throw Exception("ERROR: Test completed in zero seconds. Try again with a larger message count."); } // Send result to controller. Message report(lexical_cast(opts.count/time), fqn("pub_done")); session.messageTransfer(arg::content=report, arg::acceptMode=1); if (opts.txPub){ sync(session).txCommit(); } } session.close(); } catch (const std::exception& e) { cout << "PublishThread exception: " << e.what() << endl; } } }; struct SubscribeThread : public Client { string queue; SubscribeThread() {} SubscribeThread(string q) { queue = q; } SubscribeThread(string key, string ex) { queue=session.getId().str(); // Unique name. session.queueDeclare(arg::queue=queue, arg::exclusive=true, arg::autoDelete=true, arg::durable=opts.durable); session.exchangeBind(arg::queue=queue, arg::exchange=ex, arg::bindingKey=key); } void verify(bool cond, const char* test, uint32_t expect, uint32_t actual) { if (!cond) { Message error( QPID_MSG("Sequence error: expected n" << test << expect << " but got " << actual), "sub_done"); session.messageTransfer(arg::content=error, arg::acceptMode=1); throw Exception(error.getData()); } } void run() { // Subscribe try { if (opts.txSub) sync(session).txSelect(); SubscriptionManager subs(session); SubscriptionSettings settings; settings.autoAck = opts.txSub ? opts.txSub : opts.ack; settings.acceptMode = (opts.txSub || opts.ack ? ACCEPT_MODE_EXPLICIT : ACCEPT_MODE_NONE); settings.flowControl = FlowControl::messageCredit(opts.subQuota); LocalQueue lq; Subscription subscription = subs.subscribe(lq, queue, settings); // Notify controller we are ready. session.messageTransfer(arg::content=Message("ready", fqn("sub_ready")), arg::acceptMode=1); if (opts.txSub) { if (opts.commitAsync) session.txCommit(); else sync(session).txCommit(); } LocalQueue iterationControl; if (opts.iterations > 1) { subs.subscribe(iterationControl, fqn("sub_iteration"), SubscriptionSettings(FlowControl::messageCredit(0))); } for (size_t j = 0; j < opts.iterations; ++j) { if (j > 0) { //need to wait here until all subs are done session.messageFlow(fqn("sub_iteration"), 0, 1); iterationControl.pop(); //need to allocate some more credit for subscription session.messageFlow(queue, 0, opts.subQuota); } Message msg; AbsTime start=now(); size_t expect=0; for (size_t i = 0; i < opts.subQuota; ++i) { msg=lq.pop(); if (opts.txSub && ((i+1) % opts.txSub == 0)) { if (opts.commitAsync) session.txCommit(); else sync(session).txCommit(); } if (opts.intervalSub) qpid::sys::usleep(opts.intervalSub*1000); // TODO aconway 2007-11-23: check message order for. // multiple publishers. Need an array of counters, // one per publisher and a publisher ID in the // message. Careful not to introduce a lot of overhead // here, e.g. no std::map, std::string etc. // // For now verify order only for a single publisher. size_t offset = opts.uniqueData ? 5 /*marker is 'data:'*/ : 0; size_t n; memcpy (&n, reinterpret_cast(msg.getData().data() + offset), sizeof(n)); if (opts.pubs == 1) { if (opts.subs == 1 || opts.mode == FANOUT) verify(n==expect, "==", expect, n); else verify(n>=expect, ">=", expect, n); expect = n+1; } } if (opts.txSub || opts.ack) subscription.accept(subscription.getUnaccepted()); if (opts.txSub) { if (opts.commitAsync) session.txCommit(); else sync(session).txCommit(); } AbsTime end=now(); // Report to publisher. Message result(lexical_cast(opts.subQuota/secs(start,end)), fqn("sub_done")); session.messageTransfer(arg::content=result, arg::acceptMode=1); if (opts.txSub) sync(session).txCommit(); } session.close(); } catch (const std::exception& e) { cout << "SubscribeThread exception: " << e.what() << endl; } } }; }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { int exitCode = 0; boost::ptr_vector subs(opts.subs); boost::ptr_vector pubs(opts.pubs); try { opts.parse(argc, argv); string exchange; switch (opts.mode) { case FANOUT: exchange="amq.fanout"; break; case TOPIC: exchange="amq.topic"; break; case SHARED: break; } bool singleProcess= (!opts.setup && !opts.control && !opts.publish && !opts.subscribe); if (singleProcess) opts.setup = opts.control = opts.publish = opts.subscribe = true; if (opts.setup) Setup().run(); // Set up queues // Start pubs/subs for each queue/topic. for (size_t i = 0; i < opts.qt; ++i) { ostringstream key; key << opts.baseName << i; // Queue or topic name. if (opts.publish) { size_t n = singleProcess ? opts.pubs : 1; for (size_t j = 0; j < n; ++j) { pubs.push_back(new PublishThread(key.str(), exchange)); pubs.back().thread=Thread(pubs.back()); } } if (opts.subscribe) { size_t n = singleProcess ? opts.subs : 1; for (size_t j = 0; j < n; ++j) { if (opts.mode==SHARED) subs.push_back(new SubscribeThread(key.str())); else subs.push_back(new SubscribeThread(key.str(),exchange)); subs.back().thread=Thread(subs.back()); } } } if (opts.control) Controller().run(); } catch (const std::exception& e) { cout << endl << e.what() << endl; exitCode = 1; } // Wait for started threads. if (opts.publish) { for (boost::ptr_vector::iterator i=pubs.begin(); i != pubs.end(); ++i) i->thread.join(); } if (opts.subscribe) { for (boost::ptr_vector::iterator i=subs.begin(); i != subs.end(); ++i) i->thread.join(); } return exitCode; } qpidc-0.16/src/tests/qpid-test-cluster0000775000076400007640000000627011654250703020414 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # usage() { echo "Usage: `basename $0` [options] start|stop|restart|check [hosts] Start/stop/restart a cluster on specified hosts or on \$HOSTS via ssh. Options: -l USER Run qpidd and copy files as USER. -e SCRIPT Source SCRIPT for environment settings. Copies SCRIPT to each host. Default is $DEFAULT_ENV. -c CONFIG Use CONFIG as qpidd config file. Copies CONFIG to each host. Default is $DEFAULT_CONF -d Delete data-dir and log file before starting broker. " exit 1 } DEFAULT_CONF=~/qpid-test-qpidd.conf DEFAULT_ENV=~/qpid-test-env.sh test -f $DEFAULT_CONF && CONF_FILE=$DEFAULT_CONF test -f $DEFAULT_ENV && ENV_FILE=$DEFAULT_ENV while getopts "l:e:c:d" opt; do case $opt in l) SSHOPTS="-l$OPTARG $SSHOPTS" ; RSYNC_USER="$OPTARG@" ;; e) ENV_FILE=$OPTARG ;; c) CONF_FILE=$OPTARG ;; d) DO_DELETE=1 ;; *) usage;; esac done shift `expr $OPTIND - 1` test "$*" || usage CMD=$1; shift HOSTS=${*:-$HOSTS} conf_value() { test -f "$CONF_FILE" && awk -F= "/^$1=/ {print \$2}" $CONF_FILE; } if test -n "$CONF_FILE"; then test -f "$CONF_FILE" || { echo Config file not found: $CONF_FILE; exit 1; } RSYNCFILES="$RSYNCFILES $CONF_FILE" QPIDD_ARGS="$QPIDD_ARGS --config $CONF_FILE" CONF_PORT=`conf_value port` CONF_DATA_DIR=`conf_value data-dir` CONF_LOG_FILE=`conf_value log-to-file` fi if test -n "$ENV_FILE"; then test -f "$ENV_FILE" || { echo Environment file not found: $ENV_FILE; exit 1; } RSYNCFILES="$RSYNCFILES $ENV_FILE" SOURCE_ENV="source $ENV_FILE ; " fi test -n "$RSYNCFILES" && rsynchosts $RSYNCFILES # Copy conf/env files to all hosts do_start() { for h in $HOSTS; do COMMAND="qpidd -d $QPIDD_ARGS" id -nG | grep '\' >/dev/null && COMMAND="sg ais -c '$COMMAND'" if test "$DO_DELETE"; then COMMAND="rm -rf $CONF_DATA_DIR $CONF_LOG_FILE; $COMMAND"; fi ssh $h "$SOURCE_ENV $COMMAND" || { echo "Failed to start on $h"; exit 1; } done } do_stop() { for h in $HOSTS; do ssh $h "$SOURCE_ENV qpidd -q --no-module-dir --no-data-dir $QPIDD_ARGS" done } do_status() { for h in $HOSTS; do if ssh $h "$SOURCE_ENV qpidd -c --no-module-dir --no-data-dir $QPIDD_ARGS > /dev/null"; then echo "$h ok" else echo "$h not running" STATUS=1 fi done } case $CMD in start) do_start ;; stop) do_stop ;; restart) do_stop ; do_start ;; status) do_status ;; *) usage;; esac exit $STATUS qpidc-0.16/src/tests/ClusterFailover.cpp0000664000076400007640000000763211426337250020715 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /**@file Tests for partial failure in a cluster. * Partial failure means some nodes experience a failure while others do not. * In this case the failed nodes must shut down. */ #include "test_tools.h" #include "unit_test.h" #include "ClusterFixture.h" #include "qpid/client/FailoverManager.h" #include #include #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ClusterFailoverTestSuite) using namespace std; using namespace qpid; using namespace qpid::cluster; using namespace qpid::framing; using namespace qpid::client; using namespace qpid::client::arg; using namespace boost::assign; using broker::Broker; using boost::shared_ptr; // Timeout for tests that wait for messages const sys::Duration TIMEOUT=sys::TIME_SEC/4; ClusterFixture::Args getArgs(bool durable=std::getenv("STORE_LIB")) { ClusterFixture::Args args; args += "--auth", "no", "--no-module-dir", "--load-module", getLibPath("CLUSTER_LIB"); if (durable) args += "--load-module", getLibPath("STORE_LIB"), "TMP_DATA_DIR"; else args += "--no-data-dir"; return args; } // Test re-connecting with same session name after a failure. QPID_AUTO_TEST_CASE(testReconnectSameSessionName) { ClusterFixture cluster(2, getArgs(), -1); // Specify a timeout to make sure it is ignored, session resume is // not implemented so sessions belonging to dead brokers should // not be kept. Client c0(cluster[0], "foo", 5); BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c0.connection, 2).size()); // wait for both. c0.session.queueDeclare("q"); c0.session.messageTransfer(arg::content=Message("sendme", "q")); BOOST_CHECK_EQUAL(c0.subs.get("q").getData(), "sendme"); cluster.killWithSilencer(0, c0.connection, 9); Client c1(cluster[1], "foo", 5); c1.session.queueQuery(); // Try to use the session. } QPID_AUTO_TEST_CASE(testReconnectExclusiveQueue) { // Regresion test. Session timeouts should be ignored // by the broker as session resume is not implemented. ClusterFixture cluster(2, getArgs(), -1); Client c0(cluster[0], "foo", 5); c0.session.queueDeclare("exq", arg::exclusive=true); SubscriptionSettings settings; settings.exclusive = true; settings.autoAck = 0; Subscription s0 = c0.subs.subscribe(c0.lq, "exq", settings, "exsub"); c0.session.messageTransfer(arg::content=Message("sendme", "exq")); BOOST_CHECK_EQUAL(c0.lq.get().getData(), "sendme"); // Regression: core dump on exit if unacked messages were left in // a session with a timeout. cluster.killWithSilencer(0, c0.connection); // Regression: session timeouts prevented re-connecting to // exclusive queue. Client c1(cluster[1]); c1.session.queueDeclare("exq", arg::exclusive=true); Subscription s1 = c1.subs.subscribe(c1.lq, "exq", settings, "exsub"); s1.cancel(); // Regression: session timeouts prevented new member joining // cluster with exclusive queues. cluster.add(); Client c2(cluster[2]); c2.session.queueQuery(); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/TxMocks.h0000664000076400007640000001517311341561464016642 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _tests_TxMocks_h #define _tests_TxMocks_h #include "qpid/Exception.h" #include "qpid/Msg.h" #include "qpid/broker/TransactionalStore.h" #include "qpid/broker/TxOp.h" #include #include using namespace qpid::broker; using boost::static_pointer_cast; using std::string; namespace qpid { namespace tests { template void assertEqualVector(std::vector& expected, std::vector& actual){ unsigned int i = 0; while(i < expected.size() && i < actual.size()){ BOOST_CHECK_EQUAL(expected[i], actual[i]); i++; } if (i < expected.size()) { throw qpid::Exception(QPID_MSG("Missing " << expected[i])); } else if (i < actual.size()) { throw qpid::Exception(QPID_MSG("Extra " << actual[i])); } BOOST_CHECK_EQUAL(expected.size(), actual.size()); } class TxOpConstants{ protected: const string PREPARE; const string COMMIT; const string ROLLBACK; TxOpConstants() : PREPARE("PREPARE"), COMMIT("COMMIT"), ROLLBACK("ROLLBACK") {} }; class MockTxOp : public TxOp, public TxOpConstants{ std::vector expected; std::vector actual; bool failOnPrepare; string debugName; public: typedef boost::shared_ptr shared_ptr; MockTxOp() : failOnPrepare(false) {} MockTxOp(bool _failOnPrepare) : failOnPrepare(_failOnPrepare) {} void setDebugName(string name){ debugName = name; } void printExpected(){ std::cout << std::endl << "MockTxOp[" << debugName << "] expects: "; for (std::vector::iterator i = expected.begin(); i < expected.end(); i++) { if(i != expected.begin()) std::cout << ", "; std::cout << *i; } std::cout << std::endl; } void printActual(){ std::cout << std::endl << "MockTxOp[" << debugName << "] actual: "; for (std::vector::iterator i = actual.begin(); i < actual.end(); i++) { if(i != actual.begin()) std::cout << ", "; std::cout << *i; } std::cout << std::endl; } bool prepare(TransactionContext*) throw(){ actual.push_back(PREPARE); return !failOnPrepare; } void commit() throw(){ actual.push_back(COMMIT); } void rollback() throw(){ if(!debugName.empty()) std::cout << std::endl << "MockTxOp[" << debugName << "]::rollback()" << std::endl; actual.push_back(ROLLBACK); } MockTxOp& expectPrepare(){ expected.push_back(PREPARE); return *this; } MockTxOp& expectCommit(){ expected.push_back(COMMIT); return *this; } MockTxOp& expectRollback(){ expected.push_back(ROLLBACK); return *this; } void check(){ assertEqualVector(expected, actual); } void accept(TxOpConstVisitor&) const {} ~MockTxOp(){} }; class MockTransactionalStore : public TransactionalStore{ const string BEGIN; const string BEGIN2PC; const string PREPARE; const string COMMIT; const string ABORT; std::vector expected; std::vector actual; enum states {OPEN = 1, PREPARED = 2, COMMITTED = 3, ABORTED = 4}; int state; class TestTransactionContext : public TPCTransactionContext{ MockTransactionalStore* store; public: TestTransactionContext(MockTransactionalStore* _store) : store(_store) {} void prepare(){ if(!store->isOpen()) throw "txn already completed"; store->state = PREPARED; } void commit(){ if(!store->isOpen() && !store->isPrepared()) throw "txn already completed"; store->state = COMMITTED; } void abort(){ if(!store->isOpen() && !store->isPrepared()) throw "txn already completed"; store->state = ABORTED; } ~TestTransactionContext(){} }; public: MockTransactionalStore() : BEGIN("BEGIN"), BEGIN2PC("BEGIN2PC"), PREPARE("PREPARE"), COMMIT("COMMIT"), ABORT("ABORT"), state(OPEN){} void collectPreparedXids(std::set&) { throw "Operation not supported"; } std::auto_ptr begin(const std::string&){ actual.push_back(BEGIN2PC); std::auto_ptr txn(new TestTransactionContext(this)); return txn; } std::auto_ptr begin(){ actual.push_back(BEGIN); std::auto_ptr txn(new TestTransactionContext(this)); return txn; } void prepare(TPCTransactionContext& ctxt){ actual.push_back(PREPARE); dynamic_cast(ctxt).prepare(); } void commit(TransactionContext& ctxt){ actual.push_back(COMMIT); dynamic_cast(ctxt).commit(); } void abort(TransactionContext& ctxt){ actual.push_back(ABORT); dynamic_cast(ctxt).abort(); } MockTransactionalStore& expectBegin(){ expected.push_back(BEGIN); return *this; } MockTransactionalStore& expectBegin2PC(){ expected.push_back(BEGIN2PC); return *this; } MockTransactionalStore& expectPrepare(){ expected.push_back(PREPARE); return *this; } MockTransactionalStore& expectCommit(){ expected.push_back(COMMIT); return *this; } MockTransactionalStore& expectAbort(){ expected.push_back(ABORT); return *this; } void check(){ assertEqualVector(expected, actual); } bool isPrepared(){ return state == PREPARED; } bool isCommitted(){ return state == COMMITTED; } bool isAborted(){ return state == ABORTED; } bool isOpen() const{ return state == OPEN; } ~MockTransactionalStore(){} }; }} // namespace qpid::tests #endif qpidc-0.16/src/tests/multiq_perftest0000775000076400007640000000154111654250703020246 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # exec `dirname $0`/run_perftest 10000 --mode shared --qt 16 qpidc-0.16/src/tests/AccumulatedAckTest.cpp0000664000076400007640000001476411252003060021300 0ustar00jrossjross00000000000000 /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AccumulatedAck.h" #include "unit_test.h" #include #include using std::list; using namespace qpid::framing; namespace qpid { namespace tests { bool covers(const AccumulatedAck& ack, int i) { return ack.covers(SequenceNumber(i)); } void update(AccumulatedAck& ack, int start, int end) { ack.update(SequenceNumber(start), SequenceNumber(end)); } QPID_AUTO_TEST_SUITE(AccumulatedAckTestSuite) QPID_AUTO_TEST_CASE(testGeneral) { AccumulatedAck ack(0); ack.clear(); update(ack, 3,3); update(ack, 7,7); update(ack, 9,9); update(ack, 1,2); update(ack, 4,5); update(ack, 6,6); for(int i = 1; i <= 7; i++) BOOST_CHECK(covers(ack, i)); BOOST_CHECK(covers(ack, 9)); BOOST_CHECK(!covers(ack, 8)); BOOST_CHECK(!covers(ack, 10)); ack.consolidate(); for(int i = 1; i <= 7; i++) BOOST_CHECK(covers(ack, i)); BOOST_CHECK(covers(ack, 9)); BOOST_CHECK(!covers(ack, 8)); BOOST_CHECK(!covers(ack, 10)); } QPID_AUTO_TEST_CASE(testCovers) { AccumulatedAck ack(5); update(ack, 7, 7); update(ack, 9, 9); BOOST_CHECK(covers(ack, 1)); BOOST_CHECK(covers(ack, 2)); BOOST_CHECK(covers(ack, 3)); BOOST_CHECK(covers(ack, 4)); BOOST_CHECK(covers(ack, 5)); BOOST_CHECK(covers(ack, 7)); BOOST_CHECK(covers(ack, 9)); BOOST_CHECK(!covers(ack, 6)); BOOST_CHECK(!covers(ack, 8)); BOOST_CHECK(!covers(ack, 10)); } QPID_AUTO_TEST_CASE(testUpdateFromCompletionData) { AccumulatedAck ack(0); SequenceNumber mark(2); SequenceNumberSet ranges; ranges.addRange(SequenceNumber(5), SequenceNumber(8)); ranges.addRange(SequenceNumber(10), SequenceNumber(15)); ranges.addRange(SequenceNumber(9), SequenceNumber(9)); ranges.addRange(SequenceNumber(3), SequenceNumber(4)); ack.update(mark, ranges); for(int i = 0; i <= 15; i++) { BOOST_CHECK(covers(ack, i)); } BOOST_CHECK(!covers(ack, 16)); BOOST_CHECK_EQUAL((uint32_t) 15, ack.mark.getValue()); } QPID_AUTO_TEST_CASE(testCase1) { AccumulatedAck ack(3); update(ack, 1,2); for(int i = 1; i <= 3; i++) BOOST_CHECK(covers(ack, i)); BOOST_CHECK(!covers(ack, 4)); } QPID_AUTO_TEST_CASE(testCase2) { AccumulatedAck ack(3); update(ack, 3,6); for(int i = 1; i <= 6; i++) BOOST_CHECK(covers(ack, i)); BOOST_CHECK(!covers(ack, 7)); } QPID_AUTO_TEST_CASE(testCase3) { AccumulatedAck ack(3); update(ack, 4,6); for(int i = 1; i <= 6; i++) { BOOST_CHECK(covers(ack, i)); } BOOST_CHECK(!covers(ack, 7)); } QPID_AUTO_TEST_CASE(testCase4) { AccumulatedAck ack(3); update(ack, 5,6); for(int i = 1; i <= 6; i++) { if (i == 4) BOOST_CHECK(!covers(ack, i)); else BOOST_CHECK(covers(ack, i)); } BOOST_CHECK(!covers(ack, 7)); } QPID_AUTO_TEST_CASE(testConsolidation1) { AccumulatedAck ack(3); update(ack, 7,7); BOOST_CHECK_EQUAL((uint32_t) 3, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 1, ack.ranges.size()); update(ack, 8,9); BOOST_CHECK_EQUAL((uint32_t) 3, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 1, ack.ranges.size()); update(ack, 1,2); BOOST_CHECK_EQUAL((uint32_t) 3, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 1, ack.ranges.size()); update(ack, 4,5); BOOST_CHECK_EQUAL((uint32_t) 5, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 1, ack.ranges.size()); update(ack, 6,6); BOOST_CHECK_EQUAL((uint32_t) 9, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 0, ack.ranges.size()); for(int i = 1; i <= 9; i++) BOOST_CHECK(covers(ack, i)); BOOST_CHECK(!covers(ack, 10)); } QPID_AUTO_TEST_CASE(testConsolidation2) { AccumulatedAck ack(0); update(ack, 10,12); BOOST_CHECK_EQUAL((uint32_t) 0, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 1, ack.ranges.size()); update(ack, 7,9); BOOST_CHECK_EQUAL((uint32_t) 0, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 1, ack.ranges.size()); BOOST_CHECK_EQUAL((uint32_t) 7, ack.ranges.front().start.getValue()); BOOST_CHECK_EQUAL((uint32_t) 12, ack.ranges.front().end.getValue()); update(ack, 5,7); BOOST_CHECK_EQUAL((uint32_t) 0, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 1, ack.ranges.size()); BOOST_CHECK_EQUAL((uint32_t) 5, ack.ranges.front().start.getValue()); BOOST_CHECK_EQUAL((uint32_t) 12, ack.ranges.front().end.getValue()); update(ack, 3,4); BOOST_CHECK_EQUAL((uint32_t) 0, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 1, ack.ranges.size()); BOOST_CHECK_EQUAL((uint32_t) 3, ack.ranges.front().start.getValue()); BOOST_CHECK_EQUAL((uint32_t) 12, ack.ranges.front().end.getValue()); update(ack, 1,2); BOOST_CHECK_EQUAL((uint32_t) 12, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 0, ack.ranges.size()); for(int i = 1; i <= 12; i++) BOOST_CHECK(covers(ack, i)); BOOST_CHECK(!covers(ack, 13)); } QPID_AUTO_TEST_CASE(testConsolidation3) { AccumulatedAck ack(0); update(ack, 10,12); update(ack, 6,7); update(ack, 3,4); update(ack, 1,15); BOOST_CHECK_EQUAL((uint32_t) 15, ack.mark.getValue()); BOOST_CHECK_EQUAL((size_t) 0, ack.ranges.size()); } QPID_AUTO_TEST_CASE(testConsolidation4) { AccumulatedAck ack(0); ack.update(SequenceNumber(0), SequenceNumber(2)); ack.update(SequenceNumber(5), SequenceNumber(8)); ack.update(SequenceNumber(10), SequenceNumber(15)); ack.update(SequenceNumber(9), SequenceNumber(9)); ack.update(SequenceNumber(3), SequenceNumber(4)); for(int i = 0; i <= 15; i++) { BOOST_CHECK(covers(ack, i)); } BOOST_CHECK(!covers(ack, 16)); BOOST_CHECK_EQUAL((uint32_t) 15, ack.mark.getValue()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/ClientSessionTest.cpp0000664000076400007640000005230011663214325021216 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "BrokerFixture.h" #include "qpid/client/QueueOptions.h" #include "qpid/client/MessageListener.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/AsyncSession.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Time.h" #include "qpid/client/Session.h" #include "qpid/client/Message.h" #include "qpid/framing/reply_exceptions.h" #include #include #include #include #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ClientSessionTest) using namespace qpid::client; using namespace qpid::framing; using namespace qpid; using qpid::sys::Monitor; using qpid::sys::Thread; using qpid::sys::TIME_SEC; using qpid::broker::Broker; using std::string; using std::cout; using std::endl; struct DummyListener : public sys::Runnable, public MessageListener { std::vector messages; string name; uint expected; SubscriptionManager submgr; DummyListener(Session& session, const string& n, uint ex) : name(n), expected(ex), submgr(session) {} void run() { submgr.subscribe(*this, name); submgr.run(); } void received(Message& msg) { messages.push_back(msg); if (--expected == 0) { submgr.stop(); } } }; struct SimpleListener : public MessageListener { Monitor lock; std::vector messages; void received(Message& msg) { Monitor::ScopedLock l(lock); messages.push_back(msg); lock.notifyAll(); } void waitFor(const uint n) { Monitor::ScopedLock l(lock); while (messages.size() < n) { lock.wait(); } } }; struct ClientSessionFixture : public SessionFixture { ClientSessionFixture(Broker::Options opts = Broker::Options()) : SessionFixture(opts) { session.queueDeclare(arg::queue="my-queue"); } }; QPID_AUTO_TEST_CASE(testQueueQuery) { ClientSessionFixture fix; fix.session = fix.connection.newSession(); fix.session.queueDeclare(arg::queue="q", arg::alternateExchange="amq.fanout", arg::exclusive=true, arg::autoDelete=true); QueueQueryResult result = fix.session.queueQuery("q"); BOOST_CHECK_EQUAL(false, result.getDurable()); BOOST_CHECK_EQUAL(true, result.getExclusive()); BOOST_CHECK_EQUAL("amq.fanout", result.getAlternateExchange()); } QPID_AUTO_TEST_CASE(testDispatcher) { ClientSessionFixture fix; fix.session =fix.connection.newSession(); size_t count = 100; for (size_t i = 0; i < count; ++i) fix.session.messageTransfer(arg::content=Message(boost::lexical_cast(i), "my-queue")); DummyListener listener(fix.session, "my-queue", count); listener.run(); BOOST_CHECK_EQUAL(count, listener.messages.size()); for (size_t i = 0; i < count; ++i) BOOST_CHECK_EQUAL(boost::lexical_cast(i), listener.messages[i].getData()); } QPID_AUTO_TEST_CASE(testDispatcherThread) { ClientSessionFixture fix; fix.session =fix.connection.newSession(); size_t count = 10; DummyListener listener(fix.session, "my-queue", count); sys::Thread t(listener); for (size_t i = 0; i < count; ++i) { fix.session.messageTransfer(arg::content=Message(boost::lexical_cast(i), "my-queue")); } t.join(); BOOST_CHECK_EQUAL(count, listener.messages.size()); for (size_t i = 0; i < count; ++i) BOOST_CHECK_EQUAL(boost::lexical_cast(i), listener.messages[i].getData()); } QPID_AUTO_TEST_CASE(testUseSuspendedError) { ClientSessionFixture fix; fix.session.timeout(60); fix.session.suspend(); try { fix.session.exchangeQuery(arg::exchange="amq.fanout"); BOOST_FAIL("Expected session suspended exception"); } catch(const NotAttachedException&) {} } QPID_AUTO_TEST_CASE(testSendToSelf) { ClientSessionFixture fix; SimpleListener mylistener; fix.session.queueDeclare(arg::queue="myq", arg::exclusive=true, arg::autoDelete=true); fix.subs.subscribe(mylistener, "myq"); sys::Thread runner(fix.subs);//start dispatcher thread string data("msg"); Message msg(data, "myq"); const uint count=10; for (uint i = 0; i < count; ++i) { fix.session.messageTransfer(arg::content=msg); } mylistener.waitFor(count); fix.subs.cancel("myq"); fix.subs.stop(); runner.join(); fix.session.close(); BOOST_CHECK_EQUAL(mylistener.messages.size(), count); for (uint j = 0; j < count; ++j) { BOOST_CHECK_EQUAL(mylistener.messages[j].getData(), data); } } QPID_AUTO_TEST_CASE(testLocalQueue) { ClientSessionFixture fix; fix.session.queueDeclare(arg::queue="lq", arg::exclusive=true, arg::autoDelete=true); LocalQueue lq; fix.subs.subscribe(lq, "lq", FlowControl(2, FlowControl::UNLIMITED, false)); fix.session.messageTransfer(arg::content=Message("foo0", "lq")); fix.session.messageTransfer(arg::content=Message("foo1", "lq")); fix.session.messageTransfer(arg::content=Message("foo2", "lq")); BOOST_CHECK_EQUAL("foo0", lq.pop().getData()); BOOST_CHECK_EQUAL("foo1", lq.pop().getData()); BOOST_CHECK(lq.empty()); // Credit exhausted. fix.subs.getSubscription("lq").setFlowControl(FlowControl::unlimited()); BOOST_CHECK_EQUAL("foo2", lq.pop().getData()); } struct DelayedTransfer : sys::Runnable { ClientSessionFixture& fixture; DelayedTransfer(ClientSessionFixture& f) : fixture(f) {} void run() { qpid::sys::sleep(1); fixture.session.messageTransfer(arg::content=Message("foo2", "getq")); } }; QPID_AUTO_TEST_CASE(testGet) { ClientSessionFixture fix; fix.session.queueDeclare(arg::queue="getq", arg::exclusive=true, arg::autoDelete=true); fix.session.messageTransfer(arg::content=Message("foo0", "getq")); fix.session.messageTransfer(arg::content=Message("foo1", "getq")); Message got; BOOST_CHECK(fix.subs.get(got, "getq", TIME_SEC)); BOOST_CHECK_EQUAL("foo0", got.getData()); BOOST_CHECK(fix.subs.get(got, "getq", TIME_SEC)); BOOST_CHECK_EQUAL("foo1", got.getData()); BOOST_CHECK(!fix.subs.get(got, "getq")); DelayedTransfer sender(fix); Thread t(sender); //test timed get where message shows up after a short delay BOOST_CHECK(fix.subs.get(got, "getq", 5*TIME_SEC)); BOOST_CHECK_EQUAL("foo2", got.getData()); t.join(); } QPID_AUTO_TEST_CASE(testOpenFailure) { BrokerFixture b; Connection c; string host("unknowable-host"); try { c.open(host); } catch (const Exception&) { BOOST_CHECK(!c.isOpen()); } b.open(c); BOOST_CHECK(c.isOpen()); c.close(); BOOST_CHECK(!c.isOpen()); } QPID_AUTO_TEST_CASE(testPeriodicExpiration) { Broker::Options opts; opts.queueCleanInterval = 1; opts.queueFlowStopRatio = 0; opts.queueFlowResumeRatio = 0; ClientSessionFixture fix(opts); FieldTable args; args.setInt("qpid.max_count",10); fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); for (uint i = 0; i < 10; i++) { Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue"); if (i % 2) m.getDeliveryProperties().setTtl(500); fix.session.messageTransfer(arg::content=m); } BOOST_CHECK_EQUAL(fix.session.queueQuery(string("my-queue")).getMessageCount(), 10u); qpid::sys::sleep(2); BOOST_CHECK_EQUAL(fix.session.queueQuery(string("my-queue")).getMessageCount(), 5u); fix.session.messageTransfer(arg::content=Message("Message_11", "my-queue"));//ensure policy is also updated } QPID_AUTO_TEST_CASE(testExpirationOnPop) { ClientSessionFixture fix; fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true); for (uint i = 0; i < 10; i++) { Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue"); if (i % 2) m.getDeliveryProperties().setTtl(200); fix.session.messageTransfer(arg::content=m); } qpid::sys::usleep(300* 1000); for (uint i = 0; i < 10; i++) { if (i % 2) continue; Message m; BOOST_CHECK(fix.subs.get(m, "my-queue", TIME_SEC)); BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), m.getData()); } } QPID_AUTO_TEST_CASE(testRelease) { ClientSessionFixture fix; const uint count=10; for (uint i = 0; i < count; i++) { Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue"); fix.session.messageTransfer(arg::content=m); } fix.subs.setAutoStop(false); fix.subs.start(); SubscriptionSettings settings; settings.autoAck = 0; SimpleListener l1; Subscription s1 = fix.subs.subscribe(l1, "my-queue", settings); l1.waitFor(count); s1.cancel(); for (uint i = 0; i < count; i++) { BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), l1.messages[i].getData()); } s1.release(s1.getUnaccepted()); //check that released messages are redelivered settings.autoAck = 1; SimpleListener l2; Subscription s2 = fix.subs.subscribe(l2, "my-queue", settings); l2.waitFor(count); for (uint i = 0; i < count; i++) { BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), l2.messages[i].getData()); } fix.subs.stop(); fix.subs.wait(); fix.session.close(); } QPID_AUTO_TEST_CASE(testCompleteOnAccept) { ClientSessionFixture fix; const uint count = 8; const uint chunk = 4; for (uint i = 0; i < count; i++) { Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue"); fix.session.messageTransfer(arg::content=m); } SubscriptionSettings settings; settings.autoAck = 0; settings.completionMode = COMPLETE_ON_ACCEPT; settings.flowControl = FlowControl::messageWindow(chunk); LocalQueue q; Subscription s = fix.subs.subscribe(q, "my-queue", settings); fix.session.messageFlush(arg::destination=s.getName()); SequenceSet accepted; for (uint i = 0; i < chunk; i++) { Message m; BOOST_CHECK(q.get(m)); BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), m.getData()); accepted.add(m.getId()); } Message m; BOOST_CHECK(!q.get(m)); s.accept(accepted); //need to reallocate credit as we have flushed it all out s.setFlowControl(FlowControl::messageWindow(chunk)); fix.session.messageFlush(arg::destination=s.getName()); accepted.clear(); for (uint i = chunk; i < count; i++) { Message m; BOOST_CHECK(q.get(m)); BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), m.getData()); accepted.add(m.getId()); } fix.session.messageAccept(accepted); } namespace { struct Publisher : qpid::sys::Runnable { AsyncSession session; Message message; uint count; Thread thread; Publisher(Connection& con, Message m, uint c) : session(con.newSession()), message(m), count(c) {} void start() { thread = Thread(*this); } void join() { thread.join(); } void run() { for (uint i = 0; i < count; i++) { session.messageTransfer(arg::content=message); } session.sync(); session.close(); } }; } QPID_AUTO_TEST_CASE(testConcurrentSenders) { //Ensure concurrent publishing sessions on a connection don't //cause assertions, deadlocks or other undesirables: BrokerFixture fix; Connection connection; ConnectionSettings settings; settings.maxFrameSize = 1024; settings.port = fix.broker->getPort(qpid::broker::Broker::TCP_TRANSPORT); connection.open(settings); AsyncSession session = connection.newSession(); Message message(string(512, 'X')); boost::ptr_vector publishers; for (size_t i = 0; i < 5; i++) { publishers.push_back(new Publisher(connection, message, 100)); } std::for_each(publishers.begin(), publishers.end(), boost::bind(&Publisher::start, _1)); std::for_each(publishers.begin(), publishers.end(), boost::bind(&Publisher::join, _1)); connection.close(); } QPID_AUTO_TEST_CASE(testExclusiveSubscribe) { ClientSessionFixture fix; fix.session.queueDeclare(arg::queue="myq", arg::exclusive=true, arg::autoDelete=true); SubscriptionSettings settings; settings.exclusive = true; LocalQueue q; fix.subs.subscribe(q, "myq", settings, "first"); //attempt to create new subscriber should fail ScopedSuppressLogging sl; BOOST_CHECK_THROW(fix.subs.subscribe(q, "myq", "second"), ResourceLockedException); ; } QPID_AUTO_TEST_CASE(testExclusiveBinding) { FieldTable options; options.setString("qpid.exclusive-binding", "anything"); ClientSessionFixture fix; fix.session.queueDeclare(arg::queue="queue-1", arg::exclusive=true, arg::autoDelete=true); fix.session.queueDeclare(arg::queue="queue-2", arg::exclusive=true, arg::autoDelete=true); fix.session.exchangeBind(arg::exchange="amq.direct", arg::queue="queue-1", arg::bindingKey="my-key", arg::arguments=options); fix.session.messageTransfer(arg::destination="amq.direct", arg::content=Message("message1", "my-key")); fix.session.exchangeBind(arg::exchange="amq.direct", arg::queue="queue-2", arg::bindingKey="my-key", arg::arguments=options); fix.session.messageTransfer(arg::destination="amq.direct", arg::content=Message("message2", "my-key")); Message got; BOOST_CHECK(fix.subs.get(got, "queue-1")); BOOST_CHECK_EQUAL("message1", got.getData()); BOOST_CHECK(!fix.subs.get(got, "queue-1")); BOOST_CHECK(fix.subs.get(got, "queue-2")); BOOST_CHECK_EQUAL("message2", got.getData()); BOOST_CHECK(!fix.subs.get(got, "queue-2")); } QPID_AUTO_TEST_CASE(testResubscribeWithLocalQueue) { ClientSessionFixture fix; fix.session.queueDeclare(arg::queue="some-queue", arg::exclusive=true, arg::autoDelete=true); LocalQueue p, q; fix.subs.subscribe(p, "some-queue"); fix.subs.cancel("some-queue"); fix.subs.subscribe(q, "some-queue"); fix.session.messageTransfer(arg::content=Message("some-data", "some-queue")); fix.session.messageFlush(arg::destination="some-queue"); Message got; BOOST_CHECK(!p.get(got)); BOOST_CHECK(q.get(got)); BOOST_CHECK_EQUAL("some-data", got.getData()); BOOST_CHECK(!q.get(got)); } QPID_AUTO_TEST_CASE(testReliableDispatch) { ClientSessionFixture fix; std::string queue("a-queue"); fix.session.queueDeclare(arg::queue=queue, arg::autoDelete=true); ConnectionSettings settings; settings.port = fix.broker->getPort(qpid::broker::Broker::TCP_TRANSPORT); Connection c1; c1.open(settings); Session s1 = c1.newSession(); SubscriptionManager subs1(s1); LocalQueue q1; subs1.subscribe(q1, queue, FlowControl());//first subscriber has no credit Connection c2; c2.open(settings); Session s2 = c2.newSession(); SubscriptionManager subs2(s2); LocalQueue q2; subs2.subscribe(q2, queue);//second subscriber has credit fix.session.messageTransfer(arg::content=Message("my-message", queue)); //check that the second consumer gets the message Message got; BOOST_CHECK(q2.get(got, 1*TIME_SEC)); BOOST_CHECK_EQUAL("my-message", got.getData()); c1.close(); c2.close(); } QPID_AUTO_TEST_CASE(testSessionCloseOnInvalidSession) { Session session; session.close(); } QPID_AUTO_TEST_CASE(testLVQVariedSize) { ClientSessionFixture fix; std::string queue("my-lvq"); QueueOptions args; args.setOrdering(LVQ_NO_BROWSE); fix.session.queueDeclare(arg::queue=queue, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); std::string key; args.getLVQKey(key); for (size_t i = 0; i < 10; i++) { std::ostringstream data; size_t size = 100 - ((i % 10) * 10); data << std::string(size, 'x'); Message m(data.str(), queue); m.getHeaders().setString(key, "abc"); fix.session.messageTransfer(arg::content=m); } } QPID_AUTO_TEST_CASE(testSessionManagerSetFlowControl) { ClientSessionFixture fix; std::string name("dummy"); LocalQueue queue; SubscriptionSettings settings; settings.flowControl = FlowControl(); fix.session.queueDeclare(arg::queue=name, arg::exclusive=true, arg::autoDelete=true); fix.subs.subscribe(queue, name, settings); fix.session.messageTransfer(arg::content=Message("my-message", name)); fix.subs.setFlowControl(name, 1, FlowControl::UNLIMITED, false); fix.session.messageFlush(name); Message got; BOOST_CHECK(queue.get(got, 0)); BOOST_CHECK_EQUAL("my-message", got.getData()); } QPID_AUTO_TEST_CASE(testGetThenSubscribe) { ClientSessionFixture fix; std::string name("myqueue"); fix.session.queueDeclare(arg::queue=name, arg::exclusive=true, arg::autoDelete=true); fix.session.messageTransfer(arg::content=Message("one", name)); fix.session.messageTransfer(arg::content=Message("two", name)); Message got; BOOST_CHECK(fix.subs.get(got, name)); BOOST_CHECK_EQUAL("one", got.getData()); DummyListener listener(fix.session, name, 1); listener.run(); BOOST_CHECK_EQUAL(1u, listener.messages.size()); if (!listener.messages.empty()) { BOOST_CHECK_EQUAL("two", listener.messages[0].getData()); } } QPID_AUTO_TEST_CASE(testSessionIsValid) { ClientSessionFixture fix; BOOST_CHECK(fix.session.isValid()); Session session; BOOST_CHECK(!session.isValid()); } QPID_AUTO_TEST_CASE(testExpirationNotAltered) { ClientSessionFixture fix; fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true); Message m("my-message", "my-queue"); m.getDeliveryProperties().setTtl(60000); m.getDeliveryProperties().setExpiration(12345); fix.session.messageTransfer(arg::content=m); Message got; BOOST_CHECK(fix.subs.get(got, "my-queue")); BOOST_CHECK_EQUAL("my-message", got.getData()); BOOST_CHECK_EQUAL(12345u, got.getDeliveryProperties().getExpiration()); } QPID_AUTO_TEST_CASE(testGetConnectionFromSession) { ClientSessionFixture fix; FieldTable options; options.setInt("no-local", 1); fix.session.queueDeclare(arg::queue="a", arg::exclusive=true, arg::autoDelete=true, arg::arguments=options); fix.session.queueDeclare(arg::queue="b", arg::exclusive=true, arg::autoDelete=true); Connection c = fix.session.getConnection(); Session s = c.newSession(); //If this new session was created as expected on the same connection as //fix.session, then the no-local behaviour means that queue 'a' //will not enqueue messages from this new session but queue 'b' //will. s.messageTransfer(arg::content=Message("a", "a")); s.messageTransfer(arg::content=Message("b", "b")); Message got; BOOST_CHECK(fix.subs.get(got, "b")); BOOST_CHECK_EQUAL("b", got.getData()); BOOST_CHECK(!fix.subs.get(got, "a")); } QPID_AUTO_TEST_CASE(testQueueDeleted) { ClientSessionFixture fix; fix.session.queueDeclare(arg::queue="my-queue"); LocalQueue queue; fix.subs.subscribe(queue, "my-queue"); ScopedSuppressLogging sl; fix.session.queueDelete(arg::queue="my-queue"); BOOST_CHECK_THROW(queue.get(1*qpid::sys::TIME_SEC), qpid::framing::ResourceDeletedException); } QPID_AUTO_TEST_CASE(testTtl) { const uint64_t ms = 1000ULL; // convert sec to ms const uint64_t us = 1000ULL * 1000ULL; // convert sec to us ClientSessionFixture fix; fix.session.queueDeclare(arg::queue="ttl-test", arg::exclusive=true, arg::autoDelete=true); Message msg1 = Message("AAA", "ttl-test"); uint64_t ttl = 2 * ms; // 2 sec msg1.getDeliveryProperties().setTtl(ttl); Connection c = fix.session.getConnection(); Session s = c.newSession(); s.messageTransfer(arg::content=msg1); Message msg2 = Message("BBB", "ttl-test"); ttl = 10 * ms; // 10 sec msg2.getDeliveryProperties().setTtl(ttl); s.messageTransfer(arg::content=msg2); qpid::sys::usleep(5 * us); // 5 sec // Message "AAA" should be expired and never be delivered // Check "BBB" has ttl somewhere between 1 and 5 secs Message got; BOOST_CHECK(fix.subs.get(got, "ttl-test")); BOOST_CHECK_EQUAL("BBB", got.getData()); BOOST_CHECK(got.getDeliveryProperties().getTtl() > 1 * ms); BOOST_CHECK(got.getDeliveryProperties().getTtl() < ttl - (5 * ms)); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/sender.cpp0000664000076400007640000001252111527572315017062 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include "TestOptions.h" #include "qpid/messaging/Message.h" // Only for Statistics #include "Statistics.h" #include #include using namespace qpid; using namespace qpid::client; using namespace qpid::framing; using namespace std; namespace qpid { namespace tests { struct Args : public qpid::TestOptions { string destination; string key; uint sendEos; bool durable; uint ttl; string lvqMatchValue; string lvqMatchFile; bool reportTotal; int reportEvery; bool reportHeader; Args() : key("test-queue"), sendEos(0), durable(false), ttl(0), reportTotal(false), reportEvery(0), reportHeader(true) { addOptions() ("exchange", qpid::optValue(destination, "EXCHANGE"), "Exchange to send messages to") ("routing-key", qpid::optValue(key, "KEY"), "Routing key to add to messages") ("send-eos", qpid::optValue(sendEos, "N"), "Send N EOS messages to mark end of input") ("durable", qpid::optValue(durable, "true|false"), "Mark messages as durable.") ("ttl", qpid::optValue(ttl, "msecs"), "Time-to-live for messages, in milliseconds") ("lvq-match-value", qpid::optValue(lvqMatchValue, "KEY"), "The value to set for the LVQ match key property") ("lvq-match-file", qpid::optValue(lvqMatchFile, "FILE"), "A file containing values to set for the LVQ match key property") ("report-total", qpid::optValue(reportTotal), "Report total throughput statistics") ("report-every", qpid::optValue(reportEvery,"N"), "Report throughput statistics every N messages") ("report-header", qpid::optValue(reportHeader, "yes|no"), "Headers on report.") ; } }; const string EOS("eos"); class Sender : public FailoverManager::Command { public: Sender(Reporter& reporter, const std::string& destination, const std::string& key, uint sendEos, bool durable, uint ttl, const std::string& lvqMatchValue, const std::string& lvqMatchFile); void execute(AsyncSession& session, bool isRetry); private: Reporter& reporter; messaging::Message dummyMessage; const std::string destination; MessageReplayTracker sender; Message message; const uint sendEos; uint sent; std::ifstream lvqMatchValues; }; Sender::Sender(Reporter& rep, const std::string& dest, const std::string& key, uint eos, bool durable, uint ttl, const std::string& lvqMatchValue, const std::string& lvqMatchFile) : reporter(rep), destination(dest), sender(10), message("", key), sendEos(eos), sent(0) , lvqMatchValues(lvqMatchFile.c_str()) { if (durable){ message.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); } if (ttl) { message.getDeliveryProperties().setTtl(ttl); } if (!lvqMatchValue.empty()) { message.getHeaders().setString(QueueOptions::strLVQMatchProperty, lvqMatchValue); } } void Sender::execute(AsyncSession& session, bool isRetry) { if (isRetry) sender.replay(session); else sender.init(session); string data; while (getline(std::cin, data)) { message.setData(data); //message.getHeaders().setInt("SN", ++sent); string matchKey; if (lvqMatchValues && getline(lvqMatchValues, matchKey)) { message.getHeaders().setString(QueueOptions::strLVQMatchProperty, matchKey); } reporter.message(dummyMessage); // For statistics sender.send(message, destination); } for (uint i = sendEos; i > 0; --i) { message.setData(EOS); sender.send(message, destination); } } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char ** argv) { Args opts; try { opts.parse(argc, argv); Reporter reporter(std::cout, opts.reportEvery, opts.reportHeader); FailoverManager connection(opts.con); Sender sender(reporter, opts.destination, opts.key, opts.sendEos, opts.durable, opts.ttl, opts.lvqMatchValue, opts.lvqMatchFile); connection.execute(sender); connection.close(); if (opts.reportTotal) reporter.report(); return 0; } catch(const std::exception& error) { std::cout << "Failed: " << error.what() << std::endl; } return 1; } qpidc-0.16/src/tests/quick_topictest.ps10000664000076400007640000000211711344045665020735 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Quick and quiet topic test for make check. [string]$me = $myInvocation.InvocationName $srcdir = Split-Path $me Invoke-Expression "$srcdir\topictest.ps1 -subscribers 2 -messages 2 -batches 1" > topictest.log 2>&1 if (!$?) { "$me FAILED:" cat topictest.log exit 1 } Remove-Item topictest.log exit 0 qpidc-0.16/src/tests/ssl_test0000775000076400007640000001734711723446736016704 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run a simple test over SSL source ./test_env.sh CONFIG=$(dirname $0)/config.null CERT_DIR=`pwd`/test_cert_db CERT_PW_FILE=`pwd`/cert.password TEST_HOSTNAME=127.0.0.1 TEST_CLIENT_CERT=rumplestiltskin COUNT=10 trap cleanup EXIT error() { echo $*; exit 1; } create_certs() { #create certificate and key databases with single, simple, self-signed certificate in it mkdir ${CERT_DIR} certutil -N -d ${CERT_DIR} -f ${CERT_PW_FILE} certutil -S -d ${CERT_DIR} -n ${TEST_HOSTNAME} -s "CN=${TEST_HOSTNAME}" -t "CT,," -x -f ${CERT_PW_FILE} -z /usr/bin/certutil certutil -S -d ${CERT_DIR} -n ${TEST_CLIENT_CERT} -s "CN=${TEST_CLIENT_CERT}" -t "CT,," -x -f ${CERT_PW_FILE} -z /usr/bin/certutil } delete_certs() { if [[ -e ${CERT_DIR} ]] ; then rm -rf ${CERT_DIR} fi } # Don't need --no-module-dir or --no-data-dir as they are set as env vars in test_env.sh COMMON_OPTS="--daemon --config $CONFIG --load-module $SSL_LIB --ssl-cert-db $CERT_DIR --ssl-cert-password-file $CERT_PW_FILE --ssl-cert-name $TEST_HOSTNAME" # Start new brokers: # $1 must be integer # $2 = extra opts # Append used ports to PORTS variable start_brokers() { local -a ports for (( i=0; $i<$1; i++)) do ports[$i]=$($QPIDD_EXEC --port 0 $COMMON_OPTS $2) || error "Could not start broker $i" done PORTS=( ${PORTS[@]} ${ports[@]} ) } # Stop single broker: # $1 is number of broker to stop (0 based) stop_broker() { $QPIDD_EXEC -qp ${PORTS[$1]} # Remove from ports array unset PORTS[$1] } stop_brokers() { for port in "${PORTS[@]}"; do $QPIDD_EXEC -qp $port done PORTS=() } pick_port() { # We need a fixed port to set --cluster-url. Use qpidd to pick a free port. PICK=`../qpidd --no-module-dir -dp0` ../qpidd --no-module-dir -qp $PICK echo $PICK } cleanup() { stop_brokers delete_certs } start_ssl_broker() { start_brokers 1 "--transport ssl --ssl-port 0 --require-encryption --auth no" } start_ssl_mux_broker() { ../qpidd $COMMON_OPTS --port $1 --ssl-port $1 --auth no PORTS=( ${PORTS[@]} $1 ) } start_authenticating_broker() { start_brokers 1 "--transport ssl --ssl-port 0 --require-encryption --ssl-sasl-no-dict --ssl-require-client-authentication --auth yes" } ssl_cluster_broker() { # $1 = port start_brokers 1 "--ssl-port $1 --auth no --load-module $CLUSTER_LIB --cluster-name ssl_test.$HOSTNAME.$$ --cluster-url amqp:ssl:$TEST_HOSTNAME:$1" # Wait for broker to be ready qpid-ping -Pssl -b $TEST_HOSTNAME -qp $1 || { echo "Cannot connect to broker on $1"; exit 1; } } CERTUTIL=$(type -p certutil) if [[ !(-x $CERTUTIL) ]] ; then echo "No certutil, skipping ssl test"; exit 0; fi if [[ !(-e ${CERT_PW_FILE}) ]] ; then echo password > ${CERT_PW_FILE} fi delete_certs create_certs || error "Could not create test certificate" start_ssl_broker PORT=${PORTS[0]} echo "Running SSL test on port $PORT" export QPID_NO_MODULE_DIR=1 export QPID_LOAD_MODULE=$SSLCONNECTOR_LIB export QPID_SSL_CERT_DB=${CERT_DIR} export QPID_SSL_CERT_PASSWORD_FILE=${CERT_PW_FILE} ## Test connection via connection settings ./qpid-perftest --count ${COUNT} --port ${PORT} -P ssl -b $TEST_HOSTNAME --summary ## Test connection with a URL URL=amqp:ssl:$TEST_HOSTNAME:$PORT ./qpid-send -b $URL --content-string=hello -a "foo;{create:always}" MSG=`./qpid-receive -b $URL -a "foo;{create:always}" --messages 1` test "$MSG" = "hello" || { echo "receive failed '$MSG' != 'hello'"; exit 1; } ## Test connection with a combination of URL and connection options (in messaging API) URL=$TEST_HOSTNAME:$PORT ./qpid-send -b $URL --connection-options '{transport:ssl,heartbeat:2}' --content-string='hello again' -a "foo;{create:always}" MSG=`./qpid-receive -b $URL --connection-options '{transport:ssl,heartbeat:2}' -a "foo;{create:always}" --messages 1` test "$MSG" = "hello again" || { echo "receive failed '$MSG' != 'hello again'"; exit 1; } #### Client Authentication tests start_authenticating_broker PORT2=${PORTS[1]} echo "Running SSL client authentication test on port $PORT2" URL=amqp:ssl:$TEST_HOSTNAME:$PORT2 ## See if you can set the SSL cert-name for the connection ./qpid-send -b $URL --connection-options "{ssl-cert-name: $TEST_CLIENT_CERT }" --content-string=hello -a "bar;{create:always}" MSG2=`./qpid-receive -b $URL --connection-options "{ssl-cert-name: $TEST_CLIENT_CERT }" -a "bar;{create:always}" --messages 1` test "$MSG2" = "hello" || { echo "receive failed '$MSG2' != 'hello'"; exit 1; } ## Make sure that connect fails with an invalid SSL cert-name ./qpid-send -b $URL --connection-options "{ssl-cert-name: pignose }" --content-string=hello -a "baz;{create:always}" 2>/dev/null 1>/dev/null MSG3=`./qpid-receive -b $URL --connection-options "{ssl-cert-name: pignose }" -a "baz;{create:always}" --messages 1 2>/dev/null` test "$MSG3" = "" || { echo "receive succeeded without valid ssl cert '$MSG3' != ''"; exit 1; } stop_brokers # Test ssl muxed with plain TCP on the same connection # Test a specified port number - since tcp/ssl are the same port don't need to specify --transport ssl PORT=`pick_port` start_ssl_mux_broker $PORT || error "Could not start broker" echo "Running SSL/TCP mux test on fixed port $PORT" ## Test connection via connection settings ./qpid-perftest --count ${COUNT} --port ${PORT} -P ssl -b $TEST_HOSTNAME --summary || error "SSL connection failed!" ./qpid-perftest --count ${COUNT} --port ${PORT} -P tcp -b $TEST_HOSTNAME --summary || error "TCP connection failed!" # Test a broker chosen port - since ssl chooses port need to use --transport ssl here start_ssl_broker PORT=${PORTS[0]} echo "Running SSL/TCP mux test on random port $PORT" ## Test connection via connection settings ./qpid-perftest --count ${COUNT} --port ${PORT} -P ssl -b $TEST_HOSTNAME --summary || error "SSL connection failed!" ./qpid-perftest --count ${COUNT} --port ${PORT} -P tcp -b $TEST_HOSTNAME --summary || error "TCP connection failed!" stop_brokers test -z $CLUSTER_LIB && exit 0 # Exit if cluster not supported. ## Test failover in a cluster using SSL only . $srcdir/ais_check # Will exit if clustering not enabled. PORT1=`pick_port`; ssl_cluster_broker $PORT1 echo "Running SSL cluster broker on port $PORT1" PORT2=`pick_port`; ssl_cluster_broker $PORT2 echo "Running SSL cluster broker on port $PORT2" # Pipe receive output to uniq to remove duplicates ./qpid-receive --connection-options "{reconnect:true, reconnect-timeout:5}" --failover-updates -b amqp:ssl:$TEST_HOSTNAME:$PORT1 -a "foo;{create:always}" -f | uniq > ssl_test_receive.tmp & ./qpid-send -b amqp:ssl:$TEST_HOSTNAME:$PORT2 --content-string=one -a "foo;{create:always}" stop_broker 0 # Kill broker 1 - receiver should fail-over. echo "Killed SSL cluster broker on port $PORT1" ./qpid-send -b amqp:ssl:$TEST_HOSTNAME:$PORT2 --content-string=two -a "foo;{create:always}" --send-eos 1 wait # Wait for qpid-receive { echo one; echo two; } > ssl_test_receive.cmp diff ssl_test_receive.tmp ssl_test_receive.cmp || { echo "Failover failed"; exit 1; } rm -f ssl_test_receive.* qpidc-0.16/src/tests/ConnectionOptions.h0000664000076400007640000000540711372530014020713 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_CONNECTIONOPTIONS_H #define QPID_CLIENT_CONNECTIONOPTIONS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ConnectionSettings.h" #include "qpid/Options.h" namespace qpid { /** * Options parser for ConnectionOptions. */ struct ConnectionOptions : public qpid::Options, public qpid::client::ConnectionSettings { ConnectionOptions() : qpid::Options("Connection Settings") { using namespace qpid; addOptions() ("broker,b", optValue(host, "HOST"), "Broker host to connect to") ("port,p", optValue(port, "PORT"), "Broker port to connect to") ("protocol,P", optValue(protocol, "tcp|ssl|rdma"), "Protocol to use for broker connection") ("virtualhost,v", optValue(virtualhost, "VHOST"), "virtual host") ("username", optValue(username, "USER"), "user name for broker log in.") ("password", optValue(password, "PASSWORD"), "password for broker log in.") ("mechanism", optValue(mechanism, "MECH"), "SASL mechanism to use when authenticating.") ("locale", optValue(locale, "LOCALE"), "locale to use.") ("max-channels", optValue(maxChannels, "N"), "the maximum number of channels the client requires.") ("heartbeat", optValue(heartbeat, "N"), "Desired heartbeat interval in seconds.") ("max-frame-size", optValue(maxFrameSize, "N"), "the maximum frame size to request.") ("bounds-multiplier", optValue(bounds, "N"), "bound size of write queue (as a multiple of the max frame size).") ("tcp-nodelay", optValue(tcpNoDelay), "Turn on tcp-nodelay") ("service", optValue(service, "SERVICE-NAME"), "SASL service name.") ("min-ssf", optValue(minSsf, "N"), "Minimum acceptable strength for SASL security layer") ("max-ssf", optValue(maxSsf, "N"), "Maximum acceptable strength for SASL security layer"); } }; } // namespace qpid #endif /*!QPID_CLIENT_CONNECTIONOPTIONS_H*/ qpidc-0.16/src/tests/receiver.cpp0000664000076400007640000001061211363610132017371 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include "TestOptions.h" #include #include using namespace qpid; using namespace qpid::client; using namespace qpid::framing; using namespace std; namespace qpid { namespace tests { struct Args : public qpid::TestOptions { string queue; uint messages; bool ignoreDuplicates; uint creditWindow; uint ackFrequency; bool browse; Args() : queue("test-queue"), messages(0), ignoreDuplicates(false), creditWindow(0), ackFrequency(1), browse(false) { addOptions() ("queue", qpid::optValue(queue, "QUEUE NAME"), "Queue from which to request messages") ("messages", qpid::optValue(messages, "N"), "Number of messages to receive; 0 means receive indefinitely") ("ignore-duplicates", qpid::optValue(ignoreDuplicates), "Detect and ignore duplicates (by checking 'sn' header)") ("credit-window", qpid::optValue(creditWindow, "N"), "Credit window (0 implies infinite window)") ("ack-frequency", qpid::optValue(ackFrequency, "N"), "Ack frequency (0 implies none of the messages will get accepted)") ("browse", qpid::optValue(browse), "Browse rather than consuming"); } }; const string EOS("eos"); const string SN("sn"); class Receiver : public MessageListener, public FailoverManager::Command { public: Receiver(const string& queue, uint messages, bool ignoreDuplicates, uint creditWindow, uint ackFrequency, bool browse); void received(Message& message); void execute(AsyncSession& session, bool isRetry); private: const string queue; const uint count; const bool skipDups; SubscriptionSettings settings; Subscription subscription; uint processed; uint lastSn; bool isDuplicate(Message& message); }; Receiver::Receiver(const string& q, uint messages, bool ignoreDuplicates, uint creditWindow, uint ackFrequency, bool browse) : queue(q), count(messages), skipDups(ignoreDuplicates), processed(0), lastSn(0) { if (browse) settings.acquireMode = ACQUIRE_MODE_NOT_ACQUIRED; if (creditWindow) settings.flowControl = FlowControl::messageWindow(creditWindow); settings.autoAck = ackFrequency; } void Receiver::received(Message& message) { if (!(skipDups && isDuplicate(message))) { bool eos = message.getData() == EOS; if (!eos) std::cout << message.getData() << std::endl; if (eos || ++processed == count) subscription.cancel(); } } bool Receiver::isDuplicate(Message& message) { uint sn = message.getHeaders().getAsInt(SN); if (lastSn < sn) { lastSn = sn; return false; } else { return true; } } void Receiver::execute(AsyncSession& session, bool /*isRetry*/) { SubscriptionManager subs(session); subscription = subs.subscribe(*this, queue, settings); subs.run(); if (settings.autoAck) { subscription.accept(subscription.getUnaccepted()); } } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char ** argv) { Args opts; try { opts.parse(argc, argv); FailoverManager connection(opts.con); Receiver receiver(opts.queue, opts.messages, opts.ignoreDuplicates, opts.creditWindow, opts.ackFrequency, opts.browse); connection.execute(receiver); connection.close(); return 0; } catch(const std::exception& error) { std::cerr << "Failure: " << error.what() << std::endl; } return 1; } qpidc-0.16/src/tests/topictest.ps10000664000076400007640000000430211674655165017547 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Parameters with default values: s (subscribers) m (messages) b (batches) # h (host) t (false; use transactions) param ( [int]$subscribers = 10, [int]$message_count = 2000, [int]$batches = 10, [string]$broker, [switch] $t # transactional ) # Run the C++ topic test [string]$me = $myInvocation.InvocationName $srcdir = Split-Path $me #$srcdir = Split-Path $myInvocation.InvocationName # Clean up old log files Get-Item subscriber_*.log | Remove-Item if ($t) { $transactional = "--transactional --durable" } # Find which subdir the exes are in . $srcdir\find_prog.ps1 .\qpid-topic-listener.exe function subscribe { param ([int]$num, [string]$sub) "Start subscriber $num" $LOG = "subscriber_$num.log" $cmdline = ".\$sub\qpid-topic-listener $transactional > $LOG 2>&1 if (`$LastExitCode -ne 0) { Remove-Item $LOG }" $cmdblock = $executioncontext.invokecommand.NewScriptBlock($cmdline) . $srcdir\background.ps1 $cmdblock } function publish { param ([string]$sub) Invoke-Expression ".\$sub\qpid-topic-publisher --messages $message_count --batches $batches --subscribers $subscribers $host $transactional" 2>&1 } if ($broker.length) { $broker = "-h$broker" } $i = $subscribers while ($i -gt 0) { subscribe $i $sub $i-- } # FIXME aconway 2007-03-27: Hack around startup race. Fix topic test. Start-Sleep 2 publish $sub exit $LastExitCode qpidc-0.16/src/tests/sasl_fed_ex0000775000076400007640000002607311721215323017274 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # #=============================================================================== # These tests create federated links between two brokers using SASL security. # The SASL mechanism used is EXTERNAL, which is satisfied by SSL # transport-layer security. #=============================================================================== source ./test_env.sh script_name=`basename $0` if [ $# -lt 1 ] || [ $# -gt 2 ] then echo # These are the four different ways of creating links ( or routes+links ) # that the qpid-route command provides. echo "Usage: ${script_name} dynamic|link|queue|route [cluster]" echo exit 1 fi # Has the user told us to do clustering ? ----------- clustering_flag= if [ $# -eq "2" ] && [ "$2" == "cluster" ]; then clustering_flag=true fi qpid_route_method=$1 # Debugging print. -------------------------- debug= function print { if [ "$debug" ]; then echo "${script_name}: $1" fi } print "=========== start sasl_fed_ex $* ============" # This minimum value corresponds to sasl version 2.1.22 minimum_sasl_version=131350 sasl_version=`$QPID_TEST_EXEC_DIR/sasl_version` # This test is necessary because this sasl version is the first one that permits # redirection of the sasl config file path. if [ "$sasl_version" -lt "$minimum_sasl_version" ]; then echo "sasl_fed: must have sasl version 2.1.22 or greater. ( Integer value: $minimum_sasl_version ) Version is: $sasl_version" exit 0 fi # In a distribution, the python tools will be absent. if [ ! -f $QPID_CONFIG_EXEC ] || [ ! -f $QPID_ROUTE_EXEC ] ; then echo "python tools absent - skipping sasl_fed_ex." exit 0 fi CERT_DIR=`pwd`/test_cert_db CERT_PW_FILE=`pwd`/cert.password TEST_HOSTNAME=127.0.0.1 create_certs() { #create certificate and key databases with single, simple, self-signed certificate in it mkdir ${CERT_DIR} certutil -N -d ${CERT_DIR} -f ${CERT_PW_FILE} certutil -S -d ${CERT_DIR} -n ${TEST_HOSTNAME} -s "CN=${TEST_HOSTNAME}" -t "CT,," -x -f ${CERT_PW_FILE} -z /usr/bin/certutil 2> /dev/null } delete_certs() { if [[ -e ${CERT_DIR} ]] ; then print "removing cert dir ${CERT_DIR}" rm -rf ${CERT_DIR} fi } CERTUTIL=$(type -p certutil) if [[ !(-x $CERTUTIL) ]] ; then echo "No certutil, skipping ssl test"; exit 0; fi delete_certs create_certs 2> /dev/null if [ ! $? ]; then error "Could not create test certificate" exit 1 fi sasl_config_dir=$builddir/sasl_config tmp_root=${builddir}/sasl_fed_ex_temp print "results dir is ${tmp_root}" rm -rf ${tmp_root} mkdir -p $tmp_root SRC_SSL_PORT=6667 DST_SSL_PORT=6666 SRC_SSL_PORT_2=6668 DST_SSL_PORT_2=6669 SRC_TCP_PORT=5801 DST_TCP_PORT=5807 SRC_TCP_PORT_2=5802 DST_TCP_PORT_2=5803 CLUSTER_NAME_SUFFIX=`hostname | tr '.' ' ' | awk '{print $1}'` CLUSTER_1_NAME=sasl_fed_ex_cluster_1_${CLUSTER_NAME_SUFFIX} CLUSTER_2_NAME=sasl_fed_ex_cluster_2_${CLUSTER_NAME_SUFFIX} print "CLUSTER_1_NAME == ${CLUSTER_1_NAME}" print "CLUSTER_2_NAME == ${CLUSTER_2_NAME}" SSL_LIB=${moduledir}/ssl.so CLUSTER_LIB=${moduledir}/cluster.so export QPID_SSL_CERT_NAME=${TEST_HOSTNAME} export QPID_NO_MODULE_DIR=1 export QPID_LOAD_MODULE=$SSLCONNECTOR_LIB export QPID_SSL_CERT_DB=${CERT_DIR} export QPID_SSL_CERT_PASSWORD_FILE=${CERT_PW_FILE} export QPID_SSL_CERT_NAME=${TEST_HOSTNAME} ####################################### # Understanding this Plumbing ####################################### # 1. when you establish the route with qpid-route, # here is the best termiology to use: # # qpid-route route add DST SRC # # 2. DST will connect to SRC through the ssl port of SRC. # # 3. sender client connects to the tcp port of SRC. # # 4. sender specifies mechanism ANONYMOUS. # # 5. DST pulls messages off the temp queue on SRC to itself. # COMMON_BROKER_OPTIONS=" \ --ssl-sasl-no-dict \ --sasl-config=$sasl_config_dir \ --ssl-require-client-authentication \ --auth yes \ --ssl-cert-db $CERT_DIR \ --ssl-cert-password-file $CERT_PW_FILE \ --ssl-cert-name $TEST_HOSTNAME \ --no-data-dir \ --no-module-dir \ --load-module ${SSL_LIB} \ --mgmt-enable=yes \ --log-enable info+ \ --log-source yes \ --daemon " function start_brokers { if [ $1 ]; then # clustered ---------------------------------------- print "Starting SRC cluster" print " src broker 1" $QPIDD_EXEC \ --port=${SRC_TCP_PORT} \ --ssl-port ${SRC_SSL_PORT} \ ${COMMON_BROKER_OPTIONS} \ --load-module ${CLUSTER_LIB} \ --cluster-name ${CLUSTER_1_NAME} \ --log-to-file $tmp_root/qpidd_src.log 2> /dev/null broker_ports[0]=${SRC_TCP_PORT} print " src broker 2" $QPIDD_EXEC \ --port=${SRC_TCP_PORT_2} \ --ssl-port ${SRC_SSL_PORT_2} \ ${COMMON_BROKER_OPTIONS} \ --load-module ${CLUSTER_LIB} \ --cluster-name ${CLUSTER_1_NAME} \ --log-to-file $tmp_root/qpidd_src_2.log 2> /dev/null broker_ports[1]=${SRC_TCP_PORT_2} print "Starting DST cluster" print " dst broker 1" $QPIDD_EXEC \ --port=${DST_TCP_PORT} \ --ssl-port ${DST_SSL_PORT} \ ${COMMON_BROKER_OPTIONS} \ --load-module ${CLUSTER_LIB} \ --cluster-name ${CLUSTER_2_NAME} \ --log-to-file $tmp_root/qpidd_dst.log 2> /dev/null broker_ports[2]=${DST_TCP_PORT} print " dst broker 2" $QPIDD_EXEC \ --port=${DST_TCP_PORT_2} \ --ssl-port ${DST_SSL_PORT_2} \ ${COMMON_BROKER_OPTIONS} \ --load-module ${CLUSTER_LIB} \ --cluster-name ${CLUSTER_2_NAME} \ --log-to-file $tmp_root/qpidd_dst_2.log 2> /dev/null broker_ports[3]=${DST_TCP_PORT_2} else # vanilla brokers -------------------------------- print "Starting SRC broker" $QPIDD_EXEC \ --port=${SRC_TCP_PORT} \ --ssl-port ${SRC_SSL_PORT} \ ${COMMON_BROKER_OPTIONS} \ --log-to-file $tmp_root/qpidd_src.log 2> /dev/null broker_ports[0]=${SRC_TCP_PORT} print "Starting DST broker" $QPIDD_EXEC \ --port=${DST_TCP_PORT} \ --ssl-port ${DST_SSL_PORT} \ ${COMMON_BROKER_OPTIONS} \ --log-to-file $tmp_root/qpidd_dst.log 2> /dev/null broker_ports[1]=${DST_TCP_PORT} fi } function halt_brokers { n_brokers=${#broker_ports[@]} print "Halting ${n_brokers} brokers." for i in $(seq 0 $((${n_brokers} - 1))) do halt_port=${broker_ports[$i]} print "Halting broker $i on port ${halt_port}" $QPIDD_EXEC --port ${halt_port} --quit done } start_brokers $clustering_flag # I am not randomizing these names, because this test creates its own brokers. QUEUE_NAME=sasl_fed_queue ROUTING_KEY=sasl_fed_queue EXCHANGE_NAME=sasl_fedex print "add exchanges" $QPID_CONFIG_EXEC -b localhost:${SRC_TCP_PORT} add exchange direct $EXCHANGE_NAME $QPID_CONFIG_EXEC -b localhost:${DST_TCP_PORT} add exchange direct $EXCHANGE_NAME print "add queues" $QPID_CONFIG_EXEC -b localhost:${SRC_TCP_PORT} add queue $QUEUE_NAME $QPID_CONFIG_EXEC -b localhost:${DST_TCP_PORT} add queue $QUEUE_NAME print "create bindings" $QPID_CONFIG_EXEC -b localhost:${SRC_TCP_PORT} bind $EXCHANGE_NAME $QUEUE_NAME $ROUTING_KEY $QPID_CONFIG_EXEC -b localhost:${DST_TCP_PORT} bind $EXCHANGE_NAME $QUEUE_NAME $ROUTING_KEY # # NOTE: The SRC broker *must* be referred to as $TEST_HOSTNAME, and not as "localhost". # It must be referred to by the exact string given as the Common Name (CN) in the cert, # which was created in the function create_certs, above. #---------------------------------------------------------------- # Use qpid-route to create the link, or the link+route, depending # on which of its several methods was requested. #---------------------------------------------------------------- if [ ${qpid_route_method} == "dynamic" ]; then print "dynamic add" $QPID_ROUTE_EXEC -t ssl dynamic add localhost:${DST_TCP_PORT} $TEST_HOSTNAME:${SRC_SSL_PORT} $EXCHANGE_NAME "" "" EXTERNAL elif [ ${qpid_route_method} == "link" ]; then print "link add" $QPID_ROUTE_EXEC -t ssl link add localhost:${DST_TCP_PORT} $TEST_HOSTNAME:${SRC_SSL_PORT} EXTERNAL elif [ ${qpid_route_method} == "queue" ]; then print "queue add" $QPID_ROUTE_EXEC -t ssl queue add localhost:${DST_TCP_PORT} $TEST_HOSTNAME:${SRC_SSL_PORT} $EXCHANGE_NAME $ROUTING_KEY EXTERNAL elif [ ${qpid_route_method} == "route" ]; then print "route add" $QPID_ROUTE_EXEC -t ssl route add localhost:${DST_TCP_PORT} $TEST_HOSTNAME:${SRC_SSL_PORT} $EXCHANGE_NAME $ROUTING_KEY "" "" EXTERNAL else echo "unknown method: |${qpid_route_method}|" echo " choices are: dynamic|link|queue|route " halt_brokers exit 1 fi # I don't know how to avoid this sleep yet. It has to come after route-creation # to avoid false negatives. sleep 5 # This should work the same whether or not we are running a clustered test. # In the case of clustered tests, the status is not printed by qpid_route. # So in either case, I will look only at the transport field, which should be "ssl". print "check the link" link_status=$($QPID_ROUTE_EXEC link list localhost:${DST_TCP_PORT} | tail -1 | awk '{print $3}') halt_brokers sleep 1 if [ ! ${link_status} ]; then print "link_status is empty" print "result: fail" exit 2 fi if [ ${link_status} == "ssl" ]; then print "result: good" # Only remove the tmp_root on success, to permit debugging. print "Removing temporary directory $tmp_root" rm -rf $tmp_root exit 0 fi print "link_status has a bad value: ${link_status}" print "result: fail" exit 3 qpidc-0.16/src/tests/ProxyTest.cpp0000664000076400007640000000306411252003060017542 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/Proxy.h" #include "unit_test.h" using namespace qpid::framing; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ProxyTestSuite) QPID_AUTO_TEST_CASE(testScopedSync) { struct DummyHandler : FrameHandler { void handle(AMQFrame& f) { AMQMethodBody* m = f.getMethod(); BOOST_CHECK(m); BOOST_CHECK(m->isA()); BOOST_CHECK(m->isSync()); } }; DummyHandler f; Proxy p(f); Proxy::ScopedSync s(p); p.send(ExecutionSyncBody(p.getVersion())); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/config.null0000664000076400007640000000001711106674347017235 0ustar00jrossjross00000000000000# empty config qpidc-0.16/src/tests/TopicExchangeTest.cpp0000664000076400007640000003177111460674777021206 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/broker/TopicExchange.h" #include "unit_test.h" #include "test_tools.h" using namespace qpid::broker; using namespace std; namespace qpid { namespace broker { // Class for exercising the pattern match code in the TopicExchange class TopicExchange::TopicExchangeTester { public: typedef std::vector BindingVec; private: // binding node iterator that collects all routes that are bound class TestFinder : public TopicExchange::BindingNode::TreeIterator { public: TestFinder(BindingVec& m) : bv(m) {}; ~TestFinder() {}; bool visit(BindingNode& node) { if (!node.bindings.bindingVector.empty()) bv.push_back(node.routePattern); return true; } BindingVec& bv; }; public: TopicExchangeTester() {}; ~TopicExchangeTester() {}; bool addBindingKey(const std::string& bKey) { string routingPattern = normalize(bKey); BindingKey *bk = bindingTree.addBindingKey(routingPattern); if (bk) { // push a dummy binding to mark this node as "non-leaf" bk->bindingVector.push_back(Binding::shared_ptr()); return true; } return false; } bool removeBindingKey(const std::string& bKey){ string routingPattern = normalize(bKey); BindingKey *bk = bindingTree.getBindingKey(routingPattern); if (bk) { bk->bindingVector.pop_back(); if (bk->bindingVector.empty()) { // no more bindings - remove this node bindingTree.removeBindingKey(routingPattern); } return true; } return false; } void findMatches(const std::string& rKey, BindingVec& matches) { TestFinder testFinder(matches); bindingTree.iterateMatch( rKey, testFinder ); } void getAll(BindingVec& bindings) { TestFinder testFinder(bindings); bindingTree.iterateAll( testFinder ); } private: TopicExchange::BindingNode bindingTree; }; } // namespace broker namespace tests { QPID_AUTO_TEST_SUITE(TopicExchangeTestSuite) #define CHECK_NORMALIZED(expect, pattern) BOOST_CHECK_EQUAL(expect, TopicExchange::normalize(pattern)); namespace { // return the count of bindings that match 'pattern' int match(TopicExchange::TopicExchangeTester &tt, const std::string& pattern) { TopicExchange::TopicExchangeTester::BindingVec bv; tt.findMatches(pattern, bv); return int(bv.size()); } // return true if expected contains exactly all bindings that match // against pattern. bool compare(TopicExchange::TopicExchangeTester& tt, const std::string& pattern, const TopicExchange::TopicExchangeTester::BindingVec& expected) { TopicExchange::TopicExchangeTester::BindingVec bv; tt.findMatches(pattern, bv); if (expected.size() != bv.size()) { // std::cout << "match failed 1 f=[" << bv << "]" << std::endl; // std::cout << "match failed 1 e=[" << expected << "]" << std::endl; return false; } TopicExchange::TopicExchangeTester::BindingVec::const_iterator i; for (i = expected.begin(); i != expected.end(); i++) { TopicExchange::TopicExchangeTester::BindingVec::iterator j; for (j = bv.begin(); j != bv.end(); j++) { // std::cout << "matched [" << *j << "]" << std::endl; if (*i == *j) break; } if (j == bv.end()) { // std::cout << "match failed 2 [" << bv << "]" << std::endl; return false; } } return true; } } QPID_AUTO_TEST_CASE(testNormalize) { CHECK_NORMALIZED("", ""); CHECK_NORMALIZED("a.b.c", "a.b.c"); CHECK_NORMALIZED("a.*.c", "a.*.c"); CHECK_NORMALIZED("#", "#"); CHECK_NORMALIZED("#", "#.#.#.#"); CHECK_NORMALIZED("*.*.*.#", "#.*.#.*.#.#.*"); CHECK_NORMALIZED("a.*.*.*.#", "a.*.#.*.#.*.#"); CHECK_NORMALIZED("a.*.*.*.#", "a.*.#.*.#.*"); CHECK_NORMALIZED("*.*.*.#", "*.#.#.*.*.#"); } QPID_AUTO_TEST_CASE(testPlain) { TopicExchange::TopicExchangeTester tt; string pattern("ab.cd.e"); BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "ab.cd.e")); BOOST_CHECK_EQUAL(0, match(tt, "abx.cd.e")); BOOST_CHECK_EQUAL(0, match(tt, "ab.cd")); BOOST_CHECK_EQUAL(0, match(tt, "ab.cd..e.")); BOOST_CHECK_EQUAL(0, match(tt, "ab.cd.e.")); BOOST_CHECK_EQUAL(0, match(tt, ".ab.cd.e")); BOOST_CHECK(tt.removeBindingKey(pattern)); pattern = ""; BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "")); BOOST_CHECK(tt.removeBindingKey(pattern)); pattern = "."; BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, ".")); BOOST_CHECK(tt.removeBindingKey(pattern)); } QPID_AUTO_TEST_CASE(testStar) { TopicExchange::TopicExchangeTester tt; string pattern("a.*.b"); BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "a.xx.b")); BOOST_CHECK_EQUAL(0, match(tt, "a.b")); BOOST_CHECK(tt.removeBindingKey(pattern)); pattern = "*.x"; BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "y.x")); BOOST_CHECK_EQUAL(1, match(tt, ".x")); BOOST_CHECK_EQUAL(0, match(tt, "x")); BOOST_CHECK(tt.removeBindingKey(pattern)); pattern = "x.x.*"; BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "x.x.y")); BOOST_CHECK_EQUAL(1, match(tt, "x.x.")); BOOST_CHECK_EQUAL(0, match(tt, "x.x")); BOOST_CHECK_EQUAL(0, match(tt, "q.x.y")); BOOST_CHECK(tt.removeBindingKey(pattern)); } QPID_AUTO_TEST_CASE(testHash) { TopicExchange::TopicExchangeTester tt; string pattern("a.#.b"); BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "a.b")); BOOST_CHECK_EQUAL(1, match(tt, "a.x.b")); BOOST_CHECK_EQUAL(1, match(tt, "a..x.y.zz.b")); BOOST_CHECK_EQUAL(0, match(tt, "a.b.")); BOOST_CHECK_EQUAL(0, match(tt, "q.x.b")); BOOST_CHECK(tt.removeBindingKey(pattern)); pattern = "a.#"; BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "a")); BOOST_CHECK_EQUAL(1, match(tt, "a.b")); BOOST_CHECK_EQUAL(1, match(tt, "a.b.c")); BOOST_CHECK(tt.removeBindingKey(pattern)); pattern = "#.a"; BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "a")); BOOST_CHECK_EQUAL(1, match(tt, "x.y.a")); BOOST_CHECK(tt.removeBindingKey(pattern)); pattern = "a.#.b.#.c"; BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "a.b.c")); BOOST_CHECK_EQUAL(1, match(tt, "a.x.b.y.c")); BOOST_CHECK_EQUAL(1, match(tt, "a.x.x.b.y.y.c")); BOOST_CHECK(tt.removeBindingKey(pattern)); } QPID_AUTO_TEST_CASE(testMixed) { TopicExchange::TopicExchangeTester tt; string pattern("*.x.#.y"); BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "a.x.y")); BOOST_CHECK_EQUAL(1, match(tt, "a.x.p.qq.y")); BOOST_CHECK_EQUAL(0, match(tt, "a.a.x.y")); BOOST_CHECK_EQUAL(0, match(tt, "aa.x.b.c")); BOOST_CHECK(tt.removeBindingKey(pattern)); pattern = "a.#.b.*"; BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "a.b.x")); BOOST_CHECK_EQUAL(1, match(tt, "a.x.x.x.b.x")); BOOST_CHECK(tt.removeBindingKey(pattern)); pattern = "*.*.*.#"; BOOST_CHECK(tt.addBindingKey(pattern)); BOOST_CHECK_EQUAL(1, match(tt, "x.y.z")); BOOST_CHECK_EQUAL(1, match(tt, "x.y.z.a.b.c")); BOOST_CHECK_EQUAL(0, match(tt, "x.y")); BOOST_CHECK_EQUAL(0, match(tt, "x")); BOOST_CHECK(tt.removeBindingKey(pattern)); } QPID_AUTO_TEST_CASE(testMultiple) { TopicExchange::TopicExchangeTester tt; const std::string bindings[] = { "a", "b", "a.b", "b.c", "a.b.c.d", "b.c.d.e", "a.*", "a.#", "a.*.#", "#.b", "*.b", "*.#.b", "a.*.b", "a.#.b", "a.*.#.b", "*.b.*", "#.b.#", }; const size_t nBindings = sizeof(bindings)/sizeof(bindings[0]); // setup bindings for (size_t idx = 0; idx < nBindings; idx++) { BOOST_CHECK(tt.addBindingKey(bindings[idx])); } { // read all bindings, and verify all are present TopicExchange::TopicExchangeTester::BindingVec b; tt.getAll(b); BOOST_CHECK_EQUAL(b.size(), nBindings); for (size_t idx = 0; idx < nBindings; idx++) { bool found = false; for (TopicExchange::TopicExchangeTester::BindingVec::iterator i = b.begin(); i != b.end(); i++) { if (*i == bindings[idx]) { found = true; break; } } BOOST_CHECK(found); } } { // test match on pattern "a" const std::string matches[] = { "a", "a.#" }; const size_t nMatches = 2; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "a", expected)); } { // test match on pattern "a.z" const std::string matches[] = { "a.*", "a.#", "a.*.#" }; const size_t nMatches = 3; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "a.z", expected)); } { // test match on pattern "a.b" const std::string matches[] = { "a.b", "a.*", "a.#", "a.*.#", "#.b", "#.b.#", "*.#.b", "*.b", "a.#.b" }; const size_t nMatches = 9; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "a.b", expected)); } { // test match on pattern "a.c.c.b" const std::string matches[] = { "#.b", "#.b.#", "*.#.b", "a.#.b", "a.#", "a.*.#.b", "a.*.#" }; const size_t nMatches = 7; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "a.c.c.b", expected)); } { // test match on pattern "a.b.c" const std::string matches[] = { "#.b.#", "*.b.*", "a.#", "a.*.#" }; const size_t nMatches = 4; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "a.b.c", expected)); } { // test match on pattern "b" const std::string matches[] = { "#.b", "#.b.#", "b" }; const size_t nMatches = 3; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "b", expected)); } { // test match on pattern "x.b" const std::string matches[] = { "#.b", "#.b.#", "*.#.b", "*.b" }; const size_t nMatches = 4; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "x.b", expected)); } { // test match on pattern "x.y.z.b" const std::string matches[] = { "#.b", "#.b.#", "*.#.b" }; const size_t nMatches = 3; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "x.y.z.b", expected)); } { // test match on pattern "x.y.z.b.a.b.c" const std::string matches[] = { "#.b.#", "#.b.#" }; const size_t nMatches = 2; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "x.y.z.b.a.b.c", expected)); } { // test match on pattern "a.b.c.d" const std::string matches[] = { "#.b.#", "a.#", "a.*.#", "a.b.c.d", }; const size_t nMatches = 4; TopicExchange::TopicExchangeTester::BindingVec expected(matches, matches + nMatches); BOOST_CHECK(compare(tt, "a.b.c.d", expected)); } // cleanup bindings for (size_t idx = 0; idx < nBindings; idx++) { BOOST_CHECK(tt.removeBindingKey(bindings[idx])); } } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/run_msg_group_tests_soak0000775000076400007640000000512611721215323022141 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # #script to run a sequence of long-running message group tests via make #setup path to find qpid-config and msg_group_test test progs source ./test_env.sh test -d $PYTHON_DIR || { echo "Skipping message group tests, no python dir."; exit 0; } export PATH=$PWD:$srcdir:$PYTHON_COMMANDS:$PATH #set port to connect to via env var test -s qpidd.port && QPID_PORT=`cat qpidd.port` #trap cleanup INT TERM QUIT QUEUE_NAME="group-queue" GROUP_KEY="My-Group-Id" BROKER_URL="${QPID_BROKER:-localhost}:${QPID_PORT:-5672}" run_test() { $@ } ##set -x declare -i i=0 declare -a tests tests=("qpid-config -b $BROKER_URL add queue $QUEUE_NAME --group-header=${GROUP_KEY} --shared-groups" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 10007 --receivers 3 --senders 5 --group-size 211 --randomize-group-size --capacity 47 --ack-frequency 97" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 10007 --receivers 3 --senders 5 --group-size 211 --randomize-group-size --capacity 79 --ack-frequency 79" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 10007 --receivers 3 --senders 5 --group-size 211 --randomize-group-size --capacity 97 --ack-frequency 47" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 40000 --receivers 0 --senders 5 --group-size 13 --randomize-group-size" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 200000 --receivers 3 --senders 0 --capacity 23 --ack-frequency 7" "qpid-config -b $BROKER_URL del queue $QUEUE_NAME --force") while [ -n "${tests[i]}" ]; do run_test ${tests[i]} RETCODE=$? if test x$RETCODE != x0; then echo "FAILED message group test. Failed command: \"${tests[i]}\""; exit 1; fi i+=1 done qpidc-0.16/src/tests/PollableCondition.cpp0000664000076400007640000000551311252003060021163 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "test_tools.h" #include "unit_test.h" #include "qpid/sys/Poller.h" #include "qpid/sys/PollableCondition.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Time.h" #include "qpid/sys/Thread.h" #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(PollableConditionTest) using namespace qpid::sys; const Duration SHORT = TIME_SEC/100; const Duration LONG = TIME_SEC/10; class Callback { public: enum Action { NONE, CLEAR }; Callback() : count(), action(NONE) {} void call(PollableCondition& pc) { Mutex::ScopedLock l(lock); ++count; switch(action) { case NONE: break; case CLEAR: pc.clear(); break; } action = NONE; lock.notify(); } bool isCalling() { Mutex::ScopedLock l(lock); return wait(LONG); } bool isNotCalling() { Mutex::ScopedLock l(lock); return !wait(SHORT); } bool nextCall(Action a=NONE) { Mutex::ScopedLock l(lock); action = a; return wait(LONG); } private: bool wait(Duration timeout) { int n = count; AbsTime deadline(now(), timeout); while (n == count && lock.wait(deadline)) ; return n != count; } Monitor lock; int count; Action action; }; QPID_AUTO_TEST_CASE(testPollableCondition) { boost::shared_ptr poller(new Poller()); Callback callback; PollableCondition pc(boost::bind(&Callback::call, &callback, _1), poller); Thread runner = Thread(*poller); BOOST_CHECK(callback.isNotCalling()); // condition is not set. pc.set(); BOOST_CHECK(callback.isCalling()); // Set. BOOST_CHECK(callback.isCalling()); // Still set. callback.nextCall(Callback::CLEAR); BOOST_CHECK(callback.isNotCalling()); // Cleared pc.set(); BOOST_CHECK(callback.isCalling()); // Set. callback.nextCall(Callback::CLEAR); BOOST_CHECK(callback.isNotCalling()); // Cleared. poller->shutdown(); runner.join(); } QPID_AUTO_TEST_SUITE_END() }} //namespace qpid::tests qpidc-0.16/src/tests/qpid-topic-listener.cpp0000664000076400007640000001611011376517702021475 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * This file provides one half of a test and example of a pub-sub * style of interaction. See qpid-topic-publisher.cpp for the other half, * in which the logic for publishing is defined. * * This file contains the listener logic. A listener will subscribe to * a logical 'topic'. It will count the number of messages it receives * and the time elapsed between the first one and the last one. It * recognises two types of 'special' message that tell it to (a) send * a report containing this information, (b) shutdown (i.e. stop * listening). */ #include "TestOptions.h" #include "qpid/client/Connection.h" #include "qpid/client/MessageListener.h" #include "qpid/client/Session.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/sys/SystemInfo.h" #include "qpid/sys/Time.h" #include "qpid/framing/FieldValue.h" #include #include using namespace qpid; using namespace qpid::client; using namespace qpid::sys; using namespace qpid::framing; using namespace std; namespace qpid { namespace tests { /** * A message listener implementation in which the runtime logic is * defined. */ class Listener : public MessageListener{ Session session; SubscriptionManager& mgr; const string responseQueue; const bool transactional; bool init; int count; AbsTime start; void shutdown(); void report(); public: Listener(const Session& session, SubscriptionManager& mgr, const string& reponseQueue, bool tx); virtual void received(Message& msg); Subscription subscription; }; /** * A utility class for managing the options passed in. */ struct Args : public qpid::TestOptions { int ack; bool transactional; bool durable; int prefetch; string statusqueue; Args() : ack(0), transactional(false), durable(false), prefetch(0) { addOptions() ("ack", optValue(ack, "MODE"), "Ack frequency in messages (defaults to half the prefetch value)") ("transactional", optValue(transactional), "Use transactions") ("durable", optValue(durable), "subscribers should use durable queues") ("prefetch", optValue(prefetch, "N"), "prefetch count (0 implies no flow control, and no acking)") ("status-queue", optValue(statusqueue, "QUEUE-NAME"), "Message queue to put status messages on"); } }; Listener::Listener(const Session& s, SubscriptionManager& m, const string& _responseq, bool tx) : session(s), mgr(m), responseQueue(_responseq), transactional(tx), init(false), count(0){} void Listener::received(Message& message){ if(!init){ start = now(); count = 0; init = true; cout << "Batch started." << endl; } string type = message.getHeaders().getAsString("TYPE"); if(string("TERMINATION_REQUEST") == type){ shutdown(); }else if(string("REPORT_REQUEST") == type){ subscription.accept(subscription.getUnaccepted()); // Accept everything upto this point cout <<"Batch ended, sending report." << endl; //send a report: report(); init = false; }else if (++count % 1000 == 0){ cout <<"Received " << count << " messages." << endl; } } void Listener::shutdown(){ mgr.stop(); } void Listener::report(){ AbsTime finish = now(); Duration time(start, finish); stringstream reportstr; reportstr << "Received " << count << " messages in " << time/TIME_MSEC << " ms."; Message msg(reportstr.str(), responseQueue); msg.getHeaders().setString("TYPE", "REPORT"); session.messageTransfer(arg::destination="amq.direct", arg::content=msg, arg::acceptMode=1); if(transactional){ sync(session).txCommit(); } } }} // namespace qpid::tests using namespace qpid::tests; /** * The main routine creates a Listener instance and sets it up to * consume from a private queue bound to the exchange with the * appropriate topic name. */ int main(int argc, char** argv){ try{ Args args; args.parse(argc, argv); if(args.help) cout << args << endl; else { Connection connection; args.open(connection); AsyncSession session = connection.newSession(); //declare exchange, queue and bind them: session.queueDeclare(arg::queue="response"); std::string control = "control_" + session.getId().str(); if (args.durable) { session.queueDeclare(arg::queue=control, arg::durable=true); } else { session.queueDeclare(arg::queue=control, arg::exclusive=true, arg::autoDelete=true); } session.exchangeBind(arg::exchange="amq.topic", arg::queue=control, arg::bindingKey="topic_control"); //set up listener SubscriptionManager mgr(session); Listener listener(session, mgr, "response", args.transactional); SubscriptionSettings settings; if (args.prefetch) { settings.autoAck = (args.ack ? args.ack : (args.prefetch / 2)); settings.flowControl = FlowControl::messageCredit(args.prefetch); } else { settings.acceptMode = ACCEPT_MODE_NONE; settings.flowControl = FlowControl::unlimited(); } listener.subscription = mgr.subscribe(listener, control, settings); session.sync(); if( args.statusqueue.length() > 0 ) { stringstream msg_str; msg_str << "qpid-topic-listener: " << qpid::sys::SystemInfo::getProcessId(); session.messageTransfer(arg::content=Message(msg_str.str(), args.statusqueue)); cout << "Ready status put on queue '" << args.statusqueue << "'" << endl; } if (args.transactional) { session.txSelect(); } cout << "qpid-topic-listener: listening..." << endl; mgr.run(); if (args.durable) { session.queueDelete(arg::queue=control); } session.close(); cout << "closing connection" << endl; connection.close(); } return 0; } catch (const std::exception& error) { cout << "qpid-topic-listener: " << error.what() << endl; } return 1; } qpidc-0.16/src/tests/AsyncCompletion.cpp0000664000076400007640000000720611261420217020701 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "BrokerFixture.h" #include "qpid/broker/NullMessageStore.h" #include "qpid/sys/BlockingQueue.h" #include "qpid/client/AsyncSession.h" #include "qpid/sys/Time.h" #include "qpid/framing/QueueQueryResult.h" #include "qpid/client/TypedResult.h" using namespace std; using namespace qpid; using namespace client; using namespace framing; namespace qpid { namespace broker { class TransactionContext; class PersistableQueue; }} using broker::PersistableMessage; using broker::NullMessageStore; using broker::TransactionContext; using broker::PersistableQueue; using sys::TIME_SEC; using boost::intrusive_ptr; /** @file Unit tests for async completion. * Using a dummy store, verify that the broker indicates async completion of * message enqueues at the correct time. */ namespace qpid { namespace tests { class AsyncCompletionMessageStore : public NullMessageStore { public: sys::BlockingQueue > enqueued; AsyncCompletionMessageStore() : NullMessageStore() {} ~AsyncCompletionMessageStore(){} void enqueue(TransactionContext*, const boost::intrusive_ptr& msg, const PersistableQueue& ) { enqueued.push(msg); } }; QPID_AUTO_TEST_SUITE(AsyncCompletionTestSuite) QPID_AUTO_TEST_CASE(testWaitTillComplete) { SessionFixture fix; AsyncCompletionMessageStore* store = new AsyncCompletionMessageStore; boost::shared_ptr p; p.reset(store); fix.broker->setStore(p); AsyncSession s = fix.session; static const int count = 3; s.queueDeclare("q", arg::durable=true); Completion transfers[count]; for (int i = 0; i < count; ++i) { Message msg(boost::lexical_cast(i), "q"); msg.getDeliveryProperties().setDeliveryMode(PERSISTENT); transfers[i] = s.messageTransfer(arg::content=msg); } // Get hold of the broker-side messages. typedef vector > BrokerMessages; BrokerMessages enqueued; for (int j = 0; j < count; ++j) enqueued.push_back(store->enqueued.pop(TIME_SEC)); // Send a sync, make sure it does not complete till all messages are complete. // In reverse order for fun. Completion sync = s.executionSync(arg::sync=true); for (int k = count-1; k >= 0; --k) { BOOST_CHECK(!transfers[k].isComplete()); // Should not be complete yet. BOOST_CHECK(!sync.isComplete()); // Should not be complete yet. enqueued[k]->enqueueComplete(); } sync.wait(); // Should complete now, all messages are completed. } QPID_AUTO_TEST_CASE(testGetResult) { SessionFixture fix; AsyncSession s = fix.session; s.queueDeclare("q", arg::durable=true); TypedResult tr = s.queueQuery("q"); QueueQueryResult qq = tr.get(); BOOST_CHECK_EQUAL(qq.getQueue(), "q"); BOOST_CHECK_EQUAL(qq.getMessageCount(), 0U); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/quick_topictest0000775000076400007640000000177411654250703020241 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Quick and quiet topic test for make check. test -z "$srcdir" && srcdir=`dirname $0` $srcdir/topictest -s2 -m2 -b1 > topictest.log 2>&1 || { echo $0 FAILED: cat topictest.log exit 1 } rm topictest.log qpidc-0.16/src/tests/brokertest.py0000664000076400007640000006461711717465066017656 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Support library for tests that start multiple brokers, e.g. cluster # or federation import os, signal, string, tempfile, subprocess, socket, threading, time, imp, re import qpid, traceback, signal from qpid import connection, messaging, util from qpid.compat import format_exc from qpid.harness import Skipped from unittest import TestCase from copy import copy from threading import Thread, Lock, Condition from logging import getLogger import qmf.console log = getLogger("qpid.brokertest") # Values for expected outcome of process at end of test EXPECT_EXIT_OK=1 # Expect to exit with 0 status before end of test. EXPECT_EXIT_FAIL=2 # Expect to exit with non-0 status before end of test. EXPECT_RUNNING=3 # Expect to still be running at end of test EXPECT_UNKNOWN=4 # No expectation, don't check exit status. def find_exe(program): """Find an executable in the system PATH""" def is_exe(fpath): return os.path.isfile(fpath) and os.access(fpath, os.X_OK) mydir, name = os.path.split(program) if mydir: if is_exe(program): return program else: for path in os.environ["PATH"].split(os.pathsep): exe_file = os.path.join(path, program) if is_exe(exe_file): return exe_file return None def is_running(pid): try: os.kill(pid, 0) return True except: return False class BadProcessStatus(Exception): pass def error_line(filename, n=1): """Get the last n line(s) of filename for error messages""" result = [] try: f = open(filename) try: for l in f: if len(result) == n: result.pop(0) result.append(" "+l) finally: f.close() except: return "" return ":\n" + "".join(result) def retry(function, timeout=10, delay=.01): """Call function until it returns True or timeout expires. Double the delay for each retry. Return True if function returns true, False if timeout expires.""" deadline = time.time() + timeout while not function(): remaining = deadline - time.time() if remaining <= 0: return False delay = min(delay, remaining) time.sleep(delay) delay *= 2 return True class AtomicCounter: def __init__(self): self.count = 0 self.lock = Lock() def next(self): self.lock.acquire(); ret = self.count self.count += 1 self.lock.release(); return ret _popen_id = AtomicCounter() # Popen identifier for use in output file names. # Constants for file descriptor arguments to Popen FILE = "FILE" # Write to file named after process PIPE = subprocess.PIPE class Popen(subprocess.Popen): """ Can set and verify expectation of process status at end of test. Dumps command line, stdout, stderr to data dir for debugging. """ def __init__(self, cmd, expect=EXPECT_EXIT_OK, stdin=None, stdout=FILE, stderr=FILE): """Run cmd (should be a list of program and arguments) expect - if set verify expectation at end of test. stdout, stderr - can have the same values as for subprocess.Popen as well as FILE (the default) which means write to a file named after the process. stdin - like subprocess.Popen but defauts to PIPE """ self._clean = False self._clean_lock = Lock() assert find_exe(cmd[0]), "executable not found: "+cmd[0] if type(cmd) is type(""): cmd = [cmd] # Make it a list. self.cmd = [ str(x) for x in cmd ] self.expect = expect self.id = _popen_id.next() self.pname = "%s-%d" % (os.path.split(self.cmd[0])[1], self.id) if stdout == FILE: stdout = open(self.outfile("out"), "w") if stderr == FILE: stderr = open(self.outfile("err"), "w") try: subprocess.Popen.__init__(self, self.cmd, bufsize=0, executable=None, stdin=stdin, stdout=stdout, stderr=stderr, close_fds=True) except ValueError: # Windows can't do close_fds subprocess.Popen.__init__(self, self.cmd, bufsize=0, executable=None, stdin=stdin, stdout=stdout, stderr=stderr) f = open(self.outfile("cmd"), "w") try: f.write("%s\n%d"%(self.cmd_str(), self.pid)) finally: f.close() log.debug("Started process %s: %s" % (self.pname, " ".join(self.cmd))) def __str__(self): return "Popen<%s>"%(self.pname) def outfile(self, ext): return "%s.%s" % (self.pname, ext) def unexpected(self,msg): err = error_line(self.outfile("err")) or error_line(self.outfile("out")) raise BadProcessStatus("%s %s%s" % (self.pname, msg, err)) def stop(self): # Clean up at end of test. try: if self.expect == EXPECT_UNKNOWN: try: self.kill() # Just make sure its dead except: pass elif self.expect == EXPECT_RUNNING: if self.poll() != None: self.unexpected("expected running, exit code %d" % self.returncode) else: try: self.kill() except Exception,e: self.unexpected("exception from kill: %s" % str(e)) else: retry(lambda: self.poll() is not None) if self.returncode is None: # Still haven't stopped self.kill() self.unexpected("still running") elif self.expect == EXPECT_EXIT_OK and self.returncode != 0: self.unexpected("exit code %d" % self.returncode) elif self.expect == EXPECT_EXIT_FAIL and self.returncode == 0: self.unexpected("expected error") finally: self.wait() # Clean up the process. def communicate(self, input=None): ret = subprocess.Popen.communicate(self, input) self.cleanup() return ret def is_running(self): return self.poll() is None def assert_running(self): if not self.is_running(): self.unexpected("Exit code %d" % self.returncode) def wait(self): ret = subprocess.Popen.wait(self) self._cleanup() return ret def terminate(self): try: subprocess.Popen.terminate(self) except AttributeError: # No terminate method try: os.kill( self.pid , signal.SIGTERM) except AttributeError: # no os.kill, using taskkill.. (Windows only) os.popen('TASKKILL /PID ' +str(self.pid) + ' /F') self.wait() def kill(self): try: subprocess.Popen.kill(self) except AttributeError: # No terminate method try: os.kill( self.pid , signal.SIGKILL) except AttributeError: # no os.kill, using taskkill.. (Windows only) os.popen('TASKKILL /PID ' +str(self.pid) + ' /F') self.wait() def _cleanup(self): """Clean up after a dead process""" self._clean_lock.acquire() if not self._clean: self._clean = True try: self.stdin.close() except: pass try: self.stdout.close() except: pass try: self.stderr.close() except: pass self._clean_lock.release() def cmd_str(self): return " ".join([str(s) for s in self.cmd]) def checkenv(name): value = os.getenv(name) if not value: raise Exception("Environment variable %s is not set" % name) return value def find_in_file(str, filename): if not os.path.exists(filename): return False f = open(filename) try: return str in f.read() finally: f.close() class Broker(Popen): "A broker process. Takes care of start, stop and logging." _broker_count = 0 def __str__(self): return "Broker<%s %s>"%(self.name, self.pname) def find_log(self): self.log = "%s.log" % self.name i = 1 while (os.path.exists(self.log)): self.log = "%s-%d.log" % (self.name, i) i += 1 def get_log(self): return os.path.abspath(self.log) def __init__(self, test, args=[], name=None, expect=EXPECT_RUNNING, port=0, log_level=None, wait=None, show_cmd=False): """Start a broker daemon. name determines the data-dir and log file names.""" self.test = test self._port=port if BrokerTest.store_lib: args = args + ['--load-module', BrokerTest.store_lib] if BrokerTest.sql_store_lib: args = args + ['--load-module', BrokerTest.sql_store_lib] args = args + ['--catalog', BrokerTest.sql_catalog] if BrokerTest.sql_clfs_store_lib: args = args + ['--load-module', BrokerTest.sql_clfs_store_lib] args = args + ['--catalog', BrokerTest.sql_catalog] cmd = [BrokerTest.qpidd_exec, "--port", port, "--no-module-dir"] + args if not "--auth" in args: cmd.append("--auth=no") if wait != None: cmd += ["--wait", str(wait)] if name: self.name = name else: self.name = "broker%d" % Broker._broker_count Broker._broker_count += 1 self.find_log() cmd += ["--log-to-file", self.log] cmd += ["--log-to-stderr=no"] cmd += ["--log-enable=%s"%(log_level or "info+") ] self.datadir = self.name cmd += ["--data-dir", self.datadir] if show_cmd: print cmd Popen.__init__(self, cmd, expect, stdout=PIPE) test.cleanup_stop(self) self._host = "127.0.0.1" log.debug("Started broker %s (%s, %s)" % (self.name, self.pname, self.log)) self._log_ready = False def startQmf(self, handler=None): self.qmf_session = qmf.console.Session(handler) self.qmf_broker = self.qmf_session.addBroker("%s:%s" % (self.host(), self.port())) def host(self): return self._host def port(self): # Read port from broker process stdout if not already read. if (self._port == 0): try: self._port = int(self.stdout.readline()) except ValueError: raise Exception("Can't get port for broker %s (%s)%s" % (self.name, self.pname, error_line(self.log,5))) return self._port def unexpected(self,msg): raise BadProcessStatus("%s: %s (%s)" % (msg, self.name, self.pname)) def connect(self, **kwargs): """New API connection to the broker.""" return messaging.Connection.establish(self.host_port(), **kwargs) def connect_old(self): """Old API connection to the broker.""" socket = qpid.util.connect(self.host(),self.port()) connection = qpid.connection.Connection (sock=socket) connection.start() return connection; def declare_queue(self, queue): c = self.connect_old() s = c.session(str(qpid.datatypes.uuid4())) s.queue_declare(queue=queue) c.close() def _prep_sender(self, queue, durable, xprops): s = queue + "; {create:always, node:{durable:" + str(durable) if xprops != None: s += ", x-declare:{" + xprops + "}" return s + "}}" def send_message(self, queue, message, durable=True, xprops=None, session=None): if session == None: s = self.connect().session() else: s = session s.sender(self._prep_sender(queue, durable, xprops)).send(message) if session == None: s.connection.close() def send_messages(self, queue, messages, durable=True, xprops=None, session=None): if session == None: s = self.connect().session() else: s = session sender = s.sender(self._prep_sender(queue, durable, xprops)) for m in messages: sender.send(m) if session == None: s.connection.close() def get_message(self, queue): s = self.connect().session() m = s.receiver(queue+"; {create:always}", capacity=1).fetch(timeout=1) s.acknowledge() s.connection.close() return m def get_messages(self, queue, n): s = self.connect().session() receiver = s.receiver(queue+"; {create:always}", capacity=n) m = [receiver.fetch(timeout=1) for i in range(n)] s.acknowledge() s.connection.close() return m def host_port(self): return "%s:%s" % (self.host(), self.port()) def log_contains(self, str, timeout=1): """Wait for str to appear in the log file up to timeout. Return true if found""" return retry(lambda: find_in_file(str, self.log), timeout) def log_ready(self): """Return true if the log file exists and contains a broker ready message""" if not self._log_ready: self._log_ready = find_in_file("notice Broker running", self.log) return self._log_ready def ready(self, timeout=30, **kwargs): """Wait till broker is ready to serve clients""" # First make sure the broker is listening by checking the log. if not retry(self.log_ready, timeout=timeout): raise Exception( "Timed out waiting for broker %s%s"%(self.name, error_line(self.log,5))) # Create a connection and a session. For a cluster broker this will # return after cluster init has finished. try: c = self.connect(**kwargs) try: c.session() finally: c.close() except Exception,e: raise RethrownException( "Broker %s not responding: (%s)%s"%(self.name,e,error_line(self.log, 5))) def store_state(self): f = open(os.path.join(self.datadir, "cluster", "store.status")) try: uuids = f.readlines() finally: f.close() null_uuid="00000000-0000-0000-0000-000000000000\n" if len(uuids) < 2: return "unknown" # we looked while the file was being updated. if uuids[0] == null_uuid: return "empty" if uuids[1] == null_uuid: return "dirty" return "clean" class Cluster: """A cluster of brokers in a test.""" # Client connection options for use in failover tests. CONNECTION_OPTIONS = "reconnect:true,reconnect-timeout:10,reconnect-urls-replace:true" _cluster_count = 0 def __init__(self, test, count=0, args=[], expect=EXPECT_RUNNING, wait=True, show_cmd=False): self.test = test self._brokers=[] self.name = "cluster%d" % Cluster._cluster_count Cluster._cluster_count += 1 # Use unique cluster name self.args = copy(args) self.args += [ "--cluster-name", "%s-%s:%d" % (self.name, socket.gethostname(), os.getpid()) ] self.args += [ "--log-enable=info+", "--log-enable=debug+:cluster"] assert BrokerTest.cluster_lib, "Cannot locate cluster plug-in" self.args += [ "--load-module", BrokerTest.cluster_lib ] self.start_n(count, expect=expect, wait=wait, show_cmd=show_cmd) def start(self, name=None, expect=EXPECT_RUNNING, wait=True, args=[], port=0, show_cmd=False): """Add a broker to the cluster. Returns the index of the new broker.""" if not name: name="%s-%d" % (self.name, len(self._brokers)) self._brokers.append(self.test.broker(self.args+args, name, expect, wait, port=port, show_cmd=show_cmd)) return self._brokers[-1] def ready(self): for b in self: b.ready() def start_n(self, count, expect=EXPECT_RUNNING, wait=True, args=[], show_cmd=False): for i in range(count): self.start(expect=expect, wait=wait, args=args, show_cmd=show_cmd) # Behave like a list of brokers. def __len__(self): return len(self._brokers) def __getitem__(self,index): return self._brokers[index] def __iter__(self): return self._brokers.__iter__() class BrokerTest(TestCase): """ Tracks processes started by test and kills at end of test. Provides a well-known working directory for each test. """ # Environment settings. qpidd_exec = os.path.abspath(checkenv("QPIDD_EXEC")) cluster_lib = os.getenv("CLUSTER_LIB") ha_lib = os.getenv("HA_LIB") xml_lib = os.getenv("XML_LIB") qpid_config_exec = os.getenv("QPID_CONFIG_EXEC") qpid_route_exec = os.getenv("QPID_ROUTE_EXEC") receiver_exec = os.getenv("RECEIVER_EXEC") sender_exec = os.getenv("SENDER_EXEC") sql_store_lib = os.getenv("STORE_SQL_LIB") sql_clfs_store_lib = os.getenv("STORE_SQL_CLFS_LIB") sql_catalog = os.getenv("STORE_CATALOG") store_lib = os.getenv("STORE_LIB") test_store_lib = os.getenv("TEST_STORE_LIB") rootdir = os.getcwd() def configure(self, config): self.config=config def setUp(self): outdir = self.config.defines.get("OUTDIR") or "brokertest.tmp" self.dir = os.path.join(self.rootdir, outdir, self.id()) os.makedirs(self.dir) os.chdir(self.dir) self.stopem = [] # things to stop at end of test def tearDown(self): err = [] for p in self.stopem: try: p.stop() except Exception, e: err.append(str(e)) self.stopem = [] # reset in case more processes start os.chdir(self.rootdir) if err: raise Exception("Unexpected process status:\n "+"\n ".join(err)) def cleanup_stop(self, stopable): """Call thing.stop at end of test""" self.stopem.append(stopable) def popen(self, cmd, expect=EXPECT_EXIT_OK, stdin=None, stdout=FILE, stderr=FILE): """Start a process that will be killed at end of test, in the test dir.""" os.chdir(self.dir) p = Popen(cmd, expect, stdin=stdin, stdout=stdout, stderr=stderr) self.cleanup_stop(p) return p def broker(self, args=[], name=None, expect=EXPECT_RUNNING, wait=True, port=0, log_level=None, show_cmd=False): """Create and return a broker ready for use""" b = Broker(self, args=args, name=name, expect=expect, port=port, log_level=log_level, show_cmd=show_cmd) if (wait): try: b.ready() except Exception, e: raise RethrownException("Failed to start broker %s(%s): %s" % (b.name, b.log, e)) return b def cluster(self, count=0, args=[], expect=EXPECT_RUNNING, wait=True, show_cmd=False): """Create and return a cluster ready for use""" cluster = Cluster(self, count, args, expect=expect, wait=wait, show_cmd=show_cmd) return cluster def browse(self, session, queue, timeout=0, transform=lambda m: m.content): """Return a list with the contents of each message on queue.""" r = session.receiver("%s;{mode:browse}"%(queue)) r.capacity = 100 try: contents = [] try: while True: contents.append(transform(r.fetch(timeout=timeout))) except messaging.Empty: pass finally: r.close() return contents def assert_browse(self, session, queue, expect_contents, timeout=0, transform=lambda m: m.content): """Assert that the contents of messages on queue (as retrieved using session and timeout) exactly match the strings in expect_contents""" actual_contents = self.browse(session, queue, timeout, transform=transform) self.assertEqual(expect_contents, actual_contents) def assert_browse_retry(self, session, queue, expect_contents, timeout=1, delay=.01, transform=lambda m:m.content): """Wait up to timeout for contents of queue to match expect_contents""" test = lambda: self.browse(session, queue, 0, transform=transform) == expect_contents retry(test, timeout, delay) self.assertEqual(expect_contents, self.browse(session, queue, 0, transform=transform)) def join(thread, timeout=10): thread.join(timeout) if thread.isAlive(): raise Exception("Timed out joining thread %s"%thread) class RethrownException(Exception): """Captures the stack trace of the current exception to be thrown later""" def __init__(self, msg=""): Exception.__init__(self, msg+"\n"+format_exc()) class StoppableThread(Thread): """ Base class for threads that do something in a loop and periodically check to see if they have been stopped. """ def __init__(self): self.stopped = False self.error = None Thread.__init__(self) def stop(self): self.stopped = True join(self) if self.error: raise self.error class NumberedSender(Thread): """ Thread to run a sender client and send numbered messages until stopped. """ def __init__(self, broker, max_depth=None, queue="test-queue", connection_options=Cluster.CONNECTION_OPTIONS, failover_updates=True, url=None): """ max_depth: enable flow control, ensure sent - received <= max_depth. Requires self.notify_received(n) to be called each time messages are received. """ Thread.__init__(self) cmd = ["qpid-send", "--broker", url or broker.host_port(), "--address", "%s;{create:always}"%queue, "--connection-options", "{%s}"%(connection_options), "--content-stdin" ] if failover_updates: cmd += ["--failover-updates"] self.sender = broker.test.popen( cmd, expect=EXPECT_RUNNING, stdin=PIPE) self.condition = Condition() self.max = max_depth self.received = 0 self.stopped = False self.error = None def write_message(self, n): self.sender.stdin.write(str(n)+"\n") self.sender.stdin.flush() def run(self): try: self.sent = 0 while not self.stopped: self.sender.assert_running() if self.max: self.condition.acquire() while not self.stopped and self.sent - self.received > self.max: self.condition.wait() self.condition.release() self.write_message(self.sent) self.sent += 1 except Exception: self.error = RethrownException(self.sender.pname) def notify_received(self, count): """Called by receiver to enable flow control. count = messages received so far.""" self.condition.acquire() self.received = count self.condition.notify() self.condition.release() def stop(self): self.condition.acquire() try: self.stopped = True self.condition.notify() finally: self.condition.release() join(self) self.write_message(-1) # end-of-messages marker. if self.error: raise self.error class NumberedReceiver(Thread): """ Thread to run a receiver client and verify it receives sequentially numbered messages. """ def __init__(self, broker, sender=None, queue="test-queue", connection_options=Cluster.CONNECTION_OPTIONS, failover_updates=True, url=None): """ sender: enable flow control. Call sender.received(n) for each message received. """ Thread.__init__(self) self.test = broker.test cmd = ["qpid-receive", "--broker", url or broker.host_port(), "--address", "%s;{create:always}"%queue, "--connection-options", "{%s}"%(connection_options), "--forever" ] if failover_updates: cmd += [ "--failover-updates" ] self.receiver = self.test.popen( cmd, expect=EXPECT_RUNNING, stdout=PIPE) self.lock = Lock() self.error = None self.sender = sender self.received = 0 def read_message(self): n = int(self.receiver.stdout.readline()) return n def run(self): try: m = self.read_message() while m != -1: self.receiver.assert_running() assert(m <= self.received) # Check for missing messages if (m == self.received): # Ignore duplicates self.received += 1 if self.sender: self.sender.notify_received(self.received) m = self.read_message() except Exception: self.error = RethrownException(self.receiver.pname) def check(self): """Raise an exception if there has been an error""" if self.error: raise self.error def stop(self): """Returns when termination message is received""" join(self) self.check() class ErrorGenerator(StoppableThread): """ Thread that continuously generates errors by trying to consume from a non-existent queue. For cluster regression tests, error handling caused issues in the past. """ def __init__(self, broker): StoppableThread.__init__(self) self.broker=broker broker.test.cleanup_stop(self) self.start() def run(self): c = self.broker.connect_old() try: while not self.stopped: try: c.session(str(qpid.datatypes.uuid4())).message_subscribe( queue="non-existent-queue") assert(False) except qpid.session.SessionException: pass time.sleep(0.01) except: pass # Normal if broker is killed. def import_script(path): """ Import executable script at path as a module. Requires some trickery as scripts are not in standard module format """ f = open(path) try: name=os.path.split(path)[1].replace("-","_") return imp.load_module(name, f, path, ("", "r", imp.PY_SOURCE)) finally: f.close() qpidc-0.16/src/tests/windows/0000775000076400007640000000000011752725716016574 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/windows/DisableWin32ErrorWindows.cpp0000664000076400007640000000517511564625557024066 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ // This file intends to prevent Windows from throwing up error boxes and // offering to debug when serious errors happen. The errors are displayed // on stderr instead. The purpose of this is to allow the tests to proceed // scripted and catch the text for logging. If this behavior is desired, // include this file with the executable being built. If the default // behaviors are desired, don't include this file in the build. #if defined(_MSC_VER) #include #endif #include #include namespace { // Instead of popping up a window for exceptions, just print something out LONG _stdcall UnhandledExceptionFilter (PEXCEPTION_POINTERS pExceptionInfo) { DWORD dwExceptionCode = pExceptionInfo->ExceptionRecord->ExceptionCode; if (dwExceptionCode == EXCEPTION_ACCESS_VIOLATION) std::cerr << "\nERROR: ACCESS VIOLATION\n" << std::endl; else std::cerr << "\nERROR: UNHANDLED EXCEPTION\n" << std::endl; return EXCEPTION_EXECUTE_HANDLER; } struct redirect_errors_to_stderr { redirect_errors_to_stderr (); }; static redirect_errors_to_stderr block; redirect_errors_to_stderr::redirect_errors_to_stderr() { #if defined(_MSC_VER) _CrtSetReportMode (_CRT_WARN, _CRTDBG_MODE_FILE); _CrtSetReportFile (_CRT_WARN, _CRTDBG_FILE_STDERR); _CrtSetReportMode (_CRT_ERROR, _CRTDBG_MODE_FILE); _CrtSetReportFile (_CRT_ERROR, _CRTDBG_FILE_STDERR); _CrtSetReportMode (_CRT_ASSERT, _CRTDBG_MODE_FILE); _CrtSetReportFile (_CRT_ASSERT, _CRTDBG_FILE_STDERR); #endif // Prevent the system from displaying the critical-error-handler // and can't-open-file message boxes. SetErrorMode(SEM_FAILCRITICALERRORS); SetErrorMode(SEM_NOOPENFILEERRORBOX); // And this will catch all unhandled exceptions. SetUnhandledExceptionFilter (&UnhandledExceptionFilter); } } // namespace qpidc-0.16/src/tests/Array.cpp0000664000076400007640000000401311252003060016632 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "qpid/framing/Array.h" #include "qpid/framing/FieldValue.h" #include "unit_test.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ArrayTestSuite) using namespace qpid::framing; void populate(std::vector& data, int count = 10) { for (int i = 0; i < count; i++) { std::stringstream out; out << "item-" << i; data.push_back(out.str()); } } QPID_AUTO_TEST_CASE(testEncodeDecode) { std::vector data; populate(data); Array a(data); char buff[200]; Buffer wbuffer(buff, 200); a.encode(wbuffer); Array b; Buffer rbuffer(buff, 200); b.decode(rbuffer); BOOST_CHECK_EQUAL(a, b); std::vector data2; b.collect(data2); //BOOST_CHECK_EQUAL(data, data2); BOOST_CHECK(data == data2); } QPID_AUTO_TEST_CASE(testArrayAssignment) { std::vector data; populate(data); Array b; { Array a(data); b = a; BOOST_CHECK_EQUAL(a, b); } std::vector data2; b.collect(data2); //BOOST_CHECK_EQUAL(data, data2); BOOST_CHECK(data == data2); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/test_env.ps1.in0000664000076400007640000000565511722753241017765 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Environment variables substituted by configure/cmake. $srcdir="@abs_srcdir@" $builddir="@abs_builddir@" $top_srcdir="@abs_top_srcdir@" $top_builddir="@abs_top_builddir@" $moduledir="$top_builddir\src@builddir_lib_suffix@" $testmoduledir="$builddir@builddir_lib_suffix@" # Python paths and directories $PYTHON_DIR="$builddir\python" $QPID_PYTHON_TEST="$PYTHON_DIR\commands\qpid-python-test" if ( !(Test-Path "$PYTHON_DIR") -and (Test-Path "$top_srcdir\..\python")) { $PYTHON_DIR="$top_srcdir\..\python" $QPID_PYTHON_TEST="$PYTHON_DIR\qpid-python-test" } $QPID_TESTS="$top_srcdir\..\tests" $QPID_TESTS_PY="$QPID_TESTS\src\py" $QPID_TOOLS="$top_srcdir\..\tools" $QPID_TOOLS_LIBS="$QPID_TOOLS\src\py" $QMF_LIB="$top_srcdir\..\extras\qmf\src\py" $PYTHON_COMMANDS="$QPID_TOOLS\src\py" $env:PYTHONPATH="$srcdir;$PYTHON_DIR;$PYTHON_COMMANDS;$QPID_TESTS_PY;$QPID_TOOLS_LIBS;$QMF_LIB;$env:PYTHONPATH" $QPID_CONFIG_EXEC="$PYTHON_COMMANDS\qpid-config" $QPID_ROUTE_EXEC="$PYTHON_COMMANDS\qpid-route" $QPID_CLUSTER_EXEC="$PYTHON_COMMANDS\qpid-cluster" $QPID_HA_TOOL_EXEC="$PYTHON_COMMANDS\qpid-ha-tool" # Executables $env:QPIDD_EXEC="$top_builddir\src\qpidd" $env:QPID_WATCHDOG_EXEC="$top_builddir\src\qpidd_watchdog" # Test executables $QPID_TEST_EXEC_DIR="$builddir" $RECEIVER_EXEC="$QPID_TEST_EXEC_DIR\receiver" $SENDER_EXEC="$QPID_TEST_EXEC_DIR\sender" # Path $env:PATH="$top_builddir\src;$builddir;$srcdir;$PYTHON_COMMANDS;$QPID_TEST_EXEC_DIR;$env:PATH" # Modules $env:TEST_STORE_LIB="$testmoduledir\test_store.so" #exportmodule() { test -f $moduledir/$2 && eval "export $1=$moduledir/$2"; } #exportmodule ACL_LIB acl.so #exportmodule CLUSTER_LIB cluster.so #exportmodule REPLICATING_LISTENER_LIB replicating_listener.so #exportmodule REPLICATION_EXCHANGE_LIB replication_exchange.so #exportmodule SSLCONNECTOR_LIB sslconnector.so #exportmodule SSL_LIB ssl.so #exportmodule WATCHDOG_LIB watchdog.so #exportmodule XML_LIB xml.so # Qpid options $env:QPID_NO_MODULE_DIR="1" # Don't accidentally load installed modules $env:QPID_DATA_DIR= # Default to no data dir, not ~/.qpidd # Options for boost test framework $env:BOOST_TEST_SHOW_PROGRESS="yes" $env:BOOST_TEST_CATCH_SYSTEM_ERRORS="no" qpidc-0.16/src/tests/run_test.ps10000664000076400007640000000442011721742044017357 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # $srcdir = Split-Path $myInvocation.InvocationName # Set up environment and run a test executable or script. . .\test_env.ps1 # The test exe is probably not in the current binary dir - it's usually # placed in a subdirectory based on the configuration built in Visual Studio. # So check around to see where it is - when located, set the QPID_LIB_DIR # and PATH to look in the corresponding configuration off the src directory, # one level up. $prog = $args[0] $is_script = $prog -match ".ps1$" if (!$is_script -and !(Test-Path "$prog")) { . $srcdir\find_prog.ps1 $prog $args[0] = $prog $env:QPID_LIB_DIR = "..\$sub" $env:PATH += ";$dir\$sub;..\$sub" } # If qpidd.port exists and is not empty run test with QPID_PORT set. if (Test-Path qpidd.port) { set-item -path env:QPID_PORT -value (get-content -path qpidd.port -totalcount 1) } $si = new-object System.Diagnostics.ProcessStartInfo $si.WorkingDirectory = $pwd $si.UseShellExecute = $false $si.CreateNoWindow = $true $si.RedirectStandardOutput = $true if ($is_script) { $si.FileName = (get-command powershell.exe).Definition $si.Arguments = $args } else { $si.FileName = $args[0] if ($args.length -gt 1) { $si.Arguments = $args[1..($args.length-1)] } } $p = [System.Diagnostics.Process]::Start($si) $line = "" while (($line = $p.StandardOutput.ReadLine()) -ne $null) { $line } # ReadToEnd() works, but doesn't show any output until the program exits. #$p.StandardOutput.ReadToEnd() $p.WaitForExit() $status = $p.ExitCode exit $status qpidc-0.16/src/tests/unit_test.cpp0000664000076400007640000000141511227114422017604 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ // Defines test_main function to link with actual unit test code. #define BOOST_AUTO_TEST_MAIN // Boost 1.33 #define BOOST_TEST_MAIN #include "unit_test.h" qpidc-0.16/src/tests/python_tests.ps10000664000076400007640000000257311721742044020266 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the python tests; intended to be run by run_test.ps1 which sets up # QPID_PORT $srcdir = Split-Path $myInvocation.InvocationName $PYTHON_DIR = "$srcdir\..\..\..\python" if (!(Test-Path $PYTHON_DIR -pathType Container)) { "Skipping python tests as python libs not found" exit 1 } . .\test_env.ps1 if (Test-Path env:FAILING) { $fails = "-I $env:FAILING" } if (Test-Path env:PYTHON_TESTS) { $tests = "$env:PYTHON_TESTS" } else { $tests = "$args" } python $PYTHON_DIR/qpid-python-test -m qpid_tests.broker_0_10 -m qpid.tests -b localhost:$env:QPID_PORT $fails $tests exit $LASTEXITCODE qpidc-0.16/src/tests/background.ps10000664000076400007640000000400111261750600017622 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run a PowerShell scriptblock in a background process. param( [scriptblock] $script # scriptblock to run ) # break out of the script on any errors trap { break } # In order to pass a scriptblock to another powershell instance, it must # be encoded to pass through the command line. $encodedScript = [convert]::ToBase64String( [Text.Encoding]::Unicode.GetBytes([string] $script)) #$p = new-object System.Diagnostics.Process $si = new-object System.Diagnostics.ProcessStartInfo $si.WorkingDirectory = $pwd $si.FileName = (get-command powershell.exe).Definition $si.Arguments = "-encodedCommand $encodedScript" ###### debugging setup #$si.CreateNoWindow = $true # UseShellExecute false required for RedirectStandard(Error, Output) #$si.UseShellExecute = $false #$si.RedirectStandardError = $true #$si.RedirectStandardOutput = $true ###### $si.UseShellExecute = $true ##### Debugging, instead of the plain Start() above. #$output = [io.File]::AppendText("start.out") #$error = [io.File]::AppendText("start.err") $p = [System.Diagnostics.Process]::Start($si) #$output.WriteLine($p.StandardOutput.ReadToEnd()) #$error.WriteLine($p.StandardError.ReadToEnd()) #$p.WaitForExit() #$output.Close() qpidc-0.16/src/tests/test_tools.h0000664000076400007640000000667111460107335017447 0ustar00jrossjross00000000000000#ifndef TEST_TOOLS_H #define TEST_TOOLS_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/Logger.h" #include // Include before boost/test headers. #include #include #include #include #include #include #include #include // Print a sequence template std::ostream& seqPrint(std::ostream& o, const T& seq) { std::copy(seq.begin(), seq.end(), std::ostream_iterator(o, " ")); return o; } // Compare sequences template bool seqEqual(const T& a, const U& b) { typename T::const_iterator i = a.begin(); typename U::const_iterator j = b.begin(); while (i != a.end() && j != b.end() && *i == *j) { ++i; ++j; } return (i == a.end()) && (j == b.end()); } // ostream and == operators so we can compare vectors and sets with // boost::assign::list_of with BOOST_CHECK_EQUALS namespace std { // In namespace std so boost can find them. template ostream& operator<<(ostream& o, const vector& v) { return seqPrint(o, v); } template ostream& operator<<(ostream& o, const set& v) { return seqPrint(o, v); } template ostream& operator<<(ostream& o, const boost::assign_detail::generic_list& l) { return seqPrint(o, l); } template bool operator == (const vector& a, const boost::assign_detail::generic_list& b) { return seqEqual(a, b); } template bool operator == (const boost::assign_detail::generic_list& b, const vector& a) { return seqEqual(a, b); } template bool operator == (const set& a, const boost::assign_detail::generic_list& b) { return seqEqual(a, b); } template bool operator == (const boost::assign_detail::generic_list& b, const set& a) { return seqEqual(a, b); } } namespace qpid { namespace tests { /** Check if types of two objects (as given by typeinfo::name()) match. */ #define BOOST_CHECK_TYPEID_EQUAL(a,b) BOOST_CHECK_EQUAL(typeid(a).name(),typeid(b).name()) /** * Supress all logging in a scope, restore to previous configuration in destructor. */ struct ScopedSuppressLogging { typedef qpid::log::Logger Logger; ScopedSuppressLogging(Logger& l=Logger::instance()) : logger(l), opts(l.getOptions()) { l.clear(); } ~ScopedSuppressLogging() { logger.configure(opts); } Logger& logger; qpid::log::Options opts; }; inline std::string getLibPath(const char* envName, const char* defaultPath = 0) { const char* p = std::getenv(envName); if (p != 0) return p; if (defaultPath == 0) { std::ostringstream msg; msg << "Environment variable " << envName << " not set."; throw std::runtime_error(msg.str()); } return defaultPath; } }} // namespace qpid::tests #endif /*!TEST_TOOLS_H*/ qpidc-0.16/src/tests/run_cluster_authentication_soak0000775000076400007640000000163711461642640023507 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. source ./test_env.sh source $srcdir/ais_check source sasl_test_setup.sh with_ais_group ./cluster_authentication_soak 500 qpidc-0.16/src/tests/run_test0000775000076400007640000000520511534154741016665 0ustar00jrossjross00000000000000#!/bin/bash # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Set up environment and run a test executable or script. # # Output nothing if test passes, show the output if it fails and # leave output in .log for examination. # # If qpidd.port exists and is not empty run test with QPID_PORT=`cat qpidd.port` # # If $VALGRIND if is set run under valgrind. If there are valgrind # erros show valgrind output, also leave it in .valgrind for # examination. # srcdir=`dirname $0` source ./test_env.sh source $srcdir/vg_check # Export variables from makefile. export srcdir # Set QPID_PORT if qpidd.port exists. test -s qpidd.port && QPID_PORT=`cat qpidd.port` export QPID_PORT # Avoid silly libtool error messages if these are not defined test -z "$LC_ALL" && LC_ALL= test -z "$LC_CTYPE" && LC_CTYPE= test -z "$LC_COLLATE" && LC_COLLATE= test -z "$LC_MESSAGES" && LC_MESSAGES= export LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES VG_LOG="`basename $1`.vglog" rm -f $VG_LOG* # Use VALGRIND_OPTS="--gen-suppressions=all" to generated suppressions VALGRIND_OPTS="$VALGRIND_OPTS --leak-check=full --demangle=yes --suppressions=$srcdir/.valgrind.supp --num-callers=25 --log-file=$VG_LOG -- " ERROR=0 if grep -l "^# Generated by .*libtool" "$1" >/dev/null 2>&1; then # This is a libtool "executable". Valgrind it if VALGRIND specified. test -n "$VALGRIND" && VALGRIND="$VALGRIND $VALGRIND_OPTS" # Hide output unless there's an error. $LIBTOOL --mode=execute $VALGRIND "$@" 2>&1 || ERROR=1 test -n "$VALGRIND" && { vg_check $VG_LOG* || ERROR=1 ; } elif file $1 | grep -q text; then # This is a non-libtool shell script, just execute it. exec "$@" else # This is a real executable, valgrind it. test -n "$VALGRIND" && VALGRIND="$VALGRIND $VALGRIND_OPTS" # Hide output unless there's an error. $VALGRIND "$@" 2>&1 || ERROR=1 test -n "$VALGRIND" && { vg_check $VG_LOG* || ERROR=1 ; } fi exit $ERROR qpidc-0.16/src/tests/FieldTable.cpp0000664000076400007640000001372011252003060017554 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/Array.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/FieldValue.h" #include "qpid/framing/List.h" #include "qpid/sys/alloca.h" #include "unit_test.h" using namespace qpid::framing; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(FieldTableTestSuite) QPID_AUTO_TEST_CASE(testMe) { FieldTable ft; ft.setString("A", "BCDE"); BOOST_CHECK(string("BCDE") == ft.getAsString("A")); char buff[100]; Buffer wbuffer(buff, 100); wbuffer.put(ft); Buffer rbuffer(buff, 100); FieldTable ft2; rbuffer.get(ft2); BOOST_CHECK(string("BCDE") == ft2.getAsString("A")); } QPID_AUTO_TEST_CASE(testAssignment) { FieldTable a; FieldTable b; a.setString("A", "BBBB"); a.setInt("B", 1234); b = a; a.setString("A", "CCCC"); BOOST_CHECK(string("CCCC") == a.getAsString("A")); BOOST_CHECK(string("BBBB") == b.getAsString("A")); BOOST_CHECK_EQUAL(1234, a.getAsInt("B")); BOOST_CHECK_EQUAL(1234, b.getAsInt("B")); BOOST_CHECK(IntegerValue(1234) == *a.get("B")); BOOST_CHECK(IntegerValue(1234) == *b.get("B")); FieldTable d; { FieldTable c; c = a; char* buff = static_cast(::alloca(c.encodedSize())); Buffer wbuffer(buff, c.encodedSize()); wbuffer.put(c); Buffer rbuffer(buff, c.encodedSize()); rbuffer.get(d); BOOST_CHECK_EQUAL(c, d); BOOST_CHECK(string("CCCC") == c.getAsString("A")); BOOST_CHECK(IntegerValue(1234) == *c.get("B")); } BOOST_CHECK(string("CCCC") == d.getAsString("A")); BOOST_CHECK(IntegerValue(1234) == *d.get("B")); } QPID_AUTO_TEST_CASE(testNestedValues) { double d = 1.2345; uint32_t u = 101; char buff[1000]; { FieldTable a; FieldTable b; std::vector items; items.push_back("one"); items.push_back("two"); Array c(items); List list; list.push_back(List::ValuePtr(new Str16Value("red"))); list.push_back(List::ValuePtr(new Unsigned32Value(u))); list.push_back(List::ValuePtr(new Str8Value("yellow"))); list.push_back(List::ValuePtr(new DoubleValue(d))); a.setString("id", "A"); b.setString("id", "B"); a.setTable("B", b); a.setArray("C", c); a.set("my-list", FieldTable::ValuePtr(new ListValue(list))); Buffer wbuffer(buff, 100); wbuffer.put(a); } { Buffer rbuffer(buff, 100); FieldTable a; FieldTable b; Array c; rbuffer.get(a); BOOST_CHECK(string("A") == a.getAsString("id")); a.getTable("B", b); BOOST_CHECK(string("B") == b.getAsString("id")); a.getArray("C", c); std::vector items; c.collect(items); BOOST_CHECK((uint) 2 == items.size()); BOOST_CHECK(string("one") == items[0]); BOOST_CHECK(string("two") == items[1]); List list; BOOST_CHECK(a.get("my-list")->get(list)); List::const_iterator i = list.begin(); BOOST_CHECK(i != list.end()); BOOST_CHECK_EQUAL(std::string("red"), (*i)->get()); i++; BOOST_CHECK(i != list.end()); BOOST_CHECK_EQUAL(u, (uint32_t) (*i)->get()); i++; BOOST_CHECK(i != list.end()); BOOST_CHECK_EQUAL(std::string("yellow"), (*i)->get()); i++; BOOST_CHECK(i != list.end()); BOOST_CHECK_EQUAL(d, (*i)->get()); i++; BOOST_CHECK(i == list.end()); } } QPID_AUTO_TEST_CASE(testFloatAndDouble) { char buff[100]; float f = 5.672f; double d = 56.720001; { FieldTable a; a.setString("string", "abc"); a.setInt("int", 5672); a.setFloat("float", f); a.setDouble("double", d); Buffer wbuffer(buff, 100); wbuffer.put(a); } { Buffer rbuffer(buff, 100); FieldTable a; rbuffer.get(a); BOOST_CHECK(string("abc") == a.getAsString("string")); BOOST_CHECK(5672 == a.getAsInt("int")); float f2; BOOST_CHECK(!a.getFloat("string", f2)); BOOST_CHECK(!a.getFloat("int", f2)); BOOST_CHECK(a.getFloat("float", f2)); BOOST_CHECK(f2 == f); double d2; BOOST_CHECK(!a.getDouble("string", d2)); BOOST_CHECK(!a.getDouble("int", d2)); BOOST_CHECK(a.getDouble("double", d2)); BOOST_CHECK(d2 == d); } } QPID_AUTO_TEST_CASE(test64GetAndSetConverts) { FieldTable args; args.setInt64("a",100); args.setInt64("b",-(int64_t) ((int64_t) 1<<34)); args.setUInt64("c",1u); args.setUInt64("d",(uint64_t) ((uint64_t) 1<<34)); BOOST_CHECK_EQUAL(1u, args.getAsUInt64("c")); BOOST_CHECK_EQUAL(100u, args.getAsUInt64("a")); BOOST_CHECK_EQUAL(1, args.getAsInt64("c")); BOOST_CHECK_EQUAL(100, args.getAsInt64("a")); BOOST_CHECK_EQUAL(-(int64_t) ((int64_t) 1<<34), args.getAsInt64("b")); BOOST_CHECK_EQUAL((uint64_t) ((uint64_t) 1<<34), args.getAsUInt64("d")); BOOST_CHECK_EQUAL((int64_t) ((int64_t) 1<<34), args.getAsInt64("d")); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/sasl_fed_ex_queue_cluster0000775000076400007640000000161511540546671022250 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh source ${srcdir}/ais_check with_ais_group ${srcdir}/sasl_fed_ex queue cluster qpidc-0.16/src/tests/start_cluster0000775000076400007640000000276011654250703017721 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Start a cluster of brokers on local host, put the list of ports for cluster members in cluster.ports # # Execute command with the ais group set. source ./test_env.sh . `dirname $0`/ais_check rm -f cluster*.log cluster.ports qpidd.port SIZE=${1:-3}; shift CLUSTER=$HOSTNAME.$$ OPTS="-d --no-module-dir --load-module $CLUSTER_LIB --cluster-name=$CLUSTER --auth=no --log-enable notice+ --log-enable debug+:cluster $@" for (( i=0; i> cluster.ports done head -n 1 cluster.ports > qpidd.port # First member's port for tests. qpidc-0.16/src/tests/TestMessageStore.h0000664000076400007640000000356511252003060020475 0ustar00jrossjross00000000000000#ifndef _tests_TestMessageStore_h #define _tests_TestMessageStore_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/NullMessageStore.h" #include using namespace qpid; using namespace qpid::broker; using namespace qpid::framing; namespace qpid { namespace tests { typedef std::pair > msg_queue_pair; class TestMessageStore : public NullMessageStore { public: std::vector > dequeued; std::vector enqueued; void dequeue(TransactionContext*, const boost::intrusive_ptr& msg, const PersistableQueue& /*queue*/) { dequeued.push_back(msg); } void enqueue(TransactionContext*, const boost::intrusive_ptr& msg, const PersistableQueue& queue) { msg->enqueueComplete(); enqueued.push_back(msg_queue_pair(queue.getName(), msg)); } TestMessageStore() : NullMessageStore() {} ~TestMessageStore(){} }; }} // namespace qpid::tests #endif qpidc-0.16/src/tests/FieldValue.cpp0000664000076400007640000000531311252003060017600 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/framing/FieldValue.h" #include "unit_test.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(FieldValueTestSuite) using namespace qpid::framing; Str16Value s("abc"); IntegerValue i(42); //DecimalValue d(1234,2); //FieldTableValue ft; //EmptyValue e; QPID_AUTO_TEST_CASE(testStr16ValueEquals) { BOOST_CHECK(Str16Value("abc") == s); BOOST_CHECK(Str16Value("foo") != s); BOOST_CHECK(s != i); BOOST_CHECK(s.convertsTo() == true); BOOST_CHECK(s.convertsTo() == false); BOOST_CHECK(s.get() == "abc"); BOOST_CHECK_THROW(s.get(), InvalidConversionException); // BOOST_CHECK(s != ft); } QPID_AUTO_TEST_CASE(testIntegerValueEquals) { BOOST_CHECK(IntegerValue(42) == i); BOOST_CHECK(IntegerValue(5) != i); BOOST_CHECK(i != s); BOOST_CHECK(i.convertsTo() == false); BOOST_CHECK(i.convertsTo() == true); BOOST_CHECK_THROW(i.get(), InvalidConversionException); BOOST_CHECK(i.get() == 42); // BOOST_CHECK(i != ft); } #if 0 QPID_AUTO_TEST_CASE(testDecimalValueEquals) { BOOST_CHECK(DecimalValue(1234, 2) == d); BOOST_CHECK(DecimalValue(12345, 2) != d); BOOST_CHECK(DecimalValue(1234, 3) != d); BOOST_CHECK(d != s); } QPID_AUTO_TEST_CASE(testFieldTableValueEquals) { ft.getValue().setString("foo", "FOO"); ft.getValue().setInt("magic", 7); BOOST_CHECK_EQUAL(std::string("FOO"), ft.getValue().getString("foo")); BOOST_CHECK_EQUAL(7, ft.getValue().getInt("magic")); FieldTableValue f2; BOOST_CHECK(ft != f2); f2.getValue().setString("foo", "FOO"); BOOST_CHECK(ft != f2); f2.getValue().setInt("magic", 7); BOOST_CHECK_EQUAL(ft,f2); BOOST_CHECK(ft == f2); f2.getValue().setString("foo", "BAR"); BOOST_CHECK(ft != f2); BOOST_CHECK(ft != i); } #endif QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/QueueRegistryTest.cpp0000664000076400007640000000535111455656100021255 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/Queue.h" #include "unit_test.h" #include using namespace qpid::broker; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(QueueRegistryTest) QPID_AUTO_TEST_CASE(testDeclare) { std::string foo("foo"); std::string bar("bar"); QueueRegistry reg; std::pair qc; qc = reg.declare(foo, false, 0, 0); Queue::shared_ptr q = qc.first; BOOST_CHECK(q); BOOST_CHECK(qc.second); // New queue BOOST_CHECK_EQUAL(foo, q->getName()); qc = reg.declare(foo, false, 0, 0); BOOST_CHECK_EQUAL(q, qc.first); BOOST_CHECK(!qc.second); qc = reg.declare(bar, false, 0, 0); q = qc.first; BOOST_CHECK(q); BOOST_CHECK_EQUAL(true, qc.second); BOOST_CHECK_EQUAL(bar, q->getName()); } QPID_AUTO_TEST_CASE(testDeclareTmp) { QueueRegistry reg; std::pair qc; qc = reg.declare(std::string(), false, 0, 0); BOOST_CHECK(qc.second); BOOST_CHECK_EQUAL(std::string("tmp_1"), qc.first->getName()); } QPID_AUTO_TEST_CASE(testFind) { std::string foo("foo"); std::string bar("bar"); QueueRegistry reg; std::pair qc; BOOST_CHECK(reg.find(foo) == 0); reg.declare(foo, false, 0, 0); reg.declare(bar, false, 0, 0); Queue::shared_ptr q = reg.find(bar); BOOST_CHECK(q); BOOST_CHECK_EQUAL(bar, q->getName()); } QPID_AUTO_TEST_CASE(testDestroy) { std::string foo("foo"); QueueRegistry reg; std::pair qc; qc = reg.declare(foo, false, 0, 0); reg.destroy(foo); // Queue is gone from the registry. BOOST_CHECK(reg.find(foo) == 0); // Queue is not actually destroyed till we drop our reference. BOOST_CHECK_EQUAL(foo, qc.first->getName()); // We shoud be the only reference. BOOST_CHECK_EQUAL(1L, qc.first.use_count()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/run_acl_tests0000775000076400007640000000412311725221314017656 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the acl tests. $srcdir is set by the Makefile. source ./test_env.sh DATA_DIR=`pwd`/data_dir trap stop_brokers INT TERM QUIT start_brokers() { ../qpidd --daemon --port 0 --no-module-dir --data-dir $DATA_DIR --load-module $ACL_LIB --acl-file policy.acl --auth no > qpidd.port LOCAL_PORT=`cat qpidd.port` } stop_brokers() { $QPIDD_EXEC --no-module-dir -q --port $LOCAL_PORT } test_loading_acl_from_absolute_path(){ POLICY_FILE=$srcdir/policy.acl rm -f temp.log PORT=`../qpidd --daemon --port 0 --no-module-dir --no-data-dir --auth no --load-module $ACL_LIB --acl-file $POLICY_FILE -t --log-to-file temp.log 2>/dev/null` ACL_FILE=`grep "notice ACL: Read file" temp.log | sed 's/^.*Read file //'` $QPIDD_EXEC --no-module-dir -q --port $PORT if test "$ACL_FILE" != "\"$POLICY_FILE\""; then echo "unable to load policy file from an absolute path"; return 1; fi rm temp.log } if test -d ${PYTHON_DIR} ; then rm -rf $DATA_DIR mkdir -p $DATA_DIR cp $srcdir/policy.acl $DATA_DIR start_brokers echo "Running acl tests using brokers on ports $LOCAL_PORT" $QPID_PYTHON_TEST -b localhost:$LOCAL_PORT -m acl || EXITCODE=1 stop_brokers || EXITCODE=1 test_loading_acl_from_absolute_path || EXITCODE=1 rm -rf $DATA_DIR exit $EXITCODE fi qpidc-0.16/src/tests/qpid-receive.cpp0000664000076400007640000002752211717465066020173 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include #include "qpid/sys/Time.h" #include "TestOptions.h" #include "Statistics.h" #include #include using namespace qpid::messaging; using namespace qpid::types; using namespace std; namespace qpid { namespace tests { struct Options : public qpid::Options { bool help; std::string url; std::string address; std::string connectionOptions; int64_t timeout; bool forever; uint messages; bool ignoreDuplicates; bool verifySequence; bool checkRedelivered; uint capacity; uint ackFrequency; uint tx; uint rollbackFrequency; bool printContent; bool printHeaders; bool failoverUpdates; qpid::log::Options log; bool reportTotal; uint reportEvery; bool reportHeader; string readyAddress; uint receiveRate; Options(const std::string& argv0=std::string()) : qpid::Options("Options"), help(false), url("amqp:tcp:127.0.0.1"), timeout(0), forever(false), messages(0), ignoreDuplicates(false), verifySequence(false), checkRedelivered(false), capacity(1000), ackFrequency(100), tx(0), rollbackFrequency(0), printContent(true), printHeaders(false), failoverUpdates(false), log(argv0), reportTotal(false), reportEvery(0), reportHeader(true), receiveRate(0) { addOptions() ("broker,b", qpid::optValue(url, "URL"), "url of broker to connect to") ("address,a", qpid::optValue(address, "ADDRESS"), "address to receive from") ("connection-options", qpid::optValue(connectionOptions, "OPTIONS"), "options for the connection") ("timeout", qpid::optValue(timeout, "TIMEOUT"), "timeout in seconds to wait before exiting") ("forever,f", qpid::optValue(forever), "ignore timeout and wait forever") ("messages,m", qpid::optValue(messages, "N"), "Number of messages to receive; 0 means receive indefinitely") ("ignore-duplicates", qpid::optValue(ignoreDuplicates), "Detect and ignore duplicates (by checking 'sn' header)") ("verify-sequence", qpid::optValue(verifySequence), "Verify there are no gaps in the message sequence (by checking 'sn' header)") ("check-redelivered", qpid::optValue(checkRedelivered), "Fails with exception if a duplicate is not marked as redelivered (only relevant when ignore-duplicates is selected)") ("capacity", qpid::optValue(capacity, "N"), "Pre-fetch window (0 implies no pre-fetch)") ("ack-frequency", qpid::optValue(ackFrequency, "N"), "Ack frequency (0 implies none of the messages will get accepted)") ("tx", qpid::optValue(tx, "N"), "batch size for transactions (0 implies transaction are not used)") ("rollback-frequency", qpid::optValue(rollbackFrequency, "N"), "rollback frequency (0 implies no transaction will be rolledback)") ("print-content", qpid::optValue(printContent, "yes|no"), "print out message content") ("print-headers", qpid::optValue(printHeaders, "yes|no"), "print out message headers") ("failover-updates", qpid::optValue(failoverUpdates), "Listen for membership updates distributed via amq.failover") ("report-total", qpid::optValue(reportTotal), "Report total throughput and latency statistics") ("report-every", qpid::optValue(reportEvery,"N"), "Report throughput and latency statistics every N messages.") ("report-header", qpid::optValue(reportHeader, "yes|no"), "Headers on report.") ("ready-address", qpid::optValue(readyAddress, "ADDRESS"), "send a message to this address when ready to receive") ("receive-rate", qpid::optValue(receiveRate,"N"), "Receive at rate of N messages/second. 0 means receive as fast as possible.") ("help", qpid::optValue(help), "print this usage statement"); add(log); } Duration getTimeout() { if (forever) return Duration::FOREVER; else return Duration::SECOND*timeout; } bool parse(int argc, char** argv) { try { qpid::Options::parse(argc, argv); if (address.empty()) throw qpid::Exception("Address must be specified!"); qpid::log::Logger::instance().configure(log); if (help) { std::ostringstream msg; std::cout << msg << *this << std::endl << std::endl << "Drains messages from the specified address" << std::endl; return false; } else { return true; } } catch (const std::exception& e) { std::cerr << *this << std::endl << std::endl << e.what() << std::endl; return false; } } }; const string EOS("eos"); const string SN("sn"); /** Check for duplicate or dropped messages by sequence number */ class SequenceTracker { public: SequenceTracker(const Options& o) : opts(o), lastSn(0) {} /** Return true if the message should be procesed, false if it should be ignored. */ bool track(Message& message) { if (!(opts.verifySequence || opts.ignoreDuplicates)) return true; // Not checking sequence numbers. uint sn = message.getProperties()[SN]; bool duplicate = (sn <= lastSn); bool dropped = (sn > lastSn+1); if (opts.verifySequence && dropped) throw Exception(QPID_MSG("Gap in sequence numbers " << lastSn << "-" << sn)); bool ignore = duplicate && opts.ignoreDuplicates; if (ignore && opts.checkRedelivered && !message.getRedelivered()) throw qpid::Exception("duplicate sequence number received, message not marked as redelivered!"); if (!duplicate) lastSn = sn; return !ignore; } private: const Options& opts; uint lastSn; }; }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char ** argv) { Connection connection; try { Options opts; if (opts.parse(argc, argv)) { connection = Connection(opts.url, opts.connectionOptions); connection.open(); std::auto_ptr updates(opts.failoverUpdates ? new FailoverUpdates(connection) : 0); Session session = opts.tx ? connection.createTransactionalSession() : connection.createSession(); Receiver receiver = session.createReceiver(opts.address); receiver.setCapacity(opts.capacity); Message msg; uint count = 0; uint txCount = 0; SequenceTracker sequenceTracker(opts); Duration timeout = opts.getTimeout(); bool done = false; Reporter reporter(std::cout, opts.reportEvery, opts.reportHeader); if (!opts.readyAddress.empty()) session.createSender(opts.readyAddress).send(msg); // For receive rate calculation qpid::sys::AbsTime start = qpid::sys::now(); int64_t interval = 0; if (opts.receiveRate) interval = qpid::sys::TIME_SEC/opts.receiveRate; std::map replyTo; while (!done && receiver.fetch(msg, timeout)) { reporter.message(msg); if (sequenceTracker.track(msg)) { if (msg.getContent() == EOS) { done = true; } else { ++count; if (opts.printHeaders) { if (msg.getSubject().size()) std::cout << "Subject: " << msg.getSubject() << std::endl; if (msg.getReplyTo()) std::cout << "ReplyTo: " << msg.getReplyTo() << std::endl; if (msg.getCorrelationId().size()) std::cout << "CorrelationId: " << msg.getCorrelationId() << std::endl; if (msg.getUserId().size()) std::cout << "UserId: " << msg.getUserId() << std::endl; if (msg.getTtl().getMilliseconds()) std::cout << "TTL: " << msg.getTtl().getMilliseconds() << std::endl; if (msg.getPriority()) std::cout << "Priority: " << msg.getPriority() << std::endl; if (msg.getDurable()) std::cout << "Durable: true" << std::endl; if (msg.getRedelivered()) std::cout << "Redelivered: true" << std::endl; std::cout << "Properties: " << msg.getProperties() << std::endl; std::cout << std::endl; } if (opts.printContent) std::cout << msg.getContent() << std::endl;//TODO: handle map or list messages if (opts.messages && count >= opts.messages) done = true; } } if (opts.tx && (count % opts.tx == 0)) { if (opts.rollbackFrequency && (++txCount % opts.rollbackFrequency == 0)) { session.rollback(); } else { session.commit(); } } else if (opts.ackFrequency && (count % opts.ackFrequency == 0)) { session.acknowledge(); } if (msg.getReplyTo()) { // Echo message back to reply-to address. Sender& s = replyTo[msg.getReplyTo().str()]; if (s.isNull()) { s = session.createSender(msg.getReplyTo()); s.setCapacity(opts.capacity); } s.send(msg); } if (opts.receiveRate) { qpid::sys::AbsTime waitTill(start, count*interval); int64_t delay = qpid::sys::Duration(qpid::sys::now(), waitTill); if (delay > 0) qpid::sys::usleep(delay/qpid::sys::TIME_USEC); } // Clear out message properties & content for next iteration. msg = Message(); // TODO aconway 2010-12-01: should be done by fetch } if (opts.reportTotal) reporter.report(); if (opts.tx) { if (opts.rollbackFrequency && (++txCount % opts.rollbackFrequency == 0)) { session.rollback(); } else { session.commit(); } } else { session.acknowledge(); } session.close(); connection.close(); return 0; } } catch(const std::exception& error) { std::cerr << "qpid-receive: " << error.what() << std::endl; connection.close(); return 1; } } qpidc-0.16/src/tests/MessagingFixture.h0000664000076400007640000002514711527572315020543 0ustar00jrossjross00000000000000#ifndef TESTS_MESSAGINGFIXTURE_H #define TESTS_MESSAGINGFIXTURE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "BrokerFixture.h" #include "unit_test.h" #include "test_tools.h" #include "qpid/client/Connection.h" #include "qpid/client/Session.h" #include "qpid/framing/Uuid.h" #include "qpid/messaging/Address.h" #include "qpid/messaging/Connection.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Message.h" #include "qpid/types/Variant.h" namespace qpid { namespace tests { using qpid::types::Variant; struct BrokerAdmin { qpid::client::Connection connection; qpid::client::Session session; BrokerAdmin(uint16_t port) { connection.open("localhost", port); session = connection.newSession(); } void createQueue(const std::string& name) { session.queueDeclare(qpid::client::arg::queue=name); } void deleteQueue(const std::string& name) { session.queueDelete(qpid::client::arg::queue=name); } void createExchange(const std::string& name, const std::string& type) { session.exchangeDeclare(qpid::client::arg::exchange=name, qpid::client::arg::type=type); } void deleteExchange(const std::string& name) { session.exchangeDelete(qpid::client::arg::exchange=name); } bool checkQueueExists(const std::string& name) { return session.queueQuery(name).getQueue() == name; } bool checkExchangeExists(const std::string& name, std::string& type) { qpid::framing::ExchangeQueryResult result = session.exchangeQuery(name); type = result.getType(); return !result.getNotFound(); } void send(qpid::client::Message& message, const std::string& exchange=std::string()) { session.messageTransfer(qpid::client::arg::destination=exchange, qpid::client::arg::content=message); } ~BrokerAdmin() { session.close(); connection.close(); } }; struct MessagingFixture : public BrokerFixture { messaging::Connection connection; messaging::Session session; BrokerAdmin admin; MessagingFixture(Broker::Options opts = Broker::Options(), bool mgmtEnabled=false) : BrokerFixture(opts, mgmtEnabled), connection(open(broker->getPort(Broker::TCP_TRANSPORT))), session(connection.createSession()), admin(broker->getPort(Broker::TCP_TRANSPORT)) { } static messaging::Connection open(uint16_t port) { messaging::Connection connection( (boost::format("amqp:tcp:localhost:%1%") % (port)).str()); connection.open(); return connection; } /** Open a connection to the broker. */ qpid::messaging::Connection newConnection() { qpid::messaging::Connection connection( (boost::format("amqp:tcp:localhost:%1%") % (broker->getPort(qpid::broker::Broker::TCP_TRANSPORT))).str()); return connection; } void ping(const qpid::messaging::Address& address) { messaging::Receiver r = session.createReceiver(address); messaging::Sender s = session.createSender(address); messaging::Message out(framing::Uuid(true).str()); s.send(out); messaging::Message in; BOOST_CHECK(r.fetch(in, 5*messaging::Duration::SECOND)); BOOST_CHECK_EQUAL(out.getContent(), in.getContent()); r.close(); s.close(); } ~MessagingFixture() { session.close(); connection.close(); } }; struct QueueFixture : MessagingFixture { std::string queue; QueueFixture(const std::string& name = "test-queue") : queue(name) { admin.createQueue(queue); } ~QueueFixture() { admin.deleteQueue(queue); } }; struct TopicFixture : MessagingFixture { std::string topic; TopicFixture(const std::string& name = "test-topic", const std::string& type="fanout") : topic(name) { admin.createExchange(topic, type); } ~TopicFixture() { admin.deleteExchange(topic); } }; struct MultiQueueFixture : MessagingFixture { typedef std::vector::const_iterator const_iterator; std::vector queues; MultiQueueFixture(const std::vector& names = boost::assign::list_of("q1")("q2")("q3")) : queues(names) { for (const_iterator i = queues.begin(); i != queues.end(); ++i) { admin.createQueue(*i); } } ~MultiQueueFixture() { connection.close(); for (const_iterator i = queues.begin(); i != queues.end(); ++i) { admin.deleteQueue(*i); } } }; inline std::vector fetch(messaging::Receiver& receiver, int count, messaging::Duration timeout=messaging::Duration::SECOND*5) { std::vector data; messaging::Message message; for (int i = 0; i < count && receiver.fetch(message, timeout); i++) { data.push_back(message.getContent()); } return data; } inline void send(messaging::Sender& sender, uint count = 1, uint start = 1, const std::string& base = "Message") { for (uint i = start; i < start + count; ++i) { sender.send(messaging::Message((boost::format("%1%_%2%") % base % i).str())); } } inline void receive(messaging::Receiver& receiver, uint count = 1, uint start = 1, const std::string& base = "Message", messaging::Duration timeout=messaging::Duration::SECOND*5) { for (uint i = start; i < start + count; ++i) { BOOST_CHECK_EQUAL(receiver.fetch(timeout).getContent(), (boost::format("%1%_%2%") % base % i).str()); } } class MethodInvoker { public: MethodInvoker(messaging::Session& session) : replyTo("#; {create:always, node:{x-declare:{auto-delete:true}}}"), sender(session.createSender("qmf.default.direct/broker")), receiver(session.createReceiver(replyTo)) {} void createExchange(const std::string& name, const std::string& type, bool durable=false) { Variant::Map params; params["name"]=name; params["type"]="exchange"; params["properties"] = Variant::Map(); params["properties"].asMap()["exchange-type"] = type; params["properties"].asMap()["durable"] = durable; methodRequest("create", params); } void deleteExchange(const std::string& name) { Variant::Map params; params["name"]=name; params["type"]="exchange"; methodRequest("delete", params); } void createQueue(const std::string& name, bool durable=false, bool autodelete=false, const Variant::Map& options=Variant::Map()) { Variant::Map params; params["name"]=name; params["type"]="queue"; params["properties"] = options; params["properties"].asMap()["durable"] = durable; params["properties"].asMap()["auto-delete"] = autodelete; methodRequest("create", params); } void deleteQueue(const std::string& name) { Variant::Map params; params["name"]=name; params["type"]="queue"; methodRequest("delete", params); } void bind(const std::string& exchange, const std::string& queue, const std::string& key, const Variant::Map& options=Variant::Map()) { Variant::Map params; params["name"]=(boost::format("%1%/%2%/%3%") % (exchange) % (queue) % (key)).str(); params["type"]="binding"; params["properties"] = options; methodRequest("create", params); } void unbind(const std::string& exchange, const std::string& queue, const std::string& key) { Variant::Map params; params["name"]=(boost::format("%1%/%2%/%3%") % (exchange) % (queue) % (key)).str(); params["type"]="binding"; methodRequest("delete", params); } void methodRequest(const std::string& method, const Variant::Map& inParams, Variant::Map* outParams = 0) { Variant::Map content; Variant::Map objectId; objectId["_object_name"] = "org.apache.qpid.broker:broker:amqp-broker"; content["_object_id"] = objectId; content["_method_name"] = method; content["_arguments"] = inParams; messaging::Message request; request.setReplyTo(replyTo); request.getProperties()["x-amqp-0-10.app-id"] = "qmf2"; request.getProperties()["qmf.opcode"] = "_method_request"; encode(content, request); sender.send(request); messaging::Message response; if (receiver.fetch(response, messaging::Duration::SECOND*5)) { if (response.getProperties()["x-amqp-0-10.app-id"] == "qmf2") { std::string opcode = response.getProperties()["qmf.opcode"]; if (opcode == "_method_response") { if (outParams) { Variant::Map m; decode(response, m); *outParams = m["_arguments"].asMap(); } } else if (opcode == "_exception") { Variant::Map m; decode(response, m); throw Exception(QPID_MSG("Error: " << m["_values"])); } else { throw Exception(QPID_MSG("Invalid response received, unexpected opcode: " << opcode)); } } else { throw Exception(QPID_MSG("Invalid response received, not a qmfv2 message: app-id=" << response.getProperties()["x-amqp-0-10.app-id"])); } } else { throw Exception(QPID_MSG("No response received")); } } private: messaging::Address replyTo; messaging::Sender sender; messaging::Receiver receiver; }; }} // namespace qpid::tests #endif /*!TESTS_MESSAGINGFIXTURE_H*/ qpidc-0.16/src/tests/ExchangeTest.cpp0000664000076400007640000002306411725210040020150 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/Queue.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/broker/DirectExchange.h" #include "qpid/broker/ExchangeRegistry.h" #include "qpid/broker/FanOutExchange.h" #include "qpid/broker/HeadersExchange.h" #include "qpid/broker/TopicExchange.h" #include "qpid/framing/reply_exceptions.h" #include "unit_test.h" #include #include "MessageUtils.h" using boost::intrusive_ptr; using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::sys; using namespace qpid; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ExchangeTestSuite) QPID_AUTO_TEST_CASE(testMe) { Queue::shared_ptr queue(new Queue("queue", true)); Queue::shared_ptr queue2(new Queue("queue2", true)); TopicExchange topic("topic"); topic.bind(queue, "abc", 0); topic.bind(queue2, "abc", 0); DirectExchange direct("direct"); direct.bind(queue, "abc", 0); direct.bind(queue2, "abc", 0); queue.reset(); queue2.reset(); intrusive_ptr msgPtr(MessageUtils::createMessage("exchange", "abc", false, "id")); DeliverableMessage msg(msgPtr); topic.route(msg); direct.route(msg); } QPID_AUTO_TEST_CASE(testIsBound) { Queue::shared_ptr a(new Queue("a", true)); Queue::shared_ptr b(new Queue("b", true)); Queue::shared_ptr c(new Queue("c", true)); Queue::shared_ptr d(new Queue("d", true)); string k1("abc"); string k2("def"); string k3("xyz"); FanOutExchange fanout("fanout"); BOOST_CHECK(fanout.bind(a, "", 0)); BOOST_CHECK(fanout.bind(b, "", 0)); BOOST_CHECK(fanout.bind(c, "", 0)); BOOST_CHECK(fanout.isBound(a, 0, 0)); BOOST_CHECK(fanout.isBound(b, 0, 0)); BOOST_CHECK(fanout.isBound(c, 0, 0)); BOOST_CHECK(!fanout.isBound(d, 0, 0)); DirectExchange direct("direct"); BOOST_CHECK(direct.bind(a, k1, 0)); BOOST_CHECK(direct.bind(a, k3, 0)); BOOST_CHECK(direct.bind(b, k2, 0)); BOOST_CHECK(direct.bind(c, k1, 0)); BOOST_CHECK(direct.isBound(a, 0, 0)); BOOST_CHECK(direct.isBound(a, &k1, 0)); BOOST_CHECK(direct.isBound(a, &k3, 0)); BOOST_CHECK(!direct.isBound(a, &k2, 0)); BOOST_CHECK(direct.isBound(b, 0, 0)); BOOST_CHECK(direct.isBound(b, &k2, 0)); BOOST_CHECK(direct.isBound(c, &k1, 0)); BOOST_CHECK(!direct.isBound(d, 0, 0)); BOOST_CHECK(!direct.isBound(d, &k1, 0)); BOOST_CHECK(!direct.isBound(d, &k2, 0)); BOOST_CHECK(!direct.isBound(d, &k3, 0)); TopicExchange topic("topic"); BOOST_CHECK(topic.bind(a, k1, 0)); BOOST_CHECK(topic.bind(a, k3, 0)); BOOST_CHECK(topic.bind(b, k2, 0)); BOOST_CHECK(topic.bind(c, k1, 0)); BOOST_CHECK(topic.isBound(a, 0, 0)); BOOST_CHECK(topic.isBound(a, &k1, 0)); BOOST_CHECK(topic.isBound(a, &k3, 0)); BOOST_CHECK(!topic.isBound(a, &k2, 0)); BOOST_CHECK(topic.isBound(b, 0, 0)); BOOST_CHECK(topic.isBound(b, &k2, 0)); BOOST_CHECK(topic.isBound(c, &k1, 0)); BOOST_CHECK(!topic.isBound(d, 0, 0)); BOOST_CHECK(!topic.isBound(d, &k1, 0)); BOOST_CHECK(!topic.isBound(d, &k2, 0)); BOOST_CHECK(!topic.isBound(d, &k3, 0)); HeadersExchange headers("headers"); FieldTable args1; args1.setString("x-match", "all"); args1.setString("a", "A"); args1.setInt("b", 1); FieldTable args2; args2.setString("x-match", "any"); args2.setString("a", "A"); args2.setInt("b", 1); FieldTable args3; args3.setString("x-match", "any"); args3.setString("c", "C"); args3.setInt("b", 6); headers.bind(a, "", &args1); headers.bind(a, "", &args3); headers.bind(b, "", &args2); headers.bind(c, "", &args1); BOOST_CHECK(headers.isBound(a, 0, 0)); BOOST_CHECK(headers.isBound(a, 0, &args1)); BOOST_CHECK(headers.isBound(a, 0, &args3)); BOOST_CHECK(!headers.isBound(a, 0, &args2)); BOOST_CHECK(headers.isBound(b, 0, 0)); BOOST_CHECK(headers.isBound(b, 0, &args2)); BOOST_CHECK(headers.isBound(c, 0, &args1)); BOOST_CHECK(!headers.isBound(d, 0, 0)); BOOST_CHECK(!headers.isBound(d, 0, &args1)); BOOST_CHECK(!headers.isBound(d, 0, &args2)); BOOST_CHECK(!headers.isBound(d, 0, &args3)); } QPID_AUTO_TEST_CASE(testDeleteGetAndRedeclare) { ExchangeRegistry exchanges; exchanges.declare("my-exchange", "direct", false, FieldTable()); exchanges.destroy("my-exchange"); try { exchanges.get("my-exchange"); } catch (const NotFoundException&) {} std::pair response = exchanges.declare("my-exchange", "direct", false, FieldTable()); BOOST_CHECK_EQUAL(string("direct"), response.first->getType()); } intrusive_ptr cmessage(std::string exchange, std::string routingKey) { intrusive_ptr msg(new Message()); AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0))); AMQFrame header((AMQHeaderBody())); msg->getFrames().append(method); msg->getFrames().append(header); msg->getFrames().getHeaders()->get(true)->setRoutingKey(routingKey); return msg; } QPID_AUTO_TEST_CASE(testSequenceOptions) { FieldTable args; args.setInt("qpid.msg_sequence",1); char* buff = new char[10000]; framing::Buffer buffer(buff,10000); { DirectExchange direct("direct1", false, args); intrusive_ptr msg1 = cmessage("e", "abc"); intrusive_ptr msg2 = cmessage("e", "abc"); intrusive_ptr msg3 = cmessage("e", "abc"); DeliverableMessage dmsg1(msg1); DeliverableMessage dmsg2(msg2); DeliverableMessage dmsg3(msg3); direct.route(dmsg1); direct.route(dmsg2); direct.route(dmsg3); BOOST_CHECK_EQUAL(1, msg1->getApplicationHeaders()->getAsInt64("qpid.msg_sequence")); BOOST_CHECK_EQUAL(2, msg2->getApplicationHeaders()->getAsInt64("qpid.msg_sequence")); BOOST_CHECK_EQUAL(3, msg3->getApplicationHeaders()->getAsInt64("qpid.msg_sequence")); FanOutExchange fanout("fanout1", false, args); HeadersExchange header("headers1", false, args); TopicExchange topic ("topic1", false, args); // check other exchanges, that they preroute intrusive_ptr msg4 = cmessage("e", "abc"); intrusive_ptr msg5 = cmessage("e", "abc"); // Need at least empty header for the HeadersExchange to route at all msg5->insertCustomProperty("", ""); intrusive_ptr msg6 = cmessage("e", "abc"); DeliverableMessage dmsg4(msg4); DeliverableMessage dmsg5(msg5); DeliverableMessage dmsg6(msg6); fanout.route(dmsg4); BOOST_CHECK_EQUAL(1, msg4->getApplicationHeaders()->getAsInt64("qpid.msg_sequence")); header.route(dmsg5); BOOST_CHECK_EQUAL(1, msg5->getApplicationHeaders()->getAsInt64("qpid.msg_sequence")); topic.route(dmsg6); BOOST_CHECK_EQUAL(1, msg6->getApplicationHeaders()->getAsInt64("qpid.msg_sequence")); direct.encode(buffer); } { ExchangeRegistry exchanges; buffer.reset(); DirectExchange::shared_ptr exch_dec = Exchange::decode(exchanges, buffer); intrusive_ptr msg1 = cmessage("e", "abc"); DeliverableMessage dmsg1(msg1); exch_dec->route(dmsg1); BOOST_CHECK_EQUAL(4, msg1->getApplicationHeaders()->getAsInt64("qpid.msg_sequence")); } delete [] buff; } QPID_AUTO_TEST_CASE(testIVEOption) { FieldTable args; args.setInt("qpid.ive",1); DirectExchange direct("direct1", false, args); FanOutExchange fanout("fanout1", false, args); HeadersExchange header("headers1", false, args); TopicExchange topic ("topic1", false, args); intrusive_ptr msg1 = cmessage("direct1", "abc"); msg1->insertCustomProperty("a", "abc"); DeliverableMessage dmsg1(msg1); FieldTable args2; args2.setString("x-match", "any"); args2.setString("a", "abc"); direct.route(dmsg1); fanout.route(dmsg1); header.route(dmsg1); topic.route(dmsg1); Queue::shared_ptr queue(new Queue("queue", true)); Queue::shared_ptr queue1(new Queue("queue1", true)); Queue::shared_ptr queue2(new Queue("queue2", true)); Queue::shared_ptr queue3(new Queue("queue3", true)); BOOST_CHECK(HeadersExchange::match(args2, msg1->getProperties()->getApplicationHeaders())); BOOST_CHECK(direct.bind(queue, "abc", 0)); BOOST_CHECK(fanout.bind(queue1, "abc", 0)); BOOST_CHECK(header.bind(queue2, "", &args2)); BOOST_CHECK(topic.bind(queue3, "abc", 0)); BOOST_CHECK_EQUAL(1u,queue->getMessageCount()); BOOST_CHECK_EQUAL(1u,queue1->getMessageCount()); BOOST_CHECK_EQUAL(1u,queue2->getMessageCount()); BOOST_CHECK_EQUAL(1u,queue3->getMessageCount()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/qpid-latency-test.cpp0000664000076400007640000003047511376517702021162 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include "TestOptions.h" #include "qpid/sys/Thread.h" #include "qpid/client/Connection.h" #include "qpid/client/Message.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/sys/Time.h" using namespace qpid; using namespace qpid::client; using namespace qpid::sys; using std::string; namespace qpid { namespace tests { typedef std::vector StringSet; struct Args : public qpid::TestOptions { uint size; uint count; uint rate; bool sync; uint reportFrequency; uint timeLimit; uint concurrentConnections; uint prefetch; uint ack; bool cumulative; bool csv; bool durable; string base; bool singleConnect; Args() : size(256), count(1000), rate(0), reportFrequency(1000), timeLimit(0), concurrentConnections(1), prefetch(100), ack(0), durable(false), base("latency-test"), singleConnect(false) { addOptions() ("size", optValue(size, "N"), "message size") ("concurrentTests", optValue(concurrentConnections, "N"), "number of concurrent test setups, will create another publisher,\ subcriber, queue, and connections") ("single-connection", optValue(singleConnect, "yes|no"), "Use one connection for multiple sessions.") ("count", optValue(count, "N"), "number of messages to send") ("rate", optValue(rate, "N"), "target message rate (causes count to be ignored)") ("sync", optValue(sync), "send messages synchronously") ("report-frequency", optValue(reportFrequency, "N"), "number of milliseconds to wait between reports (ignored unless rate specified)") ("time-limit", optValue(timeLimit, "N"), "test duration, in seconds") ("prefetch", optValue(prefetch, "N"), "prefetch count (0 implies no flow control, and no acking)") ("ack", optValue(ack, "N"), "Ack frequency in messages (defaults to half the prefetch value)") ("durable", optValue(durable, "yes|no"), "use durable messages") ("csv", optValue(csv), "print stats in csv format (rate,min,max,avg)") ("cumulative", optValue(cumulative), "cumulative stats in csv format") ("queue-base-name", optValue(base, ""), "base name for queues"); } }; const std::string chars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); Args opts; double c_min, c_avg, c_max; Connection globalConnection; uint64_t current_time() { Duration t(EPOCH, now()); return t; } struct Stats { Mutex lock; uint count; double minLatency; double maxLatency; double totalLatency; Stats(); void update(double l); void print(); void reset(); }; class Client : public Runnable { protected: Connection* connection; Connection localConnection; AsyncSession session; Thread thread; string queue; public: Client(const string& q); virtual ~Client(); void start(); void join(); void run(); virtual void test() = 0; }; class Receiver : public Client, public MessageListener { SubscriptionManager mgr; uint count; Stats& stats; public: Receiver(const string& queue, Stats& stats); void test(); void received(Message& msg); Stats getStats(); uint getCount() { return count; } void stop() { mgr.stop(); mgr.cancel(queue); } }; class Sender : public Client { string generateData(uint size); void sendByRate(); void sendByCount(); Receiver& receiver; const string data; public: Sender(const string& queue, Receiver& receiver); void test(); }; class Test { const string queue; Stats stats; Receiver receiver; Sender sender; AbsTime begin; public: Test(const string& q) : queue(q), receiver(queue, stats), sender(queue, receiver), begin(now()) {} void start(); void join(); void report(); }; Client::Client(const string& q) : queue(q) { if (opts.singleConnect){ connection = &globalConnection; if (!globalConnection.isOpen()) opts.open(globalConnection); }else{ connection = &localConnection; opts.open(localConnection); } session = connection->newSession(); } void Client::start() { thread = Thread(this); } void Client::join() { thread.join(); } void Client::run() { try{ test(); } catch(const std::exception& e) { std::cout << "Error in receiver: " << e.what() << std::endl; } } Client::~Client() { try{ session.close(); connection->close(); } catch(const std::exception& e) { std::cout << "Error in receiver: " << e.what() << std::endl; } } Receiver::Receiver(const string& q, Stats& s) : Client(q), mgr(session), count(0), stats(s) { session.queueDeclare(arg::queue=queue, arg::durable=opts.durable, arg::autoDelete=true); uint msgCount = session.queueQuery(arg::queue=queue).get().getMessageCount(); if (msgCount) { std::cout << "Warning: found " << msgCount << " msgs on " << queue << ". Purging..." << std::endl; session.queuePurge(arg::queue=queue); session.sync(); } SubscriptionSettings settings; if (opts.prefetch) { settings.autoAck = (opts.ack ? opts.ack : (opts.prefetch / 2)); settings.flowControl = FlowControl::messageWindow(opts.prefetch); } else { settings.acceptMode = ACCEPT_MODE_NONE; settings.flowControl = FlowControl::unlimited(); } mgr.subscribe(*this, queue, settings); } void Receiver::test() { mgr.run(); mgr.cancel(queue); } void Receiver::received(Message& msg) { ++count; uint64_t receivedAt = current_time(); uint64_t sentAt = msg.getDeliveryProperties().getTimestamp(); stats.update(((double) (receivedAt - sentAt)) / TIME_MSEC); if (!opts.rate && count >= opts.count) { mgr.stop(); } } void Stats::update(double latency) { Mutex::ScopedLock l(lock); count++; minLatency = std::min(minLatency, latency); maxLatency = std::max(maxLatency, latency); totalLatency += latency; } Stats::Stats() : count(0), minLatency(std::numeric_limits::max()), maxLatency(0), totalLatency(0) {} void Stats::print() { static bool already_have_stats = false; uint value; if (opts.rate) value = opts.rate; else value = opts.count; Mutex::ScopedLock l(lock); double aux_avg = (totalLatency / count); if (!opts.cumulative) { if (!opts.csv) { if (count) { std::cout << "Latency(ms): min=" << minLatency << ", max=" << maxLatency << ", avg=" << aux_avg; } else { std::cout << "Stalled: no samples for interval"; } } else { if (count) { std::cout << value << "," << minLatency << "," << maxLatency << "," << aux_avg; } else { std::cout << value << "," << minLatency << "," << maxLatency << ", Stalled"; } } } else { if (count) { if (already_have_stats) { c_avg = (c_min + aux_avg) / 2; if (c_min > minLatency) c_min = minLatency; if (c_max < maxLatency) c_max = maxLatency; } else { c_avg = aux_avg; c_min = minLatency; c_max = maxLatency; already_have_stats = true; } std::cout << value << "," << c_min << "," << c_max << "," << c_avg; } else { std::cout << "Stalled: no samples for interval"; } } } void Stats::reset() { Mutex::ScopedLock l(lock); count = 0; totalLatency = maxLatency = 0; minLatency = std::numeric_limits::max(); } Sender::Sender(const string& q, Receiver& receiver) : Client(q), receiver(receiver), data(generateData(opts.size)) {} void Sender::test() { if (opts.rate) sendByRate(); else sendByCount(); } void Sender::sendByCount() { Message msg(data, queue); if (opts.durable) { msg.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); } for (uint i = 0; i < opts.count; i++) { uint64_t sentAt(current_time()); msg.getDeliveryProperties().setTimestamp(sentAt); async(session).messageTransfer(arg::content=msg, arg::acceptMode=1); if (opts.sync) session.sync(); } session.sync(); } void Sender::sendByRate() { Message msg(data, queue); if (opts.durable) { msg.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); } uint64_t interval = TIME_SEC/opts.rate; int64_t timeLimit = opts.timeLimit * TIME_SEC; uint64_t sent = 0, missedRate = 0; AbsTime start = now(); while (true) { AbsTime sentAt=now(); msg.getDeliveryProperties().setTimestamp(Duration(EPOCH, sentAt)); async(session).messageTransfer(arg::content=msg, arg::acceptMode=1); if (opts.sync) session.sync(); ++sent; AbsTime waitTill(start, sent*interval); Duration delay(sentAt, waitTill); if (delay < 0) ++missedRate; else sys::usleep(delay / TIME_USEC); if (timeLimit != 0 && Duration(start, now()) > timeLimit) { session.sync(); receiver.stop(); break; } } } string Sender::generateData(uint size) { if (size < chars.length()) { return chars.substr(0, size); } std::string data; for (uint i = 0; i < (size / chars.length()); i++) { data += chars; } data += chars.substr(0, size % chars.length()); return data; } void Test::start() { receiver.start(); begin = AbsTime(now()); sender.start(); } void Test::join() { sender.join(); receiver.join(); AbsTime end = now(); Duration time(begin, end); double msecs(time / TIME_MSEC); if (!opts.csv) { std::cout << "Sent " << receiver.getCount() << " msgs through " << queue << " in " << msecs << "ms (" << (receiver.getCount() * 1000 / msecs) << " msgs/s) "; } stats.print(); std::cout << std::endl; } void Test::report() { stats.print(); std::cout << std::endl; stats.reset(); } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { try { opts.parse(argc, argv); if (opts.cumulative) opts.csv = true; Connection localConnection; AsyncSession session; boost::ptr_vector tests(opts.concurrentConnections); for (uint i = 0; i < opts.concurrentConnections; i++) { std::ostringstream out; out << opts.base << "-" << (i+1); tests.push_back(new Test(out.str())); } for (boost::ptr_vector::iterator i = tests.begin(); i != tests.end(); i++) { i->start(); } if (opts.rate && !opts.timeLimit) { while (true) { qpid::sys::usleep(opts.reportFrequency * 1000); //print latency report: for (boost::ptr_vector::iterator i = tests.begin(); i != tests.end(); i++) { i->report(); } } } else { for (boost::ptr_vector::iterator i = tests.begin(); i != tests.end(); i++) { i->join(); } } return 0; } catch(const std::exception& e) { std::cout << e.what() << std::endl; } return 1; } qpidc-0.16/src/tests/brokermgmt_gen/0000775000076400007640000000000011752725716020104 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/brokermgmt_gen/qmf/0000775000076400007640000000000011752725716020667 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/0000775000076400007640000000000011752725716021456 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/apache/0000775000076400007640000000000011752725716022677 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/apache/qpid/0000775000076400007640000000000011752725716023634 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/apache/qpid/broker/0000775000076400007640000000000011752725716025120 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/0000775000076400007640000000000011752725716026064 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/0000775000076400007640000000000011752725716027043 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.cpp0000664000076400007640000000211511752725716031101 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "Package.h" #include "TestObject.h" using namespace qmf::org::apache::qpid::broker::mgmt::test; Package::Package (::qpid::management::ManagementAgent* agent) { TestObject::registerSelf(agent); } qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.cpp0000664000076400007640000001707311752725716031625 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "TestObject.h" #include #include using namespace qmf::org::apache::qpid::broker::mgmt::test; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string TestObject::packageName = string ("org.apache.qpid.broker.mgmt.test"); string TestObject::className = string ("testobject"); uint8_t TestObject::md5Sum[MD5_LEN] = {0x51,0x22,0xea,0x72,0x57,0x81,0x9c,0xf1,0xab,0xbc,0x55,0x91,0xae,0x4f,0xb6,0x49}; TestObject::TestObject (ManagementAgent*, Manageable* _core) : ManagementObject(_core) { string1 = ""; bool1 = 0; map1 = ::qpid::types::Variant::Map(); } TestObject::~TestObject () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void TestObject::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void TestObject::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (3); // Config Element Count buf.putShort (0); // Inst Element Count buf.putShort (0); // Method Count // Properties ft.clear(); ft[NAME] = "string1"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RW; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "bool1"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RW; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "map1"; ft[TYPE] = TYPE_FTABLE; ft[ACCESS] = ACCESS_RW; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); // Statistics // Methods { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t TestObject::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += (2 + string1.length()); // string1 size += 1; // bool1 size += ::qpid::amqp_0_10::MapCodec::encodedSize(map1); // map1 return size; } void TestObject::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } buf.getMediumString(string1); bool1 = buf.getOctet()==1; buf.getMap(map1); delete [] _tmpBuf; } void TestObject::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } buf.putMediumString(string1); buf.putOctet(bool1?1:0); buf.putMap(map1); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void TestObject::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void TestObject::doMethod (string&, const string&, string& outStr, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string TestObject::getKey() const { std::stringstream key; key << string1; return key.str(); } void TestObject::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["string1"] = ::qpid::types::Variant(string1); _map["bool1"] = ::qpid::types::Variant(bool1); _map["map1"] = ::qpid::types::Variant(map1); } if (includeStatistics) { instChanged = false; // Maintenance of hi-lo statistics } } void TestObject::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("string1")) != _map.end()) { string1 = (_i->second).getString(); } if ((_i = _map.find("bool1")) != _map.end()) { bool1 = _i->second; } if ((_i = _map.find("map1")) != _map.end()) { map1 = (_i->second).asMap(); } } void TestObject::doMethod (string&, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.h0000664000076400007640000000265411752725716030556 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_BROKER_MGMT_TEST_ #define _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_BROKER_MGMT_TEST_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementAgent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { namespace mgmt { namespace test { class Package { public: QPID_BROKER_EXTERN Package (::qpid::management::ManagementAgent* agent); QPID_BROKER_EXTERN ~Package () {} }; }}}}}}} #endif /*!_MANAGEMENT_PACKAGE_ORG_APACHE_QPID_BROKER_MGMT_TEST_*/ qpidc-0.16/src/tests/brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.h0000664000076400007640000001101411752725716031257 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_MGMT_TEST_TESTOBJECT_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_MGMT_TEST_TESTOBJECT_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { namespace mgmt { namespace test { QPID_BROKER_CLASS_EXTERN class TestObject : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties std::string string1; bool bool1; ::qpid::types::Variant::Map map1; // Statistics public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } // Stub for getInstChanged. There are no statistics in this class. bool getInstChanged() { return false; } bool hasInst() { return false; } QPID_BROKER_EXTERN TestObject( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject); QPID_BROKER_EXTERN ~TestObject(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs // Accessor Methods inline void set_string1 (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); string1 = val; configChanged = true; } inline const std::string& get_string1() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return string1; } inline void set_bool1 (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); bool1 = val; configChanged = true; } inline bool get_bool1() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return bool1; } inline void set_map1 (const ::qpid::types::Variant::Map& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); map1 = val; configChanged = true; } inline const ::qpid::types::Variant::Map& get_map1() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return map1; } }; }}}}}}} #endif /*!_MANAGEMENT_TESTOBJECT_*/ qpidc-0.16/src/tests/dynamic_log_level_test0000775000076400007640000000370511654250703021536 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run a simple test to verify dynamic log level changes source ./test_env.sh test -d $PYTHON_DIR || { echo "Skipping python tests, no python dir."; exit 0; } LOG_FILE=log_test.log trap cleanup EXIT cleanup() { test -n "$PORT" && $QPIDD_EXEC --no-module-dir --quit --port $PORT } error() { echo $*; exit 1; } rm -rf $LOG_FILE PORT=$($QPIDD_EXEC --auth=no --no-module-dir --daemon --port=0 --log-to-file $LOG_FILE) || error "Could not start broker" echo Broker for log level test started on $PORT, pid is $($QPIDD_EXEC --no-module-dir --check --port $PORT) $srcdir/qpid-ctrl -b localhost:$PORT setLogLevel level='notice+' > /dev/null $srcdir/qpid-ctrl -b localhost:$PORT echo sequence=1 body=HIDDEN > /dev/null $srcdir/qpid-ctrl -b localhost:$PORT setLogLevel level='debug+:Broker' > /dev/null $srcdir/qpid-ctrl -b localhost:$PORT echo sequence=2 body=VISIBLE > /dev/null $srcdir/qpid-ctrl -b localhost:$PORT setLogLevel level='notice+' > /dev/null #check log includes debug statement for last echo, but not the first if [[ $(grep echo $LOG_FILE | wc -l) -ne 1 ]]; then cat $LOG_FILE error "Log contents not as expected" else rm -rf $LOG_FILE echo OK fi qpidc-0.16/src/tests/topic_perftest0000775000076400007640000000153711654250703020056 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # exec `dirname $0`/run_perftest 10000 --mode topic --qt 16 qpidc-0.16/src/tests/Variant.cpp0000664000076400007640000007640311551604760017214 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "unit_test.h" using namespace qpid::types; using namespace qpid::amqp_0_10; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(VariantSuite) QPID_AUTO_TEST_CASE(testConversions) { Variant value; //string to float/double value = "1.5"; BOOST_CHECK_EQUAL((float) 1.5, value.asFloat()); BOOST_CHECK_EQUAL((double) 1.5, value.asDouble()); //float to string or double value = 1.5f; BOOST_CHECK_EQUAL((float) 1.5, value.asFloat()); BOOST_CHECK_EQUAL((double) 1.5, value.asDouble()); BOOST_CHECK_EQUAL(std::string("1.5"), value.asString()); //double to string (conversion to float not valid) value = 1.5; BOOST_CHECK_THROW(value.asFloat(), InvalidConversion); BOOST_CHECK_EQUAL((double) 1.5, value.asDouble()); BOOST_CHECK_EQUAL(std::string("1.5"), value.asString()); //uint8 to larger unsigned ints and string value = (uint8_t) 7; BOOST_CHECK_EQUAL((uint8_t) 7, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 7, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 7, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 7, value.asUint64()); BOOST_CHECK_EQUAL(std::string("7"), value.asString()); value = (uint16_t) 8; BOOST_CHECK_EQUAL(std::string("8"), value.asString()); value = (uint32_t) 9; BOOST_CHECK_EQUAL(std::string("9"), value.asString()); //uint32 to larger unsigned ints and string value = (uint32_t) 9999999; BOOST_CHECK_EQUAL((uint32_t) 9999999, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 9999999, value.asUint64()); BOOST_CHECK_EQUAL(std::string("9999999"), value.asString()); BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); value = "true"; BOOST_CHECK(value.asBool()); value = "false"; BOOST_CHECK(!value.asBool()); value = "1"; BOOST_CHECK(value.asBool()); value = "0"; BOOST_CHECK(!value.asBool()); value = "other"; BOOST_CHECK_THROW(value.asBool(), InvalidConversion); } QPID_AUTO_TEST_CASE(testConversionsFromString) { Variant value; value = "5"; BOOST_CHECK_EQUAL(5, value.asInt16()); BOOST_CHECK_EQUAL(5u, value.asUint16()); value = "-5"; BOOST_CHECK_EQUAL(-5, value.asInt16()); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); value = "18446744073709551615"; BOOST_CHECK_EQUAL(18446744073709551615ull, value.asUint64()); BOOST_CHECK_THROW(value.asInt64(), InvalidConversion); value = "9223372036854775808"; BOOST_CHECK_EQUAL(9223372036854775808ull, value.asUint64()); BOOST_CHECK_THROW(value.asInt64(), InvalidConversion); value = "-9223372036854775809"; BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_THROW(value.asInt64(), InvalidConversion); value = "2147483648"; BOOST_CHECK_EQUAL(2147483648ul, value.asUint32()); BOOST_CHECK_THROW(value.asInt32(), InvalidConversion); value = "-2147483649"; BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asInt32(), InvalidConversion); value = "32768"; BOOST_CHECK_EQUAL(32768u, value.asUint16()); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); value = "-32769"; BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); value = "-2.5"; BOOST_CHECK_EQUAL(-2.5, value.asFloat()); value = "-0.875432e10"; BOOST_CHECK_EQUAL(-0.875432e10, value.asDouble()); value = "-0"; BOOST_CHECK_EQUAL(0, value.asInt16()); BOOST_CHECK_EQUAL(0u, value.asUint16()); value = "-000"; BOOST_CHECK_EQUAL(0, value.asInt16()); BOOST_CHECK_EQUAL(0u, value.asUint16()); value = "-0010"; BOOST_CHECK_EQUAL(-10, value.asInt16()); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); } QPID_AUTO_TEST_CASE(testSizeConversionsUint) { Variant value; //uint8 (in 7 bits) to other uints, ints value = (uint8_t) 7; BOOST_CHECK_EQUAL((uint8_t) 7, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 7, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 7, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 7, value.asUint64()); BOOST_CHECK_EQUAL((int8_t) 7, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) 7, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 7, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 7, value.asInt64()); //uint8 (in 8 bits) to other uints, ints value = (uint8_t) 200; BOOST_CHECK_EQUAL((uint8_t) 200, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 200, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 200, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 200, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 200, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 200, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 200, value.asInt64()); //uint16 (in 7 bits) to other uints, ints value = (uint16_t) 120; BOOST_CHECK_EQUAL((uint8_t) 120, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 120, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 120, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 120, value.asUint64()); BOOST_CHECK_EQUAL((int8_t) 120, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) 120, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 120, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 120, value.asInt64()); //uint16 (more than 7 bits) to other uints, ints value = (uint16_t) 240; BOOST_CHECK_EQUAL((uint8_t) 240, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 240, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 240, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 240, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 240, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 240, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 240, value.asInt64()); //uint16 (more than 8 bits) to other uints, ints value = (uint16_t) 1000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 1000, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 1000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 1000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 1000, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 1000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 1000, value.asInt64()); //uint16 (more than 15 bits) to other uints, ints value = (uint16_t) 32770; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 32770, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 32770, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 32770, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_EQUAL((int32_t) 32770, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 32770, value.asInt64()); //uint32 (in 7 bits) to other uints, ints value = (uint32_t) 120; BOOST_CHECK_EQUAL((uint8_t) 120, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 120, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 120, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 120, value.asUint64()); BOOST_CHECK_EQUAL((int8_t) 120, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) 120, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 120, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 120, value.asInt64()); //uint32 (more than 7 bits) to other uints, ints value = (uint32_t) 240; BOOST_CHECK_EQUAL((uint8_t) 240, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 240, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 240, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 240, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 240, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 240, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 240, value.asInt64()); //uint32 (more than 8 bits) to other uints, ints value = (uint32_t) 1000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 1000, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 1000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 1000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 1000, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 1000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 1000, value.asInt64()); //uint32 (more than 15 bits) to other uints, ints value = (uint32_t) 32770; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 32770, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 32770, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 32770, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_EQUAL((int32_t) 32770, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 32770, value.asInt64()); //uint32 (more than 16 bits) to other uints, ints value = (uint32_t) 66000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_EQUAL((uint32_t) 66000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 66000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_EQUAL((int32_t) 66000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 66000, value.asInt64()); //uint64 (in 7 bits) to other uints, ints value = (uint64_t) 120; BOOST_CHECK_EQUAL((uint8_t) 120, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 120, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 120, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 120, value.asUint64()); BOOST_CHECK_EQUAL((int8_t) 120, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) 120, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 120, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 120, value.asInt64()); //uint64 (more than 7 bits) to other uints, ints value = (uint64_t) 240; BOOST_CHECK_EQUAL((uint8_t) 240, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 240, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 240, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 240, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 240, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 240, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 240, value.asInt64()); //uint64 (more than 8 bits) to other uints, ints value = (uint64_t) 1000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 1000, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 1000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 1000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 1000, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 1000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 1000, value.asInt64()); //uint64 (more than 15 bits) to other uints, ints value = (uint64_t) 32770; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 32770, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 32770, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 32770, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_EQUAL((int32_t) 32770, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 32770, value.asInt64()); //uint64 (more than 16 bits) to other uints, ints value = (uint64_t) 66000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_EQUAL((uint32_t) 66000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 66000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_EQUAL((int32_t) 66000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 66000, value.asInt64()); //uint64 (more than 31 bits) to other uints, ints value = (uint64_t) 3000000000ul; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_EQUAL((uint32_t) 3000000000ul, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 3000000000ul, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_THROW(value.asInt32(), InvalidConversion); BOOST_CHECK_EQUAL((int64_t) 3000000000ul, value.asInt64()); //uint64 (more than 32 bits) to other uints, ints value = (uint64_t) 7000000000ull; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_EQUAL((uint64_t) 7000000000ull, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_THROW(value.asInt32(), InvalidConversion); BOOST_CHECK_EQUAL((int64_t) 7000000000ull, value.asInt64()); //uint64 (more than 63 bits) to other uints, ints value = (uint64_t) 0x8000000000000000ull; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_EQUAL((uint64_t) 0x8000000000000000ull, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_THROW(value.asInt32(), InvalidConversion); BOOST_CHECK_THROW(value.asInt64(), InvalidConversion); } QPID_AUTO_TEST_CASE(testSizeConversionsInt) { Variant value; //int8 (positive in 7 bits) value = (int8_t) 100; BOOST_CHECK_EQUAL((uint8_t) 100, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 100, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 100, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 100, value.asUint64()); BOOST_CHECK_EQUAL((int8_t) 100, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) 100, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 100, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 100, value.asInt64()); //int8 (negative) value = (int8_t) -100; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_EQUAL((int8_t) -100, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) -100, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) -100, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) -100, value.asInt64()); //int16 (positive in 7 bits) value = (int16_t) 100; BOOST_CHECK_EQUAL((uint8_t) 100, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 100, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 100, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 100, value.asUint64()); BOOST_CHECK_EQUAL((int8_t) 100, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) 100, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 100, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 100, value.asInt64()); //int16 (positive in 8 bits) value = (int16_t) 200; BOOST_CHECK_EQUAL((uint8_t) 200, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 200, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 200, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 200, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 200, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 200, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 200, value.asInt64()); //int16 (positive in more than 8 bits) value = (int16_t) 1000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 1000, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 1000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 1000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 1000, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 1000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 1000, value.asInt64()); //int16 (negative in 7 bits) value = (int16_t) -100; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_EQUAL((int8_t) -100, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) -100, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) -100, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) -100, value.asInt64()); //int16 (negative in more than 7 bits) value = (int16_t) -1000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) -1000, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) -1000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) -1000, value.asInt64()); //int32 (positive in 7 bits) value = (int32_t) 100; BOOST_CHECK_EQUAL((uint8_t) 100, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 100, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 100, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 100, value.asUint64()); BOOST_CHECK_EQUAL((int8_t) 100, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) 100, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 100, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 100, value.asInt64()); //int32 (positive in 8 bits) value = (int32_t) 200; BOOST_CHECK_EQUAL((uint8_t) 200, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 200, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 200, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 200, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 200, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 200, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 200, value.asInt64()); //int32 (positive in more than 8 bits) value = (int32_t) 1000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 1000, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 1000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 1000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 1000, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 1000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 1000, value.asInt64()); //int32 (positive in more than 15 bits) value = (int32_t) 40000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 40000, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 40000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 40000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_EQUAL((int32_t) 40000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 40000, value.asInt64()); //int32 (negative in 7 bits) value = (int32_t) -100; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_EQUAL((int8_t) -100, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) -100, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) -100, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) -100, value.asInt64()); //int32 (negative in more than 7 bits) value = (int32_t) -1000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) -1000, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) -1000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) -1000, value.asInt64()); //int32 (negative in more than 15 bits) value = (int32_t) -40000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_EQUAL((int32_t) -40000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) -40000, value.asInt64()); //int64 (positive in 7 bits) value = (int64_t) 100; BOOST_CHECK_EQUAL((uint8_t) 100, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 100, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 100, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 100, value.asUint64()); BOOST_CHECK_EQUAL((int8_t) 100, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) 100, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 100, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 100, value.asInt64()); //int64 (positive in 8 bits) value = (int64_t) 200; BOOST_CHECK_EQUAL((uint8_t) 200, value.asUint8()); BOOST_CHECK_EQUAL((uint16_t) 200, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 200, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 200, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 200, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 200, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 200, value.asInt64()); //int64 (positive in more than 8 bits) value = (int64_t) 1000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 1000, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 1000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 1000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) 1000, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) 1000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 1000, value.asInt64()); //int64 (positive in more than 15 bits) value = (int64_t) 40000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_EQUAL((uint16_t) 40000, value.asUint16()); BOOST_CHECK_EQUAL((uint32_t) 40000, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 40000, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_EQUAL((int32_t) 40000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) 40000, value.asInt64()); //int64 (positive in more than 31 bits) value = (int64_t) 3000000000ll; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_EQUAL((uint32_t) 3000000000ll, value.asUint32()); BOOST_CHECK_EQUAL((uint64_t) 3000000000ll, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_THROW(value.asInt32(), InvalidConversion); BOOST_CHECK_EQUAL((int64_t) 3000000000ll, value.asInt64()); //int64 (positive in more than 32 bits) value = (int64_t) 5000000000ll; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_EQUAL((uint64_t) 5000000000ll, value.asUint64()); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_THROW(value.asInt32(), InvalidConversion); BOOST_CHECK_EQUAL((int64_t) 5000000000ll, value.asInt64()); //int64 (negative in 7 bits) value = (int64_t) -100; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_EQUAL((int8_t) -100, value.asInt8()); BOOST_CHECK_EQUAL((int16_t) -100, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) -100, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) -100, value.asInt64()); //int64 (negative in more than 7 bits) value = (int64_t) -1000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_EQUAL((int16_t) -1000, value.asInt16()); BOOST_CHECK_EQUAL((int32_t) -1000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) -1000, value.asInt64()); //int64 (negative in more than 15 bits) value = (int64_t) -40000; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_EQUAL((int32_t) -40000, value.asInt32()); BOOST_CHECK_EQUAL((int64_t) -40000, value.asInt64()); //int64 (negative in more than 31 bits) value = (int64_t) -3000000000ll; BOOST_CHECK_THROW(value.asUint8(), InvalidConversion); BOOST_CHECK_THROW(value.asUint16(), InvalidConversion); BOOST_CHECK_THROW(value.asUint32(), InvalidConversion); BOOST_CHECK_THROW(value.asUint64(), InvalidConversion); BOOST_CHECK_THROW(value.asInt8(), InvalidConversion); BOOST_CHECK_THROW(value.asInt16(), InvalidConversion); BOOST_CHECK_THROW(value.asInt32(), InvalidConversion); BOOST_CHECK_EQUAL((int64_t) -3000000000ll, value.asInt64()); } QPID_AUTO_TEST_CASE(testAssignment) { Variant value("abc"); Variant other = value; BOOST_CHECK_EQUAL(VAR_STRING, value.getType()); BOOST_CHECK_EQUAL(other.getType(), value.getType()); BOOST_CHECK_EQUAL(other.asString(), value.asString()); const uint32_t i(1000); value = i; BOOST_CHECK_EQUAL(VAR_UINT32, value.getType()); BOOST_CHECK_EQUAL(VAR_STRING, other.getType()); } QPID_AUTO_TEST_CASE(testList) { const std::string s("abc"); const float f(9.876f); const int16_t x(1000); Variant value = Variant::List(); value.asList().push_back(Variant(s)); value.asList().push_back(Variant(f)); value.asList().push_back(Variant(x)); BOOST_CHECK_EQUAL(3u, value.asList().size()); Variant::List::const_iterator i = value.asList().begin(); BOOST_CHECK(i != value.asList().end()); BOOST_CHECK_EQUAL(VAR_STRING, i->getType()); BOOST_CHECK_EQUAL(s, i->asString()); i++; BOOST_CHECK(i != value.asList().end()); BOOST_CHECK_EQUAL(VAR_FLOAT, i->getType()); BOOST_CHECK_EQUAL(f, i->asFloat()); i++; BOOST_CHECK(i != value.asList().end()); BOOST_CHECK_EQUAL(VAR_INT16, i->getType()); BOOST_CHECK_EQUAL(x, i->asInt16()); i++; BOOST_CHECK(i == value.asList().end()); } QPID_AUTO_TEST_CASE(testMap) { const std::string red("red"); const float pi(3.14f); const int16_t x(1000); const Uuid u(true); Variant value = Variant::Map(); value.asMap()["colour"] = red; value.asMap()["pi"] = pi; value.asMap()["my-key"] = x; value.asMap()["id"] = u; BOOST_CHECK_EQUAL(4u, value.asMap().size()); BOOST_CHECK_EQUAL(VAR_STRING, value.asMap()["colour"].getType()); BOOST_CHECK_EQUAL(red, value.asMap()["colour"].asString()); BOOST_CHECK_EQUAL(VAR_FLOAT, value.asMap()["pi"].getType()); BOOST_CHECK_EQUAL(pi, value.asMap()["pi"].asFloat()); BOOST_CHECK_EQUAL(VAR_INT16, value.asMap()["my-key"].getType()); BOOST_CHECK_EQUAL(x, value.asMap()["my-key"].asInt16()); BOOST_CHECK_EQUAL(VAR_UUID, value.asMap()["id"].getType()); BOOST_CHECK_EQUAL(u, value.asMap()["id"].asUuid()); value.asMap()["my-key"] = "now it's a string"; BOOST_CHECK_EQUAL(VAR_STRING, value.asMap()["my-key"].getType()); BOOST_CHECK_EQUAL(std::string("now it's a string"), value.asMap()["my-key"].asString()); } QPID_AUTO_TEST_CASE(testIsEqualTo) { BOOST_CHECK_EQUAL(Variant("abc"), Variant("abc")); BOOST_CHECK_EQUAL(Variant(1234), Variant(1234)); Variant a = Variant::Map(); a.asMap()["colour"] = "red"; a.asMap()["pi"] = 3.14f; a.asMap()["my-key"] = 1234; Variant b = Variant::Map(); b.asMap()["colour"] = "red"; b.asMap()["pi"] = 3.14f; b.asMap()["my-key"] = 1234; BOOST_CHECK_EQUAL(a, b); } QPID_AUTO_TEST_CASE(testEncoding) { Variant a("abc"); a.setEncoding("utf8"); Variant b = a; Variant map = Variant::Map(); map.asMap()["a"] = a; map.asMap()["b"] = b; BOOST_CHECK_EQUAL(a.getEncoding(), std::string("utf8")); BOOST_CHECK_EQUAL(a.getEncoding(), b.getEncoding()); BOOST_CHECK_EQUAL(a.getEncoding(), map.asMap()["a"].getEncoding()); BOOST_CHECK_EQUAL(b.getEncoding(), map.asMap()["b"].getEncoding()); BOOST_CHECK_EQUAL(map.asMap()["a"].getEncoding(), map.asMap()["b"].getEncoding()); } QPID_AUTO_TEST_CASE(testBufferEncoding) { Variant a("abc"); a.setEncoding("utf8"); std::string buffer; Variant::Map inMap, outMap; inMap["a"] = a; MapCodec::encode(inMap, buffer); MapCodec::decode(buffer, outMap); BOOST_CHECK_EQUAL(inMap, outMap); inMap["b"] = Variant(std::string(65535, 'X')); inMap["b"].setEncoding("utf16"); MapCodec::encode(inMap, buffer); MapCodec::decode(buffer, outMap); BOOST_CHECK_EQUAL(inMap, outMap); inMap["fail"] = Variant(std::string(65536, 'X')); inMap["fail"].setEncoding("utf16"); BOOST_CHECK_THROW(MapCodec::encode(inMap, buffer), std::exception); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/ManagementTest.cpp0000664000076400007640000000617111415432500020505 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/management/ManagementObject.h" #include "qpid/framing/Buffer.h" #include "qpid/console/ObjectId.h" #include "unit_test.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ManagementTestSuite) using namespace qpid::framing; using namespace qpid::management; QPID_AUTO_TEST_CASE(testObjectIdSerializeStream) { std::string text("0-10-4-2500-80000000000()"); std::stringstream input(text); ObjectId oid(input); std::stringstream output; output << oid; BOOST_CHECK_EQUAL(text, output.str()); } QPID_AUTO_TEST_CASE(testObjectIdSerializeString) { std::string text("0-10-4-2500-80000000000()"); ObjectId oid(text); std::stringstream output; output << oid; BOOST_CHECK_EQUAL(text, output.str()); } QPID_AUTO_TEST_CASE(testObjectIdEncode) { qpid::types::Variant::Map oidMap; ObjectId oid(1, 2, 3, 9999); oid.setV2Key("testkey"); oid.setAgentName("myAgent"); std::stringstream out1; out1 << oid; BOOST_CHECK_EQUAL(out1.str(), "1-2-3-myAgent-9999(testkey)"); } QPID_AUTO_TEST_CASE(testObjectIdAttach) { AgentAttachment agent; ObjectId oid(&agent, 10, 20); oid.setV2Key("GabbaGabbaHey"); oid.setAgentName("MrSmith"); std::stringstream out1; out1 << oid; BOOST_CHECK_EQUAL(out1.str(), "10-20-0-MrSmith-0(GabbaGabbaHey)"); agent.setBanks(30, 40); std::stringstream out2; out2 << oid; BOOST_CHECK_EQUAL(out2.str(), "10-20-30-MrSmith-0(GabbaGabbaHey)"); } QPID_AUTO_TEST_CASE(testObjectIdCreate) { ObjectId oid("some-agent-name", "an-object-name"); BOOST_CHECK_EQUAL(oid.getAgentName(), "some-agent-name"); BOOST_CHECK_EQUAL(oid.getV2Key(), "an-object-name"); } QPID_AUTO_TEST_CASE(testConsoleObjectId) { qpid::console::ObjectId oid1, oid2; oid1.setValue(1, 2); oid2.setValue(3, 4); BOOST_CHECK(oid1 < oid2); BOOST_CHECK(oid1 <= oid2); BOOST_CHECK(oid2 > oid1); BOOST_CHECK(oid2 >= oid1); BOOST_CHECK(oid1 != oid2); BOOST_CHECK(oid1 == oid1); oid1.setValue(3, 6); oid2.setValue(3, 4); BOOST_CHECK(oid1 > oid2); BOOST_CHECK(oid1 >= oid2); BOOST_CHECK(oid2 < oid1); BOOST_CHECK(oid2 <= oid1); BOOST_CHECK(oid1 != oid2); oid2.setValue(3, 6); BOOST_CHECK(oid1 == oid2); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/stop_cluster0000775000076400007640000000211211654250703017540 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Stop brokers on ports listed in cluster.ports PORTS=`cat cluster.ports` for PORT in $PORTS ; do $QPIDD_EXEC --no-module-dir -qp $PORT || ERROR="$ERROR $PORT" done rm -f cluster.ports qpidd.port if [ -n "$ERROR" ]; then echo "Errors stopping brokers on ports: $ERROR" exit 1 fi qpidc-0.16/src/tests/cluster_test_logs.py0000775000076400007640000001216511621324745021220 0ustar00jrossjross00000000000000#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Functions for comparing broker log files, used by cluster_tests.py. import os, os.path, re, glob from itertools import izip def split_log(log): """Split a broker log at checkpoints where a member joins. Return the set of checkpoints discovered.""" checkpoint_re = re.compile("Member joined, frameSeq=([0-9]+), queue snapshot:") outfile = None checkpoints = [] for l in open(log): match = checkpoint_re.search(l) if match: checkpoint = match.groups()[0] checkpoints.append(checkpoint) if outfile: outfile.close() outfile = open("%s.%s"%(log, checkpoint), 'w') if outfile: outfile.write(l) if outfile: outfile.close() return checkpoints def filter_log(log): """Filter the contents of a log file to remove data that is expected to differ between brokers in a cluster. Filtered log contents between the same checkpoints should match across the cluster.""" out = open("%s.filter"%(log), 'w') # Lines to skip entirely, expected differences skip = "|".join([ 'local connection', # Only on local broker 'UPDATER|UPDATEE', # Ignore update process 'stall for update|unstall, ignore update|cancelled offer .* unstall', 'caught up', 'active for links|Passivating links|Activating links', 'info Connecting: .*', # UpdateClient connection 'info Connection.* connected to', # UpdateClient connection 'warning Connection \\[[-0-9.: ]+\\] closed', # UpdateClient connection 'warning Broker closed connection: 200, OK', 'task late', 'task overran', 'warning CLOSING .* unsent data', 'Inter-broker link ', 'Running in a cluster, marking store', 'debug Sending keepalive signal to watchdog', # Watchdog timer thread 'last broker standing joined by 1 replicas, updating queue policies.', 'Connection .* timed out: closing' # heartbeat connection close ]) # Regex to match a UUID uuid='\w\w\w\w\w\w\w\w-\w\w\w\w-\w\w\w\w-\w\w\w\w-\w\w\w\w\w\w\w\w\w\w\w\w' # Substitutions to remove expected differences subs = [ (r'\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d ', ''), # Remove timestamp (r'cluster\([0-9.: ]*', 'cluster('), # Remove cluster node id (r' local\)| shadow\)', ')'), # Remove local/shadow indication (r'CATCHUP', 'READY'), # Treat catchup as equivalent to ready. (r'OFFER', 'READY'), # Treat offer as equivalent to ready. # System UUID expected to be different (r'(org.apache.qpid.broker:system[:(])%s(\)?)'%(uuid), r'\1UUID\2'), # TODO aconway 2010-12-20: review if these should be expected: (r' len=\d+', ' len=NN'), # buffer lengths (r' map={.*_object_name:([^,}]*)[,}].*', r' \1'), # V2 map - just keep name (r'\d+-\d+-\d+--\d+', 'X-X-X--X'), # V1 Object IDs ] # Substitutions to mask known issue: durable test shows inconsistent "changed stats for com.redhat.rhm.store:journal" messages. skip += '|Changed V[12] statistics com.redhat.rhm.store:journal' subs += [(r'to=console.obj.1.0.com.redhat.rhm.store.journal props=\d+ stats=\d+', 'to=console.obj.1.0.com.redhat.rhm.store.journal props=NN stats=NN')] skip_re = re.compile(skip) subs = [(re.compile(pattern), subst) for pattern, subst in subs] for l in open(log): if skip_re.search(l): continue for pattern,subst in subs: l = re.sub(pattern,subst,l) out.write(l) out.close() def verify_logs(): """Compare log files from cluster brokers, verify that they correspond correctly.""" for l in glob.glob("*.log"): filter_log(l) checkpoints = set() for l in glob.glob("*.filter"): checkpoints = checkpoints.union(set(split_log(l))) errors=[] for c in checkpoints: fragments = glob.glob("*.filter.%s"%(c)) fragments.sort(reverse=True, key=os.path.getsize) while len(fragments) >= 2: a = fragments.pop(0) b = fragments[0] for ab in izip(open(a), open(b)): if ab[0] != ab[1]: errors.append("\n %s %s"%(a, b)) break if errors: raise Exception("Files differ in %s"%(os.getcwd())+"".join(errors)) # Can be run as a script. if __name__ == "__main__": verify_logs() qpidc-0.16/src/tests/federated_cluster_test0000775000076400007640000001276211721215323021543 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Test reliability of the replication feature in the face of link # failures: srcdir=`dirname $0` source ./test_env.sh trap stop_brokers EXIT fail() { echo $1 exit 1 } stop_brokers() { if [[ $BROKER_A ]] ; then ../qpidd --no-module-dir -q --port $BROKER_A unset BROKER_A fi if [[ $NODE_1 ]] ; then ../qpidd --no-module-dir -q --port $NODE_1 unset NODE_1 fi if [[ $NODE_2 ]] ; then ../qpidd --no-module-dir -q --port $NODE_2 unset NODE_2 fi if [ -f cluster.ports ]; then rm cluster.ports fi } start_brokers() { #start single node... BROKER_A=`../qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no --log-enable info+` || fail "BROKER_A failed to start" #...and start cluster $srcdir/start_cluster 2 || fail "Could not start cluster" NODE_1=$(head -1 cluster.ports) NODE_2=$(tail -1 cluster.ports) test -n "$NODE_1" || fail "NODE_1 failed to start" test -n "$NODE_2" || fail "NODE_2 failed to start" } setup() { #create exchange on both cluster and single broker $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add exchange direct test-exchange $PYTHON_COMMANDS/qpid-config -b "localhost:$NODE_1" add exchange direct test-exchange #create dynamic routes for test exchange $PYTHON_COMMANDS/qpid-route dynamic add "localhost:$NODE_2" "localhost:$BROKER_A" test-exchange $PYTHON_COMMANDS/qpid-route dynamic add "localhost:$BROKER_A" "localhost:$NODE_2" test-exchange #create test queue on cluster and bind it to the test exchange $PYTHON_COMMANDS/qpid-config -b "localhost:$NODE_1" add queue test-queue $PYTHON_COMMANDS/qpid-config -b "localhost:$NODE_1" bind test-exchange test-queue to-cluster #create test queue on single broker and bind it to the test exchange $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add queue test-queue $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" bind test-exchange test-queue from-cluster } run_test_pull_to_cluster_two_consumers() { #start consumers on each of the two nodes of the cluster ./receiver --port $NODE_1 --queue test-queue --credit-window 1 > fed1.out.tmp & ./receiver --port $NODE_2 --queue test-queue --credit-window 1 > fed2.out.tmp & #send stream of messages to test exchange on single broker for i in `seq 1 1000`; do echo Message $i >> fed.in.tmp; done ./sender --port $BROKER_A --exchange test-exchange --routing-key to-cluster --send-eos 2 < fed.in.tmp #combine output of the two consumers, sort it and compare with the expected stream wait sort -g -k 2 fed1.out.tmp fed2.out.tmp > fed.out.tmp diff fed.in.tmp fed.out.tmp || fail "federated link to cluster failed: expectations not met!" rm -f fed*.tmp #cleanup } run_test_pull_to_cluster() { #send stream of messages to test exchange on single broker for i in `seq 1 1000`; do echo Message $i >> fed.in.tmp; done ./sender --port $BROKER_A --exchange test-exchange --routing-key to-cluster --send-eos 1 < fed.in.tmp #consume from remaining node of the cluster ./receiver --port $NODE_2 --queue test-queue > fed.out.tmp #verify all messages are received diff fed.in.tmp fed.out.tmp || fail "federated link to cluster failed: expectations not met!" rm -f fed*.tmp #cleanup } run_test_pull_from_cluster() { #start consumer on single broker ./receiver --port $BROKER_A --queue test-queue --credit-window 1 > fed.out.tmp & #send stream of messages to test exchange on cluster for i in `seq 1 1000`; do echo Message $i >> fed.in.tmp; done ./sender --port $NODE_2 --exchange test-exchange --routing-key from-cluster --send-eos 1 < fed.in.tmp #verify all messages are received wait diff fed.in.tmp fed.out.tmp || fail "federated link from cluster failed: expectations not met!" rm -f fed*.tmp #cleanup } if test -d ${PYTHON_DIR}; then . $srcdir/ais_check rm -f fed*.tmp #cleanup any files left from previous run start_brokers echo "brokers started" setup echo "setup completed" run_test_pull_to_cluster_two_consumers echo "federated link to cluster verified" run_test_pull_from_cluster echo "federated link from cluster verified" if [[ $TEST_NODE_FAILURE ]] ; then #kill first cluster node and retest kill -9 $(../qpidd --check --port $NODE_1) && unset NODE_1 echo "killed first cluster node; waiting for links to re-establish themselves..." sleep 5 echo "retesting..." run_test_pull_to_cluster echo "federated link to cluster verified" run_test_pull_from_cluster echo "federated link from cluster verified" fi fi qpidc-0.16/src/tests/RangeSet.cpp0000664000076400007640000001224311252003060017270 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "qpid/RangeSet.h" using namespace std; using namespace qpid; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(RangeSetTestSuite) typedef qpid::Range TestRange; typedef qpid::RangeSet TestRangeSet; QPID_AUTO_TEST_CASE(testEmptyRange) { TestRange r; BOOST_CHECK(r.empty()); BOOST_CHECK(!r.contains(0)); // BOOST_CHECK(r.contiguous(0)); } QPID_AUTO_TEST_CASE(testRangeSetAddPoint) { TestRangeSet r; BOOST_CHECK(r.empty()); r += 3; BOOST_CHECK_MESSAGE(r.contains(3), r); BOOST_CHECK_MESSAGE(r.contains(TestRange(3,4)), r); BOOST_CHECK(!r.empty()); r += 5; BOOST_CHECK_MESSAGE(r.contains(5), r); BOOST_CHECK_MESSAGE(r.contains(TestRange(5,6)), r); BOOST_CHECK_MESSAGE(!r.contains(TestRange(3,6)), r); r += 4; BOOST_CHECK_MESSAGE(r.contains(TestRange(3,6)), r); } QPID_AUTO_TEST_CASE(testRangeSetAddRange) { TestRangeSet r; r += TestRange(0,3); BOOST_CHECK(r.contains(TestRange(0,3))); r += TestRange(4,6); BOOST_CHECK_MESSAGE(r.contains(TestRange(4,6)), r); r += 3; BOOST_CHECK_MESSAGE(r.contains(TestRange(0,6)), r); BOOST_CHECK(r.front() == 0); BOOST_CHECK(r.back() == 6); } QPID_AUTO_TEST_CASE(testRangeSetAddSet) { TestRangeSet r; TestRangeSet s = TestRangeSet(0,3)+TestRange(5,10); r += s; BOOST_CHECK_EQUAL(r,s); r += TestRangeSet(3,5) + TestRange(7,12) + 15; BOOST_CHECK_EQUAL(r, TestRangeSet(0,12) + 15); r.clear(); BOOST_CHECK(r.empty()); r += TestRange::makeClosed(6,10); BOOST_CHECK_EQUAL(r, TestRangeSet(6,11)); r += TestRangeSet(2,6)+8; BOOST_CHECK_EQUAL(r, TestRangeSet(2,11)); } QPID_AUTO_TEST_CASE(testRangeSetIterate) { TestRangeSet r; (((r += 1) += 10) += TestRange(4,7)) += 2; BOOST_MESSAGE(r); std::vector actual; std::copy(r.begin(), r.end(), std::back_inserter(actual)); std::vector expect = boost::assign::list_of(1)(2)(4)(5)(6)(10); BOOST_CHECK_EQUAL(expect, actual); } QPID_AUTO_TEST_CASE(testRangeSetRemove) { // points BOOST_CHECK_EQUAL(TestRangeSet(0,5)-3, TestRangeSet(0,3)+TestRange(4,5)); BOOST_CHECK_EQUAL(TestRangeSet(1,5)-5, TestRangeSet(1,5)); BOOST_CHECK_EQUAL(TestRangeSet(1,5)-0, TestRangeSet(1,5)); TestRangeSet r(TestRangeSet(0,5)+TestRange(10,15)+TestRange(20,25)); // TestRanges BOOST_CHECK_EQUAL(r-TestRange(0,5), TestRangeSet(10,15)+TestRange(20,25)); BOOST_CHECK_EQUAL(r-TestRange(10,15), TestRangeSet(0,5)+TestRange(20,25)); BOOST_CHECK_EQUAL(r-TestRange(20,25), TestRangeSet(0,5)+TestRange(10,15)); BOOST_CHECK_EQUAL(r-TestRange(-5, 30), TestRangeSet()); BOOST_CHECK_EQUAL(r-TestRange(-5, 7), TestRangeSet(10,15)+TestRange(20,25)); BOOST_CHECK_EQUAL(r-TestRange(8,19), TestRangeSet(0,5)+TestRange(20,25)); BOOST_CHECK_EQUAL(r-TestRange(17,30), TestRangeSet(0,5)+TestRange(10,15)); BOOST_CHECK_EQUAL(r-TestRange(17,30), TestRangeSet(0,5)+TestRange(10,15)); BOOST_CHECK_EQUAL(r-TestRange(-5, 5), TestRangeSet(10,15)+TestRange(20,25)); BOOST_CHECK_EQUAL(r-TestRange(10,19), TestRangeSet(0,5)+TestRange(20,25)); BOOST_CHECK_EQUAL(r-TestRange(18,25), TestRangeSet(0,5)+TestRange(10,15)); BOOST_CHECK_EQUAL(r-TestRange(23,25), TestRangeSet(0,5)+TestRange(10,15)+TestRange(20,23)); BOOST_CHECK_EQUAL(r-TestRange(-3, 3), TestRangeSet(3,5)+TestRange(10,15)+TestRange(20,25)); BOOST_CHECK_EQUAL(r-TestRange(3, 7), TestRangeSet(0,2)+TestRange(10,15)+TestRange(20,25)); BOOST_CHECK_EQUAL(r-TestRange(3, 12), TestRangeSet(0,3)+TestRange(12,15)+TestRange(20,25)); BOOST_CHECK_EQUAL(r-TestRange(3, 22), TestRangeSet(12,15)+TestRange(22,25)); BOOST_CHECK_EQUAL(r-TestRange(12, 22), TestRangeSet(0,5)+TestRange(10,11)+TestRange(22,25)); // Sets BOOST_CHECK_EQUAL(r-(TestRangeSet(-1,6)+TestRange(11,14)+TestRange(23,25)), TestRangeSet(10,11)+TestRange(14,15)+TestRange(20,23)); } QPID_AUTO_TEST_CASE(testRangeContaining) { TestRangeSet r; (((r += 1) += TestRange(3,5)) += 7); BOOST_CHECK_EQUAL(r.rangeContaining(0), TestRange(0,0)); BOOST_CHECK_EQUAL(r.rangeContaining(1), TestRange(1,2)); BOOST_CHECK_EQUAL(r.rangeContaining(2), TestRange(2,2)); BOOST_CHECK_EQUAL(r.rangeContaining(3), TestRange(3,5)); BOOST_CHECK_EQUAL(r.rangeContaining(4), TestRange(3,5)); BOOST_CHECK_EQUAL(r.rangeContaining(5), TestRange(5,5)); BOOST_CHECK_EQUAL(r.rangeContaining(6), TestRange(6,6)); BOOST_CHECK_EQUAL(r.rangeContaining(7), TestRange(7,8)); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/AtomicValue.cpp0000664000076400007640000000301211252003060017763 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "qpid/sys/AtomicValue.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(AtomicValueTestSuite) QPID_AUTO_TEST_CASE(test) { qpid::sys::AtomicValue x(0); BOOST_CHECK_EQUAL(++x, 1); BOOST_CHECK_EQUAL(--x,0); BOOST_CHECK_EQUAL(x+=5,5); BOOST_CHECK_EQUAL(x-=10,-5); BOOST_CHECK_EQUAL(x.fetchAndAdd(7), -5); BOOST_CHECK_EQUAL(x.get(),2); BOOST_CHECK_EQUAL(x.fetchAndSub(3), 2); BOOST_CHECK_EQUAL(x.get(),-1); BOOST_CHECK_EQUAL(x.valueCompareAndSwap(-1,10), -1); BOOST_CHECK_EQUAL(x.get(), 10); BOOST_CHECK_EQUAL(x.valueCompareAndSwap(5, 6), 10); BOOST_CHECK_EQUAL(x.get(), 10); BOOST_CHECK(!x.boolCompareAndSwap(5, 6)); BOOST_CHECK_EQUAL(x.get(), 10); BOOST_CHECK(x.boolCompareAndSwap(10, 6)); BOOST_CHECK_EQUAL(x.get(), 6); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/sasl_fed_ex_dynamic_cluster0000775000076400007640000000161511540546671022550 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh source $srcdir/ais_check with_ais_group ${srcdir}/sasl_fed_ex dynamic cluster qpidc-0.16/src/tests/run_perftest0000775000076400007640000000177111654250703017544 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Args: count [qpid-perftest options...] # Run a qpid-perftest with count multiplied. # MULTIPLIER=3 COUNT=`expr $1 \* $MULTIPLIER` shift exec `dirname $0`/run_test ./qpid-perftest --summary --count $COUNT "$@" qpidc-0.16/src/tests/cluster_python_tests_failing.txt0000664000076400007640000000041711625531570023632 0ustar00jrossjross00000000000000qpid_tests.broker_0_10.management.ManagementTest.test_purge_queue qpid_tests.broker_0_10.management.ManagementTest.test_connection_close qpid_tests.broker_0_10.message.MessageTests.test_ttl qpid_tests.broker_0_10.management.ManagementTest.test_broker_connectivity_oldAPI qpidc-0.16/src/tests/test_watchdog0000775000076400007640000000240411654250703017655 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Tests for the watchdog plug-in source ./test_env.sh # Start a broker with watchdog, freeze it with kill -STOP, verify that it is killed. PORT=`$QPIDD_EXEC -dp0 --no-data-dir --auth=no --no-module-dir --load-module $WATCHDOG_LIB --log-to-file=qpidd_watchdog.log --watchdog-interval 2` || exit 1 PID=`$QPIDD_EXEC --no-module-dir -cp $PORT` || exit 1 kill -STOP $PID sleep 3 if kill -0 $PID 2>/dev/null; then echo "Hung process did not die." kill $PID else true fi qpidc-0.16/src/tests/cluster_tests.py0000775000076400007640000020614011721215323020345 0ustar00jrossjross00000000000000#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import os, signal, sys, time, imp, re, subprocess, glob, random, logging import cluster_test_logs from qpid import datatypes, messaging from brokertest import * from qpid.harness import Skipped from qpid.messaging import Message, Empty, Disposition, REJECTED, util from threading import Thread, Lock, Condition from logging import getLogger from itertools import chain from tempfile import NamedTemporaryFile log = getLogger("qpid.cluster_tests") # Note: brokers that shut themselves down due to critical error during # normal operation will still have an exit code of 0. Brokers that # shut down because of an error found during initialize will exit with # a non-0 code. Hence the apparently inconsistent use of EXPECT_EXIT_OK # and EXPECT_EXIT_FAIL in some of the tests below. # TODO aconway 2010-03-11: resolve this - ideally any exit due to an error # should give non-0 exit status. # Import scripts as modules qpid_cluster=import_script(checkenv("QPID_CLUSTER_EXEC")) def readfile(filename): """Returns te content of file named filename as a string""" f = file(filename) try: return f.read() finally: f.close() class ShortTests(BrokerTest): """Short cluster functionality tests.""" def test_message_replication(self): """Test basic cluster message replication.""" # Start a cluster, send some messages to member 0. cluster = self.cluster(2) s0 = cluster[0].connect().session() s0.sender("q; {create:always}").send(Message("x")) s0.sender("q; {create:always}").send(Message("y")) s0.connection.close() # Verify messages available on member 1. s1 = cluster[1].connect().session() m = s1.receiver("q", capacity=1).fetch(timeout=1) s1.acknowledge() self.assertEqual("x", m.content) s1.connection.close() # Start member 2 and verify messages available. s2 = cluster.start().connect().session() m = s2.receiver("q", capacity=1).fetch(timeout=1) s2.acknowledge() self.assertEqual("y", m.content) s2.connection.close() def test_store_direct_update_match(self): """Verify that brokers stores an identical message whether they receive it direct from clients or during an update, no header or other differences""" cluster = self.cluster(0, args=["--load-module", self.test_store_lib]) cluster.start(args=["--test-store-dump", "direct.dump"]) # Try messages with various headers cluster[0].send_message("q", Message(durable=True, content="foobar", subject="subject", reply_to="reply_to", properties={"n":10})) # Try messages of different sizes for size in range(0,10000,100): cluster[0].send_message("q", Message(content="x"*size, durable=True)) # Try sending via named exchange c = cluster[0].connect_old() s = c.session(str(qpid.datatypes.uuid4())) s.exchange_bind(exchange="amq.direct", binding_key="foo", queue="q") props = s.delivery_properties(routing_key="foo", delivery_mode=2) s.message_transfer( destination="amq.direct", message=qpid.datatypes.Message(props, "content")) # Try message with TTL and differnet headers/properties cluster[0].send_message("q", Message(durable=True, ttl=100000)) cluster[0].send_message("q", Message(durable=True, properties={}, ttl=100000)) cluster[0].send_message("q", Message(durable=True, properties={"x":10}, ttl=100000)) # Now update a new member and compare their dumps. cluster.start(args=["--test-store-dump", "updatee.dump"]) assert readfile("direct.dump") == readfile("updatee.dump") os.remove("direct.dump") os.remove("updatee.dump") def test_sasl(self): """Test SASL authentication and encryption in a cluster""" sasl_config=os.path.join(self.rootdir, "sasl_config") acl=os.path.join(os.getcwd(), "policy.acl") aclf=file(acl,"w") # Must allow cluster-user (zag) access to credentials exchange. aclf.write(""" acl allow zag@QPID publish exchange name=qpid.cluster-credentials acl allow zig@QPID all all acl deny all all """) aclf.close() cluster = self.cluster(1, args=["--auth", "yes", "--sasl-config", sasl_config, "--load-module", os.getenv("ACL_LIB"), "--acl-file", acl, "--cluster-username=zag", "--cluster-password=zag", "--cluster-mechanism=PLAIN" ]) # Valid user/password, ensure queue is created. c = cluster[0].connect(username="zig", password="zig") c.session().sender("ziggy;{create:always,node:{x-declare:{exclusive:true}}}") c.close() cluster.start() # Start second node. # Check queue is created on second node. c = cluster[1].connect(username="zig", password="zig") c.session().receiver("ziggy;{assert:always}") c.close() for b in cluster: b.ready() # Make sure all brokers still running. # Valid user, bad password try: cluster[0].connect(username="zig", password="foo").close() self.fail("Expected exception") except messaging.exceptions.ConnectionError: pass for b in cluster: b.ready() # Make sure all brokers still running. # Bad user ID try: cluster[0].connect(username="foo", password="bar").close() self.fail("Expected exception") except messaging.exceptions.ConnectionError: pass for b in cluster: b.ready() # Make sure all brokers still running. # Action disallowed by ACL c = cluster[0].connect(username="zag", password="zag") try: s = c.session() s.sender("zaggy;{create:always}") s.close() self.fail("Expected exception") except messaging.exceptions.UnauthorizedAccess: pass # make sure the queue was not created at the other node. c = cluster[1].connect(username="zig", password="zig") try: s = c.session() s.sender("zaggy;{assert:always}") s.close() self.fail("Expected exception") except messaging.exceptions.NotFound: pass def test_sasl_join_good(self): """Verify SASL authentication between brokers when joining a cluster.""" sasl_config=os.path.join(self.rootdir, "sasl_config") # Test with a valid username/password cluster = self.cluster(1, args=["--auth", "yes", "--sasl-config", sasl_config, "--cluster-username=zig", "--cluster-password=zig", "--cluster-mechanism=PLAIN" ]) cluster.start() c = cluster[1].connect(username="zag", password="zag", mechanism="PLAIN") def test_sasl_join_bad_password(self): # Test with an invalid password cluster = self.cluster(1, args=["--auth", "yes", "--sasl-config", os.path.join(self.rootdir, "sasl_config"), "--cluster-username=zig", "--cluster-password=bad", "--cluster-mechanism=PLAIN" ]) cluster.start(wait=False, expect=EXPECT_EXIT_FAIL) assert cluster[1].log_contains("critical Unexpected error: connection-forced: Authentication failed") def test_sasl_join_wrong_user(self): # Test with a valid user that is not the cluster user. cluster = self.cluster(0, args=["--auth", "yes", "--sasl-config", os.path.join(self.rootdir, "sasl_config")]) cluster.start(args=["--cluster-username=zig", "--cluster-password=zig", "--cluster-mechanism=PLAIN" ]) cluster.start(wait=False, expect=EXPECT_EXIT_FAIL, args=["--cluster-username=zag", "--cluster-password=zag", "--cluster-mechanism=PLAIN" ]) assert cluster[1].log_contains("critical Unexpected error: unauthorized-access: unauthorized-access: Unauthorized user zag@QPID for qpid.cluster-credentials, should be zig") def test_user_id_update(self): """Ensure that user-id of an open session is updated to new cluster members""" sasl_config=os.path.join(self.rootdir, "sasl_config") cluster = self.cluster(1, args=["--auth", "yes", "--sasl-config", sasl_config, "--cluster-mechanism=ANONYMOUS"]) c = cluster[0].connect(username="zig", password="zig") s = c.session().sender("q;{create:always}") s.send(Message("x", user_id="zig")) # Message sent before start new broker cluster.start() s.send(Message("y", user_id="zig")) # Messsage sent after start of new broker # Verify brokers are healthy and messages are on the queue. self.assertEqual("x", cluster[0].get_message("q").content) self.assertEqual("y", cluster[1].get_message("q").content) def test_link_events(self): """Regression test for https://bugzilla.redhat.com/show_bug.cgi?id=611543""" args = ["--mgmt-pub-interval", 1] # Publish management information every second. broker1 = self.cluster(1, args)[0] broker2 = self.cluster(1, args)[0] qp = self.popen(["qpid-printevents", broker1.host_port()], EXPECT_RUNNING) qr = self.popen(["qpid-route", "route", "add", broker1.host_port(), broker2.host_port(), "amq.fanout", "key" ], EXPECT_EXIT_OK) # Look for link event in printevents output. retry(lambda: find_in_file("brokerLinkUp", qp.outfile("out"))) broker1.ready() broker2.ready() qr.wait() def test_queue_cleaner(self): """ Regression test to ensure that cleanup of expired messages works correctly """ cluster = self.cluster(2, args=["--queue-purge-interval", 3]) s0 = cluster[0].connect().session() sender = s0.sender("my-lvq; {create: always, node:{x-declare:{arguments:{'qpid.last_value_queue':1}}}}") #send 10 messages that will all expire and be cleaned up for i in range(1, 10): msg = Message("message-%s" % i) msg.properties["qpid.LVQ_key"] = "a" msg.ttl = 0.1 sender.send(msg) #wait for queue cleaner to run time.sleep(3) #test all is ok by sending and receiving a message msg = Message("non-expiring") msg.properties["qpid.LVQ_key"] = "b" sender.send(msg) s0.connection.close() s1 = cluster[1].connect().session() m = s1.receiver("my-lvq", capacity=1).fetch(timeout=1) s1.acknowledge() self.assertEqual("non-expiring", m.content) s1.connection.close() for b in cluster: b.ready() # Make sure all brokers still running. def test_amqfailover_visible(self): """Verify that the amq.failover exchange can be seen by QMF-based tools - regression test for BZ615300.""" broker1 = self.cluster(1)[0] broker2 = self.cluster(1)[0] qs = subprocess.Popen(["qpid-stat", "-e", "-b", broker1.host_port()], stdout=subprocess.PIPE) out = qs.communicate()[0] assert out.find("amq.failover") > 0 def evaluate_address(self, session, address): """Create a receiver just to evaluate an address for its side effects""" r = session.receiver(address) r.close() def test_expire_fanout(self): """Regression test for QPID-2874: Clustered broker crashes in assertion in cluster/ExpiryPolicy.cpp. Caused by a fan-out message being updated as separate messages""" cluster = self.cluster(1) session0 = cluster[0].connect().session() # Create 2 queues bound to fanout exchange. self.evaluate_address(session0, "q1;{create:always,node:{x-bindings:[{exchange:'amq.fanout',queue:q1}]}}") self.evaluate_address(session0, "q2;{create:always,node:{x-bindings:[{exchange:'amq.fanout',queue:q2}]}}") queues = ["q1", "q2"] # Send a fanout message with a long timeout s = session0.sender("amq.fanout") s.send(Message("foo", ttl=100), sync=False) # Start a new member, check the messages cluster.start() session1 = cluster[1].connect().session() for q in queues: self.assert_browse(session1, "q1", ["foo"]) def test_route_update(self): """Regression test for https://issues.apache.org/jira/browse/QPID-2982 Links and bridges associated with routes were not replicated on update. This meant extra management objects and caused an exit if a management client was attached. """ args=["--mgmt-pub-interval=1","--log-enable=trace+:management"] # First broker will be killed. cluster0 = self.cluster(1, args=args) cluster1 = self.cluster(1, args=args) assert 0 == subprocess.call( ["qpid-route", "route", "add", cluster0[0].host_port(), cluster1[0].host_port(), "dummy-exchange", "dummy-key", "-d"]) cluster0.start() # Wait for qpid-tool:list on cluster0[0] to generate expected output. pattern = re.compile("org.apache.qpid.broker.*link") qpid_tool = subprocess.Popen(["qpid-tool", cluster0[0].host_port()], stdin=subprocess.PIPE, stdout=subprocess.PIPE) class Scanner(Thread): def __init__(self): self.found = False; Thread.__init__(self) def run(self): for l in qpid_tool.stdout: if pattern.search(l): self.found = True; return scanner = Scanner() scanner.start() start = time.time() try: # Wait up to 5 second timeout for scanner to find expected output while not scanner.found and time.time() < start + 5: qpid_tool.stdin.write("list\n") # Ask qpid-tool to list for b in cluster0: b.ready() # Raise if any brokers are down finally: qpid_tool.stdin.write("quit\n") qpid_tool.wait() scanner.join() assert scanner.found # Regression test for https://issues.apache.org/jira/browse/QPID-3235 # Inconsistent stats when changing elder. # Force a change of elder cluster0.start() for b in cluster0: b.ready() cluster0[0].expect=EXPECT_EXIT_FAIL # About to die. cluster0[0].kill() time.sleep(2) # Allow a management interval to pass. for b in cluster0[1:]: b.ready() # Verify logs are consistent cluster_test_logs.verify_logs() def test_redelivered(self): """Verify that redelivered flag is set correctly on replayed messages""" cluster = self.cluster(2, expect=EXPECT_EXIT_FAIL) url = "amqp:tcp:%s,tcp:%s" % (cluster[0].host_port(), cluster[1].host_port()) queue = "my-queue" cluster[0].declare_queue(queue) self.sender = self.popen( ["qpid-send", "--broker", url, "--address", queue, "--sequence=true", "--send-eos=1", "--messages=100000", "--connection-options={%s}"%(Cluster.CONNECTION_OPTIONS) ]) self.receiver = self.popen( ["qpid-receive", "--broker", url, "--address", queue, "--ignore-duplicates", "--check-redelivered", "--connection-options={%s}"%(Cluster.CONNECTION_OPTIONS), "--forever" ]) time.sleep(1)#give sender enough time to have some messages to replay cluster[0].kill() self.sender.wait() self.receiver.wait() cluster[1].kill() class BlockedSend(Thread): """Send a message, send is expected to block. Verify that it does block (for a given timeout), then allow waiting till it unblocks when it is expected to do so.""" def __init__(self, sender, msg): self.sender, self.msg = sender, msg self.blocked = True self.condition = Condition() self.timeout = 0.1 # Time to wait for expected results. Thread.__init__(self) def run(self): try: self.sender.send(self.msg, sync=True) self.condition.acquire() try: self.blocked = False self.condition.notify() finally: self.condition.release() except Exception,e: print "BlockedSend exception: %s"%e def start(self): Thread.start(self) time.sleep(self.timeout) assert self.blocked # Expected to block def assert_blocked(self): assert self.blocked def wait(self): # Now expecting to unblock self.condition.acquire() try: while self.blocked: self.condition.wait(self.timeout) if self.blocked: raise Exception("Timed out waiting for send to unblock") finally: self.condition.release() self.join() def queue_flowlimit_test(self, brokers): """Verify that the queue's flowlimit configuration and state are correctly replicated. The brokers argument allows this test to run on single broker, cluster of 2 pre-startd brokers or cluster where second broker starts after queue is in flow control. """ # configure a queue with a specific flow limit on first broker ssn0 = brokers.first().connect().session() s0 = ssn0.sender("flq; {create:always, node:{type:queue, x-declare:{arguments:{'qpid.flow_stop_count':5, 'qpid.flow_resume_count':3}}}}") brokers.first().startQmf() q1 = [q for q in brokers.first().qmf_session.getObjects(_class="queue") if q.name == "flq"][0] oid = q1.getObjectId() self.assertEqual(q1.name, "flq") self.assertEqual(q1.arguments, {u'qpid.flow_stop_count': 5L, u'qpid.flow_resume_count': 3L}) assert not q1.flowStopped self.assertEqual(q1.flowStoppedCount, 0) # fill the queue on one broker until flow control is active for x in range(5): s0.send(Message(str(x))) sender = ShortTests.BlockedSend(s0, Message(str(6))) sender.start() # Tests that sender does block # Verify the broker queue goes into a flowStopped state deadline = time.time() + 1 while not q1.flowStopped and time.time() < deadline: q1.update() assert q1.flowStopped self.assertEqual(q1.flowStoppedCount, 1) sender.assert_blocked() # Still blocked # Now verify the both brokers in cluster have same configuration brokers.second().startQmf() qs = brokers.second().qmf_session.getObjects(_objectId=oid) self.assertEqual(len(qs), 1) q2 = qs[0] self.assertEqual(q2.name, "flq") self.assertEqual(q2.arguments, {u'qpid.flow_stop_count': 5L, u'qpid.flow_resume_count': 3L}) assert q2.flowStopped self.assertEqual(q2.flowStoppedCount, 1) # now drain the queue using a session to the other broker ssn1 = brokers.second().connect().session() r1 = ssn1.receiver("flq", capacity=6) for x in range(4): r1.fetch(timeout=0) ssn1.acknowledge() sender.wait() # Verify no longer blocked. # and re-verify state of queue on both brokers q1.update() assert not q1.flowStopped q2.update() assert not q2.flowStopped ssn0.connection.close() ssn1.connection.close() cluster_test_logs.verify_logs() def test_queue_flowlimit(self): """Test flow limits on a standalone broker""" broker = self.broker() class Brokers: def first(self): return broker def second(self): return broker self.queue_flowlimit_test(Brokers()) def test_queue_flowlimit_cluster(self): cluster = self.cluster(2) class Brokers: def first(self): return cluster[0] def second(self): return cluster[1] self.queue_flowlimit_test(Brokers()) def test_queue_flowlimit_cluster_join(self): cluster = self.cluster(1) class Brokers: def first(self): return cluster[0] def second(self): if len(cluster) == 1: cluster.start() return cluster[1] self.queue_flowlimit_test(Brokers()) def test_queue_flowlimit_replicate(self): """ Verify that a queue which is in flow control BUT has drained BELOW the flow control 'stop' threshold, is correctly replicated when a new broker is added to the cluster. """ class AsyncSender(Thread): """Send a fixed number of msgs from a sender in a separate thread so it may block without blocking the test. """ def __init__(self, broker, address, count=1, size=4): Thread.__init__(self) self.daemon = True self.broker = broker self.queue = address self.count = count self.size = size self.done = False def run(self): self.sender = subprocess.Popen(["qpid-send", "--capacity=1", "--content-size=%s" % self.size, "--messages=%s" % self.count, "--failover-updates", "--connection-options={%s}"%(Cluster.CONNECTION_OPTIONS), "--address=%s" % self.queue, "--broker=%s" % self.broker.host_port()]) self.sender.wait() self.done = True cluster = self.cluster(2) # create a queue with rather draconian flow control settings ssn0 = cluster[0].connect().session() s0 = ssn0.sender("flq; {create:always, node:{type:queue, x-declare:{arguments:{'qpid.flow_stop_count':100, 'qpid.flow_resume_count':20}}}}") # fire off the sending thread to broker[0], and wait until the queue # hits flow control on broker[1] sender = AsyncSender(cluster[0], "flq", count=110); sender.start(); cluster[1].startQmf() q_obj = [q for q in cluster[1].qmf_session.getObjects(_class="queue") if q.name == "flq"][0] deadline = time.time() + 10 while not q_obj.flowStopped and time.time() < deadline: q_obj.update() assert q_obj.flowStopped assert not sender.done assert q_obj.msgDepth < 110 # Now drain enough messages on broker[1] to drop below the flow stop # threshold, but not relieve flow control... receiver = subprocess.Popen(["qpid-receive", "--messages=15", "--timeout=1", "--print-content=no", "--failover-updates", "--connection-options={%s}"%(Cluster.CONNECTION_OPTIONS), "--ack-frequency=1", "--address=flq", "--broker=%s" % cluster[1].host_port()]) receiver.wait() q_obj.update() assert q_obj.flowStopped assert not sender.done current_depth = q_obj.msgDepth # add a new broker to the cluster, and verify that the queue is in flow # control on that broker cluster.start() cluster[2].startQmf() q_obj = [q for q in cluster[2].qmf_session.getObjects(_class="queue") if q.name == "flq"][0] assert q_obj.flowStopped assert q_obj.msgDepth == current_depth # now drain the queue on broker[2], and verify that the sender becomes # unblocked receiver = subprocess.Popen(["qpid-receive", "--messages=95", "--timeout=1", "--print-content=no", "--failover-updates", "--connection-options={%s}"%(Cluster.CONNECTION_OPTIONS), "--ack-frequency=1", "--address=flq", "--broker=%s" % cluster[2].host_port()]) receiver.wait() q_obj.update() assert not q_obj.flowStopped self.assertEqual(q_obj.msgDepth, 0) # verify that the sender has become unblocked sender.join(timeout=5) assert not sender.isAlive() assert sender.done def test_blocked_queue_delete(self): """Verify that producers which are blocked on a queue due to flow control are unblocked when that queue is deleted. """ cluster = self.cluster(2) cluster[0].startQmf() cluster[1].startQmf() # configure a queue with a specific flow limit on first broker ssn0 = cluster[0].connect().session() s0 = ssn0.sender("flq; {create:always, node:{type:queue, x-declare:{arguments:{'qpid.flow_stop_count':5, 'qpid.flow_resume_count':3}}}}") q1 = [q for q in cluster[0].qmf_session.getObjects(_class="queue") if q.name == "flq"][0] oid = q1.getObjectId() self.assertEqual(q1.name, "flq") self.assertEqual(q1.arguments, {u'qpid.flow_stop_count': 5L, u'qpid.flow_resume_count': 3L}) assert not q1.flowStopped self.assertEqual(q1.flowStoppedCount, 0) # fill the queue on one broker until flow control is active for x in range(5): s0.send(Message(str(x))) sender = ShortTests.BlockedSend(s0, Message(str(6))) sender.start() # Tests that sender does block # Verify the broker queue goes into a flowStopped state deadline = time.time() + 1 while not q1.flowStopped and time.time() < deadline: q1.update() assert q1.flowStopped self.assertEqual(q1.flowStoppedCount, 1) sender.assert_blocked() # Still blocked # Now verify the both brokers in cluster have same configuration qs = cluster[1].qmf_session.getObjects(_objectId=oid) self.assertEqual(len(qs), 1) q2 = qs[0] self.assertEqual(q2.name, "flq") self.assertEqual(q2.arguments, {u'qpid.flow_stop_count': 5L, u'qpid.flow_resume_count': 3L}) assert q2.flowStopped self.assertEqual(q2.flowStoppedCount, 1) # now delete the blocked queue from other broker ssn1 = cluster[1].connect().session() self.evaluate_address(ssn1, "flq;{delete:always}") sender.wait() # Verify no longer blocked. ssn0.connection.close() ssn1.connection.close() cluster_test_logs.verify_logs() def test_alternate_exchange_update(self): """Verify that alternate-exchange on exchanges and queues is propagated to new members of a cluster. """ cluster = self.cluster(1) s0 = cluster[0].connect().session() # create alt queue bound to amq.fanout exchange, will be destination for alternate exchanges self.evaluate_address(s0, "alt;{create:always,node:{x-bindings:[{exchange:'amq.fanout',queue:alt}]}}") # create direct exchange ex with alternate-exchange amq.fanout and no queues bound self.evaluate_address(s0, "ex;{create:always,node:{type:topic, x-declare:{type:'direct', alternate-exchange:'amq.fanout'}}}") # create queue q with alternate-exchange amq.fanout self.evaluate_address(s0, "q;{create:always,node:{type:queue, x-declare:{alternate-exchange:'amq.fanout'}}}") def verify(broker): s = broker.connect().session() # Verify unmatched message goes to ex's alternate. s.sender("ex").send("foo") self.assertEqual("foo", s.receiver("alt").fetch(timeout=0).content) # Verify rejected message goes to q's alternate. s.sender("q").send("bar") msg = s.receiver("q").fetch(timeout=0) self.assertEqual("bar", msg.content) s.acknowledge(msg, Disposition(REJECTED)) # Reject the message self.assertEqual("bar", s.receiver("alt").fetch(timeout=0).content) verify(cluster[0]) cluster.start() verify(cluster[1]) def test_binding_order(self): """Regression test for binding order inconsistency in cluster""" cluster = self.cluster(1) c0 = cluster[0].connect() s0 = c0.session() # Declare multiple queues bound to same key on amq.topic def declare(q,max=0): if max: declare = 'x-declare:{arguments:{"qpid.max_count":%d, "qpid.flow_stop_count":0}}'%max else: declare = 'x-declare:{}' bind='x-bindings:[{queue:%s,key:key,exchange:"amq.topic"}]'%(q) s0.sender("%s;{create:always,node:{%s,%s}}" % (q,declare,bind)) declare('d',max=4) # Only one with a limit for q in ['c', 'b','a']: declare(q) # Add a cluster member, send enough messages to exceed the max count cluster.start() try: s = s0.sender('amq.topic/key') for m in xrange(1,6): s.send(Message(str(m))) self.fail("Expected capacity exceeded exception") except messaging.exceptions.TargetCapacityExceeded: pass c1 = cluster[1].connect() s1 = c1.session() s0 = c0.session() # Old session s0 is broken by exception. # Verify queue contents are consistent. for q in ['a','b','c','d']: self.assertEqual(self.browse(s0, q), self.browse(s1, q)) # Verify queue contents are "best effort" for q in ['a','b','c']: self.assert_browse(s1,q,[str(n) for n in xrange(1,6)]) self.assert_browse(s1,'d',[str(n) for n in xrange(1,5)]) def test_deleted_exchange(self): """QPID-3215: cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated Verify stand-alone case """ cluster = self.cluster() # Verify we do not route message via an exchange that has been destroyed. cluster.start() s0 = cluster[0].connect().session() self.evaluate_address(s0, "ex;{create:always,node:{type:topic}}") self.evaluate_address(s0, "q;{create:always,node:{x-bindings:[{exchange:'ex',queue:q,key:foo}]}}") send0 = s0.sender("ex/foo") send0.send("foo") self.assert_browse(s0, "q", ["foo"]) self.evaluate_address(s0, "ex;{delete:always}") try: send0.send("bar") # Should fail, exchange is deleted. self.fail("Expected not-found exception") except qpid.messaging.NotFound: pass self.assert_browse(cluster[0].connect().session(), "q", ["foo"]) def test_deleted_exchange_inconsistent(self): """QPID-3215: cached exchange reference can cause cluster inconsistencies if exchange is deleted/recreated Verify cluster inconsistency. """ cluster = self.cluster() cluster.start() s0 = cluster[0].connect().session() self.evaluate_address(s0, "ex;{create:always,node:{type:topic}}") self.evaluate_address(s0, "q;{create:always,node:{x-bindings:[{exchange:'ex',queue:q,key:foo}]}}") send0 = s0.sender("ex/foo") send0.send("foo") self.assert_browse(s0, "q", ["foo"]) cluster.start() s1 = cluster[1].connect().session() self.evaluate_address(s0, "ex;{delete:always}") try: send0.send("bar") self.fail("Expected not-found exception") except qpid.messaging.NotFound: pass self.assert_browse(s1, "q", ["foo"]) def test_ttl_consistent(self): """Ensure we don't get inconsistent errors with message that have TTL very close together""" messages = [ Message(str(i), ttl=i/1000.0) for i in xrange(0,1000)] messages.append(Message("x")) cluster = self.cluster(2) sender = cluster[0].connect().session().sender("q;{create:always}") def fetch(b): receiver = b.connect().session().receiver("q;{create:always}") while receiver.fetch().content != "x": pass for m in messages: sender.send(m, sync=False) for m in messages: sender.send(m, sync=False) fetch(cluster[0]) fetch(cluster[1]) for m in messages: sender.send(m, sync=False) cluster.start() fetch(cluster[2]) # Some utility code for transaction tests XA_RBROLLBACK = 1 XA_RBTIMEOUT = 2 XA_OK = 0 dtx_branch_counter = 0 class DtxStatusException(Exception): def __init__(self, expect, actual): self.expect = expect self.actual = actual def str(self): return "DtxStatusException(expect=%s, actual=%s)"%(self.expect, self.actual) class DtxTestFixture: """Bundle together some common requirements for dtx tests.""" def __init__(self, test, broker, name, exclusive=False): self.test = test self.broker = broker self.name = name # Use old API. DTX is not supported in messaging API. self.connection = broker.connect_old() self.session = self.connection.session(name, 1) # 1 second timeout self.queue = self.session.queue_declare(name, exclusive=exclusive) self.session.dtx_select() self.consumer = None def xid(self, id=None): if id is None: id = self.name return self.session.xid(format=0, global_id=id) def check_status(self, expect, actual): if expect != actual: raise DtxStatusException(expect, actual) def start(self, id=None, resume=False): self.check_status(XA_OK, self.session.dtx_start(xid=self.xid(id), resume=resume).status) def end(self, id=None, suspend=False): self.check_status(XA_OK, self.session.dtx_end(xid=self.xid(id), suspend=suspend).status) def prepare(self, id=None): self.check_status(XA_OK, self.session.dtx_prepare(xid=self.xid(id)).status) def commit(self, id=None, one_phase=True): self.check_status( XA_OK, self.session.dtx_commit(xid=self.xid(id), one_phase=one_phase).status) def rollback(self, id=None): self.check_status(XA_OK, self.session.dtx_rollback(xid=self.xid(id)).status) def set_timeout(self, timeout, id=None): self.session.dtx_set_timeout(xid=self.xid(id),timeout=timeout) def send(self, messages): for m in messages: dp=self.session.delivery_properties(routing_key=self.name) mp=self.session.message_properties() self.session.message_transfer(message=qpid.datatypes.Message(dp, mp, m)) def accept(self): """Accept 1 message from queue""" consumer_tag="%s-consumer"%(self.name) self.session.message_subscribe(queue=self.name, destination=consumer_tag) self.session.message_flow(unit = self.session.credit_unit.message, value = 1, destination = consumer_tag) self.session.message_flow(unit = self.session.credit_unit.byte, value = 0xFFFFFFFFL, destination = consumer_tag) msg = self.session.incoming(consumer_tag).get(timeout=1) self.session.message_cancel(destination=consumer_tag) self.session.message_accept(qpid.datatypes.RangedSet(msg.id)) return msg def verify(self, sessions, messages): for s in sessions: self.test.assert_browse(s, self.name, messages) class DtxTests(BrokerTest): def test_dtx_update(self): """Verify that DTX transaction state is updated to a new broker. Start a collection of transactions, then add a new cluster member, then verify they commit/rollback correctly on the new broker.""" # Note: multiple test have been bundled into one to avoid the need to start/stop # multiple brokers per test. cluster=self.cluster(1) sessions = [cluster[0].connect().session()] # For verify # Transaction that will be open when new member joins, then committed. t1 = DtxTestFixture(self, cluster[0], "t1") t1.start() t1.send(["1", "2"]) t1.verify(sessions, []) # Not visible outside of transaction # Transaction that will be open when new member joins, then rolled back. t2 = DtxTestFixture(self, cluster[0], "t2") t2.start() t2.send(["1", "2"]) # Transaction that will be prepared when new member joins, then committed. t3 = DtxTestFixture(self, cluster[0], "t3") t3.start() t3.send(["1", "2"]) t3.end() t3.prepare() t1.verify(sessions, []) # Not visible outside of transaction # Transaction that will be prepared when new member joins, then rolled back. t4 = DtxTestFixture(self, cluster[0], "t4") t4.start() t4.send(["1", "2"]) t4.end() t4.prepare() # Transaction using an exclusive queue t5 = DtxTestFixture(self, cluster[0], "t5", exclusive=True) t5.start() t5.send(["1", "2"]) # Accept messages in a transaction before/after join then commit # Note: Message sent outside transaction, we're testing transactional acceptance. t6 = DtxTestFixture(self, cluster[0], "t6") t6.send(["a","b","c"]) t6.start() self.assertEqual(t6.accept().body, "a"); t6.verify(sessions, ["b", "c"]) # Accept messages in a transaction before/after join then roll back # Note: Message sent outside transaction, we're testing transactional acceptance. t7 = DtxTestFixture(self, cluster[0], "t7") t7.send(["a","b","c"]) t7.start() self.assertEqual(t7.accept().body, "a"); t7.verify(sessions, ["b", "c"]) # Ended, suspended transactions across join. t8 = DtxTestFixture(self, cluster[0], "t8") t8.start(id="1") t8.send(["x"]) t8.end(id="1", suspend=True) t8.start(id="2") t8.send(["y"]) t8.end(id="2") t8.start() t8.send("z") # Start new cluster member cluster.start() sessions.append(cluster[1].connect().session()) # Commit t1 t1.send(["3","4"]) t1.verify(sessions, []) t1.end() t1.commit(one_phase=True) t1.verify(sessions, ["1","2","3","4"]) # Rollback t2 t2.send(["3","4"]) t2.end() t2.rollback() t2.verify(sessions, []) # Commit t3 t3.commit(one_phase=False) t3.verify(sessions, ["1","2"]) # Rollback t4 t4.rollback() t4.verify(sessions, []) # Commit t5 t5.send(["3","4"]) t5.verify(sessions, []) t5.end() t5.commit(one_phase=True) t5.verify(sessions, ["1","2","3","4"]) # Commit t6 self.assertEqual(t6.accept().body, "b"); t6.verify(sessions, ["c"]) t6.end() t6.commit(one_phase=True) t6.session.close() # Make sure they're not requeued by the session. t6.verify(sessions, ["c"]) # Rollback t7 self.assertEqual(t7.accept().body, "b"); t7.verify(sessions, ["c"]) t7.end() t7.rollback() t7.verify(sessions, ["a", "b", "c"]) # Resume t8 t8.end() t8.commit(one_phase=True) t8.start("1", resume=True) t8.end("1") t8.commit("1", one_phase=True) t8.commit("2", one_phase=True) t8.verify(sessions, ["z", "x","y"]) def test_dtx_failover_rollback(self): """Kill a broker during a transaction, verify we roll back correctly""" cluster=self.cluster(1, expect=EXPECT_EXIT_FAIL) cluster.start(expect=EXPECT_RUNNING) # Test unprepared at crash t1 = DtxTestFixture(self, cluster[0], "t1") t1.send(["a"]) # Not in transaction t1.start() t1.send(["b"]) # In transaction # Test prepared at crash t2 = DtxTestFixture(self, cluster[0], "t2") t2.send(["a"]) # Not in transaction t2.start() t2.send(["b"]) # In transaction t2.end() t2.prepare() # Crash the broker cluster[0].kill() # Transactional changes should not appear s = cluster[1].connect().session(); self.assert_browse(s, "t1", ["a"]) self.assert_browse(s, "t2", ["a"]) def test_dtx_timeout(self): """Verify that dtx timeout works""" cluster = self.cluster(1) t1 = DtxTestFixture(self, cluster[0], "t1") t1.start() t1.set_timeout(1) time.sleep(1.1) try: t1.end() self.fail("Expected rollback timeout.") except DtxStatusException, e: self.assertEqual(e.actual, XA_RBTIMEOUT) class TxTests(BrokerTest): def test_tx_update(self): """Verify that transaction state is updated to a new broker""" def make_message(session, body=None, key=None, id=None): dp=session.delivery_properties(routing_key=key) mp=session.message_properties(correlation_id=id) return qpid.datatypes.Message(dp, mp, body) cluster=self.cluster(1) # Use old API. TX is not supported in messaging API. c = cluster[0].connect_old() s = c.session("tx-session", 1) s.queue_declare(queue="q") # Start transaction s.tx_select() s.message_transfer(message=make_message(s, "1", "q")) # Start new member mid-transaction cluster.start() # Do more work s.message_transfer(message=make_message(s, "2", "q")) # Commit the transaction and verify the results. s.tx_commit() for b in cluster: self.assert_browse(b.connect().session(), "q", ["1","2"]) class LongTests(BrokerTest): """Tests that can run for a long time if -DDURATION= is set""" def duration(self): d = self.config.defines.get("DURATION") if d: return float(d)*60 else: return 3 # Default is to be quick def test_failover(self): """Test fail-over during continuous send-receive with errors""" # Original cluster will all be killed so expect exit with failure cluster = self.cluster(3, expect=EXPECT_EXIT_FAIL) for b in cluster: b.ready() # Wait for brokers to be ready for b in cluster: ErrorGenerator(b) # Start sender and receiver threads cluster[0].declare_queue("test-queue") sender = NumberedSender(cluster[0], max_depth=1000) receiver = NumberedReceiver(cluster[0], sender=sender) receiver.start() sender.start() # Wait for sender & receiver to get up and running retry(lambda: receiver.received > 0) # Kill original brokers, start new ones for the duration. endtime = time.time() + self.duration() i = 0 while time.time() < endtime: sender.sender.assert_running() receiver.receiver.assert_running() cluster[i].kill() i += 1 b = cluster.start(expect=EXPECT_EXIT_FAIL) for b in cluster[i:]: b.ready() ErrorGenerator(b) time.sleep(5) sender.stop() receiver.stop() for i in range(i, len(cluster)): cluster[i].kill() def test_management(self, args=[]): """ Stress test: Run management clients and other clients concurrently while killing and restarting brokers. """ class ClientLoop(StoppableThread): """Run a client executable in a loop.""" def __init__(self, broker, cmd): StoppableThread.__init__(self) self.broker=broker self.cmd = cmd # Client command. self.lock = Lock() self.process = None # Client process. self.start() def run(self): try: while True: self.lock.acquire() try: if self.stopped: break self.process = self.broker.test.popen( self.cmd, expect=EXPECT_UNKNOWN) finally: self.lock.release() try: exit = self.process.wait() except OSError, e: # Process may already have been killed by self.stop() break except Exception, e: self.process.unexpected( "client of %s: %s"%(self.broker.name, e)) self.lock.acquire() try: if self.stopped: break if exit != 0: self.process.unexpected( "client of %s exit code %s"%(self.broker.name, exit)) finally: self.lock.release() except Exception, e: self.error = RethrownException("Error in ClientLoop.run") def stop(self): """Stop the running client and wait for it to exit""" self.lock.acquire() try: if self.stopped: return self.stopped = True if self.process: try: self.process.kill() # Kill the client. except OSError: pass # The client might not be running. finally: self.lock.release() StoppableThread.stop(self) # body of test_management() args += ["--mgmt-pub-interval", 1] args += ["--log-enable=trace+:management"] # Use store if present. if BrokerTest.store_lib: args +=["--load-module", BrokerTest.store_lib] cluster = self.cluster(3, args, expect=EXPECT_EXIT_FAIL) # brokers will be killed clients = [] # Per-broker list of clients that only connect to one broker. mclients = [] # Management clients that connect to every broker in the cluster. def start_clients(broker): """Start ordinary clients for a broker.""" cmds=[ ["qpid-tool", "localhost:%s"%(broker.port())], ["qpid-perftest", "--count=5000", "--durable=yes", "--base-name", str(qpid.datatypes.uuid4()), "--port", broker.port()], ["qpid-txtest", "--queue-base-name", "tx-%s"%str(qpid.datatypes.uuid4()), "--port", broker.port()], ["qpid-queue-stats", "-a", "localhost:%s" %(broker.port())] ] clients.append([ClientLoop(broker, cmd) for cmd in cmds]) def start_mclients(broker): """Start management clients that make multiple connections.""" cmd = ["qpid-cluster", "-C", "localhost:%s" %(broker.port())] mclients.append(ClientLoop(broker, cmd)) endtime = time.time() + self.duration() # For long duration, first run is a quarter of the duration. runtime = min(5.0, self.duration() / 3.0) alive = 0 # First live cluster member for i in range(len(cluster)): start_clients(cluster[i]) start_mclients(cluster[alive]) while time.time() < endtime: time.sleep(runtime) runtime = 5 # Remaining runs 5 seconds, frequent broker kills for b in cluster[alive:]: b.ready() # Check if a broker crashed. # Kill the first broker, expect the clients to fail. b = cluster[alive] b.ready() b.kill() # Stop the brokers clients and all the mclients. for c in clients[alive] + mclients: try: c.stop() except: pass # Ignore expected errors due to broker shutdown. clients[alive] = [] mclients = [] # Start another broker and clients alive += 1 cluster.start(expect=EXPECT_EXIT_FAIL) cluster[-1].ready() # Wait till its ready start_clients(cluster[-1]) start_mclients(cluster[alive]) for c in chain(mclients, *clients): c.stop() for b in cluster[alive:]: b.ready() # Verify still alive b.kill() # Verify that logs are consistent cluster_test_logs.verify_logs() def test_management_qmf2(self): self.test_management(args=["--mgmt-qmf2=yes"]) def test_connect_consistent(self): args=["--mgmt-pub-interval=1","--log-enable=trace+:management"] cluster = self.cluster(2, args=args) end = time.time() + self.duration() while (time.time() < end): # Get a management interval for i in xrange(1000): cluster[0].connect().close() cluster_test_logs.verify_logs() def test_flowlimit_failover(self): """Test fail-over during continuous send-receive with flow control active. """ # Original cluster will all be killed so expect exit with failure cluster = self.cluster(3, expect=EXPECT_EXIT_FAIL) for b in cluster: b.ready() # Wait for brokers to be ready # create a queue with rather draconian flow control settings ssn0 = cluster[0].connect().session() s0 = ssn0.sender("test-queue; {create:always, node:{type:queue, x-declare:{arguments:{'qpid.flow_stop_count':2000, 'qpid.flow_resume_count':100}}}}") receiver = NumberedReceiver(cluster[0]) receiver.start() sender = NumberedSender(cluster[0]) sender.start() # Wait for senders & receiver to get up and running retry(lambda: receiver.received > 10) # Kill original brokers, start new ones for the duration. endtime = time.time() + self.duration(); i = 0 while time.time() < endtime: sender.sender.assert_running() receiver.receiver.assert_running() for b in cluster[i:]: b.ready() # Check if any broker crashed. cluster[i].kill() i += 1 b = cluster.start(expect=EXPECT_EXIT_FAIL) time.sleep(5) sender.stop() receiver.stop() for i in range(i, len(cluster)): cluster[i].kill() def test_ttl_failover(self): """Test that messages with TTL don't cause problems in a cluster with failover""" class Client(StoppableThread): def __init__(self, broker): StoppableThread.__init__(self) self.connection = broker.connect(reconnect=True) self.auto_fetch_reconnect_urls(self.connection) self.session = self.connection.session() def auto_fetch_reconnect_urls(self, conn): """Replacment for qpid.messaging.util version which is noisy""" ssn = conn.session("auto-fetch-reconnect-urls") rcv = ssn.receiver("amq.failover") rcv.capacity = 10 def main(): while True: try: msg = rcv.fetch() qpid.messaging.util.set_reconnect_urls(conn, msg) ssn.acknowledge(msg, sync=False) except messaging.exceptions.LinkClosed: return except messaging.exceptions.ConnectionError: return thread = Thread(name="auto-fetch-reconnect-urls", target=main) thread.setDaemon(True) thread.start() def stop(self): StoppableThread.stop(self) self.connection.detach() class Sender(Client): def __init__(self, broker, address): Client.__init__(self, broker) self.sent = 0 # Number of messages _reliably_ sent. self.sender = self.session.sender(address, capacity=1000) def send_counted(self, ttl): self.sender.send(Message(str(self.sent), ttl=ttl)) self.sent += 1 def run(self): while not self.stopped: choice = random.randint(0,4) if choice == 0: self.send_counted(None) # No ttl elif choice == 1: self.send_counted(100000) # Large ttl else: # Small ttl, might expire self.sender.send(Message("", ttl=random.random()/10)) self.sender.send(Message("z"), sync=True) # Chaser. class Receiver(Client): def __init__(self, broker, address): Client.__init__(self, broker) self.received = 0 # Number of non-empty (reliable) messages received. self.receiver = self.session.receiver(address, capacity=1000) def run(self): try: while True: m = self.receiver.fetch(1) if m.content == "z": break if m.content: # Ignore unreliable messages # Ignore duplicates if int(m.content) == self.received: self.received += 1 except Exception,e: self.error = e # def test_ttl_failover # Original cluster will all be killed so expect exit with failure # Set small purge interval. cluster = self.cluster(3, expect=EXPECT_EXIT_FAIL, args=["--queue-purge-interval=1"]) for b in cluster: b.ready() # Wait for brokers to be ready # Python client failover produces noisy WARN logs, disable temporarily logger = logging.getLogger() log_level = logger.getEffectiveLevel() logger.setLevel(logging.ERROR) sender = None receiver = None try: # Start sender and receiver threads receiver = Receiver(cluster[0], "q;{create:always}") receiver.start() sender = Sender(cluster[0], "q;{create:always}") sender.start() # Wait for sender & receiver to get up and running retry(lambda: receiver.received > 0) # Kill brokers in a cycle. endtime = time.time() + self.duration() runtime = min(5.0, self.duration() / 4.0) i = 0 while time.time() < endtime: for b in cluster[i:]: b.ready() # Check if any broker crashed. cluster[i].kill() i += 1 b = cluster.start(expect=EXPECT_EXIT_FAIL) b.ready() time.sleep(runtime) sender.stop() receiver.stop() for b in cluster[i:]: b.ready() # Check it didn't crash b.kill() self.assertEqual(sender.sent, receiver.received) cluster_test_logs.verify_logs() finally: # Detach to avoid slow reconnect attempts during shut-down if test fails. if sender: sender.connection.detach() if receiver: receiver.connection.detach() logger.setLevel(log_level) def test_msg_group_failover(self): """Test fail-over during continuous send-receive of grouped messages. """ class GroupedTrafficGenerator(Thread): def __init__(self, url, queue, group_key): Thread.__init__(self) self.url = url self.queue = queue self.group_key = group_key self.status = -1 def run(self): # generate traffic for approx 10 seconds (2011msgs / 200 per-sec) cmd = ["msg_group_test", "--broker=%s" % self.url, "--address=%s" % self.queue, "--connection-options={%s}" % (Cluster.CONNECTION_OPTIONS), "--group-key=%s" % self.group_key, "--receivers=2", "--senders=3", "--messages=2011", "--send-rate=200", "--capacity=11", "--ack-frequency=23", "--allow-duplicates", "--group-size=37", "--randomize-group-size", "--interleave=13"] # "--trace"] self.generator = Popen( cmd ); self.status = self.generator.wait() return self.status def results(self): self.join(timeout=30) # 3x assumed duration if self.isAlive(): return -1 return self.status # Original cluster will all be killed so expect exit with failure cluster = self.cluster(3, expect=EXPECT_EXIT_FAIL, args=["-t"]) for b in cluster: b.ready() # Wait for brokers to be ready # create a queue with rather draconian flow control settings ssn0 = cluster[0].connect().session() q_args = "{'qpid.group_header_key':'group-id', 'qpid.shared_msg_group':1}" s0 = ssn0.sender("test-group-q; {create:always, node:{type:queue, x-declare:{arguments:%s}}}" % q_args) # Kill original brokers, start new ones for the duration. endtime = time.time() + self.duration(); i = 0 while time.time() < endtime: traffic = GroupedTrafficGenerator( cluster[i].host_port(), "test-group-q", "group-id" ) traffic.start() time.sleep(1) for x in range(2): for b in cluster[i:]: b.ready() # Check if any broker crashed. cluster[i].kill() i += 1 b = cluster.start(expect=EXPECT_EXIT_FAIL) time.sleep(1) # wait for traffic to finish, verify success self.assertEqual(0, traffic.results()) for i in range(i, len(cluster)): cluster[i].kill() class StoreTests(BrokerTest): """ Cluster tests that can only be run if there is a store available. """ def args(self): assert BrokerTest.store_lib return ["--load-module", BrokerTest.store_lib] def test_store_loaded(self): """Ensure we are indeed loading a working store""" broker = self.broker(self.args(), name="recoverme", expect=EXPECT_EXIT_FAIL) m = Message("x", durable=True) broker.send_message("q", m) broker.kill() broker = self.broker(self.args(), name="recoverme") self.assertEqual("x", broker.get_message("q").content) def test_kill_restart(self): """Verify we can kill/resetart a broker with store in a cluster""" cluster = self.cluster(1, self.args()) cluster.start("restartme", expect=EXPECT_EXIT_FAIL).kill() # Send a message, retrieve from the restarted broker cluster[0].send_message("q", "x") m = cluster.start("restartme").get_message("q") self.assertEqual("x", m.content) def stop_cluster(self,broker): """Clean shut-down of a cluster""" self.assertEqual(0, qpid_cluster.main( ["-kf", broker.host_port()])) def test_persistent_restart(self): """Verify persistent cluster shutdown/restart scenarios""" cluster = self.cluster(0, args=self.args() + ["--cluster-size=3"]) a = cluster.start("a", expect=EXPECT_EXIT_OK, wait=False) b = cluster.start("b", expect=EXPECT_EXIT_OK, wait=False) c = cluster.start("c", expect=EXPECT_EXIT_FAIL, wait=True) a.send_message("q", Message("1", durable=True)) # Kill & restart one member. c.kill() self.assertEqual(a.get_message("q").content, "1") a.send_message("q", Message("2", durable=True)) c = cluster.start("c", expect=EXPECT_EXIT_OK) self.assertEqual(c.get_message("q").content, "2") # Shut down the entire cluster cleanly and bring it back up a.send_message("q", Message("3", durable=True)) self.stop_cluster(a) a = cluster.start("a", wait=False) b = cluster.start("b", wait=False) c = cluster.start("c", wait=True) self.assertEqual(a.get_message("q").content, "3") def test_persistent_partial_failure(self): # Kill 2 members, shut down the last cleanly then restart # Ensure we use the clean database cluster = self.cluster(0, args=self.args() + ["--cluster-size=3"]) a = cluster.start("a", expect=EXPECT_EXIT_FAIL, wait=False) b = cluster.start("b", expect=EXPECT_EXIT_FAIL, wait=False) c = cluster.start("c", expect=EXPECT_EXIT_OK, wait=True) a.send_message("q", Message("4", durable=True)) a.kill() b.kill() self.assertEqual(c.get_message("q").content, "4") c.send_message("q", Message("clean", durable=True)) self.stop_cluster(c) a = cluster.start("a", wait=False) b = cluster.start("b", wait=False) c = cluster.start("c", wait=True) self.assertEqual(a.get_message("q").content, "clean") def test_wrong_cluster_id(self): # Start a cluster1 broker, then try to restart in cluster2 cluster1 = self.cluster(0, args=self.args()) a = cluster1.start("a", expect=EXPECT_EXIT_OK) a.terminate() cluster2 = self.cluster(1, args=self.args()) try: a = cluster2.start("a", expect=EXPECT_EXIT_FAIL) a.ready() self.fail("Expected exception") except: pass def test_wrong_shutdown_id(self): # Start 2 members and shut down. cluster = self.cluster(0, args=self.args()+["--cluster-size=2"]) a = cluster.start("a", expect=EXPECT_EXIT_OK, wait=False) b = cluster.start("b", expect=EXPECT_EXIT_OK, wait=False) self.stop_cluster(a) self.assertEqual(a.wait(), 0) self.assertEqual(b.wait(), 0) # Restart with a different member and shut down. a = cluster.start("a", expect=EXPECT_EXIT_OK, wait=False) c = cluster.start("c", expect=EXPECT_EXIT_OK, wait=False) self.stop_cluster(a) self.assertEqual(a.wait(), 0) self.assertEqual(c.wait(), 0) # Mix members from both shutdown events, they should fail # TODO aconway 2010-03-11: can't predict the exit status of these # as it depends on the order of delivery of initial-status messages. # See comment at top of this file. a = cluster.start("a", expect=EXPECT_UNKNOWN, wait=False) b = cluster.start("b", expect=EXPECT_UNKNOWN, wait=False) self.assertRaises(Exception, lambda: a.ready()) self.assertRaises(Exception, lambda: b.ready()) def test_solo_store_clean(self): # A single node cluster should always leave a clean store. cluster = self.cluster(0, self.args()) a = cluster.start("a", expect=EXPECT_EXIT_FAIL) a.send_message("q", Message("x", durable=True)) a.kill() a = cluster.start("a") self.assertEqual(a.get_message("q").content, "x") def test_last_store_clean(self): # Verify that only the last node in a cluster to shut down has # a clean store. Start with cluster of 3, reduce to 1 then # increase again to ensure that a node that was once alone but # finally did not finish as the last node does not get a clean # store. cluster = self.cluster(0, self.args()) a = cluster.start("a", expect=EXPECT_EXIT_FAIL) self.assertEqual(a.store_state(), "clean") b = cluster.start("b", expect=EXPECT_EXIT_FAIL) c = cluster.start("c", expect=EXPECT_EXIT_FAIL) self.assertEqual(b.store_state(), "dirty") self.assertEqual(c.store_state(), "dirty") retry(lambda: a.store_state() == "dirty") a.send_message("q", Message("x", durable=True)) a.kill() b.kill() # c is last man, will mark store clean retry(lambda: c.store_state() == "clean") a = cluster.start("a", expect=EXPECT_EXIT_FAIL) # c no longer last man retry(lambda: c.store_state() == "dirty") c.kill() # a is now last man retry(lambda: a.store_state() == "clean") a.kill() self.assertEqual(a.store_state(), "clean") self.assertEqual(b.store_state(), "dirty") self.assertEqual(c.store_state(), "dirty") def test_restart_clean(self): """Verify that we can re-start brokers one by one in a persistent cluster after a clean oshutdown""" cluster = self.cluster(0, self.args()) a = cluster.start("a", expect=EXPECT_EXIT_OK) b = cluster.start("b", expect=EXPECT_EXIT_OK) c = cluster.start("c", expect=EXPECT_EXIT_OK) a.send_message("q", Message("x", durable=True)) self.stop_cluster(a) a = cluster.start("a") b = cluster.start("b") c = cluster.start("c") self.assertEqual(c.get_message("q").content, "x") def test_join_sub_size(self): """Verify that after starting a cluster with cluster-size=N, we can join new members even if size < N-1""" cluster = self.cluster(0, self.args()+["--cluster-size=3"]) a = cluster.start("a", wait=False, expect=EXPECT_EXIT_FAIL) b = cluster.start("b", wait=False, expect=EXPECT_EXIT_FAIL) c = cluster.start("c") a.send_message("q", Message("x", durable=True)) a.send_message("q", Message("y", durable=True)) a.kill() b.kill() a = cluster.start("a") self.assertEqual(c.get_message("q").content, "x") b = cluster.start("b") self.assertEqual(c.get_message("q").content, "y") qpidc-0.16/src/tests/run_long_cluster_tests0000775000076400007640000000157511410135320021617 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # srcdir=`dirname $0` $srcdir/run_cluster_tests 'cluster_tests.LongTests.*' -DDURATION=4 qpidc-0.16/src/tests/qpid-ctrl0000775000076400007640000000774511527572315016737 0ustar00jrossjross00000000000000#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import optparse from qpid.messaging import * from qpid.util import URL from qpid.log import enable, DEBUG, WARN def nameval(st): idx = st.find("=") if idx >= 0: name = st[0:idx] value = st[idx+1:] else: name = st value = None return name, value def list_map_entries(m): r = "" for t in m: r += "%s=%s " % (t, m[t]) return r def get_qmfv2_result(m): if m.properties['x-amqp-0-10.app-id'] == 'qmf2': if m.properties['qmf.opcode'] == '_method_response': return m.content['_arguments'] elif m.properties['qmf.opcode'] == '_exception': raise Exception("Error: %s" % list_map_entries(m.content['_values'])) else: raise Exception("Invalid response received, unexpected opcode: %s" % m) else: raise Exception("Invalid response received, not a qmfv2 method: %s" % m) parser = optparse.OptionParser(usage="usage: %prog [options] COMMAND ...", description="Invoke the specified command.") parser.add_option("-b", "--broker", default="localhost", help="connect to specified BROKER (default %default)") parser.add_option("-c", "--class", dest="qmfclass", default="broker", help="class of object on which command is being invoked (default %default)") parser.add_option("-p", "--package", default="org.apache.qpid.broker", help="package of object on which command is being invoked (default %default)") parser.add_option("-i", "--id", default="amqp-broker", help="identifier of object on which command is being invoked (default %default)") parser.add_option("-a", "--address", default="qmf.default.direct/broker", help="address to send commands to (default %default)") parser.add_option("-t", "--timeout", type="float", default=5, help="timeout in seconds to wait for response before exiting (default %default)") parser.add_option("-v", dest="verbose", action="store_true", help="enable logging") opts, args = parser.parse_args() if opts.verbose: enable("qpid", DEBUG) else: enable("qpid", WARN) if args: command = args.pop(0) else: parser.error("command is required") conn = Connection(opts.broker) try: conn.open() ssn = conn.session() snd = ssn.sender(opts.address) reply_to = "qmf.default.direct/%s; {node: {type: topic}}" % str(uuid4()) rcv = ssn.receiver(reply_to) object_name = "%s:%s:%s" % (opts.package, opts.qmfclass, opts.id) method_name = command arguments = {} for a in args: name, val = nameval(a) if val[0] == '{' or val[0] == '[': arguments[name] = eval(val) else: arguments[name] = val content = { "_object_id": {"_object_name": object_name}, "_method_name": method_name, "_arguments": arguments } msg = Message(reply_to=reply_to, content=content) msg.properties["x-amqp-0-10.app-id"] = "qmf2" msg.properties["qmf.opcode"] = "_method_request" snd.send(msg) try: print list_map_entries(get_qmfv2_result(rcv.fetch(timeout=opts.timeout))) except Empty: print "No response received!" except Exception, e: print e except ReceiverError, e: print e except KeyboardInterrupt: pass conn.close() qpidc-0.16/src/tests/cluster.cmake0000664000076400007640000000627611374511176017571 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Cluster tests cmake fragment, to be included in CMakeLists.txt # add_executable (failover_soak failover_soak.cpp ForkedBroker.cpp ${platform_test_additions}) target_link_libraries (failover_soak qpidclient) remember_location(failover_soak) add_executable (cluster_authentication_soak cluster_authentication_soak.cpp ForkedBroker.cpp ${platform_test_additions}) target_link_libraries (cluster_authentication_soak qpidclient) remember_location(cluster_authentication_soak) set (cluster_test_SOURCES cluster_test unit_test ClusterFixture ForkedBroker PartialFailure ClusterFailover InitialStatusMap StoreStatus ) add_executable (cluster_test ${cluster_test_SOURCES} ${platform_test_additions}) target_link_libraries (cluster_test ${qpid_test_boost_libs} qpidclient qpidbroker cluster_shared) remember_location(cluster_test) add_test (cluster_test ${CMAKE_CURRENT_SOURCE_DIR}/run_cluster_test${test_script_suffix}) add_test (cluster_tests ${CMAKE_CURRENT_SOURCE_DIR}/run_cluster_tests${test_script_suffix}) add_test (cluster_read_credit ${CMAKE_CURRENT_SOURCE_DIR}/cluster_read_credit${test_script_suffix}) add_test (cluster_test_watchdog ${CMAKE_CURRENT_SOURCE_DIR}/test_watchdog${test_script_suffix}) add_test (federated_cluster_test ${CMAKE_CURRENT_SOURCE_DIR}/federated_cluster_test${test_script_suffix}) add_test (clustered_replication_test ${CMAKE_CURRENT_SOURCE_DIR}/clustered_replication_test${test_script_suffix}) # FIXME aconway 2009-12-01: translate to cmake # # Clean up after cluster_test and start_cluster # CLEANFILES += cluster_test.acl cluster.ports # EXTRA_DIST += \ # ais_check \ # run_cluster_test \ # cluster_read_credit \ # test_watchdog \ # start_cluster \ # stop_cluster \ # restart_cluster \ # cluster_python_tests \ # cluster_python_tests_failing.txt \ # federated_cluster_test \ # clustered_replication_test \ # run_cluster_tests \ # run_long_cluster_tests \ # testlib.py \ # cluster_tests.py \ # long_cluster_tests.py \ # cluster_tests.fail # LONG_TESTS += \ # run_long_cluster_tests \ # start_cluster \ # cluster_python_tests \ # stop_cluster # qpidtest_PROGRAMS += cluster_test # cluster_test_SOURCES = \ # cluster_test_LDADD=$(lib_client) $(lib_broker) ../cluster.la -lboost_unit_test_framework # qpidtest_SCRIPTS += run_cluster_tests cluster_tests.py run_long_cluster_tests long_cluster_tests.py testlib.py cluster_tests.fail # endif qpidc-0.16/src/tests/testagent.cpp0000664000076400007640000001277311361331671017603 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include "qmf/org/apache/qpid/agent/example/Parent.h" #include "qmf/org/apache/qpid/agent/example/Child.h" #include "qmf/org/apache/qpid/agent/example/ArgsParentCreate_child.h" #include "qmf/org/apache/qpid/agent/example/EventChildCreated.h" #include "qmf/org/apache/qpid/agent/example/Package.h" #include #include #include #include static bool running = true; using namespace std; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; using qpid::management::Args; using qpid::sys::Mutex; namespace _qmf = qmf::org::apache::qpid::agent::example; class ChildClass; //============================================================== // CoreClass is the operational class that corresponds to the // "Parent" class in the management schema. //============================================================== class CoreClass : public Manageable { string name; ManagementAgent* agent; _qmf::Parent* mgmtObject; std::vector children; Mutex vectorLock; public: CoreClass(ManagementAgent* agent, string _name); ~CoreClass() { mgmtObject->resourceDestroy(); } ManagementObject* GetManagementObject(void) const { return mgmtObject; } void doLoop(); status_t ManagementMethod (uint32_t methodId, Args& args, string& text); }; class ChildClass : public Manageable { string name; _qmf::Child* mgmtObject; public: ChildClass(ManagementAgent* agent, CoreClass* parent, string name); ~ChildClass() { mgmtObject->resourceDestroy(); } ManagementObject* GetManagementObject(void) const { return mgmtObject; } void doWork() { mgmtObject->inc_count(2); } }; CoreClass::CoreClass(ManagementAgent* _agent, string _name) : name(_name), agent(_agent) { static uint64_t persistId = 0x111222333444555LL; mgmtObject = new _qmf::Parent(agent, this, name); agent->addObject(mgmtObject, persistId++); mgmtObject->set_state("IDLE"); } void CoreClass::doLoop() { // Periodically bump a counter to provide a changing statistical value while (running) { qpid::sys::sleep(1); mgmtObject->inc_count(); mgmtObject->set_state("IN_LOOP"); { Mutex::ScopedLock _lock(vectorLock); for (std::vector::iterator iter = children.begin(); iter != children.end(); iter++) { (*iter)->doWork(); } } } } Manageable::status_t CoreClass::ManagementMethod(uint32_t methodId, Args& args, string& /*text*/) { Mutex::ScopedLock _lock(vectorLock); switch (methodId) { case _qmf::Parent::METHOD_CREATE_CHILD: _qmf::ArgsParentCreate_child& ioArgs = (_qmf::ArgsParentCreate_child&) args; ChildClass *child = new ChildClass(agent, this, ioArgs.i_name); ioArgs.o_childRef = child->GetManagementObject()->getObjectId(); children.push_back(child); agent->raiseEvent(_qmf::EventChildCreated(ioArgs.i_name)); return STATUS_OK; } return STATUS_NOT_IMPLEMENTED; } ChildClass::ChildClass(ManagementAgent* agent, CoreClass* parent, string name) { mgmtObject = new _qmf::Child(agent, this, parent, name); agent->addObject(mgmtObject); } //============================================================== // Main program //============================================================== ManagementAgent::Singleton* singleton; void shutdown(int) { running = false; } int main_int(int argc, char** argv) { singleton = new ManagementAgent::Singleton(); const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; signal(SIGINT, shutdown); // Create the qmf management agent ManagementAgent* agent = singleton->getInstance(); // Register the Qmf_example schema with the agent _qmf::Package packageInit(agent); // Start the agent. It will attempt to make a connection to the // management broker agent->init(host, port, 5, false, ".magentdata"); // Allocate some core objects CoreClass core1(agent, "Example Core Object #1"); CoreClass core2(agent, "Example Core Object #2"); CoreClass core3(agent, "Example Core Object #3"); core1.doLoop(); // done, cleanup and exit delete singleton; return 0; } int main(int argc, char** argv) { try { return main_int(argc, argv); } catch(std::exception& e) { cerr << "Top Level Exception: " << e.what() << endl; return 1; } } qpidc-0.16/src/tests/MessagingThreadTests.cpp0000664000076400007640000001110311414663636021667 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "MessagingFixture.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Thread.h" #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(MessagingThreadTests) using namespace messaging; using namespace boost::assign; using namespace std; struct ReceiveThread : public sys::Runnable { Receiver receiver; vector received; string error; ReceiveThread(Receiver s) : receiver(s) {} void run() { try { while(true) { Message m = receiver.fetch(Duration::SECOND*5); if (m.getContent() == "END") break; received.push_back(m.getContent()); } } catch (const NoMessageAvailable& e) { // Indicates that fetch timed out OR receiver was closed by other thread. if (!receiver.isClosed()) // timeout error = e.what(); } catch (const std::exception& e) { error = e.what(); } } }; struct NextReceiverThread : public sys::Runnable { Session session; vector received; string error; NextReceiverThread(Session s) : session(s) {} void run() { try { while(true) { Message m = session.nextReceiver(Duration::SECOND*5).fetch(); if (m.getContent() == "END") break; received.push_back(m.getContent()); } } catch (const std::exception& e) { error = e.what(); } } }; QPID_AUTO_TEST_CASE(testConcurrentSendReceive) { MessagingFixture fix; Sender s = fix.session.createSender("concurrent;{create:always}"); Receiver r = fix.session.createReceiver("concurrent;{create:always,link:{reliability:unreliable}}"); ReceiveThread rt(r); sys::Thread thread(rt); const size_t COUNT=100; for (size_t i = 0; i < COUNT; ++i) { s.send(Message()); } s.send(Message("END")); thread.join(); BOOST_CHECK_EQUAL(rt.error, string()); BOOST_CHECK_EQUAL(COUNT, rt.received.size()); } QPID_AUTO_TEST_CASE(testCloseBusyReceiver) { MessagingFixture fix; Receiver r = fix.session.createReceiver("closeReceiver;{create:always}"); ReceiveThread rt(r); sys::Thread thread(rt); sys::usleep(1000); // Give the receive thread time to block. r.close(); thread.join(); BOOST_CHECK_EQUAL(rt.error, string()); // Fetching on closed receiver should fail. Message m; BOOST_CHECK(!r.fetch(m, Duration(0))); BOOST_CHECK_THROW(r.fetch(Duration(0)), NoMessageAvailable); } QPID_AUTO_TEST_CASE(testCloseSessionBusyReceiver) { MessagingFixture fix; Receiver r = fix.session.createReceiver("closeSession;{create:always}"); ReceiveThread rt(r); sys::Thread thread(rt); sys::usleep(1000); // Give the receive thread time to block. fix.session.close(); thread.join(); BOOST_CHECK_EQUAL(rt.error, string()); // Fetching on closed receiver should fail. Message m; BOOST_CHECK(!r.fetch(m, Duration(0))); BOOST_CHECK_THROW(r.fetch(Duration(0)), NoMessageAvailable); } QPID_AUTO_TEST_CASE(testConcurrentSendNextReceiver) { MessagingFixture fix; Receiver r = fix.session.createReceiver("concurrent;{create:always,link:{reliability:unreliable}}"); const size_t COUNT=100; r.setCapacity(COUNT); NextReceiverThread rt(fix.session); sys::Thread thread(rt); sys::usleep(1000); // Give the receive thread time to block. Sender s = fix.session.createSender("concurrent;{create:always}"); for (size_t i = 0; i < COUNT; ++i) { s.send(Message()); } s.send(Message("END")); thread.join(); BOOST_CHECK_EQUAL(rt.error, string()); BOOST_CHECK_EQUAL(COUNT, rt.received.size()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/brokermgmt.mk0000664000076400007640000000315611475742012017577 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Build a unit test for the broker's internal management agent. BROKERMGMT_GEN_SRC= \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.cpp \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/Package.h \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.h \ brokermgmt_gen/qmf/org/apache/qpid/broker/mgmt/test/TestObject.cpp $(BROKERMGMT_GEN_SRC): brokermgmt_gen.timestamp if GENERATE BROKERMGMT_DEPS=../mgen.timestamp endif # GENERATE brokermgmt_gen.timestamp: BrokerMgmtAgent.xml ${BROKERMGMT_DEPS} $(QMF_GEN) -b -o brokermgmt_gen/qmf $(srcdir)/BrokerMgmtAgent.xml touch $@ BrokerMgmtAgent.$(OBJEXT): $(BROKERMGMT_GEN_SRC) CLEANFILES+=$(BROKERMGMT_GEN_SRC) brokermgmt_gen.timestamp unit_test_SOURCES+=BrokerMgmtAgent.cpp ${BROKERMGMT_GEN_SRC} INCLUDES+= -Ibrokermgmt_gen EXTRA_DIST+=BrokerMgmtAgent.xml qpidc-0.16/src/tests/qpid-txtest.cpp0000664000076400007640000002646111376517702020101 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include "TestOptions.h" #include "qpid/client/Connection.h" #include "qpid/client/Message.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/framing/Array.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/Uuid.h" #include "qpid/sys/Thread.h" using namespace qpid; using namespace qpid::client; using namespace qpid::sys; using std::string; namespace qpid { namespace tests { typedef std::vector StringSet; struct Args : public qpid::TestOptions { bool init, transfer, check;//actions uint size; bool durable; uint queues; string base; uint msgsPerTx; uint txCount; uint totalMsgCount; bool dtx; bool quiet; Args() : init(true), transfer(true), check(true), size(256), durable(true), queues(2), base("tx-test"), msgsPerTx(1), txCount(1), totalMsgCount(10), dtx(false), quiet(false) { addOptions() ("init", optValue(init, "yes|no"), "Declare queues and populate one with the initial set of messages.") ("transfer", optValue(transfer, "yes|no"), "'Move' messages from one queue to another using transactions to ensure no message loss.") ("check", optValue(check, "yes|no"), "Check that the initial messages are all still available.") ("size", optValue(size, "N"), "message size") ("durable", optValue(durable, "yes|no"), "use durable messages") ("queues", optValue(queues, "N"), "number of queues") ("queue-base-name", optValue(base, ""), "base name for queues") ("messages-per-tx", optValue(msgsPerTx, "N"), "number of messages transferred per transaction") ("tx-count", optValue(txCount, "N"), "number of transactions per 'agent'") ("total-messages", optValue(totalMsgCount, "N"), "total number of messages in 'circulation'") ("dtx", optValue(dtx, "yes|no"), "use distributed transactions") ("quiet", optValue(quiet), "reduce output from test"); } }; const std::string chars("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"); std::string generateData(uint size) { if (size < chars.length()) { return chars.substr(0, size); } std::string data; for (uint i = 0; i < (size / chars.length()); i++) { data += chars; } data += chars.substr(0, size % chars.length()); return data; } void generateSet(const std::string& base, uint count, StringSet& collection) { for (uint i = 0; i < count; i++) { std::ostringstream out; out << base << "-" << (i+1); collection.push_back(out.str()); } } Args opts; struct Client { Connection connection; AsyncSession session; Client() { opts.open(connection); session = connection.newSession(); } ~Client() { try{ session.close(); connection.close(); } catch(const std::exception& e) { std::cout << e.what() << std::endl; } } }; struct Transfer : public Client, public Runnable { std::string src; std::string dest; Thread thread; framing::Xid xid; Transfer(const std::string& to, const std::string& from) : src(to), dest(from), xid(0x4c414e47, "", from) {} void run() { try { if (opts.dtx) session.dtxSelect(); else session.txSelect(); SubscriptionManager subs(session); LocalQueue lq; SubscriptionSettings settings(FlowControl::messageWindow(opts.msgsPerTx)); settings.autoAck = 0; // Disabled Subscription sub = subs.subscribe(lq, src, settings); for (uint t = 0; t < opts.txCount; t++) { Message in; Message out("", dest); if (opts.dtx) { setNewXid(xid); session.dtxStart(arg::xid=xid); } for (uint m = 0; m < opts.msgsPerTx; m++) { in = lq.pop(); std::string& data = in.getData(); if (data.size() != opts.size) { std::ostringstream oss; oss << "Message size incorrect: size=" << in.getData().size() << "; expected " << opts.size; throw std::runtime_error(oss.str()); } out.setData(data); out.getMessageProperties().setCorrelationId(in.getMessageProperties().getCorrelationId()); out.getDeliveryProperties().setDeliveryMode(in.getDeliveryProperties().getDeliveryMode()); session.messageTransfer(arg::content=out, arg::acceptMode=1); } sub.accept(sub.getUnaccepted()); if (opts.dtx) { session.dtxEnd(arg::xid=xid); session.dtxPrepare(arg::xid=xid); session.dtxCommit(arg::xid=xid); } else { session.txCommit(); } } } catch(const std::exception& e) { std::cout << "Transfer interrupted: " << e.what() << std::endl; } } void setNewXid(framing::Xid& xid) { framing::Uuid uuid(true); xid.setGlobalId(uuid.str()); } }; struct Controller : public Client { StringSet ids; StringSet queues; Controller() { generateSet(opts.base, opts.queues, queues); generateSet("msg", opts.totalMsgCount, ids); } void init() { //declare queues for (StringSet::iterator i = queues.begin(); i != queues.end(); i++) { session.queueDeclare(arg::queue=*i, arg::durable=opts.durable); session.sync(); } Message msg(generateData(opts.size), *queues.begin()); if (opts.durable) { msg.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); } //publish messages for (StringSet::iterator i = ids.begin(); i != ids.end(); i++) { msg.getMessageProperties().setCorrelationId(*i); session.messageTransfer(arg::content=msg, arg::acceptMode=1); } } void transfer() { boost::ptr_vector agents(opts.queues); //launch transfer agents for (StringSet::iterator i = queues.begin(); i != queues.end(); i++) { StringSet::iterator next = i + 1; if (next == queues.end()) next = queues.begin(); if (!opts.quiet) std::cout << "Transfering from " << *i << " to " << *next << std::endl; agents.push_back(new Transfer(*i, *next)); agents.back().thread = Thread(agents.back()); } for (boost::ptr_vector::iterator i = agents.begin(); i != agents.end(); i++) { i->thread.join(); } } int check() { SubscriptionManager subs(session); // Recover DTX transactions (if any) if (opts.dtx) { std::vector inDoubtXids; framing::DtxRecoverResult dtxRes = session.dtxRecover().get(); const framing::Array& xidArr = dtxRes.getInDoubt(); xidArr.collect(inDoubtXids); if (inDoubtXids.size()) { if (!opts.quiet) std::cout << "Recovering DTX in-doubt transaction(s):" << std::endl; framing::StructHelper decoder; framing::Xid xid; // abort even, commit odd transactions for (unsigned i = 0; i < inDoubtXids.size(); i++) { decoder.decode(xid, inDoubtXids[i]); if (!opts.quiet) std::cout << (i%2 ? " * aborting " : " * committing "); xid.print(std::cout); std::cout << std::endl; if (i%2) { session.dtxRollback(arg::xid=xid); } else { session.dtxCommit(arg::xid=xid); } } } } StringSet drained; //drain each queue and verify the correct set of messages are available for (StringSet::iterator i = queues.begin(); i != queues.end(); i++) { //subscribe, allocate credit and flushn LocalQueue lq; SubscriptionSettings settings(FlowControl::unlimited(), ACCEPT_MODE_NONE); subs.subscribe(lq, *i, settings); session.messageFlush(arg::destination=*i); session.sync(); uint count(0); while (!lq.empty()) { Message m = lq.pop(); //add correlation ids of received messages to drained drained.push_back(m.getMessageProperties().getCorrelationId()); ++count; } if (!opts.quiet) std::cout << "Drained " << count << " messages from " << *i << std::endl; } sort(ids.begin(), ids.end()); sort(drained.begin(), drained.end()); //check that drained == ids StringSet missing; set_difference(ids.begin(), ids.end(), drained.begin(), drained.end(), back_inserter(missing)); StringSet extra; set_difference(drained.begin(), drained.end(), ids.begin(), ids.end(), back_inserter(extra)); if (missing.empty() && extra.empty()) { std::cout << "All expected messages were retrieved." << std::endl; return 0; } else { if (!missing.empty()) { std::cout << "The following ids were missing:" << std::endl; for (StringSet::iterator i = missing.begin(); i != missing.end(); i++) { std::cout << " '" << *i << "'" << std::endl; } } if (!extra.empty()) { std::cout << "The following extra ids were encountered:" << std::endl; for (StringSet::iterator i = extra.begin(); i != extra.end(); i++) { std::cout << " '" << *i << "'" << std::endl; } } return 1; } } }; }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { try { opts.parse(argc, argv); Controller controller; if (opts.init) controller.init(); if (opts.transfer) controller.transfer(); if (opts.check) return controller.check(); return 0; } catch(const std::exception& e) { std::cout << e.what() << std::endl; } return 2; } qpidc-0.16/src/tests/ClusterFixture.cpp0000664000076400007640000001166411413165124020567 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "test_tools.h" #include "unit_test.h" #include "ForkedBroker.h" #include "BrokerFixture.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionAccess.h" #include "qpid/client/Session.h" #include "qpid/client/FailoverListener.h" #include "qpid/cluster/Cluster.h" #include "qpid/cluster/Cpg.h" #include "qpid/cluster/UpdateClient.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/Uuid.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/enum.h" #include "qpid/log/Logger.h" #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace qpid; using namespace qpid::cluster; using namespace qpid::framing; using namespace qpid::client; using qpid::sys::TIME_SEC; using qpid::broker::Broker; using boost::shared_ptr; using qpid::cluster::Cluster; using boost::assign::list_of; #include "ClusterFixture.h" namespace qpid { namespace tests { ClusterFixture::ClusterFixture(size_t n, const Args& args_, int localIndex_) : name(Uuid(true).str()), localIndex(localIndex_), userArgs(args_) { add(n); } ClusterFixture::ClusterFixture(size_t n, boost::function updateArgs_, int localIndex_) : name(Uuid(true).str()), localIndex(localIndex_), updateArgs(updateArgs_) { add(n); } ClusterFixture::Args ClusterFixture::makeArgs(const std::string& prefix, size_t index) { Args args = list_of("qpidd ") ("--cluster-name")(name) ("--log-prefix")(prefix); args.insert(args.end(), userArgs.begin(), userArgs.end()); if (updateArgs) updateArgs(args, index); return args; } void ClusterFixture::add() { if (size() != size_t(localIndex)) { // fork a broker process. std::ostringstream os; os << "fork" << size(); std::string prefix = os.str(); forkedBrokers.push_back(shared_ptr(new ForkedBroker(makeArgs(prefix, size())))); push_back(forkedBrokers.back()->getPort()); } else { // Run in this process addLocal(); } } namespace { /** Parse broker & cluster options */ Broker::Options parseOpts(size_t argc, const char* argv[]) { Broker::Options opts; Plugin::addOptions(opts); // Pick up cluster options. opts.parse(argc, argv, "", true); // Allow-unknown for --load-module return opts; } } void ClusterFixture::addLocal() { assert(int(size()) == localIndex); ostringstream os; os << "local" << localIndex; string prefix = os.str(); Args args(makeArgs(prefix, localIndex)); vector argv(args.size()); transform(args.begin(), args.end(), argv.begin(), boost::bind(&string::c_str, _1)); qpid::log::Logger::instance().setPrefix(prefix); localBroker.reset(new BrokerFixture(parseOpts(argv.size(), &argv[0]))); push_back(localBroker->getPort()); forkedBrokers.push_back(shared_ptr()); } bool ClusterFixture::hasLocal() const { return localIndex >= 0 && size_t(localIndex) < size(); } /** Kill a forked broker with sig, or shutdown localBroker if n==0. */ void ClusterFixture::kill(size_t n, int sig) { if (n == size_t(localIndex)) localBroker->broker->shutdown(); else forkedBrokers[n]->kill(sig); } /** Kill a broker and suppress errors from closing connection c. */ void ClusterFixture::killWithSilencer(size_t n, client::Connection& c, int sig) { ScopedSuppressLogging sl; try { c.close(); } catch(...) {} kill(n,sig); } /** * Get the known broker ports from a Connection. *@param n if specified wait for the cluster size to be n, up to a timeout. */ std::set knownBrokerPorts(qpid::client::Connection& c, int n) { FailoverListener fl(c, false); std::vector urls = fl.getKnownBrokers(); if (n >= 0 && unsigned(n) != urls.size()) { // Retry up to 10 secs in .1 second intervals. for (size_t retry=100; urls.size() != unsigned(n) && retry != 0; --retry) { qpid::sys::usleep(1000*100); // 0.1 secs urls = fl.getKnownBrokers(); } } std::set s; for (std::vector::const_iterator i = urls.begin(); i != urls.end(); ++i) s.insert((*i)[0].port); return s; } }} // namespace qpid::tests qpidc-0.16/src/tests/ForkedBroker.h0000664000076400007640000000430311376542252017624 0ustar00jrossjross00000000000000#ifndef TESTS_FORKEDBROKER_H #define TESTS_FORKEDBROKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/log/Statement.h" #include "qpid/broker/Broker.h" #include #include #include #include namespace qpid { namespace tests { /** * Class to fork a broker child process. * * For most tests a BrokerFixture may be more convenient as it starts * a broker in the same process which allows you to easily debug into * the broker. * * This useful for tests that need to start multiple brokers where * those brokers can't coexist in the same process (e.g. for cluster * tests where CPG doesn't allow multiple group members in a single * process.) * */ class ForkedBroker { public: typedef std::vector Args; // argv args are passed to broker. // // Special value "TMP_DATA_DIR" is substituted with a temporary // data directory for the broker. // ForkedBroker(const Args& argv); ~ForkedBroker(); void kill(int sig=SIGINT); int wait(); // Wait for exit, return exit status. uint16_t getPort() { return port; } pid_t getPID() { return pid; } bool isRunning() { return running; } private: void init(const Args& args); bool running; int exitStatus; pid_t pid; int port; std::string dataDir; }; }} // namespace qpid::tests #endif /*!TESTS_FORKEDBROKER_H*/ qpidc-0.16/src/tests/datagen.cpp0000664000076400007640000000612511252003060017165 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include "qpid/Options.h" namespace qpid { namespace tests { struct Args : public qpid::Options { uint count; uint minSize; uint maxSize; uint minChar; uint maxChar; bool help; Args() : qpid::Options("Random data generator"), count(1), minSize(8), maxSize(4096), minChar(32), maxChar(126),//safely printable ascii chars help(false) { addOptions() ("count", qpid::optValue(count, "N"), "number of data strings to generate") ("min-size", qpid::optValue(minSize, "N"), "minimum size of data string") ("max-size", qpid::optValue(maxSize, "N"), "maximum size of data string") ("min-char", qpid::optValue(minChar, "N"), "minimum char value used in data string") ("max-char", qpid::optValue(maxChar, "N"), "maximum char value used in data string") ("help", qpid::optValue(help), "print this usage statement"); } bool parse(int argc, char** argv) { try { qpid::Options::parse(argc, argv); if (maxSize < minSize) throw qpid::Options::Exception("max-size must be greater than min-size"); if (maxChar < minChar) throw qpid::Options::Exception("max-char must be greater than min-char"); if (help) { std::cerr << *this << std::endl << std::endl; } else { return true; } } catch (const std::exception& e) { std::cerr << *this << std::endl << std::endl << e.what() << std::endl; } return false; } }; uint random(uint min, uint max) { return (rand() % (max-min+1)) + min; } std::string generateData(uint size, uint min, uint max) { std::string data; for (uint i = 0; i < size; i++) { data += (char) random(min, max); } return data; } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { Args opts; if (opts.parse(argc, argv)) { srand(time(0)); for (uint i = 0; i < opts.count; i++) { std::cout << generateData(random(opts.minSize, opts.maxSize), opts.minChar, opts.maxChar) << std::endl; } return 0; } else { return 1; } } qpidc-0.16/src/tests/StringUtils.cpp0000664000076400007640000000456111227114422020062 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/StringUtils.h" #include "unit_test.h" QPID_AUTO_TEST_SUITE(StringUtilsTestSuite) using namespace qpid; using std::string; QPID_AUTO_TEST_CASE(testSplit_general) { std::vector results = split("a bbbb, car,d123,,,e", ", "); BOOST_CHECK_EQUAL(5u, results.size()); BOOST_CHECK_EQUAL(string("a"), results[0]); BOOST_CHECK_EQUAL(string("bbbb"), results[1]); BOOST_CHECK_EQUAL(string("car"), results[2]); BOOST_CHECK_EQUAL(string("d123"), results[3]); BOOST_CHECK_EQUAL(string("e"), results[4]); } QPID_AUTO_TEST_CASE(testSplit_noDelims) { std::vector results = split("abc", ", "); BOOST_CHECK_EQUAL(1u, results.size()); BOOST_CHECK_EQUAL(string("abc"), results[0]); } QPID_AUTO_TEST_CASE(testSplit_delimAtEnd) { std::vector results = split("abc def,,", ", "); BOOST_CHECK_EQUAL(2u, results.size()); BOOST_CHECK_EQUAL(string("abc"), results[0]); BOOST_CHECK_EQUAL(string("def"), results[1]); } QPID_AUTO_TEST_CASE(testSplit_delimAtStart) { std::vector results = split(",,abc def", ", "); BOOST_CHECK_EQUAL(2u, results.size()); BOOST_CHECK_EQUAL(string("abc"), results[0]); BOOST_CHECK_EQUAL(string("def"), results[1]); } QPID_AUTO_TEST_CASE(testSplit_onlyDelims) { std::vector results = split(",, , ", ", "); BOOST_CHECK_EQUAL(0u, results.size()); } QPID_AUTO_TEST_CASE(testSplit_empty) { std::vector results = split("", ", "); BOOST_CHECK_EQUAL(0u, results.size()); } QPID_AUTO_TEST_SUITE_END() qpidc-0.16/src/tests/msg_group_test.cpp0000664000076400007640000005776111655021545020656 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include #include "qpid/log/Statement.h" #include "qpid/sys/Time.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Thread.h" #include "qpid/sys/SystemInfo.h" #include #include #include using namespace qpid::messaging; using namespace qpid::types; using namespace std; namespace qpid { namespace tests { struct Options : public qpid::Options { bool help; std::string url; std::string address; std::string connectionOptions; uint messages; uint capacity; uint ackFrequency; bool failoverUpdates; qpid::log::Options log; uint senders; uint receivers; uint groupSize; bool printReport; std::string groupKey; bool durable; bool allowDuplicates; bool randomizeSize; bool stickyConsumer; uint timeout; uint interleave; std::string prefix; uint sendRate; Options(const std::string& argv0=std::string()) : qpid::Options("Options"), help(false), url("amqp:tcp:127.0.0.1"), messages(10000), capacity(1000), ackFrequency(100), failoverUpdates(false), log(argv0), senders(2), receivers(2), groupSize(10), printReport(false), groupKey("qpid.no_group"), durable(false), allowDuplicates(false), randomizeSize(false), stickyConsumer(false), timeout(10), interleave(1), sendRate(0) { addOptions() ("ack-frequency", qpid::optValue(ackFrequency, "N"), "Ack frequency (0 implies none of the messages will get accepted)") ("address,a", qpid::optValue(address, "ADDRESS"), "address to send and receive from") ("allow-duplicates", qpid::optValue(allowDuplicates), "Ignore the delivery of duplicated messages") ("broker,b", qpid::optValue(url, "URL"), "url of broker to connect to") ("capacity", qpid::optValue(capacity, "N"), "Pre-fetch window (0 implies no pre-fetch)") ("connection-options", qpid::optValue(connectionOptions, "OPTIONS"), "options for the connection") ("durable", qpid::optValue(durable, "yes|no"), "Mark messages as durable.") ("failover-updates", qpid::optValue(failoverUpdates), "Listen for membership updates distributed via amq.failover") ("group-key", qpid::optValue(groupKey, "KEY"), "Key of the message header containing the group identifier.") ("group-prefix", qpid::optValue(prefix, "STRING"), "Add 'prefix' to the start of all generated group identifiers.") ("group-size", qpid::optValue(groupSize, "N"), "Number of messages per a group.") ("interleave", qpid::optValue(interleave, "N"), "Simultaineously interleave messages from N different groups.") ("messages,m", qpid::optValue(messages, "N"), "Number of messages to send per each sender.") ("receivers,r", qpid::optValue(receivers, "N"), "Number of message consumers.") ("randomize-group-size", qpid::optValue(randomizeSize), "Randomize the number of messages per group to [1...group-size].") ("send-rate", qpid::optValue(sendRate,"N"), "Send at rate of N messages/second. 0 means send as fast as possible.") ("senders,s", qpid::optValue(senders, "N"), "Number of message producers.") ("sticky-consumers", qpid::optValue(stickyConsumer), "If set, verify that all messages in a group are consumed by the same client [TBD].") ("timeout", qpid::optValue(timeout, "N"), "Fail with a stall error should all consumers remain idle for timeout seconds.") ("print-report", qpid::optValue(printReport), "Dump message group statistics to stdout.") ("help", qpid::optValue(help), "print this usage statement"); add(log); //("check-redelivered", qpid::optValue(checkRedelivered), "Fails with exception if a duplicate is not marked as redelivered (only relevant when ignore-duplicates is selected)") //("tx", qpid::optValue(tx, "N"), "batch size for transactions (0 implies transaction are not used)") //("rollback-frequency", qpid::optValue(rollbackFrequency, "N"), "rollback frequency (0 implies no transaction will be rolledback)") } bool parse(int argc, char** argv) { try { qpid::Options::parse(argc, argv); if (address.empty()) throw qpid::Exception("Address must be specified!"); if (senders == 0 && receivers == 0) throw qpid::Exception("No senders and No receivers?"); if (messages == 0) throw qpid::Exception("The message count cannot be zero."); qpid::log::Logger::instance().configure(log); if (help) { std::ostringstream msg; std::cout << msg << *this << std::endl << std::endl << "Verifies the behavior of grouped messages." << std::endl; return false; } else { return true; } } catch (const std::exception& e) { std::cerr << *this << std::endl << std::endl << e.what() << std::endl; return false; } } }; const string EOS("eos"); const string SN("sn"); // class that monitors group state across all publishers and consumers. tracks the next // expected sequence for each group, and total messages consumed. class GroupChecker { qpid::sys::Mutex lock; uint consumerCt; uint producerCt; uint totalMsgs; uint totalMsgsConsumed; uint totalMsgsPublished; bool allowDuplicates; uint duplicateMsgs; typedef std::map SequenceMap; SequenceMap sequenceMap; // Statistics - for each group, store the names of all clients that consumed messages // from that group, and the number of messages consumed per client. typedef std::map ClientCounter; typedef std::map GroupStatistics; GroupStatistics statistics; public: GroupChecker( uint messages, uint consumers, uint producers, bool d) : consumerCt(consumers), producerCt(producers), totalMsgs(0), totalMsgsConsumed(0), totalMsgsPublished(0), allowDuplicates(d), duplicateMsgs(0) { // if consumering only - we a draining a queue of 'messages' queued messages. if (producerCt != 0) { totalMsgs = producers * messages; } else { totalMsgs = messages; } } bool checkSequence( const std::string& groupId, uint sequence, const std::string& client ) { qpid::sys::Mutex::ScopedLock l(lock); QPID_LOG(debug, "Client " << client << " has received " << groupId << ":" << sequence); GroupStatistics::iterator gs = statistics.find(groupId); if (gs == statistics.end()) { statistics[groupId][client] = 1; } else { gs->second[client]++; } // now verify SequenceMap::iterator s = sequenceMap.find(groupId); if (s == sequenceMap.end()) { QPID_LOG(debug, "Client " << client << " thinks this is the first message from group " << groupId << ":" << sequence); // if duplication allowed, it is possible that the last msg(s) of an old sequence are redelivered on reconnect. // in this case, set the sequence from the first msg. sequenceMap[groupId] = (allowDuplicates) ? sequence : 0; s = sequenceMap.find(groupId); } else if (sequence < s->second) { duplicateMsgs++; QPID_LOG(debug, "Client " << client << " thinks this message is a duplicate! " << groupId << ":" << sequence); return allowDuplicates; } totalMsgsConsumed++; return sequence == s->second++; } void sendingSequence( const std::string& groupId, uint sequence, bool eos, const std::string& client ) { qpid::sys::Mutex::ScopedLock l(lock); ++totalMsgsPublished; QPID_LOG(debug, "Client " << client << " sending " << groupId << ":" << sequence << ((eos) ? " (last)" : "")); } bool eraseGroup( const std::string& groupId, const std::string& name ) { qpid::sys::Mutex::ScopedLock l(lock); QPID_LOG(debug, "Deleting group " << groupId << " (by client " << name << ")"); return sequenceMap.erase( groupId ) == 1; } uint getNextExpectedSequence( const std::string& groupId ) { qpid::sys::Mutex::ScopedLock l(lock); return sequenceMap[groupId]; } bool allMsgsPublished() // true when done publishing msgs { qpid::sys::Mutex::ScopedLock l(lock); return (producerCt == 0 || totalMsgsPublished >= totalMsgs); } bool allMsgsConsumed() // true when done consuming msgs { qpid::sys::Mutex::ScopedLock l(lock); return (consumerCt == 0 || (totalMsgsConsumed >= totalMsgs && sequenceMap.size() == 0)); } uint getTotalMessages() { return totalMsgs; } uint getConsumedTotal() { qpid::sys::Mutex::ScopedLock l(lock); return totalMsgsConsumed; } uint getPublishedTotal() { qpid::sys::Mutex::ScopedLock l(lock); return totalMsgsPublished; } ostream& print(ostream& out) { qpid::sys::Mutex::ScopedLock l(lock); out << "Total Published: " << totalMsgsPublished << ", Total Consumed: " << totalMsgsConsumed << ", Duplicates detected: " << duplicateMsgs << std::endl; out << "Total Groups: " << statistics.size() << std::endl; unsigned long consumers = 0; for (GroupStatistics::iterator gs = statistics.begin(); gs != statistics.end(); ++gs) { out << " GroupId: " << gs->first; consumers += gs->second.size(); // # of consumers that processed this group if (gs->second.size() == 1) out << " completely consumed by a single client." << std::endl; else out << " consumed by " << gs->second.size() << " different clients." << std::endl; for (ClientCounter::iterator cc = gs->second.begin(); cc != gs->second.end(); ++cc) { out << " Client: " << cc->first << " consumed " << cc->second << " messages from the group." << std::endl; } } out << "Average # of consumers per group: " << ((statistics.size() != 0) ? (double(consumers)/statistics.size()) : 0) << std::endl; return out; } }; namespace { // rand() is not thread safe. Create a singleton obj to hold a lock while calling // rand() so it can be called safely by multiple concurrent clients. class Randomizer { qpid::sys::Mutex lock; public: uint operator()(uint max) { qpid::sys::Mutex::ScopedLock l(lock); return (rand() % max) + 1; } }; static Randomizer randomizer; } // tag each generated message with a group identifer // class GroupGenerator { const std::string groupPrefix; const uint groupSize; const bool randomizeSize; const uint interleave; uint groupSuffix; uint total; struct GroupState { std::string id; const uint size; uint count; GroupState( const std::string& i, const uint s ) : id(i), size(s), count(0) {} }; typedef std::list GroupList; GroupList groups; GroupList::iterator current; // add a new group identifier to the list void newGroup() { std::ostringstream groupId(groupPrefix, ios_base::out|ios_base::ate); groupId << std::string(":") << groupSuffix++; uint size = (randomizeSize) ? randomizer(groupSize) : groupSize; QPID_LOG(trace, "New group: GROUPID=[" << groupId.str() << "] size=" << size << " this=" << this); GroupState group( groupId.str(), size ); groups.push_back( group ); } public: GroupGenerator( const std::string& prefix, const uint t, const uint size, const bool randomize, const uint i) : groupPrefix(prefix), groupSize(size), randomizeSize(randomize), interleave(i), groupSuffix(0), total(t) { QPID_LOG(trace, "New group generator: PREFIX=[" << prefix << "] total=" << total << " size=" << size << " rand=" << randomize << " interleave=" << interleave << " this=" << this); for (uint i = 0; i < 1 || i < interleave; ++i) { newGroup(); } current = groups.begin(); } bool genGroup(std::string& groupId, uint& seq, bool& eos) { if (!total) return false; --total; if (current == groups.end()) current = groups.begin(); groupId = current->id; seq = current->count++; if (current->count == current->size) { QPID_LOG(trace, "Last msg for " << current->id << ", " << current->count << " this=" << this); eos = true; if (total >= interleave) { // need a new group to replace this one newGroup(); groups.erase(current++); } else ++current; } else { ++current; eos = total < interleave; // mark eos on the last message of each group } QPID_LOG(trace, "SENDING GROUPID=[" << groupId << "] seq=" << seq << " eos=" << eos << " this=" << this); return true; } }; class Client : public qpid::sys::Runnable { public: typedef boost::shared_ptr shared_ptr; enum State {ACTIVE, DONE, FAILURE}; Client( const std::string& n, const Options& o ) : name(n), opts(o), state(ACTIVE), stopped(false) {} virtual ~Client() {} State getState() { return state; } void testFailed( const std::string& reason ) { state = FAILURE; error << "Client '" << name << "' failed: " << reason; } void clientDone() { if (state == ACTIVE) state = DONE; } qpid::sys::Thread& getThread() { return thread; } const std::string getErrorMsg() { return error.str(); } void stop() {stopped = true;} const std::string& getName() { return name; } protected: const std::string name; const Options& opts; qpid::sys::Thread thread; ostringstream error; State state; bool stopped; }; class Consumer : public Client { GroupChecker& checker; public: Consumer(const std::string& n, const Options& o, GroupChecker& c ) : Client(n, o), checker(c) {}; virtual ~Consumer() {}; void run() { Connection connection; try { connection = Connection(opts.url, opts.connectionOptions); connection.open(); std::auto_ptr updates(opts.failoverUpdates ? new FailoverUpdates(connection) : 0); Session session = connection.createSession(); Receiver receiver = session.createReceiver(opts.address); receiver.setCapacity(opts.capacity); Message msg; uint count = 0; while (!stopped) { if (receiver.fetch(msg, Duration::SECOND)) { // msg retrieved qpid::types::Variant::Map& properties = msg.getProperties(); std::string groupId = properties[opts.groupKey]; uint groupSeq = properties[SN]; bool eof = properties[EOS]; QPID_LOG(trace, "RECVING GROUPID=[" << groupId << "] seq=" << groupSeq << " eos=" << eof << " name=" << name); qpid::sys::usleep(10); if (!checker.checkSequence( groupId, groupSeq, name )) { ostringstream msg; msg << "Check sequence failed. Group=" << groupId << " rcvd seq=" << groupSeq << " expected=" << checker.getNextExpectedSequence( groupId ); testFailed( msg.str() ); break; } else if (eof) { if (!checker.eraseGroup( groupId, name )) { ostringstream msg; msg << "Erase group failed. Group=" << groupId << " rcvd seq=" << groupSeq; testFailed( msg.str() ); break; } } ++count; if (opts.ackFrequency && (count % opts.ackFrequency == 0)) { session.acknowledge(); } // Clear out message properties & content for next iteration. msg = Message(); // TODO aconway 2010-12-01: should be done by fetch } else if (checker.allMsgsConsumed()) // timed out, nothing else to do? break; } session.acknowledge(); session.close(); connection.close(); } catch(const std::exception& error) { ostringstream msg; msg << "consumer error: " << error.what(); testFailed( msg.str() ); connection.close(); } clientDone(); QPID_LOG(trace, "Consuming client " << name << " completed."); } }; class Producer : public Client { GroupChecker& checker; GroupGenerator generator; public: Producer(const std::string& n, const Options& o, GroupChecker& c) : Client(n, o), checker(c), generator( n, o.messages, o.groupSize, o.randomizeSize, o.interleave ) {}; virtual ~Producer() {}; void run() { Connection connection; try { connection = Connection(opts.url, opts.connectionOptions); connection.open(); std::auto_ptr updates(opts.failoverUpdates ? new FailoverUpdates(connection) : 0); Session session = connection.createSession(); Sender sender = session.createSender(opts.address); if (opts.capacity) sender.setCapacity(opts.capacity); Message msg; msg.setDurable(opts.durable); std::string groupId; uint seq; bool eos; uint sent = 0; qpid::sys::AbsTime start = qpid::sys::now(); int64_t interval = 0; if (opts.sendRate) interval = qpid::sys::TIME_SEC/opts.sendRate; while (!stopped && generator.genGroup(groupId, seq, eos)) { msg.getProperties()[opts.groupKey] = groupId; msg.getProperties()[SN] = seq; msg.getProperties()[EOS] = eos; checker.sendingSequence( groupId, seq, eos, name ); sender.send(msg); ++sent; if (opts.sendRate) { qpid::sys::AbsTime waitTill(start, sent*interval); int64_t delay = qpid::sys::Duration(qpid::sys::now(), waitTill); if (delay > 0) qpid::sys::usleep(delay/qpid::sys::TIME_USEC); } } session.sync(); session.close(); connection.close(); } catch(const std::exception& error) { ostringstream msg; msg << "producer '" << name << "' error: " << error.what(); testFailed(msg.str()); connection.close(); } clientDone(); QPID_LOG(trace, "Producing client " << name << " completed."); } }; }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char ** argv) { int status = 0; try { Options opts; if (opts.parse(argc, argv)) { GroupChecker state( opts.messages, opts.receivers, opts.senders, opts.allowDuplicates); std::vector clients; if (opts.randomizeSize) srand((unsigned int)qpid::sys::SystemInfo::getProcessId()); // fire off the producers && consumers for (size_t j = 0; j < opts.senders; ++j) { ostringstream name; name << opts.prefix << "P_" << j; clients.push_back(Client::shared_ptr(new Producer( name.str(), opts, state ))); clients.back()->getThread() = qpid::sys::Thread(*clients.back()); } for (size_t j = 0; j < opts.receivers; ++j) { ostringstream name; name << opts.prefix << "C_" << j; clients.push_back(Client::shared_ptr(new Consumer( name.str(), opts, state ))); clients.back()->getThread() = qpid::sys::Thread(*clients.back()); } // wait for all pubs/subs to finish.... or for consumers to fail or stall. uint stalledTime = 0; bool clientFailed = false; while (!clientFailed && (!state.allMsgsPublished() || !state.allMsgsConsumed())) { uint lastCount; lastCount = state.getConsumedTotal(); qpid::sys::usleep( 1000000 ); // check each client for failures for (std::vector::iterator i = clients.begin(); i != clients.end(); ++i) { QPID_LOG(debug, "Client " << (*i)->getName() << " state=" << (*i)->getState()); if ((*i)->getState() == Client::FAILURE) { QPID_LOG(error, argv[0] << ": test failed with client error: " << (*i)->getErrorMsg()); clientFailed = true; break; // exit test. } } // check for stalled consumers if (!clientFailed && !state.allMsgsConsumed()) { if (lastCount == state.getConsumedTotal()) { if (++stalledTime >= opts.timeout) { clientFailed = true; break; // exit test } } else { stalledTime = 0; } } QPID_LOG(debug, "Consumed to date = " << state.getConsumedTotal() << " Published to date = " << state.getPublishedTotal() << " total=" << state.getTotalMessages()); } if (clientFailed) { if (stalledTime >= opts.timeout) { QPID_LOG(error, argv[0] << ": test failed due to stalled consumer." ); status = 2; } else { status = 1; } } // Wait for started threads. for (std::vector::iterator i = clients.begin(); i != clients.end(); ++i) { (*i)->stop(); (*i)->getThread().join(); } if (opts.printReport && !status) state.print(std::cout); } else status = 4; } catch(const std::exception& error) { QPID_LOG(error, argv[0] << ": " << error.what()); status = 3; } QPID_LOG(trace, "TEST DONE [" << status << "]"); return status; } qpidc-0.16/src/tests/federated_cluster_test_with_node_failure0000775000076400007640000000155411654250703025315 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # srcdir=`dirname $0` TEST_NODE_FAILURE=1 $srcdir/federated_cluster_test qpidc-0.16/src/tests/shlibtest.cpp0000664000076400007640000000210611252003060017556 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { namespace tests { int* loaderData = 0; extern "C" #ifdef WIN32 __declspec(dllexport) #endif void callMe(int *i) { loaderData=i; } struct OnUnload { ~OnUnload() { *loaderData=42; } }; OnUnload unloader; // For destructor. }} // namespace qpid::tests qpidc-0.16/src/tests/cluster_python_tests0000775000076400007640000000167711654250703021335 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Skip if cluster services not running. . `dirname $0`/ais_check FAILING=`dirname $0`/cluster_python_tests_failing.txt source `dirname $0`/python_tests qpidc-0.16/src/tests/DtxWorkRecordTest.cpp0000664000076400007640000001302211252003060021155 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/DtxWorkRecord.h" #include "unit_test.h" #include #include #include "TxMocks.h" using namespace qpid::broker; using boost::static_pointer_cast; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(DtxWorkRecordTestSuite) QPID_AUTO_TEST_CASE(testOnePhaseCommit){ MockTransactionalStore store; store.expectBegin().expectCommit(); MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectPrepare().expectCommit(); MockTxOp::shared_ptr opB(new MockTxOp()); opB->expectPrepare().expectCommit(); DtxBuffer::shared_ptr bufferA(new DtxBuffer()); bufferA->enlist(static_pointer_cast(opA)); bufferA->markEnded(); DtxBuffer::shared_ptr bufferB(new DtxBuffer()); bufferB->enlist(static_pointer_cast(opB)); bufferB->markEnded(); DtxWorkRecord work("my-xid", &store); work.add(bufferA); work.add(bufferB); work.commit(true); store.check(); BOOST_CHECK(store.isCommitted()); opA->check(); opB->check(); } QPID_AUTO_TEST_CASE(testFailOnOnePhaseCommit){ MockTransactionalStore store; store.expectBegin().expectAbort(); MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectPrepare().expectRollback(); MockTxOp::shared_ptr opB(new MockTxOp(true)); opB->expectPrepare().expectRollback(); MockTxOp::shared_ptr opC(new MockTxOp()); opC->expectRollback(); DtxBuffer::shared_ptr bufferA(new DtxBuffer()); bufferA->enlist(static_pointer_cast(opA)); bufferA->markEnded(); DtxBuffer::shared_ptr bufferB(new DtxBuffer()); bufferB->enlist(static_pointer_cast(opB)); bufferB->markEnded(); DtxBuffer::shared_ptr bufferC(new DtxBuffer()); bufferC->enlist(static_pointer_cast(opC)); bufferC->markEnded(); DtxWorkRecord work("my-xid", &store); work.add(bufferA); work.add(bufferB); work.add(bufferC); work.commit(true); BOOST_CHECK(store.isAborted()); store.check(); opA->check(); opB->check(); opC->check(); } QPID_AUTO_TEST_CASE(testTwoPhaseCommit){ MockTransactionalStore store; store.expectBegin2PC().expectPrepare().expectCommit(); MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectPrepare().expectCommit(); MockTxOp::shared_ptr opB(new MockTxOp()); opB->expectPrepare().expectCommit(); DtxBuffer::shared_ptr bufferA(new DtxBuffer()); bufferA->enlist(static_pointer_cast(opA)); bufferA->markEnded(); DtxBuffer::shared_ptr bufferB(new DtxBuffer()); bufferB->enlist(static_pointer_cast(opB)); bufferB->markEnded(); DtxWorkRecord work("my-xid", &store); work.add(bufferA); work.add(bufferB); BOOST_CHECK(work.prepare()); BOOST_CHECK(store.isPrepared()); work.commit(false); store.check(); BOOST_CHECK(store.isCommitted()); opA->check(); opB->check(); } QPID_AUTO_TEST_CASE(testFailOnTwoPhaseCommit){ MockTransactionalStore store; store.expectBegin2PC().expectAbort(); MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectPrepare().expectRollback(); MockTxOp::shared_ptr opB(new MockTxOp(true)); opB->expectPrepare().expectRollback(); MockTxOp::shared_ptr opC(new MockTxOp()); opC->expectRollback(); DtxBuffer::shared_ptr bufferA(new DtxBuffer()); bufferA->enlist(static_pointer_cast(opA)); bufferA->markEnded(); DtxBuffer::shared_ptr bufferB(new DtxBuffer()); bufferB->enlist(static_pointer_cast(opB)); bufferB->markEnded(); DtxBuffer::shared_ptr bufferC(new DtxBuffer()); bufferC->enlist(static_pointer_cast(opC)); bufferC->markEnded(); DtxWorkRecord work("my-xid", &store); work.add(bufferA); work.add(bufferB); work.add(bufferC); BOOST_CHECK(!work.prepare()); BOOST_CHECK(store.isAborted()); store.check(); opA->check(); opB->check(); opC->check(); } QPID_AUTO_TEST_CASE(testRollback){ MockTransactionalStore store; store.expectBegin2PC().expectPrepare().expectAbort(); MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectPrepare().expectRollback(); MockTxOp::shared_ptr opB(new MockTxOp()); opB->expectPrepare().expectRollback(); DtxBuffer::shared_ptr bufferA(new DtxBuffer()); bufferA->enlist(static_pointer_cast(opA)); bufferA->markEnded(); DtxBuffer::shared_ptr bufferB(new DtxBuffer()); bufferB->enlist(static_pointer_cast(opB)); bufferB->markEnded(); DtxWorkRecord work("my-xid", &store); work.add(bufferA); work.add(bufferB); BOOST_CHECK(work.prepare()); BOOST_CHECK(store.isPrepared()); work.rollback(); store.check(); BOOST_CHECK(store.isAborted()); opA->check(); opB->check(); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/replication_test0000775000076400007640000002043311721215323020362 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run a test of the replication feature source ./test_env.sh trap stop_brokers INT TERM QUIT stop_brokers() { if [ x$BROKER_A != x ]; then $QPIDD_EXEC --no-module-dir -q --port $BROKER_A unset BROKER_A fi if [ x$BROKER_B != x ]; then $QPIDD_EXEC --no-module-dir -q --port $BROKER_B unset BROKER_B fi } if test -d ${PYTHON_DIR} && test -f "$REPLICATING_LISTENER_LIB" && test -f "$REPLICATION_EXCHANGE_LIB"; then rm -f queue-*.repl replication-*.log #cleanup from any earlier runs $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATING_LISTENER_LIB --replication-queue replication --create-replication-queue true --log-enable info+ --log-to-file replication-source.log --log-to-stderr 0 > qpidd.port BROKER_A=`cat qpidd.port` $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATION_EXCHANGE_LIB --log-enable info+ --log-to-file replication-dest.log --log-to-stderr 0 > qpidd.port BROKER_B=`cat qpidd.port` echo "Running replication test between localhost:$BROKER_A and localhost:$BROKER_B" $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add exchange replication replication $PYTHON_COMMANDS/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication #create test queues $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add queue queue-a --generate-queue-events 2 $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add queue queue-b --generate-queue-events 2 $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add queue queue-c --generate-queue-events 1 $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add queue queue-d --generate-queue-events 2 $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add queue queue-e --generate-queue-events 1 $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add queue queue-a $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add queue queue-b $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add queue queue-c $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add queue queue-e #queue-d deliberately not declared on DR; this error case should be handled #publish and consume from test queues on broker A: i=1 while [ $i -le 10 ]; do echo Message $i for A >> queue-a-input.repl i=`expr $i + 1` done i=1 while [ $i -le 20 ]; do echo Message $i for B >> queue-b-input.repl i=`expr $i + 1` done i=1 while [ $i -le 15 ]; do echo Message $i for C >> queue-c-input.repl i=`expr $i + 1` done ./sender --port $BROKER_A --routing-key queue-a --send-eos 1 < queue-a-input.repl ./sender --port $BROKER_A --routing-key queue-b --send-eos 1 < queue-b-input.repl ./sender --port $BROKER_A --routing-key queue-c --send-eos 1 < queue-c-input.repl echo dummy | ./sender --port $BROKER_A --routing-key queue-d --send-eos 1 ./receiver --port $BROKER_A --queue queue-a --messages 5 > /dev/null ./receiver --port $BROKER_A --queue queue-b --messages 10 > /dev/null ./receiver --port $BROKER_A --queue queue-c --messages 10 > /dev/null ./receiver --port $BROKER_A --queue queue-d > /dev/null # What we are doing is putting a message on the end of repliaction queue & waiting for it on remote side # making sure all the messages have been flushed from the replication queue. echo dummy | ./sender --port $BROKER_A --routing-key queue-e --send-eos 1 ./receiver --port $BROKER_B --queue queue-e --messages 1 > /dev/null #shutdown broker A then check that broker Bs versions of the queues are as expected $QPIDD_EXEC --no-module-dir -q --port $BROKER_A unset BROKER_A #validate replicated queues: ./receiver --port $BROKER_B --queue queue-a > queue-a-backup.repl ./receiver --port $BROKER_B --queue queue-b > queue-b-backup.repl ./receiver --port $BROKER_B --queue queue-c > queue-c-backup.repl tail -5 queue-a-input.repl > queue-a-expected.repl tail -10 queue-b-input.repl > queue-b-expected.repl diff queue-a-backup.repl queue-a-expected.repl || FAIL=1 diff queue-b-backup.repl queue-b-expected.repl || FAIL=1 diff queue-c-backup.repl queue-c-input.repl || FAIL=1 grep 'queue-d does not exist' replication-dest.log > /dev/null || echo "WARNING: Expected error to be logged!" stop_brokers # now check offsets working (enqueue based on position being set, not queue abs position) $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATING_LISTENER_LIB --replication-queue replication --create-replication-queue true --log-enable info+ --log-to-file replication-source.log --log-to-stderr 0 > qpidd.port BROKER_A=`cat qpidd.port` $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATION_EXCHANGE_LIB --log-enable info+ --log-to-file replication-dest.log --log-to-stderr 0 > qpidd.port BROKER_B=`cat qpidd.port` $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add exchange replication replication $PYTHON_COMMANDS/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add queue queue-e --generate-queue-events 2 $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add queue queue-e $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_A" add queue queue-d --generate-queue-events 1 $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add queue queue-d i=1 while [ $i -le 10 ]; do echo Message $i for A >> queue-e-input.repl i=`expr $i + 1` done ./sender --port $BROKER_A --routing-key queue-e --send-eos 1 < queue-e-input.repl ./receiver --port $BROKER_A --queue queue-e --messages 10 > /dev/null # What we are doing is putting a message on the end of repliaction queue & waiting for it on remote side # making sure all the messages have been flushed from the replication queue. echo dummy | ./sender --port $BROKER_A --routing-key queue-d --send-eos 1 ./receiver --port $BROKER_B --queue queue-d --messages 1 > /dev/null # now check offsets working $QPIDD_EXEC --no-module-dir -q --port $BROKER_B unset BROKER_B $QPIDD_EXEC --daemon --port 0 --no-data-dir --no-module-dir --auth no --load-module $REPLICATION_EXCHANGE_LIB --log-enable info+ --log-to-file replication-dest.log --log-to-stderr 0 > qpidd.port BROKER_B=`cat qpidd.port` $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add queue queue-e $PYTHON_COMMANDS/qpid-config -b "localhost:$BROKER_B" add exchange replication replication $PYTHON_COMMANDS/qpid-route --ack 5 queue add "localhost:$BROKER_B" "localhost:$BROKER_A" replication replication # now send another 15 i=11 while [ $i -le 15 ]; do echo Message $i for A >> queue-e1-input.repl i=`expr $i + 1` done ./sender --port $BROKER_A --routing-key queue-e --send-eos 1 < queue-e1-input.repl ./receiver --port $BROKER_B --queue queue-e > queue-e-backup.repl diff queue-e-backup.repl queue-e1-input.repl || FAIL=1 stop_brokers if [ x$FAIL != x ]; then echo replication test failed: expectations not met! exit 1 else echo queue state replicated as expected rm -f queue-*.repl replication-*.log fi else echo "Skipping replication test, plugins not built or python utils not located" fi qpidc-0.16/src/tests/Url.cpp0000664000076400007640000000736311621325002016334 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "qpid/Url.h" #include using namespace std; using namespace qpid; using namespace boost::assign; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(UrlTestSuite) #define URL_CHECK_STR(STR) BOOST_CHECK_EQUAL(Url(STR).str(), STR) #define URL_CHECK_INVALID(STR) BOOST_CHECK_THROW(Url(STR), Url::Invalid) QPID_AUTO_TEST_CASE(TestParseTcp) { URL_CHECK_STR("amqp:tcp:host:42"); URL_CHECK_STR("amqp:tcp:host-._~%ff%23:42"); // unreserved chars and pct encoded hex. // Check defaults BOOST_CHECK_EQUAL(Url("amqp:host:42").str(), "amqp:tcp:host:42"); BOOST_CHECK_EQUAL(Url("amqp:tcp:host").str(), "amqp:tcp:host:5672"); BOOST_CHECK_EQUAL(Url("host").str(), "amqp:tcp:host:5672"); } QPID_AUTO_TEST_CASE(TestParseInvalid) { //host is required: URL_CHECK_INVALID("amqp:tcp:"); URL_CHECK_INVALID("amqp:"); URL_CHECK_INVALID("amqp::42"); URL_CHECK_INVALID(""); // Port must be numeric URL_CHECK_INVALID("host:badPort"); } QPID_AUTO_TEST_CASE(TestParseXyz) { Url::addProtocol("xyz"); URL_CHECK_STR("amqp:xyz:host:123"); BOOST_CHECK_EQUAL(Url("xyz:host").str(), "amqp:xyz:host:5672"); } QPID_AUTO_TEST_CASE(TestParseTricky) { BOOST_CHECK_EQUAL(Url("amqp").str(), "amqp:tcp:amqp:5672"); BOOST_CHECK_EQUAL(Url("amqp:tcp").str(), "amqp:tcp:tcp:5672"); // These are ambiguous parses and arguably not the best result BOOST_CHECK_EQUAL(Url("amqp:876").str(), "amqp:tcp:876:5672"); BOOST_CHECK_EQUAL(Url("tcp:567").str(), "amqp:tcp:567:5672"); } QPID_AUTO_TEST_CASE(TestParseIPv6) { Url u1("[::]"); BOOST_CHECK_EQUAL(u1[0].host, "::"); BOOST_CHECK_EQUAL(u1[0].port, 5672); Url u2("[::1]"); BOOST_CHECK_EQUAL(u2[0].host, "::1"); BOOST_CHECK_EQUAL(u2[0].port, 5672); Url u3("[::127.0.0.1]"); BOOST_CHECK_EQUAL(u3[0].host, "::127.0.0.1"); BOOST_CHECK_EQUAL(u3[0].port, 5672); Url u4("[2002::222:68ff:fe0b:e61a]"); BOOST_CHECK_EQUAL(u4[0].host, "2002::222:68ff:fe0b:e61a"); BOOST_CHECK_EQUAL(u4[0].port, 5672); Url u5("[2002::222:68ff:fe0b:e61a]:123"); BOOST_CHECK_EQUAL(u5[0].host, "2002::222:68ff:fe0b:e61a"); BOOST_CHECK_EQUAL(u5[0].port, 123); } QPID_AUTO_TEST_CASE(TestParseMultiAddress) { Url::addProtocol("xyz"); URL_CHECK_STR("amqp:tcp:host:0,xyz:foo:123,tcp:foo:0,xyz:bar:1"); URL_CHECK_STR("amqp:xyz:foo:222,tcp:foo:0"); URL_CHECK_INVALID("amqp:tcp:h:0,"); URL_CHECK_INVALID(",amqp:tcp:h"); } QPID_AUTO_TEST_CASE(TestParseUserPass) { URL_CHECK_STR("amqp:user/pass@tcp:host:123"); URL_CHECK_STR("amqp:user@tcp:host:123"); BOOST_CHECK_EQUAL(Url("user/pass@host").str(), "amqp:user/pass@tcp:host:5672"); BOOST_CHECK_EQUAL(Url("user@host").str(), "amqp:user@tcp:host:5672"); Url u("user/pass@host"); BOOST_CHECK_EQUAL(u.getUser(), "user"); BOOST_CHECK_EQUAL(u.getPass(), "pass"); Url v("foo@host"); BOOST_CHECK_EQUAL(v.getUser(), "foo"); BOOST_CHECK_EQUAL(v.getPass(), ""); u = v; BOOST_CHECK_EQUAL(u.getUser(), "foo"); BOOST_CHECK_EQUAL(u.getPass(), ""); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/run_cluster_test0000775000076400007640000000161511261157436020430 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the tests srcdir=`dirname $0` . $srcdir/ais_check with_ais_group $srcdir/run_test ./cluster_test qpidc-0.16/src/tests/cluster_tests.fail0000664000076400007640000000000311524323540020615 0ustar00jrossjross00000000000000 qpidc-0.16/src/tests/QueueTest.cpp0000664000076400007640000013742511725210040017521 0ustar00jrossjross00000000000000 /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "MessageUtils.h" #include "unit_test.h" #include "test_tools.h" #include "qpid/Exception.h" #include "qpid/broker/Broker.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/broker/FanOutExchange.h" #include "qpid/broker/Queue.h" #include "qpid/broker/Deliverable.h" #include "qpid/broker/ExchangeRegistry.h" #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/NullMessageStore.h" #include "qpid/broker/ExpiryPolicy.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/client/QueueOptions.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/broker/QueuePolicy.h" #include "qpid/broker/QueueFlowLimit.h" #include #include "boost/format.hpp" using boost::intrusive_ptr; using namespace qpid; using namespace qpid::broker; using namespace qpid::client; using namespace qpid::framing; using namespace qpid::sys; namespace qpid { namespace tests { class TestConsumer : public virtual Consumer{ public: typedef boost::shared_ptr shared_ptr; QueuedMessage last; bool received; TestConsumer(std::string name="test", bool acquire = true):Consumer(name, acquire), received(false) {}; virtual bool deliver(QueuedMessage& msg){ last = msg; received = true; return true; }; void notify() {} void cancel() {} void acknowledged(const QueuedMessage&) {} OwnershipToken* getSession() { return 0; } }; class FailOnDeliver : public Deliverable { boost::intrusive_ptr msg; public: FailOnDeliver() : msg(MessageUtils::createMessage()) {} void deliverTo(const boost::shared_ptr& queue) { throw Exception(QPID_MSG("Invalid delivery to " << queue->getName())); } Message& getMessage() { return *(msg.get()); } }; intrusive_ptr create_message(std::string exchange, std::string routingKey, uint64_t ttl = 0) { intrusive_ptr msg(new Message()); AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0))); AMQFrame header((AMQHeaderBody())); msg->getFrames().append(method); msg->getFrames().append(header); msg->getFrames().getHeaders()->get(true)->setRoutingKey(routingKey); if (ttl) msg->getFrames().getHeaders()->get(true)->setTtl(ttl); return msg; } QPID_AUTO_TEST_SUITE(QueueTestSuite) QPID_AUTO_TEST_CASE(testAsyncMessage) { Queue::shared_ptr queue(new Queue("my_test_queue", true)); intrusive_ptr received; TestConsumer::shared_ptr c1(new TestConsumer()); queue->consume(c1); //Test basic delivery: intrusive_ptr msg1 = create_message("e", "A"); msg1->enqueueAsync(queue, 0);//this is done on enqueue which is not called from process queue->process(msg1); sleep(2); BOOST_CHECK(!c1->received); msg1->enqueueComplete(); received = queue->get().payload; BOOST_CHECK_EQUAL(msg1.get(), received.get()); } QPID_AUTO_TEST_CASE(testAsyncMessageCount){ Queue::shared_ptr queue(new Queue("my_test_queue", true)); intrusive_ptr msg1 = create_message("e", "A"); msg1->enqueueAsync(queue, 0);//this is done on enqueue which is not called from process queue->process(msg1); sleep(2); uint32_t compval=0; BOOST_CHECK_EQUAL(compval, queue->getEnqueueCompleteMessageCount()); msg1->enqueueComplete(); compval=1; BOOST_CHECK_EQUAL(compval, queue->getEnqueueCompleteMessageCount()); BOOST_CHECK_EQUAL(compval, queue->getMessageCount()); } QPID_AUTO_TEST_CASE(testConsumers){ Queue::shared_ptr queue(new Queue("my_queue", true)); //Test adding consumers: TestConsumer::shared_ptr c1(new TestConsumer()); TestConsumer::shared_ptr c2(new TestConsumer()); queue->consume(c1); queue->consume(c2); BOOST_CHECK_EQUAL(uint32_t(2), queue->getConsumerCount()); //Test basic delivery: intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "B"); intrusive_ptr msg3 = create_message("e", "C"); queue->deliver(msg1); BOOST_CHECK(queue->dispatch(c1)); BOOST_CHECK_EQUAL(msg1.get(), c1->last.payload.get()); queue->deliver(msg2); BOOST_CHECK(queue->dispatch(c2)); BOOST_CHECK_EQUAL(msg2.get(), c2->last.payload.get()); c1->received = false; queue->deliver(msg3); BOOST_CHECK(queue->dispatch(c1)); BOOST_CHECK_EQUAL(msg3.get(), c1->last.payload.get()); //Test cancellation: queue->cancel(c1); BOOST_CHECK_EQUAL(uint32_t(1), queue->getConsumerCount()); queue->cancel(c2); BOOST_CHECK_EQUAL(uint32_t(0), queue->getConsumerCount()); } QPID_AUTO_TEST_CASE(testRegistry){ //Test use of queues in registry: QueueRegistry registry; registry.declare("queue1", true, true); registry.declare("queue2", true, true); registry.declare("queue3", true, true); BOOST_CHECK(registry.find("queue1")); BOOST_CHECK(registry.find("queue2")); BOOST_CHECK(registry.find("queue3")); registry.destroy("queue1"); registry.destroy("queue2"); registry.destroy("queue3"); BOOST_CHECK(!registry.find("queue1")); BOOST_CHECK(!registry.find("queue2")); BOOST_CHECK(!registry.find("queue3")); } QPID_AUTO_TEST_CASE(testDequeue){ Queue::shared_ptr queue(new Queue("my_queue", true)); intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "B"); intrusive_ptr msg3 = create_message("e", "C"); intrusive_ptr received; queue->deliver(msg1); queue->deliver(msg2); queue->deliver(msg3); BOOST_CHECK_EQUAL(uint32_t(3), queue->getMessageCount()); received = queue->get().payload; BOOST_CHECK_EQUAL(msg1.get(), received.get()); BOOST_CHECK_EQUAL(uint32_t(2), queue->getMessageCount()); received = queue->get().payload; BOOST_CHECK_EQUAL(msg2.get(), received.get()); BOOST_CHECK_EQUAL(uint32_t(1), queue->getMessageCount()); TestConsumer::shared_ptr consumer(new TestConsumer()); queue->consume(consumer); queue->dispatch(consumer); if (!consumer->received) sleep(2); BOOST_CHECK_EQUAL(msg3.get(), consumer->last.payload.get()); BOOST_CHECK_EQUAL(uint32_t(0), queue->getMessageCount()); received = queue->get().payload; BOOST_CHECK(!received); BOOST_CHECK_EQUAL(uint32_t(0), queue->getMessageCount()); } QPID_AUTO_TEST_CASE(testBound){ //test the recording of bindings, and use of those to allow a queue to be unbound string key("my-key"); FieldTable args; Queue::shared_ptr queue(new Queue("my-queue", true)); ExchangeRegistry exchanges; //establish bindings from exchange->queue and notify the queue as it is bound: Exchange::shared_ptr exchange1 = exchanges.declare("my-exchange-1", "direct").first; exchange1->bind(queue, key, &args); queue->bound(exchange1->getName(), key, args); Exchange::shared_ptr exchange2 = exchanges.declare("my-exchange-2", "fanout").first; exchange2->bind(queue, key, &args); queue->bound(exchange2->getName(), key, args); Exchange::shared_ptr exchange3 = exchanges.declare("my-exchange-3", "topic").first; exchange3->bind(queue, key, &args); queue->bound(exchange3->getName(), key, args); //delete one of the exchanges: exchanges.destroy(exchange2->getName()); exchange2.reset(); //unbind the queue from all exchanges it knows it has been bound to: queue->unbind(exchanges); //ensure the remaining exchanges don't still have the queue bound to them: FailOnDeliver deliverable; exchange1->route(deliverable); exchange3->route(deliverable); } QPID_AUTO_TEST_CASE(testPersistLastNodeStanding){ client::QueueOptions args; args.setPersistLastNode(); Queue::shared_ptr queue(new Queue("my-queue", true)); queue->configure(args); intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "B"); intrusive_ptr msg3 = create_message("e", "C"); //enqueue 2 messages queue->deliver(msg1); queue->deliver(msg2); //change mode queue->setLastNodeFailure(); //enqueue 1 message queue->deliver(msg3); //check all have persistent ids. BOOST_CHECK(msg1->isPersistent()); BOOST_CHECK(msg2->isPersistent()); BOOST_CHECK(msg3->isPersistent()); } QPID_AUTO_TEST_CASE(testSeek){ Queue::shared_ptr queue(new Queue("my-queue", true)); intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "B"); intrusive_ptr msg3 = create_message("e", "C"); //enqueue 2 messages queue->deliver(msg1); queue->deliver(msg2); queue->deliver(msg3); TestConsumer::shared_ptr consumer(new TestConsumer("test", false)); SequenceNumber seq(2); consumer->setPosition(seq); QueuedMessage qm; queue->dispatch(consumer); BOOST_CHECK_EQUAL(msg3.get(), consumer->last.payload.get()); queue->dispatch(consumer); queue->dispatch(consumer); // make sure over-run is safe } QPID_AUTO_TEST_CASE(testSearch){ Queue::shared_ptr queue(new Queue("my-queue", true)); intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "B"); intrusive_ptr msg3 = create_message("e", "C"); //enqueue 2 messages queue->deliver(msg1); queue->deliver(msg2); queue->deliver(msg3); SequenceNumber seq(2); QueuedMessage qm; TestConsumer::shared_ptr c1(new TestConsumer()); BOOST_CHECK(queue->find(seq, qm)); BOOST_CHECK_EQUAL(seq.getValue(), qm.position.getValue()); queue->acquire(qm, c1->getName()); BOOST_CHECK_EQUAL(queue->getMessageCount(), 2u); SequenceNumber seq1(3); QueuedMessage qm1; BOOST_CHECK(queue->find(seq1, qm1)); BOOST_CHECK_EQUAL(seq1.getValue(), qm1.position.getValue()); } const std::string nullxid = ""; class SimpleDummyCtxt : public TransactionContext {}; class DummyCtxt : public TPCTransactionContext { const std::string xid; public: DummyCtxt(const std::string& _xid) : xid(_xid) {} static std::string getXid(TransactionContext& ctxt) { DummyCtxt* c(dynamic_cast(&ctxt)); return c ? c->xid : nullxid; } }; class TestMessageStoreOC : public MessageStore { std::set prepared; uint64_t nextPersistenceId; public: uint enqCnt; uint deqCnt; bool error; TestMessageStoreOC() : MessageStore(),nextPersistenceId(1),enqCnt(0),deqCnt(0),error(false) {} ~TestMessageStoreOC(){} virtual void dequeue(TransactionContext*, const boost::intrusive_ptr& /*msg*/, const PersistableQueue& /*queue*/) { if (error) throw Exception("Dequeue error test"); deqCnt++; } virtual void enqueue(TransactionContext*, const boost::intrusive_ptr& msg, const PersistableQueue& /* queue */) { if (error) throw Exception("Enqueue error test"); enqCnt++; msg->enqueueComplete(); } void createError() { error=true; } bool init(const Options*) { return true; } void truncateInit(const bool) {} void create(PersistableQueue& queue, const framing::FieldTable&) { queue.setPersistenceId(nextPersistenceId++); } void destroy(PersistableQueue&) {} void create(const PersistableExchange& exchange, const framing::FieldTable&) { exchange.setPersistenceId(nextPersistenceId++); } void destroy(const PersistableExchange&) {} void bind(const PersistableExchange&, const PersistableQueue&, const std::string&, const framing::FieldTable&) {} void unbind(const PersistableExchange&, const PersistableQueue&, const std::string&, const framing::FieldTable&) {} void create(const PersistableConfig& config) { config.setPersistenceId(nextPersistenceId++); } void destroy(const PersistableConfig&) {} void stage(const boost::intrusive_ptr&) {} void destroy(PersistableMessage&) {} void appendContent(const boost::intrusive_ptr&, const std::string&) {} void loadContent(const qpid::broker::PersistableQueue&, const boost::intrusive_ptr&, std::string&, uint64_t, uint32_t) { throw qpid::framing::InternalErrorException("Can't load content; persistence not enabled"); } void flush(const qpid::broker::PersistableQueue&) {} uint32_t outstandingQueueAIO(const PersistableQueue&) { return 0; } std::auto_ptr begin() { return std::auto_ptr(new SimpleDummyCtxt()); } std::auto_ptr begin(const std::string& xid) { return std::auto_ptr(new DummyCtxt(xid)); } void prepare(TPCTransactionContext& ctxt) { prepared.insert(DummyCtxt::getXid(ctxt)); } void commit(TransactionContext& ctxt) { prepared.erase(DummyCtxt::getXid(ctxt)); } void abort(TransactionContext& ctxt) { prepared.erase(DummyCtxt::getXid(ctxt)); } void collectPreparedXids(std::set& out) { out.insert(prepared.begin(), prepared.end()); } void recover(RecoveryManager&) {} }; QPID_AUTO_TEST_CASE(testLVQOrdering){ client::QueueOptions args; // set queue mode args.setOrdering(client::LVQ); Queue::shared_ptr queue(new Queue("my-queue", true )); queue->configure(args); intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "B"); intrusive_ptr msg3 = create_message("e", "C"); intrusive_ptr msg4 = create_message("e", "D"); intrusive_ptr received; //set deliever match for LVQ a,b,c,a string key; args.getLVQKey(key); BOOST_CHECK_EQUAL(key, "qpid.LVQ_key"); msg1->insertCustomProperty(key,"a"); msg2->insertCustomProperty(key,"b"); msg3->insertCustomProperty(key,"c"); msg4->insertCustomProperty(key,"a"); //enqueue 4 message queue->deliver(msg1); queue->deliver(msg2); queue->deliver(msg3); queue->deliver(msg4); BOOST_CHECK_EQUAL(queue->getMessageCount(), 3u); received = queue->get().payload; BOOST_CHECK_EQUAL(msg4.get(), received.get()); received = queue->get().payload; BOOST_CHECK_EQUAL(msg2.get(), received.get()); received = queue->get().payload; BOOST_CHECK_EQUAL(msg3.get(), received.get()); intrusive_ptr msg5 = create_message("e", "A"); intrusive_ptr msg6 = create_message("e", "B"); intrusive_ptr msg7 = create_message("e", "C"); msg5->insertCustomProperty(key,"a"); msg6->insertCustomProperty(key,"b"); msg7->insertCustomProperty(key,"c"); queue->deliver(msg5); queue->deliver(msg6); queue->deliver(msg7); BOOST_CHECK_EQUAL(queue->getMessageCount(), 3u); received = queue->get().payload; BOOST_CHECK_EQUAL(msg5.get(), received.get()); received = queue->get().payload; BOOST_CHECK_EQUAL(msg6.get(), received.get()); received = queue->get().payload; BOOST_CHECK_EQUAL(msg7.get(), received.get()); } QPID_AUTO_TEST_CASE(testLVQEmptyKey){ client::QueueOptions args; // set queue mode args.setOrdering(client::LVQ); Queue::shared_ptr queue(new Queue("my-queue", true )); queue->configure(args); intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "B"); string key; args.getLVQKey(key); BOOST_CHECK_EQUAL(key, "qpid.LVQ_key"); msg1->insertCustomProperty(key,"a"); queue->deliver(msg1); queue->deliver(msg2); BOOST_CHECK_EQUAL(queue->getMessageCount(), 2u); } QPID_AUTO_TEST_CASE(testLVQAcquire){ client::QueueOptions args; // set queue mode args.setOrdering(client::LVQ); // disable flow control, as this test violates the enqueue/dequeue sequence. args.setInt(QueueFlowLimit::flowStopCountKey, 0); Queue::shared_ptr queue(new Queue("my-queue", true )); queue->configure(args); intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "B"); intrusive_ptr msg3 = create_message("e", "C"); intrusive_ptr msg4 = create_message("e", "D"); intrusive_ptr msg5 = create_message("e", "F"); intrusive_ptr msg6 = create_message("e", "G"); //set deliever match for LVQ a,b,c,a string key; args.getLVQKey(key); BOOST_CHECK_EQUAL(key, "qpid.LVQ_key"); msg1->insertCustomProperty(key,"a"); msg2->insertCustomProperty(key,"b"); msg3->insertCustomProperty(key,"c"); msg4->insertCustomProperty(key,"a"); msg5->insertCustomProperty(key,"b"); msg6->insertCustomProperty(key,"c"); //enqueue 4 message queue->deliver(msg1); queue->deliver(msg2); queue->deliver(msg3); queue->deliver(msg4); BOOST_CHECK_EQUAL(queue->getMessageCount(), 3u); framing::SequenceNumber sequence(1); QueuedMessage qmsg(queue.get(), msg1, sequence); QueuedMessage qmsg2(queue.get(), msg2, ++sequence); framing::SequenceNumber sequence1(10); QueuedMessage qmsg3(queue.get(), 0, sequence1); TestConsumer::shared_ptr dummy(new TestConsumer()); BOOST_CHECK(!queue->acquire(qmsg, dummy->getName())); BOOST_CHECK(queue->acquire(qmsg2, dummy->getName())); // Acquire the massage again to test failure case. BOOST_CHECK(!queue->acquire(qmsg2, dummy->getName())); BOOST_CHECK(!queue->acquire(qmsg3, dummy->getName())); BOOST_CHECK_EQUAL(queue->getMessageCount(), 2u); queue->deliver(msg5); BOOST_CHECK_EQUAL(queue->getMessageCount(), 3u); // set mode to no browse and check args.setOrdering(client::LVQ_NO_BROWSE); queue->configure(args); TestConsumer::shared_ptr c1(new TestConsumer("test", false)); queue->dispatch(c1); queue->dispatch(c1); queue->dispatch(c1); queue->deliver(msg6); BOOST_CHECK_EQUAL(queue->getMessageCount(), 3u); intrusive_ptr received; received = queue->get().payload; BOOST_CHECK_EQUAL(msg4.get(), received.get()); } QPID_AUTO_TEST_CASE(testLVQMultiQueue){ client::QueueOptions args; // set queue mode args.setOrdering(client::LVQ); Queue::shared_ptr queue1(new Queue("my-queue", true )); Queue::shared_ptr queue2(new Queue("my-queue", true )); intrusive_ptr received; queue1->configure(args); queue2->configure(args); intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "A"); string key; args.getLVQKey(key); BOOST_CHECK_EQUAL(key, "qpid.LVQ_key"); msg1->insertCustomProperty(key,"a"); msg2->insertCustomProperty(key,"a"); queue1->deliver(msg1); queue2->deliver(msg1); queue1->deliver(msg2); received = queue1->get().payload; BOOST_CHECK_EQUAL(msg2.get(), received.get()); received = queue2->get().payload; BOOST_CHECK_EQUAL(msg1.get(), received.get()); } QPID_AUTO_TEST_CASE(testLVQRecover){ /* simulate this 1. start 2 nodes 2. create cluster durable lvq 3. send a transient message to the queue 4. kill one of the nodes (to trigger force persistent behaviour)... 5. then restart it (to turn off force persistent behaviour) 6. send another transient message with same lvq key as in 3 7. kill the second node again (retrigger force persistent) 8. stop and recover the first node */ TestMessageStoreOC testStore; client::QueueOptions args; // set queue mode args.setOrdering(client::LVQ); args.setPersistLastNode(); Queue::shared_ptr queue1(new Queue("my-queue", true, &testStore)); intrusive_ptr received; queue1->create(args); intrusive_ptr msg1 = create_message("e", "A"); intrusive_ptr msg2 = create_message("e", "A"); // 2 string key; args.getLVQKey(key); BOOST_CHECK_EQUAL(key, "qpid.LVQ_key"); msg1->insertCustomProperty(key,"a"); msg2->insertCustomProperty(key,"a"); // 3 queue1->deliver(msg1); // 4 queue1->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 1u); // 5 queue1->clearLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 1u); // 6 queue1->deliver(msg2); BOOST_CHECK_EQUAL(testStore.enqCnt, 1u); queue1->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 2u); BOOST_CHECK_EQUAL(testStore.deqCnt, 1u); } void addMessagesToQueue(uint count, Queue& queue, uint oddTtl = 200, uint evenTtl = 0) { for (uint i = 0; i < count; i++) { intrusive_ptr m = create_message("exchange", "key", i % 2 ? oddTtl : evenTtl); m->computeExpiration(new broker::ExpiryPolicy); queue.deliver(m); } } QPID_AUTO_TEST_CASE(testPurgeExpired) { Queue queue("my-queue"); addMessagesToQueue(10, queue); BOOST_CHECK_EQUAL(queue.getMessageCount(), 10u); ::usleep(300*1000); queue.purgeExpired(0); BOOST_CHECK_EQUAL(queue.getMessageCount(), 5u); } QPID_AUTO_TEST_CASE(testQueueCleaner) { Timer timer; QueueRegistry queues; Queue::shared_ptr queue = queues.declare("my-queue").first; addMessagesToQueue(10, *queue, 200, 400); BOOST_CHECK_EQUAL(queue->getMessageCount(), 10u); QueueCleaner cleaner(queues, &timer); cleaner.start(100 * qpid::sys::TIME_MSEC); ::usleep(300*1000); BOOST_CHECK_EQUAL(queue->getMessageCount(), 5u); ::usleep(300*1000); BOOST_CHECK_EQUAL(queue->getMessageCount(), 0u); } namespace { // helper for group tests void verifyAcquire( Queue::shared_ptr queue, TestConsumer::shared_ptr c, std::deque& results, const std::string& expectedGroup, const int expectedId ) { BOOST_CHECK(queue->dispatch(c)); results.push_back(c->last); std::string group = c->last.payload->getProperties()->getApplicationHeaders().getAsString("GROUP-ID"); int id = c->last.payload->getProperties()->getApplicationHeaders().getAsInt("MY-ID"); BOOST_CHECK_EQUAL( group, expectedGroup ); BOOST_CHECK_EQUAL( id, expectedId ); } } QPID_AUTO_TEST_CASE(testGroupsMultiConsumer) { // // Verify that consumers of grouped messages own the groups once a message is acquired, // and release the groups once all acquired messages have been dequeued or requeued // FieldTable args; Queue::shared_ptr queue(new Queue("my_queue", true)); args.setString("qpid.group_header_key", "GROUP-ID"); args.setInt("qpid.shared_msg_group", 1); queue->configure(args); std::string groups[] = { std::string("a"), std::string("a"), std::string("a"), std::string("b"), std::string("b"), std::string("b"), std::string("c"), std::string("c"), std::string("c") }; for (int i = 0; i < 9; ++i) { intrusive_ptr msg = create_message("e", "A"); msg->insertCustomProperty("GROUP-ID", groups[i]); msg->insertCustomProperty("MY-ID", i); queue->deliver(msg); } // Queue = a-0, a-1, a-2, b-3, b-4, b-5, c-6, c-7, c-8... // Owners= ---, ---, ---, ---, ---, ---, ---, ---, ---, BOOST_CHECK_EQUAL(uint32_t(9), queue->getMessageCount()); TestConsumer::shared_ptr c1(new TestConsumer("C1")); TestConsumer::shared_ptr c2(new TestConsumer("C2")); queue->consume(c1); queue->consume(c2); std::deque dequeMeC1; std::deque dequeMeC2; verifyAcquire(queue, c1, dequeMeC1, "a", 0 ); // c1 now owns group "a" (acquire a-0) verifyAcquire(queue, c2, dequeMeC2, "b", 3 ); // c2 should now own group "b" (acquire b-3) // now let c1 complete the 'a-0' message - this should free the 'a' group queue->dequeue( 0, dequeMeC1.front() ); dequeMeC1.pop_front(); // Queue = a-1, a-2, b-3, b-4, b-5, c-6, c-7, c-8... // Owners= ---, ---, ^C2, ^C2, ^C2, ---, ---, --- // now c2 should pick up the next 'a-1', since it is oldest free verifyAcquire(queue, c2, dequeMeC2, "a", 1 ); // c2 should now own groups "a" and "b" // Queue = a-1, a-2, b-3, b-4, b-5, c-6, c-7, c-8... // Owners= ^C2, ^C2, ^C2, ^C2, ^C2, ---, ---, --- // c1 should only be able to snarf up the first "c" message now... verifyAcquire(queue, c1, dequeMeC1, "c", 6 ); // should skip to the first "c" // Queue = a-1, a-2, b-3, b-4, b-5, c-6, c-7, c-8... // Owners= ^C2, ^C2, ^C2, ^C2, ^C2, ^C1, ^C1, ^C1 // hmmm... what if c2 now dequeues "b-3"? (now only has a-1 acquired) queue->dequeue( 0, dequeMeC2.front() ); dequeMeC2.pop_front(); // Queue = a-1, a-2, b-4, b-5, c-6, c-7, c-8... // Owners= ^C2, ^C2, ---, ---, ^C1, ^C1, ^C1 // b group is free, c is owned by c1 - c1's next get should grab 'b-4' verifyAcquire(queue, c1, dequeMeC1, "b", 4 ); // Queue = a-1, a-2, b-4, b-5, c-6, c-7, c-8... // Owners= ^C2, ^C2, ^C1, ^C1, ^C1, ^C1, ^C1 // c2 can now only grab a-2, and that's all verifyAcquire(queue, c2, dequeMeC2, "a", 2 ); // now C2 can't get any more, since C1 owns "b" and "c" group... bool gotOne = queue->dispatch(c2); BOOST_CHECK( !gotOne ); // hmmm... what if c1 now dequeues "c-6"? (now only own's b-4) queue->dequeue( 0, dequeMeC1.front() ); dequeMeC1.pop_front(); // Queue = a-1, a-2, b-4, b-5, c-7, c-8... // Owners= ^C2, ^C2, ^C1, ^C1, ---, --- // c2 can now grab c-7 verifyAcquire(queue, c2, dequeMeC2, "c", 7 ); // Queue = a-1, a-2, b-4, b-5, c-7, c-8... // Owners= ^C2, ^C2, ^C1, ^C1, ^C2, ^C2 // what happens if C-2 "requeues" a-1 and a-2? queue->requeue( dequeMeC2.front() ); dequeMeC2.pop_front(); queue->requeue( dequeMeC2.front() ); dequeMeC2.pop_front(); // now just has c-7 acquired // Queue = a-1, a-2, b-4, b-5, c-7, c-8... // Owners= ---, ---, ^C1, ^C1, ^C2, ^C2 // now c1 will grab a-1 and a-2... verifyAcquire(queue, c1, dequeMeC1, "a", 1 ); verifyAcquire(queue, c1, dequeMeC1, "a", 2 ); // Queue = a-1, a-2, b-4, b-5, c-7, c-8... // Owners= ^C1, ^C1, ^C1, ^C1, ^C2, ^C2 // c2 can now acquire c-8 only verifyAcquire(queue, c2, dequeMeC2, "c", 8 ); // and c1 can get b-5 verifyAcquire(queue, c1, dequeMeC1, "b", 5 ); // should be no more acquire-able for anyone now: gotOne = queue->dispatch(c1); BOOST_CHECK( !gotOne ); gotOne = queue->dispatch(c2); BOOST_CHECK( !gotOne ); // requeue all of C1's acquired messages, then cancel C1 while (!dequeMeC1.empty()) { queue->requeue(dequeMeC1.front()); dequeMeC1.pop_front(); } queue->cancel(c1); // Queue = a-1, a-2, b-4, b-5, c-7, c-8... // Owners= ---, ---, ---, ---, ^C2, ^C2 // b-4, a-1, a-2, b-5 all should be available, right? verifyAcquire(queue, c2, dequeMeC2, "a", 1 ); while (!dequeMeC2.empty()) { queue->dequeue(0, dequeMeC2.front()); dequeMeC2.pop_front(); } // Queue = a-2, b-4, b-5 // Owners= ---, ---, --- TestConsumer::shared_ptr c3(new TestConsumer("C3")); std::deque dequeMeC3; verifyAcquire(queue, c3, dequeMeC3, "a", 2 ); verifyAcquire(queue, c2, dequeMeC2, "b", 4 ); // Queue = a-2, b-4, b-5 // Owners= ^C3, ^C2, ^C2 gotOne = queue->dispatch(c3); BOOST_CHECK( !gotOne ); verifyAcquire(queue, c2, dequeMeC2, "b", 5 ); while (!dequeMeC2.empty()) { queue->dequeue(0, dequeMeC2.front()); dequeMeC2.pop_front(); } // Queue = a-2, // Owners= ^C3, intrusive_ptr msg = create_message("e", "A"); msg->insertCustomProperty("GROUP-ID", "a"); msg->insertCustomProperty("MY-ID", 9); queue->deliver(msg); // Queue = a-2, a-9 // Owners= ^C3, ^C3 gotOne = queue->dispatch(c2); BOOST_CHECK( !gotOne ); msg = create_message("e", "A"); msg->insertCustomProperty("GROUP-ID", "b"); msg->insertCustomProperty("MY-ID", 10); queue->deliver(msg); // Queue = a-2, a-9, b-10 // Owners= ^C3, ^C3, ---- verifyAcquire(queue, c2, dequeMeC2, "b", 10 ); verifyAcquire(queue, c3, dequeMeC3, "a", 9 ); gotOne = queue->dispatch(c3); BOOST_CHECK( !gotOne ); queue->cancel(c2); queue->cancel(c3); } QPID_AUTO_TEST_CASE(testGroupsMultiConsumerDefaults) { // // Verify that the same default group name is automatically applied to messages that // do not specify a group name. // FieldTable args; Queue::shared_ptr queue(new Queue("my_queue", true)); args.setString("qpid.group_header_key", "GROUP-ID"); args.setInt("qpid.shared_msg_group", 1); queue->configure(args); for (int i = 0; i < 3; ++i) { intrusive_ptr msg = create_message("e", "A"); // no "GROUP-ID" header msg->insertCustomProperty("MY-ID", i); queue->deliver(msg); } // Queue = 0, 1, 2 BOOST_CHECK_EQUAL(uint32_t(3), queue->getMessageCount()); TestConsumer::shared_ptr c1(new TestConsumer("C1")); TestConsumer::shared_ptr c2(new TestConsumer("C2")); queue->consume(c1); queue->consume(c2); std::deque dequeMeC1; std::deque dequeMeC2; queue->dispatch(c1); // c1 now owns default group (acquired 0) dequeMeC1.push_back(c1->last); int id = c1->last.payload->getProperties()->getApplicationHeaders().getAsInt("MY-ID"); BOOST_CHECK_EQUAL( id, 0 ); bool gotOne = queue->dispatch(c2); // c2 should get nothing BOOST_CHECK( !gotOne ); queue->dispatch(c1); // c1 now acquires 1 dequeMeC1.push_back(c1->last); id = c1->last.payload->getProperties()->getApplicationHeaders().getAsInt("MY-ID"); BOOST_CHECK_EQUAL( id, 1 ); gotOne = queue->dispatch(c2); // c2 should still get nothing BOOST_CHECK( !gotOne ); while (!dequeMeC1.empty()) { queue->dequeue(0, dequeMeC1.front()); dequeMeC1.pop_front(); } // now default group should be available... queue->dispatch(c2); // c2 now owns default group (acquired 2) id = c2->last.payload->getProperties()->getApplicationHeaders().getAsInt("MY-ID"); BOOST_CHECK_EQUAL( id, 2 ); gotOne = queue->dispatch(c1); // c1 should get nothing BOOST_CHECK( !gotOne ); queue->cancel(c1); queue->cancel(c2); } QPID_AUTO_TEST_CASE(testMultiQueueLastNode){ TestMessageStoreOC testStore; client::QueueOptions args; args.setPersistLastNode(); Queue::shared_ptr queue1(new Queue("queue1", true, &testStore )); queue1->create(args); Queue::shared_ptr queue2(new Queue("queue2", true, &testStore )); queue2->create(args); intrusive_ptr msg1 = create_message("e", "A"); queue1->deliver(msg1); queue2->deliver(msg1); //change mode queue1->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 1u); queue2->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 2u); // check they don't get stored twice queue1->setLastNodeFailure(); queue2->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 2u); intrusive_ptr msg2 = create_message("e", "B"); queue1->deliver(msg2); queue2->deliver(msg2); queue1->clearLastNodeFailure(); queue2->clearLastNodeFailure(); // check only new messages get forced queue1->setLastNodeFailure(); queue2->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 4u); // check no failure messages are stored queue1->clearLastNodeFailure(); queue2->clearLastNodeFailure(); intrusive_ptr msg3 = create_message("e", "B"); queue1->deliver(msg3); queue2->deliver(msg3); BOOST_CHECK_EQUAL(testStore.enqCnt, 4u); queue1->setLastNodeFailure(); queue2->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 6u); /** * TODO: Fix or replace the following test which incorrectly requeues a * message that was never on the queue in the first place. This relied on * internal details not part of the queue abstraction. // check requeue 1 intrusive_ptr msg4 = create_message("e", "C"); intrusive_ptr msg5 = create_message("e", "D"); framing::SequenceNumber sequence(1); QueuedMessage qmsg1(queue1.get(), msg4, sequence); QueuedMessage qmsg2(queue2.get(), msg5, ++sequence); queue1->requeue(qmsg1); BOOST_CHECK_EQUAL(testStore.enqCnt, 7u); // check requeue 2 queue2->clearLastNodeFailure(); queue2->requeue(qmsg2); BOOST_CHECK_EQUAL(testStore.enqCnt, 7u); queue2->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 8u); queue2->clearLastNodeFailure(); queue2->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 8u); */ } QPID_AUTO_TEST_CASE(testLastNodeRecoverAndFail){ /* simulate this: 1. start two nodes 2. create cluster durable queue and add some messages 3. kill one node (trigger force-persistent behaviour) 4. stop and recover remaining node 5. add another node 6. kill that new node again make sure that an attempt to re-enqueue a message does not happen which will result in the last man standing exiting with an error. we need to make sure that recover is safe, i.e. messages are not requeued to the store. */ TestMessageStoreOC testStore; client::QueueOptions args; // set queue mode args.setPersistLastNode(); Queue::shared_ptr queue1(new Queue("my-queue", true, &testStore)); intrusive_ptr received; queue1->create(args); // check requeue 1 intrusive_ptr msg1 = create_message("e", "C"); intrusive_ptr msg2 = create_message("e", "D"); queue1->recover(msg1); queue1->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 0u); queue1->clearLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 0u); queue1->deliver(msg2); BOOST_CHECK_EQUAL(testStore.enqCnt, 0u); queue1->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 1u); } QPID_AUTO_TEST_CASE(testLastNodeJournalError){ /* simulate store exception going into last node standing */ TestMessageStoreOC testStore; client::QueueOptions args; // set queue mode args.setPersistLastNode(); Queue::shared_ptr queue1(new Queue("my-queue", true, &testStore)); intrusive_ptr received; queue1->configure(args); // check requeue 1 intrusive_ptr msg1 = create_message("e", "C"); queue1->deliver(msg1); testStore.createError(); ScopedSuppressLogging sl; // Suppress messages for expected errors. queue1->setLastNodeFailure(); BOOST_CHECK_EQUAL(testStore.enqCnt, 0u); } intrusive_ptr mkMsg(MessageStore& store, std::string content = "", bool durable = false) { intrusive_ptr msg = MessageUtils::createMessage("", "", durable); if (content.size()) MessageUtils::addContent(msg, content); msg->setStore(&store); return msg; } QPID_AUTO_TEST_CASE(testFlowToDiskBlocking){ TestMessageStoreOC testStore; client::QueueOptions args0; // No size policy client::QueueOptions args1; args1.setSizePolicy(FLOW_TO_DISK, 0, 1); client::QueueOptions args2; args2.setSizePolicy(FLOW_TO_DISK, 0, 2); // --- Fanout exchange bound to single transient queue ------------------------------------------------------------- FanOutExchange sbtFanout1("sbtFanout1", false, args0); // single binding to transient queue Queue::shared_ptr tq1(new Queue("tq1", true)); // transient w/ limit tq1->configure(args1); sbtFanout1.bind(tq1, "", 0); intrusive_ptr msg01 = mkMsg(testStore, std::string(5, 'X')); // transient w/ content DeliverableMessage dmsg01(msg01); sbtFanout1.route(dmsg01); // Brings queue 1 to capacity limit msg01->tryReleaseContent(); BOOST_CHECK_EQUAL(msg01->isContentReleased(), false); BOOST_CHECK_EQUAL(1u, tq1->getMessageCount()); intrusive_ptr msg02 = mkMsg(testStore, std::string(5, 'X')); // transient w/ content DeliverableMessage dmsg02(msg02); { ScopedSuppressLogging sl; // suppress expected error messages. BOOST_CHECK_THROW(sbtFanout1.route(dmsg02), ResourceLimitExceededException); } msg02->tryReleaseContent(); BOOST_CHECK_EQUAL(msg02->isContentReleased(), false); BOOST_CHECK_EQUAL(1u, tq1->getMessageCount()); intrusive_ptr msg03 = mkMsg(testStore, std::string(5, 'X'), true); // durable w/ content DeliverableMessage dmsg03(msg03); { ScopedSuppressLogging sl; // suppress expected error messages. BOOST_CHECK_THROW(sbtFanout1.route(dmsg03), ResourceLimitExceededException); } msg03->tryReleaseContent(); BOOST_CHECK_EQUAL(msg03->isContentReleased(), false); BOOST_CHECK_EQUAL(1u, tq1->getMessageCount()); intrusive_ptr msg04 = mkMsg(testStore); // transient no content DeliverableMessage dmsg04(msg04); { ScopedSuppressLogging sl; // suppress expected error messages. BOOST_CHECK_THROW(sbtFanout1.route(dmsg04), ResourceLimitExceededException); } msg04->tryReleaseContent(); BOOST_CHECK_EQUAL(msg04->isContentReleased(), false); BOOST_CHECK_EQUAL(1u, tq1->getMessageCount()); intrusive_ptr msg05 = mkMsg(testStore, "", true); // durable no content DeliverableMessage dmsg05(msg05); { ScopedSuppressLogging sl; // suppress expected error messages. BOOST_CHECK_THROW(sbtFanout1.route(dmsg05), ResourceLimitExceededException); } msg05->tryReleaseContent(); BOOST_CHECK_EQUAL(msg05->isContentReleased(), false); BOOST_CHECK_EQUAL(1u, tq1->getMessageCount()); // --- Fanout exchange bound to single durable queue --------------------------------------------------------------- FanOutExchange sbdFanout2("sbdFanout2", false, args0); // single binding to durable queue Queue::shared_ptr dq2(new Queue("dq2", true, &testStore)); // durable w/ limit dq2->configure(args1); sbdFanout2.bind(dq2, "", 0); intrusive_ptr msg06 = mkMsg(testStore, std::string(5, 'X')); // transient w/ content DeliverableMessage dmsg06(msg06); sbdFanout2.route(dmsg06); // Brings queue 2 to capacity limit msg06->tryReleaseContent(); BOOST_CHECK_EQUAL(msg06->isContentReleased(), false); BOOST_CHECK_EQUAL(1u, dq2->getMessageCount()); intrusive_ptr msg07 = mkMsg(testStore, std::string(5, 'X')); // transient w/ content DeliverableMessage dmsg07(msg07); sbdFanout2.route(dmsg07); msg07->tryReleaseContent(); BOOST_CHECK_EQUAL(msg07->isContentReleased(), true); BOOST_CHECK_EQUAL(2u, dq2->getMessageCount()); intrusive_ptr msg08 = mkMsg(testStore, std::string(5, 'X'), true); // durable w/ content DeliverableMessage dmsg08(msg08); sbdFanout2.route(dmsg08); msg08->tryReleaseContent(); BOOST_CHECK_EQUAL(msg08->isContentReleased(), true); BOOST_CHECK_EQUAL(3u, dq2->getMessageCount()); intrusive_ptr msg09 = mkMsg(testStore); // transient no content DeliverableMessage dmsg09(msg09); sbdFanout2.route(dmsg09); msg09->tryReleaseContent(); BOOST_CHECK_EQUAL(msg09->isContentReleased(), true); BOOST_CHECK_EQUAL(4u, dq2->getMessageCount()); intrusive_ptr msg10 = mkMsg(testStore, "", true); // durable no content DeliverableMessage dmsg10(msg10); sbdFanout2.route(dmsg10); msg10->tryReleaseContent(); BOOST_CHECK_EQUAL(msg10->isContentReleased(), true); BOOST_CHECK_EQUAL(5u, dq2->getMessageCount()); // --- Fanout exchange bound to multiple durable queues ------------------------------------------------------------ FanOutExchange mbdFanout3("mbdFanout3", false, args0); // multiple bindings to durable queues Queue::shared_ptr dq3(new Queue("dq3", true, &testStore)); // durable w/ limit 2 dq3->configure(args2); mbdFanout3.bind(dq3, "", 0); Queue::shared_ptr dq4(new Queue("dq4", true, &testStore)); // durable w/ limit 1 dq4->configure(args1); mbdFanout3.bind(dq4, "", 0); Queue::shared_ptr dq5(new Queue("dq5", true, &testStore)); // durable no limit dq5->configure(args0); mbdFanout3.bind(dq5, "", 0); intrusive_ptr msg11 = mkMsg(testStore, std::string(5, 'X')); // transient w/ content DeliverableMessage dmsg11(msg11); mbdFanout3.route(dmsg11); // Brings queues 3 and 4 to capacity limit msg11->tryReleaseContent(); BOOST_CHECK_EQUAL(msg11->isContentReleased(), false); BOOST_CHECK_EQUAL(1u, dq3->getMessageCount()); BOOST_CHECK_EQUAL(1u, dq4->getMessageCount()); BOOST_CHECK_EQUAL(1u, dq5->getMessageCount()); intrusive_ptr msg12 = mkMsg(testStore, std::string(5, 'X')); // transient w/ content DeliverableMessage dmsg12(msg12); mbdFanout3.route(dmsg12); msg12->tryReleaseContent(); BOOST_CHECK_EQUAL(msg12->isContentReleased(), false); // XXXX - consequence of transient msg multi-queue ftd policy-handling limitations, fix in broker at some point! BOOST_CHECK_EQUAL(2u, dq3->getMessageCount()); BOOST_CHECK_EQUAL(2u, dq4->getMessageCount()); BOOST_CHECK_EQUAL(2u, dq5->getMessageCount()); intrusive_ptr msg13 = mkMsg(testStore, std::string(5, 'X'), true); // durable w/ content DeliverableMessage dmsg13(msg13); mbdFanout3.route(dmsg13); msg13->tryReleaseContent(); BOOST_CHECK_EQUAL(msg13->isContentReleased(), true); BOOST_CHECK_EQUAL(3u, dq3->getMessageCount()); BOOST_CHECK_EQUAL(3u, dq4->getMessageCount()); BOOST_CHECK_EQUAL(3u, dq5->getMessageCount()); intrusive_ptr msg14 = mkMsg(testStore); // transient no content DeliverableMessage dmsg14(msg14); mbdFanout3.route(dmsg14); msg14->tryReleaseContent(); BOOST_CHECK_EQUAL(msg14->isContentReleased(), false); // XXXX - consequence of transient msg multi-queue ftd policy-handling limitations, fix in broker at some point! BOOST_CHECK_EQUAL(4u, dq3->getMessageCount()); BOOST_CHECK_EQUAL(4u, dq4->getMessageCount()); BOOST_CHECK_EQUAL(4u, dq5->getMessageCount()); intrusive_ptr msg15 = mkMsg(testStore, "", true); // durable no content DeliverableMessage dmsg15(msg15); mbdFanout3.route(dmsg15); msg15->tryReleaseContent(); BOOST_CHECK_EQUAL(msg15->isContentReleased(), true); BOOST_CHECK_EQUAL(5u, dq3->getMessageCount()); BOOST_CHECK_EQUAL(5u, dq4->getMessageCount()); BOOST_CHECK_EQUAL(5u, dq5->getMessageCount()); // Bind a transient queue, this should block the release of any further messages. // Note: this will result in a violation of the count policy of dq3 and dq4 - but this // is expected until a better overall multi-queue design is implemented. Similarly // for the other tests in this section. Queue::shared_ptr tq6(new Queue("tq6", true)); // transient no limit tq6->configure(args0); mbdFanout3.bind(tq6, "", 0); intrusive_ptr msg16 = mkMsg(testStore, std::string(5, 'X')); // transient w/ content DeliverableMessage dmsg16(msg16); mbdFanout3.route(dmsg16); msg16->tryReleaseContent(); BOOST_CHECK_EQUAL(msg16->isContentReleased(), false); BOOST_CHECK_EQUAL(6u, dq3->getMessageCount()); BOOST_CHECK_EQUAL(6u, dq4->getMessageCount()); BOOST_CHECK_EQUAL(6u, dq5->getMessageCount()); intrusive_ptr msg17 = mkMsg(testStore, std::string(5, 'X'), true); // durable w/ content DeliverableMessage dmsg17(msg17); mbdFanout3.route(dmsg17); msg17->tryReleaseContent(); BOOST_CHECK_EQUAL(msg17->isContentReleased(), false); BOOST_CHECK_EQUAL(7u, dq3->getMessageCount()); BOOST_CHECK_EQUAL(7u, dq4->getMessageCount()); BOOST_CHECK_EQUAL(7u, dq5->getMessageCount()); intrusive_ptr msg18 = mkMsg(testStore); // transient no content DeliverableMessage dmsg18(msg18); mbdFanout3.route(dmsg18); msg18->tryReleaseContent(); BOOST_CHECK_EQUAL(msg18->isContentReleased(), false); BOOST_CHECK_EQUAL(8u, dq3->getMessageCount()); BOOST_CHECK_EQUAL(8u, dq4->getMessageCount()); BOOST_CHECK_EQUAL(8u, dq5->getMessageCount()); intrusive_ptr msg19 = mkMsg(testStore, "", true); // durable no content DeliverableMessage dmsg19(msg19); mbdFanout3.route(dmsg19); msg19->tryReleaseContent(); BOOST_CHECK_EQUAL(msg19->isContentReleased(), false); BOOST_CHECK_EQUAL(9u, dq3->getMessageCount()); BOOST_CHECK_EQUAL(9u, dq4->getMessageCount()); BOOST_CHECK_EQUAL(9u, dq5->getMessageCount()); // --- Fanout exchange bound to multiple durable and transient queues ---------------------------------------------- FanOutExchange mbmFanout4("mbmFanout4", false, args0); // multiple bindings to durable/transient queues Queue::shared_ptr dq7(new Queue("dq7", true, &testStore)); // durable no limit dq7->configure(args0); mbmFanout4.bind(dq7, "", 0); Queue::shared_ptr dq8(new Queue("dq8", true, &testStore)); // durable w/ limit dq8->configure(args1); mbmFanout4.bind(dq8, "", 0); Queue::shared_ptr tq9(new Queue("tq9", true)); // transient no limit tq9->configure(args0); mbmFanout4.bind(tq9, "", 0); intrusive_ptr msg20 = mkMsg(testStore, std::string(5, 'X')); // transient w/ content DeliverableMessage dmsg20(msg20); mbmFanout4.route(dmsg20); // Brings queue 7 to capacity limit msg20->tryReleaseContent(); BOOST_CHECK_EQUAL(msg20->isContentReleased(), false); BOOST_CHECK_EQUAL(1u, dq7->getMessageCount()); BOOST_CHECK_EQUAL(1u, dq8->getMessageCount()); BOOST_CHECK_EQUAL(1u, tq9->getMessageCount()); intrusive_ptr msg21 = mkMsg(testStore, std::string(5, 'X')); // transient w/ content DeliverableMessage dmsg21(msg21); mbmFanout4.route(dmsg21); msg21->tryReleaseContent(); BOOST_CHECK_EQUAL(msg21->isContentReleased(), false); BOOST_CHECK_EQUAL(2u, dq7->getMessageCount()); // over limit BOOST_CHECK_EQUAL(2u, dq8->getMessageCount()); BOOST_CHECK_EQUAL(2u, tq9->getMessageCount()); intrusive_ptr msg22 = mkMsg(testStore, std::string(5, 'X'), true); // durable w/ content DeliverableMessage dmsg22(msg22); mbmFanout4.route(dmsg22); msg22->tryReleaseContent(); BOOST_CHECK_EQUAL(msg22->isContentReleased(), false); BOOST_CHECK_EQUAL(3u, dq7->getMessageCount()); // over limit BOOST_CHECK_EQUAL(3u, dq8->getMessageCount()); // over limit BOOST_CHECK_EQUAL(3u, tq9->getMessageCount()); intrusive_ptr msg23 = mkMsg(testStore); // transient no content DeliverableMessage dmsg23(msg23); mbmFanout4.route(dmsg23); msg23->tryReleaseContent(); BOOST_CHECK_EQUAL(msg23->isContentReleased(), false); BOOST_CHECK_EQUAL(4u, dq7->getMessageCount()); // over limit BOOST_CHECK_EQUAL(4u, dq8->getMessageCount()); // over limit BOOST_CHECK_EQUAL(4u, tq9->getMessageCount()); intrusive_ptr msg24 = mkMsg(testStore, "", true); // durable no content DeliverableMessage dmsg24(msg24); mbmFanout4.route(dmsg24); msg24->tryReleaseContent(); BOOST_CHECK_EQUAL(msg24->isContentReleased(), false); BOOST_CHECK_EQUAL(5u, dq7->getMessageCount()); // over limit BOOST_CHECK_EQUAL(5u, dq8->getMessageCount()); // over limit BOOST_CHECK_EQUAL(5u, tq9->getMessageCount()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/HeadersExchangeTest.cpp0000664000076400007640000000616411252003060021443 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/broker/HeadersExchange.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/FieldValue.h" #include "unit_test.h" using namespace qpid::broker; using namespace qpid::framing; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(HeadersExchangeTestSuite) QPID_AUTO_TEST_CASE(testMatchAll) { FieldTable b, m, n; b.setString("x-match", "all"); b.setString("foo", "FOO"); b.setInt("n", 42); m.setString("foo", "FOO"); m.setInt("n", 42); BOOST_CHECK(HeadersExchange::match(b, m)); // Ignore extras. m.setString("extra", "x"); BOOST_CHECK(HeadersExchange::match(b, m)); // Fail mismatch, wrong value. m.setString("foo", "NotFoo"); BOOST_CHECK(!HeadersExchange::match(b, m)); // Fail mismatch, missing value n.setInt("n", 42); n.setString("extra", "x"); BOOST_CHECK(!HeadersExchange::match(b, n)); } QPID_AUTO_TEST_CASE(testMatchAny) { FieldTable b, m, n; b.setString("x-match", "any"); b.setString("foo", "FOO"); b.setInt("n", 42); m.setString("foo", "FOO"); BOOST_CHECK(!HeadersExchange::match(b, n)); BOOST_CHECK(HeadersExchange::match(b, m)); m.setInt("n", 42); BOOST_CHECK(HeadersExchange::match(b, m)); } QPID_AUTO_TEST_CASE(testMatchEmptyValue) { FieldTable b, m; b.setString("x-match", "all"); b.set("foo", FieldTable::ValuePtr()); b.set("n", FieldTable::ValuePtr()); BOOST_CHECK(!HeadersExchange::match(b, m)); m.setString("foo", "blah"); m.setInt("n", 123); } QPID_AUTO_TEST_CASE(testMatchEmptyArgs) { FieldTable b, m; m.setString("foo", "FOO"); b.setString("x-match", "all"); BOOST_CHECK(HeadersExchange::match(b, m)); b.setString("x-match", "any"); BOOST_CHECK(!HeadersExchange::match(b, m)); } QPID_AUTO_TEST_CASE(testMatchNoXMatch) { FieldTable b, m; b.setString("foo", "FOO"); m.setString("foo", "FOO"); BOOST_CHECK(!HeadersExchange::match(b, m)); } QPID_AUTO_TEST_CASE(testBindNoXMatch) { HeadersExchange exchange("test"); Queue::shared_ptr queue; std::string key; FieldTable args; try { //just checking this doesn't cause assertion etc exchange.bind(queue, key, &args); } catch(qpid::Exception&) { //expected } } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/sasl_fed_ex_queue0000775000076400007640000000153311532765114020502 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh ${srcdir}/sasl_fed_ex queue qpidc-0.16/src/tests/run-unit-tests0000775000076400007640000000314311654250703017740 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Library names (without path or .so) and CppUnit test paths can be # specified on the command line or in env var UNIT_TESTS. For example: # # Selected test classes: # ./run-unit-tests ValueTest ClientChannelTest # # Individual test method # ./run-unit-tests ValueTest :ValueTest::testStringValueEquals # # Build and run selected tests: # make check TESTS=run-unit-tests UNIT_TESTS=ClientChannelTest # for u in $* $UNIT_TESTS ; do case $u in :*) TEST_ARGS="$TEST_ARGS $u" ;; # A test path. *) TEST_ARGS="$TEST_ARGS .libs/$u.so" ;; # A test library. esac done test -z "$TEST_ARGS" && TEST_ARGS=".libs/*Test.so" test -z "$srcdir" && srcdir=. # libdlclose_noop prevents unloading symbols needed for valgrind output. export LD_PRELOAD=.libs/libdlclose_noop.so source $srcdir/run_test DllPlugInTester -c -b $TEST_ARGS qpidc-0.16/src/tests/restart_cluster0000775000076400007640000000222311654250703020242 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Re-start a cluster on the local host. srcdir=`dirname $0` $srcdir/stop_cluster exec $srcdir/start_cluster "$@" #!/bin/bash # Re-start a cluster on the local host. srcdir=`dirname $0` $srcdir/stop_cluster exec $srcdir/start_cluster "$@" #!/bin/bash # Re-start a cluster on the local host. srcdir=`dirname $0` $srcdir/stop_cluster exec $srcdir/start_cluster "$@" qpidc-0.16/src/tests/HeaderTest.cpp0000664000076400007640000000703011252003060017606 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/amqp_framing.h" #include "qpid/framing/FieldValue.h" #include "unit_test.h" using namespace qpid::framing; using namespace std; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(HeaderTestSuite) QPID_AUTO_TEST_CASE(testGenericProperties) { AMQHeaderBody body; body.get(true)->getApplicationHeaders().setString( "A", "BCDE"); char buff[100]; Buffer wbuffer(buff, 100); body.encode(wbuffer); Buffer rbuffer(buff, 100); AMQHeaderBody body2; body2.decode(rbuffer, body.encodedSize()); MessageProperties* props = body2.get(true); BOOST_CHECK_EQUAL( string("BCDE"), props->getApplicationHeaders().get("A")->get()); } QPID_AUTO_TEST_CASE(testMessageProperties) { AMQFrame out((AMQHeaderBody())); MessageProperties* props1 = out.castBody()->get(true); props1->setContentLength(42); props1->setMessageId(Uuid(true)); props1->setCorrelationId("correlationId"); props1->setReplyTo(ReplyTo("ex","key")); props1->setContentType("contentType"); props1->setContentEncoding("contentEncoding"); props1->setUserId("userId"); props1->setAppId("appId"); char buff[10000]; Buffer wbuffer(buff, 10000); out.encode(wbuffer); Buffer rbuffer(buff, 10000); AMQFrame in; in.decode(rbuffer); MessageProperties* props2 = in.castBody()->get(true); BOOST_CHECK_EQUAL(props1->getContentLength(), props2->getContentLength()); BOOST_CHECK_EQUAL(props1->getMessageId(), props2->getMessageId()); BOOST_CHECK_EQUAL(props1->getCorrelationId(), props2->getCorrelationId()); BOOST_CHECK_EQUAL(props1->getContentType(), props2->getContentType()); BOOST_CHECK_EQUAL(props1->getContentEncoding(), props2->getContentEncoding()); BOOST_CHECK_EQUAL(props1->getUserId(), props2->getUserId()); BOOST_CHECK_EQUAL(props1->getAppId(), props2->getAppId()); } QPID_AUTO_TEST_CASE(testDeliveryProperies) { AMQFrame out((AMQHeaderBody())); DeliveryProperties* props1 = out.castBody()->get(true); props1->setDiscardUnroutable(true); props1->setExchange("foo"); char buff[10000]; Buffer wbuffer(buff, 10000); out.encode(wbuffer); Buffer rbuffer(buff, 10000); AMQFrame in; in.decode(rbuffer); DeliveryProperties* props2 = in.castBody()->get(true); BOOST_CHECK(props2->getDiscardUnroutable()); BOOST_CHECK_EQUAL(string("foo"), props2->getExchange()); BOOST_CHECK(!props2->hasTimestamp()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/python_tests0000775000076400007640000000217511534154741017570 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the python tests. source ./test_env.sh test -d $PYTHON_DIR || { echo "Skipping python tests, no python dir."; exit 0; } QPID_PORT=${QPID_PORT:-5672} PYTHON_TESTS=${PYTHON_TESTS:-$*} FAILING=${FAILING:-/dev/null} python $QPID_PYTHON_TEST -m qpid_tests.broker_0_10 -m qpid.tests -b localhost:$QPID_PORT -I $FAILING $PYTHON_TESTS || exit 1 qpidc-0.16/src/tests/sasl_fed_ex_link_cluster0000775000076400007640000000161211540546671022056 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh source $srcdir/ais_check with_ais_group ${srcdir}/sasl_fed_ex link cluster qpidc-0.16/src/tests/SequenceSet.cpp0000664000076400007640000001127011522550030020007 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/framing/SequenceSet.h" #include "unit_test.h" #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(SequenceSetTestSuite) using namespace qpid::framing; struct RangeExpectations { typedef std::pair Range; typedef std::list Ranges; Ranges ranges; RangeExpectations& expect(const SequenceNumber& start, const SequenceNumber& end) { ranges.push_back(Range(start, end)); return *this; } void operator()(const SequenceNumber& start, const SequenceNumber& end) { BOOST_CHECK(!ranges.empty()); if (!ranges.empty()) { BOOST_CHECK_EQUAL(start, ranges.front().first); BOOST_CHECK_EQUAL(end, ranges.front().second); ranges.pop_front(); } } void check(SequenceSet& set) { set.for_each(*this); BOOST_CHECK(ranges.empty()); } }; QPID_AUTO_TEST_CASE(testAdd) { SequenceSet s; s.add(2); s.add(8,8); s.add(3,5); for (uint32_t i = 0; i <= 1; i++) BOOST_CHECK(!s.contains(i)); for (uint32_t i = 2; i <= 5; i++) BOOST_CHECK(s.contains(i)); for (uint32_t i = 6; i <= 7; i++) BOOST_CHECK(!s.contains(i)); BOOST_CHECK(s.contains(8)); for (uint32_t i = 9; i <= 10; i++) BOOST_CHECK(!s.contains(i)); RangeExpectations().expect(2, 5).expect(8, 8).check(s); SequenceSet t; t.add(6, 10); t.add(s); for (uint32_t i = 0; i <= 1; i++) BOOST_CHECK(!t.contains(i)); for (uint32_t i = 2; i <= 10; i++) BOOST_CHECK_MESSAGE(t.contains(i), t << " contains " << i); RangeExpectations().expect(2, 10).check(t); } QPID_AUTO_TEST_CASE(testAdd2) { SequenceSet s; s.add(7,6); s.add(4,4); s.add(3,10); s.add(2); RangeExpectations().expect(2, 10).check(s); } QPID_AUTO_TEST_CASE(testRemove) { SequenceSet s; SequenceSet t; s.add(0, 10); t.add(0, 10); s.remove(7); s.remove(3, 5); s.remove(9, 10); t.remove(s); for (uint32_t i = 0; i <= 2; i++) { BOOST_CHECK(s.contains(i)); BOOST_CHECK(!t.contains(i)); } for (uint32_t i = 3; i <= 5; i++) { BOOST_CHECK(!s.contains(i)); BOOST_CHECK(t.contains(i)); } BOOST_CHECK(s.contains(6)); BOOST_CHECK(!t.contains(6)); BOOST_CHECK(!s.contains(7)); BOOST_CHECK(t.contains(7)); BOOST_CHECK(s.contains(8)); BOOST_CHECK(!t.contains(8)); for (uint32_t i = 9; i <= 10; i++) { BOOST_CHECK(!s.contains(i)); BOOST_CHECK(t.contains(i)); } RangeExpectations().expect(0, 2).expect(6, 6).expect(8, 8).check(s); RangeExpectations().expect(3, 5).expect(7, 7).expect(9, 10).check(t); } QPID_AUTO_TEST_CASE(testOutOfOrderRemove) { SequenceSet s(2, 20); // test remove from middle: s.remove(7); RangeExpectations().expect(2, 6).expect(8, 20).check(s); s.remove(14); RangeExpectations().expect(2, 6).expect(8, 13).expect(15, 20).check(s); // remove from front of subrange: s.remove(8, 8); RangeExpectations().expect(2, 6).expect(9, 13).expect(15, 20).check(s); // remove from tail of subrange: s.remove(6); RangeExpectations().expect(2, 5).expect(9, 13).expect(15, 20).check(s); // remove across subrange: s.remove(13, 15); RangeExpectations().expect(2, 5).expect(9, 12).expect(16, 20).check(s); // remove within subrange: s.remove(6, 8); RangeExpectations().expect(2, 5).expect(9, 12).expect(16, 20).check(s); // remove overlap subrange tail: s.remove(11, 15); RangeExpectations().expect(2, 5).expect(9, 10).expect(16, 20).check(s); // remove overlap subrange head: s.remove(14, 17); RangeExpectations().expect(2, 5).expect(9, 10).expect(18, 20).check(s); // remove overlap sequence tail: s.remove(20, 22); RangeExpectations().expect(2, 5).expect(9, 10).expect(18, 19).check(s); // remove overlap sequence head: s.remove(1, 3); RangeExpectations().expect(4, 5).expect(9, 10).expect(18, 19).check(s); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/sasl_version.cpp0000664000076400007640000000244111462177217020311 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "sasl/sasl.h" /* Some tests need to distinguish between different versions of SASL. This encodes and outputs the version number as an integer for easy use in testing scripts. */ int main ( ) { // I assume that these are 8-bit quantities.... int sasl_version = (SASL_VERSION_MAJOR << 16) + (SASL_VERSION_MINOR << 8) + SASL_VERSION_STEP; std::cout << sasl_version << std::endl; return 0; } qpidc-0.16/src/tests/DispatcherTest.cpp0000664000076400007640000001366211410311445020521 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Poller.h" #include "qpid/sys/IOHandle.h" #include "qpid/sys/Dispatcher.h" #include "qpid/sys/DispatchHandle.h" #include "qpid/sys/posix/PrivatePosix.h" #include "qpid/sys/Thread.h" #include #include #include #include #include #include #include #include using namespace std; using namespace qpid::sys; namespace qpid { namespace tests { int writeALot(int fd, const string& s) { int bytesWritten = 0; do { errno = 0; int lastWrite = ::write(fd, s.c_str(), s.size()); if ( lastWrite >= 0) { bytesWritten += lastWrite; } } while (errno != EAGAIN); return bytesWritten; } int readALot(int fd) { int bytesRead = 0; char buf[10240]; do { errno = 0; int lastRead = ::read(fd, buf, sizeof(buf)); if ( lastRead >= 0) { bytesRead += lastRead; } } while (errno != EAGAIN); return bytesRead; } int64_t writtenBytes = 0; int64_t readBytes = 0; void writer(DispatchHandle& h, int fd, const string& s) { writtenBytes += writeALot(fd, s); h.rewatch(); } void reader(DispatchHandle& h, int fd) { readBytes += readALot(fd); h.rewatch(); } void rInterrupt(DispatchHandle&) { cerr << "R"; } void wInterrupt(DispatchHandle&) { cerr << "W"; } DispatchHandle::Callback rcb = rInterrupt; DispatchHandle::Callback wcb = wInterrupt; DispatchHandleRef *volatile rh = 0; DispatchHandleRef *volatile wh = 0; volatile bool stopWait = false; volatile bool phase1finished = false; timer_t timer; void stop_handler(int /*signo*/, siginfo_t* /*info*/, void* /*context*/) { stopWait = true; } void timer_handler(int /*signo*/, siginfo_t* /*info*/, void* /*context*/) { static int count = 0; if (count++ < 10) { rh->call(rcb); wh->call(wcb); } else { phase1finished = true; assert(::timer_delete(timer) == 0); } } }} // namespace qpid::tests using namespace qpid::tests; int main(int /*argc*/, char** /*argv*/) { // Create poller Poller::shared_ptr poller(new Poller); // Create dispatcher thread Thread dt(*poller); Thread dt1(*poller); Thread dt2(*poller); Thread dt3(*poller); // Setup sender and receiver int sv[2]; int rc = ::socketpair(AF_UNIX, SOCK_STREAM, 0, sv); assert(rc >= 0); // Set non-blocking rc = ::fcntl(sv[0], F_SETFL, O_NONBLOCK); assert(rc >= 0); rc = ::fcntl(sv[1], F_SETFL, O_NONBLOCK); assert(rc >= 0); // Make up a large string string testString = "This is only a test ... 1,2,3,4,5,6,7,8,9,10;"; for (int i = 0; i < 8; i++) testString += testString; PosixIOHandle f0(sv[0]); PosixIOHandle f1(sv[1]); rh = new DispatchHandleRef(f0, boost::bind(reader, _1, sv[0]), 0, 0); wh = new DispatchHandleRef(f1, 0, boost::bind(writer, _1, sv[1], testString), 0); rh->startWatch(poller); wh->startWatch(poller); // Set up a regular itimer interupt // We assume that this thread will handle the signals whilst sleeping // as the Poller threads have signal handling blocked // Signal handling struct ::sigaction sa; sa.sa_sigaction = timer_handler; sa.sa_flags = SA_RESTART | SA_SIGINFO; ::sigemptyset(&sa.sa_mask); rc = ::sigaction(SIGRTMIN, &sa,0); assert(rc == 0); ::sigevent se; ::memset(&se, 0, sizeof(se)); // Clear to make valgrind happy (this *is* the neatest way to do this portably - sigh) se.sigev_notify = SIGEV_SIGNAL; se.sigev_signo = SIGRTMIN; rc = ::timer_create(CLOCK_REALTIME, &se, &timer); assert(rc == 0); itimerspec ts = { /*.it_value = */ {2, 0}, // s, ns /*.it_interval = */ {2, 0}}; // s, ns rc = ::timer_settime(timer, 0, &ts, 0); assert(rc == 0); // wait while (!phase1finished) { ::sleep(1); } // Now test deleting/creating DispatchHandles in tight loop, so that we are likely to still be using the // attached PollerHandles after deleting the DispatchHandle DispatchHandleRef* t = wh; wh = 0; delete t; t = rh; rh = 0; delete t; sa.sa_sigaction = stop_handler; rc = ::sigaction(SIGRTMIN, &sa,0); assert(rc == 0); itimerspec nts = { /*.it_value = */ {30, 0}, // s, ns /*.it_interval = */ {30, 0}}; // s, ns rc = ::timer_create(CLOCK_REALTIME, &se, &timer); assert(rc == 0); rc = ::timer_settime(timer, 0, &nts, 0); assert(rc == 0); DispatchHandleRef* rh1; DispatchHandleRef* wh1; struct timespec w = {0, 1000000}; while (!stopWait) { rh1 = new DispatchHandleRef(f0, boost::bind(reader, _1, sv[0]), 0, 0); wh1 = new DispatchHandleRef(f1, 0, boost::bind(writer, _1, sv[1], testString), 0); rh1->startWatch(poller); wh1->startWatch(poller); ::nanosleep(&w, 0); delete wh1; delete rh1; } rc = ::timer_delete(timer); assert(rc == 0); poller->shutdown(); dt.join(); dt1.join(); dt2.join(); dt3.join(); cout << "\nWrote: " << writtenBytes << "\n"; cout << "Read: " << readBytes << "\n"; return 0; } qpidc-0.16/src/tests/logging.cpp0000664000076400007640000002542211732672260017232 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "test_tools.h" #include "qpid/log/Logger.h" #include "qpid/log/Options.h" #include "qpid/log/OstreamOutput.h" #include "qpid/memory.h" #include "qpid/Options.h" #if defined (_WIN32) # include "qpid/log/windows/SinkOptions.h" #else # include "qpid/log/posix/SinkOptions.h" #endif #include #include #include "unit_test.h" #include #include #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(loggingTestSuite) using namespace std; using namespace qpid::log; using boost::format; QPID_AUTO_TEST_CASE(testStatementInit) { Statement s=QPID_LOG_STATEMENT_INIT(debug); int line=__LINE__; BOOST_CHECK(!s.enabled); BOOST_CHECK_EQUAL(string(__FILE__), s.file); BOOST_CHECK_EQUAL(line, s.line); BOOST_CHECK_EQUAL(debug, s.level); } QPID_AUTO_TEST_CASE(testSelector_enable) { Selector s; // Simple enable s.enable(debug,"foo"); BOOST_CHECK(s.isEnabled(debug,"foo")); BOOST_CHECK(!s.isEnabled(error,"foo")); BOOST_CHECK(!s.isEnabled(error,"bar")); // Substring match BOOST_CHECK(s.isEnabled(debug, "bazfoobar")); BOOST_CHECK(!s.isEnabled(debug, "bazbar")); // Different levels for different substrings. s.enable(info, "bar"); BOOST_CHECK(s.isEnabled(debug, "foobar")); BOOST_CHECK(s.isEnabled(info, "foobar")); BOOST_CHECK(!s.isEnabled(debug, "bar")); BOOST_CHECK(!s.isEnabled(info, "foo")); // Enable-strings s.enable("notice:blob"); BOOST_CHECK(s.isEnabled(notice, "blob")); s.enable("error+:oops"); BOOST_CHECK(s.isEnabled(error, "oops")); BOOST_CHECK(s.isEnabled(critical, "oops")); } QPID_AUTO_TEST_CASE(testStatementEnabled) { // Verify that the singleton enables and disables static // log statements. Logger& l = Logger::instance(); ScopedSuppressLogging ls(l); l.select(Selector(debug)); static Statement s=QPID_LOG_STATEMENT_INIT(debug); BOOST_CHECK(!s.enabled); static Statement::Initializer init(s); BOOST_CHECK(s.enabled); static Statement s2=QPID_LOG_STATEMENT_INIT(warning); static Statement::Initializer init2(s2); BOOST_CHECK(!s2.enabled); l.select(Selector(warning)); BOOST_CHECK(!s.enabled); BOOST_CHECK(s2.enabled); } struct TestOutput : public Logger::Output { vector msg; vector stmt; TestOutput(Logger& l) { l.output(std::auto_ptr(this)); } void log(const Statement& s, const string& m) { msg.push_back(m); stmt.push_back(s); } string last() { return msg.back(); } }; using boost::assign::list_of; QPID_AUTO_TEST_CASE(testLoggerOutput) { Logger l; l.clear(); l.select(Selector(debug)); Statement s=QPID_LOG_STATEMENT_INIT(debug); TestOutput* out=new TestOutput(l); // Verify message is output. l.log(s, "foo"); vector expect=list_of("foo\n"); BOOST_CHECK_EQUAL(expect, out->msg); // Verify multiple outputs TestOutput* out2=new TestOutput(l); l.log(Statement(), "baz"); expect.push_back("baz\n"); BOOST_CHECK_EQUAL(expect, out->msg); expect.erase(expect.begin()); BOOST_CHECK_EQUAL(expect, out2->msg); } QPID_AUTO_TEST_CASE(testMacro) { Logger& l=Logger::instance(); ScopedSuppressLogging ls(l); l.select(Selector(info)); TestOutput* out=new TestOutput(l); QPID_LOG(info, "foo"); vector expect=list_of("foo\n"); BOOST_CHECK_EQUAL(expect, out->msg); BOOST_CHECK_EQUAL(__FILE__, out->stmt.front().file); // Not enabled: QPID_LOG(debug, "bar"); BOOST_CHECK_EQUAL(expect, out->msg); QPID_LOG(info, 42 << " bingo"); expect.push_back("42 bingo\n"); BOOST_CHECK_EQUAL(expect, out->msg); } QPID_AUTO_TEST_CASE(testLoggerFormat) { Logger& l = Logger::instance(); ScopedSuppressLogging ls(l); l.select(Selector(critical)); TestOutput* out=new TestOutput(l); l.format(Logger::FILE); QPID_LOG(critical, "foo"); BOOST_CHECK_EQUAL(out->last(), string(__FILE__)+": foo\n"); l.format(Logger::FILE|Logger::LINE); QPID_LOG(critical, "foo"); BOOST_CHECK_EQUAL(out->last().find(__FILE__), 0u); l.format(Logger::FUNCTION); QPID_LOG(critical, "foo"); BOOST_CHECK_EQUAL(string(BOOST_CURRENT_FUNCTION) + ": foo\n", out->last()); l.format(Logger::LEVEL); QPID_LOG(critical, "foo"); BOOST_CHECK_EQUAL("critical foo\n", out->last()); } QPID_AUTO_TEST_CASE(testOstreamOutput) { Logger& l=Logger::instance(); ScopedSuppressLogging ls(l); l.select(Selector(error)); ostringstream os; l.output(qpid::make_auto_ptr(new OstreamOutput(os))); QPID_LOG(error, "foo"); QPID_LOG(error, "bar"); QPID_LOG(error, "baz"); BOOST_CHECK_EQUAL("foo\nbar\nbaz\n", os.str()); } #if 0 // This test requires manual intervention. Normally disabled. QPID_AUTO_TEST_CASE(testSyslogOutput) { Logger& l=Logger::instance(); Logger::StateSaver ls(l); l.clear(); l.select(Selector(info)); l.syslog("qpid_test"); QPID_LOG(info, "Testing QPID"); BOOST_ERROR("Manually verify that /var/log/messages contains a recent line 'Testing QPID'"); } #endif // 0 int count() { static int n = 0; return n++; } int loggedCount() { static int n = 0; QPID_LOG(debug, "counting: " << n); return n++; } using namespace qpid::sys; // Measure CPU time. clock_t timeLoop(int times, int (*fp)()) { clock_t start=clock(); while (times-- > 0) (*fp)(); return clock() - start; } // Overhead test disabled because it consumes a ton of CPU and takes // forever under valgrind. Not friendly for regular test runs. // #if 0 QPID_AUTO_TEST_CASE(testOverhead) { // Ensure that the ratio of CPU time for an incrementing loop // with and without disabled log statements is in acceptable limits. // int times=100000000; clock_t noLog=timeLoop(times, count); clock_t withLog=timeLoop(times, loggedCount); double ratio=double(withLog)/double(noLog); // NB: in initial tests the ratio was consistently below 1.5, // 2.5 is reasonable and should avoid spurios failures // due to machine load. // BOOST_CHECK_SMALL(ratio, 2.5); } #endif // 0 Statement statement( Level level, const char* file="", int line=0, const char* fn=0) { Statement s={0, file, line, fn, level}; return s; } #define ARGC(argv) (sizeof(argv)/sizeof(char*)) QPID_AUTO_TEST_CASE(testOptionsParse) { const char* argv[]={ 0, "--log-enable", "error+:foo", "--log-enable", "debug:bar", "--log-enable", "info", "--log-to-stderr", "no", "--log-to-file", "logout", "--log-level", "yes", "--log-source", "1", "--log-thread", "true", "--log-function", "YES" }; qpid::log::Options opts(""); #ifdef _WIN32 qpid::log::windows::SinkOptions sinks("test"); #else qpid::log::posix::SinkOptions sinks("test"); #endif opts.parse(ARGC(argv), const_cast(argv)); sinks = *opts.sinkOptions; vector expect=list_of("error+:foo")("debug:bar")("info"); BOOST_CHECK_EQUAL(expect, opts.selectors); BOOST_CHECK(!sinks.logToStderr); BOOST_CHECK(!sinks.logToStdout); BOOST_CHECK(sinks.logFile == "logout"); BOOST_CHECK(opts.level); BOOST_CHECK(opts.source); BOOST_CHECK(opts.function); BOOST_CHECK(opts.thread); } QPID_AUTO_TEST_CASE(testOptionsDefault) { qpid::log::Options opts(""); #ifdef _WIN32 qpid::log::windows::SinkOptions sinks("test"); #else qpid::log::posix::SinkOptions sinks("test"); #endif sinks = *opts.sinkOptions; BOOST_CHECK(sinks.logToStderr); BOOST_CHECK(!sinks.logToStdout); BOOST_CHECK(sinks.logFile.length() == 0); vector expect=list_of("notice+"); BOOST_CHECK_EQUAL(expect, opts.selectors); BOOST_CHECK(opts.time && opts.level); BOOST_CHECK(!(opts.source || opts.function || opts.thread)); } QPID_AUTO_TEST_CASE(testSelectorFromOptions) { const char* argv[]={ 0, "--log-enable", "error+:foo", "--log-enable", "debug:bar", "--log-enable", "info" }; qpid::log::Options opts(""); opts.parse(ARGC(argv), const_cast(argv)); vector expect=list_of("error+:foo")("debug:bar")("info"); BOOST_CHECK_EQUAL(expect, opts.selectors); Selector s(opts); BOOST_CHECK(!s.isEnabled(warning, "x")); BOOST_CHECK(!s.isEnabled(debug, "x")); BOOST_CHECK(s.isEnabled(debug, "bar")); BOOST_CHECK(s.isEnabled(error, "foo")); BOOST_CHECK(s.isEnabled(critical, "foo")); } QPID_AUTO_TEST_CASE(testLoggerStateure) { Logger& l=Logger::instance(); ScopedSuppressLogging ls(l); qpid::log::Options opts("test"); const char* argv[]={ 0, "--log-time", "no", "--log-source", "yes", "--log-to-stderr", "no", "--log-to-file", "logging.tmp", "--log-enable", "critical" }; opts.parse(ARGC(argv), const_cast(argv)); l.configure(opts); QPID_LOG(critical, "foo"); int srcline=__LINE__; ifstream log("logging.tmp"); string line; getline(log, line); string expect=(format("critical %s:%d: foo")%__FILE__%srcline).str(); BOOST_CHECK_EQUAL(expect, line); log.close(); unlink("logging.tmp"); } QPID_AUTO_TEST_CASE(testQuoteNonPrintable) { Logger& l=Logger::instance(); ScopedSuppressLogging ls(l); qpid::log::Options opts("test"); opts.time=false; #ifdef _WIN32 qpid::log::windows::SinkOptions *sinks = dynamic_cast(opts.sinkOptions.get()); #else qpid::log::posix::SinkOptions *sinks = dynamic_cast(opts.sinkOptions.get()); #endif sinks->logToStderr = false; sinks->logFile = "logging.tmp"; l.configure(opts); char s[] = "null\0tab\tspace newline\nret\r\x80\x99\xff"; string str(s, sizeof(s)); QPID_LOG(critical, str); ifstream log("logging.tmp"); string line; getline(log, line, '\0'); string expect="critical null\\x00tab\tspace newline\nret\r\\x80\\x99\\xFF\\x00\n"; BOOST_CHECK_EQUAL(expect, line); log.close(); unlink("logging.tmp"); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/cluster_read_credit0000775000076400007640000000206611654250703021030 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Regression test for http://issues.apache.org/jira/browse/QPID-2086 srcdir=`dirname $0` . $srcdir/ais_check $srcdir/start_cluster 1 --cluster-read-max=2 || exit 1 trap $srcdir/stop_cluster EXIT seq 1 10000 | ./sender --port `cat cluster.ports` --routing-key no-such-queue qpidc-0.16/src/tests/InlineVector.cpp0000664000076400007640000000603511252003060020163 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/InlineVector.h" #include "unit_test.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(InlineVectorTestSuite) using namespace qpid; using namespace std; typedef InlineVector Vec; bool isInline(const Vec& v) { // If nothing, give it the benefit of the doubt; // can't take address of nothing. if (v.size() <= 0) return true; return (const char*)&v <= (const char*)(&v[0]) && (const char*)(&v[0]) < (const char*)&v+sizeof(v); } QPID_AUTO_TEST_CASE(testCtor) { { Vec v; BOOST_CHECK(isInline(v)); BOOST_CHECK(v.empty()); } { Vec v(3, 42); BOOST_CHECK(isInline(v)); BOOST_CHECK_EQUAL(3u, v.size()); BOOST_CHECK_EQUAL(v[0], 42); BOOST_CHECK_EQUAL(v[2], 42); Vec u(v); BOOST_CHECK(isInline(u)); BOOST_CHECK_EQUAL(3u, u.size()); BOOST_CHECK_EQUAL(u[0], 42); BOOST_CHECK_EQUAL(u[2], 42); } { Vec v(4, 42); BOOST_CHECK_EQUAL(v.size(), 4u); BOOST_CHECK(!isInline(v)); Vec u(v); BOOST_CHECK_EQUAL(u.size(), 4u); BOOST_CHECK(!isInline(u)); } } QPID_AUTO_TEST_CASE(testInsert) { { Vec v; v.push_back(1); BOOST_CHECK_EQUAL(v.size(), 1u); BOOST_CHECK_EQUAL(v.back(), 1); BOOST_CHECK(isInline(v)); v.insert(v.begin(), 2); BOOST_CHECK_EQUAL(v.size(), 2u); BOOST_CHECK_EQUAL(v.back(), 1); BOOST_CHECK(isInline(v)); v.push_back(3); BOOST_CHECK(isInline(v)); v.push_back(4); BOOST_CHECK(!isInline(v)); } { Vec v(3,42); v.insert(v.begin(), 9); BOOST_CHECK_EQUAL(v.size(), 4u); BOOST_CHECK(!isInline(v)); } { Vec v(3,42); v.insert(v.begin()+1, 9); BOOST_CHECK(!isInline(v)); BOOST_CHECK_EQUAL(v.size(), 4u); } } QPID_AUTO_TEST_CASE(testAssign) { Vec v(3,42); Vec u; u = v; BOOST_CHECK(isInline(u)); u.push_back(4); BOOST_CHECK(!isInline(u)); v = u; BOOST_CHECK(!isInline(v)); } QPID_AUTO_TEST_CASE(testResize) { Vec v; v.resize(5); BOOST_CHECK(!isInline(v)); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/clustered_replication_test0000775000076400007640000001062311721215323022434 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Test reliability of the replication feature in the face of link # failures: source ./test_env.sh trap stop_brokers INT EXIT fail() { echo $1 exit 1 } stop_brokers() { if [[ $PRIMARY1 ]] ; then $QPIDD_EXEC --no-module-dir -q --port $PRIMARY1 unset PRIMARY1 fi if [[ $PRIMARY2 ]] ; then $QPIDD_EXEC --no-module-dir -q --port $PRIMARY2 unset PRIMARY2 fi if [[ $DR1 ]] ; then $QPIDD_EXEC --no-module-dir -q --port $DR1 unset DR1 fi if [[ $DR2 ]] ; then $QPIDD_EXEC --no-module-dir -q --port $DR2 unset DR2 fi } if test -d $PYTHON_DIR; then . $srcdir/ais_check #todo: these cluster names need to be unique to prevent clashes PRIMARY_CLUSTER=PRIMARY_$(hostname)_$$ DR_CLUSTER=DR_$(hostname)_$$ GENERAL_OPTS="--auth no --no-module-dir --no-data-dir --daemon --port 0 --log-to-stderr false" PRIMARY_OPTS="--load-module $REPLICATING_LISTENER_LIB --create-replication-queue true --replication-queue REPLICATION_QUEUE --load-module $CLUSTER_LIB --cluster-name $PRIMARY_CLUSTER" DR_OPTS="--load-module $REPLICATION_EXCHANGE_LIB --load-module $CLUSTER_LIB --cluster-name $DR_CLUSTER" rm -f repl*.tmp #cleanup any files left from previous run #start first node of primary cluster and set up test queue echo Starting primary cluster PRIMARY1=$(with_ais_group $QPIDD_EXEC $GENERAL_OPTS $PRIMARY_OPTS --log-to-file repl.primary.1.tmp) || fail "Could not start PRIMARY1" $PYTHON_COMMANDS/qpid-config -b "localhost:$PRIMARY1" add queue test-queue --generate-queue-events 2 $PYTHON_COMMANDS/qpid-config -b "localhost:$PRIMARY1" add queue control-queue --generate-queue-events 1 #send 10 messages, consume 5 of them for i in `seq 1 10`; do echo Message$i; done | ./sender --port $PRIMARY1 ./receiver --port $PRIMARY1 --messages 5 > /dev/null #add new node to primary cluster, testing correct transfer of state: echo Adding node to primary cluster PRIMARY2=$(with_ais_group $QPIDD_EXEC $GENERAL_OPTS $PRIMARY_OPTS --log-to-file repl.primary.2.tmp) || fail "Could not start PRIMARY2 " #start DR cluster, set up test queue there and establish replication bridge echo Starting DR cluster DR1=$(with_ais_group $QPIDD_EXEC $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.1.tmp) || fail "Could not start DR1" DR2=$(with_ais_group $QPIDD_EXEC $GENERAL_OPTS $DR_OPTS --log-to-file repl.dr.2.tmp) || fail "Could not start DR2" $PYTHON_COMMANDS/qpid-config -b "localhost:$DR1" add queue test-queue $PYTHON_COMMANDS/qpid-config -b "localhost:$DR1" add queue control-queue $PYTHON_COMMANDS/qpid-config -b "localhost:$DR1" add exchange replication REPLICATION_EXCHANGE $PYTHON_COMMANDS/qpid-route queue add localhost:$DR2 localhost:$PRIMARY2 REPLICATION_EXCHANGE REPLICATION_QUEUE || fail "Could not add route." #send more messages to primary for i in `seq 11 20`; do echo Message$i; done | ./sender --port $PRIMARY1 --send-eos 1 #wait for replication events to all be processed: echo Waiting for replication to complete echo Done | ./sender --port $PRIMARY1 --routing-key control-queue --send-eos 1 ./receiver --queue control-queue --port $DR1 > /dev/null #verify contents of test queue on dr cluster: echo Verifying... ./receiver --port $DR2 > repl.out.tmp for i in `seq 6 20`; do echo Message$i; done | diff repl.out.tmp - || FAIL=1 if [[ $FAIL ]]; then echo Clustered replication test failed: expectations not met! exit 1 else echo Clustered replication test passed rm -f repl*.tmp fi fi qpidc-0.16/src/tests/replaying_sender.cpp0000664000076400007640000001101111363610132021111 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include using namespace qpid; using namespace qpid::client; using namespace qpid::framing; using namespace std; namespace qpid { namespace tests { class Sender : public FailoverManager::Command { public: Sender(const std::string& queue, uint count, uint reportFreq); void execute(AsyncSession& session, bool isRetry); uint getSent(); void setVerbosity ( int v ) { verbosity = v; } void setPersistence ( int p ) { persistence = p; } private: MessageReplayTracker sender; const uint count; uint sent; const uint reportFrequency; Message message; int verbosity; int persistence; string queueName; }; Sender::Sender(const std::string& queue, uint count_, uint reportFreq ) : sender(10), count(count_), sent(0), reportFrequency(reportFreq), verbosity(0), persistence(0), queueName ( queue ) { message.getDeliveryProperties().setRoutingKey(queueName.c_str()); } const string SN("sn"); void Sender::execute(AsyncSession& session, bool isRetry) { if (verbosity > 0) std::cout << "replaying_sender " << (isRetry ? "first " : "re-") << "connect." << endl; if (isRetry) sender.replay(session); else sender.init(session); while (sent < count) { stringstream message_data; message_data << ++sent; message.setData(message_data.str()); message.getHeaders().setInt(SN, sent); if ( persistence ) message.getDeliveryProperties().setDeliveryMode(PERSISTENT); sender.send(message); if (count > reportFrequency && !(sent % reportFrequency)) { if ( verbosity > 0 ) std::cout << "Sender sent " << sent << " of " << count << " on queue " << queueName << std::endl; } } message.setData("That's all, folks!"); sender.send(message); if ( verbosity > 0 ) std::cout << "SENDER COMPLETED\n"; } uint Sender::getSent() { return sent; } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char ** argv) { ConnectionSettings settings; if ( argc != 8 ) { std::cerr << "Usage: replaying_sender host port n_messages report_frequency verbosity persistence queue_name\n"; return 1; } settings.host = argv[1]; settings.port = atoi(argv[2]); int n_messages = atoi(argv[3]); int reportFrequency = atoi(argv[4]); int verbosity = atoi(argv[5]); int persistence = atoi(argv[6]); char * queue_name = argv[7]; FailoverManager connection(settings); Sender sender(queue_name, n_messages, reportFrequency ); sender.setVerbosity ( verbosity ); sender.setPersistence ( persistence ); try { connection.execute ( sender ); if ( verbosity > 0 ) { std::cout << "Sender finished. Sent " << sender.getSent() << " messages on queue " << queue_name << endl; } connection.close(); return 0; } catch(const std::exception& error) { cerr << "Sender (host: " << settings.host << " port: " << settings.port << " ) " << " Failed: " << error.what() << std::endl; } return 1; } qpidc-0.16/src/tests/sasl.mk0000664000076400007640000000422111645656500016367 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Test that are only relevant if SASL is enabled. if HAVE_SASL check_PROGRAMS+=cluster_authentication_soak cluster_authentication_soak_INCLUDES=$(PUBLIC_INCLUDES) cluster_authentication_soak_SOURCES=cluster_authentication_soak.cpp ForkedBroker.h ForkedBroker.cpp cluster_authentication_soak_LDADD=$(lib_client) $(lib_broker) # Note: sasl_version is not a test -- it is a tool used by tests. check_PROGRAMS+=sasl_version sasl_version_SOURCES=sasl_version.cpp sasl_version_LDADD=$(lib_client) TESTS += run_cluster_authentication_test sasl_fed sasl_fed_ex_dynamic sasl_fed_ex_link sasl_fed_ex_queue sasl_fed_ex_route sasl_fed_ex_route_cluster sasl_fed_ex_link_cluster sasl_fed_ex_queue_cluster sasl_fed_ex_dynamic_cluster sasl_no_dir LONG_TESTS += run_cluster_authentication_soak EXTRA_DIST += run_cluster_authentication_test \ sasl_fed \ sasl_fed_ex \ run_cluster_authentication_soak \ sasl_fed_ex_dynamic \ sasl_fed_ex_link \ sasl_fed_ex_queue \ sasl_fed_ex_route \ sasl_fed_ex_dynamic_cluster \ sasl_fed_ex_link_cluster \ sasl_fed_ex_queue_cluster \ sasl_fed_ex_route_cluster \ sasl_no_dir endif # HAVE_SASL qpidc-0.16/src/tests/cluster_test.cpp0000664000076400007640000013512711524735031020323 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "test_tools.h" #include "unit_test.h" #include "ForkedBroker.h" #include "BrokerFixture.h" #include "ClusterFixture.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/client/ConnectionAccess.h" #include "qpid/client/Session.h" #include "qpid/client/FailoverListener.h" #include "qpid/client/FailoverManager.h" #include "qpid/client/QueueOptions.h" #include "qpid/cluster/Cluster.h" #include "qpid/cluster/Cpg.h" #include "qpid/cluster/UpdateClient.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/Uuid.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/enum.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/log/Logger.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Thread.h" #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace qpid; using namespace qpid::cluster; using namespace qpid::framing; using namespace qpid::client; using namespace boost::assign; using broker::Broker; using boost::shared_ptr; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(cluster_test) bool durableFlag = std::getenv("STORE_LIB") != 0; void prepareArgs(ClusterFixture::Args& args, const bool durableFlag = false) { ostringstream clusterLib; clusterLib << getLibPath("CLUSTER_LIB"); args += "--auth", "no", "--no-module-dir", "--load-module", clusterLib.str(); if (durableFlag) args += "--load-module", getLibPath("STORE_LIB"), "TMP_DATA_DIR"; else args += "--no-data-dir"; } ClusterFixture::Args prepareArgs(const bool durableFlag = false) { ClusterFixture::Args args; prepareArgs(args, durableFlag); return args; } // Timeout for tests that wait for messages const sys::Duration TIMEOUT=2*sys::TIME_SEC; ostream& operator<<(ostream& o, const cpg_name* n) { return o << Cpg::str(*n); } ostream& operator<<(ostream& o, const cpg_address& a) { return o << "(" << a.nodeid <<","< ostream& operator<<(ostream& o, const pair& array) { o << "{ "; ostream_iterator i(o, " "); copy(array.first, array.first+array.second, i); o << "}"; return o; } template set makeSet(const C& c) { set s; copy(c.begin(), c.end(), inserter(s, s.begin())); return s; } class Sender { public: Sender(boost::shared_ptr ci, uint16_t ch) : connection(ci), channel(ch) {} void send(const AMQBody& body, bool firstSeg, bool lastSeg, bool firstFrame, bool lastFrame) { AMQFrame f(body); f.setChannel(channel); f.setFirstSegment(firstSeg); f.setLastSegment(lastSeg); f.setFirstFrame(firstFrame); f.setLastFrame(lastFrame); connection->expand(f.encodedSize(), false); connection->handle(f); } private: boost::shared_ptr connection; uint16_t channel; }; int64_t getMsgSequence(const Message& m) { return m.getMessageProperties().getApplicationHeaders().getAsInt64("qpid.msg_sequence"); } Message ttlMessage(const string& data, const string& key, uint64_t ttl, bool durable = false) { Message m(data, key); m.getDeliveryProperties().setTtl(ttl); if (durable) m.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); return m; } Message makeMessage(const string& data, const string& key, bool durable = false) { Message m(data, key); if (durable) m.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); return m; } vector browse(Client& c, const string& q, int n) { SubscriptionSettings browseSettings( FlowControl::messageCredit(n), ACCEPT_MODE_NONE, ACQUIRE_MODE_NOT_ACQUIRED, 0 // No auto-ack. ); LocalQueue lq; c.subs.subscribe(lq, q, browseSettings); c.session.messageFlush(q); vector result; for (int i = 0; i < n; ++i) { Message m; if (!lq.get(m, TIMEOUT)) break; result.push_back(m.getData()); } c.subs.getSubscription(q).cancel(); return result; } ConnectionSettings aclSettings(int port, const std::string& id) { ConnectionSettings settings; settings.port = port; settings.mechanism = "PLAIN"; settings.username = id; settings.password = id; return settings; } // An illegal frame body struct PoisonPill : public AMQBody { virtual uint8_t type() const { return 0xFF; } virtual void encode(Buffer& ) const {} virtual void decode(Buffer& , uint32_t=0) {} virtual uint32_t encodedSize() const { return 0; } virtual void print(std::ostream&) const {}; virtual void accept(AMQBodyConstVisitor&) const {}; virtual AMQMethodBody* getMethod() { return 0; } virtual const AMQMethodBody* getMethod() const { return 0; } /** Match if same type and same class/method ID for methods */ static bool match(const AMQBody& , const AMQBody& ) { return false; } virtual boost::intrusive_ptr clone() const { return new PoisonPill; } }; QPID_AUTO_TEST_CASE(testBadClientData) { // Ensure that bad data on a client connection closes the // connection but does not stop the broker. ClusterFixture::Args args; prepareArgs(args, false); args += "--log-enable=critical"; // Supress expected errors ClusterFixture cluster(2, args, -1); Client c0(cluster[0]); Client c1(cluster[1]); boost::shared_ptr ci = client::ConnectionAccess::getImpl(c0.connection); AMQFrame poison(boost::intrusive_ptr(new PoisonPill)); ci->expand(poison.encodedSize(), false); ci->handle(poison); { ScopedSuppressLogging sl; BOOST_CHECK_THROW(c0.session.queueQuery("q0"), Exception); } Client c00(cluster[0]); BOOST_CHECK_EQUAL(c00.session.queueQuery("q00").getQueue(), ""); BOOST_CHECK_EQUAL(c1.session.queueQuery("q1").getQueue(), ""); } QPID_AUTO_TEST_CASE(testAcl) { ofstream policyFile("cluster_test.acl"); policyFile << "acl allow foo@QPID create queue name=foo" << endl << "acl allow foo@QPID create queue name=foo2" << endl << "acl deny foo@QPID create queue name=bar" << endl << "acl allow all all" << endl; policyFile.close(); char cwd[1024]; BOOST_CHECK(::getcwd(cwd, sizeof(cwd))); ostringstream aclLib; aclLib << getLibPath("ACL_LIB"); ClusterFixture::Args args; prepareArgs(args, durableFlag); args += "--log-enable=critical"; // Supress expected errors args += "--acl-file", string(cwd) + "/cluster_test.acl", "--cluster-mechanism", "PLAIN", "--cluster-username", "cluster", "--cluster-password", "cluster", "--load-module", aclLib.str(); ClusterFixture cluster(2, args, -1); Client c0(aclSettings(cluster[0], "c0"), "c0"); Client c1(aclSettings(cluster[1], "c1"), "c1"); Client foo(aclSettings(cluster[1], "foo"), "foo"); foo.session.queueDeclare("foo", arg::durable=durableFlag); BOOST_CHECK_EQUAL(c0.session.queueQuery("foo").getQueue(), "foo"); { ScopedSuppressLogging sl; BOOST_CHECK_THROW(foo.session.queueDeclare("bar", arg::durable=durableFlag), framing::UnauthorizedAccessException); } BOOST_CHECK(c0.session.queueQuery("bar").getQueue().empty()); BOOST_CHECK(c1.session.queueQuery("bar").getQueue().empty()); cluster.add(); Client c2(aclSettings(cluster[2], "c2"), "c2"); { ScopedSuppressLogging sl; BOOST_CHECK_THROW(foo.session.queueDeclare("bar", arg::durable=durableFlag), framing::UnauthorizedAccessException); } BOOST_CHECK(c2.session.queueQuery("bar").getQueue().empty()); } QPID_AUTO_TEST_CASE(testMessageTimeToLive) { ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(2, args, -1); Client c0(cluster[0], "c0"); Client c1(cluster[1], "c1"); c0.session.queueDeclare("p", arg::durable=durableFlag); c0.session.queueDeclare("q", arg::durable=durableFlag); c0.session.messageTransfer(arg::content=ttlMessage("a", "q", 200, durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("b", "q", durableFlag)); c0.session.messageTransfer(arg::content=ttlMessage("x", "p", 100000, durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("y", "p", durableFlag)); cluster.add(); Client c2(cluster[1], "c2"); BOOST_CHECK_EQUAL(browse(c0, "p", 1), list_of("x")); BOOST_CHECK_EQUAL(browse(c1, "p", 1), list_of("x")); BOOST_CHECK_EQUAL(browse(c2, "p", 1), list_of("x")); sys::usleep(200*1000); BOOST_CHECK_EQUAL(browse(c0, "q", 1), list_of("b")); BOOST_CHECK_EQUAL(browse(c1, "q", 1), list_of("b")); BOOST_CHECK_EQUAL(browse(c2, "q", 1), list_of("b")); } QPID_AUTO_TEST_CASE(testSequenceOptions) { // Make sure the exchange qpid.msg_sequence property is properly replicated. ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); FieldTable ftargs; ftargs.setInt("qpid.msg_sequence", 1); c0.session.queueDeclare(arg::queue="q", arg::durable=durableFlag); c0.session.exchangeDeclare(arg::exchange="ex", arg::type="direct", arg::arguments=ftargs); c0.session.exchangeBind(arg::exchange="ex", arg::queue="q", arg::bindingKey="k"); c0.session.messageTransfer(arg::content=makeMessage("1", "k", durableFlag), arg::destination="ex"); c0.session.messageTransfer(arg::content=makeMessage("2", "k", durableFlag), arg::destination="ex"); BOOST_CHECK_EQUAL(1, getMsgSequence(c0.subs.get("q", TIMEOUT))); BOOST_CHECK_EQUAL(2, getMsgSequence(c0.subs.get("q", TIMEOUT))); cluster.add(); Client c1(cluster[1]); c1.session.messageTransfer(arg::content=makeMessage("3", "k", durableFlag), arg::destination="ex"); BOOST_CHECK_EQUAL(3, getMsgSequence(c1.subs.get("q", TIMEOUT))); } QPID_AUTO_TEST_CASE(testTxTransaction) { ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); c0.session.queueDeclare(arg::queue="q", arg::durable=durableFlag); c0.session.messageTransfer(arg::content=makeMessage("A", "q", durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("B", "q", durableFlag)); // Start a transaction that will commit. Session commitSession = c0.connection.newSession("commit"); SubscriptionManager commitSubs(commitSession); commitSession.txSelect(); commitSession.messageTransfer(arg::content=makeMessage("a", "q", durableFlag)); commitSession.messageTransfer(arg::content=makeMessage("b", "q", durableFlag)); BOOST_CHECK_EQUAL(commitSubs.get("q", TIMEOUT).getData(), "A"); // Start a transaction that will roll back. Session rollbackSession = c0.connection.newSession("rollback"); SubscriptionManager rollbackSubs(rollbackSession); rollbackSession.txSelect(); rollbackSession.messageTransfer(arg::content=makeMessage("1", "q", durableFlag)); Message rollbackMessage = rollbackSubs.get("q", TIMEOUT); BOOST_CHECK_EQUAL(rollbackMessage.getData(), "B"); BOOST_CHECK_EQUAL(c0.session.queueQuery("q").getMessageCount(), 0u); // Add new member mid transaction. cluster.add(); Client c1(cluster[1], "c1"); // More transactional work BOOST_CHECK_EQUAL(c1.session.queueQuery("q").getMessageCount(), 0u); rollbackSession.messageTransfer(arg::content=makeMessage("2", "q", durableFlag)); commitSession.messageTransfer(arg::content=makeMessage("c", "q", durableFlag)); rollbackSession.messageTransfer(arg::content=makeMessage("3", "q", durableFlag)); BOOST_CHECK_EQUAL(c1.session.queueQuery("q").getMessageCount(), 0u); // Commit/roll back. commitSession.txCommit(); rollbackSession.txRollback(); rollbackSession.messageRelease(rollbackMessage.getId()); // Verify queue status: just the comitted messages and dequeues should remain. BOOST_CHECK_EQUAL(c1.session.queueQuery("q").getMessageCount(), 4u); BOOST_CHECK_EQUAL(c1.subs.get("q", TIMEOUT).getData(), "B"); BOOST_CHECK_EQUAL(c1.subs.get("q", TIMEOUT).getData(), "a"); BOOST_CHECK_EQUAL(c1.subs.get("q", TIMEOUT).getData(), "b"); BOOST_CHECK_EQUAL(c1.subs.get("q", TIMEOUT).getData(), "c"); commitSession.close(); rollbackSession.close(); } QPID_AUTO_TEST_CASE(testUnacked) { // Verify replication of unacknowledged messages. ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); Message m; // Create unacked message: acquired but not accepted. SubscriptionSettings manualAccept(FlowControl::unlimited(), ACCEPT_MODE_EXPLICIT, ACQUIRE_MODE_PRE_ACQUIRED, 0); c0.session.queueDeclare("q1", arg::durable=durableFlag); c0.session.messageTransfer(arg::content=makeMessage("11","q1", durableFlag)); LocalQueue q1; c0.subs.subscribe(q1, "q1", manualAccept); BOOST_CHECK_EQUAL(q1.get(TIMEOUT).getData(), "11"); // Acquired but not accepted BOOST_CHECK_EQUAL(c0.session.queueQuery("q1").getMessageCount(), 0u); // Gone from queue // Create unacked message: not acquired, accepted or completeed. SubscriptionSettings manualAcquire(FlowControl::unlimited(), ACCEPT_MODE_EXPLICIT, ACQUIRE_MODE_NOT_ACQUIRED, 0); c0.session.queueDeclare("q2", arg::durable=durableFlag); c0.session.messageTransfer(arg::content=makeMessage("21","q2", durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("22","q2", durableFlag)); LocalQueue q2; c0.subs.subscribe(q2, "q2", manualAcquire); m = q2.get(TIMEOUT); // Not acquired or accepted, still on queue BOOST_CHECK_EQUAL(m.getData(), "21"); BOOST_CHECK_EQUAL(c0.session.queueQuery("q2").getMessageCount(), 2u); // Not removed c0.subs.getSubscription("q2").acquire(m); // Acquire manually BOOST_CHECK_EQUAL(c0.session.queueQuery("q2").getMessageCount(), 1u); // Removed BOOST_CHECK_EQUAL(q2.get(TIMEOUT).getData(), "22"); // Not acquired or accepted, still on queue BOOST_CHECK_EQUAL(c0.session.queueQuery("q2").getMessageCount(), 1u); // 1 not acquired. // Create empty credit record: acquire and accept but don't complete. SubscriptionSettings manualComplete(FlowControl::messageWindow(1), ACCEPT_MODE_EXPLICIT, ACQUIRE_MODE_PRE_ACQUIRED, 1, MANUAL_COMPLETION); c0.session.queueDeclare("q3", arg::durable=durableFlag); c0.session.messageTransfer(arg::content=makeMessage("31", "q3", durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("32", "q3", durableFlag)); LocalQueue q3; c0.subs.subscribe(q3, "q3", manualComplete); Message m31=q3.get(TIMEOUT); BOOST_CHECK_EQUAL(m31.getData(), "31"); // Automatically acquired & accepted but not completed. BOOST_CHECK_EQUAL(c0.session.queueQuery("q3").getMessageCount(), 1u); // Add new member while there are unacked messages. cluster.add(); Client c1(cluster[1], "c1"); // Check queue counts BOOST_CHECK_EQUAL(c1.session.queueQuery("q1").getMessageCount(), 0u); BOOST_CHECK_EQUAL(c1.session.queueQuery("q2").getMessageCount(), 1u); BOOST_CHECK_EQUAL(c1.session.queueQuery("q3").getMessageCount(), 1u); // Complete the empty credit message, should unblock the message behind it. BOOST_CHECK_THROW(q3.get(0), Exception); c0.session.markCompleted(SequenceSet(m31.getId()), true); BOOST_CHECK_EQUAL(q3.get(TIMEOUT).getData(), "32"); BOOST_CHECK_EQUAL(c0.session.queueQuery("q3").getMessageCount(), 0u); BOOST_CHECK_EQUAL(c1.session.queueQuery("q3").getMessageCount(), 0u); // Close the original session - unacked messages should be requeued. c0.session.close(); BOOST_CHECK_EQUAL(c1.session.queueQuery("q1").getMessageCount(), 1u); BOOST_CHECK_EQUAL(c1.session.queueQuery("q2").getMessageCount(), 2u); BOOST_CHECK_EQUAL(c1.subs.get("q1", TIMEOUT).getData(), "11"); BOOST_CHECK_EQUAL(c1.subs.get("q2", TIMEOUT).getData(), "21"); BOOST_CHECK_EQUAL(c1.subs.get("q2", TIMEOUT).getData(), "22"); } // FIXME aconway 2009-06-17: test for unimplemented feature, enable when implemented. void testUpdateTxState() { // Verify that we update transaction state correctly to new members. ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); // Do work in a transaction. c0.session.txSelect(); c0.session.queueDeclare("q", arg::durable=durableFlag); c0.session.messageTransfer(arg::content=makeMessage("1","q", durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("2","q", durableFlag)); Message m; BOOST_CHECK(c0.subs.get(m, "q", TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "1"); // New member, TX not comitted, c1 should see nothing. cluster.add(); Client c1(cluster[1], "c1"); BOOST_CHECK_EQUAL(c1.session.queueQuery(arg::queue="q").getMessageCount(), 0u); // After commit c1 shoudl see results of tx. c0.session.txCommit(); BOOST_CHECK_EQUAL(c1.session.queueQuery(arg::queue="q").getMessageCount(), 1u); BOOST_CHECK(c1.subs.get(m, "q", TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "2"); // Another transaction with both members active. c0.session.messageTransfer(arg::content=makeMessage("3","q", durableFlag)); BOOST_CHECK_EQUAL(c1.session.queueQuery(arg::queue="q").getMessageCount(), 0u); c0.session.txCommit(); BOOST_CHECK_EQUAL(c1.session.queueQuery(arg::queue="q").getMessageCount(), 1u); BOOST_CHECK(c1.subs.get(m, "q", TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "3"); } QPID_AUTO_TEST_CASE(testUpdateMessageBuilder) { // Verify that we update a partially recieved message to a new member. ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); c0.session.queueDeclare("q", arg::durable=durableFlag); Sender sender(ConnectionAccess::getImpl(c0.connection), c0.session.getChannel()); // Send first 2 frames of message. MessageTransferBody transfer( ProtocolVersion(), string(), // default exchange. framing::message::ACCEPT_MODE_NONE, framing::message::ACQUIRE_MODE_PRE_ACQUIRED); sender.send(transfer, true, false, true, true); AMQHeaderBody header; header.get(true)->setRoutingKey("q"); if (durableFlag) header.get(true)->setDeliveryMode(DELIVERY_MODE_PERSISTENT); else header.get(true)->setDeliveryMode(DELIVERY_MODE_NON_PERSISTENT); sender.send(header, false, false, true, true); // No reliable way to ensure the partial message has arrived // before we start the new broker, so we sleep. sys::usleep(2500); cluster.add(); // Send final 2 frames of message. sender.send(AMQContentBody("ab"), false, true, true, false); sender.send(AMQContentBody("cd"), false, true, false, true); // Verify message is enqued correctly on second member. Message m; Client c1(cluster[1], "c1"); BOOST_CHECK(c1.subs.get(m, "q", TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "abcd"); BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c1.connection, 2).size()); } QPID_AUTO_TEST_CASE(testConnectionKnownHosts) { ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); set kb0 = knownBrokerPorts(c0.connection, 1); BOOST_CHECK_EQUAL(kb0.size(), 1u); BOOST_CHECK_EQUAL(kb0, makeSet(cluster)); cluster.add(); Client c1(cluster[1], "c1"); set kb1 = knownBrokerPorts(c1.connection, 2); kb0 = knownBrokerPorts(c0.connection, 2); BOOST_CHECK_EQUAL(kb1.size(), 2u); BOOST_CHECK_EQUAL(kb1, makeSet(cluster)); BOOST_CHECK_EQUAL(kb1,kb0); cluster.add(); Client c2(cluster[2], "c2"); set kb2 = knownBrokerPorts(c2.connection, 3); kb1 = knownBrokerPorts(c1.connection, 3); kb0 = knownBrokerPorts(c0.connection, 3); BOOST_CHECK_EQUAL(kb2.size(), 3u); BOOST_CHECK_EQUAL(kb2, makeSet(cluster)); BOOST_CHECK_EQUAL(kb2,kb0); BOOST_CHECK_EQUAL(kb2,kb1); cluster.killWithSilencer(1,c1.connection,9); kb0 = knownBrokerPorts(c0.connection, 2); kb2 = knownBrokerPorts(c2.connection, 2); BOOST_CHECK_EQUAL(kb0.size(), 2u); BOOST_CHECK_EQUAL(kb0, kb2); } QPID_AUTO_TEST_CASE(testUpdateConsumers) { ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); c0.session.queueDeclare("p", arg::durable=durableFlag); c0.session.queueDeclare("q", arg::durable=durableFlag); c0.subs.subscribe(c0.lq, "q", FlowControl::zero()); LocalQueue lp; c0.subs.subscribe(lp, "p", FlowControl::messageCredit(1)); c0.session.sync(); // Start new members cluster.add(); // Local Client c1(cluster[1], "c1"); cluster.add(); Client c2(cluster[2], "c2"); // Transfer messages c0.session.messageTransfer(arg::content=makeMessage("aaa", "q", durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("bbb", "p", durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("ccc", "p", durableFlag)); // Activate the subscription, ensure message removed on all queues. c0.subs.setFlowControl("q", FlowControl::unlimited()); Message m; BOOST_CHECK(c0.lq.get(m, TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "aaa"); BOOST_CHECK_EQUAL(c0.session.queueQuery("q").getMessageCount(), 0u); BOOST_CHECK_EQUAL(c1.session.queueQuery("q").getMessageCount(), 0u); BOOST_CHECK_EQUAL(c2.session.queueQuery("q").getMessageCount(), 0u); // Check second subscription's flow control: gets first message, not second. BOOST_CHECK(lp.get(m, TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "bbb"); BOOST_CHECK_EQUAL(c0.session.queueQuery("p").getMessageCount(), 1u); BOOST_CHECK_EQUAL(c1.session.queueQuery("p").getMessageCount(), 1u); BOOST_CHECK_EQUAL(c2.session.queueQuery("p").getMessageCount(), 1u); BOOST_CHECK(c0.subs.get(m, "p", TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "ccc"); // Kill the subscribing member, ensure further messages are not removed. cluster.killWithSilencer(0,c0.connection,9); BOOST_REQUIRE_EQUAL(knownBrokerPorts(c1.connection, 2).size(), 2u); for (int i = 0; i < 10; ++i) { c1.session.messageTransfer(arg::content=makeMessage("xxx", "q", durableFlag)); BOOST_REQUIRE(c1.subs.get(m, "q", TIMEOUT)); BOOST_REQUIRE_EQUAL(m.getData(), "xxx"); } } // Test that message data and delivery properties are updated properly. QPID_AUTO_TEST_CASE(testUpdateMessages) { ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); // Create messages with different delivery properties c0.session.queueDeclare("q", arg::durable=durableFlag); c0.session.exchangeBind(arg::exchange="amq.fanout", arg::queue="q"); c0.session.messageTransfer(arg::content=makeMessage("foo","q", durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("bar","q", durableFlag), arg::destination="amq.fanout"); while (c0.session.queueQuery("q").getMessageCount() != 2) sys::usleep(1000); // Wait for message to show up on broker 0. // Add a new broker, it will catch up. cluster.add(); // Do some work post-add c0.session.queueDeclare("p", arg::durable=durableFlag); c0.session.messageTransfer(arg::content=makeMessage("pfoo","p", durableFlag)); // Do some work post-join BOOST_REQUIRE_EQUAL(knownBrokerPorts(c0.connection, 2).size(), 2u); c0.session.messageTransfer(arg::content=makeMessage("pbar","p", durableFlag)); // Verify new brokers have state. Message m; Client c1(cluster[1], "c1"); BOOST_CHECK(c1.subs.get(m, "q", TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "foo"); BOOST_CHECK(m.getDeliveryProperties().hasExchange()); BOOST_CHECK_EQUAL(m.getDeliveryProperties().getExchange(), ""); BOOST_CHECK(c1.subs.get(m, "q", TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "bar"); BOOST_CHECK(m.getDeliveryProperties().hasExchange()); BOOST_CHECK_EQUAL(m.getDeliveryProperties().getExchange(), "amq.fanout"); BOOST_CHECK_EQUAL(c1.session.queueQuery("q").getMessageCount(), 0u); // Add another broker, don't wait for join - should be stalled till ready. cluster.add(); Client c2(cluster[2], "c2"); BOOST_CHECK(c2.subs.get(m, "p", TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "pfoo"); BOOST_CHECK(c2.subs.get(m, "p", TIMEOUT)); BOOST_CHECK_EQUAL(m.getData(), "pbar"); BOOST_CHECK_EQUAL(c2.session.queueQuery("p").getMessageCount(), 0u); } QPID_AUTO_TEST_CASE(testWiringReplication) { ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(3, args, -1); Client c0(cluster[0]); BOOST_CHECK(c0.session.queueQuery("q").getQueue().empty()); BOOST_CHECK(c0.session.exchangeQuery("ex").getType().empty()); c0.session.queueDeclare("q", arg::durable=durableFlag); c0.session.exchangeDeclare("ex", arg::type="direct"); c0.session.close(); c0.connection.close(); // Verify all brokers get wiring update. for (size_t i = 0; i < cluster.size(); ++i) { BOOST_MESSAGE("i == "<< i); Client c(cluster[i]); BOOST_CHECK_EQUAL("q", c.session.queueQuery("q").getQueue()); BOOST_CHECK_EQUAL("direct", c.session.exchangeQuery("ex").getType()); } } QPID_AUTO_TEST_CASE(testMessageEnqueue) { // Enqueue on one broker, dequeue on another. ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(2, args, -1); Client c0(cluster[0]); c0.session.queueDeclare("q", arg::durable=durableFlag); c0.session.messageTransfer(arg::content=makeMessage("foo", "q", durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("bar", "q", durableFlag)); c0.session.close(); Client c1(cluster[1]); Message msg; BOOST_CHECK(c1.subs.get(msg, "q", TIMEOUT)); BOOST_CHECK_EQUAL(string("foo"), msg.getData()); BOOST_CHECK(c1.subs.get(msg, "q", TIMEOUT)); BOOST_CHECK_EQUAL(string("bar"), msg.getData()); } QPID_AUTO_TEST_CASE(testMessageDequeue) { // Enqueue on one broker, dequeue on two others. ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(3, args, -1); Client c0(cluster[0], "c0"); c0.session.queueDeclare("q", arg::durable=durableFlag); c0.session.messageTransfer(arg::content=makeMessage("foo", "q", durableFlag)); c0.session.messageTransfer(arg::content=makeMessage("bar", "q", durableFlag)); Message msg; // Dequeue on 2 others, ensure correct order. Client c1(cluster[1], "c1"); BOOST_CHECK(c1.subs.get(msg, "q")); BOOST_CHECK_EQUAL("foo", msg.getData()); Client c2(cluster[2], "c2"); BOOST_CHECK(c1.subs.get(msg, "q")); BOOST_CHECK_EQUAL("bar", msg.getData()); // Queue should be empty on all cluster members. BOOST_CHECK_EQUAL(0u, c0.session.queueQuery("q").getMessageCount()); BOOST_CHECK_EQUAL(0u, c1.session.queueQuery("q").getMessageCount()); BOOST_CHECK_EQUAL(0u, c2.session.queueQuery("q").getMessageCount()); } QPID_AUTO_TEST_CASE(testDequeueWaitingSubscription) { ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(3, args, -1); Client c0(cluster[0]); BOOST_REQUIRE_EQUAL(knownBrokerPorts(c0.connection, 3).size(), 3u); // Wait for brokers. // First start a subscription. c0.session.queueDeclare("q", arg::durable=durableFlag); c0.subs.subscribe(c0.lq, "q", FlowControl::messageCredit(2)); // Now send messages Client c1(cluster[1]); c1.session.messageTransfer(arg::content=makeMessage("foo", "q", durableFlag)); c1.session.messageTransfer(arg::content=makeMessage("bar", "q", durableFlag)); // Check they arrived Message m; BOOST_CHECK(c0.lq.get(m, TIMEOUT)); BOOST_CHECK_EQUAL("foo", m.getData()); BOOST_CHECK(c0.lq.get(m, TIMEOUT)); BOOST_CHECK_EQUAL("bar", m.getData()); // Queue should be empty on all cluster members. Client c2(cluster[2]); BOOST_CHECK_EQUAL(0u, c0.session.queueQuery("q").getMessageCount()); BOOST_CHECK_EQUAL(0u, c1.session.queueQuery("q").getMessageCount()); BOOST_CHECK_EQUAL(0u, c2.session.queueQuery("q").getMessageCount()); } QPID_AUTO_TEST_CASE(queueDurabilityPropagationToNewbie) { /* Start with a single broker. Set up two queues: one durable, and one not. Add a new broker to the cluster. Make sure it has one durable and one non-durable queue. */ ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0]); c0.session.queueDeclare("durable_queue", arg::durable=true); c0.session.queueDeclare("non_durable_queue", arg::durable=false); cluster.add(); Client c1(cluster[1]); QueueQueryResult durable_query = c1.session.queueQuery ( "durable_queue" ); QueueQueryResult non_durable_query = c1.session.queueQuery ( "non_durable_queue" ); BOOST_CHECK_EQUAL(durable_query.getQueue(), std::string("durable_queue")); BOOST_CHECK_EQUAL(non_durable_query.getQueue(), std::string("non_durable_queue")); BOOST_CHECK_EQUAL ( durable_query.getDurable(), true ); BOOST_CHECK_EQUAL ( non_durable_query.getDurable(), false ); } QPID_AUTO_TEST_CASE(testHeartbeatCancelledOnFailover) { struct Sender : FailoverManager::Command { std::string queue; std::string content; Sender(const std::string& q, const std::string& c) : queue(q), content(c) {} void execute(AsyncSession& session, bool) { session.messageTransfer(arg::content=makeMessage(content, queue, durableFlag)); } }; struct Receiver : FailoverManager::Command, MessageListener, qpid::sys::Runnable { FailoverManager& mgr; std::string queue; std::string expectedContent; qpid::client::Subscription subscription; qpid::sys::Monitor lock; bool ready, failed; Receiver(FailoverManager& m, const std::string& q, const std::string& c) : mgr(m), queue(q), expectedContent(c), ready(false), failed(false) {} void received(Message& message) { BOOST_CHECK_EQUAL(expectedContent, message.getData()); subscription.cancel(); } void execute(AsyncSession& session, bool) { session.queueDeclare(arg::queue=queue, arg::durable=durableFlag); SubscriptionManager subs(session); subscription = subs.subscribe(*this, queue); session.sync(); setReady(); subs.run(); //cleanup: session.queueDelete(arg::queue=queue); } void run() { try { mgr.execute(*this); } catch (const std::exception& e) { BOOST_MESSAGE("Exception in mgr.execute: " << e.what()); failed = true; } } void waitForReady() { qpid::sys::Monitor::ScopedLock l(lock); while (!ready) { lock.wait(); } } void setReady() { qpid::sys::Monitor::ScopedLock l(lock); ready = true; lock.notify(); } }; ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(2, args, -1); ConnectionSettings settings; settings.port = cluster[1]; settings.heartbeat = 1; FailoverManager fmgr(settings); Sender sender("my-queue", "my-data"); Receiver receiver(fmgr, "my-queue", "my-data"); qpid::sys::Thread runner(receiver); receiver.waitForReady(); { ScopedSuppressLogging allQuiet; // suppress connection closed messages cluster.kill(1); //sleep for 2 secs to allow the heartbeat task to fire on the now dead connection: ::usleep(2*1000*1000); } fmgr.execute(sender); runner.join(); BOOST_CHECK(!receiver.failed); fmgr.close(); } QPID_AUTO_TEST_CASE(testPolicyUpdate) { //tests that the policys internal state is accurate on newly //joined nodes ClusterFixture::Args args; args += "--log-enable", "critical"; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c1(cluster[0], "c1"); { ScopedSuppressLogging allQuiet; QueueOptions options; options.setSizePolicy(REJECT, 0, 2); c1.session.queueDeclare("q", arg::arguments=options, arg::durable=durableFlag); c1.session.messageTransfer(arg::content=makeMessage("one", "q", durableFlag)); cluster.add(); Client c2(cluster[1], "c2"); c2.session.messageTransfer(arg::content=makeMessage("two", "q", durableFlag)); BOOST_CHECK_THROW(c2.session.messageTransfer(arg::content=makeMessage("three", "q", durableFlag)), framing::ResourceLimitExceededException); Message received; BOOST_CHECK(c1.subs.get(received, "q")); BOOST_CHECK_EQUAL(received.getData(), std::string("one")); BOOST_CHECK(c1.subs.get(received, "q")); BOOST_CHECK_EQUAL(received.getData(), std::string("two")); BOOST_CHECK(!c1.subs.get(received, "q")); } } QPID_AUTO_TEST_CASE(testExclusiveQueueUpdate) { //tests that exclusive queues are accurately replicated on newly //joined nodes ClusterFixture::Args args; args += "--log-enable", "critical"; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c1(cluster[0], "c1"); { ScopedSuppressLogging allQuiet; c1.session.queueDeclare("q", arg::exclusive=true, arg::autoDelete=true, arg::alternateExchange="amq.fanout"); cluster.add(); Client c2(cluster[1], "c2"); QueueQueryResult result = c2.session.queueQuery("q"); BOOST_CHECK_EQUAL(result.getQueue(), std::string("q")); BOOST_CHECK(result.getExclusive()); BOOST_CHECK(result.getAutoDelete()); BOOST_CHECK(!result.getDurable()); BOOST_CHECK_EQUAL(result.getAlternateExchange(), std::string("amq.fanout")); BOOST_CHECK_THROW(c2.session.queueDeclare(arg::queue="q", arg::exclusive=true, arg::passive=true), framing::ResourceLockedException); c1.session.close(); c1.connection.close(); c2.session = c2.connection.newSession(); BOOST_CHECK_THROW(c2.session.queueDeclare(arg::queue="q", arg::passive=true), framing::NotFoundException); } } /** * Subscribes to specified queue and acquires up to the specified * number of message but does not accept or release them. These * message are therefore 'locked' by the clients session. */ Subscription lockMessages(Client& client, const std::string& queue, int count) { LocalQueue q; SubscriptionSettings settings(FlowControl::messageCredit(count)); settings.autoAck = 0; Subscription sub = client.subs.subscribe(q, queue, settings); client.session.messageFlush(sub.getName()); return sub; } /** * check that the specified queue contains the expected set of * messages (matched on content) for all nodes in the cluster */ void checkQueue(ClusterFixture& cluster, const std::string& queue, const std::vector& messages) { for (size_t i = 0; i < cluster.size(); i++) { Client client(cluster[i], (boost::format("%1%_%2%") % "c" % (i+1)).str()); BOOST_CHECK_EQUAL(browse(client, queue, messages.size()), messages); client.close(); } } void send(Client& client, const std::string& queue, int count, int start=1, const std::string& base="m", const std::string& lvqKey="") { for (int i = 0; i < count; i++) { Message message = makeMessage((boost::format("%1%_%2%") % base % (i+start)).str(), queue, durableFlag); if (!lvqKey.empty()) message.getHeaders().setString(QueueOptions::strLVQMatchProperty, lvqKey); client.session.messageTransfer(arg::content=message); } } QPID_AUTO_TEST_CASE(testRingQueueUpdate) { //tests that ring queues are accurately replicated on newly //joined nodes ClusterFixture::Args args; args += "--log-enable", "critical"; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c1(cluster[0], "c1"); { ScopedSuppressLogging allQuiet; QueueOptions options; options.setSizePolicy(RING, 0, 5); c1.session.queueDeclare("q", arg::arguments=options, arg::durable=durableFlag); send(c1, "q", 5); lockMessages(c1, "q", 1); //add new node cluster.add(); BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c1.connection, 2).size());//wait till joined //send one more message send(c1, "q", 1, 6); //release locked message c1.close(); //check state of queue on both nodes checkQueue(cluster, "q", list_of("m_2")("m_3")("m_4")("m_5")("m_6")); } } QPID_AUTO_TEST_CASE(testRingQueueUpdate2) { //tests that ring queues are accurately replicated on newly joined //nodes; just like testRingQueueUpdate, but new node joins after //the sixth message has been sent. ClusterFixture::Args args; args += "--log-enable", "critical"; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c1(cluster[0], "c1"); { ScopedSuppressLogging allQuiet; QueueOptions options; options.setSizePolicy(RING, 0, 5); c1.session.queueDeclare("q", arg::arguments=options, arg::durable=durableFlag); send(c1, "q", 5); lockMessages(c1, "q", 1); //send sixth message send(c1, "q", 1, 6); //add new node cluster.add(); BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c1.connection, 2).size());//wait till joined //release locked message c1.close(); //check state of queue on both nodes checkQueue(cluster, "q", list_of("m_2")("m_3")("m_4")("m_5")("m_6")); } } QPID_AUTO_TEST_CASE(testLvqUpdate) { //tests that lvqs are accurately replicated on newly joined nodes ClusterFixture::Args args; args += "--log-enable", "critical"; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c1(cluster[0], "c1"); { ScopedSuppressLogging allQuiet; QueueOptions options; options.setOrdering(LVQ); c1.session.queueDeclare("q", arg::arguments=options, arg::durable=durableFlag); send(c1, "q", 5, 1, "a", "a"); send(c1, "q", 2, 1, "b", "b"); send(c1, "q", 1, 1, "c", "c"); send(c1, "q", 1, 3, "b", "b"); //add new node cluster.add(); BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c1.connection, 2).size());//wait till joined //check state of queue on both nodes checkQueue(cluster, "q", list_of("a_5")("b_3")("c_1")); } } QPID_AUTO_TEST_CASE(testBrowsedLvqUpdate) { //tests that lvqs are accurately replicated on newly joined nodes //if the lvq state has been affected by browsers ClusterFixture::Args args; args += "--log-enable", "critical"; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c1(cluster[0], "c1"); { ScopedSuppressLogging allQuiet; QueueOptions options; options.setOrdering(LVQ); c1.session.queueDeclare("q", arg::arguments=options, arg::durable=durableFlag); send(c1, "q", 1, 1, "a", "a"); send(c1, "q", 2, 1, "b", "b"); send(c1, "q", 1, 1, "c", "c"); checkQueue(cluster, "q", list_of("a_1")("b_2")("c_1")); send(c1, "q", 4, 2, "a", "a"); send(c1, "q", 1, 3, "b", "b"); //add new node cluster.add(); BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c1.connection, 2).size());//wait till joined //check state of queue on both nodes checkQueue(cluster, "q", list_of("a_1")("b_2")("c_1")("a_5")("b_3")); } } QPID_AUTO_TEST_CASE(testRelease) { //tests that releasing a messages that was unacked when one node //joined works correctly ClusterFixture::Args args; args += "--log-enable", "critical"; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c1(cluster[0], "c1"); { ScopedSuppressLogging allQuiet; c1.session.queueDeclare("q", arg::durable=durableFlag); for (int i = 0; i < 5; i++) { c1.session.messageTransfer(arg::content=makeMessage((boost::format("%1%_%2%") % "m" % (i+1)).str(), "q", durableFlag)); } //receive but don't ack a message LocalQueue lq; SubscriptionSettings lqSettings(FlowControl::messageCredit(1)); lqSettings.autoAck = 0; Subscription lqSub = c1.subs.subscribe(lq, "q", lqSettings); c1.session.messageFlush("q"); Message received; BOOST_CHECK(lq.get(received)); BOOST_CHECK_EQUAL(received.getData(), std::string("m_1")); //add new node cluster.add(); lqSub.release(lqSub.getUnaccepted()); //check state of queue on both nodes vector expected = list_of("m_1")("m_2")("m_3")("m_4")("m_5"); Client c3(cluster[0], "c3"); BOOST_CHECK_EQUAL(browse(c3, "q", 5), expected); Client c2(cluster[1], "c2"); BOOST_CHECK_EQUAL(browse(c2, "q", 5), expected); } } // Browse for 1 message with byte credit, return true if a message was // received false if not. bool browseByteCredit(Client& c, const string& q, int n, Message& m) { SubscriptionSettings browseSettings( FlowControl(1, n, false), // 1 message, n bytes credit, no window ACCEPT_MODE_NONE, ACQUIRE_MODE_NOT_ACQUIRED, 0 // No auto-ack. ); LocalQueue lq; Subscription s = c.subs.subscribe(lq, q, browseSettings); c.session.messageFlush(arg::destination=q, arg::sync=true); c.session.sync(); c.subs.getSubscription(q).cancel(); return lq.get(m, 0); // No timeout, flush should push message thru. } // Ensure cluster update preserves exact message size, use byte credt as test. QPID_AUTO_TEST_CASE(testExactByteCredit) { ClusterFixture cluster(1, prepareArgs(), -1); Client c0(cluster[0], "c0"); c0.session.queueDeclare("q"); c0.session.messageTransfer(arg::content=Message("MyMessage", "q")); cluster.add(); int size=36; // Size of message on broker: headers+body Client c1(cluster[1], "c1"); Message m; // Ensure we get the message with exact credit. BOOST_CHECK(browseByteCredit(c0, "q", size, m)); BOOST_CHECK(browseByteCredit(c1, "q", size, m)); // and not with one byte less. BOOST_CHECK(!browseByteCredit(c0, "q", size-1, m)); BOOST_CHECK(!browseByteCredit(c1, "q", size-1, m)); } // Test that consumer positions are updated correctly. // Regression test for https://bugzilla.redhat.com/show_bug.cgi?id=541927 // QPID_AUTO_TEST_CASE(testUpdateConsumerPosition) { ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); c0.session.queueDeclare("q", arg::durable=durableFlag); SubscriptionSettings settings; settings.autoAck = 0; // Set the acquire mode to 'not-acquired' the consumer moves along the queue // but does not acquire (remove) messages. settings.acquireMode = ACQUIRE_MODE_NOT_ACQUIRED; Subscription s = c0.subs.subscribe(c0.lq, "q", settings); c0.session.messageTransfer(arg::content=makeMessage("1", "q", durableFlag)); BOOST_CHECK_EQUAL("1", c0.lq.get(TIMEOUT).getData()); // Add another member, send/receive another message and acquire // the messages. With the bug, this creates an inconsistency // because the browse position was not updated to the new member. cluster.add(); c0.session.messageTransfer(arg::content=makeMessage("2", "q", durableFlag)); BOOST_CHECK_EQUAL("2", c0.lq.get(TIMEOUT).getData()); s.acquire(s.getUnacquired()); s.accept(s.getUnaccepted()); // In the bug we now have 0 messages on cluster[0] and 1 message on cluster[1] // Subscribing on cluster[1] provokes an error that shuts down cluster[0] Client c1(cluster[1], "c1"); Subscription s1 = c1.subs.subscribe(c1.lq, "q"); // Default auto-ack=1 Message m; BOOST_CHECK(!c1.lq.get(m, TIMEOUT/10)); BOOST_CHECK_EQUAL(c1.session.queueQuery("q").getMessageCount(), 0u); BOOST_CHECK_EQUAL(c0.session.queueQuery("q").getMessageCount(), 0u); } QPID_AUTO_TEST_CASE(testFairsharePriorityDelivery) { ClusterFixture::Args args; prepareArgs(args, durableFlag); ClusterFixture cluster(1, args, -1); Client c0(cluster[0], "c0"); FieldTable arguments; arguments.setInt("x-qpid-priorities", 10); arguments.setInt("x-qpid-fairshare", 5); c0.session.queueDeclare("q", arg::durable=durableFlag, arg::arguments=arguments); //send messages of different priorities for (int i = 0; i < 20; i++) { Message msg = makeMessage((boost::format("msg-%1%") % i).str(), "q", durableFlag); msg.getDeliveryProperties().setPriority(i % 2 ? 9 : 5); c0.session.messageTransfer(arg::content=msg); } //pull off a couple of the messages (first four should be the top priority messages for (int i = 0; i < 4; i++) { BOOST_CHECK_EQUAL((boost::format("msg-%1%") % ((i*2)+1)).str(), c0.subs.get("q", TIMEOUT).getData()); } // Add another member cluster.add(); Client c1(cluster[1], "c1"); //pull off some more messages BOOST_CHECK_EQUAL((boost::format("msg-%1%") % 9).str(), c0.subs.get("q", TIMEOUT).getData()); BOOST_CHECK_EQUAL((boost::format("msg-%1%") % 0).str(), c1.subs.get("q", TIMEOUT).getData()); BOOST_CHECK_EQUAL((boost::format("msg-%1%") % 2).str(), c0.subs.get("q", TIMEOUT).getData()); //check queue has same content on both nodes BOOST_CHECK_EQUAL(browse(c0, "q", 12), browse(c1, "q", 12)); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/run_header_test.ps10000664000076400007640000000330711721742044020672 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Simple test of encode/decode of a double in application headers # TODO: this should be expanded to cover a wider set of types and go # in both directions $srcdir = Split-Path $myInvocation.InvocationName $PYTHON_DIR = "$srcdir\..\..\..\python" if (!(Test-Path $PYTHON_DIR -pathType Container)) { "Skipping header test as python libs not found" exit 0 } . .\test_env.ps1 if (Test-Path qpidd.port) { set-item -path env:QPID_PORT -value (get-content -path qpidd.port -totalcount 1) } # Test runs from the tests directory but the test executables are in a # subdirectory based on the build type. Look around for it before trying # to start it. . $srcdir\find_prog.ps1 .\header_test.exe if (!(Test-Path $prog)) { "Cannot locate header_test.exe" exit 1 } Invoke-Expression "$prog -p $env:QPID_PORT" | Write-Output Invoke-Expression "python $srcdir/header_test.py localhost $env:QPID_PORT" | Write-Output exit $LASTEXITCODE qpidc-0.16/src/tests/InitialStatusMap.cpp0000664000076400007640000002221711667435470021045 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "qpid/cluster/InitialStatusMap.h" #include "qpid/framing/Uuid.h" #include using namespace std; using namespace qpid::cluster; using namespace qpid::framing; using namespace qpid::framing::cluster; using namespace boost::assign; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(InitialStatusMapTestSuite) typedef InitialStatusMap::Status Status; Status activeStatus(const Uuid& id=Uuid(), const MemberSet& ms=MemberSet(), const framing::Array& urls=framing::Array()) { return Status(ProtocolVersion(), 0, true, id, STORE_STATE_NO_STORE, Uuid(), encodeMemberSet(ms), urls); } Status newcomerStatus(const Uuid& id=Uuid(), const MemberSet& ms=MemberSet(), const framing::Array& urls=framing::Array()) { return Status(ProtocolVersion(), 0, false, id, STORE_STATE_NO_STORE, Uuid(), encodeMemberSet(ms), urls); } Status storeStatus(bool active, StoreState state, Uuid start=Uuid(), Uuid stop=Uuid(), const MemberSet& ms=MemberSet(), const framing::Array& urls=framing::Array()) { return Status(ProtocolVersion(), 0, active, start, state, stop, encodeMemberSet(ms), urls); } QPID_AUTO_TEST_CASE(testFirstInCluster) { // Single member is first in cluster. InitialStatusMap map(MemberId(0), 1); Uuid id(true); BOOST_CHECK(!map.isComplete()); MemberSet members = list_of(MemberId(0)); map.configChange(members); BOOST_CHECK(!map.isComplete()); map.received(MemberId(0), newcomerStatus(id, list_of(0))); BOOST_CHECK(map.isComplete()); BOOST_CHECK(map.transitionToComplete()); BOOST_CHECK(map.getElders().empty()); BOOST_CHECK(!map.isUpdateNeeded()); BOOST_CHECK_EQUAL(id, map.getClusterId()); } QPID_AUTO_TEST_CASE(testJoinExistingCluster) { // Single member 0 joins existing cluster 1,2 InitialStatusMap map(MemberId(0), 1); Uuid id(true); MemberSet members = list_of(MemberId(0))(MemberId(1))(MemberId(2)); map.configChange(members); BOOST_CHECK(map.isResendNeeded()); BOOST_CHECK(!map.isComplete()); map.received(MemberId(0), newcomerStatus()); map.received(MemberId(1), activeStatus(id)); BOOST_CHECK(!map.isComplete()); map.received(MemberId(2), activeStatus(id)); BOOST_CHECK(map.isComplete()); BOOST_CHECK(map.transitionToComplete()); BOOST_CHECK_EQUAL(map.getElders(), list_of(1)(2)); BOOST_CHECK(map.isUpdateNeeded()); BOOST_CHECK_EQUAL(map.getClusterId(), id); // Check that transitionToComplete is reset. map.configChange(list_of(0)(1)); BOOST_CHECK(!map.transitionToComplete()); } QPID_AUTO_TEST_CASE(testMultipleFirstInCluster) { // Multiple members 0,1,2 join at same time. InitialStatusMap map(MemberId(1), 1); // self is 1 Uuid id(true); MemberSet members = list_of(MemberId(0))(MemberId(1))(MemberId(2)); map.configChange(members); BOOST_CHECK(map.isResendNeeded()); // All new members map.received(MemberId(0), newcomerStatus(id, list_of(0)(1)(2))); map.received(MemberId(1), newcomerStatus(id, list_of(0)(1)(2))); map.received(MemberId(2), newcomerStatus(id, list_of(0)(1)(2))); BOOST_CHECK(!map.isResendNeeded()); BOOST_CHECK(map.isComplete()); BOOST_CHECK(map.transitionToComplete()); BOOST_CHECK_EQUAL(map.getElders(), list_of(MemberId(2))); BOOST_CHECK(!map.isUpdateNeeded()); BOOST_CHECK_EQUAL(map.getClusterId(), id); } QPID_AUTO_TEST_CASE(testMultipleJoinExisting) { // Multiple members 2,3 join simultaneously a cluster containing 0,1. InitialStatusMap map(MemberId(2), 1); // self is 2 Uuid id(true); MemberSet members = list_of(MemberId(0))(MemberId(1))(MemberId(2))(MemberId(3)); map.configChange(members); BOOST_CHECK(map.isResendNeeded()); map.received(MemberId(0), activeStatus(id, list_of(0))); map.received(MemberId(1), newcomerStatus(id, list_of(0)(1))); map.received(MemberId(2), newcomerStatus(id, list_of(0)(1)(2)(3))); map.received(MemberId(3), newcomerStatus(id, list_of(0)(1)(2)(3))); BOOST_CHECK(!map.isResendNeeded()); BOOST_CHECK(map.isComplete()); BOOST_CHECK(map.transitionToComplete()); BOOST_CHECK_EQUAL(map.getElders(), list_of(0)(1)(3)); BOOST_CHECK(map.isUpdateNeeded()); BOOST_CHECK_EQUAL(map.getClusterId(), id); } QPID_AUTO_TEST_CASE(testMembersLeave) { // Test that map completes if members leave rather than send status. InitialStatusMap map(MemberId(0), 1); Uuid id(true); map.configChange(list_of(MemberId(0))(MemberId(1))(MemberId(2))); map.received(MemberId(0), newcomerStatus()); map.received(MemberId(1), activeStatus(id)); BOOST_CHECK(!map.isComplete()); map.configChange(list_of(MemberId(0))(MemberId(1))); // 2 left BOOST_CHECK(map.isComplete()); BOOST_CHECK(map.transitionToComplete()); BOOST_CHECK_EQUAL(map.getElders(), list_of(MemberId(1))); BOOST_CHECK_EQUAL(map.getClusterId(), id); } QPID_AUTO_TEST_CASE(testInteveningConfig) { // Multiple config changes arrives before we complete the map. InitialStatusMap map(MemberId(0), 1); Uuid id(true); map.configChange(list_of(0)(1)); BOOST_CHECK(map.isResendNeeded()); map.received(MemberId(0), newcomerStatus()); BOOST_CHECK(!map.isComplete()); BOOST_CHECK(!map.isResendNeeded()); // New member 2 joins before we receive 1 map.configChange(list_of(0)(1)(2)); BOOST_CHECK(!map.isComplete()); BOOST_CHECK(map.isResendNeeded()); map.received(1, activeStatus(id)); map.received(2, newcomerStatus()); // We should not be complete as we haven't received 0 since new member joined BOOST_CHECK(!map.isComplete()); BOOST_CHECK(!map.isResendNeeded()); map.received(0, newcomerStatus()); BOOST_CHECK(map.isComplete()); BOOST_CHECK(map.transitionToComplete()); BOOST_CHECK_EQUAL(map.getElders(), list_of(1)); BOOST_CHECK_EQUAL(map.getClusterId(), id); } QPID_AUTO_TEST_CASE(testAllCleanNoUpdate) { InitialStatusMap map(MemberId(0), 3); map.configChange(list_of(0)(1)(2)); map.received(MemberId(0), storeStatus(false, STORE_STATE_CLEAN_STORE)); map.received(MemberId(1), storeStatus(false, STORE_STATE_CLEAN_STORE)); map.received(MemberId(2), storeStatus(false, STORE_STATE_CLEAN_STORE)); BOOST_CHECK(!map.isUpdateNeeded()); } QPID_AUTO_TEST_CASE(testAllEmptyNoUpdate) { InitialStatusMap map(MemberId(0), 3); map.configChange(list_of(0)(1)(2)); map.received(MemberId(0), storeStatus(false, STORE_STATE_EMPTY_STORE)); map.received(MemberId(1), storeStatus(false, STORE_STATE_EMPTY_STORE)); map.received(MemberId(2), storeStatus(false, STORE_STATE_EMPTY_STORE)); BOOST_CHECK(map.isComplete()); BOOST_CHECK(!map.isUpdateNeeded()); } QPID_AUTO_TEST_CASE(testAllNoStoreNoUpdate) { InitialStatusMap map(MemberId(0), 3); map.configChange(list_of(0)(1)(2)); map.received(MemberId(0), storeStatus(false, STORE_STATE_NO_STORE)); map.received(MemberId(1), storeStatus(false, STORE_STATE_NO_STORE)); map.received(MemberId(2), storeStatus(false, STORE_STATE_NO_STORE)); BOOST_CHECK(map.isComplete()); BOOST_CHECK(!map.isUpdateNeeded()); } QPID_AUTO_TEST_CASE(testDirtyNeedUpdate) { InitialStatusMap map(MemberId(0), 3); map.configChange(list_of(0)(1)(2)); map.received(MemberId(0), storeStatus(false, STORE_STATE_DIRTY_STORE)); map.received(MemberId(1), storeStatus(false, STORE_STATE_CLEAN_STORE)); map.received(MemberId(2), storeStatus(false, STORE_STATE_CLEAN_STORE)); BOOST_CHECK(map.transitionToComplete()); BOOST_CHECK(map.isUpdateNeeded()); } QPID_AUTO_TEST_CASE(testEmptyNeedUpdate) { InitialStatusMap map(MemberId(0), 3); map.configChange(list_of(0)(1)(2)); map.received(MemberId(0), storeStatus(false, STORE_STATE_EMPTY_STORE)); map.received(MemberId(1), storeStatus(false, STORE_STATE_CLEAN_STORE)); map.received(MemberId(2), storeStatus(false, STORE_STATE_CLEAN_STORE)); BOOST_CHECK(map.transitionToComplete()); BOOST_CHECK(map.isUpdateNeeded()); } QPID_AUTO_TEST_CASE(testEmptyAlone) { InitialStatusMap map(MemberId(0), 1); map.configChange(list_of(0)); map.received(MemberId(0), storeStatus(false, STORE_STATE_EMPTY_STORE)); BOOST_CHECK(map.transitionToComplete()); BOOST_CHECK(!map.isUpdateNeeded()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/resuming_receiver.cpp0000664000076400007640000001241011363610132021300 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include using namespace qpid; using namespace qpid::client; using namespace qpid::framing; using namespace std; namespace qpid { namespace tests { class Listener : public MessageListener, public FailoverManager::Command, public FailoverManager::ReconnectionStrategy { public: Listener ( int report_frequency = 1000, int verbosity = 0, char const * queue_name = "message_queue" ); void received(Message& message); void execute(AsyncSession& session, bool isRetry); void check(); void editUrlList(vector& urls); private: Subscription subscription; uint count; vector received_twice; uint lastSn; bool gaps; uint reportFrequency; int verbosity; bool done; string queueName; }; Listener::Listener ( int freq, int verbosity, char const * name ) : count(0), lastSn(0), gaps(false), reportFrequency(freq), verbosity(verbosity), done(false), queueName ( name ) {} const std::string SN("sn"); void Listener::received(Message & message) { if (message.getData() == "That's all, folks!") { done = true; if(verbosity > 0 ) { cout << "Shutting down listener for " << message.getDestination() << endl; cout << "Listener received " << count << " messages (" << received_twice.size() << " received_twice)" << endl; } subscription.cancel(); if ( verbosity > 0 ) cout << "LISTENER COMPLETED\n"; if ( ! gaps ) { cout << "no gaps were detected\n"; cout << received_twice.size() << " messages were received twice.\n"; } else { cout << "gaps detected\n"; for ( unsigned int i = 0; i < received_twice.size(); ++ i ) cout << "received_twice " << received_twice[i] << endl; } } else { uint sn = message.getHeaders().getAsInt(SN); if (lastSn < sn) { if (sn - lastSn > 1) { cerr << "Error: gap in sequence between " << lastSn << " and " << sn << endl; gaps = true; } lastSn = sn; ++count; if ( ! ( count % reportFrequency ) ) { if ( verbosity > 0 ) cout << "Listener has received " << count << " messages on queue " << queueName << endl; } } else { received_twice.push_back ( sn ); } } } void Listener::check() { if (gaps) throw Exception("Detected gaps in sequence; messages appear to have been lost."); } void Listener::execute(AsyncSession& session, bool isRetry) { if (verbosity > 0) cout << "resuming_receiver " << (isRetry ? "first " : "re-") << "connect." << endl; if (!done) { SubscriptionManager subs(session); subscription = subs.subscribe(*this, queueName); subs.run(); } } void Listener::editUrlList(vector& urls) { /** * A more realistic algorithm would be to search through the list * for prefered hosts and ensure they come first in the list. */ if (urls.size() > 1) rotate(urls.begin(), urls.begin() + 1, urls.end()); } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char ** argv) { ConnectionSettings settings; if ( argc != 6 ) { cerr << "Usage: resuming_receiver host port report_frequency verbosity queue_name\n"; return 1; } settings.host = argv[1]; settings.port = atoi(argv[2]); int reportFrequency = atoi(argv[3]); int verbosity = atoi(argv[4]); char * queue_name = argv[5]; Listener listener ( reportFrequency, verbosity, queue_name ); FailoverManager connection(settings, &listener); try { connection.execute(listener); connection.close(); listener.check(); return 0; } catch(const exception& error) { cerr << "Receiver failed: " << error.what() << endl; } return 1; } qpidc-0.16/src/tests/CMakeLists.txt0000664000076400007640000003172311721742044017635 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Enable dashboard reporting. include (CTest) # Make sure that everything get built before the tests # Need to create a var with all the necessary top level targets add_definitions(-DBOOST_TEST_DYN_LINK) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) include (FindPythonInterp) # Create the environment scripts for tests set (abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR}) set (abs_builddir ${CMAKE_CURRENT_BINARY_DIR}) set (abs_top_srcdir ${CMAKE_SOURCE_DIR}) set (abs_top_builddir ${CMAKE_BINARY_DIR}) set (builddir_lib_suffix "") if (CMAKE_SYSTEM_NAME STREQUAL Windows) configure_file (${CMAKE_CURRENT_SOURCE_DIR}/test_env.ps1.in ${CMAKE_CURRENT_BINARY_DIR}/test_env.ps1) else (CMAKE_SYSTEM_NAME STREQUAL Windows) configure_file (${CMAKE_CURRENT_SOURCE_DIR}/test_env.sh.in ${CMAKE_CURRENT_BINARY_DIR}/test_env.sh) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) # If valgrind is selected in the configuration step, set up the path to it # for CTest. if (ENABLE_VALGRIND) set (MEMORYCHECK_COMMAND ${VALGRIND}) set (MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all --leak-check=full --demangle=yes --suppressions=${CMAKE_CURRENT_SOURCE_DIR}/.valgrind.supp --num-callers=25 --log-file=ctest_valgrind.vglog") endif (ENABLE_VALGRIND) # Using the Boost DLLs triggers warning 4275 on Visual Studio # (non dll-interface class used as base for dll-interface class). # This is ok, so suppress the warning. # Also, boost lengthy names trigger warning 4503, decorated name length exceeded # and using getenv() triggers insecure CRT warnings which we can silence in the # test environment. if (MSVC) add_definitions( /wd4275 /wd4503 /D_CRT_SECURE_NO_WARNINGS) endif (MSVC) # Like this to work with cmake 2.4 on Unix set (qpid_test_boost_libs ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SYSTEM_LIBRARY}) # Macro to make it easier to remember where the tests are built macro(remember_location testname) set (${testname}_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${testname}${CMAKE_EXECUTABLE_SUFFIX}) endmacro(remember_location) # Windows uses some process-startup calls to ensure that errors, etc. don't # result in error boxes being thrown up. Since it's expected that most test # runs will be in scripts, the default is to force these outputs to stderr # instead of windows. If you want to remove this code, build without the # QPID_WINDOWS_DEFAULT_TEST_OUTPUTS ON. if (CMAKE_SYSTEM_NAME STREQUAL Windows) option(QPID_WINDOWS_DEFAULT_TEST_OUTPUTS "Use default error-handling on Windows tests" OFF) if (NOT QPID_WINDOWS_DEFAULT_TEST_OUTPUTS) set(platform_test_additions windows/DisableWin32ErrorWindows.cpp) endif (NOT QPID_WINDOWS_DEFAULT_TEST_OUTPUTS) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) # # Unit test program # # Unit tests are built as a single program to reduce valgrind overhead # when running the tests. If you want to build a subset of the tests run # ccmake and set unit_tests_to_build to the set you want to build. set(unit_tests_to_build exception_test RefCounted SessionState logging AsyncCompletion Url Uuid Shlib FieldValue FieldTable Array QueueOptionsTest InlineAllocator InlineVector ClientSessionTest MessagingSessionTests SequenceSet StringUtils RangeSet AtomicValue QueueTest AccumulatedAckTest DtxWorkRecordTest DeliveryRecordTest ExchangeTest HeadersExchangeTest MessageTest QueueRegistryTest QueuePolicyTest QueueFlowLimitTest FramingTest HeaderTest SequenceNumberTest TimerTest TopicExchangeTest TxBufferTest TxPublishTest MessageBuilderTest ManagementTest MessageReplayTracker ConsoleTest QueueEvents ProxyTest RetryList FrameDecoder ReplicationTest ClientMessageTest PollableCondition Variant ClientMessage ${xml_tests} CACHE STRING "Which unit tests to build" ) mark_as_advanced(unit_tests_to_build) # Disabled till we move to amqp_0_10 codec. # amqp_0_10/serialize.cpp allSegmentTypes.h \ # amqp_0_10/ProxyTemplate.cpp \ # amqp_0_10/apply.cpp \ # amqp_0_10/Map.cpp \ # amqp_0_10/handlers.cpp add_executable (unit_test unit_test ${unit_tests_to_build} ${platform_test_additions}) target_link_libraries (unit_test ${qpid_test_boost_libs} qpidmessaging qpidbroker qmfconsole) remember_location(unit_test) add_library (shlibtest MODULE shlibtest.cpp) if (BUILD_CLUSTER) include (cluster.cmake) endif (BUILD_CLUSTER) # FIXME aconway 2009-11-30: enable SSL #if SSL #include ssl.mk #endif # # Other test programs # add_executable (qpid-perftest qpid-perftest.cpp ${platform_test_additions}) target_link_libraries (qpid-perftest qpidclient) #qpid_perftest_SOURCES=qpid-perftest.cpp test_tools.h TestOptions.h ConnectionOptions.h remember_location(qpid-perftest) add_executable (qpid-txtest qpid-txtest.cpp ${platform_test_additions}) target_link_libraries (qpid-txtest qpidclient) #qpid_txtest_SOURCES=qpid-txtest.cpp TestOptions.h ConnectionOptions.h remember_location(qpid-txtest) add_executable (qpid-latency-test qpid-latency-test.cpp ${platform_test_additions}) target_link_libraries (qpid-latency-test qpidclient) #qpid_latencytest_SOURCES=qpid-latency-test.cpp TestOptions.h ConnectionOptions.h remember_location(qpid-latency-test) add_executable (echotest echotest.cpp ${platform_test_additions}) target_link_libraries (echotest qpidclient) #echotest_SOURCES=echotest.cpp TestOptions.h ConnectionOptions.h remember_location(echotest) add_executable (qpid-client-test qpid-client-test.cpp ${platform_test_additions}) target_link_libraries (qpid-client-test qpidclient) #qpid_client_test_SOURCES=qpid-client-test.cpp TestOptions.h ConnectionOptions.h remember_location(qpid-client-test) add_executable (qpid-topic-listener qpid-topic-listener.cpp ${platform_test_additions}) target_link_libraries (qpid-topic-listener qpidclient) #qpid_topic_listener_SOURCES=qpid-topic-listener.cpp TestOptions.h ConnectionOptions.h remember_location(qpid-topic-listener) add_executable (qpid-topic-publisher qpid-topic-publisher.cpp ${platform_test_additions}) target_link_libraries (qpid-topic-publisher qpidclient) #qpid_topic_publisher_SOURCES=qpid-topic-publisher.cpp TestOptions.h ConnectionOptions.h remember_location(qpid-topic-publisher) add_executable (publish publish.cpp ${platform_test_additions}) target_link_libraries (publish qpidclient) #publish_SOURCES=publish.cpp TestOptions.h ConnectionOptions.h remember_location(publish) add_executable (consume consume.cpp ${platform_test_additions}) target_link_libraries (consume qpidclient) #consume_SOURCES=consume.cpp TestOptions.h ConnectionOptions.h remember_location(consume) add_executable (header_test header_test.cpp ${platform_test_additions}) target_link_libraries (header_test qpidclient) #header_test_SOURCES=header_test.cpp TestOptions.h ConnectionOptions.h remember_location(header_test) add_executable (declare_queues declare_queues.cpp ${platform_test_additions}) target_link_libraries (declare_queues qpidclient) remember_location(declare_queues) add_executable (replaying_sender replaying_sender.cpp ${platform_test_additions}) target_link_libraries (replaying_sender qpidclient) remember_location(replaying_sender) add_executable (resuming_receiver resuming_receiver.cpp ${platform_test_additions}) target_link_libraries (resuming_receiver qpidclient) remember_location(resuming_receiver) add_executable (txshift txshift.cpp ${platform_test_additions}) target_link_libraries (txshift qpidclient) #txshift_SOURCES=txshift.cpp TestOptions.h ConnectionOptions.h remember_location(txshift) add_executable (txjob txjob.cpp ${platform_test_additions}) target_link_libraries (txjob qpidclient) #txjob_SOURCES=txjob.cpp TestOptions.h ConnectionOptions.h remember_location(txjob) add_executable (receiver receiver.cpp ${platform_test_additions}) target_link_libraries (receiver qpidclient) #receiver_SOURCES=receiver.cpp TestOptions.h ConnectionOptions.h remember_location(receiver) add_executable (sender sender.cpp Statistics.cpp ${platform_test_additions}) target_link_libraries (sender qpidmessaging) #sender_SOURCES=sender.cpp TestOptions.h ConnectionOptions.h remember_location(sender) add_executable (qpid-receive qpid-receive.cpp Statistics.cpp ${platform_test_additions}) target_link_libraries (qpid-receive qpidmessaging) remember_location(qpid-receive) add_executable (qpid-send qpid-send.cpp Statistics.cpp ${platform_test_additions}) target_link_libraries (qpid-send qpidmessaging) remember_location(qpid-send) add_executable (qpid-ping qpid-ping.cpp ${platform_test_additions}) target_link_libraries (qpid-ping qpidclient) remember_location(qpid-ping) add_executable (datagen datagen.cpp ${platform_test_additions}) target_link_libraries (datagen qpidclient) remember_location(datagen) add_executable (msg_group_test msg_group_test.cpp ${platform_test_additions}) target_link_libraries (msg_group_test qpidmessaging) remember_location(msg_group_test) # qpid-perftest and qpid-latency-test are generally useful so install them install (TARGETS qpid-perftest qpid-latency-test RUNTIME DESTINATION ${QPID_INSTALL_BINDIR}) # This should ideally be done as part of the test run, but I don't know a way # to get these arguments and the working directory set like Makefile.am does, # and have that run during the test pass. if (PYTHON_EXECUTABLE) set (python_bld ${CMAKE_CURRENT_BINARY_DIR}/python) execute_process(COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${pythoon_bld} --install-lib=${python_bld} --install-scripts=${python_bld}/commands WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/../python) endif (PYTHON_EXECUTABLE) if (CMAKE_SYSTEM_NAME STREQUAL Windows) set (ENV{OUTDIR} ${EXECUTABLE_OUTPUT_PATH}) set (test_script_suffix ".ps1") set (shell "powershell") endif (CMAKE_SYSTEM_NAME STREQUAL Windows) set(test_wrap ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_test${test_script_suffix}) add_test (unit_test ${test_wrap} ${unit_test_LOCATION}) add_test (start_broker ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/start_broker${test_script_suffix}) add_test (qpid-client-test ${test_wrap} ${qpid-client-test_LOCATION}) add_test (quick_perftest ${test_wrap} ${qpid-perftest_LOCATION} --summary --count 100) add_test (quick_topictest ${test_wrap} ${CMAKE_CURRENT_SOURCE_DIR}/quick_topictest${test_script_suffix}) add_test (quick_txtest ${test_wrap} ${qpid-txtest_LOCATION} --queues 4 --tx-count 10 --quiet) if (PYTHON_EXECUTABLE) add_test (run_header_test ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_header_test${test_script_suffix}) add_test (python_tests ${test_wrap} ${CMAKE_CURRENT_SOURCE_DIR}/python_tests${test_script_suffix}) endif (PYTHON_EXECUTABLE) add_test (stop_broker ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/stop_broker${test_script_suffix}) if (PYTHON_EXECUTABLE) add_test (ha_tests ${test_wrap} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ha_tests.py) add_test (ipv6_test ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/ipv6_test${test_script_suffix}) add_test (federation_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_federation_tests${test_script_suffix}) if (BUILD_ACL) add_test (acl_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_acl_tests${test_script_suffix}) endif (BUILD_ACL) add_test (dynamic_log_level_test ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/dynamic_log_level_test${test_script_suffix}) if (BUILD_MSSQL) add_test (store_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_store_tests${test_script_suffix} MSSQL) endif (BUILD_MSSQL) if (BUILD_MSCLFS) add_test (store_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_store_tests${test_script_suffix} MSSQL-CLFS) endif (BUILD_MSCLFS) endif (PYTHON_EXECUTABLE) add_library(test_store MODULE test_store.cpp) target_link_libraries (test_store qpidbroker qpidcommon) set_target_properties (test_store PROPERTIES PREFIX "") add_library (dlclose_noop MODULE dlclose_noop.c) #libdlclose_noop_la_LDFLAGS = -module -rpath $(abs_builddir) #CLEANFILES+=valgrind.out *.log *.vglog* dummy_test $(unit_wrappers) # ## Longer running stability tests, not run by default check: target. ## Not run under valgrind, too slow #LONG_TESTS=fanout_perftest shared_perftest multiq_perftest topic_perftest run_failover_soak #EXTRA_DIST+=$(LONG_TESTS) run_perftest #check-long: # $(MAKE) check TESTS="start_broker $(LONG_TESTS) stop_broker" VALGRIND= qpidc-0.16/src/tests/Qmf2.cpp0000664000076400007640000003572311633730116016411 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/types/Variant.h" #include "qmf/QueryImpl.h" #include "qmf/SchemaImpl.h" #include "qmf/exceptions.h" #include "qpid/messaging/Connection.h" #include "qmf/PosixEventNotifierImpl.h" #include "qmf/AgentSession.h" #include "qmf/AgentSessionImpl.h" #include "qmf/ConsoleSession.h" #include "qmf/ConsoleSessionImpl.h" #include "unit_test.h" using namespace std; using namespace qpid::types; using namespace qpid::messaging; using namespace qmf; bool isReadable(int fd) { fd_set rfds; struct timeval tv; int nfds, result; FD_ZERO(&rfds); FD_SET(fd, &rfds); nfds = fd + 1; tv.tv_sec = 0; tv.tv_usec = 0; result = select(nfds, &rfds, NULL, NULL, &tv); return result > 0; } namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(Qmf2Suite) QPID_AUTO_TEST_CASE(testQuery) { Query query(QUERY_OBJECT, "class_name", "package_name", "[and, [eq, name, [quote, smith]], [lt, age, [quote, 27]]]"); Query newQuery(new QueryImpl(QueryImplAccess::get(query).asMap())); BOOST_CHECK_EQUAL(newQuery.getTarget(), QUERY_OBJECT); BOOST_CHECK_EQUAL(newQuery.getSchemaId().getName(), "class_name"); BOOST_CHECK_EQUAL(newQuery.getSchemaId().getPackageName(), "package_name"); Variant::List pred(newQuery.getPredicate()); BOOST_CHECK_EQUAL(pred.size(), size_t(3)); Variant::List::iterator iter(pred.begin()); BOOST_CHECK_EQUAL(iter->asString(), "and"); iter++; BOOST_CHECK_EQUAL(iter->getType(), VAR_LIST); iter++; BOOST_CHECK_EQUAL(iter->getType(), VAR_LIST); iter = iter->asList().begin(); BOOST_CHECK_EQUAL(iter->asString(), "lt"); iter++; BOOST_CHECK_EQUAL(iter->asString(), "age"); iter++; BOOST_CHECK_EQUAL(iter->getType(), VAR_LIST); iter = iter->asList().begin(); BOOST_CHECK_EQUAL(iter->asString(), "quote"); iter++; BOOST_CHECK_EQUAL(iter->asUint32(), uint32_t(27)); Query query2(QUERY_OBJECT_ID); Query newQuery2(new QueryImpl(QueryImplAccess::get(query2).asMap())); BOOST_CHECK_EQUAL(newQuery2.getTarget(), QUERY_OBJECT_ID); Query query3(QUERY_SCHEMA); Query newQuery3(new QueryImpl(QueryImplAccess::get(query3).asMap())); BOOST_CHECK_EQUAL(newQuery3.getTarget(), QUERY_SCHEMA); Query query4(QUERY_SCHEMA_ID); Query newQuery4(new QueryImpl(QueryImplAccess::get(query4).asMap())); BOOST_CHECK_EQUAL(newQuery4.getTarget(), QUERY_SCHEMA_ID); DataAddr addr("name", "agent_name", 34); Query query5(addr); Query newQuery5(new QueryImpl(QueryImplAccess::get(query5).asMap())); BOOST_CHECK_EQUAL(newQuery5.getTarget(), QUERY_OBJECT); BOOST_CHECK_EQUAL(newQuery5.getDataAddr().getName(), "name"); BOOST_CHECK_EQUAL(newQuery5.getDataAddr().getAgentName(), "agent_name"); BOOST_CHECK_EQUAL(newQuery5.getDataAddr().getAgentEpoch(), uint32_t(34)); } QPID_AUTO_TEST_CASE(testQueryPredicateErrors) { Query query; Variant::Map map; BOOST_CHECK_THROW(Query(QUERY_OBJECT, "INVALID"), QmfException); query = Query(QUERY_OBJECT, "[unknown, one, two]"); BOOST_CHECK_THROW(query.matchesPredicate(map), QmfException); query = Query(QUERY_OBJECT, "[eq, first]"); BOOST_CHECK_THROW(query.matchesPredicate(map), QmfException); query = Query(QUERY_OBJECT, "[exists]"); BOOST_CHECK_THROW(query.matchesPredicate(map), QmfException); query = Query(QUERY_OBJECT, "[eq, first, [quote, 1, 2, 3]]]"); BOOST_CHECK_THROW(query.matchesPredicate(map), QmfException); query = Query(QUERY_OBJECT, "[eq, first, [unexpected, 3]]]"); BOOST_CHECK_THROW(query.matchesPredicate(map), QmfException); query = Query(QUERY_OBJECT, "[eq, first, {}]]"); BOOST_CHECK_THROW(query.matchesPredicate(map), QmfException); query = Query(QUERY_OBJECT, "[eq, first, second, third]"); BOOST_CHECK_THROW(query.matchesPredicate(map), QmfException); query = Query(QUERY_OBJECT, "[and, first, second, third]"); BOOST_CHECK_THROW(query.matchesPredicate(map), QmfException); } QPID_AUTO_TEST_CASE(testQueryPredicate) { Query query; Variant::Map map; map["forty"] = 40; map["fifty"] = 50; map["minus_ten"] = -10; map["pos_float"] = 100.05; map["neg_float"] = -1000.33; map["name"] = "jones"; map["bool_t"] = true; map["bool_f"] = false; BOOST_CHECK_THROW(Query(QUERY_OBJECT, "INVALID"), QmfException); query = Query(QUERY_OBJECT); BOOST_CHECK_EQUAL(query.matchesPredicate(Variant::Map()), true); query = Query(QUERY_OBJECT, "[eq, forty, [quote, 40]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[eq, forty, [quote, 41]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[le, forty, fifty]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[and, [eq, forty, [quote, 40]], [eq, name, [quote, jones]]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[and, [eq, forty, [quote, 40]], [eq, name, [quote, smith]]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[or, [eq, forty, [quote, 40]], [eq, name, [quote, smith]]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[or, [eq, forty, [quote, 41]], [eq, name, [quote, smith]]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[not, [le, forty, [quote, 40]]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[le, forty, [quote, 40]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[ge, forty, [quote, 40]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[lt, forty, [quote, 45]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[lt, [quote, 45], forty]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[gt, forty, [quote, 45]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[gt, [quote, 45], forty]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[eq, bool_t, [quote, True]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[eq, bool_t, [quote, False]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[eq, bool_f, [quote, True]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[eq, bool_f, [quote, False]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[eq, minus_ten, [quote, -10]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[lt, minus_ten, [quote, -20]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[lt, [quote, -20], minus_ten]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[exists, name]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); query = Query(QUERY_OBJECT, "[exists, nonexfield]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), false); query = Query(QUERY_OBJECT, "[eq, pos_float, [quote, 100.05]]"); BOOST_CHECK_EQUAL(query.matchesPredicate(map), true); } QPID_AUTO_TEST_CASE(testSchema) { Schema in(SCHEMA_TYPE_DATA, "package", "class"); in.addProperty(SchemaProperty("prop1", SCHEMA_DATA_BOOL, "{desc:'Property One'}")); in.addProperty(SchemaProperty("prop2", SCHEMA_DATA_INT, "{desc:'Property Two',unit:'Furlong'}")); in.addProperty(SchemaProperty("prop3", SCHEMA_DATA_STRING, "{desc:'Property Three'}")); SchemaMethod method1("method1", "{desc:'Method One'}"); method1.addArgument(SchemaProperty("arg1", SCHEMA_DATA_BOOL, "{desc:'Argument One',dir:IN}")); method1.addArgument(SchemaProperty("arg2", SCHEMA_DATA_INT, "{desc:'Argument Two',dir:OUT}")); method1.addArgument(SchemaProperty("arg3", SCHEMA_DATA_FLOAT, "{desc:'Argument Three',dir:INOUT}")); in.addMethod(method1); SchemaMethod method2("method2", "{desc:'Method Two'}"); method2.addArgument(SchemaProperty("arg21", SCHEMA_DATA_BOOL, "{desc:'Argument One',dir:IN}")); method2.addArgument(SchemaProperty("arg22", SCHEMA_DATA_INT, "{desc:'Argument Two',dir:OUT}")); method2.addArgument(SchemaProperty("arg23", SCHEMA_DATA_FLOAT, "{desc:'Argument Three',dir:INOUT}")); in.addMethod(method2); BOOST_CHECK(!in.isFinalized()); in.finalize(); BOOST_CHECK(in.isFinalized()); Variant::Map map(SchemaImplAccess::get(in).asMap()); Schema out(new SchemaImpl(map)); BOOST_CHECK(out.isFinalized()); BOOST_CHECK_EQUAL(out.getSchemaId().getType(), SCHEMA_TYPE_DATA); BOOST_CHECK_EQUAL(out.getSchemaId().getPackageName(), "package"); BOOST_CHECK_EQUAL(out.getSchemaId().getName(), "class"); BOOST_CHECK_EQUAL(out.getSchemaId().getHash(), in.getSchemaId().getHash()); BOOST_CHECK_EQUAL(out.getPropertyCount(), uint32_t(3)); SchemaProperty prop; prop = out.getProperty(0); BOOST_CHECK_EQUAL(prop.getName(), "prop1"); BOOST_CHECK_EQUAL(prop.getType(), SCHEMA_DATA_BOOL); BOOST_CHECK_EQUAL(prop.getDesc(), "Property One"); prop = out.getProperty(1); BOOST_CHECK_EQUAL(prop.getName(), "prop2"); BOOST_CHECK_EQUAL(prop.getType(), SCHEMA_DATA_INT); BOOST_CHECK_EQUAL(prop.getDesc(), "Property Two"); BOOST_CHECK_EQUAL(prop.getUnit(), "Furlong"); BOOST_CHECK(!prop.isIndex()); prop = out.getProperty(2); BOOST_CHECK_EQUAL(prop.getName(), "prop3"); BOOST_CHECK_EQUAL(prop.getType(), SCHEMA_DATA_STRING); BOOST_CHECK_EQUAL(prop.getDesc(), "Property Three"); BOOST_CHECK_THROW(out.getProperty(3), QmfException); BOOST_CHECK_EQUAL(out.getMethodCount(), uint32_t(2)); SchemaMethod method; method = out.getMethod(0); BOOST_CHECK_EQUAL(method.getName(), "method1"); BOOST_CHECK_EQUAL(method.getDesc(), "Method One"); BOOST_CHECK_EQUAL(method.getArgumentCount(), uint32_t(3)); prop = method.getArgument(0); BOOST_CHECK_EQUAL(prop.getName(), "arg1"); BOOST_CHECK_EQUAL(prop.getType(), SCHEMA_DATA_BOOL); BOOST_CHECK_EQUAL(prop.getDesc(), "Argument One"); BOOST_CHECK_EQUAL(prop.getDirection(), DIR_IN); prop = method.getArgument(1); BOOST_CHECK_EQUAL(prop.getName(), "arg2"); BOOST_CHECK_EQUAL(prop.getType(), SCHEMA_DATA_INT); BOOST_CHECK_EQUAL(prop.getDesc(), "Argument Two"); BOOST_CHECK_EQUAL(prop.getDirection(), DIR_OUT); prop = method.getArgument(2); BOOST_CHECK_EQUAL(prop.getName(), "arg3"); BOOST_CHECK_EQUAL(prop.getType(), SCHEMA_DATA_FLOAT); BOOST_CHECK_EQUAL(prop.getDesc(), "Argument Three"); BOOST_CHECK_EQUAL(prop.getDirection(), DIR_IN_OUT); BOOST_CHECK_THROW(method.getArgument(3), QmfException); method = out.getMethod(1); BOOST_CHECK_EQUAL(method.getName(), "method2"); BOOST_CHECK_EQUAL(method.getDesc(), "Method Two"); BOOST_CHECK_EQUAL(method.getArgumentCount(), uint32_t(3)); prop = method.getArgument(0); BOOST_CHECK_EQUAL(prop.getName(), "arg21"); BOOST_CHECK_EQUAL(prop.getType(), SCHEMA_DATA_BOOL); BOOST_CHECK_EQUAL(prop.getDesc(), "Argument One"); BOOST_CHECK_EQUAL(prop.getDirection(), DIR_IN); prop = method.getArgument(1); BOOST_CHECK_EQUAL(prop.getName(), "arg22"); BOOST_CHECK_EQUAL(prop.getType(), SCHEMA_DATA_INT); BOOST_CHECK_EQUAL(prop.getDesc(), "Argument Two"); BOOST_CHECK_EQUAL(prop.getDirection(), DIR_OUT); prop = method.getArgument(2); BOOST_CHECK_EQUAL(prop.getName(), "arg23"); BOOST_CHECK_EQUAL(prop.getType(), SCHEMA_DATA_FLOAT); BOOST_CHECK_EQUAL(prop.getDesc(), "Argument Three"); BOOST_CHECK_EQUAL(prop.getDirection(), DIR_IN_OUT); BOOST_CHECK_THROW(method.getArgument(3), QmfException); } QPID_AUTO_TEST_CASE(testAgentSessionEventListener) { Connection connection("localhost"); AgentSession session(connection, ""); posix::EventNotifier notifier(session); AgentSessionImpl& sessionImpl = AgentSessionImplAccess::get(session); BOOST_CHECK(sessionImpl.getEventNotifier() != 0); } QPID_AUTO_TEST_CASE(testConsoleSessionEventListener) { Connection connection("localhost"); ConsoleSession session(connection, ""); posix::EventNotifier notifier(session); ConsoleSessionImpl& sessionImpl = ConsoleSessionImplAccess::get(session); BOOST_CHECK(sessionImpl.getEventNotifier() != 0); } QPID_AUTO_TEST_CASE(testGetHandle) { Connection connection("localhost"); ConsoleSession session(connection, ""); posix::EventNotifier notifier(session); BOOST_CHECK(notifier.getHandle() > 0); } QPID_AUTO_TEST_CASE(testSetReadableToFalse) { Connection connection("localhost"); ConsoleSession session(connection, ""); posix::EventNotifier notifier(session); PosixEventNotifierImplAccess::get(notifier).setReadable(false); bool readable(isReadable(notifier.getHandle())); BOOST_CHECK(!readable); } QPID_AUTO_TEST_CASE(testSetReadable) { Connection connection("localhost"); ConsoleSession session(connection, ""); posix::EventNotifier notifier(session); PosixEventNotifierImplAccess::get(notifier).setReadable(true); bool readable(isReadable(notifier.getHandle())); BOOST_CHECK(readable); } QPID_AUTO_TEST_CASE(testSetReadableMultiple) { Connection connection("localhost"); ConsoleSession session(connection, ""); posix::EventNotifier notifier(session); for (int i = 0; i < 15; i++) PosixEventNotifierImplAccess::get(notifier).setReadable(true); PosixEventNotifierImplAccess::get(notifier).setReadable(false); bool readable(isReadable(notifier.getHandle())); BOOST_CHECK(!readable); } QPID_AUTO_TEST_CASE(testDeleteNotifier) { Connection connection("localhost"); ConsoleSession session(connection, ""); ConsoleSessionImpl& sessionImpl = ConsoleSessionImplAccess::get(session); { posix::EventNotifier notifier(session); BOOST_CHECK(sessionImpl.getEventNotifier() != 0); } BOOST_CHECK(sessionImpl.getEventNotifier() == 0); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/allSegmentTypes.h0000664000076400007640000001622211752725700020367 0ustar00jrossjross00000000000000#ifndef TESTS_ALLSEGMENTTYPES_H #define TESTS_ALLSEGMENTTYPES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/specification.h" #include "qpid/amqp_0_10/Header.h" #include "qpid/amqp_0_10/Body.h" using namespace qpid::amqp_0_10; template size_t allSegmentTypes(Op& op) { op(Header()); op(Body()); op(ControlHolder(connection::Start())); op(ControlHolder(connection::StartOk())); op(ControlHolder(connection::Secure())); op(ControlHolder(connection::SecureOk())); op(ControlHolder(connection::Tune())); op(ControlHolder(connection::TuneOk())); op(ControlHolder(connection::Open())); op(ControlHolder(connection::OpenOk())); op(ControlHolder(connection::Redirect())); op(ControlHolder(connection::Heartbeat())); op(ControlHolder(connection::Close())); op(ControlHolder(connection::CloseOk())); op(ControlHolder(session::Attach())); op(ControlHolder(session::Attached())); op(ControlHolder(session::Detach())); op(ControlHolder(session::Detached())); op(ControlHolder(session::RequestTimeout())); op(ControlHolder(session::Timeout())); op(ControlHolder(session::CommandPoint())); op(ControlHolder(session::Expected())); op(ControlHolder(session::Confirmed())); op(ControlHolder(session::Completed())); op(ControlHolder(session::KnownCompleted())); op(ControlHolder(session::Flush())); op(ControlHolder(session::Gap())); op(CommandHolder(execution::Sync())); op(CommandHolder(execution::Result())); op(CommandHolder(execution::Exception())); op(CommandHolder(message::Transfer())); op(CommandHolder(message::Accept())); op(CommandHolder(message::Reject())); op(CommandHolder(message::Release())); op(CommandHolder(message::Acquire())); op(CommandHolder(message::Resume())); op(CommandHolder(message::Subscribe())); op(CommandHolder(message::Cancel())); op(CommandHolder(message::SetFlowMode())); op(CommandHolder(message::Flow())); op(CommandHolder(message::Flush())); op(CommandHolder(message::Stop())); op(CommandHolder(tx::Select())); op(CommandHolder(tx::Commit())); op(CommandHolder(tx::Rollback())); op(CommandHolder(dtx::Select())); op(CommandHolder(dtx::Start())); op(CommandHolder(dtx::End())); op(CommandHolder(dtx::Commit())); op(CommandHolder(dtx::Forget())); op(CommandHolder(dtx::GetTimeout())); op(CommandHolder(dtx::Prepare())); op(CommandHolder(dtx::Recover())); op(CommandHolder(dtx::Rollback())); op(CommandHolder(dtx::SetTimeout())); op(CommandHolder(exchange::Declare())); op(CommandHolder(exchange::Delete())); op(CommandHolder(exchange::Query())); op(CommandHolder(exchange::Bind())); op(CommandHolder(exchange::Unbind())); op(CommandHolder(exchange::Bound())); op(CommandHolder(queue::Declare())); op(CommandHolder(queue::Delete())); op(CommandHolder(queue::Purge())); op(CommandHolder(queue::Query())); op(CommandHolder(file::Qos())); op(CommandHolder(file::QosOk())); op(CommandHolder(file::Consume())); op(CommandHolder(file::ConsumeOk())); op(CommandHolder(file::Cancel())); op(CommandHolder(file::Open())); op(CommandHolder(file::OpenOk())); op(CommandHolder(file::Stage())); op(CommandHolder(file::Publish())); op(CommandHolder(file::Return())); op(CommandHolder(file::Deliver())); op(CommandHolder(file::Ack())); op(CommandHolder(file::Reject())); op(CommandHolder(stream::Qos())); op(CommandHolder(stream::QosOk())); op(CommandHolder(stream::Consume())); op(CommandHolder(stream::ConsumeOk())); op(CommandHolder(stream::Cancel())); op(CommandHolder(stream::Publish())); op(CommandHolder(stream::Return())); op(CommandHolder(stream::Deliver())); op(ControlHolder(cluster::UpdateRequest())); op(ControlHolder(cluster::UpdateOffer())); op(ControlHolder(cluster::RetractOffer())); op(ControlHolder(cluster::InitialStatus())); op(ControlHolder(cluster::Ready())); op(ControlHolder(cluster::ConfigChange())); op(ControlHolder(cluster::ErrorCheck())); op(ControlHolder(cluster::TimerWakeup())); op(ControlHolder(cluster::TimerDrop())); op(ControlHolder(cluster::Shutdown())); op(ControlHolder(cluster::DeliverToQueue())); op(ControlHolder(cluster::Clock())); op(ControlHolder(cluster_connection::Announce())); op(ControlHolder(cluster_connection::DeliverClose())); op(ControlHolder(cluster_connection::DeliverDoOutput())); op(ControlHolder(cluster_connection::Abort())); op(ControlHolder(cluster_connection::ShadowSetUser())); op(ControlHolder(cluster_connection::ShadowPrepare())); op(ControlHolder(cluster_connection::ConsumerState())); op(ControlHolder(cluster_connection::DeliveryRecord())); op(ControlHolder(cluster_connection::TxStart())); op(ControlHolder(cluster_connection::TxAccept())); op(ControlHolder(cluster_connection::TxDequeue())); op(ControlHolder(cluster_connection::TxEnqueue())); op(ControlHolder(cluster_connection::TxPublish())); op(ControlHolder(cluster_connection::TxEnd())); op(ControlHolder(cluster_connection::AccumulatedAck())); op(ControlHolder(cluster_connection::OutputTask())); op(ControlHolder(cluster_connection::DtxStart())); op(ControlHolder(cluster_connection::DtxEnd())); op(ControlHolder(cluster_connection::DtxAck())); op(ControlHolder(cluster_connection::DtxBufferRef())); op(ControlHolder(cluster_connection::DtxWorkRecord())); op(ControlHolder(cluster_connection::SessionState())); op(ControlHolder(cluster_connection::ShadowReady())); op(ControlHolder(cluster_connection::Membership())); op(ControlHolder(cluster_connection::RetractOffer())); op(ControlHolder(cluster_connection::QueuePosition())); op(ControlHolder(cluster_connection::Exchange())); op(ControlHolder(cluster_connection::AddQueueListener())); op(ControlHolder(cluster_connection::ManagementSetupState())); op(ControlHolder(cluster_connection::Config())); op(ControlHolder(cluster_connection::QueueFairshareState())); op(ControlHolder(cluster_connection::QueueObserverState())); op(ControlHolder(cluster_connection::Clock())); op(ControlHolder(cluster_connection::QueueDequeueSincePurgeState())); return 26; } #endif /*!TESTS_ALLSEGMENTTYPES_H*/ qpidc-0.16/src/tests/TestOptions.h0000664000076400007640000000450011252003060017515 0ustar00jrossjross00000000000000#ifndef _TestOptions_ #define _TestOptions_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Options.h" #include "qpid/log/Options.h" #include "qpid/Url.h" #include "qpid/log/Logger.h" #include "qpid/client/Connection.h" #include "ConnectionOptions.h" #include #include namespace qpid { struct TestOptions : public qpid::Options { TestOptions(const std::string& helpText_=std::string(), const std::string& argv0=std::string()) : Options("Test Options"), help(false), log(argv0), helpText(helpText_) { addOptions() ("help", optValue(help), "print this usage statement"); add(con); add(log); } /** As well as parsing, throw help message if requested. */ void parse(int argc, char** argv) { try { qpid::Options::parse(argc, argv); } catch (const std::exception& e) { std::ostringstream msg; msg << *this << std::endl << std::endl << e.what() << std::endl; throw qpid::Options::Exception(msg.str()); } qpid::log::Logger::instance().configure(log); if (help) { std::ostringstream msg; msg << *this << std::endl << std::endl << helpText << std::endl; throw qpid::Options::Exception(msg.str()); } } /** Open a connection using option values */ void open(qpid::client::Connection& connection) { connection.open(con); } bool help; ConnectionOptions con; qpid::log::Options log; std::string helpText; }; } #endif qpidc-0.16/src/tests/vg_check0000664000076400007640000000304211463377073016573 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Check for valgrind errors. Sourced by test scripts. vg_failed() { echo "Valgrind error log in $VG_LOG." 1>&2 cat $VG_LOG 1>&2 echo $1 1>&2 exit 1 } vg_check() { test -z "$1" || VG_LOG=$1 test -f $VG_LOG || vg_failed Valgrind log file $VG_LOG missing. # Ensure there is an ERROR SUMMARY line. grep -E '^==[0-9]+== ERROR SUMMARY:' $VG_LOG > /dev/null || \ vg_failed "No valgrind ERROR SUMMARY line in $VG_LOG." # Ensure that the number of errors is 0. grep -E '^==[0-9]+== ERROR SUMMARY: [^0]' $VG_LOG > /dev/null && \ vg_failed "Valgrind reported errors in $VG_LOG; see above." # Check for leaks. grep -E '^==[0-9]+== +.* lost: [^0]' $VG_LOG && \ vg_failed "Found memory leaks (see log file, $VG_LOG); see above." true } qpidc-0.16/src/tests/quick_perftest0000775000076400007640000000154611654250703020054 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # exec `dirname $0`/run_test ./qpid-perftest --summary --count 100 qpidc-0.16/src/tests/publish.cpp0000664000076400007640000000760211252003060017231 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include "TestOptions.h" #include "qpid/client/Connection.h" #include "qpid/client/Message.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/SubscriptionManager.h" using namespace qpid; using namespace qpid::client; using namespace qpid::sys; using namespace std; namespace qpid { namespace tests { typedef vector StringSet; struct Args : public qpid::TestOptions { uint size; uint count; bool durable; string destination; string routingKey; bool summary; bool id; Args() : size(256), count(1000), durable(true), routingKey("publish-consume"), summary(false), id(false) { addOptions() ("size", optValue(size, "N"), "message size") ("count", optValue(count, "N"), "number of messages to publish") ("durable", optValue(durable, "yes|no"), "use durable messages") ("destination", optValue(destination, ""), "destination to publish to") ("routing-key", optValue(routingKey, ""), "routing key to publish with") ("summary,s", optValue(summary), "Output only the rate.") ("id", optValue(id), "Add unique correlation ID"); } }; Args opts; struct Client { Connection connection; AsyncSession session; Client() { opts.open(connection); session = connection.newSession(); } // Cheap hex calculation, avoid expensive ostrstream and string // creation to generate correlation ids in message loop. char hex(char i) { return i<10 ? '0'+i : 'A'+i-10; } void hex(char i, string& s) { s[0]=hex(i>>24); s[1]=hex(i>>16); s[2]=hex(i>>8); s[3]=i; } void publish() { AbsTime begin=now(); Message msg(string(opts.size, 'X'), opts.routingKey); string correlationId = "0000"; if (opts.durable) msg.getDeliveryProperties().setDeliveryMode(framing::PERSISTENT); for (uint i = 0; i < opts.count; i++) { if (opts.id) { hex(i+1, correlationId); msg.getMessageProperties().setCorrelationId(correlationId); } session.messageTransfer(arg::destination=opts.destination, arg::content=msg, arg::acceptMode=1); } session.sync(); AbsTime end=now(); double secs(double(Duration(begin,end))/TIME_SEC); if (opts.summary) cout << opts.count/secs << endl; else cout << "Time: " << secs << "s Rate: " << opts.count/secs << endl; } ~Client() { try{ session.close(); connection.close(); } catch(const exception& e) { cout << e.what() << endl; } } }; }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { try { opts.parse(argc, argv); Client client; client.publish(); return 0; } catch(const exception& e) { cout << e.what() << endl; } return 1; } qpidc-0.16/src/tests/cluster.mk0000664000076400007640000000601611656521044017106 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Include cluster scripts and extra files in distribution even if # we're not configured for cluster. # Useful scripts for doing cluster testing. CLUSTER_TEST_SCRIPTS_LIST= \ allhosts rsynchosts \ qpid-build-rinstall qpid-src-rinstall \ qpid-test-cluster \ qpid-cluster-benchmark EXTRA_DIST += \ $(CLUSTER_TEST_SCRIPTS_LIST) \ ais_check \ run_cluster_test \ cluster_read_credit \ test_watchdog \ start_cluster \ stop_cluster \ restart_cluster \ cluster_python_tests \ cluster_python_tests_failing.txt \ federated_cluster_test \ clustered_replication_test \ run_cluster_tests \ run_long_cluster_tests \ testlib.py \ brokertest.py \ cluster_tests.py \ cluster_test_logs.py \ long_cluster_tests.py \ cluster_tests.fail if HAVE_LIBCPG # # Cluster tests makefile fragment, to be included in Makefile.am # # NOTE: Programs using the openais library must be run with gid=ais # You should do "newgrp ais" before running the tests to run these. # # ais_check checks pre-requisites for cluster tests and runs them if ok. TESTS += \ run_cluster_test \ cluster_read_credit \ test_watchdog \ run_cluster_tests \ federated_cluster_test \ clustered_replication_test # Clean up after cluster_test and start_cluster CLEANFILES += cluster_test.acl cluster.ports LONG_TESTS += \ run_long_cluster_tests \ start_cluster \ cluster_python_tests \ stop_cluster qpidexectest_PROGRAMS += cluster_test cluster_test_SOURCES = \ cluster_test.cpp \ unit_test.cpp \ ClusterFixture.cpp \ ClusterFixture.h \ ForkedBroker.h \ ForkedBroker.cpp \ PartialFailure.cpp \ ClusterFailover.cpp \ InitialStatusMap.cpp # Moved this file here from cluster_test_SOURCES as it breaks the autotools build, but not the cmake # build and so we need to make sure it is present in the tarball EXTRA_DIST += StoreStatus.cpp cluster_test_LDADD=$(lib_client) $(lib_broker) ../cluster.la -lboost_unit_test_framework qpidexectest_SCRIPTS += run_cluster_tests brokertest.py cluster_tests.py cluster_test_logs.py run_long_cluster_tests long_cluster_tests.py testlib.py cluster_tests.fail qpidexectest_SCRIPTS += $(CLUSTER_TEST_SCRIPTS_LIST) endif qpidc-0.16/src/tests/Uuid.cpp0000664000076400007640000000670311355156410016506 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/framing/Uuid.h" #include "qpid/framing/Buffer.h" #include "qpid/types/Uuid.h" #include "qpid/sys/alloca.h" #include "unit_test.h" #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(UuidTestSuite) using namespace std; using namespace qpid::framing; struct UniqueSet : public std::set { void operator()(const Uuid& uuid) { BOOST_REQUIRE(find(uuid) == end()); insert(uuid); } }; QPID_AUTO_TEST_CASE(testUuidCtor) { // Uniqueness boost::array uuids; for_each(uuids.begin(), uuids.end(), mem_fun_ref(&Uuid::generate)); UniqueSet unique; for_each(uuids.begin(), uuids.end(), unique); } boost::array sample = {{'\x1b', '\x4e', '\x28', '\xba', '\x2f', '\xa1', '\x11', '\xd2', '\x88', '\x3f', '\xb9', '\xa7', '\x61', '\xbd', '\xe3', '\xfb'}}; const string sampleStr("1b4e28ba-2fa1-11d2-883f-b9a761bde3fb"); const string zeroStr("00000000-0000-0000-0000-000000000000"); QPID_AUTO_TEST_CASE(testUuidIstream) { Uuid uuid; istringstream in(sampleStr); in >> uuid; BOOST_CHECK(!in.fail()); BOOST_CHECK(uuid == sample); istringstream is(zeroStr); Uuid zero; is >> zero; BOOST_CHECK(!in.fail()); BOOST_CHECK_EQUAL(zero, Uuid()); } QPID_AUTO_TEST_CASE(testUuidOstream) { Uuid uuid(sample.c_array()); ostringstream out; out << uuid; BOOST_CHECK(out.good()); BOOST_CHECK_EQUAL(out.str(), sampleStr); ostringstream os; os << Uuid(); BOOST_CHECK(out.good()); BOOST_CHECK_EQUAL(os.str(), zeroStr); } QPID_AUTO_TEST_CASE(testUuidIOstream) { Uuid a(true), b(true); ostringstream os; os << a << endl << b; Uuid aa, bb; istringstream is(os.str()); is >> aa >> ws >> bb; BOOST_CHECK(os.good()); BOOST_CHECK_EQUAL(a, aa); BOOST_CHECK_EQUAL(b, bb); } QPID_AUTO_TEST_CASE(testUuidEncodeDecode) { char* buff = static_cast(::alloca(Uuid::size())); Buffer wbuf(buff, Uuid::size()); Uuid uuid(sample.c_array()); uuid.encode(wbuf); Buffer rbuf(buff, Uuid::size()); Uuid decoded; decoded.decode(rbuf); BOOST_CHECK_EQUAL(string(sample.begin(), sample.end()), string(decoded.begin(), decoded.end())); } QPID_AUTO_TEST_CASE(testTypesUuid) { //tests for the Uuid class in the types namespace (introduced //to avoid pulling in dependencies from framing) types::Uuid a; types::Uuid b(true); types::Uuid c(true); types::Uuid d(b); types::Uuid e; e = c; BOOST_CHECK(!a); BOOST_CHECK(b); BOOST_CHECK(a != b); BOOST_CHECK(b != c); BOOST_CHECK_EQUAL(b, d); BOOST_CHECK_EQUAL(c, e); ostringstream out; out << b; istringstream in(out.str()); in >> a; BOOST_CHECK(!in.fail()); BOOST_CHECK_EQUAL(a, b); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/txshift.cpp0000664000076400007640000001453411252003060017256 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "TestOptions.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/FailoverManager.h" #include "qpid/client/Message.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/log/Statement.h" #include "qpid/sys/Thread.h" using namespace qpid::client; using namespace qpid::sys; namespace qpid { namespace tests { struct Args : public qpid::TestOptions { string workQueue; size_t workers; Args() : workQueue("txshift-control"), workers(1) { addOptions() ("workers", qpid::optValue(workers, "N"), "Number of separate worker sessions to start") ("work-queue", qpid::optValue(workQueue, "NAME"), "work queue from which to take instructions"); } }; struct Transfer : MessageListener { std::string control; std::string source; std::string destination; uint expected; uint transfered; SubscriptionSettings controlSettings; Subscription controlSubscription; SubscriptionSettings sourceSettings; Subscription sourceSubscription; Transfer(const std::string control_) : control(control_), expected(0), transfered(0) {} void subscribeToSource(SubscriptionManager manager) { sourceSettings.autoAck = 0;//will accept once at the end of the batch sourceSettings.flowControl = FlowControl::messageCredit(expected); sourceSubscription = manager.subscribe(*this, source, sourceSettings); QPID_LOG(info, "Subscribed to source: " << source << " expecting: " << expected); } void subscribeToControl(SubscriptionManager manager) { controlSettings.flowControl = FlowControl::messageCredit(1); controlSubscription = manager.subscribe(*this, control, controlSettings); QPID_LOG(info, "Subscribed to job queue"); } void received(Message& message) { QPID_LOG(debug, "received: " << message.getData() << " for " << message.getDestination()); if (message.getDestination() == source) { receivedFromSource(message); } else if (message.getDestination() == control) { receivedFromControl(message); } else { QPID_LOG(error, "Unexpected message: " << message.getData() << " to " << message.getDestination()); } } void receivedFromSource(Message& message) { QPID_LOG(debug, "transfering " << (transfered+1) << " of " << expected); message.getDeliveryProperties().setRoutingKey(destination); async(sourceSubscription.getSession()).messageTransfer(arg::content=message); if (++transfered == expected) { QPID_LOG(info, "completed job: " << transfered << " messages shifted from " << source << " to " << destination); sourceSubscription.accept(sourceSubscription.getUnaccepted()); sourceSubscription.getSession().txCommit(); sourceSubscription.cancel(); //grant credit to allow broker to send us another control message controlSubscription.grantMessageCredit(1); } } void receivedFromControl(Message& message) { if (message.getData() == "transfer") { source = message.getHeaders().getAsString("src"); destination = message.getHeaders().getAsString("dest"); expected = message.getHeaders().getAsInt("count"); transfered = 0; QPID_LOG(info, "received transfer request: " << expected << " messages to be shifted from " << source << " to " << destination); subscribeToSource(controlSubscription.getSubscriptionManager()); } else if (message.getData() == "quit") { QPID_LOG(info, "received quit request"); controlSubscription.cancel(); } else { std::cerr << "Rejecting invalid message: " << message.getData() << std::endl; controlSubscription.getSession().messageReject(SequenceSet(message.getId())); } } }; struct Worker : FailoverManager::Command, Runnable { FailoverManager& connection; Transfer transfer; Thread runner; Worker(FailoverManager& c, const std::string& controlQueue) : connection(c), transfer(controlQueue) {} void run() { connection.execute(*this); } void start() { runner = Thread(this); } void join() { runner.join(); } void execute(AsyncSession& session, bool isRetry) { if (isRetry) QPID_LOG(info, "Retrying..."); session.txSelect(); SubscriptionManager subs(session); transfer.subscribeToControl(subs); subs.run(); session.txCommit();//commit accept of control messages } }; }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { Args opts; try { opts.parse(argc, argv); FailoverManager connection(opts.con); connection.connect(); if (opts.workers == 1) { Worker worker(connection, opts.workQueue); worker.run(); } else { boost::ptr_vector workers; for (size_t i = 0; i < opts.workers; i++) { workers.push_back(new Worker(connection, opts.workQueue)); } std::for_each(workers.begin(), workers.end(), boost::bind(&Worker::start, _1)); std::for_each(workers.begin(), workers.end(), boost::bind(&Worker::join, _1)); } return 0; } catch(const std::exception& e) { std::cout << e.what() << std::endl; return 1; } } qpidc-0.16/src/tests/header_test.cpp0000664000076400007640000000347011227114422020060 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "TestOptions.h" #include "qpid/client/Connection.h" #include "qpid/client/Message.h" #include "qpid/client/Session.h" #include "qpid/client/SubscriptionManager.h" using namespace qpid; using namespace qpid::client; using namespace std; int main(int argc, char** argv) { TestOptions opts; try { opts.parse(argc, argv); Connection connection; connection.open(opts.con); Session session = connection.newSession(); std::string q("header_interop_test_queue"); session.queueDeclare(arg::queue=q); double pi = 3.14159265; float e = 2.71828f; Message msg("", q); msg.getMessageProperties().getApplicationHeaders().setDouble("pi", pi); msg.getMessageProperties().getApplicationHeaders().setFloat("e", e); session.messageTransfer(arg::content=msg); session.close(); connection.close(); return 0; } catch(const exception& e) { cout << e.what() << endl; } return 1; } qpidc-0.16/src/tests/ssl.mk0000664000076400007640000000154511377773233016241 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # TESTS+=ssl_test EXTRA_DIST+=ssl_test CLEAN_LOCAL += test_cert_db cert.password qpidc-0.16/src/tests/qpid-build-rinstall0000775000076400007640000000212411654250703020675 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under onemake # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run "make install"" locally then copy the install tree to each of $HOSTS # Must be run in a configured qpid build directory. # test -f config.status || { echo "Not in a configured build directory."; usage; } . src/tests/install_env.sh set -ex make && make -j1 install rsynchosts $QPID_INSTALL_PREFIX qpidc-0.16/src/tests/sasl_no_dir0000775000076400007640000001562211645656500017325 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh script_name=`basename $0` # This minimum value corresponds to sasl version 2.1.22 minimum_sasl_version=131350 sasl_version=`$QPID_TEST_EXEC_DIR/sasl_version` # This test is necessary because this sasl version is the first one that permits # redirection of the sasl config file path. if [ "$sasl_version" -lt "$minimum_sasl_version" ]; then echo "sasl_fed: must have sasl version 2.1.22 or greater. ( Integer value: $minimum_sasl_version ) Version is: $sasl_version" exit 0 fi sasl_config_dir=$builddir/sasl_config # Debugging print. -------------------------- debug= function print { if [ "$debug" ]; then echo "${script_name}: $1" fi } my_random_number=$RANDOM tmp_root=/tmp/sasl_fed_$my_random_number mkdir -p $tmp_root LOG_FILE=$tmp_root/qpidd.log # If you want to see this test fail, just comment out this 'mv' command. print "Moving sasl configuration dir." mv ${sasl_config_dir} ${sasl_config_dir}- #-------------------------------------------------- print " Starting broker" #-------------------------------------------------- $QPIDD_EXEC \ -p 0 \ --no-data-dir \ --auth=yes \ --mgmt-enable=yes \ --log-enable info+ \ --log-source yes \ --log-to-file ${LOG_FILE} \ --sasl-config=$sasl_config_dir \ -d 2> /dev/null 1> $tmp_root/broker_port # If it works right, the output will look something like this: ( two lines long ) # Daemon startup failed: SASL: sasl_set_path failed: no such directory: /home/mick/trunk/qpid/cpp/src/tests/sasl_config (qpid/broker/SaslAuthenticator.cpp:112) # 2011-10-13 14:07:00 critical qpidd.cpp:83: Unexpected error: Daemon startup failed: SASL: sasl_set_path failed: no such directory: /home/mick/trunk/qpid/cpp/src/tests/sasl_config (qpid/broker/SaslAuthenticator.cpp:112) result=`cat ${LOG_FILE} | grep "sasl_set_path failed: no such directory" | wc -l ` #-------------------------------------------------- print "Restore the Sasl config dir to its original place." #-------------------------------------------------- mv ${sasl_config_dir}- ${sasl_config_dir} if [ "2" -eq ${result} ]; then print "result: success" rm -rf $tmp_root exit 0 fi # If this test fails, the broker is still alive. # Kill it. broker_port=`cat $tmp_root/broker_port` #-------------------------------------------------- print "Asking broker to quit." #-------------------------------------------------- $QPIDD_EXEC --port $broker_port --quit rm -rf $tmp_root print "result: fail" exit 1 #! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh script_name=`basename $0` # This minimum value corresponds to sasl version 2.1.22 minimum_sasl_version=131350 sasl_version=`$QPID_TEST_EXEC_DIR/sasl_version` # This test is necessary because this sasl version is the first one that permits # redirection of the sasl config file path. if [ "$sasl_version" -lt "$minimum_sasl_version" ]; then echo "sasl_fed: must have sasl version 2.1.22 or greater. ( Integer value: $minimum_sasl_version ) Version is: $sasl_version" exit 0 fi sasl_config_dir=$builddir/sasl_config # Debugging print. -------------------------- debug= function print { if [ "$debug" ]; then echo "${script_name}: $1" fi } my_random_number=$RANDOM tmp_root=/tmp/sasl_fed_$my_random_number mkdir -p $tmp_root LOG_FILE=$tmp_root/qpidd.log # If you want to see this test fail, just comment out this 'mv' command. print "Moving sasl configuration dir." mv ${sasl_config_dir} ${sasl_config_dir}- #-------------------------------------------------- print " Starting broker" #-------------------------------------------------- $QPIDD_EXEC \ -p 0 \ --no-data-dir \ --auth=yes \ --mgmt-enable=yes \ --log-enable info+ \ --log-source yes \ --log-to-file ${LOG_FILE} \ --sasl-config=$sasl_config_dir \ -d 2> /dev/null 1> $tmp_root/broker_port # If it works right, the output will look something like this: ( two lines long ) # Daemon startup failed: SASL: sasl_set_path failed: no such directory: /home/mick/trunk/qpid/cpp/src/tests/sasl_config (qpid/broker/SaslAuthenticator.cpp:112) # 2011-10-13 14:07:00 critical qpidd.cpp:83: Unexpected error: Daemon startup failed: SASL: sasl_set_path failed: no such directory: /home/mick/trunk/qpid/cpp/src/tests/sasl_config (qpid/broker/SaslAuthenticator.cpp:112) result=`cat ${LOG_FILE} | grep "sasl_set_path failed: no such directory" | wc -l ` #-------------------------------------------------- print "Restore the Sasl config dir to its original place." #-------------------------------------------------- mv ${sasl_config_dir}- ${sasl_config_dir} if [ "2" -eq ${result} ]; then print "result: success" rm -rf $tmp_root exit 0 fi # If this test fails, the broker is still alive. # Kill it. broker_port=`cat $tmp_root/broker_port` #-------------------------------------------------- print "Asking broker to quit." #-------------------------------------------------- $QPIDD_EXEC --port $broker_port --quit rm -rf $tmp_root print "result: fail" exit 1 qpidc-0.16/src/tests/Address.cpp0000664000076400007640000001172611603333370017164 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/messaging/Address.h" #include "qpid/types/Variant.h" #include "unit_test.h" using namespace qpid::messaging; using namespace qpid::types; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(AddressSuite) QPID_AUTO_TEST_CASE(testParseNameOnly) { Address address("my-topic"); BOOST_CHECK_EQUAL(std::string("my-topic"), address.getName()); } QPID_AUTO_TEST_CASE(testParseSubject) { Address address("my-topic/my-subject"); BOOST_CHECK_EQUAL(std::string("my-topic"), address.getName()); BOOST_CHECK_EQUAL(std::string("my-subject"), address.getSubject()); } QPID_AUTO_TEST_CASE(testParseOptions) { Address address("my-topic; {a:bc, x:101, y:'a string'}"); BOOST_CHECK_EQUAL(std::string("my-topic"), address.getName()); BOOST_CHECK_EQUAL(std::string("bc"), address.getOptions()["a"]); BOOST_CHECK_EQUAL(101, static_cast(address.getOptions()["x"])); BOOST_CHECK_EQUAL(std::string("a string"), address.getOptions()["y"]); // Test asString() and asInt64() once here BOOST_CHECK_EQUAL(std::string("bc"), address.getOptions()["a"].asString()); BOOST_CHECK_EQUAL(static_cast(101), address.getOptions()["x"].asInt64()); BOOST_CHECK_EQUAL(std::string("a string"), address.getOptions()["y"].asString()); } QPID_AUTO_TEST_CASE(testParseSubjectAndOptions) { Address address("my-topic/my-subject; {a:bc, x:101, y:'a string'}"); BOOST_CHECK_EQUAL(std::string("my-topic"), address.getName()); BOOST_CHECK_EQUAL(std::string("my-subject"), address.getSubject()); BOOST_CHECK_EQUAL(std::string("bc"), address.getOptions()["a"]); BOOST_CHECK_EQUAL(101, static_cast(address.getOptions()["x"])); BOOST_CHECK_EQUAL(std::string("a string"), address.getOptions()["y"]); } QPID_AUTO_TEST_CASE(testParseNestedOptions) { Address address("my-topic; {a:{p:202, q:'another string'}, x:101, y:'a string'}"); BOOST_CHECK_EQUAL(std::string("my-topic"), address.getName()); BOOST_CHECK_EQUAL(202, static_cast(address.getOptions()["a"].asMap()["p"])); BOOST_CHECK_EQUAL(std::string("another string"), address.getOptions()["a"].asMap()["q"]); BOOST_CHECK_EQUAL(std::string("a string"), address.getOptions()["y"]); } QPID_AUTO_TEST_CASE(testParseOptionsWithList) { Address address("my-topic; {a:[202, 'another string'], x:101}"); BOOST_CHECK_EQUAL(std::string("my-topic"), address.getName()); Variant::List& list = address.getOptions()["a"].asList(); Variant::List::const_iterator i = list.begin(); BOOST_CHECK(i != list.end()); BOOST_CHECK_EQUAL((uint16_t) 202, i->asInt64()); BOOST_CHECK(++i != list.end()); BOOST_CHECK_EQUAL(std::string("another string"), i->asString()); BOOST_CHECK_EQUAL((uint16_t) 101, address.getOptions()["x"].asInt64()); } QPID_AUTO_TEST_CASE(testParseOptionsWithEmptyList) { Address address("my-topic; {a:[], x:101}"); BOOST_CHECK_EQUAL(std::string("my-topic"), address.getName()); Variant::List& list = address.getOptions()["a"].asList(); BOOST_CHECK_EQUAL(list.size(), (size_t) 0); BOOST_CHECK_EQUAL((uint16_t) 101, address.getOptions()["x"].asInt64()); } QPID_AUTO_TEST_CASE(testParseOptionsWithEmptyMap) { Address address("my-topic; {a:{}, x:101}"); BOOST_CHECK_EQUAL(std::string("my-topic"), address.getName()); Variant::Map& map = address.getOptions()["a"].asMap(); BOOST_CHECK_EQUAL(map.size(), (size_t) 0); BOOST_CHECK_EQUAL((uint16_t) 101, address.getOptions()["x"].asInt64()); } QPID_AUTO_TEST_CASE(testParseQuotedNameAndSubject) { Address address("'my topic with / in it'/'my subject with ; in it'"); BOOST_CHECK_EQUAL(std::string("my topic with / in it"), address.getName()); BOOST_CHECK_EQUAL(std::string("my subject with ; in it"), address.getSubject()); } QPID_AUTO_TEST_CASE(testParseOptionsWithEmptyStringAsValue) { Address address("my-topic; {a:'', x:101}"); BOOST_CHECK_EQUAL(std::string("my-topic"), address.getName()); Variant a = address.getOptions()["a"]; BOOST_CHECK_EQUAL(VAR_STRING, a.getType()); std::string aVal = a; BOOST_CHECK(aVal.size() == 0); BOOST_CHECK_EQUAL((uint16_t) 101, address.getOptions()["x"].asInt64()); } QPID_AUTO_TEST_SUITE_END() }} qpidc-0.16/src/tests/install_env.sh0000664000076400007640000000206311752725671017755 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # absdir() { echo `cd $1 && pwd`; } prefix=`absdir /usr/local` export QPID_INSTALL_PREFIX=$prefix export PATH=$prefix/bin:$prefix/sbin:$prefix/libexec/qpid/tests:$PATH export LD_LIBRARY_PATH=$prefix/lib:$LD_LIBRARY_PATH export PYTHONPATH=$prefix/lib/python2.4/site-packages:$PYTHONPATH qpidc-0.16/src/tests/run_cluster_authentication_test0000775000076400007640000000163411461642640023526 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. source ./test_env.sh source $srcdir/ais_check source sasl_test_setup.sh with_ais_group ./cluster_authentication_soak qpidc-0.16/src/tests/testagent.mk0000664000076400007640000000416311656237667017443 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Build a simple qmf agent for test purposes. TESTAGENT_GEN_SRC= \ testagent_gen/qmf/org/apache/qpid/agent/example/Parent.h \ testagent_gen/qmf/org/apache/qpid/agent/example/Child.h \ testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp \ testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp \ testagent_gen/qmf/org/apache/qpid/agent/example/ArgsParentCreate_child.h \ testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.h \ testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.h \ testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp \ testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp \ testagent_gen/qmf/org/apache/qpid/agent/example/Package.h \ testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp $(TESTAGENT_GEN_SRC): testagent_gen.timestamp if GENERATE TESTAGENT_DEPS=../mgen.timestamp endif # GENERATE testagent_gen.timestamp: testagent.xml ${TESTAGENT_DEPS} $(QMF_GEN) -o testagent_gen/qmf $(srcdir)/testagent.xml touch $@ CLEANFILES+=$(TESTAGENT_GEN_SRC) testagent_gen.timestamp testagent-testagent.$(OBJEXT): $(TESTAGENT_GEN_SRC) qpidexectest_PROGRAMS+=testagent testagent_CXXFLAGS=$(CXXFLAGS) -Itestagent_gen testagent_SOURCES=testagent.cpp $(TESTAGENT_GEN_SRC) testagent_LDADD=$(top_builddir)/src/libqmf.la EXTRA_DIST+=testagent.xml qpidc-0.16/src/tests/qpid-src-rinstall0000775000076400007640000000266111654250703020373 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under onemake # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Copy the source tree and run "make install" on each of $HOSTS # Must be run in a configured qpid build directory. absdir() { echo `cd $1 && pwd`; } test -f config.status || { echo "Not in a configured build directory."; } CONFIGURE=`./config.status -V | grep '^configured by' | sed 's/^configured by \([^,]*\),.*$/\1/'` CONFIG_OPTIONS=`./config.status -V | grep 'with options' | sed 's/^.*with options "\([^"]*\)".*$/\1/'` set -ex rsynchosts `absdir $(dirname $CONFIGURE)/..` # Copy cpp srcdir and siblings. allhosts -bo rbuild.log "mkdir -p $PWD && cd $PWD && { test -f config.status || $CONFIGURE $CONFIG_OPTIONS; } && make && make -j1 install" qpidc-0.16/src/tests/ais_check0000775000076400007640000000231511654250703016730 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # srcdir=`dirname $0` # Check AIS requirements and run tests if found. ps -u root | grep 'aisexec\|corosync' >/dev/null || { echo WARNING: Skipping cluster tests, the aisexec or corosync daemon is not running. exit 0; # A warning, not a failure. } # Execute command with the ais group set if user is a member. with_ais_group() { if id -nG | grep '\' >/dev/null; then sg ais -c "$*" else "$@" fi } qpidc-0.16/src/tests/echotest.cpp0000664000076400007640000001152111364215470017412 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using namespace qpid::sys; using namespace std; namespace qpid { namespace tests { struct Args : public qpid::Options, public qpid::client::ConnectionSettings { bool help; uint count; uint size; bool summary; Args() : qpid::Options("Simple latency test optins"), help(false), count(20), size(0), summary() { using namespace qpid; addOptions() ("help", optValue(help), "Print this usage statement") ("count", optValue(count, "N"), "Number of messages to send") ("size", optValue(count, "N"), "Size of messages") ("broker,b", optValue(host, "HOST"), "Broker host to connect to") ("port,p", optValue(port, "PORT"), "Broker port to connect to") ("username", optValue(username, "USER"), "user name for broker log in.") ("password", optValue(password, "PASSWORD"), "password for broker log in.") ("mechanism", optValue(mechanism, "MECH"), "SASL mechanism to use when authenticating.") ("tcp-nodelay", optValue(tcpNoDelay), "Turn on tcp-nodelay") ("s,summary", optValue(summary), "Print only average latency."); } }; uint64_t current_time() { Duration t(EPOCH, now()); return t; } class Listener : public MessageListener { private: Session session; SubscriptionManager subscriptions; uint counter; const uint limit; std::string queue; Message request; double total, min, max; bool summary; public: Listener(Session& session, uint limit, bool summary); void start(uint size); void received(Message& message); }; Listener::Listener(Session& s, uint l, bool summary_) : session(s), subscriptions(s), counter(0), limit(l), queue(session.getId().getName()), total(), min(std::numeric_limits::max()), max(), summary(summary_) {} void Listener::start(uint size) { session.queueDeclare(arg::queue=queue, arg::exclusive=true, arg::autoDelete=true); request.getDeliveryProperties().setRoutingKey(queue); subscriptions.subscribe(*this, queue, SubscriptionSettings(FlowControl::unlimited(), ACCEPT_MODE_NONE)); request.getDeliveryProperties().setTimestamp(current_time()); if (size) request.setData(std::string(size, 'X')); async(session).messageTransfer(arg::content=request); subscriptions.run(); } void Listener::received(Message& response) { //extract timestamp and compute latency: uint64_t sentAt = response.getDeliveryProperties().getTimestamp(); uint64_t receivedAt = current_time(); double latency = ((double) (receivedAt - sentAt)) / TIME_MSEC; if (!summary) cout << "Latency: " << latency << "ms" << endl; min = std::min(latency, min); max = std::max(latency, max); total += latency; if (++counter < limit) { request.getDeliveryProperties().setTimestamp(current_time()); async(session).messageTransfer(arg::content=request); } else { subscriptions.cancel(queue); if (summary) cout << min << "\t" << max << "\t" << total/limit << endl; else cout << "min: " << min << " max: " << max << " average: " << total/limit << endl; } } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { Args opts; opts.parse(argc, argv); if (opts.help) { std::cout << opts << std::endl; return 0; } Connection connection; try { connection.open(opts); Session session = connection.newSession(); Listener listener(session, opts.count, opts.summary); listener.start(opts.size); connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/src/tests/install_env.sh.in0000664000076400007640000000206111450171543020344 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # absdir() { echo `cd $1 && pwd`; } prefix=`absdir @prefix@` export QPID_INSTALL_PREFIX=$prefix export PATH=$prefix/bin:$prefix/sbin:$prefix/libexec/qpid/tests:$PATH export LD_LIBRARY_PATH=$prefix/lib:$LD_LIBRARY_PATH export PYTHONPATH=$prefix/lib/python2.4/site-packages:$PYTHONPATH qpidc-0.16/src/tests/BrokerMgmtAgent.cpp0000664000076400007640000007327311663012400020626 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "unit_test.h" #include "MessagingFixture.h" #include "qpid/management/Buffer.h" #include "qpid/messaging/Message.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/log/Logger.h" #include "qpid/log/Options.h" #include "qmf/org/apache/qpid/broker/mgmt/test/TestObject.h" #include using qpid::management::Mutex; using qpid::management::Manageable; using qpid::management::Buffer; using namespace qpid::messaging; using namespace qpid::types; namespace qpid { namespace tests { namespace _qmf = qmf::org::apache::qpid::broker::mgmt::test; namespace { typedef boost::shared_ptr<_qmf::TestObject> TestObjectPtr; typedef std::vector TestObjectVector; // Instantiates a broker and its internal management agent. Provides // factories for constructing Receivers for object indication messages. // class AgentFixture { MessagingFixture *mFix; public: AgentFixture( unsigned int pubInterval=10, bool qmfV2=false, qpid::broker::Broker::Options opts = qpid::broker::Broker::Options()) { opts.enableMgmt=true; opts.qmf2Support=qmfV2; opts.mgmtPubInterval=pubInterval; mFix = new MessagingFixture(opts, true); _qmf::TestObject::registerSelf(getBrokerAgent()); }; ~AgentFixture() { delete mFix; }; ::qpid::management::ManagementAgent *getBrokerAgent() { return mFix->broker->getManagementAgent(); } Receiver createV1DataIndRcvr( const std::string package, const std::string klass ) { return mFix->session.createReceiver(std::string("kqueue; {create: always, delete: always, " "node: {type: queue, " "x-bindings: [{exchange: qpid.management, " "key: 'console.obj.1.0.") + package + std::string(".") + klass + std::string("'}]}}")); }; Receiver createV2DataIndRcvr( const std::string package, const std::string klass ) { std::string p(package); std::replace(p.begin(), p.end(), '.', '_'); std::string k(klass); std::replace(k.begin(), k.end(), '.', '_'); return mFix->session.createReceiver(std::string("kqueue; {create: always, delete: always, " "node: {type: queue, " "x-bindings: [{exchange: qmf.default.topic, " "key: 'agent.ind.data.") + p + std::string(".") + k + std::string("'}]}}")); }; }; // A "management object" that supports the TestObject // class TestManageable : public qpid::management::Manageable { management::ManagementObject* mgmtObj; const std::string key; public: TestManageable(management::ManagementAgent *agent, std::string _key) : key(_key) { _qmf::TestObject *tmp = new _qmf::TestObject(agent, this); // seed it with some default values... tmp->set_string1(key); tmp->set_bool1(true); qpid::types::Variant::Map vMap; vMap["one"] = qpid::types::Variant(1); vMap["two"] = qpid::types::Variant("two"); vMap["three"] = qpid::types::Variant("whatever"); tmp->set_map1(vMap); mgmtObj = tmp; }; ~TestManageable() { mgmtObj = 0; /* deleted by agent on shutdown */ }; management::ManagementObject* GetManagementObject() const { return mgmtObj; }; static void validateTestObjectProperties(_qmf::TestObject& to) { // verify the default values are as expected. We don't check 'string1', // as it is the object key, and is unique for each object (no default value). BOOST_CHECK(to.get_bool1() == true); BOOST_CHECK(to.get_map1().size() == 3); qpid::types::Variant::Map mappy = to.get_map1(); BOOST_CHECK(1 == (unsigned int)mappy["one"]); BOOST_CHECK(mappy["two"].asString() == std::string("two")); BOOST_CHECK(mappy["three"].asString() == std::string("whatever")); }; }; // decode a V1 Content Indication message // void decodeV1ObjectUpdates(const Message& inMsg, TestObjectVector& objs, const size_t objLen) { const size_t MAX_BUFFER_SIZE=65536; char tmp[MAX_BUFFER_SIZE]; objs.clear(); BOOST_CHECK(inMsg.getContent().size() <= MAX_BUFFER_SIZE); ::memcpy(tmp, inMsg.getContent().data(), inMsg.getContent().size()); Buffer buf(tmp, inMsg.getContent().size()); while (buf.available() > 8) { // 8 == qmf v1 header size BOOST_CHECK_EQUAL(buf.getOctet(), 'A'); BOOST_CHECK_EQUAL(buf.getOctet(), 'M'); BOOST_CHECK_EQUAL(buf.getOctet(), '2'); BOOST_CHECK_EQUAL(buf.getOctet(), 'c'); // opcode == content indication // @@todo: kag: how do we skip 'i' entries??? buf.getLong(); // ignore sequence std::string str1; // decode content body as string buf.getRawData(str1, objLen); TestObjectPtr fake(new _qmf::TestObject(0,0)); fake->readProperties( str1 ); objs.push_back(fake); } } // decode a V2 Content Indication message // void decodeV2ObjectUpdates(const qpid::messaging::Message& inMsg, TestObjectVector& objs) { objs.clear(); BOOST_CHECK_EQUAL(inMsg.getContentType(), std::string("amqp/list")); const ::qpid::types::Variant::Map& m = inMsg.getProperties(); Variant::Map::const_iterator iter = m.find(std::string("qmf.opcode")); BOOST_CHECK(iter != m.end()); BOOST_CHECK_EQUAL(iter->second.asString(), std::string("_data_indication")); Variant::List vList; ::qpid::amqp_0_10::ListCodec::decode(inMsg.getContent(), vList); for (Variant::List::iterator lIter = vList.begin(); lIter != vList.end(); lIter++) { TestObjectPtr fake(new _qmf::TestObject(0,0)); fake->readTimestamps(lIter->asMap()); fake->mapDecodeValues((lIter->asMap())["_values"].asMap()); objs.push_back(fake); } } } QPID_AUTO_TEST_SUITE(BrokerMgmtAgent) // verify that an object that is added to the broker's management database is // published correctly. Furthermore, verify that it is published once after // it has been deleted. // QPID_AUTO_TEST_CASE(v1ObjPublish) { AgentFixture* fix = new AgentFixture(3); management::ManagementAgent* agent; agent = fix->getBrokerAgent(); // create a manageable test object TestManageable *tm = new TestManageable(agent, std::string("obj1")); uint32_t objLen = tm->GetManagementObject()->writePropertiesSize(); Receiver r1 = fix->createV1DataIndRcvr("org.apache.qpid.broker.mgmt.test", "#"); agent->addObject(tm->GetManagementObject(), 1); // wait for the object to be published Message m1; BOOST_CHECK(r1.fetch(m1, Duration::SECOND * 6)); TestObjectVector objs; decodeV1ObjectUpdates(m1, objs, objLen); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { TestManageable::validateTestObjectProperties(**oIter); qpid::types::Variant::Map mappy; (*oIter)->writeTimestamps(mappy); BOOST_CHECK(0 == mappy["_delete_ts"].asUint64()); // not deleted } // destroy the object tm->GetManagementObject()->resourceDestroy(); // wait for the deleted object to be published bool isDeleted = false; while (!isDeleted && r1.fetch(m1, Duration::SECOND * 6)) { decodeV1ObjectUpdates(m1, objs, objLen); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { TestManageable::validateTestObjectProperties(**oIter); qpid::types::Variant::Map mappy; (*oIter)->writeTimestamps(mappy); if (mappy["_delete_ts"].asUint64() != 0) isDeleted = true; } } BOOST_CHECK(isDeleted); r1.close(); delete fix; delete tm; } // Repeat the previous test, but with V2-based object support // QPID_AUTO_TEST_CASE(v2ObjPublish) { AgentFixture* fix = new AgentFixture(3, true); management::ManagementAgent* agent; agent = fix->getBrokerAgent(); TestManageable *tm = new TestManageable(agent, std::string("obj2")); Receiver r1 = fix->createV2DataIndRcvr(tm->GetManagementObject()->getPackageName(), "#"); agent->addObject(tm->GetManagementObject(), "testobj-1"); // wait for the object to be published Message m1; BOOST_CHECK(r1.fetch(m1, Duration::SECOND * 6)); TestObjectVector objs; decodeV2ObjectUpdates(m1, objs); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { TestManageable::validateTestObjectProperties(**oIter); qpid::types::Variant::Map mappy; (*oIter)->writeTimestamps(mappy); BOOST_CHECK(0 == mappy["_delete_ts"].asUint64()); } // destroy the object tm->GetManagementObject()->resourceDestroy(); // wait for the deleted object to be published bool isDeleted = false; while (!isDeleted && r1.fetch(m1, Duration::SECOND * 6)) { decodeV2ObjectUpdates(m1, objs); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { TestManageable::validateTestObjectProperties(**oIter); qpid::types::Variant::Map mappy; (*oIter)->writeTimestamps(mappy); if (mappy["_delete_ts"].asUint64() != 0) isDeleted = true; } } BOOST_CHECK(isDeleted); r1.close(); delete fix; delete tm; } // verify that a deleted object is exported correctly using the // exportDeletedObjects() method. V1 testcase. // QPID_AUTO_TEST_CASE(v1ExportDelObj) { AgentFixture* fix = new AgentFixture(3); management::ManagementAgent* agent; agent = fix->getBrokerAgent(); // create a manageable test object TestManageable *tm = new TestManageable(agent, std::string("myObj")); uint32_t objLen = tm->GetManagementObject()->writePropertiesSize(); Receiver r1 = fix->createV1DataIndRcvr("org.apache.qpid.broker.mgmt.test", "#"); agent->addObject(tm->GetManagementObject(), 1); // wait for the object to be published Message m1; BOOST_CHECK(r1.fetch(m1, Duration::SECOND * 6)); TestObjectVector objs; decodeV1ObjectUpdates(m1, objs, objLen); BOOST_CHECK(objs.size() > 0); // destroy the object, then immediately export (before the next poll cycle) ::qpid::management::ManagementAgent::DeletedObjectList delObjs; tm->GetManagementObject()->resourceDestroy(); agent->exportDeletedObjects( delObjs ); BOOST_CHECK(delObjs.size() == 1); // wait for the deleted object to be published bool isDeleted = false; while (!isDeleted && r1.fetch(m1, Duration::SECOND * 6)) { decodeV1ObjectUpdates(m1, objs, objLen); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { TestManageable::validateTestObjectProperties(**oIter); qpid::types::Variant::Map mappy; (*oIter)->writeTimestamps(mappy); if (mappy["_delete_ts"].asUint64() != 0) isDeleted = true; } } BOOST_CHECK(isDeleted); // verify there are no deleted objects to export now. agent->exportDeletedObjects( delObjs ); BOOST_CHECK(delObjs.size() == 0); r1.close(); delete fix; delete tm; } // verify that a deleted object is imported correctly using the // importDeletedObjects() method. V1 testcase. // QPID_AUTO_TEST_CASE(v1ImportDelObj) { AgentFixture* fix = new AgentFixture(3); management::ManagementAgent* agent; agent = fix->getBrokerAgent(); // create a manageable test object TestManageable *tm = new TestManageable(agent, std::string("anObj")); uint32_t objLen = tm->GetManagementObject()->writePropertiesSize(); Receiver r1 = fix->createV1DataIndRcvr("org.apache.qpid.broker.mgmt.test", "#"); agent->addObject(tm->GetManagementObject(), 1); // wait for the object to be published Message m1; BOOST_CHECK(r1.fetch(m1, Duration::SECOND * 6)); TestObjectVector objs; decodeV1ObjectUpdates(m1, objs, objLen); BOOST_CHECK(objs.size() > 0); // destroy the object, then immediately export (before the next poll cycle) ::qpid::management::ManagementAgent::DeletedObjectList delObjs; tm->GetManagementObject()->resourceDestroy(); agent->exportDeletedObjects( delObjs ); BOOST_CHECK(delObjs.size() == 1); // destroy the broker, and reinistantiate a new one without populating it // with a TestObject. r1.close(); delete fix; delete tm; // should no longer be necessary fix = new AgentFixture(3); r1 = fix->createV1DataIndRcvr("org.apache.qpid.broker.mgmt.test", "#"); agent = fix->getBrokerAgent(); agent->importDeletedObjects( delObjs ); // wait for the deleted object to be published bool isDeleted = false; while (!isDeleted && r1.fetch(m1, Duration::SECOND * 6)) { decodeV1ObjectUpdates(m1, objs, objLen); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { TestManageable::validateTestObjectProperties(**oIter); qpid::types::Variant::Map mappy; (*oIter)->writeTimestamps(mappy); if (mappy["_delete_ts"].asUint64() != 0) isDeleted = true; } } BOOST_CHECK(isDeleted); // verify there are no deleted objects to export now. agent->exportDeletedObjects( delObjs ); BOOST_CHECK(delObjs.size() == 0); r1.close(); delete fix; } // verify that an object that is added and deleted prior to the // first poll cycle is accounted for by the export // QPID_AUTO_TEST_CASE(v1ExportFastDelObj) { AgentFixture* fix = new AgentFixture(3); management::ManagementAgent* agent; agent = fix->getBrokerAgent(); // create a manageable test object TestManageable *tm = new TestManageable(agent, std::string("objectifyMe")); // add, then immediately delete and export the object... ::qpid::management::ManagementAgent::DeletedObjectList delObjs; agent->addObject(tm->GetManagementObject(), 999); tm->GetManagementObject()->resourceDestroy(); agent->exportDeletedObjects( delObjs ); BOOST_CHECK(delObjs.size() == 1); delete fix; delete tm; } // Verify that we can export and import multiple deleted objects correctly. // QPID_AUTO_TEST_CASE(v1ImportMultiDelObj) { AgentFixture* fix = new AgentFixture(3); management::ManagementAgent* agent; agent = fix->getBrokerAgent(); Receiver r1 = fix->createV1DataIndRcvr("org.apache.qpid.broker.mgmt.test", "#"); // populate the agent with multiple test objects const size_t objCount = 50; std::vector tmv; uint32_t objLen; for (size_t i = 0; i < objCount; i++) { std::stringstream key; key << "testobj-" << std::setfill('x') << std::setw(4) << i; // (no, seriously, I didn't just do that.) // Note well: we have to keep the key string length EXACTLY THE SAME // FOR ALL OBJECTS, so objLen will be the same. Otherwise the // decodeV1ObjectUpdates() will fail (v1 lacks explict encoded length). TestManageable *tm = new TestManageable(agent, key.str()); objLen = tm->GetManagementObject()->writePropertiesSize(); agent->addObject(tm->GetManagementObject(), i + 1); tmv.push_back(tm); } // wait for the objects to be published Message m1; uint32_t msgCount = 0; while(r1.fetch(m1, Duration::SECOND * 6)) { TestObjectVector objs; decodeV1ObjectUpdates(m1, objs, objLen); msgCount += objs.size(); } BOOST_CHECK_EQUAL(msgCount, objCount); // destroy some of the objects, then immediately export (before the next poll cycle) uint32_t delCount = 0; for (size_t i = 0; i < objCount; i += 2) { tmv[i]->GetManagementObject()->resourceDestroy(); delCount++; } ::qpid::management::ManagementAgent::DeletedObjectList delObjs; agent->exportDeletedObjects( delObjs ); BOOST_CHECK_EQUAL(delObjs.size(), delCount); // destroy the broker, and reinistantiate a new one without populating it // with TestObjects. r1.close(); delete fix; while (tmv.size()) { delete tmv.back(); tmv.pop_back(); } fix = new AgentFixture(3); r1 = fix->createV1DataIndRcvr("org.apache.qpid.broker.mgmt.test", "#"); agent = fix->getBrokerAgent(); agent->importDeletedObjects( delObjs ); // wait for the deleted object to be published, verify the count uint32_t countDels = 0; while (r1.fetch(m1, Duration::SECOND * 6)) { TestObjectVector objs; decodeV1ObjectUpdates(m1, objs, objLen); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { TestManageable::validateTestObjectProperties(**oIter); qpid::types::Variant::Map mappy; (*oIter)->writeTimestamps(mappy); if (mappy["_delete_ts"].asUint64() != 0) countDels++; } } // make sure we get the correct # of deleted objects BOOST_CHECK_EQUAL(countDels, delCount); // verify there are no deleted objects to export now. agent->exportDeletedObjects( delObjs ); BOOST_CHECK(delObjs.size() == 0); r1.close(); delete fix; } // Verify that we can export and import multiple deleted objects correctly. // QMF V2 variant QPID_AUTO_TEST_CASE(v2ImportMultiDelObj) { AgentFixture* fix = new AgentFixture(3, true); management::ManagementAgent* agent; agent = fix->getBrokerAgent(); Receiver r1 = fix->createV2DataIndRcvr("org.apache.qpid.broker.mgmt.test", "#"); // populate the agent with multiple test objects const size_t objCount = 50; std::vector tmv; for (size_t i = 0; i < objCount; i++) { std::stringstream key; key << "testobj-" << i; TestManageable *tm = new TestManageable(agent, key.str()); if (tm->GetManagementObject()->writePropertiesSize()) {} agent->addObject(tm->GetManagementObject(), key.str()); tmv.push_back(tm); } // wait for the objects to be published Message m1; uint32_t msgCount = 0; while(r1.fetch(m1, Duration::SECOND * 6)) { TestObjectVector objs; decodeV2ObjectUpdates(m1, objs); msgCount += objs.size(); } BOOST_CHECK_EQUAL(msgCount, objCount); // destroy some of the objects, then immediately export (before the next poll cycle) uint32_t delCount = 0; for (size_t i = 0; i < objCount; i += 2) { tmv[i]->GetManagementObject()->resourceDestroy(); delCount++; } ::qpid::management::ManagementAgent::DeletedObjectList delObjs; agent->exportDeletedObjects( delObjs ); BOOST_CHECK_EQUAL(delObjs.size(), delCount); // destroy the broker, and reinistantiate a new one without populating it // with TestObjects. r1.close(); delete fix; while (tmv.size()) { delete tmv.back(); tmv.pop_back(); } fix = new AgentFixture(3, true); r1 = fix->createV2DataIndRcvr("org.apache.qpid.broker.mgmt.test", "#"); agent = fix->getBrokerAgent(); agent->importDeletedObjects( delObjs ); // wait for the deleted object to be published, verify the count uint32_t countDels = 0; while (r1.fetch(m1, Duration::SECOND * 6)) { TestObjectVector objs; decodeV2ObjectUpdates(m1, objs); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { TestManageable::validateTestObjectProperties(**oIter); qpid::types::Variant::Map mappy; (*oIter)->writeTimestamps(mappy); if (mappy["_delete_ts"].asUint64() != 0) countDels++; } } // make sure we get the correct # of deleted objects BOOST_CHECK_EQUAL(countDels, delCount); // verify there are no deleted objects to export now. agent->exportDeletedObjects( delObjs ); BOOST_CHECK(delObjs.size() == 0); r1.close(); delete fix; } // See QPID-2997 QPID_AUTO_TEST_CASE(v2RapidRestoreObj) { AgentFixture* fix = new AgentFixture(3, true); management::ManagementAgent* agent; agent = fix->getBrokerAgent(); // two objects, same ObjID TestManageable *tm1 = new TestManageable(agent, std::string("obj2")); TestManageable *tm2 = new TestManageable(agent, std::string("obj2")); Receiver r1 = fix->createV2DataIndRcvr(tm1->GetManagementObject()->getPackageName(), "#"); // add, then immediately delete and re-add a copy of the object agent->addObject(tm1->GetManagementObject(), "testobj-1"); tm1->GetManagementObject()->resourceDestroy(); agent->addObject(tm2->GetManagementObject(), "testobj-1"); // expect: a delete notification, then an update notification TestObjectVector objs; bool isDeleted = false; bool isAdvertised = false; size_t count = 0; Message m1; while (r1.fetch(m1, Duration::SECOND * 6)) { decodeV2ObjectUpdates(m1, objs); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { count++; TestManageable::validateTestObjectProperties(**oIter); qpid::types::Variant::Map mappy; (*oIter)->writeTimestamps(mappy); if (mappy["_delete_ts"].asUint64() != 0) { isDeleted = true; BOOST_CHECK(isAdvertised == false); // delete must be first } else { isAdvertised = true; BOOST_CHECK(isDeleted == true); // delete must be first } } } BOOST_CHECK(isDeleted); BOOST_CHECK(isAdvertised); BOOST_CHECK(count == 2); r1.close(); delete fix; delete tm1; delete tm2; } // See QPID-2997 QPID_AUTO_TEST_CASE(v2DuplicateErrorObj) { AgentFixture* fix = new AgentFixture(3, true); management::ManagementAgent* agent; agent = fix->getBrokerAgent(); // turn off the expected error log message qpid::log::Options logOpts; logOpts.selectors.clear(); logOpts.selectors.push_back("critical+"); qpid::log::Logger::instance().configure(logOpts); // two objects, same ObjID TestManageable *tm1 = new TestManageable(agent, std::string("obj2")); TestManageable *tm2 = new TestManageable(agent, std::string("obj2")); // Keep a pointer to the ManagementObject. This test simulates a user-caused error // case (duplicate objects) where the broker has no choice but to leak a management // object (safest assumption). To prevent valgrind from flagging this leak, we // manually clean up the object at the end of the test. management::ManagementObject *save = tm2->GetManagementObject(); Receiver r1 = fix->createV2DataIndRcvr(tm1->GetManagementObject()->getPackageName(), "#"); // add, then immediately delete and re-add a copy of the object agent->addObject(tm1->GetManagementObject(), "testobj-1"); agent->addObject(tm2->GetManagementObject(), "testobj-1"); TestObjectVector objs; size_t count = 0; Message m1; while (r1.fetch(m1, Duration::SECOND * 6)) { decodeV2ObjectUpdates(m1, objs); BOOST_CHECK(objs.size() > 0); for (TestObjectVector::iterator oIter = objs.begin(); oIter != objs.end(); oIter++) { count++; TestManageable::validateTestObjectProperties(**oIter); } } BOOST_CHECK(count == 1); // only one should be accepted. r1.close(); delete fix; delete tm1; delete tm2; delete save; } QPID_AUTO_TEST_SUITE_END() } } qpidc-0.16/src/tests/MessageUtils.h0000664000076400007640000000443311535442547017661 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Message.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/Uuid.h" using namespace qpid; using namespace broker; using namespace framing; namespace qpid { namespace tests { struct MessageUtils { static boost::intrusive_ptr createMessage(const string& exchange="", const string& routingKey="", const bool durable = false, const Uuid& messageId=Uuid(true), uint64_t contentSize = 0) { boost::intrusive_ptr msg(new broker::Message()); AMQFrame method(( MessageTransferBody(ProtocolVersion(), exchange, 0, 0))); AMQFrame header((AMQHeaderBody())); msg->getFrames().append(method); msg->getFrames().append(header); MessageProperties* props = msg->getFrames().getHeaders()->get(true); props->setContentLength(contentSize); props->setMessageId(messageId); msg->getFrames().getHeaders()->get(true)->setRoutingKey(routingKey); if (durable) msg->getFrames().getHeaders()->get(true)->setDeliveryMode(2); return msg; } static void addContent(boost::intrusive_ptr msg, const string& data) { AMQFrame content((AMQContentBody(data))); msg->getFrames().append(content); } }; }} // namespace qpid::tests qpidc-0.16/src/tests/.valgrind.supp0000664000076400007640000001041611564504651017673 0ustar00jrossjross00000000000000{ Leak in TCPConnector: https://bugzilla.redhat.com/show_bug.cgi?id=520600 Memcheck:Leak fun:_vgrZU_libcZdsoZa_calloc fun:_dl_allocate_tls fun:* fun:* fun:* fun:_ZN4qpid6client12TCPConnector7connectERKSsi } { Leak in TCPConnector: https://bugzilla.redhat.com/show_bug.cgi?id=520600 Memcheck:Leak fun:_vgrZU_libcZdsoZa_calloc fun:_dl_allocate_tls fun:* fun:* fun:_ZN4qpid6client12TCPConnector7connectERKSsi } { Reported on FC5 and RHEL5 when md5 sasl libs are installed Memcheck:Leak fun:* fun:_dl_map_object_from_fd fun:_dl_map_object fun:openaux fun:_dl_catch_error fun:_dl_map_object_deps fun:dl_open_worker fun:_dl_catch_error fun:_dl_open fun:dlopen_doit fun:_dl_catch_error fun:_dlerror_run fun:* fun:_sasl_get_plugin fun:_sasl_load_plugins fun:sasl_client_init } { Benign leak in CPG - patched version. Memcheck:Leak fun:* fun:openais_service_connect fun:cpg_initialize } { Benign error in libcpg. Memcheck:Param socketcall.sendmsg(msg.msg_iov[i]) obj:*/libpthread-2.5.so obj:*/libcpg.so.2.0.0 } { Uninitialised value problem in _dl_relocate (F7, F8) Memcheck:Cond fun:_dl_relocate_object fun:*dl_* } { False "possibly leaked" in boost program_options - global std::string var. Memcheck:Leak fun:_Znwj fun:_ZNSs4_Rep9_S_createEjjRKSaIcE obj:/usr/lib/libstdc++.so.6.0.8 fun:_ZNSsC1EPKcRKSaIcE obj:/usr/lib/libboost_program_options.so.1.33.1 } { INVESTIGATE Memcheck:Leak fun:calloc fun:_dl_allocate_tls fun:pthread_create@@GLIBC_2.2.5 fun:_ZN4qpid6client9Connector4initEv fun:_ZN4qpid6client14ConnectionImpl4openERKSsiS3_S3_S3_ } { INVESTIGATE Memcheck:Param write(buf) obj:/lib64/tls/libc-2.3.4.so fun:_ZNK4qpid3sys6Socket5writeEPKvm fun:_ZN4qpid3sys8AsynchIO9writeableERNS0_14DispatchHandleE } { "Conditional jump or move depends on uninitialised value(s)" from Xerces parser Memcheck:Cond fun:_ZN11xercesc_2_717XMLUTF8Transcoder13transcodeFromEPKhjPtjRjPh fun:_ZN11xercesc_2_79XMLReader14xcodeMoreCharsEPtPhj fun:_ZN11xercesc_2_79XMLReader17refreshCharBufferEv } { INVESTIGATE Memcheck:Param socketcall.sendto(msg) fun:send fun:get_mapping fun:__nscd_get_map_ref fun:nscd_gethst_r fun:__nscd_gethostbyname_r fun:gethostbyname_r@@GLIBC_2.2.5 fun:gethostbyname fun:_ZNK4qpid3sys6Socket7connectERKSsi } { INVESTIGATE Memcheck:Leak fun:calloc fun:_dl_allocate_tls fun:pthread_create@@GLIBC_2.2.5 fun:_ZN4qpid6broker5Timer5startEv fun:_ZN4qpid6broker5TimerC1Ev fun:_ZN4qpid6broker10DtxManagerC1Ev fun:_ZN4qpid6broker6BrokerC1ERKNS1_7OptionsE fun:_ZN4qpid6broker6Broker6createERKNS1_7OptionsE fun:_ZN20ClientSessionFixtureC1Ev fun:_Z14testQueueQueryv fun:_ZN5boost9unit_test9ut_detail17unit_test_monitor8functionEv obj:/usr/lib64/libboost_unit_test_framework.so.1.32.0 fun:_ZN5boost17execution_monitor7executeEbi fun:_ZN5boost9unit_test9ut_detail17unit_test_monitor21execute_and_translateEPNS0_9test_caseEMS3_FvvEi fun:_ZN5boost9unit_test9test_case3runEv fun:_ZN5boost9unit_test10test_suite6do_runEv fun:_ZN5boost9unit_test9test_case3runEv fun:main } { INVESTIGATE Memcheck:Leak fun:calloc fun:_dl_allocate_tls fun:pthread_create@@GLIBC_2.2.5 fun:_ZN4qpid6client9Connector4initEv } { MICK -- FIX Memcheck:Leak fun:_Znam fun:_ZN4qpid7Options5parseEiPPcRKSsb } { MICK -- FIX Memcheck:Leak fun:malloc fun:strdup fun:_ZN4qpid7Options5parseEiPPcRKSsb } { CPG error - seems benign. Memcheck:Param socketcall.sendmsg(msg.msg_iov[i]) obj:* obj:*/libcpg.so.2.0.0 } { Known leak in boost.thread 1.33.1. Wildcards for 64/32 bit diffs. Memcheck:Leak fun:* obj:/usr/*/libboost_thread.so.1.33.1 fun:_ZN5boost6detail3tss3setEPv } { Shows up on RHEL5: believed benign Memcheck:Cond fun:__strcpy_chk fun:_sasl_load_plugins fun:sasl_client_init } { Seems like a use after delete issue in boost unit_test Memcheck:Addr8 fun:_ZN5boost9unit_test14framework_implD1Ev fun:exit fun:(below main) } { Seems like a use after delete issue in boost unit_test Memcheck:Addr4 fun:_ZN5boost9unit_test14framework_implD1Ev fun:exit fun:(below main) } qpidc-0.16/src/tests/rsynchosts0000775000076400007640000000264011654250703017237 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under onemake # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # absdir() { echo `cd $1 && pwd`; } abspath() { if test -d "$1"; then absdir "$1"; else echo $(absdir $(dirname "$1"))/$(basename "$1") fi } usage() { echo "Usage: $(basename $0) file [file...] Synchronize the contents of each file or directory to the same absolute path on each host in \$HOSTS. " exit 1 } test "$*" || usage for f in $*; do FILES="$FILES $(abspath $f)" || exit 1; done OK_FILE=`mktemp` # Will be deleted if anything goes wrong. trap "rm -f $OK_FILE" EXIT for h in $HOSTS; do rsync -aRO --delete $FILES $h:/ || { echo "rsync to $h failed"; rm -f $OK_FILE; } & done wait test -f $OK_FILE qpidc-0.16/src/tests/TxPublishTest.cpp0000664000076400007640000000567611611360622020367 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/NullMessageStore.h" #include "qpid/broker/RecoveryManager.h" #include "qpid/broker/TxPublish.h" #include "unit_test.h" #include #include #include #include "MessageUtils.h" #include "TestMessageStore.h" using std::list; using std::pair; using std::vector; using boost::intrusive_ptr; using namespace qpid::broker; using namespace qpid::framing; namespace qpid { namespace tests { struct TxPublishTest { TestMessageStore store; Queue::shared_ptr queue1; Queue::shared_ptr queue2; intrusive_ptr msg; TxPublish op; TxPublishTest() : queue1(new Queue("queue1", false, &store, 0)), queue2(new Queue("queue2", false, &store, 0)), msg(MessageUtils::createMessage("exchange", "routing_key", true)), op(msg) { op.deliverTo(queue1); op.deliverTo(queue2); } }; QPID_AUTO_TEST_SUITE(TxPublishTestSuite) QPID_AUTO_TEST_CASE(testPrepare) { TxPublishTest t; intrusive_ptr pmsg = boost::static_pointer_cast(t.msg); //ensure messages are enqueued in store t.op.prepare(0); BOOST_CHECK_EQUAL((size_t) 2, t.store.enqueued.size()); BOOST_CHECK_EQUAL(string("queue1"), t.store.enqueued[0].first); BOOST_CHECK_EQUAL(pmsg, t.store.enqueued[0].second); BOOST_CHECK_EQUAL(string("queue2"), t.store.enqueued[1].first); BOOST_CHECK_EQUAL(pmsg, t.store.enqueued[1].second); BOOST_CHECK_EQUAL( true, ( boost::static_pointer_cast(t.msg))->isIngressComplete()); } QPID_AUTO_TEST_CASE(testCommit) { TxPublishTest t; //ensure messages are delivered to queue t.op.prepare(0); t.op.commit(); BOOST_CHECK_EQUAL((uint32_t) 1, t.queue1->getMessageCount()); intrusive_ptr msg_dequeue = t.queue1->get().payload; BOOST_CHECK_EQUAL( true, (boost::static_pointer_cast(msg_dequeue))->isIngressComplete()); BOOST_CHECK_EQUAL(t.msg, msg_dequeue); BOOST_CHECK_EQUAL((uint32_t) 1, t.queue2->getMessageCount()); BOOST_CHECK_EQUAL(t.msg, t.queue2->get().payload); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/QueueFlowLimitTest.cpp0000664000076400007640000004000511556256327021357 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "unit_test.h" #include "test_tools.h" #include "qpid/broker/QueuePolicy.h" #include "qpid/broker/QueueFlowLimit.h" #include "qpid/sys/Time.h" #include "qpid/framing/reply_exceptions.h" #include "MessageUtils.h" #include "BrokerFixture.h" using namespace qpid::broker; using namespace qpid::framing; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(QueueFlowLimitTestSuite) namespace { class TestFlow : public QueueFlowLimit { public: TestFlow(uint32_t flowStopCount, uint32_t flowResumeCount, uint64_t flowStopSize, uint64_t flowResumeSize) : QueueFlowLimit(0, flowStopCount, flowResumeCount, flowStopSize, flowResumeSize) {} virtual ~TestFlow() {} static TestFlow *createTestFlow(const qpid::framing::FieldTable& settings) { FieldTable::ValuePtr v; v = settings.get(flowStopCountKey); uint32_t flowStopCount = (v) ? (uint32_t)v->get() : 0; v = settings.get(flowResumeCountKey); uint32_t flowResumeCount = (v) ? (uint32_t)v->get() : 0; v = settings.get(flowStopSizeKey); uint64_t flowStopSize = (v) ? (uint64_t)v->get() : 0; v = settings.get(flowResumeSizeKey); uint64_t flowResumeSize = (v) ? (uint64_t)v->get() : 0; return new TestFlow(flowStopCount, flowResumeCount, flowStopSize, flowResumeSize); } static QueueFlowLimit *getQueueFlowLimit(const qpid::framing::FieldTable& settings) { return QueueFlowLimit::createLimit(0, settings); } }; QueuedMessage createMessage(uint32_t size) { static uint32_t seqNum; QueuedMessage msg; msg.payload = MessageUtils::createMessage(); msg.position = ++seqNum; MessageUtils::addContent(msg.payload, std::string (size, 'x')); return msg; } } QPID_AUTO_TEST_CASE(testFlowCount) { FieldTable args; args.setInt(QueueFlowLimit::flowStopCountKey, 7); args.setInt(QueueFlowLimit::flowResumeCountKey, 5); std::auto_ptr flow(TestFlow::createTestFlow(args)); BOOST_CHECK_EQUAL((uint32_t) 7, flow->getFlowStopCount()); BOOST_CHECK_EQUAL((uint32_t) 5, flow->getFlowResumeCount()); BOOST_CHECK_EQUAL((uint32_t) 0, flow->getFlowStopSize()); BOOST_CHECK_EQUAL((uint32_t) 0, flow->getFlowResumeSize()); BOOST_CHECK(!flow->isFlowControlActive()); BOOST_CHECK(flow->monitorFlowControl()); std::deque msgs; for (size_t i = 0; i < 6; i++) { msgs.push_back(createMessage(10)); flow->enqueued(msgs.back()); BOOST_CHECK(!flow->isFlowControlActive()); } BOOST_CHECK(!flow->isFlowControlActive()); // 6 on queue msgs.push_back(createMessage(10)); flow->enqueued(msgs.back()); BOOST_CHECK(!flow->isFlowControlActive()); // 7 on queue msgs.push_back(createMessage(10)); flow->enqueued(msgs.back()); BOOST_CHECK(flow->isFlowControlActive()); // 8 on queue, ON msgs.push_back(createMessage(10)); flow->enqueued(msgs.back()); BOOST_CHECK(flow->isFlowControlActive()); // 9 on queue, no change to flow control flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); // 8 on queue flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); // 7 on queue flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); // 6 on queue flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); // 5 on queue, no change flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(!flow->isFlowControlActive()); // 4 on queue, OFF } QPID_AUTO_TEST_CASE(testFlowSize) { FieldTable args; args.setUInt64(QueueFlowLimit::flowStopSizeKey, 70); args.setUInt64(QueueFlowLimit::flowResumeSizeKey, 50); std::auto_ptr flow(TestFlow::createTestFlow(args)); BOOST_CHECK_EQUAL((uint32_t) 0, flow->getFlowStopCount()); BOOST_CHECK_EQUAL((uint32_t) 0, flow->getFlowResumeCount()); BOOST_CHECK_EQUAL((uint32_t) 70, flow->getFlowStopSize()); BOOST_CHECK_EQUAL((uint32_t) 50, flow->getFlowResumeSize()); BOOST_CHECK(!flow->isFlowControlActive()); BOOST_CHECK(flow->monitorFlowControl()); std::deque msgs; for (size_t i = 0; i < 6; i++) { msgs.push_back(createMessage(10)); flow->enqueued(msgs.back()); BOOST_CHECK(!flow->isFlowControlActive()); } BOOST_CHECK(!flow->isFlowControlActive()); // 60 on queue BOOST_CHECK_EQUAL(6u, flow->getFlowCount()); BOOST_CHECK_EQUAL(60u, flow->getFlowSize()); QueuedMessage msg_9 = createMessage(9); flow->enqueued(msg_9); BOOST_CHECK(!flow->isFlowControlActive()); // 69 on queue QueuedMessage tinyMsg_1 = createMessage(1); flow->enqueued(tinyMsg_1); BOOST_CHECK(!flow->isFlowControlActive()); // 70 on queue QueuedMessage tinyMsg_2 = createMessage(1); flow->enqueued(tinyMsg_2); BOOST_CHECK(flow->isFlowControlActive()); // 71 on queue, ON msgs.push_back(createMessage(10)); flow->enqueued(msgs.back()); BOOST_CHECK(flow->isFlowControlActive()); // 81 on queue BOOST_CHECK_EQUAL(10u, flow->getFlowCount()); BOOST_CHECK_EQUAL(81u, flow->getFlowSize()); flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); // 71 on queue flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); // 61 on queue flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); // 51 on queue flow->dequeued(tinyMsg_1); BOOST_CHECK(flow->isFlowControlActive()); // 50 on queue flow->dequeued(tinyMsg_2); BOOST_CHECK(!flow->isFlowControlActive()); // 49 on queue, OFF flow->dequeued(msg_9); BOOST_CHECK(!flow->isFlowControlActive()); // 40 on queue flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(!flow->isFlowControlActive()); // 30 on queue flow->dequeued(msgs.front()); msgs.pop_front(); BOOST_CHECK(!flow->isFlowControlActive()); // 20 on queue BOOST_CHECK_EQUAL(2u, flow->getFlowCount()); BOOST_CHECK_EQUAL(20u, flow->getFlowSize()); } QPID_AUTO_TEST_CASE(testFlowArgs) { FieldTable args; const uint64_t stop(0x2FFFFFFFFull); const uint64_t resume(0x1FFFFFFFFull); args.setInt(QueueFlowLimit::flowStopCountKey, 30); args.setInt(QueueFlowLimit::flowResumeCountKey, 21); args.setUInt64(QueueFlowLimit::flowStopSizeKey, stop); args.setUInt64(QueueFlowLimit::flowResumeSizeKey, resume); std::auto_ptr flow(TestFlow::createTestFlow(args)); BOOST_CHECK_EQUAL((uint32_t) 30, flow->getFlowStopCount()); BOOST_CHECK_EQUAL((uint32_t) 21, flow->getFlowResumeCount()); BOOST_CHECK_EQUAL(stop, flow->getFlowStopSize()); BOOST_CHECK_EQUAL(resume, flow->getFlowResumeSize()); BOOST_CHECK(!flow->isFlowControlActive()); BOOST_CHECK(flow->monitorFlowControl()); } QPID_AUTO_TEST_CASE(testFlowCombo) { FieldTable args; args.setInt(QueueFlowLimit::flowStopCountKey, 10); args.setInt(QueueFlowLimit::flowResumeCountKey, 5); args.setUInt64(QueueFlowLimit::flowStopSizeKey, 200); args.setUInt64(QueueFlowLimit::flowResumeSizeKey, 100); std::deque msgs_1; std::deque msgs_10; std::deque msgs_50; std::deque msgs_100; QueuedMessage msg; std::auto_ptr flow(TestFlow::createTestFlow(args)); BOOST_CHECK(!flow->isFlowControlActive()); // count:0 size:0 // verify flow control comes ON when only count passes its stop point. for (size_t i = 0; i < 10; i++) { msgs_10.push_back(createMessage(10)); flow->enqueued(msgs_10.back()); BOOST_CHECK(!flow->isFlowControlActive()); } // count:10 size:100 msgs_1.push_back(createMessage(1)); flow->enqueued(msgs_1.back()); // count:11 size: 101 ->ON BOOST_CHECK(flow->isFlowControlActive()); for (size_t i = 0; i < 6; i++) { flow->dequeued(msgs_10.front()); msgs_10.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); } // count:5 size: 41 flow->dequeued(msgs_1.front()); // count: 4 size: 40 ->OFF msgs_1.pop_front(); BOOST_CHECK(!flow->isFlowControlActive()); for (size_t i = 0; i < 4; i++) { flow->dequeued(msgs_10.front()); msgs_10.pop_front(); BOOST_CHECK(!flow->isFlowControlActive()); } // count:0 size:0 // verify flow control comes ON when only size passes its stop point. msgs_100.push_back(createMessage(100)); flow->enqueued(msgs_100.back()); // count:1 size: 100 BOOST_CHECK(!flow->isFlowControlActive()); msgs_50.push_back(createMessage(50)); flow->enqueued(msgs_50.back()); // count:2 size: 150 BOOST_CHECK(!flow->isFlowControlActive()); msgs_50.push_back(createMessage(50)); flow->enqueued(msgs_50.back()); // count:3 size: 200 BOOST_CHECK(!flow->isFlowControlActive()); msgs_1.push_back(createMessage(1)); flow->enqueued(msgs_1.back()); // count:4 size: 201 ->ON BOOST_CHECK(flow->isFlowControlActive()); flow->dequeued(msgs_100.front()); // count:3 size:101 msgs_100.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); flow->dequeued(msgs_1.front()); // count:2 size:100 msgs_1.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); flow->dequeued(msgs_50.front()); // count:1 size:50 ->OFF msgs_50.pop_front(); BOOST_CHECK(!flow->isFlowControlActive()); // verify flow control remains ON until both thresholds drop below their // resume point. for (size_t i = 0; i < 8; i++) { msgs_10.push_back(createMessage(10)); flow->enqueued(msgs_10.back()); BOOST_CHECK(!flow->isFlowControlActive()); } // count:9 size:130 msgs_10.push_back(createMessage(10)); flow->enqueued(msgs_10.back()); // count:10 size: 140 BOOST_CHECK(!flow->isFlowControlActive()); msgs_1.push_back(createMessage(1)); flow->enqueued(msgs_1.back()); // count:11 size: 141 ->ON BOOST_CHECK(flow->isFlowControlActive()); msgs_100.push_back(createMessage(100)); flow->enqueued(msgs_100.back()); // count:12 size: 241 (both thresholds crossed) BOOST_CHECK(flow->isFlowControlActive()); // at this point: 9@10 + 1@50 + 1@100 + 1@1 == 12@241 flow->dequeued(msgs_50.front()); // count:11 size:191 msgs_50.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); for (size_t i = 0; i < 9; i++) { flow->dequeued(msgs_10.front()); msgs_10.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); } // count:2 size:101 flow->dequeued(msgs_1.front()); // count:1 size:100 msgs_1.pop_front(); BOOST_CHECK(flow->isFlowControlActive()); // still active due to size flow->dequeued(msgs_100.front()); // count:0 size:0 ->OFF msgs_100.pop_front(); BOOST_CHECK(!flow->isFlowControlActive()); } QPID_AUTO_TEST_CASE(testFlowDefaultArgs) { QueueFlowLimit::setDefaults(2950001, // max queue byte count 80, // 80% stop threshold 70); // 70% resume threshold FieldTable args; QueueFlowLimit *ptr = TestFlow::getQueueFlowLimit(args); BOOST_CHECK(ptr); std::auto_ptr flow(ptr); BOOST_CHECK_EQUAL((uint64_t) 2360001, flow->getFlowStopSize()); BOOST_CHECK_EQUAL((uint64_t) 2065000, flow->getFlowResumeSize()); BOOST_CHECK_EQUAL( 0u, flow->getFlowStopCount()); BOOST_CHECK_EQUAL( 0u, flow->getFlowResumeCount()); BOOST_CHECK(!flow->isFlowControlActive()); BOOST_CHECK(flow->monitorFlowControl()); } QPID_AUTO_TEST_CASE(testFlowOverrideArgs) { QueueFlowLimit::setDefaults(2950001, // max queue byte count 80, // 80% stop threshold 70); // 70% resume threshold { FieldTable args; args.setInt(QueueFlowLimit::flowStopCountKey, 35000); args.setInt(QueueFlowLimit::flowResumeCountKey, 30000); QueueFlowLimit *ptr = TestFlow::getQueueFlowLimit(args); BOOST_CHECK(ptr); std::auto_ptr flow(ptr); BOOST_CHECK_EQUAL((uint32_t) 35000, flow->getFlowStopCount()); BOOST_CHECK_EQUAL((uint32_t) 30000, flow->getFlowResumeCount()); BOOST_CHECK_EQUAL((uint64_t) 0, flow->getFlowStopSize()); BOOST_CHECK_EQUAL((uint64_t) 0, flow->getFlowResumeSize()); BOOST_CHECK(!flow->isFlowControlActive()); BOOST_CHECK(flow->monitorFlowControl()); } { FieldTable args; args.setInt(QueueFlowLimit::flowStopSizeKey, 350000); args.setInt(QueueFlowLimit::flowResumeSizeKey, 300000); QueueFlowLimit *ptr = TestFlow::getQueueFlowLimit(args); BOOST_CHECK(ptr); std::auto_ptr flow(ptr); BOOST_CHECK_EQUAL((uint32_t) 0, flow->getFlowStopCount()); BOOST_CHECK_EQUAL((uint32_t) 0, flow->getFlowResumeCount()); BOOST_CHECK_EQUAL((uint64_t) 350000, flow->getFlowStopSize()); BOOST_CHECK_EQUAL((uint64_t) 300000, flow->getFlowResumeSize()); BOOST_CHECK(!flow->isFlowControlActive()); BOOST_CHECK(flow->monitorFlowControl()); } { FieldTable args; args.setInt(QueueFlowLimit::flowStopCountKey, 35000); args.setInt(QueueFlowLimit::flowResumeCountKey, 30000); args.setInt(QueueFlowLimit::flowStopSizeKey, 350000); args.setInt(QueueFlowLimit::flowResumeSizeKey, 300000); QueueFlowLimit *ptr = TestFlow::getQueueFlowLimit(args); BOOST_CHECK(ptr); std::auto_ptr flow(ptr); BOOST_CHECK_EQUAL((uint32_t) 35000, flow->getFlowStopCount()); BOOST_CHECK_EQUAL((uint32_t) 30000, flow->getFlowResumeCount()); BOOST_CHECK_EQUAL((uint64_t) 350000, flow->getFlowStopSize()); BOOST_CHECK_EQUAL((uint64_t) 300000, flow->getFlowResumeSize()); BOOST_CHECK(!flow->isFlowControlActive()); BOOST_CHECK(flow->monitorFlowControl()); } } QPID_AUTO_TEST_CASE(testFlowOverrideDefaults) { QueueFlowLimit::setDefaults(2950001, // max queue byte count 97, // stop threshold 73); // resume threshold FieldTable args; QueueFlowLimit *ptr = TestFlow::getQueueFlowLimit(args); BOOST_CHECK(ptr); std::auto_ptr flow(ptr); BOOST_CHECK_EQUAL((uint32_t) 2861501, flow->getFlowStopSize()); BOOST_CHECK_EQUAL((uint32_t) 2153500, flow->getFlowResumeSize()); BOOST_CHECK(!flow->isFlowControlActive()); BOOST_CHECK(flow->monitorFlowControl()); } QPID_AUTO_TEST_CASE(testFlowDisable) { { FieldTable args; args.setInt(QueueFlowLimit::flowStopCountKey, 0); QueueFlowLimit *ptr = TestFlow::getQueueFlowLimit(args); BOOST_CHECK(!ptr); } { FieldTable args; args.setInt(QueueFlowLimit::flowStopSizeKey, 0); QueueFlowLimit *ptr = TestFlow::getQueueFlowLimit(args); BOOST_CHECK(!ptr); } } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/PollerTest.cpp0000664000076400007640000001667411374603633017712 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * Use socketpair to test the poller */ #include "qpid/sys/IOHandle.h" #include "qpid/sys/Poller.h" #include "qpid/sys/posix/PrivatePosix.h" #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace qpid::sys; int writeALot(int fd, const string& s) { int bytesWritten = 0; do { errno = 0; int lastWrite = ::write(fd, s.c_str(), s.size()); if ( lastWrite >= 0) { bytesWritten += lastWrite; } } while (errno != EAGAIN); return bytesWritten; } int readALot(int fd) { int bytesRead = 0; char buf[1024]; do { errno = 0; int lastRead = ::read(fd, buf, sizeof(buf)); if ( lastRead >= 0) { bytesRead += lastRead; } } while (errno != EAGAIN); return bytesRead; } void makesocketpair(int (&sv)[2]) { int rc = ::socketpair(AF_UNIX, SOCK_STREAM, 0, sv); assert(rc >= 0); // Set non-blocking rc = ::fcntl(sv[0], F_SETFL, O_NONBLOCK); assert(rc >= 0); rc = ::fcntl(sv[1], F_SETFL, O_NONBLOCK); assert(rc >= 0); } int main(int /*argc*/, char** /*argv*/) { try { int sv[2]; makesocketpair(sv); // Make up a large string string testString = "This is only a test ... 1,2,3,4,5,6,7,8,9,10;"; for (int i = 0; i < 6; i++) testString += testString; // Read as much as we can from socket 0 int bytesRead = readALot(sv[0]); assert(bytesRead == 0); // Write as much as we can to socket 0 int bytesWritten = writeALot(sv[0], testString); // Read as much as we can from socket 1 bytesRead = readALot(sv[1]); assert(bytesRead == bytesWritten); auto_ptr poller(new Poller); PosixIOHandle f0(sv[0]); PosixIOHandle f1(sv[1]); PollerHandle h0(f0); PollerHandle h1(f1); poller->registerHandle(h0); poller->monitorHandle(h0, Poller::INOUT); // h0 should be writable Poller::Event event = poller->wait(); assert(event.handle == &h0); assert(event.type == Poller::WRITABLE); // Write as much as we can to socket 0 bytesWritten = writeALot(sv[0], testString); // Wait for 500ms - h0 no longer writable event = poller->wait(500000000); assert(event.handle == 0); // Test we can read it all now poller->registerHandle(h1); poller->monitorHandle(h1, Poller::INOUT); event = poller->wait(); assert(event.handle == &h1); assert(event.type == Poller::READ_WRITABLE); bytesRead = readALot(sv[1]); assert(bytesRead == bytesWritten); // Test poller interrupt assert(poller->interrupt(h0) == true); event = poller->wait(); assert(event.handle == &h0); assert(event.type == Poller::INTERRUPTED); // Test multiple interrupts assert(poller->interrupt(h0) == true); assert(poller->interrupt(h1) == true); // Make sure we can interrupt them again assert(poller->interrupt(h0) == true); assert(poller->interrupt(h1) == true); // Make sure that they both come out event = poller->wait(); assert(event.type == Poller::INTERRUPTED); assert(event.handle == &h0 || event.handle == &h1); if (event.handle == &h0) { event = poller->wait(); assert(event.type == Poller::INTERRUPTED); assert(event.handle == &h1); } else { event = poller->wait(); assert(event.type == Poller::INTERRUPTED); assert(event.handle == &h0); } poller->unmonitorHandle(h1, Poller::INOUT); event = poller->wait(); assert(event.handle == &h0); assert(event.type == Poller::WRITABLE); // We didn't write anything so it should still be writable event = poller->wait(); assert(event.handle == &h0); assert(event.type == Poller::WRITABLE); poller->unmonitorHandle(h0, Poller::INOUT); event = poller->wait(500000000); assert(event.handle == 0); poller->unregisterHandle(h1); assert(poller->interrupt(h1) == false); // close the other end to force a disconnect ::close(sv[1]); // Now make sure that we are readable followed by disconnected // and after that we never return again poller->monitorHandle(h0, Poller::INOUT); event = poller->wait(500000000); assert(event.handle == &h0); assert(event.type == Poller::READABLE); event = poller->wait(500000000); assert(event.handle == &h0); assert(event.type == Poller::DISCONNECTED); event = poller->wait(1500000000); assert(event.handle == 0); // Now we're disconnected monitoring should have no effect at all poller->unmonitorHandle(h0, Poller::INOUT); event = poller->wait(1500000000); assert(event.handle == 0); poller->unregisterHandle(h0); assert(poller->interrupt(h0) == false); // Test shutdown poller->shutdown(); event = poller->wait(); assert(event.handle == 0); assert(event.type == Poller::SHUTDOWN); event = poller->wait(); assert(event.handle == 0); assert(event.type == Poller::SHUTDOWN); ::close(sv[0]); // Test for correct interaction of shutdown and interrupts - need to have new poller // etc. for this makesocketpair(sv); auto_ptr poller1(new Poller); PosixIOHandle f2(sv[0]); PosixIOHandle f3(sv[1]); PollerHandle h2(f2); PollerHandle h3(f3); poller1->registerHandle(h2); poller1->monitorHandle(h2, Poller::INOUT); event = poller1->wait(); assert(event.handle == &h2); assert(event.type == Poller::WRITABLE); // Shutdown poller1->shutdown(); event = poller1->wait(); assert(event.handle == 0); assert(event.type == Poller::SHUTDOWN); assert(poller1->interrupt(h2) == true); event = poller1->wait(); assert(event.handle == &h2); assert(event.type == Poller::INTERRUPTED); poller1->unmonitorHandle(h2, Poller::INOUT); event = poller1->wait(); assert(event.handle == 0); assert(event.type == Poller::SHUTDOWN); poller1->unregisterHandle(h2); return 0; } catch (exception& e) { cout << "Caught exception " << e.what() << "\n"; } } qpidc-0.16/src/tests/start_broker.ps10000664000076400007640000000406711654266731020235 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Get the directory where this script resides. function Get-ScriptPath { Split-Path $myInvocation.ScriptName } # Start a test broker and capture it's port (from stdout) to qpidd.port # This script will exit immediately after spawning the broker process. To avoid # running more tests before the broker is initialized, wait for the qpidd.port # file to appear before exiting. if (Test-Path qpidd.port) { Remove-Item qpidd.port } # Test runs from the tests directory but the broker executable is one level # up, and most likely in a subdirectory from there based on what build type. # Look around for it before trying to start it. $subs = "Debug","Release","MinSizeRel","RelWithDebInfo" foreach ($sub in $subs) { $prog = "..\$sub\qpidd.exe" if (Test-Path $prog) { break } } if (!(Test-Path $prog)) { "Cannot locate qpidd.exe" exit 1 } $cmdline = "$prog --auth=no --no-module-dir --port=0 --log-to-file qpidd.log $args | foreach { set-content qpidd.port `$_ }" $cmdblock = $executioncontext.invokecommand.NewScriptBlock($cmdline) $srcdir = Get-ScriptPath . $srcdir\background.ps1 $cmdblock $wait_time = 0 while (!(Test-Path qpidd.port) -and ($wait_time -lt 30)) { Start-Sleep 2 $wait_time += 2 } if (Test-Path qpidd.port) { exit 0 } "Time out waiting for broker to start" exit 1 qpidc-0.16/src/tests/TxBufferTest.cpp0000664000076400007640000001211011252003060020136 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/TxBuffer.h" #include "unit_test.h" #include #include #include "TxMocks.h" using namespace qpid::broker; using boost::static_pointer_cast; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(TxBufferTestSuite) QPID_AUTO_TEST_CASE(testCommitLocal) { MockTransactionalStore store; store.expectBegin().expectCommit(); MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectPrepare().expectCommit(); MockTxOp::shared_ptr opB(new MockTxOp()); opB->expectPrepare().expectPrepare().expectCommit().expectCommit();//opB enlisted twice to test relative order MockTxOp::shared_ptr opC(new MockTxOp()); opC->expectPrepare().expectCommit(); TxBuffer buffer; buffer.enlist(static_pointer_cast(opA)); buffer.enlist(static_pointer_cast(opB)); buffer.enlist(static_pointer_cast(opB));//opB enlisted twice buffer.enlist(static_pointer_cast(opC)); BOOST_CHECK(buffer.commitLocal(&store)); store.check(); BOOST_CHECK(store.isCommitted()); opA->check(); opB->check(); opC->check(); } QPID_AUTO_TEST_CASE(testFailOnCommitLocal) { MockTransactionalStore store; store.expectBegin().expectAbort(); MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectPrepare().expectRollback(); MockTxOp::shared_ptr opB(new MockTxOp(true)); opB->expectPrepare().expectRollback(); MockTxOp::shared_ptr opC(new MockTxOp());//will never get prepare as b will fail opC->expectRollback(); TxBuffer buffer; buffer.enlist(static_pointer_cast(opA)); buffer.enlist(static_pointer_cast(opB)); buffer.enlist(static_pointer_cast(opC)); BOOST_CHECK(!buffer.commitLocal(&store)); BOOST_CHECK(store.isAborted()); store.check(); opA->check(); opB->check(); opC->check(); } QPID_AUTO_TEST_CASE(testPrepare) { MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectPrepare(); MockTxOp::shared_ptr opB(new MockTxOp()); opB->expectPrepare(); MockTxOp::shared_ptr opC(new MockTxOp()); opC->expectPrepare(); TxBuffer buffer; buffer.enlist(static_pointer_cast(opA)); buffer.enlist(static_pointer_cast(opB)); buffer.enlist(static_pointer_cast(opC)); BOOST_CHECK(buffer.prepare(0)); opA->check(); opB->check(); opC->check(); } QPID_AUTO_TEST_CASE(testFailOnPrepare) { MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectPrepare(); MockTxOp::shared_ptr opB(new MockTxOp(true)); opB->expectPrepare(); MockTxOp::shared_ptr opC(new MockTxOp());//will never get prepare as b will fail TxBuffer buffer; buffer.enlist(static_pointer_cast(opA)); buffer.enlist(static_pointer_cast(opB)); buffer.enlist(static_pointer_cast(opC)); BOOST_CHECK(!buffer.prepare(0)); opA->check(); opB->check(); opC->check(); } QPID_AUTO_TEST_CASE(testRollback) { MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectRollback(); MockTxOp::shared_ptr opB(new MockTxOp(true)); opB->expectRollback(); MockTxOp::shared_ptr opC(new MockTxOp()); opC->expectRollback(); TxBuffer buffer; buffer.enlist(static_pointer_cast(opA)); buffer.enlist(static_pointer_cast(opB)); buffer.enlist(static_pointer_cast(opC)); buffer.rollback(); opA->check(); opB->check(); opC->check(); } QPID_AUTO_TEST_CASE(testBufferIsClearedAfterRollback) { MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectRollback(); MockTxOp::shared_ptr opB(new MockTxOp()); opB->expectRollback(); TxBuffer buffer; buffer.enlist(static_pointer_cast(opA)); buffer.enlist(static_pointer_cast(opB)); buffer.rollback(); buffer.commit();//second call should not reach ops opA->check(); opB->check(); } QPID_AUTO_TEST_CASE(testBufferIsClearedAfterCommit) { MockTxOp::shared_ptr opA(new MockTxOp()); opA->expectCommit(); MockTxOp::shared_ptr opB(new MockTxOp()); opB->expectCommit(); TxBuffer buffer; buffer.enlist(static_pointer_cast(opA)); buffer.enlist(static_pointer_cast(opB)); buffer.commit(); buffer.rollback();//second call should not reach ops opA->check(); opB->check(); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/BrokerMgmtAgent.xml0000664000076400007640000000241611475527763020663 0ustar00jrossjross00000000000000 A test object defined for the BrokerMgmtAgent unit test. qpidc-0.16/src/tests/run_queue_flow_limit_tests0000775000076400007640000000345111654250703022500 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run tests against Queue producer flow control. source ./test_env.sh test -d $PYTHON_DIR || { echo "Skipping queue flow control tests, no python dir."; exit 0; } LOG_FILE=queue_flow_limit_test.log PORT="" trap stop_broker INT TERM QUIT error() { echo $* exit 1; } start_broker() { # Note: if you change the DEFAULT_THRESHOLDS, you will need to update queue_flow_limit_tests.py DEFAULT_THRESHOLDS="--default-flow-stop-threshold=80 --default-flow-resume-threshold=70" rm -rf $LOG_FILE PORT=$($QPIDD_EXEC $DEFAULT_THRESHOLDS --auth=no --no-module-dir --daemon --port=0 -t --log-to-file $LOG_FILE) || error "Could not start broker" } stop_broker() { test -n "$PORT" && $QPIDD_EXEC --no-module-dir --quit --port $PORT } start_broker echo "Running Queue flow limit tests using broker on port $PORT" $QPID_PYTHON_TEST -m queue_flow_limit_tests $SKIPTESTS -b localhost:$PORT $@ RETCODE=$? stop_broker if test x$RETCODE != x0; then echo "FAIL queue flow limit tests"; exit 1; fi rm -rf $LOG_FILE qpidc-0.16/src/tests/QueueEvents.cpp0000664000076400007640000002037411623224255020052 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "MessageUtils.h" #include "unit_test.h" #include "BrokerFixture.h" #include "qpid/broker/Message.h" #include "qpid/broker/Queue.h" #include "qpid/broker/QueueEvents.h" #include "qpid/client/QueueOptions.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/sys/Dispatcher.h" #include #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(QueueEventsSuite) using namespace qpid::client; using namespace qpid::broker; using namespace qpid::sys; using qpid::framing::SequenceNumber; struct EventChecker { typedef std::deque Events; Events events; boost::shared_ptr poller; void handle(QueueEvents::Event e) { if (events.empty()) { BOOST_FAIL("Unexpected event received"); } else { BOOST_CHECK_EQUAL(events.front().type, e.type); BOOST_CHECK_EQUAL(events.front().msg.queue, e.msg.queue); BOOST_CHECK_EQUAL(events.front().msg.payload, e.msg.payload); BOOST_CHECK_EQUAL(events.front().msg.position, e.msg.position); events.pop_front(); } if (events.empty() && poller) poller->shutdown(); } void expect(QueueEvents::Event e) { events.push_back(e); } }; QPID_AUTO_TEST_CASE(testBasicEventProcessing) { boost::shared_ptr poller(new Poller()); sys::Dispatcher dispatcher(poller); Thread dispatchThread(dispatcher); QueueEvents events(poller); EventChecker listener; listener.poller = poller; events.registerListener("dummy", boost::bind(&EventChecker::handle, &listener, _1)); //signal occurence of some events: Queue queue("queue1"); SequenceNumber id; QueuedMessage event1(&queue, MessageUtils::createMessage(), id); QueuedMessage event2(&queue, MessageUtils::createMessage(), ++id); //define events expected by listener: listener.expect(QueueEvents::Event(QueueEvents::ENQUEUE, event1)); listener.expect(QueueEvents::Event(QueueEvents::ENQUEUE, event2)); listener.expect(QueueEvents::Event(QueueEvents::DEQUEUE, event1)); events.enqueued(event1); events.enqueued(event2); events.dequeued(event1); dispatchThread.join(); events.shutdown(); events.unregisterListener("dummy"); } struct EventRecorder { struct EventRecord { QueueEvents::EventType type; std::string queue; std::string content; SequenceNumber position; }; typedef std::deque Events; Events events; void handle(QueueEvents::Event event) { EventRecord record; record.type = event.type; record.queue = event.msg.queue->getName(); event.msg.payload->getFrames().getContent(record.content); record.position = event.msg.position; events.push_back(record); } void check(QueueEvents::EventType type, const std::string& queue, const std::string& content, const SequenceNumber& position) { if (events.empty()) { BOOST_FAIL("Missed event"); } else { BOOST_CHECK_EQUAL(events.front().type, type); BOOST_CHECK_EQUAL(events.front().queue, queue); BOOST_CHECK_EQUAL(events.front().content, content); BOOST_CHECK_EQUAL(events.front().position, position); events.pop_front(); } } void checkEnqueue(const std::string& queue, const std::string& data, const SequenceNumber& position) { check(QueueEvents::ENQUEUE, queue, data, position); } void checkDequeue(const std::string& queue, const std::string& data, const SequenceNumber& position) { check(QueueEvents::DEQUEUE, queue, data, position); } }; QPID_AUTO_TEST_CASE(testSystemLevelEventProcessing) { SessionFixture fixture; //register dummy event listener to broker EventRecorder listener; fixture.broker->getQueueEvents().registerListener("recorder", boost::bind(&EventRecorder::handle, &listener, _1)); //declare queue with event options specified QueueOptions options; options.enableQueueEvents(false); std::string q("queue-events-test"); fixture.session.queueDeclare(arg::queue=q, arg::arguments=options); //send and consume some messages LocalQueue incoming; Subscription sub = fixture.subs.subscribe(incoming, q); for (int i = 0; i < 5; i++) { fixture.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } for (int i = 0; i < 3; i++) { BOOST_CHECK_EQUAL(incoming.pop().getData(), (boost::format("%1%_%2%") % "Message" % (i+1)).str()); } for (int i = 5; i < 10; i++) { fixture.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } for (int i = 3; i < 10; i++) { BOOST_CHECK_EQUAL(incoming.pop().getData(), (boost::format("%1%_%2%") % "Message" % (i+1)).str()); } fixture.connection.close(); fixture.broker->getQueueEvents().shutdown(); //check listener was notified of all events, and in correct order SequenceNumber enqueueId(1); SequenceNumber dequeueId(1); for (int i = 0; i < 5; i++) { listener.checkEnqueue(q, (boost::format("%1%_%2%") % "Message" % (i+1)).str(), enqueueId++); } for (int i = 0; i < 3; i++) { listener.checkDequeue(q, (boost::format("%1%_%2%") % "Message" % (i+1)).str(), dequeueId++); } for (int i = 5; i < 10; i++) { listener.checkEnqueue(q, (boost::format("%1%_%2%") % "Message" % (i+1)).str(), enqueueId++); } for (int i = 3; i < 10; i++) { listener.checkDequeue(q, (boost::format("%1%_%2%") % "Message" % (i+1)).str(), dequeueId++); } } QPID_AUTO_TEST_CASE(testSystemLevelEventProcessing_enqueuesOnly) { SessionFixture fixture; //register dummy event listener to broker EventRecorder listener; fixture.broker->getQueueEvents().registerListener("recorder", boost::bind(&EventRecorder::handle, &listener, _1)); //declare queue with event options specified QueueOptions options; options.enableQueueEvents(true); std::string q("queue-events-test"); fixture.session.queueDeclare(arg::queue=q, arg::arguments=options); //send and consume some messages LocalQueue incoming; Subscription sub = fixture.subs.subscribe(incoming, q); for (int i = 0; i < 5; i++) { fixture.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } for (int i = 0; i < 3; i++) { BOOST_CHECK_EQUAL(incoming.pop().getData(), (boost::format("%1%_%2%") % "Message" % (i+1)).str()); } for (int i = 5; i < 10; i++) { fixture.session.messageTransfer(arg::content=client::Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), q)); } for (int i = 3; i < 10; i++) { BOOST_CHECK_EQUAL(incoming.pop().getData(), (boost::format("%1%_%2%") % "Message" % (i+1)).str()); } fixture.connection.close(); fixture.broker->getQueueEvents().shutdown(); //check listener was notified of all events, and in correct order SequenceNumber enqueueId(1); SequenceNumber dequeueId(1); for (int i = 0; i < 5; i++) { listener.checkEnqueue(q, (boost::format("%1%_%2%") % "Message" % (i+1)).str(), enqueueId++); } for (int i = 5; i < 10; i++) { listener.checkEnqueue(q, (boost::format("%1%_%2%") % "Message" % (i+1)).str(), enqueueId++); } } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/Shlib.cpp0000664000076400007640000000436111412435127016636 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "test_tools.h" #include "config.h" #include "qpid/sys/Shlib.h" #include "qpid/Exception.h" #include "unit_test.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ShlibTestSuite) using namespace qpid::sys; typedef void (*CallMe)(int*); QPID_AUTO_TEST_CASE(testShlib) { // The CMake-based build passes in the shared lib suffix; if it's not // there, this is a Linux/UNIX libtool-based build. #if defined (QPID_SHLIB_PREFIX) && defined (QPID_SHLIB_SUFFIX) Shlib sh("./" QPID_SHLIB_PREFIX "shlibtest" QPID_SHLIB_POSTFIX QPID_SHLIB_SUFFIX); #else Shlib sh(".libs/libshlibtest.so"); #endif // Double cast to avoid ISO warning. CallMe callMe=sh.getSymbol("callMe"); BOOST_REQUIRE(callMe != 0); int unloaded=0; callMe(&unloaded); sh.unload(); BOOST_CHECK_EQUAL(42, unloaded); try { sh.getSymbol("callMe"); BOOST_FAIL("Expected exception"); } catch (const qpid::Exception&) {} } QPID_AUTO_TEST_CASE(testAutoShlib) { int unloaded = 0; { #if defined (QPID_SHLIB_PREFIX) && defined (QPID_SHLIB_SUFFIX) AutoShlib sh("./" QPID_SHLIB_PREFIX "shlibtest" QPID_SHLIB_POSTFIX QPID_SHLIB_SUFFIX); #else AutoShlib sh(".libs/libshlibtest.so"); #endif CallMe callMe=sh.getSymbol("callMe"); BOOST_REQUIRE(callMe != 0); callMe(&unloaded); } BOOST_CHECK_EQUAL(42, unloaded); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/qpid-stream.cpp0000664000076400007640000001354711405431040020021 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include #include using namespace qpid::messaging; using namespace qpid::types; namespace qpid { namespace tests { struct Args : public qpid::Options { std::string url; std::string address; uint size; uint rate; bool durable; uint receiverCapacity; uint senderCapacity; uint ackFrequency; Args() : url("amqp:tcp:127.0.0.1:5672"), address("test-queue"), size(512), rate(1000), durable(false), receiverCapacity(0), senderCapacity(0), ackFrequency(1) { addOptions() ("url", qpid::optValue(url, "URL"), "Url to connect to.") ("address", qpid::optValue(address, "ADDRESS"), "Address to stream messages through.") ("size", qpid::optValue(size, "bytes"), "Message size in bytes (content only, not headers).") ("rate", qpid::optValue(rate, "msgs/sec"), "Rate at which to stream messages.") ("durable", qpid::optValue(durable, "true|false"), "Mark messages as durable.") ("sender-capacity", qpid::optValue(senderCapacity, "N"), "Credit window (0 implies infinite window)") ("receiver-capacity", qpid::optValue(receiverCapacity, "N"), "Credit window (0 implies infinite window)") ("ack-frequency", qpid::optValue(ackFrequency, "N"), "Ack frequency (0 implies none of the messages will get accepted)"); } }; Args opts; const std::string TS = "ts"; uint64_t timestamp(const qpid::sys::AbsTime& time) { qpid::sys::Duration t(qpid::sys::EPOCH, time); return t; } struct Client : qpid::sys::Runnable { virtual ~Client() {} virtual void doWork(Session&) = 0; void run() { Connection connection(opts.url); try { connection.open(); Session session = connection.createSession(); doWork(session); session.close(); connection.close(); } catch(const std::exception& error) { std::cout << error.what() << std::endl; connection.close(); } } qpid::sys::Thread thread; void start() { thread = qpid::sys::Thread(this); } void join() { thread.join(); } }; struct Publish : Client { void doWork(Session& session) { Sender sender = session.createSender(opts.address); if (opts.senderCapacity) sender.setCapacity(opts.senderCapacity); Message msg(std::string(opts.size, 'X')); uint64_t interval = qpid::sys::TIME_SEC / opts.rate; uint64_t sent = 0, missedRate = 0; qpid::sys::AbsTime start = qpid::sys::now(); while (true) { qpid::sys::AbsTime sentAt = qpid::sys::now(); msg.getProperties()[TS] = timestamp(sentAt); sender.send(msg); ++sent; qpid::sys::AbsTime waitTill(start, sent*interval); qpid::sys::Duration delay(sentAt, waitTill); if (delay < 0) { ++missedRate; } else { qpid::sys::usleep(delay / qpid::sys::TIME_USEC); } } } }; struct Consume : Client { void doWork(Session& session) { Message msg; uint64_t received = 0; double minLatency = std::numeric_limits::max(); double maxLatency = 0; double totalLatency = 0; Receiver receiver = session.createReceiver(opts.address); if (opts.receiverCapacity) receiver.setCapacity(opts.receiverCapacity); while (receiver.fetch(msg)) { ++received; if (opts.ackFrequency && (received % opts.ackFrequency == 0)) { session.acknowledge(); } //calculate latency uint64_t receivedAt = timestamp(qpid::sys::now()); uint64_t sentAt = msg.getProperties()[TS].asUint64(); double latency = ((double) (receivedAt - sentAt)) / qpid::sys::TIME_MSEC; //update avg, min & max minLatency = std::min(minLatency, latency); maxLatency = std::max(maxLatency, latency); totalLatency += latency; if (received % opts.rate == 0) { std::cout << "count=" << received << ", avg=" << (totalLatency/received) << ", min=" << minLatency << ", max=" << maxLatency << std::endl; } } } }; }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { try { opts.parse(argc, argv); Publish publish; Consume consume; publish.start(); consume.start(); consume.join(); publish.join(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/src/tests/cluster_authentication_soak.cpp0000664000076400007640000001751411667435470023413 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qpid/framing/Uuid.h" #include #include #include #ifdef HAVE_CONFIG_H #include "config.h" #endif using namespace std; using boost::assign::list_of; using namespace qpid::framing; using namespace qpid::client; namespace qpid { namespace tests { vector brokerPids; typedef vector brokerVector; int runSilent = 1; int newbiePort = 0; void makeClusterName ( string & s ) { stringstream ss; ss << "authenticationSoakCluster_" << Uuid(true).str(); s = ss.str(); } void startBroker ( brokerVector & brokers , int brokerNumber, string const & clusterName ) { stringstream prefix, clusterArg; prefix << "soak-" << brokerNumber; clusterArg << "--cluster-name=" << clusterName; std::vector argv; argv.push_back ("../qpidd"); argv.push_back ("--no-module-dir"); argv.push_back ("--load-module=../.libs/cluster.so"); argv.push_back (clusterArg.str()); argv.push_back ("--cluster-username=zig"); argv.push_back ("--cluster-password=zig"); argv.push_back ("--cluster-mechanism=PLAIN"); argv.push_back ("--sasl-config=./sasl_config"); argv.push_back ("--auth=yes"); argv.push_back ("--mgmt-enable=yes"); argv.push_back ("--log-prefix"); argv.push_back (prefix.str()); argv.push_back ("--log-to-file"); argv.push_back (prefix.str()+".log"); argv.push_back ("TMP_DATA_DIR"); ForkedBroker * newbie = new ForkedBroker (argv); newbiePort = newbie->getPort(); brokers.push_back ( newbie ); } bool runPerftest ( bool hangTest ) { stringstream portSs; portSs << newbiePort; string portStr = portSs.str(); char const * path = "./qpid-perftest"; vector argv; argv.push_back ( "./qpid-perftest" ); argv.push_back ( "-p" ); argv.push_back ( portStr.c_str() ); argv.push_back ( "--username" ); argv.push_back ( "zig" ); argv.push_back ( "--password" ); argv.push_back ( "zig" ); argv.push_back ( "--mechanism" ); argv.push_back ( "DIGEST-MD5" ); argv.push_back ( "--count" ); argv.push_back ( "20000" ); argv.push_back ( 0 ); pid_t pid = fork(); if ( ! pid ) { int i=open("/dev/null",O_RDWR); dup2 ( i, fileno(stdout) ); dup2 ( i, fileno(stderr) ); execv ( path, const_cast(&argv[0]) ); // The exec failed: we are still in parent process. perror ( "error running qpid-perftest: " ); return false; } else { if ( hangTest ) { if ( ! runSilent ) cerr << "Pausing perftest " << pid << endl; kill ( pid, 19 ); } struct timeval startTime, currentTime, duration; gettimeofday ( & startTime, 0 ); while ( 1 ) { sleep ( 2 ); int status; int returned_pid = waitpid ( pid, &status, WNOHANG ); if ( returned_pid == pid ) { int exit_status = WEXITSTATUS(status); if ( exit_status ) { cerr << "qpid-perftest failed. exit_status was: " << exit_status << endl; return false; } else { return true; // qpid-perftest succeeded. } } else { // qpid-perftest has not yet completed. gettimeofday ( & currentTime, 0 ); timersub ( & currentTime, & startTime, & duration ); if ( duration.tv_sec > 60 ) { kill ( pid, 9 ); cerr << "qpid-perftest pid " << pid << " hanging: killed.\n"; return false; } } } } } bool allBrokersAreAlive ( brokerVector & brokers ) { for ( unsigned int i = 0; i < brokers.size(); ++ i ) if ( ! brokers[i]->isRunning() ) return false; return true; } void killAllBrokers ( brokerVector & brokers ) { for ( unsigned int i = 0; i < brokers.size(); ++ i ) { brokers[i]->kill ( 9 ); } } void killOneBroker ( brokerVector & brokers ) { int doomedBroker = getpid() % brokers.size(); cout << "Killing broker " << brokers[doomedBroker]->getPID() << endl; brokers[doomedBroker]->kill ( 9 ); sleep ( 2 ); } }} // namespace qpid::tests using namespace qpid::tests; /* * Please note that this test has self-test capability. * It is intended to detect * 1. perftest hangs. * 2. broker deaths * Both of these condtions can be forced when running manually * to ensure that the test really does detect them. * See command-line arguments 3 and 4. */ int main ( int argc, char ** argv ) { // I need the SASL_PATH_TYPE_CONFIG feature, which did not appear until SASL 2.1.22 #if (SASL_VERSION_FULL < ((2<<16)|(1<<8)|22)) cout << "Skipping SASL test, SASL version too low." << endl; return 0; #endif int n_iterations = argc > 1 ? atoi(argv[1]) : 1; runSilent = argc > 2 ? atoi(argv[2]) : 1; // default to silent int killBroker = argc > 3 ? atoi(argv[3]) : 0; // Force the kill of one broker. int hangTest = argc > 4 ? atoi(argv[4]) : 0; // Force the first perftest to hang. int n_brokers = 3; brokerVector brokers; srand ( getpid() ); string clusterName; makeClusterName ( clusterName ); for ( int i = 0; i < n_brokers; ++ i ) { startBroker ( brokers, i, clusterName ); } sleep ( 3 ); /* Run all qpid-perftest iterations, and only then check for brokers * still being up. If you just want a quick check for the failure * mode in which a single iteration would kill all brokers except * the client-connected one, just run it with the iterations arg * set to 1. */ for ( int iteration = 0; iteration < n_iterations; ++ iteration ) { if ( ! runPerftest ( hangTest ) ) { if ( ! runSilent ) cerr << "qpid-perftest " << iteration << " failed.\n"; return 1; } if ( ! ( iteration % 10 ) ) { if ( ! runSilent ) cerr << "qpid-perftest " << iteration << " complete. -------------- \n"; } } if ( ! runSilent ) cerr << "\nqpid-perftest " << n_iterations << " iterations complete. -------------- \n\n"; /* If the command-line tells us to kill a broker, do * it now. Use this option to prove that this test * really can detect broker-deaths. */ if ( killBroker ) { killOneBroker ( brokers ); } if ( ! allBrokersAreAlive ( brokers ) ) { if ( ! runSilent ) cerr << "not all brokers are alive.\n"; killAllBrokers ( brokers ); return 2; } killAllBrokers ( brokers ); if ( ! runSilent ) cout << "success.\n"; return 0; } qpidc-0.16/src/tests/sasl_fed_ex_dynamic0000775000076400007640000000153511532765114021004 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh ${srcdir}/sasl_fed_ex dynamic qpidc-0.16/src/tests/run_failover_soak0000775000076400007640000000245411654250703020533 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh . $srcdir/ais_check host=127.0.0.1 unset QPID_NO_MODULE_DIR # failover_soak uses --module-dir, dont want clash MODULES=${MODULES:-$moduledir} MESSAGES=${MESSAGES:-500000} REPORT_FREQUENCY=${REPORT_FREQUENCY:-20000} VERBOSITY=${VERBOSITY:-0} DURABILITY=${DURABILITY:-0} N_QUEUES=${N_QUEUES:-1} N_BROKERS=${N_BROKERS:-4} rm -f soak-*.log exec ./failover_soak $MODULES ./declare_queues ./replaying_sender ./resuming_receiver $MESSAGES $REPORT_FREQUENCY $VERBOSITY $DURABILITY $N_QUEUES $N_BROKERS qpidc-0.16/src/tests/consume.cpp0000664000076400007640000000751711252003060017241 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include "TestOptions.h" #include "qpid/client/Connection.h" #include "qpid/client/Message.h" #include "qpid/client/Session.h" #include "qpid/client/SubscriptionManager.h" using namespace qpid; using namespace qpid::client; using namespace qpid::sys; using namespace std; namespace qpid { namespace tests { typedef vector StringSet; struct Args : public qpid::TestOptions { uint count; uint ack; string queue; bool declare; bool summary; bool print; bool durable; Args() : count(1000), ack(0), queue("publish-consume"), declare(false), summary(false), print(false) { addOptions() ("count", optValue(count, "N"), "number of messages to publish") ("ack-frequency", optValue(ack, "N"), "ack every N messages (0 means use no-ack mode)") ("queue", optValue(queue, ""), "queue to consume from") ("declare", optValue(declare), "declare the queue") ("durable", optValue(durable), "declare the queue durable, use with declare") ("print-data", optValue(print), "Print the recieved data at info level") ("s,summary", optValue(summary), "Print undecorated rate."); } }; Args opts; struct Client { Connection connection; Session session; Client() { opts.open(connection); session = connection.newSession(); } void consume() { if (opts.declare) session.queueDeclare(arg::queue=opts.queue, arg::durable=opts.durable); SubscriptionManager subs(session); LocalQueue lq; SubscriptionSettings settings; settings.acceptMode = opts.ack > 0 ? ACCEPT_MODE_EXPLICIT : ACCEPT_MODE_NONE; settings.flowControl = FlowControl(opts.count, SubscriptionManager::UNLIMITED,false); Subscription sub = subs.subscribe(lq, opts.queue, settings); Message msg; AbsTime begin=now(); for (size_t i = 0; i < opts.count; ++i) { msg=lq.pop(); QPID_LOG(info, "Received: " << msg.getMessageProperties().getCorrelationId()); if (opts.print) QPID_LOG(info, "Data: " << msg.getData()); } if (opts.ack != 0) sub.accept(sub.getUnaccepted()); // Cumulative ack for final batch. AbsTime end=now(); double secs(double(Duration(begin,end))/TIME_SEC); if (opts.summary) cout << opts.count/secs << endl; else cout << "Time: " << secs << "s Rate: " << opts.count/secs << endl; } ~Client() { try{ session.close(); connection.close(); } catch(const exception& e) { cout << e.what() << endl; } } }; }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char** argv) { try { opts.parse(argc, argv); Client client; client.consume(); return 0; } catch(const exception& e) { cout << e.what() << endl; } return 1; } qpidc-0.16/src/tests/testagent.xml0000664000076400007640000000425111462366100017606 0ustar00jrossjross00000000000000 This class represents a parent object qpidc-0.16/src/tests/shared_perftest0000775000076400007640000000156011654250703020202 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # exec `dirname $0`/run_perftest 100000 --mode shared --npubs 16 --nsubs 16 qpidc-0.16/src/tests/run_cli_tests0000775000076400007640000000511511723414716017700 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the cli-utility tests. source ./test_env.sh CLI_DIR=$PYTHON_COMMANDS trap stop_brokers INT TERM QUIT # helper function to create test.xquery in the current directory, so # that the python test program can find it. yes, it leaves a turd. create_test_xquery() { cat < ./test.xquery let \$w := ./weather return \$w/station = 'Raleigh-Durham International Airport (KRDU)' and \$w/temperature_f > 50 and \$w/temperature_f - \$w/dewpoint > 5 and \$w/wind_speed_mph > 7 and \$w/wind_speed_mph < 20 EOF } start_brokers() { # if the xml lib is present, use it. if not, disable any tests which # look like they're xml related. # if we start supporting xml on windows, it will need something similar # here if [ -f ../.libs/xml.so ] ; then xargs="--load-module ../.libs/xml.so" if [ ! -f test.xquery ] ; then create_test_xquery fi targs="" else echo "Ignoring XML tests" xargs="" targs="--ignore=*xml*" fi ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --mgmt-publish no --auth no $xargs > qpidd.port LOCAL_PORT=`cat qpidd.port` ../qpidd --daemon --port 0 --no-data-dir --no-module-dir --mgmt-publish no --auth no $xargs > qpidd.port REMOTE_PORT=`cat qpidd.port` } stop_brokers() { $QPIDD_EXEC --no-module-dir -q --port $LOCAL_PORT $QPIDD_EXEC --no-module-dir -q --port $REMOTE_PORT } if test -d ${PYTHON_DIR} ; then start_brokers echo "Running CLI tests using brokers on ports $LOCAL_PORT $REMOTE_PORT" PYTHON_TESTS=${PYTHON_TESTS:-$*} $QPID_PYTHON_TEST -m cli_tests -b localhost:$LOCAL_PORT -Dremote-port=$REMOTE_PORT -Dcli-dir=$CLI_DIR $targs $PYTHON_TESTS $@ RETCODE=$? stop_brokers if test x$RETCODE != x0; then echo "FAIL CLI tests"; exit 1; fi fi qpidc-0.16/src/tests/header_test.py0000775000076400007640000000420711100331224017717 0ustar00jrossjross00000000000000#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import qpid import sys import os from qpid.util import connect from qpid.connection import Connection from qpid.datatypes import Message, RangedSet, uuid4 from qpid.queue import Empty from math import fabs def getApplicationHeaders(msg): for h in msg.headers: if hasattr(h, 'application_headers'): return getattr(h, 'application_headers') return None # Set parameters for login host="127.0.0.1" port=5672 user="guest" password="guest" if len(sys.argv) > 1 : host=sys.argv[1] if len(sys.argv) > 2 : port=int(sys.argv[2]) # Create a connection. socket = connect(host, port) connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) q = "header_interop_test_queue" session.queue_declare(queue=q) session.message_subscribe(queue=q, destination="received") queue = session.incoming("received") queue.start() msg = queue.get(timeout=10) pi = 3.14159265 e = 2.71828 headers = getApplicationHeaders(msg) pi_ = headers["pi"] e_ = headers["e"] session.close(timeout=10) failed = False if pi != pi_: print "got incorrect value for pi: ", pi_, " expected:", pi failed = True if fabs(e - e_) > 0.0001: print "got incorrect value for e: ", e_, " expected:", e failed = True if failed: sys.exit(1) else: print "Correct header values received." sys.exit(0) qpidc-0.16/src/tests/PartialFailure.cpp0000664000076400007640000002457311305017114020501 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /**@file Tests for partial failure in a cluster. * Partial failure means some nodes experience a failure while others do not. * In this case the failed nodes must shut down. */ #include "test_tools.h" #include "unit_test.h" #include "ClusterFixture.h" #include #include #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(PartialFailureTestSuite) using namespace std; using namespace qpid; using namespace qpid::cluster; using namespace qpid::framing; using namespace qpid::client; using namespace qpid::client::arg; using namespace boost::assign; using broker::Broker; using boost::shared_ptr; // Timeout for tests that wait for messages const sys::Duration TIMEOUT=sys::TIME_SEC/4; static bool isLogOption(const std::string& s) { return boost::starts_with(s, "--log-enable"); } void updateArgs(ClusterFixture::Args& args, size_t index) { ostringstream clusterLib, testStoreLib, storeName; clusterLib << getLibPath("CLUSTER_LIB"); testStoreLib << getLibPath("TEST_STORE_LIB"); storeName << "s" << index; args.push_back("--auth"); args.push_back("no"); args.push_back("--no-module-dir"); args.push_back("--load-module"); args.push_back(clusterLib.str()); args.push_back("--load-module"); args.push_back(testStoreLib.str()); args.push_back("--test-store-name"); args.push_back(storeName.str()); args.push_back("TMP_DATA_DIR"); // These tests generate errors deliberately, disable error logging unless a log env var is set. if (!::getenv("QPID_TRACE") && !::getenv("QPID_LOG_ENABLE")) { remove_if(args.begin(), args.end(), isLogOption); args.push_back("--log-enable=critical+:DISABLED"); // hacky way to disable logs. } } Message pMessage(string data, string q) { Message msg(data, q); msg.getDeliveryProperties().setDeliveryMode(PERSISTENT); return msg; } void queueAndSub(Client& c) { c.session.queueDeclare(c.name, durable=true); c.subs.subscribe(c.lq, c.name); } // Handle near-simultaneous errors QPID_AUTO_TEST_CASE(testCoincidentErrors) { ClusterFixture cluster(2, updateArgs, -1); Client c0(cluster[0], "c0"); Client c1(cluster[1], "c1"); c0.session.queueDeclare("q", durable=true); { ScopedSuppressLogging allQuiet; async(c0.session).messageTransfer(content=pMessage("TEST_STORE_DO: s0[exception]", "q")); async(c1.session).messageTransfer(content=pMessage("TEST_STORE_DO: s1[exception]", "q")); int alive=0; try { Client c00(cluster[0], "c00"); ++alive; c00.close(); } catch (...) {} try { Client c11(cluster[1], "c11"); ++alive; c11.close(); } catch (...) {} BOOST_CHECK_EQUAL(alive, 1); // Close inside ScopedSuppressLogging to avoid warnings c0.close(); c1.close(); } } // Verify normal cluster-wide errors. QPID_AUTO_TEST_CASE(testNormalErrors) { // FIXME aconway 2009-04-10: Would like to put a scope just around // the statements expected to fail (in BOOST_CHECK_yTHROW) but that // sproadically lets out messages, possibly because they're in // Connection thread. ClusterFixture cluster(3, updateArgs, -1); Client c0(cluster[0], "c0"); Client c1(cluster[1], "c1"); Client c2(cluster[2], "c2"); { ScopedSuppressLogging allQuiet; queueAndSub(c0); c0.session.messageTransfer(content=Message("x", "c0")); BOOST_CHECK_EQUAL(c0.lq.get(TIMEOUT).getData(), "x"); // Session error. BOOST_CHECK_THROW(c0.session.exchangeBind(), SessionException); c1.session.messageTransfer(content=Message("stay", "c0")); // Will stay on queue, session c0 is dead. // Connection error, kill c1 on all members. queueAndSub(c1); BOOST_CHECK_THROW( c1.session.messageTransfer( content=pMessage("TEST_STORE_DO: s0[exception] s1[exception] s2[exception] testNormalErrors", "c1")), ConnectionException); c2.session.messageTransfer(content=Message("stay", "c1")); // Will stay on queue, session/connection c1 is dead. BOOST_CHECK_EQUAL(3u, knownBrokerPorts(c2.connection, 3).size()); BOOST_CHECK_EQUAL(c2.subs.get("c0", TIMEOUT).getData(), "stay"); BOOST_CHECK_EQUAL(c2.subs.get("c1", TIMEOUT).getData(), "stay"); // Close inside ScopedSuppressLogging to avoid warnings c0.close(); c1.close(); c2.close(); } } // Test errors after a new member joins to verify frame-sequence-numbers are ok in update. QPID_AUTO_TEST_CASE(testErrorAfterJoin) { ClusterFixture cluster(1, updateArgs, -1); Client c0(cluster[0]); { ScopedSuppressLogging allQuiet; c0.session.queueDeclare("q", durable=true); c0.session.messageTransfer(content=pMessage("a", "q")); // Kill the new guy cluster.add(); Client c1(cluster[1]); c0.session.messageTransfer(content=pMessage("TEST_STORE_DO: s1[exception] testErrorAfterJoin", "q")); BOOST_CHECK_THROW(c1.session.messageTransfer(content=pMessage("xxx", "q")), TransportFailure); BOOST_CHECK_EQUAL(1u, knownBrokerPorts(c0.connection, 1).size()); // Kill the old guy cluster.add(); Client c2(cluster[2]); c2.session.messageTransfer(content=pMessage("TEST_STORE_DO: s0[exception] testErrorAfterJoin2", "q")); BOOST_CHECK_THROW(c0.session.messageTransfer(content=pMessage("xxx", "q")), TransportFailure); BOOST_CHECK_EQUAL(1u, knownBrokerPorts(c2.connection, 1).size()); // Close inside ScopedSuppressLogging to avoid warnings c0.close(); c1.close(); c2.close(); } } // Test that if one member fails and others do not, the failure leaves the cluster. QPID_AUTO_TEST_CASE(testSinglePartialFailure) { ClusterFixture cluster(3, updateArgs, -1); Client c0(cluster[0], "c0"); Client c1(cluster[1], "c1"); Client c2(cluster[2], "c2"); { ScopedSuppressLogging allQuiet; c0.session.queueDeclare("q", durable=true); c0.session.messageTransfer(content=pMessage("a", "q")); // Cause partial failure on c1 c0.session.messageTransfer(content=pMessage("TEST_STORE_DO: s1[exception] testSinglePartialFailure", "q")); BOOST_CHECK_THROW(c1.session.queueQuery("q"), TransportFailure); c0.session.messageTransfer(content=pMessage("b", "q")); BOOST_CHECK_EQUAL(c0.session.queueQuery("q").getMessageCount(), 3u); BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c0.connection, 2).size()); // Cause partial failure on c2 c0.session.messageTransfer(content=pMessage("TEST_STORE_DO: s2[exception] testSinglePartialFailure2", "q")); BOOST_CHECK_THROW(c2.session.queueQuery("q"), TransportFailure); c0.session.messageTransfer(content=pMessage("c", "q")); BOOST_CHECK_EQUAL(c0.session.queueQuery("q").getMessageCount(), 5u); BOOST_CHECK_EQUAL(1u, knownBrokerPorts(c0.connection, 1).size()); // Close inside ScopedSuppressLogging to avoid warnings c0.close(); c1.close(); c2.close(); } } // Test multiple partial falures: 2 fail 2 pass QPID_AUTO_TEST_CASE(testMultiPartialFailure) { ClusterFixture cluster(4, updateArgs, -1); Client c0(cluster[0], "c0"); Client c1(cluster[1], "c1"); Client c2(cluster[2], "c2"); Client c3(cluster[3], "c3"); { ScopedSuppressLogging allQuiet; c0.session.queueDeclare("q", durable=true); c0.session.messageTransfer(content=pMessage("a", "q")); // Cause partial failure on c1, c2 c0.session.messageTransfer(content=pMessage("TEST_STORE_DO: s1[exception] s2[exception] testMultiPartialFailure", "q")); BOOST_CHECK_THROW(c1.session.queueQuery("q"), TransportFailure); BOOST_CHECK_THROW(c2.session.queueQuery("q"), TransportFailure); c0.session.messageTransfer(content=pMessage("b", "q")); c3.session.messageTransfer(content=pMessage("c", "q")); BOOST_CHECK_EQUAL(c3.session.queueQuery("q").getMessageCount(), 4u); // FIXME aconway 2009-06-30: This check fails sporadically with 2 != 3. // It should pass reliably. // BOOST_CHECK_EQUAL(2u, knownBrokerPorts(c0.connection, 2).size()); // Close inside ScopedSuppressLogging to avoid warnings c0.close(); c1.close(); c2.close(); c3.close(); } } /** FIXME aconway 2009-04-10: * The current approach to shutting down a process in test_store * sometimes leads to assertion failures and errors in the shut-down * process. Need a cleaner solution */ #if 0 QPID_AUTO_TEST_CASE(testPartialFailureMemberLeaves) { ClusterFixture cluster(2, updateArgs, -1); Client c0(cluster[0], "c0"); Client c1(cluster[1], "c1"); { ScopedSuppressLogging allQuiet; c0.session.queueDeclare("q", durable=true); c0.session.messageTransfer(content=pMessage("a", "q")); // Cause failure on member 0 and simultaneous crash on member 1. BOOST_CHECK_THROW( c0.session.messageTransfer( content=pMessage("TEST_STORE_DO: s0[exception] s1[exit_process] testPartialFailureMemberLeaves", "q")), ConnectionException); cluster.wait(1); Client c00(cluster[0], "c00"); // Old connection is dead. BOOST_CHECK_EQUAL(c00.session.queueQuery("q").getMessageCount(), 1u); BOOST_CHECK_EQUAL(1u, knownBrokerPorts(c00.connection, 1).size()); // Close inside ScopedSuppressLogging to avoid warnings c0.close(); } } #endif QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/RefCounted.cpp0000664000076400007640000000265511252003060017624 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/RefCounted.h" #include #include "unit_test.h" QPID_AUTO_TEST_SUITE(RefCountedTestSuiteTestSuite) using boost::intrusive_ptr; using namespace std; using namespace qpid; namespace qpid { namespace tests { struct CountMe : public RefCounted { static int instances; CountMe() { ++instances; } ~CountMe() { --instances; } }; int CountMe::instances=0; QPID_AUTO_TEST_CASE(testRefCounted) { BOOST_CHECK_EQUAL(0, CountMe::instances); intrusive_ptr p(new CountMe()); BOOST_CHECK_EQUAL(1, CountMe::instances); intrusive_ptr q(p); BOOST_CHECK_EQUAL(1, CountMe::instances); q=0; BOOST_CHECK_EQUAL(1, CountMe::instances); p=0; BOOST_CHECK_EQUAL(0, CountMe::instances); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/MessagingSessionTests.cpp0000664000076400007640000011501311700656015022077 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "MessagingFixture.h" #include "unit_test.h" #include "test_tools.h" #include "qpid/messaging/Address.h" #include "qpid/messaging/Connection.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Session.h" #include "qpid/client/Connection.h" #include "qpid/client/Session.h" #include "qpid/framing/ExchangeQueryResult.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/Uuid.h" #include "qpid/sys/Time.h" #include #include #include #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(MessagingSessionTests) using namespace qpid::messaging; using namespace qpid::types; using namespace qpid; using qpid::broker::Broker; using qpid::framing::Uuid; QPID_AUTO_TEST_CASE(testSimpleSendReceive) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out("test-message"); out.setSubject("test-subject"); sender.send(out); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(Duration::SECOND * 5); fix.session.acknowledge(); BOOST_CHECK_EQUAL(in.getContent(), out.getContent()); BOOST_CHECK_EQUAL(in.getSubject(), out.getSubject()); } QPID_AUTO_TEST_CASE(testSyncSendReceive) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out("test-message"); sender.send(out, true); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(Duration::IMMEDIATE); fix.session.acknowledge(true); BOOST_CHECK_EQUAL(in.getContent(), out.getContent()); } QPID_AUTO_TEST_CASE(testSendReceiveHeaders) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out("test-message"); for (uint i = 0; i < 10; ++i) { out.getProperties()["a"] = i; out.setProperty("b", i + 100); sender.send(out); } Receiver receiver = fix.session.createReceiver(fix.queue); Message in; for (uint i = 0; i < 10; ++i) { BOOST_CHECK(receiver.fetch(in, Duration::SECOND * 5)); BOOST_CHECK_EQUAL(in.getContent(), out.getContent()); BOOST_CHECK_EQUAL(in.getProperties()["a"].asUint32(), i); BOOST_CHECK_EQUAL(in.getProperties()["b"].asUint32(), i + 100); fix.session.acknowledge(); } } QPID_AUTO_TEST_CASE(testSenderError) { MessagingFixture fix; ScopedSuppressLogging sl; BOOST_CHECK_THROW(fix.session.createSender("NonExistentAddress"), qpid::messaging::NotFound); fix.session = fix.connection.createSession(); BOOST_CHECK_THROW(fix.session.createSender("NonExistentAddress; {create:receiver}"), qpid::messaging::NotFound); } QPID_AUTO_TEST_CASE(testReceiverError) { MessagingFixture fix; ScopedSuppressLogging sl; BOOST_CHECK_THROW(fix.session.createReceiver("NonExistentAddress"), qpid::messaging::NotFound); fix.session = fix.connection.createSession(); BOOST_CHECK_THROW(fix.session.createReceiver("NonExistentAddress; {create:sender}"), qpid::messaging::NotFound); } QPID_AUTO_TEST_CASE(testSimpleTopic) { TopicFixture fix; Sender sender = fix.session.createSender(fix.topic); Message msg("one"); sender.send(msg); Receiver sub1 = fix.session.createReceiver(fix.topic); sub1.setCapacity(10u); msg.setContent("two"); sender.send(msg); Receiver sub2 = fix.session.createReceiver(fix.topic); sub2.setCapacity(10u); msg.setContent("three"); sender.send(msg); Receiver sub3 = fix.session.createReceiver(fix.topic); sub3.setCapacity(10u); msg.setContent("four"); sender.send(msg); BOOST_CHECK_EQUAL(fetch(sub2, 2), boost::assign::list_of("three")("four")); sub2.close(); msg.setContent("five"); sender.send(msg); BOOST_CHECK_EQUAL(fetch(sub1, 4), boost::assign::list_of("two")("three")("four")("five")); BOOST_CHECK_EQUAL(fetch(sub3, 2), boost::assign::list_of("four")("five")); Message in; BOOST_CHECK(!sub2.fetch(in, Duration::IMMEDIATE));//TODO: or should this raise an error? //TODO: check pending messages... } QPID_AUTO_TEST_CASE(testNextReceiver) { MultiQueueFixture fix; for (uint i = 0; i < fix.queues.size(); i++) { Receiver r = fix.session.createReceiver(fix.queues[i]); r.setCapacity(10u); } for (uint i = 0; i < fix.queues.size(); i++) { Sender s = fix.session.createSender(fix.queues[i]); Message msg((boost::format("Message_%1%") % (i+1)).str()); s.send(msg); } for (uint i = 0; i < fix.queues.size(); i++) { Message msg; BOOST_CHECK(fix.session.nextReceiver().fetch(msg, Duration::SECOND)); BOOST_CHECK_EQUAL(msg.getContent(), (boost::format("Message_%1%") % (i+1)).str()); } } QPID_AUTO_TEST_CASE(testMapMessage) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out; Variant::Map content; content["abc"] = "def"; content["pi"] = 3.14f; Variant utf8("A utf 8 string"); utf8.setEncoding("utf8"); content["utf8"] = utf8; Variant utf16("\x00\x61\x00\x62\x00\x63"); utf16.setEncoding("utf16"); content["utf16"] = utf16; encode(content, out); sender.send(out); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(5 * Duration::SECOND); Variant::Map view; decode(in, view); BOOST_CHECK_EQUAL(view["abc"].asString(), "def"); BOOST_CHECK_EQUAL(view["pi"].asFloat(), 3.14f); BOOST_CHECK_EQUAL(view["utf8"].asString(), utf8.asString()); BOOST_CHECK_EQUAL(view["utf8"].getEncoding(), utf8.getEncoding()); BOOST_CHECK_EQUAL(view["utf16"].asString(), utf16.asString()); BOOST_CHECK_EQUAL(view["utf16"].getEncoding(), utf16.getEncoding()); fix.session.acknowledge(); } QPID_AUTO_TEST_CASE(testMapMessageWithInitial) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out; Variant::Map imap; imap["abc"] = "def"; imap["pi"] = 3.14f; encode(imap, out); sender.send(out); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(5 * Duration::SECOND); Variant::Map view; decode(in, view); BOOST_CHECK_EQUAL(view["abc"].asString(), "def"); BOOST_CHECK_EQUAL(view["pi"].asFloat(), 3.14f); fix.session.acknowledge(); } QPID_AUTO_TEST_CASE(testListMessage) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out; Variant::List content; content.push_back(Variant("abc")); content.push_back(Variant(1234)); content.push_back(Variant("def")); content.push_back(Variant(56.789)); encode(content, out); sender.send(out); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(5 * Duration::SECOND); Variant::List view; decode(in, view); BOOST_CHECK_EQUAL(view.size(), content.size()); BOOST_CHECK_EQUAL(view.front().asString(), "abc"); BOOST_CHECK_EQUAL(view.back().asDouble(), 56.789); Variant::List::const_iterator i = view.begin(); BOOST_CHECK(i != view.end()); BOOST_CHECK_EQUAL(i->asString(), "abc"); BOOST_CHECK(++i != view.end()); BOOST_CHECK_EQUAL(i->asInt64(), 1234); BOOST_CHECK(++i != view.end()); BOOST_CHECK_EQUAL(i->asString(), "def"); BOOST_CHECK(++i != view.end()); BOOST_CHECK_EQUAL(i->asDouble(), 56.789); BOOST_CHECK(++i == view.end()); fix.session.acknowledge(); } QPID_AUTO_TEST_CASE(testListMessageWithInitial) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out; Variant::List ilist; ilist.push_back(Variant("abc")); ilist.push_back(Variant(1234)); ilist.push_back(Variant("def")); ilist.push_back(Variant(56.789)); encode(ilist, out); sender.send(out); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(5 * Duration::SECOND); Variant::List view; decode(in, view); BOOST_CHECK_EQUAL(view.size(), ilist.size()); BOOST_CHECK_EQUAL(view.front().asString(), "abc"); BOOST_CHECK_EQUAL(view.back().asDouble(), 56.789); Variant::List::const_iterator i = view.begin(); BOOST_CHECK(i != view.end()); BOOST_CHECK_EQUAL(i->asString(), "abc"); BOOST_CHECK(++i != view.end()); BOOST_CHECK_EQUAL(i->asInt64(), 1234); BOOST_CHECK(++i != view.end()); BOOST_CHECK_EQUAL(i->asString(), "def"); BOOST_CHECK(++i != view.end()); BOOST_CHECK_EQUAL(i->asDouble(), 56.789); BOOST_CHECK(++i == view.end()); fix.session.acknowledge(); } QPID_AUTO_TEST_CASE(testReject) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message m1("reject-me"); sender.send(m1); Message m2("accept-me"); sender.send(m2); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(5 * Duration::SECOND); BOOST_CHECK_EQUAL(in.getContent(), m1.getContent()); fix.session.reject(in); in = receiver.fetch(5 * Duration::SECOND); BOOST_CHECK_EQUAL(in.getContent(), m2.getContent()); fix.session.acknowledge(); } QPID_AUTO_TEST_CASE(testAvailable) { MultiQueueFixture fix; Receiver r1 = fix.session.createReceiver(fix.queues[0]); r1.setCapacity(100); Receiver r2 = fix.session.createReceiver(fix.queues[1]); r2.setCapacity(100); Sender s1 = fix.session.createSender(fix.queues[0]); Sender s2 = fix.session.createSender(fix.queues[1]); for (uint i = 0; i < 10; ++i) { s1.send(Message((boost::format("A_%1%") % (i+1)).str())); } for (uint i = 0; i < 5; ++i) { s2.send(Message((boost::format("B_%1%") % (i+1)).str())); } qpid::sys::sleep(1);//is there any avoid an arbitrary sleep while waiting for messages to be dispatched? for (uint i = 0; i < 5; ++i) { BOOST_CHECK_EQUAL(fix.session.getReceivable(), 15u - 2*i); BOOST_CHECK_EQUAL(r1.getAvailable(), 10u - i); BOOST_CHECK_EQUAL(r1.fetch().getContent(), (boost::format("A_%1%") % (i+1)).str()); BOOST_CHECK_EQUAL(r2.getAvailable(), 5u - i); BOOST_CHECK_EQUAL(r2.fetch().getContent(), (boost::format("B_%1%") % (i+1)).str()); fix.session.acknowledge(); } for (uint i = 5; i < 10; ++i) { BOOST_CHECK_EQUAL(fix.session.getReceivable(), 10u - i); BOOST_CHECK_EQUAL(r1.getAvailable(), 10u - i); BOOST_CHECK_EQUAL(r1.fetch().getContent(), (boost::format("A_%1%") % (i+1)).str()); } } QPID_AUTO_TEST_CASE(testUnsettledAcks) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); for (uint i = 0; i < 10; ++i) { sender.send(Message((boost::format("Message_%1%") % (i+1)).str())); } Receiver receiver = fix.session.createReceiver(fix.queue); for (uint i = 0; i < 10; ++i) { BOOST_CHECK_EQUAL(receiver.fetch().getContent(), (boost::format("Message_%1%") % (i+1)).str()); } BOOST_CHECK_EQUAL(fix.session.getUnsettledAcks(), 0u); fix.session.acknowledge(); BOOST_CHECK_EQUAL(fix.session.getUnsettledAcks(), 10u); fix.session.sync(); BOOST_CHECK_EQUAL(fix.session.getUnsettledAcks(), 0u); } QPID_AUTO_TEST_CASE(testUnsettledSend) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); send(sender, 10); //Note: this test relies on 'inside knowledge' of the sender //implementation and the fact that the simple test case makes it //possible to predict when completion information will be sent to //the client. TODO: is there a better way of testing this? BOOST_CHECK_EQUAL(sender.getUnsettled(), 10u); fix.session.sync(); BOOST_CHECK_EQUAL(sender.getUnsettled(), 0u); Receiver receiver = fix.session.createReceiver(fix.queue); receive(receiver, 10); fix.session.acknowledge(); } QPID_AUTO_TEST_CASE(testBrowse) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); send(sender, 10); Receiver browser1 = fix.session.createReceiver(fix.queue + "; {mode:browse}"); receive(browser1, 10); Receiver browser2 = fix.session.createReceiver(fix.queue + "; {mode:browse}"); receive(browser2, 10); Receiver consumer = fix.session.createReceiver(fix.queue); receive(consumer, 10); fix.session.acknowledge(); } struct QueueCreatePolicyFixture : public MessagingFixture { qpid::messaging::Address address; QueueCreatePolicyFixture(const std::string& a) : address(a) {} void test() { ping(address); BOOST_CHECK(admin.checkQueueExists(address.getName())); } ~QueueCreatePolicyFixture() { admin.deleteQueue(address.getName()); } }; QPID_AUTO_TEST_CASE(testCreatePolicyQueueAlways) { QueueCreatePolicyFixture fix("#; {create:always, node:{type:queue}}"); fix.test(); } QPID_AUTO_TEST_CASE(testCreatePolicyQueueReceiver) { QueueCreatePolicyFixture fix("#; {create:receiver, node:{type:queue}}"); Receiver r = fix.session.createReceiver(fix.address); fix.test(); r.close(); } QPID_AUTO_TEST_CASE(testCreatePolicyQueueSender) { QueueCreatePolicyFixture fix("#; {create:sender, node:{type:queue}}"); Sender s = fix.session.createSender(fix.address); fix.test(); s.close(); } struct ExchangeCreatePolicyFixture : public MessagingFixture { qpid::messaging::Address address; const std::string exchangeType; ExchangeCreatePolicyFixture(const std::string& a, const std::string& t) : address(a), exchangeType(t) {} void test() { ping(address); std::string actualType; BOOST_CHECK(admin.checkExchangeExists(address.getName(), actualType)); BOOST_CHECK_EQUAL(exchangeType, actualType); } ~ExchangeCreatePolicyFixture() { admin.deleteExchange(address.getName()); } }; QPID_AUTO_TEST_CASE(testCreatePolicyTopic) { ExchangeCreatePolicyFixture fix("#; {create:always, node:{type:topic}}", "topic"); fix.test(); } QPID_AUTO_TEST_CASE(testCreatePolicyTopicReceiverFanout) { ExchangeCreatePolicyFixture fix("#/my-subject; {create:receiver, node:{type:topic, x-declare:{type:fanout}}}", "fanout"); Receiver r = fix.session.createReceiver(fix.address); fix.test(); r.close(); } QPID_AUTO_TEST_CASE(testCreatePolicyTopicSenderDirect) { ExchangeCreatePolicyFixture fix("#/my-subject; {create:sender, node:{type:topic, x-declare:{type:direct}}}", "direct"); Sender s = fix.session.createSender(fix.address); fix.test(); s.close(); } struct DeletePolicyFixture : public MessagingFixture { enum Mode {RECEIVER, SENDER, ALWAYS, NEVER}; std::string getPolicy(Mode mode) { switch (mode) { case SENDER: return "{delete:sender}"; case RECEIVER: return "{delete:receiver}"; case ALWAYS: return "{delete:always}"; case NEVER: return "{delete:never}"; } return ""; } void testAll() { test(RECEIVER); test(SENDER); test(ALWAYS); test(NEVER); } virtual ~DeletePolicyFixture() {} virtual void create(const qpid::messaging::Address&) = 0; virtual void destroy(const qpid::messaging::Address&) = 0; virtual bool exists(const qpid::messaging::Address&) = 0; void test(Mode mode) { qpid::messaging::Address address("#; " + getPolicy(mode)); create(address); Sender s = session.createSender(address); Receiver r = session.createReceiver(address); switch (mode) { case RECEIVER: s.close(); BOOST_CHECK(exists(address)); r.close(); BOOST_CHECK(!exists(address)); break; case SENDER: r.close(); BOOST_CHECK(exists(address)); s.close(); BOOST_CHECK(!exists(address)); break; case ALWAYS: s.close(); BOOST_CHECK(!exists(address)); break; case NEVER: r.close(); BOOST_CHECK(exists(address)); s.close(); BOOST_CHECK(exists(address)); destroy(address); } } }; struct QueueDeletePolicyFixture : DeletePolicyFixture { void create(const qpid::messaging::Address& address) { admin.createQueue(address.getName()); } void destroy(const qpid::messaging::Address& address) { admin.deleteQueue(address.getName()); } bool exists(const qpid::messaging::Address& address) { return admin.checkQueueExists(address.getName()); } }; struct ExchangeDeletePolicyFixture : DeletePolicyFixture { const std::string exchangeType; ExchangeDeletePolicyFixture(const std::string type = "topic") : exchangeType(type) {} void create(const qpid::messaging::Address& address) { admin.createExchange(address.getName(), exchangeType); } void destroy(const qpid::messaging::Address& address) { admin.deleteExchange(address.getName()); } bool exists(const qpid::messaging::Address& address) { std::string actualType; return admin.checkExchangeExists(address.getName(), actualType) && actualType == exchangeType; } }; QPID_AUTO_TEST_CASE(testDeletePolicyQueue) { QueueDeletePolicyFixture fix; fix.testAll(); } QPID_AUTO_TEST_CASE(testDeletePolicyExchange) { ExchangeDeletePolicyFixture fix; fix.testAll(); } QPID_AUTO_TEST_CASE(testAssertPolicyQueue) { MessagingFixture fix; std::string a1 = "q; {create:always, assert:always, node:{type:queue, durable:false, x-declare:{arguments:{qpid.max-count:100}}}}"; Sender s1 = fix.session.createSender(a1); s1.close(); Receiver r1 = fix.session.createReceiver(a1); r1.close(); std::string a2 = "q; {assert:receiver, node:{durable:true, x-declare:{arguments:{qpid.max-count:100}}}}"; Sender s2 = fix.session.createSender(a2); s2.close(); BOOST_CHECK_THROW(fix.session.createReceiver(a2), qpid::messaging::AssertionFailed); std::string a3 = "q; {assert:sender, node:{x-declare:{arguments:{qpid.max-count:99}}}}"; BOOST_CHECK_THROW(fix.session.createSender(a3), qpid::messaging::AssertionFailed); Receiver r3 = fix.session.createReceiver(a3); r3.close(); fix.admin.deleteQueue("q"); } QPID_AUTO_TEST_CASE(testAssertExchangeOption) { MessagingFixture fix; std::string a1 = "e; {create:always, assert:always, node:{type:topic, x-declare:{type:direct, arguments:{qpid.msg_sequence:True}}}}"; Sender s1 = fix.session.createSender(a1); s1.close(); Receiver r1 = fix.session.createReceiver(a1); r1.close(); std::string a2 = "e; {assert:receiver, node:{type:topic, x-declare:{type:fanout, arguments:{qpid.msg_sequence:True}}}}"; Sender s2 = fix.session.createSender(a2); s2.close(); BOOST_CHECK_THROW(fix.session.createReceiver(a2), qpid::messaging::AssertionFailed); std::string a3 = "e; {assert:sender, node:{x-declare:{arguments:{qpid.msg_sequence:False}}}}"; BOOST_CHECK_THROW(fix.session.createSender(a3), qpid::messaging::AssertionFailed); Receiver r3 = fix.session.createReceiver(a3); r3.close(); fix.admin.deleteExchange("e"); } QPID_AUTO_TEST_CASE(testGetSender) { QueueFixture fix; std::string name = fix.session.createSender(fix.queue).getName(); Sender sender = fix.session.getSender(name); BOOST_CHECK_EQUAL(name, sender.getName()); Message out(Uuid(true).str()); sender.send(out); Message in; BOOST_CHECK(fix.session.createReceiver(fix.queue).fetch(in)); BOOST_CHECK_EQUAL(out.getContent(), in.getContent()); BOOST_CHECK_THROW(fix.session.getSender("UnknownSender"), qpid::messaging::KeyError); } QPID_AUTO_TEST_CASE(testGetReceiver) { QueueFixture fix; std::string name = fix.session.createReceiver(fix.queue).getName(); Receiver receiver = fix.session.getReceiver(name); BOOST_CHECK_EQUAL(name, receiver.getName()); Message out(Uuid(true).str()); fix.session.createSender(fix.queue).send(out); Message in; BOOST_CHECK(receiver.fetch(in)); BOOST_CHECK_EQUAL(out.getContent(), in.getContent()); BOOST_CHECK_THROW(fix.session.getReceiver("UnknownReceiver"), qpid::messaging::KeyError); } QPID_AUTO_TEST_CASE(testGetSessionFromConnection) { QueueFixture fix; fix.connection.createSession("my-session"); Session session = fix.connection.getSession("my-session"); Message out(Uuid(true).str()); session.createSender(fix.queue).send(out); Message in; BOOST_CHECK(session.createReceiver(fix.queue).fetch(in)); BOOST_CHECK_EQUAL(out.getContent(), in.getContent()); BOOST_CHECK_THROW(fix.connection.getSession("UnknownSession"), qpid::messaging::KeyError); } QPID_AUTO_TEST_CASE(testGetConnectionFromSession) { QueueFixture fix; Message out(Uuid(true).str()); Sender sender = fix.session.createSender(fix.queue); sender.send(out); Message in; sender.getSession().getConnection().createSession("incoming"); BOOST_CHECK(fix.connection.getSession("incoming").createReceiver(fix.queue).fetch(in)); BOOST_CHECK_EQUAL(out.getContent(), in.getContent()); } QPID_AUTO_TEST_CASE(testTx) { QueueFixture fix; Session ssn1 = fix.connection.createTransactionalSession(); Session ssn2 = fix.connection.createTransactionalSession(); Sender sender1 = ssn1.createSender(fix.queue); Sender sender2 = ssn2.createSender(fix.queue); Receiver receiver1 = ssn1.createReceiver(fix.queue); Receiver receiver2 = ssn2.createReceiver(fix.queue); Message in; send(sender1, 5, 1, "A"); send(sender2, 5, 1, "B"); ssn2.commit(); receive(receiver1, 5, 1, "B");//(only those from sender2 should be received) BOOST_CHECK(!receiver1.fetch(in, Duration::IMMEDIATE));//check there are no more messages ssn1.rollback(); receive(receiver2, 5, 1, "B"); BOOST_CHECK(!receiver2.fetch(in, Duration::IMMEDIATE));//check there are no more messages ssn2.rollback(); receive(receiver1, 5, 1, "B"); BOOST_CHECK(!receiver1.fetch(in, Duration::IMMEDIATE));//check there are no more messages ssn1.commit(); //check neither receiver gets any more messages: BOOST_CHECK(!receiver1.fetch(in, Duration::IMMEDIATE)); BOOST_CHECK(!receiver2.fetch(in, Duration::IMMEDIATE)); } QPID_AUTO_TEST_CASE(testRelease) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out("test-message"); sender.send(out, true); Receiver receiver = fix.session.createReceiver(fix.queue); Message m1 = receiver.fetch(Duration::IMMEDIATE); fix.session.release(m1); Message m2 = receiver.fetch(Duration::SECOND * 1); BOOST_CHECK_EQUAL(m1.getContent(), out.getContent()); BOOST_CHECK_EQUAL(m1.getContent(), m2.getContent()); fix.session.acknowledge(true); } QPID_AUTO_TEST_CASE(testOptionVerification) { MessagingFixture fix; fix.session.createReceiver("my-queue; {create: always, assert: always, delete: always, node: {type: queue, durable: false, x-declare: {arguments: {a: b}}, x-bindings: [{exchange: amq.fanout}]}, link: {name: abc, durable: false, reliability: exactly-once, x-subscribe: {arguments:{a:b}}, x-bindings:[{exchange: amq.fanout}]}, mode: browse}"); BOOST_CHECK_THROW(fix.session.createReceiver("my-queue; {invalid-option:blah}"), qpid::messaging::AddressError); } QPID_AUTO_TEST_CASE(testReceiveSpecialProperties) { QueueFixture fix; qpid::client::Message out; out.getDeliveryProperties().setRoutingKey(fix.queue); out.getMessageProperties().setAppId("my-app-id"); out.getMessageProperties().setMessageId(qpid::framing::Uuid(true)); out.getMessageProperties().setContentEncoding("my-content-encoding"); fix.admin.send(out); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(Duration::SECOND * 5); BOOST_CHECK_EQUAL(in.getProperties()["x-amqp-0-10.routing-key"].asString(), out.getDeliveryProperties().getRoutingKey()); BOOST_CHECK_EQUAL(in.getProperties()["x-amqp-0-10.app-id"].asString(), out.getMessageProperties().getAppId()); BOOST_CHECK_EQUAL(in.getProperties()["x-amqp-0-10.content-encoding"].asString(), out.getMessageProperties().getContentEncoding()); BOOST_CHECK_EQUAL(in.getMessageId(), out.getMessageProperties().getMessageId().str()); fix.session.acknowledge(true); } QPID_AUTO_TEST_CASE(testSendSpecialProperties) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out("test-message"); std::string appId = "my-app-id"; std::string contentEncoding = "my-content-encoding"; out.getProperties()["x-amqp-0-10.app-id"] = appId; out.getProperties()["x-amqp-0-10.content-encoding"] = contentEncoding; out.setMessageId(qpid::framing::Uuid(true).str()); sender.send(out, true); qpid::client::LocalQueue q; qpid::client::SubscriptionManager subs(fix.admin.session); qpid::client::Subscription s = subs.subscribe(q, fix.queue); qpid::client::Message in = q.get(); s.cancel(); fix.admin.session.sync(); BOOST_CHECK_EQUAL(in.getMessageProperties().getAppId(), appId); BOOST_CHECK_EQUAL(in.getMessageProperties().getContentEncoding(), contentEncoding); BOOST_CHECK_EQUAL(in.getMessageProperties().getMessageId().str(), out.getMessageId()); } QPID_AUTO_TEST_CASE(testExclusiveSubscriber) { QueueFixture fix; std::string address = (boost::format("%1%; { link: { x-subscribe : { exclusive:true } } }") % fix.queue).str(); Receiver receiver = fix.session.createReceiver(address); ScopedSuppressLogging sl; try { fix.session.createReceiver(address); fix.session.sync(); BOOST_FAIL("Expected exception."); } catch (const MessagingException& /*e*/) {} } QPID_AUTO_TEST_CASE(testExclusiveQueueSubscriberAndBrowser) { MessagingFixture fix; std::string address = "exclusive-queue; { create: receiver, node : { x-declare : { auto-delete: true, exclusive: true } } }"; std::string browseAddress = "exclusive-queue; { mode: browse }"; Receiver receiver = fix.session.createReceiver(address); fix.session.sync(); Connection c2 = fix.newConnection(); c2.open(); Session s2 = c2.createSession(); BOOST_CHECK_NO_THROW(Receiver browser = s2.createReceiver(browseAddress)); c2.close(); } QPID_AUTO_TEST_CASE(testDeleteQueueWithUnackedMessages) { MessagingFixture fix; const uint capacity = 5; Sender sender = fix.session.createSender("test.ex;{create:always,node:{type:topic}}"); Receiver receiver2 = fix.session.createReceiver("alternate.ex;{create:always,node:{type:topic}}"); Receiver receiver1 = fix.session.createReceiver("test.q;{create:always, delete:always,node:{type:queue, x-declare:{alternate-exchange:alternate.ex}},link:{x-bindings:[{exchange:test.ex,queue:test.q,key:#}]}}"); receiver1.setCapacity(capacity); receiver2.setCapacity(capacity*2); Message out("test-message"); for (uint i = 0; i < capacity*2; ++i) { sender.send(out); } receiver1.close(); // Make sure all pending messages were sent to the alternate // exchange when the queue was deleted. Message in; for (uint i = 0; i < capacity*2; ++i) { in = receiver2.fetch(Duration::SECOND * 5); BOOST_CHECK_EQUAL(in.getContent(), out.getContent()); } } QPID_AUTO_TEST_CASE(testAuthenticatedUsername) { MessagingFixture fix; Connection connection = fix.newConnection(); connection.setOption("sasl-mechanism", "PLAIN"); connection.setOption("username", "test-user"); connection.setOption("password", "ignored"); connection.open(); BOOST_CHECK_EQUAL(connection.getAuthenticatedUsername(), std::string("test-user")); } QPID_AUTO_TEST_CASE(testExceptionOnClosedConnection) { MessagingFixture fix; fix.connection.close(); BOOST_CHECK_THROW(fix.connection.createSession(), MessagingException); Connection connection("blah"); BOOST_CHECK_THROW(connection.createSession(), MessagingException); } QPID_AUTO_TEST_CASE(testAcknowledge) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); const uint count(20); for (uint i = 0; i < count; ++i) { sender.send(Message((boost::format("Message_%1%") % (i+1)).str())); } Session other = fix.connection.createSession(); Receiver receiver = other.createReceiver(fix.queue); std::vector messages; for (uint i = 0; i < count; ++i) { Message msg = receiver.fetch(); BOOST_CHECK_EQUAL(msg.getContent(), (boost::format("Message_%1%") % (i+1)).str()); messages.push_back(msg); } const uint batch(10); //acknowledge first 10 messages only for (uint i = 0; i < batch; ++i) { other.acknowledge(messages[i]); } messages.clear(); other.sync(); other.close(); other = fix.connection.createSession(); receiver = other.createReceiver(fix.queue); for (uint i = 0; i < (count-batch); ++i) { Message msg = receiver.fetch(); BOOST_CHECK_EQUAL(msg.getContent(), (boost::format("Message_%1%") % (i+1+batch)).str()); if (i % 2) other.acknowledge(msg); //acknowledge every other message } other.sync(); other.close(); //check unacknowledged messages are still enqueued other = fix.connection.createSession(); receiver = other.createReceiver(fix.queue); for (uint i = 0; i < ((count-batch)/2); ++i) { Message msg = receiver.fetch(); BOOST_CHECK_EQUAL(msg.getContent(), (boost::format("Message_%1%") % ((i*2)+1+batch)).str()); } other.acknowledge();//acknowledge all messages other.sync(); other.close(); Message m; //check queue is empty BOOST_CHECK(!fix.session.createReceiver(fix.queue).fetch(m, Duration::IMMEDIATE)); } QPID_AUTO_TEST_CASE(testQmfCreateAndDelete) { MessagingFixture fix(Broker::Options(), true/*enable management*/); MethodInvoker control(fix.session); control.createQueue("my-queue"); control.createExchange("my-exchange", "topic"); control.bind("my-exchange", "my-queue", "subject1"); Sender sender = fix.session.createSender("my-exchange"); Receiver receiver = fix.session.createReceiver("my-queue"); Message out; out.setSubject("subject1"); out.setContent("one"); sender.send(out); Message in; BOOST_CHECK(receiver.fetch(in, Duration::SECOND*5)); BOOST_CHECK_EQUAL(out.getContent(), in.getContent()); control.unbind("my-exchange", "my-queue", "subject1"); control.bind("my-exchange", "my-queue", "subject2"); out.setContent("two"); sender.send(out);//should be dropped out.setSubject("subject2"); out.setContent("three"); sender.send(out);//should not be dropped BOOST_CHECK(receiver.fetch(in, Duration::SECOND*5)); BOOST_CHECK_EQUAL(out.getContent(), in.getContent()); BOOST_CHECK(!receiver.fetch(in, Duration::IMMEDIATE)); sender.close(); receiver.close(); control.deleteExchange("my-exchange"); messaging::Session other = fix.connection.createSession(); { ScopedSuppressLogging sl; BOOST_CHECK_THROW(other.createSender("my-exchange"), qpid::messaging::NotFound); } control.deleteQueue("my-queue"); other = fix.connection.createSession(); { ScopedSuppressLogging sl; BOOST_CHECK_THROW(other.createReceiver("my-queue"), qpid::messaging::NotFound); } } QPID_AUTO_TEST_CASE(testRejectAndCredit) { //Ensure credit is restored on completing rejected messages QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Receiver receiver = fix.session.createReceiver(fix.queue); const uint count(10); receiver.setCapacity(count); for (uint i = 0; i < count; i++) { sender.send(Message((boost::format("Message_%1%") % (i+1)).str())); } Message in; for (uint i = 0; i < count; ++i) { if (receiver.fetch(in, Duration::SECOND)) { BOOST_CHECK_EQUAL(in.getContent(), (boost::format("Message_%1%") % (i+1)).str()); fix.session.reject(in); } else { BOOST_FAIL((boost::format("Message_%1% not received as expected") % (i+1)).str()); break; } } //send another batch of messages for (uint i = 0; i < count; i++) { sender.send(Message((boost::format("Message_%1%") % (i+count)).str())); } for (uint i = 0; i < count; ++i) { if (receiver.fetch(in, Duration::SECOND)) { BOOST_CHECK_EQUAL(in.getContent(), (boost::format("Message_%1%") % (i+count)).str()); } else { BOOST_FAIL((boost::format("Message_%1% not received as expected") % (i+count)).str()); break; } } fix.session.acknowledge(); receiver.close(); sender.close(); } QPID_AUTO_TEST_CASE(testTtlForever) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); Message out("I want to live forever!"); out.setTtl(Duration::FOREVER); sender.send(out, true); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(Duration::IMMEDIATE); fix.session.acknowledge(); BOOST_CHECK_EQUAL(in.getContent(), out.getContent()); BOOST_CHECK(in.getTtl() == Duration::FOREVER); } QPID_AUTO_TEST_CASE(testExclusiveTopicSubscriber) { TopicFixture fix; std::string address = (boost::format("%1%; { link: { name: 'my-subscription', x-declare: { auto-delete: true, exclusive: true }}}") % fix.topic).str(); Sender sender = fix.session.createSender(fix.topic); Receiver receiver1 = fix.session.createReceiver(address); { ScopedSuppressLogging sl; try { fix.session.createReceiver(address); fix.session.sync(); BOOST_FAIL("Expected exception."); } catch (const MessagingException& /*e*/) {} } } QPID_AUTO_TEST_CASE(testNonExclusiveSubscriber) { TopicFixture fix; std::string address = (boost::format("%1%; {node:{type:topic}, link:{name:'my-subscription', x-declare:{auto-delete:true, exclusive:false}}}") % fix.topic).str(); Receiver receiver1 = fix.session.createReceiver(address); Receiver receiver2 = fix.session.createReceiver(address); Sender sender = fix.session.createSender(fix.topic); sender.send(Message("one"), true); Message in = receiver1.fetch(Duration::IMMEDIATE); BOOST_CHECK_EQUAL(in.getContent(), std::string("one")); sender.send(Message("two"), true); in = receiver2.fetch(Duration::IMMEDIATE); BOOST_CHECK_EQUAL(in.getContent(), std::string("two")); fix.session.acknowledge(); } QPID_AUTO_TEST_CASE(testAcknowledgeUpTo) { QueueFixture fix; Sender sender = fix.session.createSender(fix.queue); const uint count(20); for (uint i = 0; i < count; ++i) { sender.send(Message((boost::format("Message_%1%") % (i+1)).str())); } Session other = fix.connection.createSession(); Receiver receiver = other.createReceiver(fix.queue); std::vector messages; for (uint i = 0; i < count; ++i) { Message msg = receiver.fetch(); BOOST_CHECK_EQUAL(msg.getContent(), (boost::format("Message_%1%") % (i+1)).str()); messages.push_back(msg); } const uint batch = 10; other.acknowledgeUpTo(messages[batch-1]);//acknowledge first 10 messages only messages.clear(); other.sync(); other.close(); other = fix.connection.createSession(); receiver = other.createReceiver(fix.queue); Message msg; for (uint i = 0; i < (count-batch); ++i) { msg = receiver.fetch(); BOOST_CHECK_EQUAL(msg.getContent(), (boost::format("Message_%1%") % (i+1+batch)).str()); } other.acknowledgeUpTo(msg); other.sync(); other.close(); Message m; //check queue is empty BOOST_CHECK(!fix.session.createReceiver(fix.queue).fetch(m, Duration::IMMEDIATE)); } QPID_AUTO_TEST_CASE(testCreateBindingsOnStandardExchange) { QueueFixture fix; Sender sender = fix.session.createSender((boost::format("amq.direct; {create:always, node:{type:topic, x-bindings:[{queue:%1%, key:my-subject}]}}") % fix.queue).str()); Message out("test-message"); out.setSubject("my-subject"); sender.send(out); Receiver receiver = fix.session.createReceiver(fix.queue); Message in = receiver.fetch(Duration::SECOND * 5); fix.session.acknowledge(); BOOST_CHECK_EQUAL(in.getContent(), out.getContent()); BOOST_CHECK_EQUAL(in.getSubject(), out.getSubject()); } QPID_AUTO_TEST_CASE(testUnsubscribeOnClose) { MessagingFixture fix; Sender sender = fix.session.createSender("my-exchange/my-subject; {create: always, delete:sender, node:{type:topic, x-declare:{alternate-exchange:amq.fanout}}}"); Receiver receiver = fix.session.createReceiver("my-exchange/my-subject"); Receiver deadletters = fix.session.createReceiver("amq.fanout"); sender.send(Message("first")); Message in = receiver.fetch(Duration::SECOND); BOOST_CHECK_EQUAL(in.getContent(), std::string("first")); fix.session.acknowledge(); receiver.close(); sender.send(Message("second")); in = deadletters.fetch(Duration::SECOND); BOOST_CHECK_EQUAL(in.getContent(), std::string("second")); fix.session.acknowledge(); } QPID_AUTO_TEST_CASE(testHeadersExchange) { MessagingFixture fix; //use both quoted and unquoted values Receiver receiver = fix.session.createReceiver("amq.match; {link:{x-bindings:[{arguments:{x-match:all,qpid.subject:'abc',my-property:abc}}]}}"); Sender sender = fix.session.createSender("amq.match"); Message out("test-message"); out.setSubject("abc"); Variant& property = out.getProperties()["my-property"]; property = "abc"; property.setEncoding("utf8"); sender.send(out, true); Message in; if (receiver.fetch(in, Duration::SECOND)) { fix.session.acknowledge(); BOOST_CHECK_EQUAL(in.getContent(), out.getContent()); } else { BOOST_FAIL("Message did not match as expected!"); } } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/start_broker0000775000076400007640000000170511654250703017522 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Start a test broker. srcdir=`dirname $0` exec $srcdir/run_test ../qpidd --auth=no --no-module-dir --daemon --port=0 --log-to-file qpidd.log "$@" > qpidd.port qpidc-0.16/src/tests/SequenceNumberTest.cpp0000664000076400007640000001233711252003060021345 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "unit_test.h" #include #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/SequenceNumberSet.h" using namespace qpid::framing; namespace qpid { namespace tests { void checkDifference(SequenceNumber& a, SequenceNumber& b, int gap) { BOOST_CHECK_EQUAL(gap, a - b); BOOST_CHECK_EQUAL(-gap, b - a); //increment until b wraps around for (int i = 0; i < (gap + 2); i++, ++a, ++b) { BOOST_CHECK_EQUAL(gap, a - b); } //keep incrementing until a also wraps around for (int i = 0; i < (gap + 2); i++, ++a, ++b) { BOOST_CHECK_EQUAL(gap, a - b); } //let b catch up and overtake for (int i = 0; i < (gap*2); i++, ++b) { BOOST_CHECK_EQUAL(gap - i, a - b); BOOST_CHECK_EQUAL(i - gap, b - a); } } void checkComparison(SequenceNumber& a, SequenceNumber& b, int gap) { //increment until b wraps around for (int i = 0; i < (gap + 2); i++) { BOOST_CHECK(++a < ++b);//test prefix } //keep incrementing until a also wraps around for (int i = 0; i < (gap + 2); i++) { BOOST_CHECK(a++ < b++);//test postfix } //let a 'catch up' for (int i = 0; i < gap; i++) { a++; } BOOST_CHECK(a == b); BOOST_CHECK(++a > b); } QPID_AUTO_TEST_SUITE(SequenceNumberTestSuite) QPID_AUTO_TEST_CASE(testIncrementPostfix) { SequenceNumber a; SequenceNumber b; BOOST_CHECK(!(a > b)); BOOST_CHECK(!(b < a)); BOOST_CHECK(a == b); SequenceNumber c = a++; BOOST_CHECK(a > b); BOOST_CHECK(b < a); BOOST_CHECK(a != b); BOOST_CHECK(c < a); BOOST_CHECK(a != c); b++; BOOST_CHECK(!(a > b)); BOOST_CHECK(!(b < a)); BOOST_CHECK(a == b); BOOST_CHECK(c < b); BOOST_CHECK(b != c); } QPID_AUTO_TEST_CASE(testIncrementPrefix) { SequenceNumber a; SequenceNumber b; BOOST_CHECK(!(a > b)); BOOST_CHECK(!(b < a)); BOOST_CHECK(a == b); SequenceNumber c = ++a; BOOST_CHECK(a > b); BOOST_CHECK(b < a); BOOST_CHECK(a != b); BOOST_CHECK(a == c); ++b; BOOST_CHECK(!(a > b)); BOOST_CHECK(!(b < a)); BOOST_CHECK(a == b); } QPID_AUTO_TEST_CASE(testWrapAround) { const uint32_t max = 0xFFFFFFFF; SequenceNumber a(max - 10); SequenceNumber b(max - 5); checkComparison(a, b, 5); const uint32_t max_signed = 0x7FFFFFFF; SequenceNumber c(max_signed - 10); SequenceNumber d(max_signed - 5); checkComparison(c, d, 5); } QPID_AUTO_TEST_CASE(testCondense) { SequenceNumberSet set; for (uint i = 0; i < 6; i++) { set.push_back(SequenceNumber(i)); } set.push_back(SequenceNumber(7)); for (uint i = 9; i < 13; i++) { set.push_back(SequenceNumber(i)); } set.push_back(SequenceNumber(13)); SequenceNumberSet actual = set.condense(); SequenceNumberSet expected; expected.addRange(SequenceNumber(0), SequenceNumber(5)); expected.addRange(SequenceNumber(7), SequenceNumber(7)); expected.addRange(SequenceNumber(9), SequenceNumber(13)); BOOST_CHECK_EQUAL(expected, actual); } QPID_AUTO_TEST_CASE(testCondenseSingleRange) { SequenceNumberSet set; for (uint i = 0; i < 6; i++) { set.push_back(SequenceNumber(i)); } SequenceNumberSet actual = set.condense(); SequenceNumberSet expected; expected.addRange(SequenceNumber(0), SequenceNumber(5)); BOOST_CHECK_EQUAL(expected, actual); } QPID_AUTO_TEST_CASE(testCondenseSingleItem) { SequenceNumberSet set; set.push_back(SequenceNumber(1)); SequenceNumberSet actual = set.condense(); SequenceNumberSet expected; expected.addRange(SequenceNumber(1), SequenceNumber(1)); BOOST_CHECK_EQUAL(expected, actual); } QPID_AUTO_TEST_CASE(testDifference) { SequenceNumber a; SequenceNumber b; for (int i = 0; i < 10; i++, ++a) { BOOST_CHECK_EQUAL(i, a - b); BOOST_CHECK_EQUAL(-i, b - a); } b = a; for (int i = 0; i < 10; i++, ++b) { BOOST_CHECK_EQUAL(-i, a - b); BOOST_CHECK_EQUAL(i, b - a); } } QPID_AUTO_TEST_CASE(testDifferenceWithWrapAround1) { const uint32_t max = 0xFFFFFFFF; SequenceNumber a(max - 5); SequenceNumber b(max - 10); checkDifference(a, b, 5); } QPID_AUTO_TEST_CASE(testDifferenceWithWrapAround2) { const uint32_t max_signed = 0x7FFFFFFF; SequenceNumber c(max_signed - 5); SequenceNumber d(max_signed - 10); checkDifference(c, d, 5); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/ring_queue_test0000775000076400007640000001261111721215323020213 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Test script for validating the behaviour of a ring queue QUEUE_NAME=ring-queue LIMIT=100 DURABLE=0 MESSAGES=10000 SENDERS=1 RECEIVERS=1 CONCURRENT=0 BROKER_URL="-b ${QPID_BROKER:-localhost}:${QPID_PORT:-5672}" setup() { if [[ $DURABLE -gt 0 ]]; then EXTRA_ARGS=" --durable" fi qpid-config $BROKER_URL add queue $QUEUE_NAME --max-queue-count $LIMIT --limit-policy ring $EXTRA_ARGS } send() { datagen --count $MESSAGES | tee sender_${QUEUE_NAME}_${1} | sender --durable $DURABLE --routing-key $QUEUE_NAME } receive() { #TODO: allow a variety of receiver options to be passed in (ack-frequency, credit-window etc) receiver --queue $QUEUE_NAME > receiver_${QUEUE_NAME}_${1} } cleanup() { rm -f sender_${QUEUE_NAME}_* receiver_${QUEUE_NAME}_* qpid-config $BROKER_URL del queue $QUEUE_NAME --force } log() { echo $1 } fail() { echo $1 FAILED=1 } validate() { if [[ $RECEIVERS -eq 0 ]]; then #queue should have $LIMIT messages on it, but need to send an eos also sender --routing-key $QUEUE_NAME --send-eos 1 < /dev/null received=$(receiver --queue $QUEUE_NAME --browse | wc -l) if [[ received -eq $(( $LIMIT - 1)) ]]; then log "queue contains $LIMIT messages as expected" else fail "queue does not contain the expected $LIMIT messages (received $received)" fi elif [[ $CONCURRENT -eq 0 ]]; then #sum of length of all output files should be equal to $LIMIT - $RECEIVERS (1 eos message each) received=$(cat receiver_${QUEUE_NAME}_* | wc -l) expected=$(( $LIMIT - $RECEIVERS )) if [[ $received -eq $expected ]]; then log "received $LIMIT messages as expected" else fail "received $received messages, expected $expected" fi #if there were only a single sender and receiver (executed serially) we can check the #actual received contents if [[ $RECEIVERS -eq 1 ]] && [[ $SENDERS -eq 1 ]]; then tail -n $(($LIMIT - 1)) sender_${QUEUE_NAME}_1 | diff - receiver_${QUEUE_NAME}_1 || FAILED=1 if [[ $FAILED -eq 1 ]]; then fail "did not receive expected messages" else log "received messages matched expectations" fi fi else #multiple receivers, concurrent with senders; ring queue functionality cannot be validated in this case if [[ $(cat receiver_${QUEUE_NAME}_* | wc -l) -le $(cat sender_${QUEUE_NAME}_* | wc -l) ]]; then log "sent at least as many messages as were received" else #Note: if any receiver was browsing, this would be valid (would need to add 'sort | uniq') # to pipeline above fail "received more messages than were sent" fi fi if [[ $FAILED ]]; then echo $(basename $0): FAILED exit 1 else cleanup fi } run_test() { if [[ $CONCURRENT -eq 0 ]]; then echo "Starting $SENDERS senders followed by $RECEIVERS receivers " else echo "Starting $SENDERS senders concurrently with $RECEIVERS receivers" fi for ((i=1; i <= $SENDERS; i++)); do send $i & sender_pids[$i]=$! done if [[ $CONCURRENT -eq 0 ]] && [[ $RECEIVERS -gt 0 ]]; then wait sender --routing-key $QUEUE_NAME --send-eos $RECEIVERS < /dev/null fi for ((i=1; i <= $RECEIVERS; i++)); do receive $i & done if [[ $CONCURRENT -gt 0 ]]; then for ((i=1; i <= $SENDERS; i++)); do wait ${sender_pids[$i]} done sender --routing-key $QUEUE_NAME --send-eos $RECEIVERS < /dev/null fi wait } usage() { cat < the name of the queue to use -s the number of senders to start -r the number of receivers to start -l the limit for the ring queue -m the number of messages to send -c if specified, receivers will run concurrently with senders -d if specified the queue and messages will be durable EOF exit 1 } while getopts "s:r:m:u:dch" opt ; do case $opt in q) QUEUE_NAME=$OPTARG ;; l) LIMIT=$OPTARG ;; s) SENDERS=$OPTARG ;; r) RECEIVERS=$OPTARG ;; m) MESSAGES=$OPTARG ;; d) DURABLE=1 ;; c) CONCURRENT=1 ;; h) usage;; ?) usage;; esac done if [[ $SENDERS -gt 0 ]]; then setup run_test validate else echo "Nothing can be done if there are no senders" fi qpidc-0.16/src/tests/testagent_gen/0000775000076400007640000000000011752725716017731 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/testagent_gen/qmf/0000775000076400007640000000000011752725716020514 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/testagent_gen/qmf/org/0000775000076400007640000000000011752725716021303 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/0000775000076400007640000000000011752725716022524 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/0000775000076400007640000000000011752725716023461 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/0000775000076400007640000000000011752725716024557 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/0000775000076400007640000000000011752725716026212 5ustar00jrossjross00000000000000qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/Package.cpp0000664000076400007640000000241611752725716030254 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "Package.h" #include "Parent.h" #include "Child.h" #include "EventChildCreated.h" #include "EventChildDestroyed.h" using namespace qmf::org::apache::qpid::agent::example; Package::Package (::qpid::management::ManagementAgent* agent) { Parent::registerSelf(agent); Child::registerSelf(agent); EventChildCreated::registerSelf(agent); EventChildDestroyed::registerSelf(agent); } qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.cpp0000664000076400007640000000662711752725716032641 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/agent/ManagementAgent.h" #include "EventChildDestroyed.h" using namespace qmf::org::apache::qpid::agent::example; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventChildDestroyed::packageName = string ("org.apache.qpid.agent.example"); string EventChildDestroyed::eventName = string ("ChildDestroyed"); uint8_t EventChildDestroyed::md5Sum[16] = {0x8b,0x6a,0xb5,0xf4,0x51,0x8,0xb1,0x26,0x89,0xc9,0x50,0xc0,0x97,0x9b,0xf9,0xd5}; EventChildDestroyed::EventChildDestroyed (const std::string& _childName) : childName(_childName) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventChildDestroyed::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventChildDestroyed::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (1); // Argument Count // Arguments ft.clear(); ft[NAME] = "childName"; ft[TYPE] = TYPE_LSTR; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventChildDestroyed::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putMediumString(childName); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventChildDestroyed::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["childName"] = ::qpid::types::Variant(childName); } bool EventChildDestroyed::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/Parent.cpp0000664000076400007640000001537411752725716030161 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/agent/ManagementAgent.h" #include "Parent.h" #include "ArgsParentCreate_child.h" #include #include using namespace qmf::org::apache::qpid::agent::example; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Parent::packageName = string ("org.apache.qpid.agent.example"); string Parent::className = string ("parent"); uint8_t Parent::md5Sum[MD5_LEN] = {0x74,0xe4,0x65,0x32,0x48,0x9f,0x9,0xcf,0x3e,0x56,0xd7,0x91,0xad,0xfb,0x28,0xd5}; Parent::Parent (ManagementAgent*, Manageable* _core, const std::string& _name) : ManagementObject(_core),name(_name) { state = ""; perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Parent::~Parent () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Parent::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Parent::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (1); // Config Element Count buf.putShort (2); // Inst Element Count buf.putShort (1); // Method Count // Properties ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "state"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Operational state of the link"; buf.putMap(ft); ft.clear(); ft[NAME] = "count"; ft[TYPE] = TYPE_U64; ft[UNIT] = "tick"; ft[DESC] = "Counter that increases monotonically"; buf.putMap(ft); // Methods ft.clear(); ft[NAME] = "create_child"; ft[ARGCOUNT] = 2; ft[DESC] = "Create child object"; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_LSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "childRef"; ft[TYPE] = TYPE_REF; ft[DIR] = "O"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Parent::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->count = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->count += threadStats->count; } } } std::string Parent::getKey() const { std::stringstream key; key << name; return key.str(); } void Parent::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["name"] = ::qpid::types::Variant(name); } if (includeStatistics) { instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["state"] = ::qpid::types::Variant(state); _map["count"] = ::qpid::types::Variant(totals.count); // Maintenance of hi-lo statistics } } void Parent::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } } void Parent::doMethod (string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "create_child") { ArgsParentCreate_child ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("name")) != inMap.end()) { ioArgs.i_name = (_i->second).getString(); } bool allow = coreObject->AuthorizeMethod(METHOD_CREATE_CHILD, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CREATE_CHILD, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); outMap["childRef"] = ::qpid::types::Variant(ioArgs.o_childRef); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/Child.h0000664000076400007640000000767111752725716027421 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_AGENT_EXAMPLE_CHILD_ #define _MANAGEMENT_ORG_APACHE_QPID_AGENT_EXAMPLE_CHILD_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace agent { namespace example { QPID_BROKER_CLASS_EXTERN class Child : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties ::qpid::management::ObjectId ParentRef; std::string name; // Statistics // Per-Thread Statistics public: struct PerThreadStats { uint64_t count; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->count = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Child( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const std::string& _name); QPID_BROKER_EXTERN ~Child(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_DELETE = 1; // Accessor Methods inline void inc_count (uint64_t by = 1) { getThreadStats()->count += by; instChanged = true; } inline void dec_count (uint64_t by = 1) { getThreadStats()->count -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}}} #endif /*!_MANAGEMENT_CHILD_*/ qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/ArgsParentCreate_child.h0000664000076400007640000000244711752725716032727 0ustar00jrossjross00000000000000 #ifndef _ARGS_PARENTCREATE_CHILD_ #define _ARGS_PARENTCREATE_CHILD_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace agent { namespace example { class ArgsParentCreate_child : public ::qpid::management::Args { public: std::string i_name; ::qpid::management::ObjectId o_childRef; }; }}}}}} #endif /*!_ARGS_PARENTCREATE_CHILD_*/ qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/Parent.h0000664000076400007640000001027611752725716027622 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_AGENT_EXAMPLE_PARENT_ #define _MANAGEMENT_ORG_APACHE_QPID_AGENT_EXAMPLE_PARENT_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace agent { namespace example { QPID_BROKER_CLASS_EXTERN class Parent : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties std::string name; // Statistics std::string state; // Per-Thread Statistics public: struct PerThreadStats { uint64_t count; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->count = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Parent( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, const std::string& _name); QPID_BROKER_EXTERN ~Parent(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_CREATE_CHILD = 1; // Accessor Methods inline void set_state (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); state = val; instChanged = true; } inline const std::string& get_state() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return state; } inline void inc_count (uint64_t by = 1) { getThreadStats()->count += by; instChanged = true; } inline void dec_count (uint64_t by = 1) { getThreadStats()->count -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}}} #endif /*!_MANAGEMENT_PARENT_*/ qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/Package.h0000664000076400007640000000261611752725716027723 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_AGENT_EXAMPLE_ #define _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_AGENT_EXAMPLE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/agent/ManagementAgent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace agent { namespace example { class Package { public: QPID_BROKER_EXTERN Package (::qpid::management::ManagementAgent* agent); QPID_BROKER_EXTERN ~Package () {} }; }}}}}} #endif /*!_MANAGEMENT_PACKAGE_ORG_APACHE_QPID_AGENT_EXAMPLE_*/ qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/Child.cpp0000664000076400007640000001467511752725716027756 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/agent/ManagementAgent.h" #include "Child.h" #include #include using namespace qmf::org::apache::qpid::agent::example; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Child::packageName = string ("org.apache.qpid.agent.example"); string Child::className = string ("child"); uint8_t Child::md5Sum[MD5_LEN] = {0x3a,0x7e,0x8b,0xa1,0xe8,0xe2,0x8a,0xb0,0xcc,0x57,0xbb,0xed,0xe1,0xf,0x7a,0x9c}; Child::Child (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const std::string& _name) : ManagementObject(_core),name(_name) { ParentRef = _parent->GetManagementObject ()->getObjectId (); perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Child::~Child () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Child::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Child::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (2); // Config Element Count buf.putShort (1); // Inst Element Count buf.putShort (1); // Method Count // Properties ft.clear(); ft[NAME] = "ParentRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "count"; ft[TYPE] = TYPE_U64; ft[UNIT] = "tick"; ft[DESC] = "Counter that increases monotonically"; buf.putMap(ft); // Methods ft.clear(); ft[NAME] = "delete"; ft[ARGCOUNT] = 0; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Child::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->count = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->count += threadStats->count; } } } std::string Child::getKey() const { std::stringstream key; key << ParentRef.getV2Key() << ","; key << name; return key.str(); } void Child::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["ParentRef"] = ::qpid::types::Variant(ParentRef); _map["name"] = ::qpid::types::Variant(name); } if (includeStatistics) { instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["count"] = ::qpid::types::Variant(totals.count); // Maintenance of hi-lo statistics } } void Child::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("ParentRef")) != _map.end()) { ParentRef = _i->second; } if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } } void Child::doMethod (string& methodName, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "delete") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_DELETE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_DELETE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.h0000664000076400007640000000426611752725716031710 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_CHILDCREATED_ #define _MANAGEMENT_CHILDCREATED_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace agent { namespace example { QPID_BROKER_CLASS_EXTERN class EventChildCreated : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& childName; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventChildCreated(const std::string& _childName); QPID_BROKER_EXTERN ~EventChildCreated() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}}} #endif /*!_MANAGEMENT_CHILDCREATED_*/ qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/EventChildCreated.cpp0000664000076400007640000000657711752725716032252 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/agent/ManagementAgent.h" #include "EventChildCreated.h" using namespace qmf::org::apache::qpid::agent::example; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventChildCreated::packageName = string ("org.apache.qpid.agent.example"); string EventChildCreated::eventName = string ("ChildCreated"); uint8_t EventChildCreated::md5Sum[16] = {0x89,0x5,0xe3,0xbd,0x5d,0xd9,0xfb,0x8d,0x15,0xdc,0xcb,0x46,0xab,0xc1,0x1c,0x39}; EventChildCreated::EventChildCreated (const std::string& _childName) : childName(_childName) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventChildCreated::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventChildCreated::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (1); // Argument Count // Arguments ft.clear(); ft[NAME] = "childName"; ft[TYPE] = TYPE_LSTR; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventChildCreated::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putMediumString(childName); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventChildCreated::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["childName"] = ::qpid::types::Variant(childName); } bool EventChildCreated::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/tests/testagent_gen/qmf/org/apache/qpid/agent/example/EventChildDestroyed.h0000664000076400007640000000430211752725716032272 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_CHILDDESTROYED_ #define _MANAGEMENT_CHILDDESTROYED_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace agent { namespace example { QPID_BROKER_CLASS_EXTERN class EventChildDestroyed : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& childName; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventChildDestroyed(const std::string& _childName); QPID_BROKER_EXTERN ~EventChildDestroyed() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}}} #endif /*!_MANAGEMENT_CHILDDESTROYED_*/ qpidc-0.16/src/tests/ipv6_test0000775000076400007640000001117511721215323016740 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run a simple test over IPv6 source ./test_env.sh CONFIG=$(dirname $0)/config.null TEST_HOSTNAME=::1 COUNT=10 trap cleanup EXIT error() { echo $*; exit 1; } # Don't need --no-module-dir or --no-data-dir as they are set as env vars in test_env.sh COMMON_OPTS="--daemon --auth no --config $CONFIG" # Record all broker ports started unset PORTS declare -a PORTS # Start new brokers: # $1 must be integer # $2 = extra opts # Append used ports to PORTS variable start_brokers() { local -a ports for (( i=0; $i<$1; i++)) do ports[$i]=$($QPIDD_EXEC --port 0 $COMMON_OPTS $2) done PORTS=( ${PORTS[@]} ${ports[@]} ) } stop_brokers() { for port in "${PORTS[@]}"; do $QPIDD_EXEC -qp $port done PORTS=() } cleanup() { stop_brokers } start_brokers 1 PORT=${PORTS[0]} echo "Started IPv6 smoke perftest on broker port $PORT" ## Test connection via connection settings ./qpid-perftest --count ${COUNT} --port ${PORT} -b $TEST_HOSTNAME --summary ## Test connection with a URL URL="amqp:[$TEST_HOSTNAME]:$PORT" ./qpid-send -b $URL --content-string=hello -a "foo;{create:always}" MSG=`./qpid-receive -b $URL -a "foo;{create:always}" --messages 1` test "$MSG" = "hello" || { echo "receive failed '$MSG' != 'hello'"; exit 1; } stop_brokers # Federation smoke test follows # Start 2 brokers # In a distribution, the python tools will be absent. if [ ! -f $QPID_CONFIG_EXEC ] || [ ! -f $QPID_ROUTE_EXEC ] ; then echo "python tools absent - skipping federation test." else start_brokers 2 echo "Started Federated brokers on ports ${PORTS[*]}" # Make broker urls BROKER0="[::1]:${PORTS[0]}" BROKER1="[::1]:${PORTS[1]}" TEST_QUEUE=ipv6-fed-test $QPID_CONFIG_EXEC -b $BROKER0 add queue $TEST_QUEUE $QPID_CONFIG_EXEC -b $BROKER1 add queue $TEST_QUEUE $QPID_ROUTE_EXEC dynamic add $BROKER1 $BROKER0 amq.direct $QPID_CONFIG_EXEC -b $BROKER1 bind amq.direct $TEST_QUEUE $TEST_QUEUE $QPID_ROUTE_EXEC route map $BROKER1 ./datagen --count 100 | tee rdata-in | ./qpid-send -b amqp:$BROKER0 -a amq.direct/$TEST_QUEUE --content-stdin ./qpid-receive -b amqp:$BROKER1 -a $TEST_QUEUE --print-content yes -m 0 > rdata-out cmp rdata-in rdata-out || { echo "Federated data over IPv6 does not compare"; exit 1; } stop_brokers rm rdata-in rdata-out fi # Cluster smoke test follows test -z $CLUSTER_LIB && exit 0 # Exit if cluster not supported. ## Test failover in a cluster using IPv6 only . $srcdir/ais_check # Will exit if clustering not enabled. pick_port() { # We need a fixed port to set --cluster-url. Use qpidd to pick a free port. # Note this method is racy PICK=$($QPIDD_EXEC -dp0) $QPIDD_EXEC -qp $PICK echo $PICK } ssl_cluster_broker() { # $1 = port $QPIDD_EXEC $COMMON_OPTS --load-module $CLUSTER_LIB --cluster-name ipv6_test.$HOSTNAME.$$ --cluster-url amqp:[$TEST_HOSTNAME]:$1 --port $1 # Wait for broker to be ready ./qpid-ping -b $TEST_HOSTNAME -qp $1 || { echo "Cannot connect to broker on $1"; exit 1; } echo "Running IPv6 cluster broker on port $1" } PORT1=`pick_port`; ssl_cluster_broker $PORT1 PORT2=`pick_port`; ssl_cluster_broker $PORT2 # Pipe receive output to uniq to remove duplicates ./qpid-receive --connection-options "{reconnect:true, reconnect-timeout:5}" --failover-updates -b amqp:[$TEST_HOSTNAME]:$PORT1 -a "foo;{create:always}" -f | uniq > ssl_test_receive.tmp & ./qpid-send -b amqp:[$TEST_HOSTNAME]:$PORT2 --content-string=one -a "foo;{create:always}" $QPIDD_EXEC -qp $PORT1 # Kill broker 1 receiver should fail-over. ./qpid-send -b amqp:[$TEST_HOSTNAME]:$PORT2 --content-string=two -a "foo;{create:always}" --send-eos 1 wait # Wait for qpid-receive { echo one; echo two; } > ssl_test_receive.cmp diff ssl_test_receive.tmp ssl_test_receive.cmp || { echo "Failover failed"; exit 1; } $QPIDD_EXEC -qp $PORT2 rm -f ssl_test_receive.* qpidc-0.16/src/tests/quick_txtest0000775000076400007640000000155711654250703017555 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # exec `dirname $0`/run_test ./qpid-txtest --queues 4 --tx-count 10 --quiet qpidc-0.16/src/tests/failover_soak.cpp0000664000076400007640000004677011406232304020426 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qpid/framing/Uuid.h" #include #include using namespace std; using boost::assign::list_of; using namespace qpid::framing; using namespace qpid::client; namespace qpid { namespace tests { vector pids; typedef vector brokerVector; typedef enum { NO_STATUS, RUNNING, COMPLETED } childStatus; typedef enum { NO_TYPE, DECLARING_CLIENT, SENDING_CLIENT, RECEIVING_CLIENT } childType; ostream& operator<< ( ostream& os, const childType& ct ) { switch ( ct ) { case DECLARING_CLIENT: os << "Declaring Client"; break; case SENDING_CLIENT: os << "Sending Client"; break; case RECEIVING_CLIENT: os << "Receiving Client"; break; default: os << "No Client"; break; } return os; } struct child { child ( string & name, pid_t pid, childType type ) : name(name), pid(pid), retval(-999), status(RUNNING), type(type) { gettimeofday ( & startTime, 0 ); } void done ( int _retval ) { retval = _retval; status = COMPLETED; gettimeofday ( & stopTime, 0 ); } void setType ( childType t ) { type = t; } string name; pid_t pid; int retval; childStatus status; childType type; struct timeval startTime, stopTime; }; struct children : public vector { void add ( string & name, pid_t pid, childType type ) { push_back ( new child ( name, pid, type ) ); } child * get ( pid_t pid ) { vector::iterator i; for ( i = begin(); i != end(); ++ i ) if ( pid == (*i)->pid ) return *i; return 0; } void exited ( pid_t pid, int retval ) { child * kid = get ( pid ); if(! kid) { if ( verbosity > 1 ) { cerr << "children::exited warning: Can't find child with pid " << pid << endl; } return; } kid->done ( retval ); } int unfinished ( ) { int count = 0; vector::iterator i; for ( i = begin(); i != end(); ++ i ) if ( COMPLETED != (*i)->status ) ++ count; return count; } int checkChildren ( ) { for ( unsigned int i = 0; i < pids.size(); ++ i ) { int pid = pids[i]; int returned_pid; int status; child * kid = get ( pid ); if ( kid->status != COMPLETED ) { returned_pid = waitpid ( pid, &status, WNOHANG ); if ( returned_pid == pid ) { int exit_status = WEXITSTATUS(status); exited ( pid, exit_status ); if ( exit_status ) // this is a child error. return exit_status; } } } return 0; } void killEverybody ( ) { vector::iterator i; for ( i = begin(); i != end(); ++ i ) kill ( (*i)->pid, 9 ); } void print ( ) { cout << "--- status of all children --------------\n"; vector::iterator i; for ( i = begin(); i != end(); ++ i ) cout << "child: " << (*i)->name << " status: " << (*i)->status << endl; cout << "\n\n\n\n"; } int verbosity; }; children allMyChildren; void childExit ( int ) { int childReturnCode; pid_t pid = waitpid ( 0, & childReturnCode, WNOHANG); if ( pid > 0 ) allMyChildren.exited ( pid, childReturnCode ); } int mrand ( int maxDesiredVal ) { double zeroToOne = (double) rand() / (double) RAND_MAX; return (int) (zeroToOne * (double) maxDesiredVal); } int mrand ( int minDesiredVal, int maxDesiredVal ) { int interval = maxDesiredVal - minDesiredVal; return minDesiredVal + mrand ( interval ); } void makeClusterName ( string & s ) { stringstream ss; ss << "soakTestCluster_" << Uuid(true).str(); s = ss.str(); } void printBrokers ( brokerVector & brokers ) { cout << "Broker List ------------ size: " << brokers.size() << "\n"; for ( brokerVector::iterator i = brokers.begin(); i != brokers.end(); ++ i) { cout << "pid: " << (*i)->getPID() << " port: " << (*i)->getPort() << endl; } cout << "end Broker List ------------\n"; } ForkedBroker * newbie = 0; int newbie_port = 0; bool wait_for_newbie ( ) { if ( ! newbie ) return true; try { Connection connection; connection.open ( "127.0.0.1", newbie_port ); connection.close(); newbie = 0; // He's no newbie anymore! return true; } catch ( const std::exception& error ) { std::cerr << "wait_for_newbie error: " << error.what() << endl; return false; } } bool endsWith(const char* str, const char* suffix) { return (strlen(suffix) < strlen(str) && 0 == strcmp(str+strlen(str)-strlen(suffix), suffix)); } void startNewBroker ( brokerVector & brokers, char const * moduleOrDir, string const clusterName, int verbosity, int durable ) { static int brokerId = 0; stringstream path, prefix; prefix << "soak-" << brokerId; std::vector argv = list_of ("qpidd") ("--cluster-name")(clusterName) ("--auth=no") ("--mgmt-enable=no") ("--log-prefix")(prefix.str()) ("--log-to-file")(prefix.str()+".log") ("--log-enable=info+") ("--log-enable=debug+:cluster") ("TMP_DATA_DIR"); if (endsWith(moduleOrDir, "cluster.so")) { // Module path specified, load only that module. argv.push_back(string("--load-module=")+moduleOrDir); argv.push_back("--no-module-dir"); if ( durable ) { std::cerr << "failover_soak warning: durable arg hass no effect. Use \"dir\" option of \"moduleOrDir\".\n"; } } else { // Module directory specified, load all modules in dir. argv.push_back(string("--module-dir=")+moduleOrDir); } newbie = new ForkedBroker (argv); newbie_port = newbie->getPort(); ForkedBroker * broker = newbie; if ( verbosity > 0 ) std::cerr << "new broker created: pid == " << broker->getPID() << " log-prefix == " << "soak-" << brokerId << endl; brokers.push_back ( broker ); ++ brokerId; } bool killFrontBroker ( brokerVector & brokers, int verbosity ) { cerr << "killFrontBroker: waiting for newbie sync...\n"; if ( ! wait_for_newbie() ) return false; cerr << "killFrontBroker: newbie synced.\n"; if ( verbosity > 0 ) cout << "killFrontBroker pid: " << brokers[0]->getPID() << " on port " << brokers[0]->getPort() << endl; try { brokers[0]->kill(9); } catch ( const exception& error ) { if ( verbosity > 0 ) { cout << "error killing broker: " << error.what() << endl; } return false; } delete brokers[0]; brokers.erase ( brokers.begin() ); return true; } /* * The optional delay is to avoid killing newbie brokers that have just * been added and are still in the process of updating. This causes * spurious, test-generated errors that scare everybody. */ void killAllBrokers ( brokerVector & brokers, int delay ) { if ( delay > 0 ) { std::cerr << "Killing all brokers after delay of " << delay << endl; sleep ( delay ); } for ( uint i = 0; i < brokers.size(); ++ i ) try { brokers[i]->kill(9); } catch ( const exception& error ) { std::cerr << "killAllBrokers Warning: exception during kill on broker " << i << " " << error.what() << endl; } } pid_t runDeclareQueuesClient ( brokerVector brokers, char const * host, char const * path, int verbosity, int durable, char const * queue_prefix, int n_queues ) { string name("declareQueues"); int port = brokers[0]->getPort ( ); if ( verbosity > 1 ) cout << "startDeclareQueuesClient: host: " << host << " port: " << port << endl; stringstream portSs; portSs << port; vector argv; argv.push_back ( "declareQueues" ); argv.push_back ( host ); string portStr = portSs.str(); argv.push_back ( portStr.c_str() ); if ( durable ) argv.push_back ( "1" ); else argv.push_back ( "0" ); argv.push_back ( queue_prefix ); char n_queues_str[20]; sprintf ( n_queues_str, "%d", n_queues ); argv.push_back ( n_queues_str ); argv.push_back ( 0 ); pid_t pid = fork(); if ( ! pid ) { execv ( path, const_cast(&argv[0]) ); perror ( "error executing declareQueues: " ); return 0; } allMyChildren.add ( name, pid, DECLARING_CLIENT ); return pid; } pid_t startReceivingClient ( brokerVector brokers, char const * host, char const * receiverPath, char const * reportFrequency, int verbosity, char const * queue_name ) { string name("receiver"); int port = brokers[0]->getPort ( ); if ( verbosity > 1 ) cout << "startReceivingClient: port " << port << endl; // verbosity has to be > 1 to let clients talk. int client_verbosity = (verbosity > 1 ) ? 1 : 0; char portStr[100]; char verbosityStr[100]; sprintf(portStr, "%d", port); sprintf(verbosityStr, "%d", client_verbosity); vector argv; argv.push_back ( "resumingReceiver" ); argv.push_back ( host ); argv.push_back ( portStr ); argv.push_back ( reportFrequency ); argv.push_back ( verbosityStr ); argv.push_back ( queue_name ); argv.push_back ( 0 ); pid_t pid = fork(); pids.push_back ( pid ); if ( ! pid ) { execv ( receiverPath, const_cast(&argv[0]) ); perror ( "error executing receiver: " ); return 0; } allMyChildren.add ( name, pid, RECEIVING_CLIENT ); return pid; } pid_t startSendingClient ( brokerVector brokers, char const * host, char const * senderPath, char const * nMessages, char const * reportFrequency, int verbosity, int durability, char const * queue_name ) { string name("sender"); int port = brokers[0]->getPort ( ); if ( verbosity > 1) cout << "startSenderClient: port " << port << endl; char portStr[100]; char verbosityStr[100]; // // verbosity has to be > 1 to let clients talk. int client_verbosity = (verbosity > 1 ) ? 1 : 0; sprintf ( portStr, "%d", port); sprintf ( verbosityStr, "%d", client_verbosity); vector argv; argv.push_back ( "replayingSender" ); argv.push_back ( host ); argv.push_back ( portStr ); argv.push_back ( nMessages ); argv.push_back ( reportFrequency ); argv.push_back ( verbosityStr ); if ( durability ) argv.push_back ( "1" ); else argv.push_back ( "0" ); argv.push_back ( queue_name ); argv.push_back ( 0 ); pid_t pid = fork(); pids.push_back ( pid ); if ( ! pid ) { execv ( senderPath, const_cast(&argv[0]) ); perror ( "error executing sender: " ); return 0; } allMyChildren.add ( name, pid, SENDING_CLIENT ); return pid; } #define HUNKY_DORY 0 #define BAD_ARGS 1 #define CANT_FORK_DQ 2 #define CANT_FORK_RECEIVER 3 #define CANT_FORK_SENDER 4 #define DQ_FAILED 5 #define ERROR_ON_CHILD 6 #define HANGING 7 #define ERROR_KILLING_BROKER 8 }} // namespace qpid::tests using namespace qpid::tests; // If you want durability, use the "dir" option of "moduleOrDir" . int main ( int argc, char const ** argv ) { int brokerKills = 0; if ( argc != 11 ) { cerr << "Usage: " << argv[0] << "moduleOrDir declareQueuesPath senderPath receiverPath nMessages reportFrequency verbosity durable n_queues n_brokers" << endl; cerr << "\tverbosity is an integer, durable is 0 or 1\n"; return BAD_ARGS; } signal ( SIGCHLD, childExit ); int i = 1; char const * moduleOrDir = argv[i++]; char const * declareQueuesPath = argv[i++]; char const * senderPath = argv[i++]; char const * receiverPath = argv[i++]; char const * nMessages = argv[i++]; char const * reportFrequency = argv[i++]; int verbosity = atoi(argv[i++]); int durable = atoi(argv[i++]); int n_queues = atoi(argv[i++]); int n_brokers = atoi(argv[i++]); char const * host = "127.0.0.1"; allMyChildren.verbosity = verbosity; string clusterName; srand ( getpid() ); makeClusterName ( clusterName ); brokerVector brokers; if ( verbosity > 1 ) cout << "Starting initial cluster...\n"; for ( int i = 0; i < n_brokers; ++ i ) { startNewBroker ( brokers, moduleOrDir, clusterName, verbosity, durable ); } if ( verbosity > 0 ) printBrokers ( brokers ); // Get prefix for each queue name. stringstream queue_prefix; queue_prefix << "failover_soak_" << getpid(); string queue_prefix_str(queue_prefix.str()); // Run the declareQueues child. int childStatus; pid_t dqClientPid = runDeclareQueuesClient ( brokers, host, declareQueuesPath, verbosity, durable, queue_prefix_str.c_str(), n_queues ); if ( -1 == dqClientPid ) { cerr << "END_OF_TEST ERROR_START_DECLARE_1\n"; return CANT_FORK_DQ; } // Don't continue until declareQueues is finished. pid_t retval = waitpid ( dqClientPid, & childStatus, 0); if ( retval != dqClientPid) { cerr << "END_OF_TEST ERROR_START_DECLARE_2\n"; return DQ_FAILED; } allMyChildren.exited ( dqClientPid, childStatus ); /* Start one receiving and one sending client for each queue. */ for ( int i = 0; i < n_queues; ++ i ) { stringstream queue_name; queue_name << queue_prefix.str() << '_' << i; string queue_name_str(queue_name.str()); // Receiving client --------------------------- pid_t receivingClientPid = startReceivingClient ( brokers, host, receiverPath, reportFrequency, verbosity, queue_name_str.c_str() ); if ( -1 == receivingClientPid ) { cerr << "END_OF_TEST ERROR_START_RECEIVER\n"; return CANT_FORK_RECEIVER; } // Sending client --------------------------- pid_t sendingClientPid = startSendingClient ( brokers, host, senderPath, nMessages, reportFrequency, verbosity, durable, queue_name_str.c_str() ); if ( -1 == sendingClientPid ) { cerr << "END_OF_TEST ERROR_START_SENDER\n"; return CANT_FORK_SENDER; } } int minSleep = 2, maxSleep = 6; int totalBrokers = n_brokers; int loop = 0; while ( 1 ) { ++ loop; /* if ( verbosity > 1 ) std::cerr << "------- loop " << loop << " --------\n"; if ( verbosity > 0 ) cout << totalBrokers << " brokers have been added to the cluster.\n\n\n"; */ // Sleep for a while. ------------------------- int sleepyTime = mrand ( minSleep, maxSleep ); sleep ( sleepyTime ); int bullet = mrand ( 100 ); if ( bullet >= 95 ) { fprintf ( stderr, "Killing oldest broker...\n" ); // Kill the oldest broker. -------------------------- if ( ! killFrontBroker ( brokers, verbosity ) ) { allMyChildren.killEverybody(); killAllBrokers ( brokers, 5 ); std::cerr << "END_OF_TEST ERROR_BROKER\n"; return ERROR_KILLING_BROKER; } ++ brokerKills; // Start a new broker. -------------------------- if ( verbosity > 0 ) cout << "Starting new broker.\n\n"; startNewBroker ( brokers, moduleOrDir, clusterName, verbosity, durable ); ++ totalBrokers; printBrokers ( brokers ); cerr << brokerKills << " brokers have been killed.\n\n\n"; } int retval = allMyChildren.checkChildren(); if ( retval ) { std::cerr << "END_OF_TEST ERROR_CLIENT\n"; allMyChildren.killEverybody(); killAllBrokers ( brokers, 5 ); return ERROR_ON_CHILD; } // If all children have exited, quit. int unfinished = allMyChildren.unfinished(); if ( unfinished == 0 ) { killAllBrokers ( brokers, 5 ); if ( verbosity > 1 ) cout << "failoverSoak: all children have exited.\n"; std::cerr << "END_OF_TEST SUCCESSFUL\n"; return HUNKY_DORY; } } allMyChildren.killEverybody(); killAllBrokers ( brokers, 5 ); std::cerr << "END_OF_TEST SUCCESSFUL\n"; return HUNKY_DORY; } qpidc-0.16/src/tests/qpid-send.cpp0000664000076400007640000004240411643605374017472 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include #include "TestOptions.h" #include "Statistics.h" #include #include #include using namespace std; using namespace qpid::messaging; using namespace qpid::types; typedef std::vector string_vector; namespace qpid { namespace tests { struct Options : public qpid::Options { bool help; std::string url; std::string connectionOptions; std::string address; uint messages; std::string id; std::string replyto; uint sendEos; bool durable; uint ttl; uint priority; std::string userid; std::string correlationid; string_vector properties; string_vector entries; std::string contentString; uint contentSize; bool contentStdin; uint tx; uint rollbackFrequency; uint capacity; bool failoverUpdates; qpid::log::Options log; bool reportTotal; uint reportEvery; bool reportHeader; uint sendRate; uint flowControl; bool sequence; bool timestamp; std::string groupKey; std::string groupPrefix; uint groupSize; bool groupRandSize; uint groupInterleave; Options(const std::string& argv0=std::string()) : qpid::Options("Options"), help(false), url("amqp:tcp:127.0.0.1"), messages(1), sendEos(0), durable(false), ttl(0), priority(0), contentString(), contentSize(0), contentStdin(false), tx(0), rollbackFrequency(0), capacity(1000), failoverUpdates(false), log(argv0), reportTotal(false), reportEvery(0), reportHeader(true), sendRate(0), flowControl(0), sequence(true), timestamp(true), groupPrefix("GROUP-"), groupSize(10), groupRandSize(false), groupInterleave(1) { addOptions() ("broker,b", qpid::optValue(url, "URL"), "url of broker to connect to") ("address,a", qpid::optValue(address, "ADDRESS"), "address to send to") ("connection-options", qpid::optValue(connectionOptions, "OPTIONS"), "options for the connection") ("messages,m", qpid::optValue(messages, "N"), "stop after N messages have been sent, 0 means no limit") ("id,i", qpid::optValue(id, "ID"), "use the supplied id instead of generating one") ("reply-to", qpid::optValue(replyto, "REPLY-TO"), "specify reply-to address") ("send-eos", qpid::optValue(sendEos, "N"), "Send N EOS messages to mark end of input") ("durable", qpid::optValue(durable, "yes|no"), "Mark messages as durable.") ("ttl", qpid::optValue(ttl, "msecs"), "Time-to-live for messages, in milliseconds") ("priority", qpid::optValue(priority, "PRIORITY"), "Priority for messages (higher value implies higher priority)") ("property,P", qpid::optValue(properties, "NAME=VALUE"), "specify message property") ("correlation-id", qpid::optValue(correlationid, "ID"), "correlation-id for message") ("user-id", qpid::optValue(userid, "USERID"), "userid for message") ("content-string", qpid::optValue(contentString, "CONTENT"), "use CONTENT as message content") ("content-size", qpid::optValue(contentSize, "N"), "create an N-byte message content") ("content-map,M", qpid::optValue(entries, "NAME=VALUE"), "specify entry for map content") ("content-stdin", qpid::optValue(contentStdin), "read message content from stdin, one line per message") ("capacity", qpid::optValue(capacity, "N"), "size of the senders outgoing message queue") ("tx", qpid::optValue(tx, "N"), "batch size for transactions (0 implies transaction are not used)") ("rollback-frequency", qpid::optValue(rollbackFrequency, "N"), "rollback frequency (0 implies no transaction will be rolledback)") ("failover-updates", qpid::optValue(failoverUpdates), "Listen for membership updates distributed via amq.failover") ("report-total", qpid::optValue(reportTotal), "Report total throughput statistics") ("report-every", qpid::optValue(reportEvery,"N"), "Report throughput statistics every N messages") ("report-header", qpid::optValue(reportHeader, "yes|no"), "Headers on report.") ("send-rate", qpid::optValue(sendRate,"N"), "Send at rate of N messages/second. 0 means send as fast as possible.") ("flow-control", qpid::optValue(flowControl,"N"), "Do end to end flow control to limit queue depth to 2*N. 0 means no flow control.") ("sequence", qpid::optValue(sequence, "yes|no"), "Add a sequence number messages property (required for duplicate/lost message detection)") ("timestamp", qpid::optValue(timestamp, "yes|no"), "Add a time stamp messages property (required for latency measurement)") ("group-key", qpid::optValue(groupKey, "KEY"), "Generate groups of messages using message header 'KEY' to hold the group identifier") ("group-prefix", qpid::optValue(groupPrefix, "STRING"), "Generate group identifers with 'STRING' prefix (if group-key specified)") ("group-size", qpid::optValue(groupSize, "N"), "Number of messages per a group (if group-key specified)") ("group-randomize-size", qpid::optValue(groupRandSize), "Randomize the number of messages per group to [1...group-size] (if group-key specified)") ("group-interleave", qpid::optValue(groupInterleave, "N"), "Simultaineously interleave messages from N different groups (if group-key specified)") ("help", qpid::optValue(help), "print this usage statement"); add(log); } bool parse(int argc, char** argv) { try { qpid::Options::parse(argc, argv); if (address.empty()) throw qpid::Exception("Address must be specified!"); qpid::log::Logger::instance().configure(log); if (help) { std::ostringstream msg; std::cout << msg << *this << std::endl << std::endl << "Drains messages from the specified address" << std::endl; return false; } else { return true; } } catch (const std::exception& e) { std::cerr << *this << std::endl << std::endl << e.what() << std::endl; return false; } } static bool nameval(const std::string& in, std::string& name, std::string& value) { std::string::size_type i = in.find("="); if (i == std::string::npos) { name = in; return false; } else { name = in.substr(0, i); if (i+1 < in.size()) { value = in.substr(i+1); return true; } else { return false; } } } static void setProperty(Message& message, const std::string& property) { std::string name; std::string value; if (nameval(property, name, value)) { message.getProperties()[name] = value; } else { message.getProperties()[name] = Variant(); } } void setProperties(Message& message) const { for (string_vector::const_iterator i = properties.begin(); i != properties.end(); ++i) { setProperty(message, *i); } } void setEntries(Variant::Map& content) const { for (string_vector::const_iterator i = entries.begin(); i != entries.end(); ++i) { std::string name; std::string value; if (nameval(*i, name, value)) { content[name] = value; } else { content[name] = Variant(); } } } }; const string EOS("eos"); const string SN("sn"); const string TS("ts"); }} // namespace qpid::tests using namespace qpid::tests; class ContentGenerator { public: virtual ~ContentGenerator() {} virtual bool setContent(Message& msg) = 0; }; class GetlineContentGenerator : public ContentGenerator { public: virtual bool setContent(Message& msg) { string content; bool got = getline(std::cin, content); if (got) msg.setContent(content); return got; } }; class FixedContentGenerator : public ContentGenerator { public: FixedContentGenerator(const string& s) : content(s) {} virtual bool setContent(Message& msg) { msg.setContent(content); return true; } private: std::string content; }; class MapContentGenerator : public ContentGenerator { public: MapContentGenerator(const Options& opt) : opts(opt) {} virtual bool setContent(Message& msg) { Variant::Map map; opts.setEntries(map); encode(map, msg); return true; } private: const Options& opts; }; // tag each generated message with a group identifer // class GroupGenerator { public: GroupGenerator(const std::string& key, const std::string& prefix, const uint size, const bool randomize, const uint interleave) : groupKey(key), groupPrefix(prefix), groupSize(size), randomizeSize(randomize), groupSuffix(0) { if (randomize) srand((unsigned int)qpid::sys::SystemInfo::getProcessId()); for (uint i = 0; i < 1 || i < interleave; ++i) { newGroup(); } current = groups.begin(); } void setGroupInfo(Message &msg) { if (current == groups.end()) current = groups.begin(); msg.getProperties()[groupKey] = current->id; // std::cout << "SENDING GROUPID=[" << current->id << "]" << std::endl; if (++(current->count) == current->size) { newGroup(); groups.erase(current++); } else ++current; } private: const std::string& groupKey; const std::string& groupPrefix; const uint groupSize; const bool randomizeSize; uint groupSuffix; struct GroupState { std::string id; const uint size; uint count; GroupState( const std::string& i, const uint s ) : id(i), size(s), count(0) {} }; typedef std::list GroupList; GroupList groups; GroupList::iterator current; void newGroup() { std::ostringstream groupId(groupPrefix, ios_base::out|ios_base::ate); groupId << groupSuffix++; uint size = (randomizeSize) ? (rand() % groupSize) + 1 : groupSize; // std::cout << "New group: GROUPID=[" << groupId.str() << "] size=" << size << std::endl; GroupState group( groupId.str(), size ); groups.push_back( group ); } }; int main(int argc, char ** argv) { Connection connection; Options opts; try { if (opts.parse(argc, argv)) { connection = Connection(opts.url, opts.connectionOptions); connection.open(); std::auto_ptr updates(opts.failoverUpdates ? new FailoverUpdates(connection) : 0); Session session = opts.tx ? connection.createTransactionalSession() : connection.createSession(); Sender sender = session.createSender(opts.address); if (opts.capacity) sender.setCapacity(opts.capacity); Message msg; msg.setDurable(opts.durable); if (opts.ttl) { msg.setTtl(Duration(opts.ttl)); } if (opts.priority) { msg.setPriority(opts.priority); } if (!opts.replyto.empty()) { if (opts.flowControl) throw Exception("Can't use reply-to and flow-control together"); msg.setReplyTo(Address(opts.replyto)); } if (!opts.userid.empty()) msg.setUserId(opts.userid); if (!opts.correlationid.empty()) msg.setCorrelationId(opts.correlationid); opts.setProperties(msg); uint sent = 0; uint txCount = 0; Reporter reporter(std::cout, opts.reportEvery, opts.reportHeader); std::auto_ptr contentGen; if (opts.contentStdin) { opts.messages = 0; // Don't limit # messages sent. contentGen.reset(new GetlineContentGenerator); } else if (opts.entries.size() > 0) contentGen.reset(new MapContentGenerator(opts)); else if (opts.contentSize > 0) contentGen.reset(new FixedContentGenerator(string(opts.contentSize, 'X'))); else contentGen.reset(new FixedContentGenerator(opts.contentString)); std::auto_ptr groupGen; if (!opts.groupKey.empty()) groupGen.reset(new GroupGenerator(opts.groupKey, opts.groupPrefix, opts.groupSize, opts.groupRandSize, opts.groupInterleave)); qpid::sys::AbsTime start = qpid::sys::now(); int64_t interval = 0; if (opts.sendRate) interval = qpid::sys::TIME_SEC/opts.sendRate; Receiver flowControlReceiver; Address flowControlAddress("flow-"+Uuid(true).str()+";{create:always,delete:always}"); uint flowSent = 0; if (opts.flowControl) { flowControlReceiver = session.createReceiver(flowControlAddress); flowControlReceiver.setCapacity(2); } while (contentGen->setContent(msg)) { ++sent; if (opts.sequence) msg.getProperties()[SN] = sent; if (opts.flowControl) { if ((sent % opts.flowControl) == 0) { msg.setReplyTo(flowControlAddress); ++flowSent; } else msg.setReplyTo(Address()); // Clear the reply address. } if (groupGen.get()) groupGen->setGroupInfo(msg); if (opts.timestamp) msg.getProperties()[TS] = int64_t( qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now())); sender.send(msg); reporter.message(msg); if (opts.tx && (sent % opts.tx == 0)) { if (opts.rollbackFrequency && (++txCount % opts.rollbackFrequency == 0)) session.rollback(); else session.commit(); } if (opts.messages && sent >= opts.messages) break; if (opts.flowControl && flowSent == 2) { flowControlReceiver.get(Duration::SECOND); --flowSent; } if (opts.sendRate) { qpid::sys::AbsTime waitTill(start, sent*interval); int64_t delay = qpid::sys::Duration(qpid::sys::now(), waitTill); if (delay > 0) qpid::sys::usleep(delay/qpid::sys::TIME_USEC); } } for ( ; flowSent>0; --flowSent) flowControlReceiver.get(Duration::SECOND); if (opts.reportTotal) reporter.report(); for (uint i = opts.sendEos; i > 0; --i) { if (opts.sequence) msg.getProperties()[SN] = ++sent; msg.setContent(EOS); //TODO: add in ability to send digest or similar sender.send(msg); } if (opts.tx) { if (opts.rollbackFrequency && (++txCount % opts.rollbackFrequency == 0)) { session.rollback(); } else { session.commit(); } } session.sync(); session.close(); connection.close(); return 0; } } catch(const std::exception& error) { std::cerr << "qpid-send: " << error.what() << std::endl; connection.close(); return 1; } } qpidc-0.16/src/tests/qpid-cpp-benchmark0000775000076400007640000003422211717465066020500 0ustar00jrossjross00000000000000#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import optparse, time, qpid.messaging, re from threading import Thread from subprocess import Popen, PIPE, STDOUT op = optparse.OptionParser(usage="usage: %prog [options]", description="simple performance benchmarks") op.add_option("-b", "--broker", default=[], action="append", type="str", help="url of broker(s) to connect to, round robin on multiple brokers") op.add_option("-c", "--client-host", default=[], action="append", type="str", help="host(s) to run clients on via ssh, round robin on mulple hosts") op.add_option("-q", "--queues", default=1, type="int", metavar="N", help="create N queues (default %default)") op.add_option("-s", "--senders", default=1, type="int", metavar="N", help="start N senders per queue (default %default)") op.add_option("-r", "--receivers", default=1, type="int", metavar="N", help="start N receivers per queue (default %default)") op.add_option("-m", "--messages", default=100000, type="int", metavar="N", help="send N messages per sender (default %default)") op.add_option("--queue-name", default="benchmark", metavar="NAME", help="base name for queues (default %default)") op.add_option("--send-rate", default=0, metavar="N", help="send rate limited to N messages/second, 0 means no limit (default %default)") op.add_option("--receive-rate", default=0, metavar="N", help="receive rate limited to N messages/second, 0 means no limit (default %default)") op.add_option("--content-size", default=1024, type="int", metavar="BYTES", help="message size in bytes (default %default)") op.add_option("--ack-frequency", default=100, metavar="N", type="int", help="receiver ack's every N messages, 0 means unconfirmed (default %default)") op.add_option("--no-report-header", dest="report_header", default=True, action="store_false", help="don't print header on report") op.add_option("--summarize", default=False, action="store_true", help="print summary statistics for multiple senders/receivers: total throughput, average latency") op.add_option("--repeat", default=1, metavar="N", help="repeat N times", type="int") op.add_option("--send-option", default=[], action="append", type="str", help="Additional option for sending addresses") op.add_option("--receive-option", default=[], action="append", type="str", help="Additional option for receiving addresses") op.add_option("--create-option", default=[], action="append", type="str", help="Additional option for creating addresses") op.add_option("--send-arg", default=[], action="append", type="str", help="Additional argument for qpid-send") op.add_option("--receive-arg", default=[], action="append", type="str", help="Additional argument for qpid-receive") op.add_option("--no-timestamp", dest="timestamp", default=True, action="store_false", help="don't add a timestamp, no latency results") op.add_option("--sequence", dest="sequence", default=False, action="store_true", help="add a sequence number to each message") op.add_option("--connection-options", type="str", help="Connection options for senders & receivers") op.add_option("--flow-control", default=0, type="int", metavar="N", help="Flow control each sender to limit queue depth to 2*N. 0 means no flow control.") op.add_option("--durable", default=False, action="store_true", help="Use durable queues and messages") op.add_option("--save-received", default=False, action="store_true", help="Save received message content to files -receiver-.msg") op.add_option("--group-receivers", default=False, action="store_true", help="Run receivers for the same queue on the same host.") op.add_option("--verbose", default=False, action="store_true", help="Show commands executed") op.add_option("--no-delete", default=False, action="store_true", help="Don't delete the test queues.") single_quote_re = re.compile("'") def posix_quote(string): """ Quote a string for use as an argument in a posix shell""" return "'" + single_quote_re.sub("\\'", string) + "'"; def ssh_command(host, command): """ Convert command into an ssh command on host with quoting""" return ["ssh", host] + [posix_quote(arg) for arg in command] class Clients: def __init__(self): self.clients=[] def add(self, client): self.clients.append(client) return client def kill(self): for c in self.clients: try: c.kill() except: pass class PopenCommand(Popen): """Like Popen but you can query for the command""" def __init__(self, command, *args, **kwargs): self.command = command Popen.__init__(self, command, *args, **kwargs) clients = Clients() def start_receive(queue, index, opts, ready_queue, broker, host): address_opts=opts.receive_option if opts.durable: address_opts += ["node:{durable:true}"] address="%s;{%s}"%(queue,",".join(address_opts)) msg_total=opts.senders*opts.messages messages = msg_total/opts.receivers; if (index < msg_total%opts.receivers): messages += 1 if (messages == 0): return None command = ["qpid-receive", "-b", broker, "-a", address, "-m", str(messages), "--forever", "--print-content=no", "--receive-rate", str(opts.receive_rate), "--report-total", "--ack-frequency", str(opts.ack_frequency), "--ready-address", "%s;{create:always}"%ready_queue, "--report-header=no" ] if opts.save_received: command += ["--save-content=%s-receiver-%s.msg"%(queue,index)] command += opts.receive_arg if opts.connection_options: command += ["--connection-options",opts.connection_options] if host: command = ssh_command(host, command) if opts.verbose: print "Receiver: ", command return clients.add(PopenCommand(command, stdout=PIPE, stderr=PIPE)) def start_send(queue, opts, broker, host): address="%s;{%s}"%(queue,",".join(opts.send_option + ["create:always"])) command = ["qpid-send", "-b", broker, "-a", address, "--messages", str(opts.messages), "--content-size", str(opts.content_size), "--send-rate", str(opts.send_rate), "--report-total", "--report-header=no", "--timestamp=%s"%(opts.timestamp and "yes" or "no"), "--sequence=%s"%(opts.sequence and "yes" or "no"), "--flow-control", str(opts.flow_control), "--durable", str(opts.durable) ] command += opts.send_arg if opts.connection_options: command += ["--connection-options",opts.connection_options] if host: command = ssh_command(host, command) if opts.verbose: print "Sender: ", command return clients.add(PopenCommand(command, stdout=PIPE, stderr=PIPE)) def error_msg(out, err): return ("\n[stdout]\n%s\n[stderr]\n%s[end]"%(out, err)) def first_line(p): out,err=p.communicate() if p.returncode != 0: raise Exception("Process exit %d: %s"%(p.returncode, error_msg(out,err))) return out.split("\n")[0] def queue_exists(queue,broker): c = qpid.messaging.Connection(broker) c.open() try: s = c.session() try: s.sender(queue) return True except qpid.messaging.exceptions.NotFound: return False finally: c.close() def recreate_queues(queues, brokers, no_delete, opts): c = qpid.messaging.Connection(brokers[0]) c.open() s = c.session() for q in queues: if not no_delete: try: s.sender("%s;{delete:always}"%(q)).close() except qpid.messaging.exceptions.NotFound: pass # FIXME aconway 2011-05-04: new cluster async wiring, wait for changes to propagate for b in brokers: while queue_exists(q,b): time.sleep(0.1); address = "%s;{%s}"%(q, ",".join(opts.create_option + ["create:always"])) if opts.verbose: print "Creating", address s.sender(address) # FIXME aconway 2011-05-04: new cluster async wiring, wait for changes to propagate for b in brokers: while not queue_exists(q,b): time.sleep(0.1); c.close() def print_header(timestamp): if timestamp: latency_header="\tl-min\tl-max\tl-avg\ttotal-tp" else: latency_header="" print "send-tp\trecv-tp%s"%latency_header def parse(parser, lines): # Parse sender/receiver output return [map(lambda p: p[0](p[1]), zip(parser,line.split())) for line in lines] def parse_senders(senders): return parse([int],[first_line(p) for p in senders]) def parse_receivers(receivers): return parse([int,float,float,float],[first_line(p) for p in receivers if p]) def print_data(send_stats, recv_stats, total_tp): for send,recv in map(None, send_stats, recv_stats): line="" if send: line += "%d"%send[0] if recv: line += "\t%d"%recv[0] if len(recv) == 4: line += "\t%.2f\t%.2f\t%.2f"%tuple(recv[1:]) if total_tp is not None: line += "\t%d"%total_tp total_tp = None print line def print_summary(send_stats, recv_stats, total_tp): def avg(s): sum(s) / len(s) send_tp = sum([l[0] for l in send_stats]) recv_tp = sum([l[0] for l in recv_stats]) summary = "%d\t%d"%(send_tp, recv_tp) if recv_stats and len(recv_stats[0]) == 4: l_min = sum(l[1] for l in recv_stats)/len(recv_stats) l_max = sum(l[2] for l in recv_stats)/len(recv_stats) l_avg = sum(l[3] for l in recv_stats)/len(recv_stats) summary += "\t%.2f\t%.2f\t%.2f"%(l_min, l_max, l_avg) summary += "\t%d"%total_tp print summary class ReadyReceiver: """A receiver for ready messages""" def __init__(self, queue, broker): self.connection = qpid.messaging.Connection(broker) self.connection.open() self.receiver = self.connection.session().receiver( "%s;{create:receiver,delete:receiver,node:{durable:false}}"%(queue)) self.receiver.session.sync() self.timeout=10 def wait(self, receivers): try: for i in receivers: self.receiver.fetch(self.timeout) self.connection.close() except qpid.messaging.Empty: for r in receivers: if (r.poll() is not None): out,err=r.communicate() raise Exception("Receiver error: %s\n%s" % (" ".join(r.command), error_msg(out,err))) raise Exception("Timed out waiting for receivers to be ready") def flatten(l): return sum(map(lambda s: re.split(re.compile("\s*,\s*|\s+"), s), l), []) class RoundRobin: def __init__(self,items): self.items = items self.index = 0 def next(self): if not self.items: return None ret = self.items[self.index] self.index = (self.index+1)%len(self.items) return ret def main(): opts, args = op.parse_args() opts.client_host = flatten(opts.client_host) if not opts.broker: if opts.client_host: raise Exception("--broker must be specified if --client_host is.") opts.broker = ["127.0.0.1"] # Deafult to local broker opts.broker = flatten(opts.broker) brokers = RoundRobin(opts.broker) client_hosts = RoundRobin(opts.client_host) send_out = "" receive_out = "" ready_queue="%s-ready"%(opts.queue_name) queues = ["%s-%s"%(opts.queue_name, i) for i in xrange(opts.queues)] try: for i in xrange(opts.repeat): recreate_queues(queues, opts.broker, opts.no_delete, opts) ready_receiver = ReadyReceiver(ready_queue, opts.broker[0]) if opts.group_receivers: # Run receivers for same queue against same broker. receivers = [] for q in queues: b = brokers.next() for j in xrange(opts.receivers): receivers.append( start_receive(q, j, opts, ready_queue, b, client_hosts.next())) else: # Don't group receivers receivers = [start_receive(q, j, opts, ready_queue, brokers.next(), client_hosts.next()) for q in queues for j in xrange(opts.receivers)] ready_receiver.wait(filter(None, receivers)) # Wait for receivers to be ready. start = time.time() senders = [start_send(q, opts,brokers.next(), client_hosts.next()) for q in queues for j in xrange(opts.senders)] if opts.report_header and i == 0: print_header(opts.timestamp) for p in senders + receivers: p.wait() total_sent = opts.queues * opts.senders * opts.messages total_tp = total_sent / (time.time()-start) send_stats=parse_senders(senders) recv_stats=parse_receivers(receivers) if opts.summarize: print_summary(send_stats, recv_stats, total_tp) else: print_data(send_stats, recv_stats, total_tp) finally: clients.kill() # No strays if __name__ == "__main__": main() qpidc-0.16/src/tests/ForkedBroker.cpp0000664000076400007640000001276411663012400020153 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "ForkedBroker.h" #include "qpid/log/Statement.h" #include #include #include #include #include using namespace std; using qpid::ErrnoException; namespace std { static ostream& operator<<(ostream& o, const qpid::tests::ForkedBroker::Args& a) { copy(a.begin(), a.end(), ostream_iterator(o, " ")); return o; } } namespace qpid { namespace tests { ForkedBroker::ForkedBroker(const Args& constArgs) : running(false), exitStatus(0) { Args args(constArgs); // Substitute the special value "TMP_DATA_DIR" with a temporary data dir. Args::iterator i = find(args.begin(), args.end(), string("TMP_DATA_DIR")); if (i != args.end()) { args.erase(i); char dd[] = "/tmp/ForkedBroker.XXXXXX"; if (!mkdtemp(dd)) throw qpid::ErrnoException("Can't create data dir"); dataDir = dd; args.push_back("--data-dir"); args.push_back(dataDir); } // Never use the default data directory, set --no-data-dir if no other data-dir arg. Args::iterator j = find(args.begin(), args.end(), string("--data-dir")); Args::iterator k = find(args.begin(), args.end(), string("--no-data-dir")); if (j == args.end() && k == args.end()) args.push_back("--no-data-dir"); init(args); } ForkedBroker::~ForkedBroker() { try { kill(); } catch (const std::exception& e) { QPID_LOG(error, QPID_MSG("Killing forked broker: " << e.what())); } if (!dataDir.empty()) { if(::system(("rm -rf "+dataDir).c_str())) {} } } void ForkedBroker::kill(int sig) { if (pid == 0) return; int savePid = pid; pid = 0; // Reset pid here in case of an exception. using qpid::ErrnoException; if (::kill(savePid, sig) < 0) throw ErrnoException("kill failed"); int status; if (::waitpid(savePid, &status, 0) < 0 && sig != 9) throw ErrnoException("wait for forked process failed"); if (WEXITSTATUS(status) != 0 && sig != 9) throw qpid::Exception(QPID_MSG("Forked broker exited with: " << WEXITSTATUS(status))); running = false; exitStatus = status; } bool isLogOption(const std::string& s) { const char * log_enable = "--log-enable", * trace = "--trace"; return( (! strncmp(s.c_str(), log_enable, strlen(log_enable))) || (! strncmp(s.c_str(), trace, strlen(trace))) ); } namespace { void ignore_signal(int) { } } void ForkedBroker::init(const Args& userArgs) { using qpid::ErrnoException; port = 0; int pipeFds[2]; if(::pipe(pipeFds) < 0) throw ErrnoException("Can't create pipe"); // Ignore the SIGCHLD signal generated by an exitting child // We will clean up any exitting children in the waitpid above // This should really be neater (like only once not per fork) struct ::sigaction sa; sa.sa_handler = ignore_signal; ::sigemptyset(&sa.sa_mask); ::sigaddset(&sa.sa_mask, SIGCHLD); sa.sa_flags = SA_NOCLDSTOP | SA_RESTART; ::sigaction(SIGCHLD, &sa, 0); pid = ::fork(); if (pid < 0) throw ErrnoException("Fork failed"); if (pid) { // parent ::close(pipeFds[1]); FILE* f = ::fdopen(pipeFds[0], "r"); if (!f) throw ErrnoException("fopen failed"); if (::fscanf(f, "%d", &port) != 1) { if (ferror(f)) throw ErrnoException("Error reading port number from child."); else throw qpid::Exception("EOF reading port number from child."); } ::fclose(f); running = true; } else { // child ::close(pipeFds[0]); int fd = ::dup2(pipeFds[1], 1); // pipe stdout to the parent. if (fd < 0) throw ErrnoException("dup2 failed"); const char* prog = ::getenv("QPIDD_EXEC"); if (!prog) prog = "../qpidd"; // This only works from within svn checkout Args args(userArgs); args.push_back("--port=0"); // Keep quiet except for errors. if (!::getenv("QPID_TRACE") && !::getenv("QPID_LOG_ENABLE") && find_if(userArgs.begin(), userArgs.end(), isLogOption) == userArgs.end()) args.push_back("--log-enable=error+"); std::vector argv(args.size()); std::transform(args.begin(), args.end(), argv.begin(), boost::bind(&std::string::c_str, _1)); argv.push_back(0); QPID_LOG(debug, "ForkedBroker exec " << prog << ": " << args); execv(prog, const_cast(&argv[0])); QPID_LOG(critical, "execv failed to start broker: prog=\"" << prog << "\"; args=\"" << args << "\"; errno=" << errno << " (" << std::strerror(errno) << ")"); ::exit(1); } } }} // namespace qpid::tests qpidc-0.16/src/tests/qpid-ping.cpp0000664000076400007640000000505611405431040017457 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "TestOptions.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/Connection.h" #include "qpid/client/AsyncSession.h" #include "qpid/sys/Time.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Monitor.h" #include "qpid/framing/Uuid.h" #include #include using namespace std; using namespace qpid::sys; using namespace qpid::framing; using namespace qpid::client; using namespace qpid; struct PingOptions : public qpid::TestOptions { int timeout; // Timeout in seconds. bool quiet; // No output PingOptions() : timeout(1), quiet(false) { addOptions() ("timeout,t", optValue(timeout, "SECONDS"), "Max time to wait.") ("quiet,q", optValue(quiet), "Don't print anything to stderr/stdout."); } }; int main(int argc, char** argv) { try { PingOptions opts; opts.parse(argc, argv); opts.con.heartbeat = (opts.timeout+1)/2; Connection connection; opts.open(connection); if (!opts.quiet) cout << "Opened connection." << endl; AsyncSession s = connection.newSession(); string qname(Uuid(true).str()); s.queueDeclare(arg::queue=qname,arg::autoDelete=true,arg::exclusive=true); s.messageTransfer(arg::content=Message("hello", qname)); if (!opts.quiet) cout << "Sent message." << endl; SubscriptionManager subs(s); subs.get(qname); if (!opts.quiet) cout << "Received message." << endl; s.sync(); s.close(); connection.close(); if (!opts.quiet) cout << "Success." << endl; return 0; } catch (const exception& e) { cerr << "Error: " << e.what() << endl; return 1; } } qpidc-0.16/src/tests/sasl_fed_ex_link0000775000076400007640000000153211532765114020312 0ustar00jrossjross00000000000000#! /bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # source ./test_env.sh ${srcdir}/sasl_fed_ex link qpidc-0.16/src/tests/SessionState.cpp0000664000076400007640000002525411732672260020233 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "unit_test.h" #include "qpid/SessionState.h" #include "qpid/Exception.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/SessionFlushBody.h" #include #include #include #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(SessionStateTestSuite) using namespace std; using namespace qpid::framing; // ================================================================ // Utility functions. // Apply f to [begin, end) and accumulate the result template T applyAccumulate(Iter begin, Iter end, T seed, const F& f) { return std::accumulate(begin, end, seed, boost::bind(std::plus(), _1, boost::bind(f, _2))); } // Create a frame with a one-char string. AMQFrame& frame(char s) { static AMQFrame frame((AMQContentBody(string(&s, 1)))); return frame; } // Simple string representation of a frame. string str(const AMQFrame& f) { if (f.getMethod()) return "C"; // Command or Control const AMQContentBody* c = dynamic_cast(f.getBody()); if (c) return c->getData(); // Return data for content frames. return "H"; // Must be a header. } // Make a string from a range of frames. string str(const boost::iterator_range::const_iterator>& frames) { string (*strFrame)(const AMQFrame&) = str; return applyAccumulate(frames.begin(), frames.end(), string(), ptr_fun(strFrame)); } // Make a transfer command frame. AMQFrame transferFrame(bool hasContent) { AMQFrame t((MessageTransferBody())); t.setFirstFrame(true); t.setLastFrame(true); t.setFirstSegment(true); t.setLastSegment(!hasContent); return t; } // Make a content frame AMQFrame contentFrame(string content, bool isLast=true) { AMQFrame f((AMQContentBody(content))); f.setFirstFrame(true); f.setLastFrame(true); f.setFirstSegment(false); f.setLastSegment(isLast); return f; } AMQFrame contentFrameChar(char content, bool isLast=true) { return contentFrame(string(1, content), isLast); } // Send frame & return size of frame. size_t send(qpid::SessionState& s, const AMQFrame& f) { s.senderRecord(f); return f.encodedSize(); } // Send transfer command with no content. size_t transfer0(qpid::SessionState& s) { return send(s, transferFrame(false)); } // Send transfer frame with single content frame. size_t transfer1(qpid::SessionState& s, string content) { return send(s,transferFrame(true)) + send(s,contentFrame(content)); } size_t transfer1Char(qpid::SessionState& s, char content) { return transfer1(s, string(1,content)); } // Send transfer frame with multiple single-byte content frames. size_t transferN(qpid::SessionState& s, string content) { size_t size=send(s, transferFrame(!content.empty())); if (!content.empty()) { char last = content[content.size()-1]; content.resize(content.size()-1); size += applyAccumulate(content.begin(), content.end(), 0, boost::bind(&send, boost::ref(s), boost::bind(contentFrameChar, _1, false))); size += send(s, contentFrameChar(last, true)); } return size; } // Send multiple transfers with single-byte content. size_t transfers(qpid::SessionState& s, string content) { return applyAccumulate(content.begin(), content.end(), 0, boost::bind(transfer1Char, boost::ref(s), _1)); } size_t contentFrameSize(size_t n=1) { return AMQFrame(( AMQContentBody())).encodedSize() + n; } size_t transferFrameSize() { return AMQFrame((MessageTransferBody())).encodedSize(); } // ==== qpid::SessionState test classes using qpid::SessionId; using qpid::SessionPoint; QPID_AUTO_TEST_CASE(testSendGetReplyList) { qpid::SessionState s; s.setTimeout(1); s.senderGetCommandPoint(); transfer1(s, "abc"); transfers(s, "def"); transferN(s, "xyz"); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(0,0))),"CabcCdCeCfCxyz"); // Ignore controls. s.senderRecord(AMQFrame(new SessionFlushBody())); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(2,0))),"CeCfCxyz"); } QPID_AUTO_TEST_CASE(testNeedFlush) { qpid::SessionState::Configuration c; // sync after 2 1-byte transfers or equivalent bytes. c.replayFlushLimit = 2*(transferFrameSize()+contentFrameSize()); qpid::SessionState s(SessionId(), c); s.setTimeout(1); s.senderGetCommandPoint(); transfers(s, "a"); BOOST_CHECK(!s.senderNeedFlush()); transfers(s, "b"); BOOST_CHECK(s.senderNeedFlush()); s.senderRecordFlush(); BOOST_CHECK(!s.senderNeedFlush()); transfers(s, "c"); BOOST_CHECK(!s.senderNeedFlush()); transfers(s, "d"); BOOST_CHECK(s.senderNeedFlush()); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint())), "CaCbCcCd"); } QPID_AUTO_TEST_CASE(testPeerConfirmed) { qpid::SessionState::Configuration c; // sync after 2 1-byte transfers or equivalent bytes. c.replayFlushLimit = 2*(transferFrameSize()+contentFrameSize()); qpid::SessionState s(SessionId(), c); s.setTimeout(1); s.senderGetCommandPoint(); transfers(s, "ab"); BOOST_CHECK(s.senderNeedFlush()); transfers(s, "cd"); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(0,0))), "CaCbCcCd"); s.senderConfirmed(SessionPoint(3)); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(3,0))), "Cd"); BOOST_CHECK(!s.senderNeedFlush()); // Multi-frame transfer. transfer1(s, "efg"); transfers(s, "xy"); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(3,0))), "CdCefgCxCy"); BOOST_CHECK(s.senderNeedFlush()); s.senderConfirmed(SessionPoint(4)); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(4,0))), "CefgCxCy"); BOOST_CHECK(s.senderNeedFlush()); s.senderConfirmed(SessionPoint(5)); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(5,0))), "CxCy"); BOOST_CHECK(s.senderNeedFlush()); s.senderConfirmed(SessionPoint(6)); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(6,0))), "Cy"); BOOST_CHECK(!s.senderNeedFlush()); } QPID_AUTO_TEST_CASE(testPeerCompleted) { qpid::SessionState s; s.setTimeout(1); s.senderGetCommandPoint(); // Completion implies confirmation transfers(s, "abc"); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(0,0))), "CaCbCc"); SequenceSet set(SequenceSet() + 0 + 1); s.senderCompleted(set); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(2,0))), "Cc"); transfers(s, "def"); // We dont do out-of-order confirmation, so this will only confirm up to 3: set = SequenceSet(SequenceSet() + 2 + 3 + 5); s.senderCompleted(set); BOOST_CHECK_EQUAL(str(s.senderExpected(SessionPoint(4,0))), "CeCf"); } QPID_AUTO_TEST_CASE(testReceive) { // Advance expected/received correctly qpid::SessionState s; s.receiverSetCommandPoint(SessionPoint()); BOOST_CHECK_EQUAL(s.receiverGetExpected(), SessionPoint(0)); BOOST_CHECK_EQUAL(s.receiverGetReceived(), SessionPoint(0)); BOOST_CHECK(s.receiverRecord(transferFrame(false))); BOOST_CHECK_EQUAL(s.receiverGetExpected(), SessionPoint(1)); BOOST_CHECK_EQUAL(s.receiverGetReceived(), SessionPoint(1)); BOOST_CHECK(s.receiverRecord(transferFrame(true))); SessionPoint point = SessionPoint(1, transferFrameSize()); BOOST_CHECK_EQUAL(s.receiverGetExpected(), point); BOOST_CHECK_EQUAL(s.receiverGetReceived(), point); BOOST_CHECK(s.receiverRecord(contentFrame("", false))); point.offset += contentFrameSize(0); BOOST_CHECK_EQUAL(s.receiverGetExpected(), point); BOOST_CHECK_EQUAL(s.receiverGetReceived(), point); BOOST_CHECK(s.receiverRecord(contentFrame("", true))); BOOST_CHECK_EQUAL(s.receiverGetExpected(), SessionPoint(2)); BOOST_CHECK_EQUAL(s.receiverGetReceived(), SessionPoint(2)); // Idempotence barrier, rewind expected & receive some duplicates. s.receiverSetCommandPoint(SessionPoint(1)); BOOST_CHECK(!s.receiverRecord(transferFrame(false))); BOOST_CHECK_EQUAL(s.receiverGetExpected(), SessionPoint(2)); BOOST_CHECK_EQUAL(s.receiverGetReceived(), SessionPoint(2)); BOOST_CHECK(s.receiverRecord(transferFrame(false))); BOOST_CHECK_EQUAL(s.receiverGetExpected(), SessionPoint(3)); BOOST_CHECK_EQUAL(s.receiverGetReceived(), SessionPoint(3)); } QPID_AUTO_TEST_CASE(testCompleted) { // completed & unknownCompleted qpid::SessionState s; s.receiverSetCommandPoint(SessionPoint()); s.receiverRecord(transferFrame(false)); s.receiverRecord(transferFrame(false)); s.receiverRecord(transferFrame(false)); s.receiverCompleted(1); BOOST_CHECK_EQUAL(s.receiverGetUnknownComplete(), SequenceSet(SequenceSet()+1)); s.receiverCompleted(0); BOOST_CHECK_EQUAL(s.receiverGetUnknownComplete(), SequenceSet(SequenceSet() + qpid::Range(0,2))); s.receiverKnownCompleted(SequenceSet(SequenceSet()+1)); BOOST_CHECK_EQUAL(s.receiverGetUnknownComplete(), SequenceSet(SequenceSet()+2)); // TODO aconway 2008-04-30: missing tests for known-completed. } QPID_AUTO_TEST_CASE(testNeedKnownCompleted) { size_t flushInterval= 2*(transferFrameSize()+contentFrameSize())+1; qpid::SessionState::Configuration c(flushInterval); qpid::SessionState s(qpid::SessionId(), c); s.senderGetCommandPoint(); transfers(s, "a"); SequenceSet set(SequenceSet() + 0); s.senderCompleted(set); BOOST_CHECK(!s.senderNeedKnownCompleted()); transfers(s, "b"); set += 1; s.senderCompleted(set); BOOST_CHECK(!s.senderNeedKnownCompleted()); transfers(s, "c"); set += 2; s.senderCompleted(set); BOOST_CHECK(s.senderNeedKnownCompleted()); s.senderRecordKnownCompleted(); BOOST_CHECK(!s.senderNeedKnownCompleted()); transfers(s, "de"); set += 3; set += 4; s.senderCompleted(set); BOOST_CHECK(!s.senderNeedKnownCompleted()); transfers(s, "f"); set += 2; s.senderCompleted(set); BOOST_CHECK(s.senderNeedKnownCompleted()); s.senderRecordKnownCompleted(); BOOST_CHECK(!s.senderNeedKnownCompleted()); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/ClusterFixture.h0000664000076400007640000000656611426033270020241 0ustar00jrossjross00000000000000#ifndef CLUSTER_FIXTURE_H #define CLUSTER_FIXTURE_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "test_tools.h" #include "unit_test.h" #include "ForkedBroker.h" #include "BrokerFixture.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionAccess.h" #include "qpid/client/Session.h" #include "qpid/client/FailoverListener.h" #include "qpid/cluster/Cluster.h" #include "qpid/cluster/Cpg.h" #include "qpid/cluster/UpdateClient.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/Uuid.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/enum.h" #include "qpid/log/Logger.h" #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace qpid; using namespace qpid::cluster; using namespace qpid::framing; using namespace qpid::client; using qpid::sys::TIME_SEC; using qpid::broker::Broker; using boost::shared_ptr; using qpid::cluster::Cluster; namespace qpid { namespace tests { /** Cluster fixture is a vector of ports for the replicas. * * At most one replica (by default replica 0) is in the current * process, all others are forked as children. */ class ClusterFixture : public vector { public: typedef std::vector Args; /** @param localIndex can be -1 meaning don't automatically start a local broker. * A local broker can be started with addLocal(). */ ClusterFixture(size_t n, const Args& args, int localIndex=-1); /**@param updateArgs function is passed the index of the cluster member and can update the arguments. */ ClusterFixture(size_t n, boost::function updateArgs, int localIndex=-1); void add(size_t n) { for (size_t i=0; i < n; ++i) add(); } void add(); // Add a broker. void setup(); bool hasLocal() const; /** Kill a forked broker with sig, or shutdown localBroker. */ void kill(size_t n, int sig=SIGINT); /** Kill a broker and suppress errors from closing connection c. */ void killWithSilencer(size_t n, client::Connection& c, int sig=SIGINT); private: void addLocal(); // Add a local broker. Args makeArgs(const std::string& prefix, size_t index); string name; std::auto_ptr localBroker; int localIndex; std::vector > forkedBrokers; Args userArgs; boost::function updateArgs; }; /** * Get the known broker ports from a Connection. *@param n if specified wait for the cluster size to be n, up to a timeout. */ std::set knownBrokerPorts(qpid::client::Connection& source, int n=-1); }} // namespace qpid::tests #endif /*!CLUSTER_FIXTURE_H*/ qpidc-0.16/src/tests/BrokerOptions.cpp0000664000076400007640000000457111645350603020403 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /** Unit tests for various broker configuration options **/ #include "unit_test.h" #include "test_tools.h" #include "MessagingFixture.h" #include "qpid/messaging/Address.h" #include "qpid/messaging/Connection.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Session.h" namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(BrokerOptionsTestSuite) using namespace qpid::broker; using namespace qpid::messaging; using namespace qpid::types; using namespace qpid; QPID_AUTO_TEST_CASE(testDisabledTimestamp) { // by default, there should be no timestamp added by the broker MessagingFixture fix; Sender sender = fix.session.createSender("test-q; {create:always, delete:sender}"); messaging::Message msg("hi"); sender.send(msg); Receiver receiver = fix.session.createReceiver("test-q"); messaging::Message in; BOOST_CHECK(receiver.fetch(in, Duration::IMMEDIATE)); Variant::Map props = in.getProperties(); BOOST_CHECK(props.find("x-amqp-0-10.timestamp") == props.end()); } QPID_AUTO_TEST_CASE(testEnabledTimestamp) { // when enabled, the 0.10 timestamp is added by the broker Broker::Options opts; opts.timestampRcvMsgs = true; MessagingFixture fix(opts, true); Sender sender = fix.session.createSender("test-q; {create:always, delete:sender}"); messaging::Message msg("one"); sender.send(msg); Receiver receiver = fix.session.createReceiver("test-q"); messaging::Message in; BOOST_CHECK(receiver.fetch(in, Duration::IMMEDIATE)); Variant::Map props = in.getProperties(); BOOST_CHECK(props.find("x-amqp-0-10.timestamp") != props.end()); BOOST_CHECK(props["x-amqp-0-10.timestamp"]); } QPID_AUTO_TEST_SUITE_END() }} qpidc-0.16/src/tests/FramingTest.cpp0000664000076400007640000001145511462366100020021 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Connection.h" #include "qpid/client/Connector.h" #include "qpid/framing/AMQP_HighestVersion.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/framing/all_method_bodies.h" #include "qpid/framing/amqp_framing.h" #include "qpid/framing/reply_exceptions.h" #include "unit_test.h" #include #include #include #include #include #include using namespace qpid; using namespace qpid::framing; using namespace std; namespace qpid { namespace tests { template std::string tostring(const T& x) { std::ostringstream out; out << x; return out.str(); } QPID_AUTO_TEST_SUITE(FramingTestSuite) QPID_AUTO_TEST_CASE(testMessageTransferBody) { char buffer[1024]; ProtocolVersion version(highestProtocolVersion); Buffer wbuff(buffer, sizeof(buffer)); MessageTransferBody in(version, "my-exchange", 1, 1); in.encode(wbuff); Buffer rbuff(buffer, sizeof(buffer)); MessageTransferBody out(version); out.decode(rbuff); BOOST_CHECK_EQUAL(tostring(in), tostring(out)); } QPID_AUTO_TEST_CASE(testConnectionSecureBody) { char buffer[1024]; ProtocolVersion version(highestProtocolVersion); Buffer wbuff(buffer, sizeof(buffer)); std::string s = "security credential"; ConnectionSecureBody in(version, s); in.encode(wbuff); Buffer rbuff(buffer, sizeof(buffer)); ConnectionSecureBody out(version); out.decode(rbuff); BOOST_CHECK_EQUAL(tostring(in), tostring(out)); } QPID_AUTO_TEST_CASE(testConnectionRedirectBody) { char buffer[1024]; ProtocolVersion version(highestProtocolVersion); Buffer wbuff(buffer, sizeof(buffer)); std::string a = "hostA"; std::string b = "hostB"; Array hosts(0x95); hosts.add(boost::shared_ptr(new Str16Value(a))); hosts.add(boost::shared_ptr(new Str16Value(b))); ConnectionRedirectBody in(version, a, hosts); in.encode(wbuff); Buffer rbuff(buffer, sizeof(buffer)); ConnectionRedirectBody out(version); out.decode(rbuff); BOOST_CHECK_EQUAL(tostring(in), tostring(out)); } QPID_AUTO_TEST_CASE(testQueueDeclareBody) { char buffer[1024]; ProtocolVersion version(highestProtocolVersion); Buffer wbuff(buffer, sizeof(buffer)); QueueDeclareBody in(version, "name", "dlq", true, false, true, false, FieldTable()); in.encode(wbuff); Buffer rbuff(buffer, sizeof(buffer)); QueueDeclareBody out(version); out.decode(rbuff); BOOST_CHECK_EQUAL(tostring(in), tostring(out)); } QPID_AUTO_TEST_CASE(testConnectionRedirectBodyFrame) { char buffer[1024]; ProtocolVersion version(highestProtocolVersion); Buffer wbuff(buffer, sizeof(buffer)); std::string a = "hostA"; std::string b = "hostB"; Array hosts(0x95); hosts.add(boost::shared_ptr(new Str16Value(a))); hosts.add(boost::shared_ptr(new Str16Value(b))); AMQFrame in((ConnectionRedirectBody(version, a, hosts))); in.setChannel(999); in.encode(wbuff); Buffer rbuff(buffer, sizeof(buffer)); AMQFrame out; out.decode(rbuff); BOOST_CHECK_EQUAL(tostring(in), tostring(out)); } QPID_AUTO_TEST_CASE(testMessageCancelBodyFrame) { char buffer[1024]; ProtocolVersion version(highestProtocolVersion); Buffer wbuff(buffer, sizeof(buffer)); AMQFrame in((MessageCancelBody(version, "tag"))); in.setChannel(999); in.encode(wbuff); Buffer rbuff(buffer, sizeof(buffer)); AMQFrame out; out.decode(rbuff); BOOST_CHECK_EQUAL(tostring(in), tostring(out)); } QPID_AUTO_TEST_CASE(badStrings) { char data[(65535 + 2) + (255 + 1)]; Buffer b(data, sizeof(data)); BOOST_CHECK_THROW(b.putShortString(std::string(256, 'X')), Exception); BOOST_CHECK_THROW(b.putMediumString(std::string(65536, 'X')), Exception); b.putShortString(std::string(255, 'X')); b.putMediumString(std::string(65535, 'X')); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/run_msg_group_tests0000775000076400007640000000666411721215323021134 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # #script to run a sequence of message group queue tests via make #setup path to find qpid-config and msg_group_test progs source ./test_env.sh test -d $PYTHON_DIR || { echo "Skipping message group tests, no python dir."; exit 0; } export PATH=$PWD:$srcdir:$PYTHON_COMMANDS:$PATH #set port to connect to via env var test -s qpidd.port && QPID_PORT=`cat qpidd.port` #trap cleanup INT TERM QUIT QUEUE_NAME="group-queue" GROUP_KEY="My-Group-Id" BROKER_URL="${QPID_BROKER:-localhost}:${QPID_PORT:-5672}" run_test() { $@ } ##set -x declare -i i=0 declare -a tests tests=("qpid-config -b $BROKER_URL add queue $QUEUE_NAME --group-header=${GROUP_KEY} --shared-groups" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 103 --group-size 13 --receivers 2 --senders 3 --capacity 3 --ack-frequency 7 --randomize-group-size --interleave 3" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 103 --group-size 13 --receivers 2 --senders 3 --capacity 7 --ack-frequency 7 --randomize-group-size" "qpid-config -b $BROKER_URL add queue ${QUEUE_NAME}-two --group-header=${GROUP_KEY} --shared-groups" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 103 --group-size 13 --receivers 2 --senders 3 --capacity 7 --ack-frequency 3 --randomize-group-size" "msg_group_test -b $BROKER_URL -a ${QUEUE_NAME}-two --group-key $GROUP_KEY --messages 103 --group-size 13 --receivers 2 --senders 3 --capacity 3 --ack-frequency 7 --randomize-group-size --interleave 5" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 59 --group-size 5 --receivers 2 --senders 3 --capacity 1 --ack-frequency 3 --randomize-group-size" "qpid-config -b $BROKER_URL del queue ${QUEUE_NAME}-two --force" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 59 --group-size 3 --receivers 2 --senders 3 --capacity 1 --ack-frequency 1 --randomize-group-size" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 211 --group-size 13 --receivers 2 --senders 3 --capacity 47 --ack-frequency 79 --interleave 53" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 10000 --group-size 1 --receivers 0 --senders 1" "msg_group_test -b $BROKER_URL -a $QUEUE_NAME --group-key $GROUP_KEY --messages 10000 --receivers 5 --senders 0" "qpid-config -b $BROKER_URL del queue $QUEUE_NAME --force") while [ -n "${tests[i]}" ]; do run_test ${tests[i]} RETCODE=$? if test x$RETCODE != x0; then echo "FAILED message group test. Failed command: \"${tests[i]}\""; exit 1; fi i+=1 done qpidc-0.16/src/tests/txjob.cpp0000664000076400007640000000672311252003060016714 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "TestOptions.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/FailoverManager.h" #include "qpid/client/Message.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/sys/Thread.h" using namespace qpid::client; using namespace qpid::sys; namespace qpid { namespace tests { struct Args : public qpid::TestOptions { string workQueue; string source; string dest; uint messages; uint jobs; bool quit; bool declareQueues; Args() : workQueue("txshift-control"), source("txshift-1"), dest("txshift-2"), messages(0), jobs(0), quit(false), declareQueues(false) { addOptions() ("messages", qpid::optValue(messages, "N"), "Number of messages to shift") ("jobs", qpid::optValue(jobs, "N"), "Number of shift jobs to request") ("source", qpid::optValue(source, "QUEUE NAME"), "source queue from which messages will be shifted") ("dest", qpid::optValue(dest, "QUEUE NAME"), "dest queue to which messages will be shifted") ("work-queue", qpid::optValue(workQueue, "QUEUE NAME"), "work queue from which to take instructions") ("add-quit", qpid::optValue(quit), "add a 'quit' instruction to the queue (after any other jobs)") ("declare-queues", qpid::optValue(declareQueues), "issue a declare for all queues"); } }; }} // namespace qpid::tests using namespace qpid::tests; //TODO: might be nice to make this capable of failover as well at some //point; for now its just for the setup phase. int main(int argc, char** argv) { Args opts; try { opts.parse(argc, argv); Connection connection; connection.open(opts.con); Session session = connection.newSession(); if (opts.declareQueues) { session.queueDeclare(arg::queue=opts.workQueue); session.queueDeclare(arg::queue=opts.source); session.queueDeclare(arg::queue=opts.dest); } for (uint i = 0; i < opts.jobs; ++i) { Message job("transfer", opts.workQueue); job.getHeaders().setString("src", opts.source); job.getHeaders().setString("dest", opts.dest); job.getHeaders().setInt("count", opts.messages); async(session).messageTransfer(arg::content=job); } if (opts.quit) { async(session).messageTransfer(arg::content=Message("quit", opts.workQueue)); } session.sync(); session.close(); return 0; } catch(const std::exception& e) { std::cout << e.what() << std::endl; return 1; } } qpidc-0.16/src/tests/DeliveryRecordTest.cpp0000664000076400007640000000376111717465066021377 0ustar00jrossjross00000000000000 /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/DeliveryRecord.h" #include "qpid/broker/Queue.h" #include "unit_test.h" #include #include #include using namespace qpid::broker; using namespace qpid::sys; using namespace qpid::framing; using boost::dynamic_pointer_cast; using std::list; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(DeliveryRecordTestSuite) QPID_AUTO_TEST_CASE(testSort) { list ids; ids.push_back(SequenceNumber(6)); ids.push_back(SequenceNumber(2)); ids.push_back(SequenceNumber(4)); ids.push_back(SequenceNumber(5)); ids.push_back(SequenceNumber(1)); ids.push_back(SequenceNumber(3)); list records; for (list::iterator i = ids.begin(); i != ids.end(); i++) { DeliveryRecord r(QueuedMessage(0), Queue::shared_ptr(), "tag", Consumer::shared_ptr(), false, false, false); r.setId(*i); records.push_back(r); } records.sort(); SequenceNumber expected(0); for (list::iterator i = records.begin(); i != records.end(); i++) { BOOST_CHECK(i->getId() == ++expected); } } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/FrameDecoder.cpp0000664000076400007640000000417511252003060020105 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "unit_test.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/FrameDecoder.h" #include "qpid/framing/AMQContentBody.h" #include "qpid/framing/Buffer.h" #include namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(FrameDecoderTest) using namespace std; using namespace qpid::framing; string makeData(int size) { string data; data.resize(size); for (int i =0; i < size; ++i) data[i] = 'a' + (i%26); return data; } string encodeFrame(string data) { AMQFrame f((AMQContentBody(data))); string encoded; encoded.resize(f.encodedSize()); Buffer b(&encoded[0], encoded.size()); f.encode(b); return encoded; } string getData(const AMQFrame& frame) { const AMQContentBody* content = dynamic_cast(frame.getBody()); BOOST_CHECK(content); return content->getData(); } QPID_AUTO_TEST_CASE(testByteFragments) { string data = makeData(42); string encoded = encodeFrame(data); FrameDecoder decoder; for (size_t i = 0; i < encoded.size()-1; ++i) { Buffer buf(&encoded[i], 1); BOOST_CHECK(!decoder.decode(buf)); } Buffer buf(&encoded[encoded.size()-1], 1); BOOST_CHECK(decoder.decode(buf)); BOOST_CHECK_EQUAL(data, getData(decoder.getFrame())); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/testlib.py0000664000076400007640000010655411721215323017115 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Support library for qpid python tests. # import os, re, signal, subprocess, time, unittest class TestBase(unittest.TestCase): """ Base class for qpid tests. Provides broker start/stop/kill methods """ """ The following environment vars control if and how the test is run, and determine where many of the helper executables/libs are to be found. """ _storeLib = os.getenv("STORE_LIB") _storeEnable = _storeLib != None # Must be True for durability to be enabled during the test _qpiddExec = os.getenv("QPIDD_EXEC", "/usr/sbin/qpidd") _tempStoreDir = os.path.abspath(os.getenv("TMP_DATA_DIR", "/tmp/qpid")) """Global message counter ensures unique messages""" _msgCnt = 0 # --- Helper functions for parameter handling --- def _paramBool(self, key, val, keyOnly = False): if val == None: return "" if keyOnly: if val: return " --%s" % key else: return "" else: if val: return " --%s yes" % key else: return " --%s no" % key # --- Helper functions for message creation --- def _makeMessage(self, msgSize): msg = "Message-%04d" % self._msgCnt self._msgCnt = self._msgCnt + 1 msgLen = len(msg) if msgSize > msgLen: for i in range(msgLen, msgSize): if i == msgLen: msg += "-" else: msg += chr(ord('a') + (i % 26)) return msg def _makeMessageList(self, numMsgs, msgSize): if msgSize == None: msgSize = 12 msgs = "" for m in range(0, numMsgs): msgs += "%s\n" % self._makeMessage(msgSize) return msgs # --- Starting and stopping a broker --- def startBroker(self, qpiddArgs, logFile = None): """Start a single broker daemon, returns tuple (pid, port)""" if self._qpiddExec == None: raise Exception("Environment variable QPIDD is not set") cmd = "%s --daemon --port=0 %s" % (self._qpiddExec, qpiddArgs) portStr = os.popen(cmd).read() if len(portStr) == 0: err = "Broker daemon startup failed." if logFile != None: err += " See log file %s" % logFile raise Exception(err) port = int(portStr) pidStr = os.popen("%s -p %d -c" % (self._qpiddExec, port)).read() try: pid = int(pidStr) except: raise Exception("Unable to get pid: \"%s -p %d -c\" returned %s" % (self._qpiddExec, port, pidStr)) #print "started broker: pid=%d, port=%d args: %s" % (pid, port, qpiddArgs) return (pid, port) def killBroker(self, nodeTuple, ignoreFailures = False): """Kill a broker using kill -9""" try: os.kill(nodeTuple[self.PID], signal.SIGKILL) try: os.waitpid(nodeTuple[self.PID], 0) except: pass #print "killed broker: port=%d pid=%d" % (nodeTuple[self.PORT], nodeTuple[self.PID]) except: if ignoreFailures: print "WARNING: killBroker (port=%d pid=%d) failed - ignoring." % (nodeTuple[self.PORT], nodeTuple[self.PID]) else: raise def stopBroker(self, nodeTuple, ignoreFailures = False): """Stop a broker using qpidd -q""" try: ret = os.spawnl(os.P_WAIT, self._qpiddExec, self._qpiddExec, "--port=%d" % nodeTuple[self.PORT], "--quit", "--no-module-dir") if ret != 0: raise Exception("stopBroker(): port=%d: qpidd -q returned %d" % (nodeTuple[self.PORT], ret)) try: os.waitpid(nodeTuple[self.PID], 0) except: pass #print "stopped broker: port=%d pid=%d" % (nodeTuple[self.PORT], nodeTuple[self.PID]) except: if ignoreFailures: print "WARNING: stopBroker (port=%d pid=%d) failed - ignoring." % (nodeTuple[self.PORT], nodeTuple[self.PID]) else: raise class TestBaseCluster(TestBase): """ Base class for cluster tests. Provides methods for starting and stopping clusters and cluster nodes. """ """ The following environment vars control if and how the test is run, and determine where many of the helper executables/libs are to be found. """ _clusterLib = os.getenv("CLUSTER_LIB") _clusterTestEnable = _clusterLib != None # Must be True for these cluster tests to run _xmlLib = os.getenv("XML_LIB") _xmlEnable = _xmlLib != None _qpidConfigExec = os.getenv("QPID_CONFIG_EXEC", "/usr/bin/qpid-config") _qpidRouteExec = os.getenv("QPID_ROUTE_EXEC", "/usr/bin/qpid-route") _receiverExec = os.getenv("RECEIVER_EXEC", "/usr/libexec/qpid/test/receiver") _senderExec = os.getenv("SENDER_EXEC", "/usr/libexec/qpid/test/sender") """ _clusterDict is a dictionary of clusters: key = cluster name (string) val = dictionary of node numbers: key = integer node number val = tuple containing (pid, port) For example, two clusters "TestCluster0" and "TestCluster1" containing several nodes would look as follows: {"TestCluster0": {0: (pid0-0, port0-0), 1: (pid0-1, port0-1), ...}, "TestCluster1": {0: (pid1-0, port1-0), 1: (pid1-1, port1-1), ...}} where pidm-n and portm-n are the int pid and port for TestCluster m node n respectively. """ _clusterDict = {} """Index for (pid, port) tuple""" PID = 0 PORT = 1 def run(self, res): """ Skip cluster testing if env var RUN_CLUSTER_TESTS is not defined.""" if not self._clusterTestEnable: return unittest.TestCase.run(self, res) # --- Private helper / convenience functions --- def _checkPids(self, clusterName = None): for pid, port in self.getTupleList(): try: os.kill(pid, 0) except: raise Exception("_checkPids(): Broker with pid %d expected but does not exist! (crashed?)" % pid) # --- Starting cluster node(s) --- def createClusterNode(self, nodeNumber, clusterName): """Create a node and add it to the named cluster""" if self._tempStoreDir == None: raise Exception("Environment variable TMP_DATA_DIR is not set") if self._clusterLib == None: raise Exception("Environment variable LIBCLUSTER is not set") name = "%s-%d" % (clusterName, nodeNumber) dataDir = os.path.join(self._tempStoreDir, "cluster", name) logFile = "%s.log" % dataDir args = "--no-module-dir --load-module=%s --data-dir=%s --cluster-name=%s --auth=no --log-enable=notice+ --log-to-file=%s" % \ (self._clusterLib, dataDir, clusterName, logFile) if self._storeEnable: if self._storeLib == None: raise Exception("Environment variable LIBSTORE is not set") args += " --load-module %s" % self._storeLib self._clusterDict[clusterName][nodeNumber] = self.startBroker(args, logFile) def createCluster(self, clusterName, numberNodes = 0): """Create a cluster containing an initial number of nodes""" self._clusterDict[clusterName] = {} for n in range(0, numberNodes): self.createClusterNode(n, clusterName) def waitForNodes(self, clusterName): """Wait for all nodes to become active (ie finish cluster sync)""" # TODO - connect to each known node in cluster # Until this is done, wait a bit (hack) time.sleep(1) # --- Cluster and node status --- def getTupleList(self, clusterName = None): """Get list of (pid, port) tuples of all known cluster brokers""" tList = [] for c, l in self._clusterDict.iteritems(): if clusterName == None or c == clusterName: for t in l.itervalues(): tList.append(t) return tList def getNumBrokers(self): """Get total number of brokers in all known clusters""" return len(self.getTupleList()) def checkNumBrokers(self, expected = None, checkPids = True): """Check that the total number of brokers in all known clusters is the expected value""" if expected != None and self.getNumBrokers() != expected: raise Exception("Unexpected number of brokers: expected %d, found %d" % (expected, self.getNumBrokers())) if checkPids: self._checkPids() def getClusterTupleList(self, clusterName): """Get list of (pid, port) tuples of all nodes in named cluster""" if clusterName in self._clusterDict: return self._clusterDict[clusterName].values() return [] def getNumClusterBrokers(self, clusterName): """Get total number of brokers in named cluster""" return len(self.getClusterTupleList(clusterName)) def getNodeTuple(self, nodeNumber, clusterName): """Get the (pid, port) tuple for the given cluster node""" return self._clusterDict[clusterName][nodeNumber] def checkNumClusterBrokers(self, clusterName, expected = None, checkPids = True, waitForNodes = True): """Check that the total number of brokers in the named cluster is the expected value""" if expected != None and self.getNumClusterBrokers(clusterName) != expected: raise Exception("Unexpected number of brokers in cluster %s: expected %d, found %d" % \ (clusterName, expected, self.getNumClusterBrokers(clusterName))) if checkPids: self._checkPids(clusterName) if waitForNodes: self.waitForNodes(clusterName) def clusterExists(self, clusterName): """ Return True if clusterName exists, False otherwise""" return clusterName in self._clusterDict.keys() def clusterNodeExists(self, clusterName, nodeNumber): """ Return True if nodeNumber in clusterName exists, False otherwise""" if clusterName in self._clusterDict.keys(): return nodeNumber in self._clusterDict[nodeName] return False def createCheckCluster(self, clusterName, size): """Create a cluster using the given name and size, then check the number of brokers""" self.createCluster(clusterName, size) self.checkNumClusterBrokers(clusterName, size) # --- Kill cluster nodes using signal 9 --- def killNode(self, nodeNumber, clusterName, updateDict = True, ignoreFailures = False): """Kill the given node in the named cluster using kill -9""" self.killBroker(self.getNodeTuple(nodeNumber, clusterName), ignoreFailures) if updateDict: del(self._clusterDict[clusterName][nodeNumber]) def killCluster(self, clusterName, updateDict = True, ignoreFailures = False): """Kill all nodes in the named cluster""" for n in self._clusterDict[clusterName].iterkeys(): self.killNode(n, clusterName, False, ignoreFailures) if updateDict: del(self._clusterDict[clusterName]) def killClusterCheck(self, clusterName): """Kill the named cluster and check that the name is removed from the cluster dictionary""" self.killCluster(clusterName) if self.clusterExists(clusterName): raise Exception("Unable to kill cluster %s; %d nodes still exist" % \ (clusterName, self.getNumClusterBrokers(clusterName))) def killAllClusters(self, ignoreFailures = False): """Kill all known clusters""" for n in self._clusterDict.iterkeys(): self.killCluster(n, False, ignoreFailures) self._clusterDict.clear() def killAllClustersCheck(self, ignoreFailures = False): """Kill all known clusters and check that the cluster dictionary is empty""" self.killAllClusters(ignoreFailures) self.checkNumBrokers(0) # --- Stop cluster nodes using qpidd -q --- def stopNode(self, nodeNumber, clusterName, updateDict = True, ignoreFailures = False): """Stop the given node in the named cluster using qpidd -q""" self.stopBroker(self.getNodeTuple(nodeNumber, clusterName), ignoreFailures) if updateDict: del(self._clusterDict[clusterName][nodeNumber]) def stopAllClusters(self, ignoreFailures = False): """Stop all known clusters""" for n in self._clusterDict.iterkeys(): self.stopCluster(n, False, ignoreFailures) self._clusterDict.clear() def stopCluster(self, clusterName, updateDict = True, ignoreFailures = False): """Stop all nodes in the named cluster""" for n in self._clusterDict[clusterName].iterkeys(): self.stopNode(n, clusterName, False, ignoreFailures) if updateDict: del(self._clusterDict[clusterName]) def stopCheckCluster(self, clusterName, ignoreFailures = False): """Stop the named cluster and check that the name is removed from the cluster dictionary""" self.stopCluster(clusterName, True, ignoreFailures) if self.clusterExists(clusterName): raise Exception("Unable to kill cluster %s; %d nodes still exist" % (clusterName, self.getNumClusterBrokers(clusterName))) def stopAllCheck(self, ignoreFailures = False): """Kill all known clusters and check that the cluster dictionary is empty""" self.stopAllClusters() self.checkNumBrokers(0) # --- qpid-config functions --- def _qpidConfig(self, nodeNumber, clusterName, action): """Configure some aspect of a qpid broker using the qpid_config executable""" port = self.getNodeTuple(nodeNumber, clusterName)[self.PORT] #print "%s -b localhost:%d %s" % (self._qpidConfigExec, port, action) ret = os.spawnl(os.P_WAIT, self._qpidConfigExec, self._qpidConfigExec, "-b", "localhost:%d" % port, *action.split()) if ret != 0: raise Exception("_qpidConfig(): cluster=\"%s\" nodeNumber=%d port=%d action=\"%s\" returned %d" % \ (clusterName, nodeNumber, port, action, ret)) def addExchange(self, nodeNumber, clusterName, exchangeType, exchangeName, durable = False, sequence = False, \ ive = False): """Add a named exchange.""" action = "add exchange %s %s" % (exchangeType, exchangeName) action += self._paramBool("durable", durable, True) action += self._paramBool("sequence", sequence, True) action += self._paramBool("ive", ive, True) self._qpidConfig(nodeNumber, clusterName, action) def deleteExchange(self, nodeNumber, clusterName, exchangeName): """Delete a named exchange""" self._qpidConfig(nodeNumber, clusterName, "del exchange %s" % exchangeName) def addQueue(self, nodeNumber, clusterName, queueName, configArgs = None): """Add a queue using qpid-config.""" action = "add queue %s" % queueName if self._storeEnable: action += " --durable" if configArgs != None: action += " %s" % configArgs self._qpidConfig(nodeNumber, clusterName, action) def delQueue(self, nodeNumber, clusterName, queueName): """Delete a named queue using qpid-config.""" self._qpidConfig(nodeNumber, clusterName, "del queue %s" % queueName) def bind(self, nodeNumber, clusterName, exchangeName, queueName, key): """Create an exchange-queue binding using qpid-config.""" self._qpidConfig(nodeNumber, clusterName, "bind %s %s %s" % (exchangeName, queueName, key)) def unbind(self, nodeNumber, clusterName, exchangeName, queueName, key): """Remove an exchange-queue binding using qpid-config.""" self._qpidConfig(nodeNumber, clusterName, "unbind %s %s %s" % (exchangeName, queueName, key)) # --- qpid-route functions (federation) --- def brokerDict(self, nodeNumber, clusterName, host = "localhost", user = None, password = None): """Returns a dictionary containing the broker info to be passed to route functions""" port = self.getNodeTuple(nodeNumber, clusterName)[self.PORT] return {"cluster": clusterName, "node":nodeNumber, "port":port, "host":host, "user":user, "password":password} def _brokerStr(self, brokerDict): """Set up a broker string in the format [user/password@]host:port""" str = "" if brokerDict["user"] !=None and brokerDict["password"] != None: str = "%s@%s" % (brokerDict["user"], brokerDict["password"]) str += "%s:%d" % (brokerDict["host"], brokerDict["port"]) return str def _qpidRoute(self, action): """Set up a route using qpid-route""" #print "%s %s" % (self._qpidRouteExec, action) ret = os.spawnl(os.P_WAIT, self._qpidRouteExec, self._qpidRouteExec, *action.split()) if ret != 0: raise Exception("_qpidRoute(): action=\"%s\" returned %d" % (action, ret)) def routeDynamicAdd(self, destBrokerDict, srcBrokerDict, exchangeName): self._qpidRoute("dynamic add %s %s %s" % (self._brokerStr(destBrokerDict), self._brokerStr(srcBrokerDict), exchangeName)) def routeDynamicDelete(self, destBrokerDict, srcBrokerDict, exchangeName): self._qpidRoute("dynamic del %s %s %s" % (self._brokerStr(destBrokerDict), self._brokerStr(srcBrokerDict), exchangeName)) def routeAdd(self, destBrokerDict, srcBrokerDict, exchangeName, routingKey): self._qpidRoute("route add %s %s %s %s" % (self._brokerStr(destBrokerDict), self._brokerStr(srcBrokerDict), exchangeName, routingKey)) def routeDelete(self, destBrokerDict, srcBrokerDict, exchangeName, routingKey): self._qpidRoute("route del %s %s %s %s" % (self._brokerStr(destBrokerDict), self._brokerStr(srcBrokerDict), exchangeName, routingKey)) def routeQueueAdd(self, destBrokerDict, srcBrokerDict, exchangeName, queueName): self._qpidRoute("queue add %s %s %s %s" % (self._brokerStr(destBrokerDict), self._brokerStr(srcBrokerDict), exchangeName, queueName)) def routeQueueDelete(self, destBrokerDict, srcBrokerDict, exchangeName, queueName): self._qpidRoute("queue del %s %s %s %s" % (self._brokerStr(destBrokerDict), self._brokerStr(srcBrokerDict), exchangeName, queueName)) def routeLinkAdd(self, destBrokerDict, srcBrokerDict): self._qpidRoute("link add %s %s" % (self._brokerStr(destBrokerDict), self._brokerStr(srcBrokerDict))) def routeLinkDelete(self, destBrokerDict, srcBrokerDict): self._qpidRoute("link del %s %s" % (self._brokerStr(destBrokerDict), self._brokerStr(srcBrokerDict))) # --- Message send and receive functions --- def _receiver(self, action): if self._receiverExec == None: raise Exception("Environment variable RECEIVER is not set") cmd = "%s %s" % (self._receiverExec, action) #print cmd return subprocess.Popen(cmd.split(), stdout = subprocess.PIPE) def _sender(self, action): if self._senderExec == None: raise Exception("Environment variable SENDER is not set") cmd = "%s %s" % (self._senderExec, action) #print cmd return subprocess.Popen(cmd.split(), stdin = subprocess.PIPE) def createReciever(self, nodeNumber, clusterName, queueName, numMsgs = None, receiverArgs = None): port = self.getNodeTuple(nodeNumber, clusterName)[self.PORT] action = "--port %d --queue %s" % (port, queueName) if numMsgs != None: action += " --messages %d" % numMsgs if receiverArgs != None: action += " %s" % receiverArgs return self._receiver(action) def createSender(self, nodeNumber, clusterName, exchangeName, routingKey, senderArgs = None): port = self.getNodeTuple(nodeNumber, clusterName)[self.PORT] action = "--port %d --exchange %s" % (port, exchangeName) if routingKey != None and len(routingKey) > 0: action += " --routing-key %s" % routingKey if self._storeEnable: action += " --durable yes" if senderArgs != None: action += " %s" % senderArgs return self._sender(action) def createBindDirectExchangeQueue(self, nodeNumber, clusterName, exchangeName, queueName): self.addExchange(nodeNumber, clusterName, "direct", exchangeName) self.addQueue(nodeNumber, clusterName, queueName) self.bind(nodeNumber, clusterName, exchangeName, queueName, queueName) def createBindTopicExchangeQueues(self, nodeNumber, clusterName, exchangeName, queueNameKeyList): self.addExchange(nodeNumber, clusterName, "topic", exchangeName) for queueName, key in queueNameKeyList.iteritems(): self.addQueue(nodeNumber, clusterName, queueName) self.bind(nodeNumber, clusterName, exchangeName, queueName, key) def createBindFanoutExchangeQueues(self, nodeNumber, clusterName, exchangeName, queueNameList): self.addExchange(nodeNumber, clusterName, "fanout", exchangeName) for queueName in queueNameList: self.addQueue(nodeNumber, clusterName, queueName) self.bind(nodeNumber, clusterName, exchangeName, queueName, "") def sendMsgs(self, nodeNumber, clusterName, exchangeName, routingKey, numMsgs, msgSize = None, wait = True): msgs = self._makeMessageList(numMsgs, msgSize) sender = self.createSender(nodeNumber, clusterName, exchangeName, routingKey) sender.stdin.write(msgs) sender.stdin.close() if wait: sender.wait() return msgs def receiveMsgs(self, nodeNumber, clusterName, queueName, numMsgs, wait = True): receiver = self.createReciever(nodeNumber, clusterName, queueName, numMsgs) cnt = 0 msgs = "" while cnt < numMsgs: rx = receiver.stdout.readline() if rx == "" and receiver.poll() != None: break msgs += rx cnt = cnt + 1 if wait: receiver.wait() return msgs # --- Exchange-specific helper inner classes --- class TestHelper: """ This is a "virtual" superclass for test helpers, and is not useful on its own, but the per-exchange subclasses are designed to keep track of the messages sent to and received from queues which have bindings to that exchange type. """ def __init__(self, testBaseCluster, clusterName, numNodes, exchangeName, queueNameList): """Dictionary of queues and lists of messages sent to them.""" self._txMsgs = {} """Dictionary of queues and lists of messages received from them.""" self._rxMsgs = {} """List of node numbers currently in the cluster""" self._nodes = [] """List of node numbers which have been killed and can therefore be recovered""" self._deadNodes = [] """Last node to be used""" self._lastNode = None self._testBaseCluster = testBaseCluster self._clusterName = clusterName self._exchangeName = exchangeName self._queueNameList = queueNameList self._addQueues(queueNameList) self._testBaseCluster.createCheckCluster(clusterName, numNodes) self._nodes.extend(range(0, numNodes)) def _addQueues(self, queueNameList): for qn in queueNameList: if not qn in self._txMsgs: self._txMsgs[qn] = [] if not qn in self._rxMsgs: self._rxMsgs[qn] = [] def _bindQueue(self, queueName, bindingKey, nodeNumber = None): """Bind a queue to an exchange using a binding key.""" if nodeNumber == None: nodeNumber = self._nodes[0] # first available node self._testBaseCluster.addQueue(nodeNumber, self._clusterName, queueName) self._testBaseCluster.bind(nodeNumber, self._clusterName, self._exchangeName, queueName, bindingKey) def _highestNodeNumber(self): """Find the highest node number used so far between the current nodes and those stopped/killed.""" highestNode = self._nodes[-1] if len(self._deadNodes) == 0: return highestNode highestDeadNode = self._deadNodes[-1] if highestNode > highestDeadNode: return highestNode return highestDeadNode def killCluster(self): """Kill all nodes in the cluster""" self._testBaseCluster.killCluster(self._clusterName) self._testBaseCluster.checkNumClusterBrokers(self._clusterName, 0) self._deadNodes.extend(self._nodes) self._deadNodes.sort() del self._nodes[:] def restoreCluster(self, lastNode = None, restoreNodes = True): """Restore a previously killed cluster""" self._testBaseCluster.createCluster(self._clusterName) if restoreNodes: numNodes = len(self._deadNodes) self.restoreNodes(lastNode) self._testBaseCluster.checkNumClusterBrokers(self._clusterName, numNodes) def addNodes(self, numberOfNodes = 1): """Add a fixed number of nodes to the cluster.""" nodeStart = self._highestNodeNumber() + 1 for i in range(0, numberOfNodes): nodeNumber = nodeStart + i self._testBaseCluster.createClusterNode(nodeNumber, self._clusterName) self._nodes.append(nodeNumber) self._testBaseCluster.checkNumClusterBrokers(self._clusterName, len(self._nodes)) self._testBaseCluster.waitForNodes(self._clusterName) def restoreNode(self, nodeNumber): """Restore a cluster node that has been previously killed""" if nodeNumber not in self._deadNodes: raise Exception("restoreNode(): Node number %d not in dead node list %s" % (nodeNumber, self._deadNodes)) self._testBaseCluster.createClusterNode(nodeNumber, self._clusterName) self._deadNodes.remove(nodeNumber) self._nodes.append(nodeNumber) self._nodes.sort() def restoreNodes(self, lastNode = None): """Restore all known cluster nodes that have been previously killed starting with a known last-used node""" if len(self._nodes) == 0: # restore last-used node first if lastNode == None: lastNode = self._lastNode self.restoreNode(lastNode) while len(self._deadNodes) > 0: self.restoreNode(self._deadNodes[0]) self._testBaseCluster.waitForNodes(self._clusterName) def killNode(self, nodeNumber): """Kill a cluster node (if it is in the _nodes list).""" if nodeNumber not in self._nodes: raise Exception("killNode(): Node number %d not in node list %s" % (nodeNumber, self._nodes)) self._testBaseCluster.killNode(nodeNumber, self._clusterName) self._nodes.remove(nodeNumber) self._deadNodes.append(nodeNumber) self._deadNodes.sort() def sendMsgs(self, routingKey, numMsgs, nodeNumber = None, msgSize = None, wait = True): """Send a fixed number of messages using the given routing key.""" if nodeNumber == None: nodeNumber = self._nodes[0] # Use first available node msgs = self._testBaseCluster._makeMessageList(numMsgs, msgSize) sender = self._testBaseCluster.createSender(nodeNumber, self._clusterName, self._exchangeName, routingKey) sender.stdin.write(msgs) sender.stdin.close() if wait: sender.wait() self._lastNode = nodeNumber return msgs.split() # TODO - this i/f is messy: one mumMsgs can be given, but a list of queues # so assuming numMsgs for each queue # A mechanism is needed to specify a different numMsgs per queue def receiveMsgs(self, numMsgs, nodeNumber = None, queueNameList = None, wait = True): """Receive a fixed number of messages from a named queue. If numMsgs == None, get all remaining messages.""" if nodeNumber == None: nodeNumber = self._nodes[0] # Use first available node if queueNameList == None: queueNameList = self._txMsgs.iterkeys() for qn in queueNameList: nm = numMsgs if nm == None: nm = len(self._txMsgs[qn]) - len(self._rxMsgs[qn]) # get all remaining messages if nm > 0: while nm > 0: receiver = self._testBaseCluster.createReciever(nodeNumber, self._clusterName, qn, nm) cnt = 0 while cnt < nm: rx = receiver.stdout.readline().strip() if rx == "": if receiver.poll() != None: break elif rx not in self._rxMsgs[qn]: self._rxMsgs[qn].append(rx) cnt = cnt + 1 nm = nm - cnt if wait: receiver.wait() self._rxMsgs[qn].sort() self._lastNode = nodeNumber def receiveRemainingMsgs(self, nodeNumber = None, queueNameList = None, wait = True): """Receive all remaining messages on named queue.""" self.receiveMsgs(None, nodeNumber, queueNameList, wait) def checkMsgs(self): """Return True if all expected messages have been received (ie the transmit and receive list are identical).""" txMsgTot = 0 rxMsgTot = 0 for qn, txMsgList in self._txMsgs.iteritems(): rxMsgList = self._rxMsgs[qn] txMsgTot = txMsgTot + len(txMsgList) rxMsgTot = rxMsgTot + len(rxMsgList) if len(txMsgList) != len(rxMsgList): return False for i, m in enumerate(txMsgList): if m != rxMsgList[i]: return False if txMsgTot == 0 and rxMsgTot == 0: print "WARNING: No messages were either sent or received" return True def finalizeTest(self): """Recover all the remaining messages on all queues, then check that all expected messages were received.""" self.receiveRemainingMsgs() self._testBaseCluster.stopAllCheck() if not self.checkMsgs(): self.printMsgs() self._testBaseCluster.fail("Send - receive message mismatch") def printMsgs(self, txMsgs = True, rxMsgs = True): """Print all messages transmitted and received.""" for qn, txMsgList in self._txMsgs.iteritems(): print "Queue: %s" % qn if txMsgs: print " txMsgList = %s" % txMsgList if rxMsgs: rxMsgList = self._rxMsgs[qn] print " rxMsgList = %s" % rxMsgList class DirectExchangeTestHelper(TestHelper): def __init__(self, testBaseCluster, clusterName, numNodes, exchangeName, queueNameList): TestBaseCluster.TestHelper.__init__(self, testBaseCluster, clusterName, numNodes, exchangeName, queueNameList) self._testBaseCluster.addExchange(0, clusterName, "direct", exchangeName) for qn in queueNameList: self._bindQueue(qn, qn) def addQueues(self, queueNameList): self._addQueues(queueNameList) for qn in queueNameList: self._bindQueue(qn, qn) def sendMsgs(self, numMsgs, nodeNumber = None, queueNameList = None, msgSize = None, wait = True): if queueNameList == None: queueNameList = self._txMsgs.iterkeys() for qn in queueNameList: self._txMsgs[qn].extend(TestBaseCluster.TestHelper.sendMsgs(self, qn, numMsgs, nodeNumber, msgSize, wait)) class TopicExchangeTestHelper(TestHelper): def __init__(self, testBaseCluster, clusterName, numNodes, exchangeName, queueNameKeyList): self._queueNameKeyList = queueNameKeyList TestBaseCluster.TestHelper.__init__(self, testBaseCluster, clusterName, numNodes, exchangeName, queueNameKeyList.iterkeys()) self._testBaseCluster.addExchange(0, clusterName, "topic", exchangeName) for qn, bk in queueNameKeyList.iteritems(): self._bindQueue(qn, bk) def addQueues(self, queueNameKeyList): self._addQueues(queueNameKeyList.iterkeys()) for qn, bk in queueNameKeyList.iteritems(): self._bindQueue(qn, bk) def _prepareRegex(self, bk): # This regex conversion is not very complete - there are other chars that should be escaped too return "^%s$" % bk.replace(".", r"\.").replace("*", r"[^.]*").replace("#", ".*") def sendMsgs(self, routingKey, numMsgs, nodeNumber = None, msgSize = None, wait = True): msgList = TestBaseCluster.TestHelper.sendMsgs(self, routingKey, numMsgs, nodeNumber, msgSize, wait) for qn, bk in self._queueNameKeyList.iteritems(): if re.match(self._prepareRegex(bk), routingKey): self._txMsgs[qn].extend(msgList) class FanoutExchangeTestHelper(TestHelper): def __init__(self, testBaseCluster, clusterName, numNodes, exchangeName, queueNameList): TestBaseCluster.TestHelper.__init__(self, testBaseCluster, clusterName, numNodes, exchangeName, queueNameList) self._testBaseCluster.addExchange(0, clusterName, "fanout", exchangeName) for qn in queueNameList: self._bindQueue(qn, "") def addQueues(self, queueNameList): self._addQueues(queueNameList) for qn in queueNameList: self._bindQueue(qn, "") def sendMsgs(self, numMsgs, nodeNumber = None, msgSize = None, wait = True): msgList = TestBaseCluster.TestHelper.sendMsgs(self, "", numMsgs, nodeNumber, msgSize, wait) for ml in self._txMsgs.itervalues(): ml.extend(msgList) qpidc-0.16/src/tests/run_ha_tests0000775000076400007640000000217311752551467017531 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Make sure the python tools are available. They will be if we are building in # a checkoug, they may not be in a distribution. test -d $PYTHON_COMMANDS -a -x $PYTHON_COMMANDS/qpid-ha -a -x $PYTHON_COMMANDS/qpid-config || { echo "Skipping HA tests, qpid-ha or qpid-config not available."; exit 0; } srcdir=`dirname $0` $srcdir/ha_tests.py qpidc-0.16/src/tests/ClientMessage.cpp0000664000076400007640000000257211354176666020341 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/messaging/Message.h" #include "unit_test.h" using namespace qpid::messaging; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ClientMessageSuite) QPID_AUTO_TEST_CASE(testCopyConstructor) { Message m("my-data"); m.setSubject("my-subject"); m.getProperties()["a"] = "ABC"; Message c(m); BOOST_CHECK_EQUAL(m.getContent(), c.getContent()); BOOST_CHECK_EQUAL(m.getSubject(), c.getSubject()); BOOST_CHECK_EQUAL(m.getProperties()["a"], c.getProperties()["a"]); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/stop_broker0000775000076400007640000000232111654250703017345 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Stop the broker, check for errors. # QPID_PORT=`cat qpidd.port` export QPID_PORT rm -f qpidd.port ../qpidd --no-module-dir --quit || ERROR=1 # Check qpidd.log. egrep 'warning\|error\|critical' qpidd.log && { echo "WARNING: Suspicious broker log entries in qpidd.log, above." } # Check valgrind log. if test -n "$VALGRIND"; then . `dirname $0`/vg_check $VG_LOG* vg_check qpidd.vglog* || ERROR=1 fi exit $ERROR qpidc-0.16/src/tests/ReplicationTest.cpp0000664000076400007640000001356511623224255020716 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "config.h" #include "BrokerFixture.h" #include "qpid/Plugin.h" #include "qpid/broker/Broker.h" #include "qpid/client/QueueOptions.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/replication/constants.h" #include "qpid/sys/Shlib.h" #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using namespace qpid::replication::constants; using boost::assign::list_of; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(ReplicationTestSuite) // FIXME aconway 2009-11-26: clean this up. // The CMake-based build passes in the module suffix; if it's not there, this // is a Linux/UNIX libtool-based build. #if defined (QPID_MODULE_PREFIX) && defined (QPID_MODULE_SUFFIX) static const char *default_shlib = QPID_MODULE_PREFIX "replicating_listener" QPID_MODULE_POSTFIX QPID_MODULE_SUFFIX; #else static const char *default_shlib = ".libs/replicating_listener.so"; #endif qpid::sys::Shlib plugin(getLibPath("REPLICATING_LISTENER_LIB", default_shlib)); qpid::broker::Broker::Options getBrokerOpts(const std::vector& args) { std::vector argv(args.size()); transform(args.begin(), args.end(), argv.begin(), boost::bind(&string::c_str, _1)); qpid::broker::Broker::Options opts; qpid::Plugin::addOptions(opts); opts.parse(argv.size(), &argv[0], "", true); return opts; } QPID_AUTO_TEST_CASE(testReplicationExchange) { qpid::broker::Broker::Options brokerOpts(getBrokerOpts(list_of("qpidd") ("--replication-exchange-name=qpid.replication"))); SessionFixture f(brokerOpts); std::string dataQ("queue-1"); std::string eventQ("event-queue-1"); std::string dataQ2("queue-2"); std::string eventQ2("event-queue-2"); FieldTable eventQopts; eventQopts.setString("qpid.insert_sequence_numbers", REPLICATION_EVENT_SEQNO); f.session.queueDeclare(arg::queue=eventQ, arg::exclusive=true, arg::autoDelete=true, arg::arguments=eventQopts); f.session.exchangeBind(arg::exchange="qpid.replication", arg::queue=eventQ, arg::bindingKey=dataQ); f.session.queueDeclare(arg::queue=eventQ2, arg::exclusive=true, arg::autoDelete=true, arg::arguments=eventQopts); f.session.exchangeBind(arg::exchange="qpid.replication", arg::queue=eventQ2, arg::bindingKey=dataQ2); QueueOptions args; args.enableQueueEvents(false); f.session.queueDeclare(arg::queue=dataQ, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); f.session.queueDeclare(arg::queue=dataQ2, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); for (int i = 0; i < 10; i++) { f.session.messageTransfer(arg::content=Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), dataQ)); f.session.messageTransfer(arg::content=Message((boost::format("%1%_%2%") % "Message" % (i+1)).str(), dataQ2)); } Message msg; LocalQueue incoming; Subscription sub = f.subs.subscribe(incoming, dataQ); for (int i = 0; i < 10; i++) { BOOST_CHECK(incoming.get(msg, qpid::sys::TIME_SEC)); BOOST_CHECK_EQUAL((boost::format("%1%_%2%") % "Message" % (i+1)).str(), msg.getData()); } BOOST_CHECK(!f.subs.get(msg, dataQ)); sub.cancel(); sub = f.subs.subscribe(incoming, eventQ); //check that we received enqueue events for first queue: for (int i = 0; i < 10; i++) { BOOST_CHECK(incoming.get(msg, qpid::sys::TIME_SEC)); BOOST_CHECK_EQUAL(msg.getHeaders().getAsString(REPLICATION_TARGET_QUEUE), dataQ); BOOST_CHECK_EQUAL(msg.getHeaders().getAsInt(REPLICATION_EVENT_TYPE), ENQUEUE); BOOST_CHECK_EQUAL(msg.getHeaders().getAsInt64(REPLICATION_EVENT_SEQNO), (i+1)); BOOST_CHECK_EQUAL((boost::format("%1%_%2%") % "Message" % (i+1)).str(), msg.getData()); } //check that we received dequeue events for first queue: for (int i = 0; i < 10; i++) { BOOST_CHECK(incoming.get(msg, qpid::sys::TIME_SEC)); BOOST_CHECK_EQUAL(msg.getHeaders().getAsString(REPLICATION_TARGET_QUEUE), dataQ); BOOST_CHECK_EQUAL(msg.getHeaders().getAsInt(REPLICATION_EVENT_TYPE), DEQUEUE); BOOST_CHECK_EQUAL(msg.getHeaders().getAsInt(DEQUEUED_MESSAGE_POSITION), (i+1)); BOOST_CHECK_EQUAL(msg.getHeaders().getAsInt64(REPLICATION_EVENT_SEQNO), (i+11)); } sub.cancel(); sub = f.subs.subscribe(incoming, eventQ2); //check that we received enqueue events for second queue: for (int i = 0; i < 10; i++) { BOOST_CHECK(incoming.get(msg, qpid::sys::TIME_SEC)); BOOST_CHECK_EQUAL(msg.getHeaders().getAsString(REPLICATION_TARGET_QUEUE), dataQ2); BOOST_CHECK_EQUAL(msg.getHeaders().getAsInt(REPLICATION_EVENT_TYPE), ENQUEUE); BOOST_CHECK_EQUAL(msg.getHeaders().getAsInt64(REPLICATION_EVENT_SEQNO), (i+1)); BOOST_CHECK_EQUAL((boost::format("%1%_%2%") % "Message" % (i+1)).str(), msg.getData()); } } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/tests/RetryList.cpp0000664000076400007640000000543611372266076017554 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "unit_test.h" #include "test_tools.h" #include "qpid/broker/RetryList.h" using namespace qpid; using namespace qpid::broker; namespace qpid { namespace tests { QPID_AUTO_TEST_SUITE(RetryListTestSuite) struct RetryListFixture { RetryList list; std::vector urls; std::vector
expected; void addUrl(const std::string& s) { urls.push_back(Url(s)); } void addExpectation(const std::string& host, uint16_t port) { expected.push_back(Address("tcp", host, port)); } void check() { list.reset(urls); for (int t = 0; t < 2; t++) { Address next; for (std::vector
::const_iterator i = expected.begin(); i != expected.end(); ++i) { BOOST_CHECK(list.next(next)); BOOST_CHECK_EQUAL(i->host, next.host); BOOST_CHECK_EQUAL(i->port, next.port); } BOOST_CHECK(!list.next(next)); } } }; QPID_AUTO_TEST_CASE(testWithSingleAddress) { RetryListFixture test; test.addUrl("amqp:host:5673"); test.addExpectation("host", 5673); test.check(); } QPID_AUTO_TEST_CASE(testWithSingleUrlOfMultipleAddresses) { RetryListFixture test; test.addUrl("amqp:host1,host2:2222,tcp:host3:5673,host4:1"); test.addExpectation("host1", 5672); test.addExpectation("host2", 2222); test.addExpectation("host3", 5673); test.addExpectation("host4", 1); test.check(); } QPID_AUTO_TEST_CASE(testWithMultipleUrlsOfMultipleAddresses) { RetryListFixture test; test.addUrl("amqp:my-host"); test.addUrl("amqp:host1:6666,host2:2222,tcp:host3:5673,host4:1"); test.addUrl("amqp:host5,host6:2222,tcp:host7:5673"); test.addExpectation("my-host", 5672); test.addExpectation("host1", 6666); test.addExpectation("host2", 2222); test.addExpectation("host3", 5673); test.addExpectation("host4", 1); test.addExpectation("host5", 5672); test.addExpectation("host6", 2222); test.addExpectation("host7", 5673); test.check(); } QPID_AUTO_TEST_CASE(testEmptyList) { RetryListFixture test; test.check(); } QPID_AUTO_TEST_SUITE_END() }} // namespace qpid::tests qpidc-0.16/src/qpidd.h0000664000076400007640000000430511650340075015200 0ustar00jrossjross00000000000000#ifndef QPID_H #define QPID_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/Modules.h" #include "qpid/Options.h" #include "qpid/broker/Broker.h" #include "qpid/log/Options.h" #include // BootstrapOptions is a minimal subset of options used for a pre-parse // of the command line to discover which plugin modules need to be loaded. // The pre-parse is necessary because plugin modules may supply their own // set of options. CommonOptions is needed to properly support loading // from a configuration file. struct BootstrapOptions : public qpid::Options { qpid::CommonOptions common; qpid::ModuleOptions module; qpid::log::Options log; BootstrapOptions(const char *argv0); }; // Each platform derives an options struct from QpiddOptionsPrivate, adding // platform-specific option types. QpiddOptions needs to allocation one of // these derived structs from its constructor. struct QpiddOptions; struct QpiddOptionsPrivate { QpiddOptions *options; QpiddOptionsPrivate(QpiddOptions *parent) : options(parent) {} virtual ~QpiddOptionsPrivate() {} protected: QpiddOptionsPrivate() {} }; struct QpiddOptions : public qpid::Options { qpid::CommonOptions common; qpid::ModuleOptions module; qpid::broker::Broker::Options broker; qpid::log::Options log; std::auto_ptr platform; QpiddOptions(const char *argv0); void usage() const; }; class QpiddBroker { public: int execute (QpiddOptions *options); }; // Broker real entry; various system-invoked entrypoints call here. int run_broker(int argc, char *argv[], bool hidden = false); #endif /*!QPID_H*/ qpidc-0.16/src/rdma.cmake0000664000076400007640000001056611715002376015662 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # RDMA (Remote DMA) wrapper CMake fragment, to be included in CMakeLists.txt # # Optional RDMA support. Requires ibverbs and rdma_cm. include(CheckIncludeFiles) include(CheckLibraryExists) CHECK_LIBRARY_EXISTS (ibverbs ibv_create_qp "" HAVE_IBVERBS) CHECK_LIBRARY_EXISTS (rdmacm rdma_create_id "" HAVE_RDMACM) CHECK_INCLUDE_FILES (infiniband/verbs.h HAVE_IBVERBS_H) CHECK_INCLUDE_FILES (rdma/rdma_cma.h HAVE_RDMACM_H) set (rdma_default ${rdma_force}) if (HAVE_IBVERBS AND HAVE_IBVERBS_H) if (HAVE_RDMACM AND HAVE_RDMACM_H) set (rdma_default ON) endif (HAVE_RDMACM AND HAVE_RDMACM_H) endif (HAVE_IBVERBS AND HAVE_IBVERBS_H) option(BUILD_RDMA "Build with support for Remote DMA protocols" ${rdma_default}) if (BUILD_RDMA) if (NOT HAVE_IBVERBS) message(FATAL_ERROR "libibverbs not found, required for RDMA support") endif (NOT HAVE_IBVERBS) if (NOT HAVE_RDMACM) message(FATAL_ERROR "librdmacm not found, required for RDMA support") endif (NOT HAVE_RDMACM) if (NOT HAVE_IBVERBS_H) message(FATAL_ERROR "ibverbs headers not found, required for RDMA support") endif (NOT HAVE_IBVERBS_H) if (NOT HAVE_RDMACM_H) message(FATAL_ERROR "rdmacm headers not found, required for RDMA support") endif (NOT HAVE_RDMACM_H) set (rdma_SOURCES qpid/sys/rdma/rdma_exception.h qpid/sys/rdma/rdma_factories.cpp qpid/sys/rdma/rdma_factories.h qpid/sys/rdma/RdmaIO.cpp qpid/sys/rdma/RdmaIO.h qpid/sys/rdma/rdma_wrap.cpp qpid/sys/rdma/rdma_wrap.h ) add_library (rdmawrap SHARED ${rdma_SOURCES}) target_link_libraries (rdmawrap qpidcommon rdmacm ibverbs) set_target_properties (rdmawrap PROPERTIES VERSION ${rdmawrap_version}) if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(rdmawrap PROPERTIES COMPILE_FLAGS -Wno-missing-field-initializers LINK_FLAGS ${GCC_CATCH_UNDEFINED}) endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS rdmawrap DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_COMMON}) add_library (rdma MODULE qpid/sys/RdmaIOPlugin.cpp) target_link_libraries (rdma qpidbroker rdmawrap) set_target_properties (rdma PROPERTIES PREFIX "") if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(rdma PROPERTIES COMPILE_FLAGS -Wno-missing-field-initializers LINK_FLAGS ${GCC_CATCH_UNDEFINED}) endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS rdma DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) add_library (rdmaconnector MODULE qpid/client/RdmaConnector.cpp) target_link_libraries (rdmaconnector qpidclient rdmawrap) set_target_properties (rdmaconnector PROPERTIES PREFIX "") if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(rdmaconnector PROPERTIES COMPILE_FLAGS -Wno-missing-field-initializers LINK_FLAGS ${GCC_CATCH_UNDEFINED}) endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS rdmaconnector DESTINATION ${QPIDC_MODULE_DIR} COMPONENT ${QPID_COMPONENT_CLIENT}) # RDMA test/sample programs add_executable (RdmaServer qpid/sys/rdma/RdmaServer.cpp) target_link_libraries (RdmaServer rdmawrap qpidcommon) add_executable (RdmaClient qpid/sys/rdma/RdmaClient.cpp) target_link_libraries (RdmaClient rdmawrap qpidcommon) if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(RdmaClient PROPERTIES COMPILE_FLAGS -Wno-missing-field-initializers) endif (CMAKE_COMPILER_IS_GNUCXX) endif (BUILD_RDMA) qpidc-0.16/src/windows/0000775000076400007640000000000011752725716015432 5ustar00jrossjross00000000000000qpidc-0.16/src/windows/SCM.h0000664000076400007640000000620311650340075016212 0ustar00jrossjross00000000000000#ifndef WINDOWS_SCM_H #define WINDOWS_SCM_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include using std::string; #ifdef UNICODE #undef UNICODE #endif #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include namespace qpid { namespace windows { /** * @class SCM * * Access the Windows Service Control Manager. */ class SCM { public: SCM(); ~SCM(); /** * Install this executable as a service * * @param serviceName The name of the service * @param serviceDesc Description of the service's purpose * @param args The argument list to pass into the service * @param startType The start type: SERVICE_DEMAND_START, * SERVICE_AUTO_START, SERVICE_DISABLED * @param account If not empty, the account name to install this * service under * @param password If not empty, the account password to install this * service with * @param depends If not empty, a comma delimited list of services * that must start before this one */ void install(const string& serviceName, const string& serviceDesc, const string& args, DWORD startType = SERVICE_DEMAND_START, const string& account = "NT AUTHORITY\\LocalSystem", const string& password = "", const string& depends = ""); /** * Uninstall this executable as a service * * @param serviceName the name of the service */ void uninstall(const string& serviceName); /** * Start the specified service * * @param serviceName the name of the service */ void start(const string& serviceName); /** * Stop the specified service * * @param serviceName the name of the service */ void stop(const string &serviceName); private: SC_HANDLE scmHandle; void openSvcManager(); DWORD waitForStateChangeFrom(SC_HANDLE svc, DWORD originalState); DWORD getDependentServices(SC_HANDLE svc, std::auto_ptr& deps); }; }} // namespace qpid::windows #endif /* #ifndef WINDOWS_SCM_H */ qpidc-0.16/src/windows/resources/0000775000076400007640000000000011752725716017444 5ustar00jrossjross00000000000000qpidc-0.16/src/windows/resources/template-resource.rc0000664000076400007640000000655011634652160023427 0ustar00jrossjross00000000000000// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "version-resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "windows.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "version-resource.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION ${winverFileVersionBinary} PRODUCTVERSION ${winverProductVersionBinary} FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "${winverFileDescription}" VALUE "FileVersion", "${winverFileVersionString}" VALUE "LegalCopyright", "${winverLegalCopyright}" VALUE "InternalName", "${winverInternalName}" VALUE "OriginalFilename", "${winverOriginalFilename}" VALUE "ProductName", "${winverProductName}" VALUE "ProductVersion", "${winverProductVersionString}" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. IDI_ICON1 ICON "qpid-icon.ico" #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED qpidc-0.16/src/windows/resources/version-resource.h0000664000076400007640000000242611415446736023131 0ustar00jrossjross00000000000000// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Preserved for common usage by any Qpid exe/dll. #define IDI_ICON1 101 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 104 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif qpidc-0.16/src/windows/resources/qpid-icon.ico0000664000076400007640000014735411415446736022037 0ustar00jrossjross00000000000000 èÆè®(–00¨¾ ¨fÈhÖ$ n`>*00 ¨%¬Š  ¨T° ˆ üÀ h„Ê( @€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿˆÿÿÿÿÿÿÿ‡ruxÿÿÿ—ÿÿÿÿÿøpa$7‡ÿÿÿÿÿÿp$G—_ÿÿÿÿÿ‡wˆˆw5Uÿÿÿÿøpxÿÿÿÿ‡u9ÿÿÿÿÿðpÿÿÿÿÿ‰Up?ÿÿÿÿppÿÿÿÿø•Gÿÿÿÿÿÿÿÿÿ…ux`ÿÿ÷ÿÿÿÿøUYÿ÷ÿÿðÿÿÿÿ÷uÿøÿÿ€Rÿÿÿÿÿˆÿÿÿpÿÿrÿÿÿÿÿÿÿÿÿÿuÿÿpÿÿÿÿÿÿÿÿÿÿ€'ÿÿqÿÿÿÿÿÿÿÿÿÿÿÿphÿÿÿÿÿÿÿÿÿÿ€Gÿÿqÿÿÿÿÿÿÿÿÿÿsÿÿq%ÿÿÿÿÿÿÿÿÿÿpHÿÿð`ÿÿÿÿÿÿÿÿÿÿ0ÿÿôÿÿÿÿÿÿÿÿ÷?ÿÿø$ÿÿÿÿÿÿÿÿ‡ÿÿÿ5ÿÿÿÿÿÿÿÿa%ÿÿÿÿ„ ÿÿÿÿÿÿó@ÿÿÿÿ÷@ÿÿÿÿøCCÿÿÿÿÿrRÿÿøpÿÿÿÿÿÿøap!a`ÿÿÿÿÿÿÿ‡%%%%xÿÿÿÿÿÿÿÿÿ‡xÿÿÿÿÿÿÿÿÿÿÿÿˆˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ(0€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿˆÿÿÿÿÿø‡wÿø˜ÿÿÿÿ÷@ÿÿÿø!BwUÿÿÿÿ€@ÿÿ÷—ÿÿÿøÿÿÿøUpÿÿñÿÿÿÿuoÿÿwÿÿÿ÷Uñ'ÿÿ`ÿÿÿ÷xÿ÷ÿÿÿÿÿÿÿøPÿøÿÿÿÿÿÿÿÿø0ÿÿÿÿÿÿÿÿ@øÿÿÿÿÿÿÿÿÿÿpÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ÷ÿÿ(ÿÿÿÿÿÿðÿÿðÿÿÿÿÿÿpÿÿøAoÿÿÿÿ÷ÿÿÿpÿÿøÿÿÿÿø%wwÿÿÿÿÿ‡xÿÿÿÿÿÿÿ÷wwˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ( €€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿˆÿ÷ÿÿvwÿÿ÷ˆøq_ÿÿpÿøu7ÿøÿÿõxq÷ÿÿ‡ô÷ÿÿÿÿõ/òÿÿÿÿö÷ÿÿÿÿ÷÷Xÿÿÿÿðÿÿÿÿÿpÿÿ€ÿÿ÷ÿÿ÷w‡pÿÿÿ‡pxÿÿÿÿÿøÿÿÿÿ(0`#"%$#&%$&&%(('*)(+*),,+.-,/.-00/2002214436658879:9<<;=L%???EL%@K%FK$JI$NL%M@?BF#WH#SV&Rn+XV%dQ.fC=}y-in+zz.zBADGFHIHJMLNRQTTSVUTVXWYYX[[Z\^]_HFrh_bdceeeghfiihjkjllkmnmoyqionpqqrttvyxz{z|}|~€/pN Œ[&€]%‚Z%‰B:€]%‘^#ž_$œK4ža%u+‡s*ˆj&žk(˜x.–w7X¾U%¬\"¾g&£c#¦f%¦d$«c$­j8©`%½d7²PFœUUQrž€[_¥SÇTÆO!ÈU#Ã\!ÀX%ÄS)Å].ÇW6ÇY0ÊO$ÐM ÕT7Ñ]5ÕS:ÐQ:Ýa-Áf4Ã\IÛf\ÎeAÓf\ÙiiÏcÏoj×lgÙ{g×€~àZ”­`¡·y„ÜnºØ{¼Õ‚ƒ…„†‡‡ˆˆ‡‰‰ˆŠ‹ŠŒŽ‘‘’“’””“•””•—–˜˜—™˜˜™›šœžž¥™‰¡¡¢¥¤¥¨§¨©¨ª«ª¬¬«¬®®¯·¯¤°°±³³´µµ¶ºº»»»¼½½¾Ù•“ܫϱ Çª¶Þ­ á´¶àŽÉ×½ÔßÀÀÁÃÃÄÄÃÄÅÄÅÈÈÉÌËÌÍÍÎÍÄÖÏÏÐÐÏÐÒÒÒÔÓÔÕÕÖßÛÖØÙÙÞÜÙÛÛÜÝÝÞËÂêÌËèÏÜîÔÚëØÜîÛÓðÞÙóàÛñØàìÕèìáááããäåååççèèçèäëíéèéììëíííñïöçðóéñôíñôñññöööòòøöøøùùùýýýôQÿöqÿ÷‘ÿù±ÿûÑÿÿÿÿ/-P?pRc°vψð™ÿ¦1ÿ´QÿÂqÿÏ‘ÿܱÿëÑÿÿÿÿ/Pp!°&Ï,ð>ÿX1ÿqQÿŒqÿ¦‘ÿ¿±ÿÚÑÿÿÿÿßÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙØªÓÙÙßßÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙ߯~ÌÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙß¿€}©ÙÙÙßßÙÙßßßßßßÙÙÙÙÙÙÙÙÙßߨɱ¯¯´ËØßßßÙßÙßßßÙßÁr]wÅßßÙÙÙÙÙßßßßßßÙÙÙÙÙÙÙÙ±‡*  ,жßÙßÙßßß§n@Q¨ßßßÙßßÙÙßßßßßßÙÙÙÙßÔ‘$%”ÕßÙÙ¤Z@BsØßßßÙÙÙÙÙßßßßßÙÙÙÙØ”—Ø£XIh¾ßßßßÙßßÙÙßßßßßÙÙÙÇ)_aFd¢ßßßßßÙÙÙÙÙßßßßßÙÙ¡  1‰—Ÿ ˜‹4DbJTvÓÙßÙßßÙßßÙÙßÙßßÙß™2«Õßßßßßßßߨ®9 fSGl½ÙÙÙÙÙÙÙÙÙÙÙßßÙßßž-¶ßßßßßßßßßßßßßß¹[fUEk/¡ÙÙÙÙÙÙÙßßÙÙßßßÙ³’ÙßßßßßßßßßßßÙßßÖzcLCj\ ·ÙÙÙÙÙÙÙÙÙÙßßßÔ ®ÙßßßßßßßßßßßßßßÃtRMA`H%ÕÙÙÙÙÙßßÙÙßßß>°ßßßßßßßßßßßßßßßÄmVKBix„ßÙÙÙÙÙÙÙÙßÙ·šßßßßßßßßßßßßßßßÂgW?"eyÓ«¼ÙÙÙÙßßÙÙßß5:ßßßßßßßßßßßßÙßÙÐqL!#YuÑß߃;ßÙÙÙÙÙÙÙßÇ ÍßßßßßßßßßßßßßßÔ²ONpÒßßßÔÍÙÙÙßßÙÙß‹†ßßßßßßßßßßßßßß߸“0Po¦Øßßßßß’‘ßÙÙÙÙÙÙß'Éßßßßßßßßßßßßßßß¶38¥|ÀßßßßßßßÔ+ÙÙÙßßÙÙÎ*ßßßßßßßßßßßßßßÕ’‘Λºßßßßßßßßßß5ÔÙÙÙÙÙÙ«ŠÙßßßßßßßßßßßßßÉØßßÕßßßßßßßßßßß•°ÙÙßßÙÙ’¡ßßÙßßßßßßßßßßßßßßßßßßßßßßßßßßß¶–ÙÙÙÙÙÙƒ»ÙßßßÙßßßßßßßßßßßßßßßßßßßßßßßßßψÙÙßßÙÙ=ÎßÙßÙßÙßßßßßßßßßßßßßßßßßßßßßßßßÕ ‚ÙÙÙÙßß=ÏßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßÕ ‚ÙÙßßßÙ^»ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßφÙÙÙÙßß«ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß¹”ÙÙßßßÙžßßßßßßßßßßßßßßßßßßßßßßßßßßßßÙߘ«ßÙÙÙßßÇ.ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß:ÍßÙßßßÙÙÏßßßßßßßßßßßßßßßßßßßßßßßßßßßßÕ &ÙßÙÙÙßßß^Œßßßßßßßßßßßßßßßßßßßßßßßßßßßß—†ßßÙßßßßß±ÔßßßßßßßßßßßßßßßßßßßßßßßÙßߨ$¹ßßÙÙÙßßßÙ({ßßßßßßßßßßßßßßßßßßßßßßßßÙß-ßßßÙßßßßßß «ßßßßßßßßßßßßßßßßßßßßßÙßÙ´®ßßßÙÙÙßßßßÙ- »ßßßßßßßßßßßßßßßßßßßßßßÉ1ÙßßßÙßßÙÙÙÙÙ» ·ßßßßßßßßßßßßßÙÙßßÙÙßÇ$ ÈßßßßÙÙÙÙÙÙÙÙß— žßßßßßßßßßßßßßßÙßß߬œßßßßßÙßßÙÙÙÙÙÙÙƒ:ÍßßßßßßßßßÙßÙßßÏ^‡ÙßßßßßÙÙÙÙÙÙÙÙÙÙÙ<^·ÙßßßßßßßÙÙ¼… >ÙÙßßßßßÙßßÙÙßßßÙÙÙÙ‡%>—®··®˜‚'ˆÙÙÙßßßßßÙÙÙÙÙßÙßßßßÙÙ  žÙÙÙßßßßßßÙßßÙÙßßßßßßßßßÊ67ÊÙÙÙÙßßßßßßÙÙÙßßßßßßßßßßßßß±24³ÙÙÙÙÙÙßßßßßßÙßßßÙßßßßßßßßßßßßßÈŽ++ÈÙÙÙÙÙÙÙÙßßßßÙßÙÙÙÙÙßßßßÙÙÙÙÙßßßßßßß×µœŠŠœ¶ÕÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙßÙÙÙÙÙÙÙÙÙÙÙÙßßßßßßßßßÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿø( @#"%$#&%$'&%(('*((**),-,/./476988::9<<<>86G>=@20K@?B\(Uh*X^'b_'vP"y]&yX&~b(hf)yA@BCBDDCFFFHIHJMLNNMPPORRQTUTVVUXXWZZY\]\^_^`ZU}`_af]cbacbadddfhgiiikkjlonprqsssuttvvvxxwy{{|}|~S#…S!’X!Ÿo-†q.N2¡O>¦_"±\-³W&¸R'¿R,¾Z(¿O1¸g%¤q<¦~€wy™Y+Ì_JÐjOÉhPÎrZÊ`FÑh¨Âs¥Ñ‚ƒƒ‚„……‡ŽŽ’’“““”””•˜˜™›šœ­¦ž¡ ¢££¤¦¦§¨¨©««¬¬«¬¬¬­¸°¥¯¯°°¯°³³´µµ¶··¸¹¹º¾¾¿†ß›€Ü¡žÞœ…⳨綳ä‘ÀÓ¸ÔÝÀÀÁÄÃÄÆÅÆÍÍÎÏÏÐÑÑÑÖÖÖÙÙÚÝÝÝßßàÞÙäÜßïÖÕðÚÔñÓÙñÛÝñàßàåååççèèèéííîíëòííøëòôëôöññññóõôóôõõõúúúüüûüûüþþþðiÿyÿŠ1ÿQÿ¯qÿÁ‘ÿÒ±ÿåÑÿÿÿ/Pp ° Ï ðÿ ÿ>1ÿ\Qÿzqÿ—‘ÿ¶±ÿÔÑÿÿÿ/Pp!+°6Ï@ðIÿZÿ1pÿQ†ÿqœÿ‘²ÿ±ÈÿÑßÿÿÿ/ P6pLb°xÏŽð¤ÿ³ÿ1¾ÿQÇÿqÑÿ‘Üÿ±åÿÑðÿÿÿ,/KPip‡¥°ÄÏáððÿò1ÿôQÿöqÿ÷‘ÿù±ÿûÑÿÿÿÿ/-P?pRc°vψð™ÿ¦1ÿ´QÿÂqÿÏ‘ÿܱÿëÑÿÿÿÿ/Pp!°&Ï,ð>ÿX1ÿqQÿŒqÿ¦‘ÿ¿±ÿÚÑÿÿÿÿ––Ÿ–Ÿ––Ÿ–––––––––––Ÿ–––––––Ÿ––––––––Ÿ–Ÿ––Ÿ–––––––––––Ÿ–––––Žtu––––Ÿ–Ÿ––Ÿ–––––––––––Ÿ––––––ŒSR–––––ŸŸ–Ÿ––Ÿ–ˆb7%&8dŠ–ŸŸŸƒN?sŸ––––ŸŸŸ––Ÿ–y./{Ÿ„IP–Ÿ–––––ŸŸ–Ÿ4KLBŸŸ––––ŸŸŸŸ~ Xly{lZ"D=O‚––(3––––ŸŠvŸŸŸŸŸŸŸŸŸ”^+Cn–ŸŸy‘––––i –ŸŸŸŸŸŸŸŸ”khf‹–ŸŸŸŸ–l––––V5ŸŸŸŸŸŸŸŸŸ‘•–”–ŸŸŸŸŸŸTW––––0\ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸa2––––'cŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸk-––––*_ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸg.––––6VŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸ[9––––\#ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸ-_––––{‡ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŠ}–––––TŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸX––––––]|ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸ†_––––––’ ŠŸŸŸŸŸŸŸŸŸŸŸŸŸŸ‘“Ÿ––––––m‰ŸŸŸŸŸŸŸŸŸŸŸŸŠ#w–Ÿ–––––––X kŸŸŸŸŸŸŸŸŸŸm Z––Ÿ––––––––U!b‰ŸŸŸŸŠe$V––ŸŸ–––Ÿ–––––_ `Ÿ––ŸŸ–––––ŸŸ––Ÿ}*,}––––ŸŸŸ––––ŸŸŸŸŸŸ–{9 J{Ÿ––––ŸŸŸ–––––––––––––––ˆxjjx‰–––––––––––––––––––––––––––––––––––––––––––––(0$#&$$&&%(('*)(+*),,+.-,//.10/221321443687:;:=>=@g)ki)yBADGFHIHJJILONQQPRSRUWVXYXZ[Z]\[]]]__^a`_a``bkjllkmnmo{tosrtwvxxwyyxz}|~\'€T#‰[(‰C4‚D7…F5ŠU$’[$]%‘[&–g,„`5¢T@¬{[³YÏyaÀ‰»‹o؉|Úq®Ä‡‡‰ŠŠ‹ŒŽŽ‘••–˜—™™™šœ›œœ¡¡¢¤¤¥©©ª¬¬­±±²·¶·¹¹º¼¼½§ˆÈª™Ô¿¿Àµ­ç³²éÀ¿À»ÅæÃÃÄÆÅÆÈÇÈÉÉÉÌËÌÌÌÌÔÓÔÔÔÕÛÛÜÝÝÝÄßìßßòââãæäáåååççèéééìëêíííëòõñññõõõöôûöõü÷ùùùúúùûüþþþZptް©ÏÂðÑÿØÿ1ÞÿQãÿqéÿ‘ïÿ±öÿÑÿÿÿ/&PAp[t°ŽÏ©ðÃÿÒÿØ1ÿÝQÿäqÿê‘ÿð±ÿöÑÿÿÿ/P"p0>°MÏ[ðiÿyÿŠ1ÿQÿ¯qÿÁ‘ÿÒ±ÿåÑÿÿÿ/Pp ° Ï ðÿ ÿ>1ÿ\Qÿzqÿ—‘ÿ¶±ÿÔÑÿÿÿ/Pp!+°6Ï@ðIÿZÿ1pÿQ†ÿqœÿ‘²ÿ±ÈÿÑßÿÿÿ/ P6pLb°xÏŽð¤ÿ³ÿ1¾ÿQÇÿqÑÿ‘Üÿ±åÿÑðÿÿÿ,/KPip‡¥°ÄÏáððÿò1ÿôQÿöqÿ÷‘ÿù±ÿûÑÿÿÿÿ/-P?pRc°vψð™ÿ¦1ÿ´QÿÂqÿÏ‘ÿܱÿëÑÿÿÿÿ/Pp!°&Ï,ð>ÿX1ÿqQÿŒqÿ¦‘ÿ¿±ÿÚÑÿÿÿÿrrrrrrrrrrrrrrrrrrrrrjqrrrrrrrrrrrrrrrrrra=orrrrrrrkM@'(ANlrrrS6Vrrrrrrrf()fQ,9rrrrrrrL "".15brrrrrrH DikF-30:rrrrrrRen;2+/Wrrrrlkrm8*<lrrG^qP4 IlrrlJ?rrrrrrrrrD(( Errrrrrrrrr] ^rrrrrrrrrrrrr`G%%G`rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr( $#&%$'&%(*),,+--,//.11035476586.VBACDCFIHKNMPPOQQPSUUWVUXZY[]\^_^`^]hdcfeeggfhihjlkmtsuvvwwvxxxy|{}M*W*Z-“i4‰t?™~€tG°Z±bº„ƒ…‹ŠŒŒŒ‘“’”™˜™œ›žžŸ™‡¬››¤¡ ¡§§¨¨§¨·¶·¹¸¹†…ÍÄ¿ìÄÁÀÇÆÇÈÈÉÎÎÎÑÑÑÙÙÙÞÝÞÂÓæßÞîÝÜõÑãêâââæææííîæà÷òòòöõöõóûøøùùûüþþþ/Pp ° Ïð ÿ=ÿ1[ÿQyÿq˜ÿ‘µÿ±ÔÿÑÿÿÿ/"P0p=L°YÏgðxÿŠÿ1œÿQ®ÿqÀÿ‘Òÿ±äÿÑÿÿÿ&/@PZptް©ÏÂðÑÿØÿ1ÞÿQãÿqéÿ‘ïÿ±öÿÑÿÿÿ/&PAp[t°ŽÏ©ðÃÿÒÿØ1ÿÝQÿäqÿê‘ÿð±ÿöÑÿÿÿ/P"p0>°MÏ[ðiÿyÿŠ1ÿQÿ¯qÿÁ‘ÿÒ±ÿåÑÿÿÿ/Pp ° Ï ðÿ ÿ>1ÿ\Qÿzqÿ—‘ÿ¶±ÿÔÑÿÿÿ/Pp!+°6Ï@ðIÿZÿ1pÿQ†ÿqœÿ‘²ÿ±ÈÿÑßÿÿÿ/ P6pLb°xÏŽð¤ÿ³ÿ1¾ÿQÇÿqÑÿ‘Üÿ±åÿÑðÿÿÿ,/KPip‡¥°ÄÏáððÿò1ÿôQÿöqÿ÷‘ÿù±ÿûÑÿÿÿÿ/-P?pRc°vψð™ÿ¦1ÿ´QÿÂqÿÏ‘ÿܱÿëÑÿÿÿÿ/Pp!°&Ï,ð>ÿX1ÿqQÿŒqÿ¦‘ÿ¿±ÿÚÑÿÿÿÿOOOOOOOO_OOOONEOOOOOOM<66=MOL9BOOOON/ 3()OOOOK7FF8!"C_OOO4O___I'# OOO>*____K%$:+?OO H___O;2D_J&OO____N_O___OO __________ OO __________OO,@________A-OOFN______NGOOO0H____H1OOOOO-44.O_OOOOO>>OO_OOOOOOOMAAMOOOOOO‰PNG  IHDR\r¨f`5IDATxÚì]xUÅÖ]··ô^„ÐBïE”Ž4i‚¥WõÙ(°+*¨ôªHQéM@¥—@BKBBzr{ýg^~ä=•rÏÍMr_¾vfÎ9³×ì½g‰‹â¶ÿŠ!¢B"‘üõk‘Dˆ(; @„ˆ2 ‘Dˆ(à @„ˆ2 ‘Dˆ(à @„ˆ2 ‘Dˆ(à @„ˆ2 ‘Dˆ(à @„ˆ2 Aà΋ŠðDÒö—ÜË  ”àïÞ•ÐïB$œFqÈ‚H¥ô^îöçåçãò¥K¸rù2232_P³É‡ÃÁ®ã¼«kH¤R(ärh´:!&&ñ+">>æ®ç\!€Á`2š 7èát:‘““ƒƒàÈ‘#H»– ›Íz{&&ìú¢"èõz.øVö}»ÝÁ^®wûvém È (•JhµZøùûÃÏÏ*•’ý\µZŠ •ðp‹‡Q¿~}èt:Èd2B¡Püåze ¼-"”RÜÈÌÄ™3g˜ ›‘ššŠŸ¶oÇÉ“'a6›ù3'" wvû{“J¤ÊØ`ú÷ÇýÀ}mÇýqûXt]÷8„€€4lÜmÚ´ášC@@ êÖ«ËÉáök–vˆ â¾ñËÏ¿àÀ¾}Ð 8uâ$Ž;£ÁÅŸ;±J¥òÙçMAäd4¹ÉŒ&Mš"¡RƒÑ®}{4hÐà¿þ®4’‚7ß‘H%ú"= LÐwìØÕ«¾G³ß¯_¿ŽL¶óÓ» '››vÙ’"#/"2 bË•Chh(b¢£1`àÓ¨W¯>¸9áFi!‘DüOX­VØ¿iiiXºx Ο?K' í]Ú@kËn·óù ÍzÝ{tGùòåùÿoÿý’ ‘Düüþ;Ö¯_‹.â—Ÿ~‚…©Èw:ÌÊH; Í'8$íÚµG…ø èÿô~âp;J!ˆ Y7n`ó¦MXµrWí¯^¹Ê½ê¤öŠÏìÿAÏ‚4ƒ|FòÄDÇà™¡Cñð#s³Á’B"”!Ü~NOÿß½kvüò ¾[þWùé{´Ó—õÝþna±X¸IDÏ”N<ý4}ìÑg"xK.Dð"î<sƒì¼9s°wï>üÌT|)-ÞÀÀâžn‰=ï¼Ü\‡Ð¾};<Úªžêßÿ¿~Ç!@)ÂÏÆ}ϳxÑ"l\¿.\à9dÛ—…gâ-Ün"hµ:T®RO èÞ½{#((ˆÿŽ/’€H¥'øIç“°}ûøê˯xä}ŸÎèKê‘]I-Z-V®…‘cF£]Û¶ˆ+_žÿÜ׈À²!€‡p7 69ÙÙ˜3{6Ö®Y‹K)) /5÷_Ò@dÍÞGí:uЫW/ >Œ‡+»á d €ãßîÙ}o………\ð×|¿’’àÀƒt|a‘•eÐû¡`#›ÕŠ„Ê•0lØpôé×÷Vø±/¼_ÊÐ àî•ø7lÀÇ~„k×®ñ Û#×Døè}RL}®T©žŸøºtíz+à¨8‰@$€bÆý> ¿ìÀÌ™_`Ïî=ÜÙDÇx¾°£ˆøgXØG»ðÜsx‚¿¹bx"îõ~Ü÷‘——‡)“&aûÛ‘››û—@¾wh5„……¡GÏxaâ‹ »ù½Mâ"xzß.[†ŸÎ@zz:·ñ)rOÜõK.È„# J•*xù•ÿp³€àÍw*€Üø¿Íòî¿øì3ž•Gqédë‹‚_:àöåP„a·îO`âĉ¨Ìà­w,¤Œ”9ðÔK£yÓµ–.^ŒÞÿÙYYÕýR :6,((@ù åñδix¼S'þ}o€H^¾Ñ»™ó•+Wðî´éØ´q#Wõ)GDé™Hôøã0mút¯ù„’“RIB½ ÷\ÉÁ÷Ÿ—_BfF&÷ð‹ê~Ù½orÖoÐS¦NAó‡¾õ}¡ €oä~çI1å¼÷.XÈwÊ6…¿l‚Ö‘ån yæ¼üêxÁÓ’F%ž¼eƒQNþ¸ÑcpàÀ^nKôð‹ •KÅYŒFÏ2œ2u*w ­z%ŽŠã†Jhÿ祗‘””„_pqÁ]Á×å¼YþûÖ×·Uö½ùsö?+ »ŸÁŸÏèö*Âîj¿·W¾ów|éø÷AA÷B1›4ƤÉSÐì¡f·ž«§Çñ4J‡À¹ç5oî\Ìøøäp{ß]¯¤Â]_޶lVd2)ÓfTPkÔ·4 ûL5ú)ˆ)<<‘¾O*&-.ÚñÉŽ¢{w”Ò¦m›R]oàôéS8zä(~úq;ö2’v°ç@÷KD_&r‚Ò Á§3f ¡R%þ½Y_žöÏÜ︥‚è¦~;zãÇãeº‚‚‚}ö^Ü{‰ ª%&â¹çŸC•ªU9 ”%Ðiµ0ÿ~Õ÷<›¡Òy¼»Ë°¯ÖSAA>×ÐfÏÃI@$Ýбc`ÌÈÑ|AQ©._Í‘<øtÎ\• ;5»xªÿ4nÚ¾»çyTÒ‹Ú¤Q÷ãÇsÍÈ]íקࢹêQ§n]|>k&*W®ì$Pf €næÄñ5r$ÒRS¹§Ü×î{dCÆÄÄ`ÐÁèС³ñ«÷´|ìÕ­[÷6oÜ„L+ Ó€b|ÉBkŽÌz‡óæÏCÅ„„B_j€näÜÙs>t(R’“y_™?ÍT\»Ý†ˆˆH 1]»v¹UºZÄ?Ãawàø‰ãøà½÷ñûo¿q ªýú ps ?Íš7Ǭ¯¾B¹r±÷µöD¸OÐMP¤ÚàOãcÇ|J]$çEÓ‘MO‘dLàƒfIIuYš5s&ú ¦ øŠ–Gs Í®U«V˜=o.'¨û-A特Üï˜%ŽèèÁ4˜·Ùô‘Ÿæ@]Hå'þÈQ#Q³V­âžV©ÁwË—cö׳‘tî?.õG!Å ôéÛò1ä÷X4V$€{„{òÏ‚ ë7ðˆ8_˜3EêÙ™ð×­_¯¿ñ:~ä‘âžR©Dff&æÎ™ƒß­àù tbPÜfÓáDn^.ÆO˜Àƒ…Þ&2Aî‰O|þ,Z¸ÙÖ>qnLê~Dd$F…ÑcÆû‚,  ŒÎI¯½Ž];wAç§+Þ¶))ª¨°Ó߯ ÀÓpOúÝiÓxÅ^_(ÓÍ#ÄŠŠÐ¥[7ÎþuëÕ-î)•)Ø™©µ‚™ä(¤Ðoò 7(šó㟢ÿ€^%2A«V®Ä‹/¼À»ÃçÎOψŠG„„„r;äèÑ>c–Eœ;{o½ùvïÚÅ5Ê3(®uL±4þÒeKѤY³»ž‡Hÿ2ᤤ èÝ£w¸g˜,9ø(_œxfΜ‰J•+÷ãñ'è}PÍÊ« ƒâZË´F)kŪ•¾»Â3"üÃd³³²Ñ§W/œeL\|!¾$üt¶?pð ¼òê«>uô(â&vîØ7§Lå>:z-M‘ÉËGç®]0áþ=¡I T€;ëÙgžÅ¶Í›y5›âªäCÇŽlA}øÉ'èÜ¥sq?ÿŠyôæM›o&ñöº&G0URzŽ™¬“&ß]-‘þÇDçÍ™‹7§N½ß_L%Åòrsy™>ù5o^ÜEÄ]Á…©“§ðÊÏînÎÞ^Û7cBœX¼t kõ˜H÷šäÑ£GѯO_8™êMñàŲ÷éå½ûþûHHH(îÇ"â±xá"L{ç®I‡ïˆr(ù뻕+ýÏ…iD¸m‚ׯg wÏH¹˜\,v¿»Ì ÁƒñÖ;osURDÉľ={ñÂsÏ!#3ÓëïÑm têÔ —,æ§EB@©!÷äÈ‘óõW_y½|7OÎ>:Ï}ᥗðÊ«¯ëóá\¸pƒŸˆK—.ñÐqoƒ’™¨È“}ûˆðo“£ßQ#FKŒ¿»'µ‘žÀv ¥—R.á™Aƒp19™'îx@J+V­âG„ž&RA4±œÜtîØ ×ÓÓ¡Ñh¼:¾»}ôëo¼±ãÇÛs!2˜i9„‘À©S§¼N9ÙÙèÚ­7'ke–;ÞxíuÌŸ7Ÿ'ùx”Ða4ðÆäÉ<ž_DéEjj*ž<§Nžôª9ànFúég3x•a‘î˜ÐÞÝ{зO¯~ Ø“ш×&½1cÇzýþExW¯\Áàƒ¸oÀ›š™˜t±sÏ„……zŒJ<“¤[ç®HIIöê™-yû騆œ}_zÉë÷.¢øž–†§úöck.徊yÜ/(¨¬G˜ùÕ—"¸'4ã“Oñáx¬ñÂÝ‚ŠtNxþ9Lbª¿ˆ²êfÔ§wo=è­ü ¢ªÐK–-EëÖ­ÿç˜e†x-ÿS§Ñ¿_?~îN™TÞ—ì±ÞO>‰™_Îòê=‹ð-P³’¾OöáN`o ÑÚ{衇0oÁ|â~§Ü• pOäù °tÉR^àÃ[ ‚ŽMÙ øfùr¦þ‰A>e+W¬Ä+/¿ìµÇ´ö332xiñƒñïÝ.{e†öï݇'™ æÍfÔ‰‡ÈfÙ·ß z^»_¾÷¦OÇŸ}À ïœ CЭû_víDHhèi%Žhä}ïß·<èµ3žMÈîqÑÒ%bÝ>™ãǎźÖy­+mFÆ Å”·Þ*{°iã&^Óß[Ž?~òøúÙgxªÿS^¹O% Té©ÇÝqòÄI¯”r§À3:øaý:žqz¿$Pâ€<¡Otí†Ó§Ny­–yüÉé÷Õ쯽2žˆ’‰CaðÀ|Ãð†Yš‘£FcÚ»Óþëg¥’hË—/Ç^|‰ ¿7‚~(΀ú¸}óÝrÄÆÆ >žˆ’óæaò“(¼@›¡\®ÀúX=ñ¾œ%†hpªà:èé§9Óz#Û˜œÆ áoÚ´© c‰(==b$V¯^-xjž““ƒá#G`ú»ïòïÝ+ ”(ضu<õ”WâýižˆÒƒ¤¤óèûd_äfç@£ÞIM§{öíEtLLé$w¿^=zð޾Býpm#?Mj†o™É!õq¯X³f-^|î9¨ÔjÁ ŒRÁÙþOÀ{ï¿_z `ß¾}è÷d¯„]Ò±¹xÙR´hÑBбD”^ }öYüÈ´V¡×,Õ¡ ø”[6#22òÖX¥Šúõí‹ûö{ÅóO¾†¡Ã†bÚŸv•÷ƒË—/¡k§.Ü‘,dmJ’=2WÉT}~â ¥‹hÐcüÁ;úRÌ¿ÐE>ÉÔ Åæm[&èX"J?¾øü L{ûm $¤)@q* 6ÄüE7{_Þ- ”˜2i2f²)Øtƒ3P9æŽ|,¥”Â;à©þ8rø° B7 â^ǪիѾCûÒA4à•Ë—Ñ¿ßS¼‹a¿î,¿‡~ß~÷TjïdŠ(ýظ~ÆÇ×BjL¥è.^Ì{Ü ø<lܰ @tt´ ~Rýív-Y„V­[ 6Žˆ²‰lÛ¿¿àiÃ"¼÷À~”+W®d F7CêÓoG ~ôGþ…Ž?޹óçqö!“8zäzõèÉ×±¬t"0hȼýÎÛwu$èÓ––†æM›qÏ¿»ÿ­ˆ¿åߢi³f‚#¢lcôÈQXóýj„„†6™UªVÅO¿üü-‘0uòT,Y¼Hpµ‰)Èq2oÁAÇQ¶qàÀ 8fn*:Í"S–I>úä#ôèÙó_ÍŸ$÷@íZ·Áùóç=û§y¬Û¸ 4l"h­ : [6oôD€*;ï¾ÿÞ­qKüòóÏ?vÊÒ&ÏËËC—®]1gÞ\Ñö!8vïÚ…¡Ï<ËýBùLF*WÂ’eKP¾|…’IoM}ŸÍ˜ÁC…%QÐîOŽ¿N; 6Ž·£{×'pâÄqAƒÚ233±zíZ´iÛæÍŸ#w"Ψ#±{÷nAU%jäùp‹GS.óZq"vîØÁÛ× ™ÒNk{ÌøñxcÒ\¦þN ðI8°?zvïÁ…_(5‰æk6›ðêk¯q{I„oκwë†Ë—. æà¦“-ºöþCo%#•ø~ÕJ¦Œ4¥ŸýÓÎ*†¶Ï"Ê6f}1S§Lt“ÿlÛöí¨Z­êßš>E4õÚ£àŸcÇŽ j#‘íß«w/^èS„oã·ßŽò7}‘^° 7 ¤{ª~Pb€ÒÕkÀcñ… þ¡”ßí?ÿ„Úuê6†ÿ: ؼi¯n-((¨FÍšL øño£}Žì?Àcÿ©ÓŠP ÝŸŠ(®\µ A^ªã.BĘ7w.Þ›þ._ëB$ QXp\\~X¿aáaÿS ð99|~ܶMÐè?:"ygÚ4Œ›0^°1Dˆø7Pÿc-[¢° P2â¼}=ÛìÞ˜< £F.С]{œ;sV°bŠäü£™.X¸µj%È"DÜ-=={÷ìÌ™‘É7ºw¦Oóm ‹S£ê®’zõš`ùø”õ×졇x?±Ø§ˆâÆÖÍ[ðì3Ï P “(Št}¢{w|ùõ—ÌÔPþ×q OÀ’E‹0uÊT(” ȤžW‰hޤvQWÕ>úÐã×!â^‘zíZ?vS"æ…ŽuZ-¾Y±uëÖû/-À§àÍÉSñÅçŸ#"R˜vßdÑ8ŸÏœ‰Žwd "î·?–ÙçÛ¶m,ê•Ì€Uk¾G»öí}›^ýÏ+˜?w÷X ‡ÝÁ ~øõWÚŠ‰q7X´p!&>ÿ‚`y/7nÜàeº÷èþ_Ç>AÜþÏÊâÇÌ6'u¨Q£FŒ W r}"î[¶lÁØQ£y6ª§T˜´o¿¾øðãùõo×|†öïÛÇÛ~)••LÒ3ûÿ­iï`è°a‚\_„ˆûUóüô@œ={VͲ^)ñhÛOÛyøûýʪ @gÿ”!%”ävîÞ·UªTd "î£FŽÂº5k L£ãï‡qÿšOÀ† ñÌÀÆH@ËØuæˆd "î“ߘ„E 1 @+HT µßµw ô)p_ôý÷ÞÃç3>ì<”ì -ÁüE‹Äó>‡µ«×àÕW_E© u8óËYèÜ¥‹ïõN{ºÿÞL¨ˆ(ò„Nž:/Lœ(ÈõEˆxädg£}Ûv½zãèÑ£‚ÔÁ ¨^£Æ¥ß #€Œëx¤ysÁªòZ,f„……cÁ¢…¨S·® cˆñ ˜üúXºt© =0o@u^!ÈçàÌéÓèÚ¹‹`U]iظV®Z µ€ FEˆxü°v-/…ïçççñkSm€Š ±yÛ6h™ ܼ FÖ¯Ç󞬵üîúD7Ì[0_ë‹á œ=smZµ$'€NBCC±xÙRÔ¬YÓ·àã>—3g v@å¿zõîY_})ÈõEˆð.$%¡më6¼ާáCö'3>å=0|Š&Œϵ!ªÑ¼ z=Œ÷>xßã×!ÂS¸”’‚.:óÝÚÓG” k6[0iÊ$Œ9Ò·à©~ýppß~Aìó›õÿÍ7~^~å__„O!==OöìÅs]Ä> ÒT©(îÏ?ýÄ»ùxp7fÜ8¼=íß"€Ç;täGB©S .DÓ‡šyüú"Dxt¶â»ïéÅ`ôØ1˜6}º@û8sæŒ @Q€Z­«×®A•ªb°߯›S¦âËY³ø‘§A0rô(¼ûÞ{e‹ü±åÇm5.B„'ðéÇŸ`ú´i‚ô äÀ¦¼[†4wPÊ…Ó€Eø:fõ5^õUD°Y•I €€Ê!Q!P¡r DˆðÌŸ—^˜ˆÈ¨(_›ún >œ§îUfK4:rX¬,Âç±pÁ^!8J¸iŒf&À»eOØè   GEˆðæÏ›‡—'¾(Œð§ 0™„2£Бʎݻk¼ B„§@'“_Ÿ$HsÒÆŒû—>÷‚It @A›¶nALLŒÇ¯/B„'ñáàÃ÷>¤9i#þt|G0ˆ@£ÑbŪ•¨Q³†Ç¯/B„'1éõ70wÎn¶zÜ3Ó}Í t(0Ùþ³çÎA‹–-=~}"<’!*²fõjAªcûl(ð]»ñŠÀBؼßÿðCôìÙÓã×!ÂS êØÃ‡Þݻ© D•‡ÇN7ßzË·@èt`*úêk¯bĨQ¿¾žBNN6ôësçÎy¼6Æ­tà—^Ä^yÅ·`ÂøñذN¸‚ T‘Ž?Þ˜4Éã×!ÂSHMMEÏî=øNíé#kÒ„©7À¤)“1|Äß"€O>þ³¾˜)XI°¢¢B<Õ>þôA®/B„'|ñ":u|œ «§+Ñq8EÂ~üÉ'èÒ­«oÀÆ ðÜø ÂÍÏGÏ^½ðÕ쯹¾žÀŤ$´zô1ÞÃÒÓ5©ÌXXX–~û }‹¨*ÕB*R¯ ¿;=ŽEK r}"<r„“ DÀšÅlF|B¶lÛÊí>EB71 ¨^£&¾[ùBȳ! îÀS&M$k•ü`‰Õ«ãÇŸ|°1ˆÐ­ÁHý¡hÀ¹óç¡i3±*ßUZ÷Â8Ãyg FÛ|‘(@¡u«Ö0³I ‘±GN£ÑÈÛ#÷cDø(ºuîÂâ„ê Ø°Qc¬]·Ö÷€„s`ÿøý÷ß; ÈÌÈÄ_ÎÄÀAƒ¹¾ Ò‚©½¦0öПgú>|ÿÌøôSAB T aÂs0åÍ7¹¾‚”äd@Ñ€ž>$L±î·+APظa#† ˆðϧAHªU«–-ÿVD " ç/àµIø…0ƒ)–ÊâÅÅÅù¸/üã¶mè×·""Ê ”°»õÇm¨T©’ c”fÐûu/ú?žìk-VY»{8”E¼üÒËX¾ìøx¾Án³ó²xTgÀ' àÀþ}ðTfÿ(Q´ý—ŸQ§NA®_VAdàÜ `¡]J.—±k”=xvÈ3زi‚‚ƒ=~mФ  ­Ûär}ŠÜÍÉÉÁ3ƒã÷?~‡ŸÎó™Pr6Ž5 oLsîô~Oœ8³gÎ!::Š›S¡a© Üý>ï–®\½ ­F‹ðð0þ÷D&·;Á„‹õ5œ?Ž­ý!¼7 G€EEEèÿô¼ÿÁüYú¸ÕË×^y•C¢&:Áfµ¡Zb5laf€ˆ{ǵk×°jÕj¬[³• ­Ú¶A»vmѨIã¿ü½O÷;ý'" u›¶¡FbÔ­]r¶8&ðòÿø²`¬eÏsܘ1<Xˆ{¥“…EK–à‰îO<°¦þ—¯=©Þœ<_|þ¹ õмIˆ¿?víÛ+Hïµ²zÏû÷îÃÌÏ¿ÀÎ;yÔZ×'º²æi4fDpçnÍ×Áÿ¸Öù‹É8ôÇ)Dø«¡P*Тys\»žcÇN c»Ö\ ÊP"ÜäI“k\Cv«VvíÛû6,[²S&Oæ* jŸ[Åœ ü\Èr™`“"† LP9)d5(ˆuᇆzðHçžÐjtÐ(nÚÒîhD_ôмޜ2³fÎ,ê•4!:ZÜwð—£E………=b$vìØ!˜zDó5èõʱo$Úb‚ŸeaZ„Ë€8‡U*g³#_gGay ì†8¡ €ªqÄU¯„ª5¡”ÿ¿I@(n Óó±-y ”pU°¨R­*/]Œ¸¸ò%“í[·Å¹ó牑vƒ‚‚¨>À÷k×:NYBA~Öoß ©.aþг¯¯¤^GfVf÷C¦€Ùh€17*§j’’ÎáôÉãÜq%‘(¥­€¶þ­Q]âƒ9 2[ª;U¨ÈÀê0"Õ^³ËSж†tá hk¨ ®¨„#B\2Cª#ñÑ~ˆ¿éL¾Û,E!ñͲe¼8ùŸ„šCfFï<ý½woÝ·'àux‡Ùæ æ/,*Ð ò9Ì™?]ÅÈ@ °°i鈎FFZ*Î¥ÞÀõ<#.]¹µ_0”?\¿r†‚\´jÞÝ;µašX&½ø6víÝ™’´BQ¨©©‡šòXÔtI΄Þ`ÍA®=Ÿi.TrÈ´ •Ó)©ùaU‘¢(^g¸—6܈l‚6=‡":òfí‚âô ÿƒŠß9|~…þ’c•*_Q¼'žx°ôß;áu¸žžŽ‡š4…†íÌBÙJ23jÔ¨M[·»ŠXš|é*? §TŽüÜ\˜%JHjä^OE¨Ÿ -nˆ5«âÚùTì_G·ŸÇ™«û‘a?ƒ{¬.ÔR4ó«™:oËd&ÄuTtÊ`—ÂßnƒÊÁ4'3/vd“fQ.ÚÄ0U „<ÜŠte²üâ\áQÔoÔ :Uñü°v-ÆŽÃó„Êj¤àŸªU«â§¿xüÚ^'ÌAOᇠªÐÜi¬>ùOöé#Ø8e ’“±÷ЯˆŒˆF~VÒóôPø‡±šZ‰UЬYc&¸vì[¾ ‡×\Ä•kV]EЪýQhË@Šá rl×`qZ ’êPAUµ55ÑPŠküm°›M,™&m(´ˆ×@%C~¤…Î\ftç"G]„¬€ Ö ušwDdd4d.;oÅ Pôé“={áÈ‘#‚Ö¢ `Ï Š)oNõø¦éu lÞ´‰× Œfê¤Z©guëÕ÷˿¤.[YÞ={!e»\³&‘tñ"¶î<€& ê¡zBÂ""p=- ?M_¼ÙÐK4¸*/`¿ï»Ä6—J©éæ3¸¨?½#NÈPN]mÚp¿€Ö’ £-R5Lð•¡•0"·ç!ÏzrK"²Ícš‚®Ž ²‡•È‹WàB@ t‰ÝØ»n~‹BY³z5Æ'Hß¿ÛAÙ¾C[:àêÕ«ŒžÂ•ËWuÒÑ Z3>› 6NYíDª?µ¶Œë×qâä)<Ö²”ì{†½çÍЯ»»*IŠ|Ȥ8¤Á¸Î„_¦ˆ€³ÿm=.èwàŠñwF…pÀ…0E êš F­L(E0¢$28mE¸îÔÃe×#Á¨GœÙ­Ý‡Ý ›Ê I TM5°ÆIp^àÚ}ѸAS(ÿÌ9Ò7@»‡¶íx´P° äÐnÛ®-æ/\ÀL yé ÂÔÉSðÅgŸ#2J¸˜fÄÆÆbûÏ? æ¤)‹ ¬4•JÉ«ý:™Yöò§mÚ©ÁoÒ|8%rÊÃqÉe„D#€<— ¹¶Thd:Øœfœ×ïF–õ2.;ÔLSh¨mŠ–-¡„ÙÖ4 €CŽP‡ ‘Ö«P˜³ág· ÈnƒÎì„R%¼†ŠèceÈ .ET}”OhŠÊ•nÍU“€J~½ÿÞ{¼2 ïÿªµkЮ];A´åb#€“'Np_@AA  Js!-à•W_Åó_lœ² ‹Ëïςÿ’ÃHfòpÍaFUE4’a†™ »Ž ?³Ü‘lϘí¯SU‚\¦A‘- Çó×3a¿ û§–hQ]S ñêP+B "óê Øs¡u¡¶Í‚j63¢,fø±Ï*›r?¤ TP<ÌȽ޹r$å#$¦ªU­kŽž$ªøCÉm”)¤K'YMš5żó^º€@5ö1»Rè³z2èN~X¿Ž—¾áYØÙ:¹°t#²ÞùgÌù¨ªŠ„M¢@²ÄÊÔû(X˜°'9éÄÀŽ`E< ™ ›™ª_hχɑ££ ‡ÇÁÉ®—ÀH i`G¨$˜ý¯”ûC'õCœÃ€ò– „™²¡¶Bâ°ÀÌTqG[o•äTPAWMgE'’쑨Ül4jÇßQ† n¼øüD,Y²˜×å 4WJ£ŸÓÁ¤,^4×@Þ8І(bZÁÉKˆ¯<1‘ÿ_ÎünB‡iÓèÝ£N:Éw!’Ì µFõ6ðf,BûÆŠv‡ƒWR¥£Aod…|K–-EÓfͯ¬Á’¬†}æz\ËÈ@‚Sƒ•?ŽK 0É5ˆbpÒ™Ï +*Éb —ɘv Æ5˜q•}–+ËA!UBêr"Ít§‹~F »‹"+£ŽÿcÐ1Âê4 „ý^-›­ùµAÁˆÁj1!_bƒ=^y,³Õ˜FP‰² Èm}†ÃmÁßðâó/àÛo¿} .¼w‹ì¬lŒ0o½ý¶àc|‚è÷·mÝÊÛ)Sµ oÜ8™õêÕÚõëÄS`c»pæ™ 8³f¾ÜÎlu9ŽjíL`BÄ„ü # å˜:̾6HeÈg¤q^B~ñ0Iý`a»²Rªåv}’aÒÍçoËàǹÁÌdhÐ ÚÚÜY¨³å#Ò’…ýÜa€ŒÙ"jxV¡ŸÍµÍ΃…Wƒ¥p=Û5ÇB¨ßM[þŸ|Ë™à¿òò¼¢ÒÆDëÿ‡ ë‘Pú À=ý>yééxeï^áãÜs¤¡g‡>ËÌ÷¯¬"5# Yƒ¦ êð\Ô)'AºÔ‰cLh( ˜)`‘Êq&ä* TD ™-Ȱœãê¿F„3…?á†5v—‘@$3s JY zG.ü™9ã° †RŒÚ¬Ð8-»ìÙ» ¹ÝM¡éŒTÒ†µF‹¯¦@­øÿwjgÏžAŸ^OòÍ‚@hPÖߘ±cñêë¯yEø >Aî¿¡æ½{õä½å½Ñ0’Ʀ—;õÍ71jÌhÁÇ+‹ sàìúÍ(øh ̧3P_3j®2õ½©$” ¹‚©ëÀ )³ßÙÏŒôŒŒ2.; áÈA„º&üåáȱ\ı‚ ȶ^c×µ#@‚ÊÚzHÔ6@#H» ÁN3t=dL°[ÉO`„Fá„,–q@„ ?%d9F\L-€zÔ0t1ò?7öÛ×bzz:ÏW9î¼W´R:§rb?ïÜ!hY±;QìàÇý7do-Z´HÐòá·ãfµ o´øx§N^³¬ÁFêý¯Gú(ïm)ôQøð)pÿ-e ¾;}ºW¼®|L©…¨Q³Öüðƒ×^|YDvjNÌXl݇&ùJÙ€#*Ê)Bá`‚O&ÀE‰ Wabß‹c_û!‹½Ÿ+lgbD VD1bÀe[Î “™—2fTÑÔGG¿‡Q›ÙþZã8,…°9m¼ì8­#Û̵:fZ*]úË ‹VÀ^™Ùúº0ĵ| ê7Äò%‹ñÚ+¯ò5 TÏÛAiÅTTtٷߢEË^~‚O€ÑhBnÝpþüyî|ñ–7”˜¸EË–X²l ´ÚÒÙºÚk6âì침ºò¸2cfâ™6à 0afÿC!‚¥ÐÉé„@óL8ôˆ“ÇÂ,× ›)ÌTHƒpɸɆ_™9àQTU×A3M-È]Ìð`ÂÅ–NŒÓÊL‚-fXíüT@î°CbwB!EA 'ršTÅõ*uðêŸ#óz:BØæCŽi¡A1}™ÆûéçŸy]ø >AwŽE`ß~<Ù»7?ð†CÐ|Fí;v`êØ<¯x~Ë*.Ÿ=ËÌO””‰ )vÄý U¨pQjEŽÄÅ„=f©×¥.\rd †$2i ¥ä04![φzëu$éw"Í|†íöPC‚8u54êŒE8Â,9ˆ±å Ø^ÕÀL¤3nonJ]Žeå¤p&8P”ƒKê`ú׋`,,äõ„ùÈÁHŽ?oi»wÂ' €@ì;eÒ$f‹Í¬ÕÒß!?/ݺwÃW³g{E ,‹°±÷{aÛ:Ø6~ÜÝ×Q-Ý2H’éà'Õ±Ý_‰ã(€– v¢,’G &K̸¨ðƒ\U‘×0Ù2*Õàœå,ÎèÁæ2BÊþ•×$¢¡;„ËC 5_¿= Z› »ÁLåöcj¦ÈØÑ 3gÍòŠ3²,Âlw å·ý8µp ®;‡'ÔvTèà’ªÏ4¿Î\Ô€2?dKŒ \pj☺„+Ž<¨ùˆQ–G¡Dƒ£Æ8fØjGD'Šr¨îױ̔ˆvQí¸Œ­F(Øg™Ã„ܩݵF¿šL㈶#«ù£øpÃnœ:y 6j^Ó³W/îø#”yø_ãÑu¶nÞ‚aC‡zå8æÎ¹Pµ¢.]»ò#B¡Ó•Ë2®eg!Ò øýð+Ò˜Z^QÉìo™i2;r˜àÖrùÃ!“#‰™W•þðSÄ02pá†=™¦@¾“LƒSöLœ²^D†å¬.N;"™©Ð2¤;⡆i [.~#üœ¤XyÞE :mŒ€°¶ï׎ÄÑò‰xiÚ§ˆ ÕÜÃ÷KtÖ¿jõ÷¨Z­Z± ?Áç €0ííw0ó‹/¼~DÂ5Fœ7²tYYGfJ2.~2W7@‹f¨ýp– ¼ÌnCÓ r þP8et ûY>ÊËÂag&@2ôøi :U ¤šŽâ|Ñ.]zÈ\2D¨* ©¶jH´²ë„?ÄáB #•Ëδr:`³Y˜9`G®Ò€Œu±InáU¤‚t~ ¦cg2/»tíR¬ÂOðip_‹‚$z3uéÂù$¯;KÜšÀc­Zá˯¿âñ"„A޾¬Û‚ðÏ@µ‹zœÓ²u¤t¢Š^…T‰g´rD*"`”*q‰™\rø‘ciûQ„MHäL¥OE¡õ*£™T.i½¨-™ÔŸi9ÛŒpØ p2 Ãå´Âæ°AÊ4†@§AF'Ó*SŸæ˜cº‚õ?ýˆ <¨*@$BÍUûöëËÖÒ×ü{"Ü¿#cü>OöÝf+–˜“¨ßà§ŸÏ@­Zµ½>~Y¼[¿òéKa¼šU?T.RãzdÉÕH‡"UêDÛýkÀŸçœ“qZ镺nØrPŽÙõþŠHœ¶^Ænýd9²@§„UT•ÐQבԺؚ 9x?öáï ~„v¦-¸ aÚ“ir³ &½Ö!ðÒ±mý&=@H0­ajï]½fM®úÓFRÜÂïž×_¾öEp_sÑ‚…˜ôÆð§@b˜ H-Çß|ûmtí&ö t˜—¶ï N-Z ¿‚d´Thpà\!$™JTPã´ÄÀìw ªH‘'sâÌ—¶"Èÿoµf¢¼4NE)øÙrÇM¿ÁÄÃÁ¶õ(¦!tÖ6EiüF:¬ÐÚÌP³ÏJ¶¦(>@NÚÓ*ìz#’ä&X_éÕiç±fÅJùÜ—9@Í=” %–¯\†ú„ðJPÄÔðañqýz~4è@;ç@ÅDHyéå—0j̯Ž_ÖžŸ‡Ë?®CåÃÛqõt.dÇ”ˆ‘ù㘤å˜ ÃÔùsR3.ªtðWÅâ*Ït @ #ö ®ªÊ#Ûž†³E?Á`¿Ùˆ¤ªºžÔ¶@FfË ¦v˜™I`Úiƒ‚kN¨e@0ä¼a…I!þ…nø2÷ Ö®úaA÷d к!Õê[oaÂs|FøÝsûË×¾JîëR©ä¾½ŸäÅC‚½ìtƒˆˆê 1Ï¿8ÁAA^ŸCYA¾é— —ÙáÚí&ÄYq\U„ªN%ül üª´BªŽ„]ªF&#€šÐÁE'’"œQA¦IäÉEç p¡h'ŒN2µÍ- @,3â¬z„ÛLL°BÂ46 •å0i¥P%›áL1C2¦“ðý÷+èw•x‰¯ìl<=p f|þÿžHÿ‚#ääôêÑyŒ Š+Z×mÏÉA£&Mðö;o£1û,B 8¹c#ò¿Ø€ú‡s‘áD•p©6üns"Fd—»µ™úMbÇv¹…­DÈä¸Îvr0r0[R°×| 9Ž|·¡‚¦ZuF"Ûù#LWn·?U¶2ag$r2HÑÁYSÓ5=®ün³sO|±}-þ8|è®Ò„)²ôáGZàûµ«¹éàKÂO(qà¾þÚ5kðÜø Bk&$RQ×ÅšºˆtÙ¡d€ŸÝ Ó Tä ´Øa±˜aYáH”#· Òömq,U‚Y~™Tò?×;­_ªí?oátèÐÁ'…ŸP" àö1¨^ÛÜ9sx‘âÒÜó¥ØîJ•+aäÈQòì3Å6—ÒŽK×Q°})”GBºÑ^ãþEh ² VìÕȨŒãñé®<( D¾Ä‰ƒrruµi½Šß ×£€™™Ú©âQE<N*,jä¯u9¡uºD%ƨ©Ñ»Â†SQF }_ÜÓG~ƒN£ýKM *2C­é¿˜5}ûõóYáwÏ÷/_—¸}œ‘ÇcÍê5üd ¸6±>ií;´Ç˯¼‚ÄÄÄbOiEFZ Ò¶-‡òëCˆ9ç±xjÇjvÙ€ &%ª)¢) í¹¨îTB.Uã´Ô‚ãÌ4P«*!— ÷1ã~\6C‘£Z‰µ)ZP[ѶB„Yò ¶éár°÷é²Aæ’ 2ÄÚÉ·#+Lã}bêŽÕ0æÜ"rçädã=¦Ž5ŠÏµ¸×ä?Ág ànÇçõ˜Ð=;döìÜÀ ïTþ7è™I@íȇŽÁlnÞÎh, øfÕrd­ÝŒ~ÇŒ¸Ê„8ìј²ìH;î@%W.˘ o-D-—yRv«¤°kà¢ÐaG.¬ò dØnà¤þ¦ dÁ_Ž–ÝÐPU±–4Äš2b6@á0Àì4#6ä3u@¥Q ì’]Žö®…7 ˜ò ±¨yÀظ ã1iòd>G_X‹ÿ„Oîñr²³1dà >r„‡ 7hNTí¥  5jTgfÁHôíÿ”è$ôR’“1ã“O±sÏE†aTBMD]È€.Á†­ ×4!VïK 3tª3øUaÄy](¢å˜Y`ÆUWBÕU`”àwÃ!F»ap"\‡†íPSƒ ÖlÞo ¬GÍÌL+' jÉ‘ ˜ç²E+]ÂG¿AúÕ+ÄÖàGŸ~Âß¿¯ ?¡T€{Ì I0|èP$%%y­¿ÀÝ܃Éh„” ~í:uðf4¸¹H÷K)—°zõ÷X8Oצ4m©‚íÆQˆ Ç£•BÑ>Ò‰¼×Q.ÕýÌQ:[$Ç÷r‚ý*"D€3ȇ‘™ÌL0ÈÔ¸âÐãŒù$’LÀê`Ã4æš&¨(Ó!„íþq+bmvÛ­°8¡öÍ506Òââål\–WÆåøJøýèAÌ™;‡ŸLÙíöŽIŠÏ/u7(5à÷Ìé35b._¾ Nç$à¾rQ$!¥?ñÄx¢G÷âžV‰À•ËW°î‡°xÑ"dfdpÓêöp\²»ÍNjÕ¨ŠÑ×FÐÖsHÜëĵ`:“BïÄ/™VÔ——‡I.ÃIÂO%9¥2\‡©GGpÖô;ïT\KQÝ´õ 9ÓäòØ g`Žº3ÔJÖÌ!-qM œ–Ä¡v‹§Q¥rå[-Çî¦íXq£T€{lêá6zäh$_¼è“>é´@Ív¯&ÍšâÉ'û G¯žP(„k8YR‘’œÂ«óîÛ»gϜᑟ´ëÿݺ0[lH¨Q ÐsO.$éE0µÓÁδ€sûÍhèˆ@Û•OÄE(œR- %R¤@­2¹. ~f¦@ª5N8ÐD•ˆNªˆw) u˜øÉ€“}v0"°[m°)-P–S ¸±¦êj«´@½¤ÒòÌA—Ç+ x>M÷;ž=xìÆ‹ .[½µíZ¤ P¡‘òåË£ÿ€hÕº5ªT­RÜS+VP<ÅéS§xâu‰"UŸÌ¥»‰øt1-€JE&Äclte´:–…üL•”ÈÙ Gms0ÒÞ‚¬‚<”‡°¥zÞU„ ^mX£N#RÌgq…i.‰ •ÔÕÐPU‘6=Ê1ó ÖÉv~6ŽŸÝ%U6Ûx“’ #Δ“@þdO´>Áš›Ee}mÝ݉RIî9œ?wÏ“'O ÞÕõAîŠC„†…¡ßSýP·N]têÒ¹LÕ#<{æ,öï߇m[¶òVñaÇmü{U¡Ùó´0Á¬ÄH`B¹êˆË¿W¢–­T¾®AºÚÉ ÆË‚áªÇ.Îe@¤"™Ì8¦ƒDˆ“…ëqÝœ5û½€¶¨¢Ndö:¬×j£¨A*&â`ZàïB-RÈŒdkÈìÞ±¯<‹øÄ*P¸¸Œ€ ðyxÐydfdb¸qøå—_xvq ýÛ\éÔ€’ˆ¬êÔ­ƒºuë1Bx Õ«•J20ŒØ°~~þé'œIÅR0ˆtäþZ´®]#ó”ˆ?g£Ñ-42.1m G&A‚ÄÛ¥F\ö«Ži²œ¹0’ȳ§ã÷‚Í(pä ¶²Úiê#Ì¥€ÌQðç©€™øÙœ–H\C { 9Në0¶êŽÎC†òy¸×ðˆ= ÷uïõøü/_û"<È\îœÓ[SßĜٳùŽã­®Cž|V‹…Ü$ˆŽŽfæA"B¡U®\ <ò6lÄ®Äë&‘i.ÙYYصkŽ;ŽŒÌL\»r))ÉLè ¸Ðûùùy=Âb±!(6/=Ò .¦áÚÙ<èò…嘤rÄH4ؤ´Â K„Ž‘Aª#rYtòHcZÀaýX\64ÓÔÆʺ(ÏîÕß®‡Úa†Œ€Óa…Éf†=À Y¢ AÕÕ(Š G`›A¨Z¿ù­÷çIüœ‰ð/óZ¼p>úè#^O€Ê3{»²§žín”rJ B£j­NéÉåËW@õêÕѨq#„‡G@®C¥TA­Qsâ£ß½ÛRçv‡&£éæ‡É³Å³±Ià?Á„ý.^¼€™7¸:O4/rnÒ.Oª}q>¹¨ù$hÒ°^©ÿS)°_°¢\® çFHåJK•X£r"@S 2‰©®l' cö–-ÇL‡ñ‡õï7P[UMÔuí0!ÊVˆŗ„#« RŠªË`(¯@ÚŒKþHì1õê×?|Àe|7²%À]ÌíÈáÃxùÅ—pæÌ™bO'ön>q'¥8¨ÔµÝÆMí¾þþ¼°%‹†„† ˆ}¦ˆI?#RÉ•ô€Ønæ`Bnæ_XTÈUv"ËÜÜ<^à‚Žæ¨"’-zÒ4¨y†Œ}H©”®‚«õ÷ –ËH€‘´oÒ=CÕJÍAõ ’3Ìð·0S„ñÓ&­ qªÞŠ<ٙǻ )™fçÔC!qáË 0‚N€j~m£©‰£iùˆ± ÚZˆ‹‘‘@h=ü*i‘&3â¼_Ôè8‰ ÝÏüïu-ÜïµK=Ü>GªÓ6aì8ìÞ½›íœ(ÿ!Ȥ¤ÃíKàÄàþ`á *¸þìVJ+nvL&–ʤ|÷¦vúLîkB~·°±[|¤~M4Õ)ÐÑ`!ÓÿKìûvi5¨¦.‡B¦ê_p NÆîSŽkŽ<”“… N|c:€3Ö„1Í nPw„kjÂê4#ÀQ„(G>B¨ª¥ M>Ê»P±©ÊjJ$kk ¶^_$ÄW¸ëT÷û…H÷0OZøTXdþÜy\uõ•€´3…«UÁı¹šŠ°«€1ÃŽƒSábª»Ë€Ìþ'mà#ƒ()Ó’ œpåa#‹¶ËˆQVF}FþÊ ®¸î üó­ßcܸ±êïO|ŽÔiañ¹{ÝKìùÍ£\-Lþ`Ҁϯ0¥ËH[[€{²ÊpNCJG<È\ïn–%Ìl×¹;º‹ž¤—Ié )M_$D I^܇+$'ÀíÇ’ bÌŠÑ9>ŠçÒ¥¬øÖmXß·þGÊ Ðà3âxÌ÷/¿ô ÿýóŸÓÚÚzÒÁ*4N/© TÒ·ž={6wsæ¬YêwŸ”tF†Û²îUò¶=+ìá˜?AU(¦¦~îV¢X&‘x$ÚÉ ïf$­¼™fä©´BÛ % ߸á†ÁïN&Õ܉„£Q½ù -[^¤*"Þ¯ã¹Í9cxLiX|¬ìï$j4òˆ³>ût¹ˆêÌÀFòy\c™ÉDÌÂðãŠ+¸"qœº‰Š4uÓP£8o`Ö%,Xñ #å“êúIu×àëÚÐРF¶yðþÔ$²|Ò5ÐÄà³Eî8”;徸¸˜U·~—%‹—¨ b$õœœì}‰ w ¶¶–ØÎ?’ßYÏ–?¥“ôŒÆc1àäo}>°zTqK qQ˜øµt·óB¼™S!ÕéQ(Îå.CAl€¢`ˆqVcæ8°N·ÑnsÄ5‡)K¿†3ÃþrŸÊósAÀpÊ7Ò ­¯ éõÈC³~ýzêêÔ2:335!A††O“;9+ÊË¹éæ›ÕˆIrªV2ÜŽ"-Mtn|”ƒkak,Âc5‘élfy4ÆF7l±—c2¢+fŽÿJ‚Ÿ%x=ÞB…pØ/@{¬K¤Ë€‡#BÁ43Åsíôfšh)XÆœ‹¿€L'Š ¤ ÀUôt0´ÞñVzüw«Á1ä>¹´XÃвcô 3?;7—åË—sñ%—pÅ•œOÿ0†=°&޶Ö:Þ¸ÿ7¤¯éÀ¤³cŸÚÇ<{‚?Õ‰ï%¤™œ´Æ»YÔßDµ.›ZC„{ãµìHz˜éXÊ\óT\ŠŸ¼¸œ’î'¤ó «Ò1ár;=…•”^¾J¸ÃÐà, ÕrÖ`ÇŽ<ÿ‡?òâ /¨ÉA䜴œƒÖr|2òK1•_Æ1å~õÌê÷ƒl|øtÞgEsO~ö$Ê3»½&—™yeÃÉîB M±6ûz(Ñ;…è›Ù¬óòãä{xt ó­5L1àŒGÈ®EQ"J~ J$죳Ì÷ªb*¯ÿ>“Š' ÖK³F°²g‚Á8mâù ×>»†W^~™ææfÚÛÛÕ™øSsþJÊÄ— °ä4«Ì°\TT¤fÛ^=ãÉ^†ã+Ÿ*}î¶ýø1¬ÝÔ̱³á¹ –#Ùnáh¤ƒ…ùXIŒ4˜ôEX<ÿz3çϼŽt?M&MÎ!†¶•L‹%ç±7¬ÿ3ëÖ­SMà¶ö6úzûÔ¸~¶ôtÕe8›:Á§AM‡>½7ny£ò(,,äk+WR^Q¡ºCCÇF>ËÀ#AGï1Ö¼DöÝå×s8#AÚ,…*«…èþ o¸…À¥!Óà AébË@-ëu=L³Îd©i"yán\Á~Jô E³l¸K?™²konÏØÁë|W@€sk3ioذ½{ö¨9wíÜɡƃD¢QÌ2‘Æû±õÏÖ"Z9G/ë!CqÉðå55ó˜P6§ÃÉeK—ŠN_~¦‹9lüïü59¿ÝDšxƒ7Íò9N¬í^{¯ŸŒž<ìié´$¼ŒòGYo±Â~)s E¢]˜…Ø,~JªMdϰqØUÆø‹oÂå*lË“¼ `8å<›ù°6lQcìQ½·oonÛ¦¦AD"ƒ9?ÜSœ#À3u|Ô¹O†”Oš .šºVê--ÏŸ *çp:E‡¯Q“žfeebw8¨ª¬RÓ =çpÊt¶Ðãîæè=Ob{jý ?ök”8Øü¦ó3Ùæ ê>¦F’DEU¿«{ƒú4®s.`¹Øýl±~’F/¦‰ ñ©:<3/aÑço"Ëv<ÑèÉŠ€&çÕžá2ȽíÒu3 Rd’M¿_†í©T~ …éTßÄ)‘PÓW'jx,é^È–šÒZ £=!X^;©F –[šîé‘{Ò32ÔÕŽr§tMŠKŠÕLErÓ\#Å@šô'îšz¿ÎõŽ?¿¥ë­½t¯ÛA_¨ž¹ÅaZöyˆ¼¬0V—A­ÞK´ÿÔ¸ƒ—̾ÇòFg²jQ ƃ’Ûf|0Ž39@0£½åV&Üuó/¼F*‡Åǹœ §¬ç*'ÓÆrÍAkk ÇŽuÐÑ~ ·Û­F>–käà›ìÔŠ:gPÃË0á©OÙie†!Ù®ýñ·ºUtj‡ÃÎh—‹Ò’ ‹ŠT1ø$Nç<ýÙ€ 0Ò.ÚÛ·c ‘=Ûˆ=å£Ìã¤.c€t{œÉ½&ÜVxzAˆ'j³bI «VVsd¯Ž?yÉÚe|W«>À¡Ù˜oÿ:å—.Åü~»Iaÿ¸­èš\À¤ÞÞgËb¬ó½³o/û_[ÿ¾uÌÛg¤Ýª#\!3}ÍQ‚«FóÚ@/÷<ô7~©‚oÜP—B"¯ùpý%Â(·°î¦f`úñ**/ºtðÜwϸhœýœ(©ý<eÊùô¼éŽWÞp€w~÷8Ÿ{j=Ѿ]•f¦;Óéz×Oèê ®pqÇmãÏÛ[ùÑ?ÎäÊe%ô(‚µ+Øv1íì gÎþû¿a3ê?0î2ìrj qº‰7×¹@JÜý^ºú%¶·ws,;)‚‡ü´•Z(Xê¢×æñ?Ö±óÝ.¼ób*§æÑí Ð ”Llí§Ç›GÙ•”Oªî˜þý¶’"0¼`¢šhh|ÖˆNÖ\»ï³Ðïé`jY>úŽ(uÆæYYdæ[É´˜¸ñö×éEøéª*ÊrÀ˜$®OàFèíóÓÜ5йKþ —kôˆçÊüY ‘EÝÛ úÒ¡­¯³ç•Õ,¯Ã¥XØë `˜âÄœe¤¢b4¯?ˆÛîÞJé8'wÜ2 “YG$*×OXq8¡þ°¿îR®¸úËïOÞ ßÐ@Cã4 Ž«ˆÏwvüýáµT#ê 2Ö‚1ÛHùÄ,Zë}ìÚÝÍköqíß”òíoM§½7@wkHM^Š~¿2–ÊY7“ŸïÒ@Cã\B 8ª@ãöÕ”FvãéÒeM’fO£¼2›¦z/Efoloãg¿ÝÍõ×}Žk——‚±¸:}{´ÅOÜz9W^õåÁþ9Ð@Cã4";\kó!šž&-؆G—@g³2¹<‹¦/ù: é6#ÿñè.^BpûßOgÉü1´{C$,IŒi1޹]LœöuÆŽ;ì>ª €†ÆiDÖ|[s-­uo@ìÎÌ(cÇeÓÑ.SŠ cD…É¿~[ ïÔwóŸß[À˜â,º»}ôø}x# ™c¯§¢j‰&ç©Nçõ…ély ×ÈËÑ1Gut»ÃŒvXÈuZ¹ó·èFøæ—§2®ÀNDQ8ÜÞIw¼†Ë–ßDºux9+5ÐÐ8ïw:"Ô¾½†ï&rrÓÈЧ ($”eyìÙÙɯžz—1¬ü»Éè„õàëñrÌ_ÄÌK¾C~þ¨a j ¡q9žÈ$H}íFüîÍädx)ÈqÐéŽPVफ-€Çaõ«É.2óÅkÊHÄ£´ cu-‹.YŽAÿ×MBŸV4ÐÐ8Ã_z ͇h¬}‘’ü.ɹ¸;ȶ˜ØÛàfíÆÃ,ZXÄü.Ž6uÓá«âÚ/݆Ål±};šhhœR±¯/DwÛvÜmÑ'ºÉµÐÅŒtFÚºl}÷Å“3™[M]£ׄ•̨®Œpª×üY 3„îxü…„èv=Ý]ÂÌßâÛ>ÐHº0óíö Þ9àfëžc,_Zˆ9Óι‚¹5«[„O%‘ˆ&g!µ¼Ôïyÿ±·p=äØ4uûˆ+ Š©„ùWÝJnî(ÍÐÐ8ßHÍDèíéàpí&âÞýÄu z›׸‹˜Tu¦ÿßßàÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿñññÿCBDÿ%$'ÿ%$'ÿ('*ÿ¢¡£ÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿ³¨çÿZ(¿ÿ]&yÿS#…ÿO1¸ÿ./4ÿGFIÿôóôÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿwvxÿ%$'ÿ%$'ÿ'&)ÿºº»ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿœ…âÿ_"±ÿb(hÿX&~ÿ`FÑÿ86Gÿ%$'ÿ%$'ÿ}}~ÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÒÑÒÿ%$'ÿ%$'ÿ$#&ÿ›šœÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿ›€Üÿg%¤ÿh*Xÿf)yÿ_JÐÿÛÝñÿ©¨ªÿ$#&ÿ%$'ÿ&%(ÿ×××ÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿkjlÿ%$'ÿ%$'ÿRQTÿýýýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýýýÿÞÙäÿq.ÿ\(Uÿo-†ÿhPÎÿÖÕðÿþþþÿþþþÿ_^`ÿ%$'ÿ%$'ÿrqsÿþþþÿþþþÿþþþÿþþþÿþþþÿïïïÿ('*ÿ%$'ÿ$#&ÿÀÀÁÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüüûÿ­¦žÿf]cÿW&¸ÿ†ßÿðóöÿþþþÿÿÿÿÿÿÿÿÿÎÎÎÿ$#&ÿ%$'ÿ+*-ÿóóóÿþþþÿþþþÿþþþÿþþþÿ³³´ÿ%$'ÿ%$'ÿ;:=ÿýýýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûûûÿ·¶·ÿ°¯°ÿ¸°¥ÿíëòÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿGGIÿ%$'ÿ%$'ÿ¹¹ºÿþþþÿþþþÿþþþÿþþþÿ†…‡ÿ%$'ÿ%$'ÿttvÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿóóóÿüûüÿþþþÿûûûÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‚‚ƒÿ%$'ÿ%$'ÿŒŽÿþþþÿþþþÿþþþÿþþþÿiikÿ%$'ÿ%$'ÿ˜˜™ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¦¦§ÿ%$'ÿ%$'ÿonpÿþþþÿþþþÿþþþÿþþþÿ^]_ÿ%$'ÿ%$'ÿ««¬ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ··¸ÿ%$'ÿ%$'ÿcbdÿþþþÿþþþÿþþþÿþþþÿ`_aÿ%$'ÿ%$'ÿ¡¡¢ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¯¯°ÿ%$'ÿ%$'ÿedfÿþþþÿþþþÿþþþÿþþþÿvvxÿ%$'ÿ%$'ÿ†…‡ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ””•ÿ%$'ÿ%$'ÿ}|~ÿþþþÿþþþÿþþþÿþþþÿ™™šÿ%$'ÿ%$'ÿUTVÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿbadÿ%$'ÿ%$'ÿ¡ ¡ÿþþþÿþþþÿþþþÿþþþÿÑÐÑÿ$#&ÿ%$'ÿ&%(ÿäääÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿîîîÿ*),ÿ%$'ÿ$#&ÿØØØÿþþþÿþþþÿþþþÿþþþÿýýýÿ@?Bÿ%$'ÿ%$'ÿ‚ƒÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ%$'ÿ%$'ÿFFHÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ››œÿ%$'ÿ%$'ÿ((*ÿÖÖÖÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿàßàÿ-,/ÿ%$'ÿ%$'ÿ¢¡£ÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿõõõÿ<<>ÿ%$'ÿ%$'ÿDCFÿîîïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿóóôÿMLNÿ%$'ÿ%$'ÿA@Bÿøøøÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ¾¾¿ÿ%$'ÿ%$'ÿ%$'ÿMLNÿèèèÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿííîÿUTWÿ%$'ÿ%$'ÿ%$'ÿÄÃÄÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿŽÿ$#&ÿ%$'ÿ%$'ÿ769ÿ¶¶·ÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾¾¿ÿ=<>ÿ%$'ÿ%$'ÿ$#&ÿ““”ÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿýýýÿƒ‚„ÿ$#&ÿ%$'ÿ%$'ÿ$#&ÿPORÿ¨¨©ÿèèéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿìììÿ¬¬­ÿVUXÿ$#&ÿ%$'ÿ%$'ÿ$#&ÿ……‡ÿýýýÿþþþÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ  ¡ÿ*),ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ$#&ÿ88:ÿNMPÿONQÿ:9<ÿ$#&ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ+*,ÿ££¤ÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿÚÚÛÿ`_bÿ$#&ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ$#&ÿbacÿÛÛÛÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿÒÒÒÿ}}~ÿ=<>ÿ#"%ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ$#&ÿ>=@ÿ~€ÿÓÓÓÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿçççÿÆÅÆÿµ´µÿµ´µÿÆÆÇÿèèèÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ(0 þþþÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýþýÿëòõÿùûûÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿýýýÿþþþÿþþþÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÄßìÿq®Äÿ÷ùùÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿñññÿ·¶·ÿŒŽÿwvxÿxwyÿŽÿ¹¹ºÿóóóÿþþþÿþþþÿþþþÿµ­çÿT@¬ÿ»Åæÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿæææÿzy{ÿ,+.ÿ%$'ÿ$#&ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ-,/ÿ}}~ÿççèÿª™Ôÿ[(‰ÿyaÀÿýþýÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿýýýÿ²²³ÿ0/2ÿ%$'ÿ%$'ÿ('*ÿONQÿkjlÿlkmÿQPSÿ)(+ÿ%$'ÿ%$'ÿD7…ÿ[$ÿ`5¢ÿßßòÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿ¡¡¢ÿ&%(ÿ$#&ÿ213ÿ˜—™ÿíííÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïïïÿœ›ÿC4‚ÿ[&–ÿU$’ÿ‰»ÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ¿¿Àÿ&%(ÿ%$'ÿQPRÿæææÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿöõüÿ‹oØÿ]%‘ÿT#‰ÿF5Šÿ'&)ÿÃÃÄÿþþþÿþþþÿþþþÿþþþÿþþþÿôôõÿ;:=ÿ%$'ÿIHJÿññòÿþþþÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿöôûÿYÏÿi)yÿ\'€ÿˆ|ÛÿSRUÿ%$'ÿ>=@ÿöööÿþþþÿþþþÿþþþÿþþþÿœœÿ%$'ÿ'&)ÿÕÕÖÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûûûÿ§ˆÈÿg)kÿg,„ÿŠ}ÙÿùûüÿÝÝÝÿ*),ÿ%$'ÿ¡¡¢ÿþþþÿþþþÿþþþÿþþþÿJILÿ%$'ÿnmoÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿìëêÿ{toÿ{[³ÿ³²éÿýýýÿÿÿÿÿÿÿÿÿxwyÿ%$'ÿONQÿýýýÿþþþÿþþþÿéééÿ%$'ÿ%$'ÿ¹¹ºÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿþþþÿöööÿÌËÌÿæäáÿöõõÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÃÃÄÿ$#&ÿ&%(ÿîíîÿþþþÿþþþÿÈÇÈÿ$#&ÿ$#&ÿåååÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïïïÿ$#&ÿ%$'ÿÌÌÌÿþþþÿþþþÿ¼¼½ÿ$#&ÿ%$'ÿöööÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿûûûÿ)(+ÿ%$'ÿÀ¿ÀÿþþþÿþþþÿÅÄÅÿ$#&ÿ$#&ÿææçÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿñññÿ%$'ÿ$#&ÿÉÉÉÿþþþÿþþþÿäääÿ$#&ÿ%$'ÿ¼¼½ÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÇÆÇÿ$#&ÿ%$'ÿéééÿþþþÿþþþÿýýýÿBADÿ$#&ÿsrtÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿ}|~ÿ%$'ÿGFHÿþþþÿþþþÿþþþÿýýýÿ‘ÿ$#&ÿ)(+ÿÛÛÜÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿââãÿ,+.ÿ$$&ÿ••–ÿþþþÿþþþÿþþþÿþþþÿíííÿ214ÿ%$'ÿONQÿõõöÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿøøøÿWVXÿ%$'ÿ436ÿðððÿþþþÿþþþÿþþþÿýýýÿýýýÿ¬¬­ÿ%$'ÿ$#&ÿYXZÿìììÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿðððÿ`_aÿ%$'ÿ%$'ÿ±°±ÿþþþÿþþþÿþþþÿþþþÿýýýÿýýýÿýýýÿ‡‡‰ÿ$#&ÿ$#&ÿ87:ÿ¤¤¥ÿôôôÿþþþÿþþþÿÿÿÿÿÿÿÿÿöööÿ©©ªÿ;;=ÿ%$'ÿ$#&ÿŠŠ‹ÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿýýýÿ˜˜™ÿ('*ÿ$#&ÿ$#&ÿ-,/ÿ[Z]ÿxxyÿyxzÿ]]_ÿ/.1ÿ%$'ÿ%$'ÿ('*ÿšš›ÿýýýÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÔÓÔÿ_^aÿ%$'ÿ$#&ÿ$#&ÿ$#&ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ``bÿÔÔÕÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÝÝÞÿœÿsrtÿ\[]ÿ\[^ÿsstÿžÿÞÞÞÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿýýýÿþþþÿþþþÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿAAAAAAAAAAAAAAAAAAAAAAAA(  þþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿùûüÿÑãêÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿøøøÿÇÆÇÿ§§¨ÿ¨§¨ÿÈÈÉÿùùùÿþþþÿõóûÿ†…ÍÿÂÓæÿþþþÿþþþÿþþþÿþþþÿúúúÿ™˜™ÿ547ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ658ÿ››¤ÿZ±ÿbºÿþþþÿþþþÿþþþÿþþþÿöööÿ_^`ÿ$#&ÿ^]_ÿ·¶·ÿáááÿâââÿ¹¸¹ÿ^]hÿM*ÿW*ÿßÞîÿþþþÿþþþÿþþþÿþþþÿtsuÿ%$'ÿ¡ ¡ÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿæà÷ÿtG°ÿZ-“ÿ6.VÿwvxÿþþþÿþþþÿþþþÿÎÎÏÿ%$'ÿ„ƒ…ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿöõ÷ÿt?™ÿi4‰ÿÄ¿ìÿ‹ŠŒÿ%$'ÿÑÑÑÿþþþÿþþþÿ|{}ÿ*),ÿïîïÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿÄÁÀÿ™‡¬ÿÝÜõÿþþþÿòòòÿ-,/ÿ~€ÿþþþÿþþþÿNMPÿUUWÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüüüÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿ\\^ÿQPSÿþþþÿþþþÿBACÿeegÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿlkmÿDCFÿþþþÿþþþÿVUXÿIHKÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿPOQÿZY[ÿþþþÿþþþÿŒŒÿ%$'ÿÙÙÙÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿßÞßÿ&%(ÿ‘ÿþþþÿþþþÿãããÿ**,ÿZY[ÿúúûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüüüÿ__aÿ,+-ÿæææÿþþþÿþþþÿþþþÿœ›ÿ$#&ÿdcfÿìììÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿîîïÿihjÿ$#&ÿžžŸÿþþþÿþþþÿþþþÿþþþÿýýýÿ‘‘’ÿ&%(ÿ/.1ÿvvwÿ¡ ¢ÿ¢¡¢ÿxxyÿ103ÿ&%(ÿ“’”ÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿÎÎÎÿfegÿ*),ÿ%$'ÿ%$'ÿ+*-ÿgfhÿÎÎÎÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿøøøÿÝÝÞÿÞÝÞÿøøøÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬Aqpidc-0.16/src/windows/QpiddBroker.cpp0000664000076400007640000003447211650340075020342 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "config.h" #include "qpidd.h" #include "SCM.h" #include "qpid/Exception.h" #include "qpid/Options.h" #include "qpid/Plugin.h" #include "qpid/sys/IntegerTypes.h" #include "qpid/sys/windows/check.h" #include "qpid/broker/Broker.h" #include #include using namespace qpid::broker; BootstrapOptions::BootstrapOptions(const char* argv0) : qpid::Options("Options"), common("", QPIDD_CONF_FILE), module(QPIDD_MODULE_DIR), log(argv0) { add(common); add(module); add(log); } // Local functions to set and get the pid via a LockFile. namespace { const std::string TCP = "tcp"; // ShutdownEvent maintains an event that can be used to ask the broker // to stop. Analogous to sending SIGTERM/SIGINT to the posix broker. // The signal() method signals the event. class ShutdownEvent { public: ShutdownEvent(int port); ~ShutdownEvent(); void create(); void open(); void signal(); private: std::string eventName; protected: HANDLE event; }; class ShutdownHandler : public ShutdownEvent, public qpid::sys::Runnable { public: ShutdownHandler(int port, const boost::intrusive_ptr& b) : ShutdownEvent(port) { broker = b; } private: virtual void run(); // Inherited from Runnable boost::intrusive_ptr broker; }; ShutdownEvent::ShutdownEvent(int port) : event(NULL) { std::ostringstream name; name << "qpidd_" << port << std::ends; eventName = name.str(); } void ShutdownEvent::create() { // Auto-reset event in case multiple processes try to signal a // broker that doesn't respond for some reason. Initially not signaled. event = ::CreateEvent(NULL, false, false, eventName.c_str()); QPID_WINDOWS_CHECK_NULL(event); } void ShutdownEvent::open() { // TODO: Might need to search Global\\ name if unadorned name fails event = ::OpenEvent(EVENT_MODIFY_STATE, false, eventName.c_str()); QPID_WINDOWS_CHECK_NULL(event); } ShutdownEvent::~ShutdownEvent() { ::CloseHandle(event); event = NULL; } void ShutdownEvent::signal() { QPID_WINDOWS_CHECK_NOT(::SetEvent(event), 0); } void ShutdownHandler::run() { if (event == NULL) return; ::WaitForSingleObject(event, INFINITE); if (broker.get()) { broker->shutdown(); broker = 0; // Release the broker reference } } // Console control handler to properly handle ctl-c. int ourPort; BOOL CtrlHandler(DWORD ctl) { ShutdownEvent shutter(ourPort); // We have to have set up the port before interrupting shutter.open(); shutter.signal(); return ((ctl == CTRL_C_EVENT || ctl == CTRL_CLOSE_EVENT) ? TRUE : FALSE); } template class NamedSharedMemory { std::string name; HANDLE memory; T* data; public: NamedSharedMemory(const std::string&); ~NamedSharedMemory(); T& create(); T& get(); }; template NamedSharedMemory::NamedSharedMemory(const std::string& n) : name(n), memory(NULL), data(0) {} template NamedSharedMemory::~NamedSharedMemory() { if (data) ::UnmapViewOfFile(data); if (memory != NULL) ::CloseHandle(memory); } template T& NamedSharedMemory::create() { assert(memory == NULL); // Create named shared memory file memory = ::CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(T), name.c_str()); QPID_WINDOWS_CHECK_NULL(memory); // Map file into memory data = static_cast(::MapViewOfFile(memory, FILE_MAP_WRITE, 0, 0, 0)); QPID_WINDOWS_CHECK_NULL(data); return *data; } template T& NamedSharedMemory::get() { if (memory == NULL) { // TODO: Might need to search Global\\ name if unadorned name fails memory = ::OpenFileMapping(FILE_MAP_WRITE, FALSE, name.c_str()); QPID_WINDOWS_CHECK_NULL(memory); data = static_cast(::MapViewOfFile(memory, FILE_MAP_WRITE, 0, 0, 0)); QPID_WINDOWS_CHECK_NULL(data); } return *data; } std::string brokerInfoName(uint16_t port) { std::ostringstream path; path << "qpidd_info_" << port; return path.str(); } struct BrokerInfo { DWORD pid; }; // Service-related items. Only involved when running the broker as a Windows // service. const std::string svcName = "qpidd"; SERVICE_STATUS svcStatus; SERVICE_STATUS_HANDLE svcStatusHandle = 0; // This function is only called when the broker is run as a Windows // service. It receives control requests from Windows. VOID WINAPI SvcCtrlHandler(DWORD control) { switch(control) { case SERVICE_CONTROL_STOP: svcStatus.dwCurrentState = SERVICE_STOP_PENDING; svcStatus.dwControlsAccepted = 0; svcStatus.dwCheckPoint = 1; svcStatus.dwWaitHint = 5000; // 5 secs. ::SetServiceStatus(svcStatusHandle, &svcStatus); CtrlHandler(CTRL_C_EVENT); break; case SERVICE_CONTROL_INTERROGATE: break; default: break; } } VOID WINAPI ServiceMain(DWORD argc, LPTSTR *argv) { ::memset(&svcStatus, 0, sizeof(svcStatus)); svcStatusHandle = ::RegisterServiceCtrlHandler(svcName.c_str(), SvcCtrlHandler); svcStatus.dwServiceType = SERVICE_WIN32_OWN_PROCESS; svcStatus.dwCheckPoint = 1; svcStatus.dwWaitHint = 10000; // 10 secs. svcStatus.dwCurrentState = SERVICE_START_PENDING; ::SetServiceStatus(svcStatusHandle, &svcStatus); // QpiddBroker class resets state to running. svcStatus.dwWin32ExitCode = run_broker(argc, argv, true); svcStatus.dwCurrentState = SERVICE_STOPPED; svcStatus.dwCheckPoint = 0; svcStatus.dwWaitHint = 0; ::SetServiceStatus(svcStatusHandle, &svcStatus); } } // namespace struct ProcessControlOptions : public qpid::Options { bool quit; bool check; std::string transport; ProcessControlOptions() : qpid::Options("Process control options"), quit(false), check(false), transport(TCP) { addOptions() ("check,c", qpid::optValue(check), "Prints the broker's process ID to stdout and returns 0 if the broker is running, otherwise returns 1") ("transport", qpid::optValue(transport, "TRANSPORT"), "The transport for which to return the port") ("quit,q", qpid::optValue(quit), "Tells the broker to shut down"); } }; struct ServiceOptions : public qpid::Options { bool install; bool start; bool stop; bool uninstall; bool daemon; std::string startType; std::string startArgs; std::string account; std::string password; std::string depends; ServiceOptions() : qpid::Options("Service options"), install(false), start(false), stop(false), uninstall(false), daemon(false), startType("demand"), startArgs(""), account("NT AUTHORITY\\LocalService"), password(""), depends("") { addOptions() ("install", qpid::optValue(install), "Install as service") ("start-type", qpid::optValue(startType, "auto|demand|disabled"), "Service start type\nApplied at install time only.") ("arguments", qpid::optValue(startArgs, "COMMAND LINE ARGS"), "Arguments to pass when service auto-starts") ("account", qpid::optValue(account, "(LocalService)"), "Account to run as, default is LocalService\nApplied at install time only.") ("password", qpid::optValue(password, "PASSWORD"), "Account password, if needed\nApplied at install time only.") ("depends", qpid::optValue(depends, "(comma delimited list)"), "Names of services that must start before this service\nApplied at install time only.") ("start", qpid::optValue(start), "Start the service.") ("stop", qpid::optValue(stop), "Stop the service.") ("uninstall", qpid::optValue(uninstall), "Uninstall the service."); } }; struct QpiddWindowsOptions : public QpiddOptionsPrivate { ProcessControlOptions control; ServiceOptions service; QpiddWindowsOptions(QpiddOptions *parent) : QpiddOptionsPrivate(parent) { parent->add(service); parent->add(control); } }; QpiddOptions::QpiddOptions(const char* argv0) : qpid::Options("Options"), common("", QPIDD_CONF_FILE), module(QPIDD_MODULE_DIR), log(argv0) { add(common); add(module); add(broker); add(log); platform.reset(new QpiddWindowsOptions(this)); qpid::Plugin::addOptions(*this); } void QpiddOptions::usage() const { std::cout << "Usage: qpidd [OPTIONS]" << std::endl << std::endl << *this << std::endl; } int QpiddBroker::execute (QpiddOptions *options) { // If running as a service, bump the status checkpoint to let SCM know // we're still making progress. if (svcStatusHandle != 0) { svcStatus.dwCheckPoint++; ::SetServiceStatus(svcStatusHandle, &svcStatus); } // Options that affect a running daemon. QpiddWindowsOptions *myOptions = reinterpret_cast(options->platform.get()); if (myOptions == 0) throw qpid::Exception("Internal error obtaining platform options"); if (myOptions->service.install) { // Handle start type DWORD startType; if (myOptions->service.startType.compare("demand") == 0) startType = SERVICE_DEMAND_START; else if (myOptions->service.startType.compare("auto") == 0) startType = SERVICE_AUTO_START; else if (myOptions->service.startType.compare("disabled") == 0) startType = SERVICE_DISABLED; else if (!myOptions->service.startType.empty()) throw qpid::Exception("Invalid service start type: " + myOptions->service.startType); // Install service and exit qpid::windows::SCM manager; manager.install(svcName, "Apache Qpid Message Broker", myOptions->service.startArgs, startType, myOptions->service.account, myOptions->service.password, myOptions->service.depends); return 0; } if (myOptions->service.start) { qpid::windows::SCM manager; manager.start(svcName); return 0; } if (myOptions->service.stop) { qpid::windows::SCM manager; manager.stop(svcName); return 0; } if (myOptions->service.uninstall) { qpid::windows::SCM manager; manager.uninstall(svcName); return 0; } if (myOptions->control.check || myOptions->control.quit) { // Relies on port number being set via --port or QPID_PORT env variable. NamedSharedMemory info(brokerInfoName(options->broker.port)); int pid = info.get().pid; if (pid < 0) return 1; if (myOptions->control.check) std::cout << pid << std::endl; if (myOptions->control.quit) { ShutdownEvent shutter(options->broker.port); shutter.open(); shutter.signal(); HANDLE brokerHandle = ::OpenProcess(SYNCHRONIZE, false, pid); QPID_WINDOWS_CHECK_NULL(brokerHandle); ::WaitForSingleObject(brokerHandle, INFINITE); ::CloseHandle(brokerHandle); } return 0; } boost::intrusive_ptr brokerPtr(new Broker(options->broker)); // Need the correct port number to use in the pid file name. if (options->broker.port == 0) options->broker.port = brokerPtr->getPort(myOptions->control.transport); BrokerInfo info; info.pid = ::GetCurrentProcessId(); NamedSharedMemory sharedInfo(brokerInfoName(options->broker.port)); sharedInfo.create() = info; // Allow the broker to receive a shutdown request via a qpidd --quit // command. Note that when the broker is run as a service this operation // should not be allowed. ourPort = options->broker.port; ShutdownHandler waitShut(ourPort, brokerPtr); waitShut.create(); qpid::sys::Thread waitThr(waitShut); // Wait for shutdown event ::SetConsoleCtrlHandler((PHANDLER_ROUTINE)CtrlHandler, TRUE); brokerPtr->accept(); std::cout << options->broker.port << std::endl; // If running as a service, tell SCM we're up. There's still a chance // that store recovery will drag out the time before the broker actually // responds to requests, but integrating that mechanism with the SCM // updating is probably more work than it's worth. if (svcStatusHandle != 0) { svcStatus.dwCheckPoint = 0; svcStatus.dwWaitHint = 0; svcStatus.dwControlsAccepted = SERVICE_ACCEPT_STOP; svcStatus.dwCurrentState = SERVICE_RUNNING; ::SetServiceStatus(svcStatusHandle, &svcStatus); } brokerPtr->run(); waitShut.signal(); // In case we shut down some other way waitThr.join(); return 0; } int main(int argc, char* argv[]) { // If started as a service, notify the SCM we're up. Else just run. // If as a service, StartServiceControlDispatcher doesn't return until // the service is stopped. SERVICE_TABLE_ENTRY dispatchTable[] = { { "", (LPSERVICE_MAIN_FUNCTION)ServiceMain }, { NULL, NULL } }; if (!StartServiceCtrlDispatcher(dispatchTable)) { DWORD err = ::GetLastError(); if (err == ERROR_FAILED_SERVICE_CONTROLLER_CONNECT) // Run as console return run_broker(argc, argv); throw QPID_WINDOWS_ERROR(err); } return 0; } qpidc-0.16/src/windows/SCM.cpp0000664000076400007640000002755611650340075016563 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/log/Statement.h" #include "qpid/sys/windows/check.h" #include "SCM.h" #pragma comment(lib, "advapi32.lib") namespace { // Container that will close a SC_HANDLE upon destruction. class AutoServiceHandle { public: AutoServiceHandle(SC_HANDLE h_ = NULL) : h(h_) {} ~AutoServiceHandle() { if (h != NULL) ::CloseServiceHandle(h); } void release() { h = NULL; } void reset(SC_HANDLE newHandle) { if (h != NULL) ::CloseServiceHandle(h); h = newHandle; } operator SC_HANDLE() const { return h; } private: SC_HANDLE h; }; } namespace qpid { namespace windows { SCM::SCM() : scmHandle(NULL) { } SCM::~SCM() { if (NULL != scmHandle) ::CloseServiceHandle(scmHandle); } /** * Install this executable as a service */ void SCM::install(const string& serviceName, const string& serviceDesc, const string& args, DWORD startType, const string& account, const string& password, const string& depends) { // Handle dependent service name list; Windows wants a set of nul-separated // names ending with a double nul. string depends2 = depends; if (!depends2.empty()) { // CDL to null delimiter w/ trailing double null size_t p = 0; while ((p = depends2.find_first_of( ',', p)) != string::npos) depends2.replace(p, 1, 1, '\0'); depends2.push_back('\0'); depends2.push_back('\0'); } #if 0 // I'm nervous about adding a user/password check here. Is this a // potential attack vector, letting users check passwords without // control? -Steve Huston, Feb 24, 2011 // Validate account, password HANDLE hToken = NULL; bool logStatus = false; if (!account.empty() && !password.empty() && !(logStatus = ::LogonUserA(account.c_str(), "", password.c_str(), LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &hToken ) != 0)) std::cout << "warning: supplied account & password failed with LogonUser." << std::endl; if (logStatus) ::CloseHandle(hToken); #endif // Get fully qualified .exe name char myPath[MAX_PATH]; DWORD myPathLength = ::GetModuleFileName(NULL, myPath, MAX_PATH); QPID_WINDOWS_CHECK_NOT(myPathLength, 0); string imagePath(myPath, myPathLength); if (!args.empty()) imagePath += " " + args; // Ensure there's a handle to the SCM database. openSvcManager(); // Create the service SC_HANDLE svcHandle; svcHandle = ::CreateService(scmHandle, // SCM database serviceName.c_str(), // name of service serviceDesc.c_str(), // name to display SERVICE_ALL_ACCESS, // desired access SERVICE_WIN32_OWN_PROCESS, // service type startType, // start type SERVICE_ERROR_NORMAL, // error cntrl type imagePath.c_str(), // path to service's binary w/ optional arguments NULL, // no load ordering group NULL, // no tag identifier depends2.empty() ? NULL : depends2.c_str(), account.empty() ? NULL : account.c_str(), // account name, or NULL for LocalSystem password.empty() ? NULL : password.c_str()); // password, or NULL for none QPID_WINDOWS_CHECK_NULL(svcHandle); ::CloseServiceHandle(svcHandle); QPID_LOG(info, "Service installed successfully"); } /** * */ void SCM::uninstall(const string& serviceName) { // Ensure there's a handle to the SCM database. openSvcManager(); AutoServiceHandle svc(::OpenService(scmHandle, serviceName.c_str(), DELETE)); QPID_WINDOWS_CHECK_NULL((SC_HANDLE)svc); QPID_WINDOWS_CHECK_NOT(::DeleteService(svc), 0); QPID_LOG(info, "Service deleted successfully."); } /** * Attempt to start the service. */ void SCM::start(const string& serviceName) { // Ensure we have a handle to the SCM database. openSvcManager(); // Get a handle to the service. AutoServiceHandle svc(::OpenService(scmHandle, serviceName.c_str(), SERVICE_ALL_ACCESS)); QPID_WINDOWS_CHECK_NULL(svc); // Check the status in case the service is not stopped. DWORD state = waitForStateChangeFrom(svc, SERVICE_STOP_PENDING); if (state == SERVICE_STOP_PENDING) throw qpid::Exception("Timed out waiting for running service to stop."); // Attempt to start the service. QPID_WINDOWS_CHECK_NOT(::StartService(svc, 0, NULL), 0); QPID_LOG(info, "Service start pending..."); // Check the status until the service is no longer start pending. state = waitForStateChangeFrom(svc, SERVICE_START_PENDING); // Determine whether the service is running. if (state == SERVICE_RUNNING) { QPID_LOG(info, "Service started successfully"); } else { throw qpid::Exception(QPID_MSG("Service not yet running; state now " << state)); } } /** * */ void SCM::stop(const string& serviceName) { // Ensure a handle to the SCM database. openSvcManager(); // Get a handle to the service. AutoServiceHandle svc(::OpenService(scmHandle, serviceName.c_str(), SERVICE_STOP | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS)); QPID_WINDOWS_CHECK_NULL(svc); // Make sure the service is not already stopped; if it's stop-pending, // wait for it to finalize. DWORD state = waitForStateChangeFrom(svc, SERVICE_STOP_PENDING); if (state == SERVICE_STOPPED) { QPID_LOG(info, "Service is already stopped"); return; } // If the service is running, dependencies must be stopped first. std::auto_ptr deps; DWORD numDeps = getDependentServices(svc, deps); for (DWORD i = 0; i < numDeps; i++) stop(deps.get()[i].lpServiceName); // Dependents stopped; send a stop code to the service. SERVICE_STATUS_PROCESS ssp; if (!::ControlService(svc, SERVICE_CONTROL_STOP, (LPSERVICE_STATUS)&ssp)) throw qpid::Exception(QPID_MSG("Stopping " << serviceName << ": " << qpid::sys::strError(::GetLastError()))); // Wait for the service to stop. state = waitForStateChangeFrom(svc, SERVICE_STOP_PENDING); if (state == SERVICE_STOPPED) QPID_LOG(info, QPID_MSG("Service " << serviceName << " stopped successfully.")); } /** * */ void SCM::openSvcManager() { if (NULL != scmHandle) return; scmHandle = ::OpenSCManager(NULL, // local computer NULL, // ServicesActive database SC_MANAGER_ALL_ACCESS); // Rights QPID_WINDOWS_CHECK_NULL(scmHandle); } DWORD SCM::waitForStateChangeFrom(SC_HANDLE svc, DWORD originalState) { SERVICE_STATUS_PROCESS ssStatus; DWORD bytesNeeded; DWORD waitTime; if (!::QueryServiceStatusEx(svc, // handle to service SC_STATUS_PROCESS_INFO, // information level (LPBYTE)&ssStatus, // address of structure sizeof(ssStatus), // size of structure &bytesNeeded)) // size needed if buffer is too small throw QPID_WINDOWS_ERROR(::GetLastError()); // Save the tick count and initial checkpoint. DWORD startTickCount = ::GetTickCount(); DWORD oldCheckPoint = ssStatus.dwCheckPoint; // Wait for the service to change out of the noted state. while (ssStatus.dwCurrentState == originalState) { // Do not wait longer than the wait hint. A good interval is // one-tenth of the wait hint but not less than 1 second // and not more than 10 seconds. waitTime = ssStatus.dwWaitHint / 10; if (waitTime < 1000) waitTime = 1000; else if (waitTime > 10000) waitTime = 10000; ::Sleep(waitTime); // Check the status until the service is no longer stop pending. if (!::QueryServiceStatusEx(svc, SC_STATUS_PROCESS_INFO, (LPBYTE) &ssStatus, sizeof(ssStatus), &bytesNeeded)) throw QPID_WINDOWS_ERROR(::GetLastError()); if (ssStatus.dwCheckPoint > oldCheckPoint) { // Continue to wait and check. startTickCount = ::GetTickCount(); oldCheckPoint = ssStatus.dwCheckPoint; } else { if ((::GetTickCount() - startTickCount) > ssStatus.dwWaitHint) break; } } return ssStatus.dwCurrentState; } /** * Get the services that depend on @arg svc. All dependent service info * is returned in an array of ENUM_SERVICE_STATUS structures via @arg deps. * * @retval The number of dependent services. */ DWORD SCM::getDependentServices(SC_HANDLE svc, std::auto_ptr& deps) { DWORD bytesNeeded; DWORD numEntries; // Pass a zero-length buffer to get the required buffer size. if (::EnumDependentServices(svc, SERVICE_ACTIVE, 0, 0, &bytesNeeded, &numEntries)) { // If the Enum call succeeds, then there are no dependent // services, so do nothing. return 0; } if (::GetLastError() != ERROR_MORE_DATA) throw QPID_WINDOWS_ERROR((::GetLastError())); // Allocate a buffer for the dependencies. deps.reset((LPENUM_SERVICE_STATUS)(new char[bytesNeeded])); // Enumerate the dependencies. if (!::EnumDependentServices(svc, SERVICE_ACTIVE, deps.get(), bytesNeeded, &bytesNeeded, &numEntries)) throw QPID_WINDOWS_ERROR((::GetLastError())); return numEntries; } } } // namespace qpid::windows qpidc-0.16/src/config.h.cmake0000664000076400007640000000441111720775631016431 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /* * This file is automatically generated and will be overwritten by the * next CMake invocation. */ #ifndef QPID_CONFIG_H #define QPID_CONFIG_H // PACKAGE_NAME and PACKAGE_VERSION are carry-overs from the autoconf world. // They tend to cause confusion and problems when mixing headers from multiple // autoconf-configured packages, so it's best to remove these in favor of // Qpid-specific names as soon as the autoconf stuff is removed. #define PACKAGE_NAME "${CMAKE_PROJECT_NAME}" #define PACKAGE_VERSION "${qpidc_version}" #cmakedefine QPIDC_CONF_FILE "${QPIDC_CONF_FILE}" #cmakedefine QPIDD_CONF_FILE "${QPIDD_CONF_FILE}" #cmakedefine QPIDC_MODULE_DIR "${QPIDC_MODULE_DIR}" #cmakedefine QPIDD_MODULE_DIR "${QPIDD_MODULE_DIR}" #cmakedefine QPID_LIBEXEC_DIR "${QPID_LIBEXEC_DIR}" #define QPID_SHLIB_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}" #define QPID_MODULE_PREFIX #cmakedefine QPID_DEBUG_POSTFIX "${QPID_DEBUG_POSTFIX}" #if defined(QPID_DEBUG_POSTFIX) && defined (_DEBUG) # define QPID_SHLIB_POSTFIX QPID_DEBUG_POSTFIX # define QPID_MODULE_POSTFIX QPID_DEBUG_POSTFIX #else # define QPID_SHLIB_POSTFIX # define QPID_MODULE_POSTFIX #endif #define QPID_SHLIB_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}" #define QPID_MODULE_SUFFIX "${CMAKE_SHARED_LIBRARY_SUFFIX}" #cmakedefine QPID_HAS_CLOCK_GETTIME #cmakedefine BROKER_SASL_NAME "${BROKER_SASL_NAME}" #cmakedefine HAVE_SASL ${HAVE_SASL} #cmakedefine HAVE_OPENAIS_CPG_H ${HAVE_OPENAIS_CPG_H} #cmakedefine HAVE_COROSYNC_CPG_H ${HAVE_COROSYNC_CPG_H} #cmakedefine HAVE_LIBCMAN_H ${HAVE_LIBCMAN_H} #cmakedefine HAVE_SYS_SDT_H ${HAVE_SYS_SDT_H} #cmakedefine HAVE_LOG_AUTHPRIV #cmakedefine HAVE_LOG_FTP #endif /* QPID_CONFIG_H */ qpidc-0.16/src/qmf.mk0000664000076400007640000001161611721257043015046 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # qmf library makefile fragment, to be included in Makefile.am # lib_LTLIBRARIES += \ libqmf.la \ libqmfengine.la \ libqmf2.la # # Public headers for the QMF API # QMF_API = \ ../include/qpid/agent/ManagementAgent.h \ ../include/qpid/agent/QmfAgentImportExport.h # # Public headers for the QMF2 API # QMF2_API = \ ../include/qmf/AgentEvent.h \ ../include/qmf/Agent.h \ ../include/qmf/AgentSession.h \ ../include/qmf/ConsoleEvent.h \ ../include/qmf/ConsoleSession.h \ ../include/qmf/DataAddr.h \ ../include/qmf/Data.h \ ../include/qmf/posix/EventNotifier.h \ ../include/qmf/exceptions.h \ ../include/qmf/Handle.h \ ../include/qmf/ImportExport.h \ ../include/qmf/Query.h \ ../include/qmf/Schema.h \ ../include/qmf/SchemaId.h \ ../include/qmf/SchemaMethod.h \ ../include/qmf/SchemaProperty.h \ ../include/qmf/SchemaTypes.h \ ../include/qmf/Subscription.h # # Public headers for the QMF Engine API # QMF_ENGINE_API = \ ../include/qmf/engine/Agent.h \ ../include/qmf/engine/ConnectionSettings.h \ ../include/qmf/engine/Console.h \ ../include/qmf/engine/Event.h \ ../include/qmf/engine/Message.h \ ../include/qmf/engine/Object.h \ ../include/qmf/engine/ObjectId.h \ ../include/qmf/engine/QmfEngineImportExport.h \ ../include/qmf/engine/Query.h \ ../include/qmf/engine/ResilientConnection.h \ ../include/qmf/engine/Schema.h \ ../include/qmf/engine/Typecode.h \ ../include/qmf/engine/Value.h # Public header files nobase_include_HEADERS += \ $(QMF_API) \ $(QMF_ENGINE_API) \ $(QMF2_API) libqmf_la_SOURCES = \ $(QMF_API) \ qpid/agent/ManagementAgentImpl.cpp \ qpid/agent/ManagementAgentImpl.h libqmf2_la_SOURCES = \ $(QMF2_API) \ qmf/agentCapability.h \ qmf/Agent.cpp \ qmf/AgentEvent.cpp \ qmf/AgentEventImpl.h \ qmf/AgentImpl.h \ qmf/AgentSession.cpp \ qmf/AgentSessionImpl.h \ qmf/AgentSubscription.cpp \ qmf/AgentSubscription.h \ qmf/BrokerImportExport.h \ qmf/ConsoleEvent.cpp \ qmf/ConsoleEventImpl.h \ qmf/ConsoleSession.cpp \ qmf/ConsoleSessionImpl.h \ qmf/constants.cpp \ qmf/constants.h \ qmf/DataAddr.cpp \ qmf/DataAddrImpl.h \ qmf/Data.cpp \ qmf/DataImpl.h \ qmf/EventNotifierImpl.cpp \ qmf/EventNotifierImpl.h \ qmf/exceptions.cpp \ qmf/Expression.cpp \ qmf/Expression.h \ qmf/Hash.cpp \ qmf/Hash.h \ qmf/PosixEventNotifier.cpp \ qmf/PosixEventNotifierImpl.cpp \ qmf/PosixEventNotifierImpl.h \ qmf/PrivateImplRef.h \ qmf/Query.cpp \ qmf/QueryImpl.h \ qmf/SchemaCache.cpp \ qmf/SchemaCache.h \ qmf/Schema.cpp \ qmf/SchemaId.cpp \ qmf/SchemaIdImpl.h \ qmf/SchemaImpl.h \ qmf/SchemaMethod.cpp \ qmf/SchemaMethodImpl.h \ qmf/SchemaProperty.cpp \ qmf/SchemaPropertyImpl.h \ qmf/Subscription.cpp \ qmf/SubscriptionImpl.h libqmfengine_la_SOURCES = \ $(QMF_ENGINE_API) \ qmf/engine/Agent.cpp \ qmf/engine/BrokerProxyImpl.cpp \ qmf/engine/BrokerProxyImpl.h \ qmf/engine/ConnectionSettingsImpl.cpp \ qmf/engine/ConnectionSettingsImpl.h \ qmf/engine/ConsoleImpl.cpp \ qmf/engine/ConsoleImpl.h \ qmf/engine/EventImpl.cpp \ qmf/engine/EventImpl.h \ qmf/engine/MessageImpl.cpp \ qmf/engine/MessageImpl.h \ qmf/engine/ObjectIdImpl.cpp \ qmf/engine/ObjectIdImpl.h \ qmf/engine/ObjectImpl.cpp \ qmf/engine/ObjectImpl.h \ qmf/engine/Protocol.cpp \ qmf/engine/Protocol.h \ qmf/engine/QueryImpl.cpp \ qmf/engine/QueryImpl.h \ qmf/engine/ResilientConnection.cpp \ qmf/engine/SequenceManager.cpp \ qmf/engine/SequenceManager.h \ qmf/engine/SchemaImpl.cpp \ qmf/engine/SchemaImpl.h \ qmf/engine/ValueImpl.cpp \ qmf/engine/ValueImpl.h libqmf_la_LIBADD = libqmfengine.la libqmf2_la_LIBADD = libqpidmessaging.la libqpidtypes.la libqmfengine_la_LIBADD = libqpidclient.la QMF_VERSION_INFO = 1:0:0 QMF2_VERSION_INFO = 1:0:0 QMFENGINE_VERSION_INFO = 1:1:0 libqmf_la_LDFLAGS = -version-info $(QMF_VERSION_INFO) libqmf2_la_LDFLAGS = -version-info $(QMF2_VERSION_INFO) libqmfengine_la_LDFLAGS = -version-info $(QMFENGINE_VERSION_INFO) pkgconfig_DATA += qmf2.pc qpidc-0.16/src/qmfc.mk0000664000076400007640000000372511463377073015224 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # qmf console library makefile fragment, to be included in Makefile.am # lib_LTLIBRARIES += libqmfconsole.la # Public header files. nobase_include_HEADERS += \ ../include/qpid/console/Agent.h \ ../include/qpid/console/Broker.h \ ../include/qpid/console/ClassKey.h \ ../include/qpid/console/ConsoleImportExport.h \ ../include/qpid/console/ConsoleListener.h \ ../include/qpid/console/Event.h \ ../include/qpid/console/Object.h \ ../include/qpid/console/ObjectId.h \ ../include/qpid/console/Package.h \ ../include/qpid/console/Schema.h \ ../include/qpid/console/SequenceManager.h \ ../include/qpid/console/SessionManager.h \ ../include/qpid/console/Value.h libqmfconsole_la_SOURCES = \ qpid/console/Agent.cpp \ qpid/console/Broker.cpp \ qpid/console/ClassKey.cpp \ qpid/console/Event.cpp \ qpid/console/Object.cpp \ qpid/console/ObjectId.cpp \ qpid/console/Package.cpp \ qpid/console/Schema.cpp \ qpid/console/SequenceManager.cpp \ qpid/console/SessionManager.cpp \ qpid/console/Value.cpp libqmfconsole_la_LIBADD = libqpidclient.la QMFCONSOLE_VERSION_INFO = 2:0:0 libqmfconsole_la_LDFLAGS = -version-info $(QMFCONSOLE_VERSION_INFO) qpidc-0.16/src/qpid/0000775000076400007640000000000011752725716014675 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/SharedObject.h0000664000076400007640000000332210607767363017405 0ustar00jrossjross00000000000000#ifndef _SharedObject_ #define _SharedObject_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include namespace qpid { /** * Template to enforce shared object conventions. * Shared object classes should inherit : public qpid::SharedObject * That ensures Foo: * - has typedef boost::shared_ptr shared_ptr * - has virtual destructor * - is boost::noncopyable (no default copy or assign) * - has a protected default constructor. * * Shared objects should not have public constructors. * Make constructors protected and provide public statc create() * functions that return a shared_ptr. */ template class SharedObject : private boost::noncopyable { public: typedef boost::shared_ptr shared_ptr; virtual ~SharedObject() {}; protected: SharedObject() {} }; } #endif /*!_SharedObject_*/ qpidc-0.16/src/qpid/sys/0000775000076400007640000000000011752725716015513 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/sys/Timer.cpp0000664000076400007640000001400311576211367017271 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Timer.h" #include "qpid/sys/Mutex.h" #include "qpid/log/Statement.h" #include using boost::intrusive_ptr; using std::max; namespace qpid { namespace sys { TimerTask::TimerTask(Duration timeout, const std::string& n) : name(n), sortTime(AbsTime::FarFuture()), period(timeout), nextFireTime(AbsTime::now(), timeout), cancelled(false) {} TimerTask::TimerTask(AbsTime time, const std::string& n) : name(n), sortTime(AbsTime::FarFuture()), period(0), nextFireTime(time), cancelled(false) {} TimerTask::~TimerTask() {} bool TimerTask::readyToFire() const { return !(nextFireTime > AbsTime::now()); } void TimerTask::fireTask() { cancelled = true; fire(); } // This can only be used to setup the next fire time. After the Timer has already fired void TimerTask::setupNextFire() { if (period && readyToFire()) { nextFireTime = max(AbsTime::now(), AbsTime(nextFireTime, period)); cancelled = false; } else { QPID_LOG(error, name << " couldn't setup next timer firing: " << Duration(nextFireTime, AbsTime::now()) << "[" << period << "]"); } } // Only allow tasks to be delayed void TimerTask::restart() { nextFireTime = max(nextFireTime, AbsTime(AbsTime::now(), period)); } void TimerTask::cancel() { ScopedLock l(callbackLock); cancelled = true; } void TimerTask::setFired() { // Set nextFireTime to just before now, making readyToFire() true. nextFireTime = AbsTime(sys::now(), Duration(-1)); } Timer::Timer() : active(false), late(50 * TIME_MSEC), overran(2 * TIME_MSEC), lateCancel(500 * TIME_MSEC), warn(5 * TIME_SEC) { start(); } Timer::~Timer() { stop(); } // TODO AStitcher 21/08/09 The threshholds for emitting warnings are a little arbitrary void Timer::run() { Monitor::ScopedLock l(monitor); while (active) { if (tasks.empty()) { monitor.wait(); } else { intrusive_ptr t = tasks.top(); tasks.pop(); assert(!(t->nextFireTime < t->sortTime)); // warn on extreme lateness AbsTime start(AbsTime::now()); Duration delay(t->sortTime, start); { ScopedLock l(t->callbackLock); if (t->cancelled) { { Monitor::ScopedUnlock u(monitor); drop(t); } if (delay > lateCancel) { QPID_LOG(debug, t->name << " cancelled timer woken up " << delay / TIME_MSEC << "ms late"); } continue; } else if(Duration(t->nextFireTime, start) >= 0) { { Monitor::ScopedUnlock u(monitor); fire(t); } // Warn if callback overran next timer's start. AbsTime end(AbsTime::now()); Duration overrun (0); if (!tasks.empty()) { overrun = Duration(tasks.top()->nextFireTime, end); } bool warningsEnabled; QPID_LOG_TEST(warning, warningsEnabled); if (warningsEnabled) { if (overrun > overran) { if (delay > overran) // if delay is significant to an overrun. warn.lateAndOverran(t->name, delay, overrun, Duration(start, end)); else warn.overran(t->name, overrun, Duration(start, end)); } else if (delay > late) warn.late(t->name, delay); } continue; } else { // If the timer was adjusted into the future it might no longer // be the next event, so push and then get top to make sure // You can only push events into the future t->sortTime = t->nextFireTime; tasks.push(t); } } assert(!tasks.empty()); monitor.wait(tasks.top()->sortTime); } } } void Timer::add(intrusive_ptr task) { Monitor::ScopedLock l(monitor); task->sortTime = task->nextFireTime; tasks.push(task); monitor.notify(); } void Timer::start() { Monitor::ScopedLock l(monitor); if (!active) { active = true; runner = Thread(this); } } void Timer::stop() { { Monitor::ScopedLock l(monitor); if (!active) return; active = false; monitor.notifyAll(); } runner.join(); } // Allow subclasses to override behavior when firing a task. void Timer::fire(boost::intrusive_ptr t) { try { t->fireTask(); } catch (const std::exception& e) { QPID_LOG(error, "Exception thrown by timer task " << t->getName() << ": " << e.what()); } } // Provided for subclasses: called when a task is droped. void Timer::drop(boost::intrusive_ptr) {} bool operator<(const intrusive_ptr& a, const intrusive_ptr& b) { // Lower priority if time is later return a.get() && b.get() && a->sortTime > b->sortTime; } }} qpidc-0.16/src/qpid/sys/AsynchIOHandler.cpp0000664000076400007640000001616711653514043021172 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/AsynchIOHandler.h" #include "qpid/sys/AsynchIO.h" #include "qpid/sys/Socket.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/framing/AMQP_HighestVersion.h" #include "qpid/framing/ProtocolInitiation.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace sys { // Buffer definition struct Buff : public AsynchIO::BufferBase { Buff() : AsynchIO::BufferBase(new char[65536], 65536) {} ~Buff() { delete [] bytes;} }; AsynchIOHandler::AsynchIOHandler(std::string id, ConnectionCodec::Factory* f) : identifier(id), aio(0), factory(f), codec(0), readError(false), isClient(false), readCredit(InfiniteCredit) {} AsynchIOHandler::~AsynchIOHandler() { if (codec) codec->closed(); delete codec; } void AsynchIOHandler::init(AsynchIO* a, int numBuffs) { aio = a; // Give connection some buffers to use for (int i = 0; i < numBuffs; i++) { aio->queueReadBuffer(new Buff); } } void AsynchIOHandler::write(const framing::ProtocolInitiation& data) { QPID_LOG(debug, "SENT [" << identifier << "]: INIT(" << data << ")"); AsynchIO::BufferBase* buff = aio->getQueuedBuffer(); if (!buff) buff = new Buff; framing::Buffer out(buff->bytes, buff->byteCount); data.encode(out); buff->dataCount = data.encodedSize(); aio->queueWrite(buff); } void AsynchIOHandler::abort() { // Don't disconnect if we're already disconnecting if (!readError) { aio->requestCallback(boost::bind(&AsynchIOHandler::eof, this, _1)); } } void AsynchIOHandler::activateOutput() { aio->notifyPendingWrite(); } // Input side void AsynchIOHandler::giveReadCredit(int32_t credit) { // Check whether we started in the don't about credit state if (readCredit.boolCompareAndSwap(InfiniteCredit, credit)) return; // TODO In theory should be able to use an atomic operation before taking the lock // but in practice there seems to be an unexplained race in that case ScopedLock l(creditLock); if (readCredit.fetchAndAdd(credit) != 0) return; assert(readCredit.get() >= 0); if (readCredit.get() != 0) aio->startReading(); } void AsynchIOHandler::readbuff(AsynchIO& , AsynchIO::BufferBase* buff) { if (readError) { return; } // Check here for read credit if (readCredit.get() != InfiniteCredit) { if (readCredit.get() == 0) { // FIXME aconway 2009-10-01: Workaround to avoid "false wakeups". // readbuff is sometimes called with no credit. // This should be fixed somewhere else to avoid such calls. aio->unread(buff); return; } // TODO In theory should be able to use an atomic operation before taking the lock // but in practice there seems to be an unexplained race in that case ScopedLock l(creditLock); if (--readCredit == 0) { assert(readCredit.get() >= 0); if (readCredit.get() == 0) { aio->stopReading(); } } } size_t decoded = 0; if (codec) { // Already initiated try { decoded = codec->decode(buff->bytes+buff->dataStart, buff->dataCount); }catch(const std::exception& e){ QPID_LOG(error, e.what()); readError = true; aio->queueWriteClose(); } }else{ framing::Buffer in(buff->bytes+buff->dataStart, buff->dataCount); framing::ProtocolInitiation protocolInit; if (protocolInit.decode(in)) { decoded = in.getPosition(); QPID_LOG(debug, "RECV [" << identifier << "]: INIT(" << protocolInit << ")"); try { codec = factory->create(protocolInit.getVersion(), *this, identifier, SecuritySettings()); if (!codec) { //TODO: may still want to revise this... //send valid version header & close connection. write(framing::ProtocolInitiation(framing::highestProtocolVersion)); readError = true; aio->queueWriteClose(); } } catch (const std::exception& e) { QPID_LOG(error, e.what()); readError = true; aio->queueWriteClose(); } } } // TODO: unreading needs to go away, and when we can cope // with multiple sub-buffers in the general buffer scheme, it will if (decoded != size_t(buff->dataCount)) { // Adjust buffer for used bytes and then "unread them" buff->dataStart += decoded; buff->dataCount -= decoded; aio->unread(buff); } else { // Give whole buffer back to aio subsystem aio->queueReadBuffer(buff); } } void AsynchIOHandler::eof(AsynchIO& a) { disconnect(a); readError = true; aio->queueWriteClose(); } void AsynchIOHandler::closedSocket(AsynchIO&, const Socket& s) { // If we closed with data still to send log a warning if (!aio->writeQueueEmpty()) { QPID_LOG(warning, "CLOSING [" << identifier << "] unsent data (probably due to client disconnect)"); } delete &s; aio->queueForDeletion(); delete this; } void AsynchIOHandler::disconnect(AsynchIO&) { QPID_LOG(debug, "DISCONNECTED [" << identifier << "]"); if (codec) codec->closed(); } // Notifications void AsynchIOHandler::nobuffs(AsynchIO&) { } void AsynchIOHandler::idle(AsynchIO&){ if (isClient && codec == 0) { codec = factory->create(*this, identifier, SecuritySettings()); write(framing::ProtocolInitiation(codec->getVersion())); return; } if (codec == 0) return; try { if (codec->canEncode()) { // Try and get a queued buffer if not then construct new one AsynchIO::BufferBase* buff = aio->getQueuedBuffer(); if (!buff) buff = new Buff; size_t encoded=codec->encode(buff->bytes, buff->byteCount); buff->dataCount = encoded; aio->queueWrite(buff); } if (codec->isClosed()) { readError = true; aio->queueWriteClose(); } } catch (const std::exception& e) { QPID_LOG(error, e.what()); readError = true; aio->queueWriteClose(); } } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/alloca.h0000664000076400007640000000230411647066673017121 0ustar00jrossjross00000000000000#ifndef QPID_SYS_ALLOCA_H #define QPID_SYS_ALLOCA_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #if (defined(_WINDOWS) || defined (WIN32)) # include # if defined(_MSC_VER) # ifdef alloc # undef alloc # endif # define alloc _alloc # ifdef alloca # undef alloca # endif # define alloca _alloca # endif #endif #if !defined _WINDOWS && !defined WIN32 # include #endif #endif /*!QPID_SYS_ALLOCA_H*/ qpidc-0.16/src/qpid/sys/TimeoutHandler.h0000664000076400007640000000203310533734621020575 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TimeoutHandler_ #define _TimeoutHandler_ namespace qpid { namespace sys { class TimeoutHandler { public: virtual void idleOut() = 0; virtual void idleIn() = 0; virtual ~TimeoutHandler(){} }; } } #endif qpidc-0.16/src/qpid/sys/PollableQueue.h0000664000076400007640000001236411617054025020415 0ustar00jrossjross00000000000000#ifndef QPID_SYS_POLLABLEQUEUE_H #define QPID_SYS_POLLABLEQUEUE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/PollableCondition.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Thread.h" #include #include #include #include #include "qpid/log/Statement.h" // FIXME aconway 2011-08-05: namespace qpid { namespace sys { class Poller; /** * A queue whose item processing is dispatched by sys::Poller. * Any thread can push to the queue; items pushed trigger an event the Poller * recognizes. When a Poller I/O thread dispatches the event, a * user-specified callback is invoked with all items on the queue. */ template class PollableQueue { public: typedef std::deque Batch; typedef T value_type; /** * Callback to process a batch of items from the queue. * * @param batch Queue of values to process. Any items remaining * on return from Callback are put back on the queue. * @return iterator pointing to the first un-processed item in batch. * Items from this point up to batch.end() are put back on the queue. */ typedef boost::function Callback; /** * Constructor; sets necessary parameters. * * @param cb Callback that will be called to process items on the * queue. Will be called from a Poller I/O thread. * @param poller Poller to use for dispatching queue events. */ PollableQueue(const Callback& cb, const boost::shared_ptr& poller); ~PollableQueue(); /** Push a value onto the queue. Thread safe */ void push(const T& t); /** Start polling. */ void start(); /** Stop polling and wait for the current callback, if any, to complete. */ void stop(); /** Are we currently stopped?*/ bool isStopped() const { ScopedLock l(lock); return stopped; } size_t size() { ScopedLock l(lock); return queue.size(); } bool empty() { ScopedLock l(lock); return queue.empty(); } /** * Allow any queued events to be processed; intended for calling * after all dispatch threads exit the Poller loop in order to * ensure clean shutdown with no events left on the queue. */ void shutdown(); private: typedef sys::Monitor::ScopedLock ScopedLock; typedef sys::Monitor::ScopedUnlock ScopedUnlock; void dispatch(PollableCondition& cond); void process(); mutable sys::Monitor lock; Callback callback; PollableCondition condition; Batch queue, batch; Thread dispatcher; bool stopped; }; template PollableQueue::PollableQueue( const Callback& cb, const boost::shared_ptr& p) : callback(cb), condition(boost::bind(&PollableQueue::dispatch, this, _1), p), stopped(true) { } template void PollableQueue::start() { ScopedLock l(lock); if (!stopped) return; stopped = false; if (!queue.empty()) condition.set(); } template PollableQueue::~PollableQueue() { } template void PollableQueue::push(const T& t) { ScopedLock l(lock); if (queue.empty() && !stopped) condition.set(); queue.push_back(t); } template void PollableQueue::dispatch(PollableCondition& cond) { ScopedLock l(lock); assert(!dispatcher); dispatcher = Thread::current(); process(); dispatcher = Thread(); if (queue.empty()) cond.clear(); if (stopped) lock.notifyAll(); } template void PollableQueue::process() { // Called with lock held while (!stopped && !queue.empty()) { assert(batch.empty()); batch.swap(queue); typename Batch::const_iterator putBack; { ScopedUnlock u(lock); // Allow concurrent push to queue. putBack = callback(batch); } // put back unprocessed items. queue.insert(queue.begin(), putBack, typename Batch::const_iterator(batch.end())); batch.clear(); } } template void PollableQueue::shutdown() { ScopedLock l(lock); process(); } template void PollableQueue::stop() { ScopedLock l(lock); if (stopped) return; condition.clear(); stopped = true; // Avoid deadlock if stop is called from the dispatch thread if (dispatcher && dispatcher != Thread::current()) while (dispatcher) lock.wait(); } }} // namespace qpid::sys #endif /*!QPID_SYS_POLLABLEQUEUE_H*/ qpidc-0.16/src/qpid/sys/ConnectionOutputHandler.h0000664000076400007640000000237211227113407022467 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ConnectionOutputHandler_ #define _ConnectionOutputHandler_ #include "qpid/framing/OutputHandler.h" #include "qpid/sys/OutputControl.h" namespace qpid { namespace sys { /** * Provides the output handler associated with a connection. */ class ConnectionOutputHandler : public virtual qpid::framing::OutputHandler, public OutputControl { public: virtual void close() = 0; virtual size_t getBuffered() const { return 0; } }; }} #endif qpidc-0.16/src/qpid/sys/OutputTask.h0000664000076400007640000000220011323664262017771 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _OutputTask_ #define _OutputTask_ namespace qpid { namespace sys { class OutputTask { public: virtual ~OutputTask() {} /** Generate some output. *@return true if output was generated, false if there is no work to do. */ virtual bool doOutput() = 0; }; } } #endif qpidc-0.16/src/qpid/sys/ProtocolFactory.h0000664000076400007640000000333611567535103021013 0ustar00jrossjross00000000000000#ifndef _sys_ProtocolFactory_h #define _sys_ProtocolFactory_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include "qpid/SharedObject.h" #include "qpid/sys/ConnectionCodec.h" #include namespace qpid { namespace sys { class Poller; class ProtocolFactory : public qpid::SharedObject { public: typedef boost::function2 ConnectFailedCallback; virtual ~ProtocolFactory() = 0; virtual uint16_t getPort() const = 0; virtual void accept(boost::shared_ptr, ConnectionCodec::Factory*) = 0; virtual void connect( boost::shared_ptr, const std::string& host, const std::string& port, ConnectionCodec::Factory* codec, ConnectFailedCallback failed) = 0; virtual bool supports(const std::string& /*capability*/) { return false; } }; inline ProtocolFactory::~ProtocolFactory() {} }} #endif //!_sys_ProtocolFactory_h qpidc-0.16/src/qpid/sys/Dispatcher.cpp0000664000076400007640000000205011227113407020263 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Dispatcher.h" #include namespace qpid { namespace sys { Dispatcher::Dispatcher(Poller::shared_ptr poller0) : poller(poller0) { } Dispatcher::~Dispatcher() { } void Dispatcher::run() { poller->run(); } }} qpidc-0.16/src/qpid/sys/DispatchHandle.h0000664000076400007640000001155211231752222020523 0ustar00jrossjross00000000000000#ifndef _sys_DispatchHandle_h #define _sys_DispatchHandle_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Poller.h" #include "qpid/sys/Mutex.h" #include "qpid/CommonImportExport.h" #include #include namespace qpid { namespace sys { class DispatchHandleRef; /** * In order to have your own handle (file descriptor on Unix) watched by the poller * you need to: * * - Subclass IOHandle, in the constructor supply an appropriate * IOHandlerPrivate object for the platform. * * - Construct a DispatchHandle passing it your IOHandle and * callback functions for read, write and disconnect events. * * - Ensure the DispatchHandle is not deleted until the poller is no longer using it. * TODO: astitcher document DispatchHandleRef to simplify this. * * When an event occurs on the handle, the poller calls the relevant callback and * stops watching that handle. Your callback can call rewatch() or related functions * to re-enable polling. */ class DispatchHandle : public PollerHandle { friend class DispatchHandleRef; public: typedef boost::function1 Callback; typedef std::queue CallbackQueue; private: Callback readableCallback; Callback writableCallback; Callback disconnectedCallback; CallbackQueue interruptedCallbacks; CallbackQueue callbacks; // Double buffer Poller::shared_ptr poller; Mutex stateLock; enum { IDLE, STOPPING, WAITING, CALLING, DELETING } state; public: /** * Provide a handle to poll and a set of callbacks. Note * callbacks can be 0, meaning you are not interested in that * event. * *@param h: the handle to watch. The IOHandle encapsulates a * platfrom-specific handle to an IO object (e.g. a file descriptor * on Unix.) *@param rCb Callback called when the handle is readable. *@param wCb Callback called when the handle is writable. *@param dCb Callback called when the handle is disconnected. */ QPID_COMMON_EXTERN DispatchHandle(const IOHandle& h, Callback rCb, Callback wCb, Callback dCb); QPID_COMMON_EXTERN ~DispatchHandle(); /** Add this DispatchHandle to the poller to be watched. */ QPID_COMMON_EXTERN void startWatch(Poller::shared_ptr poller); /** Resume watching for all non-0 callbacks. */ QPID_COMMON_EXTERN void rewatch(); /** Resume watching for read only. */ QPID_COMMON_EXTERN void rewatchRead(); /** Resume watching for write only. */ QPID_COMMON_EXTERN void rewatchWrite(); /** Stop watching temporarily. The DispatchHandle remains associated with the poller and can be re-activated using rewatch. */ QPID_COMMON_EXTERN void unwatch(); /** Stop watching for read */ QPID_COMMON_EXTERN void unwatchRead(); /** Stop watching for write */ QPID_COMMON_EXTERN void unwatchWrite(); /** Stop watching permanently. Disassociates from the poller. */ QPID_COMMON_EXTERN void stopWatch(); /** Interrupt watching this handle and make a serialised callback that respects the * same exclusivity guarantees as the other callbacks */ QPID_COMMON_EXTERN void call(Callback iCb); protected: QPID_COMMON_EXTERN void doDelete(); private: QPID_COMMON_EXTERN void processEvent(Poller::EventType dir); }; class DispatchHandleRef { DispatchHandle* ref; public: typedef boost::function1 Callback; DispatchHandleRef(const IOHandle& h, Callback rCb, Callback wCb, Callback dCb) : ref(new DispatchHandle(h, rCb, wCb, dCb)) {} ~DispatchHandleRef() { ref->doDelete(); } void startWatch(Poller::shared_ptr poller) { ref->startWatch(poller); } void rewatch() { ref->rewatch(); } void rewatchRead() { ref->rewatchRead(); } void rewatchWrite() { ref->rewatchWrite(); } void unwatch() { ref->unwatch(); } void unwatchRead() { ref->unwatchRead(); } void unwatchWrite() { ref->unwatchWrite(); } void stopWatch() { ref->stopWatch(); } void call(Callback iCb) { ref->call(iCb); } }; }} #endif // _sys_DispatchHandle_h qpidc-0.16/src/qpid/sys/ConnectionOutputHandlerPtr.h0000664000076400007640000000374611227113407023163 0ustar00jrossjross00000000000000#ifndef QPID_SYS_CONNECTIONOUTPUTHANDLERPTR_H #define QPID_SYS_CONNECTIONOUTPUTHANDLERPTR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ConnectionOutputHandler.h" namespace qpid { namespace sys { /** * A ConnectionOutputHandler that delegates to another * ConnectionOutputHandler. Allows the "real" ConnectionOutputHandler * to be changed without updating all the pointers/references * using the ConnectionOutputHandlerPtr */ class ConnectionOutputHandlerPtr : public ConnectionOutputHandler { public: ConnectionOutputHandlerPtr(ConnectionOutputHandler* p) : next(p) { assert(next); } void set(ConnectionOutputHandler* p) { next = p; assert(next); } ConnectionOutputHandler* get() { return next; } const ConnectionOutputHandler* get() const { return next; } void close() { next->close(); } size_t getBuffered() const { return next->getBuffered(); } void abort() { next->abort(); } void activateOutput() { next->activateOutput(); } void giveReadCredit(int32_t credit) { next->giveReadCredit(credit); } void send(framing::AMQFrame& f) { next->send(f); } private: ConnectionOutputHandler* next; }; }} // namespace qpid::sys #endif /*!QPID_SYS_CONNECTIONOUTPUTHANDLERPTR_H*/ qpidc-0.16/src/qpid/sys/uuid.h0000664000076400007640000000143111247057701016620 0ustar00jrossjross00000000000000#ifndef _sys_uuid_h #define _sys_uuid_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifdef _WIN32 # include "qpid/sys/windows/uuid.h" #else # include #endif /* _WIN32 */ #endif /* _sys_uuid_h */ qpidc-0.16/src/qpid/sys/TimerWarnings.cpp0000664000076400007640000000576711632175407021020 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "TimerWarnings.h" #include "qpid/log/Statement.h" namespace qpid { namespace sys { TimerWarnings::TimerWarnings(Duration reportInterval) : interval(reportInterval), nextReport(now(), reportInterval) {} void TimerWarnings::late(const std::string& task, Duration delay) { taskStats[task].lateDelay.add(delay); log(); } void TimerWarnings::overran(const std::string& task, Duration overrun, Duration time) { taskStats[task].overranOverrun.add(overrun); taskStats[task].overranTime.add(time); log(); } void TimerWarnings::lateAndOverran( const std::string& task, Duration delay, Duration overrun, Duration time) { taskStats[task].lateAndOverranDelay.add(delay); taskStats[task].lateAndOverranOverrun.add(overrun); taskStats[task].lateAndOverranTime.add(time); log(); } void TimerWarnings::log() { if (!taskStats.empty() && nextReport < now()) { for (TaskStatsMap::iterator i = taskStats.begin(); i != taskStats.end(); ++i) { std::string task = i->first; TaskStats& stats = i->second; if (stats.lateDelay.count) QPID_LOG(info, task << " task late " << stats.lateDelay.count << " times by " << stats.lateDelay.average()/TIME_MSEC << "ms on average."); if (stats.overranOverrun.count) QPID_LOG(info, task << " task overran " << stats.overranOverrun.count << " times by " << stats.overranOverrun.average()/TIME_MSEC << "ms (taking " << stats.overranTime.average() << "ns) on average."); if (stats.lateAndOverranOverrun.count) QPID_LOG(info, task << " task late and overran " << stats.lateAndOverranOverrun.count << " times: late " << stats.lateAndOverranDelay.average()/TIME_MSEC << "ms, overran " << stats.lateAndOverranOverrun.average()/TIME_MSEC << "ms (taking " << stats.lateAndOverranTime.average() << "ns) on average."); } nextReport = AbsTime(now(), interval); taskStats.clear(); } } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/ConnectionInputHandlerFactory.h0000664000076400007640000000314311056036605023617 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ConnectionInputHandlerFactory_ #define _ConnectionInputHandlerFactory_ #include #include namespace qpid { namespace sys { class ConnectionOutputHandler; class ConnectionInputHandler; /** * Callback interface used by the Acceptor to * create a ConnectionInputHandler for each new connection. */ class ConnectionInputHandlerFactory : private boost::noncopyable { public: /** *@param out handler for connection output. *@param id identify the connection for management purposes. */ virtual ConnectionInputHandler* create(ConnectionOutputHandler* out, const std::string& id, bool isClient) = 0; virtual ~ConnectionInputHandlerFactory(){} }; }} #endif qpidc-0.16/src/qpid/sys/TCPIOPlugin.cpp0000664000076400007640000001601411654067027020251 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ProtocolFactory.h" #include "qpid/sys/AsynchIOHandler.h" #include "qpid/sys/AsynchIO.h" #include "qpid/Plugin.h" #include "qpid/sys/Socket.h" #include "qpid/sys/SocketAddress.h" #include "qpid/sys/Poller.h" #include "qpid/broker/Broker.h" #include "qpid/log/Statement.h" #include #include namespace qpid { namespace sys { class AsynchIOProtocolFactory : public ProtocolFactory { const bool tcpNoDelay; boost::ptr_vector listeners; boost::ptr_vector acceptors; uint16_t listeningPort; public: AsynchIOProtocolFactory(const std::string& host, const std::string& port, int backlog, bool nodelay, bool shouldListen); void accept(Poller::shared_ptr, ConnectionCodec::Factory*); void connect(Poller::shared_ptr, const std::string& host, const std::string& port, ConnectionCodec::Factory*, ConnectFailedCallback); uint16_t getPort() const; private: void established(Poller::shared_ptr, const Socket&, ConnectionCodec::Factory*, bool isClient); void connectFailed(const Socket&, int, const std::string&, ConnectFailedCallback); }; static bool sslMultiplexEnabled(void) { Options o; Plugin::addOptions(o); if (o.find_nothrow("ssl-multiplex", false)) { // This option is added by the SSL plugin when the SSL port // is configured to be the same as the main port. QPID_LOG(notice, "SSL multiplexing enabled"); return true; } return false; } // Static instance to initialise plugin static class TCPIOPlugin : public Plugin { void earlyInitialize(Target&) { } void initialize(Target& target) { broker::Broker* broker = dynamic_cast(&target); // Only provide to a Broker if (broker) { const broker::Broker::Options& opts = broker->getOptions(); // Check for SSL on the same port bool shouldListen = !sslMultiplexEnabled(); ProtocolFactory::shared_ptr protocolt( new AsynchIOProtocolFactory( "", boost::lexical_cast(opts.port), opts.connectionBacklog, opts.tcpNoDelay, shouldListen)); if (shouldListen) { QPID_LOG(notice, "Listening on TCP/TCP6 port " << protocolt->getPort()); } broker->registerProtocolFactory("tcp", protocolt); } } } tcpPlugin; AsynchIOProtocolFactory::AsynchIOProtocolFactory(const std::string& host, const std::string& port, int backlog, bool nodelay, bool shouldListen) : tcpNoDelay(nodelay) { if (!shouldListen) { listeningPort = boost::lexical_cast(port); return; } SocketAddress sa(host, port); // We must have at least one resolved address QPID_LOG(info, "Listening to: " << sa.asString()) Socket* s = new Socket; uint16_t lport = s->listen(sa, backlog); QPID_LOG(debug, "Listened to: " << lport); listeners.push_back(s); listeningPort = lport; // Try any other resolved addresses while (sa.nextAddress()) { // Hack to ensure that all listening connections are on the same port sa.setAddrInfoPort(listeningPort); QPID_LOG(info, "Listening to: " << sa.asString()) Socket* s = new Socket; uint16_t lport = s->listen(sa, backlog); QPID_LOG(debug, "Listened to: " << lport); listeners.push_back(s); } } void AsynchIOProtocolFactory::established(Poller::shared_ptr poller, const Socket& s, ConnectionCodec::Factory* f, bool isClient) { AsynchIOHandler* async = new AsynchIOHandler(s.getFullAddress(), f); if (tcpNoDelay) { s.setTcpNoDelay(); QPID_LOG(info, "Set TCP_NODELAY on connection to " << s.getPeerAddress()); } if (isClient) async->setClient(); AsynchIO* aio = AsynchIO::create (s, boost::bind(&AsynchIOHandler::readbuff, async, _1, _2), boost::bind(&AsynchIOHandler::eof, async, _1), boost::bind(&AsynchIOHandler::disconnect, async, _1), boost::bind(&AsynchIOHandler::closedSocket, async, _1, _2), boost::bind(&AsynchIOHandler::nobuffs, async, _1), boost::bind(&AsynchIOHandler::idle, async, _1)); async->init(aio, 4); aio->start(poller); } uint16_t AsynchIOProtocolFactory::getPort() const { return listeningPort; // Immutable no need for lock. } void AsynchIOProtocolFactory::accept(Poller::shared_ptr poller, ConnectionCodec::Factory* fact) { for (unsigned i = 0; istart(poller); } catch (std::exception&) { // TODO: Design question - should we do the error callback and also throw? int errCode = socket->getError(); connectFailed(*socket, errCode, strError(errCode), failed); throw; } } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/windows/0000775000076400007640000000000011752725716017205 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/sys/windows/mingw32_compat.h0000664000076400007640000000252011564625557022211 0ustar00jrossjross00000000000000#ifndef _sys_windows_mingw32_compat #define _sys_windows_mingw32_compat /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifdef WIN32 #ifndef _MSC_VER // // The following definitions for extension function GUIDs and signatures are taken from // MswSock.h in the Windows32 SDK. These rightfully belong in the mingw32 version of // mswsock.h, but are not included presently. // #define WSAID_ACCEPTEX {0xb5367df1,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}} typedef BOOL (PASCAL *LPFN_ACCEPTEX)(SOCKET,SOCKET,PVOID,DWORD,DWORD,DWORD,LPDWORD,LPOVERLAPPED); #endif #endif #endif qpidc-0.16/src/qpid/sys/windows/SslAsynchIO.cpp0000664000076400007640000006056011454637563022060 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "SslAsynchIO.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Socket.h" #include "qpid/sys/Poller.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Time.h" #include "qpid/log/Statement.h" #include "qpid/sys/windows/check.h" // security.h needs to see this to distinguish from kernel use. #define SECURITY_WIN32 #include #include #undef SECURITY_WIN32 #include #include namespace { /* * To make the SSL encryption more efficient, set up a new BufferBase * that leaves room for the SSL header to be prepended and the SSL * trailer to be appended. * * This works by accepting a properly formed BufferBase, remembering it, * and resetting the members of this struct to reflect the reserved * header and trailer areas. It's only needed for giving buffers up to * the frame layer for writing into. */ struct SslIoBuff : public qpid::sys::AsynchIO::BufferBase { std::auto_ptr aioBuff; SslIoBuff (qpid::sys::AsynchIO::BufferBase *base, const SecPkgContext_StreamSizes &sizes) : qpid::sys::AsynchIO::BufferBase(&base->bytes[sizes.cbHeader], std::min(base->byteCount - sizes.cbHeader - sizes.cbTrailer, sizes.cbMaximumMessage)), aioBuff(base) {} ~SslIoBuff() {} qpid::sys::AsynchIO::BufferBase* release() { return aioBuff.release(); } }; } namespace qpid { namespace sys { namespace windows { SslAsynchIO::SslAsynchIO(const qpid::sys::Socket& s, CredHandle hCred, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb, BuffersEmptyCallback eCb, IdleCallback iCb, NegotiateDoneCallback nCb) : credHandle(hCred), aio(0), state(Negotiating), readCallback(rCb), idleCallback(iCb), negotiateDoneCallback(nCb), callbacksInProgress(0), queuedDelete(false), leftoverPlaintext(0) { SecInvalidateHandle(&ctxtHandle); peerAddress = s.getPeerAddress(); aio = qpid::sys::AsynchIO::create(s, boost::bind(&SslAsynchIO::sslDataIn, this, _1, _2), eofCb, disCb, cCb, eCb, boost::bind(&SslAsynchIO::idle, this, _1)); } SslAsynchIO::~SslAsynchIO() { if (leftoverPlaintext) { delete leftoverPlaintext; leftoverPlaintext = 0; } } void SslAsynchIO::queueForDeletion() { // This method effectively disconnects the layer above; pass it on the // AsynchIO and delete. aio->queueForDeletion(); queuedDelete = true; if (!callbacksInProgress) delete this; } void SslAsynchIO::start(qpid::sys::Poller::shared_ptr poller) { aio->start(poller); startNegotiate(); } void SslAsynchIO::queueReadBuffer(AsynchIO::BufferBase* buff) { aio->queueReadBuffer(buff); } void SslAsynchIO::unread(AsynchIO::BufferBase* buff) { // This is plaintext data being given back for more. Since it's already // decrypted, don't give it back to the aio layer; keep it to append // any new data for the upper layer. assert(buff); buff->squish(); assert(leftoverPlaintext == 0); leftoverPlaintext = buff; } void SslAsynchIO::queueWrite(AsynchIO::BufferBase* buff) { // @@TODO: Need to delay the write if the session is renegotiating. // Should not have gotten here without an SslIoBuff. This assert is // primarily to catch any stray cases where write is called with a buffer // not obtained via getQueuedBuffer. SslIoBuff *sslBuff = dynamic_cast(buff); assert(sslBuff != 0); // Encrypt and hand off to the io layer. Remember that the upper layer's // encoding was working on, and adjusting counts for, the SslIoBuff. // Update the count of the original BufferBase before handing off to // the I/O layer. buff = sslBuff->release(); SecBuffer buffs[4]; buffs[0].cbBuffer = schSizes.cbHeader; buffs[0].BufferType = SECBUFFER_STREAM_HEADER; buffs[0].pvBuffer = buff->bytes; // This space was left by SslIoBuff buffs[1].cbBuffer = sslBuff->dataCount; buffs[1].BufferType = SECBUFFER_DATA; buffs[1].pvBuffer = sslBuff->bytes; buffs[2].cbBuffer = schSizes.cbTrailer; buffs[2].BufferType = SECBUFFER_STREAM_TRAILER; buffs[2].pvBuffer = &sslBuff->bytes[sslBuff->dataCount]; buffs[3].cbBuffer = 0; buffs[3].BufferType = SECBUFFER_EMPTY; buffs[3].pvBuffer = 0; SecBufferDesc buffDesc; buffDesc.ulVersion = SECBUFFER_VERSION; buffDesc.cBuffers = 4; buffDesc.pBuffers = buffs; SECURITY_STATUS status = ::EncryptMessage(&ctxtHandle, 0, &buffDesc, 0); // EncryptMessage encrypts the data in place. The header and trailer // areas were left previously and must now be included in the updated // count of bytes to write to the peer. delete sslBuff; buff->dataCount = buffs[0].cbBuffer + buffs[1].cbBuffer + buffs[2].cbBuffer; aio->queueWrite(buff); } void SslAsynchIO::notifyPendingWrite() { aio->notifyPendingWrite(); } void SslAsynchIO::queueWriteClose() { if (state == Negotiating) { // Never got going, so don't bother trying to close SSL down orderly. state = ShuttingDown; aio->queueWriteClose(); return; } state = ShuttingDown; DWORD shutdown = SCHANNEL_SHUTDOWN; SecBuffer shutBuff; shutBuff.cbBuffer = sizeof(DWORD); shutBuff.BufferType = SECBUFFER_TOKEN; shutBuff.pvBuffer = &shutdown; SecBufferDesc desc; desc.ulVersion = SECBUFFER_VERSION; desc.cBuffers = 1; desc.pBuffers = &shutBuff; ::ApplyControlToken(&ctxtHandle, &desc); negotiateStep(0); // When the shutdown sequence is done, negotiateDone() will handle // shutting down aio. } bool SslAsynchIO::writeQueueEmpty() { return aio->writeQueueEmpty(); } /* * Initiate a read operation. AsynchIO::readComplete() will be * called when the read is complete and data is available. */ void SslAsynchIO::startReading() { aio->startReading(); } void SslAsynchIO::stopReading() { aio->stopReading(); } // Queue the specified callback for invocation from an I/O thread. void SslAsynchIO::requestCallback(RequestCallback callback) { aio->requestCallback(callback); } /** * Return a queued buffer read to put new data in for writing. * This method ALWAYS returns a SslIoBuff reflecting a BufferBase from * the aio layer that has header and trailer space reserved. */ AsynchIO::BufferBase* SslAsynchIO::getQueuedBuffer() { SslIoBuff *sslBuff = 0; BufferBase* buff = aio->getQueuedBuffer(); if (buff == 0) return 0; sslBuff = new SslIoBuff(buff, schSizes); return sslBuff; } unsigned int SslAsynchIO::getSslKeySize() { SecPkgContext_KeyInfo info; memset(&info, 0, sizeof(info)); ::QueryContextAttributes(&ctxtHandle, SECPKG_ATTR_KEY_INFO, &info); return info.KeySize; } void SslAsynchIO::negotiationDone() { switch(state) { case Negotiating: ::QueryContextAttributes(&ctxtHandle, SECPKG_ATTR_STREAM_SIZES, &schSizes); state = Running; if (negotiateDoneCallback) negotiateDoneCallback(SEC_E_OK); break; case Redo: state = Running; break; case ShuttingDown: aio->queueWriteClose(); break; default: assert(0); } } void SslAsynchIO::negotiationFailed(SECURITY_STATUS status) { QPID_LOG(notice, "SSL negotiation failed to " << peerAddress << ": " << qpid::sys::strError(status)); if (negotiateDoneCallback) negotiateDoneCallback(status); else queueWriteClose(); } void SslAsynchIO::sslDataIn(qpid::sys::AsynchIO& a, BufferBase *buff) { if (state != Running) { negotiateStep(buff); return; } // Decrypt the buffer; if there's legit data, pass it on through. // However, it's also possible that the peer hasn't supplied enough // data yet, or the session needs to be renegotiated, or the session // is ending. SecBuffer recvBuffs[4]; recvBuffs[0].cbBuffer = buff->dataCount; recvBuffs[0].BufferType = SECBUFFER_DATA; recvBuffs[0].pvBuffer = &buff->bytes[buff->dataStart]; recvBuffs[1].BufferType = SECBUFFER_EMPTY; recvBuffs[2].BufferType = SECBUFFER_EMPTY; recvBuffs[3].BufferType = SECBUFFER_EMPTY; SecBufferDesc buffDesc; buffDesc.ulVersion = SECBUFFER_VERSION; buffDesc.cBuffers = 4; buffDesc.pBuffers = recvBuffs; SECURITY_STATUS status = ::DecryptMessage(&ctxtHandle, &buffDesc, 0, NULL); if (status != SEC_E_OK) { if (status == SEC_E_INCOMPLETE_MESSAGE) { // Give the partially filled buffer back and get more data a.unread(buff); } else { // Don't need this any more... a.queueReadBuffer(buff); if (status == SEC_I_RENEGOTIATE) { state = Redo; negotiateStep(0); } else if (status == SEC_I_CONTEXT_EXPIRED) { queueWriteClose(); } else { throw QPID_WINDOWS_ERROR(status); } } return; } // All decrypted and verified... continue with AMQP. The recvBuffs have // been set up by DecryptMessage to demarcate the SSL header, data, and // trailer, as well as any extra data left over. Walk through and find // that info, adjusting the buff data accordingly to reflect only the // actual decrypted data. // If there's extra data, copy that out to a new buffer and run through // this method again. BufferBase *extraBuff = 0; for (int i = 0; i < 4; i++) { switch (recvBuffs[i].BufferType) { case SECBUFFER_STREAM_HEADER: buff->dataStart += recvBuffs[i].cbBuffer; // Fall through - also don't count these bytes as data case SECBUFFER_STREAM_TRAILER: buff->dataCount -= recvBuffs[i].cbBuffer; break; case SECBUFFER_EXTRA: // Very important to get this buffer from the downstream aio. // The ones constructed from the local getQueuedBuffer() are // restricted size for encrypting. However, data coming up from // TCP may have a bunch of SSL segments coalesced and be much // larger than the maximum single SSL segment. extraBuff = a.getQueuedBuffer(); if (0 == extraBuff) throw QPID_WINDOWS_ERROR(WSAENOBUFS); memmove(extraBuff->bytes, recvBuffs[i].pvBuffer, recvBuffs[i].cbBuffer); extraBuff->dataCount = recvBuffs[i].cbBuffer; break; default: break; } } // Since we've already taken (possibly) all the available bytes from the // aio layer, need to be sure that everything that's processable is // processed before returning back to aio. It could be that any // leftoverPlaintext data plus new buff data won't fit in one buffer, so // need to keep going around the input processing loop until either // all the bytes are gone, or there's less than a full frame remaining // (so we can count on more bytes being on the way via aio). do { BufferBase *temp = 0; // Now that buff reflects only decrypted data, see if there was any // partial data left over from last time. If so, append this new // data to that and release the current buff back to aio. Assume that // leftoverPlaintext was squished so the data starts at 0. if (leftoverPlaintext != 0) { // There is leftover data; append all the new data that will fit. int32_t count = buff->dataCount; if (leftoverPlaintext->dataCount + count > leftoverPlaintext->byteCount) count = (leftoverPlaintext->byteCount - leftoverPlaintext->dataCount); ::memmove(&leftoverPlaintext->bytes[leftoverPlaintext->dataCount], &buff->bytes[buff->dataStart], count); leftoverPlaintext->dataCount += count; buff->dataCount -= count; buff->dataStart += count; if (buff->dataCount == 0) { a.queueReadBuffer(buff); buff = 0; } // Prepare to pass the buffer up. Beware that the read callback // may do an unread(), so move the leftoverPlaintext pointer // out of the way. It also may release the buffer back to aio, // so in either event, the pointer passed to the callback is not // valid on return. temp = leftoverPlaintext; leftoverPlaintext = 0; } else { temp = buff; buff = 0; } if (readCallback) { // The callback guard here is to prevent an upcall from deleting // this out from under us via queueForDeletion(). ++callbacksInProgress; readCallback(*this, temp); --callbacksInProgress; } else a.queueReadBuffer(temp); // What else can we do with this??? } while (buff != 0); // Ok, the current decrypted data is done. If there was any extra data, // go back and handle that. if (extraBuff != 0) sslDataIn(a, extraBuff); // If the upper layer queued for delete, do that now that all the // callbacks are done. if (queuedDelete && callbacksInProgress == 0) delete this; } void SslAsynchIO::idle(qpid::sys::AsynchIO&) { // Don't relay idle indication to layer above until SSL session is up. if (state == Running) { state = Running; if (idleCallback) idleCallback(*this); } } /**************************************************/ ClientSslAsynchIO::ClientSslAsynchIO(const std::string& brokerHost, const qpid::sys::Socket& s, CredHandle hCred, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb, BuffersEmptyCallback eCb, IdleCallback iCb, NegotiateDoneCallback nCb) : SslAsynchIO(s, hCred, rCb, eofCb, disCb, cCb, eCb, iCb, nCb), serverHost(brokerHost) { } void ClientSslAsynchIO::startNegotiate() { // SEC_CHAR is non-const, so do all the typing here. SEC_CHAR *host = const_cast(serverHost.c_str()); // Need a buffer to receive the token to send to the server. BufferBase *buff = aio->getQueuedBuffer(); ULONG ctxtRequested = ISC_REQ_STREAM; ULONG ctxtAttrs; // sendBuffs gets information to forward to the peer. SecBuffer sendBuffs[2]; sendBuffs[0].cbBuffer = buff->byteCount; sendBuffs[0].BufferType = SECBUFFER_TOKEN; sendBuffs[0].pvBuffer = buff->bytes; sendBuffs[1].cbBuffer = 0; sendBuffs[1].BufferType = SECBUFFER_EMPTY; sendBuffs[1].pvBuffer = 0; SecBufferDesc sendBuffDesc; sendBuffDesc.ulVersion = SECBUFFER_VERSION; sendBuffDesc.cBuffers = 2; sendBuffDesc.pBuffers = sendBuffs; SECURITY_STATUS status = ::InitializeSecurityContext(&credHandle, NULL, host, ctxtRequested, 0, 0, NULL, 0, &ctxtHandle, &sendBuffDesc, &ctxtAttrs, NULL); if (status == SEC_I_CONTINUE_NEEDED) { buff->dataCount = sendBuffs[0].cbBuffer; aio->queueWrite(buff); } } void ClientSslAsynchIO::negotiateStep(BufferBase* buff) { // SEC_CHAR is non-const, so do all the typing here. SEC_CHAR *host = const_cast(serverHost.c_str()); ULONG ctxtRequested = ISC_REQ_STREAM; ULONG ctxtAttrs; // tokenBuffs describe the buffer that's coming in. It should have // a token from the SSL server. SecBuffer tokenBuffs[2]; tokenBuffs[0].cbBuffer = buff ? buff->dataCount : 0; tokenBuffs[0].BufferType = SECBUFFER_TOKEN; tokenBuffs[0].pvBuffer = buff ? buff->bytes : 0; tokenBuffs[1].cbBuffer = 0; tokenBuffs[1].BufferType = SECBUFFER_EMPTY; tokenBuffs[1].pvBuffer = 0; SecBufferDesc tokenBuffDesc; tokenBuffDesc.ulVersion = SECBUFFER_VERSION; tokenBuffDesc.cBuffers = 2; tokenBuffDesc.pBuffers = tokenBuffs; // Need a buffer to receive any token to send back to the server. BufferBase *sendbuff = aio->getQueuedBuffer(); // sendBuffs gets information to forward to the peer. SecBuffer sendBuffs[2]; sendBuffs[0].cbBuffer = sendbuff->byteCount; sendBuffs[0].BufferType = SECBUFFER_TOKEN; sendBuffs[0].pvBuffer = sendbuff->bytes; sendBuffs[1].cbBuffer = 0; sendBuffs[1].BufferType = SECBUFFER_EMPTY; sendBuffs[1].pvBuffer = 0; SecBufferDesc sendBuffDesc; sendBuffDesc.ulVersion = SECBUFFER_VERSION; sendBuffDesc.cBuffers = 2; sendBuffDesc.pBuffers = sendBuffs; SECURITY_STATUS status = ::InitializeSecurityContext(&credHandle, &ctxtHandle, host, ctxtRequested, 0, 0, &tokenBuffDesc, 0, NULL, &sendBuffDesc, &ctxtAttrs, NULL); if (status == SEC_E_INCOMPLETE_MESSAGE) { // Not enough - get more data from the server then try again. aio->unread(buff); aio->queueReadBuffer(sendbuff); // Don't need this one for now... return; } // Done with the buffer that came in... if (buff) aio->queueReadBuffer(buff); if (status == SEC_I_CONTINUE_NEEDED) { sendbuff->dataCount = sendBuffs[0].cbBuffer; aio->queueWrite(sendbuff); return; } // Nothing to send back to the server... aio->queueReadBuffer(sendbuff); // SEC_I_CONTEXT_EXPIRED means session stop complete; SEC_E_OK can be // either session stop or negotiation done (session up). if (status == SEC_E_OK || status == SEC_I_CONTEXT_EXPIRED) negotiationDone(); else negotiationFailed(status); } /*************************************************/ ServerSslAsynchIO::ServerSslAsynchIO(bool clientMustAuthenticate, const qpid::sys::Socket& s, CredHandle hCred, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb, BuffersEmptyCallback eCb, IdleCallback iCb, NegotiateDoneCallback nCb) : SslAsynchIO(s, hCred, rCb, eofCb, disCb, cCb, eCb, iCb, nCb), clientAuth(clientMustAuthenticate) { } void ServerSslAsynchIO::startNegotiate() { // Nothing... need the client to send a token first. } void ServerSslAsynchIO::negotiateStep(BufferBase* buff) { ULONG ctxtRequested = ASC_REQ_STREAM; if (clientAuth) ctxtRequested |= ASC_REQ_MUTUAL_AUTH; ULONG ctxtAttrs; // tokenBuffs describe the buffer that's coming in. It should have // a token from the SSL server except if shutting down or renegotiating. SecBuffer tokenBuffs[2]; tokenBuffs[0].cbBuffer = buff ? buff->dataCount : 0; tokenBuffs[0].BufferType = SECBUFFER_TOKEN; tokenBuffs[0].pvBuffer = buff ? buff->bytes : 0; tokenBuffs[1].cbBuffer = 0; tokenBuffs[1].BufferType = SECBUFFER_EMPTY; tokenBuffs[1].pvBuffer = 0; SecBufferDesc tokenBuffDesc; tokenBuffDesc.ulVersion = SECBUFFER_VERSION; tokenBuffDesc.cBuffers = 2; tokenBuffDesc.pBuffers = tokenBuffs; // Need a buffer to receive any token to send back to the server. BufferBase *sendbuff = aio->getQueuedBuffer(); // sendBuffs gets information to forward to the peer. SecBuffer sendBuffs[2]; sendBuffs[0].cbBuffer = sendbuff->byteCount; sendBuffs[0].BufferType = SECBUFFER_TOKEN; sendBuffs[0].pvBuffer = sendbuff->bytes; sendBuffs[1].cbBuffer = 0; sendBuffs[1].BufferType = SECBUFFER_EMPTY; sendBuffs[1].pvBuffer = 0; SecBufferDesc sendBuffDesc; sendBuffDesc.ulVersion = SECBUFFER_VERSION; sendBuffDesc.cBuffers = 2; sendBuffDesc.pBuffers = sendBuffs; PCtxtHandle ctxtHandlePtr = (SecIsValidHandle(&ctxtHandle)) ? &ctxtHandle : 0; SECURITY_STATUS status = ::AcceptSecurityContext(&credHandle, ctxtHandlePtr, &tokenBuffDesc, ctxtRequested, 0, &ctxtHandle, &sendBuffDesc, &ctxtAttrs, NULL); if (status == SEC_E_INCOMPLETE_MESSAGE) { // Not enough - get more data from the server then try again. if (buff) aio->unread(buff); aio->queueReadBuffer(sendbuff); // Don't need this one for now... return; } // Done with the buffer that came in... if (buff) aio->queueReadBuffer(buff); if (status == SEC_I_CONTINUE_NEEDED) { sendbuff->dataCount = sendBuffs[0].cbBuffer; aio->queueWrite(sendbuff); return; } // There may have been a token generated; if so, send it to the client. if (sendBuffs[0].cbBuffer > 0) { sendbuff->dataCount = sendBuffs[0].cbBuffer; aio->queueWrite(sendbuff); } else // Nothing to send back to the server... aio->queueReadBuffer(sendbuff); // SEC_I_CONTEXT_EXPIRED means session stop complete; SEC_E_OK can be // either session stop or negotiation done (session up). if (status == SEC_E_OK || status == SEC_I_CONTEXT_EXPIRED) { if (clientAuth) QPID_LOG(warning, "DID WE CHECK FOR CLIENT AUTH???"); negotiationDone(); } else { negotiationFailed(status); } } }}} // namespace qpid::sys::windows qpidc-0.16/src/qpid/sys/windows/Time.cpp0000664000076400007640000000705211564625557020616 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Time.h" #include #include #include #include using namespace boost::posix_time; namespace { // High-res timing support. This will display times since program start, // more or less. Keep track of the start value and the conversion factor to // seconds. bool timeInitialized = false; LARGE_INTEGER start; double freq = 1.0; } namespace qpid { namespace sys { AbsTime::AbsTime(const AbsTime& t, const Duration& d) { if (d == Duration::max()) { timepoint = ptime(max_date_time); } else { time_duration td = microseconds(d.nanosecs / 1000); timepoint = t.timepoint + td; } } AbsTime AbsTime::FarFuture() { AbsTime ff; ptime maxd(max_date_time); ff.timepoint = maxd; return ff; } AbsTime AbsTime::Epoch() { AbsTime time_epoch; time_epoch.timepoint = boost::posix_time::from_time_t(0); return time_epoch; } AbsTime AbsTime::now() { AbsTime time_now; time_now.timepoint = boost::get_system_time(); return time_now; } Duration::Duration(const AbsTime& start, const AbsTime& finish) { time_duration d = finish.timepoint - start.timepoint; nanosecs = d.total_nanoseconds(); } std::ostream& operator<<(std::ostream& o, const Duration& d) { return o << int64_t(d) << "ns"; } std::ostream& operator<<(std::ostream& o, const AbsTime& t) { std::string time_string = to_simple_string(t.timepoint); return o << time_string; } void sleep(int secs) { ::Sleep(secs * 1000); } void usleep(uint64_t usecs) { DWORD msecs = usecs / 1000; if (msecs == 0) msecs = 1; ::Sleep(msecs); } void outputFormattedNow(std::ostream& o) { ::time_t rawtime; ::tm timeinfo; char time_string[100]; ::time( &rawtime ); #ifdef _MSC_VER ::localtime_s(&timeinfo, &rawtime); #else timeinfo = *(::localtime(&rawtime)); #endif ::strftime(time_string, 100, "%Y-%m-%d %H:%M:%S", &timeinfo); o << time_string << " "; } void outputHiresNow(std::ostream& o) { if (!timeInitialized) { start.QuadPart = 0; LARGE_INTEGER iFreq; iFreq.QuadPart = 1; QueryPerformanceCounter(&start); QueryPerformanceFrequency(&iFreq); freq = static_cast(iFreq.QuadPart); timeInitialized = true; } LARGE_INTEGER iNow; iNow.QuadPart = 0; QueryPerformanceCounter(&iNow); iNow.QuadPart -= start.QuadPart; if (iNow.QuadPart < 0) iNow.QuadPart = 0; double now = static_cast(iNow.QuadPart); now /= freq; // now is seconds after this o << std::fixed << std::setprecision(8) << std::setw(16) << std::setfill('0') << now << "s "; } }} qpidc-0.16/src/qpid/sys/windows/IoHandlePrivate.h0000775000076400007640000000416111267701361022370 0ustar00jrossjross00000000000000#ifndef _sys_windows_IoHandlePrivate_h #define _sys_windows_IoHandlePrivate_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/AsynchIO.h" #include "qpid/sys/windows/AsynchIoResult.h" #include "qpid/CommonImportExport.h" #include namespace qpid { namespace sys { // Private fd related implementation details // There should be either a valid socket handle or a completer callback. // Handle is used to associate with poller's iocp; completer is used to // inject a completion that will very quickly trigger a callback to the // completer from an I/O thread. If the callback mechanism is used, there // can be a RequestCallback set - this carries the callback object through // from AsynchIO::requestCallback() through to the I/O completion processing. class IOHandlePrivate { friend QPID_COMMON_EXTERN SOCKET toSocketHandle(const Socket& s); static IOHandlePrivate* getImpl(const IOHandle& h); public: IOHandlePrivate(SOCKET f = INVALID_SOCKET, windows::AsynchIoResult::Completer cb = 0, AsynchIO::RequestCallback reqCallback = 0) : fd(f), event(cb), cbRequest(reqCallback) {} SOCKET fd; windows::AsynchIoResult::Completer event; AsynchIO::RequestCallback cbRequest; }; QPID_COMMON_EXTERN SOCKET toSocketHandle(const Socket& s); }} #endif /* _sys_windows_IoHandlePrivate_h */ qpidc-0.16/src/qpid/sys/windows/Socket.cpp0000664000076400007640000001735211625546453021147 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Socket.h" #include "qpid/sys/SocketAddress.h" #include "qpid/sys/windows/check.h" #include "qpid/sys/windows/IoHandlePrivate.h" // Ensure we get all of winsock2.h #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #include // Need to initialize WinSock. Ideally, this would be a singleton or embedded // in some one-time initialization function. I tried boost singleton and could // not get it to compile (and others located in google had the same problem). // So, this simple static with an interlocked increment will do for known // use cases at this time. Since this will only shut down winsock at process // termination, there may be some problems with client programs that also // expect to load and unload winsock, but we'll see... // If someone does get an easy-to-use singleton sometime, converting to it // may be preferable. namespace { static LONG volatile initialized = 0; class WinSockSetup { // : public boost::details::pool::singleton_default { public: WinSockSetup() { LONG timesEntered = InterlockedIncrement(&initialized); if (timesEntered > 1) return; err = 0; WORD wVersionRequested; WSADATA wsaData; /* Request WinSock 2.2 */ wVersionRequested = MAKEWORD(2, 2); err = WSAStartup(wVersionRequested, &wsaData); } ~WinSockSetup() { WSACleanup(); } public: int error(void) const { return err; } protected: DWORD err; }; static WinSockSetup setup; } /* namespace */ namespace qpid { namespace sys { namespace { std::string getName(SOCKET fd, bool local) { ::sockaddr_storage name_s; // big enough for any socket address ::sockaddr* name = (::sockaddr*)&name_s; ::socklen_t namelen = sizeof(name_s); if (local) { QPID_WINSOCK_CHECK(::getsockname(fd, name, &namelen)); } else { QPID_WINSOCK_CHECK(::getpeername(fd, name, &namelen)); } return SocketAddress::asString(name, namelen); } uint16_t getLocalPort(int fd) { ::sockaddr_storage name_s; // big enough for any socket address ::sockaddr* name = (::sockaddr*)&name_s; ::socklen_t namelen = sizeof(name_s); QPID_WINSOCK_CHECK(::getsockname(fd, name, &namelen)); return SocketAddress::getPort(name); } } // namespace Socket::Socket() : IOHandle(new IOHandlePrivate), nonblocking(false), nodelay(false) {} Socket::Socket(IOHandlePrivate* h) : IOHandle(h), nonblocking(false), nodelay(false) {} void Socket::createSocket(const SocketAddress& sa) const { SOCKET& socket = impl->fd; if (socket != INVALID_SOCKET) Socket::close(); SOCKET s = ::socket (getAddrInfo(sa).ai_family, getAddrInfo(sa).ai_socktype, 0); if (s == INVALID_SOCKET) throw QPID_WINDOWS_ERROR(WSAGetLastError()); socket = s; try { if (nonblocking) setNonblocking(); if (nodelay) setTcpNoDelay(); } catch (std::exception&) { ::closesocket(s); socket = INVALID_SOCKET; throw; } } Socket* Socket::createSameTypeSocket() const { SOCKET& socket = impl->fd; // Socket currently has no actual socket attached if (socket == INVALID_SOCKET) return new Socket; ::sockaddr_storage sa; ::socklen_t salen = sizeof(sa); QPID_WINSOCK_CHECK(::getsockname(socket, (::sockaddr*)&sa, &salen)); SOCKET s = ::socket(sa.ss_family, SOCK_STREAM, 0); // Currently only work with SOCK_STREAM if (s == INVALID_SOCKET) throw QPID_WINDOWS_ERROR(WSAGetLastError()); return new Socket(new IOHandlePrivate(s)); } void Socket::setNonblocking() const { u_long nonblock = 1; QPID_WINSOCK_CHECK(ioctlsocket(impl->fd, FIONBIO, &nonblock)); } void Socket::connect(const std::string& host, const std::string& port) const { SocketAddress sa(host, port); connect(sa); } void Socket::connect(const SocketAddress& addr) const { peername = addr.asString(false); createSocket(addr); const SOCKET& socket = impl->fd; int err; WSASetLastError(0); if ((::connect(socket, getAddrInfo(addr).ai_addr, getAddrInfo(addr).ai_addrlen) != 0) && ((err = ::WSAGetLastError()) != WSAEWOULDBLOCK)) throw qpid::Exception(QPID_MSG(strError(err) << ": " << peername)); } void Socket::close() const { SOCKET& socket = impl->fd; if (socket == INVALID_SOCKET) return; QPID_WINSOCK_CHECK(closesocket(socket)); socket = INVALID_SOCKET; } int Socket::write(const void *buf, size_t count) const { const SOCKET& socket = impl->fd; int sent = ::send(socket, (const char *)buf, count, 0); if (sent == SOCKET_ERROR) return -1; return sent; } int Socket::read(void *buf, size_t count) const { const SOCKET& socket = impl->fd; int received = ::recv(socket, (char *)buf, count, 0); if (received == SOCKET_ERROR) return -1; return received; } int Socket::listen(const std::string& host, const std::string& port, int backlog) const { SocketAddress sa(host, port); return listen(sa, backlog); } int Socket::listen(const SocketAddress& addr, int backlog) const { createSocket(addr); const SOCKET& socket = impl->fd; BOOL yes=1; QPID_WINSOCK_CHECK(setsockopt(socket, SOL_SOCKET, SO_REUSEADDR, (char *)&yes, sizeof(yes))); if (::bind(socket, getAddrInfo(addr).ai_addr, getAddrInfo(addr).ai_addrlen) == SOCKET_ERROR) throw Exception(QPID_MSG("Can't bind to " << addr.asString() << ": " << strError(WSAGetLastError()))); if (::listen(socket, backlog) == SOCKET_ERROR) throw Exception(QPID_MSG("Can't listen on " <fd, 0, 0); if (afd != INVALID_SOCKET) return new Socket(new IOHandlePrivate(afd)); else if (WSAGetLastError() == EAGAIN) return 0; else throw QPID_WINDOWS_ERROR(WSAGetLastError()); } std::string Socket::getPeerAddress() const { if (peername.empty()) { peername = getName(impl->fd, false); } return peername; } std::string Socket::getLocalAddress() const { if (localname.empty()) { localname = getName(impl->fd, true); } return localname; } int Socket::getError() const { int result; socklen_t rSize = sizeof (result); QPID_WINSOCK_CHECK(::getsockopt(impl->fd, SOL_SOCKET, SO_ERROR, (char *)&result, &rSize)); return result; } void Socket::setTcpNoDelay() const { int flag = 1; int result = setsockopt(impl->fd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(flag)); QPID_WINSOCK_CHECK(result); nodelay = true; } inline IOHandlePrivate* IOHandlePrivate::getImpl(const qpid::sys::IOHandle &h) { return h.impl; } SOCKET toSocketHandle(const Socket& s) { return IOHandlePrivate::getImpl(s)->fd; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/windows/AsynchIoResult.h0000775000076400007640000001413311621324771022266 0ustar00jrossjross00000000000000#ifndef _windows_asynchIoResult_h #define _windows_asynchIoResult_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/AsynchIO.h" #include "qpid/sys/Socket.h" #include #include #include namespace qpid { namespace sys { namespace windows { /* * AsynchIoResult defines the class that receives the result of an * asynchronous I/O operation, either send/recv or accept/connect. * * Operation factories should set one of these up before beginning the * operation. Poller knows how to dispatch completion to this class. * This class must be subclassed for needed operations; this class provides * an interface only and cannot be instantiated. * * This class is tied to Windows; it inherits from OVERLAPPED so that the * IocpPoller can cast OVERLAPPED pointers back to AsynchIoResult and call * the completion handler. */ class AsynchResult : private OVERLAPPED { public: LPOVERLAPPED overlapped(void) { return this; } static AsynchResult* from_overlapped(LPOVERLAPPED ol) { return static_cast(ol); } virtual void success (size_t bytesTransferred) { bytes = bytesTransferred; status = 0; complete(); } virtual void failure (int error) { bytes = 0; status = error; complete(); } size_t getTransferred(void) const { return bytes; } int getStatus(void) const { return status; } protected: AsynchResult() : bytes(0), status(0) { memset(overlapped(), 0, sizeof(OVERLAPPED)); } ~AsynchResult() {} virtual void complete(void) = 0; size_t bytes; int status; }; class AsynchAcceptor; class AsynchAcceptResult : public AsynchResult { friend class AsynchAcceptor; public: AsynchAcceptResult(qpid::sys::AsynchAcceptor::Callback cb, AsynchAcceptor *acceptor, const qpid::sys::Socket& listener); virtual void success (size_t bytesTransferred); virtual void failure (int error); private: virtual void complete(void) {} // No-op for this class. qpid::sys::AsynchAcceptor::Callback callback; AsynchAcceptor *acceptor; SOCKET listener; std::auto_ptr newSocket; // AcceptEx needs a place to write the local and remote addresses // when accepting the connection. Place those here; get enough for // IPv6 addresses, even if the socket is IPv4. enum { SOCKADDRMAXLEN = sizeof(sockaddr_in6) + 16, SOCKADDRBUFLEN = 2 * SOCKADDRMAXLEN }; char addressBuffer[SOCKADDRBUFLEN]; }; class AsynchIoResult : public AsynchResult { public: typedef boost::function1 Completer; virtual ~AsynchIoResult() {} qpid::sys::AsynchIO::BufferBase *getBuff(void) const { return iobuff; } size_t getRequested(void) const { return requested; } const WSABUF *getWSABUF(void) const { return &wsabuf; } protected: void setBuff (qpid::sys::AsynchIO::BufferBase *buffer) { iobuff = buffer; } protected: AsynchIoResult(Completer cb, qpid::sys::AsynchIO::BufferBase *buff, size_t length) : completionCallback(cb), iobuff(buff), requested(length) {} virtual void complete(void) = 0; WSABUF wsabuf; Completer completionCallback; private: qpid::sys::AsynchIO::BufferBase *iobuff; size_t requested; // Number of bytes in original I/O request }; class AsynchReadResult : public AsynchIoResult { // complete() updates buffer then does completion callback. virtual void complete(void) { getBuff()->dataCount += bytes; completionCallback(this); } public: AsynchReadResult(AsynchIoResult::Completer cb, qpid::sys::AsynchIO::BufferBase *buff, size_t length) : AsynchIoResult(cb, buff, length) { wsabuf.buf = buff->bytes + buff->dataCount; wsabuf.len = length; } }; class AsynchWriteResult : public AsynchIoResult { // complete() updates buffer then does completion callback. virtual void complete(void) { qpid::sys::AsynchIO::BufferBase *b = getBuff(); b->dataStart += bytes; b->dataCount -= bytes; completionCallback(this); } public: AsynchWriteResult(AsynchIoResult::Completer cb, qpid::sys::AsynchIO::BufferBase *buff, size_t length) : AsynchIoResult(cb, buff, length) { wsabuf.buf = buff ? buff->bytes : 0; wsabuf.len = length; } }; class AsynchWriteWanted : public AsynchWriteResult { // complete() just does completion callback; no buffers used. virtual void complete(void) { completionCallback(this); } public: AsynchWriteWanted(AsynchIoResult::Completer cb) : AsynchWriteResult(cb, 0, 0) { wsabuf.buf = 0; wsabuf.len = 0; } }; class AsynchCallbackRequest : public AsynchIoResult { // complete() needs to simply call the completionCallback; no buffers. virtual void complete(void) { completionCallback(this); } public: AsynchCallbackRequest(AsynchIoResult::Completer cb, qpid::sys::AsynchIO::RequestCallback reqCb) : AsynchIoResult(cb, 0, 0), reqCallback(reqCb) { wsabuf.buf = 0; wsabuf.len = 0; } qpid::sys::AsynchIO::RequestCallback reqCallback; }; }}} // qpid::sys::windows #endif /*!_windows_asynchIoResult_h*/ qpidc-0.16/src/qpid/sys/windows/IocpPoller.cpp0000775000076400007640000001521511564561455021767 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Poller.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Dispatcher.h" #include "qpid/sys/windows/AsynchIoResult.h" #include "qpid/sys/windows/IoHandlePrivate.h" #include "qpid/sys/windows/check.h" #include #include #include #include #include namespace qpid { namespace sys { class PollerHandlePrivate { friend class Poller; friend class PollerHandle; SOCKET fd; windows::AsynchIoResult::Completer cb; AsynchIO::RequestCallback cbRequest; PollerHandlePrivate(SOCKET f, windows::AsynchIoResult::Completer cb0 = 0, AsynchIO::RequestCallback rcb = 0) : fd(f), cb(cb0), cbRequest(rcb) { } }; PollerHandle::PollerHandle(const IOHandle& h) : impl(new PollerHandlePrivate(toSocketHandle(static_cast(h)), h.impl->event, h.impl->cbRequest)) {} PollerHandle::~PollerHandle() { delete impl; } /** * Concrete implementation of Poller to use the Windows I/O Completion * port (IOCP) facility. */ class PollerPrivate { friend class Poller; const HANDLE iocp; // The number of threads running the event loop. volatile LONG threadsRunning; // Shutdown request is handled by setting isShutdown and injecting a // well-formed completion event into the iocp. bool isShutdown; PollerPrivate() : iocp(::CreateIoCompletionPort(INVALID_HANDLE_VALUE, NULL, 0, 0)), threadsRunning(0), isShutdown(false) { QPID_WINDOWS_CHECK_NULL(iocp); } ~PollerPrivate() { // It's probably okay to ignore any errors here as there can't be // data loss ::CloseHandle(iocp); } }; void Poller::shutdown() { // Allow sloppy code to shut us down more than once. if (impl->isShutdown) return; ULONG_PTR key = 1; // Tell wait() it's a shutdown, not I/O PostQueuedCompletionStatus(impl->iocp, 0, key, 0); } bool Poller::hasShutdown() { return impl->isShutdown; } bool Poller::interrupt(PollerHandle&) { return false; // There's no concept of a registered handle. } void Poller::run() { do { Poller::Event event = this->wait(); // Handle shutdown switch (event.type) { case Poller::SHUTDOWN: return; break; case Poller::INVALID: // On any type of success or fail completion break; default: // This should be impossible assert(false); } } while (true); } void Poller::monitorHandle(PollerHandle& handle, Direction dir) { HANDLE h = (HANDLE)(handle.impl->fd); if (h != INVALID_HANDLE_VALUE) { HANDLE iocpHandle = ::CreateIoCompletionPort (h, impl->iocp, 0, 0); QPID_WINDOWS_CHECK_NULL(iocpHandle); } else { // INPUT is used to request a callback; OUTPUT to request a write assert(dir == Poller::INPUT || dir == Poller::OUTPUT); if (dir == Poller::OUTPUT) { windows::AsynchWriteWanted *result = new windows::AsynchWriteWanted(handle.impl->cb); PostQueuedCompletionStatus(impl->iocp, 0, 0, result->overlapped()); } else { windows::AsynchCallbackRequest *result = new windows::AsynchCallbackRequest(handle.impl->cb, handle.impl->cbRequest); PostQueuedCompletionStatus(impl->iocp, 0, 0, result->overlapped()); } } } // All no-ops... void Poller::unmonitorHandle(PollerHandle& /*handle*/, Direction /*dir*/) {} void Poller::registerHandle(PollerHandle& /*handle*/) {} void Poller::unregisterHandle(PollerHandle& /*handle*/) {} Poller::Event Poller::wait(Duration timeout) { DWORD timeoutMs = 0; DWORD numTransferred = 0; ULONG_PTR completionKey = 0; OVERLAPPED *overlapped = 0; windows::AsynchResult *result = 0; // Wait for either an I/O operation to finish (thus signaling the // IOCP handle) or a shutdown request to be made (thus signaling the // shutdown event). if (timeout == TIME_INFINITE) timeoutMs = INFINITE; else timeoutMs = static_cast(timeout / TIME_MSEC); InterlockedIncrement(&impl->threadsRunning); bool goodOp = ::GetQueuedCompletionStatus (impl->iocp, &numTransferred, &completionKey, &overlapped, timeoutMs); LONG remainingThreads = InterlockedDecrement(&impl->threadsRunning); if (goodOp) { // Dequeued a successful completion. If it's a posted packet from // shutdown() the overlapped ptr is 0 and key is 1. Else downcast // the OVERLAPPED pointer to an AsynchIoResult and call the // completion handler. if (overlapped == 0 && completionKey == 1) { // If there are other threads still running this wait, re-post // the completion. if (remainingThreads > 0) PostQueuedCompletionStatus(impl->iocp, 0, completionKey, 0); return Event(0, SHUTDOWN); } result = windows::AsynchResult::from_overlapped(overlapped); result->success (static_cast(numTransferred)); } else { if (overlapped != 0) { // Dequeued a completion for a failed operation. Downcast back // to the result object and inform it that the operation failed. DWORD status = ::GetLastError(); result = windows::AsynchResult::from_overlapped(overlapped); result->failure (static_cast(status)); } } return Event(0, INVALID); // TODO - this may need to be changed. } // Concrete constructors Poller::Poller() : impl(new PollerPrivate()) {} Poller::~Poller() { delete impl; } }} qpidc-0.16/src/qpid/sys/windows/uuid.cpp0000664000076400007640000000355111564625557020666 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #ifdef uuid_t /* Done in rpcdce.h */ # undef uuid_t #endif #include "qpid/sys/windows/uuid.h" #include void uuid_clear (uuid_t uu) { UuidCreateNil (reinterpret_cast(uu)); } void uuid_copy (uuid_t dst, const uuid_t src) { memcpy (dst, src, qpid::sys::UuidSize); } void uuid_generate (uuid_t out) { UuidCreate (reinterpret_cast(out)); } int uuid_is_null (const uuid_t uu) { RPC_STATUS unused; return UuidIsNil ((UUID*)uu, &unused); } int uuid_parse (const char *in, uuid_t uu) { return UuidFromString ((unsigned char*)in, (UUID*)uu) == RPC_S_OK ? 0 : -1; } void uuid_unparse (const uuid_t uu, char *out) { unsigned char *formatted; if (UuidToString((UUID*)uu, &formatted) == RPC_S_OK) { #ifdef _MSC_VER strncpy_s (out, 36+1, (char*)formatted, _TRUNCATE); #else strncpy (out, (char*)formatted, 36+1); #endif RpcStringFree(&formatted); } } int uuid_compare (const uuid_t a, const uuid_t b) { RPC_STATUS unused; return !UuidEqual((UUID*)a, (UUID*)b, &unused); } qpidc-0.16/src/qpid/sys/windows/uuid.h0000664000076400007640000000305411412720330020302 0ustar00jrossjross00000000000000#ifndef _sys_windows_uuid_h #define _sys_windows_uuid_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/types/ImportExport.h" #include namespace qpid { namespace sys { const size_t UuidSize = 16; }} typedef uint8_t uuid_t[qpid::sys::UuidSize]; QPID_TYPES_EXTERN void uuid_clear (uuid_t uu); QPID_TYPES_EXTERN void uuid_copy (uuid_t dst, const uuid_t src); QPID_TYPES_EXTERN void uuid_generate (uuid_t out); QPID_TYPES_EXTERN int uuid_is_null (const uuid_t uu); // Returns 1 if null, else 0 QPID_TYPES_EXTERN int uuid_parse (const char *in, uuid_t uu); // Returns 0 on success, else -1 QPID_TYPES_EXTERN void uuid_unparse (const uuid_t uu, char *out); QPID_TYPES_EXTERN int uuid_compare (const uuid_t a, const uuid_t b); #endif /*!_sys_windows_uuid_h*/ qpidc-0.16/src/qpid/sys/windows/PollableCondition.cpp0000664000076400007640000000710311371026111023267 0ustar00jrossjross00000000000000#ifndef QPID_SYS_WINDOWS_POLLABLECONDITION_CPP #define QPID_SYS_WINDOWS_POLLABLECONDITION_CPP /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/PollableCondition.h" #include "qpid/sys/IOHandle.h" #include "qpid/sys/windows/AsynchIoResult.h" #include "qpid/sys/windows/IoHandlePrivate.h" #include #include namespace qpid { namespace sys { // PollableConditionPrivate will reuse the IocpPoller's ability to queue // a completion to the IOCP and have it dispatched to the completer callback // noted in the IOHandlePrivate when the request is queued. The // AsynchCallbackRequest object is not really used - we already have the // desired callback for the user of PollableCondition. class PollableConditionPrivate : private IOHandle { friend class PollableCondition; private: PollableConditionPrivate(const sys::PollableCondition::Callback& cb, sys::PollableCondition& parent, const boost::shared_ptr& poller); ~PollableConditionPrivate(); void poke(); void dispatch(windows::AsynchIoResult *result); private: PollableCondition::Callback cb; PollableCondition& parent; boost::shared_ptr poller; LONG isSet; }; PollableConditionPrivate::PollableConditionPrivate(const sys::PollableCondition::Callback& cb, sys::PollableCondition& parent, const boost::shared_ptr& poller) : IOHandle(new sys::IOHandlePrivate(INVALID_SOCKET, boost::bind(&PollableConditionPrivate::dispatch, this, _1))), cb(cb), parent(parent), poller(poller), isSet(0) { } PollableConditionPrivate::~PollableConditionPrivate() { } void PollableConditionPrivate::poke() { // monitorHandle will queue a completion for the IOCP; when it's handled, a // poller thread will call back to dispatch() below. PollerHandle ph(*this); poller->monitorHandle(ph, Poller::INPUT); } void PollableConditionPrivate::dispatch(windows::AsynchIoResult *result) { delete result; // Poller::monitorHandle() allocates this cb(parent); if (isSet) poke(); } /* PollableCondition */ PollableCondition::PollableCondition(const Callback& cb, const boost::shared_ptr& poller) : impl(new PollableConditionPrivate(cb, *this, poller)) { } PollableCondition::~PollableCondition() { delete impl; } void PollableCondition::set() { // Add one to the set count and poke it to provoke a callback ::InterlockedIncrement(&impl->isSet); impl->poke(); } void PollableCondition::clear() { ::InterlockedExchange(&impl->isSet, 0); } }} // namespace qpid::sys #endif /*!QPID_SYS_WINDOWS_POLLABLECONDITION_CPP*/ qpidc-0.16/src/qpid/sys/windows/SocketAddress.cpp0000664000076400007640000001026711623035650022441 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/SocketAddress.h" #include "qpid/Exception.h" #include "qpid/Msg.h" // Ensure we get all of winsock2.h #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #include #include #include namespace qpid { namespace sys { SocketAddress::SocketAddress(const std::string& host0, const std::string& port0) : host(host0), port(port0), addrInfo(0) { } SocketAddress::SocketAddress(const SocketAddress& sa) : host(sa.host), port(sa.port), addrInfo(0) { } SocketAddress& SocketAddress::operator=(const SocketAddress& sa) { SocketAddress temp(sa); std::swap(temp, *this); return *this; } SocketAddress::~SocketAddress() { if (addrInfo) { ::freeaddrinfo(addrInfo); } } std::string SocketAddress::asString(::sockaddr const * const addr, size_t addrlen) { char servName[NI_MAXSERV]; char dispName[NI_MAXHOST]; if (int rc=::getnameinfo(addr, addrlen, dispName, sizeof(dispName), servName, sizeof(servName), NI_NUMERICHOST | NI_NUMERICSERV) != 0) throw qpid::Exception(QPID_MSG(gai_strerror(rc))); std::string s; switch (addr->sa_family) { case AF_INET: s += dispName; break; case AF_INET6: s += "["; s += dispName; s+= "]"; break; default: throw Exception(QPID_MSG("Unexpected socket type")); } s += ":"; s += servName; return s; } uint16_t SocketAddress::getPort(::sockaddr const * const addr) { switch (addr->sa_family) { case AF_INET: return ntohs(((::sockaddr_in*)addr)->sin_port); case AF_INET6: return ntohs(((::sockaddr_in6*)addr)->sin6_port); default:throw Exception(QPID_MSG("Unexpected socket type")); } } std::string SocketAddress::asString(bool numeric) const { if (!numeric) return host + ":" + port; // Canonicalise into numeric id const ::addrinfo& ai = getAddrInfo(*this); return asString(ai.ai_addr, ai.ai_addrlen); } bool SocketAddress::nextAddress() { bool r = currentAddrInfo->ai_next != 0; if (r) currentAddrInfo = currentAddrInfo->ai_next; return r; } void SocketAddress::setAddrInfoPort(uint16_t port) { if (!currentAddrInfo) return; ::addrinfo& ai = *currentAddrInfo; switch (ai.ai_family) { case AF_INET: ((::sockaddr_in*)ai.ai_addr)->sin_port = htons(port); return; case AF_INET6:((::sockaddr_in6*)ai.ai_addr)->sin6_port = htons(port); return; default: throw Exception(QPID_MSG("Unexpected socket type")); } } const ::addrinfo& getAddrInfo(const SocketAddress& sa) { if (!sa.addrInfo) { ::addrinfo hints; ::memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_ADDRCONFIG; // Only use protocols that we have configured interfaces for hints.ai_family = AF_UNSPEC; // Allow both IPv4 and IPv6 hints.ai_socktype = SOCK_STREAM; const char* node = 0; if (sa.host.empty()) { hints.ai_flags |= AI_PASSIVE; } else { node = sa.host.c_str(); } const char* service = sa.port.empty() ? "0" : sa.port.c_str(); int n = ::getaddrinfo(node, service, &hints, &sa.addrInfo); if (n != 0) throw Exception(QPID_MSG("Cannot resolve " << sa.asString(false) << ": " << ::gai_strerror(n))); sa.currentAddrInfo = sa.addrInfo; } return *sa.currentAddrInfo; } }} qpidc-0.16/src/qpid/sys/windows/IOHandle.cpp0000775000076400007640000000215511227113407021323 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IOHandle.h" #include "qpid/sys/windows/IoHandlePrivate.h" #include namespace qpid { namespace sys { SOCKET toFd(const IOHandlePrivate* h) { return h->fd; } IOHandle::IOHandle(IOHandlePrivate* h) : impl(h) {} IOHandle::~IOHandle() { delete impl; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/windows/LockFile.cpp0000775000076400007640000000362011312012605021357 0ustar00jrossjross00000000000000/* * * Copyright (c) 2008 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/LockFile.h" #include "qpid/sys/windows/check.h" #include namespace qpid { namespace sys { class LockFilePrivate { friend class LockFile; HANDLE fd; public: LockFilePrivate(HANDLE f) : fd(f) {} }; LockFile::LockFile(const std::string& path_, bool create) : path(path_), created(create) { HANDLE h = ::CreateFile(path.c_str(), create ? (GENERIC_READ|GENERIC_WRITE) : GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, 0, /* Default security */ create ? OPEN_ALWAYS : OPEN_EXISTING, FILE_FLAG_DELETE_ON_CLOSE, /* Delete file when closed */ NULL); if (h == INVALID_HANDLE_VALUE) throw qpid::Exception(path + ": " + qpid::sys::strError(GetLastError())); // Lock up to 4Gb if (!::LockFile(h, 0, 0, 0xffffffff, 0)) throw qpid::Exception(path + ": " + qpid::sys::strError(GetLastError())); impl.reset(new LockFilePrivate(h)); } LockFile::~LockFile() { if (impl) { if (impl->fd != INVALID_HANDLE_VALUE) { ::UnlockFile(impl->fd, 0, 0, 0xffffffff, 0); ::CloseHandle(impl->fd); } } } }} /* namespace qpid::sys */ qpidc-0.16/src/qpid/sys/windows/PipeHandle.cpp0000775000076400007640000000605711231446730021721 0ustar00jrossjross00000000000000// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/sys/PipeHandle.h" #include "qpid/sys/windows/check.h" #include namespace qpid { namespace sys { PipeHandle::PipeHandle(bool nonBlocking) { SOCKET listener, pair[2]; struct sockaddr_in addr; int err; int addrlen = sizeof(addr); pair[0] = pair[1] = INVALID_SOCKET; if ((listener = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) throw QPID_WINDOWS_ERROR(WSAGetLastError()); memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); addr.sin_port = 0; err = bind(listener, (const struct sockaddr*) &addr, sizeof(addr)); if (err == SOCKET_ERROR) { err = WSAGetLastError(); closesocket(listener); throw QPID_WINDOWS_ERROR(err); } err = getsockname(listener, (struct sockaddr*) &addr, &addrlen); if (err == SOCKET_ERROR) { err = WSAGetLastError(); closesocket(listener); throw QPID_WINDOWS_ERROR(err); } try { if (listen(listener, 1) == SOCKET_ERROR) throw QPID_WINDOWS_ERROR(WSAGetLastError()); if ((pair[0] = socket(AF_INET, SOCK_STREAM, 0)) == INVALID_SOCKET) throw QPID_WINDOWS_ERROR(WSAGetLastError()); if (connect(pair[0], (const struct sockaddr*)&addr, sizeof(addr)) == SOCKET_ERROR) throw QPID_WINDOWS_ERROR(WSAGetLastError()); if ((pair[1] = accept(listener, NULL, NULL)) == INVALID_SOCKET) throw QPID_WINDOWS_ERROR(WSAGetLastError()); closesocket(listener); writeFd = pair[0]; readFd = pair[1]; } catch (...) { closesocket(listener); if (pair[0] != INVALID_SOCKET) closesocket(pair[0]); throw; } // Set the socket to non-blocking if (nonBlocking) { unsigned long nonblock = 1; ioctlsocket(readFd, FIONBIO, &nonblock); } } PipeHandle::~PipeHandle() { closesocket(readFd); closesocket(writeFd); } int PipeHandle::read(void* buf, size_t bufSize) { return ::recv(readFd, (char *)buf, bufSize, 0); } int PipeHandle::write(const void* buf, size_t bufSize) { return ::send(writeFd, (const char *)buf, bufSize, 0); } int PipeHandle::getReadHandle() { return readFd; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/windows/SslAsynchIO.h0000664000076400007640000001551211621324771021510 0ustar00jrossjross00000000000000#ifndef _sys_windows_SslAsynchIO #define _sys_windows_SslAsynchIO /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/AsynchIO.h" #include "qpid/sys/IntegerTypes.h" #include "qpid/sys/Poller.h" #include "qpid/CommonImportExport.h" #include #include #include // security.h needs to see this to distinguish from kernel use. #define SECURITY_WIN32 #include #include #undef SECURITY_WIN32 namespace qpid { namespace sys { namespace windows { /* * SSL/Schannel shim between the frame-handling and AsynchIO layers. * SslAsynchIO creates a regular AsynchIO object to handle I/O and this class * gets involved for SSL negotiations and encrypt/decrypt. The details of * how this all works are invisible to the layers on either side. The only * change from normal AsynchIO usage is that there's an extra callback * from SslAsynchIO to indicate that the initial session negotiation is * complete. * * The details of session negotiation are different for client and server * SSL roles. These differences are handled by deriving separate client * and server role classes. */ class SslAsynchIO : public qpid::sys::AsynchIO { public: typedef boost::function1 NegotiateDoneCallback; SslAsynchIO(const qpid::sys::Socket& s, CredHandle hCred, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb = 0, BuffersEmptyCallback eCb = 0, IdleCallback iCb = 0, NegotiateDoneCallback nCb = 0); ~SslAsynchIO(); virtual void queueForDeletion(); virtual void start(qpid::sys::Poller::shared_ptr poller); virtual void queueReadBuffer(BufferBase* buff); virtual void unread(BufferBase* buff); virtual void queueWrite(BufferBase* buff); virtual void notifyPendingWrite(); virtual void queueWriteClose(); virtual bool writeQueueEmpty(); virtual void startReading(); virtual void stopReading(); virtual void requestCallback(RequestCallback); virtual BufferBase* getQueuedBuffer(); QPID_COMMON_EXTERN unsigned int getSslKeySize(); protected: CredHandle credHandle; // AsynchIO layer below that's actually doing the I/O qpid::sys::AsynchIO *aio; // Track what the state of the SSL session is. Have to know when it's // time to notify the upper layer that the session is up, and also to // know when it's not legit to pass data through to either side. enum { Negotiating, Running, Redo, ShuttingDown } state; bool sessionUp; CtxtHandle ctxtHandle; TimeStamp credExpiry; // Client- and server-side SSL subclasses implement these to do the // proper negotiation steps. negotiateStep() is called with a buffer // just received from the peer. virtual void startNegotiate() = 0; virtual void negotiateStep(BufferBase *buff) = 0; // The negotiating steps call one of these when it's finalized: void negotiationDone(); void negotiationFailed(SECURITY_STATUS status); private: // These are callbacks from AsynchIO to here. void sslDataIn(qpid::sys::AsynchIO& a, BufferBase *buff); void idle(qpid::sys::AsynchIO&); // These callbacks are to the layer above. ReadCallback readCallback; IdleCallback idleCallback; NegotiateDoneCallback negotiateDoneCallback; volatile unsigned int callbacksInProgress; // >0 if w/in callbacks volatile bool queuedDelete; // Address of peer, in case it's needed for logging. std::string peerAddress; // Partial buffer of decrypted plaintext given back by the layer above. AsynchIO::BufferBase *leftoverPlaintext; SecPkgContext_StreamSizes schSizes; }; /* * SSL/Schannel client-side shim between the frame-handling and AsynchIO * layers. */ class ClientSslAsynchIO : public SslAsynchIO { public: // Args same as for SslIoShim, with the addition of brokerHost which is // the expected SSL name of the server. QPID_COMMON_EXTERN ClientSslAsynchIO(const std::string& brokerHost, const qpid::sys::Socket& s, CredHandle hCred, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb = 0, BuffersEmptyCallback eCb = 0, IdleCallback iCb = 0, NegotiateDoneCallback nCb = 0); private: std::string serverHost; // Client- and server-side SSL subclasses implement these to do the // proper negotiation steps. negotiateStep() is called with a buffer // just received from the peer. void startNegotiate(); void negotiateStep(BufferBase *buff); }; /* * SSL/Schannel server-side shim between the frame-handling and AsynchIO * layers. */ class ServerSslAsynchIO : public SslAsynchIO { public: QPID_COMMON_EXTERN ServerSslAsynchIO(bool clientMustAuthenticate, const qpid::sys::Socket& s, CredHandle hCred, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb = 0, BuffersEmptyCallback eCb = 0, IdleCallback iCb = 0, NegotiateDoneCallback nCb = 0); private: bool clientAuth; // Client- and server-side SSL subclasses implement these to do the // proper negotiation steps. negotiateStep() is called with a buffer // just received from the peer. void startNegotiate(); void negotiateStep(BufferBase *buff); }; }}} // namespace qpid::sys::windows #endif // _sys_windows_SslAsynchIO qpidc-0.16/src/qpid/sys/windows/StrError.cpp0000775000076400007640000000300711564625557021501 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/StrError.h" #include #include #include namespace qpid { namespace sys { std::string strError(int err) { const size_t bufsize = 512; char buf[bufsize]; buf[0] = 0; if (0 == FormatMessage (FORMAT_MESSAGE_MAX_WIDTH_MASK | FORMAT_MESSAGE_FROM_SYSTEM, 0, err, 0, // Default language buf, bufsize, 0)) { #ifdef _MSC_VER strerror_s(buf, bufsize, err); #else return std::string(strerror(err)); #endif } return std::string(buf); } }} qpidc-0.16/src/qpid/sys/windows/Thread.cpp0000775000076400007640000002262611607234202021113 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ // Ensure definition of OpenThread in mingw #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/windows/check.h" #include #include /* * This implementation distinguishes between two types of thread: Qpid * threads (based on qpid::sys::Runnable) and the rest. It provides a * join() that will not deadlock against the Windows loader lock for * Qpid threads. * * System thread identifiers are unique per Windows thread; thread * handles are not. Thread identifiers can be recycled, but keeping a * handle open against the thread prevents recycling as long as * shared_ptr references to a ThreadPrivate structure remain. * * There is a 1-1 relationship between Qpid threads and their * ThreadPrivate structure. Non-Qpid threads do not need to find the * qpidThreadDone handle, so there may be a 1-many relationship for * them. * * TLS storage is used for a lockless solution for static library * builds. The special case of LoadLibrary/FreeLibrary requires * additional synchronization variables and resource cleanup in * DllMain. _DLL marks the dynamic case. */ namespace qpid { namespace sys { class ThreadPrivate { public: friend class Thread; friend unsigned __stdcall runThreadPrivate(void*); typedef boost::shared_ptr shared_ptr; ~ThreadPrivate(); private: unsigned threadId; HANDLE threadHandle; HANDLE initCompleted; HANDLE qpidThreadDone; Runnable* runnable; shared_ptr keepAlive; ThreadPrivate() : threadId(GetCurrentThreadId()), initCompleted(NULL), qpidThreadDone(NULL), runnable(NULL) { threadHandle = OpenThread (SYNCHRONIZE, FALSE, threadId); QPID_WINDOWS_CHECK_CRT_NZ(threadHandle); } ThreadPrivate(Runnable* r) : threadHandle(NULL), initCompleted(NULL), qpidThreadDone(NULL), runnable(r) {} void start(shared_ptr& p); static shared_ptr createThread(Runnable* r); }; }} // namespace qpid::sys namespace { using namespace qpid::sys; #ifdef _DLL class ScopedCriticalSection { public: ScopedCriticalSection(CRITICAL_SECTION& cs) : criticalSection(cs) { EnterCriticalSection(&criticalSection); } ~ScopedCriticalSection() { LeaveCriticalSection(&criticalSection); } private: CRITICAL_SECTION& criticalSection; }; CRITICAL_SECTION threadLock; long runningThreads = 0; HANDLE threadsDone; bool terminating = false; #endif DWORD volatile tlsIndex = TLS_OUT_OF_INDEXES; DWORD getTlsIndex() { if (tlsIndex != TLS_OUT_OF_INDEXES) return tlsIndex; // already set DWORD trialIndex = TlsAlloc(); QPID_WINDOWS_CHECK_NOT(trialIndex, TLS_OUT_OF_INDEXES); // No OS resource // only one thread gets to set the value DWORD actualIndex = (DWORD) InterlockedCompareExchange((LONG volatile *) &tlsIndex, (LONG) trialIndex, (LONG) TLS_OUT_OF_INDEXES); if (actualIndex == TLS_OUT_OF_INDEXES) return trialIndex; // we won the race else { TlsFree(trialIndex); return actualIndex; } } } // namespace namespace qpid { namespace sys { unsigned __stdcall runThreadPrivate(void* p) { ThreadPrivate* threadPrivate = static_cast(p); TlsSetValue(getTlsIndex(), threadPrivate); WaitForSingleObject (threadPrivate->initCompleted, INFINITE); CloseHandle (threadPrivate->initCompleted); threadPrivate->initCompleted = NULL; try { threadPrivate->runnable->run(); } catch (...) { // not our concern } SetEvent (threadPrivate->qpidThreadDone); // allow join() threadPrivate->keepAlive.reset(); // may run ThreadPrivate destructor #ifdef _DLL { ScopedCriticalSection l(threadLock); if (--runningThreads == 0) SetEvent(threadsDone); } #endif return 0; } ThreadPrivate::shared_ptr ThreadPrivate::createThread(Runnable* runnable) { ThreadPrivate::shared_ptr tp(new ThreadPrivate(runnable)); tp->start(tp); return tp; } void ThreadPrivate::start(ThreadPrivate::shared_ptr& tp) { getTlsIndex(); // fail here if OS problem, not in new thread initCompleted = CreateEvent (NULL, TRUE, FALSE, NULL); QPID_WINDOWS_CHECK_CRT_NZ(initCompleted); qpidThreadDone = CreateEvent (NULL, TRUE, FALSE, NULL); QPID_WINDOWS_CHECK_CRT_NZ(qpidThreadDone); #ifdef _DLL { ScopedCriticalSection l(threadLock); if (terminating) throw qpid::Exception(QPID_MSG("creating thread after exit/FreeLibrary")); runningThreads++; } #endif uintptr_t h = _beginthreadex(0, 0, runThreadPrivate, (void *)this, 0, &threadId); #ifdef _DLL if (h == NULL) { ScopedCriticalSection l(threadLock); if (--runningThreads == 0) SetEvent(threadsDone); } #endif QPID_WINDOWS_CHECK_CRT_NZ(h); // Success keepAlive = tp; threadHandle = reinterpret_cast(h); SetEvent (initCompleted); } ThreadPrivate::~ThreadPrivate() { if (threadHandle) CloseHandle (threadHandle); if (initCompleted) CloseHandle (initCompleted); if (qpidThreadDone) CloseHandle (qpidThreadDone); } Thread::Thread() {} Thread::Thread(Runnable* runnable) : impl(ThreadPrivate::createThread(runnable)) {} Thread::Thread(Runnable& runnable) : impl(ThreadPrivate::createThread(&runnable)) {} Thread::operator bool() { return impl; } bool Thread::operator==(const Thread& t) const { if (!impl || !t.impl) return false; return impl->threadId == t.impl->threadId; } bool Thread::operator!=(const Thread& t) const { return !(*this==t); } void Thread::join() { if (impl) { DWORD status; if (impl->runnable) { HANDLE handles[2] = {impl->qpidThreadDone, impl->threadHandle}; // wait for either. threadHandle not signalled if loader // lock held (FreeLibrary). qpidThreadDone not signalled // if thread terminated by exit(). status = WaitForMultipleObjects (2, handles, false, INFINITE); } else status = WaitForSingleObject (impl->threadHandle, INFINITE); QPID_WINDOWS_CHECK_NOT(status, WAIT_FAILED); } } unsigned long Thread::logId() { return GetCurrentThreadId(); } /* static */ Thread Thread::current() { ThreadPrivate* tlsValue = (ThreadPrivate *) TlsGetValue(getTlsIndex()); Thread t; if (tlsValue != NULL) { // called from within Runnable->run(), so keepAlive has positive use count t.impl = tlsValue->keepAlive; } else t.impl.reset(new ThreadPrivate()); return t; } }} // namespace qpid::sys #ifdef _DLL // DllMain: called possibly many times in a process lifetime if dll // loaded and freed repeatedly . Be mindful of Windows loader lock // and other DllMain restrictions. BOOL APIENTRY DllMain(HMODULE hm, DWORD reason, LPVOID reserved) { switch (reason) { case DLL_PROCESS_ATTACH: InitializeCriticalSection(&threadLock); threadsDone = CreateEvent(NULL, TRUE, FALSE, NULL); break; case DLL_PROCESS_DETACH: terminating = true; if (reserved != NULL) { // process exit(): threads are stopped arbitrarily and // possibly in an inconsistent state. Not even threadLock // can be trusted. All static destructors have been // called at this point and any resources this unit knows // about will be released as part of process tear down by // the OS. Accordingly, do nothing. return TRUE; } else { // FreeLibrary(): threads are still running and we are // encouraged to clean up to avoid leaks. Mostly we just // want any straggler threads to finish and notify // threadsDone as the last thing they do. while (1) { { ScopedCriticalSection l(threadLock); if (runningThreads == 0) break; ResetEvent(threadsDone); } WaitForSingleObject(threadsDone, INFINITE); } if (tlsIndex != TLS_OUT_OF_INDEXES) TlsFree(getTlsIndex()); CloseHandle(threadsDone); DeleteCriticalSection(&threadLock); } break; case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: break; } return TRUE; } #endif qpidc-0.16/src/qpid/sys/windows/FileSysDir.cpp0000664000076400007640000000264111072677026021724 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/FileSysDir.h" #include "qpid/sys/StrError.h" #include "qpid/Exception.h" #include #include #include #include namespace qpid { namespace sys { bool FileSysDir::exists (void) const { const char *cpath = dirPath.c_str (); struct _stat s; if (::_stat(cpath, &s)) { if (errno == ENOENT) { return false; } throw qpid::Exception (strError(errno) + ": Can't check directory: " + dirPath); } if (s.st_mode & _S_IFDIR) return true; throw qpid::Exception(dirPath + " is not a directory"); } void FileSysDir::mkdir(void) { if (::_mkdir(dirPath.c_str()) == -1) throw Exception ("Can't create directory: " + dirPath); } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/windows/SystemInfo.cpp0000775000076400007640000001361611372266076022020 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /* GetNativeSystemInfo call requires _WIN32_WINNT 0x0501 or higher */ #ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0501 #endif #include "qpid/sys/IntegerTypes.h" #include "qpid/sys/SystemInfo.h" #include #include #include #include #ifndef HOST_NAME_MAX # define HOST_NAME_MAX 256 #endif namespace qpid { namespace sys { long SystemInfo::concurrency() { SYSTEM_INFO sys_info; ::GetSystemInfo (&sys_info); long activeProcessors = 0; DWORD_PTR mask = sys_info.dwActiveProcessorMask; while (mask != 0) { if (mask & 1) ++activeProcessors; mask >>= 1; } return activeProcessors; } bool SystemInfo::getLocalHostname (Address &address) { char name[HOST_NAME_MAX]; if (::gethostname(name, sizeof(name)) != 0) { errno = WSAGetLastError(); return false; } address.host = name; return true; } static const std::string LOCALHOST("127.0.0.1"); static const std::string TCP("tcp"); void SystemInfo::getLocalIpAddresses (uint16_t port, std::vector
&addrList) { enum { MAX_URL_INTERFACES = 100 }; SOCKET s = socket (PF_INET, SOCK_STREAM, 0); if (s != INVALID_SOCKET) { INTERFACE_INFO interfaces[MAX_URL_INTERFACES]; DWORD filledBytes = 0; WSAIoctl (s, SIO_GET_INTERFACE_LIST, 0, 0, interfaces, sizeof (interfaces), &filledBytes, 0, 0); unsigned int interfaceCount = filledBytes / sizeof (INTERFACE_INFO); for (unsigned int i = 0; i < interfaceCount; ++i) { if (interfaces[i].iiFlags & IFF_UP) { std::string addr(inet_ntoa(interfaces[i].iiAddress.AddressIn.sin_addr)); if (addr != LOCALHOST) addrList.push_back(Address(TCP, addr, port)); } } closesocket (s); } } void SystemInfo::getSystemId (std::string &osName, std::string &nodeName, std::string &release, std::string &version, std::string &machine) { osName = "Microsoft Windows"; char node[MAX_COMPUTERNAME_LENGTH + 1]; DWORD nodelen = MAX_COMPUTERNAME_LENGTH + 1; GetComputerName (node, &nodelen); nodeName = node; OSVERSIONINFOEX vinfo; vinfo.dwOSVersionInfoSize = sizeof(vinfo); GetVersionEx ((OSVERSIONINFO *)&vinfo); SYSTEM_INFO sinfo; GetNativeSystemInfo(&sinfo); switch(vinfo.dwMajorVersion) { case 5: switch(vinfo.dwMinorVersion) { case 0: release ="2000"; break; case 1: release = "XP"; break; case 2: if (sinfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 || sinfo.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64) release = "XP-64"; else release = "Server 2003"; break; default: release = "Windows"; } break; case 6: if (vinfo.wProductType == VER_NT_SERVER) release = "Server 2008"; else release = "Vista"; break; default: release = "Microsoft Windows"; } version = vinfo.szCSDVersion; switch(sinfo.wProcessorArchitecture) { case PROCESSOR_ARCHITECTURE_AMD64: machine = "x86-64"; break; case PROCESSOR_ARCHITECTURE_IA64: machine = "IA64"; break; case PROCESSOR_ARCHITECTURE_INTEL: machine = "x86"; break; default: machine = "unknown"; break; } } uint32_t SystemInfo::getProcessId() { return static_cast(::GetCurrentProcessId()); } uint32_t SystemInfo::getParentProcessId() { // Only want info for the current process, so ask for something specific. // The module info won't be used here but it keeps the snapshot limited to // the current process so a search through all processes is not needed. HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, 0); if (snap == INVALID_HANDLE_VALUE) return 0; PROCESSENTRY32 entry; entry.dwSize = sizeof(entry); if (!Process32First(snap, &entry)) entry.th32ParentProcessID = 0; CloseHandle(snap); return static_cast(entry.th32ParentProcessID); } std::string SystemInfo::getProcessName() { std::string name; // Only want info for the current process, so ask for something specific. // The module info won't be used here but it keeps the snapshot limited to // the current process so a search through all processes is not needed. HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, 0); if (snap == INVALID_HANDLE_VALUE) return name; PROCESSENTRY32 entry; entry.dwSize = sizeof(entry); if (!Process32First(snap, &entry)) entry.szExeFile[0] = '\0'; CloseHandle(snap); name = entry.szExeFile; return name; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/windows/Shlib.cpp0000664000076400007640000000324511564561455020755 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Shlib.h" #include "qpid/Exception.h" #include "qpid/sys/windows/check.h" #include namespace qpid { namespace sys { void Shlib::load(const char* name) { HMODULE h = LoadLibrary(name); if (h == NULL) { throw QPID_WINDOWS_ERROR(GetLastError()); } handle = static_cast(h); } void Shlib::unload() { if (handle) { if (FreeLibrary(static_cast(handle)) == 0) { throw QPID_WINDOWS_ERROR(GetLastError()); } handle = 0; } } void* Shlib::getSymbol(const char* name) { // Double cast avoids warning about casting function pointer to object void *sym = reinterpret_cast(reinterpret_cast(GetProcAddress(static_cast(handle), name))); if (sym == NULL) throw QPID_WINDOWS_ERROR(GetLastError()); return sym; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/windows/MemStat.cpp0000664000076400007640000000176311715276712021266 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/MemStat.h" void qpid::sys::MemStat::loadMemInfo(qmf::org::apache::qpid::broker::Memory*) { // TODO: Add Windows-specific memory stats to the object and load them here. } qpidc-0.16/src/qpid/sys/windows/AsynchIO.cpp0000664000076400007640000005462511621324771021371 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/windows/AsynchIoResult.h" #include "qpid/sys/windows/IoHandlePrivate.h" #include "qpid/sys/AsynchIO.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Socket.h" #include "qpid/sys/Poller.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Time.h" #include "qpid/log/Statement.h" #include "qpid/sys/windows/check.h" #include "qpid/sys/windows/mingw32_compat.h" #include #include #include #include #include #include namespace { typedef qpid::sys::ScopedLock QLock; /* * The function pointers for AcceptEx and ConnectEx need to be looked up * at run time. */ const LPFN_ACCEPTEX lookUpAcceptEx(const qpid::sys::Socket& s) { SOCKET h = toSocketHandle(s); GUID guidAcceptEx = WSAID_ACCEPTEX; DWORD dwBytes = 0; LPFN_ACCEPTEX fnAcceptEx; WSAIoctl(h, SIO_GET_EXTENSION_FUNCTION_POINTER, &guidAcceptEx, sizeof(guidAcceptEx), &fnAcceptEx, sizeof(fnAcceptEx), &dwBytes, NULL, NULL); if (fnAcceptEx == 0) throw qpid::Exception(QPID_MSG("Failed to look up AcceptEx")); return fnAcceptEx; } } namespace qpid { namespace sys { namespace windows { /* * Asynch Acceptor * */ class AsynchAcceptor : public qpid::sys::AsynchAcceptor { friend class AsynchAcceptResult; public: AsynchAcceptor(const Socket& s, AsynchAcceptor::Callback callback); ~AsynchAcceptor(); void start(Poller::shared_ptr poller); private: void restart(void); AsynchAcceptor::Callback acceptedCallback; const Socket& socket; const LPFN_ACCEPTEX fnAcceptEx; }; AsynchAcceptor::AsynchAcceptor(const Socket& s, Callback callback) : acceptedCallback(callback), socket(s), fnAcceptEx(lookUpAcceptEx(s)) { s.setNonblocking(); } AsynchAcceptor::~AsynchAcceptor() { socket.close(); } void AsynchAcceptor::start(Poller::shared_ptr poller) { PollerHandle ph = PollerHandle(socket); poller->monitorHandle(ph, Poller::INPUT); restart (); } void AsynchAcceptor::restart(void) { DWORD bytesReceived = 0; // Not used, needed for AcceptEx API AsynchAcceptResult *result = new AsynchAcceptResult(acceptedCallback, this, socket); BOOL status; status = fnAcceptEx(toSocketHandle(socket), toSocketHandle(*result->newSocket), result->addressBuffer, 0, AsynchAcceptResult::SOCKADDRMAXLEN, AsynchAcceptResult::SOCKADDRMAXLEN, &bytesReceived, result->overlapped()); QPID_WINDOWS_CHECK_ASYNC_START(status); } AsynchAcceptResult::AsynchAcceptResult(AsynchAcceptor::Callback cb, AsynchAcceptor *acceptor, const Socket& listener) : callback(cb), acceptor(acceptor), listener(toSocketHandle(listener)), newSocket(listener.createSameTypeSocket()) { } void AsynchAcceptResult::success(size_t /*bytesTransferred*/) { ::setsockopt (toSocketHandle(*newSocket), SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, (char*)&listener, sizeof (listener)); callback(*(newSocket.release())); acceptor->restart (); delete this; } void AsynchAcceptResult::failure(int /*status*/) { //if (status != WSA_OPERATION_ABORTED) // Can there be anything else? ; delete this; } /* * AsynchConnector does synchronous connects for now... to do asynch the * IocpPoller will need some extension to register an event handle as a * CONNECT-type "direction", the connect completion/result will need an * event handle to associate with the connecting handle. But there's no * time for that right now... */ class AsynchConnector : public qpid::sys::AsynchConnector { private: ConnectedCallback connCallback; FailedCallback failCallback; const Socket& socket; const std::string hostname; const std::string port; public: AsynchConnector(const Socket& socket, const std::string& hostname, const std::string& port, ConnectedCallback connCb, FailedCallback failCb = 0); void start(Poller::shared_ptr poller); }; AsynchConnector::AsynchConnector(const Socket& sock, const std::string& hname, const std::string& p, ConnectedCallback connCb, FailedCallback failCb) : connCallback(connCb), failCallback(failCb), socket(sock), hostname(hname), port(p) { } void AsynchConnector::start(Poller::shared_ptr) { try { socket.connect(hostname, port); socket.setNonblocking(); connCallback(socket); } catch(std::exception& e) { if (failCallback) failCallback(socket, -1, std::string(e.what())); socket.close(); } } } // namespace windows AsynchAcceptor* AsynchAcceptor::create(const Socket& s, Callback callback) { return new windows::AsynchAcceptor(s, callback); } AsynchConnector* qpid::sys::AsynchConnector::create(const Socket& s, const std::string& hostname, const std::string& port, ConnectedCallback connCb, FailedCallback failCb) { return new windows::AsynchConnector(s, hostname, port, connCb, failCb); } /* * Asynch reader/writer */ namespace windows { class AsynchIO : public qpid::sys::AsynchIO { public: AsynchIO(const Socket& s, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb = 0, BuffersEmptyCallback eCb = 0, IdleCallback iCb = 0); ~AsynchIO(); // Methods inherited from qpid::sys::AsynchIO /** * Notify the object is should delete itself as soon as possible. */ virtual void queueForDeletion(); /// Take any actions needed to prepare for working with the poller. virtual void start(Poller::shared_ptr poller); virtual void queueReadBuffer(BufferBase* buff); virtual void unread(BufferBase* buff); virtual void queueWrite(BufferBase* buff); virtual void notifyPendingWrite(); virtual void queueWriteClose(); virtual bool writeQueueEmpty(); virtual void startReading(); virtual void stopReading(); virtual void requestCallback(RequestCallback); /** * getQueuedBuffer returns a buffer from the buffer queue, if one is * available. * * @retval Pointer to BufferBase buffer; 0 if none is available. */ virtual BufferBase* getQueuedBuffer(); private: ReadCallback readCallback; EofCallback eofCallback; DisconnectCallback disCallback; ClosedCallback closedCallback; BuffersEmptyCallback emptyCallback; IdleCallback idleCallback; const Socket& socket; Poller::shared_ptr poller; std::deque bufferQueue; std::deque writeQueue; /* The MSVC-supplied deque is not thread-safe; keep locks to serialize * access to the buffer queue and write queue. */ Mutex bufferQueueLock; // Number of outstanding I/O operations. volatile LONG opsInProgress; // Is there a write in progress? volatile bool writeInProgress; // Deletion requested, but there are callbacks in progress. volatile bool queuedDelete; // Socket close requested, but there are operations in progress. volatile bool queuedClose; private: // Dispatch events that have completed. void notifyEof(void); void notifyDisconnect(void); void notifyClosed(void); void notifyBuffersEmpty(void); void notifyIdle(void); /** * Initiate a write of the specified buffer. There's no callback for * write completion to the AsynchIO object. */ void startWrite(AsynchIO::BufferBase* buff); void close(void); /** * readComplete is called when a read request is complete. * * @param result Results of the operation. */ void readComplete(AsynchReadResult *result); /** * writeComplete is called when a write request is complete. * * @param result Results of the operation. */ void writeComplete(AsynchWriteResult *result); /** * Queue of completions to run. This queue enforces the requirement * from upper layers that only one thread at a time is allowed to act * on any given connection. Once a thread is busy processing a completion * on this object, other threads that dispatch completions queue the * completions here for the in-progress thread to handle when done. * Thus, any threads can dispatch a completion from the IocpPoller, but * this class ensures that actual processing at the connection level is * only on one thread at a time. */ std::queue completionQueue; volatile bool working; Mutex completionLock; /** * Called when there's a completion to process. */ void completion(AsynchIoResult *result); }; // This is used to encapsulate pure callbacks into a handle class CallbackHandle : public IOHandle { public: CallbackHandle(AsynchIoResult::Completer completeCb, AsynchIO::RequestCallback reqCb = 0) : IOHandle(new IOHandlePrivate (INVALID_SOCKET, completeCb, reqCb)) {} }; AsynchIO::AsynchIO(const Socket& s, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb, BuffersEmptyCallback eCb, IdleCallback iCb) : readCallback(rCb), eofCallback(eofCb), disCallback(disCb), closedCallback(cCb), emptyCallback(eCb), idleCallback(iCb), socket(s), opsInProgress(0), writeInProgress(false), queuedDelete(false), queuedClose(false), working(false) { } struct deleter { template void operator()(T *ptr){ delete ptr;} }; AsynchIO::~AsynchIO() { std::for_each( bufferQueue.begin(), bufferQueue.end(), deleter()); std::for_each( writeQueue.begin(), writeQueue.end(), deleter()); } void AsynchIO::queueForDeletion() { queuedDelete = true; if (opsInProgress > 0) { QPID_LOG(info, "Delete AsynchIO queued; ops in progress"); // AsynchIOHandler calls this then deletes itself; don't do any more // callbacks. readCallback = 0; eofCallback = 0; disCallback = 0; closedCallback = 0; emptyCallback = 0; idleCallback = 0; } else { delete this; } } void AsynchIO::start(Poller::shared_ptr poller0) { PollerHandle ph = PollerHandle(socket); poller = poller0; poller->monitorHandle(ph, Poller::INPUT); if (writeQueue.size() > 0) // Already have data queued for write notifyPendingWrite(); startReading(); } void AsynchIO::queueReadBuffer(AsynchIO::BufferBase* buff) { assert(buff); buff->dataStart = 0; buff->dataCount = 0; QLock l(bufferQueueLock); bufferQueue.push_back(buff); } void AsynchIO::unread(AsynchIO::BufferBase* buff) { assert(buff); buff->squish(); QLock l(bufferQueueLock); bufferQueue.push_front(buff); } void AsynchIO::queueWrite(AsynchIO::BufferBase* buff) { assert(buff); QLock l(bufferQueueLock); writeQueue.push_back(buff); if (!writeInProgress) notifyPendingWrite(); } void AsynchIO::notifyPendingWrite() { // This method is generally called from a processing thread; transfer // work on this to an I/O thread. Much of the upper layer code assumes // that all I/O-related things happen in an I/O thread. if (poller == 0) // Not really going yet... return; InterlockedIncrement(&opsInProgress); PollerHandle ph(CallbackHandle(boost::bind(&AsynchIO::completion, this, _1))); poller->monitorHandle(ph, Poller::OUTPUT); } void AsynchIO::queueWriteClose() { queuedClose = true; if (!writeInProgress) notifyPendingWrite(); } bool AsynchIO::writeQueueEmpty() { QLock l(bufferQueueLock); return writeQueue.size() == 0; } /* * Initiate a read operation. AsynchIO::readComplete() will be * called when the read is complete and data is available. */ void AsynchIO::startReading() { if (queuedDelete) return; // (Try to) get a buffer; look on the front since there may be an // "unread" one there with data remaining from last time. AsynchIO::BufferBase *buff = 0; { QLock l(bufferQueueLock); if (!bufferQueue.empty()) { buff = bufferQueue.front(); assert(buff); bufferQueue.pop_front(); } } if (buff != 0) { int readCount = buff->byteCount - buff->dataCount; AsynchReadResult *result = new AsynchReadResult(boost::bind(&AsynchIO::completion, this, _1), buff, readCount); DWORD bytesReceived = 0, flags = 0; InterlockedIncrement(&opsInProgress); int status = WSARecv(toSocketHandle(socket), const_cast(result->getWSABUF()), 1, &bytesReceived, &flags, result->overlapped(), 0); if (status != 0) { int error = WSAGetLastError(); if (error != WSA_IO_PENDING) { result->failure(error); result = 0; // result is invalid here return; } } // On status 0 or WSA_IO_PENDING, completion will handle the rest. } else { notifyBuffersEmpty(); } return; } // stopReading was added to prevent a race condition with read-credit on Linux. // It may or may not be required on windows. // // AsynchIOHandler::readbuff() calls stopReading() inside the same // critical section that protects startReading() in // AsynchIOHandler::giveReadCredit(). // void AsynchIO::stopReading() {} // Queue the specified callback for invocation from an I/O thread. void AsynchIO::requestCallback(RequestCallback callback) { // This method is generally called from a processing thread; transfer // work on this to an I/O thread. Much of the upper layer code assumes // that all I/O-related things happen in an I/O thread. if (poller == 0) // Not really going yet... return; InterlockedIncrement(&opsInProgress); PollerHandle ph(CallbackHandle( boost::bind(&AsynchIO::completion, this, _1), callback)); poller->monitorHandle(ph, Poller::INPUT); } /** * Return a queued buffer if there are enough to spare. */ AsynchIO::BufferBase* AsynchIO::getQueuedBuffer() { QLock l(bufferQueueLock); // Always keep at least one buffer (it might have data that was // "unread" in it). if (bufferQueue.size() <= 1) return 0; BufferBase* buff = bufferQueue.back(); assert(buff); bufferQueue.pop_back(); return buff; } void AsynchIO::notifyEof(void) { if (eofCallback) eofCallback(*this); } void AsynchIO::notifyDisconnect(void) { if (disCallback) disCallback(*this); } void AsynchIO::notifyClosed(void) { if (closedCallback) closedCallback(*this, socket); } void AsynchIO::notifyBuffersEmpty(void) { if (emptyCallback) emptyCallback(*this); } void AsynchIO::notifyIdle(void) { if (idleCallback) idleCallback(*this); } /* * Asynch reader/writer using overlapped I/O */ void AsynchIO::startWrite(AsynchIO::BufferBase* buff) { writeInProgress = true; InterlockedIncrement(&opsInProgress); AsynchWriteResult *result = new AsynchWriteResult(boost::bind(&AsynchIO::completion, this, _1), buff, buff->dataCount); DWORD bytesSent = 0; int status = WSASend(toSocketHandle(socket), const_cast(result->getWSABUF()), 1, &bytesSent, 0, result->overlapped(), 0); if (status != 0) { int error = WSAGetLastError(); if (error != WSA_IO_PENDING) { result->failure(error); // Also decrements in-progress count result = 0; // result is invalid here return; } } // On status 0 or WSA_IO_PENDING, completion will handle the rest. return; } /* * Close the socket and callback to say we've done it */ void AsynchIO::close(void) { socket.close(); notifyClosed(); } void AsynchIO::readComplete(AsynchReadResult *result) { int status = result->getStatus(); size_t bytes = result->getTransferred(); if (status == 0 && bytes > 0) { bool restartRead = true; // May not if receiver doesn't want more if (readCallback) readCallback(*this, result->getBuff()); if (restartRead) startReading(); } else { // No data read, so put the buffer back. It may be partially filled, // so "unread" it back to the front of the queue. unread(result->getBuff()); notifyEof(); if (status != 0) { notifyDisconnect(); } } } /* * NOTE - this completion is called for completed writes and also when * a write is desired. The difference is in the buff - if a write is desired * the buff is 0. */ void AsynchIO::writeComplete(AsynchWriteResult *result) { int status = result->getStatus(); size_t bytes = result->getTransferred(); AsynchIO::BufferBase *buff = result->getBuff(); if (buff != 0) { writeInProgress = false; if (status == 0 && bytes > 0) { if (bytes < result->getRequested()) // Still more to go; resubmit startWrite(buff); else queueReadBuffer(buff); // All done; back to the pool } else { // An error... if it's a connection close, ignore it - it will be // noticed and handled on a read completion any moment now. // What to do with real error??? Save the Buffer? } } // If there are no writes outstanding, check for more writes to initiate // (either queued or via idle). The opsInProgress count is handled in // completion() if (!writeInProgress) { bool writing = false; { QLock l(bufferQueueLock); if (writeQueue.size() > 0) { buff = writeQueue.front(); assert(buff); writeQueue.pop_front(); startWrite(buff); writing = true; } } if (!writing && !queuedClose) { notifyIdle(); } } return; } void AsynchIO::completion(AsynchIoResult *result) { { ScopedLock l(completionLock); if (working) { completionQueue.push(result); return; } // First thread in with something to do; note we're working then keep // handling completions. working = true; while (result != 0) { // New scope to unlock temporarily. { ScopedUnlock ul(completionLock); AsynchReadResult *r = dynamic_cast(result); if (r != 0) readComplete(r); else { AsynchWriteResult *w = dynamic_cast(result); if (w != 0) writeComplete(w); else { AsynchCallbackRequest *req = dynamic_cast(result); req->reqCallback(*this); } } delete result; result = 0; InterlockedDecrement(&opsInProgress); } // Lock is held again. if (completionQueue.empty()) continue; result = completionQueue.front(); completionQueue.pop(); } working = false; } // Lock released; ok to close if ops are done and close requested. // Layer above will call back to queueForDeletion() if it hasn't // already been done. If it already has, go ahead and delete. if (opsInProgress == 0) { if (queuedClose) // close() may cause a delete; don't trust 'this' on return close(); else if (queuedDelete) delete this; } } } // namespace windows AsynchIO* qpid::sys::AsynchIO::create(const Socket& s, AsynchIO::ReadCallback rCb, AsynchIO::EofCallback eofCb, AsynchIO::DisconnectCallback disCb, AsynchIO::ClosedCallback cCb, AsynchIO::BuffersEmptyCallback eCb, AsynchIO::IdleCallback iCb) { return new qpid::sys::windows::AsynchIO(s, rCb, eofCb, disCb, cCb, eCb, iCb); } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/Shlib.h0000664000076400007640000000435111717537230016721 0ustar00jrossjross00000000000000#ifndef QPID_SYS_SHLIB_H #define QPID_SYS_SHLIB_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" #include "qpid/sys/IntegerTypes.h" #include #include namespace qpid { namespace sys { /** Encapsulates a shared library handle. *@see AutoShlib */ class Shlib { public: /** Load a shared library */ Shlib(const char* libname) { load(libname); } /** Load a shared library */ Shlib(const std::string& libname) { load(libname.c_str()); } /** Unload shared library. */ QPID_COMMON_EXTERN void unload(); /** Look up symbol. */ QPID_COMMON_EXTERN void* getSymbol(const char* symbol); /** Look up symbol in shared library, cast it to the desired * pointer type, void* by default. */ template T getSymbol(const char* symbol) { // Double cast avoids warning about casting object to function pointer return reinterpret_cast(reinterpret_cast( this->getSymbol(symbol))); } private: void* handle; QPID_COMMON_EXTERN void load(const char* libname); }; /** A shared library handle that unloads the shlib in it's dtor */ class AutoShlib : public Shlib { public: /** Load shared library */ AutoShlib(const std::string& libname) : Shlib(libname) {} /** Calls unload() */ QPID_COMMON_EXTERN ~AutoShlib() throw(); }; }} // namespace qpid::sys #endif /*!QPID_SYS_SHLIB_H*/ qpidc-0.16/src/qpid/sys/StateMonitor.h0000664000076400007640000000474611562043305020311 0ustar00jrossjross00000000000000#ifndef QPID_SYS_STATEMONITOR_H #define QPID_SYS_STATEMONITOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Waitable.h" #include namespace qpid { namespace sys { /** * A monitor with an enum state value. * *@param Enum: enum type to use for states. *@param EnumMax: Highest enum value. */ template class StateMonitor : public Waitable { public: struct Set : public std::bitset { Set() {} Set(Enum s) { set(s); } Set(Enum s, Enum t) { std::bitset::set(s).set(t); } Set(Enum s, Enum t, Enum u) { std::bitset::set(s).set(t).set(u); } Set(Enum s, Enum t, Enum u, Enum v) { std::bitset::set(s).set(t).set(u).set(v); } }; StateMonitor(Enum initial) { state=initial; } /** @pre Caller holds a ScopedLock. */ void set(Enum s) { state=s; notifyAll(); } /** @pre Caller holds a ScopedLock. */ StateMonitor& operator=(Enum s) { set(s); return *this; } /** @pre Caller holds a ScopedLock. */ Enum get() const { return state; } /** @pre Caller holds a ScopedLock. */ operator Enum() const { return state; } /** @pre Caller holds a ScopedLock */ void waitFor(Enum s) { ScopedWait w(*this); while (s != state) wait(); } /** @pre Caller holds a ScopedLock */ void waitFor(Set s) { ScopedWait w(*this); while (!s.test(state)) wait(); } /** @pre Caller holds a ScopedLock */ void waitNot(Enum s) { ScopedWait w(*this); while (s == state) wait(); } /** @pre Caller holds a ScopedLock */ void waitNot(Set s) { ScopedWait w(*this); while (s.test(state)) wait(); } private: Enum state; }; }} #endif /*!QPID_SYS_STATEMONITOR_H*/ qpidc-0.16/src/qpid/sys/AggregateOutput.cpp0000664000076400007640000000475311341775433021332 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/AggregateOutput.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace sys { AggregateOutput::AggregateOutput(OutputControl& c) : busy(false), control(c) {} void AggregateOutput::abort() { control.abort(); } void AggregateOutput::activateOutput() { control.activateOutput(); } void AggregateOutput::giveReadCredit(int32_t credit) { control.giveReadCredit(credit); } namespace { // Clear the busy flag and notify waiting threads in destructor. struct ScopedBusy { bool& flag; Monitor& monitor; ScopedBusy(bool& f, Monitor& m) : flag(f), monitor(m) { f = true; } ~ScopedBusy() { flag = false; monitor.notifyAll(); } }; } bool AggregateOutput::doOutput() { Mutex::ScopedLock l(lock); ScopedBusy sb(busy, lock); while (!tasks.empty()) { OutputTask* t=tasks.front(); tasks.pop_front(); bool didOutput; { // Allow concurrent call to addOutputTask. // removeOutputTask will wait till !busy before removing a task. Mutex::ScopedUnlock u(lock); didOutput = t->doOutput(); } if (didOutput) { tasks.push_back(t); return true; } } return false; } void AggregateOutput::addOutputTask(OutputTask* task) { Mutex::ScopedLock l(lock); tasks.push_back(task); } void AggregateOutput::removeOutputTask(OutputTask* task) { Mutex::ScopedLock l(lock); while (busy) lock.wait(); tasks.erase(std::remove(tasks.begin(), tasks.end(), task), tasks.end()); } void AggregateOutput::removeAll() { Mutex::ScopedLock l(lock); while (busy) lock.wait(); tasks.clear(); } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/PollableCondition.h0000664000076400007640000000337011225452477021264 0ustar00jrossjross00000000000000#ifndef QPID_SYS_POLLABLECONDITION_H #define QPID_SYS_POLLABLECONDITION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Poller.h" #include "qpid/CommonImportExport.h" #include #include namespace qpid { namespace sys { class PollableConditionPrivate; class PollableCondition { public: typedef boost::function1 Callback; QPID_COMMON_EXTERN PollableCondition(const Callback& cb, const boost::shared_ptr& poller); QPID_COMMON_EXTERN ~PollableCondition(); /** * Set the condition. Triggers callback to Callback from Poller. */ QPID_COMMON_EXTERN void set(); /** * Clear the condition. Stops callbacks from Poller. */ QPID_COMMON_EXTERN void clear(); private: PollableConditionPrivate *impl; Callback callback; boost::shared_ptr poller; }; }} // namespace qpid::sys #endif /*!QPID_SYS_POLLABLECONDITION_H*/ qpidc-0.16/src/qpid/sys/Timer.h0000664000076400007640000000617611576211367016752 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef sys_Timer #define sys_Timer #include "qpid/sys/TimerWarnings.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/RefCounted.h" #include "qpid/CommonImportExport.h" #include #include #include namespace qpid { namespace sys { class Timer; class TimerTask : public RefCounted { friend class Timer; friend bool operator<(const boost::intrusive_ptr&, const boost::intrusive_ptr&); std::string name; AbsTime sortTime; Duration period; AbsTime nextFireTime; Mutex callbackLock; volatile bool cancelled; bool readyToFire() const; void fireTask(); public: QPID_COMMON_EXTERN TimerTask(Duration period, const std::string& name); QPID_COMMON_EXTERN TimerTask(AbsTime fireTime, const std::string& name); QPID_COMMON_EXTERN virtual ~TimerTask(); QPID_COMMON_EXTERN void setupNextFire(); QPID_COMMON_EXTERN void restart(); QPID_COMMON_EXTERN void cancel(); std::string getName() const { return name; } // Move the nextFireTime so readyToFire is true. // Used by the cluster, where tasks are fired on cluster events, not on local time. QPID_COMMON_EXTERN void setFired(); protected: // Must be overridden with callback virtual void fire() = 0; }; // For the priority_queue order bool operator<(const boost::intrusive_ptr& a, const boost::intrusive_ptr& b); class Timer : private Runnable { qpid::sys::Monitor monitor; std::priority_queue > tasks; qpid::sys::Thread runner; bool active; // Runnable interface void run(); public: QPID_COMMON_EXTERN Timer(); QPID_COMMON_EXTERN virtual ~Timer(); QPID_COMMON_EXTERN virtual void add(boost::intrusive_ptr task); QPID_COMMON_EXTERN virtual void start(); QPID_COMMON_EXTERN virtual void stop(); protected: QPID_COMMON_EXTERN virtual void fire(boost::intrusive_ptr task); QPID_COMMON_EXTERN virtual void drop(boost::intrusive_ptr task); // Allow derived classes to change the late/overran thresholds. Duration late; Duration overran; Duration lateCancel; TimerWarnings warn; }; }} #endif qpidc-0.16/src/qpid/sys/SecurityLayer.h0000664000076400007640000000231011227113407020445 0ustar00jrossjross00000000000000#ifndef QPID_SYS_SECURITYLAYER_H #define QPID_SYS_SECURITYLAYER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Codec.h" namespace qpid { namespace sys { /** * Defines interface to a SASL negotiated Security Layer (for * encryption/integrity) */ class SecurityLayer : public Codec { public: virtual void init(Codec*) = 0; virtual ~SecurityLayer() {} }; }} // namespace qpid::sys #endif /*!QPID_SYS_SECURITYLAYER_H*/ qpidc-0.16/src/qpid/sys/RdmaIOPlugin.cpp0000664000076400007640000003106311653514043020501 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ProtocolFactory.h" #include "qpid/Plugin.h" #include "qpid/broker/Broker.h" #include "qpid/framing/AMQP_HighestVersion.h" #include "qpid/log/Statement.h" #include "qpid/sys/rdma/RdmaIO.h" #include "qpid/sys/rdma/rdma_exception.h" #include "qpid/sys/OutputControl.h" #include "qpid/sys/SecuritySettings.h" #include #include #include using std::auto_ptr; using std::string; using std::stringstream; namespace qpid { namespace sys { class RdmaIOHandler : public OutputControl { std::string identifier; ConnectionCodec::Factory* factory; ConnectionCodec* codec; bool readError; sys::Mutex pollingLock; bool polling; Rdma::AsynchIO* aio; Rdma::Connection::intrusive_ptr connection; void write(const framing::ProtocolInitiation&); void disconnectAction(); public: RdmaIOHandler(Rdma::Connection::intrusive_ptr c, ConnectionCodec::Factory* f); ~RdmaIOHandler(); void init(Rdma::AsynchIO* a); void start(Poller::shared_ptr poller); // Output side void close(); void abort(); void activateOutput(); void giveReadCredit(int32_t credit); void initProtocolOut(); // Input side void readbuff(Rdma::AsynchIO& aio, Rdma::Buffer* buff); void initProtocolIn(Rdma::Buffer* buff); // Notifications void full(Rdma::AsynchIO& aio); void idle(Rdma::AsynchIO& aio); void error(Rdma::AsynchIO& aio); void disconnected(); void drained(); }; RdmaIOHandler::RdmaIOHandler(Rdma::Connection::intrusive_ptr c, qpid::sys::ConnectionCodec::Factory* f) : identifier(c->getFullName()), factory(f), codec(0), readError(false), polling(false), connection(c) { } RdmaIOHandler::~RdmaIOHandler() { if (codec) codec->closed(); delete codec; delete aio; } void RdmaIOHandler::init(Rdma::AsynchIO* a) { aio = a; } void RdmaIOHandler::start(Poller::shared_ptr poller) { Mutex::ScopedLock l(pollingLock); assert(!polling); polling = true; aio->start(poller); } void RdmaIOHandler::write(const framing::ProtocolInitiation& data) { QPID_LOG(debug, "Rdma: SENT [" << identifier << "]: INIT(" << data << ")"); Rdma::Buffer* buff = aio->getSendBuffer(); assert(buff); framing::Buffer out(buff->bytes(), buff->byteCount()); data.encode(out); buff->dataCount(data.encodedSize()); aio->queueWrite(buff); } void RdmaIOHandler::close() { aio->drainWriteQueue(boost::bind(&RdmaIOHandler::drained, this)); } // TODO: Dummy implementation, need to fill this in for heartbeat timeout to work void RdmaIOHandler::abort() { } void RdmaIOHandler::activateOutput() { aio->notifyPendingWrite(); } void RdmaIOHandler::idle(Rdma::AsynchIO&) { // TODO: Shouldn't need this test as idle() should only ever be called when // the connection is writable anyway if ( !aio->writable() ) { return; } if (codec == 0) return; if (!codec->canEncode()) { return; } Rdma::Buffer* buff = aio->getSendBuffer(); if (buff) { size_t encoded=codec->encode(buff->bytes(), buff->byteCount()); buff->dataCount(encoded); aio->queueWrite(buff); if (codec->isClosed()) { close(); } } } void RdmaIOHandler::initProtocolOut() { // We mustn't have already started the conversation // but we must be able to send assert( codec == 0 ); assert( aio->writable() ); codec = factory->create(*this, identifier, SecuritySettings()); write(framing::ProtocolInitiation(codec->getVersion())); } void RdmaIOHandler::error(Rdma::AsynchIO&) { disconnected(); } namespace { void stopped(RdmaIOHandler* async) { delete async; } } void RdmaIOHandler::disconnectAction() { { Mutex::ScopedLock l(pollingLock); // If we're closed already then we'll get to drained() anyway if (!polling) return; polling = false; } aio->stop(boost::bind(&stopped, this)); } void RdmaIOHandler::disconnected() { aio->requestCallback(boost::bind(&RdmaIOHandler::disconnectAction, this)); } void RdmaIOHandler::drained() { // We know we've drained the write queue now, but we don't have to do anything // because we can rely on the client to disconnect to trigger the connection // cleanup. } void RdmaIOHandler::full(Rdma::AsynchIO&) { QPID_LOG(debug, "Rdma: buffer full [" << identifier << "]"); } // TODO: Dummy implementation of read throttling void RdmaIOHandler::giveReadCredit(int32_t) { } // The logic here is subtly different from TCP as RDMA is message oriented // so we define that an RDMA message is a frame - in this case there is no putting back // of any message remainder - there shouldn't be any. And what we read here can't be // smaller than a frame void RdmaIOHandler::readbuff(Rdma::AsynchIO&, Rdma::Buffer* buff) { if (readError) { return; } try { if (codec) { (void) codec->decode(buff->bytes(), buff->dataCount()); }else{ // Need to start protocol processing initProtocolIn(buff); } }catch(const std::exception& e){ QPID_LOG(error, e.what()); readError = true; close(); } } void RdmaIOHandler::initProtocolIn(Rdma::Buffer* buff) { framing::Buffer in(buff->bytes(), buff->dataCount()); framing::ProtocolInitiation protocolInit; if (protocolInit.decode(in)) { QPID_LOG(debug, "Rdma: RECV [" << identifier << "]: INIT(" << protocolInit << ")"); codec = factory->create(protocolInit.getVersion(), *this, identifier, SecuritySettings()); // If we failed to create the codec then we don't understand the offered protocol version if (!codec) { // send valid version header & close connection. write(framing::ProtocolInitiation(framing::highestProtocolVersion)); readError = true; close(); } } } class RdmaIOProtocolFactory : public ProtocolFactory { auto_ptr listener; const uint16_t listeningPort; public: RdmaIOProtocolFactory(int16_t port, int backlog); void accept(Poller::shared_ptr, ConnectionCodec::Factory*); void connect(Poller::shared_ptr, const string& host, const std::string& port, ConnectionCodec::Factory*, ConnectFailedCallback); uint16_t getPort() const; private: bool request(Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams&, ConnectionCodec::Factory*); void established(Poller::shared_ptr, Rdma::Connection::intrusive_ptr); void connected(Poller::shared_ptr, Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams&, ConnectionCodec::Factory*); void connectionError(Rdma::Connection::intrusive_ptr, Rdma::ErrorType); void disconnected(Rdma::Connection::intrusive_ptr); void rejected(Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams&, ConnectFailedCallback); }; // Static instance to initialise plugin static class RdmaIOPlugin : public Plugin { void earlyInitialize(Target&) { } void initialize(Target& target) { // Check whether we actually have any rdma devices if ( Rdma::deviceCount() == 0 ) { QPID_LOG(info, "Rdma: Disabled: no rdma devices found"); return; } broker::Broker* broker = dynamic_cast(&target); // Only provide to a Broker if (broker) { const broker::Broker::Options& opts = broker->getOptions(); ProtocolFactory::shared_ptr protocol(new RdmaIOProtocolFactory(opts.port, opts.connectionBacklog)); QPID_LOG(notice, "Rdma: Listening on RDMA port " << protocol->getPort()); broker->registerProtocolFactory("rdma", protocol); } } } rdmaPlugin; RdmaIOProtocolFactory::RdmaIOProtocolFactory(int16_t port, int /*backlog*/) : listeningPort(port) {} void RdmaIOProtocolFactory::established(Poller::shared_ptr poller, Rdma::Connection::intrusive_ptr ci) { RdmaIOHandler* async = ci->getContext(); async->start(poller); } bool RdmaIOProtocolFactory::request(Rdma::Connection::intrusive_ptr ci, const Rdma::ConnectionParams& cp, ConnectionCodec::Factory* f) { try { if (cp.rdmaProtocolVersion == 0) { QPID_LOG(warning, "Rdma: connection from protocol version 0 client"); } RdmaIOHandler* async = new RdmaIOHandler(ci, f); Rdma::AsynchIO* aio = new Rdma::AsynchIO(ci->getQueuePair(), cp.rdmaProtocolVersion, cp.maxRecvBufferSize, cp.initialXmitCredit, Rdma::DEFAULT_WR_ENTRIES, boost::bind(&RdmaIOHandler::readbuff, async, _1, _2), boost::bind(&RdmaIOHandler::idle, async, _1), 0, // boost::bind(&RdmaIOHandler::full, async, _1), boost::bind(&RdmaIOHandler::error, async, _1)); async->init(aio); // Record aio so we can get it back from a connection ci->addContext(async); return true; } catch (const Rdma::Exception& e) { QPID_LOG(error, "Rdma: Cannot accept new connection (Rdma exception): " << e.what()); } catch (const std::exception& e) { QPID_LOG(error, "Rdma: Cannot accept new connection (unknown exception): " << e.what()); } // If we get here we caught an exception so reject connection return false; } void RdmaIOProtocolFactory::connectionError(Rdma::Connection::intrusive_ptr, Rdma::ErrorType) { } void RdmaIOProtocolFactory::disconnected(Rdma::Connection::intrusive_ptr ci) { // If we've got a connection already tear it down, otherwise ignore RdmaIOHandler* async = ci->getContext(); if (async) { // Make sure we don't disconnect more than once ci->removeContext(); async->disconnected(); } } uint16_t RdmaIOProtocolFactory::getPort() const { return listeningPort; // Immutable no need for lock. } void RdmaIOProtocolFactory::accept(Poller::shared_ptr poller, ConnectionCodec::Factory* fact) { listener.reset( new Rdma::Listener( Rdma::ConnectionParams(65536, Rdma::DEFAULT_WR_ENTRIES), boost::bind(&RdmaIOProtocolFactory::established, this, poller, _1), boost::bind(&RdmaIOProtocolFactory::connectionError, this, _1, _2), boost::bind(&RdmaIOProtocolFactory::disconnected, this, _1), boost::bind(&RdmaIOProtocolFactory::request, this, _1, _2, fact))); SocketAddress sa("",boost::lexical_cast(listeningPort)); listener->start(poller, sa); } // Only used for outgoing connections (in federation) void RdmaIOProtocolFactory::rejected(Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams&, ConnectFailedCallback failed) { failed(-1, "Connection rejected"); } // Do the same as connection request and established but mark a client too void RdmaIOProtocolFactory::connected(Poller::shared_ptr poller, Rdma::Connection::intrusive_ptr ci, const Rdma::ConnectionParams& cp, ConnectionCodec::Factory* f) { (void) request(ci, cp, f); established(poller, ci); RdmaIOHandler* async = ci->getContext(); async->initProtocolOut(); } void RdmaIOProtocolFactory::connect( Poller::shared_ptr poller, const std::string& host, const std::string& port, ConnectionCodec::Factory* f, ConnectFailedCallback failed) { Rdma::Connector* c = new Rdma::Connector( Rdma::ConnectionParams(8000, Rdma::DEFAULT_WR_ENTRIES), boost::bind(&RdmaIOProtocolFactory::connected, this, poller, _1, _2, f), boost::bind(&RdmaIOProtocolFactory::connectionError, this, _1, _2), boost::bind(&RdmaIOProtocolFactory::disconnected, this, _1), boost::bind(&RdmaIOProtocolFactory::rejected, this, _1, _2, failed)); SocketAddress sa(host, port); c->start(poller, sa); } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/unordered_map.h0000664000076400007640000000166011652540226020501 0ustar00jrossjross00000000000000#ifndef _sys_unordered_map_h #define _sys_unordered_map_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ // unordered_map include path is platform specific #ifdef _MSC_VER # include #else # include #endif /* _MSC_VER */ namespace qpid { namespace sys { using std::tr1::unordered_map; }} #endif /* _sys_unordered_map_h */ qpidc-0.16/src/qpid/sys/Waitable.h0000664000076400007640000000637011500370036017400 0ustar00jrossjross00000000000000#ifndef QPID_SYS_WAITABLE_H #define QPID_SYS_WAITABLE_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Monitor.h" #include "qpid/sys/ExceptionHolder.h" #include namespace qpid { namespace sys { /** * A monitor that keeps track of waiting threads. Threads declare a * ScopedWait around wait() inside a ScopedLock to be considered * waiters. * * Allows waiting threads to be interrupted by an exception. */ class Waitable : public Monitor { public: Waitable() : waiters(0) {} ~Waitable() { assert(waiters == 0); } /** Use this inside a scoped lock around the * call to wait() to be counted as a waiter. */ struct ScopedWait { Waitable& w; ScopedWait(Waitable& w_) : w(w_) { ++w.waiters; } ~ScopedWait() { if (--w.waiters==0) w.notifyAll(); } }; /** Block till there are no more waiters in ScopedWaits. * waitWaiters() does not raise an exception even if waiters * were interrupted by one. *@pre Must be called inside a ScopedLock but NOT a ScopedWait. */ void waitWaiters() { while (waiters != 0) Monitor::wait(); } /** Returns the number of outstanding ScopedWaits. * Must be called with the lock held. */ size_t hasWaiters() const { return waiters; } /** Set an execption to interrupt waiters in ScopedWait. * Must be called with the lock held. */ void setException(const ExceptionHolder& e) { exception = e; notifyAll(); } /** True if the waitable has an exception */ bool hasException() const { return exception; } /** Throws if the waitable has an exception */ void checkException() const { exception.raise(); } /** Clear the exception if any */ void resetException() { exception.reset(); } /** Throws an exception if one is set before or during the wait. */ void wait() { ExCheck e(exception); Monitor::wait(); } /** Throws an exception if one is set before or during the wait. */ bool wait(const AbsTime& absoluteTime) { ExCheck e(exception); return Monitor::wait(absoluteTime); } private: struct ExCheck { const ExceptionHolder& exception; ExCheck(const ExceptionHolder& e) : exception(e) { e.raise(); } ~ExCheck() { exception.raise(); } }; size_t waiters; ExceptionHolder exception; friend struct ScopedWait; }; }} // namespace qpid::sys #endif /*!QPID_SYS_WAITABLE_H*/ qpidc-0.16/src/qpid/sys/solaris/0000775000076400007640000000000011752725715017166 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/sys/solaris/ECFPoller.cpp0000664000076400007640000003063411401254250021431 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/log/Logger.h" #include "qpid/sys/Poller.h" #include "qpid/sys/IOHandle.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/DeletionManager.h" #include "qpid/sys/posix/check.h" #include "qpid/sys/posix/PrivatePosix.h" #include #include #include #include #include #include #include #include //TODO: Remove this #include "qpid/sys/Dispatcher.h" namespace qpid { namespace sys { // Deletion manager to handle deferring deletion of PollerHandles to when they definitely aren't being used DeletionManager PollerHandleDeletionManager; // Instantiate (and define) class static for DeletionManager template <> DeletionManager::AllThreadsStatuses DeletionManager::allThreadsStatuses(0); class PollerHandlePrivate { friend class Poller; friend class PollerHandle; enum FDStat { ABSENT, MONITORED, INACTIVE, HUNGUP, MONITORED_HUNGUP, DELETED }; int fd; uint32_t events; FDStat stat; Mutex lock; PollerHandlePrivate(int f) : fd(f), events(0), stat(ABSENT) { } bool isActive() const { return stat == MONITORED || stat == MONITORED_HUNGUP; } void setActive() { stat = (stat == HUNGUP) ? MONITORED_HUNGUP : MONITORED; } bool isInactive() const { return stat == INACTIVE || stat == HUNGUP; } void setInactive() { stat = INACTIVE; } bool isIdle() const { return stat == ABSENT; } void setIdle() { stat = ABSENT; } bool isHungup() const { return stat == MONITORED_HUNGUP || stat == HUNGUP; } void setHungup() { assert(stat == MONITORED); stat = HUNGUP; } bool isDeleted() const { return stat == DELETED; } void setDeleted() { stat = DELETED; } }; PollerHandle::PollerHandle(const IOHandle& h) : impl(new PollerHandlePrivate(toFd(h.impl))) {} PollerHandle::~PollerHandle() { { ScopedLock l(impl->lock); if (impl->isDeleted()) { return; } if (impl->isActive()) { impl->setDeleted(); } } PollerHandleDeletionManager.markForDeletion(impl); } /** * Concrete implementation of Poller to use the Solaris Event Completion * Framework interface */ class PollerPrivate { friend class Poller; class InterruptHandle: public PollerHandle { std::queue handles; void processEvent(Poller::EventType) { PollerHandle* handle = handles.front(); handles.pop(); assert(handle); //Synthesise event Poller::Event event(handle, Poller::INTERRUPTED); //Process synthesised event event.process(); } public: InterruptHandle() : PollerHandle(DummyIOHandle) {} void addHandle(PollerHandle& h) { handles.push(&h); } PollerHandle *getHandle() { PollerHandle* handle = handles.front(); handles.pop(); return handle; } bool queuedHandles() { return handles.size() > 0; } }; const int portId; bool isShutdown; InterruptHandle interruptHandle; static uint32_t directionToPollEvent(Poller::Direction dir) { switch (dir) { case Poller::INPUT: return POLLIN; case Poller::OUTPUT: return POLLOUT; case Poller::INOUT: return POLLIN | POLLOUT; default: return 0; } } static Poller::EventType pollToDirection(uint32_t events) { uint32_t e = events & (POLLIN | POLLOUT); switch (e) { case POLLIN: return Poller::READABLE; case POLLOUT: return Poller::WRITABLE; case POLLIN | POLLOUT: return Poller::READ_WRITABLE; default: return (events & (POLLHUP | POLLERR)) ? Poller::DISCONNECTED : Poller::INVALID; } } PollerPrivate() : portId(::port_create()), isShutdown(false) { QPID_POSIX_CHECK(portId); QPID_LOG(trace, "port_create returned port Id: " << portId); } ~PollerPrivate() { } void interrupt() { //Send an Alarm to the port //We need to send a nonzero event mask, using POLLHUP, //nevertheless the wait method will only look for a PORT_ALERT_SET QPID_LOG(trace, "Sending a port_alert to " << portId); QPID_POSIX_CHECK(::port_alert(portId, PORT_ALERT_SET, POLLHUP, &static_cast(interruptHandle))); } }; void Poller::addFd(PollerHandle& handle, Direction dir) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); uint32_t events = 0; if (eh.isIdle()) { events = PollerPrivate::directionToPollEvent(dir); } else { assert(eh.isActive()); events = eh.events | PollerPrivate::directionToPollEvent(dir); } //port_associate can be used to add an association or modify an //existing one QPID_POSIX_CHECK(::port_associate(impl->portId, PORT_SOURCE_FD, (uintptr_t) eh.fd, events, &handle)); eh.events = events; eh.setActive(); QPID_LOG(trace, "Poller::addFd(handle=" << &handle << "[" << typeid(&handle).name() << "], fd=" << eh.fd << ")"); } void Poller::delFd(PollerHandle& handle) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(!eh.isIdle()); int rc = ::port_dissociate(impl->portId, PORT_SOURCE_FD, (uintptr_t) eh.fd); //Allow closing an invalid fd, allowing users to close fd before //doing delFd() if (rc == -1 && errno != EBADFD) { QPID_POSIX_CHECK(rc); } eh.setIdle(); QPID_LOG(trace, "Poller::delFd(handle=" << &handle << ", fd=" << eh.fd << ")"); } // modFd is equivalent to delFd followed by addFd void Poller::modFd(PollerHandle& handle, Direction dir) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(!eh.isIdle()); eh.events = PollerPrivate::directionToPollEvent(dir); //If fd is already associated, events and user arguments are updated //So, no need to check if fd is already associated QPID_POSIX_CHECK(::port_associate(impl->portId, PORT_SOURCE_FD, (uintptr_t) eh.fd, eh.events, &handle)); eh.setActive(); QPID_LOG(trace, "Poller::modFd(handle=" << &handle << ", fd=" << eh.fd << ")"); } void Poller::rearmFd(PollerHandle& handle) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(eh.isInactive()); QPID_POSIX_CHECK(::port_associate(impl->portId, PORT_SOURCE_FD, (uintptr_t) eh.fd, eh.events, &handle)); eh.setActive(); QPID_LOG(trace, "Poller::rearmdFd(handle=" << &handle << ", fd=" << eh.fd << ")"); } void Poller::shutdown() { //Allow sloppy code to shut us down more than once if (impl->isShutdown) return; impl->isShutdown = true; impl->interrupt(); } bool Poller::hasShutdown() { return impl->isShutdown; } bool Poller::interrupt(PollerHandle& handle) { PollerPrivate::InterruptHandle& ih = impl->interruptHandle; PollerHandlePrivate& eh = *static_cast(ih).impl; ScopedLock l(eh.lock); ih.addHandle(handle); impl->interrupt(); eh.setActive(); return true; } void Poller::run() { // Make sure we can't be interrupted by signals at a bad time ::sigset_t ss; ::sigfillset(&ss); ::pthread_sigmask(SIG_SETMASK, &ss, 0); do { Event event = wait(); // If can read/write then dispatch appropriate callbacks if (event.handle) { event.process(); } else { // Handle shutdown switch (event.type) { case SHUTDOWN: return; default: // This should be impossible assert(false); } } } while (true); } Poller::Event Poller::wait(Duration timeout) { timespec_t tout; timespec_t* ptout = NULL; port_event_t pe; AbsTime targetTimeout = (timeout == TIME_INFINITE) ? FAR_FUTURE : AbsTime(now(), timeout); if (timeout != TIME_INFINITE) { tout.tv_sec = 0; tout.tv_nsec = timeout; ptout = &tout; } do { PollerHandleDeletionManager.markAllUnusedInThisThread(); QPID_LOG(trace, "About to enter port_get on " << impl->portId << ". Thread " << pthread_self() << ", timeout=" << timeout); int rc = ::port_get(impl->portId, &pe, ptout); QPID_LOG(trace, "port_get on " << impl->portId << " returned " << rc); if (impl->isShutdown) { PollerHandleDeletionManager.markAllUnusedInThisThread(); return Event(0, SHUTDOWN); } if (rc < 0) { switch (errno) { case EINTR: continue; case ETIME: return Event(0, TIMEOUT); default: QPID_POSIX_CHECK(rc); } } else { PollerHandle* handle = static_cast(pe.portev_user); PollerHandlePrivate& eh = *handle->impl; ScopedLock l(eh.lock); if (eh.isActive()) { QPID_LOG(trace, "Handle is active"); //We use alert mode to notify interrupts if (pe.portev_source == PORT_SOURCE_ALERT && handle == &impl->interruptHandle) { QPID_LOG(trace, "Interrupt notified"); PollerHandle* wrappedHandle = impl->interruptHandle.getHandle(); if (impl->interruptHandle.queuedHandles()) { impl->interrupt(); eh.setActive(); } else { eh.setInactive(); } return Event(wrappedHandle, INTERRUPTED); } if (pe.portev_source == PORT_SOURCE_FD) { QPID_LOG(trace, "About to send handle: " << handle); if (pe.portev_events & POLLHUP) { if (eh.isHungup()) { return Event(handle, DISCONNECTED); } eh.setHungup(); } else { eh.setInactive(); } QPID_LOG(trace, "Sending event (thread: " << pthread_self() << ") for handle " << handle << ", direction= " << PollerPrivate::pollToDirection(pe.portev_events)); return Event(handle, PollerPrivate::pollToDirection(pe.portev_events)); } } else if (eh.isDeleted()) { //Remove the handle from the poller int rc = ::port_dissociate(impl->portId, PORT_SOURCE_FD, (uintptr_t) eh.fd); if (rc == -1 && errno != EBADFD) { QPID_POSIX_CHECK(rc); } } } if (timeout == TIME_INFINITE) { continue; } if (rc == 0 && now() > targetTimeout) { PollerHandleDeletionManager.markAllUnusedInThisThread(); return Event(0, TIMEOUT); } } while (true); } // Concrete constructors Poller::Poller() : impl(new PollerPrivate()) {} Poller::~Poller() { delete impl; } }} qpidc-0.16/src/qpid/sys/solaris/SystemInfo.cpp0000775000076400007640000000703611715002376021771 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/SystemInfo.h" #define BSD_COMP #include #include #undef BDS_COMP #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; namespace qpid { namespace sys { long SystemInfo::concurrency() { return sysconf(_SC_NPROCESSORS_ONLN); } bool SystemInfo::getLocalHostname(Address &address) { char name[MAXHOSTNAMELEN]; if (::gethostname(name, sizeof(name)) != 0) return false; address.host = name; return true; } static const string LOCALHOST("127.0.0.1"); static const string TCP("tcp"); void SystemInfo::getLocalIpAddresses(uint16_t port, std::vector
&addrList) { int s = socket(PF_INET, SOCK_STREAM, 0); for (int i=1;;i++) { struct lifreq ifr; ifr.lifr_index = i; if (::ioctl(s, SIOCGIFADDR, &ifr) < 0) { break; } struct sockaddr *sa = static_cast((void *) &ifr.lifr_addr); if (sa->sa_family != AF_INET) { // TODO: Url parsing currently can't cope with IPv6 addresses, defer for now break; } struct sockaddr_in *sin = static_cast((void *)sa); std::string addr(inet_ntoa(sin->sin_addr)); if (addr != LOCALHOST) addrList.push_back(Address(TCP, addr, port)); } if (addrList.empty()) { addrList.push_back(Address(TCP, LOCALHOST, port)); } close (s); } void SystemInfo::getSystemId(std::string &osName, std::string &nodeName, std::string &release, std::string &version, std::string &machine) { struct utsname _uname; if (uname (&_uname) == 0) { osName = _uname.sysname; nodeName = _uname.nodename; release = _uname.release; version = _uname.version; machine = _uname.machine; } } uint32_t SystemInfo::getProcessId() { return (uint32_t) ::getpid(); } uint32_t SystemInfo::getParentProcessId() { return (uint32_t) ::getppid(); } string SystemInfo::getProcessName() { psinfo processInfo; char procfile[PATH_MAX]; int fd; string value; snprintf(procfile, PATH_MAX, "/proc/%d/psinfo", getProcessId()); if ((fd = open(procfile, O_RDONLY)) >= 0) { if (read(fd, (void *) &processInfo, sizeof(processInfo)) == sizeof(processInfo)) { value = processInfo.pr_fname; } } return value; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/Runnable.cpp0000664000076400007640000000150311227113407017745 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/Runnable.h" #include namespace qpid { namespace sys { Runnable::~Runnable() {} Runnable::Functor Runnable::functor() { return boost::bind(&Runnable::run, this); } }} qpidc-0.16/src/qpid/sys/Codec.h0000664000076400007640000000277011153774333016701 0ustar00jrossjross00000000000000#ifndef QPID_SYS_CODEC_H #define QPID_SYS_CODEC_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace sys { /** * Generic codec interface */ class Codec { public: virtual ~Codec() {} /** Decode from buffer, return number of bytes decoded. * @return may be less than size if there was incomplete * data at the end of the buffer. */ virtual std::size_t decode(const char* buffer, std::size_t size) = 0; /** Encode into buffer, return number of bytes encoded */ virtual std::size_t encode(const char* buffer, std::size_t size) = 0; /** Return true if we have data to encode */ virtual bool canEncode() = 0; }; }} // namespace qpid::sys #endif /*!QPID_SYS_CODEC_H*/ qpidc-0.16/src/qpid/sys/BlockingQueue.h0000664000076400007640000000712311500370036020402 0ustar00jrossjross00000000000000#ifndef QPID_SYS_BLOCKINGQUEUE_H #define QPID_SYS_BLOCKINGQUEUE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Waitable.h" #include namespace qpid { namespace sys { /** * A simple blocking queue template */ template class BlockingQueue { mutable sys::Waitable waitable; std::queue queue; public: BlockingQueue() {} ~BlockingQueue() { close(); } /** Pop from the queue, block up to timeout if empty. *@param result Set to value popped from queue. *@param timeout Defaults to infinite. *@return true if result was set, false if queue empty after timeout. */ bool pop(T& result, Duration timeout=TIME_INFINITE) { Mutex::ScopedLock l(waitable); { Waitable::ScopedWait w(waitable); if (timeout == TIME_INFINITE) { while (queue.empty()) waitable.wait(); } else if (timeout) { AbsTime deadline(now(),timeout); while (queue.empty() && deadline > now()) waitable.wait(deadline); } else { //ensure zero timeout pop does not miss the fact that //queue is closed waitable.checkException(); } } if (queue.empty()) return false; result = queue.front(); queue.pop(); if (!queue.empty()) waitable.notify(); // Notify another waiter. return true; } T pop(Duration timeout=TIME_INFINITE) { T result; bool ok = pop(result, timeout); if (!ok) throw Exception("Timed out waiting on a blocking queue"); return result; } /** Push a value onto the queue. * Note it is not an error to push onto a closed queue. */ void push(const T& t) { Mutex::ScopedLock l(waitable); queue.push(t); waitable.notify(); // Notify a waiter. } /** * Close the queue. *@ex exception to throw to waiting threads. ClosedException by default. */ void close(const ExceptionHolder& ex=ExceptionHolder(new ClosedException())) { Mutex::ScopedLock l(waitable); if (!waitable.hasException()) { waitable.setException(ex); waitable.notifyAll(); waitable.waitWaiters(); // Ensure no threads are still waiting. } } /** Open a closed queue. */ void open() { Mutex::ScopedLock l(waitable); waitable.resetException(); } bool isClosed() const { Mutex::ScopedLock l(waitable); return waitable.hasException(); } bool empty() const { Mutex::ScopedLock l(waitable); return queue.empty(); } size_t size() const { Mutex::ScopedLock l(waitable); return queue.size(); } }; }} #endif /*!QPID_SYS_BLOCKINGQUEUE_H*/ qpidc-0.16/src/qpid/sys/cyrus/0000775000076400007640000000000011752725716016660 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/sys/cyrus/CyrusSecurityLayer.cpp0000664000076400007640000001120711625675256023221 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/cyrus/CyrusSecurityLayer.h" #include #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace sys { namespace cyrus { CyrusSecurityLayer::CyrusSecurityLayer(sasl_conn_t* c, uint16_t maxFrameSize) : conn(c), decrypted(0), decryptedSize(0), encrypted(0), encryptedSize(0), codec(0), maxInputSize(0), decodeBuffer(maxFrameSize), encodeBuffer(maxFrameSize), encoded(0) { const void* value(0); int result = sasl_getprop(conn, SASL_MAXOUTBUF, &value); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL encode error: " << sasl_errdetail(conn))); } maxInputSize = *(reinterpret_cast(value)); } size_t CyrusSecurityLayer::decode(const char* input, size_t size) { size_t inStart = 0; do { size_t inSize = std::min(size - inStart, maxInputSize); int result = sasl_decode(conn, input + inStart, inSize, &decrypted, &decryptedSize); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL decode error: " << sasl_errdetail(conn))); } inStart += inSize; size_t copied = 0; do { size_t count = std::min(decryptedSize - copied, decodeBuffer.size - decodeBuffer.position); ::memcpy(decodeBuffer.data + decodeBuffer.position, decrypted + copied, count); copied += count; decodeBuffer.position += count; size_t decodedSize = codec->decode(decodeBuffer.data, decodeBuffer.position); if (decodedSize == 0) break; if (decodedSize < decodeBuffer.position) { ::memmove(decodeBuffer.data, decodeBuffer.data + decodedSize, decodeBuffer.position - decodedSize); } decodeBuffer.position -= decodedSize; } while (copied < decryptedSize); } while (inStart < size); return size; } size_t CyrusSecurityLayer::encode(const char* buffer, size_t size) { size_t processed = 0;//records how many bytes have been written to buffer do { if (!encrypted) { if (!encoded) { encodeBuffer.position = 0; encoded = codec->encode(encodeBuffer.data, encodeBuffer.size); if (!encoded) break;//nothing more to do } size_t encryptable = std::min(encoded, maxInputSize); int result = sasl_encode(conn, encodeBuffer.data + encodeBuffer.position, encryptable, &encrypted, &encryptedSize); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL encode error: " << sasl_errdetail(conn))); } encodeBuffer.position += encryptable; encoded -= encryptable; } size_t remaining = size - processed; if (remaining < encryptedSize) { //can't fit all encrypted data in the buffer we've //been given, copy in what we can and hold on to the //rest until the next call ::memcpy(const_cast(buffer + processed), encrypted, remaining); processed += remaining; encrypted += remaining; encryptedSize -= remaining; } else { ::memcpy(const_cast(buffer + processed), encrypted, encryptedSize); processed += encryptedSize; encrypted = 0; encryptedSize = 0; } } while (processed < size); return processed; } bool CyrusSecurityLayer::canEncode() { return codec && (encrypted || codec->canEncode()); } void CyrusSecurityLayer::init(qpid::sys::Codec* c) { codec = c; } CyrusSecurityLayer::DataBuffer::DataBuffer(size_t s) : position(0), size(s) { data = new char[size]; } CyrusSecurityLayer::DataBuffer::~DataBuffer() { delete[] data; } }}} // namespace qpid::sys::cyrus qpidc-0.16/src/qpid/sys/cyrus/CyrusSecurityLayer.h0000664000076400007640000000362611211003073022641 0ustar00jrossjross00000000000000#ifndef QPID_SYS_CYRUS_CYRUSSECURITYLAYER_H #define QPID_SYS_CYRUS_CYRUSSECURITYLAYER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include "qpid/sys/SecurityLayer.h" #include namespace qpid { namespace sys { namespace cyrus { /** * Implementation of SASL security layer using cyrus-sasl library */ class CyrusSecurityLayer : public qpid::sys::SecurityLayer { public: CyrusSecurityLayer(sasl_conn_t*, uint16_t maxFrameSize); size_t decode(const char* buffer, size_t size); size_t encode(const char* buffer, size_t size); bool canEncode(); void init(qpid::sys::Codec*); private: struct DataBuffer { char* data; size_t position; const size_t size; DataBuffer(size_t); ~DataBuffer(); }; sasl_conn_t* conn; const char* decrypted; unsigned decryptedSize; const char* encrypted; unsigned encryptedSize; qpid::sys::Codec* codec; size_t maxInputSize; DataBuffer decodeBuffer; DataBuffer encodeBuffer; size_t encoded; }; }}} // namespace qpid::sys::cyrus #endif /*!QPID_SYS_CYRUS_CYRUSSECURITYLAYER_H*/ qpidc-0.16/src/qpid/sys/LockPtr.h0000664000076400007640000000623111071503406017224 0ustar00jrossjross00000000000000#ifndef QPID_SYS_LOCKPTR_H #define QPID_SYS_LOCKPTR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Mutex.h" #include namespace qpid { namespace sys { class Mutex; /** * LockPtr is a smart pointer to T. It is constructed from a volatile * T* and a Lock (by default a Mutex). It const_casts away the * volatile qualifier and locks the Lock for the duration of its * * Used in conjuntion with the "volatile" keyword to get the compiler * to help enforce correct concurrent use of mutli-threaded objects. * See ochttp://www.ddj.com/cpp/184403766 for a detailed discussion. * * To summarize the convention: * - Declare thread-safe member functions as volatile. * - Declare instances of the class that may be called concurrently as volatile. * - Use LockPtr to cast away the volatile qualifier while taking a lock. * * This means that code calling on a concurrently-used object * (declared volatile) can only call thread-safe (volatile) member * functions. Code that needs to use thread-unsafe members must use a * LockPtr, thereby acquiring the lock and making it safe to do so. * * A good type-safe pattern is the internally-locked object: * - It has it's own private lock member. * - All public functions are thread safe and declared volatile. * - Any thread-unsafe, non-volatile functions are private. * - Only member function implementations use LockPtr to access private functions. * * This encapsulates all the locking logic inside the class. * * One nice feature of this convention is the common case where you * need a public, locked version of some function foo() and also a * private unlocked version to avoid recursive locks. They can be declared as * volatile and non-volatile overloads of the same function: * * // public * void Thing::foo() volatile { LockPtr(this, myLock)->foo(); } * // private * void Thing::foo() { ... do stuff ...} */ template class LockPtr : public boost::noncopyable { public: LockPtr(volatile T* p, Lock& l) : ptr(const_cast(p)), lock(l) { lock.lock(); } LockPtr(volatile T* p, volatile Lock& l) : ptr(const_cast(p)), lock(const_cast(l)) { lock.lock(); } ~LockPtr() { lock.unlock(); } T& operator*() { return *ptr; } T* operator->() { return ptr; } private: T* ptr; Lock& lock; }; }} // namespace qpid::sys #endif /*!QPID_SYS_LOCKPTR_H*/ qpidc-0.16/src/qpid/sys/LockFile.h0000664000076400007640000000324211311752102017331 0ustar00jrossjross00000000000000#ifndef _sys_LockFile_h #define _sys_LockFile_h /* * * Copyright (c) 2008 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include "qpid/CommonImportExport.h" #include "qpid/sys/IntegerTypes.h" namespace qpid { namespace sys { class LockFilePrivate; /** * @class LockFile * * LockFile represents a locked file suitable for a coarse-grain system * lock. For example, the broker uses this to ensure that only one broker * runs. A common usage idiom is to store the current "owner" process ID * in the lock file - if the lock file exists, but the stored process ID * doesn't, the old owner has probably died without cleaning up the lock * file. */ class LockFile : private boost::noncopyable { std::string path; bool created; boost::shared_ptr impl; protected: int read(void*, size_t) const; int write(void*, size_t) const; public: QPID_COMMON_EXTERN LockFile(const std::string& path_, bool create); QPID_COMMON_EXTERN ~LockFile(); }; }} /* namespace qpid::sys */ #endif /*!_sys_LockFile_h*/ qpidc-0.16/src/qpid/sys/MemStat.h0000664000076400007640000000217711721257043017232 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef sys_MemStat #define sys_MemStat #include "qpid/CommonImportExport.h" #include "qmf/org/apache/qpid/broker/Memory.h" namespace qpid { namespace sys { class QPID_COMMON_CLASS_EXTERN MemStat { public: QPID_COMMON_EXTERN static void loadMemInfo(qmf::org::apache::qpid::broker::Memory* object); }; }} #endif qpidc-0.16/src/qpid/sys/AggregateOutput.h0000664000076400007640000000447211564561152020773 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _AggregateOutput_ #define _AggregateOutput_ #include "qpid/sys/Monitor.h" #include "qpid/sys/OutputControl.h" #include "qpid/sys/OutputTask.h" #include "qpid/CommonImportExport.h" #include #include namespace qpid { namespace sys { /** * Holds a collection of output tasks, doOutput picks the next one to execute. * * Tasks are automatically removed if their doOutput() or hasOutput() returns false. * * Thread safe. addOutputTask may be called in one connection thread while * doOutput is called in another. */ class QPID_COMMON_CLASS_EXTERN AggregateOutput : public OutputTask, public OutputControl { typedef std::deque TaskList; Monitor lock; TaskList tasks; bool busy; OutputControl& control; public: QPID_COMMON_EXTERN AggregateOutput(OutputControl& c); // These may be called concurrently with any function. QPID_COMMON_EXTERN void abort(); QPID_COMMON_EXTERN void activateOutput(); QPID_COMMON_EXTERN void giveReadCredit(int32_t); QPID_COMMON_EXTERN void addOutputTask(OutputTask* t); // These functions must not be called concurrently with each other. QPID_COMMON_EXTERN bool doOutput(); QPID_COMMON_EXTERN void removeOutputTask(OutputTask* t); QPID_COMMON_EXTERN void removeAll(); /** Apply f to each OutputTask* in the tasks list */ template void eachOutput(F f) { Mutex::ScopedLock l(lock); std::for_each(tasks.begin(), tasks.end(), f); } }; }} // namespace qpid::sys #endif qpidc-0.16/src/qpid/sys/Poller.h0000664000076400007640000000767011564561152017124 0ustar00jrossjross00000000000000#ifndef _sys_Poller_h #define _sys_Poller_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Time.h" #include "qpid/sys/Runnable.h" #include "qpid/CommonImportExport.h" #include namespace qpid { namespace sys { /** * Poller is an abstract base class that registers callbacks to be * called when there is IO activity. Concrete derived classes * implement polling APIs such as epoll or equivalents on other * operating systems. * * On the broker, Connection::received() is called with incoming * frames from clients, and Connection::doOutput() is called when a * connection is writeable. * * @see DispatchHandler for more details of normal use. */ class PollerHandle; class PollerPrivate; class Poller : public Runnable { PollerPrivate* const impl; public: typedef boost::shared_ptr shared_ptr; enum Direction { NONE = 0, INPUT, OUTPUT, INOUT }; enum EventType { INVALID = 0, READABLE, WRITABLE, READ_WRITABLE, DISCONNECTED, SHUTDOWN, TIMEOUT, INTERRUPTED }; struct Event { PollerHandle* handle; EventType type; Event(PollerHandle* handle0, EventType type0) : handle(handle0), type(type0) { } void process(); }; QPID_COMMON_EXTERN Poller(); QPID_COMMON_EXTERN ~Poller(); /** Note: this function is async-signal safe */ QPID_COMMON_EXTERN void shutdown(); // Interrupt waiting for a specific poller handle // returns true if we could interrupt the handle // - in this case on return the handle is no longer being monitored, // but we will receive an event from some invocation of poller::wait // with the handle and the INTERRUPTED event type // if it returns false then the handle is not being monitored by the poller // - This can either be because it has just received an event which has been // reported and has not been reenabled since. // - Because it was removed from the monitoring set // - Or because it is already being interrupted QPID_COMMON_EXTERN bool interrupt(PollerHandle& handle); // Poller run loop QPID_COMMON_EXTERN void run(); QPID_COMMON_EXTERN void registerHandle(PollerHandle& handle); QPID_COMMON_EXTERN void unregisterHandle(PollerHandle& handle); QPID_COMMON_EXTERN void monitorHandle(PollerHandle& handle, Direction dir); QPID_COMMON_EXTERN void unmonitorHandle(PollerHandle& handle, Direction dir); QPID_COMMON_EXTERN Event wait(Duration timeout = TIME_INFINITE); QPID_COMMON_EXTERN bool hasShutdown(); }; /** * Handle class to use for polling */ class IOHandle; class PollerHandlePrivate; class PollerHandle { friend class Poller; friend class PollerPrivate; friend struct Poller::Event; PollerHandlePrivate* const impl; QPID_COMMON_INLINE_EXTERN virtual void processEvent(Poller::EventType) {}; public: QPID_COMMON_EXTERN PollerHandle(const IOHandle& h); QPID_COMMON_EXTERN virtual ~PollerHandle(); }; inline void Poller::Event::process() { handle->processEvent(type); } }} #endif // _sys_Poller_h qpidc-0.16/src/qpid/sys/ClusterSafe.cpp0000664000076400007640000000322511535243675020437 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "ClusterSafe.h" #include "qpid/log/Statement.h" #include "qpid/sys/Thread.h" #include namespace qpid { namespace sys { namespace { bool inCluster = false; QPID_TSS bool inContext = false; } bool isClusterSafe() { return !inCluster || inContext; } void assertClusterSafe() { if (!isClusterSafe()) { QPID_LOG(critical, "Modified cluster state outside of cluster context"); ::abort(); } } ClusterSafeScope::ClusterSafeScope() { save = inContext; inContext = true; } ClusterSafeScope::~ClusterSafeScope() { assert(inContext); inContext = save; } ClusterUnsafeScope::ClusterUnsafeScope() { save = inContext; inContext = false; } ClusterUnsafeScope::~ClusterUnsafeScope() { assert(!inContext); inContext = save; } void enableClusterSafe() { inCluster = true; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/epoll/0000775000076400007640000000000011752725715016625 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/sys/epoll/EpollPoller.cpp0000664000076400007640000004733711621324756021573 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Poller.h" #include "qpid/sys/IOHandle.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/AtomicCount.h" #include "qpid/sys/DeletionManager.h" #include "qpid/sys/posix/check.h" #include "qpid/sys/posix/PrivatePosix.h" #include "qpid/log/Statement.h" #include #include #include #include #include #include #include namespace qpid { namespace sys { // Deletion manager to handle deferring deletion of PollerHandles to when they definitely aren't being used DeletionManager PollerHandleDeletionManager; // Instantiate (and define) class static for DeletionManager template <> DeletionManager::AllThreadsStatuses DeletionManager::allThreadsStatuses(0); class PollerHandlePrivate { friend class Poller; friend class PollerPrivate; friend class PollerHandle; enum FDStat { ABSENT, MONITORED, INACTIVE, HUNGUP, MONITORED_HUNGUP, INTERRUPTED, INTERRUPTED_HUNGUP, DELETED }; ::__uint32_t events; const IOHandlePrivate* ioHandle; PollerHandle* pollerHandle; FDStat stat; Mutex lock; PollerHandlePrivate(const IOHandlePrivate* h, PollerHandle* p) : events(0), ioHandle(h), pollerHandle(p), stat(ABSENT) { } int fd() const { return toFd(ioHandle); } bool isActive() const { return stat == MONITORED || stat == MONITORED_HUNGUP; } void setActive() { stat = (stat == HUNGUP || stat == INTERRUPTED_HUNGUP) ? MONITORED_HUNGUP : MONITORED; } bool isInactive() const { return stat == INACTIVE || stat == HUNGUP; } void setInactive() { stat = INACTIVE; } bool isIdle() const { return stat == ABSENT; } void setIdle() { stat = ABSENT; } bool isHungup() const { return stat == MONITORED_HUNGUP || stat == HUNGUP || stat == INTERRUPTED_HUNGUP; } void setHungup() { assert(stat == MONITORED); stat = HUNGUP; } bool isInterrupted() const { return stat == INTERRUPTED || stat == INTERRUPTED_HUNGUP; } void setInterrupted() { stat = (stat == MONITORED_HUNGUP || stat == HUNGUP) ? INTERRUPTED_HUNGUP : INTERRUPTED; } bool isDeleted() const { return stat == DELETED; } void setDeleted() { stat = DELETED; } }; PollerHandle::PollerHandle(const IOHandle& h) : impl(new PollerHandlePrivate(h.impl, this)) {} PollerHandle::~PollerHandle() { { ScopedLock l(impl->lock); if (impl->isDeleted()) { return; } impl->pollerHandle = 0; if (impl->isInterrupted()) { impl->setDeleted(); return; } assert(impl->isIdle()); impl->setDeleted(); } PollerHandleDeletionManager.markForDeletion(impl); } class HandleSet { Mutex lock; std::set handles; public: void add(PollerHandle*); void remove(PollerHandle*); void cleanup(); }; void HandleSet::add(PollerHandle* h) { ScopedLock l(lock); handles.insert(h); } void HandleSet::remove(PollerHandle* h) { ScopedLock l(lock); handles.erase(h); } void HandleSet::cleanup() { // Inform all registered handles of disconnection std::set copy; handles.swap(copy); for (std::set::const_iterator i = copy.begin(); i != copy.end(); ++i) { Poller::Event event(*i, Poller::DISCONNECTED); event.process(); } } /** * Concrete implementation of Poller to use the Linux specific epoll * interface */ class PollerPrivate { friend class Poller; static const int DefaultFds = 256; struct ReadablePipe { int fds[2]; /** * This encapsulates an always readable pipe which we can add * to the epoll set to force epoll_wait to return */ ReadablePipe() { QPID_POSIX_CHECK(::pipe(fds)); // Just write the pipe's fds to the pipe QPID_POSIX_CHECK(::write(fds[1], fds, 2)); } ~ReadablePipe() { ::close(fds[0]); ::close(fds[1]); } int getFD() { return fds[0]; } }; static ReadablePipe alwaysReadable; static int alwaysReadableFd; class InterruptHandle: public PollerHandle { std::queue handles; void processEvent(Poller::EventType) { PollerHandle* handle = handles.front(); handles.pop(); assert(handle); // Synthesise event Poller::Event event(handle, Poller::INTERRUPTED); // Process synthesised event event.process(); } public: InterruptHandle() : PollerHandle(DummyIOHandle) {} void addHandle(PollerHandle& h) { handles.push(&h); } PollerHandle* getHandle() { PollerHandle* handle = handles.front(); handles.pop(); return handle; } bool queuedHandles() { return handles.size() > 0; } }; const int epollFd; bool isShutdown; InterruptHandle interruptHandle; HandleSet registeredHandles; AtomicCount threadCount; static ::__uint32_t directionToEpollEvent(Poller::Direction dir) { switch (dir) { case Poller::INPUT: return ::EPOLLIN; case Poller::OUTPUT: return ::EPOLLOUT; case Poller::INOUT: return ::EPOLLIN | ::EPOLLOUT; default: return 0; } } static Poller::EventType epollToDirection(::__uint32_t events) { // POLLOUT & POLLHUP are mutually exclusive really, but at least socketpairs // can give you both! events = (events & ::EPOLLHUP) ? events & ~::EPOLLOUT : events; ::__uint32_t e = events & (::EPOLLIN | ::EPOLLOUT); switch (e) { case ::EPOLLIN: return Poller::READABLE; case ::EPOLLOUT: return Poller::WRITABLE; case ::EPOLLIN | ::EPOLLOUT: return Poller::READ_WRITABLE; default: return (events & (::EPOLLHUP | ::EPOLLERR)) ? Poller::DISCONNECTED : Poller::INVALID; } } PollerPrivate() : epollFd(::epoll_create(DefaultFds)), isShutdown(false) { QPID_POSIX_CHECK(epollFd); // Add always readable fd into our set (but not listening to it yet) ::epoll_event epe; epe.events = 0; epe.data.u64 = 1; QPID_POSIX_CHECK(::epoll_ctl(epollFd, EPOLL_CTL_ADD, alwaysReadableFd, &epe)); } ~PollerPrivate() { // It's probably okay to ignore any errors here as there can't be data loss ::close(epollFd); // Need to put the interruptHandle in idle state to delete it static_cast(interruptHandle).impl->setIdle(); } void resetMode(PollerHandlePrivate& handle); void interrupt() { ::epoll_event epe; // Use EPOLLONESHOT so we only wake a single thread epe.events = ::EPOLLIN | ::EPOLLONESHOT; epe.data.u64 = 0; // Keep valgrind happy epe.data.ptr = &static_cast(interruptHandle); QPID_POSIX_CHECK(::epoll_ctl(epollFd, EPOLL_CTL_MOD, alwaysReadableFd, &epe)); } void interruptAll() { ::epoll_event epe; // Not EPOLLONESHOT, so we eventually get all threads epe.events = ::EPOLLIN; epe.data.u64 = 2; // Keep valgrind happy QPID_POSIX_CHECK(::epoll_ctl(epollFd, EPOLL_CTL_MOD, alwaysReadableFd, &epe)); } }; PollerPrivate::ReadablePipe PollerPrivate::alwaysReadable; int PollerPrivate::alwaysReadableFd = alwaysReadable.getFD(); void Poller::registerHandle(PollerHandle& handle) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(eh.isIdle()); ::epoll_event epe; epe.events = ::EPOLLONESHOT; epe.data.u64 = 0; // Keep valgrind happy epe.data.ptr = &eh; impl->registeredHandles.add(&handle); QPID_POSIX_CHECK(::epoll_ctl(impl->epollFd, EPOLL_CTL_ADD, eh.fd(), &epe)); eh.setActive(); } void Poller::unregisterHandle(PollerHandle& handle) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(!eh.isIdle()); impl->registeredHandles.remove(&handle); int rc = ::epoll_ctl(impl->epollFd, EPOLL_CTL_DEL, eh.fd(), 0); // Ignore EBADF since deleting a nonexistent fd has the overall required result! // And allows the case where a sloppy program closes the fd and then does the delFd() if (rc == -1 && errno != EBADF) { QPID_POSIX_CHECK(rc); } eh.setIdle(); } void PollerPrivate::resetMode(PollerHandlePrivate& eh) { PollerHandle* ph; { ScopedLock l(eh.lock); assert(!eh.isActive()); if (eh.isIdle() || eh.isDeleted()) { return; } if (eh.events==0) { eh.setActive(); return; } if (!eh.isInterrupted()) { ::epoll_event epe; epe.events = eh.events | ::EPOLLONESHOT; epe.data.u64 = 0; // Keep valgrind happy epe.data.ptr = &eh; int rc = ::epoll_ctl(epollFd, EPOLL_CTL_MOD, eh.fd(), &epe); // If something has closed the fd in the meantime try adding it back if (rc ==-1 && errno == ENOENT) { rc = ::epoll_ctl(epollFd, EPOLL_CTL_ADD, eh.fd(), &epe); } QPID_POSIX_CHECK(rc); eh.setActive(); return; } ph = eh.pollerHandle; } PollerHandlePrivate& ihp = *static_cast(interruptHandle).impl; ScopedLock l(ihp.lock); interruptHandle.addHandle(*ph); ihp.setActive(); interrupt(); } void Poller::monitorHandle(PollerHandle& handle, Direction dir) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(!eh.isIdle()); ::__uint32_t oldEvents = eh.events; eh.events |= PollerPrivate::directionToEpollEvent(dir); // If no change nothing more to do - avoid unnecessary system call if (oldEvents==eh.events) { return; } // If we're not actually listening wait till we are to perform change if (!eh.isActive()) { return; } ::epoll_event epe; epe.events = eh.events | ::EPOLLONESHOT; epe.data.u64 = 0; // Keep valgrind happy epe.data.ptr = &eh; QPID_POSIX_CHECK(::epoll_ctl(impl->epollFd, EPOLL_CTL_MOD, eh.fd(), &epe)); } void Poller::unmonitorHandle(PollerHandle& handle, Direction dir) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(!eh.isIdle()); ::__uint32_t oldEvents = eh.events; eh.events &= ~PollerPrivate::directionToEpollEvent(dir); // If no change nothing more to do - avoid unnecessary system call if (oldEvents==eh.events) { return; } // If we're not actually listening wait till we are to perform change if (!eh.isActive()) { return; } ::epoll_event epe; epe.events = eh.events | ::EPOLLONESHOT; epe.data.u64 = 0; // Keep valgrind happy epe.data.ptr = &eh; QPID_POSIX_CHECK(::epoll_ctl(impl->epollFd, EPOLL_CTL_MOD, eh.fd(), &epe)); } void Poller::shutdown() { // NB: this function must be async-signal safe, it must not // call any function that is not async-signal safe. // Allow sloppy code to shut us down more than once if (impl->isShutdown) return; // Don't use any locking here - isShutdown will be visible to all // after the epoll_ctl() anyway (it's a memory barrier) impl->isShutdown = true; impl->interruptAll(); } bool Poller::interrupt(PollerHandle& handle) { { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); if (eh.isIdle() || eh.isDeleted()) { return false; } if (eh.isInterrupted()) { return true; } // Stop monitoring handle for read or write ::epoll_event epe; epe.events = 0; epe.data.u64 = 0; // Keep valgrind happy epe.data.ptr = &eh; QPID_POSIX_CHECK(::epoll_ctl(impl->epollFd, EPOLL_CTL_MOD, eh.fd(), &epe)); if (eh.isInactive()) { eh.setInterrupted(); return true; } eh.setInterrupted(); } PollerPrivate::InterruptHandle& ih = impl->interruptHandle; PollerHandlePrivate& eh = *static_cast(ih).impl; ScopedLock l(eh.lock); ih.addHandle(handle); impl->interrupt(); eh.setActive(); return true; } void Poller::run() { // Ensure that we exit thread responsibly under all circumstances try { // Make sure we can't be interrupted by signals at a bad time ::sigset_t ss; ::sigfillset(&ss); ::pthread_sigmask(SIG_SETMASK, &ss, 0); ++(impl->threadCount); do { Event event = wait(); // If can read/write then dispatch appropriate callbacks if (event.handle) { event.process(); } else { // Handle shutdown switch (event.type) { case SHUTDOWN: PollerHandleDeletionManager.destroyThreadState(); //last thread to respond to shutdown cleans up: if (--(impl->threadCount) == 0) impl->registeredHandles.cleanup(); return; default: // This should be impossible assert(false); } } } while (true); } catch (const std::exception& e) { QPID_LOG(error, "IO worker thread exiting with unhandled exception: " << e.what()); } PollerHandleDeletionManager.destroyThreadState(); --(impl->threadCount); } bool Poller::hasShutdown() { return impl->isShutdown; } Poller::Event Poller::wait(Duration timeout) { static __thread PollerHandlePrivate* lastReturnedHandle = 0; epoll_event epe; int timeoutMs = (timeout == TIME_INFINITE) ? -1 : timeout / TIME_MSEC; AbsTime targetTimeout = (timeout == TIME_INFINITE) ? FAR_FUTURE : AbsTime(now(), timeout); if (lastReturnedHandle) { impl->resetMode(*lastReturnedHandle); lastReturnedHandle = 0; } // Repeat until we weren't interrupted by signal do { PollerHandleDeletionManager.markAllUnusedInThisThread(); int rc = ::epoll_wait(impl->epollFd, &epe, 1, timeoutMs); if (rc ==-1 && errno != EINTR) { QPID_POSIX_CHECK(rc); } else if (rc > 0) { assert(rc == 1); void* dataPtr = epe.data.ptr; // Check if this is an interrupt PollerPrivate::InterruptHandle& interruptHandle = impl->interruptHandle; if (dataPtr == &interruptHandle) { // If we are shutting down we need to rearm the shutdown interrupt to // ensure everyone still sees it. It's okay that this might be overridden // below as we will be back here if it is. if (impl->isShutdown) { impl->interruptAll(); } PollerHandle* wrappedHandle = 0; { ScopedLock l(interruptHandle.impl->lock); if (interruptHandle.impl->isActive()) { wrappedHandle = interruptHandle.getHandle(); // If there is an interrupt queued behind this one we need to arm it // We do it this way so that another thread can pick it up if (interruptHandle.queuedHandles()) { impl->interrupt(); interruptHandle.impl->setActive(); } else { interruptHandle.impl->setInactive(); } } } if (wrappedHandle) { PollerHandlePrivate& eh = *wrappedHandle->impl; { ScopedLock l(eh.lock); if (!eh.isDeleted()) { if (!eh.isIdle()) { eh.setInactive(); } lastReturnedHandle = &eh; assert(eh.pollerHandle == wrappedHandle); return Event(wrappedHandle, INTERRUPTED); } } PollerHandleDeletionManager.markForDeletion(&eh); } continue; } // Check for shutdown if (impl->isShutdown) { PollerHandleDeletionManager.markAllUnusedInThisThread(); return Event(0, SHUTDOWN); } PollerHandlePrivate& eh = *static_cast(dataPtr); ScopedLock l(eh.lock); // the handle could have gone inactive since we left the epoll_wait if (eh.isActive()) { PollerHandle* handle = eh.pollerHandle; assert(handle); // If the connection has been hungup we could still be readable // (just not writable), allow us to readable until we get here again if (epe.events & ::EPOLLHUP) { if (eh.isHungup()) { eh.setInactive(); // Don't set up last Handle so that we don't reset this handle // on re-entering Poller::wait. This means that we will never // be set active again once we've returned disconnected, and so // can never be returned again. return Event(handle, DISCONNECTED); } eh.setHungup(); } else { eh.setInactive(); } lastReturnedHandle = &eh; return Event(handle, PollerPrivate::epollToDirection(epe.events)); } } // We only get here if one of the following: // * epoll_wait was interrupted by a signal // * epoll_wait timed out // * the state of the handle changed after being returned by epoll_wait // // The only things we can do here are return a timeout or wait more. // Obviously if we timed out we return timeout; if the wait was meant to // be indefinite then we should never return with a time out so we go again. // If the wait wasn't indefinite, we check whether we are after the target wait // time or not if (timeoutMs == -1) { continue; } if (rc == 0 && now() > targetTimeout) { PollerHandleDeletionManager.markAllUnusedInThisThread(); return Event(0, TIMEOUT); } } while (true); } // Concrete constructors Poller::Poller() : impl(new PollerPrivate()) {} Poller::~Poller() { delete impl; } }} qpidc-0.16/src/qpid/sys/SecuritySettings.h0000664000076400007640000000323211344233212021172 0ustar00jrossjross00000000000000#ifndef QPID_SYS_SECURITYSETTINGS_H #define QPID_SYS_SECURITYSETTINGS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { namespace sys { /** * Conveys security information from a given transport to the upper * layers. */ struct SecuritySettings { /** * Security Strength Factor (SSF). Possible values are: * * @li 0 No security * @li 1 Integrity checking only * @li >1 Integrity and confidentiality with the number * giving the encryption key length. */ unsigned int ssf; /** * An authorisation id */ std::string authid; /** * Disables SASL mechanisms that are vulnerable to passive * dictionary-based password attacks */ bool nodict; SecuritySettings() : ssf(0), nodict(false) {} }; }} // namespace qpid::sys #endif /*!QPID_SYS_SECURITYSETTINGS_H*/ qpidc-0.16/src/qpid/sys/SslPlugin.cpp0000664000076400007640000002452411710601452020126 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ProtocolFactory.h" #include "qpid/Plugin.h" #include "qpid/sys/ssl/check.h" #include "qpid/sys/ssl/util.h" #include "qpid/sys/ssl/SslHandler.h" #include "qpid/sys/AsynchIOHandler.h" #include "qpid/sys/AsynchIO.h" #include "qpid/sys/ssl/SslIo.h" #include "qpid/sys/ssl/SslSocket.h" #include "qpid/broker/Broker.h" #include "qpid/log/Statement.h" #include #include namespace qpid { namespace sys { using namespace qpid::sys::ssl; struct SslServerOptions : ssl::SslOptions { uint16_t port; bool clientAuth; bool nodict; bool multiplex; SslServerOptions() : port(5671), clientAuth(false), nodict(false), multiplex(false) { addOptions() ("ssl-port", optValue(port, "PORT"), "Port on which to listen for SSL connections") ("ssl-require-client-authentication", optValue(clientAuth), "Forces clients to authenticate in order to establish an SSL connection") ("ssl-sasl-no-dict", optValue(nodict), "Disables SASL mechanisms that are vulnerable to passive dictionary-based password attacks"); } }; template class SslProtocolFactoryTmpl : public ProtocolFactory { private: typedef SslAcceptorTmpl SslAcceptor; const bool tcpNoDelay; T listener; const uint16_t listeningPort; std::auto_ptr acceptor; bool nodict; public: SslProtocolFactoryTmpl(const SslServerOptions&, int backlog, bool nodelay); void accept(Poller::shared_ptr, ConnectionCodec::Factory*); void connect(Poller::shared_ptr, const std::string& host, const std::string& port, ConnectionCodec::Factory*, boost::function2 failed); uint16_t getPort() const; bool supports(const std::string& capability); private: void established(Poller::shared_ptr, const Socket&, ConnectionCodec::Factory*, bool isClient); }; typedef SslProtocolFactoryTmpl SslProtocolFactory; typedef SslProtocolFactoryTmpl SslMuxProtocolFactory; // Static instance to initialise plugin static struct SslPlugin : public Plugin { SslServerOptions options; bool nssInitialized; Options* getOptions() { return &options; } SslPlugin() : nssInitialized(false) {} ~SslPlugin() { if (nssInitialized) ssl::shutdownNSS(); } void earlyInitialize(Target& target) { broker::Broker* broker = dynamic_cast(&target); if (broker && !options.certDbPath.empty()) { const broker::Broker::Options& opts = broker->getOptions(); if (opts.port == options.port && // AMQP & AMQPS ports are the same opts.port != 0) { // The presence of this option is used to signal to the TCP // plugin not to start listening on the shared port. The actual // value cannot be configured through the command line or config // file (other than by setting the ports to the same value) // because we are only adding it after option parsing. options.multiplex = true; options.addOptions()("ssl-multiplex", optValue(options.multiplex), "Allow SSL and non-SSL connections on the same port"); } } } void initialize(Target& target) { QPID_LOG(trace, "Initialising SSL plugin"); broker::Broker* broker = dynamic_cast(&target); // Only provide to a Broker if (broker) { if (options.certDbPath.empty()) { QPID_LOG(notice, "SSL plugin not enabled, you must set --ssl-cert-db to enable it."); } else { try { ssl::initNSS(options, true); nssInitialized = true; const broker::Broker::Options& opts = broker->getOptions(); ProtocolFactory::shared_ptr protocol(options.multiplex ? static_cast(new SslMuxProtocolFactory(options, opts.connectionBacklog, opts.tcpNoDelay)) : static_cast(new SslProtocolFactory(options, opts.connectionBacklog, opts.tcpNoDelay))); QPID_LOG(notice, "Listening for " << (options.multiplex ? "SSL or TCP" : "SSL") << " connections on TCP port " << protocol->getPort()); broker->registerProtocolFactory("ssl", protocol); } catch (const std::exception& e) { QPID_LOG(error, "Failed to initialise SSL plugin: " << e.what()); } } } } } sslPlugin; template SslProtocolFactoryTmpl::SslProtocolFactoryTmpl(const SslServerOptions& options, int backlog, bool nodelay) : tcpNoDelay(nodelay), listeningPort(listener.listen(options.port, backlog, options.certName, options.clientAuth)), nodict(options.nodict) {} void SslEstablished(Poller::shared_ptr poller, const qpid::sys::SslSocket& s, ConnectionCodec::Factory* f, bool isClient, bool tcpNoDelay, bool nodict) { qpid::sys::ssl::SslHandler* async = new qpid::sys::ssl::SslHandler(s.getFullAddress(), f, nodict); if (tcpNoDelay) { s.setTcpNoDelay(tcpNoDelay); QPID_LOG(info, "Set TCP_NODELAY on connection to " << s.getPeerAddress()); } if (isClient) { async->setClient(); } qpid::sys::ssl::SslIO* aio = new qpid::sys::ssl::SslIO(s, boost::bind(&qpid::sys::ssl::SslHandler::readbuff, async, _1, _2), boost::bind(&qpid::sys::ssl::SslHandler::eof, async, _1), boost::bind(&qpid::sys::ssl::SslHandler::disconnect, async, _1), boost::bind(&qpid::sys::ssl::SslHandler::closedSocket, async, _1, _2), boost::bind(&qpid::sys::ssl::SslHandler::nobuffs, async, _1), boost::bind(&qpid::sys::ssl::SslHandler::idle, async, _1)); async->init(aio, 4); aio->start(poller); } template <> void SslProtocolFactory::established(Poller::shared_ptr poller, const Socket& s, ConnectionCodec::Factory* f, bool isClient) { const SslSocket *sslSock = dynamic_cast(&s); SslEstablished(poller, *sslSock, f, isClient, tcpNoDelay, nodict); } template uint16_t SslProtocolFactoryTmpl::getPort() const { return listeningPort; // Immutable no need for lock. } template void SslProtocolFactoryTmpl::accept(Poller::shared_ptr poller, ConnectionCodec::Factory* fact) { acceptor.reset( new SslAcceptor(listener, boost::bind(&SslProtocolFactoryTmpl::established, this, poller, _1, fact, false))); acceptor->start(poller); } template <> void SslMuxProtocolFactory::established(Poller::shared_ptr poller, const Socket& s, ConnectionCodec::Factory* f, bool isClient) { const SslSocket *sslSock = dynamic_cast(&s); if (sslSock) { SslEstablished(poller, *sslSock, f, isClient, tcpNoDelay, nodict); return; } AsynchIOHandler* async = new AsynchIOHandler(s.getFullAddress(), f); if (tcpNoDelay) { s.setTcpNoDelay(); QPID_LOG(info, "Set TCP_NODELAY on connection to " << s.getPeerAddress()); } if (isClient) { async->setClient(); } AsynchIO* aio = AsynchIO::create (s, boost::bind(&AsynchIOHandler::readbuff, async, _1, _2), boost::bind(&AsynchIOHandler::eof, async, _1), boost::bind(&AsynchIOHandler::disconnect, async, _1), boost::bind(&AsynchIOHandler::closedSocket, async, _1, _2), boost::bind(&AsynchIOHandler::nobuffs, async, _1), boost::bind(&AsynchIOHandler::idle, async, _1)); async->init(aio, 4); aio->start(poller); } template void SslProtocolFactoryTmpl::connect( Poller::shared_ptr poller, const std::string& host, const std::string& port, ConnectionCodec::Factory* fact, ConnectFailedCallback failed) { // Note that the following logic does not cause a memory leak. // The allocated Socket is freed either by the SslConnector // upon connection failure or by the SslIoHandle upon connection // shutdown. The allocated SslConnector frees itself when it // is no longer needed. qpid::sys::ssl::SslSocket* socket = new qpid::sys::ssl::SslSocket(); new SslConnector(*socket, poller, host, port, boost::bind(&SslProtocolFactoryTmpl::established, this, poller, _1, fact, true), failed); } namespace { const std::string SSL = "ssl"; } template <> bool SslProtocolFactory::supports(const std::string& capability) { std::string s = capability; transform(s.begin(), s.end(), s.begin(), tolower); return s == SSL; } template <> bool SslMuxProtocolFactory::supports(const std::string& capability) { std::string s = capability; transform(s.begin(), s.end(), s.begin(), tolower); return s == SSL || s == "tcp"; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/CopyOnWriteArray.h0000664000076400007640000001005111620722662021071 0ustar00jrossjross00000000000000#ifndef QPID_SYS_COPYONWRITEARRAY_H #define QPID_SYS_COPYONWRITEARRAY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Mutex.h" #include #include #include namespace qpid { namespace sys { /** * An array that copies on adding/removing element allowing lock-free * iteration. */ template class CopyOnWriteArray { public: typedef boost::shared_ptr > ConstPtr; CopyOnWriteArray() {} CopyOnWriteArray(const CopyOnWriteArray& c) : array(c.array) {} bool empty() { Mutex::ScopedLock l(lock); return array ? array->empty() : true; } void add(T& t) { Mutex::ScopedLock l(lock); ArrayPtr copy(array ? new std::vector(*array) : new std::vector()); copy->push_back(t); array = copy; } bool remove(T& t) { Mutex::ScopedLock l(lock); if (array && std::find(array->begin(), array->end(), t) != array->end()) { ArrayPtr copy(new std::vector(*array)); copy->erase(std::find(copy->begin(), copy->end(), t)); array = copy; return true; } else { return false; } } bool clear() { Mutex::ScopedLock l(lock); if (array && !array->empty()) { ArrayPtr copy; array = copy; return true; } else { return false; } } template bool add_unless(T& t, F f) { Mutex::ScopedLock l(lock); if (array && std::find_if(array->begin(), array->end(), f) != array->end()) { return false; } else { ArrayPtr copy(array ? new std::vector(*array) : new std::vector()); copy->push_back(t); array = copy; return true; } } template bool remove_if(F f) { Mutex::ScopedLock l(lock); if (array && std::find_if(array->begin(), array->end(), f) != array->end()) { ArrayPtr copy(new std::vector(*array)); copy->erase(std::remove_if(copy->begin(), copy->end(), f), copy->end()); array = copy; return true; } return false; } template bool modify_if(TestFn f, ModifierFn & m) { if (!array) return false; { Mutex::ScopedLock l(lock); if (std::find_if(array->begin(), array->end(), f) != array->end()) { ArrayPtr copy(new std::vector(*array)); m(*std::find_if(copy->begin(), copy->end(), f)); array = copy; return true; } } return false; } template F for_each(F f) { ArrayPtr a; { Mutex::ScopedLock l(lock); a = array; } if (!a) return f; return std::for_each(a->begin(), a->end(), f); } ConstPtr snapshot() { ConstPtr a; { Mutex::ScopedLock l(lock); a = array; } return a; } private: typedef boost::shared_ptr< std::vector > ArrayPtr; Mutex lock; ArrayPtr array; }; }} #endif /*!QPID_SYS_COPYONWRITEARRAY_H*/ qpidc-0.16/src/qpid/sys/Semaphore.h0000664000076400007640000000311511227113407017570 0ustar00jrossjross00000000000000#ifndef _sys_Semaphore_h #define _sys_Semaphore_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/Monitor.h" namespace qpid { namespace sys { class Semaphore { public: Semaphore(uint c = 1) : count(c) {} void lock() { acquire(); } void unlock() { release(); } bool trylock() { return tryAcquire(); } bool tryAcquire() { Monitor::ScopedLock l(monitor); if (count) { count--; return true; } else { return false; } } void acquire() { Monitor::ScopedLock l(monitor); while (count == 0) monitor.wait(); count--; } void release(uint n) { Monitor::ScopedLock l(monitor); if (count==0) monitor.notifyAll(); count+=n; } void release() { release(1); } void forceLock() { Monitor::ScopedLock l(monitor); count = 0; } private: Monitor monitor; uint count; }; }} #endif /*!_sys_Semaphore_h*/ qpidc-0.16/src/qpid/sys/TimerWarnings.h0000664000076400007640000000463411471024410020441 0ustar00jrossjross00000000000000#ifndef QPID_SYS_TIMERWARNINGS_H #define QPID_SYS_TIMERWARNINGS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Time.h" #include #include namespace qpid { namespace sys { /** * The Timer class logs warnings when timer tasks are late and/or overrun. * * It is too expensive to log a warning for every late/overrun * incident, doing so aggravates the problem of tasks over-running and * being late. * * This class collects statistical data about each incident and prints * an aggregated report at regular intervals. */ class TimerWarnings { public: TimerWarnings(Duration reportInterval); void late(const std::string& task, Duration delay); void overran(const std::string& task, Duration overrun, Duration time); void lateAndOverran(const std::string& task, Duration delay, Duration overrun, Duration time); private: struct Statistic { Statistic() : total(0), count(0) {} void add(int64_t value) { total += value; ++count; } int64_t average() const { return count ? total/count : 0; } int64_t total; int64_t count; }; // Keep statistics for 3 classes of incident: late, overrun and both. struct TaskStats { Statistic lateDelay; // Just late Statistic overranOverrun, overranTime; // Just overrun // Both Statistic lateAndOverranDelay, lateAndOverranOverrun, lateAndOverranTime; }; typedef std::map TaskStatsMap; void log(); Duration interval; AbsTime nextReport; TaskStatsMap taskStats; }; }} // namespace qpid::sys #endif /*!QPID_SYS_TIMERWARNINGS_H*/ qpidc-0.16/src/qpid/sys/ConnectionInputHandler.h0000664000076400007640000000260211424102427022261 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ConnectionInputHandler_ #define _ConnectionInputHandler_ #include "qpid/framing/InputHandler.h" #include "qpid/sys/OutputTask.h" #include "qpid/sys/TimeoutHandler.h" namespace qpid { namespace sys { /** * ConnectionInputHandler provides methods to process incoming frames * using InputHandler::receive() and to generate outgoing messages in * OutputTask::doOutput() * */ class ConnectionInputHandler : public qpid::framing::InputHandler, public TimeoutHandler, public OutputTask { public: virtual void closed() = 0; }; } } #endif qpidc-0.16/src/qpid/sys/posix/0000775000076400007640000000000011752725715016654 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/sys/posix/Time.cpp0000664000076400007640000000673311717465066020270 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/posix/PrivatePosix.h" #include "qpid/sys/Time.h" #include #include #include #include #include #include namespace { int64_t max_abstime() { return std::numeric_limits::max(); } } namespace qpid { namespace sys { AbsTime::AbsTime(const AbsTime& t, const Duration& d) : timepoint(d == Duration::max() ? max_abstime() : t.timepoint+d.nanosecs) {} AbsTime AbsTime::Epoch() { AbsTime epoch; epoch.timepoint = 0; return epoch; } AbsTime AbsTime::FarFuture() { AbsTime ff; ff.timepoint = max_abstime(); return ff; } AbsTime AbsTime::now() { struct timespec ts; ::clock_gettime(CLOCK_REALTIME, &ts); AbsTime time_now; time_now.timepoint = toTime(ts).nanosecs; return time_now; } Duration::Duration(const AbsTime& start, const AbsTime& finish) : nanosecs(finish.timepoint - start.timepoint) {} namespace { /** type conversion helper: an infinite timeout for time_t sized types **/ const time_t TIME_T_MAX = std::numeric_limits::max(); } struct timespec& toTimespec(struct timespec& ts, const Duration& t) { Duration secs = t / TIME_SEC; ts.tv_sec = (secs > TIME_T_MAX) ? TIME_T_MAX : static_cast(secs); ts.tv_nsec = static_cast(t % TIME_SEC); return ts; } struct timeval& toTimeval(struct timeval& tv, const Duration& t) { Duration secs = t / TIME_SEC; tv.tv_sec = (secs > TIME_T_MAX) ? TIME_T_MAX : static_cast(secs); tv.tv_usec = static_cast((t%TIME_SEC)/TIME_USEC); return tv; } Duration toTime(const struct timespec& ts) { return ts.tv_sec*TIME_SEC + ts.tv_nsec; } std::ostream& operator<<(std::ostream& o, const Duration& d) { return o << int64_t(d) << "ns"; } namespace { inline std::ostream& outputFormattedTime(std::ostream& o, const ::time_t* time) { ::tm timeinfo; char time_string[100]; ::strftime(time_string, 100, "%Y-%m-%d %H:%M:%S", localtime_r(time, &timeinfo)); return o << time_string; } } std::ostream& operator<<(std::ostream& o, const AbsTime& t) { ::time_t rawtime(t.timepoint/TIME_SEC); return outputFormattedTime(o, &rawtime); } void outputFormattedNow(std::ostream& o) { ::time_t rawtime; ::time(&rawtime); outputFormattedTime(o, &rawtime); o << " "; } void outputHiresNow(std::ostream& o) { ::timespec time; ::clock_gettime(CLOCK_REALTIME, &time); ::time_t seconds = time.tv_sec; outputFormattedTime(o, &seconds); o << "." << std::setw(9) << std::setfill('0') << time.tv_nsec << " "; } void sleep(int secs) { ::sleep(secs); } void usleep(uint64_t usecs) { ::usleep(usecs); } }} qpidc-0.16/src/qpid/sys/posix/Socket.cpp0000664000076400007640000001660111717274207020610 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Socket.h" #include "qpid/sys/SocketAddress.h" #include "qpid/sys/posix/check.h" #include "qpid/sys/posix/PrivatePosix.h" #include #include #include #include #include #include #include #include #include #include namespace qpid { namespace sys { namespace { std::string getName(int fd, bool local) { ::sockaddr_storage name_s; // big enough for any socket address ::sockaddr* name = (::sockaddr*)&name_s; ::socklen_t namelen = sizeof(name_s); if (local) { QPID_POSIX_CHECK( ::getsockname(fd, name, &namelen) ); } else { QPID_POSIX_CHECK( ::getpeername(fd, name, &namelen) ); } return SocketAddress::asString(name, namelen); } uint16_t getLocalPort(int fd) { ::sockaddr_storage name_s; // big enough for any socket address ::sockaddr* name = (::sockaddr*)&name_s; ::socklen_t namelen = sizeof(name_s); QPID_POSIX_CHECK( ::getsockname(fd, name, &namelen) ); return SocketAddress::getPort(name); } } Socket::Socket() : IOHandle(new IOHandlePrivate), nonblocking(false), nodelay(false) {} Socket::Socket(IOHandlePrivate* h) : IOHandle(h), nonblocking(false), nodelay(false) {} void Socket::createSocket(const SocketAddress& sa) const { int& socket = impl->fd; if (socket != -1) Socket::close(); int s = ::socket(getAddrInfo(sa).ai_family, getAddrInfo(sa).ai_socktype, 0); if (s < 0) throw QPID_POSIX_ERROR(errno); socket = s; try { if (nonblocking) setNonblocking(); if (nodelay) setTcpNoDelay(); if (getAddrInfo(sa).ai_family == AF_INET6) { int flag = 1; int result = ::setsockopt(socket, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&flag, sizeof(flag)); QPID_POSIX_CHECK(result); } } catch (std::exception&) { ::close(s); socket = -1; throw; } } Socket* Socket::createSameTypeSocket() const { int& socket = impl->fd; // Socket currently has no actual socket attached if (socket == -1) return new Socket; ::sockaddr_storage sa; ::socklen_t salen = sizeof(sa); QPID_POSIX_CHECK(::getsockname(socket, (::sockaddr*)&sa, &salen)); int s = ::socket(sa.ss_family, SOCK_STREAM, 0); // Currently only work with SOCK_STREAM if (s < 0) throw QPID_POSIX_ERROR(errno); return new Socket(new IOHandlePrivate(s)); } void Socket::setNonblocking() const { int& socket = impl->fd; nonblocking = true; if (socket != -1) { QPID_POSIX_CHECK(::fcntl(socket, F_SETFL, O_NONBLOCK)); } } void Socket::setTcpNoDelay() const { int& socket = impl->fd; nodelay = true; if (socket != -1) { int flag = 1; int result = ::setsockopt(impl->fd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(flag)); QPID_POSIX_CHECK(result); } } void Socket::connect(const std::string& host, const std::string& port) const { SocketAddress sa(host, port); connect(sa); } void Socket::connect(const SocketAddress& addr) const { // The display name for an outbound connection needs to be the name that was specified // for the address rather than a resolved IP address as we don't know which of // the IP addresses is actually the one that will be connected to. peername = addr.asString(false); // However the string we compare with the local port must be numeric or it might not // match when it should as getLocalAddress() will always be numeric std::string connectname = addr.asString(); createSocket(addr); const int& socket = impl->fd; // TODO the correct thing to do here is loop on failure until you've used all the returned addresses if ((::connect(socket, getAddrInfo(addr).ai_addr, getAddrInfo(addr).ai_addrlen) < 0) && (errno != EINPROGRESS)) { throw Exception(QPID_MSG(strError(errno) << ": " << peername)); } // When connecting to a port on the same host which no longer has // a process associated with it, the OS occasionally chooses the // remote port (which is unoccupied) as the port to bind the local // end of the socket, resulting in a "circular" connection. // // This seems like something the OS should prevent but I have // confirmed that sporadic hangs in // cluster_tests.LongTests.test_failover on RHEL5 are caused by // such a circular connection. // // Raise an error if we see such a connection, since we know there is // no listener on the peer address. // if (getLocalAddress() == connectname) { close(); throw Exception(QPID_MSG("Connection refused: " << peername)); } } void Socket::close() const { int& socket = impl->fd; if (socket == -1) return; if (::close(socket) < 0) throw QPID_POSIX_ERROR(errno); socket = -1; } int Socket::listen(const std::string& host, const std::string& port, int backlog) const { SocketAddress sa(host, port); return listen(sa, backlog); } int Socket::listen(const SocketAddress& sa, int backlog) const { createSocket(sa); const int& socket = impl->fd; int yes=1; QPID_POSIX_CHECK(::setsockopt(socket,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(yes))); if (::bind(socket, getAddrInfo(sa).ai_addr, getAddrInfo(sa).ai_addrlen) < 0) throw Exception(QPID_MSG("Can't bind to port " << sa.asString() << ": " << strError(errno))); if (::listen(socket, backlog) < 0) throw Exception(QPID_MSG("Can't listen on port " << sa.asString() << ": " << strError(errno))); return getLocalPort(socket); } Socket* Socket::accept() const { int afd = ::accept(impl->fd, 0, 0); if ( afd >= 0) { Socket* s = new Socket(new IOHandlePrivate(afd)); s->localname = localname; return s; } else if (errno == EAGAIN) return 0; else throw QPID_POSIX_ERROR(errno); } int Socket::read(void *buf, size_t count) const { return ::read(impl->fd, buf, count); } int Socket::write(const void *buf, size_t count) const { return ::write(impl->fd, buf, count); } std::string Socket::getPeerAddress() const { if (peername.empty()) { peername = getName(impl->fd, false); } return peername; } std::string Socket::getLocalAddress() const { if (localname.empty()) { localname = getName(impl->fd, true); } return localname; } int Socket::getError() const { int result; socklen_t rSize = sizeof (result); if (::getsockopt(impl->fd, SOL_SOCKET, SO_ERROR, &result, &rSize) < 0) throw QPID_POSIX_ERROR(errno); return result; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/posix/PollableCondition.cpp0000664000076400007640000000714011225452477022760 0ustar00jrossjross00000000000000#ifndef QPID_SYS_LINUX_POLLABLECONDITION_CPP #define QPID_SYS_LINUX_POLLABLECONDITION_CPP /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/PollableCondition.h" #include "qpid/sys/DispatchHandle.h" #include "qpid/sys/IOHandle.h" #include "qpid/sys/posix/PrivatePosix.h" #include "qpid/Exception.h" #include #include #include namespace qpid { namespace sys { class PollableConditionPrivate : public sys::IOHandle { friend class PollableCondition; private: PollableConditionPrivate(const sys::PollableCondition::Callback& cb, sys::PollableCondition& parent, const boost::shared_ptr& poller); ~PollableConditionPrivate(); void dispatch(sys::DispatchHandle& h); void set(); void clear(); private: PollableCondition::Callback cb; PollableCondition& parent; boost::shared_ptr poller; int writeFd; std::auto_ptr handle; }; PollableConditionPrivate::PollableConditionPrivate( const sys::PollableCondition::Callback& cb, sys::PollableCondition& parent, const boost::shared_ptr& poller ) : IOHandle(new sys::IOHandlePrivate), cb(cb), parent(parent) { int fds[2]; if (::pipe(fds) == -1) throw ErrnoException(QPID_MSG("Can't create PollableCondition")); impl->fd = fds[0]; writeFd = fds[1]; if (::fcntl(impl->fd, F_SETFL, O_NONBLOCK) == -1) throw ErrnoException(QPID_MSG("Can't create PollableCondition")); if (::fcntl(writeFd, F_SETFL, O_NONBLOCK) == -1) throw ErrnoException(QPID_MSG("Can't create PollableCondition")); handle.reset (new DispatchHandleRef( *this, boost::bind(&sys::PollableConditionPrivate::dispatch, this, _1), 0, 0)); handle->startWatch(poller); handle->unwatch(); // Make the read FD readable static const char dummy=0; ssize_t n = ::write(writeFd, &dummy, 1); if (n == -1 && errno != EAGAIN) throw ErrnoException("Error setting PollableCondition"); } PollableConditionPrivate::~PollableConditionPrivate() { handle->stopWatch(); close(writeFd); } void PollableConditionPrivate::dispatch(sys::DispatchHandle&) { cb(parent); } void PollableConditionPrivate::set() { handle->rewatch(); } void PollableConditionPrivate::clear() { handle->unwatch(); } PollableCondition::PollableCondition(const Callback& cb, const boost::shared_ptr& poller ) : impl(new PollableConditionPrivate(cb, *this, poller)) { } PollableCondition::~PollableCondition() { delete impl; } void PollableCondition::set() { impl->set(); } void PollableCondition::clear() { impl->clear(); } }} // namespace qpid::sys #endif /*!QPID_SYS_LINUX_POLLABLECONDITION_CPP*/ qpidc-0.16/src/qpid/sys/posix/PidFile.h0000664000076400007640000000335411311752102020323 0ustar00jrossjross00000000000000#ifndef _sys_PidFile_h #define _sys_PidFile_h /* * * Copyright (c) 2008 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/LockFile.h" #include "qpid/CommonImportExport.h" #include "qpid/sys/IntegerTypes.h" #include #include #include namespace qpid { namespace sys { class PidFile : public LockFile { public: QPID_COMMON_EXTERN PidFile(const std::string& path_, bool create); /** * Read the process ID from the lock file. This method assumes that * if there is a process ID in the file, it was written there by * writePid(); thus, it's at the start of the file. * * Throws an exception if there is an error reading the file. * * @returns The stored process ID. No validity check is done on it. */ QPID_COMMON_EXTERN pid_t readPid(void) const; /** * Write the current process's ID to the lock file. It's written at * the start of the file and will overwrite any other content that * may be in the file. * * Throws an exception if the write fails. */ QPID_COMMON_EXTERN void writePid(void); }; }} /* namespace qpid::sys */ #endif /*!_sys_PidFile_h*/ qpidc-0.16/src/qpid/sys/posix/SocketAddress.cpp0000664000076400007640000001024611717274207022115 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/SocketAddress.h" #include "qpid/Exception.h" #include "qpid/Msg.h" #include #include #include #include namespace qpid { namespace sys { SocketAddress::SocketAddress(const std::string& host0, const std::string& port0) : host(host0), port(port0), addrInfo(0) { } SocketAddress::SocketAddress(const SocketAddress& sa) : host(sa.host), port(sa.port), addrInfo(0) { } SocketAddress& SocketAddress::operator=(const SocketAddress& sa) { SocketAddress temp(sa); std::swap(temp, *this); return *this; } SocketAddress::~SocketAddress() { if (addrInfo) { ::freeaddrinfo(addrInfo); } } std::string SocketAddress::asString(::sockaddr const * const addr, size_t addrlen) { char servName[NI_MAXSERV]; char dispName[NI_MAXHOST]; if (int rc=::getnameinfo(addr, addrlen, dispName, sizeof(dispName), servName, sizeof(servName), NI_NUMERICHOST | NI_NUMERICSERV) != 0) throw qpid::Exception(QPID_MSG(gai_strerror(rc))); std::string s; switch (addr->sa_family) { case AF_INET: s += dispName; break; case AF_INET6: s += "["; s += dispName; s+= "]"; break; default: throw Exception(QPID_MSG("Unexpected socket type")); } s += ":"; s += servName; return s; } uint16_t SocketAddress::getPort(::sockaddr const * const addr) { switch (addr->sa_family) { case AF_INET: return ntohs(((const ::sockaddr_in*)(const void*)addr)->sin_port); case AF_INET6: return ntohs(((const ::sockaddr_in6*)(const void*)addr)->sin6_port); default:throw Exception(QPID_MSG("Unexpected socket type")); } } std::string SocketAddress::asString(bool numeric) const { if (!numeric) return host + ":" + port; // Canonicalise into numeric id const ::addrinfo& ai = getAddrInfo(*this); return asString(ai.ai_addr, ai.ai_addrlen); } bool SocketAddress::nextAddress() { bool r = currentAddrInfo->ai_next != 0; if (r) currentAddrInfo = currentAddrInfo->ai_next; return r; } void SocketAddress::setAddrInfoPort(uint16_t port) { if (!currentAddrInfo) return; ::addrinfo& ai = *currentAddrInfo; switch (ai.ai_family) { case AF_INET: ((::sockaddr_in*)(void*)ai.ai_addr)->sin_port = htons(port); return; case AF_INET6:((::sockaddr_in6*)(void*)ai.ai_addr)->sin6_port = htons(port); return; default: throw Exception(QPID_MSG("Unexpected socket type")); } } const ::addrinfo& getAddrInfo(const SocketAddress& sa) { if (!sa.addrInfo) { ::addrinfo hints; ::memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_ADDRCONFIG; // Only use protocols that we have configured interfaces for hints.ai_family = AF_UNSPEC; // Allow both IPv4 and IPv6 hints.ai_socktype = SOCK_STREAM; const char* node = 0; if (sa.host.empty()) { hints.ai_flags |= AI_PASSIVE; } else { node = sa.host.c_str(); } const char* service = sa.port.empty() ? "0" : sa.port.c_str(); int n = ::getaddrinfo(node, service, &hints, &sa.addrInfo); if (n != 0) throw Exception(QPID_MSG("Cannot resolve " << sa.asString(false) << ": " << ::gai_strerror(n))); sa.currentAddrInfo = sa.addrInfo; } return *sa.currentAddrInfo; } }} qpidc-0.16/src/qpid/sys/posix/PosixPoller.cpp0000664000076400007640000005617111714772361021647 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Poller.h" #include "qpid/sys/IOHandle.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/AtomicCount.h" #include "qpid/sys/DeletionManager.h" #include "qpid/sys/posix/check.h" #include "qpid/sys/posix/PrivatePosix.h" #include "qpid/log/Statement.h" #include "qpid/sys/Condition.h" #include #include #include #include #include #include #include /* * * This is a qpid::sys::Poller implementation for Posix systems. * * This module follows the structure of the Linux EpollPoller as closely as possible * to simplify maintainability. Noteworthy differences: * * The Linux epoll_xxx() calls present one event at a time to multiple callers whereas poll() * returns one or more events to a single caller. The EventStream class layers a * "one event per call" view of the poll() result to multiple threads. * * The HandleSet is the master set of in-use PollerHandles. The EventStream * maintains a snapshot copy taken just before the call to poll() that remains static * until all flagged events have been processed. * * There is an additional window where the PollerHandlePrivate class may survive the * parent PollerHandle destructor, i.e. between snapshots. * * Safe interrupting of the Poller is implemented using the "self-pipe trick". * */ namespace qpid { namespace sys { // Deletion manager to handle deferring deletion of PollerHandles to when they definitely aren't being used DeletionManager PollerHandleDeletionManager; // Instantiate (and define) class static for DeletionManager template <> DeletionManager::AllThreadsStatuses DeletionManager::allThreadsStatuses(0); class PollerHandlePrivate { friend class Poller; friend class PollerPrivate; friend class PollerHandle; friend class HandleSet; enum FDStat { ABSENT, MONITORED, INACTIVE, HUNGUP, MONITORED_HUNGUP, INTERRUPTED, INTERRUPTED_HUNGUP, DELETED }; short events; const IOHandlePrivate* ioHandle; PollerHandle* pollerHandle; FDStat stat; Mutex lock; PollerHandlePrivate(const IOHandlePrivate* h, PollerHandle* p) : events(0), ioHandle(h), pollerHandle(p), stat(ABSENT) { } int fd() const { return toFd(ioHandle); } bool isActive() const { return stat == MONITORED || stat == MONITORED_HUNGUP; } void setActive() { stat = (stat == HUNGUP || stat == INTERRUPTED_HUNGUP) ? MONITORED_HUNGUP : MONITORED; } bool isInactive() const { return stat == INACTIVE || stat == HUNGUP; } void setInactive() { stat = INACTIVE; } bool isIdle() const { return stat == ABSENT; } void setIdle() { stat = ABSENT; } bool isHungup() const { return stat == MONITORED_HUNGUP || stat == HUNGUP || stat == INTERRUPTED_HUNGUP; } void setHungup() { assert(stat == MONITORED); stat = HUNGUP; } bool isInterrupted() const { return stat == INTERRUPTED || stat == INTERRUPTED_HUNGUP; } void setInterrupted() { stat = (stat == MONITORED_HUNGUP || stat == HUNGUP) ? INTERRUPTED_HUNGUP : INTERRUPTED; } bool isDeleted() const { return stat == DELETED; } void setDeleted() { stat = DELETED; } }; PollerHandle::PollerHandle(const IOHandle& h) : impl(new PollerHandlePrivate(h.impl, this)) {} PollerHandle::~PollerHandle() { { ScopedLock l(impl->lock); if (impl->isDeleted()) { return; } impl->pollerHandle = 0; if (impl->isInterrupted()) { impl->setDeleted(); return; } assert(impl->isIdle()); impl->setDeleted(); } PollerHandleDeletionManager.markForDeletion(impl); } class HandleSet { Mutex lock; bool stale; std::set handles; public: HandleSet() : stale(true) {} void add(PollerHandlePrivate*); void remove(PollerHandlePrivate*); void cleanup(); bool snapshot(std::vector& , std::vector&); void setStale(); }; void HandleSet::add(PollerHandlePrivate* h) { ScopedLock l(lock); handles.insert(h); } void HandleSet::remove(PollerHandlePrivate* h) { ScopedLock l(lock); handles.erase(h); } void HandleSet::cleanup() { // Inform all registered handles of disconnection std::set copy; handles.swap(copy); for (std::set::const_iterator i = copy.begin(); i != copy.end(); ++i) { PollerHandlePrivate& eh = **i; { ScopedLock l(eh.lock); if (!eh.isDeleted()) { Poller::Event event((*i)->pollerHandle, Poller::DISCONNECTED); event.process(); } } } } void HandleSet::setStale() { // invalidate cached pollfds for next snapshot ScopedLock l(lock); stale = true; } /** * Concrete implementation of Poller to use Posix poll() * interface */ class PollerPrivate { friend class Poller; friend class EventStream; friend class HandleSet; class SignalPipe { /** * Used to wakeup a thread in ::poll() */ int fds[2]; bool signaled; bool permanent; Mutex lock; public: SignalPipe() : signaled(false), permanent(false) { QPID_POSIX_CHECK(::pipe(fds)); } ~SignalPipe() { ::close(fds[0]); ::close(fds[1]); } int getFD() { return fds[0]; } bool isSet() { return signaled; } void set() { ScopedLock l(lock); if (signaled) return; signaled = true; QPID_POSIX_CHECK(::write(fds[1], " ", 1)); } void reset() { if (permanent) return; ScopedLock l(lock); if (signaled) { char ignore; QPID_POSIX_CHECK(::read(fds[0], &ignore, 1)); signaled = false; } } void setPermanently() { // async signal safe calls only. No locking. permanent = true; signaled = true; QPID_POSIX_CHECK(::write(fds[1], " ", 2)); // poll() should never block now } }; // Collect pending events and serialize access. Maintain array of pollfd structs. class EventStream { typedef Poller::Event Event; PollerPrivate& pollerPrivate; SignalPipe& signalPipe; std::queue interruptedHandles; std::vector pollfds; std::vector pollHandles; Mutex streamLock; Mutex serializeLock; Condition serializer; bool busy; int currentPollfd; int pollCount; int waiters; public: EventStream(PollerPrivate* p) : pollerPrivate(*p), signalPipe(p->signalPipe), busy(false), currentPollfd(0), pollCount(0), waiters(0) { // The signal pipe is the first element of pollfds and pollHandles pollfds.reserve(8); pollfds.resize(1); pollfds[0].fd = pollerPrivate.signalPipe.getFD(); pollfds[0].events = POLLIN; pollfds[0].revents = 0; pollHandles.reserve(8); pollHandles.resize(1); pollHandles[0] = 0; } void addInterrupt(PollerHandle& handle) { ScopedLock l(streamLock); interruptedHandles.push(handle.impl); } // Serialize access to the stream. Event next(Duration timeout) { AbsTime targetTimeout = (timeout == TIME_INFINITE) ? FAR_FUTURE : AbsTime(now(), timeout); ScopedLock l(serializeLock); Event event(0, Poller::INVALID); while (busy) { waiters++; bool timedout = !serializer.wait(serializeLock, targetTimeout); waiters--; if (busy && timedout) { return Event(0, Poller::TIMEOUT); } } busy = true; { ScopedUnlock ul(serializeLock); event = getEvent(targetTimeout); } busy = false; if (waiters > 0) serializer.notify(); return event; } Event getEvent(AbsTime targetTimeout) { bool timeoutPending = false; ScopedLock l(streamLock); // hold lock except for poll() // loop until poll event, async interrupt, or timeout while (true) { // first check for any interrupts while (interruptedHandles.size() > 0) { PollerHandlePrivate& eh = *interruptedHandles.front(); interruptedHandles.pop(); { ScopedLock lk(eh.lock); if (!eh.isDeleted()) { if (!eh.isIdle()) { eh.setInactive(); } // nullify the corresponding pollfd event, if any int ehfd = eh.fd(); std::vector::iterator i = pollfds.begin() + 1; // skip self pipe at front for (; i != pollfds.end(); i++) { if (i->fd == ehfd) { i->events = 0; if (i->revents) { i->revents = 0; pollCount--; } break; } } return Event(eh.pollerHandle, Poller::INTERRUPTED); } } PollerHandleDeletionManager.markForDeletion(&eh); } // Check for shutdown if (pollerPrivate.isShutdown) { PollerHandleDeletionManager.markAllUnusedInThisThread(); return Event(0, Poller::SHUTDOWN); } // search for any remaining events from earlier poll() int nfds = pollfds.size(); while ((pollCount > 0) && (currentPollfd < nfds)) { int index = currentPollfd++; short evt = pollfds[index].revents; if (evt != 0) { pollCount--; PollerHandlePrivate& eh = *pollHandles[index]; ScopedLock l(eh.lock); // stop polling this handle until resetMode() pollfds[index].events = 0; // the handle could have gone inactive since snapshot taken if (eh.isActive()) { PollerHandle* handle = eh.pollerHandle; assert(handle); // If the connection has been hungup we could still be readable // (just not writable), allow us to readable until we get here again if (evt & POLLHUP) { if (eh.isHungup()) { eh.setInactive(); // Don't set up last Handle so that we don't reset this handle // on re-entering Poller::wait. This means that we will never // be set active again once we've returned disconnected, and so // can never be returned again. return Event(handle, Poller::DISCONNECTED); } eh.setHungup(); } else { eh.setInactive(); } return Event(handle, PollerPrivate::epollToDirection(evt)); } } } if (timeoutPending) { return Event(0, Poller::TIMEOUT); } // no outstanding events, poll() for more { ScopedUnlock ul(streamLock); bool refreshed = pollerPrivate.registeredHandles.snapshot(pollHandles, pollfds); if (refreshed) { // we just drained all interruptedHandles and got a fresh snapshot PollerHandleDeletionManager.markAllUnusedInThisThread(); } if (!signalPipe.isSet()) { int timeoutMs = -1; if (!(targetTimeout == FAR_FUTURE)) { timeoutMs = Duration(now(), targetTimeout) / TIME_MSEC; if (timeoutMs < 0) timeoutMs = 0; } pollCount = ::poll(&pollfds[0], pollfds.size(), timeoutMs); if (pollCount ==-1 && errno != EINTR) { QPID_POSIX_CHECK(pollCount); } else if (pollCount == 0) { // timeout, unless shutdown or interrupt arrives in another thread timeoutPending = true; } else { if (pollfds[0].revents) { pollCount--; // signal pipe doesn't count } } } else pollCount = 0; signalPipe.reset(); } currentPollfd = 1; } } }; bool isShutdown; HandleSet registeredHandles; AtomicCount threadCount; SignalPipe signalPipe; EventStream eventStream; static short directionToEpollEvent(Poller::Direction dir) { switch (dir) { case Poller::INPUT: return POLLIN; case Poller::OUTPUT: return POLLOUT; case Poller::INOUT: return POLLIN | POLLOUT; default: return 0; } } static Poller::EventType epollToDirection(short events) { // POLLOUT & POLLHUP are mutually exclusive really, but at least socketpairs // can give you both! events = (events & POLLHUP) ? events & ~POLLOUT : events; short e = events & (POLLIN | POLLOUT); switch (e) { case POLLIN: return Poller::READABLE; case POLLOUT: return Poller::WRITABLE; case POLLIN | POLLOUT: return Poller::READ_WRITABLE; default: return (events & (POLLHUP | POLLERR)) ? Poller::DISCONNECTED : Poller::INVALID; } } PollerPrivate() : isShutdown(false), eventStream(this) { } ~PollerPrivate() {} void resetMode(PollerHandlePrivate& handle); void interrupt() { signalPipe.set(); } void interruptAll() { // be async signal safe signalPipe.setPermanently(); } }; void Poller::registerHandle(PollerHandle& handle) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(eh.isIdle()); eh.setActive(); impl->registeredHandles.add(handle.impl); // not stale until monitored } void Poller::unregisterHandle(PollerHandle& handle) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(!eh.isIdle()); eh.setIdle(); impl->registeredHandles.remove(handle.impl); impl->registeredHandles.setStale(); impl->interrupt(); } void PollerPrivate::resetMode(PollerHandlePrivate& eh) { PollerHandle* ph; { // Called after an event has been processed for a handle ScopedLock l(eh.lock); assert(!eh.isActive()); if (eh.isIdle() || eh.isDeleted()) { return; } if (eh.events==0) { eh.setActive(); return; } if (!eh.isInterrupted()) { // Handle still in use, allow events to resume. eh.setActive(); registeredHandles.setStale(); // Ouch. This scales poorly for large handle sets. // TODO: avoid new snapshot, perhaps create an index to pollfds or a // pending reset queue to be processed before each poll(). However, the real // scalable solution is to implement the OS-specific epoll equivalent. interrupt(); return; } ph = eh.pollerHandle; } eventStream.addInterrupt(*ph); interrupt(); } void Poller::monitorHandle(PollerHandle& handle, Direction dir) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(!eh.isIdle()); short oldEvents = eh.events; eh.events |= PollerPrivate::directionToEpollEvent(dir); // If no change nothing more to do - avoid unnecessary system call if (oldEvents==eh.events) { return; } // If we're not actually listening wait till we are to perform change if (!eh.isActive()) { return; } // tell polling thread to update its pollfds impl->registeredHandles.setStale(); impl->interrupt(); } void Poller::unmonitorHandle(PollerHandle& handle, Direction dir) { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); assert(!eh.isIdle()); short oldEvents = eh.events; eh.events &= ~PollerPrivate::directionToEpollEvent(dir); // If no change nothing more to do - avoid unnecessary system call if (oldEvents==eh.events) { return; } // If we're not actually listening wait till we are to perform change if (!eh.isActive()) { return; } impl->registeredHandles.setStale(); impl->interrupt(); } void Poller::shutdown() { // NB: this function must be async-signal safe, it must not // call any function that is not async-signal safe. // Allow sloppy code to shut us down more than once if (impl->isShutdown) return; // Don't use any locking here - isShutdown will be visible to all // after the write() anyway (it's a memory barrier) impl->isShutdown = true; impl->interruptAll(); } bool Poller::interrupt(PollerHandle& handle) { { PollerHandlePrivate& eh = *handle.impl; ScopedLock l(eh.lock); if (eh.isIdle() || eh.isDeleted()) { return false; } if (eh.isInterrupted()) { return true; } if (eh.isInactive()) { eh.setInterrupted(); return true; } eh.setInterrupted(); eh.events = 0; } impl->registeredHandles.setStale(); impl->eventStream.addInterrupt(handle); impl->interrupt(); return true; } void Poller::run() { // Ensure that we exit thread responsibly under all circumstances try { // Make sure we can't be interrupted by signals at a bad time ::sigset_t ss; ::sigfillset(&ss); ::pthread_sigmask(SIG_SETMASK, &ss, 0); ++(impl->threadCount); do { Event event = wait(); // If can read/write then dispatch appropriate callbacks if (event.handle) { event.process(); } else { // Handle shutdown switch (event.type) { case SHUTDOWN: //last thread to respond to shutdown cleans up: if (--(impl->threadCount) == 0) impl->registeredHandles.cleanup(); PollerHandleDeletionManager.destroyThreadState(); return; default: // This should be impossible assert(false); } } } while (true); } catch (const std::exception& e) { QPID_LOG(error, "IO worker thread exiting with unhandled exception: " << e.what()); } PollerHandleDeletionManager.destroyThreadState(); --(impl->threadCount); } bool Poller::hasShutdown() { return impl->isShutdown; } Poller::Event Poller::wait(Duration timeout) { static __thread PollerHandlePrivate* lastReturnedHandle = 0; if (lastReturnedHandle) { impl->resetMode(*lastReturnedHandle); lastReturnedHandle = 0; } Event event = impl->eventStream.next(timeout); switch (event.type) { case INTERRUPTED: case READABLE: case WRITABLE: case READ_WRITABLE: lastReturnedHandle = event.handle->impl; break; default: ; } return event; } // Concrete constructors Poller::Poller() : impl(new PollerPrivate()) {} Poller::~Poller() { delete impl; } bool HandleSet::snapshot(std::vector& hs , std::vector& fds) { // Element 0 of the vectors is always the signal pipe, leave undisturbed { ScopedLock l(lock); if (!stale) return false; // no refresh done hs.resize(1); for (std::set::const_iterator i = handles.begin(); i != handles.end(); ++i) { hs.push_back(*i); } stale = false; // have copy of handle set (in vector form), drop the lock and build the pollfds } // sync pollfds to same sizing as the handles int sz = hs.size(); fds.resize(sz); for (int j = 1; j < sz; ++j) { // create a pollfd entry for each handle struct ::pollfd& pollfd = fds[j]; PollerHandlePrivate& eh = *hs[j]; ScopedLock lk(eh.lock); if (!eh.isInactive() && !eh.isDeleted()) { pollfd.fd = eh.fd(); pollfd.events = eh.events; } else { pollfd.fd = -1; // tell poll() to ignore this fd pollfd.events = 0; } } return true; } }} qpidc-0.16/src/qpid/sys/posix/IOHandle.cpp0000664000076400007640000000215611227113407020771 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IOHandle.h" #include "qpid/sys/posix/PrivatePosix.h" namespace qpid { namespace sys { int toFd(const IOHandlePrivate* h) { return h->fd; } NullIOHandle DummyIOHandle; IOHandle::IOHandle(IOHandlePrivate* h) : impl(h) {} IOHandle::~IOHandle() { delete impl; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/posix/LockFile.cpp0000775000076400007640000000516111663012400021033 0ustar00jrossjross00000000000000/* * * Copyright (c) 2008 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/LockFile.h" #include "qpid/sys/posix/PidFile.h" #include #include #include #include #include #include "qpid/sys/posix/check.h" namespace qpid { namespace sys { class LockFilePrivate { friend class LockFile; friend class PidFile; int fd; public: LockFilePrivate(int f) : fd(f) {} }; LockFile::LockFile(const std::string& path_, bool create) : path(path_), created(create) { errno = 0; int flags=create ? O_WRONLY|O_CREAT|O_NOFOLLOW : O_RDWR; int fd = ::open(path.c_str(), flags, 0644); if (fd < 0) throw ErrnoException("Cannot open " + path, errno); if (::lockf(fd, F_TLOCK, 0) < 0) { ::close(fd); throw ErrnoException("Cannot lock " + path, errno); } impl.reset(new LockFilePrivate(fd)); } LockFile::~LockFile() { if (impl) { int f = impl->fd; if (f >= 0) { if(::lockf(f, F_ULOCK, 0)) {} // Suppress warnings about ignoring return value. ::close(f); impl->fd = -1; } } } int LockFile::read(void* bytes, size_t len) const { if (!impl) throw Exception("Lock file not open: " + path); ssize_t rc = ::read(impl->fd, bytes, len); if ((ssize_t)len > rc) { throw Exception("Cannot read lock file: " + path); } return rc; } int LockFile::write(void* bytes, size_t len) const { if (!impl) throw Exception("Lock file not open: " + path); ssize_t rc = ::write(impl->fd, bytes, len); if ((ssize_t)len > rc) { throw Exception("Cannot write lock file: " + path); } return rc; } PidFile::PidFile(const std::string& path_, bool create): LockFile(path_, create) {} pid_t PidFile::readPid(void) const { pid_t pid; int desired_read = sizeof(pid_t); read(&pid, desired_read); return pid; } void PidFile::writePid(void) { pid_t pid = getpid(); int desired_write = sizeof(pid_t); write(&pid, desired_write); } }} /* namespace qpid::sys */ qpidc-0.16/src/qpid/sys/posix/PipeHandle.cpp0000775000076400007640000000333411227113407021361 0ustar00jrossjross00000000000000// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/sys/PipeHandle.h" #include "qpid/sys/posix/check.h" #include #include #include namespace qpid { namespace sys { PipeHandle::PipeHandle(bool nonBlocking) { int pair[2]; pair[0] = pair[1] = -1; if (socketpair(PF_UNIX, SOCK_STREAM, 0, pair) == -1) throw qpid::Exception(QPID_MSG("Creation of pipe failed")); writeFd = pair[0]; readFd = pair[1]; // Set the socket to non-blocking if (nonBlocking) { int flags = fcntl(readFd, F_GETFL); fcntl(readFd, F_SETFL, flags | O_NONBLOCK); } } PipeHandle::~PipeHandle() { close(readFd); close(writeFd); } int PipeHandle::read(void* buf, size_t bufSize) { return ::read(readFd,buf,bufSize); } int PipeHandle::write(const void* buf, size_t bufSize) { return ::write(writeFd,buf,bufSize); } int PipeHandle::getReadHandle() { return readFd; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/posix/StrError.cpp0000664000076400007640000000230511044146503021124 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/StrError.h" #include namespace qpid { namespace sys { std::string strError(int err) { char buf[512] = "Unknown error"; #ifdef _GNU_SOURCE // GNU strerror_r returns the message return ::strerror_r(err, buf, sizeof(buf)); #else // POSIX strerror_r doesn't return the buffer ::strerror_r(err, buf, sizeof(buf)); return std::string(buf); #endif } }} qpidc-0.16/src/qpid/sys/posix/Mutex.cpp0000664000076400007640000000260111030474076020447 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Mutex.h" namespace qpid { namespace sys { /** * Initialise a recursive mutex attr for use in creating mutexes later * (we use pthread_once to make sure it is initialised exactly once) */ namespace { pthread_once_t onceControl = PTHREAD_ONCE_INIT; pthread_mutexattr_t mutexattr; void initMutexattr() { pthread_mutexattr_init(&mutexattr); pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE); } } const pthread_mutexattr_t* Mutex::getAttribute() { pthread_once(&onceControl, initMutexattr); return &mutexattr; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/posix/Thread.cpp0000664000076400007640000000421511562043261020555 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/posix/check.h" #include namespace qpid { namespace sys { namespace { void* runRunnable(void* p) { static_cast(p)->run(); return 0; } } class ThreadPrivate { public: pthread_t thread; ThreadPrivate(Runnable* runnable) { QPID_POSIX_ASSERT_THROW_IF(::pthread_create(&thread, NULL, runRunnable, runnable)); } ThreadPrivate() : thread(::pthread_self()) {} }; Thread::Thread() {} Thread::Thread(Runnable* runnable) : impl(new ThreadPrivate(runnable)) {} Thread::Thread(Runnable& runnable) : impl(new ThreadPrivate(&runnable)) {} Thread::operator bool() { return impl; } bool Thread::operator==(const Thread& t) const { return ::pthread_equal(impl->thread, t.impl->thread) != 0; } bool Thread::operator!=(const Thread& t) const { return !(*this==t); } void Thread::join(){ if (impl) { QPID_POSIX_ASSERT_THROW_IF(::pthread_join(impl->thread, 0)); } } unsigned long Thread::logId() { // This does need to be the C cast operator as // pthread_t could be either a pointer or an integer // and so we can't know static_cast<> or reinterpret_cast<> return (unsigned long) ::pthread_self(); } Thread Thread::current() { Thread t; t.impl.reset(new ThreadPrivate()); return t; } }} qpidc-0.16/src/qpid/sys/posix/FileSysDir.cpp0000775000076400007640000000265611072677026021405 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/FileSysDir.h" #include "qpid/sys/StrError.h" #include "qpid/Exception.h" #include #include #include #include #include namespace qpid { namespace sys { bool FileSysDir::exists (void) const { const char *cpath = dirPath.c_str (); struct stat s; if (::stat(cpath, &s)) { if (errno == ENOENT) { return false; } throw qpid::Exception (strError(errno) + ": Can't check directory: " + dirPath); } if (S_ISDIR(s.st_mode)) return true; throw qpid::Exception(dirPath + " is not a directory"); } void FileSysDir::mkdir(void) { if (::mkdir(dirPath.c_str(), 0755)) throw Exception ("Can't create directory: " + dirPath); } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/posix/SystemInfo.cpp0000775000076400007640000001021311717537230021452 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/SystemInfo.h" #include "qpid/sys/posix/check.h" #include #include #include // For FreeBSD #include // For FreeBSD #include // For FreeBSD #include #include #include #include #include #include #ifndef HOST_NAME_MAX # define HOST_NAME_MAX 256 #endif using namespace std; namespace qpid { namespace sys { long SystemInfo::concurrency() { #ifdef _SC_NPROCESSORS_ONLN // Linux specific. return sysconf(_SC_NPROCESSORS_ONLN); #else return -1; #endif } bool SystemInfo::getLocalHostname (Address &address) { char name[HOST_NAME_MAX]; if (::gethostname(name, sizeof(name)) != 0) return false; address.host = name; return true; } static const string LOCALHOST("127.0.0.1"); static const string TCP("tcp"); void SystemInfo::getLocalIpAddresses (uint16_t port, std::vector
&addrList) { ::ifaddrs* ifaddr = 0; QPID_POSIX_CHECK(::getifaddrs(&ifaddr)); for (::ifaddrs* ifap = ifaddr; ifap != 0; ifap = ifap->ifa_next) { if (ifap->ifa_addr == 0) continue; int family = ifap->ifa_addr->sa_family; switch (family) { case AF_INET: { char dispName[NI_MAXHOST]; int rc = ::getnameinfo( ifap->ifa_addr, (family == AF_INET) ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), dispName, sizeof(dispName), 0, 0, NI_NUMERICHOST); if (rc != 0) { throw QPID_POSIX_ERROR(rc); } string addr(dispName); if (addr != LOCALHOST) { addrList.push_back(Address(TCP, addr, port)); } break; } // TODO: Url parsing currently can't cope with IPv6 addresses so don't return them // when it can cope move this line to above "case AF_INET:" case AF_INET6: default: continue; } } freeifaddrs(ifaddr); if (addrList.empty()) { addrList.push_back(Address(TCP, LOCALHOST, port)); } } void SystemInfo::getSystemId (std::string &osName, std::string &nodeName, std::string &release, std::string &version, std::string &machine) { struct utsname _uname; if (uname (&_uname) == 0) { osName = _uname.sysname; nodeName = _uname.nodename; release = _uname.release; version = _uname.version; machine = _uname.machine; } } uint32_t SystemInfo::getProcessId() { return (uint32_t) ::getpid(); } uint32_t SystemInfo::getParentProcessId() { return (uint32_t) ::getppid(); } // Linux specific (Solaris has quite different stuff in /proc) string SystemInfo::getProcessName() { string value; ifstream input("/proc/self/status"); if (input.good()) { while (!input.eof()) { string key; input >> key; if (key == "Name:") { input >> value; break; } } input.close(); } return value; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/posix/Shlib.cpp0000664000076400007640000000316411341561464020416 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Shlib.h" #include "qpid/Exception.h" #include "qpid/Msg.h" #include namespace qpid { namespace sys { void Shlib::load(const char* name) { ::dlerror(); handle = ::dlopen(name, RTLD_NOW); const char* error = ::dlerror(); if (error) { throw Exception(QPID_MSG(error << ": " << name)); } } void Shlib::unload() { if (handle) { ::dlerror(); ::dlclose(handle); const char* error = ::dlerror(); if (error) { throw Exception(QPID_MSG(error)); } handle = 0; } } void* Shlib::getSymbol(const char* name) { ::dlerror(); void* sym = ::dlsym(handle, name); const char* error = ::dlerror(); if (error) throw Exception(QPID_MSG(error << ": " << name)); return sym; } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/posix/Fork.cpp0000664000076400007640000000726211300710057020246 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/Fork.h" #include "qpid/log/Statement.h" #include "qpid/Exception.h" #include #include #include #include #include #include #include #include namespace qpid { namespace sys { using namespace std; namespace { void writeStr(int fd, const std::string& str) { const char* WRITE_ERR = "Error writing to parent process"; int size = str.size(); if (int(sizeof(size)) > ::write(fd, &size, sizeof(size))) throw ErrnoException(WRITE_ERR); if (size > ::write(fd, str.data(), size)) throw ErrnoException(WRITE_ERR); } string readStr(int fd) { string value; const char* READ_ERR = "Error reading from forked process"; int size; if (int(sizeof(size)) > ::read(fd, &size, sizeof(size))) throw ErrnoException(READ_ERR); if (size > 0) { // Read string message value.resize(size); if (size > ::read(fd, const_cast(value.data()), size)) throw ErrnoException(READ_ERR); } return value; } } // namespace Fork::Fork() {} Fork::~Fork() {} void Fork::fork() { pid_t pid = ::fork(); if (pid < 0) throw ErrnoException("Failed to fork the process"); if (pid == 0) child(); else parent(pid); } ForkWithMessage::ForkWithMessage() { pipeFds[0] = pipeFds[1] = -1; } struct AutoCloseFd { int fd; AutoCloseFd(int d) : fd(d) {} ~AutoCloseFd() { ::close(fd); } }; void ForkWithMessage::fork() { if(::pipe(pipeFds) < 0) throw ErrnoException("Can't create pipe"); pid_t pid = ::fork(); if(pid < 0) throw ErrnoException("Fork fork failed"); if (pid == 0) { // Child AutoCloseFd ac(pipeFds[1]); // Write side. ::close(pipeFds[0]); // Read side try { child(); } catch (const std::exception& e) { QPID_LOG(error, "Error in forked child: " << e.what()); std::string msg = e.what(); if (msg.empty()) msg = " "; // Make sure we send a non-empty error string. writeStr(pipeFds[1], msg); } } else { // Parent close(pipeFds[1]); // Write side. AutoCloseFd ac(pipeFds[0]); // Read side parent(pid); } } string ForkWithMessage::wait(int timeout) { // parent waits for child. errno = 0; struct timeval tv; tv.tv_sec = timeout; tv.tv_usec = 0; fd_set fds; FD_ZERO(&fds); FD_SET(pipeFds[0], &fds); int n=select(FD_SETSIZE, &fds, 0, 0, &tv); if(n<0) throw ErrnoException("Error waiting for fork"); if (n==0) throw Exception("Timed out waiting for fork"); string error = readStr(pipeFds[0]); if (error.empty()) return readStr(pipeFds[0]); else throw Exception("Error in forked process: " + error); } // Write empty error string followed by value string to pipe. void ForkWithMessage::ready(const string& value) { // child // Write empty string for error followed by value. writeStr(pipeFds[1], string()); // No error writeStr(pipeFds[1], value); } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/posix/Fork.h0000664000076400007640000000360511043676434017726 0ustar00jrossjross00000000000000#ifndef QPID_SYS_POSIX_FORK_H #define QPID_SYS_POSIX_FORK_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include namespace qpid { namespace sys { /** * Fork the process. Call parent() in parent and child() in child. */ class Fork { public: Fork(); virtual ~Fork(); /** * Fork the process. * Calls parent() in the parent process, child() in the child. */ virtual void fork(); protected: /** Called in parent process. *@child pid of child process */ virtual void parent(pid_t child) = 0; /** Called in child process */ virtual void child() = 0; }; /** * Like Fork but also allows the child to send a string message * or throw an exception to the parent. */ class ForkWithMessage : public Fork { public: ForkWithMessage(); void fork(); protected: /** Call from parent(): wait for child to send a value or throw exception. * @timeout in seconds to wait for response. * @return value passed by child to ready(). */ std::string wait(int timeout); /** Call from child(): Send a value to the parent. *@param value returned by parent call to wait(). */ void ready(const std::string& value); private: int pipeFds[2]; }; }} // namespace qpid::sys #endif /*!QPID_SYS_POSIX_FORK_H*/ qpidc-0.16/src/qpid/sys/posix/MemStat.cpp0000664000076400007640000000244211715033215020716 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/MemStat.h" #include void qpid::sys::MemStat::loadMemInfo(qmf::org::apache::qpid::broker::Memory* object) { struct mallinfo info(mallinfo()); object->set_malloc_arena(info.arena); object->set_malloc_ordblks(info.ordblks); object->set_malloc_hblks(info.hblks); object->set_malloc_hblkhd(info.hblkhd); object->set_malloc_uordblks(info.uordblks); object->set_malloc_fordblks(info.fordblks); object->set_malloc_keepcost(info.keepcost); } qpidc-0.16/src/qpid/sys/posix/AsynchIO.cpp0000664000076400007640000005046311720775631021042 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/AsynchIO.h" #include "qpid/sys/Socket.h" #include "qpid/sys/SocketAddress.h" #include "qpid/sys/Poller.h" #include "qpid/sys/Probes.h" #include "qpid/sys/DispatchHandle.h" #include "qpid/sys/Time.h" #include "qpid/log/Statement.h" #include "qpid/sys/posix/check.h" // TODO The basic algorithm here is not really POSIX specific and with a // bit more abstraction could (should) be promoted to be platform portable #include #include #include #include #include #include #include using namespace qpid::sys; namespace { struct StaticInit { StaticInit() { /** * Make *process* not generate SIGPIPE when writing to closed * pipe/socket (necessary as default action is to terminate process) */ ::signal(SIGPIPE, SIG_IGN); }; } init; /* * We keep per thread state to avoid locking overhead. The assumption is that * on average all the connections are serviced by all the threads so the state * recorded in each thread is about the same. If this turns out not to be the * case we could rebalance the info occasionally. */ __thread int threadReadTotal = 0; __thread int threadReadCount = 0; __thread int threadWriteTotal = 0; __thread int threadWriteCount = 0; __thread int64_t threadMaxIoTimeNs = 2 * 1000000; // start at 2ms } /* * Asynch Acceptor */ namespace qpid { namespace sys { namespace posix { class AsynchAcceptor : public qpid::sys::AsynchAcceptor { public: AsynchAcceptor(const Socket& s, AsynchAcceptor::Callback callback); ~AsynchAcceptor(); void start(Poller::shared_ptr poller); private: void readable(DispatchHandle& handle); private: AsynchAcceptor::Callback acceptedCallback; DispatchHandle handle; const Socket& socket; }; AsynchAcceptor::AsynchAcceptor(const Socket& s, AsynchAcceptor::Callback callback) : acceptedCallback(callback), handle(s, boost::bind(&AsynchAcceptor::readable, this, _1), 0, 0), socket(s) { s.setNonblocking(); } AsynchAcceptor::~AsynchAcceptor() { handle.stopWatch(); } void AsynchAcceptor::start(Poller::shared_ptr poller) { handle.startWatch(poller); } /* * We keep on accepting as long as there is something to accept */ void AsynchAcceptor::readable(DispatchHandle& h) { Socket* s; do { errno = 0; // TODO: Currently we ignore the peers address, perhaps we should // log it or use it for connection acceptance. try { s = socket.accept(); if (s) { acceptedCallback(*s); } else { break; } } catch (const std::exception& e) { QPID_LOG(error, "Could not accept socket: " << e.what()); break; } } while (true); h.rewatch(); } /* * POSIX version of AsynchIO TCP socket connector. * * The class is implemented in terms of DispatchHandle to allow it to be * deleted by deleting the contained DispatchHandle. */ class AsynchConnector : public qpid::sys::AsynchConnector, private DispatchHandle { private: void connComplete(DispatchHandle& handle); private: ConnectedCallback connCallback; FailedCallback failCallback; const Socket& socket; SocketAddress sa; public: AsynchConnector(const Socket& socket, const std::string& hostname, const std::string& port, ConnectedCallback connCb, FailedCallback failCb); void start(Poller::shared_ptr poller); void stop(); }; AsynchConnector::AsynchConnector(const Socket& s, const std::string& hostname, const std::string& port, ConnectedCallback connCb, FailedCallback failCb) : DispatchHandle(s, 0, boost::bind(&AsynchConnector::connComplete, this, _1), boost::bind(&AsynchConnector::connComplete, this, _1)), connCallback(connCb), failCallback(failCb), socket(s), sa(hostname, port) { socket.setNonblocking(); // Note, not catching any exceptions here, also has effect of destructing QPID_LOG(info, "Connecting: " << sa.asString()); socket.connect(sa); } void AsynchConnector::start(Poller::shared_ptr poller) { startWatch(poller); } void AsynchConnector::stop() { stopWatch(); } void AsynchConnector::connComplete(DispatchHandle& h) { int errCode = socket.getError(); if (errCode == 0) { h.stopWatch(); connCallback(socket); } else { // Retry while we cause an immediate exception // (asynch failure will be handled by re-entering here at the top) while (sa.nextAddress()) { try { // Try next address without deleting ourselves QPID_LOG(debug, "Ignored socket connect error: " << strError(errCode)); QPID_LOG(info, "Retrying connect: " << sa.asString()); socket.connect(sa); return; } catch (const std::exception& e) { QPID_LOG(debug, "Ignored socket connect exception: " << e.what()); } errCode = socket.getError(); } h.stopWatch(); failCallback(socket, errCode, strError(errCode)); } DispatchHandle::doDelete(); } /* * POSIX version of AsynchIO reader/writer * * The class is implemented in terms of DispatchHandle to allow it to be * deleted by deleting the contained DispatchHandle. */ class AsynchIO : public qpid::sys::AsynchIO, private DispatchHandle { public: AsynchIO(const Socket& s, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb = 0, BuffersEmptyCallback eCb = 0, IdleCallback iCb = 0); // Methods inherited from qpid::sys::AsynchIO virtual void queueForDeletion(); virtual void start(Poller::shared_ptr poller); virtual void queueReadBuffer(BufferBase* buff); virtual void unread(BufferBase* buff); virtual void queueWrite(BufferBase* buff); virtual void notifyPendingWrite(); virtual void queueWriteClose(); virtual bool writeQueueEmpty(); virtual void startReading(); virtual void stopReading(); virtual void requestCallback(RequestCallback); virtual BufferBase* getQueuedBuffer(); private: ~AsynchIO(); // Methods that are callback targets from Dispatcher. void readable(DispatchHandle& handle); void writeable(DispatchHandle& handle); void disconnected(DispatchHandle& handle); void requestedCall(RequestCallback); void close(DispatchHandle& handle); private: ReadCallback readCallback; EofCallback eofCallback; DisconnectCallback disCallback; ClosedCallback closedCallback; BuffersEmptyCallback emptyCallback; IdleCallback idleCallback; const Socket& socket; std::deque bufferQueue; std::deque writeQueue; bool queuedClose; /** * This flag is used to detect and handle concurrency between * calls to notifyPendingWrite() (which can be made from any thread) and * the execution of the writeable() method (which is always on the * thread processing this handle. */ volatile bool writePending; /** * This records whether we've been reading is flow controlled: * it's safe as a simple boolean as the only way to be stopped * is in calls only allowed in the callback context, the only calls * checking it are also in calls only allowed in callback context. */ volatile bool readingStopped; }; AsynchIO::AsynchIO(const Socket& s, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb, BuffersEmptyCallback eCb, IdleCallback iCb) : DispatchHandle(s, boost::bind(&AsynchIO::readable, this, _1), boost::bind(&AsynchIO::writeable, this, _1), boost::bind(&AsynchIO::disconnected, this, _1)), readCallback(rCb), eofCallback(eofCb), disCallback(disCb), closedCallback(cCb), emptyCallback(eCb), idleCallback(iCb), socket(s), queuedClose(false), writePending(false), readingStopped(false) { s.setNonblocking(); } struct deleter { template void operator()(T *ptr){ delete ptr;} }; AsynchIO::~AsynchIO() { std::for_each( bufferQueue.begin(), bufferQueue.end(), deleter()); std::for_each( writeQueue.begin(), writeQueue.end(), deleter()); } void AsynchIO::queueForDeletion() { DispatchHandle::doDelete(); } void AsynchIO::start(Poller::shared_ptr poller) { DispatchHandle::startWatch(poller); } void AsynchIO::queueReadBuffer(BufferBase* buff) { assert(buff); buff->dataStart = 0; buff->dataCount = 0; bool queueWasEmpty = bufferQueue.empty(); bufferQueue.push_back(buff); if (queueWasEmpty && !readingStopped) DispatchHandle::rewatchRead(); } void AsynchIO::unread(BufferBase* buff) { assert(buff); buff->squish(); bool queueWasEmpty = bufferQueue.empty(); bufferQueue.push_front(buff); if (queueWasEmpty && !readingStopped) DispatchHandle::rewatchRead(); } void AsynchIO::queueWrite(BufferBase* buff) { assert(buff); // If we've already closed the socket then throw the write away if (queuedClose) { queueReadBuffer(buff); return; } else { writeQueue.push_front(buff); } writePending = false; DispatchHandle::rewatchWrite(); } // This can happen outside the callback context void AsynchIO::notifyPendingWrite() { writePending = true; DispatchHandle::rewatchWrite(); } void AsynchIO::queueWriteClose() { queuedClose = true; DispatchHandle::rewatchWrite(); } bool AsynchIO::writeQueueEmpty() { return writeQueue.empty(); } // This can happen outside the callback context void AsynchIO::startReading() { readingStopped = false; DispatchHandle::rewatchRead(); } void AsynchIO::stopReading() { readingStopped = true; DispatchHandle::unwatchRead(); } void AsynchIO::requestCallback(RequestCallback callback) { // TODO creating a function object every time isn't all that // efficient - if this becomes heavily used do something better (what?) assert(callback); DispatchHandle::call(boost::bind(&AsynchIO::requestedCall, this, callback)); } void AsynchIO::requestedCall(RequestCallback callback) { assert(callback); callback(*this); } /** Return a queued buffer if there are enough * to spare */ AsynchIO::BufferBase* AsynchIO::getQueuedBuffer() { // Always keep at least one buffer (it might have data that was "unread" in it) if (bufferQueue.size()<=1) return 0; BufferBase* buff = bufferQueue.back(); assert(buff); buff->dataStart = 0; buff->dataCount = 0; bufferQueue.pop_back(); return buff; } /* * We keep on reading as long as we have something to read, a buffer * to put it in and reading is not stopped by flow control. */ void AsynchIO::readable(DispatchHandle& h) { if (readingStopped) { // We have been flow controlled. QPID_PROBE1(asynchio_read_flowcontrolled, &h); return; } AbsTime readStartTime = AbsTime::now(); size_t total = 0; int readCalls = 0; do { // (Try to) get a buffer if (!bufferQueue.empty()) { // Read into buffer BufferBase* buff = bufferQueue.front(); assert(buff); bufferQueue.pop_front(); errno = 0; int readCount = buff->byteCount-buff->dataCount; int rc = socket.read(buff->bytes + buff->dataCount, readCount); int64_t duration = Duration(readStartTime, AbsTime::now()); ++readCalls; if (rc > 0) { buff->dataCount += rc; threadReadTotal += rc; total += rc; readCallback(*this, buff); if (readingStopped) { // We have been flow controlled. QPID_PROBE4(asynchio_read_finished_flowcontrolled, &h, duration, total, readCalls); break; } if (rc != readCount) { // If we didn't fill the read buffer then time to stop reading QPID_PROBE4(asynchio_read_finished_done, &h, duration, total, readCalls); break; } // Stop reading if we've overrun our timeslot if ( duration > threadMaxIoTimeNs) { QPID_PROBE4(asynchio_read_finished_maxtime, &h, duration, total, readCalls); break; } } else { // Put buffer back (at front so it doesn't interfere with unread buffers) bufferQueue.push_front(buff); assert(buff); QPID_PROBE5(asynchio_read_finished_error, &h, duration, total, readCalls, errno); // Eof or other side has gone away if (rc == 0 || errno == ECONNRESET) { eofCallback(*this); h.unwatchRead(); break; } else if (errno == EAGAIN) { // We have just put a buffer back so we know // we can carry on watching for reads break; } else { // Report error then just treat as a socket disconnect QPID_LOG(error, "Error reading socket: " << qpid::sys::strError(errno) << "(" << errno << ")" ); eofCallback(*this); h.unwatchRead(); break; } } } else { // Something to read but no buffer if (emptyCallback) { emptyCallback(*this); } // If we still have no buffers we can't do anything more if (bufferQueue.empty()) { h.unwatchRead(); QPID_PROBE4(asynchio_read_finished_nobuffers, &h, Duration(readStartTime, AbsTime::now()), total, readCalls); break; } } } while (true); ++threadReadCount; return; } /* * We carry on writing whilst we have data to write and we can write */ void AsynchIO::writeable(DispatchHandle& h) { AbsTime writeStartTime = AbsTime::now(); size_t total = 0; int writeCalls = 0; do { // See if we've got something to write if (!writeQueue.empty()) { // Write buffer BufferBase* buff = writeQueue.back(); writeQueue.pop_back(); errno = 0; assert(buff->dataStart+buff->dataCount <= buff->byteCount); int rc = socket.write(buff->bytes+buff->dataStart, buff->dataCount); int64_t duration = Duration(writeStartTime, AbsTime::now()); ++writeCalls; if (rc >= 0) { threadWriteTotal += rc; total += rc; // If we didn't write full buffer put rest back if (rc != buff->dataCount) { buff->dataStart += rc; buff->dataCount -= rc; writeQueue.push_back(buff); QPID_PROBE4(asynchio_write_finished_done, &h, duration, total, writeCalls); break; } // Recycle the buffer queueReadBuffer(buff); // Stop writing if we've overrun our timeslot if (duration > threadMaxIoTimeNs) { QPID_PROBE4(asynchio_write_finished_maxtime, &h, duration, total, writeCalls); break; } } else { // Put buffer back writeQueue.push_back(buff); QPID_PROBE5(asynchio_write_finished_error, &h, duration, total, writeCalls, errno); if (errno == ECONNRESET || errno == EPIPE) { // Just stop watching for write here - we'll get a // disconnect callback soon enough h.unwatchWrite(); break; } else if (errno == EAGAIN) { // We have just put a buffer back so we know // we can carry on watching for writes break; } else { // Report error then just treat as a socket disconnect QPID_LOG(error, "Error writing socket: " << qpid::sys::strError(errno) << "(" << errno << ")" ); h.unwatchWrite(); break; } } } else { int64_t duration = Duration(writeStartTime, AbsTime::now()); (void) duration; // force duration to be used if no probes are compiled // If we're waiting to close the socket then can do it now as there is nothing to write if (queuedClose) { close(h); QPID_PROBE4(asynchio_write_finished_closed, &h, duration, total, writeCalls); break; } // Fd is writable, but nothing to write if (idleCallback) { writePending = false; idleCallback(*this); } // If we still have no buffers to write we can't do anything more if (writeQueue.empty() && !writePending && !queuedClose) { h.unwatchWrite(); // The following handles the case where writePending is // set to true after the test above; in this case its // possible that the unwatchWrite overwrites the // desired rewatchWrite so we correct that here if (writePending) h.rewatchWrite(); QPID_PROBE4(asynchio_write_finished_nodata, &h, duration, total, writeCalls); break; } } } while (true); ++threadWriteCount; return; } void AsynchIO::disconnected(DispatchHandle& h) { // If we have not already queued close then call disconnected callback before closing if (!queuedClose && disCallback) disCallback(*this); close(h); } /* * Close the socket and callback to say we've done it */ void AsynchIO::close(DispatchHandle& h) { h.stopWatch(); socket.close(); if (closedCallback) { closedCallback(*this, socket); } } } // namespace posix AsynchAcceptor* AsynchAcceptor::create(const Socket& s, Callback callback) { return new posix::AsynchAcceptor(s, callback); } AsynchConnector* AsynchConnector::create(const Socket& s, const std::string& hostname, const std::string& port, ConnectedCallback connCb, FailedCallback failCb) { return new posix::AsynchConnector(s, hostname, port, connCb, failCb); } AsynchIO* AsynchIO::create(const Socket& s, AsynchIO::ReadCallback rCb, AsynchIO::EofCallback eofCb, AsynchIO::DisconnectCallback disCb, AsynchIO::ClosedCallback cCb, AsynchIO::BuffersEmptyCallback eCb, AsynchIO::IdleCallback iCb) { return new posix::AsynchIO(s, rCb, eofCb, disCb, cCb, eCb, iCb); } }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/AsynchIOHandler.h0000664000076400007640000000462111564561152020633 0ustar00jrossjross00000000000000#ifndef _sys_AsynchIOHandler_h #define _sys_AsynchIOHandler_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/OutputControl.h" #include "qpid/sys/ConnectionCodec.h" #include "qpid/sys/AtomicValue.h" #include "qpid/sys/Mutex.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class ProtocolInitiation; } namespace sys { class AsynchIO; struct AsynchIOBufferBase; class Socket; class AsynchIOHandler : public OutputControl { std::string identifier; AsynchIO* aio; ConnectionCodec::Factory* factory; ConnectionCodec* codec; bool readError; bool isClient; AtomicValue readCredit; static const int32_t InfiniteCredit = -1; Mutex creditLock; void write(const framing::ProtocolInitiation&); public: QPID_COMMON_EXTERN AsynchIOHandler(std::string id, ConnectionCodec::Factory* f); QPID_COMMON_EXTERN ~AsynchIOHandler(); QPID_COMMON_EXTERN void init(AsynchIO* a, int numBuffs); QPID_COMMON_INLINE_EXTERN void setClient() { isClient = true; } // Output side QPID_COMMON_EXTERN void abort(); QPID_COMMON_EXTERN void activateOutput(); QPID_COMMON_EXTERN void giveReadCredit(int32_t credit); // Input side QPID_COMMON_EXTERN void readbuff(AsynchIO& aio, AsynchIOBufferBase* buff); QPID_COMMON_EXTERN void eof(AsynchIO& aio); QPID_COMMON_EXTERN void disconnect(AsynchIO& aio); // Notifications QPID_COMMON_EXTERN void nobuffs(AsynchIO& aio); QPID_COMMON_EXTERN void idle(AsynchIO& aio); QPID_COMMON_EXTERN void closedSocket(AsynchIO& aio, const Socket& s); }; }} // namespace qpid::sys #endif // _sys_AsynchIOHandler_h qpidc-0.16/src/qpid/sys/OutputControl.h0000664000076400007640000000221711227113407020510 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #ifndef _OutputControl_ #define _OutputControl_ namespace qpid { namespace sys { class OutputControl { public: virtual ~OutputControl() {} virtual void abort() = 0; virtual void activateOutput() = 0; virtual void giveReadCredit(int32_t credit) = 0; }; } } #endif qpidc-0.16/src/qpid/sys/ConnectionCodec.h0000664000076400007640000000367311344233212020710 0ustar00jrossjross00000000000000#ifndef QPID_SYS_CONNECTION_CODEC_H #define QPID_SYS_CONNECTION_CODEC_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Codec.h" #include "qpid/framing/ProtocolVersion.h" namespace qpid { namespace sys { class InputHandlerFactory; class OutputControl; struct SecuritySettings; /** * Interface of coder/decoder for a connection of a specific protocol * version. */ class ConnectionCodec : public Codec { public: virtual ~ConnectionCodec() {} /** Network connection was closed from other end. */ virtual void closed() = 0; virtual bool isClosed() const = 0; virtual framing::ProtocolVersion getVersion() const = 0; struct Factory { virtual ~Factory() {} /** Return 0 if version unknown */ virtual ConnectionCodec* create( framing::ProtocolVersion, OutputControl&, const std::string& id, const SecuritySettings& ) = 0; /** Return "preferred" codec for outbound connections. */ virtual ConnectionCodec* create( OutputControl&, const std::string& id, const SecuritySettings& ) = 0; }; }; }} // namespace qpid::sys #endif /*!QPID_SYS_CONNECTION_CODEC_H*/ qpidc-0.16/src/qpid/sys/ShutdownHandler.h0000664000076400007640000000200310533734621020757 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ShutdownHandler_ #define _ShutdownHandler_ namespace qpid { namespace sys { class ShutdownHandler { public: virtual void shutdown() = 0; virtual ~ShutdownHandler(){} }; } } #endif qpidc-0.16/src/qpid/sys/ssl/0000775000076400007640000000000011752725716016314 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/sys/ssl/SslHandler.h0000664000076400007640000000403011562043261020504 0ustar00jrossjross00000000000000#ifndef QPID_SYS_SSL_SSLHANDLER_H #define QPID_SYS_SSL_SSLHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ConnectionCodec.h" #include "qpid/sys/OutputControl.h" namespace qpid { namespace framing { class ProtocolInitiation; } namespace sys { namespace ssl { class SslIO; struct SslIOBufferBase; class SslSocket; class SslHandler : public OutputControl { std::string identifier; SslIO* aio; ConnectionCodec::Factory* factory; ConnectionCodec* codec; bool readError; bool isClient; bool nodict; void write(const framing::ProtocolInitiation&); qpid::sys::SecuritySettings getSecuritySettings(SslIO* aio); public: SslHandler(std::string id, ConnectionCodec::Factory* f, bool nodict); ~SslHandler(); void init(SslIO* a, int numBuffs); void setClient() { isClient = true; } // Output side void abort(); void activateOutput(); void giveReadCredit(int32_t); // Input side void readbuff(SslIO& aio, SslIOBufferBase* buff); void eof(SslIO& aio); void disconnect(SslIO& aio); // Notifications void nobuffs(SslIO& aio); void idle(SslIO& aio); void closedSocket(SslIO& aio, const SslSocket& s); }; }}} // namespace qpid::sys::ssl #endif /*!QPID_SYS_SSL_SSLHANDLER_H*/ qpidc-0.16/src/qpid/sys/ssl/check.cpp0000664000076400007640000000713511412434765020075 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ssl/check.h" #include #include #include using boost::format; using boost::str; namespace qpid { namespace sys { namespace ssl { ErrorString::ErrorString() : code(PR_GetError()), buffer(new char[PR_GetErrorTextLength()]), used(PR_GetErrorText(buffer)) {} ErrorString::~ErrorString() { delete[] buffer; } std::string ErrorString::getString() const { std::string msg = std::string(buffer, used); if (!used) { //seems most of the NSPR/NSS errors don't have text set for //them, add a few specific ones in here. (TODO: more complete //list?): return getErrorString(code); } else { return str(format("%1% [%2%]") % msg % code); } } std::string getErrorString(int code) { std::string msg; switch (code) { case SSL_ERROR_EXPORT_ONLY_SERVER: msg = "Unable to communicate securely. Peer does not support high-grade encryption."; break; case SSL_ERROR_US_ONLY_SERVER: msg = "Unable to communicate securely. Peer requires high-grade encryption which is not supported."; break; case SSL_ERROR_NO_CYPHER_OVERLAP: msg = "Cannot communicate securely with peer: no common encryption algorithm(s)."; break; case SSL_ERROR_NO_CERTIFICATE: msg = "Unable to find the certificate or key necessary for authentication."; break; case SSL_ERROR_BAD_CERTIFICATE: msg = "Unable to communicate securely with peer: peers's certificate was rejected."; break; case SSL_ERROR_UNSUPPORTED_CERTIFICATE_TYPE: msg = "Unsupported certificate type."; break; case SSL_ERROR_WRONG_CERTIFICATE: msg = "Client authentication failed: private key in key database does not correspond to public key in certificate database."; break; case SSL_ERROR_BAD_CERT_DOMAIN: msg = "Unable to communicate securely with peer: requested domain name does not match the server's certificate."; break; case SSL_ERROR_BAD_CERT_ALERT: msg = "SSL peer cannot verify your certificate."; break; case SSL_ERROR_REVOKED_CERT_ALERT: msg = "SSL peer rejected your certificate as revoked."; break; case SSL_ERROR_EXPIRED_CERT_ALERT: msg = "SSL peer rejected your certificate as expired."; break; case PR_DIRECTORY_LOOKUP_ERROR: msg = "A directory lookup on a network address has failed"; break; case PR_CONNECT_RESET_ERROR: msg = "TCP connection reset by peer"; break; case PR_END_OF_FILE_ERROR: msg = "Encountered end of file"; break; case SEC_ERROR_EXPIRED_CERTIFICATE: msg = "Peer's certificate has expired"; break; default: msg = (code < -6000) ? "NSS error" : "NSPR error"; break; } return str(format("%1% [%2%]") % msg % code); } std::ostream& operator<<(std::ostream& out, const ErrorString& err) { out << err.getString(); return out; } }}} // namespace qpid::sys::ssl qpidc-0.16/src/qpid/sys/ssl/SslIo.h0000664000076400007640000001225711650074462017515 0ustar00jrossjross00000000000000#ifndef _sys_ssl_SslIO #define _sys_ssl_SslIO /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/DispatchHandle.h" #include "qpid/sys/SecuritySettings.h" #include #include namespace qpid { namespace sys { class Socket; namespace ssl { class SslSocket; /* * Asynchronous ssl acceptor: accepts connections then does a callback * with the accepted fd */ template class SslAcceptorTmpl { public: typedef boost::function1 Callback; private: Callback acceptedCallback; qpid::sys::DispatchHandle handle; const T& socket; public: SslAcceptorTmpl(const T& s, Callback callback); ~SslAcceptorTmpl(); void start(qpid::sys::Poller::shared_ptr poller); private: void readable(qpid::sys::DispatchHandle& handle); }; /* * Asynchronous ssl connector: starts the process of initiating a * connection and invokes a callback when completed or failed. */ class SslConnector : private qpid::sys::DispatchHandle { public: typedef boost::function1 ConnectedCallback; typedef boost::function2 FailedCallback; private: ConnectedCallback connCallback; FailedCallback failCallback; const SslSocket& socket; public: SslConnector(const SslSocket& socket, Poller::shared_ptr poller, std::string hostname, std::string port, ConnectedCallback connCb, FailedCallback failCb = 0); private: void connComplete(DispatchHandle& handle); void failure(int, std::string); }; struct SslIOBufferBase { char* const bytes; const int32_t byteCount; int32_t dataStart; int32_t dataCount; SslIOBufferBase(char* const b, const int32_t s) : bytes(b), byteCount(s), dataStart(0), dataCount(0) {} virtual ~SslIOBufferBase() {} }; /* * Asychronous reader/writer: * Reader accepts buffers to read into; reads into the provided buffers * and then does a callback with the buffer and amount read. Optionally it can callback * when there is something to read but no buffer to read it into. * * Writer accepts a buffer and queues it for writing; can also be given * a callback for when writing is "idle" (ie fd is writable, but nothing to write) * * The class is implemented in terms of DispatchHandle to allow it to be deleted by deleting * the contained DispatchHandle */ class SslIO : private qpid::sys::DispatchHandle { public: typedef SslIOBufferBase BufferBase; typedef boost::function2 ReadCallback; typedef boost::function1 EofCallback; typedef boost::function1 DisconnectCallback; typedef boost::function2 ClosedCallback; typedef boost::function1 BuffersEmptyCallback; typedef boost::function1 IdleCallback; private: ReadCallback readCallback; EofCallback eofCallback; DisconnectCallback disCallback; ClosedCallback closedCallback; BuffersEmptyCallback emptyCallback; IdleCallback idleCallback; const SslSocket& socket; std::deque bufferQueue; std::deque writeQueue; bool queuedClose; /** * This flag is used to detect and handle concurrency between * calls to notifyPendingWrite() (which can be made from any thread) and * the execution of the writeable() method (which is always on the * thread processing this handle. */ volatile bool writePending; public: SslIO(const SslSocket& s, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb = 0, BuffersEmptyCallback eCb = 0, IdleCallback iCb = 0); void queueForDeletion(); void start(qpid::sys::Poller::shared_ptr poller); void queueReadBuffer(BufferBase* buff); void unread(BufferBase* buff); void queueWrite(BufferBase* buff); void notifyPendingWrite(); void queueWriteClose(); bool writeQueueEmpty() { return writeQueue.empty(); } BufferBase* getQueuedBuffer(); qpid::sys::SecuritySettings getSecuritySettings(); private: ~SslIO(); void readable(qpid::sys::DispatchHandle& handle); void writeable(qpid::sys::DispatchHandle& handle); void disconnected(qpid::sys::DispatchHandle& handle); void close(qpid::sys::DispatchHandle& handle); }; }}} #endif // _sys_ssl_SslIO qpidc-0.16/src/qpid/sys/ssl/check.h0000664000076400007640000000314611366051750017535 0ustar00jrossjross00000000000000#ifndef QPID_SYS_SSL_CHECK_H #define QPID_SYS_SSL_CHECK_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Msg.h" #include #include #include #include namespace qpid { namespace sys { namespace ssl { std::string getErrorString(int code); class ErrorString { public: ErrorString(); ~ErrorString(); std::string getString() const; private: const int code; char* const buffer; const size_t used; }; std::ostream& operator<<(std::ostream& out, const ErrorString& err); }}} // namespace qpid::sys::ssl #define NSS_CHECK(value) if (value != SECSuccess) { throw Exception(QPID_MSG("Failed: " << qpid::sys::ssl::ErrorString())); } #define PR_CHECK(value) if (value != PR_SUCCESS) { throw Exception(QPID_MSG("Failed: " << qpid::sys::ssl::ErrorString())); } #endif /*!QPID_SYS_SSL_CHECK_H*/ qpidc-0.16/src/qpid/sys/ssl/SslSocket.cpp0000664000076400007640000002722111650074462020726 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ssl/SslSocket.h" #include "qpid/sys/ssl/check.h" #include "qpid/sys/ssl/util.h" #include "qpid/Exception.h" #include "qpid/sys/posix/check.h" #include "qpid/sys/posix/PrivatePosix.h" #include "qpid/log/Statement.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace qpid { namespace sys { namespace ssl { namespace { std::string getService(int fd, bool local) { ::sockaddr_storage name; // big enough for any socket address ::socklen_t namelen = sizeof(name); int result = -1; if (local) { result = ::getsockname(fd, (::sockaddr*)&name, &namelen); } else { result = ::getpeername(fd, (::sockaddr*)&name, &namelen); } QPID_POSIX_CHECK(result); char servName[NI_MAXSERV]; if (int rc=::getnameinfo((::sockaddr*)&name, namelen, 0, 0, servName, sizeof(servName), NI_NUMERICHOST | NI_NUMERICSERV) != 0) throw QPID_POSIX_ERROR(rc); return servName; } const std::string DOMAIN_SEPARATOR("@"); const std::string DC_SEPARATOR("."); const std::string DC("DC"); const std::string DN_DELIMS(" ,="); std::string getDomainFromSubject(std::string subject) { std::string::size_type last = subject.find_first_not_of(DN_DELIMS, 0); std::string::size_type i = subject.find_first_of(DN_DELIMS, last); std::string domain; bool nextTokenIsDC = false; while (std::string::npos != i || std::string::npos != last) { std::string token = subject.substr(last, i - last); if (nextTokenIsDC) { if (domain.size()) domain += DC_SEPARATOR; domain += token; nextTokenIsDC = false; } else if (token == DC) { nextTokenIsDC = true; } last = subject.find_first_not_of(DN_DELIMS, i); i = subject.find_first_of(DN_DELIMS, last); } return domain; } } SslSocket::SslSocket() : socket(0), prototype(0) { impl->fd = ::socket (PF_INET, SOCK_STREAM, 0); if (impl->fd < 0) throw QPID_POSIX_ERROR(errno); socket = SSL_ImportFD(0, PR_ImportTCPSocket(impl->fd)); } /** * This form of the constructor is used with the server-side sockets * returned from accept. Because we use posix accept rather than * PR_Accept, we have to reset the handshake. */ SslSocket::SslSocket(IOHandlePrivate* ioph, PRFileDesc* model) : Socket(ioph), socket(0), prototype(0) { socket = SSL_ImportFD(model, PR_ImportTCPSocket(impl->fd)); NSS_CHECK(SSL_ResetHandshake(socket, true)); } void SslSocket::setNonblocking() const { PRSocketOptionData option; option.option = PR_SockOpt_Nonblocking; option.value.non_blocking = true; PR_SetSocketOption(socket, &option); } void SslSocket::connect(const std::string& host, const std::string& port) const { std::stringstream namestream; namestream << host << ":" << port; connectname = namestream.str(); void* arg; // Use the connection's cert-name if it has one; else use global cert-name if (certname != "") { arg = const_cast(certname.c_str()); } else if (SslOptions::global.certName.empty()) { arg = 0; } else { arg = const_cast(SslOptions::global.certName.c_str()); } NSS_CHECK(SSL_GetClientAuthDataHook(socket, NSS_GetClientAuthData, arg)); NSS_CHECK(SSL_SetURL(socket, host.data())); char hostBuffer[PR_NETDB_BUF_SIZE]; PRHostEnt hostEntry; PR_CHECK(PR_GetHostByName(host.data(), hostBuffer, PR_NETDB_BUF_SIZE, &hostEntry)); PRNetAddr address; int value = PR_EnumerateHostEnt(0, &hostEntry, boost::lexical_cast(port), &address); if (value < 0) { throw Exception(QPID_MSG("Error getting address for host: " << ErrorString())); } else if (value == 0) { throw Exception(QPID_MSG("Could not resolve address for host.")); } PR_CHECK(PR_Connect(socket, &address, PR_INTERVAL_NO_TIMEOUT)); NSS_CHECK(SSL_ForceHandshake(socket)); } void SslSocket::close() const { if (impl->fd > 0) { PR_Close(socket); impl->fd = -1; } } int SslSocket::listen(uint16_t port, int backlog, const std::string& certName, bool clientAuth) const { //configure prototype socket: prototype = SSL_ImportFD(0, PR_NewTCPSocket()); if (clientAuth) { NSS_CHECK(SSL_OptionSet(prototype, SSL_REQUEST_CERTIFICATE, PR_TRUE)); NSS_CHECK(SSL_OptionSet(prototype, SSL_REQUIRE_CERTIFICATE, PR_TRUE)); } //get certificate and key (is this the correct way?) CERTCertificate *cert = PK11_FindCertFromNickname(const_cast(certName.c_str()), 0); if (!cert) throw Exception(QPID_MSG("Failed to load certificate '" << certName << "'")); SECKEYPrivateKey *key = PK11_FindKeyByAnyCert(cert, 0); if (!key) throw Exception(QPID_MSG("Failed to retrieve private key from certificate")); NSS_CHECK(SSL_ConfigSecureServer(prototype, cert, key, NSS_FindCertKEAType(cert))); SECKEY_DestroyPrivateKey(key); CERT_DestroyCertificate(cert); //bind and listen const int& socket = impl->fd; int yes=1; QPID_POSIX_CHECK(setsockopt(socket,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(yes))); struct sockaddr_in name; name.sin_family = AF_INET; name.sin_port = htons(port); name.sin_addr.s_addr = 0; if (::bind(socket, (struct sockaddr*)&name, sizeof(name)) < 0) throw Exception(QPID_MSG("Can't bind to port " << port << ": " << strError(errno))); if (::listen(socket, backlog) < 0) throw Exception(QPID_MSG("Can't listen on port " << port << ": " << strError(errno))); socklen_t namelen = sizeof(name); if (::getsockname(socket, (struct sockaddr*)&name, &namelen) < 0) throw QPID_POSIX_ERROR(errno); return ntohs(name.sin_port); } SslSocket* SslSocket::accept() const { QPID_LOG(trace, "Accepting SSL connection."); int afd = ::accept(impl->fd, 0, 0); if ( afd >= 0) { return new SslSocket(new IOHandlePrivate(afd), prototype); } else if (errno == EAGAIN) { return 0; } else { throw QPID_POSIX_ERROR(errno); } } #define SSL_STREAM_MAX_WAIT_ms 20 #define SSL_STREAM_MAX_RETRIES 2 static bool isSslStream(int afd) { int retries = SSL_STREAM_MAX_RETRIES; unsigned char buf[5] = {}; do { struct pollfd fd = {afd, POLLIN, 0}; /* * Note that this is blocking the accept thread, so connections that * send no data can limit the rate at which we can accept new * connections. */ if (::poll(&fd, 1, SSL_STREAM_MAX_WAIT_ms) > 0) { errno = 0; int result = recv(afd, buf, sizeof(buf), MSG_PEEK | MSG_DONTWAIT); if (result == sizeof(buf)) { break; } if (errno && errno != EAGAIN) { int err = errno; ::close(afd); throw QPID_POSIX_ERROR(err); } } } while (retries-- > 0); if (retries < 0) { return false; } /* * SSLv2 Client Hello format * http://www.mozilla.org/projects/security/pki/nss/ssl/draft02.html * * Bytes 0-1: RECORD-LENGTH * Byte 2: MSG-CLIENT-HELLO (1) * Byte 3: CLIENT-VERSION-MSB * Byte 4: CLIENT-VERSION-LSB * * Allowed versions: * 2.0 - SSLv2 * 3.0 - SSLv3 * 3.1 - TLS 1.0 * 3.2 - TLS 1.1 * 3.3 - TLS 1.2 * * The version sent in the Client-Hello is the latest version supported by * the client. NSS may send version 3.x in an SSLv2 header for * maximum compatibility. */ bool isSSL2Handshake = buf[2] == 1 && // MSG-CLIENT-HELLO ((buf[3] == 3 && buf[4] <= 3) || // SSL 3.0 & TLS 1.0-1.2 (v3.1-3.3) (buf[3] == 2 && buf[4] == 0)); // SSL 2 /* * SSLv3/TLS Client Hello format * RFC 2246 * * Byte 0: ContentType (handshake - 22) * Bytes 1-2: ProtocolVersion {major, minor} * * Allowed versions: * 3.0 - SSLv3 * 3.1 - TLS 1.0 * 3.2 - TLS 1.1 * 3.3 - TLS 1.2 */ bool isSSL3Handshake = buf[0] == 22 && // handshake (buf[1] == 3 && buf[2] <= 3); // SSL 3.0 & TLS 1.0-1.2 (v3.1-3.3) return isSSL2Handshake || isSSL3Handshake; } Socket* SslMuxSocket::accept() const { int afd = ::accept(impl->fd, 0, 0); if (afd >= 0) { QPID_LOG(trace, "Accepting connection with optional SSL wrapper."); if (isSslStream(afd)) { QPID_LOG(trace, "Accepted SSL connection."); return new SslSocket(new IOHandlePrivate(afd), prototype); } else { QPID_LOG(trace, "Accepted Plaintext connection."); return new Socket(new IOHandlePrivate(afd)); } } else if (errno == EAGAIN) { return 0; } else { throw QPID_POSIX_ERROR(errno); } } int SslSocket::read(void *buf, size_t count) const { return PR_Read(socket, buf, count); } int SslSocket::write(const void *buf, size_t count) const { return PR_Write(socket, buf, count); } uint16_t SslSocket::getLocalPort() const { return std::atoi(getService(impl->fd, true).c_str()); } uint16_t SslSocket::getRemotePort() const { return atoi(getService(impl->fd, true).c_str()); } void SslSocket::setTcpNoDelay(bool nodelay) const { if (nodelay) { PRSocketOptionData option; option.option = PR_SockOpt_NoDelay; option.value.no_delay = true; PR_SetSocketOption(socket, &option); } } void SslSocket::setCertName(const std::string& name) { certname = name; } /** get the bit length of the current cipher's key */ int SslSocket::getKeyLen() const { int enabled = 0; int keySize = 0; SECStatus rc; rc = SSL_SecurityStatus( socket, &enabled, NULL, NULL, &keySize, NULL, NULL ); if (rc == SECSuccess && enabled) { return keySize; } return 0; } std::string SslSocket::getClientAuthId() const { std::string authId; CERTCertificate* cert = SSL_PeerCertificate(socket); if (cert) { authId = CERT_GetCommonName(&(cert->subject)); /* * The NSS function CERT_GetDomainComponentName only returns * the last component of the domain name, so we have to parse * the subject manually to extract the full domain. */ std::string domain = getDomainFromSubject(cert->subjectName); if (!domain.empty()) { authId += DOMAIN_SEPARATOR; authId += domain; } CERT_DestroyCertificate(cert); } return authId; } }}} // namespace qpid::sys::ssl qpidc-0.16/src/qpid/sys/ssl/util.cpp0000664000076400007640000000702011372266076017771 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ssl/util.h" #include "qpid/sys/ssl/check.h" #include "qpid/Exception.h" #include "qpid/sys/SystemInfo.h" #include #include #include #include #include #include #include #include #include namespace qpid { namespace sys { namespace ssl { static const std::string LOCALHOST("127.0.0.1"); std::string defaultCertName() { Address address; if (SystemInfo::getLocalHostname(address)) { return address.host; } else { return LOCALHOST; } } SslOptions::SslOptions() : qpid::Options("SSL Settings"), certName(defaultCertName()), exportPolicy(false) { addOptions() ("ssl-use-export-policy", optValue(exportPolicy), "Use NSS export policy") ("ssl-cert-password-file", optValue(certPasswordFile, "PATH"), "File containing password to use for accessing certificate database") ("ssl-cert-db", optValue(certDbPath, "PATH"), "Path to directory containing certificate database") ("ssl-cert-name", optValue(certName, "NAME"), "Name of the certificate to use"); } SslOptions& SslOptions::operator=(const SslOptions& o) { certDbPath = o.certDbPath; certName = o.certName; certPasswordFile = o.certPasswordFile; exportPolicy = o.exportPolicy; return *this; } char* promptForPassword(PK11SlotInfo*, PRBool retry, void*) { if (retry) return 0; //TODO: something else? return PL_strdup(getpass("Please enter the password for accessing the certificate database:")); } SslOptions SslOptions::global; char* readPasswordFromFile(PK11SlotInfo*, PRBool retry, void*) { const std::string& passwordFile = SslOptions::global.certPasswordFile; if (retry || passwordFile.empty() || !boost::filesystem::exists(passwordFile)) { return 0; } else { std::ifstream file(passwordFile.c_str()); std::string password; file >> password; return PL_strdup(password.c_str()); } } void initNSS(const SslOptions& options, bool server) { SslOptions::global = options; if (options.certPasswordFile.empty()) { PK11_SetPasswordFunc(promptForPassword); } else { PK11_SetPasswordFunc(readPasswordFromFile); } NSS_CHECK(NSS_Init(options.certDbPath.c_str())); if (options.exportPolicy) { NSS_CHECK(NSS_SetExportPolicy()); } else { NSS_CHECK(NSS_SetDomesticPolicy()); } if (server) { //use defaults for all args, TODO: may want to make this configurable SSL_ConfigServerSessionIDCache(0, 0, 0, 0); } } void shutdownNSS() { NSS_Shutdown(); } }}} // namespace qpid::sys::ssl qpidc-0.16/src/qpid/sys/ssl/SslHandler.cpp0000664000076400007640000001340311653514043021045 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ssl/SslHandler.h" #include "qpid/sys/ssl/SslIo.h" #include "qpid/sys/ssl/SslSocket.h" #include "qpid/framing/AMQP_HighestVersion.h" #include "qpid/framing/ProtocolInitiation.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace sys { namespace ssl { // Buffer definition struct Buff : public SslIO::BufferBase { Buff() : SslIO::BufferBase(new char[65536], 65536) {} ~Buff() { delete [] bytes;} }; SslHandler::SslHandler(std::string id, ConnectionCodec::Factory* f, bool _nodict) : identifier(id), aio(0), factory(f), codec(0), readError(false), isClient(false), nodict(_nodict) {} SslHandler::~SslHandler() { if (codec) codec->closed(); delete codec; } void SslHandler::init(SslIO* a, int numBuffs) { aio = a; // Give connection some buffers to use for (int i = 0; i < numBuffs; i++) { aio->queueReadBuffer(new Buff); } } void SslHandler::write(const framing::ProtocolInitiation& data) { QPID_LOG(debug, "SENT [" << identifier << "]: INIT(" << data << ")"); SslIO::BufferBase* buff = aio->getQueuedBuffer(); if (!buff) buff = new Buff; framing::Buffer out(buff->bytes, buff->byteCount); data.encode(out); buff->dataCount = data.encodedSize(); aio->queueWrite(buff); } void SslHandler::abort() { // TODO: can't implement currently as underlying functionality not implemented // aio->requestCallback(boost::bind(&SslHandler::eof, this, _1)); } void SslHandler::activateOutput() { aio->notifyPendingWrite(); } void SslHandler::giveReadCredit(int32_t) { // FIXME aconway 2008-12-05: not yet implemented. } // Input side void SslHandler::readbuff(SslIO& , SslIO::BufferBase* buff) { if (readError) { return; } size_t decoded = 0; if (codec) { // Already initiated try { decoded = codec->decode(buff->bytes+buff->dataStart, buff->dataCount); }catch(const std::exception& e){ QPID_LOG(error, e.what()); readError = true; aio->queueWriteClose(); } }else{ framing::Buffer in(buff->bytes+buff->dataStart, buff->dataCount); framing::ProtocolInitiation protocolInit; if (protocolInit.decode(in)) { decoded = in.getPosition(); QPID_LOG(debug, "RECV [" << identifier << "]: INIT(" << protocolInit << ")"); try { codec = factory->create(protocolInit.getVersion(), *this, identifier, getSecuritySettings(aio)); if (!codec) { //TODO: may still want to revise this... //send valid version header & close connection. write(framing::ProtocolInitiation(framing::highestProtocolVersion)); readError = true; aio->queueWriteClose(); } } catch (const std::exception& e) { QPID_LOG(error, e.what()); readError = true; aio->queueWriteClose(); } } } // TODO: unreading needs to go away, and when we can cope // with multiple sub-buffers in the general buffer scheme, it will if (decoded != size_t(buff->dataCount)) { // Adjust buffer for used bytes and then "unread them" buff->dataStart += decoded; buff->dataCount -= decoded; aio->unread(buff); } else { // Give whole buffer back to aio subsystem aio->queueReadBuffer(buff); } } void SslHandler::eof(SslIO&) { QPID_LOG(debug, "DISCONNECTED [" << identifier << "]"); if (codec) codec->closed(); aio->queueWriteClose(); } void SslHandler::closedSocket(SslIO&, const SslSocket& s) { // If we closed with data still to send log a warning if (!aio->writeQueueEmpty()) { QPID_LOG(warning, "CLOSING [" << identifier << "] unsent data (probably due to client disconnect)"); } delete &s; aio->queueForDeletion(); delete this; } void SslHandler::disconnect(SslIO& a) { // treat the same as eof eof(a); } // Notifications void SslHandler::nobuffs(SslIO&) { } void SslHandler::idle(SslIO&){ if (isClient && codec == 0) { codec = factory->create(*this, identifier, getSecuritySettings(aio)); write(framing::ProtocolInitiation(codec->getVersion())); return; } if (codec == 0) return; if (codec->canEncode()) { // Try and get a queued buffer if not then construct new one SslIO::BufferBase* buff = aio->getQueuedBuffer(); if (!buff) buff = new Buff; size_t encoded=codec->encode(buff->bytes, buff->byteCount); buff->dataCount = encoded; aio->queueWrite(buff); } if (codec->isClosed()) aio->queueWriteClose(); } SecuritySettings SslHandler::getSecuritySettings(SslIO* aio) { SecuritySettings settings = aio->getSecuritySettings(); settings.nodict = nodict; return settings; } }}} // namespace qpid::sys::ssl qpidc-0.16/src/qpid/sys/ssl/SslIo.cpp0000664000076400007640000003201611657243760020051 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ssl/SslIo.h" #include "qpid/sys/ssl/SslSocket.h" #include "qpid/sys/ssl/check.h" #include "qpid/sys/Time.h" #include "qpid/sys/posix/check.h" #include "qpid/log/Statement.h" // TODO The basic algorithm here is not really POSIX specific and with a bit more abstraction // could (should) be promoted to be platform portable #include #include #include #include #include #include using namespace qpid::sys; using namespace qpid::sys::ssl; namespace { /* * Make *process* not generate SIGPIPE when writing to closed * pipe/socket (necessary as default action is to terminate process) */ void ignoreSigpipe() { ::signal(SIGPIPE, SIG_IGN); } /* * We keep per thread state to avoid locking overhead. The assumption is that * on average all the connections are serviced by all the threads so the state * recorded in each thread is about the same. If this turns out not to be the * case we could rebalance the info occasionally. */ __thread int threadReadTotal = 0; __thread int threadReadCount = 0; __thread int threadWriteTotal = 0; __thread int threadWriteCount = 0; __thread int64_t threadMaxIoTimeNs = 2 * 1000000; // start at 2ms } /* * Asynch Acceptor */ template SslAcceptorTmpl::SslAcceptorTmpl(const T& s, Callback callback) : acceptedCallback(callback), handle(s, boost::bind(&SslAcceptorTmpl::readable, this, _1), 0, 0), socket(s) { s.setNonblocking(); ignoreSigpipe(); } template SslAcceptorTmpl::~SslAcceptorTmpl() { handle.stopWatch(); } template void SslAcceptorTmpl::start(Poller::shared_ptr poller) { handle.startWatch(poller); } /* * We keep on accepting as long as there is something to accept */ template void SslAcceptorTmpl::readable(DispatchHandle& h) { Socket* s; do { errno = 0; // TODO: Currently we ignore the peers address, perhaps we should // log it or use it for connection acceptance. try { s = socket.accept(); if (s) { acceptedCallback(*s); } else { break; } } catch (const std::exception& e) { QPID_LOG(error, "Could not accept socket: " << e.what()); } } while (true); h.rewatch(); } // Explicitly instantiate the templates we need template class SslAcceptorTmpl; template class SslAcceptorTmpl; /* * Asynch Connector */ SslConnector::SslConnector(const SslSocket& s, Poller::shared_ptr poller, std::string hostname, std::string port, ConnectedCallback connCb, FailedCallback failCb) : DispatchHandle(s, 0, boost::bind(&SslConnector::connComplete, this, _1), boost::bind(&SslConnector::connComplete, this, _1)), connCallback(connCb), failCallback(failCb), socket(s) { //TODO: would be better for connect to be performed on a //non-blocking socket, but that doesn't work at present so connect //blocks until complete try { socket.connect(hostname, port); socket.setNonblocking(); startWatch(poller); } catch(std::exception& e) { failure(-1, std::string(e.what())); } } void SslConnector::connComplete(DispatchHandle& h) { int errCode = socket.getError(); h.stopWatch(); if (errCode == 0) { connCallback(socket); DispatchHandle::doDelete(); } else { // TODO: This need to be fixed as strerror isn't thread safe failure(errCode, std::string(::strerror(errCode))); } } void SslConnector::failure(int errCode, std::string message) { if (failCallback) failCallback(errCode, message); socket.close(); delete &socket; DispatchHandle::doDelete(); } /* * Asynch reader/writer */ SslIO::SslIO(const SslSocket& s, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb, BuffersEmptyCallback eCb, IdleCallback iCb) : DispatchHandle(s, boost::bind(&SslIO::readable, this, _1), boost::bind(&SslIO::writeable, this, _1), boost::bind(&SslIO::disconnected, this, _1)), readCallback(rCb), eofCallback(eofCb), disCallback(disCb), closedCallback(cCb), emptyCallback(eCb), idleCallback(iCb), socket(s), queuedClose(false), writePending(false) { s.setNonblocking(); } struct deleter { template void operator()(T *ptr){ delete ptr;} }; SslIO::~SslIO() { std::for_each( bufferQueue.begin(), bufferQueue.end(), deleter()); std::for_each( writeQueue.begin(), writeQueue.end(), deleter()); } void SslIO::queueForDeletion() { DispatchHandle::doDelete(); } void SslIO::start(Poller::shared_ptr poller) { DispatchHandle::startWatch(poller); } void SslIO::queueReadBuffer(BufferBase* buff) { assert(buff); buff->dataStart = 0; buff->dataCount = 0; bufferQueue.push_back(buff); DispatchHandle::rewatchRead(); } void SslIO::unread(BufferBase* buff) { assert(buff); if (buff->dataStart != 0) { memmove(buff->bytes, buff->bytes+buff->dataStart, buff->dataCount); buff->dataStart = 0; } bufferQueue.push_front(buff); DispatchHandle::rewatchRead(); } void SslIO::queueWrite(BufferBase* buff) { assert(buff); // If we've already closed the socket then throw the write away if (queuedClose) { bufferQueue.push_front(buff); return; } else { writeQueue.push_front(buff); } writePending = false; DispatchHandle::rewatchWrite(); } void SslIO::notifyPendingWrite() { writePending = true; DispatchHandle::rewatchWrite(); } void SslIO::queueWriteClose() { queuedClose = true; DispatchHandle::rewatchWrite(); } /** Return a queued buffer if there are enough * to spare */ SslIO::BufferBase* SslIO::getQueuedBuffer() { // Always keep at least one buffer (it might have data that was "unread" in it) if (bufferQueue.size()<=1) return 0; BufferBase* buff = bufferQueue.back(); assert(buff); buff->dataStart = 0; buff->dataCount = 0; bufferQueue.pop_back(); return buff; } /* * We keep on reading as long as we have something to read and a buffer to put * it in */ void SslIO::readable(DispatchHandle& h) { AbsTime readStartTime = AbsTime::now(); do { // (Try to) get a buffer if (!bufferQueue.empty()) { // Read into buffer BufferBase* buff = bufferQueue.front(); assert(buff); bufferQueue.pop_front(); errno = 0; int readCount = buff->byteCount-buff->dataCount; int rc = socket.read(buff->bytes + buff->dataCount, readCount); if (rc > 0) { buff->dataCount += rc; threadReadTotal += rc; readCallback(*this, buff); if (rc != readCount) { // If we didn't fill the read buffer then time to stop reading break; } // Stop reading if we've overrun our timeslot if (Duration(readStartTime, AbsTime::now()) > threadMaxIoTimeNs) { break; } } else { // Put buffer back (at front so it doesn't interfere with unread buffers) bufferQueue.push_front(buff); assert(buff); // Eof or other side has gone away if (rc == 0 || errno == ECONNRESET) { eofCallback(*this); h.unwatchRead(); break; } else if (errno == EAGAIN) { // We have just put a buffer back so we know // we can carry on watching for reads break; } else { // Report error then just treat as a socket disconnect QPID_LOG(error, "Error reading socket: " << getErrorString(PR_GetError())); eofCallback(*this); h.unwatchRead(); break; } } } else { // Something to read but no buffer if (emptyCallback) { emptyCallback(*this); } // If we still have no buffers we can't do anything more if (bufferQueue.empty()) { h.unwatchRead(); break; } } } while (true); ++threadReadCount; return; } /* * We carry on writing whilst we have data to write and we can write */ void SslIO::writeable(DispatchHandle& h) { AbsTime writeStartTime = AbsTime::now(); do { // See if we've got something to write if (!writeQueue.empty()) { // Write buffer BufferBase* buff = writeQueue.back(); writeQueue.pop_back(); errno = 0; assert(buff->dataStart+buff->dataCount <= buff->byteCount); int rc = socket.write(buff->bytes+buff->dataStart, buff->dataCount); if (rc >= 0) { threadWriteTotal += rc; // If we didn't write full buffer put rest back if (rc != buff->dataCount) { buff->dataStart += rc; buff->dataCount -= rc; writeQueue.push_back(buff); break; } // Recycle the buffer queueReadBuffer(buff); // Stop writing if we've overrun our timeslot if (Duration(writeStartTime, AbsTime::now()) > threadMaxIoTimeNs) { break; } } else { // Put buffer back writeQueue.push_back(buff); if (errno == ECONNRESET || errno == EPIPE) { // Just stop watching for write here - we'll get a // disconnect callback soon enough h.unwatchWrite(); break; } else if (errno == EAGAIN) { // We have just put a buffer back so we know // we can carry on watching for writes break; } else { QPID_LOG(error, "Error writing to socket: " << getErrorString(PR_GetError())); h.unwatchWrite(); break; } } } else { // If we're waiting to close the socket then can do it now as there is nothing to write if (queuedClose) { close(h); break; } // Fd is writable, but nothing to write if (idleCallback) { writePending = false; idleCallback(*this); } // If we still have no buffers to write we can't do anything more if (writeQueue.empty() && !writePending && !queuedClose) { h.unwatchWrite(); // The following handles the case where writePending is // set to true after the test above; in this case its // possible that the unwatchWrite overwrites the // desired rewatchWrite so we correct that here if (writePending) h.rewatchWrite(); break; } } } while (true); ++threadWriteCount; return; } void SslIO::disconnected(DispatchHandle& h) { // If we've already queued close do it instead of disconnected callback if (queuedClose) { close(h); } else if (disCallback) { disCallback(*this); h.unwatch(); } } /* * Close the socket and callback to say we've done it */ void SslIO::close(DispatchHandle& h) { h.stopWatch(); socket.close(); if (closedCallback) { closedCallback(*this, socket); } } SecuritySettings SslIO::getSecuritySettings() { SecuritySettings settings; settings.ssf = socket.getKeyLen(); settings.authid = socket.getClientAuthId(); return settings; } qpidc-0.16/src/qpid/sys/ssl/util.h0000664000076400007640000000252511076056706017441 0ustar00jrossjross00000000000000#ifndef QPID_SYS_SSL_UTIL_H #define QPID_SYS_SSL_UTIL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Options.h" #include namespace qpid { namespace sys { namespace ssl { struct SslOptions : qpid::Options { static SslOptions global; std::string certDbPath; std::string certName; std::string certPasswordFile; bool exportPolicy; SslOptions(); SslOptions& operator=(const SslOptions&); }; void initNSS(const SslOptions& options, bool server = false); void shutdownNSS(); }}} // namespace qpid::sys::ssl #endif /*!QPID_SYS_SSL_UTIL_H*/ qpidc-0.16/src/qpid/sys/ssl/SslSocket.h0000664000076400007640000000575711650074462020405 0ustar00jrossjross00000000000000#ifndef _sys_ssl_Socket_h #define _sys_ssl_Socket_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IOHandle.h" #include "qpid/sys/Socket.h" #include #include struct sockaddr; namespace qpid { namespace sys { class Duration; namespace ssl { class SslSocket : public qpid::sys::Socket { public: /** Create a socket wrapper for descriptor. */ SslSocket(); /** Set socket non blocking */ void setNonblocking() const; /** Set tcp-nodelay */ void setTcpNoDelay(bool nodelay) const; /** Set SSL cert-name. Allows the cert-name to be set per * connection, overriding global cert-name settings from * NSSInit().*/ void setCertName(const std::string& certName); void connect(const std::string& host, const std::string& port) const; void close() const; /** Bind to a port and start listening. *@param port 0 means choose an available port. *@param backlog maximum number of pending connections. *@param certName name of certificate to use to identify the server *@return The bound port. */ int listen(uint16_t port = 0, int backlog = 10, const std::string& certName = "localhost.localdomain", bool clientAuth = false) const; /** * Accept a connection from a socket that is already listening * and has an incoming connection */ SslSocket* accept() const; // TODO The following are raw operations, maybe they need better wrapping? int read(void *buf, size_t count) const; int write(const void *buf, size_t count) const; uint16_t getLocalPort() const; uint16_t getRemotePort() const; int getKeyLen() const; std::string getClientAuthId() const; protected: mutable std::string connectname; mutable PRFileDesc* socket; std::string certname; /** * 'model' socket, with configuration to use when importing * accepted sockets for use as ssl sockets. Set on listen(), used * in accept to pass through to newly created socket instances. */ mutable PRFileDesc* prototype; SslSocket(IOHandlePrivate* ioph, PRFileDesc* model); friend class SslMuxSocket; }; class SslMuxSocket : public SslSocket { public: Socket* accept() const; }; }}} #endif /*!_sys_ssl_Socket_h*/ qpidc-0.16/src/qpid/sys/Shlib.cpp0000664000076400007640000000224611227113407017245 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Shlib.h" #include "qpid/log/Statement.h" namespace qpid { namespace sys { AutoShlib::~AutoShlib() throw() { try { unload(); } catch(const std::exception& e) { QPID_LOG(error, "Unloading shared library: " << e.what()); } } // Note: Other functions are defined in apr/Shlib.cpp or posix/Shlib.cpp. }} // namespace qpid::sys qpidc-0.16/src/qpid/sys/Probes.h0000664000076400007640000000502611720775631017115 0ustar00jrossjross00000000000000#ifndef _sys_Probes #define _sys_Probes /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "config.h" #ifdef HAVE_SYS_SDT_H #include #endif // Pragmatically it seems that Linux and Solaris versions of sdt.h which support // user static probes define up to DTRACE_PROBE8, but FreeBSD 8 which doesn't // support usdt only defines up to DTRACE_PROBE4 - FreeBSD 9 which does support usdt // defines up to DTRACE_PROBE5. #ifdef DTRACE_PROBE5 // Versions for Linux Systemtap/Solaris/FreeBSD 9 #define QPID_PROBE(probe) DTRACE_PROBE(qpid, probe) #define QPID_PROBE1(probe, p1) DTRACE_PROBE1(qpid, probe, p1) #define QPID_PROBE2(probe, p1, p2) DTRACE_PROBE2(qpid, probe, p1, p2) #define QPID_PROBE3(probe, p1, p2, p3) DTRACE_PROBE3(qpid, probe, p1, p2, p3) #define QPID_PROBE4(probe, p1, p2, p3, p4) DTRACE_PROBE4(qpid, probe, p1, p2, p3, p4) #define QPID_PROBE5(probe, p1, p2, p3, p4, p5) DTRACE_PROBE5(qpid, probe, p1, p2, p3, p4, p5) #else // FreeBSD 8 #define QPID_PROBE(probe) #define QPID_PROBE1(probe, p1) #define QPID_PROBE2(probe, p1, p2) #define QPID_PROBE3(probe, p1, p2, p3) #define QPID_PROBE4(probe, p1, p2, p3, p4) #define QPID_PROBE5(probe, p1, p2, p3, p4, p5) #endif #ifdef DTRACE_PROBE8 // Versions for Linux Systemtap #define QPID_PROBE6(probe, p1, p2, p3, p4, p5, p6) DTRACE_PROBE6(qpid, probe, p1, p2, p3, p4, p5, p6) #define QPID_PROBE7(probe, p1, p2, p3, p4, p5, p6, p7) DTRACE_PROBE7(qpid, probe, p1, p2, p3, p4, p5, p6, p7) #define QPID_PROBE8(probe, p1, p2, p3, p4, p5, p6, p7, p8) DTRACE_PROBE8(qpid, probe, p1, p2, p3, p4, p5, p6, p7, p8) #else // Versions for Solaris/FreeBSD #define QPID_PROBE6(probe, p1, p2, p3, p4, p5, p6) #define QPID_PROBE7(probe, p1, p2, p3, p4, p5, p6, p7) #define QPID_PROBE8(probe, p1, p2, p3, p4, p5, p6, p7, p8) #endif #endif // _sys_Probes qpidc-0.16/src/qpid/sys/AtomicValue.h0000664000076400007640000000273011562043355020066 0ustar00jrossjross00000000000000#ifndef QPID_SYS_ATOMICVALUE_H #define QPID_SYS_ATOMICVALUE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ // Have to check for clang before gcc as clang pretends to be gcc too #if defined( __clang__ ) // Use the clang doesn't support atomic builtins for 64 bit values, so use the slow versions #include "qpid/sys/AtomicValue_mutex.h" #elif defined( __GNUC__ ) && __GNUC__ >= 4 && ( defined( __i686__ ) || defined( __x86_64__ ) ) // Use the Gnu C built-in atomic operations if compiling with gcc on a suitable platform. #include "qpid/sys/AtomicValue_gcc.h" #else // Fall-back to mutex locked operations if we don't have atomic ops. #include "qpid/sys/AtomicValue_mutex.h" #endif #endif /*!QPID_SYS_ATOMICVALUE_GCC_H*/ qpidc-0.16/src/qpid/sys/ClusterSafe.h0000664000076400007640000000464611535377046020114 0ustar00jrossjross00000000000000#ifndef QPID_SYS_CLUSTERSAFE_H #define QPID_SYS_CLUSTERSAFE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" namespace qpid { namespace sys { /** * Assertion to add to code that modifies clustered state. * * In a non-clustered broker this is a no-op. * * In a clustered broker, checks that it is being called * in a context where it is safe to modify clustered state. * If not it aborts the process as this is a serious bug. * * This function is in the common library rather than the cluster * library because it is called by code in the broker library. */ QPID_COMMON_EXTERN void assertClusterSafe(); /** * In a non-clustered broker, returns true. * * In a clustered broker returns true if we are in a context where it * is safe to modify cluster state. * * This function is in the common library rather than the cluster * library because it is called by code in the broker library. */ QPID_COMMON_EXTERN bool isClusterSafe(); /** * Mark a scope as cluster safe. Sets isClusterSafe in constructor and resets * to previous value in destructor. */ class ClusterSafeScope { public: ClusterSafeScope(); ~ClusterSafeScope(); private: bool save; }; /** * Mark a scope as cluster unsafe. Clears isClusterSafe in constructor and resets * to previous value in destructor. */ class ClusterUnsafeScope { public: QPID_COMMON_EXTERN ClusterUnsafeScope(); QPID_COMMON_EXTERN ~ClusterUnsafeScope(); private: bool save; }; /** * Enable cluster-safe assertions. By default they are no-ops. * Called by cluster code. */ void enableClusterSafe(); }} // namespace qpid::sys #endif /*!QPID_SYS_CLUSTERSAFE_H*/ qpidc-0.16/src/qpid/sys/Fork.h0000664000076400007640000000132711033472365016557 0ustar00jrossjross00000000000000#ifndef QPID_SYS_FORK_H #define QPID_SYS_FORK_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "posix/Fork.h" #endif /*!QPID_SYS_FORK_H*/ qpidc-0.16/src/qpid/sys/Dispatcher.h0000664000076400007640000000235511227113407017740 0ustar00jrossjross00000000000000#ifndef _sys_Dispatcher_h #define _sys_Dispatcher_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Poller.h" #include "qpid/sys/Runnable.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace sys { class Dispatcher : public Runnable { const Poller::shared_ptr poller; public: QPID_COMMON_EXTERN Dispatcher(Poller::shared_ptr poller); QPID_COMMON_EXTERN ~Dispatcher(); QPID_COMMON_EXTERN void run(); }; }} #endif // _sys_Dispatcher_h qpidc-0.16/src/qpid/sys/AtomicCount.h0000664000076400007640000000237511227113407020101 0ustar00jrossjross00000000000000#ifndef _posix_AtomicCount_h #define _posix_AtomicCount_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include "qpid/sys/ScopedIncrement.h" namespace qpid { namespace sys { /** * Atomic counter. */ class AtomicCount { public: typedef ::qpid::sys::ScopedDecrement ScopedDecrement; typedef ::qpid::sys::ScopedIncrement ScopedIncrement; AtomicCount(long value = 0) : count(value) {} void operator++() { ++count ; } long operator--() { return --count; } operator long() const { return count; } private: boost::detail::atomic_count count; }; }} #endif // _posix_AtomicCount_h qpidc-0.16/src/qpid/sys/Socket.h0000664000076400007640000000666111650074462017115 0ustar00jrossjross00000000000000#ifndef _sys_Socket_h #define _sys_Socket_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IOHandle.h" #include "qpid/sys/IntegerTypes.h" #include "qpid/CommonImportExport.h" #include namespace qpid { namespace sys { class Duration; class SocketAddress; class QPID_COMMON_CLASS_EXTERN Socket : public IOHandle { public: /** Create a socket wrapper for descriptor. */ QPID_COMMON_EXTERN Socket(); /** Create a new Socket which is the same address family as this one */ QPID_COMMON_EXTERN Socket* createSameTypeSocket() const; /** Set socket non blocking */ void setNonblocking() const; QPID_COMMON_EXTERN void setTcpNoDelay() const; QPID_COMMON_EXTERN void connect(const std::string& host, const std::string& port) const; QPID_COMMON_EXTERN void connect(const SocketAddress&) const; QPID_COMMON_EXTERN void close() const; /** Bind to a port and start listening. *@param port 0 means choose an available port. *@param backlog maximum number of pending connections. *@return The bound port. */ QPID_COMMON_EXTERN int listen(const std::string& host = "", const std::string& port = "0", int backlog = 10) const; QPID_COMMON_EXTERN int listen(const SocketAddress&, int backlog = 10) const; /** * Returns an address (host and port) for the remote end of the * socket */ QPID_COMMON_EXTERN std::string getPeerAddress() const; /** * Returns an address (host and port) for the local end of the * socket */ QPID_COMMON_EXTERN std::string getLocalAddress() const; /** * Returns the full address of the connection: local and remote host and port. */ QPID_COMMON_INLINE_EXTERN std::string getFullAddress() const { return getLocalAddress()+"-"+getPeerAddress(); } /** * Returns the error code stored in the socket. This may be used * to determine the result of a non-blocking connect. */ QPID_COMMON_EXTERN int getError() const; /** Accept a connection from a socket that is already listening * and has an incoming connection */ QPID_COMMON_EXTERN Socket* accept() const; // TODO The following are raw operations, maybe they need better wrapping? QPID_COMMON_EXTERN int read(void *buf, size_t count) const; QPID_COMMON_EXTERN int write(const void *buf, size_t count) const; private: /** Create socket */ void createSocket(const SocketAddress&) const; public: /** Construct socket with existing handle */ Socket(IOHandlePrivate*); protected: mutable std::string localname; mutable std::string peername; mutable bool nonblocking; mutable bool nodelay; }; }} #endif /*!_sys_Socket_h*/ qpidc-0.16/src/qpid/sys/DeletionManager.h0000664000076400007640000001173611310065431020707 0ustar00jrossjross00000000000000#ifndef _sys_DeletionManager_h #define _sys_DeletionManager_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include namespace qpid { namespace sys { struct deleter { template void operator()(T* ptr){ delete ptr;} }; /** * DeletionManager keeps track of handles that need to be deleted but may still be * in use by one of the threads concurrently. * * The mode of operation is like this: * - When we want to delete but we might still be using the handle we * * Transfer ownership of the handle to this class * * Mark the handle as (potentially) in use by every thread * - Then subsequently at points where the thread code knows it isn't * using any handles it declares that it is using no handles * - When the last thread declares no use of a handle it automatically * gets deleted by the shared_ptr implementation * * The class only has static members and data and so can only be used once for * any particular handle type */ template class DeletionManager { struct ThreadStatus; public: // Mark every thread as using the handle - it will be deleted // below after every thread marks the handle as unused static void markForDeletion(H* handle) { allThreadsStatuses.addHandle(shared_ptr(handle)); } // Mark this thread is not using any handle - // handles get deleted here when no one else // is using them either static void markAllUnusedInThisThread() { ThreadStatus* threadStatus = getThreadStatus(); ScopedLock l(threadStatus->lock); // The actual deletions will happen here when all the shared_ptr // ref counts hit 0 (that is when every thread marks the handle unused) threadStatus->handles.clear(); } static void destroyThreadState() { ThreadStatus* threadStatus = getThreadStatus(); allThreadsStatuses.delThreadStatus(threadStatus); delete threadStatus; threadStatus = 0; } private: static ThreadStatus*& getThreadStatus() { static __thread ThreadStatus* threadStatus = 0; // Thread local vars can't be dynamically constructed so we need // to check whether we've made it yet and construct it if not // (no locking necessary for the check as it's thread local!) if (!threadStatus) { threadStatus = new ThreadStatus; allThreadsStatuses.addThreadStatus(threadStatus); } return threadStatus; } typedef boost::shared_ptr shared_ptr; // In theory we know that we never need more handles than the number of // threads runnning so we could use a fixed size array. However at this point // in the code we don't have easy access to this information. struct ThreadStatus { Mutex lock; std::vector handles; }; class AllThreadsStatuses { Mutex lock; std::vector statuses; struct handleAdder { shared_ptr handle; handleAdder(shared_ptr h): handle(h) {} void operator()(ThreadStatus* ptr) { ScopedLock l(ptr->lock); ptr->handles.push_back(handle); } }; public: // Need this to be able to do static initialisation explicit AllThreadsStatuses(int) {} ~AllThreadsStatuses() { ScopedLock l(lock); std::for_each(statuses.begin(), statuses.end(), deleter()); } void addThreadStatus(ThreadStatus* t) { ScopedLock l(lock); statuses.push_back(t); } void delThreadStatus(ThreadStatus* t) { ScopedLock l(lock); typename std::vector::iterator it = std::find(statuses.begin(),statuses.end(), t); if (it != statuses.end()) { statuses.erase(it); } } void addHandle(shared_ptr h) { ScopedLock l(lock); std::for_each(statuses.begin(), statuses.end(), handleAdder(h)); } }; static AllThreadsStatuses allThreadsStatuses; }; }} #endif // _sys_DeletionManager_h qpidc-0.16/src/qpid/sys/AtomicValue_gcc.h0000664000076400007640000000506611576717204020715 0ustar00jrossjross00000000000000#ifndef QPID_SYS_ATOMICVALUE_GCC_H #define QPID_SYS_ATOMICVALUE_GCC_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #if !defined(QPID_SYS_ATOMICVALUE_H) #error "This file should only be included via AtomicValue.h." #endif namespace qpid { namespace sys { /** * Atomic value of type T. T must be an integral type of size 1,2,4 or 8 bytes. * All operations are atomic and preform a full memory barrier unless otherwise noted. */ template class AtomicValue { public: AtomicValue(T init=0) : value(init) {} // Not atomic. Don't call concurrently with atomic ops. AtomicValue& operator=(T newValue) { value = newValue; return *this; } // Update and return new value. inline T operator+=(T n) { return __sync_add_and_fetch(&value, n); } inline T operator-=(T n) { return __sync_sub_and_fetch(&value, n); } inline T operator++() { return *this += 1; } inline T operator--() { return *this -= 1; } // Update and return old value. inline T fetchAndAdd(T n) { return __sync_fetch_and_add(&value, n); } inline T fetchAndSub(T n) { return __sync_fetch_and_sub(&value, n); } inline T operator++(int) { return fetchAndAdd(1); } inline T operator--(int) { return fetchAndSub(1); } /** If current value == testval then set to newval. Returns the old value. */ T valueCompareAndSwap(T testval, T newval) { return __sync_val_compare_and_swap(&value, testval, newval); } /** If current value == testval then set to newval. Returns true if the swap was performed. */ bool boolCompareAndSwap(T testval, T newval) { return __sync_bool_compare_and_swap(&value, testval, newval); } T get() const { return const_cast*>(this)->fetchAndAdd(static_cast(0)); } private: T value; }; }} // namespace qpid::sys #endif /*!QPID_SYS_ATOMICVALUE_GCC_H*/ qpidc-0.16/src/qpid/sys/DispatchHandle.cpp0000664000076400007640000002005411467310224021056 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/DispatchHandle.h" #include "qpid/log/Statement.h" #include #include #include namespace qpid { namespace sys { DispatchHandle::DispatchHandle(const IOHandle& h, Callback rCb, Callback wCb, Callback dCb) : PollerHandle(h), readableCallback(rCb), writableCallback(wCb), disconnectedCallback(dCb), state(IDLE) { } DispatchHandle::~DispatchHandle() { } void DispatchHandle::startWatch(Poller::shared_ptr poller0) { bool r = readableCallback; bool w = writableCallback; ScopedLock lock(stateLock); assert(state == IDLE); poller = poller0; poller->registerHandle(*this); state = WAITING; Poller::Direction dir = r ? ( w ? Poller::INOUT : Poller::INPUT ) : ( w ? Poller::OUTPUT : Poller::NONE ); poller->monitorHandle(*this, dir); } void DispatchHandle::rewatch() { bool r = readableCallback; bool w = writableCallback; if (!r && !w) { return; } Poller::Direction dir = r ? ( w ? Poller::INOUT : Poller::INPUT ) : ( w ? Poller::OUTPUT : Poller::NONE ); ScopedLock lock(stateLock); switch(state) { case IDLE: case STOPPING: case DELETING: return; default: break; } assert(poller); poller->monitorHandle(*this, dir); } void DispatchHandle::rewatchRead() { if (!readableCallback) { return; } ScopedLock lock(stateLock); switch(state) { case IDLE: case STOPPING: case DELETING: return; default: break; } assert(poller); poller->monitorHandle(*this, Poller::INPUT); } void DispatchHandle::rewatchWrite() { if (!writableCallback) { return; } ScopedLock lock(stateLock); switch(state) { case IDLE: case STOPPING: case DELETING: return; default: break; } assert(poller); poller->monitorHandle(*this, Poller::OUTPUT); } void DispatchHandle::unwatchRead() { if (!readableCallback) { return; } ScopedLock lock(stateLock); switch(state) { case IDLE: case STOPPING: case DELETING: return; default: break; } assert(poller); poller->unmonitorHandle(*this, Poller::INPUT); } void DispatchHandle::unwatchWrite() { if (!writableCallback) { return; } ScopedLock lock(stateLock); switch(state) { case IDLE: case STOPPING: case DELETING: return; default: break; } assert(poller); poller->unmonitorHandle(*this, Poller::OUTPUT); } void DispatchHandle::unwatch() { ScopedLock lock(stateLock); switch(state) { case IDLE: case STOPPING: case DELETING: return; default: break; } assert(poller); poller->unmonitorHandle(*this, Poller::INOUT); } void DispatchHandle::stopWatch() { ScopedLock lock(stateLock); switch (state) { case IDLE: assert(state != IDLE); return; case STOPPING: assert(state != STOPPING); return; case CALLING: state = STOPPING; break; case WAITING: state = IDLE; break; case DELETING: return; } assert(poller); poller->unregisterHandle(*this); poller.reset(); } // If we are in the IDLE/STOPPING state we can't do the callback as we've // not/no longer got the fd registered in any poller void DispatchHandle::call(Callback iCb) { assert(iCb); ScopedLock lock(stateLock); switch (state) { case IDLE: case STOPPING: case DELETING: return; default: interruptedCallbacks.push(iCb); assert(poller); (void) poller->interrupt(*this); } } // The slightly strange switch structure // is to ensure that the lock is released before // we do the delete void DispatchHandle::doDelete() { { ScopedLock lock(stateLock); // Ensure that we're no longer watching anything switch (state) { case IDLE: state = DELETING; break; case STOPPING: state = DELETING; return; case WAITING: state = DELETING; assert(poller); (void) poller->interrupt(*this); poller->unregisterHandle(*this); return; case CALLING: state = DELETING; assert(poller); poller->unregisterHandle(*this); return; case DELETING: return; } } // If we're IDLE we can do this right away delete this; } void DispatchHandle::processEvent(Poller::EventType type) { // Phase I { ScopedLock lock(stateLock); switch(state) { case IDLE: // Can get here if a non connection thread stops watching // whilst we were stuck in the above lock return; case WAITING: state = CALLING; break; case CALLING: assert(state!=CALLING); return; case STOPPING: assert(state!=STOPPING); return; case DELETING: // Need to make sure we clean up any pending callbacks in this case std::swap(callbacks, interruptedCallbacks); goto saybyebye; } std::swap(callbacks, interruptedCallbacks); } // Do callbacks - whilst we are doing the callbacks we are prevented from processing // the same handle until we re-enable it. To avoid rentering the callbacks for a single // handle re-enabling in the callbacks is actually deferred until they are complete. try { switch (type) { case Poller::READABLE: readableCallback(*this); break; case Poller::WRITABLE: writableCallback(*this); break; case Poller::READ_WRITABLE: readableCallback(*this); writableCallback(*this); break; case Poller::DISCONNECTED: if (disconnectedCallback) { disconnectedCallback(*this); } break; case Poller::INTERRUPTED: { // We'll actually do the interrupt below } break; default: assert(false); } // If we have any callbacks do them now - // (because we use a copy from before the previous callbacks we won't // do anything yet that was just added) while (callbacks.size() > 0) { { ScopedLock lock(stateLock); switch (state) { case DELETING: goto finishcallbacks; default: break; } } Callback cb = callbacks.front(); assert(cb); cb(*this); callbacks.pop(); } } catch (std::exception& e) { // One of the callbacks threw an exception - that's not allowed QPID_LOG(error, "Caught exception in state: " << state << " with event: " << type << ": " << e.what()); // It would be nice to clean up and delete ourselves here, but we can't } finishcallbacks: { ScopedLock lock(stateLock); switch (state) { case IDLE: assert(state!=IDLE); return; case STOPPING: state = IDLE; return; case WAITING: assert(state!=WAITING); return; case CALLING: state = WAITING; return; case DELETING: break; } } saybyebye: delete this; } }} qpidc-0.16/src/qpid/sys/ScopedIncrement.h0000664000076400007640000000326210710442217020732 0ustar00jrossjross00000000000000#ifndef _posix_ScopedIncrement_h #define _posix_ScopedIncrement_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include namespace qpid { namespace sys { /** * Increment counter in constructor and decrement in destructor. * Optionally call a function if the decremented counter value is 0. * Note the function must not throw, it is called in the destructor. */ template > class ScopedIncrement : boost::noncopyable { public: ScopedIncrement(T& c, F f=0) : count(c), callback(f) { ++count; } ~ScopedIncrement() { if (--count == 0 && callback) callback(); } private: T& count; F callback; }; /** Decrement counter in constructor and increment in destructor. */ template class ScopedDecrement : boost::noncopyable { public: ScopedDecrement(T& c) : count(c) { value = --count; } ~ScopedDecrement() { ++count; } /** Return the value after the decrement. */ operator long() { return value; } private: T& count; long value; }; }} #endif // _posix_ScopedIncrement_h qpidc-0.16/src/qpid/sys/SocketAddress.h0000664000076400007640000000366711623035650020422 0ustar00jrossjross00000000000000#ifndef _sys_SocketAddress_h #define _sys_SocketAddress_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include "qpid/CommonImportExport.h" #include struct addrinfo; struct sockaddr; namespace qpid { namespace sys { class SocketAddress { friend const ::addrinfo& getAddrInfo(const SocketAddress&); public: /** Create a SocketAddress from hostname and port*/ QPID_COMMON_EXTERN SocketAddress(const std::string& host, const std::string& port); QPID_COMMON_EXTERN SocketAddress(const SocketAddress&); QPID_COMMON_EXTERN SocketAddress& operator=(const SocketAddress&); QPID_COMMON_EXTERN ~SocketAddress(); QPID_COMMON_EXTERN bool nextAddress(); QPID_COMMON_EXTERN std::string asString(bool numeric=true) const; QPID_COMMON_EXTERN void setAddrInfoPort(uint16_t port); QPID_COMMON_EXTERN static std::string asString(::sockaddr const * const addr, size_t addrlen); QPID_COMMON_EXTERN static uint16_t getPort(::sockaddr const * const addr); private: std::string host; std::string port; mutable ::addrinfo* addrInfo; mutable ::addrinfo* currentAddrInfo; }; }} #endif /*!_sys_SocketAddress_h*/ qpidc-0.16/src/qpid/sys/rdma/0000775000076400007640000000000011752725716016436 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/sys/rdma/rdma_exception.h0000664000076400007640000000342311372661506021604 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef RDMA_EXCEPTION_H #define RDMA_EXCEPTION_H #include #include #include namespace Rdma { static __thread char s[50]; class Exception : public std::exception { int err; public: Exception(int e) : err(e) {} int getError() { return err; } const char* what() const throw() { return ::strerror_r(err, s, 50); } }; inline void THROW_ERRNO() { throw Rdma::Exception(errno); } inline void CHECK(int rc) { if (rc != 0) throw Rdma::Exception((rc == -1) ? errno : rc >0 ? rc : -rc); } inline int GETERR(int rc) { return (rc == -1) ? errno : rc > 0 ? rc : -rc; } inline void CHECK_IBV(int rc) { if (rc != 0) throw Rdma::Exception(rc); } template inline T* CHECK_NULL(T* rc) { if (rc == 0) THROW_ERRNO(); return rc; } } #endif // RDMA_EXCEPTION_H qpidc-0.16/src/qpid/sys/rdma/rdma_factories.cpp0000664000076400007640000000704311441745041022114 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/rdma/rdma_factories.h" #include "qpid/sys/rdma/rdma_exception.h" namespace Rdma { // Intentionally ignore return values for these functions // - we can't do anything about then anyway void acker(::rdma_cm_event* e) throw () { if (e) (void) ::rdma_ack_cm_event(e); } void destroyEChannel(::rdma_event_channel* c) throw () { if (c) (void) ::rdma_destroy_event_channel(c); } void destroyId(::rdma_cm_id* i) throw () { if (i) (void) ::rdma_destroy_id(i); } void deallocPd(::ibv_pd* p) throw () { if (p) (void) ::ibv_dealloc_pd(p); } void deregMr(::ibv_mr* mr) throw () { if (mr) (void) ::ibv_dereg_mr(mr); } void destroyCChannel(::ibv_comp_channel* c) throw () { if (c) (void) ::ibv_destroy_comp_channel(c); } void destroyCq(::ibv_cq* cq) throw () { if (cq) (void) ::ibv_destroy_cq(cq); } void destroyQp(::ibv_qp* qp) throw () { if (qp) (void) ::ibv_destroy_qp(qp); } boost::shared_ptr< ::rdma_cm_id > mkId(::rdma_cm_id* i) { return boost::shared_ptr< ::rdma_cm_id >(i, destroyId); } boost::shared_ptr< ::rdma_cm_event > mkEvent(::rdma_cm_event* e) { return boost::shared_ptr< ::rdma_cm_event >(e, acker); } boost::shared_ptr< ::ibv_qp > mkQp(::ibv_qp* qp) { return boost::shared_ptr< ::ibv_qp > (qp, destroyQp); } boost::shared_ptr< ::rdma_event_channel > mkEChannel() { ::rdma_event_channel* c = CHECK_NULL(::rdma_create_event_channel()); return boost::shared_ptr< ::rdma_event_channel >(c, destroyEChannel); } boost::shared_ptr< ::rdma_cm_id > mkId(::rdma_event_channel* ec, void* context, ::rdma_port_space ps) { ::rdma_cm_id* i; CHECK(::rdma_create_id(ec, &i, context, ps)); return mkId(i); } boost::shared_ptr< ::ibv_pd > allocPd(::ibv_context* c) { ::ibv_pd* pd = CHECK_NULL(::ibv_alloc_pd(c)); return boost::shared_ptr< ::ibv_pd >(pd, deallocPd); } boost::shared_ptr< ::ibv_mr > regMr(::ibv_pd* pd, void* addr, size_t length, ::ibv_access_flags access) { ::ibv_mr* mr = CHECK_NULL(::ibv_reg_mr(pd, addr, length, access)); return boost::shared_ptr< ::ibv_mr >(mr, deregMr); } boost::shared_ptr< ::ibv_comp_channel > mkCChannel(::ibv_context* c) { ::ibv_comp_channel* cc = CHECK_NULL(::ibv_create_comp_channel(c)); return boost::shared_ptr< ::ibv_comp_channel >(cc, destroyCChannel); } boost::shared_ptr< ::ibv_cq > mkCq(::ibv_context* c, int cqe, void* context, ::ibv_comp_channel* cc) { ::ibv_cq* cq = CHECK_NULL(::ibv_create_cq(c, cqe, context, cc, 0)); return boost::shared_ptr< ::ibv_cq >(cq, destroyCq); } } qpidc-0.16/src/qpid/sys/rdma/rdma_wrap.cpp0000664000076400007640000004227011556010516021106 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/rdma/rdma_wrap.h" #include "qpid/sys/rdma/rdma_factories.h" #include "qpid/sys/rdma/rdma_exception.h" #include "qpid/sys/posix/PrivatePosix.h" #include #include #include #include namespace Rdma { const ::rdma_conn_param DEFAULT_CONNECT_PARAM = { 0, // .private_data 0, // .private_data_len 4, // .responder_resources 4, // .initiator_depth 0, // .flow_control 5, // .retry_count 7 // .rnr_retry_count }; // This is moderately inefficient so don't use in a critical path int deviceCount() { int count; ::ibv_free_device_list(::ibv_get_device_list(&count)); return count; } Buffer::Buffer(uint32_t lkey, char* bytes, const int32_t byteCount, const int32_t reserve) : bufferSize(byteCount + reserve), reserved(reserve) { sge.addr = (uintptr_t) bytes; sge.length = 0; sge.lkey = lkey; } QueuePairEvent::QueuePairEvent() : dir(NONE) {} QueuePairEvent::QueuePairEvent( const ::ibv_wc& w, boost::shared_ptr< ::ibv_cq > c, QueueDirection d) : cq(c), wc(w), dir(d) { assert(dir != NONE); } QueuePairEvent::operator bool() const { return dir != NONE; } bool QueuePairEvent::immPresent() const { return wc.wc_flags & IBV_WC_WITH_IMM; } uint32_t QueuePairEvent::getImm() const { return ntohl(wc.imm_data); } QueueDirection QueuePairEvent::getDirection() const { return dir; } ::ibv_wc_opcode QueuePairEvent::getEventType() const { return wc.opcode; } ::ibv_wc_status QueuePairEvent::getEventStatus() const { return wc.status; } Buffer* QueuePairEvent::getBuffer() const { Buffer* b = reinterpret_cast(wc.wr_id); b->dataCount(wc.byte_len); return b; } QueuePair::QueuePair(boost::shared_ptr< ::rdma_cm_id > i) : qpid::sys::IOHandle(new qpid::sys::IOHandlePrivate), pd(allocPd(i->verbs)), cchannel(mkCChannel(i->verbs)), scq(mkCq(i->verbs, DEFAULT_CQ_ENTRIES, 0, cchannel.get())), rcq(mkCq(i->verbs, DEFAULT_CQ_ENTRIES, 0, cchannel.get())), outstandingSendEvents(0), outstandingRecvEvents(0) { impl->fd = cchannel->fd; // Set cq context to this QueuePair object so we can find // ourselves again scq->cq_context = this; rcq->cq_context = this; ::ibv_device_attr dev_attr; CHECK(::ibv_query_device(i->verbs, &dev_attr)); ::ibv_qp_init_attr qp_attr = {}; // TODO: make a default struct for this qp_attr.cap.max_send_wr = DEFAULT_WR_ENTRIES; qp_attr.cap.max_send_sge = 1; qp_attr.cap.max_recv_wr = DEFAULT_WR_ENTRIES; qp_attr.cap.max_recv_sge = 1; qp_attr.send_cq = scq.get(); qp_attr.recv_cq = rcq.get(); qp_attr.qp_type = IBV_QPT_RC; CHECK(::rdma_create_qp(i.get(), pd.get(), &qp_attr)); qp = mkQp(i->qp); // Set the qp context to this so we can find ourselves again qp->qp_context = this; } QueuePair::~QueuePair() { // Reset back pointer in case someone else has the qp qp->qp_context = 0; // Dispose queue pair before we ack events qp.reset(); if (outstandingSendEvents > 0) ::ibv_ack_cq_events(scq.get(), outstandingSendEvents); if (outstandingRecvEvents > 0) ::ibv_ack_cq_events(rcq.get(), outstandingRecvEvents); // Deallocate recv buffer memory if (rmr) delete [] static_cast(rmr->addr); // Deallocate recv buffer memory if (smr) delete [] static_cast(smr->addr); // The buffers vectors automatically deletes all the buffers we've allocated } // Create buffers to use for writing void QueuePair::createSendBuffers(int sendBufferCount, int bufferSize, int reserved) { assert(!smr); // Round up buffersize to cacheline (64 bytes) int dataLength = (bufferSize+reserved+63) & (~63); // Allocate memory block for all receive buffers char* mem = new char [sendBufferCount * dataLength]; smr = regMr(pd.get(), mem, sendBufferCount * dataLength, ::IBV_ACCESS_LOCAL_WRITE); sendBuffers.reserve(sendBufferCount); freeBuffers.reserve(sendBufferCount); for (int i = 0; ilkey, &mem[i*dataLength], bufferSize, reserved)); freeBuffers.push_back(i); } } Buffer* QueuePair::getSendBuffer() { qpid::sys::ScopedLock l(bufferLock); if (freeBuffers.empty()) return 0; int i = freeBuffers.back(); freeBuffers.pop_back(); assert(i >= 0 && i < int(sendBuffers.size())); Buffer* b = &sendBuffers[i]; b->dataCount(0); return b; } void QueuePair::returnSendBuffer(Buffer* b) { qpid::sys::ScopedLock l(bufferLock); int i = b - &sendBuffers[0]; assert(i >= 0 && i < int(sendBuffers.size())); freeBuffers.push_back(i); } void QueuePair::allocateRecvBuffers(int recvBufferCount, int bufferSize) { assert(!rmr); // Round up buffersize to cacheline (64 bytes) bufferSize = (bufferSize+63) & (~63); // Allocate memory block for all receive buffers char* mem = new char [recvBufferCount * bufferSize]; rmr = regMr(pd.get(), mem, recvBufferCount * bufferSize, ::IBV_ACCESS_LOCAL_WRITE); recvBuffers.reserve(recvBufferCount); for (int i = 0; ilkey, &mem[i*bufferSize], bufferSize)); postRecv(&recvBuffers[i]); } } // Make channel non-blocking by making // associated fd nonblocking void QueuePair::nonblocking() { ::fcntl(cchannel->fd, F_SETFL, O_NONBLOCK); } // If we get EAGAIN because the channel has been set non blocking // and we'd have to wait then return an empty event QueuePair::intrusive_ptr QueuePair::getNextChannelEvent() { // First find out which cq has the event ::ibv_cq* cq; void* ctx; int rc = ::ibv_get_cq_event(cchannel.get(), &cq, &ctx); if (rc == -1 && errno == EAGAIN) return 0; CHECK(rc); // Batch acknowledge the event if (cq == scq.get()) { if (++outstandingSendEvents > DEFAULT_CQ_ENTRIES / 2) { ::ibv_ack_cq_events(cq, outstandingSendEvents); outstandingSendEvents = 0; } } else if (cq == rcq.get()) { if (++outstandingRecvEvents > DEFAULT_CQ_ENTRIES / 2) { ::ibv_ack_cq_events(cq, outstandingRecvEvents); outstandingRecvEvents = 0; } } return static_cast(ctx); } QueuePairEvent QueuePair::getNextEvent() { ::ibv_wc w; if (::ibv_poll_cq(scq.get(), 1, &w) == 1) return QueuePairEvent(w, scq, SEND); else if (::ibv_poll_cq(rcq.get(), 1, &w) == 1) return QueuePairEvent(w, rcq, RECV); else return QueuePairEvent(); } void QueuePair::notifyRecv() { CHECK_IBV(ibv_req_notify_cq(rcq.get(), 0)); } void QueuePair::notifySend() { CHECK_IBV(ibv_req_notify_cq(scq.get(), 0)); } void QueuePair::postRecv(Buffer* buf) { ::ibv_recv_wr rwr = {}; rwr.wr_id = reinterpret_cast(buf); // We are given the whole buffer buf->dataCount(buf->byteCount()); rwr.sg_list = &buf->sge; rwr.num_sge = 1; ::ibv_recv_wr* badrwr = 0; CHECK(::ibv_post_recv(qp.get(), &rwr, &badrwr)); if (badrwr) throw std::logic_error("ibv_post_recv(): Bad rwr"); } void QueuePair::postSend(Buffer* buf) { ::ibv_send_wr swr = {}; swr.wr_id = reinterpret_cast(buf); swr.opcode = IBV_WR_SEND; swr.send_flags = IBV_SEND_SIGNALED; swr.sg_list = &buf->sge; swr.num_sge = 1; ::ibv_send_wr* badswr = 0; CHECK(::ibv_post_send(qp.get(), &swr, &badswr)); if (badswr) throw std::logic_error("ibv_post_send(): Bad swr"); } void QueuePair::postSend(uint32_t imm, Buffer* buf) { ::ibv_send_wr swr = {}; swr.wr_id = reinterpret_cast(buf); swr.imm_data = htonl(imm); swr.opcode = IBV_WR_SEND_WITH_IMM; swr.send_flags = IBV_SEND_SIGNALED; swr.sg_list = &buf->sge; swr.num_sge = 1; ::ibv_send_wr* badswr = 0; CHECK(::ibv_post_send(qp.get(), &swr, &badswr)); if (badswr) throw std::logic_error("ibv_post_send(): Bad swr"); } ConnectionEvent::ConnectionEvent(::rdma_cm_event* e) : id((e->event != RDMA_CM_EVENT_CONNECT_REQUEST) ? Connection::find(e->id) : new Connection(e->id)), listen_id(Connection::find(e->listen_id)), event(mkEvent(e)) {} ConnectionEvent::operator bool() const { return event; } ::rdma_cm_event_type ConnectionEvent::getEventType() const { return event->event; } ::rdma_conn_param ConnectionEvent::getConnectionParam() const { // It's badly documented, but it seems from the librdma source code that all the following // event types have a valid param.conn switch (event->event) { case RDMA_CM_EVENT_CONNECT_REQUEST: case RDMA_CM_EVENT_ESTABLISHED: case RDMA_CM_EVENT_REJECTED: case RDMA_CM_EVENT_DISCONNECTED: case RDMA_CM_EVENT_CONNECT_ERROR: return event->param.conn; default: ::rdma_conn_param p = {}; return p; } } boost::intrusive_ptr ConnectionEvent::getConnection () const { return id; } boost::intrusive_ptr ConnectionEvent::getListenId() const { return listen_id; } // Wrap the passed in rdma_cm_id with a Connection // this basically happens only on connection request Connection::Connection(::rdma_cm_id* i) : qpid::sys::IOHandle(new qpid::sys::IOHandlePrivate), id(mkId(i)), context(0) { impl->fd = id->channel->fd; // Just overwrite the previous context as it will // have come from the listening connection if (i) i->context = this; } Connection::Connection() : qpid::sys::IOHandle(new qpid::sys::IOHandlePrivate), channel(mkEChannel()), id(mkId(channel.get(), this, RDMA_PS_TCP)), context(0) { impl->fd = channel->fd; } Connection::~Connection() { // Reset the id context in case someone else has it id->context = 0; } void Connection::ensureQueuePair() { assert(id.get()); // Only allocate a queue pair if there isn't one already if (qp) return; qp = new QueuePair(id); } Connection::intrusive_ptr Connection::make() { return new Connection(); } Connection::intrusive_ptr Connection::find(::rdma_cm_id* i) { if (!i) return 0; Connection* id = static_cast< Connection* >(i->context); if (!id) throw std::logic_error("Couldn't find existing Connection"); return id; } // Make channel non-blocking by making // associated fd nonblocking void Connection::nonblocking() { assert(id.get()); ::fcntl(id->channel->fd, F_SETFL, O_NONBLOCK); } // If we get EAGAIN because the channel has been set non blocking // and we'd have to wait then return an empty event ConnectionEvent Connection::getNextEvent() { assert(id.get()); ::rdma_cm_event* e; int rc = ::rdma_get_cm_event(id->channel, &e); if (GETERR(rc) == EAGAIN) return ConnectionEvent(); CHECK(rc); return ConnectionEvent(e); } void Connection::bind(const qpid::sys::SocketAddress& src_addr) const { assert(id.get()); CHECK(::rdma_bind_addr(id.get(), getAddrInfo(src_addr).ai_addr)); } void Connection::listen(int backlog) const { assert(id.get()); CHECK(::rdma_listen(id.get(), backlog)); } void Connection::resolve_addr( const qpid::sys::SocketAddress& dst_addr, int timeout_ms) const { assert(id.get()); CHECK(::rdma_resolve_addr(id.get(), 0, getAddrInfo(dst_addr).ai_addr, timeout_ms)); } void Connection::resolve_route(int timeout_ms) const { assert(id.get()); CHECK(::rdma_resolve_route(id.get(), timeout_ms)); } void Connection::disconnect() const { assert(id.get()); int rc = ::rdma_disconnect(id.get()); // iWarp doesn't let you disconnect a disconnected connection // but Infiniband can do so it's okay to call rdma_disconnect() // in response to a disconnect event, but we may get an error if (GETERR(rc) == EINVAL) return; CHECK(rc); } // TODO: Currently you can only connect with the default connection parameters void Connection::connect(const void* data, size_t len) { assert(id.get()); // Need to have a queue pair before we can connect ensureQueuePair(); ::rdma_conn_param p = DEFAULT_CONNECT_PARAM; p.private_data = data; p.private_data_len = len; CHECK(::rdma_connect(id.get(), &p)); } void Connection::connect() { connect(0, 0); } void Connection::accept(const ::rdma_conn_param& param, const void* data, size_t len) { assert(id.get()); // Need to have a queue pair before we can accept ensureQueuePair(); ::rdma_conn_param p = param; p.private_data = data; p.private_data_len = len; CHECK(::rdma_accept(id.get(), &p)); } void Connection::accept(const ::rdma_conn_param& param) { accept(param, 0, 0); } void Connection::reject(const void* data, size_t len) const { assert(id.get()); CHECK(::rdma_reject(id.get(), data, len)); } void Connection::reject() const { assert(id.get()); CHECK(::rdma_reject(id.get(), 0, 0)); } QueuePair::intrusive_ptr Connection::getQueuePair() { assert(id.get()); ensureQueuePair(); return qp; } std::string Connection::getLocalName() const { ::sockaddr* addr = ::rdma_get_local_addr(id.get()); char hostName[NI_MAXHOST]; char portName[NI_MAXSERV]; CHECK_IBV(::getnameinfo( addr, sizeof(::sockaddr_storage), hostName, sizeof(hostName), portName, sizeof(portName), NI_NUMERICHOST | NI_NUMERICSERV)); std::string r(hostName); r += ":"; r += portName; return r; } std::string Connection::getPeerName() const { ::sockaddr* addr = ::rdma_get_peer_addr(id.get()); char hostName[NI_MAXHOST]; char portName[NI_MAXSERV]; CHECK_IBV(::getnameinfo( addr, sizeof(::sockaddr_storage), hostName, sizeof(hostName), portName, sizeof(portName), NI_NUMERICHOST | NI_NUMERICSERV)); std::string r(hostName); r += ":"; r += portName; return r; } } std::ostream& operator<<(std::ostream& o, ::rdma_cm_event_type t) { # define CHECK_TYPE(t) case t: o << #t; break; switch(t) { CHECK_TYPE(RDMA_CM_EVENT_ADDR_RESOLVED) CHECK_TYPE(RDMA_CM_EVENT_ADDR_ERROR) CHECK_TYPE(RDMA_CM_EVENT_ROUTE_RESOLVED) CHECK_TYPE(RDMA_CM_EVENT_ROUTE_ERROR) CHECK_TYPE(RDMA_CM_EVENT_CONNECT_REQUEST) CHECK_TYPE(RDMA_CM_EVENT_CONNECT_RESPONSE) CHECK_TYPE(RDMA_CM_EVENT_CONNECT_ERROR) CHECK_TYPE(RDMA_CM_EVENT_UNREACHABLE) CHECK_TYPE(RDMA_CM_EVENT_REJECTED) CHECK_TYPE(RDMA_CM_EVENT_ESTABLISHED) CHECK_TYPE(RDMA_CM_EVENT_DISCONNECTED) CHECK_TYPE(RDMA_CM_EVENT_DEVICE_REMOVAL) CHECK_TYPE(RDMA_CM_EVENT_MULTICAST_JOIN) CHECK_TYPE(RDMA_CM_EVENT_MULTICAST_ERROR) default: o << "UNKNOWN_EVENT"; } # undef CHECK_TYPE return o; } qpidc-0.16/src/qpid/sys/rdma/rdma_factories.h0000664000076400007640000000321511441745041021556 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef RDMA_FACTORIES_H #define RDMA_FACTORIES_H #include #include namespace Rdma { boost::shared_ptr< ::rdma_event_channel > mkEChannel(); boost::shared_ptr< ::rdma_cm_id > mkId(::rdma_event_channel* ec, void* context, ::rdma_port_space ps); boost::shared_ptr< ::rdma_cm_id > mkId(::rdma_cm_id* i); boost::shared_ptr< ::rdma_cm_event > mkEvent(::rdma_cm_event* e); boost::shared_ptr< ::ibv_qp > mkQp(::ibv_qp* qp); boost::shared_ptr< ::ibv_pd > allocPd(::ibv_context* c); boost::shared_ptr< ::ibv_mr > regMr(::ibv_pd* pd, void* addr, size_t length, ::ibv_access_flags access); boost::shared_ptr< ::ibv_comp_channel > mkCChannel(::ibv_context* c); boost::shared_ptr< ::ibv_cq > mkCq(::ibv_context* c, int cqe, void* context, ::ibv_comp_channel* cc); } #endif // RDMA_FACTORIES_H qpidc-0.16/src/qpid/sys/rdma/RdmaIO.h0000664000076400007640000002026011504701335017704 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef Rdma_Acceptor_h #define Rdma_Acceptor_h #include "qpid/sys/rdma/rdma_wrap.h" #include "qpid/sys/AtomicValue.h" #include "qpid/sys/Dispatcher.h" #include "qpid/sys/DispatchHandle.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/SocketAddress.h" #include #include namespace Rdma { class Connection; class AsynchIO { typedef boost::function1 ErrorCallback; typedef boost::function2 ReadCallback; typedef boost::function1 IdleCallback; typedef boost::function2 FullCallback; typedef boost::function1 NotifyCallback; int protocolVersion; int bufferSize; int recvCredit; int xmitCredit; int recvBufferCount; int xmitBufferCount; int outstandingWrites; bool draining; enum State {IDLE, NOTIFY, NOTIFY_PENDING, STOPPED}; State state; qpid::sys::Mutex stateLock; QueuePair::intrusive_ptr qp; qpid::sys::DispatchHandleRef dataHandle; ReadCallback readCallback; IdleCallback idleCallback; FullCallback fullCallback; ErrorCallback errorCallback; NotifyCallback notifyCallback; qpid::sys::DispatchHandle::Callback pendingWriteAction; public: typedef boost::function1 RequestCallback; // TODO: Instead of specifying a buffer size specify the amount of memory the AsynchIO class can use // for buffers both read and write (allocate half to each up front) and fail if we cannot allocate that much // locked memory AsynchIO( QueuePair::intrusive_ptr q, int version, int size, int xCredit, int rCount, ReadCallback rc, IdleCallback ic, FullCallback fc, ErrorCallback ec ); ~AsynchIO(); void start(qpid::sys::Poller::shared_ptr poller); bool writable() const; void queueWrite(Buffer* buff); void notifyPendingWrite(); void drainWriteQueue(NotifyCallback); void stop(NotifyCallback); void requestCallback(RequestCallback); int incompletedWrites() const; Buffer* getSendBuffer(); void returnSendBuffer(Buffer*); private: const static int maxSupportedProtocolVersion = 1; // Constants for the peer-peer command messages // These are sent in the high bits if the imm data of an rdma message // The low bits are used to send the credit const static int FlagsMask = 0xF0000000; // Mask for all flag bits - be sure to update this if you add more command bits const static int IgnoreData = 0x10000000; // Message contains no application data void dataEvent(); void writeEvent(); void processCompletions(); void doWriteCallback(); void checkDrained(); void doStoppedCallback(); void queueBuffer(Buffer* buff, int credit); Buffer* extractBuffer(const QueuePairEvent& e); }; // We're only writable if: // * not draining write queue // * we've got space in the transmit queue // * we've got credit to transmit // * if there's only 1 transmit credit we must send some credit inline bool AsynchIO::writable() const { assert(xmitCredit>=0); return !draining && outstandingWrites < xmitBufferCount && xmitCredit > 0 && ( xmitCredit > 1 || recvCredit > 0); } inline int AsynchIO::incompletedWrites() const { return outstandingWrites; } inline Buffer* AsynchIO::getSendBuffer() { return qp->getSendBuffer(); } inline void AsynchIO::returnSendBuffer(Buffer* b) { qp->returnSendBuffer(b); } // These are the parameters necessary to start the conversation // * Each peer HAS to allocate buffers of the size of the maximum receive from its peer // * Each peer HAS to know the initial "credit" it has for transmitting to its peer struct ConnectionParams { uint32_t maxRecvBufferSize; uint16_t initialXmitCredit; uint16_t rdmaProtocolVersion; // Default to protocol version 1 ConnectionParams(uint32_t s, uint16_t c, uint16_t v = 1) : maxRecvBufferSize(s), initialXmitCredit(c), rdmaProtocolVersion(v) {} }; enum ErrorType { ADDR_ERROR, ROUTE_ERROR, CONNECT_ERROR, UNREACHABLE, UNKNOWN }; typedef boost::function2 ErrorCallback; typedef boost::function1 DisconnectedCallback; class ConnectionManager { typedef boost::function1 NotifyCallback; enum State {IDLE, STOPPED}; qpid::sys::AtomicValue state; Connection::intrusive_ptr ci; qpid::sys::DispatchHandleRef handle; NotifyCallback notifyCallback; protected: ErrorCallback errorCallback; DisconnectedCallback disconnectedCallback; public: ConnectionManager( ErrorCallback errc, DisconnectedCallback dc ); virtual ~ConnectionManager(); void start(qpid::sys::Poller::shared_ptr poller, const qpid::sys::SocketAddress& addr); void stop(NotifyCallback); private: void event(qpid::sys::DispatchHandle& handle); void doStoppedCallback(); virtual void startConnection(Connection::intrusive_ptr ci, const qpid::sys::SocketAddress& addr) = 0; virtual void connectionEvent(Connection::intrusive_ptr ci) = 0; }; typedef boost::function2 ConnectionRequestCallback; typedef boost::function1 EstablishedCallback; class Listener : public ConnectionManager { ConnectionParams checkConnectionParams; ConnectionRequestCallback connectionRequestCallback; EstablishedCallback establishedCallback; public: Listener( const ConnectionParams& cp, EstablishedCallback ec, ErrorCallback errc, DisconnectedCallback dc, ConnectionRequestCallback crc = 0 ); private: void startConnection(Connection::intrusive_ptr ci, const qpid::sys::SocketAddress& addr); void connectionEvent(Connection::intrusive_ptr ci); }; typedef boost::function2 RejectedCallback; typedef boost::function2 ConnectedCallback; class Connector : public ConnectionManager { ConnectionParams connectionParams; RejectedCallback rejectedCallback; ConnectedCallback connectedCallback; public: Connector( const ConnectionParams& cp, ConnectedCallback cc, ErrorCallback errc, DisconnectedCallback dc, RejectedCallback rc = 0 ); private: void startConnection(Connection::intrusive_ptr ci, const qpid::sys::SocketAddress& addr); void connectionEvent(Connection::intrusive_ptr ci); }; } #endif // Rdma_Acceptor_h qpidc-0.16/src/qpid/sys/rdma/RdmaServer.cpp0000664000076400007640000001302711504701335021201 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Thread.h" #include "qpid/sys/rdma/RdmaIO.h" #include "qpid/sys/rdma/rdma_exception.h" #include #include #include #include #include #include using std::vector; using std::queue; using std::string; using std::cout; using std::cerr; using qpid::sys::Thread; using qpid::sys::SocketAddress; using qpid::sys::Poller; // All the accepted connections namespace qpid { namespace tests { struct Buffer { char* bytes() const {return bytes_;} int32_t byteCount() const {return size;} Buffer(const int32_t s): bytes_(new char[s]), size(s) { } ~Buffer() { delete [] bytes_; } private: char* bytes_; int32_t size; }; struct ConRec { Rdma::Connection::intrusive_ptr connection; Rdma::AsynchIO* data; queue queuedWrites; ConRec(Rdma::Connection::intrusive_ptr c) : connection(c) {} }; void dataError(Rdma::AsynchIO&) { cout << "Data error:\n"; } void idle(ConRec* cr, Rdma::AsynchIO& a) { // Need to make sure full is not called as it would reorder messages while (!cr->queuedWrites.empty() && a.writable()) { Rdma::Buffer* rbuf = a.getSendBuffer(); if (!rbuf) break; Buffer* buf = cr->queuedWrites.front(); cr->queuedWrites.pop(); std::copy(buf->bytes(), buf->bytes()+buf->byteCount(), rbuf->bytes()); rbuf->dataCount(buf->byteCount()); delete buf; a.queueWrite(rbuf); } } void data(ConRec* cr, Rdma::AsynchIO& a, Rdma::Buffer* b) { // Echo data back Rdma::Buffer* buf = 0; if (cr->queuedWrites.empty() && a.writable()) { buf = a.getSendBuffer(); } if (buf) { std::copy(b->bytes(), b->bytes()+b->dataCount(), buf->bytes()); buf->dataCount(b->dataCount()); a.queueWrite(buf); } else { Buffer* buf = new Buffer(b->dataCount()); std::copy(b->bytes(), b->bytes()+b->dataCount(), buf->bytes()); cr->queuedWrites.push(buf); // Try to empty queue idle(cr, a); } } void full(ConRec*, Rdma::AsynchIO&, Rdma::Buffer*) { // Shouldn't ever be called cout << "!"; } void drained(Rdma::AsynchIO&) { cout << "Drained:\n"; } void disconnected(Rdma::Connection::intrusive_ptr& ci) { ConRec* cr = ci->getContext(); cr->connection->disconnect(); cr->data->drainWriteQueue(drained); delete cr; cout << "Disconnected: " << cr << "\n"; } void connectionError(Rdma::Connection::intrusive_ptr& ci, Rdma::ErrorType) { ConRec* cr = ci->getContext(); cr->connection->disconnect(); if (cr) { cr->data->drainWriteQueue(drained); delete cr; } cout << "Connection error: " << cr << "\n"; } bool connectionRequest(Rdma::Connection::intrusive_ptr& ci, const Rdma::ConnectionParams& cp) { cout << "Incoming connection: "; // For fun reject alternate connection attempts static bool x = false; x = true; // Must create aio here so as to prepost buffers *before* we accept connection if (x) { ConRec* cr = new ConRec(ci); Rdma::AsynchIO* aio = new Rdma::AsynchIO(ci->getQueuePair(), cp.rdmaProtocolVersion, cp.maxRecvBufferSize, cp.initialXmitCredit, Rdma::DEFAULT_WR_ENTRIES, boost::bind(data, cr, _1, _2), boost::bind(idle, cr, _1), boost::bind(full, cr, _1, _2), dataError); ci->addContext(cr); cr->data = aio; cout << "Accept=>" << cr << "\n"; } else { cout << "Reject\n"; } return x; } void connected(Poller::shared_ptr poller, Rdma::Connection::intrusive_ptr& ci) { static int cnt = 0; ConRec* cr = ci->getContext(); cout << "Connected: " << cr << "(" << ++cnt << ")\n"; cr->data->start(poller); } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char* argv[]) { vector args(&argv[0], &argv[argc]); std::string port = (args.size() < 2) ? "20079" : args[1]; cout << "Listening on port: " << port << "\n"; try { boost::shared_ptr p(new Poller()); Rdma::Listener a( Rdma::ConnectionParams(16384, Rdma::DEFAULT_WR_ENTRIES), boost::bind(connected, p, _1), connectionError, disconnected, connectionRequest); SocketAddress sa("", port); a.start(p, sa); // The poller loop blocks all signals so run in its own thread Thread t(*p); ::pause(); p->shutdown(); t.join(); } catch (Rdma::Exception& e) { int err = e.getError(); cerr << "Error: " << e.what() << "(" << err << ")\n"; } } qpidc-0.16/src/qpid/sys/rdma/RdmaIO.cpp0000664000076400007640000006161311556615127020260 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/rdma/RdmaIO.h" #include "qpid/log/Statement.h" #include #include using qpid::sys::SocketAddress; using qpid::sys::DispatchHandle; using qpid::sys::Poller; using qpid::sys::ScopedLock; using qpid::sys::Mutex; namespace Rdma { // Set packing as these are 'on the wire' structures # pragma pack(push, 1) // Header structure for each transmitted frame struct FrameHeader { const static uint32_t FlagsMask = 0xf0000000; uint32_t data; // written in network order FrameHeader() {} FrameHeader(uint32_t credit, uint32_t flags = 0) { data = htonl((credit & ~FlagsMask) | (flags & FlagsMask)); } uint32_t credit() const { return ntohl(data) & ~FlagsMask; } uint32_t flags() const { return ntohl(data) & FlagsMask; } }; const size_t FrameHeaderSize = sizeof(FrameHeader); // Structure for Connection Parameters on the network // // The original version (now called 0) of these parameters had a couple of mistakes: // * No way to version the protocol (need to introduce a new protocol for iWarp) // * Used host order int32 (but only deployed on LE archs as far as we know) // so effectively was LE on the wire which is the opposite of network order. // // Fortunately the values sent were sufficiently restricted that a 16 bit short could // be carved out to indicate the protocol version as these bits were always sent as 0. // // So the current version of parameters uses the last 2 bytes to indicate the protocol // version, if this is 0 then we interpret the rest of the struct without byte swapping // to remain compatible with the previous protocol. struct NConnectionParams { uint32_t maxRecvBufferSize; uint16_t initialXmitCredit; uint16_t rdmaProtocolVersion; NConnectionParams(const ConnectionParams& c) : maxRecvBufferSize(c.rdmaProtocolVersion ? htonl(c.maxRecvBufferSize) : c.maxRecvBufferSize), initialXmitCredit(c.rdmaProtocolVersion ? htons(c.initialXmitCredit) : c.initialXmitCredit), // 0 is the same with/without byteswapping! rdmaProtocolVersion(htons(c.rdmaProtocolVersion)) {} operator ConnectionParams() const { return ConnectionParams( rdmaProtocolVersion ? ntohl(maxRecvBufferSize) : maxRecvBufferSize, rdmaProtocolVersion ? ntohs(initialXmitCredit) : initialXmitCredit, ntohs(rdmaProtocolVersion)); } }; # pragma pack(pop) class IOException : public std::exception { std::string s; public: IOException(std::string s0): s(s0) {} ~IOException() throw() {} const char* what() const throw() { return s.c_str(); } }; AsynchIO::AsynchIO( QueuePair::intrusive_ptr q, int version, int size, int xCredit, int rCount, ReadCallback rc, IdleCallback ic, FullCallback fc, ErrorCallback ec ) : protocolVersion(version), bufferSize(size), recvCredit(0), xmitCredit(xCredit), recvBufferCount(rCount), xmitBufferCount(xCredit), outstandingWrites(0), draining(false), state(IDLE), qp(q), dataHandle(*qp, boost::bind(&AsynchIO::dataEvent, this), 0, 0), readCallback(rc), idleCallback(ic), fullCallback(fc), errorCallback(ec), pendingWriteAction(boost::bind(&AsynchIO::writeEvent, this)) { if (protocolVersion > maxSupportedProtocolVersion) throw IOException("Unsupported Rdma Protocol"); qp->nonblocking(); qp->notifyRecv(); qp->notifySend(); // Prepost recv buffers before we go any further qp->allocateRecvBuffers(recvBufferCount, bufferSize+FrameHeaderSize); // Create xmit buffers, reserve space for frame header. qp->createSendBuffers(xmitBufferCount, bufferSize, FrameHeaderSize); } AsynchIO::~AsynchIO() { // Warn if we are deleting whilst there are still unreclaimed write buffers if ( outstandingWrites>0 ) QPID_LOG(error, "RDMA: qp=" << qp << ": Deleting queue before all write buffers finished"); // Turn off callbacks if necessary (before doing the deletes) if (state != STOPPED) { QPID_LOG(error, "RDMA: qp=" << qp << ": Deleting queue whilst not shutdown"); dataHandle.stopWatch(); } // TODO: It might turn out to be more efficient in high connection loads to reuse the // buffers rather than having to reregister them all the time (this would be straightforward if all // connections haver the same buffer size and harder otherwise) } void AsynchIO::start(Poller::shared_ptr poller) { dataHandle.startWatch(poller); } // State constraints // On entry: None // On exit: STOPPED // Mark for deletion/Delete this object when we have no outstanding writes void AsynchIO::stop(NotifyCallback nc) { ScopedLock l(stateLock); state = STOPPED; notifyCallback = nc; dataHandle.call(boost::bind(&AsynchIO::doStoppedCallback, this)); } namespace { void requestedCall(AsynchIO* aio, AsynchIO::RequestCallback callback) { assert(callback); callback(*aio); } } void AsynchIO::requestCallback(RequestCallback callback) { // TODO creating a function object every time isn't all that // efficient - if this becomes heavily used do something better (what?) assert(callback); dataHandle.call(boost::bind(&requestedCall, this, callback)); } // Mark writing closed (so we don't accept any more writes or make any idle callbacks) void AsynchIO::drainWriteQueue(NotifyCallback nc) { draining = true; notifyCallback = nc; } void AsynchIO::queueBuffer(Buffer* buff, int credit) { switch (protocolVersion) { case 0: if (!buff) { Buffer* ob = getSendBuffer(); // Have to send something as adapters hate it when you try to transfer 0 bytes *reinterpret_cast< uint32_t* >(ob->bytes()) = htonl(credit); ob->dataCount(sizeof(uint32_t)); qp->postSend(credit | IgnoreData, ob); } else if (credit > 0) { qp->postSend(credit, buff); } else { qp->postSend(buff); } break; case 1: if (!buff) buff = getSendBuffer(); // Add FrameHeader after frame data FrameHeader header(credit); assert(buff->dataCount() <= buff->byteCount()); // ensure app data doesn't impinge on reserved space. ::memcpy(buff->bytes()+buff->dataCount(), &header, FrameHeaderSize); buff->dataCount(buff->dataCount()+FrameHeaderSize); qp->postSend(buff); break; } } Buffer* AsynchIO::extractBuffer(const QueuePairEvent& e) { Buffer* b = e.getBuffer(); switch (protocolVersion) { case 0: { bool dataPresent = true; // Get our xmitCredit if it was sent if (e.immPresent() ) { assert(xmitCredit>=0); xmitCredit += (e.getImm() & ~FlagsMask); dataPresent = ((e.getImm() & IgnoreData) == 0); assert(xmitCredit>0); } if (!dataPresent) { b->dataCount(0); } break; } case 1: b->dataCount(b->dataCount()-FrameHeaderSize); FrameHeader header; ::memcpy(&header, b->bytes()+b->dataCount(), FrameHeaderSize); assert(xmitCredit>=0); xmitCredit += header.credit(); assert(xmitCredit>=0); break; } return b; } void AsynchIO::queueWrite(Buffer* buff) { // Make sure we don't overrun our available buffers // either at our end or the known available at the peers end if (writable()) { // TODO: We might want to batch up sending credit int creditSent = recvCredit & ~FlagsMask; queueBuffer(buff, creditSent); recvCredit -= creditSent; ++outstandingWrites; --xmitCredit; assert(xmitCredit>=0); } else { if (fullCallback) { fullCallback(*this, buff); } else { QPID_LOG(error, "RDMA: qp=" << qp << ": Write queue full, but no callback, throwing buffer away"); returnSendBuffer(buff); } } } // State constraints // On entry: None // On exit: NOTIFY_PENDING || STOPPED void AsynchIO::notifyPendingWrite() { ScopedLock l(stateLock); switch (state) { case IDLE: dataHandle.call(pendingWriteAction); // Fall Thru case NOTIFY: state = NOTIFY_PENDING; break; case NOTIFY_PENDING: case STOPPED: break; } } // State constraints // On entry: IDLE || STOPPED // On exit: IDLE || STOPPED void AsynchIO::dataEvent() { { ScopedLock l(stateLock); if (state == STOPPED) return; state = NOTIFY_PENDING; } processCompletions(); writeEvent(); } // State constraints // On entry: NOTIFY_PENDING || STOPPED // On exit: IDLE || STOPPED void AsynchIO::writeEvent() { State newState; do { { ScopedLock l(stateLock); switch (state) { case STOPPED: return; default: state = NOTIFY; } } doWriteCallback(); { ScopedLock l(stateLock); newState = state; switch (newState) { case NOTIFY_PENDING: case STOPPED: break; default: state = IDLE; } } } while (newState == NOTIFY_PENDING); } void AsynchIO::processCompletions() { QueuePair::intrusive_ptr q = qp->getNextChannelEvent(); // Re-enable notification for queue: // This needs to happen before we could do anything that could generate more work completion // events (ie the callbacks etc. in the following). // This can't make us reenter this code as the handle attached to the completion queue will still be // disabled by the poller until we leave this code qp->notifyRecv(); qp->notifySend(); int recvEvents = 0; int sendEvents = 0; // If no event do nothing if (!q) return; assert(q == qp); // Repeat until no more events do { QueuePairEvent e(qp->getNextEvent()); if (!e) break; ::ibv_wc_status status = e.getEventStatus(); if (status != IBV_WC_SUCCESS) { // Need special check for IBV_WC_WR_FLUSH_ERR here // we will get this for every send/recv queue entry that was pending // when disconnected, these aren't real errors and mostly need to be ignored if (status == IBV_WC_WR_FLUSH_ERR) { QueueDirection dir = e.getDirection(); if (dir == SEND) { Buffer* b = e.getBuffer(); ++sendEvents; returnSendBuffer(b); --outstandingWrites; } else { ++recvEvents; } continue; } errorCallback(*this); // TODO: Probably need to flush queues at this point return; } // Test if recv (or recv with imm) //::ibv_wc_opcode eventType = e.getEventType(); QueueDirection dir = e.getDirection(); if (dir == RECV) { ++recvEvents; Buffer* b = extractBuffer(e); // if there was no data sent then the message was only to update our credit if ( b->dataCount() > 0 ) { readCallback(*this, b); } // At this point the buffer has been consumed so put it back on the recv queue // TODO: Is this safe to do if the connection is disconnected already? qp->postRecv(b); // Received another message ++recvCredit; // Send recvCredit if it is large enough (it will have got this large because we've not sent anything recently) if (recvCredit > recvBufferCount/2) { // TODO: This should use RDMA write with imm as there might not ever be a buffer to receive this message // but this is a little unlikely, as to get in this state we have to have received messages without sending any // for a while so its likely we've received an credit update from the far side. if (writable()) { int creditSent = recvCredit & ~FlagsMask; queueBuffer(0, creditSent); recvCredit -= creditSent; ++outstandingWrites; --xmitCredit; assert(xmitCredit>=0); } else { QPID_LOG(warning, "RDMA: qp=" << qp << ": Unable to send unsolicited credit"); } } } else { Buffer* b = e.getBuffer(); ++sendEvents; returnSendBuffer(b); --outstandingWrites; } } while (true); // Not sure if this is expected or not if (recvEvents == 0 && sendEvents == 0) { QPID_LOG(debug, "RDMA: qp=" << qp << ": Got channel event with no recv/send completions"); } } void AsynchIO::doWriteCallback() { // TODO: maybe don't call idle unless we're low on write buffers // Keep on calling the idle routine as long as we are writable and we got something to write last call // Do callback even if there are no available free buffers as the application itself might be // holding onto buffers while (writable()) { int xc = xmitCredit; idleCallback(*this); // Check whether we actually wrote anything if (xmitCredit == xc) { QPID_LOG(debug, "RDMA: qp=" << qp << ": Called for data, but got none: xmitCredit=" << xmitCredit); return; } } checkDrained(); } void AsynchIO::checkDrained() { // If we've got all the write confirmations and we're draining // We might get deleted in the drained callback so return immediately if (draining) { if (outstandingWrites == 0) { draining = false; NotifyCallback nc; nc.swap(notifyCallback); nc(*this); } return; } } void AsynchIO::doStoppedCallback() { // Ensure we can't get any more callbacks (except for the stopped callback) dataHandle.stopWatch(); NotifyCallback nc; nc.swap(notifyCallback); nc(*this); } ConnectionManager::ConnectionManager( ErrorCallback errc, DisconnectedCallback dc ) : state(IDLE), ci(Connection::make()), handle(*ci, boost::bind(&ConnectionManager::event, this, _1), 0, 0), errorCallback(errc), disconnectedCallback(dc) { QPID_LOG(debug, "RDMA: ci=" << ci << ": Creating ConnectionManager"); ci->nonblocking(); } ConnectionManager::~ConnectionManager() { QPID_LOG(debug, "RDMA: ci=" << ci << ": Deleting ConnectionManager"); } void ConnectionManager::start(Poller::shared_ptr poller, const qpid::sys::SocketAddress& addr) { startConnection(ci, addr); handle.startWatch(poller); } void ConnectionManager::doStoppedCallback() { // Ensure we can't get any more callbacks (except for the stopped callback) handle.stopWatch(); NotifyCallback nc; nc.swap(notifyCallback); nc(*this); } void ConnectionManager::stop(NotifyCallback nc) { state = STOPPED; notifyCallback = nc; handle.call(boost::bind(&ConnectionManager::doStoppedCallback, this)); } void ConnectionManager::event(DispatchHandle&) { if (state.get() == STOPPED) return; connectionEvent(ci); } Listener::Listener( const ConnectionParams& cp, EstablishedCallback ec, ErrorCallback errc, DisconnectedCallback dc, ConnectionRequestCallback crc ) : ConnectionManager(errc, dc), checkConnectionParams(cp), connectionRequestCallback(crc), establishedCallback(ec) { } void Listener::startConnection(Connection::intrusive_ptr ci, const qpid::sys::SocketAddress& addr) { ci->bind(addr); ci->listen(); } namespace { const int64_t PoisonContext = -1; } void Listener::connectionEvent(Connection::intrusive_ptr ci) { ConnectionEvent e(ci->getNextEvent()); // If (for whatever reason) there was no event do nothing if (!e) return; // Important documentation ommision the new rdma_cm_id // you get from CONNECT_REQUEST has the same context info // as its parent listening rdma_cm_id ::rdma_cm_event_type eventType = e.getEventType(); ::rdma_conn_param conn_param = e.getConnectionParam(); Rdma::Connection::intrusive_ptr id = e.getConnection(); // Check for previous disconnection (it appears that you actually can get connection // request events after a disconnect event in rare circumstances) if (reinterpret_cast(id->getContext())==PoisonContext) return; switch (eventType) { case RDMA_CM_EVENT_CONNECT_REQUEST: { // Make sure peer has sent params we can use if (!conn_param.private_data || conn_param.private_data_len < sizeof(NConnectionParams)) { QPID_LOG(warning, "Rdma: rejecting connection attempt: unusable connection parameters"); id->reject(); break; } const NConnectionParams* rcp = static_cast(conn_param.private_data); ConnectionParams cp = *rcp; // Reject if requested msg size is bigger than we allow if ( cp.maxRecvBufferSize > checkConnectionParams.maxRecvBufferSize || cp.initialXmitCredit > checkConnectionParams.initialXmitCredit ) { QPID_LOG(warning, "Rdma: rejecting connection attempt: connection parameters out of range: (" << cp.maxRecvBufferSize << ">" << checkConnectionParams.maxRecvBufferSize << " || " << cp.initialXmitCredit << ">" << checkConnectionParams.initialXmitCredit << ")"); id->reject(&checkConnectionParams); break; } bool accept = true; if (connectionRequestCallback) accept = connectionRequestCallback(id, cp); if (accept) { // Accept connection cp.initialXmitCredit = checkConnectionParams.initialXmitCredit; id->accept(conn_param, rcp); } else { // Reject connection QPID_LOG(warning, "Rdma: rejecting connection attempt: application policy"); id->reject(); } break; } case RDMA_CM_EVENT_ESTABLISHED: establishedCallback(id); break; case RDMA_CM_EVENT_DISCONNECTED: disconnectedCallback(id); // Poison the id context so that we do no more callbacks on it id->removeContext(); id->addContext(reinterpret_cast(PoisonContext)); break; case RDMA_CM_EVENT_CONNECT_ERROR: errorCallback(id, CONNECT_ERROR); break; default: // Unexpected response errorCallback(id, UNKNOWN); //std::cerr << "Warning: unexpected response to listen - " << eventType << "\n"; } } Connector::Connector( const ConnectionParams& cp, ConnectedCallback cc, ErrorCallback errc, DisconnectedCallback dc, RejectedCallback rc ) : ConnectionManager(errc, dc), connectionParams(cp), rejectedCallback(rc), connectedCallback(cc) { } void Connector::startConnection(Connection::intrusive_ptr ci, const qpid::sys::SocketAddress& addr) { ci->resolve_addr(addr); } void Connector::connectionEvent(Connection::intrusive_ptr ci) { ConnectionEvent e(ci->getNextEvent()); // If (for whatever reason) there was no event do nothing if (!e) return; ::rdma_cm_event_type eventType = e.getEventType(); ::rdma_conn_param conn_param = e.getConnectionParam(); Rdma::Connection::intrusive_ptr id = e.getConnection(); switch (eventType) { case RDMA_CM_EVENT_ADDR_RESOLVED: // RESOLVE_ADDR ci->resolve_route(); break; case RDMA_CM_EVENT_ADDR_ERROR: // RESOLVE_ADDR errorCallback(ci, ADDR_ERROR); break; case RDMA_CM_EVENT_ROUTE_RESOLVED: { // RESOLVE_ROUTE: NConnectionParams rcp(connectionParams); ci->connect(&rcp); break; } case RDMA_CM_EVENT_ROUTE_ERROR: // RESOLVE_ROUTE: errorCallback(ci, ROUTE_ERROR); break; case RDMA_CM_EVENT_CONNECT_ERROR: // CONNECTING errorCallback(ci, CONNECT_ERROR); break; case RDMA_CM_EVENT_UNREACHABLE: // CONNECTING errorCallback(ci, UNREACHABLE); break; case RDMA_CM_EVENT_REJECTED: { // CONNECTING // We can get this event if our peer is not running on the other side // in this case we could get nearly anything in the private data: // From private_data == 0 && private_data_len == 0 (Chelsio iWarp) // to 148 bytes of zeros (Mellanox IB) // // So assume that if the the private data is absent or not the size of // the connection parameters it isn't valid ConnectionParams cp(0, 0, 0); if (conn_param.private_data && conn_param.private_data_len == sizeof(NConnectionParams)) { // Extract private data from event const NConnectionParams* rcp = static_cast(conn_param.private_data); cp = *rcp; } rejectedCallback(ci, cp); break; } case RDMA_CM_EVENT_ESTABLISHED: { // CONNECTING // Extract private data from event assert(conn_param.private_data && conn_param.private_data_len >= sizeof(NConnectionParams)); const NConnectionParams* rcp = static_cast(conn_param.private_data); ConnectionParams cp = *rcp; connectedCallback(ci, cp); break; } case RDMA_CM_EVENT_DISCONNECTED: // ESTABLISHED disconnectedCallback(ci); break; default: QPID_LOG(warning, "RDMA: Unexpected event in connect: " << eventType); } } } qpidc-0.16/src/qpid/sys/rdma/rdma_wrap.h0000664000076400007640000002145511556615127020566 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef RDMA_WRAP_H #define RDMA_WRAP_H #include #include "qpid/RefCounted.h" #include "qpid/sys/IOHandle.h" #include "qpid/sys/Mutex.h" #include #include #include #include namespace qpid { namespace sys { class SocketAddress; }} namespace Rdma { const int DEFAULT_TIMEOUT = 2000; // 2 secs const int DEFAULT_BACKLOG = 100; const int DEFAULT_CQ_ENTRIES = 256; const int DEFAULT_WR_ENTRIES = 64; extern const ::rdma_conn_param DEFAULT_CONNECT_PARAM; int deviceCount(); struct Buffer { friend class QueuePair; friend class QueuePairEvent; char* bytes() const; int32_t byteCount() const; int32_t dataCount() const; void dataCount(int32_t); private: Buffer(uint32_t lkey, char* bytes, const int32_t byteCount, const int32_t reserve=0); int32_t bufferSize; int32_t reserved; // for framing header ::ibv_sge sge; }; inline char* Buffer::bytes() const { return (char*) sge.addr; } /** return the number of bytes available for application data */ inline int32_t Buffer::byteCount() const { return bufferSize - reserved; } inline int32_t Buffer::dataCount() const { return sge.length; } inline void Buffer::dataCount(int32_t s) { // catch any attempt to overflow a buffer assert(s <= bufferSize + reserved); sge.length = s; } class Connection; enum QueueDirection { NONE, SEND, RECV }; class QueuePairEvent { boost::shared_ptr< ::ibv_cq > cq; ::ibv_wc wc; QueueDirection dir; friend class QueuePair; QueuePairEvent(); QueuePairEvent( const ::ibv_wc& w, boost::shared_ptr< ::ibv_cq > c, QueueDirection d); public: operator bool() const; bool immPresent() const; uint32_t getImm() const; QueueDirection getDirection() const; ::ibv_wc_opcode getEventType() const; ::ibv_wc_status getEventStatus() const; Buffer* getBuffer() const; }; // Wrapper for a queue pair - this has the functionality for // putting buffers on the receive queue and for sending buffers // to the other end of the connection. class QueuePair : public qpid::sys::IOHandle, public qpid::RefCounted { friend class Connection; boost::shared_ptr< ::ibv_pd > pd; boost::shared_ptr< ::ibv_mr > smr; boost::shared_ptr< ::ibv_mr > rmr; boost::shared_ptr< ::ibv_comp_channel > cchannel; boost::shared_ptr< ::ibv_cq > scq; boost::shared_ptr< ::ibv_cq > rcq; boost::shared_ptr< ::ibv_qp > qp; int outstandingSendEvents; int outstandingRecvEvents; std::vector sendBuffers; std::vector recvBuffers; qpid::sys::Mutex bufferLock; std::vector freeBuffers; QueuePair(boost::shared_ptr< ::rdma_cm_id > id); ~QueuePair(); public: typedef boost::intrusive_ptr intrusive_ptr; // Create a buffers to use for writing void createSendBuffers(int sendBufferCount, int dataSize, int headerSize); // Get a send buffer Buffer* getSendBuffer(); // Return buffer to pool after use void returnSendBuffer(Buffer* b); // Create and post recv buffers void allocateRecvBuffers(int recvBufferCount, int bufferSize); // Make channel non-blocking by making // associated fd nonblocking void nonblocking(); // If we get EAGAIN because the channel has been set non blocking // and we'd have to wait then return an empty event QueuePair::intrusive_ptr getNextChannelEvent(); QueuePairEvent getNextEvent(); void postRecv(Buffer* buf); void postSend(Buffer* buf); void postSend(uint32_t imm, Buffer* buf); void notifyRecv(); void notifySend(); }; class ConnectionEvent { friend class Connection; // The order of the members is important as we have to acknowledge // the event before destroying the ids on destruction boost::intrusive_ptr id; boost::intrusive_ptr listen_id; boost::shared_ptr< ::rdma_cm_event > event; ConnectionEvent() {} ConnectionEvent(::rdma_cm_event* e); // Default copy, assignment and destructor ok public: operator bool() const; ::rdma_cm_event_type getEventType() const; ::rdma_conn_param getConnectionParam() const; boost::intrusive_ptr getConnection () const; boost::intrusive_ptr getListenId() const; }; // For the moment this is a fairly simple wrapper for rdma_cm_id. // // NB: It allocates a protection domain (pd) per connection which means that // registered buffers can't be shared between different connections // (this can only happen between connections on the same controller in any case, // so needs careful management if used) class Connection : public qpid::sys::IOHandle, public qpid::RefCounted { boost::shared_ptr< ::rdma_event_channel > channel; boost::shared_ptr< ::rdma_cm_id > id; QueuePair::intrusive_ptr qp; void* context; friend class ConnectionEvent; friend class QueuePair; // Wrap the passed in rdma_cm_id with a Connection // this basically happens only on connection request Connection(::rdma_cm_id* i); Connection(); ~Connection(); void ensureQueuePair(); public: typedef boost::intrusive_ptr intrusive_ptr; static intrusive_ptr make(); static intrusive_ptr find(::rdma_cm_id* i); template void addContext(T* c) { // Don't allow replacing context if (!context) context = c; } void removeContext() { context = 0; } template T* getContext() { return static_cast(context); } // Make channel non-blocking by making // associated fd nonblocking void nonblocking(); // If we get EAGAIN because the channel has been set non blocking // and we'd have to wait then return an empty event ConnectionEvent getNextEvent(); void bind(const qpid::sys::SocketAddress& src_addr) const; void listen(int backlog = DEFAULT_BACKLOG) const; void resolve_addr( const qpid::sys::SocketAddress& dst_addr, int timeout_ms = DEFAULT_TIMEOUT) const; void resolve_route(int timeout_ms = DEFAULT_TIMEOUT) const; void disconnect() const; // TODO: Currently you can only connect with the default connection parameters void connect(const void* data, size_t len); void connect(); template void connect(const T* data) { connect(data, sizeof(T)); } // TODO: Not sure how to default accept params - they come from the connection request // event void accept(const ::rdma_conn_param& param, const void* data, size_t len); void accept(const ::rdma_conn_param& param); template void accept(const ::rdma_conn_param& param, const T* data) { accept(param, data, sizeof(T)); } void reject(const void* data, size_t len) const; void reject() const; template void reject(const T* data) const { reject(data, sizeof(T)); } QueuePair::intrusive_ptr getQueuePair(); std::string getLocalName() const; std::string getPeerName() const; std::string getFullName() const { return getLocalName()+"-"+getPeerName(); } }; } std::ostream& operator<<(std::ostream& o, ::rdma_cm_event_type t); #endif // RDMA_WRAP_H qpidc-0.16/src/qpid/sys/rdma/RdmaClient.cpp0000664000076400007640000001541011504701335021147 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/rdma/RdmaIO.h" #include "qpid/sys/rdma/rdma_exception.h" #include "qpid/sys/Time.h" #include "qpid/sys/Thread.h" #include #include #include #include #include #include #include #include using std::vector; using std::string; using std::cout; using std::cerr; using std::copy; using std::rand; using qpid::sys::Thread; using qpid::sys::Poller; using qpid::sys::Dispatcher; using qpid::sys::SocketAddress; using qpid::sys::AbsTime; using qpid::sys::Duration; using qpid::sys::TIME_SEC; using qpid::sys::TIME_INFINITE; namespace qpid { namespace tests { // count of messages int64_t smsgs = 0; int64_t sbytes = 0; int64_t rmsgs = 0; int64_t rbytes = 0; int target = 1000000; int msgsize = 200; AbsTime startTime; Duration sendingDuration(TIME_INFINITE); Duration fullTestDuration(TIME_INFINITE); // Random generator // This is an RNG designed by George Marsaglia see http://en.wikipedia.org/wiki/Xorshift class Xor128Generator { uint32_t x; uint32_t y; uint32_t z; uint32_t w; public: Xor128Generator() : x(123456789),y(362436069),z(521288629),w(88675123) {++(*this);} Xor128Generator& operator++() { uint32_t t = x ^ (x << 11); x = y; y = z; z = w; w = w ^ (w >> 19) ^ t ^ (t >> 8); return *this; } uint32_t operator*() { return w; } }; Xor128Generator output; Xor128Generator input; void write(Rdma::AsynchIO& aio) { while (aio.writable() && smsgs < target) { Rdma::Buffer* b = aio.getSendBuffer(); if (!b) break; b->dataCount(msgsize); uint32_t* ip = reinterpret_cast(b->bytes()); uint32_t* lip = ip + b->dataCount() / sizeof(uint32_t); while (ip != lip) {*ip++ = *output; ++output;} aio.queueWrite(b); ++smsgs; sbytes += msgsize; } } void dataError(Rdma::AsynchIO&) { cout << "Data error:\n"; } void data(Poller::shared_ptr p, Rdma::AsynchIO& aio, Rdma::Buffer* b) { ++rmsgs; rbytes += b->dataCount(); // Check message is unaltered bool match = true; uint32_t* ip = reinterpret_cast(b->bytes()); uint32_t* lip = ip + b->dataCount() / sizeof(uint32_t); while (ip != lip) { if (*ip++ != *input) {match = false; break;} ++input;} if (!match) { cout << "Data doesn't match: at msg " << rmsgs << " byte " << rbytes-b->dataCount() << " (ish)\n"; exit(1); } // When all messages have been recvd stop if (rmsgs < target) { write(aio); } else { fullTestDuration = std::min(fullTestDuration, Duration(startTime, AbsTime::now())); if (aio.incompletedWrites() == 0) p->shutdown(); } } void full(Rdma::AsynchIO& a, Rdma::Buffer* b) { // Warn as we shouldn't get here anymore cerr << "!"; // Don't need to keep buffer just adjust the counts --smsgs; sbytes -= b->dataCount(); // Give buffer back a.returnSendBuffer(b); } void idle(Poller::shared_ptr p, Rdma::AsynchIO& aio) { if (smsgs < target) { write(aio); } else { sendingDuration = std::min(sendingDuration, Duration(startTime, AbsTime::now())); if (rmsgs >= target && aio.incompletedWrites() == 0) p->shutdown(); } } void drained(Rdma::AsynchIO&) { cout << "Drained:\n"; } void connected(Poller::shared_ptr poller, Rdma::Connection::intrusive_ptr& ci, const Rdma::ConnectionParams& cp) { cout << "Connected\n"; Rdma::QueuePair::intrusive_ptr q = ci->getQueuePair(); Rdma::AsynchIO* aio = new Rdma::AsynchIO(ci->getQueuePair(), cp.rdmaProtocolVersion, cp.maxRecvBufferSize, cp.initialXmitCredit , Rdma::DEFAULT_WR_ENTRIES, boost::bind(&data, poller, _1, _2), boost::bind(&idle, poller, _1), &full, dataError); startTime = AbsTime::now(); write(*aio); aio->start(poller); } void disconnected(boost::shared_ptr p, Rdma::Connection::intrusive_ptr&) { cout << "Disconnected\n"; p->shutdown(); } void connectionError(boost::shared_ptr p, Rdma::Connection::intrusive_ptr&, const Rdma::ErrorType) { cout << "Connection error\n"; p->shutdown(); } void rejected(boost::shared_ptr p, Rdma::Connection::intrusive_ptr&, const Rdma::ConnectionParams&) { cout << "Connection rejected\n"; p->shutdown(); } }} // namespace qpid::tests using namespace qpid::tests; int main(int argc, char* argv[]) { vector args(&argv[0], &argv[argc]); string host = args[1]; string port = (args.size() < 3) ? "20079" : args[2]; if (args.size() > 3) msgsize = atoi(args[3].c_str()); cout << "Message size: " << msgsize << "\n"; try { boost::shared_ptr p(new Poller()); Rdma::Connector c( Rdma::ConnectionParams(msgsize, Rdma::DEFAULT_WR_ENTRIES), boost::bind(&connected, p, _1, _2), boost::bind(&connectionError, p, _1, _2), boost::bind(&disconnected, p, _1), boost::bind(&rejected, p, _1, _2)); SocketAddress sa(host, port); cout << "Connecting to: " << sa.asString() <<"\n"; c.start(p, sa); // The poller loop blocks all signals so run in its own thread Thread t(*p); t.join(); } catch (Rdma::Exception& e) { int err = e.getError(); cerr << "Error: " << e.what() << "(" << err << ")\n"; } cout << "Sent: " << smsgs << "msgs (" << sbytes << "bytes) in: " << double(sendingDuration)/TIME_SEC << "s: " << double(smsgs)*TIME_SEC/sendingDuration << "msgs/s(" << double(sbytes)*TIME_SEC/sendingDuration << "bytes/s)\n"; cout << "Recd: " << rmsgs << "msgs (" << rbytes << "bytes) in: " << double(fullTestDuration)/TIME_SEC << "s: " << double(rmsgs)*TIME_SEC/fullTestDuration << "msgs/s(" << double(rbytes)*TIME_SEC/fullTestDuration << "bytes/s)\n"; } qpidc-0.16/src/qpid/sys/FileSysDir.h0000775000076400007640000000335311072677026017703 0ustar00jrossjross00000000000000#ifndef QPID_SYS_FILESYSDIR_H #define QPID_SYS_FILESYSDIR_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace sys { /** * @class FileSysDir * * Represents a filesystem directory accessible from the local host. * This class simply checks existence of, and creates, a directory. It could * be added to later to list contents, etc. */ class FileSysDir { const std::string dirPath; public: FileSysDir (std::string path) : dirPath(path) {} ~FileSysDir () {} /** * Check to see if the directory exists and is a directory. Throws an * exception if there is an error checking existence or if the path * exists but is not a directory. * * @retval true if the path exists and is a directory. * @retval false if the path does not exist. */ bool exists (void) const; void mkdir(void); std::string getPath () { return dirPath; } }; }} // namespace qpid::sys #endif /*!QPID_SYS_FILESYSDIR_H*/ qpidc-0.16/src/qpid/sys/AtomicValue_mutex.h0000664000076400007640000000525511113335741021310 0ustar00jrossjross00000000000000#ifndef QPID_SYS_ATOMICVALUE_MUTEX_H #define QPID_SYS_ATOMICVALUE_MUTEX_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #if !defined(QPID_SYS_ATOMICVALUE_H) #error "This file should only be included via AtomicValue.h." #endif #include "qpid/sys/Mutex.h" namespace qpid { namespace sys { /** * Atomic value of type T. T must be an integral type of size 1,2,4 or 8 bytes. * All operations are atomic and preform a full memory barrier unless otherwise noted. */ template class AtomicValue { public: AtomicValue(T init=0) : value(init) {} // Update and return new value. inline T operator+=(T n) { Lock l(lock); return value += n; } inline T operator-=(T n) { Lock l(lock); return value -= n; } inline T operator++() { return *this += 1; } inline T operator--() { return *this -= 1; } // Update and return old value. inline T fetchAndAdd(T n) { Lock l(lock); T old=value; value += n; return old; } inline T fetchAndSub(T n) { Lock l(lock); T old=value; value -= n; return old; } inline T operator++(int) { return fetchAndAdd(1); } inline T operator--(int) { return fetchAndSub(1); } AtomicValue& operator=(T newval) { Lock l(lock); value = newval; return *this; } /** If current value == testval then set to newval. Returns the old value. */ T valueCompareAndSwap(T testval, T newval) { Lock l(lock); T old=value; if (value == testval) value = newval; return old; } /** If current value == testval then set to newval. Returns true if the swap was performed. */ bool boolCompareAndSwap(T testval, T newval) { Lock l(lock); if (value == testval) { value = newval; return true; } return false; } T get() const { Lock l(lock); return value; } private: typedef Mutex::ScopedLock Lock; T value; mutable Mutex lock; }; }} // namespace qpid::sys #endif /*!QPID_SYS_ATOMICVALUE_MUTEX_H*/ qpidc-0.16/src/qpid/sys/AsynchIO.h0000664000076400007640000001276311567535070017346 0ustar00jrossjross00000000000000#ifndef _sys_AsynchIO #define _sys_AsynchIO /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include "qpid/CommonImportExport.h" #include #include #include namespace qpid { namespace sys { class Socket; class Poller; /* * Asynchronous acceptor: accepts connections then does a callback with the * accepted fd */ class AsynchAcceptor { public: typedef boost::function1 Callback; QPID_COMMON_EXTERN static AsynchAcceptor* create(const Socket& s, Callback callback); virtual ~AsynchAcceptor() {}; virtual void start(boost::shared_ptr poller) = 0; }; /* * Asynchronous connector: starts the process of initiating a connection and * invokes a callback when completed or failed. */ class AsynchConnector { public: typedef boost::function1 ConnectedCallback; typedef boost::function3 FailedCallback; // Call create() to allocate a new AsynchConnector object with the // specified poller, addressing, and callbacks. // This method is implemented in platform-specific code to // create a correctly typed object. The platform code also manages // deletes. To correctly manage heaps when needed, the allocate and // delete should both be done from the same class/library. QPID_COMMON_EXTERN static AsynchConnector* create(const Socket& s, const std::string& hostname, const std::string& port, ConnectedCallback connCb, FailedCallback failCb); virtual void start(boost::shared_ptr poller) = 0; virtual void stop() {}; protected: AsynchConnector() {} virtual ~AsynchConnector() {} }; struct AsynchIOBufferBase { char* const bytes; const int32_t byteCount; int32_t dataStart; int32_t dataCount; AsynchIOBufferBase(char* const b, const int32_t s) : bytes(b), byteCount(s), dataStart(0), dataCount(0) {} virtual ~AsynchIOBufferBase() {} void squish() { if (dataStart != 0) { ::memmove(bytes, bytes + dataStart, dataCount); dataStart = 0; } } }; /* * Asychronous reader/writer: * Reader accepts buffers to read into; reads into the provided buffers * and then does a callback with the buffer and amount read. Optionally it * can callback when there is something to read but no buffer to read it into. * * Writer accepts a buffer and queues it for writing; can also be given * a callback for when writing is "idle" (ie fd is writable, but nothing * to write). */ class AsynchIO { public: typedef AsynchIOBufferBase BufferBase; typedef boost::function2 ReadCallback; typedef boost::function1 EofCallback; typedef boost::function1 DisconnectCallback; typedef boost::function2 ClosedCallback; typedef boost::function1 BuffersEmptyCallback; typedef boost::function1 IdleCallback; typedef boost::function1 RequestCallback; // Call create() to allocate a new AsynchIO object with the specified // callbacks. This method is implemented in platform-specific code to // create a correctly typed object. The platform code also manages // deletes. To correctly manage heaps when needed, the allocate and // delete should both be done from the same class/library. QPID_COMMON_EXTERN static AsynchIO* create(const Socket& s, ReadCallback rCb, EofCallback eofCb, DisconnectCallback disCb, ClosedCallback cCb = 0, BuffersEmptyCallback eCb = 0, IdleCallback iCb = 0); public: virtual void queueForDeletion() = 0; virtual void start(boost::shared_ptr poller) = 0; virtual void queueReadBuffer(BufferBase* buff) = 0; virtual void unread(BufferBase* buff) = 0; virtual void queueWrite(BufferBase* buff) = 0; virtual void notifyPendingWrite() = 0; virtual void queueWriteClose() = 0; virtual bool writeQueueEmpty() = 0; virtual void startReading() = 0; virtual void stopReading() = 0; virtual void requestCallback(RequestCallback) = 0; virtual BufferBase* getQueuedBuffer() = 0; protected: // Derived class manages lifetime; must be constructed using the // static create() method. Deletes not allowed from outside. AsynchIO() {} virtual ~AsynchIO() {} }; }} #endif // _sys_AsynchIO qpidc-0.16/src/qpid/sys/PipeHandle.h0000775000076400007640000000313411177660733017677 0ustar00jrossjross00000000000000#ifndef _sys_PipeHandle_h #define _sys_PipeHandle_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include "qpid/CommonImportExport.h" #include // This class is a portability wrapper around pipe fds. // It currently exists primarily and solely for the purpose of // integration with single-threaded components that require QMF // integration through a signalling fd. namespace qpid { namespace sys { class PipeHandle { private: int writeFd; int readFd; public: QPID_COMMON_EXTERN PipeHandle(bool nonBlocking=true); QPID_COMMON_EXTERN ~PipeHandle(); QPID_COMMON_EXTERN int read(void* buf, size_t bufSize); QPID_COMMON_EXTERN int write(const void* buf, size_t bufSize); QPID_COMMON_EXTERN int getReadHandle(); }; }} #endif /*!_sys_PipeHandle_h*/ qpidc-0.16/src/qpid/agent/0000775000076400007640000000000011752725715015772 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/agent/ManagementAgentImpl.cpp0000664000076400007640000014060111622246674022353 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/management/Manageable.h" #include "qpid/management/ManagementObject.h" #include "qpid/log/Statement.h" #include "qpid/agent/ManagementAgentImpl.h" #include "qpid/amqp_0_10/Codecs.h" #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using namespace qpid::management; using namespace qpid::sys; using namespace std; using std::stringstream; using std::ofstream; using std::ifstream; using std::string; using std::endl; using qpid::types::Variant; using qpid::amqp_0_10::MapCodec; using qpid::amqp_0_10::ListCodec; namespace { qpid::sys::Mutex lock; bool disabled = false; ManagementAgent* agent = 0; int refCount = 0; const string defaultVendorName("vendor"); const string defaultProductName("product"); // Create a valid binding key substring by // replacing all '.' chars with '_' const string keyifyNameStr(const string& name) { string n2 = name; size_t pos = n2.find('.'); while (pos != n2.npos) { n2.replace(pos, 1, "_"); pos = n2.find('.', pos); } return n2; } } ManagementAgent::Singleton::Singleton(bool disableManagement) { sys::Mutex::ScopedLock _lock(lock); if (disableManagement && !disabled) { disabled = true; assert(refCount == 0); // can't disable after agent has been allocated } if (refCount == 0 && !disabled) agent = new ManagementAgentImpl(); refCount++; } ManagementAgent::Singleton::~Singleton() { sys::Mutex::ScopedLock _lock(lock); refCount--; if (refCount == 0 && !disabled) { delete agent; agent = 0; } } ManagementAgent* ManagementAgent::Singleton::getInstance() { return agent; } const string ManagementAgentImpl::storeMagicNumber("MA02"); ManagementAgentImpl::ManagementAgentImpl() : interval(10), extThread(false), pipeHandle(0), notifyCallback(0), notifyContext(0), notifyable(0), inCallback(false), initialized(false), connected(false), useMapMsg(false), lastFailure("never connected"), topicExchange("qmf.default.topic"), directExchange("qmf.default.direct"), schemaTimestamp(Duration(EPOCH, now())), publishAllData(true), requestedBrokerBank(0), requestedAgentBank(0), assignedBrokerBank(0), assignedAgentBank(0), bootSequence(0), maxV2ReplyObjs(10), // KAG todo: make this a tuneable parameter connThreadBody(*this), connThread(connThreadBody), pubThreadBody(*this), pubThread(pubThreadBody) { } ManagementAgentImpl::~ManagementAgentImpl() { // shutdown & cleanup all threads connThreadBody.close(); pubThreadBody.close(); connThread.join(); pubThread.join(); if (pipeHandle) { delete pipeHandle; pipeHandle = 0; } } void ManagementAgentImpl::setName(const string& vendor, const string& product, const string& instance) { if (vendor.find(':') != vendor.npos) { throw Exception("vendor string cannot contain a ':' character."); } if (product.find(':') != product.npos) { throw Exception("product string cannot contain a ':' character."); } attrMap["_vendor"] = vendor; attrMap["_product"] = product; if (!instance.empty()) { attrMap["_instance"] = instance; } } void ManagementAgentImpl::getName(string& vendor, string& product, string& instance) { vendor = std::string(attrMap["_vendor"]); product = std::string(attrMap["_product"]); instance = std::string(attrMap["_instance"]); } const std::string& ManagementAgentImpl::getAddress() { return name_address; } void ManagementAgentImpl::init(const string& brokerHost, uint16_t brokerPort, uint16_t intervalSeconds, bool useExternalThread, const string& _storeFile, const string& uid, const string& pwd, const string& mech, const string& proto) { management::ConnectionSettings settings; settings.protocol = proto; settings.host = brokerHost; settings.port = brokerPort; settings.username = uid; settings.password = pwd; settings.mechanism = mech; settings.heartbeat = 10; init(settings, intervalSeconds, useExternalThread, _storeFile); } void ManagementAgentImpl::init(const qpid::management::ConnectionSettings& settings, uint16_t intervalSeconds, bool useExternalThread, const string& _storeFile) { std::string cfgVendor, cfgProduct, cfgInstance; interval = intervalSeconds; extThread = useExternalThread; storeFile = _storeFile; nextObjectId = 1; // // Convert from management::ConnectionSettings to client::ConnectionSettings // connectionSettings.protocol = settings.protocol; connectionSettings.host = settings.host; connectionSettings.port = settings.port; connectionSettings.virtualhost = settings.virtualhost; connectionSettings.username = settings.username; connectionSettings.password = settings.password; connectionSettings.mechanism = settings.mechanism; connectionSettings.locale = settings.locale; connectionSettings.heartbeat = settings.heartbeat; connectionSettings.maxChannels = settings.maxChannels; connectionSettings.maxFrameSize = settings.maxFrameSize; connectionSettings.bounds = settings.bounds; connectionSettings.tcpNoDelay = settings.tcpNoDelay; connectionSettings.service = settings.service; connectionSettings.minSsf = settings.minSsf; connectionSettings.maxSsf = settings.maxSsf; retrieveData(cfgVendor, cfgProduct, cfgInstance); bootSequence++; if ((bootSequence & 0xF000) != 0) bootSequence = 1; // setup the agent's name. The name may be set via a call to setName(). If setName() // has not been called, the name can be read from the configuration file. If there is // no name in the configuration file, a unique default name is provided. if (attrMap.empty()) { // setName() never called by application, so use names retrieved from config, otherwise defaults. setName(cfgVendor.empty() ? defaultVendorName : cfgVendor, cfgProduct.empty() ? defaultProductName : cfgProduct, cfgInstance.empty() ? qpid::types::Uuid(true).str() : cfgInstance); } else if (attrMap.find("_instance") == attrMap.end()) { // setName() called, but instance was not specified, use config or generate a uuid setName(attrMap["_vendor"].asString(), attrMap["_product"].asString(), cfgInstance.empty() ? qpid::types::Uuid(true).str() : cfgInstance); } name_address = attrMap["_vendor"].asString() + ":" + attrMap["_product"].asString() + ":" + attrMap["_instance"].asString(); vendorNameKey = keyifyNameStr(attrMap["_vendor"].asString()); productNameKey = keyifyNameStr(attrMap["_product"].asString()); instanceNameKey = keyifyNameStr(attrMap["_instance"].asString()); attrMap["_name"] = name_address; storeData(true); QPID_LOG(info, "QMF Agent Initialized: broker=" << settings.host << ":" << settings.port << " interval=" << intervalSeconds << " storeFile=" << _storeFile << " name=" << name_address); initialized = true; } void ManagementAgentImpl::registerClass(const string& packageName, const string& className, uint8_t* md5Sum, ManagementObject::writeSchemaCall_t schemaCall) { sys::Mutex::ScopedLock lock(agentLock); PackageMap::iterator pIter = findOrAddPackage(packageName); addClassLocal(ManagementItem::CLASS_KIND_TABLE, pIter, className, md5Sum, schemaCall); } void ManagementAgentImpl::registerEvent(const string& packageName, const string& eventName, uint8_t* md5Sum, ManagementObject::writeSchemaCall_t schemaCall) { sys::Mutex::ScopedLock lock(agentLock); PackageMap::iterator pIter = findOrAddPackage(packageName); addClassLocal(ManagementItem::CLASS_KIND_EVENT, pIter, eventName, md5Sum, schemaCall); } // old-style add object: 64bit id - deprecated ObjectId ManagementAgentImpl::addObject(ManagementObject* object, uint64_t persistId) { std::string key; if (persistId) { key = boost::lexical_cast(persistId); } return addObject(object, key, persistId != 0); } // new style add object - use this approach! ObjectId ManagementAgentImpl::addObject(ManagementObject* object, const std::string& key, bool persistent) { sys::Mutex::ScopedLock lock(addLock); uint16_t sequence = persistent ? 0 : bootSequence; ObjectId objectId(&attachment, 0, sequence); if (key.empty()) objectId.setV2Key(*object); // let object generate the key else objectId.setV2Key(key); objectId.setAgentName(name_address); object->setObjectId(objectId); newManagementObjects[objectId] = boost::shared_ptr(object); return objectId; } void ManagementAgentImpl::raiseEvent(const ManagementEvent& event, severity_t severity) { static const std::string severityStr[] = { "emerg", "alert", "crit", "error", "warn", "note", "info", "debug" }; string content; stringstream key; Variant::Map headers; { sys::Mutex::ScopedLock lock(agentLock); Buffer outBuffer(eventBuffer, MA_BUFFER_SIZE); uint8_t sev = (severity == SEV_DEFAULT) ? event.getSeverity() : (uint8_t) severity; // key << "console.event." << assignedBrokerBank << "." << assignedAgentBank << "." << // event.getPackageName() << "." << event.getEventName(); key << "agent.ind.event." << keyifyNameStr(event.getPackageName()) << "." << keyifyNameStr(event.getEventName()) << "." << severityStr[sev] << "." << vendorNameKey << "." << productNameKey << "." << instanceNameKey; Variant::Map map_; Variant::Map schemaId; Variant::Map values; map_["_schema_id"] = mapEncodeSchemaId(event.getPackageName(), event.getEventName(), event.getMd5Sum(), ManagementItem::CLASS_KIND_EVENT); event.mapEncode(values); map_["_values"] = values; map_["_timestamp"] = uint64_t(Duration(EPOCH, now())); map_["_severity"] = sev; headers["method"] = "indication"; headers["qmf.opcode"] = "_data_indication"; headers["qmf.content"] = "_event"; headers["qmf.agent"] = name_address; Variant::List list; list.push_back(map_); ListCodec::encode(list, content); } connThreadBody.sendBuffer(content, "", headers, topicExchange, key.str(), "amqp/list"); } uint32_t ManagementAgentImpl::pollCallbacks(uint32_t callLimit) { sys::Mutex::ScopedLock lock(agentLock); if (inCallback) { QPID_LOG(critical, "pollCallbacks invoked from the agent's thread!"); return 0; } for (uint32_t idx = 0; callLimit == 0 || idx < callLimit; idx++) { if (methodQueue.empty()) break; QueuedMethod* item = methodQueue.front(); methodQueue.pop_front(); { sys::Mutex::ScopedUnlock unlock(agentLock); invokeMethodRequest(item->body, item->cid, item->replyToExchange, item->replyToKey, item->userId); delete item; } } if (pipeHandle != 0) { char rbuf[100]; while (pipeHandle->read(rbuf, 100) > 0) ; // Consume all signaling bytes } return methodQueue.size(); } int ManagementAgentImpl::getSignalFd() { if (extThread) { if (pipeHandle == 0) pipeHandle = new PipeHandle(true); return pipeHandle->getReadHandle(); } return -1; } void ManagementAgentImpl::setSignalCallback(cb_t callback, void* context) { sys::Mutex::ScopedLock lock(agentLock); notifyCallback = callback; notifyContext = context; } void ManagementAgentImpl::setSignalCallback(Notifyable& _notifyable) { sys::Mutex::ScopedLock lock(agentLock); notifyable = &_notifyable; } void ManagementAgentImpl::startProtocol() { sendHeartbeat(); { sys::Mutex::ScopedLock lock(agentLock); publishAllData = true; } } void ManagementAgentImpl::storeData(bool requested) { if (!storeFile.empty()) { ofstream outFile(storeFile.c_str()); uint32_t brokerBankToWrite = requested ? requestedBrokerBank : assignedBrokerBank; uint32_t agentBankToWrite = requested ? requestedAgentBank : assignedAgentBank; if (outFile.good()) { outFile << storeMagicNumber << " " << brokerBankToWrite << " " << agentBankToWrite << " " << bootSequence << endl; if (attrMap.find("_vendor") != attrMap.end()) outFile << "vendor=" << attrMap["_vendor"] << endl; if (attrMap.find("_product") != attrMap.end()) outFile << "product=" << attrMap["_product"] << endl; if (attrMap.find("_instance") != attrMap.end()) outFile << "instance=" << attrMap["_instance"] << endl; outFile.close(); } } } void ManagementAgentImpl::retrieveData(std::string& vendor, std::string& product, std::string& inst) { vendor.clear(); product.clear(); inst.clear(); if (!storeFile.empty()) { ifstream inFile(storeFile.c_str()); string mn; if (inFile.good()) { inFile >> mn; if (mn == storeMagicNumber) { std::string inText; inFile >> requestedBrokerBank; inFile >> requestedAgentBank; inFile >> bootSequence; while (inFile.good()) { std::getline(inFile, inText); if (!inText.compare(0, 7, "vendor=")) { vendor = inText.substr(7); QPID_LOG(debug, "read vendor name [" << vendor << "] from configuration file."); } else if (!inText.compare(0, 8, "product=")) { product = inText.substr(8); QPID_LOG(debug, "read product name [" << product << "] from configuration file."); } else if (!inText.compare(0, 9, "instance=")) { inst = inText.substr(9); QPID_LOG(debug, "read instance name [" << inst << "] from configuration file."); } } } inFile.close(); } } } void ManagementAgentImpl::sendHeartbeat() { static const string addr_key_base("agent.ind.heartbeat."); Variant::Map map; Variant::Map headers; string content; std::stringstream addr_key; addr_key << addr_key_base << vendorNameKey << "." << productNameKey << "." << instanceNameKey; headers["method"] = "indication"; headers["qmf.opcode"] = "_agent_heartbeat_indication"; headers["qmf.agent"] = name_address; getHeartbeatContent(map); MapCodec::encode(map, content); // Set TTL (in msecs) on outgoing heartbeat indications based on the interval // time to prevent stale heartbeats from getting to the consoles. connThreadBody.sendBuffer(content, "", headers, topicExchange, addr_key.str(), "amqp/map", interval * 2 * 1000); QPID_LOG(trace, "SENT AgentHeartbeat name=" << name_address); } void ManagementAgentImpl::sendException(const string& rte, const string& rtk, const string& cid, const string& text, uint32_t code) { Variant::Map map; Variant::Map headers; Variant::Map values; string content; headers["method"] = "indication"; headers["qmf.opcode"] = "_exception"; headers["qmf.agent"] = name_address; values["error_code"] = code; values["error_text"] = text; map["_values"] = values; MapCodec::encode(map, content); connThreadBody.sendBuffer(content, cid, headers, rte, rtk); QPID_LOG(trace, "SENT Exception code=" << code <<" text=" << text); } void ManagementAgentImpl::handleSchemaRequest(Buffer& inBuffer, uint32_t sequence, const string& rte, const string& rtk) { string packageName; SchemaClassKey key; uint32_t outLen(0); char localBuffer[MA_BUFFER_SIZE]; Buffer outBuffer(localBuffer, MA_BUFFER_SIZE); bool found(false); inBuffer.getShortString(packageName); inBuffer.getShortString(key.name); inBuffer.getBin128(key.hash); QPID_LOG(trace, "RCVD SchemaRequest: package=" << packageName << " class=" << key.name); { sys::Mutex::ScopedLock lock(agentLock); PackageMap::iterator pIter = packages.find(packageName); if (pIter != packages.end()) { ClassMap& cMap = pIter->second; ClassMap::iterator cIter = cMap.find(key); if (cIter != cMap.end()) { SchemaClass& schema = cIter->second; string body; encodeHeader(outBuffer, 's', sequence); schema.writeSchemaCall(body); outBuffer.putRawData(body); outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); found = true; } } } if (found) { connThreadBody.sendBuffer(outBuffer, outLen, rte, rtk); QPID_LOG(trace, "SENT SchemaInd: package=" << packageName << " class=" << key.name); } } void ManagementAgentImpl::handleConsoleAddedIndication() { sys::Mutex::ScopedLock lock(agentLock); publishAllData = true; QPID_LOG(trace, "RCVD ConsoleAddedInd"); } void ManagementAgentImpl::invokeMethodRequest(const string& body, const string& cid, const string& rte, const string& rtk, const string& userId) { string methodName; bool failed = false; Variant::Map inMap; Variant::Map outMap; Variant::Map::const_iterator oid, mid; string content; MapCodec::decode(body, inMap); if ((oid = inMap.find("_object_id")) == inMap.end() || (mid = inMap.find("_method_name")) == inMap.end()) { sendException(rte, rtk, cid, Manageable::StatusText(Manageable::STATUS_PARAMETER_INVALID), Manageable::STATUS_PARAMETER_INVALID); failed = true; } else { string methodName; ObjectId objId; Variant::Map inArgs; Variant::Map callMap; try { // conversions will throw if input is invalid. objId = ObjectId(oid->second.asMap()); methodName = mid->second.getString(); mid = inMap.find("_arguments"); if (mid != inMap.end()) { inArgs = (mid->second).asMap(); } QPID_LOG(trace, "Invoking Method: name=" << methodName << " args=" << inArgs); boost::shared_ptr oPtr; { sys::Mutex::ScopedLock lock(agentLock); ObjectMap::iterator iter = managementObjects.find(objId); if (iter != managementObjects.end() && !iter->second->isDeleted()) oPtr = iter->second; } if (oPtr.get() == 0) { sendException(rte, rtk, cid, Manageable::StatusText(Manageable::STATUS_UNKNOWN_OBJECT), Manageable::STATUS_UNKNOWN_OBJECT); failed = true; } else { oPtr->doMethod(methodName, inArgs, callMap, userId); if (callMap["_status_code"].asUint32() == 0) { outMap["_arguments"] = Variant::Map(); for (Variant::Map::const_iterator iter = callMap.begin(); iter != callMap.end(); iter++) if (iter->first != "_status_code" && iter->first != "_status_text") outMap["_arguments"].asMap()[iter->first] = iter->second; } else { sendException(rte, rtk, cid, callMap["_status_text"], callMap["_status_code"]); failed = true; } } } catch(types::InvalidConversion& e) { sendException(rte, rtk, cid, e.what(), Manageable::STATUS_EXCEPTION); failed = true; } } if (!failed) { Variant::Map headers; headers["method"] = "response"; headers["qmf.agent"] = name_address; headers["qmf.opcode"] = "_method_response"; QPID_LOG(trace, "SENT MethodResponse map=" << outMap); MapCodec::encode(outMap, content); connThreadBody.sendBuffer(content, cid, headers, rte, rtk); } } void ManagementAgentImpl::handleGetQuery(const string& body, const string& cid, const string& rte, const string& rtk) { moveNewObjectsLH(); Variant::Map inMap; Variant::Map::const_iterator i; Variant::Map headers; MapCodec::decode(body, inMap); QPID_LOG(trace, "RCVD GetQuery: map=" << inMap << " cid=" << cid); headers["method"] = "response"; headers["qmf.opcode"] = "_query_response"; headers["qmf.agent"] = name_address; headers["partial"] = Variant(); Variant::List list_; Variant::Map map_; Variant::Map values; Variant::Map oidMap; string content; /* * Unpack the _what element of the query. Currently we only support OBJECT queries. */ i = inMap.find("_what"); if (i == inMap.end()) { sendException(rte, rtk, cid, "_what element missing in Query"); return; } if (i->second.getType() != qpid::types::VAR_STRING) { sendException(rte, rtk, cid, "_what element is not a string"); return; } if (i->second.asString() == "OBJECT") { headers["qmf.content"] = "_data"; /* * Unpack the _object_id element of the query if it is present. If it is present, find that one * object and return it. If it is not present, send a class-based result. */ i = inMap.find("_object_id"); if (i != inMap.end() && i->second.getType() == qpid::types::VAR_MAP) { ObjectId objId(i->second.asMap()); boost::shared_ptr object; { sys::Mutex::ScopedLock lock(agentLock); ObjectMap::iterator iter = managementObjects.find(objId); if (iter != managementObjects.end()) object = iter->second; } if (object.get() != 0) { if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); object->mapEncodeValues(values, true, true); // write both stats and properties objId.mapEncode(oidMap); map_["_values"] = values; map_["_object_id"] = oidMap; object->writeTimestamps(map_); map_["_schema_id"] = mapEncodeSchemaId(object->getPackageName(), object->getClassName(), object->getMd5Sum()); list_.push_back(map_); headers.erase("partial"); ListCodec::encode(list_, content); connThreadBody.sendBuffer(content, cid, headers, rte, rtk, "amqp/list"); QPID_LOG(trace, "SENT QueryResponse (query by object_id) to=" << rte << "/" << rtk); return; } } else { // match using schema_id, if supplied string className; string packageName; i = inMap.find("_schema_id"); if (i != inMap.end() && i->second.getType() == qpid::types::VAR_MAP) { const Variant::Map& schemaIdMap(i->second.asMap()); Variant::Map::const_iterator s_iter = schemaIdMap.find("_class_name"); if (s_iter != schemaIdMap.end() && s_iter->second.getType() == qpid::types::VAR_STRING) className = s_iter->second.asString(); s_iter = schemaIdMap.find("_package_name"); if (s_iter != schemaIdMap.end() && s_iter->second.getType() == qpid::types::VAR_STRING) packageName = s_iter->second.asString(); typedef list > StageList; StageList staging; { sys::Mutex::ScopedLock lock(agentLock); for (ObjectMap::iterator iter = managementObjects.begin(); iter != managementObjects.end(); iter++) { ManagementObject* object = iter->second.get(); if (object->getClassName() == className && (packageName.empty() || object->getPackageName() == packageName)) staging.push_back(iter->second); } } unsigned int objCount = 0; for (StageList::iterator iter = staging.begin(); iter != staging.end(); iter++) { ManagementObject* object = iter->get(); if (object->getClassName() == className && (packageName.empty() || object->getPackageName() == packageName)) { values.clear(); oidMap.clear(); map_.clear(); if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); object->mapEncodeValues(values, true, true); // write both stats and properties object->getObjectId().mapEncode(oidMap); map_["_values"] = values; map_["_object_id"] = oidMap; object->writeTimestamps(map_); map_["_schema_id"] = mapEncodeSchemaId(object->getPackageName(), object->getClassName(), object->getMd5Sum()); list_.push_back(map_); if (++objCount >= maxV2ReplyObjs) { objCount = 0; ListCodec::encode(list_, content); connThreadBody.sendBuffer(content, cid, headers, rte, rtk, "amqp/list"); QPID_LOG(trace, "SENT QueryResponse (query by schema_id) to=" << rte << "/" << rtk); content.clear(); list_.clear(); } } } } } // Send last "non-partial" message to indicate CommandComplete headers.erase("partial"); ListCodec::encode(list_, content); connThreadBody.sendBuffer(content, cid, headers, rte, rtk, "amqp/list"); QPID_LOG(trace, "SENT QueryResponse (last message, no 'partial' indicator) to=" << rte << "/" << rtk); } else if (i->second.asString() == "SCHEMA_ID") { headers["qmf.content"] = "_schema_id"; /** * @todo - support for a predicate. For now, send a list of all known schema class keys. */ for (PackageMap::iterator pIter = packages.begin(); pIter != packages.end(); pIter++) { for (ClassMap::iterator cIter = pIter->second.begin(); cIter != pIter->second.end(); cIter++) { list_.push_back(mapEncodeSchemaId( pIter->first, cIter->first.name, cIter->first.hash, cIter->second.kind )); } } headers.erase("partial"); ListCodec::encode(list_, content); connThreadBody.sendBuffer(content, cid, headers, rte, rtk, "amqp/list"); QPID_LOG(trace, "SENT QueryResponse (SchemaId) to=" << rte << "/" << rtk); } else { // Unknown query target sendException(rte, rtk, cid, "Query for _what => '" + i->second.asString() + "' not supported"); } } void ManagementAgentImpl::handleLocateRequest(const string&, const string& cid, const string& rte, const string& rtk) { QPID_LOG(trace, "RCVD AgentLocateRequest"); Variant::Map map; Variant::Map headers; string content; headers["method"] = "indication"; headers["qmf.opcode"] = "_agent_locate_response"; headers["qmf.agent"] = name_address; getHeartbeatContent(map); MapCodec::encode(map, content); connThreadBody.sendBuffer(content, cid, headers, rte, rtk); QPID_LOG(trace, "SENT AgentLocateResponse replyTo=" << rte << "/" << rtk); { sys::Mutex::ScopedLock lock(agentLock); publishAllData = true; } } void ManagementAgentImpl::handleMethodRequest(const string& body, const string& cid, const string& rte, const string& rtk, const string& userId) { if (extThread) { sys::Mutex::ScopedLock lock(agentLock); methodQueue.push_back(new QueuedMethod(cid, rte, rtk, body, userId)); if (pipeHandle != 0) { pipeHandle->write("X", 1); } else if (notifyable != 0) { inCallback = true; { sys::Mutex::ScopedUnlock unlock(agentLock); notifyable->notify(); } inCallback = false; } else if (notifyCallback != 0) { inCallback = true; { sys::Mutex::ScopedUnlock unlock(agentLock); notifyCallback(notifyContext); } inCallback = false; } } else { invokeMethodRequest(body, cid, rte, rtk, userId); } QPID_LOG(trace, "RCVD MethodRequest"); } void ManagementAgentImpl::received(Message& msg) { string replyToExchange; string replyToKey; framing::MessageProperties mp = msg.getMessageProperties(); if (mp.hasReplyTo()) { const framing::ReplyTo& rt = mp.getReplyTo(); replyToExchange = rt.getExchange(); replyToKey = rt.getRoutingKey(); } string userId; if (mp.hasUserId()) userId = mp.getUserId(); if (mp.hasAppId() && mp.getAppId() == "qmf2") { string opcode = mp.getApplicationHeaders().getAsString("qmf.opcode"); string cid = msg.getMessageProperties().getCorrelationId(); if (opcode == "_agent_locate_request") handleLocateRequest(msg.getData(), cid, replyToExchange, replyToKey); else if (opcode == "_method_request") handleMethodRequest(msg.getData(), cid, replyToExchange, replyToKey, userId); else if (opcode == "_query_request") handleGetQuery(msg.getData(), cid, replyToExchange, replyToKey); else { QPID_LOG(warning, "Support for QMF V2 Opcode [" << opcode << "] TBD!!!"); } return; } // old preV2 binary messages uint32_t sequence; string data = msg.getData(); Buffer inBuffer(const_cast(data.c_str()), data.size()); uint8_t opcode; if (checkHeader(inBuffer, &opcode, &sequence)) { if (opcode == 'S') handleSchemaRequest(inBuffer, sequence, replyToExchange, replyToKey); else if (opcode == 'x') handleConsoleAddedIndication(); else QPID_LOG(warning, "Ignoring old-format QMF Request! opcode=" << char(opcode)); } } void ManagementAgentImpl::encodeHeader(Buffer& buf, uint8_t opcode, uint32_t seq) { buf.putOctet('A'); buf.putOctet('M'); buf.putOctet('2'); buf.putOctet(opcode); buf.putLong (seq); } Variant::Map ManagementAgentImpl::mapEncodeSchemaId(const string& pname, const string& cname, const uint8_t *md5Sum, uint8_t type) { Variant::Map map_; map_["_package_name"] = pname; map_["_class_name"] = cname; map_["_hash"] = types::Uuid(md5Sum); if (type == ManagementItem::CLASS_KIND_EVENT) map_["_type"] = "_event"; else map_["_type"] = "_data"; return map_; } bool ManagementAgentImpl::checkHeader(Buffer& buf, uint8_t *opcode, uint32_t *seq) { if (buf.getSize() < 8) return false; uint8_t h1 = buf.getOctet(); uint8_t h2 = buf.getOctet(); uint8_t h3 = buf.getOctet(); *opcode = buf.getOctet(); *seq = buf.getLong(); return h1 == 'A' && h2 == 'M' && h3 == '2'; } ManagementAgentImpl::PackageMap::iterator ManagementAgentImpl::findOrAddPackage(const string& name) { PackageMap::iterator pIter = packages.find(name); if (pIter != packages.end()) return pIter; // No such package found, create a new map entry. pair result = packages.insert(pair(name, ClassMap())); return result.first; } void ManagementAgentImpl::moveNewObjectsLH() { sys::Mutex::ScopedLock lock(addLock); for (ObjectMap::iterator iter = newManagementObjects.begin(); iter != newManagementObjects.end(); iter++) managementObjects[iter->first] = iter->second; newManagementObjects.clear(); } void ManagementAgentImpl::addClassLocal(uint8_t classKind, PackageMap::iterator pIter, const string& className, uint8_t* md5Sum, ManagementObject::writeSchemaCall_t schemaCall) { SchemaClassKey key; ClassMap& cMap = pIter->second; key.name = className; memcpy(&key.hash, md5Sum, 16); ClassMap::iterator cIter = cMap.find(key); if (cIter != cMap.end()) return; // No such class found, create a new class with local information. cMap.insert(pair(key, SchemaClass(schemaCall, classKind))); schemaTimestamp = Duration(EPOCH, now()); QPID_LOG(trace, "Updated schema timestamp, now=" << uint64_t(schemaTimestamp)); } void ManagementAgentImpl::encodePackageIndication(Buffer& buf, PackageMap::iterator pIter) { buf.putShortString((*pIter).first); QPID_LOG(trace, "SENT PackageInd: package=" << (*pIter).first); } void ManagementAgentImpl::encodeClassIndication(Buffer& buf, PackageMap::iterator pIter, ClassMap::iterator cIter) { SchemaClassKey key = (*cIter).first; buf.putOctet((*cIter).second.kind); buf.putShortString((*pIter).first); buf.putShortString(key.name); buf.putBin128(key.hash); QPID_LOG(trace, "SENT ClassInd: package=" << (*pIter).first << " class=" << key.name); } struct MessageItem { string content; Variant::Map headers; string key; MessageItem(const Variant::Map& h, const string& k) : headers(h), key(k) {} }; void ManagementAgentImpl::periodicProcessing() { string addr_key_base = "agent.ind.data."; list deleteList; list > message_list; sendHeartbeat(); { sys::Mutex::ScopedLock lock(agentLock); if (!connected) return; moveNewObjectsLH(); // // Clear the been-here flag on all objects in the map. // for (ObjectMap::iterator iter = managementObjects.begin(); iter != managementObjects.end(); iter++) { ManagementObject* object = iter->second.get(); object->setFlags(0); if (publishAllData) { object->setForcePublish(true); } } publishAllData = false; // // Process the entire object map. // uint32_t v2Objs = 0; for (ObjectMap::iterator baseIter = managementObjects.begin(); baseIter != managementObjects.end(); baseIter++) { ManagementObject* baseObject = baseIter->second.get(); // // Skip until we find a base object requiring a sent message. // if (baseObject->getFlags() == 1 || (!baseObject->getConfigChanged() && !baseObject->getInstChanged() && !baseObject->getForcePublish() && !baseObject->isDeleted())) continue; std::string packageName = baseObject->getPackageName(); std::string className = baseObject->getClassName(); Variant::List list_; std::stringstream addr_key; Variant::Map headers; addr_key << addr_key_base; addr_key << keyifyNameStr(packageName) << "." << keyifyNameStr(className) << "." << vendorNameKey << "." << productNameKey << "." << instanceNameKey; headers["method"] = "indication"; headers["qmf.opcode"] = "_data_indication"; headers["qmf.content"] = "_data"; headers["qmf.agent"] = name_address; for (ObjectMap::iterator iter = baseIter; iter != managementObjects.end(); iter++) { ManagementObject* object = iter->second.get(); bool send_stats, send_props; if (baseObject->isSameClass(*object) && object->getFlags() == 0) { object->setFlags(1); if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); send_props = (object->getConfigChanged() || object->getForcePublish() || object->isDeleted()); send_stats = (object->hasInst() && (object->getInstChanged() || object->getForcePublish())); if (send_stats || send_props) { Variant::Map map_; Variant::Map values; Variant::Map oid; object->getObjectId().mapEncode(oid); map_["_object_id"] = oid; map_["_schema_id"] = mapEncodeSchemaId(object->getPackageName(), object->getClassName(), object->getMd5Sum()); object->writeTimestamps(map_); object->mapEncodeValues(values, send_props, send_stats); map_["_values"] = values; list_.push_back(map_); if (++v2Objs >= maxV2ReplyObjs) { v2Objs = 0; boost::shared_ptr item(new MessageItem(headers, addr_key.str())); ListCodec::encode(list_, item->content); message_list.push_back(item); list_.clear(); } } if (object->isDeleted()) deleteList.push_back(iter->first); object->setForcePublish(false); } } if (!list_.empty()) { boost::shared_ptr item(new MessageItem(headers, addr_key.str())); ListCodec::encode(list_, item->content); message_list.push_back(item); } } // Delete flagged objects for (list::reverse_iterator iter = deleteList.rbegin(); iter != deleteList.rend(); iter++) managementObjects.erase(*iter); } while (!message_list.empty()) { boost::shared_ptr item(message_list.front()); message_list.pop_front(); connThreadBody.sendBuffer(item->content, "", item->headers, topicExchange, item->key, "amqp/list"); QPID_LOG(trace, "SENT DataIndication"); } } void ManagementAgentImpl::getHeartbeatContent(qpid::types::Variant::Map& map) { map["_values"] = attrMap; map["_values"].asMap()["_timestamp"] = uint64_t(Duration(EPOCH, now())); map["_values"].asMap()["_heartbeat_interval"] = interval; map["_values"].asMap()["_epoch"] = bootSequence; map["_values"].asMap()["_schema_updated"] = uint64_t(schemaTimestamp); } void ManagementAgentImpl::ConnectionThread::run() { static const int delayMin(1); static const int delayMax(128); static const int delayFactor(2); int delay(delayMin); string dest("qmfagent"); ConnectionThread::shared_ptr tmp; sessionId.generate(); queueName << "qmfagent-" << sessionId; while (true) { try { if (agent.initialized) { QPID_LOG(debug, "QMF Agent attempting to connect to the broker..."); connection.open(agent.connectionSettings); session = connection.newSession(queueName.str()); subscriptions.reset(new client::SubscriptionManager(session)); session.queueDeclare(arg::queue=queueName.str(), arg::autoDelete=true, arg::exclusive=true); session.exchangeBind(arg::exchange="amq.direct", arg::queue=queueName.str(), arg::bindingKey=queueName.str()); session.exchangeBind(arg::exchange=agent.directExchange, arg::queue=queueName.str(), arg::bindingKey=agent.name_address); session.exchangeBind(arg::exchange=agent.topicExchange, arg::queue=queueName.str(), arg::bindingKey="console.#"); subscriptions->subscribe(agent, queueName.str(), dest); QPID_LOG(info, "Connection established with broker"); { sys::Mutex::ScopedLock _lock(connLock); if (shutdown) return; operational = true; agent.connected = true; agent.startProtocol(); try { sys::Mutex::ScopedUnlock _unlock(connLock); subscriptions->run(); } catch (exception) {} QPID_LOG(warning, "Connection to the broker has been lost"); operational = false; agent.connected = false; tmp = subscriptions; subscriptions.reset(); } tmp.reset(); // frees the subscription outside the lock delay = delayMin; connection.close(); } } catch (exception &e) { if (delay < delayMax) delay *= delayFactor; QPID_LOG(debug, "Connection failed: exception=" << e.what()); } { // sleep for "delay" seconds, but peridically check if the // agent is shutting down so we don't hang for up to delayMax // seconds during agent shutdown sys::Mutex::ScopedLock _lock(connLock); if (shutdown) return; sleeping = true; int totalSleep = 0; do { sys::Mutex::ScopedUnlock _unlock(connLock); ::sleep(delayMin); totalSleep += delayMin; } while (totalSleep < delay && !shutdown); sleeping = false; if (shutdown) return; } } } ManagementAgentImpl::ConnectionThread::~ConnectionThread() { } void ManagementAgentImpl::ConnectionThread::sendBuffer(Buffer& buf, uint32_t length, const string& exchange, const string& routingKey) { Message msg; string data; buf.getRawData(data, length); msg.setData(data); sendMessage(msg, exchange, routingKey); } void ManagementAgentImpl::ConnectionThread::sendBuffer(const string& data, const string& cid, const Variant::Map headers, const string& exchange, const string& routingKey, const string& contentType, uint64_t ttl_msec) { Message msg; Variant::Map::const_iterator i; if (!cid.empty()) msg.getMessageProperties().setCorrelationId(cid); if (!contentType.empty()) msg.getMessageProperties().setContentType(contentType); if (ttl_msec) msg.getDeliveryProperties().setTtl(ttl_msec); for (i = headers.begin(); i != headers.end(); ++i) { msg.getHeaders().setString(i->first, i->second.asString()); } msg.setData(data); sendMessage(msg, exchange, routingKey); } void ManagementAgentImpl::ConnectionThread::sendMessage(Message msg, const string& exchange, const string& routingKey) { ConnectionThread::shared_ptr s; { sys::Mutex::ScopedLock _lock(connLock); if (!operational) return; s = subscriptions; } msg.getDeliveryProperties().setRoutingKey(routingKey); msg.getMessageProperties().setReplyTo(ReplyTo("amq.direct", queueName.str())); msg.getMessageProperties().getApplicationHeaders().setString("qmf.agent", agent.name_address); msg.getMessageProperties().setAppId("qmf2"); try { session.messageTransfer(arg::content=msg, arg::destination=exchange); } catch(exception& e) { QPID_LOG(error, "Exception caught in sendMessage: " << e.what()); // Bounce the connection if (s) s->stop(); } } void ManagementAgentImpl::ConnectionThread::bindToBank(uint32_t brokerBank, uint32_t agentBank) { stringstream key; key << "agent." << brokerBank << "." << agentBank; session.exchangeBind(arg::exchange="qpid.management", arg::queue=queueName.str(), arg::bindingKey=key.str()); } void ManagementAgentImpl::ConnectionThread::close() { ConnectionThread::shared_ptr s; { sys::Mutex::ScopedLock _lock(connLock); shutdown = true; s = subscriptions; } if (s) s->stop(); } bool ManagementAgentImpl::ConnectionThread::isSleeping() const { sys::Mutex::ScopedLock _lock(connLock); return sleeping; } void ManagementAgentImpl::PublishThread::run() { uint16_t totalSleep; uint16_t sleepTime; while (!shutdown) { agent.periodicProcessing(); totalSleep = 0; // // Calculate a sleep time that is no greater than 5 seconds and // no less than 1 second. // sleepTime = agent.getInterval(); if (sleepTime > 5) sleepTime = 5; else if (sleepTime == 0) sleepTime = 1; while (totalSleep < agent.getInterval() && !shutdown) { ::sleep(sleepTime); totalSleep += sleepTime; } } } qpidc-0.16/src/qpid/agent/ManagementAgentImpl.h0000664000076400007640000002765611605133555022030 0ustar00jrossjross00000000000000#ifndef _qpid_agent_ManagementAgentImpl_ #define _qpid_agent_ManagementAgentImpl_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/agent/ManagementAgent.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/Session.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/Message.h" #include "qpid/client/MessageListener.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/PipeHandle.h" #include "qpid/sys/Time.h" #include "qpid/framing/Uuid.h" #include #include #include namespace qpid { namespace management { class ManagementAgentImpl : public ManagementAgent, public client::MessageListener { public: ManagementAgentImpl(); virtual ~ManagementAgentImpl(); // // Methods from ManagementAgent // int getMaxThreads() { return 1; } void setName(const std::string& vendor, const std::string& product, const std::string& instance=""); void getName(std::string& vendor, std::string& product, std::string& instance); const std::string& getAddress(); void init(const std::string& brokerHost = "localhost", uint16_t brokerPort = 5672, uint16_t intervalSeconds = 10, bool useExternalThread = false, const std::string& storeFile = "", const std::string& uid = "", const std::string& pwd = "", const std::string& mech = "PLAIN", const std::string& proto = "tcp"); void init(const management::ConnectionSettings& settings, uint16_t intervalSeconds = 10, bool useExternalThread = false, const std::string& storeFile = ""); bool isConnected() { return connected; } std::string& getLastFailure() { return lastFailure; } void registerClass(const std::string& packageName, const std::string& className, uint8_t* md5Sum, management::ManagementObject::writeSchemaCall_t schemaCall); void registerEvent(const std::string& packageName, const std::string& eventName, uint8_t* md5Sum, management::ManagementObject::writeSchemaCall_t schemaCall); ObjectId addObject(management::ManagementObject* objectPtr, uint64_t persistId = 0); ObjectId addObject(management::ManagementObject* objectPtr, const std::string& key, bool persistent); void raiseEvent(const management::ManagementEvent& event, severity_t severity = SEV_DEFAULT); uint32_t pollCallbacks(uint32_t callLimit = 0); int getSignalFd(); void setSignalCallback(cb_t callback, void* context); void setSignalCallback(Notifyable& n); uint16_t getInterval() { return interval; } void periodicProcessing(); // these next are here to support the hot-wiring of state between clustered brokers uint64_t getNextObjectId(void) { return nextObjectId; } void setNextObjectId(uint64_t o) { nextObjectId = o; } uint16_t getBootSequence(void) { return bootSequence; } void setBootSequence(uint16_t b) { bootSequence = b; } private: struct SchemaClassKey { std::string name; uint8_t hash[16]; }; struct SchemaClassKeyComp { bool operator() (const SchemaClassKey& lhs, const SchemaClassKey& rhs) const { if (lhs.name != rhs.name) return lhs.name < rhs.name; else for (int i = 0; i < 16; i++) if (lhs.hash[i] != rhs.hash[i]) return lhs.hash[i] < rhs.hash[i]; return false; } }; struct SchemaClass { management::ManagementObject::writeSchemaCall_t writeSchemaCall; uint8_t kind; SchemaClass(const management::ManagementObject::writeSchemaCall_t call, const uint8_t _kind) : writeSchemaCall(call), kind(_kind) {} }; struct QueuedMethod { QueuedMethod(const std::string& _cid, const std::string& _rte, const std::string& _rtk, const std::string& _body, const std::string& _uid) : cid(_cid), replyToExchange(_rte), replyToKey(_rtk), body(_body), userId(_uid) {} std::string cid; std::string replyToExchange; std::string replyToKey; std::string body; std::string userId; }; typedef std::deque MethodQueue; typedef std::map ClassMap; typedef std::map PackageMap; PackageMap packages; AgentAttachment attachment; typedef std::map > ObjectMap; ObjectMap managementObjects; ObjectMap newManagementObjects; MethodQueue methodQueue; void received (client::Message& msg); qpid::types::Variant::Map attrMap; std::string name_address; std::string vendorNameKey; // vendor name with "." --> "_" std::string productNameKey; // product name with "." --> "_" std::string instanceNameKey; // agent instance with "." --> "_" uint16_t interval; bool extThread; sys::PipeHandle* pipeHandle; uint64_t nextObjectId; cb_t notifyCallback; void* notifyContext; Notifyable* notifyable; bool inCallback; std::string storeFile; sys::Mutex agentLock; sys::Mutex addLock; framing::Uuid systemId; client::ConnectionSettings connectionSettings; bool initialized; bool connected; bool useMapMsg; std::string lastFailure; std::string topicExchange; std::string directExchange; qpid::sys::Duration schemaTimestamp; bool publishAllData; uint32_t requestedBrokerBank; uint32_t requestedAgentBank; uint32_t assignedBrokerBank; uint32_t assignedAgentBank; uint16_t bootSequence; // Maximum # of objects allowed in a single V2 response // message. uint32_t maxV2ReplyObjs; static const uint8_t DEBUG_OFF = 0; static const uint8_t DEBUG_CONN = 1; static const uint8_t DEBUG_PROTO = 2; static const uint8_t DEBUG_PUBLISH = 3; # define MA_BUFFER_SIZE 65536 char outputBuffer[MA_BUFFER_SIZE]; char eventBuffer[MA_BUFFER_SIZE]; friend class ConnectionThread; class ConnectionThread : public sys::Runnable { typedef boost::shared_ptr shared_ptr; bool operational; ManagementAgentImpl& agent; framing::Uuid sessionId; client::Connection connection; client::Session session; ConnectionThread::shared_ptr subscriptions; std::stringstream queueName; mutable sys::Mutex connLock; bool shutdown; bool sleeping; void run(); public: ConnectionThread(ManagementAgentImpl& _agent) : operational(false), agent(_agent), shutdown(false), sleeping(false) {} ~ConnectionThread(); void sendBuffer(qpid::framing::Buffer& buf, uint32_t length, const std::string& exchange, const std::string& routingKey); void sendBuffer(const std::string& data, const std::string& cid, const qpid::types::Variant::Map headers, const std::string& exchange, const std::string& routingKey, const std::string& contentType="amqp/map", uint64_t ttl_msec=0); void sendMessage(qpid::client::Message msg, const std::string& exchange, const std::string& routingKey); void bindToBank(uint32_t brokerBank, uint32_t agentBank); void close(); bool isSleeping() const; }; class PublishThread : public sys::Runnable { ManagementAgentImpl& agent; void run(); bool shutdown; public: PublishThread(ManagementAgentImpl& _agent) : agent(_agent), shutdown(false) {} void close() { shutdown = true; } }; ConnectionThread connThreadBody; sys::Thread connThread; PublishThread pubThreadBody; sys::Thread pubThread; static const std::string storeMagicNumber; void startProtocol(); void storeData(bool requested=false); void retrieveData(std::string& vendor, std::string& product, std::string& inst); PackageMap::iterator findOrAddPackage(const std::string& name); void moveNewObjectsLH(); void addClassLocal (uint8_t classKind, PackageMap::iterator pIter, const std::string& className, uint8_t* md5Sum, management::ManagementObject::writeSchemaCall_t schemaCall); void encodePackageIndication (framing::Buffer& buf, PackageMap::iterator pIter); void encodeClassIndication (framing::Buffer& buf, PackageMap::iterator pIter, ClassMap::iterator cIter); void encodeHeader (framing::Buffer& buf, uint8_t opcode, uint32_t seq = 0); qpid::types::Variant::Map mapEncodeSchemaId(const std::string& pname, const std::string& cname, const uint8_t *md5Sum, uint8_t type=ManagementItem::CLASS_KIND_TABLE); bool checkHeader (framing::Buffer& buf, uint8_t *opcode, uint32_t *seq); void sendHeartbeat(); void sendException(const std::string& replyToExchange, const std::string& replyToKey, const std::string& cid, const std::string& text, uint32_t code=1); void handlePackageRequest (qpid::framing::Buffer& inBuffer); void handleClassQuery (qpid::framing::Buffer& inBuffer); void handleSchemaRequest (qpid::framing::Buffer& inBuffer, uint32_t sequence, const std::string& rte, const std::string& rtk); void invokeMethodRequest (const std::string& body, const std::string& cid, const std::string& rte, const std::string& rtk, const std::string& userId); void handleGetQuery (const std::string& body, const std::string& cid, const std::string& rte, const std::string& rtk); void handleLocateRequest (const std::string& body, const std::string& sequence, const std::string& rte, const std::string& rtk); void handleMethodRequest (const std::string& body, const std::string& sequence, const std::string& rte, const std::string& rtk, const std::string& userId); void handleConsoleAddedIndication(); void getHeartbeatContent (qpid::types::Variant::Map& map); }; }} #endif /*!_qpid_agent_ManagementAgentImpl_*/ qpidc-0.16/src/qpid/SaslFactory.cpp0000664000076400007640000003317711645230314017630 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid//SaslFactory.h" #include #include #ifdef HAVE_CONFIG_H # include "config.h" #endif #ifndef HAVE_SASL namespace qpid { //Null implementation SaslFactory::SaslFactory() {} SaslFactory::~SaslFactory() {} SaslFactory& SaslFactory::getInstance() { qpid::sys::Mutex::ScopedLock l(lock); if (!instance.get()) { instance = std::auto_ptr(new SaslFactory()); } return *instance; } std::auto_ptr SaslFactory::create( const std::string &, const std::string &, const std::string &, const std::string &, int, int, bool ) { return std::auto_ptr(); } qpid::sys::Mutex SaslFactory::lock; std::auto_ptr SaslFactory::instance; } // namespace qpid #else #include "qpid/Exception.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/sys/SecurityLayer.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/sys/cyrus/CyrusSecurityLayer.h" #include "qpid/log/Statement.h" #include #include namespace qpid { using qpid::sys::SecurityLayer; using qpid::sys::SecuritySettings; using qpid::sys::cyrus::CyrusSecurityLayer; using qpid::framing::InternalErrorException; const size_t MAX_LOGIN_LENGTH = 50; struct CyrusSaslSettings { CyrusSaslSettings ( ) : username ( std::string(0) ), password ( std::string(0) ), service ( std::string(0) ), host ( std::string(0) ), minSsf ( 0 ), maxSsf ( 0 ) { } CyrusSaslSettings ( const std::string & user, const std::string & password, const std::string & service, const std::string & host, int minSsf, int maxSsf ) : username(user), password(password), service(service), host(host), minSsf(minSsf), maxSsf(maxSsf) { } std::string username, password, service, host; int minSsf, maxSsf; }; class CyrusSasl : public Sasl { public: CyrusSasl(const std::string & username, const std::string & password, const std::string & serviceName, const std::string & hostName, int minSsf, int maxSsf, bool allowInteraction); ~CyrusSasl(); bool start(const std::string& mechanisms, std::string& response, const SecuritySettings* externalSettings); std::string step(const std::string& challenge); std::string getMechanism(); std::string getUserId(); std::auto_ptr getSecurityLayer(uint16_t maxFrameSize); private: sasl_conn_t* conn; sasl_callback_t callbacks[5];//realm, user, authname, password, end-of-list CyrusSaslSettings settings; std::string input; std::string mechanism; char login[MAX_LOGIN_LENGTH]; /* In some contexts, like running in the broker or as a daemon, console * interaction is impossible. In those cases, we will treat the attempt * to interact as an error. */ bool allowInteraction; void interact(sasl_interact_t* client_interact); }; //sasl callback functions int getUserFromSettings(void *context, int id, const char **result, unsigned *len); int getPasswordFromSettings(sasl_conn_t *conn, void *context, int id, sasl_secret_t **psecret); typedef int CallbackProc(); qpid::sys::Mutex SaslFactory::lock; std::auto_ptr SaslFactory::instance; SaslFactory::SaslFactory() { sasl_callback_t* callbacks = 0; int result = sasl_client_init(callbacks); if (result != SASL_OK) { throw InternalErrorException(QPID_MSG("Sasl error: " << sasl_errstring(result, 0, 0))); } } SaslFactory::~SaslFactory() { sasl_done(); } SaslFactory& SaslFactory::getInstance() { qpid::sys::Mutex::ScopedLock l(lock); if (!instance.get()) { instance = std::auto_ptr(new SaslFactory()); } return *instance; } std::auto_ptr SaslFactory::create(const std::string & username, const std::string & password, const std::string & serviceName, const std::string & hostName, int minSsf, int maxSsf, bool allowInteraction) { std::auto_ptr sasl(new CyrusSasl(username, password, serviceName, hostName, minSsf, maxSsf, allowInteraction)); return sasl; } CyrusSasl::CyrusSasl(const std::string & username, const std::string & password, const std::string & serviceName, const std::string & hostName, int minSsf, int maxSsf, bool allowInteraction) : conn(0), settings(username, password, serviceName, hostName, minSsf, maxSsf), allowInteraction(allowInteraction) { size_t i = 0; callbacks[i].id = SASL_CB_GETREALM; callbacks[i].proc = 0; callbacks[i++].context = 0; if (!settings.username.empty()) { callbacks[i].id = SASL_CB_AUTHNAME; callbacks[i].proc = (CallbackProc*) &getUserFromSettings; callbacks[i++].context = &settings; callbacks[i].id = SASL_CB_PASS; if (settings.password.empty()) { callbacks[i].proc = 0; callbacks[i++].context = 0; } else { callbacks[i].proc = (CallbackProc*) &getPasswordFromSettings; callbacks[i++].context = &settings; } } callbacks[i].id = SASL_CB_LIST_END; callbacks[i].proc = 0; callbacks[i++].context = 0; } CyrusSasl::~CyrusSasl() { if (conn) { sasl_dispose(&conn); } } namespace { const std::string SSL("ssl"); } bool CyrusSasl::start(const std::string& mechanisms, std::string& response, const SecuritySettings* externalSettings) { QPID_LOG(debug, "CyrusSasl::start(" << mechanisms << ")"); int result = sasl_client_new(settings.service.c_str(), settings.host.c_str(), 0, 0, /* Local and remote IP address strings */ callbacks, 0, /* security flags */ &conn); if (result != SASL_OK) throw InternalErrorException(QPID_MSG("Sasl error: " << sasl_errdetail(conn))); sasl_security_properties_t secprops; if (externalSettings) { sasl_ssf_t external_ssf = (sasl_ssf_t) externalSettings->ssf; if (external_ssf) { int result = sasl_setprop(conn, SASL_SSF_EXTERNAL, &external_ssf); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL error: unable to set external SSF: " << result)); } QPID_LOG(debug, "external SSF detected and set to " << external_ssf); } if (externalSettings->authid.size()) { const char* external_authid = externalSettings->authid.c_str(); result = sasl_setprop(conn, SASL_AUTH_EXTERNAL, external_authid); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL error: unable to set external auth: " << result)); } QPID_LOG(debug, "external auth detected and set to " << external_authid); } } secprops.min_ssf = settings.minSsf; secprops.max_ssf = settings.maxSsf; secprops.maxbufsize = 65535; QPID_LOG(debug, "min_ssf: " << secprops.min_ssf << ", max_ssf: " << secprops.max_ssf); secprops.property_names = 0; secprops.property_values = 0; secprops.security_flags = 0;//TODO: provide means for application to configure these result = sasl_setprop(conn, SASL_SEC_PROPS, &secprops); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL error: " << sasl_errdetail(conn))); } sasl_interact_t* client_interact = 0; const char *out = 0; unsigned outlen = 0; const char *chosenMechanism = 0; do { result = sasl_client_start(conn, mechanisms.c_str(), &client_interact, &out, &outlen, &chosenMechanism); if (result == SASL_INTERACT) { interact(client_interact); } } while (result == SASL_INTERACT); if (result != SASL_CONTINUE && result != SASL_OK) { throw InternalErrorException(QPID_MSG("Sasl error: " << sasl_errdetail(conn))); } mechanism = std::string(chosenMechanism); QPID_LOG(debug, "CyrusSasl::start(" << mechanisms << "): selected " << mechanism << " response: '" << std::string(out, outlen) << "'"); if (out) { response = std::string(out, outlen); return true; } else { return false; } } std::string CyrusSasl::step(const std::string& challenge) { sasl_interact_t* client_interact = 0; const char *out = 0; unsigned outlen = 0; int result = 0; do { result = sasl_client_step(conn, /* our context */ challenge.data(), /* the data from the server */ challenge.size(), /* it's length */ &client_interact, /* this should be unallocated and NULL */ &out, /* filled in on success */ &outlen); /* filled in on success */ if (result == SASL_INTERACT) { interact(client_interact); } } while (result == SASL_INTERACT); std::string response; if (result == SASL_CONTINUE || result == SASL_OK) response = std::string(out, outlen); else if (result != SASL_OK) { throw InternalErrorException(QPID_MSG("Sasl error: " << sasl_errdetail(conn))); } QPID_LOG(debug, "CyrusSasl::step(" << challenge << "): " << response); return response; } std::string CyrusSasl::getMechanism() { return mechanism; } std::string CyrusSasl::getUserId() { int propResult; const void* operName; propResult = sasl_getprop(conn, SASL_USERNAME, &operName); if (propResult == SASL_OK) return std::string((const char*) operName); return std::string(); } void CyrusSasl::interact(sasl_interact_t* client_interact) { /* In some context console interaction cannot be allowed, such as when this code run as part of a broker, or as a some other daemon. In those cases we will treat the attempt to */ if ( ! allowInteraction ) { throw InternalErrorException("interaction disallowed"); } if (client_interact->id == SASL_CB_PASS) { char* password = getpass(client_interact->prompt); input = std::string(password); client_interact->result = input.data(); client_interact->len = input.size(); } else { std::cout << client_interact->prompt; if (client_interact->defresult) std::cout << " (" << client_interact->defresult << ")"; std::cout << ": "; if (std::cin >> input) { client_interact->result = input.data(); client_interact->len = input.size(); } } } std::auto_ptr CyrusSasl::getSecurityLayer(uint16_t maxFrameSize) { const void* value(0); int result = sasl_getprop(conn, SASL_SSF, &value); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL error: " << sasl_errdetail(conn))); } uint ssf = *(reinterpret_cast(value)); std::auto_ptr securityLayer; if (ssf) { QPID_LOG(info, "Installing security layer, SSF: "<< ssf); securityLayer = std::auto_ptr(new CyrusSecurityLayer(conn, maxFrameSize)); } return securityLayer; } int getUserFromSettings(void* context, int /*id*/, const char** result, unsigned* /*len*/) { if (context) { *result = ((CyrusSaslSettings*) context)->username.c_str(); QPID_LOG(debug, "getUserFromSettings(): " << (*result)); return SASL_OK; } else { return SASL_FAIL; } } namespace { // Global map of secrets allocated for SASL connections via callback // to getPasswordFromSettings. Ensures secrets are freed. class SecretsMap { typedef std::map Map; Map map; public: void keep(sasl_conn_t* conn, void* secret) { Map::iterator i = map.find(conn); if (i != map.end()) free(i->second); map[conn] = secret; } ~SecretsMap() { for (Map::iterator i = map.begin(); i != map.end(); ++i) free(i->second); } }; SecretsMap getPasswordFromSettingsSecrets; } int getPasswordFromSettings(sasl_conn_t* conn, void* context, int /*id*/, sasl_secret_t** psecret) { if (context) { size_t length = ((CyrusSaslSettings*) context)->password.size(); sasl_secret_t* secret = (sasl_secret_t*) malloc(sizeof(sasl_secret_t) + length); getPasswordFromSettingsSecrets.keep(conn, secret); secret->len = length; memcpy(secret->data, ((CyrusSaslSettings*) context)->password.data(), length); *psecret = secret; return SASL_OK; } else { return SASL_FAIL; } } } // namespace qpid #endif qpidc-0.16/src/qpid/RefCounted.h0000664000076400007640000000360511562043320017067 0ustar00jrossjross00000000000000#ifndef QPID_REFCOUNTED_H #define QPID_REFCOUNTED_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include namespace qpid { /** * Reference-counted base class. * Note: this class isn't copyable - you must copy the intrusive_ptr that points * to the class that has mixed this in not the class itself (as that would sidestep * the reference counting) */ class RefCounted : boost::noncopyable { mutable boost::detail::atomic_count count; public: RefCounted() : count(0) {} void addRef() const { ++count; } void release() const { if (--count==0) released(); } long refCount() { return count; } protected: virtual ~RefCounted() {}; // Allow subclasses to over-ride behavior when refcount reaches 0. virtual void released() const { delete this; } }; } // namespace qpid // intrusive_ptr support. namespace boost { template inline void intrusive_ptr_add_ref(const T* p) { p->qpid::RefCounted::addRef(); } template inline void intrusive_ptr_release(const T* p) { p->qpid::RefCounted::release(); } } #endif /*!QPID_REFCOUNTED_H*/ qpidc-0.16/src/qpid/assert.h0000664000076400007640000000236610704656072016350 0ustar00jrossjross00000000000000#ifndef QPID_ASSERT_H #define QPID_ASSERT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include /** * Abort if !expr in debug mode, throw an exception if NDEBUG is set. */ #define QPID_ASSERT(expr) ((expr) ? static_cast(0) : ::qpid::assert_fail(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) namespace qpid { void assert_fail(char const * expr, char const * function, char const * file, long line); } // namespace qpid #endif /*!QPID_ASSERT_H*/ qpidc-0.16/src/qpid/BufferRef.h0000664000076400007640000000377111537542661016721 0ustar00jrossjross00000000000000#ifndef QPID_BUFFERREF_H #define QPID_BUFFERREF_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include namespace qpid { /** Template for mutable or const buffer references */ template class BufferRefT { public: BufferRefT() : begin_(0), end_(0) {} BufferRefT(boost::intrusive_ptr c, T* begin, T* end) : counter(c), begin_(begin), end_(end) {} template BufferRefT(const BufferRefT& other) : counter(other.counter), begin_(other.begin_), end_(other.end_) {} T* begin() const { return begin_; } T* end() const { return end_; } /** Return a sub-buffer of the current buffer */ BufferRefT sub_buffer(T* begin, T* end) { assert(begin_ <= begin && begin <= end_); assert(begin_ <= end && end <= end_); assert(begin <= end); return BufferRefT(counter, begin, end); } private: boost::intrusive_ptr counter; T* begin_; T* end_; }; /** * Reference to a mutable ref-counted buffer. */ typedef BufferRefT BufferRef; /** * Reference to a const ref-counted buffer. */ typedef BufferRefT ConstBufferRef; } // namespace qpid #endif /*!QPID_BUFFERREF_H*/ qpidc-0.16/src/qpid/messaging/0000775000076400007640000000000011752725716016652 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/messaging/SessionImpl.h0000664000076400007640000000415611576116033021264 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_SESSIONIMPL_H #define QPID_MESSAGING_SESSIONIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include #include "qpid/messaging/Duration.h" namespace qpid { namespace messaging { class Address; class Connection; class Message; class Sender; class Receiver; class SessionImpl : public virtual qpid::RefCounted { public: virtual ~SessionImpl() {} virtual void commit() = 0; virtual void rollback() = 0; virtual void acknowledge(bool sync) = 0; virtual void acknowledge(Message&, bool cumulative) = 0; virtual void reject(Message&) = 0; virtual void release(Message&) = 0; virtual void close() = 0; virtual void sync(bool block) = 0; virtual Sender createSender(const Address& address) = 0; virtual Receiver createReceiver(const Address& address) = 0; virtual bool nextReceiver(Receiver& receiver, Duration timeout) = 0; virtual Receiver nextReceiver(Duration timeout) = 0; virtual uint32_t getReceivable() = 0; virtual uint32_t getUnsettledAcks() = 0; virtual Sender getSender(const std::string& name) const = 0; virtual Receiver getReceiver(const std::string& name) const = 0; virtual Connection getConnection() const = 0; virtual void checkError() = 0; private: }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_SESSIONIMPL_H*/ qpidc-0.16/src/qpid/messaging/HandleInstantiator.cpp0000664000076400007640000000444311465051024023137 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Connection.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Session.h" namespace qpid { namespace messaging { using namespace qpid::types; void HandleInstantiatorDoNotCall(void) { // This function exists to instantiate various template Handle // bool functions. The instances are then available to // the qpidmessaging DLL and subsequently exported. // This function must not be exported nor called called. // For further information refer to // https://issues.apache.org/jira/browse/QPID-2926 Connection connection; if (connection.isValid()) connection.close(); if (connection.isNull() ) connection.close(); if (connection ) connection.close(); if (!connection ) connection.close(); Receiver receiver; if (receiver.isValid()) receiver.close(); if (receiver.isNull() ) receiver.close(); if (receiver ) receiver.close(); if (!receiver ) receiver.close(); Sender sender; if (sender.isValid()) sender.close(); if (sender.isNull() ) sender.close(); if (sender ) sender.close(); if (!sender ) sender.close(); Session session; if (session.isValid()) session.close(); if (session.isNull() ) session.close(); if (session ) session.close(); if (!session ) session.close(); } }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/ReceiverImpl.h0000664000076400007640000000332111373253106021374 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_RECEIVERIMPL_H #define QPID_MESSAGING_RECEIVERIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" namespace qpid { namespace messaging { class Message; class MessageListener; class Session; class ReceiverImpl : public virtual qpid::RefCounted { public: virtual ~ReceiverImpl() {} virtual bool get(Message& message, Duration timeout) = 0; virtual Message get(Duration timeout) = 0; virtual bool fetch(Message& message, Duration timeout) = 0; virtual Message fetch(Duration timeout) = 0; virtual void setCapacity(uint32_t) = 0; virtual uint32_t getCapacity() = 0; virtual uint32_t getAvailable() = 0; virtual uint32_t getUnsettled() = 0; virtual void close() = 0; virtual const std::string& getName() const = 0; virtual Session getSession() const = 0; virtual bool isClosed() const = 0; }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_RECEIVERIMPL_H*/ qpidc-0.16/src/qpid/messaging/AddressParser.cpp0000664000076400007640000001467511700656015022121 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "AddressParser.h" #include "qpid/framing/Uuid.h" #include namespace qpid { namespace messaging { using namespace qpid::types; AddressParser::AddressParser(const std::string& s) : input(s), current(0) {} bool AddressParser::error(const std::string& message) { throw MalformedAddress((boost::format("%1%, character %2% of %3%") % message % current % input).str()); } bool AddressParser::parse(Address& address) { std::string name; if (readName(name)) { if (name.find('#') == 0) name = qpid::framing::Uuid(true).str() + name; address.setName(name); if (readChar('/')) { std::string subject; readSubject(subject); address.setSubject(subject); } if (readChar(';')) { Variant options = Variant::Map(); if (readMap(options)) { address.setOptions(options.asMap()); } } //skip trailing whitespace while (!eos() && iswhitespace()) ++current; return eos() || error("Unexpected chars in address: " + input.substr(current)); } else { return input.empty() || error("Expected name"); } } bool AddressParser::parseMap(Variant::Map& map) { if (readChar('{')) { readMapEntries(map); return readChar('}') || error("Unmatched '{'!"); } else { return false; } } bool AddressParser::parseList(Variant::List& list) { if (readChar('[')) { readListItems(list); return readChar(']') || error("Unmatched '['!"); } else { return false; } } bool AddressParser::readList(Variant& value) { if (readChar('[')) { value = Variant::List(); readListItems(value.asList()); return readChar(']') || error("Unmatched '['!"); } else { return false; } } void AddressParser::readListItems(Variant::List& list) { Variant item; while (readValueIfExists(item)) { list.push_back(item); if (!readChar(',')) break; } } bool AddressParser::readMap(Variant& value) { if (readChar('{')) { value = Variant::Map(); readMapEntries(value.asMap()); return readChar('}') || error("Unmatched '{'!"); } else { return false; } } void AddressParser::readMapEntries(Variant::Map& map) { while (readKeyValuePair(map) && readChar(',')) {} } bool AddressParser::readKeyValuePair(Variant::Map& map) { std::string key; Variant value; if (readKey(key)) { if (readChar(':') && readValue(value)) { map[key] = value; return true; } else { return error("Bad key-value pair, expected ':'"); } } else { return false; } } bool AddressParser::readKey(std::string& key) { return readWord(key) || readQuotedString(key); } bool AddressParser::readValue(Variant& value) { return readValueIfExists(value) || error("Expected value"); } bool AddressParser::readValueIfExists(Variant& value) { return readSimpleValue(value) || readQuotedValue(value) || readMap(value) || readList(value); } bool AddressParser::readString(std::string& value, char delimiter) { if (readChar(delimiter)) { std::string::size_type start = current; while (!eos()) { if (input.at(current) == delimiter) { if (current > start) { value = input.substr(start, current - start); } else { value = ""; } ++current; return true; } else { ++current; } } return error("Unmatched delimiter"); } else { return false; } } bool AddressParser::readName(std::string& name) { return readQuotedString(name) || readWord(name, "/;"); } bool AddressParser::readSubject(std::string& subject) { return readQuotedString(subject) || readWord(subject, ";"); } bool AddressParser::readQuotedString(std::string& s) { return readString(s, '"') || readString(s, '\''); } bool AddressParser::readQuotedValue(Variant& value) { std::string s; if (readQuotedString(s)) { value = s; value.setEncoding("utf8"); return true; } else { return false; } } bool AddressParser::readSimpleValue(Variant& value) { std::string s; if (readWord(s)) { value.parse(s); if (value.getType() == VAR_STRING) value.setEncoding("utf8"); return true; } else { return false; } } bool AddressParser::readWord(std::string& value, const std::string& delims) { //skip leading whitespace while (!eos() && iswhitespace()) ++current; //read any number of non-whitespace, non-reserved chars into value std::string::size_type start = current; while (!eos() && !iswhitespace() && !in(delims)) ++current; if (current > start) { value = input.substr(start, current - start); return true; } else { return false; } } bool AddressParser::readChar(char c) { while (!eos()) { if (iswhitespace()) { ++current; } else if (input.at(current) == c) { ++current; return true; } else { return false; } } return false; } bool AddressParser::iswhitespace() { return ::isspace(input.at(current)); } bool AddressParser::isreserved() { return in(RESERVED); } bool AddressParser::in(const std::string& chars) { return chars.find(input.at(current)) != std::string::npos; } bool AddressParser::eos() { return current >= input.size(); } const std::string AddressParser::RESERVED = "\'\"{}[],:/"; }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/Message.cpp0000664000076400007640000001353411625205114020730 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Message.h" #include "qpid/messaging/MessageImpl.h" #include "qpid/amqp_0_10/Codecs.h" #include #include namespace qpid { namespace messaging { using namespace qpid::types; Message::Message(const std::string& bytes) : impl(new MessageImpl(bytes)) {} Message::Message(const char* bytes, size_t count) : impl(new MessageImpl(bytes, count)) {} Message::Message(const Message& m) : impl(new MessageImpl(*m.impl)) {} Message::~Message() { delete impl; } Message& Message::operator=(const Message& m) { *impl = *m.impl; return *this; } void Message::setReplyTo(const Address& d) { impl->setReplyTo(d); } const Address& Message::getReplyTo() const { return impl->getReplyTo(); } void Message::setSubject(const std::string& s) { impl->setSubject(s); } const std::string& Message::getSubject() const { return impl->getSubject(); } void Message::setContentType(const std::string& s) { impl->setContentType(s); } const std::string& Message::getContentType() const { return impl->getContentType(); } void Message::setMessageId(const std::string& id) { impl->messageId = id; } const std::string& Message::getMessageId() const { return impl->messageId; } void Message::setUserId(const std::string& id) { impl->userId = id; } const std::string& Message::getUserId() const { return impl->userId; } void Message::setCorrelationId(const std::string& id) { impl->correlationId = id; } const std::string& Message::getCorrelationId() const { return impl->correlationId; } uint8_t Message::getPriority() const { return impl->priority; } void Message::setPriority(uint8_t priority) { impl->priority = priority; } void Message::setTtl(Duration ttl) { impl->ttl = ttl.getMilliseconds(); } Duration Message::getTtl() const { return Duration(impl->ttl); } void Message::setDurable(bool durable) { impl->durable = durable; } bool Message::getDurable() const { return impl->durable; } bool Message::getRedelivered() const { return impl->redelivered; } void Message::setRedelivered(bool redelivered) { impl->redelivered = redelivered; } const Variant::Map& Message::getProperties() const { return impl->getHeaders(); } Variant::Map& Message::getProperties() { return impl->getHeaders(); } void Message::setProperty(const std::string& k, const qpid::types::Variant& v) { impl->setHeader(k,v); } void Message::setContent(const std::string& c) { impl->setBytes(c); } void Message::setContent(const char* chars, size_t count) { impl->setBytes(chars, count); } std::string Message::getContent() const { return impl->getBytes(); } const char* Message::getContentPtr() const { return impl->getBytes().data(); } size_t Message::getContentSize() const { return impl->getBytes().size(); } EncodingException::EncodingException(const std::string& msg) : qpid::types::Exception(msg) {} const std::string BAD_ENCODING("Unsupported encoding: %1% (only %2% is supported at present)."); template struct MessageCodec { static bool checkEncoding(const std::string& requested) { if (requested.size()) { if (requested == C::contentType) return true; else throw EncodingException((boost::format(BAD_ENCODING) % requested % C::contentType).str()); } else { return false; } } /* * Currently only support a single encoding type for both list and * map, based on AMQP 0-10, though wider support is anticipated in the * future. This method simply checks that the desired encoding (if one * is specified, either through the message-content or through an * override) is indeed supported. */ static void checkEncoding(const Message& message, const std::string& requested) { checkEncoding(requested) || checkEncoding(message.getContentType()); } static void decode(const Message& message, typename C::ObjectType& object, const std::string& encoding) { checkEncoding(message, encoding); try { C::decode(message.getContent(), object); } catch (const qpid::Exception &ex) { throw EncodingException(ex.what()); } } static void encode(const typename C::ObjectType& map, Message& message, const std::string& encoding) { checkEncoding(message, encoding); std::string content; C::encode(map, content); message.setContentType(C::contentType); message.setContent(content); } }; void decode(const Message& message, Variant::Map& map, const std::string& encoding) { MessageCodec::decode(message, map, encoding); } void decode(const Message& message, Variant::List& list, const std::string& encoding) { MessageCodec::decode(message, list, encoding); } void encode(const Variant::Map& map, Message& message, const std::string& encoding) { MessageCodec::encode(map, message, encoding); } void encode(const Variant::List& list, Message& message, const std::string& encoding) { MessageCodec::encode(list, message, encoding); } }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/Duration.cpp0000664000076400007640000000333611555545700021142 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Duration.h" #include namespace qpid { namespace messaging { Duration::Duration(uint64_t ms) : milliseconds(ms) {} uint64_t Duration::getMilliseconds() const { return milliseconds; } Duration operator*(const Duration& duration, uint64_t multiplier) { return Duration(duration.getMilliseconds() * multiplier); } Duration operator*(uint64_t multiplier, const Duration& duration) { return Duration(duration.getMilliseconds() * multiplier); } bool operator==(const Duration& a, const Duration& b) { return a.getMilliseconds() == b.getMilliseconds(); } bool operator!=(const Duration& a, const Duration& b) { return a.getMilliseconds() != b.getMilliseconds(); } const Duration Duration::FOREVER(std::numeric_limits::max()); const Duration Duration::IMMEDIATE(0); const Duration Duration::SECOND(1000); const Duration Duration::MINUTE(SECOND * 60); }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/Connection.cpp0000664000076400007640000000571511515014343021445 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Connection.h" #include "qpid/messaging/AddressParser.h" #include "qpid/messaging/ConnectionImpl.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/SessionImpl.h" #include "qpid/messaging/PrivateImplRef.h" #include "qpid/client/amqp0_10/ConnectionImpl.h" #include "qpid/log/Statement.h" namespace qpid { namespace messaging { using namespace qpid::types; typedef PrivateImplRef PI; Connection::Connection(ConnectionImpl* impl) { PI::ctor(*this, impl); } Connection::Connection(const Connection& c) : Handle() { PI::copy(*this, c); } Connection& Connection::operator=(const Connection& c) { return PI::assign(*this, c); } Connection::~Connection() { PI::dtor(*this); } Connection::Connection(const std::string& url, const std::string& o) { Variant::Map options; AddressParser parser(o); if (o.empty() || parser.parseMap(options)) { PI::ctor(*this, new qpid::client::amqp0_10::ConnectionImpl(url, options)); } else { throw InvalidOptionString("Invalid option string: " + o); } } Connection::Connection(const std::string& url, const Variant::Map& options) { PI::ctor(*this, new qpid::client::amqp0_10::ConnectionImpl(url, options)); } Connection::Connection() { Variant::Map options; std::string url = "amqp:tcp:127.0.0.1:5672"; PI::ctor(*this, new qpid::client::amqp0_10::ConnectionImpl(url, options)); } void Connection::open() { impl->open(); } bool Connection::isOpen() { return impl->isOpen(); } bool Connection::isOpen() const { return impl->isOpen(); } void Connection::close() { impl->close(); } Session Connection::createSession(const std::string& name) { return impl->newSession(false, name); } Session Connection::createTransactionalSession(const std::string& name) { return impl->newSession(true, name); } Session Connection::getSession(const std::string& name) const { return impl->getSession(name); } void Connection::setOption(const std::string& name, const Variant& value) { impl->setOption(name, value); } std::string Connection::getAuthenticatedUsername() { return impl->getAuthenticatedUsername(); } }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/SenderImpl.h0000664000076400007640000000271311357652567021074 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_SENDERIMPL_H #define QPID_MESSAGING_SENDERIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" namespace qpid { namespace messaging { class Message; class Session; class SenderImpl : public virtual qpid::RefCounted { public: virtual ~SenderImpl() {} virtual void send(const Message& message, bool sync) = 0; virtual void close() = 0; virtual void setCapacity(uint32_t) = 0; virtual uint32_t getCapacity() = 0; virtual uint32_t getUnsettled() = 0; virtual const std::string& getName() const = 0; virtual Session getSession() const = 0; private: }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_SENDERIMPL_H*/ qpidc-0.16/src/qpid/messaging/MessageImpl.h0000664000076400007640000000507411424074143021222 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_MESSAGEIMPL_H #define QPID_MESSAGING_MESSAGEIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Address.h" #include "qpid/types/Variant.h" #include "qpid/framing/SequenceNumber.h" namespace qpid { namespace messaging { struct MessageImpl { Address replyTo; std::string subject; std::string contentType; std::string messageId; std::string userId; std::string correlationId; uint8_t priority; uint64_t ttl; bool durable; bool redelivered; qpid::types::Variant::Map headers; std::string bytes; qpid::framing::SequenceNumber internalId; MessageImpl(const std::string& c); MessageImpl(const char* chars, size_t count); void setReplyTo(const Address& d); const Address& getReplyTo() const; void setSubject(const std::string& s); const std::string& getSubject() const; void setContentType(const std::string& s); const std::string& getContentType() const; const qpid::types::Variant::Map& getHeaders() const; qpid::types::Variant::Map& getHeaders(); void setHeader(const std::string& key, const qpid::types::Variant& val); void setBytes(const std::string& bytes); void setBytes(const char* chars, size_t count); const std::string& getBytes() const; std::string& getBytes(); void setInternalId(qpid::framing::SequenceNumber id); qpid::framing::SequenceNumber getInternalId(); }; class Message; /** * Provides access to the internal MessageImpl for a message which is * useful when accessing any message state not exposed directly * through the public API. */ struct MessageImplAccess { static MessageImpl& get(Message&); static const MessageImpl& get(const Message&); }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_MESSAGEIMPL_H*/ qpidc-0.16/src/qpid/messaging/Sender.cpp0000664000076400007640000000361111357652567020603 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Sender.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/SenderImpl.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/PrivateImplRef.h" namespace qpid { namespace messaging { typedef PrivateImplRef PI; Sender::Sender(SenderImpl* impl) { PI::ctor(*this, impl); } Sender::Sender(const Sender& s) : qpid::messaging::Handle() { PI::copy(*this, s); } Sender::~Sender() { PI::dtor(*this); } Sender& Sender::operator=(const Sender& s) { return PI::assign(*this, s); } void Sender::send(const Message& message, bool sync) { impl->send(message, sync); } void Sender::close() { impl->close(); } void Sender::setCapacity(uint32_t c) { impl->setCapacity(c); } uint32_t Sender::getCapacity() { return impl->getCapacity(); } uint32_t Sender::getUnsettled() { return impl->getUnsettled(); } uint32_t Sender::getAvailable() { return getCapacity() - getUnsettled(); } const std::string& Sender::getName() const { return impl->getName(); } Session Sender::getSession() const { return impl->getSession(); } }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/ConnectionImpl.h0000664000076400007640000000312611515014343021726 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_CONNECTIONIMPL_H #define QPID_MESSAGING_CONNECTIONIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/RefCounted.h" namespace qpid { namespace types { class Variant; } namespace messaging { class Session; class ConnectionImpl : public virtual qpid::RefCounted { public: virtual ~ConnectionImpl() {} virtual void open() = 0; virtual bool isOpen() const = 0; virtual void close() = 0; virtual Session newSession(bool transactional, const std::string& name) = 0; virtual Session getSession(const std::string& name) const = 0; virtual void setOption(const std::string& name, const qpid::types::Variant& value) = 0; virtual std::string getAuthenticatedUsername() = 0; private: }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_CONNECTIONIMPL_H*/ qpidc-0.16/src/qpid/messaging/Address.cpp0000664000076400007640000001131111357641377020741 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Address.h" #include "qpid/framing/Uuid.h" #include #include namespace qpid { namespace messaging { using namespace qpid::types; namespace { const std::string SUBJECT_DIVIDER = "/"; const std::string OPTIONS_DIVIDER = ";"; const std::string SPACE = " "; const std::string TYPE = "type"; } class AddressImpl { public: std::string name; std::string subject; Variant::Map options; AddressImpl() {} AddressImpl(const std::string& n, const std::string& s, const Variant::Map& o) : name(n), subject(s), options(o) {} }; class AddressParser { public: AddressParser(const std::string&); bool parse(Address& address); private: const std::string& input; std::string::size_type current; static const std::string RESERVED; bool readChar(char c); bool readQuotedString(std::string& s); bool readQuotedValue(Variant& value); bool readString(std::string& value, char delimiter); bool readWord(std::string& word, const std::string& delims = RESERVED); bool readSimpleValue(Variant& word); bool readKey(std::string& key); bool readValue(Variant& value); bool readKeyValuePair(Variant::Map& map); bool readMap(Variant& value); bool readList(Variant& value); bool readName(std::string& name); bool readSubject(std::string& subject); bool error(const std::string& message); bool eos(); bool iswhitespace(); bool in(const std::string& delims); bool isreserved(); }; Address::Address() : impl(new AddressImpl()) {} Address::Address(const std::string& address) : impl(new AddressImpl()) { AddressParser parser(address); parser.parse(*this); } Address::Address(const std::string& name, const std::string& subject, const Variant::Map& options, const std::string& type) : impl(new AddressImpl(name, subject, options)) { setType(type); } Address::Address(const Address& a) : impl(new AddressImpl(a.impl->name, a.impl->subject, a.impl->options)) {} Address::~Address() { delete impl; } Address& Address::operator=(const Address& a) { *impl = *a.impl; return *this; } std::string Address::str() const { std::stringstream out; out << impl->name; if (!impl->subject.empty()) out << SUBJECT_DIVIDER << impl->subject; if (!impl->options.empty()) out << OPTIONS_DIVIDER << impl->options; return out.str(); } Address::operator bool() const { return !impl->name.empty(); } bool Address::operator !() const { return impl->name.empty(); } const std::string& Address::getName() const { return impl->name; } void Address::setName(const std::string& name) { impl->name = name; } const std::string& Address::getSubject() const { return impl->subject; } void Address::setSubject(const std::string& subject) { impl->subject = subject; } const Variant::Map& Address::getOptions() const { return impl->options; } Variant::Map& Address::getOptions() { return impl->options; } void Address::setOptions(const Variant::Map& options) { impl->options = options; } namespace{ const Variant EMPTY_VARIANT; const std::string EMPTY_STRING; const std::string NODE_PROPERTIES="node"; } const Variant& find(const Variant::Map& map, const std::string& key) { Variant::Map::const_iterator i = map.find(key); if (i == map.end()) return EMPTY_VARIANT; else return i->second; } std::string Address::getType() const { const Variant& props = find(impl->options, NODE_PROPERTIES); if (props.getType() == VAR_MAP) { const Variant& type = find(props.asMap(), TYPE); if (!type.isVoid()) return type.asString(); } return EMPTY_STRING; } void Address::setType(const std::string& type) { Variant& props = impl->options[NODE_PROPERTIES]; if (props.isVoid()) props = Variant::Map(); props.asMap()[TYPE] = type; } std::ostream& operator<<(std::ostream& out, const Address& address) { out << address.str(); return out; } }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/PrivateImplRef.h0000664000076400007640000000570211373045357021713 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_PRIVATEIMPL_H #define QPID_MESSAGING_PRIVATEIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" #include #include "qpid/RefCounted.h" namespace qpid { namespace messaging { /** * Helper class to implement a class with a private, reference counted * implementation and reference semantics. * * Such classes are used in the public API to hide implementation, they * should. Example of use: * * === Foo.h * * template PrivateImplRef; * class FooImpl; * * Foo : public Handle { * public: * Foo(FooImpl* = 0); * Foo(const Foo&); * ~Foo(); * Foo& operator=(const Foo&); * * int fooDo(); // and other Foo functions... * * private: * typedef FooImpl Impl; * Impl* impl; * friend class PrivateImplRef; * * === Foo.cpp * * typedef PrivateImplRef PI; * Foo::Foo(FooImpl* p) { PI::ctor(*this, p); } * Foo::Foo(const Foo& c) : Handle() { PI::copy(*this, c); } * Foo::~Foo() { PI::dtor(*this); } * Foo& Foo::operator=(const Foo& c) { return PI::assign(*this, c); } * * int foo::fooDo() { return impl->fooDo(); } * */ template class PrivateImplRef { public: typedef typename T::Impl Impl; typedef boost::intrusive_ptr intrusive_ptr; /** Get the implementation pointer from a handle */ static intrusive_ptr get(const T& t) { return intrusive_ptr(t.impl); } /** Set the implementation pointer in a handle */ static void set(T& t, const intrusive_ptr& p) { if (t.impl == p) return; if (t.impl) boost::intrusive_ptr_release(t.impl); t.impl = p.get(); if (t.impl) boost::intrusive_ptr_add_ref(t.impl); } // Helper functions to implement the ctor, dtor, copy, assign static void ctor(T& t, Impl* p) { t.impl = p; if (p) boost::intrusive_ptr_add_ref(p); } static void copy(T& t, const T& x) { if (&t == &x) return; t.impl = 0; assign(t, x); } static void dtor(T& t) { if(t.impl) boost::intrusive_ptr_release(t.impl); } static T& assign(T& t, const T& x) { set(t, get(x)); return t;} }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_PRIVATEIMPL_H*/ qpidc-0.16/src/qpid/messaging/AddressParser.h0000664000076400007640000000443511444427465021571 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_ADDRESSPARSER_H #define QPID_MESSAGING_ADDRESSPARSER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Address.h" namespace qpid { namespace messaging { class AddressParser { public: AddressParser(const std::string&); bool parse(Address& address); bool parseMap(qpid::types::Variant::Map& map); bool parseList(qpid::types::Variant::List& list); private: const std::string& input; std::string::size_type current; static const std::string RESERVED; bool readChar(char c); bool readQuotedString(std::string& s); bool readQuotedValue(qpid::types::Variant& value); bool readString(std::string& value, char delimiter); bool readWord(std::string& word, const std::string& delims = RESERVED); bool readSimpleValue(qpid::types::Variant& word); bool readKey(std::string& key); bool readValue(qpid::types::Variant& value); bool readValueIfExists(qpid::types::Variant& value); bool readKeyValuePair(qpid::types::Variant::Map& map); bool readMap(qpid::types::Variant& value); bool readList(qpid::types::Variant& value); bool readName(std::string& name); bool readSubject(std::string& subject); bool error(const std::string& message); bool eos(); bool iswhitespace(); bool in(const std::string& delims); bool isreserved(); void readListItems(qpid::types::Variant::List& list); void readMapEntries(qpid::types::Variant::Map& map); }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_ADDRESSPARSER_H*/ qpidc-0.16/src/qpid/messaging/exceptions.cpp0000664000076400007640000000516311357641377021545 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/exceptions.h" namespace qpid { namespace messaging { MessagingException::MessagingException(const std::string& msg) : qpid::types::Exception(msg) {} MessagingException::~MessagingException() throw() {} InvalidOptionString::InvalidOptionString(const std::string& msg) : MessagingException(msg) {} KeyError::KeyError(const std::string& msg) : MessagingException(msg) {} LinkError::LinkError(const std::string& msg) : MessagingException(msg) {} AddressError::AddressError(const std::string& msg) : LinkError(msg) {} ResolutionError::ResolutionError(const std::string& msg) : AddressError(msg) {} MalformedAddress::MalformedAddress(const std::string& msg) : AddressError(msg) {} AssertionFailed::AssertionFailed(const std::string& msg) : ResolutionError(msg) {} NotFound::NotFound(const std::string& msg) : ResolutionError(msg) {} ReceiverError::ReceiverError(const std::string& msg) : LinkError(msg) {} FetchError::FetchError(const std::string& msg) : ReceiverError(msg) {} NoMessageAvailable::NoMessageAvailable() : FetchError("No message to fetch") {} SenderError::SenderError(const std::string& msg) : LinkError(msg) {} SendError::SendError(const std::string& msg) : SenderError(msg) {} TargetCapacityExceeded::TargetCapacityExceeded(const std::string& msg) : SendError(msg) {} SessionError::SessionError(const std::string& msg) : MessagingException(msg) {} TransactionError::TransactionError(const std::string& msg) : SessionError(msg) {} TransactionAborted::TransactionAborted(const std::string& msg) : TransactionError(msg) {} UnauthorizedAccess::UnauthorizedAccess(const std::string& msg) : SessionError(msg) {} ConnectionError::ConnectionError(const std::string& msg) : MessagingException(msg) {} TransportFailure::TransportFailure(const std::string& msg) : MessagingException(msg) {} }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/MessageImpl.cpp0000664000076400007640000000521311424074143021550 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "MessageImpl.h" #include "qpid/messaging/Message.h" namespace qpid { namespace messaging { namespace { const std::string EMPTY_STRING = ""; } using namespace qpid::types; MessageImpl::MessageImpl(const std::string& c) : priority(0), ttl(0), durable(false), redelivered(false), bytes(c), internalId(0) {} MessageImpl::MessageImpl(const char* chars, size_t count) : priority(0), ttl(0), durable (false), redelivered(false), bytes(chars, count), internalId(0) {} void MessageImpl::setReplyTo(const Address& d) { replyTo = d; } const Address& MessageImpl::getReplyTo() const { return replyTo; } void MessageImpl::setSubject(const std::string& s) { subject = s; } const std::string& MessageImpl::getSubject() const { return subject; } void MessageImpl::setContentType(const std::string& s) { contentType = s; } const std::string& MessageImpl::getContentType() const { return contentType; } const Variant::Map& MessageImpl::getHeaders() const { return headers; } Variant::Map& MessageImpl::getHeaders() { return headers; } void MessageImpl::setHeader(const std::string& key, const qpid::types::Variant& val) { headers[key] = val; } //should these methods be on MessageContent? void MessageImpl::setBytes(const std::string& c) { bytes = c; } void MessageImpl::setBytes(const char* chars, size_t count) { bytes.assign(chars, count); } const std::string& MessageImpl::getBytes() const { return bytes; } std::string& MessageImpl::getBytes() { return bytes; } void MessageImpl::setInternalId(qpid::framing::SequenceNumber i) { internalId = i; } qpid::framing::SequenceNumber MessageImpl::getInternalId() { return internalId; } MessageImpl& MessageImplAccess::get(Message& msg) { return *msg.impl; } const MessageImpl& MessageImplAccess::get(const Message& msg) { return *msg.impl; } }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/FailoverUpdates.cpp0000664000076400007640000000554611374332345022455 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/FailoverUpdates.h" #include "qpid/messaging/Connection.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Session.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Thread.h" #include "qpid/log/Statement.h" #include "qpid/Exception.h" #include "qpid/Url.h" #include "qpid/framing/Uuid.h" #include namespace qpid { namespace messaging { using framing::Uuid; struct FailoverUpdatesImpl : qpid::sys::Runnable { Connection connection; Session session; Receiver receiver; qpid::sys::Thread thread; FailoverUpdatesImpl(Connection& c) : connection(c) { session = connection.createSession("failover-updates."+Uuid(true).str()); receiver = session.createReceiver("amq.failover"); thread = qpid::sys::Thread(*this); } ~FailoverUpdatesImpl() { try { session.close(); } catch(...) {} // Squash exceptions in a destructor. thread.join(); } void run() { try { Message message; while (receiver.fetch(message)) { connection.setOption("reconnect-urls", message.getProperties()["amq.failover"]); QPID_LOG(debug, "Set reconnect-urls to " << message.getProperties()["amq.failover"]); session.acknowledge(); } } catch (const ClosedException&) {} catch (const qpid::TransportFailure& e) { QPID_LOG(warning, "Failover updates stopped on loss of connection. " << e.what()); } catch (const std::exception& e) { QPID_LOG(warning, "Failover updates stopped due to exception: " << e.what()); } } }; FailoverUpdates::FailoverUpdates(Connection& connection) : impl(new FailoverUpdatesImpl(connection)) {} FailoverUpdates::~FailoverUpdates() { if (impl) { delete impl; } } FailoverUpdates::FailoverUpdates(const FailoverUpdates&) : impl(0) {} FailoverUpdates& FailoverUpdates::operator=(const FailoverUpdates&) { return *this; } }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/Session.cpp0000664000076400007640000000640511576116033020774 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Session.h" #include "qpid/messaging/Address.h" #include "qpid/messaging/Connection.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/SessionImpl.h" #include "qpid/messaging/PrivateImplRef.h" namespace qpid { namespace messaging { typedef PrivateImplRef PI; Session::Session(SessionImpl* impl) { PI::ctor(*this, impl); } Session::Session(const Session& s) : Handle() { PI::copy(*this, s); } Session::~Session() { PI::dtor(*this); } Session& Session::operator=(const Session& s) { return PI::assign(*this, s); } void Session::commit() { impl->commit(); } void Session::rollback() { impl->rollback(); } void Session::acknowledge(bool sync) { impl->acknowledge(sync); } void Session::acknowledge(Message& m, bool s) { impl->acknowledge(m, false); sync(s); } void Session::acknowledgeUpTo(Message& m, bool s) { impl->acknowledge(m, true); sync(s); } void Session::reject(Message& m) { impl->reject(m); } void Session::release(Message& m) { impl->release(m); } void Session::close() { impl->close(); } Sender Session::createSender(const Address& address) { return impl->createSender(address); } Receiver Session::createReceiver(const Address& address) { return impl->createReceiver(address); } Sender Session::createSender(const std::string& address) { return impl->createSender(Address(address)); } Receiver Session::createReceiver(const std::string& address) { return impl->createReceiver(Address(address)); } void Session::sync(bool block) { impl->sync(block); } bool Session::nextReceiver(Receiver& receiver, Duration timeout) { return impl->nextReceiver(receiver, timeout); } Receiver Session::nextReceiver(Duration timeout) { return impl->nextReceiver(timeout); } uint32_t Session::getReceivable() { return impl->getReceivable(); } uint32_t Session::getUnsettledAcks() { return impl->getUnsettledAcks(); } Sender Session::getSender(const std::string& name) const { return impl->getSender(name); } Receiver Session::getReceiver(const std::string& name) const { return impl->getReceiver(name); } Connection Session::getConnection() const { return impl->getConnection(); } void Session::checkError() { impl->checkError(); } bool Session::hasError() { try { checkError(); return false; } catch (const std::exception&) { return true; } } }} // namespace qpid::messaging qpidc-0.16/src/qpid/messaging/Receiver.cpp0000664000076400007640000000432711373253106021114 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/ReceiverImpl.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/PrivateImplRef.h" namespace qpid { namespace messaging { typedef PrivateImplRef PI; Receiver::Receiver(ReceiverImpl* impl) { PI::ctor(*this, impl); } Receiver::Receiver(const Receiver& s) : Handle() { PI::copy(*this, s); } Receiver::~Receiver() { PI::dtor(*this); } Receiver& Receiver::operator=(const Receiver& s) { return PI::assign(*this, s); } bool Receiver::get(Message& message, Duration timeout) { return impl->get(message, timeout); } Message Receiver::get(Duration timeout) { return impl->get(timeout); } bool Receiver::fetch(Message& message, Duration timeout) { return impl->fetch(message, timeout); } Message Receiver::fetch(Duration timeout) { return impl->fetch(timeout); } void Receiver::setCapacity(uint32_t c) { impl->setCapacity(c); } uint32_t Receiver::getCapacity() { return impl->getCapacity(); } uint32_t Receiver::getAvailable() { return impl->getAvailable(); } uint32_t Receiver::getUnsettled() { return impl->getUnsettled(); } void Receiver::close() { impl->close(); } const std::string& Receiver::getName() const { return impl->getName(); } Session Receiver::getSession() const { return impl->getSession(); } bool Receiver::isClosed() const { return impl->isClosed(); } }} // namespace qpid::messaging qpidc-0.16/src/qpid/RefCountedBuffer.h0000664000076400007640000000237311647104650020232 0ustar00jrossjross00000000000000#ifndef QPID_REFCOUNTEDBUFFER_H #define QPID_REFCOUNTEDBUFFER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include namespace qpid { /** * Reference-counted byte buffer. No alignment guarantees. */ class RefCountedBuffer : public RefCounted { public: /** Create a reference counted buffer of size n */ static BufferRef create(size_t n); protected: void released() const; }; } // namespace qpid #endif /*!QPID_REFCOUNTEDBUFFER_H*/ qpidc-0.16/src/qpid/pointer_to_other.h0000664000076400007640000000331210756654471020432 0ustar00jrossjross00000000000000#ifndef QPID_POINTERTOOTHER_H #define QPID_POINTERTOOTHER_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { // Defines the same pointer type (raw or smart) to another pointee type template struct pointer_to_other; template class Sp> struct pointer_to_other< Sp, U > { typedef Sp type; }; template class Sp> struct pointer_to_other< Sp, U > { typedef Sp type; }; template class Sp> struct pointer_to_other< Sp, U > { typedef Sp type; }; template struct pointer_to_other< T*, U > { typedef U* type; }; } // namespace qpid #endif /*!QPID_POINTERTOOTHER_H*/ qpidc-0.16/src/qpid/UrlArray.h0000664000076400007640000000241311667675601016611 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_URLARRAY_H #define QPID_CLUSTER_URLARRAY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Array.h" #include "qpid/framing/FieldValue.h" #include "qpid/Url.h" #include namespace qpid { /** @file Functions to encode/decode an array of URLs. */ QPID_COMMON_EXTERN std::vector urlArrayToVector(const framing::Array& array); QPID_COMMON_EXTERN framing::Array vectorToUrlArray(const std::vector& urls); } // namespace qpid #endif /* !QPID_CLUSTER_URLARRAY_H */ qpidc-0.16/src/qpid/DataDir.h0000664000076400007640000000256511311752102016342 0ustar00jrossjross00000000000000#ifndef QPID_DATADIR_H #define QPID_DATADIR_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "qpid/CommonImportExport.h" namespace qpid { namespace sys { class LockFile; } /** * DataDir class. */ class DataDir { const bool enabled; const std::string dirPath; std::auto_ptr lockFile; public: QPID_COMMON_EXTERN DataDir (std::string path); QPID_COMMON_EXTERN ~DataDir (); bool isEnabled() { return enabled; } const std::string& getPath() { return dirPath; } }; } // namespace qpid #endif /*!QPID_DATADIR_H*/ qpidc-0.16/src/qpid/Options.cpp0000664000076400007640000001465611564504651017042 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/Options.h" #include "qpid/Exception.h" #include #include #include #include namespace qpid { using namespace std; namespace { struct EnvOptMapper { static bool matchChar(char env, char opt) { return (env==toupper(opt)) || (strchr("-.", opt) && env=='_'); } static bool matchStr(const string& env, boost::shared_ptr desc) { return desc->long_name().size() == env.size() && std::equal(env.begin(), env.end(), desc->long_name().begin(), &matchChar); } static bool matchCase(const string& env, boost::shared_ptr desc) { return env == desc->long_name(); } EnvOptMapper(const Options& o) : opts(o) {} string operator()(const string& envVar) { static const std::string prefix("QPID_"); if (envVar.substr(0, prefix.size()) == prefix) { string env = envVar.substr(prefix.size()); typedef const std::vector< boost::shared_ptr > OptDescs; OptDescs::const_iterator i = find_if(opts.options().begin(), opts.options().end(), boost::bind(matchStr, env, _1)); if (i != opts.options().end()) return (*i)->long_name(); } return string(); } bool isComment ( string const & str ) { size_t i = str.find_first_not_of ( " \t" ); if ( i == string::npos ) return true; return str[i] == '#'; } string configFileLine (string& line) { if ( isComment ( line ) ) return string(); size_t pos = line.find ('='); if (pos == string::npos) return string(); string key = line.substr (0, pos); #if (BOOST_VERSION >= 103300) typedef const std::vector< boost::shared_ptr > OptDescs; OptDescs::const_iterator i = find_if(opts.options().begin(), opts.options().end(), boost::bind(matchCase, key, _1)); if (i != opts.options().end()) return string (line) + "\n"; else return string(); #else // Use 'count' to see if this option exists. Using 'find' will SEGV or hang // if the option has not been defined yet. if ( opts.count(key.c_str()) > 0 ) return string ( line ) + "\n"; else return string ( ); #endif } const Options& opts; }; } std::string prettyArg(const std::string& name, const std::string& value) { return value.empty() ? name+" " : name+" ("+value+") "; } Options::Options(const string& name) : po::options_description(name) { } void Options::parse(int argc, char const* const* argv, const std::string& configFile, bool allowUnknown) { string defaultConfigFile = configFile; // May be changed by env/cmdline string parsing; try { po::variables_map vm; parsing="command line options"; if (argc > 0 && argv != 0) { if (allowUnknown) { // This hideous workaround is required because boost 1.33 has a bug // that causes 'allow_unregistered' to not work. po::command_line_parser clp = po::command_line_parser(argc, const_cast(argv)). options(*this).allow_unregistered(); po::parsed_options opts = clp.run(); po::parsed_options filtopts = clp.run(); filtopts.options.clear (); for (std::vector< po::basic_option >::iterator i = opts.options.begin(); i != opts.options.end(); i++) if (!i->unregistered) filtopts.options.push_back (*i); po::store(filtopts, vm); } else po::store(po::parse_command_line(argc, const_cast(argv), *this), vm); } parsing="environment variables"; po::store(po::parse_environment(*this, EnvOptMapper(*this)), vm); po::notify(vm); // configFile may be updated from arg/env options. if (!configFile.empty()) { parsing="configuration file "+configFile; ifstream conf(configFile.c_str()); if (conf.good()) { // Remove this hack when we get a stable version of boost that // can allow unregistered options in config files. EnvOptMapper mapper(*this); stringstream filtered; while (!conf.eof()) { string line; getline (conf, line); filtered << mapper.configFileLine (line); } po::store(po::parse_config_file(filtered, *this), vm); // End of hack } else { // No error if default configfile is missing/unreadable // but complain for non-default config file. if (configFile != defaultConfigFile) throw Exception("cannot read configuration file " +configFile); } } po::notify(vm); } catch (const std::exception& e) { ostringstream msg; msg << "Error in " << parsing << ": " << e.what() << endl; #if (BOOST_VERSION >= 103300) if (find_nothrow("help", false)) msg << "Use --help to see valid options" << endl; #endif throw Exception(msg.str()); } } CommonOptions::CommonOptions(const string& name, const string& configfile) : Options(name), config(configfile) { addOptions() ("help,h", optValue(help), "Displays the help message") ("version,v", optValue(version), "Displays version information") ("config", optValue(config, "FILE"), "Reads configuration from FILE"); } } // namespace qpid qpidc-0.16/src/qpid/RefCountedBuffer.cpp0000664000076400007640000000271511647104650020565 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCountedBuffer.h" #include #include namespace qpid { void RefCountedBuffer::released() const { this->~RefCountedBuffer(); ::free (reinterpret_cast(const_cast(this))); } BufferRef RefCountedBuffer::create(size_t n) { void* store=::malloc (n + sizeof(RefCountedBuffer)); if (NULL == store) throw std::bad_alloc(); new(store) RefCountedBuffer; char* start = reinterpret_cast(store) + sizeof(RefCountedBuffer); return BufferRef( boost::intrusive_ptr(reinterpret_cast(store)), start, start+n); } } // namespace qpid qpidc-0.16/src/qpid/amqp_0_10/0000775000076400007640000000000011752725716016352 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/amqp_0_10/ApplyControl.h0000664000076400007640000002777411752725700021163 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_APPLYCONTROL_H #define QPID_AMQP_0_10_APPLYCONTROL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/ControlVisitor.h" #include "qpid/amqp_0_10/apply.h" namespace qpid { namespace amqp_0_10 { template struct ApplyVisitor: public ApplyVisitorBase { virtual void visit(connection::Start& x) { this->invoke(x); } virtual void visit(connection::StartOk& x) { this->invoke(x); } virtual void visit(connection::Secure& x) { this->invoke(x); } virtual void visit(connection::SecureOk& x) { this->invoke(x); } virtual void visit(connection::Tune& x) { this->invoke(x); } virtual void visit(connection::TuneOk& x) { this->invoke(x); } virtual void visit(connection::Open& x) { this->invoke(x); } virtual void visit(connection::OpenOk& x) { this->invoke(x); } virtual void visit(connection::Redirect& x) { this->invoke(x); } virtual void visit(connection::Heartbeat& x) { this->invoke(x); } virtual void visit(connection::Close& x) { this->invoke(x); } virtual void visit(connection::CloseOk& x) { this->invoke(x); } virtual void visit(session::Attach& x) { this->invoke(x); } virtual void visit(session::Attached& x) { this->invoke(x); } virtual void visit(session::Detach& x) { this->invoke(x); } virtual void visit(session::Detached& x) { this->invoke(x); } virtual void visit(session::RequestTimeout& x) { this->invoke(x); } virtual void visit(session::Timeout& x) { this->invoke(x); } virtual void visit(session::CommandPoint& x) { this->invoke(x); } virtual void visit(session::Expected& x) { this->invoke(x); } virtual void visit(session::Confirmed& x) { this->invoke(x); } virtual void visit(session::Completed& x) { this->invoke(x); } virtual void visit(session::KnownCompleted& x) { this->invoke(x); } virtual void visit(session::Flush& x) { this->invoke(x); } virtual void visit(session::Gap& x) { this->invoke(x); } virtual void visit(cluster::UpdateRequest& x) { this->invoke(x); } virtual void visit(cluster::UpdateOffer& x) { this->invoke(x); } virtual void visit(cluster::RetractOffer& x) { this->invoke(x); } virtual void visit(cluster::InitialStatus& x) { this->invoke(x); } virtual void visit(cluster::Ready& x) { this->invoke(x); } virtual void visit(cluster::ConfigChange& x) { this->invoke(x); } virtual void visit(cluster::ErrorCheck& x) { this->invoke(x); } virtual void visit(cluster::TimerWakeup& x) { this->invoke(x); } virtual void visit(cluster::TimerDrop& x) { this->invoke(x); } virtual void visit(cluster::Shutdown& x) { this->invoke(x); } virtual void visit(cluster::DeliverToQueue& x) { this->invoke(x); } virtual void visit(cluster::Clock& x) { this->invoke(x); } virtual void visit(cluster-connection::Announce& x) { this->invoke(x); } virtual void visit(cluster-connection::DeliverClose& x) { this->invoke(x); } virtual void visit(cluster-connection::DeliverDoOutput& x) { this->invoke(x); } virtual void visit(cluster-connection::Abort& x) { this->invoke(x); } virtual void visit(cluster-connection::ShadowSetUser& x) { this->invoke(x); } virtual void visit(cluster-connection::ShadowPrepare& x) { this->invoke(x); } virtual void visit(cluster-connection::ConsumerState& x) { this->invoke(x); } virtual void visit(cluster-connection::DeliveryRecord& x) { this->invoke(x); } virtual void visit(cluster-connection::TxStart& x) { this->invoke(x); } virtual void visit(cluster-connection::TxAccept& x) { this->invoke(x); } virtual void visit(cluster-connection::TxDequeue& x) { this->invoke(x); } virtual void visit(cluster-connection::TxEnqueue& x) { this->invoke(x); } virtual void visit(cluster-connection::TxPublish& x) { this->invoke(x); } virtual void visit(cluster-connection::TxEnd& x) { this->invoke(x); } virtual void visit(cluster-connection::AccumulatedAck& x) { this->invoke(x); } virtual void visit(cluster-connection::OutputTask& x) { this->invoke(x); } virtual void visit(cluster-connection::DtxStart& x) { this->invoke(x); } virtual void visit(cluster-connection::DtxEnd& x) { this->invoke(x); } virtual void visit(cluster-connection::DtxAck& x) { this->invoke(x); } virtual void visit(cluster-connection::DtxBufferRef& x) { this->invoke(x); } virtual void visit(cluster-connection::DtxWorkRecord& x) { this->invoke(x); } virtual void visit(cluster-connection::SessionState& x) { this->invoke(x); } virtual void visit(cluster-connection::ShadowReady& x) { this->invoke(x); } virtual void visit(cluster-connection::Membership& x) { this->invoke(x); } virtual void visit(cluster-connection::RetractOffer& x) { this->invoke(x); } virtual void visit(cluster-connection::QueuePosition& x) { this->invoke(x); } virtual void visit(cluster-connection::Exchange& x) { this->invoke(x); } virtual void visit(cluster-connection::AddQueueListener& x) { this->invoke(x); } virtual void visit(cluster-connection::ManagementSetupState& x) { this->invoke(x); } virtual void visit(cluster-connection::Config& x) { this->invoke(x); } virtual void visit(cluster-connection::QueueFairshareState& x) { this->invoke(x); } virtual void visit(cluster-connection::QueueObserverState& x) { this->invoke(x); } virtual void visit(cluster-connection::Clock& x) { this->invoke(x); } virtual void visit(cluster-connection::QueueDequeueSincePurgeState& x) { this->invoke(x); } }; template struct ApplyVisitor: public ApplyVisitorBase { virtual void visit(const connection::Start& x) { this->invoke(x); } virtual void visit(const connection::StartOk& x) { this->invoke(x); } virtual void visit(const connection::Secure& x) { this->invoke(x); } virtual void visit(const connection::SecureOk& x) { this->invoke(x); } virtual void visit(const connection::Tune& x) { this->invoke(x); } virtual void visit(const connection::TuneOk& x) { this->invoke(x); } virtual void visit(const connection::Open& x) { this->invoke(x); } virtual void visit(const connection::OpenOk& x) { this->invoke(x); } virtual void visit(const connection::Redirect& x) { this->invoke(x); } virtual void visit(const connection::Heartbeat& x) { this->invoke(x); } virtual void visit(const connection::Close& x) { this->invoke(x); } virtual void visit(const connection::CloseOk& x) { this->invoke(x); } virtual void visit(const session::Attach& x) { this->invoke(x); } virtual void visit(const session::Attached& x) { this->invoke(x); } virtual void visit(const session::Detach& x) { this->invoke(x); } virtual void visit(const session::Detached& x) { this->invoke(x); } virtual void visit(const session::RequestTimeout& x) { this->invoke(x); } virtual void visit(const session::Timeout& x) { this->invoke(x); } virtual void visit(const session::CommandPoint& x) { this->invoke(x); } virtual void visit(const session::Expected& x) { this->invoke(x); } virtual void visit(const session::Confirmed& x) { this->invoke(x); } virtual void visit(const session::Completed& x) { this->invoke(x); } virtual void visit(const session::KnownCompleted& x) { this->invoke(x); } virtual void visit(const session::Flush& x) { this->invoke(x); } virtual void visit(const session::Gap& x) { this->invoke(x); } virtual void visit(const cluster::UpdateRequest& x) { this->invoke(x); } virtual void visit(const cluster::UpdateOffer& x) { this->invoke(x); } virtual void visit(const cluster::RetractOffer& x) { this->invoke(x); } virtual void visit(const cluster::InitialStatus& x) { this->invoke(x); } virtual void visit(const cluster::Ready& x) { this->invoke(x); } virtual void visit(const cluster::ConfigChange& x) { this->invoke(x); } virtual void visit(const cluster::ErrorCheck& x) { this->invoke(x); } virtual void visit(const cluster::TimerWakeup& x) { this->invoke(x); } virtual void visit(const cluster::TimerDrop& x) { this->invoke(x); } virtual void visit(const cluster::Shutdown& x) { this->invoke(x); } virtual void visit(const cluster::DeliverToQueue& x) { this->invoke(x); } virtual void visit(const cluster::Clock& x) { this->invoke(x); } virtual void visit(const cluster-connection::Announce& x) { this->invoke(x); } virtual void visit(const cluster-connection::DeliverClose& x) { this->invoke(x); } virtual void visit(const cluster-connection::DeliverDoOutput& x) { this->invoke(x); } virtual void visit(const cluster-connection::Abort& x) { this->invoke(x); } virtual void visit(const cluster-connection::ShadowSetUser& x) { this->invoke(x); } virtual void visit(const cluster-connection::ShadowPrepare& x) { this->invoke(x); } virtual void visit(const cluster-connection::ConsumerState& x) { this->invoke(x); } virtual void visit(const cluster-connection::DeliveryRecord& x) { this->invoke(x); } virtual void visit(const cluster-connection::TxStart& x) { this->invoke(x); } virtual void visit(const cluster-connection::TxAccept& x) { this->invoke(x); } virtual void visit(const cluster-connection::TxDequeue& x) { this->invoke(x); } virtual void visit(const cluster-connection::TxEnqueue& x) { this->invoke(x); } virtual void visit(const cluster-connection::TxPublish& x) { this->invoke(x); } virtual void visit(const cluster-connection::TxEnd& x) { this->invoke(x); } virtual void visit(const cluster-connection::AccumulatedAck& x) { this->invoke(x); } virtual void visit(const cluster-connection::OutputTask& x) { this->invoke(x); } virtual void visit(const cluster-connection::DtxStart& x) { this->invoke(x); } virtual void visit(const cluster-connection::DtxEnd& x) { this->invoke(x); } virtual void visit(const cluster-connection::DtxAck& x) { this->invoke(x); } virtual void visit(const cluster-connection::DtxBufferRef& x) { this->invoke(x); } virtual void visit(const cluster-connection::DtxWorkRecord& x) { this->invoke(x); } virtual void visit(const cluster-connection::SessionState& x) { this->invoke(x); } virtual void visit(const cluster-connection::ShadowReady& x) { this->invoke(x); } virtual void visit(const cluster-connection::Membership& x) { this->invoke(x); } virtual void visit(const cluster-connection::RetractOffer& x) { this->invoke(x); } virtual void visit(const cluster-connection::QueuePosition& x) { this->invoke(x); } virtual void visit(const cluster-connection::Exchange& x) { this->invoke(x); } virtual void visit(const cluster-connection::AddQueueListener& x) { this->invoke(x); } virtual void visit(const cluster-connection::ManagementSetupState& x) { this->invoke(x); } virtual void visit(const cluster-connection::Config& x) { this->invoke(x); } virtual void visit(const cluster-connection::QueueFairshareState& x) { this->invoke(x); } virtual void visit(const cluster-connection::QueueObserverState& x) { this->invoke(x); } virtual void visit(const cluster-connection::Clock& x) { this->invoke(x); } virtual void visit(const cluster-connection::QueueDequeueSincePurgeState& x) { this->invoke(x); } }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_APPLYCONTROL_H*/ qpidc-0.16/src/qpid/amqp_0_10/Header.h0000664000076400007640000000310711001416137017671 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_HEADER_H #define QPID_AMQP_0_10_HEADER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/built_in_types.h" #include "qpid/amqp_0_10/Struct32.h" #include #include namespace qpid { namespace amqp_0_10 { class Header : public std::vector { public: Header() {} template void serialize(S& s) { s.split(*this); } template void encode(S& s) const { s(this->begin(), this->end()); } template void decode(S& s); }; template void Header::decode(S& s) { this->clear(); while (s.bytesRemaining() > 0) { this->push_back(Struct32()); s(this->back()); } } std::ostream& operator<<(std::ostream& o, const Header&); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_HEADER_H*/ qpidc-0.16/src/qpid/amqp_0_10/UnknownType.cpp0000664000076400007640000000325311227113407021343 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/UnknownType.h" #include #include namespace qpid { namespace amqp_0_10 { UnknownType::Width UnknownType::WidthTable[16] = { { 1, 0 }, { 2, 0 }, { 4, 0 }, { 8, 0 }, { 16, 0 }, { 32, 0 }, { 64, 0 }, { 128, 0 }, { 0, 1 }, { 0, 2 }, { 0, 4 }, { -1, -1 }, // Invalid { 5, 0 }, { 9, 0 }, { -1, -1 }, // Invalid { 0, 0 } }; int UnknownType::fixed() const { return WidthTable[code>>4].fixed; } int UnknownType::variable() const { return WidthTable[code>>4].variable; } UnknownType::UnknownType(uint8_t c) : code(c) { data.resize(fixed()); } std::ostream& operator<<(std::ostream& o, const UnknownType& u) { return o << boost::make_iterator_range(u.begin(), u.end()) << std::endl; } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/StructHolder.h0000664000076400007640000000654311752725700021146 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_STRUCTHOLDER_H #define QPID_AMQP_0_10_STRUCTHOLDER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/ApplyStruct.h" #include "qpid/amqp_0_10/Holder.h" #include "qpid/amqp_0_10/structs.h" namespace qpid { namespace amqp_0_10 { namespace struct_max { static const size_t MAX000=0; static const size_t MAX001 = sizeof(message::DeliveryProperties) > MAX000 ? sizeof(message::DeliveryProperties) : MAX000; static const size_t MAX002 = sizeof(message::FragmentProperties) > MAX001 ? sizeof(message::FragmentProperties) : MAX001; static const size_t MAX003 = sizeof(message::MessageProperties) > MAX002 ? sizeof(message::MessageProperties) : MAX002; static const size_t MAX004 = sizeof(message::Acquired) > MAX003 ? sizeof(message::Acquired) : MAX003; static const size_t MAX005 = sizeof(message::MessageResumeResult) > MAX004 ? sizeof(message::MessageResumeResult) : MAX004; static const size_t MAX006 = sizeof(dtx::XaResult) > MAX005 ? sizeof(dtx::XaResult) : MAX005; static const size_t MAX007 = sizeof(dtx::Xid) > MAX006 ? sizeof(dtx::Xid) : MAX006; static const size_t MAX008 = sizeof(dtx::GetTimeoutResult) > MAX007 ? sizeof(dtx::GetTimeoutResult) : MAX007; static const size_t MAX009 = sizeof(dtx::RecoverResult) > MAX008 ? sizeof(dtx::RecoverResult) : MAX008; static const size_t MAX010 = sizeof(exchange::ExchangeQueryResult) > MAX009 ? sizeof(exchange::ExchangeQueryResult) : MAX009; static const size_t MAX011 = sizeof(exchange::ExchangeBoundResult) > MAX010 ? sizeof(exchange::ExchangeBoundResult) : MAX010; static const size_t MAX012 = sizeof(queue::QueueQueryResult) > MAX011 ? sizeof(queue::QueueQueryResult) : MAX011; static const size_t MAX013 = sizeof(file::FileProperties) > MAX012 ? sizeof(file::FileProperties) : MAX012; static const size_t MAX014 = sizeof(stream::StreamProperties) > MAX013 ? sizeof(stream::StreamProperties) : MAX013; static const size_t MAX015 = sizeof(UnknownStruct) > MAX014 ? sizeof(UnknownStruct) : MAX014; static const int MAX=MAX015; } // namespace struct_max struct StructHolder: public amqp_0_10::Holder { StructHolder() {} template explicit StructHolder(const T& t) : amqp_0_10::Holder(t) {} using amqp_0_10::Holder::operator=; void set(uint8_t classCode, uint8_t code); }; std::ostream& operator<<(std::ostream& o, const StructHolder& h); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_STRUCTHOLDER_H*/ qpidc-0.16/src/qpid/amqp_0_10/CommandHolder.cpp0000664000076400007640000001167011752725700021570 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/CommandHolder.h" #include "qpid/amqp_0_10/exceptions.h" namespace qpid { namespace amqp_0_10 { using framing::in_place; void CommandHolder::set(uint8_t classCode, uint8_t code) { uint16_t key=(classCode<<8)+code; switch(key) { case 0x301: *this=in_place(); break; case 0x302: *this=in_place(); break; case 0x303: *this=in_place(); break; case 0x401: *this=in_place(); break; case 0x402: *this=in_place(); break; case 0x403: *this=in_place(); break; case 0x404: *this=in_place(); break; case 0x405: *this=in_place(); break; case 0x406: *this=in_place(); break; case 0x407: *this=in_place(); break; case 0x408: *this=in_place(); break; case 0x409: *this=in_place(); break; case 0x40a: *this=in_place(); break; case 0x40b: *this=in_place(); break; case 0x40c: *this=in_place(); break; case 0x501: *this=in_place(); break; case 0x502: *this=in_place(); break; case 0x503: *this=in_place(); break; case 0x601: *this=in_place(); break; case 0x602: *this=in_place(); break; case 0x603: *this=in_place(); break; case 0x604: *this=in_place(); break; case 0x605: *this=in_place(); break; case 0x606: *this=in_place(); break; case 0x607: *this=in_place(); break; case 0x608: *this=in_place(); break; case 0x609: *this=in_place(); break; case 0x60a: *this=in_place(); break; case 0x701: *this=in_place(); break; case 0x702: *this=in_place(); break; case 0x703: *this=in_place(); break; case 0x704: *this=in_place(); break; case 0x705: *this=in_place(); break; case 0x706: *this=in_place(); break; case 0x801: *this=in_place(); break; case 0x802: *this=in_place(); break; case 0x803: *this=in_place(); break; case 0x804: *this=in_place(); break; case 0x901: *this=in_place(); break; case 0x902: *this=in_place(); break; case 0x903: *this=in_place(); break; case 0x904: *this=in_place(); break; case 0x905: *this=in_place(); break; case 0x906: *this=in_place(); break; case 0x907: *this=in_place(); break; case 0x908: *this=in_place(); break; case 0x909: *this=in_place(); break; case 0x90a: *this=in_place(); break; case 0x90b: *this=in_place(); break; case 0x90c: *this=in_place(); break; case 0x90d: *this=in_place(); break; case 0xa01: *this=in_place(); break; case 0xa02: *this=in_place(); break; case 0xa03: *this=in_place(); break; case 0xa04: *this=in_place(); break; case 0xa05: *this=in_place(); break; case 0xa06: *this=in_place(); break; case 0xa07: *this=in_place(); break; case 0xa08: *this=in_place(); break; default: throw CommandInvalidException(QPID_MSG("Invalid class-command key " << std::hex << key)); } } std::ostream& operator<<(std::ostream& o, const CommandHolder& h) { return h.get() ? (o << *h.get()) : (o << ""); } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/structs.cpp0000664000076400007640000003540111752725700020561 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/structs.h" #include "qpid/amqp_0_10/StructHolder.h" namespace qpid { namespace amqp_0_10 { namespace connection { } // namespace connection namespace session { const char* Header::NAME="session.header"; const char* Header::CLASS_NAME=session::NAME; Header::Header(Bit sync_) : sync(sync_){ } std::ostream& operator << (std::ostream& o, const Header&x) { o << "session.header["; o << " sync=" << x.sync; o << "]"; return o; } const char* CommandFragment::NAME="session.command-fragment"; const char* CommandFragment::CLASS_NAME=session::NAME; CommandFragment::CommandFragment( const SequenceNo& commandId_, const ByteRanges& byteRanges_ ) : commandId(commandId_), byteRanges(byteRanges_){ } std::ostream& operator << (std::ostream& o, const CommandFragment&x) { o << "session.command-fragment["; o << " command-id=" << x.commandId; o << " byte-ranges=" << x.byteRanges; o << "]"; return o; } } // namespace session namespace execution { } // namespace execution namespace message { const char* DeliveryProperties::NAME="message.delivery-properties"; const char* DeliveryProperties::CLASS_NAME=message::NAME; DeliveryProperties::DeliveryProperties( Bit discardUnroutable_, Bit immediate_, Bit redelivered_, const message::DeliveryPriority& priority_, const message::DeliveryMode& deliveryMode_, Uint64 ttl_, const Datetime& timestamp_, const Datetime& expiration_, const exchange::Name& exchange_, const Str8& routingKey_, const message::ResumeId& resumeId_, Uint64 resumeTtl_ ) : discardUnroutable(discardUnroutable_), immediate(immediate_), redelivered(redelivered_), priority(priority_), deliveryMode(deliveryMode_), ttl(ttl_), timestamp(timestamp_), expiration(expiration_), exchange(exchange_), routingKey(routingKey_), resumeId(resumeId_), resumeTtl(resumeTtl_){ } void DeliveryProperties::accept(Visitor& v) { v.visit(*this); } void DeliveryProperties::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DeliveryProperties&x) { o << "message.delivery-properties["; o << " discard-unroutable=" << x.discardUnroutable; o << " immediate=" << x.immediate; o << " redelivered=" << x.redelivered; o << " priority=" << x.priority; o << " delivery-mode=" << x.deliveryMode; o << " ttl=" << x.ttl; o << " timestamp=" << x.timestamp; o << " expiration=" << x.expiration; o << " exchange=" << x.exchange; o << " routing-key=" << x.routingKey; o << " resume-id=" << x.resumeId; o << " resume-ttl=" << x.resumeTtl; o << "]"; return o; } const char* FragmentProperties::NAME="message.fragment-properties"; const char* FragmentProperties::CLASS_NAME=message::NAME; FragmentProperties::FragmentProperties( Bit first_, Bit last_, Uint64 fragmentSize_ ) : first(first_), last(last_), fragmentSize(fragmentSize_){ } void FragmentProperties::accept(Visitor& v) { v.visit(*this); } void FragmentProperties::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const FragmentProperties&x) { o << "message.fragment-properties["; o << " first=" << x.first; o << " last=" << x.last; o << " fragment-size=" << x.fragmentSize; o << "]"; return o; } const char* ReplyTo::NAME="message.reply-to"; const char* ReplyTo::CLASS_NAME=message::NAME; ReplyTo::ReplyTo( const exchange::Name& exchange_, const Str8& routingKey_ ) : exchange(exchange_), routingKey(routingKey_){ } std::ostream& operator << (std::ostream& o, const ReplyTo&x) { o << "message.reply-to["; o << " exchange=" << x.exchange; o << " routing-key=" << x.routingKey; o << "]"; return o; } const char* MessageProperties::NAME="message.message-properties"; const char* MessageProperties::CLASS_NAME=message::NAME; MessageProperties::MessageProperties( Uint64 contentLength_, const Uuid& messageId_, const Vbin16& correlationId_, const message::ReplyTo& replyTo_, const Str8& contentType_, const Str8& contentEncoding_, const Vbin16& userId_, const Vbin16& appId_, const Map& applicationHeaders_ ) : contentLength(contentLength_), messageId(messageId_), correlationId(correlationId_), replyTo(replyTo_), contentType(contentType_), contentEncoding(contentEncoding_), userId(userId_), appId(appId_), applicationHeaders(applicationHeaders_){ } void MessageProperties::accept(Visitor& v) { v.visit(*this); } void MessageProperties::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const MessageProperties&x) { o << "message.message-properties["; o << " content-length=" << x.contentLength; o << " message-id=" << x.messageId; o << " correlation-id=" << x.correlationId; o << " reply-to=" << x.replyTo; o << " content-type=" << x.contentType; o << " content-encoding=" << x.contentEncoding; o << " user-id=" << x.userId; o << " app-id=" << x.appId; o << " application-headers=" << x.applicationHeaders; o << "]"; return o; } const char* Acquired::NAME="message.acquire.result.acquired"; const char* Acquired::CLASS_NAME=message::NAME; Acquired::Acquired(const session::Commands& transfers_) : transfers(transfers_){ } void Acquired::accept(Visitor& v) { v.visit(*this); } void Acquired::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Acquired&x) { o << "message.acquire.result.acquired["; o << " transfers=" << x.transfers; o << "]"; return o; } const char* MessageResumeResult::NAME="message.resume.result.message-resume-result"; const char* MessageResumeResult::CLASS_NAME=message::NAME; MessageResumeResult::MessageResumeResult(Uint64 offset_) : offset(offset_){ } void MessageResumeResult::accept(Visitor& v) { v.visit(*this); } void MessageResumeResult::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const MessageResumeResult&x) { o << "message.resume.result.message-resume-result["; o << " offset=" << x.offset; o << "]"; return o; } } // namespace message namespace tx { } // namespace tx namespace dtx { const char* XaResult::NAME="dtx.xa-result"; const char* XaResult::CLASS_NAME=dtx::NAME; XaResult::XaResult(const dtx::XaStatus& status_) : status(status_){ } void XaResult::accept(Visitor& v) { v.visit(*this); } void XaResult::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const XaResult&x) { o << "dtx.xa-result["; o << " status=" << x.status; o << "]"; return o; } const char* Xid::NAME="dtx.xid"; const char* Xid::CLASS_NAME=dtx::NAME; Xid::Xid( Uint32 format_, const Vbin8& globalId_, const Vbin8& branchId_ ) : format(format_), globalId(globalId_), branchId(branchId_){ } void Xid::accept(Visitor& v) { v.visit(*this); } void Xid::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Xid&x) { o << "dtx.xid["; o << " format=" << x.format; o << " global-id=" << x.globalId; o << " branch-id=" << x.branchId; o << "]"; return o; } const char* GetTimeoutResult::NAME="dtx.get-timeout.result.get-timeout-result"; const char* GetTimeoutResult::CLASS_NAME=dtx::NAME; GetTimeoutResult::GetTimeoutResult(Uint32 timeout_) : timeout(timeout_){ } void GetTimeoutResult::accept(Visitor& v) { v.visit(*this); } void GetTimeoutResult::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const GetTimeoutResult&x) { o << "dtx.get-timeout.result.get-timeout-result["; o << " timeout=" << x.timeout; o << "]"; return o; } const char* RecoverResult::NAME="dtx.recover.result.recover-result"; const char* RecoverResult::CLASS_NAME=dtx::NAME; RecoverResult::RecoverResult(const ArrayDomain & inDoubt_) : inDoubt(inDoubt_){ } void RecoverResult::accept(Visitor& v) { v.visit(*this); } void RecoverResult::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const RecoverResult&x) { o << "dtx.recover.result.recover-result["; o << " in-doubt=" << x.inDoubt; o << "]"; return o; } } // namespace dtx namespace exchange { const char* ExchangeQueryResult::NAME="exchange.query.result.exchange-query-result"; const char* ExchangeQueryResult::CLASS_NAME=exchange::NAME; ExchangeQueryResult::ExchangeQueryResult( const Str8& type_, Bit durable_, Bit notFound_, const Map& arguments_ ) : type(type_), durable(durable_), notFound(notFound_), arguments(arguments_){ } void ExchangeQueryResult::accept(Visitor& v) { v.visit(*this); } void ExchangeQueryResult::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ExchangeQueryResult&x) { o << "exchange.query.result.exchange-query-result["; o << " type=" << x.type; o << " durable=" << x.durable; o << " not-found=" << x.notFound; o << " arguments=" << x.arguments; o << "]"; return o; } const char* ExchangeBoundResult::NAME="exchange.bound.result.exchange-bound-result"; const char* ExchangeBoundResult::CLASS_NAME=exchange::NAME; ExchangeBoundResult::ExchangeBoundResult( Bit exchangeNotFound_, Bit queueNotFound_, Bit queueNotMatched_, Bit keyNotMatched_, Bit argsNotMatched_ ) : exchangeNotFound(exchangeNotFound_), queueNotFound(queueNotFound_), queueNotMatched(queueNotMatched_), keyNotMatched(keyNotMatched_), argsNotMatched(argsNotMatched_){ } void ExchangeBoundResult::accept(Visitor& v) { v.visit(*this); } void ExchangeBoundResult::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ExchangeBoundResult&x) { o << "exchange.bound.result.exchange-bound-result["; o << " exchange-not-found=" << x.exchangeNotFound; o << " queue-not-found=" << x.queueNotFound; o << " queue-not-matched=" << x.queueNotMatched; o << " key-not-matched=" << x.keyNotMatched; o << " args-not-matched=" << x.argsNotMatched; o << "]"; return o; } } // namespace exchange namespace queue { const char* QueueQueryResult::NAME="queue.query.result.queue-query-result"; const char* QueueQueryResult::CLASS_NAME=queue::NAME; QueueQueryResult::QueueQueryResult( const queue::Name& queue_, const exchange::Name& alternateExchange_, Bit durable_, Bit exclusive_, Bit autoDelete_, const Map& arguments_, Uint32 messageCount_, Uint32 subscriberCount_ ) : queue(queue_), alternateExchange(alternateExchange_), durable(durable_), exclusive(exclusive_), autoDelete(autoDelete_), arguments(arguments_), messageCount(messageCount_), subscriberCount(subscriberCount_){ } void QueueQueryResult::accept(Visitor& v) { v.visit(*this); } void QueueQueryResult::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const QueueQueryResult&x) { o << "queue.query.result.queue-query-result["; o << " queue=" << x.queue; o << " alternate-exchange=" << x.alternateExchange; o << " durable=" << x.durable; o << " exclusive=" << x.exclusive; o << " auto-delete=" << x.autoDelete; o << " arguments=" << x.arguments; o << " message-count=" << x.messageCount; o << " subscriber-count=" << x.subscriberCount; o << "]"; return o; } } // namespace queue namespace file { const char* FileProperties::NAME="file.file-properties"; const char* FileProperties::CLASS_NAME=file::NAME; FileProperties::FileProperties( const Str8& contentType_, const Str8& contentEncoding_, const Map& headers_, Uint8 priority_, const Str8& replyTo_, const Str8& messageId_, const Str8& filename_, const Datetime& timestamp_, const Str8& clusterId_ ) : contentType(contentType_), contentEncoding(contentEncoding_), headers(headers_), priority(priority_), replyTo(replyTo_), messageId(messageId_), filename(filename_), timestamp(timestamp_), clusterId(clusterId_){ } void FileProperties::accept(Visitor& v) { v.visit(*this); } void FileProperties::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const FileProperties&x) { o << "file.file-properties["; o << " content-type=" << x.contentType; o << " content-encoding=" << x.contentEncoding; o << " headers=" << x.headers; o << " priority=" << x.priority; o << " reply-to=" << x.replyTo; o << " message-id=" << x.messageId; o << " filename=" << x.filename; o << " timestamp=" << x.timestamp; o << " cluster-id=" << x.clusterId; o << "]"; return o; } } // namespace file namespace stream { const char* StreamProperties::NAME="stream.stream-properties"; const char* StreamProperties::CLASS_NAME=stream::NAME; StreamProperties::StreamProperties( const Str8& contentType_, const Str8& contentEncoding_, const Map& headers_, Uint8 priority_, const Datetime& timestamp_ ) : contentType(contentType_), contentEncoding(contentEncoding_), headers(headers_), priority(priority_), timestamp(timestamp_){ } void StreamProperties::accept(Visitor& v) { v.visit(*this); } void StreamProperties::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const StreamProperties&x) { o << "stream.stream-properties["; o << " content-type=" << x.contentType; o << " content-encoding=" << x.contentEncoding; o << " headers=" << x.headers; o << " priority=" << x.priority; o << " timestamp=" << x.timestamp; o << "]"; return o; } } // namespace stream namespace cluster { } // namespace cluster namespace cluster_connection { } // namespace cluster_connection }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/UnknownStruct.cpp0000664000076400007640000000236511001171273021704 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/StructVisitor.h" #include "qpid/amqp_0_10/UnknownStruct.h" namespace qpid { namespace amqp_0_10 { void UnknownStruct::accept(Visitor& v) { v.visit(*this); } void UnknownStruct::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator<<(std::ostream& o, const UnknownStruct& u) { return o << "UnknownStruct[class=" << u.getClassCode() << " code=" << u.getCode() << "]"; } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/CodeForType.h0000664000076400007640000001027011752725700020677 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_CODEFORTYPE_H #define QPID_AMQP_0_10_CODEFORTYPE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/built_in_types.h" namespace qpid { namespace amqp_0_10 { template struct CodeForType; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template <> struct CodeForType { static const uint8_t value; }; template uint8_t codeFor(const T&) { return CodeForType::value; } }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_CODEFORTYPE_H*/ qpidc-0.16/src/qpid/amqp_0_10/UnitHandler.h0000664000076400007640000000212210776526274020740 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_UNITHANDLER_H #define QPID_AMQP_0_10_UNITHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Handler.h" namespace qpid { namespace amqp_0_10 { class Unit; typedef framing::Handler UnitHandler; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_UNITHANDLER_H*/ qpidc-0.16/src/qpid/amqp_0_10/SessionHandler.h0000664000076400007640000001106611706303201021424 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_SESSIONHANDLER_H #define QPID_AMQP_0_10_SESSIONHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/ChannelHandler.h" #include "qpid/framing/AMQP_AllProxy.h" #include "qpid/framing/AMQP_AllOperations.h" #include "qpid/SessionState.h" #include "qpid/CommonImportExport.h" namespace qpid { struct SessionException; namespace amqp_0_10 { /** * Base SessionHandler with logic common to both client and broker. * * A SessionHandler is associated with a channel and can be attached * to a session state. */ class QPID_COMMON_CLASS_EXTERN SessionHandler : public framing::AMQP_AllOperations::SessionHandler, public framing::FrameHandler::InOutHandler { public: QPID_COMMON_EXTERN SessionHandler(framing::FrameHandler* out=0, uint16_t channel=0); QPID_COMMON_EXTERN ~SessionHandler(); void setChannel(uint16_t ch) { channel = ch; } uint16_t getChannel() const { return channel.get(); } void setOutHandler(framing::FrameHandler& h) { channel.next = &h; } virtual SessionState* getState() = 0; virtual framing::FrameHandler* getInHandler() = 0; // Non-protocol methods, called locally to initiate some action. QPID_COMMON_EXTERN void sendDetach(); QPID_COMMON_EXTERN void sendCompletion(); QPID_COMMON_EXTERN void sendAttach(bool force); QPID_COMMON_EXTERN void sendTimeout(uint32_t t); QPID_COMMON_EXTERN void sendFlush(); QPID_COMMON_EXTERN void markReadyToSend();//TODO: only needed for inter-broker bridge; cleanup QPID_COMMON_EXTERN void handleException(const qpid::SessionException& e); /** True if the handler is ready to send and receive */ QPID_COMMON_EXTERN bool ready() const; // Protocol methods QPID_COMMON_EXTERN void attach(const std::string& name, bool force); QPID_COMMON_EXTERN void attached(const std::string& name); QPID_COMMON_EXTERN void detach(const std::string& name); QPID_COMMON_EXTERN void detached(const std::string& name, uint8_t code); QPID_COMMON_EXTERN void requestTimeout(uint32_t t); QPID_COMMON_EXTERN void timeout(uint32_t t); QPID_COMMON_EXTERN void commandPoint(const framing::SequenceNumber& id, uint64_t offset); QPID_COMMON_EXTERN void expected(const framing::SequenceSet& commands, const framing::Array& fragments); QPID_COMMON_EXTERN void confirmed(const framing::SequenceSet& commands,const framing::Array& fragments); QPID_COMMON_EXTERN void completed(const framing::SequenceSet& commands, bool timelyReply); QPID_COMMON_EXTERN void knownCompleted(const framing::SequenceSet& commands); QPID_COMMON_EXTERN void flush(bool expected, bool confirmed, bool completed); QPID_COMMON_EXTERN void gap(const framing::SequenceSet& commands); protected: QPID_COMMON_EXTERN virtual void invoke(const framing::AMQMethodBody& m); virtual void setState(const std::string& sessionName, bool force) = 0; virtual void connectionException(framing::connection::CloseCode code, const std::string& msg) = 0; virtual void channelException(framing::session::DetachCode, const std::string& msg) = 0; virtual void executionException(framing::execution::ErrorCode, const std::string& msg) = 0; virtual void detaching() = 0; // Notification of events virtual void readyToSend() {} virtual void readyToReceive() {} QPID_COMMON_EXTERN virtual void handleDetach(); QPID_COMMON_EXTERN virtual void handleIn(framing::AMQFrame&); QPID_COMMON_EXTERN virtual void handleOut(framing::AMQFrame&); framing::ChannelHandler channel; private: void checkAttached(); void sendCommandPoint(const SessionPoint&); framing::AMQP_AllProxy::Session peer; std::string name; bool awaitingDetached; bool sendReady, receiveReady; }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_SESSIONHANDLER_H*/ qpidc-0.16/src/qpid/amqp_0_10/ApplyCommand.h0000664000076400007640000002167611752725700021114 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_APPLYCOMMAND_H #define QPID_AMQP_0_10_APPLYCOMMAND_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/CommandVisitor.h" #include "qpid/amqp_0_10/apply.h" namespace qpid { namespace amqp_0_10 { template struct ApplyVisitor: public ApplyVisitorBase { virtual void visit(execution::Sync& x) { this->invoke(x); } virtual void visit(execution::Result& x) { this->invoke(x); } virtual void visit(execution::Exception& x) { this->invoke(x); } virtual void visit(message::Transfer& x) { this->invoke(x); } virtual void visit(message::Accept& x) { this->invoke(x); } virtual void visit(message::Reject& x) { this->invoke(x); } virtual void visit(message::Release& x) { this->invoke(x); } virtual void visit(message::Acquire& x) { this->invoke(x); } virtual void visit(message::Resume& x) { this->invoke(x); } virtual void visit(message::Subscribe& x) { this->invoke(x); } virtual void visit(message::Cancel& x) { this->invoke(x); } virtual void visit(message::SetFlowMode& x) { this->invoke(x); } virtual void visit(message::Flow& x) { this->invoke(x); } virtual void visit(message::Flush& x) { this->invoke(x); } virtual void visit(message::Stop& x) { this->invoke(x); } virtual void visit(tx::Select& x) { this->invoke(x); } virtual void visit(tx::Commit& x) { this->invoke(x); } virtual void visit(tx::Rollback& x) { this->invoke(x); } virtual void visit(dtx::Select& x) { this->invoke(x); } virtual void visit(dtx::Start& x) { this->invoke(x); } virtual void visit(dtx::End& x) { this->invoke(x); } virtual void visit(dtx::Commit& x) { this->invoke(x); } virtual void visit(dtx::Forget& x) { this->invoke(x); } virtual void visit(dtx::GetTimeout& x) { this->invoke(x); } virtual void visit(dtx::Prepare& x) { this->invoke(x); } virtual void visit(dtx::Recover& x) { this->invoke(x); } virtual void visit(dtx::Rollback& x) { this->invoke(x); } virtual void visit(dtx::SetTimeout& x) { this->invoke(x); } virtual void visit(exchange::Declare& x) { this->invoke(x); } virtual void visit(exchange::Delete& x) { this->invoke(x); } virtual void visit(exchange::Query& x) { this->invoke(x); } virtual void visit(exchange::Bind& x) { this->invoke(x); } virtual void visit(exchange::Unbind& x) { this->invoke(x); } virtual void visit(exchange::Bound& x) { this->invoke(x); } virtual void visit(queue::Declare& x) { this->invoke(x); } virtual void visit(queue::Delete& x) { this->invoke(x); } virtual void visit(queue::Purge& x) { this->invoke(x); } virtual void visit(queue::Query& x) { this->invoke(x); } virtual void visit(file::Qos& x) { this->invoke(x); } virtual void visit(file::QosOk& x) { this->invoke(x); } virtual void visit(file::Consume& x) { this->invoke(x); } virtual void visit(file::ConsumeOk& x) { this->invoke(x); } virtual void visit(file::Cancel& x) { this->invoke(x); } virtual void visit(file::Open& x) { this->invoke(x); } virtual void visit(file::OpenOk& x) { this->invoke(x); } virtual void visit(file::Stage& x) { this->invoke(x); } virtual void visit(file::Publish& x) { this->invoke(x); } virtual void visit(file::Return& x) { this->invoke(x); } virtual void visit(file::Deliver& x) { this->invoke(x); } virtual void visit(file::Ack& x) { this->invoke(x); } virtual void visit(file::Reject& x) { this->invoke(x); } virtual void visit(stream::Qos& x) { this->invoke(x); } virtual void visit(stream::QosOk& x) { this->invoke(x); } virtual void visit(stream::Consume& x) { this->invoke(x); } virtual void visit(stream::ConsumeOk& x) { this->invoke(x); } virtual void visit(stream::Cancel& x) { this->invoke(x); } virtual void visit(stream::Publish& x) { this->invoke(x); } virtual void visit(stream::Return& x) { this->invoke(x); } virtual void visit(stream::Deliver& x) { this->invoke(x); } }; template struct ApplyVisitor: public ApplyVisitorBase { virtual void visit(const execution::Sync& x) { this->invoke(x); } virtual void visit(const execution::Result& x) { this->invoke(x); } virtual void visit(const execution::Exception& x) { this->invoke(x); } virtual void visit(const message::Transfer& x) { this->invoke(x); } virtual void visit(const message::Accept& x) { this->invoke(x); } virtual void visit(const message::Reject& x) { this->invoke(x); } virtual void visit(const message::Release& x) { this->invoke(x); } virtual void visit(const message::Acquire& x) { this->invoke(x); } virtual void visit(const message::Resume& x) { this->invoke(x); } virtual void visit(const message::Subscribe& x) { this->invoke(x); } virtual void visit(const message::Cancel& x) { this->invoke(x); } virtual void visit(const message::SetFlowMode& x) { this->invoke(x); } virtual void visit(const message::Flow& x) { this->invoke(x); } virtual void visit(const message::Flush& x) { this->invoke(x); } virtual void visit(const message::Stop& x) { this->invoke(x); } virtual void visit(const tx::Select& x) { this->invoke(x); } virtual void visit(const tx::Commit& x) { this->invoke(x); } virtual void visit(const tx::Rollback& x) { this->invoke(x); } virtual void visit(const dtx::Select& x) { this->invoke(x); } virtual void visit(const dtx::Start& x) { this->invoke(x); } virtual void visit(const dtx::End& x) { this->invoke(x); } virtual void visit(const dtx::Commit& x) { this->invoke(x); } virtual void visit(const dtx::Forget& x) { this->invoke(x); } virtual void visit(const dtx::GetTimeout& x) { this->invoke(x); } virtual void visit(const dtx::Prepare& x) { this->invoke(x); } virtual void visit(const dtx::Recover& x) { this->invoke(x); } virtual void visit(const dtx::Rollback& x) { this->invoke(x); } virtual void visit(const dtx::SetTimeout& x) { this->invoke(x); } virtual void visit(const exchange::Declare& x) { this->invoke(x); } virtual void visit(const exchange::Delete& x) { this->invoke(x); } virtual void visit(const exchange::Query& x) { this->invoke(x); } virtual void visit(const exchange::Bind& x) { this->invoke(x); } virtual void visit(const exchange::Unbind& x) { this->invoke(x); } virtual void visit(const exchange::Bound& x) { this->invoke(x); } virtual void visit(const queue::Declare& x) { this->invoke(x); } virtual void visit(const queue::Delete& x) { this->invoke(x); } virtual void visit(const queue::Purge& x) { this->invoke(x); } virtual void visit(const queue::Query& x) { this->invoke(x); } virtual void visit(const file::Qos& x) { this->invoke(x); } virtual void visit(const file::QosOk& x) { this->invoke(x); } virtual void visit(const file::Consume& x) { this->invoke(x); } virtual void visit(const file::ConsumeOk& x) { this->invoke(x); } virtual void visit(const file::Cancel& x) { this->invoke(x); } virtual void visit(const file::Open& x) { this->invoke(x); } virtual void visit(const file::OpenOk& x) { this->invoke(x); } virtual void visit(const file::Stage& x) { this->invoke(x); } virtual void visit(const file::Publish& x) { this->invoke(x); } virtual void visit(const file::Return& x) { this->invoke(x); } virtual void visit(const file::Deliver& x) { this->invoke(x); } virtual void visit(const file::Ack& x) { this->invoke(x); } virtual void visit(const file::Reject& x) { this->invoke(x); } virtual void visit(const stream::Qos& x) { this->invoke(x); } virtual void visit(const stream::QosOk& x) { this->invoke(x); } virtual void visit(const stream::Consume& x) { this->invoke(x); } virtual void visit(const stream::ConsumeOk& x) { this->invoke(x); } virtual void visit(const stream::Cancel& x) { this->invoke(x); } virtual void visit(const stream::Publish& x) { this->invoke(x); } virtual void visit(const stream::Return& x) { this->invoke(x); } virtual void visit(const stream::Deliver& x) { this->invoke(x); } }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_APPLYCOMMAND_H*/ qpidc-0.16/src/qpid/amqp_0_10/specification.cpp0000664000076400007640000031750511752725700021702 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/specification.h" #include "qpid/amqp_0_10/exceptions.h" #include #include "qpid/amqp_0_10/ApplyCommand.h" #include "qpid/amqp_0_10/ApplyControl.h" #include "qpid/amqp_0_10/ApplyStruct.h" namespace qpid { namespace amqp_0_10 { namespace connection { const char* NAME="connection"; const char* Start::NAME="connection.start"; const char* Start::CLASS_NAME=connection::NAME; Start::Start( const Map& serverProperties_, const Str16Array& mechanisms_, const Str16Array& locales_ ) : serverProperties(serverProperties_), mechanisms(mechanisms_), locales(locales_){ } void Start::accept(Visitor& v) { v.visit(*this); } void Start::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Start&x) { o << "connection.start["; o << " server-properties=" << x.serverProperties; o << " mechanisms=" << x.mechanisms; o << " locales=" << x.locales; o << "]"; return o; } void Start::Handler::connectionStart( const Map& /*serverProperties_*/, const Str16Array& /*mechanisms_*/, const Str16Array& /*locales_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.start not implemented.")); } const char* StartOk::NAME="connection.start-ok"; const char* StartOk::CLASS_NAME=connection::NAME; StartOk::StartOk( const Map& clientProperties_, const Str8& mechanism_, const Vbin32& response_, const Str8& locale_ ) : clientProperties(clientProperties_), mechanism(mechanism_), response(response_), locale(locale_){ } void StartOk::accept(Visitor& v) { v.visit(*this); } void StartOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const StartOk&x) { o << "connection.start-ok["; o << " client-properties=" << x.clientProperties; o << " mechanism=" << x.mechanism; o << " response=" << x.response; o << " locale=" << x.locale; o << "]"; return o; } void StartOk::Handler::connectionStartOk( const Map& /*clientProperties_*/, const Str8& /*mechanism_*/, const Vbin32& /*response_*/, const Str8& /*locale_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.start-ok not implemented.")); } const char* Secure::NAME="connection.secure"; const char* Secure::CLASS_NAME=connection::NAME; Secure::Secure(const Vbin32& challenge_) : challenge(challenge_){ } void Secure::accept(Visitor& v) { v.visit(*this); } void Secure::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Secure&x) { o << "connection.secure["; o << " challenge=" << x.challenge; o << "]"; return o; } void Secure::Handler::connectionSecure( const Vbin32& /*challenge_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.secure not implemented.")); } const char* SecureOk::NAME="connection.secure-ok"; const char* SecureOk::CLASS_NAME=connection::NAME; SecureOk::SecureOk(const Vbin32& response_) : response(response_){ } void SecureOk::accept(Visitor& v) { v.visit(*this); } void SecureOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const SecureOk&x) { o << "connection.secure-ok["; o << " response=" << x.response; o << "]"; return o; } void SecureOk::Handler::connectionSecureOk( const Vbin32& /*response_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.secure-ok not implemented.")); } const char* Tune::NAME="connection.tune"; const char* Tune::CLASS_NAME=connection::NAME; Tune::Tune( Uint16 channelMax_, Uint16 maxFrameSize_, Uint16 heartbeatMin_, Uint16 heartbeatMax_ ) : channelMax(channelMax_), maxFrameSize(maxFrameSize_), heartbeatMin(heartbeatMin_), heartbeatMax(heartbeatMax_){ } void Tune::accept(Visitor& v) { v.visit(*this); } void Tune::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Tune&x) { o << "connection.tune["; o << " channel-max=" << x.channelMax; o << " max-frame-size=" << x.maxFrameSize; o << " heartbeat-min=" << x.heartbeatMin; o << " heartbeat-max=" << x.heartbeatMax; o << "]"; return o; } void Tune::Handler::connectionTune( Uint16 /*channelMax_*/, Uint16 /*maxFrameSize_*/, Uint16 /*heartbeatMin_*/, Uint16 /*heartbeatMax_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.tune not implemented.")); } const char* TuneOk::NAME="connection.tune-ok"; const char* TuneOk::CLASS_NAME=connection::NAME; TuneOk::TuneOk( Uint16 channelMax_, Uint16 maxFrameSize_, Uint16 heartbeat_ ) : channelMax(channelMax_), maxFrameSize(maxFrameSize_), heartbeat(heartbeat_){ } void TuneOk::accept(Visitor& v) { v.visit(*this); } void TuneOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const TuneOk&x) { o << "connection.tune-ok["; o << " channel-max=" << x.channelMax; o << " max-frame-size=" << x.maxFrameSize; o << " heartbeat=" << x.heartbeat; o << "]"; return o; } void TuneOk::Handler::connectionTuneOk( Uint16 /*channelMax_*/, Uint16 /*maxFrameSize_*/, Uint16 /*heartbeat_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.tune-ok not implemented.")); } const char* Open::NAME="connection.open"; const char* Open::CLASS_NAME=connection::NAME; Open::Open( const Str8& virtualHost_, const Str16Array& capabilities_, Bit insist_ ) : virtualHost(virtualHost_), capabilities(capabilities_), insist(insist_){ } void Open::accept(Visitor& v) { v.visit(*this); } void Open::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Open&x) { o << "connection.open["; o << " virtual-host=" << x.virtualHost; o << " capabilities=" << x.capabilities; o << " insist=" << x.insist; o << "]"; return o; } void Open::Handler::connectionOpen( const Str8& /*virtualHost_*/, const Str16Array& /*capabilities_*/, Bit /*insist_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.open not implemented.")); } const char* OpenOk::NAME="connection.open-ok"; const char* OpenOk::CLASS_NAME=connection::NAME; OpenOk::OpenOk(const connection::AmqpHostArray& knownHosts_) : knownHosts(knownHosts_){ } void OpenOk::accept(Visitor& v) { v.visit(*this); } void OpenOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const OpenOk&x) { o << "connection.open-ok["; o << " known-hosts=" << x.knownHosts; o << "]"; return o; } void OpenOk::Handler::connectionOpenOk( const connection::AmqpHostArray& /*knownHosts_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.open-ok not implemented.")); } const char* Redirect::NAME="connection.redirect"; const char* Redirect::CLASS_NAME=connection::NAME; Redirect::Redirect( const connection::AmqpHostUrl& host_, const connection::AmqpHostArray& knownHosts_ ) : host(host_), knownHosts(knownHosts_){ } void Redirect::accept(Visitor& v) { v.visit(*this); } void Redirect::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Redirect&x) { o << "connection.redirect["; o << " host=" << x.host; o << " known-hosts=" << x.knownHosts; o << "]"; return o; } void Redirect::Handler::connectionRedirect( const connection::AmqpHostUrl& /*host_*/, const connection::AmqpHostArray& /*knownHosts_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.redirect not implemented.")); } const char* Heartbeat::NAME="connection.heartbeat"; const char* Heartbeat::CLASS_NAME=connection::NAME; Heartbeat::Heartbeat() { } void Heartbeat::accept(Visitor& v) { v.visit(*this); } void Heartbeat::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Heartbeat&) { o << "connection.heartbeat["; o << "]"; return o; } void Heartbeat::Handler::connectionHeartbeat( ) { assert(0); throw NotImplementedException(QPID_MSG("connection.heartbeat not implemented.")); } const char* Close::NAME="connection.close"; const char* Close::CLASS_NAME=connection::NAME; Close::Close( const connection::CloseCode& replyCode_, const Str8& replyText_ ) : replyCode(replyCode_), replyText(replyText_){ } void Close::accept(Visitor& v) { v.visit(*this); } void Close::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Close&x) { o << "connection.close["; o << " reply-code=" << x.replyCode; o << " reply-text=" << x.replyText; o << "]"; return o; } void Close::Handler::connectionClose( const connection::CloseCode& /*replyCode_*/, const Str8& /*replyText_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("connection.close not implemented.")); } const char* CloseOk::NAME="connection.close-ok"; const char* CloseOk::CLASS_NAME=connection::NAME; CloseOk::CloseOk() { } void CloseOk::accept(Visitor& v) { v.visit(*this); } void CloseOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const CloseOk&) { o << "connection.close-ok["; o << "]"; return o; } void CloseOk::Handler::connectionCloseOk( ) { assert(0); throw NotImplementedException(QPID_MSG("connection.close-ok not implemented.")); } } // namespace connection namespace session { const char* NAME="session"; const char* Attach::NAME="session.attach"; const char* Attach::CLASS_NAME=session::NAME; Attach::Attach( const session::Name& name_, Bit force_ ) : name(name_), force(force_){ } void Attach::accept(Visitor& v) { v.visit(*this); } void Attach::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Attach&x) { o << "session.attach["; o << " name=" << x.name; o << " force=" << x.force; o << "]"; return o; } void Attach::Handler::sessionAttach( const session::Name& /*name_*/, Bit /*force_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.attach not implemented.")); } const char* Attached::NAME="session.attached"; const char* Attached::CLASS_NAME=session::NAME; Attached::Attached(const session::Name& name_) : name(name_){ } void Attached::accept(Visitor& v) { v.visit(*this); } void Attached::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Attached&x) { o << "session.attached["; o << " name=" << x.name; o << "]"; return o; } void Attached::Handler::sessionAttached( const session::Name& /*name_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.attached not implemented.")); } const char* Detach::NAME="session.detach"; const char* Detach::CLASS_NAME=session::NAME; Detach::Detach(const session::Name& name_) : name(name_){ } void Detach::accept(Visitor& v) { v.visit(*this); } void Detach::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Detach&x) { o << "session.detach["; o << " name=" << x.name; o << "]"; return o; } void Detach::Handler::sessionDetach( const session::Name& /*name_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.detach not implemented.")); } const char* Detached::NAME="session.detached"; const char* Detached::CLASS_NAME=session::NAME; Detached::Detached( const session::Name& name_, const session::DetachCode& code_ ) : name(name_), code(code_){ } void Detached::accept(Visitor& v) { v.visit(*this); } void Detached::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Detached&x) { o << "session.detached["; o << " name=" << x.name; o << " code=" << x.code; o << "]"; return o; } void Detached::Handler::sessionDetached( const session::Name& /*name_*/, const session::DetachCode& /*code_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.detached not implemented.")); } const char* RequestTimeout::NAME="session.request-timeout"; const char* RequestTimeout::CLASS_NAME=session::NAME; RequestTimeout::RequestTimeout(Uint32 timeout_) : timeout(timeout_){ } void RequestTimeout::accept(Visitor& v) { v.visit(*this); } void RequestTimeout::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const RequestTimeout&x) { o << "session.request-timeout["; o << " timeout=" << x.timeout; o << "]"; return o; } void RequestTimeout::Handler::sessionRequestTimeout( Uint32 /*timeout_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.request-timeout not implemented.")); } const char* Timeout::NAME="session.timeout"; const char* Timeout::CLASS_NAME=session::NAME; Timeout::Timeout(Uint32 timeout_) : timeout(timeout_){ } void Timeout::accept(Visitor& v) { v.visit(*this); } void Timeout::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Timeout&x) { o << "session.timeout["; o << " timeout=" << x.timeout; o << "]"; return o; } void Timeout::Handler::sessionTimeout( Uint32 /*timeout_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.timeout not implemented.")); } const char* CommandPoint::NAME="session.command-point"; const char* CommandPoint::CLASS_NAME=session::NAME; CommandPoint::CommandPoint( const SequenceNo& commandId_, Uint64 commandOffset_ ) : commandId(commandId_), commandOffset(commandOffset_){ } void CommandPoint::accept(Visitor& v) { v.visit(*this); } void CommandPoint::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const CommandPoint&x) { o << "session.command-point["; o << " command-id=" << x.commandId; o << " command-offset=" << x.commandOffset; o << "]"; return o; } void CommandPoint::Handler::sessionCommandPoint( const SequenceNo& /*commandId_*/, Uint64 /*commandOffset_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.command-point not implemented.")); } const char* Expected::NAME="session.expected"; const char* Expected::CLASS_NAME=session::NAME; Expected::Expected( const session::Commands& commands_, const session::CommandFragments& fragments_ ) : commands(commands_), fragments(fragments_){ } void Expected::accept(Visitor& v) { v.visit(*this); } void Expected::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Expected&x) { o << "session.expected["; o << " commands=" << x.commands; o << " fragments=" << x.fragments; o << "]"; return o; } void Expected::Handler::sessionExpected( const session::Commands& /*commands_*/, const session::CommandFragments& /*fragments_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.expected not implemented.")); } const char* Confirmed::NAME="session.confirmed"; const char* Confirmed::CLASS_NAME=session::NAME; Confirmed::Confirmed( const session::Commands& commands_, const session::CommandFragments& fragments_ ) : commands(commands_), fragments(fragments_){ } void Confirmed::accept(Visitor& v) { v.visit(*this); } void Confirmed::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Confirmed&x) { o << "session.confirmed["; o << " commands=" << x.commands; o << " fragments=" << x.fragments; o << "]"; return o; } void Confirmed::Handler::sessionConfirmed( const session::Commands& /*commands_*/, const session::CommandFragments& /*fragments_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.confirmed not implemented.")); } const char* Completed::NAME="session.completed"; const char* Completed::CLASS_NAME=session::NAME; Completed::Completed( const session::Commands& commands_, Bit timelyReply_ ) : commands(commands_), timelyReply(timelyReply_){ } void Completed::accept(Visitor& v) { v.visit(*this); } void Completed::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Completed&x) { o << "session.completed["; o << " commands=" << x.commands; o << " timely-reply=" << x.timelyReply; o << "]"; return o; } void Completed::Handler::sessionCompleted( const session::Commands& /*commands_*/, Bit /*timelyReply_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.completed not implemented.")); } const char* KnownCompleted::NAME="session.known-completed"; const char* KnownCompleted::CLASS_NAME=session::NAME; KnownCompleted::KnownCompleted(const session::Commands& commands_) : commands(commands_){ } void KnownCompleted::accept(Visitor& v) { v.visit(*this); } void KnownCompleted::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const KnownCompleted&x) { o << "session.known-completed["; o << " commands=" << x.commands; o << "]"; return o; } void KnownCompleted::Handler::sessionKnownCompleted( const session::Commands& /*commands_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.known-completed not implemented.")); } const char* Flush::NAME="session.flush"; const char* Flush::CLASS_NAME=session::NAME; Flush::Flush( Bit expected_, Bit confirmed_, Bit completed_ ) : expected(expected_), confirmed(confirmed_), completed(completed_){ } void Flush::accept(Visitor& v) { v.visit(*this); } void Flush::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Flush&x) { o << "session.flush["; o << " expected=" << x.expected; o << " confirmed=" << x.confirmed; o << " completed=" << x.completed; o << "]"; return o; } void Flush::Handler::sessionFlush( Bit /*expected_*/, Bit /*confirmed_*/, Bit /*completed_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.flush not implemented.")); } const char* Gap::NAME="session.gap"; const char* Gap::CLASS_NAME=session::NAME; Gap::Gap(const session::Commands& commands_) : commands(commands_){ } void Gap::accept(Visitor& v) { v.visit(*this); } void Gap::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Gap&x) { o << "session.gap["; o << " commands=" << x.commands; o << "]"; return o; } void Gap::Handler::sessionGap( const session::Commands& /*commands_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("session.gap not implemented.")); } } // namespace session namespace execution { const char* NAME="execution"; const char* Sync::NAME="execution.sync"; const char* Sync::CLASS_NAME=execution::NAME; Sync::Sync() { } void Sync::accept(Visitor& v) { v.visit(*this); } void Sync::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Sync&) { o << "execution.sync["; o << "]"; return o; } void Sync::Handler::executionSync( ) { assert(0); throw NotImplementedException(QPID_MSG("execution.sync not implemented.")); } const char* Result::NAME="execution.result"; const char* Result::CLASS_NAME=execution::NAME; Result::Result( const SequenceNo& commandId_, const Struct32& value_ ) : commandId(commandId_), value(value_){ } void Result::accept(Visitor& v) { v.visit(*this); } void Result::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Result&x) { o << "execution.result["; o << " command-id=" << x.commandId; o << " value=" << x.value; o << "]"; return o; } void Result::Handler::executionResult( const SequenceNo& /*commandId_*/, const Struct32& /*value_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("execution.result not implemented.")); } const char* Exception::NAME="execution.exception"; const char* Exception::CLASS_NAME=execution::NAME; Exception::Exception( const execution::ErrorCode& errorCode_, const SequenceNo& commandId_, Uint8 classCode_, Uint8 commandCode_, Uint8 fieldIndex_, const Str16& description_, const Map& errorInfo_ ) : errorCode(errorCode_), commandId(commandId_), classCode(classCode_), commandCode(commandCode_), fieldIndex(fieldIndex_), description(description_), errorInfo(errorInfo_){ } void Exception::accept(Visitor& v) { v.visit(*this); } void Exception::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Exception&x) { o << "execution.exception["; o << " error-code=" << x.errorCode; o << " command-id=" << x.commandId; o << " class-code=" << x.classCode; o << " command-code=" << x.commandCode; o << " field-index=" << x.fieldIndex; o << " description=" << x.description; o << " error-info=" << x.errorInfo; o << "]"; return o; } void Exception::Handler::executionException( const execution::ErrorCode& /*errorCode_*/, const SequenceNo& /*commandId_*/, Uint8 /*classCode_*/, Uint8 /*commandCode_*/, Uint8 /*fieldIndex_*/, const Str16& /*description_*/, const Map& /*errorInfo_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("execution.exception not implemented.")); } } // namespace execution namespace message { const char* NAME="message"; const char* Transfer::NAME="message.transfer"; const char* Transfer::CLASS_NAME=message::NAME; Transfer::Transfer( const message::Destination& destination_, const message::AcceptMode& acceptMode_, const message::AcquireMode& acquireMode_ ) : destination(destination_), acceptMode(acceptMode_), acquireMode(acquireMode_){ } void Transfer::accept(Visitor& v) { v.visit(*this); } void Transfer::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Transfer&x) { o << "message.transfer["; o << " destination=" << x.destination; o << " accept-mode=" << x.acceptMode; o << " acquire-mode=" << x.acquireMode; o << "]"; return o; } void Transfer::Handler::messageTransfer( const message::Destination& /*destination_*/, const message::AcceptMode& /*acceptMode_*/, const message::AcquireMode& /*acquireMode_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.transfer not implemented.")); } const char* Accept::NAME="message.accept"; const char* Accept::CLASS_NAME=message::NAME; Accept::Accept(const session::Commands& transfers_) : transfers(transfers_){ } void Accept::accept(Visitor& v) { v.visit(*this); } void Accept::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Accept&x) { o << "message.accept["; o << " transfers=" << x.transfers; o << "]"; return o; } void Accept::Handler::messageAccept( const session::Commands& /*transfers_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.accept not implemented.")); } const char* Reject::NAME="message.reject"; const char* Reject::CLASS_NAME=message::NAME; Reject::Reject( const session::Commands& transfers_, const message::RejectCode& code_, const Str8& text_ ) : transfers(transfers_), code(code_), text(text_){ } void Reject::accept(Visitor& v) { v.visit(*this); } void Reject::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Reject&x) { o << "message.reject["; o << " transfers=" << x.transfers; o << " code=" << x.code; o << " text=" << x.text; o << "]"; return o; } void Reject::Handler::messageReject( const session::Commands& /*transfers_*/, const message::RejectCode& /*code_*/, const Str8& /*text_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.reject not implemented.")); } const char* Release::NAME="message.release"; const char* Release::CLASS_NAME=message::NAME; Release::Release( const session::Commands& transfers_, Bit setRedelivered_ ) : transfers(transfers_), setRedelivered(setRedelivered_){ } void Release::accept(Visitor& v) { v.visit(*this); } void Release::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Release&x) { o << "message.release["; o << " transfers=" << x.transfers; o << " set-redelivered=" << x.setRedelivered; o << "]"; return o; } void Release::Handler::messageRelease( const session::Commands& /*transfers_*/, Bit /*setRedelivered_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.release not implemented.")); } const char* Acquire::NAME="message.acquire"; const char* Acquire::CLASS_NAME=message::NAME; Acquire::Acquire(const session::Commands& transfers_) : transfers(transfers_){ } void Acquire::accept(Visitor& v) { v.visit(*this); } void Acquire::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Acquire&x) { o << "message.acquire["; o << " transfers=" << x.transfers; o << "]"; return o; } void Acquire::Handler::messageAcquire( const session::Commands& /*transfers_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.acquire not implemented.")); } const char* Resume::NAME="message.resume"; const char* Resume::CLASS_NAME=message::NAME; Resume::Resume( const message::Destination& destination_, const message::ResumeId& resumeId_ ) : destination(destination_), resumeId(resumeId_){ } void Resume::accept(Visitor& v) { v.visit(*this); } void Resume::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Resume&x) { o << "message.resume["; o << " destination=" << x.destination; o << " resume-id=" << x.resumeId; o << "]"; return o; } void Resume::Handler::messageResume( const message::Destination& /*destination_*/, const message::ResumeId& /*resumeId_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.resume not implemented.")); } const char* Subscribe::NAME="message.subscribe"; const char* Subscribe::CLASS_NAME=message::NAME; Subscribe::Subscribe( const queue::Name& queue_, const message::Destination& destination_, const message::AcceptMode& acceptMode_, const message::AcquireMode& acquireMode_, Bit exclusive_, const message::ResumeId& resumeId_, Uint64 resumeTtl_, const Map& arguments_ ) : queue(queue_), destination(destination_), acceptMode(acceptMode_), acquireMode(acquireMode_), exclusive(exclusive_), resumeId(resumeId_), resumeTtl(resumeTtl_), arguments(arguments_){ } void Subscribe::accept(Visitor& v) { v.visit(*this); } void Subscribe::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Subscribe&x) { o << "message.subscribe["; o << " queue=" << x.queue; o << " destination=" << x.destination; o << " accept-mode=" << x.acceptMode; o << " acquire-mode=" << x.acquireMode; o << " exclusive=" << x.exclusive; o << " resume-id=" << x.resumeId; o << " resume-ttl=" << x.resumeTtl; o << " arguments=" << x.arguments; o << "]"; return o; } void Subscribe::Handler::messageSubscribe( const queue::Name& /*queue_*/, const message::Destination& /*destination_*/, const message::AcceptMode& /*acceptMode_*/, const message::AcquireMode& /*acquireMode_*/, Bit /*exclusive_*/, const message::ResumeId& /*resumeId_*/, Uint64 /*resumeTtl_*/, const Map& /*arguments_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.subscribe not implemented.")); } const char* Cancel::NAME="message.cancel"; const char* Cancel::CLASS_NAME=message::NAME; Cancel::Cancel(const message::Destination& destination_) : destination(destination_){ } void Cancel::accept(Visitor& v) { v.visit(*this); } void Cancel::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Cancel&x) { o << "message.cancel["; o << " destination=" << x.destination; o << "]"; return o; } void Cancel::Handler::messageCancel( const message::Destination& /*destination_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.cancel not implemented.")); } const char* SetFlowMode::NAME="message.set-flow-mode"; const char* SetFlowMode::CLASS_NAME=message::NAME; SetFlowMode::SetFlowMode( const message::Destination& destination_, const message::FlowMode& flowMode_ ) : destination(destination_), flowMode(flowMode_){ } void SetFlowMode::accept(Visitor& v) { v.visit(*this); } void SetFlowMode::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const SetFlowMode&x) { o << "message.set-flow-mode["; o << " destination=" << x.destination; o << " flow-mode=" << x.flowMode; o << "]"; return o; } void SetFlowMode::Handler::messageSetFlowMode( const message::Destination& /*destination_*/, const message::FlowMode& /*flowMode_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.set-flow-mode not implemented.")); } const char* Flow::NAME="message.flow"; const char* Flow::CLASS_NAME=message::NAME; Flow::Flow( const message::Destination& destination_, const message::CreditUnit& unit_, Uint32 value_ ) : destination(destination_), unit(unit_), value(value_){ } void Flow::accept(Visitor& v) { v.visit(*this); } void Flow::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Flow&x) { o << "message.flow["; o << " destination=" << x.destination; o << " unit=" << x.unit; o << " value=" << x.value; o << "]"; return o; } void Flow::Handler::messageFlow( const message::Destination& /*destination_*/, const message::CreditUnit& /*unit_*/, Uint32 /*value_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.flow not implemented.")); } const char* Flush::NAME="message.flush"; const char* Flush::CLASS_NAME=message::NAME; Flush::Flush(const message::Destination& destination_) : destination(destination_){ } void Flush::accept(Visitor& v) { v.visit(*this); } void Flush::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Flush&x) { o << "message.flush["; o << " destination=" << x.destination; o << "]"; return o; } void Flush::Handler::messageFlush( const message::Destination& /*destination_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.flush not implemented.")); } const char* Stop::NAME="message.stop"; const char* Stop::CLASS_NAME=message::NAME; Stop::Stop(const message::Destination& destination_) : destination(destination_){ } void Stop::accept(Visitor& v) { v.visit(*this); } void Stop::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Stop&x) { o << "message.stop["; o << " destination=" << x.destination; o << "]"; return o; } void Stop::Handler::messageStop( const message::Destination& /*destination_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("message.stop not implemented.")); } } // namespace message namespace tx { const char* NAME="tx"; const char* Select::NAME="tx.select"; const char* Select::CLASS_NAME=tx::NAME; Select::Select() { } void Select::accept(Visitor& v) { v.visit(*this); } void Select::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Select&) { o << "tx.select["; o << "]"; return o; } void Select::Handler::txSelect( ) { assert(0); throw NotImplementedException(QPID_MSG("tx.select not implemented.")); } const char* Commit::NAME="tx.commit"; const char* Commit::CLASS_NAME=tx::NAME; Commit::Commit() { } void Commit::accept(Visitor& v) { v.visit(*this); } void Commit::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Commit&) { o << "tx.commit["; o << "]"; return o; } void Commit::Handler::txCommit( ) { assert(0); throw NotImplementedException(QPID_MSG("tx.commit not implemented.")); } const char* Rollback::NAME="tx.rollback"; const char* Rollback::CLASS_NAME=tx::NAME; Rollback::Rollback() { } void Rollback::accept(Visitor& v) { v.visit(*this); } void Rollback::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Rollback&) { o << "tx.rollback["; o << "]"; return o; } void Rollback::Handler::txRollback( ) { assert(0); throw NotImplementedException(QPID_MSG("tx.rollback not implemented.")); } } // namespace tx namespace dtx { const char* NAME="dtx"; const char* Select::NAME="dtx.select"; const char* Select::CLASS_NAME=dtx::NAME; Select::Select() { } void Select::accept(Visitor& v) { v.visit(*this); } void Select::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Select&) { o << "dtx.select["; o << "]"; return o; } void Select::Handler::dtxSelect( ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.select not implemented.")); } const char* Start::NAME="dtx.start"; const char* Start::CLASS_NAME=dtx::NAME; Start::Start( const dtx::Xid& xid_, Bit join_, Bit resume_ ) : xid(xid_), join(join_), resume(resume_){ } void Start::accept(Visitor& v) { v.visit(*this); } void Start::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Start&x) { o << "dtx.start["; o << " xid=" << x.xid; o << " join=" << x.join; o << " resume=" << x.resume; o << "]"; return o; } void Start::Handler::dtxStart( const dtx::Xid& /*xid_*/, Bit /*join_*/, Bit /*resume_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.start not implemented.")); } const char* End::NAME="dtx.end"; const char* End::CLASS_NAME=dtx::NAME; End::End( const dtx::Xid& xid_, Bit fail_, Bit suspend_ ) : xid(xid_), fail(fail_), suspend(suspend_){ } void End::accept(Visitor& v) { v.visit(*this); } void End::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const End&x) { o << "dtx.end["; o << " xid=" << x.xid; o << " fail=" << x.fail; o << " suspend=" << x.suspend; o << "]"; return o; } void End::Handler::dtxEnd( const dtx::Xid& /*xid_*/, Bit /*fail_*/, Bit /*suspend_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.end not implemented.")); } const char* Commit::NAME="dtx.commit"; const char* Commit::CLASS_NAME=dtx::NAME; Commit::Commit( const dtx::Xid& xid_, Bit onePhase_ ) : xid(xid_), onePhase(onePhase_){ } void Commit::accept(Visitor& v) { v.visit(*this); } void Commit::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Commit&x) { o << "dtx.commit["; o << " xid=" << x.xid; o << " one-phase=" << x.onePhase; o << "]"; return o; } void Commit::Handler::dtxCommit( const dtx::Xid& /*xid_*/, Bit /*onePhase_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.commit not implemented.")); } const char* Forget::NAME="dtx.forget"; const char* Forget::CLASS_NAME=dtx::NAME; Forget::Forget(const dtx::Xid& xid_) : xid(xid_){ } void Forget::accept(Visitor& v) { v.visit(*this); } void Forget::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Forget&x) { o << "dtx.forget["; o << " xid=" << x.xid; o << "]"; return o; } void Forget::Handler::dtxForget( const dtx::Xid& /*xid_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.forget not implemented.")); } const char* GetTimeout::NAME="dtx.get-timeout"; const char* GetTimeout::CLASS_NAME=dtx::NAME; GetTimeout::GetTimeout(const dtx::Xid& xid_) : xid(xid_){ } void GetTimeout::accept(Visitor& v) { v.visit(*this); } void GetTimeout::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const GetTimeout&x) { o << "dtx.get-timeout["; o << " xid=" << x.xid; o << "]"; return o; } void GetTimeout::Handler::dtxGetTimeout( const dtx::Xid& /*xid_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.get-timeout not implemented.")); } const char* Prepare::NAME="dtx.prepare"; const char* Prepare::CLASS_NAME=dtx::NAME; Prepare::Prepare(const dtx::Xid& xid_) : xid(xid_){ } void Prepare::accept(Visitor& v) { v.visit(*this); } void Prepare::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Prepare&x) { o << "dtx.prepare["; o << " xid=" << x.xid; o << "]"; return o; } void Prepare::Handler::dtxPrepare( const dtx::Xid& /*xid_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.prepare not implemented.")); } const char* Recover::NAME="dtx.recover"; const char* Recover::CLASS_NAME=dtx::NAME; Recover::Recover() { } void Recover::accept(Visitor& v) { v.visit(*this); } void Recover::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Recover&) { o << "dtx.recover["; o << "]"; return o; } void Recover::Handler::dtxRecover( ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.recover not implemented.")); } const char* Rollback::NAME="dtx.rollback"; const char* Rollback::CLASS_NAME=dtx::NAME; Rollback::Rollback(const dtx::Xid& xid_) : xid(xid_){ } void Rollback::accept(Visitor& v) { v.visit(*this); } void Rollback::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Rollback&x) { o << "dtx.rollback["; o << " xid=" << x.xid; o << "]"; return o; } void Rollback::Handler::dtxRollback( const dtx::Xid& /*xid_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.rollback not implemented.")); } const char* SetTimeout::NAME="dtx.set-timeout"; const char* SetTimeout::CLASS_NAME=dtx::NAME; SetTimeout::SetTimeout( const dtx::Xid& xid_, Uint32 timeout_ ) : xid(xid_), timeout(timeout_){ } void SetTimeout::accept(Visitor& v) { v.visit(*this); } void SetTimeout::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const SetTimeout&x) { o << "dtx.set-timeout["; o << " xid=" << x.xid; o << " timeout=" << x.timeout; o << "]"; return o; } void SetTimeout::Handler::dtxSetTimeout( const dtx::Xid& /*xid_*/, Uint32 /*timeout_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("dtx.set-timeout not implemented.")); } } // namespace dtx namespace exchange { const char* NAME="exchange"; const char* Declare::NAME="exchange.declare"; const char* Declare::CLASS_NAME=exchange::NAME; Declare::Declare( const exchange::Name& exchange_, const Str8& type_, const exchange::Name& alternateExchange_, Bit passive_, Bit durable_, Bit autoDelete_, const Map& arguments_ ) : exchange(exchange_), type(type_), alternateExchange(alternateExchange_), passive(passive_), durable(durable_), autoDelete(autoDelete_), arguments(arguments_){ } void Declare::accept(Visitor& v) { v.visit(*this); } void Declare::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Declare&x) { o << "exchange.declare["; o << " exchange=" << x.exchange; o << " type=" << x.type; o << " alternate-exchange=" << x.alternateExchange; o << " passive=" << x.passive; o << " durable=" << x.durable; o << " auto-delete=" << x.autoDelete; o << " arguments=" << x.arguments; o << "]"; return o; } void Declare::Handler::exchangeDeclare( const exchange::Name& /*exchange_*/, const Str8& /*type_*/, const exchange::Name& /*alternateExchange_*/, Bit /*passive_*/, Bit /*durable_*/, Bit /*autoDelete_*/, const Map& /*arguments_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("exchange.declare not implemented.")); } const char* Delete::NAME="exchange.delete"; const char* Delete::CLASS_NAME=exchange::NAME; Delete::Delete( const exchange::Name& exchange_, Bit ifUnused_ ) : exchange(exchange_), ifUnused(ifUnused_){ } void Delete::accept(Visitor& v) { v.visit(*this); } void Delete::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Delete&x) { o << "exchange.delete["; o << " exchange=" << x.exchange; o << " if-unused=" << x.ifUnused; o << "]"; return o; } void Delete::Handler::exchangeDelete( const exchange::Name& /*exchange_*/, Bit /*ifUnused_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("exchange.delete not implemented.")); } const char* Query::NAME="exchange.query"; const char* Query::CLASS_NAME=exchange::NAME; Query::Query(const Str8& name_) : name(name_){ } void Query::accept(Visitor& v) { v.visit(*this); } void Query::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Query&x) { o << "exchange.query["; o << " name=" << x.name; o << "]"; return o; } void Query::Handler::exchangeQuery( const Str8& /*name_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("exchange.query not implemented.")); } const char* Bind::NAME="exchange.bind"; const char* Bind::CLASS_NAME=exchange::NAME; Bind::Bind( const queue::Name& queue_, const exchange::Name& exchange_, const Str8& bindingKey_, const Map& arguments_ ) : queue(queue_), exchange(exchange_), bindingKey(bindingKey_), arguments(arguments_){ } void Bind::accept(Visitor& v) { v.visit(*this); } void Bind::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Bind&x) { o << "exchange.bind["; o << " queue=" << x.queue; o << " exchange=" << x.exchange; o << " binding-key=" << x.bindingKey; o << " arguments=" << x.arguments; o << "]"; return o; } void Bind::Handler::exchangeBind( const queue::Name& /*queue_*/, const exchange::Name& /*exchange_*/, const Str8& /*bindingKey_*/, const Map& /*arguments_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("exchange.bind not implemented.")); } const char* Unbind::NAME="exchange.unbind"; const char* Unbind::CLASS_NAME=exchange::NAME; Unbind::Unbind( const queue::Name& queue_, const exchange::Name& exchange_, const Str8& bindingKey_ ) : queue(queue_), exchange(exchange_), bindingKey(bindingKey_){ } void Unbind::accept(Visitor& v) { v.visit(*this); } void Unbind::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Unbind&x) { o << "exchange.unbind["; o << " queue=" << x.queue; o << " exchange=" << x.exchange; o << " binding-key=" << x.bindingKey; o << "]"; return o; } void Unbind::Handler::exchangeUnbind( const queue::Name& /*queue_*/, const exchange::Name& /*exchange_*/, const Str8& /*bindingKey_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("exchange.unbind not implemented.")); } const char* Bound::NAME="exchange.bound"; const char* Bound::CLASS_NAME=exchange::NAME; Bound::Bound( const Str8& exchange_, const Str8& queue_, const Str8& bindingKey_, const Map& arguments_ ) : exchange(exchange_), queue(queue_), bindingKey(bindingKey_), arguments(arguments_){ } void Bound::accept(Visitor& v) { v.visit(*this); } void Bound::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Bound&x) { o << "exchange.bound["; o << " exchange=" << x.exchange; o << " queue=" << x.queue; o << " binding-key=" << x.bindingKey; o << " arguments=" << x.arguments; o << "]"; return o; } void Bound::Handler::exchangeBound( const Str8& /*exchange_*/, const Str8& /*queue_*/, const Str8& /*bindingKey_*/, const Map& /*arguments_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("exchange.bound not implemented.")); } } // namespace exchange namespace queue { const char* NAME="queue"; const char* Declare::NAME="queue.declare"; const char* Declare::CLASS_NAME=queue::NAME; Declare::Declare( const queue::Name& queue_, const exchange::Name& alternateExchange_, Bit passive_, Bit durable_, Bit exclusive_, Bit autoDelete_, const Map& arguments_ ) : queue(queue_), alternateExchange(alternateExchange_), passive(passive_), durable(durable_), exclusive(exclusive_), autoDelete(autoDelete_), arguments(arguments_){ } void Declare::accept(Visitor& v) { v.visit(*this); } void Declare::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Declare&x) { o << "queue.declare["; o << " queue=" << x.queue; o << " alternate-exchange=" << x.alternateExchange; o << " passive=" << x.passive; o << " durable=" << x.durable; o << " exclusive=" << x.exclusive; o << " auto-delete=" << x.autoDelete; o << " arguments=" << x.arguments; o << "]"; return o; } void Declare::Handler::queueDeclare( const queue::Name& /*queue_*/, const exchange::Name& /*alternateExchange_*/, Bit /*passive_*/, Bit /*durable_*/, Bit /*exclusive_*/, Bit /*autoDelete_*/, const Map& /*arguments_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("queue.declare not implemented.")); } const char* Delete::NAME="queue.delete"; const char* Delete::CLASS_NAME=queue::NAME; Delete::Delete( const queue::Name& queue_, Bit ifUnused_, Bit ifEmpty_ ) : queue(queue_), ifUnused(ifUnused_), ifEmpty(ifEmpty_){ } void Delete::accept(Visitor& v) { v.visit(*this); } void Delete::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Delete&x) { o << "queue.delete["; o << " queue=" << x.queue; o << " if-unused=" << x.ifUnused; o << " if-empty=" << x.ifEmpty; o << "]"; return o; } void Delete::Handler::queueDelete( const queue::Name& /*queue_*/, Bit /*ifUnused_*/, Bit /*ifEmpty_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("queue.delete not implemented.")); } const char* Purge::NAME="queue.purge"; const char* Purge::CLASS_NAME=queue::NAME; Purge::Purge(const queue::Name& queue_) : queue(queue_){ } void Purge::accept(Visitor& v) { v.visit(*this); } void Purge::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Purge&x) { o << "queue.purge["; o << " queue=" << x.queue; o << "]"; return o; } void Purge::Handler::queuePurge( const queue::Name& /*queue_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("queue.purge not implemented.")); } const char* Query::NAME="queue.query"; const char* Query::CLASS_NAME=queue::NAME; Query::Query(const queue::Name& queue_) : queue(queue_){ } void Query::accept(Visitor& v) { v.visit(*this); } void Query::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Query&x) { o << "queue.query["; o << " queue=" << x.queue; o << "]"; return o; } void Query::Handler::queueQuery( const queue::Name& /*queue_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("queue.query not implemented.")); } } // namespace queue namespace file { const char* NAME="file"; const char* Qos::NAME="file.qos"; const char* Qos::CLASS_NAME=file::NAME; Qos::Qos( Uint32 prefetchSize_, Uint16 prefetchCount_, Bit global_ ) : prefetchSize(prefetchSize_), prefetchCount(prefetchCount_), global(global_){ } void Qos::accept(Visitor& v) { v.visit(*this); } void Qos::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Qos&x) { o << "file.qos["; o << " prefetch-size=" << x.prefetchSize; o << " prefetch-count=" << x.prefetchCount; o << " global=" << x.global; o << "]"; return o; } void Qos::Handler::fileQos( Uint32 /*prefetchSize_*/, Uint16 /*prefetchCount_*/, Bit /*global_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.qos not implemented.")); } const char* QosOk::NAME="file.qos-ok"; const char* QosOk::CLASS_NAME=file::NAME; QosOk::QosOk() { } void QosOk::accept(Visitor& v) { v.visit(*this); } void QosOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const QosOk&) { o << "file.qos-ok["; o << "]"; return o; } void QosOk::Handler::fileQosOk( ) { assert(0); throw NotImplementedException(QPID_MSG("file.qos-ok not implemented.")); } const char* Consume::NAME="file.consume"; const char* Consume::CLASS_NAME=file::NAME; Consume::Consume( const queue::Name& queue_, const Str8& consumerTag_, Bit noLocal_, Bit noAck_, Bit exclusive_, Bit nowait_, const Map& arguments_ ) : queue(queue_), consumerTag(consumerTag_), noLocal(noLocal_), noAck(noAck_), exclusive(exclusive_), nowait(nowait_), arguments(arguments_){ } void Consume::accept(Visitor& v) { v.visit(*this); } void Consume::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Consume&x) { o << "file.consume["; o << " queue=" << x.queue; o << " consumer-tag=" << x.consumerTag; o << " no-local=" << x.noLocal; o << " no-ack=" << x.noAck; o << " exclusive=" << x.exclusive; o << " nowait=" << x.nowait; o << " arguments=" << x.arguments; o << "]"; return o; } void Consume::Handler::fileConsume( const queue::Name& /*queue_*/, const Str8& /*consumerTag_*/, Bit /*noLocal_*/, Bit /*noAck_*/, Bit /*exclusive_*/, Bit /*nowait_*/, const Map& /*arguments_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.consume not implemented.")); } const char* ConsumeOk::NAME="file.consume-ok"; const char* ConsumeOk::CLASS_NAME=file::NAME; ConsumeOk::ConsumeOk(const Str8& consumerTag_) : consumerTag(consumerTag_){ } void ConsumeOk::accept(Visitor& v) { v.visit(*this); } void ConsumeOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ConsumeOk&x) { o << "file.consume-ok["; o << " consumer-tag=" << x.consumerTag; o << "]"; return o; } void ConsumeOk::Handler::fileConsumeOk( const Str8& /*consumerTag_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.consume-ok not implemented.")); } const char* Cancel::NAME="file.cancel"; const char* Cancel::CLASS_NAME=file::NAME; Cancel::Cancel(const Str8& consumerTag_) : consumerTag(consumerTag_){ } void Cancel::accept(Visitor& v) { v.visit(*this); } void Cancel::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Cancel&x) { o << "file.cancel["; o << " consumer-tag=" << x.consumerTag; o << "]"; return o; } void Cancel::Handler::fileCancel( const Str8& /*consumerTag_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.cancel not implemented.")); } const char* Open::NAME="file.open"; const char* Open::CLASS_NAME=file::NAME; Open::Open( const Str8& identifier_, Uint64 contentSize_ ) : identifier(identifier_), contentSize(contentSize_){ } void Open::accept(Visitor& v) { v.visit(*this); } void Open::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Open&x) { o << "file.open["; o << " identifier=" << x.identifier; o << " content-size=" << x.contentSize; o << "]"; return o; } void Open::Handler::fileOpen( const Str8& /*identifier_*/, Uint64 /*contentSize_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.open not implemented.")); } const char* OpenOk::NAME="file.open-ok"; const char* OpenOk::CLASS_NAME=file::NAME; OpenOk::OpenOk(Uint64 stagedSize_) : stagedSize(stagedSize_){ } void OpenOk::accept(Visitor& v) { v.visit(*this); } void OpenOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const OpenOk&x) { o << "file.open-ok["; o << " staged-size=" << x.stagedSize; o << "]"; return o; } void OpenOk::Handler::fileOpenOk( Uint64 /*stagedSize_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.open-ok not implemented.")); } const char* Stage::NAME="file.stage"; const char* Stage::CLASS_NAME=file::NAME; Stage::Stage() { } void Stage::accept(Visitor& v) { v.visit(*this); } void Stage::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Stage&) { o << "file.stage["; o << "]"; return o; } void Stage::Handler::fileStage( ) { assert(0); throw NotImplementedException(QPID_MSG("file.stage not implemented.")); } const char* Publish::NAME="file.publish"; const char* Publish::CLASS_NAME=file::NAME; Publish::Publish( const exchange::Name& exchange_, const Str8& routingKey_, Bit mandatory_, Bit immediate_, const Str8& identifier_ ) : exchange(exchange_), routingKey(routingKey_), mandatory(mandatory_), immediate(immediate_), identifier(identifier_){ } void Publish::accept(Visitor& v) { v.visit(*this); } void Publish::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Publish&x) { o << "file.publish["; o << " exchange=" << x.exchange; o << " routing-key=" << x.routingKey; o << " mandatory=" << x.mandatory; o << " immediate=" << x.immediate; o << " identifier=" << x.identifier; o << "]"; return o; } void Publish::Handler::filePublish( const exchange::Name& /*exchange_*/, const Str8& /*routingKey_*/, Bit /*mandatory_*/, Bit /*immediate_*/, const Str8& /*identifier_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.publish not implemented.")); } const char* Return::NAME="file.return"; const char* Return::CLASS_NAME=file::NAME; Return::Return( const file::ReturnCode& replyCode_, const Str8& replyText_, const exchange::Name& exchange_, const Str8& routingKey_ ) : replyCode(replyCode_), replyText(replyText_), exchange(exchange_), routingKey(routingKey_){ } void Return::accept(Visitor& v) { v.visit(*this); } void Return::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Return&x) { o << "file.return["; o << " reply-code=" << x.replyCode; o << " reply-text=" << x.replyText; o << " exchange=" << x.exchange; o << " routing-key=" << x.routingKey; o << "]"; return o; } void Return::Handler::fileReturn( const file::ReturnCode& /*replyCode_*/, const Str8& /*replyText_*/, const exchange::Name& /*exchange_*/, const Str8& /*routingKey_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.return not implemented.")); } const char* Deliver::NAME="file.deliver"; const char* Deliver::CLASS_NAME=file::NAME; Deliver::Deliver( const Str8& consumerTag_, Uint64 deliveryTag_, Bit redelivered_, const exchange::Name& exchange_, const Str8& routingKey_, const Str8& identifier_ ) : consumerTag(consumerTag_), deliveryTag(deliveryTag_), redelivered(redelivered_), exchange(exchange_), routingKey(routingKey_), identifier(identifier_){ } void Deliver::accept(Visitor& v) { v.visit(*this); } void Deliver::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Deliver&x) { o << "file.deliver["; o << " consumer-tag=" << x.consumerTag; o << " delivery-tag=" << x.deliveryTag; o << " redelivered=" << x.redelivered; o << " exchange=" << x.exchange; o << " routing-key=" << x.routingKey; o << " identifier=" << x.identifier; o << "]"; return o; } void Deliver::Handler::fileDeliver( const Str8& /*consumerTag_*/, Uint64 /*deliveryTag_*/, Bit /*redelivered_*/, const exchange::Name& /*exchange_*/, const Str8& /*routingKey_*/, const Str8& /*identifier_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.deliver not implemented.")); } const char* Ack::NAME="file.ack"; const char* Ack::CLASS_NAME=file::NAME; Ack::Ack( Uint64 deliveryTag_, Bit multiple_ ) : deliveryTag(deliveryTag_), multiple(multiple_){ } void Ack::accept(Visitor& v) { v.visit(*this); } void Ack::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Ack&x) { o << "file.ack["; o << " delivery-tag=" << x.deliveryTag; o << " multiple=" << x.multiple; o << "]"; return o; } void Ack::Handler::fileAck( Uint64 /*deliveryTag_*/, Bit /*multiple_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.ack not implemented.")); } const char* Reject::NAME="file.reject"; const char* Reject::CLASS_NAME=file::NAME; Reject::Reject( Uint64 deliveryTag_, Bit requeue_ ) : deliveryTag(deliveryTag_), requeue(requeue_){ } void Reject::accept(Visitor& v) { v.visit(*this); } void Reject::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Reject&x) { o << "file.reject["; o << " delivery-tag=" << x.deliveryTag; o << " requeue=" << x.requeue; o << "]"; return o; } void Reject::Handler::fileReject( Uint64 /*deliveryTag_*/, Bit /*requeue_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("file.reject not implemented.")); } } // namespace file namespace stream { const char* NAME="stream"; const char* Qos::NAME="stream.qos"; const char* Qos::CLASS_NAME=stream::NAME; Qos::Qos( Uint32 prefetchSize_, Uint16 prefetchCount_, Uint32 consumeRate_, Bit global_ ) : prefetchSize(prefetchSize_), prefetchCount(prefetchCount_), consumeRate(consumeRate_), global(global_){ } void Qos::accept(Visitor& v) { v.visit(*this); } void Qos::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Qos&x) { o << "stream.qos["; o << " prefetch-size=" << x.prefetchSize; o << " prefetch-count=" << x.prefetchCount; o << " consume-rate=" << x.consumeRate; o << " global=" << x.global; o << "]"; return o; } void Qos::Handler::streamQos( Uint32 /*prefetchSize_*/, Uint16 /*prefetchCount_*/, Uint32 /*consumeRate_*/, Bit /*global_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("stream.qos not implemented.")); } const char* QosOk::NAME="stream.qos-ok"; const char* QosOk::CLASS_NAME=stream::NAME; QosOk::QosOk() { } void QosOk::accept(Visitor& v) { v.visit(*this); } void QosOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const QosOk&) { o << "stream.qos-ok["; o << "]"; return o; } void QosOk::Handler::streamQosOk( ) { assert(0); throw NotImplementedException(QPID_MSG("stream.qos-ok not implemented.")); } const char* Consume::NAME="stream.consume"; const char* Consume::CLASS_NAME=stream::NAME; Consume::Consume( const queue::Name& queue_, const Str8& consumerTag_, Bit noLocal_, Bit exclusive_, Bit nowait_, const Map& arguments_ ) : queue(queue_), consumerTag(consumerTag_), noLocal(noLocal_), exclusive(exclusive_), nowait(nowait_), arguments(arguments_){ } void Consume::accept(Visitor& v) { v.visit(*this); } void Consume::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Consume&x) { o << "stream.consume["; o << " queue=" << x.queue; o << " consumer-tag=" << x.consumerTag; o << " no-local=" << x.noLocal; o << " exclusive=" << x.exclusive; o << " nowait=" << x.nowait; o << " arguments=" << x.arguments; o << "]"; return o; } void Consume::Handler::streamConsume( const queue::Name& /*queue_*/, const Str8& /*consumerTag_*/, Bit /*noLocal_*/, Bit /*exclusive_*/, Bit /*nowait_*/, const Map& /*arguments_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("stream.consume not implemented.")); } const char* ConsumeOk::NAME="stream.consume-ok"; const char* ConsumeOk::CLASS_NAME=stream::NAME; ConsumeOk::ConsumeOk(const Str8& consumerTag_) : consumerTag(consumerTag_){ } void ConsumeOk::accept(Visitor& v) { v.visit(*this); } void ConsumeOk::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ConsumeOk&x) { o << "stream.consume-ok["; o << " consumer-tag=" << x.consumerTag; o << "]"; return o; } void ConsumeOk::Handler::streamConsumeOk( const Str8& /*consumerTag_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("stream.consume-ok not implemented.")); } const char* Cancel::NAME="stream.cancel"; const char* Cancel::CLASS_NAME=stream::NAME; Cancel::Cancel(const Str8& consumerTag_) : consumerTag(consumerTag_){ } void Cancel::accept(Visitor& v) { v.visit(*this); } void Cancel::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Cancel&x) { o << "stream.cancel["; o << " consumer-tag=" << x.consumerTag; o << "]"; return o; } void Cancel::Handler::streamCancel( const Str8& /*consumerTag_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("stream.cancel not implemented.")); } const char* Publish::NAME="stream.publish"; const char* Publish::CLASS_NAME=stream::NAME; Publish::Publish( const exchange::Name& exchange_, const Str8& routingKey_, Bit mandatory_, Bit immediate_ ) : exchange(exchange_), routingKey(routingKey_), mandatory(mandatory_), immediate(immediate_){ } void Publish::accept(Visitor& v) { v.visit(*this); } void Publish::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Publish&x) { o << "stream.publish["; o << " exchange=" << x.exchange; o << " routing-key=" << x.routingKey; o << " mandatory=" << x.mandatory; o << " immediate=" << x.immediate; o << "]"; return o; } void Publish::Handler::streamPublish( const exchange::Name& /*exchange_*/, const Str8& /*routingKey_*/, Bit /*mandatory_*/, Bit /*immediate_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("stream.publish not implemented.")); } const char* Return::NAME="stream.return"; const char* Return::CLASS_NAME=stream::NAME; Return::Return( const stream::ReturnCode& replyCode_, const Str8& replyText_, const exchange::Name& exchange_, const Str8& routingKey_ ) : replyCode(replyCode_), replyText(replyText_), exchange(exchange_), routingKey(routingKey_){ } void Return::accept(Visitor& v) { v.visit(*this); } void Return::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Return&x) { o << "stream.return["; o << " reply-code=" << x.replyCode; o << " reply-text=" << x.replyText; o << " exchange=" << x.exchange; o << " routing-key=" << x.routingKey; o << "]"; return o; } void Return::Handler::streamReturn( const stream::ReturnCode& /*replyCode_*/, const Str8& /*replyText_*/, const exchange::Name& /*exchange_*/, const Str8& /*routingKey_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("stream.return not implemented.")); } const char* Deliver::NAME="stream.deliver"; const char* Deliver::CLASS_NAME=stream::NAME; Deliver::Deliver( const Str8& consumerTag_, Uint64 deliveryTag_, const exchange::Name& exchange_, const queue::Name& queue_ ) : consumerTag(consumerTag_), deliveryTag(deliveryTag_), exchange(exchange_), queue(queue_){ } void Deliver::accept(Visitor& v) { v.visit(*this); } void Deliver::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Deliver&x) { o << "stream.deliver["; o << " consumer-tag=" << x.consumerTag; o << " delivery-tag=" << x.deliveryTag; o << " exchange=" << x.exchange; o << " queue=" << x.queue; o << "]"; return o; } void Deliver::Handler::streamDeliver( const Str8& /*consumerTag_*/, Uint64 /*deliveryTag_*/, const exchange::Name& /*exchange_*/, const queue::Name& /*queue_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("stream.deliver not implemented.")); } } // namespace stream namespace cluster { const char* NAME="cluster"; const char* UpdateRequest::NAME="cluster.update-request"; const char* UpdateRequest::CLASS_NAME=cluster::NAME; UpdateRequest::UpdateRequest(const Str16& url_) : url(url_){ } void UpdateRequest::accept(Visitor& v) { v.visit(*this); } void UpdateRequest::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const UpdateRequest&x) { o << "cluster.update-request["; o << " url=" << x.url; o << "]"; return o; } void UpdateRequest::Handler::clusterUpdateRequest( const Str16& /*url_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.update-request not implemented.")); } const char* UpdateOffer::NAME="cluster.update-offer"; const char* UpdateOffer::CLASS_NAME=cluster::NAME; UpdateOffer::UpdateOffer(Uint64 updatee_) : updatee(updatee_){ } void UpdateOffer::accept(Visitor& v) { v.visit(*this); } void UpdateOffer::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const UpdateOffer&x) { o << "cluster.update-offer["; o << " updatee=" << x.updatee; o << "]"; return o; } void UpdateOffer::Handler::clusterUpdateOffer( Uint64 /*updatee_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.update-offer not implemented.")); } const char* RetractOffer::NAME="cluster.retract-offer"; const char* RetractOffer::CLASS_NAME=cluster::NAME; RetractOffer::RetractOffer(Uint64 updatee_) : updatee(updatee_){ } void RetractOffer::accept(Visitor& v) { v.visit(*this); } void RetractOffer::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const RetractOffer&x) { o << "cluster.retract-offer["; o << " updatee=" << x.updatee; o << "]"; return o; } void RetractOffer::Handler::clusterRetractOffer( Uint64 /*updatee_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.retract-offer not implemented.")); } const char* InitialStatus::NAME="cluster.initial-status"; const char* InitialStatus::CLASS_NAME=cluster::NAME; InitialStatus::InitialStatus( Uint32 version_, Bit active_, const Uuid& clusterId_, const cluster::StoreState& storeState_, const Uuid& shutdownId_, const Str16& firstConfig_, const ArrayDomain & urls_ ) : version(version_), active(active_), clusterId(clusterId_), storeState(storeState_), shutdownId(shutdownId_), firstConfig(firstConfig_), urls(urls_){ } void InitialStatus::accept(Visitor& v) { v.visit(*this); } void InitialStatus::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const InitialStatus&x) { o << "cluster.initial-status["; o << " version=" << x.version; o << " active=" << x.active; o << " cluster-id=" << x.clusterId; o << " store-state=" << x.storeState; o << " shutdown-id=" << x.shutdownId; o << " first-config=" << x.firstConfig; o << " urls=" << x.urls; o << "]"; return o; } void InitialStatus::Handler::clusterInitialStatus( Uint32 /*version_*/, Bit /*active_*/, const Uuid& /*clusterId_*/, const cluster::StoreState& /*storeState_*/, const Uuid& /*shutdownId_*/, const Str16& /*firstConfig_*/, const ArrayDomain & /*urls_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.initial-status not implemented.")); } const char* Ready::NAME="cluster.ready"; const char* Ready::CLASS_NAME=cluster::NAME; Ready::Ready(const Str16& url_) : url(url_){ } void Ready::accept(Visitor& v) { v.visit(*this); } void Ready::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Ready&x) { o << "cluster.ready["; o << " url=" << x.url; o << "]"; return o; } void Ready::Handler::clusterReady( const Str16& /*url_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.ready not implemented.")); } const char* ConfigChange::NAME="cluster.config-change"; const char* ConfigChange::CLASS_NAME=cluster::NAME; ConfigChange::ConfigChange( const Vbin16& members_, const Vbin16& joined_, const Vbin16& left_ ) : members(members_), joined(joined_), left(left_){ } void ConfigChange::accept(Visitor& v) { v.visit(*this); } void ConfigChange::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ConfigChange&x) { o << "cluster.config-change["; o << " members=" << x.members; o << " joined=" << x.joined; o << " left=" << x.left; o << "]"; return o; } void ConfigChange::Handler::clusterConfigChange( const Vbin16& /*members_*/, const Vbin16& /*joined_*/, const Vbin16& /*left_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.config-change not implemented.")); } const char* ErrorCheck::NAME="cluster.error-check"; const char* ErrorCheck::CLASS_NAME=cluster::NAME; ErrorCheck::ErrorCheck( const cluster::ErrorType& type_, const SequenceNo& frameSeq_ ) : type(type_), frameSeq(frameSeq_){ } void ErrorCheck::accept(Visitor& v) { v.visit(*this); } void ErrorCheck::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ErrorCheck&x) { o << "cluster.error-check["; o << " type=" << x.type; o << " frame-seq=" << x.frameSeq; o << "]"; return o; } void ErrorCheck::Handler::clusterErrorCheck( const cluster::ErrorType& /*type_*/, const SequenceNo& /*frameSeq_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.error-check not implemented.")); } const char* TimerWakeup::NAME="cluster.timer-wakeup"; const char* TimerWakeup::CLASS_NAME=cluster::NAME; TimerWakeup::TimerWakeup(const Str16& name_) : name(name_){ } void TimerWakeup::accept(Visitor& v) { v.visit(*this); } void TimerWakeup::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const TimerWakeup&x) { o << "cluster.timer-wakeup["; o << " name=" << x.name; o << "]"; return o; } void TimerWakeup::Handler::clusterTimerWakeup( const Str16& /*name_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.timer-wakeup not implemented.")); } const char* TimerDrop::NAME="cluster.timer-drop"; const char* TimerDrop::CLASS_NAME=cluster::NAME; TimerDrop::TimerDrop(const Str16& name_) : name(name_){ } void TimerDrop::accept(Visitor& v) { v.visit(*this); } void TimerDrop::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const TimerDrop&x) { o << "cluster.timer-drop["; o << " name=" << x.name; o << "]"; return o; } void TimerDrop::Handler::clusterTimerDrop( const Str16& /*name_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.timer-drop not implemented.")); } const char* Shutdown::NAME="cluster.shutdown"; const char* Shutdown::CLASS_NAME=cluster::NAME; Shutdown::Shutdown(const Uuid& shutdownId_) : shutdownId(shutdownId_){ } void Shutdown::accept(Visitor& v) { v.visit(*this); } void Shutdown::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Shutdown&x) { o << "cluster.shutdown["; o << " shutdown-id=" << x.shutdownId; o << "]"; return o; } void Shutdown::Handler::clusterShutdown( const Uuid& /*shutdownId_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.shutdown not implemented.")); } const char* DeliverToQueue::NAME="cluster.deliver-to-queue"; const char* DeliverToQueue::CLASS_NAME=cluster::NAME; DeliverToQueue::DeliverToQueue( const Str16& queue_, const Vbin32& message_ ) : queue(queue_), message(message_){ } void DeliverToQueue::accept(Visitor& v) { v.visit(*this); } void DeliverToQueue::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DeliverToQueue&x) { o << "cluster.deliver-to-queue["; o << " queue=" << x.queue; o << " message=" << x.message; o << "]"; return o; } void DeliverToQueue::Handler::clusterDeliverToQueue( const Str16& /*queue_*/, const Vbin32& /*message_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.deliver-to-queue not implemented.")); } const char* Clock::NAME="cluster.clock"; const char* Clock::CLASS_NAME=cluster::NAME; Clock::Clock(Uint64 time_) : time(time_){ } void Clock::accept(Visitor& v) { v.visit(*this); } void Clock::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Clock&x) { o << "cluster.clock["; o << " time=" << x.time; o << "]"; return o; } void Clock::Handler::clusterClock( Uint64 /*time_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster.clock not implemented.")); } } // namespace cluster namespace cluster_connection { const char* NAME="cluster-connection"; const char* Announce::NAME="cluster-connection.announce"; const char* Announce::CLASS_NAME=cluster_connection::NAME; Announce::Announce( const Str16& managementId_, Uint32 ssf_, const Str16& authid_, Bit nodict_, const Str32& username_, const Str32& initialFrames_ ) : managementId(managementId_), ssf(ssf_), authid(authid_), nodict(nodict_), username(username_), initialFrames(initialFrames_){ } void Announce::accept(Visitor& v) { v.visit(*this); } void Announce::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Announce&x) { o << "cluster-connection.announce["; o << " management-id=" << x.managementId; o << " ssf=" << x.ssf; o << " authid=" << x.authid; o << " nodict=" << x.nodict; o << " username=" << x.username; o << " initial-frames=" << x.initialFrames; o << "]"; return o; } void Announce::Handler::clusterConnectionAnnounce( const Str16& /*managementId_*/, Uint32 /*ssf_*/, const Str16& /*authid_*/, Bit /*nodict_*/, const Str32& /*username_*/, const Str32& /*initialFrames_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.announce not implemented.")); } const char* DeliverClose::NAME="cluster-connection.deliver-close"; const char* DeliverClose::CLASS_NAME=cluster_connection::NAME; DeliverClose::DeliverClose() { } void DeliverClose::accept(Visitor& v) { v.visit(*this); } void DeliverClose::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DeliverClose&) { o << "cluster-connection.deliver-close["; o << "]"; return o; } void DeliverClose::Handler::clusterConnectionDeliverClose( ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.deliver-close not implemented.")); } const char* DeliverDoOutput::NAME="cluster-connection.deliver-do-output"; const char* DeliverDoOutput::CLASS_NAME=cluster_connection::NAME; DeliverDoOutput::DeliverDoOutput(Uint32 limit_) : limit(limit_){ } void DeliverDoOutput::accept(Visitor& v) { v.visit(*this); } void DeliverDoOutput::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DeliverDoOutput&x) { o << "cluster-connection.deliver-do-output["; o << " limit=" << x.limit; o << "]"; return o; } void DeliverDoOutput::Handler::clusterConnectionDeliverDoOutput( Uint32 /*limit_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.deliver-do-output not implemented.")); } const char* Abort::NAME="cluster-connection.abort"; const char* Abort::CLASS_NAME=cluster_connection::NAME; Abort::Abort() { } void Abort::accept(Visitor& v) { v.visit(*this); } void Abort::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Abort&) { o << "cluster-connection.abort["; o << "]"; return o; } void Abort::Handler::clusterConnectionAbort( ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.abort not implemented.")); } const char* ShadowSetUser::NAME="cluster-connection.shadow-set-user"; const char* ShadowSetUser::CLASS_NAME=cluster_connection::NAME; ShadowSetUser::ShadowSetUser(const Str16& userId_) : userId(userId_){ } void ShadowSetUser::accept(Visitor& v) { v.visit(*this); } void ShadowSetUser::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ShadowSetUser&x) { o << "cluster-connection.shadow-set-user["; o << " user-id=" << x.userId; o << "]"; return o; } void ShadowSetUser::Handler::clusterConnectionShadowSetUser( const Str16& /*userId_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.shadow-set-user not implemented.")); } const char* ShadowPrepare::NAME="cluster-connection.shadow-prepare"; const char* ShadowPrepare::CLASS_NAME=cluster_connection::NAME; ShadowPrepare::ShadowPrepare(const Str16& managementId_) : managementId(managementId_){ } void ShadowPrepare::accept(Visitor& v) { v.visit(*this); } void ShadowPrepare::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ShadowPrepare&x) { o << "cluster-connection.shadow-prepare["; o << " management-id=" << x.managementId; o << "]"; return o; } void ShadowPrepare::Handler::clusterConnectionShadowPrepare( const Str16& /*managementId_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.shadow-prepare not implemented.")); } const char* ConsumerState::NAME="cluster-connection.consumer-state"; const char* ConsumerState::CLASS_NAME=cluster_connection::NAME; ConsumerState::ConsumerState( const Str8& name_, Bit blocked_, Bit notifyEnabled_, const SequenceNo& position_, Uint32 usedMsgCredit_, Uint32 usedByteCredit_ ) : name(name_), blocked(blocked_), notifyEnabled(notifyEnabled_), position(position_), usedMsgCredit(usedMsgCredit_), usedByteCredit(usedByteCredit_){ } void ConsumerState::accept(Visitor& v) { v.visit(*this); } void ConsumerState::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ConsumerState&x) { o << "cluster-connection.consumer-state["; o << " name=" << x.name; o << " blocked=" << x.blocked; o << " notifyEnabled=" << x.notifyEnabled; o << " position=" << x.position; o << " used-msg-credit=" << x.usedMsgCredit; o << " used-byte-credit=" << x.usedByteCredit; o << "]"; return o; } void ConsumerState::Handler::clusterConnectionConsumerState( const Str8& /*name_*/, Bit /*blocked_*/, Bit /*notifyEnabled_*/, const SequenceNo& /*position_*/, Uint32 /*usedMsgCredit_*/, Uint32 /*usedByteCredit_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.consumer-state not implemented.")); } const char* DeliveryRecord::NAME="cluster-connection.delivery-record"; const char* DeliveryRecord::CLASS_NAME=cluster_connection::NAME; DeliveryRecord::DeliveryRecord( const Str8& queue_, const SequenceNo& position_, const Str8& tag_, const SequenceNo& id_, Bit acquired_, Bit accepted_, Bit cancelled_, Bit completed_, Bit ended_, Bit windowing_, Bit enqueued_, Uint32 credit_ ) : queue(queue_), position(position_), tag(tag_), id(id_), acquired(acquired_), accepted(accepted_), cancelled(cancelled_), completed(completed_), ended(ended_), windowing(windowing_), enqueued(enqueued_), credit(credit_){ } void DeliveryRecord::accept(Visitor& v) { v.visit(*this); } void DeliveryRecord::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DeliveryRecord&x) { o << "cluster-connection.delivery-record["; o << " queue=" << x.queue; o << " position=" << x.position; o << " tag=" << x.tag; o << " id=" << x.id; o << " acquired=" << x.acquired; o << " accepted=" << x.accepted; o << " cancelled=" << x.cancelled; o << " completed=" << x.completed; o << " ended=" << x.ended; o << " windowing=" << x.windowing; o << " enqueued=" << x.enqueued; o << " credit=" << x.credit; o << "]"; return o; } void DeliveryRecord::Handler::clusterConnectionDeliveryRecord( const Str8& /*queue_*/, const SequenceNo& /*position_*/, const Str8& /*tag_*/, const SequenceNo& /*id_*/, Bit /*acquired_*/, Bit /*accepted_*/, Bit /*cancelled_*/, Bit /*completed_*/, Bit /*ended_*/, Bit /*windowing_*/, Bit /*enqueued_*/, Uint32 /*credit_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.delivery-record not implemented.")); } const char* TxStart::NAME="cluster-connection.tx-start"; const char* TxStart::CLASS_NAME=cluster_connection::NAME; TxStart::TxStart() { } void TxStart::accept(Visitor& v) { v.visit(*this); } void TxStart::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const TxStart&) { o << "cluster-connection.tx-start["; o << "]"; return o; } void TxStart::Handler::clusterConnectionTxStart( ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.tx-start not implemented.")); } const char* TxAccept::NAME="cluster-connection.tx-accept"; const char* TxAccept::CLASS_NAME=cluster_connection::NAME; TxAccept::TxAccept(const SequenceSet& commands_) : commands(commands_){ } void TxAccept::accept(Visitor& v) { v.visit(*this); } void TxAccept::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const TxAccept&x) { o << "cluster-connection.tx-accept["; o << " commands=" << x.commands; o << "]"; return o; } void TxAccept::Handler::clusterConnectionTxAccept( const SequenceSet& /*commands_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.tx-accept not implemented.")); } const char* TxDequeue::NAME="cluster-connection.tx-dequeue"; const char* TxDequeue::CLASS_NAME=cluster_connection::NAME; TxDequeue::TxDequeue(const Str8& queue_) : queue(queue_){ } void TxDequeue::accept(Visitor& v) { v.visit(*this); } void TxDequeue::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const TxDequeue&x) { o << "cluster-connection.tx-dequeue["; o << " queue=" << x.queue; o << "]"; return o; } void TxDequeue::Handler::clusterConnectionTxDequeue( const Str8& /*queue_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.tx-dequeue not implemented.")); } const char* TxEnqueue::NAME="cluster-connection.tx-enqueue"; const char* TxEnqueue::CLASS_NAME=cluster_connection::NAME; TxEnqueue::TxEnqueue(const Str8& queue_) : queue(queue_){ } void TxEnqueue::accept(Visitor& v) { v.visit(*this); } void TxEnqueue::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const TxEnqueue&x) { o << "cluster-connection.tx-enqueue["; o << " queue=" << x.queue; o << "]"; return o; } void TxEnqueue::Handler::clusterConnectionTxEnqueue( const Str8& /*queue_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.tx-enqueue not implemented.")); } const char* TxPublish::NAME="cluster-connection.tx-publish"; const char* TxPublish::CLASS_NAME=cluster_connection::NAME; TxPublish::TxPublish( const ArrayDomain & queues_, Bit delivered_ ) : queues(queues_), delivered(delivered_){ } void TxPublish::accept(Visitor& v) { v.visit(*this); } void TxPublish::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const TxPublish&x) { o << "cluster-connection.tx-publish["; o << " queues=" << x.queues; o << " delivered=" << x.delivered; o << "]"; return o; } void TxPublish::Handler::clusterConnectionTxPublish( const ArrayDomain & /*queues_*/, Bit /*delivered_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.tx-publish not implemented.")); } const char* TxEnd::NAME="cluster-connection.tx-end"; const char* TxEnd::CLASS_NAME=cluster_connection::NAME; TxEnd::TxEnd() { } void TxEnd::accept(Visitor& v) { v.visit(*this); } void TxEnd::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const TxEnd&) { o << "cluster-connection.tx-end["; o << "]"; return o; } void TxEnd::Handler::clusterConnectionTxEnd( ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.tx-end not implemented.")); } const char* AccumulatedAck::NAME="cluster-connection.accumulated-ack"; const char* AccumulatedAck::CLASS_NAME=cluster_connection::NAME; AccumulatedAck::AccumulatedAck(const SequenceSet& commands_) : commands(commands_){ } void AccumulatedAck::accept(Visitor& v) { v.visit(*this); } void AccumulatedAck::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const AccumulatedAck&x) { o << "cluster-connection.accumulated-ack["; o << " commands=" << x.commands; o << "]"; return o; } void AccumulatedAck::Handler::clusterConnectionAccumulatedAck( const SequenceSet& /*commands_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.accumulated-ack not implemented.")); } const char* OutputTask::NAME="cluster-connection.output-task"; const char* OutputTask::CLASS_NAME=cluster_connection::NAME; OutputTask::OutputTask( Uint16 channel_, const Str8& name_ ) : channel(channel_), name(name_){ } void OutputTask::accept(Visitor& v) { v.visit(*this); } void OutputTask::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const OutputTask&x) { o << "cluster-connection.output-task["; o << " channel=" << x.channel; o << " name=" << x.name; o << "]"; return o; } void OutputTask::Handler::clusterConnectionOutputTask( Uint16 /*channel_*/, const Str8& /*name_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.output-task not implemented.")); } const char* DtxStart::NAME="cluster-connection.dtx-start"; const char* DtxStart::CLASS_NAME=cluster_connection::NAME; DtxStart::DtxStart( const Str16& xid_, Bit ended_, Bit suspended_, Bit failed_, Bit expired_ ) : xid(xid_), ended(ended_), suspended(suspended_), failed(failed_), expired(expired_){ } void DtxStart::accept(Visitor& v) { v.visit(*this); } void DtxStart::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DtxStart&x) { o << "cluster-connection.dtx-start["; o << " xid=" << x.xid; o << " ended=" << x.ended; o << " suspended=" << x.suspended; o << " failed=" << x.failed; o << " expired=" << x.expired; o << "]"; return o; } void DtxStart::Handler::clusterConnectionDtxStart( const Str16& /*xid_*/, Bit /*ended_*/, Bit /*suspended_*/, Bit /*failed_*/, Bit /*expired_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.dtx-start not implemented.")); } const char* DtxEnd::NAME="cluster-connection.dtx-end"; const char* DtxEnd::CLASS_NAME=cluster_connection::NAME; DtxEnd::DtxEnd() { } void DtxEnd::accept(Visitor& v) { v.visit(*this); } void DtxEnd::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DtxEnd&) { o << "cluster-connection.dtx-end["; o << "]"; return o; } void DtxEnd::Handler::clusterConnectionDtxEnd( ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.dtx-end not implemented.")); } const char* DtxAck::NAME="cluster-connection.dtx-ack"; const char* DtxAck::CLASS_NAME=cluster_connection::NAME; DtxAck::DtxAck() { } void DtxAck::accept(Visitor& v) { v.visit(*this); } void DtxAck::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DtxAck&) { o << "cluster-connection.dtx-ack["; o << "]"; return o; } void DtxAck::Handler::clusterConnectionDtxAck( ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.dtx-ack not implemented.")); } const char* DtxBufferRef::NAME="cluster-connection.dtx-buffer-ref"; const char* DtxBufferRef::CLASS_NAME=cluster_connection::NAME; DtxBufferRef::DtxBufferRef( const Str16& xid_, Uint32 index_, Bit suspended_ ) : xid(xid_), index(index_), suspended(suspended_){ } void DtxBufferRef::accept(Visitor& v) { v.visit(*this); } void DtxBufferRef::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DtxBufferRef&x) { o << "cluster-connection.dtx-buffer-ref["; o << " xid=" << x.xid; o << " index=" << x.index; o << " suspended=" << x.suspended; o << "]"; return o; } void DtxBufferRef::Handler::clusterConnectionDtxBufferRef( const Str16& /*xid_*/, Uint32 /*index_*/, Bit /*suspended_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.dtx-buffer-ref not implemented.")); } const char* DtxWorkRecord::NAME="cluster-connection.dtx-work-record"; const char* DtxWorkRecord::CLASS_NAME=cluster_connection::NAME; DtxWorkRecord::DtxWorkRecord( const Str16& xid_, Bit prepared_, Uint32 timeout_ ) : xid(xid_), prepared(prepared_), timeout(timeout_){ } void DtxWorkRecord::accept(Visitor& v) { v.visit(*this); } void DtxWorkRecord::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const DtxWorkRecord&x) { o << "cluster-connection.dtx-work-record["; o << " xid=" << x.xid; o << " prepared=" << x.prepared; o << " timeout=" << x.timeout; o << "]"; return o; } void DtxWorkRecord::Handler::clusterConnectionDtxWorkRecord( const Str16& /*xid_*/, Bit /*prepared_*/, Uint32 /*timeout_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.dtx-work-record not implemented.")); } const char* SessionState::NAME="cluster-connection.session-state"; const char* SessionState::CLASS_NAME=cluster_connection::NAME; SessionState::SessionState( const SequenceNo& replayStart_, const SequenceNo& commandPoint_, const SequenceSet& sentIncomplete_, const SequenceNo& expected_, const SequenceNo& received_, const SequenceSet& unknownCompleted_, const SequenceSet& receivedIncomplete_, Bit dtxSelected_ ) : replayStart(replayStart_), commandPoint(commandPoint_), sentIncomplete(sentIncomplete_), expected(expected_), received(received_), unknownCompleted(unknownCompleted_), receivedIncomplete(receivedIncomplete_), dtxSelected(dtxSelected_){ } void SessionState::accept(Visitor& v) { v.visit(*this); } void SessionState::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const SessionState&x) { o << "cluster-connection.session-state["; o << " replay-start=" << x.replayStart; o << " command-point=" << x.commandPoint; o << " sent-incomplete=" << x.sentIncomplete; o << " expected=" << x.expected; o << " received=" << x.received; o << " unknown-completed=" << x.unknownCompleted; o << " received-incomplete=" << x.receivedIncomplete; o << " dtx-selected=" << x.dtxSelected; o << "]"; return o; } void SessionState::Handler::clusterConnectionSessionState( const SequenceNo& /*replayStart_*/, const SequenceNo& /*commandPoint_*/, const SequenceSet& /*sentIncomplete_*/, const SequenceNo& /*expected_*/, const SequenceNo& /*received_*/, const SequenceSet& /*unknownCompleted_*/, const SequenceSet& /*receivedIncomplete_*/, Bit /*dtxSelected_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.session-state not implemented.")); } const char* ShadowReady::NAME="cluster-connection.shadow-ready"; const char* ShadowReady::CLASS_NAME=cluster_connection::NAME; ShadowReady::ShadowReady( Uint64 memberId_, Uint64 connectionId_, const Str16& managementId_, const Str8& userName_, const Str32& fragment_, Uint32 sendMax_ ) : memberId(memberId_), connectionId(connectionId_), managementId(managementId_), userName(userName_), fragment(fragment_), sendMax(sendMax_){ } void ShadowReady::accept(Visitor& v) { v.visit(*this); } void ShadowReady::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ShadowReady&x) { o << "cluster-connection.shadow-ready["; o << " member-id=" << x.memberId; o << " connection-id=" << x.connectionId; o << " management-id=" << x.managementId; o << " user-name=" << x.userName; o << " fragment=" << x.fragment; o << " send-max=" << x.sendMax; o << "]"; return o; } void ShadowReady::Handler::clusterConnectionShadowReady( Uint64 /*memberId_*/, Uint64 /*connectionId_*/, const Str16& /*managementId_*/, const Str8& /*userName_*/, const Str32& /*fragment_*/, Uint32 /*sendMax_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.shadow-ready not implemented.")); } const char* Membership::NAME="cluster-connection.membership"; const char* Membership::CLASS_NAME=cluster_connection::NAME; Membership::Membership( const Map& joiners_, const Map& members_, const SequenceNo& frameSeq_ ) : joiners(joiners_), members(members_), frameSeq(frameSeq_){ } void Membership::accept(Visitor& v) { v.visit(*this); } void Membership::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Membership&x) { o << "cluster-connection.membership["; o << " joiners=" << x.joiners; o << " members=" << x.members; o << " frame-seq=" << x.frameSeq; o << "]"; return o; } void Membership::Handler::clusterConnectionMembership( const Map& /*joiners_*/, const Map& /*members_*/, const SequenceNo& /*frameSeq_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.membership not implemented.")); } const char* RetractOffer::NAME="cluster-connection.retract-offer"; const char* RetractOffer::CLASS_NAME=cluster_connection::NAME; RetractOffer::RetractOffer() { } void RetractOffer::accept(Visitor& v) { v.visit(*this); } void RetractOffer::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const RetractOffer&) { o << "cluster-connection.retract-offer["; o << "]"; return o; } void RetractOffer::Handler::clusterConnectionRetractOffer( ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.retract-offer not implemented.")); } const char* QueuePosition::NAME="cluster-connection.queue-position"; const char* QueuePosition::CLASS_NAME=cluster_connection::NAME; QueuePosition::QueuePosition( const Str8& queue_, const SequenceNo& position_ ) : queue(queue_), position(position_){ } void QueuePosition::accept(Visitor& v) { v.visit(*this); } void QueuePosition::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const QueuePosition&x) { o << "cluster-connection.queue-position["; o << " queue=" << x.queue; o << " position=" << x.position; o << "]"; return o; } void QueuePosition::Handler::clusterConnectionQueuePosition( const Str8& /*queue_*/, const SequenceNo& /*position_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.queue-position not implemented.")); } const char* Exchange::NAME="cluster-connection.exchange"; const char* Exchange::CLASS_NAME=cluster_connection::NAME; Exchange::Exchange(const Str32& encoded_) : encoded(encoded_){ } void Exchange::accept(Visitor& v) { v.visit(*this); } void Exchange::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Exchange&x) { o << "cluster-connection.exchange["; o << " encoded=" << x.encoded; o << "]"; return o; } void Exchange::Handler::clusterConnectionExchange( const Str32& /*encoded_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.exchange not implemented.")); } const char* AddQueueListener::NAME="cluster-connection.add-queue-listener"; const char* AddQueueListener::CLASS_NAME=cluster_connection::NAME; AddQueueListener::AddQueueListener( const Str8& queue_, Uint32 consumer_ ) : queue(queue_), consumer(consumer_){ } void AddQueueListener::accept(Visitor& v) { v.visit(*this); } void AddQueueListener::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const AddQueueListener&x) { o << "cluster-connection.add-queue-listener["; o << " queue=" << x.queue; o << " consumer=" << x.consumer; o << "]"; return o; } void AddQueueListener::Handler::clusterConnectionAddQueueListener( const Str8& /*queue_*/, Uint32 /*consumer_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.add-queue-listener not implemented.")); } const char* ManagementSetupState::NAME="cluster-connection.management-setup-state"; const char* ManagementSetupState::CLASS_NAME=cluster_connection::NAME; ManagementSetupState::ManagementSetupState( Uint64 objectNum_, Uint16 bootSequence_, const Uuid& brokerId_, const Str32& vendor_, const Str32& product_, const Str32& instance_ ) : objectNum(objectNum_), bootSequence(bootSequence_), brokerId(brokerId_), vendor(vendor_), product(product_), instance(instance_){ } void ManagementSetupState::accept(Visitor& v) { v.visit(*this); } void ManagementSetupState::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const ManagementSetupState&x) { o << "cluster-connection.management-setup-state["; o << " objectNum=" << x.objectNum; o << " bootSequence=" << x.bootSequence; o << " broker-id=" << x.brokerId; o << " vendor=" << x.vendor; o << " product=" << x.product; o << " instance=" << x.instance; o << "]"; return o; } void ManagementSetupState::Handler::clusterConnectionManagementSetupState( Uint64 /*objectNum_*/, Uint16 /*bootSequence_*/, const Uuid& /*brokerId_*/, const Str32& /*vendor_*/, const Str32& /*product_*/, const Str32& /*instance_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.management-setup-state not implemented.")); } const char* Config::NAME="cluster-connection.config"; const char* Config::CLASS_NAME=cluster_connection::NAME; Config::Config(const Str32& encoded_) : encoded(encoded_){ } void Config::accept(Visitor& v) { v.visit(*this); } void Config::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Config&x) { o << "cluster-connection.config["; o << " encoded=" << x.encoded; o << "]"; return o; } void Config::Handler::clusterConnectionConfig( const Str32& /*encoded_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.config not implemented.")); } const char* QueueFairshareState::NAME="cluster-connection.queue-fairshare-state"; const char* QueueFairshareState::CLASS_NAME=cluster_connection::NAME; QueueFairshareState::QueueFairshareState( const Str8& queue_, Uint8 position_, Uint8 count_ ) : queue(queue_), position(position_), count(count_){ } void QueueFairshareState::accept(Visitor& v) { v.visit(*this); } void QueueFairshareState::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const QueueFairshareState&x) { o << "cluster-connection.queue-fairshare-state["; o << " queue=" << x.queue; o << " position=" << x.position; o << " count=" << x.count; o << "]"; return o; } void QueueFairshareState::Handler::clusterConnectionQueueFairshareState( const Str8& /*queue_*/, Uint8 /*position_*/, Uint8 /*count_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.queue-fairshare-state not implemented.")); } const char* QueueObserverState::NAME="cluster-connection.queue-observer-state"; const char* QueueObserverState::CLASS_NAME=cluster_connection::NAME; QueueObserverState::QueueObserverState( const Str8& queue_, const Str8& observerId_, const Map& state_ ) : queue(queue_), observerId(observerId_), state(state_){ } void QueueObserverState::accept(Visitor& v) { v.visit(*this); } void QueueObserverState::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const QueueObserverState&x) { o << "cluster-connection.queue-observer-state["; o << " queue=" << x.queue; o << " observer-id=" << x.observerId; o << " state=" << x.state; o << "]"; return o; } void QueueObserverState::Handler::clusterConnectionQueueObserverState( const Str8& /*queue_*/, const Str8& /*observerId_*/, const Map& /*state_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.queue-observer-state not implemented.")); } const char* Clock::NAME="cluster-connection.clock"; const char* Clock::CLASS_NAME=cluster_connection::NAME; Clock::Clock(Uint64 time_) : time(time_){ } void Clock::accept(Visitor& v) { v.visit(*this); } void Clock::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const Clock&x) { o << "cluster-connection.clock["; o << " time=" << x.time; o << "]"; return o; } void Clock::Handler::clusterConnectionClock( Uint64 /*time_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.clock not implemented.")); } const char* QueueDequeueSincePurgeState::NAME="cluster-connection.queue-dequeue-since-purge-state"; const char* QueueDequeueSincePurgeState::CLASS_NAME=cluster_connection::NAME; QueueDequeueSincePurgeState::QueueDequeueSincePurgeState( const Str8& queue_, Uint32 dequeueSincePurge_ ) : queue(queue_), dequeueSincePurge(dequeueSincePurge_){ } void QueueDequeueSincePurgeState::accept(Visitor& v) { v.visit(*this); } void QueueDequeueSincePurgeState::accept(ConstVisitor& v) const { v.visit(*this); } std::ostream& operator << (std::ostream& o, const QueueDequeueSincePurgeState&x) { o << "cluster-connection.queue-dequeue-since-purge-state["; o << " queue=" << x.queue; o << " dequeueSincePurge=" << x.dequeueSincePurge; o << "]"; return o; } void QueueDequeueSincePurgeState::Handler::clusterConnectionQueueDequeueSincePurgeState( const Str8& /*queue_*/, Uint32 /*dequeueSincePurge_*/ ) { assert(0); throw NotImplementedException(QPID_MSG("cluster-connection.queue-dequeue-since-purge-state not implemented.")); } } // namespace cluster_connection }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/specification.h0000664000076400007640000040316511752725700021345 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_SPECIFICATION_H #define QPID_AMQP_0_10_SPECIFICATION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/specification_fwd.h" #include "qpid/amqp_0_10/Map.h" #include "qpid/amqp_0_10/Array.h" #include "qpid/amqp_0_10/UnknownType.h" #include "qpid/amqp_0_10/Struct32.h" #include "qpid/amqp_0_10/Control.h" #include "qpid/amqp_0_10/Command.h" #include "qpid/amqp_0_10/Packer.h" #include namespace qpid { namespace amqp_0_10 { namespace connection { struct Start: public Control { Map serverProperties; Str16Array mechanisms; Str16Array locales; static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit Start( const Map& serverProperties_=Map(), const Str16Array& mechanisms_=Str16Array(), const Str16Array& locales_=Str16Array() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(serverProperties)(mechanisms)(locales); } struct Handler { void connectionStart( const Map& serverProperties_, const Str16Array& mechanisms_, const Str16Array& locales_ ); }; template void invoke(T& target)const { target.connectionStart(serverProperties, mechanisms, locales ); } }; inline Packer serializable(Start& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Start&); bool operator==(const Start&, const Start&); struct StartOk: public Control { Map clientProperties; Str8 mechanism; Vbin32 response; Str8 locale; static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit StartOk( const Map& clientProperties_=Map(), const Str8& mechanism_=Str8(), const Vbin32& response_=Vbin32(), const Str8& locale_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(clientProperties)(mechanism)(response)(locale); } struct Handler { void connectionStartOk( const Map& clientProperties_, const Str8& mechanism_, const Vbin32& response_, const Str8& locale_ ); }; template void invoke(T& target)const { target.connectionStartOk(clientProperties, mechanism, response, locale ); } }; inline Packer serializable(StartOk& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const StartOk&); bool operator==(const StartOk&, const StartOk&); struct Secure: public Control { Vbin32 challenge; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit Secure(const Vbin32& challenge_=Vbin32()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(challenge); } struct Handler { void connectionSecure( const Vbin32& challenge_ ); }; template void invoke(T& target)const { target.connectionSecure(challenge ); } }; inline Packer serializable(Secure& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Secure&); bool operator==(const Secure&, const Secure&); struct SecureOk: public Control { Vbin32 response; static const char* NAME; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit SecureOk(const Vbin32& response_=Vbin32()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(response); } struct Handler { void connectionSecureOk( const Vbin32& response_ ); }; template void invoke(T& target)const { target.connectionSecureOk(response ); } }; inline Packer serializable(SecureOk& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const SecureOk&); bool operator==(const SecureOk&, const SecureOk&); struct Tune: public Control { Uint16 channelMax; Uint16 maxFrameSize; Uint16 heartbeatMin; Uint16 heartbeatMax; static const char* NAME; static const uint8_t CODE=0x5; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit Tune( Uint16 channelMax_=Uint16(), Uint16 maxFrameSize_=Uint16(), Uint16 heartbeatMin_=Uint16(), Uint16 heartbeatMax_=Uint16() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(channelMax)(maxFrameSize)(heartbeatMin)(heartbeatMax); } struct Handler { void connectionTune( Uint16 channelMax_, Uint16 maxFrameSize_, Uint16 heartbeatMin_, Uint16 heartbeatMax_ ); }; template void invoke(T& target)const { target.connectionTune(channelMax, maxFrameSize, heartbeatMin, heartbeatMax ); } }; inline Packer serializable(Tune& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Tune&); bool operator==(const Tune&, const Tune&); struct TuneOk: public Control { Uint16 channelMax; Uint16 maxFrameSize; Uint16 heartbeat; static const char* NAME; static const uint8_t CODE=0x6; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit TuneOk( Uint16 channelMax_=Uint16(), Uint16 maxFrameSize_=Uint16(), Uint16 heartbeat_=Uint16() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(channelMax)(maxFrameSize)(heartbeat); } struct Handler { void connectionTuneOk( Uint16 channelMax_, Uint16 maxFrameSize_, Uint16 heartbeat_ ); }; template void invoke(T& target)const { target.connectionTuneOk(channelMax, maxFrameSize, heartbeat ); } }; inline Packer serializable(TuneOk& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const TuneOk&); bool operator==(const TuneOk&, const TuneOk&); struct Open: public Control { Str8 virtualHost; Str16Array capabilities; Bit insist; static const char* NAME; static const uint8_t CODE=0x7; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit Open( const Str8& virtualHost_=Str8(), const Str16Array& capabilities_=Str16Array(), Bit insist_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(virtualHost)(capabilities)(insist); } struct Handler { void connectionOpen( const Str8& virtualHost_, const Str16Array& capabilities_, Bit insist_ ); }; template void invoke(T& target)const { target.connectionOpen(virtualHost, capabilities, insist ); } }; inline Packer serializable(Open& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Open&); bool operator==(const Open&, const Open&); struct OpenOk: public Control { AmqpHostArray knownHosts; static const char* NAME; static const uint8_t CODE=0x8; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit OpenOk(const connection::AmqpHostArray& knownHosts_=connection::AmqpHostArray()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(knownHosts); } struct Handler { void connectionOpenOk( const connection::AmqpHostArray& knownHosts_ ); }; template void invoke(T& target)const { target.connectionOpenOk(knownHosts ); } }; inline Packer serializable(OpenOk& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const OpenOk&); bool operator==(const OpenOk&, const OpenOk&); struct Redirect: public Control { AmqpHostUrl host; AmqpHostArray knownHosts; static const char* NAME; static const uint8_t CODE=0x9; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit Redirect( const connection::AmqpHostUrl& host_=connection::AmqpHostUrl(), const connection::AmqpHostArray& knownHosts_=connection::AmqpHostArray() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(host)(knownHosts); } struct Handler { void connectionRedirect( const connection::AmqpHostUrl& host_, const connection::AmqpHostArray& knownHosts_ ); }; template void invoke(T& target)const { target.connectionRedirect(host, knownHosts ); } }; inline Packer serializable(Redirect& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Redirect&); bool operator==(const Redirect&, const Redirect&); struct Heartbeat: public Control { static const char* NAME; static const uint8_t CODE=0xa; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit Heartbeat(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void connectionHeartbeat( ); }; template void invoke(T& target)const { target.connectionHeartbeat( ); } }; inline Packer serializable(Heartbeat& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Heartbeat&); bool operator==(const Heartbeat&, const Heartbeat&); struct Close: public Control { CloseCode replyCode; Str8 replyText; static const char* NAME; static const uint8_t CODE=0xb; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit Close( const connection::CloseCode& replyCode_=connection::CloseCode(), const Str8& replyText_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(replyCode)(replyText); } struct Handler { void connectionClose( const connection::CloseCode& replyCode_, const Str8& replyText_ ); }; template void invoke(T& target)const { target.connectionClose(replyCode, replyText ); } }; inline Packer serializable(Close& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Close&); bool operator==(const Close&, const Close&); struct CloseOk: public Control { static const char* NAME; static const uint8_t CODE=0xc; static const uint8_t CLASS_CODE=connection::CODE; static const char* CLASS_NAME; explicit CloseOk(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void connectionCloseOk( ); }; template void invoke(T& target)const { target.connectionCloseOk( ); } }; inline Packer serializable(CloseOk& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const CloseOk&); bool operator==(const CloseOk&, const CloseOk&); } // namespace connection namespace session { struct Attach: public Control { Name name; Bit force; static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Attach( const session::Name& name_=session::Name(), Bit force_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(name)(force); } struct Handler { void sessionAttach( const session::Name& name_, Bit force_ ); }; template void invoke(T& target)const { target.sessionAttach(name, force ); } }; inline Packer serializable(Attach& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Attach&); bool operator==(const Attach&, const Attach&); struct Attached: public Control { Name name; static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Attached(const session::Name& name_=session::Name()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(name); } struct Handler { void sessionAttached( const session::Name& name_ ); }; template void invoke(T& target)const { target.sessionAttached(name ); } }; inline Packer serializable(Attached& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Attached&); bool operator==(const Attached&, const Attached&); struct Detach: public Control { Name name; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Detach(const session::Name& name_=session::Name()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(name); } struct Handler { void sessionDetach( const session::Name& name_ ); }; template void invoke(T& target)const { target.sessionDetach(name ); } }; inline Packer serializable(Detach& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Detach&); bool operator==(const Detach&, const Detach&); struct Detached: public Control { Name name; DetachCode code; static const char* NAME; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Detached( const session::Name& name_=session::Name(), const session::DetachCode& code_=session::DetachCode() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(name)(code); } struct Handler { void sessionDetached( const session::Name& name_, const session::DetachCode& code_ ); }; template void invoke(T& target)const { target.sessionDetached(name, code ); } }; inline Packer serializable(Detached& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Detached&); bool operator==(const Detached&, const Detached&); struct RequestTimeout: public Control { Uint32 timeout; static const char* NAME; static const uint8_t CODE=0x5; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit RequestTimeout(Uint32 timeout_=Uint32()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(timeout); } struct Handler { void sessionRequestTimeout( Uint32 timeout_ ); }; template void invoke(T& target)const { target.sessionRequestTimeout(timeout ); } }; inline Packer serializable(RequestTimeout& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const RequestTimeout&); bool operator==(const RequestTimeout&, const RequestTimeout&); struct Timeout: public Control { Uint32 timeout; static const char* NAME; static const uint8_t CODE=0x6; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Timeout(Uint32 timeout_=Uint32()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(timeout); } struct Handler { void sessionTimeout( Uint32 timeout_ ); }; template void invoke(T& target)const { target.sessionTimeout(timeout ); } }; inline Packer serializable(Timeout& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Timeout&); bool operator==(const Timeout&, const Timeout&); struct CommandPoint: public Control { SequenceNo commandId; Uint64 commandOffset; static const char* NAME; static const uint8_t CODE=0x7; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit CommandPoint( const SequenceNo& commandId_=SequenceNo(), Uint64 commandOffset_=Uint64() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(commandId)(commandOffset); } struct Handler { void sessionCommandPoint( const SequenceNo& commandId_, Uint64 commandOffset_ ); }; template void invoke(T& target)const { target.sessionCommandPoint(commandId, commandOffset ); } }; inline Packer serializable(CommandPoint& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const CommandPoint&); bool operator==(const CommandPoint&, const CommandPoint&); struct Expected: public Control { Commands commands; CommandFragments fragments; static const char* NAME; static const uint8_t CODE=0x8; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Expected( const session::Commands& commands_=session::Commands(), const session::CommandFragments& fragments_=session::CommandFragments() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(commands)(fragments); } struct Handler { void sessionExpected( const session::Commands& commands_, const session::CommandFragments& fragments_ ); }; template void invoke(T& target)const { target.sessionExpected(commands, fragments ); } }; inline Packer serializable(Expected& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Expected&); bool operator==(const Expected&, const Expected&); struct Confirmed: public Control { Commands commands; CommandFragments fragments; static const char* NAME; static const uint8_t CODE=0x9; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Confirmed( const session::Commands& commands_=session::Commands(), const session::CommandFragments& fragments_=session::CommandFragments() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(commands)(fragments); } struct Handler { void sessionConfirmed( const session::Commands& commands_, const session::CommandFragments& fragments_ ); }; template void invoke(T& target)const { target.sessionConfirmed(commands, fragments ); } }; inline Packer serializable(Confirmed& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Confirmed&); bool operator==(const Confirmed&, const Confirmed&); struct Completed: public Control { Commands commands; Bit timelyReply; static const char* NAME; static const uint8_t CODE=0xa; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Completed( const session::Commands& commands_=session::Commands(), Bit timelyReply_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(commands)(timelyReply); } struct Handler { void sessionCompleted( const session::Commands& commands_, Bit timelyReply_ ); }; template void invoke(T& target)const { target.sessionCompleted(commands, timelyReply ); } }; inline Packer serializable(Completed& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Completed&); bool operator==(const Completed&, const Completed&); struct KnownCompleted: public Control { Commands commands; static const char* NAME; static const uint8_t CODE=0xb; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit KnownCompleted(const session::Commands& commands_=session::Commands()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(commands); } struct Handler { void sessionKnownCompleted( const session::Commands& commands_ ); }; template void invoke(T& target)const { target.sessionKnownCompleted(commands ); } }; inline Packer serializable(KnownCompleted& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const KnownCompleted&); bool operator==(const KnownCompleted&, const KnownCompleted&); struct Flush: public Control { Bit expected; Bit confirmed; Bit completed; static const char* NAME; static const uint8_t CODE=0xc; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Flush( Bit expected_=Bit(), Bit confirmed_=Bit(), Bit completed_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(expected)(confirmed)(completed); } struct Handler { void sessionFlush( Bit expected_, Bit confirmed_, Bit completed_ ); }; template void invoke(T& target)const { target.sessionFlush(expected, confirmed, completed ); } }; inline Packer serializable(Flush& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Flush&); bool operator==(const Flush&, const Flush&); struct Gap: public Control { Commands commands; static const char* NAME; static const uint8_t CODE=0xd; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Gap(const session::Commands& commands_=session::Commands()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(commands); } struct Handler { void sessionGap( const session::Commands& commands_ ); }; template void invoke(T& target)const { target.sessionGap(commands ); } }; inline Packer serializable(Gap& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Gap&); bool operator==(const Gap&, const Gap&); } // namespace session namespace execution { struct Sync: public Command { static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=execution::CODE; static const char* CLASS_NAME; explicit Sync(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void executionSync( ); }; template void invoke(T& target)const { target.executionSync( ); } }; inline CommandPacker serializable(Sync& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Sync&); bool operator==(const Sync&, const Sync&); struct Result: public Command { SequenceNo commandId; Struct32 value; static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=execution::CODE; static const char* CLASS_NAME; explicit Result( const SequenceNo& commandId_=SequenceNo(), const Struct32& value_=Struct32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(commandId)(value); } struct Handler { void executionResult( const SequenceNo& commandId_, const Struct32& value_ ); }; template void invoke(T& target)const { target.executionResult(commandId, value ); } }; inline CommandPacker serializable(Result& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Result&); bool operator==(const Result&, const Result&); struct Exception: public Command { ErrorCode errorCode; SequenceNo commandId; Uint8 classCode; Uint8 commandCode; Uint8 fieldIndex; Str16 description; Map errorInfo; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=execution::CODE; static const char* CLASS_NAME; explicit Exception( const execution::ErrorCode& errorCode_=execution::ErrorCode(), const SequenceNo& commandId_=SequenceNo(), Uint8 classCode_=Uint8(), Uint8 commandCode_=Uint8(), Uint8 fieldIndex_=Uint8(), const Str16& description_=Str16(), const Map& errorInfo_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(errorCode)(commandId)(classCode)(commandCode)(fieldIndex)(description)(errorInfo); } struct Handler { void executionException( const execution::ErrorCode& errorCode_, const SequenceNo& commandId_, Uint8 classCode_, Uint8 commandCode_, Uint8 fieldIndex_, const Str16& description_, const Map& errorInfo_ ); }; template void invoke(T& target)const { target.executionException(errorCode, commandId, classCode, commandCode, fieldIndex, description, errorInfo ); } }; inline CommandPacker serializable(Exception& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Exception&); bool operator==(const Exception&, const Exception&); } // namespace execution namespace message { struct Transfer: public Command { Destination destination; AcceptMode acceptMode; AcquireMode acquireMode; static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Transfer( const message::Destination& destination_=message::Destination(), const message::AcceptMode& acceptMode_=message::AcceptMode(), const message::AcquireMode& acquireMode_=message::AcquireMode() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(destination)(acceptMode)(acquireMode); } struct Handler { void messageTransfer( const message::Destination& destination_, const message::AcceptMode& acceptMode_, const message::AcquireMode& acquireMode_ ); }; template void invoke(T& target)const { target.messageTransfer(destination, acceptMode, acquireMode ); } }; inline CommandPacker serializable(Transfer& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Transfer&); bool operator==(const Transfer&, const Transfer&); struct Accept: public Command { session::Commands transfers; static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Accept(const session::Commands& transfers_=session::Commands()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(transfers); } struct Handler { void messageAccept( const session::Commands& transfers_ ); }; template void invoke(T& target)const { target.messageAccept(transfers ); } }; inline CommandPacker serializable(Accept& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Accept&); bool operator==(const Accept&, const Accept&); struct Reject: public Command { session::Commands transfers; RejectCode code; Str8 text; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Reject( const session::Commands& transfers_=session::Commands(), const message::RejectCode& code_=message::RejectCode(), const Str8& text_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(transfers)(code)(text); } struct Handler { void messageReject( const session::Commands& transfers_, const message::RejectCode& code_, const Str8& text_ ); }; template void invoke(T& target)const { target.messageReject(transfers, code, text ); } }; inline CommandPacker serializable(Reject& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Reject&); bool operator==(const Reject&, const Reject&); struct Release: public Command { session::Commands transfers; Bit setRedelivered; static const char* NAME; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Release( const session::Commands& transfers_=session::Commands(), Bit setRedelivered_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(transfers)(setRedelivered); } struct Handler { void messageRelease( const session::Commands& transfers_, Bit setRedelivered_ ); }; template void invoke(T& target)const { target.messageRelease(transfers, setRedelivered ); } }; inline CommandPacker serializable(Release& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Release&); bool operator==(const Release&, const Release&); struct Acquire: public Command { session::Commands transfers; static const char* NAME; static const uint8_t CODE=0x5; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Acquire(const session::Commands& transfers_=session::Commands()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(transfers); } struct Handler { void messageAcquire( const session::Commands& transfers_ ); }; template void invoke(T& target)const { target.messageAcquire(transfers ); } }; inline CommandPacker serializable(Acquire& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Acquire&); bool operator==(const Acquire&, const Acquire&); struct Resume: public Command { Destination destination; ResumeId resumeId; static const char* NAME; static const uint8_t CODE=0x6; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Resume( const message::Destination& destination_=message::Destination(), const message::ResumeId& resumeId_=message::ResumeId() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(destination)(resumeId); } struct Handler { void messageResume( const message::Destination& destination_, const message::ResumeId& resumeId_ ); }; template void invoke(T& target)const { target.messageResume(destination, resumeId ); } }; inline CommandPacker serializable(Resume& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Resume&); bool operator==(const Resume&, const Resume&); struct Subscribe: public Command { queue::Name queue; Destination destination; AcceptMode acceptMode; AcquireMode acquireMode; Bit exclusive; ResumeId resumeId; Uint64 resumeTtl; Map arguments; static const char* NAME; static const uint8_t CODE=0x7; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Subscribe( const queue::Name& queue_=queue::Name(), const message::Destination& destination_=message::Destination(), const message::AcceptMode& acceptMode_=message::AcceptMode(), const message::AcquireMode& acquireMode_=message::AcquireMode(), Bit exclusive_=Bit(), const message::ResumeId& resumeId_=message::ResumeId(), Uint64 resumeTtl_=Uint64(), const Map& arguments_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(destination)(acceptMode)(acquireMode)(exclusive)(resumeId)(resumeTtl)(arguments); } struct Handler { void messageSubscribe( const queue::Name& queue_, const message::Destination& destination_, const message::AcceptMode& acceptMode_, const message::AcquireMode& acquireMode_, Bit exclusive_, const message::ResumeId& resumeId_, Uint64 resumeTtl_, const Map& arguments_ ); }; template void invoke(T& target)const { target.messageSubscribe(queue, destination, acceptMode, acquireMode, exclusive, resumeId, resumeTtl, arguments ); } }; inline CommandPacker serializable(Subscribe& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Subscribe&); bool operator==(const Subscribe&, const Subscribe&); struct Cancel: public Command { Destination destination; static const char* NAME; static const uint8_t CODE=0x8; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Cancel(const message::Destination& destination_=message::Destination()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(destination); } struct Handler { void messageCancel( const message::Destination& destination_ ); }; template void invoke(T& target)const { target.messageCancel(destination ); } }; inline CommandPacker serializable(Cancel& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Cancel&); bool operator==(const Cancel&, const Cancel&); struct SetFlowMode: public Command { Destination destination; FlowMode flowMode; static const char* NAME; static const uint8_t CODE=0x9; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit SetFlowMode( const message::Destination& destination_=message::Destination(), const message::FlowMode& flowMode_=message::FlowMode() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(destination)(flowMode); } struct Handler { void messageSetFlowMode( const message::Destination& destination_, const message::FlowMode& flowMode_ ); }; template void invoke(T& target)const { target.messageSetFlowMode(destination, flowMode ); } }; inline CommandPacker serializable(SetFlowMode& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const SetFlowMode&); bool operator==(const SetFlowMode&, const SetFlowMode&); struct Flow: public Command { Destination destination; CreditUnit unit; Uint32 value; static const char* NAME; static const uint8_t CODE=0xa; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Flow( const message::Destination& destination_=message::Destination(), const message::CreditUnit& unit_=message::CreditUnit(), Uint32 value_=Uint32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(destination)(unit)(value); } struct Handler { void messageFlow( const message::Destination& destination_, const message::CreditUnit& unit_, Uint32 value_ ); }; template void invoke(T& target)const { target.messageFlow(destination, unit, value ); } }; inline CommandPacker serializable(Flow& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Flow&); bool operator==(const Flow&, const Flow&); struct Flush: public Command { Destination destination; static const char* NAME; static const uint8_t CODE=0xb; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Flush(const message::Destination& destination_=message::Destination()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(destination); } struct Handler { void messageFlush( const message::Destination& destination_ ); }; template void invoke(T& target)const { target.messageFlush(destination ); } }; inline CommandPacker serializable(Flush& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Flush&); bool operator==(const Flush&, const Flush&); struct Stop: public Command { Destination destination; static const char* NAME; static const uint8_t CODE=0xc; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Stop(const message::Destination& destination_=message::Destination()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(destination); } struct Handler { void messageStop( const message::Destination& destination_ ); }; template void invoke(T& target)const { target.messageStop(destination ); } }; inline CommandPacker serializable(Stop& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Stop&); bool operator==(const Stop&, const Stop&); } // namespace message namespace tx { struct Select: public Command { static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=tx::CODE; static const char* CLASS_NAME; explicit Select(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void txSelect( ); }; template void invoke(T& target)const { target.txSelect( ); } }; inline CommandPacker(x); } std::ostream& operator << (std::ostream&, const Select&); bool operator==(const Select&, const Select&); struct Commit: public Command { static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=tx::CODE; static const char* CLASS_NAME; explicit Commit(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void txCommit( ); }; template void invoke(T& target)const { target.txCommit( ); } }; inline CommandPacker serializable(Commit& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Commit&); bool operator==(const Commit&, const Commit&); struct Rollback: public Command { static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=tx::CODE; static const char* CLASS_NAME; explicit Rollback(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void txRollback( ); }; template void invoke(T& target)const { target.txRollback( ); } }; inline CommandPacker serializable(Rollback& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Rollback&); bool operator==(const Rollback&, const Rollback&); } // namespace tx namespace dtx { struct Select: public Command { static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit Select(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void dtxSelect( ); }; template void invoke(T& target)const { target.dtxSelect( ); } }; inline CommandPacker(x); } std::ostream& operator << (std::ostream&, const Select&); bool operator==(const Select&, const Select&); struct Start: public Command { Xid xid; Bit join; Bit resume; static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit Start( const dtx::Xid& xid_=dtx::Xid(), Bit join_=Bit(), Bit resume_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid)(join)(resume); } struct Handler { void dtxStart( const dtx::Xid& xid_, Bit join_, Bit resume_ ); }; template void invoke(T& target)const { target.dtxStart(xid, join, resume ); } }; inline CommandPacker serializable(Start& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Start&); bool operator==(const Start&, const Start&); struct End: public Command { Xid xid; Bit fail; Bit suspend; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit End( const dtx::Xid& xid_=dtx::Xid(), Bit fail_=Bit(), Bit suspend_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid)(fail)(suspend); } struct Handler { void dtxEnd( const dtx::Xid& xid_, Bit fail_, Bit suspend_ ); }; template void invoke(T& target)const { target.dtxEnd(xid, fail, suspend ); } }; inline CommandPacker serializable(End& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const End&); bool operator==(const End&, const End&); struct Commit: public Command { Xid xid; Bit onePhase; static const char* NAME; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit Commit( const dtx::Xid& xid_=dtx::Xid(), Bit onePhase_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid)(onePhase); } struct Handler { void dtxCommit( const dtx::Xid& xid_, Bit onePhase_ ); }; template void invoke(T& target)const { target.dtxCommit(xid, onePhase ); } }; inline CommandPacker serializable(Commit& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Commit&); bool operator==(const Commit&, const Commit&); struct Forget: public Command { Xid xid; static const char* NAME; static const uint8_t CODE=0x5; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit Forget(const dtx::Xid& xid_=dtx::Xid()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid); } struct Handler { void dtxForget( const dtx::Xid& xid_ ); }; template void invoke(T& target)const { target.dtxForget(xid ); } }; inline CommandPacker serializable(Forget& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Forget&); bool operator==(const Forget&, const Forget&); struct GetTimeout: public Command { Xid xid; static const char* NAME; static const uint8_t CODE=0x6; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit GetTimeout(const dtx::Xid& xid_=dtx::Xid()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid); } struct Handler { void dtxGetTimeout( const dtx::Xid& xid_ ); }; template void invoke(T& target)const { target.dtxGetTimeout(xid ); } }; inline CommandPacker serializable(GetTimeout& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const GetTimeout&); bool operator==(const GetTimeout&, const GetTimeout&); struct Prepare: public Command { Xid xid; static const char* NAME; static const uint8_t CODE=0x7; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit Prepare(const dtx::Xid& xid_=dtx::Xid()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid); } struct Handler { void dtxPrepare( const dtx::Xid& xid_ ); }; template void invoke(T& target)const { target.dtxPrepare(xid ); } }; inline CommandPacker serializable(Prepare& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Prepare&); bool operator==(const Prepare&, const Prepare&); struct Recover: public Command { static const char* NAME; static const uint8_t CODE=0x8; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit Recover(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void dtxRecover( ); }; template void invoke(T& target)const { target.dtxRecover( ); } }; inline CommandPacker serializable(Recover& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Recover&); bool operator==(const Recover&, const Recover&); struct Rollback: public Command { Xid xid; static const char* NAME; static const uint8_t CODE=0x9; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit Rollback(const dtx::Xid& xid_=dtx::Xid()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid); } struct Handler { void dtxRollback( const dtx::Xid& xid_ ); }; template void invoke(T& target)const { target.dtxRollback(xid ); } }; inline CommandPacker serializable(Rollback& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Rollback&); bool operator==(const Rollback&, const Rollback&); struct SetTimeout: public Command { Xid xid; Uint32 timeout; static const char* NAME; static const uint8_t CODE=0xa; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit SetTimeout( const dtx::Xid& xid_=dtx::Xid(), Uint32 timeout_=Uint32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid)(timeout); } struct Handler { void dtxSetTimeout( const dtx::Xid& xid_, Uint32 timeout_ ); }; template void invoke(T& target)const { target.dtxSetTimeout(xid, timeout ); } }; inline CommandPacker serializable(SetTimeout& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const SetTimeout&); bool operator==(const SetTimeout&, const SetTimeout&); } // namespace dtx namespace exchange { struct Declare: public Command { Name exchange; Str8 type; Name alternateExchange; Bit passive; Bit durable; Bit autoDelete; Map arguments; static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=exchange::CODE; static const char* CLASS_NAME; explicit Declare( const exchange::Name& exchange_=exchange::Name(), const Str8& type_=Str8(), const exchange::Name& alternateExchange_=exchange::Name(), Bit passive_=Bit(), Bit durable_=Bit(), Bit autoDelete_=Bit(), const Map& arguments_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(exchange)(type)(alternateExchange)(passive)(durable)(autoDelete)(arguments); } struct Handler { void exchangeDeclare( const exchange::Name& exchange_, const Str8& type_, const exchange::Name& alternateExchange_, Bit passive_, Bit durable_, Bit autoDelete_, const Map& arguments_ ); }; template void invoke(T& target)const { target.exchangeDeclare(exchange, type, alternateExchange, passive, durable, autoDelete, arguments ); } }; inline CommandPacker serializable(Declare& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Declare&); bool operator==(const Declare&, const Declare&); struct Delete: public Command { Name exchange; Bit ifUnused; static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=exchange::CODE; static const char* CLASS_NAME; explicit Delete( const exchange::Name& exchange_=exchange::Name(), Bit ifUnused_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(exchange)(ifUnused); } struct Handler { void exchangeDelete( const exchange::Name& exchange_, Bit ifUnused_ ); }; template void invoke(T& target)const { target.exchangeDelete(exchange, ifUnused ); } }; inline CommandPacker serializable(Delete& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Delete&); bool operator==(const Delete&, const Delete&); struct Query: public Command { Str8 name; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=exchange::CODE; static const char* CLASS_NAME; explicit Query(const Str8& name_=Str8()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(name); } struct Handler { void exchangeQuery( const Str8& name_ ); }; template void invoke(T& target)const { target.exchangeQuery(name ); } }; inline CommandPacker serializable(Query& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Query&); bool operator==(const Query&, const Query&); struct Bind: public Command { queue::Name queue; Name exchange; Str8 bindingKey; Map arguments; static const char* NAME; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=exchange::CODE; static const char* CLASS_NAME; explicit Bind( const queue::Name& queue_=queue::Name(), const exchange::Name& exchange_=exchange::Name(), const Str8& bindingKey_=Str8(), const Map& arguments_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(exchange)(bindingKey)(arguments); } struct Handler { void exchangeBind( const queue::Name& queue_, const exchange::Name& exchange_, const Str8& bindingKey_, const Map& arguments_ ); }; template void invoke(T& target)const { target.exchangeBind(queue, exchange, bindingKey, arguments ); } }; inline CommandPacker serializable(Bind& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Bind&); bool operator==(const Bind&, const Bind&); struct Unbind: public Command { queue::Name queue; Name exchange; Str8 bindingKey; static const char* NAME; static const uint8_t CODE=0x5; static const uint8_t CLASS_CODE=exchange::CODE; static const char* CLASS_NAME; explicit Unbind( const queue::Name& queue_=queue::Name(), const exchange::Name& exchange_=exchange::Name(), const Str8& bindingKey_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(exchange)(bindingKey); } struct Handler { void exchangeUnbind( const queue::Name& queue_, const exchange::Name& exchange_, const Str8& bindingKey_ ); }; template void invoke(T& target)const { target.exchangeUnbind(queue, exchange, bindingKey ); } }; inline CommandPacker serializable(Unbind& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Unbind&); bool operator==(const Unbind&, const Unbind&); struct Bound: public Command { Str8 exchange; Str8 queue; Str8 bindingKey; Map arguments; static const char* NAME; static const uint8_t CODE=0x6; static const uint8_t CLASS_CODE=exchange::CODE; static const char* CLASS_NAME; explicit Bound( const Str8& exchange_=Str8(), const Str8& queue_=Str8(), const Str8& bindingKey_=Str8(), const Map& arguments_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(exchange)(queue)(bindingKey)(arguments); } struct Handler { void exchangeBound( const Str8& exchange_, const Str8& queue_, const Str8& bindingKey_, const Map& arguments_ ); }; template void invoke(T& target)const { target.exchangeBound(exchange, queue, bindingKey, arguments ); } }; inline CommandPacker serializable(Bound& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Bound&); bool operator==(const Bound&, const Bound&); } // namespace exchange namespace queue { struct Declare: public Command { Name queue; exchange::Name alternateExchange; Bit passive; Bit durable; Bit exclusive; Bit autoDelete; Map arguments; static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=queue::CODE; static const char* CLASS_NAME; explicit Declare( const queue::Name& queue_=queue::Name(), const exchange::Name& alternateExchange_=exchange::Name(), Bit passive_=Bit(), Bit durable_=Bit(), Bit exclusive_=Bit(), Bit autoDelete_=Bit(), const Map& arguments_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(alternateExchange)(passive)(durable)(exclusive)(autoDelete)(arguments); } struct Handler { void queueDeclare( const queue::Name& queue_, const exchange::Name& alternateExchange_, Bit passive_, Bit durable_, Bit exclusive_, Bit autoDelete_, const Map& arguments_ ); }; template void invoke(T& target)const { target.queueDeclare(queue, alternateExchange, passive, durable, exclusive, autoDelete, arguments ); } }; inline CommandPacker serializable(Declare& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Declare&); bool operator==(const Declare&, const Declare&); struct Delete: public Command { Name queue; Bit ifUnused; Bit ifEmpty; static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=queue::CODE; static const char* CLASS_NAME; explicit Delete( const queue::Name& queue_=queue::Name(), Bit ifUnused_=Bit(), Bit ifEmpty_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(ifUnused)(ifEmpty); } struct Handler { void queueDelete( const queue::Name& queue_, Bit ifUnused_, Bit ifEmpty_ ); }; template void invoke(T& target)const { target.queueDelete(queue, ifUnused, ifEmpty ); } }; inline CommandPacker serializable(Delete& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Delete&); bool operator==(const Delete&, const Delete&); struct Purge: public Command { Name queue; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=queue::CODE; static const char* CLASS_NAME; explicit Purge(const queue::Name& queue_=queue::Name()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue); } struct Handler { void queuePurge( const queue::Name& queue_ ); }; template void invoke(T& target)const { target.queuePurge(queue ); } }; inline CommandPacker serializable(Purge& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Purge&); bool operator==(const Purge&, const Purge&); struct Query: public Command { Name queue; static const char* NAME; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=queue::CODE; static const char* CLASS_NAME; explicit Query(const queue::Name& queue_=queue::Name()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue); } struct Handler { void queueQuery( const queue::Name& queue_ ); }; template void invoke(T& target)const { target.queueQuery(queue ); } }; inline CommandPacker serializable(Query& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Query&); bool operator==(const Query&, const Query&); } // namespace queue namespace file { struct Qos: public Command { Uint32 prefetchSize; Uint16 prefetchCount; Bit global; static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Qos( Uint32 prefetchSize_=Uint32(), Uint16 prefetchCount_=Uint16(), Bit global_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(prefetchSize)(prefetchCount)(global); } struct Handler { void fileQos( Uint32 prefetchSize_, Uint16 prefetchCount_, Bit global_ ); }; template void invoke(T& target)const { target.fileQos(prefetchSize, prefetchCount, global ); } }; inline CommandPacker serializable(Qos& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Qos&); bool operator==(const Qos&, const Qos&); struct QosOk: public Command { static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit QosOk(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void fileQosOk( ); }; template void invoke(T& target)const { target.fileQosOk( ); } }; inline CommandPacker serializable(QosOk& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const QosOk&); bool operator==(const QosOk&, const QosOk&); struct Consume: public Command { queue::Name queue; Str8 consumerTag; Bit noLocal; Bit noAck; Bit exclusive; Bit nowait; Map arguments; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Consume( const queue::Name& queue_=queue::Name(), const Str8& consumerTag_=Str8(), Bit noLocal_=Bit(), Bit noAck_=Bit(), Bit exclusive_=Bit(), Bit nowait_=Bit(), const Map& arguments_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(consumerTag)(noLocal)(noAck)(exclusive)(nowait)(arguments); } struct Handler { void fileConsume( const queue::Name& queue_, const Str8& consumerTag_, Bit noLocal_, Bit noAck_, Bit exclusive_, Bit nowait_, const Map& arguments_ ); }; template void invoke(T& target)const { target.fileConsume(queue, consumerTag, noLocal, noAck, exclusive, nowait, arguments ); } }; inline CommandPacker serializable(Consume& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Consume&); bool operator==(const Consume&, const Consume&); struct ConsumeOk: public Command { Str8 consumerTag; static const char* NAME; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit ConsumeOk(const Str8& consumerTag_=Str8()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(consumerTag); } struct Handler { void fileConsumeOk( const Str8& consumerTag_ ); }; template void invoke(T& target)const { target.fileConsumeOk(consumerTag ); } }; inline CommandPacker serializable(ConsumeOk& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const ConsumeOk&); bool operator==(const ConsumeOk&, const ConsumeOk&); struct Cancel: public Command { Str8 consumerTag; static const char* NAME; static const uint8_t CODE=0x5; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Cancel(const Str8& consumerTag_=Str8()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(consumerTag); } struct Handler { void fileCancel( const Str8& consumerTag_ ); }; template void invoke(T& target)const { target.fileCancel(consumerTag ); } }; inline CommandPacker serializable(Cancel& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Cancel&); bool operator==(const Cancel&, const Cancel&); struct Open: public Command { Str8 identifier; Uint64 contentSize; static const char* NAME; static const uint8_t CODE=0x6; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Open( const Str8& identifier_=Str8(), Uint64 contentSize_=Uint64() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(identifier)(contentSize); } struct Handler { void fileOpen( const Str8& identifier_, Uint64 contentSize_ ); }; template void invoke(T& target)const { target.fileOpen(identifier, contentSize ); } }; inline CommandPacker serializable(Open& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Open&); bool operator==(const Open&, const Open&); struct OpenOk: public Command { Uint64 stagedSize; static const char* NAME; static const uint8_t CODE=0x7; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit OpenOk(Uint64 stagedSize_=Uint64()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(stagedSize); } struct Handler { void fileOpenOk( Uint64 stagedSize_ ); }; template void invoke(T& target)const { target.fileOpenOk(stagedSize ); } }; inline CommandPacker serializable(OpenOk& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const OpenOk&); bool operator==(const OpenOk&, const OpenOk&); struct Stage: public Command { static const char* NAME; static const uint8_t CODE=0x8; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Stage(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void fileStage( ); }; template void invoke(T& target)const { target.fileStage( ); } }; inline CommandPacker serializable(Stage& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Stage&); bool operator==(const Stage&, const Stage&); struct Publish: public Command { exchange::Name exchange; Str8 routingKey; Bit mandatory; Bit immediate; Str8 identifier; static const char* NAME; static const uint8_t CODE=0x9; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Publish( const exchange::Name& exchange_=exchange::Name(), const Str8& routingKey_=Str8(), Bit mandatory_=Bit(), Bit immediate_=Bit(), const Str8& identifier_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(exchange)(routingKey)(mandatory)(immediate)(identifier); } struct Handler { void filePublish( const exchange::Name& exchange_, const Str8& routingKey_, Bit mandatory_, Bit immediate_, const Str8& identifier_ ); }; template void invoke(T& target)const { target.filePublish(exchange, routingKey, mandatory, immediate, identifier ); } }; inline CommandPacker serializable(Publish& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Publish&); bool operator==(const Publish&, const Publish&); struct Return: public Command { ReturnCode replyCode; Str8 replyText; exchange::Name exchange; Str8 routingKey; static const char* NAME; static const uint8_t CODE=0xa; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Return( const file::ReturnCode& replyCode_=file::ReturnCode(), const Str8& replyText_=Str8(), const exchange::Name& exchange_=exchange::Name(), const Str8& routingKey_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(replyCode)(replyText)(exchange)(routingKey); } struct Handler { void fileReturn( const file::ReturnCode& replyCode_, const Str8& replyText_, const exchange::Name& exchange_, const Str8& routingKey_ ); }; template void invoke(T& target)const { target.fileReturn(replyCode, replyText, exchange, routingKey ); } }; inline CommandPacker serializable(Return& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Return&); bool operator==(const Return&, const Return&); struct Deliver: public Command { Str8 consumerTag; Uint64 deliveryTag; Bit redelivered; exchange::Name exchange; Str8 routingKey; Str8 identifier; static const char* NAME; static const uint8_t CODE=0xb; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Deliver( const Str8& consumerTag_=Str8(), Uint64 deliveryTag_=Uint64(), Bit redelivered_=Bit(), const exchange::Name& exchange_=exchange::Name(), const Str8& routingKey_=Str8(), const Str8& identifier_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(consumerTag)(deliveryTag)(redelivered)(exchange)(routingKey)(identifier); } struct Handler { void fileDeliver( const Str8& consumerTag_, Uint64 deliveryTag_, Bit redelivered_, const exchange::Name& exchange_, const Str8& routingKey_, const Str8& identifier_ ); }; template void invoke(T& target)const { target.fileDeliver(consumerTag, deliveryTag, redelivered, exchange, routingKey, identifier ); } }; inline CommandPacker serializable(Deliver& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Deliver&); bool operator==(const Deliver&, const Deliver&); struct Ack: public Command { Uint64 deliveryTag; Bit multiple; static const char* NAME; static const uint8_t CODE=0xc; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Ack( Uint64 deliveryTag_=Uint64(), Bit multiple_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(deliveryTag)(multiple); } struct Handler { void fileAck( Uint64 deliveryTag_, Bit multiple_ ); }; template void invoke(T& target)const { target.fileAck(deliveryTag, multiple ); } }; inline CommandPacker serializable(Ack& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Ack&); bool operator==(const Ack&, const Ack&); struct Reject: public Command { Uint64 deliveryTag; Bit requeue; static const char* NAME; static const uint8_t CODE=0xd; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit Reject( Uint64 deliveryTag_=Uint64(), Bit requeue_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(deliveryTag)(requeue); } struct Handler { void fileReject( Uint64 deliveryTag_, Bit requeue_ ); }; template void invoke(T& target)const { target.fileReject(deliveryTag, requeue ); } }; inline CommandPacker serializable(Reject& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Reject&); bool operator==(const Reject&, const Reject&); } // namespace file namespace stream { struct Qos: public Command { Uint32 prefetchSize; Uint16 prefetchCount; Uint32 consumeRate; Bit global; static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=stream::CODE; static const char* CLASS_NAME; explicit Qos( Uint32 prefetchSize_=Uint32(), Uint16 prefetchCount_=Uint16(), Uint32 consumeRate_=Uint32(), Bit global_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(prefetchSize)(prefetchCount)(consumeRate)(global); } struct Handler { void streamQos( Uint32 prefetchSize_, Uint16 prefetchCount_, Uint32 consumeRate_, Bit global_ ); }; template void invoke(T& target)const { target.streamQos(prefetchSize, prefetchCount, consumeRate, global ); } }; inline CommandPacker serializable(Qos& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Qos&); bool operator==(const Qos&, const Qos&); struct QosOk: public Command { static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=stream::CODE; static const char* CLASS_NAME; explicit QosOk(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void streamQosOk( ); }; template void invoke(T& target)const { target.streamQosOk( ); } }; inline CommandPacker serializable(QosOk& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const QosOk&); bool operator==(const QosOk&, const QosOk&); struct Consume: public Command { queue::Name queue; Str8 consumerTag; Bit noLocal; Bit exclusive; Bit nowait; Map arguments; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=stream::CODE; static const char* CLASS_NAME; explicit Consume( const queue::Name& queue_=queue::Name(), const Str8& consumerTag_=Str8(), Bit noLocal_=Bit(), Bit exclusive_=Bit(), Bit nowait_=Bit(), const Map& arguments_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(consumerTag)(noLocal)(exclusive)(nowait)(arguments); } struct Handler { void streamConsume( const queue::Name& queue_, const Str8& consumerTag_, Bit noLocal_, Bit exclusive_, Bit nowait_, const Map& arguments_ ); }; template void invoke(T& target)const { target.streamConsume(queue, consumerTag, noLocal, exclusive, nowait, arguments ); } }; inline CommandPacker serializable(Consume& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Consume&); bool operator==(const Consume&, const Consume&); struct ConsumeOk: public Command { Str8 consumerTag; static const char* NAME; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=stream::CODE; static const char* CLASS_NAME; explicit ConsumeOk(const Str8& consumerTag_=Str8()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(consumerTag); } struct Handler { void streamConsumeOk( const Str8& consumerTag_ ); }; template void invoke(T& target)const { target.streamConsumeOk(consumerTag ); } }; inline CommandPacker serializable(ConsumeOk& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const ConsumeOk&); bool operator==(const ConsumeOk&, const ConsumeOk&); struct Cancel: public Command { Str8 consumerTag; static const char* NAME; static const uint8_t CODE=0x5; static const uint8_t CLASS_CODE=stream::CODE; static const char* CLASS_NAME; explicit Cancel(const Str8& consumerTag_=Str8()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(consumerTag); } struct Handler { void streamCancel( const Str8& consumerTag_ ); }; template void invoke(T& target)const { target.streamCancel(consumerTag ); } }; inline CommandPacker serializable(Cancel& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Cancel&); bool operator==(const Cancel&, const Cancel&); struct Publish: public Command { exchange::Name exchange; Str8 routingKey; Bit mandatory; Bit immediate; static const char* NAME; static const uint8_t CODE=0x6; static const uint8_t CLASS_CODE=stream::CODE; static const char* CLASS_NAME; explicit Publish( const exchange::Name& exchange_=exchange::Name(), const Str8& routingKey_=Str8(), Bit mandatory_=Bit(), Bit immediate_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(exchange)(routingKey)(mandatory)(immediate); } struct Handler { void streamPublish( const exchange::Name& exchange_, const Str8& routingKey_, Bit mandatory_, Bit immediate_ ); }; template void invoke(T& target)const { target.streamPublish(exchange, routingKey, mandatory, immediate ); } }; inline CommandPacker serializable(Publish& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Publish&); bool operator==(const Publish&, const Publish&); struct Return: public Command { ReturnCode replyCode; Str8 replyText; exchange::Name exchange; Str8 routingKey; static const char* NAME; static const uint8_t CODE=0x7; static const uint8_t CLASS_CODE=stream::CODE; static const char* CLASS_NAME; explicit Return( const stream::ReturnCode& replyCode_=stream::ReturnCode(), const Str8& replyText_=Str8(), const exchange::Name& exchange_=exchange::Name(), const Str8& routingKey_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(replyCode)(replyText)(exchange)(routingKey); } struct Handler { void streamReturn( const stream::ReturnCode& replyCode_, const Str8& replyText_, const exchange::Name& exchange_, const Str8& routingKey_ ); }; template void invoke(T& target)const { target.streamReturn(replyCode, replyText, exchange, routingKey ); } }; inline CommandPacker serializable(Return& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Return&); bool operator==(const Return&, const Return&); struct Deliver: public Command { Str8 consumerTag; Uint64 deliveryTag; exchange::Name exchange; queue::Name queue; static const char* NAME; static const uint8_t CODE=0x8; static const uint8_t CLASS_CODE=stream::CODE; static const char* CLASS_NAME; explicit Deliver( const Str8& consumerTag_=Str8(), Uint64 deliveryTag_=Uint64(), const exchange::Name& exchange_=exchange::Name(), const queue::Name& queue_=queue::Name() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(consumerTag)(deliveryTag)(exchange)(queue); } struct Handler { void streamDeliver( const Str8& consumerTag_, Uint64 deliveryTag_, const exchange::Name& exchange_, const queue::Name& queue_ ); }; template void invoke(T& target)const { target.streamDeliver(consumerTag, deliveryTag, exchange, queue ); } }; inline CommandPacker serializable(Deliver& x) { return CommandPacker(x); } std::ostream& operator << (std::ostream&, const Deliver&); bool operator==(const Deliver&, const Deliver&); } // namespace stream namespace cluster { struct UpdateRequest: public Control { Str16 url; static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit UpdateRequest(const Str16& url_=Str16()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(url); } struct Handler { void clusterUpdateRequest( const Str16& url_ ); }; template void invoke(T& target)const { target.clusterUpdateRequest(url ); } }; inline Packer serializable(UpdateRequest& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const UpdateRequest&); bool operator==(const UpdateRequest&, const UpdateRequest&); struct UpdateOffer: public Control { Uint64 updatee; static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit UpdateOffer(Uint64 updatee_=Uint64()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(updatee); } struct Handler { void clusterUpdateOffer( Uint64 updatee_ ); }; template void invoke(T& target)const { target.clusterUpdateOffer(updatee ); } }; inline Packer serializable(UpdateOffer& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const UpdateOffer&); bool operator==(const UpdateOffer&, const UpdateOffer&); struct RetractOffer: public Control { Uint64 updatee; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit RetractOffer(Uint64 updatee_=Uint64()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(updatee); } struct Handler { void clusterRetractOffer( Uint64 updatee_ ); }; template void invoke(T& target)const { target.clusterRetractOffer(updatee ); } }; inline Packer serializable(RetractOffer& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const RetractOffer&); bool operator==(const RetractOffer&, const RetractOffer&); struct InitialStatus: public Control { Uint32 version; Bit active; Uuid clusterId; StoreState storeState; Uuid shutdownId; Str16 firstConfig; ArrayDomain urls; static const char* NAME; static const uint8_t CODE=0x5; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit InitialStatus( Uint32 version_=Uint32(), Bit active_=Bit(), const Uuid& clusterId_=Uuid(), const cluster::StoreState& storeState_=cluster::StoreState(), const Uuid& shutdownId_=Uuid(), const Str16& firstConfig_=Str16(), const ArrayDomain & urls_=ArrayDomain () ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(version)(active)(clusterId)(storeState)(shutdownId)(firstConfig)(urls); } struct Handler { void clusterInitialStatus( Uint32 version_, Bit active_, const Uuid& clusterId_, const cluster::StoreState& storeState_, const Uuid& shutdownId_, const Str16& firstConfig_, const ArrayDomain & urls_ ); }; template void invoke(T& target)const { target.clusterInitialStatus(version, active, clusterId, storeState, shutdownId, firstConfig, urls ); } }; inline Packer serializable(InitialStatus& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const InitialStatus&); bool operator==(const InitialStatus&, const InitialStatus&); struct Ready: public Control { Str16 url; static const char* NAME; static const uint8_t CODE=0x10; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit Ready(const Str16& url_=Str16()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(url); } struct Handler { void clusterReady( const Str16& url_ ); }; template void invoke(T& target)const { target.clusterReady(url ); } }; inline Packer serializable(Ready& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Ready&); bool operator==(const Ready&, const Ready&); struct ConfigChange: public Control { Vbin16 members; Vbin16 joined; Vbin16 left; static const char* NAME; static const uint8_t CODE=0x11; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit ConfigChange( const Vbin16& members_=Vbin16(), const Vbin16& joined_=Vbin16(), const Vbin16& left_=Vbin16() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(members)(joined)(left); } struct Handler { void clusterConfigChange( const Vbin16& members_, const Vbin16& joined_, const Vbin16& left_ ); }; template void invoke(T& target)const { target.clusterConfigChange(members, joined, left ); } }; inline Packer serializable(ConfigChange& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const ConfigChange&); bool operator==(const ConfigChange&, const ConfigChange&); struct ErrorCheck: public Control { ErrorType type; SequenceNo frameSeq; static const char* NAME; static const uint8_t CODE=0x14; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit ErrorCheck( const cluster::ErrorType& type_=cluster::ErrorType(), const SequenceNo& frameSeq_=SequenceNo() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(type)(frameSeq); } struct Handler { void clusterErrorCheck( const cluster::ErrorType& type_, const SequenceNo& frameSeq_ ); }; template void invoke(T& target)const { target.clusterErrorCheck(type, frameSeq ); } }; inline Packer serializable(ErrorCheck& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const ErrorCheck&); bool operator==(const ErrorCheck&, const ErrorCheck&); struct TimerWakeup: public Control { Str16 name; static const char* NAME; static const uint8_t CODE=0x15; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit TimerWakeup(const Str16& name_=Str16()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(name); } struct Handler { void clusterTimerWakeup( const Str16& name_ ); }; template void invoke(T& target)const { target.clusterTimerWakeup(name ); } }; inline Packer serializable(TimerWakeup& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const TimerWakeup&); bool operator==(const TimerWakeup&, const TimerWakeup&); struct TimerDrop: public Control { Str16 name; static const char* NAME; static const uint8_t CODE=0x16; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit TimerDrop(const Str16& name_=Str16()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(name); } struct Handler { void clusterTimerDrop( const Str16& name_ ); }; template void invoke(T& target)const { target.clusterTimerDrop(name ); } }; inline Packer serializable(TimerDrop& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const TimerDrop&); bool operator==(const TimerDrop&, const TimerDrop&); struct Shutdown: public Control { Uuid shutdownId; static const char* NAME; static const uint8_t CODE=0x20; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit Shutdown(const Uuid& shutdownId_=Uuid()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(shutdownId); } struct Handler { void clusterShutdown( const Uuid& shutdownId_ ); }; template void invoke(T& target)const { target.clusterShutdown(shutdownId ); } }; inline Packer serializable(Shutdown& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Shutdown&); bool operator==(const Shutdown&, const Shutdown&); struct DeliverToQueue: public Control { Str16 queue; Vbin32 message; static const char* NAME; static const uint8_t CODE=0x21; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit DeliverToQueue( const Str16& queue_=Str16(), const Vbin32& message_=Vbin32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(message); } struct Handler { void clusterDeliverToQueue( const Str16& queue_, const Vbin32& message_ ); }; template void invoke(T& target)const { target.clusterDeliverToQueue(queue, message ); } }; inline Packer serializable(DeliverToQueue& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const DeliverToQueue&); bool operator==(const DeliverToQueue&, const DeliverToQueue&); struct Clock: public Control { Uint64 time; static const char* NAME; static const uint8_t CODE=0x22; static const uint8_t CLASS_CODE=cluster::CODE; static const char* CLASS_NAME; explicit Clock(Uint64 time_=Uint64()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(time); } struct Handler { void clusterClock( Uint64 time_ ); }; template void invoke(T& target)const { target.clusterClock(time ); } }; inline Packer serializable(Clock& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Clock&); bool operator==(const Clock&, const Clock&); } // namespace cluster namespace cluster_connection { struct Announce: public Control { Str16 managementId; Uint32 ssf; Str16 authid; Bit nodict; Str32 username; Str32 initialFrames; static const char* NAME; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit Announce( const Str16& managementId_=Str16(), Uint32 ssf_=Uint32(), const Str16& authid_=Str16(), Bit nodict_=Bit(), const Str32& username_=Str32(), const Str32& initialFrames_=Str32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(managementId)(ssf)(authid)(nodict)(username)(initialFrames); } struct Handler { void clusterConnectionAnnounce( const Str16& managementId_, Uint32 ssf_, const Str16& authid_, Bit nodict_, const Str32& username_, const Str32& initialFrames_ ); }; template void invoke(T& target)const { target.clusterConnectionAnnounce(managementId, ssf, authid, nodict, username, initialFrames ); } }; inline Packer serializable(Announce& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Announce&); bool operator==(const Announce&, const Announce&); struct DeliverClose: public Control { static const char* NAME; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit DeliverClose(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void clusterConnectionDeliverClose( ); }; template void invoke(T& target)const { target.clusterConnectionDeliverClose( ); } }; inline Packer serializable(DeliverClose& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const DeliverClose&); bool operator==(const DeliverClose&, const DeliverClose&); struct DeliverDoOutput: public Control { Uint32 limit; static const char* NAME; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit DeliverDoOutput(Uint32 limit_=Uint32()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(limit); } struct Handler { void clusterConnectionDeliverDoOutput( Uint32 limit_ ); }; template void invoke(T& target)const { target.clusterConnectionDeliverDoOutput(limit ); } }; inline Packer serializable(DeliverDoOutput& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const DeliverDoOutput&); bool operator==(const DeliverDoOutput&, const DeliverDoOutput&); struct Abort: public Control { static const char* NAME; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit Abort(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void clusterConnectionAbort( ); }; template void invoke(T& target)const { target.clusterConnectionAbort( ); } }; inline Packer serializable(Abort& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Abort&); bool operator==(const Abort&, const Abort&); struct ShadowSetUser: public Control { Str16 userId; static const char* NAME; static const uint8_t CODE=0x0E; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit ShadowSetUser(const Str16& userId_=Str16()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(userId); } struct Handler { void clusterConnectionShadowSetUser( const Str16& userId_ ); }; template void invoke(T& target)const { target.clusterConnectionShadowSetUser(userId ); } }; inline Packer serializable(ShadowSetUser& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const ShadowSetUser&); bool operator==(const ShadowSetUser&, const ShadowSetUser&); struct ShadowPrepare: public Control { Str16 managementId; static const char* NAME; static const uint8_t CODE=0x0F; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit ShadowPrepare(const Str16& managementId_=Str16()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(managementId); } struct Handler { void clusterConnectionShadowPrepare( const Str16& managementId_ ); }; template void invoke(T& target)const { target.clusterConnectionShadowPrepare(managementId ); } }; inline Packer serializable(ShadowPrepare& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const ShadowPrepare&); bool operator==(const ShadowPrepare&, const ShadowPrepare&); struct ConsumerState: public Control { Str8 name; Bit blocked; Bit notifyEnabled; SequenceNo position; Uint32 usedMsgCredit; Uint32 usedByteCredit; static const char* NAME; static const uint8_t CODE=0x10; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit ConsumerState( const Str8& name_=Str8(), Bit blocked_=Bit(), Bit notifyEnabled_=Bit(), const SequenceNo& position_=SequenceNo(), Uint32 usedMsgCredit_=Uint32(), Uint32 usedByteCredit_=Uint32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(name)(blocked)(notifyEnabled)(position)(usedMsgCredit)(usedByteCredit); } struct Handler { void clusterConnectionConsumerState( const Str8& name_, Bit blocked_, Bit notifyEnabled_, const SequenceNo& position_, Uint32 usedMsgCredit_, Uint32 usedByteCredit_ ); }; template void invoke(T& target)const { target.clusterConnectionConsumerState(name, blocked, notifyEnabled, position, usedMsgCredit, usedByteCredit ); } }; inline Packer serializable(ConsumerState& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const ConsumerState&); bool operator==(const ConsumerState&, const ConsumerState&); struct DeliveryRecord: public Control { Str8 queue; SequenceNo position; Str8 tag; SequenceNo id; Bit acquired; Bit accepted; Bit cancelled; Bit completed; Bit ended; Bit windowing; Bit enqueued; Uint32 credit; static const char* NAME; static const uint8_t CODE=0x11; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit DeliveryRecord( const Str8& queue_=Str8(), const SequenceNo& position_=SequenceNo(), const Str8& tag_=Str8(), const SequenceNo& id_=SequenceNo(), Bit acquired_=Bit(), Bit accepted_=Bit(), Bit cancelled_=Bit(), Bit completed_=Bit(), Bit ended_=Bit(), Bit windowing_=Bit(), Bit enqueued_=Bit(), Uint32 credit_=Uint32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(position)(tag)(id)(acquired)(accepted)(cancelled)(completed)(ended)(windowing)(enqueued)(credit); } struct Handler { void clusterConnectionDeliveryRecord( const Str8& queue_, const SequenceNo& position_, const Str8& tag_, const SequenceNo& id_, Bit acquired_, Bit accepted_, Bit cancelled_, Bit completed_, Bit ended_, Bit windowing_, Bit enqueued_, Uint32 credit_ ); }; template void invoke(T& target)const { target.clusterConnectionDeliveryRecord(queue, position, tag, id, acquired, accepted, cancelled, completed, ended, windowing, enqueued, credit ); } }; inline Packer serializable(DeliveryRecord& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const DeliveryRecord&); bool operator==(const DeliveryRecord&, const DeliveryRecord&); struct TxStart: public Control { static const char* NAME; static const uint8_t CODE=0x12; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit TxStart(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void clusterConnectionTxStart( ); }; template void invoke(T& target)const { target.clusterConnectionTxStart( ); } }; inline Packer serializable(TxStart& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const TxStart&); bool operator==(const TxStart&, const TxStart&); struct TxAccept: public Control { SequenceSet commands; static const char* NAME; static const uint8_t CODE=0x13; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit TxAccept(const SequenceSet& commands_=SequenceSet()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(commands); } struct Handler { void clusterConnectionTxAccept( const SequenceSet& commands_ ); }; template void invoke(T& target)const { target.clusterConnectionTxAccept(commands ); } }; inline Packer serializable(TxAccept& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const TxAccept&); bool operator==(const TxAccept&, const TxAccept&); struct TxDequeue: public Control { Str8 queue; static const char* NAME; static const uint8_t CODE=0x14; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit TxDequeue(const Str8& queue_=Str8()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue); } struct Handler { void clusterConnectionTxDequeue( const Str8& queue_ ); }; template void invoke(T& target)const { target.clusterConnectionTxDequeue(queue ); } }; inline Packer serializable(TxDequeue& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const TxDequeue&); bool operator==(const TxDequeue&, const TxDequeue&); struct TxEnqueue: public Control { Str8 queue; static const char* NAME; static const uint8_t CODE=0x15; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit TxEnqueue(const Str8& queue_=Str8()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue); } struct Handler { void clusterConnectionTxEnqueue( const Str8& queue_ ); }; template void invoke(T& target)const { target.clusterConnectionTxEnqueue(queue ); } }; inline Packer serializable(TxEnqueue& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const TxEnqueue&); bool operator==(const TxEnqueue&, const TxEnqueue&); struct TxPublish: public Control { ArrayDomain queues; Bit delivered; static const char* NAME; static const uint8_t CODE=0x16; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit TxPublish( const ArrayDomain & queues_=ArrayDomain (), Bit delivered_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queues)(delivered); } struct Handler { void clusterConnectionTxPublish( const ArrayDomain & queues_, Bit delivered_ ); }; template void invoke(T& target)const { target.clusterConnectionTxPublish(queues, delivered ); } }; inline Packer serializable(TxPublish& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const TxPublish&); bool operator==(const TxPublish&, const TxPublish&); struct TxEnd: public Control { static const char* NAME; static const uint8_t CODE=0x17; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit TxEnd(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void clusterConnectionTxEnd( ); }; template void invoke(T& target)const { target.clusterConnectionTxEnd( ); } }; inline Packer serializable(TxEnd& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const TxEnd&); bool operator==(const TxEnd&, const TxEnd&); struct AccumulatedAck: public Control { SequenceSet commands; static const char* NAME; static const uint8_t CODE=0x18; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit AccumulatedAck(const SequenceSet& commands_=SequenceSet()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(commands); } struct Handler { void clusterConnectionAccumulatedAck( const SequenceSet& commands_ ); }; template void invoke(T& target)const { target.clusterConnectionAccumulatedAck(commands ); } }; inline Packer serializable(AccumulatedAck& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const AccumulatedAck&); bool operator==(const AccumulatedAck&, const AccumulatedAck&); struct OutputTask: public Control { Uint16 channel; Str8 name; static const char* NAME; static const uint8_t CODE=0x19; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit OutputTask( Uint16 channel_=Uint16(), const Str8& name_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(channel)(name); } struct Handler { void clusterConnectionOutputTask( Uint16 channel_, const Str8& name_ ); }; template void invoke(T& target)const { target.clusterConnectionOutputTask(channel, name ); } }; inline Packer serializable(OutputTask& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const OutputTask&); bool operator==(const OutputTask&, const OutputTask&); struct DtxStart: public Control { Str16 xid; Bit ended; Bit suspended; Bit failed; Bit expired; static const char* NAME; static const uint8_t CODE=0x1A; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit DtxStart( const Str16& xid_=Str16(), Bit ended_=Bit(), Bit suspended_=Bit(), Bit failed_=Bit(), Bit expired_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid)(ended)(suspended)(failed)(expired); } struct Handler { void clusterConnectionDtxStart( const Str16& xid_, Bit ended_, Bit suspended_, Bit failed_, Bit expired_ ); }; template void invoke(T& target)const { target.clusterConnectionDtxStart(xid, ended, suspended, failed, expired ); } }; inline Packer serializable(DtxStart& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const DtxStart&); bool operator==(const DtxStart&, const DtxStart&); struct DtxEnd: public Control { static const char* NAME; static const uint8_t CODE=0x1B; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit DtxEnd(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void clusterConnectionDtxEnd( ); }; template void invoke(T& target)const { target.clusterConnectionDtxEnd( ); } }; inline Packer serializable(DtxEnd& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const DtxEnd&); bool operator==(const DtxEnd&, const DtxEnd&); struct DtxAck: public Control { static const char* NAME; static const uint8_t CODE=0x1C; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit DtxAck(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void clusterConnectionDtxAck( ); }; template void invoke(T& target)const { target.clusterConnectionDtxAck( ); } }; inline Packer serializable(DtxAck& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const DtxAck&); bool operator==(const DtxAck&, const DtxAck&); struct DtxBufferRef: public Control { Str16 xid; Uint32 index; Bit suspended; static const char* NAME; static const uint8_t CODE=0x1D; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit DtxBufferRef( const Str16& xid_=Str16(), Uint32 index_=Uint32(), Bit suspended_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid)(index)(suspended); } struct Handler { void clusterConnectionDtxBufferRef( const Str16& xid_, Uint32 index_, Bit suspended_ ); }; template void invoke(T& target)const { target.clusterConnectionDtxBufferRef(xid, index, suspended ); } }; inline Packer serializable(DtxBufferRef& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const DtxBufferRef&); bool operator==(const DtxBufferRef&, const DtxBufferRef&); struct DtxWorkRecord: public Control { Str16 xid; Bit prepared; Uint32 timeout; static const char* NAME; static const uint8_t CODE=0x1E; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit DtxWorkRecord( const Str16& xid_=Str16(), Bit prepared_=Bit(), Uint32 timeout_=Uint32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(xid)(prepared)(timeout); } struct Handler { void clusterConnectionDtxWorkRecord( const Str16& xid_, Bit prepared_, Uint32 timeout_ ); }; template void invoke(T& target)const { target.clusterConnectionDtxWorkRecord(xid, prepared, timeout ); } }; inline Packer serializable(DtxWorkRecord& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const DtxWorkRecord&); bool operator==(const DtxWorkRecord&, const DtxWorkRecord&); struct SessionState: public Control { SequenceNo replayStart; SequenceNo commandPoint; SequenceSet sentIncomplete; SequenceNo expected; SequenceNo received; SequenceSet unknownCompleted; SequenceSet receivedIncomplete; Bit dtxSelected; static const char* NAME; static const uint8_t CODE=0x1F; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit SessionState( const SequenceNo& replayStart_=SequenceNo(), const SequenceNo& commandPoint_=SequenceNo(), const SequenceSet& sentIncomplete_=SequenceSet(), const SequenceNo& expected_=SequenceNo(), const SequenceNo& received_=SequenceNo(), const SequenceSet& unknownCompleted_=SequenceSet(), const SequenceSet& receivedIncomplete_=SequenceSet(), Bit dtxSelected_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(replayStart)(commandPoint)(sentIncomplete)(expected)(received)(unknownCompleted)(receivedIncomplete)(dtxSelected); } struct Handler { void clusterConnectionSessionState( const SequenceNo& replayStart_, const SequenceNo& commandPoint_, const SequenceSet& sentIncomplete_, const SequenceNo& expected_, const SequenceNo& received_, const SequenceSet& unknownCompleted_, const SequenceSet& receivedIncomplete_, Bit dtxSelected_ ); }; template void invoke(T& target)const { target.clusterConnectionSessionState(replayStart, commandPoint, sentIncomplete, expected, received, unknownCompleted, receivedIncomplete, dtxSelected ); } }; inline Packer serializable(SessionState& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const SessionState&); bool operator==(const SessionState&, const SessionState&); struct ShadowReady: public Control { Uint64 memberId; Uint64 connectionId; Str16 managementId; Str8 userName; Str32 fragment; Uint32 sendMax; static const char* NAME; static const uint8_t CODE=0x20; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit ShadowReady( Uint64 memberId_=Uint64(), Uint64 connectionId_=Uint64(), const Str16& managementId_=Str16(), const Str8& userName_=Str8(), const Str32& fragment_=Str32(), Uint32 sendMax_=Uint32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(memberId)(connectionId)(managementId)(userName)(fragment)(sendMax); } struct Handler { void clusterConnectionShadowReady( Uint64 memberId_, Uint64 connectionId_, const Str16& managementId_, const Str8& userName_, const Str32& fragment_, Uint32 sendMax_ ); }; template void invoke(T& target)const { target.clusterConnectionShadowReady(memberId, connectionId, managementId, userName, fragment, sendMax ); } }; inline Packer serializable(ShadowReady& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const ShadowReady&); bool operator==(const ShadowReady&, const ShadowReady&); struct Membership: public Control { Map joiners; Map members; SequenceNo frameSeq; static const char* NAME; static const uint8_t CODE=0x21; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit Membership( const Map& joiners_=Map(), const Map& members_=Map(), const SequenceNo& frameSeq_=SequenceNo() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(joiners)(members)(frameSeq); } struct Handler { void clusterConnectionMembership( const Map& joiners_, const Map& members_, const SequenceNo& frameSeq_ ); }; template void invoke(T& target)const { target.clusterConnectionMembership(joiners, members, frameSeq ); } }; inline Packer serializable(Membership& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Membership&); bool operator==(const Membership&, const Membership&); struct RetractOffer: public Control { static const char* NAME; static const uint8_t CODE=0x22; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit RetractOffer(); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S&) {} struct Handler { void clusterConnectionRetractOffer( ); }; template void invoke(T& target)const { target.clusterConnectionRetractOffer( ); } }; inline Packer serializable(RetractOffer& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const RetractOffer&); bool operator==(const RetractOffer&, const RetractOffer&); struct QueuePosition: public Control { Str8 queue; SequenceNo position; static const char* NAME; static const uint8_t CODE=0x30; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit QueuePosition( const Str8& queue_=Str8(), const SequenceNo& position_=SequenceNo() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(position); } struct Handler { void clusterConnectionQueuePosition( const Str8& queue_, const SequenceNo& position_ ); }; template void invoke(T& target)const { target.clusterConnectionQueuePosition(queue, position ); } }; inline Packer serializable(QueuePosition& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const QueuePosition&); bool operator==(const QueuePosition&, const QueuePosition&); struct Exchange: public Control { Str32 encoded; static const char* NAME; static const uint8_t CODE=0x31; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit Exchange(const Str32& encoded_=Str32()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(encoded); } struct Handler { void clusterConnectionExchange( const Str32& encoded_ ); }; template void invoke(T& target)const { target.clusterConnectionExchange(encoded ); } }; inline Packer serializable(Exchange& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Exchange&); bool operator==(const Exchange&, const Exchange&); struct AddQueueListener: public Control { Str8 queue; Uint32 consumer; static const char* NAME; static const uint8_t CODE=0x34; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit AddQueueListener( const Str8& queue_=Str8(), Uint32 consumer_=Uint32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(consumer); } struct Handler { void clusterConnectionAddQueueListener( const Str8& queue_, Uint32 consumer_ ); }; template void invoke(T& target)const { target.clusterConnectionAddQueueListener(queue, consumer ); } }; inline Packer serializable(AddQueueListener& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const AddQueueListener&); bool operator==(const AddQueueListener&, const AddQueueListener&); struct ManagementSetupState: public Control { Uint64 objectNum; Uint16 bootSequence; Uuid brokerId; Str32 vendor; Str32 product; Str32 instance; static const char* NAME; static const uint8_t CODE=0x36; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit ManagementSetupState( Uint64 objectNum_=Uint64(), Uint16 bootSequence_=Uint16(), const Uuid& brokerId_=Uuid(), const Str32& vendor_=Str32(), const Str32& product_=Str32(), const Str32& instance_=Str32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(objectNum)(bootSequence)(brokerId)(vendor)(product)(instance); } struct Handler { void clusterConnectionManagementSetupState( Uint64 objectNum_, Uint16 bootSequence_, const Uuid& brokerId_, const Str32& vendor_, const Str32& product_, const Str32& instance_ ); }; template void invoke(T& target)const { target.clusterConnectionManagementSetupState(objectNum, bootSequence, brokerId, vendor, product, instance ); } }; inline Packer serializable(ManagementSetupState& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const ManagementSetupState&); bool operator==(const ManagementSetupState&, const ManagementSetupState&); struct Config: public Control { Str32 encoded; static const char* NAME; static const uint8_t CODE=0x37; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit Config(const Str32& encoded_=Str32()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(encoded); } struct Handler { void clusterConnectionConfig( const Str32& encoded_ ); }; template void invoke(T& target)const { target.clusterConnectionConfig(encoded ); } }; inline Packer serializable(Config& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Config&); bool operator==(const Config&, const Config&); struct QueueFairshareState: public Control { Str8 queue; Uint8 position; Uint8 count; static const char* NAME; static const uint8_t CODE=0x38; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit QueueFairshareState( const Str8& queue_=Str8(), Uint8 position_=Uint8(), Uint8 count_=Uint8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(position)(count); } struct Handler { void clusterConnectionQueueFairshareState( const Str8& queue_, Uint8 position_, Uint8 count_ ); }; template void invoke(T& target)const { target.clusterConnectionQueueFairshareState(queue, position, count ); } }; inline Packer serializable(QueueFairshareState& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const QueueFairshareState&); bool operator==(const QueueFairshareState&, const QueueFairshareState&); struct QueueObserverState: public Control { Str8 queue; Str8 observerId; Map state; static const char* NAME; static const uint8_t CODE=0x39; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit QueueObserverState( const Str8& queue_=Str8(), const Str8& observerId_=Str8(), const Map& state_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(observerId)(state); } struct Handler { void clusterConnectionQueueObserverState( const Str8& queue_, const Str8& observerId_, const Map& state_ ); }; template void invoke(T& target)const { target.clusterConnectionQueueObserverState(queue, observerId, state ); } }; inline Packer serializable(QueueObserverState& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const QueueObserverState&); bool operator==(const QueueObserverState&, const QueueObserverState&); struct Clock: public Control { Uint64 time; static const char* NAME; static const uint8_t CODE=0x40; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit Clock(Uint64 time_=Uint64()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(time); } struct Handler { void clusterConnectionClock( Uint64 time_ ); }; template void invoke(T& target)const { target.clusterConnectionClock(time ); } }; inline Packer serializable(Clock& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const Clock&); bool operator==(const Clock&, const Clock&); struct QueueDequeueSincePurgeState: public Control { Str8 queue; Uint32 dequeueSincePurge; static const char* NAME; static const uint8_t CODE=0x41; static const uint8_t CLASS_CODE=cluster_connection::CODE; static const char* CLASS_NAME; explicit QueueDequeueSincePurgeState( const Str8& queue_=Str8(), Uint32 dequeueSincePurge_=Uint32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(dequeueSincePurge); } struct Handler { void clusterConnectionQueueDequeueSincePurgeState( const Str8& queue_, Uint32 dequeueSincePurge_ ); }; template void invoke(T& target)const { target.clusterConnectionQueueDequeueSincePurgeState(queue, dequeueSincePurge ); } }; inline Packer serializable(QueueDequeueSincePurgeState& x) { return Packer(x); } std::ostream& operator << (std::ostream&, const QueueDequeueSincePurgeState&); bool operator==(const QueueDequeueSincePurgeState&, const QueueDequeueSincePurgeState&); } // namespace cluster_connection }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_SPECIFICATION_H*/ qpidc-0.16/src/qpid/amqp_0_10/Struct.h0000664000076400007640000000330611227113407017772 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_STRUCT_H #define QPID_AMQP_0_10_STRUCT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/built_in_types.h" #include namespace qpid { namespace amqp_0_10 { // Base classes for complex types. template struct Visitable { typedef V Visitor; typedef CV ConstVisitor; typedef H Holder; virtual ~Visitable() {} virtual void accept(Visitor&) = 0; virtual void accept(ConstVisitor&) const = 0; }; // Note: only coded structs inherit from Struct. struct StructVisitor; struct ConstStructVisitor; struct StructHolder; struct Struct : public Visitable { uint8_t getCode() const; uint8_t getPack() const; uint8_t getSize() const; uint8_t getClassCode() const; }; std::ostream& operator<<(std::ostream&, const Struct&); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_STRUCT_H*/ qpidc-0.16/src/qpid/amqp_0_10/apply.h0000664000076400007640000000545410765601766017661 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_APPLY_H #define QPID_AMQP_0_10_APPLY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace amqp_0_10 { template struct FunctionAndResult { F* functor; boost::optional result; FunctionAndResult() : functor(0) {} template void invoke(T& t) { result=(*functor)(t); } template void invoke(const T& t) { result=(*functor)(t); } R getResult() { return *result; } }; // void result is special case. template struct FunctionAndResult { F* functor; FunctionAndResult() : functor(0) {} template void invoke(T& t) { (*functor)(t); } void getResult() {} }; // Metafunction returning correct abstract visitor for Visitable type. template struct VisitorType { typedef typename Visitable::Visitor type; }; template struct VisitorType { typedef typename Visitable::ConstVisitor type; }; template struct ApplyVisitorBase : public Visitor, public FunctionAndResult {}; // Specialize for each visitor type template struct ApplyVisitor; /** Apply a functor to a visitable object. * The functor can have operator() overloads for each visitable type * and/or templated operator(). */ template typename F::result_type apply(F& functor, Visitable& visitable) { ApplyVisitor::type, F> visitor; visitor.functor=&functor; visitable.accept(visitor); return visitor.getResult(); } template typename F::result_type apply(const F& functor, Visitable& visitable) { ApplyVisitor::type, const F> visitor; visitor.functor=&functor; visitable.accept(visitor); return visitor.getResult(); } template struct ApplyFunctor { typedef R result_type; }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_APPLY_H*/ qpidc-0.16/src/qpid/amqp_0_10/exceptions.h0000664000076400007640000003036111752725700020700 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_EXCEPTIONS_H #define QPID_AMQP_0_10_EXCEPTIONS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/Exception.h" namespace qpid { namespace amqp_0_10 { /** * * The client attempted to work with a server entity to which it has no access due to * security settings. * */ struct UnauthorizedAccessException: public SessionAbortedException { UnauthorizedAccessException(const std::string& msg=std::string()) : SessionAbortedException(execution::UNAUTHORIZED_ACCESS, msg) {} protected: std::string getPrefix() const { return "UnauthorizedAccessException"; } }; /** * * The client attempted to work with a server entity that does not exist. * */ struct NotFoundException: public SessionAbortedException { NotFoundException(const std::string& msg=std::string()) : SessionAbortedException(execution::NOT_FOUND, msg) {} protected: std::string getPrefix() const { return "NotFoundException"; } }; /** * * The client attempted to work with a server entity to which it has no access because * another client is working with it. * */ struct ResourceLockedException: public SessionAbortedException { ResourceLockedException(const std::string& msg=std::string()) : SessionAbortedException(execution::RESOURCE_LOCKED, msg) {} protected: std::string getPrefix() const { return "ResourceLockedException"; } }; /** * * The client requested a command that was not allowed because some precondition failed. * */ struct PreconditionFailedException: public SessionAbortedException { PreconditionFailedException(const std::string& msg=std::string()) : SessionAbortedException(execution::PRECONDITION_FAILED, msg) {} protected: std::string getPrefix() const { return "PreconditionFailedException"; } }; /** * * A server entity the client is working with has been deleted. * */ struct ResourceDeletedException: public SessionAbortedException { ResourceDeletedException(const std::string& msg=std::string()) : SessionAbortedException(execution::RESOURCE_DELETED, msg) {} protected: std::string getPrefix() const { return "ResourceDeletedException"; } }; /** * * The peer sent a command that is not permitted in the current state of the session. * */ struct IllegalStateException: public SessionAbortedException { IllegalStateException(const std::string& msg=std::string()) : SessionAbortedException(execution::ILLEGAL_STATE, msg) {} protected: std::string getPrefix() const { return "IllegalStateException"; } }; /** * * The command segments could not be decoded. * */ struct CommandInvalidException: public SessionAbortedException { CommandInvalidException(const std::string& msg=std::string()) : SessionAbortedException(execution::COMMAND_INVALID, msg) {} protected: std::string getPrefix() const { return "CommandInvalidException"; } }; /** * * The client exceeded its resource allocation. * */ struct ResourceLimitExceededException: public SessionAbortedException { ResourceLimitExceededException(const std::string& msg=std::string()) : SessionAbortedException(execution::RESOURCE_LIMIT_EXCEEDED, msg) {} protected: std::string getPrefix() const { return "ResourceLimitExceededException"; } }; /** * * The peer tried to use a command a manner that is inconsistent with the rules described * in the specification. * */ struct NotAllowedException: public SessionAbortedException { NotAllowedException(const std::string& msg=std::string()) : SessionAbortedException(execution::NOT_ALLOWED, msg) {} protected: std::string getPrefix() const { return "NotAllowedException"; } }; /** * * The command argument is malformed, i.e. it does not fall within the specified domain. * The illegal-argument exception can be raised on execution of any command which has * domain valued fields. * */ struct IllegalArgumentException: public SessionAbortedException { IllegalArgumentException(const std::string& msg=std::string()) : SessionAbortedException(execution::ILLEGAL_ARGUMENT, msg) {} protected: std::string getPrefix() const { return "IllegalArgumentException"; } }; /** * * The peer tried to use functionality that is not implemented in its partner. * */ struct NotImplementedException: public SessionAbortedException { NotImplementedException(const std::string& msg=std::string()) : SessionAbortedException(execution::NOT_IMPLEMENTED, msg) {} protected: std::string getPrefix() const { return "NotImplementedException"; } }; /** * * The peer could not complete the command because of an internal error. The peer may * require intervention by an operator in order to resume normal operations. * */ struct InternalErrorException: public SessionAbortedException { InternalErrorException(const std::string& msg=std::string()) : SessionAbortedException(execution::INTERNAL_ERROR, msg) {} protected: std::string getPrefix() const { return "InternalErrorException"; } }; /** * * An invalid argument was passed to a command, and the operation could not * proceed. An invalid argument is not illegal (see illegal-argument), i.e. it matches * the domain definition; however the particular value is invalid in this context. * */ struct InvalidArgumentException: public SessionAbortedException { InvalidArgumentException(const std::string& msg=std::string()) : SessionAbortedException(execution::INVALID_ARGUMENT, msg) {} protected: std::string getPrefix() const { return "InvalidArgumentException"; } }; /** * * The session was detached by request. * */ struct NormalDetachedException: public SessionDetachedException { NormalDetachedException(const std::string& msg=std::string()) : SessionDetachedException(session::NORMAL, msg) {} protected: std::string getPrefix() const { return "NormalDetachedException"; } }; /** * * The session is currently attached to another transport. * */ struct SessionBusyDetachedException: public SessionDetachedException { SessionBusyDetachedException(const std::string& msg=std::string()) : SessionDetachedException(session::SESSION_BUSY, msg) {} protected: std::string getPrefix() const { return "SessionBusyDetachedException"; } }; /** * * The transport is currently attached to another session. * */ struct TransportBusyDetachedException: public SessionDetachedException { TransportBusyDetachedException(const std::string& msg=std::string()) : SessionDetachedException(session::TRANSPORT_BUSY, msg) {} protected: std::string getPrefix() const { return "TransportBusyDetachedException"; } }; /** * * The transport is not currently attached to any session. * */ struct NotAttachedDetachedException: public SessionDetachedException { NotAttachedDetachedException(const std::string& msg=std::string()) : SessionDetachedException(session::NOT_ATTACHED, msg) {} protected: std::string getPrefix() const { return "NotAttachedDetachedException"; } }; /** * * Command data was received prior to any use of the command-point control. * */ struct UnknownIdsDetachedException: public SessionDetachedException { UnknownIdsDetachedException(const std::string& msg=std::string()) : SessionDetachedException(session::UNKNOWN_IDS, msg) {} protected: std::string getPrefix() const { return "UnknownIdsDetachedException"; } }; /** * * The session was detached by request. * */ struct NormalExpiredException: public SessionExpiredException { NormalExpiredException(const std::string& msg=std::string()) : SessionExpiredException(session::NORMAL, msg) {} protected: std::string getPrefix() const { return "NormalExpiredException"; } }; /** * * The session is currently attached to another transport. * */ struct SessionBusyExpiredException: public SessionExpiredException { SessionBusyExpiredException(const std::string& msg=std::string()) : SessionExpiredException(session::SESSION_BUSY, msg) {} protected: std::string getPrefix() const { return "SessionBusyExpiredException"; } }; /** * * The transport is currently attached to another session. * */ struct TransportBusyExpiredException: public SessionExpiredException { TransportBusyExpiredException(const std::string& msg=std::string()) : SessionExpiredException(session::TRANSPORT_BUSY, msg) {} protected: std::string getPrefix() const { return "TransportBusyExpiredException"; } }; /** * * The transport is not currently attached to any session. * */ struct NotAttachedExpiredException: public SessionExpiredException { NotAttachedExpiredException(const std::string& msg=std::string()) : SessionExpiredException(session::NOT_ATTACHED, msg) {} protected: std::string getPrefix() const { return "NotAttachedExpiredException"; } }; /** * * Command data was received prior to any use of the command-point control. * */ struct UnknownIdsExpiredException: public SessionExpiredException { UnknownIdsExpiredException(const std::string& msg=std::string()) : SessionExpiredException(session::UNKNOWN_IDS, msg) {} protected: std::string getPrefix() const { return "UnknownIdsExpiredException"; } }; /** * * The connection closed normally. * */ struct NormalException: public ConnectionException { NormalException(const std::string& msg=std::string()) : ConnectionException(connection::NORMAL, msg) {} protected: std::string getPrefix() const { return "NormalException"; } }; /** * * An operator intervened to close the connection for some reason. The client may retry at * some later date. * */ struct ConnectionForcedException: public ConnectionException { ConnectionForcedException(const std::string& msg=std::string()) : ConnectionException(connection::CONNECTION_FORCED, msg) {} protected: std::string getPrefix() const { return "ConnectionForcedException"; } }; /** * * The client tried to work with an unknown virtual host. * */ struct InvalidPathException: public ConnectionException { InvalidPathException(const std::string& msg=std::string()) : ConnectionException(connection::INVALID_PATH, msg) {} protected: std::string getPrefix() const { return "InvalidPathException"; } }; /** * * A valid frame header cannot be formed from the incoming byte stream. * */ struct FramingErrorException: public ConnectionException { FramingErrorException(const std::string& msg=std::string()) : ConnectionException(connection::FRAMING_ERROR, msg) {} protected: std::string getPrefix() const { return "FramingErrorException"; } }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_EXCEPTIONS_H*/ qpidc-0.16/src/qpid/amqp_0_10/Connection.cpp0000664000076400007640000001235311716742000021142 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Connection.h" #include "qpid/log/Statement.h" #include "qpid/amqp_0_10/exceptions.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/ProtocolInitiation.h" namespace qpid { namespace amqp_0_10 { using sys::Mutex; Connection::Connection(sys::OutputControl& o, const std::string& id, bool _isClient) : pushClosed(false), popClosed(false), output(o), identifier(id), initialized(false), isClient(_isClient), buffered(0), version(0,10) {} void Connection::setInputHandler(std::auto_ptr c) { connection = c; } size_t Connection::decode(const char* buffer, size_t size) { framing::Buffer in(const_cast(buffer), size); if (isClient && !initialized) { //read in protocol header framing::ProtocolInitiation pi; if (pi.decode(in)) { if(!(pi==version)) throw Exception(QPID_MSG("Unsupported version: " << pi << " supported version " << version)); QPID_LOG(trace, "RECV [" << identifier << "]: INIT(" << pi << ")"); } initialized = true; } framing::AMQFrame frame; while(frame.decode(in)) { QPID_LOG(trace, "RECV [" << identifier << "]: " << frame); connection->received(frame); } return in.getPosition(); } bool Connection::canEncode() { Mutex::ScopedLock l(frameQueueLock); if (!popClosed) { Mutex::ScopedUnlock u(frameQueueLock); connection->doOutput(); } return !popClosed && ((!isClient && !initialized) || !frameQueue.empty()); } bool Connection::isClosed() const { Mutex::ScopedLock l(frameQueueLock); return pushClosed && popClosed; } size_t Connection::encode(const char* buffer, size_t size) { { // Swap frameQueue data into workQueue to avoid holding lock while we encode. Mutex::ScopedLock l(frameQueueLock); if (popClosed) return 0; // Can't pop any more frames. assert(workQueue.empty()); workQueue.swap(frameQueue); } framing::Buffer out(const_cast(buffer), size); if (!isClient && !initialized) { framing::ProtocolInitiation pi(getVersion()); pi.encode(out); initialized = true; QPID_LOG(trace, "SENT [" << identifier << "]: INIT(" << pi << ")"); } size_t frameSize=0; size_t encoded=0; while (!workQueue.empty() && ((frameSize=workQueue.front().encodedSize()) <= out.available())) { workQueue.front().encode(out); QPID_LOG(trace, "SENT [" << identifier << "]: " << workQueue.front()); workQueue.pop_front(); encoded += frameSize; if (workQueue.empty() && out.available() > 0) { // try to get more output connection->doOutput(); Mutex::ScopedLock l(frameQueueLock); workQueue.swap(frameQueue); // Need to get any new frames into the work queue } } assert(workQueue.empty() || workQueue.front().encodedSize() <= size); if (!workQueue.empty() && workQueue.front().encodedSize() > size) throw InternalErrorException(QPID_MSG("Frame too large for buffer.")); { Mutex::ScopedLock l(frameQueueLock); buffered -= encoded; // Put back any frames we did not encode. frameQueue.insert(frameQueue.begin(), workQueue.begin(), workQueue.end()); workQueue.clear(); if (frameQueue.empty() && pushClosed) popClosed = true; } return out.getPosition(); } void Connection::abort() { output.abort(); } void Connection::activateOutput() { output.activateOutput(); } void Connection::giveReadCredit(int32_t credit) { output.giveReadCredit(credit); } void Connection::close() { // No more frames can be pushed onto the queue. // Frames aleady on the queue can be popped. Mutex::ScopedLock l(frameQueueLock); pushClosed = true; } void Connection::closed() { connection->closed(); } void Connection::send(framing::AMQFrame& f) { { Mutex::ScopedLock l(frameQueueLock); if (!pushClosed) frameQueue.push_back(f); buffered += f.encodedSize(); } activateOutput(); } framing::ProtocolVersion Connection::getVersion() const { return version; } void Connection::setVersion(const framing::ProtocolVersion& v) { version = v; } size_t Connection::getBuffered() const { Mutex::ScopedLock l(frameQueueLock); return buffered; } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/UnknownStruct.h0000664000076400007640000000336011001416137021346 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_UNKNOWNSTRUCT_H #define QPID_AMQP_0_10_UNKNOWNSTRUCT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Struct.h" #include namespace qpid { namespace amqp_0_10 { class UnknownStruct : public Struct { public: static const uint8_t SIZE=4; static const uint8_t PACK=2; template void serialize(S& s) { s.split(*this); s(data.begin(), data.end()); } template void encode(S&) const { } template void decode(S& s) { data.resize(s.bytesRemaining()); } UnknownStruct(uint8_t cc=0, uint8_t c=0) : classCode(cc), code(c) {} void accept(Visitor&); void accept(ConstVisitor&) const; uint8_t getClassCode() const { return classCode; } uint8_t getCode() const { return code; } private: uint8_t classCode, code; std::string data; }; std::ostream& operator<<(std::ostream&, const UnknownStruct&); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_UNKNOWNSTRUCT_H*/ qpidc-0.16/src/qpid/amqp_0_10/ControlHolder.h0000664000076400007640000002356211752725700021302 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_CONTROLHOLDER_H #define QPID_AMQP_0_10_CONTROLHOLDER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/ApplyControl.h" #include "qpid/amqp_0_10/Holder.h" #include "qpid/amqp_0_10/specification.h" namespace qpid { namespace amqp_0_10 { namespace control_max { static const size_t MAX000=0; static const size_t MAX001 = sizeof(connection::Start) > MAX000 ? sizeof(connection::Start) : MAX000; static const size_t MAX002 = sizeof(connection::StartOk) > MAX001 ? sizeof(connection::StartOk) : MAX001; static const size_t MAX003 = sizeof(connection::Secure) > MAX002 ? sizeof(connection::Secure) : MAX002; static const size_t MAX004 = sizeof(connection::SecureOk) > MAX003 ? sizeof(connection::SecureOk) : MAX003; static const size_t MAX005 = sizeof(connection::Tune) > MAX004 ? sizeof(connection::Tune) : MAX004; static const size_t MAX006 = sizeof(connection::TuneOk) > MAX005 ? sizeof(connection::TuneOk) : MAX005; static const size_t MAX007 = sizeof(connection::Open) > MAX006 ? sizeof(connection::Open) : MAX006; static const size_t MAX008 = sizeof(connection::OpenOk) > MAX007 ? sizeof(connection::OpenOk) : MAX007; static const size_t MAX009 = sizeof(connection::Redirect) > MAX008 ? sizeof(connection::Redirect) : MAX008; static const size_t MAX010 = sizeof(connection::Heartbeat) > MAX009 ? sizeof(connection::Heartbeat) : MAX009; static const size_t MAX011 = sizeof(connection::Close) > MAX010 ? sizeof(connection::Close) : MAX010; static const size_t MAX012 = sizeof(connection::CloseOk) > MAX011 ? sizeof(connection::CloseOk) : MAX011; static const size_t MAX013 = sizeof(session::Attach) > MAX012 ? sizeof(session::Attach) : MAX012; static const size_t MAX014 = sizeof(session::Attached) > MAX013 ? sizeof(session::Attached) : MAX013; static const size_t MAX015 = sizeof(session::Detach) > MAX014 ? sizeof(session::Detach) : MAX014; static const size_t MAX016 = sizeof(session::Detached) > MAX015 ? sizeof(session::Detached) : MAX015; static const size_t MAX017 = sizeof(session::RequestTimeout) > MAX016 ? sizeof(session::RequestTimeout) : MAX016; static const size_t MAX018 = sizeof(session::Timeout) > MAX017 ? sizeof(session::Timeout) : MAX017; static const size_t MAX019 = sizeof(session::CommandPoint) > MAX018 ? sizeof(session::CommandPoint) : MAX018; static const size_t MAX020 = sizeof(session::Expected) > MAX019 ? sizeof(session::Expected) : MAX019; static const size_t MAX021 = sizeof(session::Confirmed) > MAX020 ? sizeof(session::Confirmed) : MAX020; static const size_t MAX022 = sizeof(session::Completed) > MAX021 ? sizeof(session::Completed) : MAX021; static const size_t MAX023 = sizeof(session::KnownCompleted) > MAX022 ? sizeof(session::KnownCompleted) : MAX022; static const size_t MAX024 = sizeof(session::Flush) > MAX023 ? sizeof(session::Flush) : MAX023; static const size_t MAX025 = sizeof(session::Gap) > MAX024 ? sizeof(session::Gap) : MAX024; static const size_t MAX026 = sizeof(cluster::UpdateRequest) > MAX025 ? sizeof(cluster::UpdateRequest) : MAX025; static const size_t MAX027 = sizeof(cluster::UpdateOffer) > MAX026 ? sizeof(cluster::UpdateOffer) : MAX026; static const size_t MAX028 = sizeof(cluster::RetractOffer) > MAX027 ? sizeof(cluster::RetractOffer) : MAX027; static const size_t MAX029 = sizeof(cluster::InitialStatus) > MAX028 ? sizeof(cluster::InitialStatus) : MAX028; static const size_t MAX030 = sizeof(cluster::Ready) > MAX029 ? sizeof(cluster::Ready) : MAX029; static const size_t MAX031 = sizeof(cluster::ConfigChange) > MAX030 ? sizeof(cluster::ConfigChange) : MAX030; static const size_t MAX032 = sizeof(cluster::ErrorCheck) > MAX031 ? sizeof(cluster::ErrorCheck) : MAX031; static const size_t MAX033 = sizeof(cluster::TimerWakeup) > MAX032 ? sizeof(cluster::TimerWakeup) : MAX032; static const size_t MAX034 = sizeof(cluster::TimerDrop) > MAX033 ? sizeof(cluster::TimerDrop) : MAX033; static const size_t MAX035 = sizeof(cluster::Shutdown) > MAX034 ? sizeof(cluster::Shutdown) : MAX034; static const size_t MAX036 = sizeof(cluster::DeliverToQueue) > MAX035 ? sizeof(cluster::DeliverToQueue) : MAX035; static const size_t MAX037 = sizeof(cluster::Clock) > MAX036 ? sizeof(cluster::Clock) : MAX036; static const size_t MAX038 = sizeof(cluster-connection::Announce) > MAX037 ? sizeof(cluster-connection::Announce) : MAX037; static const size_t MAX039 = sizeof(cluster-connection::DeliverClose) > MAX038 ? sizeof(cluster-connection::DeliverClose) : MAX038; static const size_t MAX040 = sizeof(cluster-connection::DeliverDoOutput) > MAX039 ? sizeof(cluster-connection::DeliverDoOutput) : MAX039; static const size_t MAX041 = sizeof(cluster-connection::Abort) > MAX040 ? sizeof(cluster-connection::Abort) : MAX040; static const size_t MAX042 = sizeof(cluster-connection::ShadowSetUser) > MAX041 ? sizeof(cluster-connection::ShadowSetUser) : MAX041; static const size_t MAX043 = sizeof(cluster-connection::ShadowPrepare) > MAX042 ? sizeof(cluster-connection::ShadowPrepare) : MAX042; static const size_t MAX044 = sizeof(cluster-connection::ConsumerState) > MAX043 ? sizeof(cluster-connection::ConsumerState) : MAX043; static const size_t MAX045 = sizeof(cluster-connection::DeliveryRecord) > MAX044 ? sizeof(cluster-connection::DeliveryRecord) : MAX044; static const size_t MAX046 = sizeof(cluster-connection::TxStart) > MAX045 ? sizeof(cluster-connection::TxStart) : MAX045; static const size_t MAX047 = sizeof(cluster-connection::TxAccept) > MAX046 ? sizeof(cluster-connection::TxAccept) : MAX046; static const size_t MAX048 = sizeof(cluster-connection::TxDequeue) > MAX047 ? sizeof(cluster-connection::TxDequeue) : MAX047; static const size_t MAX049 = sizeof(cluster-connection::TxEnqueue) > MAX048 ? sizeof(cluster-connection::TxEnqueue) : MAX048; static const size_t MAX050 = sizeof(cluster-connection::TxPublish) > MAX049 ? sizeof(cluster-connection::TxPublish) : MAX049; static const size_t MAX051 = sizeof(cluster-connection::TxEnd) > MAX050 ? sizeof(cluster-connection::TxEnd) : MAX050; static const size_t MAX052 = sizeof(cluster-connection::AccumulatedAck) > MAX051 ? sizeof(cluster-connection::AccumulatedAck) : MAX051; static const size_t MAX053 = sizeof(cluster-connection::OutputTask) > MAX052 ? sizeof(cluster-connection::OutputTask) : MAX052; static const size_t MAX054 = sizeof(cluster-connection::DtxStart) > MAX053 ? sizeof(cluster-connection::DtxStart) : MAX053; static const size_t MAX055 = sizeof(cluster-connection::DtxEnd) > MAX054 ? sizeof(cluster-connection::DtxEnd) : MAX054; static const size_t MAX056 = sizeof(cluster-connection::DtxAck) > MAX055 ? sizeof(cluster-connection::DtxAck) : MAX055; static const size_t MAX057 = sizeof(cluster-connection::DtxBufferRef) > MAX056 ? sizeof(cluster-connection::DtxBufferRef) : MAX056; static const size_t MAX058 = sizeof(cluster-connection::DtxWorkRecord) > MAX057 ? sizeof(cluster-connection::DtxWorkRecord) : MAX057; static const size_t MAX059 = sizeof(cluster-connection::SessionState) > MAX058 ? sizeof(cluster-connection::SessionState) : MAX058; static const size_t MAX060 = sizeof(cluster-connection::ShadowReady) > MAX059 ? sizeof(cluster-connection::ShadowReady) : MAX059; static const size_t MAX061 = sizeof(cluster-connection::Membership) > MAX060 ? sizeof(cluster-connection::Membership) : MAX060; static const size_t MAX062 = sizeof(cluster-connection::RetractOffer) > MAX061 ? sizeof(cluster-connection::RetractOffer) : MAX061; static const size_t MAX063 = sizeof(cluster-connection::QueuePosition) > MAX062 ? sizeof(cluster-connection::QueuePosition) : MAX062; static const size_t MAX064 = sizeof(cluster-connection::Exchange) > MAX063 ? sizeof(cluster-connection::Exchange) : MAX063; static const size_t MAX065 = sizeof(cluster-connection::AddQueueListener) > MAX064 ? sizeof(cluster-connection::AddQueueListener) : MAX064; static const size_t MAX066 = sizeof(cluster-connection::ManagementSetupState) > MAX065 ? sizeof(cluster-connection::ManagementSetupState) : MAX065; static const size_t MAX067 = sizeof(cluster-connection::Config) > MAX066 ? sizeof(cluster-connection::Config) : MAX066; static const size_t MAX068 = sizeof(cluster-connection::QueueFairshareState) > MAX067 ? sizeof(cluster-connection::QueueFairshareState) : MAX067; static const size_t MAX069 = sizeof(cluster-connection::QueueObserverState) > MAX068 ? sizeof(cluster-connection::QueueObserverState) : MAX068; static const size_t MAX070 = sizeof(cluster-connection::Clock) > MAX069 ? sizeof(cluster-connection::Clock) : MAX069; static const size_t MAX071 = sizeof(cluster-connection::QueueDequeueSincePurgeState) > MAX070 ? sizeof(cluster-connection::QueueDequeueSincePurgeState) : MAX070; static const int MAX=MAX071; } // namespace control_max struct ControlHolder: public amqp_0_10::Holder { ControlHolder() {} template explicit ControlHolder(const T& t) : amqp_0_10::Holder(t) {} using amqp_0_10::Holder::operator=; void set(uint8_t classCode, uint8_t code); }; std::ostream& operator<<(std::ostream& o, const ControlHolder& h); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_CONTROLHOLDER_H*/ qpidc-0.16/src/qpid/amqp_0_10/Unit.h0000664000076400007640000000521110777404752017441 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_UNIT_H #define QPID_AMQP_0_10_UNIT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/ControlHolder.h" #include "qpid/amqp_0_10/CommandHolder.h" #include "qpid/amqp_0_10/Header.h" #include "qpid/amqp_0_10/Body.h" #include "qpid/amqp_0_10/FrameHeader.h" #include #include namespace qpid { namespace amqp_0_10 { /** * A Unit contains a frame header and associated value. * For all types except BODY the frame header is for a complete segment. */ class Unit { public: explicit Unit(const FrameHeader& h=FrameHeader()) : header(h) { updateVariant(); } /** *@param flags: is ORed with the required flags for type T. */ template explicit Unit(const T& t, uint8_t flags=0) : variant(t) { updateHeader(flags); } void setHeader(FrameHeader& h) { header = h; updateVariant(); } const FrameHeader& getHeader() const { return header; } template const T* get() const { return boost::get(&variant); } template T* get() { return boost::get(&variant); } template Unit& operator=(const T& t) { variant=t; return *this; } template typename V::result_type applyVisitor(V& v) const { variant.apply_visitor(v); } template void serialize(S& s) { variant.apply_visitor(s); s.split(*this); } template void encode(S&) const {} template void decode(S&) { updateHeader(header.getFlags()); } private: typedef boost::variant Variant; void updateHeader(uint8_t flags); void updateVariant(); Variant variant; FrameHeader header; friend std::ostream& operator<<(std::ostream& o, const Unit& u); }; std::ostream& operator<<(std::ostream& o, const Unit& u); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_UNIT_H*/ qpidc-0.16/src/qpid/amqp_0_10/FrameHeader.cpp0000664000076400007640000000315711227113407021210 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/FrameHeader.h" #include #include #include using namespace std; namespace qpid { namespace amqp_0_10 { bool FrameHeader::operator==(const FrameHeader& x) const { return flags == x.flags && type == x.type && size == x.size && track == x.track && channel == x.channel; } std::ostream& operator<<(std::ostream& o, const FrameHeader& f) { std::ios::fmtflags saveFlags = o.flags(); return o << "Frame[" << "flags=" << std::hex << std::showbase << int(f.getFlags()) << std::setiosflags(saveFlags) << " type=" << f.getType() << " size=" << f.getSize() << " track=" << int(f.getTrack()) << " channel=" << f.getChannel() << "]"; } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/Decimal.h0000664000076400007640000000312110762101054020035 0ustar00jrossjross00000000000000#ifndef TESTS_DECIMAL_H #define TESTS_DECIMAL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace amqp_0_10 { template struct Decimal { E exponent; M mantissa; Decimal(E exp=0, M man=0) : exponent(exp), mantissa(man) {} bool operator==(const Decimal& d) const { return exponent == d.exponent && mantissa == d.mantissa; } // TODO aconway 2008-02-20: We could provide arithmetic operators // if anybody really cares about this type. template void serialize(S& s) { s(exponent)(mantissa); } }; template inline std::ostream& operator<<(std::ostream& o, const Decimal& d) { return o << "Decimal{" << d.mantissa << "/10^" << (int)d.exponent << "}"; } }} #endif /*!TESTS_DECIMAL_H*/ qpidc-0.16/src/qpid/amqp_0_10/Array.cpp0000664000076400007640000000220111227113407020110 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Array.h" namespace qpid { namespace amqp_0_10 { std::ostream& operator<<(std::ostream& o, const Array& a) { std::ostream_iterator i(o, " "); o << "Array<" << typeName(a.getType()) << "["; std::copy(a.begin(), a.end(), i); o << "]"; return o; } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/ProxyTemplate.h0000664000076400007640000007165511752725700021347 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_PROXYTEMPLATE_H #define QPID_AMQP_0_10_PROXYTEMPLATE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/specification.h" namespace qpid { namespace amqp_0_10 { template class QPID_COMMON_CLASS_EXTERN ProxyTemplate { public: ProxyTemplate(F f=F()) : functor(f) {} R connectionStart( const Map& serverProperties_, const Str16Array& mechanisms_, const Str16Array& locales_ ) { connection::Start start(serverProperties_, mechanisms_, locales_); return functor(start); } R connectionStartOk( const Map& clientProperties_, const Str8& mechanism_, const Vbin32& response_, const Str8& locale_ ) { connection::StartOk startOk(clientProperties_, mechanism_, response_, locale_); return functor(startOk); } R connectionSecure(const Vbin32& challenge_) { connection::Secure secure(challenge_); return functor(secure); } R connectionSecureOk(const Vbin32& response_) { connection::SecureOk secureOk(response_); return functor(secureOk); } R connectionTune( Uint16 channelMax_, Uint16 maxFrameSize_, Uint16 heartbeatMin_, Uint16 heartbeatMax_ ) { connection::Tune tune(channelMax_, maxFrameSize_, heartbeatMin_, heartbeatMax_); return functor(tune); } R connectionTuneOk( Uint16 channelMax_, Uint16 maxFrameSize_, Uint16 heartbeat_ ) { connection::TuneOk tuneOk(channelMax_, maxFrameSize_, heartbeat_); return functor(tuneOk); } R connectionOpen( const Str8& virtualHost_, const Str16Array& capabilities_, Bit insist_ ) { connection::Open open(virtualHost_, capabilities_, insist_); return functor(open); } R connectionOpenOk(const connection::AmqpHostArray& knownHosts_) { connection::OpenOk openOk(knownHosts_); return functor(openOk); } R connectionRedirect( const connection::AmqpHostUrl& host_, const connection::AmqpHostArray& knownHosts_ ) { connection::Redirect redirect(host_, knownHosts_); return functor(redirect); } R connectionHeartbeat() { connection::Heartbeat heartbeat; return functor(heartbeat); } R connectionClose( const connection::CloseCode& replyCode_, const Str8& replyText_ ) { connection::Close close(replyCode_, replyText_); return functor(close); } R connectionCloseOk() { connection::CloseOk closeOk; return functor(closeOk); } R sessionAttach( const session::Name& name_, Bit force_ ) { session::Attach attach(name_, force_); return functor(attach); } R sessionAttached(const session::Name& name_) { session::Attached attached(name_); return functor(attached); } R sessionDetach(const session::Name& name_) { session::Detach detach(name_); return functor(detach); } R sessionDetached( const session::Name& name_, const session::DetachCode& code_ ) { session::Detached detached(name_, code_); return functor(detached); } R sessionRequestTimeout(Uint32 timeout_) { session::RequestTimeout requestTimeout(timeout_); return functor(requestTimeout); } R sessionTimeout(Uint32 timeout_) { session::Timeout timeout(timeout_); return functor(timeout); } R sessionCommandPoint( const SequenceNo& commandId_, Uint64 commandOffset_ ) { session::CommandPoint commandPoint(commandId_, commandOffset_); return functor(commandPoint); } R sessionExpected( const session::Commands& commands_, const session::CommandFragments& fragments_ ) { session::Expected expected(commands_, fragments_); return functor(expected); } R sessionConfirmed( const session::Commands& commands_, const session::CommandFragments& fragments_ ) { session::Confirmed confirmed(commands_, fragments_); return functor(confirmed); } R sessionCompleted( const session::Commands& commands_, Bit timelyReply_ ) { session::Completed completed(commands_, timelyReply_); return functor(completed); } R sessionKnownCompleted(const session::Commands& commands_) { session::KnownCompleted knownCompleted(commands_); return functor(knownCompleted); } R sessionFlush( Bit expected_, Bit confirmed_, Bit completed_ ) { session::Flush flush(expected_, confirmed_, completed_); return functor(flush); } R sessionGap(const session::Commands& commands_) { session::Gap gap(commands_); return functor(gap); } R executionSync() { execution::Sync sync; return functor(sync); } R executionResult( const SequenceNo& commandId_, const Struct32& value_ ) { execution::Result result(commandId_, value_); return functor(result); } R executionException( const execution::ErrorCode& errorCode_, const SequenceNo& commandId_, Uint8 classCode_, Uint8 commandCode_, Uint8 fieldIndex_, const Str16& description_, const Map& errorInfo_ ) { execution::Exception exception(errorCode_, commandId_, classCode_, commandCode_, fieldIndex_, description_, errorInfo_); return functor(exception); } R messageTransfer( const message::Destination& destination_, const message::AcceptMode& acceptMode_, const message::AcquireMode& acquireMode_ ) { message::Transfer transfer(destination_, acceptMode_, acquireMode_); return functor(transfer); } R messageAccept(const session::Commands& transfers_) { message::Accept accept(transfers_); return functor(accept); } R messageReject( const session::Commands& transfers_, const message::RejectCode& code_, const Str8& text_ ) { message::Reject reject(transfers_, code_, text_); return functor(reject); } R messageRelease( const session::Commands& transfers_, Bit setRedelivered_ ) { message::Release release(transfers_, setRedelivered_); return functor(release); } R messageAcquire(const session::Commands& transfers_) { message::Acquire acquire(transfers_); return functor(acquire); } R messageResume( const message::Destination& destination_, const message::ResumeId& resumeId_ ) { message::Resume resume(destination_, resumeId_); return functor(resume); } R messageSubscribe( const queue::Name& queue_, const message::Destination& destination_, const message::AcceptMode& acceptMode_, const message::AcquireMode& acquireMode_, Bit exclusive_, const message::ResumeId& resumeId_, Uint64 resumeTtl_, const Map& arguments_ ) { message::Subscribe subscribe(queue_, destination_, acceptMode_, acquireMode_, exclusive_, resumeId_, resumeTtl_, arguments_); return functor(subscribe); } R messageCancel(const message::Destination& destination_) { message::Cancel cancel(destination_); return functor(cancel); } R messageSetFlowMode( const message::Destination& destination_, const message::FlowMode& flowMode_ ) { message::SetFlowMode setFlowMode(destination_, flowMode_); return functor(setFlowMode); } R messageFlow( const message::Destination& destination_, const message::CreditUnit& unit_, Uint32 value_ ) { message::Flow flow(destination_, unit_, value_); return functor(flow); } R messageFlush(const message::Destination& destination_) { message::Flush flush(destination_); return functor(flush); } R messageStop(const message::Destination& destination_) { message::Stop stop(destination_); return functor(stop); } R txSelect() { tx::Select select; return functor(select); } R txCommit() { tx::Commit commit; return functor(commit); } R txRollback() { tx::Rollback rollback; return functor(rollback); } R dtxSelect() { dtx::Select select; return functor(select); } R dtxStart( const dtx::Xid& xid_, Bit join_, Bit resume_ ) { dtx::Start start(xid_, join_, resume_); return functor(start); } R dtxEnd( const dtx::Xid& xid_, Bit fail_, Bit suspend_ ) { dtx::End end(xid_, fail_, suspend_); return functor(end); } R dtxCommit( const dtx::Xid& xid_, Bit onePhase_ ) { dtx::Commit commit(xid_, onePhase_); return functor(commit); } R dtxForget(const dtx::Xid& xid_) { dtx::Forget forget(xid_); return functor(forget); } R dtxGetTimeout(const dtx::Xid& xid_) { dtx::GetTimeout getTimeout(xid_); return functor(getTimeout); } R dtxPrepare(const dtx::Xid& xid_) { dtx::Prepare prepare(xid_); return functor(prepare); } R dtxRecover() { dtx::Recover recover; return functor(recover); } R dtxRollback(const dtx::Xid& xid_) { dtx::Rollback rollback(xid_); return functor(rollback); } R dtxSetTimeout( const dtx::Xid& xid_, Uint32 timeout_ ) { dtx::SetTimeout setTimeout(xid_, timeout_); return functor(setTimeout); } R exchangeDeclare( const exchange::Name& exchange_, const Str8& type_, const exchange::Name& alternateExchange_, Bit passive_, Bit durable_, Bit autoDelete_, const Map& arguments_ ) { exchange::Declare declare(exchange_, type_, alternateExchange_, passive_, durable_, autoDelete_, arguments_); return functor(declare); } R exchangeDelete( const exchange::Name& exchange_, Bit ifUnused_ ) { exchange::Delete delete_(exchange_, ifUnused_); return functor(delete_); } R exchangeQuery(const Str8& name_) { exchange::Query query(name_); return functor(query); } R exchangeBind( const queue::Name& queue_, const exchange::Name& exchange_, const Str8& bindingKey_, const Map& arguments_ ) { exchange::Bind bind(queue_, exchange_, bindingKey_, arguments_); return functor(bind); } R exchangeUnbind( const queue::Name& queue_, const exchange::Name& exchange_, const Str8& bindingKey_ ) { exchange::Unbind unbind(queue_, exchange_, bindingKey_); return functor(unbind); } R exchangeBound( const Str8& exchange_, const Str8& queue_, const Str8& bindingKey_, const Map& arguments_ ) { exchange::Bound bound(exchange_, queue_, bindingKey_, arguments_); return functor(bound); } R queueDeclare( const queue::Name& queue_, const exchange::Name& alternateExchange_, Bit passive_, Bit durable_, Bit exclusive_, Bit autoDelete_, const Map& arguments_ ) { queue::Declare declare(queue_, alternateExchange_, passive_, durable_, exclusive_, autoDelete_, arguments_); return functor(declare); } R queueDelete( const queue::Name& queue_, Bit ifUnused_, Bit ifEmpty_ ) { queue::Delete delete_(queue_, ifUnused_, ifEmpty_); return functor(delete_); } R queuePurge(const queue::Name& queue_) { queue::Purge purge(queue_); return functor(purge); } R queueQuery(const queue::Name& queue_) { queue::Query query(queue_); return functor(query); } R fileQos( Uint32 prefetchSize_, Uint16 prefetchCount_, Bit global_ ) { file::Qos qos(prefetchSize_, prefetchCount_, global_); return functor(qos); } R fileQosOk() { file::QosOk qosOk; return functor(qosOk); } R fileConsume( const queue::Name& queue_, const Str8& consumerTag_, Bit noLocal_, Bit noAck_, Bit exclusive_, Bit nowait_, const Map& arguments_ ) { file::Consume consume(queue_, consumerTag_, noLocal_, noAck_, exclusive_, nowait_, arguments_); return functor(consume); } R fileConsumeOk(const Str8& consumerTag_) { file::ConsumeOk consumeOk(consumerTag_); return functor(consumeOk); } R fileCancel(const Str8& consumerTag_) { file::Cancel cancel(consumerTag_); return functor(cancel); } R fileOpen( const Str8& identifier_, Uint64 contentSize_ ) { file::Open open(identifier_, contentSize_); return functor(open); } R fileOpenOk(Uint64 stagedSize_) { file::OpenOk openOk(stagedSize_); return functor(openOk); } R fileStage() { file::Stage stage; return functor(stage); } R filePublish( const exchange::Name& exchange_, const Str8& routingKey_, Bit mandatory_, Bit immediate_, const Str8& identifier_ ) { file::Publish publish(exchange_, routingKey_, mandatory_, immediate_, identifier_); return functor(publish); } R fileReturn( const file::ReturnCode& replyCode_, const Str8& replyText_, const exchange::Name& exchange_, const Str8& routingKey_ ) { file::Return return_(replyCode_, replyText_, exchange_, routingKey_); return functor(return_); } R fileDeliver( const Str8& consumerTag_, Uint64 deliveryTag_, Bit redelivered_, const exchange::Name& exchange_, const Str8& routingKey_, const Str8& identifier_ ) { file::Deliver deliver(consumerTag_, deliveryTag_, redelivered_, exchange_, routingKey_, identifier_); return functor(deliver); } R fileAck( Uint64 deliveryTag_, Bit multiple_ ) { file::Ack ack(deliveryTag_, multiple_); return functor(ack); } R fileReject( Uint64 deliveryTag_, Bit requeue_ ) { file::Reject reject(deliveryTag_, requeue_); return functor(reject); } R streamQos( Uint32 prefetchSize_, Uint16 prefetchCount_, Uint32 consumeRate_, Bit global_ ) { stream::Qos qos(prefetchSize_, prefetchCount_, consumeRate_, global_); return functor(qos); } R streamQosOk() { stream::QosOk qosOk; return functor(qosOk); } R streamConsume( const queue::Name& queue_, const Str8& consumerTag_, Bit noLocal_, Bit exclusive_, Bit nowait_, const Map& arguments_ ) { stream::Consume consume(queue_, consumerTag_, noLocal_, exclusive_, nowait_, arguments_); return functor(consume); } R streamConsumeOk(const Str8& consumerTag_) { stream::ConsumeOk consumeOk(consumerTag_); return functor(consumeOk); } R streamCancel(const Str8& consumerTag_) { stream::Cancel cancel(consumerTag_); return functor(cancel); } R streamPublish( const exchange::Name& exchange_, const Str8& routingKey_, Bit mandatory_, Bit immediate_ ) { stream::Publish publish(exchange_, routingKey_, mandatory_, immediate_); return functor(publish); } R streamReturn( const stream::ReturnCode& replyCode_, const Str8& replyText_, const exchange::Name& exchange_, const Str8& routingKey_ ) { stream::Return return_(replyCode_, replyText_, exchange_, routingKey_); return functor(return_); } R streamDeliver( const Str8& consumerTag_, Uint64 deliveryTag_, const exchange::Name& exchange_, const queue::Name& queue_ ) { stream::Deliver deliver(consumerTag_, deliveryTag_, exchange_, queue_); return functor(deliver); } R clusterUpdateRequest(const Str16& url_) { cluster::UpdateRequest updateRequest(url_); return functor(updateRequest); } R clusterUpdateOffer(Uint64 updatee_) { cluster::UpdateOffer updateOffer(updatee_); return functor(updateOffer); } R clusterRetractOffer(Uint64 updatee_) { cluster::RetractOffer retractOffer(updatee_); return functor(retractOffer); } R clusterInitialStatus( Uint32 version_, Bit active_, const Uuid& clusterId_, const cluster::StoreState& storeState_, const Uuid& shutdownId_, const Str16& firstConfig_, const ArrayDomain & urls_ ) { cluster::InitialStatus initialStatus(version_, active_, clusterId_, storeState_, shutdownId_, firstConfig_, urls_); return functor(initialStatus); } R clusterReady(const Str16& url_) { cluster::Ready ready(url_); return functor(ready); } R clusterConfigChange( const Vbin16& members_, const Vbin16& joined_, const Vbin16& left_ ) { cluster::ConfigChange configChange(members_, joined_, left_); return functor(configChange); } R clusterErrorCheck( const cluster::ErrorType& type_, const SequenceNo& frameSeq_ ) { cluster::ErrorCheck errorCheck(type_, frameSeq_); return functor(errorCheck); } R clusterTimerWakeup(const Str16& name_) { cluster::TimerWakeup timerWakeup(name_); return functor(timerWakeup); } R clusterTimerDrop(const Str16& name_) { cluster::TimerDrop timerDrop(name_); return functor(timerDrop); } R clusterShutdown(const Uuid& shutdownId_) { cluster::Shutdown shutdown(shutdownId_); return functor(shutdown); } R clusterDeliverToQueue( const Str16& queue_, const Vbin32& message_ ) { cluster::DeliverToQueue deliverToQueue(queue_, message_); return functor(deliverToQueue); } R clusterClock(Uint64 time_) { cluster::Clock clock(time_); return functor(clock); } R clusterConnectionAnnounce( const Str16& managementId_, Uint32 ssf_, const Str16& authid_, Bit nodict_, const Str32& username_, const Str32& initialFrames_ ) { cluster-connection::Announce announce(managementId_, ssf_, authid_, nodict_, username_, initialFrames_); return functor(announce); } R clusterConnectionDeliverClose() { cluster-connection::DeliverClose deliverClose; return functor(deliverClose); } R clusterConnectionDeliverDoOutput(Uint32 limit_) { cluster-connection::DeliverDoOutput deliverDoOutput(limit_); return functor(deliverDoOutput); } R clusterConnectionAbort() { cluster-connection::Abort abort; return functor(abort); } R clusterConnectionShadowSetUser(const Str16& userId_) { cluster-connection::ShadowSetUser shadowSetUser(userId_); return functor(shadowSetUser); } R clusterConnectionShadowPrepare(const Str16& managementId_) { cluster-connection::ShadowPrepare shadowPrepare(managementId_); return functor(shadowPrepare); } R clusterConnectionConsumerState( const Str8& name_, Bit blocked_, Bit notifyEnabled_, const SequenceNo& position_, Uint32 usedMsgCredit_, Uint32 usedByteCredit_ ) { cluster-connection::ConsumerState consumerState(name_, blocked_, notifyEnabled_, position_, usedMsgCredit_, usedByteCredit_); return functor(consumerState); } R clusterConnectionDeliveryRecord( const Str8& queue_, const SequenceNo& position_, const Str8& tag_, const SequenceNo& id_, Bit acquired_, Bit accepted_, Bit cancelled_, Bit completed_, Bit ended_, Bit windowing_, Bit enqueued_, Uint32 credit_ ) { cluster-connection::DeliveryRecord deliveryRecord(queue_, position_, tag_, id_, acquired_, accepted_, cancelled_, completed_, ended_, windowing_, enqueued_, credit_); return functor(deliveryRecord); } R clusterConnectionTxStart() { cluster-connection::TxStart txStart; return functor(txStart); } R clusterConnectionTxAccept(const SequenceSet& commands_) { cluster-connection::TxAccept txAccept(commands_); return functor(txAccept); } R clusterConnectionTxDequeue(const Str8& queue_) { cluster-connection::TxDequeue txDequeue(queue_); return functor(txDequeue); } R clusterConnectionTxEnqueue(const Str8& queue_) { cluster-connection::TxEnqueue txEnqueue(queue_); return functor(txEnqueue); } R clusterConnectionTxPublish( const ArrayDomain & queues_, Bit delivered_ ) { cluster-connection::TxPublish txPublish(queues_, delivered_); return functor(txPublish); } R clusterConnectionTxEnd() { cluster-connection::TxEnd txEnd; return functor(txEnd); } R clusterConnectionAccumulatedAck(const SequenceSet& commands_) { cluster-connection::AccumulatedAck accumulatedAck(commands_); return functor(accumulatedAck); } R clusterConnectionOutputTask( Uint16 channel_, const Str8& name_ ) { cluster-connection::OutputTask outputTask(channel_, name_); return functor(outputTask); } R clusterConnectionDtxStart( const Str16& xid_, Bit ended_, Bit suspended_, Bit failed_, Bit expired_ ) { cluster-connection::DtxStart dtxStart(xid_, ended_, suspended_, failed_, expired_); return functor(dtxStart); } R clusterConnectionDtxEnd() { cluster-connection::DtxEnd dtxEnd; return functor(dtxEnd); } R clusterConnectionDtxAck() { cluster-connection::DtxAck dtxAck; return functor(dtxAck); } R clusterConnectionDtxBufferRef( const Str16& xid_, Uint32 index_, Bit suspended_ ) { cluster-connection::DtxBufferRef dtxBufferRef(xid_, index_, suspended_); return functor(dtxBufferRef); } R clusterConnectionDtxWorkRecord( const Str16& xid_, Bit prepared_, Uint32 timeout_ ) { cluster-connection::DtxWorkRecord dtxWorkRecord(xid_, prepared_, timeout_); return functor(dtxWorkRecord); } R clusterConnectionSessionState( const SequenceNo& replayStart_, const SequenceNo& commandPoint_, const SequenceSet& sentIncomplete_, const SequenceNo& expected_, const SequenceNo& received_, const SequenceSet& unknownCompleted_, const SequenceSet& receivedIncomplete_, Bit dtxSelected_ ) { cluster-connection::SessionState sessionState(replayStart_, commandPoint_, sentIncomplete_, expected_, received_, unknownCompleted_, receivedIncomplete_, dtxSelected_); return functor(sessionState); } R clusterConnectionShadowReady( Uint64 memberId_, Uint64 connectionId_, const Str16& managementId_, const Str8& userName_, const Str32& fragment_, Uint32 sendMax_ ) { cluster-connection::ShadowReady shadowReady(memberId_, connectionId_, managementId_, userName_, fragment_, sendMax_); return functor(shadowReady); } R clusterConnectionMembership( const Map& joiners_, const Map& members_, const SequenceNo& frameSeq_ ) { cluster-connection::Membership membership(joiners_, members_, frameSeq_); return functor(membership); } R clusterConnectionRetractOffer() { cluster-connection::RetractOffer retractOffer; return functor(retractOffer); } R clusterConnectionQueuePosition( const Str8& queue_, const SequenceNo& position_ ) { cluster-connection::QueuePosition queuePosition(queue_, position_); return functor(queuePosition); } R clusterConnectionExchange(const Str32& encoded_) { cluster-connection::Exchange exchange(encoded_); return functor(exchange); } R clusterConnectionAddQueueListener( const Str8& queue_, Uint32 consumer_ ) { cluster-connection::AddQueueListener addQueueListener(queue_, consumer_); return functor(addQueueListener); } R clusterConnectionManagementSetupState( Uint64 objectNum_, Uint16 bootSequence_, const Uuid& brokerId_, const Str32& vendor_, const Str32& product_, const Str32& instance_ ) { cluster-connection::ManagementSetupState managementSetupState(objectNum_, bootSequence_, brokerId_, vendor_, product_, instance_); return functor(managementSetupState); } R clusterConnectionConfig(const Str32& encoded_) { cluster-connection::Config config(encoded_); return functor(config); } R clusterConnectionQueueFairshareState( const Str8& queue_, Uint8 position_, Uint8 count_ ) { cluster-connection::QueueFairshareState queueFairshareState(queue_, position_, count_); return functor(queueFairshareState); } R clusterConnectionQueueObserverState( const Str8& queue_, const Str8& observerId_, const Map& state_ ) { cluster-connection::QueueObserverState queueObserverState(queue_, observerId_, state_); return functor(queueObserverState); } R clusterConnectionClock(Uint64 time_) { cluster-connection::Clock clock(time_); return functor(clock); } R clusterConnectionQueueDequeueSincePurgeState( const Str8& queue_, Uint32 dequeueSincePurge_ ) { cluster-connection::QueueDequeueSincePurgeState queueDequeueSincePurgeState(queue_, dequeueSincePurge_); return functor(queueDequeueSincePurgeState); } private: F functor; }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_PROXYTEMPLATE_H*/ qpidc-0.16/src/qpid/amqp_0_10/SessionHandler.cpp0000664000076400007640000002642211706303201021761 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/SessionHandler.h" #include "qpid/SessionState.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/AllInvoker.h" #include "qpid/framing/enum.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace amqp_0_10 { using namespace framing; using namespace std; void SessionHandler::checkAttached() { if (!getState()) throw NotAttachedException(QPID_MSG("Channel " << channel.get() << " is not attached")); } SessionHandler::SessionHandler(FrameHandler* out, ChannelId ch) : channel(ch, out), peer(channel), awaitingDetached(false), sendReady(), receiveReady() {} SessionHandler::~SessionHandler() {} namespace { bool isSessionControl(AMQMethodBody* m) { return m && m->amqpClassId() == SESSION_CLASS_ID; } session::DetachCode convert(uint8_t code) { switch(code) { case 0: return session::DETACH_CODE_NORMAL; case 1: return session::DETACH_CODE_SESSION_BUSY; case 2: return session::DETACH_CODE_TRANSPORT_BUSY; case 3: return session::DETACH_CODE_NOT_ATTACHED; case 4: default: return session::DETACH_CODE_UNKNOWN_IDS; } } } // namespace void SessionHandler::invoke(const AMQMethodBody& m) { framing::invoke(*this, m); } void SessionHandler::handleIn(AMQFrame& f) { // Note on channel states: a channel is attached if session != 0 AMQMethodBody* m = f.getBody()->getMethod(); try { // Ignore all but detach controls while awaiting detach if (awaitingDetached) { if (!isSessionControl(m)) return; if (m->amqpMethodId() != SESSION_DETACH_METHOD_ID && m->amqpMethodId() != SESSION_DETACHED_METHOD_ID) return; } if (isSessionControl(m)) { invoke(*m); } else { // Drop frames if we are detached. if (!getState()) return; if (!receiveReady) throw IllegalStateException(QPID_MSG(getState()->getId() << ": Not ready to receive data")); if (!getState()->receiverRecord(f)) return; // Ignore duplicates. if (getState()->receiverNeedKnownCompleted()) sendCompletion(); getInHandler()->handle(f); } } catch(const SessionException& e) { QPID_LOG(error, "Execution exception: " << e.what()); executionException(e.code, e.what()); // Let subclass handle this first. framing::AMQP_AllProxy::Execution execution(channel); AMQMethodBody* m = f.getMethod(); SequenceNumber commandId; if (getState()) commandId = getState()->receiverGetCurrent(); execution.exception(e.code, commandId, m ? m->amqpClassId() : 0, m ? m->amqpMethodId() : 0, 0, e.what(), FieldTable()); detaching(); sendDetach(); } catch(const ChannelException& e){ QPID_LOG(error, "Channel exception: " << e.what()); channelException(e.code, e.what()); // Let subclass handle this first. peer.detached(name, e.code); } catch(const ConnectionException& e) { QPID_LOG(error, "Connection exception: " << e.what()); connectionException(e.code, e.getMessage()); } catch(const std::exception& e) { QPID_LOG(error, "Unexpected exception: " << e.what()); connectionException(connection::CLOSE_CODE_FRAMING_ERROR, e.what()); } } void SessionHandler::handleException(const qpid::SessionException& e) { QPID_LOG(error, "Execution exception (during output): " << e.what()); executionException(e.code, e.what()); // Let subclass handle this first. framing::AMQP_AllProxy::Execution execution(channel); execution.exception(e.code, 0, 0, 0, 0, e.what(), FieldTable()); detaching(); sendDetach(); } namespace { bool isCommand(const AMQFrame& f) { return f.getMethod() && f.getMethod()->type() == framing::SEGMENT_TYPE_COMMAND; } } // namespace void SessionHandler::handleOut(AMQFrame& f) { checkAttached(); if (!sendReady) throw IllegalStateException(QPID_MSG(getState()->getId() << ": Not ready to send data")); getState()->senderRecord(f); if (isCommand(f) && getState()->senderNeedFlush()) { peer.flush(false, false, true); getState()->senderRecordFlush(); } channel.handle(f); } void SessionHandler::attach(const std::string& name_, bool force) { // Save the name for possible session-busy exception. Session-busy // can be thrown before we have attached the handler to a valid // SessionState, and in that case we need the name to send peer.detached name = name_; if (getState() && name == getState()->getId().getName()) return; // Idempotent if (getState()) throw TransportBusyException( QPID_MSG("Channel " << channel.get() << " already attached to " << getState()->getId())); setState(name, force); QPID_LOG(debug, "Attached channel " << channel.get() << " to " << getState()->getId()); peer.attached(name); if (getState()->hasState()) peer.flush(true, true, true); else sendCommandPoint(getState()->senderGetCommandPoint()); } #define CHECK_NAME(NAME, MSG) do { \ checkAttached(); \ if (NAME != getState()->getId().getName()) \ throw InvalidArgumentException( \ QPID_MSG(MSG << ": incorrect session name: " << NAME \ << ", expecting: " << getState()->getId().getName())); \ } while(0) void SessionHandler::attached(const std::string& name) { CHECK_NAME(name, "session.attached"); } void SessionHandler::detach(const std::string& name) { CHECK_NAME(name, "session.detach"); peer.detached(name, session::DETACH_CODE_NORMAL); handleDetach(); } void SessionHandler::detached(const std::string& /*name*/, uint8_t code) { // Special case for detached: Don't check if we are // attached. Checking can lead to an endless game of "detached // tennis" on federated brokers. awaitingDetached = false; if (code != session::DETACH_CODE_NORMAL) { sendReady = receiveReady = false; channelException(convert(code), "session.detached from peer."); } else { handleDetach(); } } void SessionHandler::handleDetach() { sendReady = receiveReady = false; } void SessionHandler::requestTimeout(uint32_t t) { checkAttached(); getState()->setTimeout(t); peer.timeout(getState()->getTimeout()); } void SessionHandler::timeout(uint32_t t) { checkAttached(); getState()->setTimeout(t); } void SessionHandler::commandPoint(const SequenceNumber& id, uint64_t offset) { checkAttached(); getState()->receiverSetCommandPoint(SessionPoint(id, offset)); if (!receiveReady) { receiveReady = true; readyToReceive(); } } void SessionHandler::expected(const SequenceSet& commands, const Array& /*fragments*/) { checkAttached(); if (getState()->hasState()) { // Replay if (commands.empty()) throw IllegalStateException( QPID_MSG(getState()->getId() << ": has state but client is attaching as new session.")); // TODO aconway 2008-05-12: support replay of partial commands. // Here we always round down to the last command boundary. SessionPoint expectedPoint = commands.empty() ? SequenceNumber(0) : SessionPoint(commands.front(),0); SessionState::ReplayRange replay = getState()->senderExpected(expectedPoint); sendCommandPoint(expectedPoint); std::for_each(replay.begin(), replay.end(), out); // replay } else sendCommandPoint(getState()->senderGetCommandPoint()); } void SessionHandler::confirmed(const SequenceSet& commands, const Array& /*fragments*/) { checkAttached(); // Ignore non-contiguous confirmations. if (!commands.empty() && commands.front() >= getState()->senderGetReplayPoint()) getState()->senderConfirmed(commands.rangesBegin()->last()); } void SessionHandler::completed(const SequenceSet& commands, bool timelyReply) { checkAttached(); getState()->senderCompleted(commands); if (getState()->senderNeedKnownCompleted() || timelyReply) { peer.knownCompleted(commands); getState()->senderRecordKnownCompleted(); } } void SessionHandler::knownCompleted(const SequenceSet& commands) { checkAttached(); getState()->receiverKnownCompleted(commands); } void SessionHandler::flush(bool expected, bool confirmed, bool completed) { checkAttached(); if (expected) { SequenceSet expectSet; if (getState()->hasState()) expectSet.add(getState()->receiverGetExpected().command); peer.expected(expectSet, Array()); } if (confirmed) { SequenceSet confirmSet; if (!getState()->receiverGetUnknownComplete().empty()) confirmSet.add(getState()->receiverGetUnknownComplete().front(), getState()->receiverGetReceived().command); peer.confirmed(confirmSet, Array()); } if (completed) peer.completed(getState()->receiverGetUnknownComplete(), true); } void SessionHandler::gap(const SequenceSet& /*commands*/) { throw NotImplementedException("session.gap not supported"); } void SessionHandler::sendDetach() { checkAttached(); awaitingDetached = true; peer.detach(getState()->getId().getName()); } void SessionHandler::sendCompletion() { checkAttached(); const SequenceSet& c = getState()->receiverGetUnknownComplete(); peer.completed(c, getState()->receiverNeedKnownCompleted()); } void SessionHandler::sendAttach(bool force) { QPID_LOG(debug, "SessionHandler::sendAttach attach id=" << getState()->getId()); peer.attach(getState()->getId().getName(), force); if (getState()->hasState()) peer.flush(true, true, true); else sendCommandPoint(getState()->senderGetCommandPoint()); } void SessionHandler::sendCommandPoint(const SessionPoint& point) { peer.commandPoint(point.command, point.offset); if (!sendReady) { sendReady = true; readyToSend(); } } void SessionHandler::markReadyToSend() { if (!sendReady) { sendReady = true; } } void SessionHandler::sendTimeout(uint32_t t) { checkAttached(); peer.requestTimeout(t); } void SessionHandler::sendFlush() { peer.flush(false, true, true); } bool SessionHandler::ready() const { return sendReady && receiveReady; } }} // namespace qpid::broker qpidc-0.16/src/qpid/amqp_0_10/complex_types.cpp0000664000076400007640000000663011001171273021732 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/UnknownStruct.h" #include "qpid/amqp_0_10/ApplyCommand.h" #include "qpid/amqp_0_10/ApplyControl.h" #include "qpid/amqp_0_10/ApplyStruct.h" #include "qpid/amqp_0_10/apply.h" #include namespace qpid { namespace amqp_0_10 { // Functors for getting static values from a visitable base type. #define QPID_STATIC_VALUE_GETTER(NAME, TYPE, VALUE) \ struct NAME : public ApplyFunctor { \ template TYPE operator()(const T&) const { return T::VALUE; }\ } QPID_STATIC_VALUE_GETTER(GetCode, uint8_t, CODE); QPID_STATIC_VALUE_GETTER(GetSize, uint8_t, SIZE); QPID_STATIC_VALUE_GETTER(GetPack, uint8_t, PACK); QPID_STATIC_VALUE_GETTER(GetClassCode, uint8_t, CLASS_CODE); QPID_STATIC_VALUE_GETTER(GetName, const char*, NAME); QPID_STATIC_VALUE_GETTER(GetClassName, const char*, CLASS_NAME); uint8_t Command::getCode() const { return apply(GetCode(), *this); } uint8_t Command::getClassCode() const { return apply(GetClassCode(), *this); } const char* Command::getName() const { return apply(GetName(), *this); } const char* Command::getClassName() const { return apply(GetClassName(), *this); } uint8_t Control::getCode() const { return apply(GetCode(), *this); } uint8_t Control::getClassCode() const { return apply(GetClassCode(), *this); } const char* Control::getName() const { return apply(GetName(), *this); } const char* Control::getClassName() const { return apply(GetClassName(), *this); } // Special cases for UnknownStruct struct GetStructCode : public GetCode { using GetCode::operator(); uint8_t operator()(const UnknownStruct& u) const { return u.getCode(); } }; struct GetStructClassCode : public GetClassCode { using GetClassCode::operator(); uint8_t operator()(const UnknownStruct& u) const { return u.getClassCode(); } }; uint8_t Struct::getCode() const { return apply(GetStructCode(), *this); } uint8_t Struct::getClassCode() const { return apply(GetStructClassCode(), *this); } uint8_t Struct::getPack() const { return apply(GetPack(), *this); } uint8_t Struct::getSize() const { return apply(GetSize(), *this); } struct PrintVisitor { typedef std::ostream& result_type; std::ostream& out; PrintVisitor(std::ostream& o) : out(o) {} template result_type operator()(const T& t) const { return out << t; } }; std::ostream& operator<<(std::ostream& o, const Command& x) { return apply(PrintVisitor(o), x); } std::ostream& operator<<(std::ostream& o, const Control& x) { return apply(PrintVisitor(o), x); } std::ostream& operator<<(std::ostream& o, const Struct& x) { return apply(PrintVisitor(o), x); } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/built_in_types.h0000664000076400007640000001210511227113407021534 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_BUILT_IN_TYPES_H #define QPID_AMQP_0_10_BUILT_IN_TYPES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Serializer.h" #include "qpid/framing/Uuid.h" #include "qpid/sys/IntegerTypes.h" #include "qpid/sys/Time.h" #include "qpid/amqp_0_10/Decimal.h" #include "qpid/amqp_0_10/SerializableString.h" #include #include #include #include #include /**@file Mapping from built-in AMQP types to C++ types */ namespace qpid { namespace framing { class SequenceNumber; class SequenceSet; } namespace amqp_0_10 { /** Wrapper that behaves like type T but is a distinct type for * overloading purposes. Unique allows multiple distinc wrappers. */ template struct Wrapper { T value; Wrapper() {} Wrapper(const T& x) : value(x) {} Wrapper& operator=(const T& x) { value=x; return *this; } operator T&() { return value; } operator const T&() const { return value; } template void serialize(S& s) { s(value); } }; template inline std::ostream& operator<<(std::ostream& o, const Wrapper& w) { return o << w.value; } /** Void type */ struct Void { template void serialize(S&) {} }; inline std::ostream& operator<<(std::ostream& o, const Void&) { return o; } /** Bit is a presence indicator - an optional value with no encoding. */ struct Bit : public Wrapper { Bit(bool b=false) : Wrapper(b) {} using Wrapper::operator=; template void serialize(S& s) { s.split(*this); } template void encode(S&) const { } template void decode(S&) { *this = true; } }; inline std::ostream& operator<<(std::ostream& o, const Bit& b) { return o << bool(b); } // Fixed size types typedef bool Boolean; typedef char Char; typedef int8_t Int8; typedef int16_t Int16; typedef int32_t Int32; typedef int64_t Int64; typedef uint8_t Uint8; typedef uint16_t Uint16; typedef uint32_t Uint32; typedef uint64_t Uint64; typedef Wrapper CharUtf32; template struct Bin : public boost::array { template void serialize(S& s) { s.raw(this->begin(), this->size()); } }; template std::ostream& operator<<(std::ostream& o, const Bin& b) { return o << boost::make_iterator_range(b.begin(), b.end()); } template <> struct Bin<1> : public boost::array { Bin(char c=0) { this->front() = c; } operator char() { return this->front(); } template void serialize(S& s) { s(front()); } }; typedef Bin<1> Bin8; typedef Bin<128> Bin1024; typedef Bin<16> Bin128; typedef Bin<2> Bin16; typedef Bin<32> Bin256; typedef Bin<4> Bin32; typedef Bin<5> Bin40; typedef Bin<64> Bin512; typedef Bin<8> Bin64; typedef Bin<9> Bin72; typedef double Double; typedef float Float; typedef framing::SequenceNumber SequenceNo; using framing::Uuid; typedef sys::AbsTime Datetime; typedef Decimal Dec32; typedef Decimal Dec64; // Variable width types typedef SerializableString Vbin8; typedef SerializableString Str8Latin; typedef SerializableString Str8; typedef SerializableString Str8Utf16; typedef SerializableString Vbin16; typedef SerializableString Str16Latin; typedef SerializableString Str16; typedef SerializableString Str16Utf16; typedef SerializableString Vbin32; typedef framing::SequenceSet SequenceSet; // Forward declare class types. class Map; class Struct32; class UnknownType; template struct ArrayDomain; typedef ArrayDomain Array; // FIXME aconway 2008-04-08: TODO struct ByteRanges { template void serialize(S&) {} }; struct List { template void serialize(S&) {} }; // FIXME aconway 2008-03-10: dummy ostream operators inline std::ostream& operator<<(std::ostream& o, const ByteRanges&) { return o; } inline std::ostream& operator<<(std::ostream& o, const SequenceSet&) { return o; } inline std::ostream& operator<<(std::ostream& o, const List&) { return o; } enum SegmentType { CONTROL, COMMAND, HEADER, BODY }; inline SerializeAs serializable(SegmentType& st) { return SerializeAs(st); } }} // namespace qpid::amqp_0_10 #endif qpidc-0.16/src/qpid/amqp_0_10/ControlHolder.cpp0000664000076400007640000001471111752725700021631 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/ControlHolder.h" #include "qpid/amqp_0_10/exceptions.h" namespace qpid { namespace amqp_0_10 { using framing::in_place; void ControlHolder::set(uint8_t classCode, uint8_t code) { uint16_t key=(classCode<<8)+code; switch(key) { case 0x101: *this=in_place(); break; case 0x102: *this=in_place(); break; case 0x103: *this=in_place(); break; case 0x104: *this=in_place(); break; case 0x105: *this=in_place(); break; case 0x106: *this=in_place(); break; case 0x107: *this=in_place(); break; case 0x108: *this=in_place(); break; case 0x109: *this=in_place(); break; case 0x10a: *this=in_place(); break; case 0x10b: *this=in_place(); break; case 0x10c: *this=in_place(); break; case 0x201: *this=in_place(); break; case 0x202: *this=in_place(); break; case 0x203: *this=in_place(); break; case 0x204: *this=in_place(); break; case 0x205: *this=in_place(); break; case 0x206: *this=in_place(); break; case 0x207: *this=in_place(); break; case 0x208: *this=in_place(); break; case 0x209: *this=in_place(); break; case 0x20a: *this=in_place(); break; case 0x20b: *this=in_place(); break; case 0x20c: *this=in_place(); break; case 0x20d: *this=in_place(); break; case 0x8001: *this=in_place(); break; case 0x8002: *this=in_place(); break; case 0x8003: *this=in_place(); break; case 0x8005: *this=in_place(); break; case 0x8010: *this=in_place(); break; case 0x8011: *this=in_place(); break; case 0x8014: *this=in_place(); break; case 0x8015: *this=in_place(); break; case 0x8016: *this=in_place(); break; case 0x8020: *this=in_place(); break; case 0x8021: *this=in_place(); break; case 0x8022: *this=in_place(); break; case 0x8101: *this=in_place(); break; case 0x8102: *this=in_place(); break; case 0x8103: *this=in_place(); break; case 0x8104: *this=in_place(); break; case 0x810e: *this=in_place(); break; case 0x810f: *this=in_place(); break; case 0x8110: *this=in_place(); break; case 0x8111: *this=in_place(); break; case 0x8112: *this=in_place(); break; case 0x8113: *this=in_place(); break; case 0x8114: *this=in_place(); break; case 0x8115: *this=in_place(); break; case 0x8116: *this=in_place(); break; case 0x8117: *this=in_place(); break; case 0x8118: *this=in_place(); break; case 0x8119: *this=in_place(); break; case 0x811a: *this=in_place(); break; case 0x811b: *this=in_place(); break; case 0x811c: *this=in_place(); break; case 0x811d: *this=in_place(); break; case 0x811e: *this=in_place(); break; case 0x811f: *this=in_place(); break; case 0x8120: *this=in_place(); break; case 0x8121: *this=in_place(); break; case 0x8122: *this=in_place(); break; case 0x8130: *this=in_place(); break; case 0x8131: *this=in_place(); break; case 0x8134: *this=in_place(); break; case 0x8136: *this=in_place(); break; case 0x8137: *this=in_place(); break; case 0x8138: *this=in_place(); break; case 0x8139: *this=in_place(); break; case 0x8140: *this=in_place(); break; case 0x8141: *this=in_place(); break; default: throw CommandInvalidException(QPID_MSG("Invalid class-control key " << std::hex << key)); } } std::ostream& operator<<(std::ostream& o, const ControlHolder& h) { return h.get() ? (o << *h.get()) : (o << ""); } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/UnknownType.h0000664000076400007640000000520611144372262021014 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_UNKNOWNTYPE_H #define QPID_AMQP_0_10_UNKNOWNTYPE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include #include namespace qpid { namespace amqp_0_10 { /** Encode/decode an unknown type based on typecode. */ class UnknownType { public: UnknownType(uint8_t code=0); uint8_t getCode() const { return code; } /** Size of fixed type or 0 if not fixed/0-length. -1 invalid */ int fixed() const; /** Bytes in size type for variable width. -1 invalid */ int variable() const; typedef std::vector::const_iterator const_iterator; const_iterator begin() const { return data.begin(); } const_iterator end() const { return data.end(); } size_t size() const { return data.size(); } template void serialize(S& s) { s.split(*this); } template void encode(S& s) const; template void decode(S& s); private: uint8_t code; struct Width { int fixed; int variable; }; static Width WidthTable[16]; std::vector data; }; template void UnknownType::encode(S& s) const { switch (variable()) { case 0: break; case 1: s(uint8_t(data.size())); break; case 2: s(uint16_t(data.size())); break; case 4: s(uint32_t(data.size())); break; } s(data.begin(), data.end()); } template void UnknownType::decode(S& s) { uint32_t s8; uint32_t s16; uint32_t s32; switch (variable()) { case 0: break; case 1: s(s8); data.resize(s8); break; case 2: s(s16); data.resize(s16); break; case 4: s(s32); data.resize(s32); break; } s(data.begin(), data.end()); } inline uint8_t codeFor(const UnknownType& u) { return u.getCode(); } std::ostream& operator<<(std::ostream&, const UnknownType&); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_UNKNOWNTYPE_H*/ qpidc-0.16/src/qpid/amqp_0_10/CommandVisitor.h0000664000076400007640000001546111752725700021461 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_COMMANDVISITOR_H #define QPID_AMQP_0_10_COMMANDVISITOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/specification.h" namespace qpid { namespace amqp_0_10 { struct CommandVisitor { virtual ~CommandVisitor() {} typedef Command BaseType; virtual void visit(execution::Sync&) = 0; virtual void visit(execution::Result&) = 0; virtual void visit(execution::Exception&) = 0; virtual void visit(message::Transfer&) = 0; virtual void visit(message::Accept&) = 0; virtual void visit(message::Reject&) = 0; virtual void visit(message::Release&) = 0; virtual void visit(message::Acquire&) = 0; virtual void visit(message::Resume&) = 0; virtual void visit(message::Subscribe&) = 0; virtual void visit(message::Cancel&) = 0; virtual void visit(message::SetFlowMode&) = 0; virtual void visit(message::Flow&) = 0; virtual void visit(message::Flush&) = 0; virtual void visit(message::Stop&) = 0; virtual void visit(tx::Select&) = 0; virtual void visit(tx::Commit&) = 0; virtual void visit(tx::Rollback&) = 0; virtual void visit(dtx::Select&) = 0; virtual void visit(dtx::Start&) = 0; virtual void visit(dtx::End&) = 0; virtual void visit(dtx::Commit&) = 0; virtual void visit(dtx::Forget&) = 0; virtual void visit(dtx::GetTimeout&) = 0; virtual void visit(dtx::Prepare&) = 0; virtual void visit(dtx::Recover&) = 0; virtual void visit(dtx::Rollback&) = 0; virtual void visit(dtx::SetTimeout&) = 0; virtual void visit(exchange::Declare&) = 0; virtual void visit(exchange::Delete&) = 0; virtual void visit(exchange::Query&) = 0; virtual void visit(exchange::Bind&) = 0; virtual void visit(exchange::Unbind&) = 0; virtual void visit(exchange::Bound&) = 0; virtual void visit(queue::Declare&) = 0; virtual void visit(queue::Delete&) = 0; virtual void visit(queue::Purge&) = 0; virtual void visit(queue::Query&) = 0; virtual void visit(file::Qos&) = 0; virtual void visit(file::QosOk&) = 0; virtual void visit(file::Consume&) = 0; virtual void visit(file::ConsumeOk&) = 0; virtual void visit(file::Cancel&) = 0; virtual void visit(file::Open&) = 0; virtual void visit(file::OpenOk&) = 0; virtual void visit(file::Stage&) = 0; virtual void visit(file::Publish&) = 0; virtual void visit(file::Return&) = 0; virtual void visit(file::Deliver&) = 0; virtual void visit(file::Ack&) = 0; virtual void visit(file::Reject&) = 0; virtual void visit(stream::Qos&) = 0; virtual void visit(stream::QosOk&) = 0; virtual void visit(stream::Consume&) = 0; virtual void visit(stream::ConsumeOk&) = 0; virtual void visit(stream::Cancel&) = 0; virtual void visit(stream::Publish&) = 0; virtual void visit(stream::Return&) = 0; virtual void visit(stream::Deliver&) = 0; }; struct ConstCommandVisitor { virtual ~ConstCommandVisitor() {} typedef const Command BaseType; virtual void visit(const execution::Sync&) = 0; virtual void visit(const execution::Result&) = 0; virtual void visit(const execution::Exception&) = 0; virtual void visit(const message::Transfer&) = 0; virtual void visit(const message::Accept&) = 0; virtual void visit(const message::Reject&) = 0; virtual void visit(const message::Release&) = 0; virtual void visit(const message::Acquire&) = 0; virtual void visit(const message::Resume&) = 0; virtual void visit(const message::Subscribe&) = 0; virtual void visit(const message::Cancel&) = 0; virtual void visit(const message::SetFlowMode&) = 0; virtual void visit(const message::Flow&) = 0; virtual void visit(const message::Flush&) = 0; virtual void visit(const message::Stop&) = 0; virtual void visit(const tx::Select&) = 0; virtual void visit(const tx::Commit&) = 0; virtual void visit(const tx::Rollback&) = 0; virtual void visit(const dtx::Select&) = 0; virtual void visit(const dtx::Start&) = 0; virtual void visit(const dtx::End&) = 0; virtual void visit(const dtx::Commit&) = 0; virtual void visit(const dtx::Forget&) = 0; virtual void visit(const dtx::GetTimeout&) = 0; virtual void visit(const dtx::Prepare&) = 0; virtual void visit(const dtx::Recover&) = 0; virtual void visit(const dtx::Rollback&) = 0; virtual void visit(const dtx::SetTimeout&) = 0; virtual void visit(const exchange::Declare&) = 0; virtual void visit(const exchange::Delete&) = 0; virtual void visit(const exchange::Query&) = 0; virtual void visit(const exchange::Bind&) = 0; virtual void visit(const exchange::Unbind&) = 0; virtual void visit(const exchange::Bound&) = 0; virtual void visit(const queue::Declare&) = 0; virtual void visit(const queue::Delete&) = 0; virtual void visit(const queue::Purge&) = 0; virtual void visit(const queue::Query&) = 0; virtual void visit(const file::Qos&) = 0; virtual void visit(const file::QosOk&) = 0; virtual void visit(const file::Consume&) = 0; virtual void visit(const file::ConsumeOk&) = 0; virtual void visit(const file::Cancel&) = 0; virtual void visit(const file::Open&) = 0; virtual void visit(const file::OpenOk&) = 0; virtual void visit(const file::Stage&) = 0; virtual void visit(const file::Publish&) = 0; virtual void visit(const file::Return&) = 0; virtual void visit(const file::Deliver&) = 0; virtual void visit(const file::Ack&) = 0; virtual void visit(const file::Reject&) = 0; virtual void visit(const stream::Qos&) = 0; virtual void visit(const stream::QosOk&) = 0; virtual void visit(const stream::Consume&) = 0; virtual void visit(const stream::ConsumeOk&) = 0; virtual void visit(const stream::Cancel&) = 0; virtual void visit(const stream::Publish&) = 0; virtual void visit(const stream::Return&) = 0; virtual void visit(const stream::Deliver&) = 0; }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_COMMANDVISITOR_H*/ qpidc-0.16/src/qpid/amqp_0_10/Unit.cpp0000664000076400007640000000500311227113407017754 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Unit.h" #include "qpid/amqp_0_10/Codec.h" namespace qpid { namespace amqp_0_10 { void Unit::updateVariant() { switch (header.getType()) { case CONTROL: variant=ControlHolder(); break; case COMMAND: variant=CommandHolder(); break; case HEADER: variant=Header(); break; case BODY: variant=Body(header.getDataSize()); break; default: assert(0); // FIXME aconway 2008-04-14: exception? } } struct GetTypeVisitor : public boost::static_visitor { SegmentType operator()(const CommandHolder& ) const { return COMMAND; } SegmentType operator()(const ControlHolder& ) const { return CONTROL; } SegmentType operator()(const Header& ) const { return HEADER; } SegmentType operator()(const Body&) const { return BODY; } }; struct GetFlagsVisitor : public boost::static_visitor { uint8_t operator()(const CommandHolder& ) const { return FIRST_FRAME|LAST_FRAME|FIRST_SEGMENT; } uint8_t operator()(const ControlHolder& ) const { return FIRST_FRAME|LAST_FRAME|FIRST_SEGMENT; } uint8_t operator()(const Header& ) const { return FIRST_FRAME|LAST_FRAME; } uint8_t operator()(const Body&) const { return 0; } }; void Unit::updateHeader(uint8_t flags) { GetFlagsVisitor flagger; header.setFlags(flags | variant.apply_visitor(flagger)); GetTypeVisitor getter; header.setType(variant.apply_visitor(getter)); header.setDataSize(Codec::size(*this)); // track automatically set from type. // no channel specified at this point. } std::ostream& operator<<(std::ostream& o, const Unit& u) { return o << u.getHeader() << " " << u.variant.type().name() << "[" << u.variant << "]"; } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/TypeForCode.cpp0000664000076400007640000000521511752725700021235 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include namespace qpid { namespace amqp_0_10 { namespace { struct Names { Names() { for (int i =0; i < 256; ++i) { std::ostringstream os; os << "UnknownType<" << i << ">"; names[i] = os.str(); } names[0x00] = "bin8"; names[0x01] = "int8"; names[0x02] = "uint8"; names[0x04] = "char"; names[0x08] = "boolean"; names[0x10] = "bin16"; names[0x11] = "int16"; names[0x12] = "uint16"; names[0x20] = "bin32"; names[0x21] = "int32"; names[0x22] = "uint32"; names[0x23] = "float"; names[0x27] = "char-utf32"; names[0x30] = "bin64"; names[0x31] = "int64"; names[0x32] = "uint64"; names[0x33] = "double"; names[0x38] = "datetime"; names[0x40] = "bin128"; names[0x48] = "uuid"; names[0x50] = "bin256"; names[0x60] = "bin512"; names[0x70] = "bin1024"; names[0x80] = "vbin8"; names[0x84] = "str8-latin"; names[0x85] = "str8"; names[0x86] = "str8-utf16"; names[0x90] = "vbin16"; names[0x94] = "str16-latin"; names[0x95] = "str16"; names[0x96] = "str16-utf16"; names[0xa0] = "vbin32"; names[0xa8] = "map"; names[0xa9] = "list"; names[0xaa] = "array"; names[0xab] = "struct32"; names[0xc0] = "bin40"; names[0xc8] = "dec32"; names[0xd0] = "bin72"; names[0xd8] = "dec64"; names[0xf0] = "void"; names[0xf1] = "bit"; } std::string names[256]; }; Names names; } // namespace std::string typeName(uint8_t code) { return names.names[code]; } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/Connection.h0000664000076400007640000000527011261212613020604 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_CONNECTION_H #define QPID_AMQP_0_10_CONNECTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQFrame.h" #include "qpid/sys/ConnectionCodec.h" #include "qpid/sys/ConnectionInputHandler.h" #include "qpid/sys/ConnectionOutputHandler.h" #include "qpid/sys/Mutex.h" #include "qpid/broker/BrokerImportExport.h" #include #include #include namespace qpid { namespace sys { class ConnectionInputHandlerFactory; } namespace amqp_0_10 { class Connection : public sys::ConnectionCodec, public sys::ConnectionOutputHandler { typedef std::deque FrameQueue; FrameQueue frameQueue; FrameQueue workQueue; bool pushClosed, popClosed; mutable sys::Mutex frameQueueLock; sys::OutputControl& output; std::auto_ptr connection; std::string identifier; bool initialized; bool isClient; size_t buffered; framing::ProtocolVersion version; public: QPID_BROKER_EXTERN Connection(sys::OutputControl&, const std::string& id, bool isClient); QPID_BROKER_EXTERN void setInputHandler(std::auto_ptr c); size_t decode(const char* buffer, size_t size); size_t encode(const char* buffer, size_t size); bool isClosed() const; bool canEncode(); void abort(); void activateOutput(); void giveReadCredit(int32_t); void closed(); // connection closed by peer. void close(); // closing from this end. void send(framing::AMQFrame&); framing::ProtocolVersion getVersion() const; size_t getBuffered() const; /** Used by cluster code to set a special version on "update" connections. */ // FIXME aconway 2009-07-30: find a cleaner mechanism for this. void setVersion(const framing::ProtocolVersion&); }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_CONNECTION_H*/ qpidc-0.16/src/qpid/amqp_0_10/Codec.h0000664000076400007640000001630611227113407017527 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_CODEC_H #define QPID_AMQP_0_10_CODEC_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/built_in_types.h" #include "qpid/Serializer.h" #include #include #include #include #include #include namespace qpid { namespace amqp_0_10 { template void reverse(T& t) { char*p =reinterpret_cast(&t); std::reverse(p, p+sizeof(T)); } #ifdef BOOST_LITTLE_ENDIAN template void bigEndian(T& t) { reverse(t); } template void littleEndian(T&) {} #else template void littleEndian(T& t) { reverse(t); } template void bigEndian(T&) {} #endif /** * AMQP 0-10 encoding and decoding. */ struct Codec { /** Encode to an output byte iterator */ template class Encoder : public EncoderBase > { public: typedef EncoderBase > Base; typedef OutIter Iterator; Encoder(OutIter o, size_t limit=Base::maxLimit()) : out(o) { this->setLimit(limit); } using EncoderBase >::operator(); Encoder& operator()(bool x) { raw(x); return *this;} Encoder& operator()(char x) { raw(x); return *this; } Encoder& operator()(int8_t x) { raw(x); return *this; } Encoder& operator()(uint8_t x) { raw(x); return *this; } Encoder& operator()(int16_t x) { return networkByteOrder(x); } Encoder& operator()(int32_t x) { return networkByteOrder(x); } Encoder& operator()(int64_t x) { return networkByteOrder(x); } Encoder& operator()(uint16_t x) { return networkByteOrder(x); } Encoder& operator()(uint32_t x) { return networkByteOrder(x); } Encoder& operator()(uint64_t x) { return networkByteOrder(x); } Encoder& operator()(float x) { return networkByteOrder(x); } Encoder& operator()(double x) { return networkByteOrder(x); } void raw(const void* p, size_t n) { this->addBytes(n); out = std::copy((const char*)p, (const char*)p+n, out); } void raw(char b) { this->addBytes(1); *out++=b; } template Encoder& littleEnd(T x) { littleEndian(x); raw(&x, sizeof(x)); return *this; } OutIter pos() const { return out; } private: template Encoder& networkByteOrder(T x) { bigEndian(x); raw(&x, sizeof(x)); return *this; } OutIter out; }; template class Decoder : public DecoderBase > { public: typedef DecoderBase > Base; typedef InIter Iterator; Decoder(InIter i, size_t limit=Base::maxLimit()) : in(i) { this->setLimit(limit); } using DecoderBase >::operator(); // FIXME aconway 2008-03-10: wrong encoding, need packing support Decoder& operator()(bool& x) { raw((char&)x); return *this; } Decoder& operator()(char& x) { raw((char&)x); return *this; } Decoder& operator()(int8_t& x) { raw((char&)x); return *this; } Decoder& operator()(uint8_t& x) { raw((char&)x); return *this; } Decoder& operator()(int16_t& x) { return networkByteOrder(x); } Decoder& operator()(int32_t& x) { return networkByteOrder(x); } Decoder& operator()(int64_t& x) { return networkByteOrder(x); } Decoder& operator()(uint16_t& x) { return networkByteOrder(x); } Decoder& operator()(uint32_t& x) { return networkByteOrder(x); } Decoder& operator()(uint64_t& x) { return networkByteOrder(x); } Decoder& operator()(float& x) { return networkByteOrder(x); } Decoder& operator()(double& x) { return networkByteOrder(x); } void raw(void *p, size_t n) { this->addBytes(n); std::copy(in, in+n, (char*)p); std::advance(in, n); } void raw(char &b) { this->addBytes(1); b=*in++; } template Decoder& littleEnd(T& x) { raw(&x, sizeof(x)); littleEndian(x); return *this; } InIter pos() const { return in; } private: template Decoder& networkByteOrder(T& x) { raw(&x, sizeof(x)); bigEndian(x); return *this; } InIter in; }; class Size : public EncoderBase { public: Size() : size(0) {} operator size_t() const { return size; } using EncoderBase::operator(); // FIXME aconway 2008-03-10: wrong encoding, need packing support Size& operator()(bool x) { size += sizeof(x); return *this; } Size& operator()(char x) { size += sizeof(x); return *this; } Size& operator()(int8_t x) { size += sizeof(x); return *this; } Size& operator()(uint8_t x) { size += sizeof(x); return *this; } Size& operator()(int16_t x) { size += sizeof(x); return *this; } Size& operator()(int32_t x) { size += sizeof(x); return *this; } Size& operator()(int64_t x) { size += sizeof(x); return *this; } Size& operator()(uint16_t x) { size += sizeof(x); return *this; } Size& operator()(uint32_t x) { size += sizeof(x); return *this; } Size& operator()(uint64_t x) { size += sizeof(x); return *this; } Size& operator()(float x) { size += sizeof(x); return *this; } Size& operator()(double x) { size += sizeof(x); return *this; } // FIXME aconway 2008-04-03: optimize op()(Iter,Iter) // for Iter with fixed-size value_type: // distance(begin,end)*sizeof(value_type) void raw(const void*, size_t n){ size += n; } template Size& littleEnd(T) { size+= sizeof(T); return *this; } private: size_t size; }; // FIXME aconway 2008-03-11: rename to encoder(), decoder() template static Decoder decode(const InIter &i) { return Decoder(i); } template static Encoder encode(OutIter i) { return Encoder(i); } template static size_t size(const T& x) { return Size()(x); } template static size_t size(const Iter& a, const Iter& z) { return Size()(a,z); } }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_CODEC_H*/ qpidc-0.16/src/qpid/amqp_0_10/Command.h0000664000076400007640000000337711227113407020074 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_COMMAND_H #define QPID_AMQP_0_10_COMMAND_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Control.h" #include "qpid/amqp_0_10/structs.h" namespace qpid { namespace amqp_0_10 { struct CommandVisitor; struct ConstCommandVisitor; struct CommandHolder; struct Command : public Action, public Visitable { using Action::getCommand; Command* getCommand() { return this; } uint8_t getCode() const; uint8_t getClassCode() const; const char* getName() const; const char* getClassName() const; session::Header sessionHeader; }; std::ostream& operator<<(std::ostream&, const Command&); template struct CommandPacker : Packer { CommandPacker(T& t) : Packer(t) {} template void serialize(S& s) { s(this->data.sessionHeader); Packer::serialize(s); } }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_COMMAND_H*/ qpidc-0.16/src/qpid/amqp_0_10/Struct32.cpp0000664000076400007640000000235011227113407020470 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Struct32.h" namespace qpid { namespace amqp_0_10 { Struct32::Struct32() { // FIXME aconway 2008-04-16: this is only here to force a valid // default-constructed Struct32 for serialize tests, clean up. *this = in_place(); } std::ostream& operator<<(std::ostream& o, const Struct32& s) { return o << static_cast(s); } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/Header.cpp0000664000076400007640000000214111227113407020225 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Header.h" namespace qpid { namespace amqp_0_10 { std::ostream& operator<<(std::ostream& o, const Header& h) { o << "Header["; std::ostream_iterator i(o, " "); std::copy(h.begin(), h.end(), i); o << "]"; return o; } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/Array.h0000664000076400007640000001016611001416137017562 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_ARRAY_H #define QPID_AMQP_0_10_ARRAY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/TypeForCode.h" #include "qpid/amqp_0_10/CodeForType.h" #include "qpid/amqp_0_10/UnknownType.h" #include "qpid/amqp_0_10/exceptions.h" #include "qpid/amqp_0_10/Codec.h" #include #include namespace qpid { namespace amqp_0_10 { template class ArrayDomain : public std::vector { public: template void serialize(S& s) { s.split(*this); } template void encode(S& s) const { s(contentSize())(CodeForType::value)(uint32_t(this->size())); s(this->begin(), this->end()); } void encode(Codec::Size& s) const { s.raw(0, contentSize() + 4/*size*/); } template void decode(S& s) { uint32_t size; uint8_t type; uint32_t count; s(size); typename S::ScopedLimit l(s, size); s(type); if (type != CodeForType::value) throw InvalidArgumentException(QPID_MSG("Array domain expected type " << CodeForType::value << " but found " << type)); s(count); this->resize(count); s(this->begin(), this->end()); } private: uint32_t contentSize() const { return Codec::size(this->begin(), this->end()) + sizeof(uint32_t) /*count*/ + sizeof(uint8_t) /*type*/; } }; template std::ostream& operator<<(std::ostream& o, const ArrayDomain& ad) { std::ostream_iterator i(o, " "); o << "Array<" << typeName(CodeForType::value) << ">["; std::copy(ad.begin(), ad.end(), i); o << "]"; return o; } /** A non-domain array is represented as and array of UnknownType. * Special case templat. */ template<> class ArrayDomain : public std::vector { public: ArrayDomain(uint8_t type_=0) : type(type_) {} template void serialize(S& s) { s.split(*this); } template void encode(S& s) const { s(contentSize())(type)(uint32_t(this->size())); s(this->begin(), this->end()); } void encode(Codec::Size& s) const { s.raw(0, contentSize() + 4/*size*/); } template void decode(S& s) { uint32_t size; uint32_t count; s(size); typename S::ScopedLimit l(s, size); s(type)(count); this->clear(); this->resize(count, UnknownType(type)); s(this->begin(), this->end()); } uint8_t getType() const { return type; } private: uint32_t contentSize() const { return Codec::size(this->begin(), this->end()) + sizeof(uint32_t) /*count*/ + sizeof(uint8_t) /*type*/; } uint8_t type; }; std::ostream& operator<<(std::ostream& o, const Array& a); // FIXME aconway 2008-04-08: hack to supress encoding of // command-fragments and in-doubt as there is a problem with the spec // (command-fragments does not have a one byte type code.) namespace session { class CommandFragment; } namespace dtx { class Xid; } template <> struct ArrayDomain : public Void {}; template <> struct ArrayDomain : public Void {}; inline std::ostream& operator<<(std::ostream& o, const ArrayDomain&) { return o; } inline std::ostream& operator<<(std::ostream& o, const ArrayDomain&) { return o; } }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_ARRAY_H*/ qpidc-0.16/src/qpid/amqp_0_10/TypeForCode.h0000664000076400007640000001367011752725700020706 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_TYPEFORCODE_H #define QPID_AMQP_0_10_TYPEFORCODE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/built_in_types.h" #include "qpid/amqp_0_10/UnknownType.h" namespace qpid { namespace amqp_0_10 { template struct TypeForCode; template <> struct TypeForCode<0x00> { typedef Bin8 type; }; template <> struct TypeForCode<0x01> { typedef Int8 type; }; template <> struct TypeForCode<0x02> { typedef Uint8 type; }; template <> struct TypeForCode<0x04> { typedef Char type; }; template <> struct TypeForCode<0x08> { typedef Boolean type; }; template <> struct TypeForCode<0x10> { typedef Bin16 type; }; template <> struct TypeForCode<0x11> { typedef Int16 type; }; template <> struct TypeForCode<0x12> { typedef Uint16 type; }; template <> struct TypeForCode<0x20> { typedef Bin32 type; }; template <> struct TypeForCode<0x21> { typedef Int32 type; }; template <> struct TypeForCode<0x22> { typedef Uint32 type; }; template <> struct TypeForCode<0x23> { typedef Float type; }; template <> struct TypeForCode<0x27> { typedef CharUtf32 type; }; template <> struct TypeForCode<0x30> { typedef Bin64 type; }; template <> struct TypeForCode<0x31> { typedef Int64 type; }; template <> struct TypeForCode<0x32> { typedef Uint64 type; }; template <> struct TypeForCode<0x33> { typedef Double type; }; template <> struct TypeForCode<0x38> { typedef Datetime type; }; template <> struct TypeForCode<0x40> { typedef Bin128 type; }; template <> struct TypeForCode<0x48> { typedef Uuid type; }; template <> struct TypeForCode<0x50> { typedef Bin256 type; }; template <> struct TypeForCode<0x60> { typedef Bin512 type; }; template <> struct TypeForCode<0x70> { typedef Bin1024 type; }; template <> struct TypeForCode<0x80> { typedef Vbin8 type; }; template <> struct TypeForCode<0x84> { typedef Str8Latin type; }; template <> struct TypeForCode<0x85> { typedef Str8 type; }; template <> struct TypeForCode<0x86> { typedef Str8Utf16 type; }; template <> struct TypeForCode<0x90> { typedef Vbin16 type; }; template <> struct TypeForCode<0x94> { typedef Str16Latin type; }; template <> struct TypeForCode<0x95> { typedef Str16 type; }; template <> struct TypeForCode<0x96> { typedef Str16Utf16 type; }; template <> struct TypeForCode<0xa0> { typedef Vbin32 type; }; template <> struct TypeForCode<0xa8> { typedef Map type; }; template <> struct TypeForCode<0xa9> { typedef List type; }; template <> struct TypeForCode<0xaa> { typedef Array type; }; template <> struct TypeForCode<0xab> { typedef Struct32 type; }; template <> struct TypeForCode<0xc0> { typedef Bin40 type; }; template <> struct TypeForCode<0xc8> { typedef Dec32 type; }; template <> struct TypeForCode<0xd0> { typedef Bin72 type; }; template <> struct TypeForCode<0xd8> { typedef Dec64 type; }; template <> struct TypeForCode<0xf0> { typedef Void type; }; template <> struct TypeForCode<0xf1> { typedef Bit type; }; template typename V::result_type apply_visitor(V& visitor, uint8_t code) { switch (code) { case 0x00: return visitor((Bin8*)0); case 0x01: return visitor((Int8*)0); case 0x02: return visitor((Uint8*)0); case 0x04: return visitor((Char*)0); case 0x08: return visitor((Boolean*)0); case 0x10: return visitor((Bin16*)0); case 0x11: return visitor((Int16*)0); case 0x12: return visitor((Uint16*)0); case 0x20: return visitor((Bin32*)0); case 0x21: return visitor((Int32*)0); case 0x22: return visitor((Uint32*)0); case 0x23: return visitor((Float*)0); case 0x27: return visitor((CharUtf32*)0); case 0x30: return visitor((Bin64*)0); case 0x31: return visitor((Int64*)0); case 0x32: return visitor((Uint64*)0); case 0x33: return visitor((Double*)0); case 0x38: return visitor((Datetime*)0); case 0x40: return visitor((Bin128*)0); case 0x48: return visitor((Uuid*)0); case 0x50: return visitor((Bin256*)0); case 0x60: return visitor((Bin512*)0); case 0x70: return visitor((Bin1024*)0); case 0x80: return visitor((Vbin8*)0); case 0x84: return visitor((Str8Latin*)0); case 0x85: return visitor((Str8*)0); case 0x86: return visitor((Str8Utf16*)0); case 0x90: return visitor((Vbin16*)0); case 0x94: return visitor((Str16Latin*)0); case 0x95: return visitor((Str16*)0); case 0x96: return visitor((Str16Utf16*)0); case 0xa0: return visitor((Vbin32*)0); case 0xa8: return visitor((Map*)0); case 0xa9: return visitor((List*)0); case 0xaa: return visitor((Array*)0); case 0xab: return visitor((Struct32*)0); case 0xc0: return visitor((Bin40*)0); case 0xc8: return visitor((Dec32*)0); case 0xd0: return visitor((Bin72*)0); case 0xd8: return visitor((Dec64*)0); case 0xf0: return visitor((Void*)0); case 0xf1: return visitor((Bit*)0); default: return visitor((UnknownType*)0); } } std::string typeName(uint8_t code); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_TYPEFORCODE_H*/ qpidc-0.16/src/qpid/amqp_0_10/FrameHeader.h0000664000076400007640000000616410776526274020700 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_FRAMEHEADER_H #define QPID_AMQP_0_10_FRAMEHEADER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/built_in_types.h" #include #include #include #include namespace qpid { namespace amqp_0_10 { enum FrameFlags { FIRST_SEGMENT=8, LAST_SEGMENT=4, FIRST_FRAME=2, LAST_FRAME=1 }; class FrameHeader { public: static const size_t SIZE=12; static uint8_t trackFor(SegmentType type) { return type == 0 ? 0 : 1; } FrameHeader(uint8_t flags_=0, SegmentType type_=SegmentType(), uint16_t size_=0, uint8_t track_=0, uint16_t channel_=0) : flags(flags_), type(type_), size(size_), track(track_), channel(channel_) {} uint8_t getFlags() const { return flags; } SegmentType getType() const { return type; } /** @return size total size of of frame, including frame header. */ uint16_t getSize() const { return size; } /** @return size of frame data, excluding frame header. */ uint16_t getDataSize() const { return size - SIZE; } uint8_t getTrack() const { return track; } uint16_t getChannel() const { return channel; } void setFlags(uint8_t flags_) { flags=flags_; } /** Also sets the track. There is no setTrack() */ void setType(SegmentType type_) { type=type_; track=trackFor(type); } /** @param size total size of of frame, including frame header. */ void setSize(uint16_t size_) { size = size_; } /** @param size size of frame data, excluding frame header. */ void setDataSize(uint16_t size_) { size = size_+SIZE; } void setChannel(uint8_t channel_) { channel=channel_; } bool allFlags(uint8_t f) const { return (flags & f) == f; } bool anyFlags(uint8_t f) const { return (flags & f); } void raiseFlags(uint8_t f) { flags |= f; } void clearFlags(uint8_t f) { flags &= ~f; } bool isComplete() const { return allFlags(FIRST_FRAME | LAST_FRAME); } bool operator==(const FrameHeader&) const; template void serialize(S& s) { uint8_t pad8=0; uint32_t pad32=0; s(flags)(type)(size)(pad8)(track)(channel)(pad32); } private: uint8_t flags; SegmentType type; uint16_t size; uint8_t track; uint16_t channel; }; std::ostream& operator<<(std::ostream&, const FrameHeader&); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_FRAMEHEADER_H*/ qpidc-0.16/src/qpid/amqp_0_10/CommmandPacker.h0000664000076400007640000000314711001416137021366 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_COMMMANDPACKER_H #define QPID_AMQP_0_10_COMMMANDPACKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/structs.h" namespace qpid { namespace amqp_0_10 { /** * Packer for commands - serialize session.header before pack bits. */ template class CommmandPacker : public Packer { public: CommmandPacker(T& t) : Packer(t) {} template void serialize(S& s) { s.split(*this); } template void encode(S& s) const { s.sessionHeader( Packer::encode(s); } template void decode(S& s) { Bits bits; s.littleEnd(bits); PackedDecoder decode(s, bits); data.serialize(decode); } protected: T& data; }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_COMMMANDPACKER_H*/ qpidc-0.16/src/qpid/amqp_0_10/StructHolder.cpp0000664000076400007640000000453611752725700021501 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/StructHolder.h" #include "qpid/amqp_0_10/exceptions.h" namespace qpid { namespace amqp_0_10 { using framing::in_place; void StructHolder::set(uint8_t classCode, uint8_t code) { uint16_t key=(classCode<<8)+code; switch(key) { case 0x401: *this=in_place(); break; case 0x402: *this=in_place(); break; case 0x403: *this=in_place(); break; case 0x404: *this=in_place(); break; case 0x405: *this=in_place(); break; case 0x601: *this=in_place(); break; case 0x604: *this=in_place(); break; case 0x602: *this=in_place(); break; case 0x603: *this=in_place(); break; case 0x701: *this=in_place(); break; case 0x702: *this=in_place(); break; case 0x801: *this=in_place(); break; case 0x901: *this=in_place(); break; case 0xa01: *this=in_place(); break; default: *this=in_place(classCode, code); } } std::ostream& operator<<(std::ostream& o, const StructHolder& h) { return h.get() ? (o << *h.get()) : (o << ""); } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/CodeForType.cpp0000664000076400007640000000565611752725700021246 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/CodeForType.h" namespace qpid { namespace amqp_0_10 { const uint8_t CodeForType::value=0x00; const uint8_t CodeForType::value=0x01; const uint8_t CodeForType::value=0x02; const uint8_t CodeForType::value=0x04; const uint8_t CodeForType::value=0x08; const uint8_t CodeForType::value=0x10; const uint8_t CodeForType::value=0x11; const uint8_t CodeForType::value=0x12; const uint8_t CodeForType::value=0x20; const uint8_t CodeForType::value=0x21; const uint8_t CodeForType::value=0x22; const uint8_t CodeForType::value=0x23; const uint8_t CodeForType::value=0x27; const uint8_t CodeForType::value=0x30; const uint8_t CodeForType::value=0x31; const uint8_t CodeForType::value=0x32; const uint8_t CodeForType::value=0x33; const uint8_t CodeForType::value=0x38; const uint8_t CodeForType::value=0x40; const uint8_t CodeForType::value=0x48; const uint8_t CodeForType::value=0x50; const uint8_t CodeForType::value=0x60; const uint8_t CodeForType::value=0x70; const uint8_t CodeForType::value=0x80; const uint8_t CodeForType::value=0x84; const uint8_t CodeForType::value=0x85; const uint8_t CodeForType::value=0x86; const uint8_t CodeForType::value=0x90; const uint8_t CodeForType::value=0x94; const uint8_t CodeForType::value=0x95; const uint8_t CodeForType::value=0x96; const uint8_t CodeForType::value=0xa0; const uint8_t CodeForType::value=0xa8; const uint8_t CodeForType::value=0xa9; const uint8_t CodeForType::value=0xaa; const uint8_t CodeForType::value=0xab; const uint8_t CodeForType::value=0xc0; const uint8_t CodeForType::value=0xc8; const uint8_t CodeForType::value=0xd0; const uint8_t CodeForType::value=0xd8; const uint8_t CodeForType::value=0xf0; const uint8_t CodeForType::value=0xf1; }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/Map.h0000664000076400007640000001330011001140666017213 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_MAP_H #define QPID_AMQP_0_10_MAP_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on ang * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/amqp_0_10/built_in_types.h" #include "qpid/amqp_0_10/UnknownType.h" #include "qpid/amqp_0_10/CodeForType.h" #include "qpid/amqp_0_10/TypeForCode.h" #include "qpid/amqp_0_10/Codec.h" #include "qpid/framing/Blob.h" #include #include #include namespace qpid { namespace amqp_0_10 { class Map; class MapValue { public: struct BadTypeException : public Exception {}; template struct Visitor { typedef R result_type; }; MapValue(); MapValue(const MapValue& x); template explicit MapValue(const T& t); template MapValue& operator=(const T& t); template T* get(); template const T* get() const; template typename V::result_type apply_visitor(V&); template typename V::result_type apply_visitor(const V&); uint8_t getCode() const { return code; } bool operator==(const MapValue&) const; template void serialize(S& s) { s(code); s.split(*this); } template void encode(S& s) const { const_cast(this)->apply_visitor(s); } template void decode(S& s) { DecodeVisitor dv(blob, s); qpid::amqp_0_10::apply_visitor(dv, code); } private: // TODO aconway 2008-04-15: Estimate required size, we will get a // compile error from static_assert in Blob.h if the estimate is too // low. We can't use sizeof() directly because #include Struct32.h // creates a circular dependency. Needs a better solution. static const size_t SIZE=256; typedef framing::Blob Blob; template struct VisitVisitor; template struct GetVisitor; template struct DecodeVisitor; uint8_t code; Blob blob; }; class Map : public std::map { public: template void serialize(S& s) { s.split(*this); } template void encode(S& s) const; // Shortcut calculation for size. void encode(Codec::Size& s) const { s.raw(0, contentSize() + 4/*size*/); } template void decode(S& s); private: uint32_t contentSize() const; }; std::ostream& operator<<(std::ostream&, const MapValue&); std::ostream& operator<<(std::ostream&, const Map::value_type&); std::ostream& operator<<(std::ostream&, const Map&); using framing::in_place; template MapValue::MapValue(const T& t) : code(codeFor(t)), blob(in_place()) {} template MapValue& MapValue::operator=(const T& t) { code=codeFor(t); blob=t; return *this; } template struct MapValue::VisitVisitor { typedef typename V::result_type result_type; V& visitor; Blob& blob; VisitVisitor(V& v, Blob& b) : visitor(v), blob(b) {} template result_type operator()(T*) { return visitor(*reinterpret_cast(blob.get())); } }; template typename V::result_type MapValue::apply_visitor(V& v) { VisitVisitor visitor(v, blob); return qpid::amqp_0_10::apply_visitor(visitor, code); } template struct MapValue::GetVisitor { typedef R* result_type; const MapValue::Blob& blob; GetVisitor(const MapValue::Blob& b) : blob(b) {} R* operator()(R& r) { return &r; } template R* operator()(T&) { return 0; } }; template struct MapValue::DecodeVisitor { typedef void result_type; MapValue::Blob& blob; D& decoder; DecodeVisitor(Blob& b, D& d) : blob(b), decoder(d) {} template void operator()(T*) { T t; decoder(t); blob = t; } }; template T* MapValue::get() { return apply_visitor(GetVisitor(blob)); } template const T* MapValue::get() const { return apply_visitor(GetVisitor()); } template typename V::result_type MapValue::apply_visitor(const V& v) { return apply_visitor(const_cast(v)); } template void Map::encode(S& s) const { // FIXME aconway 2008-04-03: replace preview mapping with 0-10 mapping: // s(contentSize())(uint32_t(size())); // size, count s(contentSize()); for (const_iterator i = begin(); i != end(); ++i) s(i->first)(i->second); // key (type value) } template void Map::decode(S& s) { uint32_t decodedSize /*, count*/; // FIXME aconway 2008-04-03: replace preview mapping with 0-10 mapping: // s(contentSize())(uint32_t(size())); // size, count // s(decodedSize)(count); s(decodedSize); typename S::ScopedLimit l(s, decodedSize); // Make sure we don't overrun. // FIXME aconway 2008-04-03: replace preview with 0-10: // for ( ; count > 0; --count) { while (s.bytesRemaining() > 0) { key_type k; MapValue v; s(k)(v); insert(value_type(k,v)); } } }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_MAP_H*/ qpidc-0.16/src/qpid/amqp_0_10/specification_fwd.h0000664000076400007640000002073011752725700022176 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_SPECIFICATION_FWD_H #define QPID_AMQP_0_10_SPECIFICATION_FWD_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/built_in_types.h" namespace qpid { namespace amqp_0_10 { typedef ArrayDomain Str16Array; namespace connection { const uint8_t CODE=0x1; extern const char* NAME; enum CloseCode { NORMAL = 200, CONNECTION_FORCED = 320, INVALID_PATH = 402, FRAMING_ERROR = 501 }; inline SerializeAs serializable(CloseCode& e) { return SerializeAs(e); } typedef Str16 AmqpHostUrl; typedef ArrayDomain AmqpHostArray; class Start; class StartOk; class Secure; class SecureOk; class Tune; class TuneOk; class Open; class OpenOk; class Redirect; class Heartbeat; class Close; class CloseOk; } // namespace connection namespace session { const uint8_t CODE=0x2; extern const char* NAME; typedef Vbin16 Name; enum DetachCode { NORMAL = 0, SESSION_BUSY = 1, TRANSPORT_BUSY = 2, NOT_ATTACHED = 3, UNKNOWN_IDS = 4 }; inline SerializeAs serializable(DetachCode& e) { return SerializeAs(e); } typedef SequenceSet Commands; class Header; class CommandFragment; typedef ArrayDomain CommandFragments; class Attach; class Attached; class Detach; class Detached; class RequestTimeout; class Timeout; class CommandPoint; class Expected; class Confirmed; class Completed; class KnownCompleted; class Flush; class Gap; } // namespace session namespace execution { const uint8_t CODE=0x3; extern const char* NAME; enum ErrorCode { UNAUTHORIZED_ACCESS = 403, NOT_FOUND = 404, RESOURCE_LOCKED = 405, PRECONDITION_FAILED = 406, RESOURCE_DELETED = 408, ILLEGAL_STATE = 409, COMMAND_INVALID = 503, RESOURCE_LIMIT_EXCEEDED = 506, NOT_ALLOWED = 530, ILLEGAL_ARGUMENT = 531, NOT_IMPLEMENTED = 540, INTERNAL_ERROR = 541, INVALID_ARGUMENT = 542 }; inline SerializeAs serializable(ErrorCode& e) { return SerializeAs(e); } class Sync; class Result; class Exception; } // namespace execution namespace message { const uint8_t CODE=0x4; extern const char* NAME; typedef Str8 Destination; enum AcceptMode { EXPLICIT = 0, NONE = 1 }; inline SerializeAs serializable(AcceptMode& e) { return SerializeAs(e); } enum AcquireMode { PRE_ACQUIRED = 0, NOT_ACQUIRED = 1 }; inline SerializeAs serializable(AcquireMode& e) { return SerializeAs(e); } enum RejectCode { UNSPECIFIED = 0, UNROUTABLE = 1, IMMEDIATE = 2 }; inline SerializeAs serializable(RejectCode& e) { return SerializeAs(e); } typedef Str16 ResumeId; enum DeliveryMode { NON_PERSISTENT = 1, PERSISTENT = 2 }; inline SerializeAs serializable(DeliveryMode& e) { return SerializeAs(e); } enum DeliveryPriority { LOWEST = 0, LOWER = 1, LOW = 2, BELOW_AVERAGE = 3, MEDIUM = 4, ABOVE_AVERAGE = 5, HIGH = 6, HIGHER = 7, VERY_HIGH = 8, HIGHEST = 9 }; inline SerializeAs serializable(DeliveryPriority& e) { return SerializeAs(e); } class DeliveryProperties; class FragmentProperties; class ReplyTo; class MessageProperties; enum FlowMode { CREDIT = 0, WINDOW = 1 }; inline SerializeAs serializable(FlowMode& e) { return SerializeAs(e); } enum CreditUnit { MESSAGE = 0, BYTE = 1 }; inline SerializeAs serializable(CreditUnit& e) { return SerializeAs(e); } class Transfer; class Accept; class Reject; class Release; class Acquire; class Acquired; class Resume; class MessageResumeResult; class Subscribe; class Cancel; class SetFlowMode; class Flow; class Flush; class Stop; } // namespace message namespace tx { const uint8_t CODE=0x5; extern const char* NAME; class Select; class Commit; class Rollback; } // namespace tx namespace dtx { const uint8_t CODE=0x6; extern const char* NAME; enum XaStatus { XA_OK = 0, XA_RBROLLBACK = 1, XA_RBTIMEOUT = 2, XA_HEURHAZ = 3, XA_HEURCOM = 4, XA_HEURRB = 5, XA_HEURMIX = 6, XA_RDONLY = 7 }; inline SerializeAs serializable(XaStatus& e) { return SerializeAs(e); } class XaResult; class Xid; class Select; class Start; class End; class Commit; class Forget; class GetTimeout; class GetTimeoutResult; class Prepare; class Recover; class RecoverResult; class Rollback; class SetTimeout; } // namespace dtx namespace exchange { const uint8_t CODE=0x7; extern const char* NAME; typedef Str8 Name; class Declare; class Delete; class Query; class ExchangeQueryResult; class Bind; class Unbind; class Bound; class ExchangeBoundResult; } // namespace exchange namespace queue { const uint8_t CODE=0x8; extern const char* NAME; typedef Str8 Name; class Declare; class Delete; class Purge; class Query; class QueueQueryResult; } // namespace queue namespace file { const uint8_t CODE=0x9; extern const char* NAME; class FileProperties; enum ReturnCode { CONTENT_TOO_LARGE = 311, NO_ROUTE = 312, NO_CONSUMERS = 313 }; inline SerializeAs serializable(ReturnCode& e) { return SerializeAs(e); } class Qos; class QosOk; class Consume; class ConsumeOk; class Cancel; class Open; class OpenOk; class Stage; class Publish; class Return; class Deliver; class Ack; class Reject; } // namespace file namespace stream { const uint8_t CODE=0xa; extern const char* NAME; class StreamProperties; enum ReturnCode { CONTENT_TOO_LARGE = 311, NO_ROUTE = 312, NO_CONSUMERS = 313 }; inline SerializeAs serializable(ReturnCode& e) { return SerializeAs(e); } class Qos; class QosOk; class Consume; class ConsumeOk; class Cancel; class Publish; class Return; class Deliver; } // namespace stream namespace cluster { const uint8_t CODE=0x80; extern const char* NAME; class UpdateRequest; class UpdateOffer; class RetractOffer; enum StoreState { NO_STORE = 0, EMPTY_STORE = 1, CLEAN_STORE = 2, DIRTY_STORE = 3 }; inline SerializeAs serializable(StoreState& e) { return SerializeAs(e); } class InitialStatus; class Ready; class ConfigChange; enum ErrorType { NONE = 0, SESSION = 1, CONNECTION = 2 }; inline SerializeAs serializable(ErrorType& e) { return SerializeAs(e); } class ErrorCheck; class TimerWakeup; class TimerDrop; class Shutdown; class DeliverToQueue; class Clock; } // namespace cluster namespace cluster_connection { const uint8_t CODE=0x81; extern const char* NAME; class Announce; class DeliverClose; class DeliverDoOutput; class Abort; class ShadowSetUser; class ShadowPrepare; class ConsumerState; class DeliveryRecord; class TxStart; class TxAccept; class TxDequeue; class TxEnqueue; class TxPublish; class TxEnd; class AccumulatedAck; class OutputTask; class DtxStart; class DtxEnd; class DtxAck; class DtxBufferRef; class DtxWorkRecord; class SessionState; class ShadowReady; class Membership; class RetractOffer; class QueuePosition; class Exchange; class AddQueueListener; class ManagementSetupState; class Config; class QueueFairshareState; class QueueObserverState; class Clock; class QueueDequeueSincePurgeState; } // namespace cluster_connection }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_SPECIFICATION_FWD_H*/ qpidc-0.16/src/qpid/amqp_0_10/structs.h0000664000076400007640000004310211752725700020223 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_STRUCTS_H #define QPID_AMQP_0_10_STRUCTS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/specification_fwd.h" #include "qpid/amqp_0_10/Map.h" #include "qpid/amqp_0_10/Array.h" #include "qpid/amqp_0_10/Struct.h" #include "qpid/amqp_0_10/UnknownStruct.h" #include "qpid/amqp_0_10/Packer.h" namespace qpid { namespace amqp_0_10 { namespace connection { } // namespace connection namespace session { struct Header { Bit sync; static const char* NAME; static const uint8_t SIZE=1; static const uint8_t PACK=1; static const uint8_t CODE=0; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit Header(Bit sync_=Bit()); template void serialize(S& s) { s(sync); } }; inline SizedPacker
serializable(Header& x) { return SizedPacker
(x); } std::ostream& operator << (std::ostream&, const Header&); bool operator==(const Header&, const Header&); struct CommandFragment { SequenceNo commandId; ByteRanges byteRanges; static const char* NAME; static const uint8_t SIZE=0; static const uint8_t PACK=0; static const uint8_t CODE=0; static const uint8_t CLASS_CODE=session::CODE; static const char* CLASS_NAME; explicit CommandFragment( const SequenceNo& commandId_=SequenceNo(), const ByteRanges& byteRanges_=ByteRanges() ); template void serialize(S& s) { s(commandId)(byteRanges); } }; std::ostream& operator << (std::ostream&, const CommandFragment&); bool operator==(const CommandFragment&, const CommandFragment&); } // namespace session namespace execution { } // namespace execution namespace message { struct DeliveryProperties: public Struct { Bit discardUnroutable; Bit immediate; Bit redelivered; DeliveryPriority priority; DeliveryMode deliveryMode; Uint64 ttl; Datetime timestamp; Datetime expiration; exchange::Name exchange; Str8 routingKey; ResumeId resumeId; Uint64 resumeTtl; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit DeliveryProperties( Bit discardUnroutable_=Bit(), Bit immediate_=Bit(), Bit redelivered_=Bit(), const message::DeliveryPriority& priority_=message::DeliveryPriority(), const message::DeliveryMode& deliveryMode_=message::DeliveryMode(), Uint64 ttl_=Uint64(), const Datetime& timestamp_=Datetime(), const Datetime& expiration_=Datetime(), const exchange::Name& exchange_=exchange::Name(), const Str8& routingKey_=Str8(), const message::ResumeId& resumeId_=message::ResumeId(), Uint64 resumeTtl_=Uint64() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(discardUnroutable)(immediate)(redelivered)(priority)(deliveryMode)(ttl)(timestamp)(expiration)(exchange)(routingKey)(resumeId)(resumeTtl); } }; inline SizedPacker serializable(DeliveryProperties& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const DeliveryProperties&); bool operator==(const DeliveryProperties&, const DeliveryProperties&); struct FragmentProperties: public Struct { Bit first; Bit last; Uint64 fragmentSize; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit FragmentProperties( Bit first_=Bit(), Bit last_=Bit(), Uint64 fragmentSize_=Uint64() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(first)(last)(fragmentSize); } }; inline SizedPacker serializable(FragmentProperties& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const FragmentProperties&); bool operator==(const FragmentProperties&, const FragmentProperties&); struct ReplyTo { exchange::Name exchange; Str8 routingKey; static const char* NAME; static const uint8_t SIZE=2; static const uint8_t PACK=2; static const uint8_t CODE=0; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit ReplyTo( const exchange::Name& exchange_=exchange::Name(), const Str8& routingKey_=Str8() ); template void serialize(S& s) { s(exchange)(routingKey); } }; inline SizedPacker serializable(ReplyTo& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const ReplyTo&); bool operator==(const ReplyTo&, const ReplyTo&); struct MessageProperties: public Struct { Uint64 contentLength; Uuid messageId; Vbin16 correlationId; ReplyTo replyTo; Str8 contentType; Str8 contentEncoding; Vbin16 userId; Vbin16 appId; Map applicationHeaders; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit MessageProperties( Uint64 contentLength_=Uint64(), const Uuid& messageId_=Uuid(), const Vbin16& correlationId_=Vbin16(), const message::ReplyTo& replyTo_=message::ReplyTo(), const Str8& contentType_=Str8(), const Str8& contentEncoding_=Str8(), const Vbin16& userId_=Vbin16(), const Vbin16& appId_=Vbin16(), const Map& applicationHeaders_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(contentLength)(messageId)(correlationId)(replyTo)(contentType)(contentEncoding)(userId)(appId)(applicationHeaders); } }; inline SizedPacker serializable(MessageProperties& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const MessageProperties&); bool operator==(const MessageProperties&, const MessageProperties&); struct Acquired: public Struct { session::Commands transfers; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit Acquired(const session::Commands& transfers_=session::Commands()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(transfers); } }; inline SizedPacker serializable(Acquired& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const Acquired&); bool operator==(const Acquired&, const Acquired&); struct MessageResumeResult: public Struct { Uint64 offset; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x5; static const uint8_t CLASS_CODE=message::CODE; static const char* CLASS_NAME; explicit MessageResumeResult(Uint64 offset_=Uint64()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(offset); } }; inline SizedPacker serializable(MessageResumeResult& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const MessageResumeResult&); bool operator==(const MessageResumeResult&, const MessageResumeResult&); } // namespace message namespace tx { } // namespace tx namespace dtx { struct XaResult: public Struct { XaStatus status; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit XaResult(const dtx::XaStatus& status_=dtx::XaStatus()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(status); } }; inline SizedPacker serializable(XaResult& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const XaResult&); bool operator==(const XaResult&, const XaResult&); struct Xid: public Struct { Uint32 format; Vbin8 globalId; Vbin8 branchId; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x4; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit Xid( Uint32 format_=Uint32(), const Vbin8& globalId_=Vbin8(), const Vbin8& branchId_=Vbin8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(format)(globalId)(branchId); } }; inline SizedPacker serializable(Xid& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const Xid&); bool operator==(const Xid&, const Xid&); struct GetTimeoutResult: public Struct { Uint32 timeout; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit GetTimeoutResult(Uint32 timeout_=Uint32()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(timeout); } }; inline SizedPacker serializable(GetTimeoutResult& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const GetTimeoutResult&); bool operator==(const GetTimeoutResult&, const GetTimeoutResult&); struct RecoverResult: public Struct { ArrayDomain inDoubt; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x3; static const uint8_t CLASS_CODE=dtx::CODE; static const char* CLASS_NAME; explicit RecoverResult(const ArrayDomain & inDoubt_=ArrayDomain ()); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(inDoubt); } }; inline SizedPacker serializable(RecoverResult& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const RecoverResult&); bool operator==(const RecoverResult&, const RecoverResult&); } // namespace dtx namespace exchange { struct ExchangeQueryResult: public Struct { Str8 type; Bit durable; Bit notFound; Map arguments; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=exchange::CODE; static const char* CLASS_NAME; explicit ExchangeQueryResult( const Str8& type_=Str8(), Bit durable_=Bit(), Bit notFound_=Bit(), const Map& arguments_=Map() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(type)(durable)(notFound)(arguments); } }; inline SizedPacker serializable(ExchangeQueryResult& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const ExchangeQueryResult&); bool operator==(const ExchangeQueryResult&, const ExchangeQueryResult&); struct ExchangeBoundResult: public Struct { Bit exchangeNotFound; Bit queueNotFound; Bit queueNotMatched; Bit keyNotMatched; Bit argsNotMatched; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x2; static const uint8_t CLASS_CODE=exchange::CODE; static const char* CLASS_NAME; explicit ExchangeBoundResult( Bit exchangeNotFound_=Bit(), Bit queueNotFound_=Bit(), Bit queueNotMatched_=Bit(), Bit keyNotMatched_=Bit(), Bit argsNotMatched_=Bit() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(exchangeNotFound)(queueNotFound)(queueNotMatched)(keyNotMatched)(argsNotMatched); } }; inline SizedPacker serializable(ExchangeBoundResult& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const ExchangeBoundResult&); bool operator==(const ExchangeBoundResult&, const ExchangeBoundResult&); } // namespace exchange namespace queue { struct QueueQueryResult: public Struct { Name queue; exchange::Name alternateExchange; Bit durable; Bit exclusive; Bit autoDelete; Map arguments; Uint32 messageCount; Uint32 subscriberCount; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=queue::CODE; static const char* CLASS_NAME; explicit QueueQueryResult( const queue::Name& queue_=queue::Name(), const exchange::Name& alternateExchange_=exchange::Name(), Bit durable_=Bit(), Bit exclusive_=Bit(), Bit autoDelete_=Bit(), const Map& arguments_=Map(), Uint32 messageCount_=Uint32(), Uint32 subscriberCount_=Uint32() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(queue)(alternateExchange)(durable)(exclusive)(autoDelete)(arguments)(messageCount)(subscriberCount); } }; inline SizedPacker serializable(QueueQueryResult& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const QueueQueryResult&); bool operator==(const QueueQueryResult&, const QueueQueryResult&); } // namespace queue namespace file { struct FileProperties: public Struct { Str8 contentType; Str8 contentEncoding; Map headers; Uint8 priority; Str8 replyTo; Str8 messageId; Str8 filename; Datetime timestamp; Str8 clusterId; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=file::CODE; static const char* CLASS_NAME; explicit FileProperties( const Str8& contentType_=Str8(), const Str8& contentEncoding_=Str8(), const Map& headers_=Map(), Uint8 priority_=Uint8(), const Str8& replyTo_=Str8(), const Str8& messageId_=Str8(), const Str8& filename_=Str8(), const Datetime& timestamp_=Datetime(), const Str8& clusterId_=Str8() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(contentType)(contentEncoding)(headers)(priority)(replyTo)(messageId)(filename)(timestamp)(clusterId); } }; inline SizedPacker serializable(FileProperties& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const FileProperties&); bool operator==(const FileProperties&, const FileProperties&); } // namespace file namespace stream { struct StreamProperties: public Struct { Str8 contentType; Str8 contentEncoding; Map headers; Uint8 priority; Datetime timestamp; static const char* NAME; static const uint8_t SIZE=4; static const uint8_t PACK=2; static const uint8_t CODE=0x1; static const uint8_t CLASS_CODE=stream::CODE; static const char* CLASS_NAME; explicit StreamProperties( const Str8& contentType_=Str8(), const Str8& contentEncoding_=Str8(), const Map& headers_=Map(), Uint8 priority_=Uint8(), const Datetime& timestamp_=Datetime() ); void accept(Visitor&); void accept(ConstVisitor&) const; template void serialize(S& s) { s(contentType)(contentEncoding)(headers)(priority)(timestamp); } }; inline SizedPacker serializable(StreamProperties& x) { return SizedPacker(x); } std::ostream& operator << (std::ostream&, const StreamProperties&); bool operator==(const StreamProperties&, const StreamProperties&); } // namespace stream namespace cluster { } // namespace cluster namespace cluster_connection { } // namespace cluster_connection }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_STRUCTS_H*/ qpidc-0.16/src/qpid/amqp_0_10/Codecs.cpp0000664000076400007640000002612311562043333020245 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Codecs.h" #include "qpid/framing/Array.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/FieldValue.h" #include "qpid/framing/List.h" #include "qpid/log/Statement.h" #include #include #include using namespace qpid::framing; using namespace qpid::types; namespace qpid { namespace amqp_0_10 { namespace { const std::string iso885915("iso-8859-15"); const std::string utf8("utf8"); const std::string utf16("utf16"); const std::string binary("binary"); const std::string amqp0_10_binary("amqp0-10:binary"); const std::string amqp0_10_bit("amqp0-10:bit"); const std::string amqp0_10_datetime("amqp0-10:datetime"); const std::string amqp0_10_struct("amqp0-10:struct"); } template void convert(const T& from, U& to, F f) { std::transform(from.begin(), from.end(), std::inserter(to, to.begin()), f); } Variant::Map::value_type toVariantMapEntry(const FieldTable::value_type& in); FieldTable::value_type toFieldTableEntry(const Variant::Map::value_type& in); Variant toVariant(boost::shared_ptr in); boost::shared_ptr toFieldValue(const Variant& in); template void translate(boost::shared_ptr in, U& u, F f) { T t; getEncodedValue(in, t); convert(t, u, f); } template T* toFieldValueCollection(const U& u, F f) { typename T::ValueType t; convert(u, t, f); return new T(t); } FieldTableValue* toFieldTableValue(const Variant::Map& map) { FieldTable ft; convert(map, ft, &toFieldTableEntry); return new FieldTableValue(ft); } ListValue* toListValue(const Variant::List& list) { List l; convert(list, l, &toFieldValue); return new ListValue(l); } void setEncodingFor(Variant& out, uint8_t code) { switch(code){ case 0x80: case 0x90: case 0xa0: out.setEncoding(amqp0_10_binary); break; case 0x84: case 0x94: out.setEncoding(iso885915); break; case 0x85: case 0x95: out.setEncoding(utf8); break; case 0x86: case 0x96: out.setEncoding(utf16); break; case 0xab: out.setEncoding(amqp0_10_struct); break; default: //do nothing break; } } qpid::types::Uuid getUuid(FieldValue& value) { unsigned char data[16]; value.getFixedWidthValue<16>(data); return qpid::types::Uuid(data); } Variant toVariant(boost::shared_ptr in) { Variant out; //based on AMQP 0-10 typecode, pick most appropriate variant type switch (in->getType()) { //Fixed Width types: case 0x01: out.setEncoding(amqp0_10_binary); case 0x02: out = in->getIntegerValue(); break; case 0x03: out = in->getIntegerValue(); break; case 0x04: break; //TODO: iso-8859-15 char case 0x08: out = static_cast(in->getIntegerValue()); break; case 0x10: out.setEncoding(amqp0_10_binary); case 0x11: out = in->getIntegerValue(); break; case 0x12: out = in->getIntegerValue(); break; case 0x20: out.setEncoding(amqp0_10_binary); case 0x21: out = in->getIntegerValue(); break; case 0x22: out = in->getIntegerValue(); break; case 0x23: out = in->get(); break; case 0x27: break; //TODO: utf-32 char case 0x30: out.setEncoding(amqp0_10_binary); case 0x31: out = in->getIntegerValue(); break; case 0x38: out.setEncoding(amqp0_10_datetime); //treat datetime as uint64_t, but set encoding case 0x32: out = in->getIntegerValue(); break; case 0x33: out = in->get(); break; case 0x48: out = getUuid(*in); break; //TODO: figure out whether and how to map values with codes 0x40-0xd8 case 0xf0: break;//void, which is the default value for Variant case 0xf1: out.setEncoding(amqp0_10_bit); break;//treat 'bit' as void, which is the default value for Variant //Variable Width types: //strings: case 0x80: case 0x84: case 0x85: case 0x86: case 0x90: case 0x94: case 0x95: case 0x96: case 0xa0: case 0xab: out = in->get(); setEncodingFor(out, in->getType()); break; case 0xa8: out = Variant::Map(); translate(in, out.asMap(), &toVariantMapEntry); break; case 0xa9: out = Variant::List(); translate(in, out.asList(), &toVariant); break; case 0xaa: //convert amqp0-10 array into variant list out = Variant::List(); translate(in, out.asList(), &toVariant); break; default: //error? break; } return out; } boost::shared_ptr convertString(const std::string& value, const std::string& encoding) { bool large = value.size() > std::numeric_limits::max(); if (encoding.empty() || encoding == amqp0_10_binary || encoding == binary) { if (large) { return boost::shared_ptr(new Var32Value(value, 0xa0)); } else { return boost::shared_ptr(new Var16Value(value, 0x90)); } } else if (encoding == utf8) { if (!large) return boost::shared_ptr(new Str16Value(value)); throw Exception(QPID_MSG("Could not encode utf8 character string - too long (" << value.size() << " bytes)")); } else if (encoding == utf16) { if (!large) return boost::shared_ptr(new Var16Value(value, 0x96)); throw Exception(QPID_MSG("Could not encode utf16 character string - too long (" << value.size() << " bytes)")); } else if (encoding == iso885915) { if (!large) return boost::shared_ptr(new Var16Value(value, 0x94)); throw Exception(QPID_MSG("Could not encode iso-8859-15 character string - too long (" << value.size() << " bytes)")); } else { // the encoding was not recognised QPID_LOG(warning, "Unknown byte encoding: [" << encoding << "], encoding as vbin32."); return boost::shared_ptr(new Var32Value(value, 0xa0)); } } boost::shared_ptr toFieldValue(const Variant& in) { boost::shared_ptr out; switch (in.getType()) { case VAR_VOID: out = boost::shared_ptr(new VoidValue()); break; case VAR_BOOL: out = boost::shared_ptr(new BoolValue(in.asBool())); break; case VAR_UINT8: out = boost::shared_ptr(new Unsigned8Value(in.asUint8())); break; case VAR_UINT16: out = boost::shared_ptr(new Unsigned16Value(in.asUint16())); break; case VAR_UINT32: out = boost::shared_ptr(new Unsigned32Value(in.asUint32())); break; case VAR_UINT64: out = boost::shared_ptr(new Unsigned64Value(in.asUint64())); break; case VAR_INT8: out = boost::shared_ptr(new Integer8Value(in.asInt8())); break; case VAR_INT16: out = boost::shared_ptr(new Integer16Value(in.asInt16())); break; case VAR_INT32: out = boost::shared_ptr(new Integer32Value(in.asInt32())); break; case VAR_INT64: out = boost::shared_ptr(new Integer64Value(in.asInt64())); break; case VAR_FLOAT: out = boost::shared_ptr(new FloatValue(in.asFloat())); break; case VAR_DOUBLE: out = boost::shared_ptr(new DoubleValue(in.asDouble())); break; case VAR_STRING: out = convertString(in.asString(), in.getEncoding()); break; case VAR_UUID: out = boost::shared_ptr(new UuidValue(in.asUuid().data())); break; case VAR_MAP: out = boost::shared_ptr(toFieldTableValue(in.asMap())); break; case VAR_LIST: out = boost::shared_ptr(toListValue(in.asList())); break; } return out; } Variant::Map::value_type toVariantMapEntry(const FieldTable::value_type& in) { return Variant::Map::value_type(in.first, toVariant(in.second)); } FieldTable::value_type toFieldTableEntry(const Variant::Map::value_type& in) { return FieldTable::value_type(in.first, toFieldValue(in.second)); } struct EncodeBuffer { char* data; Buffer buffer; EncodeBuffer(size_t size) : data(new char[size]), buffer(data, size) {} ~EncodeBuffer() { delete[] data; } template void encode(T& t) { t.encode(buffer); } void getData(std::string& s) { s.assign(data, buffer.getSize()); } }; struct DecodeBuffer { Buffer buffer; DecodeBuffer(const std::string& s) : buffer(const_cast(s.data()), s.size()) {} template void decode(T& t) { t.decode(buffer); } }; template void _encode(const U& value, std::string& data, F f) { T t; convert(value, t, f); EncodeBuffer buffer(t.encodedSize()); buffer.encode(t); buffer.getData(data); } template void _decode(const std::string& data, U& value, F f) { T t; DecodeBuffer buffer(data); buffer.decode(t); convert(t, value, f); } void MapCodec::encode(const Variant::Map& value, std::string& data) { _encode(value, data, &toFieldTableEntry); } void MapCodec::decode(const std::string& data, Variant::Map& value) { _decode(data, value, &toVariantMapEntry); } size_t MapCodec::encodedSize(const Variant::Map& value) { std::string encoded; encode(value, encoded); return encoded.size(); } void ListCodec::encode(const Variant::List& value, std::string& data) { _encode(value, data, &toFieldValue); } void ListCodec::decode(const std::string& data, Variant::List& value) { _decode(data, value, &toVariant); } size_t ListCodec::encodedSize(const Variant::List& value) { std::string encoded; encode(value, encoded); return encoded.size(); } void translate(const Variant::Map& from, FieldTable& to) { convert(from, to, &toFieldTableEntry); } void translate(const FieldTable& from, Variant::Map& to) { convert(from, to, &toVariantMapEntry); } const std::string ListCodec::contentType("amqp/list"); const std::string MapCodec::contentType("amqp/map"); }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/Map.cpp0000664000076400007640000000420711227113407017557 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Map.h" #include "qpid/amqp_0_10/Struct32.h" #include "qpid/amqp_0_10/Array.h" #include namespace qpid { namespace amqp_0_10 { MapValue::MapValue() : code(codeFor(uint8_t(0))), blob(in_place(0)) {} MapValue::MapValue(const MapValue& x) : code(x.code), blob(x.blob) {} bool MapValue::operator==(const MapValue& x) const { return code == x.code; // FIXME aconway 2008-04-01: incomplete } struct OstreamVisitor : public MapValue::Visitor { std::ostream& out; OstreamVisitor(std::ostream& o) : out(o) {} template std::ostream& operator()(const T& t) { return out << t; } }; std::ostream& operator<<(std::ostream& o, const MapValue& m) { o << typeName(m.getCode()) << ":"; const_cast(m).apply_visitor(OstreamVisitor(o)); return o; } std::ostream& operator<<(std::ostream& o, const Map::value_type& v) { return o << v.first << "=" << v.second; } std::ostream& operator<<(std::ostream& o, const Map& map) { o << "map["; std::ostream_iterator i(o, " "); std::copy(map.begin(), map.end(), i); return o << "]"; } uint32_t Map::contentSize() const { // FIXME aconway 2008-04-03: preview to 0-10 mapping: +4 for count. return /*4 +*/ Codec::Size()(begin(), end()); } }} // namespace qpid::amqp_0_10 qpidc-0.16/src/qpid/amqp_0_10/Control.h0000664000076400007640000000416011227113407020125 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_CONTROL_H #define QPID_AMQP_0_10_CONTROL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Struct.h" namespace qpid { namespace amqp_0_10 { struct Command; struct Control; struct Action { // Base for commands & controls virtual ~Action() {} virtual Command* getCommand() { return 0; } virtual Control* getControl() { return 0; } virtual const Command* getCommand() const { return const_cast(this)->getCommand(); } virtual const Control* getControl() const { return const_cast(this)->getControl(); } static const uint8_t SIZE=0; static const uint8_t PACK=2; }; struct ControlVisitor; struct ConstControlVisitor; struct ControlHolder; struct Control : public Action, public Visitable { using Action::getControl; Control* getControl() { return this; } uint8_t getCode() const; uint8_t getClassCode() const; const char* getName() const; const char* getClassName() const; }; std::ostream& operator<<(std::ostream&, const Control&); template struct ActionType; template <> struct ActionType { typedef Control type; }; template <> struct ActionType { typedef Command type; }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_CONTROL_H*/ qpidc-0.16/src/qpid/amqp_0_10/CommandHolder.h0000664000076400007640000001634411752725700021240 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_COMMANDHOLDER_H #define QPID_AMQP_0_10_COMMANDHOLDER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/ApplyCommand.h" #include "qpid/amqp_0_10/Holder.h" #include "qpid/amqp_0_10/specification.h" namespace qpid { namespace amqp_0_10 { namespace command_max { static const size_t MAX000=0; static const size_t MAX001 = sizeof(execution::Sync) > MAX000 ? sizeof(execution::Sync) : MAX000; static const size_t MAX002 = sizeof(execution::Result) > MAX001 ? sizeof(execution::Result) : MAX001; static const size_t MAX003 = sizeof(execution::Exception) > MAX002 ? sizeof(execution::Exception) : MAX002; static const size_t MAX004 = sizeof(message::Transfer) > MAX003 ? sizeof(message::Transfer) : MAX003; static const size_t MAX005 = sizeof(message::Accept) > MAX004 ? sizeof(message::Accept) : MAX004; static const size_t MAX006 = sizeof(message::Reject) > MAX005 ? sizeof(message::Reject) : MAX005; static const size_t MAX007 = sizeof(message::Release) > MAX006 ? sizeof(message::Release) : MAX006; static const size_t MAX008 = sizeof(message::Acquire) > MAX007 ? sizeof(message::Acquire) : MAX007; static const size_t MAX009 = sizeof(message::Resume) > MAX008 ? sizeof(message::Resume) : MAX008; static const size_t MAX010 = sizeof(message::Subscribe) > MAX009 ? sizeof(message::Subscribe) : MAX009; static const size_t MAX011 = sizeof(message::Cancel) > MAX010 ? sizeof(message::Cancel) : MAX010; static const size_t MAX012 = sizeof(message::SetFlowMode) > MAX011 ? sizeof(message::SetFlowMode) : MAX011; static const size_t MAX013 = sizeof(message::Flow) > MAX012 ? sizeof(message::Flow) : MAX012; static const size_t MAX014 = sizeof(message::Flush) > MAX013 ? sizeof(message::Flush) : MAX013; static const size_t MAX015 = sizeof(message::Stop) > MAX014 ? sizeof(message::Stop) : MAX014; static const size_t MAX016 = sizeof(tx::Select) > MAX015 ? sizeof(tx::Select) : MAX015; static const size_t MAX017 = sizeof(tx::Commit) > MAX016 ? sizeof(tx::Commit) : MAX016; static const size_t MAX018 = sizeof(tx::Rollback) > MAX017 ? sizeof(tx::Rollback) : MAX017; static const size_t MAX019 = sizeof(dtx::Select) > MAX018 ? sizeof(dtx::Select) : MAX018; static const size_t MAX020 = sizeof(dtx::Start) > MAX019 ? sizeof(dtx::Start) : MAX019; static const size_t MAX021 = sizeof(dtx::End) > MAX020 ? sizeof(dtx::End) : MAX020; static const size_t MAX022 = sizeof(dtx::Commit) > MAX021 ? sizeof(dtx::Commit) : MAX021; static const size_t MAX023 = sizeof(dtx::Forget) > MAX022 ? sizeof(dtx::Forget) : MAX022; static const size_t MAX024 = sizeof(dtx::GetTimeout) > MAX023 ? sizeof(dtx::GetTimeout) : MAX023; static const size_t MAX025 = sizeof(dtx::Prepare) > MAX024 ? sizeof(dtx::Prepare) : MAX024; static const size_t MAX026 = sizeof(dtx::Recover) > MAX025 ? sizeof(dtx::Recover) : MAX025; static const size_t MAX027 = sizeof(dtx::Rollback) > MAX026 ? sizeof(dtx::Rollback) : MAX026; static const size_t MAX028 = sizeof(dtx::SetTimeout) > MAX027 ? sizeof(dtx::SetTimeout) : MAX027; static const size_t MAX029 = sizeof(exchange::Declare) > MAX028 ? sizeof(exchange::Declare) : MAX028; static const size_t MAX030 = sizeof(exchange::Delete) > MAX029 ? sizeof(exchange::Delete) : MAX029; static const size_t MAX031 = sizeof(exchange::Query) > MAX030 ? sizeof(exchange::Query) : MAX030; static const size_t MAX032 = sizeof(exchange::Bind) > MAX031 ? sizeof(exchange::Bind) : MAX031; static const size_t MAX033 = sizeof(exchange::Unbind) > MAX032 ? sizeof(exchange::Unbind) : MAX032; static const size_t MAX034 = sizeof(exchange::Bound) > MAX033 ? sizeof(exchange::Bound) : MAX033; static const size_t MAX035 = sizeof(queue::Declare) > MAX034 ? sizeof(queue::Declare) : MAX034; static const size_t MAX036 = sizeof(queue::Delete) > MAX035 ? sizeof(queue::Delete) : MAX035; static const size_t MAX037 = sizeof(queue::Purge) > MAX036 ? sizeof(queue::Purge) : MAX036; static const size_t MAX038 = sizeof(queue::Query) > MAX037 ? sizeof(queue::Query) : MAX037; static const size_t MAX039 = sizeof(file::Qos) > MAX038 ? sizeof(file::Qos) : MAX038; static const size_t MAX040 = sizeof(file::QosOk) > MAX039 ? sizeof(file::QosOk) : MAX039; static const size_t MAX041 = sizeof(file::Consume) > MAX040 ? sizeof(file::Consume) : MAX040; static const size_t MAX042 = sizeof(file::ConsumeOk) > MAX041 ? sizeof(file::ConsumeOk) : MAX041; static const size_t MAX043 = sizeof(file::Cancel) > MAX042 ? sizeof(file::Cancel) : MAX042; static const size_t MAX044 = sizeof(file::Open) > MAX043 ? sizeof(file::Open) : MAX043; static const size_t MAX045 = sizeof(file::OpenOk) > MAX044 ? sizeof(file::OpenOk) : MAX044; static const size_t MAX046 = sizeof(file::Stage) > MAX045 ? sizeof(file::Stage) : MAX045; static const size_t MAX047 = sizeof(file::Publish) > MAX046 ? sizeof(file::Publish) : MAX046; static const size_t MAX048 = sizeof(file::Return) > MAX047 ? sizeof(file::Return) : MAX047; static const size_t MAX049 = sizeof(file::Deliver) > MAX048 ? sizeof(file::Deliver) : MAX048; static const size_t MAX050 = sizeof(file::Ack) > MAX049 ? sizeof(file::Ack) : MAX049; static const size_t MAX051 = sizeof(file::Reject) > MAX050 ? sizeof(file::Reject) : MAX050; static const size_t MAX052 = sizeof(stream::Qos) > MAX051 ? sizeof(stream::Qos) : MAX051; static const size_t MAX053 = sizeof(stream::QosOk) > MAX052 ? sizeof(stream::QosOk) : MAX052; static const size_t MAX054 = sizeof(stream::Consume) > MAX053 ? sizeof(stream::Consume) : MAX053; static const size_t MAX055 = sizeof(stream::ConsumeOk) > MAX054 ? sizeof(stream::ConsumeOk) : MAX054; static const size_t MAX056 = sizeof(stream::Cancel) > MAX055 ? sizeof(stream::Cancel) : MAX055; static const size_t MAX057 = sizeof(stream::Publish) > MAX056 ? sizeof(stream::Publish) : MAX056; static const size_t MAX058 = sizeof(stream::Return) > MAX057 ? sizeof(stream::Return) : MAX057; static const size_t MAX059 = sizeof(stream::Deliver) > MAX058 ? sizeof(stream::Deliver) : MAX058; static const int MAX=MAX059; } // namespace command_max struct CommandHolder: public amqp_0_10::Holder { CommandHolder() {} template explicit CommandHolder(const T& t) : amqp_0_10::Holder(t) {} using amqp_0_10::Holder::operator=; void set(uint8_t classCode, uint8_t code); }; std::ostream& operator<<(std::ostream& o, const CommandHolder& h); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_COMMANDHOLDER_H*/ qpidc-0.16/src/qpid/amqp_0_10/Struct32.h0000664000076400007640000000343311001416137020134 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_STRUCT32_H #define QPID_AMQP_0_10_STRUCT32_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/StructHolder.h" namespace qpid { namespace amqp_0_10 { class Struct32 : public StructHolder { public: Struct32(); template explicit Struct32(const T& t) : StructHolder(t) {} template void serialize(S& s) { s.split(*this); } using StructHolder::operator=; template void encode(S& s) const { s(contentSize()); const_cast(this)->StructHolder::serialize(s); } template void decode(S& s) { uint32_t contentSz; s(contentSz); typename S::ScopedLimit l(s, contentSz); StructHolder::serialize(s); } private: uint32_t contentSize() const { return Codec::size(static_cast(*this)); } }; std::ostream& operator<<(std::ostream&, const Struct32&); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_STRUCT32_H*/ qpidc-0.16/src/qpid/amqp_0_10/SerializableString.h0000664000076400007640000000421610774744276022330 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_SERIALIZABLESTRING_H #define QPID_AMQP_0_10_SERIALIZABLESTRING_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { namespace amqp_0_10 { /** Template for length-prefixed strings/arrays. * Unique parameter allows creation of distinct SerializableString * types with the smae T/SizeType */ template struct SerializableString : public std::basic_string { SerializableString() {} template SerializableString(const U& u) : std::basic_string(u) {} template SerializableString(const I& i, const I& j) : std::basic_string(i,j) {} using std::basic_string::operator=; template void serialize(S& s) { s.split(*this); } template void encode(S& s) const { s(SizeType(this->size()))(this->begin(), this->end()); } template void decode(S& s) { SizeType newSize; s(newSize); this->resize(newSize); s(this->begin(), this->end()); } }; // TODO aconway 2008-02-29: separate ostream ops template std::ostream& operator<<(std::ostream& o, const SerializableString& s) { const std::basic_string str(s); return o << str.c_str(); // TODO aconway 2008-02-29: why doesn't o< #include namespace qpid { namespace amqp_0_10 { /** Holds data from a body frame. */ class Body { public: Body() {} Body(size_t size_) : str(size_, '\0') {} Body(const char* data_, size_t size_) : str(data_, size_) {} size_t size() const { return str.size(); }; const char* data() const { return str.data(); } char* data() { return const_cast(str.data()); } template void serialize(S& s) { s.raw(data(), size()); } private: std::string str; friend std::ostream& operator<<(std::ostream&, const Body&); }; inline std::ostream& operator<<(std::ostream& o, const Body& b) { return o << b.str.substr(0, 16) << "... (" << b.size() << ")"; } }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_BODY_H*/ qpidc-0.16/src/qpid/amqp_0_10/handlers.h0000664000076400007640000001470211752725700020320 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_HANDLERS_H #define QPID_AMQP_0_10_HANDLERS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/specification.h" namespace qpid { namespace amqp_0_10 { struct CommandHandler: public execution::Sync::Handler, public execution::Result::Handler, public execution::Exception::Handler, public message::Transfer::Handler, public message::Accept::Handler, public message::Reject::Handler, public message::Release::Handler, public message::Acquire::Handler, public message::Resume::Handler, public message::Subscribe::Handler, public message::Cancel::Handler, public message::SetFlowMode::Handler, public message::Flow::Handler, public message::Flush::Handler, public message::Stop::Handler, public tx::Select::Handler, public tx::Commit::Handler, public tx::Rollback::Handler, public dtx::Select::Handler, public dtx::Start::Handler, public dtx::End::Handler, public dtx::Commit::Handler, public dtx::Forget::Handler, public dtx::GetTimeout::Handler, public dtx::Prepare::Handler, public dtx::Recover::Handler, public dtx::Rollback::Handler, public dtx::SetTimeout::Handler, public exchange::Declare::Handler, public exchange::Delete::Handler, public exchange::Query::Handler, public exchange::Bind::Handler, public exchange::Unbind::Handler, public exchange::Bound::Handler, public queue::Declare::Handler, public queue::Delete::Handler, public queue::Purge::Handler, public queue::Query::Handler, public file::Qos::Handler, public file::QosOk::Handler, public file::Consume::Handler, public file::ConsumeOk::Handler, public file::Cancel::Handler, public file::Open::Handler, public file::OpenOk::Handler, public file::Stage::Handler, public file::Publish::Handler, public file::Return::Handler, public file::Deliver::Handler, public file::Ack::Handler, public file::Reject::Handler, public stream::Qos::Handler, public stream::QosOk::Handler, public stream::Consume::Handler, public stream::ConsumeOk::Handler, public stream::Cancel::Handler, public stream::Publish::Handler, public stream::Return::Handler, public stream::Deliver::Handler { }; struct ControlHandler: public connection::Start::Handler, public connection::StartOk::Handler, public connection::Secure::Handler, public connection::SecureOk::Handler, public connection::Tune::Handler, public connection::TuneOk::Handler, public connection::Open::Handler, public connection::OpenOk::Handler, public connection::Redirect::Handler, public connection::Heartbeat::Handler, public connection::Close::Handler, public connection::CloseOk::Handler, public session::Attach::Handler, public session::Attached::Handler, public session::Detach::Handler, public session::Detached::Handler, public session::RequestTimeout::Handler, public session::Timeout::Handler, public session::CommandPoint::Handler, public session::Expected::Handler, public session::Confirmed::Handler, public session::Completed::Handler, public session::KnownCompleted::Handler, public session::Flush::Handler, public session::Gap::Handler, public cluster::UpdateRequest::Handler, public cluster::UpdateOffer::Handler, public cluster::RetractOffer::Handler, public cluster::InitialStatus::Handler, public cluster::Ready::Handler, public cluster::ConfigChange::Handler, public cluster::ErrorCheck::Handler, public cluster::TimerWakeup::Handler, public cluster::TimerDrop::Handler, public cluster::Shutdown::Handler, public cluster::DeliverToQueue::Handler, public cluster::Clock::Handler, public cluster-connection::Announce::Handler, public cluster-connection::DeliverClose::Handler, public cluster-connection::DeliverDoOutput::Handler, public cluster-connection::Abort::Handler, public cluster-connection::ShadowSetUser::Handler, public cluster-connection::ShadowPrepare::Handler, public cluster-connection::ConsumerState::Handler, public cluster-connection::DeliveryRecord::Handler, public cluster-connection::TxStart::Handler, public cluster-connection::TxAccept::Handler, public cluster-connection::TxDequeue::Handler, public cluster-connection::TxEnqueue::Handler, public cluster-connection::TxPublish::Handler, public cluster-connection::TxEnd::Handler, public cluster-connection::AccumulatedAck::Handler, public cluster-connection::OutputTask::Handler, public cluster-connection::DtxStart::Handler, public cluster-connection::DtxEnd::Handler, public cluster-connection::DtxAck::Handler, public cluster-connection::DtxBufferRef::Handler, public cluster-connection::DtxWorkRecord::Handler, public cluster-connection::SessionState::Handler, public cluster-connection::ShadowReady::Handler, public cluster-connection::Membership::Handler, public cluster-connection::RetractOffer::Handler, public cluster-connection::QueuePosition::Handler, public cluster-connection::Exchange::Handler, public cluster-connection::AddQueueListener::Handler, public cluster-connection::ManagementSetupState::Handler, public cluster-connection::Config::Handler, public cluster-connection::QueueFairshareState::Handler, public cluster-connection::QueueObserverState::Handler, public cluster-connection::Clock::Handler, public cluster-connection::QueueDequeueSincePurgeState::Handler { }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_HANDLERS_H*/ qpidc-0.16/src/qpid/amqp_0_10/Exception.h0000664000076400007640000000652711104665316020461 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_EXCEPTION_H #define QPID_AMQP_0_10_EXCEPTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/amqp_0_10/specification_fwd.h" namespace qpid { namespace amqp_0_10 { /** * Raised when the connection is unexpectedly closed. Sessions with * non-0 timeout may be available for re-attachment on another connection. */ struct ConnectionException : public qpid::Exception { // FIXME aconway 2008-04-04: Merge qpid::ConnectionException // into this when the old code is removed. typedef connection::CloseCode Code; ConnectionException(Code c, const std::string m) : qpid::Exception(m), code(c) {} Code code; }; /** * Raised when a session is unexpectedly detached for any reason, or * if an attempt is made to use a session that is not attached. */ struct SessionException : public qpid::Exception { // FIXME aconway 2008-04-04: should not have a code at this level. // Leave in place till old preview code is gone. SessionException(int /*code*/, const std::string& msg) : qpid::Exception(msg) {} }; /** Raised when the state of a session has been destroyed */ struct SessionDestroyedException : public SessionException { // FIXME aconway 2008-04-04: should not have a code at this level. // Leave in place till old preview code is gone. SessionDestroyedException(int code, const std::string& msg) : SessionException(code, msg){} }; /** Raised when a session is destroyed due to an execution.exception */ struct SessionAbortedException : public SessionDestroyedException { typedef execution::ErrorCode Code; SessionAbortedException(Code c, const std::string m) : SessionDestroyedException(c, m), code(c) {} Code code; }; /** * Raised when a session with 0 timeout is unexpectedly detached * and therefore expires and is destroyed. */ struct SessionExpiredException : public SessionDestroyedException { typedef session::DetachCode Code; SessionExpiredException(Code c, const std::string m) : SessionDestroyedException(c, m), code(c) {} Code code; }; /** * Raised when a session with non-0 timeout is unexpectedly detached * or if an attempt is made to use a session that is not attached. * * The session is not necessarily destroyed, it may be possible to * re-attach. */ struct SessionDetachedException : public SessionException { typedef session::DetachCode Code; SessionDetachedException(Code c, const std::string m) : SessionException(c, m), code(c) {} Code code; }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_EXCEPTION_H*/ qpidc-0.16/src/qpid/amqp_0_10/StructVisitor.h0000664000076400007640000000567211752725700021372 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_STRUCTVISITOR_H #define QPID_AMQP_0_10_STRUCTVISITOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/structs.h" namespace qpid { namespace amqp_0_10 { struct StructVisitor { virtual ~StructVisitor() {} typedef Struct BaseType; virtual void visit(message::DeliveryProperties&) = 0; virtual void visit(message::FragmentProperties&) = 0; virtual void visit(message::MessageProperties&) = 0; virtual void visit(message::Acquired&) = 0; virtual void visit(message::MessageResumeResult&) = 0; virtual void visit(dtx::XaResult&) = 0; virtual void visit(dtx::Xid&) = 0; virtual void visit(dtx::GetTimeoutResult&) = 0; virtual void visit(dtx::RecoverResult&) = 0; virtual void visit(exchange::ExchangeQueryResult&) = 0; virtual void visit(exchange::ExchangeBoundResult&) = 0; virtual void visit(queue::QueueQueryResult&) = 0; virtual void visit(file::FileProperties&) = 0; virtual void visit(stream::StreamProperties&) = 0; virtual void visit(UnknownStruct&) = 0; }; struct ConstStructVisitor { virtual ~ConstStructVisitor() {} typedef const Struct BaseType; virtual void visit(const message::DeliveryProperties&) = 0; virtual void visit(const message::FragmentProperties&) = 0; virtual void visit(const message::MessageProperties&) = 0; virtual void visit(const message::Acquired&) = 0; virtual void visit(const message::MessageResumeResult&) = 0; virtual void visit(const dtx::XaResult&) = 0; virtual void visit(const dtx::Xid&) = 0; virtual void visit(const dtx::GetTimeoutResult&) = 0; virtual void visit(const dtx::RecoverResult&) = 0; virtual void visit(const exchange::ExchangeQueryResult&) = 0; virtual void visit(const exchange::ExchangeBoundResult&) = 0; virtual void visit(const queue::QueueQueryResult&) = 0; virtual void visit(const file::FileProperties&) = 0; virtual void visit(const stream::StreamProperties&) = 0; virtual void visit(const UnknownStruct&) = 0; }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_STRUCTVISITOR_H*/ qpidc-0.16/src/qpid/amqp_0_10/Holder.h0000664000076400007640000000577311227113407017735 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_HOLDER_H #define QPID_AMQP_0_10_HOLDER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Blob.h" #include "qpid/amqp_0_10/apply.h" namespace qpid { namespace amqp_0_10 { using framing::in_place; template struct InvokeVisitor { typedef void result_type; Invokable& target; InvokeVisitor(Invokable& i) : target(i) {} template void operator()(const Action& action) { action.invoke(target); } }; template class Holder : public framing::Blob { typedef framing::Blob Base; public: Holder() {} template explicit Holder(const T& value) : Base(value) {} using Base::operator=; Holder& operator=(const BaseHeld& rhs); uint8_t getCode() const { return this->get()->getCode(); } uint8_t getClassCode() const { return this->get()->getClassCode(); } template void invoke(Invokable& i) const { InvokeVisitor v(i); apply(v, *this->get()); } template void encode(S& s) const { s(getClassCode())(getCode()); } template void decode(S& s) { uint8_t code, classCode; s(classCode)(code); static_cast(this)->set(classCode, code); } template void serialize(S& s) { s.split(*this); qpid::amqp_0_10::apply(s, *this->get()); } template T* getIf() { return (getClassCode()==T::CLASS_CODE && getCode()==T::CODE) ? static_cast(this->get()) : 0; } template const T* getIf() const { return (getClassCode()==T::CLASS_CODE && getCode()==T::CODE) ? static_cast(this->get()) : 0; } private: struct Assign : public ApplyFunctor { Holder& holder; Assign(Holder& x) : holder(x) {} template void operator()(const T& rhs) { holder=rhs; } }; }; template Holder& Holder::operator=(const B& rhs) { Assign assign(*this); qpid::amqp_0_10::apply(assign, rhs); return *this; } }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_HOLDER_H*/ qpidc-0.16/src/qpid/amqp_0_10/Packer.h0000664000076400007640000001175211001416137017713 0ustar00jrossjross00000000000000#ifndef QPID_PACKER_H #define QPID_PACKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "qpid/amqp_0_10/built_in_types.h" namespace qpid { namespace amqp_0_10 { /** Serialization for optional values */ template struct SerializableOptional { boost::optional& optional; SerializableOptional(boost::optional& x) : optional(x) {} template void serialize(S& s) { if (optional) s(*optional); } }; }} namespace boost { // For argument dependent lookup. template qpid::amqp_0_10::SerializableOptional serializable(boost::optional& x) { return qpid::amqp_0_10::SerializableOptional(x); } } // namespace boost namespace qpid { namespace amqp_0_10 { /** "Encoder" that encodes a struct as a set of bit flags * for all non-empty members. */ class PackBits { public: PackBits() : bit(1), bits(0) {} void setBit(bool b) { if (b) bits |= bit; bit <<= 1; } uint32_t getBits() { return bits; } /** The bit is always set for non-optional values. */ template PackBits& operator()(const T&) { setBit(1); return *this; } /** For optional values the bit is set if the value is present. */ template PackBits& operator()(const boost::optional& opt) { setBit(opt); return *this; } /** Bits are special optional values */ PackBits& operator()(Bit b) { setBit(b); return *this; } private: uint32_t bit; uint32_t bits; }; /** Bit mask to encode a packable struct */ template uint32_t packBits(const T& t) { PackBits pack; const_cast(t).serialize(pack); return pack.getBits(); } /** Decode members enabled by Bits */ template class PackedDecoder { public: PackedDecoder(Decoder& d, Bits b) : decode(d), bits(b) {} template PackedDecoder& operator()(T& t) { if (bits & 1) decode(t); else t = T(); // FIXME aconway 2008-04-10: When we have all optionals // represented by boost::optional the line above should be: // throw CommandInvalidException("A required value was omitted."); bits >>= 1; return *this; } template PackedDecoder& operator()(boost::optional& opt) { if (bits & 1) { opt = T(); decode(*opt); } else opt = boost::none; bits >>= 1; return *this; } private: Decoder& decode; Bits bits; }; /** Metafunction to compute type to contain pack bits. */ template struct UintOfSize; template <> struct UintOfSize<1> { typedef uint8_t type; }; template <> struct UintOfSize<2> { typedef uint16_t type; }; template <> struct UintOfSize<4> { typedef uint32_t type; }; /** * Helper to serialize packed structs. */ template class Packer { public: typedef typename UintOfSize::type Bits; Packer(T& t) : data(t) {} template void serialize(S& s) { s.split(*this); } template void encode(S& s) const { Bits bits = packBits(data); s.littleEnd(bits); data.serialize(s); } template void decode(S& s) { Bits bits; s.littleEnd(bits); PackedDecoder decode(s, bits); data.serialize(decode); } protected: T& data; }; template struct SizedPacker : public Packer { typedef typename UintOfSize::type Size; SizedPacker(T& t) : Packer(t) {} template void serialize(S& s) { s.split(*this); } template void encode(S& s) const { Codec::Size sizer; this->data.serialize(sizer); Size size=size_t(sizer)+T::PACK; // Size with pack bits. s(size); Packer::encode(s); } template void decode(S& s) { Size size; s(size); typename S::ScopedLimit l(s, size); Packer::decode(s); } }; template struct SizedPacker : public Packer { SizedPacker(T& t) : Packer(t) {} }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_PACKER_H*/ qpidc-0.16/src/qpid/amqp_0_10/ApplyStruct.h0000664000076400007640000000703611752725700021014 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_APPLYSTRUCT_H #define QPID_AMQP_0_10_APPLYSTRUCT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/StructVisitor.h" #include "qpid/amqp_0_10/apply.h" namespace qpid { namespace amqp_0_10 { template struct ApplyVisitor: public ApplyVisitorBase { virtual void visit(message::DeliveryProperties& x) { this->invoke(x); } virtual void visit(message::FragmentProperties& x) { this->invoke(x); } virtual void visit(message::MessageProperties& x) { this->invoke(x); } virtual void visit(message::Acquired& x) { this->invoke(x); } virtual void visit(message::MessageResumeResult& x) { this->invoke(x); } virtual void visit(dtx::XaResult& x) { this->invoke(x); } virtual void visit(dtx::Xid& x) { this->invoke(x); } virtual void visit(dtx::GetTimeoutResult& x) { this->invoke(x); } virtual void visit(dtx::RecoverResult& x) { this->invoke(x); } virtual void visit(exchange::ExchangeQueryResult& x) { this->invoke(x); } virtual void visit(exchange::ExchangeBoundResult& x) { this->invoke(x); } virtual void visit(queue::QueueQueryResult& x) { this->invoke(x); } virtual void visit(file::FileProperties& x) { this->invoke(x); } virtual void visit(stream::StreamProperties& x) { this->invoke(x); } virtual void visit(UnknownStruct& x) { this->invoke(x); } }; template struct ApplyVisitor: public ApplyVisitorBase { virtual void visit(const message::DeliveryProperties& x) { this->invoke(x); } virtual void visit(const message::FragmentProperties& x) { this->invoke(x); } virtual void visit(const message::MessageProperties& x) { this->invoke(x); } virtual void visit(const message::Acquired& x) { this->invoke(x); } virtual void visit(const message::MessageResumeResult& x) { this->invoke(x); } virtual void visit(const dtx::XaResult& x) { this->invoke(x); } virtual void visit(const dtx::Xid& x) { this->invoke(x); } virtual void visit(const dtx::GetTimeoutResult& x) { this->invoke(x); } virtual void visit(const dtx::RecoverResult& x) { this->invoke(x); } virtual void visit(const exchange::ExchangeQueryResult& x) { this->invoke(x); } virtual void visit(const exchange::ExchangeBoundResult& x) { this->invoke(x); } virtual void visit(const queue::QueueQueryResult& x) { this->invoke(x); } virtual void visit(const file::FileProperties& x) { this->invoke(x); } virtual void visit(const stream::StreamProperties& x) { this->invoke(x); } virtual void visit(const UnknownStruct& x) { this->invoke(x); } }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_APPLYSTRUCT_H*/ qpidc-0.16/src/qpid/amqp_0_10/ControlVisitor.h0000664000076400007640000002267711752725700021532 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_CONTROLVISITOR_H #define QPID_AMQP_0_10_CONTROLVISITOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/amqp_0_10/specification.h" namespace qpid { namespace amqp_0_10 { struct ControlVisitor { virtual ~ControlVisitor() {} typedef Control BaseType; virtual void visit(connection::Start&) = 0; virtual void visit(connection::StartOk&) = 0; virtual void visit(connection::Secure&) = 0; virtual void visit(connection::SecureOk&) = 0; virtual void visit(connection::Tune&) = 0; virtual void visit(connection::TuneOk&) = 0; virtual void visit(connection::Open&) = 0; virtual void visit(connection::OpenOk&) = 0; virtual void visit(connection::Redirect&) = 0; virtual void visit(connection::Heartbeat&) = 0; virtual void visit(connection::Close&) = 0; virtual void visit(connection::CloseOk&) = 0; virtual void visit(session::Attach&) = 0; virtual void visit(session::Attached&) = 0; virtual void visit(session::Detach&) = 0; virtual void visit(session::Detached&) = 0; virtual void visit(session::RequestTimeout&) = 0; virtual void visit(session::Timeout&) = 0; virtual void visit(session::CommandPoint&) = 0; virtual void visit(session::Expected&) = 0; virtual void visit(session::Confirmed&) = 0; virtual void visit(session::Completed&) = 0; virtual void visit(session::KnownCompleted&) = 0; virtual void visit(session::Flush&) = 0; virtual void visit(session::Gap&) = 0; virtual void visit(cluster::UpdateRequest&) = 0; virtual void visit(cluster::UpdateOffer&) = 0; virtual void visit(cluster::RetractOffer&) = 0; virtual void visit(cluster::InitialStatus&) = 0; virtual void visit(cluster::Ready&) = 0; virtual void visit(cluster::ConfigChange&) = 0; virtual void visit(cluster::ErrorCheck&) = 0; virtual void visit(cluster::TimerWakeup&) = 0; virtual void visit(cluster::TimerDrop&) = 0; virtual void visit(cluster::Shutdown&) = 0; virtual void visit(cluster::DeliverToQueue&) = 0; virtual void visit(cluster::Clock&) = 0; virtual void visit(cluster-connection::Announce&) = 0; virtual void visit(cluster-connection::DeliverClose&) = 0; virtual void visit(cluster-connection::DeliverDoOutput&) = 0; virtual void visit(cluster-connection::Abort&) = 0; virtual void visit(cluster-connection::ShadowSetUser&) = 0; virtual void visit(cluster-connection::ShadowPrepare&) = 0; virtual void visit(cluster-connection::ConsumerState&) = 0; virtual void visit(cluster-connection::DeliveryRecord&) = 0; virtual void visit(cluster-connection::TxStart&) = 0; virtual void visit(cluster-connection::TxAccept&) = 0; virtual void visit(cluster-connection::TxDequeue&) = 0; virtual void visit(cluster-connection::TxEnqueue&) = 0; virtual void visit(cluster-connection::TxPublish&) = 0; virtual void visit(cluster-connection::TxEnd&) = 0; virtual void visit(cluster-connection::AccumulatedAck&) = 0; virtual void visit(cluster-connection::OutputTask&) = 0; virtual void visit(cluster-connection::DtxStart&) = 0; virtual void visit(cluster-connection::DtxEnd&) = 0; virtual void visit(cluster-connection::DtxAck&) = 0; virtual void visit(cluster-connection::DtxBufferRef&) = 0; virtual void visit(cluster-connection::DtxWorkRecord&) = 0; virtual void visit(cluster-connection::SessionState&) = 0; virtual void visit(cluster-connection::ShadowReady&) = 0; virtual void visit(cluster-connection::Membership&) = 0; virtual void visit(cluster-connection::RetractOffer&) = 0; virtual void visit(cluster-connection::QueuePosition&) = 0; virtual void visit(cluster-connection::Exchange&) = 0; virtual void visit(cluster-connection::AddQueueListener&) = 0; virtual void visit(cluster-connection::ManagementSetupState&) = 0; virtual void visit(cluster-connection::Config&) = 0; virtual void visit(cluster-connection::QueueFairshareState&) = 0; virtual void visit(cluster-connection::QueueObserverState&) = 0; virtual void visit(cluster-connection::Clock&) = 0; virtual void visit(cluster-connection::QueueDequeueSincePurgeState&) = 0; }; struct ConstControlVisitor { virtual ~ConstControlVisitor() {} typedef const Control BaseType; virtual void visit(const connection::Start&) = 0; virtual void visit(const connection::StartOk&) = 0; virtual void visit(const connection::Secure&) = 0; virtual void visit(const connection::SecureOk&) = 0; virtual void visit(const connection::Tune&) = 0; virtual void visit(const connection::TuneOk&) = 0; virtual void visit(const connection::Open&) = 0; virtual void visit(const connection::OpenOk&) = 0; virtual void visit(const connection::Redirect&) = 0; virtual void visit(const connection::Heartbeat&) = 0; virtual void visit(const connection::Close&) = 0; virtual void visit(const connection::CloseOk&) = 0; virtual void visit(const session::Attach&) = 0; virtual void visit(const session::Attached&) = 0; virtual void visit(const session::Detach&) = 0; virtual void visit(const session::Detached&) = 0; virtual void visit(const session::RequestTimeout&) = 0; virtual void visit(const session::Timeout&) = 0; virtual void visit(const session::CommandPoint&) = 0; virtual void visit(const session::Expected&) = 0; virtual void visit(const session::Confirmed&) = 0; virtual void visit(const session::Completed&) = 0; virtual void visit(const session::KnownCompleted&) = 0; virtual void visit(const session::Flush&) = 0; virtual void visit(const session::Gap&) = 0; virtual void visit(const cluster::UpdateRequest&) = 0; virtual void visit(const cluster::UpdateOffer&) = 0; virtual void visit(const cluster::RetractOffer&) = 0; virtual void visit(const cluster::InitialStatus&) = 0; virtual void visit(const cluster::Ready&) = 0; virtual void visit(const cluster::ConfigChange&) = 0; virtual void visit(const cluster::ErrorCheck&) = 0; virtual void visit(const cluster::TimerWakeup&) = 0; virtual void visit(const cluster::TimerDrop&) = 0; virtual void visit(const cluster::Shutdown&) = 0; virtual void visit(const cluster::DeliverToQueue&) = 0; virtual void visit(const cluster::Clock&) = 0; virtual void visit(const cluster-connection::Announce&) = 0; virtual void visit(const cluster-connection::DeliverClose&) = 0; virtual void visit(const cluster-connection::DeliverDoOutput&) = 0; virtual void visit(const cluster-connection::Abort&) = 0; virtual void visit(const cluster-connection::ShadowSetUser&) = 0; virtual void visit(const cluster-connection::ShadowPrepare&) = 0; virtual void visit(const cluster-connection::ConsumerState&) = 0; virtual void visit(const cluster-connection::DeliveryRecord&) = 0; virtual void visit(const cluster-connection::TxStart&) = 0; virtual void visit(const cluster-connection::TxAccept&) = 0; virtual void visit(const cluster-connection::TxDequeue&) = 0; virtual void visit(const cluster-connection::TxEnqueue&) = 0; virtual void visit(const cluster-connection::TxPublish&) = 0; virtual void visit(const cluster-connection::TxEnd&) = 0; virtual void visit(const cluster-connection::AccumulatedAck&) = 0; virtual void visit(const cluster-connection::OutputTask&) = 0; virtual void visit(const cluster-connection::DtxStart&) = 0; virtual void visit(const cluster-connection::DtxEnd&) = 0; virtual void visit(const cluster-connection::DtxAck&) = 0; virtual void visit(const cluster-connection::DtxBufferRef&) = 0; virtual void visit(const cluster-connection::DtxWorkRecord&) = 0; virtual void visit(const cluster-connection::SessionState&) = 0; virtual void visit(const cluster-connection::ShadowReady&) = 0; virtual void visit(const cluster-connection::Membership&) = 0; virtual void visit(const cluster-connection::RetractOffer&) = 0; virtual void visit(const cluster-connection::QueuePosition&) = 0; virtual void visit(const cluster-connection::Exchange&) = 0; virtual void visit(const cluster-connection::AddQueueListener&) = 0; virtual void visit(const cluster-connection::ManagementSetupState&) = 0; virtual void visit(const cluster-connection::Config&) = 0; virtual void visit(const cluster-connection::QueueFairshareState&) = 0; virtual void visit(const cluster-connection::QueueObserverState&) = 0; virtual void visit(const cluster-connection::Clock&) = 0; virtual void visit(const cluster-connection::QueueDequeueSincePurgeState&) = 0; }; }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_CONTROLVISITOR_H*/ qpidc-0.16/src/qpid/SessionState.h0000664000076400007640000002203711426033270017457 0ustar00jrossjross00000000000000#ifndef QPID_SESSIONSTATE_H #define QPID_SESSIONSTATE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include namespace qpid { using framing::SequenceNumber; using framing::SequenceSet; /** A point in the session. Points to command id + offset */ struct SessionPoint : boost::totally_ordered1 { QPID_COMMON_EXTERN SessionPoint(SequenceNumber command = 0, uint64_t offset = 0); SequenceNumber command; uint64_t offset; /** Advance past frame f */ QPID_COMMON_EXTERN void advance(const framing::AMQFrame& f); QPID_COMMON_EXTERN bool operator<(const SessionPoint&) const; QPID_COMMON_EXTERN bool operator==(const SessionPoint&) const; }; QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SessionPoint&); /** * Support for session idempotence barrier and resume as defined in * AMQP 0-10. * * We only issue/use contiguous confirmations, out-of-order confirmation * is ignored. Out of order completion is fully supported. * * Raises NotImplemented if the command point is set greater than the * max currently received command data, either explicitly via * session.command-point or implicitly via session.gap. * * Partial replay is not supported, replay always begins on a command * boundary, and we never confirm partial commands. * * The SessionPoint data structure does store offsets so this class * could be extended to support partial replay without * source-incompatbile API changes. */ class SessionState { typedef std::vector ReplayList; public: typedef boost::iterator_range ReplayRange; struct Configuration { QPID_COMMON_EXTERN Configuration(size_t flush=1024*1024, size_t hard=0); size_t replayFlushLimit; // Flush when the replay list >= N bytes. 0 disables. size_t replayHardLimit; // Kill session if replay list > N bytes. 0 disables. }; QPID_COMMON_EXTERN SessionState(const SessionId& =SessionId(), const Configuration& =Configuration()); QPID_COMMON_EXTERN virtual ~SessionState(); bool hasState() const; const SessionId& getId() const { return id; } QPID_COMMON_EXTERN virtual uint32_t getTimeout() const; QPID_COMMON_EXTERN virtual void setTimeout(uint32_t seconds); bool operator==(const SessionId& other) const { return id == other; } bool operator==(const SessionState& other) const { return id == other.id; } // ==== Functions for sender state. /** Record frame f for replay. Should not be called during replay. */ QPID_COMMON_EXTERN virtual void senderRecord(const framing::AMQFrame& f); /** @return true if we should send flush for confirmed and completed commands. */ QPID_COMMON_EXTERN virtual bool senderNeedFlush() const; /** Called when flush for confirmed and completed commands is sent to peer. */ QPID_COMMON_EXTERN virtual void senderRecordFlush(); /** True if we should reply to the next incoming completed command */ QPID_COMMON_EXTERN virtual bool senderNeedKnownCompleted() const; /** Called when knownCompleted is sent to peer. */ QPID_COMMON_EXTERN virtual void senderRecordKnownCompleted(); /** Called when the peer confirms up to comfirmed. */ QPID_COMMON_EXTERN virtual void senderConfirmed(const SessionPoint& confirmed); /** Called when the peer indicates commands completed */ QPID_COMMON_EXTERN virtual void senderCompleted(const SequenceSet& commands); /** Point from which the next new (not replayed) data will be sent. */ QPID_COMMON_EXTERN virtual SessionPoint senderGetCommandPoint(); /** Set of outstanding incomplete commands */ QPID_COMMON_EXTERN virtual SequenceSet senderGetIncomplete() const; /** Point from which we can replay. */ QPID_COMMON_EXTERN virtual SessionPoint senderGetReplayPoint() const; /** Peer expecting commands from this point. *@return Range of frames to be replayed. */ QPID_COMMON_EXTERN virtual ReplayRange senderExpected(const SessionPoint& expected); // ==== Functions for receiver state /** Set the command point. */ QPID_COMMON_EXTERN virtual void receiverSetCommandPoint(const SessionPoint& point); /** Returns true if frame should be be processed, false if it is a duplicate. */ QPID_COMMON_EXTERN virtual bool receiverRecord(const framing::AMQFrame& f); /** Command completed locally */ QPID_COMMON_EXTERN virtual void receiverCompleted(SequenceNumber command, bool cumulative=false); /** Peer has indicated commands are known completed */ QPID_COMMON_EXTERN virtual void receiverKnownCompleted(const SequenceSet& commands); /** True if the next completed control should set the timely-reply argument * to request a knonw-completed response. */ QPID_COMMON_EXTERN virtual bool receiverNeedKnownCompleted() const; /** Get the incoming command point */ QPID_COMMON_EXTERN virtual const SessionPoint& receiverGetExpected() const; /** Get the received high-water-mark, may be > getExpected() during replay */ QPID_COMMON_EXTERN virtual const SessionPoint& receiverGetReceived() const; /** Completed received commands that the peer may not know about. */ QPID_COMMON_EXTERN virtual const SequenceSet& receiverGetUnknownComplete() const; /** Incomplete received commands. */ QPID_COMMON_EXTERN virtual const SequenceSet& receiverGetIncomplete() const; /** ID of the command currently being handled. */ QPID_COMMON_EXTERN virtual SequenceNumber receiverGetCurrent() const; /** Set the state variables, used to create a session that will resume * from some previously established point. */ QPID_COMMON_EXTERN virtual void setState( const SequenceNumber& replayStart, const SequenceNumber& sendCommandPoint, const SequenceSet& sentIncomplete, const SequenceNumber& expected, const SequenceNumber& received, const SequenceSet& unknownCompleted, const SequenceSet& receivedIncomplete ); /** * So called 'push' bridges work by faking a subscribe request * (and the accompanying flows etc) to the local broker to initiate * the outflow of messages for the bridge. * * As the peer doesn't send these it cannot include them in its * session state. To keep the session state on either side of the * bridge in sync, this hack allows the tracking of state for * received messages to be disabled for the faked commands and * subsequently re-enabled. */ QPID_COMMON_EXTERN void disableReceiverTracking(); QPID_COMMON_EXTERN void enableReceiverTracking(); private: struct SendState { SendState(); // invariant: replayPoint <= flushPoint <= sendPoint SessionPoint replayPoint; // Can replay from this point SessionPoint flushPoint; // Point of last flush SessionPoint sendPoint; // Send from this point ReplayList replayList; // Starts from replayPoint. size_t unflushedSize; // Un-flushed bytes in replay list. size_t replaySize; // Total bytes in replay list. SequenceSet incomplete; // Commands sent and not yet completed. size_t bytesSinceKnownCompleted; // Bytes sent since we last issued a knownCompleted. } sender; struct ReceiveState { ReceiveState(); SessionPoint expected; // Expected from here SessionPoint received; // Received to here. Invariant: expected <= received. SequenceSet unknownCompleted; // Received & completed, may not not known-complete by peer. SequenceSet incomplete; // Incomplete received commands. size_t bytesSinceKnownCompleted; // Bytes sent since we last issued a knownCompleted. } receiver; SessionId id; uint32_t timeout; Configuration config; bool stateful; bool receiverTrackingDisabled;//very nasty hack for 'push' bridges }; inline bool operator==(const SessionId& id, const SessionState& s) { return s == id; } } // namespace qpid #endif /*!QPID_SESSIONSTATE_H*/ qpidc-0.16/src/qpid/assert.cpp0000664000076400007640000000270511330364270016670 0ustar00jrossjross00000000000000#ifndef QPID_ASSERT_CPP #define QPID_ASSERT_CPP /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include namespace qpid { void assert_fail(char const * expr, char const * function, char const * file, long line) { std::ostringstream msg; msg << "Assertion failed: " << expr << " in function " << function << "(" << file << ":" << line << ")"; QPID_LOG(critical, msg.str()); #ifdef NDEBUG throw framing::InternalErrorException(msg.str()); #else std::cerr << msg.str() << std::endl; abort(); #endif } } // namespace qpid #endif /*!QPID_ASSERT_CPP*/ qpidc-0.16/src/qpid/Modules.h0000664000076400007640000000260311227113407016440 0ustar00jrossjross00000000000000#ifndef QPID_MODULES_H #define QPID_MODULES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Options.h" #include #include #include "qpid/CommonImportExport.h" namespace qpid { struct ModuleOptions : public qpid::Options { std::string loadDir; std::vector load; bool noLoad; QPID_COMMON_EXTERN ModuleOptions(const std::string& defaultModuleDir); }; QPID_COMMON_EXTERN void tryShlib(const char* libname, bool noThrow); QPID_COMMON_EXTERN void loadModuleDir (std::string dirname, bool isDefault); } // namespace qpid #endif /*!QPID_MODULES_H*/ qpidc-0.16/src/qpid/management/0000775000076400007640000000000011752725715017010 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/management/ManagementTopicExchange.cpp0000664000076400007640000000523611725210040024214 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/management/ManagementTopicExchange.h" #include "qpid/log/Statement.h" using namespace qpid::management; using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::sys; ManagementTopicExchange::ManagementTopicExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange (_name, _parent, b), TopicExchange(_name, _parent, b), managementAgent(0) {} ManagementTopicExchange::ManagementTopicExchange(const std::string& _name, bool _durable, const FieldTable& _args, Manageable* _parent, Broker* b) : Exchange (_name, _durable, _args, _parent, b), TopicExchange(_name, _durable, _args, _parent, b), managementAgent(0) {} void ManagementTopicExchange::route(Deliverable& msg) { bool routeIt = true; const string& routingKey = msg.getMessage().getRoutingKey(); const FieldTable* args = msg.getMessage().getApplicationHeaders(); // Intercept management agent commands if (managementAgent) routeIt = managementAgent->dispatchCommand(msg, routingKey, args, true, qmfVersion); if (routeIt) TopicExchange::route(msg); } bool ManagementTopicExchange::bind(Queue::shared_ptr queue, const string& routingKey, const qpid::framing::FieldTable* args) { if (qmfVersion == 1) managementAgent->clientAdded(routingKey); return TopicExchange::bind(queue, routingKey, args); } void ManagementTopicExchange::setManagmentAgent(ManagementAgent* agent, int qv) { managementAgent = agent; qmfVersion = qv; } ManagementTopicExchange::~ManagementTopicExchange() {} const std::string ManagementTopicExchange::typeName("management-topic"); qpidc-0.16/src/qpid/management/ManagementObject.cpp0000664000076400007640000002365411515324363022720 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/management/Manageable.h" #include "qpid/management/ManagementObject.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/Buffer.h" #include "qpid/sys/Time.h" #include "qpid/sys/Thread.h" #include "qpid/log/Statement.h" #include #include using namespace std; using namespace qpid; using namespace qpid::management; void AgentAttachment::setBanks(uint32_t broker, uint32_t bank) { first = ((uint64_t) (broker & 0x000fffff)) << 28 | ((uint64_t) (bank & 0x0fffffff)); } // Deprecated ObjectId::ObjectId(uint8_t flags, uint16_t seq, uint32_t broker, uint64_t object) : agent(0), agentEpoch(seq) { first = ((uint64_t) (flags & 0x0f)) << 60 | ((uint64_t) (seq & 0x0fff)) << 48 | ((uint64_t) (broker & 0x000fffff)) << 28; second = object; } ObjectId::ObjectId(uint8_t flags, uint16_t seq, uint32_t broker) : agent(0), second(0), agentEpoch(seq) { first = ((uint64_t) (flags & 0x0f)) << 60 | ((uint64_t) (seq & 0x0fff)) << 48 | ((uint64_t) (broker & 0x000fffff)) << 28; } ObjectId::ObjectId(AgentAttachment* _agent, uint8_t flags, uint16_t seq) : agent(_agent), second(0), agentEpoch(seq) { first = ((uint64_t) (flags & 0x0f)) << 60 | ((uint64_t) (seq & 0x0fff)) << 48; } ObjectId::ObjectId(istream& in) : agent(0) { string text; in >> text; fromString(text); } ObjectId::ObjectId(const string& text) : agent(0) { fromString(text); } void ObjectId::fromString(const string& text) { #define FIELDS 5 #if defined (_WIN32) && !defined (atoll) # define atoll(X) _atoi64(X) #endif // format: // V1: ---- // V2: Not used string copy(text.c_str()); char* cText; char* field[FIELDS]; bool atFieldStart = true; int idx = 0; cText = const_cast(copy.c_str()); for (char* cursor = cText; *cursor; cursor++) { if (atFieldStart) { if (idx >= FIELDS) throw Exception("Invalid ObjectId format"); field[idx++] = cursor; atFieldStart = false; } else { if (*cursor == '-') { *cursor = '\0'; atFieldStart = true; } } } if (idx != FIELDS) throw Exception("Invalid ObjectId format"); agentEpoch = atoll(field[1]); first = (atoll(field[0]) << 60) + (atoll(field[1]) << 48) + (atoll(field[2]) << 28); agentName = string(field[3]); second = atoll(field[4]); } bool ObjectId::operator==(const ObjectId &other) const { return v2Key == other.v2Key; } bool ObjectId::operator<(const ObjectId &other) const { return v2Key < other.v2Key; } bool ObjectId::equalV1(const ObjectId &other) const { uint64_t otherFirst = agent == 0 ? other.first : other.first & 0xffff000000000000LL; return first == otherFirst && second == other.second; } // encode as V1-format binary void ObjectId::encode(string& buffer) const { const uint32_t len = 16; char _data[len]; qpid::framing::Buffer body(_data, len); if (agent == 0) body.putLongLong(first); else body.putLongLong(first | agent->first); body.putLongLong(second); body.reset(); body.getRawData(buffer, len); } // decode as V1-format binary void ObjectId::decode(const string& buffer) { const uint32_t len = 16; char _data[len]; qpid::framing::Buffer body(_data, len); body.checkAvailable(buffer.length()); body.putRawData(buffer); body.reset(); first = body.getLongLong(); second = body.getLongLong(); v2Key = boost::lexical_cast(second); } // generate the V2 key from the index fields defined // in the schema. void ObjectId::setV2Key(const ManagementObject& object) { stringstream oname; oname << object.getPackageName() << ":" << object.getClassName() << ":" << object.getKey(); v2Key = oname.str(); } // encode as V2-format map void ObjectId::mapEncode(types::Variant::Map& map) const { map["_object_name"] = v2Key; if (!agentName.empty()) map["_agent_name"] = agentName; if (agentEpoch) map["_agent_epoch"] = agentEpoch; } // decode as v2-format map void ObjectId::mapDecode(const types::Variant::Map& map) { types::Variant::Map::const_iterator i; if ((i = map.find("_object_name")) != map.end()) v2Key = i->second.asString(); else throw Exception("Required _object_name field missing."); if ((i = map.find("_agent_name")) != map.end()) agentName = i->second.asString(); if ((i = map.find("_agent_epoch")) != map.end()) agentEpoch = i->second.asInt64(); } ObjectId::operator types::Variant::Map() const { types::Variant::Map m; mapEncode(m); return m; } namespace qpid { namespace management { ostream& operator<<(ostream& out, const ObjectId& i) { uint64_t virtFirst = i.first; if (i.agent) virtFirst |= i.agent->getFirst(); out << ((virtFirst & 0xF000000000000000LL) >> 60) << "-" << ((virtFirst & 0x0FFF000000000000LL) >> 48) << "-" << ((virtFirst & 0x0000FFFFF0000000LL) >> 28) << "-" << i.agentName << "-" << i.second << "(" << i.v2Key << ")"; return out; } }} ManagementObject::ManagementObject(Manageable* _core) : createTime(qpid::sys::Duration(sys::EPOCH, sys::now())), destroyTime(0), updateTime(createTime), configChanged(true), instChanged(true), deleted(false), coreObject(_core), flags(0), forcePublish(false) {} void ManagementObject::setUpdateTime() { updateTime = sys::Duration(sys::EPOCH, sys::now()); } void ManagementObject::resourceDestroy() { QPID_LOG(trace, "Management object marked deleted: " << getObjectId().getV2Key()); destroyTime = sys::Duration(sys::EPOCH, sys::now()); deleted = true; } int ManagementObject::maxThreads = 1; int ManagementObject::nextThreadIndex = 0; void ManagementObject::writeTimestamps (string& buf) const { char _data[4000]; qpid::framing::Buffer body(_data, 4000); body.putShortString (getPackageName ()); body.putShortString (getClassName ()); body.putBin128 (getMd5Sum ()); body.putLongLong (updateTime); body.putLongLong (createTime); body.putLongLong (destroyTime); uint32_t len = body.getPosition(); body.reset(); body.getRawData(buf, len); string oid; objectId.encode(oid); buf += oid; } void ManagementObject::readTimestamps (const string& buf) { char _data[4000]; qpid::framing::Buffer body(_data, 4000); string unused; uint8_t unusedUuid[16]; body.checkAvailable(buf.length()); body.putRawData(buf); body.reset(); body.getShortString(unused); body.getShortString(unused); body.getBin128(unusedUuid); updateTime = body.getLongLong(); createTime = body.getLongLong(); destroyTime = body.getLongLong(); } uint32_t ManagementObject::writeTimestampsSize() const { return 1 + getPackageName().length() + // str8 1 + getClassName().length() + // str8 16 + // bin128 8 + // uint64 8 + // uint64 8 + // uint64 objectId.encodedSize(); // objectId } void ManagementObject::writeTimestamps (types::Variant::Map& map) const { // types::Variant::Map oid, sid; // sid["_package_name"] = getPackageName(); // sid["_class_name"] = getClassName(); // sid["_hash"] = qpid::types::Uuid(getMd5Sum()); // map["_schema_id"] = sid; // objectId.mapEncode(oid); // map["_object_id"] = oid; map["_update_ts"] = updateTime; map["_create_ts"] = createTime; map["_delete_ts"] = destroyTime; } void ManagementObject::readTimestamps (const types::Variant::Map& map) { types::Variant::Map::const_iterator i; if ((i = map.find("_update_ts")) != map.end()) updateTime = i->second.asUint64(); if ((i = map.find("_create_ts")) != map.end()) createTime = i->second.asUint64(); if ((i = map.find("_delete_ts")) != map.end()) destroyTime = i->second.asUint64(); } void ManagementObject::setReference(ObjectId) {} int ManagementObject::getThreadIndex() { static QPID_TSS int thisIndex = -1; if (thisIndex == -1) { Mutex::ScopedLock mutex(accessLock); thisIndex = nextThreadIndex; if (nextThreadIndex < maxThreads - 1) nextThreadIndex++; } return thisIndex; } // void ManagementObject::mapEncode(types::Variant::Map& map, // bool includeProperties, // bool includeStatistics) // { // types::Variant::Map values; // writeTimestamps(map); // mapEncodeValues(values, includeProperties, includeStatistics); // map["_values"] = values; // } // void ManagementObject::mapDecode(const types::Variant::Map& map) // { // types::Variant::Map::const_iterator i; // readTimestamps(map); // if ((i = map.find("_values")) != map.end()) // mapDecodeValues(i->second.asMap()); // } qpidc-0.16/src/qpid/management/Buffer.cpp0000664000076400007640000001042511360613055020713 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/management/Buffer.h" #include "qpid/framing/Buffer.h" #include "qpid/amqp_0_10/Codecs.h" using namespace std; namespace qpid { namespace management { Buffer::Buffer(char* data, uint32_t size) : impl(new framing::Buffer(data, size)) {} Buffer::~Buffer() { delete impl; } void Buffer::record() { impl->record(); } void Buffer::restore(bool reRecord) { impl->restore(reRecord); } void Buffer::reset() { impl->reset(); } uint32_t Buffer::available() { return impl->available(); } uint32_t Buffer::getSize() { return impl->getSize(); } uint32_t Buffer::getPosition() { return impl->getPosition(); } char* Buffer::getPointer() { return impl->getPointer(); } void Buffer::putOctet(uint8_t i) { impl->putOctet(i); } void Buffer::putShort(uint16_t i) { impl->putShort(i); } void Buffer::putLong(uint32_t i) { impl->putLong(i); } void Buffer::putLongLong(uint64_t i) { impl->putLongLong(i); } void Buffer::putInt8(int8_t i) { impl->putInt8(i); } void Buffer::putInt16(int16_t i) { impl->putInt16(i); } void Buffer::putInt32(int32_t i) { impl->putInt32(i); } void Buffer::putInt64(int64_t i) { impl->putInt64(i); } void Buffer::putFloat(float i) { impl->putFloat(i); } void Buffer::putDouble(double i) { impl->putDouble(i); } void Buffer::putBin128(const uint8_t* i) { impl->putBin128(i); } uint8_t Buffer::getOctet() { return impl->getOctet(); } uint16_t Buffer::getShort() { return impl->getShort(); } uint32_t Buffer::getLong() { return impl->getLong(); } uint64_t Buffer::getLongLong() { return impl->getLongLong(); } int8_t Buffer:: getInt8() { return impl-> getInt8(); } int16_t Buffer::getInt16() { return impl->getInt16(); } int32_t Buffer::getInt32() { return impl->getInt32(); } int64_t Buffer::getInt64() { return impl->getInt64(); } float Buffer::getFloat() { return impl->getFloat(); } double Buffer::getDouble() { return impl->getDouble(); } void Buffer::putShortString(const string& i) { impl->putShortString(i); } void Buffer::putMediumString(const string& i) { impl->putMediumString(i); } void Buffer::putLongString(const string& i) { impl->putLongString(i); } void Buffer::getShortString(string& i) { impl->getShortString(i); } void Buffer::getMediumString(string& i) { impl->getMediumString(i); } void Buffer::getLongString(string& i) { impl->getLongString(i); } void Buffer::getBin128(uint8_t* i) { impl->getBin128(i); } void Buffer::putRawData(const string& i) { impl->putRawData(i); } void Buffer::getRawData(string& s, uint32_t size) { impl->getRawData(s, size); } void Buffer::putRawData(const uint8_t* data, size_t size) { impl->putRawData(data, size); } void Buffer::getRawData(uint8_t* data, size_t size) { impl->getRawData(data, size); } void Buffer::putMap(const types::Variant::Map& i) { string encoded; amqp_0_10::MapCodec::encode(i, encoded); impl->putRawData(encoded); } void Buffer::putList(const types::Variant::List& i) { string encoded; amqp_0_10::ListCodec::encode(i, encoded); impl->putRawData(encoded); } void Buffer::getMap(types::Variant::Map& map) { string encoded; uint32_t saved = impl->getPosition(); uint32_t length = impl->getLong(); impl->setPosition(saved); impl->getRawData(encoded, length + sizeof(uint32_t)); amqp_0_10::MapCodec::decode(encoded, map); } void Buffer::getList(types::Variant::List& list) { string encoded; uint32_t saved = impl->getPosition(); uint32_t length = impl->getLong(); impl->setPosition(saved); impl->getRawData(encoded, length + sizeof(uint32_t)); amqp_0_10::ListCodec::decode(encoded, list); } }} qpidc-0.16/src/qpid/management/ManagementAgent.cpp0000664000076400007640000031577111725210040022541 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ // NOTE on use of log levels: The criteria for using trace vs. debug // is to use trace for log messages that are generated for each // unbatched stats/props notification and debug for everything else. #include "qpid/management/ManagementAgent.h" #include "qpid/management/ManagementObject.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/log/Statement.h" #include #include "qpid/framing/MessageTransferBody.h" #include "qpid/sys/Time.h" #include "qpid/sys/Thread.h" #include "qpid/broker/ConnectionState.h" #include "qpid/broker/AclModule.h" #include "qpid/types/Variant.h" #include "qpid/types/Uuid.h" #include "qpid/framing/List.h" #include "qpid/amqp_0_10/Codecs.h" #include #include #include #include #include using boost::intrusive_ptr; using qpid::framing::Uuid; using qpid::types::Variant; using qpid::amqp_0_10::MapCodec; using qpid::amqp_0_10::ListCodec; using qpid::sys::Mutex; using namespace qpid::framing; using namespace qpid::management; using namespace qpid::broker; using namespace qpid; using namespace std; namespace _qmf = qmf::org::apache::qpid::broker; namespace { const string defaultVendorName("vendor"); const string defaultProductName("product"); // Create a valid binding key substring by // replacing all '.' chars with '_' const string keyifyNameStr(const string& name) { string n2 = name; size_t pos = n2.find('.'); while (pos != n2.npos) { n2.replace(pos, 1, "_"); pos = n2.find('.', pos); } return n2; } struct ScopedManagementContext { ScopedManagementContext(const qpid::broker::ConnectionState* context) { setManagementExecutionContext(context); } ~ScopedManagementContext() { setManagementExecutionContext(0); } }; } static Variant::Map mapEncodeSchemaId(const string& pname, const string& cname, const string& type, const uint8_t *md5Sum) { Variant::Map map_; map_["_package_name"] = pname; map_["_class_name"] = cname; map_["_type"] = type; map_["_hash"] = qpid::types::Uuid(md5Sum); return map_; } ManagementAgent::RemoteAgent::~RemoteAgent () { QPID_LOG(debug, "Remote Agent removed bank=[" << brokerBank << "." << agentBank << "]"); if (mgmtObject != 0) { mgmtObject->resourceDestroy(); agent.deleteObjectNowLH(mgmtObject->getObjectId()); delete mgmtObject; mgmtObject = 0; } } ManagementAgent::ManagementAgent (const bool qmfV1, const bool qmfV2) : threadPoolSize(1), publish(true), interval(10), broker(0), timer(0), startTime(sys::now()), suppressed(false), disallowAllV1Methods(false), vendorNameKey(defaultVendorName), productNameKey(defaultProductName), qmf1Support(qmfV1), qmf2Support(qmfV2), maxReplyObjs(100), msgBuffer(MA_BUFFER_SIZE), memstat(0) { nextObjectId = 1; brokerBank = 1; bootSequence = 1; nextRemoteBank = 10; nextRequestSequence = 1; clientWasAdded = false; attrMap["_vendor"] = defaultVendorName; attrMap["_product"] = defaultProductName; memstat = new qmf::org::apache::qpid::broker::Memory(this, 0, "amqp-broker"); addObject(memstat, "amqp-broker"); } ManagementAgent::~ManagementAgent () { { sys::Mutex::ScopedLock lock (userLock); // Reset the shared pointers to exchanges. If this is not done now, the exchanges // will stick around until dExchange and mExchange are implicitly destroyed (long // after this destructor completes). Those exchanges hold references to management // objects that will be invalid. dExchange.reset(); mExchange.reset(); v2Topic.reset(); v2Direct.reset(); remoteAgents.clear(); moveNewObjectsLH(); for (ManagementObjectMap::iterator iter = managementObjects.begin (); iter != managementObjects.end (); iter++) { ManagementObject* object = iter->second; delete object; } managementObjects.clear(); } } void ManagementAgent::configure(const string& _dataDir, bool _publish, uint16_t _interval, qpid::broker::Broker* _broker, int _threads) { dataDir = _dataDir; publish = _publish; interval = _interval; broker = _broker; threadPoolSize = _threads; ManagementObject::maxThreads = threadPoolSize; // Get from file or generate and save to file. if (dataDir.empty()) { uuid.generate(); QPID_LOG (info, "ManagementAgent has no data directory, generated new broker ID: " << uuid); } else { string filename(dataDir + "/.mbrokerdata"); ifstream inFile(filename.c_str ()); if (inFile.good()) { inFile >> uuid; inFile >> bootSequence; inFile >> nextRemoteBank; inFile.close(); if (uuid.isNull()) { uuid.generate(); QPID_LOG (info, "No stored broker ID found - ManagementAgent generated broker ID: " << uuid); } else QPID_LOG (info, "ManagementAgent restored broker ID: " << uuid); // if sequence goes beyond a 12-bit field, skip zero and wrap to 1. bootSequence++; if (bootSequence & 0xF000) bootSequence = 1; writeData(); } else { uuid.generate(); QPID_LOG (info, "ManagementAgent generated broker ID: " << uuid); writeData(); } QPID_LOG (debug, "ManagementAgent boot sequence: " << bootSequence); } } void ManagementAgent::pluginsInitialized() { // Do this here so cluster plugin has the chance to set up the timer. timer = &broker->getClusterTimer(); timer->add(new Periodic(*this, interval)); } void ManagementAgent::setName(const string& vendor, const string& product, const string& instance) { if (vendor.find(':') != vendor.npos) { throw Exception("vendor string cannot contain a ':' character."); } if (product.find(':') != product.npos) { throw Exception("product string cannot contain a ':' character."); } attrMap["_vendor"] = vendor; attrMap["_product"] = product; string inst; if (instance.empty()) { if (uuid.isNull()) { throw Exception("ManagementAgent::configure() must be called if default name is used."); } inst = uuid.str(); } else inst = instance; name_address = vendor + ":" + product + ":" + inst; attrMap["_instance"] = inst; attrMap["_name"] = name_address; vendorNameKey = keyifyNameStr(vendor); productNameKey = keyifyNameStr(product); instanceNameKey = keyifyNameStr(inst); } void ManagementAgent::getName(string& vendor, string& product, string& instance) { vendor = std::string(attrMap["_vendor"]); product = std::string(attrMap["_product"]); instance = std::string(attrMap["_instance"]); } const std::string& ManagementAgent::getAddress() { return name_address; } void ManagementAgent::writeData () { string filename (dataDir + "/.mbrokerdata"); ofstream outFile (filename.c_str ()); if (outFile.good()) { outFile << uuid << " " << bootSequence << " " << nextRemoteBank << endl; outFile.close(); } } void ManagementAgent::setExchange(qpid::broker::Exchange::shared_ptr _mexchange, qpid::broker::Exchange::shared_ptr _dexchange) { mExchange = _mexchange; dExchange = _dexchange; } void ManagementAgent::setExchangeV2(qpid::broker::Exchange::shared_ptr _texchange, qpid::broker::Exchange::shared_ptr _dexchange) { v2Topic = _texchange; v2Direct = _dexchange; } void ManagementAgent::registerClass (const string& packageName, const string& className, uint8_t* md5Sum, ManagementObject::writeSchemaCall_t schemaCall) { sys::Mutex::ScopedLock lock(userLock); PackageMap::iterator pIter = findOrAddPackageLH(packageName); addClassLH(ManagementItem::CLASS_KIND_TABLE, pIter, className, md5Sum, schemaCall); } void ManagementAgent::registerEvent (const string& packageName, const string& eventName, uint8_t* md5Sum, ManagementObject::writeSchemaCall_t schemaCall) { sys::Mutex::ScopedLock lock(userLock); PackageMap::iterator pIter = findOrAddPackageLH(packageName); addClassLH(ManagementItem::CLASS_KIND_EVENT, pIter, eventName, md5Sum, schemaCall); } // Deprecated: V1 objects ObjectId ManagementAgent::addObject(ManagementObject* object, uint64_t persistId, bool persistent) { uint16_t sequence; uint64_t objectNum; sequence = persistent ? 0 : bootSequence; objectNum = persistId ? persistId : nextObjectId++; ObjectId objId(0 /*flags*/, sequence, brokerBank, objectNum); objId.setV2Key(*object); // let object generate the v2 key object->setObjectId(objId); { sys::Mutex::ScopedLock lock(addLock); newManagementObjects.push_back(object); } QPID_LOG(debug, "Management object (V1) added: " << objId.getV2Key()); return objId; } ObjectId ManagementAgent::addObject(ManagementObject* object, const string& key, bool persistent) { uint16_t sequence; sequence = persistent ? 0 : bootSequence; ObjectId objId(0 /*flags*/, sequence, brokerBank); if (key.empty()) { objId.setV2Key(*object); // let object generate the key } else { objId.setV2Key(key); } object->setObjectId(objId); { sys::Mutex::ScopedLock lock(addLock); newManagementObjects.push_back(object); } QPID_LOG(debug, "Management object added: " << objId.getV2Key()); return objId; } void ManagementAgent::raiseEvent(const ManagementEvent& event, severity_t severity) { static const std::string severityStr[] = { "emerg", "alert", "crit", "error", "warn", "note", "info", "debug" }; sys::Mutex::ScopedLock lock (userLock); uint8_t sev = (severity == SEV_DEFAULT) ? event.getSeverity() : (uint8_t) severity; if (qmf1Support) { Buffer outBuffer(eventBuffer, MA_BUFFER_SIZE); uint32_t outLen; encodeHeader(outBuffer, 'e'); outBuffer.putShortString(event.getPackageName()); outBuffer.putShortString(event.getEventName()); outBuffer.putBin128(event.getMd5Sum()); outBuffer.putLongLong(uint64_t(sys::Duration(sys::EPOCH, sys::now()))); outBuffer.putOctet(sev); string sBuf; event.encode(sBuf); outBuffer.putRawData(sBuf); outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, mExchange, "console.event.1.0." + event.getPackageName() + "." + event.getEventName()); QPID_LOG(debug, "SEND raiseEvent (v1) class=" << event.getPackageName() << "." << event.getEventName()); } if (qmf2Support) { Variant::Map map_; Variant::Map schemaId; Variant::Map values; Variant::Map headers; map_["_schema_id"] = mapEncodeSchemaId(event.getPackageName(), event.getEventName(), "_event", event.getMd5Sum()); event.mapEncode(values); map_["_values"] = values; map_["_timestamp"] = uint64_t(sys::Duration(sys::EPOCH, sys::now())); map_["_severity"] = sev; headers["method"] = "indication"; headers["qmf.opcode"] = "_data_indication"; headers["qmf.content"] = "_event"; headers["qmf.agent"] = name_address; stringstream key; key << "agent.ind.event." << keyifyNameStr(event.getPackageName()) << "." << keyifyNameStr(event.getEventName()) << "." << severityStr[sev] << "." << vendorNameKey << "." << productNameKey; if (!instanceNameKey.empty()) key << "." << instanceNameKey; string content; Variant::List list_; list_.push_back(map_); ListCodec::encode(list_, content); sendBufferLH(content, "", headers, "amqp/list", v2Topic, key.str()); QPID_LOG(debug, "SEND raiseEvent (v2) class=" << event.getPackageName() << "." << event.getEventName()); } } ManagementAgent::Periodic::Periodic (ManagementAgent& _agent, uint32_t _seconds) : TimerTask(sys::Duration((_seconds ? _seconds : 1) * sys::TIME_SEC), "ManagementAgent::periodicProcessing"), agent(_agent) {} ManagementAgent::Periodic::~Periodic() {} void ManagementAgent::Periodic::fire() { setupNextFire(); agent.timer->add(this); agent.periodicProcessing(); } void ManagementAgent::clientAdded (const string& routingKey) { sys::Mutex::ScopedLock lock(userLock); // // If this routing key is not relevant to object updates, exit. // if ((routingKey.compare(0, 1, "#") != 0) && (routingKey.compare(0, 9, "console.#") != 0) && (routingKey.compare(0, 12, "console.obj.") != 0)) return; // // Mark local objects for full-update. // clientWasAdded = true; // // If the routing key is relevant for local objects only, don't involve // any of the remote agents. // if (routingKey.compare(0, 39, "console.obj.*.*.org.apache.qpid.broker.") == 0) return; std::list rkeys; for (RemoteAgentMap::iterator aIter = remoteAgents.begin(); aIter != remoteAgents.end(); aIter++) { rkeys.push_back(aIter->second->routingKey); } while (rkeys.size()) { char localBuffer[16]; Buffer outBuffer(localBuffer, 16); uint32_t outLen; encodeHeader(outBuffer, 'x'); outLen = outBuffer.getPosition(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, dExchange, rkeys.front()); QPID_LOG(debug, "SEND ConsoleAddedIndication to=" << rkeys.front()); rkeys.pop_front(); } } void ManagementAgent::clusterUpdate() { // Called on all cluster memebers when a new member joins a cluster. // Set clientWasAdded so that on the next periodicProcessing we will do // a full update on all cluster members. sys::Mutex::ScopedLock l(userLock); moveNewObjectsLH(); // keep lists consistent with updater/updatee. moveDeletedObjectsLH(); clientWasAdded = true; debugSnapshot("Cluster member joined"); } void ManagementAgent::encodeHeader (Buffer& buf, uint8_t opcode, uint32_t seq) { buf.putOctet ('A'); buf.putOctet ('M'); buf.putOctet ('2'); buf.putOctet (opcode); buf.putLong (seq); } bool ManagementAgent::checkHeader (Buffer& buf, uint8_t *opcode, uint32_t *seq) { uint8_t h1 = buf.getOctet(); uint8_t h2 = buf.getOctet(); uint8_t h3 = buf.getOctet(); *opcode = buf.getOctet(); *seq = buf.getLong(); return h1 == 'A' && h2 == 'M' && h3 == '2'; } // NOTE WELL: assumes userLock is held by caller (LH) // NOTE EVEN WELLER: drops this lock when delivering the message!!! void ManagementAgent::sendBufferLH(Buffer& buf, uint32_t length, qpid::broker::Exchange::shared_ptr exchange, const string& routingKey) { if (suppressed) { QPID_LOG(debug, "Suppressing management message to " << routingKey); return; } if (exchange.get() == 0) return; intrusive_ptr msg(new Message()); AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange->getName (), 0, 0))); AMQFrame header((AMQHeaderBody())); AMQFrame content((AMQContentBody())); content.castBody()->decode(buf, length); method.setEof(false); header.setBof(false); header.setEof(false); content.setBof(false); msg->getFrames().append(method); msg->getFrames().append(header); MessageProperties* props = msg->getFrames().getHeaders()->get(true); props->setContentLength(length); DeliveryProperties* dp = msg->getFrames().getHeaders()->get(true); dp->setRoutingKey(routingKey); msg->getFrames().append(content); msg->setIsManagementMessage(true); { sys::Mutex::ScopedUnlock u(userLock); DeliverableMessage deliverable (msg); try { exchange->route(deliverable); } catch(exception&) {} } buf.reset(); } void ManagementAgent::sendBufferLH(Buffer& buf, uint32_t length, const string& exchange, const string& routingKey) { qpid::broker::Exchange::shared_ptr ex(broker->getExchanges().get(exchange)); if (ex.get() != 0) sendBufferLH(buf, length, ex, routingKey); } // NOTE WELL: assumes userLock is held by caller (LH) // NOTE EVEN WELLER: drops this lock when delivering the message!!! void ManagementAgent::sendBufferLH(const string& data, const string& cid, const Variant::Map& headers, const string& content_type, qpid::broker::Exchange::shared_ptr exchange, const string& routingKey, uint64_t ttl_msec) { Variant::Map::const_iterator i; if (suppressed) { QPID_LOG(debug, "Suppressing management message to " << routingKey); return; } if (exchange.get() == 0) return; intrusive_ptr msg(new Message()); AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange->getName (), 0, 0))); AMQFrame header((AMQHeaderBody())); AMQFrame content((AMQContentBody(data))); method.setEof(false); header.setBof(false); header.setEof(false); content.setBof(false); msg->getFrames().append(method); msg->getFrames().append(header); MessageProperties* props = msg->getFrames().getHeaders()->get(true); props->setContentLength(data.length()); if (!cid.empty()) { props->setCorrelationId(cid); } props->setContentType(content_type); props->setAppId("qmf2"); for (i = headers.begin(); i != headers.end(); ++i) { msg->insertCustomProperty(i->first, i->second.asString()); } DeliveryProperties* dp = msg->getFrames().getHeaders()->get(true); dp->setRoutingKey(routingKey); if (ttl_msec) { dp->setTtl(ttl_msec); msg->computeExpiration(broker->getExpiryPolicy()); } msg->getFrames().append(content); msg->setIsManagementMessage(true); { sys::Mutex::ScopedUnlock u(userLock); DeliverableMessage deliverable (msg); try { exchange->route(deliverable); } catch(exception&) {} } } void ManagementAgent::sendBufferLH(const string& data, const string& cid, const Variant::Map& headers, const string& content_type, const string& exchange, const string& routingKey, uint64_t ttl_msec) { qpid::broker::Exchange::shared_ptr ex(broker->getExchanges().get(exchange)); if (ex.get() != 0) sendBufferLH(data, cid, headers, content_type, ex, routingKey, ttl_msec); } /** Objects that have been added since the last periodic poll are temporarily * saved in the newManagementObjects list. This allows objects to be * added without needing to block on the userLock (addLock is used instead). * These new objects need to be integrated into the object database * (managementObjects) *before* they can be properly managed. This routine * performs the integration. * * Note well: objects on the newManagementObjects list may have been * marked as "deleted", and, possibly re-added. This would result in * duplicate object ids. To avoid clashes, don't put deleted objects * into the active object database. */ void ManagementAgent::moveNewObjectsLH() { sys::Mutex::ScopedLock lock (addLock); while (!newManagementObjects.empty()) { ManagementObject *object = newManagementObjects.back(); newManagementObjects.pop_back(); if (object->isDeleted()) { DeletedObject::shared_ptr dptr(new DeletedObject(object, qmf1Support, qmf2Support)); pendingDeletedObjs[dptr->getKey()].push_back(dptr); delete object; } else { // add to active object list, check for duplicates. ObjectId oid = object->getObjectId(); ManagementObjectMap::iterator destIter = managementObjects.find(oid); if (destIter != managementObjects.end()) { // duplicate found. It is OK if the old object has been marked // deleted, just replace the old with the new. ManagementObject *oldObj = destIter->second; if (oldObj->isDeleted()) { DeletedObject::shared_ptr dptr(new DeletedObject(oldObj, qmf1Support, qmf2Support)); pendingDeletedObjs[dptr->getKey()].push_back(dptr); delete oldObj; } else { // Duplicate non-deleted objects? This is a user error - oids must be unique. // for now, leak the old object (safer than deleting - may still be referenced) // and complain loudly... QPID_LOG(error, "Detected two management objects with the same identifier: " << oid); } // QPID-3666: be sure to replace the -index- also, as non-key members of // the index object may be different for the new object! So erase the // entry, rather than []= assign here: managementObjects.erase(destIter); } managementObjects[oid] = object; } } } void ManagementAgent::periodicProcessing (void) { #define BUFSIZE 65536 #define HEADROOM 4096 debugSnapshot("Management agent periodic processing"); sys::Mutex::ScopedLock lock (userLock); uint32_t contentSize; string routingKey; string sBuf; moveNewObjectsLH(); // // If we're publishing updates, get the latest memory statistics and uptime now // if (publish) { uint64_t uptime = sys::Duration(startTime, sys::now()); static_cast<_qmf::Broker*>(broker->GetManagementObject())->set_uptime(uptime); qpid::sys::MemStat::loadMemInfo(memstat); } // // Clear the been-here flag on all objects in the map. // for (ManagementObjectMap::iterator iter = managementObjects.begin(); iter != managementObjects.end(); iter++) { ManagementObject* object = iter->second; object->setFlags(0); if (clientWasAdded) { object->setForcePublish(true); } } clientWasAdded = false; // first send the pending deletes before sending updates. This prevents a // "false delete" scenario: if an object was deleted then re-added during // the last poll cycle, it will have a delete entry and an active entry. // if we sent the active update first, _then_ the delete update, clients // would incorrectly think the object was deleted. See QPID-2997 // bool objectsDeleted = moveDeletedObjectsLH(); // // If we are not publishing updates, just clear the pending deletes. There's no // need to tell anybody. // if (!publish) pendingDeletedObjs.clear(); if (!pendingDeletedObjs.empty()) { // use a temporary copy of the pending deletes so dropping the lock when // the buffer is sent is safe. PendingDeletedObjsMap tmp(pendingDeletedObjs); pendingDeletedObjs.clear(); for (PendingDeletedObjsMap::iterator mIter = tmp.begin(); mIter != tmp.end(); mIter++) { std::string packageName; std::string className; msgBuffer.reset(); uint32_t v1Objs = 0; uint32_t v2Objs = 0; Variant::List list_; size_t pos = mIter->first.find(":"); packageName = mIter->first.substr(0, pos); className = mIter->first.substr(pos+1); for (DeletedObjectList::iterator lIter = mIter->second.begin(); lIter != mIter->second.end(); lIter++) { msgBuffer.makeAvailable(HEADROOM); // Make sure there's buffer space. std::string oid = (*lIter)->objectId; if (!(*lIter)->encodedV1Config.empty()) { encodeHeader(msgBuffer, 'c'); msgBuffer.putRawData((*lIter)->encodedV1Config); QPID_LOG(trace, "Deleting V1 properties " << oid << " len=" << (*lIter)->encodedV1Config.size()); v1Objs++; } if (!(*lIter)->encodedV1Inst.empty()) { encodeHeader(msgBuffer, 'i'); msgBuffer.putRawData((*lIter)->encodedV1Inst); QPID_LOG(trace, "Deleting V1 statistics " << oid << " len=" << (*lIter)->encodedV1Inst.size()); v1Objs++; } if (v1Objs >= maxReplyObjs) { v1Objs = 0; contentSize = msgBuffer.getSize(); stringstream key; key << "console.obj.1.0." << packageName << "." << className; msgBuffer.reset(); sendBufferLH(msgBuffer, contentSize, mExchange, key.str()); // UNLOCKS USERLOCK QPID_LOG(debug, "SEND V1 Multicast ContentInd V1 (delete) to=" << key.str() << " len=" << contentSize); } if (!(*lIter)->encodedV2.empty()) { QPID_LOG(trace, "Deleting V2 " << "map=" << (*lIter)->encodedV2); list_.push_back((*lIter)->encodedV2); if (++v2Objs >= maxReplyObjs) { v2Objs = 0; string content; ListCodec::encode(list_, content); list_.clear(); if (content.length()) { stringstream key; Variant::Map headers; key << "agent.ind.data." << keyifyNameStr(packageName) << "." << keyifyNameStr(className) << "." << vendorNameKey << "." << productNameKey; if (!instanceNameKey.empty()) key << "." << instanceNameKey; headers["method"] = "indication"; headers["qmf.opcode"] = "_data_indication"; headers["qmf.content"] = "_data"; headers["qmf.agent"] = name_address; sendBufferLH(content, "", headers, "amqp/list", v2Topic, key.str()); // UNLOCKS USERLOCK QPID_LOG(debug, "SEND Multicast ContentInd V2 (delete) to=" << key.str() << " len=" << content.length()); } } } } // end current list // send any remaining objects... if (v1Objs) { contentSize = BUFSIZE - msgBuffer.available(); stringstream key; key << "console.obj.1.0." << packageName << "." << className; msgBuffer.reset(); sendBufferLH(msgBuffer, contentSize, mExchange, key.str()); // UNLOCKS USERLOCK QPID_LOG(debug, "SEND V1 Multicast ContentInd V1 (delete) to=" << key.str() << " len=" << contentSize); } if (!list_.empty()) { string content; ListCodec::encode(list_, content); list_.clear(); if (content.length()) { stringstream key; Variant::Map headers; key << "agent.ind.data." << keyifyNameStr(packageName) << "." << keyifyNameStr(className) << "." << vendorNameKey << "." << productNameKey; if (!instanceNameKey.empty()) key << "." << instanceNameKey; headers["method"] = "indication"; headers["qmf.opcode"] = "_data_indication"; headers["qmf.content"] = "_data"; headers["qmf.agent"] = name_address; sendBufferLH(content, "", headers, "amqp/list", v2Topic, key.str()); // UNLOCKS USERLOCK QPID_LOG(debug, "SEND Multicast ContentInd V2 (delete) to=" << key.str() << " len=" << content.length()); } } } // end map } // // Process the entire object map. Remember: we drop the userLock each time we call // sendBuffer(). This allows the managementObjects map to be altered during the // sendBuffer() call, so always restart the search after a sendBuffer() call // // If publish is disabled, don't send any updates. // while (publish) { msgBuffer.reset(); Variant::List list_; uint32_t pcount; uint32_t scount; uint32_t v1Objs, v2Objs; ManagementObjectMap::iterator baseIter; std::string packageName; std::string className; for (baseIter = managementObjects.begin(); baseIter != managementObjects.end(); baseIter++) { ManagementObject* baseObject = baseIter->second; // // Skip until we find a base object requiring processing... // if (baseObject->getFlags() == 0) { packageName = baseObject->getPackageName(); className = baseObject->getClassName(); break; } } if (baseIter == managementObjects.end()) break; // done - all objects processed pcount = scount = 0; v1Objs = 0; v2Objs = 0; list_.clear(); msgBuffer.reset(); for (ManagementObjectMap::iterator iter = baseIter; iter != managementObjects.end(); iter++) { msgBuffer.makeAvailable(HEADROOM); // Make sure there's buffer space ManagementObject* baseObject = baseIter->second; ManagementObject* object = iter->second; bool send_stats, send_props; if (baseObject->isSameClass(*object) && object->getFlags() == 0) { object->setFlags(1); if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); // skip any objects marked deleted since our first pass. Deal with them // on the next periodic cycle... if (object->isDeleted()) { continue; } send_props = (object->getConfigChanged() || object->getForcePublish()); send_stats = (object->hasInst() && (object->getInstChanged() || object->getForcePublish())); if (send_props && qmf1Support) { size_t pos = msgBuffer.getPosition(); encodeHeader(msgBuffer, 'c'); sBuf.clear(); object->writeProperties(sBuf); msgBuffer.putRawData(sBuf); QPID_LOG(trace, "Changed V1 properties " << object->getObjectId().getV2Key() << " len=" << msgBuffer.getPosition()-pos); ++v1Objs; } if (send_stats && qmf1Support) { size_t pos = msgBuffer.getPosition(); encodeHeader(msgBuffer, 'i'); sBuf.clear(); object->writeStatistics(sBuf); msgBuffer.putRawData(sBuf); QPID_LOG(trace, "Changed V1 statistics " << object->getObjectId().getV2Key() << " len=" << msgBuffer.getPosition()-pos); ++v1Objs; } if ((send_stats || send_props) && qmf2Support) { Variant::Map map_; Variant::Map values; Variant::Map oid; object->getObjectId().mapEncode(oid); map_["_object_id"] = oid; map_["_schema_id"] = mapEncodeSchemaId(object->getPackageName(), object->getClassName(), "_data", object->getMd5Sum()); object->writeTimestamps(map_); object->mapEncodeValues(values, send_props, send_stats); map_["_values"] = values; list_.push_back(map_); v2Objs++; QPID_LOG(trace, "Changed V2" << (send_stats? " statistics":"") << (send_props? " properties":"") << " map=" << map_); } if (send_props) pcount++; if (send_stats) scount++; object->setForcePublish(false); if ((qmf1Support && (v1Objs >= maxReplyObjs)) || (qmf2Support && (v2Objs >= maxReplyObjs))) break; // have enough objects, send an indication... } } if (pcount || scount) { if (qmf1Support) { contentSize = BUFSIZE - msgBuffer.available(); if (contentSize > 0) { stringstream key; key << "console.obj.1.0." << packageName << "." << className; msgBuffer.reset(); sendBufferLH(msgBuffer, contentSize, mExchange, key.str()); // UNLOCKS USERLOCK QPID_LOG(debug, "SEND V1 Multicast ContentInd to=" << key.str() << " props=" << pcount << " stats=" << scount << " len=" << contentSize); } } if (qmf2Support) { string content; ListCodec::encode(list_, content); if (content.length()) { stringstream key; Variant::Map headers; key << "agent.ind.data." << keyifyNameStr(packageName) << "." << keyifyNameStr(className) << "." << vendorNameKey << "." << productNameKey; if (!instanceNameKey.empty()) key << "." << instanceNameKey; headers["method"] = "indication"; headers["qmf.opcode"] = "_data_indication"; headers["qmf.content"] = "_data"; headers["qmf.agent"] = name_address; sendBufferLH(content, "", headers, "amqp/list", v2Topic, key.str()); // UNLOCKS USERLOCK QPID_LOG(debug, "SEND Multicast ContentInd to=" << key.str() << " props=" << pcount << " stats=" << scount << " len=" << content.length()); } } } } // end processing updates for all objects if (objectsDeleted) deleteOrphanedAgentsLH(); // heartbeat generation. Note that heartbeats need to be sent even if publish is disabled. if (qmf1Support) { uint32_t contentSize; char msgChars[BUFSIZE]; Buffer msgBuffer(msgChars, BUFSIZE); encodeHeader(msgBuffer, 'h'); msgBuffer.putLongLong(uint64_t(sys::Duration(sys::EPOCH, sys::now()))); contentSize = BUFSIZE - msgBuffer.available (); msgBuffer.reset (); routingKey = "console.heartbeat.1.0"; sendBufferLH(msgBuffer, contentSize, mExchange, routingKey); QPID_LOG(debug, "SEND HeartbeatInd to=" << routingKey); } if (qmf2Support) { std::stringstream addr_key; addr_key << "agent.ind.heartbeat." << vendorNameKey << "." << productNameKey; if (!instanceNameKey.empty()) addr_key << "." << instanceNameKey; Variant::Map map; Variant::Map headers; headers["method"] = "indication"; headers["qmf.opcode"] = "_agent_heartbeat_indication"; headers["qmf.agent"] = name_address; map["_values"] = attrMap; map["_values"].asMap()["_timestamp"] = uint64_t(sys::Duration(sys::EPOCH, sys::now())); map["_values"].asMap()["_heartbeat_interval"] = interval; map["_values"].asMap()["_epoch"] = bootSequence; string content; MapCodec::encode(map, content); // Set TTL (in msecs) on outgoing heartbeat indications based on the interval // time to prevent stale heartbeats from getting to the consoles. sendBufferLH(content, "", headers, "amqp/map", v2Topic, addr_key.str(), interval * 2 * 1000); QPID_LOG(debug, "SENT AgentHeartbeat name=" << name_address); } } void ManagementAgent::deleteObjectNowLH(const ObjectId& oid) { ManagementObjectMap::iterator iter = managementObjects.find(oid); if (iter == managementObjects.end()) return; ManagementObject* object = iter->second; if (!object->isDeleted()) return; // since sendBufferLH drops the userLock, don't call it until we // are done manipulating the object. #define DNOW_BUFSIZE 2048 char msgChars[DNOW_BUFSIZE]; Buffer msgBuffer(msgChars, DNOW_BUFSIZE); Variant::List list_; stringstream v1key, v2key; if (publish && qmf1Support) { string sBuf; v1key << "console.obj.1.0." << object->getPackageName() << "." << object->getClassName(); encodeHeader(msgBuffer, 'c'); object->writeProperties(sBuf); msgBuffer.putRawData(sBuf); } if (publish && qmf2Support) { Variant::Map map_; Variant::Map values; map_["_schema_id"] = mapEncodeSchemaId(object->getPackageName(), object->getClassName(), "_data", object->getMd5Sum()); object->writeTimestamps(map_); object->mapEncodeValues(values, true, false); map_["_values"] = values; list_.push_back(map_); v2key << "agent.ind.data." << keyifyNameStr(object->getPackageName()) << "." << keyifyNameStr(object->getClassName()) << "." << vendorNameKey << "." << productNameKey; if (!instanceNameKey.empty()) v2key << "." << instanceNameKey; } object = 0; managementObjects.erase(oid); // object deleted, ok to drop lock now. if (publish && qmf1Support) { uint32_t contentSize = msgBuffer.getPosition(); msgBuffer.reset(); sendBufferLH(msgBuffer, contentSize, mExchange, v1key.str()); QPID_LOG(debug, "SEND Immediate(delete) ContentInd to=" << v1key.str()); } if (publish && qmf2Support) { Variant::Map headers; headers["method"] = "indication"; headers["qmf.opcode"] = "_data_indication"; headers["qmf.content"] = "_data"; headers["qmf.agent"] = name_address; string content; ListCodec::encode(list_, content); sendBufferLH(content, "", headers, "amqp/list", v2Topic, v2key.str()); QPID_LOG(debug, "SEND Immediate(delete) ContentInd to=" << v2key.str()); } } void ManagementAgent::sendCommandCompleteLH(const string& replyToKey, uint32_t sequence, uint32_t code, const string& text) { Buffer outBuffer (outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; encodeHeader (outBuffer, 'z', sequence); outBuffer.putLong (code); outBuffer.putShortString (text); outLen = MA_BUFFER_SIZE - outBuffer.available (); outBuffer.reset (); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND CommandCompleteInd code=" << code << " text=" << text << " to=" << replyToKey << " seq=" << sequence); } void ManagementAgent::sendExceptionLH(const string& rte, const string& rtk, const string& cid, const string& text, uint32_t code, bool viaLocal) { static const string addr_exchange("qmf.default.direct"); Variant::Map map; Variant::Map headers; Variant::Map values; string content; headers["method"] = "indication"; headers["qmf.opcode"] = "_exception"; headers["qmf.agent"] = viaLocal ? "broker" : name_address; values["error_code"] = code; values["error_text"] = text; map["_values"] = values; MapCodec::encode(map, content); sendBufferLH(content, cid, headers, "amqp/map", rte, rtk); QPID_LOG(debug, "SENT Exception code=" << code <<" text=" << text); } bool ManagementAgent::dispatchCommand (Deliverable& deliverable, const string& routingKey, const FieldTable* /*args*/, const bool topic, int qmfVersion) { sys::Mutex::ScopedLock lock (userLock); Message& msg = ((DeliverableMessage&) deliverable).getMessage (); if (topic && qmfVersion == 1) { // qmf1 is bound only to the topic management exchange. // Parse the routing key. This management broker should act as though it // is bound to the exchange to match the following keys: // // agent.1.0.# // broker // schema.# if (routingKey == "broker") { dispatchAgentCommandLH(msg); return false; } if (routingKey.length() > 6) { if (routingKey.compare(0, 9, "agent.1.0") == 0) { dispatchAgentCommandLH(msg); return false; } if (routingKey.compare(0, 8, "agent.1.") == 0) { return authorizeAgentMessageLH(msg); } if (routingKey.compare(0, 7, "schema.") == 0) { dispatchAgentCommandLH(msg); return true; } } } if (qmfVersion == 2) { if (topic) { // Intercept messages bound to: // "console.ind.locate.# - process these messages, and also allow them to be forwarded. if (routingKey == "console.request.agent_locate") { dispatchAgentCommandLH(msg); return true; } } else { // direct exchange // Intercept messages bound to: // "broker" - generic alias for the local broker // "" - the broker agent's proper name // and do not forward them futher if (routingKey == "broker" || routingKey == name_address) { dispatchAgentCommandLH(msg, routingKey == "broker"); return false; } } } return true; } void ManagementAgent::handleMethodRequestLH(Buffer& inBuffer, const string& replyToKey, uint32_t sequence, const ConnectionToken* connToken) { moveNewObjectsLH(); string methodName; string packageName; string className; uint8_t hash[16]; Buffer outBuffer (outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; AclModule* acl = broker->getAcl(); string inArgs; string sBuf; inBuffer.getRawData(sBuf, 16); ObjectId objId; objId.decode(sBuf); inBuffer.getShortString(packageName); inBuffer.getShortString(className); inBuffer.getBin128(hash); inBuffer.getShortString(methodName); inBuffer.getRawData(inArgs, inBuffer.available()); QPID_LOG(debug, "RECV MethodRequest (v1) class=" << packageName << ":" << className << "(" << Uuid(hash) << ") method=" << methodName << " replyTo=" << replyToKey); encodeHeader(outBuffer, 'm', sequence); if (disallowAllV1Methods) { outBuffer.putLong(Manageable::STATUS_FORBIDDEN); outBuffer.putMediumString("QMFv1 methods forbidden on this broker, use QMFv2"); outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND MethodResponse status=FORBIDDEN reason='All QMFv1 Methods Forbidden' seq=" << sequence); return; } DisallowedMethods::const_iterator i = disallowed.find(make_pair(className, methodName)); if (i != disallowed.end()) { outBuffer.putLong(Manageable::STATUS_FORBIDDEN); outBuffer.putMediumString(i->second); outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND MethodResponse status=FORBIDDEN text=" << i->second << " seq=" << sequence); return; } string userId = ((const qpid::broker::ConnectionState*) connToken)->getUserId(); if (acl != 0) { map params; params[acl::PROP_SCHEMAPACKAGE] = packageName; params[acl::PROP_SCHEMACLASS] = className; if (!acl->authorise(userId, acl::ACT_ACCESS, acl::OBJ_METHOD, methodName, ¶ms)) { outBuffer.putLong(Manageable::STATUS_FORBIDDEN); outBuffer.putMediumString(Manageable::StatusText(Manageable::STATUS_FORBIDDEN)); outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND MethodResponse status=FORBIDDEN" << " seq=" << sequence); return; } } ManagementObjectMap::iterator iter = numericFind(objId); if (iter == managementObjects.end() || iter->second->isDeleted()) { outBuffer.putLong (Manageable::STATUS_UNKNOWN_OBJECT); outBuffer.putMediumString(Manageable::StatusText (Manageable::STATUS_UNKNOWN_OBJECT)); } else { if ((iter->second->getPackageName() != packageName) || (iter->second->getClassName() != className)) { outBuffer.putLong (Manageable::STATUS_PARAMETER_INVALID); outBuffer.putMediumString(Manageable::StatusText (Manageable::STATUS_PARAMETER_INVALID)); } else try { outBuffer.record(); sys::Mutex::ScopedUnlock u(userLock); string outBuf; iter->second->doMethod(methodName, inArgs, outBuf, userId); outBuffer.putRawData(outBuf); } catch(exception& e) { outBuffer.restore(); outBuffer.putLong(Manageable::STATUS_EXCEPTION); outBuffer.putMediumString(e.what()); } } outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND MethodResponse (v1) to=" << replyToKey << " seq=" << sequence); } void ManagementAgent::handleMethodRequestLH (const string& body, const string& rte, const string& rtk, const string& cid, const ConnectionToken* connToken, bool viaLocal) { moveNewObjectsLH(); string methodName; Variant::Map inMap; MapCodec::decode(body, inMap); Variant::Map::const_iterator oid, mid; string content; string error; uint32_t errorCode(0); Variant::Map outMap; Variant::Map headers; headers["method"] = "response"; headers["qmf.opcode"] = "_method_response"; headers["qmf.agent"] = viaLocal ? "broker" : name_address; if ((oid = inMap.find("_object_id")) == inMap.end() || (mid = inMap.find("_method_name")) == inMap.end()) { sendExceptionLH(rte, rtk, cid, Manageable::StatusText(Manageable::STATUS_PARAMETER_INVALID), Manageable::STATUS_PARAMETER_INVALID, viaLocal); return; } ObjectId objId; Variant::Map inArgs; Variant::Map callMap; try { // coversions will throw if input is invalid. objId = ObjectId(oid->second.asMap()); methodName = mid->second.getString(); mid = inMap.find("_arguments"); if (mid != inMap.end()) { inArgs = (mid->second).asMap(); } } catch(exception& e) { sendExceptionLH(rte, rtk, cid, e.what(), Manageable::STATUS_EXCEPTION, viaLocal); return; } ManagementObjectMap::iterator iter = managementObjects.find(objId); if (iter == managementObjects.end() || iter->second->isDeleted()) { stringstream estr; estr << "No object found with ID=" << objId; sendExceptionLH(rte, rtk, cid, estr.str(), 1, viaLocal); return; } // validate AclModule* acl = broker->getAcl(); DisallowedMethods::const_iterator i; i = disallowed.find(make_pair(iter->second->getClassName(), methodName)); if (i != disallowed.end()) { sendExceptionLH(rte, rtk, cid, i->second, Manageable::STATUS_FORBIDDEN, viaLocal); return; } string userId = ((const qpid::broker::ConnectionState*) connToken)->getUserId(); if (acl != 0) { map params; params[acl::PROP_SCHEMAPACKAGE] = iter->second->getPackageName(); params[acl::PROP_SCHEMACLASS] = iter->second->getClassName(); if (!acl->authorise(userId, acl::ACT_ACCESS, acl::OBJ_METHOD, methodName, ¶ms)) { sendExceptionLH(rte, rtk, cid, Manageable::StatusText(Manageable::STATUS_FORBIDDEN), Manageable::STATUS_FORBIDDEN, viaLocal); return; } } // invoke the method QPID_LOG(debug, "RECV MethodRequest (v2) class=" << iter->second->getPackageName() << ":" << iter->second->getClassName() << " method=" << methodName << " replyTo=" << rte << "/" << rtk << " objId=" << objId << " inArgs=" << inArgs); try { sys::Mutex::ScopedUnlock u(userLock); iter->second->doMethod(methodName, inArgs, callMap, userId); errorCode = callMap["_status_code"].asUint32(); if (errorCode == 0) { outMap["_arguments"] = Variant::Map(); for (Variant::Map::const_iterator iter = callMap.begin(); iter != callMap.end(); iter++) if (iter->first != "_status_code" && iter->first != "_status_text") outMap["_arguments"].asMap()[iter->first] = iter->second; } else error = callMap["_status_text"].asString(); } catch(exception& e) { sendExceptionLH(rte, rtk, cid, e.what(), Manageable::STATUS_EXCEPTION, viaLocal); return; } if (errorCode != 0) { sendExceptionLH(rte, rtk, cid, error, errorCode, viaLocal); return; } MapCodec::encode(outMap, content); sendBufferLH(content, cid, headers, "amqp/map", rte, rtk); QPID_LOG(debug, "SEND MethodResponse (v2) to=" << rte << "/" << rtk << " seq=" << cid << " map=" << outMap); } void ManagementAgent::handleBrokerRequestLH (Buffer&, const string& replyToKey, uint32_t sequence) { Buffer outBuffer (outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; QPID_LOG(debug, "RECV BrokerRequest replyTo=" << replyToKey); encodeHeader (outBuffer, 'b', sequence); uuid.encode (outBuffer); outLen = MA_BUFFER_SIZE - outBuffer.available (); outBuffer.reset (); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND BrokerResponse to=" << replyToKey); } void ManagementAgent::handlePackageQueryLH (Buffer&, const string& replyToKey, uint32_t sequence) { QPID_LOG(debug, "RECV PackageQuery replyTo=" << replyToKey); Buffer outBuffer (outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; for (PackageMap::iterator pIter = packages.begin (); pIter != packages.end (); pIter++) { encodeHeader (outBuffer, 'p', sequence); encodePackageIndication (outBuffer, pIter); } outLen = MA_BUFFER_SIZE - outBuffer.available (); if (outLen) { outBuffer.reset (); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND PackageInd to=" << replyToKey << " seq=" << sequence); } sendCommandCompleteLH(replyToKey, sequence); } void ManagementAgent::handlePackageIndLH (Buffer& inBuffer, const string& replyToKey, uint32_t sequence) { string packageName; inBuffer.getShortString(packageName); QPID_LOG(debug, "RECV PackageInd package=" << packageName << " replyTo=" << replyToKey << " seq=" << sequence); findOrAddPackageLH(packageName); } void ManagementAgent::handleClassQueryLH(Buffer& inBuffer, const string& replyToKey, uint32_t sequence) { string packageName; inBuffer.getShortString(packageName); QPID_LOG(debug, "RECV ClassQuery package=" << packageName << " replyTo=" << replyToKey << " seq=" << sequence); PackageMap::iterator pIter = packages.find(packageName); if (pIter != packages.end()) { typedef std::pair _ckeyType; std::list<_ckeyType> classes; ClassMap &cMap = pIter->second; for (ClassMap::iterator cIter = cMap.begin(); cIter != cMap.end(); cIter++) { if (cIter->second.hasSchema()) { classes.push_back(make_pair(cIter->first, cIter->second.kind)); } } while (classes.size()) { Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; encodeHeader(outBuffer, 'q', sequence); encodeClassIndication(outBuffer, packageName, classes.front().first, classes.front().second); outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND ClassInd class=" << packageName << ":" << classes.front().first.name << "(" << Uuid(classes.front().first.hash) << ") to=" << replyToKey << " seq=" << sequence); classes.pop_front(); } } sendCommandCompleteLH(replyToKey, sequence); } void ManagementAgent::handleClassIndLH (Buffer& inBuffer, const string& replyToKey, uint32_t) { string packageName; SchemaClassKey key; uint8_t kind = inBuffer.getOctet(); inBuffer.getShortString(packageName); inBuffer.getShortString(key.name); inBuffer.getBin128(key.hash); QPID_LOG(debug, "RECV ClassInd class=" << packageName << ":" << key.name << "(" << Uuid(key.hash) << "), replyTo=" << replyToKey); PackageMap::iterator pIter = findOrAddPackageLH(packageName); ClassMap::iterator cIter = pIter->second.find(key); if (cIter == pIter->second.end() || !cIter->second.hasSchema()) { Buffer outBuffer (outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; uint32_t sequence = nextRequestSequence++; // Schema Request encodeHeader (outBuffer, 'S', sequence); outBuffer.putShortString(packageName); key.encode(outBuffer); outLen = MA_BUFFER_SIZE - outBuffer.available (); outBuffer.reset (); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND SchemaRequest class=" << packageName << ":" << key.name << "(" << Uuid(key.hash) << "), to=" << replyToKey << " seq=" << sequence); if (cIter != pIter->second.end()) pIter->second.erase(key); pIter->second.insert(pair(key, SchemaClass(kind, sequence))); } } void ManagementAgent::SchemaClass::appendSchema(Buffer& buf) { // If the management package is attached locally (embedded in the broker or // linked in via plug-in), call the schema handler directly. If the package // is from a remote management agent, send the stored schema information. if (writeSchemaCall != 0) { string schema; writeSchemaCall(schema); buf.putRawData(schema); } else buf.putRawData(reinterpret_cast(&data[0]), data.size()); } void ManagementAgent::handleSchemaRequestLH(Buffer& inBuffer, const string& rte, const string& rtk, uint32_t sequence) { string packageName; SchemaClassKey key; inBuffer.getShortString (packageName); key.decode(inBuffer); QPID_LOG(debug, "RECV SchemaRequest class=" << packageName << ":" << key.name << "(" << Uuid(key.hash) << "), replyTo=" << rte << "/" << rtk << " seq=" << sequence); PackageMap::iterator pIter = packages.find(packageName); if (pIter != packages.end()) { ClassMap& cMap = pIter->second; ClassMap::iterator cIter = cMap.find(key); if (cIter != cMap.end()) { Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; SchemaClass& classInfo = cIter->second; if (classInfo.hasSchema()) { encodeHeader(outBuffer, 's', sequence); classInfo.appendSchema(outBuffer); outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, rte, rtk); QPID_LOG(debug, "SEND SchemaResponse to=" << rte << "/" << rtk << " seq=" << sequence); } else sendCommandCompleteLH(rtk, sequence, 1, "Schema not available"); } else sendCommandCompleteLH(rtk, sequence, 1, "Class key not found"); } else sendCommandCompleteLH(rtk, sequence, 1, "Package not found"); } void ManagementAgent::handleSchemaResponseLH(Buffer& inBuffer, const string& /*replyToKey*/, uint32_t sequence) { string packageName; SchemaClassKey key; inBuffer.record(); inBuffer.getOctet(); inBuffer.getShortString(packageName); key.decode(inBuffer); inBuffer.restore(); QPID_LOG(debug, "RECV SchemaResponse class=" << packageName << ":" << key.name << "(" << Uuid(key.hash) << ")" << " seq=" << sequence); PackageMap::iterator pIter = packages.find(packageName); if (pIter != packages.end()) { ClassMap& cMap = pIter->second; ClassMap::iterator cIter = cMap.find(key); if (cIter != cMap.end() && cIter->second.pendingSequence == sequence) { size_t length = validateSchema(inBuffer, cIter->second.kind); if (length == 0) { QPID_LOG(warning, "Management Agent received invalid schema response: " << packageName << "." << key.name); cMap.erase(key); } else { cIter->second.data.resize(length); inBuffer.getRawData(reinterpret_cast(&cIter->second.data[0]), length); // Publish a class-indication message Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; encodeHeader(outBuffer, 'q'); encodeClassIndication(outBuffer, pIter->first, cIter->first, cIter->second.kind); outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, mExchange, "schema.class"); QPID_LOG(debug, "SEND ClassInd class=" << packageName << ":" << key.name << "(" << Uuid(key.hash) << ")" << " to=schema.class"); } } } } bool ManagementAgent::bankInUse (uint32_t bank) { for (RemoteAgentMap::iterator aIter = remoteAgents.begin(); aIter != remoteAgents.end(); aIter++) if (aIter->second->agentBank == bank) return true; return false; } uint32_t ManagementAgent::allocateNewBank () { while (bankInUse (nextRemoteBank)) nextRemoteBank++; uint32_t allocated = nextRemoteBank++; writeData (); return allocated; } uint32_t ManagementAgent::assignBankLH (uint32_t requestedBank) { if (requestedBank == 0 || bankInUse (requestedBank)) return allocateNewBank (); return requestedBank; } void ManagementAgent::deleteOrphanedAgentsLH() { list deleteList; for (RemoteAgentMap::const_iterator aIter = remoteAgents.begin(); aIter != remoteAgents.end(); aIter++) { bool found = false; for (ManagementObjectMap::iterator iter = managementObjects.begin(); iter != managementObjects.end(); iter++) { if (iter->first == aIter->first && !iter->second->isDeleted()) { found = true; break; } } if (!found) deleteList.push_back(aIter->first); } for (list::const_iterator dIter = deleteList.begin(); dIter != deleteList.end(); dIter++) remoteAgents.erase(*dIter); } void ManagementAgent::handleAttachRequestLH (Buffer& inBuffer, const string& replyToKey, uint32_t sequence, const ConnectionToken* connToken) { string label; uint32_t requestedBrokerBank, requestedAgentBank; uint32_t assignedBank; ObjectId connectionRef = ((const ConnectionState*) connToken)->GetManagementObject()->getObjectId(); Uuid systemId; moveNewObjectsLH(); deleteOrphanedAgentsLH(); RemoteAgentMap::iterator aIter = remoteAgents.find(connectionRef); if (aIter != remoteAgents.end()) { // There already exists an agent on this session. Reject the request. sendCommandCompleteLH(replyToKey, sequence, 1, "Connection already has remote agent"); return; } inBuffer.getShortString(label); systemId.decode(inBuffer); requestedBrokerBank = inBuffer.getLong(); requestedAgentBank = inBuffer.getLong(); QPID_LOG(debug, "RECV (Agent)AttachRequest label=" << label << " reqBrokerBank=" << requestedBrokerBank << " reqAgentBank=" << requestedAgentBank << " replyTo=" << replyToKey << " seq=" << sequence); assignedBank = assignBankLH(requestedAgentBank); boost::shared_ptr agent(new RemoteAgent(*this)); agent->brokerBank = brokerBank; agent->agentBank = assignedBank; agent->routingKey = replyToKey; agent->connectionRef = connectionRef; agent->mgmtObject = new _qmf::Agent (this, agent.get()); agent->mgmtObject->set_connectionRef(agent->connectionRef); agent->mgmtObject->set_label (label); agent->mgmtObject->set_registeredTo (broker->GetManagementObject()->getObjectId()); agent->mgmtObject->set_systemId ((const unsigned char*)systemId.data()); agent->mgmtObject->set_brokerBank (brokerBank); agent->mgmtObject->set_agentBank (assignedBank); addObject (agent->mgmtObject, 0); remoteAgents[connectionRef] = agent; QPID_LOG(debug, "Remote Agent registered bank=[" << brokerBank << "." << assignedBank << "] replyTo=" << replyToKey); // Send an Attach Response Buffer outBuffer (outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; encodeHeader (outBuffer, 'a', sequence); outBuffer.putLong (brokerBank); outBuffer.putLong (assignedBank); outLen = MA_BUFFER_SIZE - outBuffer.available (); outBuffer.reset (); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND AttachResponse brokerBank=" << brokerBank << " agentBank=" << assignedBank << " to=" << replyToKey << " seq=" << sequence); } void ManagementAgent::handleGetQueryLH(Buffer& inBuffer, const string& replyToKey, uint32_t sequence) { FieldTable ft; FieldTable::ValuePtr value; moveNewObjectsLH(); ft.decode(inBuffer); QPID_LOG(debug, "RECV GetQuery (v1) query=" << ft << " seq=" << sequence); value = ft.get("_class"); if (value.get() == 0 || !value->convertsTo()) { value = ft.get("_objectid"); if (value.get() == 0 || !value->convertsTo()) return; ObjectId selector(value->get()); ManagementObjectMap::iterator iter = numericFind(selector); if (iter != managementObjects.end()) { ManagementObject* object = iter->second; Buffer outBuffer (outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); if (!object->isDeleted()) { string sBuf; encodeHeader(outBuffer, 'g', sequence); object->writeProperties(sBuf); outBuffer.putRawData(sBuf); sBuf.clear(); object->writeStatistics(sBuf, true); outBuffer.putRawData(sBuf); outLen = MA_BUFFER_SIZE - outBuffer.available (); outBuffer.reset (); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND GetResponse (v1) to=" << replyToKey << " seq=" << sequence); } } sendCommandCompleteLH(replyToKey, sequence); return; } string className (value->get()); std::listmatches; if (className == "memory") qpid::sys::MemStat::loadMemInfo(memstat); if (className == "broker") { uint64_t uptime = sys::Duration(startTime, sys::now()); static_cast<_qmf::Broker*>(broker->GetManagementObject())->set_uptime(uptime); } // build up a set of all objects to be dumped for (ManagementObjectMap::iterator iter = managementObjects.begin(); iter != managementObjects.end(); iter++) { ManagementObject* object = iter->second; if (object->getClassName () == className) { matches.push_back(object->getObjectId()); } } // send them (as sendBufferLH drops the userLock) Buffer outBuffer (outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; while (matches.size()) { ObjectId objId = matches.front(); ManagementObjectMap::iterator oIter = managementObjects.find( objId ); if (oIter != managementObjects.end()) { ManagementObject* object = oIter->second; if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); if (!object->isDeleted()) { string sProps, sStats; object->writeProperties(sProps); object->writeStatistics(sStats, true); size_t len = 8 + sProps.length() + sStats.length(); // 8 == size of header in bytes. if (len > MA_BUFFER_SIZE) { QPID_LOG(error, "Object " << objId << " too large for output buffer - discarded!"); } else { if (outBuffer.available() < len) { // not enough room in current buffer, send it. outLen = MA_BUFFER_SIZE - outBuffer.available (); outBuffer.reset (); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); // drops lock QPID_LOG(debug, "SEND GetResponse (v1) to=" << replyToKey << " seq=" << sequence); continue; // lock dropped, need to re-find _SAME_ objid as it may have been deleted. } encodeHeader(outBuffer, 'g', sequence); outBuffer.putRawData(sProps); outBuffer.putRawData(sStats); } } } matches.pop_front(); } outLen = MA_BUFFER_SIZE - outBuffer.available (); if (outLen) { outBuffer.reset (); sendBufferLH(outBuffer, outLen, dExchange, replyToKey); QPID_LOG(debug, "SEND GetResponse (v1) to=" << replyToKey << " seq=" << sequence); } sendCommandCompleteLH(replyToKey, sequence); } void ManagementAgent::handleGetQueryLH(const string& body, const string& rte, const string& rtk, const string& cid, bool viaLocal) { moveNewObjectsLH(); Variant::Map inMap; Variant::Map::const_iterator i; Variant::Map headers; MapCodec::decode(body, inMap); QPID_LOG(debug, "RECV GetQuery (v2): map=" << inMap << " seq=" << cid); headers["method"] = "response"; headers["qmf.opcode"] = "_query_response"; headers["qmf.content"] = "_data"; headers["qmf.agent"] = viaLocal ? "broker" : name_address; /* * Unpack the _what element of the query. Currently we only support OBJECT queries. */ i = inMap.find("_what"); if (i == inMap.end()) { sendExceptionLH(rte, rtk, cid, "_what element missing in Query"); return; } if (i->second.getType() != qpid::types::VAR_STRING) { sendExceptionLH(rte, rtk, cid, "_what element is not a string"); return; } if (i->second.asString() != "OBJECT") { sendExceptionLH(rte, rtk, cid, "Query for _what => '" + i->second.asString() + "' not supported"); return; } string className; string packageName; /* * Handle the _schema_id element, if supplied. */ i = inMap.find("_schema_id"); if (i != inMap.end() && i->second.getType() == qpid::types::VAR_MAP) { const Variant::Map& schemaIdMap(i->second.asMap()); Variant::Map::const_iterator s_iter = schemaIdMap.find("_class_name"); if (s_iter != schemaIdMap.end() && s_iter->second.getType() == qpid::types::VAR_STRING) className = s_iter->second.asString(); s_iter = schemaIdMap.find("_package_name"); if (s_iter != schemaIdMap.end() && s_iter->second.getType() == qpid::types::VAR_STRING) packageName = s_iter->second.asString(); } if (className == "memory") qpid::sys::MemStat::loadMemInfo(memstat); if (className == "broker") { uint64_t uptime = sys::Duration(startTime, sys::now()); static_cast<_qmf::Broker*>(broker->GetManagementObject())->set_uptime(uptime); } /* * Unpack the _object_id element of the query if it is present. If it is present, find that one * object and return it. If it is not present, send a class-based result. */ i = inMap.find("_object_id"); if (i != inMap.end() && i->second.getType() == qpid::types::VAR_MAP) { Variant::List list_; ObjectId objId(i->second.asMap()); ManagementObjectMap::iterator iter = managementObjects.find(objId); if (iter != managementObjects.end()) { ManagementObject* object = iter->second; if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); if (!object->isDeleted()) { Variant::Map map_; Variant::Map values; Variant::Map oidMap; object->writeTimestamps(map_); object->mapEncodeValues(values, true, true); // write both stats and properties objId.mapEncode(oidMap); map_["_values"] = values; map_["_object_id"] = oidMap; map_["_schema_id"] = mapEncodeSchemaId(object->getPackageName(), object->getClassName(), "_data", object->getMd5Sum()); list_.push_back(map_); } string content; ListCodec::encode(list_, content); sendBufferLH(content, cid, headers, "amqp/list", rte, rtk); QPID_LOG(debug, "SENT QueryResponse (query by object_id) to=" << rte << "/" << rtk); return; } } else { // send class-based result. Variant::List _list; Variant::List _subList; unsigned int objCount = 0; for (ManagementObjectMap::iterator iter = managementObjects.begin(); iter != managementObjects.end(); iter++) { ManagementObject* object = iter->second; if (object->getClassName() == className && (packageName.empty() || object->getPackageName() == packageName)) { if (!object->isDeleted()) { Variant::Map map_; Variant::Map values; Variant::Map oidMap; if (object->getConfigChanged() || object->getInstChanged()) object->setUpdateTime(); object->writeTimestamps(map_); object->mapEncodeValues(values, true, true); // write both stats and properties iter->first.mapEncode(oidMap); map_["_values"] = values; map_["_object_id"] = oidMap; map_["_schema_id"] = mapEncodeSchemaId(object->getPackageName(), object->getClassName(), "_data", object->getMd5Sum()); _subList.push_back(map_); if (++objCount >= maxReplyObjs) { objCount = 0; _list.push_back(_subList); _subList.clear(); } } } } if (_subList.size()) _list.push_back(_subList); headers["partial"] = Variant(); string content; while (_list.size() > 1) { ListCodec::encode(_list.front().asList(), content); sendBufferLH(content, cid, headers, "amqp/list", rte, rtk); _list.pop_front(); QPID_LOG(debug, "SENT QueryResponse (partial, query by schema_id) to=" << rte << "/" << rtk << " len=" << content.length()); } headers.erase("partial"); ListCodec::encode(_list.size() ? _list.front().asList() : Variant::List(), content); sendBufferLH(content, cid, headers, "amqp/list", rte, rtk); QPID_LOG(debug, "SENT QueryResponse (query by schema_id) to=" << rte << "/" << rtk << " len=" << content.length()); return; } // Unrecognized query - Send empty message to indicate CommandComplete string content; ListCodec::encode(Variant::List(), content); sendBufferLH(content, cid, headers, "amqp/list", rte, rtk); QPID_LOG(debug, "SENT QueryResponse (empty) to=" << rte << "/" << rtk); } void ManagementAgent::handleLocateRequestLH(const string&, const string& rte, const string& rtk, const string& cid) { QPID_LOG(debug, "RCVD AgentLocateRequest"); Variant::Map map; Variant::Map headers; headers["method"] = "indication"; headers["qmf.opcode"] = "_agent_locate_response"; headers["qmf.agent"] = name_address; map["_values"] = attrMap; map["_values"].asMap()["_timestamp"] = uint64_t(sys::Duration(sys::EPOCH, sys::now())); map["_values"].asMap()["_heartbeat_interval"] = interval; map["_values"].asMap()["_epoch"] = bootSequence; string content; MapCodec::encode(map, content); sendBufferLH(content, cid, headers, "amqp/map", rte, rtk); clientWasAdded = true; QPID_LOG(debug, "SENT AgentLocateResponse replyTo=" << rte << "/" << rtk); } bool ManagementAgent::authorizeAgentMessageLH(Message& msg) { Buffer inBuffer (inputBuffer, MA_BUFFER_SIZE); uint32_t sequence = 0; bool methodReq = false; bool mapMsg = false; string packageName; string className; string methodName; string cid; // // If the message is larger than our working buffer size, we can't determine if it's // authorized or not. In this case, return true (authorized) if there is no ACL in place, // otherwise return false; // if (msg.encodedSize() > MA_BUFFER_SIZE) return broker->getAcl() == 0; msg.encodeContent(inBuffer); uint32_t bufferLen = inBuffer.getPosition(); inBuffer.reset(); const framing::MessageProperties* p = msg.getFrames().getHeaders()->get(); const framing::FieldTable *headers = msg.getApplicationHeaders(); if (headers && msg.getAppId() == "qmf2") { mapMsg = true; if (p && p->hasCorrelationId()) { cid = p->getCorrelationId(); } if (headers->getAsString("qmf.opcode") == "_method_request") { methodReq = true; // extract object id and method name string body; inBuffer.getRawData(body, bufferLen); Variant::Map inMap; MapCodec::decode(body, inMap); Variant::Map::const_iterator oid, mid; ObjectId objId; if ((oid = inMap.find("_object_id")) == inMap.end() || (mid = inMap.find("_method_name")) == inMap.end()) { QPID_LOG(warning, "Missing fields in QMF authorize req received."); return false; } try { // coversions will throw if input is invalid. objId = ObjectId(oid->second.asMap()); methodName = mid->second.getString(); } catch(exception& /*e*/) { QPID_LOG(warning, "Badly formatted QMF authorize req received."); return false; } // look up schema for object to get package and class name ManagementObjectMap::iterator iter = managementObjects.find(objId); if (iter == managementObjects.end() || iter->second->isDeleted()) { QPID_LOG(debug, "ManagementAgent::authorizeAgentMessageLH: stale object id " << objId); return false; } packageName = iter->second->getPackageName(); className = iter->second->getClassName(); } } else { // old style binary message format uint8_t opcode; if (!checkHeader(inBuffer, &opcode, &sequence)) return false; if (opcode == 'M') { methodReq = true; // extract method name & schema package and class name uint8_t hash[16]; inBuffer.getLongLong(); // skip over object id inBuffer.getLongLong(); inBuffer.getShortString(packageName); inBuffer.getShortString(className); inBuffer.getBin128(hash); inBuffer.getShortString(methodName); } } if (methodReq) { // TODO: check method call against ACL list. map params; AclModule* acl = broker->getAcl(); if (acl == 0) return true; string userId = ((const qpid::broker::ConnectionState*) msg.getPublisher())->getUserId(); params[acl::PROP_SCHEMAPACKAGE] = packageName; params[acl::PROP_SCHEMACLASS] = className; if (acl->authorise(userId, acl::ACT_ACCESS, acl::OBJ_METHOD, methodName, ¶ms)) return true; // authorization failed, send reply if replyTo present const framing::MessageProperties* p = msg.getFrames().getHeaders()->get(); if (p && p->hasReplyTo()) { const framing::ReplyTo& rt = p->getReplyTo(); string rte = rt.getExchange(); string rtk = rt.getRoutingKey(); string cid; if (p && p->hasCorrelationId()) cid = p->getCorrelationId(); if (mapMsg) { sendExceptionLH(rte, rtk, cid, Manageable::StatusText(Manageable::STATUS_FORBIDDEN), Manageable::STATUS_FORBIDDEN, false); } else { Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; encodeHeader(outBuffer, 'm', sequence); outBuffer.putLong(Manageable::STATUS_FORBIDDEN); outBuffer.putMediumString(Manageable::StatusText(Manageable::STATUS_FORBIDDEN)); outLen = MA_BUFFER_SIZE - outBuffer.available(); outBuffer.reset(); sendBufferLH(outBuffer, outLen, rte, rtk); } QPID_LOG(debug, "SEND MethodResponse status=FORBIDDEN" << " seq=" << sequence); } return false; } return true; } void ManagementAgent::dispatchAgentCommandLH(Message& msg, bool viaLocal) { string rte; string rtk; const framing::MessageProperties* p = msg.getFrames().getHeaders()->get(); if (p && p->hasReplyTo()) { const framing::ReplyTo& rt = p->getReplyTo(); rte = rt.getExchange(); rtk = rt.getRoutingKey(); } else return; Buffer inBuffer(inputBuffer, MA_BUFFER_SIZE); uint8_t opcode; if (msg.encodedSize() > MA_BUFFER_SIZE) { QPID_LOG(debug, "ManagementAgent::dispatchAgentCommandLH: Message too large: " << msg.encodedSize()); return; } msg.encodeContent(inBuffer); uint32_t bufferLen = inBuffer.getPosition(); inBuffer.reset(); ScopedManagementContext context((const qpid::broker::ConnectionState*) msg.getPublisher()); const framing::FieldTable *headers = msg.getApplicationHeaders(); if (headers && msg.getAppId() == "qmf2") { string opcode = headers->getAsString("qmf.opcode"); string contentType = headers->getAsString("qmf.content"); string body; string cid; inBuffer.getRawData(body, bufferLen); if (p && p->hasCorrelationId()) { cid = p->getCorrelationId(); } if (opcode == "_method_request") return handleMethodRequestLH(body, rte, rtk, cid, msg.getPublisher(), viaLocal); else if (opcode == "_query_request") return handleGetQueryLH(body, rte, rtk, cid, viaLocal); else if (opcode == "_agent_locate_request") return handleLocateRequestLH(body, rte, rtk, cid); QPID_LOG(warning, "Support for QMF Opcode [" << opcode << "] TBD!!!"); return; } // old preV2 binary messages while (inBuffer.getPosition() < bufferLen) { uint32_t sequence; if (!checkHeader(inBuffer, &opcode, &sequence)) return; if (opcode == 'B') handleBrokerRequestLH (inBuffer, rtk, sequence); else if (opcode == 'P') handlePackageQueryLH (inBuffer, rtk, sequence); else if (opcode == 'p') handlePackageIndLH (inBuffer, rtk, sequence); else if (opcode == 'Q') handleClassQueryLH (inBuffer, rtk, sequence); else if (opcode == 'q') handleClassIndLH (inBuffer, rtk, sequence); else if (opcode == 'S') handleSchemaRequestLH (inBuffer, rte, rtk, sequence); else if (opcode == 's') handleSchemaResponseLH (inBuffer, rtk, sequence); else if (opcode == 'A') handleAttachRequestLH (inBuffer, rtk, sequence, msg.getPublisher()); else if (opcode == 'G') handleGetQueryLH (inBuffer, rtk, sequence); else if (opcode == 'M') handleMethodRequestLH (inBuffer, rtk, sequence, msg.getPublisher()); } } ManagementAgent::PackageMap::iterator ManagementAgent::findOrAddPackageLH(string name) { PackageMap::iterator pIter = packages.find (name); if (pIter != packages.end ()) return pIter; // No such package found, create a new map entry. pair result = packages.insert(pair(name, ClassMap())); QPID_LOG (debug, "ManagementAgent added package " << name); // Publish a package-indication message Buffer outBuffer (outputBuffer, MA_BUFFER_SIZE); uint32_t outLen; encodeHeader (outBuffer, 'p'); encodePackageIndication (outBuffer, result.first); outLen = MA_BUFFER_SIZE - outBuffer.available (); outBuffer.reset (); sendBufferLH(outBuffer, outLen, mExchange, "schema.package"); QPID_LOG(debug, "SEND PackageInd package=" << name << " to=schema.package"); return result.first; } void ManagementAgent::addClassLH(uint8_t kind, PackageMap::iterator pIter, const string& className, uint8_t* md5Sum, ManagementObject::writeSchemaCall_t schemaCall) { SchemaClassKey key; ClassMap& cMap = pIter->second; key.name = className; memcpy(&key.hash, md5Sum, 16); ClassMap::iterator cIter = cMap.find(key); if (cIter != cMap.end()) return; // No such class found, create a new class with local information. QPID_LOG (debug, "ManagementAgent added class " << pIter->first << ":" << key.name); cMap.insert(pair(key, SchemaClass(kind, schemaCall))); cIter = cMap.find(key); } void ManagementAgent::encodePackageIndication(Buffer& buf, PackageMap::iterator pIter) { buf.putShortString((*pIter).first); } void ManagementAgent::encodeClassIndication(Buffer& buf, const std::string packageName, const SchemaClassKey key, uint8_t kind) { buf.putOctet(kind); buf.putShortString(packageName); key.encode(buf); } size_t ManagementAgent::validateSchema(Buffer& inBuffer, uint8_t kind) { if (kind == ManagementItem::CLASS_KIND_TABLE) return validateTableSchema(inBuffer); else if (kind == ManagementItem::CLASS_KIND_EVENT) return validateEventSchema(inBuffer); return 0; } size_t ManagementAgent::validateTableSchema(Buffer& inBuffer) { uint32_t start = inBuffer.getPosition(); uint32_t end; string text; uint8_t hash[16]; try { inBuffer.record(); uint8_t kind = inBuffer.getOctet(); if (kind != ManagementItem::CLASS_KIND_TABLE) return 0; inBuffer.getShortString(text); inBuffer.getShortString(text); inBuffer.getBin128(hash); uint8_t superType = 0; //inBuffer.getOctet(); uint16_t propCount = inBuffer.getShort(); uint16_t statCount = inBuffer.getShort(); uint16_t methCount = inBuffer.getShort(); if (superType == 1) { inBuffer.getShortString(text); inBuffer.getShortString(text); inBuffer.getBin128(hash); } for (uint16_t idx = 0; idx < propCount + statCount; idx++) { FieldTable ft; ft.decode(inBuffer); } for (uint16_t idx = 0; idx < methCount; idx++) { FieldTable ft; ft.decode(inBuffer); if (!ft.isSet("argCount")) return 0; int argCount = ft.getAsInt("argCount"); for (int mIdx = 0; mIdx < argCount; mIdx++) { FieldTable aft; aft.decode(inBuffer); } } } catch (exception& /*e*/) { return 0; } end = inBuffer.getPosition(); inBuffer.restore(); // restore original position return end - start; } size_t ManagementAgent::validateEventSchema(Buffer& inBuffer) { uint32_t start = inBuffer.getPosition(); uint32_t end; string text; uint8_t hash[16]; try { inBuffer.record(); uint8_t kind = inBuffer.getOctet(); if (kind != ManagementItem::CLASS_KIND_EVENT) return 0; inBuffer.getShortString(text); inBuffer.getShortString(text); inBuffer.getBin128(hash); uint8_t superType = 0; //inBuffer.getOctet(); uint16_t argCount = inBuffer.getShort(); if (superType == 1) { inBuffer.getShortString(text); inBuffer.getShortString(text); inBuffer.getBin128(hash); } for (uint16_t idx = 0; idx < argCount; idx++) { FieldTable ft; ft.decode(inBuffer); } } catch (exception& /*e*/) { return 0; } end = inBuffer.getPosition(); inBuffer.restore(); // restore original position return end - start; } ManagementObjectMap::iterator ManagementAgent::numericFind(const ObjectId& oid) { ManagementObjectMap::iterator iter = managementObjects.begin(); for (; iter != managementObjects.end(); iter++) { if (oid.equalV1(iter->first)) break; } return iter; } void ManagementAgent::disallow(const string& className, const string& methodName, const string& message) { disallowed[make_pair(className, methodName)] = message; } void ManagementAgent::SchemaClassKey::mapEncode(Variant::Map& _map) const { _map["_cname"] = name; _map["_hash"] = qpid::types::Uuid(hash); } void ManagementAgent::SchemaClassKey::mapDecode(const Variant::Map& _map) { Variant::Map::const_iterator i; if ((i = _map.find("_cname")) != _map.end()) { name = i->second.asString(); } if ((i = _map.find("_hash")) != _map.end()) { const qpid::types::Uuid& uuid = i->second.asUuid(); memcpy(hash, uuid.data(), uuid.size()); } } void ManagementAgent::SchemaClassKey::encode(qpid::framing::Buffer& buffer) const { buffer.checkAvailable(encodedBufSize()); buffer.putShortString(name); buffer.putBin128(hash); } void ManagementAgent::SchemaClassKey::decode(qpid::framing::Buffer& buffer) { buffer.checkAvailable(encodedBufSize()); buffer.getShortString(name); buffer.getBin128(hash); } uint32_t ManagementAgent::SchemaClassKey::encodedBufSize() const { return 1 + name.size() + 16 /* bin128 */; } void ManagementAgent::SchemaClass::mapEncode(Variant::Map& _map) const { _map["_type"] = kind; _map["_pending_sequence"] = pendingSequence; _map["_data"] = data; } void ManagementAgent::SchemaClass::mapDecode(const Variant::Map& _map) { Variant::Map::const_iterator i; if ((i = _map.find("_type")) != _map.end()) { kind = i->second; } if ((i = _map.find("_pending_sequence")) != _map.end()) { pendingSequence = i->second; } if ((i = _map.find("_data")) != _map.end()) { data = i->second.asString(); } } void ManagementAgent::exportSchemas(string& out) { Variant::List list_; Variant::Map map_, kmap, cmap; for (PackageMap::const_iterator i = packages.begin(); i != packages.end(); ++i) { string name = i->first; const ClassMap& classes = i ->second; for (ClassMap::const_iterator j = classes.begin(); j != classes.end(); ++j) { const SchemaClassKey& key = j->first; const SchemaClass& klass = j->second; if (klass.writeSchemaCall == 0) { // Ignore built-in schemas. // Encode name, schema-key, schema-class map_.clear(); kmap.clear(); cmap.clear(); key.mapEncode(kmap); klass.mapEncode(cmap); map_["_pname"] = name; map_["_key"] = kmap; map_["_class"] = cmap; list_.push_back(map_); } } } ListCodec::encode(list_, out); } void ManagementAgent::importSchemas(qpid::framing::Buffer& inBuf) { string buf(inBuf.getPointer(), inBuf.available()); Variant::List content; ListCodec::decode(buf, content); Variant::List::const_iterator l; for (l = content.begin(); l != content.end(); l++) { string package; SchemaClassKey key; SchemaClass klass; Variant::Map map_, kmap, cmap; Variant::Map::const_iterator i; map_ = l->asMap(); if ((i = map_.find("_pname")) != map_.end()) { package = i->second.asString(); if ((i = map_.find("_key")) != map_.end()) { key.mapDecode(i->second.asMap()); if ((i = map_.find("_class")) != map_.end()) { klass.mapDecode(i->second.asMap()); packages[package][key] = klass; } } } } } void ManagementAgent::RemoteAgent::mapEncode(Variant::Map& map_) const { Variant::Map _objId, _values; map_["_brokerBank"] = brokerBank; map_["_agentBank"] = agentBank; map_["_routingKey"] = routingKey; connectionRef.mapEncode(_objId); map_["_object_id"] = _objId; mgmtObject->mapEncodeValues(_values, true, false); map_["_values"] = _values; } void ManagementAgent::RemoteAgent::mapDecode(const Variant::Map& map_) { Variant::Map::const_iterator i; if ((i = map_.find("_brokerBank")) != map_.end()) { brokerBank = i->second; } if ((i = map_.find("_agentBank")) != map_.end()) { agentBank = i->second; } if ((i = map_.find("_routingKey")) != map_.end()) { routingKey = i->second.getString(); } if ((i = map_.find("_object_id")) != map_.end()) { connectionRef.mapDecode(i->second.asMap()); } mgmtObject = new _qmf::Agent(&agent, this); if ((i = map_.find("_values")) != map_.end()) { mgmtObject->mapDecodeValues(i->second.asMap()); } // TODO aconway 2010-03-04: see comment in encode(), readProperties doesn't set v2key. mgmtObject->set_connectionRef(connectionRef); } void ManagementAgent::exportAgents(string& out) { Variant::List list_; Variant::Map map_, omap, amap; for (RemoteAgentMap::const_iterator i = remoteAgents.begin(); i != remoteAgents.end(); ++i) { // TODO aconway 2010-03-04: see comment in ManagementAgent::RemoteAgent::encode boost::shared_ptr agent(i->second); map_.clear(); amap.clear(); agent->mapEncode(amap); map_["_remote_agent"] = amap; list_.push_back(map_); } ListCodec::encode(list_, out); } void ManagementAgent::importAgents(qpid::framing::Buffer& inBuf) { string buf(inBuf.getPointer(), inBuf.available()); Variant::List content; ListCodec::decode(buf, content); Variant::List::const_iterator l; sys::Mutex::ScopedLock lock(userLock); for (l = content.begin(); l != content.end(); l++) { boost::shared_ptr agent(new RemoteAgent(*this)); Variant::Map map_; Variant::Map::const_iterator i; map_ = l->asMap(); if ((i = map_.find("_remote_agent")) != map_.end()) { agent->mapDecode(i->second.asMap()); addObject (agent->mgmtObject, 0, false); remoteAgents[agent->connectionRef] = agent; } } } namespace { bool isDeletedMap(const ManagementObjectMap::value_type& value) { return value.second->isDeleted(); } bool isDeletedVector(const ManagementObjectVector::value_type& value) { return value->isDeleted(); } string summarizeMap(const char* name, const ManagementObjectMap& map) { ostringstream o; size_t deleted = std::count_if(map.begin(), map.end(), isDeletedMap); o << map.size() << " " << name << " (" << deleted << " deleted), "; return o.str(); } string summarizeVector(const char* name, const ManagementObjectVector& map) { ostringstream o; size_t deleted = std::count_if(map.begin(), map.end(), isDeletedVector); o << map.size() << " " << name << " (" << deleted << " deleted), "; return o.str(); } string dumpMap(const ManagementObjectMap& map) { ostringstream o; for (ManagementObjectMap::const_iterator i = map.begin(); i != map.end(); ++i) { o << endl << " " << i->second->getObjectId().getV2Key() << (i->second->isDeleted() ? " (deleted)" : ""); } return o.str(); } string dumpVector(const ManagementObjectVector& map) { ostringstream o; for (ManagementObjectVector::const_iterator i = map.begin(); i != map.end(); ++i) { o << endl << " " << (*i)->getObjectId().getV2Key() << ((*i)->isDeleted() ? " (deleted)" : ""); } return o.str(); } } // namespace string ManagementAgent::summarizeAgents() { ostringstream msg; if (!remoteAgents.empty()) { msg << remoteAgents.size() << " agents("; for (RemoteAgentMap::const_iterator i=remoteAgents.begin(); i != remoteAgents.end(); ++i) msg << " " << i->second->routingKey; msg << "), "; } return msg.str(); } void ManagementAgent::debugSnapshot(const char* title) { QPID_LOG(debug, title << ": management snapshot: " << packages.size() << " packages, " << summarizeMap("objects", managementObjects) << summarizeVector("new objects ", newManagementObjects) << pendingDeletedObjs.size() << " pending deletes" << summarizeAgents()); QPID_LOG_IF(trace, managementObjects.size(), title << ": objects" << dumpMap(managementObjects)); QPID_LOG_IF(trace, newManagementObjects.size(), title << ": new objects" << dumpVector(newManagementObjects)); } Variant::Map ManagementAgent::toMap(const FieldTable& from) { Variant::Map map; qpid::amqp_0_10::translate(from, map); return map; } // Build up a list of the current set of deleted objects that are pending their // next (last) publish-ment. void ManagementAgent::exportDeletedObjects(DeletedObjectList& outList) { outList.clear(); sys::Mutex::ScopedLock lock (userLock); moveNewObjectsLH(); moveDeletedObjectsLH(); // now copy the pending deletes into the outList for (PendingDeletedObjsMap::iterator mIter = pendingDeletedObjs.begin(); mIter != pendingDeletedObjs.end(); mIter++) { for (DeletedObjectList::iterator lIter = mIter->second.begin(); lIter != mIter->second.end(); lIter++) { outList.push_back(*lIter); } } } // Called by cluster to reset the management agent's list of deleted // objects to match the rest of the cluster. void ManagementAgent::importDeletedObjects(const DeletedObjectList& inList) { sys::Mutex::ScopedLock lock (userLock); // Clear out any existing deleted objects moveNewObjectsLH(); pendingDeletedObjs.clear(); ManagementObjectMap::iterator i = managementObjects.begin(); // Silently drop any deleted objects left over from receiving the update. while (i != managementObjects.end()) { ManagementObject* object = i->second; if (object->isDeleted()) { delete object; managementObjects.erase(i++); } else ++i; } for (DeletedObjectList::const_iterator lIter = inList.begin(); lIter != inList.end(); lIter++) { std::string classkey((*lIter)->packageName + std::string(":") + (*lIter)->className); pendingDeletedObjs[classkey].push_back(*lIter); } } // construct a DeletedObject from a management object. ManagementAgent::DeletedObject::DeletedObject(ManagementObject *src, bool v1, bool v2) : packageName(src->getPackageName()), className(src->getClassName()) { bool send_stats = (src->hasInst() && (src->getInstChanged() || src->getForcePublish())); stringstream oid; oid << src->getObjectId(); objectId = oid.str(); if (v1) { src->writeProperties(encodedV1Config); if (send_stats) { src->writeStatistics(encodedV1Inst); } } if (v2) { Variant::Map map_; Variant::Map values; Variant::Map oid; src->getObjectId().mapEncode(oid); map_["_object_id"] = oid; map_["_schema_id"] = mapEncodeSchemaId(src->getPackageName(), src->getClassName(), "_data", src->getMd5Sum()); src->writeTimestamps(map_); src->mapEncodeValues(values, true, send_stats); map_["_values"] = values; encodedV2 = map_; } } // construct a DeletedObject from an encoded representation. Used by // clustering to move deleted objects between clustered brokers. See // DeletedObject::encode() for the reverse. ManagementAgent::DeletedObject::DeletedObject(const std::string& encoded) { qpid::types::Variant::Map map_; MapCodec::decode(encoded, map_); packageName = map_["_package_name"].getString(); className = map_["_class_name"].getString(); objectId = map_["_object_id"].getString(); encodedV1Config = map_["_v1_config"].getString(); encodedV1Inst = map_["_v1_inst"].getString(); encodedV2 = map_["_v2_data"].asMap(); } // encode a DeletedObject to a string buffer. Used by // clustering to move deleted objects between clustered brokers. See // DeletedObject(const std::string&) for the reverse. void ManagementAgent::DeletedObject::encode(std::string& toBuffer) { qpid::types::Variant::Map map_; map_["_package_name"] = packageName; map_["_class_name"] = className; map_["_object_id"] = objectId; map_["_v1_config"] = encodedV1Config; map_["_v1_inst"] = encodedV1Inst; map_["_v2_data"] = encodedV2; MapCodec::encode(map_, toBuffer); } // Remove Deleted objects, and save for later publishing... bool ManagementAgent::moveDeletedObjectsLH() { typedef vector > DeleteList; DeleteList deleteList; for (ManagementObjectMap::iterator iter = managementObjects.begin(); iter != managementObjects.end(); ++iter) { ManagementObject* object = iter->second; if (object->isDeleted()) deleteList.push_back(*iter); } // Iterate in reverse over deleted object list for (DeleteList::reverse_iterator iter = deleteList.rbegin(); iter != deleteList.rend(); iter++) { ManagementObject* delObj = iter->second; assert(delObj->isDeleted()); DeletedObject::shared_ptr dptr(new DeletedObject(delObj, qmf1Support, qmf2Support)); pendingDeletedObjs[dptr->getKey()].push_back(dptr); managementObjects.erase(iter->first); delete iter->second; } return !deleteList.empty(); } namespace qpid { namespace management { namespace { QPID_TSS const qpid::broker::ConnectionState* executionContext = 0; } void setManagementExecutionContext(const qpid::broker::ConnectionState* ctxt) { executionContext = ctxt; } const qpid::broker::ConnectionState* getManagementExecutionContext() { return executionContext; } }} qpidc-0.16/src/qpid/management/ManagementAgent.h0000664000076400007640000004345511723414716022221 0ustar00jrossjross00000000000000#ifndef _ManagementAgent_ #define _ManagementAgent_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/BrokerImportExport.h" #include "qpid/Options.h" #include "qpid/broker/Exchange.h" #include "qpid/framing/Uuid.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Timer.h" #include "qpid/broker/ConnectionToken.h" #include "qpid/management/ManagementObject.h" #include "qpid/management/ManagementEvent.h" #include "qpid/management/Manageable.h" #include "qmf/org/apache/qpid/broker/Agent.h" #include "qmf/org/apache/qpid/broker/Memory.h" #include "qpid/sys/MemStat.h" #include "qpid/types/Variant.h" #include #include #include #include #include #include namespace qpid { namespace broker { class ConnectionState; } namespace management { class ManagementAgent { private: int threadPoolSize; public: typedef enum { SEV_EMERG = 0, SEV_ALERT = 1, SEV_CRIT = 2, SEV_ERROR = 3, SEV_WARN = 4, SEV_NOTE = 5, SEV_INFO = 6, SEV_DEBUG = 7, SEV_DEFAULT = 8 } severity_t; ManagementAgent (const bool qmfV1, const bool qmfV2); virtual ~ManagementAgent (); /** Called before plugins are initialized */ void configure (const std::string& dataDir, bool publish, uint16_t interval, qpid::broker::Broker* broker, int threadPoolSize); /** Called after plugins are initialized. */ void pluginsInitialized(); /** Called by cluster to suppress management output during update. */ void suppress(bool s) { suppressed = s; } void setName(const std::string& vendor, const std::string& product, const std::string& instance=""); void getName(std::string& vendor, std::string& product, std::string& instance); const std::string& getAddress(); void setInterval(uint16_t _interval) { interval = _interval; } void setExchange(qpid::broker::Exchange::shared_ptr mgmtExchange, qpid::broker::Exchange::shared_ptr directExchange); void setExchangeV2(qpid::broker::Exchange::shared_ptr topicExchange, qpid::broker::Exchange::shared_ptr directExchange); int getMaxThreads () { return threadPoolSize; } QPID_BROKER_EXTERN void registerClass (const std::string& packageName, const std::string& className, uint8_t* md5Sum, ManagementObject::writeSchemaCall_t schemaCall); QPID_BROKER_EXTERN void registerEvent (const std::string& packageName, const std::string& eventName, uint8_t* md5Sum, ManagementObject::writeSchemaCall_t schemaCall); QPID_BROKER_EXTERN ObjectId addObject (ManagementObject* object, uint64_t persistId = 0, bool persistent = false); QPID_BROKER_EXTERN ObjectId addObject (ManagementObject* object, const std::string& key, bool persistent = false); QPID_BROKER_EXTERN void raiseEvent(const ManagementEvent& event, severity_t severity = SEV_DEFAULT); QPID_BROKER_EXTERN void clientAdded (const std::string& routingKey); QPID_BROKER_EXTERN void clusterUpdate(); bool dispatchCommand (qpid::broker::Deliverable& msg, const std::string& routingKey, const framing::FieldTable* args, const bool topic, int qmfVersion); /** Disallow a method. Attempts to call it will receive an exception with message. */ void disallow(const std::string& className, const std::string& methodName, const std::string& message); /** Disallow all QMFv1 methods (used in clustered brokers). */ void disallowV1Methods() { disallowAllV1Methods = true; } /** Serialize my schemas as a binary blob into schemaOut */ void exportSchemas(std::string& schemaOut); /** Serialize my remote-agent map as a binary blob into agentsOut */ void exportAgents(std::string& agentsOut); /** Decode a serialized schemas and add to my schema cache */ void importSchemas(framing::Buffer& inBuf); /** Decode a serialized agent map */ void importAgents(framing::Buffer& inBuf); // these are in support of the managementSetup-state stuff, for synch'ing clustered brokers uint64_t getNextObjectId(void) { return nextObjectId; } void setNextObjectId(uint64_t o) { nextObjectId = o; } uint16_t getBootSequence(void) { return bootSequence; } void setBootSequence(uint16_t b) { bootSequence = b; writeData(); } const framing::Uuid& getUuid() const { return uuid; } void setUuid(const framing::Uuid& id) { uuid = id; writeData(); } static types::Variant::Map toMap(const framing::FieldTable& from); // For Clustering: management objects that have been marked as // "deleted", but are waiting for their last published object // update are not visible to the cluster replication code. These // interfaces allow clustering to gather up all the management // objects that are deleted in order to allow all clustered // brokers to publish the same set of deleted objects. class DeletedObject { public: typedef boost::shared_ptr shared_ptr; DeletedObject(ManagementObject *, bool v1, bool v2); DeletedObject( const std::string &encoded ); ~DeletedObject() {}; void encode( std::string& toBuffer ); const std::string getKey() const { // used to batch up objects of the same class type return std::string(packageName + std::string(":") + className); } private: friend class ManagementAgent; std::string packageName; std::string className; std::string objectId; std::string encodedV1Config; // qmfv1 properties std::string encodedV1Inst; // qmfv1 statistics qpid::types::Variant::Map encodedV2; }; typedef std::vector DeletedObjectList; /** returns a snapshot of all currently deleted management objects. */ void exportDeletedObjects( DeletedObjectList& outList ); /** Import a list of deleted objects to send on next publish interval. */ void importDeletedObjects( const DeletedObjectList& inList ); private: struct Periodic : public qpid::sys::TimerTask { ManagementAgent& agent; Periodic (ManagementAgent& agent, uint32_t seconds); virtual ~Periodic (); void fire (); }; // Storage for tracking remote management agents, attached via the client // management agent API. // struct RemoteAgent : public Manageable { ManagementAgent& agent; uint32_t brokerBank; uint32_t agentBank; std::string routingKey; ObjectId connectionRef; qmf::org::apache::qpid::broker::Agent* mgmtObject; RemoteAgent(ManagementAgent& _agent) : agent(_agent), mgmtObject(0) {} ManagementObject* GetManagementObject (void) const { return mgmtObject; } virtual ~RemoteAgent (); void mapEncode(qpid::types::Variant::Map& _map) const; void mapDecode(const qpid::types::Variant::Map& _map); }; typedef std::map > RemoteAgentMap; // Storage for known schema classes: // // SchemaClassKey -- Key elements for map lookups // SchemaClassKeyComp -- Comparison class for SchemaClassKey // SchemaClass -- Non-key elements for classes // struct SchemaClassKey { std::string name; uint8_t hash[16]; void mapEncode(qpid::types::Variant::Map& _map) const; void mapDecode(const qpid::types::Variant::Map& _map); void encode(framing::Buffer& buffer) const; void decode(framing::Buffer& buffer); uint32_t encodedBufSize() const; }; struct SchemaClassKeyComp { bool operator() (const SchemaClassKey& lhs, const SchemaClassKey& rhs) const { if (lhs.name != rhs.name) return lhs.name < rhs.name; else for (int i = 0; i < 16; i++) if (lhs.hash[i] != rhs.hash[i]) return lhs.hash[i] < rhs.hash[i]; return false; } }; struct SchemaClass { uint8_t kind; ManagementObject::writeSchemaCall_t writeSchemaCall; std::string data; uint32_t pendingSequence; SchemaClass(uint8_t _kind=0, uint32_t seq=0) : kind(_kind), writeSchemaCall(0), pendingSequence(seq) {} SchemaClass(uint8_t _kind, ManagementObject::writeSchemaCall_t call) : kind(_kind), writeSchemaCall(call), pendingSequence(0) {} bool hasSchema () { return (writeSchemaCall != 0) || !data.empty(); } void appendSchema (framing::Buffer& buf); void mapEncode(qpid::types::Variant::Map& _map) const; void mapDecode(const qpid::types::Variant::Map& _map); }; typedef std::map ClassMap; typedef std::map PackageMap; RemoteAgentMap remoteAgents; PackageMap packages; // // Protected by userLock // ManagementObjectMap managementObjects; // // Protected by addLock // ManagementObjectVector newManagementObjects; framing::Uuid uuid; // // Lock hierarchy: If a thread needs to take both addLock and userLock, // it MUST take userLock first, then addLock. // sys::Mutex userLock; sys::Mutex addLock; qpid::broker::Exchange::shared_ptr mExchange; qpid::broker::Exchange::shared_ptr dExchange; qpid::broker::Exchange::shared_ptr v2Topic; qpid::broker::Exchange::shared_ptr v2Direct; std::string dataDir; bool publish; uint16_t interval; qpid::broker::Broker* broker; qpid::sys::Timer* timer; uint16_t bootSequence; uint32_t nextObjectId; uint32_t brokerBank; uint32_t nextRemoteBank; uint32_t nextRequestSequence; bool clientWasAdded; const qpid::sys::AbsTime startTime; bool suppressed; typedef std::pair MethodName; typedef std::map DisallowedMethods; DisallowedMethods disallowed; bool disallowAllV1Methods; // Agent name and address qpid::types::Variant::Map attrMap; std::string name_address; std::string vendorNameKey; // "." --> "_" std::string productNameKey; // "." --> "_" std::string instanceNameKey; // "." --> "_" // supported management protocol bool qmf1Support; bool qmf2Support; // Maximum # of objects allowed in a single V2 response // message. uint32_t maxReplyObjs; // list of objects that have been deleted, but have yet to be published // one final time. // Indexed by a string composed of the object's package and class name. // Protected by userLock. typedef std::map PendingDeletedObjsMap; PendingDeletedObjsMap pendingDeletedObjs; # define MA_BUFFER_SIZE 65536 char inputBuffer[MA_BUFFER_SIZE]; char outputBuffer[MA_BUFFER_SIZE]; char eventBuffer[MA_BUFFER_SIZE]; framing::ResizableBuffer msgBuffer; // // Memory statistics object // qmf::org::apache::qpid::broker::Memory *memstat; void writeData (); void periodicProcessing (void); void deleteObjectNowLH(const ObjectId& oid); void encodeHeader (framing::Buffer& buf, uint8_t opcode, uint32_t seq = 0); bool checkHeader (framing::Buffer& buf, uint8_t *opcode, uint32_t *seq); void sendBufferLH(framing::Buffer& buf, uint32_t length, qpid::broker::Exchange::shared_ptr exchange, const std::string& routingKey); void sendBufferLH(framing::Buffer& buf, uint32_t length, const std::string& exchange, const std::string& routingKey); void sendBufferLH(const std::string& data, const std::string& cid, const qpid::types::Variant::Map& headers, const std::string& content_type, qpid::broker::Exchange::shared_ptr exchange, const std::string& routingKey, uint64_t ttl_msec = 0); void sendBufferLH(const std::string& data, const std::string& cid, const qpid::types::Variant::Map& headers, const std::string& content_type, const std::string& exchange, const std::string& routingKey, uint64_t ttl_msec = 0); void moveNewObjectsLH(); bool moveDeletedObjectsLH(); bool authorizeAgentMessageLH(qpid::broker::Message& msg); void dispatchAgentCommandLH(qpid::broker::Message& msg, bool viaLocal=false); PackageMap::iterator findOrAddPackageLH(std::string name); void addClassLH(uint8_t kind, PackageMap::iterator pIter, const std::string& className, uint8_t* md5Sum, ManagementObject::writeSchemaCall_t schemaCall); void encodePackageIndication (framing::Buffer& buf, PackageMap::iterator pIter); void encodeClassIndication (framing::Buffer& buf, const std::string packageName, const struct SchemaClassKey key, uint8_t kind); bool bankInUse (uint32_t bank); uint32_t allocateNewBank (); uint32_t assignBankLH (uint32_t requestedPrefix); void deleteOrphanedAgentsLH(); void sendCommandCompleteLH(const std::string& replyToKey, uint32_t sequence, uint32_t code = 0, const std::string& text = "OK"); void sendExceptionLH(const std::string& rte, const std::string& rtk, const std::string& cid, const std::string& text, uint32_t code=1, bool viaLocal=false); void handleBrokerRequestLH (framing::Buffer& inBuffer, const std::string& replyToKey, uint32_t sequence); void handlePackageQueryLH (framing::Buffer& inBuffer, const std::string& replyToKey, uint32_t sequence); void handlePackageIndLH (framing::Buffer& inBuffer, const std::string& replyToKey, uint32_t sequence); void handleClassQueryLH (framing::Buffer& inBuffer, const std::string& replyToKey, uint32_t sequence); void handleClassIndLH (framing::Buffer& inBuffer, const std::string& replyToKey, uint32_t sequence); void handleSchemaRequestLH (framing::Buffer& inBuffer, const std::string& replyToEx, const std::string& replyToKey, uint32_t sequence); void handleSchemaResponseLH (framing::Buffer& inBuffer, const std::string& replyToKey, uint32_t sequence); void handleAttachRequestLH (framing::Buffer& inBuffer, const std::string& replyToKey, uint32_t sequence, const qpid::broker::ConnectionToken* connToken); void handleGetQueryLH (framing::Buffer& inBuffer, const std::string& replyToKey, uint32_t sequence); void handleMethodRequestLH (framing::Buffer& inBuffer, const std::string& replyToKey, uint32_t sequence, const qpid::broker::ConnectionToken* connToken); void handleGetQueryLH (const std::string& body, const std::string& replyToEx, const std::string& replyToKey, const std::string& cid, bool viaLocal); void handleMethodRequestLH (const std::string& body, const std::string& replyToEx, const std::string& replyToKey, const std::string& cid, const qpid::broker::ConnectionToken* connToken, bool viaLocal); void handleLocateRequestLH (const std::string& body, const std::string& replyToEx, const std::string &replyToKey, const std::string& cid); size_t validateSchema(framing::Buffer&, uint8_t kind); size_t validateTableSchema(framing::Buffer&); size_t validateEventSchema(framing::Buffer&); ManagementObjectMap::iterator numericFind(const ObjectId& oid); std::string summarizeAgents(); void debugSnapshot(const char* title); }; void setManagementExecutionContext(const qpid::broker::ConnectionState*); const qpid::broker::ConnectionState* getManagementExecutionContext(); }} #endif /*!_ManagementAgent_*/ qpidc-0.16/src/qpid/management/Mutex.cpp0000664000076400007640000000161511357660644020621 0ustar00jrossjross00000000000000/* * * Copyright (c) 2008 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/management/Mutex.h" #include "qpid/sys/Mutex.h" using namespace std; using namespace qpid::management; Mutex::Mutex() : impl(new sys::Mutex()) {} Mutex::~Mutex() { delete impl; } void Mutex::lock() { impl->lock(); } void Mutex::unlock() { impl->unlock(); } qpidc-0.16/src/qpid/management/ManagementDirectExchange.h0000664000076400007640000000335011725210040024010 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ManagementDirectExchange_ #define _ManagementDirectExchange_ #include "qpid/broker/DirectExchange.h" #include "qpid/management/ManagementAgent.h" namespace qpid { namespace broker { class ManagementDirectExchange : public virtual DirectExchange { private: management::ManagementAgent* managementAgent; int qmfVersion; public: static const std::string typeName; ManagementDirectExchange(const std::string& name, Manageable* _parent = 0, Broker* broker = 0); ManagementDirectExchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, Manageable* _parent = 0, Broker* broker = 0); virtual std::string getType() const { return typeName; } virtual void route(Deliverable& msg); void setManagmentAgent(management::ManagementAgent* agent, int qmfVersion); virtual ~ManagementDirectExchange(); }; } } #endif qpidc-0.16/src/qpid/management/ManagementDirectExchange.cpp0000664000076400007640000000464011725210040024346 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/management/ManagementDirectExchange.h" #include "qpid/log/Statement.h" #include using namespace qpid::management; using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::sys; ManagementDirectExchange::ManagementDirectExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange (_name, _parent, b), DirectExchange(_name, _parent, b), managementAgent(0) {} ManagementDirectExchange::ManagementDirectExchange(const std::string& _name, bool _durable, const FieldTable& _args, Manageable* _parent, Broker* b) : Exchange (_name, _durable, _args, _parent, b), DirectExchange(_name, _durable, _args, _parent, b), managementAgent(0) {} void ManagementDirectExchange::route(Deliverable& msg) { bool routeIt = true; const string& routingKey = msg.getMessage().getRoutingKey(); const FieldTable* args = msg.getMessage().getApplicationHeaders(); if (managementAgent) routeIt = managementAgent->dispatchCommand(msg, routingKey, args, false, qmfVersion); if (routeIt) DirectExchange::route(msg); } void ManagementDirectExchange::setManagmentAgent(ManagementAgent* agent, int qv) { managementAgent = agent; qmfVersion = qv; assert(qmfVersion == 2); // QMFv1 doesn't use a specialized direct exchange } ManagementDirectExchange::~ManagementDirectExchange() {} const std::string ManagementDirectExchange::typeName("management-direct"); qpidc-0.16/src/qpid/management/ConnectionSettings.cpp0000664000076400007640000000236311376754211023333 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/management/ConnectionSettings.h" #include "qpid/Version.h" qpid::management::ConnectionSettings::ConnectionSettings() : protocol("tcp"), host("localhost"), port(5672), locale("en_US"), heartbeat(0), maxChannels(32767), maxFrameSize(65535), bounds(2), tcpNoDelay(false), service(qpid::saslName), minSsf(0), maxSsf(256) {} qpid::management::ConnectionSettings::~ConnectionSettings() {} qpidc-0.16/src/qpid/management/Manageable.cpp0000664000076400007640000000334211466334727021533 0ustar00jrossjross00000000000000// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/management/Manageable.h" using namespace qpid::management; using std::string; string Manageable::StatusText (status_t status, string text) { if ((status & STATUS_USER) == STATUS_USER) return text; switch (status) { case STATUS_OK : return "OK"; case STATUS_UNKNOWN_OBJECT : return "UnknownObject"; case STATUS_UNKNOWN_METHOD : return "UnknownMethod"; case STATUS_NOT_IMPLEMENTED : return "NotImplemented"; case STATUS_PARAMETER_INVALID : return "InvalidParameter"; case STATUS_FEATURE_NOT_IMPLEMENTED : return "FeatureNotImplemented"; case STATUS_FORBIDDEN : return "Forbidden"; } return "??"; } Manageable::status_t Manageable::ManagementMethod (uint32_t, Args&, std::string&) { return STATUS_UNKNOWN_METHOD; } bool Manageable::AuthorizeMethod(uint32_t, Args&, const std::string&) { return true; } qpidc-0.16/src/qpid/management/ManagementTopicExchange.h0000664000076400007640000000360111725210040023653 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ManagementTopicExchange_ #define _ManagementTopicExchange_ #include "qpid/broker/TopicExchange.h" #include "qpid/management/ManagementAgent.h" namespace qpid { namespace broker { class ManagementTopicExchange : public virtual TopicExchange { private: management::ManagementAgent* managementAgent; int qmfVersion; public: static const std::string typeName; ManagementTopicExchange(const std::string& name, Manageable* _parent = 0, Broker* broker = 0); ManagementTopicExchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, Manageable* _parent = 0, Broker* broker = 0); virtual std::string getType() const { return typeName; } virtual void route(Deliverable& msg); virtual bool bind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); void setManagmentAgent(management::ManagementAgent* agent, int qmfVersion); virtual ~ManagementTopicExchange(); }; } } #endif qpidc-0.16/src/qpid/ha/0000775000076400007640000000000011752725715015264 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/ha/Backup.cpp0000664000076400007640000000604611721234352017167 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Backup.h" #include "Settings.h" #include "BrokerReplicator.h" #include "ReplicatingSubscription.h" #include "ConnectionExcluder.h" #include "qpid/Url.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/broker/Bridge.h" #include "qpid/broker/Broker.h" #include "qpid/broker/SessionHandler.h" #include "qpid/broker/Link.h" #include "qpid/framing/AMQP_ServerProxy.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/types/Variant.h" namespace qpid { namespace ha { using namespace framing; using namespace broker; using types::Variant; using std::string; Backup::Backup(broker::Broker& b, const Settings& s) : broker(b), settings(s), excluder(new ConnectionExcluder()) { // Empty brokerUrl means delay initialization until setUrl() is called. if (!s.brokerUrl.empty()) initialize(Url(s.brokerUrl)); } void Backup::initialize(const Url& url) { assert(!url.empty()); QPID_LOG(notice, "HA: Backup started: " << url); string protocol = url[0].protocol.empty() ? "tcp" : url[0].protocol; // Declare the link std::pair result = broker.getLinks().declare( url[0].host, url[0].port, protocol, false, // durable settings.mechanism, settings.username, settings.password); assert(result.second); // FIXME aconway 2011-11-23: error handling link = result.first; link->setUrl(url); replicator.reset(new BrokerReplicator(link)); broker.getExchanges().registerExchange(replicator); broker.getConnectionObservers().add(excluder); } void Backup::setBrokerUrl(const Url& url) { // Ignore empty URLs seen during start-up for some tests. if (url.empty()) return; sys::Mutex::ScopedLock l(lock); if (link) { // URL changed after we initialized. QPID_LOG(info, "HA: Backup failover URL set to " << url); link->setUrl(url); } else { initialize(url); // Deferred initialization } } Backup::~Backup() { if (link) link->close(); if (replicator.get()) broker.getExchanges().destroy(replicator->getName()); broker.getConnectionObservers().remove(excluder); // This allows client connections. } }} // namespace qpid::ha qpidc-0.16/src/qpid/ha/QueueReplicator.h0000664000076400007640000000552411725210040020530 0ustar00jrossjross00000000000000#ifndef QPID_HA_QUEUEREPLICATOR_H #define QPID_HA_QUEUEREPLICATOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Exchange.h" #include "qpid/framing/SequenceSet.h" #include #include namespace qpid { namespace broker { class Bridge; class Link; class Queue; class QueueRegistry; class SessionHandler; class Deliverable; } namespace ha { /** * Exchange created on a backup broker to replicate a queue on the primary. * * Puts replicated messages on the local queue, handles dequeue events. * Creates a ReplicatingSubscription on the primary by passing special * arguments to the consume command. * * THREAD SAFE: Called in different connection threads. */ class QueueReplicator : public broker::Exchange, public boost::enable_shared_from_this { public: static const std::string DEQUEUE_EVENT_KEY; static const std::string POSITION_EVENT_KEY; static std::string replicatorName(const std::string& queueName); QueueReplicator(boost::shared_ptr q, boost::shared_ptr l); ~QueueReplicator(); void activate(); // Call after ctor void deactivate(); // Call before dtor std::string getType() const; bool bind(boost::shared_ptr, const std::string&, const framing::FieldTable*); bool unbind(boost::shared_ptr, const std::string&, const framing::FieldTable*); void route(broker::Deliverable&); bool isBound(boost::shared_ptr, const std::string* const, const framing::FieldTable* const); private: void initializeBridge(broker::Bridge& bridge, broker::SessionHandler& sessionHandler, boost::shared_ptr self); void dequeue(framing::SequenceNumber, const sys::Mutex::ScopedLock&); std::string logPrefix; std::string bridgeName; sys::Mutex lock; boost::shared_ptr queue; boost::shared_ptr link; }; }} // namespace qpid::ha #endif /*!QPID_HA_QUEUEREPLICATOR_H*/ qpidc-0.16/src/qpid/ha/Backup.h0000664000076400007640000000320011717465066016636 0ustar00jrossjross00000000000000#ifndef QPID_HA_BACKUP_H #define QPID_HA_BACKUP_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Settings.h" #include "qpid/Url.h" #include "qpid/sys/Mutex.h" #include namespace qpid { namespace broker { class Broker; class Link; } namespace ha { class Settings; class ConnectionExcluder; class BrokerReplicator; /** * State associated with a backup broker. Manages connections to primary. * * THREAD SAFE */ class Backup { public: Backup(broker::Broker&, const Settings&); ~Backup(); void setBrokerUrl(const Url&); private: void initialize(const Url&); sys::Mutex lock; broker::Broker& broker; Settings settings; boost::shared_ptr link; boost::shared_ptr replicator; boost::shared_ptr excluder; }; }} // namespace qpid::ha #endif /*!QPID_HA_BACKUP_H*/ qpidc-0.16/src/qpid/ha/QueueReplicator.cpp0000664000076400007640000001544311725210040021064 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "QueueReplicator.h" #include "ReplicatingSubscription.h" #include "qpid/broker/Bridge.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Link.h" #include "qpid/broker/Queue.h" #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/SessionHandler.h" #include "qpid/framing/SequenceSet.h" #include "qpid/framing/FieldTable.h" #include "qpid/log/Statement.h" #include namespace { const std::string QPID_REPLICATOR_("qpid.replicator-"); const std::string TYPE_NAME("qpid.queue-replicator"); const std::string QPID_SYNC_FREQUENCY("qpid.sync_frequency"); } namespace qpid { namespace ha { using namespace broker; using namespace framing; const std::string QueueReplicator::DEQUEUE_EVENT_KEY("qpid.dequeue-event"); const std::string QueueReplicator::POSITION_EVENT_KEY("qpid.position-event"); std::string QueueReplicator::replicatorName(const std::string& queueName) { return QPID_REPLICATOR_ + queueName; } QueueReplicator::QueueReplicator(boost::shared_ptr q, boost::shared_ptr l) : Exchange(replicatorName(q->getName()), 0, q->getBroker()), queue(q), link(l) { logPrefix = "HA: Backup " + queue->getName() + ": "; QPID_LOG(info, logPrefix << "Created, settings: " << q->getSettings()); } // This must be separate from the constructor so we can call shared_from_this. void QueueReplicator::activate() { // Note this may create a new bridge or use an existing one. queue->getBroker()->getLinks().declare( link->getHost(), link->getPort(), false, // durable queue->getName(), // src getName(), // dest "", // key false, // isQueue false, // isLocal "", // id/tag "", // excludes false, // dynamic 0, // sync? // Include shared_ptr to self to ensure we are not deleted // before initializeBridge is called. boost::bind(&QueueReplicator::initializeBridge, this, _1, _2, shared_from_this()) ); } QueueReplicator::~QueueReplicator() {} void QueueReplicator::deactivate() { sys::Mutex::ScopedLock l(lock); queue->getBroker()->getLinks().destroy( link->getHost(), link->getPort(), queue->getName(), getName(), string()); QPID_LOG(debug, logPrefix << "Deactivated bridge " << bridgeName); } // Called in a broker connection thread when the bridge is created. // shared_ptr to self ensures we are not deleted before initializeBridge is called. void QueueReplicator::initializeBridge(Bridge& bridge, SessionHandler& sessionHandler, boost::shared_ptr /*self*/) { sys::Mutex::ScopedLock l(lock); bridgeName = bridge.getName(); framing::AMQP_ServerProxy peer(sessionHandler.out); const qmf::org::apache::qpid::broker::ArgsLinkBridge& args(bridge.getArgs()); framing::FieldTable settings; // FIXME aconway 2011-12-09: Failover optimization removed. // There was code here to re-use messages already on the backup // during fail-over. This optimization was removed to simplify // the logic till we get the basic replication stable, it // can be re-introduced later. Last revision with the optimization: // r1213258 | QPID-3603: Fix QueueReplicator subscription parameters. // Clear out any old messages, reset the queue to start replicating fresh. queue->purge(); queue->setPosition(0); settings.setInt(ReplicatingSubscription::QPID_REPLICATING_SUBSCRIPTION, 1); // TODO aconway 2011-12-19: optimize. settings.setInt(QPID_SYNC_FREQUENCY, 1); peer.getMessage().subscribe(args.i_src, args.i_dest, 0/*accept-explicit*/, 1/*not-acquired*/, false/*exclusive*/, "", 0, settings); peer.getMessage().flow(getName(), 0, 0xFFFFFFFF); peer.getMessage().flow(getName(), 1, 0xFFFFFFFF); QPID_LOG(debug, logPrefix << "Activated bridge " << bridgeName); } namespace { template T decodeContent(Message& m) { std::string content; m.getFrames().getContent(content); Buffer buffer(const_cast(content.c_str()), content.size()); T result; result.decode(buffer); return result; } } void QueueReplicator::dequeue(SequenceNumber n, const sys::Mutex::ScopedLock&) { // Thread safe: only calls thread safe Queue functions. if (queue->getPosition() >= n) { // Ignore messages we haven't reached yet QueuedMessage message; if (queue->acquireMessageAt(n, message)) queue->dequeue(0, message); } } // Called in connection thread of the queues bridge to primary. void QueueReplicator::route(Deliverable& msg) { const std::string& key = msg.getMessage().getRoutingKey(); sys::Mutex::ScopedLock l(lock); if (key == DEQUEUE_EVENT_KEY) { SequenceSet dequeues = decodeContent(msg.getMessage()); QPID_LOG(trace, logPrefix << "Dequeue: " << dequeues); //TODO: should be able to optimise the following for (SequenceSet::iterator i = dequeues.begin(); i != dequeues.end(); i++) dequeue(*i, l); } else if (key == POSITION_EVENT_KEY) { SequenceNumber position = decodeContent(msg.getMessage()); QPID_LOG(trace, logPrefix << "Position moved from " << queue->getPosition() << " to " << position); assert(queue->getPosition() <= position); queue->setPosition(position); } else { msg.deliverTo(queue); QPID_LOG(trace, logPrefix << "Enqueued message " << queue->getPosition()); } } // Unused Exchange methods. bool QueueReplicator::bind(boost::shared_ptr, const std::string&, const FieldTable*) { return false; } bool QueueReplicator::unbind(boost::shared_ptr, const std::string&, const FieldTable*) { return false; } bool QueueReplicator::isBound(boost::shared_ptr, const std::string* const, const FieldTable* const) { return false; } std::string QueueReplicator::getType() const { return TYPE_NAME; } }} // namespace qpid::broker qpidc-0.16/src/qpid/ha/ReplicatingSubscription.cpp0000664000076400007640000002615511717465066022650 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "ReplicatingSubscription.h" #include "qpid/broker/Queue.h" #include "qpid/broker/SessionContext.h" #include "qpid/broker/ConnectionState.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace ha { using namespace framing; using namespace broker; using namespace std; const string ReplicatingSubscription::QPID_REPLICATING_SUBSCRIPTION("qpid.replicating-subscription"); namespace { const string DOLLAR("$"); const string INTERNAL("-internal"); } // namespace string mask(const string& in) { return DOLLAR + in + INTERNAL; } /* Called by SemanticState::consume to create a consumer */ boost::shared_ptr ReplicatingSubscription::Factory::create( SemanticState* parent, const string& name, Queue::shared_ptr queue, bool ack, bool acquire, bool exclusive, const string& tag, const string& resumeId, uint64_t resumeTtl, const framing::FieldTable& arguments ) { boost::shared_ptr rs; if (arguments.isSet(QPID_REPLICATING_SUBSCRIPTION)) { rs.reset(new ReplicatingSubscription( parent, name, queue, ack, acquire, exclusive, tag, resumeId, resumeTtl, arguments)); queue->addObserver(rs); } return rs; } ReplicatingSubscription::ReplicatingSubscription( SemanticState* parent, const string& name, Queue::shared_ptr queue, bool ack, bool acquire, bool exclusive, const string& tag, const string& resumeId, uint64_t resumeTtl, const framing::FieldTable& arguments ) : ConsumerImpl(parent, name, queue, ack, acquire, exclusive, tag, resumeId, resumeTtl, arguments), events(new Queue(mask(name))), consumer(new DelegatingConsumer(*this)) { stringstream ss; ss << "HA: Primary: " << getQueue()->getName() << " at " << parent->getSession().getConnection().getUrl() << ": "; logPrefix = ss.str(); // FIXME aconway 2011-12-09: Failover optimization removed. // There was code here to re-use messages already on the backup // during fail-over. This optimization was removed to simplify // the logic till we get the basic replication stable, it // can be re-introduced later. Last revision with the optimization: // r1213258 | QPID-3603: Fix QueueReplicator subscription parameters. QPID_LOG(debug, logPrefix << "Created backup subscription " << getName()); // FIXME aconway 2011-12-15: ConsumerImpl::position is left at 0 // so we will start consuming from the lowest numbered message. // This is incorrect if the sequence number wraps around, but // this is what all consumers currently do. } // Message is delivered in the subscription's connection thread. bool ReplicatingSubscription::deliver(QueuedMessage& m) { // Add position events for the subscribed queue, not for the internal event queue. if (m.queue && m.queue == getQueue().get()) { sys::Mutex::ScopedLock l(lock); assert(position == m.position); // m.position is the position of the newly enqueued m on the local queue. // backupPosition is latest position on the backup queue (before enqueueing m.) assert(m.position > backupPosition); if (m.position - backupPosition > 1) { // Position has advanced because of messages dequeued ahead of us. SequenceNumber send(m.position); --send; // Send the position before m was enqueued. sendPositionEvent(send, l); } backupPosition = m.position; QPID_LOG(trace, logPrefix << "Replicating message " << m.position); } return ConsumerImpl::deliver(m); } ReplicatingSubscription::~ReplicatingSubscription() {} // INVARIANT: delayed contains msg <=> we have outstanding startCompletion on msg // Mark a message completed. May be called by acknowledge or dequeued void ReplicatingSubscription::complete( const QueuedMessage& qm, const sys::Mutex::ScopedLock&) { // Handle completions for the subscribed queue, not the internal event queue. if (qm.queue && qm.queue == getQueue().get()) { QPID_LOG(trace, logPrefix << "Completed message " << qm.position); Delayed::iterator i= delayed.find(qm.position); // The same message can be completed twice, by acknowledged and // dequeued, remove it from the set so it only gets completed // once. if (i != delayed.end()) { assert(i->second.payload == qm.payload); qm.payload->getIngressCompletion().finishCompleter(); delayed.erase(i); } } } // Called before we get notified of the message being available and // under the message lock in the queue. Called in arbitrary connection thread. void ReplicatingSubscription::enqueued(const QueuedMessage& qm) { sys::Mutex::ScopedLock l(lock); // Delay completion QPID_LOG(trace, logPrefix << "Delaying completion of message " << qm.position); qm.payload->getIngressCompletion().startCompleter(); assert(delayed.find(qm.position) == delayed.end()); delayed[qm.position] = qm; } // Function to complete a delayed message, called by cancel() void ReplicatingSubscription::cancelComplete( const Delayed::value_type& v, const sys::Mutex::ScopedLock&) { QPID_LOG(trace, logPrefix << "Cancel completed message " << v.second.position); v.second.payload->getIngressCompletion().finishCompleter(); } // Called in the subscription's connection thread. void ReplicatingSubscription::cancel() { getQueue()->removeObserver( boost::dynamic_pointer_cast(shared_from_this())); { sys::Mutex::ScopedLock l(lock); QPID_LOG(debug, logPrefix <<"Cancelled backup subscription " << getName()); for_each(delayed.begin(), delayed.end(), boost::bind(&ReplicatingSubscription::cancelComplete, this, _1, boost::ref(l))); delayed.clear(); } ConsumerImpl::cancel(); } // Called on primary in the backups IO thread. void ReplicatingSubscription::acknowledged(const QueuedMessage& msg) { sys::Mutex::ScopedLock l(lock); // Finish completion of message, it has been acknowledged by the backup. complete(msg, l); } // Hide the "queue deleted" error for a ReplicatingSubscription when a // queue is deleted, this is normal and not an error. bool ReplicatingSubscription::hideDeletedError() { return true; } // Called with lock held. Called in subscription's connection thread. void ReplicatingSubscription::sendDequeueEvent(const sys::Mutex::ScopedLock& l) { QPID_LOG(trace, logPrefix << "Sending dequeues " << dequeues); string buf(dequeues.encodedSize(),'\0'); framing::Buffer buffer(&buf[0], buf.size()); dequeues.encode(buffer); dequeues.clear(); buffer.reset(); sendEvent(QueueReplicator::DEQUEUE_EVENT_KEY, buffer, l); } // Called after the message has been removed from the deque and under // the messageLock in the queue. Called in arbitrary connection threads. void ReplicatingSubscription::dequeued(const QueuedMessage& qm) { { sys::Mutex::ScopedLock l(lock); QPID_LOG(trace, logPrefix << "Dequeued message " << qm.position); dequeues.add(qm.position); // If we have not yet sent this message to the backup, then // complete it now as it will never be accepted. if (qm.position > position) complete(qm, l); } notify(); // Ensure a call to doDispatch } // Called with lock held. Called in subscription's connection thread. void ReplicatingSubscription::sendPositionEvent( SequenceNumber position, const sys::Mutex::ScopedLock&l ) { QPID_LOG(trace, logPrefix << "Sending position " << position << ", was " << backupPosition); string buf(backupPosition.encodedSize(),'\0'); framing::Buffer buffer(&buf[0], buf.size()); position.encode(buffer); buffer.reset(); sendEvent(QueueReplicator::POSITION_EVENT_KEY, buffer, l); } void ReplicatingSubscription::sendEvent(const std::string& key, framing::Buffer& buffer, const sys::Mutex::ScopedLock&) { //generate event message boost::intrusive_ptr event = new Message(); AMQFrame method((MessageTransferBody(ProtocolVersion(), string(), 0, 0))); AMQFrame header((AMQHeaderBody())); AMQFrame content((AMQContentBody())); content.castBody()->decode(buffer, buffer.getSize()); header.setBof(false); header.setEof(false); header.setBos(true); header.setEos(true); content.setBof(false); content.setEof(true); content.setBos(true); content.setEos(true); event->getFrames().append(method); event->getFrames().append(header); event->getFrames().append(content); DeliveryProperties* props = event->getFrames().getHeaders()->get(true); props->setRoutingKey(key); // Send the event using the events queue. Consumer is a // DelegatingConsumer that delegates to *this for everything but // has an independnet position. We put an event on events and // dispatch it through ourselves to send it in line with the // normal browsing messages. events->deliver(event); events->dispatch(consumer); } // Called in subscription's connection thread. bool ReplicatingSubscription::doDispatch() { { sys::Mutex::ScopedLock l(lock); if (!dequeues.empty()) sendDequeueEvent(l); } return ConsumerImpl::doDispatch(); } ReplicatingSubscription::DelegatingConsumer::DelegatingConsumer(ReplicatingSubscription& c) : Consumer(c.getName(), true), delegate(c) {} ReplicatingSubscription::DelegatingConsumer::~DelegatingConsumer() {} bool ReplicatingSubscription::DelegatingConsumer::deliver(QueuedMessage& m) { return delegate.deliver(m); } void ReplicatingSubscription::DelegatingConsumer::notify() { delegate.notify(); } bool ReplicatingSubscription::DelegatingConsumer::filter(boost::intrusive_ptr msg) { return delegate.filter(msg); } bool ReplicatingSubscription::DelegatingConsumer::accept(boost::intrusive_ptr msg) { return delegate.accept(msg); } bool ReplicatingSubscription::DelegatingConsumer::browseAcquired() const { return delegate.browseAcquired(); } OwnershipToken* ReplicatingSubscription::DelegatingConsumer::getSession() { return delegate.getSession(); } }} // namespace qpid::ha qpidc-0.16/src/qpid/ha/BrokerReplicator.cpp0000664000076400007640000005175211725230316021237 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "BrokerReplicator.h" #include "QueueReplicator.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Queue.h" #include "qpid/broker/Link.h" #include "qpid/framing/FieldTable.h" #include "qpid/log/Statement.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/broker/SessionHandler.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/MessageTransferBody.h" #include "qmf/org/apache/qpid/broker/EventBind.h" #include "qmf/org/apache/qpid/broker/EventUnbind.h" #include "qmf/org/apache/qpid/broker/EventExchangeDeclare.h" #include "qmf/org/apache/qpid/broker/EventExchangeDelete.h" #include "qmf/org/apache/qpid/broker/EventQueueDeclare.h" #include "qmf/org/apache/qpid/broker/EventQueueDelete.h" #include "qmf/org/apache/qpid/broker/EventSubscribe.h" #include namespace qpid { namespace ha { using qmf::org::apache::qpid::broker::EventBind; using qmf::org::apache::qpid::broker::EventUnbind; using qmf::org::apache::qpid::broker::EventExchangeDeclare; using qmf::org::apache::qpid::broker::EventExchangeDelete; using qmf::org::apache::qpid::broker::EventQueueDeclare; using qmf::org::apache::qpid::broker::EventQueueDelete; using qmf::org::apache::qpid::broker::EventSubscribe; using namespace framing; using std::string; using types::Variant; using namespace broker; namespace { const string QPID_CONFIGURATION_REPLICATOR("qpid.configuration-replicator"); const string QPID_REPLICATE("qpid.replicate"); const string CLASS_NAME("_class_name"); const string EVENT("_event"); const string OBJECT_NAME("_object_name"); const string PACKAGE_NAME("_package_name"); const string QUERY_RESPONSE("_query_response"); const string SCHEMA_ID("_schema_id"); const string VALUES("_values"); const string ALTEX("altEx"); const string ARGS("args"); const string ARGUMENTS("arguments"); const string AUTODEL("autoDel"); const string AUTODELETE("autoDelete"); const string BIND("bind"); const string UNBIND("unbind"); const string BINDING("binding"); const string CREATED("created"); const string DISP("disp"); const string DURABLE("durable"); const string EXCHANGE("exchange"); const string EXNAME("exName"); const string EXTYPE("exType"); const string KEY("key"); const string NAME("name"); const string QNAME("qName"); const string QUEUE("queue"); const string RHOST("rhost"); const string TYPE("type"); const string USER("user"); const string AGENT_IND_EVENT_ORG_APACHE_QPID_BROKER("agent.ind.event.org_apache_qpid_broker.#"); const string QMF2("qmf2"); const string QMF_CONTENT("qmf.content"); const string QMF_DEFAULT_TOPIC("qmf.default.topic"); const string QMF_OPCODE("qmf.opcode"); const string _WHAT("_what"); const string _CLASS_NAME("_class_name"); const string _PACKAGE_NAME("_package_name"); const string _SCHEMA_ID("_schema_id"); const string OBJECT("OBJECT"); const string ORG_APACHE_QPID_BROKER("org.apache.qpid.broker"); const string QMF_DEFAULT_DIRECT("qmf.default.direct"); const string _QUERY_REQUEST("_query_request"); const string BROKER("broker"); bool isQMFv2(const Message& message) { const framing::MessageProperties* props = message.getProperties(); return props && props->getAppId() == QMF2; } template bool match(Variant::Map& schema) { return T::match(schema[CLASS_NAME], schema[PACKAGE_NAME]); } enum ReplicateLevel { RL_NONE=0, RL_CONFIGURATION, RL_ALL }; const string S_NONE="none"; const string S_CONFIGURATION="configuration"; const string S_ALL="all"; ReplicateLevel replicateLevel(const string& level) { if (level == S_NONE) return RL_NONE; if (level == S_CONFIGURATION) return RL_CONFIGURATION; if (level == S_ALL) return RL_ALL; throw Exception("Invalid value for "+QPID_REPLICATE+": "+level); } ReplicateLevel replicateLevel(const framing::FieldTable& f) { if (f.isSet(QPID_REPLICATE)) return replicateLevel(f.getAsString(QPID_REPLICATE)); else return RL_NONE; } ReplicateLevel replicateLevel(const Variant::Map& m) { Variant::Map::const_iterator i = m.find(QPID_REPLICATE); if (i != m.end()) return replicateLevel(i->second.asString()); else return RL_NONE; } void sendQuery(const string className, const string& queueName, SessionHandler& sessionHandler) { framing::AMQP_ServerProxy peer(sessionHandler.out); Variant::Map request; request[_WHAT] = OBJECT; Variant::Map schema; schema[_CLASS_NAME] = className; schema[_PACKAGE_NAME] = ORG_APACHE_QPID_BROKER; request[_SCHEMA_ID] = schema; AMQFrame method((MessageTransferBody(ProtocolVersion(), QMF_DEFAULT_DIRECT, 0, 0))); method.setBof(true); method.setEof(false); method.setBos(true); method.setEos(true); AMQHeaderBody headerBody; MessageProperties* props = headerBody.get(true); props->setReplyTo(qpid::framing::ReplyTo("", queueName)); props->setAppId(QMF2); props->getApplicationHeaders().setString(QMF_OPCODE, _QUERY_REQUEST); headerBody.get(true)->setRoutingKey(BROKER); AMQFrame header(headerBody); header.setBof(false); header.setEof(false); header.setBos(true); header.setEos(true); AMQContentBody data; qpid::amqp_0_10::MapCodec::encode(request, data.getData()); AMQFrame content(data); content.setBof(false); content.setEof(true); content.setBos(true); content.setEos(true); sessionHandler.out->handle(method); sessionHandler.out->handle(header); sessionHandler.out->handle(content); } // Like Variant::asMap but treat void value as an empty map. Variant::Map asMapVoid(const Variant& value) { if (!value.isVoid()) return value.asMap(); else return Variant::Map(); } } // namespace BrokerReplicator::~BrokerReplicator() {} BrokerReplicator::BrokerReplicator(const boost::shared_ptr& l) : Exchange(QPID_CONFIGURATION_REPLICATOR), broker(*l->getBroker()), link(l) { QPID_LOG(info, "HA: Backup replicating from " << link->getTransport() << ":" << link->getHost() << ":" << link->getPort()); broker.getLinks().declare( link->getHost(), link->getPort(), false, // durable QPID_CONFIGURATION_REPLICATOR, // src QPID_CONFIGURATION_REPLICATOR, // dest "", // key false, // isQueue false, // isLocal "", // id/tag "", // excludes false, // dynamic 0, // sync? boost::bind(&BrokerReplicator::initializeBridge, this, _1, _2) ); } // This is called in the connection IO thread when the bridge is started. void BrokerReplicator::initializeBridge(Bridge& bridge, SessionHandler& sessionHandler) { framing::AMQP_ServerProxy peer(sessionHandler.out); string queueName = bridge.getQueueName(); const qmf::org::apache::qpid::broker::ArgsLinkBridge& args(bridge.getArgs()); //declare and bind an event queue peer.getQueue().declare(queueName, "", false, false, true, true, FieldTable()); peer.getExchange().bind(queueName, QMF_DEFAULT_TOPIC, AGENT_IND_EVENT_ORG_APACHE_QPID_BROKER, FieldTable()); //subscribe to the queue peer.getMessage().subscribe(queueName, args.i_dest, 1, 0, false, "", 0, FieldTable()); peer.getMessage().flow(args.i_dest, 0, 0xFFFFFFFF); peer.getMessage().flow(args.i_dest, 1, 0xFFFFFFFF); //issue a query request for queues and another for exchanges using event queue as the reply-to address sendQuery(QUEUE, queueName, sessionHandler); sendQuery(EXCHANGE, queueName, sessionHandler); sendQuery(BINDING, queueName, sessionHandler); QPID_LOG(debug, "HA: Backup activated configuration bridge: " << queueName); } // FIXME aconway 2011-12-02: error handling in route. void BrokerReplicator::route(Deliverable& msg) { const framing::FieldTable* headers = msg.getMessage().getApplicationHeaders(); Variant::List list; try { if (!isQMFv2(msg.getMessage()) || !headers) throw Exception("Unexpected message, not QMF2 event or query response."); // decode as list string content = msg.getMessage().getFrames().getContent(); amqp_0_10::ListCodec::decode(content, list); if (headers->getAsString(QMF_CONTENT) == EVENT) { for (Variant::List::iterator i = list.begin(); i != list.end(); ++i) { Variant::Map& map = i->asMap(); Variant::Map& schema = map[SCHEMA_ID].asMap(); Variant::Map& values = map[VALUES].asMap(); if (match(schema)) doEventQueueDeclare(values); else if (match(schema)) doEventQueueDelete(values); else if (match(schema)) doEventExchangeDeclare(values); else if (match(schema)) doEventExchangeDelete(values); else if (match(schema)) doEventBind(values); else if (match(schema)) doEventUnbind(values); } } else if (headers->getAsString(QMF_OPCODE) == QUERY_RESPONSE) { for (Variant::List::iterator i = list.begin(); i != list.end(); ++i) { string type = i->asMap()[SCHEMA_ID].asMap()[CLASS_NAME]; Variant::Map& values = i->asMap()[VALUES].asMap(); framing::FieldTable args; amqp_0_10::translate(asMapVoid(values[ARGUMENTS]), args); if (type == QUEUE) doResponseQueue(values); else if (type == EXCHANGE) doResponseExchange(values); else if (type == BINDING) doResponseBind(values); else QPID_LOG(error, "HA: Backup received unknown response type=" << type << " values=" << values); } } else QPID_LOG(error, "HA: Backup received unexpected message: " << *headers); } catch (const std::exception& e) { QPID_LOG(error, "HA: Backup replication error: " << e.what() << ": while handling: " << list); } } void BrokerReplicator::doEventQueueDeclare(Variant::Map& values) { QPID_LOG(debug, "HA: Backup queue declare event " << values); string name = values[QNAME].asString(); Variant::Map argsMap = asMapVoid(values[ARGS]); if (values[DISP] == CREATED && replicateLevel(argsMap)) { framing::FieldTable args; amqp_0_10::translate(argsMap, args); std::pair, bool> result = broker.createQueue( name, values[DURABLE].asBool(), values[AUTODEL].asBool(), 0 /*i.e. no owner regardless of exclusivity on master*/, values[ALTEX].asString(), args, values[USER].asString(), values[RHOST].asString()); if (result.second) { // FIXME aconway 2011-11-22: should delete old queue and // re-create from event. // Events are always up to date, whereas responses may be // out of date. QPID_LOG(debug, "HA: Backup created queue: " << name); startQueueReplicator(result.first); } else { // FIXME aconway 2011-12-02: what's the right way to handle this? QPID_LOG(warning, "HA: Backup queue already exists: " << name); } } } void BrokerReplicator::doEventQueueDelete(Variant::Map& values) { QPID_LOG(debug, "HA: Backup queue delete event " << values); // The remote queue has already been deleted so replicator // sessions may be closed by a "queue deleted" exception. string name = values[QNAME].asString(); boost::shared_ptr queue = broker.getQueues().find(name); if (queue && replicateLevel(queue->getSettings())) { QPID_LOG(debug, "HA: Backup deleting queue: " << name); string rname = QueueReplicator::replicatorName(name); boost::shared_ptr ex = broker.getExchanges().find(rname); boost::shared_ptr qr = boost::dynamic_pointer_cast(ex); if (qr) qr->deactivate(); // QueueReplicator's bridge is now queued for destruction but may not // actually be destroyed, deleting the exhange broker.getExchanges().destroy(rname); broker.deleteQueue(name, values[USER].asString(), values[RHOST].asString()); } } void BrokerReplicator::doEventExchangeDeclare(Variant::Map& values) { QPID_LOG(debug, "HA: Backup exchange declare event " << values); Variant::Map argsMap(asMapVoid(values[ARGS])); if (values[DISP] == CREATED && replicateLevel(argsMap)) { string name = values[EXNAME].asString(); framing::FieldTable args; amqp_0_10::translate(argsMap, args); if (broker.createExchange( name, values[EXTYPE].asString(), values[DURABLE].asBool(), values[ALTEX].asString(), args, values[USER].asString(), values[RHOST].asString()).second) { QPID_LOG(debug, "HA: Backup created exchange: " << name); } else { // FIXME aconway 2011-11-22: should delete pre-exisitng exchange // and re-create from event. See comment in doEventQueueDeclare. QPID_LOG(warning, "HA: Backup exchange already exists: " << name); } } } void BrokerReplicator::doEventExchangeDelete(Variant::Map& values) { QPID_LOG(debug, "HA: Backup exchange delete event " << values); string name = values[EXNAME].asString(); try { boost::shared_ptr exchange = broker.getExchanges().find(name); if (exchange && replicateLevel(exchange->getArgs())) { QPID_LOG(debug, "HA: Backup deleting exchange:" << name); broker.deleteExchange( name, values[USER].asString(), values[RHOST].asString()); } } catch (const framing::NotFoundException&) {} } void BrokerReplicator::doEventBind(Variant::Map& values) { QPID_LOG(debug, "HA: Backup bind event " << values); boost::shared_ptr exchange = broker.getExchanges().find(values[EXNAME].asString()); boost::shared_ptr queue = broker.getQueues().find(values[QNAME].asString()); // We only replicate binds for a replicated queue to replicated // exchange that both exist locally. if (exchange && replicateLevel(exchange->getArgs()) && queue && replicateLevel(queue->getSettings())) { framing::FieldTable args; amqp_0_10::translate(asMapVoid(values[ARGS]), args); string key = values[KEY].asString(); QPID_LOG(debug, "HA: Backup replicated binding exchange=" << exchange->getName() << " queue=" << queue->getName() << " key=" << key); exchange->bind(queue, key, &args); } } void BrokerReplicator::doEventUnbind(Variant::Map& values) { QPID_LOG(debug, "HA: Backup unbind event " << values); boost::shared_ptr exchange = broker.getExchanges().find(values[EXNAME].asString()); boost::shared_ptr queue = broker.getQueues().find(values[QNAME].asString()); // We only replicate unbinds for a replicated queue to replicated // exchange that both exist locally. if (exchange && replicateLevel(exchange->getArgs()) && queue && replicateLevel(queue->getSettings())) { framing::FieldTable args; amqp_0_10::translate(asMapVoid(values[ARGS]), args); string key = values[KEY].asString(); QPID_LOG(debug, "HA: Backup replicated unbinding exchange=" << exchange->getName() << " queue=" << queue->getName() << " key=" << key); exchange->unbind(queue, key, &args); } } void BrokerReplicator::doResponseQueue(Variant::Map& values) { QPID_LOG(debug, "HA: Backup queue response " << values); // FIXME aconway 2011-11-22: more flexible ways & defaults to indicate replication Variant::Map argsMap(asMapVoid(values[ARGUMENTS])); if (!replicateLevel(argsMap)) return; framing::FieldTable args; amqp_0_10::translate(argsMap, args); string name(values[NAME].asString()); std::pair, bool> result = broker.createQueue( name, values[DURABLE].asBool(), values[AUTODELETE].asBool(), 0 /*i.e. no owner regardless of exclusivity on master*/, ""/*TODO: need to include alternate-exchange*/, args, ""/*TODO: who is the user?*/, ""/*TODO: what should we use as connection id?*/); if (result.second) { QPID_LOG(debug, "HA: Backup created catch-up queue: " << values[NAME]); startQueueReplicator(result.first); } else { // FIXME aconway 2011-11-22: Normal to find queue already // exists if we're failing over. QPID_LOG(warning, "HA: Backup catch-up queue already exists: " << name); } } void BrokerReplicator::doResponseExchange(Variant::Map& values) { QPID_LOG(debug, "HA: Backup exchange response " << values); Variant::Map argsMap(asMapVoid(values[ARGUMENTS])); if (!replicateLevel(argsMap)) return; framing::FieldTable args; amqp_0_10::translate(argsMap, args); if (broker.createExchange( values[NAME].asString(), values[TYPE].asString(), values[DURABLE].asBool(), ""/*TODO: need to include alternate-exchange*/, args, ""/*TODO: who is the user?*/, ""/*TODO: what should we use as connection id?*/).second) { QPID_LOG(debug, "HA: Backup catch-up exchange: " << values[NAME]); } else { QPID_LOG(warning, "HA: Backup catch-up exchange already exists: " << values[QNAME]); } } namespace { const std::string QUEUE_REF_PREFIX("org.apache.qpid.broker:queue:"); const std::string EXCHANGE_REF_PREFIX("org.apache.qpid.broker:exchange:"); std::string getRefName(const std::string& prefix, const Variant& ref) { Variant::Map map(ref.asMap()); Variant::Map::const_iterator i = map.find(OBJECT_NAME); if (i == map.end()) throw Exception(QPID_MSG("Replicator: invalid object reference: " << ref)); const std::string name = i->second.asString(); if (name.compare(0, prefix.size(), prefix) != 0) throw Exception(QPID_MSG("Replicator: unexpected reference prefix: " << name)); std::string ret = name.substr(prefix.size()); return ret; } const std::string EXCHANGE_REF("exchangeRef"); const std::string QUEUE_REF("queueRef"); } // namespace void BrokerReplicator::doResponseBind(Variant::Map& values) { QPID_LOG(debug, "HA: Backup bind response " << values); std::string exName = getRefName(EXCHANGE_REF_PREFIX, values[EXCHANGE_REF]); std::string qName = getRefName(QUEUE_REF_PREFIX, values[QUEUE_REF]); boost::shared_ptr exchange = broker.getExchanges().find(exName); boost::shared_ptr queue = broker.getQueues().find(qName); // FIXME aconway 2011-11-24: more flexible configuration for binding replication. // Automatically replicate binding if queue and exchange exist and are replicated if (exchange && replicateLevel(exchange->getArgs()) && queue && replicateLevel(queue->getSettings())) { framing::FieldTable args; amqp_0_10::translate(asMapVoid(values[ARGUMENTS]), args); string key = values[KEY].asString(); exchange->bind(queue, key, &args); QPID_LOG(debug, "HA: Backup catch-up binding: exchange=" << exchange->getName() << " queue=" << queue->getName() << " key=" << key); } } void BrokerReplicator::startQueueReplicator(const boost::shared_ptr& queue) { if (replicateLevel(queue->getSettings()) == RL_ALL) { boost::shared_ptr qr(new QueueReplicator(queue, link)); broker.getExchanges().registerExchange(qr); qr->activate(); } } bool BrokerReplicator::bind(boost::shared_ptr, const string&, const framing::FieldTable*) { return false; } bool BrokerReplicator::unbind(boost::shared_ptr, const string&, const framing::FieldTable*) { return false; } bool BrokerReplicator::isBound(boost::shared_ptr, const string* const, const framing::FieldTable* const) { return false; } string BrokerReplicator::getType() const { return QPID_CONFIGURATION_REPLICATOR; } }} // namespace broker qpidc-0.16/src/qpid/ha/HaBroker.cpp0000664000076400007640000001440111723751074017460 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Backup.h" #include "ConnectionExcluder.h" #include "HaBroker.h" #include "Settings.h" #include "ReplicatingSubscription.h" #include "qpid/Exception.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Link.h" #include "qpid/broker/Queue.h" #include "qpid/management/ManagementAgent.h" #include "qmf/org/apache/qpid/ha/Package.h" #include "qmf/org/apache/qpid/ha/ArgsHaBrokerReplicate.h" #include "qmf/org/apache/qpid/ha/ArgsHaBrokerSetBrokers.h" #include "qmf/org/apache/qpid/ha/ArgsHaBrokerSetPublicBrokers.h" #include "qmf/org/apache/qpid/ha/ArgsHaBrokerSetExpectedBackups.h" #include "qpid/log/Statement.h" namespace qpid { namespace ha { namespace _qmf = ::qmf::org::apache::qpid::ha; using namespace management; using namespace std; namespace { const std::string STANDALONE="standalone"; const std::string CATCH_UP="catch-up"; const std::string BACKUP="backup"; const std::string PRIMARY="primary"; } // namespace HaBroker::HaBroker(broker::Broker& b, const Settings& s) : broker(b), settings(s), mgmtObject(0) { // Register a factory for replicating subscriptions. broker.getConsumerFactories().add( boost::shared_ptr( new ReplicatingSubscription::Factory())); broker.getKnownBrokers = boost::bind(&HaBroker::getKnownBrokers, this); ManagementAgent* ma = broker.getManagementAgent(); if (!ma) throw Exception("Cannot start HA: management is disabled"); _qmf::Package packageInit(ma); mgmtObject = new _qmf::HaBroker(ma, this, "ha-broker"); // FIXME aconway 2012-03-01: should start in catch-up state and move to backup // only when caught up. mgmtObject->set_status(BACKUP); ma->addObject(mgmtObject); sys::Mutex::ScopedLock l(lock); if (!settings.clientUrl.empty()) setClientUrl(Url(settings.clientUrl), l); if (!settings.brokerUrl.empty()) setBrokerUrl(Url(settings.brokerUrl), l); // If we are in a cluster, we start in backup mode. if (settings.cluster) backup.reset(new Backup(b, s)); } HaBroker::~HaBroker() {} Manageable::status_t HaBroker::ManagementMethod (uint32_t methodId, Args& args, string&) { sys::Mutex::ScopedLock l(lock); switch (methodId) { case _qmf::HaBroker::METHOD_PROMOTE: { if (backup.get()) { // I am a backup // NOTE: resetting backup allows client connections, so any // primary state should be set up here before backup.reset() backup.reset(); QPID_LOG(notice, "HA: Primary promoted from backup"); mgmtObject->set_status(PRIMARY); } break; } case _qmf::HaBroker::METHOD_SETBROKERS: { setBrokerUrl(Url(dynamic_cast<_qmf::ArgsHaBrokerSetBrokers&>(args).i_url), l); break; } case _qmf::HaBroker::METHOD_SETPUBLICBROKERS: { setClientUrl(Url(dynamic_cast<_qmf::ArgsHaBrokerSetPublicBrokers&>(args).i_url), l); break; } case _qmf::HaBroker::METHOD_SETEXPECTEDBACKUPS: { setExpectedBackups(dynamic_cast<_qmf::ArgsHaBrokerSetExpectedBackups&>(args).i_expectedBackups, l); break; } case _qmf::HaBroker::METHOD_REPLICATE: { _qmf::ArgsHaBrokerReplicate& bq_args = dynamic_cast<_qmf::ArgsHaBrokerReplicate&>(args); QPID_LOG(debug, "HA replicating individual queue "<< bq_args.i_queue << " from " << bq_args.i_broker); boost::shared_ptr queue = broker.getQueues().get(bq_args.i_queue); Url url(bq_args.i_broker); string protocol = url[0].protocol.empty() ? "tcp" : url[0].protocol; std::pair result = broker.getLinks().declare( url[0].host, url[0].port, protocol, false, // durable settings.mechanism, settings.username, settings.password); boost::shared_ptr link = result.first; link->setUrl(url); // Create a queue replicator boost::shared_ptr qr(new QueueReplicator(queue, link)); broker.getExchanges().registerExchange(qr); qr->activate(); break; } default: return Manageable::STATUS_UNKNOWN_METHOD; } return Manageable::STATUS_OK; } void HaBroker::setClientUrl(const Url& url, const sys::Mutex::ScopedLock& l) { if (url.empty()) throw Exception("Invalid empty URL for HA client failover"); clientUrl = url; updateClientUrl(l); } void HaBroker::updateClientUrl(const sys::Mutex::ScopedLock&) { Url url = clientUrl.empty() ? brokerUrl : clientUrl; assert(!url.empty()); mgmtObject->set_publicBrokers(url.str()); knownBrokers.clear(); knownBrokers.push_back(url); QPID_LOG(debug, "HA: Setting client URL to: " << url); } void HaBroker::setBrokerUrl(const Url& url, const sys::Mutex::ScopedLock& l) { if (url.empty()) throw Exception("Invalid empty URL for HA broker failover"); QPID_LOG(debug, "HA: Setting broker URL to: " << url); brokerUrl = url; mgmtObject->set_brokers(brokerUrl.str()); if (backup.get()) backup->setBrokerUrl(brokerUrl); // Updating broker URL also updates defaulted client URL: if (clientUrl.empty()) updateClientUrl(l); } void HaBroker::setExpectedBackups(size_t n, const sys::Mutex::ScopedLock&) { expectedBackups = n; mgmtObject->set_expectedBackups(n); } std::vector HaBroker::getKnownBrokers() const { return knownBrokers; } }} // namespace qpid::ha qpidc-0.16/src/qpid/ha/BrokerReplicator.h0000664000076400007640000000533711725210040020672 0ustar00jrossjross00000000000000#ifndef QPID_HA_REPLICATOR_H #define QPID_HA_REPLICATOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Exchange.h" #include "qpid/types/Variant.h" #include namespace qpid { namespace broker { class Broker; class Link; class Bridge; class SessionHandler; } namespace ha { /** * Replicate configuration on a backup broker. * * Implemented as an exchange that subscribes to receive QMF * configuration events from the primary. It configures local queues * exchanges and bindings to replicate the primary. * It also creates QueueReplicators for newly replicated queues. * * THREAD SAFE: Has no mutable state. * */ class BrokerReplicator : public broker::Exchange { public: BrokerReplicator(const boost::shared_ptr&); ~BrokerReplicator(); std::string getType() const; // Exchange methods bool bind(boost::shared_ptr, const std::string&, const framing::FieldTable*); bool unbind(boost::shared_ptr, const std::string&, const framing::FieldTable*); void route(broker::Deliverable&); bool isBound(boost::shared_ptr, const std::string* const, const framing::FieldTable* const); private: void initializeBridge(broker::Bridge&, broker::SessionHandler&); void doEventQueueDeclare(types::Variant::Map& values); void doEventQueueDelete(types::Variant::Map& values); void doEventExchangeDeclare(types::Variant::Map& values); void doEventExchangeDelete(types::Variant::Map& values); void doEventBind(types::Variant::Map&); void doEventUnbind(types::Variant::Map&); void doResponseQueue(types::Variant::Map& values); void doResponseExchange(types::Variant::Map& values); void doResponseBind(types::Variant::Map& values); void startQueueReplicator(const boost::shared_ptr&); broker::Broker& broker; boost::shared_ptr link; }; }} // namespace qpid::broker #endif /*!QPID_HA_REPLICATOR_H*/ qpidc-0.16/src/qpid/ha/Settings.h0000664000076400007640000000244211723533330017223 0ustar00jrossjross00000000000000#ifndef QPID_HA_SETTINGS_H #define QPID_HA_SETTINGS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace ha { /** * Configurable settings for HA. */ class Settings { public: Settings() : cluster(false), expectedBackups(0) {} bool cluster; // True if we are a cluster member. std::string clientUrl; std::string brokerUrl; size_t expectedBackups; std::string username, password, mechanism; private: }; }} // namespace qpid::ha #endif /*!QPID_HA_SETTINGS_H*/ qpidc-0.16/src/qpid/ha/ReplicatingSubscription.h0000664000076400007640000001100311720530342022257 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_REPLICATINGSUBSCRIPTION_H #define QPID_BROKER_REPLICATINGSUBSCRIPTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "QueueReplicator.h" // For DEQUEUE_EVENT_KEY #include "qpid/broker/SemanticState.h" #include "qpid/broker/QueueObserver.h" #include "qpid/broker/ConsumerFactory.h" #include namespace qpid { namespace broker { class Message; class Queue; struct QueuedMessage; class OwnershipToken; } namespace framing { class Buffer; } namespace ha { /** * A susbcription that represents a backup replicating a queue. * * Runs on the primary. Delays completion of messages till the backup * has acknowledged, informs backup of locally dequeued messages. * * THREAD SAFE: Used as a consumer in subscription's connection * thread, and as a QueueObserver in arbitrary connection threads. */ class ReplicatingSubscription : public broker::SemanticState::ConsumerImpl, public broker::QueueObserver { public: struct Factory : public broker::ConsumerFactory { boost::shared_ptr create( broker::SemanticState* parent, const std::string& name, boost::shared_ptr , bool ack, bool acquire, bool exclusive, const std::string& tag, const std::string& resumeId, uint64_t resumeTtl, const framing::FieldTable& arguments); }; // Argument names for consume command. static const std::string QPID_REPLICATING_SUBSCRIPTION; ReplicatingSubscription(broker::SemanticState* parent, const std::string& name, boost::shared_ptr , bool ack, bool acquire, bool exclusive, const std::string& tag, const std::string& resumeId, uint64_t resumeTtl, const framing::FieldTable& arguments); ~ReplicatingSubscription(); // QueueObserver overrides. bool deliver(broker::QueuedMessage& msg); void enqueued(const broker::QueuedMessage&); void dequeued(const broker::QueuedMessage&); void acquired(const broker::QueuedMessage&) {} void requeued(const broker::QueuedMessage&) {} // Consumer overrides. void cancel(); void acknowledged(const broker::QueuedMessage&); bool browseAcquired() const { return true; } bool hideDeletedError(); protected: bool doDispatch(); private: typedef std::map Delayed; std::string logPrefix; boost::shared_ptr events; boost::shared_ptr consumer; Delayed delayed; framing::SequenceSet dequeues; framing::SequenceNumber backupPosition; void complete(const broker::QueuedMessage&, const sys::Mutex::ScopedLock&); void cancelComplete(const Delayed::value_type& v, const sys::Mutex::ScopedLock&); void sendDequeueEvent(const sys::Mutex::ScopedLock&); void sendPositionEvent(framing::SequenceNumber, const sys::Mutex::ScopedLock&); void sendEvent(const std::string& key, framing::Buffer&, const sys::Mutex::ScopedLock&); class DelegatingConsumer : public Consumer { public: DelegatingConsumer(ReplicatingSubscription&); ~DelegatingConsumer(); bool deliver(broker::QueuedMessage& msg); void notify(); bool filter(boost::intrusive_ptr); bool accept(boost::intrusive_ptr); void cancel() {} void acknowledged(const broker::QueuedMessage&) {} bool browseAcquired() const; broker::OwnershipToken* getSession(); private: ReplicatingSubscription& delegate; }; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_REPLICATINGSUBSCRIPTION_H*/ qpidc-0.16/src/qpid/ha/HaBroker.h0000664000076400007640000000444311721766633017137 0ustar00jrossjross00000000000000#ifndef QPID_HA_BROKER_H #define QPID_HA_BROKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Settings.h" #include "qpid/Url.h" #include "qpid/sys/Mutex.h" #include "qmf/org/apache/qpid/ha/HaBroker.h" #include "qpid/management/Manageable.h" #include namespace qpid { namespace broker { class Broker; } namespace ha { class Backup; /** * HA state and actions associated with a broker. * * THREAD SAFE: may be called in arbitrary broker IO or timer threads. */ class HaBroker : public management::Manageable { public: HaBroker(broker::Broker&, const Settings&); ~HaBroker(); // Implement Manageable. qpid::management::ManagementObject* GetManagementObject() const { return mgmtObject; } management::Manageable::status_t ManagementMethod ( uint32_t methodId, management::Args& args, std::string& text); private: void setClientUrl(const Url&, const sys::Mutex::ScopedLock&); void setBrokerUrl(const Url&, const sys::Mutex::ScopedLock&); void setExpectedBackups(size_t, const sys::Mutex::ScopedLock&); void updateClientUrl(const sys::Mutex::ScopedLock&); bool isPrimary(const sys::Mutex::ScopedLock&) { return !backup.get(); } std::vector getKnownBrokers() const; broker::Broker& broker; const Settings settings; sys::Mutex lock; std::auto_ptr backup; qmf::org::apache::qpid::ha::HaBroker* mgmtObject; Url clientUrl, brokerUrl; std::vector knownBrokers; size_t expectedBackups; }; }} // namespace qpid::ha #endif /*!QPID_HA_BROKER_H*/ qpidc-0.16/src/qpid/ha/ConnectionExcluder.cpp0000664000076400007640000000253311717465066021567 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "ConnectionExcluder.h" #include "qpid/broker/Connection.h" #include #include namespace qpid { namespace ha { ConnectionExcluder::ConnectionExcluder() {} void ConnectionExcluder::opened(broker::Connection& connection) { if (!connection.isLink() && !connection.getClientProperties().isSet(ADMIN_TAG)) throw Exception( QPID_MSG("HA: Backup broker rejected connection " << connection.getMgmtId())); } const std::string ConnectionExcluder::ADMIN_TAG="qpid.ha-admin"; }} // namespace qpid::ha qpidc-0.16/src/qpid/ha/HaPlugin.cpp0000664000076400007640000000463711723533330017475 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "HaBroker.h" #include "Settings.h" #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/broker/Broker.h" namespace qpid { namespace ha { using namespace std; struct Options : public qpid::Options { Settings& settings; Options(Settings& s) : qpid::Options("HA Options"), settings(s) { addOptions() ("ha-cluster", optValue(settings.cluster, "yes|no"), "Join a HA active/passive cluster.") ("ha-brokers", optValue(settings.brokerUrl,"URL"), "URL that backup brokers use to connect and fail over.") ("ha-public-brokers", optValue(settings.clientUrl,"URL"), "URL that clients use to connect and fail over, defaults to ha-brokers.") ("ha-expected-backups", optValue(settings.expectedBackups, "N"), "Number of backups expected to be active in the HA cluster.") ("ha-username", optValue(settings.username, "USER"), "Username for connections between HA brokers") ("ha-password", optValue(settings.password, "PASS"), "Password for connections between HA brokers") ("ha-mechanism", optValue(settings.mechanism, "MECH"), "Authentication mechanism for connections between HA brokers") ; } }; struct HaPlugin : public Plugin { Settings settings; Options options; auto_ptr haBroker; HaPlugin() : options(settings) {} Options* getOptions() { return &options; } void earlyInitialize(Plugin::Target& ) {} void initialize(Plugin::Target& target) { broker::Broker* broker = dynamic_cast(&target); if (broker) haBroker.reset(new ha::HaBroker(*broker, settings)); } }; static HaPlugin instance; // Static initialization. }} // namespace qpid::ha qpidc-0.16/src/qpid/ha/ConnectionExcluder.h0000664000076400007640000000270711717465066021237 0ustar00jrossjross00000000000000#ifndef QPID_HA_CONNECTIONEXCLUDER_H #define QPID_HA_CONNECTIONEXCLUDER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/ConnectionObserver.h" #include namespace qpid { namespace broker { class Connection; } namespace ha { /** * Exclude normal connections to a backup broker. * Admin connections are identified by a special flag in client-properties * during connection negotiation. */ class ConnectionExcluder : public broker::ConnectionObserver { public: ConnectionExcluder(); void opened(broker::Connection& connection); private: static const std::string ADMIN_TAG; }; }} // namespace qpid::ha #endif /*!QPID_HA_CONNECTIONEXCLUDER_H*/ qpidc-0.16/src/qpid/Plugin.cpp0000664000076400007640000000510511303036374016623 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Plugin.h" #include "qpid/Options.h" #include #include namespace qpid { namespace { Plugin::Plugins& thePlugins() { // This is a single threaded singleton implementation so // it is important to be sure that the first use of this // singleton is when the program is still single threaded static Plugin::Plugins plugins; return plugins; } void invoke(boost::function f) { f(); } } // namespace Plugin::Target::~Target() { finalize(); } void Plugin::Target::finalize() { std::for_each(finalizers.begin(), finalizers.end(), invoke); finalizers.clear(); } void Plugin::Target::addFinalizer(const boost::function& f) { finalizers.push_back(f); } namespace { bool initBefore(const Plugin* a, const Plugin* b) { return a->initOrder() < b->initOrder(); } } Plugin::Plugin() { // Register myself. thePlugins().push_back(this); std::sort(thePlugins().begin(), thePlugins().end(), &initBefore); } Plugin::~Plugin() {} Options* Plugin::getOptions() { return 0; } const Plugin::Plugins& Plugin::getPlugins() { return thePlugins(); } namespace { template void each_plugin(const F& f) { std::for_each(Plugin::getPlugins().begin(), Plugin::getPlugins().end(), f); } } void Plugin::addOptions(Options& opts) { for (Plugins::const_iterator i = getPlugins().begin(); i != getPlugins().end(); ++i) { if ((*i)->getOptions()) opts.add(*(*i)->getOptions()); } } int Plugin::initOrder() const { return DEFAULT_INIT_ORDER; } void Plugin::earlyInitAll(Target& t) { each_plugin(boost::bind(&Plugin::earlyInitialize, _1, boost::ref(t))); } void Plugin::initializeAll(Target& t) { each_plugin(boost::bind(&Plugin::initialize, _1, boost::ref(t))); } } // namespace qpid qpidc-0.16/src/qpid/console/0000775000076400007640000000000011752725715016336 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/console/Package.cpp0000664000076400007640000000253411227113407020363 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/Package.h" using namespace qpid::console; SchemaClass* Package::getClass(const std::string& className, uint8_t* hash) { NameHash key(className, hash); ClassMap::iterator iter = classes.find(key); if (iter != classes.end()) return iter->second; return 0; } void Package::addClass(const std::string& className, uint8_t* hash, SchemaClass* schemaClass) { NameHash key(className, hash); ClassMap::iterator iter = classes.find(key); if (iter == classes.end()) classes[key] = schemaClass; } qpidc-0.16/src/qpid/console/Event.cpp0000664000076400007640000001360311227113407020110 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/Broker.h" #include "qpid/console/ClassKey.h" #include "qpid/console/Schema.h" #include "qpid/console/Event.h" #include "qpid/console/Value.h" #include "qpid/sys/Time.h" #include "qpid/framing/Buffer.h" using namespace qpid::console; using namespace std; using qpid::framing::Uuid; using qpid::framing::FieldTable; Event::Event(Broker* _broker, SchemaClass* _schema, qpid::framing::Buffer& buffer) : broker(_broker), schema(_schema) { timestamp = buffer.getLongLong(); severity = (Severity) buffer.getOctet(); for (vector::const_iterator aIter = schema->arguments.begin(); aIter != schema->arguments.end(); aIter++) { SchemaArgument* argument = *aIter; attributes[argument->name] = argument->decodeValue(buffer); } } const ClassKey& Event::getClassKey() const { return schema->getClassKey(); } string Event::getSeverityString() const { switch (severity) { case SEV_EMERGENCY : return string("EMER"); case SEV_ALERT : return string("ALERT"); case SEV_CRITICAL : return string("CRIT"); case SEV_ERROR : return string("ERROR"); case SEV_WARNING : return string("WARN"); case SEV_NOTICE : return string("NOTIC"); case SEV_INFO : return string("INFO"); case SEV_DEBUG : return string("DEBUG"); } return string(""); } ObjectId Event::attrRef(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return ObjectId(); Value::Ptr val = iter->second; if (!val->isObjectId()) return ObjectId(); return val->asObjectId(); } uint32_t Event::attrUint(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0; Value::Ptr val = iter->second; if (!val->isUint()) return 0; return val->asUint(); } int32_t Event::attrInt(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0; Value::Ptr val = iter->second; if (!val->isInt()) return 0; return val->asInt(); } uint64_t Event::attrUint64(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0; Value::Ptr val = iter->second; if (!val->isUint64()) return 0; return val->asUint64(); } int64_t Event::attrInt64(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0; Value::Ptr val = iter->second; if (!val->isInt64()) return 0; return val->asInt64(); } string Event::attrString(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return string(); Value::Ptr val = iter->second; if (!val->isString()) return string(); return val->asString(); } bool Event::attrBool(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return false; Value::Ptr val = iter->second; if (!val->isBool()) return false; return val->asBool(); } float Event::attrFloat(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0.0; Value::Ptr val = iter->second; if (!val->isFloat()) return 0.0; return val->asFloat(); } double Event::attrDouble(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0.0; Value::Ptr val = iter->second; if (!val->isDouble()) return 0.0; return val->asDouble(); } Uuid Event::attrUuid(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return Uuid(); Value::Ptr val = iter->second; if (!val->isUuid()) return Uuid(); return val->asUuid(); } FieldTable Event::attrMap(const string& key) const { Object::AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return FieldTable(); Value::Ptr val = iter->second; if (!val->isMap()) return FieldTable(); return val->asMap(); } std::ostream& qpid::console::operator<<(std::ostream& o, const Event& event) { const ClassKey& key = event.getClassKey(); sys::AbsTime aTime(sys::AbsTime(), sys::Duration(event.getTimestamp())); o << aTime << " " << event.getSeverityString() << " " << key.getPackageName() << ":" << key.getClassName() << " broker=" << event.getBroker()->getUrl(); const Object::AttributeMap& attributes = event.getAttributes(); for (Object::AttributeMap::const_iterator iter = attributes.begin(); iter != attributes.end(); iter++) { o << " " << iter->first << "=" << iter->second->str(); } return o; } qpidc-0.16/src/qpid/console/SequenceManager.cpp0000664000076400007640000000264111227113407022072 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/SequenceManager.h" using namespace qpid::console; using namespace qpid::sys; using std::string; using std::cout; using std::endl; uint32_t SequenceManager::reserve(const std::string& context) { Mutex::ScopedLock l(lock); uint32_t result = sequence++; pending[result] = context; return result; } std::string SequenceManager::release(uint32_t seq) { Mutex::ScopedLock l(lock); std::map::iterator iter = pending.find(seq); if (iter == pending.end()) return string(); string result(iter->second); pending.erase(iter); return result; } qpidc-0.16/src/qpid/console/Broker.cpp0000664000076400007640000002517011447141266020265 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/Broker.h" #include "qpid/console/Object.h" #include "qpid/console/Value.h" #include "qpid/console/SessionManager.h" #include "qpid/console/ConsoleListener.h" #include "qpid/log/Statement.h" #include "qpid/sys/SystemInfo.h" using namespace qpid::client; using namespace qpid::console; using namespace qpid::framing; using namespace qpid::sys; using namespace std; Broker::Broker(SessionManager& sm, ConnectionSettings& settings) : sessionManager(sm), connected(false), connectionSettings(settings), reqsOutstanding(1), syncInFlight(false), topicBound(false), methodObject(0), connThreadBody(*this), connThread(connThreadBody) { string osName; string nodeName; string release; string version; string machine; sys::SystemInfo::getSystemId(osName, nodeName, release, version, machine); uint32_t pid = sys::SystemInfo::getParentProcessId(); stringstream text; text << "qmfc-cpp-" << nodeName << "-" << pid; amqpSessionId = string(text.str()); QPID_LOG(debug, "Broker::Broker: constructed, amqpSessionId=" << amqpSessionId); } Broker::~Broker() { connThreadBody.shutdown(); connThread.join(); resetAgents(); // resetAgents() does not delete the broker agent... for (AgentMap::iterator iter = agents.begin(); iter != agents.end(); iter++) { delete iter->second; } } string Broker::getUrl() const { stringstream url; url << connectionSettings.host << ":" << connectionSettings.port; return url.str(); } void Broker::encodeHeader(Buffer& buf, uint8_t opcode, uint32_t seq) const { buf.putOctet('A'); buf.putOctet('M'); buf.putOctet('2'); buf.putOctet(opcode); buf.putLong (seq); } bool Broker::checkHeader(Buffer& buf, uint8_t *opcode, uint32_t *seq) const { if (buf.getSize() < 8) return false; uint8_t h1 = buf.getOctet(); uint8_t h2 = buf.getOctet(); uint8_t h3 = buf.getOctet(); *opcode = buf.getOctet(); *seq = buf.getLong(); return h1 == 'A' && h2 == 'M' && h3 == '2'; } void Broker::received(qpid::client::Message& msg) { #define QMF_HEADER_SIZE 8 string data = msg.getData(); Buffer inBuffer(const_cast(data.c_str()), data.size()); uint8_t opcode; uint32_t sequence; while (inBuffer.available() >= QMF_HEADER_SIZE) { if (checkHeader(inBuffer, &opcode, &sequence)) { QPID_LOG(trace, "Broker::received: opcode=" << opcode << " seq=" << sequence); if (opcode == 'b') sessionManager.handleBrokerResp(this, inBuffer, sequence); else if (opcode == 'p') sessionManager.handlePackageInd(this, inBuffer, sequence); else if (opcode == 'z') sessionManager.handleCommandComplete(this, inBuffer, sequence); else if (opcode == 'q') sessionManager.handleClassInd(this, inBuffer, sequence); else if (opcode == 'm') sessionManager.handleMethodResp(this, inBuffer, sequence); else if (opcode == 'h') sessionManager.handleHeartbeatInd(this, inBuffer, sequence); else if (opcode == 'e') sessionManager.handleEventInd(this, inBuffer, sequence); else if (opcode == 's') sessionManager.handleSchemaResp(this, inBuffer, sequence); else if (opcode == 'c') sessionManager.handleContentInd(this, inBuffer, sequence, true, false); else if (opcode == 'i') sessionManager.handleContentInd(this, inBuffer, sequence, false, true); else if (opcode == 'g') sessionManager.handleContentInd(this, inBuffer, sequence, true, true); } else return; } } void Broker::resetAgents() { for (AgentMap::iterator iter = agents.begin(); iter != agents.end(); iter++) { if (sessionManager.listener != 0) sessionManager.listener->delAgent(*(iter->second)); delete iter->second; } agents.clear(); agents[0x0000000100000000LL] = new Agent(this, 0, "BrokerAgent"); } void Broker::updateAgent(const Object& object) { uint32_t brokerBank = object.attrUint("brokerBank"); uint32_t agentBank = object.attrUint("agentBank"); uint64_t agentKey = ((uint64_t) brokerBank << 32) | (uint64_t) agentBank; AgentMap::iterator iter = agents.find(agentKey); if (object.isDeleted()) { if (iter != agents.end()) { if (sessionManager.listener != 0) sessionManager.listener->delAgent(*(iter->second)); delete iter->second; agents.erase(iter); } } else { if (iter == agents.end()) { Agent* agent = new Agent(this, agentBank, object.attrString("label")); agents[agentKey] = agent; if (sessionManager.listener != 0) sessionManager.listener->newAgent(*agent); } } } void Broker::ConnectionThread::run() { static const int delayMin(1); static const int delayMax(128); static const int delayFactor(2); int delay(delayMin); string dest("qmfc"); sessionId.generate(); queueName << "qmfc-" << sessionId; while (true) { try { broker.topicBound = false; broker.reqsOutstanding = 1; connection.open(broker.connectionSettings); session = connection.newSession(queueName.str()); subscriptions = new client::SubscriptionManager(session); session.queueDeclare(arg::queue=queueName.str(), arg::autoDelete=true, arg::exclusive=true); session.exchangeBind(arg::exchange="amq.direct", arg::queue=queueName.str(), arg::bindingKey=queueName.str()); subscriptions->setAcceptMode(ACCEPT_MODE_NONE); subscriptions->setAcquireMode(ACQUIRE_MODE_PRE_ACQUIRED); subscriptions->subscribe(broker, queueName.str(), dest); subscriptions->setFlowControl(dest, FlowControl::unlimited()); { Mutex::ScopedLock _lock(connLock); if (shuttingDown) return; operational = true; broker.resetAgents(); broker.connected = true; broker.sessionManager.handleBrokerConnect(&broker); broker.sessionManager.startProtocol(&broker); try { Mutex::ScopedUnlock _unlock(connLock); subscriptions->run(); } catch (std::exception) {} operational = false; broker.connected = false; broker.sessionManager.handleBrokerDisconnect(&broker); } delay = delayMin; connection.close(); delete subscriptions; subscriptions = 0; } catch (std::exception &e) { QPID_LOG(debug, " outer exception: " << e.what()); if (delay < delayMax) delay *= delayFactor; } { Mutex::ScopedLock _lock(connLock); if (shuttingDown) return; { Mutex::ScopedUnlock _unlock(connLock); ::sleep(delay); } if (shuttingDown) return; } } } Broker::ConnectionThread::~ConnectionThread() { if (subscriptions != 0) { delete subscriptions; } } void Broker::ConnectionThread::sendBuffer(Buffer& buf, uint32_t length, const string& exchange, const string& routingKey) { { Mutex::ScopedLock _lock(connLock); if (!operational) return; } client::Message msg; string data; buf.getRawData(data, length); msg.getDeliveryProperties().setRoutingKey(routingKey); msg.getMessageProperties().setReplyTo(ReplyTo("amq.direct", queueName.str())); msg.setData(data); try { session.messageTransfer(arg::content=msg, arg::destination=exchange); } catch(std::exception&) {} } void Broker::ConnectionThread::bindExchange(const std::string& exchange, const std::string& key) { { Mutex::ScopedLock _lock(connLock); if (!operational) return; } QPID_LOG(debug, "Broker::ConnectionThread::bindExchange: exchange=" << exchange << " key=" << key); session.exchangeBind(arg::exchange=exchange, arg::queue=queueName.str(), arg::bindingKey=key); } void Broker::ConnectionThread::shutdown() { { Mutex::ScopedLock _lock(connLock); shuttingDown = true; } if (subscriptions) subscriptions->stop(); } void Broker::waitForStable() { Mutex::ScopedLock l(lock); if (reqsOutstanding == 0) return; syncInFlight = true; while (reqsOutstanding != 0) { bool result = cond.wait(lock, AbsTime(now(), TIME_SEC * sessionManager.settings.getTimeout)); if (!result) throw(Exception("Timed out waiting for broker to synchronize")); } } void Broker::incOutstanding() { Mutex::ScopedLock l(lock); reqsOutstanding++; } void Broker::decOutstanding() { Mutex::ScopedLock l(lock); reqsOutstanding--; if (reqsOutstanding == 0) { if (!topicBound) { topicBound = true; for (vector::const_iterator iter = sessionManager.bindingKeyList.begin(); iter != sessionManager.bindingKeyList.end(); iter++) connThreadBody.bindExchange("qpid.management", *iter); } if (syncInFlight) { syncInFlight = false; cond.notify(); } } } void Broker::appendAgents(Agent::Vector& agentlist) const { for (AgentMap::const_iterator iter = agents.begin(); iter != agents.end(); iter++) { agentlist.push_back(iter->second); } } ostream& qpid::console::operator<<(ostream& o, const Broker& k) { o << "Broker: " << k.connectionSettings.host << ":" << k.connectionSettings.port; return o; } qpidc-0.16/src/qpid/console/Agent.cpp0000664000076400007640000000206011227113407020060 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/Agent.h" std::ostream& qpid::console::operator<<(std::ostream& o, const Agent& agent) { o << "Agent at bank " << agent.getBrokerBank() << "." << agent.getAgentBank() << " (" << agent.getLabel() << ")"; return o; } qpidc-0.16/src/qpid/console/Value.cpp0000664000076400007640000001225411341561464020113 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/Value.h" #include "qpid/framing/Buffer.h" #include using namespace qpid; using namespace qpid::console; using namespace std; string NullValue::str() const { return ""; } RefValue::RefValue(framing::Buffer& buffer) { uint64_t first = buffer.getLongLong(); uint64_t second = buffer.getLongLong(); value.setValue(first, second); } string RefValue::str() const { stringstream s; s << value; return s.str(); } string UintValue::str() const { stringstream s; s << value; return s.str(); } string IntValue::str() const { stringstream s; s << value; return s.str(); } string Uint64Value::str() const { stringstream s; s << value; return s.str(); } string Int64Value::str() const { stringstream s; s << value; return s.str(); } StringValue::StringValue(framing::Buffer& buffer, int tc) { if (tc == 6) buffer.getShortString(value); else buffer.getMediumString(value); } string BoolValue::str() const { return value ? "T" : "F"; } string FloatValue::str() const { stringstream s; s << value; return s.str(); } string DoubleValue::str() const { stringstream s; s << value; return s.str(); } UuidValue::UuidValue(framing::Buffer& buffer) { value.decode(buffer); } string MapValue::str() const { stringstream s; s << value; return s.str(); } MapValue::MapValue(framing::Buffer& buffer) { value.decode(buffer); } Value::Ptr ValueFactory::newValue(int typeCode, framing::Buffer& buffer) { switch (typeCode) { case 1: return Value::Ptr(new UintValue(buffer.getOctet())); // U8 case 2: return Value::Ptr(new UintValue(buffer.getShort())); // U16 case 3: return Value::Ptr(new UintValue(buffer.getLong())); // U32 case 4: return Value::Ptr(new Uint64Value(buffer.getLongLong())); // U64 case 6: return Value::Ptr(new StringValue(buffer, 6)); // SSTR case 7: return Value::Ptr(new StringValue(buffer, 7)); // LSTR case 8: return Value::Ptr(new Int64Value(buffer.getLongLong())); // ABSTIME case 9: return Value::Ptr(new Uint64Value(buffer.getLongLong())); // DELTATIME case 10: return Value::Ptr(new RefValue(buffer)); // REF case 11: return Value::Ptr(new BoolValue(buffer.getOctet())); // BOOL case 12: return Value::Ptr(new FloatValue(buffer.getFloat())); // FLOAT case 13: return Value::Ptr(new DoubleValue(buffer.getDouble())); // DOUBLE case 14: return Value::Ptr(new UuidValue(buffer)); // UUID case 15: return Value::Ptr(new MapValue(buffer)); // MAP case 16: return Value::Ptr(new IntValue(buffer.getOctet())); // S8 case 17: return Value::Ptr(new IntValue(buffer.getShort())); // S16 case 18: return Value::Ptr(new IntValue(buffer.getLong())); // S32 case 19: return Value::Ptr(new Int64Value(buffer.getLongLong())); // S64 } return Value::Ptr(); } void ValueFactory::encodeValue(int typeCode, Value::Ptr value, framing::Buffer& buffer) { switch (typeCode) { case 1: buffer.putOctet(value->asUint()); return; // U8 case 2: buffer.putShort(value->asUint()); return; // U16 case 3: buffer.putLong(value->asUint()); return; // U32 case 4: buffer.putLongLong(value->asUint64()); return; // U64 case 6: buffer.putShortString(value->asString()); return; // SSTR case 7: buffer.putMediumString(value->asString()); return; // LSTR case 8: buffer.putLongLong(value->asInt64()); return; // ABSTIME case 9: buffer.putLongLong(value->asUint64()); return; // DELTATIME case 10: value->asObjectId().encode(buffer); return; // REF case 11: buffer.putOctet(value->asBool() ? 1 : 0); return; // BOOL case 12: buffer.putFloat(value->asFloat()); return; // FLOAT case 13: buffer.putDouble(value->asDouble()); return; // DOUBLE case 14: value->asUuid().encode(buffer); return; // UUID case 15: value->asMap().encode(buffer); return; // MAP case 16: buffer.putOctet(value->asInt()); return; // S8 case 17: buffer.putShort(value->asInt()); return; // S16 case 18: buffer.putLong(value->asInt()); return; // S32 case 19: buffer.putLongLong(value->asInt64()); return; // S64 } } qpidc-0.16/src/qpid/console/SessionManager.cpp0000664000076400007640000003636111573514472021766 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/SessionManager.h" #include "qpid/console/Schema.h" #include "qpid/console/Agent.h" #include "qpid/console/ConsoleListener.h" #include "qpid/log/Statement.h" #include "qpid/sys/Time.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/Uuid.h" #include "qpid/framing/FieldTable.h" using namespace qpid::console; using namespace qpid::sys; using namespace qpid; using namespace std; using qpid::framing::Buffer; using qpid::framing::FieldTable; SessionManager::SessionManager(ConsoleListener* _listener, Settings _settings) : listener(_listener), settings(_settings) { bindingKeys(); } SessionManager::~SessionManager() { for (vector::iterator iter = brokers.begin(); iter != brokers.end(); iter++) delete *iter; for (map::iterator iter = packages.begin(); iter != packages.end(); iter++) { for (Package::ClassMap::iterator citer = iter->second->classes.begin(); citer != iter->second->classes.end(); citer++) delete citer->second; delete iter->second; } } Broker* SessionManager::addBroker(client::ConnectionSettings& settings) { Broker* broker(new Broker(*this, settings)); { Mutex::ScopedLock l(brokerListLock); brokers.push_back(broker); } return broker; } void SessionManager::delBroker(Broker* broker) { Mutex::ScopedLock l(brokerListLock); for (vector::iterator iter = brokers.begin(); iter != brokers.end(); iter++) if (*iter == broker) { brokers.erase(iter); delete broker; return; } } void SessionManager::getPackages(NameVector& packageNames) { allBrokersStable(); packageNames.clear(); { Mutex::ScopedLock l(lock); for (map::iterator iter = packages.begin(); iter != packages.end(); iter++) packageNames.push_back(iter->first); } } void SessionManager::getClasses(KeyVector& classKeys, const std::string& packageName) { allBrokersStable(); classKeys.clear(); map::iterator iter = packages.find(packageName); if (iter == packages.end()) return; Package& package = *(iter->second); for (Package::ClassMap::const_iterator piter = package.classes.begin(); piter != package.classes.end(); piter++) { ClassKey key(piter->second->getClassKey()); classKeys.push_back(key); } } SchemaClass& SessionManager::getSchema(const ClassKey& classKey) { allBrokersStable(); map::iterator iter = packages.find(classKey.getPackageName()); if (iter == packages.end()) throw Exception("Unknown package"); Package& package = *(iter->second); Package::NameHash key(classKey.getClassName(), classKey.getHash()); Package::ClassMap::iterator cIter = package.classes.find(key); if (cIter == package.classes.end()) throw Exception("Unknown class"); return *(cIter->second); } void SessionManager::bindPackage(const std::string& packageName) { stringstream key; key << "console.obj.*.*." << packageName << ".#"; bindingKeyList.push_back(key.str()); for (vector::iterator iter = brokers.begin(); iter != brokers.end(); iter++) (*iter)->addBinding(key.str()); } void SessionManager::bindClass(const ClassKey& classKey) { bindClass(classKey.getPackageName(), classKey.getClassName()); } void SessionManager::bindClass(const std::string& packageName, const std::string& className) { stringstream key; key << "console.obj.*.*." << packageName << "." << className << ".#"; bindingKeyList.push_back(key.str()); for (vector::iterator iter = brokers.begin(); iter != brokers.end(); iter++) (*iter)->addBinding(key.str()); } void SessionManager::bindEvent(const ClassKey& classKey) { bindEvent(classKey.getPackageName(), classKey.getClassName()); } void SessionManager::bindEvent(const std::string& packageName, const std::string& eventName) { if (!settings.userBindings) throw Exception("Session not configured for userBindings."); if (settings.rcvEvents) throw Exception("Session already configured to receive all events."); stringstream key; key << "console.event.*.*." << packageName; if (eventName.length()) { key << "." << eventName << ".#"; } else { key << ".#"; } bindingKeyList.push_back(key.str()); for (vector::iterator iter = brokers.begin(); iter != brokers.end(); iter++) (*iter)->addBinding(key.str()); } void SessionManager::getAgents(Agent::Vector& agents, Broker* broker) { agents.clear(); if (broker != 0) { broker->appendAgents(agents); } else { for (vector::iterator iter = brokers.begin(); iter != brokers.end(); iter++) { (*iter)->appendAgents(agents); } } } void SessionManager::getObjects(Object::Vector& objects, const std::string& className, Broker* _broker, Agent* _agent) { Agent::Vector agentList; if (_agent != 0) { agentList.push_back(_agent); _agent->getBroker()->waitForStable(); } else { if (_broker != 0) { _broker->appendAgents(agentList); _broker->waitForStable(); } else { allBrokersStable(); Mutex::ScopedLock _lock(brokerListLock); for (vector::iterator iter = brokers.begin(); iter != brokers.end(); iter++) { (*iter)->appendAgents(agentList); } } } FieldTable ft; uint32_t sequence; ft.setString("_class", className); getResult.clear(); syncSequenceList.clear(); error = string(); if (agentList.empty()) { objects = getResult; return; } for (Agent::Vector::iterator iter = agentList.begin(); iter != agentList.end(); iter++) { Agent* agent = *iter; char rawbuffer[512]; Buffer buffer(rawbuffer, 512); stringstream routingKey; routingKey << "agent." << agent->getBrokerBank() << "." << agent->getAgentBank(); { Mutex::ScopedLock _lock(lock); sequence = sequenceManager.reserve("multiget"); syncSequenceList.insert(sequence); } agent->getBroker()->encodeHeader(buffer, 'G', sequence); ft.encode(buffer); uint32_t length = buffer.getPosition(); buffer.reset(); agent->getBroker()->connThreadBody.sendBuffer(buffer, length, "qpid.management", routingKey.str()); } { Mutex::ScopedLock _lock(lock); sys::AbsTime startTime = sys::now(); while (!syncSequenceList.empty() && error.empty()) { cv.wait(lock, AbsTime(now(), settings.getTimeout * TIME_SEC)); sys::AbsTime currTime = sys::now(); if (sys::Duration(startTime, currTime) > settings.getTimeout * TIME_SEC) break; } } objects = getResult; } void SessionManager::bindingKeys() { bindingKeyList.push_back("schema.#"); if (settings.rcvObjects && settings.rcvEvents && settings.rcvHeartbeats && !settings.userBindings) { bindingKeyList.push_back("console.#"); } else { if (settings.rcvObjects && !settings.userBindings) bindingKeyList.push_back("console.obj.#"); else bindingKeyList.push_back("console.obj.*.*.org.apache.qpid.broker.agent"); if (settings.rcvEvents) bindingKeyList.push_back("console.event.#"); if (settings.rcvHeartbeats) bindingKeyList.push_back("console.heartbeat"); } } void SessionManager::allBrokersStable() { Mutex::ScopedLock l(brokerListLock); for (vector::iterator iter = brokers.begin(); iter != brokers.end(); iter++) if ((*iter)->isConnected()) (*iter)->waitForStable(); } void SessionManager::startProtocol(Broker* broker) { char rawbuffer[512]; Buffer buffer(rawbuffer, 512); broker->encodeHeader(buffer, 'B'); uint32_t length = 512 - buffer.available(); buffer.reset(); broker->connThreadBody.sendBuffer(buffer, length); } void SessionManager::handleBrokerResp(Broker* broker, Buffer& inBuffer, uint32_t) { framing::Uuid brokerId; brokerId.decode(inBuffer); broker->setBrokerId(brokerId); char rawbuffer[512]; Buffer buffer(rawbuffer, 512); uint32_t sequence = sequenceManager.reserve("startup"); broker->encodeHeader(buffer, 'P', sequence); uint32_t length = 512 - buffer.available(); buffer.reset(); broker->connThreadBody.sendBuffer(buffer, length); if (listener != 0) { listener->brokerInfo(*broker); } } void SessionManager::handlePackageInd(Broker* broker, Buffer& inBuffer, uint32_t) { string packageName; inBuffer.getShortString(packageName); { Mutex::ScopedLock l(lock); map::iterator iter = packages.find(packageName); if (iter == packages.end()) { packages[packageName] = new Package(packageName); if (listener != 0) listener->newPackage(packageName); } } broker->incOutstanding(); char rawbuffer[512]; Buffer buffer(rawbuffer, 512); uint32_t sequence = sequenceManager.reserve("startup"); broker->encodeHeader(buffer, 'Q', sequence); buffer.putShortString(packageName); uint32_t length = 512 - buffer.available(); buffer.reset(); broker->connThreadBody.sendBuffer(buffer, length); } void SessionManager::handleCommandComplete(Broker* broker, Buffer& inBuffer, uint32_t sequence) { Mutex::ScopedLock l(lock); uint32_t resultCode = inBuffer.getLong(); string resultText; inBuffer.getShortString(resultText); string context = sequenceManager.release(sequence); if (resultCode != 0) QPID_LOG(debug, "Received error in completion: " << resultCode << " " << resultText); if (context == "startup") { broker->decOutstanding(); } else if (context == "multiget") { if (syncSequenceList.count(sequence) == 1) { syncSequenceList.erase(sequence); if (syncSequenceList.empty()) { cv.notify(); } } } // TODO: Other context cases } void SessionManager::handleClassInd(Broker* broker, Buffer& inBuffer, uint32_t) { string packageName; string className; uint8_t hash[16]; /*kind*/ (void) inBuffer.getOctet(); inBuffer.getShortString(packageName); inBuffer.getShortString(className); inBuffer.getBin128(hash); { Mutex::ScopedLock l(lock); map::iterator pIter = packages.find(packageName); if (pIter == packages.end() || pIter->second->getClass(className, hash)) return; } broker->incOutstanding(); char rawbuffer[512]; Buffer buffer(rawbuffer, 512); uint32_t sequence = sequenceManager.reserve("startup"); broker->encodeHeader(buffer, 'S', sequence); buffer.putShortString(packageName); buffer.putShortString(className); buffer.putBin128(hash); uint32_t length = 512 - buffer.available(); buffer.reset(); broker->connThreadBody.sendBuffer(buffer, length); } void SessionManager::handleMethodResp(Broker* broker, Buffer& buffer, uint32_t sequence) { if (broker->methodObject) { broker->methodObject->handleMethodResp(buffer, sequence); } } void SessionManager::handleHeartbeatInd(Broker* /*broker*/, Buffer& /*inBuffer*/, uint32_t /*sequence*/) { } void SessionManager::handleEventInd(Broker* broker, Buffer& buffer, uint32_t /*sequence*/) { string packageName; string className; uint8_t hash[16]; SchemaClass* schemaClass; buffer.getShortString(packageName); buffer.getShortString(className); buffer.getBin128(hash); { Mutex::ScopedLock l(lock); map::iterator pIter = packages.find(packageName); if (pIter == packages.end()) return; schemaClass = pIter->second->getClass(className, hash); if (schemaClass == 0) return; } Event event(broker, schemaClass, buffer); if (listener) listener->event(event); } void SessionManager::handleSchemaResp(Broker* broker, Buffer& inBuffer, uint32_t sequence) { uint8_t kind; string packageName; string className; uint8_t hash[16]; kind = inBuffer.getOctet(); inBuffer.getShortString(packageName); inBuffer.getShortString(className); inBuffer.getBin128(hash); { Mutex::ScopedLock l(lock); map::iterator pIter = packages.find(packageName); if (pIter != packages.end() && !pIter->second->getClass(className, hash)) { ClassKey key(packageName, className, hash); SchemaClass* schemaClass(new SchemaClass(kind, key, inBuffer)); pIter->second->addClass(className, hash, schemaClass); if (listener != 0) { listener->newClass(schemaClass->getClassKey()); } } } sequenceManager.release(sequence); broker->decOutstanding(); } void SessionManager::handleContentInd(Broker* broker, Buffer& buffer, uint32_t sequence, bool prop, bool stat) { string packageName; string className; uint8_t hash[16]; SchemaClass* schemaClass; buffer.getShortString(packageName); buffer.getShortString(className); buffer.getBin128(hash); { Mutex::ScopedLock l(lock); map::iterator pIter = packages.find(packageName); if (pIter == packages.end()) return; schemaClass = pIter->second->getClass(className, hash); if (schemaClass == 0) return; } Object object(broker, schemaClass, buffer, prop, stat); if (prop && className == "agent" && packageName == "org.apache.qpid.broker") broker->updateAgent(object); { Mutex::ScopedLock l(lock); if (syncSequenceList.count(sequence) == 1) { if (!object.isDeleted()) getResult.push_back(object); return; } } if (listener) { if (prop) listener->objectProps(*broker, object); if (stat) listener->objectStats(*broker, object); } } void SessionManager::handleBrokerConnect(Broker* broker) { if (listener != 0) listener->brokerConnected(*broker); } void SessionManager::handleBrokerDisconnect(Broker* broker) { if (listener != 0) listener->brokerDisconnected(*broker); } qpidc-0.16/src/qpid/console/ObjectId.cpp0000664000076400007640000000434311227113407020513 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/ObjectId.h" #include "qpid/framing/Buffer.h" using namespace qpid::console; using namespace qpid; using namespace std; ObjectId::ObjectId(framing::Buffer& buffer) { decode(buffer); } void ObjectId::decode(framing::Buffer& buffer) { first = buffer.getLongLong(); second = buffer.getLongLong(); } void ObjectId::encode(framing::Buffer& buffer) { buffer.putLongLong(first); buffer.putLongLong(second); } bool ObjectId::operator==(const ObjectId& other) const { return second == other.second && first == other.first; } bool ObjectId::operator!=(const ObjectId& other) const { return !(*this == other); } bool ObjectId::operator<(const ObjectId& other) const { if (first < other.first) return true; if (first > other.first) return false; return second < other.second; } bool ObjectId::operator>(const ObjectId& other) const { if (first > other.first) return true; if (first < other.first) return false; return second > other.second; } bool ObjectId::operator<=(const ObjectId& other) const { return !(*this > other); } bool ObjectId::operator>=(const ObjectId& other) const { return !(*this < other); } ostream& qpid::console::operator<<(ostream& o, const ObjectId& id) { o << (int) id.getFlags() << "-" << id.getSequence() << "-" << id.getBrokerBank() << "-" << id.getAgentBank() << "-" << id.getObject(); return o; } qpidc-0.16/src/qpid/console/ClassKey.cpp0000664000076400007640000000545611227113407020554 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/ClassKey.h" #include #include using namespace std; using namespace qpid::console; ClassKey::ClassKey(const string& _package, const string& _name, const uint8_t* _hash) : package(_package), name(_name) { ::memcpy(hash, _hash, HASH_SIZE); } string ClassKey::getHashString() const { char cstr[36]; ::sprintf(cstr, "%02x%02x%02x%02x-%02x%02x%02x%02x-%02x%02x%02x%02x-%02x%02x%02x%02x", hash[0], hash[1], hash[2], hash[3], hash[4], hash[5], hash[6], hash[7], hash[8], hash[9], hash[10], hash[11], hash[12], hash[13], hash[14], hash[15]); return string(cstr); } string ClassKey::str() const { string result(package + ":" + name + "(" + getHashString() + ")"); return result; } bool ClassKey::operator==(const ClassKey& other) const { return ::memcmp(hash, other.hash, HASH_SIZE) == 0 && name == other.name && package == other.package; } bool ClassKey::operator!=(const ClassKey& other) const { return !(*this == other); } bool ClassKey::operator<(const ClassKey& other) const { int cmp = ::memcmp(hash, other.hash, HASH_SIZE); if (cmp != 0) return cmp < 0; cmp = name.compare(other.name); if (cmp != 0) return cmp < 0; return package < other.package; } bool ClassKey::operator>(const ClassKey& other) const { int cmp = ::memcmp(hash, other.hash, HASH_SIZE); if (cmp != 0) return cmp > 0; cmp = name.compare(other.name); if (cmp != 0) return cmp > 0; return package > other.package; } bool ClassKey::operator<=(const ClassKey& other) const { return !(*this > other); } bool ClassKey::operator>=(const ClassKey& other) const { return !(*this < other); } void ClassKey::encode(qpid::framing::Buffer& buffer) const { buffer.putShortString(package); buffer.putShortString(name); buffer.putBin128(const_cast(hash)); } ostream& qpid::console::operator<<(ostream& o, const ClassKey& k) { o << k.str(); return o; } qpidc-0.16/src/qpid/console/Object.cpp0000664000076400007640000002652511227113407020244 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/SessionManager.h" #include "qpid/console/Broker.h" #include "qpid/console/Object.h" #include "qpid/console/Schema.h" #include "qpid/console/ClassKey.h" #include "qpid/console/Value.h" #include "qpid/framing/Buffer.h" #include "qpid/sys/Mutex.h" using namespace qpid::console; using namespace qpid::sys; using namespace qpid; using namespace std; using qpid::framing::Uuid; using qpid::framing::FieldTable; void Object::AttributeMap::addRef(const string& key, const ObjectId& val) { (*this)[key] = Value::Ptr(new RefValue(val)); } void Object::AttributeMap::addUint(const string& key, uint32_t val) { (*this)[key] = Value::Ptr(new UintValue(val)); } void Object::AttributeMap::addInt(const string& key, int32_t val) { (*this)[key] = Value::Ptr(new IntValue(val)); } void Object::AttributeMap::addUint64(const string& key, uint64_t val) { (*this)[key] = Value::Ptr(new Uint64Value(val)); } void Object::AttributeMap::addInt64(const string& key, int64_t val) { (*this)[key] = Value::Ptr(new Int64Value(val)); } void Object::AttributeMap::addString(const string& key, const string& val) { (*this)[key] = Value::Ptr(new StringValue(val)); } void Object::AttributeMap::addBool(const string& key, bool val) { (*this)[key] = Value::Ptr(new BoolValue(val)); } void Object::AttributeMap::addFloat(const string& key, float val) { (*this)[key] = Value::Ptr(new FloatValue(val)); } void Object::AttributeMap::addDouble(const string& key, double val) { (*this)[key] = Value::Ptr(new DoubleValue(val)); } void Object::AttributeMap::addUuid(const string& key, const Uuid& val) { (*this)[key] = Value::Ptr(new UuidValue(val)); } void Object::AttributeMap::addMap(const string& key, const FieldTable& val) { (*this)[key] = Value::Ptr(new MapValue(val)); } Object::Object(Broker* b, SchemaClass* s, framing::Buffer& buffer, bool prop, bool stat) : broker(b), schema(s), pendingMethod(0) { currentTime = buffer.getLongLong(); createTime = buffer.getLongLong(); deleteTime = buffer.getLongLong(); objectId.decode(buffer); if (prop) { set excludes; parsePresenceMasks(buffer, excludes); for (vector::const_iterator pIter = schema->properties.begin(); pIter != schema->properties.end(); pIter++) { SchemaProperty* property = *pIter; if (excludes.count(property->name) != 0) { attributes[property->name] = Value::Ptr(new NullValue()); } else { attributes[property->name] = property->decodeValue(buffer); } } } if (stat) { for (vector::const_iterator sIter = schema->statistics.begin(); sIter != schema->statistics.end(); sIter++) { SchemaStatistic* statistic = *sIter; attributes[statistic->name] = statistic->decodeValue(buffer); } } } Object::~Object() {} const ClassKey& Object::getClassKey() const { return schema->getClassKey(); } string Object::getIndex() const { string result; for (vector::const_iterator pIter = schema->properties.begin(); pIter != schema->properties.end(); pIter++) { SchemaProperty* property = *pIter; if (property->isIndex) { AttributeMap::const_iterator vIter = attributes.find(property->name); if (vIter != attributes.end()) { if (!result.empty()) result += ":"; result += vIter->second->str(); } } } return result; } void Object::mergeUpdate(const Object& /*updated*/) { // TODO } void Object::invokeMethod(const string name, const AttributeMap& args, MethodResponse& result) { for (vector::const_iterator iter = schema->methods.begin(); iter != schema->methods.end(); iter++) { if ((*iter)->name == name) { SchemaMethod* method = *iter; char rawbuffer[65536]; framing::Buffer buffer(rawbuffer, 65536); uint32_t sequence = broker->sessionManager.sequenceManager.reserve("method"); pendingMethod = method; broker->methodObject = this; broker->encodeHeader(buffer, 'M', sequence); objectId.encode(buffer); schema->key.encode(buffer); buffer.putShortString(name); for (vector::const_iterator aIter = method->arguments.begin(); aIter != method->arguments.end(); aIter++) { SchemaArgument* arg = *aIter; if (arg->dirInput) { AttributeMap::const_iterator attr = args.find(arg->name); if (attr != args.end()) { ValueFactory::encodeValue(arg->typeCode, attr->second, buffer); } else { // TODO Use the default value instead of throwing throw Exception("Missing arguments in method call"); } } } uint32_t length = buffer.getPosition(); buffer.reset(); stringstream routingKey; routingKey << "agent." << objectId.getBrokerBank() << "." << objectId.getAgentBank(); broker->connThreadBody.sendBuffer(buffer, length, "qpid.management", routingKey.str()); { Mutex::ScopedLock l(broker->lock); bool ok = true; while (pendingMethod != 0 && ok) { ok = broker->cond.wait(broker->lock, AbsTime(now(), broker->sessionManager.settings.methodTimeout * TIME_SEC)); } if (!ok) { result.code = 0x1001; result.text.assign("Method call timed out"); result.arguments.clear(); } else { result = methodResponse; } } } } } void Object::handleMethodResp(framing::Buffer& buffer, uint32_t sequence) { broker->sessionManager.sequenceManager.release(sequence); methodResponse.code = buffer.getLong(); buffer.getMediumString(methodResponse.text); methodResponse.arguments.clear(); for (vector::const_iterator aIter = pendingMethod->arguments.begin(); aIter != pendingMethod->arguments.end(); aIter++) { SchemaArgument* arg = *aIter; if (arg->dirOutput) { methodResponse.arguments[arg->name] = arg->decodeValue(buffer); } } { Mutex::ScopedLock l(broker->lock); pendingMethod = 0; broker->cond.notify(); } } ObjectId Object::attrRef(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return ObjectId(); Value::Ptr val = iter->second; if (!val->isObjectId()) return ObjectId(); return val->asObjectId(); } uint32_t Object::attrUint(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0; Value::Ptr val = iter->second; if (!val->isUint()) return 0; return val->asUint(); } int32_t Object::attrInt(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0; Value::Ptr val = iter->second; if (!val->isInt()) return 0; return val->asInt(); } uint64_t Object::attrUint64(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0; Value::Ptr val = iter->second; if (!val->isUint64()) return 0; return val->asUint64(); } int64_t Object::attrInt64(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0; Value::Ptr val = iter->second; if (!val->isInt64()) return 0; return val->asInt64(); } string Object::attrString(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return string(); Value::Ptr val = iter->second; if (!val->isString()) return string(); return val->asString(); } bool Object::attrBool(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return false; Value::Ptr val = iter->second; if (!val->isBool()) return false; return val->asBool(); } float Object::attrFloat(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0.0; Value::Ptr val = iter->second; if (!val->isFloat()) return 0.0; return val->asFloat(); } double Object::attrDouble(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return 0.0; Value::Ptr val = iter->second; if (!val->isDouble()) return 0.0; return val->asDouble(); } Uuid Object::attrUuid(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return Uuid(); Value::Ptr val = iter->second; if (!val->isUuid()) return Uuid(); return val->asUuid(); } FieldTable Object::attrMap(const string& key) const { AttributeMap::const_iterator iter = attributes.find(key); if (iter == attributes.end()) return FieldTable(); Value::Ptr val = iter->second; if (!val->isMap()) return FieldTable(); return val->asMap(); } void Object::parsePresenceMasks(framing::Buffer& buffer, set& excludeList) { excludeList.clear(); uint8_t bit = 0; uint8_t mask = 0; for (vector::const_iterator pIter = schema->properties.begin(); pIter != schema->properties.end(); pIter++) { SchemaProperty* property = *pIter; if (property->isOptional) { if (bit == 0) { mask = buffer.getOctet(); bit = 1; } if ((mask & bit) == 0) excludeList.insert(property->name); if (bit == 0x80) bit = 0; else bit = bit << 1; } } } ostream& qpid::console::operator<<(ostream& o, const Object& object) { const ClassKey& key = object.getClassKey(); o << key.getPackageName() << ":" << key.getClassName() << "[" << object.getObjectId() << "] " << object.getIndex(); return o; } qpidc-0.16/src/qpid/console/Schema.cpp0000664000076400007640000001164011310447260020226 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/Schema.h" #include "qpid/console/Value.h" #include "qpid/framing/FieldTable.h" using namespace qpid::console; using namespace qpid; using std::string; using std::vector; SchemaArgument::SchemaArgument(framing::Buffer& buffer, bool forMethod) { framing::FieldTable map; map.decode(buffer); name = map.getAsString("name"); typeCode = map.getAsInt("type"); unit = map.getAsString("unit"); min = map.getAsInt("min"); max = map.getAsInt("max"); maxLen = map.getAsInt("maxlen"); desc = map.getAsString("desc"); dirInput = false; dirOutput = false; if (forMethod) { string dir(map.getAsString("dir")); if (dir.find('I') != dir.npos || dir.find('i') != dir.npos) dirInput = true; if (dir.find('O') != dir.npos || dir.find('o') != dir.npos) dirOutput = true; } } Value::Ptr SchemaArgument::decodeValue(framing::Buffer& buffer) { return ValueFactory::newValue(typeCode, buffer); } SchemaProperty::SchemaProperty(framing::Buffer& buffer) { framing::FieldTable map; map.decode(buffer); name = map.getAsString("name"); typeCode = map.getAsInt("type"); accessCode = map.getAsInt("access"); isIndex = map.getAsInt("index") != 0; isOptional = map.getAsInt("optional") != 0; unit = map.getAsString("unit"); min = map.getAsInt("min"); max = map.getAsInt("max"); maxLen = map.getAsInt("maxlen"); desc = map.getAsString("desc"); } Value::Ptr SchemaProperty::decodeValue(framing::Buffer& buffer) { return ValueFactory::newValue(typeCode, buffer); } SchemaStatistic::SchemaStatistic(framing::Buffer& buffer) { framing::FieldTable map; map.decode(buffer); name = map.getAsString("name"); typeCode = map.getAsInt("type"); unit = map.getAsString("unit"); desc = map.getAsString("desc"); } Value::Ptr SchemaStatistic::decodeValue(framing::Buffer& buffer) { return ValueFactory::newValue(typeCode, buffer); } SchemaMethod::SchemaMethod(framing::Buffer& buffer) { framing::FieldTable map; map.decode(buffer); name = map.getAsString("name"); desc = map.getAsString("desc"); int argCount = map.getAsInt("argCount"); for (int i = 0; i < argCount; i++) arguments.push_back(new SchemaArgument(buffer, true)); } SchemaMethod::~SchemaMethod() { for (vector::iterator iter = arguments.begin(); iter != arguments.end(); iter++) delete *iter; } SchemaClass::SchemaClass(const uint8_t _kind, const ClassKey& _key, framing::Buffer& buffer) : kind(_kind), key(_key) { if (kind == KIND_TABLE) { uint8_t hasSupertype = 0; //buffer.getOctet(); uint16_t propCount = buffer.getShort(); uint16_t statCount = buffer.getShort(); uint16_t methodCount = buffer.getShort(); if (hasSupertype) { string unused; buffer.getShortString(unused); buffer.getShortString(unused); buffer.getLongLong(); buffer.getLongLong(); } for (uint16_t idx = 0; idx < propCount; idx++) properties.push_back(new SchemaProperty(buffer)); for (uint16_t idx = 0; idx < statCount; idx++) statistics.push_back(new SchemaStatistic(buffer)); for (uint16_t idx = 0; idx < methodCount; idx++) methods.push_back(new SchemaMethod(buffer)); } else if (kind == KIND_EVENT) { uint16_t argCount = buffer.getShort(); for (uint16_t idx = 0; idx < argCount; idx++) arguments.push_back(new SchemaArgument(buffer)); } } SchemaClass::~SchemaClass() { for (vector::iterator iter = properties.begin(); iter != properties.end(); iter++) delete *iter; for (vector::iterator iter = statistics.begin(); iter != statistics.end(); iter++) delete *iter; for (vector::iterator iter = methods.begin(); iter != methods.end(); iter++) delete *iter; for (vector::iterator iter = arguments.begin(); iter != arguments.end(); iter++) delete *iter; } qpidc-0.16/src/qpid/xml/0000775000076400007640000000000011752725716015475 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/xml/XmlExchangePlugin.cpp0000664000076400007640000000354311227113407021551 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include "qpid/acl/Acl.h" #include "qpid/broker/Broker.h" #include "qpid/Plugin.h" #include "qpid/log/Statement.h" #include #include #include "qpid/xml/XmlExchange.h" namespace qpid { namespace broker { // ACL uses the acl namespace here - should I? using namespace std; class Broker; Exchange::shared_ptr create(const std::string& name, bool durable, const framing::FieldTable& args, management::Manageable* parent, Broker* broker) { Exchange::shared_ptr e(new XmlExchange(name, durable, args, parent, broker)); return e; } class XmlExchangePlugin : public Plugin { public: void earlyInitialize(Plugin::Target& target); void initialize(Plugin::Target& target); }; void XmlExchangePlugin::earlyInitialize(Plugin::Target& target) { Broker* broker = dynamic_cast(&target); if (broker) { broker->getExchanges().registerType(XmlExchange::typeName, &create); QPID_LOG(info, "Registered xml exchange"); } } void XmlExchangePlugin::initialize(Target&) {} static XmlExchangePlugin matchingPlugin; }} // namespace qpid::acl qpidc-0.16/src/qpid/xml/XmlExchange.h0000664000076400007640000000737111725210040020034 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _XmlExchange_ #define _XmlExchange_ #include "qpid/broker/Exchange.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/CopyOnWriteArray.h" #include "qpid/sys/Monitor.h" #include "qpid/broker/Queue.h" #include #include #include #include #include using namespace std; namespace qpid { namespace broker { class Broker; typedef boost::shared_ptr Query; struct XmlBinding : public Exchange::Binding { static XQilla xqilla; typedef boost::shared_ptr shared_ptr; typedef qpid::sys::CopyOnWriteArray vector; Query xquery; bool parse_message_content; const std::string fedOrigin; // empty for local bindings XmlBinding(const std::string& key, const Queue::shared_ptr queue, const std::string& fedOrigin, Exchange* parent, const ::qpid::framing::FieldTable& _arguments, const std::string& ); }; class XmlExchange : public virtual Exchange { typedef std::map XmlBindingsMap; XmlBindingsMap bindingsMap; qpid::sys::RWlock lock; bool matches(Query& query, Deliverable& msg, const qpid::framing::FieldTable* args, bool parse_message_content); public: static const std::string typeName; XmlExchange(const std::string& name, management::Manageable* parent = 0, Broker* broker = 0); XmlExchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, management::Manageable* parent = 0, Broker* broker = 0); virtual std::string getType() const { return typeName; } virtual bool bind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); virtual bool unbind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); virtual void route(Deliverable& msg); virtual bool isBound(Queue::shared_ptr queue, const std::string* const routingKey, const qpid::framing::FieldTable* const args); virtual void propagateFedOp(const std::string& bindingKey, const std::string& fedTags, const std::string& fedOp, const std::string& fedOrigin, const qpid::framing::FieldTable* args=0); virtual bool fedUnbind(const std::string& fedOrigin, const std::string& fedTags, Queue::shared_ptr queue, const std::string& bindingKey, const qpid::framing::FieldTable* args); virtual void fedReorigin(); virtual bool supportsDynamicBinding() { return true; } virtual ~XmlExchange(); struct MatchOrigin { const std::string origin; MatchOrigin(const std::string& origin); bool operator()(XmlBinding::shared_ptr b); }; struct MatchQueueAndOrigin { const Queue::shared_ptr queue; const std::string origin; MatchQueueAndOrigin(Queue::shared_ptr queue, const std::string& origin); bool operator()(XmlBinding::shared_ptr b); }; }; } } #endif qpidc-0.16/src/qpid/xml/XmlExchange.cpp0000664000076400007640000003373711725210040020374 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "config.h" #include "qpid/xml/XmlExchange.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/log/Statement.h" #include "qpid/broker/FedOps.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/FieldValue.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/Plugin.h" #include #ifdef XQ_EFFECTIVE_BOOLEAN_VALUE_HPP #include #endif #include #include #include #include #include #include #include #include using namespace qpid::framing; using namespace qpid::sys; using qpid::management::Manageable; namespace _qmf = qmf::org::apache::qpid::broker; namespace qpid { namespace broker { XQilla XmlBinding::xqilla; XmlBinding::XmlBinding(const std::string& key, const Queue::shared_ptr queue, const std::string& _fedOrigin, Exchange* parent, const ::qpid::framing::FieldTable& _arguments, const std::string& queryText ) : Binding(key, queue, parent, _arguments), xquery(), parse_message_content(true), fedOrigin(_fedOrigin) { startManagement(); QPID_LOG(trace, "Creating binding with query: " << queryText ); try { Query q(xqilla.parse(X(queryText.c_str()))); xquery = q; QPID_LOG(trace, "Bound successfully with query: " << queryText ); parse_message_content = false; if (xquery->getQueryBody()->getStaticAnalysis().areContextFlagsUsed()) { parse_message_content = true; } else { GlobalVariables &vars = const_cast(xquery->getVariables()); for (GlobalVariables::iterator it = vars.begin(); it != vars.end(); ++it) { if ((*it)->getStaticAnalysis().areContextFlagsUsed()) { parse_message_content = true; break; } } } } catch (XQException& e) { throw InternalErrorException(QPID_MSG("Could not parse xquery:"+ queryText)); } catch (...) { throw InternalErrorException(QPID_MSG("Unexpected error - Could not parse xquery:"+ queryText)); } } XmlExchange::XmlExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange(_name, _parent, b) { if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } XmlExchange::XmlExchange(const std::string& _name, bool _durable, const FieldTable& _args, Manageable* _parent, Broker* b) : Exchange(_name, _durable, _args, _parent, b) { if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } bool XmlExchange::bind(Queue::shared_ptr queue, const string& bindingKey, const FieldTable* args) { // Federation uses bind for unbind and reorigin comands as well as for binds. // // Both federated and local binds are done in this method. Other // federated requests are done by calling the relevent methods. string fedOp; string fedTags; string fedOrigin; if (args) fedOp = args->getAsString(qpidFedOp); if (! fedOp.empty()) { fedTags = args->getAsString(qpidFedTags); fedOrigin = args->getAsString(qpidFedOrigin); } if (fedOp == fedOpUnbind) { return fedUnbind(fedOrigin, fedTags, queue, bindingKey, args); } else if (fedOp == fedOpReorigin) { fedReorigin(); return true; } // OK, looks like we're really going to bind else if (fedOp.empty() || fedOp == fedOpBind) { string queryText = args->getAsString("xquery"); RWlock::ScopedWlock l(lock); XmlBinding::vector& bindings(bindingsMap[bindingKey]); XmlBinding::vector::ConstPtr p = bindings.snapshot(); if (!p || std::find_if(p->begin(), p->end(), MatchQueueAndOrigin(queue, fedOrigin)) == p->end()) { XmlBinding::shared_ptr binding(new XmlBinding (bindingKey, queue, fedOrigin, this, *args, queryText)); bindings.add(binding); if (mgmtExchange != 0) { mgmtExchange->inc_bindingCount(); } } else { return false; } } else { QPID_LOG(warning, "Unknown Federation Op: " << fedOp); } routeIVE(); propagateFedOp(bindingKey, fedTags, fedOp, fedOrigin, args); return true; } bool XmlExchange::unbind(Queue::shared_ptr queue, const string& bindingKey, const FieldTable* args) { /* * When called directly, no qpidFedOrigin argument will be * present. When called from federation, it will be present. * * This is a bit of a hack - the binding needs the origin, but * this interface, as originally defined, would not supply one. */ string fedOrigin; if (args) fedOrigin = args->getAsString(qpidFedOrigin); RWlock::ScopedWlock l(lock); if (bindingsMap[bindingKey].remove_if(MatchQueueAndOrigin(queue, fedOrigin))) { if (mgmtExchange != 0) { mgmtExchange->dec_bindingCount(); } return true; } else { return false; } } bool XmlExchange::matches(Query& query, Deliverable& msg, const qpid::framing::FieldTable* args, bool parse_message_content) { string msgContent; try { QPID_LOG(trace, "matches: query is [" << UTF8(query->getQueryText()) << "]"); boost::scoped_ptr context(query->createDynamicContext()); if (!context.get()) { throw InternalErrorException(QPID_MSG("Query context looks munged ...")); } if (parse_message_content) { msg.getMessage().getFrames().getContent(msgContent); QPID_LOG(trace, "matches: message content is [" << msgContent << "]"); XERCES_CPP_NAMESPACE::MemBufInputSource xml((const XMLByte*) msgContent.c_str(), msgContent.length(), "input" ); // This will parse the document using either Xerces or FastXDM, depending // on your XQilla configuration. FastXDM can be as much as 10x faster. Sequence seq(context->parseDocument(xml)); if(!seq.isEmpty() && seq.first()->isNode()) { context->setContextItem(seq.first()); context->setContextPosition(1); context->setContextSize(1); } } if (args) { FieldTable::ValueMap::const_iterator v = args->begin(); for(; v != args->end(); ++v) { if (v->second->convertsTo()) { QPID_LOG(trace, "XmlExchange, external variable (double): " << v->first << " = " << v->second->get()); Item::Ptr value = context->getItemFactory()->createDouble(v->second->get(), context.get()); context->setExternalVariable(X(v->first.c_str()), value); } else if (v->second->convertsTo()) { QPID_LOG(trace, "XmlExchange, external variable (int):" << v->first << " = " << v->second->getData().getInt()); Item::Ptr value = context->getItemFactory()->createInteger(v->second->get(), context.get()); context->setExternalVariable(X(v->first.c_str()), value); } else if (v->second->convertsTo()) { QPID_LOG(trace, "XmlExchange, external variable (string):" << v->first << " = " << v->second->getData().getString().c_str()); Item::Ptr value = context->getItemFactory()->createString(X(v->second->get().c_str()), context.get()); context->setExternalVariable(X(v->first.c_str()), value); } } } Result result = query->execute(context.get()); #ifdef XQ_EFFECTIVE_BOOLEAN_VALUE_HPP Item::Ptr first_ = result->next(context.get()); Item::Ptr second_ = result->next(context.get()); return XQEffectiveBooleanValue::get(first_, second_, context.get(), 0); #else return result->getEffectiveBooleanValue(context.get(), 0); #endif } catch (XQException& e) { QPID_LOG(warning, "Could not parse XML content (or message headers):" << msgContent); } catch (...) { QPID_LOG(warning, "Unexpected error routing message: " << msgContent); } return 0; } // Future optimization: If any query in a binding for a given routing key requires // message content, parse the message once, and use that parsed form for all bindings. // // Future optimization: XQilla does not currently do document projection for data // accessed via the context item. If there is a single query for a given routing key, // and it accesses document data, this could be a big win. // // Document projection often is not a win if you have multiple queries on the same data. // But for very large messages, if all these queries are on the first part of the data, // it could still be a big win. void XmlExchange::route(Deliverable& msg) { const string& routingKey = msg.getMessage().getRoutingKey(); const FieldTable* args = msg.getMessage().getApplicationHeaders(); PreRoute pr(msg, this); try { XmlBinding::vector::ConstPtr p; BindingList b(new std::vector >); { RWlock::ScopedRlock l(lock); p = bindingsMap[routingKey].snapshot(); if (!p.get()) return; } for (std::vector::const_iterator i = p->begin(); i != p->end(); i++) { if (matches((*i)->xquery, msg, args, (*i)->parse_message_content)) { b->push_back(*i); } } doRoute(msg, b); } catch (...) { QPID_LOG(warning, "XMLExchange " << getName() << ": exception routing message with query " << routingKey); } } bool XmlExchange::isBound(Queue::shared_ptr queue, const string* const bindingKey, const FieldTable* const) { RWlock::ScopedRlock l(lock); if (bindingKey) { XmlBindingsMap::iterator i = bindingsMap.find(*bindingKey); if (i == bindingsMap.end()) return false; if (!queue) return true; XmlBinding::vector::ConstPtr p = i->second.snapshot(); return p && std::find_if(p->begin(), p->end(), MatchQueue(queue)) != p->end(); } else if (!queue) { //if no queue or routing key is specified, just report whether any bindings exist return bindingsMap.size() > 0; } else { for (XmlBindingsMap::iterator i = bindingsMap.begin(); i != bindingsMap.end(); i++) { XmlBinding::vector::ConstPtr p = i->second.snapshot(); if (p && std::find_if(p->begin(), p->end(), MatchQueue(queue)) != p->end()) return true; } return false; } } XmlExchange::~XmlExchange() { bindingsMap.clear(); } void XmlExchange::propagateFedOp(const std::string& bindingKey, const std::string& fedTags, const std::string& fedOp, const std::string& fedOrigin, const qpid::framing::FieldTable* args) { FieldTable nonFedArgs; if (args) { for (qpid::framing::FieldTable::ValueMap::const_iterator i=args->begin(); i != args->end(); ++i) { const string& name(i->first); if (name != qpidFedOp && name != qpidFedTags && name != qpidFedOrigin) { nonFedArgs.insert((*i)); } } } FieldTable* propArgs = (nonFedArgs.count() > 0 ? &nonFedArgs : 0); Exchange::propagateFedOp(bindingKey, fedTags, fedOp, fedOrigin, propArgs); } bool XmlExchange::fedUnbind(const string& fedOrigin, const string& fedTags, Queue::shared_ptr queue, const string& bindingKey, const FieldTable* args) { RWlock::ScopedRlock l(lock); if (unbind(queue, bindingKey, args)) { propagateFedOp(bindingKey, fedTags, fedOpUnbind, fedOrigin); return true; } return false; } void XmlExchange::fedReorigin() { std::vector keys2prop; { RWlock::ScopedRlock l(lock); for (XmlBindingsMap::iterator i = bindingsMap.begin(); i != bindingsMap.end(); ++i) { XmlBinding::vector::ConstPtr p = i->second.snapshot(); if (std::find_if(p->begin(), p->end(), MatchOrigin(string())) != p->end()) { keys2prop.push_back(i->first); } } } /* lock dropped */ for (std::vector::const_iterator key = keys2prop.begin(); key != keys2prop.end(); key++) { propagateFedOp( *key, string(), fedOpBind, string()); } } XmlExchange::MatchOrigin::MatchOrigin(const string& _origin) : origin(_origin) {} bool XmlExchange::MatchOrigin::operator()(XmlBinding::shared_ptr b) { return b->fedOrigin == origin; } XmlExchange::MatchQueueAndOrigin::MatchQueueAndOrigin(Queue::shared_ptr _queue, const string& _origin) : queue(_queue), origin(_origin) {} bool XmlExchange::MatchQueueAndOrigin::operator()(XmlBinding::shared_ptr b) { return b->queue == queue and b->fedOrigin == origin; } const std::string XmlExchange::typeName("xml"); } } qpidc-0.16/src/qpid/Sasl.h0000664000076400007640000000356011645230314015736 0ustar00jrossjross00000000000000#ifndef QPID_SASL_H #define QPID_SASL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "qpid/sys/IntegerTypes.h" namespace qpid { namespace sys { class SecurityLayer; struct SecuritySettings; } /** * Interface to SASL support. This class is implemented by platform-specific * SASL providers. */ class Sasl { public: /** * Start SASL negotiation with the broker. * * @param mechanisms Comma-separated list of the SASL mechanism the * client supports. * @param externalSecuritySettings security related details from the underlying transport */ virtual bool start(const std::string& mechanisms, std::string& response, const qpid::sys::SecuritySettings* externalSecuritySettings = 0) = 0; virtual std::string step(const std::string& challenge) = 0; virtual std::string getMechanism() = 0; virtual std::string getUserId() = 0; virtual std::auto_ptr getSecurityLayer(uint16_t maxFrameSize) = 0; virtual ~Sasl() {} }; } // namespace qpid #endif /*!QPID_SASL_H*/ qpidc-0.16/src/qpid/Serializer.h0000664000076400007640000001403011001005655017131 0ustar00jrossjross00000000000000#ifndef QPID_SERIALIZER_H #define QPID_SERIALIZER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "qpid/Exception.h" // FIXME aconway 2008-04-03: proper exception class. namespace qpid { /** * Overload for types that do not provide a serialize() member. * It should retrun a wrapper holding a reference to t that implements * serialize() */ template T& serializable(T& t) { return t; } /** Serialize std::pair */ template struct SerializablePair { std::pair& value; SerializablePair(std::pair& x) : value(x) {} template void serialize(S& s) { s(value.first)(value.second); } }; template SerializablePair serializable(std::pair& p) { return SerializablePair(p); } /** * Base class for all serializers. * Derived serializers inherit from either Encoder or Decoder. * Serializers can be used as functors or static_visitors. */ template class Serializer { public: /** Temporarily set a lower relative limit on the serializer */ class ScopedLimit { public: ScopedLimit(Serializer& s, size_t l) : serializer(s), save(serializer.setLimit(l)) {} ~ScopedLimit() { serializer.setAbsLimit(save); } private: Serializer& serializer; size_t save; }; static size_t maxLimit() { return std::numeric_limits::max(); } Serializer() : bytes(0), limit(maxLimit()) {} typedef Derived& result_type; // unary functor requirement. /** Wrapper functor to pass serializer functors by reference. */ template struct Ref { typedef typename S::result_type result_type; S& s; Ref(S& ss) : s(ss) {} template result_type operator()(T& x) { return s(x); } template result_type operator()(const T& x) { return s(x); } }; /** Reference wrapper to pass serializers by reference, * e.g. to std:: functions that take functors. */ template static Ref ref(S& s) { return Ref(s); } /** Generic rule to serialize an iterator range */ template Derived& operator()(Iter begin, Iter end) { std::for_each(begin, end, ref(this->self())); return self(); } /** Set limit relative to current position. * @return old absolute limit. */ size_t setLimit(size_t n) { size_t l=limit; limit = bytes+n; return l; } /** Get the max number of bytes that can be processed under the * current limit. */ size_t bytesRemaining() const { return limit - bytes; } /** Set absolute limit. */ void setAbsLimit(size_t n) { limit = n; if (bytes > limit) throw Exception("Framing error: data overrun"); // FIXME aconway 2008-04-03: proper exception. } protected: Derived& self() { return *static_cast(this); } void addBytes(size_t n) { size_t newBytes=bytes+n; if (newBytes > limit) throw Exception("Framing error: data overrun"); // FIXME aconway 2008-04-03: proper exception. bytes = newBytes; } private: void checkLimit() { } size_t bytes; // how many bytes serialized. size_t limit; // bytes may not exceed this limit. }; /** * Base class for encoders, provides generic encode functions. * * A derived encoder must provide operator(const T&) to encode all * primitive types T. */ template class EncoderBase : public Serializer { public: using Serializer::operator(); using Serializer::self; /** Default op() for non-primitive types. */ template Derived& operator()(const T& t) { serializable(const_cast(t)).serialize(self()); return self(); } /** Split serialize() into encode()/decode() */ template Derived& split(const T& t) { t.encode(self()); return self(); } }; /** * Base class for decoders, provides generic decode functions. * * A derived encoder must provide operator(T&) to encode all * primitive types T. */ template class DecoderBase : public Serializer { public: using Serializer::operator(); using Serializer::self; /** Default op() for non-primitive types. */ template Derived& operator()(T& t) { serializable(t).serialize(self()); return self(); } /** Split serialize() into encode()/decode() */ template Derived& split(T& t) { t.decode(self()); return self(); } }; /** Serialize a type by converting it to/from another type. * To serialize type Foo by converting to/from type Bar create * a serializable() overload like this: * * SerializeAs serializable(Foo& t) { return SerializeAs(t); } */ template struct SerializeAs { Type& value; SerializeAs(Type & t) : value(t) {} template void serialize(S& s) { s.split(*this); } template void encode(S& s) const { s(AsType(value)); } template void decode(S& s) { AsType x; s(x); value=Type(x); } }; } // namespace qpid #endif /*!QPID_SERIALIZER_H*/ qpidc-0.16/src/qpid/store/0000775000076400007640000000000011752725652016030 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/store/MessageStorePlugin.cpp0000664000076400007640000003410211460144014022273 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "MessageStorePlugin.h" #include "StorageProvider.h" #include "StoreException.h" #include "qpid/broker/Broker.h" #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/DataDir.h" #include "qpid/log/Statement.h" /* * The MessageStore pointer given to the Broker points to static storage. * Thus, it cannot be deleted, especially by the broker. To prevent deletion, * this no-op deleter is used with the boost::shared_ptr. When the last * shared_ptr is destroyed, the deleter is called rather than delete(). */ namespace { class NoopDeleter { public: NoopDeleter() {} void operator()(qpid::broker::MessageStore * /*p*/) {} }; } namespace qpid { namespace store { static MessageStorePlugin static_instance_registers_plugin; MessageStorePlugin::StoreOptions::StoreOptions(const std::string& name) : qpid::Options(name) { addOptions() ("storage-provider", qpid::optValue(providerName, "PROVIDER"), "Name of the storage provider to use.") ; } void MessageStorePlugin::earlyInitialize (qpid::Plugin::Target& target) { qpid::broker::Broker* b = dynamic_cast(&target); if (0 == b) return; // Only listen to Broker targets broker = b; // See if there are any storage provider plugins ready. If not, we can't // do a message store. qpid::Plugin::earlyInitAll(*this); if (providers.empty()) { QPID_LOG(warning, "Message store plugin: No storage providers available."); provider = providers.end(); return; } if (!options.providerName.empty()) { // If specific one was chosen, locate it in loaded set of providers. provider = providers.find(options.providerName); if (provider == providers.end()) throw Exception("Message store plugin: storage provider '" + options.providerName + "' does not exist."); } else { // No specific provider chosen; if there's only one, use it. Else // report the need to pick one. if (providers.size() > 1) { provider = providers.end(); throw Exception("Message store plugin: multiple provider plugins " "loaded; must either load only one or select one " "using --storage-provider"); } provider = providers.begin(); } provider->second->activate(*this); NoopDeleter d; boost::shared_ptr sp(this, d); broker->setStore(sp); target.addFinalizer(boost::bind(&MessageStorePlugin::finalizeMe, this)); } void MessageStorePlugin::initialize(qpid::Plugin::Target& target) { qpid::broker::Broker* broker = dynamic_cast(&target); if (0 == broker) return; // Only listen to Broker targets // Pass along the initialize step to the provider that's activated. if (provider != providers.end()) { provider->second->initialize(*this); } // qpid::Plugin::initializeAll(*this); } void MessageStorePlugin::finalizeMe() { finalize(); // Call finalizers on any Provider plugins } void MessageStorePlugin::providerAvailable(const std::string name, StorageProvider *be) { ProviderMap::value_type newSp(name, be); std::pair inserted = providers.insert(newSp); if (inserted.second == false) QPID_LOG(warning, "Storage provider " << name << " duplicate; ignored."); } void MessageStorePlugin::truncateInit(const bool /*saveStoreContent*/) { QPID_LOG(info, "Store: truncateInit"); } /** * Record the existence of a durable queue */ void MessageStorePlugin::create(broker::PersistableQueue& queue, const framing::FieldTable& args) { if (queue.getName().size() == 0) { QPID_LOG(error, "Cannot create store for empty (null) queue name - " "ignoring and attempting to continue."); return; } if (queue.getPersistenceId()) { THROW_STORE_EXCEPTION("Queue already created: " + queue.getName()); } provider->second->create(queue, args); } /** * Destroy a durable queue */ void MessageStorePlugin::destroy(broker::PersistableQueue& queue) { provider->second->destroy(queue); } /** * Record the existence of a durable exchange */ void MessageStorePlugin::create(const broker::PersistableExchange& exchange, const framing::FieldTable& args) { if (exchange.getPersistenceId()) { THROW_STORE_EXCEPTION("Exchange already created: " + exchange.getName()); } provider->second->create(exchange, args); } /** * Destroy a durable exchange */ void MessageStorePlugin::destroy(const broker::PersistableExchange& exchange) { provider->second->destroy(exchange); } /** * Record a binding */ void MessageStorePlugin::bind(const broker::PersistableExchange& exchange, const broker::PersistableQueue& queue, const std::string& key, const framing::FieldTable& args) { provider->second->bind(exchange, queue, key, args); } /** * Forget a binding */ void MessageStorePlugin::unbind(const broker::PersistableExchange& exchange, const broker::PersistableQueue& queue, const std::string& key, const framing::FieldTable& args) { provider->second->unbind(exchange, queue, key, args); } /** * Record generic durable configuration */ void MessageStorePlugin::create(const broker::PersistableConfig& config) { if (config.getPersistenceId()) { THROW_STORE_EXCEPTION("Config item already created: " + config.getName()); } provider->second->create(config); } /** * Destroy generic durable configuration */ void MessageStorePlugin::destroy(const broker::PersistableConfig& config) { provider->second->destroy(config); } /** * Stores a message before it has been enqueued * (enqueueing automatically stores the message so this is * only required if storage is required prior to that * point). */ void MessageStorePlugin::stage(const boost::intrusive_ptr& msg) { if (msg->getPersistenceId() == 0 && !msg->isContentReleased()) { provider->second->stage(msg); } } /** * Destroys a previously staged message. This only needs * to be called if the message is never enqueued. (Once * enqueued, deletion will be automatic when the message * is dequeued from all queues it was enqueued onto). */ void MessageStorePlugin::destroy(broker::PersistableMessage& msg) { if (msg.getPersistenceId()) provider->second->destroy(msg); } /** * Appends content to a previously staged message */ void MessageStorePlugin::appendContent (const boost::intrusive_ptr& msg, const std::string& data) { if (msg->getPersistenceId()) provider->second->appendContent(msg, data); else THROW_STORE_EXCEPTION("Cannot append content. Message not known to store!"); } /** * Loads (a section) of content data for the specified * message (previously stored through a call to stage or * enqueue) into data. The offset refers to the content * only (i.e. an offset of 0 implies that the start of the * content should be loaded, not the headers or related * meta-data). */ void MessageStorePlugin::loadContent(const broker::PersistableQueue& queue, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length) { if (msg->getPersistenceId()) provider->second->loadContent(queue, msg, data, offset, length); else THROW_STORE_EXCEPTION("Cannot load content. Message not known to store!"); } /** * Enqueues a message, storing the message if it has not * been previously stored and recording that the given * message is on the given queue. * * Note: The operation is asynchronous so the return of this function does * not mean the operation is complete. */ void MessageStorePlugin::enqueue(broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const broker::PersistableQueue& queue) { if (queue.getPersistenceId() == 0) { THROW_STORE_EXCEPTION("Queue not created: " + queue.getName()); } provider->second->enqueue(ctxt, msg, queue); } /** * Dequeues a message, recording that the given message is * no longer on the given queue and deleting the message * if it is no longer on any other queue. * * Note: The operation is asynchronous so the return of this function does * not mean the operation is complete. */ void MessageStorePlugin::dequeue(broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const broker::PersistableQueue& queue) { provider->second->dequeue(ctxt, msg, queue); } /** * Flushes all async messages to disk for the specified queue * * Note: The operation is asynchronous so the return of this function does * not mean the operation is complete. */ void MessageStorePlugin::flush(const broker::PersistableQueue& queue) { provider->second->flush(queue); } /** * Returns the number of outstanding AIO's for a given queue * * If 0, than all the enqueue / dequeues have been stored * to disk. */ uint32_t MessageStorePlugin::outstandingQueueAIO(const broker::PersistableQueue& queue) { return provider->second->outstandingQueueAIO(queue); } std::auto_ptr MessageStorePlugin::begin() { return provider->second->begin(); } std::auto_ptr MessageStorePlugin::begin(const std::string& xid) { return provider->second->begin(xid); } void MessageStorePlugin::prepare(broker::TPCTransactionContext& ctxt) { provider->second->prepare(ctxt); } void MessageStorePlugin::commit(broker::TransactionContext& ctxt) { provider->second->commit(ctxt); } void MessageStorePlugin::abort(broker::TransactionContext& ctxt) { provider->second->abort(ctxt); } void MessageStorePlugin::collectPreparedXids(std::set& xids) { provider->second->collectPreparedXids(xids); } /** * Request recovery of queue and message state; inherited from Recoverable */ void MessageStorePlugin::recover(broker::RecoveryManager& recoverer) { ExchangeMap exchanges; QueueMap queues; MessageMap messages; MessageQueueMap messageQueueMap; std::vector xids; PreparedTransactionMap dtxMap; provider->second->recoverConfigs(recoverer); provider->second->recoverExchanges(recoverer, exchanges); provider->second->recoverQueues(recoverer, queues); provider->second->recoverBindings(recoverer, exchanges, queues); // Important to recover messages before transactions in the SQL-CLFS // case. If this becomes a problem, it may be possible to resolve it. // If in doubt please raise a jira and notify Steve Huston // . provider->second->recoverMessages(recoverer, messages, messageQueueMap); provider->second->recoverTransactions(recoverer, dtxMap); // Enqueue msgs where needed. for (MessageQueueMap::const_iterator i = messageQueueMap.begin(); i != messageQueueMap.end(); ++i) { // Locate the message corresponding to the current message Id MessageMap::const_iterator iMsg = messages.find(i->first); if (iMsg == messages.end()) { std::ostringstream oss; oss << "No matching message trying to re-enqueue message " << i->first; THROW_STORE_EXCEPTION(oss.str()); } broker::RecoverableMessage::shared_ptr msg = iMsg->second; // Now for each queue referenced in the queue map, locate it // and re-enqueue the message. for (std::vector::const_iterator j = i->second.begin(); j != i->second.end(); ++j) { // Locate the queue corresponding to the current queue Id QueueMap::const_iterator iQ = queues.find(j->queueId); if (iQ == queues.end()) { std::ostringstream oss; oss << "No matching queue trying to re-enqueue message " << " on queue Id " << j->queueId; THROW_STORE_EXCEPTION(oss.str()); } // Messages involved in prepared transactions have their status // updated accordingly. First, though, restore a message that // is expected to be on a queue, including non-transacted // messages and those pending dequeue in a dtx. if (j->tplStatus != QueueEntry::ADDING) iQ->second->recover(msg); switch(j->tplStatus) { case QueueEntry::ADDING: dtxMap[j->xid]->enqueue(iQ->second, msg); break; case QueueEntry::REMOVING: dtxMap[j->xid]->dequeue(iQ->second, msg); break; default: break; } } } } }} // namespace qpid::store qpidc-0.16/src/qpid/store/StorageProvider.h0000664000076400007640000003071311607071066021314 0ustar00jrossjross00000000000000#ifndef QPID_STORE_STORAGEPROVIDER_H #define QPID_STORE_STORAGEPROVIDER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "qpid/Exception.h" #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/broker/MessageStore.h" using qpid::broker::PersistableConfig; using qpid::broker::PersistableExchange; using qpid::broker::PersistableMessage; using qpid::broker::PersistableQueue; namespace qpid { namespace store { typedef std::map ExchangeMap; typedef std::map QueueMap; typedef std::map MessageMap; // Msg Id -> vector of queue entries where message is queued struct QueueEntry { enum TplStatus { NONE = 0, ADDING = 1, REMOVING = 2 }; uint64_t queueId; TplStatus tplStatus; std::string xid; QueueEntry(uint64_t id, TplStatus tpl = NONE, const std::string& x = "") : queueId(id), tplStatus(tpl), xid(x) {} bool operator==(const QueueEntry& rhs) const { if (queueId != rhs.queueId) return false; if (tplStatus == NONE && rhs.tplStatus == NONE) return true; return xid == rhs.xid; } }; typedef std::map > MessageQueueMap; typedef std::map PreparedTransactionMap; class MessageStorePlugin; /** * @class StorageProvider * * StorageProvider defines the interface for the storage provider plugin to the * Qpid broker persistence store plugin. * * @TODO Should StorageProvider also inherit from MessageStore? If so, then * maybe remove Recoverable from MessageStore's inheritance and move it * to MessageStorePlugin? In any event, somehow the discardInit() feature * needs to get added here. */ class StorageProvider : public qpid::Plugin, public qpid::broker::MessageStore { public: class Exception : public qpid::Exception { public: virtual ~Exception() throw() {} virtual const char *what() const throw() = 0; }; /** * @name Methods inherited from qpid::Plugin */ //@{ /** * Return a pointer to the provider's options. The options will be * updated during option parsing by the host program; therefore, the * referenced Options object must remain valid past this function's return. * * @return An options group or 0 for no options. Default returns 0. * Plugin retains ownership of return value. */ virtual qpid::Options* getOptions() = 0; /** * Initialize Plugin functionality on a Target, called before * initializing the target. * * StorageProviders should respond only to Targets of class * qpid::store::MessageStorePlugin and ignore all others. * * When called, the provider should invoke the method * qpid::store::MessageStorePlugin::providerAvailable() to alert the * message store of StorageProvider's availability. * * Called before the target itself is initialized. */ virtual void earlyInitialize (Plugin::Target& target) = 0; /** * Initialize StorageProvider functionality. Called after initializing * the target. * * StorageProviders should respond only to Targets of class * qpid::store::MessageStorePlugin and ignore all others. * * Called after the target is fully initialized. */ virtual void initialize(Plugin::Target& target) = 0; //@} /** * Receive notification that this provider is the one that will actively * handle storage for the target. If the provider is to be used, this * method will be called after earlyInitialize() and before any * recovery operations (recovery, in turn, precedes call to initialize()). * Thus, it is wise to not actually do any database ops from within * earlyInitialize() - they can wait until activate() is called because * at that point it is certain the database will be needed. */ virtual void activate(MessageStorePlugin &store) = 0; /** * @name Methods inherited from qpid::broker::MessageStore */ //@{ /** * If called after init() but before recovery, will discard the database * and reinitialize using an empty store dir. If @a pushDownStoreFiles * is true, the content of the store dir will be moved to a backup dir * inside the store dir. This is used when cluster nodes recover and must * get thier content from a cluster sync rather than directly fromt the * store. * * @param pushDownStoreFiles If true, will move content of the store dir * into a subdir, leaving the store dir * otherwise empty. */ virtual void truncateInit(const bool pushDownStoreFiles = false) = 0; /** * Record the existence of a durable queue */ virtual void create(PersistableQueue& queue, const qpid::framing::FieldTable& args) = 0; /** * Destroy a durable queue */ virtual void destroy(PersistableQueue& queue) = 0; /** * Record the existence of a durable exchange */ virtual void create(const PersistableExchange& exchange, const qpid::framing::FieldTable& args) = 0; /** * Destroy a durable exchange */ virtual void destroy(const PersistableExchange& exchange) = 0; /** * Record a binding */ virtual void bind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args) = 0; /** * Forget a binding */ virtual void unbind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args) = 0; /** * Record generic durable configuration */ virtual void create(const PersistableConfig& config) = 0; /** * Destroy generic durable configuration */ virtual void destroy(const PersistableConfig& config) = 0; /** * Stores a messages before it has been enqueued * (enqueueing automatically stores the message so this is * only required if storage is required prior to that * point). If the message has not yet been stored it will * store the headers as well as any content passed in. A * persistence id will be set on the message which can be * used to load the content or to append to it. */ virtual void stage(const boost::intrusive_ptr& msg) = 0; /** * Destroys a previously staged message. This only needs * to be called if the message is never enqueued. (Once * enqueued, deletion will be automatic when the message * is dequeued from all queues it was enqueued onto). */ virtual void destroy(PersistableMessage& msg) = 0; /** * Appends content to a previously staged message */ virtual void appendContent(const boost::intrusive_ptr& msg, const std::string& data) = 0; /** * Loads (a section) of content data for the specified * message (previously stored through a call to stage or * enqueue) into data. The offset refers to the content * only (i.e. an offset of 0 implies that the start of the * content should be loaded, not the headers or related * meta-data). */ virtual void loadContent(const PersistableQueue& queue, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length) = 0; /** * Enqueues a message, storing the message if it has not * been previously stored and recording that the given * message is on the given queue. * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param msg the message to enqueue * @param queue the name of the queue onto which it is to be enqueued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void enqueue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue) = 0; /** * Dequeues a message, recording that the given message is * no longer on the given queue and deleting the message * if it is no longer on any other queue. * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param msg the message to dequeue * @param queue the name of the queue from which it is to be dequeued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void dequeue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue) = 0; /** * Flushes all async messages to disk for the specified queue * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param queue the name of the queue from which it is to be dequeued */ virtual void flush(const qpid::broker::PersistableQueue& queue) = 0; /** * Returns the number of outstanding AIO's for a given queue * * If 0, than all the enqueue / dequeues have been stored * to disk * * @param queue the name of the queue to check for outstanding AIO */ virtual uint32_t outstandingQueueAIO(const PersistableQueue& queue) = 0; //@} /** * @TODO This should probably not be here - it's only here because * MessageStore inherits from Recoverable... maybe move that derivation. * * As it is now, we don't use this. Separate recover methods are * declared below for individual types, which also set up maps of * messages, queues, transactions for the main store plugin to handle * properly. * * Request recovery of queue and message state. */ virtual void recover(qpid::broker::RecoveryManager& /*recoverer*/) {} /** * @name Methods that do the recovery of the various objects that * were saved. */ //@{ /** * Recover bindings. */ virtual void recoverConfigs(qpid::broker::RecoveryManager& recoverer) = 0; virtual void recoverExchanges(qpid::broker::RecoveryManager& recoverer, ExchangeMap& exchangeMap) = 0; virtual void recoverQueues(qpid::broker::RecoveryManager& recoverer, QueueMap& queueMap) = 0; virtual void recoverBindings(qpid::broker::RecoveryManager& recoverer, const ExchangeMap& exchangeMap, const QueueMap& queueMap) = 0; virtual void recoverMessages(qpid::broker::RecoveryManager& recoverer, MessageMap& messageMap, MessageQueueMap& messageQueueMap) = 0; virtual void recoverTransactions(qpid::broker::RecoveryManager& recoverer, PreparedTransactionMap& dtxMap) = 0; //@} }; }} // namespace qpid::store #endif /* QPID_STORE_STORAGEPROVIDER_H */ qpidc-0.16/src/qpid/store/CMakeLists.txt0000664000076400007640000001033611715002376020561 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # project(qpidc_store) #set (CMAKE_VERBOSE_MAKEFILE ON) # for debugging include_directories( ${Boost_INCLUDE_DIR} ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) include_directories( ${CMAKE_HOME_DIRECTORY}/include ) link_directories( ${Boost_LIBRARY_DIRS} ) set (store_SOURCES MessageStorePlugin.cpp ) add_library (store MODULE ${store_SOURCES}) target_link_libraries (store qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY}) if (CMAKE_COMPILER_IS_GNUCXX) set (GCC_CATCH_UNDEFINED "-Wl,--no-undefined") # gcc on SunOS uses native linker whose "-z defs" is too fussy if (CMAKE_SYSTEM_NAME STREQUAL SunOS) set (GCC_CATCH_UNDEFINED "") endif (CMAKE_SYSTEM_NAME STREQUAL SunOS) set_target_properties (store PROPERTIES PREFIX "" LINK_FLAGS "${GCC_CATCH_UNDEFINED}") endif (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_SYSTEM_NAME STREQUAL Windows) if (MSVC) add_definitions( /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" ) endif (MSVC) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) set_target_properties (store PROPERTIES VERSION ${qpidc_version}) install (TARGETS store # RUNTIME DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) # Build the MS SQL Storage Provider plugin set (mssql_default ON) if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) set(mssql_default OFF) endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) option(BUILD_MSSQL "Build MS SQL Store provider plugin" ${mssql_default}) if (BUILD_MSSQL) add_library (mssql_store MODULE ms-sql/MsSqlProvider.cpp ms-sql/AmqpTransaction.cpp ms-sql/BindingRecordset.cpp ms-sql/BlobAdapter.cpp ms-sql/BlobEncoder.cpp ms-sql/BlobRecordset.cpp ms-sql/DatabaseConnection.cpp ms-sql/MessageMapRecordset.cpp ms-sql/MessageRecordset.cpp ms-sql/Recordset.cpp ms-sql/SqlTransaction.cpp ms-sql/State.cpp ms-sql/TplRecordset.cpp ms-sql/VariantHelper.cpp) target_link_libraries (mssql_store qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY}) install (TARGETS mssql_store # RUNTIME DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) endif (BUILD_MSSQL) # Build the MS SQL-CLFS Storage Provider plugin set (msclfs_default ON) if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) set(msclfs_default OFF) endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) option(BUILD_MSCLFS "Build MS hybrid SQL-CLFS Store provider plugin" ${msclfs_default}) if (BUILD_MSCLFS) add_library (msclfs_store MODULE ms-clfs/MsSqlClfsProvider.cpp ms-clfs/Log.cpp ms-clfs/MessageLog.cpp ms-clfs/Messages.cpp ms-clfs/Transaction.cpp ms-clfs/TransactionLog.cpp ms-sql/BindingRecordset.cpp ms-sql/BlobAdapter.cpp ms-sql/BlobEncoder.cpp ms-sql/BlobRecordset.cpp ms-sql/DatabaseConnection.cpp ms-sql/Recordset.cpp ms-sql/State.cpp ms-sql/VariantHelper.cpp) include_directories(ms-sql) target_link_libraries (msclfs_store qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY} clfsw32.lib) install (TARGETS msclfs_store # RUNTIME DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) endif (BUILD_MSCLFS) qpidc-0.16/src/qpid/store/ms-clfs/0000775000076400007640000000000011752725652017374 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/store/ms-clfs/Log.cpp0000664000076400007640000001422211465077530020616 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include "Log.h" namespace qpid { namespace store { namespace ms_clfs { Log::~Log() { if (marshal != 0) ::DeleteLogMarshallingArea(marshal); ::CloseHandle(handle); } void Log::open(const std::string& path, const TuningParameters& params) { this->containerSize = static_cast(params.containerSize); logPath = path; std::string logSpec = "log:" + path; size_t specLength = logSpec.length(); std::auto_ptr wLogSpec(new wchar_t[specLength + 1]); size_t converted; mbstowcs_s(&converted, wLogSpec.get(), specLength+1, logSpec.c_str(), specLength); handle = ::CreateLogFile(wLogSpec.get(), GENERIC_WRITE | GENERIC_READ, 0, 0, OPEN_ALWAYS, 0); QPID_WINDOWS_CHECK_NOT(handle, INVALID_HANDLE_VALUE); CLFS_INFORMATION info; ULONG infoSize = sizeof(info); BOOL ok = ::GetLogFileInformation(handle, &info, &infoSize); QPID_WINDOWS_CHECK_NOT(ok, 0); ok = ::RegisterManageableLogClient(handle, 0); QPID_WINDOWS_CHECK_NOT(ok, 0); // Set up policies for how many containers to initially create and how // large each container should be. Also, auto-grow the log when container // space runs out. CLFS_MGMT_POLICY logPolicy; logPolicy.Version = CLFS_MGMT_POLICY_VERSION; logPolicy.LengthInBytes = sizeof(logPolicy); logPolicy.PolicyFlags = 0; // If this is the first time this log is opened, give an opportunity to // initialize its content. bool needInitialize(false); if (info.TotalContainers == 0) { // New log; set the configured container size and create the // initial set of containers. logPolicy.PolicyType = ClfsMgmtPolicyNewContainerSize; logPolicy.PolicyParameters.NewContainerSize.SizeInBytes = containerSize; ok = ::InstallLogPolicy(handle, &logPolicy); QPID_WINDOWS_CHECK_NOT(ok, 0); ULONGLONG desired(params.containers), actual(0); ok = ::SetLogFileSizeWithPolicy(handle, &desired, &actual); QPID_WINDOWS_CHECK_NOT(ok, 0); needInitialize = true; } // Ensure that the log is extended as needed and will shrink when 50% // becomes unused. logPolicy.PolicyType = ClfsMgmtPolicyAutoGrow; logPolicy.PolicyParameters.AutoGrow.Enabled = 1; ok = ::InstallLogPolicy(handle, &logPolicy); QPID_WINDOWS_CHECK_NOT(ok, 0); logPolicy.PolicyType = ClfsMgmtPolicyAutoShrink; logPolicy.PolicyParameters.AutoShrink.Percentage = params.shrinkPct; ok = ::InstallLogPolicy(handle, &logPolicy); QPID_WINDOWS_CHECK_NOT(ok, 0); // Need a marshaling area ok = ::CreateLogMarshallingArea(handle, NULL, NULL, NULL, // Alloc, free, context marshallingBufferSize(), params.maxWriteBuffers, 1, // Max read buffers &marshal); QPID_WINDOWS_CHECK_NOT(ok, 0); if (needInitialize) initialize(); } uint32_t Log::marshallingBufferSize() { // Default implementation returns the minimum marshalling buffer size; // derived ones should come up with a more fitting value. // // Find the directory name part of the log specification, including the // trailing '\'. size_t dirMarker = logPath.rfind('\\'); if (dirMarker == std::string::npos) dirMarker = logPath.rfind('/'); DWORD bytesPerSector; DWORD dontCare; ::GetDiskFreeSpace(logPath.substr(0, dirMarker).c_str(), &dontCare, &bytesPerSector, &dontCare, &dontCare); return bytesPerSector; } CLFS_LSN Log::write(void* entry, uint32_t length, CLFS_LSN* prev) { CLFS_WRITE_ENTRY desc; desc.Buffer = entry; desc.ByteLength = length; CLFS_LSN lsn; BOOL ok = ::ReserveAndAppendLog(marshal, &desc, 1, // Buffer descriptor 0, prev, // Undo-Next, Prev 0, 0, // Reservation CLFS_FLAG_FORCE_FLUSH, &lsn, 0); QPID_WINDOWS_CHECK_NOT(ok, 0); return lsn; } // Get the current base LSN of the log. CLFS_LSN Log::getBase() { CLFS_INFORMATION info; ULONG infoSize = sizeof(info); BOOL ok = ::GetLogFileInformation(handle, &info, &infoSize); QPID_WINDOWS_CHECK_NOT(ok, 0); return info.BaseLsn; } void Log::moveTail(const CLFS_LSN& oldest) { BOOL ok = ::AdvanceLogBase(marshal, const_cast(&oldest), 0, NULL); // If multiple threads are manipulating things they may get out of // order when moving the tail; if someone already moved it further // than this, it's ok - ignore it. if (ok || ::GetLastError() == ERROR_LOG_START_OF_LOG) return; QPID_WINDOWS_CHECK_NOT(ok, 0); } }}} // namespace qpid::store::ms_clfs qpidc-0.16/src/qpid/store/ms-clfs/MessageLog.h0000664000076400007640000001012411462576523021570 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSCLFS_MESSAGELOG_H #define QPID_STORE_MSCLFS_MESSAGELOG_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include "Log.h" namespace qpid { namespace store { namespace ms_clfs { /** * @class MessageLog * * Represents a CLFS-housed message log. */ class MessageLog : public Log { protected: // Message log needs to have a no-op first record written in the log // to ensure that no real message gets an ID 0. virtual void initialize(); public: // Inherited and reimplemented from Log. Figure the minimum marshalling // buffer size needed for the records this class writes. virtual uint32_t marshallingBufferSize(); // Add the specified message to the log; Return the persistence Id. uint64_t add(const boost::intrusive_ptr& msg); // Write a Delete entry for messageId. If newFirstId is not 0, it is now // the earliest valid message in the log, so move the tail up to it. void deleteMessage(uint64_t messageId, uint64_t newFirstId); // Load part or all of a message's content from previously stored // log record(s). void loadContent(uint64_t messageId, std::string& data, uint64_t offset, uint32_t length); // Enqueue and dequeue operations track messages' transit across // queues; each operation may be associated with a transaction. If // the transactionId is 0 the operation is not associated with a // transaction. void recordEnqueue (uint64_t messageId, uint64_t queueId, uint64_t transactionId); void recordDequeue (uint64_t messageId, uint64_t queueId, uint64_t transactionId); // Recover the messages and their queueing records from the log. // @param recoverer Recovery manager used to recreate broker objects from // encoded framing buffers recovered from the log. // @param messageMap This method fills in the map of id -> ptr of // recovered messages. // @param messageOps This method fills in the map of msg id -> // vector of operations involving the message that were // recovered from the log. It is the caller's // responsibility to sort the operations out and // ascertain which operations should be acted on. The // order of operations in the vector is as they were // read in order from the log. typedef enum { RECOVERED_ENQUEUE = 1, RECOVERED_DEQUEUE } RecoveredOpType; struct RecoveredMsgOp { RecoveredOpType op; uint64_t queueId; uint64_t txnId; RecoveredMsgOp(RecoveredOpType o, const uint64_t& q, const uint64_t& t) : op(o), queueId(q), txnId(t) {} }; void recover(qpid::broker::RecoveryManager& recoverer, qpid::store::MessageMap& messageMap, std::map >& messageOps); }; }}} // namespace qpid::store::ms_clfs #endif /* QPID_STORE_MSCLFS_MESSAGELOG_H */ qpidc-0.16/src/qpid/store/ms-clfs/TransactionLog.h0000664000076400007640000000745011462576523022501 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSCLFS_TRANSACTIONLOG_H #define QPID_STORE_MSCLFS_TRANSACTIONLOG_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include "Log.h" namespace qpid { namespace store { namespace ms_clfs { class Transaction; class TPCTransaction; /** * @class TransactionLog * * Represents a CLFS-housed transaction log. */ class TransactionLog : public Log, public boost::enable_shared_from_this { // To know when it's ok to move the log tail the lowest valid Id must // always be known. Keep track of valid Ids here. These are transactions // which have not yet been Deleted in the log. They may be new, in progress, // prepared, committed, or aborted - but not deleted. // Entries corresponding to not-yet-finalized transactions (i.e., open or // prepared) also have a weak_ptr so the Transaction can be accessed. // This is primarily to check its state and get a list of prepared Xids. std::map > validIds; qpid::sys::Mutex idsLock; protected: // Transaction log needs to have a no-op first record written in the log // to ensure that no real transaction gets an ID 0; messages think trans // id 0 means "no transaction." virtual void initialize(); public: // Inherited and reimplemented from Log. Figure the minimum marshalling // buffer size needed for the records this class writes. virtual uint32_t marshallingBufferSize(); typedef boost::shared_ptr shared_ptr; // Get a new Transaction boost::shared_ptr begin(); // Get a new TPCTransaction boost::shared_ptr begin(const std::string& xid); void recordPrepare(uint64_t transId); void recordCommit(uint64_t transId); void recordAbort(uint64_t transId); void deleteTransaction(uint64_t transId); // Fill @arg preparedMap with Xid->TPCTransaction::shared_ptr for all // currently prepared transactions. void collectPreparedXids(std::map >& preparedMap); // Recover the transactions and their state from the log. // Every non-deleted transaction recovered from the log will be // represented in @arg transMap. The recovering messages can use this // information to tell if a transaction referred to in an enqueue/dequeue // operation should be recovered or dropped by examining transaction state. // // @param recoverer Recovery manager used to recreate broker objects from // entries recovered from the log. // @param transMap This method fills in the map of id -> shared_ptr of // recovered transactions. void recover(std::map >& transMap); }; }}} // namespace qpid::store::ms_clfs #endif /* QPID_STORE_MSCLFS_TRANSACTIONLOG_H */ qpidc-0.16/src/qpid/store/ms-clfs/Messages.cpp0000664000076400007640000004563311467337576021671 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "Messages.h" #include "Lsn.h" #include "qpid/store/StoreException.h" #include namespace qpid { namespace store { namespace ms_clfs { void Messages::openLog(const std::string& path, const Log::TuningParameters& params) { log.open (path, params); } void Messages::add(const boost::intrusive_ptr& msg) { uint64_t id = log.add(msg); msg->setPersistenceId(id); std::auto_ptr autom(new MessageInfo); MessageInfo::shared_ptr m(autom); std::pair p(id, m); { qpid::sys::ScopedWlock l(lock); messages.insert(p); // If there's only this one message there, move the tail to it. // This prevents the log from continually growing when messages // are added and removed one at a time. if (messages.size() == 1) { CLFS_LSN newTail = idToLsn(id); log.moveTail(newTail); } } } void Messages::enqueue(uint64_t msgId, uint64_t queueId, Transaction::shared_ptr& t) { MessageInfo::shared_ptr p; { qpid::sys::ScopedRlock l(lock); MessageMap::const_iterator i = messages.find(msgId); if (i == messages.end()) THROW_STORE_EXCEPTION("Message does not exist"); p = i->second; } MessageInfo::Location loc(queueId, t, MessageInfo::TRANSACTION_ENQUEUE); { qpid::sys::ScopedLock l(p->whereLock); p->where.push_back(loc); uint64_t transactionId = 0; if (t.get() != 0) { transactionId = t->getId(); t->enroll(msgId); } try { log.recordEnqueue(msgId, queueId, transactionId); } catch (...) { // Undo the record-keeping if the log wasn't written correctly. if (transactionId != 0) t->unenroll(msgId); p->where.pop_back(); throw; } } } void Messages::dequeue(uint64_t msgId, uint64_t queueId, Transaction::shared_ptr& t) { MessageInfo::shared_ptr p; { qpid::sys::ScopedRlock l(lock); MessageMap::const_iterator i = messages.find(msgId); if (i == messages.end()) THROW_STORE_EXCEPTION("Message does not exist"); p = i->second; } { // Locate the 'where' entry for the specified queue. Once this operation // is recorded in the log, update the 'where' entry to reflect it. // Note that an existing entry in 'where' that refers to a transaction // is not eligible for this operation. qpid::sys::ScopedLock l(p->whereLock); std::list::iterator i; for (i = p->where.begin(); i != p->where.end(); ++i) { if (i->queueId == queueId && i->transaction.get() == 0) break; } if (i == p->where.end()) THROW_STORE_EXCEPTION("Message not on queue"); uint64_t transactionId = 0; if (t.get() != 0) { transactionId = t->getId(); t->enroll(msgId); } try { log.recordDequeue(msgId, queueId, transactionId); } catch (...) { // Undo the record-keeping if the log wasn't written correctly. if (transactionId != 0) t->unenroll(msgId); throw; } // Ok, logged successfully. If this is a transactional op, note // the transaction. If non-transactional, remove the 'where' entry. if (transactionId != 0) { i->transaction = t; i->disposition = MessageInfo::TRANSACTION_DEQUEUE; } else { p->where.erase(i); // If the message doesn't exist on any other queues, remove it. if (p->where.empty()) remove(msgId); } } } // Commit a previous provisional enqueue or dequeue of a particular message // actions under a specified transaction. If this results in the message's // being removed from all queues, it is deleted. void Messages::commit(uint64_t msgId, Transaction::shared_ptr& t) { MessageInfo::shared_ptr p; { qpid::sys::ScopedRlock l(lock); MessageMap::const_iterator i = messages.find(msgId); if (i == messages.end()) THROW_STORE_EXCEPTION("Message does not exist"); p = i->second; } { qpid::sys::ScopedLock l(p->whereLock); std::list::iterator i; for (i = p->where.begin(); i != p->where.end(); ++i) { if (i->transaction != t) continue; // Transactional dequeues can now remove the item from the // where list; enqueues just clear the transaction reference. if (i->disposition == MessageInfo::TRANSACTION_DEQUEUE) i = p->where.erase(i); else i->transaction.reset(); } } // If committing results in this message having no further enqueue // references, delete it. If the delete fails, swallow the exception // and let recovery take care of removing it later. if (p->where.empty()) { try { remove(msgId); } catch(...) {} } } // Abort a previous provisional enqueue or dequeue of a particular message // actions under a specified transaction. If this results in the message's // being removed from all queues, it is deleted. void Messages::abort(uint64_t msgId, Transaction::shared_ptr& t) { MessageInfo::shared_ptr p; { qpid::sys::ScopedRlock l(lock); MessageMap::const_iterator i = messages.find(msgId); if (i == messages.end()) THROW_STORE_EXCEPTION("Message does not exist"); p = i->second; } { qpid::sys::ScopedLock l(p->whereLock); std::list::iterator i = p->where.begin(); while (i != p->where.end()) { if (i->transaction != t) { ++i; continue; } // Aborted transactional dequeues result in the message remaining // enqueued like before the operation; enqueues clear the // message from the where list - like the enqueue never happened. if (i->disposition == MessageInfo::TRANSACTION_ENQUEUE) i = p->where.erase(i); else { i->transaction.reset(); ++i; } } } // If aborting results in this message having no further enqueue // references, delete it. If the delete fails, swallow the exception // and let recovery take care of removing it later. if (p->where.empty()) { try { remove(msgId); } catch(...) {} } } // Load part or all of a message's content from previously stored // log record(s). void Messages::loadContent(uint64_t msgId, std::string& data, uint64_t offset, uint32_t length) { log.loadContent(msgId, data, offset, length); } // Recover the current set of messages and where they're queued from // the log. void Messages::recover(qpid::broker::RecoveryManager& recoverer, const std::set &validQueues, const std::map& transMap, qpid::store::MessageMap& messageMap, qpid::store::MessageQueueMap& messageQueueMap) { std::map > messageOps; log.recover(recoverer, messageMap, messageOps); // Now read through the messageOps replaying the operations with the // knowledge of which transactions committed, aborted, etc. A transaction // should not be deleted until there are no messages referencing it so // a message operation with a transaction id not found in transMap is // a serious problem. QPID_LOG(debug, "Beginning CLFS-recovered message operation replay"); // Keep track of any messages that are recovered from the log but don't // have any place to be. This can happen, for example, if the broker // crashes while logging a message deletion. After all the recovery is // done, delete all the homeless messages. std::vector homeless; std::map >::const_iterator msg; for (msg = messageOps.begin(); msg != messageOps.end(); ++msg) { uint64_t msgId = msg->first; const std::vector& ops = msg->second; QPID_LOG(debug, "Message " << msgId << "; " << ops.size() << " op(s)"); MessageInfo::shared_ptr m(new MessageInfo); std::vector& entries = messageQueueMap[msgId]; std::vector::const_iterator op; for (op = ops.begin(); op != ops.end(); ++op) { QueueEntry entry(op->queueId); MessageInfo::Location loc(op->queueId); std::string dir = op->op == MessageLog::RECOVERED_ENQUEUE ? "enqueue" : "dequeue"; if (validQueues.find(op->queueId) == validQueues.end()) { QPID_LOG(info, "Message " << msgId << dir << " on non-existant queue " << op->queueId << "; dropped"); continue; } if (op->txnId != 0) { // Be sure to enroll this message in the transaction even if // it has committed or aborted. This ensures that the // transaction isn't removed from the log while finalizing the // recovery. If it were to be removed and the broker failed // again before removing this message during normal operation, // it couldn't be recovered again. // // Recall what is being reconstructed; 2 things: // 1. This class's 'messages' list which keeps track // of the queues each message is on and the transactions // each message is enrolled in. For this, aborted // transactions cause the result of the operation to be // ignored, but the message does need to be enrolled in // the transaction to properly maintain the transaction // references until the message is deleted. // 2. The StorageProvider's MessageQueueMap, which also // has an entry for each queue each message is on and // its TPL status and associated xid. const Transaction::shared_ptr &t = transMap.find(op->txnId)->second; // Prepared transactions cause the operation to be // provisionally acted on, and the message to be enrolled in // the transaction for when it commits/aborts. This is // noted in the QueueEntry for the StorageProvider's map. if (t->getState() == Transaction::TRANS_PREPARED) { QPID_LOG(debug, dir << " for queue " << op->queueId << ", prepared txn " << op->txnId); TPCTransaction::shared_ptr tpct(boost::dynamic_pointer_cast(t)); if (tpct.get() == 0) THROW_STORE_EXCEPTION("Invalid transaction state"); t->enroll(msgId); entry.xid = tpct->getXid(); loc.transaction = t; if (op->op == MessageLog::RECOVERED_ENQUEUE) { entry.tplStatus = QueueEntry::ADDING; loc.disposition = MessageInfo::TRANSACTION_ENQUEUE; } else { entry.tplStatus = QueueEntry::REMOVING; loc.disposition = MessageInfo::TRANSACTION_DEQUEUE; } } else if (t->getState() != Transaction::TRANS_COMMITTED) { QPID_LOG(debug, dir << " for queue " << op->queueId << ", txn " << op->txnId << ", rolling back"); continue; } } // Here for non-transactional and prepared transactional operations // to set up the messageQueueMap entries. Note that at this point // a committed transactional operation looks like a // non-transactional one as far as the QueueEntry is // concerned - just do it. If this is an entry enqueuing a // message, just add it to the entries list. If it's a dequeue // operation, locate the matching entry for the queue and delete // it if the current op is non-transactional; if it's a prepared // transaction then replace the existing entry with the current // one that notes the message is enqueued but being removed under // a prepared transaction. QPID_LOG(debug, dir + " at queue " << entry.queueId); if (op->op == MessageLog::RECOVERED_ENQUEUE) { entries.push_back(entry); m->where.push_back(loc); } else { std::vector::iterator i = entries.begin(); while (i != entries.end()) { if (i->queueId == entry.queueId) { if (entry.tplStatus != QueueEntry::NONE) *i = entry; else entries.erase(i); break; } ++i; } std::list::iterator w = m->where.begin(); while (w != m->where.end()) { if (w->queueId == loc.queueId) { if (loc.transaction.get() != 0) { *w = loc; ++w; } else { w = m->where.erase(w); } } } } } // Now that all the queue entries have been set correctly, see if // there are any entries; they may have all been removed during // recovery. If there are none, add this message to the homeless // list to be deleted from the log after the recovery is done. if (m->where.size() == 0) { homeless.push_back(msgId); messageMap.erase(msgId); messageQueueMap.erase(msgId); } else { std::pair p(msgId, m); messages.insert(p); } } QPID_LOG(debug, "Message log recovery done."); // Done! Ok, go back and delete all the homeless messages. BOOST_FOREACH(uint64_t msg, homeless) { QPID_LOG(debug, "Deleting homeless message " << msg); remove(msg); } } // Expunge is called when a queue is deleted. All references to that // queue must be expunged from all messages. 'Dequeue' log records are // written for each queue entry removed, but any errors are swallowed. // On recovery there's a list of valid queues passed in. The deleted // queue will not be on that list so if any references to it are // recovered they'll get weeded out then. void Messages::expunge(uint64_t queueId) { std::vector toBeDeleted; // Messages to be deleted later. { // Lock everybody out since all messages are possibly in play. // There also may be other threads already working on particular // messages so individual message mutex still must be acquired. qpid::sys::ScopedWlock l(lock); MessageMap::iterator m; for (m = messages.begin(); m != messages.end(); ++m) { MessageInfo::shared_ptr p = m->second; { qpid::sys::ScopedLock ml(p->whereLock); std::list::iterator i = p->where.begin(); while (i != p->where.end()) { if (i->queueId != queueId) { ++i; continue; } // If this entry is involved in a transaction, unenroll it. // Then remove the entry. if (i->transaction.get() != 0) i->transaction->unenroll(m->first); i = p->where.erase(i); try { log.recordDequeue(m->first, queueId, 0); } catch(...) { } } if (p->where.size() == 0) toBeDeleted.push_back(m->first); } } } // Swallow any exceptions during this; don't care. Recover it later // if needed. try { BOOST_FOREACH(uint64_t msg, toBeDeleted) remove(msg); } catch(...) { } } // Remove a specified message from those controlled by this object. void Messages::remove(uint64_t messageId) { uint64_t newFirstId = 0; { qpid::sys::ScopedWlock l(lock); messages.erase(messageId); // May have deleted the first entry; if so the log can release that. // If this message being deleted results in an empty list of // messages, move the tail up to this message's LSN. This may // result in one or more messages being stranded in the log // until there's more activity. If a restart happens while these // unneeded log records are there, the presence of the MessageDelete // entry will cause the message(s) to be ignored anyway. if (messages.empty()) newFirstId = messageId; else if (messages.begin()->first > messageId) newFirstId = messages.begin()->first; } log.deleteMessage(messageId, newFirstId); } }}} // namespace qpid::store::ms_clfs qpidc-0.16/src/qpid/store/ms-clfs/Log.h0000664000076400007640000000411511465077530020263 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSCLFS_LOG_H #define QPID_STORE_MSCLFS_LOG_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include namespace qpid { namespace store { namespace ms_clfs { /** * @class Log * * Represents a CLFS-housed log. */ class Log { protected: HANDLE handle; ULONGLONG containerSize; std::string logPath; PVOID marshal; // Give subclasses a chance to initialize a new log. Called after a new // log is created, initial set of containers is added, and marshalling // area is allocated. virtual void initialize() {} public: struct TuningParameters { size_t containerSize; unsigned short containers; unsigned short shrinkPct; uint32_t maxWriteBuffers; }; Log() : handle(INVALID_HANDLE_VALUE), containerSize(0), marshal(0) {} virtual ~Log(); void open(const std::string& path, const TuningParameters& params); virtual uint32_t marshallingBufferSize(); CLFS_LSN write(void* entry, uint32_t length, CLFS_LSN* prev = 0); // Get the current base LSN of the log. CLFS_LSN getBase(); // Move the log tail to the indicated LSN. void moveTail(const CLFS_LSN& oldest); }; }}} // namespace qpid::store::ms_clfs #endif /* QPID_STORE_MSCLFS_LOG_H */ qpidc-0.16/src/qpid/store/ms-clfs/Messages.h0000664000076400007640000001317711464634432021320 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSCLFS_MESSAGES_H #define QPID_STORE_MSCLFS_MESSAGES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include "MessageLog.h" #include "Transaction.h" namespace qpid { namespace store { namespace ms_clfs { class Messages { struct MessageInfo { // How many queues this message is on, whether actually (non-transacted) // or provisionally (included in a non-yet-committed transaction). volatile LONG enqueuedCount; // Keep a list of transactional operations this message is // referenced in. When the transaction changes/finalizes these all // need to be acted on. typedef enum { TRANSACTION_NONE = 0, TRANSACTION_ENQUEUE, TRANSACTION_DEQUEUE } TransType; #if 0 std::map > transOps; qpid::sys::Mutex transOpsLock; #endif // Think what I need is a list of "where is this message" - queue id, // transaction ref, what kind of trans op (enq/deq). Then "remove all // queue refs" can search through all messages looking for queue ids // and undo them. Write "remove from queue" record to log. Also need to // add "remove from queue" to recovery. struct Location { uint64_t queueId; Transaction::shared_ptr transaction; TransType disposition; Location(uint64_t q) : queueId(q), transaction(), disposition(TRANSACTION_NONE) {} Location(uint64_t q, Transaction::shared_ptr& t, TransType d) : queueId(q), transaction(t), disposition(d) {} }; qpid::sys::Mutex whereLock; std::list where; // The transactions vector just keeps a shared_ptr to each // Transaction this message was involved in, regardless of the // disposition or transaction state. Keeping a valid shared_ptr // prevents the Transaction from being deleted. As long as there // are any messages that referred to a transaction, that // transaction's state needs to be known so the message disposition // can be correctly recovered if needed. std::vector transactions; typedef boost::shared_ptr shared_ptr; MessageInfo() : enqueuedCount(0) {} }; qpid::sys::RWlock lock; typedef std::map MessageMap; MessageMap messages; MessageLog log; // Remove a specified message from those controlled by this object. void remove(uint64_t messageId); public: void openLog(const std::string& path, const Log::TuningParameters& params); // Add the specified message to the log and list of known messages. // Upon successful return the message's persistenceId is set. void add(const boost::intrusive_ptr& msg); // Add the specified queue to the message's list of places it is // enqueued. void enqueue(uint64_t msgId, uint64_t queueId, Transaction::shared_ptr& t); // Remove the specified queue from the message's list of places it is // enqueued. If there are no other queues holding the message, it is // deleted. void dequeue(uint64_t msgId, uint64_t queueId, Transaction::shared_ptr& t); // Commit a previous provisional enqueue or dequeue of a particular message // actions under a specified transaction. If this results in the message's // being removed from all queues, it is deleted. void commit(uint64_t msgId, Transaction::shared_ptr& transaction); // Abort a previous provisional enqueue or dequeue of a particular message // actions under a specified transaction. If this results in the message's // being removed from all queues, it is deleted. void abort(uint64_t msgId, Transaction::shared_ptr& transaction); // Load part or all of a message's content from previously stored // log record(s). void loadContent(uint64_t msgId, std::string& data, uint64_t offset, uint32_t length); // Expunge is called when a queue is deleted. All references to that // queue must be expunged from all messages. void expunge(uint64_t queueId); // Recover the current set of messages and where they're queued from // the log. void recover(qpid::broker::RecoveryManager& recoverer, const std::set &validQueues, const std::map& transMap, qpid::store::MessageMap& messageMap, qpid::store::MessageQueueMap& messageQueueMap); }; }}} // namespace qpid::store::ms_clfs #endif /* QPID_STORE_MSCLFS_MESSAGES_H */ qpidc-0.16/src/qpid/store/ms-clfs/Lsn.h0000664000076400007640000000225011460144014020257 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSCLFS_LSN_H #define QPID_STORE_MSCLFS_LSN_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace { // Make it easy to assign LSNs inline CLFS_LSN idToLsn(const uint64_t val) { CLFS_LSN lsn; lsn.Internal = val; return lsn; } inline uint64_t lsnToId(const CLFS_LSN& lsn) { uint64_t val = lsn.Internal; return val; } } #endif /* QPID_STORE_MSCLFS_LSN_H */ qpidc-0.16/src/qpid/store/ms-clfs/MSSqlClfsProvider.cpp0000664000076400007640000011250511465077530023422 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // From ms-sql... #include "BlobAdapter.h" #include "BlobRecordset.h" #include "BindingRecordset.h" #include "DatabaseConnection.h" #include "Exception.h" #include "State.h" #include "VariantHelper.h" using qpid::store::ms_sql::BlobAdapter; using qpid::store::ms_sql::BlobRecordset; using qpid::store::ms_sql::BindingRecordset; using qpid::store::ms_sql::DatabaseConnection; using qpid::store::ms_sql::ADOException; using qpid::store::ms_sql::State; using qpid::store::ms_sql::VariantHelper; #include "Log.h" #include "Messages.h" #include "Transaction.h" #include "TransactionLog.h" // Bring in ADO 2.8 (yes, I know it says "15", but that's it...) #import "C:\Program Files\Common Files\System\ado\msado15.dll" \ no_namespace rename("EOF", "EndOfFile") #include namespace { inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);}; // Table names const std::string TblBinding("tblBinding"); const std::string TblConfig("tblConfig"); const std::string TblExchange("tblExchange"); const std::string TblQueue("tblQueue"); } namespace qpid { namespace store { namespace ms_clfs { /** * @class MSSqlClfsProvider * * Implements a qpid::store::StorageProvider that uses a hybrid Microsoft * SQL Server and Windows CLFS approach as the backend data store for Qpid. */ class MSSqlClfsProvider : public qpid::store::StorageProvider { protected: void finalizeMe(); void dump(); public: MSSqlClfsProvider(); ~MSSqlClfsProvider(); virtual qpid::Options* getOptions() { return &options; } virtual void earlyInitialize (Plugin::Target& target); virtual void initialize(Plugin::Target& target); /** * Receive notification that this provider is the one that will actively * handle provider storage for the target. If the provider is to be used, * this method will be called after earlyInitialize() and before any * recovery operations (recovery, in turn, precedes call to initialize()). */ virtual void activate(MessageStorePlugin &store); /** * @name Methods inherited from qpid::broker::MessageStore */ //@{ /** * If called after init() but before recovery, will discard the database * and reinitialize using an empty store dir. If @a pushDownStoreFiles * is true, the content of the store dir will be moved to a backup dir * inside the store dir. This is used when cluster nodes recover and must * get their content from a cluster sync rather than directly from the * store. * * @param pushDownStoreFiles If true, will move content of the store dir * into a subdir, leaving the store dir * otherwise empty. */ virtual void truncateInit(const bool pushDownStoreFiles = false); /** * Record the existence of a durable queue */ virtual void create(PersistableQueue& queue, const qpid::framing::FieldTable& args); /** * Destroy a durable queue */ virtual void destroy(PersistableQueue& queue); /** * Record the existence of a durable exchange */ virtual void create(const PersistableExchange& exchange, const qpid::framing::FieldTable& args); /** * Destroy a durable exchange */ virtual void destroy(const PersistableExchange& exchange); /** * Record a binding */ virtual void bind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args); /** * Forget a binding */ virtual void unbind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args); /** * Record generic durable configuration */ virtual void create(const PersistableConfig& config); /** * Destroy generic durable configuration */ virtual void destroy(const PersistableConfig& config); /** * Stores a messages before it has been enqueued * (enqueueing automatically stores the message so this is * only required if storage is required prior to that * point). If the message has not yet been stored it will * store the headers as well as any content passed in. A * persistence id will be set on the message which can be * used to load the content or to append to it. */ virtual void stage(const boost::intrusive_ptr& msg); /** * Destroys a previously staged message. This only needs * to be called if the message is never enqueued. (Once * enqueued, deletion will be automatic when the message * is dequeued from all queues it was enqueued onto). */ virtual void destroy(PersistableMessage& msg); /** * Appends content to a previously staged message */ virtual void appendContent(const boost::intrusive_ptr& msg, const std::string& data); /** * Loads (a section) of content data for the specified * message (previously stored through a call to stage or * enqueue) into data. The offset refers to the content * only (i.e. an offset of 0 implies that the start of the * content should be loaded, not the headers or related * meta-data). */ virtual void loadContent(const qpid::broker::PersistableQueue& queue, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length); /** * Enqueues a message, storing the message if it has not * been previously stored and recording that the given * message is on the given queue. * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param msg the message to enqueue * @param queue the name of the queue onto which it is to be enqueued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void enqueue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue); /** * Dequeues a message, recording that the given message is * no longer on the given queue and deleting the message * if it is no longer on any other queue. * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param msg the message to dequeue * @param queue the name of the queue from which it is to be dequeued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void dequeue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue); /** * Flushes all async messages to disk for the specified queue * * Note: this is a no-op for this provider. * * @param queue the name of the queue from which it is to be dequeued */ virtual void flush(const PersistableQueue& queue) {}; /** * Returns the number of outstanding AIO's for a given queue * * If 0, than all the enqueue / dequeues have been stored * to disk * * @param queue the name of the queue to check for outstanding AIO */ virtual uint32_t outstandingQueueAIO(const PersistableQueue& queue) {return 0;} //@} /** * @name Methods inherited from qpid::broker::TransactionalStore */ //@{ virtual std::auto_ptr begin(); virtual std::auto_ptr begin(const std::string& xid); virtual void prepare(qpid::broker::TPCTransactionContext& txn); virtual void commit(qpid::broker::TransactionContext& txn); virtual void abort(qpid::broker::TransactionContext& txn); virtual void collectPreparedXids(std::set& xids); //@} virtual void recoverConfigs(qpid::broker::RecoveryManager& recoverer); virtual void recoverExchanges(qpid::broker::RecoveryManager& recoverer, ExchangeMap& exchangeMap); virtual void recoverQueues(qpid::broker::RecoveryManager& recoverer, QueueMap& queueMap); virtual void recoverBindings(qpid::broker::RecoveryManager& recoverer, const ExchangeMap& exchangeMap, const QueueMap& queueMap); virtual void recoverMessages(qpid::broker::RecoveryManager& recoverer, MessageMap& messageMap, MessageQueueMap& messageQueueMap); virtual void recoverTransactions(qpid::broker::RecoveryManager& recoverer, PreparedTransactionMap& dtxMap); private: struct ProviderOptions : public qpid::Options { std::string connectString; std::string catalogName; std::string storeDir; size_t containerSize; unsigned short initialContainers; uint32_t maxWriteBuffers; ProviderOptions(const std::string &name) : qpid::Options(name), catalogName("QpidStore"), containerSize(1024 * 1024), initialContainers(2), maxWriteBuffers(10) { const enum { NAMELEN = MAX_COMPUTERNAME_LENGTH + 1 }; TCHAR myName[NAMELEN]; DWORD myNameLen = NAMELEN; GetComputerName(myName, &myNameLen); connectString = "Data Source="; connectString += myName; connectString += "\\SQLEXPRESS;Integrated Security=SSPI"; addOptions() ("connect", qpid::optValue(connectString, "STRING"), "Connection string for the database to use. Will prepend " "Provider=SQLOLEDB;") ("catalog", qpid::optValue(catalogName, "DB NAME"), "Catalog (database) name") ("store-dir", qpid::optValue(storeDir, "DIR"), "Location to store message and transaction data " "(default uses data-dir if available)") ("container-size", qpid::optValue(containerSize, "VALUE"), "Bytes per container; min 512K. Only used when creating " "a new log") ("initial-containers", qpid::optValue(initialContainers, "VALUE"), "Number of containers to add if creating a new log") ("max-write-buffers", qpid::optValue(maxWriteBuffers, "VALUE"), "Maximum write buffers outstanding before log is flushed " "(0 means no limit)") ; } }; ProviderOptions options; std::string brokerDataDir; Messages messages; // TransactionLog requires itself to have a shared_ptr reference to start. TransactionLog::shared_ptr transactions; // Each thread has a separate connection to the database and also needs // to manage its COM initialize/finalize individually. This is done by // keeping a thread-specific State. boost::thread_specific_ptr dbState; State *initState(); DatabaseConnection *initConnection(void); void createDb(DatabaseConnection *db, const std::string &name); void createLogs(); }; static MSSqlClfsProvider static_instance_registers_plugin; void MSSqlClfsProvider::finalizeMe() { dbState.reset(); } MSSqlClfsProvider::MSSqlClfsProvider() : options("MS SQL/CLFS Provider options") { transactions = boost::make_shared(); } MSSqlClfsProvider::~MSSqlClfsProvider() { } void MSSqlClfsProvider::earlyInitialize(Plugin::Target &target) { MessageStorePlugin *store = dynamic_cast(&target); if (store) { // Check the store dir option; if not specified, need to // grab the broker's data dir. if (options.storeDir.empty()) { DataDir& dir = store->getBroker()->getDataDir(); if (dir.isEnabled()) { options.storeDir = dir.getPath(); } else { QPID_LOG(error, "MSSQL-CLFS: --store-dir required if --no-data-dir specified"); return; } } // If CLFS is not available on this system, give up now. try { Log::TuningParameters params; params.containerSize = options.containerSize; params.containers = options.initialContainers; params.shrinkPct = 50; params.maxWriteBuffers = options.maxWriteBuffers; std::string msgPath = options.storeDir + "\\" + "messages"; messages.openLog(msgPath, params); std::string transPath = options.storeDir + "\\" + "transactions"; transactions->open(transPath, params); } catch (std::exception &e) { QPID_LOG(error, e.what()); return; } // If the database init fails, report it and don't register; give // the rest of the broker a chance to run. // // Don't try to initConnection() since that will fail if the // database doesn't exist. Instead, try to open a connection without // a database name, then search for the database. There's still a // chance this provider won't be selected for the store too, so be // be sure to close the database connection before return to avoid // leaving a connection up that will not be used. try { initState(); // This initializes COM std::auto_ptr db(new DatabaseConnection()); db->open(options.connectString, ""); _ConnectionPtr conn(*db); _RecordsetPtr pCatalogs = NULL; VariantHelper catalogName(options.catalogName); pCatalogs = conn->OpenSchema(adSchemaCatalogs, catalogName); if (pCatalogs->EndOfFile) { // Database doesn't exist; create it QPID_LOG(notice, "MSSQL-CLFS: Creating database " + options.catalogName); createDb(db.get(), options.catalogName); } else { QPID_LOG(notice, "MSSQL-CLFS: Database located: " + options.catalogName); } if (pCatalogs) { if (pCatalogs->State == adStateOpen) pCatalogs->Close(); pCatalogs = 0; } db->close(); store->providerAvailable("MSSQL-CLFS", this); } catch (qpid::Exception &e) { QPID_LOG(error, e.what()); return; } store->addFinalizer(boost::bind(&MSSqlClfsProvider::finalizeMe, this)); } } void MSSqlClfsProvider::initialize(Plugin::Target& target) { } void MSSqlClfsProvider::activate(MessageStorePlugin &store) { QPID_LOG(info, "MS SQL/CLFS Provider is up"); } void MSSqlClfsProvider::truncateInit(const bool pushDownStoreFiles) { } void MSSqlClfsProvider::create(PersistableQueue& queue, const qpid::framing::FieldTable& /*args needed for jrnl*/) { DatabaseConnection *db = initConnection(); BlobRecordset rsQueues; try { db->beginTransaction(); rsQueues.open(db, TblQueue); rsQueues.add(queue); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error creating queue " + queue.getName(), e, errs); } catch(std::exception& e) { db->rollbackTransaction(); THROW_STORE_EXCEPTION(e.what()); } } /** * Destroy a durable queue */ void MSSqlClfsProvider::destroy(PersistableQueue& queue) { DatabaseConnection *db = initConnection(); BlobRecordset rsQueues; BindingRecordset rsBindings; try { db->beginTransaction(); rsQueues.open(db, TblQueue); rsBindings.open(db, TblBinding); // Remove bindings first; the queue IDs can't be ripped out from // under the references in the bindings table. rsBindings.removeForQueue(queue.getPersistenceId()); rsQueues.remove(queue); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error deleting queue " + queue.getName(), e, errs); } /* * Now that the SQL stuff has recorded the queue deletion, expunge * all record of the queue from the messages set. Any errors logging * these removals are swallowed because during a recovery the queue * Id won't be present (the SQL stuff already committed) so any references * to it in message operations will be removed. */ messages.expunge(queue.getPersistenceId()); } /** * Record the existence of a durable exchange */ void MSSqlClfsProvider::create(const PersistableExchange& exchange, const qpid::framing::FieldTable& args) { DatabaseConnection *db = initConnection(); BlobRecordset rsExchanges; try { db->beginTransaction(); rsExchanges.open(db, TblExchange); rsExchanges.add(exchange); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error creating exchange " + exchange.getName(), e, errs); } } /** * Destroy a durable exchange */ void MSSqlClfsProvider::destroy(const PersistableExchange& exchange) { DatabaseConnection *db = initConnection(); BlobRecordset rsExchanges; BindingRecordset rsBindings; try { db->beginTransaction(); rsExchanges.open(db, TblExchange); rsBindings.open(db, TblBinding); // Remove bindings first; the exchange IDs can't be ripped out from // under the references in the bindings table. rsBindings.removeForExchange(exchange.getPersistenceId()); rsExchanges.remove(exchange); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error deleting exchange " + exchange.getName(), e, errs); } } /** * Record a binding */ void MSSqlClfsProvider::bind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args) { DatabaseConnection *db = initConnection(); BindingRecordset rsBindings; try { db->beginTransaction(); rsBindings.open(db, TblBinding); rsBindings.add(exchange.getPersistenceId(), queue.getPersistenceId(), key, args); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error binding exchange " + exchange.getName() + " to queue " + queue.getName(), e, errs); } } /** * Forget a binding */ void MSSqlClfsProvider::unbind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args) { DatabaseConnection *db = initConnection(); BindingRecordset rsBindings; try { db->beginTransaction(); rsBindings.open(db, TblBinding); rsBindings.remove(exchange.getPersistenceId(), queue.getPersistenceId(), key, args); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error unbinding exchange " + exchange.getName() + " from queue " + queue.getName(), e, errs); } } /** * Record generic durable configuration */ void MSSqlClfsProvider::create(const PersistableConfig& config) { DatabaseConnection *db = initConnection(); BlobRecordset rsConfigs; try { db->beginTransaction(); rsConfigs.open(db, TblConfig); rsConfigs.add(config); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error creating config " + config.getName(), e, errs); } } /** * Destroy generic durable configuration */ void MSSqlClfsProvider::destroy(const PersistableConfig& config) { DatabaseConnection *db = initConnection(); BlobRecordset rsConfigs; try { db->beginTransaction(); rsConfigs.open(db, TblConfig); rsConfigs.remove(config); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error deleting config " + config.getName(), e, errs); } } /** * Stores a messages before it has been enqueued * (enqueueing automatically stores the message so this is * only required if storage is required prior to that * point). If the message has not yet been stored it will * store the headers as well as any content passed in. A * persistence id will be set on the message which can be * used to load the content or to append to it. */ void MSSqlClfsProvider::stage(const boost::intrusive_ptr& msg) { #if 0 DatabaseConnection *db = initConnection(); MessageRecordset rsMessages; try { db->beginTransaction(); rsMessages.open(db, TblMessage); rsMessages.add(msg); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error staging message", e, errs); } #endif } /** * Destroys a previously staged message. This only needs * to be called if the message is never enqueued. (Once * enqueued, deletion will be automatic when the message * is dequeued from all queues it was enqueued onto). */ void MSSqlClfsProvider::destroy(PersistableMessage& msg) { #if 0 DatabaseConnection *db = initConnection(); BlobRecordset rsMessages; try { db->beginTransaction(); rsMessages.open(db, TblMessage); rsMessages.remove(msg); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error deleting message", e, errs); } #endif } /** * Appends content to a previously staged message */ void MSSqlClfsProvider::appendContent(const boost::intrusive_ptr& msg, const std::string& data) { #if 0 DatabaseConnection *db = initConnection(); MessageRecordset rsMessages; try { db->beginTransaction(); rsMessages.open(db, TblMessage); rsMessages.append(msg, data); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error appending to message", e, errs); } #endif } /** * Loads (a section) of content data for the specified * message (previously stored through a call to stage or * enqueue) into data. The offset refers to the content * only (i.e. an offset of 0 implies that the start of the * content should be loaded, not the headers or related * meta-data). */ void MSSqlClfsProvider::loadContent(const qpid::broker::PersistableQueue& /*queue*/, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length) { // Message log keeps all messages in one log, so we don't need the // queue reference. messages.loadContent(msg->getPersistenceId(), data, offset, length); } /** * Enqueues a message, storing the message if it has not * been previously stored and recording that the given * message is on the given queue. * * @param ctxt The transaction context under which this enqueue happens. * @param msg The message to enqueue * @param queue the name of the queue onto which it is to be enqueued */ void MSSqlClfsProvider::enqueue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue) { Transaction::shared_ptr t; TransactionContext *ctx = dynamic_cast(ctxt); if (ctx) t = ctx->getTransaction(); else { TPCTransactionContext *tctx; tctx = dynamic_cast(ctxt); if (tctx) t = tctx->getTransaction(); } uint64_t msgId = msg->getPersistenceId(); if (msgId == 0) { messages.add(msg); msgId = msg->getPersistenceId(); } messages.enqueue(msgId, queue.getPersistenceId(), t); msg->enqueueComplete(); } /** * Dequeues a message, recording that the given message is * no longer on the given queue and deleting the message * if it is no longer on any other queue. * * @param ctxt The transaction context under which this dequeue happens. * @param msg The message to dequeue * @param queue The queue from which it is to be dequeued */ void MSSqlClfsProvider::dequeue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue) { Transaction::shared_ptr t; TransactionContext *ctx = dynamic_cast(ctxt); if (ctx) t = ctx->getTransaction(); else { TPCTransactionContext *tctx; tctx = dynamic_cast(ctxt); if (tctx) t = tctx->getTransaction(); } messages.dequeue(msg->getPersistenceId(), queue.getPersistenceId(), t); msg->dequeueComplete(); } std::auto_ptr MSSqlClfsProvider::begin() { Transaction::shared_ptr t = transactions->begin(); std::auto_ptr tc(new TransactionContext(t)); return tc; } std::auto_ptr MSSqlClfsProvider::begin(const std::string& xid) { TPCTransaction::shared_ptr t = transactions->begin(xid); std::auto_ptr tc(new TPCTransactionContext(t)); return tc; } void MSSqlClfsProvider::prepare(qpid::broker::TPCTransactionContext& txn) { TPCTransactionContext *ctx = dynamic_cast (&txn); if (ctx == 0) throw qpid::broker::InvalidTransactionContextException(); ctx->getTransaction()->prepare(); } void MSSqlClfsProvider::commit(qpid::broker::TransactionContext& txn) { Transaction::shared_ptr t; TransactionContext *ctx = dynamic_cast(&txn); if (ctx) t = ctx->getTransaction(); else { TPCTransactionContext *tctx; tctx = dynamic_cast(&txn); if (tctx == 0) throw qpid::broker::InvalidTransactionContextException(); t = tctx->getTransaction(); } t->commit(messages); } void MSSqlClfsProvider::abort(qpid::broker::TransactionContext& txn) { Transaction::shared_ptr t; TransactionContext *ctx = dynamic_cast(&txn); if (ctx) t = ctx->getTransaction(); else { TPCTransactionContext *tctx; tctx = dynamic_cast(&txn); if (tctx == 0) throw qpid::broker::InvalidTransactionContextException(); t = tctx->getTransaction(); } t->abort(messages); } void MSSqlClfsProvider::collectPreparedXids(std::set& xids) { std::map preparedMap; transactions->collectPreparedXids(preparedMap); std::map::const_iterator i; for (i = preparedMap.begin(); i != preparedMap.end(); ++i) { xids.insert(i->first); } } // @TODO Much of this recovery code is way too similar... refactor to // a recover template method on BlobRecordset. void MSSqlClfsProvider::recoverConfigs(qpid::broker::RecoveryManager& recoverer) { DatabaseConnection *db = initConnection(); BlobRecordset rsConfigs; rsConfigs.open(db, TblConfig); _RecordsetPtr p = (_RecordsetPtr)rsConfigs; if (p->BOF && p->EndOfFile) return; // Nothing to do p->MoveFirst(); while (!p->EndOfFile) { uint64_t id = p->Fields->Item["persistenceId"]->Value; long blobSize = p->Fields->Item["fieldTableBlob"]->ActualSize; BlobAdapter blob(blobSize); blob = p->Fields->Item["fieldTableBlob"]->GetChunk(blobSize); // Recreate the Config instance and reset its ID. broker::RecoverableConfig::shared_ptr config = recoverer.recoverConfig(blob); config->setPersistenceId(id); p->MoveNext(); } } void MSSqlClfsProvider::recoverExchanges(qpid::broker::RecoveryManager& recoverer, ExchangeMap& exchangeMap) { DatabaseConnection *db = initConnection(); BlobRecordset rsExchanges; rsExchanges.open(db, TblExchange); _RecordsetPtr p = (_RecordsetPtr)rsExchanges; if (p->BOF && p->EndOfFile) return; // Nothing to do p->MoveFirst(); while (!p->EndOfFile) { uint64_t id = p->Fields->Item["persistenceId"]->Value; long blobSize = p->Fields->Item["fieldTableBlob"]->ActualSize; BlobAdapter blob(blobSize); blob = p->Fields->Item["fieldTableBlob"]->GetChunk(blobSize); // Recreate the Exchange instance, reset its ID, and remember the // ones restored for matching up when recovering bindings. broker::RecoverableExchange::shared_ptr exchange = recoverer.recoverExchange(blob); exchange->setPersistenceId(id); exchangeMap[id] = exchange; p->MoveNext(); } } void MSSqlClfsProvider::recoverQueues(qpid::broker::RecoveryManager& recoverer, QueueMap& queueMap) { DatabaseConnection *db = initConnection(); BlobRecordset rsQueues; rsQueues.open(db, TblQueue); _RecordsetPtr p = (_RecordsetPtr)rsQueues; if (p->BOF && p->EndOfFile) return; // Nothing to do p->MoveFirst(); while (!p->EndOfFile) { uint64_t id = p->Fields->Item["persistenceId"]->Value; long blobSize = p->Fields->Item["fieldTableBlob"]->ActualSize; BlobAdapter blob(blobSize); blob = p->Fields->Item["fieldTableBlob"]->GetChunk(blobSize); // Recreate the Queue instance and reset its ID. broker::RecoverableQueue::shared_ptr queue = recoverer.recoverQueue(blob); queue->setPersistenceId(id); queueMap[id] = queue; p->MoveNext(); } } void MSSqlClfsProvider::recoverBindings(qpid::broker::RecoveryManager& recoverer, const ExchangeMap& exchangeMap, const QueueMap& queueMap) { DatabaseConnection *db = initConnection(); BindingRecordset rsBindings; rsBindings.open(db, TblBinding); rsBindings.recover(recoverer, exchangeMap, queueMap); } void MSSqlClfsProvider::recoverMessages(qpid::broker::RecoveryManager& recoverer, MessageMap& messageMap, MessageQueueMap& messageQueueMap) { // Read the list of valid queue Ids to ensure that no broken msg->queue // refs get restored. DatabaseConnection *db = initConnection(); BlobRecordset rsQueues; rsQueues.open(db, TblQueue); _RecordsetPtr p = (_RecordsetPtr)rsQueues; std::set validQueues; if (!(p->BOF && p->EndOfFile)) { p->MoveFirst(); while (!p->EndOfFile) { uint64_t id = p->Fields->Item["persistenceId"]->Value; validQueues.insert(id); p->MoveNext(); } } std::map transMap; transactions->recover(transMap); messages.recover(recoverer, validQueues, transMap, messageMap, messageQueueMap); } void MSSqlClfsProvider::recoverTransactions(qpid::broker::RecoveryManager& recoverer, PreparedTransactionMap& dtxMap) { std::map preparedMap; transactions->collectPreparedXids(preparedMap); std::map::const_iterator i; for (i = preparedMap.begin(); i != preparedMap.end(); ++i) { std::auto_ptr ctx(new TPCTransactionContext(i->second)); std::auto_ptr brokerCtx(ctx); dtxMap[i->first] = recoverer.recoverTransaction(i->first, brokerCtx); } } ////////////// Internal Methods State * MSSqlClfsProvider::initState() { State *state = dbState.get(); // See if thread has initialized if (!state) { state = new State; dbState.reset(state); } return state; } DatabaseConnection * MSSqlClfsProvider::initConnection(void) { State *state = initState(); if (state->dbConn != 0) return state->dbConn; // And the DatabaseConnection is set up too std::auto_ptr db(new DatabaseConnection); db->open(options.connectString, options.catalogName); state->dbConn = db.release(); return state->dbConn; } void MSSqlClfsProvider::createDb(DatabaseConnection *db, const std::string &name) { const std::string dbCmd = "CREATE DATABASE " + name; const std::string useCmd = "USE " + name; const std::string tableCmd = "CREATE TABLE "; const std::string colSpecs = " (persistenceId bigint PRIMARY KEY NOT NULL IDENTITY(1,1)," " fieldTableBlob varbinary(MAX) NOT NULL)"; const std::string bindingSpecs = " (exchangeId bigint REFERENCES tblExchange(persistenceId) NOT NULL," " queueId bigint REFERENCES tblQueue(persistenceId) NOT NULL," " routingKey varchar(255)," " fieldTableBlob varbinary(MAX))"; _variant_t unused; _bstr_t dbStr = dbCmd.c_str(); _ConnectionPtr conn(*db); try { conn->Execute(dbStr, &unused, adExecuteNoRecords); _bstr_t useStr = useCmd.c_str(); conn->Execute(useStr, &unused, adExecuteNoRecords); std::string makeTable = tableCmd + TblQueue + colSpecs; _bstr_t makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); makeTable = tableCmd + TblExchange + colSpecs; makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); makeTable = tableCmd + TblConfig + colSpecs; makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); makeTable = tableCmd + TblBinding + bindingSpecs; makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); } catch(_com_error &e) { throw ADOException("MSSQL can't create " + name, e, db->getErrors()); } } void MSSqlClfsProvider::dump() { // dump all db records to qpid_log QPID_LOG(notice, "DB Dump: (not dumping anything)"); // rsQueues.dump(); } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-clfs/MessageLog.cpp0000664000076400007640000003553411462576523022137 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include "MessageLog.h" #include "Lsn.h" namespace { // Structures that hold log records. Each has a type field at the start. enum MessageEntryType { MessageStartEntry = 1, MessageChunkEntry = 2, MessageDeleteEntry = 3, MessageEnqueueEntry = 4, MessageDequeueEntry = 5 }; static const uint32_t MaxMessageContentLength = 64 * 1024; // Message-Start struct MessageStart { MessageEntryType type; // If the complete message encoding doesn't fit, remainder is in // MessageChunk records to follow. // headerLength is the size of the message's header in content. It is // part of the totalLength and the segmentLength. uint32_t headerLength; uint32_t totalLength; uint32_t segmentLength; char content[MaxMessageContentLength]; MessageStart() : type(MessageStartEntry), headerLength(0), totalLength(0), segmentLength(0) {} }; // Message-Chunk struct MessageChunk { MessageEntryType type; uint32_t segmentLength; char content[MaxMessageContentLength]; MessageChunk() : type(MessageChunkEntry), segmentLength(0) {} }; // Message-Delete struct MessageDelete { MessageEntryType type; MessageDelete() : type(MessageDeleteEntry) {} }; // Message-Enqueue struct MessageEnqueue { MessageEntryType type; uint64_t queueId; uint64_t transId; MessageEnqueue(uint64_t qId = 0, uint64_t tId = 0) : type(MessageEnqueueEntry), queueId(qId), transId(tId) {} }; // Message-Dequeue struct MessageDequeue { MessageEntryType type; uint64_t queueId; uint64_t transId; MessageDequeue(uint64_t qId = 0, uint64_t tId = 0) : type(MessageDequeueEntry), queueId(qId), transId(tId) {} }; } // namespace namespace qpid { namespace store { namespace ms_clfs { void MessageLog::initialize() { // Write something to occupy the first record, preventing a real message // from being lsn/id 0. Delete of a non-existant id is easily tossed // during recovery if no other messages have caused the tail to be moved // up past this dummy record by then. deleteMessage(0, 0); } uint32_t MessageLog::marshallingBufferSize() { size_t biggestNeed = std::max(sizeof(MessageStart), sizeof(MessageEnqueue)); uint32_t defSize = static_cast(biggestNeed); uint32_t minSize = Log::marshallingBufferSize(); if (defSize <= minSize) return minSize; // Round up to multiple of minSize return (defSize + minSize) / minSize * minSize; } uint64_t MessageLog::add(const boost::intrusive_ptr& msg) { // The message may be too long to fit in one record; if so, write // Message-Chunk records to contain the rest. If it does all fit in one // record, though, optimize the encoding by going straight to the // Message-Start record rather than encoding then copying to the record. // In all case MessageStart entry; uint32_t encodedMessageLength = msg->encodedSize(); entry.headerLength = msg->encodedHeaderSize(); entry.totalLength = encodedMessageLength; CLFS_LSN location, lastChunkLsn; std::auto_ptr encodeStage; char *encodeBuff = 0; bool oneRecord = encodedMessageLength <= MaxMessageContentLength; if (oneRecord) { encodeBuff = entry.content; entry.segmentLength = encodedMessageLength; } else { encodeStage.reset(new char[encodedMessageLength]); encodeBuff = encodeStage.get(); entry.segmentLength = MaxMessageContentLength; } qpid::framing::Buffer buff(encodeBuff, encodedMessageLength); msg->encode(buff); if (!oneRecord) memcpy_s(entry.content, sizeof(entry.content), encodeBuff, entry.segmentLength); uint32_t entryLength = static_cast(sizeof(entry)); entryLength -= (MaxMessageContentLength - entry.segmentLength); location = write(&entry, entryLength); // Write any Message-Chunk records before setting the message's id. uint32_t sent = entry.segmentLength; uint32_t remaining = encodedMessageLength - entry.segmentLength; while (remaining > 0) { MessageChunk chunk; chunk.segmentLength = std::max(MaxMessageContentLength, remaining); memcpy_s(chunk.content, sizeof(chunk.content), encodeStage.get() + sent, chunk.segmentLength); entryLength = static_cast(sizeof(chunk)); entryLength -= (MaxMessageContentLength - chunk.segmentLength); lastChunkLsn = write(&chunk, entryLength, &location); sent += chunk.segmentLength; remaining -= chunk.segmentLength; } return lsnToId(location); } void MessageLog::deleteMessage(uint64_t messageId, uint64_t newFirstId) { MessageDelete deleteEntry; CLFS_LSN msgLsn = idToLsn(messageId); write(&deleteEntry, sizeof(deleteEntry), &msgLsn); if (newFirstId != 0) moveTail(idToLsn(newFirstId)); } // Load part or all of a message's content from previously stored // log record(s). void MessageLog::loadContent(uint64_t messageId, std::string& data, uint64_t offset, uint32_t length) { } void MessageLog::recordEnqueue (uint64_t messageId, uint64_t queueId, uint64_t transactionId) { MessageEnqueue entry(queueId, transactionId); CLFS_LSN msgLsn = idToLsn(messageId); write(&entry, sizeof(entry), &msgLsn); } void MessageLog::recordDequeue (uint64_t messageId, uint64_t queueId, uint64_t transactionId) { MessageDequeue entry(queueId, transactionId); CLFS_LSN msgLsn = idToLsn(messageId); write(&entry, sizeof(entry), &msgLsn); } void MessageLog::recover(qpid::broker::RecoveryManager& recoverer, qpid::store::MessageMap& messageMap, std::map >& messageOps) { // If context and content needs to be saved while reassembling messages // split across log records, save the info and reassembly buffer. struct MessageBlocks { uint32_t totalLength; uint32_t soFarLength; boost::shared_ptr content; MessageBlocks() : totalLength(0), soFarLength(0), content((char*)0) {} }; std::map reassemblies; std::map::iterator at; QPID_LOG(debug, "Recovering message log"); // Note that there may be message refs in the log which are deleted, so // be sure to only add msgs at message-start record, and ignore those // that don't have an existing message record. // Get the base LSN - that's how to say "start reading at the beginning" CLFS_INFORMATION info; ULONG infoLength = sizeof (info); BOOL ok = ::GetLogFileInformation(handle, &info, &infoLength); QPID_WINDOWS_CHECK_NOT(ok, 0); // Pointers for the various record types that can be assigned in the // reading loop below. MessageStart *start; MessageChunk *chunk; MessageEnqueue *enqueue; MessageDequeue *dequeue; qpid::store::MessageMap::iterator messageMapSpot; qpid::store::MessageQueueMap::iterator queueMapSpot; PVOID recordPointer; ULONG recordLength; CLFS_RECORD_TYPE recordType = ClfsDataRecord; CLFS_LSN messageLsn, current, undoNext; PVOID readContext; uint64_t msgId; // Note 'current' in case it's needed below; ReadNextLogRecord returns it // via a parameter. current = info.BaseLsn; ok = ::ReadLogRecord(marshal, &info.BaseLsn, ClfsContextForward, &recordPointer, &recordLength, &recordType, &undoNext, &messageLsn, &readContext, 0); while (ok) { // All the record types this class writes have a MessageEntryType in the // beginning. Based on that, do what's needed. MessageEntryType *t = reinterpret_cast(recordPointer); switch(*t) { case MessageStartEntry: start = reinterpret_cast(recordPointer); msgId = lsnToId(current); QPID_LOG(debug, "Message Start, id " << msgId); // If the message content is split across multiple log records, save // this content off to the side until the remaining record(s) are // located. if (start->totalLength == start->segmentLength) { // Whole thing // Start by recovering the header then see if the rest of // the content is desired. qpid::framing::Buffer buff(start->content, start->headerLength); qpid::broker::RecoverableMessage::shared_ptr m = recoverer.recoverMessage(buff); m->setPersistenceId(msgId); messageMap[msgId] = m; uint32_t contentLength = start->totalLength - start->headerLength; if (m->loadContent(contentLength)) { qpid::framing::Buffer content(&(start->content[start->headerLength]), contentLength); m->decodeContent(content); } } else { // Save it in a block big enough. MessageBlocks b; b.totalLength = start->totalLength; b.soFarLength = start->segmentLength; b.content.reset(new char[b.totalLength]); memcpy_s(b.content.get(), b.totalLength, start->content, start->segmentLength); reassemblies[msgId] = b; } break; case MessageChunkEntry: chunk = reinterpret_cast(recordPointer); // Remember, all entries chained to MessageStart via previous. msgId = lsnToId(messageLsn); QPID_LOG(debug, "Message Chunk for id " << msgId); at = reassemblies.find(msgId); if (at == reassemblies.end()) { QPID_LOG(debug, "Message frag for " << msgId << " but no start; discarded"); } else { MessageBlocks *b = &(at->second); if (b->soFarLength + chunk->segmentLength > b->totalLength) throw std::runtime_error("Invalid message chunk length"); memcpy_s(b->content.get() + b->soFarLength, b->totalLength - b->soFarLength, chunk->content, chunk->segmentLength); b->soFarLength += chunk->segmentLength; if (b->totalLength == b->soFarLength) { qpid::framing::Buffer buff(b->content.get(), b->totalLength); qpid::broker::RecoverableMessage::shared_ptr m = recoverer.recoverMessage(buff); m->setPersistenceId(msgId); messageMap[msgId] = m; reassemblies.erase(at); } } break; case MessageDeleteEntry: msgId = lsnToId(messageLsn); QPID_LOG(debug, "Message Delete, id " << msgId); messageMap.erase(msgId); messageOps.erase(msgId); break; case MessageEnqueueEntry: enqueue = reinterpret_cast(recordPointer); msgId = lsnToId(messageLsn); QPID_LOG(debug, "Message " << msgId << " Enqueue on queue " << enqueue->queueId << ", txn " << enqueue->transId); if (messageMap.find(msgId) == messageMap.end()) { QPID_LOG(debug, "Message " << msgId << " doesn't exist; discarded"); } else { std::vector& ops = messageOps[msgId]; RecoveredMsgOp op(RECOVERED_ENQUEUE, enqueue->queueId, enqueue->transId); ops.push_back(op); } break; case MessageDequeueEntry: dequeue = reinterpret_cast(recordPointer); msgId = lsnToId(messageLsn); QPID_LOG(debug, "Message " << msgId << " Dequeue from queue " << dequeue->queueId); if (messageMap.find(msgId) == messageMap.end()) { QPID_LOG(debug, "Message " << msgId << " doesn't exist; discarded"); } else { std::vector& ops = messageOps[msgId]; RecoveredMsgOp op(RECOVERED_DEQUEUE, dequeue->queueId, dequeue->transId); ops.push_back(op); } break; default: throw std::runtime_error("Bad message log entry type"); } recordType = ClfsDataRecord; ok = ::ReadNextLogRecord(readContext, &recordPointer, &recordLength, &recordType, 0, // No userLsn &undoNext, &messageLsn, ¤t, 0); } DWORD status = ::GetLastError(); ::TerminateReadLog(readContext); if (status == ERROR_HANDLE_EOF) { // No more records QPID_LOG(debug, "Message log recovered"); return; } throw QPID_WINDOWS_ERROR(status); } }}} // namespace qpid::store::ms_clfs qpidc-0.16/src/qpid/store/ms-clfs/TransactionLog.cpp0000664000076400007640000003472311462576523023037 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include "TransactionLog.h" #include "Transaction.h" #include "Lsn.h" namespace { // Structures that hold log records. Each has a type field at the start. enum TransactionEntryType { TransactionStartDtxEntry = 1, TransactionStartTxEntry = 2, TransactionPrepareEntry = 3, TransactionCommitEntry = 4, TransactionAbortEntry = 5, TransactionDeleteEntry = 6 }; // The only thing that really takes up space in transaction records is the // xid. Max xid length is in the neighborhood of 600 bytes. Leave some room. static const uint32_t MaxTransactionContentLength = 1024; // Dtx-Start struct TransactionStartDtx { TransactionEntryType type; uint32_t length; char content[MaxTransactionContentLength]; TransactionStartDtx() : type(TransactionStartDtxEntry), length(0) {} }; // Tx-Start struct TransactionStartTx { TransactionEntryType type; TransactionStartTx() : type(TransactionStartTxEntry) {} }; // Prepare struct TransactionPrepare { TransactionEntryType type; TransactionPrepare() : type(TransactionPrepareEntry) {} }; // Commit struct TransactionCommit { TransactionEntryType type; TransactionCommit() : type(TransactionCommitEntry) {} }; // Abort struct TransactionAbort { TransactionEntryType type; TransactionAbort() : type(TransactionAbortEntry) {} }; // Delete struct TransactionDelete { TransactionEntryType type; TransactionDelete() : type(TransactionDeleteEntry) {} }; } // namespace namespace qpid { namespace store { namespace ms_clfs { void TransactionLog::initialize() { // Write something to occupy the first record, preventing a real // transaction from being lsn/id 0. Delete of a non-existant id is easily // tossed during recovery if no other transactions have caused the tail // to be moved up past this dummy record by then. deleteTransaction(0); } uint32_t TransactionLog::marshallingBufferSize() { size_t biggestNeed = sizeof(TransactionStartDtx); uint32_t defSize = static_cast(biggestNeed); uint32_t minSize = Log::marshallingBufferSize(); if (defSize <= minSize) return minSize; // Round up to multiple of minSize return (defSize + minSize) / minSize * minSize; } // Get a new Transaction boost::shared_ptr TransactionLog::begin() { TransactionStartTx entry; CLFS_LSN location; uint64_t id; uint32_t entryLength = static_cast(sizeof(entry)); location = write(&entry, entryLength); try { qpid::sys::ScopedLock l(idsLock); id = lsnToId(location); std::auto_ptr t(new Transaction(id, shared_from_this())); boost::shared_ptr t2(t); boost::weak_ptr weak_t2(t2); { qpid::sys::ScopedLock l(idsLock); validIds[id] = weak_t2; } return t2; } catch(...) { deleteTransaction(id); throw; } } // Get a new TPCTransaction boost::shared_ptr TransactionLog::begin(const std::string& xid) { TransactionStartDtx entry; CLFS_LSN location; uint64_t id; uint32_t entryLength = static_cast(sizeof(entry)); entry.length = static_cast(xid.length()); memcpy_s(entry.content, sizeof(entry.content), xid.c_str(), xid.length()); entryLength -= (sizeof(entry.content) - entry.length); location = write(&entry, entryLength); try { id = lsnToId(location); std::auto_ptr t(new TPCTransaction(id, shared_from_this(), xid)); boost::shared_ptr t2(t); boost::weak_ptr weak_t2(t2); { qpid::sys::ScopedLock l(idsLock); validIds[id] = weak_t2; } return t2; } catch(...) { deleteTransaction(id); throw; } } void TransactionLog::recordPrepare(uint64_t transId) { TransactionPrepare entry; CLFS_LSN transLsn = idToLsn(transId); write(&entry, sizeof(entry), &transLsn); } void TransactionLog::recordCommit(uint64_t transId) { TransactionCommit entry; CLFS_LSN transLsn = idToLsn(transId); write(&entry, sizeof(entry), &transLsn); { qpid::sys::ScopedLock l(idsLock); validIds[transId].reset(); } } void TransactionLog::recordAbort(uint64_t transId) { TransactionAbort entry; CLFS_LSN transLsn = idToLsn(transId); write(&entry, sizeof(entry), &transLsn); { qpid::sys::ScopedLock l(idsLock); validIds[transId].reset(); } } void TransactionLog::deleteTransaction(uint64_t transId) { uint64_t newFirstId = 0; { qpid::sys::ScopedLock l(idsLock); validIds.erase(transId); // May have deleted the first entry; if so the log can release that. // If this deletion results in an empty list of transactions, // move the tail up to this transaction's LSN. This may result in // one or more transactions being stranded in the log until there's // more activity. If a restart happens while these unneeded log // records are there, the presence of the TransactionDelete // entry will cause them to be ignored anyway. if (validIds.empty()) newFirstId = transId; else if (validIds.begin()->first > transId) newFirstId = validIds.begin()->first; } TransactionDelete deleteEntry; CLFS_LSN transLsn = idToLsn(transId); write(&deleteEntry, sizeof(deleteEntry), &transLsn); if (newFirstId != 0) moveTail(idToLsn(newFirstId)); } void TransactionLog::collectPreparedXids(std::map& preparedMap) { // Go through all the known transactions; if the transaction is still // valid (open or prepared) it will have weak_ptr to the Transaction. // If it can be downcast and has a state of TRANS_PREPARED, add to the map. qpid::sys::ScopedLock l(idsLock); std::map >::const_iterator i; for (i = validIds.begin(); i != validIds.end(); ++i) { Transaction::shared_ptr t = i->second.lock(); if (t.get() == 0) continue; TPCTransaction::shared_ptr tpct(boost::dynamic_pointer_cast(t)); if (tpct.get() == 0) continue; if (tpct->state == Transaction::TRANS_PREPARED) preparedMap[tpct->getXid()] = tpct; } } void TransactionLog::recover(std::map& transMap) { QPID_LOG(debug, "Recovering transaction log"); // Note that there may be transaction refs in the log which are deleted, // so be sure to only add transactions at Start records, and ignore those // that don't have an existing message record. // Get the base LSN - that's how to say "start reading at the beginning" CLFS_INFORMATION info; ULONG infoLength = sizeof (info); BOOL ok = ::GetLogFileInformation(handle, &info, &infoLength); QPID_WINDOWS_CHECK_NOT(ok, 0); // Pointers for the various record types that can be assigned in the // reading loop below. TransactionStartDtx *startDtxEntry; TransactionStartTx *startTxEntry; PVOID recordPointer; ULONG recordLength; CLFS_RECORD_TYPE recordType = ClfsDataRecord; CLFS_LSN transLsn, current, undoNext; PVOID readContext; uint64_t transId; // Note 'current' in case it's needed below; ReadNextLogRecord returns it // via a parameter. current = info.BaseLsn; ok = ::ReadLogRecord(marshal, &info.BaseLsn, ClfsContextForward, &recordPointer, &recordLength, &recordType, &undoNext, &transLsn, &readContext, 0); std::auto_ptr tPtr; std::auto_ptr tpcPtr; while (ok) { std::string xid; // All the record types this class writes have a TransactionEntryType // in the beginning. Based on that, do what's needed. TransactionEntryType *t = reinterpret_cast(recordPointer); switch(*t) { case TransactionStartDtxEntry: startDtxEntry = reinterpret_cast(recordPointer); transId = lsnToId(current); QPID_LOG(debug, "Dtx start, id " << transId); xid.assign(startDtxEntry->content, startDtxEntry->length); tpcPtr.reset(new TPCTransaction(transId, shared_from_this(), xid)); transMap[transId] = boost::shared_ptr(tpcPtr); break; case TransactionStartTxEntry: startTxEntry = reinterpret_cast(recordPointer); transId = lsnToId(current); QPID_LOG(debug, "Tx start, id " << transId); tPtr.reset(new Transaction(transId, shared_from_this())); transMap[transId] = boost::shared_ptr(tPtr); break; case TransactionPrepareEntry: transId = lsnToId(transLsn); QPID_LOG(debug, "Dtx prepare, id " << transId); if (transMap.find(transId) == transMap.end()) { QPID_LOG(debug, "Dtx " << transId << " doesn't exist; discarded"); } else { transMap[transId]->state = Transaction::TRANS_PREPARED; } break; case TransactionCommitEntry: transId = lsnToId(transLsn); QPID_LOG(debug, "Txn commit, id " << transId); if (transMap.find(transId) == transMap.end()) { QPID_LOG(debug, "Txn " << transId << " doesn't exist; discarded"); } else { transMap[transId]->state = Transaction::TRANS_COMMITTED; } break; case TransactionAbortEntry: transId = lsnToId(transLsn); QPID_LOG(debug, "Txn abort, id " << transId); if (transMap.find(transId) == transMap.end()) { QPID_LOG(debug, "Txn " << transId << " doesn't exist; discarded"); } else { transMap[transId]->state = Transaction::TRANS_ABORTED; } break; case TransactionDeleteEntry: transId = lsnToId(transLsn); QPID_LOG(debug, "Txn delete, id " << transId); if (transMap.find(transId) == transMap.end()) { QPID_LOG(debug, "Txn " << transId << " doesn't exist; discarded"); } else { transMap[transId]->state = Transaction::TRANS_DELETED; transMap.erase(transId); } break; default: throw std::runtime_error("Bad transaction log entry type"); } recordType = ClfsDataRecord; ok = ::ReadNextLogRecord(readContext, &recordPointer, &recordLength, &recordType, 0, // No userLsn &undoNext, &transLsn, ¤t, 0); } DWORD status = ::GetLastError(); ::TerminateReadLog(readContext); if (status != ERROR_HANDLE_EOF) // No more records throw QPID_WINDOWS_ERROR(status); QPID_LOG(debug, "Transaction log recovered"); // At this point we have a list of all the not-deleted transactions that // were in existence when the broker last ran. All transactions of both // Dtx and Tx types that haven't prepared or committed will be aborted. // This will give the proper background against which to decide each // message's disposition when recovering messages that were involved in // transactions. // In addition to recovering and aborting transactions, rebuild the // validIds map now that we know which ids are really valid. std::map::const_iterator i; for (i = transMap.begin(); i != transMap.end(); ++i) { switch(i->second->state) { case Transaction::TRANS_OPEN: QPID_LOG(debug, "Txn " << i->first << " was open; aborted"); i->second->state = Transaction::TRANS_ABORTED; break; case Transaction::TRANS_ABORTED: QPID_LOG(debug, "Txn " << i->first << " was aborted"); break; case Transaction::TRANS_COMMITTED: QPID_LOG(debug, "Txn " << i->first << " was committed"); break; case Transaction::TRANS_PREPARED: QPID_LOG(debug, "Txn " << i->first << " was prepared"); break; case Transaction::TRANS_DELETED: QPID_LOG(error, "Txn " << i->first << " was deleted; shouldn't be here"); break; } boost::weak_ptr weak_txn(i->second); validIds[i->first] = weak_txn; } } }}} // namespace qpid::store::ms_clfs qpidc-0.16/src/qpid/store/ms-clfs/Transaction.cpp0000664000076400007640000000422711460144014022351 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Transaction.h" #include "Messages.h" namespace qpid { namespace store { namespace ms_clfs { Transaction::~Transaction() { // Transactions that are recovered then found to be deleted get destroyed // but need not be logged. if (state != TRANS_DELETED) log->deleteTransaction(id); } void Transaction::enroll(uint64_t msgId) { qpid::sys::ScopedWlock l(enrollLock); enrolledMessages.push_back(msgId); } void Transaction::unenroll(uint64_t msgId) { qpid::sys::ScopedWlock l(enrollLock); for (std::vector::iterator i = enrolledMessages.begin(); i < enrolledMessages.end(); ++i) { if (*i == msgId) { enrolledMessages.erase(i); break; } } } void Transaction::abort(Messages& messages) { log->recordAbort(id); for (size_t i = 0; i < enrolledMessages.size(); ++i) messages.abort(enrolledMessages[i], shared_from_this()); state = TRANS_ABORTED; } void Transaction::commit(Messages& messages) { log->recordCommit(id); for (size_t i = 0; i < enrolledMessages.size(); ++i) messages.commit(enrolledMessages[i], shared_from_this()); state = TRANS_COMMITTED; } void TPCTransaction::prepare(void) { log->recordPrepare(id); state = TRANS_PREPARED; } }}} // namespace qpid::store::ms_clfs qpidc-0.16/src/qpid/store/ms-clfs/Transaction.h0000664000076400007640000001117511741076346022034 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSCLFS_TRANSACTION_H #define QPID_STORE_MSCLFS_TRANSACTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include "TransactionLog.h" namespace qpid { namespace store { namespace ms_clfs { class Messages; /** * @class Transaction * * Class representing an AMQP transaction. This is used around a set of * enqueue and dequeue operations that occur when the broker is acting * on a transaction commit/abort from the client. * This class is what the store uses internally to implement things a * transaction needs; the broker knows about TransactionContext, which * holds a pointer to Transaction. * * NOTE: All references to Transactions (and TPCTransactions, below) are * through Boost shared_ptr instances. All messages enrolled in a transaction * hold a shared_ptr. Thus, a Transaction object will not be deleted until all * messages holding a reference to it are deleted. This fact is also used * during recovery to automatically clean up and delete any Transaction without * messages left referring to it. */ class Transaction : public boost::enable_shared_from_this { private: // TransactionLog has to create all Transaction instances. Transaction() {} public: typedef boost::shared_ptr shared_ptr; typedef enum { TRANS_OPEN = 1, TRANS_PREPARED, TRANS_ABORTED, TRANS_COMMITTED, TRANS_DELETED } State; virtual ~Transaction(); uint64_t getId() { return id; } State getState() { return state; } void enroll(uint64_t msgId); void unenroll(uint64_t msgId); // For failed ops, not normal end-of-trans void abort(Messages& messages); void commit(Messages& messages); protected: friend class TransactionLog; Transaction(uint64_t _id, const TransactionLog::shared_ptr& _log) : id(_id), state(TRANS_OPEN), log(_log) {} uint64_t id; State state; TransactionLog::shared_ptr log; std::vector enrolledMessages; qpid::sys::RWlock enrollLock; }; class TransactionContext : public qpid::broker::TransactionContext { Transaction::shared_ptr transaction; public: TransactionContext(const Transaction::shared_ptr& _transaction) : transaction(_transaction) {} virtual Transaction::shared_ptr& getTransaction() { return transaction; } }; /** * @class TPCTransaction * * Class representing a Two-Phase-Commit (TPC) AMQP transaction. This is * used around a set of enqueue and dequeue operations that occur when the * broker is acting on a transaction prepare/commit/abort from the client. * This class is what the store uses internally to implement things a * transaction needs; the broker knows about TPCTransactionContext, which * holds a pointer to TPCTransaction. */ class TPCTransaction : public Transaction { friend class TransactionLog; TPCTransaction(uint64_t _id, const TransactionLog::shared_ptr& _log, const std::string& _xid) : Transaction(_id, _log), xid(_xid) {} std::string xid; public: typedef boost::shared_ptr shared_ptr; virtual ~TPCTransaction() {} void prepare(); bool isPrepared() const { return state == TRANS_PREPARED; } const std::string& getXid(void) const { return xid; } }; class TPCTransactionContext : public qpid::broker::TPCTransactionContext { TPCTransaction::shared_ptr transaction; public: TPCTransactionContext(const TPCTransaction::shared_ptr& _transaction) : transaction(_transaction) {} virtual TPCTransaction::shared_ptr& getTransaction() { return transaction; } }; }}} // namespace qpid::store::ms_clfs #endif /* QPID_STORE_MSCLFS_TRANSACTION_H */ qpidc-0.16/src/qpid/store/ms-sql/0000775000076400007640000000000011752725652017244 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/store/ms-sql/BlobEncoder.h0000664000076400007640000000360311267466670021600 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_BLOBENCODER_H #define QPID_STORE_MSSQL_BLOBENCODER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include namespace qpid { namespace store { namespace ms_sql { /** * @class BlobEncoder * * Encodes a blob (varbinary) field from a qpid::broker::Persistable or a * qpid::framing::FieldTable (both of which can be encoded to * qpid::framing::Buffer) so it can be passed to ADO methods for writing * to the database. */ class BlobEncoder : public _variant_t { private: SAFEARRAY *blob; template void encode(const ITEM &item); public: BlobEncoder(const qpid::broker::Persistable &item); BlobEncoder(const boost::intrusive_ptr &msg); BlobEncoder(const qpid::framing::FieldTable &fields); BlobEncoder(const std::string& data); ~BlobEncoder(); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_BLOBENCODER_H */ qpidc-0.16/src/qpid/store/ms-sql/VariantHelper.h0000664000076400007640000000324711267466670022172 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_VARIANTHELPER_H #define QPID_STORE_MSSQL_VARIANTHELPER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace store { namespace ms_sql { /** * @class VariantHelper * * Class template to wrap the details of working with _variant_t objects. */ template class VariantHelper { private: _variant_t var; public: VariantHelper(); VariantHelper(const Wrapped &init); VariantHelper& operator =(const Wrapped& rhs); operator const _variant_t& () const; }; // Specialization for using _variant_t to wrap a std::string template<> class VariantHelper { private: _variant_t var; public: VariantHelper(const std::string &init); VariantHelper& operator =(const std::string& rhs); operator const _variant_t& () const; }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_VARIANTHELPER_H */ qpidc-0.16/src/qpid/store/ms-sql/MessageMapRecordset.cpp0000664000076400007640000002065211460144014023631 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "MessageMapRecordset.h" #include "BlobEncoder.h" #include "DatabaseConnection.h" #include "Exception.h" #include "VariantHelper.h" namespace { inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);}; } namespace qpid { namespace store { namespace ms_sql { void MessageMapRecordset::open(DatabaseConnection* conn, const std::string& table) { init(conn, table); } void MessageMapRecordset::add(uint64_t messageId, uint64_t queueId, const std::string& xid) { std::ostringstream command; command << "INSERT INTO " << tableName << " (messageId, queueId"; if (!xid.empty()) command << ", prepareStatus, xid"; command << ") VALUES (" << messageId << "," << queueId; if (!xid.empty()) command << "," << PREPARE_ADD << ",?"; command << ")" << std::ends; _CommandPtr cmd = NULL; _ParameterPtr xidVal = NULL; TESTHR(cmd.CreateInstance(__uuidof(Command))); _ConnectionPtr p = *dbConn; cmd->ActiveConnection = p; cmd->CommandText = command.str().c_str(); cmd->CommandType = adCmdText; if (!xid.empty()) { TESTHR(xidVal.CreateInstance(__uuidof(Parameter))); xidVal->Name = "@xid"; xidVal->Type = adVarBinary; xidVal->Size = xid.length(); xidVal->Direction = adParamInput; xidVal->Value = BlobEncoder(xid); cmd->Parameters->Append(xidVal); } cmd->Execute(NULL, NULL, adCmdText | adExecuteNoRecords); } void MessageMapRecordset::remove(uint64_t messageId, uint64_t queueId) { std::ostringstream command; command << "DELETE FROM " << tableName << " WHERE queueId = " << queueId << " AND messageId = " << messageId << std::ends; _CommandPtr cmd = NULL; TESTHR(cmd.CreateInstance(__uuidof(Command))); _ConnectionPtr p = *dbConn; cmd->ActiveConnection = p; cmd->CommandText = command.str().c_str(); cmd->CommandType = adCmdText; _variant_t deletedRecords; cmd->Execute(&deletedRecords, NULL, adCmdText | adExecuteNoRecords); if ((long)deletedRecords == 0) throw ms_sql::Exception("Message does not exist in queue mapping"); // Trigger on deleting the mapping takes care of deleting orphaned // message record from tblMessage. } void MessageMapRecordset::pendingRemove(uint64_t messageId, uint64_t queueId, const std::string& xid) { // Look up the mapping for the specified message and queue. There // should be only one because of the uniqueness constraint in the // SQL table. Update it to reflect it's pending delete with // the specified xid. std::ostringstream command; command << "UPDATE " << tableName << " SET prepareStatus=" << PREPARE_REMOVE << " , xid=?" << " WHERE queueId = " << queueId << " AND messageId = " << messageId << std::ends; _CommandPtr cmd = NULL; _ParameterPtr xidVal = NULL; TESTHR(cmd.CreateInstance(__uuidof(Command))); TESTHR(xidVal.CreateInstance(__uuidof(Parameter))); _ConnectionPtr p = *dbConn; cmd->ActiveConnection = p; cmd->CommandText = command.str().c_str(); cmd->CommandType = adCmdText; xidVal->Name = "@xid"; xidVal->Type = adVarBinary; xidVal->Size = xid.length(); xidVal->Direction = adParamInput; xidVal->Value = BlobEncoder(xid); cmd->Parameters->Append(xidVal); cmd->Execute(NULL, NULL, adCmdText | adExecuteNoRecords); } void MessageMapRecordset::removeForQueue(uint64_t queueId) { std::ostringstream command; command << "DELETE FROM " << tableName << " WHERE queueId = " << queueId << std::ends; _CommandPtr cmd = NULL; TESTHR(cmd.CreateInstance(__uuidof(Command))); _ConnectionPtr p = *dbConn; cmd->ActiveConnection = p; cmd->CommandText = command.str().c_str(); cmd->CommandType = adCmdText; cmd->Execute(NULL, NULL, adCmdText | adExecuteNoRecords); } void MessageMapRecordset::commitPrepared(const std::string& xid) { // Find all the records for the specified xid. Records marked as adding // are now permanent so remove the xid and prepareStatus. Records marked // as removing are removed entirely. openRs(); MessageMap m; IADORecordBinding *piAdoRecordBinding; rs->QueryInterface(__uuidof(IADORecordBinding), (LPVOID *)&piAdoRecordBinding); piAdoRecordBinding->BindToRecordset(&m); for (; !rs->EndOfFile; rs->MoveNext()) { if (m.xidStatus != adFldOK) continue; const std::string x(m.xid, m.xidLength); if (x != xid) continue; if (m.prepareStatus == PREPARE_REMOVE) { rs->Delete(adAffectCurrent); } else { _variant_t dbNull; dbNull.ChangeType(VT_NULL); rs->Fields->GetItem("prepareStatus")->Value = dbNull; rs->Fields->GetItem("xid")->Value = dbNull; } rs->Update(); } piAdoRecordBinding->Release(); } void MessageMapRecordset::abortPrepared(const std::string& xid) { // Find all the records for the specified xid. Records marked as adding // need to be removed while records marked as removing are put back to // no xid and no prepareStatus. openRs(); MessageMap m; IADORecordBinding *piAdoRecordBinding; rs->QueryInterface(__uuidof(IADORecordBinding), (LPVOID *)&piAdoRecordBinding); piAdoRecordBinding->BindToRecordset(&m); for (; !rs->EndOfFile; rs->MoveNext()) { if (m.xidStatus != adFldOK) continue; const std::string x(m.xid, m.xidLength); if (x != xid) continue; if (m.prepareStatus == PREPARE_ADD) { rs->Delete(adAffectCurrent); } else { _variant_t dbNull; dbNull.ChangeType(VT_NULL); rs->Fields->GetItem("prepareStatus")->Value = dbNull; rs->Fields->GetItem("xid")->Value = dbNull; } rs->Update(); } piAdoRecordBinding->Release(); } void MessageMapRecordset::recover(MessageQueueMap& msgMap) { openRs(); if (rs->BOF && rs->EndOfFile) return; // Nothing to do rs->MoveFirst(); MessageMap b; IADORecordBinding *piAdoRecordBinding; rs->QueryInterface(__uuidof(IADORecordBinding), (LPVOID *)&piAdoRecordBinding); piAdoRecordBinding->BindToRecordset(&b); while (!rs->EndOfFile) { qpid::store::QueueEntry entry(b.queueId); if (b.xidStatus == adFldOK && b.xidLength > 0) { entry.xid.assign(b.xid, b.xidLength); entry.tplStatus = b.prepareStatus == PREPARE_ADD ? QueueEntry::ADDING : QueueEntry::REMOVING; } else { entry.tplStatus = QueueEntry::NONE; } msgMap[b.messageId].push_back(entry); rs->MoveNext(); } piAdoRecordBinding->Release(); } void MessageMapRecordset::dump() { openRs(); Recordset::dump(); if (rs->EndOfFile && rs->BOF) // No records return; rs->MoveFirst(); MessageMap m; IADORecordBinding *piAdoRecordBinding; rs->QueryInterface(__uuidof(IADORecordBinding), (LPVOID *)&piAdoRecordBinding); piAdoRecordBinding->BindToRecordset(&m); while (!rs->EndOfFile) { QPID_LOG(notice, "msg " << m.messageId << " on queue " << m.queueId); rs->MoveNext(); } piAdoRecordBinding->Release(); } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/MessageRecordset.h0000664000076400007640000000611711274656025022655 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_MESSAGERECORDSET_H #define QPID_STORE_MSSQL_MESSAGERECORDSET_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "BlobRecordset.h" #include #include #include namespace qpid { namespace store { namespace ms_sql { /** * @class MessageRecordset * * Class for storing and recovering messages. Messages are primarily blobs * and handled similarly. However, messages larger than the staging threshold * are not contained completely in memory; they're left mostly in the store * and the header is held in memory. So when the message "blob" is saved, * an additional size-of-the-header field is prepended to the blob. * On recovery, the size-of-the-header is used to get only what's needed * until it's determined if the entire message is to be recovered to memory. */ class MessageRecordset : public BlobRecordset { class Binding : public CADORecordBinding { BEGIN_ADO_BINDING(Binding) ADO_FIXED_LENGTH_ENTRY2(1, adBigInt, messageId, FALSE) END_ADO_BINDING() public: uint64_t messageId; }; public: // Store a message. Store the header size (4 bytes) then the regular // blob comprising the message. void add(const boost::intrusive_ptr& msg); // Append additional content to an existing message. void append(const boost::intrusive_ptr& msg, const std::string& data); // Remove an existing message void remove(const boost::intrusive_ptr& msg); // Load all or part of a stored message. This skips the header parts and // loads content. void loadContent(const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length); // Recover messages and save a map of those recovered. void recover(qpid::broker::RecoveryManager& recoverer, std::map& messageMap); // Dump table contents; useful for debugging. void dump(); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_MESSAGERECORDSET_H */ qpidc-0.16/src/qpid/store/ms-sql/BindingRecordset.cpp0000664000076400007640000001246111272664412023172 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "BindingRecordset.h" #include "BlobAdapter.h" #include "BlobEncoder.h" #include "VariantHelper.h" namespace qpid { namespace store { namespace ms_sql { void BindingRecordset::removeFilter(const std::string& filter) { rs->PutFilter (VariantHelper(filter)); long recs = rs->GetRecordCount(); if (recs == 0) return; // Nothing to do while (recs > 0) { // Deleting adAffectAll doesn't work as documented; go one by one. rs->Delete(adAffectCurrent); if (--recs > 0) rs->MoveNext(); } rs->Update(); } void BindingRecordset::add(uint64_t exchangeId, uint64_t queueId, const std::string& routingKey, const qpid::framing::FieldTable& args) { VariantHelper routingKeyStr(routingKey); BlobEncoder blob (args); // Marshall field table to a blob rs->AddNew(); rs->Fields->GetItem("exchangeId")->Value = exchangeId; rs->Fields->GetItem("queueId")->Value = queueId; rs->Fields->GetItem("routingKey")->Value = routingKeyStr; rs->Fields->GetItem("fieldTableBlob")->AppendChunk(blob); rs->Update(); } void BindingRecordset::remove(uint64_t exchangeId, uint64_t queueId, const std::string& routingKey, const qpid::framing::FieldTable& /*args*/) { // Look up the affected binding. std::ostringstream filter; filter << "exchangeId = " << exchangeId << " AND queueId = " << queueId << " AND routingKey = '" << routingKey << "'" << std::ends; removeFilter(filter.str()); } void BindingRecordset::removeForExchange(uint64_t exchangeId) { // Look up the affected bindings by the exchange ID std::ostringstream filter; filter << "exchangeId = " << exchangeId << std::ends; removeFilter(filter.str()); } void BindingRecordset::removeForQueue(uint64_t queueId) { // Look up the affected bindings by the queue ID std::ostringstream filter; filter << "queueId = " << queueId << std::ends; removeFilter(filter.str()); } void BindingRecordset::recover(broker::RecoveryManager& recoverer, const store::ExchangeMap& exchMap, const store::QueueMap& queueMap) { if (rs->BOF && rs->EndOfFile) return; // Nothing to do rs->MoveFirst(); Binding b; IADORecordBinding *piAdoRecordBinding; rs->QueryInterface(__uuidof(IADORecordBinding), (LPVOID *)&piAdoRecordBinding); piAdoRecordBinding->BindToRecordset(&b); while (!rs->EndOfFile) { long blobSize = rs->Fields->Item["fieldTableBlob"]->ActualSize; BlobAdapter blob(blobSize); blob = rs->Fields->Item["fieldTableBlob"]->GetChunk(blobSize); store::ExchangeMap::const_iterator exch = exchMap.find(b.exchangeId); if (exch == exchMap.end()) { std::ostringstream msg; msg << "Error recovering bindings; exchange ID " << b.exchangeId << " not found in exchange map"; throw qpid::Exception(msg.str()); } broker::RecoverableExchange::shared_ptr exchPtr = exch->second; store::QueueMap::const_iterator q = queueMap.find(b.queueId); if (q == queueMap.end()) { std::ostringstream msg; msg << "Error recovering bindings; queue ID " << b.queueId << " not found in queue map"; throw qpid::Exception(msg.str()); } broker::RecoverableQueue::shared_ptr qPtr = q->second; // The recovery manager wants the queue name, so get it from the // RecoverableQueue. std::string key(b.routingKey); exchPtr->bind(qPtr->getName(), key, blob); rs->MoveNext(); } piAdoRecordBinding->Release(); } void BindingRecordset::dump() { Recordset::dump(); if (rs->EndOfFile && rs->BOF) // No records return; rs->MoveFirst(); Binding b; IADORecordBinding *piAdoRecordBinding; rs->QueryInterface(__uuidof(IADORecordBinding), (LPVOID *)&piAdoRecordBinding); piAdoRecordBinding->BindToRecordset(&b); while (VARIANT_FALSE == rs->EndOfFile) { QPID_LOG(notice, "exch Id " << b.exchangeId << ", q Id " << b.queueId << ", k: " << b.routingKey); rs->MoveNext(); } piAdoRecordBinding->Release(); } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/BlobAdapter.h0000664000076400007640000000373511267466670021607 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_BLOBADAPTER_H #define QPID_STORE_MSSQL_BLOBADAPTER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include namespace qpid { namespace store { namespace ms_sql { /** * @class BlobAdapter * * Adapter for accessing a blob (varbinary SQL field) as a qpid::framing::Buffer * in an exception-safe way. */ class BlobAdapter : public _variant_t { private: // This Buffer's pointer indicates whether or not a safearray has // been locked; if it's 0, no locking was done. qpid::framing::Buffer buff; qpid::framing::FieldTable fields; void extractBuff(); public: // Initialize with the known length of the data that will come. // Assigning a _variant_t to this object will set up the array to be // accessed with the operator Buffer&() BlobAdapter(long blobSize) : _variant_t(), buff(0, blobSize) {} ~BlobAdapter(); BlobAdapter& operator=(_variant_t& var_t_Src) { _variant_t::operator=(var_t_Src); return *this; } operator qpid::framing::Buffer& (); operator qpid::framing::FieldTable& (); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_BLOBADAPTER_H */ qpidc-0.16/src/qpid/store/ms-sql/BindingRecordset.h0000664000076400007640000000536711272664412022646 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_BINDINGRECORDSET_H #define QPID_STORE_MSSQL_BINDINGRECORDSET_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "Recordset.h" #include #include namespace qpid { namespace store { namespace ms_sql { /** * @class BindingRecordset * * Class for the binding records. */ class BindingRecordset : public Recordset { class Binding : public CADORecordBinding { BEGIN_ADO_BINDING(Binding) ADO_FIXED_LENGTH_ENTRY2(1, adBigInt, exchangeId, FALSE) ADO_FIXED_LENGTH_ENTRY2(2, adBigInt, queueId, FALSE) ADO_VARIABLE_LENGTH_ENTRY4(3, adVarChar, routingKey, sizeof(routingKey), FALSE) END_ADO_BINDING() public: uint64_t exchangeId; uint64_t queueId; char routingKey[256]; }; // Remove all records matching the specified filter/query. void removeFilter(const std::string& filter); public: // Add a new binding void add(uint64_t exchangeId, uint64_t queueId, const std::string& routingKey, const qpid::framing::FieldTable& args); // Remove a specific binding void remove(uint64_t exchangeId, uint64_t queueId, const std::string& routingKey, const qpid::framing::FieldTable& args); // Remove all bindings for the specified exchange void removeForExchange(uint64_t exchangeId); // Remove all bindings for the specified queue void removeForQueue(uint64_t queueId); // Recover bindings set using exchMap to get from Id to RecoverableExchange. void recover(qpid::broker::RecoveryManager& recoverer, const qpid::store::ExchangeMap& exchMap, const qpid::store::QueueMap& queueMap); // Dump table contents; useful for debugging. void dump(); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_BINDINGRECORDSET_H */ qpidc-0.16/src/qpid/store/ms-sql/DatabaseConnection.cpp0000664000076400007640000000473011362142307023463 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "DatabaseConnection.h" #include "Exception.h" #include namespace { inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);}; } namespace qpid { namespace store { namespace ms_sql { DatabaseConnection::DatabaseConnection() : conn(0) { } DatabaseConnection::~DatabaseConnection() { close(); } void DatabaseConnection::open(const std::string& connectString, const std::string& dbName) { if (conn && conn->State == adStateOpen) return; std::string adoConnect = "Provider=SQLOLEDB;" + connectString; try { TESTHR(conn.CreateInstance(__uuidof(Connection))); conn->ConnectionString = adoConnect.c_str(); conn->Open("", "", "", adConnectUnspecified); if (dbName.length() > 0) conn->DefaultDatabase = dbName.c_str(); } catch(_com_error &e) { close(); throw ADOException("MSSQL can't open " + dbName + " at " + adoConnect, e); } } void DatabaseConnection::close() { if (conn && conn->State == adStateOpen) conn->Close(); conn = 0; } std::string DatabaseConnection::getErrors() { long errCount = conn->Errors->Count; if (errCount <= 0) return ""; // Collection ranges from 0 to nCount -1. std::ostringstream messages; ErrorPtr pErr = NULL; for (long i = 0 ; i < errCount ; i++ ) { if (i > 0) messages << "\n"; messages << "[" << i << "] "; pErr = conn->Errors->GetItem(i); messages << "Error " << pErr->Number << ": " << (LPCSTR)pErr->Description; } messages << std::ends; return messages.str(); } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/MessageRecordset.cpp0000664000076400007640000001517611274656025023215 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "MessageRecordset.h" #include "BlobAdapter.h" #include "BlobEncoder.h" #include "VariantHelper.h" #include class qpid::broker::PersistableMessage; namespace qpid { namespace store { namespace ms_sql { void MessageRecordset::add(const boost::intrusive_ptr& msg) { BlobEncoder blob (msg); // Marshall headers and content to a blob rs->AddNew(); rs->Fields->GetItem("fieldTableBlob")->AppendChunk(blob); rs->Update(); uint64_t id = rs->Fields->Item["persistenceId"]->Value; msg->setPersistenceId(id); } void MessageRecordset::append(const boost::intrusive_ptr& msg, const std::string& data) { // Look up the message by its Id std::ostringstream filter; filter << "persistenceId = " << msg->getPersistenceId() << std::ends; rs->PutFilter (VariantHelper(filter.str())); if (rs->RecordCount == 0) { throw Exception("Can't append to message not stored in database"); } BlobEncoder blob (data); // Marshall string data to a blob rs->Fields->GetItem("fieldTableBlob")->AppendChunk(blob); rs->Update(); } void MessageRecordset::remove(const boost::intrusive_ptr& msg) { BlobRecordset::remove(msg->getPersistenceId()); } void MessageRecordset::loadContent(const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length) { // Look up the message by its Id std::ostringstream filter; filter << "persistenceId = " << msg->getPersistenceId() << std::ends; rs->PutFilter (VariantHelper(filter.str())); if (rs->RecordCount == 0) { throw Exception("Can't load message not stored in database"); } // NOTE! If this code needs to change, please verify the encoding // code in BlobEncoder. long blobSize = rs->Fields->Item["fieldTableBlob"]->ActualSize; uint32_t headerSize; const size_t headerFieldLength = sizeof(headerSize); BlobAdapter blob(headerFieldLength); blob = rs->Fields->Item["fieldTableBlob"]->GetChunk((long)headerFieldLength); headerSize = ((qpid::framing::Buffer&)blob).getLong(); // GetChunk always begins reading where the previous GetChunk left off, // so we can't just tell it to ignore the header and read the data. // So, read the header plus the offset, plus the desired data, then // copy the desired data to the supplied string. If this ends up asking // for more than is available in the field, reduce it to what's there. long getSize = headerSize + offset + length; if (getSize + (long)headerFieldLength > blobSize) { size_t reduce = (getSize + headerFieldLength) - blobSize; getSize -= reduce; length -= reduce; } BlobAdapter header_plus(getSize); header_plus = rs->Fields->Item["fieldTableBlob"]->GetChunk(getSize); uint8_t *throw_away = new uint8_t[headerSize + offset]; ((qpid::framing::Buffer&)header_plus).getRawData(throw_away, headerSize + offset); delete throw_away; ((qpid::framing::Buffer&)header_plus).getRawData(data, length); } void MessageRecordset::recover(qpid::broker::RecoveryManager& recoverer, std::map& messageMap) { if (rs->BOF && rs->EndOfFile) return; // Nothing to do rs->MoveFirst(); Binding b; IADORecordBinding *piAdoRecordBinding; rs->QueryInterface(__uuidof(IADORecordBinding), (LPVOID *)&piAdoRecordBinding); piAdoRecordBinding->BindToRecordset(&b); while (!rs->EndOfFile) { // The blob was written as normal, but with the header length // prepended in a uint32_t. Due to message staging threshold // limits, the header may be all that's read in; get it first, // recover that message header, then see if the rest is needed. // // NOTE! If this code needs to change, please verify the encoding // code in BlobEncoder. long blobSize = rs->Fields->Item["fieldTableBlob"]->ActualSize; uint32_t headerSize; const size_t headerFieldLength = sizeof(headerSize); BlobAdapter blob(headerFieldLength); blob = rs->Fields->Item["fieldTableBlob"]->GetChunk((long)headerFieldLength); headerSize = ((qpid::framing::Buffer&)blob).getLong(); BlobAdapter header(headerSize); header = rs->Fields->Item["fieldTableBlob"]->GetChunk(headerSize); broker::RecoverableMessage::shared_ptr msg; msg = recoverer.recoverMessage(header); msg->setPersistenceId(b.messageId); messageMap[b.messageId] = msg; // Now, do we need the rest of the content? long contentLength = blobSize - headerFieldLength - headerSize; if (msg->loadContent(contentLength)) { BlobAdapter content(contentLength); content = rs->Fields->Item["fieldTableBlob"]->GetChunk(contentLength); msg->decodeContent(content); } rs->MoveNext(); } piAdoRecordBinding->Release(); } void MessageRecordset::dump() { Recordset::dump(); if (rs->EndOfFile && rs->BOF) // No records return; rs->MoveFirst(); Binding b; IADORecordBinding *piAdoRecordBinding; rs->QueryInterface(__uuidof(IADORecordBinding), (LPVOID *)&piAdoRecordBinding); piAdoRecordBinding->BindToRecordset(&b); while (VARIANT_FALSE == rs->EndOfFile) { QPID_LOG(notice, "Msg " << b.messageId); rs->MoveNext(); } piAdoRecordBinding->Release(); } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/State.cpp0000664000076400007640000000237011267466670021035 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "State.h" #include "DatabaseConnection.h" #include "Exception.h" #include namespace qpid { namespace store { namespace ms_sql { State::State() : dbConn(0) { HRESULT hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); if (hr != S_OK && hr != S_FALSE) throw Exception("Error initializing COM"); } State::~State() { if (dbConn) delete dbConn; ::CoUninitialize(); } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/SqlTransaction.h0000664000076400007640000000420211362142307022343 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_SQLTRANSACTION_H #define QPID_STORE_MSSQL_SQLTRANSACTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include namespace qpid { namespace store { namespace ms_sql { class DatabaseConnection; /** * @class SqlTransaction * * Class representing an SQL transaction. * Since ADO w/ SQLOLEDB can't do nested transaction via its BeginTrans(), * et al, nested transactions are carried out with direct SQL commands. * To ensure the state of this is known, keep track of how deeply the * transactions are nested. This is more of a safety/sanity check since * AMQP doesn't provide nested transactions. */ class SqlTransaction { boost::shared_ptr db; // Since ADO w/ SQLOLEDB can't do nested transaction via its BeginTrans(), // et al, nested transactions are carried out with direct SQL commands. // To ensure the state of this is known, keep track of how deeply the // transactions are nested. unsigned int transDepth; public: SqlTransaction(const boost::shared_ptr& _db); ~SqlTransaction(); DatabaseConnection *dbConn() { return db.get(); } void begin(); void commit(); void abort(); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_SQLTRANSACTION_H */ qpidc-0.16/src/qpid/store/ms-sql/TplRecordset.cpp0000664000076400007640000000750211362142307022351 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "TplRecordset.h" #include "BlobEncoder.h" #include "DatabaseConnection.h" #include "VariantHelper.h" namespace { inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);}; } namespace qpid { namespace store { namespace ms_sql { void TplRecordset::open(DatabaseConnection* conn, const std::string& table) { init(conn, table); // Don't actually open until we know what to do. It's far easier and more // efficient to simply do most of these TPL/xid ops in a single statement. } void TplRecordset::add(const std::string& xid) { const std::string command = "INSERT INTO " + tableName + " ( xid ) VALUES ( ? )"; _CommandPtr cmd = NULL; _ParameterPtr xidVal = NULL; TESTHR(cmd.CreateInstance(__uuidof(Command))); TESTHR(xidVal.CreateInstance(__uuidof(Parameter))); _ConnectionPtr p = *dbConn; cmd->ActiveConnection = p; cmd->CommandText = command.c_str(); cmd->CommandType = adCmdText; xidVal->Name = "@xid"; xidVal->Type = adVarBinary; xidVal->Size = xid.length(); xidVal->Direction = adParamInput; xidVal->Value = BlobEncoder(xid); cmd->Parameters->Append(xidVal); cmd->Execute(NULL, NULL, adCmdText | adExecuteNoRecords); } void TplRecordset::remove(const std::string& xid) { // Look up the item by its xid const std::string command = "DELETE FROM " + tableName + " WHERE xid = ?"; _CommandPtr cmd = NULL; _ParameterPtr xidVal = NULL; TESTHR(cmd.CreateInstance(__uuidof(Command))); TESTHR(xidVal.CreateInstance(__uuidof(Parameter))); _ConnectionPtr p = *dbConn; cmd->ActiveConnection = p; cmd->CommandText = command.c_str(); cmd->CommandType = adCmdText; xidVal->Name = "@xid"; xidVal->Type = adVarBinary; xidVal->Size = xid.length(); xidVal->Direction = adParamInput; xidVal->Value = BlobEncoder(xid); cmd->Parameters->Append(xidVal); _variant_t deletedRecords; cmd->Execute(&deletedRecords, NULL, adCmdText | adExecuteNoRecords); } void TplRecordset::recover(std::set& xids) { openRs(); if (rs->BOF && rs->EndOfFile) return; // Nothing to do rs->MoveFirst(); while (!rs->EndOfFile) { _variant_t wxid = rs->Fields->Item["xid"]->Value; char *xidBytes; SafeArrayAccessData(wxid.parray, (void **)&xidBytes); std::string xid(xidBytes, rs->Fields->Item["xid"]->ActualSize); xids.insert(xid); SafeArrayUnaccessData(wxid.parray); rs->MoveNext(); } } void TplRecordset::dump() { Recordset::dump(); if (rs->EndOfFile && rs->BOF) // No records return; rs->MoveFirst(); while (!rs->EndOfFile) { _bstr_t wxid = rs->Fields->Item["xid"]->Value; QPID_LOG(notice, " -> " << (const char *)wxid); rs->MoveNext(); } } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/BlobEncoder.cpp0000664000076400007640000000724311267466670022137 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "BlobEncoder.h" #include #include #include #include #include namespace qpid { namespace store { namespace ms_sql { template void BlobEncoder::encode(const ITEM &item) { SAFEARRAYBOUND bound[1] = {0, 0}; bound[0].cElements = item.encodedSize(); blob = SafeArrayCreate(VT_UI1, 1, bound); if (S_OK != SafeArrayLock(blob)) { SafeArrayDestroy(blob); blob = 0; throw qpid::Exception("Error locking blob area for persistable item"); } try { qpid::framing::Buffer buff((char *)blob->pvData, bound[0].cElements); item.encode(buff); } catch(...) { SafeArrayUnlock(blob); SafeArrayDestroy(blob); blob = 0; throw; } this->vt = VT_ARRAY | VT_UI1; this->parray = blob; SafeArrayUnlock(blob); } template <> void BlobEncoder::encode(const boost::intrusive_ptr &item) { // NOTE! If this code changes, verify the recovery code in MessageRecordset SAFEARRAYBOUND bound[1] = {0, 0}; bound[0].cElements = item->encodedSize() + sizeof(uint32_t); blob = SafeArrayCreate(VT_UI1, 1, bound); if (S_OK != SafeArrayLock(blob)) { SafeArrayDestroy(blob); blob = 0; throw qpid::Exception("Error locking blob area for message"); } try { uint32_t headerSize = item->encodedHeaderSize(); qpid::framing::Buffer buff((char *)blob->pvData, bound[0].cElements); buff.putLong(headerSize); item->encode(buff); } catch(...) { SafeArrayUnlock(blob); SafeArrayDestroy(blob); blob = 0; throw; } this->vt = VT_ARRAY | VT_UI1; this->parray = blob; SafeArrayUnlock(blob); } template <> void BlobEncoder::encode(const std::string &item) { SAFEARRAYBOUND bound[1] = {0, 0}; bound[0].cElements = item.size(); blob = SafeArrayCreate(VT_UI1, 1, bound); if (S_OK != SafeArrayLock(blob)) { SafeArrayDestroy(blob); blob = 0; throw qpid::Exception("Error locking blob area for string"); } memcpy_s(blob->pvData, item.size(), item.data(), item.size()); this->vt = VT_ARRAY | VT_UI1; this->parray = blob; SafeArrayUnlock(blob); } BlobEncoder::BlobEncoder(const qpid::broker::Persistable &item) : blob(0) { encode(item); } BlobEncoder::BlobEncoder(const boost::intrusive_ptr &msg) : blob(0) { encode(msg); } BlobEncoder::BlobEncoder(const qpid::framing::FieldTable &fields) : blob(0) { encode(fields); } BlobEncoder::BlobEncoder(const std::string &data) : blob(0) { encode(data); } BlobEncoder::~BlobEncoder() { if (blob) SafeArrayDestroy(blob); blob = 0; this->parray = 0; } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/Recordset.h0000664000076400007640000000410511362142307021332 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_RECORDSET_H #define QPID_STORE_MSSQL_RECORDSET_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ // Bring in ADO 2.8 (yes, I know it says "15", but that's it...) #import "C:\Program Files\Common Files\System\ado\msado15.dll" \ no_namespace rename("EOF", "EndOfFile") #include #include #include #if 0 #include #endif namespace qpid { namespace store { namespace ms_sql { class DatabaseConnection; /** * @class Recordset * * Represents an ADO Recordset, abstracting out the common operations needed * on the common tables used that have 2 fields, persistence ID and blob. */ class Recordset { protected: _RecordsetPtr rs; DatabaseConnection* dbConn; std::string tableName; void init(DatabaseConnection* conn, const std::string& table); void openRs(); public: Recordset() : rs(0), dbConn(0) {} virtual ~Recordset() { close(); rs = 0; dbConn = 0; } /** * Default open() reads all records into the recordset. */ virtual void open(DatabaseConnection* conn, const std::string& table); void close(); void requery(); operator _RecordsetPtr () { return rs; } // Dump table contents; useful for debugging. void dump(); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_RECORDSET_H */ qpidc-0.16/src/qpid/store/ms-sql/BlobRecordset.h0000664000076400007640000000300011274656025022133 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_BLOBRECORDSET_H #define QPID_STORE_MSSQL_BLOBRECORDSET_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Recordset.h" #include #include namespace qpid { namespace store { namespace ms_sql { /** * @class BlobRecordset * * Class for the "blob" records that record an id, varbinary(max) pair. */ class BlobRecordset : public Recordset { protected: public: void add(const qpid::broker::Persistable& item); // Remove a record given its Id. void remove(uint64_t id); void remove(const qpid::broker::Persistable& item); // Dump table contents; useful for debugging. void dump(); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_BLOBRECORDSET_H */ qpidc-0.16/src/qpid/store/ms-sql/TplRecordset.h0000664000076400007640000000317411362142307022017 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_TPLRECORDSET_H #define QPID_STORE_MSSQL_TPLRECORDSET_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Recordset.h" #include #include namespace qpid { namespace store { namespace ms_sql { /** * @class TplRecordset * * Class for the TPL (Transaction Prepared List) records. */ class TplRecordset : public Recordset { protected: public: virtual void open(DatabaseConnection* conn, const std::string& table); void add(const std::string& xid); // Remove a record given its xid. void remove(const std::string& xid); // Recover prepared transaction XIDs. void recover(std::set& xids); // Dump table contents; useful for debugging. void dump(); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_TPLRECORDSET_H */ qpidc-0.16/src/qpid/store/ms-sql/DatabaseConnection.h0000664000076400007640000000401611362142307023125 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_DATABASECONNECTION_H #define QPID_STORE_MSSQL_DATABASECONNECTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ // Bring in ADO 2.8 (yes, I know it says "15", but that's it...) #import "C:\Program Files\Common Files\System\ado\msado15.dll" \ no_namespace rename("EOF", "EndOfFile") #include namespace qpid { namespace store { namespace ms_sql { /** * @class DatabaseConnection * * Represents a connection to the SQL database. This class wraps the * needed _ConnectionPtr for ADO as well as the needed COM initialization * and cleanup that each thread requires. It is expected that this class * will be maintained in thread-specific storage so it has no locks. */ class DatabaseConnection { protected: _ConnectionPtr conn; public: DatabaseConnection(); ~DatabaseConnection(); void open(const std::string& connectString, const std::string& dbName = ""); void close(); operator _ConnectionPtr () { return conn; } void beginTransaction() { conn->BeginTrans(); } void commitTransaction() {conn->CommitTrans(); } void rollbackTransaction() { conn->RollbackTrans(); } std::string getErrors(); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_DATABASECONNECTION_H */ qpidc-0.16/src/qpid/store/ms-sql/SqlTransaction.cpp0000664000076400007640000000352511362142307022705 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "SqlTransaction.h" #include "DatabaseConnection.h" namespace qpid { namespace store { namespace ms_sql { SqlTransaction::SqlTransaction(const boost::shared_ptr& _db) : db(_db), transDepth(0) { } SqlTransaction::~SqlTransaction() { if (transDepth > 0) this->abort(); } void SqlTransaction::begin() { _bstr_t beginCmd("BEGIN TRANSACTION"); _ConnectionPtr c = *db; c->Execute(beginCmd, NULL, adExecuteNoRecords); ++transDepth; } void SqlTransaction::commit() { if (transDepth > 0) { _bstr_t commitCmd("COMMIT TRANSACTION"); _ConnectionPtr c = *db; c->Execute(commitCmd, NULL, adExecuteNoRecords); --transDepth; } } void SqlTransaction::abort() { if (transDepth > 0) { _bstr_t rollbackCmd("ROLLBACK TRANSACTION"); _ConnectionPtr c = *db; c->Execute(rollbackCmd, NULL, adExecuteNoRecords); transDepth = 0; } } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/Recordset.cpp0000664000076400007640000000434511362142307021673 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "Recordset.h" #include "BlobEncoder.h" #include "DatabaseConnection.h" #include "VariantHelper.h" namespace { inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);}; } namespace qpid { namespace store { namespace ms_sql { void Recordset::init(DatabaseConnection* conn, const std::string& table) { dbConn = conn; TESTHR(rs.CreateInstance(__uuidof(::Recordset))); tableName = table; } void Recordset::openRs() { // Client-side cursors needed to get access to newly added // identity column immediately. Recordsets need this to get the // persistence ID for the broker objects. rs->CursorLocation = adUseClient; _ConnectionPtr p = *dbConn; rs->Open(tableName.c_str(), _variant_t((IDispatch *)p, true), adOpenStatic, adLockOptimistic, adCmdTable); } void Recordset::open(DatabaseConnection* conn, const std::string& table) { init(conn, table); openRs(); } void Recordset::close() { if (rs && rs->State == adStateOpen) rs->Close(); } void Recordset::requery() { // Restore the recordset to reflect all current records. rs->Filter = ""; rs->Requery(-1); } void Recordset::dump() { long count = rs->RecordCount; QPID_LOG(notice, "DB Dump: " + tableName << ": " << count << " records"); } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/MessageMapRecordset.h0000664000076400007640000000622511362142307023302 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_MESSAGEMAPRECORDSET_H #define QPID_STORE_MSSQL_MESSAGEMAPRECORDSET_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "Recordset.h" #include namespace qpid { namespace store { namespace ms_sql { /** * @class MessageMapRecordset * * Class for the message map (message -> queue) records. */ class MessageMapRecordset : public Recordset { // These values are defined in a constraint on the tblMessageMap table. // the prepareStatus column can only be null, 1, or 2. enum { PREPARE_ADD=1, PREPARE_REMOVE=2 }; class MessageMap : public CADORecordBinding { BEGIN_ADO_BINDING(MessageMap) ADO_FIXED_LENGTH_ENTRY2(1, adBigInt, messageId, FALSE) ADO_FIXED_LENGTH_ENTRY2(2, adBigInt, queueId, FALSE) ADO_FIXED_LENGTH_ENTRY2(3, adTinyInt, prepareStatus, FALSE) ADO_VARIABLE_LENGTH_ENTRY(4, adVarBinary, xid, sizeof(xid), xidStatus, xidLength, FALSE) END_ADO_BINDING() public: uint64_t messageId; uint64_t queueId; uint8_t prepareStatus; char xid[512]; int xidStatus; uint32_t xidLength; }; void selectOnXid(const std::string& xid); public: virtual void open(DatabaseConnection* conn, const std::string& table); // Add a new mapping void add(uint64_t messageId, uint64_t queueId, const std::string& xid = ""); // Remove a specific mapping. void remove(uint64_t messageId, uint64_t queueId); // Mark the indicated message->queue entry pending removal. The entry // for the mapping is updated to indicate pending removal with the // specified xid. void pendingRemove(uint64_t messageId, uint64_t queueId, const std::string& xid); // Remove mappings for all messages on a specified queue. void removeForQueue(uint64_t queueId); // Commit records recorded as prepared. void commitPrepared(const std::string& xid); // Abort prepared changes. void abortPrepared(const std::string& xid); // Recover the mappings of message ID -> vector. void recover(MessageQueueMap& msgMap); // Dump table contents; useful for debugging. void dump(); }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_MESSAGEMAPRECORDSET_H */ qpidc-0.16/src/qpid/store/ms-sql/MSSqlProvider.cpp0000664000076400007640000013044511464366110022457 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include "AmqpTransaction.h" #include "BlobAdapter.h" #include "BlobRecordset.h" #include "BindingRecordset.h" #include "MessageMapRecordset.h" #include "MessageRecordset.h" #include "TplRecordset.h" #include "DatabaseConnection.h" #include "Exception.h" #include "State.h" #include "VariantHelper.h" // Bring in ADO 2.8 (yes, I know it says "15", but that's it...) #import "C:\Program Files\Common Files\System\ado\msado15.dll" \ no_namespace rename("EOF", "EndOfFile") #include namespace { inline void TESTHR(HRESULT x) {if FAILED(x) _com_issue_error(x);}; // Table names const std::string TblBinding("tblBinding"); const std::string TblConfig("tblConfig"); const std::string TblExchange("tblExchange"); const std::string TblMessage("tblMessage"); const std::string TblMessageMap("tblMessageMap"); const std::string TblQueue("tblQueue"); const std::string TblTpl("tblTPL"); } namespace qpid { namespace store { namespace ms_sql { /** * @class MSSqlProvider * * Implements a qpid::store::StorageProvider that uses Microsoft SQL Server as * the backend data store for Qpid. */ class MSSqlProvider : public qpid::store::StorageProvider { protected: void finalizeMe(); void dump(); public: MSSqlProvider(); ~MSSqlProvider(); virtual qpid::Options* getOptions() { return &options; } virtual void earlyInitialize (Plugin::Target& target); virtual void initialize(Plugin::Target& target); /** * Receive notification that this provider is the one that will actively * handle provider storage for the target. If the provider is to be used, * this method will be called after earlyInitialize() and before any * recovery operations (recovery, in turn, precedes call to initialize()). */ virtual void activate(MessageStorePlugin &store); /** * @name Methods inherited from qpid::broker::MessageStore */ //@{ /** * If called after init() but before recovery, will discard the database * and reinitialize using an empty store dir. If @a pushDownStoreFiles * is true, the content of the store dir will be moved to a backup dir * inside the store dir. This is used when cluster nodes recover and must * get thier content from a cluster sync rather than directly fromt the * store. * * @param pushDownStoreFiles If true, will move content of the store dir * into a subdir, leaving the store dir * otherwise empty. */ virtual void truncateInit(const bool pushDownStoreFiles = false); /** * Record the existence of a durable queue */ virtual void create(PersistableQueue& queue, const qpid::framing::FieldTable& args); /** * Destroy a durable queue */ virtual void destroy(PersistableQueue& queue); /** * Record the existence of a durable exchange */ virtual void create(const PersistableExchange& exchange, const qpid::framing::FieldTable& args); /** * Destroy a durable exchange */ virtual void destroy(const PersistableExchange& exchange); /** * Record a binding */ virtual void bind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args); /** * Forget a binding */ virtual void unbind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args); /** * Record generic durable configuration */ virtual void create(const PersistableConfig& config); /** * Destroy generic durable configuration */ virtual void destroy(const PersistableConfig& config); /** * Stores a messages before it has been enqueued * (enqueueing automatically stores the message so this is * only required if storage is required prior to that * point). If the message has not yet been stored it will * store the headers as well as any content passed in. A * persistence id will be set on the message which can be * used to load the content or to append to it. */ virtual void stage(const boost::intrusive_ptr& msg); /** * Destroys a previously staged message. This only needs * to be called if the message is never enqueued. (Once * enqueued, deletion will be automatic when the message * is dequeued from all queues it was enqueued onto). */ virtual void destroy(PersistableMessage& msg); /** * Appends content to a previously staged message */ virtual void appendContent(const boost::intrusive_ptr& msg, const std::string& data); /** * Loads (a section) of content data for the specified * message (previously stored through a call to stage or * enqueue) into data. The offset refers to the content * only (i.e. an offset of 0 implies that the start of the * content should be loaded, not the headers or related * meta-data). */ virtual void loadContent(const qpid::broker::PersistableQueue& queue, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length); /** * Enqueues a message, storing the message if it has not * been previously stored and recording that the given * message is on the given queue. * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param msg the message to enqueue * @param queue the name of the queue onto which it is to be enqueued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void enqueue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue); /** * Dequeues a message, recording that the given message is * no longer on the given queue and deleting the message * if it is no longer on any other queue. * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param msg the message to dequeue * @param queue the name of the queue from which it is to be dequeued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void dequeue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue); /** * Flushes all async messages to disk for the specified queue * * Note: this is a no-op for this provider. * * @param queue the name of the queue from which it is to be dequeued */ virtual void flush(const PersistableQueue& queue) {}; /** * Returns the number of outstanding AIO's for a given queue * * If 0, than all the enqueue / dequeues have been stored * to disk * * @param queue the name of the queue to check for outstanding AIO */ virtual uint32_t outstandingQueueAIO(const PersistableQueue& queue) {return 0;} //@} /** * @name Methods inherited from qpid::broker::TransactionalStore */ //@{ virtual std::auto_ptr begin(); virtual std::auto_ptr begin(const std::string& xid); virtual void prepare(qpid::broker::TPCTransactionContext& txn); virtual void commit(qpid::broker::TransactionContext& txn); virtual void abort(qpid::broker::TransactionContext& txn); virtual void collectPreparedXids(std::set& xids); //@} virtual void recoverConfigs(qpid::broker::RecoveryManager& recoverer); virtual void recoverExchanges(qpid::broker::RecoveryManager& recoverer, ExchangeMap& exchangeMap); virtual void recoverQueues(qpid::broker::RecoveryManager& recoverer, QueueMap& queueMap); virtual void recoverBindings(qpid::broker::RecoveryManager& recoverer, const ExchangeMap& exchangeMap, const QueueMap& queueMap); virtual void recoverMessages(qpid::broker::RecoveryManager& recoverer, MessageMap& messageMap, MessageQueueMap& messageQueueMap); virtual void recoverTransactions(qpid::broker::RecoveryManager& recoverer, PreparedTransactionMap& dtxMap); private: struct ProviderOptions : public qpid::Options { std::string connectString; std::string catalogName; ProviderOptions(const std::string &name) : qpid::Options(name), catalogName("QpidStore") { const enum { NAMELEN = MAX_COMPUTERNAME_LENGTH + 1 }; TCHAR myName[NAMELEN]; DWORD myNameLen = NAMELEN; GetComputerName(myName, &myNameLen); connectString = "Data Source="; connectString += myName; connectString += "\\SQLEXPRESS;Integrated Security=SSPI"; addOptions() ("connect", qpid::optValue(connectString, "STRING"), "Connection string for the database to use. Will prepend " "Provider=SQLOLEDB;") ("catalog", qpid::optValue(catalogName, "DB NAME"), "Catalog (database) name") ; } }; ProviderOptions options; // Each thread has a separate connection to the database and also needs // to manage its COM initialize/finalize individually. This is done by // keeping a thread-specific State. boost::thread_specific_ptr dbState; State *initState(); DatabaseConnection *initConnection(void); void createDb(DatabaseConnection *db, const std::string &name); }; static MSSqlProvider static_instance_registers_plugin; void MSSqlProvider::finalizeMe() { dbState.reset(); } MSSqlProvider::MSSqlProvider() : options("MS SQL Provider options") { } MSSqlProvider::~MSSqlProvider() { } void MSSqlProvider::earlyInitialize(Plugin::Target &target) { MessageStorePlugin *store = dynamic_cast(&target); if (store) { // If the database init fails, report it and don't register; give // the rest of the broker a chance to run. // // Don't try to initConnection() since that will fail if the // database doesn't exist. Instead, try to open a connection without // a database name, then search for the database. There's still a // chance this provider won't be selected for the store too, so be // be sure to close the database connection before return to avoid // leaving a connection up that will not be used. try { initState(); // This initializes COM std::auto_ptr db(new DatabaseConnection()); db->open(options.connectString, ""); _ConnectionPtr conn(*db); _RecordsetPtr pCatalogs = NULL; VariantHelper catalogName(options.catalogName); pCatalogs = conn->OpenSchema(adSchemaCatalogs, catalogName); if (pCatalogs->EndOfFile) { // Database doesn't exist; create it QPID_LOG(notice, "MSSQL: Creating database " + options.catalogName); createDb(db.get(), options.catalogName); } else { QPID_LOG(notice, "MSSQL: Database located: " + options.catalogName); } if (pCatalogs) { if (pCatalogs->State == adStateOpen) pCatalogs->Close(); pCatalogs = 0; } db->close(); store->providerAvailable("MSSQL", this); } catch (qpid::Exception &e) { QPID_LOG(error, e.what()); return; } store->addFinalizer(boost::bind(&MSSqlProvider::finalizeMe, this)); } } void MSSqlProvider::initialize(Plugin::Target& target) { } void MSSqlProvider::activate(MessageStorePlugin &store) { QPID_LOG(info, "MS SQL Provider is up"); } void MSSqlProvider::truncateInit(const bool pushDownStoreFiles) { } void MSSqlProvider::create(PersistableQueue& queue, const qpid::framing::FieldTable& /*args needed for jrnl*/) { DatabaseConnection *db = initConnection(); BlobRecordset rsQueues; try { db->beginTransaction(); rsQueues.open(db, TblQueue); rsQueues.add(queue); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error creating queue " + queue.getName(), e, errs); } } /** * Destroy a durable queue */ void MSSqlProvider::destroy(PersistableQueue& queue) { DatabaseConnection *db = initConnection(); BlobRecordset rsQueues; BindingRecordset rsBindings; MessageRecordset rsMessages; MessageMapRecordset rsMessageMaps; try { db->beginTransaction(); rsQueues.open(db, TblQueue); rsBindings.open(db, TblBinding); rsMessages.open(db, TblMessage); rsMessageMaps.open(db, TblMessageMap); // Remove bindings first; the queue IDs can't be ripped out from // under the references in the bindings table. Then remove the // message->queue entries for the queue, also because the queue can't // be deleted while there are references to it. If there are messages // orphaned by removing the queue references, they're deleted by // a trigger on the tblMessageMap table. Lastly, the queue record // can be removed. rsBindings.removeForQueue(queue.getPersistenceId()); rsMessageMaps.removeForQueue(queue.getPersistenceId()); rsQueues.remove(queue); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error deleting queue " + queue.getName(), e, errs); } } /** * Record the existence of a durable exchange */ void MSSqlProvider::create(const PersistableExchange& exchange, const qpid::framing::FieldTable& args) { DatabaseConnection *db = initConnection(); BlobRecordset rsExchanges; try { db->beginTransaction(); rsExchanges.open(db, TblExchange); rsExchanges.add(exchange); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error creating exchange " + exchange.getName(), e, errs); } } /** * Destroy a durable exchange */ void MSSqlProvider::destroy(const PersistableExchange& exchange) { DatabaseConnection *db = initConnection(); BlobRecordset rsExchanges; BindingRecordset rsBindings; try { db->beginTransaction(); rsExchanges.open(db, TblExchange); rsBindings.open(db, TblBinding); // Remove bindings first; the exchange IDs can't be ripped out from // under the references in the bindings table. rsBindings.removeForExchange(exchange.getPersistenceId()); rsExchanges.remove(exchange); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error deleting exchange " + exchange.getName(), e, errs); } } /** * Record a binding */ void MSSqlProvider::bind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args) { DatabaseConnection *db = initConnection(); BindingRecordset rsBindings; try { db->beginTransaction(); rsBindings.open(db, TblBinding); rsBindings.add(exchange.getPersistenceId(), queue.getPersistenceId(), key, args); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error binding exchange " + exchange.getName() + " to queue " + queue.getName(), e, errs); } } /** * Forget a binding */ void MSSqlProvider::unbind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const qpid::framing::FieldTable& args) { DatabaseConnection *db = initConnection(); BindingRecordset rsBindings; try { db->beginTransaction(); rsBindings.open(db, TblBinding); rsBindings.remove(exchange.getPersistenceId(), queue.getPersistenceId(), key, args); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error unbinding exchange " + exchange.getName() + " from queue " + queue.getName(), e, errs); } } /** * Record generic durable configuration */ void MSSqlProvider::create(const PersistableConfig& config) { DatabaseConnection *db = initConnection(); BlobRecordset rsConfigs; try { db->beginTransaction(); rsConfigs.open(db, TblConfig); rsConfigs.add(config); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error creating config " + config.getName(), e, errs); } } /** * Destroy generic durable configuration */ void MSSqlProvider::destroy(const PersistableConfig& config) { DatabaseConnection *db = initConnection(); BlobRecordset rsConfigs; try { db->beginTransaction(); rsConfigs.open(db, TblConfig); rsConfigs.remove(config); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error deleting config " + config.getName(), e, errs); } } /** * Stores a messages before it has been enqueued * (enqueueing automatically stores the message so this is * only required if storage is required prior to that * point). If the message has not yet been stored it will * store the headers as well as any content passed in. A * persistence id will be set on the message which can be * used to load the content or to append to it. */ void MSSqlProvider::stage(const boost::intrusive_ptr& msg) { DatabaseConnection *db = initConnection(); MessageRecordset rsMessages; try { db->beginTransaction(); rsMessages.open(db, TblMessage); rsMessages.add(msg); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error staging message", e, errs); } } /** * Destroys a previously staged message. This only needs * to be called if the message is never enqueued. (Once * enqueued, deletion will be automatic when the message * is dequeued from all queues it was enqueued onto). */ void MSSqlProvider::destroy(PersistableMessage& msg) { DatabaseConnection *db = initConnection(); BlobRecordset rsMessages; try { db->beginTransaction(); rsMessages.open(db, TblMessage); rsMessages.remove(msg); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error deleting message", e, errs); } } /** * Appends content to a previously staged message */ void MSSqlProvider::appendContent(const boost::intrusive_ptr& msg, const std::string& data) { DatabaseConnection *db = initConnection(); MessageRecordset rsMessages; try { db->beginTransaction(); rsMessages.open(db, TblMessage); rsMessages.append(msg, data); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error appending to message", e, errs); } } /** * Loads (a section) of content data for the specified * message (previously stored through a call to stage or * enqueue) into data. The offset refers to the content * only (i.e. an offset of 0 implies that the start of the * content should be loaded, not the headers or related * meta-data). */ void MSSqlProvider::loadContent(const qpid::broker::PersistableQueue& /*queue*/, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length) { // SQL store keeps all messages in one table, so we don't need the // queue reference. DatabaseConnection *db = initConnection(); MessageRecordset rsMessages; try { rsMessages.open(db, TblMessage); rsMessages.loadContent(msg, data, offset, length); } catch(_com_error &e) { std::string errs = db->getErrors(); throw ADOException("Error loading message content", e, errs); } } /** * Enqueues a message, storing the message if it has not * been previously stored and recording that the given * message is on the given queue. * * @param ctxt The transaction context under which this enqueue happens. * @param msg The message to enqueue * @param queue the name of the queue onto which it is to be enqueued */ void MSSqlProvider::enqueue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue) { // If this enqueue is in the context of a transaction, use the specified // transaction to nest a new transaction for this operation. However, if // this is not in the context of a transaction, then just use the thread's // DatabaseConnection with a ADO transaction. DatabaseConnection *db = 0; std::string xid; AmqpTransaction *atxn = dynamic_cast (ctxt); if (atxn == 0) { db = initConnection(); db->beginTransaction(); } else { (void)initState(); // Ensure this thread is initialized // It's a transactional enqueue; if it's TPC, grab the xid. AmqpTPCTransaction *tpcTxn = dynamic_cast (ctxt); if (tpcTxn) xid = tpcTxn->getXid(); db = atxn->dbConn(); try { atxn->sqlBegin(); } catch(_com_error &e) { throw ADOException("Error queuing message", e, db->getErrors()); } } MessageRecordset rsMessages; MessageMapRecordset rsMap; try { if (msg->getPersistenceId() == 0) { // Message itself not yet saved rsMessages.open(db, TblMessage); rsMessages.add(msg); } rsMap.open(db, TblMessageMap); rsMap.add(msg->getPersistenceId(), queue.getPersistenceId(), xid); if (atxn) atxn->sqlCommit(); else db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); if (atxn) atxn->sqlAbort(); else db->rollbackTransaction(); throw ADOException("Error queuing message", e, errs); } msg->enqueueComplete(); } /** * Dequeues a message, recording that the given message is * no longer on the given queue and deleting the message * if it is no longer on any other queue. * * @param ctxt The transaction context under which this dequeue happens. * @param msg The message to dequeue * @param queue The queue from which it is to be dequeued */ void MSSqlProvider::dequeue(qpid::broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue) { // If this dequeue is in the context of a transaction, use the specified // transaction to nest a new transaction for this operation. However, if // this is not in the context of a transaction, then just use the thread's // DatabaseConnection with a ADO transaction. DatabaseConnection *db = 0; std::string xid; AmqpTransaction *atxn = dynamic_cast (ctxt); if (atxn == 0) { db = initConnection(); db->beginTransaction(); } else { (void)initState(); // Ensure this thread is initialized // It's a transactional dequeue; if it's TPC, grab the xid. AmqpTPCTransaction *tpcTxn = dynamic_cast (ctxt); if (tpcTxn) xid = tpcTxn->getXid(); db = atxn->dbConn(); try { atxn->sqlBegin(); } catch(_com_error &e) { throw ADOException("Error queuing message", e, db->getErrors()); } } MessageMapRecordset rsMap; try { rsMap.open(db, TblMessageMap); // TPC dequeues are just marked pending and will actually be removed // when the transaction commits; Single-phase dequeues are removed // now, relying on the SQL transaction to put it back if the // transaction doesn't commit. if (!xid.empty()) { rsMap.pendingRemove(msg->getPersistenceId(), queue.getPersistenceId(), xid); } else { rsMap.remove(msg->getPersistenceId(), queue.getPersistenceId()); } if (atxn) atxn->sqlCommit(); else db->commitTransaction(); } catch(ms_sql::Exception&) { if (atxn) atxn->sqlAbort(); else db->rollbackTransaction(); throw; } catch(_com_error &e) { std::string errs = db->getErrors(); if (atxn) atxn->sqlAbort(); else db->rollbackTransaction(); throw ADOException("Error dequeuing message", e, errs); } msg->dequeueComplete(); } std::auto_ptr MSSqlProvider::begin() { (void)initState(); // Ensure this thread is initialized // Transactions are associated with the Connection, so this transaction // context needs its own connection. At the time of writing, single-phase // transactions are dealt with completely on one thread, so we really // could just use the thread-specific DatabaseConnection for this. // However, that would introduce an ugly, hidden coupling, so play // it safe and handle this just like a TPC transaction, which actually // can be prepared and committed/aborted from different threads, // making it a bad idea to try using the thread-local DatabaseConnection. boost::shared_ptr db(new DatabaseConnection); db->open(options.connectString, options.catalogName); std::auto_ptr tx(new AmqpTransaction(db)); tx->sqlBegin(); std::auto_ptr tc(tx); return tc; } std::auto_ptr MSSqlProvider::begin(const std::string& xid) { (void)initState(); // Ensure this thread is initialized boost::shared_ptr db(new DatabaseConnection); db->open(options.connectString, options.catalogName); std::auto_ptr tx(new AmqpTPCTransaction(db, xid)); tx->sqlBegin(); TplRecordset rsTpl; try { tx->sqlBegin(); rsTpl.open(db.get(), TblTpl); rsTpl.add(xid); tx->sqlCommit(); } catch(_com_error &e) { std::string errs = db->getErrors(); tx->sqlAbort(); throw ADOException("Error adding TPL record", e, errs); } std::auto_ptr tc(tx); return tc; } void MSSqlProvider::prepare(qpid::broker::TPCTransactionContext& txn) { // Commit all the marked-up enqueue/dequeue ops and the TPL record. // On commit/rollback the TPL will be removed and the TPL markups // on the message map will be cleaned up as well. (void)initState(); // Ensure this thread is initialized AmqpTPCTransaction *atxn = dynamic_cast (&txn); if (atxn == 0) throw qpid::broker::InvalidTransactionContextException(); try { atxn->sqlCommit(); } catch(_com_error &e) { throw ADOException("Error preparing", e, atxn->dbConn()->getErrors()); } atxn->setPrepared(); } void MSSqlProvider::commit(qpid::broker::TransactionContext& txn) { (void)initState(); // Ensure this thread is initialized /* * One-phase transactions simply commit the outer SQL transaction * that was begun on begin(). Two-phase transactions are different - * the SQL transaction started on begin() was committed on prepare() * so all the SQL records reflecting the enqueue/dequeue actions for * the transaction are recorded but with xid markups on them to reflect * that they are prepared but not committed. Now go back and remove * the markups, deleting those marked for removal. */ AmqpTPCTransaction *p2txn = dynamic_cast (&txn); if (p2txn == 0) { AmqpTransaction *p1txn = dynamic_cast (&txn); if (p1txn == 0) throw qpid::broker::InvalidTransactionContextException(); p1txn->sqlCommit(); return; } DatabaseConnection *db(p2txn->dbConn()); TplRecordset rsTpl; MessageMapRecordset rsMessageMap; try { db->beginTransaction(); rsTpl.open(db, TblTpl); rsMessageMap.open(db, TblMessageMap); rsMessageMap.commitPrepared(p2txn->getXid()); rsTpl.remove(p2txn->getXid()); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error committing transaction", e, errs); } } void MSSqlProvider::abort(qpid::broker::TransactionContext& txn) { (void)initState(); // Ensure this thread is initialized /* * One-phase and non-prepared two-phase transactions simply abort * the outer SQL transaction that was begun on begin(). However, prepared * two-phase transactions are different - the SQL transaction started * on begin() was committed on prepare() so all the SQL records * reflecting the enqueue/dequeue actions for the transaction are * recorded but with xid markups on them to reflect that they are * prepared but not committed. Now go back and remove the markups, * deleting those marked for addition. */ AmqpTPCTransaction *p2txn = dynamic_cast (&txn); if (p2txn == 0 || !p2txn->isPrepared()) { AmqpTransaction *p1txn = dynamic_cast (&txn); if (p1txn == 0) throw qpid::broker::InvalidTransactionContextException(); p1txn->sqlAbort(); return; } DatabaseConnection *db(p2txn->dbConn()); TplRecordset rsTpl; MessageMapRecordset rsMessageMap; try { db->beginTransaction(); rsTpl.open(db, TblTpl); rsMessageMap.open(db, TblMessageMap); rsMessageMap.abortPrepared(p2txn->getXid()); rsTpl.remove(p2txn->getXid()); db->commitTransaction(); } catch(_com_error &e) { std::string errs = db->getErrors(); db->rollbackTransaction(); throw ADOException("Error committing transaction", e, errs); } (void)initState(); // Ensure this thread is initialized AmqpTransaction *atxn = dynamic_cast (&txn); if (atxn == 0) throw qpid::broker::InvalidTransactionContextException(); atxn->sqlAbort(); } void MSSqlProvider::collectPreparedXids(std::set& xids) { DatabaseConnection *db = initConnection(); try { TplRecordset rsTpl; rsTpl.open(db, TblTpl); rsTpl.recover(xids); } catch(_com_error &e) { throw ADOException("Error reading TPL", e, db->getErrors()); } } // @TODO Much of this recovery code is way too similar... refactor to // a recover template method on BlobRecordset. void MSSqlProvider::recoverConfigs(qpid::broker::RecoveryManager& recoverer) { DatabaseConnection *db = 0; try { db = initConnection(); BlobRecordset rsConfigs; rsConfigs.open(db, TblConfig); _RecordsetPtr p = (_RecordsetPtr)rsConfigs; if (p->BOF && p->EndOfFile) return; // Nothing to do p->MoveFirst(); while (!p->EndOfFile) { uint64_t id = p->Fields->Item["persistenceId"]->Value; long blobSize = p->Fields->Item["fieldTableBlob"]->ActualSize; BlobAdapter blob(blobSize); blob = p->Fields->Item["fieldTableBlob"]->GetChunk(blobSize); // Recreate the Config instance and reset its ID. broker::RecoverableConfig::shared_ptr config = recoverer.recoverConfig(blob); config->setPersistenceId(id); p->MoveNext(); } } catch(_com_error &e) { throw ADOException("Error recovering configs", e, db ? db->getErrors() : ""); } } void MSSqlProvider::recoverExchanges(qpid::broker::RecoveryManager& recoverer, ExchangeMap& exchangeMap) { DatabaseConnection *db = 0; try { db = initConnection(); BlobRecordset rsExchanges; rsExchanges.open(db, TblExchange); _RecordsetPtr p = (_RecordsetPtr)rsExchanges; if (p->BOF && p->EndOfFile) return; // Nothing to do p->MoveFirst(); while (!p->EndOfFile) { uint64_t id = p->Fields->Item["persistenceId"]->Value; long blobSize = p->Fields->Item["fieldTableBlob"]->ActualSize; BlobAdapter blob(blobSize); blob = p->Fields->Item["fieldTableBlob"]->GetChunk(blobSize); // Recreate the Exchange instance, reset its ID, and remember the // ones restored for matching up when recovering bindings. broker::RecoverableExchange::shared_ptr exchange = recoverer.recoverExchange(blob); exchange->setPersistenceId(id); exchangeMap[id] = exchange; p->MoveNext(); } } catch(_com_error &e) { throw ADOException("Error recovering exchanges", e, db ? db->getErrors() : ""); } } void MSSqlProvider::recoverQueues(qpid::broker::RecoveryManager& recoverer, QueueMap& queueMap) { DatabaseConnection *db = 0; try { db = initConnection(); BlobRecordset rsQueues; rsQueues.open(db, TblQueue); _RecordsetPtr p = (_RecordsetPtr)rsQueues; if (p->BOF && p->EndOfFile) return; // Nothing to do p->MoveFirst(); while (!p->EndOfFile) { uint64_t id = p->Fields->Item["persistenceId"]->Value; long blobSize = p->Fields->Item["fieldTableBlob"]->ActualSize; BlobAdapter blob(blobSize); blob = p->Fields->Item["fieldTableBlob"]->GetChunk(blobSize); // Recreate the Queue instance and reset its ID. broker::RecoverableQueue::shared_ptr queue = recoverer.recoverQueue(blob); queue->setPersistenceId(id); queueMap[id] = queue; p->MoveNext(); } } catch(_com_error &e) { throw ADOException("Error recovering queues", e, db ? db->getErrors() : ""); } } void MSSqlProvider::recoverBindings(qpid::broker::RecoveryManager& recoverer, const ExchangeMap& exchangeMap, const QueueMap& queueMap) { DatabaseConnection *db = 0; try { db = initConnection(); BindingRecordset rsBindings; rsBindings.open(db, TblBinding); rsBindings.recover(recoverer, exchangeMap, queueMap); } catch(_com_error &e) { throw ADOException("Error recovering bindings", e, db ? db->getErrors() : ""); } } void MSSqlProvider::recoverMessages(qpid::broker::RecoveryManager& recoverer, MessageMap& messageMap, MessageQueueMap& messageQueueMap) { DatabaseConnection *db = 0; try { db = initConnection(); MessageRecordset rsMessages; rsMessages.open(db, TblMessage); rsMessages.recover(recoverer, messageMap); MessageMapRecordset rsMessageMaps; rsMessageMaps.open(db, TblMessageMap); rsMessageMaps.recover(messageQueueMap); } catch(_com_error &e) { throw ADOException("Error recovering messages", e, db ? db->getErrors() : ""); } } void MSSqlProvider::recoverTransactions(qpid::broker::RecoveryManager& recoverer, PreparedTransactionMap& dtxMap) { DatabaseConnection *db = initConnection(); std::set xids; try { TplRecordset rsTpl; rsTpl.open(db, TblTpl); rsTpl.recover(xids); } catch(_com_error &e) { throw ADOException("Error recovering TPL records", e, db->getErrors()); } try { // Rebuild the needed RecoverableTransactions. for (std::set::const_iterator iXid = xids.begin(); iXid != xids.end(); ++iXid) { boost::shared_ptr dbX(new DatabaseConnection); dbX->open(options.connectString, options.catalogName); std::auto_ptr tx(new AmqpTPCTransaction(dbX, *iXid)); tx->setPrepared(); std::auto_ptr tc(tx); dtxMap[*iXid] = recoverer.recoverTransaction(*iXid, tc); } } catch(_com_error &e) { throw ADOException("Error recreating dtx connection", e); } } ////////////// Internal Methods State * MSSqlProvider::initState() { State *state = dbState.get(); // See if thread has initialized if (!state) { state = new State; dbState.reset(state); } return state; } DatabaseConnection * MSSqlProvider::initConnection(void) { State *state = initState(); if (state->dbConn != 0) return state->dbConn; // And the DatabaseConnection is set up too std::auto_ptr db(new DatabaseConnection); db->open(options.connectString, options.catalogName); state->dbConn = db.release(); return state->dbConn; } void MSSqlProvider::createDb(DatabaseConnection *db, const std::string &name) { const std::string dbCmd = "CREATE DATABASE " + name; const std::string useCmd = "USE " + name; const std::string tableCmd = "CREATE TABLE "; const std::string colSpecs = " (persistenceId bigint PRIMARY KEY NOT NULL IDENTITY(1,1)," " fieldTableBlob varbinary(MAX) NOT NULL)"; const std::string bindingSpecs = " (exchangeId bigint REFERENCES tblExchange(persistenceId) NOT NULL," " queueId bigint REFERENCES tblQueue(persistenceId) NOT NULL," " routingKey varchar(255)," " fieldTableBlob varbinary(MAX))"; const std::string messageMapSpecs = " (messageId bigint REFERENCES tblMessage(persistenceId) NOT NULL," " queueId bigint REFERENCES tblQueue(persistenceId) NOT NULL," " prepareStatus tinyint CHECK (prepareStatus IS NULL OR " " prepareStatus IN (1, 2))," " xid varbinary(512) REFERENCES tblTPL(xid)" " CONSTRAINT CK_NoDups UNIQUE NONCLUSTERED (messageId, queueId) )"; const std::string tplSpecs = " (xid varbinary(512) PRIMARY KEY NOT NULL)"; // SET NOCOUNT ON added to prevent extra result sets from // interfering with SELECT statements. (Added by SQL Management) const std::string removeUnrefMsgsTrigger = "CREATE TRIGGER dbo.RemoveUnreferencedMessages " "ON tblMessageMap AFTER DELETE AS BEGIN " "SET NOCOUNT ON; " "DELETE FROM tblMessage " "WHERE tblMessage.persistenceId IN " " (SELECT messageId FROM deleted) AND" " NOT EXISTS(SELECT * FROM tblMessageMap" " WHERE tblMessageMap.messageId IN" " (SELECT messageId FROM deleted)) " "END"; _variant_t unused; _bstr_t dbStr = dbCmd.c_str(); _ConnectionPtr conn(*db); try { conn->Execute(dbStr, &unused, adExecuteNoRecords); _bstr_t useStr = useCmd.c_str(); conn->Execute(useStr, &unused, adExecuteNoRecords); std::string makeTable = tableCmd + TblQueue + colSpecs; _bstr_t makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); makeTable = tableCmd + TblExchange + colSpecs; makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); makeTable = tableCmd + TblConfig + colSpecs; makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); makeTable = tableCmd + TblMessage + colSpecs; makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); makeTable = tableCmd + TblBinding + bindingSpecs; makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); makeTable = tableCmd + TblTpl + tplSpecs; makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); makeTable = tableCmd + TblMessageMap + messageMapSpecs; makeTableStr = makeTable.c_str(); conn->Execute(makeTableStr, &unused, adExecuteNoRecords); _bstr_t addTriggerStr = removeUnrefMsgsTrigger.c_str(); conn->Execute(addTriggerStr, &unused, adExecuteNoRecords); } catch(_com_error &e) { throw ADOException("MSSQL can't create " + name, e, db->getErrors()); } } void MSSqlProvider::dump() { // dump all db records to qpid_log QPID_LOG(notice, "DB Dump: (not dumping anything)"); // rsQueues.dump(); } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/AmqpTransaction.cpp0000664000076400007640000000303711362142307023042 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "AmqpTransaction.h" #include "DatabaseConnection.h" namespace qpid { namespace store { namespace ms_sql { AmqpTransaction::AmqpTransaction(const boost::shared_ptr& _db) : db(_db), sqlTrans(_db) { } AmqpTransaction::~AmqpTransaction() { } void AmqpTransaction::sqlBegin() { sqlTrans.begin(); } void AmqpTransaction::sqlCommit() { sqlTrans.commit(); } void AmqpTransaction::sqlAbort() { sqlTrans.abort(); } AmqpTPCTransaction::AmqpTPCTransaction(const boost::shared_ptr& db, const std::string& _xid) : AmqpTransaction(db), prepared(false), xid(_xid) { } AmqpTPCTransaction::~AmqpTPCTransaction() { } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/AmqpTransaction.h0000664000076400007640000000500211362142307022501 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_AMQPTRANSACTION_H #define QPID_STORE_MSSQL_AMQPTRANSACTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "SqlTransaction.h" namespace qpid { namespace store { namespace ms_sql { class DatabaseConnection; /** * @class AmqpTransaction * * Class representing an AMQP transaction. This is used around a set of * enqueue and dequeue operations that occur when the broker is acting * on a transaction commit/abort from the client. */ class AmqpTransaction : public qpid::broker::TransactionContext { boost::shared_ptr db; SqlTransaction sqlTrans; public: AmqpTransaction(const boost::shared_ptr& _db); virtual ~AmqpTransaction(); DatabaseConnection *dbConn() { return db.get(); } void sqlBegin(); void sqlCommit(); void sqlAbort(); }; /** * @class AmqpTPCTransaction * * Class representing a Two-Phase-Commit (TPC) AMQP transaction. This is * used around a set of enqueue and dequeue operations that occur when the * broker is acting on a transaction prepare/commit/abort from the client. */ class AmqpTPCTransaction : public AmqpTransaction, public qpid::broker::TPCTransactionContext { bool prepared; std::string xid; public: AmqpTPCTransaction(const boost::shared_ptr& db, const std::string& _xid); virtual ~AmqpTPCTransaction(); void setPrepared(void) { prepared = true; } bool isPrepared(void) const { return prepared; } const std::string& getXid(void) const { return xid; } }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_AMQPTRANSACTION_H */ qpidc-0.16/src/qpid/store/ms-sql/BlobRecordset.cpp0000664000076400007640000000437711274656025022510 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "BlobRecordset.h" #include "BlobEncoder.h" #include "VariantHelper.h" namespace qpid { namespace store { namespace ms_sql { void BlobRecordset::add(const qpid::broker::Persistable& item) { BlobEncoder blob (item); // Marshall item info to a blob rs->AddNew(); rs->Fields->GetItem("fieldTableBlob")->AppendChunk(blob); rs->Update(); uint64_t id = rs->Fields->Item["persistenceId"]->Value; item.setPersistenceId(id); } void BlobRecordset::remove(uint64_t id) { // Look up the item by its persistenceId std::ostringstream filter; filter << "persistenceId = " << id << std::ends; rs->PutFilter (VariantHelper(filter.str())); if (!rs->EndOfFile) { // Delete the record rs->Delete(adAffectCurrent); rs->Update(); } } void BlobRecordset::remove(const qpid::broker::Persistable& item) { remove(item.getPersistenceId()); } void BlobRecordset::dump() { Recordset::dump(); #if 1 if (rs->EndOfFile && rs->BOF) // No records return; rs->MoveFirst(); while (!rs->EndOfFile) { uint64_t id = rs->Fields->Item["persistenceId"]->Value; QPID_LOG(notice, " -> " << id); rs->MoveNext(); } #else for (Iterator iter = begin(); iter != end(); ++iter) { uint64_t id = *iter.first; QPID_LOG(notice, " -> " << id); } #endif } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/Exception.h0000664000076400007640000000360211362142307021337 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_EXCEPTION_H #define QPID_STORE_MSSQL_EXCEPTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include namespace qpid { namespace store { namespace ms_sql { class Exception : public qpid::store::StorageProvider::Exception { protected: std::string text; public: Exception(const std::string& _text) : text(_text) {} virtual ~Exception() {} virtual const char* what() const throw() { return text.c_str(); } }; class ADOException : public Exception { public: ADOException(const std::string& _text, _com_error &e, const std::string& providerErrors = "") : Exception(_text) { text += ": "; text += e.ErrorMessage(); IErrorInfo *i = e.ErrorInfo(); if (i != 0) { text += ": "; _bstr_t wmsg = e.Description(); text += (const char *)wmsg; i->Release(); } if (providerErrors.length() > 0) text += providerErrors; } }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_EXCEPTION_H */ qpidc-0.16/src/qpid/store/ms-sql/BlobAdapter.cpp0000664000076400007640000000340211267466670022131 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "BlobAdapter.h" #include namespace qpid { namespace store { namespace ms_sql { void BlobAdapter::extractBuff() { // To give a valid Buffer back, lock the safearray, obtaining a pointer to // the actual data. Record the pointer in the Buffer so the destructor // knows to unlock the safearray. if (buff.getPointer() == 0) { char *blob; SafeArrayAccessData(this->parray, (void **)&blob); qpid::framing::Buffer lockedBuff(blob, buff.getSize()); buff = lockedBuff; } } BlobAdapter::~BlobAdapter() { // If buff's pointer is set, the safearray is locked, so unlock it if (buff.getPointer() != 0) SafeArrayUnaccessData(this->parray); } BlobAdapter::operator qpid::framing::Buffer& () { extractBuff(); return buff; } BlobAdapter::operator qpid::framing::FieldTable& () { extractBuff(); fields.decode(buff); return fields; } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/VariantHelper.cpp0000664000076400007640000000341311362142307022500 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "VariantHelper.h" namespace qpid { namespace store { namespace ms_sql { template VariantHelper::VariantHelper() { var.vt = VT_EMPTY; } template VariantHelper::operator const _variant_t& () const { return var; } // Specialization for using _variant_t to wrap a std::string VariantHelper::VariantHelper(const std::string &init) { if (init.empty() || init.length() == 0) { var.vt = VT_BSTR; var.bstrVal = NULL; } else { var.SetString(init.c_str()); } } VariantHelper& VariantHelper::operator=(const std::string &rhs) { if (rhs.empty() || rhs.length() == 0) { var.vt = VT_BSTR; var.bstrVal = NULL; } else { var.SetString(rhs.c_str()); } return *this; } VariantHelper::operator const _variant_t& () const { return var; } }}} // namespace qpid::store::ms_sql qpidc-0.16/src/qpid/store/ms-sql/State.h0000664000076400007640000000316711267466670020507 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MSSQL_STATE_H #define QPID_STORE_MSSQL_STATE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { namespace store { namespace ms_sql { class DatabaseConnection; /** * @struct State * * Represents a thread's state for accessing ADO and the database. * Creating an instance of State initializes COM for this thread, and * destroying it uninitializes COM. There's also a DatabaseConnection * for this thread's default access to the database. More DatabaseConnections * can always be created, but State has one that can always be used by * the thread whose state is represented. * * This class is intended to be one-per-thread, so it should be accessed * via thread-specific storage. */ struct State { State(); ~State(); DatabaseConnection *dbConn; }; }}} // namespace qpid::store::ms_sql #endif /* QPID_STORE_MSSQL_STATE_H */ qpidc-0.16/src/qpid/store/MessageStorePlugin.h0000664000076400007640000002366411460144014021753 0ustar00jrossjross00000000000000#ifndef QPID_STORE_MESSAGESTOREPLUGIN_H #define QPID_STORE_MESSAGESTOREPLUGIN_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/broker/Broker.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/PersistableExchange.h" #include "qpid/broker/PersistableMessage.h" #include "qpid/broker/PersistableQueue.h" #include "qpid/management/Manageable.h" #include using namespace qpid; namespace qpid { namespace store { class StorageProvider; /** * @class MessageStorePlugin * * MessageStorePlugin is the front end of the persistent message store * plugin. It is responsible for coordinating recovery, initialization, * transactions (both local and distributed), flow-to-disk loading and * unloading and persisting broker state (queues, bindings etc.). * Actual storage operations are carried out by a message store storage * provider that implements the qpid::store::StorageProvider interface. */ class MessageStorePlugin : public qpid::Plugin, public qpid::broker::MessageStore, // Frontend classes public qpid::Plugin::Target // Provider target // @TODO Need a mgmt story for this. Maybe allow r/o access to provider store info? public qpid::management::Manageable { public: MessageStorePlugin() : broker(0) {} /** * @name Methods inherited from qpid::Plugin */ //@{ virtual Options* getOptions() { return &options; } virtual void earlyInitialize (Plugin::Target& target); virtual void initialize(Plugin::Target& target); //@} /// Finalizer; calls Target::finalize() to run finalizers on /// StorageProviders. void finalizeMe(); /** * Called by StorageProvider instances during the earlyInitialize sequence. * Each StorageProvider must supply a unique name by which it is known and a * pointer to itself. */ virtual void providerAvailable(const std::string name, StorageProvider *be); /** * @name Methods inherited from qpid::broker::MessageStore */ //@{ /** * If called before recovery, will discard the database and reinitialize * using an empty store. This is used when cluster nodes recover and * must get their content from a cluster sync rather than directly from * the store. * * @param saveStoreContent If true, the store's contents should be * saved to a backup location before * reinitializing the store content. */ virtual void truncateInit(const bool saveStoreContent = false); /** * Record the existence of a durable queue */ virtual void create(broker::PersistableQueue& queue, const framing::FieldTable& args); /** * Destroy a durable queue */ virtual void destroy(broker::PersistableQueue& queue); /** * Record the existence of a durable exchange */ virtual void create(const broker::PersistableExchange& exchange, const framing::FieldTable& args); /** * Destroy a durable exchange */ virtual void destroy(const broker::PersistableExchange& exchange); /** * Record a binding */ virtual void bind(const broker::PersistableExchange& exchange, const broker::PersistableQueue& queue, const std::string& key, const framing::FieldTable& args); /** * Forget a binding */ virtual void unbind(const broker::PersistableExchange& exchange, const broker::PersistableQueue& queue, const std::string& key, const framing::FieldTable& args); /** * Record generic durable configuration */ virtual void create(const broker::PersistableConfig& config); /** * Destroy generic durable configuration */ virtual void destroy(const broker::PersistableConfig& config); /** * Stores a message before it has been enqueued * (enqueueing automatically stores the message so this is * only required if storage is required prior to that * point). If the message has not yet been stored it will * store the headers as well as any content passed in. A * persistence id will be set on the message which can be * used to load the content or to append to it. */ virtual void stage(const boost::intrusive_ptr& msg); /** * Destroys a previously staged message. This only needs * to be called if the message is never enqueued. (Once * enqueued, deletion will be automatic when the message * is dequeued from all queues it was enqueued onto). */ virtual void destroy(broker::PersistableMessage& msg); /** * Appends content to a previously staged message */ virtual void appendContent(const boost::intrusive_ptr& msg, const std::string& data); /** * Loads (a section) of content data for the specified * message (previously stored through a call to stage or * enqueue) into data. The offset refers to the content * only (i.e. an offset of 0 implies that the start of the * content should be loaded, not the headers or related * meta-data). */ virtual void loadContent(const broker::PersistableQueue& queue, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length); /** * Enqueues a message, storing the message if it has not * been previously stored and recording that the given * message is on the given queue. * * Note: The operation is asynchronous so the return of this function does * not mean the operation is complete. * * @param msg the message to enqueue * @param queue the name of the queue onto which it is to be enqueued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void enqueue(broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const broker::PersistableQueue& queue); /** * Dequeues a message, recording that the given message is * no longer on the given queue and deleting the message * if it is no longer on any other queue. * * * Note: The operation is asynchronous so the return of this function does * not mean the operation is complete. * * @param msg the message to dequeue * @param queue the name of the queue from which it is to be dequeued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void dequeue(broker::TransactionContext* ctxt, const boost::intrusive_ptr& msg, const broker::PersistableQueue& queue); /** * Flushes all async messages to disk for the specified queue * * * Note: The operation is asynchronous so the return of this function does * not mean the operation is complete. * * @param queue the name of the queue from which it is to be dequeued */ virtual void flush(const broker::PersistableQueue& queue); /** * Returns the number of outstanding AIO's for a given queue * * If 0, than all the enqueue / dequeues have been stored * to disk * * @param queue the name of the queue to check for outstanding AIO */ virtual uint32_t outstandingQueueAIO(const broker::PersistableQueue& queue); //@} /** * @name Methods inherited from qpid::broker::TransactionalStore */ //@{ std::auto_ptr begin(); std::auto_ptr begin(const std::string& xid); void prepare(broker::TPCTransactionContext& ctxt); void commit(broker::TransactionContext& ctxt); void abort(broker::TransactionContext& ctxt); void collectPreparedXids(std::set& xids); //@} /** * Request recovery of queue and message state; inherited from Recoverable */ virtual void recover(broker::RecoveryManager& recoverer); // inline management::Manageable::status_t ManagementMethod (uint32_t, management::Args&, std::string&) // { return management::Manageable::STATUS_OK; } // So storage provider can get the broker info. broker::Broker *getBroker() { return broker; } protected: struct StoreOptions : public qpid::Options { StoreOptions(const std::string& name="Store Options"); std::string providerName; }; StoreOptions options; typedef std::map ProviderMap; ProviderMap providers; ProviderMap::const_iterator provider; broker::Broker *broker; }; // class MessageStoreImpl }} // namespace qpid::store #endif /* QPID_SERIALIZER_H */ qpidc-0.16/src/qpid/store/StoreException.h0000664000076400007640000000341311267466670021160 0ustar00jrossjross00000000000000#ifndef QPID_STORE_STOREEXCEPTION_H #define QPID_STORE_STOREEXCEPTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "StorageProvider.h" namespace qpid { namespace store { class StoreException : public std::exception { std::string text; public: StoreException(const std::string& _text) : text(_text) {} StoreException(const std::string& _text, const StorageProvider::Exception& cause) : text(_text + ": " + cause.what()) {} virtual ~StoreException() throw() {} virtual const char* what() const throw() { return text.c_str(); } }; #define THROW_STORE_EXCEPTION(MESSAGE) throw qpid::store::StoreException(boost::str(boost::format("%s (%s:%d)") % (MESSAGE) % __FILE__ % __LINE__)) #define THROW_STORE_EXCEPTION_2(MESSAGE, EXCEPTION) throw qpid::store::StoreException(boost::str(boost::format("%s (%s:%d)") % (MESSAGE) % __FILE__ % __LINE__), EXCEPTION) }} // namespace qpid::store #endif /* QPID_STORE_STOREEXCEPTION_H */ qpidc-0.16/src/qpid/log/0000775000076400007640000000000011752725715015455 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/log/Statement.cpp0000664000076400007640000000434511627206754020131 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/Statement.h" #include "qpid/log/Logger.h" #include #include #include #include namespace qpid { namespace log { namespace { struct NonPrint { bool operator()(unsigned char c) { return !isprint(c) && !isspace(c); } }; const char hex[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; std::string quote(const std::string& str) { NonPrint nonPrint; size_t n = std::count_if(str.begin(), str.end(), nonPrint); if (n==0) return str; std::string ret; ret.reserve(str.size()+2*n); // Avoid extra allocations. for (std::string::const_iterator i = str.begin(); i != str.end(); ++i) { if (nonPrint(*i)) { ret.push_back('\\'); ret.push_back('x'); ret.push_back(hex[((*i) >> 4)&0xf]); ret.push_back(hex[(*i) & 0xf]); } else ret.push_back(*i); } return ret; } } void Statement::log(const std::string& message) { Logger::instance().log(*this, quote(message)); } Statement::Initializer::Initializer(Statement& s) : statement(s) { Logger::instance().add(s); } namespace { const char* names[LevelTraits::COUNT] = { "trace", "debug", "info", "notice", "warning", "error", "critical" }; } // namespace Level LevelTraits::level(const char* name) { for (int i =0; i < LevelTraits::COUNT; ++i) { if (strcmp(names[i], name)==0) return Level(i); } throw std::runtime_error(std::string("Invalid log level name: ")+name); } const char* LevelTraits::name(Level l) { return names[l]; } }} // namespace qpid::log qpidc-0.16/src/qpid/log/Options.cpp0000664000076400007640000000667411717465066017632 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/Options.h" #include "qpid/log/SinkOptions.h" #include "qpid/log/Statement.h" #include "qpid/Options.h" #include #include #include namespace qpid { namespace log { using namespace std; Options::Options(const std::string& argv0_, const std::string& name_) : qpid::Options(name_), argv0(argv0_), name(name_), time(true), level(true), thread(false), source(false), function(false), hiresTs(false), trace(false), sinkOptions (SinkOptions::create(argv0_)) { selectors.push_back("notice+"); ostringstream levels; levels << LevelTraits::name(Level(0)); for (int i = 1; i < LevelTraits::COUNT; ++i) levels << " " << LevelTraits::name(Level(i)); addOptions() ("trace,t", optValue(trace), "Enables all logging" ) ("log-enable", optValue(selectors, "RULE"), ("Enables logging for selected levels and components. " "RULE is in the form 'LEVEL[+][:PATTERN]' " "Levels are one of: \n\t "+levels.str()+"\n" "For example:\n" "\t'--log-enable warning+' " "logs all warning, error and critical messages.\n" "\t'--log-enable debug:framing' " "logs debug messages from the framing namespace. " "This option can be used multiple times").c_str()) ("log-time", optValue(time, "yes|no"), "Include time in log messages") ("log-level", optValue(level,"yes|no"), "Include severity level in log messages") ("log-source", optValue(source,"yes|no"), "Include source file:line in log messages") ("log-thread", optValue(thread,"yes|no"), "Include thread ID in log messages") ("log-function", optValue(function,"yes|no"), "Include function signature in log messages") ("log-hires-timestamp", optValue(hiresTs,"yes|no"), "Use hi-resolution timestamps in log messages") ("log-prefix", optValue(prefix,"STRING"), "Prefix to append to all log messages") ; add(*sinkOptions); } Options::Options(const Options &o) : qpid::Options(o.name), argv0(o.argv0), name(o.name), selectors(o.selectors), time(o.time), level(o.level), thread(o.thread), source(o.source), function(o.function), hiresTs(o.hiresTs), trace(o.trace), prefix(o.prefix), sinkOptions (SinkOptions::create(o.argv0)) { *sinkOptions = *o.sinkOptions; } Options& Options::operator=(const Options& x) { if (this != &x) { argv0 = x.argv0; name = x.name; selectors = x.selectors; time = x.time; level= x.level; thread = x.thread; source = x.source; function = x.function; hiresTs = x.hiresTs; trace = x.trace; prefix = x.prefix; *sinkOptions = *x.sinkOptions; } return *this; } }} // namespace qpid::log qpidc-0.16/src/qpid/log/windows/0000775000076400007640000000000011752725716017150 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/log/windows/SinkOptions.cpp0000664000076400007640000001114211564561455022132 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/windows/SinkOptions.h" #include "qpid/log/SinkOptions.h" #include "qpid/log/Logger.h" #include "qpid/log/OstreamOutput.h" #include "qpid/memory.h" #include "qpid/Exception.h" #include #include #include #include using qpid::Exception; namespace qpid { namespace log { namespace windows { namespace { // 'eventTypes' maps qpid log levels to Windows event types. They are in // order of qpid log levels and must map to: // "trace", "debug", "info", "notice", "warning", "error", "critical" static int eventTypes[qpid::log::LevelTraits::COUNT] = { EVENTLOG_INFORMATION_TYPE, /* trace */ EVENTLOG_INFORMATION_TYPE, /* debug */ EVENTLOG_INFORMATION_TYPE, /* info */ EVENTLOG_INFORMATION_TYPE, /* notice */ EVENTLOG_WARNING_TYPE, /* warning */ EVENTLOG_ERROR_TYPE, /* error */ EVENTLOG_ERROR_TYPE /* critical */ }; } // namespace class EventLogOutput : public qpid::log::Logger::Output { public: EventLogOutput(const std::string& /*sourceName*/) : logHandle(0) { logHandle = OpenEventLog(0, "Application"); } virtual ~EventLogOutput() { if (logHandle) CloseEventLog(logHandle); } virtual void log(const Statement& s, const std::string& m) { if (logHandle) { const char *msg = m.c_str(); ReportEvent(logHandle, eventTypes[s.level], 0, /* category unused */ 0, /* event id */ 0, /* user security id */ 1, /* number of strings */ 0, /* no event-specific data */ &msg, 0); } } private: HANDLE logHandle; }; SinkOptions::SinkOptions(const std::string& /*argv0*/) : qpid::log::SinkOptions(), logToStderr(true), logToStdout(false), logToEventLog(false), eventSource("Application") { addOptions() ("log-to-stderr", optValue(logToStderr, "yes|no"), "Send logging output to stderr") ("log-to-stdout", optValue(logToStdout, "yes|no"), "Send logging output to stdout") ("log-to-file", optValue(logFile, "FILE"), "Send log output to FILE.") ("log-to-eventlog", optValue(logToEventLog, "yes|no"), "Send logging output to event log;\n\tcustomize using --syslog-name and --syslog-facility") ("eventlog-source-name", optValue(eventSource, "Application"), "Event source to log to") ; } qpid::log::SinkOptions& SinkOptions::operator=(const qpid::log::SinkOptions& rhs) { const SinkOptions *prhs = dynamic_cast(&rhs); if (this != prhs) { logToStderr = prhs->logToStderr; logToStdout = prhs->logToStdout; logToEventLog = prhs->logToEventLog; eventSource = prhs->eventSource; logFile = prhs->logFile; } return *this; } void SinkOptions::detached(void) { if (logToStderr && !logToStdout && !logToEventLog) { logToStderr = false; logToEventLog = true; } } // The Logger acting on these options calls setup() to request any // Sinks be set up and fed back to the logger. void SinkOptions::setup(qpid::log::Logger *logger) { if (logToStderr) logger->output(make_auto_ptr (new qpid::log::OstreamOutput(std::clog))); if (logToStdout) logger->output(make_auto_ptr (new qpid::log::OstreamOutput(std::cout))); if (logFile.length() > 0) logger->output(make_auto_ptr (new qpid::log::OstreamOutput(logFile))); if (logToEventLog) logger->output(make_auto_ptr (new EventLogOutput(eventSource))); } } // namespace windows SinkOptions* SinkOptions::create(const std::string& argv0) { return new qpid::log::windows::SinkOptions (argv0); } }} // namespace qpid::log qpidc-0.16/src/qpid/log/windows/SinkOptions.h0000664000076400007640000000342111564561152021572 0ustar00jrossjross00000000000000#ifndef QPID_LOG_WINDOWS_SINKOPTIONS_H #define QPID_LOG_WINDOWS_SINKOPTIONS_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/SinkOptions.h" #include namespace qpid { namespace log { namespace windows { struct QPID_COMMON_CLASS_EXTERN SinkOptions : public qpid::log::SinkOptions { QPID_COMMON_EXTERN SinkOptions(const std::string& argv0); virtual ~SinkOptions() {} QPID_COMMON_EXTERN virtual qpid::log::SinkOptions& operator=(const qpid::log::SinkOptions& rhs); // This allows the caller to indicate that there's no normal outputs // available. For example, when running as a service. In these cases, the // platform's "syslog"-type output should replace the default stderr // unless some other sink has been selected. QPID_COMMON_EXTERN virtual void detached(void); // The Logger acting on these options calls setup() to request any // Sinks be set up and fed back to the logger. QPID_COMMON_EXTERN virtual void setup(qpid::log::Logger *logger); bool logToStderr; bool logToStdout; bool logToEventLog; std::string eventSource; std::string logFile; }; }}} // namespace qpid::log::windows #endif /*!QPID_LOG_WINDOWS_SINKOPTIONS_H*/ qpidc-0.16/src/qpid/log/OstreamOutput.cpp0000664000076400007640000000217011227113407020776 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/OstreamOutput.h" #include using namespace std; namespace qpid { namespace log { OstreamOutput::OstreamOutput(std::ostream& o) : out(&o) {} OstreamOutput::OstreamOutput(const std::string& file) : out(new ofstream(file.c_str(), ios_base::out | ios_base::app)), mine(out) { if (!out->good()) throw std::runtime_error("Can't open log file: "+file); } void OstreamOutput::log(const Statement&, const std::string& m) { *out << m << flush; } }} // namespace qpid::log qpidc-0.16/src/qpid/log/posix/0000775000076400007640000000000011752725715016617 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/log/posix/SinkOptions.cpp0000664000076400007640000001544611633651740021607 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/posix/SinkOptions.h" #include "qpid/log/SinkOptions.h" #include "qpid/log/Logger.h" #include "qpid/log/OstreamOutput.h" #include "qpid/memory.h" #include "qpid/Exception.h" #include #include #include #include using std::string; using qpid::Exception; namespace { // SyslogFacilities maps from syslog values to the text equivalents. class SyslogFacilities { public: typedef std::map ByName; typedef std::map ByValue; SyslogFacilities() { struct NameValue { const char* name; int value; }; NameValue nameValue[] = { { "AUTH", LOG_AUTH }, #ifdef HAVE_LOG_AUTHPRIV { "AUTHPRIV", LOG_AUTHPRIV }, #endif { "CRON", LOG_CRON }, { "DAEMON", LOG_DAEMON }, #ifdef HAVE_LOG_FTP { "FTP", LOG_FTP }, #endif { "KERN", LOG_KERN }, { "LOCAL0", LOG_LOCAL0 }, { "LOCAL1", LOG_LOCAL1 }, { "LOCAL2", LOG_LOCAL2 }, { "LOCAL3", LOG_LOCAL3 }, { "LOCAL4", LOG_LOCAL4 }, { "LOCAL5", LOG_LOCAL5 }, { "LOCAL6", LOG_LOCAL6 }, { "LOCAL7", LOG_LOCAL7 }, { "LPR", LOG_LPR }, { "MAIL", LOG_MAIL }, { "NEWS", LOG_NEWS }, { "SYSLOG", LOG_SYSLOG }, { "USER", LOG_USER }, { "UUCP", LOG_UUCP } }; for (size_t i = 0; i < sizeof(nameValue)/sizeof(nameValue[0]); ++i) { byName.insert(ByName::value_type(nameValue[i].name, nameValue[i].value)); // Recognise with and without LOG_ prefix e.g.: AUTH and LOG_AUTH byName.insert(ByName::value_type(string("LOG_")+nameValue[i].name, nameValue[i].value)); byValue.insert(ByValue::value_type(nameValue[i].value, string("LOG_")+nameValue[i].name)); } } int value(const string& name) const { string key(name); std::transform(key.begin(), key.end(), key.begin(), ::toupper); ByName::const_iterator i = byName.find(key); if (i == byName.end()) throw Exception("Not a valid syslog facility: " + name); return i->second; } string name(int value) const { ByValue::const_iterator i = byValue.find(value); if (i == byValue.end()) throw Exception("Not a valid syslog value: " + value); return i->second; } private: ByName byName; ByValue byValue; }; // 'priorities' maps qpid log levels to syslog priorities. They are in // order of qpid log levels and must map to: // "trace", "debug", "info", "notice", "warning", "error", "critical" static int priorities[qpid::log::LevelTraits::COUNT] = { LOG_DEBUG, LOG_DEBUG, LOG_INFO, LOG_NOTICE, LOG_WARNING, LOG_ERR, LOG_CRIT }; std::string basename(const std::string path) { size_t i = path.find_last_of('/'); return path.substr((i == std::string::npos) ? 0 : i+1); } } // namespace namespace qpid { namespace log { namespace posix { std::ostream& operator<<(std::ostream& o, const SyslogFacility& f) { return o << SyslogFacilities().name(f.value); } std::istream& operator>>(std::istream& i, SyslogFacility& f) { std::string name; i >> name; f.value = SyslogFacilities().value(name); return i; } class SyslogOutput : public qpid::log::Logger::Output { public: SyslogOutput(const std::string& logName, const SyslogFacility& logFacility) : name(logName), facility(logFacility.value) { ::openlog(name.c_str(), LOG_PID, facility); } virtual ~SyslogOutput() { ::closelog(); } virtual void log(const Statement& s, const std::string& m) { syslog(priorities[s.level], "%s", m.c_str()); } private: std::string name; int facility; }; SinkOptions::SinkOptions(const std::string& argv0) : qpid::log::SinkOptions(), logToStderr(true), logToStdout(false), logToSyslog(false), syslogName(basename(argv0)), syslogFacility(LOG_DAEMON) { addOptions() ("log-to-stderr", optValue(logToStderr, "yes|no"), "Send logging output to stderr") ("log-to-stdout", optValue(logToStdout, "yes|no"), "Send logging output to stdout") ("log-to-file", optValue(logFile, "FILE"), "Send log output to FILE.") ("log-to-syslog", optValue(logToSyslog, "yes|no"), "Send logging output to syslog;\n\tcustomize using --syslog-name and --syslog-facility") ("syslog-name", optValue(syslogName, "NAME"), "Name to use in syslog messages") ("syslog-facility", optValue(syslogFacility,"LOG_XXX"), "Facility to use in syslog messages") ; } qpid::log::SinkOptions& SinkOptions::operator=(const qpid::log::SinkOptions& rhs) { const SinkOptions *prhs = dynamic_cast(&rhs); if (this != prhs) { logToStderr = prhs->logToStderr; logToStdout = prhs->logToStdout; logToSyslog = prhs->logToSyslog; logFile = prhs->logFile; syslogName = prhs->syslogName; syslogFacility.value = prhs->syslogFacility.value; } return *this; } void SinkOptions::detached(void) { if (logToStderr && !logToStdout && !logToSyslog && logFile.empty()) { logToStderr = false; logToSyslog = true; } } // The Logger acting on these options calls setup() to request any // Sinks be set up and fed back to the logger. void SinkOptions::setup(qpid::log::Logger *logger) { if (logToStderr) logger->output(make_auto_ptr (new qpid::log::OstreamOutput(std::clog))); if (logToStdout) logger->output(make_auto_ptr (new qpid::log::OstreamOutput(std::cout))); if (logFile.length() > 0) logger->output(make_auto_ptr (new qpid::log::OstreamOutput(logFile))); if (logToSyslog) logger->output(make_auto_ptr (new SyslogOutput(syslogName, syslogFacility))); } } // namespace qpid::log::posix SinkOptions* SinkOptions::create(const std::string& argv0) { return new qpid::log::posix::SinkOptions (argv0); } }} // namespace qpid::log qpidc-0.16/src/qpid/log/posix/SinkOptions.h0000664000076400007640000000362111075467676021261 0ustar00jrossjross00000000000000#ifndef QPID_LOG_POSIX_SINKOPTIONS_H #define QPID_LOG_POSIX_SINKOPTIONS_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/SinkOptions.h" #include namespace qpid { namespace log { namespace posix { /** * Provides a type that can be passed to << and >> operators to convert * syslog facility values to/from strings. */ struct SyslogFacility { int value; SyslogFacility(int i=0) : value(i) {} }; struct SinkOptions : public qpid::log::SinkOptions { SinkOptions(const std::string& argv0); virtual ~SinkOptions() {} virtual qpid::log::SinkOptions& operator=(const qpid::log::SinkOptions& rhs); // This allows the caller to indicate that there's no normal outputs // available. For example, when running as a daemon. In these cases, the // platform's "syslog"-type output should replace the default stderr // unless some other sink has been selected. virtual void detached(void); // The Logger acting on these options calls setup() to request any // Sinks be set up and fed back to the logger. virtual void setup(qpid::log::Logger *logger); bool logToStderr; bool logToStdout; bool logToSyslog; std::string logFile; std::string syslogName; SyslogFacility syslogFacility; }; }}} // namespace qpid::log::posix #endif /*!QPID_LOG_POSIX_SINKOPTIONS_H*/ qpidc-0.16/src/qpid/log/OstreamOutput.h0000664000076400007640000000206011227113407020441 0ustar00jrossjross00000000000000#ifndef QPID_LOG_OSTREAMOUTPUT_H #define QPID_LOG_OSTREAMOUTPUT_H /* * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/Logger.h" #include #include #include namespace qpid { namespace log { /** * OstreamOutput is a reusable logging sink that directs logging to a C++ * ostream. */ class OstreamOutput : public qpid::log::Logger::Output { public: QPID_COMMON_EXTERN OstreamOutput(std::ostream& o); QPID_COMMON_EXTERN OstreamOutput(const std::string& file); virtual void log(const Statement&, const std::string& m); private: std::ostream* out; boost::scoped_ptr mine; }; }} // namespace qpid::log #endif /*!QPID_LOG_OSTREAMOUTPUT_H*/ qpidc-0.16/src/qpid/log/Logger.cpp0000664000076400007640000001075611717465066017412 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/Logger.h" #include "qpid/log/Options.h" #include "qpid/log/SinkOptions.h" #include "qpid/memory.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Time.h" #include "qpid/DisableExceptionLogging.h" #if (BOOST_VERSION >= 104000) #include #else #include #endif #include #include #include #include #include #include #include namespace qpid { namespace log { using namespace std; typedef sys::Mutex::ScopedLock ScopedLock; inline void Logger::enable_unlocked(Statement* s) { s->enabled=selector.isEnabled(s->level, s->function); } Logger& Logger::instance() { #if (BOOST_VERSION >= 104000) return boost::serialization::singleton::get_mutable_instance(); #else return boost::details::pool::singleton_default::instance(); #endif } Logger::Logger() : flags(0) { // Disable automatic logging in Exception constructors to avoid // re-entrant use of logger singleton if there is an error in // option parsing. DisableExceptionLogging del; // Initialize myself from env variables so all programs // (e.g. tests) can use logging even if they don't parse // command line args. Options opts(""); opts.parse(0, 0); configure(opts); } Logger::~Logger() {} void Logger::select(const Selector& s) { ScopedLock l(lock); selector=s; std::for_each(statements.begin(), statements.end(), boost::bind(&Logger::enable_unlocked, this, _1)); } Logger::Output::Output() {} Logger::Output::~Output() {} void Logger::log(const Statement& s, const std::string& msg) { // Format the message outside the lock. std::ostringstream os; if (!prefix.empty()) os << prefix << ": "; if (flags&TIME) { if (flags&HIRES) qpid::sys::outputHiresNow(os); else qpid::sys::outputFormattedNow(os); } if (flags&LEVEL) os << LevelTraits::name(s.level) << " "; if (flags&THREAD) os << "[0x" << hex << qpid::sys::Thread::logId() << "] "; if (flags&FILE) os << s.file << ":"; if (flags&LINE) os << dec << s.line << ":"; if (flags&FUNCTION) os << s.function << ":"; if (flags & (FILE|LINE|FUNCTION)) os << " "; os << msg << endl; std::string formatted=os.str(); { ScopedLock l(lock); std::for_each(outputs.begin(), outputs.end(), boost::bind(&Output::log, _1, s, formatted)); } } void Logger::output(std::auto_ptr out) { ScopedLock l(lock); outputs.push_back(out.release()); } void Logger::clear() { select(Selector()); // locked format(0); // locked ScopedLock l(lock); outputs.clear(); } void Logger::format(int formatFlags) { ScopedLock l(lock); flags=formatFlags; } static int bitIf(bool test, int bit) { return test ? bit : 0; } int Logger::format(const Options& opts) { int flags= bitIf(opts.level, LEVEL) | bitIf(opts.time, TIME) | bitIf(opts.source, (FILE|LINE)) | bitIf(opts.function, FUNCTION) | bitIf(opts.thread, THREAD) | bitIf(opts.hiresTs, HIRES); format(flags); return flags; } void Logger::add(Statement& s) { ScopedLock l(lock); enable_unlocked(&s); statements.insert(&s); } void Logger::configure(const Options& opts) { options = opts; clear(); Options o(opts); if (o.trace) o.selectors.push_back("trace+"); format(o); select(Selector(o)); setPrefix(opts.prefix); options.sinkOptions->setup(this); } void Logger::reconfigure(const std::vector& selectors) { options.selectors = selectors; select(Selector(options)); } void Logger::setPrefix(const std::string& p) { prefix = p; } }} // namespace qpid::log qpidc-0.16/src/qpid/log/Selector.cpp0000664000076400007640000000363011227113407017725 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/Selector.h" #include "qpid/log/Options.h" #include #include #include namespace qpid { namespace log { using namespace std; void Selector::enable(const string& enableStr) { string level, pattern; size_t c=enableStr.find(':'); if (c==string::npos) { level=enableStr; } else { level=enableStr.substr(0,c); pattern=enableStr.substr(c+1); } if (!level.empty() && level[level.size()-1]=='+') { for (int i = LevelTraits::level(level.substr(0,level.size()-1)); i < LevelTraits::COUNT; ++i) enable(Level(i), pattern); } else { enable(LevelTraits::level(level), pattern); } } Selector::Selector(const Options& opt){ for_each(opt.selectors.begin(), opt.selectors.end(), boost::bind(&Selector::enable, this, _1)); } bool Selector::isEnabled(Level level, const char* function) { const char* functionEnd = function+::strlen(function); for (std::vector::iterator i=substrings[level].begin(); i != substrings[level].end(); ++i) { if (std::search(function, functionEnd, i->begin(), i->end()) != functionEnd) return true; } return false; } }} // namespace qpid::log qpidc-0.16/src/qpid/log/Helpers.h0000664000076400007640000000467010677225137017235 0ustar00jrossjross00000000000000#ifndef QPID_LOG_HELPERS_H #define QPID_LOG_HELPERS_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include namespace qpid { namespace log { /** @file Helper classes for logging complex types */ /// @internal template struct ListFormatter { typedef typename boost::range_const_iterator::type Iterator; boost::iterator_range range; const char* separator; ListFormatter(const Range& r, const char* s=", ") : range(r), separator(s) {} }; /// @internal template std::ostream& operator<<(std::ostream& out, const ListFormatter& sl) { typename ListFormatter::Iterator i = sl.range.begin(); if (i != sl.range.end()) out << *(i++); while (i != sl.range.end()) out << sl.separator << *(i++); return out; } /** Return a formatting object with operator << * to stream range as a separated list. *@param range: a range - all standard containers are ranges, * as is a pair of iterators. *@param separator: printed between elements, default ", " */ template ListFormatter formatList(const Range& range, const char* separator=", ") { return ListFormatter(range, separator); } /** Return a formatting object with operator << * to stream the range defined by iterators [begin, end) * as a separated list. *@param begin, end: Beginning and end of range. *@param separator: printed between elements, default ", " */ template ListFormatter > formatList(U begin, V end, const char* separator=", ") { return formatList(std::make_pair(begin,end), separator); } }} // namespace qpid::log #endif /*!QPID_LOG_HELPERS_H*/ qpidc-0.16/src/qpid/acl/0000775000076400007640000000000011752725715015433 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/acl/Acl.h0000664000076400007640000000514511723741731016302 0ustar00jrossjross00000000000000#ifndef QPID_ACL_ACL_H #define QPID_ACL_ACL_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/acl/AclReader.h" #include "qpid/RefCounted.h" #include "qpid/broker/AclModule.h" #include "qpid/management/Manageable.h" #include "qpid/management/ManagementAgent.h" #include "qmf/org/apache/qpid/acl/Acl.h" #include "qpid/sys/Mutex.h" #include #include namespace qpid { namespace broker { class Broker; } namespace acl { struct AclValues { std::string aclFile; }; class Acl : public broker::AclModule, public RefCounted, public management::Manageable { private: acl::AclValues aclValues; broker::Broker* broker; bool transferAcl; boost::shared_ptr data; qmf::org::apache::qpid::acl::Acl* mgmtObject; // mgnt owns lifecycle qpid::management::ManagementAgent* agent; mutable qpid::sys::Mutex dataLock; public: Acl (AclValues& av, broker::Broker& b); void initialize(); inline virtual bool doTransferAcl() {return transferAcl;}; // create specilied authorise methods for cases that need faster matching as needed. virtual bool authorise( const std::string& id, const Action& action, const ObjectType& objType, const std::string& name, std::map* params=0); virtual bool authorise( const std::string& id, const Action& action, const ObjectType& objType, const std::string& ExchangeName, const std::string& RoutingKey); virtual ~Acl(); private: bool result( const AclResult& aclreslt, const std::string& id, const Action& action, const ObjectType& objType, const std::string& name); bool readAclFile(std::string& errorText); bool readAclFile(std::string& aclFile, std::string& errorText); virtual qpid::management::ManagementObject* GetManagementObject(void) const; virtual management::Manageable::status_t ManagementMethod (uint32_t methodId, management::Args& args, std::string& text); }; }} // namespace qpid::acl #endif // QPID_ACL_ACL_H qpidc-0.16/src/qpid/acl/AclReader.cpp0000664000076400007640000005072011723741731017757 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/acl/AclReader.h" #include #include #include #include #include "qpid/log/Statement.h" #include "qpid/Exception.h" #include // degug #include // debug #define ACL_FORMAT_ERR_LOG_PREFIX "ACL format error: " << fileName << ":" << lineNumber << ": " namespace qpid { namespace acl { AclReader::aclRule::aclRule(const AclResult r, const std::string n, const groupMap& groups) : res(r), actionAll(true), objStatus(NONE) { processName(n, groups); } AclReader::aclRule::aclRule(const AclResult r, const std::string n, const groupMap& groups, const Action a) : res(r), actionAll(false), action(a), objStatus(NONE) { processName(n, groups); } void AclReader::aclRule::setObjectType(const ObjectType o) { objStatus = VALUE; object = o; } void AclReader::aclRule::setObjectTypeAll() { objStatus = ALL; } bool AclReader::aclRule::addProperty(const SpecProperty p, const std::string v) { return props.insert(propNvPair(p, v)).second; } bool AclReader::aclRule::validate(const AclHelper::objectMapPtr& /*validationMap*/) { // TODO - invalid rules won't ever be called in real life... return true; } // Debug aid std::string AclReader::aclRule::toString() { std::ostringstream oss; oss << AclHelper::getAclResultStr(res) << " ["; for (nsCitr itr = names.begin(); itr != names.end(); itr++) { if (itr != names.begin()) oss << ", "; oss << *itr; } oss << "]"; if (actionAll) { oss << " *"; } else { oss << " " << AclHelper::getActionStr(action); } if (objStatus == ALL) { oss << " *"; } else if (objStatus == VALUE) { oss << " " << AclHelper::getObjectTypeStr(object); } for (pmCitr i=props.begin(); i!=props.end(); i++) { oss << " " << AclHelper::getPropertyStr(i->first) << "=" << i->second; } return oss.str(); } void AclReader::loadDecisionData(boost::shared_ptr d) { d->clear(); QPID_LOG(debug, "ACL: Load Rules"); bool foundmode = false; rlCitr i = rules.end(); for (int cnt = rules.size(); cnt; cnt--) { i--; QPID_LOG(debug, "ACL: Processing " << std::setfill(' ') << std::setw(2) << cnt << " " << (*i)->toString()); if (!foundmode && (*i)->actionAll && (*i)->names.size() == 1 && (*((*i)->names.begin())).compare("*") == 0) { d->decisionMode = (*i)->res; QPID_LOG(debug, "ACL: FoundMode " << AclHelper::getAclResultStr(d->decisionMode)); foundmode = true; } else { AclData::rule rule(cnt, (*i)->res, (*i)->props); // Action -> Object -> map set > std::ostringstream actionstr; for (int acnt = ((*i)->actionAll ? 0 : (*i)->action); acnt < acl::ACTIONSIZE; (*i)->actionAll ? acnt++ : acnt = acl::ACTIONSIZE) { if (acnt == acl::ACT_PUBLISH) d->transferAcl = true; // we have transfer ACL actionstr << AclHelper::getActionStr((Action) acnt) << ","; //find the Action, create if not exist if (d->actionList[acnt] == NULL) { d->actionList[acnt] = new AclData::aclAction[qpid::acl::OBJECTSIZE]; for (int j = 0; j < qpid::acl::OBJECTSIZE; j++) d->actionList[acnt][j] = NULL; } // TODO: optimize this loop to limit to valid options only!! for (int ocnt = ((*i)->objStatus != aclRule::VALUE ? 0 : (*i)->object); ocnt < acl::OBJECTSIZE; (*i)->objStatus != aclRule::VALUE ? ocnt++ : ocnt = acl::OBJECTSIZE) { //find the Object, create if not exist if (d->actionList[acnt][ocnt] == NULL) d->actionList[acnt][ocnt] = new AclData::actionObject; // add users and Rule to object set bool allNames = false; // check to see if names.begin is '*' if ((*(*i)->names.begin()).compare("*") == 0) allNames = true; for (nsCitr itr = (allNames ? names.begin() : (*i)->names.begin()); itr != (allNames ? names.end() : (*i)->names.end()); itr++) { AclData::actObjItr itrRule = d->actionList[acnt][ocnt]->find(*itr); if (itrRule == d->actionList[acnt][ocnt]->end()) { AclData::ruleSet rSet; rSet.push_back(rule); d->actionList[acnt][ocnt]->insert (make_pair(std::string(*itr), rSet)); } else { // TODO add code to check for dead rules // allow peter create queue name=tmp <-- dead rule!! // allow peter create queue itrRule->second.push_back(rule); } } } } std::ostringstream objstr; for (int ocnt = ((*i)->objStatus != aclRule::VALUE ? 0 : (*i)->object); ocnt < acl::OBJECTSIZE; (*i)->objStatus != aclRule::VALUE ? ocnt++ : ocnt = acl::OBJECTSIZE) { objstr << AclHelper::getObjectTypeStr((ObjectType) ocnt) << ","; } bool allNames = ((*(*i)->names.begin()).compare("*") == 0); std::ostringstream userstr; for (nsCitr itr = (allNames ? names.begin() : (*i)->names.begin()); itr != (allNames ? names.end() : (*i)->names.end()); itr++) { userstr << *itr << ","; } QPID_LOG(debug, "ACL: Adding actions {" << actionstr.str().substr(0,actionstr.str().length()-1) << "} to objects {" << objstr.str().substr(0,objstr.str().length()-1) << "} with props " << AclHelper::propertyMapToString(&rule.props) << " for users {" << userstr.str().substr(0,userstr.str().length()-1) << "}" ); } } } void AclReader::aclRule::processName(const std::string& name, const groupMap& groups) { if (name.compare("all") == 0) { names.insert("*"); } else { gmCitr itr = groups.find(name); if (itr == groups.end()) { names.insert(name); } else { names.insert(itr->second->begin(), itr->second->end()); } } } AclReader::AclReader() : lineNumber(0), contFlag(false), validationMap(new AclHelper::objectMap) { AclHelper::loadValidationMap(validationMap); names.insert("*"); } AclReader::~AclReader() {} std::string AclReader::getError() { return errorStream.str(); } int AclReader::read(const std::string& fn, boost::shared_ptr d) { fileName = fn; lineNumber = 0; char buff[1024]; std::ifstream ifs(fn.c_str(), std::ios_base::in); if (!ifs.good()) { errorStream << "Unable to open ACL file \"" << fn << "\": eof=" << (ifs.eof()?"T":"F") << "; fail=" << (ifs.fail()?"T":"F") << "; bad=" << (ifs.bad()?"T":"F"); return -1; } try { bool err = false; while (ifs.good()) { ifs.getline(buff, 1024); lineNumber++; if (std::strlen(buff) > 0 && buff[0] != '#') // Ignore blank lines and comments err |= !processLine(buff); } if (!ifs.eof()) { errorStream << "Unable to read ACL file \"" << fn << "\": eof=" << (ifs.eof()?"T":"F") << "; fail=" << (ifs.fail()?"T":"F") << "; bad=" << (ifs.bad()?"T":"F"); ifs.close(); return -2; } ifs.close(); if (err) return -3; QPID_LOG(notice, "ACL: Read file \"" << fn << "\""); } catch (const std::exception& e) { errorStream << "Unable to read ACL file \"" << fn << "\": " << e.what(); ifs.close(); return -4; } catch (...) { errorStream << "Unable to read ACL file \"" << fn << "\": Unknown exception"; ifs.close(); return -5; } printNames(); printRules(); loadDecisionData(d); return 0; } bool AclReader::processLine(char* line) { bool ret = false; std::vector toks; // Check for continuation char* contCharPtr = std::strrchr(line, '\\'); bool cont = contCharPtr != 0; if (cont) *contCharPtr = 0; int numToks = tokenize(line, toks); if (cont && numToks == 0){ errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line \"" << lineNumber << "\" contains an illegal extension."; return false; } if (numToks && (toks[0].compare("group") == 0 || contFlag)) { ret = processGroupLine(toks, cont); } else if (numToks && toks[0].compare("acl") == 0) { ret = processAclLine(toks); } else { // Check for whitespace only line, ignore these bool ws = true; for (unsigned i=0; i& toks) { const char* tokChars = " \t\n\f\v\r"; int cnt = 0; char* cp = std::strtok(line, tokChars); while (cp != 0) { toks.push_back(std::string(cp)); cnt++; cp = std::strtok(0, tokChars); } return cnt; } // Return true if the line is successfully processed without errors // If cont is true, then groupName must be set to the continuation group name bool AclReader::processGroupLine(tokList& toks, const bool cont) { const unsigned toksSize = toks.size(); if (contFlag) { gmCitr citr = groups.find(groupName); for (unsigned i = 0; i < toksSize; i++) { if (!isValidUserName(toks[i])) return false; addName(toks[i], citr->second); } } else { const unsigned minimumSize = (cont ? 2 : 3); if (toksSize < minimumSize) { errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber << ", Insufficient tokens for group definition."; return false; } if (!isValidGroupName(toks[1])) { errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber << ", Group name \"" << toks[1] << "\" contains illegal characters."; return false; } gmCitr citr = addGroup(toks[1]); if (citr == groups.end()) return false; for (unsigned i = 2; i < toksSize; i++) { if (!isValidUserName(toks[i])) return false; addName(toks[i], citr->second); } } return true; } // Return true if sucessfully added group AclReader::gmCitr AclReader::addGroup(const std::string& newGroupName) { gmCitr citr = groups.find(newGroupName); if (citr != groups.end()) { errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber << ", Duplicate group name \"" << newGroupName << "\"."; return groups.end(); } groupPair p(newGroupName, nameSetPtr(new nameSet)); gmRes res = groups.insert(p); assert(res.second); groupName = newGroupName; return res.first; } void AclReader::addName(const std::string& name, nameSetPtr groupNameSet) { gmCitr citr = groups.find(name); if (citr != groups.end() && citr->first != name){ // This is a previously defined group: add all the names in that group to this group groupNameSet->insert(citr->second->begin(), citr->second->end()); } else { // Not a known group name groupNameSet->insert(name); addName(name); } } void AclReader::addName(const std::string& name) { names.insert(name); } // Debug aid void AclReader::printNames() const { QPID_LOG(debug, "ACL: Group list: " << groups.size() << " groups found:" ); std::string tmp("ACL: "); for (gmCitr i=groups.begin(); i!= groups.end(); i++) { tmp += " \""; tmp += i->first; tmp += "\":"; for (nsCitr j=i->second->begin(); j!=i->second->end(); j++) { tmp += " "; tmp += *j; } QPID_LOG(debug, tmp); tmp = "ACL: "; } QPID_LOG(debug, "ACL: name list: " << names.size() << " names found:" ); tmp = "ACL: "; for (nsCitr k=names.begin(); k!=names.end(); k++) { tmp += " "; tmp += *k; } QPID_LOG(debug, tmp); } bool AclReader::processAclLine(tokList& toks) { const unsigned toksSize = toks.size(); if (toksSize < 4) { errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber << ", Insufficient tokens for acl definition."; return false; } AclResult res; try { res = AclHelper::getAclResult(toks[1]); } catch (...) { errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber << ", Unknown ACL permission \"" << toks[1] << "\"."; return false; } bool actionAllFlag = toks[3].compare("all") == 0; bool userAllFlag = toks[2].compare("all") == 0; Action action; if (actionAllFlag) { if (userAllFlag && toksSize > 4) { errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber << ", Tokens found after action \"all\"."; return false; } action = ACT_CONSUME; // dummy; compiler must initialize action for this code path } else { try { action = AclHelper::getAction(toks[3]); } catch (...) { errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber << ", Unknown action \"" << toks[3] << "\"."; return false; } } // Create rule obj; then add object (if any) and properties (if any) aclRulePtr rule; if (actionAllFlag) { rule.reset(new aclRule(res, toks[2], groups)); } else { rule.reset(new aclRule(res, toks[2], groups, action)); } if (toksSize >= 5) { // object name-value pair if (toks[4].compare("all") == 0) { rule->setObjectTypeAll(); } else { try { rule->setObjectType(AclHelper::getObjectType(toks[4])); } catch (...) { errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber << ", Unknown object \"" << toks[4] << "\"."; return false; } } } if (toksSize >= 6) { // property name-value pair(s) for (unsigned i=5; iaddProperty(prop, propNvp.second); } } // Check if name (toks[2]) is group; if not, add as name of individual if (toks[2].compare("all") != 0) { if (groups.find(toks[2]) == groups.end()) { addName(toks[2]); } } // If rule validates, add to rule list if (!rule->validate(validationMap)) { errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Line : " << lineNumber << ", Invalid object/action/property combination."; return false; } rules.push_back(rule); return true; } // Debug aid void AclReader::printRules() const { QPID_LOG(debug, "ACL: Rule list: " << rules.size() << " ACL rules found:"); int cnt = 1; for (rlCitr i=rules.begin(); itoString()); } } // Static function // Return true if the name is well-formed (ie contains legal characters) bool AclReader::isValidGroupName(const std::string& name) { for (unsigned i=0; i #include #include namespace qpid { namespace acl { class AclValidator { /* Base Property */ class PropertyType{ public: virtual ~PropertyType(){}; virtual bool validate(const std::string& val)=0; virtual std::string allowedValues()=0; }; class IntPropertyType : public PropertyType{ int64_t min; int64_t max; public: IntPropertyType(int64_t min,int64_t max); virtual ~IntPropertyType (){}; virtual bool validate(const std::string& val); virtual std::string allowedValues(); }; class EnumPropertyType : public PropertyType{ std::vector values; public: EnumPropertyType(std::vector& allowed); virtual ~EnumPropertyType (){}; virtual bool validate(const std::string& val); virtual std::string allowedValues(); }; typedef std::pair > Validator; typedef std::map > ValidatorMap; typedef ValidatorMap::iterator ValidatorItr; ValidatorMap validators; public: void validateRuleSet(std::pair& rules); void validateRule(qpid::acl::AclData::rule& rule); void validateProperty(std::pair& prop); void validate(boost::shared_ptr d); AclValidator(); ~AclValidator(); }; }} // namespace qpid::acl #endif // QPID_ACL_ACLVALIDATOR_H qpidc-0.16/src/qpid/acl/AclData.h0000664000076400007640000001032111723741731017064 0ustar00jrossjross00000000000000#ifndef QPID_ACL_ACLDATA_H #define QPID_ACL_ACLDATA_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/broker/AclModule.h" #include #include namespace qpid { namespace acl { class AclData { public: typedef std::map propertyMap; typedef propertyMap::const_iterator propertyMapItr; typedef std::map specPropertyMap; typedef specPropertyMap::const_iterator specPropertyMapItr; // // rule // // Created by AclReader and stored in a ruleSet vector for subsequent // run-time lookup matching and allow/deny decisions. // RuleSet vectors are indexed by Action-Object-actorId so these // attributes are not part of a rule. // A single ACL file entry may create many rule entries in // many ruleset vectors. // struct rule { int rawRuleNum; // rule number in ACL file qpid::acl::AclResult ruleMode; // combined allow/deny log/nolog specPropertyMap props; // rule (int ruleNum, qpid::acl::AclResult res, specPropertyMap& p) : rawRuleNum(ruleNum), ruleMode(res), props(p) {}; std::string toString () const { std::ostringstream ruleStr; ruleStr << "[rule " << rawRuleNum << " ruleMode = " << AclHelper::getAclResultStr(ruleMode) << " props{"; for (specPropertyMapItr pMItr = props.begin(); pMItr != props.end(); pMItr++) { ruleStr << " " << AclHelper::getPropertyStr((SpecProperty) pMItr-> first) << "=" << pMItr->second; } ruleStr << " }]"; return ruleStr.str(); } }; typedef std::vector ruleSet; typedef ruleSet::const_iterator ruleSetItr; typedef std::map actionObject; // user typedef actionObject::iterator actObjItr; typedef actionObject* aclAction; // Action*[] -> Object*[] -> map set > aclAction* actionList[qpid::acl::ACTIONSIZE]; qpid::acl::AclResult decisionMode; // allow/deny[-log] if no matching rule found bool transferAcl; std::string aclSource; AclResult lookup( const std::string& id, // actor id const Action& action, const ObjectType& objType, const std::string& name, // object name std::map* params=0); AclResult lookup( const std::string& id, // actor id const Action& action, const ObjectType& objType, const std::string& ExchangeName, const std::string& RoutingKey); bool matchProp(const std::string & src, const std::string& src1); void clear (); AclData(); virtual ~AclData(); private: bool compareIntMax(const qpid::acl::SpecProperty theProperty, const std::string theAclValue, const std::string theLookupValue); bool compareIntMin(const qpid::acl::SpecProperty theProperty, const std::string theAclValue, const std::string theLookupValue); }; }} // namespace qpid::acl #endif // QPID_ACL_ACLDATA_H qpidc-0.16/src/qpid/acl/AclReader.h0000664000076400007640000001036511723741731017425 0ustar00jrossjross00000000000000#ifndef QPID_ACL_ACLREADER_H #define QPID_ACL_ACLREADER_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include #include #include #include #include #include "qpid/acl/AclData.h" #include "qpid/broker/AclModule.h" namespace qpid { namespace acl { class AclReader { typedef std::set nameSet; typedef nameSet::const_iterator nsCitr; typedef boost::shared_ptr nameSetPtr; typedef std::pair groupPair; typedef std::map groupMap; typedef groupMap::const_iterator gmCitr; typedef std::pair gmRes; typedef std::pair propNvPair; typedef std::map propMap; typedef propMap::const_iterator pmCitr; // // aclRule // // A temporary rule created during ACL file processing. // class aclRule { public: enum objectStatus {NONE, VALUE, ALL}; AclResult res; nameSet names; bool actionAll; // True if action is set to keyword "all" Action action; // Ignored if action is set to keyword "all" objectStatus objStatus; ObjectType object; // Ignored for all status values except VALUE propMap props; public: aclRule(const AclResult r, const std::string n, const groupMap& groups); // action = "all" aclRule(const AclResult r, const std::string n, const groupMap& groups, const Action a); void setObjectType(const ObjectType o); void setObjectTypeAll(); bool addProperty(const SpecProperty p, const std::string v); bool validate(const AclHelper::objectMapPtr& validationMap); std::string toString(); // debug aid private: void processName(const std::string& name, const groupMap& groups); }; typedef boost::shared_ptr aclRulePtr; typedef std::vector ruleList; typedef ruleList::const_iterator rlCitr; typedef std::vector tokList; typedef tokList::const_iterator tlCitr; typedef std::set keywordSet; typedef keywordSet::const_iterator ksCitr; typedef std::pair nvPair; // Name-Value pair std::string fileName; int lineNumber; bool contFlag; std::string groupName; nameSet names; groupMap groups; ruleList rules; AclHelper::objectMapPtr validationMap; std::ostringstream errorStream; public: AclReader(); virtual ~AclReader(); int read(const std::string& fn, boost::shared_ptr d); // return=0 for success std::string getError(); private: bool processLine(char* line); void loadDecisionData( boost::shared_ptr d); int tokenize(char* line, tokList& toks); bool processGroupLine(tokList& toks, const bool cont); gmCitr addGroup(const std::string& groupName); void addName(const std::string& name, nameSetPtr groupNameSet); void addName(const std::string& name); void printNames() const; // debug aid bool processAclLine(tokList& toks); void printRules() const; // debug aid bool isValidUserName(const std::string& name); static bool isValidGroupName(const std::string& name); static nvPair splitNameValuePair(const std::string& nvpString); }; }} // namespace qpid::acl #endif // QPID_ACL_ACLREADER_H qpidc-0.16/src/qpid/acl/AclValidator.cpp0000664000076400007640000001322211723741731020476 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/acl/AclValidator.h" #include "qpid/acl/AclData.h" #include "qpid/Exception.h" #include "qpid/log/Statement.h" #include "qpid/sys/IntegerTypes.h" #include #include #include #include namespace qpid { namespace acl { AclValidator::IntPropertyType::IntPropertyType(int64_t i,int64_t j) : min(i), max(j){ } bool AclValidator::IntPropertyType::validate(const std::string& val) { int64_t v; try { v = boost::lexical_cast(val); }catch(const boost::bad_lexical_cast&){ return 0; } if (v < min || v >= max){ return 0; }else{ return 1; } } std::string AclValidator::IntPropertyType::allowedValues() { return "values should be between " + boost::lexical_cast(min) + " and " + boost::lexical_cast(max); } AclValidator::EnumPropertyType::EnumPropertyType(std::vector& allowed): values(allowed){ } bool AclValidator::EnumPropertyType::validate(const std::string& val) { for (std::vector::iterator itr = values.begin(); itr != values.end(); ++itr ){ if (val.compare(*itr) == 0){ return 1; } } return 0; } std::string AclValidator::EnumPropertyType::allowedValues() { std::ostringstream oss; oss << "possible values are one of { "; for (std::vector::iterator itr = values.begin(); itr != values.end(); itr++ ){ oss << "'" << *itr << "' "; } oss << "}"; return oss.str(); } AclValidator::AclValidator(){ validators.insert(Validator(acl::SPECPROP_MAXQUEUESIZELOWERLIMIT, boost::shared_ptr( new IntPropertyType(0,std::numeric_limits::max())))); validators.insert(Validator(acl::SPECPROP_MAXQUEUESIZEUPPERLIMIT, boost::shared_ptr( new IntPropertyType(0,std::numeric_limits::max())))); validators.insert(Validator(acl::SPECPROP_MAXQUEUECOUNTLOWERLIMIT, boost::shared_ptr( new IntPropertyType(0,std::numeric_limits::max())))); validators.insert(Validator(acl::SPECPROP_MAXQUEUECOUNTUPPERLIMIT, boost::shared_ptr( new IntPropertyType(0,std::numeric_limits::max())))); std::string policyTypes[] = {"ring", "ring_strict", "flow_to_disk", "reject"}; std::vector v(policyTypes, policyTypes + sizeof(policyTypes) / sizeof(std::string)); validators.insert(Validator(acl::SPECPROP_POLICYTYPE, boost::shared_ptr( new EnumPropertyType(v)))); } AclValidator::~AclValidator(){ } /* Iterate through the data model and validate the parameters. */ void AclValidator::validate(boost::shared_ptr d) { for (unsigned int cnt=0; cnt< qpid::acl::ACTIONSIZE; cnt++){ if (d->actionList[cnt]){ for (unsigned int cnt1=0; cnt1< qpid::acl::OBJECTSIZE; cnt1++){ if (d->actionList[cnt][cnt1]){ std::for_each(d->actionList[cnt][cnt1]->begin(), d->actionList[cnt][cnt1]->end(), boost::bind(&AclValidator::validateRuleSet, this, _1)); }//if }//for }//if }//for } void AclValidator::validateRuleSet(std::pair& rules){ std::for_each(rules.second.begin(), rules.second.end(), boost::bind(&AclValidator::validateRule, this, _1)); } void AclValidator::validateRule(qpid::acl::AclData::rule& rule){ std::for_each(rule.props.begin(), rule.props.end(), boost::bind(&AclValidator::validateProperty, this, _1)); } void AclValidator::validateProperty(std::pair& prop){ ValidatorItr itr = validators.find(prop.first); if (itr != validators.end()){ QPID_LOG(debug,"ACL: Found validator for property '" << acl::AclHelper::getPropertyStr(itr->first) << "'. " << itr->second->allowedValues()); if (!itr->second->validate(prop.second)){ QPID_LOG(debug, "ACL: Property failed validation. '" << prop.second << "' is not a valid value for '" << AclHelper::getPropertyStr(prop.first) << "'"); throw Exception( prop.second + " is not a valid value for '" + AclHelper::getPropertyStr(prop.first) + "', " + itr->second->allowedValues()); } } } }} qpidc-0.16/src/qpid/acl/AclPlugin.cpp0000664000076400007640000000534511645334037020016 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #include "qpid/acl/Acl.h" #include "qpid/broker/Broker.h" #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/log/Statement.h" #include #include namespace qpid { namespace acl { using namespace std; /** Note separating options from values to work around boost version differences. * Old boost takes a reference to options objects, but new boost makes a copy. * New boost allows a shared_ptr but that's not compatible with old boost. */ struct AclOptions : public Options { AclValues& values; AclOptions(AclValues& v) : Options("ACL Options"), values(v) { addOptions() ("acl-file", optValue(values.aclFile, "FILE"), "The policy file to load from, loaded from data dir"); } }; struct AclPlugin : public Plugin { AclValues values; AclOptions options; boost::intrusive_ptr acl; AclPlugin() : options(values) {} Options* getOptions() { return &options; } void init(broker::Broker& b) { if (values.aclFile.empty()){ QPID_LOG(info, "Policy file not specified. ACL Disabled, no ACL checking being done!"); return; } if (acl) throw Exception("ACL plugin cannot be initialized twice in one process."); if (values.aclFile.at(0) != '/' && !b.getDataDir().getPath().empty()) { std::ostringstream oss; oss << b.getDataDir().getPath() << "/" << values.aclFile; values.aclFile = oss.str(); } acl = new Acl(values, b); b.setAcl(acl.get()); b.addFinalizer(boost::bind(&AclPlugin::shutdown, this)); } template bool init(Plugin::Target& target) { T* t = dynamic_cast(&target); if (t) init(*t); return t; } void earlyInitialize(Plugin::Target&) {} void initialize(Plugin::Target& target) { init(target); } void shutdown() { acl = 0; } }; static AclPlugin instance; // Static initialization. // For test purposes. boost::intrusive_ptr getGlobalAcl() { return instance.acl; } }} // namespace qpid::acl qpidc-0.16/src/qpid/acl/Acl.cpp0000664000076400007640000001450311724173777016645 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/acl/Acl.h" #include "qpid/acl/AclData.h" #include "qpid/acl/AclValidator.h" #include "qpid/sys/Mutex.h" #include "qpid/broker/Broker.h" #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/log/Logger.h" #include "qpid/types/Variant.h" #include "qmf/org/apache/qpid/acl/Package.h" #include "qmf/org/apache/qpid/acl/EventAllow.h" #include "qmf/org/apache/qpid/acl/EventDeny.h" #include "qmf/org/apache/qpid/acl/EventFileLoaded.h" #include "qmf/org/apache/qpid/acl/EventFileLoadFailed.h" #include #include #include using namespace std; using namespace qpid::acl; using qpid::broker::Broker; using namespace qpid::sys; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; using qpid::management::Args; namespace _qmf = qmf::org::apache::qpid::acl; Acl::Acl (AclValues& av, Broker& b): aclValues(av), broker(&b), transferAcl(false), mgmtObject(0) { agent = broker->getManagementAgent(); if (agent != 0){ _qmf::Package packageInit(agent); mgmtObject = new _qmf::Acl (agent, this, broker); agent->addObject (mgmtObject); } std::string errorString; if (!readAclFile(errorString)){ throw Exception("Could not read ACL file " + errorString); if (mgmtObject!=0) mgmtObject->set_enforcingAcl(0); } QPID_LOG(info, "ACL Plugin loaded"); if (mgmtObject!=0) mgmtObject->set_enforcingAcl(1); } bool Acl::authorise( const std::string& id, const Action& action, const ObjectType& objType, const std::string& name, std::map* params) { boost::shared_ptr dataLocal; { Mutex::ScopedLock locker(dataLock); dataLocal = data; //rcu copy } // add real ACL check here... AclResult aclreslt = dataLocal->lookup(id,action,objType,name,params); return result(aclreslt, id, action, objType, name); } bool Acl::authorise( const std::string& id, const Action& action, const ObjectType& objType, const std::string& ExchangeName, const std::string& RoutingKey) { boost::shared_ptr dataLocal; { Mutex::ScopedLock locker(dataLock); dataLocal = data; //rcu copy } // only use dataLocal here... AclResult aclreslt = dataLocal->lookup(id,action,objType,ExchangeName,RoutingKey); return result(aclreslt, id, action, objType, ExchangeName); } bool Acl::result( const AclResult& aclreslt, const std::string& id, const Action& action, const ObjectType& objType, const std::string& name) { bool result(false); switch (aclreslt) { case ALLOWLOG: QPID_LOG(info, "ACL Allow id:" << id << " action:" << AclHelper::getActionStr(action) << " ObjectType:" << AclHelper::getObjectTypeStr(objType) << " Name:" << name ); agent->raiseEvent(_qmf::EventAllow(id, AclHelper::getActionStr(action), AclHelper::getObjectTypeStr(objType), name, types::Variant::Map())); // FALLTHROUGH case ALLOW: result = true; break; case DENYLOG: QPID_LOG(info, "ACL Deny id:" << id << " action:" << AclHelper::getActionStr(action) << " ObjectType:" << AclHelper::getObjectTypeStr(objType) << " Name:" << name); agent->raiseEvent(_qmf::EventDeny(id, AclHelper::getActionStr(action), AclHelper::getObjectTypeStr(objType), name, types::Variant::Map())); // FALLTHROUGH case DENY: if (mgmtObject!=0) mgmtObject->inc_aclDenyCount(); result = false; break; default: assert (false); } return result; } bool Acl::readAclFile(std::string& errorText) { // only set transferAcl = true if a rule implies the use of ACL on transfer, else keep false for performance reasons. return readAclFile(aclValues.aclFile, errorText); } bool Acl::readAclFile(std::string& aclFile, std::string& errorText) { boost::shared_ptr d(new AclData); AclReader ar; if (ar.read(aclFile, d)){ agent->raiseEvent(_qmf::EventFileLoadFailed("", ar.getError())); errorText = ar.getError(); QPID_LOG(error,ar.getError()); return false; } AclValidator validator; validator.validate(d); { Mutex::ScopedLock locker(dataLock); data = d; } transferAcl = data->transferAcl; // any transfer ACL if (data->transferAcl){ QPID_LOG(debug,"ACL: Transfer ACL is Enabled!"); } data->aclSource = aclFile; if (mgmtObject!=0){ mgmtObject->set_transferAcl(transferAcl?1:0); mgmtObject->set_policyFile(aclFile); sys::AbsTime now = sys::AbsTime::now(); int64_t ns = sys::Duration(sys::EPOCH, now); mgmtObject->set_lastAclLoad(ns); agent->raiseEvent(_qmf::EventFileLoaded("")); } return true; } Acl::~Acl(){} ManagementObject* Acl::GetManagementObject(void) const { return (ManagementObject*) mgmtObject; } Manageable::status_t Acl::ManagementMethod (uint32_t methodId, Args& /*args*/, string& text) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; QPID_LOG (debug, "ACL: Queue::ManagementMethod [id=" << methodId << "]"); switch (methodId) { case _qmf::Acl::METHOD_RELOADACLFILE : readAclFile(text); if (text.empty()) status = Manageable::STATUS_OK; else status = Manageable::STATUS_USER; break; } return status; } qpidc-0.16/src/qpid/acl/AclData.cpp0000664000076400007640000005015611723741731017431 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/acl/AclData.h" #include "qpid/log/Statement.h" #include "qpid/sys/IntegerTypes.h" #include namespace qpid { namespace acl { // // constructor // AclData::AclData(): decisionMode(qpid::acl::DENY), transferAcl(false), aclSource("UNKNOWN") { for (unsigned int cnt=0; cnt< qpid::acl::ACTIONSIZE; cnt++) { actionList[cnt]=0; } } // // clear // void AclData::clear () { for (unsigned int cnt=0; cnt< qpid::acl::ACTIONSIZE; cnt++) { if (actionList[cnt]) { for (unsigned int cnt1=0; cnt1< qpid::acl::OBJECTSIZE; cnt1++) delete actionList[cnt][cnt1]; } delete[] actionList[cnt]; } } // // matchProp // // Compare a rule's property name with a lookup name, // The rule's name may contains a trailing '*' to specify a wildcard match. // bool AclData::matchProp(const std::string& ruleStr, const std::string& lookupStr) { // allow wildcard on the end of rule strings... if (ruleStr.data()[ruleStr.size()-1]=='*') { return ruleStr.compare(0, ruleStr.size()-1, lookupStr, 0, ruleStr.size()-1 ) == 0; } else { return ruleStr.compare(lookupStr) == 0; } } // // lookup // // The ACL main business logic function of matching rules and declaring // an allow or deny result. // AclResult AclData::lookup( const std::string& id, const Action& action, const ObjectType& objType, const std::string& name, std::map* params) { QPID_LOG(debug, "ACL: Lookup for id:" << id << " action:" << AclHelper::getActionStr((Action) action) << " objectType:" << AclHelper::getObjectTypeStr((ObjectType) objType) << " name:" << name << " with params " << AclHelper::propertyMapToString(params)); // A typical log looks like: // ACL: Lookup for id:bob@QPID action:create objectType:queue name:q2 // with params { durable=false passive=false autodelete=false // exclusive=false alternate= policytype= maxqueuesize=0 // maxqueuecount=0 } // Default result is blanket decision mode for the entire ACL list. AclResult aclresult = decisionMode; // Test for lists of rules at the intersection of the Action & Object if (actionList[action] && actionList[action][objType]) { // Find the list of rules for this actorId AclData::actObjItr itrRule = actionList[action][objType]->find(id); // If individual actorId not found then find a rule set for '*'. if (itrRule == actionList[action][objType]->end()) itrRule = actionList[action][objType]->find("*"); if (itrRule != actionList[action][objType]->end()) { // A list of rules exists for this actor/action/object tuple. // Iterate the rule set to search for a matching rule. ruleSetItr rsItr = itrRule->second.end(); for (int cnt = itrRule->second.size(); cnt != 0; cnt--) { rsItr--; QPID_LOG(debug, "ACL: checking rule " << rsItr->toString()); bool match = true; bool limitChecked = true; // Iterate this rule's properties. A 'match' is true when // all of the rule's properties are found to be satisfied // in the lookup param list. The lookup may specify things // (they usually do) that are not in the rule properties but // these things don't interfere with the rule match. for (specPropertyMapItr rulePropMapItr = rsItr->props.begin(); (rulePropMapItr != rsItr->props.end()) && match; rulePropMapItr++) { // The rule property map's NAME property is given in // the calling args and not in the param map. if (rulePropMapItr->first == acl::SPECPROP_NAME) { if (matchProp(rulePropMapItr->second, name)) { QPID_LOG(debug, "ACL: lookup name '" << name << "' matched with rule name '" << rulePropMapItr->second << "'"); } else { match = false; QPID_LOG(debug, "ACL: lookup name '" << name << "' didn't match with rule name '" << rulePropMapItr->second << "'"); } } else { if (params) { // The rule's property map non-NAME properties // found in the lookup's params list. // In some cases the param's index is not the same // as rule's index. propertyMapItr lookupParamItr; switch (rulePropMapItr->first) { case acl::SPECPROP_MAXQUEUECOUNTUPPERLIMIT: case acl::SPECPROP_MAXQUEUECOUNTLOWERLIMIT: lookupParamItr = params->find(PROP_MAXQUEUECOUNT); break; case acl::SPECPROP_MAXQUEUESIZEUPPERLIMIT: case acl::SPECPROP_MAXQUEUESIZELOWERLIMIT: lookupParamItr = params->find(PROP_MAXQUEUESIZE); break; default: lookupParamItr = params->find((Property)rulePropMapItr->first); break; }; if (lookupParamItr == params->end()) { // Now the rule has a specified property // that does not exist in the caller's // lookup params list. // This rule does not match. match = false; QPID_LOG(debug, "ACL: lookup parameter map doesn't contain the rule property '" << AclHelper::getPropertyStr(rulePropMapItr->first) << "'"); } else { // Now account for the business of rules // whose property indexes are mismatched. switch (rulePropMapItr->first) { case acl::SPECPROP_MAXQUEUECOUNTUPPERLIMIT: case acl::SPECPROP_MAXQUEUESIZEUPPERLIMIT: limitChecked &= compareIntMax( rulePropMapItr->first, boost::lexical_cast(rulePropMapItr->second), boost::lexical_cast(lookupParamItr->second)); break; case acl::SPECPROP_MAXQUEUECOUNTLOWERLIMIT: case acl::SPECPROP_MAXQUEUESIZELOWERLIMIT: limitChecked &= compareIntMin( rulePropMapItr->first, boost::lexical_cast(rulePropMapItr->second), boost::lexical_cast(lookupParamItr->second)); break; default: if (matchProp(rulePropMapItr->second, lookupParamItr->second)) { QPID_LOG(debug, "ACL: the pair(" << AclHelper::getPropertyStr(lookupParamItr->first) << "," << lookupParamItr->second << ") given in lookup matched the pair(" << AclHelper::getPropertyStr(rulePropMapItr->first) << "," << rulePropMapItr->second << ") given in the rule"); } else { match = false; QPID_LOG(debug, "ACL: the pair(" << AclHelper::getPropertyStr(lookupParamItr->first) << "," << lookupParamItr->second << ") given in lookup doesn't match the pair(" << AclHelper::getPropertyStr(rulePropMapItr->first) << "," << rulePropMapItr->second << ") given in the rule"); } break; }; } } else { // params don't exist. } } } if (match) { aclresult = rsItr->ruleMode; if (!limitChecked) { // Now a lookup matched all rule properties but one // of the numeric limit checks has failed. // Demote allow rules to corresponding deny rules. switch (aclresult) { case acl::ALLOW: aclresult = acl::DENY; break; case acl::ALLOWLOG: aclresult = acl::DENYLOG; break; default: break; }; } QPID_LOG(debug,"ACL: Successful match, the decision is:" << AclHelper::getAclResultStr(aclresult)); return aclresult; } else { // This rule did not match the requested lookup and // does not contribute to an ACL decision. } } } else { // The Action-Object list has entries but not for this actorId // nor for *. } } else { // The Action-Object list has no entries. } QPID_LOG(debug,"ACL: No successful match, defaulting to the decision mode " << AclHelper::getAclResultStr(aclresult)); return aclresult; } // // lookup // // The ACL main business logic function of matching rules and declaring // an allow or deny result. // AclResult AclData::lookup( const std::string& id, const Action& action, const ObjectType& objType, const std::string& /*Exchange*/ name, const std::string& RoutingKey) { QPID_LOG(debug, "ACL: Lookup for id:" << id << " action:" << AclHelper::getActionStr((Action) action) << " objectType:" << AclHelper::getObjectTypeStr((ObjectType) objType) << " exchange name:" << name << " with routing key " << RoutingKey); AclResult aclresult = decisionMode; if (actionList[action] && actionList[action][objType]){ AclData::actObjItr itrRule = actionList[action][objType]->find(id); if (itrRule == actionList[action][objType]->end()) itrRule = actionList[action][objType]->find("*"); if (itrRule != actionList[action][objType]->end() ) { //loop the vector ruleSetItr rsItr = itrRule->second.end(); for (int cnt = itrRule->second.size(); cnt != 0; cnt--) { rsItr--; // loop the names looking for match bool match =true; for (specPropertyMapItr pMItr = rsItr->props.begin(); (pMItr != rsItr->props.end()) && match; pMItr++) { //match name is exists first switch (pMItr->first) { case acl::SPECPROP_NAME: if (matchProp(pMItr->second, name)) { QPID_LOG(debug, "ACL: lookup exchange name '" << name << "' matched with rule name '" << pMItr->second << "'"); } else { match= false; QPID_LOG(debug, "ACL: lookup exchange name '" << name << "' did not match with rule name '" << pMItr->second << "'"); } break; case acl::SPECPROP_ROUTINGKEY: if (matchProp(pMItr->second, RoutingKey)) { QPID_LOG(debug, "ACL: lookup key name '" << name << "' matched with rule routing key '" << pMItr->second << "'"); } else { match= false; QPID_LOG(debug, "ACL: lookup key name '" << name << "' did not match with rule routing key '" << pMItr->second << "'"); } break; default: // Don't care break; }; } if (match){ aclresult = rsItr->ruleMode; QPID_LOG(debug,"ACL: Successful match, the decision is:" << AclHelper::getAclResultStr(aclresult)); return aclresult; } } } } QPID_LOG(debug,"ACL: No successful match, defaulting to the decision mode " << AclHelper::getAclResultStr(aclresult)); return aclresult; } // // // AclData::~AclData() { clear(); } // // Limit check a MAX int limit // bool AclData::compareIntMax(const qpid::acl::SpecProperty theProperty, const std::string theAclValue, const std::string theLookupValue) { uint64_t aclMax (0); uint64_t paramMax (0); try { aclMax = boost::lexical_cast(theAclValue); } catch(const boost::bad_lexical_cast&) { assert (false); return false; } try { paramMax = boost::lexical_cast(theLookupValue); } catch(const boost::bad_lexical_cast&) { QPID_LOG(error,"ACL: Error evaluating rule. " << "Illegal value given in lookup for property '" << AclHelper::getPropertyStr(theProperty) << "' : " << theLookupValue); return false; } QPID_LOG(debug, "ACL: Numeric greater-than comparison for property " << AclHelper::getPropertyStr(theProperty) << " (value given in lookup = " << theLookupValue << ", value give in rule = " << theAclValue << " )"); if (( aclMax ) && ( paramMax == 0 || paramMax > aclMax)) { QPID_LOG(debug, "ACL: Max limit exceeded for property '" << AclHelper::getPropertyStr(theProperty) << "'"); return false; } return true; } // // limit check a MIN int limit // bool AclData::compareIntMin(const qpid::acl::SpecProperty theProperty, const std::string theAclValue, const std::string theLookupValue) { uint64_t aclMin (0); uint64_t paramMin (0); try { aclMin = boost::lexical_cast(theAclValue); } catch(const boost::bad_lexical_cast&) { assert (false); return false; } try { paramMin = boost::lexical_cast(theLookupValue); } catch(const boost::bad_lexical_cast&) { QPID_LOG(error,"ACL: Error evaluating rule. " << "Illegal value given in lookup for property '" << AclHelper::getPropertyStr(theProperty) << "' : " << theLookupValue); return false; } QPID_LOG(debug, "ACL: Numeric less-than comparison for property " << AclHelper::getPropertyStr(theProperty) << " (value given in lookup = " << theLookupValue << ", value give in rule = " << theAclValue << " )"); if (( aclMin ) && ( paramMin == 0 || paramMin < aclMin)) { QPID_LOG(debug, "ACL: Min limit exceeded for property '" << AclHelper::getPropertyStr(theProperty) << "'"); return false; } return true; } }} qpidc-0.16/src/qpid/StringUtils.cpp0000664000076400007640000000304011227113407017646 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/StringUtils.h" namespace qpid { using std::string; using std::vector; void split(vector& out, const string& in, const string& delims) { string::size_type start = in.find_first_not_of(delims); if (start == string::npos) return; string::size_type end = in.find_first_of(delims, start); while (end != string::npos) { out.push_back(in.substr(start, end - start)); start = in.find_first_not_of(delims, end); if (start == string::npos) return; end = in.find_first_of(delims, start); } out.push_back(in.substr(start)); } vector split(const string& in, const string& delims) { vector out; split(out, in, delims); return out; } } // namespace qpid qpidc-0.16/src/qpid/DataDir.cpp0000664000076400007640000000270411311752102016670 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/DataDir.h" #include "qpid/log/Statement.h" #include "qpid/sys/FileSysDir.h" #include "qpid/sys/LockFile.h" namespace qpid { DataDir::DataDir (std::string path) : enabled (!path.empty ()), dirPath (path) { if (!enabled) { QPID_LOG (info, "No data directory - Disabling persistent configuration"); return; } sys::FileSysDir dir(dirPath); if (!dir.exists()) dir.mkdir(); std::string lockFileName(path); lockFileName += "/lock"; lockFile = std::auto_ptr(new sys::LockFile(lockFileName, true)); } DataDir::~DataDir () {} } // namespace qpid qpidc-0.16/src/qpid/Exception.cpp0000664000076400007640000000443311541711562017331 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/log/Statement.h" #include "qpid/Exception.h" #include "qpid/DisableExceptionLogging.h" #include #include #include namespace qpid { // Note on static initialization order: if an exception is constructed // in a static constructor before disableExceptionLogging has been // initialized, the worst that can happen is we lose an exception log // message. Since we shouldn't be throwing a lot of exceptions during // static construction this seems safe. static bool disableExceptionLogging = false; DisableExceptionLogging::DisableExceptionLogging() { disableExceptionLogging = true; } DisableExceptionLogging::~DisableExceptionLogging() { disableExceptionLogging = false; } Exception::Exception(const std::string& msg) throw() : message(msg) { if (disableExceptionLogging) return; QPID_LOG_IF(debug, !msg.empty(), "Exception constructed: " << message); } Exception::~Exception() throw() {} std::string Exception::getPrefix() const { return ""; } std::string Exception::getMessage() const { return message; } const char* Exception::what() const throw() { // Construct the what string the first time it is needed. if (whatStr.empty()) { whatStr = getPrefix(); if (!whatStr.empty()) whatStr += ": "; whatStr += message; } return whatStr.c_str(); } ClosedException::ClosedException(const std::string& msg) : Exception(msg) {} std::string ClosedException::getPrefix() const { return "Closed"; } } // namespace qpid qpidc-0.16/src/qpid/Version.h0000775000076400007640000000203411350222124016450 0ustar00jrossjross00000000000000#ifndef QPID_VERSION_H #define QPID_VERSION_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include #ifdef HAVE_CONFIG_H # include "config.h" #else # error "config.h not generated" #endif namespace qpid { const std::string product = PACKAGE_NAME; const std::string version = PACKAGE_VERSION; # if HAVE_SASL const std::string saslName = BROKER_SASL_NAME; # else const std::string saslName = "qpidd-no-sasl"; # endif } #endif /*!QPID_VERSION_H*/ qpidc-0.16/src/qpid/Url.cpp0000664000076400007640000002053611723446736016151 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/Url.h" #include "qpid/Exception.h" #include "qpid/Msg.h" #include "qpid/sys/SystemInfo.h" #include "qpid/sys/StrError.h" #include "qpid/client/Connector.h" #include "qpid/sys/Mutex.h" #include #include #include #include #include using namespace std; using boost::lexical_cast; namespace qpid { class ProtocolTags { public: bool find(const string& tag) { sys::Mutex::ScopedLock l(lock); return std::find(tags.begin(), tags.end(), tag) != tags.end(); } void add(const string& tag) { sys::Mutex::ScopedLock l(lock); if (std::find(tags.begin(), tags.end(), tag) == tags.end()) tags.push_back(tag); } static ProtocolTags& instance() { /** First call must be made while program is still single threaded. * This will be the case since tags are registered in static initializers. */ static ProtocolTags tags; return tags; } private: sys::Mutex lock; vector tags; }; Url::Invalid::Invalid(const string& s) : Exception(s) {} Url Url::getHostNameUrl(uint16_t port) { Address address("tcp", std::string(), port); if (!sys::SystemInfo::getLocalHostname(address)) throw Url::Invalid(QPID_MSG("Cannot get host name: " << qpid::sys::strError(errno))); return Url(address); } Url Url::getIpAddressesUrl(uint16_t port) { Url url; sys::SystemInfo::getLocalIpAddresses(port, url); return url; } string Url::str() const { if (cache.empty() && !this->empty()) { ostringstream os; os << *this; cache = os.str(); } return cache; } ostream& operator<<(ostream& os, const Url& url) { os << "amqp:"; if (!url.getUser().empty()) os << url.getUser(); if (!url.getPass().empty()) os << "/" << url.getPass(); if (!(url.getUser().empty() && url.getPass().empty())) os << "@"; Url::const_iterator i = url.begin(); if (i!=url.end()) { os << *i++; while (i != url.end()) os << "," << *i++; } return os; } static const std::string TCP = "tcp"; /** Simple recursive-descent parser for this grammar: url = ["amqp:"][ user ["/" password] "@" ] protocol_addr *("," protocol_addr) protocol_addr = tcp_addr / rmda_addr / ssl_addr / .. others plug-in tcp_addr = ["tcp:"] host [":" port] rdma_addr = "rdma:" host [":" port] ssl_addr = "ssl:" host [":" port] */ class UrlParser { public: UrlParser(Url& u, const char* s, const std::string& defaultProtocol_=Address::TCP) : url(u), text(s), end(s+strlen(s)), i(s), defaultProtocol(defaultProtocol_) {} bool parse() { literal("amqp:"); // Optional userPass(); // Optional return list(&UrlParser::protocolAddr, &UrlParser::comma) && i == end; } private: typedef bool (UrlParser::*Rule)(); bool userPass() { const char* at = std::find(i, end, '@'); if (at == end) return false; const char* slash = std::find(i, at, '/'); url.setUser(string(i, slash)); const char* pass = (slash == at) ? slash : slash+1; url.setPass(string(pass, at)); i = at+1; return true; } bool comma() { return literal(","); } bool protocolAddr() { Address addr(defaultProtocol, "", Address::AMQP_PORT); // Set up defaults protocolTag(addr.protocol); // Optional bool ok = (host(addr.host) && (literal(":") ? port(addr.port) : true)); if (ok) url.push_back(addr); return ok; } bool protocolTag(string& result) { const char* j = std::find(i,end,':'); if (j != end) { string tag(i,j); if (ProtocolTags::instance().find(tag)) { i = j+1; result = tag; return true; } } return false; } // A liberal interpretation of http://www.ietf.org/rfc/rfc3986.txt. // Works for DNS names and and ipv4 and ipv6 literals // bool host(string& h) { if (ip6literal(h)) return true; const char* start=i; while (unreserved() || pctEncoded()) ; if (start == i) return false;//host is required else h.assign(start, i); return true; } // This is a bit too liberal for IPv6 literal addresses, but probably good enough bool ip6literal(string& h) { if (literal("[")) { const char* start = i; while (hexDigit() || literal(":") || literal(".")) ; const char* end = i; if ( end-start < 2 ) return false; // Smallest valid address is "::" if (literal("]")) { h.assign(start, end); return true; } } return false; } bool unreserved() { return (::isalnum(*i) || ::strchr("-._~", *i)) && advance(); } bool pctEncoded() { return literal("%") && hexDigit() && hexDigit(); } bool hexDigit() { return i < end && ::strchr("01234567890abcdefABCDEF", *i) && advance(); } bool port(uint16_t& p) { return decimalInt(p); } template bool decimalInt(IntType& n) { const char* start = i; while (decDigit()) ; try { n = lexical_cast(string(start, i)); return true; } catch(...) { return false; } } bool decDigit() { return i < end && ::isdigit(*i) && advance(); } bool literal(const char* s) { int n = ::strlen(s); if (n <= end-i && equal(s, s+n, i)) return advance(n); return false; }; bool noop() { return true; } /** List of item, separated by separator, with min & max bounds. */ bool list(Rule item, Rule separator, size_t min=0, size_t max=UNLIMITED) { assert(max > 0); assert(max >= min); if (!(this->*item)()) return min == 0; // Empty list. size_t n = 1; while (n < max && i < end) { if (!(this->*separator)()) break; if (i == end || !(this->*item)()) return false; // Separator with no item. ++n; } return n >= min; } /** List of items with no separator */ bool list(Rule item, size_t min=0, size_t max=UNLIMITED) { return list(item, &UrlParser::noop, min, max); } bool advance(size_t n=1) { if (i+n > end) return false; i += n; return true; } static const size_t UNLIMITED = size_t(~1); static const std::string LOCALHOST; Url& url; const char* text; const char* end; const char* i; const std::string defaultProtocol; }; const string UrlParser::LOCALHOST("127.0.0.1"); void Url::parse(const char* url) { parse(url, Address::TCP); } void Url::parse(const char* url, const std::string& defaultProtocol) { parseNoThrow(url, defaultProtocol); if (empty()) throw Url::Invalid(QPID_MSG("Invalid URL: " << url)); } void Url::parseNoThrow(const char* url) { parseNoThrow(url, Address::TCP); } void Url::parseNoThrow(const char* url, const std::string& defaultProtocol) { clear(); cache.clear(); if (!UrlParser(*this, url, defaultProtocol).parse()) clear(); } void Url::throwIfEmpty() const { if (empty()) throw Url::Invalid("URL contains no addresses"); } std::string Url::getUser() const { return user; } std::string Url::getPass() const { return pass; } void Url::setUser(const std::string& s) { user = s; } void Url::setPass(const std::string& s) { pass = s; } std::istream& operator>>(std::istream& is, Url& url) { std::string s; is >> s; url.parse(s); return is; } void Url::addProtocol(const std::string& tag) { ProtocolTags::instance().add(tag); } } // namespace qpid qpidc-0.16/src/qpid/cluster/0000775000076400007640000000000011752725716016356 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/cluster/FailoverExchange.h0000664000076400007640000000462411725210040021722 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_FAILOVEREXCHANGE_H #define QPID_CLUSTER_FAILOVEREXCHANGE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Exchange.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/Url.h" #include #include namespace qpid { namespace cluster { /** * Failover exchange provides failover host list, as specified in AMQP 0-10. */ class FailoverExchange : public broker::Exchange { public: static const std::string typeName; FailoverExchange(management::Manageable* parent, broker::Broker* b); /** Set the URLs but don't send an update.*/ void setUrls(const std::vector&); /** Set the URLs and send an update.*/ void updateUrls(const std::vector&); /** Flag the failover exchange as ready to generate updates (caught up) */ void setReady(); // Exchange overrides std::string getType() const; bool bind(boost::shared_ptr queue, const std::string& routingKey, const framing::FieldTable* args); bool unbind(boost::shared_ptr queue, const std::string& routingKey, const framing::FieldTable* args); bool isBound(boost::shared_ptr queue, const std::string* const routingKey, const framing::FieldTable* const args); void route(broker::Deliverable& msg); private: void sendUpdate(const boost::shared_ptr&); typedef sys::Mutex::ScopedLock Lock; typedef std::vector Urls; typedef std::set > Queues; sys::Mutex lock; Urls urls; Queues queues; bool ready; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_FAILOVEREXCHANGE_H*/ qpidc-0.16/src/qpid/cluster/Event.cpp0000664000076400007640000000755011537542661020147 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/types.h" #include "qpid/cluster/Event.h" #include "qpid/cluster/Cpg.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/AMQFrame.h" #include "qpid/RefCountedBuffer.h" #include "qpid/assert.h" #include #include #include namespace qpid { namespace cluster { using framing::Buffer; using framing::AMQFrame; const size_t EventHeader::HEADER_SIZE = sizeof(uint8_t) + // type sizeof(uint64_t) + // connection pointer only, CPG provides member ID. sizeof(uint32_t) // payload size ; EventHeader::EventHeader(EventType t, const ConnectionId& c, size_t s) : type(t), connectionId(c), size(s) {} Event::Event() {} Event::Event(EventType t, const ConnectionId& c, size_t s) : EventHeader(t,c,s), store(RefCountedBuffer::create(s+HEADER_SIZE)) {} void EventHeader::decode(const MemberId& m, framing::Buffer& buf) { QPID_ASSERT(buf.available() >= HEADER_SIZE); type = (EventType)buf.getOctet(); QPID_ASSERT(type == DATA || type == CONTROL); connectionId = ConnectionId(m, buf.getLongLong()); size = buf.getLong(); } Event Event::decodeCopy(const MemberId& m, framing::Buffer& buf) { Event e; e.decode(m, buf); // Header QPID_ASSERT(buf.available() >= e.size); e.store = RefCountedBuffer::create(e.size + HEADER_SIZE); memcpy(e.getData(), buf.getPointer() + buf.getPosition(), e.size); return e; } Event Event::control(const framing::AMQFrame& f, const ConnectionId& cid) { Event e(CONTROL, cid, f.encodedSize()); Buffer buf(e); f.encode(buf); return e; } Event Event::control(const framing::AMQBody& body, const ConnectionId& cid) { return control(framing::AMQFrame(body), cid); } iovec Event::toIovec() const { encodeHeader(); iovec iov = { const_cast(getStore()), getStoreSize() }; return iov; } void EventHeader::encode(Buffer& b) const { b.putOctet(type); b.putLongLong(connectionId.getNumber()); b.putLong(size); } // Encode my header in my buffer. void Event::encodeHeader () const { Buffer b(const_cast(getStore()), HEADER_SIZE); encode(b); assert(b.getPosition() == HEADER_SIZE); } Event::operator Buffer() const { return Buffer(const_cast(getData()), getSize()); } const AMQFrame& Event::getFrame() const { assert(type == CONTROL); if (!frame.getBody()) { Buffer buf(*this); QPID_ASSERT(frame.decode(buf)); } return frame; } static const char* EVENT_TYPE_NAMES[] = { "data", "control" }; std::ostream& operator<< (std::ostream& o, EventType t) { return o << EVENT_TYPE_NAMES[t]; } std::ostream& operator<< (std::ostream& o, const EventHeader& e) { return o << "Event[" << e.getConnectionId() << " " << e.getType() << " " << e.getSize() << " bytes]"; } std::ostream& operator<< (std::ostream& o, const Event& e) { o << "Event[" << e.getConnectionId() << " "; if (e.getType() == CONTROL) o << e.getFrame(); else o << " data " << e.getSize() << " bytes"; return o << "]"; } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/ExpiryPolicy.cpp0000664000076400007640000000244511576211367021523 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Message.h" #include "qpid/cluster/ExpiryPolicy.h" #include "qpid/cluster/Cluster.h" #include "qpid/sys/Time.h" #include "qpid/log/Statement.h" namespace qpid { namespace cluster { ExpiryPolicy::ExpiryPolicy(Cluster& cluster) : cluster(cluster) {} bool ExpiryPolicy::hasExpired(broker::Message& m) { return m.getExpiration() < cluster.getClusterTime(); } sys::AbsTime ExpiryPolicy::getCurrentTime() { return cluster.getClusterTime(); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/NoOpConnectionOutputHandler.h0000664000076400007640000000267711213237660024141 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_NOOPCONNECTIONOUTPUTHANDLER_H #define QPID_CLUSTER_NOOPCONNECTIONOUTPUTHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace framing { class AMQFrame; } namespace cluster { /** * Output handler shadow connections, simply discards frames. */ class NoOpConnectionOutputHandler : public sys::ConnectionOutputHandler { public: virtual void send(framing::AMQFrame&) {} virtual void close() {} virtual void abort() {} virtual void activateOutput() {} virtual void giveReadCredit(int32_t) {} }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_NOOPCONNECTIONOUTPUTHANDLER_H*/ qpidc-0.16/src/qpid/cluster/OutputInterceptor.h0000664000076400007640000000452311551326770022244 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_OUTPUTINTERCEPTOR_H #define QPID_CLUSTER_OUTPUTINTERCEPTOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/NoOpConnectionOutputHandler.h" #include "qpid/sys/ConnectionOutputHandler.h" #include "qpid/sys/Mutex.h" #include "qpid/broker/ConnectionFactory.h" #include namespace qpid { namespace framing { class AMQFrame; } namespace cluster { class Connection; /** * Interceptor for connection OutputHandler, manages outgoing message replication. */ class OutputInterceptor : public sys::ConnectionOutputHandler { public: OutputInterceptor(cluster::Connection& p, sys::ConnectionOutputHandler& h); // sys::ConnectionOutputHandler functions void send(framing::AMQFrame& f); void abort(); void activateOutput(); void giveReadCredit(int32_t); void close(); size_t getBuffered() const; // Delivery point for doOutput requests. void deliverDoOutput(uint32_t limit); // Intercept doOutput requests on Connection. bool doOutput(); void closeOutput(); uint32_t getSendMax() const { return sendMax; } void setSendMax(uint32_t sendMax_) { sendMax=sendMax_; } cluster::Connection& parent; private: typedef sys::Mutex::ScopedLock Locker; void sendDoOutput(size_t newLimit, const sys::Mutex::ScopedLock&); mutable sys::Mutex lock; bool closing; sys::ConnectionOutputHandler* next; static NoOpConnectionOutputHandler discardHandler; uint32_t sendMax, sent; bool sentDoOutput; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_OUTPUTINTERCEPTOR_H*/ qpidc-0.16/src/qpid/cluster/PollableQueue.h0000664000076400007640000000546011354462662021267 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_POLLABLEQUEUE_H #define QPID_CLUSTER_POLLABLEQUEUE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/PollableQueue.h" #include namespace qpid { namespace cluster { /** * More convenient version of PollableQueue that handles iterating * over the batch and error handling. * * Constructed in "bypass" mode where items are processed directly * rather than put on the queue. This is important for the * PRE_INIT stage when Cluster is pumping CPG dispatch directly * before the poller has started. * * Calling start() starts the pollable queue and disabled bypass mode. */ template class PollableQueue : public sys::PollableQueue { public: typedef boost::function Callback; typedef boost::function ErrorCallback; PollableQueue(Callback f, ErrorCallback err, const std::string& msg, const boost::shared_ptr& poller) : sys::PollableQueue(boost::bind(&PollableQueue::handleBatch, this, _1), poller), callback(f), error(err), message(msg), bypass(true) {} typename sys::PollableQueue::Batch::const_iterator handleBatch(const typename sys::PollableQueue::Batch& values) { try { typename sys::PollableQueue::Batch::const_iterator i = values.begin(); while (i != values.end() && !this->isStopped()) { callback(*i); ++i; } return i; } catch (const std::exception& e) { QPID_LOG(critical, message << ": " << e.what()); this->stop(); error(); return values.end(); } } void push(const T& t) { if (bypass) callback(t); else sys::PollableQueue::push(t); } void bypassOff() { bypass = false; } private: Callback callback; ErrorCallback error; std::string message; bool bypass; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_POLLABLEQUEUE_H*/ qpidc-0.16/src/qpid/cluster/ClusterMap.h0000664000076400007640000000703211354676742020612 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_CLUSTERMAP_H #define QPID_CLUSTER_CLUSTERMAP_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "MemberSet.h" #include "qpid/Url.h" #include "qpid/framing/ClusterConnectionMembershipBody.h" #include "qpid/framing/SequenceNumber.h" #include #include #include #include #include #include namespace qpid { namespace cluster { /** * Map of established cluster members and joiners waiting for an update, * along with other cluster state that must be updated. */ class ClusterMap { public: typedef std::map Map; typedef std::set Set; ClusterMap(); ClusterMap(const Map& map); ClusterMap(const framing::FieldTable& joiners, const framing::FieldTable& members, framing::SequenceNumber frameSeq); /** Update from config change. *@return true if member set changed. */ bool configChange(const Set& members); bool isJoiner(const MemberId& id) const { return joiners.find(id) != joiners.end(); } bool isMember(const MemberId& id) const { return members.find(id) != members.end(); } bool isAlive(const MemberId& id) const { return alive.find(id) != alive.end(); } Url getJoinerUrl(const MemberId& id) { return getUrl(joiners, id); } Url getMemberUrl(const MemberId& id) { return getUrl(members, id); } /** First joiner in the cluster in ID order, target for offers */ MemberId firstJoiner() const; /** Convert map contents to a cluster control body. */ void toMethodBody(framing::ClusterConnectionMembershipBody&) const; size_t aliveCount() const { return alive.size(); } size_t memberCount() const { return members.size(); } std::vector memberIds() const; std::vector memberUrls() const; Set getAlive() const; Set getMembers() const; bool updateRequest(const MemberId& id, const std::string& url); /** Return non-empty Url if accepted */ boost::optional updateOffer(const MemberId& from, const MemberId& to); /**@return true If this is a new member */ bool ready(const MemberId& id, const Url&); framing::SequenceNumber getFrameSeq() const { return frameSeq; } framing::SequenceNumber incrementFrameSeq() { return ++frameSeq; } /** Clear out all knowledge of joiners & members, just keep alive set */ void clearStatus() { joiners.clear(); members.clear(); } private: Url getUrl(const Map& map, const MemberId& id); Map joiners, members; Set alive; framing::SequenceNumber frameSeq; friend std::ostream& operator<<(std::ostream&, const Map&); friend std::ostream& operator<<(std::ostream&, const ClusterMap&); }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_CLUSTERMAP_H*/ qpidc-0.16/src/qpid/cluster/UpdateDataExchange.h0000664000076400007640000000461111725210040022163 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_UPDATEDATAEXCHANGE_H #define QPID_CLUSTER_UPDATEDATAEXCHANGE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Exchange.h" #include "types.h" #include namespace qpid { namespace management { class ManagementAgent; } namespace cluster { class Cluster; /** * An exchange used to send data that is to large for a control * during update. The routing key indicates the type of data. */ class UpdateDataExchange : public broker::Exchange { public: static const std::string EXCHANGE_NAME; static const std::string EXCHANGE_TYPE; static const std::string MANAGEMENT_AGENTS_KEY; static const std::string MANAGEMENT_SCHEMAS_KEY; static const std::string MANAGEMENT_DELETED_OBJECTS_KEY; UpdateDataExchange(Cluster& parent); void route(broker::Deliverable& msg); // Not implemented std::string getType() const { return EXCHANGE_TYPE; } bool bind(boost::shared_ptr, const std::string&, const qpid::framing::FieldTable*) { return false; } bool unbind(boost::shared_ptr, const std::string&, const qpid::framing::FieldTable*) { return false; } bool isBound(boost::shared_ptr, const std::string*, const qpid::framing::FieldTable*) { return false; } void updateManagementAgent(management::ManagementAgent* agent); private: std::string managementAgents; std::string managementSchemas; std::string managementDeletedObjects; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_UPDATEDATAEXCHANGE_H*/ qpidc-0.16/src/qpid/cluster/StoreStatus.cpp0000664000076400007640000001157311355156410021355 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "StoreStatus.h" #include "qpid/Exception.h" #include "qpid/Msg.h" #include "qpid/log/Statement.h" #include #include #include #include #include #include namespace qpid { namespace cluster { using framing::Uuid; using namespace framing::cluster; namespace fs=boost::filesystem; using namespace std; StoreStatus::StoreStatus(const std::string& d) : state(STORE_STATE_NO_STORE), dataDir(d) {} namespace { const char* SUBDIR="cluster"; const char* STORE_STATUS="store.status"; string readFile(const fs::path& path) { fs::ifstream is; is.exceptions(std::ios::badbit | std::ios::failbit); is.open(path); // get length of file: is.seekg (0, ios::end); size_t length = is.tellg(); is.seekg (0, ios::beg); // load data boost::scoped_array buffer(new char[length]); is.read(buffer.get(), length); is.close(); return string(buffer.get(), length); } void writeFile(const fs::path& path, const string& data) { fs::ofstream os; os.exceptions(std::ios::badbit | std::ios::failbit); os.open(path); os.write(data.data(), data.size()); os.close(); } } // namespace void StoreStatus::load() { if (dataDir.empty()) { throw Exception(QPID_MSG("No data-dir: When a store is loaded together with clustering, --data-dir must be specified.")); } try { fs::path dir = fs::path(dataDir, fs::native)/SUBDIR; create_directory(dir); fs::path file = dir/STORE_STATUS; if (fs::exists(file)) { string data = readFile(file); istringstream is(data); is.exceptions(std::ios::badbit | std::ios::failbit); is >> ws >> clusterId >> ws >> shutdownId; if (!clusterId) throw Exception(QPID_MSG("Invalid cluster store state, no cluster-id")); if (shutdownId) state = STORE_STATE_CLEAN_STORE; else state = STORE_STATE_DIRTY_STORE; } else { // Starting from empty store clusterId = Uuid(true); save(); state = STORE_STATE_EMPTY_STORE; } } catch (const std::exception&e) { throw Exception(QPID_MSG("Cannot load cluster store status: " << e.what())); } } void StoreStatus::save() { if (dataDir.empty()) return; try { ostringstream os; os << clusterId << endl << shutdownId << endl; fs::path file = fs::path(dataDir, fs::native)/SUBDIR/STORE_STATUS; writeFile(file, os.str()); } catch (const std::exception& e) { throw Exception(QPID_MSG("Cannot save cluster store status: " << e.what())); } } bool StoreStatus::hasStore() const { return state != framing::cluster::STORE_STATE_NO_STORE; } void StoreStatus::dirty() { assert(hasStore()); if (shutdownId) { shutdownId = Uuid(); save(); } state = STORE_STATE_DIRTY_STORE; } void StoreStatus::clean(const Uuid& shutdownId_) { assert(hasStore()); assert(shutdownId_); if (shutdownId_ != shutdownId) { shutdownId = shutdownId_; save(); } state = STORE_STATE_CLEAN_STORE; } void StoreStatus::setClusterId(const Uuid& clusterId_) { clusterId = clusterId_; save(); } const char* stateName(StoreState s) { switch (s) { case STORE_STATE_NO_STORE: return "none"; case STORE_STATE_EMPTY_STORE: return "empty"; case STORE_STATE_DIRTY_STORE: return "dirty"; case STORE_STATE_CLEAN_STORE: return "clean"; } assert(0); return "unknown"; } ostream& operator<<(ostream& o, framing::cluster::StoreState s) { return o << stateName(s); } ostream& operator<<(ostream& o, const StoreStatus& s) { o << s.getState(); if (s.getState() == STORE_STATE_DIRTY_STORE) o << " cluster-id=" << s.getClusterId(); if (s.getState() == STORE_STATE_CLEAN_STORE) { o << " cluster-id=" << s.getClusterId() << " shutdown-id=" << s.getShutdownId(); } return o; } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/FailoverExchange.cpp0000664000076400007640000000670511725210040022257 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/FailoverExchange.h" #include "qpid/broker/Message.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/broker/Queue.h" #include "qpid/framing/MessageProperties.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AMQHeaderBody.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/log/Statement.h" #include "qpid/framing/Array.h" #include "qpid/UrlArray.h" #include #include namespace qpid { namespace cluster { using namespace std; using namespace broker; using namespace framing; const string FailoverExchange::typeName("amq.failover"); FailoverExchange::FailoverExchange(management::Manageable* parent, Broker* b) : Exchange(typeName, parent, b ), ready(false) { if (mgmtExchange != 0) mgmtExchange->set_type(typeName); } void FailoverExchange::setUrls(const vector& u) { Lock l(lock); urls = u; } void FailoverExchange::updateUrls(const vector& u) { Lock l(lock); urls=u; if (ready && !urls.empty()) { std::for_each(queues.begin(), queues.end(), boost::bind(&FailoverExchange::sendUpdate, this, _1)); } } string FailoverExchange::getType() const { return typeName; } bool FailoverExchange::bind(Queue::shared_ptr queue, const string&, const framing::FieldTable*) { Lock l(lock); if (ready) sendUpdate(queue); return queues.insert(queue).second; } bool FailoverExchange::unbind(Queue::shared_ptr queue, const string&, const framing::FieldTable*) { Lock l(lock); return queues.erase(queue); } bool FailoverExchange::isBound(Queue::shared_ptr queue, const string* const, const framing::FieldTable*) { Lock l(lock); return queues.find(queue) != queues.end(); } void FailoverExchange::route(Deliverable&) { QPID_LOG(warning, "Message received by exchange " << typeName << " ignoring"); } void FailoverExchange::sendUpdate(const Queue::shared_ptr& queue) { // Called with lock held. if (urls.empty()) return; framing::Array array = vectorToUrlArray(urls); const ProtocolVersion v; boost::intrusive_ptr msg(new Message); AMQFrame command(MessageTransferBody(v, typeName, 1, 0)); command.setLastSegment(false); msg->getFrames().append(command); AMQHeaderBody header; header.get(true)->setContentLength(0); header.get(true)->getApplicationHeaders().setArray(typeName, array); AMQFrame headerFrame(header); headerFrame.setFirstSegment(false); msg->getFrames().append(headerFrame); DeliverableMessage(msg).deliverTo(queue); } void FailoverExchange::setReady() { ready = true; } }} // namespace cluster qpidc-0.16/src/qpid/cluster/types.h0000664000076400007640000000543311562043320017657 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_TYPES_H #define QPID_CLUSTER_TYPES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "config.h" #include "qpid/Url.h" #include "qpid/RefCounted.h" #include "qpid/sys/IntegerTypes.h" #include #include #include #include extern "C" { #if defined (HAVE_OPENAIS_CPG_H) # include #elif defined (HAVE_COROSYNC_CPG_H) # include #else # error "No cpg.h header file available" #endif } namespace qpid { namespace cluster { class Connection; typedef boost::intrusive_ptr ConnectionPtr; /** Types of cluster event. */ enum EventType { DATA, CONTROL }; /** first=node-id, second=pid */ struct MemberId : std::pair { MemberId(uint64_t n=0) : std::pair( n >> 32, n & 0xffffffff) {} MemberId(uint32_t node, uint32_t pid) : std::pair(node, pid) {} MemberId(const cpg_address& caddr) : std::pair(caddr.nodeid, caddr.pid) {} MemberId(const std::string&); // Decode from string. uint32_t getNode() const { return first; } uint32_t getPid() const { return second; } operator uint64_t() const { return (uint64_t(first)<<32ull) + second; } // MemberId as byte string, network byte order. Not human readable. std::string str() const; }; inline bool operator==(const cpg_address& caddr, const MemberId& id) { return id == MemberId(caddr); } std::ostream& operator<<(std::ostream&, const MemberId&); struct ConnectionId : public std::pair { ConnectionId(const MemberId& m=MemberId(), uint64_t c=0) : std::pair (m,c) {} ConnectionId(uint64_t m, uint64_t c) : std::pair(MemberId(m), c) {} MemberId getMember() const { return first; } uint64_t getNumber() const { return second; } }; std::ostream& operator<<(std::ostream&, const ConnectionId&); std::ostream& operator<<(std::ostream&, EventType); }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_TYPES_H*/ qpidc-0.16/src/qpid/cluster/ExpiryPolicy.h0000664000076400007640000000274711576211367021175 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_EXPIRYPOLICY_H #define QPID_CLUSTER_EXPIRYPOLICY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/types.h" #include "qpid/broker/ExpiryPolicy.h" #include "qpid/sys/Mutex.h" #include #include #include #include namespace qpid { namespace broker { class Message; } namespace cluster { class Cluster; /** * Cluster expiry policy */ class ExpiryPolicy : public broker::ExpiryPolicy { public: ExpiryPolicy(Cluster& cluster); bool hasExpired(broker::Message&); qpid::sys::AbsTime getCurrentTime(); private: Cluster& cluster; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_EXPIRYPOLICY_H*/ qpidc-0.16/src/qpid/cluster/Event.h0000664000076400007640000000662711537542661017620 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_EVENT_H #define QPID_CLUSTER_EVENT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/types.h" #include "qpid/BufferRef.h" #include "qpid/framing/AMQFrame.h" #include // For iovec #include #include "qpid/cluster/types.h" namespace qpid { namespace framing { class AMQBody; class AMQFrame; class Buffer; } namespace cluster { /** Header data for a multicast event */ class EventHeader { public: EventHeader(EventType t=DATA, const ConnectionId& c=ConnectionId(), size_t size=0); void decode(const MemberId& m, framing::Buffer&); void encode(framing::Buffer&) const; EventType getType() const { return type; } ConnectionId getConnectionId() const { return connectionId; } MemberId getMemberId() const { return connectionId.getMember(); } /** Size of payload data, excluding header. */ size_t getSize() const { return size; } /** Size of header + payload. */ size_t getStoreSize() const { return size + HEADER_SIZE; } bool isCluster() const { return connectionId.getNumber() == 0; } bool isConnection() const { return connectionId.getNumber() != 0; } bool isControl() const { return type == CONTROL; } protected: static const size_t HEADER_SIZE; EventType type; ConnectionId connectionId; size_t size; }; /** * Events are sent to/received from the cluster. * Refcounted so they can be stored on queues. */ class Event : public EventHeader { public: Event(); /** Create an event with a buffer that can hold size bytes plus an event header. */ Event(EventType t, const ConnectionId& c, size_t); /** Create an event copied from delivered data. */ static Event decodeCopy(const MemberId& m, framing::Buffer&); /** Create a control event. */ static Event control(const framing::AMQBody&, const ConnectionId&); /** Create a control event. */ static Event control(const framing::AMQFrame&, const ConnectionId&); // Data excluding header. char* getData() { return store.begin() + HEADER_SIZE; } const char* getData() const { return store.begin() + HEADER_SIZE; } // Store including header char* getStore() { return store.begin(); } const char* getStore() const { return store.begin(); } const framing::AMQFrame& getFrame() const; operator framing::Buffer() const; iovec toIovec() const; private: void encodeHeader() const; BufferRef store; mutable framing::AMQFrame frame; }; std::ostream& operator << (std::ostream&, const Event&); std::ostream& operator << (std::ostream&, const EventHeader&); }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_EVENT_H*/ qpidc-0.16/src/qpid/cluster/Connection.cpp0000664000076400007640000007372011717465066021172 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Codecs.h" #include "Connection.h" #include "UpdateClient.h" #include "Cluster.h" #include "UpdateReceiver.h" #include "qpid/assert.h" #include "qpid/broker/DtxAck.h" #include "qpid/broker/DtxBuffer.h" #include "qpid/broker/SessionState.h" #include "qpid/broker/SemanticState.h" #include "qpid/broker/TxBuffer.h" #include "qpid/broker/TxPublish.h" #include "qpid/broker/TxAccept.h" #include "qpid/broker/RecoveredEnqueue.h" #include "qpid/broker/RecoveredDequeue.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/Fairshare.h" #include "qpid/broker/Link.h" #include "qpid/broker/Bridge.h" #include "qpid/broker/StatefulQueueObserver.h" #include "qpid/broker/Queue.h" #include "qpid/framing/enum.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AllInvoker.h" #include "qpid/framing/DeliveryProperties.h" #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/ClusterConnectionAnnounceBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/log/Statement.h" #include "qpid/sys/ClusterSafe.h" #include "qpid/types/Variant.h" #include "qpid/management/ManagementAgent.h" #include namespace qpid { namespace cluster { using namespace framing; using namespace framing::cluster; using amqp_0_10::ListCodec; using types::Variant; qpid::sys::AtomicValue Connection::catchUpId(0x5000000000000000LL); Connection::NullFrameHandler Connection::nullFrameHandler; struct NullFrameHandler : public framing::FrameHandler { void handle(framing::AMQFrame&) {} }; namespace { sys::AtomicValue idCounter; const std::string shadowPrefix("[shadow]"); } // Shadow connection Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out, const std::string& mgmtId, const ConnectionId& id, const qpid::sys::SecuritySettings& external) : cluster(c), self(id), catchUp(false), announced(false), output(*this, out), connectionCtor(&output, cluster.getBroker(), mgmtId, external, false, 0, true), expectProtocolHeader(false), mcastFrameHandler(cluster.getMulticast(), self), updateIn(c.getUpdateReceiver()), secureConnection(0) {} // Local connection Connection::Connection(Cluster& c, sys::ConnectionOutputHandler& out, const std::string& mgmtId, MemberId member, bool isCatchUp, bool isLink, const qpid::sys::SecuritySettings& external ) : cluster(c), self(member, ++idCounter), catchUp(isCatchUp), announced(false), output(*this, out), connectionCtor(&output, cluster.getBroker(), mgmtId, external, isLink, isCatchUp ? ++catchUpId : 0, // The first catch-up connection is not considered a shadow // as it needs to be authenticated. isCatchUp && self.second > 1), expectProtocolHeader(isLink), mcastFrameHandler(cluster.getMulticast(), self), updateIn(c.getUpdateReceiver()), secureConnection(0) { if (isLocalClient()) { giveReadCredit(cluster.getSettings().readMax); // Flow control // Delay adding the connection to the management map until announce() connectionCtor.delayManagement = true; } else { // Catch-up shadow connections initialized using nextShadow id. assert(catchUp); if (!updateIn.nextShadowMgmtId.empty()) connectionCtor.mgmtId = updateIn.nextShadowMgmtId; updateIn.nextShadowMgmtId.clear(); } init(); QPID_LOG(debug, cluster << " local connection " << *this); } void Connection::setSecureConnection(broker::SecureConnection* sc) { secureConnection = sc; if (connection.get()) connection->setSecureConnection(sc); } void Connection::init() { connection = connectionCtor.construct(); if (isLocalClient()) { if (secureConnection) connection->setSecureConnection(secureConnection); // Actively send cluster-order frames from local node connection->setClusterOrderOutput(mcastFrameHandler); } else { // Shadow or catch-up connection // Passive, discard cluster-order frames connection->setClusterOrderOutput(nullFrameHandler); } if (!isCatchUp()) connection->setErrorListener(this); } // Called when we have consumed a read buffer to give credit to the // connection layer to continue reading. void Connection::giveReadCredit(int credit) { if (cluster.getSettings().readMax && credit) output.giveReadCredit(credit); } void Connection::announce( const std::string& mgmtId, uint32_t ssf, const std::string& authid, bool nodict, const std::string& username, const std::string& initialFrames) { QPID_ASSERT(mgmtId == connectionCtor.mgmtId); QPID_ASSERT(ssf == connectionCtor.external.ssf); QPID_ASSERT(authid == connectionCtor.external.authid); QPID_ASSERT(nodict == connectionCtor.external.nodict); // Local connections are already initialized but with management delayed. if (isLocalClient()) { connection->addManagementObject(); } else if (isShadow()) { init(); // Play initial frames into the connection. Buffer buf(const_cast(initialFrames.data()), initialFrames.size()); AMQFrame frame; while (frame.decode(buf)) connection->received(frame); connection->setUserId(username); } // Do managment actions now that the connection is replicated. connection->raiseConnectEvent(); QPID_LOG(debug, cluster << " replicated connection " << *this); } Connection::~Connection() { if (connection.get()) connection->setErrorListener(0); // Don't trigger cluster-safe asserts in broker:: ~Connection as // it may be called in an IO thread context during broker // shutdown. sys::ClusterSafeScope css; connection.reset(); } bool Connection::doOutput() { return output.doOutput(); } // Received from a directly connected client. void Connection::received(framing::AMQFrame& f) { if (!connection.get()) { QPID_LOG(warning, cluster << " ignoring frame on closed connection " << *this << ": " << f); return; } QPID_LOG_IF(trace, Cluster::loggable(f), cluster << " RECV " << *this << ": " << f); if (isLocal()) { // Local catch-up connection. currentChannel = f.getChannel(); if (!framing::invoke(*this, *f.getBody()).wasHandled()) connection->received(f); } else { // Shadow or updated catch-up connection. if (f.getMethod() && f.getMethod()->isA()) { if (isShadow()) cluster.addShadowConnection(this); AMQFrame ok((ConnectionCloseOkBody())); connection->getOutput().send(ok); output.closeOutput(); catchUp = false; } else QPID_LOG(warning, cluster << " ignoring unexpected frame " << *this << ": " << f); } } bool Connection::checkUnsupported(const AMQBody&) { // Throw an exception for unsupported commands. Currently all are supported. return false; } struct GiveReadCreditOnExit { Connection& connection; int credit; GiveReadCreditOnExit(Connection& connection_, int credit_) : connection(connection_), credit(credit_) {} ~GiveReadCreditOnExit() { if (credit) connection.giveReadCredit(credit); } }; void Connection::deliverDoOutput(uint32_t limit) { output.deliverDoOutput(limit); } // Called in delivery thread, in cluster order. void Connection::deliveredFrame(const EventFrame& f) { GiveReadCreditOnExit gc(*this, f.readCredit); assert(!catchUp); currentChannel = f.frame.getChannel(); if (f.frame.getBody() // frame can be emtpy with just readCredit && !framing::invoke(*this, *f.frame.getBody()).wasHandled() // Connection contol. && !checkUnsupported(*f.frame.getBody())) // Unsupported operation. { if (f.type == DATA) // incoming data frames to broker::Connection connection->received(const_cast(f.frame)); else { // frame control, send frame via SessionState broker::SessionState* ss = connection->getChannel(currentChannel).getSession(); if (ss) ss->out(const_cast(f.frame)); } } } // A local connection is closed by the network layer. Called in the connection thread. void Connection::closed() { try { if (isUpdated()) { QPID_LOG(debug, cluster << " update connection closed " << *this); close(); cluster.updateInClosed(); } else if (catchUp && cluster.isExpectingUpdate()) { QPID_LOG(critical, cluster << " catch-up connection closed prematurely " << *this); cluster.leave(); } else if (isLocal()) { // This was a local replicated connection. Multicast a deliver // closed and process any outstanding frames from the cluster // until self-delivery of deliver-close. output.closeOutput(); if (announced) cluster.getMulticast().mcastControl( ClusterConnectionDeliverCloseBody(), self); } } catch (const std::exception& e) { QPID_LOG(error, cluster << " error closing connection " << *this << ": " << e.what()); } } // Self-delivery of close message, close the connection. void Connection::deliverClose () { close(); cluster.erase(self); } // Close the connection void Connection::close() { if (connection.get()) { QPID_LOG(debug, cluster << " closed connection " << *this); connection->closed(); connection.reset(); } } // The connection has sent invalid data and should be aborted. // All members will get the same abort since they all process the same data. void Connection::abort() { connection->abort(); // Aborting the connection will result in a call to ::closed() // and allow the connection to close in an orderly manner. } // ConnectionCodec::decode receives read buffers from directly-connected clients. size_t Connection::decode(const char* data, size_t size) { GiveReadCreditOnExit grc(*this, 1); // Give a read credit by default. const char* ptr = data; const char* end = data + size; if (catchUp) { // Handle catch-up locally. if (!cluster.isExpectingUpdate()) { QPID_LOG(error, "Rejecting unexpected catch-up connection."); abort(); // Cluster is not expecting catch-up connections. } bool wasOpen = connection->isOpen(); Buffer buf(const_cast(ptr), size); ptr += size; while (localDecoder.decode(buf)) received(localDecoder.getFrame()); if (!wasOpen && connection->isOpen()) { // Connections marked with setUserProxyAuth are allowed to proxy // messages with user-ID that doesn't match the connection's // authenticated ID. This is important for updates. connection->setUserProxyAuth(isCatchUp()); } } else { // Multicast local connections. assert(isLocalClient()); assert(connection.get()); if (!checkProtocolHeader(ptr, size)) // Updates ptr return 0; // Incomplete header if (!connection->isOpen()) processInitialFrames(ptr, end-ptr); // Updates ptr if (connection->isOpen() && end - ptr > 0) { // We're multi-casting, we will give read credit on delivery. grc.credit = 0; cluster.getMulticast().mcastBuffer(ptr, end - ptr, self); ptr = end; } } return ptr - data; } // Decode the protocol header if needed. Updates data and size // returns true if the header is complete or already read. bool Connection::checkProtocolHeader(const char*& data, size_t size) { if (expectProtocolHeader) { // This is an outgoing link connection, we will receive a protocol // header which needs to be decoded first framing::ProtocolInitiation pi; Buffer buf(const_cast(data), size); if (pi.decode(buf)) { //TODO: check the version is correct expectProtocolHeader = false; data += pi.encodedSize(); } else { return false; } } return true; } void Connection::processInitialFrames(const char*& ptr, size_t size) { // Process the initial negotiation locally and store it so // it can be replayed on other brokers in announce() Buffer buf(const_cast(ptr), size); framing::AMQFrame frame; while (!connection->isOpen() && frame.decode(buf)) received(frame); initialFrames.append(ptr, buf.getPosition()); ptr += buf.getPosition(); if (connection->isOpen()) { // initial negotiation complete cluster.getMulticast().mcastControl( ClusterConnectionAnnounceBody( ProtocolVersion(), connectionCtor.mgmtId, connectionCtor.external.ssf, connectionCtor.external.authid, connectionCtor.external.nodict, connection->getUserId(), initialFrames), getId()); announced = true; initialFrames.clear(); } } broker::SessionState& Connection::sessionState() { return *connection->getChannel(currentChannel).getSession(); } broker::SemanticState& Connection::semanticState() { return sessionState().getSemanticState(); } void Connection::shadowPrepare(const std::string& mgmtId) { updateIn.nextShadowMgmtId = mgmtId; } void Connection::shadowSetUser(const std::string& userId) { connection->setUserId(userId); } void Connection::consumerState(const string& name, bool blocked, bool notifyEnabled, const SequenceNumber& position, uint32_t usedMsgCredit, uint32_t usedByteCredit) { broker::SemanticState::ConsumerImpl::shared_ptr c = semanticState().find(name); c->setPosition(position); c->setBlocked(blocked); if (c->getCredit().isWindowMode()) c->getCredit().consume(usedMsgCredit, usedByteCredit); if (notifyEnabled) c->enableNotify(); else c->disableNotify(); updateIn.consumerNumbering.add(c); } void Connection::sessionState( const SequenceNumber& replayStart, const SequenceNumber& sendCommandPoint, const SequenceSet& sentIncomplete, const SequenceNumber& expected, const SequenceNumber& received, const SequenceSet& unknownCompleted, const SequenceSet& receivedIncomplete, bool dtxSelected) { sessionState().setState( replayStart, sendCommandPoint, sentIncomplete, expected, received, unknownCompleted, receivedIncomplete); if (dtxSelected) semanticState().selectDtx(); QPID_LOG(debug, cluster << " received session state update for " << sessionState().getId()); // The output tasks will be added later in the update process. connection->getOutputTasks().removeAll(); } void Connection::outputTask(uint16_t channel, const std::string& name) { broker::SessionState* session = connection->getChannel(channel).getSession(); if (!session) throw Exception(QPID_MSG(cluster << " channel not attached " << *this << "[" << channel << "] ")); OutputTask* task = session->getSemanticState().find(name).get(); connection->getOutputTasks().addOutputTask(task); } void Connection::shadowReady( uint64_t memberId, uint64_t connectionId, const string& mgmtId, const string& username, const string& fragment, uint32_t sendMax) { QPID_ASSERT(mgmtId == getBrokerConnection()->getMgmtId()); ConnectionId shadowId = ConnectionId(memberId, connectionId); QPID_LOG(debug, cluster << " catch-up connection " << *this << " becomes shadow " << shadowId); self = shadowId; connection->setUserId(username); // OK to use decoder here because cluster is stalled for update. cluster.getDecoder().get(self).setFragment(fragment.data(), fragment.size()); connection->setErrorListener(this); output.setSendMax(sendMax); } void Connection::setDtxBuffer(const UpdateReceiver::DtxBufferRef& bufRef) { broker::DtxManager& mgr = cluster.getBroker().getDtxManager(); broker::DtxWorkRecord* record = mgr.getWork(bufRef.xid); broker::DtxBuffer::shared_ptr buffer = (*record)[bufRef.index]; if (bufRef.suspended) bufRef.semanticState->getSuspendedXids()[bufRef.xid] = buffer; else bufRef.semanticState->setDtxBuffer(buffer); } // Marks the end of the update. void Connection::membership(const FieldTable& joiners, const FieldTable& members, const framing::SequenceNumber& frameSeq) { QPID_LOG(debug, cluster << " incoming update complete on connection " << *this); updateIn.consumerNumbering.clear(); for_each(updateIn.dtxBuffers.begin(), updateIn.dtxBuffers.end(), boost::bind(&Connection::setDtxBuffer, this, _1)); closeUpdated(); cluster.updateInDone(ClusterMap(joiners, members, frameSeq)); } void Connection::retractOffer() { QPID_LOG(info, cluster << " incoming update retracted on connection " << *this); closeUpdated(); cluster.updateInRetracted(); } void Connection::closeUpdated() { self.second = 0; // Mark this as completed update connection. if (connection.get()) connection->close(connection::CLOSE_CODE_NORMAL, "OK"); } bool Connection::isLocal() const { return self.first == cluster.getId() && self.second; } bool Connection::isShadow() const { return self.first != cluster.getId(); } bool Connection::isUpdated() const { return self.first == cluster.getId() && self.second == 0; } boost::shared_ptr Connection::findQueue(const std::string& qname) { boost::shared_ptr queue = cluster.getBroker().getQueues().find(qname); if (!queue) throw Exception(QPID_MSG(cluster << " can't find queue " << qname)); return queue; } broker::QueuedMessage Connection::getUpdateMessage() { boost::shared_ptr updateq = findQueue(UpdateClient::UPDATE); assert(!updateq->isDurable()); broker::QueuedMessage m = updateq->get(); if (!m.payload) throw Exception(QPID_MSG(cluster << " empty update queue")); return m; } void Connection::deliveryRecord(const string& qname, const SequenceNumber& position, const string& tag, const SequenceNumber& id, bool acquired, bool accepted, bool cancelled, bool completed, bool ended, bool windowing, bool enqueued, uint32_t credit) { broker::QueuedMessage m; broker::Queue::shared_ptr queue = findQueue(qname); if (!ended) { // Has a message if (acquired) { // Message is on the update queue m = getUpdateMessage(); m.queue = queue.get(); m.position = position; if (enqueued) queue->updateEnqueued(m); //inform queue of the message } else { // Message at original position in original queue queue->find(position, m); } // NOTE: removed: // if (!m.payload) // throw Exception(QPID_MSG("deliveryRecord no update message")); // // It seems this could happen legitimately in the case one // session browses message M, then another session acquires // it. In that case the browsers delivery record is !acquired // but the message is not on its original Queue. In that case // we'll get a deliveryRecord with no payload for the browser. // } // If a subscription is cancelled while there are unacked messages for it // there won't be a consumer. Just null it out in this case, it isn't needed. boost::shared_ptr consumer; try { consumer = semanticState().find(tag); } catch(...) {} broker::DeliveryRecord dr( m, queue, tag, consumer, acquired, accepted, windowing, credit); dr.setId(id); if (cancelled) dr.cancel(dr.getTag()); if (completed) dr.complete(); if (ended) dr.setEnded(); // Exsitance of message if (dtxBuffer) // Record for next dtx-ack dtxAckRecords.push_back(dr); else semanticState().record(dr); // Record on session's unacked list. } void Connection::queuePosition(const string& qname, const SequenceNumber& position) { findQueue(qname)->setPosition(position); } void Connection::queueFairshareState(const std::string& qname, const uint8_t priority, const uint8_t count) { if (!qpid::broker::Fairshare::setState(findQueue(qname)->getMessages(), priority, count)) { QPID_LOG(error, "Failed to set fair share state on queue " << qname << "; this will result in inconsistencies."); } } namespace { // find a StatefulQueueObserver that matches a given identifier class ObserverFinder { const std::string id; boost::shared_ptr target; ObserverFinder(const ObserverFinder&) {} public: ObserverFinder(const std::string& _id) : id(_id) {} broker::StatefulQueueObserver *getObserver() { if (target) return dynamic_cast(target.get()); return 0; } void operator() (boost::shared_ptr o) { if (!target) { broker::StatefulQueueObserver *p = dynamic_cast(o.get()); if (p && p->getId() == id) { target = o; } } } }; } void Connection::queueObserverState(const std::string& qname, const std::string& observerId, const FieldTable& state) { boost::shared_ptr queue(findQueue(qname)); ObserverFinder finder(observerId); // find this observer queue->eachObserver(finder); broker::StatefulQueueObserver *so = finder.getObserver(); if (so) { so->setState( state ); QPID_LOG(debug, "updated queue observer " << observerId << "'s state on queue " << qname << "; ..."); return; } QPID_LOG(error, "Failed to find observer " << observerId << " state on queue " << qname << "; this will result in inconsistencies."); } std::ostream& operator<<(std::ostream& o, const Connection& c) { const char* type="unknown"; if (c.isLocal()) type = "local"; else if (c.isShadow()) type = "shadow"; else if (c.isUpdated()) type = "updated"; const broker::Connection* bc = c.getBrokerConnection(); if (bc) o << bc->getMgmtId(); else o << ""; return o << "(" << c.getId() << " " << type << (c.isCatchUp() ? ",catchup":"") << ")"; } void Connection::txStart() { txBuffer.reset(new broker::TxBuffer()); } void Connection::txAccept(const framing::SequenceSet& acked) { txBuffer->enlist(boost::shared_ptr( new broker::TxAccept(acked, semanticState().getUnacked()))); } void Connection::txDequeue(const std::string& queue) { txBuffer->enlist(boost::shared_ptr( new broker::RecoveredDequeue(findQueue(queue), getUpdateMessage().payload))); } void Connection::txEnqueue(const std::string& queue) { txBuffer->enlist(boost::shared_ptr( new broker::RecoveredEnqueue(findQueue(queue), getUpdateMessage().payload))); } void Connection::txPublish(const framing::Array& queues, bool delivered) { boost::shared_ptr txPub( new broker::TxPublish(getUpdateMessage().payload)); for (framing::Array::const_iterator i = queues.begin(); i != queues.end(); ++i) txPub->deliverTo(findQueue((*i)->get())); txPub->delivered = delivered; txBuffer->enlist(txPub); } void Connection::txEnd() { semanticState().setTxBuffer(txBuffer); } void Connection::accumulatedAck(const qpid::framing::SequenceSet& s) { semanticState().setAccumulatedAck(s); } void Connection::dtxStart(const std::string& xid, bool ended, bool suspended, bool failed, bool expired) { dtxBuffer.reset(new broker::DtxBuffer(xid, ended, suspended, failed, expired)); txBuffer = dtxBuffer; } void Connection::dtxEnd() { broker::DtxManager& mgr = cluster.getBroker().getDtxManager(); std::string xid = dtxBuffer->getXid(); if (mgr.exists(xid)) mgr.join(xid, dtxBuffer); else mgr.start(xid, dtxBuffer); dtxBuffer.reset(); txBuffer.reset(); } // Sent after all DeliveryRecords for a dtx-ack have been collected in dtxAckRecords void Connection::dtxAck() { dtxBuffer->enlist( boost::shared_ptr(new broker::DtxAck(dtxAckRecords))); dtxAckRecords.clear(); } void Connection::dtxBufferRef(const std::string& xid, uint32_t index, bool suspended) { // Save the association between DtxBuffers and the session so we // can set the DtxBuffers at the end of the update when the // DtxManager has been replicated. updateIn.dtxBuffers.push_back( UpdateReceiver::DtxBufferRef(xid, index, suspended, &semanticState())); } // Sent at end of work record. void Connection::dtxWorkRecord(const std::string& xid, bool prepared, uint32_t timeout) { broker::DtxManager& mgr = cluster.getBroker().getDtxManager(); if (timeout) mgr.setTimeout(xid, timeout); if (prepared) mgr.prepare(xid); } void Connection::exchange(const std::string& encoded) { Buffer buf(const_cast(encoded.data()), encoded.size()); broker::Exchange::shared_ptr ex = broker::Exchange::decode(cluster.getBroker().getExchanges(), buf); if(ex.get() && ex->isDurable() && !ex->getName().find("amq.") == 0 && !ex->getName().find("qpid.") == 0) { cluster.getBroker().getStore().create(*(ex.get()), ex->getArgs()); } QPID_LOG(debug, cluster << " updated exchange " << ex->getName()); } void Connection::sessionError(uint16_t , const std::string& msg) { // Ignore errors before isOpen(), we're not multicasting yet. if (connection->isOpen()) cluster.flagError(*this, ERROR_TYPE_SESSION, msg); } void Connection::connectionError(const std::string& msg) { // Ignore errors before isOpen(), we're not multicasting yet. if (connection->isOpen()) { cluster.flagError(*this, ERROR_TYPE_CONNECTION, msg); } else cluster.eraseLocal(self); } void Connection::addQueueListener(const std::string& q, uint32_t listener) { if (listener >= updateIn.consumerNumbering.size()) throw Exception(QPID_MSG("Invalid listener ID: " << listener)); findQueue(q)->getListeners().addListener(updateIn.consumerNumbering[listener]); } // // This is the handler for incoming managementsetup messages. // void Connection::managementSetupState( uint64_t objectNum, uint16_t bootSequence, const framing::Uuid& id, const std::string& vendor, const std::string& product, const std::string& instance) { QPID_LOG(debug, cluster << " updated management: object number=" << objectNum << " boot sequence=" << bootSequence << " broker-id=" << id << " vendor=" << vendor << " product=" << product << " instance=" << instance); management::ManagementAgent* agent = cluster.getBroker().getManagementAgent(); if (!agent) throw Exception(QPID_MSG("Management schema update but management not enabled.")); agent->setNextObjectId(objectNum); agent->setBootSequence(bootSequence); agent->setUuid(id); agent->setName(vendor, product, instance); } void Connection::config(const std::string& encoded) { Buffer buf(const_cast(encoded.data()), encoded.size()); string kind; buf.getShortString (kind); if (kind == "link") { broker::Link::shared_ptr link = broker::Link::decode(cluster.getBroker().getLinks(), buf); QPID_LOG(debug, cluster << " updated link " << link->getHost() << ":" << link->getPort()); } else if (kind == "bridge") { broker::Bridge::shared_ptr bridge = broker::Bridge::decode(cluster.getBroker().getLinks(), buf); QPID_LOG(debug, cluster << " updated bridge " << bridge->getName()); } else throw Exception(QPID_MSG("Update failed, invalid kind of config: " << kind)); } void Connection::doCatchupIoCallbacks() { // We need to process IO callbacks during the catch-up phase in // order to service asynchronous completions for messages // transferred during catch-up. if (catchUp) getBrokerConnection()->doIoCallbacks(); } void Connection::clock(uint64_t time) { QPID_LOG(debug, "Cluster connection received time update"); cluster.clock(time); } void Connection::queueDequeueSincePurgeState(const std::string& qname, uint32_t dequeueSincePurge) { boost::shared_ptr queue(findQueue(qname)); queue->setDequeueSincePurge(dequeueSincePurge); } }} // Namespace qpid::cluster qpidc-0.16/src/qpid/cluster/Quorum_cman.cpp0000664000076400007640000000632711430053416021340 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/Quorum_cman.h" #include "qpid/cluster/Cluster.h" #include "qpid/log/Statement.h" #include "qpid/Options.h" #include "qpid/sys/Time.h" #include "qpid/sys/posix/PrivatePosix.h" namespace qpid { namespace cluster { namespace { boost::function errorFn; void cmanCallbackFn(cman_handle_t handle, void */*privdata*/, int reason, int /*arg*/) { if (reason == CMAN_REASON_STATECHANGE && !cman_is_quorate(handle)) { QPID_LOG(critical, "Lost contact with cluster quorum."); if (errorFn) errorFn(); cman_stop_notification(handle); } } } Quorum::Quorum(boost::function err) : cman(0), cmanFd(0) { errorFn = err; } Quorum::~Quorum() { if (dispatchHandle.get()) dispatchHandle->stopWatch(); dispatchHandle.reset(); if (cman) cman_finish(cman); } void Quorum::start(boost::shared_ptr p) { poller = p; QPID_LOG(debug, "Connecting to quorum service."); cman = cman_init(0); if (cman == 0) throw ErrnoException("Can't connect to cman service"); if (!cman_is_quorate(cman)) { QPID_LOG(notice, "Waiting for cluster quorum."); while(!cman_is_quorate(cman)) sys::sleep(5); } int err = cman_start_notification(cman, cmanCallbackFn); if (err != 0) throw ErrnoException("Can't register for cman notifications"); watch(getFd()); } void Quorum::watch(int fd) { cmanFd = fd; if (dispatchHandle.get()) dispatchHandle->stopWatch(); ioHandle.reset(new sys::PosixIOHandle(cmanFd)); dispatchHandle.reset( new sys::DispatchHandleRef( *ioHandle, // This must outlive the dispatchHandleRef boost::bind(&Quorum::dispatch, this, _1), // read 0, // write boost::bind(&Quorum::disconnect, this, _1) // disconnect )); dispatchHandle->startWatch(poller); } int Quorum::getFd() { int fd = cman_get_fd(cman); if (fd == 0) throw ErrnoException("Can't get cman file descriptor"); return fd; } void Quorum::dispatch(sys::DispatchHandle&) { try { cman_dispatch(cman, CMAN_DISPATCH_ALL); int fd = getFd(); if (fd != cmanFd) watch(fd); } catch (const std::exception& e) { QPID_LOG(critical, "Error in quorum dispatch: " << e.what()); errorFn(); } } void Quorum::disconnect(sys::DispatchHandle&) { QPID_LOG(critical, "Disconnected from quorum service"); errorFn(); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/Cluster.h0000664000076400007640000002514211672645152020150 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_CLUSTER_H #define QPID_CLUSTER_CLUSTER_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "ClusterMap.h" #include "ClusterSettings.h" #include "Cpg.h" #include "Decoder.h" #include "ErrorCheck.h" #include "Event.h" #include "EventFrame.h" #include "ExpiryPolicy.h" #include "FailoverExchange.h" #include "InitialStatusMap.h" #include "LockedConnectionMap.h" #include "Multicaster.h" #include "NoOpConnectionOutputHandler.h" #include "PollableQueue.h" #include "PollerDispatch.h" #include "Quorum.h" #include "StoreStatus.h" #include "UpdateReceiver.h" #include "qmf/org/apache/qpid/cluster/Cluster.h" #include "qpid/Url.h" #include "qpid/broker/Broker.h" #include "qpid/management/Manageable.h" #include "qpid/sys/Monitor.h" #include #include #include #include #include #include namespace qpid { namespace broker { class Message; class AclModule; } namespace framing { class AMQFrame; class AMQBody; struct Uuid; } namespace sys { class Timer; class AbsTime; class Duration; } namespace cluster { class Connection; struct EventFrame; class ClusterTimer; class UpdateDataExchange; class CredentialsExchange; /** * Connection to the cluster */ class Cluster : private Cpg::Handler, public management::Manageable { public: typedef boost::intrusive_ptr ConnectionPtr; typedef std::vector ConnectionVector; // Public functions are thread safe unless otherwise mentioned in a comment. // Construct the cluster in plugin earlyInitialize. Cluster(const ClusterSettings&, broker::Broker&); virtual ~Cluster(); // Called by plugin initialize: cluster start-up requires transport plugins . // Thread safety: only called by plugin initialize. void initialize(); // Connection map. void addLocalConnection(const ConnectionPtr&); void addShadowConnection(const ConnectionPtr&); void erase(const ConnectionId&); void eraseLocal(const ConnectionId&); // URLs of current cluster members. std::vector getIds() const; std::vector getUrls() const; boost::shared_ptr getFailoverExchange() const { return failoverExchange; } // Leave the cluster - called when fatal errors occur. void leave(); // Update completed - called in update thread void updateInClosed(); void updateInDone(const ClusterMap&); void updateInRetracted(); // True if we are expecting to receive catch-up connections. bool isExpectingUpdate(); MemberId getId() const; broker::Broker& getBroker() const; Multicaster& getMulticast() { return mcast; } const ClusterSettings& getSettings() const { return settings; } void deliverFrame(const EventFrame&); // Called in deliverFrame thread to indicate an error from the broker. void flagError(Connection&, ErrorCheck::ErrorType, const std::string& msg); // Called only during update by Connection::shadowReady Decoder& getDecoder() { return decoder; } ExpiryPolicy& getExpiryPolicy() { return *expiryPolicy; } UpdateReceiver& getUpdateReceiver() { return updateReceiver; } bool isElder() const; // Generates a log message for debugging purposes. std::string debugSnapshot(); // Defer messages delivered in an unsafe context by multicasting. bool deferDeliveryImpl(const std::string& queue, const boost::intrusive_ptr& msg); sys::AbsTime getClusterTime(); void sendClockUpdate(); void clock(const uint64_t time); static bool loggable(const framing::AMQFrame&); // True if the frame should be logged. private: typedef sys::Monitor::ScopedLock Lock; typedef PollableQueue PollableEventQueue; typedef PollableQueue PollableFrameQueue; typedef std::map ConnectionMap; /** Version number of the cluster protocol, to avoid mixed versions. */ static const uint32_t CLUSTER_VERSION; // NB: A dummy Lock& parameter marks functions that must only be // called with Cluster::lock locked. void leave(Lock&); std::vector getIds(Lock&) const; std::vector getUrls(Lock&) const; // == Called in main thread from Broker destructor. void brokerShutdown(); // == Called in deliverEventQueue thread void deliveredEvent(const Event&); // == Called in deliverFrameQueue thread void deliveredFrame(const EventFrame&); void processFrame(const EventFrame&, Lock&); // Cluster controls implement XML methods from cluster.xml. void updateRequest(const MemberId&, const std::string&, Lock&); void updateOffer(const MemberId& updater, uint64_t updatee, Lock&); void retractOffer(const MemberId& updater, uint64_t updatee, Lock&); void initialStatus(const MemberId&, uint32_t version, bool active, const framing::Uuid& clusterId, framing::cluster::StoreState, const framing::Uuid& shutdownId, const std::string& firstConfig, const framing::Array& urls, Lock&); void ready(const MemberId&, const std::string&, Lock&); void configChange(const MemberId&, const std::string& members, const std::string& left, const std::string& joined, Lock& l); void errorCheck(const MemberId&, uint8_t type, SequenceNumber frameSeq, Lock&); void timerWakeup(const MemberId&, const std::string& name, Lock&); void timerDrop(const MemberId&, const std::string& name, Lock&); void shutdown(const MemberId&, const framing::Uuid& shutdownId, Lock&); void deliverToQueue(const std::string& queue, const std::string& message, Lock&); void clock(const uint64_t time, Lock&); // Helper functions ConnectionPtr getConnection(const EventFrame&, Lock&); ConnectionVector getConnections(Lock&); void updateStart(const MemberId& updatee, const Url& url, Lock&); void makeOffer(const MemberId&, Lock&); void setReady(Lock&); void memberUpdate(Lock&); void setClusterId(const framing::Uuid&, Lock&); void erase(const ConnectionId&, Lock&); void eraseLocal(const ConnectionId&, Lock&); void requestUpdate(Lock& ); void initMapCompleted(Lock&); void becomeElder(Lock&); void setMgmtStatus(Lock&); void updateMgmtMembership(Lock&); void authenticate(); // == Called in CPG dispatch thread void deliver( // CPG deliver callback. cpg_handle_t /*handle*/, const struct cpg_name *group, uint32_t /*nodeid*/, uint32_t /*pid*/, void* /*msg*/, int /*msg_len*/); void deliverEvent(const Event&); void configChange( // CPG config change callback. cpg_handle_t /*handle*/, const struct cpg_name */*group*/, const struct cpg_address */*members*/, int /*nMembers*/, const struct cpg_address */*left*/, int /*nLeft*/, const struct cpg_address */*joined*/, int /*nJoined*/ ); // == Called in management threads. virtual qpid::management::ManagementObject* GetManagementObject() const; virtual management::Manageable::status_t ManagementMethod (uint32_t methodId, management::Args& args, std::string& text); void stopClusterNode(Lock&); void stopFullCluster(Lock&); // == Called in connection IO threads . void checkUpdateIn(Lock&); // == Called in UpdateClient thread. void updateOutDone(); void updateOutError(const std::exception&); void updateOutDone(Lock&); // Immutable members set on construction, never changed. const ClusterSettings settings; broker::Broker& broker; qmf::org::apache::qpid::cluster::Cluster* mgmtObject; // mgnt owns lifecycle boost::shared_ptr poller; Cpg cpg; const std::string name; Url myUrl; const MemberId self; framing::Uuid clusterId; NoOpConnectionOutputHandler shadowOut; qpid::management::ManagementAgent* mAgent; boost::intrusive_ptr expiryPolicy; // Thread safe members Multicaster mcast; PollerDispatch dispatcher; PollableEventQueue deliverEventQueue; PollableFrameQueue deliverFrameQueue; boost::shared_ptr failoverExchange; boost::shared_ptr updateDataExchange; boost::shared_ptr credentialsExchange; Quorum quorum; LockedConnectionMap localConnections; // Used only in deliverEventQueue thread or when stalled for update. Decoder decoder; bool discarding; // Remaining members are protected by lock. mutable sys::Monitor lock; // Local cluster state, cluster map enum { PRE_INIT,///< Have not yet received complete initial status map. INIT, ///< Waiting to reach cluster-size. JOINER, ///< Sent update request, waiting for update offer. UPDATEE, ///< Stalled receive queue at update offer, waiting for update to complete. CATCHUP, ///< Update complete, unstalled but has not yet seen own "ready" event. READY, ///< Fully operational OFFER, ///< Sent an offer, waiting for accept/reject. UPDATER, ///< Offer accepted, sending a state update. LEFT ///< Final state, left the cluster. } state; ConnectionMap connections; InitialStatusMap initMap; StoreStatus store; ClusterMap map; MemberSet elders; bool elder; size_t lastAliveCount; bool lastBroker; sys::Thread updateThread; boost::optional updatedMap; bool updateRetracted, updateClosed; ErrorCheck error; UpdateReceiver updateReceiver; ClusterTimer* timer; sys::Timer clockTimer; sys::AbsTime clusterTime; sys::Duration clusterTimeOffset; broker::AclModule* acl; friend std::ostream& operator<<(std::ostream&, const Cluster&); friend struct ClusterDispatcher; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_CLUSTER_H*/ qpidc-0.16/src/qpid/cluster/ErrorCheck.h0000664000076400007640000000504111562043261020541 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_ERRORCHECK_H #define QPID_CLUSTER_ERRORCHECK_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/MemberSet.h" #include "qpid/cluster/Multicaster.h" #include "qpid/framing/enum.h" #include "qpid/framing/SequenceNumber.h" #include #include #include namespace qpid { namespace cluster { struct EventFrame; class Cluster; class Multicaster; class Connection; /** * Error checking logic. * * When an error occurs queue up frames until we can determine if all * nodes experienced the error. If not, we shut down. */ class ErrorCheck { public: typedef framing::cluster::ErrorType ErrorType; typedef framing::SequenceNumber SequenceNumber; ErrorCheck(Cluster&); /** A local error has occured */ void error(Connection&, ErrorType, SequenceNumber frameSeq, const MemberSet&, const std::string& msg); /** Called when a frame is delivered */ void delivered(const EventFrame&); /**@pre canProcess **/ EventFrame getNext(); bool canProcess() const { return type == NONE && !frames.empty(); } bool isUnresolved() const { return type != NONE; } /** Respond to an error check saying we had no error. */ void respondNone(const MemberId&, uint8_t type, SequenceNumber frameSeq); private: static const ErrorType NONE = framing::cluster::ERROR_TYPE_NONE; typedef std::deque FrameQueue; FrameQueue::iterator review(const FrameQueue::iterator&); void checkResolved(); Cluster& cluster; Multicaster& mcast; FrameQueue frames; MemberSet unresolved; SequenceNumber frameSeq; ErrorType type; Connection* connection; std::string message; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_ERRORCHECK_H*/ qpidc-0.16/src/qpid/cluster/qpidd_watchdog.cpp0000664000076400007640000000356711241302434022033 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** @file helper executable for WatchDogPlugin.cpp */ #include #include #include #include #include #include #include long timeout; void killParent(int) { ::kill(getppid(), SIGKILL); ::fprintf(stderr, "Watchdog killed unresponsive broker, pid=%d\n", ::getppid()); ::exit(1); } void resetTimer(int) { struct ::itimerval itval = { { 0, 0 }, { timeout, 0 } }; if (::setitimer(ITIMER_REAL, &itval, 0) !=0) { ::perror("Watchdog failed to set timer"); killParent(0); ::exit(1); } } /** Simple watchdog program: kill parent process if timeout * expires without a SIGUSR1. * Will be killed with SIGHUP when parent shuts down. * Args: timeout in seconds. */ int main(int argc, char** argv) { if(argc != 2 || (timeout = atoi(argv[1])) == 0) { ::fprintf(stderr, "Usage: %s \n", argv[0]); ::exit(1); } ::signal(SIGUSR1, resetTimer); ::signal(SIGALRM, killParent); resetTimer(0); while (true) { sleep(INT_MAX); } } qpidc-0.16/src/qpid/cluster/UpdateReceiver.h0000664000076400007640000000410711627235610021426 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_UPDATESTATE_H #define QPID_CLUSTER_UPDATESTATE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Numbering.h" #include "qpid/broker/SemanticState.h" namespace qpid { namespace cluster { /** * Cluster-wide state used when receiving an update. */ class UpdateReceiver { public: /** Numbering used to identify Queue listeners as consumers */ typedef Numbering > ConsumerNumbering; ConsumerNumbering consumerNumbering; /** Management-id for the next shadow connection */ std::string nextShadowMgmtId; /** Record the position of a DtxBuffer in the DtxManager (xid + index) * and the association with a session, either suspended or current. */ struct DtxBufferRef { std::string xid; uint32_t index; // Index in WorkRecord in DtxManager bool suspended; // Is this a suspended or current transaction? broker::SemanticState* semanticState; // Associated session DtxBufferRef(const std::string& x, uint32_t i, bool s, broker::SemanticState* ss) : xid(x), index(i), suspended(s), semanticState(ss) {} }; typedef std::vector DtxBuffers; DtxBuffers dtxBuffers; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_UPDATESTATE_H*/ qpidc-0.16/src/qpid/cluster/UpdateExchange.cpp0000664000076400007640000000532111611360622021731 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/FieldTable.h" #include "qpid/broker/Message.h" #include "UpdateExchange.h" namespace qpid { namespace cluster { using framing::MessageTransferBody; using framing::DeliveryProperties; using framing::MessageProperties; using framing::FieldTable; UpdateExchange::UpdateExchange(management::Manageable* parent) : broker::Exchange(UpdateClient::UPDATE, parent), broker::FanOutExchange(UpdateClient::UPDATE, parent) {} void UpdateExchange::setProperties(const boost::intrusive_ptr& msg) { // Copy exchange name to destination property. MessageTransferBody* transfer = msg->getMethod(); assert(transfer); const DeliveryProperties* props = msg->getProperties(); assert(props); if (props->hasExchange()) transfer->setDestination(props->getExchange()); else transfer->clearDestinationFlag(); // Copy expiration from x-property if present. if (msg->hasProperties()) { const MessageProperties* mprops = msg->getProperties(); if (mprops->hasApplicationHeaders()) { const FieldTable& headers = mprops->getApplicationHeaders(); if (headers.isSet(UpdateClient::X_QPID_EXPIRATION)) { msg->setExpiration( sys::AbsTime(sys::EPOCH, headers.getAsInt64(UpdateClient::X_QPID_EXPIRATION))); msg->removeCustomProperty(UpdateClient::X_QPID_EXPIRATION); // Erase props/headers that were added by the UpdateClient if (headers.isSet(UpdateClient::X_QPID_NO_MESSAGE_PROPS)) msg->eraseProperties(); else if (headers.isSet(UpdateClient::X_QPID_NO_HEADERS)) msg->clearApplicationHeadersFlag(); } } } } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/Quorum_cman.h0000664000076400007640000000323711430053416021002 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_QUORUM_CMAN_H #define QPID_CLUSTER_QUORUM_CMAN_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include extern "C" { #include } namespace qpid { namespace sys { class Poller; class PosixIOHandle; } namespace cluster { class Cluster; class Quorum { public: Quorum(boost::function onError); ~Quorum(); void start(boost::shared_ptr); private: void dispatch(sys::DispatchHandle&); void disconnect(sys::DispatchHandle&); int getFd(); void watch(int fd); cman_handle_t cman; int cmanFd; std::auto_ptr ioHandle; std::auto_ptr dispatchHandle; boost::shared_ptr poller; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_QUORUM_CMAN_H*/ qpidc-0.16/src/qpid/cluster/ClusterSettings.h0000664000076400007640000000270011576211367021664 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_CLUSTERSETTINGS_H #define QPID_CLUSTER_CLUSTERSETTINGS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include namespace qpid { namespace cluster { struct ClusterSettings { std::string name; std::string url; bool quorum; size_t readMax; std::string username, password, mechanism; size_t size; uint16_t clockInterval; ClusterSettings() : quorum(false), readMax(10), size(1), clockInterval(10) {} Url getUrl(uint16_t port) const { if (url.empty()) return Url::getIpAddressesUrl(port); return Url(url); } }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_CLUSTERSETTINGS_H*/ qpidc-0.16/src/qpid/cluster/ConnectionCodec.cpp0000664000076400007640000000671011422366317022113 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/ConnectionCodec.h" #include "qpid/cluster/Connection.h" #include "qpid/cluster/Cluster.h" #include "qpid/cluster/ProxyInputHandler.h" #include "qpid/broker/Connection.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/log/Statement.h" #include "qpid/memory.h" #include #include namespace qpid { namespace cluster { using namespace framing; sys::ConnectionCodec* ConnectionCodec::Factory::create(ProtocolVersion v, sys::OutputControl& out, const std::string& id, const qpid::sys::SecuritySettings& external) { broker::Broker& broker = cluster.getBroker(); if (broker.getConnectionCounter().allowConnection()) { QPID_LOG(error, "Client max connection count limit exceeded: " << broker.getOptions().maxConnections << " connection refused"); return 0; } if (v == ProtocolVersion(0, 10)) return new ConnectionCodec(v, out, id, cluster, false, false, external); else if (v == ProtocolVersion(0x80 + 0, 0x80 + 10)) // Catch-up connection return new ConnectionCodec(v, out, id, cluster, true, false, external); return 0; } // Used for outgoing Link connections sys::ConnectionCodec* ConnectionCodec::Factory::create(sys::OutputControl& out, const std::string& logId, const qpid::sys::SecuritySettings& external) { return new ConnectionCodec(ProtocolVersion(0,10), out, logId, cluster, false, true, external); } ConnectionCodec::ConnectionCodec( const ProtocolVersion& v, sys::OutputControl& out, const std::string& logId, Cluster& cluster, bool catchUp, bool isLink, const qpid::sys::SecuritySettings& external ) : codec(out, logId, isLink), interceptor(new Connection(cluster, codec, logId, cluster.getId(), catchUp, isLink, external)) { cluster.addLocalConnection(interceptor); std::auto_ptr ih(new ProxyInputHandler(interceptor)); codec.setInputHandler(ih); codec.setVersion(v); } ConnectionCodec::~ConnectionCodec() {} size_t ConnectionCodec::decode(const char* buffer, size_t size) { return interceptor->decode(buffer, size); } bool ConnectionCodec::isClosed() const { return codec.isClosed(); } size_t ConnectionCodec::encode(const char* buffer, size_t size) { return codec.encode(buffer, size); } bool ConnectionCodec::canEncode() { return codec.canEncode(); } void ConnectionCodec::closed() { codec.closed(); } ProtocolVersion ConnectionCodec::getVersion() const { return codec.getVersion(); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/RetractClient.cpp0000664000076400007640000000375111400751156021616 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/RetractClient.h" #include "qpid/cluster/UpdateClient.h" #include "qpid/framing/ClusterConnectionRetractOfferBody.h" #include "qpid/client/ConnectionAccess.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/log/Statement.h" namespace qpid { namespace cluster { using namespace framing; namespace { struct AutoClose { client::Connection& connection; AutoClose(client::Connection& c) : connection(c) {} ~AutoClose() { connection.close(); } }; } RetractClient::RetractClient(const Url& u, const client::ConnectionSettings& cs) : url(u), connectionSettings(cs) {} RetractClient::~RetractClient() { delete this; } void RetractClient::run() { try { client::Connection c = UpdateClient::catchUpConnection(); c.open(url, connectionSettings); AutoClose ac(c); AMQFrame retract((ClusterConnectionRetractOfferBody())); client::ConnectionAccess::getImpl(c)->expand(retract.encodedSize(), false); client::ConnectionAccess::getImpl(c)->handle(retract); } catch (const std::exception& e) { QPID_LOG(error, " while retracting retract to " << url << ": " << e.what()); } } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/SecureConnectionFactory.h0000664000076400007640000000337111373210115023306 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef QPID_CLUSTER_SecureconnectionFactory #define QPID_CLUSTER_SecureconnectionFactory #include "qpid/sys/ConnectionCodec.h" #include namespace qpid { namespace broker { class Broker; } namespace cluster { class SecureConnectionFactory : public qpid::sys::ConnectionCodec::Factory { public: typedef boost::shared_ptr CodecFactoryPtr; SecureConnectionFactory(CodecFactoryPtr f); qpid::sys::ConnectionCodec* create( framing::ProtocolVersion, qpid::sys::OutputControl&, const std::string& id, const qpid::sys::SecuritySettings& ); /** Return "preferred" codec for outbound connections. */ qpid::sys::ConnectionCodec* create( qpid::sys::OutputControl&, const std::string& id, const qpid::sys::SecuritySettings& ); private: CodecFactoryPtr codecFactory; }; }} // namespace qpid::cluster #endif // QPID_CLUSTER_SecureconnectionFactory qpidc-0.16/src/qpid/cluster/RetractClient.h0000664000076400007640000000271511361351710021260 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_RETRACTCLIENT_H #define QPID_CLUSTER_RETRACTCLIENT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ConnectionSettings.h" #include "qpid/sys/Runnable.h" #include "qpid/Url.h" namespace qpid { namespace cluster { /** * A client that retracts an offer to a remote broker using AMQP. @see UpdateClient */ class RetractClient : public sys::Runnable { public: RetractClient(const Url&, const client::ConnectionSettings&); ~RetractClient(); void run(); // Will delete this when finished. private: Url url; client::ConnectionSettings connectionSettings; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_RETRACTCLIENT_H*/ qpidc-0.16/src/qpid/cluster/InitialStatusMap.h0000664000076400007640000000632711667435470021772 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_INITIALSTATUSMAP_H #define QPID_CLUSTER_INITIALSTATUSMAP_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "MemberSet.h" #include "qpid/Url.h" #include #include #include namespace qpid { namespace cluster { /** * Track status of cluster members during initialization. * * When a new member joins the CPG cluster, all members send an initial-status * control. This map tracks those controls and provides data to make descisions * about joining the cluster. * */ class InitialStatusMap { public: typedef framing::ClusterInitialStatusBody Status; InitialStatusMap(const MemberId& self, size_t size); /** Process a config change. May make isResendNeeded() true. */ void configChange(const MemberSet& newConfig); /** @return true if we need to re-send status */ bool isResendNeeded(); /** Process received status */ void received(const MemberId&, const Status& is); /**@return true if the map has an entry for all current cluster members. */ bool isComplete() const; size_t getActualSize() const { return map.size(); } size_t getRequiredSize() const { return size; } /**@return true if the map was completed by the last config change or received. */ bool transitionToComplete(); /**@pre isComplete(). @return this node's elders */ MemberSet getElders() const; /**@pre isComplete(). @return True if there are active members of the cluster. */ bool isActive(); /**@pre isComplete(). @return True if we need to request an update. */ bool isUpdateNeeded(); /**@pre isComplete(). @return Cluster-wide cluster ID. */ framing::Uuid getClusterId(); /**@pre isComplete(). @throw Exception if there are any inconsistencies. */ void checkConsistent(); /*@return cluster URLs */ std::vector getUrls() const; /** Get first config-change for this member, encoded as a string. *@pre configChange has been called at least once. */ std::string getFirstConfigStr() const; private: typedef std::map > Map; static bool notInitialized(const Map::value_type&); static bool isActiveEntry(const Map::value_type&); static bool hasStore(const Map::value_type&); Map map; MemberSet firstConfig; MemberId self; bool completed, resendNeeded; size_t size; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_INITIALSTATUSMAP_H*/ qpidc-0.16/src/qpid/cluster/Connection.h0000664000076400007640000002454711717465066020642 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_CONNECTION_H #define QPID_CLUSTER_CONNECTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "types.h" #include "OutputInterceptor.h" #include "McastFrameHandler.h" #include "UpdateReceiver.h" #include "qpid/RefCounted.h" #include "qpid/broker/Connection.h" #include "qpid/broker/DeliveryRecord.h" #include "qpid/broker/SecureConnection.h" #include "qpid/broker/SemanticState.h" #include "qpid/amqp_0_10/Connection.h" #include "qpid/sys/AtomicValue.h" #include "qpid/sys/ConnectionInputHandler.h" #include "qpid/sys/ConnectionOutputHandler.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/FrameDecoder.h" #include namespace qpid { namespace framing { class AMQFrame; } namespace broker { class SemanticState; struct QueuedMessage; class TxBuffer; class TxAccept; } namespace cluster { class Cluster; class Event; struct EventFrame; /** Intercept broker::Connection calls for shadow and local cluster connections. */ class Connection : public RefCounted, public sys::ConnectionInputHandler, public framing::AMQP_AllOperations::ClusterConnectionHandler, private broker::Connection::ErrorListener { public: /** Local connection. */ Connection(Cluster&, sys::ConnectionOutputHandler& out, const std::string& mgmtId, MemberId, bool catchUp, bool isLink, const qpid::sys::SecuritySettings& external); /** Shadow connection. */ Connection(Cluster&, sys::ConnectionOutputHandler& out, const std::string& mgmtId, const ConnectionId& id, const qpid::sys::SecuritySettings& external); ~Connection(); ConnectionId getId() const { return self; } broker::Connection* getBrokerConnection() { return connection.get(); } const broker::Connection* getBrokerConnection() const { return connection.get(); } /** Local connections may be clients or catch-up connections */ bool isLocal() const; bool isLocalClient() const { return isLocal() && !isCatchUp(); } /** True for connections that are shadowing remote broker connections */ bool isShadow() const; /** True if the connection is in "catch-up" mode: building initial broker state. */ bool isCatchUp() const { return catchUp; } /** True if the connection is a completed shared update connection */ bool isUpdated() const; Cluster& getCluster() { return cluster; } // ConnectionInputHandler methods void received(framing::AMQFrame&); void closed(); bool doOutput(); void idleOut() { if (connection.get()) connection->idleOut(); } void idleIn() { if (connection.get()) connection->idleIn(); } // ConnectionCodec methods - called by IO layer with a read buffer. size_t decode(const char* buffer, size_t size); // Called for data delivered from the cluster. void deliveredFrame(const EventFrame&); void consumerState(const std::string& name, bool blocked, bool notifyEnabled, const qpid::framing::SequenceNumber& position, uint32_t usedMsgCredit, uint32_t usedByteCredit); // ==== Used in catch-up mode to build initial state. // // State update methods. void shadowPrepare(const std::string&); void shadowSetUser(const std::string&); void sessionState(const framing::SequenceNumber& replayStart, const framing::SequenceNumber& sendCommandPoint, const framing::SequenceSet& sentIncomplete, const framing::SequenceNumber& expected, const framing::SequenceNumber& received, const framing::SequenceSet& unknownCompleted, const SequenceSet& receivedIncomplete, bool dtxSelected); void outputTask(uint16_t channel, const std::string& name); void shadowReady(uint64_t memberId, uint64_t connectionId, const std::string& managementId, const std::string& username, const std::string& fragment, uint32_t sendMax); void membership(const framing::FieldTable&, const framing::FieldTable&, const framing::SequenceNumber& frameSeq); void retractOffer(); void deliveryRecord(const std::string& queue, const framing::SequenceNumber& position, const std::string& tag, const framing::SequenceNumber& id, bool acquired, bool accepted, bool cancelled, bool completed, bool ended, bool windowing, bool enqueued, uint32_t credit); void queuePosition(const std::string&, const framing::SequenceNumber&); void queueFairshareState(const std::string&, const uint8_t priority, const uint8_t count); void queueObserverState(const std::string&, const std::string&, const framing::FieldTable&); void txStart(); void txAccept(const framing::SequenceSet&); void txDequeue(const std::string&); void txEnqueue(const std::string&); void txPublish(const framing::Array&, bool); void txEnd(); void accumulatedAck(const framing::SequenceSet&); // Dtx state void dtxStart(const std::string& xid, bool ended, bool suspended, bool failed, bool expired); void dtxEnd(); void dtxAck(); void dtxBufferRef(const std::string& xid, uint32_t index, bool suspended); void dtxWorkRecord(const std::string& xid, bool prepared, uint32_t timeout); // Encoded exchange replication. void exchange(const std::string& encoded); void giveReadCredit(int credit); void announce(const std::string& mgmtId, uint32_t ssf, const std::string& authid, bool nodict, const std::string& username, const std::string& initFrames); void close(); void abort(); void deliverClose(); OutputInterceptor& getOutput() { return output; } void addQueueListener(const std::string& queue, uint32_t listener); void managementSetupState(uint64_t objectNum, uint16_t bootSequence, const framing::Uuid&, const std::string& vendor, const std::string& product, const std::string& instance); void config(const std::string& encoded); void setSecureConnection ( broker::SecureConnection * sc ); void doCatchupIoCallbacks(); void clock(uint64_t time); void queueDequeueSincePurgeState(const std::string&, uint32_t); bool isAnnounced() const { return announced; } private: struct NullFrameHandler : public framing::FrameHandler { void handle(framing::AMQFrame&) {} }; // Arguments to construct a broker::Connection struct ConnectionCtor { sys::ConnectionOutputHandler* out; broker::Broker& broker; std::string mgmtId; qpid::sys::SecuritySettings external; bool isLink; uint64_t objectId; bool shadow; bool delayManagement; ConnectionCtor( sys::ConnectionOutputHandler* out_, broker::Broker& broker_, const std::string& mgmtId_, const qpid::sys::SecuritySettings& external_, bool isLink_=false, uint64_t objectId_=0, bool shadow_=false, bool delayManagement_=false ) : out(out_), broker(broker_), mgmtId(mgmtId_), external(external_), isLink(isLink_), objectId(objectId_), shadow(shadow_), delayManagement(delayManagement_) {} std::auto_ptr construct() { return std::auto_ptr( new broker::Connection( out, broker, mgmtId, external, isLink, objectId, shadow, delayManagement) ); } }; static NullFrameHandler nullFrameHandler; // Error listener functions void connectionError(const std::string&); void sessionError(uint16_t channel, const std::string&); void init(); bool checkUnsupported(const framing::AMQBody& body); void deliverDoOutput(uint32_t limit); bool checkProtocolHeader(const char*& data, size_t size); void processInitialFrames(const char*& data, size_t size); boost::shared_ptr findQueue(const std::string& qname); broker::SessionState& sessionState(); broker::SemanticState& semanticState(); broker::QueuedMessage getUpdateMessage(); void closeUpdated(); void setDtxBuffer(const UpdateReceiver::DtxBuffers::value_type &); Cluster& cluster; ConnectionId self; bool catchUp; bool announced; OutputInterceptor output; framing::FrameDecoder localDecoder; ConnectionCtor connectionCtor; std::auto_ptr connection; framing::SequenceNumber deliverSeq; framing::ChannelId currentChannel; boost::shared_ptr txBuffer; boost::shared_ptr dtxBuffer; broker::DeliveryRecords dtxAckRecords; broker::DtxWorkRecord* dtxCurrent; bool expectProtocolHeader; McastFrameHandler mcastFrameHandler; UpdateReceiver& updateIn; qpid::broker::SecureConnection* secureConnection; std::string initialFrames; static qpid::sys::AtomicValue catchUpId; friend std::ostream& operator<<(std::ostream&, const Connection&); }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_CONNECTION_H*/ qpidc-0.16/src/qpid/cluster/ErrorCheck.cpp0000664000076400007640000001414511354462650021107 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/ErrorCheck.h" #include "qpid/cluster/EventFrame.h" #include "qpid/cluster/ClusterMap.h" #include "qpid/cluster/Cluster.h" #include "qpid/framing/ClusterErrorCheckBody.h" #include "qpid/framing/ClusterConfigChangeBody.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace cluster { using namespace std; using namespace framing; using namespace framing::cluster; ErrorCheck::ErrorCheck(Cluster& c) : cluster(c), mcast(c.getMulticast()), frameSeq(0), type(ERROR_TYPE_NONE), connection(0) {} void ErrorCheck::error( Connection& c, ErrorType t, framing::SequenceNumber seq, const MemberSet& ms, const std::string& msg) { // Detected a local error, inform cluster and set error state. assert(t != ERROR_TYPE_NONE); // Must be an error. assert(type == ERROR_TYPE_NONE); // Can't be called when already in an error state. type = t; unresolved = ms; frameSeq = seq; connection = &c; message = msg; QPID_LOG(debug, cluster<< (type == ERROR_TYPE_SESSION ? " channel" : " connection") << " error " << frameSeq << " on " << c << " must be resolved with: " << unresolved << ": " << message); mcast.mcastControl( ClusterErrorCheckBody(ProtocolVersion(), type, frameSeq), cluster.getId()); // If there are already frames queued up by a previous error, review // them with respect to this new error. for (FrameQueue::iterator i = frames.begin(); i != frames.end(); i = review(i)) ; } void ErrorCheck::delivered(const EventFrame& e) { frames.push_back(e); review(frames.end()-1); } // Review a frame in the queue with respect to the current error. ErrorCheck::FrameQueue::iterator ErrorCheck::review(const FrameQueue::iterator& i) { FrameQueue::iterator next = i+1; if(!isUnresolved() || !i->frame.getBody() || !i->frame.getMethod()) return next; // Only interested in control frames while unresolved. const AMQMethodBody* method = i->frame.getMethod(); if (method->isA()) { const ClusterErrorCheckBody* errorCheck = static_cast(method); if (errorCheck->getFrameSeq() == frameSeq) { // Addresses current error next = frames.erase(i); // Drop matching error check controls if (errorCheck->getType() < type) { // my error is worse than his QPID_LOG(critical, cluster << " local error " << frameSeq << " did not occur on member " << i->getMemberId() << ": " << message); throw Exception( QPID_MSG("local error did not occur on all cluster members " << ": " << message)); } else { // his error is worse/same as mine. QPID_LOG(debug, cluster << " error " << frameSeq << " resolved with " << i->getMemberId()); unresolved.erase(i->getMemberId()); checkResolved(); } } else if (errorCheck->getFrameSeq() < frameSeq && errorCheck->getType() != NONE && i->connectionId.getMember() != cluster.getId()) { // This error occured before the current error so we // have processed past it. next = frames.erase(i); // Drop the error check control respondNone(i->connectionId.getMember(), errorCheck->getType(), errorCheck->getFrameSeq()); } // if errorCheck->getFrameSeq() > frameSeq then leave it in the queue. } else if (method->isA()) { const ClusterConfigChangeBody* configChange = static_cast(method); if (configChange) { MemberSet members(decodeMemberSet(configChange->getMembers())); QPID_LOG(debug, cluster << " apply config change to error " << frameSeq << ": " << members); MemberSet intersect; set_intersection(members.begin(), members.end(), unresolved.begin(), unresolved.end(), inserter(intersect, intersect.begin())); unresolved.swap(intersect); checkResolved(); } } return next; } void ErrorCheck::checkResolved() { if (unresolved.empty()) { // No more potentially conflicted members, we're clear. type = ERROR_TYPE_NONE; QPID_LOG(debug, cluster << " error " << frameSeq << " resolved."); } else QPID_LOG(debug, cluster << " error " << frameSeq << " must be resolved with " << unresolved); } EventFrame ErrorCheck::getNext() { assert(canProcess()); EventFrame e(frames.front()); frames.pop_front(); return e; } void ErrorCheck::respondNone(const MemberId& from, uint8_t type, framing::SequenceNumber frameSeq) { // Don't respond to non-errors or to my own errors. if (type == ERROR_TYPE_NONE || from == cluster.getId()) return; QPID_LOG(debug, cluster << " error " << frameSeq << " did not occur locally."); mcast.mcastControl( ClusterErrorCheckBody(ProtocolVersion(), ERROR_TYPE_NONE, frameSeq), cluster.getId() ); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/PollerDispatch.h0000664000076400007640000000325011462064367021440 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_POLLERDISPATCH_H #define QPID_CLUSTER_POLLERDISPATCH_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/Cpg.h" #include "qpid/sys/Poller.h" #include "qpid/sys/DispatchHandle.h" #include namespace qpid { namespace cluster { /** * Dispatch CPG events via the poller. */ class PollerDispatch { public: PollerDispatch(Cpg&, boost::shared_ptr poller, boost::function onError) ; ~PollerDispatch(); void start(); private: // Poller callbacks void dispatch(sys::DispatchHandle&); // Dispatch CPG events. void disconnect(sys::DispatchHandle&); // CPG was disconnected Cpg& cpg; boost::shared_ptr poller; boost::function onError; sys::DispatchHandleRef dispatchHandle; bool started; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_POLLERDISPATCH_H*/ qpidc-0.16/src/qpid/cluster/Multicaster.cpp0000664000076400007640000000623511627510060021345 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/Multicaster.h" #include "qpid/cluster/Cpg.h" #include "qpid/cluster/Cluster.h" #include "qpid/log/Statement.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/AMQFrame.h" namespace qpid { namespace cluster { Multicaster::Multicaster(Cpg& cpg_, const boost::shared_ptr& poller, boost::function onError_) : onError(onError_), cpg(cpg_), queue(boost::bind(&Multicaster::sendMcast, this, _1), poller), ready(false), bypass(true) {} void Multicaster::mcastControl(const framing::AMQBody& body, const ConnectionId& id) { mcast(Event::control(body, id)); } void Multicaster::mcastControl(const framing::AMQFrame& frame, const ConnectionId& id) { mcast(Event::control(frame, id)); } void Multicaster::mcastBuffer(const char* data, size_t size, const ConnectionId& id) { Event e(DATA, id, size); memcpy(e.getData(), data, size); mcast(e); } void Multicaster::mcast(const Event& e) { { sys::Mutex::ScopedLock l(lock); if (!ready && e.isConnection()) { holdingQueue.push_back(e); return; } } QPID_LOG_IF(trace, e.isControl() && Cluster::loggable(e.getFrame()), "MCAST " << e); if (bypass) { // direct, don't queue iovec iov = e.toIovec(); while (!cpg.mcast(&iov, 1)) ; } else queue.push(e); } Multicaster::PollableEventQueue::Batch::const_iterator Multicaster::sendMcast(const PollableEventQueue::Batch& values) { try { PollableEventQueue::Batch::const_iterator i = values.begin(); while( i != values.end()) { iovec iov = i->toIovec(); if (!cpg.mcast(&iov, 1)) { // cpg didn't send because of CPG flow control. break; } ++i; } return i; } catch (const std::exception& e) { QPID_LOG(critical, "Multicast error: " << e.what()); queue.stop(); onError(); return values.end(); } } void Multicaster::start() { queue.start(); bypass = false; } void Multicaster::setReady() { sys::Mutex::ScopedLock l(lock); ready = true; std::for_each(holdingQueue.begin(), holdingQueue.end(), boost::bind(&Multicaster::mcast, this, _1)); holdingQueue.clear(); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/ClusterPlugin.cpp0000664000076400007640000001126511576211367021663 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "config.h" #include "qpid/cluster/Connection.h" #include "qpid/cluster/ConnectionCodec.h" #include "qpid/cluster/ClusterSettings.h" #include "qpid/cluster/SecureConnectionFactory.h" #include "qpid/cluster/Cluster.h" #include "qpid/cluster/ConnectionCodec.h" #include "qpid/cluster/UpdateClient.h" #include "qpid/broker/Broker.h" #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/sys/AtomicValue.h" #include "qpid/log/Statement.h" #include "qpid/management/ManagementAgent.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/Message.h" #include "qpid/broker/Queue.h" #include "qpid/broker/SessionState.h" #include "qpid/client/ConnectionSettings.h" #include #include #include namespace qpid { namespace cluster { using namespace std; using broker::Broker; using management::ManagementAgent; /** Note separating options from settings to work around boost version differences. * Old boost takes a reference to options objects, but new boost makes a copy. * New boost allows a shared_ptr but that's not compatible with old boost. */ struct ClusterOptions : public Options { ClusterSettings& settings; ClusterOptions(ClusterSettings& v) : Options("Cluster Options"), settings(v) { addOptions() ("cluster-name", optValue(settings.name, "NAME"), "Name of cluster to join") ("cluster-url", optValue(settings.url,"URL"), "Set URL of this individual broker, to be advertized to clients.\n" "Defaults to a URL listing all the local IP addresses\n") ("cluster-username", optValue(settings.username, ""), "Username for connections between brokers") ("cluster-password", optValue(settings.password, ""), "Password for connections between brokers") ("cluster-mechanism", optValue(settings.mechanism, ""), "Authentication mechanism for connections between brokers") #if HAVE_LIBCMAN_H ("cluster-cman", optValue(settings.quorum), "Integrate with Cluster Manager (CMAN) cluster.") #endif ("cluster-size", optValue(settings.size, "N"), "Wait for N cluster members before allowing clients to connect.") ("cluster-clock-interval", optValue(settings.clockInterval,"N"), "How often to broadcast the current time to the cluster nodes, in milliseconds. A value between 5 and 1000 is recommended.") ("cluster-read-max", optValue(settings.readMax,"N"), "Experimental: flow-control limit reads per connection. 0=no limit.") ; } }; typedef boost::shared_ptr CodecFactoryPtr; struct ClusterPlugin : public Plugin { ClusterSettings settings; ClusterOptions options; Cluster* cluster; boost::scoped_ptr factory; ClusterPlugin() : options(settings), cluster(0) {} // Cluster needs to be initialized after the store int initOrder() const { return Plugin::DEFAULT_INIT_ORDER+500; } Options* getOptions() { return &options; } void earlyInitialize(Plugin::Target& target) { if (settings.name.empty()) return; // Only if --cluster-name option was specified. Broker* broker = dynamic_cast(&target); if (!broker) return; cluster = new Cluster(settings, *broker); CodecFactoryPtr simpleFactory(new broker::ConnectionFactory(*broker)); CodecFactoryPtr clusterFactory(new ConnectionCodec::Factory(simpleFactory, *cluster)); CodecFactoryPtr secureFactory(new SecureConnectionFactory(clusterFactory)); broker->setConnectionFactory(secureFactory); } void disallowManagementMethods(ManagementAgent* agent) { if (!agent) return; agent->disallowV1Methods(); } void initialize(Plugin::Target& target) { Broker* broker = dynamic_cast(&target); if (broker && cluster) { disallowManagementMethods(broker->getManagementAgent()); cluster->initialize(); } } }; static ClusterPlugin instance; // Static initialization. }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/Cluster.cpp0000664000076400007640000013657711672645152020522 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /** *

CLUSTER IMPLEMENTATION OVERVIEW

* * The cluster works on the principle that if all members of the * cluster receive identical input, they will all produce identical * results. cluster::Connections intercept data received from clients * and multicast it via CPG. The data is processed (passed to the * broker::Connection) only when it is received from CPG in cluster * order. Each cluster member has Connection objects for directly * connected clients and "shadow" Connection objects for connections * to other members. * * This assumes that all broker actions occur deterministically in * response to data arriving on client connections. There are two * situations where this assumption fails: * - sending data in response to polling local connections for writabiliy. * - taking actions based on a timer or timestamp comparison. * * IMPORTANT NOTE: any time code is added to the broker that uses timers, * the cluster may need to be updated to take account of this. * * * USE OF TIMESTAMPS IN THE BROKER * * The following are the current areas where broker uses timers or timestamps: * * - Producer flow control: broker::SemanticState uses * connection::getClusterOrderOutput. a FrameHandler that sends * frames to the client via the cluster. Used by broker::SessionState * * - QueueCleaner, Message TTL: uses ExpiryPolicy, which is * implemented by cluster::ExpiryPolicy. * * - Connection heartbeat: sends connection controls, not part of * session command counting so OK to ignore. * * - LinkRegistry: only cluster elder is ever active for links. * * - management::ManagementBroker: uses MessageHandler supplied by cluster * to send messages to the broker via the cluster. * * cluster::ExpiryPolicy uses cluster time. * * ClusterTimer implements periodic timed events in the cluster context. * Used for: * - periodic management events. * - DTX transaction timeouts. * *

CLUSTER PROTOCOL OVERVIEW

* * Messages sent to/from CPG are called Events. * * An Event carries a ConnectionId, which includes a MemberId and a * connection number. * * Events are either * - Connection events: non-0 connection number and are associated with a connection. * - Cluster Events: 0 connection number, are not associated with a connection. * * Events are further categorized as: * - Control: carries method frame(s) that affect cluster behavior. * - Data: carries raw data received from a client connection. * * The cluster defines extensions to the AMQP command set in ../../../xml/cluster.xml * which defines two classes: * - cluster: cluster control information. * - cluster.connection: control information for a specific connection. * * The following combinations are legal: * - Data frames carrying connection data. * - Cluster control events carrying cluster commands. * - Connection control events carrying cluster.connection commands. * - Connection control events carrying non-cluster frames: frames sent to the client. * e.g. flow-control frames generated on a timer. * *

CLUSTER INITIALIZATION OVERVIEW

* * @see InitialStatusMap * * When a new member joins the CPG group, all members (including the * new one) multicast their "initial status." The new member is in * PRE_INIT mode until it gets a complete set of initial status * messages from all cluster members. In a newly-forming cluster is * then in INIT mode until the configured cluster-size members have * joined. * * The newcomer uses initial status to determine * - The cluster UUID * - Am I speaking the correct version of the cluster protocol? * - Do I need to get an update from an existing active member? * - Can I recover from my own store? * * Pre-initialization happens in the Cluster constructor (plugin * early-init phase) because it needs to set the recovery flag before * the store initializes. This phase lasts until inital-status is * received for all active members. The PollableQueues and Multicaster * are in "bypass" mode during this phase since the poller has not * started so there are no threads to serve pollable queues. * * The remaining initialization happens in Cluster::initialize() or, * if cluster-size=N is specified, in the deliver thread when an * initial-status control is delivered that brings the total to N. */ #include "qpid/Exception.h" #include "qpid/cluster/Cluster.h" #include "qpid/sys/ClusterSafe.h" #include "qpid/cluster/ClusterSettings.h" #include "qpid/cluster/Connection.h" #include "qpid/cluster/UpdateClient.h" #include "qpid/cluster/RetractClient.h" #include "qpid/cluster/FailoverExchange.h" #include "qpid/cluster/UpdateDataExchange.h" #include "qpid/cluster/UpdateExchange.h" #include "qpid/cluster/ClusterTimer.h" #include "qpid/cluster/CredentialsExchange.h" #include "qpid/assert.h" #include "qmf/org/apache/qpid/cluster/ArgsClusterStopClusterNode.h" #include "qmf/org/apache/qpid/cluster/Package.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Connection.h" #include "qpid/broker/NullMessageStore.h" #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/Queue.h" #include "qpid/broker/Message.h" #include "qpid/broker/SessionState.h" #include "qpid/broker/SignalHandler.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AMQP_AllOperations.h" #include "qpid/framing/AllInvoker.h" #include "qpid/framing/ClusterConfigChangeBody.h" #include "qpid/framing/ClusterClockBody.h" #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/ClusterConnectionAbortBody.h" #include "qpid/framing/ClusterRetractOfferBody.h" #include "qpid/framing/ClusterConnectionDeliverDoOutputBody.h" #include "qpid/framing/ClusterReadyBody.h" #include "qpid/framing/ClusterShutdownBody.h" #include "qpid/framing/ClusterUpdateOfferBody.h" #include "qpid/framing/ClusterUpdateRequestBody.h" #include "qpid/framing/ClusterConnectionAnnounceBody.h" #include "qpid/framing/ClusterErrorCheckBody.h" #include "qpid/framing/ClusterTimerWakeupBody.h" #include "qpid/framing/ClusterDeliverToQueueBody.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/log/Helpers.h" #include "qpid/log/Statement.h" #include "qpid/UrlArray.h" #include "qpid/management/ManagementAgent.h" #include "qpid/memory.h" #include "qpid/sys/Thread.h" #include #include #include #include #include #include #include #include namespace qpid { namespace cluster { using namespace qpid; using namespace qpid::framing; using namespace qpid::sys; using namespace qpid::cluster; using namespace framing::cluster; using namespace std; using management::ManagementAgent; using management::ManagementObject; using management::Manageable; using management::Args; namespace _qmf = ::qmf::org::apache::qpid::cluster; namespace arg=client::arg; /** * NOTE: must increment this number whenever any incompatible changes in * cluster protocol/behavior are made. It allows early detection and * sensible reporting of an attempt to mix different versions in a * cluster. * * Currently use SVN revision to avoid clashes with versions from * different branches. */ const uint32_t Cluster::CLUSTER_VERSION = 1207877; struct ClusterDispatcher : public framing::AMQP_AllOperations::ClusterHandler { qpid::cluster::Cluster& cluster; MemberId member; Cluster::Lock& l; ClusterDispatcher(Cluster& c, const MemberId& id, Cluster::Lock& l_) : cluster(c), member(id), l(l_) {} void updateRequest(const std::string& url) { cluster.updateRequest(member, url, l); } void initialStatus(uint32_t version, bool active, const Uuid& clusterId, uint8_t storeState, const Uuid& shutdownId, const std::string& firstConfig, const framing::Array& urls) { cluster.initialStatus( member, version, active, clusterId, framing::cluster::StoreState(storeState), shutdownId, firstConfig, urls, l); } void ready(const std::string& url) { cluster.ready(member, url, l); } void configChange(const std::string& members, const std::string& left, const std::string& joined) { cluster.configChange(member, members, left, joined, l); } void updateOffer(uint64_t updatee) { cluster.updateOffer(member, updatee, l); } void retractOffer(uint64_t updatee) { cluster.retractOffer(member, updatee, l); } void errorCheck(uint8_t type, const framing::SequenceNumber& frameSeq) { cluster.errorCheck(member, type, frameSeq, l); } void timerWakeup(const std::string& name) { cluster.timerWakeup(member, name, l); } void timerDrop(const std::string& name) { cluster.timerDrop(member, name, l); } void shutdown(const Uuid& id) { cluster.shutdown(member, id, l); } void deliverToQueue(const std::string& queue, const std::string& message) { cluster.deliverToQueue(queue, message, l); } void clock(uint64_t time) { cluster.clock(time, l); } bool invoke(AMQBody& body) { return framing::invoke(*this, body).wasHandled(); } }; Cluster::Cluster(const ClusterSettings& set, broker::Broker& b) : settings(set), broker(b), mgmtObject(0), poller(b.getPoller()), cpg(*this), name(settings.name), self(cpg.self()), clusterId(true), mAgent(0), expiryPolicy(new ExpiryPolicy(*this)), mcast(cpg, poller, boost::bind(&Cluster::leave, this)), dispatcher(cpg, poller, boost::bind(&Cluster::leave, this)), deliverEventQueue(boost::bind(&Cluster::deliveredEvent, this, _1), boost::bind(&Cluster::leave, this), "Error decoding events, may indicate a broker version mismatch", poller), deliverFrameQueue(boost::bind(&Cluster::deliveredFrame, this, _1), boost::bind(&Cluster::leave, this), "Error delivering frames", poller), failoverExchange(new FailoverExchange(broker.GetVhostObject(), &broker)), updateDataExchange(new UpdateDataExchange(*this)), credentialsExchange(new CredentialsExchange(*this)), quorum(boost::bind(&Cluster::leave, this)), decoder(boost::bind(&Cluster::deliverFrame, this, _1)), discarding(true), state(PRE_INIT), initMap(self, settings.size), store(broker.getDataDir().getPath()), elder(false), lastAliveCount(0), lastBroker(false), updateRetracted(false), updateClosed(false), error(*this), acl(0) { broker.setInCluster(true); // We give ownership of the timer to the broker and keep a plain pointer. // This is OK as it means the timer has the same lifetime as the broker. timer = new ClusterTimer(*this); broker.setClusterTimer(std::auto_ptr(timer)); // Failover exchange provides membership updates to clients. broker.getExchanges().registerExchange(failoverExchange); // Update exchange is used during updates to replicate messages // without modifying delivery-properties.exchange. broker.getExchanges().registerExchange( boost::shared_ptr(new UpdateExchange(this))); // Update-data exchange is used for passing data that may be too large // for single control frame. broker.getExchanges().registerExchange(updateDataExchange); // CredentialsExchange is used to authenticate new cluster members broker.getExchanges().registerExchange(credentialsExchange); // Load my store status before we go into initialization if (! broker::NullMessageStore::isNullStore(&broker.getStore())) { store.load(); clusterId = store.getClusterId(); QPID_LOG(notice, "Cluster store state: " << store) } cpg.join(name); // pump the CPG dispatch manually till we get past PRE_INIT. while (state == PRE_INIT) cpg.dispatchOne(); } Cluster::~Cluster() { broker.setClusterTimer(std::auto_ptr(0)); // Delete cluster timer if (updateThread) updateThread.join(); // Join the previous updatethread. } void Cluster::initialize() { if (settings.quorum) quorum.start(poller); if (settings.url.empty()) myUrl = Url::getIpAddressesUrl(broker.getPort(broker::Broker::TCP_TRANSPORT)); else myUrl = settings.url; broker.getKnownBrokers = boost::bind(&Cluster::getUrls, this); broker.deferDelivery = boost::bind(&Cluster::deferDeliveryImpl, this, _1, _2); broker.setExpiryPolicy(expiryPolicy); deliverEventQueue.bypassOff(); deliverEventQueue.start(); deliverFrameQueue.bypassOff(); deliverFrameQueue.start(); mcast.start(); /// Create management object mAgent = broker.getManagementAgent(); if (mAgent != 0){ _qmf::Package packageInit(mAgent); mgmtObject = new _qmf::Cluster (mAgent, this, &broker,name,myUrl.str()); mAgent->addObject (mgmtObject); } // Run initMapCompleted immediately to process the initial configuration // that allowed us to transition out of PRE_INIT assert(state == INIT); initMapCompleted(*(Mutex::ScopedLock*)0); // Fake lock, single-threaded context. // Add finalizer last for exception safety. broker.addFinalizer(boost::bind(&Cluster::brokerShutdown, this)); // Start dispatching CPG events. dispatcher.start(); } // Called in connection thread to insert a client connection. void Cluster::addLocalConnection(const boost::intrusive_ptr& c) { assert(c->getId().getMember() == self); localConnections.insert(c); } // Called in connection thread to insert an updated shadow connection. void Cluster::addShadowConnection(const boost::intrusive_ptr& c) { QPID_LOG(debug, *this << " new shadow connection " << c->getId()); // Safe to use connections here because we're pre-catchup, stalled // and discarding, so deliveredFrame is not processing any // connection events. assert(discarding); pair ib = connections.insert(ConnectionMap::value_type(c->getId(), c)); // Like this to avoid tripping up unused variable warning when NDEBUG set if (!ib.second) assert(ib.second); } void Cluster::erase(const ConnectionId& id) { Lock l(lock); erase(id,l); } void Cluster::eraseLocal(const ConnectionId& id) { Lock l(lock); eraseLocal(id,l); } // Called by Connection::deliverClose() in deliverFrameQueue thread. void Cluster::erase(const ConnectionId& id, Lock&) { connections.erase(id); decoder.erase(id); } void Cluster::eraseLocal(const ConnectionId& id, Lock&) { localConnections.getErase(id); } std::vector Cluster::getIds() const { Lock l(lock); return getIds(l); } std::vector Cluster::getIds(Lock&) const { return map.memberIds(); } std::vector Cluster::getUrls() const { Lock l(lock); return getUrls(l); } std::vector Cluster::getUrls(Lock&) const { return map.memberUrls(); } void Cluster::leave() { Lock l(lock); leave(l); } #define LEAVE_TRY(STMT) try { STMT; } \ catch (const std::exception& e) { \ QPID_LOG(warning, *this << " error leaving cluster: " << e.what()); \ } do {} while(0) void Cluster::leave(Lock&) { if (state != LEFT) { state = LEFT; QPID_LOG(notice, *this << " leaving cluster " << name); // Finalize connections now now to avoid problems later in destructor. ClusterSafeScope css; // Don't trigger cluster-safe assertions. LEAVE_TRY(localConnections.clear()); LEAVE_TRY(connections.clear()); LEAVE_TRY(broker::SignalHandler::shutdown()); } } // Deliver CPG message. void Cluster::deliver( cpg_handle_t /*handle*/, const cpg_name* /*group*/, uint32_t nodeid, uint32_t pid, void* msg, int msg_len) { MemberId from(nodeid, pid); framing::Buffer buf(static_cast(msg), msg_len); Event e(Event::decodeCopy(from, buf)); deliverEvent(e); } void Cluster::deliverEvent(const Event& e) { deliverEventQueue.push(e); } void Cluster::deliverFrame(const EventFrame& e) { deliverFrameQueue.push(e); } const ClusterUpdateOfferBody* castUpdateOffer(const framing::AMQBody* body) { return (body && body->getMethod() && body->getMethod()->isA()) ? static_cast(body) : 0; } const ClusterConnectionAnnounceBody* castAnnounce( const framing::AMQBody *body) { return (body && body->getMethod() && body->getMethod()->isA()) ? static_cast(body) : 0; } // Handler for deliverEventQueue. // This thread decodes frames from events. void Cluster::deliveredEvent(const Event& e) { if (e.isCluster()) { EventFrame ef(e, e.getFrame()); // Stop the deliverEventQueue on update offers. // This preserves the connection decoder fragments for an update. // Only do this for the two brokers that are directly involved in this // offer: the one making the offer, or the one receiving it. const ClusterUpdateOfferBody* offer = castUpdateOffer(ef.frame.getBody()); if (offer && ( e.getMemberId() == self || MemberId(offer->getUpdatee()) == self) ) { QPID_LOG(info, *this << " stall for update offer from " << e.getMemberId() << " to " << MemberId(offer->getUpdatee())); deliverEventQueue.stop(); } deliverFrame(ef); } else if(!discarding) { if (e.isControl()) deliverFrame(EventFrame(e, e.getFrame())); else { try { decoder.decode(e, e.getData()); } catch (const Exception& ex) { // Close a connection that is sending us invalid data. QPID_LOG(error, *this << " aborting connection " << e.getConnectionId() << ": " << ex.what()); framing::AMQFrame abort((ClusterConnectionAbortBody())); deliverFrame(EventFrame(EventHeader(CONTROL, e.getConnectionId()), abort)); } } } } void Cluster::flagError( Connection& connection, ErrorCheck::ErrorType type, const std::string& msg) { Mutex::ScopedLock l(lock); if (connection.isCatchUp()) { QPID_LOG(critical, *this << " error on update connection " << connection << ": " << msg); leave(l); } error.error(connection, type, map.getFrameSeq(), map.getMembers(), msg); } // Handler for deliverFrameQueue. // This thread executes the main logic. void Cluster::deliveredFrame(const EventFrame& efConst) { Mutex::ScopedLock l(lock); sys::ClusterSafeScope css; // Don't trigger cluster-safe asserts. if (state == LEFT) return; EventFrame e(efConst); const ClusterUpdateOfferBody* offer = castUpdateOffer(e.frame.getBody()); if (offer && error.isUnresolved()) { // We can't honour an update offer that is delivered while an // error is in progress so replace it with a retractOffer and re-start // the event queue. e.frame = AMQFrame( ClusterRetractOfferBody(ProtocolVersion(), offer->getUpdatee())); deliverEventQueue.start(); } // Process each frame through the error checker. if (error.isUnresolved()) { error.delivered(e); while (error.canProcess()) // There is a frame ready to process. processFrame(error.getNext(), l); } else processFrame(e, l); } void Cluster::processFrame(const EventFrame& e, Lock& l) { if (e.isCluster()) { QPID_LOG_IF(trace, loggable(e.frame), *this << " DLVR: " << e); ClusterDispatcher dispatch(*this, e.connectionId.getMember(), l); if (!framing::invoke(dispatch, *e.frame.getBody()).wasHandled()) throw Exception(QPID_MSG("Invalid cluster control")); } else if (state >= CATCHUP) { map.incrementFrameSeq(); ConnectionPtr connection = getConnection(e, l); if (connection) { QPID_LOG_IF(trace, loggable(e.frame), *this << " DLVR " << map.getFrameSeq() << ": " << e); connection->deliveredFrame(e); } else throw Exception(QPID_MSG("Unknown connection: " << e)); } else // Drop connection frames while state < CATCHUP QPID_LOG_IF(trace, loggable(e.frame), *this << " DROP (joining): " << e); } // Called in deliverFrameQueue thread ConnectionPtr Cluster::getConnection(const EventFrame& e, Lock&) { ConnectionId id = e.connectionId; ConnectionMap::iterator i = connections.find(id); if (i != connections.end()) return i->second; ConnectionPtr cp; // If the frame is an announcement for a new connection, add it. const ClusterConnectionAnnounceBody *announce = castAnnounce(e.frame.getBody()); if (e.frame.getBody() && e.frame.getMethod() && announce) { if (id.getMember() == self) { // Announces one of my own cp = localConnections.getErase(id); assert(cp); } else { // New remote connection, create a shadow. qpid::sys::SecuritySettings secSettings; if (announce) { secSettings.ssf = announce->getSsf(); secSettings.authid = announce->getAuthid(); secSettings.nodict = announce->getNodict(); } cp = new Connection(*this, shadowOut, announce->getManagementId(), id, secSettings); } connections.insert(ConnectionMap::value_type(id, cp)); } return cp; } Cluster::ConnectionVector Cluster::getConnections(Lock&) { ConnectionVector result(connections.size()); std::transform(connections.begin(), connections.end(), result.begin(), boost::bind(&ConnectionMap::value_type::second, _1)); return result; } // CPG config-change callback. void Cluster::configChange ( cpg_handle_t /*handle*/, const cpg_name */*group*/, const cpg_address *members, int nMembers, const cpg_address *left, int nLeft, const cpg_address *joined, int nJoined) { Mutex::ScopedLock l(lock); string membersStr, leftStr, joinedStr; // Encode members and enqueue as an event so the config change can // be executed in the correct thread. for (const cpg_address* p = members; p < members+nMembers; ++p) membersStr.append(MemberId(*p).str()); for (const cpg_address* p = left; p < left+nLeft; ++p) leftStr.append(MemberId(*p).str()); for (const cpg_address* p = joined; p < joined+nJoined; ++p) joinedStr.append(MemberId(*p).str()); deliverEvent(Event::control(ClusterConfigChangeBody( ProtocolVersion(), membersStr, leftStr, joinedStr), self)); } void Cluster::setReady(Lock&) { state = READY; mcast.setReady(); broker.getQueueEvents().enable(); enableClusterSafe(); // Enable cluster-safe assertions. } // Set the management status from the Cluster::state. // // NOTE: Management updates are sent based on property changes. In // order to keep consistency across the cluster, we touch the local // management status property even if it is locally unchanged for any // event that could have cause a cluster property change on any cluster member. void Cluster::setMgmtStatus(Lock&) { if (mgmtObject) mgmtObject->set_status(state >= CATCHUP ? "ACTIVE" : "JOINING"); } void Cluster::initMapCompleted(Lock& l) { // Called on completion of the initial status map. QPID_LOG(debug, *this << " initial status map complete. "); setMgmtStatus(l); if (state == PRE_INIT) { // PRE_INIT means we're still in the earlyInitialize phase, in the constructor. // We decide here whether we want to recover from our store. // We won't recover if we are joining an active cluster or our store is dirty. if (store.hasStore() && store.getState() != STORE_STATE_EMPTY_STORE && (initMap.isActive() || store.getState() == STORE_STATE_DIRTY_STORE)) broker.setRecovery(false); // Ditch my current store. state = INIT; } else if (state == INIT) { // INIT means we are past Cluster::initialize(). // If we're forming an initial cluster (no active members) // then we wait to reach the configured cluster-size if (!initMap.isActive() && initMap.getActualSize() < initMap.getRequiredSize()) { QPID_LOG(info, *this << initMap.getActualSize() << " members, waiting for at least " << initMap.getRequiredSize()); return; } initMap.checkConsistent(); elders = initMap.getElders(); QPID_LOG(debug, *this << " elders: " << elders); if (elders.empty()) becomeElder(l); else { broker.getLinks().setPassive(true); broker.getQueueEvents().disable(); QPID_LOG(info, *this << " not active for links."); } setClusterId(initMap.getClusterId(), l); if (initMap.isUpdateNeeded()) { // Joining established cluster. authenticate(); broker.setRecovery(false); // Ditch my current store. broker.setClusterUpdatee(true); if (mAgent) mAgent->suppress(true); // Suppress mgmt output during update. state = JOINER; mcast.mcastControl(ClusterUpdateRequestBody(ProtocolVersion(), myUrl.str()), self); QPID_LOG(notice, *this << " joining cluster " << name); } else { // I can go ready. discarding = false; setReady(l); // Must be called *before* memberUpdate so first update will be generated. failoverExchange->setReady(); memberUpdate(l); updateMgmtMembership(l); mcast.mcastControl(ClusterReadyBody(ProtocolVersion(), myUrl.str()), self); QPID_LOG(notice, *this << " joined cluster " << name); } } } void Cluster::configChange(const MemberId&, const std::string& membersStr, const std::string& leftStr, const std::string& joinedStr, Lock& l) { if (state == LEFT) return; MemberSet members = decodeMemberSet(membersStr); MemberSet left = decodeMemberSet(leftStr); MemberSet joined = decodeMemberSet(joinedStr); QPID_LOG(notice, *this << " configuration change: " << members); QPID_LOG_IF(notice, !left.empty(), *this << " Members left: " << left); QPID_LOG_IF(notice, !joined.empty(), *this << " Members joined: " << joined); // If we are still joining, make sure there is someone to give us an update. elders = intersection(elders, members); if (elders.empty() && INIT < state && state < CATCHUP) { QPID_LOG(critical, "Cannot update, all potential updaters left the cluster."); leave(l); return; } bool memberChange = map.configChange(members); // Update initital status for members joining or leaving. initMap.configChange(members); if (initMap.isResendNeeded()) { mcast.mcastControl( ClusterInitialStatusBody( ProtocolVersion(), CLUSTER_VERSION, state > INIT, clusterId, store.getState(), store.getShutdownId(), initMap.getFirstConfigStr(), vectorToUrlArray(getUrls(l)) ), self); } if (initMap.transitionToComplete()) initMapCompleted(l); if (state >= CATCHUP && memberChange) { memberUpdate(l); if (elders.empty()) becomeElder(l); } updateMgmtMembership(l); // Update on every config change for consistency } struct ClusterClockTask : public sys::TimerTask { Cluster& cluster; sys::Timer& timer; ClusterClockTask(Cluster& cluster, sys::Timer& timer, uint16_t clockInterval) : TimerTask(Duration(clockInterval * TIME_MSEC),"ClusterClock"), cluster(cluster), timer(timer) {} void fire() { cluster.sendClockUpdate(); setupNextFire(); timer.add(this); } }; void Cluster::becomeElder(Lock&) { if (elder) return; // We were already the elder. // We are the oldest, reactive links if necessary QPID_LOG(info, *this << " became the elder, active for links."); elder = true; broker.getLinks().setPassive(false); timer->becomeElder(); clockTimer.add(new ClusterClockTask(*this, clockTimer, settings.clockInterval)); } void Cluster::makeOffer(const MemberId& id, Lock& ) { if (state == READY && map.isJoiner(id)) { state = OFFER; QPID_LOG(info, *this << " send update-offer to " << id); mcast.mcastControl(ClusterUpdateOfferBody(ProtocolVersion(), id), self); } } namespace { struct AppendQueue { ostream* os; AppendQueue(ostream& o) : os(&o) {} void operator()(const boost::shared_ptr& q) { (*os) << " " << q->getName() << "=" << q->getMessageCount(); } }; } // namespace // Log a snapshot of broker state, used for debugging inconsistency problems. // May only be called in deliver thread. std::string Cluster::debugSnapshot() { assertClusterSafe(); std::ostringstream msg; msg << "Member joined, frameSeq=" << map.getFrameSeq() << ", queue snapshot:"; AppendQueue append(msg); broker.getQueues().eachQueue(append); return msg.str(); } // Called from Broker::~Broker when broker is shut down. At this // point we know the poller has stopped so no poller callbacks will be // invoked. We must ensure that CPG has also shut down so no CPG // callbacks will be invoked. // void Cluster::brokerShutdown() { sys::ClusterSafeScope css; // Don't trigger cluster-safe asserts. try { cpg.shutdown(); } catch (const std::exception& e) { QPID_LOG(error, *this << " shutting down CPG: " << e.what()); } delete this; } void Cluster::updateRequest(const MemberId& id, const std::string& url, Lock& l) { map.updateRequest(id, url); makeOffer(id, l); } void Cluster::initialStatus(const MemberId& member, uint32_t version, bool active, const framing::Uuid& id, framing::cluster::StoreState store, const framing::Uuid& shutdownId, const std::string& firstConfig, const framing::Array& urls, Lock& l) { if (version != CLUSTER_VERSION) { QPID_LOG(critical, *this << " incompatible cluster versions " << version << " != " << CLUSTER_VERSION); leave(l); return; } QPID_LOG_IF(debug, state == PRE_INIT, *this << " received initial status from " << member); initMap.received( member, ClusterInitialStatusBody(ProtocolVersion(), version, active, id, store, shutdownId, firstConfig, urls) ); if (initMap.transitionToComplete()) initMapCompleted(l); } void Cluster::ready(const MemberId& id, const std::string& url, Lock& l) { try { if (map.ready(id, Url(url))) memberUpdate(l); if (state == CATCHUP && id == self) { setReady(l); QPID_LOG(notice, *this << " caught up."); } } catch (const Url::Invalid& e) { QPID_LOG(error, "Invalid URL in cluster ready command: " << url); } // Update management on every ready event to be consistent across cluster. setMgmtStatus(l); updateMgmtMembership(l); } void Cluster::updateOffer(const MemberId& updater, uint64_t updateeInt, Lock& l) { // NOTE: deliverEventQueue has been stopped at the update offer by // deliveredEvent in case an update is required. if (state == LEFT) return; MemberId updatee(updateeInt); boost::optional url = map.updateOffer(updater, updatee); if (updater == self) { assert(state == OFFER); if (url) // My offer was first. updateStart(updatee, *url, l); else { // Another offer was first. QPID_LOG(info, *this << " cancelled offer to " << updatee << " unstall"); setReady(l); makeOffer(map.firstJoiner(), l); // Maybe make another offer. deliverEventQueue.start(); // Go back to normal processing } } else if (updatee == self && url) { assert(state == JOINER); state = UPDATEE; acl = broker.getAcl(); broker.setAcl(0); // Disable ACL during update QPID_LOG(notice, *this << " receiving update from " << updater); checkUpdateIn(l); } else { QPID_LOG(info, *this << " unstall, ignore update " << updater << " to " << updatee); deliverEventQueue.start(); // Not involved in update. } if (updatee != self && url) { QPID_LOG(debug, debugSnapshot()); if (mAgent) mAgent->clusterUpdate(); // Updatee will call clusterUpdate() via checkUpdateIn() when update completes } } static client::ConnectionSettings connectionSettings(const ClusterSettings& settings) { client::ConnectionSettings cs; cs.username = settings.username; cs.password = settings.password; cs.mechanism = settings.mechanism; return cs; } void Cluster::retractOffer(const MemberId& updater, uint64_t updateeInt, Lock& l) { // An offer was received while handling an error, and converted to a retract. // Behavior is very similar to updateOffer. if (state == LEFT) return; MemberId updatee(updateeInt); boost::optional url = map.updateOffer(updater, updatee); if (updater == self) { assert(state == OFFER); if (url) { // My offer was first. if (updateThread) updateThread.join(); // Join the previous updateThread to avoid leaks. updateThread = Thread(new RetractClient(*url, connectionSettings(settings))); } setReady(l); makeOffer(map.firstJoiner(), l); // Maybe make another offer. // Don't unstall the event queue, that was already done in deliveredFrame } QPID_LOG(debug,*this << " retracted offer " << updater << " to " << updatee); } void Cluster::updateStart(const MemberId& updatee, const Url& url, Lock& l) { // Check for credentials if authentication is enabled. if (broker.getOptions().auth && !credentialsExchange->check(updatee)) { QPID_LOG(error, "Un-authenticated attempt to join the cluster"); return; } // NOTE: deliverEventQueue is already stopped at the stall point by deliveredEvent. if (state == LEFT) return; assert(state == OFFER); state = UPDATER; QPID_LOG(notice, *this << " sending update to " << updatee << " at " << url); if (updateThread) updateThread.join(); // Join the previous updateThread to avoid leaks. updateThread = Thread( new UpdateClient(self, updatee, url, broker, map, *expiryPolicy, getConnections(l), decoder, boost::bind(&Cluster::updateOutDone, this), boost::bind(&Cluster::updateOutError, this, _1), connectionSettings(settings))); } // Called in network thread void Cluster::updateInClosed() { Lock l(lock); assert(!updateClosed); updateClosed = true; checkUpdateIn(l); } // Called in update thread. void Cluster::updateInDone(const ClusterMap& m) { Lock l(lock); updatedMap = m; checkUpdateIn(l); } void Cluster::updateInRetracted() { Lock l(lock); updateRetracted = true; map.clearStatus(); checkUpdateIn(l); } bool Cluster::isExpectingUpdate() { Lock l(lock); return state <= UPDATEE; } // Called in update thread or deliver thread. void Cluster::checkUpdateIn(Lock& l) { if (state != UPDATEE) return; // Wait till we reach the stall point. if (!updateClosed) return; // Wait till update connection closes. if (updatedMap) { // We're up to date map = *updatedMap; mcast.mcastControl(ClusterReadyBody(ProtocolVersion(), myUrl.str()), self); state = CATCHUP; memberUpdate(l); // Must be called *after* memberUpdate() to avoid sending an extra update. failoverExchange->setReady(); // NB: don't updateMgmtMembership() here as we are not in the deliver // thread. It will be updated on delivery of the "ready" we just mcast. broker.setClusterUpdatee(false); broker.setAcl(acl); // Restore ACL discarding = false; // OK to set, we're stalled for update. QPID_LOG(notice, *this << " update complete, starting catch-up."); QPID_LOG(debug, debugSnapshot()); // OK to call because we're stalled. if (mAgent) { // Update management agent now, after all update activity is complete. updateDataExchange->updateManagementAgent(mAgent); mAgent->suppress(false); // Enable management output. mAgent->clusterUpdate(); } // Restore alternate exchange settings on exchanges. broker.getExchanges().eachExchange( boost::bind(&broker::Exchange::recoveryComplete, _1, boost::ref(broker.getExchanges()))); enableClusterSafe(); // Enable cluster-safe assertions deliverEventQueue.start(); } else if (updateRetracted) { // Update was retracted, request another update updateRetracted = false; updateClosed = false; state = JOINER; QPID_LOG(notice, *this << " update retracted, sending new update request."); mcast.mcastControl(ClusterUpdateRequestBody(ProtocolVersion(), myUrl.str()), self); deliverEventQueue.start(); } } void Cluster::updateOutDone() { Monitor::ScopedLock l(lock); updateOutDone(l); } void Cluster::updateOutDone(Lock& l) { QPID_LOG(notice, *this << " update sent"); assert(state == UPDATER); state = READY; deliverEventQueue.start(); // Start processing events again. makeOffer(map.firstJoiner(), l); // Try another offer } void Cluster::updateOutError(const std::exception& e) { Monitor::ScopedLock l(lock); QPID_LOG(error, *this << " error sending update: " << e.what()); updateOutDone(l); } void Cluster ::shutdown(const MemberId& , const Uuid& id, Lock& l) { QPID_LOG(notice, *this << " cluster shut down by administrator."); if (store.hasStore()) store.clean(id); leave(l); } ManagementObject* Cluster::GetManagementObject() const { return mgmtObject; } Manageable::status_t Cluster::ManagementMethod (uint32_t methodId, Args& args, string&) { Lock l(lock); QPID_LOG(debug, *this << " managementMethod [id=" << methodId << "]"); switch (methodId) { case _qmf::Cluster::METHOD_STOPCLUSTERNODE : { _qmf::ArgsClusterStopClusterNode& iargs = (_qmf::ArgsClusterStopClusterNode&) args; stringstream stream; stream << self; if (iargs.i_brokerId == stream.str()) stopClusterNode(l); } break; case _qmf::Cluster::METHOD_STOPFULLCLUSTER : stopFullCluster(l); break; default: return Manageable::STATUS_UNKNOWN_METHOD; } return Manageable::STATUS_OK; } void Cluster::stopClusterNode(Lock& l) { QPID_LOG(notice, *this << " cluster member stopped by administrator."); leave(l); } void Cluster::stopFullCluster(Lock& ) { QPID_LOG(notice, *this << " shutting down cluster " << name); mcast.mcastControl(ClusterShutdownBody(ProtocolVersion(), Uuid(true)), self); } void Cluster::memberUpdate(Lock& l) { // Ignore config changes while we are joining. if (state < CATCHUP) return; QPID_LOG(info, *this << " member update: " << map); size_t aliveCount = map.aliveCount(); assert(map.isAlive(self)); failoverExchange->updateUrls(getUrls(l)); // Mark store clean if I am the only broker, dirty otherwise. if (store.hasStore()) { if (aliveCount == 1) { if (store.getState() != STORE_STATE_CLEAN_STORE) { QPID_LOG(notice, *this << "Sole member of cluster, marking store clean."); store.clean(Uuid(true)); } } else { if (store.getState() != STORE_STATE_DIRTY_STORE) { QPID_LOG(notice, "Running in a cluster, marking store dirty."); store.dirty(); } } } // If I am the last member standing, set queue policies. if (aliveCount == 1 && lastAliveCount > 1 && state >= CATCHUP) { QPID_LOG(notice, *this << " last broker standing, update queue policies"); lastBroker = true; broker.getQueues().updateQueueClusterState(true); } else if (aliveCount > 1 && lastBroker) { QPID_LOG(notice, *this << " last broker standing joined by " << aliveCount-1 << " replicas, updating queue policies."); lastBroker = false; broker.getQueues().updateQueueClusterState(false); } lastAliveCount = aliveCount; // Close connections belonging to members that have left the cluster. ConnectionMap::iterator i = connections.begin(); while (i != connections.end()) { ConnectionMap::iterator j = i++; MemberId m = j->second->getId().getMember(); if (m != self && !map.isMember(m)) { j->second->close(); erase(j->second->getId(), l); } } } // See comment on Cluster::setMgmtStatus void Cluster::updateMgmtMembership(Lock& l) { if (!mgmtObject) return; std::vector urls = getUrls(l); mgmtObject->set_clusterSize(urls.size()); string urlstr; for(std::vector::iterator i = urls.begin(); i != urls.end(); i++ ) { if (i != urls.begin()) urlstr += ";"; urlstr += i->str(); } std::vector ids = getIds(l); string idstr; for(std::vector::iterator i = ids.begin(); i != ids.end(); i++ ) { if (i != ids.begin()) idstr += ";"; idstr += *i; } mgmtObject->set_members(urlstr); mgmtObject->set_memberIDs(idstr); } namespace { template struct AutoClose { T closeme; AutoClose(T t) : closeme(t) {} ~AutoClose() { closeme.close(); } }; } // Updatee connects to established member and stores credentials // in the qpid.cluster-credentials exchange to prove it // is safe for updater to connect and give an update. void Cluster::authenticate() { if (!broker.getOptions().auth) return; std::vector urls = initMap.getUrls(); for (std::vector::iterator i = urls.begin(); i != urls.end(); ++i) { if (!i->empty()) { client::Connection c; c.open(*i, connectionSettings(settings)); AutoClose closeConnection(c); client::Session s = c.newSession(CredentialsExchange::NAME); AutoClose closeSession(s); client::Message credentials; credentials.getHeaders().setUInt64(CredentialsExchange::NAME, getId()); s.messageTransfer(arg::content=credentials, arg::destination=CredentialsExchange::NAME); s.sync(); } } } std::ostream& operator<<(std::ostream& o, const Cluster& cluster) { static const char* STATE[] = { "PRE_INIT", "INIT", "JOINER", "UPDATEE", "CATCHUP", "READY", "OFFER", "UPDATER", "LEFT" }; assert(sizeof(STATE)/sizeof(*STATE) == Cluster::LEFT+1); o << "cluster(" << cluster.self << " " << STATE[cluster.state]; if (cluster.error.isUnresolved()) o << "/error"; return o << ")"; } MemberId Cluster::getId() const { return self; // Immutable, no need to lock. } broker::Broker& Cluster::getBroker() const { return broker; // Immutable, no need to lock. } void Cluster::setClusterId(const Uuid& uuid, Lock&) { clusterId = uuid; if (store.hasStore()) store.setClusterId(uuid); if (mgmtObject) { stringstream stream; stream << self; mgmtObject->set_clusterID(clusterId.str()); mgmtObject->set_memberID(stream.str()); } QPID_LOG(notice, *this << " cluster-uuid = " << clusterId); } void Cluster::errorCheck(const MemberId& from, uint8_t type, framing::SequenceNumber frameSeq, Lock&) { // If we see an errorCheck here (rather than in the ErrorCheck // class) then we have processed succesfully past the point of the // error. if (state >= CATCHUP) // Don't respond pre catchup, we don't know what happened error.respondNone(from, type, frameSeq); } void Cluster::timerWakeup(const MemberId& , const std::string& name, Lock&) { if (state >= CATCHUP) // Pre catchup our timer isn't set up. timer->deliverWakeup(name); } void Cluster::timerDrop(const MemberId& , const std::string& name, Lock&) { QPID_LOG(debug, "Cluster timer drop " << map.getFrameSeq() << ": " << name) if (state >= CATCHUP) // Pre catchup our timer isn't set up. timer->deliverDrop(name); } bool Cluster::isElder() const { return elder; } void Cluster::deliverToQueue(const std::string& queue, const std::string& message, Lock& l) { broker::Queue::shared_ptr q = broker.getQueues().find(queue); if (!q) { QPID_LOG(critical, *this << " cluster delivery to non-existent queue: " << queue); leave(l); } framing::Buffer buf(const_cast(message.data()), message.size()); boost::intrusive_ptr msg(new broker::Message); msg->decodeHeader(buf); msg->decodeContent(buf); q->deliver(msg); } sys::AbsTime Cluster::getClusterTime() { Mutex::ScopedLock l(lock); return clusterTime; } // This method is called during update on the updatee to set the initial cluster time. void Cluster::clock(const uint64_t time) { Mutex::ScopedLock l(lock); clock(time, l); } // called when broadcast message received void Cluster::clock(const uint64_t time, Lock&) { clusterTime = AbsTime(EPOCH, time); AbsTime now = AbsTime::now(); if (!elder) { clusterTimeOffset = Duration(now, clusterTime); } } // called by elder timer to send clock broadcast void Cluster::sendClockUpdate() { Mutex::ScopedLock l(lock); int64_t nanosecondsSinceEpoch = Duration(EPOCH, now()); nanosecondsSinceEpoch += clusterTimeOffset; mcast.mcastControl(ClusterClockBody(ProtocolVersion(), nanosecondsSinceEpoch), self); } bool Cluster::deferDeliveryImpl(const std::string& queue, const boost::intrusive_ptr& msg) { if (isClusterSafe()) return false; std::string message; message.resize(msg->encodedSize()); framing::Buffer buf(const_cast(message.data()), message.size()); msg->encode(buf); mcast.mcastControl(ClusterDeliverToQueueBody(ProtocolVersion(), queue, message), self); return true; } bool Cluster::loggable(const AMQFrame& f) { const AMQMethodBody* method = (f.getMethod()); if (!method) return true; // Not a method bool isClock = method->amqpClassId() == ClusterClockBody::CLASS_ID && method->amqpMethodId() == ClusterClockBody::METHOD_ID; return !isClock; } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/SecureConnectionFactory.cpp0000664000076400007640000000513011631724644023652 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/SecureConnectionFactory.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/cluster/ConnectionCodec.h" #include "qpid/broker/SecureConnection.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace cluster { using framing::ProtocolVersion; using qpid::sys::SecuritySettings; using qpid::broker::SecureConnection; typedef std::auto_ptr SecureConnectionPtr; typedef std::auto_ptr CodecPtr; SecureConnectionFactory::SecureConnectionFactory(CodecFactoryPtr f) : codecFactory(f) { } sys::ConnectionCodec* SecureConnectionFactory::create(ProtocolVersion v, sys::OutputControl& out, const std::string& id, const SecuritySettings& external) { CodecPtr codec(codecFactory->create(v, out, id, external)); ConnectionCodec* clusterCodec = dynamic_cast(codec.get()); if (clusterCodec) { SecureConnectionPtr sc(new SecureConnection()); clusterCodec->setSecureConnection(sc.get()); sc->setCodec(codec); return sc.release(); } return 0; } sys::ConnectionCodec* SecureConnectionFactory::create(sys::OutputControl& out, const std::string& id, const SecuritySettings& external) { // used to create connections from one broker to another CodecPtr codec(codecFactory->create(out, id, external)); ConnectionCodec* clusterCodec = dynamic_cast(codec.get()); if (clusterCodec) { SecureConnectionPtr sc(new SecureConnection()); clusterCodec->setSecureConnection(sc.get()); sc->setCodec(codec); return sc.release(); } return 0; } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/EventFrame.h0000664000076400007640000000341611527755664020574 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_EVENTFRAME_H #define QPID_CLUSTER_EVENTFRAME_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/types.h" #include "qpid/cluster/Event.h" #include "qpid/framing/AMQFrame.h" #include #include namespace qpid { namespace cluster { /** * A frame decoded from an Event. */ struct EventFrame { public: EventFrame(); EventFrame(const EventHeader& e, const framing::AMQFrame& f, int rc=0); bool isCluster() const { return connectionId.getNumber() == 0; } bool isConnection() const { return connectionId.getNumber() != 0; } bool isLastInEvent() const { return readCredit; } MemberId getMemberId() const { return connectionId.getMember(); } ConnectionId connectionId; framing::AMQFrame frame; int readCredit; ///< last frame in an event, give credit when processed. EventType type; }; std::ostream& operator<<(std::ostream& o, const EventFrame& e); }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_EVENTFRAME_H*/ qpidc-0.16/src/qpid/cluster/Dispatchable.h0000664000076400007640000000263110640072753021103 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_DISPATCHABLE_H #define QPID_CLUSTER_DISPATCHABLE_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ namespace qpid { namespace cluster { /** * Interface for classes that have some "events" that need dispatching * in a thread. */ class Dispatchable { public: virtual ~Dispatchable() {} /** Dispatch one event in current thread. */ virtual void dispatchOne() = 0; /** Dispatch all available events, don't block. */ virtual void dispatchAll() = 0; /** Blocking loop to dispatch cluster events */ virtual void dispatchBlocking() = 0; /** Wait for at least one event, then dispatch all available events. * Don't block. Useful for tests. */ virtual void dispatchSome() { dispatchOne(); dispatchAll(); } }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_DISPATCHABLE_H*/ qpidc-0.16/src/qpid/cluster/Decoder.h0000664000076400007640000000322211562043261020056 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_DECODER_H #define QPID_CLUSTER_DECODER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/types.h" #include "qpid/framing/FrameDecoder.h" #include "qpid/sys/Mutex.h" #include #include namespace qpid { namespace cluster { struct EventFrame; class EventHeader; /** * A map of decoders for connections. */ class Decoder { public: typedef boost::function FrameHandler; Decoder(FrameHandler fh) : callback(fh) {} void decode(const EventHeader& eh, const char* data); void erase(const ConnectionId&); framing::FrameDecoder& get(const ConnectionId& c); private: typedef std::map Map; sys::Mutex lock; Map map; void process(const EventFrame&); FrameHandler callback; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_DECODER_H*/ qpidc-0.16/src/qpid/cluster/Cpg.h0000664000076400007640000001502611310462474017231 0ustar00jrossjross00000000000000#ifndef CPG_H #define CPG_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/Exception.h" #include "qpid/cluster/types.h" #include "qpid/sys/IOHandle.h" #include "qpid/sys/Mutex.h" #include #include #include namespace qpid { namespace cluster { /** * Lightweight C++ interface to cpg.h operations. * * Manages a single CPG handle, initialized in ctor, finialzed in destructor. * On error all functions throw Cpg::Exception. * */ class Cpg : public sys::IOHandle { public: struct Exception : public ::qpid::Exception { Exception(const std::string& msg) : ::qpid::Exception(msg) {} }; struct Name : public cpg_name { Name() { length = 0; } Name(const char* s) { copy(s, strlen(s)); } Name(const char* s, size_t n) { copy(s,n); } Name(const std::string& s) { copy(s.data(), s.size()); } void copy(const char* s, size_t n) { assert(n < CPG_MAX_NAME_LENGTH); memcpy(value, s, n); length=n; } std::string str() const { return std::string(value, length); } }; static std::string str(const cpg_name& n) { return std::string(n.value, n.length); } struct Handler { virtual ~Handler() {}; virtual void deliver( cpg_handle_t /*handle*/, const struct cpg_name *group, uint32_t /*nodeid*/, uint32_t /*pid*/, void* /*msg*/, int /*msg_len*/) = 0; virtual void configChange( cpg_handle_t /*handle*/, const struct cpg_name */*group*/, const struct cpg_address */*members*/, int /*nMembers*/, const struct cpg_address */*left*/, int /*nLeft*/, const struct cpg_address */*joined*/, int /*nJoined*/ ) = 0; }; /** Open a CPG handle. *@param handler for CPG events. */ Cpg(Handler&); /** Destructor calls shutdown if not already calledx. */ ~Cpg(); /** Disconnect from CPG */ void shutdown(); void dispatchOne(); void dispatchAll(); void dispatchBlocking(); void join(const std::string& group); void leave(); /** Multicast to the group. NB: must not be called concurrently. * *@return true if the message was multi-cast, false if * it was not sent due to flow control. */ bool mcast(const iovec* iov, int iovLen); cpg_handle_t getHandle() const { return handle; } MemberId self() const; int getFd(); private: // Maximum number of retries for cog functions that can tell // us to "try again later". static const unsigned int cpgRetries = 5; // Don't let sleep-time between cpg retries to go above 0.1 second. static const unsigned int maxCpgRetrySleep = 100000; // Base class for the Cpg operations that need retry capability. struct CpgOp { std::string opName; CpgOp ( std::string opName ) : opName(opName) { } virtual cpg_error_t op ( cpg_handle_t handle, struct cpg_name * ) = 0; virtual std::string msg(const Name&) = 0; virtual ~CpgOp ( ) { } }; struct CpgJoinOp : public CpgOp { CpgJoinOp ( ) : CpgOp ( std::string("cpg_join") ) { } cpg_error_t op(cpg_handle_t handle, struct cpg_name * group) { return cpg_join ( handle, group ); } std::string msg(const Name& name) { return cantJoinMsg(name); } }; struct CpgLeaveOp : public CpgOp { CpgLeaveOp ( ) : CpgOp ( std::string("cpg_leave") ) { } cpg_error_t op(cpg_handle_t handle, struct cpg_name * group) { return cpg_leave ( handle, group ); } std::string msg(const Name& name) { return cantLeaveMsg(name); } }; struct CpgFinalizeOp : public CpgOp { CpgFinalizeOp ( ) : CpgOp ( std::string("cpg_finalize") ) { } cpg_error_t op(cpg_handle_t handle, struct cpg_name *) { return cpg_finalize ( handle ); } std::string msg(const Name& name) { return cantFinalizeMsg(name); } }; // This fn standardizes retry policy across all Cpg ops that need it. void callCpg ( CpgOp & ); CpgJoinOp cpgJoinOp; CpgLeaveOp cpgLeaveOp; CpgFinalizeOp cpgFinalizeOp; static std::string errorStr(cpg_error_t err, const std::string& msg); static std::string cantJoinMsg(const Name&); static std::string cantLeaveMsg(const Name&); static std::string cantMcastMsg(const Name&); static std::string cantFinalizeMsg(const Name&); static Cpg* cpgFromHandle(cpg_handle_t); // New versions for corosync 1.0 and higher static void globalDeliver( cpg_handle_t handle, const struct cpg_name *group, uint32_t nodeid, uint32_t pid, void* msg, size_t msg_len); static void globalConfigChange( cpg_handle_t handle, const struct cpg_name *group, const struct cpg_address *members, size_t nMembers, const struct cpg_address *left, size_t nLeft, const struct cpg_address *joined, size_t nJoined ); // Old versions for openais static void globalDeliver( cpg_handle_t handle, struct cpg_name *group, uint32_t nodeid, uint32_t pid, void* msg, int msg_len); static void globalConfigChange( cpg_handle_t handle, struct cpg_name *group, struct cpg_address *members, int nMembers, struct cpg_address *left, int nLeft, struct cpg_address *joined, int nJoined ); cpg_handle_t handle; Handler& handler; bool isShutdown; Name group; sys::Mutex dispatchLock; }; inline bool operator==(const cpg_name& a, const cpg_name& b) { return a.length==b.length && strncmp(a.value, b.value, a.length) == 0; } inline bool operator!=(const cpg_name& a, const cpg_name& b) { return !(a == b); } }} // namespace qpid::cluster #endif /*!CPG_H*/ qpidc-0.16/src/qpid/cluster/Numbering.h0000664000076400007640000000373111471036574020454 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_NUMBERING_H #define QPID_CLUSTER_NUMBERING_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include namespace qpid { namespace cluster { /** * A set of numbered T, with two way mapping number->T T->number * Used to construct numberings of objects by code sending and receiving updates. */ template class Numbering { public: size_t size() const { return byNumber.size(); } size_t add(const T& t) { size_t n = (*this)[t]; // Already in the set? if (n == size()) { byObject[t] = n; byNumber.push_back(t); } return n; } void clear() { byObject.clear(); byNumber.clear(); } /**@return object at index n or T() if n > size() */ T operator[](size_t n) const { return(n < size()) ? byNumber[n] : T(); } /**@return index of t or size() if t is not in the map */ size_t operator[](const T& t) const { typename Map::const_iterator i = byObject.find(t); return (i != byObject.end()) ? i->second : size(); } private: typedef std::map Map; Map byObject; std::vector byNumber; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_NUMBERING_H*/ qpidc-0.16/src/qpid/cluster/PollerDispatch.cpp0000664000076400007640000000413411462064367021775 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/PollerDispatch.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace cluster { PollerDispatch::PollerDispatch(Cpg& c, boost::shared_ptr p, boost::function e) : cpg(c), poller(p), onError(e), dispatchHandle(cpg, boost::bind(&PollerDispatch::dispatch, this, _1), // read 0, // write boost::bind(&PollerDispatch::disconnect, this, _1) // disconnect ), started(false) {} PollerDispatch::~PollerDispatch() { if (started) dispatchHandle.stopWatch(); } void PollerDispatch::start() { dispatchHandle.startWatch(poller); started = true; } // Entry point: called by IO to dispatch CPG events. void PollerDispatch::dispatch(sys::DispatchHandle& h) { try { cpg.dispatchAll(); h.rewatch(); } catch (const std::exception& e) { QPID_LOG(critical, "Error in cluster dispatch: " << e.what()); onError(); } } // Entry point: called if disconnected from CPG. void PollerDispatch::disconnect(sys::DispatchHandle& ) { if (!poller->hasShutdown()) { QPID_LOG(critical, "Disconnected from cluster"); onError(); } } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/ProxyInputHandler.h0000664000076400007640000000340111323664262022154 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_PROXYINPUTHANDLER_H #define QPID_CLUSTER_PROXYINPUTHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ConnectionInputHandler.h" #include namespace qpid { namespace framing { class AMQFrame; } namespace cluster { /** * Proxies ConnectionInputHandler functions and ensures target.closed() * is called, on deletion if not before. */ class ProxyInputHandler : public sys::ConnectionInputHandler { public: ProxyInputHandler(boost::intrusive_ptr t) : target(t) {} ~ProxyInputHandler() { closed(); } void received(framing::AMQFrame& f) { target->received(f); } void closed() { if (target) target->closed(); target = 0; } void idleOut() { target->idleOut(); } void idleIn() { target->idleIn(); } bool doOutput() { return target->doOutput(); } private: boost::intrusive_ptr target; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_PROXYINPUTHANDLER_H*/ qpidc-0.16/src/qpid/cluster/Quorum.h0000664000076400007640000000202211227113407017774 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_QUORUM_H #define QPID_CLUSTER_QUORUM_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "config.h" #if HAVE_LIBCMAN_H #include "qpid/cluster/Quorum_cman.h" #else #include "qpid/cluster/Quorum_null.h" #endif #endif /*!QPID_CLUSTER_QUORUM_H*/ qpidc-0.16/src/qpid/cluster/UpdateExchange.h0000664000076400007640000000261611310530721021375 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_UPDATEEXCHANGE_H #define QPID_CLUSTER_UPDATEEXCHANGE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/UpdateClient.h" #include "qpid/broker/FanOutExchange.h" namespace qpid { namespace cluster { /** * A keyless exchange (like fanout exchange) that does not modify * delivery-properties.exchange but copies it to the MessageTransfer. */ class UpdateExchange : public broker::FanOutExchange { public: UpdateExchange(management::Manageable* parent); void setProperties(const boost::intrusive_ptr&); }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_UPDATEEXCHANGE_H*/ qpidc-0.16/src/qpid/cluster/InitialStatusMap.cpp0000664000076400007640000001755711732672260022325 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "InitialStatusMap.h" #include "StoreStatus.h" #include "qpid/log/Statement.h" #include "qpid/UrlArray.h" #include #include #include namespace qpid { namespace cluster { using namespace std; using namespace framing::cluster; using namespace framing; using boost::optional; InitialStatusMap::InitialStatusMap(const MemberId& self_, size_t size_) : self(self_), completed(), resendNeeded(), size(size_) {} void InitialStatusMap::configChange(const MemberSet& members) { resendNeeded = false; bool wasComplete = isComplete(); if (firstConfig.empty()) firstConfig = members; MemberSet::const_iterator i = members.begin(); Map::iterator j = map.begin(); while (i != members.end() || j != map.end()) { if (i == members.end()) { // j not in members, member left firstConfig.erase(j->first); Map::iterator k = j++; map.erase(k); } else if (j == map.end()) { // i not in map, member joined resendNeeded = true; map[*i] = optional(); ++i; } else if (*i < j->first) { // i not in map, member joined resendNeeded = true; map[*i] = optional(); ++i; } else if (*i > j->first) { // j not in members, member left firstConfig.erase(j->first); Map::iterator k = j++; map.erase(k); } else { i++; j++; } } if (resendNeeded) { // Clear all status for (Map::iterator i = map.begin(); i != map.end(); ++i) i->second = optional(); } completed = isComplete() && !wasComplete; // Set completed on the transition. } void InitialStatusMap::received(const MemberId& m, const Status& s){ bool wasComplete = isComplete(); map[m] = s; completed = isComplete() && !wasComplete; // Set completed on the transition. } bool InitialStatusMap::notInitialized(const Map::value_type& v) { return !v.second; } bool InitialStatusMap::isComplete() const { return !map.empty() && find_if(map.begin(), map.end(), ¬Initialized) == map.end(); } bool InitialStatusMap::transitionToComplete() { return completed; } bool InitialStatusMap::isResendNeeded() { bool ret = resendNeeded; resendNeeded = false; return ret; } bool InitialStatusMap::isActiveEntry(const Map::value_type& v) { return v.second && v.second->getActive(); } bool InitialStatusMap::hasStore(const Map::value_type& v) { return v.second && (v.second->getStoreState() == STORE_STATE_CLEAN_STORE || v.second->getStoreState() == STORE_STATE_DIRTY_STORE); } bool InitialStatusMap::isActive() { assert(isComplete()); return (find_if(map.begin(), map.end(), &isActiveEntry) != map.end()); } bool InitialStatusMap::isUpdateNeeded() { assert(isComplete()); // We need an update if there are any active members. if (isActive()) return true; // Otherwise it depends on store status, get my own status: Map::iterator me = map.find(self); assert(me != map.end()); assert(me->second); switch (me->second->getStoreState()) { case STORE_STATE_NO_STORE: case STORE_STATE_EMPTY_STORE: // If anybody has a store then we need an update. return find_if(map.begin(), map.end(), &hasStore) != map.end(); case STORE_STATE_DIRTY_STORE: return true; case STORE_STATE_CLEAN_STORE: return false; // Use our own store } return false; } MemberSet InitialStatusMap::getElders() const { assert(isComplete()); MemberSet elders; for (MemberSet::const_iterator i = firstConfig.begin(); i != firstConfig.end(); ++i) { // *i is in my first config, so a potential elder. if (*i == self) continue; // Not my own elder Map::const_iterator j = map.find(*i); assert(j != map.end()); assert(j->second); const Status& s = *j->second; // If I'm not in i's first config then i is older than me. // Otherwise we were born in the same configuration so use // member ID to break the tie. MemberSet iFirstConfig = decodeMemberSet(s.getFirstConfig()); if (iFirstConfig.find(self) == iFirstConfig.end() || *i > self) elders.insert(*i); } return elders; } // Get cluster ID from an active member or the youngest newcomer. Uuid InitialStatusMap::getClusterId() { assert(isComplete()); assert(!map.empty()); Map::iterator i = find_if(map.begin(), map.end(), &isActiveEntry); if (i != map.end()) return i->second->getClusterId(); // An active member else return map.begin()->second->getClusterId(); // Youngest newcomer in node-id order } void checkId(Uuid& expect, const Uuid& actual, const string& msg) { if (!expect) expect = actual; assert(expect); if (expect != actual) throw Exception(msg); } void InitialStatusMap::checkConsistent() { assert(isComplete()); int clean = 0; int dirty = 0; int empty = 0; int none = 0; int active = 0; Uuid clusterId; Uuid shutdownId; bool initialCluster = !isActive(); for (Map::iterator i = map.begin(); i != map.end(); ++i) { assert(i->second); if (i->second->getActive()) ++active; switch (i->second->getStoreState()) { case STORE_STATE_NO_STORE: ++none; break; case STORE_STATE_EMPTY_STORE: ++empty; break; case STORE_STATE_DIRTY_STORE: ++dirty; checkId(clusterId, i->second->getClusterId(), "Cluster-ID mismatch. Stores belong to different clusters."); break; case STORE_STATE_CLEAN_STORE: ++clean; checkId(clusterId, i->second->getClusterId(), "Cluster-ID mismatch. Stores belong to different clusters."); // Only need shutdownId to match if we are in an initially forming cluster. if (initialCluster) checkId(shutdownId, i->second->getShutdownId(), "Shutdown-ID mismatch. Stores were not shut down together"); break; } } // Can't mix transient and persistent members. if (none && (clean+dirty+empty)) throw Exception("Mixing transient and persistent brokers in a cluster"); if (map.size() >= size) { // All initial members are present. If there are no active // members and there are dirty stores there must be at least // one clean store. if (!active && dirty && !clean) throw Exception("Cannot recover, no clean store."); } } std::vector InitialStatusMap::getUrls() const { std::vector urls; for (Map::const_iterator i = map.begin(); i != map.end(); ++i) { if (i->second) { std::vector urls = urlArrayToVector(i->second->getUrls()); if (!urls.empty()) return urls; } } return std::vector(); } std::string InitialStatusMap::getFirstConfigStr() const { assert(!firstConfig.empty()); return encodeMemberSet(firstConfig); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/MemberSet.h0000664000076400007640000000243411330124177020377 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_MEMBERSET_H #define QPID_CLUSTER_MEMBERSET_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "types.h" #include #include namespace qpid { namespace cluster { typedef std::set MemberSet; std::string encodeMemberSet(const MemberSet&); MemberSet decodeMemberSet(const std::string&); MemberSet intersection(const MemberSet& a, const MemberSet& b); std::ostream& operator<<(std::ostream& o, const MemberSet& ms); }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_MEMBERSET_H*/ qpidc-0.16/src/qpid/cluster/Cpg.cpp0000664000076400007640000002005311341775433017566 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/cluster/Cpg.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Time.h" #include "qpid/sys/posix/PrivatePosix.h" #include "qpid/log/Statement.h" #include #include #include #include #include // This is a macro instead of a function because we don't want to // evaluate the MSG argument unless there is an error. #define CPG_CHECK(RESULT, MSG) \ if ((RESULT) != CPG_OK) throw Exception(errorStr((RESULT), (MSG))) namespace qpid { namespace cluster { using namespace std; Cpg* Cpg::cpgFromHandle(cpg_handle_t handle) { void* cpg=0; CPG_CHECK(cpg_context_get(handle, &cpg), "Cannot get CPG instance."); if (!cpg) throw Exception("Cannot get CPG instance."); return reinterpret_cast(cpg); } // Applies the same retry-logic to all cpg calls that need it. void Cpg::callCpg ( CpgOp & c ) { cpg_error_t result; unsigned int snooze = 10; for ( unsigned int nth_try = 0; nth_try < cpgRetries; ++ nth_try ) { if ( CPG_OK == (result = c.op(handle, & group))) { break; } else if ( result == CPG_ERR_TRY_AGAIN ) { QPID_LOG(info, "Retrying " << c.opName ); sys::usleep ( snooze ); snooze *= 10; snooze = (snooze <= maxCpgRetrySleep) ? snooze : maxCpgRetrySleep; } else break; // Don't retry unless CPG tells us to. } if ( result != CPG_OK ) CPG_CHECK(result, c.msg(group)); } // Global callback functions. void Cpg::globalDeliver ( cpg_handle_t handle, const struct cpg_name *group, uint32_t nodeid, uint32_t pid, void* msg, size_t msg_len) { cpgFromHandle(handle)->handler.deliver(handle, group, nodeid, pid, msg, msg_len); } void Cpg::globalConfigChange( cpg_handle_t handle, const struct cpg_name *group, const struct cpg_address *members, size_t nMembers, const struct cpg_address *left, size_t nLeft, const struct cpg_address *joined, size_t nJoined ) { cpgFromHandle(handle)->handler.configChange(handle, group, members, nMembers, left, nLeft, joined, nJoined); } void Cpg::globalDeliver ( cpg_handle_t handle, struct cpg_name *group, uint32_t nodeid, uint32_t pid, void* msg, int msg_len) { cpgFromHandle(handle)->handler.deliver(handle, group, nodeid, pid, msg, msg_len); } void Cpg::globalConfigChange( cpg_handle_t handle, struct cpg_name *group, struct cpg_address *members, int nMembers, struct cpg_address *left, int nLeft, struct cpg_address *joined, int nJoined ) { cpgFromHandle(handle)->handler.configChange(handle, group, members, nMembers, left, nLeft, joined, nJoined); } int Cpg::getFd() { int fd; CPG_CHECK(cpg_fd_get(handle, &fd), "Cannot get CPG file descriptor"); return fd; } Cpg::Cpg(Handler& h) : IOHandle(new sys::IOHandlePrivate), handler(h), isShutdown(false) { cpg_callbacks_t callbacks; ::memset(&callbacks, 0, sizeof(callbacks)); callbacks.cpg_deliver_fn = &globalDeliver; callbacks.cpg_confchg_fn = &globalConfigChange; QPID_LOG(notice, "Initializing CPG"); cpg_error_t err = cpg_initialize(&handle, &callbacks); int retries = 6; // FIXME aconway 2009-08-06: make this configurable. while (err == CPG_ERR_TRY_AGAIN && --retries) { QPID_LOG(notice, "Re-trying CPG initialization."); sys::sleep(5); err = cpg_initialize(&handle, &callbacks); } CPG_CHECK(err, "Failed to initialize CPG."); CPG_CHECK(cpg_context_set(handle, this), "Cannot set CPG context"); // Note: CPG is currently unix-specific. If CPG is ported to // windows then this needs to be refactored into // qpid::sys:: IOHandle::impl->fd = getFd(); } Cpg::~Cpg() { try { shutdown(); } catch (const std::exception& e) { QPID_LOG(error, "Error during CPG shutdown: " << e.what()); } } void Cpg::join(const std::string& name) { group = name; callCpg ( cpgJoinOp ); } void Cpg::leave() { callCpg ( cpgLeaveOp ); } bool Cpg::mcast(const iovec* iov, int iovLen) { // Check for flow control cpg_flow_control_state_t flowState; CPG_CHECK(cpg_flow_control_state_get(handle, &flowState), "Cannot get CPG flow control status."); if (flowState == CPG_FLOW_CONTROL_ENABLED) return false; cpg_error_t result; do { result = cpg_mcast_joined(handle, CPG_TYPE_AGREED, const_cast(iov), iovLen); if (result != CPG_ERR_TRY_AGAIN) CPG_CHECK(result, cantMcastMsg(group)); } while(result == CPG_ERR_TRY_AGAIN); return true; } void Cpg::shutdown() { if (!isShutdown) { QPID_LOG(debug,"Shutting down CPG"); isShutdown=true; callCpg ( cpgFinalizeOp ); } } void Cpg::dispatchOne() { CPG_CHECK(cpg_dispatch(handle,CPG_DISPATCH_ONE), "Error in CPG dispatch"); } void Cpg::dispatchAll() { CPG_CHECK(cpg_dispatch(handle,CPG_DISPATCH_ALL), "Error in CPG dispatch"); } void Cpg::dispatchBlocking() { CPG_CHECK(cpg_dispatch(handle,CPG_DISPATCH_BLOCKING), "Error in CPG dispatch"); } string Cpg::errorStr(cpg_error_t err, const std::string& msg) { std::ostringstream os; os << msg << ": "; switch (err) { case CPG_OK: os << "ok"; break; case CPG_ERR_LIBRARY: os << "library"; break; case CPG_ERR_TIMEOUT: os << "timeout"; break; case CPG_ERR_TRY_AGAIN: os << "try again"; break; case CPG_ERR_INVALID_PARAM: os << "invalid param"; break; case CPG_ERR_NO_MEMORY: os << "no memory"; break; case CPG_ERR_BAD_HANDLE: os << "bad handle"; break; case CPG_ERR_ACCESS: os << "access denied. You may need to set your group ID to 'ais'"; break; case CPG_ERR_NOT_EXIST: os << "not exist"; break; case CPG_ERR_EXIST: os << "exist"; break; case CPG_ERR_NOT_SUPPORTED: os << "not supported"; break; case CPG_ERR_SECURITY: os << "security"; break; case CPG_ERR_TOO_MANY_GROUPS: os << "too many groups"; break; default: os << ": unknown cpg error " << err; }; os << " (" << err << ")"; return os.str(); } std::string Cpg::cantJoinMsg(const Name& group) { return "Cannot join CPG group "+group.str(); } std::string Cpg::cantFinalizeMsg(const Name& group) { return "Cannot finalize CPG group "+group.str(); } std::string Cpg::cantLeaveMsg(const Name& group) { return "Cannot leave CPG group "+group.str(); } std::string Cpg::cantMcastMsg(const Name& group) { return "Cannot mcast to CPG group "+group.str(); } MemberId Cpg::self() const { unsigned int nodeid; CPG_CHECK(cpg_local_get(handle, &nodeid), "Cannot get local CPG identity"); return MemberId(nodeid, getpid()); } namespace { int byte(uint32_t value, int i) { return (value >> (i*8)) & 0xff; } } ostream& operator<<(ostream& out, const MemberId& id) { if (id.first) { out << byte(id.first, 0) << "." << byte(id.first, 1) << "." << byte(id.first, 2) << "." << byte(id.first, 3) << ":"; } return out << id.second; } ostream& operator<<(ostream& o, const ConnectionId& c) { return o << c.first << "-" << c.second; } std::string MemberId::str() const { char s[8]; uint32_t x; x = htonl(first); ::memcpy(s, &x, 4); x = htonl(second); ::memcpy(s+4, &x, 4); return std::string(s,8); } MemberId::MemberId(const std::string& s) { uint32_t x; memcpy(&x, &s[0], 4); first = ntohl(x); memcpy(&x, &s[4], 4); second = ntohl(x); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/McastFrameHandler.h0000664000076400007640000000274311227113407022036 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_MCASTFRAMEHANDLER_H #define QPID_CLUSTER_MCASTFRAMEHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/types.h" #include "qpid/cluster/Multicaster.h" #include "qpid/framing/FrameHandler.h" namespace qpid { namespace cluster { /** * A frame handler that multicasts frames as CONTROL events. */ class McastFrameHandler : public framing::FrameHandler { public: McastFrameHandler(Multicaster& m, const ConnectionId& cid) : mcast(m), connection(cid) {} void handle(framing::AMQFrame& frame) { mcast.mcastControl(frame, connection); } private: Multicaster& mcast; ConnectionId connection; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_MCASTFRAMEHANDLER_H*/ qpidc-0.16/src/qpid/cluster/CredentialsExchange.h0000664000076400007640000000454111725210040022406 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_CREDENTIALSEXCHANGE_H #define QPID_CLUSTER_CREDENTIALSEXCHANGE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "types.h" #include #include #include #include #include namespace qpid { namespace cluster { class Cluster; /** * New members joining the cluster send their identity information to this * exchange to prove they are authenticated as the cluster user. * The exchange rejects messages that are not properly authenticated */ class CredentialsExchange : public broker::Exchange { public: static const std::string NAME; CredentialsExchange(Cluster&); /** Check if this member has credentials. The credentials are deleted. */ bool check(MemberId member); /** Throw an exception if the calling connection is not the cluster user. Store credentials in msg. */ void route(broker::Deliverable& msg); // Exchange overrides std::string getType() const; bool bind(boost::shared_ptr queue, const std::string& routingKey, const framing::FieldTable* args); bool unbind(boost::shared_ptr queue, const std::string& routingKey, const framing::FieldTable* args); bool isBound(boost::shared_ptr queue, const std::string* const routingKey, const framing::FieldTable* const args); private: typedef std::map Map; sys::Mutex lock; Map map; std::string username; sys::Duration timeout; bool authenticate; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_CREDENTIALSEXCHANGE_H*/ qpidc-0.16/src/qpid/cluster/LockedConnectionMap.h0000664000076400007640000000347711227113407022402 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_LOCKEDCONNECTIONMAP_H #define QPID_CLUSTER_LOCKEDCONNECTIONMAP_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/types.h" #include "qpid/sys/Mutex.h" #include "qpid/cluster/Connection.h" namespace qpid { namespace cluster { /** * Thread safe map of connections. */ class LockedConnectionMap { public: void insert(const ConnectionPtr& c) { sys::Mutex::ScopedLock l(lock); assert(map.find(c->getId()) == map.end()); map[c->getId()] = c; } ConnectionPtr getErase(const ConnectionId& c) { sys::Mutex::ScopedLock l(lock); Map::iterator i = map.find(c); if (i != map.end()) { ConnectionPtr cp = i->second; map.erase(i); return cp; } else return 0; } void clear() { sys::Mutex::ScopedLock l(lock); map.clear(); } private: typedef std::map Map; mutable sys::Mutex lock; Map map; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_LOCKEDCONNECTIONMAP_H*/ qpidc-0.16/src/qpid/cluster/ClusterMap.cpp0000664000076400007640000001310511732672260021132 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/ClusterMap.h" #include "qpid/Url.h" #include "qpid/framing/FieldTable.h" #include "qpid/log/Statement.h" #include #include #include #include #include using namespace std; using boost::ref; using boost::optional; namespace qpid { using namespace framing; namespace cluster { namespace { void addFieldTableValue(FieldTable::ValueMap::value_type vt, ClusterMap::Map& map, ClusterMap::Set& set) { MemberId id(vt.first); set.insert(id); string url = vt.second->get(); if (!url.empty()) map.insert(ClusterMap::Map::value_type(id, Url(url))); } void insertFieldTableFromMapValue(FieldTable& ft, const ClusterMap::Map::value_type& vt) { ft.setString(vt.first.str(), vt.second.str()); } } ClusterMap::ClusterMap() : frameSeq(0) {} ClusterMap::ClusterMap(const Map& map) : frameSeq(0) { transform(map.begin(), map.end(), inserter(alive, alive.begin()), bind(&Map::value_type::first, _1)); members = map; } ClusterMap::ClusterMap(const FieldTable& joinersFt, const FieldTable& membersFt, framing::SequenceNumber frameSeq_) : frameSeq(frameSeq_) { for_each(joinersFt.begin(), joinersFt.end(), bind(&addFieldTableValue, _1, ref(joiners), ref(alive))); for_each(membersFt.begin(), membersFt.end(), bind(&addFieldTableValue, _1, ref(members), ref(alive))); } void ClusterMap::toMethodBody(framing::ClusterConnectionMembershipBody& b) const { b.getJoiners().clear(); for_each(joiners.begin(), joiners.end(), bind(&insertFieldTableFromMapValue, ref(b.getJoiners()), _1)); for(Set::const_iterator i = alive.begin(); i != alive.end(); ++i) { if (!isMember(*i) && !isJoiner(*i)) b.getJoiners().setString(i->str(), string()); } b.getMembers().clear(); for_each(members.begin(), members.end(), bind(&insertFieldTableFromMapValue, ref(b.getMembers()), _1)); b.setFrameSeq(frameSeq); } Url ClusterMap::getUrl(const Map& map, const MemberId& id) { Map::const_iterator i = map.find(id); return i == map.end() ? Url() : i->second; } MemberId ClusterMap::firstJoiner() const { return joiners.empty() ? MemberId() : joiners.begin()->first; } vector ClusterMap::memberIds() const { vector ids; for (Map::const_iterator iter = members.begin(); iter != members.end(); iter++) { stringstream stream; stream << iter->first; ids.push_back(stream.str()); } return ids; } vector ClusterMap::memberUrls() const { vector urls(members.size()); transform(members.begin(), members.end(), urls.begin(), bind(&Map::value_type::second, _1)); return urls; } ClusterMap::Set ClusterMap::getAlive() const { return alive; } ClusterMap::Set ClusterMap::getMembers() const { Set s; transform(members.begin(), members.end(), inserter(s, s.begin()), bind(&Map::value_type::first, _1)); return s; } ostream& operator<<(ostream& o, const ClusterMap::Map& m) { ostream_iterator oi(o); transform(m.begin(), m.end(), oi, bind(&ClusterMap::Map::value_type::first, _1)); return o; } ostream& operator<<(ostream& o, const ClusterMap& m) { for (ClusterMap::Set::const_iterator i = m.alive.begin(); i != m.alive.end(); ++i) { o << *i; if (m.isMember(*i)) o << "(member)"; else if (m.isJoiner(*i)) o << "(joiner)"; else o << "(unknown)"; o << " "; } o << "frameSeq=" << m.getFrameSeq(); return o; } bool ClusterMap::updateRequest(const MemberId& id, const string& url) { try { if (isAlive(id)) { joiners[id] = Url(url); return true; } } catch (const Url::Invalid&) { QPID_LOG(error, "Invalid URL in cluster update request: " << url); } return false; } bool ClusterMap::ready(const MemberId& id, const Url& url) { return isAlive(id) && members.insert(Map::value_type(id,url)).second; } bool ClusterMap::configChange(const Set& update) { bool memberChange = false; Set removed; set_difference(alive.begin(), alive.end(), update.begin(), update.end(), inserter(removed, removed.begin())); alive = update; for (Set::const_iterator i = removed.begin(); i != removed.end(); ++i) { memberChange = memberChange || members.erase(*i); joiners.erase(*i); } return memberChange; } optional ClusterMap::updateOffer(const MemberId& from, const MemberId& to) { Map::iterator i = joiners.find(to); if (isAlive(from) && i != joiners.end()) { Url url= i->second; joiners.erase(i); // No longer a potential updatee. return url; } return optional(); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/UpdateClient.cpp0000664000076400007640000007127211705641276021450 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Codecs.h" #include "qpid/cluster/UpdateClient.h" #include "qpid/cluster/Cluster.h" #include "qpid/cluster/ClusterMap.h" #include "qpid/cluster/Connection.h" #include "qpid/cluster/Decoder.h" #include "qpid/cluster/ExpiryPolicy.h" #include "qpid/cluster/UpdateDataExchange.h" #include "qpid/client/SessionBase_0_10Access.h" #include "qpid/client/ConnectionAccess.h" #include "qpid/client/SessionImpl.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/client/Future.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Fairshare.h" #include "qpid/broker/Queue.h" #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/LinkRegistry.h" #include "qpid/broker/Bridge.h" #include "qpid/broker/Link.h" #include "qpid/broker/Message.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/ExchangeRegistry.h" #include "qpid/broker/SessionHandler.h" #include "qpid/broker/SessionState.h" #include "qpid/broker/TxOpVisitor.h" #include "qpid/broker/DtxAck.h" #include "qpid/broker/DtxBuffer.h" #include "qpid/broker/DtxWorkRecord.h" #include "qpid/broker/TxAccept.h" #include "qpid/broker/TxPublish.h" #include "qpid/broker/RecoveredDequeue.h" #include "qpid/broker/RecoveredEnqueue.h" #include "qpid/broker/StatefulQueueObserver.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/ClusterConnectionMembershipBody.h" #include "qpid/framing/ClusterConnectionShadowReadyBody.h" #include "qpid/framing/ClusterConnectionSessionStateBody.h" #include "qpid/framing/ClusterConnectionConsumerStateBody.h" #include "qpid/framing/enum.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/framing/TypeCode.h" #include "qpid/log/Statement.h" #include "qpid/types/Variant.h" #include "qpid/Url.h" #include "qmf/org/apache/qpid/broker/ManagementSetupState.h" #include #include #include #include #include namespace qpid { namespace cluster { using amqp_0_10::ListCodec; using broker::Broker; using broker::Exchange; using broker::Queue; using broker::QueueBinding; using broker::Message; using broker::SemanticState; using types::Variant; using namespace framing; namespace arg=client::arg; using client::SessionBase_0_10Access; // Reserved exchange/queue name for catch-up, avoid clashes with user queues/exchanges. const std::string UpdateClient::UPDATE("x-qpid.cluster-update"); // Name for header used to carry expiration information. const std::string UpdateClient::X_QPID_EXPIRATION = "x-qpid.expiration"; // Headers used to flag headers/properties added by the UpdateClient so they can be // removed on the other side. const std::string UpdateClient::X_QPID_NO_MESSAGE_PROPS = "x-qpid.no-message-props"; const std::string UpdateClient::X_QPID_NO_HEADERS = "x-qpid.no-headers"; std::ostream& operator<<(std::ostream& o, const UpdateClient& c) { return o << "cluster(" << c.updaterId << " UPDATER)"; } struct ClusterConnectionProxy : public AMQP_AllProxy::ClusterConnection, public framing::FrameHandler { boost::shared_ptr connection; ClusterConnectionProxy(client::Connection c) : AMQP_AllProxy::ClusterConnection(*static_cast(this)), connection(client::ConnectionAccess::getImpl(c)) {} ClusterConnectionProxy(client::AsyncSession s) : AMQP_AllProxy::ClusterConnection(SessionBase_0_10Access(s).get()->out) {} void handle(framing::AMQFrame& f) { assert(connection); connection->expand(f.encodedSize(), false); connection->handle(f); } }; // Create a connection with special version that marks it as a catch-up connection. client::Connection UpdateClient::catchUpConnection() { client::Connection c; client::ConnectionAccess::setVersion(c, ProtocolVersion(0x80 , 0x80 + 10)); return c; } // Send a control body directly to the session. void send(client::AsyncSession& s, const AMQBody& body) { client::SessionBase_0_10Access sb(s); sb.get()->send(body); } // TODO aconway 2008-09-24: optimization: update connections/sessions in parallel. UpdateClient::UpdateClient(const MemberId& updater, const MemberId& updatee, const Url& url, broker::Broker& broker, const ClusterMap& m, ExpiryPolicy& expiry_, const Cluster::ConnectionVector& cons, Decoder& decoder_, const boost::function& ok, const boost::function& fail, const client::ConnectionSettings& cs ) : updaterId(updater), updateeId(updatee), updateeUrl(url), updaterBroker(broker), map(m), expiry(expiry_), connections(cons), decoder(decoder_), connection(catchUpConnection()), shadowConnection(catchUpConnection()), done(ok), failed(fail), connectionSettings(cs) {} UpdateClient::~UpdateClient() {} void UpdateClient::run() { try { connection.open(updateeUrl, connectionSettings); session = connection.newSession(UPDATE); session.sync(); update(); done(); } catch (const std::exception& e) { failed(e); } delete this; } void UpdateClient::update() { QPID_LOG(debug, *this << " updating state to " << updateeId << " at " << updateeUrl); Broker& b = updaterBroker; if(b.getExpiryPolicy()) { QPID_LOG(debug, *this << "Updating updatee with cluster time"); qpid::sys::AbsTime clusterTime = b.getExpiryPolicy()->getCurrentTime(); int64_t time = qpid::sys::Duration(qpid::sys::EPOCH, clusterTime); ClusterConnectionProxy(session).clock(time); } updateManagementSetupState(); b.getExchanges().eachExchange(boost::bind(&UpdateClient::updateExchange, this, _1)); b.getQueues().eachQueue(boost::bind(&UpdateClient::updateNonExclusiveQueue, this, _1)); // Update queue is used to transfer acquired messages that are no // longer on their original queue. session.queueDeclare(arg::queue=UPDATE, arg::autoDelete=true); session.sync(); std::for_each(connections.begin(), connections.end(), boost::bind(&UpdateClient::updateConnection, this, _1)); // some Queue Observers need session state & msgs synced first, so sync observers now b.getQueues().eachQueue(boost::bind(&UpdateClient::updateQueueObservers, this, _1)); // Update queue listeners: must come after sessions so consumerNumbering is populated b.getQueues().eachQueue(boost::bind(&UpdateClient::updateQueueListeners, this, _1)); updateLinks(); updateManagementAgent(); updateDtxManager(); session.queueDelete(arg::queue=UPDATE); session.close(); ClusterConnectionMembershipBody membership; map.toMethodBody(membership); AMQFrame frame(membership); client::ConnectionAccess::getImpl(connection)->expand(frame.encodedSize(), false); client::ConnectionAccess::getImpl(connection)->handle(frame); // NOTE: connection will be closed from the other end, don't close // it here as that causes a race. // TODO aconway 2010-03-15: This sleep avoids the race condition // described in // https://bugzilla.redhat.com/show_bug.cgi?id=568831. // It allows the connection to fully close before destroying the // Connection object. Remove when the bug is fixed. // sys::usleep(10*1000); QPID_LOG(debug, *this << " update completed to " << updateeId << " at " << updateeUrl); } namespace { template std::string encode(const T& t) { std::string encoded; encoded.resize(t.encodedSize()); framing::Buffer buf(const_cast(encoded.data()), encoded.size()); t.encode(buf); return encoded; } template std::string encode(const T& t, bool encodeKind) { std::string encoded; encoded.resize(t.encodedSize()); framing::Buffer buf(const_cast(encoded.data()), encoded.size()); t.encode(buf, encodeKind); return encoded; } } // namespace // Propagate the management state void UpdateClient::updateManagementSetupState() { management::ManagementAgent* agent = updaterBroker.getManagementAgent(); if (!agent) return; QPID_LOG(debug, *this << " updating management setup-state."); std::string vendor, product, instance; agent->getName(vendor, product, instance); ClusterConnectionProxy(session).managementSetupState( agent->getNextObjectId(), agent->getBootSequence(), agent->getUuid(), vendor, product, instance); } void UpdateClient::updateManagementAgent() { management::ManagementAgent* agent = updaterBroker.getManagementAgent(); if (!agent) return; string data; QPID_LOG(debug, *this << " updating management schemas. ") agent->exportSchemas(data); session.messageTransfer( arg::content=client::Message(data, UpdateDataExchange::MANAGEMENT_SCHEMAS_KEY), arg::destination=UpdateDataExchange::EXCHANGE_NAME); QPID_LOG(debug, *this << " updating management agents. ") agent->exportAgents(data); session.messageTransfer( arg::content=client::Message(data, UpdateDataExchange::MANAGEMENT_AGENTS_KEY), arg::destination=UpdateDataExchange::EXCHANGE_NAME); QPID_LOG(debug, *this << " updating management deleted objects. ") typedef management::ManagementAgent::DeletedObjectList DeletedObjectList; DeletedObjectList deleted; agent->exportDeletedObjects(deleted); Variant::List list; for (DeletedObjectList::iterator i = deleted.begin(); i != deleted.end(); ++i) { string encoded; (*i)->encode(encoded); list.push_back(encoded); } ListCodec::encode(list, data); session.messageTransfer( arg::content=client::Message(data, UpdateDataExchange::MANAGEMENT_DELETED_OBJECTS_KEY), arg::destination=UpdateDataExchange::EXCHANGE_NAME); } void UpdateClient::updateExchange(const boost::shared_ptr& ex) { QPID_LOG(debug, *this << " updating exchange " << ex->getName()); ClusterConnectionProxy(session).exchange(encode(*ex)); } /** Bind a queue to the update exchange and update messges to it * setting the message possition as needed. */ class MessageUpdater { std::string queue; bool haveLastPos; framing::SequenceNumber lastPos; client::AsyncSession session; ExpiryPolicy& expiry; public: MessageUpdater(const string& q, const client::AsyncSession s, ExpiryPolicy& expiry_) : queue(q), haveLastPos(false), session(s), expiry(expiry_) { session.exchangeBind(queue, UpdateClient::UPDATE); } ~MessageUpdater() { try { session.exchangeUnbind(queue, UpdateClient::UPDATE); } catch (const std::exception& e) { // Don't throw in a destructor. QPID_LOG(error, "Unbinding update queue " << queue << ": " << e.what()); } } void updateQueuedMessage(const broker::QueuedMessage& message) { // Send the queue position if necessary. if (!haveLastPos || message.position - lastPos != 1) { ClusterConnectionProxy(session).queuePosition(queue, message.position.getValue()-1); haveLastPos = true; } lastPos = message.position; // if the ttl > 0, we need to send the calculated expiration time to the updatee const DeliveryProperties* dprops = message.payload->getProperties(); if (dprops && dprops->getTtl() > 0) { bool hadMessageProps = message.payload->hasProperties(); const framing::MessageProperties* mprops = message.payload->getProperties(); bool hadApplicationHeaders = mprops->hasApplicationHeaders(); message.payload->insertCustomProperty(UpdateClient::X_QPID_EXPIRATION, sys::Duration(sys::EPOCH, message.payload->getExpiration())); // If message properties or application headers didn't exist // prior to us adding data, we want to remove them on the other side. if (!hadMessageProps) message.payload->insertCustomProperty(UpdateClient::X_QPID_NO_MESSAGE_PROPS, 0); else if (!hadApplicationHeaders) message.payload->insertCustomProperty(UpdateClient::X_QPID_NO_HEADERS, 0); } // We can't send a broker::Message via the normal client API, // and it would be expensive to copy it into a client::Message // so we go a bit under the client API covers here. // SessionBase_0_10Access sb(session); // Disable client code that clears the delivery-properties.exchange sb.get()->setDoClearDeliveryPropertiesExchange(false); framing::MessageTransferBody transfer( *message.payload->getFrames().as()); transfer.setDestination(UpdateClient::UPDATE); sb.get()->send(transfer, message.payload->getFrames(), !message.payload->isContentReleased()); if (message.payload->isContentReleased()){ uint16_t maxFrameSize = sb.get()->getConnection()->getNegotiatedSettings().maxFrameSize; uint16_t maxContentSize = maxFrameSize - AMQFrame::frameOverhead(); bool morecontent = true; for (uint64_t offset = 0; morecontent; offset += maxContentSize) { AMQFrame frame((AMQContentBody())); morecontent = message.payload->getContentFrame( *(message.queue), frame, maxContentSize, offset); sb.get()->sendRawFrame(frame); } } } void updateMessage(const boost::intrusive_ptr& message) { updateQueuedMessage(broker::QueuedMessage(0, message, haveLastPos? lastPos.getValue()+1 : 1)); } }; void UpdateClient::updateQueue(client::AsyncSession& s, const boost::shared_ptr& q) { broker::Exchange::shared_ptr alternateExchange = q->getAlternateExchange(); s.queueDeclare( arg::queue = q->getName(), arg::durable = q->isDurable(), arg::autoDelete = q->isAutoDelete(), arg::alternateExchange = alternateExchange ? alternateExchange->getName() : "", arg::arguments = q->getSettings(), arg::exclusive = q->hasExclusiveOwner() ); MessageUpdater updater(q->getName(), s, expiry); q->eachMessage(boost::bind(&MessageUpdater::updateQueuedMessage, &updater, _1)); q->eachBinding(boost::bind(&UpdateClient::updateBinding, this, s, q->getName(), _1)); ClusterConnectionProxy(s).queuePosition(q->getName(), q->getPosition()); uint priority, count; if (qpid::broker::Fairshare::getState(q->getMessages(), priority, count)) { ClusterConnectionProxy(s).queueFairshareState(q->getName(), priority, count); } ClusterConnectionProxy(s).queueDequeueSincePurgeState(q->getName(), q->getDequeueSincePurge()); } void UpdateClient::updateExclusiveQueue(const boost::shared_ptr& q) { QPID_LOG(debug, *this << " updating exclusive queue " << q->getName() << " on " << shadowSession.getId()); updateQueue(shadowSession, q); } void UpdateClient::updateNonExclusiveQueue(const boost::shared_ptr& q) { if (!q->hasExclusiveOwner()) { QPID_LOG(debug, *this << " updating queue " << q->getName()); updateQueue(session, q); }//else queue will be updated as part of session state of owning session } void UpdateClient::updateBinding(client::AsyncSession& s, const std::string& queue, const QueueBinding& binding) { if (binding.exchange.size()) s.exchangeBind(queue, binding.exchange, binding.key, binding.args); //else its the default exchange and there is no need to replicate //the binding, the creation of the queue will have done so //automatically } void UpdateClient::updateOutputTask(const sys::OutputTask* task) { const SemanticState::ConsumerImpl* cci = boost::polymorphic_downcast (task); SemanticState::ConsumerImpl* ci = const_cast(cci); uint16_t channel = ci->getParent().getSession().getChannel(); ClusterConnectionProxy(shadowConnection).outputTask(channel, ci->getTag()); QPID_LOG(debug, *this << " updating output task " << ci->getTag() << " channel=" << channel); } void UpdateClient::updateConnection(const boost::intrusive_ptr& updateConnection) { QPID_LOG(debug, *this << " updating connection " << *updateConnection); assert(updateConnection->getBrokerConnection()); broker::Connection& bc = *updateConnection->getBrokerConnection(); // Send the management ID first on the main connection. std::string mgmtId = updateConnection->getBrokerConnection()->getMgmtId(); ClusterConnectionProxy(session).shadowPrepare(mgmtId); // Make sure its received before opening shadow connection session.sync(); // Open shadow connection and update it. shadowConnection = catchUpConnection(); connectionSettings.maxFrameSize = bc.getFrameMax(); shadowConnection.open(updateeUrl, connectionSettings); ClusterConnectionProxy(shadowConnection).shadowSetUser(bc.getUserId()); bc.eachSessionHandler(boost::bind(&UpdateClient::updateSession, this, _1)); // Safe to use decoder here because we are stalled for update. std::pair fragment = decoder.get(updateConnection->getId()).getFragment(); bc.getOutputTasks().eachOutput( boost::bind(&UpdateClient::updateOutputTask, this, _1)); ClusterConnectionProxy(shadowConnection).shadowReady( updateConnection->getId().getMember(), updateConnection->getId().getNumber(), bc.getMgmtId(), bc.getUserId(), string(fragment.first, fragment.second), updateConnection->getOutput().getSendMax() ); shadowConnection.close(); QPID_LOG(debug, *this << " updated connection " << *updateConnection); } void UpdateClient::updateSession(broker::SessionHandler& sh) { broker::SessionState* ss = sh.getSession(); if (!ss) return; // no session. QPID_LOG(debug, *this << " updating session " << ss->getId()); // Create a client session to update session state. boost::shared_ptr cimpl = client::ConnectionAccess::getImpl(shadowConnection); boost::shared_ptr simpl = cimpl->newSession(ss->getId().getName(), ss->getTimeout(), sh.getChannel()); simpl->disableAutoDetach(); client::SessionBase_0_10Access(shadowSession).set(simpl); AMQP_AllProxy::ClusterConnection proxy(simpl->out); // Re-create session state on remote connection. QPID_LOG(debug, *this << " updating exclusive queues."); ss->getSessionAdapter().eachExclusiveQueue(boost::bind(&UpdateClient::updateExclusiveQueue, this, _1)); QPID_LOG(debug, *this << " updating consumers."); ss->getSemanticState().eachConsumer( boost::bind(&UpdateClient::updateConsumer, this, _1)); QPID_LOG(debug, *this << " updating unacknowledged messages."); broker::DeliveryRecords& drs = ss->getSemanticState().getUnacked(); std::for_each(drs.begin(), drs.end(), boost::bind(&UpdateClient::updateUnacked, this, _1, shadowSession)); updateTransactionState(ss->getSemanticState()); // Adjust command counter for message in progress, will be sent after state update. boost::intrusive_ptr inProgress = ss->getMessageInProgress(); SequenceNumber received = ss->receiverGetReceived().command; if (inProgress) --received; // Sync the session to ensure all responses from broker have been processed. shadowSession.sync(); // Reset command-sequence state. proxy.sessionState( ss->senderGetReplayPoint().command, ss->senderGetCommandPoint().command, ss->senderGetIncomplete(), std::max(received, ss->receiverGetExpected().command), received, ss->receiverGetUnknownComplete(), ss->receiverGetIncomplete(), ss->getSemanticState().getDtxSelected() ); // Send frames for partial message in progress. if (inProgress) { inProgress->getFrames().map(simpl->out); } QPID_LOG(debug, *this << " updated session " << sh.getSession()->getId()); } void UpdateClient::updateConsumer( const broker::SemanticState::ConsumerImpl::shared_ptr& ci) { QPID_LOG(debug, *this << " updating consumer " << ci->getTag() << " on " << shadowSession.getId()); using namespace message; shadowSession.messageSubscribe( arg::queue = ci->getQueue()->getName(), arg::destination = ci->getTag(), arg::acceptMode = ci->isAckExpected() ? ACCEPT_MODE_EXPLICIT : ACCEPT_MODE_NONE, arg::acquireMode = ci->isAcquire() ? ACQUIRE_MODE_PRE_ACQUIRED : ACQUIRE_MODE_NOT_ACQUIRED, arg::exclusive = ci->isExclusive(), arg::resumeId = ci->getResumeId(), arg::resumeTtl = ci->getResumeTtl(), arg::arguments = ci->getArguments() ); shadowSession.messageSetFlowMode(ci->getTag(), ci->getCredit().isWindowMode() ? FLOW_MODE_WINDOW : FLOW_MODE_CREDIT); shadowSession.messageFlow(ci->getTag(), CREDIT_UNIT_MESSAGE, ci->getCredit().allocated().messages); shadowSession.messageFlow(ci->getTag(), CREDIT_UNIT_BYTE, ci->getCredit().allocated().bytes); ClusterConnectionProxy(shadowSession).consumerState( ci->getTag(), ci->isBlocked(), ci->isNotifyEnabled(), ci->getPosition(), ci->getCredit().used().messages, ci->getCredit().used().bytes ); consumerNumbering.add(ci.get()); QPID_LOG(debug, *this << " updated consumer " << ci->getTag() << " on " << shadowSession.getId()); } void UpdateClient::updateUnacked(const broker::DeliveryRecord& dr, client::AsyncSession& updateSession) { if (!dr.isEnded() && dr.isAcquired()) { assert(dr.getMessage().payload); // If the message is acquired then it is no longer on the // updatees queue, put it on the update queue for updatee to pick up. // MessageUpdater(UPDATE, updateSession, expiry).updateQueuedMessage(dr.getMessage()); } ClusterConnectionProxy(updateSession).deliveryRecord( dr.getQueue()->getName(), dr.getMessage().position, dr.getTag(), dr.getId(), dr.isAcquired(), dr.isAccepted(), dr.isCancelled(), dr.isComplete(), dr.isEnded(), dr.isWindowing(), dr.getQueue()->isEnqueued(dr.getMessage()), dr.getCredit() ); } class TxOpUpdater : public broker::TxOpConstVisitor, public MessageUpdater { public: TxOpUpdater(UpdateClient& dc, client::AsyncSession s, ExpiryPolicy& expiry) : MessageUpdater(UpdateClient::UPDATE, s, expiry), parent(dc), session(s), proxy(s) {} void operator()(const broker::DtxAck& ack) { std::for_each(ack.getPending().begin(), ack.getPending().end(), boost::bind(&UpdateClient::updateUnacked, &parent, _1, session)); proxy.dtxAck(); } void operator()(const broker::RecoveredDequeue& rdeq) { updateMessage(rdeq.getMessage()); proxy.txEnqueue(rdeq.getQueue()->getName()); } void operator()(const broker::RecoveredEnqueue& renq) { updateMessage(renq.getMessage()); proxy.txEnqueue(renq.getQueue()->getName()); } void operator()(const broker::TxAccept& txAccept) { proxy.txAccept(txAccept.getAcked()); } typedef std::list QueueList; void copy(const QueueList& l, Array& a) { for (QueueList::const_iterator i = l.begin(); i!=l.end(); ++i) a.push_back(Array::ValuePtr(new Str8Value((*i)->getName()))); } void operator()(const broker::TxPublish& txPub) { updateMessage(txPub.getMessage()); assert(txPub.getQueues().empty() || txPub.getPrepared().empty()); Array qarray(TYPE_CODE_STR8); copy(txPub.getQueues().empty() ? txPub.getPrepared() : txPub.getQueues(), qarray); proxy.txPublish(qarray, txPub.delivered); } private: UpdateClient& parent; client::AsyncSession session; ClusterConnectionProxy proxy; }; void UpdateClient::updateBufferRef(const broker::DtxBuffer::shared_ptr& dtx,bool suspended) { ClusterConnectionProxy proxy(shadowSession); broker::DtxWorkRecord* record = updaterBroker.getDtxManager().getWork(dtx->getXid()); proxy.dtxBufferRef(dtx->getXid(), record->indexOf(dtx), suspended); } void UpdateClient::updateTransactionState(broker::SemanticState& s) { ClusterConnectionProxy proxy(shadowSession); proxy.accumulatedAck(s.getAccumulatedAck()); broker::TxBuffer::shared_ptr tx = s.getTxBuffer(); broker::DtxBuffer::shared_ptr dtx = s.getDtxBuffer(); if (dtx) { updateBufferRef(dtx, false); // Current transaction. } else if (tx) { proxy.txStart(); TxOpUpdater updater(*this, shadowSession, expiry); tx->accept(updater); proxy.txEnd(); } for (SemanticState::DtxBufferMap::iterator i = s.getSuspendedXids().begin(); i != s.getSuspendedXids().end(); ++i) { updateBufferRef(i->second, true); } } void UpdateClient::updateDtxBuffer(const broker::DtxBuffer::shared_ptr& dtx) { ClusterConnectionProxy proxy(session); proxy.dtxStart( dtx->getXid(), dtx->isEnded(), dtx->isSuspended(), dtx->isFailed(), dtx->isExpired()); TxOpUpdater updater(*this, session, expiry); dtx->accept(updater); proxy.dtxEnd(); } void UpdateClient::updateQueueListeners(const boost::shared_ptr& queue) { queue->getListeners().eachListener( boost::bind(&UpdateClient::updateQueueListener, this, queue->getName(), _1)); } void UpdateClient::updateQueueListener(std::string& q, const boost::shared_ptr& c) { SemanticState::ConsumerImpl* ci = dynamic_cast(c.get()); size_t n = consumerNumbering[ci]; if (n >= consumerNumbering.size()) throw Exception(QPID_MSG("Unexpected listener on queue " << q)); ClusterConnectionProxy(session).addQueueListener(q, n); } void UpdateClient::updateLinks() { broker::LinkRegistry& links = updaterBroker.getLinks(); links.eachLink(boost::bind(&UpdateClient::updateLink, this, _1)); links.eachBridge(boost::bind(&UpdateClient::updateBridge, this, _1)); } void UpdateClient::updateLink(const boost::shared_ptr& link) { QPID_LOG(debug, *this << " updating link " << link->getHost() << ":" << link->getPort()); ClusterConnectionProxy(session).config(encode(*link)); } void UpdateClient::updateBridge(const boost::shared_ptr& bridge) { QPID_LOG(debug, *this << " updating bridge " << bridge->getName()); ClusterConnectionProxy(session).config(encode(*bridge)); } void UpdateClient::updateQueueObservers(const boost::shared_ptr& q) { q->eachObserver(boost::bind(&UpdateClient::updateObserver, this, q, _1)); } void UpdateClient::updateObserver(const boost::shared_ptr& q, boost::shared_ptr o) { qpid::framing::FieldTable state; broker::StatefulQueueObserver *so = dynamic_cast(o.get()); if (so) { so->getState( state ); std::string id(so->getId()); QPID_LOG(debug, *this << " updating queue " << q->getName() << "'s observer " << id); ClusterConnectionProxy(session).queueObserverState( q->getName(), id, state ); } } void UpdateClient::updateDtxManager() { broker::DtxManager& dtm = updaterBroker.getDtxManager(); dtm.each(boost::bind(&UpdateClient::updateDtxWorkRecord, this, _1)); } void UpdateClient::updateDtxWorkRecord(const broker::DtxWorkRecord& r) { QPID_LOG(debug, *this << " updating DTX transaction: " << r.getXid()); for (size_t i = 0; i < r.size(); ++i) updateDtxBuffer(r[i]); ClusterConnectionProxy(session).dtxWorkRecord( r.getXid(), r.isPrepared(), r.getTimeout()); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/ConnectionCodec.h0000664000076400007640000000557611373210115021556 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_CONNCTIONCODEC_H #define QPID_CLUSTER_CONNCTIONCODEC_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/Connection.h" #include "qpid/cluster/Connection.h" #include #include namespace qpid { namespace broker { class Connection; } namespace cluster { class Cluster; /** * Encapsulates the standard amqp_0_10::ConnectionCodec and sets up * a cluster::Connection for the connection. * * The ConnectionCodec is deleted by the network layer when the * connection closes. The cluster::Connection needs to be kept * around until all cluster business on the connection is complete. * */ class ConnectionCodec : public sys::ConnectionCodec { public: struct Factory : public sys::ConnectionCodec::Factory { boost::shared_ptr next; Cluster& cluster; Factory(boost::shared_ptr f, Cluster& c) : next(f), cluster(c) {} sys::ConnectionCodec* create(framing::ProtocolVersion, sys::OutputControl&, const std::string& id, const qpid::sys::SecuritySettings& external); sys::ConnectionCodec* create(sys::OutputControl&, const std::string& id, const qpid::sys::SecuritySettings& external); }; ConnectionCodec(const framing::ProtocolVersion&, sys::OutputControl& out, const std::string& logId, Cluster& c, bool catchUp, bool isLink, const qpid::sys::SecuritySettings& external); ~ConnectionCodec(); // ConnectionCodec functions. size_t decode(const char* buffer, size_t size); size_t encode(const char* buffer, size_t size); bool canEncode(); void closed(); bool isClosed() const; framing::ProtocolVersion getVersion() const; void setSecureConnection(broker::SecureConnection* sc) { interceptor->setSecureConnection(sc); } private: amqp_0_10::Connection codec; boost::intrusive_ptr interceptor; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_CONNCTIONCODEC_H*/ qpidc-0.16/src/qpid/cluster/EventFrame.cpp0000664000076400007640000000261211227113407021100 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/EventFrame.h" #include "qpid/cluster/Connection.h" namespace qpid { namespace cluster { EventFrame::EventFrame() {} EventFrame::EventFrame(const EventHeader& e, const framing::AMQFrame& f, int rc) : connectionId(e.getConnectionId()), frame(f), readCredit(rc), type(e.getType()) {} std::ostream& operator<<(std::ostream& o, const EventFrame& e) { if (e.frame.getBody()) o << e.frame; else o << "null-frame"; o << " " << e.type << " " << e.connectionId; if (e.readCredit) o << " read-credit=" << e.readCredit; return o; } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/Decoder.cpp0000664000076400007640000000441711227113407020416 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/Decoder.h" #include "qpid/cluster/EventFrame.h" #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/AMQFrame.h" namespace qpid { namespace cluster { void Decoder::decode(const EventHeader& eh, const char* data) { sys::Mutex::ScopedLock l(lock); assert(eh.getType() == DATA); // Only handle connection data events. const char* cp = static_cast(data); framing::Buffer buf(const_cast(cp), eh.getSize()); framing::FrameDecoder& decoder = map[eh.getConnectionId()]; if (decoder.decode(buf)) { // Decoded a frame framing::AMQFrame frame(decoder.getFrame()); while (decoder.decode(buf)) { callback(EventFrame(eh, frame)); frame = decoder.getFrame(); } // Set read-credit on the last frame ending in this event. // Credit will be given when this frame is processed. callback(EventFrame(eh, frame, 1)); } else { // We must give 1 unit read credit per event. // This event does not complete any frames so // send an empty frame with the read credit. callback(EventFrame(eh, framing::AMQFrame(), 1)); } } void Decoder::erase(const ConnectionId& c) { sys::Mutex::ScopedLock l(lock); map.erase(c); } framing::FrameDecoder& Decoder::get(const ConnectionId& c) { sys::Mutex::ScopedLock l(lock); return map[c]; } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/WatchDogPlugin.cpp0000664000076400007640000001073311670214136021731 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /**@file The watchdog plug-in will kill the qpidd broker process if it becomes stuck for longer than a configured interval. If the watchdog plugin is loaded and the --watchdog-interval=N option is set then the broker starts a watchdog process and signals it every N/2 seconds. The watchdog process runs a very simple program that starts a timer for N seconds, and resets the timer to N seconds whenever it is signalled by the broker. If the timer ever reaches 0 the watchdog kills the broker process (with kill -9) and exits. This is useful in a cluster setting because in some insttances (e.g. while resolving an error) it's possible for a stuck process to hang other cluster members that are waiting for it to send a message. Using the watchdog, the stuck process is terminated and removed fromt the cluster allowing other members to continue and clients of the stuck process to fail over to other members. */ #include "config.h" #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/log/Statement.h" #include "qpid/broker/Broker.h" #include "qpid/sys/Timer.h" #include "qpid/sys/Fork.h" #include #include #include namespace qpid { namespace cluster { using broker::Broker; struct Settings { Settings() : interval(0), watchdogExec(QPID_LIBEXEC_DIR "/qpidd_watchdog") {} int interval; std::string watchdogExec; }; struct WatchDogOptions : public qpid::Options { Settings& settings; WatchDogOptions(Settings& s) : settings(s) { addOptions() ("watchdog-interval", optValue(settings.interval, "N"), "broker is automatically killed if it is hung for more than \ N seconds. 0 disables watchdog.") ("watchdog-exec", optValue(settings.watchdogExec, ""), "Path to the qpidd_watchdog executable."); } }; struct WatchDogTask : public sys::TimerTask { int pid; sys::Timer& timer; int interval; WatchDogTask(int pid_, sys::Timer& t, int _interval) : TimerTask(_interval*sys::TIME_SEC/2,"WatchDog"), pid(pid_), timer(t), interval(_interval) {} void fire() { timer.add (new WatchDogTask(pid, timer, interval)); QPID_LOG(debug, "Sending keepalive signal to watchdog"); ::kill(pid, SIGUSR1); } }; struct WatchDogPlugin : public qpid::Plugin, public qpid::sys::Fork { Settings settings; WatchDogOptions options; Broker* broker; int watchdogPid; WatchDogPlugin() : options(settings), broker(0), watchdogPid(0) {} ~WatchDogPlugin() { if (watchdogPid) ::kill(watchdogPid, SIGTERM); ::waitpid(watchdogPid, 0, 0); } Options* getOptions() { return &options; } void earlyInitialize(qpid::Plugin::Target& target) { broker = dynamic_cast(&target); if (broker && settings.interval) { QPID_LOG(notice, "Starting watchdog process with interval of " << settings.interval << " seconds"); fork(); } } void initialize(Target&) {} protected: void child() { // Child of fork std::string interval = boost::lexical_cast(settings.interval); const char* watchdogExec = settings.watchdogExec.c_str(); ::execl(watchdogExec, watchdogExec, interval.c_str(), NULL); QPID_LOG(critical, "Failed to exec watchdog program " << watchdogExec); ::kill(::getppid(), SIGKILL); exit(1); } void parent(int pid) { // Parent of fork watchdogPid = pid; broker->getTimer().add( new WatchDogTask(watchdogPid, broker->getTimer(), settings.interval)); // TODO aconway 2009-08-10: to be extra safe, we could monitor // the watchdog child and re-start it if it exits. } }; static WatchDogPlugin instance; // Static initialization. }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/OutputInterceptor.cpp0000664000076400007640000000745011717465066022607 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/OutputInterceptor.h" #include "qpid/cluster/Connection.h" #include "qpid/cluster/Cluster.h" #include "qpid/framing/ClusterConnectionDeliverDoOutputBody.h" #include "qpid/framing/AMQFrame.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace cluster { using namespace framing; using namespace std; NoOpConnectionOutputHandler OutputInterceptor::discardHandler; OutputInterceptor::OutputInterceptor(Connection& p, sys::ConnectionOutputHandler& h) : parent(p), closing(false), next(&h), sendMax(2048), sent(0), sentDoOutput(false) {} void OutputInterceptor::send(framing::AMQFrame& f) { sys::Mutex::ScopedLock l(lock); next->send(f); } void OutputInterceptor::activateOutput() { sys::Mutex::ScopedLock l(lock); if (parent.isCatchUp()) next->activateOutput(); else sendDoOutput(sendMax, l); } void OutputInterceptor::abort() { sys::Mutex::ScopedLock l(lock); if (parent.isLocal()) { next->abort(); } } void OutputInterceptor::giveReadCredit(int32_t credit) { sys::Mutex::ScopedLock l(lock); next->giveReadCredit(credit); } // Called in write thread when the IO layer has no more data to write. // We only process IO callbacks in the write thread during catch-up. // Normally we run doOutput only on delivery of doOutput requests. bool OutputInterceptor::doOutput() { parent.doCatchupIoCallbacks(); return false; } // Send output up to limit, calculate new limit. void OutputInterceptor::deliverDoOutput(uint32_t limit) { sys::Mutex::ScopedLock l(lock); sentDoOutput = false; sendMax = limit; size_t newLimit = limit; if (parent.isLocal()) { size_t buffered = next->getBuffered(); if (buffered == 0 && sent == sendMax) // Could have sent more, increase the limit. newLimit = sendMax*2; else if (buffered > 0 && sent > 1) // Data left unsent, reduce the limit. newLimit = (sendMax + sent) / 2; } sent = 0; while (sent < limit) { { sys::Mutex::ScopedUnlock u(lock); if (!parent.getBrokerConnection()->doOutput()) break; } ++sent; } if (sent == limit) sendDoOutput(newLimit, l); } void OutputInterceptor::sendDoOutput(size_t newLimit, const sys::Mutex::ScopedLock&) { if (parent.isLocal() && !sentDoOutput && !closing && parent.isAnnounced()) { sentDoOutput = true; parent.getCluster().getMulticast().mcastControl( ClusterConnectionDeliverDoOutputBody(ProtocolVersion(), newLimit), parent.getId()); } } // Called in connection thread when local connection closes. void OutputInterceptor::closeOutput() { sys::Mutex::ScopedLock l(lock); closing = true; next = &discardHandler; } void OutputInterceptor::close() { sys::Mutex::ScopedLock l(lock); next->close(); } size_t OutputInterceptor::getBuffered() const { sys::Mutex::ScopedLock l(lock); return next->getBuffered(); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/StoreStatus.h0000664000076400007640000000376311355156410021024 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_STORESTATE_H #define QPID_CLUSTER_STORESTATE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Uuid.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/enum.h" #include namespace qpid { namespace cluster { /** * State of the store for cluster purposes. */ class StoreStatus { public: typedef framing::Uuid Uuid; typedef framing::cluster::StoreState StoreState; StoreStatus(const std::string& dir); framing::cluster::StoreState getState() const { return state; } const Uuid& getClusterId() const { return clusterId; } void setClusterId(const Uuid&); const Uuid& getShutdownId() const { return shutdownId; } void load(); void dirty(); // Mark the store in use. void clean(const Uuid& shutdownId); // Mark the store clean. bool hasStore() const; private: void save(); framing::cluster::StoreState state; Uuid clusterId, shutdownId; std::string dataDir; }; const char* stateName(framing::cluster::StoreState); std::ostream& operator<<(std::ostream&, framing::cluster::StoreState); std::ostream& operator<<(std::ostream&, const StoreStatus&); }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_STORESTATE_H*/ qpidc-0.16/src/qpid/cluster/ClusterTimer.h0000664000076400007640000000342611341775433021151 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_CLUSTERTIMER_H #define QPID_CLUSTER_CLUSTERTIMER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Timer.h" #include namespace qpid { namespace cluster { class Cluster; /** * Timer implementation that executes tasks consistently in the * deliver thread across a cluster. Task is not executed when timer * fires, instead the elder multicasts a wakeup. The task is executed * when the wakeup is delivered. */ class ClusterTimer : public sys::Timer { public: ClusterTimer(Cluster&); ~ClusterTimer(); void add(boost::intrusive_ptr task); void deliverWakeup(const std::string& name); void deliverDrop(const std::string& name); void becomeElder(); protected: void fire(boost::intrusive_ptr task); void drop(boost::intrusive_ptr task); private: typedef std::map > Map; Cluster& cluster; Map map; }; }} #endif /*!QPID_CLUSTER_CLUSTERTIMER_H*/ qpidc-0.16/src/qpid/cluster/UpdateClient.h0000664000076400007640000001215311627235610021100 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_UPDATECLIENT_H #define QPID_CLUSTER_UPDATECLIENT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/ClusterMap.h" #include "qpid/cluster/Numbering.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/client/AsyncSession.h" #include "qpid/broker/SemanticState.h" #include "qpid/sys/Runnable.h" #include #include namespace qpid { struct Url; namespace broker { class Broker; class Queue; class Exchange; class QueueBindings; struct QueueBinding; struct QueuedMessage; class SessionHandler; class DeliveryRecord; class SessionState; class SemanticState; class Decoder; class Link; class Bridge; class QueueObserver; class DtxBuffer; } // namespace broker namespace cluster { class Cluster; class Connection; class ClusterMap; class Decoder; class ExpiryPolicy; /** * A client that updates the contents of a local broker to a remote one using AMQP. */ class UpdateClient : public sys::Runnable { public: static const std::string UPDATE; // Name for special update queue and exchange. static const std::string X_QPID_EXPIRATION; // Update message expiration // Flag to remove props/headers that were added by the UpdateClient static const std::string X_QPID_NO_MESSAGE_PROPS; static const std::string X_QPID_NO_HEADERS; static client::Connection catchUpConnection(); UpdateClient(const MemberId& updater, const MemberId& updatee, const Url&, broker::Broker& donor, const ClusterMap& map, ExpiryPolicy& expiry, const std::vector >&, Decoder&, const boost::function& done, const boost::function& fail, const client::ConnectionSettings& ); ~UpdateClient(); void update(); void run(); // Will delete this when finished. void updateUnacked(const broker::DeliveryRecord&, client::AsyncSession&); private: void updateQueue(client::AsyncSession&, const boost::shared_ptr&); void updateNonExclusiveQueue(const boost::shared_ptr&); void updateExclusiveQueue(const boost::shared_ptr&); void updateExchange(const boost::shared_ptr&); void updateMessage(const broker::QueuedMessage&); void updateMessageTo(const broker::QueuedMessage&, const std::string& queue, client::Session s); void updateBinding(client::AsyncSession&, const std::string& queue, const broker::QueueBinding& binding); void updateConnection(const boost::intrusive_ptr& connection); void updateSession(broker::SessionHandler& s); void updateBufferRef(const broker::DtxBuffer::shared_ptr& dtx, bool suspended); void updateTransactionState(broker::SemanticState& s); void updateOutputTask(const sys::OutputTask* task); void updateConsumer(const broker::SemanticState::ConsumerImpl::shared_ptr&); void updateQueueListeners(const boost::shared_ptr&); void updateQueueListener(std::string& q, const boost::shared_ptr& c); void updateManagementSetupState(); void updateManagementAgent(); void updateLinks(); void updateLink(const boost::shared_ptr&); void updateBridge(const boost::shared_ptr&); void updateQueueObservers(const boost::shared_ptr&); void updateObserver(const boost::shared_ptr&, boost::shared_ptr); void updateDtxManager(); void updateDtxBuffer(const boost::shared_ptr& ); void updateDtxWorkRecord(const broker::DtxWorkRecord&); Numbering consumerNumbering; MemberId updaterId; MemberId updateeId; Url updateeUrl; broker::Broker& updaterBroker; ClusterMap map; ExpiryPolicy& expiry; std::vector > connections; Decoder& decoder; client::Connection connection, shadowConnection; client::AsyncSession session, shadowSession; boost::function done; boost::function failed; client::ConnectionSettings connectionSettings; friend std::ostream& operator<<(std::ostream&, const UpdateClient&); }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_UPDATECLIENT_H*/ qpidc-0.16/src/qpid/cluster/CredentialsExchange.cpp0000664000076400007640000000703311725210040022740 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "CredentialsExchange.h" #include "Cluster.h" #include "qpid/broker/ConnectionState.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/sys/Time.h" namespace qpid { namespace cluster { using namespace std; const string CredentialsExchange::NAME=("qpid.cluster-credentials"); namespace { const string ANONYMOUS_MECH("ANONYMOUS"); const string ANONYMOUS_USER("anonymous"); string effectiveUserId(const string& username, const string& mechanism) { if (mechanism == ANONYMOUS_MECH && username.empty()) return ANONYMOUS_USER; else return username; } } CredentialsExchange::CredentialsExchange(Cluster& cluster) : broker::Exchange(NAME, &cluster), username(effectiveUserId(cluster.getSettings().username, cluster.getSettings().mechanism)), timeout(120*sys::TIME_SEC), authenticate(cluster.getBroker().getOptions().auth) {} static const string anonymous("anonymous"); bool CredentialsExchange::check(MemberId member) { sys::Mutex::ScopedLock l(lock); Map::iterator i = map.find(member); if (i == map.end()) return false; bool valid = (sys::Duration(i->second, sys::AbsTime::now()) < timeout); map.erase(i); return valid; } void CredentialsExchange::route(broker::Deliverable& msg) { const framing::FieldTable* args = msg.getMessage().getApplicationHeaders(); sys::Mutex::ScopedLock l(lock); const broker::ConnectionState* connection = static_cast(msg.getMessage().getPublisher()); if (authenticate && !connection->isAuthenticatedUser(username)) throw framing::UnauthorizedAccessException( QPID_MSG("Unauthorized user " << connection->getUserId() << " for " << NAME << ", should be " << username)); if (!args || !args->isSet(NAME)) throw framing::InvalidArgumentException( QPID_MSG("Invalid message received by " << NAME)); MemberId member(args->getAsUInt64(NAME)); map[member] = sys::AbsTime::now(); } string CredentialsExchange::getType() const { return NAME; } namespace { void throwIllegal() { throw framing::NotAllowedException( QPID_MSG("Illegal use of " << CredentialsExchange::NAME+" exchange")); } } bool CredentialsExchange::bind(boost::shared_ptr , const string& /*routingKey*/, const framing::FieldTable* ) { throwIllegal(); return false; } bool CredentialsExchange::unbind(boost::shared_ptr , const string& /*routingKey*/, const framing::FieldTable* ) { throwIllegal(); return false; } bool CredentialsExchange::isBound(boost::shared_ptr, const string* const /*routingKey*/, const framing::FieldTable* const ) { throwIllegal(); return false; } }} // Namespace qpid::cluster qpidc-0.16/src/qpid/cluster/Multicaster.h0000664000076400007640000000540411346517763021026 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_MULTICASTER_H #define QPID_CLUSTER_MULTICASTER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/cluster/types.h" #include "qpid/cluster/Event.h" #include "qpid/sys/PollableQueue.h" #include "qpid/sys/Mutex.h" #include #include namespace qpid { namespace sys { class Poller; } namespace cluster { class Cpg; /** * Multicast to the cluster. Shared, thread safe object. * * holding mode: Hold connection events for later multicast. Cluster * events are never held. Used during PRE_INIT/INIT state when we * want to hold any connection traffic till we are read in the * cluster. * * bypass mode: Multicast cluster events directly in the calling * thread. This mode is used by cluster in PRE_INIT state the poller * is not yet be active. * * Multicaster is created in bypass+holding mode, they are disabled by * start and setReady respectively. */ class Multicaster { public: /** Starts in initializing mode. */ Multicaster(Cpg& cpg_, const boost::shared_ptr&, boost::function onError ); void mcastControl(const framing::AMQBody& controlBody, const ConnectionId&); void mcastControl(const framing::AMQFrame& controlFrame, const ConnectionId&); void mcastBuffer(const char*, size_t, const ConnectionId&); void mcast(const Event& e); /** Start the pollable queue, turn off bypass mode. */ void start(); /** Switch to ready mode, release held messages. */ void setReady(); private: typedef sys::PollableQueue PollableEventQueue; typedef std::deque PlainEventQueue; PollableEventQueue::Batch::const_iterator sendMcast(const PollableEventQueue::Batch& ); sys::Mutex lock; boost::function onError; Cpg& cpg; PollableEventQueue queue; bool ready; PlainEventQueue holdingQueue; std::vector ioVector; bool bypass; }; }} // namespace qpid::cluster #endif /*!QPID_CLUSTER_MULTICASTER_H*/ qpidc-0.16/src/qpid/cluster/Quorum_null.h0000664000076400007640000000232111236612676021044 0ustar00jrossjross00000000000000#ifndef QPID_CLUSTER_QUORUM_NULL_H #define QPID_CLUSTER_QUORUM_NULL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include namespace qpid { namespace cluster { class Cluster; /** Null implementation of quorum. */ class Quorum { public: Quorum(boost::function) {} void start(boost::shared_ptr) {} }; #endif /*!QPID_CLUSTER_QUORUM_NULL_H*/ }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/MemberSet.cpp0000664000076400007640000000354311372266076020747 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "MemberSet.h" #include #include #include namespace qpid { namespace cluster { std::string encodeMemberSet(const MemberSet& m) { std::string addresses; for (MemberSet::const_iterator i = m.begin(); i != m.end(); ++i) addresses.append(i->str()); return addresses; } MemberSet decodeMemberSet(const std::string& s) { MemberSet set; for (std::string::const_iterator i = s.begin(); i < s.end(); i += 8) { assert(size_t(i-s.begin())+8 <= s.size()); set.insert(MemberId(std::string(i, i+8))); } return set; } MemberSet intersection(const MemberSet& a, const MemberSet& b) { MemberSet intersection; std::set_intersection(a.begin(), a.end(), b.begin(), b.end(), std::inserter(intersection, intersection.begin())); return intersection; } std::ostream& operator<<(std::ostream& o, const MemberSet& ms) { copy(ms.begin(), ms.end(), std::ostream_iterator(o, " ")); return o; } }} // namespace qpid::cluster qpidc-0.16/src/qpid/cluster/ClusterTimer.cpp0000664000076400007640000001137011732677503021504 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License "); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "Cluster.h" #include "ClusterTimer.h" #include "qpid/log/Statement.h" #include "qpid/framing/ClusterTimerWakeupBody.h" #include "qpid/framing/ClusterTimerDropBody.h" #include "qpid/sys/ClusterSafe.h" namespace qpid { namespace cluster { using boost::intrusive_ptr; using std::max; using sys::Timer; using sys::TimerTask; // // Note on use of Broker::getTimer() rather than getClusterTime in broker code. // The following uses of getTimer() are cluster safe: // // LinkRegistry: maintenance visits in timer can call Bridge::create/cancel // but these don't modify any management state. // // broker::Connection: // - Heartbeats use ClusterOrderOutput to ensure consistency // - timeout: aborts connection in timer, cluster does an orderly connection close. // // SessionState: scheduledCredit - uses ClusterOrderProxy // Broker::queueCleaner: cluster implements ExpiryPolicy for consistent expiry. // // Broker::dtxManager: dtx disabled with cluster. // // requestIOProcessing: called in doOutput. // ClusterTimer::ClusterTimer(Cluster& c) : cluster(c) { // Allow more generous overrun threshold with cluster as we // have to do a CPG round trip before executing the task. overran = 10*sys::TIME_MSEC; late = 100*sys::TIME_MSEC; } ClusterTimer::~ClusterTimer() {} // Initialization or deliver thread. void ClusterTimer::add(intrusive_ptr task) { QPID_LOG(trace, "Adding cluster timer task " << task->getName()); Map::iterator i = map.find(task->getName()); if (i != map.end()) throw Exception(QPID_MSG("Task already exists with name " << task->getName())); map[task->getName()] = task; // Only the elder actually activates the task with the Timer base class. if (cluster.isElder()) { QPID_LOG(trace, "Elder activating cluster timer task " << task->getName()); Timer::add(task); } } // Timer thread void ClusterTimer::fire(intrusive_ptr t) { // Elder mcasts wakeup on fire, task is not fired until deliverWakeup if (cluster.isElder()) { QPID_LOG(trace, "Sending cluster timer wakeup " << t->getName()); cluster.getMulticast().mcastControl( framing::ClusterTimerWakeupBody(framing::ProtocolVersion(), t->getName()), cluster.getId()); } else QPID_LOG(trace, "Cluster timer task fired, but not elder " << t->getName()); } // Timer thread void ClusterTimer::drop(intrusive_ptr t) { // Elder mcasts drop, task is droped in deliverDrop if (cluster.isElder()) { QPID_LOG(trace, "Sending cluster timer drop " << t->getName()); cluster.getMulticast().mcastControl( framing::ClusterTimerDropBody(framing::ProtocolVersion(), t->getName()), cluster.getId()); } else QPID_LOG(trace, "Cluster timer task dropped, but not on elder " << t->getName()); } // Deliver thread void ClusterTimer::deliverWakeup(const std::string& name) { QPID_LOG(trace, "Cluster timer wakeup delivered for " << name); qpid::sys::assertClusterSafe(); Map::iterator i = map.find(name); if (i == map.end()) throw Exception(QPID_MSG("Cluster timer wakeup non-existent task " << name)); else { intrusive_ptr t = i->second; map.erase(i); // Move the nextFireTime so readyToFire() is true. This is to ensure we // don't get an error if the fired task calls setupNextFire() t->setFired(); Timer::fire(t); } } // Deliver thread void ClusterTimer::deliverDrop(const std::string& name) { QPID_LOG(trace, "Cluster timer drop delivered for " << name); Map::iterator i = map.find(name); if (i == map.end()) throw Exception(QPID_MSG("Cluster timer drop non-existent task " << name)); else { intrusive_ptr t = i->second; map.erase(i); } } // Deliver thread void ClusterTimer::becomeElder() { for (Map::iterator i = map.begin(); i != map.end(); ++i) { Timer::add(i->second); } } }} qpidc-0.16/src/qpid/cluster/UpdateDataExchange.cpp0000664000076400007640000000606511725210040022523 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "UpdateDataExchange.h" #include "Cluster.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/broker/Deliverable.h" #include "qpid/broker/Message.h" #include "qpid/log/Statement.h" #include "qpid/management/ManagementAgent.h" #include "qpid/types/Variant.h" namespace qpid { namespace cluster { const std::string UpdateDataExchange::EXCHANGE_NAME("qpid.cluster-update-data"); const std::string UpdateDataExchange::EXCHANGE_TYPE("qpid.cluster-update-data"); const std::string UpdateDataExchange::MANAGEMENT_AGENTS_KEY("management-agents"); const std::string UpdateDataExchange::MANAGEMENT_SCHEMAS_KEY("management-schemas"); const std::string UpdateDataExchange::MANAGEMENT_DELETED_OBJECTS_KEY("management-deleted-objects"); UpdateDataExchange::UpdateDataExchange(Cluster& cluster) : Exchange(EXCHANGE_NAME, &cluster) {} void UpdateDataExchange::route(broker::Deliverable& msg) { const std::string& routingKey = msg.getMessage().getRoutingKey(); std::string data = msg.getMessage().getFrames().getContent(); if (routingKey == MANAGEMENT_AGENTS_KEY) managementAgents = data; else if (routingKey == MANAGEMENT_SCHEMAS_KEY) managementSchemas = data; else if (routingKey == MANAGEMENT_DELETED_OBJECTS_KEY) managementDeletedObjects = data; else throw Exception( QPID_MSG("Cluster update-data exchange received unknown routing-key: " << routingKey)); } void UpdateDataExchange::updateManagementAgent(management::ManagementAgent* agent) { if (!agent) return; framing::Buffer buf1(const_cast(managementAgents.data()), managementAgents.size()); agent->importAgents(buf1); framing::Buffer buf2(const_cast(managementSchemas.data()), managementSchemas.size()); agent->importSchemas(buf2); using amqp_0_10::ListCodec; using types::Variant; Variant::List encoded; ListCodec::decode(managementDeletedObjects, encoded); management::ManagementAgent::DeletedObjectList objects; for (Variant::List::iterator i = encoded.begin(); i != encoded.end(); ++i) { objects.push_back(management::ManagementAgent::DeletedObject::shared_ptr( new management::ManagementAgent::DeletedObject(*i))); } agent->importDeletedObjects(objects); } }} // namespace qpid::cluster qpidc-0.16/src/qpid/SaslFactory.h0000664000076400007640000000310211475242364017267 0ustar00jrossjross00000000000000#ifndef QPID_SASLFACTORY_H #define QPID_SASLFACTORY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Sasl.h" #include "qpid/sys/Mutex.h" #include namespace qpid { /** * Factory for instances of the Sasl interface through which Sasl * support is provided to a ConnectionHandler. */ class SaslFactory { public: QPID_COMMON_EXTERN std::auto_ptr create(const std::string & userName, const std::string & password, const std::string & serviceName, const std::string & hostName, int minSsf, int maxSsf, bool allowInteraction=true ); QPID_COMMON_EXTERN static SaslFactory& getInstance(); QPID_COMMON_EXTERN ~SaslFactory(); private: SaslFactory(); static qpid::sys::Mutex lock; static std::auto_ptr instance; }; } // namespace qpid #endif /*!QPID_SASLFACTORY_H*/ qpidc-0.16/src/qpid/Modules.cpp0000664000076400007640000000544111537475216017013 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "config.h" #include "qpid/Modules.h" #include "qpid/Exception.h" #include "qpid/log/Statement.h" #include "qpid/sys/Shlib.h" #include #include namespace fs=boost::filesystem; namespace { // CMake sets QPID_MODULE_SUFFIX; Autoconf doesn't, so assume Linux .so #ifndef QPID_MODULE_SUFFIX #define QPID_MODULE_SUFFIX ".so" #endif inline std::string& suffix() { static std::string s(QPID_MODULE_SUFFIX); return s; } bool isShlibName(const std::string& name) { return name.find (suffix()) == name.length() - suffix().length(); } } namespace qpid { ModuleOptions::ModuleOptions(const std::string& defaultModuleDir) : qpid::Options("Module options"), loadDir(defaultModuleDir), noLoad(false) { addOptions() ("module-dir", optValue(loadDir, "DIR"), "Load all shareable modules in this directory") ("load-module", optValue(load, "FILE"), "Specifies additional module(s) to be loaded") ("no-module-dir", optValue(noLoad), "Don't load modules from module directory"); } void tryShlib(const char* libname_, bool noThrow) { std::string libname(libname_); if (!isShlibName(libname)) libname += suffix(); try { sys::Shlib shlib(libname); } catch (const std::exception& /*e*/) { if (!noThrow) throw; } } void loadModuleDir (std::string dirname, bool isDefault) { fs::path dirPath (dirname, fs::native); if (!fs::exists (dirPath)) { if (isDefault) return; throw Exception ("Directory not found: " + dirname); } if (!fs::is_directory(dirPath)) { throw Exception ("Invalid value for module-dir: " + dirname + " is not a directory"); } fs::directory_iterator endItr; for (fs::directory_iterator itr (dirPath); itr != endItr; ++itr) { if (!fs::is_directory(*itr) && isShlibName(itr->string())) tryShlib (itr->string().data(), true); } } } // namespace qpid qpidc-0.16/src/qpid/DisableExceptionLogging.h0000664000076400007640000000242511541711562021570 0ustar00jrossjross00000000000000#ifndef QPID_DISABLEEXCEPTIONLOGGING_H #define QPID_DISABLEEXCEPTIONLOGGING_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" namespace qpid { /** * Temporarily disable logging in qpid::Exception constructor. * Used by log::Logger to avoid logging exceptions during Logger construction. */ struct DisableExceptionLogging { QPID_COMMON_EXTERN DisableExceptionLogging(); QPID_COMMON_EXTERN ~DisableExceptionLogging(); }; } // namespace qpid #endif /*!QPID_DISABLEEXCEPTIONLOGGING_H*/ qpidc-0.16/src/qpid/client/0000775000076400007640000000000011752725716016153 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/client/TCPConnector.h0000664000076400007640000000706211567535070020626 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TCPConnector_ #define _TCPConnector_ #include "Connector.h" #include "qpid/client/Bounds.h" #include "qpid/framing/AMQFrame.h" #include "qpid/sys/AsynchIO.h" #include "qpid/sys/Codec.h" #include "qpid/sys/IntegerTypes.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/SecurityLayer.h" #include "qpid/sys/Socket.h" #include "qpid/sys/Thread.h" #include #include #include #include namespace qpid { namespace framing { class InitiationHandler; } namespace client { class TCPConnector : public Connector, public sys::Codec { typedef std::deque Frames; struct Buff; const uint16_t maxFrameSize; sys::Mutex lock; Frames frames; // Outgoing frame queue size_t lastEof; // Position after last EOF in frames uint64_t currentSize; Bounds* bounds; framing::ProtocolVersion version; bool initiated; bool closed; sys::ShutdownHandler* shutdownHandler; framing::InputHandler* input; framing::InitiationHandler* initialiser; framing::OutputHandler* output; sys::Socket socket; sys::AsynchConnector* connector; sys::AsynchIO* aio; std::string identifier; boost::shared_ptr poller; std::auto_ptr securityLayer; virtual void connected(const sys::Socket&); void writeDataBlock(const framing::AMQDataBlock& data); void close(); void send(framing::AMQFrame& frame); void abort(); void setInputHandler(framing::InputHandler* handler); void setShutdownHandler(sys::ShutdownHandler* handler); sys::ShutdownHandler* getShutdownHandler() const; framing::OutputHandler* getOutputHandler(); const std::string& getIdentifier() const; void activateSecurityLayer(std::auto_ptr); const qpid::sys::SecuritySettings* getSecuritySettings() { return 0; } size_t decode(const char* buffer, size_t size); size_t encode(const char* buffer, size_t size); bool canEncode(); protected: virtual ~TCPConnector(); void connect(const std::string& host, const std::string& port); void start(sys::AsynchIO* aio_); void initAmqp(); virtual void connectFailed(const std::string& msg); bool readbuff(qpid::sys::AsynchIO&, qpid::sys::AsynchIOBufferBase*); void writebuff(qpid::sys::AsynchIO&); void eof(qpid::sys::AsynchIO&); void disconnected(qpid::sys::AsynchIO&); void socketClosed(qpid::sys::AsynchIO&, const qpid::sys::Socket&); public: TCPConnector(boost::shared_ptr, framing::ProtocolVersion pVersion, const ConnectionSettings&, ConnectionImpl*); }; }} // namespace qpid::client #endif /* _TCPConnector_ */ qpidc-0.16/src/qpid/client/StateManager.h0000664000076400007640000000260511433445373020674 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _StateManager_ #define _StateManager_ #include #include "qpid/sys/Monitor.h" namespace qpid { namespace client { ///@internal class StateManager { int state; mutable sys::Monitor stateLock; public: StateManager(int initial); void setState(int state); bool setState(int state, int expected); int getState() const ; void waitForStateChange(int current); void waitFor(std::set states); void waitFor(int state); bool waitFor(std::set states, qpid::sys::Duration); bool waitFor(int state, qpid::sys::Duration); }; }} #endif qpidc-0.16/src/qpid/client/FutureResult.cpp0000664000076400007640000000240711227113407021314 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/FutureResult.h" #include "qpid/client/SessionImpl.h" using namespace qpid::client; using namespace qpid::framing; using namespace qpid::sys; const std::string& FutureResult::getResult(SessionImpl& session) const { waitForCompletion(); session.assertOpen(); return result; } void FutureResult::received(const std::string& r) { Monitor::ScopedLock l(lock); result = r; complete = true; lock.notifyAll(); } qpidc-0.16/src/qpid/client/CompletionImpl.h0000664000076400007640000000276611227113407021253 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_COMPLETIONIMPL_H #define QPID_CLIENT_COMPLETIONIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qpid/client/Future.h" #include namespace qpid { namespace client { ///@internal class CompletionImpl : public RefCounted { public: CompletionImpl() {} CompletionImpl(Future f, boost::shared_ptr s) : future(f), session(s) {} bool isComplete() { return future.isComplete(*session); } void wait() { future.wait(*session); } std::string getResult() { return future.getResult(*session); } protected: Future future; boost::shared_ptr session; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_COMPLETIONIMPL_H*/ qpidc-0.16/src/qpid/client/MessageReplayTracker.cpp0000664000076400007640000000441411332503600022713 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/MessageReplayTracker.h" #include namespace qpid { namespace client { MessageReplayTracker::MessageReplayTracker(uint f) : flushInterval(f), count(0) {} void MessageReplayTracker::send(const Message& message, const std::string& destination) { buffer.push_back(ReplayRecord(message, destination)); buffer.back().send(*this); if (flushInterval && (++count % flushInterval == 0)) { checkCompletion(); if (!buffer.empty()) session.flush(); } } void MessageReplayTracker::init(AsyncSession s) { session = s; } void MessageReplayTracker::replay(AsyncSession s) { session = s; std::for_each(buffer.begin(), buffer.end(), boost::bind(&ReplayRecord::send, _1, boost::ref(*this))); session.flush(); count = 0; } void MessageReplayTracker::setFlushInterval(uint f) { flushInterval = f; } uint MessageReplayTracker::getFlushInterval() { return flushInterval; } void MessageReplayTracker::checkCompletion() { buffer.remove_if(boost::bind(&ReplayRecord::isComplete, _1)); } MessageReplayTracker::ReplayRecord::ReplayRecord(const Message& m, const std::string& d) : message(m), destination(d) {} void MessageReplayTracker::ReplayRecord::send(MessageReplayTracker& tracker) { status = tracker.session.messageTransfer(arg::destination=destination, arg::content=message); } bool MessageReplayTracker::ReplayRecord::isComplete() { return status.isComplete(); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/Bounds.h0000664000076400007640000000253711022316300017534 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_BOUNDSCHECKING_H #define QPID_CLIENT_BOUNDSCHECKING_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Waitable.h" namespace qpid{ namespace client{ class Bounds { public: Bounds(size_t maxSize); bool expand(size_t, bool block); void reduce(size_t); size_t getCurrentSize(); void setException(const sys::ExceptionHolder&); private: friend std::ostream& operator<<(std::ostream&, const Bounds&); sys::Waitable lock; const size_t max; size_t current; }; std::ostream& operator<<(std::ostream&, const Bounds&); }} #endif qpidc-0.16/src/qpid/client/Connector.h0000664000076400007640000000516111567535070020255 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _Connector_ #define _Connector_ #include "qpid/framing/OutputHandler.h" #include "qpid/framing/ProtocolVersion.h" #include #include namespace qpid { namespace sys { class ShutdownHandler; class SecurityLayer; class Poller; struct SecuritySettings; } namespace framing { class InputHandler; class AMQFrame; } namespace client { struct ConnectionSettings; class ConnectionImpl; ///@internal class Connector : public framing::OutputHandler { public: // Protocol connector factory related stuff (it might be better to separate this code from the TCP Connector in the future) typedef Connector* Factory(boost::shared_ptr, framing::ProtocolVersion, const ConnectionSettings&, ConnectionImpl*); static Connector* create(const std::string& proto, boost::shared_ptr, framing::ProtocolVersion, const ConnectionSettings&, ConnectionImpl*); static void registerFactory(const std::string& proto, Factory* connectorFactory); virtual ~Connector() {}; virtual void connect(const std::string& host, const std::string& port) = 0; virtual void init() {}; virtual void close() = 0; virtual void send(framing::AMQFrame& frame) = 0; virtual void abort() = 0; virtual void setInputHandler(framing::InputHandler* handler) = 0; virtual void setShutdownHandler(sys::ShutdownHandler* handler) = 0; virtual sys::ShutdownHandler* getShutdownHandler() const = 0; virtual framing::OutputHandler* getOutputHandler() = 0; virtual const std::string& getIdentifier() const = 0; virtual void activateSecurityLayer(std::auto_ptr); virtual const qpid::sys::SecuritySettings* getSecuritySettings() = 0; }; }} #endif qpidc-0.16/src/qpid/client/Connector.cpp0000664000076400007640000000431711372266076020613 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Connector.h" #include "qpid/Url.h" #include "qpid/Exception.h" #include "qpid/log/Statement.h" #include "qpid/sys/SecurityLayer.h" #include namespace qpid { namespace client { using namespace qpid::sys; using namespace qpid::framing; namespace { typedef std::map ProtocolRegistry; ProtocolRegistry& theProtocolRegistry() { static ProtocolRegistry protocolRegistry; return protocolRegistry; } } Connector* Connector::create(const std::string& proto, boost::shared_ptr p, framing::ProtocolVersion v, const ConnectionSettings& s, ConnectionImpl* c) { ProtocolRegistry::const_iterator i = theProtocolRegistry().find(proto); if (i==theProtocolRegistry().end()) { throw Exception(QPID_MSG("Unknown protocol: " << proto)); } return (i->second)(p, v, s, c); } void Connector::registerFactory(const std::string& proto, Factory* connectorFactory) { ProtocolRegistry::const_iterator i = theProtocolRegistry().find(proto); if (i!=theProtocolRegistry().end()) { QPID_LOG(error, "Tried to register protocol: " << proto << " more than once"); } theProtocolRegistry()[proto] = connectorFactory; Url::addProtocol(proto); } void Connector::activateSecurityLayer(std::auto_ptr) { } }} // namespace qpid::client qpidc-0.16/src/qpid/client/no_keyword/0000775000076400007640000000000011752725715020332 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/client/no_keyword/AsyncSession_0_10.cpp0000664000076400007640000003104611752725677024211 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/client/AsyncSession_0_10.h" #include "qpid/framing/all_method_bodies.h" #include "qpid/client/SessionImpl.h" #include "qpid/client/MessageImpl.h" #include "qpid/client/PrivateImplRef.h" #include "qpid/client/CompletionImpl.h" #include namespace qpid { namespace client { namespace no_keyword { using namespace framing; Completion AsyncSession_0_10::executionSync(bool sync) { ExecutionSyncBody body(ProtocolVersion(0,10)); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::executionResult(const SequenceNumber& commandId, const std::string& value, bool sync) { ExecutionResultBody body(ProtocolVersion(0,10), commandId, value); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::executionException(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo, bool sync) { ExecutionExceptionBody body(ProtocolVersion(0,10), errorCode, commandId, classCode, commandCode, fieldIndex, description, errorInfo); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::messageTransfer(const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, const Message& content, bool sync) { MessageTransferBody body(ProtocolVersion(0,10), destination, acceptMode, acquireMode); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body, *MessageImpl::get(content)), impl)); } Completion AsyncSession_0_10::messageAccept(const SequenceSet& transfers, bool sync) { MessageAcceptBody body(ProtocolVersion(0,10), transfers); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::messageReject(const SequenceSet& transfers, uint16_t code, const std::string& text, bool sync) { MessageRejectBody body(ProtocolVersion(0,10), transfers, code, text); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::messageRelease(const SequenceSet& transfers, bool setRedelivered, bool sync) { MessageReleaseBody body(ProtocolVersion(0,10), transfers, setRedelivered); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::messageAcquire(const SequenceSet& transfers, bool sync) { MessageAcquireBody body(ProtocolVersion(0,10), transfers); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::messageResume(const std::string& destination, const std::string& resumeId, bool sync) { MessageResumeBody body(ProtocolVersion(0,10), destination, resumeId); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::messageSubscribe(const std::string& queue, const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const std::string& resumeId, uint64_t resumeTtl, const FieldTable& arguments, bool sync) { MessageSubscribeBody body(ProtocolVersion(0,10), queue, destination, acceptMode, acquireMode, exclusive, resumeId, resumeTtl, arguments); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::messageCancel(const std::string& destination, bool sync) { MessageCancelBody body(ProtocolVersion(0,10), destination); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::messageSetFlowMode(const std::string& destination, uint8_t flowMode, bool sync) { MessageSetFlowModeBody body(ProtocolVersion(0,10), destination, flowMode); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::messageFlow(const std::string& destination, uint8_t unit, uint32_t value, bool sync) { MessageFlowBody body(ProtocolVersion(0,10), destination, unit, value); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::messageFlush(const std::string& destination, bool sync) { MessageFlushBody body(ProtocolVersion(0,10), destination); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::messageStop(const std::string& destination, bool sync) { MessageStopBody body(ProtocolVersion(0,10), destination); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::txSelect(bool sync) { TxSelectBody body(ProtocolVersion(0,10)); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::txCommit(bool sync) { TxCommitBody body(ProtocolVersion(0,10)); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::txRollback(bool sync) { TxRollbackBody body(ProtocolVersion(0,10)); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::dtxSelect(bool sync) { DtxSelectBody body(ProtocolVersion(0,10)); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::dtxStart(const Xid& xid, bool join, bool resume, bool sync) { DtxStartBody body(ProtocolVersion(0,10), xid, join, resume); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::dtxEnd(const Xid& xid, bool fail, bool suspend, bool sync) { DtxEndBody body(ProtocolVersion(0,10), xid, fail, suspend); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::dtxCommit(const Xid& xid, bool onePhase, bool sync) { DtxCommitBody body(ProtocolVersion(0,10), xid, onePhase); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::dtxForget(const Xid& xid, bool sync) { DtxForgetBody body(ProtocolVersion(0,10), xid); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::dtxGetTimeout(const Xid& xid, bool sync) { DtxGetTimeoutBody body(ProtocolVersion(0,10), xid); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::dtxPrepare(const Xid& xid, bool sync) { DtxPrepareBody body(ProtocolVersion(0,10), xid); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::dtxRecover(bool sync) { DtxRecoverBody body(ProtocolVersion(0,10)); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::dtxRollback(const Xid& xid, bool sync) { DtxRollbackBody body(ProtocolVersion(0,10), xid); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::dtxSetTimeout(const Xid& xid, uint32_t timeout, bool sync) { DtxSetTimeoutBody body(ProtocolVersion(0,10), xid, timeout); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::exchangeDeclare(const std::string& exchange, const std::string& type, const std::string& alternateExchange, bool passive, bool durable, bool autoDelete, const FieldTable& arguments, bool sync) { ExchangeDeclareBody body(ProtocolVersion(0,10), exchange, type, alternateExchange, passive, durable, autoDelete, arguments); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::exchangeDelete(const std::string& exchange, bool ifUnused, bool sync) { ExchangeDeleteBody body(ProtocolVersion(0,10), exchange, ifUnused); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::exchangeQuery(const std::string& name, bool sync) { ExchangeQueryBody body(ProtocolVersion(0,10), name); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::exchangeBind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, const FieldTable& arguments, bool sync) { ExchangeBindBody body(ProtocolVersion(0,10), queue, exchange, bindingKey, arguments); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::exchangeUnbind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, bool sync) { ExchangeUnbindBody body(ProtocolVersion(0,10), queue, exchange, bindingKey); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::exchangeBound(const std::string& exchange, const std::string& queue, const std::string& bindingKey, const FieldTable& arguments, bool sync) { ExchangeBoundBody body(ProtocolVersion(0,10), exchange, queue, bindingKey, arguments); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::queueDeclare(const std::string& queue, const std::string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const FieldTable& arguments, bool sync) { QueueDeclareBody body(ProtocolVersion(0,10), queue, alternateExchange, passive, durable, exclusive, autoDelete, arguments); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::queueDelete(const std::string& queue, bool ifUnused, bool ifEmpty, bool sync) { QueueDeleteBody body(ProtocolVersion(0,10), queue, ifUnused, ifEmpty); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } Completion AsyncSession_0_10::queuePurge(const std::string& queue, bool sync) { QueuePurgeBody body(ProtocolVersion(0,10), queue); body.setSync(sync); return Completion(new CompletionImpl(impl->send(body), impl)); } TypedResult AsyncSession_0_10::queueQuery(const std::string& queue, bool sync) { QueueQueryBody body(ProtocolVersion(0,10), queue); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)); } AsyncSession_0_10::AsyncSession_0_10() {} AsyncSession_0_10::AsyncSession_0_10(const SessionBase_0_10& other) { *this = other; } AsyncSession_0_10& AsyncSession_0_10::operator=(const SessionBase_0_10& other) { impl = static_cast(other).impl; return *this; } }}} // namespace qpid::client::no_keyword qpidc-0.16/src/qpid/client/no_keyword/Session_0_10.cpp0000664000076400007640000003012011752725677023203 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/client/Session_0_10.h" #include "qpid/framing/all_method_bodies.h" #include "qpid/client/SessionImpl.h" #include "qpid/client/MessageImpl.h" #include "qpid/client/PrivateImplRef.h" #include "qpid/client/CompletionImpl.h" #include namespace qpid { namespace client { namespace no_keyword { using namespace framing; void Session_0_10::executionSync(bool sync) { ExecutionSyncBody body(ProtocolVersion(0,10)); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::executionResult(const SequenceNumber& commandId, const std::string& value, bool sync) { ExecutionResultBody body(ProtocolVersion(0,10), commandId, value); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::executionException(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo, bool sync) { ExecutionExceptionBody body(ProtocolVersion(0,10), errorCode, commandId, classCode, commandCode, fieldIndex, description, errorInfo); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::messageTransfer(const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, const Message& content, bool sync) { MessageTransferBody body(ProtocolVersion(0,10), destination, acceptMode, acquireMode); body.setSync(sync); Completion(new CompletionImpl(impl->send(body, *MessageImpl::get(content)), impl)).wait(); } void Session_0_10::messageAccept(const SequenceSet& transfers, bool sync) { MessageAcceptBody body(ProtocolVersion(0,10), transfers); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::messageReject(const SequenceSet& transfers, uint16_t code, const std::string& text, bool sync) { MessageRejectBody body(ProtocolVersion(0,10), transfers, code, text); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::messageRelease(const SequenceSet& transfers, bool setRedelivered, bool sync) { MessageReleaseBody body(ProtocolVersion(0,10), transfers, setRedelivered); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } qpid::framing::MessageAcquireResult Session_0_10::messageAcquire(const SequenceSet& transfers, bool sync) { MessageAcquireBody body(ProtocolVersion(0,10), transfers); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } qpid::framing::MessageResumeResult Session_0_10::messageResume(const std::string& destination, const std::string& resumeId, bool sync) { MessageResumeBody body(ProtocolVersion(0,10), destination, resumeId); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } void Session_0_10::messageSubscribe(const std::string& queue, const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const std::string& resumeId, uint64_t resumeTtl, const FieldTable& arguments, bool sync) { MessageSubscribeBody body(ProtocolVersion(0,10), queue, destination, acceptMode, acquireMode, exclusive, resumeId, resumeTtl, arguments); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::messageCancel(const std::string& destination, bool sync) { MessageCancelBody body(ProtocolVersion(0,10), destination); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::messageSetFlowMode(const std::string& destination, uint8_t flowMode, bool sync) { MessageSetFlowModeBody body(ProtocolVersion(0,10), destination, flowMode); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::messageFlow(const std::string& destination, uint8_t unit, uint32_t value, bool sync) { MessageFlowBody body(ProtocolVersion(0,10), destination, unit, value); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::messageFlush(const std::string& destination, bool sync) { MessageFlushBody body(ProtocolVersion(0,10), destination); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::messageStop(const std::string& destination, bool sync) { MessageStopBody body(ProtocolVersion(0,10), destination); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::txSelect(bool sync) { TxSelectBody body(ProtocolVersion(0,10)); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::txCommit(bool sync) { TxCommitBody body(ProtocolVersion(0,10)); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::txRollback(bool sync) { TxRollbackBody body(ProtocolVersion(0,10)); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::dtxSelect(bool sync) { DtxSelectBody body(ProtocolVersion(0,10)); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } qpid::framing::XaResult Session_0_10::dtxStart(const Xid& xid, bool join, bool resume, bool sync) { DtxStartBody body(ProtocolVersion(0,10), xid, join, resume); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } qpid::framing::XaResult Session_0_10::dtxEnd(const Xid& xid, bool fail, bool suspend, bool sync) { DtxEndBody body(ProtocolVersion(0,10), xid, fail, suspend); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } qpid::framing::XaResult Session_0_10::dtxCommit(const Xid& xid, bool onePhase, bool sync) { DtxCommitBody body(ProtocolVersion(0,10), xid, onePhase); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } void Session_0_10::dtxForget(const Xid& xid, bool sync) { DtxForgetBody body(ProtocolVersion(0,10), xid); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } qpid::framing::DtxGetTimeoutResult Session_0_10::dtxGetTimeout(const Xid& xid, bool sync) { DtxGetTimeoutBody body(ProtocolVersion(0,10), xid); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } qpid::framing::XaResult Session_0_10::dtxPrepare(const Xid& xid, bool sync) { DtxPrepareBody body(ProtocolVersion(0,10), xid); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } qpid::framing::DtxRecoverResult Session_0_10::dtxRecover(bool sync) { DtxRecoverBody body(ProtocolVersion(0,10)); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } qpid::framing::XaResult Session_0_10::dtxRollback(const Xid& xid, bool sync) { DtxRollbackBody body(ProtocolVersion(0,10), xid); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } void Session_0_10::dtxSetTimeout(const Xid& xid, uint32_t timeout, bool sync) { DtxSetTimeoutBody body(ProtocolVersion(0,10), xid, timeout); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::exchangeDeclare(const std::string& exchange, const std::string& type, const std::string& alternateExchange, bool passive, bool durable, bool autoDelete, const FieldTable& arguments, bool sync) { ExchangeDeclareBody body(ProtocolVersion(0,10), exchange, type, alternateExchange, passive, durable, autoDelete, arguments); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::exchangeDelete(const std::string& exchange, bool ifUnused, bool sync) { ExchangeDeleteBody body(ProtocolVersion(0,10), exchange, ifUnused); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } qpid::framing::ExchangeQueryResult Session_0_10::exchangeQuery(const std::string& name, bool sync) { ExchangeQueryBody body(ProtocolVersion(0,10), name); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } void Session_0_10::exchangeBind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, const FieldTable& arguments, bool sync) { ExchangeBindBody body(ProtocolVersion(0,10), queue, exchange, bindingKey, arguments); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::exchangeUnbind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, bool sync) { ExchangeUnbindBody body(ProtocolVersion(0,10), queue, exchange, bindingKey); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } qpid::framing::ExchangeBoundResult Session_0_10::exchangeBound(const std::string& exchange, const std::string& queue, const std::string& bindingKey, const FieldTable& arguments, bool sync) { ExchangeBoundBody body(ProtocolVersion(0,10), exchange, queue, bindingKey, arguments); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } void Session_0_10::queueDeclare(const std::string& queue, const std::string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const FieldTable& arguments, bool sync) { QueueDeclareBody body(ProtocolVersion(0,10), queue, alternateExchange, passive, durable, exclusive, autoDelete, arguments); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::queueDelete(const std::string& queue, bool ifUnused, bool ifEmpty, bool sync) { QueueDeleteBody body(ProtocolVersion(0,10), queue, ifUnused, ifEmpty); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } void Session_0_10::queuePurge(const std::string& queue, bool sync) { QueuePurgeBody body(ProtocolVersion(0,10), queue); body.setSync(sync); Completion(new CompletionImpl(impl->send(body), impl)).wait(); } qpid::framing::QueueQueryResult Session_0_10::queueQuery(const std::string& queue, bool sync) { QueueQueryBody body(ProtocolVersion(0,10), queue); body.setSync(sync); return TypedResult(new CompletionImpl(impl->send(body), impl)).get(); } Session_0_10::Session_0_10() {} Session_0_10::Session_0_10(const SessionBase_0_10& other) { *this = other; } Session_0_10& Session_0_10::operator=(const SessionBase_0_10& other) { impl = static_cast(other).impl; return *this; } }}} // namespace qpid::client::no_keyword qpidc-0.16/src/qpid/client/SessionImpl.h0000664000076400007640000002040411704073172020556 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _SessionImpl_ #define _SessionImpl_ #include "qpid/client/Demux.h" #include "qpid/client/Execution.h" #include "qpid/client/Results.h" #include "qpid/client/ClientImportExport.h" #include "qpid/SessionId.h" #include "qpid/SessionState.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/ChannelHandler.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/AMQP_ClientOperations.h" #include "qpid/framing/AMQP_ServerProxy.h" #include "qpid/sys/Semaphore.h" #include "qpid/sys/StateMonitor.h" #include "qpid/sys/ExceptionHolder.h" #include #include #include namespace qpid { namespace framing { class FrameSet; class MethodContent; class SequenceSet; } namespace client { class Future; class ConnectionImpl; class SessionHandler; ///@internal class SessionImpl : public framing::FrameHandler::InOutHandler, public Execution, private framing::AMQP_ClientOperations::SessionHandler, private framing::AMQP_ClientOperations::ExecutionHandler { public: SessionImpl(const std::string& name, boost::shared_ptr); ~SessionImpl(); //NOTE: Public functions called in user thread. framing::FrameSet::shared_ptr get(); const SessionId getId() const; uint16_t getChannel() const; void setChannel(uint16_t channel); void open(uint32_t detachedLifetime); void close(); void resume(boost::shared_ptr); void suspend(); QPID_CLIENT_EXTERN void assertOpen() const; QPID_CLIENT_EXTERN bool hasError() const; Future send(const framing::AMQBody& command); Future send(const framing::AMQBody& command, const framing::MethodContent& content); /** * This method takes the content as a FrameSet; if reframe=false, * the caller is resposnible for ensuring that the header and * content frames in that set are correct for this connection * (right flags, right fragmentation etc). If reframe=true, then * the header and content from the frameset will be copied and * reframed correctly for the connection. */ QPID_CLIENT_EXTERN Future send(const framing::AMQBody& command, const framing::FrameSet& content, bool reframe=false); void sendRawFrame(framing::AMQFrame& frame); Demux& getDemux(); void markCompleted(const framing::SequenceNumber& id, bool cumulative, bool notifyPeer); void markCompleted(const framing::SequenceSet& ids, bool notifyPeer); bool isComplete(const framing::SequenceNumber& id); bool isCompleteUpTo(const framing::SequenceNumber& id); framing::SequenceNumber getCompleteUpTo(); void waitForCompletion(const framing::SequenceNumber& id); void sendCompletion(); void sendFlush(); void setException(const sys::ExceptionHolder&); //NOTE: these are called by the network thread when the connection is closed or dies void connectionClosed(uint16_t code, const std::string& text); void connectionBroke(const std::string& text); /** Set timeout in seconds, returns actual timeout allowed by broker */ uint32_t setTimeout(uint32_t requestedSeconds); /** Get timeout in seconds. */ uint32_t getTimeout() const; /** * get the Connection associated with this connection */ boost::shared_ptr getConnection(); void setDoClearDeliveryPropertiesExchange(bool b=true) { doClearDeliveryPropertiesExchange = b; } /** Suppress sending detach in destructor. Used by cluster to build session state */ void disableAutoDetach(); private: enum State { INACTIVE, ATTACHING, ATTACHED, DETACHING, DETACHED }; typedef framing::AMQP_ClientOperations::SessionHandler SessionHandler; typedef framing::AMQP_ClientOperations::ExecutionHandler ExecutionHandler; typedef sys::StateMonitor StateMonitor; typedef StateMonitor::Set States; inline void setState(State s); inline void waitFor(State); void setExceptionLH(const sys::ExceptionHolder&); // LH = lock held when called. void detach(); void check() const; void checkOpen() const; void handleClosed(); void handleIn(framing::AMQFrame& frame); void handleOut(framing::AMQFrame& frame); /** * Sends session controls. This case is treated slightly * differently than command frames sent by the application via * handleOut(); session controlsare not subject to bounds checking * on the outgoing frame queue. */ void proxyOut(framing::AMQFrame& frame); void sendFrame(framing::AMQFrame& frame, bool canBlock); void deliver(framing::AMQFrame& frame); Future sendCommand(const framing::AMQBody&, const framing::MethodContent* = 0); void sendContent(const framing::MethodContent&); void waitForCompletionImpl(const framing::SequenceNumber& id); void sendCompletionImpl(); // Note: Following methods are called by network thread in // response to session controls from the broker void attach(const std::string& name, bool force); void attached(const std::string& name); void detach(const std::string& name); void detached(const std::string& name, uint8_t detachCode); void requestTimeout(uint32_t timeout); void timeout(uint32_t timeout); void commandPoint(const framing::SequenceNumber& commandId, uint64_t commandOffset); void expected(const framing::SequenceSet& commands, const framing::Array& fragments); void confirmed(const framing::SequenceSet& commands, const framing::Array& fragments); void completed(const framing::SequenceSet& commands, bool timelyReply); void knownCompleted(const framing::SequenceSet& commands); void flush(bool expected, bool confirmed, bool completed); void gap(const framing::SequenceSet& commands); // Note: Following methods are called by network thread in // response to execution commands from the broker void sync(); void result(const framing::SequenceNumber& commandId, const std::string& value); void exception(uint16_t errorCode, const framing::SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const framing::FieldTable& errorInfo); sys::ExceptionHolder exceptionHolder; mutable StateMonitor state; mutable sys::Semaphore sendLock; uint32_t detachedLifetime; const uint64_t maxFrameSize; const SessionId id; boost::shared_ptr connection; framing::FrameHandler::MemFunRef ioHandler; framing::ChannelHandler channel; framing::AMQP_ServerProxy::Session proxy; Results results; Demux demux; framing::FrameSet::shared_ptr arriving; framing::SequenceSet incompleteIn;//incoming commands that are as yet incomplete framing::SequenceSet completedIn;//incoming commands that are have completed framing::SequenceSet incompleteOut;//outgoing commands not yet known to be complete framing::SequenceSet completedOut;//outgoing commands that we know to be completed framing::SequenceNumber nextIn; framing::SequenceNumber nextOut; SessionState sessionState; bool doClearDeliveryPropertiesExchange; bool autoDetach; friend class client::SessionHandler; }; }} // namespace qpid::client #endif qpidc-0.16/src/qpid/client/Dispatcher.cpp0000664000076400007640000001075511252002726020735 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Dispatcher.h" #include "qpid/client/SubscriptionImpl.h" #include "qpid/client/SessionImpl.h" #include "qpid/framing/FrameSet.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/log/Statement.h" #include "qpid/sys/BlockingQueue.h" #include "qpid/client/Message.h" #include "qpid/client/MessageImpl.h" #include #if (BOOST_VERSION >= 104000) # include using boost::serialization::state_saver; #else # include using boost::state_saver; #endif /* BOOST_VERSION */ using qpid::framing::FrameSet; using qpid::framing::MessageTransferBody; using qpid::sys::Mutex; using qpid::sys::ScopedLock; using qpid::sys::Thread; namespace qpid { namespace client { Dispatcher::Dispatcher(const Session& s, const std::string& q) : session(s), running(false), autoStop(true), failoverHandler(0) { Demux& demux = SessionBase_0_10Access(session).get()->getDemux(); queue = q.empty() ? demux.getDefault() : demux.get(q); } void Dispatcher::start() { worker = Thread(this); } void Dispatcher::wait() { worker.join(); } void Dispatcher::run() { Mutex::ScopedLock l(lock); if (running) throw Exception("Dispatcher is already running."); state_saver reset(running); // Reset to false on exit. running = true; try { while (!queue->isClosed()) { Mutex::ScopedUnlock u(lock); FrameSet::shared_ptr content = queue->pop(); if (content->isA()) { Message msg(new MessageImpl(*content)); boost::intrusive_ptr listener = find(msg.getDestination()); if (!listener) { QPID_LOG(error, "No listener found for destination " << msg.getDestination()); } else { assert(listener); listener->received(msg); } } else { if (handler.get()) { handler->handle(*content); } else { QPID_LOG(warning, "No handler found for " << *(content->getMethod())); } } } session.sync(); // Make sure all our acks are received before returning. } catch (const ClosedException&) { QPID_LOG(debug, QPID_MSG(session.getId() << ": closed by peer")); } catch (const TransportFailure&) { QPID_LOG(info, QPID_MSG(session.getId() << ": transport failure")); throw; } catch (const std::exception& e) { if ( failoverHandler ) { QPID_LOG(debug, QPID_MSG(session.getId() << " failover: " << e.what())); failoverHandler(); } else { QPID_LOG(error, session.getId() << " error: " << e.what()); throw; } } } void Dispatcher::stop() { ScopedLock l(lock); queue->close(); // Will interrupt thread blocked in pop() } void Dispatcher::setAutoStop(bool b) { ScopedLock l(lock); autoStop = b; } boost::intrusive_ptr Dispatcher::find(const std::string& name) { ScopedLock l(lock); Listeners::iterator i = listeners.find(name); if (i == listeners.end()) { return defaultListener; } return i->second; } void Dispatcher::listen(const boost::intrusive_ptr& subscription) { ScopedLock l(lock); listeners[subscription->getName()] = subscription; } void Dispatcher::cancel(const std::string& destination) { ScopedLock l(lock); if (listeners.erase(destination) && running && autoStop && listeners.empty()) queue->close(); } }} qpidc-0.16/src/qpid/client/SubscriptionManager.cpp0000664000076400007640000000770411365262051022632 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/SubscriptionManager.h" #include "qpid/client/SubscriptionManagerImpl.h" #include "qpid/client/PrivateImplRef.h" namespace qpid { namespace client { typedef PrivateImplRef PI; SubscriptionManager::SubscriptionManager(const Session& s) { PI::ctor(*this, new SubscriptionManagerImpl(s)); } SubscriptionManager::SubscriptionManager(SubscriptionManagerImpl* i) { PI::ctor(*this, i); } SubscriptionManager::SubscriptionManager(const SubscriptionManager& x) : Runnable(), Handle() { PI::copy(*this, x); } SubscriptionManager::~SubscriptionManager() { PI::dtor(*this); } SubscriptionManager& SubscriptionManager::operator=(const SubscriptionManager& x) { return PI::assign(*this, x); } Subscription SubscriptionManager::subscribe( MessageListener& listener, const std::string& q, const SubscriptionSettings& ss, const std::string& n) { return impl->subscribe(listener, q, ss, n); } Subscription SubscriptionManager::subscribe( LocalQueue& lq, const std::string& q, const SubscriptionSettings& ss, const std::string& n) { return impl->subscribe(lq, q, ss, n); } Subscription SubscriptionManager::subscribe( MessageListener& listener, const std::string& q, const std::string& n) { return impl->subscribe(listener, q, n); } Subscription SubscriptionManager::subscribe( LocalQueue& lq, const std::string& q, const std::string& n) { return impl->subscribe(lq, q, n); } void SubscriptionManager::cancel(const std::string& dest) { return impl->cancel(dest); } void SubscriptionManager::setAutoStop(bool set) { impl->setAutoStop(set); } void SubscriptionManager::run() { impl->run(); } void SubscriptionManager::start() { impl->start(); } void SubscriptionManager::wait() { impl->wait(); } void SubscriptionManager::stop() { impl->stop(); } bool SubscriptionManager::get(Message& result, const std::string& queue, sys::Duration timeout) { return impl->get(result, queue, timeout); } Message SubscriptionManager::get(const std::string& queue, sys::Duration timeout) { return impl->get(queue, timeout); } Session SubscriptionManager::getSession() const { return impl->getSession(); } Subscription SubscriptionManager::getSubscription(const std::string& name) const { return impl->getSubscription(name); } void SubscriptionManager::registerFailoverHandler (boost::function fh) { impl->registerFailoverHandler(fh); } void SubscriptionManager::setFlowControl(const std::string& name, const FlowControl& flow) { impl->setFlowControl(name, flow); } void SubscriptionManager::setDefaultSettings(const SubscriptionSettings& s){ impl->setDefaultSettings(s); } void SubscriptionManager::setFlowControl(const std::string& name, uint32_t messages, uint32_t bytes, bool window) { impl->setFlowControl(name, FlowControl(messages, bytes, window)); } void SubscriptionManager::setFlowControl(uint32_t messages, uint32_t bytes, bool window) { impl->setFlowControl(messages, bytes, window); } void SubscriptionManager::setAcceptMode(AcceptMode mode) { impl->setAcceptMode(mode); } void SubscriptionManager::setAcquireMode(AcquireMode mode) { impl->setAcquireMode(mode); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/LoadPlugins.cpp0000664000076400007640000000342211365661451021074 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "LoadPlugins.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "qpid/Modules.h" #include "qpid/sys/Shlib.h" #include #include using std::vector; using std::string; namespace qpid { namespace client { namespace { struct LoadtimeInitialise { LoadtimeInitialise() { qpid::ModuleOptions moduleOptions(QPIDC_MODULE_DIR); string defaultPath (moduleOptions.loadDir); moduleOptions.parse (0, 0, QPIDC_CONF_FILE, true); for (vector::iterator iter = moduleOptions.load.begin(); iter != moduleOptions.load.end(); iter++) qpid::tryShlib (iter->data(), false); if (!moduleOptions.noLoad) { bool isDefault = defaultPath == moduleOptions.loadDir; qpid::loadModuleDir (moduleOptions.loadDir, isDefault); } } }; } // namespace void theModuleLoader() { static LoadtimeInitialise l; } }} // namespace qpid::client qpidc-0.16/src/qpid/client/StateManager.cpp0000664000076400007640000000473211433445373021232 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/StateManager.h" #include "qpid/framing/amqp_framing.h" using namespace qpid::client; using namespace qpid::framing; using namespace qpid::sys; StateManager::StateManager(int s) : state(s) {} void StateManager::waitForStateChange(int current) { Monitor::ScopedLock l(stateLock); while (state == current) { stateLock.wait(); } } void StateManager::waitFor(int desired) { Monitor::ScopedLock l(stateLock); while (state != desired) { stateLock.wait(); } } void StateManager::waitFor(std::set desired) { Monitor::ScopedLock l(stateLock); while (desired.find(state) == desired.end()) { stateLock.wait(); } } bool StateManager::waitFor(int desired, qpid::sys::Duration timeout) { AbsTime end(now(), timeout); Monitor::ScopedLock l(stateLock); while (state != desired && now() < end) { stateLock.wait(end); } return state == desired; } bool StateManager::waitFor(std::set desired, qpid::sys::Duration timeout) { AbsTime end(now(), timeout); Monitor::ScopedLock l(stateLock); while (desired.find(state) == desired.end() && now() < end) { stateLock.wait(end); } return desired.find(state) != desired.end(); } void StateManager::setState(int s) { Monitor::ScopedLock l(stateLock); state = s; stateLock.notifyAll(); } bool StateManager::setState(int s, int expected) { Monitor::ScopedLock l(stateLock); if (state == expected) { state = s; stateLock.notifyAll(); return true; } else { return false; } } int StateManager::getState() const { Monitor::ScopedLock l(stateLock); return state; } qpidc-0.16/src/qpid/client/Message.cpp0000664000076400007640000000522311227113407020226 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Message.h" #include "qpid/client/MessageImpl.h" namespace qpid { namespace client { Message::Message(MessageImpl* mi) : impl(mi) {} Message::Message(const std::string& data, const std::string& routingKey) : impl(new MessageImpl(data, routingKey)) {} Message::Message(const Message& m) : impl(new MessageImpl(*m.impl)) {} Message::~Message() { delete impl; } Message& Message::operator=(const Message& m) { *impl = *m.impl; return *this; } void Message::swap(Message& m) { std::swap(impl, m.impl); } std::string Message::getDestination() const { return impl->getDestination(); } bool Message::isRedelivered() const { return impl->isRedelivered(); } void Message::setRedelivered(bool redelivered) { impl->setRedelivered(redelivered); } framing::FieldTable& Message::getHeaders() { return impl->getHeaders(); } const framing::FieldTable& Message::getHeaders() const { return impl->getHeaders(); } const framing::SequenceNumber& Message::getId() const { return impl->getId(); } void Message::setData(const std::string& s) { impl->setData(s); } const std::string& Message::getData() const { return impl->getData(); } std::string& Message::getData() { return impl->getData(); } void Message::appendData(const std::string& s) { impl->appendData(s); } bool Message::hasMessageProperties() const { return impl->hasMessageProperties(); } framing::MessageProperties& Message::getMessageProperties() { return impl->getMessageProperties(); } const framing::MessageProperties& Message::getMessageProperties() const { return impl->getMessageProperties(); } bool Message::hasDeliveryProperties() const { return impl->hasDeliveryProperties(); } framing::DeliveryProperties& Message::getDeliveryProperties() { return impl->getDeliveryProperties(); } const framing::DeliveryProperties& Message::getDeliveryProperties() const { return impl->getDeliveryProperties(); } }} qpidc-0.16/src/qpid/client/Completion.cpp0000664000076400007640000000274311227113407020757 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Completion.h" #include "qpid/client/CompletionImpl.h" #include "qpid/client/PrivateImplRef.h" namespace qpid { namespace client { typedef PrivateImplRef PI; Completion::Completion(CompletionImpl* p) { PI::ctor(*this, p); } Completion::Completion(const Completion& c) : Handle() { PI::copy(*this, c); } Completion::~Completion() { PI::dtor(*this); } Completion& Completion::operator=(const Completion& c) { return PI::assign(*this, c); } void Completion::wait() { impl->wait(); } bool Completion::isComplete() { return impl->isComplete(); } std::string Completion::getResult() { return impl->getResult(); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/Connection.cpp0000664000076400007640000001053511723446736020762 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Connection.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/client/Message.h" #include "qpid/client/SessionImpl.h" #include "qpid/client/SessionBase_0_10Access.h" #include "qpid/Url.h" #include "qpid/log/Logger.h" #include "qpid/log/Options.h" #include "qpid/log/Statement.h" #include "qpid/framing/AMQP_HighestVersion.h" #include #include #include #include #include #include #include using namespace qpid::framing; using namespace qpid::sys; namespace qpid { namespace client { Connection::Connection() : version(framing::highestProtocolVersion) { ConnectionImpl::init(); } Connection::~Connection() {} void Connection::open( const Url& url, const std::string& uid, const std::string& pwd, const std::string& vhost, uint16_t maxFrameSize) { ConnectionSettings settings; settings.username = uid; settings.password = pwd; settings.virtualhost = vhost; settings.maxFrameSize = maxFrameSize; open(url, settings); } void Connection::open(const Url& url, const ConnectionSettings& settings) { if (url.empty()) throw Exception(QPID_MSG("Attempt to open URL with no addresses.")); Url::const_iterator i = url.begin(); do { const Address& addr = *i; i++; try { ConnectionSettings cs(settings); if (addr.protocol.size()) cs.protocol = addr.protocol; cs.host = addr.host; cs.port = addr.port; open(cs); break; } catch (const Exception& /*e*/) { if (i == url.end()) throw; } } while (i != url.end()); } void Connection::open( const std::string& host, int port, const std::string& uid, const std::string& pwd, const std::string& vhost, uint16_t maxFrameSize) { ConnectionSettings settings; settings.host = host; settings.port = port; settings.username = uid; settings.password = pwd; settings.virtualhost = vhost; settings.maxFrameSize = maxFrameSize; open(settings); } bool Connection::isOpen() const { return impl && impl->isOpen(); } void Connection::registerFailureCallback ( boost::function fn ) { failureCallback = fn; if ( impl ) impl->registerFailureCallback ( fn ); } void Connection::open(const ConnectionSettings& settings) { if (isOpen()) throw Exception(QPID_MSG("Connection::open() was already called")); impl = ConnectionImpl::create(version, settings); impl->open(); if ( failureCallback ) impl->registerFailureCallback ( failureCallback ); } const ConnectionSettings& Connection::getNegotiatedSettings() { if (!isOpen()) throw Exception(QPID_MSG("Connection is not open.")); return impl->getNegotiatedSettings(); } Session Connection::newSession(const std::string& name, uint32_t timeout) { if (!isOpen()) throw Exception(QPID_MSG("Connection has not yet been opened")); Session s; SessionBase_0_10Access(s).set(impl->newSession(name, timeout)); return s; } void Connection::resume(Session& session) { if (!isOpen()) throw Exception(QPID_MSG("Connection is not open.")); impl->addSession(session.impl); session.impl->resume(impl); } void Connection::close() { if ( impl ) impl->close(); } std::vector Connection::getInitialBrokers() { return impl ? impl->getInitialBrokers() : std::vector(); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/Demux.h0000664000076400007640000000532111243350572017374 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "qpid/framing/FrameSet.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/BlockingQueue.h" #include "qpid/client/ClientImportExport.h" #ifndef _Demux_ #define _Demux_ namespace qpid { namespace client { ///@internal class ByTransferDest { const std::string dest; public: ByTransferDest(const std::string& dest); bool operator()(const framing::FrameSet& frameset) const; }; ///@internal class Demux { public: typedef boost::function Condition; typedef sys::BlockingQueue Queue; typedef boost::shared_ptr QueuePtr; QPID_CLIENT_EXTERN Demux(); QPID_CLIENT_EXTERN ~Demux(); QPID_CLIENT_EXTERN void handle(framing::FrameSet::shared_ptr); QPID_CLIENT_EXTERN void close(const sys::ExceptionHolder& ex); QPID_CLIENT_EXTERN void open(); QPID_CLIENT_EXTERN QueuePtr add(const std::string& name, Condition); QPID_CLIENT_EXTERN void remove(const std::string& name); QPID_CLIENT_EXTERN QueuePtr get(const std::string& name); QPID_CLIENT_EXTERN QueuePtr getDefault(); private: struct Record { const std::string name; Condition condition; QueuePtr queue; Record(const std::string& n, Condition c) : name(n), condition(c), queue(new Queue()) {} }; sys::Mutex lock; std::list records; QueuePtr defaultQueue; typedef std::list::iterator iterator; struct Find { const std::string name; Find(const std::string& name); bool operator()(const Record& record) const; }; }; class ScopedDivert { const std::string dest; Demux& demuxer; Demux::QueuePtr queue; public: ScopedDivert(const std::string& dest, Demux& demuxer); ~ScopedDivert(); Demux::QueuePtr getQueue(); }; }} // namespace qpid::client #endif qpidc-0.16/src/qpid/client/ConnectionHandler.cpp0000664000076400007640000002775511645230314022256 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ConnectionHandler.h" #include "qpid/SaslFactory.h" #include "qpid/StringUtils.h" #include "qpid/client/Bounds.h" #include "qpid/framing/amqp_framing.h" #include "qpid/framing/all_method_bodies.h" #include "qpid/framing/ClientInvoker.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Helpers.h" #include "qpid/log/Statement.h" #include "qpid/sys/SystemInfo.h" using namespace qpid::client; using namespace qpid::framing; using namespace qpid::framing::connection; using qpid::sys::SecurityLayer; using qpid::sys::Duration; using qpid::sys::TimerTask; using qpid::sys::Timer; using qpid::sys::AbsTime; using qpid::sys::TIME_SEC; using qpid::sys::ScopedLock; using qpid::sys::Mutex; namespace { const std::string OK("OK"); const std::string PLAIN("PLAIN"); const std::string en_US("en_US"); const std::string INVALID_STATE_START("start received in invalid state"); const std::string INVALID_STATE_TUNE("tune received in invalid state"); const std::string INVALID_STATE_OPEN_OK("open-ok received in invalid state"); const std::string INVALID_STATE_CLOSE_OK("close-ok received in invalid state"); const std::string SESSION_FLOW_CONTROL("qpid.session_flow"); const std::string CLIENT_PROCESS_NAME("qpid.client_process"); const std::string CLIENT_PID("qpid.client_pid"); const std::string CLIENT_PPID("qpid.client_ppid"); const int SESSION_FLOW_CONTROL_VER = 1; } CloseCode ConnectionHandler::convert(uint16_t replyCode) { switch (replyCode) { case 200: return CLOSE_CODE_NORMAL; case 320: return CLOSE_CODE_CONNECTION_FORCED; case 402: return CLOSE_CODE_INVALID_PATH; case 501: default: return CLOSE_CODE_FRAMING_ERROR; } } ConnectionHandler::Adapter::Adapter(ConnectionHandler& h, Bounds& b) : handler(h), bounds(b) {} void ConnectionHandler::Adapter::handle(qpid::framing::AMQFrame& f) { bounds.expand(f.encodedSize(), false); handler.out(f); } ConnectionHandler::ConnectionHandler(const ConnectionSettings& s, ProtocolVersion& v, Bounds& b) : StateManager(NOT_STARTED), ConnectionSettings(s), outHandler(*this, b), proxy(outHandler), errorCode(CLOSE_CODE_NORMAL), version(v) { insist = true; ESTABLISHED.insert(FAILED); ESTABLISHED.insert(CLOSED); ESTABLISHED.insert(OPEN); FINISHED.insert(FAILED); FINISHED.insert(CLOSED); properties.setInt(SESSION_FLOW_CONTROL, SESSION_FLOW_CONTROL_VER); properties.setString(CLIENT_PROCESS_NAME, sys::SystemInfo::getProcessName()); properties.setInt(CLIENT_PID, sys::SystemInfo::getProcessId()); properties.setInt(CLIENT_PPID, sys::SystemInfo::getParentProcessId()); } void ConnectionHandler::incoming(AMQFrame& frame) { if (getState() == CLOSED) { throw Exception("Received frame on closed connection"); } if (rcvTimeoutTask) { // Received frame on connection so delay timeout rcvTimeoutTask->restart(); } AMQBody* body = frame.getBody(); try { if (frame.getChannel() != 0 || !invoke(static_cast(*this), *body)) { switch(getState()) { case OPEN: in(frame); break; case CLOSING: QPID_LOG(warning, "Ignoring frame while closing connection: " << frame); break; default: throw Exception("Cannot receive frames on non-zero channel until connection is established."); } } }catch(std::exception& e){ QPID_LOG(warning, "Closing connection due to " << e.what()); setState(CLOSING); errorCode = CLOSE_CODE_FRAMING_ERROR; errorText = e.what(); proxy.close(501, e.what()); } } void ConnectionHandler::outgoing(AMQFrame& frame) { if (getState() == OPEN) out(frame); else throw TransportFailure(errorText.empty() ? "Connection is not open." : errorText); } void ConnectionHandler::waitForOpen() { waitFor(ESTABLISHED); if (getState() == FAILED) { throw TransportFailure(errorText); } else if (getState() == CLOSED) { throw ConnectionException(errorCode, errorText); } } void ConnectionHandler::close() { switch (getState()) { case NEGOTIATING: case OPENING: fail("Connection closed before it was established"); break; case OPEN: if (setState(CLOSING, OPEN)) { proxy.close(200, OK); if (ConnectionSettings::heartbeat) { //heartbeat timer is turned off at this stage, so don't wait indefinately if (!waitFor(FINISHED, qpid::sys::Duration(ConnectionSettings::heartbeat * qpid::sys::TIME_SEC))) { QPID_LOG(warning, "Connection close timed out"); } } else { waitFor(FINISHED);//FINISHED = CLOSED or FAILED } } //else, state was changed from open after we checked, can only //change to failed or closed, so nothing to do break; // Nothing to do if already CLOSING, CLOSED, FAILED or if NOT_STARTED } } void ConnectionHandler::heartbeat() { // Do nothing - the purpose of heartbeats is just to make sure that there is some // traffic on the connection within the heart beat interval, we check for the // traffic and don't need to do anything in response to heartbeats // Although the above is still true we're now using a received heartbeat as a trigger // to send out our own heartbeat proxy.heartbeat(); } void ConnectionHandler::checkState(STATES s, const std::string& msg) { if (getState() != s) { throw CommandInvalidException(msg); } } void ConnectionHandler::fail(const std::string& message) { errorCode = CLOSE_CODE_FRAMING_ERROR; errorText = message; QPID_LOG(warning, message); setState(FAILED); } namespace { std::string SPACE(" "); std::string join(const std::vector& in) { std::string result; for (std::vector::const_iterator i = in.begin(); i != in.end(); ++i) { if (result.size()) result += SPACE; result += *i; } return result; } void intersection(const std::vector& a, const std::vector& b, std::vector& results) { for (std::vector::const_iterator i = a.begin(); i != a.end(); ++i) { if (std::find(b.begin(), b.end(), *i) != b.end()) results.push_back(*i); } } } void ConnectionHandler::start(const FieldTable& /*serverProps*/, const Array& mechanisms, const Array& /*locales*/) { checkState(NOT_STARTED, INVALID_STATE_START); setState(NEGOTIATING); sasl = SaslFactory::getInstance().create( username, password, service, host, minSsf, maxSsf ); std::vector mechlist; if (mechanism.empty()) { //mechlist is simply what the server offers mechanisms.collect(mechlist); } else { //mechlist is the intersection of those indicated by user and //those supported by server, in the order listed by user std::vector allowed = split(mechanism, " "); std::vector supported; mechanisms.collect(supported); intersection(allowed, supported, mechlist); if (mechlist.empty()) { throw Exception(QPID_MSG("Desired mechanism(s) not valid: " << mechanism << " (supported: " << join(supported) << ")")); } } if (sasl.get()) { string response; if (sasl->start(join(mechlist), response, getSecuritySettings ? getSecuritySettings() : 0)) { proxy.startOk(properties, sasl->getMechanism(), response, locale); } else { //response was null ConnectionStartOkBody body; body.setClientProperties(properties); body.setMechanism(sasl->getMechanism()); //Don't set response, as none was given body.setLocale(locale); proxy.send(body); } } else { //TODO: verify that desired mechanism and locale are supported string response = ((char)0) + username + ((char)0) + password; proxy.startOk(properties, mechanism, response, locale); } } void ConnectionHandler::secure(const std::string& challenge) { if (sasl.get()) { string response = sasl->step(challenge); proxy.secureOk(response); } else { throw NotImplementedException("Challenge-response cycle not yet implemented in client"); } } void ConnectionHandler::tune(uint16_t maxChannelsProposed, uint16_t maxFrameSizeProposed, uint16_t heartbeatMin, uint16_t heartbeatMax) { checkState(NEGOTIATING, INVALID_STATE_TUNE); maxChannels = std::min(maxChannels, maxChannelsProposed); maxFrameSize = std::min(maxFrameSize, maxFrameSizeProposed); // Clip the requested heartbeat to the maximum/minimum offered uint16_t heartbeat = ConnectionSettings::heartbeat; heartbeat = heartbeat < heartbeatMin ? heartbeatMin : heartbeat > heartbeatMax ? heartbeatMax : heartbeat; ConnectionSettings::heartbeat = heartbeat; proxy.tuneOk(maxChannels, maxFrameSize, heartbeat); setState(OPENING); proxy.open(virtualhost, capabilities, insist); } void ConnectionHandler::openOk ( const Array& knownBrokers ) { checkState(OPENING, INVALID_STATE_OPEN_OK); knownBrokersUrls.clear(); framing::Array::ValueVector::const_iterator i; for ( i = knownBrokers.begin(); i != knownBrokers.end(); ++i ) knownBrokersUrls.push_back(Url((*i)->get())); if (sasl.get()) { securityLayer = sasl->getSecurityLayer(maxFrameSize); operUserId = sasl->getUserId(); } setState(OPEN); QPID_LOG(debug, "Known-brokers for connection: " << log::formatList(knownBrokersUrls)); } void ConnectionHandler::redirect(const std::string& /*host*/, const Array& /*knownHosts*/) { throw NotImplementedException("Redirection received from broker; not yet implemented in client"); } void ConnectionHandler::close(uint16_t replyCode, const std::string& replyText) { proxy.closeOk(); errorCode = convert(replyCode); errorText = replyText; setState(CLOSED); QPID_LOG(warning, "Broker closed connection: " << replyCode << ", " << replyText); if (onError) { onError(replyCode, replyText); } } void ConnectionHandler::closeOk() { checkState(CLOSING, INVALID_STATE_CLOSE_OK); if (onError && errorCode != CLOSE_CODE_NORMAL) { onError(errorCode, errorText); } else if (onClose) { onClose(); } setState(CLOSED); } bool ConnectionHandler::isOpen() const { return getState() == OPEN; } bool ConnectionHandler::isClosed() const { int s = getState(); return s == CLOSED || s == FAILED; } bool ConnectionHandler::isClosing() const { return getState() == CLOSING; } std::auto_ptr ConnectionHandler::getSecurityLayer() { return securityLayer; } void ConnectionHandler::setRcvTimeoutTask(boost::intrusive_ptr t) { rcvTimeoutTask = t; } qpidc-0.16/src/qpid/client/LoadPlugins.h0000664000076400007640000000165011365661451020542 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _LoadPlugins_ #define _LoadPlugins_ namespace qpid { namespace client { void theModuleLoader(); }} #endif qpidc-0.16/src/qpid/client/windows/0000775000076400007640000000000011752725716017645 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/client/windows/SaslFactory.cpp0000664000076400007640000001170111645230314022565 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/SaslFactory.h" #include "qpid/Exception.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/sys/SecurityLayer.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/log/Statement.h" #include "boost/tokenizer.hpp" namespace qpid { using qpid::sys::SecurityLayer; using qpid::sys::SecuritySettings; using qpid::framing::InternalErrorException; struct WindowsSaslSettings { WindowsSaslSettings ( ) : username ( std::string(0) ), password ( std::string(0) ), service ( std::string(0) ), host ( std::string(0) ), minSsf ( 0 ), maxSsf ( 0 ) { } WindowsSaslSettings ( const std::string & user, const std::string & password, const std::string & service, const std::string & host, int minSsf, int maxSsf ) : username(user), password(password), service(service), host(host), minSsf(minSsf), maxSsf(maxSsf) { } std::string username, password, service, host; int minSsf, maxSsf; }; class WindowsSasl : public Sasl { public: WindowsSasl( const std::string &, const std::string &, const std::string &, const std::string &, int, int ); ~WindowsSasl(); bool start(const std::string& mechanisms, std::string& response, const SecuritySettings* externalSettings); std::string step(const std::string& challenge); std::string getMechanism(); std::string getUserId(); std::auto_ptr getSecurityLayer(uint16_t maxFrameSize); private: WindowsSaslSettings settings; std::string mechanism; }; qpid::sys::Mutex SaslFactory::lock; std::auto_ptr SaslFactory::instance; SaslFactory::SaslFactory() { } SaslFactory::~SaslFactory() { } SaslFactory& SaslFactory::getInstance() { qpid::sys::Mutex::ScopedLock l(lock); if (!instance.get()) { instance = std::auto_ptr(new SaslFactory()); } return *instance; } std::auto_ptr SaslFactory::create( const std::string & username, const std::string & password, const std::string & serviceName, const std::string & hostName, int minSsf, int maxSsf, bool ) { std::auto_ptr sasl(new WindowsSasl( username, password, serviceName, hostName, minSsf, maxSsf )); return sasl; } namespace { const std::string ANONYMOUS = "ANONYMOUS"; const std::string PLAIN = "PLAIN"; } WindowsSasl::WindowsSasl( const std::string & username, const std::string & password, const std::string & serviceName, const std::string & hostName, int minSsf, int maxSsf ) : settings(username, password, serviceName, hostName, minSsf, maxSsf) { } WindowsSasl::~WindowsSasl() { } bool WindowsSasl::start(const std::string& mechanisms, std::string& response, const SecuritySettings* /*externalSettings*/) { QPID_LOG(debug, "WindowsSasl::start(" << mechanisms << ")"); typedef boost::tokenizer > tokenizer; boost::char_separator sep(" "); bool havePlain = false; bool haveAnon = false; tokenizer mechs(mechanisms, sep); for (tokenizer::iterator mech = mechs.begin(); mech != mechs.end(); ++mech) { if (*mech == ANONYMOUS) haveAnon = true; else if (*mech == PLAIN) havePlain = true; } if (!haveAnon && !havePlain) throw InternalErrorException(QPID_MSG("Sasl error: no common mechanism")); if (havePlain) { mechanism = PLAIN; response = ((char)0) + settings.username + ((char)0) + settings.password; } else { mechanism = ANONYMOUS; response = ""; } return true; } std::string WindowsSasl::step(const std::string& /*challenge*/) { // Shouldn't get this for PLAIN... throw InternalErrorException(QPID_MSG("Sasl step error")); } std::string WindowsSasl::getMechanism() { return mechanism; } std::string WindowsSasl::getUserId() { return std::string(); // TODO - when GSSAPI is supported, return userId for connection. } std::auto_ptr WindowsSasl::getSecurityLayer(uint16_t /*maxFrameSize*/) { return std::auto_ptr(0); } } // namespace qpid qpidc-0.16/src/qpid/client/windows/SslConnector.cpp0000664000076400007640000001414611567535070022767 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/TCPConnector.h" #include "config.h" #include "qpid/Msg.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/log/Statement.h" #include "qpid/sys/Dispatcher.h" #include "qpid/sys/Poller.h" #include "qpid/sys/Time.h" #include "qpid/sys/windows/check.h" #include "qpid/sys/windows/SslAsynchIO.h" #include #include #include #include // security.h needs to see this to distinguish from kernel use. #define SECURITY_WIN32 #include #include #undef SECURITY_WIN32 #include namespace qpid { namespace client { namespace windows { using namespace qpid::sys; using boost::format; using boost::str; class SslConnector : public qpid::client::TCPConnector { qpid::sys::windows::ClientSslAsynchIO *shim; boost::shared_ptr poller; std::string brokerHost; SCHANNEL_CRED cred; CredHandle credHandle; TimeStamp credExpiry; virtual ~SslConnector(); void negotiationDone(SECURITY_STATUS status); // A number of AsynchIO callbacks go right through to TCPConnector, but // we can't boost::bind to a protected ancestor, so these methods redirect // to those TCPConnector methods. bool redirectReadbuff(qpid::sys::AsynchIO&, qpid::sys::AsynchIOBufferBase*); void redirectWritebuff(qpid::sys::AsynchIO&); void redirectEof(qpid::sys::AsynchIO&); public: SslConnector(boost::shared_ptr, framing::ProtocolVersion pVersion, const ConnectionSettings&, ConnectionImpl*); virtual void connect(const std::string& host, const std::string& port); virtual void connected(const Socket&); unsigned int getSSF(); }; // Static constructor which registers connector here namespace { Connector* create(boost::shared_ptr p, framing::ProtocolVersion v, const ConnectionSettings& s, ConnectionImpl* c) { return new SslConnector(p, v, s, c); } struct StaticInit { StaticInit() { try { Connector::registerFactory("ssl", &create); } catch (const std::exception& e) { QPID_LOG(error, "Failed to initialise SSL connector: " << e.what()); } }; ~StaticInit() { } } init; } void SslConnector::negotiationDone(SECURITY_STATUS status) { if (status == SEC_E_OK) initAmqp(); else connectFailed(QPID_MSG(qpid::sys::strError(status))); } bool SslConnector::redirectReadbuff(qpid::sys::AsynchIO& a, qpid::sys::AsynchIOBufferBase* b) { return readbuff(a, b); } void SslConnector::redirectWritebuff(qpid::sys::AsynchIO& a) { writebuff(a); } void SslConnector::redirectEof(qpid::sys::AsynchIO& a) { eof(a); } SslConnector::SslConnector(boost::shared_ptr p, framing::ProtocolVersion ver, const ConnectionSettings& settings, ConnectionImpl* cimpl) : TCPConnector(p, ver, settings, cimpl), shim(0), poller(p) { memset(&cred, 0, sizeof(cred)); cred.dwVersion = SCHANNEL_CRED_VERSION; SECURITY_STATUS status = ::AcquireCredentialsHandle(NULL, UNISP_NAME, SECPKG_CRED_OUTBOUND, NULL, &cred, NULL, NULL, &credHandle, &credExpiry); if (status != SEC_E_OK) throw QPID_WINDOWS_ERROR(status); QPID_LOG(debug, "SslConnector created for " << ver.toString()); } SslConnector::~SslConnector() { ::FreeCredentialsHandle(&credHandle); } // Will this get reach via virtual method via boost::bind???? void SslConnector::connect(const std::string& host, const std::string& port) { brokerHost = host; TCPConnector::connect(host, port); } void SslConnector::connected(const Socket& s) { shim = new qpid::sys::windows::ClientSslAsynchIO(brokerHost, s, credHandle, boost::bind(&SslConnector::redirectReadbuff, this, _1, _2), boost::bind(&SslConnector::redirectEof, this, _1), boost::bind(&SslConnector::redirectEof, this, _1), 0, // closed 0, // nobuffs boost::bind(&SslConnector::redirectWritebuff, this, _1), boost::bind(&SslConnector::negotiationDone, this, _1)); start(shim); shim->start(poller); } unsigned int SslConnector::getSSF() { return shim->getSslKeySize(); } }}} // namespace qpid::client::windows qpidc-0.16/src/qpid/client/MessageImpl.h0000664000076400007640000000514211227113407020515 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_MESSAGEIMPL_H #define QPID_CLIENT_MESSAGEIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Message.h" #include "qpid/client/Session.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/TransferContent.h" #include namespace qpid { namespace client { class MessageImpl : public framing::TransferContent { public: /** Create a Message. *@param data Data for the message body. *@param routingKey Passed to the exchange that routes the message. */ MessageImpl(const std::string& data=std::string(), const std::string& routingKey=std::string()); /** The destination of messages sent to the broker is the exchange * name. The destination of messages received from the broker is * the delivery tag identifyig the local subscription (often this * is the name of the subscribed queue.) */ std::string getDestination() const; /** Check the redelivered flag. */ bool isRedelivered() const; /** Set the redelivered flag. */ void setRedelivered(bool redelivered); /** Get a modifyable reference to the message headers. */ framing::FieldTable& getHeaders(); /** Get a non-modifyable reference to the message headers. */ const framing::FieldTable& getHeaders() const; ///@internal const framing::MessageTransferBody& getMethod() const; ///@internal const framing::SequenceNumber& getId() const; /**@internal for incoming messages */ MessageImpl(const framing::FrameSet& frameset); static MessageImpl* get(Message& m) { return m.impl; } static const MessageImpl* get(const Message& m) { return m.impl; } private: //method and id are only set for received messages: framing::MessageTransferBody method; framing::SequenceNumber id; }; }} #endif /*!QPID_CLIENT_MESSAGEIMPL_H*/ qpidc-0.16/src/qpid/client/LocalQueueImpl.cpp0000664000076400007640000000454411227113407021530 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/LocalQueueImpl.h" #include "qpid/client/MessageImpl.h" #include "qpid/Exception.h" #include "qpid/framing/FrameSet.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/client/PrivateImplRef.h" #include "qpid/client/SubscriptionImpl.h" #include "qpid/client/CompletionImpl.h" namespace qpid { namespace client { using namespace framing; Message LocalQueueImpl::pop(sys::Duration timeout) { return get(timeout); } Message LocalQueueImpl::get(sys::Duration timeout) { Message result; bool ok = get(result, timeout); if (!ok) throw Exception("Timed out waiting for a message"); return result; } bool LocalQueueImpl::get(Message& result, sys::Duration timeout) { if (!queue) throw ClosedException(); FrameSet::shared_ptr content; bool ok = queue->pop(content, timeout); if (!ok) return false; if (content->isA()) { *MessageImpl::get(result) = MessageImpl(*content); boost::intrusive_ptr si = PrivateImplRef::get(subscription); assert(si); if (si) si->received(result); return true; } else throw CommandInvalidException( QPID_MSG("Unexpected method: " << content->getMethod())); } bool LocalQueueImpl::empty() const { if (!queue) throw ClosedException(); return queue->empty(); } size_t LocalQueueImpl::size() const { if (!queue) throw ClosedException(); return queue->size(); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/SubscriptionImpl.cpp0000664000076400007640000001324511227113407022153 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/AsyncSession.h" #include "qpid/client/SubscriptionImpl.h" #include "qpid/client/SessionImpl.h" #include "qpid/client/SubscriptionManagerImpl.h" #include "qpid/client/MessageImpl.h" #include "qpid/client/CompletionImpl.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/SubscriptionSettings.h" #include "qpid/client/SessionBase_0_10Access.h" #include "qpid/client/PrivateImplRef.h" namespace qpid { namespace client { using sys::Mutex; using framing::MessageAcquireResult; SubscriptionImpl::SubscriptionImpl(SubscriptionManager m, const std::string& q, const SubscriptionSettings& s, const std::string& n, MessageListener* l) : manager(*PrivateImplRef::get(m)), name(n), queue(q), settings(s), listener(l) {} void SubscriptionImpl::subscribe() { async(manager.getSession()).messageSubscribe( arg::queue=queue, arg::destination=name, arg::acceptMode=settings.acceptMode, arg::acquireMode=settings.acquireMode, arg::exclusive=settings.exclusive); setFlowControl(settings.flowControl); } std::string SubscriptionImpl::getName() const { return name; } std::string SubscriptionImpl::getQueue() const { return queue; } const SubscriptionSettings& SubscriptionImpl::getSettings() const { Mutex::ScopedLock l(lock); return settings; } void SubscriptionImpl::setFlowControl(const FlowControl& f) { Mutex::ScopedLock l(lock); AsyncSession s=manager.getSession(); if (&settings.flowControl != &f) settings.flowControl = f; s.messageSetFlowMode(name, f.window); s.messageFlow(name, CREDIT_UNIT_MESSAGE, f.messages); s.messageFlow(name, CREDIT_UNIT_BYTE, f.bytes); s.sync(); } void SubscriptionImpl::grantCredit(framing::message::CreditUnit unit, uint32_t value) { async(manager.getSession()).messageFlow(name, unit, value); } void SubscriptionImpl::setAutoAck(size_t n) { Mutex::ScopedLock l(lock); settings.autoAck = n; } SequenceSet SubscriptionImpl::getUnacquired() const { Mutex::ScopedLock l(lock); return unacquired; } SequenceSet SubscriptionImpl::getUnaccepted() const { Mutex::ScopedLock l(lock); return unaccepted; } void SubscriptionImpl::acquire(const SequenceSet& messageIds) { Mutex::ScopedLock l(lock); MessageAcquireResult result = manager.getSession().messageAcquire(messageIds); unacquired.remove(result.getTransfers()); if (settings.acceptMode == ACCEPT_MODE_EXPLICIT) unaccepted.add(result.getTransfers()); } void SubscriptionImpl::accept(const SequenceSet& messageIds) { Mutex::ScopedLock l(lock); manager.getSession().messageAccept(messageIds); unaccepted.remove(messageIds); switch (settings.completionMode) { case COMPLETE_ON_ACCEPT: manager.getSession().markCompleted(messageIds, true); break; case COMPLETE_ON_DELIVERY: manager.getSession().sendCompletion(); break; default://do nothing break; } } void SubscriptionImpl::release(const SequenceSet& messageIds) { Mutex::ScopedLock l(lock); manager.getSession().messageRelease(messageIds); if (settings.acceptMode == ACCEPT_MODE_EXPLICIT) unaccepted.remove(messageIds); } Session SubscriptionImpl::getSession() const { return manager.getSession(); } SubscriptionManager SubscriptionImpl::getSubscriptionManager() { return SubscriptionManager(&manager); } void SubscriptionImpl::cancel() { manager.cancel(name); } void SubscriptionImpl::received(Message& m) { Mutex::ScopedLock l(lock); MessageImpl& mi = *MessageImpl::get(m); if (mi.getMethod().getAcquireMode() == ACQUIRE_MODE_NOT_ACQUIRED) unacquired.add(m.getId()); else if (mi.getMethod().getAcceptMode() == ACCEPT_MODE_EXPLICIT) unaccepted.add(m.getId()); if (listener) { Mutex::ScopedUnlock u(lock); listener->received(m); } if (settings.completionMode == COMPLETE_ON_DELIVERY) { manager.getSession().markCompleted(m.getId(), false, false); } if (settings.autoAck) { if (unaccepted.size() >= settings.autoAck) { async(manager.getSession()).messageAccept(unaccepted); switch (settings.completionMode) { case COMPLETE_ON_ACCEPT: manager.getSession().markCompleted(unaccepted, true); break; case COMPLETE_ON_DELIVERY: manager.getSession().sendCompletion(); break; default://do nothing break; } unaccepted.clear(); } } } Demux::QueuePtr SubscriptionImpl::divert() { Session session(manager.getSession()); Demux& demux = SessionBase_0_10Access(session).get()->getDemux(); demuxRule = std::auto_ptr(new ScopedDivert(name, demux)); return demuxRule->getQueue(); } void SubscriptionImpl::cancelDiversion() { demuxRule.reset(); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/Execution.h0000664000076400007640000000270611227113407020255 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _Execution_ #define _Execution_ #include "qpid/framing/SequenceNumber.h" #include "qpid/client/Demux.h" namespace qpid { namespace client { /**@internal * * Provides access to more detailed aspects of the session * implementation. */ class Execution { public: virtual ~Execution() {} /** * Provides access to the demultiplexing function within the * session implementation */ virtual Demux& getDemux() = 0; /** * Wait until notification has been received of completion of the * outgoing command with the specified id. */ void waitForCompletion(const framing::SequenceNumber& id); }; }} #endif qpidc-0.16/src/qpid/client/SubscriptionManagerImpl.h0000664000076400007640000002257511177622131023124 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_SUBSCRIPTIONMANAGERIMPL_H #define QPID_CLIENT_SUBSCRIPTIONMANAGERIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Mutex.h" #include #include #include #include #include #include #include #include #include #include #include namespace qpid { namespace client { /** * A class to help create and manage subscriptions. * * Set up your subscriptions, then call run() to have messages * delivered. * * \ingroup clientapi * * \details * *

Subscribing and canceling subscriptions

* *
    *
  • *

    subscribe()

    *
     SubscriptionManager subscriptions(session);
     * Listener listener(subscriptions);
     * subscriptions.subscribe(listener, myQueue);
    *
     SubscriptionManager subscriptions(session);
     * LocalQueue local_queue;
     * subscriptions.subscribe(local_queue, string("message_queue"));
  • *
  • *

    cancel()

    *
    subscriptions.cancel();
  • *
* *

Waiting for messages (and returning)

* *
    *
  • *

    run()

    *
     // Give up control to receive messages
     * subscriptions.run();
  • *
  • *

    stop()

    *
    .// Use this code in a listener to return from run()
     * subscriptions.stop();
  • *
  • *

    setAutoStop()

    *
    .// Return from subscriptions.run() when last subscription is cancelled
     *.subscriptions.setAutoStop(true);
     *.subscriptons.run();
     * 
  • *
  • *

    Ending a subscription in a listener

    *
     * void Listener::received(Message& message) {
     * 
     *  if (message.getData() == "That's all, folks!") {
     *       subscriptions.cancel(message.getDestination());
     *   }
     * }
     * 
    *
  • *
* */ class SubscriptionManagerImpl : public sys::Runnable, public RefCounted { public: /** Create a new SubscriptionManagerImpl associated with a session */ SubscriptionManagerImpl(const Session& session); /** * Subscribe a MessagesListener to receive messages from queue. * * Provide your own subclass of MessagesListener to process * incoming messages. It will be called for each message received. * *@param listener Listener object to receive messages. *@param queue Name of the queue to subscribe to. *@param settings settings for the subscription. *@param name unique destination name for the subscription, defaults to queue name. */ Subscription subscribe(MessageListener& listener, const std::string& queue, const SubscriptionSettings& settings, const std::string& name=std::string()); /** * Subscribe a LocalQueue to receive messages from queue. * * Incoming messages are stored in the queue for you to retrieve. * *@param queue Name of the queue to subscribe to. *@param flow initial FlowControl for the subscription. *@param name unique destination name for the subscription, defaults to queue name. * If not specified, the queue name is used. */ Subscription subscribe(LocalQueue& localQueue, const std::string& queue, const SubscriptionSettings& settings, const std::string& name=std::string()); /** * Subscribe a MessagesListener to receive messages from queue. * * Provide your own subclass of MessagesListener to process * incoming messages. It will be called for each message received. * *@param listener Listener object to receive messages. *@param queue Name of the queue to subscribe to. *@param name unique destination name for the subscription, defaults to queue name. * If not specified, the queue name is used. */ Subscription subscribe(MessageListener& listener, const std::string& queue, const std::string& name=std::string()); /** * Subscribe a LocalQueue to receive messages from queue. * * Incoming messages are stored in the queue for you to retrieve. * *@param queue Name of the queue to subscribe to. *@param name unique destination name for the subscription, defaults to queue name. * If not specified, the queue name is used. */ Subscription subscribe(LocalQueue& localQueue, const std::string& queue, const std::string& name=std::string()); /** Get a single message from a queue. *@param result is set to the message from the queue. *@param timeout wait up this timeout for a message to appear. *@return true if result was set, false if no message available after timeout. */ bool get(Message& result, const std::string& queue, sys::Duration timeout=0); /** Get a single message from a queue. *@param timeout wait up this timeout for a message to appear. *@return message from the queue. *@throw Exception if the timeout is exceeded. */ Message get(const std::string& queue, sys::Duration timeout=sys::TIME_INFINITE); /** Get a subscription by name. *@throw Exception if not found. */ Subscription getSubscription(const std::string& name) const; /** Cancel a subscription. See also: Subscription.cancel() */ void cancel(const std::string& name); /** Deliver messages in the current thread until stop() is called. * Only one thread may be running in a SubscriptionManager at a time. * @see run */ void run(); /** Start a new thread to deliver messages. * Only one thread may be running in a SubscriptionManager at a time. * @see start */ void start(); /** * Wait for the thread started by a call to start() to complete. */ void wait(); /** If set true, run() will stop when all subscriptions * are cancelled. If false, run will only stop when stop() * is called. True by default. */ void setAutoStop(bool set=true); /** Stop delivery. Causes run() to return, or the thread started with start() to exit. */ void stop(); static const uint32_t UNLIMITED=0xFFFFFFFF; /** Set the flow control for a subscription. */ void setFlowControl(const std::string& name, const FlowControl& flow); /** Set the flow control for a subscription. *@param name: name of the subscription. *@param messages: message credit. *@param bytes: byte credit. *@param window: if true use window-based flow control. */ void setFlowControl(const std::string& name, uint32_t messages, uint32_t bytes, bool window=true); /** Set the default settings for subscribe() calls that don't * include a SubscriptionSettings parameter. */ void setDefaultSettings(const SubscriptionSettings& s) { defaultSettings = s; } /** Get the default settings for subscribe() calls that don't * include a SubscriptionSettings parameter. */ const SubscriptionSettings& getDefaultSettings() const { return defaultSettings; } /** Get the default settings for subscribe() calls that don't * include a SubscriptionSettings parameter. */ SubscriptionSettings& getDefaultSettings() { return defaultSettings; } /** * Set the default flow control settings for subscribe() calls * that don't include a SubscriptionSettings parameter. * *@param messages: message credit. *@param bytes: byte credit. *@param window: if true use window-based flow control. */ void setFlowControl(uint32_t messages, uint32_t bytes, bool window=true) { defaultSettings.flowControl = FlowControl(messages, bytes, window); } /** *Set the default accept-mode for subscribe() calls that don't *include a SubscriptionSettings parameter. */ void setAcceptMode(AcceptMode mode) { defaultSettings.acceptMode = mode; } /** * Set the default acquire-mode subscribe()s that don't specify SubscriptionSettings. */ void setAcquireMode(AcquireMode mode) { defaultSettings.acquireMode = mode; } void registerFailoverHandler ( boost::function fh ); Session getSession() const; private: mutable sys::Mutex lock; qpid::client::Dispatcher dispatcher; qpid::client::AsyncSession session; bool autoStop; SubscriptionSettings defaultSettings; std::map subscriptions; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_SUBSCRIPTIONMANAGERIMPL_H*/ qpidc-0.16/src/qpid/client/SessionBase_0_10.cpp0000664000076400007640000000453111357641377021620 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/SessionBase_0_10.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionAccess.h" #include "qpid/client/SessionImpl.h" #include "qpid/client/Future.h" #include "qpid/framing/all_method_bodies.h" namespace qpid { namespace client { using namespace framing; SessionBase_0_10::SessionBase_0_10() {} SessionBase_0_10::~SessionBase_0_10() {} void SessionBase_0_10::close() { if (impl) impl->close(); } void SessionBase_0_10::flush() { impl->sendFlush(); } void SessionBase_0_10::sync() { ExecutionSyncBody b; b.setSync(true); impl->send(b).wait(*impl); } void SessionBase_0_10::markCompleted(const framing::SequenceSet& ids, bool notifyPeer) { impl->markCompleted(ids, notifyPeer); } void SessionBase_0_10::markCompleted(const framing::SequenceNumber& id, bool cumulative, bool notifyPeer) { impl->markCompleted(id, cumulative, notifyPeer); } void SessionBase_0_10::sendCompletion() { impl->sendCompletion(); } uint16_t SessionBase_0_10::getChannel() const { return impl->getChannel(); } void SessionBase_0_10::suspend() { impl->suspend(); } void SessionBase_0_10::resume(Connection c) { impl->resume(c.impl); } uint32_t SessionBase_0_10::timeout(uint32_t seconds) { return impl->setTimeout(seconds); } SessionId SessionBase_0_10::getId() const { return impl->getId(); } bool SessionBase_0_10::isValid() const { return impl; } Connection SessionBase_0_10::getConnection() { Connection c; ConnectionAccess::setImpl(c, impl->getConnection()); return c; } }} // namespace qpid::client qpidc-0.16/src/qpid/client/SslConnector.cpp0000664000076400007640000002601711653514043021266 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Connector.h" #include "config.h" #include "qpid/client/Bounds.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/Options.h" #include "qpid/log/Statement.h" #include "qpid/sys/Time.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/InitiationHandler.h" #include "qpid/sys/ssl/util.h" #include "qpid/sys/ssl/SslIo.h" #include "qpid/sys/ssl/SslSocket.h" #include "qpid/sys/Dispatcher.h" #include "qpid/sys/Poller.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/Msg.h" #include #include #include #include namespace qpid { namespace client { using namespace qpid::sys; using namespace qpid::sys::ssl; using namespace qpid::framing; using boost::format; using boost::str; class SslConnector : public Connector { struct Buff; /** Batch up frames for writing to aio. */ class Writer : public framing::FrameHandler { typedef sys::ssl::SslIOBufferBase BufferBase; typedef std::vector Frames; const uint16_t maxFrameSize; sys::Mutex lock; sys::ssl::SslIO* aio; BufferBase* buffer; Frames frames; size_t lastEof; // Position after last EOF in frames framing::Buffer encode; size_t framesEncoded; std::string identifier; Bounds* bounds; void writeOne(); void newBuffer(); public: Writer(uint16_t maxFrameSize, Bounds*); ~Writer(); void init(std::string id, sys::ssl::SslIO*); void handle(framing::AMQFrame&); void write(sys::ssl::SslIO&); }; const uint16_t maxFrameSize; framing::ProtocolVersion version; bool initiated; SecuritySettings securitySettings; sys::Mutex closedLock; bool closed; sys::ShutdownHandler* shutdownHandler; framing::InputHandler* input; framing::InitiationHandler* initialiser; framing::OutputHandler* output; Writer writer; sys::ssl::SslSocket socket; sys::ssl::SslIO* aio; Poller::shared_ptr poller; ~SslConnector(); void readbuff(qpid::sys::ssl::SslIO&, qpid::sys::ssl::SslIOBufferBase*); void writebuff(qpid::sys::ssl::SslIO&); void writeDataBlock(const framing::AMQDataBlock& data); void eof(qpid::sys::ssl::SslIO&); void disconnected(qpid::sys::ssl::SslIO&); std::string identifier; void connect(const std::string& host, const std::string& port); void init(); void close(); void send(framing::AMQFrame& frame); void abort() {} // TODO: Need to fix for heartbeat timeouts to work void setInputHandler(framing::InputHandler* handler); void setShutdownHandler(sys::ShutdownHandler* handler); sys::ShutdownHandler* getShutdownHandler() const; framing::OutputHandler* getOutputHandler(); const std::string& getIdentifier() const; const SecuritySettings* getSecuritySettings(); void socketClosed(qpid::sys::ssl::SslIO&, const qpid::sys::ssl::SslSocket&); public: SslConnector(Poller::shared_ptr p, framing::ProtocolVersion pVersion, const ConnectionSettings&, ConnectionImpl*); }; struct SslConnector::Buff : public SslIO::BufferBase { Buff(size_t size) : SslIO::BufferBase(new char[size], size) {} ~Buff() { delete [] bytes;} }; // Static constructor which registers connector here namespace { Connector* create(Poller::shared_ptr p, framing::ProtocolVersion v, const ConnectionSettings& s, ConnectionImpl* c) { return new SslConnector(p, v, s, c); } struct StaticInit { StaticInit() { try { SslOptions options; options.parse (0, 0, QPIDC_CONF_FILE, true); if (options.certDbPath.empty()) { QPID_LOG(info, "SSL connector not enabled, you must set QPID_SSL_CERT_DB to enable it."); } else { initNSS(options); Connector::registerFactory("ssl", &create); } } catch (const std::exception& e) { QPID_LOG(error, "Failed to initialise SSL connector: " << e.what()); } }; ~StaticInit() { shutdownNSS(); } } init; } SslConnector::SslConnector(Poller::shared_ptr p, ProtocolVersion ver, const ConnectionSettings& settings, ConnectionImpl* cimpl) : maxFrameSize(settings.maxFrameSize), version(ver), initiated(false), closed(true), shutdownHandler(0), writer(maxFrameSize, cimpl), aio(0), poller(p) { QPID_LOG(debug, "SslConnector created for " << version.toString()); if (settings.sslCertName != "") { QPID_LOG(debug, "ssl-cert-name = " << settings.sslCertName); socket.setCertName(settings.sslCertName); } } SslConnector::~SslConnector() { close(); } void SslConnector::connect(const std::string& host, const std::string& port){ Mutex::ScopedLock l(closedLock); assert(closed); try { socket.connect(host, port); } catch (const std::exception& e) { socket.close(); throw TransportFailure(e.what()); } identifier = str(format("[%1% %2%]") % socket.getLocalPort() % socket.getPeerAddress()); closed = false; aio = new SslIO(socket, boost::bind(&SslConnector::readbuff, this, _1, _2), boost::bind(&SslConnector::eof, this, _1), boost::bind(&SslConnector::disconnected, this, _1), boost::bind(&SslConnector::socketClosed, this, _1, _2), 0, // nobuffs boost::bind(&SslConnector::writebuff, this, _1)); writer.init(identifier, aio); } void SslConnector::init(){ Mutex::ScopedLock l(closedLock); ProtocolInitiation init(version); writeDataBlock(init); for (int i = 0; i < 32; i++) { aio->queueReadBuffer(new Buff(maxFrameSize)); } aio->start(poller); } void SslConnector::close() { Mutex::ScopedLock l(closedLock); if (!closed) { closed = true; if (aio) aio->queueWriteClose(); } } void SslConnector::socketClosed(SslIO&, const SslSocket&) { if (aio) aio->queueForDeletion(); if (shutdownHandler) shutdownHandler->shutdown(); } void SslConnector::setInputHandler(InputHandler* handler){ input = handler; } void SslConnector::setShutdownHandler(ShutdownHandler* handler){ shutdownHandler = handler; } OutputHandler* SslConnector::getOutputHandler() { return this; } sys::ShutdownHandler* SslConnector::getShutdownHandler() const { return shutdownHandler; } const std::string& SslConnector::getIdentifier() const { return identifier; } void SslConnector::send(AMQFrame& frame) { writer.handle(frame); } SslConnector::Writer::Writer(uint16_t s, Bounds* b) : maxFrameSize(s), aio(0), buffer(0), lastEof(0), bounds(b) { } SslConnector::Writer::~Writer() { delete buffer; } void SslConnector::Writer::init(std::string id, sys::ssl::SslIO* a) { Mutex::ScopedLock l(lock); identifier = id; aio = a; newBuffer(); } void SslConnector::Writer::handle(framing::AMQFrame& frame) { Mutex::ScopedLock l(lock); frames.push_back(frame); if (frame.getEof() || (bounds && bounds->getCurrentSize() >= maxFrameSize)) { lastEof = frames.size(); aio->notifyPendingWrite(); } QPID_LOG(trace, "SENT [" << identifier << "]: " << frame); } void SslConnector::Writer::writeOne() { assert(buffer); framesEncoded = 0; buffer->dataStart = 0; buffer->dataCount = encode.getPosition(); aio->queueWrite(buffer); newBuffer(); } void SslConnector::Writer::newBuffer() { buffer = aio->getQueuedBuffer(); if (!buffer) buffer = new Buff(maxFrameSize); encode = framing::Buffer(buffer->bytes, buffer->byteCount); framesEncoded = 0; } // Called in IO thread. void SslConnector::Writer::write(sys::ssl::SslIO&) { Mutex::ScopedLock l(lock); assert(buffer); size_t bytesWritten(0); for (size_t i = 0; i < lastEof; ++i) { AMQFrame& frame = frames[i]; uint32_t size = frame.encodedSize(); if (size > encode.available()) writeOne(); assert(size <= encode.available()); frame.encode(encode); ++framesEncoded; bytesWritten += size; } frames.erase(frames.begin(), frames.begin()+lastEof); lastEof = 0; if (bounds) bounds->reduce(bytesWritten); if (encode.getPosition() > 0) writeOne(); } void SslConnector::readbuff(SslIO& aio, SslIO::BufferBase* buff) { framing::Buffer in(buff->bytes+buff->dataStart, buff->dataCount); if (!initiated) { framing::ProtocolInitiation protocolInit; if (protocolInit.decode(in)) { //TODO: check the version is correct QPID_LOG(debug, "RECV [" << identifier << "]: INIT(" << protocolInit << ")"); } initiated = true; } AMQFrame frame; while(frame.decode(in)){ QPID_LOG(trace, "RECV [" << identifier << "]: " << frame); input->received(frame); } // TODO: unreading needs to go away, and when we can cope // with multiple sub-buffers in the general buffer scheme, it will if (in.available() != 0) { // Adjust buffer for used bytes and then "unread them" buff->dataStart += buff->dataCount-in.available(); buff->dataCount = in.available(); aio.unread(buff); } else { // Give whole buffer back to aio subsystem aio.queueReadBuffer(buff); } } void SslConnector::writebuff(SslIO& aio_) { writer.write(aio_); } void SslConnector::writeDataBlock(const AMQDataBlock& data) { SslIO::BufferBase* buff = new Buff(maxFrameSize); framing::Buffer out(buff->bytes, buff->byteCount); data.encode(out); buff->dataCount = data.encodedSize(); aio->queueWrite(buff); } void SslConnector::eof(SslIO&) { close(); } void SslConnector::disconnected(SslIO&) { close(); socketClosed(*aio, socket); } const SecuritySettings* SslConnector::getSecuritySettings() { securitySettings.ssf = socket.getKeyLen(); securitySettings.authid = "dummy";//set to non-empty string to enable external authentication return &securitySettings; } }} // namespace qpid::client qpidc-0.16/src/qpid/client/ChainableFrameHandler.h0000664000076400007640000000242210654416754022442 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ChainableFrameHandler_ #define _ChainableFrameHandler_ #include #include "qpid/framing/AMQFrame.h" namespace qpid { namespace client { struct ChainableFrameHandler { typedef boost::function FrameDelegate; FrameDelegate in; FrameDelegate out; ChainableFrameHandler() {} ChainableFrameHandler(FrameDelegate i, FrameDelegate o): in(i), out(o) {} virtual ~ChainableFrameHandler() {} }; }} #endif qpidc-0.16/src/qpid/client/Results.cpp0000664000076400007640000000377411243351542020316 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Results.h" #include "qpid/client/FutureResult.h" #include "qpid/framing/SequenceSet.h" using namespace qpid::framing; namespace qpid { namespace client { Results::Results() {} Results::~Results() { try { close(); } catch (const std::exception& /*e*/) { assert(0); } } void Results::close() { for (Listeners::iterator i = listeners.begin(); i != listeners.end(); i++) { i->second->completed(); } listeners.clear(); } void Results::completed(const SequenceSet& set) { //call complete on those listeners whose ids fall within the set Listeners::iterator i = listeners.begin(); while (i != listeners.end()) { if (set.contains(i->first)) { i->second->completed(); listeners.erase(i++); } else { i++; } } } void Results::received(const SequenceNumber& id, const std::string& result) { Listeners::iterator i = listeners.find(id); if (i != listeners.end()) { i->second->received(result); listeners.erase(i); } } Results::FutureResultPtr Results::listenForResult(const SequenceNumber& id) { FutureResultPtr l(new FutureResult()); listeners[id] = l; return l; } }} qpidc-0.16/src/qpid/client/Bounds.cpp0000664000076400007640000000405211377532511020102 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Bounds.h" #include "qpid/log/Statement.h" #include "qpid/sys/Waitable.h" namespace qpid { namespace client { using sys::Waitable; Bounds::Bounds(size_t maxSize) : max(maxSize), current(0) {} bool Bounds::expand(size_t sizeRequired, bool block) { if (!max) return true; Waitable::ScopedLock l(lock); if (block) { Waitable::ScopedWait w(lock); while (current + sizeRequired > max) lock.wait(); } current += sizeRequired; return current <= max; } void Bounds::reduce(size_t size) { if (!max || size == 0) return; Waitable::ScopedLock l(lock); assert(current >= size); current -= std::min(size, current); if (current < max && lock.hasWaiters()) { lock.notifyAll(); } } size_t Bounds::getCurrentSize() { Waitable::ScopedLock l(lock); return current; } std::ostream& operator<<(std::ostream& out, const Bounds& bounds) { out << "current=" << bounds.current << ", max=" << bounds.max << " [" << &bounds << "]"; return out; } void Bounds::setException(const sys::ExceptionHolder& e) { Waitable::ScopedLock l(lock); lock.setException(e); lock.waitWaiters(); // Wait for waiting threads to exit. } }} // namespace qpid::client qpidc-0.16/src/qpid/client/ConnectionAccess.h0000664000076400007640000000256211325623523021537 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_CONNECTIONACCESS_H #define QPID_CLIENT_CONNECTIONACCESS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Connection.h" /**@file @internal Internal use only */ namespace qpid { namespace client { struct ConnectionAccess { static void setVersion(Connection& c, const framing::ProtocolVersion& v) { c.version = v; } static boost::shared_ptr getImpl(Connection& c) { return c.impl; } static void setImpl(Connection& c, boost::shared_ptr i) { c.impl = i; } }; }} // namespace qpid::client #endif /*!QPID_CLIENT_CONNECTIONACCESS_H*/ qpidc-0.16/src/qpid/client/Future.cpp0000664000076400007640000000234611227113407020117 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Future.h" #include "qpid/client/SessionImpl.h" namespace qpid { namespace client { void Future::wait(SessionImpl& session) { if (!complete) { session.waitForCompletion(command); } complete = true; } bool Future::isComplete(SessionImpl& session) { return complete || session.isComplete(command); } void Future::setFutureResult(boost::shared_ptr r) { result = r; } }} qpidc-0.16/src/qpid/client/FutureCompletion.cpp0000664000076400007640000000246311227113407022151 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/FutureCompletion.h" using namespace qpid::client; using namespace qpid::sys; FutureCompletion::FutureCompletion() : complete(false) {} bool FutureCompletion::isComplete() const { Monitor::ScopedLock l(lock); return complete; } void FutureCompletion::completed() { Monitor::ScopedLock l(lock); complete = true; lock.notifyAll(); } void FutureCompletion::waitForCompletion() const { Monitor::ScopedLock l(lock); while (!complete) { lock.wait(); } } qpidc-0.16/src/qpid/client/ConnectionImpl.h0000664000076400007640000000637511417426425021251 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ConnectionImpl_ #define _ConnectionImpl_ #include "qpid/client/Bounds.h" #include "qpid/client/ConnectionHandler.h" #include "qpid/framing/FrameHandler.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/ShutdownHandler.h" #include "qpid/sys/TimeoutHandler.h" #include #include #include #include #include #include namespace qpid { namespace client { class Connector; struct ConnectionSettings; class SessionImpl; class ConnectionImpl : public Bounds, public framing::FrameHandler, public sys::TimeoutHandler, public sys::ShutdownHandler, public boost::enable_shared_from_this { typedef std::map > SessionMap; static const uint16_t NEXT_CHANNEL; SessionMap sessions; ConnectionHandler handler; boost::scoped_ptr connector; framing::ProtocolVersion version; uint16_t nextChannel; sys::Mutex lock; bool shutdownComplete; bool released; boost::intrusive_ptr heartbeatTask; template void closeInternal(const F&); void incoming(framing::AMQFrame& frame); void closed(uint16_t, const std::string&); void idleOut(); void idleIn(); void shutdown(); void failedConnection(); void release(); ConnectionImpl(framing::ProtocolVersion version, const ConnectionSettings& settings); boost::function failureCallback; public: static void init(); static boost::shared_ptr create(framing::ProtocolVersion version, const ConnectionSettings& settings); ~ConnectionImpl(); void open(); bool isOpen() const; boost::shared_ptr newSession(const std::string& name, uint32_t timeout, uint16_t channel=NEXT_CHANNEL); void addSession(const boost::shared_ptr&, uint16_t channel=NEXT_CHANNEL); void close(); void handle(framing::AMQFrame& frame); void erase(uint16_t channel); const ConnectionSettings& getNegotiatedSettings(); std::vector getInitialBrokers(); void registerFailureCallback ( boost::function fn ) { failureCallback = fn; } framing::ProtocolVersion getVersion() { return version; } friend std::ostream& operator<<(std::ostream&, const ConnectionImpl&); }; }} #endif qpidc-0.16/src/qpid/client/ConnectionHandler.h0000664000076400007640000001116611457521130021710 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ConnectionHandler_ #define _ConnectionHandler_ #include "qpid/client/ChainableFrameHandler.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/Sasl.h" #include "qpid/client/StateManager.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_HighestVersion.h" #include "qpid/framing/AMQP_ClientOperations.h" #include "qpid/framing/AMQP_ServerProxy.h" #include "qpid/framing/Array.h" #include "qpid/framing/enum.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/InputHandler.h" #include "qpid/sys/SecurityLayer.h" #include "qpid/sys/Timer.h" #include "qpid/Url.h" #include namespace qpid { namespace sys { struct SecuritySettings; } namespace client { class Bounds; class ConnectionHandler : private StateManager, public ConnectionSettings, public ChainableFrameHandler, public framing::InputHandler, private framing::AMQP_ClientOperations::ConnectionHandler { typedef framing::AMQP_ClientOperations::ConnectionHandler ConnectionOperations; enum STATES {NOT_STARTED, NEGOTIATING, OPENING, OPEN, CLOSING, CLOSED, FAILED}; std::set ESTABLISHED, FINISHED; class Adapter : public framing::FrameHandler { ConnectionHandler& handler; Bounds& bounds; public: Adapter(ConnectionHandler& h, Bounds& bounds); void handle(framing::AMQFrame& f); }; Adapter outHandler; framing::AMQP_ServerProxy::Connection proxy; framing::connection::CloseCode errorCode; std::string errorText; bool insist; framing::ProtocolVersion version; framing::Array capabilities; framing::FieldTable properties; std::auto_ptr sasl; std::auto_ptr securityLayer; boost::intrusive_ptr rcvTimeoutTask; std::string operUserId; void checkState(STATES s, const std::string& msg); //methods corresponding to connection controls: void start(const framing::FieldTable& serverProperties, const framing::Array& mechanisms, const framing::Array& locales); void secure(const std::string& challenge); void tune(uint16_t channelMax, uint16_t frameMax, uint16_t heartbeatMin, uint16_t heartbeatMax); void openOk(const framing::Array& knownHosts); void redirect(const std::string& host, const framing::Array& knownHosts); void close(uint16_t replyCode, const std::string& replyText); void closeOk(); void heartbeat(); public: using InputHandler::handle; typedef boost::function CloseListener; typedef boost::function ErrorListener; typedef boost::function GetSecuritySettings; ConnectionHandler(const ConnectionSettings&, framing::ProtocolVersion&, Bounds&); void received(framing::AMQFrame& f) { incoming(f); } void incoming(framing::AMQFrame& frame); void outgoing(framing::AMQFrame& frame); void waitForOpen(); void close(); void fail(const std::string& message); // Note that open and closed aren't related by open = !closed bool isOpen() const; bool isClosed() const; bool isClosing() const; std::auto_ptr getSecurityLayer(); void setRcvTimeoutTask(boost::intrusive_ptr); CloseListener onClose; ErrorListener onError; std::vector knownBrokersUrls; static framing::connection::CloseCode convert(uint16_t replyCode); const std::string& getUserId() const { return operUserId; } GetSecuritySettings getSecuritySettings; /** query the transport for its security details */ }; }} #endif qpidc-0.16/src/qpid/client/SessionBase_0_10Access.h0000664000076400007640000000254311200303063022356 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_SESSIONBASEACCESS_H #define QPID_CLIENT_SESSIONBASEACCESS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/SessionBase_0_10.h" /**@file @internal Internal use only */ namespace qpid { namespace client { class SessionBase_0_10Access { public: SessionBase_0_10Access(SessionBase_0_10& sb_) : sb(sb_) {} void set(const boost::shared_ptr& si) { sb.impl = si; } boost::shared_ptr get() const { return sb.impl; } private: SessionBase_0_10& sb; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_SESSIONBASEACCESS_H*/ qpidc-0.16/src/qpid/client/MessageListener.cpp0000664000076400007640000000162011227113407021731 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/MessageListener.h" qpid::client::MessageListener::~MessageListener() {} qpidc-0.16/src/qpid/client/Subscription.cpp0000664000076400007640000000524311227113407021330 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Subscription.h" #include "qpid/client/SubscriptionImpl.h" #include "qpid/client/CompletionImpl.h" #include "qpid/client/PrivateImplRef.h" #include "qpid/framing/enum.h" namespace qpid { namespace client { typedef PrivateImplRef PI; Subscription::Subscription(SubscriptionImpl* p) { PI::ctor(*this, p); } Subscription::~Subscription() { PI::dtor(*this); } Subscription::Subscription(const Subscription& c) : Handle() { PI::copy(*this, c); } Subscription& Subscription::operator=(const Subscription& c) { return PI::assign(*this, c); } std::string Subscription::getName() const { return impl->getName(); } std::string Subscription::getQueue() const { return impl->getQueue(); } const SubscriptionSettings& Subscription::getSettings() const { return impl->getSettings(); } void Subscription::setFlowControl(const FlowControl& f) { impl->setFlowControl(f); } void Subscription::setAutoAck(unsigned int n) { impl->setAutoAck(n); } SequenceSet Subscription::getUnacquired() const { return impl->getUnacquired(); } SequenceSet Subscription::getUnaccepted() const { return impl->getUnaccepted(); } void Subscription::acquire(const SequenceSet& messageIds) { impl->acquire(messageIds); } void Subscription::accept(const SequenceSet& messageIds) { impl->accept(messageIds); } void Subscription::release(const SequenceSet& messageIds) { impl->release(messageIds); } Session Subscription::getSession() const { return impl->getSession(); } SubscriptionManager Subscription::getSubscriptionManager() { return impl->getSubscriptionManager(); } void Subscription::cancel() { impl->cancel(); } void Subscription::grantMessageCredit(uint32_t value) { impl->grantCredit(framing::message::CREDIT_UNIT_MESSAGE, value); } void Subscription::grantByteCredit(uint32_t value) { impl->grantCredit(framing::message::CREDIT_UNIT_BYTE, value); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/QueueOptions.cpp0000664000076400007640000000650411227113407021305 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/QueueOptions.h" namespace qpid { namespace client { enum QueueEventGeneration {ENQUEUE_ONLY=1, ENQUEUE_AND_DEQUEUE=2}; QueueOptions::QueueOptions() {} const std::string QueueOptions::strMaxCountKey("qpid.max_count"); const std::string QueueOptions::strMaxSizeKey("qpid.max_size"); const std::string QueueOptions::strTypeKey("qpid.policy_type"); const std::string QueueOptions::strREJECT("reject"); const std::string QueueOptions::strFLOW_TO_DISK("flow_to_disk"); const std::string QueueOptions::strRING("ring"); const std::string QueueOptions::strRING_STRICT("ring_strict"); const std::string QueueOptions::strLastValueQueue("qpid.last_value_queue"); const std::string QueueOptions::strPersistLastNode("qpid.persist_last_node"); const std::string QueueOptions::strLVQMatchProperty("qpid.LVQ_key"); const std::string QueueOptions::strLastValueQueueNoBrowse("qpid.last_value_queue_no_browse"); const std::string QueueOptions::strQueueEventMode("qpid.queue_event_generation"); QueueOptions::~QueueOptions() {} void QueueOptions::setSizePolicy(QueueSizePolicy sp, uint64_t maxSize, uint32_t maxCount) { if (maxCount) setInt(strMaxCountKey, maxCount); if (maxSize) setInt(strMaxSizeKey, maxSize); if (maxSize || maxCount){ switch (sp) { case REJECT: setString(strTypeKey, strREJECT); break; case FLOW_TO_DISK: setString(strTypeKey, strFLOW_TO_DISK); break; case RING: setString(strTypeKey, strRING); break; case RING_STRICT: setString(strTypeKey, strRING_STRICT); break; case NONE: clearSizePolicy(); break; } } } void QueueOptions::setPersistLastNode() { setInt(strPersistLastNode, 1); } void QueueOptions::setOrdering(QueueOrderingPolicy op) { if (op == LVQ){ setInt(strLastValueQueue, 1); }else if (op == LVQ_NO_BROWSE){ setInt(strLastValueQueueNoBrowse, 1); }else { clearOrdering(); } } void QueueOptions::getLVQKey(std::string& key) { key.assign(strLVQMatchProperty); } void QueueOptions::clearSizePolicy() { erase(strMaxCountKey); erase(strMaxSizeKey); erase(strTypeKey); } void QueueOptions::clearPersistLastNode() { erase(strPersistLastNode); } void QueueOptions::clearOrdering() { erase(strLastValueQueue); } void QueueOptions::enableQueueEvents(bool enqueueOnly) { setInt(strQueueEventMode, enqueueOnly ? ENQUEUE_ONLY : ENQUEUE_AND_DEQUEUE); } } } qpidc-0.16/src/qpid/client/ConnectionImpl.cpp0000664000076400007640000003256311615547406021605 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ConnectionImpl.h" #include "qpid/client/LoadPlugins.h" #include "qpid/client/Connector.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/client/SessionImpl.h" #include "qpid/log/Statement.h" #include "qpid/Url.h" #include "qpid/framing/enum.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/sys/Poller.h" #include "qpid/sys/SystemInfo.h" #include "qpid/Options.h" #include #include #include #include #include #include #ifdef HAVE_CONFIG_H # include "config.h" #endif namespace qpid { namespace client { using namespace qpid::framing; using namespace qpid::framing::connection; using namespace qpid::sys; using namespace qpid::framing::connection;//for connection error codes namespace { // Maybe should amalgamate the singletons into a single client singleton // Get timer singleton Timer& theTimer() { static Mutex timerInitLock; ScopedLock l(timerInitLock); static qpid::sys::Timer t; return t; } struct IOThreadOptions : public qpid::Options { int maxIOThreads; IOThreadOptions(int c) : Options("IO threading options"), maxIOThreads(c) { addOptions() ("max-iothreads", optValue(maxIOThreads, "N"), "Maximum number of io threads to use"); } }; // IO threads class IOThread { int maxIOThreads; int ioThreads; int connections; Mutex threadLock; std::vector t; Poller::shared_ptr poller_; public: void add() { ScopedLock l(threadLock); ++connections; if (!poller_) poller_.reset(new Poller); if (ioThreads < connections && ioThreads < maxIOThreads) { QPID_LOG(debug, "Created IO thread: " << ioThreads); ++ioThreads; t.push_back( Thread(poller_.get()) ); } } void sub() { ScopedLock l(threadLock); --connections; } Poller::shared_ptr poller() const { assert(poller_); return poller_; } // Here is where the maximum number of threads is set IOThread(int c) : ioThreads(0), connections(0) { IOThreadOptions options(c); options.parse(0, 0, QPIDC_CONF_FILE, true); maxIOThreads = (options.maxIOThreads != -1) ? options.maxIOThreads : 1; } // We can't destroy threads one-by-one as the only // control we have is to shutdown the whole lot // and we can't do that before we're unloaded as we can't // restart the Poller after shutting it down ~IOThread() { std::vector threads; { ScopedLock l(threadLock); if (poller_) poller_->shutdown(); t.swap(threads); } for (std::vector::iterator i = threads.begin(); i != threads.end(); ++i) { i->join(); } } }; IOThread& theIO() { static IOThread io(SystemInfo::concurrency()); return io; } class HeartbeatTask : public TimerTask { TimeoutHandler& timeout; void fire() { // If we ever get here then we have timed out QPID_LOG(debug, "Traffic timeout"); timeout.idleIn(); } public: HeartbeatTask(Duration p, TimeoutHandler& t) : TimerTask(p,"Heartbeat"), timeout(t) {} }; } void ConnectionImpl::init() { // Ensure that the plugin modules have been loaded // This will make sure that any plugin protocols are available theModuleLoader(); // Ensure the IO threads exist: // This needs to be called in the Connection constructor // so that they will still exist at last connection destruction (void) theIO(); } boost::shared_ptr ConnectionImpl::create(framing::ProtocolVersion version, const ConnectionSettings& settings) { boost::shared_ptr instance(new ConnectionImpl(version, settings), boost::bind(&ConnectionImpl::release, _1)); return instance; } ConnectionImpl::ConnectionImpl(framing::ProtocolVersion v, const ConnectionSettings& settings) : Bounds(settings.maxFrameSize * settings.bounds), handler(settings, v, *this), version(v), nextChannel(1), shutdownComplete(false), released(false) { handler.in = boost::bind(&ConnectionImpl::incoming, this, _1); handler.out = boost::bind(&Connector::send, boost::ref(connector), _1); handler.onClose = boost::bind(&ConnectionImpl::closed, this, CLOSE_CODE_NORMAL, std::string()); //only set error handler once open handler.onError = boost::bind(&ConnectionImpl::closed, this, _1, _2); handler.getSecuritySettings = boost::bind(&Connector::getSecuritySettings, boost::ref(connector)); } const uint16_t ConnectionImpl::NEXT_CHANNEL = std::numeric_limits::max(); ConnectionImpl::~ConnectionImpl() { if (heartbeatTask) heartbeatTask->cancel(); theIO().sub(); } void ConnectionImpl::addSession(const boost::shared_ptr& session, uint16_t channel) { Mutex::ScopedLock l(lock); for (uint16_t i = 0; i < NEXT_CHANNEL; i++) { //will at most search through channels once uint16_t c = channel == NEXT_CHANNEL ? nextChannel++ : channel; boost::weak_ptr& s = sessions[c]; boost::shared_ptr ss = s.lock(); if (!ss) { //channel is free, we can assign it to this session session->setChannel(c); s = session; return; } else if (channel != NEXT_CHANNEL) { //channel is taken and was requested explicitly so don't look for another throw SessionBusyException(QPID_MSG("Channel " << ss->getChannel() << " attached to " << ss->getId())); } //else channel is busy, but we can keep looking for a free one } // If we get here, we didn't find any available channel. throw ResourceLimitExceededException("There are no channels available"); } void ConnectionImpl::handle(framing::AMQFrame& frame) { handler.outgoing(frame); } void ConnectionImpl::incoming(framing::AMQFrame& frame) { boost::shared_ptr s; { Mutex::ScopedLock l(lock); s = sessions[frame.getChannel()].lock(); } if (!s) { QPID_LOG(info, *this << " dropping frame received on invalid channel: " << frame); } else { s->in(frame); } } bool ConnectionImpl::isOpen() const { return handler.isOpen(); } void ConnectionImpl::open() { const std::string& protocol = handler.protocol; const std::string& host = handler.host; int port = handler.port; theIO().add(); connector.reset(Connector::create(protocol, theIO().poller(), version, handler, this)); connector->setInputHandler(&handler); connector->setShutdownHandler(this); try { std::string p = boost::lexical_cast(port); connector->connect(host, p); } catch (const std::exception& e) { QPID_LOG(debug, "Failed to connect to " << protocol << ":" << host << ":" << port << " " << e.what()); connector.reset(); throw TransportFailure(e.what()); } connector->init(); // Enable heartbeat if requested uint16_t heartbeat = static_cast(handler).heartbeat; if (heartbeat) { // Set connection timeout to be 2x heart beat interval and setup timer heartbeatTask = new HeartbeatTask(heartbeat * 2 * TIME_SEC, *this); handler.setRcvTimeoutTask(heartbeatTask); theTimer().add(heartbeatTask); } // If the connect fails then the connector is cleaned up either when we try to connect again // - in that case in connector.reset() above; // - or when we are deleted handler.waitForOpen(); QPID_LOG(info, *this << " connected to " << protocol << ":" << host << ":" << port); // If the SASL layer has provided an "operational" userId for the connection, // put it in the negotiated settings. const std::string& userId(handler.getUserId()); if (!userId.empty()) handler.username = userId; //enable security layer if one has been negotiated: std::auto_ptr securityLayer = handler.getSecurityLayer(); if (securityLayer.get()) { QPID_LOG(debug, *this << " activating security layer"); connector->activateSecurityLayer(securityLayer); } else { QPID_LOG(debug, *this << " no security layer in place"); } } void ConnectionImpl::idleIn() { connector->abort(); } void ConnectionImpl::idleOut() { AMQFrame frame((AMQHeartbeatBody())); connector->send(frame); } void ConnectionImpl::close() { if (heartbeatTask) heartbeatTask->cancel(); // close() must be idempotent and no-throw as it will often be called in destructors. if (handler.isOpen()) { try { handler.close(); closed(CLOSE_CODE_NORMAL, "Closed by client"); } catch (...) {} } assert(!handler.isOpen()); } template void ConnectionImpl::closeInternal(const F& f) { if (heartbeatTask) { heartbeatTask->cancel(); } { Mutex::ScopedUnlock u(lock); connector->close(); } //notifying sessions of failure can result in those session being //deleted which in turn results in a call to erase(); this can //even happen on this thread, when 's' goes out of scope //below. Using a copy prevents the map being modified as we //iterate through. SessionMap copy; sessions.swap(copy); for (SessionMap::iterator i = copy.begin(); i != copy.end(); ++i) { boost::shared_ptr s = i->second.lock(); if (s) f(s); } } void ConnectionImpl::closed(uint16_t code, const std::string& text) { Mutex::ScopedLock l(lock); setException(new ConnectionException(ConnectionHandler::convert(code), text)); closeInternal(boost::bind(&SessionImpl::connectionClosed, _1, code, text)); } void ConnectionImpl::shutdown() { if (!handler.isClosed()) { failedConnection(); } bool canDelete; { Mutex::ScopedLock l(lock); //association with IO thread is now ended shutdownComplete = true; //If we have already been released, we can now delete ourselves canDelete = released; } if (canDelete) delete this; } void ConnectionImpl::release() { bool isActive; { Mutex::ScopedLock l(lock); isActive = connector && !shutdownComplete; } //If we are still active - i.e. associated with an IO thread - //then we cannot delete ourselves yet, but must wait for the //shutdown callback which we can trigger by calling //connector.close() if (isActive) { connector->close(); bool canDelete; { Mutex::ScopedLock l(lock); released = true; canDelete = shutdownComplete; } if (canDelete) delete this; } else { delete this; } } static const std::string CONN_CLOSED("Connection closed"); void ConnectionImpl::failedConnection() { if ( failureCallback ) failureCallback(); if (handler.isClosed()) return; bool isClosing = handler.isClosing(); bool isOpen = handler.isOpen(); std::ostringstream msg; msg << *this << " closed"; // FIXME aconway 2008-06-06: exception use, amqp0-10 does not seem to have // an appropriate close-code. connection-forced is not right. handler.fail(msg.str());//ensure connection is marked as failed before notifying sessions // At this point if the object isn't open and isn't closing it must have failed to open // so we can't do the rest of the cleanup if (!isClosing && !isOpen) return; Mutex::ScopedLock l(lock); closeInternal(boost::bind(&SessionImpl::connectionBroke, _1, msg.str())); setException(new TransportFailure(msg.str())); } void ConnectionImpl::erase(uint16_t ch) { Mutex::ScopedLock l(lock); sessions.erase(ch); } const ConnectionSettings& ConnectionImpl::getNegotiatedSettings() { return handler; } std::vector ConnectionImpl::getInitialBrokers() { return handler.knownBrokersUrls; } boost::shared_ptr ConnectionImpl::newSession(const std::string& name, uint32_t timeout, uint16_t channel) { boost::shared_ptr simpl(new SessionImpl(name, shared_from_this())); addSession(simpl, channel); simpl->open(timeout); return simpl; } std::ostream& operator<<(std::ostream& o, const ConnectionImpl& c) { if (c.connector) return o << "Connection " << c.connector->getIdentifier(); else return o << "Connection "; } }} // namespace qpid::client qpidc-0.16/src/qpid/client/PrivateImplRef.h0000664000076400007640000000560311177622131021205 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_PRIVATEIMPL_H #define QPID_CLIENT_PRIVATEIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ClientImportExport.h" #include #include "qpid/RefCounted.h" namespace qpid { namespace client { // FIXME aconway 2009-04-24: details! /** @file * * Helper class to implement a class with a private, reference counted * implementation and reference semantics. * * Such classes are used in the public API to hide implementation, they * should. Example of use: * * === Foo.h * * template PrivateImplRef; * class FooImpl; * * Foo : public Handle { * public: * Foo(FooImpl* = 0); * Foo(const Foo&); * ~Foo(); * Foo& operator=(const Foo&); * * int fooDo(); // and other Foo functions... * * private: * typedef FooImpl Impl; * Impl* impl; * friend class PrivateImplRef; * * === Foo.cpp * * typedef PrivateImplRef PI; * Foo::Foo(FooImpl* p) { PI::ctor(*this, p); } * Foo::Foo(const Foo& c) : Handle() { PI::copy(*this, c); } * Foo::~Foo() { PI::dtor(*this); } * Foo& Foo::operator=(const Foo& c) { return PI::assign(*this, c); } * * int foo::fooDo() { return impl->fooDo(); } * */ template class PrivateImplRef { public: typedef typename T::Impl Impl; typedef boost::intrusive_ptr intrusive_ptr; static intrusive_ptr get(const T& t) { return intrusive_ptr(t.impl); } static void set(T& t, const intrusive_ptr& p) { if (t.impl == p) return; if (t.impl) boost::intrusive_ptr_release(t.impl); t.impl = p.get(); if (t.impl) boost::intrusive_ptr_add_ref(t.impl); } // Helper functions to implement the ctor, dtor, copy, assign static void ctor(T& t, Impl* p) { t.impl = p; if (p) boost::intrusive_ptr_add_ref(p); } static void copy(T& t, const T& x) { if (&t == &x) return; t.impl = 0; assign(t, x); } static void dtor(T& t) { if(t.impl) boost::intrusive_ptr_release(t.impl); } static T& assign(T& t, const T& x) { set(t, get(x)); return t;} }; }} // namespace qpid::client #endif /*!QPID_CLIENT_PRIVATEIMPL_H*/ qpidc-0.16/src/qpid/client/ConnectionSettings.cpp0000664000076400007640000000304611522277663022500 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ConnectionSettings.h" #include "qpid/log/Logger.h" #include "qpid/sys/Socket.h" #include "qpid/Url.h" #include "qpid/Version.h" namespace qpid { namespace client { ConnectionSettings::ConnectionSettings() : protocol("tcp"), host("localhost"), port(5672), locale("en_US"), heartbeat(0), maxChannels(32767), maxFrameSize(65535), bounds(2), tcpNoDelay(false), service(qpid::saslName), minSsf(0), maxSsf(256), sslCertName("") {} ConnectionSettings::~ConnectionSettings() {} void ConnectionSettings::configureSocket(qpid::sys::Socket& socket) const { if (tcpNoDelay) { socket.setTcpNoDelay(); QPID_LOG(info, "Set TCP_NODELAY"); } } }} // namespace qpid::client qpidc-0.16/src/qpid/client/LocalQueueImpl.h0000664000076400007640000000653711227113407021201 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_LOCALQUEUEIMPL_H #define QPID_CLIENT_LOCALQUEUEIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ClientImportExport.h" #include "qpid/client/Handle.h" #include "qpid/client/Message.h" #include "qpid/client/Subscription.h" #include "qpid/client/Demux.h" #include "qpid/sys/Time.h" #include "qpid/RefCounted.h" namespace qpid { namespace client { /** * A local queue to collect messages retrieved from a remote broker * queue. Create a queue and subscribe it using the SubscriptionManager. * Messages from the remote queue on the broker will be stored in the * local queue until you retrieve them. * * \ingroup clientapi * * \details Using a Local Queue * *
 * LocalQueue local_queue;
 * subscriptions.subscribe(local_queue, string("message_queue"));
 * for (int i=0; i<10; i++) {
 *   Message message = local_queue.get();
 *   std::cout << message.getData() << std::endl;
 * }
 * 
* *

Getting Messages

* *
  • *

    get()

    *
    Message message = local_queue.get();
    *
    // Specifying timeouts (TIME_SEC, TIME_MSEC, TIME_USEC, TIME_NSEC)
     *#include 
     *Message message;
     *local_queue.get(message, 5*sys::TIME_SEC);
* *

Checking size

*
  • *

    empty()

    *
    if (local_queue.empty()) { ... }
  • *
  • size()

    *
    std::cout << local_queue.size();
  • *
*/ class LocalQueueImpl : public RefCounted { public: /** Wait up to timeout for the next message from the local queue. *@param result Set to the message from the queue. *@param timeout wait up this timeout for a message to appear. *@return true if result was set, false if queue was empty after timeout. */ bool get(Message& result, sys::Duration timeout=0); /** Get the next message off the local queue, or wait up to the timeout * for message from the broker queue. *@param timeout wait up this timeout for a message to appear. *@return message from the queue. *@throw ClosedException if subscription is closed or timeout exceeded. */ Message get(sys::Duration timeout=sys::TIME_INFINITE); /** Synonym for get() */ Message pop(sys::Duration timeout=sys::TIME_INFINITE); /** Return true if local queue is empty. */ bool empty() const; /** Number of messages on the local queue */ size_t size() const; private: Demux::QueuePtr queue; Subscription subscription; friend class SubscriptionManagerImpl; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_LOCALQUEUEIMPL_H*/ qpidc-0.16/src/qpid/client/amqp0_10/0000775000076400007640000000000011752725716017471 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/client/amqp0_10/MessageSink.h0000664000076400007640000000302411271677720022047 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_MESSAGESINK_H #define QPID_CLIENT_AMQP0_10_MESSAGESINK_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/client/AsyncSession.h" namespace qpid { namespace messaging { class Message; } namespace client { namespace amqp0_10 { struct OutgoingMessage; /** * */ class MessageSink { public: virtual ~MessageSink() {} virtual void declare(qpid::client::AsyncSession& session, const std::string& name) = 0; virtual void send(qpid::client::AsyncSession& session, const std::string& name, OutgoingMessage& message) = 0; virtual void cancel(qpid::client::AsyncSession& session, const std::string& name) = 0; private: }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_MESSAGESINK_H*/ qpidc-0.16/src/qpid/client/amqp0_10/SenderImpl.cpp0000664000076400007640000001211411531752550022225 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "SenderImpl.h" #include "MessageSink.h" #include "SessionImpl.h" #include "AddressResolution.h" #include "OutgoingMessage.h" #include "qpid/messaging/Session.h" namespace qpid { namespace client { namespace amqp0_10 { SenderImpl::SenderImpl(SessionImpl& _parent, const std::string& _name, const qpid::messaging::Address& _address) : parent(&_parent), name(_name), address(_address), state(UNRESOLVED), capacity(50), window(0), flushed(false), unreliable(AddressResolution::is_unreliable(address)) {} void SenderImpl::send(const qpid::messaging::Message& message, bool sync) { if (unreliable) { // immutable, don't need lock UnreliableSend f(*this, &message); parent->execute(f); } else { Send f(*this, &message); while (f.repeat) parent->execute(f); } if (sync) parent->sync(true); } void SenderImpl::close() { execute(); } void SenderImpl::setCapacity(uint32_t c) { bool flush; { sys::Mutex::ScopedLock l(lock); flush = c < capacity; capacity = c; } execute1(flush); } uint32_t SenderImpl::getCapacity() { sys::Mutex::ScopedLock l(lock); return capacity; } uint32_t SenderImpl::getUnsettled() { CheckPendingSends f(*this, false); parent->execute(f); return f.pending; } void SenderImpl::init(qpid::client::AsyncSession s, AddressResolution& resolver) { sys::Mutex::ScopedLock l(lock); session = s; if (state == UNRESOLVED) { sink = resolver.resolveSink(session, address); state = ACTIVE; } if (state == CANCELLED) { sink->cancel(session, name); sys::Mutex::ScopedUnlock u(lock); parent->senderCancelled(name); } else { sink->declare(session, name); replay(l); } } void SenderImpl::waitForCapacity() { sys::Mutex::ScopedLock l(lock); //TODO: add option to throw exception rather than blocking? if (!unreliable && capacity <= (flushed ? checkPendingSends(false, l) : outgoing.size())) { //Initial implementation is very basic. As outgoing is //currently only reduced on receiving completions and we are //blocking anyway we may as well sync(). If successful that //should clear all outstanding sends. session.sync(); checkPendingSends(false, l); } //flush periodically and check for conmpleted sends if (++window > (capacity / 4)) {//TODO: make this configurable? checkPendingSends(true, l); window = 0; } } void SenderImpl::sendImpl(const qpid::messaging::Message& m) { sys::Mutex::ScopedLock l(lock); std::auto_ptr msg(new OutgoingMessage()); msg->convert(m); msg->setSubject(m.getSubject().empty() ? address.getSubject() : m.getSubject()); outgoing.push_back(msg.release()); sink->send(session, name, outgoing.back()); } void SenderImpl::sendUnreliable(const qpid::messaging::Message& m) { sys::Mutex::ScopedLock l(lock); OutgoingMessage msg; msg.convert(m); msg.setSubject(m.getSubject().empty() ? address.getSubject() : m.getSubject()); sink->send(session, name, msg); } void SenderImpl::replay(const sys::Mutex::ScopedLock&) { for (OutgoingMessages::iterator i = outgoing.begin(); i != outgoing.end(); ++i) { i->message.setRedelivered(true); sink->send(session, name, *i); } } uint32_t SenderImpl::checkPendingSends(bool flush) { sys::Mutex::ScopedLock l(lock); return checkPendingSends(flush, l); } uint32_t SenderImpl::checkPendingSends(bool flush, const sys::Mutex::ScopedLock&) { if (flush) { session.flush(); flushed = true; } else { flushed = false; } while (!outgoing.empty() && outgoing.front().status.isComplete()) { outgoing.pop_front(); } return outgoing.size(); } void SenderImpl::closeImpl() { sys::Mutex::ScopedLock l(lock); state = CANCELLED; sink->cancel(session, name); parent->senderCancelled(name); } const std::string& SenderImpl::getName() const { sys::Mutex::ScopedLock l(lock); return name; } qpid::messaging::Session SenderImpl::getSession() const { sys::Mutex::ScopedLock l(lock); return qpid::messaging::Session(parent.get()); } }}} // namespace qpid::client::amqp0_10 qpidc-0.16/src/qpid/client/amqp0_10/SessionImpl.h0000664000076400007640000001722411576116033022103 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_SESSIONIMPL_H #define QPID_CLIENT_AMQP0_10_SESSIONIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/SessionImpl.h" #include "qpid/messaging/Duration.h" #include "qpid/messaging/exceptions.h" #include "qpid/client/Session.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/amqp0_10/AddressResolution.h" #include "qpid/client/amqp0_10/IncomingMessages.h" #include "qpid/sys/Mutex.h" #include "qpid/framing/reply_exceptions.h" #include namespace qpid { namespace messaging { class Address; class Connection; class Message; class Receiver; class Sender; class Session; } namespace client { namespace amqp0_10 { class ConnectionImpl; class ReceiverImpl; class SenderImpl; /** * Implementation of the protocol independent Session interface using * AMQP 0-10. */ class SessionImpl : public qpid::messaging::SessionImpl { public: SessionImpl(ConnectionImpl&, bool transactional); void commit(); void rollback(); void acknowledge(bool sync); void reject(qpid::messaging::Message&); void release(qpid::messaging::Message&); void acknowledge(qpid::messaging::Message& msg, bool cumulative); void close(); void sync(bool block); qpid::messaging::Sender createSender(const qpid::messaging::Address& address); qpid::messaging::Receiver createReceiver(const qpid::messaging::Address& address); qpid::messaging::Sender getSender(const std::string& name) const; qpid::messaging::Receiver getReceiver(const std::string& name) const; bool nextReceiver(qpid::messaging::Receiver& receiver, qpid::messaging::Duration timeout); qpid::messaging::Receiver nextReceiver(qpid::messaging::Duration timeout); qpid::messaging::Connection getConnection() const; void checkError(); bool hasError(); bool get(ReceiverImpl& receiver, qpid::messaging::Message& message, qpid::messaging::Duration timeout); void releasePending(const std::string& destination); void receiverCancelled(const std::string& name); void senderCancelled(const std::string& name); uint32_t getReceivable(); uint32_t getReceivable(const std::string& destination); uint32_t getUnsettledAcks(); uint32_t getUnsettledAcks(const std::string& destination); void setSession(qpid::client::Session); template bool execute(T& f) { try { f(); return true; } catch (const qpid::TransportFailure&) { reconnect(); return false; } catch (const qpid::framing::ResourceLimitExceededException& e) { if (backoff()) return false; else throw qpid::messaging::TargetCapacityExceeded(e.what()); } catch (const qpid::framing::UnauthorizedAccessException& e) { throw qpid::messaging::UnauthorizedAccess(e.what()); } catch (const qpid::SessionException& e) { throw qpid::messaging::SessionError(e.what()); } catch (const qpid::ConnectionException& e) { throw qpid::messaging::ConnectionError(e.what()); } catch (const qpid::ChannelException& e) { throw qpid::messaging::MessagingException(e.what()); } } static SessionImpl& convert(qpid::messaging::Session&); private: typedef std::map Receivers; typedef std::map Senders; mutable qpid::sys::Mutex lock; boost::intrusive_ptr connection; qpid::client::Session session; AddressResolution resolver; IncomingMessages incoming; Receivers receivers; Senders senders; const bool transactional; bool accept(ReceiverImpl*, qpid::messaging::Message*, IncomingMessages::MessageTransfer&); bool getIncoming(IncomingMessages::Handler& handler, qpid::messaging::Duration timeout); bool getNextReceiver(qpid::messaging::Receiver* receiver, IncomingMessages::MessageTransfer& transfer); void reconnect(); bool backoff(); void commitImpl(); void rollbackImpl(); void acknowledgeImpl(); void acknowledgeImpl(qpid::messaging::Message&, bool cumulative); void rejectImpl(qpid::messaging::Message&); void releaseImpl(qpid::messaging::Message&); void closeImpl(); void syncImpl(bool block); qpid::messaging::Sender createSenderImpl(const qpid::messaging::Address& address); qpid::messaging::Receiver createReceiverImpl(const qpid::messaging::Address& address); uint32_t getReceivableImpl(const std::string* destination); uint32_t getUnsettledAcksImpl(const std::string* destination); //functors for public facing methods (allows locking and retry //logic to be centralised) struct Command { SessionImpl& impl; Command(SessionImpl& i) : impl(i) {} }; struct Commit : Command { Commit(SessionImpl& i) : Command(i) {} void operator()() { impl.commitImpl(); } }; struct Rollback : Command { Rollback(SessionImpl& i) : Command(i) {} void operator()() { impl.rollbackImpl(); } }; struct Acknowledge : Command { Acknowledge(SessionImpl& i) : Command(i) {} void operator()() { impl.acknowledgeImpl(); } }; struct Sync : Command { Sync(SessionImpl& i) : Command(i) {} void operator()() { impl.syncImpl(true); } }; struct NonBlockingSync : Command { NonBlockingSync(SessionImpl& i) : Command(i) {} void operator()() { impl.syncImpl(false); } }; struct Reject : Command { qpid::messaging::Message& message; Reject(SessionImpl& i, qpid::messaging::Message& m) : Command(i), message(m) {} void operator()() { impl.rejectImpl(message); } }; struct Release : Command { qpid::messaging::Message& message; Release(SessionImpl& i, qpid::messaging::Message& m) : Command(i), message(m) {} void operator()() { impl.releaseImpl(message); } }; struct Acknowledge2 : Command { qpid::messaging::Message& message; bool cumulative; Acknowledge2(SessionImpl& i, qpid::messaging::Message& m, bool c) : Command(i), message(m), cumulative(c) {} void operator()() { impl.acknowledgeImpl(message, cumulative); } }; struct CreateSender; struct CreateReceiver; struct UnsettledAcks; struct Receivable; //helper templates for some common patterns template bool execute() { F f(*this); return execute(f); } template void retry() { while (!execute()) {} } template bool execute1(P p) { F f(*this, p); return execute(f); } template R get1(P p) { F f(*this, p); while (!execute(f)) {} return f.result; } }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_SESSIONIMPL_H*/ qpidc-0.16/src/qpid/client/amqp0_10/ReceiverImpl.h0000664000076400007640000001122211373253106022212 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_RECEIVERIMPL_H #define QPID_CLIENT_AMQP0_10_RECEIVERIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Address.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/ReceiverImpl.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/amqp0_10/SessionImpl.h" #include "qpid/messaging/Duration.h" #include "qpid/sys/Mutex.h" #include #include namespace qpid { namespace client { namespace amqp0_10 { class AddressResolution; class MessageSource; /** * A receiver implementation based on an AMQP 0-10 subscription. */ class ReceiverImpl : public qpid::messaging::ReceiverImpl { public: enum State {UNRESOLVED, STOPPED, STARTED, CANCELLED}; ReceiverImpl(SessionImpl& parent, const std::string& name, const qpid::messaging::Address& address); void init(qpid::client::AsyncSession session, AddressResolution& resolver); bool get(qpid::messaging::Message& message, qpid::messaging::Duration timeout); qpid::messaging::Message get(qpid::messaging::Duration timeout); bool fetch(qpid::messaging::Message& message, qpid::messaging::Duration timeout); qpid::messaging::Message fetch(qpid::messaging::Duration timeout); void close(); void start(); void stop(); const std::string& getName() const; void setCapacity(uint32_t); uint32_t getCapacity(); uint32_t getAvailable(); uint32_t getUnsettled(); void received(qpid::messaging::Message& message); qpid::messaging::Session getSession() const; bool isClosed() const; private: mutable sys::Mutex lock; boost::intrusive_ptr parent; const std::string destination; const qpid::messaging::Address address; const uint32_t byteCredit; State state; std::auto_ptr source; uint32_t capacity; qpid::client::AsyncSession session; qpid::messaging::MessageListener* listener; uint32_t window; void startFlow(const sys::Mutex::ScopedLock&); // Dummy param, call with lock held //implementation of public facing methods bool fetchImpl(qpid::messaging::Message& message, qpid::messaging::Duration timeout); bool getImpl(qpid::messaging::Message& message, qpid::messaging::Duration timeout); void closeImpl(); void setCapacityImpl(uint32_t); //functors for public facing methods. struct Command { ReceiverImpl& impl; Command(ReceiverImpl& i) : impl(i) {} }; struct Get : Command { qpid::messaging::Message& message; qpid::messaging::Duration timeout; bool result; Get(ReceiverImpl& i, qpid::messaging::Message& m, qpid::messaging::Duration t) : Command(i), message(m), timeout(t), result(false) {} void operator()() { result = impl.getImpl(message, timeout); } }; struct Fetch : Command { qpid::messaging::Message& message; qpid::messaging::Duration timeout; bool result; Fetch(ReceiverImpl& i, qpid::messaging::Message& m, qpid::messaging::Duration t) : Command(i), message(m), timeout(t), result(false) {} void operator()() { result = impl.fetchImpl(message, timeout); } }; struct Close : Command { Close(ReceiverImpl& i) : Command(i) {} void operator()() { impl.closeImpl(); } }; struct SetCapacity : Command { uint32_t capacity; SetCapacity(ReceiverImpl& i, uint32_t c) : Command(i), capacity(c) {} void operator()() { impl.setCapacityImpl(capacity); } }; //helper templates for some common patterns template void execute() { F f(*this); parent->execute(f); } template void execute1(P p) { F f(*this, p); parent->execute(f); } }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_RECEIVERIMPL_H*/ qpidc-0.16/src/qpid/client/amqp0_10/IncomingMessages.h0000664000076400007640000000555111576116033023071 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_INCOMINGMESSAGES_H #define QPID_CLIENT_AMQP0_10_INCOMINGMESSAGES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "qpid/client/AsyncSession.h" #include "qpid/framing/SequenceSet.h" #include "qpid/sys/BlockingQueue.h" #include "qpid/sys/Time.h" #include "qpid/client/amqp0_10/AcceptTracker.h" namespace qpid { namespace framing{ class FrameSet; } namespace messaging { class Message; } namespace client { namespace amqp0_10 { /** * Queue of incoming messages. */ class IncomingMessages { public: typedef boost::shared_ptr FrameSetPtr; class MessageTransfer { public: const std::string& getDestination(); void retrieve(qpid::messaging::Message* message); private: FrameSetPtr content; IncomingMessages& parent; MessageTransfer(FrameSetPtr, IncomingMessages&); friend class IncomingMessages; }; struct Handler { virtual ~Handler() {} virtual bool accept(MessageTransfer& transfer) = 0; }; void setSession(qpid::client::AsyncSession session); bool get(Handler& handler, qpid::sys::Duration timeout); bool getNextDestination(std::string& destination, qpid::sys::Duration timeout); void accept(); void accept(qpid::framing::SequenceNumber id, bool cumulative); void releaseAll(); void releasePending(const std::string& destination); uint32_t pendingAccept(); uint32_t pendingAccept(const std::string& destination); uint32_t available(); uint32_t available(const std::string& destination); private: typedef std::deque FrameSetQueue; sys::Mutex lock; qpid::client::AsyncSession session; boost::shared_ptr< sys::BlockingQueue > incoming; FrameSetQueue received; AcceptTracker acceptTracker; bool process(Handler*, qpid::sys::Duration); bool wait(qpid::sys::Duration); void retrieve(FrameSetPtr, qpid::messaging::Message*); }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_INCOMINGMESSAGES_H*/ qpidc-0.16/src/qpid/client/amqp0_10/OutgoingMessage.cpp0000664000076400007640000000751711533467107023301 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/amqp0_10/OutgoingMessage.h" #include "qpid/client/amqp0_10/AddressResolution.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/types/Variant.h" #include "qpid/messaging/Address.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/MessageImpl.h" #include "qpid/framing/enum.h" #include namespace qpid { namespace client { namespace amqp0_10 { using qpid::messaging::Address; using qpid::messaging::MessageImplAccess; using qpid::types::Variant; using namespace qpid::framing::message; using namespace qpid::amqp_0_10; namespace { //TODO: unify conversion to and from 0-10 message that is currently //split between IncomingMessages and OutgoingMessage const std::string SUBJECT("qpid.subject"); const std::string X_APP_ID("x-amqp-0-10.app-id"); const std::string X_ROUTING_KEY("x-amqp-0-10.routing-key"); const std::string X_CONTENT_ENCODING("x-amqp-0-10.content-encoding"); } void OutgoingMessage::convert(const qpid::messaging::Message& from) { //TODO: need to avoid copying as much as possible message.setData(from.getContent()); message.getMessageProperties().setContentType(from.getContentType()); message.getMessageProperties().setCorrelationId(from.getCorrelationId()); message.getMessageProperties().setUserId(from.getUserId()); const Address& address = from.getReplyTo(); if (address) { message.getMessageProperties().setReplyTo(AddressResolution::convert(address)); } translate(from.getProperties(), message.getMessageProperties().getApplicationHeaders()); if (from.getTtl().getMilliseconds()) { message.getDeliveryProperties().setTtl(from.getTtl().getMilliseconds()); } if (from.getDurable()) { message.getDeliveryProperties().setDeliveryMode(DELIVERY_MODE_PERSISTENT); } if (from.getRedelivered()) { message.getDeliveryProperties().setRedelivered(true); } if (from.getPriority()) message.getDeliveryProperties().setPriority(from.getPriority()); //allow certain 0-10 specific items to be set through special properties: // message-id, app-id, content-encoding if (from.getMessageId().size()) { qpid::framing::Uuid uuid; std::istringstream data(from.getMessageId()); data >> uuid; message.getMessageProperties().setMessageId(uuid); } Variant::Map::const_iterator i; i = from.getProperties().find(X_APP_ID); if (i != from.getProperties().end()) { message.getMessageProperties().setAppId(i->second.asString()); } i = from.getProperties().find(X_CONTENT_ENCODING); if (i != from.getProperties().end()) { message.getMessageProperties().setContentEncoding(i->second.asString()); } } void OutgoingMessage::setSubject(const std::string& subject) { if (!subject.empty()) { message.getMessageProperties().getApplicationHeaders().setString(SUBJECT, subject); } } std::string OutgoingMessage::getSubject() const { return message.getMessageProperties().getApplicationHeaders().getAsString(SUBJECT); } }}} // namespace qpid::client::amqp0_10 qpidc-0.16/src/qpid/client/amqp0_10/SenderImpl.h0000664000076400007640000001134611374560275021706 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_SENDERIMPL_H #define QPID_CLIENT_AMQP0_10_SENDERIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/Address.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/SenderImpl.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/amqp0_10/SessionImpl.h" #include #include #include namespace qpid { namespace client { namespace amqp0_10 { class AddressResolution; class MessageSink; struct OutgoingMessage; /** * */ class SenderImpl : public qpid::messaging::SenderImpl { public: enum State {UNRESOLVED, ACTIVE, CANCELLED}; SenderImpl(SessionImpl& parent, const std::string& name, const qpid::messaging::Address& address); void send(const qpid::messaging::Message&, bool sync); void close(); void setCapacity(uint32_t); uint32_t getCapacity(); uint32_t getUnsettled(); void init(qpid::client::AsyncSession, AddressResolution&); const std::string& getName() const; qpid::messaging::Session getSession() const; private: mutable sys::Mutex lock; boost::intrusive_ptr parent; const std::string name; const qpid::messaging::Address address; State state; std::auto_ptr sink; qpid::client::AsyncSession session; std::string destination; std::string routingKey; typedef boost::ptr_deque OutgoingMessages; OutgoingMessages outgoing; uint32_t capacity; uint32_t window; bool flushed; const bool unreliable; uint32_t checkPendingSends(bool flush); // Dummy ScopedLock parameter means call with lock held uint32_t checkPendingSends(bool flush, const sys::Mutex::ScopedLock&); void replay(const sys::Mutex::ScopedLock&); void waitForCapacity(); //logic for application visible methods: void sendImpl(const qpid::messaging::Message&); void sendUnreliable(const qpid::messaging::Message&); void closeImpl(); //functors for application visible methods (allowing locking and //retry to be centralised): struct Command { SenderImpl& impl; Command(SenderImpl& i) : impl(i) {} }; struct Send : Command { const qpid::messaging::Message* message; bool repeat; Send(SenderImpl& i, const qpid::messaging::Message* m) : Command(i), message(m), repeat(true) {} void operator()() { impl.waitForCapacity(); //from this point message will be recorded if there is any //failure (and replayed) so need not repeat the call repeat = false; impl.sendImpl(*message); } }; struct UnreliableSend : Command { const qpid::messaging::Message* message; UnreliableSend(SenderImpl& i, const qpid::messaging::Message* m) : Command(i), message(m) {} void operator()() { //TODO: ideally want to put messages on the outbound //queue and pull them off in io thread, but the old //0-10 client doesn't support that option so for now //we simply don't queue unreliable messages impl.sendUnreliable(*message); } }; struct Close : Command { Close(SenderImpl& i) : Command(i) {} void operator()() { impl.closeImpl(); } }; struct CheckPendingSends : Command { bool flush; uint32_t pending; CheckPendingSends(SenderImpl& i, bool f) : Command(i), flush(f), pending(0) {} void operator()() { pending = impl.checkPendingSends(flush); } }; //helper templates for some common patterns template void execute() { F f(*this); parent->execute(f); } template bool execute1(P p) { F f(*this, p); return parent->execute(f); } }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_SENDERIMPL_H*/ qpidc-0.16/src/qpid/client/amqp0_10/OutgoingMessage.h0000664000076400007640000000260311302467762022736 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_OUTGOINGMESSAGE_H #define QPID_CLIENT_AMQP0_10_OUTGOINGMESSAGE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Completion.h" #include "qpid/client/Message.h" namespace qpid { namespace messaging { class Message; } namespace client { namespace amqp0_10 { struct OutgoingMessage { qpid::client::Message message; qpid::client::Completion status; void convert(const qpid::messaging::Message&); void setSubject(const std::string& subject); std::string getSubject() const; }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_OUTGOINGMESSAGE_H*/ qpidc-0.16/src/qpid/client/amqp0_10/AddressResolution.h0000664000076400007640000000402411354147230023276 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_ADDRESSRESOLUTION_H #define QPID_CLIENT_AMQP0_10_ADDRESSRESOLUTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Session.h" namespace qpid { namespace framing{ class ReplyTo; } namespace messaging { class Address; } namespace client { namespace amqp0_10 { class MessageSource; class MessageSink; /** * Maps from a generic Address and optional Filter to an AMQP 0-10 * MessageSource which will then be used by a ReceiverImpl instance * created for the address. */ class AddressResolution { public: std::auto_ptr resolveSource(qpid::client::Session session, const qpid::messaging::Address& address); std::auto_ptr resolveSink(qpid::client::Session session, const qpid::messaging::Address& address); static qpid::messaging::Address convert(const qpid::framing::ReplyTo&); static qpid::framing::ReplyTo convert(const qpid::messaging::Address&); static bool is_unreliable(const qpid::messaging::Address& address); static bool is_reliable(const qpid::messaging::Address& address); private: }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_ADDRESSRESOLUTION_H*/ qpidc-0.16/src/qpid/client/amqp0_10/AddressResolution.cpp0000664000076400007640000010670311717465066023655 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/amqp0_10/AddressResolution.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/client/amqp0_10/MessageSource.h" #include "qpid/client/amqp0_10/MessageSink.h" #include "qpid/client/amqp0_10/OutgoingMessage.h" #include "qpid/messaging/Address.h" #include "qpid/messaging/Message.h" #include "qpid/types/Variant.h" #include "qpid/messaging/exceptions.h" #include "qpid/log/Statement.h" #include "qpid/framing/enum.h" #include "qpid/framing/ExchangeBoundResult.h" #include "qpid/framing/ExchangeQueryResult.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/QueueQueryResult.h" #include "qpid/framing/ReplyTo.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/Uuid.h" #include #include namespace qpid { namespace client { namespace amqp0_10 { using qpid::Exception; using qpid::messaging::Address; using qpid::messaging::AddressError; using qpid::messaging::MalformedAddress; using qpid::messaging::ResolutionError; using qpid::messaging::NotFound; using qpid::messaging::AssertionFailed; using qpid::framing::ExchangeBoundResult; using qpid::framing::ExchangeQueryResult; using qpid::framing::FieldTable; using qpid::framing::QueueQueryResult; using qpid::framing::ReplyTo; using qpid::framing::Uuid; using namespace qpid::types; using namespace qpid::framing::message; using namespace qpid::amqp_0_10; using namespace boost::assign; class Verifier { public: Verifier(); void verify(const Address& address) const; private: Variant::Map defined; void verify(const Variant::Map& allowed, const Variant::Map& actual) const; }; namespace{ const Variant EMPTY_VARIANT; const FieldTable EMPTY_FIELD_TABLE; const Variant::List EMPTY_LIST; const std::string EMPTY_STRING; //policy types const std::string CREATE("create"); const std::string ASSERT("assert"); const std::string DELETE("delete"); //option names const std::string NODE("node"); const std::string LINK("link"); const std::string MODE("mode"); const std::string RELIABILITY("reliability"); const std::string NAME("name"); const std::string DURABLE("durable"); const std::string X_DECLARE("x-declare"); const std::string X_SUBSCRIBE("x-subscribe"); const std::string X_BINDINGS("x-bindings"); const std::string EXCHANGE("exchange"); const std::string QUEUE("queue"); const std::string KEY("key"); const std::string ARGUMENTS("arguments"); const std::string ALTERNATE_EXCHANGE("alternate-exchange"); const std::string TYPE("type"); const std::string EXCLUSIVE("exclusive"); const std::string AUTO_DELETE("auto-delete"); //policy values const std::string ALWAYS("always"); const std::string NEVER("never"); const std::string RECEIVER("receiver"); const std::string SENDER("sender"); //address types const std::string QUEUE_ADDRESS("queue"); const std::string TOPIC_ADDRESS("topic"); //reliability options: const std::string UNRELIABLE("unreliable"); const std::string AT_MOST_ONCE("at-most-once"); const std::string AT_LEAST_ONCE("at-least-once"); const std::string EXACTLY_ONCE("exactly-once"); //receiver modes: const std::string BROWSE("browse"); const std::string CONSUME("consume"); //0-10 exchange types: const std::string TOPIC_EXCHANGE("topic"); const std::string FANOUT_EXCHANGE("fanout"); const std::string DIRECT_EXCHANGE("direct"); const std::string HEADERS_EXCHANGE("headers"); const std::string XML_EXCHANGE("xml"); const std::string WILDCARD_ANY("#"); //exchange prefixes: const std::string PREFIX_AMQ("amq."); const std::string PREFIX_QPID("qpid."); const Verifier verifier; } struct Binding { Binding(const Variant::Map&); Binding(const std::string& exchange, const std::string& queue, const std::string& key); std::string exchange; std::string queue; std::string key; FieldTable arguments; }; struct Bindings : std::vector { void add(const Variant::List& bindings); void setDefaultExchange(const std::string&); void setDefaultQueue(const std::string&); void bind(qpid::client::AsyncSession& session); void unbind(qpid::client::AsyncSession& session); void check(qpid::client::AsyncSession& session); }; class Node { protected: enum CheckMode {FOR_RECEIVER, FOR_SENDER}; Node(const Address& address); const std::string name; Variant createPolicy; Variant assertPolicy; Variant deletePolicy; Bindings nodeBindings; Bindings linkBindings; static bool enabled(const Variant& policy, CheckMode mode); static bool createEnabled(const Address& address, CheckMode mode); static void convert(const Variant& option, FieldTable& arguments); static std::vector RECEIVER_MODES; static std::vector SENDER_MODES; }; class Queue : protected Node { public: Queue(const Address& address); protected: void checkCreate(qpid::client::AsyncSession&, CheckMode); void checkAssert(qpid::client::AsyncSession&, CheckMode); void checkDelete(qpid::client::AsyncSession&, CheckMode); private: const bool durable; const bool autoDelete; const bool exclusive; const std::string alternateExchange; FieldTable arguments; }; class Exchange : protected Node { public: Exchange(const Address& address); protected: void checkCreate(qpid::client::AsyncSession&, CheckMode); void checkAssert(qpid::client::AsyncSession&, CheckMode); void checkDelete(qpid::client::AsyncSession&, CheckMode); bool isReservedName(); protected: const std::string specifiedType; private: const bool durable; const bool autoDelete; const std::string alternateExchange; FieldTable arguments; }; class QueueSource : public Queue, public MessageSource { public: QueueSource(const Address& address); void subscribe(qpid::client::AsyncSession& session, const std::string& destination); void cancel(qpid::client::AsyncSession& session, const std::string& destination); private: const AcceptMode acceptMode; const AcquireMode acquireMode; bool exclusive; FieldTable options; }; class Subscription : public Exchange, public MessageSource { public: Subscription(const Address&, const std::string& actualType); void subscribe(qpid::client::AsyncSession& session, const std::string& destination); void cancel(qpid::client::AsyncSession& session, const std::string& destination); private: const std::string queue; const bool reliable; const bool durable; const std::string actualType; const bool exclusiveQueue; const bool exclusiveSubscription; FieldTable queueOptions; FieldTable subscriptionOptions; Bindings bindings; void bindSubject(const std::string& subject); void bindAll(); void add(const std::string& exchange, const std::string& key); static std::string getSubscriptionName(const std::string& base, const std::string& name); }; class ExchangeSink : public Exchange, public MessageSink { public: ExchangeSink(const Address& name); void declare(qpid::client::AsyncSession& session, const std::string& name); void send(qpid::client::AsyncSession& session, const std::string& name, OutgoingMessage& message); void cancel(qpid::client::AsyncSession& session, const std::string& name); private: }; class QueueSink : public Queue, public MessageSink { public: QueueSink(const Address& name); void declare(qpid::client::AsyncSession& session, const std::string& name); void send(qpid::client::AsyncSession& session, const std::string& name, OutgoingMessage& message); void cancel(qpid::client::AsyncSession& session, const std::string& name); private: }; bool isQueue(qpid::client::Session session, const qpid::messaging::Address& address); bool isTopic(qpid::client::Session session, const qpid::messaging::Address& address); bool in(const Variant& value, const std::vector& choices) { if (!value.isVoid()) { for (std::vector::const_iterator i = choices.begin(); i != choices.end(); ++i) { if (value.asString() == *i) return true; } } return false; } const Variant& getOption(const Variant::Map& options, const std::string& name) { Variant::Map::const_iterator j = options.find(name); if (j == options.end()) { return EMPTY_VARIANT; } else { return j->second; } } const Variant& getOption(const Address& address, const std::string& name) { return getOption(address.getOptions(), name); } bool getReceiverPolicy(const Address& address, const std::string& key) { return in(getOption(address, key), list_of(ALWAYS)(RECEIVER)); } bool getSenderPolicy(const Address& address, const std::string& key) { return in(getOption(address, key), list_of(ALWAYS)(SENDER)); } struct Opt { Opt(const Address& address); Opt(const Variant::Map& base); Opt& operator/(const std::string& name); operator bool() const; std::string str() const; bool asBool(bool defaultValue) const; const Variant::List& asList() const; void collect(qpid::framing::FieldTable& args) const; const Variant::Map* options; const Variant* value; }; Opt::Opt(const Address& address) : options(&(address.getOptions())), value(0) {} Opt::Opt(const Variant::Map& base) : options(&base), value(0) {} Opt& Opt::operator/(const std::string& name) { if (options) { Variant::Map::const_iterator j = options->find(name); if (j == options->end()) { value = 0; options = 0; } else { value = &(j->second); if (value->getType() == VAR_MAP) options = &(value->asMap()); else options = 0; } } return *this; } Opt::operator bool() const { return value && !value->isVoid() && value->asBool(); } bool Opt::asBool(bool defaultValue) const { if (value) return value->asBool(); else return defaultValue; } std::string Opt::str() const { if (value) return value->asString(); else return EMPTY_STRING; } const Variant::List& Opt::asList() const { if (value) return value->asList(); else return EMPTY_LIST; } void Opt::collect(qpid::framing::FieldTable& args) const { if (value) { translate(value->asMap(), args); } } bool AddressResolution::is_unreliable(const Address& address) { return in((Opt(address)/LINK/RELIABILITY).str(), list_of(UNRELIABLE)(AT_MOST_ONCE)); } bool AddressResolution::is_reliable(const Address& address) { return in((Opt(address)/LINK/RELIABILITY).str(), list_of(AT_LEAST_ONCE)(EXACTLY_ONCE)); } std::string checkAddressType(qpid::client::Session session, const Address& address) { verifier.verify(address); if (address.getName().empty()) { throw MalformedAddress("Name cannot be null"); } std::string type = (Opt(address)/NODE/TYPE).str(); if (type.empty()) { ExchangeBoundResult result = session.exchangeBound(arg::exchange=address.getName(), arg::queue=address.getName()); if (result.getQueueNotFound() && result.getExchangeNotFound()) { //neither a queue nor an exchange exists with that name; treat it as a queue type = QUEUE_ADDRESS; } else if (result.getExchangeNotFound()) { //name refers to a queue type = QUEUE_ADDRESS; } else if (result.getQueueNotFound()) { //name refers to an exchange type = TOPIC_ADDRESS; } else { //both a queue and exchange exist for that name throw ResolutionError("Ambiguous address, please specify queue or topic as node type"); } } return type; } std::auto_ptr AddressResolution::resolveSource(qpid::client::Session session, const Address& address) { std::string type = checkAddressType(session, address); if (type == TOPIC_ADDRESS) { std::string exchangeType = sync(session).exchangeQuery(address.getName()).getType(); std::auto_ptr source(new Subscription(address, exchangeType)); QPID_LOG(debug, "treating source address as topic: " << address); return source; } else if (type == QUEUE_ADDRESS) { std::auto_ptr source(new QueueSource(address)); QPID_LOG(debug, "treating source address as queue: " << address); return source; } else { throw ResolutionError("Unrecognised type: " + type); } } std::auto_ptr AddressResolution::resolveSink(qpid::client::Session session, const qpid::messaging::Address& address) { std::string type = checkAddressType(session, address); if (type == TOPIC_ADDRESS) { std::auto_ptr sink(new ExchangeSink(address)); QPID_LOG(debug, "treating target address as topic: " << address); return sink; } else if (type == QUEUE_ADDRESS) { std::auto_ptr sink(new QueueSink(address)); QPID_LOG(debug, "treating target address as queue: " << address); return sink; } else { throw ResolutionError("Unrecognised type: " + type); } } bool isBrowse(const Address& address) { const Variant& mode = getOption(address, MODE); if (!mode.isVoid()) { std::string value = mode.asString(); if (value == BROWSE) return true; else if (value != CONSUME) throw ResolutionError("Invalid mode"); } return false; } QueueSource::QueueSource(const Address& address) : Queue(address), acceptMode(AddressResolution::is_unreliable(address) ? ACCEPT_MODE_NONE : ACCEPT_MODE_EXPLICIT), acquireMode(isBrowse(address) ? ACQUIRE_MODE_NOT_ACQUIRED : ACQUIRE_MODE_PRE_ACQUIRED), exclusive(false) { //extract subscription arguments from address options (nb: setting //of accept-mode/acquire-mode/destination controlled though other //options) exclusive = Opt(address)/LINK/X_SUBSCRIBE/EXCLUSIVE; (Opt(address)/LINK/X_SUBSCRIBE/ARGUMENTS).collect(options); } void QueueSource::subscribe(qpid::client::AsyncSession& session, const std::string& destination) { checkCreate(session, FOR_RECEIVER); checkAssert(session, FOR_RECEIVER); linkBindings.bind(session); session.messageSubscribe(arg::queue=name, arg::destination=destination, arg::acceptMode=acceptMode, arg::acquireMode=acquireMode, arg::exclusive=exclusive, arg::arguments=options); } void QueueSource::cancel(qpid::client::AsyncSession& session, const std::string& destination) { linkBindings.unbind(session); session.messageCancel(destination); checkDelete(session, FOR_RECEIVER); } std::string Subscription::getSubscriptionName(const std::string& base, const std::string& name) { if (name.empty()) { return (boost::format("%1%_%2%") % base % Uuid(true).str()).str(); } else { return name; } } Subscription::Subscription(const Address& address, const std::string& type) : Exchange(address), queue(getSubscriptionName(name, (Opt(address)/LINK/NAME).str())), reliable(AddressResolution::is_reliable(address)), durable(Opt(address)/LINK/DURABLE), actualType(type.empty() ? (specifiedType.empty() ? TOPIC_EXCHANGE : specifiedType) : type), exclusiveQueue((Opt(address)/LINK/X_DECLARE/EXCLUSIVE).asBool(true)), exclusiveSubscription((Opt(address)/LINK/X_SUBSCRIBE/EXCLUSIVE).asBool(exclusiveQueue)) { (Opt(address)/LINK/X_DECLARE/ARGUMENTS).collect(queueOptions); (Opt(address)/LINK/X_SUBSCRIBE/ARGUMENTS).collect(subscriptionOptions); if (!address.getSubject().empty()) bindSubject(address.getSubject()); else if (linkBindings.empty()) bindAll(); } void Subscription::bindSubject(const std::string& subject) { if (actualType == HEADERS_EXCHANGE) { Binding b(name, queue, subject); b.arguments.setString("qpid.subject", subject); b.arguments.setString("x-match", "all"); bindings.push_back(b); } else if (actualType == XML_EXCHANGE) { Binding b(name, queue, subject); std::string query = (boost::format("declare variable $qpid.subject external; $qpid.subject = '%1%'") % subject).str(); b.arguments.setString("xquery", query); bindings.push_back(b); } else { //Note: the fanout exchange doesn't support any filtering, so //the subject is ignored in that case add(name, subject); } } void Subscription::bindAll() { if (actualType == TOPIC_EXCHANGE) { add(name, WILDCARD_ANY); } else if (actualType == FANOUT_EXCHANGE) { add(name, queue); } else if (actualType == HEADERS_EXCHANGE) { Binding b(name, queue, "match-all"); b.arguments.setString("x-match", "all"); bindings.push_back(b); } else if (actualType == XML_EXCHANGE) { Binding b(name, queue, EMPTY_STRING); b.arguments.setString("xquery", "true()"); bindings.push_back(b); } else { add(name, EMPTY_STRING); } } void Subscription::add(const std::string& exchange, const std::string& key) { bindings.push_back(Binding(exchange, queue, key)); } void Subscription::subscribe(qpid::client::AsyncSession& session, const std::string& destination) { //create exchange if required and specified by policy: checkCreate(session, FOR_RECEIVER); checkAssert(session, FOR_RECEIVER); //create subscription queue: session.queueDeclare(arg::queue=queue, arg::exclusive=exclusiveQueue, arg::autoDelete=!reliable, arg::durable=durable, arg::arguments=queueOptions); //'default' binding: bindings.bind(session); //any explicit bindings: linkBindings.setDefaultQueue(queue); linkBindings.bind(session); //subscribe to subscription queue: AcceptMode accept = reliable ? ACCEPT_MODE_EXPLICIT : ACCEPT_MODE_NONE; session.messageSubscribe(arg::queue=queue, arg::destination=destination, arg::exclusive=exclusiveSubscription, arg::acceptMode=accept, arg::arguments=subscriptionOptions); } void Subscription::cancel(qpid::client::AsyncSession& session, const std::string& destination) { linkBindings.unbind(session); session.messageCancel(destination); if (exclusiveQueue) session.queueDelete(arg::queue=queue, arg::ifUnused=true); checkDelete(session, FOR_RECEIVER); } ExchangeSink::ExchangeSink(const Address& address) : Exchange(address) {} void ExchangeSink::declare(qpid::client::AsyncSession& session, const std::string&) { checkCreate(session, FOR_SENDER); checkAssert(session, FOR_SENDER); linkBindings.bind(session); } void ExchangeSink::send(qpid::client::AsyncSession& session, const std::string&, OutgoingMessage& m) { m.message.getDeliveryProperties().setRoutingKey(m.getSubject()); m.status = session.messageTransfer(arg::destination=name, arg::content=m.message); QPID_LOG(debug, "Sending to exchange " << name << " " << m.message.getMessageProperties() << " " << m.message.getDeliveryProperties()); } void ExchangeSink::cancel(qpid::client::AsyncSession& session, const std::string&) { linkBindings.unbind(session); checkDelete(session, FOR_SENDER); } QueueSink::QueueSink(const Address& address) : Queue(address) {} void QueueSink::declare(qpid::client::AsyncSession& session, const std::string&) { checkCreate(session, FOR_SENDER); checkAssert(session, FOR_SENDER); linkBindings.bind(session); } void QueueSink::send(qpid::client::AsyncSession& session, const std::string&, OutgoingMessage& m) { m.message.getDeliveryProperties().setRoutingKey(name); m.status = session.messageTransfer(arg::content=m.message); QPID_LOG(debug, "Sending to queue " << name << " " << m.message.getMessageProperties() << " " << m.message.getDeliveryProperties()); } void QueueSink::cancel(qpid::client::AsyncSession& session, const std::string&) { linkBindings.unbind(session); checkDelete(session, FOR_SENDER); } Address AddressResolution::convert(const qpid::framing::ReplyTo& rt) { Address address; if (rt.getExchange().empty()) {//if default exchange, treat as queue address.setName(rt.getRoutingKey()); address.setType(QUEUE_ADDRESS); } else { address.setName(rt.getExchange()); address.setSubject(rt.getRoutingKey()); address.setType(TOPIC_ADDRESS); } return address; } qpid::framing::ReplyTo AddressResolution::convert(const Address& address) { if (address.getType() == QUEUE_ADDRESS || address.getType().empty()) { return ReplyTo(EMPTY_STRING, address.getName()); } else if (address.getType() == TOPIC_ADDRESS) { return ReplyTo(address.getName(), address.getSubject()); } else { QPID_LOG(notice, "Unrecognised type for reply-to: " << address.getType()); return ReplyTo(EMPTY_STRING, address.getName());//treat as queue } } bool isQueue(qpid::client::Session session, const qpid::messaging::Address& address) { return address.getType() == QUEUE_ADDRESS || (address.getType().empty() && session.queueQuery(address.getName()).getQueue() == address.getName()); } bool isTopic(qpid::client::Session session, const qpid::messaging::Address& address) { if (address.getType().empty()) { return !session.exchangeQuery(address.getName()).getNotFound(); } else if (address.getType() == TOPIC_ADDRESS) { return true; } else { return false; } } Node::Node(const Address& address) : name(address.getName()), createPolicy(getOption(address, CREATE)), assertPolicy(getOption(address, ASSERT)), deletePolicy(getOption(address, DELETE)) { nodeBindings.add((Opt(address)/NODE/X_BINDINGS).asList()); linkBindings.add((Opt(address)/LINK/X_BINDINGS).asList()); } Queue::Queue(const Address& a) : Node(a), durable(Opt(a)/NODE/DURABLE), autoDelete(Opt(a)/NODE/X_DECLARE/AUTO_DELETE), exclusive(Opt(a)/NODE/X_DECLARE/EXCLUSIVE), alternateExchange((Opt(a)/NODE/X_DECLARE/ALTERNATE_EXCHANGE).str()) { (Opt(a)/NODE/X_DECLARE/ARGUMENTS).collect(arguments); nodeBindings.setDefaultQueue(name); linkBindings.setDefaultQueue(name); } void Queue::checkCreate(qpid::client::AsyncSession& session, CheckMode mode) { if (enabled(createPolicy, mode)) { QPID_LOG(debug, "Auto-creating queue '" << name << "'"); try { session.queueDeclare(arg::queue=name, arg::durable=durable, arg::autoDelete=autoDelete, arg::exclusive=exclusive, arg::alternateExchange=alternateExchange, arg::arguments=arguments); nodeBindings.bind(session); session.sync(); } catch (const qpid::framing::ResourceLockedException& e) { throw ResolutionError((boost::format("Creation failed for queue %1%; %2%") % name % e.what()).str()); } catch (const qpid::framing::NotAllowedException& e) { throw ResolutionError((boost::format("Creation failed for queue %1%; %2%") % name % e.what()).str()); } catch (const qpid::framing::NotFoundException& e) {//may be thrown when creating bindings throw ResolutionError((boost::format("Creation failed for queue %1%; %2%") % name % e.what()).str()); } } else { try { sync(session).queueDeclare(arg::queue=name, arg::passive=true); } catch (const qpid::framing::NotFoundException& /*e*/) { throw NotFound((boost::format("Queue %1% does not exist") % name).str()); } } } void Queue::checkDelete(qpid::client::AsyncSession& session, CheckMode mode) { //Note: queue-delete will cause a session exception if the queue //does not exist, the query here prevents obvious cases of this //but there is a race whenever two deletions are made concurrently //so careful use of the delete policy is recommended at present if (enabled(deletePolicy, mode) && sync(session).queueQuery(name).getQueue() == name) { QPID_LOG(debug, "Auto-deleting queue '" << name << "'"); sync(session).queueDelete(arg::queue=name); } } void Queue::checkAssert(qpid::client::AsyncSession& session, CheckMode mode) { if (enabled(assertPolicy, mode)) { QueueQueryResult result = sync(session).queueQuery(name); if (result.getQueue() != name) { throw NotFound((boost::format("Queue not found: %1%") % name).str()); } else { if (durable && !result.getDurable()) { throw AssertionFailed((boost::format("Queue not durable: %1%") % name).str()); } if (autoDelete && !result.getAutoDelete()) { throw AssertionFailed((boost::format("Queue not set to auto-delete: %1%") % name).str()); } if (exclusive && !result.getExclusive()) { throw AssertionFailed((boost::format("Queue not exclusive: %1%") % name).str()); } if (!alternateExchange.empty() && result.getAlternateExchange() != alternateExchange) { throw AssertionFailed((boost::format("Alternate exchange does not match for %1%, expected %2%, got %3%") % name % alternateExchange % result.getAlternateExchange()).str()); } for (FieldTable::ValueMap::const_iterator i = arguments.begin(); i != arguments.end(); ++i) { FieldTable::ValuePtr v = result.getArguments().get(i->first); if (!v) { throw AssertionFailed((boost::format("Option %1% not set for %2%") % i->first % name).str()); } else if (*i->second != *v) { throw AssertionFailed((boost::format("Option %1% does not match for %2%, expected %3%, got %4%") % i->first % name % *(i->second) % *v).str()); } } nodeBindings.check(session); } } } Exchange::Exchange(const Address& a) : Node(a), specifiedType((Opt(a)/NODE/X_DECLARE/TYPE).str()), durable(Opt(a)/NODE/DURABLE), autoDelete(Opt(a)/NODE/X_DECLARE/AUTO_DELETE), alternateExchange((Opt(a)/NODE/X_DECLARE/ALTERNATE_EXCHANGE).str()) { (Opt(a)/NODE/X_DECLARE/ARGUMENTS).collect(arguments); nodeBindings.setDefaultExchange(name); linkBindings.setDefaultExchange(name); } bool Exchange::isReservedName() { return name.find(PREFIX_AMQ) != std::string::npos || name.find(PREFIX_QPID) != std::string::npos; } void Exchange::checkCreate(qpid::client::AsyncSession& session, CheckMode mode) { if (enabled(createPolicy, mode)) { try { if (isReservedName()) { try { sync(session).exchangeDeclare(arg::exchange=name, arg::passive=true); } catch (const qpid::framing::NotFoundException& /*e*/) { throw ResolutionError((boost::format("Cannot create exchange %1%; names beginning with \"amq.\" or \"qpid.\" are reserved.") % name).str()); } } else { std::string type = specifiedType; if (type.empty()) type = TOPIC_EXCHANGE; session.exchangeDeclare(arg::exchange=name, arg::type=type, arg::durable=durable, arg::autoDelete=autoDelete, arg::alternateExchange=alternateExchange, arg::arguments=arguments); } nodeBindings.bind(session); session.sync(); } catch (const qpid::framing::NotAllowedException& e) { throw ResolutionError((boost::format("Create failed for exchange %1%; %2%") % name % e.what()).str()); } catch (const qpid::framing::NotFoundException& e) {//can be caused when creating bindings throw ResolutionError((boost::format("Create failed for exchange %1%; %2%") % name % e.what()).str()); } } else { try { sync(session).exchangeDeclare(arg::exchange=name, arg::passive=true); } catch (const qpid::framing::NotFoundException& /*e*/) { throw NotFound((boost::format("Exchange %1% does not exist") % name).str()); } } } void Exchange::checkDelete(qpid::client::AsyncSession& session, CheckMode mode) { //Note: exchange-delete will cause a session exception if the //exchange does not exist, the query here prevents obvious cases //of this but there is a race whenever two deletions are made //concurrently so careful use of the delete policy is recommended //at present if (enabled(deletePolicy, mode) && !sync(session).exchangeQuery(name).getNotFound()) { sync(session).exchangeDelete(arg::exchange=name); } } void Exchange::checkAssert(qpid::client::AsyncSession& session, CheckMode mode) { if (enabled(assertPolicy, mode)) { ExchangeQueryResult result = sync(session).exchangeQuery(name); if (result.getNotFound()) { throw NotFound((boost::format("Exchange not found: %1%") % name).str()); } else { if (specifiedType.size() && result.getType() != specifiedType) { throw AssertionFailed((boost::format("Exchange %1% is of incorrect type, expected %2% but got %3%") % name % specifiedType % result.getType()).str()); } if (durable && !result.getDurable()) { throw AssertionFailed((boost::format("Exchange not durable: %1%") % name).str()); } //Note: Can't check auto-delete or alternate-exchange via //exchange-query-result as these are not returned //TODO: could use a passive declare to check alternate-exchange for (FieldTable::ValueMap::const_iterator i = arguments.begin(); i != arguments.end(); ++i) { FieldTable::ValuePtr v = result.getArguments().get(i->first); if (!v) { throw AssertionFailed((boost::format("Option %1% not set for %2%") % i->first % name).str()); } else if (*i->second != *v) { throw AssertionFailed((boost::format("Option %1% does not match for %2%, expected %3%, got %4%") % i->first % name % *(i->second) % *v).str()); } } nodeBindings.check(session); } } } Binding::Binding(const Variant::Map& b) : exchange((Opt(b)/EXCHANGE).str()), queue((Opt(b)/QUEUE).str()), key((Opt(b)/KEY).str()) { (Opt(b)/ARGUMENTS).collect(arguments); } Binding::Binding(const std::string& e, const std::string& q, const std::string& k) : exchange(e), queue(q), key(k) {} void Bindings::add(const Variant::List& list) { for (Variant::List::const_iterator i = list.begin(); i != list.end(); ++i) { push_back(Binding(i->asMap())); } } void Bindings::setDefaultExchange(const std::string& exchange) { for (Bindings::iterator i = begin(); i != end(); ++i) { if (i->exchange.empty()) i->exchange = exchange; } } void Bindings::setDefaultQueue(const std::string& queue) { for (Bindings::iterator i = begin(); i != end(); ++i) { if (i->queue.empty()) i->queue = queue; } } void Bindings::bind(qpid::client::AsyncSession& session) { for (Bindings::const_iterator i = begin(); i != end(); ++i) { session.exchangeBind(arg::queue=i->queue, arg::exchange=i->exchange, arg::bindingKey=i->key, arg::arguments=i->arguments); } } void Bindings::unbind(qpid::client::AsyncSession& session) { for (Bindings::const_iterator i = begin(); i != end(); ++i) { session.exchangeUnbind(arg::queue=i->queue, arg::exchange=i->exchange, arg::bindingKey=i->key); } } void Bindings::check(qpid::client::AsyncSession& session) { for (Bindings::const_iterator i = begin(); i != end(); ++i) { ExchangeBoundResult result = sync(session).exchangeBound(arg::queue=i->queue, arg::exchange=i->exchange, arg::bindingKey=i->key); if (result.getQueueNotMatched() || result.getKeyNotMatched()) { throw AssertionFailed((boost::format("No such binding [exchange=%1%, queue=%2%, key=%3%]") % i->exchange % i->queue % i->key).str()); } } } bool Node::enabled(const Variant& policy, CheckMode mode) { bool result = false; switch (mode) { case FOR_RECEIVER: result = in(policy, RECEIVER_MODES); break; case FOR_SENDER: result = in(policy, SENDER_MODES); break; } return result; } bool Node::createEnabled(const Address& address, CheckMode mode) { const Variant& policy = getOption(address, CREATE); return enabled(policy, mode); } void Node::convert(const Variant& options, FieldTable& arguments) { if (!options.isVoid()) { translate(options.asMap(), arguments); } } std::vector Node::RECEIVER_MODES = list_of(ALWAYS) (RECEIVER); std::vector Node::SENDER_MODES = list_of(ALWAYS) (SENDER); Verifier::Verifier() { defined[CREATE] = true; defined[ASSERT] = true; defined[DELETE] = true; defined[MODE] = true; Variant::Map node; node[TYPE] = true; node[DURABLE] = true; node[X_DECLARE] = true; node[X_BINDINGS] = true; defined[NODE] = node; Variant::Map link; link[NAME] = true; link[DURABLE] = true; link[RELIABILITY] = true; link[X_SUBSCRIBE] = true; link[X_DECLARE] = true; link[X_BINDINGS] = true; defined[LINK] = link; } void Verifier::verify(const Address& address) const { verify(defined, address.getOptions()); } void Verifier::verify(const Variant::Map& allowed, const Variant::Map& actual) const { for (Variant::Map::const_iterator i = actual.begin(); i != actual.end(); ++i) { Variant::Map::const_iterator option = allowed.find(i->first); if (option == allowed.end()) { throw AddressError((boost::format("Unrecognised option: %1%") % i->first).str()); } else if (option->second.getType() == qpid::types::VAR_MAP) { verify(option->second.asMap(), i->second.asMap()); } } } }}} // namespace qpid::client::amqp0_10 qpidc-0.16/src/qpid/client/amqp0_10/IncomingMessages.cpp0000664000076400007640000003062311717465066023434 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/amqp0_10/IncomingMessages.h" #include "qpid/client/amqp0_10/AddressResolution.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/client/SessionImpl.h" #include "qpid/client/SessionBase_0_10Access.h" #include "qpid/log/Statement.h" #include "qpid/messaging/Address.h" #include "qpid/messaging/Duration.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/MessageImpl.h" #include "qpid/types/Variant.h" #include "qpid/framing/DeliveryProperties.h" #include "qpid/framing/FrameSet.h" #include "qpid/framing/MessageProperties.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/enum.h" namespace qpid { namespace client { namespace amqp0_10 { using namespace qpid::framing; using namespace qpid::framing::message; using namespace qpid::amqp_0_10; using qpid::sys::AbsTime; using qpid::sys::Duration; using qpid::messaging::MessageImplAccess; using qpid::types::Variant; namespace { const std::string EMPTY_STRING; struct GetNone : IncomingMessages::Handler { bool accept(IncomingMessages::MessageTransfer&) { return false; } }; struct GetAny : IncomingMessages::Handler { bool accept(IncomingMessages::MessageTransfer& transfer) { transfer.retrieve(0); return true; } }; struct MatchAndTrack { const std::string destination; SequenceSet ids; MatchAndTrack(const std::string& d) : destination(d) {} bool operator()(boost::shared_ptr command) { if (command->as()->getDestination() == destination) { ids.add(command->getId()); return true; } else { return false; } } }; struct Match { const std::string destination; uint32_t matched; Match(const std::string& d) : destination(d), matched(0) {} bool operator()(boost::shared_ptr command) { if (command->as()->getDestination() == destination) { ++matched; return true; } else { return false; } } }; } void IncomingMessages::setSession(qpid::client::AsyncSession s) { sys::Mutex::ScopedLock l(lock); session = s; incoming = SessionBase_0_10Access(session).get()->getDemux().getDefault(); acceptTracker.reset(); } bool IncomingMessages::get(Handler& handler, Duration timeout) { { sys::Mutex::ScopedLock l(lock); //search through received list for any transfer of interest: for (FrameSetQueue::iterator i = received.begin(); i != received.end(); i++) { MessageTransfer transfer(*i, *this); if (handler.accept(transfer)) { received.erase(i); return true; } } } //none found, check incoming: return process(&handler, timeout); } bool IncomingMessages::getNextDestination(std::string& destination, Duration timeout) { sys::Mutex::ScopedLock l(lock); //if there is not already a received message, we must wait for one if (received.empty() && !wait(timeout)) return false; //else we have a message in received; return the corresponding destination destination = received.front()->as()->getDestination(); return true; } void IncomingMessages::accept() { sys::Mutex::ScopedLock l(lock); acceptTracker.accept(session); } void IncomingMessages::accept(qpid::framing::SequenceNumber id, bool cumulative) { sys::Mutex::ScopedLock l(lock); acceptTracker.accept(id, session, cumulative); } void IncomingMessages::releaseAll() { { //first process any received messages... sys::Mutex::ScopedLock l(lock); while (!received.empty()) { retrieve(received.front(), 0); received.pop_front(); } } //then pump out any available messages from incoming queue... GetAny handler; while (process(&handler, 0)) ; //now release all messages sys::Mutex::ScopedLock l(lock); acceptTracker.release(session); } void IncomingMessages::releasePending(const std::string& destination) { //first pump all available messages from incoming to received... while (process(0, 0)) ; //now remove all messages for this destination from received list, recording their ids... sys::Mutex::ScopedLock l(lock); MatchAndTrack match(destination); for (FrameSetQueue::iterator i = received.begin(); i != received.end(); i = match(*i) ? received.erase(i) : ++i) ; //now release those messages session.messageRelease(match.ids); } /** * Get a frameset that is accepted by the specified handler from * session queue, waiting for up to the specified duration and * returning true if this could be achieved, false otherwise. Messages * that are not accepted by the handler are pushed onto received queue * for later retrieval. */ bool IncomingMessages::process(Handler* handler, qpid::sys::Duration duration) { AbsTime deadline(AbsTime::now(), duration); FrameSet::shared_ptr content; try { for (Duration timeout = duration; incoming->pop(content, timeout); timeout = Duration(AbsTime::now(), deadline)) { if (content->isA()) { MessageTransfer transfer(content, *this); if (handler && handler->accept(transfer)) { QPID_LOG(debug, "Delivered " << *content->getMethod() << " " << *content->getHeaders()); return true; } else { //received message for another destination, keep for later QPID_LOG(debug, "Pushed " << *content->getMethod() << " to received queue"); sys::Mutex::ScopedLock l(lock); received.push_back(content); } } else { //TODO: handle other types of commands (e.g. message-accept, message-flow etc) } } } catch (const qpid::ClosedException&) {} // Just return false if queue closed. return false; } bool IncomingMessages::wait(qpid::sys::Duration duration) { AbsTime deadline(AbsTime::now(), duration); FrameSet::shared_ptr content; for (Duration timeout = duration; incoming->pop(content, timeout); timeout = Duration(AbsTime::now(), deadline)) { if (content->isA()) { QPID_LOG(debug, "Pushed " << *content->getMethod() << " to received queue"); sys::Mutex::ScopedLock l(lock); received.push_back(content); return true; } else { //TODO: handle other types of commands (e.g. message-accept, message-flow etc) } } return false; } uint32_t IncomingMessages::pendingAccept() { sys::Mutex::ScopedLock l(lock); return acceptTracker.acceptsPending(); } uint32_t IncomingMessages::pendingAccept(const std::string& destination) { sys::Mutex::ScopedLock l(lock); return acceptTracker.acceptsPending(destination); } uint32_t IncomingMessages::available() { //first pump all available messages from incoming to received... while (process(0, 0)) {} //return the count of received messages sys::Mutex::ScopedLock l(lock); return received.size(); } uint32_t IncomingMessages::available(const std::string& destination) { //first pump all available messages from incoming to received... while (process(0, 0)) {} //count all messages for this destination from received list sys::Mutex::ScopedLock l(lock); return std::for_each(received.begin(), received.end(), Match(destination)).matched; } void populate(qpid::messaging::Message& message, FrameSet& command); /** * Called when message is retrieved; records retrieval for subsequent * acceptance, marks the command as completed and converts command to * message if message is required */ void IncomingMessages::retrieve(FrameSetPtr command, qpid::messaging::Message* message) { if (message) { populate(*message, *command); } const MessageTransferBody* transfer = command->as(); if (transfer->getAcceptMode() == ACCEPT_MODE_EXPLICIT) { sys::Mutex::ScopedLock l(lock); acceptTracker.delivered(transfer->getDestination(), command->getId()); } session.markCompleted(command->getId(), false, false); } IncomingMessages::MessageTransfer::MessageTransfer(FrameSetPtr c, IncomingMessages& p) : content(c), parent(p) {} const std::string& IncomingMessages::MessageTransfer::getDestination() { return content->as()->getDestination(); } void IncomingMessages::MessageTransfer::retrieve(qpid::messaging::Message* message) { parent.retrieve(content, message); } namespace { //TODO: unify conversion to and from 0-10 message that is currently //split between IncomingMessages and OutgoingMessage const std::string SUBJECT("qpid.subject"); const std::string X_APP_ID("x-amqp-0-10.app-id"); const std::string X_ROUTING_KEY("x-amqp-0-10.routing-key"); const std::string X_CONTENT_ENCODING("x-amqp-0-10.content-encoding"); const std::string X_TIMESTAMP("x-amqp-0-10.timestamp"); } void populateHeaders(qpid::messaging::Message& message, const DeliveryProperties* deliveryProperties, const MessageProperties* messageProperties) { if (deliveryProperties) { message.setTtl(qpid::messaging::Duration(deliveryProperties->getTtl())); message.setDurable(deliveryProperties->getDeliveryMode() == DELIVERY_MODE_PERSISTENT); message.setPriority(deliveryProperties->getPriority()); message.setRedelivered(deliveryProperties->getRedelivered()); } if (messageProperties) { message.setContentType(messageProperties->getContentType()); if (messageProperties->hasReplyTo()) { message.setReplyTo(AddressResolution::convert(messageProperties->getReplyTo())); } message.setSubject(messageProperties->getApplicationHeaders().getAsString(SUBJECT)); message.getProperties().clear(); translate(messageProperties->getApplicationHeaders(), message.getProperties()); message.setCorrelationId(messageProperties->getCorrelationId()); message.setUserId(messageProperties->getUserId()); if (messageProperties->hasMessageId()) { message.setMessageId(messageProperties->getMessageId().str()); } //expose 0-10 specific items through special properties: // app-id, content-encoding if (messageProperties->hasAppId()) { message.getProperties()[X_APP_ID] = messageProperties->getAppId(); } if (messageProperties->hasContentEncoding()) { message.getProperties()[X_CONTENT_ENCODING] = messageProperties->getContentEncoding(); } // routing-key, timestamp, others? if (deliveryProperties && deliveryProperties->hasRoutingKey()) { message.getProperties()[X_ROUTING_KEY] = deliveryProperties->getRoutingKey(); } if (deliveryProperties && deliveryProperties->hasTimestamp()) { message.getProperties()[X_TIMESTAMP] = deliveryProperties->getTimestamp(); } } } void populateHeaders(qpid::messaging::Message& message, const AMQHeaderBody* headers) { populateHeaders(message, headers->get(), headers->get()); } void populate(qpid::messaging::Message& message, FrameSet& command) { //need to be able to link the message back to the transfer it was delivered by //e.g. for rejecting. MessageImplAccess::get(message).setInternalId(command.getId()); message.setContent(command.getContent()); populateHeaders(message, command.getHeaders()); } }}} // namespace qpid::client::amqp0_10 qpidc-0.16/src/qpid/client/amqp0_10/ReceiverImpl.cpp0000664000076400007640000001370011526224575022560 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "ReceiverImpl.h" #include "AddressResolution.h" #include "MessageSource.h" #include "SessionImpl.h" #include "qpid/messaging/exceptions.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Session.h" namespace qpid { namespace client { namespace amqp0_10 { using qpid::messaging::NoMessageAvailable; using qpid::messaging::Receiver; using qpid::messaging::Duration; void ReceiverImpl::received(qpid::messaging::Message&) { //TODO: should this be configurable sys::Mutex::ScopedLock l(lock); if (capacity && --window <= capacity/2) { session.sendCompletion(); window = capacity; } } qpid::messaging::Message ReceiverImpl::get(qpid::messaging::Duration timeout) { qpid::messaging::Message result; if (!get(result, timeout)) throw NoMessageAvailable(); return result; } qpid::messaging::Message ReceiverImpl::fetch(qpid::messaging::Duration timeout) { qpid::messaging::Message result; if (!fetch(result, timeout)) throw NoMessageAvailable(); return result; } bool ReceiverImpl::get(qpid::messaging::Message& message, qpid::messaging::Duration timeout) { Get f(*this, message, timeout); while (!parent->execute(f)) {} return f.result; } bool ReceiverImpl::fetch(qpid::messaging::Message& message, qpid::messaging::Duration timeout) { Fetch f(*this, message, timeout); while (!parent->execute(f)) {} return f.result; } void ReceiverImpl::close() { execute(); } void ReceiverImpl::start() { sys::Mutex::ScopedLock l(lock); if (state == STOPPED) { state = STARTED; startFlow(l); } } void ReceiverImpl::stop() { sys::Mutex::ScopedLock l(lock); state = STOPPED; session.messageStop(destination); } void ReceiverImpl::setCapacity(uint32_t c) { execute1(c); } void ReceiverImpl::startFlow(const sys::Mutex::ScopedLock&) { if (capacity > 0) { session.messageSetFlowMode(destination, FLOW_MODE_WINDOW); session.messageFlow(destination, CREDIT_UNIT_MESSAGE, capacity); session.messageFlow(destination, CREDIT_UNIT_BYTE, byteCredit); window = capacity; } } void ReceiverImpl::init(qpid::client::AsyncSession s, AddressResolution& resolver) { sys::Mutex::ScopedLock l(lock); session = s; if (state == CANCELLED) return; if (state == UNRESOLVED) { source = resolver.resolveSource(session, address); assert(source.get()); state = STARTED; } source->subscribe(session, destination); startFlow(l); } const std::string& ReceiverImpl::getName() const { sys::Mutex::ScopedLock l(lock); return destination; } uint32_t ReceiverImpl::getCapacity() { sys::Mutex::ScopedLock l(lock); return capacity; } uint32_t ReceiverImpl::getAvailable() { return parent->getReceivable(destination); } uint32_t ReceiverImpl::getUnsettled() { return parent->getUnsettledAcks(destination); } ReceiverImpl::ReceiverImpl(SessionImpl& p, const std::string& name, const qpid::messaging::Address& a) : parent(&p), destination(name), address(a), byteCredit(0xFFFFFFFF), state(UNRESOLVED), capacity(0), window(0) {} bool ReceiverImpl::getImpl(qpid::messaging::Message& message, qpid::messaging::Duration timeout) { { sys::Mutex::ScopedLock l(lock); if (state == CANCELLED) return false; } return parent->get(*this, message, timeout); } bool ReceiverImpl::fetchImpl(qpid::messaging::Message& message, qpid::messaging::Duration timeout) { { sys::Mutex::ScopedLock l(lock); if (state == CANCELLED) return false; if (capacity == 0 || state != STARTED) { session.messageSetFlowMode(destination, FLOW_MODE_CREDIT); session.messageFlow(destination, CREDIT_UNIT_MESSAGE, 1); session.messageFlow(destination, CREDIT_UNIT_BYTE, 0xFFFFFFFF); } } if (getImpl(message, timeout)) { return true; } else { qpid::client::Session s; { sys::Mutex::ScopedLock l(lock); if (state == CANCELLED) return false; // Might have been closed during get. s = sync(session); } s.messageFlush(destination); { sys::Mutex::ScopedLock l(lock); startFlow(l); //reallocate credit } return getImpl(message, Duration::IMMEDIATE); } } void ReceiverImpl::closeImpl() { sys::Mutex::ScopedLock l(lock); if (state != CANCELLED) { state = CANCELLED; sync(session).messageStop(destination); parent->releasePending(destination); source->cancel(session, destination); parent->receiverCancelled(destination); } } bool ReceiverImpl::isClosed() const { sys::Mutex::ScopedLock l(lock); return state == CANCELLED; } void ReceiverImpl::setCapacityImpl(uint32_t c) { sys::Mutex::ScopedLock l(lock); if (c != capacity) { capacity = c; if (state == STARTED) { session.messageStop(destination); startFlow(l); } } } qpid::messaging::Session ReceiverImpl::getSession() const { return qpid::messaging::Session(parent.get()); } }}} // namespace qpid::client::amqp0_10 qpidc-0.16/src/qpid/client/amqp0_10/ConnectionImpl.h0000664000076400007640000000550211717465066022565 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_CONNECTIONIMPL_H #define QPID_CLIENT_AMQP0_10_CONNECTIONIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ConnectionImpl.h" #include "qpid/types/Variant.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Semaphore.h" #include #include namespace qpid { struct Url; namespace client { namespace amqp0_10 { class SessionImpl; class ConnectionImpl : public qpid::messaging::ConnectionImpl { public: ConnectionImpl(const std::string& url, const qpid::types::Variant::Map& options); void open(); void reopen(); bool isOpen() const; void close(); qpid::messaging::Session newSession(bool transactional, const std::string& name); qpid::messaging::Session getSession(const std::string& name) const; void closed(SessionImpl&); void detach(); void setOption(const std::string& name, const qpid::types::Variant& value); bool backoff(); std::string getAuthenticatedUsername(); private: typedef std::map Sessions; mutable qpid::sys::Mutex lock;//used to protect data structures qpid::sys::Semaphore semaphore;//used to coordinate reconnection Sessions sessions; qpid::client::Connection connection; bool replaceUrls; // Replace rather than merging with reconnect-urls std::vector urls; qpid::client::ConnectionSettings settings; bool reconnect; double timeout; int32_t limit; double minReconnectInterval; double maxReconnectInterval; int32_t retries; bool reconnectOnLimitExceeded; void setOptions(const qpid::types::Variant::Map& options); void connect(const qpid::sys::AbsTime& started); bool tryConnect(); bool resetSessions(const sys::Mutex::ScopedLock&); // dummy parameter indicates call with lock held. void mergeUrls(const std::vector& more, const sys::Mutex::ScopedLock&); }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_CONNECTIONIMPL_H*/ qpidc-0.16/src/qpid/client/amqp0_10/MessageSource.h0000664000076400007640000000303611245023016022366 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_MESSAGESOURCE_H #define QPID_CLIENT_AMQP0_10_MESSAGESOURCE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/client/AsyncSession.h" namespace qpid { namespace client { namespace amqp0_10 { /** * Abstraction behind which the AMQP 0-10 commands required to * establish (and tear down) an incoming stream of messages from a * given address are hidden. */ class MessageSource { public: virtual ~MessageSource() {} virtual void subscribe(qpid::client::AsyncSession& session, const std::string& destination) = 0; virtual void cancel(qpid::client::AsyncSession& session, const std::string& destination) = 0; private: }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_MESSAGESOURCE_H*/ qpidc-0.16/src/qpid/client/amqp0_10/AcceptTracker.cpp0000664000076400007640000001026611601137462022701 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "AcceptTracker.h" namespace qpid { namespace client { namespace amqp0_10 { void AcceptTracker::State::accept() { unconfirmed.add(unaccepted); unaccepted.clear(); } SequenceSet AcceptTracker::State::accept(qpid::framing::SequenceNumber id, bool cumulative) { SequenceSet accepting; if (cumulative) { for (SequenceSet::iterator i = unaccepted.begin(); i != unaccepted.end() && *i <= id; ++i) { accepting.add(*i); } unconfirmed.add(accepting); unaccepted.remove(accepting); } else { if (unaccepted.contains(id)) { unaccepted.remove(id); unconfirmed.add(id); accepting.add(id); } } return accepting; } void AcceptTracker::State::release() { unaccepted.clear(); } uint32_t AcceptTracker::State::acceptsPending() { return unconfirmed.size(); } void AcceptTracker::State::completed(qpid::framing::SequenceSet& set) { unconfirmed.remove(set); } void AcceptTracker::delivered(const std::string& destination, const qpid::framing::SequenceNumber& id) { aggregateState.unaccepted.add(id); destinationState[destination].unaccepted.add(id); } namespace { const size_t FLUSH_FREQUENCY = 1024; } void AcceptTracker::addToPending(qpid::client::AsyncSession& session, const Record& record) { pending.push_back(record); if (pending.size() % FLUSH_FREQUENCY == 0) session.flush(); } void AcceptTracker::accept(qpid::client::AsyncSession& session) { for (StateMap::iterator i = destinationState.begin(); i != destinationState.end(); ++i) { i->second.accept(); } Record record; record.status = session.messageAccept(aggregateState.unaccepted); record.accepted = aggregateState.unaccepted; addToPending(session, record); aggregateState.accept(); } void AcceptTracker::accept(qpid::framing::SequenceNumber id, qpid::client::AsyncSession& session, bool cumulative) { for (StateMap::iterator i = destinationState.begin(); i != destinationState.end(); ++i) { i->second.accept(id, cumulative); } Record record; record.accepted = aggregateState.accept(id, cumulative); record.status = session.messageAccept(record.accepted); addToPending(session, record); } void AcceptTracker::release(qpid::client::AsyncSession& session) { session.messageRelease(aggregateState.unaccepted); for (StateMap::iterator i = destinationState.begin(); i != destinationState.end(); ++i) { i->second.release(); } aggregateState.release(); } uint32_t AcceptTracker::acceptsPending() { checkPending(); return aggregateState.acceptsPending(); } uint32_t AcceptTracker::acceptsPending(const std::string& destination) { checkPending(); return destinationState[destination].acceptsPending(); } void AcceptTracker::reset() { destinationState.clear(); aggregateState.unaccepted.clear(); aggregateState.unconfirmed.clear(); pending.clear(); } void AcceptTracker::checkPending() { while (!pending.empty() && pending.front().status.isComplete()) { completed(pending.front().accepted); pending.pop_front(); } } void AcceptTracker::completed(qpid::framing::SequenceSet& set) { for (StateMap::iterator i = destinationState.begin(); i != destinationState.end(); ++i) { i->second.completed(set); } aggregateState.completed(set); } }}} // namespace qpid::client::amqp0_10 qpidc-0.16/src/qpid/client/amqp0_10/ConnectionImpl.cpp0000664000076400007640000002714711723473271023123 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "ConnectionImpl.h" #include "SessionImpl.h" #include "qpid/messaging/exceptions.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/PrivateImplRef.h" #include "qpid/framing/Uuid.h" #include "qpid/log/Statement.h" #include "qpid/Url.h" #include #include #include #include namespace qpid { namespace client { namespace amqp0_10 { using qpid::types::Variant; using qpid::types::VAR_LIST; using qpid::framing::Uuid; namespace { const std::string TCP("tcp"); double FOREVER(std::numeric_limits::max()); // Time values in seconds can be specified as integer or floating point values. double timeValue(const Variant& value) { if (types::isIntegerType(value.getType())) return double(value.asInt64()); return value.asDouble(); } void merge(const std::string& value, std::vector& list) { if (std::find(list.begin(), list.end(), value) == list.end()) list.push_back(value); } void merge(const Variant::List& from, std::vector& to) { for (Variant::List::const_iterator i = from.begin(); i != from.end(); ++i) merge(i->asString(), to); } std::string asString(const std::vector& v) { std::stringstream os; os << "["; for(std::vector::const_iterator i = v.begin(); i != v.end(); ++i ) { if (i != v.begin()) os << ", "; os << *i; } os << "]"; return os.str(); } bool expired(const sys::AbsTime& start, double timeout) { if (timeout == 0) return true; if (timeout == FOREVER) return false; sys::Duration used(start, sys::now()); sys::Duration allowed(int64_t(timeout*sys::TIME_SEC)); return allowed < used; } } // namespace ConnectionImpl::ConnectionImpl(const std::string& url, const Variant::Map& options) : replaceUrls(false), reconnect(false), timeout(FOREVER), limit(-1), minReconnectInterval(0.001), maxReconnectInterval(2), retries(0), reconnectOnLimitExceeded(true) { setOptions(options); urls.insert(urls.begin(), url); QPID_LOG(debug, "Created connection " << url << " with " << options); } void ConnectionImpl::setOptions(const Variant::Map& options) { for (Variant::Map::const_iterator i = options.begin(); i != options.end(); ++i) { setOption(i->first, i->second); } } void ConnectionImpl::setOption(const std::string& name, const Variant& value) { sys::Mutex::ScopedLock l(lock); if (name == "reconnect") { reconnect = value; } else if (name == "reconnect-timeout" || name == "reconnect_timeout") { timeout = timeValue(value); } else if (name == "reconnect-limit" || name == "reconnect_limit") { limit = value; } else if (name == "reconnect-interval" || name == "reconnect_interval") { maxReconnectInterval = minReconnectInterval = timeValue(value); } else if (name == "reconnect-interval-min" || name == "reconnect_interval_min") { minReconnectInterval = timeValue(value); } else if (name == "reconnect-interval-max" || name == "reconnect_interval_max") { maxReconnectInterval = timeValue(value); } else if (name == "reconnect-urls-replace" || name == "reconnect_urls_replace") { replaceUrls = value.asBool(); } else if (name == "reconnect-urls" || name == "reconnect_urls") { if (replaceUrls) urls.clear(); if (value.getType() == VAR_LIST) { merge(value.asList(), urls); } else { merge(value.asString(), urls); } } else if (name == "username") { settings.username = value.asString(); } else if (name == "password") { settings.password = value.asString(); } else if (name == "sasl-mechanism" || name == "sasl_mechanism" || name == "sasl-mechanisms" || name == "sasl_mechanisms") { settings.mechanism = value.asString(); } else if (name == "sasl-service" || name == "sasl_service") { settings.service = value.asString(); } else if (name == "sasl-min-ssf" || name == "sasl_min_ssf") { settings.minSsf = value; } else if (name == "sasl-max-ssf" || name == "sasl_max_ssf") { settings.maxSsf = value; } else if (name == "heartbeat") { settings.heartbeat = value; } else if (name == "tcp-nodelay" || name == "tcp_nodelay") { settings.tcpNoDelay = value; } else if (name == "locale") { settings.locale = value.asString(); } else if (name == "max-channels" || name == "max_channels") { settings.maxChannels = value; } else if (name == "max-frame-size" || name == "max_frame_size") { settings.maxFrameSize = value; } else if (name == "bounds") { settings.bounds = value; } else if (name == "transport") { settings.protocol = value.asString(); } else if (name == "ssl-cert-name" || name == "ssl_cert_name") { settings.sslCertName = value.asString(); } else if (name == "x-reconnect-on-limit-exceeded" || name == "x_reconnect_on_limit_exceeded") { reconnectOnLimitExceeded = value; } else { throw qpid::messaging::MessagingException(QPID_MSG("Invalid option: " << name << " not recognised")); } } void ConnectionImpl::close() { while(true) { messaging::Session session; { qpid::sys::Mutex::ScopedLock l(lock); if (sessions.empty()) break; session = sessions.begin()->second; } session.close(); } detach(); } void ConnectionImpl::detach() { qpid::sys::Mutex::ScopedLock l(lock); connection.close(); } bool ConnectionImpl::isOpen() const { qpid::sys::Mutex::ScopedLock l(lock); return connection.isOpen(); } boost::intrusive_ptr getImplPtr(qpid::messaging::Session& session) { return boost::dynamic_pointer_cast( qpid::messaging::PrivateImplRef::get(session) ); } void ConnectionImpl::closed(SessionImpl& s) { qpid::sys::Mutex::ScopedLock l(lock); for (Sessions::iterator i = sessions.begin(); i != sessions.end(); ++i) { if (getImplPtr(i->second).get() == &s) { sessions.erase(i); break; } } } qpid::messaging::Session ConnectionImpl::getSession(const std::string& name) const { qpid::sys::Mutex::ScopedLock l(lock); Sessions::const_iterator i = sessions.find(name); if (i == sessions.end()) { throw qpid::messaging::KeyError("No such session: " + name); } else { return i->second; } } qpid::messaging::Session ConnectionImpl::newSession(bool transactional, const std::string& n) { std::string name = n.empty() ? Uuid(true).str() : n; qpid::messaging::Session impl(new SessionImpl(*this, transactional)); while (true) { try { getImplPtr(impl)->setSession(connection.newSession(name)); qpid::sys::Mutex::ScopedLock l(lock); sessions[name] = impl; break; } catch (const qpid::TransportFailure&) { reopen(); } catch (const qpid::SessionException& e) { throw qpid::messaging::SessionError(e.what()); } catch (const std::exception& e) { throw qpid::messaging::MessagingException(e.what()); } } return impl; } void ConnectionImpl::open() { qpid::sys::AbsTime start = qpid::sys::now(); qpid::sys::ScopedLock l(semaphore); try { if (!connection.isOpen()) connect(start); } catch (const types::Exception&) { throw; } catch (const qpid::Exception& e) { throw messaging::ConnectionError(e.what()); } } void ConnectionImpl::reopen() { if (!reconnect) { throw qpid::messaging::TransportFailure("Failed to connect (reconnect disabled)"); } open(); } void ConnectionImpl::connect(const qpid::sys::AbsTime& started) { QPID_LOG(debug, "Starting connection, urls=" << asString(urls)); for (double i = minReconnectInterval; !tryConnect(); i = std::min(i*2, maxReconnectInterval)) { if (!reconnect) { throw qpid::messaging::TransportFailure("Failed to connect (reconnect disabled)"); } if (limit >= 0 && retries++ >= limit) { throw qpid::messaging::TransportFailure("Failed to connect within reconnect limit"); } if (expired(started, timeout)) { throw qpid::messaging::TransportFailure("Failed to connect within reconnect timeout"); } QPID_LOG(debug, "Connection retry in " << i*1000*1000 << " microseconds, urls=" << asString(urls)); qpid::sys::usleep(int64_t(i*1000*1000)); // Sleep in microseconds. } QPID_LOG(debug, "Connection successful, urls=" << asString(urls)); retries = 0; } void ConnectionImpl::mergeUrls(const std::vector& more, const sys::Mutex::ScopedLock&) { for (std::vector::const_iterator i = more.begin(); i != more.end(); ++i) merge(i->str(), urls); QPID_LOG(debug, "Added known-hosts, reconnect-urls=" << asString(urls)); } bool ConnectionImpl::tryConnect() { sys::Mutex::ScopedLock l(lock); for (std::vector::const_iterator i = urls.begin(); i != urls.end(); ++i) { try { QPID_LOG(info, "Trying to connect to " << *i << "..."); Url url(*i, settings.protocol.size() ? settings.protocol : TCP); if (url.getUser().size()) settings.username = url.getUser(); if (url.getPass().size()) settings.password = url.getPass(); connection.open(url, settings); QPID_LOG(info, "Connected to " << *i); mergeUrls(connection.getInitialBrokers(), l); return resetSessions(l); } catch (const qpid::TransportFailure& e) { QPID_LOG(info, "Failed to connect to " << *i << ": " << e.what()); } } return false; } bool ConnectionImpl::resetSessions(const sys::Mutex::ScopedLock& ) { try { qpid::sys::Mutex::ScopedLock l(lock); for (Sessions::iterator i = sessions.begin(); i != sessions.end(); ++i) { getImplPtr(i->second)->setSession(connection.newSession(i->first)); } return true; } catch (const qpid::TransportFailure&) { QPID_LOG(debug, "Connection failed while re-initialising sessions"); return false; } catch (const qpid::framing::ResourceLimitExceededException& e) { if (reconnectOnLimitExceeded) { QPID_LOG(debug, "Detaching and reconnecting due to: " << e.what()); detach(); return false; } else { throw qpid::messaging::TargetCapacityExceeded(e.what()); } } } bool ConnectionImpl::backoff() { if (reconnectOnLimitExceeded) { detach(); open(); return true; } else { return false; } } std::string ConnectionImpl::getAuthenticatedUsername() { return connection.getNegotiatedSettings().username; } }}} // namespace qpid::client::amqp0_10 qpidc-0.16/src/qpid/client/amqp0_10/SessionImpl.cpp0000664000076400007640000003633111623234437022440 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/amqp0_10/SessionImpl.h" #include "qpid/client/amqp0_10/ConnectionImpl.h" #include "qpid/client/amqp0_10/ReceiverImpl.h" #include "qpid/client/amqp0_10/SenderImpl.h" #include "qpid/client/amqp0_10/MessageSource.h" #include "qpid/client/amqp0_10/MessageSink.h" #include "qpid/client/SessionBase_0_10Access.h" #include "qpid/client/SessionImpl.h" #include "qpid/messaging/PrivateImplRef.h" #include "qpid/Exception.h" #include "qpid/log/Statement.h" #include "qpid/messaging/Address.h" #include "qpid/messaging/Connection.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/MessageImpl.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Session.h" #include #include #include using qpid::messaging::KeyError; using qpid::messaging::NoMessageAvailable; using qpid::messaging::MessagingException; using qpid::messaging::TransactionAborted; using qpid::messaging::SessionError; using qpid::messaging::MessageImplAccess; using qpid::messaging::Sender; using qpid::messaging::Receiver; namespace qpid { namespace client { namespace amqp0_10 { typedef qpid::sys::Mutex::ScopedLock ScopedLock; typedef qpid::sys::Mutex::ScopedUnlock ScopedUnlock; SessionImpl::SessionImpl(ConnectionImpl& c, bool t) : connection(&c), transactional(t) {} void SessionImpl::checkError() { ScopedLock l(lock); qpid::client::SessionBase_0_10Access s(session); s.get()->assertOpen(); } bool SessionImpl::hasError() { ScopedLock l(lock); qpid::client::SessionBase_0_10Access s(session); return s.get()->hasError(); } void SessionImpl::sync(bool block) { if (block) retry(); else execute(); } void SessionImpl::commit() { if (!execute()) { throw TransactionAborted("Transaction aborted due to transport failure"); } } void SessionImpl::rollback() { //If the session fails during this operation, the transaction will //be rolled back anyway. execute(); } void SessionImpl::acknowledge(bool sync_) { //Should probably throw an exception on failure here, or indicate //it through a return type at least. Failure means that the //message may be redelivered; i.e. the application cannot delete //any state necessary for preventing reprocessing of the message execute(); sync(sync_); } void SessionImpl::reject(qpid::messaging::Message& m) { //Possibly want to somehow indicate failure here as well. Less //clear need as compared to acknowledge however. execute1(m); } void SessionImpl::release(qpid::messaging::Message& m) { execute1(m); } void SessionImpl::acknowledge(qpid::messaging::Message& m, bool cumulative) { //Should probably throw an exception on failure here, or indicate //it through a return type at least. Failure means that the //message may be redelivered; i.e. the application cannot delete //any state necessary for preventing reprocessing of the message Acknowledge2 ack(*this, m, cumulative); execute(ack); } void SessionImpl::close() { if (hasError()) { ScopedLock l(lock); senders.clear(); receivers.clear(); } else { Senders sCopy; Receivers rCopy; { ScopedLock l(lock); senders.swap(sCopy); receivers.swap(rCopy); } for (Senders::iterator i = sCopy.begin(); i != sCopy.end(); ++i) { // outside the lock, will call senderCancelled i->second.close(); } for (Receivers::iterator i = rCopy.begin(); i != rCopy.end(); ++i) { // outside the lock, will call receiverCancelled i->second.close(); } } connection->closed(*this); if (!hasError()) { ScopedLock l(lock); session.close(); } } template boost::intrusive_ptr getImplPtr(T& t) { return boost::dynamic_pointer_cast(qpid::messaging::PrivateImplRef::get(t)); } template void getFreeKey(std::string& key, T& map) { std::string name = key; int count = 1; for (typename T::const_iterator i = map.find(name); i != map.end(); i = map.find(name)) { name = (boost::format("%1%_%2%") % key % ++count).str(); } key = name; } void SessionImpl::setSession(qpid::client::Session s) { ScopedLock l(lock); session = s; incoming.setSession(session); if (transactional) session.txSelect(); for (Receivers::iterator i = receivers.begin(); i != receivers.end(); ++i) { getImplPtr(i->second)->init(session, resolver); } for (Senders::iterator i = senders.begin(); i != senders.end(); ++i) { getImplPtr(i->second)->init(session, resolver); } session.sync(); } struct SessionImpl::CreateReceiver : Command { qpid::messaging::Receiver result; const qpid::messaging::Address& address; CreateReceiver(SessionImpl& i, const qpid::messaging::Address& a) : Command(i), address(a) {} void operator()() { result = impl.createReceiverImpl(address); } }; Receiver SessionImpl::createReceiver(const qpid::messaging::Address& address) { return get1(address); } Receiver SessionImpl::createReceiverImpl(const qpid::messaging::Address& address) { ScopedLock l(lock); std::string name = address.getName(); getFreeKey(name, receivers); Receiver receiver(new ReceiverImpl(*this, name, address)); getImplPtr(receiver)->init(session, resolver); receivers[name] = receiver; return receiver; } struct SessionImpl::CreateSender : Command { qpid::messaging::Sender result; const qpid::messaging::Address& address; CreateSender(SessionImpl& i, const qpid::messaging::Address& a) : Command(i), address(a) {} void operator()() { result = impl.createSenderImpl(address); } }; Sender SessionImpl::createSender(const qpid::messaging::Address& address) { return get1(address); } Sender SessionImpl::createSenderImpl(const qpid::messaging::Address& address) { ScopedLock l(lock); std::string name = address.getName(); getFreeKey(name, senders); Sender sender(new SenderImpl(*this, name, address)); getImplPtr(sender)->init(session, resolver); senders[name] = sender; return sender; } Sender SessionImpl::getSender(const std::string& name) const { qpid::sys::Mutex::ScopedLock l(lock); Senders::const_iterator i = senders.find(name); if (i == senders.end()) { throw KeyError(name); } else { return i->second; } } Receiver SessionImpl::getReceiver(const std::string& name) const { qpid::sys::Mutex::ScopedLock l(lock); Receivers::const_iterator i = receivers.find(name); if (i == receivers.end()) { throw KeyError(name); } else { return i->second; } } SessionImpl& SessionImpl::convert(qpid::messaging::Session& s) { boost::intrusive_ptr impl = getImplPtr(s); if (!impl) { throw SessionError(QPID_MSG("Configuration error; require qpid::client::amqp0_10::SessionImpl")); } return *impl; } namespace { struct IncomingMessageHandler : IncomingMessages::Handler { typedef boost::function1 Callback; Callback callback; IncomingMessageHandler(Callback c) : callback(c) {} bool accept(IncomingMessages::MessageTransfer& transfer) { return callback(transfer); } }; } bool SessionImpl::getNextReceiver(Receiver* receiver, IncomingMessages::MessageTransfer& transfer) { ScopedLock l(lock); Receivers::const_iterator i = receivers.find(transfer.getDestination()); if (i == receivers.end()) { QPID_LOG(error, "Received message for unknown destination " << transfer.getDestination()); return false; } else { *receiver = i->second; return true; } } bool SessionImpl::accept(ReceiverImpl* receiver, qpid::messaging::Message* message, IncomingMessages::MessageTransfer& transfer) { if (receiver->getName() == transfer.getDestination()) { transfer.retrieve(message); receiver->received(*message); return true; } else { return false; } } qpid::sys::Duration adjust(qpid::messaging::Duration timeout) { uint64_t ms = timeout.getMilliseconds(); if (ms < (uint64_t) (qpid::sys::TIME_INFINITE/qpid::sys::TIME_MSEC)) { return ms * qpid::sys::TIME_MSEC; } else { return qpid::sys::TIME_INFINITE; } } bool SessionImpl::getIncoming(IncomingMessages::Handler& handler, qpid::messaging::Duration timeout) { return incoming.get(handler, adjust(timeout)); } bool SessionImpl::get(ReceiverImpl& receiver, qpid::messaging::Message& message, qpid::messaging::Duration timeout) { IncomingMessageHandler handler(boost::bind(&SessionImpl::accept, this, &receiver, &message, _1)); return getIncoming(handler, timeout); } bool SessionImpl::nextReceiver(qpid::messaging::Receiver& receiver, qpid::messaging::Duration timeout) { while (true) { try { std::string destination; if (incoming.getNextDestination(destination, adjust(timeout))) { qpid::sys::Mutex::ScopedLock l(lock); Receivers::const_iterator i = receivers.find(destination); if (i == receivers.end()) { throw qpid::messaging::ReceiverError(QPID_MSG("Received message for unknown destination " << destination)); } else { receiver = i->second; } return true; } else { return false; } } catch (TransportFailure&) { reconnect(); } catch (const qpid::framing::ResourceLimitExceededException& e) { if (backoff()) return false; else throw qpid::messaging::TargetCapacityExceeded(e.what()); } catch (const qpid::framing::UnauthorizedAccessException& e) { throw qpid::messaging::UnauthorizedAccess(e.what()); } catch (const qpid::SessionException& e) { throw qpid::messaging::SessionError(e.what()); } catch (const qpid::ConnectionException& e) { throw qpid::messaging::ConnectionError(e.what()); } catch (const qpid::ChannelException& e) { throw qpid::messaging::MessagingException(e.what()); } } } qpid::messaging::Receiver SessionImpl::nextReceiver(qpid::messaging::Duration timeout) { qpid::messaging::Receiver receiver; if (!nextReceiver(receiver, timeout)) throw NoMessageAvailable(); if (!receiver) throw SessionError("Bad receiver returned!"); return receiver; } uint32_t SessionImpl::getReceivable() { return get1((const std::string*) 0); } uint32_t SessionImpl::getReceivable(const std::string& destination) { return get1(&destination); } struct SessionImpl::Receivable : Command { const std::string* destination; uint32_t result; Receivable(SessionImpl& i, const std::string* d) : Command(i), destination(d), result(0) {} void operator()() { result = impl.getReceivableImpl(destination); } }; uint32_t SessionImpl::getReceivableImpl(const std::string* destination) { ScopedLock l(lock); if (destination) { return incoming.available(*destination); } else { return incoming.available(); } } uint32_t SessionImpl::getUnsettledAcks() { return get1((const std::string*) 0); } uint32_t SessionImpl::getUnsettledAcks(const std::string& destination) { return get1(&destination); } struct SessionImpl::UnsettledAcks : Command { const std::string* destination; uint32_t result; UnsettledAcks(SessionImpl& i, const std::string* d) : Command(i), destination(d), result(0) {} void operator()() { result = impl.getUnsettledAcksImpl(destination); } }; uint32_t SessionImpl::getUnsettledAcksImpl(const std::string* destination) { ScopedLock l(lock); if (destination) { return incoming.pendingAccept(*destination); } else { return incoming.pendingAccept(); } } void SessionImpl::syncImpl(bool block) { { ScopedLock l(lock); if (block) session.sync(); else session.flush(); } //cleanup unconfirmed accept records: incoming.pendingAccept(); } void SessionImpl::commitImpl() { ScopedLock l(lock); incoming.accept(); session.txCommit(); } void SessionImpl::rollbackImpl() { ScopedLock l(lock); for (Receivers::iterator i = receivers.begin(); i != receivers.end(); ++i) { getImplPtr(i->second)->stop(); } //ensure that stop has been processed and all previously sent //messages are available for release: session.sync(); incoming.releaseAll(); session.txRollback(); for (Receivers::iterator i = receivers.begin(); i != receivers.end(); ++i) { getImplPtr(i->second)->start(); } } void SessionImpl::acknowledgeImpl() { ScopedLock l(lock); if (!transactional) incoming.accept(); } void SessionImpl::acknowledgeImpl(qpid::messaging::Message& m, bool cumulative) { ScopedLock l(lock); if (!transactional) incoming.accept(MessageImplAccess::get(m).getInternalId(), cumulative); } void SessionImpl::rejectImpl(qpid::messaging::Message& m) { SequenceSet set; set.add(MessageImplAccess::get(m).getInternalId()); session.messageReject(set); } void SessionImpl::releaseImpl(qpid::messaging::Message& m) { SequenceSet set; set.add(MessageImplAccess::get(m).getInternalId()); session.messageRelease(set); } void SessionImpl::receiverCancelled(const std::string& name) { ScopedLock l(lock); receivers.erase(name); session.sync(); incoming.releasePending(name); } void SessionImpl::releasePending(const std::string& name) { ScopedLock l(lock); incoming.releasePending(name); } void SessionImpl::senderCancelled(const std::string& name) { ScopedLock l(lock); senders.erase(name); } void SessionImpl::reconnect() { connection->reopen(); } bool SessionImpl::backoff() { return connection->backoff(); } qpid::messaging::Connection SessionImpl::getConnection() const { return qpid::messaging::Connection(connection.get()); } }}} // namespace qpid::client::amqp0_10 qpidc-0.16/src/qpid/client/amqp0_10/AcceptTracker.h0000664000076400007640000000544211601121117022334 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_ACCEPTTRACKER_H #define QPID_CLIENT_AMQP0_10_ACCEPTTRACKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/AsyncSession.h" #include "qpid/client/Completion.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/SequenceSet.h" #include #include namespace qpid { namespace client { namespace amqp0_10 { /** * Tracks the set of messages requiring acceptance, and those for * which an accept has been issued but is yet to be confirmed * complete. */ class AcceptTracker { public: void delivered(const std::string& destination, const qpid::framing::SequenceNumber& id); void accept(qpid::client::AsyncSession&); void accept(qpid::framing::SequenceNumber, qpid::client::AsyncSession&, bool cumulative); void release(qpid::client::AsyncSession&); uint32_t acceptsPending(); uint32_t acceptsPending(const std::string& destination); void reset(); private: struct State { /** * ids of messages that have been delivered but not yet * accepted */ qpid::framing::SequenceSet unaccepted; /** * ids of messages for which an accept has been issued but not * yet confirmed as completed */ qpid::framing::SequenceSet unconfirmed; void accept(); qpid::framing::SequenceSet accept(qpid::framing::SequenceNumber, bool cumulative); void release(); uint32_t acceptsPending(); void completed(qpid::framing::SequenceSet&); }; typedef std::map StateMap; struct Record { qpid::client::Completion status; qpid::framing::SequenceSet accepted; }; typedef std::deque Records; State aggregateState; StateMap destinationState; Records pending; void addToPending(qpid::client::AsyncSession&, const Record&); void checkPending(); void completed(qpid::framing::SequenceSet&); }; }}} // namespace qpid::client::amqp0_10 #endif /*!QPID_CLIENT_AMQP0_10_ACCEPTTRACKER_H*/ qpidc-0.16/src/qpid/client/SessionImpl.cpp0000664000076400007640000005007511725251223021116 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/SessionImpl.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/client/Future.h" #include "qpid/framing/all_method_bodies.h" #include "qpid/framing/ClientInvoker.h" #include "qpid/framing/enum.h" #include "qpid/framing/FrameSet.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/MethodContent.h" #include "qpid/framing/SequenceSet.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/DeliveryProperties.h" #include "qpid/log/Statement.h" #include "qpid/sys/IntegerTypes.h" #include #include namespace { const std::string EMPTY; } namespace qpid { namespace client { using namespace qpid::framing; using namespace qpid::framing::session; //for detach codes typedef sys::Monitor::ScopedLock Lock; typedef sys::Monitor::ScopedUnlock UnLock; typedef sys::ScopedLock Acquire; SessionImpl::SessionImpl(const std::string& name, boost::shared_ptr conn) : state(INACTIVE), detachedLifetime(0), maxFrameSize(conn->getNegotiatedSettings().maxFrameSize), id(conn->getNegotiatedSettings().username, name.empty() ? Uuid(true).str() : name), connection(conn), ioHandler(*this), proxy(ioHandler), nextIn(0), nextOut(0), doClearDeliveryPropertiesExchange(true), autoDetach(true) { channel.next = connection.get(); } SessionImpl::~SessionImpl() { { Lock l(state); if (state != DETACHED && state != DETACHING) { if (autoDetach) { QPID_LOG(warning, "Session was not closed cleanly: " << id); // Inform broker but don't wait for detached as that deadlocks. // The detached will be ignored as the channel will be invalid. try { detach(); } catch (...) {} // ignore errors. } setState(DETACHED); handleClosed(); state.waitWaiters(); } } connection->erase(channel); } FrameSet::shared_ptr SessionImpl::get() // user thread { // No lock here: pop does a blocking wait. return demux.getDefault()->pop(); } const SessionId SessionImpl::getId() const //user thread { return id; //id is immutable } void SessionImpl::open(uint32_t timeout) // user thread { Lock l(state); if (state == INACTIVE) { setState(ATTACHING); proxy.attach(id.getName(), false); waitFor(ATTACHED); //TODO: timeout will not be set locally until get response to //confirm, should we wait for that? setTimeout(timeout); proxy.commandPoint(nextOut, 0); } else { throw Exception("Open already called for this session"); } } void SessionImpl::close() //user thread { Lock l(state); // close() must be idempotent and no-throw as it will often be called in destructors. if (state != DETACHED && state != DETACHING) { try { if (detachedLifetime) setTimeout(0); detach(); waitFor(DETACHED); } catch (...) {} setState(DETACHED); } } void SessionImpl::resume(boost::shared_ptr) // user thread { throw NotImplementedException("Resume not yet implemented by client!"); } void SessionImpl::suspend() //user thread { Lock l(state); detach(); } void SessionImpl::detach() //call with lock held { if (state == ATTACHED) { setState(DETACHING); proxy.detach(id.getName()); } } uint16_t SessionImpl::getChannel() const // user thread { return channel; } void SessionImpl::setChannel(uint16_t c) // user thread { //channel will only ever be set when session is detached (and //about to be resumed) channel = c; } Demux& SessionImpl::getDemux() { return demux; } void SessionImpl::waitForCompletion(const SequenceNumber& id) { Lock l(state); sys::Waitable::ScopedWait w(state); waitForCompletionImpl(id); } void SessionImpl::waitForCompletionImpl(const SequenceNumber& id) //call with lock held { while (incompleteOut.contains(id)) { checkOpen(); state.wait(); } } bool SessionImpl::isComplete(const SequenceNumber& id) { Lock l(state); return !incompleteOut.contains(id); } struct IsCompleteUpTo { const SequenceNumber& id; bool result; IsCompleteUpTo(const SequenceNumber& _id) : id(_id), result(true) {} void operator()(const SequenceNumber& start, const SequenceNumber&) { if (start <= id) result = false; } }; bool SessionImpl::isCompleteUpTo(const SequenceNumber& id) { Lock l(state); //return false if incompleteOut contains anything less than id, //true otherwise IsCompleteUpTo f(id); incompleteIn.for_each(f); return f.result; } framing::SequenceNumber SessionImpl::getCompleteUpTo() { SequenceNumber firstIncomplete; { Lock l(state); firstIncomplete = incompleteIn.front(); } return --firstIncomplete; } struct MarkCompleted { const SequenceNumber& id; SequenceSet& completedIn; MarkCompleted(const SequenceNumber& _id, SequenceSet& set) : id(_id), completedIn(set) {} void operator()(const SequenceNumber& start, const SequenceNumber& end) { if (id >= end) { completedIn.add(start, end); } else if (id >= start) { completedIn.add(start, id); } } }; void SessionImpl::markCompleted(const SequenceSet& ids, bool notifyPeer) { Lock l(state); incompleteIn.remove(ids); completedIn.add(ids); if (notifyPeer) { sendCompletion(); } } void SessionImpl::markCompleted(const SequenceNumber& id, bool cumulative, bool notifyPeer) { Lock l(state); if (cumulative) { //everything in incompleteIn less than or equal to id is now complete MarkCompleted f(id, completedIn); incompleteIn.for_each(f); //make sure id itself is in completedIn.add(id); //then remove anything thats completed from the incomplete set incompleteIn.remove(completedIn); } else if (incompleteIn.contains(id)) { incompleteIn.remove(id); completedIn.add(id); } if (notifyPeer) { sendCompletion(); } } void SessionImpl::setException(const sys::ExceptionHolder& ex) { Lock l(state); setExceptionLH(ex); } void SessionImpl::setExceptionLH(const sys::ExceptionHolder& ex) { // Call with lock held. exceptionHolder = ex; setState(DETACHED); } /** * Called by ConnectionImpl to notify active sessions when connection * is explictly closed */ void SessionImpl::connectionClosed(uint16_t code, const std::string& text) { setException(createConnectionException(code, text)); handleClosed(); } /** * Called by ConnectionImpl to notify active sessions when connection * is disconnected */ void SessionImpl::connectionBroke(const std::string& _text) { setException(sys::ExceptionHolder(new TransportFailure(_text))); handleClosed(); } Future SessionImpl::send(const AMQBody& command) { return sendCommand(command); } Future SessionImpl::send(const AMQBody& command, const MethodContent& content) { return sendCommand(command, &content); } namespace { // Functor for FrameSet::map to send header + content frames but, not method frames. struct SendContentFn { FrameHandler& handler; void operator()(const AMQFrame& f) { if (!f.getMethod()) handler(const_cast(f)); } SendContentFn(FrameHandler& h) : handler(h) {} }; // Adaptor to make FrameSet look like MethodContent; used in cluster update client struct MethodContentAdaptor : MethodContent { AMQHeaderBody header; const std::string content; MethodContentAdaptor(const FrameSet& f) : header(*f.getHeaders()), content(f.getContent()) {} const AMQHeaderBody& getHeader() const { return header; } const std::string& getData() const { return content; } }; } Future SessionImpl::send(const AMQBody& command, const FrameSet& content, bool reframe) { Acquire a(sendLock); SequenceNumber id = nextOut++; { Lock l(state); checkOpen(); incompleteOut.add(id); } Future f(id); if (command.getMethod()->resultExpected()) { Lock l(state); //result listener must be set before the command is sent f.setFutureResult(results.listenForResult(id)); } AMQFrame frame(command); frame.setEof(false); handleOut(frame); if (reframe) { MethodContentAdaptor c(content); sendContent(c); } else { SendContentFn send(out); content.map(send); } return f; } void SessionImpl::sendRawFrame(AMQFrame& frame) { Acquire a(sendLock); handleOut(frame); } Future SessionImpl::sendCommand(const AMQBody& command, const MethodContent* content) { Acquire a(sendLock); SequenceNumber id = nextOut++; { Lock l(state); checkOpen(); incompleteOut.add(id); } Future f(id); if (command.getMethod()->resultExpected()) { Lock l(state); //result listener must be set before the command is sent f.setFutureResult(results.listenForResult(id)); } AMQFrame frame(command); if (content) { frame.setEof(false); } handleOut(frame); if (content) { sendContent(*content); } return f; } void SessionImpl::sendContent(const MethodContent& content) { AMQFrame header(content.getHeader()); // doClearDeliveryPropertiesExchange is set by cluster update client so // it can send messages with delivery-properties.exchange set. // if (doClearDeliveryPropertiesExchange) { // Normal client is not allowed to set the delivery-properties.exchange // so clear it here. AMQHeaderBody* headerp = static_cast(header.getBody()); if (headerp && headerp->get()) headerp->get(true)->clearExchangeFlag(); } header.setFirstSegment(false); uint64_t data_length = content.getData().length(); if(data_length > 0){ header.setLastSegment(false); handleOut(header); /*Note: end of frame marker included in overhead but not in size*/ const uint32_t frag_size = maxFrameSize - AMQFrame::frameOverhead(); if(data_length < frag_size){ AMQFrame frame((AMQContentBody(content.getData()))); frame.setFirstSegment(false); handleOut(frame); }else{ uint32_t offset = 0; uint32_t remaining = data_length - offset; while (remaining > 0) { uint32_t length = remaining > frag_size ? frag_size : remaining; string frag(content.getData().substr(offset, length)); AMQFrame frame((AMQContentBody(frag))); frame.setFirstSegment(false); frame.setLastSegment(true); if (offset > 0) { frame.setFirstFrame(false); } offset += length; remaining = data_length - offset; if (remaining) { frame.setLastFrame(false); } handleOut(frame); } } } else { handleOut(header); } } bool isMessageMethod(AMQMethodBody* method) { return method->isA(); } bool isMessageMethod(AMQBody* body) { AMQMethodBody* method=body->getMethod(); return method && isMessageMethod(method); } bool isContentFrame(AMQFrame& frame) { AMQBody* body = frame.getBody(); uint8_t type = body->type(); return type == HEADER_BODY || type == CONTENT_BODY || isMessageMethod(body); } void SessionImpl::handleIn(AMQFrame& frame) // network thread { try { if (invoke(static_cast(*this), *frame.getBody())) { ; } else if (invoke(static_cast(*this), *frame.getBody())) { //make sure the command id sequence and completion //tracking takes account of execution commands Lock l(state); completedIn.add(nextIn++); } else { //if not handled by this class, its for the application: deliver(frame); } } catch (const SessionException& e) { setException(createSessionException(e.code, e.getMessage())); } catch (const ChannelException& e) { setException(createChannelException(e.code, e.getMessage())); } } void SessionImpl::handleOut(AMQFrame& frame) // user thread { sendFrame(frame, true); } void SessionImpl::proxyOut(AMQFrame& frame) // network thread { //Note: this case is treated slightly differently that command //frames sent by application; session controls should not be //blocked by bounds checking on the outgoing frame queue. sendFrame(frame, false); } void SessionImpl::sendFrame(AMQFrame& frame, bool canBlock) { connection->expand(frame.encodedSize(), canBlock); channel.handle(frame); } void SessionImpl::deliver(AMQFrame& frame) // network thread { if (!arriving) { arriving = FrameSet::shared_ptr(new FrameSet(nextIn++)); } arriving->append(frame); if (arriving->isComplete()) { //message.transfers will be marked completed only when 'acked' //as completion affects flow control; other commands will be //considered completed as soon as processed here if (arriving->isA()) { Lock l(state); incompleteIn.add(arriving->getId()); } else { Lock l(state); completedIn.add(arriving->getId()); } demux.handle(arriving); arriving.reset(); } } //control handler methods (called by network thread when controls are //received from peer): void SessionImpl::attach(const std::string& /*name*/, bool /*force*/) { throw NotImplementedException("Client does not support attach"); } void SessionImpl::attached(const std::string& _name) { Lock l(state); if (id.getName() != _name) throw InternalErrorException("Incorrect session name"); setState(ATTACHED); } void SessionImpl::detach(const std::string& _name) { Lock l(state); if (id.getName() != _name) throw InternalErrorException("Incorrect session name"); setState(DETACHED); QPID_LOG(info, "Session detached by peer: " << id); proxy.detached(_name, DETACH_CODE_NORMAL); handleClosed(); } void SessionImpl::detached(const std::string& _name, uint8_t _code) { Lock l(state); if (id.getName() != _name) throw InternalErrorException("Incorrect session name"); setState(DETACHED); if (_code) { //TODO: make sure this works with execution.exception - don't //want to overwrite the code from that setExceptionLH(createChannelException(_code, "Session detached by peer")); QPID_LOG(error, exceptionHolder.what()); } if (detachedLifetime == 0) { handleClosed(); } } void SessionImpl::requestTimeout(uint32_t t) { Lock l(state); detachedLifetime = t; proxy.timeout(t); } void SessionImpl::timeout(uint32_t t) { Lock l(state); detachedLifetime = t; } void SessionImpl::commandPoint(const framing::SequenceNumber& id, uint64_t offset) { if (offset) throw NotImplementedException("Non-zero byte offset not yet supported for command-point"); Lock l(state); nextIn = id; } void SessionImpl::expected(const framing::SequenceSet& commands, const framing::Array& fragments) { if (!commands.empty() || fragments.encodedSize()) { throw NotImplementedException("Session resumption not yet supported"); } } void SessionImpl::confirmed(const framing::SequenceSet& /*commands*/, const framing::Array& /*fragments*/) { //don't really care too much about this yet } void SessionImpl::completed(const framing::SequenceSet& commands, bool timelyReply) { Lock l(state); incompleteOut.remove(commands); state.notifyAll();//notify any waiters of completion completedOut.add(commands); //notify any waiting results of completion results.completed(commands); if (timelyReply) { proxy.knownCompleted(completedOut); completedOut.clear(); } } void SessionImpl::knownCompleted(const framing::SequenceSet& commands) { Lock l(state); completedIn.remove(commands); } void SessionImpl::flush(bool expected, bool confirmed, bool completed) { Lock l(state); if (expected) { proxy.expected(SequenceSet(nextIn), Array()); } if (confirmed) { proxy.confirmed(completedIn, Array()); } if (completed) { proxy.completed(completedIn, true); } } void SessionImpl::sendCompletion() { Lock l(state); sendCompletionImpl(); } void SessionImpl::sendFlush() { Lock l(state); proxy.flush(false, false, true); } void SessionImpl::sendCompletionImpl() { proxy.completed(completedIn, completedIn.span() > 1000); } void SessionImpl::gap(const framing::SequenceSet& /*commands*/) { throw NotImplementedException("gap not yet supported"); } void SessionImpl::sync() {} void SessionImpl::result(const framing::SequenceNumber& commandId, const std::string& value) { Lock l(state); results.received(commandId, value); } void SessionImpl::exception(uint16_t errorCode, const framing::SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t /*fieldIndex*/, const std::string& description, const framing::FieldTable& /*errorInfo*/) { Lock l(state); setExceptionLH(createSessionException(errorCode, description)); QPID_LOG(warning, "Exception received from broker: " << exceptionHolder.what() << " [caused by " << commandId << " " << classCode << ":" << commandCode << "]"); if (detachedLifetime) setTimeout(0); } //private utility methods: inline void SessionImpl::setState(State s) //call with lock held { state = s; } inline void SessionImpl::waitFor(State s) //call with lock held { // We can be DETACHED at any time if (s == DETACHED) state.waitFor(DETACHED); else state.waitFor(States(s, DETACHED)); check(); } void SessionImpl::check() const //call with lock held. { exceptionHolder.raise(); } void SessionImpl::checkOpen() const //call with lock held. { check(); if (state != ATTACHED) { throw NotAttachedException(QPID_MSG("Session " << getId() << " isn't attached")); } } void SessionImpl::assertOpen() const { Lock l(state); checkOpen(); } bool SessionImpl::hasError() const { Lock l(state); return !exceptionHolder.empty(); } void SessionImpl::handleClosed() { demux.close(exceptionHolder.empty() ? sys::ExceptionHolder(new ClosedException()) : exceptionHolder); results.close(); } uint32_t SessionImpl::setTimeout(uint32_t seconds) { proxy.requestTimeout(seconds); // FIXME aconway 2008-10-07: wait for timeout response from broker // and use value retured by broker. detachedLifetime = seconds; return detachedLifetime; } uint32_t SessionImpl::getTimeout() const { return detachedLifetime; } boost::shared_ptr SessionImpl::getConnection() { return connection; } void SessionImpl::disableAutoDetach() { autoDetach = false; } }} qpidc-0.16/src/qpid/client/Demux.cpp0000664000076400007640000000664311227113407017733 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Demux.h" #include "qpid/Exception.h" #include "qpid/framing/MessageTransferBody.h" #include namespace qpid { namespace client { ByTransferDest::ByTransferDest(const std::string& d) : dest(d) {} bool ByTransferDest::operator()(const framing::FrameSet& frameset) const { return frameset.isA() && frameset.as()->getDestination() == dest; } ScopedDivert::ScopedDivert(const std::string& _dest, Demux& _demuxer) : dest(_dest), demuxer(_demuxer) { queue = demuxer.add(dest, ByTransferDest(dest)); } ScopedDivert::~ScopedDivert() { demuxer.remove(dest); } Demux::Demux() : defaultQueue(new Queue()) {} Demux::~Demux() { close(sys::ExceptionHolder(new ClosedException())); } Demux::QueuePtr ScopedDivert::getQueue() { return queue; } void Demux::handle(framing::FrameSet::shared_ptr frameset) { sys::Mutex::ScopedLock l(lock); bool matched = false; for (iterator i = records.begin(); i != records.end() && !matched; i++) { if (i->condition && i->condition(*frameset)) { matched = true; i->queue->push(frameset); } } if (!matched) { defaultQueue->push(frameset); } } void Demux::close(const sys::ExceptionHolder& ex) { sys::Mutex::ScopedLock l(lock); for (iterator i = records.begin(); i != records.end(); i++) { i->queue->close(ex); } defaultQueue->close(ex); } void Demux::open() { sys::Mutex::ScopedLock l(lock); for (iterator i = records.begin(); i != records.end(); i++) { i->queue->open(); } defaultQueue->open(); } Demux::QueuePtr Demux::add(const std::string& name, Condition condition) { sys::Mutex::ScopedLock l(lock); iterator i = std::find_if(records.begin(), records.end(), Find(name)); if (i == records.end()) { Record r(name, condition); records.push_back(r); return r.queue; } else { throw Exception("Queue already exists for " + name); } } void Demux::remove(const std::string& name) { sys::Mutex::ScopedLock l(lock); records.remove_if(Find(name)); } Demux::QueuePtr Demux::get(const std::string& name) { sys::Mutex::ScopedLock l(lock); iterator i = std::find_if(records.begin(), records.end(), Find(name)); if (i == records.end()) { throw Exception("No queue for " + name); } return i->queue; } Demux::QueuePtr Demux::getDefault() { return defaultQueue; } Demux::Find::Find(const std::string& n) : name(n) {} bool Demux::Find::operator()(const Record& record) const { return record.name == name; } }} qpidc-0.16/src/qpid/client/RdmaConnector.cpp0000664000076400007640000003263511653514043021413 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Connector.h" #include "qpid/client/Bounds.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/log/Statement.h" #include "qpid/sys/Time.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/InitiationHandler.h" #include "qpid/sys/rdma/RdmaIO.h" #include "qpid/sys/rdma/rdma_exception.h" #include "qpid/sys/Dispatcher.h" #include "qpid/sys/Poller.h" #include "qpid/sys/SecurityLayer.h" #include "qpid/Msg.h" #include #include #include #include // This stuff needs to abstracted out of here to a platform specific file #include namespace qpid { namespace client { using namespace qpid::sys; using namespace qpid::framing; using boost::format; using boost::str; class RdmaConnector : public Connector, public sys::Codec { typedef std::deque Frames; const uint16_t maxFrameSize; sys::Mutex lock; Frames frames; size_t lastEof; // Position after last EOF in frames uint64_t currentSize; Bounds* bounds; framing::ProtocolVersion version; bool initiated; sys::Mutex dataConnectedLock; bool dataConnected; sys::ShutdownHandler* shutdownHandler; framing::InputHandler* input; framing::InitiationHandler* initialiser; framing::OutputHandler* output; Rdma::AsynchIO* aio; Rdma::Connector* acon; sys::Poller::shared_ptr poller; std::auto_ptr securityLayer; ~RdmaConnector(); // Callbacks void connected(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams&); void connectionError(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, Rdma::ErrorType); void disconnected(); void rejected(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams&); void readbuff(Rdma::AsynchIO&, Rdma::Buffer*); void writebuff(Rdma::AsynchIO&); void writeDataBlock(const framing::AMQDataBlock& data); void dataError(Rdma::AsynchIO&); void drained(); void connectionStopped(Rdma::Connector* acon, Rdma::AsynchIO* aio); void dataStopped(Rdma::AsynchIO* aio); std::string identifier; void connect(const std::string& host, const std::string& port); void close(); void send(framing::AMQFrame& frame); void abort() {} // TODO: need to fix this for heartbeat timeouts to work void setInputHandler(framing::InputHandler* handler); void setShutdownHandler(sys::ShutdownHandler* handler); sys::ShutdownHandler* getShutdownHandler() const; framing::OutputHandler* getOutputHandler(); const std::string& getIdentifier() const; void activateSecurityLayer(std::auto_ptr); const qpid::sys::SecuritySettings* getSecuritySettings() { return 0; } size_t decode(const char* buffer, size_t size); size_t encode(const char* buffer, size_t size); bool canEncode(); public: RdmaConnector(Poller::shared_ptr, framing::ProtocolVersion pVersion, const ConnectionSettings&, ConnectionImpl*); }; // Static constructor which registers connector here namespace { Connector* create(Poller::shared_ptr p, framing::ProtocolVersion v, const ConnectionSettings& s, ConnectionImpl* c) { return new RdmaConnector(p, v, s, c); } struct StaticInit { StaticInit() { Connector::registerFactory("rdma", &create); Connector::registerFactory("ib", &create); }; } init; } RdmaConnector::RdmaConnector(Poller::shared_ptr p, ProtocolVersion ver, const ConnectionSettings& settings, ConnectionImpl* cimpl) : maxFrameSize(settings.maxFrameSize), lastEof(0), currentSize(0), bounds(cimpl), version(ver), initiated(false), dataConnected(false), shutdownHandler(0), aio(0), acon(0), poller(p) { QPID_LOG(debug, "RdmaConnector created for " << version); } namespace { void deleteAsynchIO(Rdma::AsynchIO& aio) { delete &aio; } void deleteConnector(Rdma::ConnectionManager& con) { delete &con; } } RdmaConnector::~RdmaConnector() { QPID_LOG(debug, "~RdmaConnector " << identifier); if (aio) { aio->stop(deleteAsynchIO); } if (acon) { acon->stop(deleteConnector); } } void RdmaConnector::connect(const std::string& host, const std::string& port){ Mutex::ScopedLock l(dataConnectedLock); assert(!dataConnected); acon = new Rdma::Connector( Rdma::ConnectionParams(maxFrameSize, Rdma::DEFAULT_WR_ENTRIES), boost::bind(&RdmaConnector::connected, this, poller, _1, _2), boost::bind(&RdmaConnector::connectionError, this, poller, _1, _2), boost::bind(&RdmaConnector::disconnected, this), boost::bind(&RdmaConnector::rejected, this, poller, _1, _2)); SocketAddress sa(host, port); acon->start(poller, sa); } // The following only gets run when connected void RdmaConnector::connected(Poller::shared_ptr poller, Rdma::Connection::intrusive_ptr ci, const Rdma::ConnectionParams& cp) { try { Mutex::ScopedLock l(dataConnectedLock); assert(!dataConnected); Rdma::QueuePair::intrusive_ptr q = ci->getQueuePair(); aio = new Rdma::AsynchIO(ci->getQueuePair(), cp.rdmaProtocolVersion, cp.maxRecvBufferSize, cp.initialXmitCredit , Rdma::DEFAULT_WR_ENTRIES, boost::bind(&RdmaConnector::readbuff, this, _1, _2), boost::bind(&RdmaConnector::writebuff, this, _1), 0, // write buffers full boost::bind(&RdmaConnector::dataError, this, _1)); identifier = str(format("[%1% %2%]") % ci->getLocalName() % ci->getPeerName()); ProtocolInitiation init(version); writeDataBlock(init); aio->start(poller); dataConnected = true; return; } catch (const Rdma::Exception& e) { QPID_LOG(error, "Rdma: Cannot create new connection (Rdma exception): " << e.what()); } catch (const std::exception& e) { QPID_LOG(error, "Rdma: Cannot create new connection (unknown exception): " << e.what()); } dataConnected = false; connectionStopped(acon, aio); } void RdmaConnector::connectionError(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, Rdma::ErrorType) { QPID_LOG(debug, "Connection Error " << identifier); connectionStopped(acon, aio); } // Bizarrely we seem to get rejected events *after* we've already got a connected event for some peer disconnects // so we need to check whether the data connection is started or not in here void RdmaConnector::rejected(sys::Poller::shared_ptr, Rdma::Connection::intrusive_ptr, const Rdma::ConnectionParams& cp) { QPID_LOG(debug, "Connection Rejected " << identifier << ": " << cp.maxRecvBufferSize); if (dataConnected) { disconnected(); } else { connectionStopped(acon, aio); } } void RdmaConnector::disconnected() { QPID_LOG(debug, "Connection disconnected " << identifier); { Mutex::ScopedLock l(dataConnectedLock); // If we're closed already then we'll get to drained() anyway if (!dataConnected) return; dataConnected = false; } // Make sure that all the disconnected actions take place on the data "thread" aio->requestCallback(boost::bind(&RdmaConnector::drained, this)); } void RdmaConnector::dataError(Rdma::AsynchIO&) { QPID_LOG(debug, "Data Error " << identifier); { Mutex::ScopedLock l(dataConnectedLock); // If we're closed already then we'll get to drained() anyway if (!dataConnected) return; dataConnected = false; } drained(); } void RdmaConnector::close() { QPID_LOG(debug, "RdmaConnector::close " << identifier); { Mutex::ScopedLock l(dataConnectedLock); if (!dataConnected) return; dataConnected = false; } aio->drainWriteQueue(boost::bind(&RdmaConnector::drained, this)); } void RdmaConnector::drained() { QPID_LOG(debug, "RdmaConnector::drained " << identifier); assert(!dataConnected); assert(aio); Rdma::AsynchIO* a = aio; aio = 0; a->stop(boost::bind(&RdmaConnector::dataStopped, this, a)); } void RdmaConnector::dataStopped(Rdma::AsynchIO* a) { QPID_LOG(debug, "RdmaConnector::dataStopped " << identifier); assert(!dataConnected); assert(acon); Rdma::Connector* c = acon; acon = 0; c->stop(boost::bind(&RdmaConnector::connectionStopped, this, c, a)); } void RdmaConnector::connectionStopped(Rdma::Connector* c, Rdma::AsynchIO* a) { QPID_LOG(debug, "RdmaConnector::connectionStopped " << identifier); assert(!dataConnected); aio = 0; acon = 0; delete a; delete c; if (shutdownHandler) { ShutdownHandler* s = shutdownHandler; shutdownHandler = 0; s->shutdown(); } } void RdmaConnector::setInputHandler(InputHandler* handler){ input = handler; } void RdmaConnector::setShutdownHandler(ShutdownHandler* handler){ shutdownHandler = handler; } OutputHandler* RdmaConnector::getOutputHandler(){ return this; } sys::ShutdownHandler* RdmaConnector::getShutdownHandler() const { return shutdownHandler; } const std::string& RdmaConnector::getIdentifier() const { return identifier; } void RdmaConnector::send(AMQFrame& frame) { // It is possible that we are called to write after we are already shutting down Mutex::ScopedLock l(dataConnectedLock); if (!dataConnected) return; bool notifyWrite = false; { Mutex::ScopedLock l(lock); frames.push_back(frame); //only ask to write if this is the end of a frameset or if we //already have a buffers worth of data currentSize += frame.encodedSize(); if (frame.getEof()) { lastEof = frames.size(); notifyWrite = true; } else { notifyWrite = (currentSize >= maxFrameSize); } } if (notifyWrite) aio->notifyPendingWrite(); } // Called in IO thread. (write idle routine) // This is NOT only called in response to previously calling notifyPendingWrite void RdmaConnector::writebuff(Rdma::AsynchIO&) { // It's possible to be disconnected and be writable Mutex::ScopedLock l(dataConnectedLock); if (!dataConnected) { return; } Codec* codec = securityLayer.get() ? (Codec*) securityLayer.get() : (Codec*) this; if (!codec->canEncode()) { return; } Rdma::Buffer* buffer = aio->getSendBuffer(); if (buffer) { size_t encoded = codec->encode(buffer->bytes(), buffer->byteCount()); buffer->dataCount(encoded); aio->queueWrite(buffer); } } bool RdmaConnector::canEncode() { Mutex::ScopedLock l(lock); //have at least one full frameset or a whole buffers worth of data return aio->writable() && (lastEof || currentSize >= maxFrameSize); } size_t RdmaConnector::encode(const char* buffer, size_t size) { framing::Buffer out(const_cast(buffer), size); size_t bytesWritten(0); { Mutex::ScopedLock l(lock); while (!frames.empty() && out.available() >= frames.front().encodedSize() ) { frames.front().encode(out); QPID_LOG(trace, "SENT [" << identifier << "]: " << frames.front()); frames.pop_front(); if (lastEof) --lastEof; } bytesWritten = size - out.available(); currentSize -= bytesWritten; } if (bounds) bounds->reduce(bytesWritten); return bytesWritten; } void RdmaConnector::readbuff(Rdma::AsynchIO&, Rdma::Buffer* buff) { Codec* codec = securityLayer.get() ? (Codec*) securityLayer.get() : (Codec*) this; codec->decode(buff->bytes(), buff->dataCount()); } size_t RdmaConnector::decode(const char* buffer, size_t size) { framing::Buffer in(const_cast(buffer), size); if (!initiated) { framing::ProtocolInitiation protocolInit; if (protocolInit.decode(in)) { //TODO: check the version is correct QPID_LOG(debug, "RECV [" << identifier << "]: INIT(" << protocolInit << ")"); } initiated = true; } AMQFrame frame; while(frame.decode(in)){ QPID_LOG(trace, "RECV [" << identifier << "]: " << frame); input->received(frame); } return size - in.available(); } void RdmaConnector::writeDataBlock(const AMQDataBlock& data) { Rdma::Buffer* buff = aio->getSendBuffer(); framing::Buffer out(buff->bytes(), buff->byteCount()); data.encode(out); buff->dataCount(data.encodedSize()); aio->queueWrite(buff); } void RdmaConnector::activateSecurityLayer(std::auto_ptr sl) { securityLayer = sl; securityLayer->init(this); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/MessageImpl.cpp0000664000076400007640000000366011227113407021053 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/MessageImpl.h" namespace qpid { namespace client { MessageImpl::MessageImpl(const std::string& data, const std::string& routingKey) : TransferContent(data, routingKey) {} std::string MessageImpl::getDestination() const { return method.getDestination(); } bool MessageImpl::isRedelivered() const { return hasDeliveryProperties() && getDeliveryProperties().getRedelivered(); } void MessageImpl::setRedelivered(bool redelivered) { getDeliveryProperties().setRedelivered(redelivered); } framing::FieldTable& MessageImpl::getHeaders() { return getMessageProperties().getApplicationHeaders(); } const framing::FieldTable& MessageImpl::getHeaders() const { return getMessageProperties().getApplicationHeaders(); } const framing::MessageTransferBody& MessageImpl::getMethod() const { return method; } const framing::SequenceNumber& MessageImpl::getId() const { return id; } /**@internal for incoming messages */ MessageImpl::MessageImpl(const framing::FrameSet& frameset) : method(*frameset.as()), id(frameset.getId()) { populate(frameset); } }} qpidc-0.16/src/qpid/client/Dispatcher.h0000664000076400007640000000471411227113407020401 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _Dispatcher_ #define _Dispatcher_ #include #include #include #include #include "qpid/client/Session.h" #include "qpid/client/SessionBase_0_10Access.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Thread.h" #include "qpid/client/ClientImportExport.h" #include "qpid/client/MessageListener.h" #include "qpid/client/SubscriptionImpl.h" namespace qpid { namespace client { class SubscriptionImpl; ///@internal typedef framing::Handler FrameSetHandler; ///@internal class Dispatcher : public sys::Runnable { typedef std::map >Listeners; sys::Mutex lock; sys::Thread worker; Session session; Demux::QueuePtr queue; bool running; bool autoStop; Listeners listeners; boost::intrusive_ptr defaultListener; std::auto_ptr handler; boost::intrusive_ptr find(const std::string& name); bool isStopped(); boost::function failoverHandler; public: Dispatcher(const Session& session, const std::string& queue = ""); ~Dispatcher() {} void start(); void wait(); // As this class is marked 'internal', no extern should be made here; // however, some test programs rely on it. QPID_CLIENT_EXTERN void run(); void stop(); void setAutoStop(bool b); void registerFailoverHandler ( boost::function fh ) { failoverHandler = fh; } void listen(const boost::intrusive_ptr& subscription); void cancel(const std::string& destination); }; }} #endif qpidc-0.16/src/qpid/client/FailoverManager.cpp0000664000076400007640000001001211372266076021710 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/FailoverManager.h" #include "qpid/Exception.h" #include "qpid/log/Statement.h" #include "qpid/sys/Time.h" namespace qpid { namespace client { using qpid::sys::Monitor; using qpid::sys::AbsTime; using qpid::sys::Duration; FailoverManager::FailoverManager(const ConnectionSettings& s, ReconnectionStrategy* rs) : settings(s), strategy(rs), state(IDLE) {} void FailoverManager::execute(Command& c) { bool retry = false; bool completed = false; AbsTime failed; while (!completed) { try { AsyncSession session = connect().newSession(); if (retry) { Duration failoverTime(failed, AbsTime::now()); QPID_LOG(info, "Failed over for " << &c << " in " << (failoverTime/qpid::sys::TIME_MSEC) << " milliseconds"); } c.execute(session, retry); session.sync();//TODO: shouldn't be required session.close(); completed = true; } catch(const TransportFailure&) { retry = true; failed = AbsTime::now(); } } } void FailoverManager::close() { Monitor::ScopedLock l(lock); connection.close(); } Connection& FailoverManager::connect(std::vector brokers) { Monitor::ScopedLock l(lock); if (state == CANT_CONNECT) { state = IDLE;//retry } while (!connection.isOpen()) { if (state == CONNECTING) { lock.wait(); } else if (state == CANT_CONNECT) { throw CannotConnectException("Cannot establish a connection"); } else { state = CONNECTING; Connection c; if (brokers.empty() && failoverListener.get()) brokers = failoverListener->getKnownBrokers(); attempt(c, settings, brokers); if (c.isOpen()) state = IDLE; else state = CANT_CONNECT; connection = c; lock.notifyAll(); } } return connection; } Connection& FailoverManager::getConnection() { Monitor::ScopedLock l(lock); return connection; } void FailoverManager::attempt(Connection& c, ConnectionSettings s, std::vector urls) { Monitor::ScopedUnlock u(lock); if (strategy) strategy->editUrlList(urls); if (urls.empty()) { attempt(c, s); } else { for (std::vector::const_iterator i = urls.begin(); i != urls.end() && !c.isOpen(); ++i) { for (Url::const_iterator j = i->begin(); j != i->end() && !c.isOpen(); ++j) { const Address& addr = *j; s.protocol = addr.protocol; s.host = addr.host; s.port = addr.port; attempt(c, s); } } } } void FailoverManager::attempt(Connection& c, ConnectionSettings s) { try { QPID_LOG(info, "Attempting to connect to " << s.host << " on " << s.port << "..."); c.open(s); failoverListener.reset(new FailoverListener(c)); QPID_LOG(info, "Connected to " << s.host << " on " << s.port); } catch (const Exception& e) { QPID_LOG(info, "Could not connect to " << s.host << " on " << s.port << ": " << e.what()); } } }} // namespace qpid::client qpidc-0.16/src/qpid/client/Results.h0000664000076400007640000000272011073000232017735 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/SequenceNumber.h" #include #include #ifndef _Results_ #define _Results_ namespace qpid { namespace client { class FutureResult; ///@internal class Results { public: typedef boost::shared_ptr FutureResultPtr; Results(); ~Results(); void completed(const framing::SequenceSet& set); void received(const framing::SequenceNumber& id, const std::string& result); FutureResultPtr listenForResult(const framing::SequenceNumber& point); void close(); private: typedef std::map Listeners; Listeners listeners; }; } } #endif qpidc-0.16/src/qpid/client/LocalQueue.cpp0000664000076400007640000000366111227113407020705 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/LocalQueue.h" #include "qpid/client/LocalQueueImpl.h" #include "qpid/client/MessageImpl.h" #include "qpid/Exception.h" #include "qpid/framing/FrameSet.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/client/PrivateImplRef.h" #include "qpid/client/SubscriptionImpl.h" namespace qpid { namespace client { using namespace framing; typedef PrivateImplRef PI; LocalQueue::LocalQueue() { PI::ctor(*this, new LocalQueueImpl()); } LocalQueue::LocalQueue(const LocalQueue& x) : Handle() { PI::copy(*this, x); } LocalQueue::~LocalQueue() { PI::dtor(*this); } LocalQueue& LocalQueue::operator=(const LocalQueue& x) { return PI::assign(*this, x); } Message LocalQueue::pop(sys::Duration timeout) { return impl->pop(timeout); } Message LocalQueue::get(sys::Duration timeout) { return impl->get(timeout); } bool LocalQueue::get(Message& result, sys::Duration timeout) { return impl->get(result, timeout); } bool LocalQueue::empty() const { return impl->empty(); } size_t LocalQueue::size() const { return impl->size(); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/FailoverListener.cpp0000664000076400007640000000562411667435470022143 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/FailoverListener.h" #include "qpid/client/Session.h" #include "qpid/framing/Uuid.h" #include "qpid/log/Statement.h" #include "qpid/log/Helpers.h" #include "qpid/UrlArray.h" namespace qpid { namespace client { const std::string FailoverListener::AMQ_FAILOVER("amq.failover"); FailoverListener::FailoverListener(Connection c) : connection(c), session(c.newSession(AMQ_FAILOVER+"."+framing::Uuid(true).str())), subscriptions(session) { init(true); } FailoverListener::FailoverListener(Connection c, bool useInitial) : connection(c), session(c.newSession(AMQ_FAILOVER+"."+framing::Uuid(true).str())), subscriptions(session) { init(useInitial); } void FailoverListener::init(bool useInitial) { if (useInitial) knownBrokers = connection.getInitialBrokers(); if (session.exchangeQuery(arg::name=AMQ_FAILOVER).getNotFound()) { session.close(); return; } std::string qname=session.getId().getName(); session.queueDeclare(arg::queue=qname, arg::exclusive=true, arg::autoDelete=true); session.exchangeBind(arg::queue=qname, arg::exchange=AMQ_FAILOVER); subscriptions.subscribe(*this, qname, SubscriptionSettings(FlowControl::unlimited(), ACCEPT_MODE_NONE)); thread = sys::Thread(*this); } void FailoverListener::run() { try { subscriptions.run(); } catch(...) {} } FailoverListener::~FailoverListener() { try { subscriptions.stop(); thread.join(); if (connection.isOpen()) { session.sync(); session.close(); } } catch (...) {} } void FailoverListener::received(Message& msg) { sys::Mutex::ScopedLock l(lock); knownBrokers = getKnownBrokers(msg); } std::vector FailoverListener::getKnownBrokers() const { sys::Mutex::ScopedLock l(lock); return knownBrokers; } std::vector FailoverListener::getKnownBrokers(const Message& msg) { framing::Array urlArray; msg.getHeaders().getArray("amq.failover", urlArray); return urlArrayToVector(urlArray); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/SubscriptionImpl.h0000664000076400007640000001103611177622131021617 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_SUBSCRIPTIONIMPL_H #define QPID_CLIENT_SUBSCRIPTIONIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/SubscriptionSettings.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/Session.h" #include "qpid/client/MessageListener.h" #include "qpid/client/Demux.h" #include "qpid/framing/enum.h" #include "qpid/framing/SequenceSet.h" #include "qpid/sys/Mutex.h" #include "qpid/RefCounted.h" #include "qpid/client/ClientImportExport.h" #include namespace qpid { namespace client { class SubscriptionManager; class SubscriptionManagerImpl; class SubscriptionImpl : public RefCounted, public MessageListener { public: QPID_CLIENT_EXTERN SubscriptionImpl(SubscriptionManager, const std::string& queue, const SubscriptionSettings&, const std::string& name, MessageListener* =0); /** The name of the subsctription, used as the "destination" for messages from the broker. * Usually the same as the queue name but can be set differently. */ QPID_CLIENT_EXTERN std::string getName() const; /** Name of the queue this subscription subscribes to */ QPID_CLIENT_EXTERN std::string getQueue() const; /** Get the flow control and acknowledgement settings for this subscription */ QPID_CLIENT_EXTERN const SubscriptionSettings& getSettings() const; /** Set the flow control parameters */ QPID_CLIENT_EXTERN void setFlowControl(const FlowControl&); /** Automatically acknowledge (acquire and accept) batches of n messages. * You can disable auto-acknowledgement by setting n=0, and use acquire() and accept() * to manually acquire and accept messages. */ QPID_CLIENT_EXTERN void setAutoAck(size_t n); /** Get the set of ID's for messages received by this subscription but not yet acquired. * This will always be empty if acquireMode=ACQUIRE_MODE_PRE_ACQUIRED */ QPID_CLIENT_EXTERN SequenceSet getUnacquired() const; /** Get the set of ID's for messages acquired by this subscription but not yet accepted. */ QPID_CLIENT_EXTERN SequenceSet getUnaccepted() const; /** Acquire messageIds and remove them from the un-acquired set for the session. */ QPID_CLIENT_EXTERN void acquire(const SequenceSet& messageIds); /** Accept messageIds and remove them from the un-accepted set for the session. */ QPID_CLIENT_EXTERN void accept(const SequenceSet& messageIds); /** Release messageIds and remove them from the un-accepted set for the session. */ QPID_CLIENT_EXTERN void release(const SequenceSet& messageIds); /** Get the session associated with this subscription */ QPID_CLIENT_EXTERN Session getSession() const; /** Get the subscription manager associated with this subscription */ QPID_CLIENT_EXTERN SubscriptionManager getSubscriptionManager(); /** Send subscription request and issue appropriate flow control commands. */ QPID_CLIENT_EXTERN void subscribe(); /** Cancel the subscription. */ QPID_CLIENT_EXTERN void cancel(); /** Grant specified credit for this subscription **/ QPID_CLIENT_EXTERN void grantCredit(framing::message::CreditUnit unit, uint32_t value); QPID_CLIENT_EXTERN void received(Message&); /** * Set up demux diversion for messages sent to this subscription */ Demux::QueuePtr divert(); /** * Cancel any demux diversion that may have been setup for this * subscription */ QPID_CLIENT_EXTERN void cancelDiversion(); private: mutable sys::Mutex lock; SubscriptionManagerImpl& manager; std::string name, queue; SubscriptionSettings settings; framing::SequenceSet unacquired, unaccepted; MessageListener* listener; std::auto_ptr demuxRule; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_SUBSCRIPTIONIMPL_H*/ qpidc-0.16/src/qpid/client/SubscriptionManagerImpl.cpp0000664000076400007640000001247211227113407023447 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/SubscriptionManager.h" #include "qpid/client/SubscriptionManagerImpl.h" #include "qpid/client/SubscriptionImpl.h" #include "qpid/client/LocalQueueImpl.h" #include "qpid/client/PrivateImplRef.h" #include #include #include #include #include #include namespace qpid { namespace client { SubscriptionManagerImpl::SubscriptionManagerImpl(const Session& s) : dispatcher(s), session(s), autoStop(true) {} Subscription SubscriptionManagerImpl::subscribe( MessageListener& listener, const std::string& q, const SubscriptionSettings& ss, const std::string& n) { sys::Mutex::ScopedLock l(lock); std::string name=n.empty() ? q:n; boost::intrusive_ptr si = new SubscriptionImpl(SubscriptionManager(this), q, ss, name, &listener); dispatcher.listen(si); //issue subscription request after listener is registered with dispatcher si->subscribe(); return subscriptions[name] = Subscription(si.get()); } Subscription SubscriptionManagerImpl::subscribe( LocalQueue& lq, const std::string& q, const SubscriptionSettings& ss, const std::string& n) { sys::Mutex::ScopedLock l(lock); std::string name=n.empty() ? q:n; boost::intrusive_ptr si = new SubscriptionImpl(SubscriptionManager(this), q, ss, name, 0); boost::intrusive_ptr lqi = PrivateImplRef::get(lq); lqi->queue=si->divert(); si->subscribe(); lqi->subscription = Subscription(si.get()); return subscriptions[name] = lqi->subscription; } Subscription SubscriptionManagerImpl::subscribe( MessageListener& listener, const std::string& q, const std::string& n) { return subscribe(listener, q, defaultSettings, n); } Subscription SubscriptionManagerImpl::subscribe( LocalQueue& lq, const std::string& q, const std::string& n) { return subscribe(lq, q, defaultSettings, n); } void SubscriptionManagerImpl::cancel(const std::string& dest) { sys::Mutex::ScopedLock l(lock); std::map::iterator i = subscriptions.find(dest); if (i != subscriptions.end()) { sync(session).messageCancel(dest); dispatcher.cancel(dest); Subscription s = i->second; if (s.isValid()) PrivateImplRef::get(s)->cancelDiversion(); subscriptions.erase(i); } } void SubscriptionManagerImpl::setAutoStop(bool set) { autoStop=set; } void SubscriptionManagerImpl::run() { dispatcher.setAutoStop(autoStop); dispatcher.run(); } void SubscriptionManagerImpl::start() { dispatcher.setAutoStop(autoStop); dispatcher.start(); } void SubscriptionManagerImpl::wait() { dispatcher.wait(); } void SubscriptionManagerImpl::stop() { dispatcher.stop(); } bool SubscriptionManagerImpl::get(Message& result, const std::string& queue, sys::Duration timeout) { LocalQueue lq; std::string unique = framing::Uuid(true).str(); subscribe(lq, queue, SubscriptionSettings(FlowControl::messageCredit(1)), unique); SubscriptionManager sm(this); AutoCancel ac(sm, unique); //first wait for message to be delivered if a timeout has been specified if (timeout && lq.get(result, timeout)) return true; //make sure message is not on queue before final check sync(session).messageFlush(unique); return lq.get(result, 0); } Message SubscriptionManagerImpl::get(const std::string& queue, sys::Duration timeout) { Message result; if (!get(result, queue, timeout)) throw Exception("Timed out waiting for a message"); return result; } Session SubscriptionManagerImpl::getSession() const { return session; } Subscription SubscriptionManagerImpl::getSubscription(const std::string& name) const { sys::Mutex::ScopedLock l(lock); std::map::const_iterator i = subscriptions.find(name); if (i == subscriptions.end()) throw Exception(QPID_MSG("Subscription not found: " << name)); return i->second; } void SubscriptionManagerImpl::registerFailoverHandler (boost::function fh) { dispatcher.registerFailoverHandler(fh); } void SubscriptionManagerImpl::setFlowControl(const std::string& name, const FlowControl& flow) { getSubscription(name).setFlowControl(flow); } void SubscriptionManagerImpl::setFlowControl(const std::string& name, uint32_t messages, uint32_t bytes, bool window) { setFlowControl(name, FlowControl(messages, bytes, window)); } }} // namespace qpid::client qpidc-0.16/src/qpid/client/TCPConnector.cpp0000664000076400007640000002322511721277150021152 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/TCPConnector.h" #include "qpid/client/ConnectionImpl.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/log/Statement.h" #include "qpid/sys/Codec.h" #include "qpid/sys/Time.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/InitiationHandler.h" #include "qpid/sys/AsynchIO.h" #include "qpid/sys/Dispatcher.h" #include "qpid/sys/Poller.h" #include "qpid/sys/SecurityLayer.h" #include "qpid/Msg.h" #include #include #include namespace qpid { namespace client { using namespace qpid::sys; using namespace qpid::framing; using boost::format; using boost::str; struct TCPConnector::Buff : public AsynchIO::BufferBase { Buff(size_t size) : AsynchIO::BufferBase(new char[size], size) {} ~Buff() { delete [] bytes;} }; // Static constructor which registers connector here namespace { Connector* create(Poller::shared_ptr p, framing::ProtocolVersion v, const ConnectionSettings& s, ConnectionImpl* c) { return new TCPConnector(p, v, s, c); } struct StaticInit { StaticInit() { Connector::registerFactory("tcp", &create); }; } init; } TCPConnector::TCPConnector(Poller::shared_ptr p, ProtocolVersion ver, const ConnectionSettings& settings, ConnectionImpl* cimpl) : maxFrameSize(settings.maxFrameSize), lastEof(0), currentSize(0), bounds(cimpl), version(ver), initiated(false), closed(true), shutdownHandler(0), connector(0), aio(0), poller(p) { QPID_LOG(debug, "TCPConnector created for " << version); settings.configureSocket(socket); } TCPConnector::~TCPConnector() { close(); } void TCPConnector::connect(const std::string& host, const std::string& port) { Mutex::ScopedLock l(lock); assert(closed); connector = AsynchConnector::create( socket, host, port, boost::bind(&TCPConnector::connected, this, _1), boost::bind(&TCPConnector::connectFailed, this, _3)); closed = false; connector->start(poller); } void TCPConnector::connected(const Socket&) { connector = 0; aio = AsynchIO::create(socket, boost::bind(&TCPConnector::readbuff, this, _1, _2), boost::bind(&TCPConnector::eof, this, _1), boost::bind(&TCPConnector::disconnected, this, _1), boost::bind(&TCPConnector::socketClosed, this, _1, _2), 0, // nobuffs boost::bind(&TCPConnector::writebuff, this, _1)); start(aio); initAmqp(); aio->start(poller); } void TCPConnector::start(sys::AsynchIO* aio_) { aio = aio_; for (int i = 0; i < 4; i++) { aio->queueReadBuffer(new Buff(maxFrameSize)); } identifier = str(format("[%1%]") % socket.getFullAddress()); } void TCPConnector::initAmqp() { ProtocolInitiation init(version); writeDataBlock(init); } void TCPConnector::connectFailed(const std::string& msg) { connector = 0; QPID_LOG(warning, "Connect failed: " << msg); socket.close(); if (!closed) closed = true; if (shutdownHandler) shutdownHandler->shutdown(); } void TCPConnector::close() { Mutex::ScopedLock l(lock); if (!closed) { closed = true; if (aio) aio->queueWriteClose(); } } void TCPConnector::socketClosed(AsynchIO&, const Socket&) { if (aio) aio->queueForDeletion(); if (shutdownHandler) shutdownHandler->shutdown(); } void TCPConnector::abort() { // Can't abort a closed connection if (!closed) { if (aio) { // Established connection aio->requestCallback(boost::bind(&TCPConnector::eof, this, _1)); } else if (connector) { // We're still connecting connector->stop(); connectFailed("Connection timedout"); } } } void TCPConnector::setInputHandler(InputHandler* handler){ input = handler; } void TCPConnector::setShutdownHandler(ShutdownHandler* handler){ shutdownHandler = handler; } OutputHandler* TCPConnector::getOutputHandler() { return this; } sys::ShutdownHandler* TCPConnector::getShutdownHandler() const { return shutdownHandler; } const std::string& TCPConnector::getIdentifier() const { return identifier; } void TCPConnector::send(AMQFrame& frame) { bool notifyWrite = false; { Mutex::ScopedLock l(lock); frames.push_back(frame); //only ask to write if this is the end of a frameset or if we //already have a buffers worth of data currentSize += frame.encodedSize(); if (frame.getEof()) { lastEof = frames.size(); notifyWrite = true; } else { notifyWrite = (currentSize >= maxFrameSize); } /* NOTE: Moving the following line into this mutex block is a workaround for BZ 570168, in which the test testConcurrentSenders causes a hang about 1.5% of the time. ( To see the hang much more frequently leave this line out of the mutex block, and put a small usleep just before it.) TODO mgoulish - fix the underlying cause and then move this call back outside the mutex. */ if (notifyWrite && !closed) aio->notifyPendingWrite(); } } void TCPConnector::writebuff(AsynchIO& /*aio*/) { // It's possible to be disconnected and be writable if (closed) return; Codec* codec = securityLayer.get() ? (Codec*) securityLayer.get() : (Codec*) this; if (codec->canEncode()) { std::auto_ptr buffer = std::auto_ptr(aio->getQueuedBuffer()); if (!buffer.get()) buffer = std::auto_ptr(new Buff(maxFrameSize)); size_t encoded = codec->encode(buffer->bytes, buffer->byteCount); buffer->dataStart = 0; buffer->dataCount = encoded; aio->queueWrite(buffer.release()); } } // Called in IO thread. bool TCPConnector::canEncode() { Mutex::ScopedLock l(lock); //have at least one full frameset or a whole buffers worth of data return lastEof || currentSize >= maxFrameSize; } // Called in IO thread. size_t TCPConnector::encode(const char* buffer, size_t size) { framing::Buffer out(const_cast(buffer), size); size_t bytesWritten(0); { Mutex::ScopedLock l(lock); while (!frames.empty() && out.available() >= frames.front().encodedSize() ) { frames.front().encode(out); QPID_LOG(trace, "SENT [" << identifier << "]: " << frames.front()); frames.pop_front(); if (lastEof) --lastEof; } bytesWritten = size - out.available(); currentSize -= bytesWritten; } if (bounds) bounds->reduce(bytesWritten); return bytesWritten; } bool TCPConnector::readbuff(AsynchIO& aio, AsynchIO::BufferBase* buff) { Codec* codec = securityLayer.get() ? (Codec*) securityLayer.get() : (Codec*) this; int32_t decoded = codec->decode(buff->bytes+buff->dataStart, buff->dataCount); // TODO: unreading needs to go away, and when we can cope // with multiple sub-buffers in the general buffer scheme, it will if (decoded < buff->dataCount) { // Adjust buffer for used bytes and then "unread them" buff->dataStart += decoded; buff->dataCount -= decoded; aio.unread(buff); } else { // Give whole buffer back to aio subsystem aio.queueReadBuffer(buff); } return true; } size_t TCPConnector::decode(const char* buffer, size_t size) { framing::Buffer in(const_cast(buffer), size); if (!initiated) { framing::ProtocolInitiation protocolInit; if (protocolInit.decode(in)) { QPID_LOG(debug, "RECV [" << identifier << "]: INIT(" << protocolInit << ")"); if(!(protocolInit==version)){ throw Exception(QPID_MSG("Unsupported version: " << protocolInit << " supported version " << version)); } } initiated = true; } AMQFrame frame; while(frame.decode(in)){ QPID_LOG(trace, "RECV [" << identifier << "]: " << frame); input->received(frame); } return size - in.available(); } void TCPConnector::writeDataBlock(const AMQDataBlock& data) { AsynchIO::BufferBase* buff = aio->getQueuedBuffer(); framing::Buffer out(buff->bytes, buff->byteCount); data.encode(out); buff->dataCount = data.encodedSize(); aio->queueWrite(buff); } void TCPConnector::eof(AsynchIO&) { close(); } void TCPConnector::disconnected(AsynchIO&) { close(); socketClosed(*aio, socket); } void TCPConnector::activateSecurityLayer(std::auto_ptr sl) { securityLayer = sl; securityLayer->init(this); } }} // namespace qpid::client qpidc-0.16/src/qpid/ptr_map.h0000664000076400007640000000357111021031142016462 0ustar00jrossjross00000000000000#ifndef QPID_PTR_MAP #define QPID_PTR_MAP /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include namespace qpid { /** @file * Workaround for API change between boost 1.33 and 1.34. * * To be portable across these versions, code using boost::ptr_map * iterators should use ptr_map_ptr(i) to get the pointer from * boost::ptr_map::iterator i. * * @see http://www.boost.org/libs/ptr_container/doc/ptr_container.html#upgrading-from-boost-v-1-33 */ typedef boost::is_same::iterator::value_type, int> IsOldPtrMap; template typename boost::enable_if::type ptr_map_ptr(const Iter& i) { return &*i; } template typename boost::disable_if::type >::type ptr_map_ptr(const Iter& i) { return i->second; } } // namespace qpid #endif /*!QPID_PTR_MAP*/ qpidc-0.16/src/qpid/Address.cpp0000664000076400007640000000250611621325002016744 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/Address.h" #include "qpid/client/ConnectionSettings.h" #include using namespace std; namespace qpid { const string Address::TCP("tcp"); ostream& operator<<(ostream& os, const Address& a) { // If the host is an IPv6 literal we need to print "[]" around it // (we detect IPv6 literals because they contain ":" which is otherwise illegal) if (a.host.find(':') != string::npos) { return os << a.protocol << ":[" << a.host << "]:" << a.port; } else { return os << a.protocol << ":" << a.host << ":" << a.port; } } bool operator==(const Address& x, const Address& y) { return y.protocol==x.protocol && y.host==x.host && y.port == x.port; } } // namespace qpid qpidc-0.16/src/qpid/SessionId.cpp0000664000076400007640000000266511227113407017273 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/SessionId.h" #include namespace qpid { SessionId::SessionId(const std::string& u, const std::string& n) : userId(u), name(n) {} bool SessionId::operator<(const SessionId& id) const { return userId < id.userId || (userId == id.userId && name < id.name); } bool SessionId::operator==(const SessionId& id) const { return id.name == name && id.userId == userId; } std::ostream& operator<<(std::ostream& o, const SessionId& id) { return o << id.getUserId() << "." << id.getName(); } std::string SessionId::str() const { std::ostringstream o; o << *this; return o.str(); } } // namespace qpid qpidc-0.16/src/qpid/broker/0000775000076400007640000000000011752725715016160 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/broker/SemanticState.h0000664000076400007640000002403611723741731021074 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_SEMANTICSTATE_H #define QPID_BROKER_SEMANTICSTATE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Consumer.h" #include "qpid/broker/Credit.h" #include "qpid/broker/Deliverable.h" #include "qpid/broker/DeliveryAdapter.h" #include "qpid/broker/DeliveryRecord.h" #include "qpid/broker/DtxBuffer.h" #include "qpid/broker/DtxManager.h" #include "qpid/broker/NameGenerator.h" #include "qpid/broker/QueueObserver.h" #include "qpid/broker/TxBuffer.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/SequenceSet.h" #include "qpid/framing/Uuid.h" #include "qpid/sys/AggregateOutput.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/AtomicValue.h" #include "qmf/org/apache/qpid/broker/Subscription.h" #include #include #include #include #include #include namespace qpid { namespace broker { class SessionContext; /** * * SemanticState implements the behavior of a Session, especially the * state of consumers subscribed to queues. The code for ConsumerImpl * is also in SemanticState.cpp * * SemanticState holds the AMQP Execution and Model state of an open * session, whether attached to a channel or suspended. It is not * dependent on any specific AMQP version. * * Message delivery is driven by ConsumerImpl::doOutput(), which is * called when a client's socket is ready to write data. * */ class SemanticState : private boost::noncopyable { public: class ConsumerImpl : public Consumer, public sys::OutputTask, public boost::enable_shared_from_this, public management::Manageable { protected: mutable qpid::sys::Mutex lock; SemanticState* const parent; private: const boost::shared_ptr queue; const bool ackExpected; const bool acquire; bool blocked; bool exclusive; std::string resumeId; const std::string tag; // from AMQP 0-10 Message.subscribe command uint64_t resumeTtl; framing::FieldTable arguments; Credit credit; bool notifyEnabled; const int syncFrequency; int deliveryCount; qmf::org::apache::qpid::broker::Subscription* mgmtObject; bool checkCredit(boost::intrusive_ptr& msg); void allocateCredit(boost::intrusive_ptr& msg); bool haveCredit(); protected: QPID_BROKER_EXTERN virtual bool doDispatch(); size_t unacked() { return parent->unacked.size(); } public: typedef boost::shared_ptr shared_ptr; QPID_BROKER_EXTERN ConsumerImpl( SemanticState* parent, const std::string& name, boost::shared_ptr queue, bool ack, bool acquire, bool exclusive, const std::string& tag, const std::string& resumeId, uint64_t resumeTtl, const framing::FieldTable& arguments); QPID_BROKER_EXTERN virtual ~ConsumerImpl(); QPID_BROKER_EXTERN OwnershipToken* getSession(); QPID_BROKER_EXTERN virtual bool deliver(QueuedMessage& msg); QPID_BROKER_EXTERN bool filter(boost::intrusive_ptr msg); QPID_BROKER_EXTERN bool accept(boost::intrusive_ptr msg); QPID_BROKER_EXTERN void cancel() {} QPID_BROKER_EXTERN void disableNotify(); QPID_BROKER_EXTERN void enableNotify(); QPID_BROKER_EXTERN void notify(); QPID_BROKER_EXTERN bool isNotifyEnabled() const; QPID_BROKER_EXTERN void requestDispatch(); QPID_BROKER_EXTERN void setWindowMode(); QPID_BROKER_EXTERN void setCreditMode(); QPID_BROKER_EXTERN void addByteCredit(uint32_t value); QPID_BROKER_EXTERN void addMessageCredit(uint32_t value); QPID_BROKER_EXTERN void flush(); QPID_BROKER_EXTERN void stop(); QPID_BROKER_EXTERN void complete(DeliveryRecord&); boost::shared_ptr getQueue() const { return queue; } bool isBlocked() const { return blocked; } bool setBlocked(bool set) { std::swap(set, blocked); return set; } QPID_BROKER_EXTERN bool doOutput(); Credit& getCredit() { return credit; } const Credit& getCredit() const { return credit; } bool isAckExpected() const { return ackExpected; } bool isAcquire() const { return acquire; } bool isExclusive() const { return exclusive; } std::string getResumeId() const { return resumeId; }; const std::string& getTag() const { return tag; } uint64_t getResumeTtl() const { return resumeTtl; } const framing::FieldTable& getArguments() const { return arguments; } SemanticState& getParent() { return *parent; } const SemanticState& getParent() const { return *parent; } void acknowledged(const broker::QueuedMessage&) {} // manageable entry points QPID_BROKER_EXTERN management::ManagementObject* GetManagementObject(void) const; QPID_BROKER_EXTERN management::Manageable::status_t ManagementMethod(uint32_t methodId, management::Args& args, std::string& text); }; typedef std::map DtxBufferMap; private: typedef std::map ConsumerImplMap; SessionContext& session; DeliveryAdapter& deliveryAdapter; ConsumerImplMap consumers; NameGenerator tagGenerator; DeliveryRecords unacked; TxBuffer::shared_ptr txBuffer; DtxBuffer::shared_ptr dtxBuffer; bool dtxSelected; DtxBufferMap suspendedXids; framing::SequenceSet accumulatedAck; boost::shared_ptr cacheExchange; const bool authMsg; const std::string userID; bool closeComplete; void route(boost::intrusive_ptr msg, Deliverable& strategy); void checkDtxTimeout(); bool complete(DeliveryRecord&); AckRange findRange(DeliveryId first, DeliveryId last); void requestDispatch(); void cancel(ConsumerImpl::shared_ptr); void disable(ConsumerImpl::shared_ptr); public: SemanticState(DeliveryAdapter&, SessionContext&); ~SemanticState(); SessionContext& getSession() { return session; } const SessionContext& getSession() const { return session; } const ConsumerImpl::shared_ptr find(const std::string& destination) const; bool find(const std::string& destination, ConsumerImpl::shared_ptr&) const; /** * Get named queue, never returns 0. * @return: named queue * @exception: ChannelException if no queue of that name is found. * @exception: ConnectionException if name="" and session has no default. */ boost::shared_ptr getQueue(const std::string& name) const; bool exists(const std::string& consumerTag); void consume(const std::string& destination, boost::shared_ptr queue, bool ackRequired, bool acquire, bool exclusive, const std::string& resumeId=std::string(), uint64_t resumeTtl=0, const framing::FieldTable& = framing::FieldTable()); bool cancel(const std::string& tag); void setWindowMode(const std::string& destination); void setCreditMode(const std::string& destination); void addByteCredit(const std::string& destination, uint32_t value); void addMessageCredit(const std::string& destination, uint32_t value); void flush(const std::string& destination); void stop(const std::string& destination); void startTx(); void commit(MessageStore* const store); void rollback(); void selectDtx(); bool getDtxSelected() const { return dtxSelected; } void startDtx(const std::string& xid, DtxManager& mgr, bool join); void endDtx(const std::string& xid, bool fail); void suspendDtx(const std::string& xid); void resumeDtx(const std::string& xid); void recover(bool requeue); void deliver(DeliveryRecord& message, bool sync); void acquire(DeliveryId first, DeliveryId last, DeliveryIds& acquired); void release(DeliveryId first, DeliveryId last, bool setRedelivered); void reject(DeliveryId first, DeliveryId last); void handle(boost::intrusive_ptr msg); void completed(const framing::SequenceSet& commands); void accepted(const framing::SequenceSet& commands); void attached(); void detached(); void closed(); // Used by cluster to re-create sessions template void eachConsumer(F f) { for(ConsumerImplMap::iterator i = consumers.begin(); i != consumers.end(); ++i) f(i->second); } DeliveryRecords& getUnacked() { return unacked; } framing::SequenceSet getAccumulatedAck() const { return accumulatedAck; } TxBuffer::shared_ptr getTxBuffer() const { return txBuffer; } DtxBuffer::shared_ptr getDtxBuffer() const { return dtxBuffer; } void setTxBuffer(const TxBuffer::shared_ptr& txb) { txBuffer = txb; } void setDtxBuffer(const DtxBuffer::shared_ptr& dtxb) { dtxBuffer = dtxb; txBuffer = dtxb; } void setAccumulatedAck(const framing::SequenceSet& s) { accumulatedAck = s; } void record(const DeliveryRecord& delivery); DtxBufferMap& getSuspendedXids() { return suspendedXids; } }; }} // namespace qpid::broker #endif /*!QPID_BROKER_SEMANTICSTATE_H*/ qpidc-0.16/src/qpid/broker/RecoveredEnqueue.h0000664000076400007640000000334111455656100021567 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _RecoveredEnqueue_ #define _RecoveredEnqueue_ #include "qpid/broker/Deliverable.h" #include "qpid/broker/Message.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/TxOp.h" #include #include #include #include namespace qpid { namespace broker { class RecoveredEnqueue : public TxOp{ boost::shared_ptr queue; boost::intrusive_ptr msg; public: RecoveredEnqueue(boost::shared_ptr queue, boost::intrusive_ptr msg); virtual bool prepare(TransactionContext* ctxt) throw(); virtual void commit() throw(); virtual void rollback() throw(); virtual ~RecoveredEnqueue(){} virtual void accept(TxOpConstVisitor& visitor) const { visitor(*this); } boost::shared_ptr getQueue() const { return queue; } boost::intrusive_ptr getMessage() const { return msg; } }; } } #endif qpidc-0.16/src/qpid/broker/Credit.h0000664000076400007640000000533711663214325017542 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_CREDIT_H #define QPID_BROKER_CREDIT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include #include namespace qpid { namespace broker { class CreditBalance { public: CreditBalance(); virtual ~CreditBalance(); void clear(); void grant(uint32_t value); virtual void consume(uint32_t value); virtual bool check(uint32_t required) const; virtual uint32_t remaining() const; uint32_t allocated() const; bool unlimited() const; static const uint32_t INFINITE_CREDIT; friend std::ostream& operator<<(std::ostream&, const CreditBalance&); private: uint32_t balance; }; class CreditWindow : public CreditBalance { public: CreditWindow(); bool check(uint32_t required) const; void consume(uint32_t value); void move(uint32_t value); uint32_t remaining() const; uint32_t consumed() const; friend std::ostream& operator<<(std::ostream&, const CreditWindow&); private: uint32_t used; }; template struct CreditPair { T messages; T bytes; }; class Credit { public: Credit(); void setWindowMode(bool); bool isWindowMode() const; void addByteCredit(uint32_t); void addMessageCredit(uint32_t); void consume(uint32_t messages, uint32_t bytes); void moveWindow(uint32_t messages, uint32_t bytes); bool check(uint32_t messages, uint32_t bytes) const; void cancel(); operator bool() const; CreditPair allocated() const; CreditPair used() const; friend std::ostream& operator<<(std::ostream&, const Credit&); private: CreditPair balance; CreditPair window; bool windowing; CreditBalance& bytes(); CreditBalance& messages(); const CreditBalance& bytes() const; const CreditBalance& messages() const; }; std::ostream& operator<<(std::ostream&, const Credit&); }} // namespace qpid::broker #endif /*!QPID_BROKER_CREDIT_H*/ qpidc-0.16/src/qpid/broker/ExpiryPolicy.cpp0000664000076400007640000000225111576211367021321 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/ExpiryPolicy.h" #include "qpid/broker/Message.h" #include "qpid/sys/Time.h" namespace qpid { namespace broker { ExpiryPolicy::~ExpiryPolicy() {} bool ExpiryPolicy::hasExpired(Message& m) { return m.getExpiration() < sys::AbsTime::now(); } sys::AbsTime ExpiryPolicy::getCurrentTime() { return sys::AbsTime::now(); } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/RecoverableMessage.h0000664000076400007640000000342511312222523022050 0ustar00jrossjross00000000000000#ifndef _broker_RecoverableMessage_h #define _broker_RecoverableMessage_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/amqp_types.h" #include "qpid/framing/Buffer.h" namespace qpid { namespace broker { /** * The interface through which messages are reloaded on recovery. */ class RecoverableMessage { public: typedef boost::shared_ptr shared_ptr; virtual void setPersistenceId(uint64_t id) = 0; virtual void setRedelivered() = 0; /** * Used by store to determine whether to load content on recovery * or let message load its own content as and when it requires it. * * @returns true if the content of the message should be loaded */ virtual bool loadContent(uint64_t available) = 0; /** * Loads the content held in the supplied buffer (may do checking * of length as necessary) */ virtual void decodeContent(framing::Buffer& buffer) = 0; virtual ~RecoverableMessage() {}; }; }} #endif qpidc-0.16/src/qpid/broker/DtxBuffer.cpp0000664000076400007640000000372711625531570020557 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/DtxBuffer.h" using namespace qpid::broker; using qpid::sys::Mutex; DtxBuffer::DtxBuffer( const std::string& _xid, bool ended_, bool suspended_, bool failed_, bool expired_) : xid(_xid), ended(ended_), suspended(suspended_), failed(failed_), expired(expired_) {} DtxBuffer::~DtxBuffer() {} void DtxBuffer::markEnded() { Mutex::ScopedLock locker(lock); ended = true; } bool DtxBuffer::isEnded() const { Mutex::ScopedLock locker(lock); return ended; } void DtxBuffer::setSuspended(bool isSuspended) { suspended = isSuspended; } bool DtxBuffer::isSuspended() const { return suspended; } void DtxBuffer::fail() { Mutex::ScopedLock locker(lock); rollback(); failed = true; ended = true; } bool DtxBuffer::isRollbackOnly() const { Mutex::ScopedLock locker(lock); return failed; } std::string DtxBuffer::getXid() const { return xid; } void DtxBuffer::timedout() { Mutex::ScopedLock locker(lock); expired = true; fail(); } bool DtxBuffer::isExpired() const { Mutex::ScopedLock locker(lock); return expired; } bool DtxBuffer::isFailed() const { return failed; } qpidc-0.16/src/qpid/broker/OwnershipToken.h0000664000076400007640000000205410774157130021302 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _OwnershipToken_ #define _OwnershipToken_ namespace qpid { namespace broker { class ConnectionToken; class OwnershipToken{ public: virtual bool isLocal(const ConnectionToken* t) const = 0; virtual ~OwnershipToken(){} }; }} #endif qpidc-0.16/src/qpid/broker/DeliverableMessage.cpp0000664000076400007640000000242111455656100022375 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/DeliverableMessage.h" #include "qpid/broker/Queue.h" using namespace qpid::broker; DeliverableMessage::DeliverableMessage(const boost::intrusive_ptr& _msg) : msg(_msg) { } void DeliverableMessage::deliverTo(const boost::shared_ptr& queue) { queue->deliver(msg); delivered = true; } Message& DeliverableMessage::getMessage() { return *msg; } uint64_t DeliverableMessage::contentSize () { return msg->contentSize (); } qpidc-0.16/src/qpid/broker/LinkRegistry.cpp0000664000076400007640000002753211720530342021304 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/LinkRegistry.h" #include "qpid/broker/Link.h" #include "qpid/broker/Connection.h" #include "qpid/log/Statement.h" #include #include namespace qpid { namespace broker { using namespace qpid::sys; using std::string; using std::pair; using std::stringstream; using boost::intrusive_ptr; using boost::format; using boost::str; namespace _qmf = qmf::org::apache::qpid::broker; // TODO: This constructor is only used by the store unit tests - // That probably indicates that LinkRegistry isn't correctly // factored: The persistence element should be factored separately LinkRegistry::LinkRegistry () : broker(0), parent(0), store(0), passive(false), realm("") { } class LinkRegistryConnectionObserver : public ConnectionObserver { LinkRegistry& links; public: LinkRegistryConnectionObserver(LinkRegistry& l) : links(l) {} void connection(Connection& c) { links.notifyConnection(c.getMgmtId(), &c); } void opened(Connection& c) { links.notifyOpened(c.getMgmtId()); } void closed(Connection& c) { links.notifyClosed(c.getMgmtId()); } void forced(Connection& c, const string& text) { links.notifyConnectionForced(c.getMgmtId(), text); } }; LinkRegistry::LinkRegistry (Broker* _broker) : broker(_broker), parent(0), store(0), passive(false), realm(broker->getOptions().realm) { broker->getConnectionObservers().add( boost::shared_ptr(new LinkRegistryConnectionObserver(*this))); } LinkRegistry::~LinkRegistry() {} void LinkRegistry::changeAddress(const qpid::Address& oldAddress, const qpid::Address& newAddress) { Mutex::ScopedLock locker(lock); std::string oldKey = createKey(oldAddress); std::string newKey = createKey(newAddress); if (links.find(newKey) != links.end()) { QPID_LOG(error, "Attempted to update key from " << oldKey << " to " << newKey << " which is already in use"); } else { LinkMap::iterator i = links.find(oldKey); if (i == links.end()) { QPID_LOG(error, "Attempted to update key from " << oldKey << " which does not exist, to " << newKey); } else { links[newKey] = i->second; links.erase(oldKey); QPID_LOG(info, "Updated link key from " << oldKey << " to " << newKey); } } } pair LinkRegistry::declare(const string& host, uint16_t port, const string& transport, bool durable, const string& authMechanism, const string& username, const string& password) { Mutex::ScopedLock locker(lock); string key = createKey(host, port); LinkMap::iterator i = links.find(key); if (i == links.end()) { Link::shared_ptr link; link = Link::shared_ptr (new Link (this, store, host, port, transport, durable, authMechanism, username, password, broker, parent)); links[key] = link; return std::pair(link, true); } return std::pair(i->second, false); } pair LinkRegistry::declare(const std::string& host, uint16_t port, bool durable, const std::string& src, const std::string& dest, const std::string& key, bool isQueue, bool isLocal, const std::string& tag, const std::string& excludes, bool dynamic, uint16_t sync, Bridge::InitializeCallback init ) { Mutex::ScopedLock locker(lock); QPID_LOG(debug, "Bridge declared " << host << ": " << port << " from " << src << " to " << dest << " (" << key << ")"); string linkKey = createKey(host, port); stringstream keystream; keystream << linkKey << "!" << src << "!" << dest << "!" << key; string bridgeKey = keystream.str(); LinkMap::iterator l = links.find(linkKey); if (l == links.end()) return pair(Bridge::shared_ptr(), false); BridgeMap::iterator b = bridges.find(bridgeKey); if (b == bridges.end()) { _qmf::ArgsLinkBridge args; Bridge::shared_ptr bridge; args.i_durable = durable; args.i_src = src; args.i_dest = dest; args.i_key = key; args.i_srcIsQueue = isQueue; args.i_srcIsLocal = isLocal; args.i_tag = tag; args.i_excludes = excludes; args.i_dynamic = dynamic; args.i_sync = sync; bridge = Bridge::shared_ptr (new Bridge (l->second.get(), l->second->nextChannel(), boost::bind(&LinkRegistry::destroy, this, host, port, src, dest, key), args, init)); bridges[bridgeKey] = bridge; l->second->add(bridge); return std::pair(bridge, true); } return std::pair(b->second, false); } void LinkRegistry::destroy(const string& host, const uint16_t port) { Mutex::ScopedLock locker(lock); string key = createKey(host, port); LinkMap::iterator i = links.find(key); if (i != links.end()) { if (i->second->isDurable() && store) store->destroy(*(i->second)); links.erase(i); } } void LinkRegistry::destroy(const std::string& host, const uint16_t port, const std::string& src, const std::string& dest, const std::string& key) { Mutex::ScopedLock locker(lock); string linkKey = createKey(host, port); stringstream keystream; keystream << linkKey << "!" << src << "!" << dest << "!" << key; string bridgeKey = keystream.str(); LinkMap::iterator l = links.find(linkKey); if (l == links.end()) return; BridgeMap::iterator b = bridges.find(bridgeKey); if (b == bridges.end()) return; l->second->cancel(b->second); if (b->second->isDurable()) store->destroy(*(b->second)); bridges.erase(b); } void LinkRegistry::setStore (MessageStore* _store) { store = _store; } MessageStore* LinkRegistry::getStore() const { return store; } Link::shared_ptr LinkRegistry::findLink(const std::string& keyOrMgmtId) { // Convert keyOrMgmtId to a host:port key. // // TODO aconway 2011-02-01: centralize code that constructs/parses // connection management IDs. Currently sys:: protocol factories // and IO plugins construct the IDs and LinkRegistry parses them. size_t separator = keyOrMgmtId.find('-'); if (separator == std::string::npos) separator = 0; std::string key = keyOrMgmtId.substr(separator+1, std::string::npos); Mutex::ScopedLock locker(lock); LinkMap::iterator l = links.find(key); if (l != links.end()) return l->second; else return Link::shared_ptr(); } void LinkRegistry::notifyConnection(const std::string& key, Connection* c) { Link::shared_ptr link = findLink(key); if (link) { link->established(c); c->setUserId(str(format("%1%@%2%") % link->getUsername() % realm)); } } void LinkRegistry::notifyOpened(const std::string& key) { Link::shared_ptr link = findLink(key); if (link) link->opened(); } void LinkRegistry::notifyClosed(const std::string& key) { Link::shared_ptr link = findLink(key); if (link) { link->closed(0, "Closed by peer"); } } void LinkRegistry::notifyConnectionForced(const std::string& key, const std::string& text) { Link::shared_ptr link = findLink(key); if (link) { link->notifyConnectionForced(text); } } std::string LinkRegistry::getAuthMechanism(const std::string& key) { Link::shared_ptr link = findLink(key); if (link) return link->getAuthMechanism(); return string("ANONYMOUS"); } std::string LinkRegistry::getAuthCredentials(const std::string& key) { Link::shared_ptr link = findLink(key); if (!link) return string(); string result; result += '\0'; result += link->getUsername(); result += '\0'; result += link->getPassword(); return result; } std::string LinkRegistry::getUsername(const std::string& key) { Link::shared_ptr link = findLink(key); if (!link) return string(); return link->getUsername(); } std::string LinkRegistry::getHost(const std::string& key) { Link::shared_ptr link = findLink(key); if (!link) return string(); return link->getHost(); } uint16_t LinkRegistry::getPort(const std::string& key) { Link::shared_ptr link = findLink(key); if (!link) return 0; return link->getPort(); } std::string LinkRegistry::getPassword(const std::string& key) { Link::shared_ptr link = findLink(key); if (!link) return string(); return link->getPassword(); } std::string LinkRegistry::getAuthIdentity(const std::string& key) { Link::shared_ptr link = findLink(key); if (!link) return string(); return link->getUsername(); } std::string LinkRegistry::createKey(const qpid::Address& a) { // TODO aconway 2010-05-11: key should also include protocol/transport to // be unique. Requires refactor of LinkRegistry interface. return createKey(a.host, a.port); } std::string LinkRegistry::createKey(const std::string& host, uint16_t port) { // TODO aconway 2010-05-11: key should also include protocol/transport to // be unique. Requires refactor of LinkRegistry interface. stringstream keystream; keystream << host << ":" << port; return keystream.str(); } void LinkRegistry::setPassive(bool p) { Mutex::ScopedLock locker(lock); passive = p; if (passive) { QPID_LOG(info, "Passivating links"); } else { QPID_LOG(info, "Activating links"); } for (LinkMap::iterator i = links.begin(); i != links.end(); i++) { i->second->setPassive(passive); } } void LinkRegistry::eachLink(boost::function)> f) { for (LinkMap::iterator i = links.begin(); i != links.end(); ++i) f(i->second); } void LinkRegistry::eachBridge(boost::function)> f) { for (BridgeMap::iterator i = bridges.begin(); i != bridges.end(); ++i) f(i->second); } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/MessageGroupManager.cpp0000664000076400007640000004223411732667547022573 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/FieldTable.h" #include "qpid/types/Variant.h" #include "qpid/log/Statement.h" #include "qpid/broker/Queue.h" #include "qpid/broker/MessageGroupManager.h" using namespace qpid::broker; namespace { const std::string GROUP_QUERY_KEY("qpid.message_group_queue"); const std::string GROUP_HEADER_KEY("group_header_key"); const std::string GROUP_STATE_KEY("group_state"); const std::string GROUP_ID_KEY("group_id"); const std::string GROUP_MSG_COUNT("msg_count"); const std::string GROUP_TIMESTAMP("timestamp"); const std::string GROUP_CONSUMER("consumer"); } const std::string MessageGroupManager::qpidMessageGroupKey("qpid.group_header_key"); const std::string MessageGroupManager::qpidSharedGroup("qpid.shared_msg_group"); const std::string MessageGroupManager::qpidMessageGroupTimestamp("qpid.group_timestamp"); /** return an iterator to the message at position, or members.end() if not found */ MessageGroupManager::GroupState::MessageFifo::iterator MessageGroupManager::GroupState::findMsg(const qpid::framing::SequenceNumber &position) { MessageState mState(position); MessageFifo::iterator found = std::lower_bound(members.begin(), members.end(), mState); return (found->position == position) ? found : members.end(); } void MessageGroupManager::unFree( const GroupState& state ) { GroupFifo::iterator pos = freeGroups.find( state.members.front().position ); assert( pos != freeGroups.end() && pos->second == &state ); freeGroups.erase( pos ); } void MessageGroupManager::own( GroupState& state, const std::string& owner ) { state.owner = owner; unFree( state ); } void MessageGroupManager::disown( GroupState& state ) { state.owner.clear(); assert(state.members.size()); assert(freeGroups.find(state.members.front().position) == freeGroups.end()); freeGroups[state.members.front().position] = &state; } MessageGroupManager::GroupState& MessageGroupManager::findGroup( const QueuedMessage& qm ) { uint32_t thisMsg = qm.position.getValue(); if (cachedGroup && lastMsg == thisMsg) { hits++; return *cachedGroup; } std::string group = defaultGroupId; const qpid::framing::FieldTable* headers = qm.payload->getApplicationHeaders(); if (headers) { qpid::framing::FieldTable::ValuePtr id = headers->get( groupIdHeader ); if (id && id->convertsTo()) { std::string tmp = id->get(); if (!tmp.empty()) // empty group is reserved group = tmp; } } if (cachedGroup && group == lastGroup) { hits++; lastMsg = thisMsg; return *cachedGroup; } misses++; GroupState& found = messageGroups[group]; if (found.group.empty()) found.group = group; // new group, assign name lastMsg = thisMsg; lastGroup = group; cachedGroup = &found; return found; } void MessageGroupManager::enqueued( const QueuedMessage& qm ) { // @todo KAG optimization - store reference to group state in QueuedMessage // issue: const-ness?? GroupState& state = findGroup(qm); GroupState::MessageState mState(qm.position); state.members.push_back(mState); uint32_t total = state.members.size(); QPID_LOG( trace, "group queue " << qName << ": added message to group id=" << state.group << " total=" << total ); if (total == 1) { // newly created group, no owner assert(freeGroups.find(qm.position) == freeGroups.end()); freeGroups[qm.position] = &state; } } void MessageGroupManager::acquired( const QueuedMessage& qm ) { // @todo KAG avoid lookup: retrieve direct reference to group state from QueuedMessage // issue: const-ness?? GroupState& state = findGroup(qm); GroupState::MessageFifo::iterator m = state.findMsg(qm.position); assert(m != state.members.end()); m->acquired = true; state.acquired += 1; QPID_LOG( trace, "group queue " << qName << ": acquired message in group id=" << state.group << " acquired=" << state.acquired ); } void MessageGroupManager::requeued( const QueuedMessage& qm ) { // @todo KAG avoid lookup: retrieve direct reference to group state from QueuedMessage // issue: const-ness?? GroupState& state = findGroup(qm); assert( state.acquired != 0 ); state.acquired -= 1; GroupState::MessageFifo::iterator m = state.findMsg(qm.position); assert(m != state.members.end()); m->acquired = false; if (state.acquired == 0 && state.owned()) { QPID_LOG( trace, "group queue " << qName << ": consumer name=" << state.owner << " released group id=" << state.group); disown(state); } QPID_LOG( trace, "group queue " << qName << ": requeued message to group id=" << state.group << " acquired=" << state.acquired ); } void MessageGroupManager::dequeued( const QueuedMessage& qm ) { // @todo KAG avoid lookup: retrieve direct reference to group state from QueuedMessage // issue: const-ness?? GroupState& state = findGroup(qm); GroupState::MessageFifo::iterator m = state.findMsg(qm.position); assert(m != state.members.end()); if (m->acquired) { assert( state.acquired != 0 ); state.acquired -= 1; } // special case if qm is first (oldest) message in the group: // may need to re-insert it back on the freeGroups list, as the index will change bool reFreeNeeded = false; if (m == state.members.begin()) { if (!state.owned()) { // will be on the freeGroups list if mgmt is dequeueing rather than a consumer! // if on freelist, it is indexed by first member, which is about to be removed! unFree(state); reFreeNeeded = true; } state.members.pop_front(); } else { state.members.erase(m); } uint32_t total = state.members.size(); QPID_LOG( trace, "group queue " << qName << ": dequeued message from group id=" << state.group << " total=" << total ); if (total == 0) { QPID_LOG( trace, "group queue " << qName << ": deleting group id=" << state.group); if (cachedGroup == &state) { cachedGroup = 0; } std::string key(state.group); messageGroups.erase( key ); } else if (state.acquired == 0 && state.owned()) { QPID_LOG( trace, "group queue " << qName << ": consumer name=" << state.owner << " released group id=" << state.group); disown(state); } else if (reFreeNeeded) { disown(state); } } MessageGroupManager::~MessageGroupManager() { QPID_LOG( debug, "group queue " << qName << " cache results: hits=" << hits << " misses=" << misses ); } bool MessageGroupManager::nextConsumableMessage( Consumer::shared_ptr& c, QueuedMessage& next ) { if (!messages.size()) return false; next.position = c->getPosition(); if (!freeGroups.empty()) { const framing::SequenceNumber& nextFree = freeGroups.begin()->first; if (nextFree <= next.position) { // take oldest free next.position = nextFree; --next.position; } } while (messages.browse( next.position, next, true )) { GroupState& group = findGroup(next); if (!group.owned()) { //TODO: make acquire more efficient when we already have the message in question if (group.members.front().position == next.position && messages.acquire(next.position, next)) { // only take from head! return true; } QPID_LOG(debug, "Skipping " << next.position << " since group " << group.group << "'s head message still pending. pos=" << group.members.front().position); } else if (group.owner == c->getName() && messages.acquire(next.position, next)) { return true; } } return false; } bool MessageGroupManager::allocate(const std::string& consumer, const QueuedMessage& qm) { // @todo KAG avoid lookup: retrieve direct reference to group state from QueuedMessage GroupState& state = findGroup(qm); if (!state.owned()) { own( state, consumer ); QPID_LOG( trace, "group queue " << qName << ": consumer name=" << consumer << " has acquired group id=" << state.group); return true; } return state.owner == consumer; } bool MessageGroupManager::nextBrowsableMessage( Consumer::shared_ptr& c, QueuedMessage& next ) { // browse: allow access to any available msg, regardless of group ownership (?ok?) return messages.browse(c->getPosition(), next, false); } void MessageGroupManager::query(qpid::types::Variant::Map& status) const { /** Add a description of the current state of the message groups for this queue. FORMAT: { "qpid.message_group_queue": { "group_header_key" : "", "group_state" : [ { "group_id" : "", "msg_count" : , "timestamp" : , "consumer" : }, {...} // one for each known group ] } } **/ assert(status.find(GROUP_QUERY_KEY) == status.end()); qpid::types::Variant::Map state; qpid::types::Variant::List groups; state[GROUP_HEADER_KEY] = groupIdHeader; for (GroupMap::const_iterator g = messageGroups.begin(); g != messageGroups.end(); ++g) { qpid::types::Variant::Map info; info[GROUP_ID_KEY] = g->first; info[GROUP_MSG_COUNT] = (uint64_t) g->second.members.size(); // set the timestamp to the arrival timestamp of the oldest (HEAD) message, if present info[GROUP_TIMESTAMP] = 0; if (g->second.members.size() != 0) { QueuedMessage qm; if (messages.find(g->second.members.front().position, qm) && qm.payload && qm.payload->hasProperties()) { info[GROUP_TIMESTAMP] = qm.payload->getProperties()->getTimestamp(); } } info[GROUP_CONSUMER] = g->second.owner; groups.push_back(info); } state[GROUP_STATE_KEY] = groups; status[GROUP_QUERY_KEY] = state; } boost::shared_ptr MessageGroupManager::create( const std::string& qName, Messages& messages, const qpid::framing::FieldTable& settings ) { boost::shared_ptr empty; if (settings.isSet(qpidMessageGroupKey)) { // @todo: remove once "sticky" consumers are supported - see QPID-3347 if (!settings.isSet(qpidSharedGroup)) { QPID_LOG( error, "Only shared groups are supported in this version of the broker. Use '--shared-groups' in qpid-config." ); return empty; } std::string headerKey = settings.getAsString(qpidMessageGroupKey); if (headerKey.empty()) { QPID_LOG( error, "A Message Group header key must be configured, queue=" << qName); return empty; } unsigned int timestamp = settings.getAsInt(qpidMessageGroupTimestamp); boost::shared_ptr manager( new MessageGroupManager( headerKey, qName, messages, timestamp ) ); QPID_LOG( debug, "Configured Queue '" << qName << "' for message grouping using header key '" << headerKey << "'" << " (timestamp=" << timestamp << ")"); return manager; } return empty; } std::string MessageGroupManager::defaultGroupId; void MessageGroupManager::setDefaults(const std::string& groupId) // static { defaultGroupId = groupId; } /** Cluster replication: state map format: { "group-state": [ {"name": , "owner": -or-empty, "acquired-ct": , "positions": [Seqnumbers, ... ]}, {...} ] } */ namespace { const std::string GROUP_NAME("name"); const std::string GROUP_OWNER("owner"); const std::string GROUP_ACQUIRED_CT("acquired-ct"); const std::string GROUP_POSITIONS("positions"); const std::string GROUP_ACQUIRED_MSGS("acquired-msgs"); const std::string GROUP_STATE("group-state"); } /** Runs on UPDATER to snapshot current state */ void MessageGroupManager::getState(qpid::framing::FieldTable& state ) const { using namespace qpid::framing; state.clear(); framing::Array groupState(TYPE_CODE_MAP); for (GroupMap::const_iterator g = messageGroups.begin(); g != messageGroups.end(); ++g) { framing::FieldTable group; group.setString(GROUP_NAME, g->first); group.setString(GROUP_OWNER, g->second.owner); group.setInt(GROUP_ACQUIRED_CT, g->second.acquired); framing::Array positions(TYPE_CODE_UINT32); framing::Array acquiredMsgs(TYPE_CODE_BOOLEAN); for (GroupState::MessageFifo::const_iterator p = g->second.members.begin(); p != g->second.members.end(); ++p) { positions.push_back(framing::Array::ValuePtr(new IntegerValue( p->position ))); acquiredMsgs.push_back(framing::Array::ValuePtr(new BoolValue( p->acquired ))); } group.setArray(GROUP_POSITIONS, positions); group.setArray(GROUP_ACQUIRED_MSGS, acquiredMsgs); groupState.push_back(framing::Array::ValuePtr(new FieldTableValue(group))); } state.setArray(GROUP_STATE, groupState); QPID_LOG(debug, "Queue \"" << qName << "\": replicating message group state, key=" << groupIdHeader); } /** called on UPDATEE to set state from snapshot */ void MessageGroupManager::setState(const qpid::framing::FieldTable& state) { using namespace qpid::framing; messageGroups.clear(); freeGroups.clear(); cachedGroup = 0; framing::Array groupState(TYPE_CODE_MAP); bool ok = state.getArray(GROUP_STATE, groupState); if (!ok) { QPID_LOG(error, "Unable to find message group state information for queue \"" << qName << "\": cluster inconsistency error!"); return; } for (framing::Array::const_iterator g = groupState.begin(); g != groupState.end(); ++g) { framing::FieldTable group; ok = framing::getEncodedValue(*g, group); if (!ok) { QPID_LOG(error, "Invalid message group state information for queue \"" << qName << "\": table encoding error!"); return; } MessageGroupManager::GroupState state; if (!group.isSet(GROUP_NAME) || !group.isSet(GROUP_OWNER) || !group.isSet(GROUP_ACQUIRED_CT)) { QPID_LOG(error, "Invalid message group state information for queue \"" << qName << "\": fields missing error!"); return; } state.group = group.getAsString(GROUP_NAME); state.owner = group.getAsString(GROUP_OWNER); state.acquired = group.getAsInt(GROUP_ACQUIRED_CT); framing::Array positions(TYPE_CODE_UINT32); ok = group.getArray(GROUP_POSITIONS, positions); if (!ok) { QPID_LOG(error, "Invalid message group state information for queue \"" << qName << "\": position encoding error!"); return; } framing::Array acquiredMsgs(TYPE_CODE_BOOLEAN); ok = group.getArray(GROUP_ACQUIRED_MSGS, acquiredMsgs); if (!ok || positions.count() != acquiredMsgs.count()) { QPID_LOG(error, "Invalid message group state information for queue \"" << qName << "\": acquired flag encoding error!"); return; } Array::const_iterator a = acquiredMsgs.begin(); for (Array::const_iterator p = positions.begin(); p != positions.end(); ++p) { GroupState::MessageState mState((*p)->getIntegerValue()); mState.acquired = (*a++)->getIntegerValue(); state.members.push_back(mState); } messageGroups[state.group] = state; if (!state.owned()) { assert(state.members.size()); freeGroups[state.members.front().position] = &messageGroups[state.group]; } } QPID_LOG(debug, "Queue \"" << qName << "\": message group state replicated, key =" << groupIdHeader) } qpidc-0.16/src/qpid/broker/RetryList.h0000664000076400007640000000305711717465066020300 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_RETRYLIST_H #define QPID_BROKER_RETRYLIST_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/BrokerImportExport.h" #include "qpid/Url.h" namespace qpid { namespace broker { /** * Simple utility for managing a list of urls to try on reconnecting a * link. Currently only supports TCP urls. */ class RetryList { public: QPID_BROKER_EXTERN RetryList(); QPID_BROKER_EXTERN void reset(const std::vector& urls); QPID_BROKER_EXTERN bool next(Address& address); private: std::vector urls; size_t urlIndex; size_t addressIndex; friend std::ostream& operator<<(std::ostream& os, const RetryList& l); }; std::ostream& operator<<(std::ostream& os, const RetryList& l); }} // namespace qpid::broker #endif /*!QPID_BROKER_RETRYLIST_H*/ qpidc-0.16/src/qpid/broker/HeadersExchange.h0000664000076400007640000000770711725210040021336 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _HeadersExchange_ #define _HeadersExchange_ #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Exchange.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/CopyOnWriteArray.h" #include "qpid/sys/Mutex.h" #include "qpid/broker/Queue.h" namespace qpid { namespace broker { class HeadersExchange : public virtual Exchange { struct BoundKey { Binding::shared_ptr binding; FedBinding fedBinding; BoundKey(Binding::shared_ptr binding_) : binding(binding_) {} }; struct MatchArgs { const Queue::shared_ptr queue; const qpid::framing::FieldTable* args; MatchArgs(Queue::shared_ptr q, const qpid::framing::FieldTable* a); bool operator()(BoundKey & bk); }; struct MatchKey { const Queue::shared_ptr queue; const std::string& key; MatchKey(Queue::shared_ptr q, const std::string& k); bool operator()(BoundKey & bk); }; struct FedUnbindModifier { std::string queueName; std::string fedOrigin; bool shouldUnbind; bool shouldPropagate; FedUnbindModifier(); FedUnbindModifier(const std::string& queueName, const std::string& origin); bool operator()(BoundKey & bk); }; typedef qpid::sys::CopyOnWriteArray Bindings; Bindings bindings; qpid::sys::Mutex lock; static std::string getMatch(const framing::FieldTable* args); protected: void getNonFedArgs(const framing::FieldTable* args, framing::FieldTable& nonFedArgs); public: static const std::string typeName; QPID_BROKER_EXTERN HeadersExchange(const std::string& name, management::Manageable* parent = 0, Broker* broker = 0); QPID_BROKER_EXTERN HeadersExchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, management::Manageable* parent = 0, Broker* broker = 0); virtual std::string getType() const { return typeName; } QPID_BROKER_EXTERN virtual bool bind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); virtual bool unbind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); QPID_BROKER_EXTERN virtual void route(Deliverable& msg); QPID_BROKER_EXTERN virtual bool isBound(Queue::shared_ptr queue, const std::string* const routingKey, const qpid::framing::FieldTable* const args); QPID_BROKER_EXTERN virtual ~HeadersExchange(); virtual bool supportsDynamicBinding() { return true; } static QPID_BROKER_EXTERN bool match(const qpid::framing::FieldTable& bindArgs, const qpid::framing::FieldTable& msgArgs); static bool equal(const qpid::framing::FieldTable& bindArgs, const qpid::framing::FieldTable& msgArgs); }; } } #endif qpidc-0.16/src/qpid/broker/DirectExchange.cpp0000664000076400007640000001544111725210040021522 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/log/Statement.h" #include "qpid/broker/FedOps.h" #include "qpid/broker/Queue.h" #include "qpid/broker/DirectExchange.h" #include using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::sys; using qpid::management::Manageable; namespace _qmf = qmf::org::apache::qpid::broker; namespace { const std::string qpidExclusiveBinding("qpid.exclusive-binding"); } DirectExchange::DirectExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange(_name, _parent, b) { if (mgmtExchange != 0) mgmtExchange->set_type(typeName); } DirectExchange::DirectExchange(const string& _name, bool _durable, const FieldTable& _args, Manageable* _parent, Broker* b) : Exchange(_name, _durable, _args, _parent, b) { if (mgmtExchange != 0) mgmtExchange->set_type(typeName); } bool DirectExchange::bind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* args) { string fedOp(fedOpBind); string fedTags; string fedOrigin; bool exclusiveBinding = false; if (args) { fedOp = args->getAsString(qpidFedOp); fedTags = args->getAsString(qpidFedTags); fedOrigin = args->getAsString(qpidFedOrigin); exclusiveBinding = args->get(qpidExclusiveBinding); // only direct exchanges take exclusive bindings } bool propagate = false; if (args == 0 || fedOp.empty() || fedOp == fedOpBind) { Mutex::ScopedLock l(lock); Binding::shared_ptr b(new Binding(routingKey, queue, this, FieldTable(), fedOrigin)); BoundKey& bk = bindings[routingKey]; if (exclusiveBinding) bk.queues.clear(); QPID_LOG(debug, "Bind key [" << routingKey << "] to queue " << queue->getName() << " (origin=" << fedOrigin << ")"); if (bk.queues.add_unless(b, MatchQueue(queue))) { b->startManagement(); propagate = bk.fedBinding.addOrigin(queue->getName(), fedOrigin); if (mgmtExchange != 0) { mgmtExchange->inc_bindingCount(); } } else { // queue already present - still need to track fedOrigin bk.fedBinding.addOrigin(queue->getName(), fedOrigin); return false; } } else if (fedOp == fedOpUnbind) { Mutex::ScopedLock l(lock); BoundKey& bk = bindings[routingKey]; QPID_LOG(debug, "Bind - fedOpUnbind key [" << routingKey << "] queue " << queue->getName() << " (origin=" << fedOrigin << ")" << " (count=" << bk.fedBinding.count() << ")"); propagate = bk.fedBinding.delOrigin(queue->getName(), fedOrigin); if (bk.fedBinding.countFedBindings(queue->getName()) == 0) unbind(queue, routingKey, args); } else if (fedOp == fedOpReorigin) { /** gather up all the keys that need rebinding in a local vector * while holding the lock. Then propagate once the lock is * released */ std::vector keys2prop; { Mutex::ScopedLock l(lock); for (Bindings::iterator iter = bindings.begin(); iter != bindings.end(); iter++) { const BoundKey& bk = iter->second; if (bk.fedBinding.hasLocal()) { keys2prop.push_back(iter->first); } } } /* lock dropped */ for (std::vector::const_iterator key = keys2prop.begin(); key != keys2prop.end(); key++) { propagateFedOp( *key, string(), fedOpBind, string()); } } routeIVE(); if (propagate) propagateFedOp(routingKey, fedTags, fedOp, fedOrigin); return true; } bool DirectExchange::unbind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* args) { string fedOrigin(args ? args->getAsString(qpidFedOrigin) : ""); bool propagate = false; QPID_LOG(debug, "Unbinding key [" << routingKey << "] from queue " << queue->getName() << " on exchange " << getName() << " origin=" << fedOrigin << ")" ); { Mutex::ScopedLock l(lock); BoundKey& bk = bindings[routingKey]; if (bk.queues.remove_if(MatchQueue(queue))) { propagate = bk.fedBinding.delOrigin(queue->getName(), fedOrigin); if (mgmtExchange != 0) { mgmtExchange->dec_bindingCount(); } if (bk.queues.empty()) { bindings.erase(routingKey); } } else { return false; } } // If I delete my local binding, propagate this unbind to any upstream brokers if (propagate) propagateFedOp(routingKey, string(), fedOpUnbind, string()); return true; } void DirectExchange::route(Deliverable& msg) { const string& routingKey = msg.getMessage().getRoutingKey(); PreRoute pr(msg, this); ConstBindingList b; { Mutex::ScopedLock l(lock); b = bindings[routingKey].queues.snapshot(); } doRoute(msg, b); } bool DirectExchange::isBound(Queue::shared_ptr queue, const string* const routingKey, const FieldTable* const) { Mutex::ScopedLock l(lock); if (routingKey) { Bindings::iterator i = bindings.find(*routingKey); if (i == bindings.end()) return false; if (!queue) return true; Queues::ConstPtr p = i->second.queues.snapshot(); return p && std::find_if(p->begin(), p->end(), MatchQueue(queue)) != p->end(); } else if (!queue) { //if no queue or routing key is specified, just report whether any bindings exist return bindings.size() > 0; } else { for (Bindings::iterator i = bindings.begin(); i != bindings.end(); i++) { Queues::ConstPtr p = i->second.queues.snapshot(); if (p && std::find_if(p->begin(), p->end(), MatchQueue(queue)) != p->end()) return true; } return false; } return false; } DirectExchange::~DirectExchange() {} const std::string DirectExchange::typeName("direct"); qpidc-0.16/src/qpid/broker/Broker.cpp0000664000076400007640000012555511723414716020117 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Broker.h" #include "qpid/broker/ConnectionState.h" #include "qpid/broker/DirectExchange.h" #include "qpid/broker/FanOutExchange.h" #include "qpid/broker/HeadersExchange.h" #include "qpid/broker/MessageStoreModule.h" #include "qpid/broker/NullMessageStore.h" #include "qpid/broker/RecoveryManagerImpl.h" #include "qpid/broker/SaslAuthenticator.h" #include "qpid/broker/SecureConnectionFactory.h" #include "qpid/broker/TopicExchange.h" #include "qpid/broker/Link.h" #include "qpid/broker/ExpiryPolicy.h" #include "qpid/broker/QueueFlowLimit.h" #include "qpid/broker/MessageGroupManager.h" #include "qmf/org/apache/qpid/broker/Package.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerCreate.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerDelete.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerQuery.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerEcho.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerGetLogLevel.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerQueueMoveMessages.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerSetLogLevel.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerSetTimestampConfig.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerGetTimestampConfig.h" #include "qmf/org/apache/qpid/broker/EventExchangeDeclare.h" #include "qmf/org/apache/qpid/broker/EventExchangeDelete.h" #include "qmf/org/apache/qpid/broker/EventQueueDeclare.h" #include "qmf/org/apache/qpid/broker/EventQueueDelete.h" #include "qmf/org/apache/qpid/broker/EventBind.h" #include "qmf/org/apache/qpid/broker/EventUnbind.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementDirectExchange.h" #include "qpid/management/ManagementTopicExchange.h" #include "qpid/log/Logger.h" #include "qpid/log/Options.h" #include "qpid/log/Statement.h" #include "qpid/log/posix/SinkOptions.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/ProtocolInitiation.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/Uuid.h" #include "qpid/sys/ProtocolFactory.h" #include "qpid/sys/Poller.h" #include "qpid/sys/Dispatcher.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Time.h" #include "qpid/sys/ConnectionInputHandler.h" #include "qpid/sys/ConnectionInputHandlerFactory.h" #include "qpid/sys/TimeoutHandler.h" #include "qpid/sys/SystemInfo.h" #include "qpid/Address.h" #include "qpid/StringUtils.h" #include "qpid/Url.h" #include "qpid/Version.h" #include #include #include #include using qpid::sys::ProtocolFactory; using qpid::sys::Poller; using qpid::sys::Dispatcher; using qpid::sys::Thread; using qpid::framing::FrameHandler; using qpid::framing::ChannelId; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; using qpid::management::Args; using qpid::management::getManagementExecutionContext; using qpid::types::Variant; using std::string; using std::make_pair; namespace _qmf = qmf::org::apache::qpid::broker; namespace qpid { namespace broker { Broker::Options::Options(const std::string& name) : qpid::Options(name), noDataDir(0), port(DEFAULT_PORT), workerThreads(5), maxConnections(500), connectionBacklog(10), enableMgmt(1), mgmtPublish(1), mgmtPubInterval(10), queueCleanInterval(60*10),//10 minutes auth(SaslAuthenticator::available()), realm("QPID"), replayFlushLimit(0), replayHardLimit(0), queueLimit(100*1048576/*100M default limit*/), tcpNoDelay(false), requireEncrypted(false), asyncQueueEvents(false), // Must be false in a cluster. qmf2Support(true), qmf1Support(true), queueFlowStopRatio(80), queueFlowResumeRatio(70), queueThresholdEventRatio(80), defaultMsgGroup("qpid.no-group"), timestampRcvMsgs(false), // set the 0.10 timestamp delivery property linkMaintenanceInterval(2) { int c = sys::SystemInfo::concurrency(); workerThreads=c+1; std::string home = getHome(); if (home.length() == 0) dataDir += DEFAULT_DATA_DIR_LOCATION; else dataDir += home; dataDir += DEFAULT_DATA_DIR_NAME; addOptions() ("data-dir", optValue(dataDir,"DIR"), "Directory to contain persistent data generated by the broker") ("no-data-dir", optValue(noDataDir), "Don't use a data directory. No persistent configuration will be loaded or stored") ("port,p", optValue(port,"PORT"), "Tells the broker to listen on PORT") ("worker-threads", optValue(workerThreads, "N"), "Sets the broker thread pool size") ("max-connections", optValue(maxConnections, "N"), "Sets the maximum allowed connections") ("connection-backlog", optValue(connectionBacklog, "N"), "Sets the connection backlog limit for the server socket") ("mgmt-enable,m", optValue(enableMgmt,"yes|no"), "Enable Management") ("mgmt-publish", optValue(mgmtPublish,"yes|no"), "Enable Publish of Management Data ('no' implies query-only)") ("mgmt-qmf2", optValue(qmf2Support,"yes|no"), "Enable broadcast of management information over QMF v2") ("mgmt-qmf1", optValue(qmf1Support,"yes|no"), "Enable broadcast of management information over QMF v1") // FIXME aconway 2012-02-13: consistent treatment of values in SECONDS // allow sub-second intervals. ("mgmt-pub-interval", optValue(mgmtPubInterval, "SECONDS"), "Management Publish Interval") ("queue-purge-interval", optValue(queueCleanInterval, "SECONDS"), "Interval between attempts to purge any expired messages from queues") ("auth", optValue(auth, "yes|no"), "Enable authentication, if disabled all incoming connections will be trusted") ("realm", optValue(realm, "REALM"), "Use the given realm when performing authentication") ("default-queue-limit", optValue(queueLimit, "BYTES"), "Default maximum size for queues (in bytes)") ("tcp-nodelay", optValue(tcpNoDelay), "Set TCP_NODELAY on TCP connections") ("require-encryption", optValue(requireEncrypted), "Only accept connections that are encrypted") ("known-hosts-url", optValue(knownHosts, "URL or 'none'"), "URL to send as 'known-hosts' to clients ('none' implies empty list)") ("sasl-config", optValue(saslConfigPath, "DIR"), "gets sasl config info from nonstandard location") ("async-queue-events", optValue(asyncQueueEvents, "yes|no"), "Set Queue Events async, used for services like replication") ("default-flow-stop-threshold", optValue(queueFlowStopRatio, "PERCENT"), "Percent of queue's maximum capacity at which flow control is activated.") ("default-flow-resume-threshold", optValue(queueFlowResumeRatio, "PERCENT"), "Percent of queue's maximum capacity at which flow control is de-activated.") ("default-event-threshold-ratio", optValue(queueThresholdEventRatio, "%age of limit"), "The ratio of any specified queue limit at which an event will be raised") ("default-message-group", optValue(defaultMsgGroup, "GROUP-IDENTIFER"), "Group identifier to assign to messages delivered to a message group queue that do not contain an identifier.") ("enable-timestamp", optValue(timestampRcvMsgs, "yes|no"), "Add current time to each received message.") ("link-maintenace-interval", optValue(linkMaintenanceInterval, "SECONDS")) ; } const std::string empty; const std::string amq_direct("amq.direct"); const std::string amq_topic("amq.topic"); const std::string amq_fanout("amq.fanout"); const std::string amq_match("amq.match"); const std::string qpid_management("qpid.management"); const std::string knownHostsNone("none"); Broker::Broker(const Broker::Options& conf) : poller(new Poller), config(conf), managementAgent(conf.enableMgmt ? new ManagementAgent(conf.qmf1Support, conf.qmf2Support) : 0), store(new NullMessageStore), acl(0), dataDir(conf.noDataDir ? std::string() : conf.dataDir), queues(this), exchanges(this), links(this), factory(new SecureConnectionFactory(*this)), dtxManager(timer), sessionManager( qpid::SessionState::Configuration( conf.replayFlushLimit*1024, // convert kb to bytes. conf.replayHardLimit*1024), *this), mgmtObject(0), queueCleaner(queues, &timer), queueEvents(poller,!conf.asyncQueueEvents), recovery(true), inCluster(false), clusterUpdatee(false), expiryPolicy(new ExpiryPolicy), connectionCounter(conf.maxConnections), getKnownBrokers(boost::bind(&Broker::getKnownBrokersImpl, this)), deferDelivery(boost::bind(&Broker::deferDeliveryImpl, this, _1, _2)) { try { if (conf.enableMgmt) { QPID_LOG(info, "Management enabled"); managementAgent->configure(dataDir.isEnabled() ? dataDir.getPath() : string(), conf.mgmtPublish, conf.mgmtPubInterval, this, conf.workerThreads + 3); managementAgent->setName("apache.org", "qpidd"); _qmf::Package packageInitializer(managementAgent.get()); System* system = new System (dataDir.isEnabled() ? dataDir.getPath() : string(), this); systemObject = System::shared_ptr(system); mgmtObject = new _qmf::Broker(managementAgent.get(), this, system, "amqp-broker"); mgmtObject->set_systemRef(system->GetManagementObject()->getObjectId()); mgmtObject->set_port(conf.port); mgmtObject->set_workerThreads(conf.workerThreads); mgmtObject->set_maxConns(conf.maxConnections); mgmtObject->set_connBacklog(conf.connectionBacklog); mgmtObject->set_mgmtPubInterval(conf.mgmtPubInterval); mgmtObject->set_mgmtPublish(conf.mgmtPublish); mgmtObject->set_version(qpid::version); if (dataDir.isEnabled()) mgmtObject->set_dataDir(dataDir.getPath()); else mgmtObject->clr_dataDir(); managementAgent->addObject(mgmtObject, 0, true); // Since there is currently no support for virtual hosts, a placeholder object // representing the implied single virtual host is added here to keep the // management schema correct. Vhost* vhost = new Vhost(this, this); vhostObject = Vhost::shared_ptr(vhost); framing::Uuid uuid(managementAgent->getUuid()); federationTag = uuid.str(); vhostObject->setFederationTag(federationTag); queues.setParent(vhost); exchanges.setParent(vhost); links.setParent(vhost); } else { // Management is disabled so there is no broker management ID. // Create a unique uuid to use as the federation tag. framing::Uuid uuid(true); federationTag = uuid.str(); } QueuePolicy::setDefaultMaxSize(conf.queueLimit); // Early-Initialize plugins Plugin::earlyInitAll(*this); QueueFlowLimit::setDefaults(conf.queueLimit, conf.queueFlowStopRatio, conf.queueFlowResumeRatio); MessageGroupManager::setDefaults(conf.defaultMsgGroup); // If no plugin store module registered itself, set up the null store. if (NullMessageStore::isNullStore(store.get())) setStore(); exchanges.declare(empty, DirectExchange::typeName); // Default exchange. if (store.get() != 0) { // The cluster plug-in will setRecovery(false) on all but the first // broker to join a cluster. if (getRecovery()) { RecoveryManagerImpl recoverer(queues, exchanges, links, dtxManager); store->recover(recoverer); } else { QPID_LOG(notice, "Cluster recovery: recovered journal data discarded and journal files pushed down"); store->truncateInit(true); // save old files in subdir } } //ensure standard exchanges exist (done after recovery from store) declareStandardExchange(amq_direct, DirectExchange::typeName); declareStandardExchange(amq_topic, TopicExchange::typeName); declareStandardExchange(amq_fanout, FanOutExchange::typeName); declareStandardExchange(amq_match, HeadersExchange::typeName); if(conf.enableMgmt) { exchanges.declare(qpid_management, ManagementTopicExchange::typeName); Exchange::shared_ptr mExchange = exchanges.get(qpid_management); Exchange::shared_ptr dExchange = exchanges.get(amq_direct); managementAgent->setExchange(mExchange, dExchange); boost::dynamic_pointer_cast(mExchange)->setManagmentAgent(managementAgent.get(), 1); std::string qmfTopic("qmf.default.topic"); std::string qmfDirect("qmf.default.direct"); std::pair topicPair(exchanges.declare(qmfTopic, ManagementTopicExchange::typeName)); std::pair directPair(exchanges.declare(qmfDirect, ManagementDirectExchange::typeName)); boost::dynamic_pointer_cast(directPair.first)->setManagmentAgent(managementAgent.get(), 2); boost::dynamic_pointer_cast(topicPair.first)->setManagmentAgent(managementAgent.get(), 2); managementAgent->setExchangeV2(topicPair.first, directPair.first); } else QPID_LOG(info, "Management not enabled"); // this feature affects performance, so let's be sure that gets logged! if (conf.timestampRcvMsgs) { QPID_LOG(notice, "Receive message timestamping is ENABLED."); } /** * SASL setup, can fail and terminate startup */ if (conf.auth) { SaslAuthenticator::init(qpid::saslName, conf.saslConfigPath); QPID_LOG(info, "SASL enabled"); } else { QPID_LOG(notice, "SASL disabled: No Authentication Performed"); } // Initialize plugins Plugin::initializeAll(*this); if (managementAgent.get()) managementAgent->pluginsInitialized(); if (conf.queueCleanInterval) { queueCleaner.start(conf.queueCleanInterval * qpid::sys::TIME_SEC); } //initialize known broker urls (TODO: add support for urls for other transports (SSL, RDMA)): if (conf.knownHosts.empty()) { boost::shared_ptr factory = getProtocolFactory(TCP_TRANSPORT); if (factory) { knownBrokers.push_back ( qpid::Url::getIpAddressesUrl ( factory->getPort() ) ); } } else if (conf.knownHosts != knownHostsNone) { knownBrokers.push_back(Url(conf.knownHosts)); } } catch (const std::exception& /*e*/) { finalize(); throw; } } void Broker::declareStandardExchange(const std::string& name, const std::string& type) { bool storeEnabled = store.get() != NULL; std::pair status = exchanges.declare(name, type, storeEnabled); if (status.second && storeEnabled) { store->create(*status.first, framing::FieldTable ()); } } boost::intrusive_ptr Broker::create(int16_t port) { Options config; config.port=port; return create(config); } boost::intrusive_ptr Broker::create(const Options& opts) { return boost::intrusive_ptr(new Broker(opts)); } void Broker::setStore (boost::shared_ptr& _store) { store.reset(new MessageStoreModule (_store)); setStore(); } void Broker::setStore () { queues.setStore (store.get()); dtxManager.setStore (store.get()); links.setStore (store.get()); } void Broker::run() { if (config.workerThreads > 0) { QPID_LOG(notice, "Broker running"); Dispatcher d(poller); int numIOThreads = config.workerThreads; std::vector t(numIOThreads-1); // Run n-1 io threads for (int i=0; ishutdown(); } Broker::~Broker() { shutdown(); queueEvents.shutdown(); finalize(); // Finalize any plugins. if (config.auth) SaslAuthenticator::fini(); timer.stop(); QPID_LOG(notice, "Shut down"); } ManagementObject* Broker::GetManagementObject(void) const { return (ManagementObject*) mgmtObject; } Manageable* Broker::GetVhostObject(void) const { return vhostObject.get(); } Manageable::status_t Broker::ManagementMethod (uint32_t methodId, Args& args, string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; switch (methodId) { case _qmf::Broker::METHOD_ECHO : QPID_LOG (debug, "Broker::echo(" << dynamic_cast<_qmf::ArgsBrokerEcho&>(args).io_sequence << ", " << dynamic_cast<_qmf::ArgsBrokerEcho&>(args).io_body << ")"); status = Manageable::STATUS_OK; break; case _qmf::Broker::METHOD_CONNECT : { _qmf::ArgsBrokerConnect& hp= dynamic_cast<_qmf::ArgsBrokerConnect&>(args); string transport = hp.i_transport.empty() ? TCP_TRANSPORT : hp.i_transport; QPID_LOG (debug, "Broker::connect() " << hp.i_host << ":" << hp.i_port << "; transport=" << transport << "; durable=" << (hp.i_durable?"T":"F") << "; authMech=\"" << hp.i_authMechanism << "\""); if (!getProtocolFactory(transport)) { QPID_LOG(error, "Transport '" << transport << "' not supported"); return Manageable::STATUS_NOT_IMPLEMENTED; } std::pair response = links.declare (hp.i_host, hp.i_port, transport, hp.i_durable, hp.i_authMechanism, hp.i_username, hp.i_password); if (hp.i_durable && response.second) store->create(*response.first); status = Manageable::STATUS_OK; break; } case _qmf::Broker::METHOD_QUEUEMOVEMESSAGES : { _qmf::ArgsBrokerQueueMoveMessages& moveArgs= dynamic_cast<_qmf::ArgsBrokerQueueMoveMessages&>(args); QPID_LOG (debug, "Broker::queueMoveMessages()"); if (queueMoveMessages(moveArgs.i_srcQueue, moveArgs.i_destQueue, moveArgs.i_qty, moveArgs.i_filter)) status = Manageable::STATUS_OK; else return Manageable::STATUS_PARAMETER_INVALID; break; } case _qmf::Broker::METHOD_SETLOGLEVEL : setLogLevel(dynamic_cast<_qmf::ArgsBrokerSetLogLevel&>(args).i_level); QPID_LOG (debug, "Broker::setLogLevel()"); status = Manageable::STATUS_OK; break; case _qmf::Broker::METHOD_GETLOGLEVEL : dynamic_cast<_qmf::ArgsBrokerGetLogLevel&>(args).o_level = getLogLevel(); QPID_LOG (debug, "Broker::getLogLevel()"); status = Manageable::STATUS_OK; break; case _qmf::Broker::METHOD_CREATE : { _qmf::ArgsBrokerCreate& a = dynamic_cast<_qmf::ArgsBrokerCreate&>(args); createObject(a.i_type, a.i_name, a.i_properties, a.i_strict, getManagementExecutionContext()); status = Manageable::STATUS_OK; break; } case _qmf::Broker::METHOD_DELETE : { _qmf::ArgsBrokerDelete& a = dynamic_cast<_qmf::ArgsBrokerDelete&>(args); deleteObject(a.i_type, a.i_name, a.i_options, getManagementExecutionContext()); status = Manageable::STATUS_OK; break; } case _qmf::Broker::METHOD_QUERY : { _qmf::ArgsBrokerQuery& a = dynamic_cast<_qmf::ArgsBrokerQuery&>(args); status = queryObject(a.i_type, a.i_name, a.o_results, getManagementExecutionContext()); break; } case _qmf::Broker::METHOD_GETTIMESTAMPCONFIG: { _qmf::ArgsBrokerGetTimestampConfig& a = dynamic_cast<_qmf::ArgsBrokerGetTimestampConfig&>(args); status = getTimestampConfig(a.o_receive, getManagementExecutionContext()); break; } case _qmf::Broker::METHOD_SETTIMESTAMPCONFIG: { _qmf::ArgsBrokerSetTimestampConfig& a = dynamic_cast<_qmf::ArgsBrokerSetTimestampConfig&>(args); status = setTimestampConfig(a.i_receive, getManagementExecutionContext()); break; } default: QPID_LOG (debug, "Broker ManagementMethod not implemented: id=" << methodId << "]"); status = Manageable::STATUS_NOT_IMPLEMENTED; break; } return status; } namespace { const std::string TYPE_QUEUE("queue"); const std::string TYPE_EXCHANGE("exchange"); const std::string TYPE_TOPIC("topic"); const std::string TYPE_BINDING("binding"); const std::string DURABLE("durable"); const std::string AUTO_DELETE("auto-delete"); const std::string ALTERNATE_EXCHANGE("alternate-exchange"); const std::string EXCHANGE_TYPE("exchange-type"); const std::string QUEUE_NAME("queue"); const std::string EXCHANGE_NAME("exchange"); const std::string ATTRIBUTE_TIMESTAMP_0_10("timestamp-0.10"); const std::string _TRUE("true"); const std::string _FALSE("false"); } struct InvalidBindingIdentifier : public qpid::Exception { InvalidBindingIdentifier(const std::string& name) : qpid::Exception(name) {} std::string getPrefix() const { return "invalid binding"; } }; struct BindingIdentifier { std::string exchange; std::string queue; std::string key; BindingIdentifier(const std::string& name) { std::vector path; split(path, name, "/"); switch (path.size()) { case 1: queue = path[0]; break; case 2: exchange = path[0]; queue = path[1]; break; case 3: exchange = path[0]; queue = path[1]; key = path[2]; break; default: throw InvalidBindingIdentifier(name); } } }; struct ObjectAlreadyExists : public qpid::Exception { ObjectAlreadyExists(const std::string& name) : qpid::Exception(name) {} std::string getPrefix() const { return "object already exists"; } }; struct UnknownObjectType : public qpid::Exception { UnknownObjectType(const std::string& type) : qpid::Exception(type) {} std::string getPrefix() const { return "unknown object type"; } }; void Broker::createObject(const std::string& type, const std::string& name, const Variant::Map& properties, bool /*strict*/, const ConnectionState* context) { std::string userId; std::string connectionId; if (context) { userId = context->getUserId(); connectionId = context->getUrl(); } //TODO: implement 'strict' option (check there are no unrecognised properties) QPID_LOG (debug, "Broker::create(" << type << ", " << name << "," << properties << ")"); if (type == TYPE_QUEUE) { bool durable(false); bool autodelete(false); std::string alternateExchange; Variant::Map extensions; for (Variant::Map::const_iterator i = properties.begin(); i != properties.end(); ++i) { // extract durable, auto-delete and alternate-exchange properties if (i->first == DURABLE) durable = i->second; else if (i->first == AUTO_DELETE) autodelete = i->second; else if (i->first == ALTERNATE_EXCHANGE) alternateExchange = i->second.asString(); //treat everything else as extension properties else extensions[i->first] = i->second; } framing::FieldTable arguments; amqp_0_10::translate(extensions, arguments); std::pair, bool> result = createQueue(name, durable, autodelete, 0, alternateExchange, arguments, userId, connectionId); if (!result.second) { throw ObjectAlreadyExists(name); } } else if (type == TYPE_EXCHANGE || type == TYPE_TOPIC) { bool durable(false); std::string exchangeType("topic"); std::string alternateExchange; Variant::Map extensions; for (Variant::Map::const_iterator i = properties.begin(); i != properties.end(); ++i) { // extract durable, auto-delete and alternate-exchange properties if (i->first == DURABLE) durable = i->second; else if (i->first == EXCHANGE_TYPE) exchangeType = i->second.asString(); else if (i->first == ALTERNATE_EXCHANGE) alternateExchange = i->second.asString(); //treat everything else as extension properties else extensions[i->first] = i->second; } framing::FieldTable arguments; amqp_0_10::translate(extensions, arguments); try { std::pair, bool> result = createExchange(name, exchangeType, durable, alternateExchange, arguments, userId, connectionId); if (!result.second) { throw ObjectAlreadyExists(name); } } catch (const UnknownExchangeTypeException&) { throw Exception(QPID_MSG("Invalid exchange type: " << exchangeType)); } } else if (type == TYPE_BINDING) { BindingIdentifier binding(name); std::string exchangeType("topic"); Variant::Map extensions; for (Variant::Map::const_iterator i = properties.begin(); i != properties.end(); ++i) { // extract durable, auto-delete and alternate-exchange properties if (i->first == EXCHANGE_TYPE) exchangeType = i->second.asString(); //treat everything else as extension properties else extensions[i->first] = i->second; } framing::FieldTable arguments; amqp_0_10::translate(extensions, arguments); bind(binding.queue, binding.exchange, binding.key, arguments, userId, connectionId); } else { throw UnknownObjectType(type); } } void Broker::deleteObject(const std::string& type, const std::string& name, const Variant::Map& options, const ConnectionState* context) { std::string userId; std::string connectionId; if (context) { userId = context->getUserId(); connectionId = context->getUrl(); } QPID_LOG (debug, "Broker::delete(" << type << ", " << name << "," << options << ")"); if (type == TYPE_QUEUE) { deleteQueue(name, userId, connectionId); } else if (type == TYPE_EXCHANGE || type == TYPE_TOPIC) { deleteExchange(name, userId, connectionId); } else if (type == TYPE_BINDING) { BindingIdentifier binding(name); unbind(binding.queue, binding.exchange, binding.key, userId, connectionId); } else { throw UnknownObjectType(type); } } Manageable::status_t Broker::queryObject(const std::string& type, const std::string& name, Variant::Map& results, const ConnectionState* context) { std::string userId; std::string connectionId; if (context) { userId = context->getUserId(); connectionId = context->getUrl(); } QPID_LOG (debug, "Broker::query(" << type << ", " << name << ")"); if (type == TYPE_QUEUE) return queryQueue( name, userId, connectionId, results ); if (type == TYPE_EXCHANGE || type == TYPE_TOPIC || type == TYPE_BINDING) return Manageable::STATUS_NOT_IMPLEMENTED; throw UnknownObjectType(type); } Manageable::status_t Broker::queryQueue( const std::string& name, const std::string& userId, const std::string& /*connectionId*/, Variant::Map& results ) { (void) results; if (acl) { if (!acl->authorise(userId, acl::ACT_ACCESS, acl::OBJ_QUEUE, name, NULL) ) throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied queue query request from " << userId)); } boost::shared_ptr q(queues.find(name)); if (!q) { QPID_LOG(error, "Query failed: queue not found, name=" << name); return Manageable::STATUS_UNKNOWN_OBJECT; } q->query( results ); return Manageable::STATUS_OK;; } Manageable::status_t Broker::getTimestampConfig(bool& receive, const ConnectionState* context) { std::string name; // none needed for broker std::string userId = context->getUserId(); if (acl && !acl->authorise(userId, acl::ACT_ACCESS, acl::OBJ_BROKER, name, NULL)) { throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied broker timestamp get request from " << userId)); } receive = config.timestampRcvMsgs; return Manageable::STATUS_OK; } Manageable::status_t Broker::setTimestampConfig(const bool receive, const ConnectionState* context) { std::string name; // none needed for broker std::string userId = context->getUserId(); if (acl && !acl->authorise(userId, acl::ACT_UPDATE, acl::OBJ_BROKER, name, NULL)) { throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied broker timestamp set request from " << userId)); } config.timestampRcvMsgs = receive; QPID_LOG(notice, "Receive message timestamping is " << ((config.timestampRcvMsgs) ? "ENABLED." : "DISABLED.")); return Manageable::STATUS_OK; } void Broker::setLogLevel(const std::string& level) { QPID_LOG(notice, "Changing log level to " << level); std::vector selectors; split(selectors, level, ", "); qpid::log::Logger::instance().reconfigure(selectors); } std::string Broker::getLogLevel() { std::string level; const std::vector& selectors = qpid::log::Logger::instance().getOptions().selectors; for (std::vector::const_iterator i = selectors.begin(); i != selectors.end(); ++i) { if (i != selectors.begin()) level += std::string(","); level += *i; } return level; } boost::shared_ptr Broker::getProtocolFactory(const std::string& name) const { ProtocolFactoryMap::const_iterator i = name.empty() ? protocolFactories.begin() : protocolFactories.find(name); if (i == protocolFactories.end()) return boost::shared_ptr(); else return i->second; } uint16_t Broker::getPort(const std::string& name) const { boost::shared_ptr factory = getProtocolFactory(name); if (factory) { return factory->getPort(); } else { throw NoSuchTransportException(QPID_MSG("No such transport: '" << name << "'")); } } void Broker::registerProtocolFactory(const std::string& name, ProtocolFactory::shared_ptr protocolFactory) { protocolFactories[name] = protocolFactory; Url::addProtocol(name); } void Broker::accept() { for (ProtocolFactoryMap::const_iterator i = protocolFactories.begin(); i != protocolFactories.end(); i++) { i->second->accept(poller, factory.get()); } } void Broker::connect( const std::string& host, const std::string& port, const std::string& transport, boost::function2 failed, sys::ConnectionCodec::Factory* f) { boost::shared_ptr pf = getProtocolFactory(transport); if (pf) pf->connect(poller, host, port, f ? f : factory.get(), failed); else throw NoSuchTransportException(QPID_MSG("Unsupported transport type: " << transport)); } void Broker::connect( const Url& url, boost::function2 failed, sys::ConnectionCodec::Factory* f) { url.throwIfEmpty(); const Address& addr=url[0]; connect(addr.host, boost::lexical_cast(addr.port), addr.protocol, failed, f); } uint32_t Broker::queueMoveMessages( const std::string& srcQueue, const std::string& destQueue, uint32_t qty, const Variant::Map& filter) { Queue::shared_ptr src_queue = queues.find(srcQueue); if (!src_queue) return 0; Queue::shared_ptr dest_queue = queues.find(destQueue); if (!dest_queue) return 0; return src_queue->move(dest_queue, qty, &filter); } boost::shared_ptr Broker::getPoller() { return poller; } std::vector Broker::getKnownBrokersImpl() { return knownBrokers; } bool Broker::deferDeliveryImpl(const std::string& , const boost::intrusive_ptr& ) { return false; } void Broker::setClusterTimer(std::auto_ptr t) { clusterTimer = t; queueCleaner.setTimer(clusterTimer.get()); dtxManager.setTimer(*clusterTimer.get()); } const std::string Broker::TCP_TRANSPORT("tcp"); std::pair, bool> Broker::createQueue( const std::string& name, bool durable, bool autodelete, const OwnershipToken* owner, const std::string& alternateExchange, const qpid::framing::FieldTable& arguments, const std::string& userId, const std::string& connectionId) { if (acl) { std::map params; params.insert(make_pair(acl::PROP_ALTERNATE, alternateExchange)); params.insert(make_pair(acl::PROP_PASSIVE, _FALSE)); params.insert(make_pair(acl::PROP_DURABLE, durable ? _TRUE : _FALSE)); params.insert(make_pair(acl::PROP_EXCLUSIVE, owner ? _TRUE : _FALSE)); params.insert(make_pair(acl::PROP_AUTODELETE, autodelete ? _TRUE : _FALSE)); params.insert(make_pair(acl::PROP_POLICYTYPE, arguments.getAsString("qpid.policy_type"))); params.insert(make_pair(acl::PROP_MAXQUEUECOUNT, boost::lexical_cast(arguments.getAsInt("qpid.max_count")))); params.insert(make_pair(acl::PROP_MAXQUEUESIZE, boost::lexical_cast(arguments.getAsInt64("qpid.max_size")))); if (!acl->authorise(userId,acl::ACT_CREATE,acl::OBJ_QUEUE,name,¶ms) ) throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied queue create request from " << userId)); } Exchange::shared_ptr alternate; if (!alternateExchange.empty()) { alternate = exchanges.get(alternateExchange); if (!alternate) throw framing::NotFoundException(QPID_MSG("Alternate exchange does not exist: " << alternateExchange)); } std::pair result = queues.declare(name, durable, autodelete, owner, alternate, arguments); if (result.second) { //add default binding: result.first->bind(exchanges.getDefault(), name); if (managementAgent.get()) { //TODO: debatable whether we should raise an event here for //create when this is a 'declare' event; ideally add a create //event instead? managementAgent->raiseEvent( _qmf::EventQueueDeclare(connectionId, userId, name, durable, owner, autodelete, alternateExchange, ManagementAgent::toMap(arguments), "created")); } } return result; } void Broker::deleteQueue(const std::string& name, const std::string& userId, const std::string& connectionId, QueueFunctor check) { if (acl && !acl->authorise(userId,acl::ACT_DELETE,acl::OBJ_QUEUE,name,NULL)) { throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied queue delete request from " << userId)); } Queue::shared_ptr queue = queues.find(name); if (queue) { if (check) check(queue); queues.destroy(name); queue->destroyed(); } else { throw framing::NotFoundException(QPID_MSG("Delete failed. No such queue: " << name)); } if (managementAgent.get()) managementAgent->raiseEvent(_qmf::EventQueueDelete(connectionId, userId, name)); } std::pair Broker::createExchange( const std::string& name, const std::string& type, bool durable, const std::string& alternateExchange, const qpid::framing::FieldTable& arguments, const std::string& userId, const std::string& connectionId) { if (acl) { std::map params; params.insert(make_pair(acl::PROP_TYPE, type)); params.insert(make_pair(acl::PROP_ALTERNATE, alternateExchange)); params.insert(make_pair(acl::PROP_PASSIVE, _FALSE)); params.insert(make_pair(acl::PROP_DURABLE, durable ? _TRUE : _FALSE)); if (!acl->authorise(userId,acl::ACT_CREATE,acl::OBJ_EXCHANGE,name,¶ms) ) throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange create request from " << userId)); } Exchange::shared_ptr alternate; if (!alternateExchange.empty()) { alternate = exchanges.get(alternateExchange); if (!alternate) throw framing::NotFoundException(QPID_MSG("Alternate exchange does not exist: " << alternateExchange)); } std::pair result; result = exchanges.declare(name, type, durable, arguments); if (result.second) { if (alternate) { result.first->setAlternate(alternate); alternate->incAlternateUsers(); } if (durable) { store->create(*result.first, arguments); } if (managementAgent.get()) { //TODO: debatable whether we should raise an event here for //create when this is a 'declare' event; ideally add a create //event instead? managementAgent->raiseEvent(_qmf::EventExchangeDeclare(connectionId, userId, name, type, alternateExchange, durable, false, ManagementAgent::toMap(arguments), "created")); } } return result; } void Broker::deleteExchange(const std::string& name, const std::string& userId, const std::string& connectionId) { if (acl) { if (!acl->authorise(userId,acl::ACT_DELETE,acl::OBJ_EXCHANGE,name,NULL) ) throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange delete request from " << userId)); } if (name.empty()) { throw framing::InvalidArgumentException(QPID_MSG("Delete not allowed for default exchange")); } Exchange::shared_ptr exchange(exchanges.get(name)); if (!exchange) throw framing::NotFoundException(QPID_MSG("Delete failed. No such exchange: " << name)); if (exchange->inUseAsAlternate()) throw framing::NotAllowedException(QPID_MSG("Exchange in use as alternate-exchange.")); if (exchange->isDurable()) store->destroy(*exchange); if (exchange->getAlternate()) exchange->getAlternate()->decAlternateUsers(); exchanges.destroy(name); if (managementAgent.get()) managementAgent->raiseEvent(_qmf::EventExchangeDelete(connectionId, userId, name)); } void Broker::bind(const std::string& queueName, const std::string& exchangeName, const std::string& key, const qpid::framing::FieldTable& arguments, const std::string& userId, const std::string& connectionId) { if (acl) { std::map params; params.insert(make_pair(acl::PROP_QUEUENAME, queueName)); params.insert(make_pair(acl::PROP_ROUTINGKEY, key)); if (!acl->authorise(userId,acl::ACT_BIND,acl::OBJ_EXCHANGE,exchangeName,¶ms)) throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange bind request from " << userId)); } if (exchangeName.empty()) { throw framing::InvalidArgumentException(QPID_MSG("Bind not allowed for default exchange")); } Queue::shared_ptr queue = queues.find(queueName); Exchange::shared_ptr exchange = exchanges.get(exchangeName); if (!queue) { throw framing::NotFoundException(QPID_MSG("Bind failed. No such queue: " << queueName)); } else if (!exchange) { throw framing::NotFoundException(QPID_MSG("Bind failed. No such exchange: " << exchangeName)); } else { if (queue->bind(exchange, key, arguments)) { if (managementAgent.get()) { managementAgent->raiseEvent(_qmf::EventBind(connectionId, userId, exchangeName, queueName, key, ManagementAgent::toMap(arguments))); } } } } void Broker::unbind(const std::string& queueName, const std::string& exchangeName, const std::string& key, const std::string& userId, const std::string& connectionId) { if (acl) { std::map params; params.insert(make_pair(acl::PROP_QUEUENAME, queueName)); params.insert(make_pair(acl::PROP_ROUTINGKEY, key)); if (!acl->authorise(userId,acl::ACT_UNBIND,acl::OBJ_EXCHANGE,exchangeName,¶ms) ) throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange unbind request from " << userId)); } if (exchangeName.empty()) { throw framing::InvalidArgumentException(QPID_MSG("Unbind not allowed for default exchange")); } Queue::shared_ptr queue = queues.find(queueName); Exchange::shared_ptr exchange = exchanges.get(exchangeName); if (!queue) { throw framing::NotFoundException(QPID_MSG("Unbind failed. No such queue: " << queueName)); } else if (!exchange) { throw framing::NotFoundException(QPID_MSG("Unbind failed. No such exchange: " << exchangeName)); } else { if (exchange->unbind(queue, key, 0)) { if (exchange->isDurable() && queue->isDurable()) { store->unbind(*exchange, *queue, key, qpid::framing::FieldTable()); } if (managementAgent.get()) { managementAgent->raiseEvent(_qmf::EventUnbind(connectionId, userId, exchangeName, queueName, key)); } } } } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/QueueBindings.h0000664000076400007640000000366211704054673021075 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QueueBindings_ #define _QueueBindings_ #include "qpid/framing/FieldTable.h" #include "qpid/sys/Mutex.h" #include #include #include namespace qpid { namespace broker { class ExchangeRegistry; class Queue; struct QueueBinding{ std::string exchange; std::string key; qpid::framing::FieldTable args; QueueBinding(const std::string& exchange, const std::string& key, const qpid::framing::FieldTable& args); }; class QueueBindings { public: /** Apply f to each QueueBinding. */ template void eachBinding(F f) const { Bindings local; { sys::Mutex::ScopedLock l(lock); local = bindings; } std::for_each(local.begin(), local.end(), f); } void add(const std::string& exchange, const std::string& key, const qpid::framing::FieldTable& args); void unbind(ExchangeRegistry& exchanges, boost::shared_ptr queue); private: mutable sys::Mutex lock; typedef std::vector Bindings; Bindings bindings; }; }} // namespace qpid::broker #endif qpidc-0.16/src/qpid/broker/Fairshare.h0000664000076400007640000000360311533441710020222 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_FAIRSHARE_H #define QPID_BROKER_FAIRSHARE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/PriorityQueue.h" namespace qpid { namespace framing { class FieldTable; } namespace broker { /** * Modifies a basic prioirty queue by limiting the number of messages * from each priority level that are dispatched before allowing * dispatch from the next level. */ class Fairshare : public PriorityQueue { public: Fairshare(size_t levels, uint limit); bool getState(uint& priority, uint& count) const; bool setState(uint priority, uint count); void setLimit(size_t level, uint limit); bool isNull(); static std::auto_ptr create(const qpid::framing::FieldTable& settings); static bool getState(const Messages&, uint& priority, uint& count); static bool setState(Messages&, uint priority, uint count); private: std::vector limits; uint priority; uint count; uint currentLevel(); uint nextLevel(); bool limitReached(); bool findFrontLevel(uint& p, PriorityLevels&); }; }} // namespace qpid::broker #endif /*!QPID_BROKER_FAIRSHARE_H*/ qpidc-0.16/src/qpid/broker/RecoverableQueue.h0000664000076400007640000000325211227113407021553 0ustar00jrossjross00000000000000#ifndef _broker_RecoverableQueue_h #define _broker_RecoverableQueue_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/RecoverableMessage.h" #include namespace qpid { namespace broker { class ExternalQueueStore; /** * The interface through which messages are added back to queues on * recovery. */ class RecoverableQueue { public: typedef boost::shared_ptr shared_ptr; virtual void setPersistenceId(uint64_t id) = 0; virtual uint64_t getPersistenceId() const = 0; /** * Used during recovery to add stored messages back to the queue */ virtual void recover(RecoverableMessage::shared_ptr msg) = 0; virtual ~RecoverableQueue() {}; virtual const std::string& getName() const = 0; virtual void setExternalQueueStore(ExternalQueueStore* inst) = 0; virtual ExternalQueueStore* getExternalQueueStore() const = 0; }; }} #endif qpidc-0.16/src/qpid/broker/SessionManager.h0000664000076400007640000000457211034770435021247 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_SESSIONMANAGER_H #define QPID_BROKER_SESSIONMANAGER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include namespace qpid { namespace broker { class Broker; class SessionState; class SessionHandler; /** * Create and manage SessionState objects. */ class SessionManager : private boost::noncopyable { public: SessionManager(const qpid::SessionState::Configuration&, Broker&); ~SessionManager(); /** Open a new active session, caller takes ownership */ std::auto_ptr attach(SessionHandler& h, const SessionId& id, bool/*force*/); /** Return a detached session to the manager, start the timeout counter. */ void detach(std::auto_ptr); /** Forget about an attached session. Called by SessionState destructor. */ void forget(const SessionId&); Broker& getBroker() const { return broker; } const qpid::SessionState::Configuration& getSessionConfig() const { return config; } private: typedef boost::ptr_vector Detached; // Sorted in expiry order. typedef std::set Attached; void eraseExpired(); sys::Mutex lock; Detached detached; Attached attached; qpid::SessionState::Configuration config; Broker& broker; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_SESSIONMANAGER_H*/ qpidc-0.16/src/qpid/broker/MessageAdapter.h0000664000076400007640000000434111362132210021173 0ustar00jrossjross00000000000000#ifndef _broker_MessageAdapter_h #define _broker_MessageAdapter_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/FieldTable.h" #include "qpid/framing/FrameSet.h" namespace qpid { namespace broker { // TODO aconway 2007-11-09: No longer needed, we only have one type of message. struct MessageAdapter { virtual ~MessageAdapter() {} virtual std::string getRoutingKey(const framing::FrameSet& f) = 0; virtual std::string getExchange(const framing::FrameSet& f) = 0; virtual bool isImmediate(const framing::FrameSet& f) = 0; virtual const framing::FieldTable* getApplicationHeaders(const framing::FrameSet& f) = 0; virtual bool isPersistent(const framing::FrameSet& f) = 0; virtual bool requiresAccept(const framing::FrameSet& f) = 0; virtual uint8_t getPriority(const framing::FrameSet& f) = 0; virtual std::string getAppId(const framing::FrameSet& f) = 0; }; struct TransferAdapter : MessageAdapter { virtual std::string getRoutingKey(const framing::FrameSet& f); virtual std::string getExchange(const framing::FrameSet& f); virtual const framing::FieldTable* getApplicationHeaders(const framing::FrameSet& f); virtual bool isPersistent(const framing::FrameSet& f); bool isImmediate(const framing::FrameSet&); bool requiresAccept(const framing::FrameSet& f); uint8_t getPriority(const framing::FrameSet& f); virtual std::string getAppId(const framing::FrameSet& f); }; }} #endif qpidc-0.16/src/qpid/broker/TopicExchange.h0000664000076400007640000001633611725210040021037 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TopicExchange_ #define _TopicExchange_ #include #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Exchange.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/Monitor.h" #include "qpid/broker/Queue.h" namespace qpid { namespace broker { class TopicExchange : public virtual Exchange { struct TokenIterator; class Normalizer; struct BindingKey { // binding for this node Binding::vector bindingVector; FedBinding fedBinding; }; // Binding database: // The dotted form of a binding key is broken up and stored in a directed tree graph. // Common binding prefix are merged. This allows the route match alogrithm to quickly // isolate those sub-trees that match a given routingKey. // For example, given the routes: // a.b.c.<...> // a.b.d.<...> // a.x.y.<...> // The resulting tree would be: // a-->b-->c-->... // | +-->d-->... // +-->x-->y-->... // class QPID_BROKER_CLASS_EXTERN BindingNode { public: typedef boost::shared_ptr shared_ptr; // for database transversal (visit a node). class TreeIterator { public: TreeIterator() {}; virtual ~TreeIterator() {}; virtual bool visit(BindingNode& node) = 0; }; BindingNode() {}; BindingNode(const std::string& token) : token(token) {}; QPID_BROKER_EXTERN virtual ~BindingNode(); // add normalizedRoute to tree, return associated BindingKey QPID_BROKER_EXTERN BindingKey* addBindingKey(const std::string& normalizedRoute); // return BindingKey associated with normalizedRoute QPID_BROKER_EXTERN BindingKey* getBindingKey(const std::string& normalizedRoute); // remove BindingKey associated with normalizedRoute QPID_BROKER_EXTERN void removeBindingKey(const std::string& normalizedRoute); // applies iter against each node in tree until iter returns false QPID_BROKER_EXTERN bool iterateAll(TreeIterator& iter); // applies iter against only matching nodes until iter returns false QPID_BROKER_EXTERN bool iterateMatch(const std::string& routingKey, TreeIterator& iter); std::string routePattern; // normalized binding that matches this node BindingKey bindings; // for matches against this node protected: std::string token; // portion of pattern represented by this node // children typedef std::map ChildMap; ChildMap childTokens; BindingNode::shared_ptr starChild; // "*" subtree BindingNode::shared_ptr hashChild; // "#" subtree unsigned int getChildCount() { return childTokens.size() + (starChild ? 1 : 0) + (hashChild ? 1 : 0); } BindingKey* addBindingKey(TokenIterator& bKey, const std::string& fullPattern); bool removeBindingKey(TokenIterator& bKey, const std::string& fullPattern); BindingKey* getBindingKey(TokenIterator& bKey); QPID_BROKER_EXTERN virtual bool iterateMatch(TokenIterator& rKey, TreeIterator& iter); bool iterateMatchChildren(const TokenIterator& key, TreeIterator& iter); }; // Special case: ("*" token) Node in the tree for a match exactly one wildcard class StarNode : public BindingNode { public: StarNode(); ~StarNode() {}; protected: virtual bool iterateMatch(TokenIterator& key, TreeIterator& iter); }; // Special case: ("#" token) Node in the tree for a match zero or more class HashNode : public BindingNode { public: HashNode(); ~HashNode() {}; protected: virtual bool iterateMatch(TokenIterator& key, TreeIterator& iter); }; BindingNode bindingTree; unsigned long nBindings; qpid::sys::RWlock lock; // protects bindingTree and nBindings qpid::sys::RWlock cacheLock; // protects cache std::map bindingCache; // cache of matched routes. class ClearCache { private: qpid::sys::RWlock* cacheLock; std::map* bindingCache; bool cleared; public: ClearCache(qpid::sys::RWlock* l, std::map* bc): cacheLock(l), bindingCache(bc),cleared(false) {}; void clearCache() { qpid::sys::RWlock::ScopedWlock l(*cacheLock); if (!cleared) { bindingCache->clear(); cleared =true; } }; ~ClearCache(){ clearCache(); }; }; BindingKey *getQueueBinding(Queue::shared_ptr queue, const std::string& pattern); bool deleteBinding(Queue::shared_ptr queue, const std::string& routingKey, BindingKey *bk); class ReOriginIter; class BindingsFinderIter; class QueueFinderIter; public: static const std::string typeName; static QPID_BROKER_EXTERN std::string normalize(const std::string& pattern); QPID_BROKER_EXTERN TopicExchange(const std::string& name, management::Manageable* parent = 0, Broker* broker = 0); QPID_BROKER_EXTERN TopicExchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, management::Manageable* parent = 0, Broker* broker = 0); virtual std::string getType() const { return typeName; } QPID_BROKER_EXTERN virtual bool bind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); virtual bool unbind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); QPID_BROKER_EXTERN virtual void route(Deliverable& msg); QPID_BROKER_EXTERN virtual bool isBound(Queue::shared_ptr queue, const std::string* const routingKey, const qpid::framing::FieldTable* const args); QPID_BROKER_EXTERN virtual ~TopicExchange(); virtual bool supportsDynamicBinding() { return true; } class TopicExchangeTester; friend class TopicExchangeTester; }; } } #endif qpidc-0.16/src/qpid/broker/MessageDeque.cpp0000664000076400007640000001440511717465066021241 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/MessageDeque.h" #include "qpid/broker/QueuedMessage.h" #include "qpid/log/Statement.h" namespace qpid { namespace broker { MessageDeque::MessageDeque() : available(0), head(0) {} size_t MessageDeque::index(const framing::SequenceNumber& position) { //assuming a monotonic sequence, with no messages removed except //from the ends of the deque, we can use the position to determin //an index into the deque if (messages.empty() || position < messages.front().position) return 0; return position - messages.front().position; } bool MessageDeque::deleted(const QueuedMessage& m) { size_t i = index(m.position); if (i < messages.size()) { messages[i].status = QueuedMessage::DELETED; clean(); return true; } else { return false; } } size_t MessageDeque::size() { return available; } void MessageDeque::release(const QueuedMessage& message) { size_t i = index(message.position); if (i < messages.size()) { QueuedMessage& m = messages[i]; if (m.status == QueuedMessage::ACQUIRED) { if (head > i) head = i; m.status = QueuedMessage::AVAILABLE; ++available; } } else { QPID_LOG(error, "Failed to release message at " << message.position << " " << message.payload->getFrames().getContent() << "; no such message (index=" << i << ", size=" << messages.size() << ")"); } } bool MessageDeque::acquire(const framing::SequenceNumber& position, QueuedMessage& message) { if (position < messages.front().position) return false; size_t i = index(position); if (i < messages.size()) { QueuedMessage& temp = messages[i]; if (temp.status == QueuedMessage::AVAILABLE) { temp.status = QueuedMessage::ACQUIRED; --available; message = temp; return true; } } return false; } bool MessageDeque::find(const framing::SequenceNumber& position, QueuedMessage& message) { size_t i = index(position); if (i < messages.size()) { message = messages[i]; return true; } else { return false; } } bool MessageDeque::browse(const framing::SequenceNumber& position, QueuedMessage& message, bool unacquired) { //get first message that is greater than position size_t i = index(position + 1); while (i < messages.size()) { QueuedMessage& m = messages[i++]; if (m.status == QueuedMessage::AVAILABLE || (!unacquired && m.status == QueuedMessage::ACQUIRED)) { message = m; return true; } } return false; } bool MessageDeque::consume(QueuedMessage& message) { while (head < messages.size()) { QueuedMessage& i = messages[head++]; if (i.status == QueuedMessage::AVAILABLE) { i.status = QueuedMessage::ACQUIRED; --available; message = i; return true; } } return false; } namespace { QueuedMessage padding(uint32_t pos) { return QueuedMessage(0, 0, pos, QueuedMessage::DELETED); } } // namespace bool MessageDeque::push(const QueuedMessage& added, QueuedMessage& /*not needed*/) { //add padding to prevent gaps in sequence, which break the index //calculation (needed for queue replication) while (messages.size() && (added.position - messages.back().position) > 1) messages.push_back(padding(messages.back().position + 1)); messages.push_back(added); messages.back().status = QueuedMessage::AVAILABLE; if (head >= messages.size()) head = messages.size() - 1; ++available; return false;//adding a message never causes one to be removed for deque } void MessageDeque::updateAcquired(const QueuedMessage& acquired) { // Pad the front of the queue if necessary while (messages.size() && (acquired.position < messages.front().position)) messages.push_front(padding(uint32_t(messages.front().position) - 1)); size_t i = index(acquired.position); if (i < messages.size()) { // Replace an existing padding message assert(messages[i].status == QueuedMessage::DELETED); messages[i] = acquired; messages[i].status = QueuedMessage::ACQUIRED; } else { // Push to the back // Pad the back of the queue if necessary while (messages.size() && (acquired.position - messages.back().position) > 1) messages.push_back(padding(messages.back().position + 1)); assert(!messages.size() || (acquired.position - messages.back().position) == 1); messages.push_back(acquired); messages.back().status = QueuedMessage::ACQUIRED; } } void MessageDeque::clean() { while (messages.size() && messages.front().status == QueuedMessage::DELETED) { messages.pop_front(); if (head) --head; } } void MessageDeque::foreach(Functor f) { for (Deque::iterator i = messages.begin(); i != messages.end(); ++i) { if (i->status == QueuedMessage::AVAILABLE) { f(*i); } } } void MessageDeque::removeIf(Predicate p) { for (Deque::iterator i = messages.begin(); i != messages.end(); ++i) { if (i->status == QueuedMessage::AVAILABLE && p(*i)) { //Use special status for this as messages are not yet //dequeued, but should not be considered on the queue //either (used for purging and moving) i->status = QueuedMessage::REMOVED; --available; } } clean(); } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/FanOutExchange.h0000664000076400007640000000515011725210040021145 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _FanOutExchange_ #define _FanOutExchange_ #include #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Exchange.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/CopyOnWriteArray.h" #include "qpid/broker/Queue.h" namespace qpid { namespace broker { class FanOutExchange : public virtual Exchange { typedef qpid::sys::CopyOnWriteArray BindingsArray; BindingsArray bindings; FedBinding fedBinding; public: static const std::string typeName; QPID_BROKER_EXTERN FanOutExchange(const std::string& name, management::Manageable* parent = 0, Broker* broker = 0); QPID_BROKER_EXTERN FanOutExchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, management::Manageable* parent = 0, Broker* broker = 0); virtual std::string getType() const { return typeName; } QPID_BROKER_EXTERN virtual bool bind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); virtual bool unbind(Queue::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); QPID_BROKER_EXTERN virtual void route(Deliverable& msg); QPID_BROKER_EXTERN virtual bool isBound(Queue::shared_ptr queue, const std::string* const routingKey, const qpid::framing::FieldTable* const args); QPID_BROKER_EXTERN virtual ~FanOutExchange(); virtual bool supportsDynamicBinding() { return true; } }; } } #endif qpidc-0.16/src/qpid/broker/MessageAdapter.cpp0000664000076400007640000000535511362132210021534 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/MessageAdapter.h" #include "qpid/framing/DeliveryProperties.h" #include "qpid/framing/MessageProperties.h" #include "qpid/framing/MessageTransferBody.h" namespace { const std::string empty; } namespace qpid { namespace broker{ std::string TransferAdapter::getRoutingKey(const framing::FrameSet& f) { const framing::DeliveryProperties* p = f.getHeaders()->get(); return p ? p->getRoutingKey() : empty; } std::string TransferAdapter::getExchange(const framing::FrameSet& f) { return f.as()->getDestination(); } bool TransferAdapter::isImmediate(const framing::FrameSet&) { //TODO: delete this, immediate is no longer part of the spec return false; } const framing::FieldTable* TransferAdapter::getApplicationHeaders(const framing::FrameSet& f) { const framing::MessageProperties* p = f.getHeaders()->get(); return p ? &(p->getApplicationHeaders()) : 0; } bool TransferAdapter::isPersistent(const framing::FrameSet& f) { const framing::DeliveryProperties* p = f.getHeaders()->get(); return p && p->getDeliveryMode() == 2; } bool TransferAdapter::requiresAccept(const framing::FrameSet& f) { const framing::MessageTransferBody* b = f.as(); return b && b->getAcceptMode() == 0/*EXPLICIT == 0*/; } uint8_t TransferAdapter::getPriority(const framing::FrameSet& f) { const framing::DeliveryProperties* p = f.getHeaders()->get(); return p ? p->getPriority() : 0; } std::string TransferAdapter::getAppId(const framing::FrameSet& f) { const framing::MessageProperties* p = f.getHeaders()->get(); return p ? p->getAppId() : empty; } }} qpidc-0.16/src/qpid/broker/Message.h0000664000076400007640000001607611645350603017716 0ustar00jrossjross00000000000000#ifndef _broker_Message_h #define _broker_Message_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/PersistableMessage.h" #include "qpid/broker/MessageAdapter.h" #include "qpid/framing/amqp_types.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Time.h" #include #include #include #include #include #include namespace qpid { namespace framing { class AMQBody; class AMQHeaderBody; class FieldTable; class SequenceNumber; } namespace broker { class ConnectionToken; class Exchange; class ExchangeRegistry; class MessageStore; class Queue; class ExpiryPolicy; class Message : public PersistableMessage { public: typedef boost::function&)> MessageCallback; QPID_BROKER_EXTERN Message(const framing::SequenceNumber& id = framing::SequenceNumber()); QPID_BROKER_EXTERN ~Message(); uint64_t getPersistenceId() const { return persistenceId; } void setPersistenceId(uint64_t _persistenceId) const { persistenceId = _persistenceId; } bool getRedelivered() const { return redelivered; } void redeliver() { redelivered = true; } const ConnectionToken* getPublisher() const { return publisher; } void setPublisher(ConnectionToken* p) { publisher = p; } const framing::SequenceNumber& getCommandId() { return frames.getId(); } QPID_BROKER_EXTERN uint64_t contentSize() const; QPID_BROKER_EXTERN std::string getRoutingKey() const; const boost::shared_ptr getExchange(ExchangeRegistry&) const; QPID_BROKER_EXTERN std::string getExchangeName() const; bool isImmediate() const; QPID_BROKER_EXTERN const framing::FieldTable* getApplicationHeaders() const; QPID_BROKER_EXTERN std::string getAppId() const; QPID_BROKER_EXTERN bool isPersistent() const; bool requiresAccept(); /** determine msg expiration time using the TTL value if present */ QPID_BROKER_EXTERN void computeExpiration(const boost::intrusive_ptr& e); void setExpiryPolicy(const boost::intrusive_ptr& e); bool hasExpired(); sys::AbsTime getExpiration() const { return expiration; } void setExpiration(sys::AbsTime exp) { expiration = exp; } void adjustTtl(); void setRedelivered(); QPID_BROKER_EXTERN void insertCustomProperty(const std::string& key, int64_t value); QPID_BROKER_EXTERN void insertCustomProperty(const std::string& key, const std::string& value); QPID_BROKER_EXTERN void removeCustomProperty(const std::string& key); void setExchange(const std::string&); void clearApplicationHeadersFlag(); /** set the timestamp delivery property to the current time-of-day */ QPID_BROKER_EXTERN void setTimestamp(); framing::FrameSet& getFrames() { return frames; } const framing::FrameSet& getFrames() const { return frames; } template const T* getProperties() const { const qpid::framing::AMQHeaderBody* p = frames.getHeaders(); return p->get(); } template const T* hasProperties() const { const qpid::framing::AMQHeaderBody* p = frames.getHeaders(); return p->get(); } template void eraseProperties() { qpid::framing::AMQHeaderBody* p = frames.getHeaders(); p->erase(); } template const T* getMethod() const { return frames.as(); } template T* getMethod() { return frames.as(); } template bool isA() const { return frames.isA(); } uint32_t getRequiredCredit(); void encode(framing::Buffer& buffer) const; void encodeContent(framing::Buffer& buffer) const; /** * @returns the size of the buffer needed to encode this * message in its entirety */ uint32_t encodedSize() const; /** * @returns the size of the buffer needed to encode the * 'header' of this message (not just the header frame, * but other meta data e.g.routing key and exchange) */ uint32_t encodedHeaderSize() const; uint32_t encodedContentSize() const; QPID_BROKER_EXTERN void decodeHeader(framing::Buffer& buffer); QPID_BROKER_EXTERN void decodeContent(framing::Buffer& buffer); void QPID_BROKER_EXTERN tryReleaseContent(); void releaseContent(); void releaseContent(MessageStore* s);//deprecated, use 'setStore(store); releaseContent();' instead void destroy(); bool getContentFrame(const Queue& queue, framing::AMQFrame& frame, uint16_t maxContentSize, uint64_t offset) const; QPID_BROKER_EXTERN void sendContent(const Queue& queue, framing::FrameHandler& out, uint16_t maxFrameSize) const; void sendHeader(framing::FrameHandler& out, uint16_t maxFrameSize) const; QPID_BROKER_EXTERN bool isContentLoaded() const; bool isExcluded(const std::vector& excludes) const; void addTraceId(const std::string& id); void forcePersistent(); bool isForcedPersistent(); /** Call cb when dequeue is complete, may call immediately. Holds cb by reference. */ void setDequeueCompleteCallback(MessageCallback& cb); void resetDequeueCompleteCallback(); uint8_t getPriority() const; bool getIsManagementMessage() const; void setIsManagementMessage(bool b); private: MessageAdapter& getAdapter() const; void allDequeuesComplete(); mutable sys::Mutex lock; framing::FrameSet frames; mutable boost::shared_ptr exchange; mutable uint64_t persistenceId; bool redelivered; bool loaded; bool staged; bool forcePersistentPolicy; // used to force message as durable, via a broker policy ConnectionToken* publisher; mutable MessageAdapter* adapter; qpid::sys::AbsTime expiration; boost::intrusive_ptr expiryPolicy; static TransferAdapter TRANSFER; mutable boost::intrusive_ptr empty; sys::Monitor callbackLock; MessageCallback* dequeueCallback; bool inCallback; uint32_t requiredCredit; bool isManagementMessage; mutable bool copyHeaderOnWrite; /** * Expects lock to be held */ template T* getModifiableProperties() { return getHeaderBody()->get(true); } qpid::framing::AMQHeaderBody* getHeaderBody(); }; }} #endif qpidc-0.16/src/qpid/broker/Queue.cpp0000664000076400007640000015762411732677503017766 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Broker.h" #include "qpid/broker/Queue.h" #include "qpid/broker/QueueEvents.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/Fairshare.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/broker/LegacyLVQ.h" #include "qpid/broker/MessageDeque.h" #include "qpid/broker/MessageMap.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/NullMessageStore.h" #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/QueueFlowLimit.h" #include "qpid/broker/ThresholdAlerts.h" #include "qpid/broker/FifoDistributor.h" #include "qpid/broker/MessageGroupManager.h" #include "qpid/StringUtils.h" #include "qpid/log/Statement.h" #include "qpid/management/ManagementAgent.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/ClusterSafe.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Time.h" #include "qpid/types/Variant.h" #include "qmf/org/apache/qpid/broker/ArgsQueuePurge.h" #include "qmf/org/apache/qpid/broker/ArgsQueueReroute.h" #include #include #include #include #include using namespace qpid::broker; using namespace qpid::sys; using namespace qpid::framing; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; using qpid::management::Args; using std::for_each; using std::mem_fun; namespace _qmf = qmf::org::apache::qpid::broker; namespace { const std::string qpidMaxSize("qpid.max_size"); const std::string qpidMaxCount("qpid.max_count"); const std::string qpidNoLocal("no-local"); const std::string qpidTraceIdentity("qpid.trace.id"); const std::string qpidTraceExclude("qpid.trace.exclude"); const std::string qpidLastValueQueueKey("qpid.last_value_queue_key"); const std::string qpidLastValueQueue("qpid.last_value_queue"); const std::string qpidLastValueQueueNoBrowse("qpid.last_value_queue_no_browse"); const std::string qpidPersistLastNode("qpid.persist_last_node"); const std::string qpidVQMatchProperty("qpid.LVQ_key"); const std::string qpidQueueEventGeneration("qpid.queue_event_generation"); const std::string qpidAutoDeleteTimeout("qpid.auto_delete_timeout"); //following feature is not ready for general use as it doesn't handle //the case where a message is enqueued on more than one queue well enough: const std::string qpidInsertSequenceNumbers("qpid.insert_sequence_numbers"); const int ENQUEUE_ONLY=1; const int ENQUEUE_AND_DEQUEUE=2; inline void mgntEnqStats(const boost::intrusive_ptr& msg, _qmf::Queue* mgmtObject, _qmf::Broker* brokerMgmtObject) { if (mgmtObject != 0) { _qmf::Queue::PerThreadStats *qStats = mgmtObject->getStatistics(); _qmf::Broker::PerThreadStats *bStats = brokerMgmtObject->getStatistics(); uint64_t contentSize = msg->contentSize(); qStats->msgTotalEnqueues +=1; bStats->msgTotalEnqueues += 1; qStats->byteTotalEnqueues += contentSize; bStats->byteTotalEnqueues += contentSize; if (msg->isPersistent ()) { qStats->msgPersistEnqueues += 1; bStats->msgPersistEnqueues += 1; qStats->bytePersistEnqueues += contentSize; bStats->bytePersistEnqueues += contentSize; } mgmtObject->statisticsUpdated(); brokerMgmtObject->statisticsUpdated(); } } inline void mgntDeqStats(const boost::intrusive_ptr& msg, _qmf::Queue* mgmtObject, _qmf::Broker* brokerMgmtObject) { if (mgmtObject != 0){ _qmf::Queue::PerThreadStats *qStats = mgmtObject->getStatistics(); _qmf::Broker::PerThreadStats *bStats = brokerMgmtObject->getStatistics(); uint64_t contentSize = msg->contentSize(); qStats->msgTotalDequeues += 1; bStats->msgTotalDequeues += 1; qStats->byteTotalDequeues += contentSize; bStats->byteTotalDequeues += contentSize; if (msg->isPersistent ()){ qStats->msgPersistDequeues += 1; bStats->msgPersistDequeues += 1; qStats->bytePersistDequeues += contentSize; bStats->bytePersistDequeues += contentSize; } mgmtObject->statisticsUpdated(); brokerMgmtObject->statisticsUpdated(); } } } // namespace Queue::Queue(const string& _name, bool _autodelete, MessageStore* const _store, const OwnershipToken* const _owner, Manageable* parent, Broker* b) : name(_name), autodelete(_autodelete), store(_store), owner(_owner), consumerCount(0), exclusive(0), noLocal(false), persistLastNode(false), inLastNodeFailure(false), messages(new MessageDeque()), persistenceId(0), policyExceeded(false), mgmtObject(0), brokerMgmtObject(0), eventMode(0), insertSeqNo(0), broker(b), deleted(false), barrier(*this), autoDeleteTimeout(0), allocator(new FifoDistributor( *messages )) { if (parent != 0 && broker != 0) { ManagementAgent* agent = broker->getManagementAgent(); if (agent != 0) { mgmtObject = new _qmf::Queue(agent, this, parent, _name, _store != 0, _autodelete, _owner != 0); agent->addObject(mgmtObject, 0, store != 0); brokerMgmtObject = (qmf::org::apache::qpid::broker::Broker*) broker->GetManagementObject(); if (brokerMgmtObject) brokerMgmtObject->inc_queueCount(); } } } Queue::~Queue() { if (mgmtObject != 0) { mgmtObject->resourceDestroy(); if (brokerMgmtObject) brokerMgmtObject->dec_queueCount(); } } bool isLocalTo(const OwnershipToken* token, boost::intrusive_ptr& msg) { return token && token->isLocal(msg->getPublisher()); } bool Queue::isLocal(boost::intrusive_ptr& msg) { //message is considered local if it was published on the same //connection as that of the session which declared this queue //exclusive (owner) or which has an exclusive subscription //(exclusive) return noLocal && (isLocalTo(owner, msg) || isLocalTo(exclusive, msg)); } bool Queue::isExcluded(boost::intrusive_ptr& msg) { return traceExclude.size() && msg->isExcluded(traceExclude); } void Queue::deliver(boost::intrusive_ptr msg){ // Check for deferred delivery in a cluster. if (broker && broker->deferDelivery(name, msg)) return; if (msg->isImmediate() && getConsumerCount() == 0) { if (alternateExchange) { DeliverableMessage deliverable(msg); alternateExchange->route(deliverable); } } else if (isLocal(msg)) { //drop message QPID_LOG(info, "Dropping 'local' message from " << getName()); } else if (isExcluded(msg)) { //drop message QPID_LOG(info, "Dropping excluded message from " << getName()); } else { enqueue(0, msg); push(msg); QPID_LOG(debug, "Message " << msg << " enqueued on " << name); } } void Queue::recoverPrepared(boost::intrusive_ptr& msg) { if (policy.get()) policy->recoverEnqueued(msg); } void Queue::recover(boost::intrusive_ptr& msg){ if (policy.get()) policy->recoverEnqueued(msg); push(msg, true); if (store){ // setup synclist for recovered messages, so they don't get re-stored on lastNodeFailure msg->addToSyncList(shared_from_this(), store); } if (store && (!msg->isContentLoaded() || msg->checkContentReleasable())) { //content has not been loaded, need to ensure that lazy loading mode is set: //TODO: find a nicer way to do this msg->releaseContent(store); // NOTE: The log message in this section are used for flow-to-disk testing (which checks the log for the // presence of this message). Do not change this without also checking these tests. QPID_LOG(debug, "Message id=\"" << msg->getProperties()->getMessageId() << "\"; pid=0x" << std::hex << msg->getPersistenceId() << std::dec << ": Content released after recovery"); } } void Queue::process(boost::intrusive_ptr& msg){ push(msg); if (mgmtObject != 0){ _qmf::Queue::PerThreadStats *qStats = mgmtObject->getStatistics(); const uint64_t contentSize = msg->contentSize(); qStats->msgTxnEnqueues += 1; qStats->byteTxnEnqueues += contentSize; mgmtObject->statisticsUpdated(); if (brokerMgmtObject) { _qmf::Broker::PerThreadStats *bStats = brokerMgmtObject->getStatistics(); bStats->msgTxnEnqueues += 1; bStats->byteTxnEnqueues += contentSize; brokerMgmtObject->statisticsUpdated(); } } } void Queue::requeue(const QueuedMessage& msg){ assertClusterSafe(); QueueListeners::NotificationSet copy; { Mutex::ScopedLock locker(messageLock); if (!isEnqueued(msg)) return; if (deleted) { // // If the queue has been deleted, requeued messages must be sent to the alternate exchange // if one is configured. // if (alternateExchange.get()) { DeliverableMessage dmsg(msg.payload); alternateExchange->routeWithAlternate(dmsg); if (brokerMgmtObject) brokerMgmtObject->inc_abandonedViaAlt(); } else { if (brokerMgmtObject) brokerMgmtObject->inc_abandoned(); } mgntDeqStats(msg.payload, mgmtObject, brokerMgmtObject); } else { messages->release(msg); listeners.populate(copy); // for persistLastNode - don't force a message twice to disk, but force it if no force before if(inLastNodeFailure && persistLastNode && !msg.payload->isStoredOnQueue(shared_from_this())) { msg.payload->forcePersistent(); if (msg.payload->isForcedPersistent() ){ boost::intrusive_ptr payload = msg.payload; enqueue(0, payload); } } observeRequeue(msg, locker); } } copy.notify(); } bool Queue::acquireMessageAt(const SequenceNumber& position, QueuedMessage& message) { Mutex::ScopedLock locker(messageLock); assertClusterSafe(); QPID_LOG(debug, "Attempting to acquire message at " << position); if (acquire(position, message, locker)) { QPID_LOG(debug, "Acquired message at " << position << " from " << name); return true; } else { QPID_LOG(debug, "Could not acquire message at " << position << " from " << name << "; no message at that position"); return false; } } bool Queue::acquire(const QueuedMessage& msg, const std::string& consumer) { Mutex::ScopedLock locker(messageLock); assertClusterSafe(); QPID_LOG(debug, consumer << " attempting to acquire message at " << msg.position); if (!allocator->allocate( consumer, msg )) { QPID_LOG(debug, "Not permitted to acquire msg at " << msg.position << " from '" << name); return false; } QueuedMessage copy(msg); if (acquire( msg.position, copy, locker)) { QPID_LOG(debug, "Acquired message at " << msg.position << " from " << name); return true; } QPID_LOG(debug, "Could not acquire message at " << msg.position << " from " << name << "; no message at that position"); return false; } void Queue::notifyListener() { assertClusterSafe(); QueueListeners::NotificationSet set; { Mutex::ScopedLock locker(messageLock); if (messages->size()) { listeners.populate(set); } } set.notify(); } bool Queue::getNextMessage(QueuedMessage& m, Consumer::shared_ptr& c) { checkNotDeleted(c); if (c->preAcquires()) { switch (consumeNextMessage(m, c)) { case CONSUMED: return true; case CANT_CONSUME: notifyListener();//let someone else try case NO_MESSAGES: default: return false; } } else { return browseNextMessage(m, c); } } Queue::ConsumeCode Queue::consumeNextMessage(QueuedMessage& m, Consumer::shared_ptr& c) { while (true) { Mutex::ScopedLock locker(messageLock); QueuedMessage msg; if (allocator->nextConsumableMessage(c, msg)) { if (msg.payload->hasExpired()) { QPID_LOG(debug, "Message expired from queue '" << name << "'"); c->setPosition(msg.position); dequeue(0, msg); if (mgmtObject) { mgmtObject->inc_discardsTtl(); if (brokerMgmtObject) brokerMgmtObject->inc_discardsTtl(); } continue; } if (c->filter(msg.payload)) { if (c->accept(msg.payload)) { bool ok = allocator->allocate( c->getName(), msg ); // inform allocator (void) ok; assert(ok); observeAcquire(msg, locker); m = msg; return CONSUMED; } else { //message(s) are available but consumer hasn't got enough credit QPID_LOG(debug, "Consumer can't currently accept message from '" << name << "'"); messages->release(msg); return CANT_CONSUME; } } else { //consumer will never want this message QPID_LOG(debug, "Consumer doesn't want message from '" << name << "'"); messages->release(msg); return CANT_CONSUME; } } else { QPID_LOG(debug, "No messages to dispatch on queue '" << name << "'"); listeners.addListener(c); return NO_MESSAGES; } } } bool Queue::browseNextMessage(QueuedMessage& m, Consumer::shared_ptr& c) { while (true) { Mutex::ScopedLock locker(messageLock); QueuedMessage msg; if (!allocator->nextBrowsableMessage(c, msg)) { // no next available QPID_LOG(debug, "No browsable messages available for consumer " << c->getName() << " on queue '" << name << "'"); listeners.addListener(c); return false; } if (c->filter(msg.payload) && !msg.payload->hasExpired()) { if (c->accept(msg.payload)) { //consumer wants the message c->setPosition(msg.position); m = msg; return true; } else { //browser hasn't got enough credit for the message QPID_LOG(debug, "Browser can't currently accept message from '" << name << "'"); return false; } } else { //consumer will never want this message, continue seeking QPID_LOG(debug, "Browser skipping message from '" << name << "'"); c->setPosition(msg.position); } } return false; } void Queue::removeListener(Consumer::shared_ptr c) { QueueListeners::NotificationSet set; { Mutex::ScopedLock locker(messageLock); listeners.removeListener(c); if (messages->size()) { listeners.populate(set); } } set.notify(); } bool Queue::dispatch(Consumer::shared_ptr c) { QueuedMessage msg(this); if (getNextMessage(msg, c)) { c->deliver(msg); return true; } else { return false; } } bool Queue::find(SequenceNumber pos, QueuedMessage& msg) const { Mutex::ScopedLock locker(messageLock); if (messages->find(pos, msg)) return true; return false; } void Queue::consume(Consumer::shared_ptr c, bool requestExclusive){ assertClusterSafe(); { Mutex::ScopedLock locker(consumerLock); if(exclusive) { throw ResourceLockedException( QPID_MSG("Queue " << getName() << " has an exclusive consumer. No more consumers allowed.")); } else if(requestExclusive) { if(consumerCount) { throw ResourceLockedException( QPID_MSG("Queue " << getName() << " already has consumers. Exclusive access denied.")); } else { exclusive = c->getSession(); } } consumerCount++; if (mgmtObject != 0) mgmtObject->inc_consumerCount (); //reset auto deletion timer if necessary if (autoDeleteTimeout && autoDeleteTask) { autoDeleteTask->cancel(); } } Mutex::ScopedLock locker(messageLock); for (Observers::const_iterator i = observers.begin(); i != observers.end(); ++i) { try{ (*i)->consumerAdded(*c); } catch (const std::exception& e) { QPID_LOG(warning, "Exception on notification of new consumer for queue " << getName() << ": " << e.what()); } } } void Queue::cancel(Consumer::shared_ptr c){ removeListener(c); { Mutex::ScopedLock locker(consumerLock); consumerCount--; if(exclusive) exclusive = 0; if (mgmtObject != 0) mgmtObject->dec_consumerCount (); } Mutex::ScopedLock locker(messageLock); for (Observers::const_iterator i = observers.begin(); i != observers.end(); ++i) { try{ (*i)->consumerRemoved(*c); } catch (const std::exception& e) { QPID_LOG(warning, "Exception on notification of removed consumer for queue " << getName() << ": " << e.what()); } } } QueuedMessage Queue::get(){ Mutex::ScopedLock locker(messageLock); QueuedMessage msg(this); if (messages->consume(msg)) observeAcquire(msg, locker); return msg; } bool collect_if_expired(std::deque& expired, QueuedMessage& message) { if (message.payload->hasExpired()) { expired.push_back(message); return true; } else { return false; } } /** *@param lapse: time since the last purgeExpired */ void Queue::purgeExpired(qpid::sys::Duration lapse) { //As expired messages are discarded during dequeue also, only //bother explicitly expiring if the rate of dequeues since last //attempt is less than one per second. int count = dequeueSincePurge.get(); dequeueSincePurge -= count; int seconds = int64_t(lapse)/qpid::sys::TIME_SEC; if (seconds == 0 || count / seconds < 1) { std::deque expired; { Mutex::ScopedLock locker(messageLock); messages->removeIf(boost::bind(&collect_if_expired, boost::ref(expired), _1)); } // // Report the count of discarded-by-ttl messages // if (mgmtObject && !expired.empty()) { mgmtObject->inc_discardsTtl(expired.size()); if (brokerMgmtObject) brokerMgmtObject->inc_discardsTtl(expired.size()); } for (std::deque::const_iterator i = expired.begin(); i != expired.end(); ++i) { { Mutex::ScopedLock locker(messageLock); observeAcquire(*i, locker); } dequeue( 0, *i ); } } } namespace { // for use with purge/move below - collect messages that match a given filter // class MessageFilter { public: static const std::string typeKey; static const std::string paramsKey; static MessageFilter *create( const ::qpid::types::Variant::Map *filter ); virtual bool match( const QueuedMessage& ) const { return true; } virtual ~MessageFilter() {} protected: MessageFilter() {}; }; const std::string MessageFilter::typeKey("filter_type"); const std::string MessageFilter::paramsKey("filter_params"); // filter by message header string value exact match class HeaderMatchFilter : public MessageFilter { public: /* Config: { 'filter_type' : 'header_match_str', 'filter_params' : { 'header_key' : "
", 'header_value' : "" } } */ static const std::string typeKey; static const std::string headerKey; static const std::string valueKey; HeaderMatchFilter( const std::string& _header, const std::string& _value ) : MessageFilter (), header(_header), value(_value) {} bool match( const QueuedMessage& msg ) const { const qpid::framing::FieldTable* headers = msg.payload->getApplicationHeaders(); if (!headers) return false; FieldTable::ValuePtr h = headers->get(header); if (!h || !h->convertsTo()) return false; return h->get() == value; } private: const std::string header; const std::string value; }; const std::string HeaderMatchFilter::typeKey("header_match_str"); const std::string HeaderMatchFilter::headerKey("header_key"); const std::string HeaderMatchFilter::valueKey("header_value"); // factory to create correct filter based on map MessageFilter* MessageFilter::create( const ::qpid::types::Variant::Map *filter ) { using namespace qpid::types; if (filter && !filter->empty()) { Variant::Map::const_iterator i = filter->find(MessageFilter::typeKey); if (i != filter->end()) { if (i->second.asString() == HeaderMatchFilter::typeKey) { Variant::Map::const_iterator p = filter->find(MessageFilter::paramsKey); if (p != filter->end() && p->second.getType() == VAR_MAP) { Variant::Map::const_iterator k = p->second.asMap().find(HeaderMatchFilter::headerKey); Variant::Map::const_iterator v = p->second.asMap().find(HeaderMatchFilter::valueKey); if (k != p->second.asMap().end() && v != p->second.asMap().end()) { std::string headerKey(k->second.asString()); std::string value(v->second.asString()); QPID_LOG(debug, "Message filtering by header value configured. key: " << headerKey << " value: " << value ); return new HeaderMatchFilter( headerKey, value ); } } } } QPID_LOG(error, "Ignoring unrecognized message filter: '" << *filter << "'"); } return new MessageFilter(); } // used by removeIf() to collect all messages matching a filter, maximum match count is // optional. struct Collector { const uint32_t maxMatches; MessageFilter& filter; std::deque matches; Collector(MessageFilter& filter, uint32_t max) : maxMatches(max), filter(filter) {} bool operator() (QueuedMessage& qm) { if (maxMatches == 0 || matches.size() < maxMatches) { if (filter.match( qm )) { matches.push_back(qm); return true; } } return false; } }; } // end namespace /** * purge - for purging all or some messages on a queue * depending on the purge_request * * purge_request == 0 then purge all messages * == N then purge N messages from queue * Sometimes purge_request == 1 to unblock the top of queue * * The dest exchange may be supplied to re-route messages through the exchange. * It is safe to re-route messages such that they arrive back on the same queue, * even if the queue is ordered by priority. * * An optional filter can be supplied that will be applied against each message. The * message is purged only if the filter matches. See MessageDistributor for more detail. */ uint32_t Queue::purge(const uint32_t purge_request, boost::shared_ptr dest, const qpid::types::Variant::Map *filter) { std::auto_ptr mf(MessageFilter::create(filter)); Collector c(*mf.get(), purge_request); Mutex::ScopedLock locker(messageLock); messages->removeIf( boost::bind(boost::ref(c), _1) ); if (mgmtObject && !c.matches.empty()) { if (dest.get()) { mgmtObject->inc_reroutes(c.matches.size()); if (brokerMgmtObject) brokerMgmtObject->inc_reroutes(c.matches.size()); } else { mgmtObject->inc_discardsPurge(c.matches.size()); if (brokerMgmtObject) brokerMgmtObject->inc_discardsPurge(c.matches.size()); } } for (std::deque::iterator qmsg = c.matches.begin(); qmsg != c.matches.end(); ++qmsg) { // Update observers and message state: observeAcquire(*qmsg, locker); dequeue(0, *qmsg); QPID_LOG(debug, "Purged message at " << qmsg->position << " from " << getName()); // now reroute if necessary if (dest.get()) { assert(qmsg->payload); DeliverableMessage dmsg(qmsg->payload); dest->routeWithAlternate(dmsg); } } return c.matches.size(); } uint32_t Queue::move(const Queue::shared_ptr destq, uint32_t qty, const qpid::types::Variant::Map *filter) { std::auto_ptr mf(MessageFilter::create(filter)); Collector c(*mf.get(), qty); Mutex::ScopedLock locker(messageLock); messages->removeIf( boost::bind(boost::ref(c), _1) ); for (std::deque::iterator qmsg = c.matches.begin(); qmsg != c.matches.end(); ++qmsg) { // Update observers and message state: observeAcquire(*qmsg, locker); dequeue(0, *qmsg); // and move to destination Queue. assert(qmsg->payload); destq->deliver(qmsg->payload); } return c.matches.size(); } /** Acquire the message at the given position, return true and msg if acquire succeeds */ bool Queue::acquire(const qpid::framing::SequenceNumber& position, QueuedMessage& msg, const Mutex::ScopedLock& locker) { if (messages->acquire(position, msg)) { observeAcquire(msg, locker); ++dequeueSincePurge; return true; } return false; } void Queue::push(boost::intrusive_ptr& msg, bool isRecovery){ assertClusterSafe(); QueueListeners::NotificationSet copy; QueuedMessage removed; bool dequeueRequired = false; { Mutex::ScopedLock locker(messageLock); QueuedMessage qm(this, msg, ++sequence); if (insertSeqNo) msg->insertCustomProperty(seqNoKey, sequence); dequeueRequired = messages->push(qm, removed); if (dequeueRequired) { observeAcquire(removed, locker); if (mgmtObject) { mgmtObject->inc_discardsLvq(); if (brokerMgmtObject) brokerMgmtObject->inc_discardsLvq(); } } listeners.populate(copy); observeEnqueue(qm, locker); } copy.notify(); if (dequeueRequired) { if (isRecovery) { //can't issue new requests for the store until //recovery is complete pendingDequeues.push_back(removed); } else { dequeue(0, removed); } } } void isEnqueueComplete(uint32_t* result, const QueuedMessage& message) { if (message.payload->isIngressComplete()) (*result)++; } /** function only provided for unit tests, or code not in critical message path */ uint32_t Queue::getEnqueueCompleteMessageCount() const { Mutex::ScopedLock locker(messageLock); uint32_t count = 0; messages->foreach(boost::bind(&isEnqueueComplete, &count, _1)); return count; } uint32_t Queue::getMessageCount() const { Mutex::ScopedLock locker(messageLock); return messages->size(); } uint32_t Queue::getConsumerCount() const { Mutex::ScopedLock locker(consumerLock); return consumerCount; } bool Queue::canAutoDelete() const { Mutex::ScopedLock locker(consumerLock); return autodelete && !consumerCount && !owner; } void Queue::clearLastNodeFailure() { inLastNodeFailure = false; } void Queue::forcePersistent(QueuedMessage& message) { if(!message.payload->isStoredOnQueue(shared_from_this())) { message.payload->forcePersistent(); if (message.payload->isForcedPersistent() ){ enqueue(0, message.payload); } } } void Queue::setLastNodeFailure() { if (persistLastNode){ Mutex::ScopedLock locker(messageLock); try { messages->foreach(boost::bind(&Queue::forcePersistent, this, _1)); } catch (const std::exception& e) { // Could not go into last node standing (for example journal not large enough) QPID_LOG(error, "Unable to fail to last node standing for queue: " << name << " : " << e.what()); } inLastNodeFailure = true; } } // return true if store exists, bool Queue::enqueue(TransactionContext* ctxt, boost::intrusive_ptr& msg, bool suppressPolicyCheck) { ScopedUse u(barrier); if (!u.acquired) return false; if (policy.get() && !suppressPolicyCheck) { std::deque dequeues; { Mutex::ScopedLock locker(messageLock); try { policy->tryEnqueue(msg); } catch(ResourceLimitExceededException&) { if (mgmtObject) { mgmtObject->inc_discardsOverflow(); if (brokerMgmtObject) brokerMgmtObject->inc_discardsOverflow(); } throw; } policy->getPendingDequeues(dequeues); } //depending on policy, may have some dequeues that need to performed without holding the lock // // Count the dequeues as ring-discards. We know that these aren't rejects because // policy->tryEnqueue would have thrown an exception. // if (mgmtObject && !dequeues.empty()) { mgmtObject->inc_discardsRing(dequeues.size()); if (brokerMgmtObject) brokerMgmtObject->inc_discardsRing(dequeues.size()); } for_each(dequeues.begin(), dequeues.end(), boost::bind(&Queue::dequeue, this, (TransactionContext*) 0, _1)); } if (inLastNodeFailure && persistLastNode){ msg->forcePersistent(); } if (traceId.size()) { msg->addTraceId(traceId); } if ((msg->isPersistent() || msg->checkContentReleasable()) && store) { // mark the message as being enqueued - the store MUST CALL msg->enqueueComplete() // when it considers the message stored. msg->enqueueAsync(shared_from_this(), store); boost::intrusive_ptr pmsg = boost::static_pointer_cast(msg); store->enqueue(ctxt, pmsg, *this); return true; } if (!store) { //Messages enqueued on a transient queue should be prevented //from having their content released as it may not be //recoverable by these queue for delivery msg->blockContentRelease(); } return false; } void Queue::enqueueAborted(boost::intrusive_ptr msg) { Mutex::ScopedLock locker(messageLock); if (policy.get()) policy->enqueueAborted(msg); } // return true if store exists, bool Queue::dequeue(TransactionContext* ctxt, const QueuedMessage& msg) { ScopedUse u(barrier); if (!u.acquired) return false; { Mutex::ScopedLock locker(messageLock); if (!isEnqueued(msg)) return false; if (!ctxt) { observeDequeue(msg, locker); } } // This check prevents messages which have been forced persistent on one queue from dequeuing // from another on which no forcing has taken place and thus causing a store error. bool fp = msg.payload->isForcedPersistent(); if (!fp || (fp && msg.payload->isStoredOnQueue(shared_from_this()))) { if ((msg.payload->isPersistent() || msg.payload->checkContentReleasable()) && store) { msg.payload->dequeueAsync(shared_from_this(), store); //increment to async counter -- for message sent to more than one queue boost::intrusive_ptr pmsg = boost::static_pointer_cast(msg.payload); store->dequeue(ctxt, pmsg, *this); return true; } } return false; } void Queue::dequeueCommitted(const QueuedMessage& msg) { Mutex::ScopedLock locker(messageLock); observeDequeue(msg, locker); if (mgmtObject != 0) { _qmf::Queue::PerThreadStats *qStats = mgmtObject->getStatistics(); const uint64_t contentSize = msg.payload->contentSize(); qStats->msgTxnDequeues += 1; qStats->byteTxnDequeues += contentSize; mgmtObject->statisticsUpdated(); if (brokerMgmtObject) { _qmf::Broker::PerThreadStats *bStats = brokerMgmtObject->getStatistics(); bStats->msgTxnDequeues += 1; bStats->byteTxnDequeues += contentSize; brokerMgmtObject->statisticsUpdated(); } } } /** * Removes the first (oldest) message from the in-memory delivery queue as well dequeing * it from the logical (and persistent if applicable) queue */ bool Queue::popAndDequeue(QueuedMessage& msg, const Mutex::ScopedLock& locker) { if (messages->consume(msg)) { observeAcquire(msg, locker); dequeue(0, msg); return true; } else { return false; } } /** * Updates policy and management when a message has been dequeued, * expects messageLock to be held */ void Queue::observeDequeue(const QueuedMessage& msg, const Mutex::ScopedLock&) { mgntDeqStats(msg.payload, mgmtObject, brokerMgmtObject); if (policy.get()) policy->dequeued(msg); messages->deleted(msg); for (Observers::const_iterator i = observers.begin(); i != observers.end(); ++i) { try{ (*i)->dequeued(msg); } catch (const std::exception& e) { QPID_LOG(warning, "Exception on notification of dequeue for queue " << getName() << ": " << e.what()); } } } /** updates queue observers when a message has become unavailable for transfer, * expects messageLock to be held */ void Queue::observeAcquire(const QueuedMessage& msg, const Mutex::ScopedLock&) { if (mgmtObject) { mgmtObject->inc_acquires(); if (brokerMgmtObject) brokerMgmtObject->inc_acquires(); } for (Observers::const_iterator i = observers.begin(); i != observers.end(); ++i) { try{ (*i)->acquired(msg); } catch (const std::exception& e) { QPID_LOG(warning, "Exception on notification of message removal for queue " << getName() << ": " << e.what()); } } } /** updates queue observers when a message has become re-available for transfer, * expects messageLock to be held */ void Queue::observeRequeue(const QueuedMessage& msg, const Mutex::ScopedLock&) { if (mgmtObject) { mgmtObject->inc_releases(); if (brokerMgmtObject) brokerMgmtObject->inc_releases(); } for (Observers::const_iterator i = observers.begin(); i != observers.end(); ++i) { try{ (*i)->requeued(msg); } catch (const std::exception& e) { QPID_LOG(warning, "Exception on notification of message requeue for queue " << getName() << ": " << e.what()); } } } void Queue::create(const FieldTable& _settings) { settings = _settings; if (store) { store->create(*this, _settings); } configureImpl(_settings); } int getIntegerSetting(const qpid::framing::FieldTable& settings, const std::string& key) { qpid::framing::FieldTable::ValuePtr v = settings.get(key); if (!v) { return 0; } else if (v->convertsTo()) { return v->get(); } else if (v->convertsTo()){ std::string s = v->get(); try { return boost::lexical_cast(s); } catch(const boost::bad_lexical_cast&) { QPID_LOG(warning, "Ignoring invalid integer value for " << key << ": " << s); return 0; } } else { QPID_LOG(warning, "Ignoring invalid integer value for " << key << ": " << *v); return 0; } } bool getBoolSetting(const qpid::framing::FieldTable& settings, const std::string& key) { qpid::framing::FieldTable::ValuePtr v = settings.get(key); if (!v) { return false; } else if (v->convertsTo()) { return v->get() != 0; } else if (v->convertsTo()){ std::string s = v->get(); if (s == "True") return true; if (s == "true") return true; if (s == "False") return false; if (s == "false") return false; try { return boost::lexical_cast(s); } catch(const boost::bad_lexical_cast&) { QPID_LOG(warning, "Ignoring invalid boolean value for " << key << ": " << s); return false; } } else { QPID_LOG(warning, "Ignoring invalid boolean value for " << key << ": " << *v); return false; } } void Queue::configure(const FieldTable& _settings) { settings = _settings; configureImpl(settings); } void Queue::configureImpl(const FieldTable& _settings) { eventMode = _settings.getAsInt(qpidQueueEventGeneration); if (eventMode && broker) { broker->getQueueEvents().observe(*this, eventMode == ENQUEUE_ONLY); } if (QueuePolicy::getType(_settings) == QueuePolicy::FLOW_TO_DISK && (!store || NullMessageStore::isNullStore(store) || (broker && !(broker->getQueueEvents().isSync())) )) { if ( NullMessageStore::isNullStore(store)) { QPID_LOG(warning, "Flow to disk not valid for non-persisted queue:" << getName()); } else if (broker && !(broker->getQueueEvents().isSync()) ) { QPID_LOG(warning, "Flow to disk not valid with async Queue Events:" << getName()); } FieldTable copy(_settings); copy.erase(QueuePolicy::typeKey); setPolicy(QueuePolicy::createQueuePolicy(getName(), copy)); } else { setPolicy(QueuePolicy::createQueuePolicy(getName(), _settings)); } if (broker && broker->getManagementAgent()) { ThresholdAlerts::observe(*this, *(broker->getManagementAgent()), _settings, broker->getOptions().queueThresholdEventRatio); } //set this regardless of owner to allow use of no-local with exclusive consumers also noLocal = getBoolSetting(_settings, qpidNoLocal); QPID_LOG(debug, "Configured queue " << getName() << " with no-local=" << noLocal); std::string lvqKey = _settings.getAsString(qpidLastValueQueueKey); if (lvqKey.size()) { QPID_LOG(debug, "Configured queue " << getName() << " as Last Value Queue with key " << lvqKey); messages = std::auto_ptr(new MessageMap(lvqKey)); allocator = boost::shared_ptr(new FifoDistributor( *messages )); } else if (getBoolSetting(_settings, qpidLastValueQueueNoBrowse)) { QPID_LOG(debug, "Configured queue " << getName() << " as Legacy Last Value Queue with 'no-browse' on"); messages = LegacyLVQ::updateOrReplace(messages, qpidVQMatchProperty, true, broker); allocator = boost::shared_ptr(new FifoDistributor( *messages )); } else if (getBoolSetting(_settings, qpidLastValueQueue)) { QPID_LOG(debug, "Configured queue " << getName() << " as Legacy Last Value Queue"); messages = LegacyLVQ::updateOrReplace(messages, qpidVQMatchProperty, false, broker); allocator = boost::shared_ptr(new FifoDistributor( *messages )); } else { std::auto_ptr m = Fairshare::create(_settings); if (m.get()) { messages = m; allocator = boost::shared_ptr(new FifoDistributor( *messages )); QPID_LOG(debug, "Configured queue " << getName() << " as priority queue."); } else { // default (FIFO) queue type // override default message allocator if message groups configured. boost::shared_ptr mgm(MessageGroupManager::create( getName(), *messages, _settings)); if (mgm) { allocator = mgm; addObserver(mgm); } } } persistLastNode = getBoolSetting(_settings, qpidPersistLastNode); if (persistLastNode) QPID_LOG(debug, "Configured queue to Persist data if cluster fails to one node for: " << getName()); traceId = _settings.getAsString(qpidTraceIdentity); std::string excludeList = _settings.getAsString(qpidTraceExclude); if (excludeList.size()) { split(traceExclude, excludeList, ", "); } QPID_LOG(debug, "Configured queue " << getName() << " with qpid.trace.id='" << traceId << "' and qpid.trace.exclude='"<< excludeList << "' i.e. " << traceExclude.size() << " elements"); FieldTable::ValuePtr p =_settings.get(qpidInsertSequenceNumbers); if (p && p->convertsTo()) insertSequenceNumbers(p->get()); autoDeleteTimeout = getIntegerSetting(_settings, qpidAutoDeleteTimeout); if (autoDeleteTimeout) QPID_LOG(debug, "Configured queue " << getName() << " with qpid.auto_delete_timeout=" << autoDeleteTimeout); if (mgmtObject != 0) { mgmtObject->set_arguments(ManagementAgent::toMap(_settings)); } QueueFlowLimit::observe(*this, _settings); } void Queue::destroyed() { unbind(broker->getExchanges()); { Mutex::ScopedLock locker(messageLock); QueuedMessage m; while(popAndDequeue(m, locker)) { DeliverableMessage msg(m.payload); if (alternateExchange.get()) { if (brokerMgmtObject) brokerMgmtObject->inc_abandonedViaAlt(); alternateExchange->routeWithAlternate(msg); } else { if (brokerMgmtObject) brokerMgmtObject->inc_abandoned(); } } if (alternateExchange.get()) alternateExchange->decAlternateUsers(); } if (store) { barrier.destroy(); store->flush(*this); store->destroy(*this); store = 0;//ensure we make no more calls to the store for this queue } if (autoDeleteTask) autoDeleteTask = boost::intrusive_ptr(); notifyDeleted(); { Mutex::ScopedLock locker(messageLock); observers.clear(); } } void Queue::notifyDeleted() { QueueListeners::ListenerSet set; { Mutex::ScopedLock locker(messageLock); listeners.snapshot(set); deleted = true; } set.notifyAll(); } void Queue::bound(const string& exchange, const string& key, const FieldTable& args) { bindings.add(exchange, key, args); } void Queue::unbind(ExchangeRegistry& exchanges) { bindings.unbind(exchanges, shared_from_this()); } void Queue::setPolicy(std::auto_ptr _policy) { policy = _policy; if (policy.get()) policy->setQueue(this); } const QueuePolicy* Queue::getPolicy() { return policy.get(); } uint64_t Queue::getPersistenceId() const { return persistenceId; } void Queue::setPersistenceId(uint64_t _persistenceId) const { if (mgmtObject != 0 && persistenceId == 0 && externalQueueStore) { ManagementObject* childObj = externalQueueStore->GetManagementObject(); if (childObj != 0) childObj->setReference(mgmtObject->getObjectId()); } persistenceId = _persistenceId; } void Queue::encode(Buffer& buffer) const { buffer.putShortString(name); buffer.put(settings); if (policy.get()) { buffer.put(*policy); } buffer.putShortString(alternateExchange.get() ? alternateExchange->getName() : std::string("")); } uint32_t Queue::encodedSize() const { return name.size() + 1/*short string size octet*/ + (alternateExchange.get() ? alternateExchange->getName().size() : 0) + 1 /* short string */ + settings.encodedSize() + (policy.get() ? (*policy).encodedSize() : 0); } Queue::shared_ptr Queue::restore( QueueRegistry& queues, Buffer& buffer ) { string name; buffer.getShortString(name); FieldTable settings; buffer.get(settings); boost::shared_ptr alternate; std::pair result = queues.declare(name, true, false, 0, alternate, settings, true); if (result.first->policy.get() && buffer.available() >= result.first->policy->encodedSize()) { buffer.get ( *(result.first->policy) ); } if (buffer.available()) { string altExch; buffer.getShortString(altExch); result.first->alternateExchangeName.assign(altExch); } return result.first; } void Queue::setAlternateExchange(boost::shared_ptr exchange) { alternateExchange = exchange; if (mgmtObject) { if (exchange.get() != 0) mgmtObject->set_altExchange(exchange->GetManagementObject()->getObjectId()); else mgmtObject->clr_altExchange(); } } boost::shared_ptr Queue::getAlternateExchange() { return alternateExchange; } void tryAutoDeleteImpl(Broker& broker, Queue::shared_ptr queue) { if (broker.getQueues().destroyIf(queue->getName(), boost::bind(boost::mem_fn(&Queue::canAutoDelete), queue))) { QPID_LOG(debug, "Auto-deleting " << queue->getName()); queue->destroyed(); } } struct AutoDeleteTask : qpid::sys::TimerTask { Broker& broker; Queue::shared_ptr queue; AutoDeleteTask(Broker& b, Queue::shared_ptr q, AbsTime fireTime) : qpid::sys::TimerTask(fireTime, "DelayedAutoDeletion:"+q->getName()), broker(b), queue(q) {} void fire() { //need to detect case where queue was used after the task was //created, but then became unused again before the task fired; //in this case ignore this request as there will have already //been a later task added tryAutoDeleteImpl(broker, queue); } }; void Queue::tryAutoDelete(Broker& broker, Queue::shared_ptr queue) { if (queue->autoDeleteTimeout && queue->canAutoDelete()) { AbsTime time(now(), Duration(queue->autoDeleteTimeout * TIME_SEC)); queue->autoDeleteTask = boost::intrusive_ptr(new AutoDeleteTask(broker, queue, time)); broker.getClusterTimer().add(queue->autoDeleteTask); QPID_LOG(debug, "Timed auto-delete for " << queue->getName() << " initiated"); } else { tryAutoDeleteImpl(broker, queue); } } bool Queue::isExclusiveOwner(const OwnershipToken* const o) const { Mutex::ScopedLock locker(ownershipLock); return o == owner; } void Queue::releaseExclusiveOwnership() { Mutex::ScopedLock locker(ownershipLock); owner = 0; } bool Queue::setExclusiveOwner(const OwnershipToken* const o) { //reset auto deletion timer if necessary if (autoDeleteTimeout && autoDeleteTask) { autoDeleteTask->cancel(); } Mutex::ScopedLock locker(ownershipLock); if (owner) { return false; } else { owner = o; return true; } } bool Queue::hasExclusiveOwner() const { Mutex::ScopedLock locker(ownershipLock); return owner != 0; } bool Queue::hasExclusiveConsumer() const { return exclusive; } void Queue::setExternalQueueStore(ExternalQueueStore* inst) { if (externalQueueStore!=inst && externalQueueStore) delete externalQueueStore; externalQueueStore = inst; if (inst) { ManagementObject* childObj = inst->GetManagementObject(); if (childObj != 0 && mgmtObject != 0) childObj->setReference(mgmtObject->getObjectId()); } } void Queue::countRejected() const { if (mgmtObject) { mgmtObject->inc_discardsSubscriber(); if (brokerMgmtObject) brokerMgmtObject->inc_discardsSubscriber(); } } void Queue::countFlowedToDisk(uint64_t size) const { if (mgmtObject) { _qmf::Queue::PerThreadStats *qStats = mgmtObject->getStatistics(); qStats->msgFtdEnqueues += 1; qStats->byteFtdEnqueues += size; mgmtObject->statisticsUpdated(); if (brokerMgmtObject) { _qmf::Broker::PerThreadStats *bStats = brokerMgmtObject->getStatistics(); bStats->msgFtdEnqueues += 1; bStats->byteFtdEnqueues += size; brokerMgmtObject->statisticsUpdated(); } } } void Queue::countLoadedFromDisk(uint64_t size) const { if (mgmtObject) { _qmf::Queue::PerThreadStats *qStats = mgmtObject->getStatistics(); qStats->msgFtdDequeues += 1; qStats->byteFtdDequeues += size; mgmtObject->statisticsUpdated(); if (brokerMgmtObject) { _qmf::Broker::PerThreadStats *bStats = brokerMgmtObject->getStatistics(); bStats->msgFtdDequeues += 1; bStats->byteFtdDequeues += size; brokerMgmtObject->statisticsUpdated(); } } } ManagementObject* Queue::GetManagementObject (void) const { return (ManagementObject*) mgmtObject; } Manageable::status_t Queue::ManagementMethod (uint32_t methodId, Args& args, string& etext) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; QPID_LOG (debug, "Queue::ManagementMethod [id=" << methodId << "]"); switch (methodId) { case _qmf::Queue::METHOD_PURGE : { _qmf::ArgsQueuePurge& purgeArgs = (_qmf::ArgsQueuePurge&) args; purge(purgeArgs.i_request, boost::shared_ptr(), &purgeArgs.i_filter); status = Manageable::STATUS_OK; } break; case _qmf::Queue::METHOD_REROUTE : { _qmf::ArgsQueueReroute& rerouteArgs = (_qmf::ArgsQueueReroute&) args; boost::shared_ptr dest; if (rerouteArgs.i_useAltExchange) dest = alternateExchange; else { try { dest = broker->getExchanges().get(rerouteArgs.i_exchange); } catch(const std::exception&) { status = Manageable::STATUS_PARAMETER_INVALID; etext = "Exchange not found"; break; } } purge(rerouteArgs.i_request, dest, &rerouteArgs.i_filter); status = Manageable::STATUS_OK; } break; } return status; } void Queue::query(qpid::types::Variant::Map& results) const { Mutex::ScopedLock locker(messageLock); /** @todo add any interesting queue state into results */ if (allocator) allocator->query(results); } void Queue::setPosition(SequenceNumber n) { Mutex::ScopedLock locker(messageLock); sequence = n; QPID_LOG(trace, "Set position to " << sequence << " on " << getName()); } SequenceNumber Queue::getPosition() { return sequence; } int Queue::getEventMode() { return eventMode; } void Queue::recoveryComplete(ExchangeRegistry& exchanges) { // set the alternate exchange if (!alternateExchangeName.empty()) { Exchange::shared_ptr ae = exchanges.find(alternateExchangeName); if (ae) setAlternateExchange(ae); else QPID_LOG(warning, "Could not set alternate exchange \"" << alternateExchangeName << "\" on queue \"" << name << "\": exchange does not exist."); } //process any pending dequeues for_each(pendingDequeues.begin(), pendingDequeues.end(), boost::bind(&Queue::dequeue, this, (TransactionContext*) 0, _1)); pendingDequeues.clear(); } void Queue::insertSequenceNumbers(const std::string& key) { seqNoKey = key; insertSeqNo = !seqNoKey.empty(); QPID_LOG(debug, "Inserting sequence numbers as " << key); } /** updates queue observers and state when a message has become available for transfer, * expects messageLock to be held */ void Queue::observeEnqueue(const QueuedMessage& m, const Mutex::ScopedLock&) { for (Observers::iterator i = observers.begin(); i != observers.end(); ++i) { try { (*i)->enqueued(m); } catch (const std::exception& e) { QPID_LOG(warning, "Exception on notification of enqueue for queue " << getName() << ": " << e.what()); } } if (policy.get()) { policy->enqueued(m); } mgntEnqStats(m.payload, mgmtObject, brokerMgmtObject); } void Queue::updateEnqueued(const QueuedMessage& m) { if (m.payload) { boost::intrusive_ptr payload = m.payload; enqueue(0, payload, true); messages->updateAcquired(m); if (policy.get()) { policy->recoverEnqueued(payload); } Mutex::ScopedLock locker(messageLock); observeEnqueue(m, locker); } else { QPID_LOG(warning, "Queue informed of enqueued message that has no payload"); } } bool Queue::isEnqueued(const QueuedMessage& msg) { return !policy.get() || policy->isEnqueued(msg); } QueueListeners& Queue::getListeners() { return listeners; } Messages& Queue::getMessages() { return *messages; } const Messages& Queue::getMessages() const { return *messages; } void Queue::checkNotDeleted(const Consumer::shared_ptr& c) { if (deleted && !c->hideDeletedError()) { throw ResourceDeletedException(QPID_MSG("Queue " << getName() << " has been deleted.")); } } void Queue::addObserver(boost::shared_ptr observer) { Mutex::ScopedLock locker(messageLock); observers.insert(observer); } void Queue::removeObserver(boost::shared_ptr observer) { Mutex::ScopedLock locker(messageLock); observers.erase(observer); } void Queue::flush() { ScopedUse u(barrier); if (u.acquired && store) store->flush(*this); } bool Queue::bind(boost::shared_ptr exchange, const std::string& key, const qpid::framing::FieldTable& arguments) { if (exchange->bind(shared_from_this(), key, &arguments)) { bound(exchange->getName(), key, arguments); if (exchange->isDurable() && isDurable()) { store->bind(*exchange, *this, key, arguments); } return true; } else { return false; } } Broker* Queue::getBroker() { return broker; } void Queue::setDequeueSincePurge(uint32_t value) { dequeueSincePurge = value; } namespace{ class FindLowest { public: FindLowest() : init(false) {} void process(const QueuedMessage& message) { QPID_LOG(debug, "FindLowest processing: " << message.position); if (!init || message.position < lowest) lowest = message.position; init = true; } bool getLowest(qpid::framing::SequenceNumber& result) { if (init) { result = lowest; return true; } else { return false; } } private: bool init; qpid::framing::SequenceNumber lowest; }; } Queue::UsageBarrier::UsageBarrier(Queue& q) : parent(q), count(0) {} bool Queue::UsageBarrier::acquire() { Monitor::ScopedLock l(parent.messageLock); if (parent.deleted) { return false; } else { ++count; return true; } } void Queue::UsageBarrier::release() { Monitor::ScopedLock l(parent.messageLock); if (--count == 0) parent.messageLock.notifyAll(); } void Queue::UsageBarrier::destroy() { Monitor::ScopedLock l(parent.messageLock); parent.deleted = true; while (count) parent.messageLock.wait(); } qpidc-0.16/src/qpid/broker/MessageDistributor.h0000664000076400007640000000533411643605374022152 0ustar00jrossjross00000000000000#ifndef _broker_MessageDistributor_h #define _broker_MessageDistributor_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** Abstraction used by Queue to determine the next "most desirable" message to provide to * a particular consuming client */ #include "qpid/broker/Consumer.h" namespace qpid { namespace broker { struct QueuedMessage; class MessageDistributor { public: virtual ~MessageDistributor() {}; /** Locking Note: all methods assume the caller is holding the Queue::messageLock * during the method call. */ /** Determine the next message available for consumption by the consumer * @param consumer the consumer that needs a message to consume * @param next set to the next message that the consumer may consume. * @return true if message is available and next is set */ virtual bool nextConsumableMessage( Consumer::shared_ptr& consumer, QueuedMessage& next ) = 0; /** Allow the comsumer to take ownership of the given message. * @param consumer the name of the consumer that is attempting to acquire the message * @param qm the message to be acquired, previously returned from nextConsumableMessage() * @return true if ownership is permitted, false if ownership cannot be assigned. */ virtual bool allocate( const std::string& consumer, const QueuedMessage& target) = 0; /** Determine the next message available for browsing by the consumer * @param consumer the consumer that is browsing the queue * @param next set to the next message that the consumer may browse. * @return true if a message is available and next is returned */ virtual bool nextBrowsableMessage( Consumer::shared_ptr& consumer, QueuedMessage& next ) = 0; /** hook to add any interesting management state to the status map */ virtual void query(qpid::types::Variant::Map&) const = 0; }; }} #endif qpidc-0.16/src/qpid/broker/QueueRegistry.h0000664000076400007640000001107411705641335021142 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QueueRegistry_ #define _QueueRegistry_ #include "qpid/broker/BrokerImportExport.h" #include "qpid/sys/Mutex.h" #include "qpid/management/Manageable.h" #include "qpid/framing/FieldTable.h" #include #include #include #include namespace qpid { namespace broker { class Queue; class QueueEvents; class Exchange; class OwnershipToken; class Broker; class MessageStore; /** * A registry of queues indexed by queue name. * * Queues are reference counted using shared_ptr to ensure that they * are deleted when and only when they are no longer in use. * */ class QueueRegistry { public: QPID_BROKER_EXTERN QueueRegistry(Broker* b = 0); QPID_BROKER_EXTERN ~QueueRegistry(); /** * Declare a queue. * * @return The queue and a boolean flag which is true if the queue * was created by this declare call false if it already existed. */ QPID_BROKER_EXTERN std::pair, bool> declare( const std::string& name, bool durable = false, bool autodelete = false, const OwnershipToken* owner = 0, boost::shared_ptr alternateExchange = boost::shared_ptr(), const qpid::framing::FieldTable& args = framing::FieldTable(), bool recovering = false); /** * Destroy the named queue. * * Note: if the queue is in use it is not actually destroyed until * all shared_ptrs to it are destroyed. During that time it is * possible that a new queue with the same name may be * created. This should not create any problems as the new and * old queues exist independently. The registry has * forgotten the old queue so there can be no confusion for * subsequent calls to find or declare with the same name. * */ QPID_BROKER_EXTERN void destroy(const std::string& name); template bool destroyIf(const std::string& name, Test test) { qpid::sys::RWlock::ScopedWlock locker(lock); if (test()) { destroyLH (name); return true; } else { return false; } } /** * Find the named queue. Return 0 if not found. */ QPID_BROKER_EXTERN boost::shared_ptr find(const std::string& name); /** * Get the named queue. Throw exception if not found. */ QPID_BROKER_EXTERN boost::shared_ptr get(const std::string& name); /** * Generate unique queue name. */ std::string generateName(); /** * Set the store to use. May only be called once. */ void setStore (MessageStore*); /** * Return the message store used. */ MessageStore* getStore() const; /** * Register the manageable parent for declared queues */ void setParent (management::Manageable* _parent) { parent = _parent; } /** Call f for each queue in the registry. */ template void eachQueue(F f) const { qpid::sys::RWlock::ScopedRlock l(lock); for (QueueMap::const_iterator i = queues.begin(); i != queues.end(); ++i) f(i->second); } /** * Change queue mode when cluster size drops to 1 node, expands again * in practice allows flow queue to disk when last name to be exectuted */ void updateQueueClusterState(bool lastNode); private: typedef std::map > QueueMap; QueueMap queues; mutable qpid::sys::RWlock lock; int counter; MessageStore* store; QueueEvents* events; management::Manageable* parent; bool lastNode; //used to set mode on queue declare Broker* broker; //destroy impl that assumes lock is already held: void destroyLH (const std::string& name); }; }} // namespace qpid::broker #endif qpidc-0.16/src/qpid/broker/MessageBuilder.h0000664000076400007640000000347711564561152021231 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _MessageBuilder_ #define _MessageBuilder_ #include "qpid/broker/BrokerImportExport.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/RefCounted.h" #include namespace qpid { namespace broker { class Message; class MessageStore; class QPID_BROKER_CLASS_EXTERN MessageBuilder : public framing::FrameHandler{ public: QPID_BROKER_EXTERN MessageBuilder(MessageStore* const store); QPID_BROKER_EXTERN void handle(framing::AMQFrame& frame); boost::intrusive_ptr getMessage() { return message; } QPID_BROKER_EXTERN void start(const framing::SequenceNumber& id); void end(); private: enum State {DORMANT, METHOD, HEADER, CONTENT}; State state; boost::intrusive_ptr message; MessageStore* const store; void checkType(uint8_t expected, uint8_t actual); }; } } #endif qpidc-0.16/src/qpid/broker/LegacyLVQ.h0000664000076400007640000000423111717465066020121 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_LEGACYLVQ_H #define QPID_BROKER_LEGACYLVQ_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/MessageMap.h" #include namespace qpid { namespace broker { class Broker; /** * This class encapsulates the behaviour of the old style LVQ where a * message replacing another messages for the given key will use the * position in the queue of the previous message. This however causes * problems for browsing. Either browsers stop the coalescing of * messages by key (default) or they may mis updates (if the no-browse * option is specified). */ class LegacyLVQ : public MessageMap { public: LegacyLVQ(const std::string& key, bool noBrowse = false, Broker* broker = 0); bool acquire(const framing::SequenceNumber&, QueuedMessage&); bool browse(const framing::SequenceNumber&, QueuedMessage&, bool); bool push(const QueuedMessage& added, QueuedMessage& removed); void removeIf(Predicate); void setNoBrowse(bool); static std::auto_ptr updateOrReplace(std::auto_ptr current, const std::string& key, bool noBrowse, Broker* broker); protected: bool noBrowse; Broker* broker; const QueuedMessage& replace(const QueuedMessage&, const QueuedMessage&); }; }} // namespace qpid::broker #endif /*!QPID_BROKER_LEGACYLVQ_H*/ qpidc-0.16/src/qpid/broker/DtxBuffer.h0000664000076400007640000000330311625531570020212 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _DtxBuffer_ #define _DtxBuffer_ #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/TxBuffer.h" #include "qpid/sys/Mutex.h" namespace qpid { namespace broker { class DtxBuffer : public TxBuffer{ mutable sys::Mutex lock; const std::string xid; bool ended; bool suspended; bool failed; bool expired; public: typedef boost::shared_ptr shared_ptr; QPID_BROKER_EXTERN DtxBuffer( const std::string& xid = "", bool ended=false, bool suspended=false, bool failed=false, bool expired=false); QPID_BROKER_EXTERN ~DtxBuffer(); QPID_BROKER_EXTERN void markEnded(); bool isEnded() const; void setSuspended(bool suspended); bool isSuspended() const; void fail(); bool isRollbackOnly() const; void timedout(); bool isExpired() const; bool isFailed() const; std::string getXid() const; }; } } #endif qpidc-0.16/src/qpid/broker/SessionHandler.h0000664000076400007640000000704711717465066021263 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_SESSIONHANDLER_H #define QPID_BROKER_SESSIONHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/SessionHandler.h" #include "qpid/broker/SessionHandler.h" #include "qpid/framing/AMQP_ClientProxy.h" namespace qpid { class SessionState; namespace broker { class Connection; class ConnectionState; class SessionState; /** * A SessionHandler is associated with each active channel. It * receives incoming frames, handles session controls and manages the * association between the channel and a session. */ class SessionHandler : public amqp_0_10::SessionHandler { public: SessionHandler(Connection&, framing::ChannelId); ~SessionHandler(); /** Get broker::SessionState */ SessionState* getSession() { return session.get(); } const SessionState* getSession() const { return session.get(); } ConnectionState& getConnection(); const ConnectionState& getConnection() const; framing::AMQP_ClientProxy& getProxy() { return proxy; } const framing::AMQP_ClientProxy& getProxy() const { return proxy; } /** * If commands are sent based on the local time (e.g. in timers), they don't have * a well-defined ordering across cluster nodes. * This proxy is for sending such commands. In a clustered broker it will take steps * to synchronize command order across the cluster. In a stand-alone broker * it is just a synonym for getProxy() */ framing::AMQP_ClientProxy& getClusterOrderProxy() { return clusterOrderProxy.get() ? *clusterOrderProxy : proxy; } virtual void handleDetach(); void attached(const std::string& name);//used by 'pushing' inter-broker bridges void attachAs(const std::string& name);//used by 'pulling' inter-broker bridges protected: virtual void setState(const std::string& sessionName, bool force); virtual qpid::SessionState* getState(); virtual framing::FrameHandler* getInHandler(); virtual void connectionException(framing::connection::CloseCode code, const std::string& msg); virtual void channelException(framing::session::DetachCode, const std::string& msg); virtual void executionException(framing::execution::ErrorCode, const std::string& msg); virtual void detaching(); virtual void readyToSend(); private: struct SetChannelProxy : public framing::AMQP_ClientProxy { // Proxy that sets the channel. framing::ChannelHandler setChannel; SetChannelProxy(uint16_t ch, framing::FrameHandler* out) : framing::AMQP_ClientProxy(setChannel), setChannel(ch, out) {} }; Connection& connection; framing::AMQP_ClientProxy proxy; std::auto_ptr session; std::auto_ptr clusterOrderProxy; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_SESSIONHANDLER_H*/ qpidc-0.16/src/qpid/broker/QueueListeners.cpp0000664000076400007640000000540211705641315021631 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/QueueListeners.h" #include namespace qpid { namespace broker { void QueueListeners::addListener(Consumer::shared_ptr c) { if (!c->inListeners) { if (c->acquires) { add(consumers, c); } else { add(browsers, c); } c->inListeners = true; } } void QueueListeners::removeListener(Consumer::shared_ptr c) { if (c->inListeners) { if (c->acquires) { remove(consumers, c); } else { remove(browsers, c); } c->inListeners = false; } } void QueueListeners::populate(NotificationSet& set) { if (consumers.size()) { set.consumer = consumers.front(); consumers.pop_front(); set.consumer->inListeners = false; } // Don't swap the deques, hang on to the memory allocated. set.browsers = browsers; browsers.clear(); for (Listeners::iterator i = set.browsers.begin(); i != set.browsers.end(); i++) (*i)->inListeners = false; } void QueueListeners::add(Listeners& listeners, Consumer::shared_ptr c) { listeners.push_back(c); } void QueueListeners::remove(Listeners& listeners, Consumer::shared_ptr c) { Listeners::iterator i = std::find(listeners.begin(), listeners.end(), c); if (i != listeners.end()) listeners.erase(i); } void QueueListeners::NotificationSet::notify() { if (consumer) consumer->notify(); std::for_each(browsers.begin(), browsers.end(), boost::mem_fn(&Consumer::notify)); } bool QueueListeners::contains(Consumer::shared_ptr c) const { return c->inListeners; } void QueueListeners::ListenerSet::notifyAll() { std::for_each(listeners.begin(), listeners.end(), boost::mem_fn(&Consumer::notify)); } void QueueListeners::snapshot(ListenerSet& set) { set.listeners.insert(set.listeners.end(), consumers.begin(), consumers.end()); set.listeners.insert(set.listeners.end(), browsers.begin(), browsers.end()); } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/Exchange.cpp0000664000076400007640000003213111725210040020362 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Broker.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/ExchangeRegistry.h" #include "qpid/broker/FedOps.h" #include "qpid/broker/Queue.h" #include "qpid/framing/MessageProperties.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include "qpid/management/ManagementAgent.h" #include "qpid/sys/ExceptionHolder.h" #include using namespace qpid::broker; using namespace qpid::framing; using qpid::framing::Buffer; using qpid::framing::FieldTable; using qpid::sys::Mutex; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; using qpid::management::Args; namespace _qmf = qmf::org::apache::qpid::broker; namespace { const std::string qpidMsgSequence("qpid.msg_sequence"); const std::string qpidSequenceCounter("qpid.sequence_counter"); const std::string qpidIVE("qpid.ive"); const std::string QPID_MANAGEMENT("qpid.management"); } Exchange::PreRoute::PreRoute(Deliverable& msg, Exchange* _p):parent(_p) { if (parent){ if (parent->sequence || parent->ive) parent->sequenceLock.lock(); if (parent->sequence){ parent->sequenceNo++; msg.getMessage().insertCustomProperty(qpidMsgSequence,parent->sequenceNo); } if (parent->ive) { parent->lastMsg = &( msg.getMessage()); } } } Exchange::PreRoute::~PreRoute(){ if (parent && (parent->sequence || parent->ive)){ parent->sequenceLock.unlock(); } } namespace { /** Store information about an exception to be thrown later. * If multiple exceptions are stored, save the first of the "most severe" * exceptions, SESSION is les sever than CONNECTION etc. */ class ExInfo { public: enum Type { NONE, SESSION, CONNECTION, OTHER }; ExInfo(string exchange) : type(NONE), exchange(exchange) {} void store(Type type_, const qpid::sys::ExceptionHolder& exception_, const boost::shared_ptr& queue) { QPID_LOG(warning, "Exchange " << exchange << " cannot deliver to queue " << queue->getName() << ": " << exception_.what()); if (type < type_) { // Replace less severe exception type = type_; exception = exception_; } } void raise() { exception.raise(); } private: Type type; string exchange; qpid::sys::ExceptionHolder exception; }; } void Exchange::doRoute(Deliverable& msg, ConstBindingList b) { int count = 0; if (b.get()) { // Block the content release if the message is transient AND there is more than one binding if (!msg.getMessage().isPersistent() && b->size() > 1) { msg.getMessage().blockContentRelease(); } ExInfo error(getName()); // Save exception to throw at the end. for(std::vector::const_iterator i = b->begin(); i != b->end(); i++, count++) { try { msg.deliverTo((*i)->queue); if ((*i)->mgmtBinding != 0) (*i)->mgmtBinding->inc_msgMatched(); } catch (const SessionException& e) { error.store(ExInfo::SESSION, framing::createSessionException(e.code, e.what()),(*i)->queue); } catch (const ConnectionException& e) { error.store(ExInfo::CONNECTION, framing::createConnectionException(e.code, e.what()), (*i)->queue); } catch (const std::exception& e) { error.store(ExInfo::OTHER, qpid::sys::ExceptionHolder(new Exception(e.what())), (*i)->queue); } } error.raise(); } if (mgmtExchange != 0) { qmf::org::apache::qpid::broker::Exchange::PerThreadStats *eStats = mgmtExchange->getStatistics(); uint64_t contentSize = msg.contentSize(); eStats->msgReceives += 1; eStats->byteReceives += contentSize; if (count == 0) { //QPID_LOG(warning, "Exchange " << getName() << " could not route message; no matching binding found"); eStats->msgDrops += 1; eStats->byteDrops += contentSize; if (brokerMgmtObject) brokerMgmtObject->inc_discardsNoRoute(); } else { eStats->msgRoutes += count; eStats->byteRoutes += count * contentSize; } } } void Exchange::routeIVE(){ if (ive && lastMsg.get()){ DeliverableMessage dmsg(lastMsg); route(dmsg); } } Exchange::Exchange (const string& _name, Manageable* parent, Broker* b) : name(_name), durable(false), persistenceId(0), sequence(false), sequenceNo(0), ive(false), mgmtExchange(0), brokerMgmtObject(0), broker(b), destroyed(false) { if (parent != 0 && broker != 0) { ManagementAgent* agent = broker->getManagementAgent(); if (agent != 0) { mgmtExchange = new _qmf::Exchange (agent, this, parent, _name); mgmtExchange->set_durable(durable); mgmtExchange->set_autoDelete(false); agent->addObject(mgmtExchange, 0, durable); if (broker) brokerMgmtObject = (qmf::org::apache::qpid::broker::Broker*) broker->GetManagementObject(); } } } Exchange::Exchange(const string& _name, bool _durable, const qpid::framing::FieldTable& _args, Manageable* parent, Broker* b) : name(_name), durable(_durable), alternateUsers(0), persistenceId(0), args(_args), sequence(false), sequenceNo(0), ive(false), mgmtExchange(0), brokerMgmtObject(0), broker(b), destroyed(false) { if (parent != 0 && broker != 0) { ManagementAgent* agent = broker->getManagementAgent(); if (agent != 0) { mgmtExchange = new _qmf::Exchange (agent, this, parent, _name); mgmtExchange->set_durable(durable); mgmtExchange->set_autoDelete(false); mgmtExchange->set_arguments(ManagementAgent::toMap(args)); agent->addObject(mgmtExchange, 0, durable); if (broker) brokerMgmtObject = (qmf::org::apache::qpid::broker::Broker*) broker->GetManagementObject(); } } sequence = _args.get(qpidMsgSequence); if (sequence) { QPID_LOG(debug, "Configured exchange " << _name << " with Msg sequencing"); args.setInt64(std::string(qpidSequenceCounter), sequenceNo); } ive = _args.get(qpidIVE); if (ive) { if (broker && broker->isInCluster()) throw framing::NotImplementedException("Cannot use Initial Value Exchanges in a cluster"); QPID_LOG(debug, "Configured exchange " << _name << " with Initial Value"); } } Exchange::~Exchange () { if (mgmtExchange != 0) mgmtExchange->resourceDestroy (); } void Exchange::setAlternate(Exchange::shared_ptr _alternate) { alternate = _alternate; if (mgmtExchange != 0) { if (alternate.get() != 0) mgmtExchange->set_altExchange(alternate->GetManagementObject()->getObjectId()); else mgmtExchange->clr_altExchange(); } } void Exchange::setPersistenceId(uint64_t id) const { persistenceId = id; } Exchange::shared_ptr Exchange::decode(ExchangeRegistry& exchanges, Buffer& buffer) { string name; string type; string altName; FieldTable args; buffer.getShortString(name); bool durable(buffer.getOctet()); buffer.getShortString(type); buffer.get(args); // For backwards compatibility on restoring exchanges from before the alt-exchange update, perform check if (buffer.available()) buffer.getShortString(altName); try { Exchange::shared_ptr exch = exchanges.declare(name, type, durable, args).first; exch->sequenceNo = args.getAsInt64(qpidSequenceCounter); exch->alternateName.assign(altName); return exch; } catch (const UnknownExchangeTypeException&) { QPID_LOG(warning, "Could not create exchange " << name << "; type " << type << " is not recognised"); return Exchange::shared_ptr(); } } void Exchange::encode(Buffer& buffer) const { buffer.putShortString(name); buffer.putOctet(durable); buffer.putShortString(getType()); if (args.isSet(qpidSequenceCounter)) args.setInt64(std::string(qpidSequenceCounter),sequenceNo); buffer.put(args); buffer.putShortString(alternate.get() ? alternate->getName() : string("")); } uint32_t Exchange::encodedSize() const { return name.size() + 1/*short string size*/ + 1 /*durable*/ + getType().size() + 1/*short string size*/ + (alternate.get() ? alternate->getName().size() : 0) + 1/*short string size*/ + args.encodedSize(); } void Exchange::recoveryComplete(ExchangeRegistry& exchanges) { if (!alternateName.empty()) { Exchange::shared_ptr ae = exchanges.find(alternateName); if (ae) setAlternate(ae); else QPID_LOG(warning, "Could not set alternate exchange \"" << alternateName << "\": does not exist."); } } ManagementObject* Exchange::GetManagementObject (void) const { return (ManagementObject*) mgmtExchange; } void Exchange::registerDynamicBridge(DynamicBridge* db) { if (!supportsDynamicBinding()) throw Exception("Exchange type does not support dynamic binding"); { Mutex::ScopedLock l(bridgeLock); for (std::vector::iterator iter = bridgeVector.begin(); iter != bridgeVector.end(); iter++) (*iter)->sendReorigin(); bridgeVector.push_back(db); } FieldTable args; args.setString(qpidFedOp, fedOpReorigin); bind(Queue::shared_ptr(), string(), &args); } void Exchange::removeDynamicBridge(DynamicBridge* db) { Mutex::ScopedLock l(bridgeLock); for (std::vector::iterator iter = bridgeVector.begin(); iter != bridgeVector.end(); iter++) if (*iter == db) { bridgeVector.erase(iter); break; } } void Exchange::handleHelloRequest() { } void Exchange::propagateFedOp(const string& routingKey, const string& tags, const string& op, const string& origin, qpid::framing::FieldTable* extra_args) { Mutex::ScopedLock l(bridgeLock); string myOp(op.empty() ? fedOpBind : op); for (std::vector::iterator iter = bridgeVector.begin(); iter != bridgeVector.end(); iter++) (*iter)->propagateBinding(routingKey, tags, op, origin, extra_args); } Exchange::Binding::Binding(const string& _key, Queue::shared_ptr _queue, Exchange* _parent, FieldTable _args, const string& _origin) : parent(_parent), queue(_queue), key(_key), args(_args), origin(_origin), mgmtBinding(0) { } Exchange::Binding::~Binding () { if (mgmtBinding != 0) { ManagementObject* mo = queue->GetManagementObject(); if (mo != 0) static_cast<_qmf::Queue*>(mo)->dec_bindingCount(); mgmtBinding->resourceDestroy (); } } void Exchange::Binding::startManagement() { if (parent != 0) { Broker* broker = parent->getBroker(); if (broker != 0) { ManagementAgent* agent = broker->getManagementAgent(); if (agent != 0) { ManagementObject* mo = queue->GetManagementObject(); if (mo != 0) { management::ObjectId queueId = mo->getObjectId(); mgmtBinding = new _qmf::Binding (agent, this, (Manageable*) parent, queueId, key, ManagementAgent::toMap(args)); if (!origin.empty()) mgmtBinding->set_origin(origin); agent->addObject(mgmtBinding); static_cast<_qmf::Queue*>(mo)->inc_bindingCount(); } } } } } ManagementObject* Exchange::Binding::GetManagementObject () const { return (ManagementObject*) mgmtBinding; } Exchange::MatchQueue::MatchQueue(Queue::shared_ptr q) : queue(q) {} bool Exchange::MatchQueue::operator()(Exchange::Binding::shared_ptr b) { return b->queue == queue; } void Exchange::setProperties(const boost::intrusive_ptr& msg) { msg->setExchange(getName()); } bool Exchange::routeWithAlternate(Deliverable& msg) { route(msg); if (!msg.delivered && alternate) { alternate->route(msg); } return msg.delivered; } qpidc-0.16/src/qpid/broker/DeliveryId.h0000664000076400007640000000210610717375227020367 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _DeliveryId_ #define _DeliveryId_ #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/SequenceNumberSet.h" namespace qpid { namespace broker { typedef framing::SequenceNumber DeliveryId; typedef framing::SequenceNumberSet DeliveryIds; }} #endif qpidc-0.16/src/qpid/broker/Bridge.h0000664000076400007640000001037311717465066017532 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _Bridge_ #define _Bridge_ #include "qpid/broker/PersistableConfig.h" #include "qpid/framing/AMQP_ServerProxy.h" #include "qpid/framing/ChannelHandler.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/FieldTable.h" #include "qpid/management/Manageable.h" #include "qpid/broker/Exchange.h" #include "qmf/org/apache/qpid/broker/ArgsLinkBridge.h" #include "qmf/org/apache/qpid/broker/Bridge.h" #include #include namespace qpid { namespace broker { class Connection; class ConnectionState; class Link; class LinkRegistry; class SessionHandler; class Bridge : public PersistableConfig, public management::Manageable, public Exchange::DynamicBridge { public: typedef boost::shared_ptr shared_ptr; typedef boost::function CancellationListener; typedef boost::function InitializeCallback; Bridge(Link* link, framing::ChannelId id, CancellationListener l, const qmf::org::apache::qpid::broker::ArgsLinkBridge& args, InitializeCallback init ); ~Bridge(); void create(Connection& c); void cancel(Connection& c); void closed(); void destroy(); bool isDurable() { return args.i_durable; } bool isSessionReady() const; management::ManagementObject* GetManagementObject() const; management::Manageable::status_t ManagementMethod(uint32_t methodId, management::Args& args, std::string& text); // PersistableConfig: void setPersistenceId(uint64_t id) const; uint64_t getPersistenceId() const { return persistenceId; } uint32_t encodedSize() const; void encode(framing::Buffer& buffer) const; const std::string& getName() const { return name; } static Bridge::shared_ptr decode(LinkRegistry& links, framing::Buffer& buffer); // Exchange::DynamicBridge methods void propagateBinding(const std::string& key, const std::string& tagList, const std::string& op, const std::string& origin, qpid::framing::FieldTable* extra_args=0); void sendReorigin(); void ioThreadPropagateBinding(const std::string& queue, const std::string& exchange, const std::string& key, framing::FieldTable args); bool containsLocalTag(const std::string& tagList) const; const std::string& getLocalTag() const; // Methods needed by initialization functions std::string getQueueName() const { return queueName; } const qmf::org::apache::qpid::broker::ArgsLinkBridge& getArgs() { return args; } private: struct PushHandler : framing::FrameHandler { PushHandler(Connection* c) { conn = c; } void handle(framing::AMQFrame& frame); Connection* conn; }; std::auto_ptr pushHandler; std::auto_ptr channelHandler; std::auto_ptr session; std::auto_ptr peer; Link* link; framing::ChannelId id; qmf::org::apache::qpid::broker::ArgsLinkBridge args; qmf::org::apache::qpid::broker::Bridge* mgmtObject; CancellationListener listener; std::string name; std::string queueName; mutable uint64_t persistenceId; ConnectionState* connState; Connection* conn; InitializeCallback initialize; bool resetProxy(); }; }} #endif qpidc-0.16/src/qpid/broker/HandlerImpl.h0000664000076400007640000000264311227113407020517 0ustar00jrossjross00000000000000#ifndef _broker_HandlerImpl_h #define _broker_HandlerImpl_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/broker/SemanticState.h" #include "qpid/broker/SessionContext.h" #include "qpid/broker/ConnectionState.h" namespace qpid { namespace broker { class Broker; /** * Base template for protocol handler implementations. * Provides convenience methods for getting common session objects. */ class HandlerImpl { protected: SemanticState& state; SessionContext& session; HandlerImpl(SemanticState& s) : state(s), session(s.getSession()) {} framing::AMQP_ClientProxy& getProxy() { return session.getProxy(); } ConnectionState& getConnection() { return session.getConnection(); } Broker& getBroker() { return session.getConnection().getBroker(); } }; }} // namespace qpid::broker #endif /*!_broker_HandlerImpl_h*/ qpidc-0.16/src/qpid/broker/Message.cpp0000664000076400007640000003517411732702101020240 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Message.h" #include "qpid/broker/Queue.h" #include "qpid/broker/ExchangeRegistry.h" #include "qpid/broker/ExpiryPolicy.h" #include "qpid/StringUtils.h" #include "qpid/framing/frame_functors.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/SendContent.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/TypeFilter.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include using boost::intrusive_ptr; using qpid::sys::AbsTime; using qpid::sys::Duration; using qpid::sys::TIME_MSEC; using qpid::sys::FAR_FUTURE; using std::string; using namespace qpid::framing; namespace qpid { namespace broker { TransferAdapter Message::TRANSFER; Message::Message(const framing::SequenceNumber& id) : frames(id), persistenceId(0), redelivered(false), loaded(false), staged(false), forcePersistentPolicy(false), publisher(0), adapter(0), expiration(FAR_FUTURE), dequeueCallback(0), inCallback(false), requiredCredit(0), isManagementMessage(false), copyHeaderOnWrite(false) {} Message::~Message() {} void Message::forcePersistent() { sys::Mutex::ScopedLock l(lock); // only set forced bit if we actually need to force. if (! getAdapter().isPersistent(frames) ){ forcePersistentPolicy = true; } } bool Message::isForcedPersistent() { return forcePersistentPolicy; } std::string Message::getRoutingKey() const { return getAdapter().getRoutingKey(frames); } std::string Message::getExchangeName() const { return getAdapter().getExchange(frames); } const boost::shared_ptr Message::getExchange(ExchangeRegistry& registry) const { if (!exchange) { exchange = registry.get(getExchangeName()); } return exchange; } bool Message::isImmediate() const { return getAdapter().isImmediate(frames); } const FieldTable* Message::getApplicationHeaders() const { sys::Mutex::ScopedLock l(lock); return getAdapter().getApplicationHeaders(frames); } std::string Message::getAppId() const { sys::Mutex::ScopedLock l(lock); return getAdapter().getAppId(frames); } bool Message::isPersistent() const { sys::Mutex::ScopedLock l(lock); return (getAdapter().isPersistent(frames) || forcePersistentPolicy); } bool Message::requiresAccept() { return getAdapter().requiresAccept(frames); } uint32_t Message::getRequiredCredit() { sys::Mutex::ScopedLock l(lock); if (!requiredCredit) { //add up payload for all header and content frames in the frameset SumBodySize sum; frames.map_if(sum, TypeFilter2()); requiredCredit = sum.getSize(); } return requiredCredit; } void Message::encode(framing::Buffer& buffer) const { sys::Mutex::ScopedLock l(lock); //encode method and header frames EncodeFrame f1(buffer); frames.map_if(f1, TypeFilter2()); //then encode the payload of each content frame framing::EncodeBody f2(buffer); frames.map_if(f2, TypeFilter()); } void Message::encodeContent(framing::Buffer& buffer) const { sys::Mutex::ScopedLock l(lock); //encode the payload of each content frame EncodeBody f2(buffer); frames.map_if(f2, TypeFilter()); } uint32_t Message::encodedSize() const { return encodedHeaderSize() + encodedContentSize(); } uint32_t Message::encodedContentSize() const { sys::Mutex::ScopedLock l(lock); return frames.getContentSize(); } uint32_t Message::encodedHeaderSize() const { sys::Mutex::ScopedLock l(lock); // prevent modifications while computing size //add up the size for all method and header frames in the frameset SumFrameSize sum; frames.map_if(sum, TypeFilter2()); return sum.getSize(); } void Message::decodeHeader(framing::Buffer& buffer) { AMQFrame method; method.decode(buffer); frames.append(method); AMQFrame header; header.decode(buffer); frames.append(header); } void Message::decodeContent(framing::Buffer& buffer) { if (buffer.available()) { //get the data as a string and set that as the content //body on a frame then add that frame to the frameset AMQFrame frame((AMQContentBody())); frame.castBody()->decode(buffer, buffer.available()); frame.setFirstSegment(false); frames.append(frame); } else { //adjust header flags MarkLastSegment f; frames.map_if(f, TypeFilter()); } //mark content loaded loaded = true; } // Used for testing only void Message::tryReleaseContent() { if (checkContentReleasable()) { releaseContent(); } } void Message::releaseContent(MessageStore* s) { //deprecated, use setStore(store); releaseContent(); instead if (!store) setStore(s); releaseContent(); } void Message::releaseContent() { sys::Mutex::ScopedLock l(lock); if (store) { if (!getPersistenceId()) { intrusive_ptr pmsg(this); store->stage(pmsg); staged = true; } //ensure required credit and size is cached before content frames are released getRequiredCredit(); contentSize(); //remove any content frames from the frameset frames.remove(TypeFilter()); setContentReleased(); } } void Message::destroy() { if (staged) { if (store) { store->destroy(*this); } else { QPID_LOG(error, "Message content was staged but no store is set so it can't be destroyed"); } } } bool Message::getContentFrame(const Queue& queue, AMQFrame& frame, uint16_t maxContentSize, uint64_t offset) const { intrusive_ptr pmsg(this); bool done = false; string& data = frame.castBody()->getData(); store->loadContent(queue, pmsg, data, offset, maxContentSize); done = data.size() < maxContentSize; frame.setBof(false); frame.setEof(true); QPID_LOG(debug, "loaded frame" << frame); if (offset > 0) { frame.setBos(false); } if (!done) { frame.setEos(false); } else return false; return true; } void Message::sendContent(const Queue& queue, framing::FrameHandler& out, uint16_t maxFrameSize) const { sys::Mutex::ScopedLock l(lock); if (isContentReleased() && !frames.isComplete()) { sys::Mutex::ScopedUnlock u(lock); uint16_t maxContentSize = maxFrameSize - AMQFrame::frameOverhead(); bool morecontent = true; for (uint64_t offset = 0; morecontent; offset += maxContentSize) { AMQFrame frame((AMQContentBody())); morecontent = getContentFrame(queue, frame, maxContentSize, offset); out.handle(frame); } queue.countLoadedFromDisk(contentSize()); } else { Count c; frames.map_if(c, TypeFilter()); SendContent f(out, maxFrameSize, c.getCount()); frames.map_if(f, TypeFilter()); } } void Message::sendHeader(framing::FrameHandler& out, uint16_t /*maxFrameSize*/) const { sys::Mutex::ScopedLock l(lock); Relay f(out); frames.map_if(f, TypeFilter()); //as frame (and pointer to body) has now been passed to handler, //subsequent modifications should use a copy copyHeaderOnWrite = true; } // TODO aconway 2007-11-09: Obsolete, remove. Was used to cover over // 0-8/0-9 message differences. MessageAdapter& Message::getAdapter() const { if (!adapter) { if(frames.isA()) { adapter = &TRANSFER; } else { const AMQMethodBody* method = frames.getMethod(); if (!method) throw Exception("Can't adapt message with no method"); else throw Exception(QPID_MSG("Can't adapt message based on " << *method)); } } return *adapter; } uint64_t Message::contentSize() const { return frames.getContentSize(); } bool Message::isContentLoaded() const { return loaded; } namespace { const std::string X_QPID_TRACE("x-qpid.trace"); } bool Message::isExcluded(const std::vector& excludes) const { sys::Mutex::ScopedLock l(lock); const FieldTable* headers = getApplicationHeaders(); if (headers) { std::string traceStr = headers->getAsString(X_QPID_TRACE); if (traceStr.size()) { std::vector trace = split(traceStr, ", "); for (std::vector::const_iterator i = excludes.begin(); i != excludes.end(); i++) { for (std::vector::const_iterator j = trace.begin(); j != trace.end(); j++) { if (*i == *j) { return true; } } } } } return false; } class CloneHeaderBody { public: void operator()(AMQFrame& f) { f.cloneBody(); } }; AMQHeaderBody* Message::getHeaderBody() { // expects lock to be held if (copyHeaderOnWrite) { CloneHeaderBody f; frames.map_if(f, TypeFilter()); copyHeaderOnWrite = false; } return frames.getHeaders(); } void Message::addTraceId(const std::string& id) { sys::Mutex::ScopedLock l(lock); if (isA()) { FieldTable& headers = getModifiableProperties()->getApplicationHeaders(); std::string trace = headers.getAsString(X_QPID_TRACE); if (trace.empty()) { headers.setString(X_QPID_TRACE, id); } else if (trace.find(id) == std::string::npos) { trace += ","; trace += id; headers.setString(X_QPID_TRACE, trace); } } } void Message::setTimestamp() { sys::Mutex::ScopedLock l(lock); DeliveryProperties* props = getModifiableProperties(); time_t now = ::time(0); props->setTimestamp(now); // AMQP-0.10: posix time_t - secs since Epoch } void Message::computeExpiration(const boost::intrusive_ptr& e) { sys::Mutex::ScopedLock l(lock); DeliveryProperties* props = getModifiableProperties(); if (props->getTtl()) { // AMQP requires setting the expiration property to be posix // time_t in seconds. TTL is in milliseconds if (!props->getExpiration()) { //only set expiration in delivery properties if not already set time_t now = ::time(0); props->setExpiration(now + (props->getTtl()/1000)); } if (e) { // Use higher resolution time for the internal expiry calculation. // Prevent overflow as a signed int64_t Duration ttl(std::min(props->getTtl() * TIME_MSEC, (uint64_t) std::numeric_limits::max())); expiration = AbsTime(e->getCurrentTime(), ttl); setExpiryPolicy(e); } } } void Message::adjustTtl() { sys::Mutex::ScopedLock l(lock); DeliveryProperties* props = getModifiableProperties(); if (props->getTtl()) { if (expiration < FAR_FUTURE) { sys::AbsTime current( expiryPolicy ? expiryPolicy->getCurrentTime() : sys::AbsTime::now()); sys::Duration ttl(current, getExpiration()); // convert from ns to ms; set to 1 if expired props->setTtl(int64_t(ttl) >= 1000000 ? int64_t(ttl)/1000000 : 1); } } } void Message::setRedelivered() { sys::Mutex::ScopedLock l(lock); getModifiableProperties()->setRedelivered(true); } void Message::insertCustomProperty(const std::string& key, int64_t value) { sys::Mutex::ScopedLock l(lock); getModifiableProperties()->getApplicationHeaders().setInt64(key,value); } void Message::insertCustomProperty(const std::string& key, const std::string& value) { sys::Mutex::ScopedLock l(lock); getModifiableProperties()->getApplicationHeaders().setString(key,value); } void Message::removeCustomProperty(const std::string& key) { sys::Mutex::ScopedLock l(lock); getModifiableProperties()->getApplicationHeaders().erase(key); } void Message::setExchange(const std::string& exchange) { sys::Mutex::ScopedLock l(lock); getModifiableProperties()->setExchange(exchange); } void Message::clearApplicationHeadersFlag() { sys::Mutex::ScopedLock l(lock); getModifiableProperties()->clearApplicationHeadersFlag(); } void Message::setExpiryPolicy(const boost::intrusive_ptr& e) { expiryPolicy = e; } bool Message::hasExpired() { return expiryPolicy && expiryPolicy->hasExpired(*this); } namespace { struct ScopedSet { sys::Monitor& lock; bool& flag; ScopedSet(sys::Monitor& l, bool& f) : lock(l), flag(f) { sys::Monitor::ScopedLock sl(lock); flag = true; } ~ScopedSet(){ sys::Monitor::ScopedLock sl(lock); flag = false; lock.notifyAll(); } }; } void Message::allDequeuesComplete() { ScopedSet ss(callbackLock, inCallback); MessageCallback* cb = dequeueCallback; if (cb && *cb) (*cb)(intrusive_ptr(this)); } void Message::setDequeueCompleteCallback(MessageCallback& cb) { sys::Mutex::ScopedLock l(callbackLock); while (inCallback) callbackLock.wait(); dequeueCallback = &cb; } void Message::resetDequeueCompleteCallback() { sys::Mutex::ScopedLock l(callbackLock); while (inCallback) callbackLock.wait(); dequeueCallback = 0; } uint8_t Message::getPriority() const { sys::Mutex::ScopedLock l(lock); return getAdapter().getPriority(frames); } bool Message::getIsManagementMessage() const { return isManagementMessage; } void Message::setIsManagementMessage(bool b) { isManagementMessage = b; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/ThresholdAlerts.cpp0000664000076400007640000001736311552101222021760 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/ThresholdAlerts.h" #include "qpid/broker/Queue.h" #include "qpid/broker/QueuedMessage.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/log/Statement.h" #include "qpid/management/ManagementAgent.h" #include "qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.h" namespace qpid { namespace broker { namespace { const qmf::org::apache::qpid::broker::EventQueueThresholdExceeded EVENT("dummy", 0, 0); bool isQMFv2(const boost::intrusive_ptr message) { const qpid::framing::MessageProperties* props = message->getProperties(); return props && props->getAppId() == "qmf2"; } bool isThresholdEvent(const boost::intrusive_ptr message) { if (message->getIsManagementMessage()) { //is this a qmf event? if so is it a threshold event? if (isQMFv2(message)) { const qpid::framing::FieldTable* headers = message->getApplicationHeaders(); if (headers && headers->getAsString("qmf.content") == "_event") { //decode as list std::string content = message->getFrames().getContent(); qpid::types::Variant::List list; qpid::amqp_0_10::ListCodec::decode(content, list); if (list.empty() || list.front().getType() != qpid::types::VAR_MAP) return false; qpid::types::Variant::Map map = list.front().asMap(); try { std::string eventName = map["_schema_id"].asMap()["_class_name"].asString(); return eventName == EVENT.getEventName(); } catch (const std::exception& e) { QPID_LOG(error, "Error checking for recursive threshold alert: " << e.what()); } } } else { std::string content = message->getFrames().getContent(); qpid::framing::Buffer buffer(const_cast(content.data()), content.size()); if (buffer.getOctet() == 'A' && buffer.getOctet() == 'M' && buffer.getOctet() == '2' && buffer.getOctet() == 'e') { buffer.getLong();//sequence std::string packageName; buffer.getShortString(packageName); if (packageName != EVENT.getPackageName()) return false; std::string eventName; buffer.getShortString(eventName); return eventName == EVENT.getEventName(); } } } return false; } } ThresholdAlerts::ThresholdAlerts(const std::string& n, qpid::management::ManagementAgent& a, const uint32_t ct, const uint64_t st, const long repeat) : name(n), agent(a), countThreshold(ct), sizeThreshold(st), repeatInterval(repeat ? repeat*qpid::sys::TIME_SEC : 0), count(0), size(0), lastAlert(qpid::sys::EPOCH) {} void ThresholdAlerts::enqueued(const QueuedMessage& m) { size += m.payload->contentSize(); ++count; if ((countThreshold && count >= countThreshold) || (sizeThreshold && size >= sizeThreshold)) { if ((repeatInterval == 0 && lastAlert == qpid::sys::EPOCH) || qpid::sys::Duration(lastAlert, qpid::sys::now()) > repeatInterval) { //Note: Raising an event may result in messages being //enqueued on queues; it may even be that this event //causes a message to be enqueued on the queue we are //tracking, and so we need to avoid recursing if (isThresholdEvent(m.payload)) return; lastAlert = qpid::sys::now(); agent.raiseEvent(qmf::org::apache::qpid::broker::EventQueueThresholdExceeded(name, count, size)); QPID_LOG(info, "Threshold event triggered for " << name << ", count=" << count << ", size=" << size); } } } void ThresholdAlerts::dequeued(const QueuedMessage& m) { size -= m.payload->contentSize(); --count; if ((countThreshold && count < countThreshold) || (sizeThreshold && size < sizeThreshold)) { lastAlert = qpid::sys::EPOCH; } } void ThresholdAlerts::observe(Queue& queue, qpid::management::ManagementAgent& agent, const uint64_t countThreshold, const uint64_t sizeThreshold, const long repeatInterval) { if (countThreshold || sizeThreshold) { boost::shared_ptr observer( new ThresholdAlerts(queue.getName(), agent, countThreshold, sizeThreshold, repeatInterval) ); queue.addObserver(observer); } } void ThresholdAlerts::observe(Queue& queue, qpid::management::ManagementAgent& agent, const qpid::framing::FieldTable& settings, uint16_t limitRatio) { qpid::types::Variant::Map map; qpid::amqp_0_10::translate(settings, map); observe(queue, agent, map, limitRatio); } template class Option { public: Option(const std::string& name, T d) : defaultValue(d) { names.push_back(name); } void addAlias(const std::string& name) { names.push_back(name); } T get(const qpid::types::Variant::Map& settings) const { T value(defaultValue); for (std::vector::const_iterator i = names.begin(); i != names.end(); ++i) { if (get(settings, *i, value)) break; } return value; } private: std::vector names; T defaultValue; bool get(const qpid::types::Variant::Map& settings, const std::string& name, T& value) const { qpid::types::Variant::Map::const_iterator i = settings.find(name); if (i != settings.end()) { try { value = (T) i->second; } catch (const qpid::types::InvalidConversion&) { QPID_LOG(warning, "Bad value for" << name << ": " << i->second); } return true; } else { return false; } } }; void ThresholdAlerts::observe(Queue& queue, qpid::management::ManagementAgent& agent, const qpid::types::Variant::Map& settings, uint16_t limitRatio) { //Note: aliases are keys defined by java broker Option repeatInterval("qpid.alert_repeat_gap", 60); repeatInterval.addAlias("x-qpid-minimum-alert-repeat-gap"); //If no explicit threshold settings were given use specified //percentage of any limit from the policy. const QueuePolicy* policy = queue.getPolicy(); Option countThreshold("qpid.alert_count", (uint32_t) (policy && limitRatio ? (policy->getMaxCount()*limitRatio/100) : 0)); countThreshold.addAlias("x-qpid-maximum-message-count"); Option sizeThreshold("qpid.alert_size", (uint64_t) (policy && limitRatio ? (policy->getMaxSize()*limitRatio/100) : 0)); sizeThreshold.addAlias("x-qpid-maximum-message-size"); observe(queue, agent, countThreshold.get(settings), sizeThreshold.get(settings), repeatInterval.get(settings)); } }} qpidc-0.16/src/qpid/broker/System.cpp0000664000076400007640000000526411364405132020142 0ustar00jrossjross00000000000000// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/broker/System.h" #include "qpid/broker/Broker.h" #include "qpid/management/ManagementAgent.h" #include "qpid/framing/Uuid.h" #include "qpid/sys/SystemInfo.h" #include "qpid/types/Uuid.h" #include #include using qpid::management::ManagementAgent; using namespace qpid::broker; using namespace std; namespace _qmf = qmf::org::apache::qpid::broker; System::System (string _dataDir, Broker* broker) : mgmtObject(0) { ManagementAgent* agent = broker ? broker->getManagementAgent() : 0; if (agent != 0) { framing::Uuid systemId; if (_dataDir.empty ()) { systemId.generate (); } else { string filename (_dataDir + "/systemId"); ifstream inFile (filename.c_str ()); if (inFile.good ()) { inFile >> systemId; inFile.close (); } else { systemId.generate (); ofstream outFile (filename.c_str ()); if (outFile.good ()) { outFile << systemId << endl; outFile.close (); } } } mgmtObject = new _qmf::System(agent, this, types::Uuid(systemId.c_array())); std::string sysname, nodename, release, version, machine; qpid::sys::SystemInfo::getSystemId (sysname, nodename, release, version, machine); mgmtObject->set_osName (sysname); mgmtObject->set_nodeName (nodename); mgmtObject->set_release (release); mgmtObject->set_version (version); mgmtObject->set_machine (machine); agent->addObject(mgmtObject, 0, true); } } qpidc-0.16/src/qpid/broker/MessageStoreModule.h0000664000076400007640000000651611301536126022072 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _MessageStoreModule_ #define _MessageStoreModule_ #include "qpid/broker/MessageStore.h" #include "qpid/broker/Queue.h" #include "qpid/broker/RecoveryManager.h" #include #include namespace qpid { namespace broker { /** * A null implementation of the MessageStore interface */ class MessageStoreModule : public MessageStore { boost::shared_ptr store; public: MessageStoreModule(boost::shared_ptr& store); bool init(const Options* options); void truncateInit(const bool pushDownStoreFiles = false); std::auto_ptr begin(); std::auto_ptr begin(const std::string& xid); void prepare(TPCTransactionContext& txn); void commit(TransactionContext& txn); void abort(TransactionContext& txn); void collectPreparedXids(std::set& xids); void create(PersistableQueue& queue, const framing::FieldTable& args); void destroy(PersistableQueue& queue); void create(const PersistableExchange& exchange, const framing::FieldTable& args); void destroy(const PersistableExchange& exchange); void bind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const framing::FieldTable& args); void unbind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const framing::FieldTable& args); void create(const PersistableConfig& config); void destroy(const PersistableConfig& config); void recover(RecoveryManager& queues); void stage(const boost::intrusive_ptr& msg); void destroy(PersistableMessage& msg); void appendContent(const boost::intrusive_ptr& msg, const std::string& data); void loadContent(const qpid::broker::PersistableQueue& queue, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length); void enqueue(TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue); void dequeue(TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue); uint32_t outstandingQueueAIO(const PersistableQueue& queue); void flush(const qpid::broker::PersistableQueue& queue); bool isNull() const; ~MessageStoreModule(); }; } } #endif qpidc-0.16/src/qpid/broker/QueuePolicy.h0000664000076400007640000001113111715033215020554 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QueuePolicy_ #define _QueuePolicy_ #include #include #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/QueuedMessage.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/AtomicValue.h" #include "qpid/sys/Mutex.h" namespace qpid { namespace broker { class Queue; class QueuePolicy { static uint64_t defaultMaxSize; uint32_t maxCount; uint64_t maxSize; const std::string type; uint32_t count; uint64_t size; bool policyExceeded; protected: Queue* queue; uint64_t getCurrentQueueSize() const { return size; } public: typedef std::deque Messages; static QPID_BROKER_EXTERN const std::string maxCountKey; static QPID_BROKER_EXTERN const std::string maxSizeKey; static QPID_BROKER_EXTERN const std::string typeKey; static QPID_BROKER_EXTERN const std::string REJECT; static QPID_BROKER_EXTERN const std::string FLOW_TO_DISK; static QPID_BROKER_EXTERN const std::string RING; static QPID_BROKER_EXTERN const std::string RING_STRICT; virtual ~QueuePolicy() {} QPID_BROKER_EXTERN void tryEnqueue(boost::intrusive_ptr msg); QPID_BROKER_EXTERN void recoverEnqueued(boost::intrusive_ptr msg); QPID_BROKER_EXTERN void enqueueAborted(boost::intrusive_ptr msg); virtual void enqueued(const QueuedMessage&); virtual void dequeued(const QueuedMessage&); virtual bool isEnqueued(const QueuedMessage&); QPID_BROKER_EXTERN void update(qpid::framing::FieldTable& settings); uint32_t getMaxCount() const { return maxCount; } uint64_t getMaxSize() const { return maxSize; } void encode(framing::Buffer& buffer) const; void decode ( framing::Buffer& buffer ); uint32_t encodedSize() const; virtual void getPendingDequeues(Messages& result); std::string getType() const { return type; } void setQueue(Queue* q) { queue = q; } static QPID_BROKER_EXTERN std::auto_ptr createQueuePolicy(const std::string& name, const qpid::framing::FieldTable& settings); static QPID_BROKER_EXTERN std::auto_ptr createQueuePolicy(const std::string& name, uint32_t maxCount, uint64_t maxSize, const std::string& type = REJECT); static QPID_BROKER_EXTERN std::auto_ptr createQueuePolicy(const qpid::framing::FieldTable& settings); static QPID_BROKER_EXTERN std::auto_ptr createQueuePolicy(uint32_t maxCount, uint64_t maxSize, const std::string& type = REJECT); static std::string getType(const qpid::framing::FieldTable& settings); static void setDefaultMaxSize(uint64_t); friend QPID_BROKER_EXTERN std::ostream& operator<<(std::ostream&, const QueuePolicy&); protected: const std::string name; QueuePolicy(const std::string& name, uint32_t maxCount, uint64_t maxSize, const std::string& type = REJECT); virtual bool checkLimit(boost::intrusive_ptr msg); void enqueued(uint64_t size); void dequeued(uint64_t size); }; class FlowToDiskPolicy : public QueuePolicy { public: FlowToDiskPolicy(const std::string& name, uint32_t maxCount, uint64_t maxSize); bool checkLimit(boost::intrusive_ptr msg); }; class RingQueuePolicy : public QueuePolicy { public: RingQueuePolicy(const std::string& name, uint32_t maxCount, uint64_t maxSize, const std::string& type = RING); void enqueued(const QueuedMessage&); void dequeued(const QueuedMessage&); bool isEnqueued(const QueuedMessage&); bool checkLimit(boost::intrusive_ptr msg); void getPendingDequeues(Messages& result); private: Messages pendingDequeues; Messages queue; const bool strict; bool find(const QueuedMessage&, Messages&, bool remove); }; }} #endif qpidc-0.16/src/qpid/broker/DtxWorkRecord.h0000664000076400007640000000571411625531570021072 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _DtxWorkRecord_ #define _DtxWorkRecord_ #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/DtxBuffer.h" #include "qpid/broker/DtxTimeout.h" #include "qpid/broker/TransactionalStore.h" #include "qpid/framing/amqp_types.h" #include "qpid/sys/Mutex.h" #include #include #include #include namespace qpid { namespace broker { /** * Represents the work done under a particular distributed transaction * across potentially multiple channels. Identified by a xid. Allows * that work to be prepared, committed and rolled-back. */ class DtxWorkRecord { typedef std::vector Work; const std::string xid; TransactionalStore* const store; bool completed; bool rolledback; bool prepared; bool expired; boost::intrusive_ptr timeout; Work work; std::auto_ptr txn; qpid::sys::Mutex lock; bool check(); void abort(); bool prepare(TransactionContext* txn); public: QPID_BROKER_EXTERN DtxWorkRecord(const std::string& xid, TransactionalStore* const store); QPID_BROKER_EXTERN ~DtxWorkRecord(); QPID_BROKER_EXTERN bool prepare(); QPID_BROKER_EXTERN bool commit(bool onePhase); QPID_BROKER_EXTERN void rollback(); QPID_BROKER_EXTERN void add(DtxBuffer::shared_ptr ops); void recover(std::auto_ptr txn, DtxBuffer::shared_ptr ops); void timedout(); void setTimeout(boost::intrusive_ptr t) { timeout = t; } boost::intrusive_ptr getTimeout() { return timeout; } std::string getXid() const { return xid; } bool isCompleted() const { return completed; } bool isRolledback() const { return rolledback; } bool isPrepared() const { return prepared; } bool isExpired() const { return expired; } // Used by cluster update; size_t size() const { return work.size(); } DtxBuffer::shared_ptr operator[](size_t i) const; uint32_t getTimeout() const { return timeout? timeout->timeout : 0; } size_t indexOf(const DtxBuffer::shared_ptr&); }; }} // qpid::broker #endif qpidc-0.16/src/qpid/broker/TopicExchange.cpp0000664000076400007640000005232011725210040021363 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/TopicExchange.h" #include "qpid/broker/FedOps.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace broker { using namespace qpid::framing; using namespace qpid::sys; using namespace std; namespace _qmf = qmf::org::apache::qpid::broker; // TODO aconway 2006-09-20: More efficient matching algorithm. // Areas for improvement: // - excessive string copying: should be 0 copy, match from original buffer. // - match/lookup: use descision tree or other more efficient structure. namespace { const std::string STAR("*"); const std::string HASH("#"); } // iterator for federation ReOrigin bind operation class TopicExchange::ReOriginIter : public TopicExchange::BindingNode::TreeIterator { public: ReOriginIter() {}; ~ReOriginIter() {}; bool visit(BindingNode& node) { if (node.bindings.fedBinding.hasLocal()) { keys2prop.push_back(node.routePattern); } return true; } std::vector keys2prop; }; // match iterator used by route(): builds BindingList of all unique queues // that match the routing key. class TopicExchange::BindingsFinderIter : public TopicExchange::BindingNode::TreeIterator { public: BindingsFinderIter(BindingList &bl) : b(bl) {}; ~BindingsFinderIter() {}; BindingList& b; std::set qSet; bool visit(BindingNode& node) { Binding::vector& qv(node.bindings.bindingVector); for (Binding::vector::iterator j = qv.begin(); j != qv.end(); j++) { // do not duplicate queues on the binding list if (qSet.insert(j->get()->queue->getName()).second) { b->push_back(*j); } } return true; } }; // Iterator to visit all bindings until a given queue is found class TopicExchange::QueueFinderIter : public TopicExchange::BindingNode::TreeIterator { public: QueueFinderIter(Queue::shared_ptr queue) : queue(queue), found(false) {}; ~QueueFinderIter() {}; bool visit(BindingNode& node) { Binding::vector& qv(node.bindings.bindingVector); Binding::vector::iterator q; for (q = qv.begin(); q != qv.end(); q++) { if ((*q)->queue == queue) { found = true; return false; // search done } } return true; // continue search } Queue::shared_ptr queue; bool found; }; // Iterate over a string of '.'-separated tokens. struct TopicExchange::TokenIterator { typedef pair Token; TokenIterator(const char* b, const char* e) : end(e), token(make_pair(b, find(b,e,'.'))) {} TokenIterator(const string& key) : end(&key[0]+key.size()), token(make_pair(&key[0], find(&key[0],end,'.'))) {} bool finished() const { return !token.first; } void next() { if (token.second == end) token.first = token.second = 0; else { token.first=token.second+1; token.second=(find(token.first, end, '.')); } } void pop(string &top) { ptrdiff_t l = len(); if (l) { top.assign(token.first, l); } else top.clear(); next(); } bool match1(char c) const { return token.second==token.first+1 && *token.first == c; } bool match(const Token& token2) const { ptrdiff_t l=len(); return l == token2.second-token2.first && strncmp(token.first, token2.first, l) == 0; } bool match(const string& str) const { ptrdiff_t l=len(); return l == ptrdiff_t(str.size()) && str.compare(0, l, token.first, l) == 0; } ptrdiff_t len() const { return token.second - token.first; } const char* end; Token token; }; class TopicExchange::Normalizer : public TopicExchange::TokenIterator { public: Normalizer(string& p) : TokenIterator(&p[0], &p[0]+p.size()), pattern(p) { normalize(); } private: // Apply 2 transformations: #.* -> *.# and #.# -> # void normalize() { while (!finished()) { if (match1('#')) { const char* hash1=token.first; next(); if (!finished()) { if (match1('#')) { // Erase #.# -> # pattern.erase(hash1-pattern.data(), 2); token.first -= 2; token.second -= 2; end -= 2; } else if (match1('*')) { // Swap #.* -> *.# swap(*const_cast(hash1), *const_cast(token.first)); } } } else next(); } } string& pattern; }; // Convert sequences of * and # to a sequence of * followed by a single # string TopicExchange::normalize(const string& pattern) { string normal(pattern); Normalizer n(normal); return normal; } TopicExchange::TopicExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange(_name, _parent, b), nBindings(0) { if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } TopicExchange::TopicExchange(const std::string& _name, bool _durable, const FieldTable& _args, Manageable* _parent, Broker* b) : Exchange(_name, _durable, _args, _parent, b), nBindings(0) { if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } bool TopicExchange::bind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* args) { ClearCache cc(&cacheLock,&bindingCache); // clear the cache on function exit. string fedOp(args ? args->getAsString(qpidFedOp) : fedOpBind); string fedTags(args ? args->getAsString(qpidFedTags) : ""); string fedOrigin(args ? args->getAsString(qpidFedOrigin) : ""); bool propagate = false; string routingPattern = normalize(routingKey); if (args == 0 || fedOp.empty() || fedOp == fedOpBind) { RWlock::ScopedWlock l(lock); BindingKey *bk = bindingTree.addBindingKey(routingPattern); if (bk) { Binding::vector& qv(bk->bindingVector); Binding::vector::iterator q; for (q = qv.begin(); q != qv.end(); q++) { if ((*q)->queue == queue) { // already bound, but may be from a different fedOrigin bk->fedBinding.addOrigin(queue->getName(), fedOrigin); return false; } } Binding::shared_ptr binding (new Binding (routingPattern, queue, this, FieldTable(), fedOrigin)); binding->startManagement(); bk->bindingVector.push_back(binding); nBindings++; propagate = bk->fedBinding.addOrigin(queue->getName(), fedOrigin); if (mgmtExchange != 0) { mgmtExchange->inc_bindingCount(); } QPID_LOG(debug, "Binding key [" << routingPattern << "] to queue " << queue->getName() << " on exchange " << getName() << " (origin=" << fedOrigin << ")"); } } else if (fedOp == fedOpUnbind) { RWlock::ScopedWlock l(lock); BindingKey* bk = getQueueBinding(queue, routingPattern); if (bk) { QPID_LOG(debug, "FedOpUnbind [" << routingPattern << "] from exchange " << getName() << " on queue=" << queue->getName() << " origin=" << fedOrigin); propagate = bk->fedBinding.delOrigin(queue->getName(), fedOrigin); // if this was the last binding for the queue, delete the binding if (bk->fedBinding.countFedBindings(queue->getName()) == 0) { deleteBinding(queue, routingPattern, bk); } } } else if (fedOp == fedOpReorigin) { /** gather up all the keys that need rebinding in a local vector * while holding the lock. Then propagate once the lock is * released */ ReOriginIter reOriginIter; { RWlock::ScopedRlock l(lock); bindingTree.iterateAll( reOriginIter ); } /* lock dropped */ for (std::vector::const_iterator key = reOriginIter.keys2prop.begin(); key != reOriginIter.keys2prop.end(); key++) { propagateFedOp( *key, string(), fedOpBind, string()); } } cc.clearCache(); // clear the cache before we IVE route. routeIVE(); if (propagate) propagateFedOp(routingKey, fedTags, fedOp, fedOrigin); return true; } bool TopicExchange::unbind(Queue::shared_ptr queue, const string& constRoutingKey, const FieldTable* args) { string fedOrigin(args ? args->getAsString(qpidFedOrigin) : ""); QPID_LOG(debug, "Unbinding key [" << constRoutingKey << "] from queue " << queue->getName() << " on exchange " << getName() << " origin=" << fedOrigin << ")" ); ClearCache cc(&cacheLock,&bindingCache); // clear the cache on function exit. RWlock::ScopedWlock l(lock); string routingKey = normalize(constRoutingKey); BindingKey* bk = getQueueBinding(queue, routingKey); if (!bk) return false; bool propagate = bk->fedBinding.delOrigin(queue->getName(), fedOrigin); deleteBinding(queue, routingKey, bk); if (propagate) propagateFedOp(routingKey, string(), fedOpUnbind, string()); return true; } bool TopicExchange::deleteBinding(Queue::shared_ptr queue, const std::string& routingKey, BindingKey *bk) { // Note well: write lock held by caller Binding::vector& qv(bk->bindingVector); Binding::vector::iterator q; for (q = qv.begin(); q != qv.end(); q++) if ((*q)->queue == queue) break; if(q == qv.end()) return false; qv.erase(q); assert(nBindings > 0); nBindings--; if(qv.empty()) { bindingTree.removeBindingKey(routingKey); } if (mgmtExchange != 0) { mgmtExchange->dec_bindingCount(); } QPID_LOG(debug, "Unbound key [" << routingKey << "] from queue " << queue->getName() << " on exchange " << getName()); return true; } /** returns a pointer to the BindingKey if the given queue is bound to this * exchange using the routing pattern. 0 if queue binding does not exist. */ TopicExchange::BindingKey *TopicExchange::getQueueBinding(Queue::shared_ptr queue, const string& pattern) { // Note well: lock held by caller.... BindingKey *bk = bindingTree.getBindingKey(pattern); // Exact match against binding pattern if (!bk) return 0; Binding::vector& qv(bk->bindingVector); Binding::vector::iterator q; for (q = qv.begin(); q != qv.end(); q++) if ((*q)->queue == queue) break; return (q != qv.end()) ? bk : 0; } void TopicExchange::route(Deliverable& msg) { const string& routingKey = msg.getMessage().getRoutingKey(); // Note: PERFORMANCE CRITICAL!!! BindingList b; std::map::iterator it; { // only lock the cache for read RWlock::ScopedRlock cl(cacheLock); it = bindingCache.find(routingKey); if (it != bindingCache.end()) { b = it->second; } } PreRoute pr(msg, this); if (!b.get()) // no cache hit { RWlock::ScopedRlock l(lock); b = BindingList(new std::vector >); BindingsFinderIter bindingsFinder(b); bindingTree.iterateMatch(routingKey, bindingsFinder); RWlock::ScopedWlock cwl(cacheLock); bindingCache[routingKey] = b; // update cache } doRoute(msg, b); } bool TopicExchange::isBound(Queue::shared_ptr queue, const string* const routingKey, const FieldTable* const) { RWlock::ScopedRlock l(lock); if (routingKey && queue) { string key(normalize(*routingKey)); return getQueueBinding(queue, key) != 0; } else if (!routingKey && !queue) { return nBindings > 0; } else if (routingKey) { if (bindingTree.getBindingKey(*routingKey)) { return true; } } else { QueueFinderIter queueFinder(queue); bindingTree.iterateAll( queueFinder ); return queueFinder.found; } return false; } TopicExchange::~TopicExchange() {} const std::string TopicExchange::typeName("topic"); // // class BindingNode // TopicExchange::BindingNode::~BindingNode() { childTokens.clear(); } // Add a binding pattern to the tree. Return a pointer to the binding key // of the node that matches the binding pattern. TopicExchange::BindingKey* TopicExchange::BindingNode::addBindingKey(const std::string& normalizedRoute) { TokenIterator bKey(normalizedRoute); return addBindingKey(bKey, normalizedRoute); } // Return a pointer to the binding key of the leaf node that matches the binding pattern. TopicExchange::BindingKey* TopicExchange::BindingNode::getBindingKey(const std::string& normalizedRoute) { TokenIterator bKey(normalizedRoute); return getBindingKey(bKey); } // Delete the binding associated with the given route. void TopicExchange::BindingNode::removeBindingKey(const std::string& normalizedRoute) { TokenIterator bKey2(normalizedRoute); removeBindingKey(bKey2, normalizedRoute); } // visit each node in the tree. Note: all nodes are visited, // even non-leaf nodes (i.e. nodes without any bindings) bool TopicExchange::BindingNode::iterateAll(TopicExchange::BindingNode::TreeIterator& iter) { if (!iter.visit(*this)) return false; if (starChild && !starChild->iterateAll(iter)) return false; if (hashChild && !hashChild->iterateAll(iter)) return false; for (ChildMap::iterator ptr = childTokens.begin(); ptr != childTokens.end(); ptr++) { if (!ptr->second->iterateAll(iter)) return false; } return true; } // applies iter against only matching nodes until iter returns false // Note Well: the iter may match against the same node more than once // if # wildcards are present! bool TopicExchange::BindingNode::iterateMatch(const std::string& routingKey, TreeIterator& iter) { TopicExchange::TokenIterator rKey(routingKey); return iterateMatch( rKey, iter ); } // recurse over binding using token iterator. // Note well: bkey is modified! TopicExchange::BindingKey* TopicExchange::BindingNode::addBindingKey(TokenIterator &bKey, const string& fullPattern) { if (bKey.finished()) { // this node's binding if (routePattern.empty()) { routePattern = fullPattern; } else assert(routePattern == fullPattern); return &bindings; } else { // pop the topmost token & recurse... if (bKey.match(STAR)) { if (!starChild) { starChild.reset(new StarNode()); } bKey.next(); return starChild->addBindingKey(bKey, fullPattern); } else if (bKey.match(HASH)) { if (!hashChild) { hashChild.reset(new HashNode()); } bKey.next(); return hashChild->addBindingKey(bKey, fullPattern); } else { ChildMap::iterator ptr; std::string next_token; bKey.pop(next_token); ptr = childTokens.find(next_token); if (ptr != childTokens.end()) { return ptr->second->addBindingKey(bKey, fullPattern); } else { BindingNode::shared_ptr child(new BindingNode(next_token)); childTokens[next_token] = child; return child->addBindingKey(bKey, fullPattern); } } } } // Remove a binding pattern from the tree. Return true if the current // node becomes a leaf without any bindings (therefore can be deleted). // Note Well: modifies parameter bKey's value! bool TopicExchange::BindingNode::removeBindingKey(TokenIterator &bKey, const string& fullPattern) { bool remove; if (!bKey.finished()) { if (bKey.match(STAR)) { bKey.next(); if (starChild) { remove = starChild->removeBindingKey(bKey, fullPattern); if (remove) { starChild.reset(); } } } else if (bKey.match(HASH)) { bKey.next(); if (hashChild) { remove = hashChild->removeBindingKey(bKey, fullPattern); if (remove) { hashChild.reset(); } } } else { ChildMap::iterator ptr; std::string next_token; bKey.pop(next_token); ptr = childTokens.find(next_token); if (ptr != childTokens.end()) { remove = ptr->second->removeBindingKey(bKey, fullPattern); if (remove) { childTokens.erase(ptr); } } } } // no bindings and no children == parent can delete this node. return getChildCount() == 0 && bindings.bindingVector.empty(); } // find the binding key that matches the given binding pattern. // Note Well: modifies key parameter! TopicExchange::BindingKey* TopicExchange::BindingNode::getBindingKey(TokenIterator &key) { if (key.finished()) { return &bindings; } string next_token; key.pop(next_token); if (next_token == STAR) { if (starChild) return starChild->getBindingKey(key); } else if (next_token == HASH) { if (hashChild) return hashChild->getBindingKey(key); } else { ChildMap::iterator ptr; ptr = childTokens.find(next_token); if (ptr != childTokens.end()) { return ptr->second->getBindingKey(key); } } return 0; } // iterate over all nodes that match the given key. Note well: the set of nodes // that are visited includes matching non-leaf nodes. // Note well: parameter key is modified! bool TopicExchange::BindingNode::iterateMatch(TokenIterator& key, TreeIterator& iter) { // invariant: key has matched all previous tokens up to this node. if (key.finished()) { // exact match this node: visit if bound if (!bindings.bindingVector.empty()) if (!iter.visit(*this)) return false; } // check remaining key against children, even if empty. return iterateMatchChildren(key, iter); } TopicExchange::StarNode::StarNode() : BindingNode(STAR) {} // See iterateMatch() above. // Special case: this node must verify a token is available (match exactly one). bool TopicExchange::StarNode::iterateMatch(TokenIterator& key, TreeIterator& iter) { // must match one token: if (key.finished()) return true; // match failed, but continue iteration on siblings // pop the topmost token key.next(); if (key.finished()) { // exact match this node: visit if bound if (!bindings.bindingVector.empty()) if (!iter.visit(*this)) return false; } return iterateMatchChildren(key, iter); } TopicExchange::HashNode::HashNode() : BindingNode(HASH) {} // See iterateMatch() above. // Special case: can match zero or more tokens at the head of the key. bool TopicExchange::HashNode::iterateMatch(TokenIterator& key, TreeIterator& iter) { // consume each token and look for a match on the // remaining key. while (!key.finished()) { if (!iterateMatchChildren(key, iter)) return false; key.next(); } if (!bindings.bindingVector.empty()) return iter.visit(*this); return true; } // helper: iterate over current node's matching children bool TopicExchange::BindingNode::iterateMatchChildren(const TopicExchange::TokenIterator& key, TopicExchange::BindingNode::TreeIterator& iter) { // always try glob - it can match empty keys if (hashChild) { TokenIterator tmp(key); if (!hashChild->iterateMatch(tmp, iter)) return false; } if (!key.finished()) { if (starChild) { TokenIterator tmp(key); if (!starChild->iterateMatch(tmp, iter)) return false; } if (!childTokens.empty()) { TokenIterator newKey(key); std::string next_token; newKey.pop(next_token); ChildMap::iterator ptr = childTokens.find(next_token); if (ptr != childTokens.end()) { return ptr->second->iterateMatch(newKey, iter); } } } return true; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/PriorityQueue.h0000664000076400007640000000452511717465066021166 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_PRIORITYQUEUE_H #define QPID_BROKER_PRIORITYQUEUE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Messages.h" #include "qpid/sys/IntegerTypes.h" #include #include namespace qpid { namespace broker { /** * Basic priority queue with a configurable number of recognised * priority levels. This is implemented as a separate deque per * priority level. Browsing is FIFO not priority order. */ class PriorityQueue : public Messages { public: PriorityQueue(int levels); virtual ~PriorityQueue() {} size_t size(); bool deleted(const QueuedMessage&); void release(const QueuedMessage&); bool acquire(const framing::SequenceNumber&, QueuedMessage&); bool find(const framing::SequenceNumber&, QueuedMessage&); bool browse(const framing::SequenceNumber&, QueuedMessage&, bool); bool consume(QueuedMessage&); bool push(const QueuedMessage& added, QueuedMessage& removed); void foreach(Functor); void removeIf(Predicate); static uint getPriority(const QueuedMessage&); protected: typedef std::deque Deque; typedef std::vector PriorityLevels; virtual bool findFrontLevel(uint& p, PriorityLevels&); const int levels; private: PriorityLevels messages; uint frontLevel; bool haveFront; bool cached; bool find(const framing::SequenceNumber&, QueuedMessage&, bool remove); uint getPriorityLevel(const QueuedMessage&) const; void clearCache(); bool checkFront(); }; }} // namespace qpid::broker #endif /*!QPID_BROKER_PRIORITYQUEUE_H*/ qpidc-0.16/src/qpid/broker/ExpiryPolicy.h0000664000076400007640000000257511576211367020777 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_EXPIRYPOLICY_H #define QPID_BROKER_EXPIRYPOLICY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qpid/broker/BrokerImportExport.h" namespace qpid { namespace sys { class AbsTime; } namespace broker { class Message; /** * Default expiry policy. */ class QPID_BROKER_CLASS_EXTERN ExpiryPolicy : public RefCounted { public: QPID_BROKER_EXTERN virtual ~ExpiryPolicy(); QPID_BROKER_EXTERN virtual bool hasExpired(Message&); QPID_BROKER_EXTERN virtual qpid::sys::AbsTime getCurrentTime(); }; }} // namespace qpid::broker #endif /*!QPID_BROKER_EXPIRYPOLICY_H*/ qpidc-0.16/src/qpid/broker/Deliverable.h0000664000076400007640000000242611455656100020542 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _Deliverable_ #define _Deliverable_ #include "qpid/broker/Message.h" namespace qpid { namespace broker { class Deliverable{ public: bool delivered; Deliverable() : delivered(false) {} virtual Message& getMessage() = 0; virtual void deliverTo(const boost::shared_ptr& queue) = 0; virtual uint64_t contentSize() { return 0; } virtual ~Deliverable(){} }; } } #endif qpidc-0.16/src/qpid/broker/LegacyLVQ.cpp0000664000076400007640000000777311717465066020472 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/LegacyLVQ.h" #include "qpid/broker/Broker.h" #include "qpid/broker/QueuedMessage.h" namespace qpid { namespace broker { LegacyLVQ::LegacyLVQ(const std::string& k, bool b, Broker* br) : MessageMap(k), noBrowse(b), broker(br) {} void LegacyLVQ::setNoBrowse(bool b) { noBrowse = b; } bool LegacyLVQ::acquire(const framing::SequenceNumber& position, QueuedMessage& message) { Ordering::iterator i = messages.find(position); if (i != messages.end() && i->second.payload == message.payload) { message = i->second; erase(i); return true; } else { return false; } } bool LegacyLVQ::browse(const framing::SequenceNumber& position, QueuedMessage& message, bool unacquired) { if (MessageMap::browse(position, message, unacquired)) { if (!noBrowse) index.erase(getKey(message)); return true; } else { return false; } } bool LegacyLVQ::push(const QueuedMessage& added, QueuedMessage& removed) { //Hack to disable LVQ behaviour on cluster update: if (broker && broker->isClusterUpdatee()) { messages[added.position] = added; return false; } else { return MessageMap::push(added, removed); } } const QueuedMessage& LegacyLVQ::replace(const QueuedMessage& original, const QueuedMessage& update) { //add the new message into the original position of the replaced message Ordering::iterator i = messages.find(original.position); i->second = update; i->second.position = original.position; return i->second; } void LegacyLVQ::removeIf(Predicate p) { //Note: This method is currently called periodically on the timer //thread to expire messages. In a clustered broker this means that //the purging does not occur on the cluster event dispatch thread //and consequently that is not totally ordered w.r.t other events //(including publication of messages). The cluster does ensure //that the actual expiration of messages (as distinct from the //removing of those expired messages from the queue) *is* //consistently ordered w.r.t. cluster events. This means that //delivery of messages is in general consistent across the cluster //inspite of any non-determinism in the triggering of a //purge. However at present purging a last value queue (of the //legacy sort) could potentially cause inconsistencies in the //cluster (as the order w.r.t publications can affect the order in //which messages appear in the queue). Consequently periodic //purging of an LVQ is not enabled if the broker is clustered //(expired messages will be removed on delivery and consolidated //by key as part of normal LVQ operation). if (!broker || !broker->isInCluster()) MessageMap::removeIf(p); } std::auto_ptr LegacyLVQ::updateOrReplace(std::auto_ptr current, const std::string& key, bool noBrowse, Broker* broker) { LegacyLVQ* lvq = dynamic_cast(current.get()); if (lvq) { lvq->setNoBrowse(noBrowse); return current; } else { return std::auto_ptr(new LegacyLVQ(key, noBrowse, broker)); } } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/Connection.cpp0000664000076400007640000003354611724231320020755 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Connection.h" #include "qpid/broker/ConnectionObserver.h" #include "qpid/broker/SessionOutputException.h" #include "qpid/broker/SessionState.h" #include "qpid/broker/Bridge.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Queue.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/sys/ClusterSafe.h" #include "qpid/log/Statement.h" #include "qpid/ptr_map.h" #include "qpid/framing/AMQP_ClientProxy.h" #include "qpid/framing/enum.h" #include "qpid/framing/MessageTransferBody.h" #include "qmf/org/apache/qpid/broker/EventClientConnect.h" #include "qmf/org/apache/qpid/broker/EventClientDisconnect.h" #include #include #include #include #include using namespace qpid::sys; using namespace qpid::framing; using qpid::ptr_map_ptr; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; using qpid::management::Args; namespace _qmf = qmf::org::apache::qpid::broker; namespace qpid { namespace broker { struct ConnectionTimeoutTask : public sys::TimerTask { sys::Timer& timer; Connection& connection; ConnectionTimeoutTask(uint16_t hb, sys::Timer& t, Connection& c) : TimerTask(Duration(hb*2*TIME_SEC),"ConnectionTimeout"), timer(t), connection(c) {} void touch() { restart(); } void fire() { // If we get here then we've not received any traffic in the timeout period // Schedule closing the connection for the io thread QPID_LOG(error, "Connection " << connection.getMgmtId() << " timed out: closing"); connection.abort(); } }; Connection::Connection(ConnectionOutputHandler* out_, Broker& broker_, const std::string& mgmtId_, const qpid::sys::SecuritySettings& external, bool link_, uint64_t objectId_, bool shadow_, bool delayManagement) : ConnectionState(out_, broker_), securitySettings(external), adapter(*this, link_, shadow_), link(link_), mgmtClosing(false), mgmtId(mgmtId_), mgmtObject(0), links(broker_.getLinks()), agent(0), timer(broker_.getTimer()), errorListener(0), objectId(objectId_), shadow(shadow_), outboundTracker(*this) { outboundTracker.wrap(out); broker.getConnectionObservers().connection(*this); // In a cluster, allow adding the management object to be delayed. if (!delayManagement) addManagementObject(); if (!isShadow()) broker.getConnectionCounter().inc_connectionCount(); } void Connection::addManagementObject() { assert(agent == 0); assert(mgmtObject == 0); Manageable* parent = broker.GetVhostObject(); if (parent != 0) { agent = broker.getManagementAgent(); if (agent != 0) { // TODO set last bool true if system connection mgmtObject = new _qmf::Connection(agent, this, parent, mgmtId, !link, false); mgmtObject->set_shadow(shadow); agent->addObject(mgmtObject, objectId); } ConnectionState::setUrl(mgmtId); } } void Connection::requestIOProcessing(boost::function0 callback) { ScopedLock l(ioCallbackLock); ioCallbacks.push(callback); if (isOpen()) out.activateOutput(); } Connection::~Connection() { if (mgmtObject != 0) { mgmtObject->resourceDestroy(); // In a cluster, Connections destroyed during shutdown are in // a cluster-unsafe context. Don't raise an event in that case. if (!link && isClusterSafe()) agent->raiseEvent(_qmf::EventClientDisconnect(mgmtId, ConnectionState::getUserId())); } broker.getConnectionObservers().closed(*this); if (heartbeatTimer) heartbeatTimer->cancel(); if (timeoutTimer) timeoutTimer->cancel(); if (!isShadow()) broker.getConnectionCounter().dec_connectionCount(); } void Connection::received(framing::AMQFrame& frame) { // Received frame on connection so delay timeout restartTimeout(); bool wasOpen = isOpen(); adapter.handle(frame); if (link) //i.e. we are acting as the client to another broker recordFromServer(frame); else recordFromClient(frame); if (!wasOpen && isOpen()) { doIoCallbacks(); // Do any callbacks registered before we opened. broker.getConnectionObservers().opened(*this); } } void Connection::sent(const framing::AMQFrame& frame) { if (link) //i.e. we are acting as the client to another broker recordFromClient(frame); else recordFromServer(frame); } bool isMessage(const AMQMethodBody* method) { return method && method->isA(); } void Connection::recordFromServer(const framing::AMQFrame& frame) { // Don't record management stats in cluster-unsafe contexts if (mgmtObject != 0 && isClusterSafe()) { qmf::org::apache::qpid::broker::Connection::PerThreadStats *cStats = mgmtObject->getStatistics(); cStats->framesToClient += 1; cStats->bytesToClient += frame.encodedSize(); if (isMessage(frame.getMethod())) { cStats->msgsToClient += 1; } mgmtObject->statisticsUpdated(); } } void Connection::recordFromClient(const framing::AMQFrame& frame) { // Don't record management stats in cluster-unsafe contexts if (mgmtObject != 0 && isClusterSafe()) { qmf::org::apache::qpid::broker::Connection::PerThreadStats *cStats = mgmtObject->getStatistics(); cStats->framesFromClient += 1; cStats->bytesFromClient += frame.encodedSize(); if (isMessage(frame.getMethod())) { cStats->msgsFromClient += 1; } mgmtObject->statisticsUpdated(); } } string Connection::getAuthMechanism() { if (!link) return string("ANONYMOUS"); return links.getAuthMechanism(mgmtId); } string Connection::getUsername ( ) { if (!link) return string("anonymous"); return links.getUsername(mgmtId); } string Connection::getPassword ( ) { if (!link) return string(""); return links.getPassword(mgmtId); } string Connection::getHost ( ) { if (!link) return string(""); return links.getHost(mgmtId); } uint16_t Connection::getPort ( ) { if (!link) return 0; return links.getPort(mgmtId); } string Connection::getAuthCredentials() { if (!link) return string(); if (mgmtObject != 0) { if (links.getAuthMechanism(mgmtId) == "ANONYMOUS") mgmtObject->set_authIdentity("anonymous"); else mgmtObject->set_authIdentity(links.getAuthIdentity(mgmtId)); } return links.getAuthCredentials(mgmtId); } void Connection::notifyConnectionForced(const string& text) { broker.getConnectionObservers().forced(*this, text); } void Connection::setUserId(const string& userId) { ConnectionState::setUserId(userId); // In a cluster, the cluster code will raise the connect event // when the connection is replicated to the cluster. if (!broker.isInCluster()) raiseConnectEvent(); } void Connection::raiseConnectEvent() { if (mgmtObject != 0) { mgmtObject->set_authIdentity(userId); agent->raiseEvent(_qmf::EventClientConnect(mgmtId, userId)); } } void Connection::setUserProxyAuth(bool b) { ConnectionState::setUserProxyAuth(b); if (mgmtObject != 0) mgmtObject->set_userProxyAuth(b); } void Connection::close(connection::CloseCode code, const string& text) { QPID_LOG_IF(error, code != connection::CLOSE_CODE_NORMAL, "Connection " << mgmtId << " closed by error: " << text << "(" << code << ")"); if (heartbeatTimer) heartbeatTimer->cancel(); if (timeoutTimer) timeoutTimer->cancel(); adapter.close(code, text); //make sure we delete dangling pointers from outputTasks before deleting sessions outputTasks.removeAll(); channels.clear(); getOutput().close(); } // Send a close to the client but keep the channels. Used by cluster. void Connection::sendClose() { if (heartbeatTimer) heartbeatTimer->cancel(); if (timeoutTimer) timeoutTimer->cancel(); adapter.close(connection::CLOSE_CODE_NORMAL, "OK"); getOutput().close(); } void Connection::idleOut(){} void Connection::idleIn(){} void Connection::closed(){ // Physically closed, suspend open sessions. if (heartbeatTimer) heartbeatTimer->cancel(); if (timeoutTimer) timeoutTimer->cancel(); try { while (!channels.empty()) ptr_map_ptr(channels.begin())->handleDetach(); } catch(std::exception& e) { QPID_LOG(error, QPID_MSG("While closing connection: " << e.what())); assert(0); } } void Connection::doIoCallbacks() { if (!isOpen()) return; // Don't process IO callbacks until we are open. ScopedLock l(ioCallbackLock); // Although IO callbacks execute in the connection thread context, they are // not cluster safe because they are queued for execution in non-IO threads. ClusterUnsafeScope cus; while (!ioCallbacks.empty()) { boost::function0 cb = ioCallbacks.front(); ioCallbacks.pop(); ScopedUnlock ul(ioCallbackLock); cb(); // Lend the IO thread for management processing } } bool Connection::doOutput() { try { doIoCallbacks(); if (mgmtClosing) { closed(); close(connection::CLOSE_CODE_CONNECTION_FORCED, "Closed by Management Request"); } else { //then do other output as needed: return outputTasks.doOutput(); } }catch(const SessionOutputException& e){ getChannel(e.channel).handleException(e); return true; }catch(ConnectionException& e){ close(e.code, e.getMessage()); }catch(std::exception& e){ close(connection::CLOSE_CODE_CONNECTION_FORCED, e.what()); } return false; } void Connection::sendHeartbeat() { adapter.heartbeat(); } void Connection::closeChannel(uint16_t id) { ChannelMap::iterator i = channels.find(id); if (i != channels.end()) channels.erase(i); } SessionHandler& Connection::getChannel(ChannelId id) { ChannelMap::iterator i=channels.find(id); if (i == channels.end()) { i = channels.insert(id, new SessionHandler(*this, id)).first; } return *ptr_map_ptr(i); } ManagementObject* Connection::GetManagementObject(void) const { return (ManagementObject*) mgmtObject; } Manageable::status_t Connection::ManagementMethod(uint32_t methodId, Args&, string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; QPID_LOG(debug, "Connection::ManagementMethod [id=" << methodId << "]"); switch (methodId) { case _qmf::Connection::METHOD_CLOSE : mgmtClosing = true; if (mgmtObject != 0) mgmtObject->set_closing(1); out.activateOutput(); status = Manageable::STATUS_OK; break; } return status; } void Connection::setSecureConnection(SecureConnection* s) { adapter.setSecureConnection(s); } struct ConnectionHeartbeatTask : public sys::TimerTask { sys::Timer& timer; Connection& connection; ConnectionHeartbeatTask(uint16_t hb, sys::Timer& t, Connection& c) : TimerTask(Duration(hb*TIME_SEC), "ConnectionHeartbeat"), timer(t), connection(c) {} void fire() { // Setup next firing setupNextFire(); timer.add(this); // Send Heartbeat connection.sendHeartbeat(); } }; void Connection::abort() { // Make sure that we don't try to send a heartbeat as we're // aborting the connection if (heartbeatTimer) heartbeatTimer->cancel(); out.abort(); } void Connection::setHeartbeatInterval(uint16_t heartbeat) { setHeartbeat(heartbeat); if (heartbeat > 0 && !isShadow()) { if (!heartbeatTimer) { heartbeatTimer = new ConnectionHeartbeatTask(heartbeat, timer, *this); timer.add(heartbeatTimer); } if (!timeoutTimer) { timeoutTimer = new ConnectionTimeoutTask(heartbeat, timer, *this); timer.add(timeoutTimer); } } } void Connection::restartTimeout() { if (timeoutTimer) timeoutTimer->touch(); } bool Connection::isOpen() { return adapter.isOpen(); } Connection::OutboundFrameTracker::OutboundFrameTracker(Connection& _con) : con(_con), next(0) {} void Connection::OutboundFrameTracker::close() { next->close(); } size_t Connection::OutboundFrameTracker::getBuffered() const { return next->getBuffered(); } void Connection::OutboundFrameTracker::abort() { next->abort(); } void Connection::OutboundFrameTracker::activateOutput() { next->activateOutput(); } void Connection::OutboundFrameTracker::giveReadCredit(int32_t credit) { next->giveReadCredit(credit); } void Connection::OutboundFrameTracker::send(framing::AMQFrame& f) { next->send(f); con.sent(f); } void Connection::OutboundFrameTracker::wrap(sys::ConnectionOutputHandlerPtr& p) { next = p.get(); p.set(this); } }} qpidc-0.16/src/qpid/broker/SignalHandler.h0000664000076400007640000000262011415115441021025 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_SIGNALHANDLER_H #define QPID_BROKER_SIGNALHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { namespace broker { class Broker; /** * Handle signals e.g. to shut-down a broker. */ class SignalHandler { public: /** Set the broker to be shutdown on signals. * Must be reset by calling setBroker(0) before the broker is deleted. */ static void setBroker(Broker* broker); /** Initiate shut-down of broker */ static void shutdown(); private: static void shutdownHandler(int); static Broker* broker; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_SIGNALHANDLER_H*/ qpidc-0.16/src/qpid/broker/Daemon.cpp0000664000076400007640000001534611663012400020055 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /* * TODO: Note this is really a Posix specific implementation and so should be * refactored together with windows/QpiddBroker into a more coherent daemon driver/ * platform specific split */ #include "qpid/broker/Daemon.h" #include "qpid/log/Statement.h" #include "qpid/Exception.h" #include "qpid/sys/posix/PidFile.h" #include #include #include #include #include #include namespace qpid { namespace broker { using namespace std; using qpid::sys::PidFile; Daemon::Daemon(std::string _pidDir) : pidDir(_pidDir) { struct stat s; pid = -1; pipeFds[0] = pipeFds[1] = -1; if (::stat(pidDir.c_str(), &s)) { if (errno == ENOENT) { if (::mkdir(pidDir.c_str(), 0755)) throw Exception ("Can't create PID directory: " + pidDir); } else throw Exception ("PID directory not found: " + pidDir); } } string Daemon::pidFile(string pidDir, uint16_t port) { ostringstream path; path << pidDir << "/qpidd." << port << ".pid"; return path.str(); } /* * Rewritten using low-level IO, for compatibility * with earlier Boost versions, i.e. 103200. */ void Daemon::fork() { if(::pipe(pipeFds) < 0) throw ErrnoException("Can't create pipe"); if ((pid = ::fork()) < 0) throw ErrnoException("Daemon fork failed"); if (pid == 0) { // Child try { QPID_LOG(debug, "Forked daemon child process"); // File descriptors if(::close(pipeFds[0])<0) throw ErrnoException("Cannot close read pipe"); if(::close(0)<0) throw ErrnoException("Cannot close stdin"); if(::close(1)<0) throw ErrnoException("Cannot close stdout"); if(::close(2)<0) throw ErrnoException("Cannot close stderr"); int fd=::open("/dev/null",O_RDWR); // stdin if(fd != 0) throw ErrnoException("Cannot re-open stdin"); if(::dup(fd)<0) throw ErrnoException("Cannot re-open stdout"); if(::dup(fd)<0) throw ErrnoException("Cannot re-open stderror"); // Misc if(setsid()<0) throw ErrnoException("Cannot set session ID"); if(chdir(pidDir.c_str()) < 0) throw ErrnoException("Cannot change directory to "+pidDir); umask(027); // Child behavior child(); } catch (const exception& e) { QPID_LOG(critical, "Unexpected error: " << e.what()); uint16_t port = 0; if (write(pipeFds[1], &port, sizeof(uint16_t))) {}; std::string pipeFailureMessage = e.what(); if (write(pipeFds[1], pipeFailureMessage.c_str(), strlen(pipeFailureMessage.c_str()) )) {}; } } else { // Parent close(pipeFds[1]); // Write side. parent(); } } Daemon::~Daemon() { if (!lockFile.empty()) unlink(lockFile.c_str()); } uint16_t Daemon::wait(int timeout) { // parent waits for child. try { errno = 0; struct timeval tv; tv.tv_sec = timeout; tv.tv_usec = 0; /* * Rewritten using low-level IO, for compatibility * with earlier Boost versions, i.e. 103200. */ fd_set fds; FD_ZERO(&fds); FD_SET(pipeFds[0], &fds); int n=select(FD_SETSIZE, &fds, 0, 0, &tv); if(n==0) throw Exception("Timed out waiting for daemon (If store recovery is in progress, use longer wait time)"); if(n<0) throw ErrnoException("Error waiting for daemon"); uint16_t port = 0; /* * Read the child's port number from the pipe. */ int desired_read = sizeof(uint16_t); if ( desired_read > ::read(pipeFds[0], & port, desired_read) ) throw Exception("Cannot read from child process."); /* * If the port number is 0, the child has put an error message * on the pipe. Get it and throw it. */ if ( 0 == port ) { // Skip whitespace char c = ' '; while ( isspace(c) ) { if ( 1 > ::read(pipeFds[0], &c, 1) ) throw Exception("Child port == 0, and no error message on pipe."); } // Get Message string errmsg; do { errmsg += c; } while (::read(pipeFds[0], &c, 1)); throw Exception("Daemon startup failed"+ (errmsg.empty() ? string(".") : ": " + errmsg)); } return port; } catch (const std::exception& e) { // Print directly to cerr. The caller will catch and log the // exception, but in the case of a daemon parent process we // also need to be sure the error goes to stderr. A // dameon's logging configuration normally does not log to // stderr. std::cerr << e.what() << endl; throw; } } /* * When the child is ready, it writes its pid to the * lockfile and its port number on the pipe back to * its parent process. This indicates that the * child has successfully daemonized. When the parent * hears the good news, it ill exit. */ void Daemon::ready(uint16_t port) { // child lockFile = pidFile(pidDir, port); PidFile lf(lockFile, true); /* * Write the PID to the lockfile. */ lf.writePid(); /* * Write the port number to the parent. */ int desired_write = sizeof(uint16_t); if ( desired_write > ::write(pipeFds[1], & port, desired_write) ) { throw Exception("Error writing to parent." ); } QPID_LOG(debug, "Daemon ready on port: " << port); } /* * The parent process reads the child's pid * from the lockfile. */ pid_t Daemon::getPid(string _pidDir, uint16_t port) { string name = pidFile(_pidDir, port); PidFile lf(name, false); pid_t pid = lf.readPid(); if (kill(pid, 0) < 0 && errno != EPERM) { unlink(name.c_str()); throw Exception("Removing stale lock file "+name); } return pid; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/SessionState.h0000664000076400007640000002322011704073160020737 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_SESSION_H #define QPID_BROKER_SESSION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/SessionState.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/SequenceSet.h" #include "qpid/sys/Time.h" #include "qpid/management/Manageable.h" #include "qmf/org/apache/qpid/broker/Session.h" #include "qpid/broker/SessionAdapter.h" #include "qpid/broker/DeliveryAdapter.h" #include "qpid/broker/AsyncCompletion.h" #include "qpid/broker/MessageBuilder.h" #include "qpid/broker/SessionContext.h" #include "qpid/broker/SemanticState.h" #include "qpid/sys/Monitor.h" #include #include #include #include #include #include namespace qpid { namespace framing { class AMQP_ClientProxy; } namespace sys { class TimerTask; } namespace broker { class Broker; class ConnectionState; class Message; class SessionHandler; class SessionManager; /** * Broker-side session state includes session's handler chains, which * may themselves have state. */ class SessionState : public qpid::SessionState, public SessionContext, public DeliveryAdapter, public management::Manageable, public framing::FrameHandler::InOutHandler { public: SessionState(Broker&, SessionHandler&, const SessionId&, const SessionState::Configuration&, bool delayManagement=false); ~SessionState(); bool isAttached() const { return handler; } void detach(); void attach(SessionHandler& handler); void disableOutput(); /** @pre isAttached() */ framing::AMQP_ClientProxy& getProxy(); /** @pre isAttached() */ uint16_t getChannel() const; /** @pre isAttached() */ ConnectionState& getConnection(); bool isLocal(const ConnectionToken* t) const; Broker& getBroker(); void setTimeout(uint32_t seconds); /** OutputControl **/ void abort(); void activateOutput(); void giveReadCredit(int32_t); void senderCompleted(const framing::SequenceSet& ranges); void sendCompletion(); //delivery adapter methods: void deliver(DeliveryRecord&, bool sync); // Manageable entry points management::ManagementObject* GetManagementObject (void) const; management::Manageable::status_t ManagementMethod (uint32_t methodId, management::Args& args, std::string&); void readyToSend(); // Used by cluster to create replica sessions. SemanticState& getSemanticState() { return semanticState; } boost::intrusive_ptr getMessageInProgress() { return msgBuilder.getMessage(); } SessionAdapter& getSessionAdapter() { return adapter; } const SessionId& getSessionId() const { return getId(); } // Used by ExecutionHandler sync command processing. Notifies // the SessionState of a received Execution.Sync command. void addPendingExecutionSync(); // Used to delay creation of management object for sessions // belonging to inter-broker bridges void addManagementObject(); private: void handleCommand(framing::AMQMethodBody* method, const framing::SequenceNumber& id); void handleContent(framing::AMQFrame& frame, const framing::SequenceNumber& id); // indicate that the given ingress msg has been completely received by the // broker, and the msg's message.transfer command can be considered completed. void completeRcvMsg(SequenceNumber id, bool requiresAccept, bool requiresSync); void handleIn(framing::AMQFrame& frame); void handleOut(framing::AMQFrame& frame); // End of the input & output chains. void handleInLast(framing::AMQFrame& frame); void handleOutLast(framing::AMQFrame& frame); void sendAcceptAndCompletion(); /** * If commands are sent based on the local time (e.g. in timers), they don't have * a well-defined ordering across cluster nodes. * This proxy is for sending such commands. In a clustered broker it will take steps * to synchronize command order across the cluster. In a stand-alone broker * it is just a synonym for getProxy() */ framing::AMQP_ClientProxy& getClusterOrderProxy(); Broker& broker; SessionHandler* handler; sys::AbsTime expiry; // Used by SessionManager. SemanticState semanticState; SessionAdapter adapter; MessageBuilder msgBuilder; qmf::org::apache::qpid::broker::Session* mgmtObject; qpid::framing::SequenceSet accepted; // sequence numbers for pending received Execution.Sync commands std::queue pendingExecutionSyncs; bool currentCommandComplete; /** This class provides a context for completing asynchronous commands in a thread * safe manner. Asynchronous commands save their completion state in this class. * This class then schedules the completeCommands() method in the IO thread. * While running in the IO thread, completeCommands() may safely complete all * saved commands without the risk of colliding with other operations on this * SessionState. */ class AsyncCommandCompleter : public RefCounted { private: SessionState *session; bool isAttached; qpid::sys::Mutex completerLock; // special-case message.transfer commands for optimization struct MessageInfo { SequenceNumber cmd; // message.transfer command id bool requiresAccept; bool requiresSync; MessageInfo(SequenceNumber c, bool a, bool s) : cmd(c), requiresAccept(a), requiresSync(s) {} }; std::vector completedMsgs; // If an ingress message does not require a Sync, we need to // hold a reference to it in case an Execution.Sync command is received and we // have to manually flush the message. std::map > pendingMsgs; /** complete all pending commands, runs in IO thread */ void completeCommands(); /** for scheduling a run of "completeCommands()" on the IO thread */ static void schedule(boost::intrusive_ptr); public: AsyncCommandCompleter(SessionState *s) : session(s), isAttached(s->isAttached()) {}; ~AsyncCommandCompleter() {}; /** track a message pending ingress completion */ void addPendingMessage(boost::intrusive_ptr m); void deletePendingMessage(SequenceNumber id); void flushPendingMessages(); /** schedule the processing of a completed ingress message.transfer command */ void scheduleMsgCompletion(SequenceNumber cmd, bool requiresAccept, bool requiresSync); void cancel(); // called by SessionState destructor. void attached(); // called by SessionState on attach() void detached(); // called by SessionState on detach() }; boost::intrusive_ptr asyncCommandCompleter; /** Abstract class that represents a single asynchronous command that is * pending completion. */ class AsyncCommandContext : public AsyncCompletion::Callback { public: AsyncCommandContext( SessionState *ss, SequenceNumber _id ) : id(_id), completerContext(ss->asyncCommandCompleter) {} virtual ~AsyncCommandContext() {} protected: SequenceNumber id; boost::intrusive_ptr completerContext; }; /** incomplete Message.transfer commands - inbound to broker from client */ class IncompleteIngressMsgXfer : public SessionState::AsyncCommandContext { public: IncompleteIngressMsgXfer( SessionState *ss, boost::intrusive_ptr m ) : AsyncCommandContext(ss, m->getCommandId()), session(ss), msg(m), requiresAccept(m->requiresAccept()), requiresSync(m->getFrames().getMethod()->isSync()), pending(false) {} IncompleteIngressMsgXfer( const IncompleteIngressMsgXfer& x ) : AsyncCommandContext(x.session, x.msg->getCommandId()), session(x.session), msg(x.msg), requiresAccept(x.requiresAccept), requiresSync(x.requiresSync), pending(x.pending) {} virtual ~IncompleteIngressMsgXfer() {}; virtual void completed(bool); virtual boost::intrusive_ptr clone(); private: SessionState *session; // only valid if sync flag in callback is true boost::intrusive_ptr msg; bool requiresAccept; bool requiresSync; bool pending; // true if msg saved on pending list... }; friend class SessionManager; }; inline std::ostream& operator<<(std::ostream& out, const SessionState& session) { return out << session.getId(); } }} // namespace qpid::broker #endif /*!QPID_BROKER_SESSION_H*/ qpidc-0.16/src/qpid/broker/ConnectionHandler.cpp0000664000076400007640000003343011717465066022265 0ustar00jrossjross00000000000000 /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/SaslFactory.h" #include "qpid/broker/ConnectionHandler.h" #include "qpid/broker/Connection.h" #include "qpid/broker/SecureConnection.h" #include "qpid/Url.h" #include "qpid/framing/AllInvoker.h" #include "qpid/framing/ConnectionStartOkBody.h" #include "qpid/framing/enum.h" #include "qpid/log/Statement.h" #include "qpid/sys/SecurityLayer.h" #include "qpid/broker/AclModule.h" #include "qmf/org/apache/qpid/broker/EventClientConnectFail.h" using namespace qpid; using namespace qpid::broker; using namespace qpid::framing; using qpid::sys::SecurityLayer; namespace _qmf = qmf::org::apache::qpid::broker; namespace { const std::string ANONYMOUS = "ANONYMOUS"; const std::string PLAIN = "PLAIN"; const std::string en_US = "en_US"; const std::string QPID_FED_LINK = "qpid.fed_link"; const std::string QPID_FED_TAG = "qpid.federation_tag"; const std::string CLIENT_PROCESS_NAME("qpid.client_process"); const std::string CLIENT_PID("qpid.client_pid"); const std::string CLIENT_PPID("qpid.client_ppid"); const std::string SPACE(" "); } void ConnectionHandler::close(connection::CloseCode code, const string& text) { handler->proxy.close(code, text); } void ConnectionHandler::heartbeat() { handler->proxy.heartbeat(); } bool ConnectionHandler::handle(const framing::AMQMethodBody& method) { //Need special handling for start-ok, in order to distinguish //between null and empty response if (method.isA()) { handler->startOk(dynamic_cast(method)); return true; } else { return invoke(static_cast(*handler), method); } } void ConnectionHandler::handle(framing::AMQFrame& frame) { AMQMethodBody* method=frame.getBody()->getMethod(); Connection::ErrorListener* errorListener = handler->connection.getErrorListener(); try{ if (method && handle(*method)) { // This is a connection control frame, nothing more to do. } else if (isOpen()) { handler->connection.getChannel(frame.getChannel()).in(frame); } else { handler->proxy.close( connection::CLOSE_CODE_FRAMING_ERROR, "Connection not yet open, invalid frame received."); } }catch(ConnectionException& e){ if (errorListener) errorListener->connectionError(e.what()); handler->proxy.close(e.code, e.what()); }catch(std::exception& e){ if (errorListener) errorListener->connectionError(e.what()); handler->proxy.close(541/*internal error*/, e.what()); } } void ConnectionHandler::setSecureConnection(SecureConnection* secured) { handler->secured = secured; } ConnectionHandler::ConnectionHandler(Connection& connection, bool isClient, bool isShadow) : handler(new Handler(connection, isClient, isShadow)) {} ConnectionHandler::Handler::Handler(Connection& c, bool isClient, bool isShadow) : proxy(c.getOutput()), connection(c), serverMode(!isClient), secured(0), isOpen(false) { if (serverMode) { FieldTable properties; Array mechanisms(0x95); properties.setString(QPID_FED_TAG, connection.getBroker().getFederationTag()); authenticator = SaslAuthenticator::createAuthenticator(c, isShadow); authenticator->getMechanisms(mechanisms); Array locales(0x95); boost::shared_ptr l(new Str16Value(en_US)); locales.add(l); proxy.start(properties, mechanisms, locales); } maxFrameSize = (64 * 1024) - 1; } ConnectionHandler::Handler::~Handler() {} void ConnectionHandler::Handler::startOk(const framing::FieldTable& /*clientProperties*/, const string& /*mechanism*/, const string& /*response*/, const string& /*locale*/) { //Need special handling for start-ok, in order to distinguish //between null and empty response -> should never use this method assert(false); } void ConnectionHandler::Handler::startOk(const ConnectionStartOkBody& body) { try { authenticator->start(body.getMechanism(), body.hasResponse() ? &body.getResponse() : 0); } catch (std::exception& /*e*/) { management::ManagementAgent* agent = connection.getAgent(); if (agent) { string error; string uid; authenticator->getError(error); authenticator->getUid(uid); agent->raiseEvent(_qmf::EventClientConnectFail(connection.getMgmtId(), uid, error)); } throw; } const framing::FieldTable& clientProperties = body.getClientProperties(); connection.setClientProperties(clientProperties); connection.setFederationLink(clientProperties.get(QPID_FED_LINK)); if (clientProperties.isSet(QPID_FED_TAG)) { connection.setFederationPeerTag(clientProperties.getAsString(QPID_FED_TAG)); } if (connection.isFederationLink()) { AclModule* acl = connection.getBroker().getAcl(); FieldTable properties; if (acl && !acl->authorise(connection.getUserId(),acl::ACT_CREATE,acl::OBJ_LINK,"")){ proxy.close(framing::connection::CLOSE_CODE_CONNECTION_FORCED,"ACL denied creating a federation link"); return; } QPID_LOG(info, "Connection is a federation link"); } if (connection.getMgmtObject() != 0) { string procName = clientProperties.getAsString(CLIENT_PROCESS_NAME); uint32_t pid = clientProperties.getAsInt(CLIENT_PID); uint32_t ppid = clientProperties.getAsInt(CLIENT_PPID); if (!procName.empty()) connection.getMgmtObject()->set_remoteProcessName(procName); if (pid != 0) connection.getMgmtObject()->set_remotePid(pid); if (ppid != 0) connection.getMgmtObject()->set_remoteParentPid(ppid); } } void ConnectionHandler::Handler::secureOk(const string& response) { try { authenticator->step(response); } catch (std::exception& /*e*/) { management::ManagementAgent* agent = connection.getAgent(); if (agent) { string error; string uid; authenticator->getError(error); authenticator->getUid(uid); agent->raiseEvent(_qmf::EventClientConnectFail(connection.getMgmtId(), uid, error)); } throw; } } void ConnectionHandler::Handler::tuneOk(uint16_t /*channelmax*/, uint16_t framemax, uint16_t heartbeat) { if (framemax) connection.setFrameMax(framemax); connection.setHeartbeatInterval(heartbeat); } void ConnectionHandler::Handler::open(const string& /*virtualHost*/, const framing::Array& /*capabilities*/, bool /*insist*/) { std::vector urls = connection.broker.getKnownBrokers(); framing::Array array(0x95); // str16 array for (std::vector::iterator i = urls.begin(); i < urls.end(); ++i) array.add(boost::shared_ptr(new Str16Value(i->str()))); //install security layer if one has been negotiated: if (secured) { std::auto_ptr sl = authenticator->getSecurityLayer(connection.getFrameMax()); if (sl.get()) secured->activateSecurityLayer(sl); } isOpen = true; proxy.openOk(array); } void ConnectionHandler::Handler::close(uint16_t replyCode, const string& replyText) { if (replyCode != 200) { QPID_LOG(warning, "Client closed connection with " << replyCode << ": " << replyText); } if (replyCode == framing::connection::CLOSE_CODE_CONNECTION_FORCED) connection.notifyConnectionForced(replyText); proxy.closeOk(); connection.getOutput().close(); } void ConnectionHandler::Handler::closeOk(){ connection.getOutput().close(); } void ConnectionHandler::Handler::heartbeat(){ // For general case, do nothing - the purpose of heartbeats is // just to make sure that there is some traffic on the connection // within the heart beat interval, we check for the traffic and // don't need to do anything in response to heartbeats. The // exception is when we are in fact the client to another broker // (i.e. an inter-broker link), in which case we echo the // heartbeat back to the peer if (!serverMode) proxy.heartbeat(); } void ConnectionHandler::Handler::start(const FieldTable& serverProperties, const framing::Array& supportedMechanisms, const framing::Array& /*locales*/) { string requestedMechanism = connection.getAuthMechanism(); std::string username = connection.getUsername(); std::string password = connection.getPassword(); std::string host = connection.getHost(); std::string service("qpidd"); if ( connection.getBroker().isAuthenticating() ) { sasl = SaslFactory::getInstance().create( username, password, service, host, 0, // TODO -- mgoulish Fri Sep 24 2010 256, false ); // disallow interaction } std::string supportedMechanismsList; Array::const_iterator i; /* If no specific mechanism has been requested, just make a list of all of them, and assert that the one the caller requested is there. ( If *any* are supported! ) */ if ( requestedMechanism.empty() ) { for ( i = supportedMechanisms.begin(); i != supportedMechanisms.end(); ++i) { if (i != supportedMechanisms.begin()) supportedMechanismsList += SPACE; supportedMechanismsList += (*i)->get(); } } else { /* The caller has requested a mechanism. If it's available, make sure it ends up at the head of the list. */ for ( i = supportedMechanisms.begin(); i != supportedMechanisms.end(); ++i) { string currentMechanism = (*i)->get(); if ( requestedMechanism == currentMechanism ) { supportedMechanismsList = currentMechanism + SPACE + supportedMechanismsList; } else { if (i != supportedMechanisms.begin()) supportedMechanismsList += SPACE; supportedMechanismsList += currentMechanism; } } } if (serverProperties.isSet(QPID_FED_TAG)) { connection.setFederationPeerTag(serverProperties.getAsString(QPID_FED_TAG)); } FieldTable ft; ft.setInt(QPID_FED_LINK,1); ft.setString(QPID_FED_TAG, connection.getBroker().getFederationTag()); string response; if (sasl.get()) { const qpid::sys::SecuritySettings& ss = connection.getExternalSecuritySettings(); if (sasl->start ( requestedMechanism.empty() ? supportedMechanismsList : requestedMechanism, response, & ss )) { proxy.startOk ( ft, sasl->getMechanism(), response, en_US ); } else { //response was null ConnectionStartOkBody body; body.setClientProperties(ft); body.setMechanism(sasl->getMechanism()); //Don't set response, as none was given body.setLocale(en_US); proxy.send(body); } } else { response = ((char)0) + username + ((char)0) + password; proxy.startOk ( ft, requestedMechanism, response, en_US ); } } void ConnectionHandler::Handler::secure(const string& challenge ) { if (sasl.get()) { string response = sasl->step(challenge); proxy.secureOk(response); } else { proxy.secureOk(""); } } void ConnectionHandler::Handler::tune(uint16_t channelMax, uint16_t maxFrameSizeProposed, uint16_t /*heartbeatMin*/, uint16_t heartbeatMax) { maxFrameSize = std::min(maxFrameSize, maxFrameSizeProposed); connection.setFrameMax(maxFrameSize); connection.setHeartbeat(heartbeatMax); proxy.tuneOk(channelMax, maxFrameSize, heartbeatMax); proxy.open("/", Array(), true); } void ConnectionHandler::Handler::openOk(const framing::Array& knownHosts) { for (Array::ValueVector::const_iterator i = knownHosts.begin(); i != knownHosts.end(); ++i) { Url url((*i)->get()); connection.getKnownHosts().push_back(url); } if (sasl.get()) { std::auto_ptr securityLayer = sasl->getSecurityLayer(maxFrameSize); if ( securityLayer.get() ) { secured->activateSecurityLayer(securityLayer, true); } saslUserId = sasl->getUserId(); } isOpen = true; } void ConnectionHandler::Handler::redirect(const string& /*host*/, const framing::Array& /*knownHosts*/) { } qpidc-0.16/src/qpid/broker/DeliveryRecord.cpp0000664000076400007640000001372611717465066021620 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/DeliveryRecord.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/broker/SemanticState.h" #include "qpid/broker/Consumer.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/Queue.h" #include "qpid/log/Statement.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/MessageTransferBody.h" using namespace qpid; using namespace qpid::broker; using std::string; DeliveryRecord::DeliveryRecord(const QueuedMessage& _msg, const Queue::shared_ptr& _queue, const std::string& _tag, const boost::shared_ptr& _consumer, bool _acquired, bool accepted, bool _windowing, uint32_t _credit): msg(_msg), queue(_queue), tag(_tag), consumer(_consumer), acquired(_acquired), acceptExpected(!accepted), cancelled(false), completed(false), ended(accepted && acquired), windowing(_windowing), credit(msg.payload ? msg.payload->getRequiredCredit() : _credit) {} bool DeliveryRecord::setEnded() { ended = true; //reset msg pointer, don't need to hold on to it anymore msg.payload = boost::intrusive_ptr(); QPID_LOG(debug, "DeliveryRecord::setEnded() id=" << id); return isRedundant(); } void DeliveryRecord::redeliver(SemanticState* const session) { if (!ended) { if(cancelled){ //if subscription was cancelled, requeue it (waiting for //final confirmation for AMQP WG on this case) requeue(); }else{ msg.payload->redeliver();//mark as redelivered session->deliver(*this, false); } } } void DeliveryRecord::deliver(framing::FrameHandler& h, DeliveryId deliveryId, uint16_t framesize) { id = deliveryId; if (msg.payload->getRedelivered()){ msg.payload->setRedelivered(); } msg.payload->adjustTtl(); framing::AMQFrame method((framing::MessageTransferBody(framing::ProtocolVersion(), tag, acceptExpected ? 0 : 1, acquired ? 0 : 1))); method.setEof(false); h.handle(method); msg.payload->sendHeader(h, framesize); msg.payload->sendContent(*queue, h, framesize); } void DeliveryRecord::requeue() const { if (acquired && !ended) { msg.payload->redeliver(); queue->requeue(msg); } } void DeliveryRecord::release(bool setRedelivered) { if (acquired && !ended) { if (setRedelivered) msg.payload->redeliver(); queue->requeue(msg); acquired = false; setEnded(); } else { QPID_LOG(debug, "Ignoring release for " << id << " acquired=" << acquired << ", ended =" << ended); } } void DeliveryRecord::complete() { completed = true; } bool DeliveryRecord::accept(TransactionContext* ctxt) { if (!ended) { if (consumer) consumer->acknowledged(getMessage()); if (acquired) queue->dequeue(ctxt, msg); setEnded(); QPID_LOG(debug, "Accepted " << id); } return isRedundant(); } void DeliveryRecord::dequeue(TransactionContext* ctxt) const{ if (acquired && !ended) { queue->dequeue(ctxt, msg); } } void DeliveryRecord::committed() const{ queue->dequeueCommitted(msg); } void DeliveryRecord::reject() { if (acquired && !ended) { Exchange::shared_ptr alternate = queue->getAlternateExchange(); if (alternate) { DeliverableMessage delivery(msg.payload); alternate->routeWithAlternate(delivery); QPID_LOG(info, "Routed rejected message from " << queue->getName() << " to " << alternate->getName()); } else { //just drop it QPID_LOG(info, "Dropping rejected message from " << queue->getName()); } queue->countRejected(); dequeue(); setEnded(); } } uint32_t DeliveryRecord::getCredit() const { return credit; } void DeliveryRecord::acquire(DeliveryIds& results) { if (queue->acquire(msg, tag)) { acquired = true; results.push_back(id); if (!acceptExpected) { if (ended) { QPID_LOG(error, "Can't dequeue ended message"); } else { queue->dequeue(0, msg); setEnded(); } } } else { QPID_LOG(info, "Message already acquired " << id.getValue()); } } void DeliveryRecord::cancel(const std::string& cancelledTag) { if (tag == cancelledTag) cancelled = true; } AckRange DeliveryRecord::findRange(DeliveryRecords& records, DeliveryId first, DeliveryId last) { DeliveryRecords::iterator start = lower_bound(records.begin(), records.end(), first); // Find end - position it just after the last record in range DeliveryRecords::iterator end = lower_bound(records.begin(), records.end(), last); if (end != records.end() && end->getId() == last) ++end; return AckRange(start, end); } namespace qpid { namespace broker { std::ostream& operator<<(std::ostream& out, const DeliveryRecord& r) { out << "{" << "id=" << r.id.getValue(); out << ", tag=" << r.tag << "}"; out << ", queue=" << r.queue->getName() << "}"; return out; } }} qpidc-0.16/src/qpid/broker/Broker.h0000664000076400007640000003377511723414716017566 0ustar00jrossjross00000000000000#ifndef _Broker_ #define _Broker_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/ConnectionFactory.h" #include "qpid/broker/ConnectionToken.h" #include "qpid/broker/DirectExchange.h" #include "qpid/broker/DtxManager.h" #include "qpid/broker/ExchangeRegistry.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/LinkRegistry.h" #include "qpid/broker/SessionManager.h" #include "qpid/broker/QueueCleaner.h" #include "qpid/broker/QueueEvents.h" #include "qpid/broker/Vhost.h" #include "qpid/broker/System.h" #include "qpid/broker/ExpiryPolicy.h" #include "qpid/broker/ConsumerFactory.h" #include "qpid/broker/ConnectionObservers.h" #include "qpid/management/Manageable.h" #include "qpid/management/ManagementAgent.h" #include "qmf/org/apache/qpid/broker/Broker.h" #include "qmf/org/apache/qpid/broker/ArgsBrokerConnect.h" #include "qpid/Options.h" #include "qpid/Plugin.h" #include "qpid/DataDir.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/OutputHandler.h" #include "qpid/framing/ProtocolInitiation.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Timer.h" #include "qpid/types/Variant.h" #include "qpid/RefCounted.h" #include "qpid/broker/AclModule.h" #include "qpid/sys/Mutex.h" #include #include #include namespace qpid { namespace sys { class ProtocolFactory; class Poller; } struct Url; namespace broker { class ConnectionState; class ExpiryPolicy; class Message; static const uint16_t DEFAULT_PORT=5672; struct NoSuchTransportException : qpid::Exception { NoSuchTransportException(const std::string& s) : Exception(s) {} virtual ~NoSuchTransportException() throw() {} }; /** * A broker instance. */ class Broker : public sys::Runnable, public Plugin::Target, public management::Manageable, public RefCounted { public: struct Options : public qpid::Options { static const std::string DEFAULT_DATA_DIR_LOCATION; static const std::string DEFAULT_DATA_DIR_NAME; QPID_BROKER_EXTERN Options(const std::string& name="Broker Options"); bool noDataDir; std::string dataDir; uint16_t port; int workerThreads; int maxConnections; int connectionBacklog; bool enableMgmt; bool mgmtPublish; uint16_t mgmtPubInterval; uint16_t queueCleanInterval; bool auth; std::string realm; size_t replayFlushLimit; size_t replayHardLimit; uint queueLimit; bool tcpNoDelay; bool requireEncrypted; std::string knownHosts; std::string saslConfigPath; bool asyncQueueEvents; bool qmf2Support; bool qmf1Support; uint queueFlowStopRatio; // producer flow control: on uint queueFlowResumeRatio; // producer flow control: off uint16_t queueThresholdEventRatio; std::string defaultMsgGroup; bool timestampRcvMsgs; double linkMaintenanceInterval; // FIXME aconway 2012-02-13: consistent parsing of SECONDS values. private: std::string getHome(); }; class ConnectionCounter { int maxConnections; int connectionCount; sys::Mutex connectionCountLock; public: ConnectionCounter(int mc): maxConnections(mc),connectionCount(0) {}; void inc_connectionCount() { sys::ScopedLock l(connectionCountLock); connectionCount++; } void dec_connectionCount() { sys::ScopedLock l(connectionCountLock); connectionCount--; } bool allowConnection() { sys::ScopedLock l(connectionCountLock); return (maxConnections <= connectionCount); } }; private: typedef std::map > ProtocolFactoryMap; void declareStandardExchange(const std::string& name, const std::string& type); void setStore (); void setLogLevel(const std::string& level); std::string getLogLevel(); void createObject(const std::string& type, const std::string& name, const qpid::types::Variant::Map& properties, bool strict, const ConnectionState* context); void deleteObject(const std::string& type, const std::string& name, const qpid::types::Variant::Map& options, const ConnectionState* context); Manageable::status_t queryObject(const std::string& type, const std::string& name, qpid::types::Variant::Map& results, const ConnectionState* context); Manageable::status_t queryQueue( const std::string& name, const std::string& userId, const std::string& connectionId, qpid::types::Variant::Map& results); Manageable::status_t getTimestampConfig(bool& receive, const ConnectionState* context); Manageable::status_t setTimestampConfig(const bool receive, const ConnectionState* context); boost::shared_ptr poller; sys::Timer timer; std::auto_ptr clusterTimer; Options config; std::auto_ptr managementAgent; ProtocolFactoryMap protocolFactories; std::auto_ptr store; AclModule* acl; DataDir dataDir; ConnectionObservers connectionObservers; QueueRegistry queues; ExchangeRegistry exchanges; LinkRegistry links; boost::shared_ptr factory; DtxManager dtxManager; SessionManager sessionManager; qmf::org::apache::qpid::broker::Broker* mgmtObject; Vhost::shared_ptr vhostObject; System::shared_ptr systemObject; QueueCleaner queueCleaner; QueueEvents queueEvents; std::vector knownBrokers; std::vector getKnownBrokersImpl(); bool deferDeliveryImpl(const std::string& queue, const boost::intrusive_ptr& msg); std::string federationTag; bool recovery; bool inCluster, clusterUpdatee; boost::intrusive_ptr expiryPolicy; ConnectionCounter connectionCounter; ConsumerFactories consumerFactories; public: QPID_BROKER_EXTERN virtual ~Broker(); QPID_BROKER_EXTERN Broker(const Options& configuration); static QPID_BROKER_EXTERN boost::intrusive_ptr create(const Options& configuration); static QPID_BROKER_EXTERN boost::intrusive_ptr create(int16_t port = DEFAULT_PORT); /** * Return listening port. If called before bind this is * the configured port. If called after it is the actual * port, which will be different if the configured port is * 0. */ QPID_BROKER_EXTERN virtual uint16_t getPort(const std::string& name) const; /** * Run the broker. Implements Runnable::run() so the broker * can be run in a separate thread. */ QPID_BROKER_EXTERN virtual void run(); /** Shut down the broker */ QPID_BROKER_EXTERN virtual void shutdown(); QPID_BROKER_EXTERN void setStore (boost::shared_ptr& store); MessageStore& getStore() { return *store; } void setAcl (AclModule* _acl) {acl = _acl;} AclModule* getAcl() { return acl; } QueueRegistry& getQueues() { return queues; } ExchangeRegistry& getExchanges() { return exchanges; } LinkRegistry& getLinks() { return links; } DtxManager& getDtxManager() { return dtxManager; } DataDir& getDataDir() { return dataDir; } Options& getOptions() { return config; } QueueEvents& getQueueEvents() { return queueEvents; } void setExpiryPolicy(const boost::intrusive_ptr& e) { expiryPolicy = e; } boost::intrusive_ptr getExpiryPolicy() { return expiryPolicy; } SessionManager& getSessionManager() { return sessionManager; } const std::string& getFederationTag() const { return federationTag; } QPID_BROKER_EXTERN management::ManagementObject* GetManagementObject() const; QPID_BROKER_EXTERN management::Manageable* GetVhostObject() const; QPID_BROKER_EXTERN management::Manageable::status_t ManagementMethod( uint32_t methodId, management::Args& args, std::string& text); /** Add to the broker's protocolFactorys */ QPID_BROKER_EXTERN void registerProtocolFactory( const std::string& name, boost::shared_ptr); /** Accept connections */ QPID_BROKER_EXTERN void accept(); /** Create a connection to another broker. */ void connect(const std::string& host, const std::string& port, const std::string& transport, boost::function2 failed, sys::ConnectionCodec::Factory* =0); /** Create a connection to another broker. */ void connect(const Url& url, boost::function2 failed, sys::ConnectionCodec::Factory* =0); /** Move messages from one queue to another. A zero quantity means to move all messages */ QPID_BROKER_EXTERN uint32_t queueMoveMessages( const std::string& srcQueue, const std::string& destQueue, uint32_t qty, const qpid::types::Variant::Map& filter); QPID_BROKER_EXTERN boost::shared_ptr getProtocolFactory( const std::string& name = TCP_TRANSPORT) const; /** Expose poller so plugins can register their descriptors. */ QPID_BROKER_EXTERN boost::shared_ptr getPoller(); boost::shared_ptr getConnectionFactory() { return factory; } void setConnectionFactory(boost::shared_ptr f) { factory = f; } /** Timer for local tasks affecting only this broker */ sys::Timer& getTimer() { return timer; } /** Timer for tasks that must be synchronized if we are in a cluster */ sys::Timer& getClusterTimer() { return clusterTimer.get() ? *clusterTimer : timer; } QPID_BROKER_EXTERN void setClusterTimer(std::auto_ptr); boost::function ()> getKnownBrokers; static QPID_BROKER_EXTERN const std::string TCP_TRANSPORT; void setRecovery(bool set) { recovery = set; } bool getRecovery() const { return recovery; } /** True of this broker is part of a cluster. * Only valid after early initialization of plugins is complete. */ bool isInCluster() const { return inCluster; } void setInCluster(bool set) { inCluster = set; } /** True if this broker is joining a cluster and in the process of * receiving a state update. */ bool isClusterUpdatee() const { return clusterUpdatee; } void setClusterUpdatee(bool set) { clusterUpdatee = set; } management::ManagementAgent* getManagementAgent() { return managementAgent.get(); } ConnectionCounter& getConnectionCounter() {return connectionCounter;} /** * Never true in a stand-alone broker. In a cluster, return true * to defer delivery of messages deliveredg in a cluster-unsafe * context. *@return true if delivery of a message should be deferred. */ boost::function& msg)> deferDelivery; bool isAuthenticating ( ) { return config.auth; } bool isTimestamping() { return config.timestampRcvMsgs; } typedef boost::function1 > QueueFunctor; QPID_BROKER_EXTERN std::pair, bool> createQueue( const std::string& name, bool durable, bool autodelete, const OwnershipToken* owner, const std::string& alternateExchange, const qpid::framing::FieldTable& arguments, const std::string& userId, const std::string& connectionId); QPID_BROKER_EXTERN void deleteQueue( const std::string& name, const std::string& userId, const std::string& connectionId, QueueFunctor check = QueueFunctor()); QPID_BROKER_EXTERN std::pair createExchange( const std::string& name, const std::string& type, bool durable, const std::string& alternateExchange, const qpid::framing::FieldTable& args, const std::string& userId, const std::string& connectionId); QPID_BROKER_EXTERN void deleteExchange( const std::string& name, const std::string& userId, const std::string& connectionId); QPID_BROKER_EXTERN void bind( const std::string& queue, const std::string& exchange, const std::string& key, const qpid::framing::FieldTable& arguments, const std::string& userId, const std::string& connectionId); QPID_BROKER_EXTERN void unbind( const std::string& queue, const std::string& exchange, const std::string& key, const std::string& userId, const std::string& connectionId); ConsumerFactories& getConsumerFactories() { return consumerFactories; } ConnectionObservers& getConnectionObservers() { return connectionObservers; } }; }} #endif /*!_Broker_*/ qpidc-0.16/src/qpid/broker/ExchangeRegistry.h0000664000076400007640000000662511720530342021576 0ustar00jrossjross00000000000000#ifndef _broker_ExchangeRegistry_h #define _broker_ExchangeRegistry_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/MessageStore.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/Monitor.h" #include "qpid/management/Manageable.h" #include #include #include #include namespace qpid { namespace broker { struct UnknownExchangeTypeException{}; class ExchangeRegistry{ public: typedef boost::function5 FactoryFunction; ExchangeRegistry (Broker* b = 0) : parent(0), broker(b) {} QPID_BROKER_EXTERN std::pair declare (const std::string& name, const std::string& type); QPID_BROKER_EXTERN std::pair declare (const std::string& name, const std::string& type, bool durable, const qpid::framing::FieldTable& args = framing::FieldTable()); QPID_BROKER_EXTERN void destroy(const std::string& name); QPID_BROKER_EXTERN Exchange::shared_ptr getDefault(); /** * Find the named exchange. Return 0 if not found. */ QPID_BROKER_EXTERN boost::shared_ptr find(const std::string& name); /** * Get the named exchange. Throw exception if not found. */ QPID_BROKER_EXTERN boost::shared_ptr get(const std::string& name); /** * Register the manageable parent for declared exchanges */ void setParent (management::Manageable* _parent) { parent = _parent; } /** Register an exchange instance. *@return true if registered, false if exchange with same name is already registered. */ QPID_BROKER_EXTERN bool registerExchange(const Exchange::shared_ptr&); QPID_BROKER_EXTERN void registerType(const std::string& type, FactoryFunction); /** Call f for each exchange in the registry. */ template void eachExchange(F f) const { qpid::sys::RWlock::ScopedRlock l(lock); for (ExchangeMap::const_iterator i = exchanges.begin(); i != exchanges.end(); ++i) f(i->second); } private: typedef std::map ExchangeMap; typedef std::map FunctionMap; ExchangeMap exchanges; FunctionMap factory; mutable qpid::sys::RWlock lock; management::Manageable* parent; Broker* broker; }; }} // namespace qpid::broker #endif /*!_broker_ExchangeRegistry_h*/ qpidc-0.16/src/qpid/broker/RecoveryManager.h0000664000076400007640000000403111227113407021402 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _RecoveryManager_ #define _RecoveryManager_ #include "qpid/broker/RecoverableExchange.h" #include "qpid/broker/RecoverableQueue.h" #include "qpid/broker/RecoverableMessage.h" #include "qpid/broker/RecoverableTransaction.h" #include "qpid/broker/RecoverableConfig.h" #include "qpid/broker/TransactionalStore.h" #include "qpid/framing/Buffer.h" namespace qpid { namespace broker { class RecoveryManager{ public: virtual ~RecoveryManager(){} virtual RecoverableExchange::shared_ptr recoverExchange(framing::Buffer& buffer) = 0; virtual RecoverableQueue::shared_ptr recoverQueue(framing::Buffer& buffer) = 0; virtual RecoverableMessage::shared_ptr recoverMessage(framing::Buffer& buffer) = 0; virtual RecoverableTransaction::shared_ptr recoverTransaction(const std::string& xid, std::auto_ptr txn) = 0; virtual RecoverableConfig::shared_ptr recoverConfig(framing::Buffer& buffer) = 0; virtual void recoveryComplete() = 0; }; class Recoverable { public: virtual ~Recoverable() {} /** * Request recovery of queue and message state. */ virtual void recover(RecoveryManager& recoverer) = 0; }; }} #endif qpidc-0.16/src/qpid/broker/windows/0000775000076400007640000000000011752725716017653 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/broker/windows/BrokerDefaults.cpp0000664000076400007640000000260111564625557023275 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Broker.h" #include namespace qpid { namespace broker { const std::string Broker::Options::DEFAULT_DATA_DIR_LOCATION("\\TEMP"); const std::string Broker::Options::DEFAULT_DATA_DIR_NAME("\\QPIDD.DATA"); std::string Broker::Options::getHome() { std::string home; #ifdef _MSC_VER char home_c[MAX_PATH+1]; size_t unused; if (0 == getenv_s (&unused, home_c, sizeof(home_c), "HOME")) home += home_c; #else char *home_c = getenv("HOME"); if (home_c) home += home_c; #endif return home; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/windows/SslProtocolFactory.cpp0000664000076400007640000003203411621324771024163 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ProtocolFactory.h" #include "qpid/Plugin.h" #include "qpid/broker/Broker.h" #include "qpid/log/Statement.h" #include "qpid/sys/AsynchIOHandler.h" #include "qpid/sys/ConnectionCodec.h" #include "qpid/sys/Socket.h" #include "qpid/sys/SocketAddress.h" #include "qpid/sys/SystemInfo.h" #include "qpid/sys/windows/SslAsynchIO.h" #include #include #include // security.h needs to see this to distinguish from kernel use. #define SECURITY_WIN32 #include #include #undef SECURITY_WIN32 namespace qpid { namespace sys { namespace windows { struct SslServerOptions : qpid::Options { std::string certStore; std::string certName; uint16_t port; bool clientAuth; SslServerOptions() : qpid::Options("SSL Options"), certStore("My"), port(5671), clientAuth(false) { qpid::Address me; if (qpid::sys::SystemInfo::getLocalHostname(me)) certName = me.host; else certName = "localhost"; addOptions() ("ssl-cert-store", optValue(certStore, "NAME"), "Local store name from which to obtain certificate") ("ssl-cert-name", optValue(certName, "NAME"), "Name of the certificate to use") ("ssl-port", optValue(port, "PORT"), "Port on which to listen for SSL connections") ("ssl-require-client-authentication", optValue(clientAuth), "Forces clients to authenticate in order to establish an SSL connection"); } }; class SslProtocolFactory : public qpid::sys::ProtocolFactory { const bool tcpNoDelay; boost::ptr_vector listeners; boost::ptr_vector acceptors; uint16_t listeningPort; std::string brokerHost; const bool clientAuthSelected; std::auto_ptr acceptor; ConnectFailedCallback connectFailedCallback; CredHandle credHandle; public: SslProtocolFactory(const SslServerOptions&, const std::string& host, const std::string& port, int backlog, bool nodelay); ~SslProtocolFactory(); void accept(sys::Poller::shared_ptr, sys::ConnectionCodec::Factory*); void connect(sys::Poller::shared_ptr, const std::string& host, const std::string& port, sys::ConnectionCodec::Factory*, ConnectFailedCallback failed); uint16_t getPort() const; bool supports(const std::string& capability); private: void connectFailed(const qpid::sys::Socket&, int err, const std::string& msg); void established(sys::Poller::shared_ptr, const qpid::sys::Socket&, sys::ConnectionCodec::Factory*, bool isClient); }; // Static instance to initialise plugin static struct SslPlugin : public Plugin { SslServerOptions options; Options* getOptions() { return &options; } void earlyInitialize(Target&) { } void initialize(Target& target) { broker::Broker* broker = dynamic_cast(&target); // Only provide to a Broker if (broker) { try { const broker::Broker::Options& opts = broker->getOptions(); ProtocolFactory::shared_ptr protocol(new SslProtocolFactory(options, "", boost::lexical_cast(options.port), opts.connectionBacklog, opts.tcpNoDelay)); QPID_LOG(notice, "Listening for SSL connections on TCP port " << protocol->getPort()); broker->registerProtocolFactory("ssl", protocol); } catch (const std::exception& e) { QPID_LOG(error, "Failed to initialise SSL listener: " << e.what()); } } } } sslPlugin; SslProtocolFactory::SslProtocolFactory(const SslServerOptions& options, const std::string& host, const std::string& port, int backlog, bool nodelay) : tcpNoDelay(nodelay), clientAuthSelected(options.clientAuth) { // Make sure that certificate store is good before listening to sockets // to avoid having open and listening sockets when there is no cert store SecInvalidateHandle(&credHandle); // Get the certificate for this server. HCERTSTORE certStoreHandle; certStoreHandle = ::CertOpenStore(CERT_STORE_PROV_SYSTEM_A, X509_ASN_ENCODING, 0, CERT_SYSTEM_STORE_LOCAL_MACHINE, options.certStore.c_str()); if (!certStoreHandle) throw qpid::Exception(QPID_MSG("Opening store " << options.certStore << " " << qpid::sys::strError(GetLastError()))); PCCERT_CONTEXT certContext; certContext = ::CertFindCertificateInStore(certStoreHandle, X509_ASN_ENCODING, 0, CERT_FIND_SUBJECT_STR_A, options.certName.c_str(), NULL); if (certContext == NULL) { int err = ::GetLastError(); ::CertCloseStore(certStoreHandle, 0); throw qpid::Exception(QPID_MSG("Locating certificate " << options.certName << " in store " << options.certStore << " " << qpid::sys::strError(GetLastError()))); throw QPID_WINDOWS_ERROR(err); } SCHANNEL_CRED cred; memset(&cred, 0, sizeof(cred)); cred.dwVersion = SCHANNEL_CRED_VERSION; cred.cCreds = 1; cred.paCred = &certContext; SECURITY_STATUS status = ::AcquireCredentialsHandle(NULL, UNISP_NAME, SECPKG_CRED_INBOUND, NULL, &cred, NULL, NULL, &credHandle, NULL); if (status != SEC_E_OK) throw QPID_WINDOWS_ERROR(status); ::CertFreeCertificateContext(certContext); ::CertCloseStore(certStoreHandle, 0); // Listen to socket(s) SocketAddress sa(host, port); // We must have at least one resolved address QPID_LOG(info, "SSL Listening to: " << sa.asString()) Socket* s = new Socket; listeningPort = s->listen(sa, backlog); listeners.push_back(s); // Try any other resolved addresses while (sa.nextAddress()) { QPID_LOG(info, "SSL Listening to: " << sa.asString()) Socket* s = new Socket; s->listen(sa, backlog); listeners.push_back(s); } } SslProtocolFactory::~SslProtocolFactory() { ::FreeCredentialsHandle(&credHandle); } void SslProtocolFactory::connectFailed(const qpid::sys::Socket&, int err, const std::string& msg) { if (connectFailedCallback) connectFailedCallback(err, msg); } void SslProtocolFactory::established(sys::Poller::shared_ptr poller, const qpid::sys::Socket& s, sys::ConnectionCodec::Factory* f, bool isClient) { sys::AsynchIOHandler* async = new sys::AsynchIOHandler(s.getFullAddress(), f); if (tcpNoDelay) { s.setTcpNoDelay(); QPID_LOG(info, "Set TCP_NODELAY on connection to " << s.getPeerAddress()); } SslAsynchIO *aio; if (isClient) { async->setClient(); aio = new qpid::sys::windows::ClientSslAsynchIO(brokerHost, s, credHandle, boost::bind(&AsynchIOHandler::readbuff, async, _1, _2), boost::bind(&AsynchIOHandler::eof, async, _1), boost::bind(&AsynchIOHandler::disconnect, async, _1), boost::bind(&AsynchIOHandler::closedSocket, async, _1, _2), boost::bind(&AsynchIOHandler::nobuffs, async, _1), boost::bind(&AsynchIOHandler::idle, async, _1)); } else { aio = new qpid::sys::windows::ServerSslAsynchIO(clientAuthSelected, s, credHandle, boost::bind(&AsynchIOHandler::readbuff, async, _1, _2), boost::bind(&AsynchIOHandler::eof, async, _1), boost::bind(&AsynchIOHandler::disconnect, async, _1), boost::bind(&AsynchIOHandler::closedSocket, async, _1, _2), boost::bind(&AsynchIOHandler::nobuffs, async, _1), boost::bind(&AsynchIOHandler::idle, async, _1)); } async->init(aio, 4); aio->start(poller); } uint16_t SslProtocolFactory::getPort() const { return listeningPort; // Immutable no need for lock. } void SslProtocolFactory::accept(sys::Poller::shared_ptr poller, sys::ConnectionCodec::Factory* fact) { for (unsigned i = 0; i using namespace qpid::framing; using qpid::sys::SecurityLayer; namespace qpid { namespace broker { class NullAuthenticator : public SaslAuthenticator { Connection& connection; framing::AMQP_ClientProxy::Connection client; public: NullAuthenticator(Connection& connection); ~NullAuthenticator(); void getMechanisms(framing::Array& mechanisms); void start(const std::string& mechanism, const std::string* response); void step(const std::string&) {} std::auto_ptr getSecurityLayer(uint16_t maxFrameSize); }; class SspiAuthenticator : public SaslAuthenticator { HANDLE userToken; Connection& connection; framing::AMQP_ClientProxy::Connection client; public: SspiAuthenticator(Connection& connection); ~SspiAuthenticator(); void getMechanisms(framing::Array& mechanisms); void start(const std::string& mechanism, const std::string* response); void step(const std::string& response); std::auto_ptr getSecurityLayer(uint16_t maxFrameSize); }; bool SaslAuthenticator::available(void) { return true; } // Initialize the SASL mechanism; throw if it fails. void SaslAuthenticator::init(const std::string& /*saslName*/, const std::string& /*saslConfig*/) { return; } void SaslAuthenticator::fini(void) { return; } std::auto_ptr SaslAuthenticator::createAuthenticator(Connection& c, bool) { if (c.getBroker().getOptions().auth) { return std::auto_ptr(new SspiAuthenticator(c)); } else { return std::auto_ptr(new NullAuthenticator(c)); } } NullAuthenticator::NullAuthenticator(Connection& c) : connection(c), client(c.getOutput()) {} NullAuthenticator::~NullAuthenticator() {} void NullAuthenticator::getMechanisms(Array& mechanisms) { mechanisms.add(boost::shared_ptr(new Str16Value("ANONYMOUS"))); mechanisms.add(boost::shared_ptr(new Str16Value("PLAIN"))); } void NullAuthenticator::start(const string& mechanism, const string* response) { QPID_LOG(warning, "SASL: No Authentication Performed"); if (mechanism == "PLAIN") { // Old behavior if (response && response->size() > 0 && (*response).c_str()[0] == (char) 0) { string temp = response->substr(1); string::size_type i = temp.find((char)0); string uid = temp.substr(0, i); string pwd = temp.substr(i + 1); connection.setUserId(uid); } } else { connection.setUserId("anonymous"); } client.tune(framing::CHANNEL_MAX, connection.getFrameMax(), 0, 0); } std::auto_ptr NullAuthenticator::getSecurityLayer(uint16_t) { std::auto_ptr securityLayer; return securityLayer; } SspiAuthenticator::SspiAuthenticator(Connection& c) : userToken(INVALID_HANDLE_VALUE), connection(c), client(c.getOutput()) { } SspiAuthenticator::~SspiAuthenticator() { if (INVALID_HANDLE_VALUE != userToken) { CloseHandle(userToken); userToken = INVALID_HANDLE_VALUE; } } void SspiAuthenticator::getMechanisms(Array& mechanisms) { mechanisms.add(boost::shared_ptr(new Str16Value(string("ANONYMOUS")))); mechanisms.add(boost::shared_ptr(new Str16Value(string("PLAIN")))); QPID_LOG(info, "SASL: Mechanism list: ANONYMOUS PLAIN"); } void SspiAuthenticator::start(const string& mechanism, const string* response) { QPID_LOG(info, "SASL: Starting authentication with mechanism: " << mechanism); if (mechanism == "ANONYMOUS") { connection.setUserId("anonymous"); client.tune(framing::CHANNEL_MAX, connection.getFrameMax(), 0, 0); return; } if (mechanism != "PLAIN") throw ConnectionForcedException("Unsupported mechanism"); // PLAIN's response is composed of 3 strings separated by 0 bytes: // authorization id, authentication id (user), clear-text password. if (!response || response->size() == 0) throw ConnectionForcedException("Authentication failed"); string::size_type i = response->find((char)0); string auth = response->substr(0, i); string::size_type j = response->find((char)0, i+1); string uid = response->substr(i+1, j-1); string pwd = response->substr(j+1); string dot("."); int error = 0; if (!LogonUser(const_cast(uid.c_str()), const_cast(dot.c_str()), const_cast(pwd.c_str()), LOGON32_LOGON_NETWORK, LOGON32_PROVIDER_DEFAULT, &userToken)) error = GetLastError(); pwd.replace(0, string::npos, 1, (char)0); if (error != 0) { QPID_LOG(info, "SASL: Auth failed [" << error << "]: " << qpid::sys::strError(error)); throw ConnectionForcedException("Authentication failed"); } connection.setUserId(uid); client.tune(framing::CHANNEL_MAX, connection.getFrameMax(), 0, 0); } void SspiAuthenticator::step(const string& /*response*/) { QPID_LOG(info, "SASL: Need another step!!!"); } std::auto_ptr SspiAuthenticator::getSecurityLayer(uint16_t) { std::auto_ptr securityLayer; return securityLayer; } }} qpidc-0.16/src/qpid/broker/DtxTimeout.h0000664000076400007640000000246611625531570020440 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _DtxTimeout_ #define _DtxTimeout_ #include "qpid/Exception.h" #include "qpid/sys/Timer.h" namespace qpid { namespace broker { class DtxManager; struct DtxTimeoutException : public Exception { DtxTimeoutException(const std::string& msg=std::string()) : Exception(msg) {} }; struct DtxTimeout : public sys::TimerTask { const uint32_t timeout; DtxManager& mgr; const std::string xid; DtxTimeout(uint32_t timeout, DtxManager& mgr, const std::string& xid); void fire(); }; } } #endif qpidc-0.16/src/qpid/broker/ConnectionState.h0000664000076400007640000001124011704073160021412 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ConnectionState_ #define _ConnectionState_ #include #include "qpid/sys/AggregateOutput.h" #include "qpid/sys/ConnectionOutputHandlerPtr.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/management/Manageable.h" #include "qpid/Url.h" #include "qpid/broker/Broker.h" namespace qpid { namespace broker { class ConnectionState : public ConnectionToken, public management::Manageable { protected: sys::ConnectionOutputHandlerPtr out; public: ConnectionState(qpid::sys::ConnectionOutputHandler* o, Broker& b) : out(o), broker(b), outputTasks(out), framemax(65535), heartbeat(0), heartbeatmax(120), userProxyAuth(false), // Can proxy msgs with non-matching auth ids when true (used by federation links & clustering) federationLink(true), clusterOrderOut(0), isDefaultRealm(false) {} virtual ~ConnectionState () {} uint32_t getFrameMax() const { return framemax; } uint16_t getHeartbeat() const { return heartbeat; } uint16_t getHeartbeatMax() const { return heartbeatmax; } void setFrameMax(uint32_t fm) { framemax = std::max(fm, (uint32_t) 4096); } void setHeartbeat(uint16_t hb) { heartbeat = hb; } void setHeartbeatMax(uint16_t hbm) { heartbeatmax = hbm; } virtual void setUserId(const std::string& uid) { userId = uid; size_t at = userId.find('@'); userName = userId.substr(0, at); isDefaultRealm = ( at!= std::string::npos && getBroker().getOptions().realm == userId.substr(at+1,userId.size())); } const std::string& getUserId() const { return userId; } void setUrl(const std::string& _url) { url = _url; } const std::string& getUrl() const { return url; } void setUserProxyAuth(const bool b) { userProxyAuth = b; } bool isUserProxyAuth() const { return userProxyAuth || federationPeerTag.size() > 0; } // links can proxy msgs with non-matching auth ids void setFederationLink(bool b) { federationLink = b; } // deprecated - use setFederationPeerTag() instead bool isFederationLink() const { return federationPeerTag.size() > 0; } void setFederationPeerTag(const std::string& tag) { federationPeerTag = std::string(tag); } const std::string& getFederationPeerTag() const { return federationPeerTag; } std::vector& getKnownHosts() { return knownHosts; } /**@return true if user is the authenticated user on this connection. * If id has the default realm will also compare plain username. */ bool isAuthenticatedUser(const std::string& id) const { return (id == userId || (isDefaultRealm && id == userName)); } Broker& getBroker() { return broker; } Broker& broker; //contained output tasks sys::AggregateOutput outputTasks; sys::ConnectionOutputHandler& getOutput() { return out; } framing::ProtocolVersion getVersion() const { return version; } void setOutputHandler(qpid::sys::ConnectionOutputHandler* o) { out.set(o); } /** * If the broker is part of a cluster, this is a handler provided * by cluster code. It ensures consistent ordering of commands * that are sent based on criteria that are not predictably * ordered cluster-wide, e.g. a timer firing. */ framing::FrameHandler* getClusterOrderOutput() { return clusterOrderOut; } void setClusterOrderOutput(framing::FrameHandler& fh) { clusterOrderOut = &fh; } virtual void requestIOProcessing (boost::function0) = 0; protected: framing::ProtocolVersion version; uint32_t framemax; uint16_t heartbeat; uint16_t heartbeatmax; std::string userId; std::string url; bool userProxyAuth; bool federationLink; std::string federationPeerTag; std::vector knownHosts; framing::FrameHandler* clusterOrderOut; std::string userName; bool isDefaultRealm; }; }} #endif qpidc-0.16/src/qpid/broker/TxPublish.cpp0000664000076400007640000000742311546316057020610 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/log/Statement.h" #include "qpid/broker/TxPublish.h" #include "qpid/broker/Queue.h" using boost::intrusive_ptr; using namespace qpid::broker; TxPublish::TxPublish(intrusive_ptr _msg) : msg(_msg) {} bool TxPublish::prepare(TransactionContext* ctxt) throw() { try{ while (!queues.empty()) { prepare(ctxt, queues.front()); prepared.push_back(queues.front()); queues.pop_front(); } return true; }catch(const std::exception& e){ QPID_LOG(error, "Failed to prepare: " << e.what()); }catch(...){ QPID_LOG(error, "Failed to prepare (unknown error)"); } return false; } void TxPublish::commit() throw() { try { for_each(prepared.begin(), prepared.end(), Commit(msg)); if (msg->isContentReleaseRequested()) { // NOTE: The log messages in this section are used for flow-to-disk testing (which checks the log for the // presence of these messages). Do not change these without also checking these tests. if (msg->isContentReleaseBlocked()) { QPID_LOG(debug, "Message id=\"" << msg->getProperties()->getMessageId() << "\"; pid=0x" << std::hex << msg->getPersistenceId() << std::dec << ": Content release blocked on commit"); } else { msg->releaseContent(); QPID_LOG(debug, "Message id=\"" << msg->getProperties()->getMessageId() << "\"; pid=0x" << std::hex << msg->getPersistenceId() << std::dec << ": Content released on commit"); } } } catch (const std::exception& e) { QPID_LOG(error, "Failed to commit: " << e.what()); } catch(...) { QPID_LOG(error, "Failed to commit (unknown error)"); } } void TxPublish::rollback() throw() { try { for_each(prepared.begin(), prepared.end(), Rollback(msg)); } catch (const std::exception& e) { QPID_LOG(error, "Failed to complete rollback: " << e.what()); } catch(...) { QPID_LOG(error, "Failed to complete rollback (unknown error)"); } } void TxPublish::deliverTo(const boost::shared_ptr& queue){ if (!queue->isLocal(msg)) { queues.push_back(queue); delivered = true; } else { QPID_LOG(debug, "Won't enqueue local message for " << queue->getName()); } } void TxPublish::prepare(TransactionContext* ctxt, const boost::shared_ptr queue) { queue->enqueue(ctxt, msg); } TxPublish::Commit::Commit(intrusive_ptr& _msg) : msg(_msg){} void TxPublish::Commit::operator()(const boost::shared_ptr& queue){ queue->process(msg); } TxPublish::Rollback::Rollback(intrusive_ptr& _msg) : msg(_msg){} void TxPublish::Rollback::operator()(const boost::shared_ptr& queue){ queue->enqueueAborted(msg); } uint64_t TxPublish::contentSize () { return msg->contentSize (); } qpidc-0.16/src/qpid/broker/SaslAuthenticator.h0000664000076400007640000000401311645230314021747 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _SaslAuthenticator_ #define _SaslAuthenticator_ #include "qpid/framing/amqp_types.h" #include "qpid/framing/AMQP_ClientProxy.h" #include "qpid/Exception.h" #include "qpid/sys/SecurityLayer.h" #include #include #include #include namespace qpid { namespace broker { class Connection; class SaslAuthenticator { public: virtual ~SaslAuthenticator() {} virtual void getMechanisms(framing::Array& mechanisms) = 0; virtual void start(const std::string& mechanism, const std::string* response) = 0; virtual void step(const std::string& response) = 0; virtual void getUid(std::string&) {} virtual bool getUsername(std::string&) { return false; }; virtual void getError(std::string&) {} virtual std::auto_ptr getSecurityLayer(uint16_t maxFrameSize) = 0; static bool available(void); // Initialize the SASL mechanism; throw if it fails. static void init(const std::string& saslName, std::string const & saslConfigPath ); static void fini(void); static std::auto_ptr createAuthenticator(Connection& connection, bool isShadow); virtual void callUserIdCallbacks() { } }; }} #endif qpidc-0.16/src/qpid/broker/SessionHandler.cpp0000664000076400007640000001036411562043275021602 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/SessionHandler.h" #include "qpid/broker/SessionState.h" #include "qpid/broker/Connection.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace broker { using namespace framing; using namespace std; using namespace qpid::sys; SessionHandler::SessionHandler(Connection& c, ChannelId ch) : amqp_0_10::SessionHandler(&c.getOutput(), ch), connection(c), proxy(out), clusterOrderProxy(c.getClusterOrderOutput() ? new SetChannelProxy(ch, c.getClusterOrderOutput()) : 0) {} SessionHandler::~SessionHandler() {} void SessionHandler::connectionException(framing::connection::CloseCode code, const std::string& msg) { // NOTE: must tell the error listener _before_ calling connection.close() if (connection.getErrorListener()) connection.getErrorListener()->connectionError(msg); connection.close(code, msg); } void SessionHandler::channelException(framing::session::DetachCode, const std::string& msg) { if (connection.getErrorListener()) connection.getErrorListener()->sessionError(getChannel(), msg); } void SessionHandler::executionException(framing::execution::ErrorCode, const std::string& msg) { if (connection.getErrorListener()) connection.getErrorListener()->sessionError(getChannel(), msg); } ConnectionState& SessionHandler::getConnection() { return connection; } const ConnectionState& SessionHandler::getConnection() const { return connection; } void SessionHandler::handleDetach() { amqp_0_10::SessionHandler::handleDetach(); assert(&connection.getChannel(channel.get()) == this); if (session.get()) connection.getBroker().getSessionManager().detach(session); assert(!session.get()); connection.closeChannel(channel.get()); } void SessionHandler::setState(const std::string& name, bool force) { assert(!session.get()); SessionId id(connection.getUserId(), name); session = connection.broker.getSessionManager().attach(*this, id, force); } void SessionHandler::detaching() { assert(session.get()); session->disableOutput(); } FrameHandler* SessionHandler::getInHandler() { return session.get() ? &session->in : 0; } qpid::SessionState* SessionHandler::getState() { return session.get(); } void SessionHandler::readyToSend() { if (session.get()) session->readyToSend(); } /** * Used by inter-broker bridges to set up session id and attach */ void SessionHandler::attachAs(const std::string& name) { SessionId id(connection.getUserId(), name); SessionState::Configuration config = connection.broker.getSessionManager().getSessionConfig(); // Delay creating management object till attached(). In a cluster, // only the active link broker calls attachAs but all brokers // receive the subsequent attached() call. session.reset(new SessionState(connection.getBroker(), *this, id, config, true)); sendAttach(false); } /** * TODO: this is a little ugly, fix it; its currently still relied on * for 'push' bridges */ void SessionHandler::attached(const std::string& name) { if (session.get()) { session->addManagementObject(); // Delayed from attachAs() amqp_0_10::SessionHandler::attached(name); } else { SessionId id(connection.getUserId(), name); SessionState::Configuration config = connection.broker.getSessionManager().getSessionConfig(); session.reset(new SessionState(connection.getBroker(), *this, id, config)); markReadyToSend(); } } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/SecureConnectionFactory.h0000664000076400007640000000262711344233212023115 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _SecureConnectionFactory_ #define _SecureConnectionFactory_ #include "qpid/sys/ConnectionCodec.h" namespace qpid { namespace broker { class Broker; class SecureConnectionFactory : public sys::ConnectionCodec::Factory { public: SecureConnectionFactory(Broker& b); sys::ConnectionCodec* create(framing::ProtocolVersion, sys::OutputControl&, const std::string& id, const qpid::sys::SecuritySettings&); sys::ConnectionCodec* create(sys::OutputControl&, const std::string& id, const qpid::sys::SecuritySettings&); private: Broker& broker; }; }} #endif qpidc-0.16/src/qpid/broker/TxOpVisitor.h0000664000076400007640000000556311200322713020567 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_TXOPVISITOR_H #define QPID_BROKER_TXOPVISITOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { namespace broker { class DtxAck; class RecoveredDequeue; class RecoveredEnqueue; class TxAccept; class TxPublish; /** * Visitor for TxOp familly of classes. */ struct TxOpConstVisitor { virtual ~TxOpConstVisitor() {} virtual void operator()(const DtxAck&) = 0; virtual void operator()(const RecoveredDequeue&) = 0; virtual void operator()(const RecoveredEnqueue&) = 0; virtual void operator()(const TxAccept&) = 0; virtual void operator()(const TxPublish&) = 0; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_TXOPVISITOR_H*/ #ifndef QPID_BROKER_TXOPVISITOR_H #define QPID_BROKER_TXOPVISITOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { namespace broker { class DtxAck; class RecoveredDequeue; class RecoveredEnqueue; class TxAccept; class TxPublish; /** * Visitor for TxOp familly of classes. */ struct TxOpConstVisitor { virtual ~TxOpConstVisitor() {} virtual void operator()(const DtxAck&) = 0; virtual void operator()(const RecoveredDequeue&) = 0; virtual void operator()(const RecoveredEnqueue&) = 0; virtual void operator()(const TxAccept&) = 0; virtual void operator()(const TxPublish&) = 0; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_TXOPVISITOR_H*/ qpidc-0.16/src/qpid/broker/SemanticState.cpp0000664000076400007640000006417011725210040021414 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/SessionState.h" #include "qpid/broker/Connection.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/broker/DtxAck.h" #include "qpid/broker/DtxTimeout.h" #include "qpid/broker/Message.h" #include "qpid/broker/Queue.h" #include "qpid/broker/SessionContext.h" #include "qpid/broker/SessionOutputException.h" #include "qpid/broker/TxAccept.h" #include "qpid/broker/TxPublish.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/SequenceSet.h" #include "qpid/framing/IsInSequenceSet.h" #include "qpid/log/Statement.h" #include "qpid/sys/ClusterSafe.h" #include "qpid/ptr_map.h" #include "qpid/broker/AclModule.h" #include #include #include #include #include #include #include namespace qpid { namespace broker { using namespace std; using boost::intrusive_ptr; using boost::bind; using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::sys; using qpid::ptr_map_ptr; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; using qpid::management::Args; namespace _qmf = qmf::org::apache::qpid::broker; SemanticState::SemanticState(DeliveryAdapter& da, SessionContext& ss) : session(ss), deliveryAdapter(da), tagGenerator("sgen"), dtxSelected(false), authMsg(getSession().getBroker().getOptions().auth && !getSession().getConnection().isUserProxyAuth()), userID(getSession().getConnection().getUserId()), closeComplete(false) {} SemanticState::~SemanticState() { closed(); } void SemanticState::closed() { if (!closeComplete) { //prevent requeued messages being redelivered to consumers for (ConsumerImplMap::iterator i = consumers.begin(); i != consumers.end(); i++) { disable(i->second); } if (dtxBuffer.get()) { dtxBuffer->fail(); } recover(true); //now unsubscribe, which may trigger queue deletion and thus //needs to occur after the requeueing of unacked messages for (ConsumerImplMap::iterator i = consumers.begin(); i != consumers.end(); i++) { cancel(i->second); } closeComplete = true; } } bool SemanticState::exists(const string& consumerTag){ return consumers.find(consumerTag) != consumers.end(); } namespace { const std::string SEPARATOR("::"); } void SemanticState::consume(const string& tag, Queue::shared_ptr queue, bool ackRequired, bool acquire, bool exclusive, const string& resumeId, uint64_t resumeTtl, const FieldTable& arguments) { // "tag" is only guaranteed to be unique to this session (see AMQP 0-10 Message.subscribe, destination). // Create a globally unique name so the broker can identify individual consumers std::string name = session.getSessionId().str() + SEPARATOR + tag; const ConsumerFactories::Factories& cf( session.getBroker().getConsumerFactories().get()); ConsumerImpl::shared_ptr c; for (ConsumerFactories::Factories::const_iterator i = cf.begin(); i != cf.end() && !c; ++i) c = (*i)->create(this, name, queue, ackRequired, acquire, exclusive, tag, resumeId, resumeTtl, arguments); if (!c) // Create plain consumer c = ConsumerImpl::shared_ptr( new ConsumerImpl(this, name, queue, ackRequired, acquire, exclusive, tag, resumeId, resumeTtl, arguments)); queue->consume(c, exclusive);//may throw exception consumers[tag] = c; } bool SemanticState::cancel(const string& tag) { ConsumerImplMap::iterator i = consumers.find(tag); if (i != consumers.end()) { cancel(i->second); consumers.erase(i); //should cancel all unacked messages for this consumer so that //they are not redelivered on recovery for_each(unacked.begin(), unacked.end(), boost::bind(&DeliveryRecord::cancel, _1, tag)); //can also remove any records that are now redundant DeliveryRecords::iterator removed = remove_if(unacked.begin(), unacked.end(), bind(&DeliveryRecord::isRedundant, _1)); unacked.erase(removed, unacked.end()); return true; } else { return false; } } void SemanticState::startTx() { txBuffer = TxBuffer::shared_ptr(new TxBuffer()); } void SemanticState::commit(MessageStore* const store) { if (!txBuffer) throw CommandInvalidException(QPID_MSG("Session has not been selected for use with transactions")); TxOp::shared_ptr txAck(static_cast(new TxAccept(accumulatedAck, unacked))); txBuffer->enlist(txAck); if (txBuffer->commitLocal(store)) { accumulatedAck.clear(); } else { throw InternalErrorException(QPID_MSG("Commit failed")); } } void SemanticState::rollback() { if (!txBuffer) throw CommandInvalidException(QPID_MSG("Session has not been selected for use with transactions")); txBuffer->rollback(); accumulatedAck.clear(); } void SemanticState::selectDtx() { dtxSelected = true; } void SemanticState::startDtx(const std::string& xid, DtxManager& mgr, bool join) { if (!dtxSelected) { throw CommandInvalidException(QPID_MSG("Session has not been selected for use with dtx")); } dtxBuffer.reset(new DtxBuffer(xid)); txBuffer = dtxBuffer; if (join) { mgr.join(xid, dtxBuffer); } else { mgr.start(xid, dtxBuffer); } } void SemanticState::endDtx(const std::string& xid, bool fail) { if (!dtxBuffer) { throw IllegalStateException(QPID_MSG("xid " << xid << " not associated with this session")); } if (dtxBuffer->getXid() != xid) { throw CommandInvalidException( QPID_MSG("xid specified on start was " << dtxBuffer->getXid() << ", but " << xid << " specified on end")); } txBuffer.reset();//ops on this session no longer transactional checkDtxTimeout(); if (fail) { dtxBuffer->fail(); } else { dtxBuffer->markEnded(); } dtxBuffer.reset(); } void SemanticState::suspendDtx(const std::string& xid) { if (dtxBuffer->getXid() != xid) { throw CommandInvalidException( QPID_MSG("xid specified on start was " << dtxBuffer->getXid() << ", but " << xid << " specified on suspend")); } txBuffer.reset();//ops on this session no longer transactional checkDtxTimeout(); dtxBuffer->setSuspended(true); suspendedXids[xid] = dtxBuffer; dtxBuffer.reset(); } void SemanticState::resumeDtx(const std::string& xid) { if (!dtxSelected) { throw CommandInvalidException(QPID_MSG("Session has not been selected for use with dtx")); } dtxBuffer = suspendedXids[xid]; if (!dtxBuffer) { throw CommandInvalidException(QPID_MSG("xid " << xid << " not attached")); } else { suspendedXids.erase(xid); } if (dtxBuffer->getXid() != xid) { throw CommandInvalidException( QPID_MSG("xid specified on start was " << dtxBuffer->getXid() << ", but " << xid << " specified on resume")); } if (!dtxBuffer->isSuspended()) { throw CommandInvalidException(QPID_MSG("xid " << xid << " not suspended")); } checkDtxTimeout(); dtxBuffer->setSuspended(false); txBuffer = dtxBuffer; } void SemanticState::checkDtxTimeout() { if (dtxBuffer->isExpired()) { dtxBuffer.reset(); throw DtxTimeoutException(); } } void SemanticState::record(const DeliveryRecord& delivery) { unacked.push_back(delivery); } const std::string QPID_SYNC_FREQUENCY("qpid.sync_frequency"); SemanticState::ConsumerImpl::ConsumerImpl(SemanticState* _parent, const string& _name, Queue::shared_ptr _queue, bool ack, bool _acquire, bool _exclusive, const string& _tag, const string& _resumeId, uint64_t _resumeTtl, const framing::FieldTable& _arguments ) : Consumer(_name, _acquire), parent(_parent), queue(_queue), ackExpected(ack), acquire(_acquire), blocked(true), exclusive(_exclusive), resumeId(_resumeId), tag(_tag), resumeTtl(_resumeTtl), arguments(_arguments), notifyEnabled(true), syncFrequency(_arguments.getAsInt(QPID_SYNC_FREQUENCY)), deliveryCount(0), mgmtObject(0) { if (parent != 0 && queue.get() != 0 && queue->GetManagementObject() !=0) { ManagementAgent* agent = parent->session.getBroker().getManagementAgent(); qpid::management::Manageable* ms = dynamic_cast (&(parent->session)); if (agent != 0) { mgmtObject = new _qmf::Subscription(agent, this, ms , queue->GetManagementObject()->getObjectId(), getTag(), !acquire, ackExpected, exclusive, ManagementAgent::toMap(arguments)); agent->addObject (mgmtObject); mgmtObject->set_creditMode("WINDOW"); } } } ManagementObject* SemanticState::ConsumerImpl::GetManagementObject (void) const { return (ManagementObject*) mgmtObject; } Manageable::status_t SemanticState::ConsumerImpl::ManagementMethod (uint32_t methodId, Args&, string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; QPID_LOG (debug, "Queue::ManagementMethod [id=" << methodId << "]"); return status; } OwnershipToken* SemanticState::ConsumerImpl::getSession() { return &(parent->session); } bool SemanticState::ConsumerImpl::deliver(QueuedMessage& msg) { assertClusterSafe(); allocateCredit(msg.payload); DeliveryRecord record(msg, msg.queue->shared_from_this(), getTag(), shared_from_this(), acquire, !ackExpected, credit.isWindowMode(), 0); bool sync = syncFrequency && ++deliveryCount >= syncFrequency; if (sync) deliveryCount = 0;//reset parent->deliver(record, sync); if (credit.isWindowMode() || ackExpected || !acquire) { parent->record(record); } if (acquire && !ackExpected) { // auto acquire && auto accept msg.queue->dequeue(0, msg); record.setEnded(); } if (mgmtObject) { mgmtObject->inc_delivered(); } return true; } bool SemanticState::ConsumerImpl::filter(intrusive_ptr) { return true; } bool SemanticState::ConsumerImpl::accept(intrusive_ptr msg) { assertClusterSafe(); // TODO aconway 2009-06-08: if we have byte & message credit but // checkCredit fails because the message is to big, we should // remain on queue's listener list for possible smaller messages // in future. // blocked = !(filter(msg) && checkCredit(msg)); return !blocked; } namespace { struct ConsumerName { const SemanticState::ConsumerImpl& consumer; ConsumerName(const SemanticState::ConsumerImpl& ci) : consumer(ci) {} }; ostream& operator<<(ostream& o, const ConsumerName& pc) { return o << pc.consumer.getTag() << " on " << pc.consumer.getParent().getSession().getSessionId(); } } void SemanticState::ConsumerImpl::allocateCredit(intrusive_ptr& msg) { assertClusterSafe(); Credit original = credit; credit.consume(1, msg->getRequiredCredit()); QPID_LOG(debug, "Credit allocated for " << ConsumerName(*this) << ", was " << original << " now " << credit); } bool SemanticState::ConsumerImpl::checkCredit(intrusive_ptr& msg) { bool enoughCredit = credit.check(1, msg->getRequiredCredit()); QPID_LOG(debug, "Subscription " << ConsumerName(*this) << " has " << (enoughCredit ? "sufficient " : "insufficient") << " credit for message of " << msg->getRequiredCredit() << " bytes: " << credit); return enoughCredit; } SemanticState::ConsumerImpl::~ConsumerImpl() { if (mgmtObject != 0) mgmtObject->resourceDestroy (); } void SemanticState::disable(ConsumerImpl::shared_ptr c) { c->disableNotify(); if (session.isAttached()) session.getConnection().outputTasks.removeOutputTask(c.get()); } void SemanticState::cancel(ConsumerImpl::shared_ptr c) { disable(c); Queue::shared_ptr queue = c->getQueue(); if(queue) { queue->cancel(c); if (queue->canAutoDelete() && !queue->hasExclusiveOwner()) { Queue::tryAutoDelete(session.getBroker(), queue); } } c->cancel(); } void SemanticState::handle(intrusive_ptr msg) { if (txBuffer.get()) { TxPublish* deliverable(new TxPublish(msg)); TxOp::shared_ptr op(deliverable); route(msg, *deliverable); txBuffer->enlist(op); } else { DeliverableMessage deliverable(msg); route(msg, deliverable); if (msg->isContentReleaseRequested()) { // NOTE: The log messages in this section are used for flow-to-disk testing (which checks the log for the // presence of these messages). Do not change these without also checking these tests. if (msg->isContentReleaseBlocked()) { QPID_LOG(debug, "Message id=\"" << msg->getProperties()->getMessageId() << "\"; pid=0x" << std::hex << msg->getPersistenceId() << std::dec << ": Content release blocked"); } else { msg->releaseContent(); QPID_LOG(debug, "Message id=\"" << msg->getProperties()->getMessageId() << "\"; pid=0x" << std::hex << msg->getPersistenceId() << std::dec << ": Content released"); } } } } namespace { const std::string nullstring; } void SemanticState::route(intrusive_ptr msg, Deliverable& strategy) { msg->computeExpiration(getSession().getBroker().getExpiryPolicy()); std::string exchangeName = msg->getExchangeName(); if (!cacheExchange || cacheExchange->getName() != exchangeName || cacheExchange->isDestroyed()) { cacheExchange = session.getBroker().getExchanges().get(exchangeName); } cacheExchange->setProperties(msg); /* verify the userid if specified: */ std::string id = msg->hasProperties() ? msg->getProperties()->getUserId() : nullstring; if (authMsg && !id.empty() && !session.getConnection().isAuthenticatedUser(id)) { QPID_LOG(debug, "authorised user id : " << userID << " but user id in message declared as " << id); throw UnauthorizedAccessException(QPID_MSG("authorised user id : " << userID << " but user id in message declared as " << id)); } AclModule* acl = getSession().getBroker().getAcl(); if (acl && acl->doTransferAcl()) { if (!acl->authorise(getSession().getConnection().getUserId(),acl::ACT_PUBLISH,acl::OBJ_EXCHANGE,exchangeName, msg->getRoutingKey() )) throw UnauthorizedAccessException(QPID_MSG(userID << " cannot publish to " << exchangeName << " with routing-key " << msg->getRoutingKey())); } cacheExchange->route(strategy); if (!strategy.delivered) { //TODO:if discard-unroutable, just drop it //TODO:else if accept-mode is explicit, reject it //else route it to alternate exchange if (cacheExchange->getAlternate()) { cacheExchange->getAlternate()->route(strategy); } if (!strategy.delivered) { msg->destroy(); } } } void SemanticState::requestDispatch() { for (ConsumerImplMap::iterator i = consumers.begin(); i != consumers.end(); i++) i->second->requestDispatch(); } void SemanticState::ConsumerImpl::requestDispatch() { assertClusterSafe(); if (blocked) { parent->session.getConnection().outputTasks.addOutputTask(this); parent->session.getConnection().outputTasks.activateOutput(); blocked = false; } } bool SemanticState::complete(DeliveryRecord& delivery) { ConsumerImplMap::iterator i = consumers.find(delivery.getTag()); if (i != consumers.end()) { i->second->complete(delivery); } return delivery.isRedundant(); } void SemanticState::ConsumerImpl::complete(DeliveryRecord& delivery) { if (!delivery.isComplete()) { delivery.complete(); if (credit.isWindowMode()) { credit.moveWindow(1, delivery.getCredit()); } } } void SemanticState::recover(bool requeue) { if(requeue){ //take copy and clear unacked as requeue may result in redelivery to this session //which will in turn result in additions to unacked DeliveryRecords copy = unacked; unacked.clear(); for_each(copy.rbegin(), copy.rend(), mem_fun_ref(&DeliveryRecord::requeue)); }else{ for_each(unacked.begin(), unacked.end(), boost::bind(&DeliveryRecord::redeliver, _1, this)); //unconfirmed messages re redelivered and therefore have their //id adjusted, confirmed messages are not and so the ordering //w.r.t id is lost sort(unacked.begin(), unacked.end()); } } void SemanticState::deliver(DeliveryRecord& msg, bool sync) { return deliveryAdapter.deliver(msg, sync); } const SemanticState::ConsumerImpl::shared_ptr SemanticState::find(const std::string& destination) const { ConsumerImpl::shared_ptr consumer; if (!find(destination, consumer)) { throw NotFoundException(QPID_MSG("Unknown destination " << destination << " session=" << session.getSessionId())); } else { return consumer; } } bool SemanticState::find(const std::string& destination, ConsumerImpl::shared_ptr& consumer) const { // @todo KAG gsim: shouldn't the consumers map be locked???? ConsumerImplMap::const_iterator i = consumers.find(destination); if (i == consumers.end()) { return false; } consumer = i->second; return true; } void SemanticState::setWindowMode(const std::string& destination) { find(destination)->setWindowMode(); } void SemanticState::setCreditMode(const std::string& destination) { find(destination)->setCreditMode(); } void SemanticState::addByteCredit(const std::string& destination, uint32_t value) { ConsumerImpl::shared_ptr c = find(destination); c->addByteCredit(value); c->requestDispatch(); } void SemanticState::addMessageCredit(const std::string& destination, uint32_t value) { ConsumerImpl::shared_ptr c = find(destination); c->addMessageCredit(value); c->requestDispatch(); } void SemanticState::flush(const std::string& destination) { find(destination)->flush(); } void SemanticState::stop(const std::string& destination) { find(destination)->stop(); } void SemanticState::ConsumerImpl::setWindowMode() { assertClusterSafe(); credit.setWindowMode(true); if (mgmtObject){ mgmtObject->set_creditMode("WINDOW"); } } void SemanticState::ConsumerImpl::setCreditMode() { assertClusterSafe(); credit.setWindowMode(false); if (mgmtObject){ mgmtObject->set_creditMode("CREDIT"); } } void SemanticState::ConsumerImpl::addByteCredit(uint32_t value) { assertClusterSafe(); credit.addByteCredit(value); } void SemanticState::ConsumerImpl::addMessageCredit(uint32_t value) { assertClusterSafe(); credit.addMessageCredit(value); } bool SemanticState::ConsumerImpl::haveCredit() { if (credit) { return true; } else { blocked = true; return false; } } bool SemanticState::ConsumerImpl::doDispatch() { return queue->dispatch(shared_from_this()); } void SemanticState::ConsumerImpl::flush() { while(haveCredit() && doDispatch()) ; credit.cancel(); } void SemanticState::ConsumerImpl::stop() { assertClusterSafe(); credit.cancel(); } Queue::shared_ptr SemanticState::getQueue(const string& name) const { Queue::shared_ptr queue; if (name.empty()) { throw NotAllowedException(QPID_MSG("No queue name specified.")); } else { queue = session.getBroker().getQueues().find(name); if (!queue) throw NotFoundException(QPID_MSG("Queue not found: "<getId() <= last; ) { if (i->isRedundant()) i = unacked.erase(i); else i++; } } bool SemanticState::ConsumerImpl::doOutput() { try { return haveCredit() && doDispatch(); } catch (const SessionException& e) { throw SessionOutputException(e, parent->session.getChannel()); } } void SemanticState::ConsumerImpl::enableNotify() { Mutex::ScopedLock l(lock); assertClusterSafe(); notifyEnabled = true; } void SemanticState::ConsumerImpl::disableNotify() { Mutex::ScopedLock l(lock); notifyEnabled = false; } bool SemanticState::ConsumerImpl::isNotifyEnabled() const { Mutex::ScopedLock l(lock); return notifyEnabled; } void SemanticState::ConsumerImpl::notify() { Mutex::ScopedLock l(lock); assertClusterSafe(); if (notifyEnabled) { parent->session.getConnection().outputTasks.addOutputTask(this); parent->session.getConnection().outputTasks.activateOutput(); } } // Test that a DeliveryRecord's ID is in a sequence set and some other // predicate on DeliveryRecord holds. template struct IsInSequenceSetAnd { IsInSequenceSet isInSet; Predicate predicate; IsInSequenceSetAnd(const SequenceSet& s, Predicate p) : isInSet(s), predicate(p) {} bool operator()(DeliveryRecord& dr) { return isInSet(dr.getId()) && predicate(dr); } }; template IsInSequenceSetAnd isInSequenceSetAnd(const SequenceSet& s, Predicate p) { return IsInSequenceSetAnd(s,p); } void SemanticState::accepted(const SequenceSet& commands) { assertClusterSafe(); if (txBuffer.get()) { //in transactional mode, don't dequeue or remove, just //maintain set of acknowledged messages: accumulatedAck.add(commands); if (dtxBuffer.get()) { //if enlisted in a dtx, copy the relevant slice from //unacked and record it against that transaction TxOp::shared_ptr txAck(new DtxAck(accumulatedAck, unacked)); accumulatedAck.clear(); dtxBuffer->enlist(txAck); //mark the relevant messages as 'ended' in unacked //if the messages are already completed, they can be //removed from the record DeliveryRecords::iterator removed = remove_if(unacked.begin(), unacked.end(), isInSequenceSetAnd(commands, bind(&DeliveryRecord::setEnded, _1))); unacked.erase(removed, unacked.end()); } } else { DeliveryRecords::iterator removed = remove_if(unacked.begin(), unacked.end(), isInSequenceSetAnd(commands, bind(&DeliveryRecord::accept, _1, (TransactionContext*) 0))); unacked.erase(removed, unacked.end()); } } void SemanticState::completed(const SequenceSet& commands) { DeliveryRecords::iterator removed = remove_if(unacked.begin(), unacked.end(), isInSequenceSetAnd(commands, bind(&SemanticState::complete, this, _1))); unacked.erase(removed, unacked.end()); requestDispatch(); } void SemanticState::attached() { for (ConsumerImplMap::iterator i = consumers.begin(); i != consumers.end(); i++) { i->second->enableNotify(); session.getConnection().outputTasks.addOutputTask(i->second.get()); } session.getConnection().outputTasks.activateOutput(); } void SemanticState::detached() { for (ConsumerImplMap::iterator i = consumers.begin(); i != consumers.end(); i++) { i->second->disableNotify(); session.getConnection().outputTasks.removeOutputTask(i->second.get()); } } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/Vhost.cpp0000664000076400007640000000305511364405132017755 0ustar00jrossjross00000000000000// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/broker/Vhost.h" #include "qpid/broker/Broker.h" #include "qpid/management/ManagementAgent.h" using namespace qpid::broker; using qpid::management::ManagementAgent; namespace _qmf = qmf::org::apache::qpid::broker; namespace qpid { namespace management { class Manageable; }} Vhost::Vhost (qpid::management::Manageable* parentBroker, Broker* broker) : mgmtObject(0) { if (parentBroker != 0 && broker != 0) { ManagementAgent* agent = broker->getManagementAgent(); if (agent != 0) { mgmtObject = new _qmf::Vhost(agent, this, parentBroker, "/"); agent->addObject(mgmtObject, 0, true); } } } void Vhost::setFederationTag(const std::string& tag) { mgmtObject->set_federationTag(tag); } qpidc-0.16/src/qpid/broker/SessionManager.cpp0000664000076400007640000000706011364215470021574 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/SessionManager.h" #include "qpid/broker/SessionState.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include "qpid/log/Helpers.h" #include "qpid/memory.h" #include #include #include #include #include namespace qpid { namespace broker { using boost::intrusive_ptr; using namespace sys; using namespace framing; SessionManager::SessionManager(const SessionState::Configuration& c, Broker& b) : config(c), broker(b) {} SessionManager::~SessionManager() { detached.clear(); // Must clear before destructor as session dtor will call forget() } std::auto_ptr SessionManager::attach(SessionHandler& h, const SessionId& id, bool/*force*/) { Mutex::ScopedLock l(lock); eraseExpired(); // Clean up expired table std::pair insert = attached.insert(id); if (!insert.second) throw SessionBusyException(QPID_MSG("Session already attached: " << id)); Detached::iterator i = std::find(detached.begin(), detached.end(), id); std::auto_ptr state; if (i == detached.end()) state.reset(new SessionState(broker, h, id, config)); else { state.reset(detached.release(i).release()); state->attach(h); } return state; // FIXME aconway 2008-04-29: implement force } void SessionManager::detach(std::auto_ptr session) { Mutex::ScopedLock l(lock); attached.erase(session->getId()); session->detach(); if (session->getTimeout() > 0) { session->expiry = AbsTime(now(),session->getTimeout()*TIME_SEC); if (session->mgmtObject != 0) session->mgmtObject->set_expireTime ((uint64_t) Duration (EPOCH, session->expiry)); detached.push_back(session.release()); // In expiry order eraseExpired(); } } void SessionManager::forget(const SessionId& id) { Mutex::ScopedLock l(lock); attached.erase(id); } void SessionManager::eraseExpired() { // Called with lock held. if (!detached.empty()) { // This used to use a more elegant invocation of std::lower_bound // but violated the strict weak ordering rule which Visual Studio // enforced. See QPID-1424 for more info should you be tempted to // replace the loop with something more elegant. AbsTime now = AbsTime::now(); Detached::iterator keep = detached.begin(); while ((keep != detached.end()) && ((*keep).expiry < now)) keep++; if (detached.begin() != keep) { QPID_LOG(debug, "Expiring sessions: " << log::formatList(detached.begin(), keep)); detached.erase(detached.begin(), keep); } } } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/HeadersExchange.cpp0000664000076400007640000002602711725210040021665 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/HeadersExchange.h" #include "qpid/framing/FieldValue.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::sys; namespace _qmf = qmf::org::apache::qpid::broker; // TODO aconway 2006-09-20: More efficient matching algorithm. // The current search algorithm really sucks. // Fieldtables are heavy, maybe use shared_ptr to do handle-body. using namespace qpid::broker; namespace { const std::string x_match("x-match"); // possible values for x-match const std::string all("all"); const std::string any("any"); const std::string empty; // federation related args and values const std::string qpidFedOp("qpid.fed.op"); const std::string qpidFedTags("qpid.fed.tags"); const std::string qpidFedOrigin("qpid.fed.origin"); const std::string fedOpBind("B"); const std::string fedOpUnbind("U"); const std::string fedOpReorigin("R"); const std::string fedOpHello("H"); } HeadersExchange::HeadersExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange(_name, _parent, b) { if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } HeadersExchange::HeadersExchange(const std::string& _name, bool _durable, const FieldTable& _args, Manageable* _parent, Broker* b) : Exchange(_name, _durable, _args, _parent, b) { if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } std::string HeadersExchange::getMatch(const FieldTable* args) { if (!args) { throw InternalErrorException(QPID_MSG("No arguments given.")); } FieldTable::ValuePtr what = args->get(x_match); if (!what) { return empty; } if (!what->convertsTo()) { throw InternalErrorException(QPID_MSG("Invalid x-match binding format to headers exchange. Must be a string [\"all\" or \"any\"]")); } return what->get(); } bool HeadersExchange::bind(Queue::shared_ptr queue, const string& bindingKey, const FieldTable* args) { string fedOp(fedOpBind); string fedTags; string fedOrigin; if (args) { fedOp = args->getAsString(qpidFedOp); fedTags = args->getAsString(qpidFedTags); fedOrigin = args->getAsString(qpidFedOrigin); } bool propagate = false; // The federation args get propagated directly, so we need to identify // the non federation args in case a federated propagate is needed FieldTable extra_args; getNonFedArgs(args, extra_args); if (fedOp.empty() || fedOp == fedOpBind) { // x-match arg MUST be present for a bind call std::string x_match_value = getMatch(args); if (x_match_value != all && x_match_value != any) { throw InternalErrorException(QPID_MSG("Invalid or missing x-match value binding to headers exchange. Must be a string [\"all\" or \"any\"]")); } { Mutex::ScopedLock l(lock); //NOTE: do not include the fed op/tags/origin in the //arguments as when x-match is 'all' these would prevent //matching (they are internally added properties //controlling binding propagation but not relevant to //actual routing) Binding::shared_ptr binding (new Binding (bindingKey, queue, this, extra_args)); BoundKey bk(binding); if (bindings.add_unless(bk, MatchArgs(queue, &extra_args))) { binding->startManagement(); propagate = bk.fedBinding.addOrigin(queue->getName(), fedOrigin); if (mgmtExchange != 0) { mgmtExchange->inc_bindingCount(); } } else { bk.fedBinding.addOrigin(queue->getName(), fedOrigin); return false; } } // lock dropped } else if (fedOp == fedOpUnbind) { Mutex::ScopedLock l(lock); FedUnbindModifier modifier(queue->getName(), fedOrigin); bindings.modify_if(MatchKey(queue, bindingKey), modifier); propagate = modifier.shouldPropagate; if (modifier.shouldUnbind) { unbind(queue, bindingKey, args); } } else if (fedOp == fedOpReorigin) { Bindings::ConstPtr p = bindings.snapshot(); if (p.get()) { Mutex::ScopedLock l(lock); for (std::vector::const_iterator i = p->begin(); i != p->end(); ++i) { if ((*i).fedBinding.hasLocal()) { propagateFedOp( (*i).binding->key, string(), fedOpBind, string()); } } } } routeIVE(); if (propagate) { FieldTable * prop_args = (extra_args.count() != 0 ? &extra_args : 0); propagateFedOp(bindingKey, fedTags, fedOp, fedOrigin, prop_args); } return true; } bool HeadersExchange::unbind(Queue::shared_ptr queue, const string& bindingKey, const FieldTable *args){ bool propagate = false; string fedOrigin(args ? args->getAsString(qpidFedOrigin) : ""); { Mutex::ScopedLock l(lock); FedUnbindModifier modifier(queue->getName(), fedOrigin); MatchKey match_key(queue, bindingKey); bindings.modify_if(match_key, modifier); propagate = modifier.shouldPropagate; if (modifier.shouldUnbind) { if (bindings.remove_if(match_key)) { if (mgmtExchange != 0) { mgmtExchange->dec_bindingCount(); } } else { return false; } } } if (propagate) { propagateFedOp(bindingKey, string(), fedOpUnbind, string()); } return true; } void HeadersExchange::route(Deliverable& msg) { const FieldTable* args = msg.getMessage().getApplicationHeaders(); if (!args) { //can't match if there were no headers passed in if (mgmtExchange != 0) { mgmtExchange->inc_msgReceives(); mgmtExchange->inc_byteReceives(msg.contentSize()); mgmtExchange->inc_msgDrops(); mgmtExchange->inc_byteDrops(msg.contentSize()); if (brokerMgmtObject) brokerMgmtObject->inc_discardsNoRoute(); } return; } PreRoute pr(msg, this); BindingList b(new std::vector >); Bindings::ConstPtr p = bindings.snapshot(); if (p.get()) { for (std::vector::const_iterator i = p->begin(); i != p->end(); ++i) { if (match((*i).binding->args, *args)) { b->push_back((*i).binding); } } } doRoute(msg, b); } bool HeadersExchange::isBound(Queue::shared_ptr queue, const string* const, const FieldTable* const args) { Bindings::ConstPtr p = bindings.snapshot(); if (p.get()){ for (std::vector::const_iterator i = p->begin(); i != p->end(); ++i) { if ( (!args || equal((*i).binding->args, *args)) && (!queue || (*i).binding->queue == queue)) { return true; } } } return false; } void HeadersExchange::getNonFedArgs(const FieldTable* args, FieldTable& nonFedArgs) { if (!args) { return; } for (qpid::framing::FieldTable::ValueMap::const_iterator i=args->begin(); i != args->end(); ++i) { const string & name(i->first); if (name == qpidFedOp || name == qpidFedTags || name == qpidFedOrigin) { continue; } nonFedArgs.insert((*i)); } } HeadersExchange::~HeadersExchange() {} const std::string HeadersExchange::typeName("headers"); namespace { bool match_values(const FieldValue& bind, const FieldValue& msg) { return bind.getType() == 0xf0 || bind == msg; } } bool HeadersExchange::match(const FieldTable& bind, const FieldTable& msg) { typedef FieldTable::ValueMap Map; std::string what = getMatch(&bind); if (what == all) { for (Map::const_iterator i = bind.begin(); i != bind.end(); ++i) { if (i->first != x_match) { Map::const_iterator j = msg.find(i->first); if (j == msg.end()) return false; if (!match_values(*(i->second), *(j->second))) return false; } } return true; } else if (what == any) { for (Map::const_iterator i = bind.begin(); i != bind.end(); ++i) { if (i->first != x_match) { Map::const_iterator j = msg.find(i->first); if (j != msg.end()) { if (match_values(*(i->second), *(j->second))) return true; } } } return false; } else { return false; } } bool HeadersExchange::equal(const FieldTable& a, const FieldTable& b) { typedef FieldTable::ValueMap Map; for (Map::const_iterator i = a.begin(); i != a.end(); ++i) { Map::const_iterator j = b.find(i->first); if (j == b.end()) return false; if (!match_values(*(i->second), *(j->second))) return false; } return true; } //--------- HeadersExchange::MatchArgs::MatchArgs(Queue::shared_ptr q, const qpid::framing::FieldTable* a) : queue(q), args(a) {} bool HeadersExchange::MatchArgs::operator()(BoundKey & bk) { return bk.binding->queue == queue && bk.binding->args == *args; } //--------- HeadersExchange::MatchKey::MatchKey(Queue::shared_ptr q, const std::string& k) : queue(q), key(k) {} bool HeadersExchange::MatchKey::operator()(BoundKey & bk) { return bk.binding->queue == queue && bk.binding->key == key; } //---------- HeadersExchange::FedUnbindModifier::FedUnbindModifier(const string& queueName, const string& origin) : queueName(queueName), fedOrigin(origin), shouldUnbind(false), shouldPropagate(false) {} HeadersExchange::FedUnbindModifier::FedUnbindModifier() : shouldUnbind(false), shouldPropagate(false) {} bool HeadersExchange::FedUnbindModifier::operator()(BoundKey & bk) { shouldPropagate = bk.fedBinding.delOrigin(queueName, fedOrigin); if (bk.fedBinding.countFedBindings(queueName) == 0) { shouldUnbind = true; } return true; } qpidc-0.16/src/qpid/broker/ExchangeRegistry.cpp0000664000076400007640000001107511705641335022134 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/ExchangeRegistry.h" #include "qpid/broker/DirectExchange.h" #include "qpid/broker/FanOutExchange.h" #include "qpid/broker/HeadersExchange.h" #include "qpid/broker/TopicExchange.h" #include "qpid/management/ManagementDirectExchange.h" #include "qpid/management/ManagementTopicExchange.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::broker; using namespace qpid::sys; using std::pair; using std::string; using qpid::framing::FieldTable; pair ExchangeRegistry::declare(const string& name, const string& type){ return declare(name, type, false, FieldTable()); } pair ExchangeRegistry::declare(const string& name, const string& type, bool durable, const FieldTable& args){ RWlock::ScopedWlock locker(lock); ExchangeMap::iterator i = exchanges.find(name); if (i == exchanges.end()) { Exchange::shared_ptr exchange; if (type == TopicExchange::typeName){ exchange = Exchange::shared_ptr(new TopicExchange(name, durable, args, parent, broker)); }else if(type == DirectExchange::typeName){ exchange = Exchange::shared_ptr(new DirectExchange(name, durable, args, parent, broker)); }else if(type == FanOutExchange::typeName){ exchange = Exchange::shared_ptr(new FanOutExchange(name, durable, args, parent, broker)); }else if (type == HeadersExchange::typeName) { exchange = Exchange::shared_ptr(new HeadersExchange(name, durable, args, parent, broker)); }else if (type == ManagementDirectExchange::typeName) { exchange = Exchange::shared_ptr(new ManagementDirectExchange(name, durable, args, parent, broker)); }else if (type == ManagementTopicExchange::typeName) { exchange = Exchange::shared_ptr(new ManagementTopicExchange(name, durable, args, parent, broker)); }else{ FunctionMap::iterator i = factory.find(type); if (i == factory.end()) { throw UnknownExchangeTypeException(); } else { exchange = i->second(name, durable, args, parent, broker); } } exchanges[name] = exchange; return std::pair(exchange, true); } else { return std::pair(i->second, false); } } void ExchangeRegistry::destroy(const string& name){ if (name.empty() || (name.find("amq.") == 0 && (name == "amq.direct" || name == "amq.fanout" || name == "amq.topic" || name == "amq.match")) || name == "qpid.management") throw framing::NotAllowedException(QPID_MSG("Cannot delete default exchange: '" << name << "'")); RWlock::ScopedWlock locker(lock); ExchangeMap::iterator i = exchanges.find(name); if (i != exchanges.end()) { i->second->destroy(); exchanges.erase(i); } } Exchange::shared_ptr ExchangeRegistry::find(const string& name){ RWlock::ScopedRlock locker(lock); ExchangeMap::iterator i = exchanges.find(name); if (i == exchanges.end()) return Exchange::shared_ptr(); else return i->second; } Exchange::shared_ptr ExchangeRegistry::get(const string& name) { Exchange::shared_ptr ex = find(name); if (!ex) throw framing::NotFoundException(QPID_MSG("Exchange not found: "<getName(), ex)).second; } void ExchangeRegistry::registerType(const std::string& type, FactoryFunction f) { factory[type] = f; } namespace { const std::string empty; } Exchange::shared_ptr ExchangeRegistry::getDefault() { return get(empty); } qpidc-0.16/src/qpid/broker/QueueFlowLimit.cpp0000664000076400007640000004044211643605374021600 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/QueueFlowLimit.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Queue.h" #include "qpid/Exception.h" #include "qpid/framing/FieldValue.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include "qpid/sys/Mutex.h" #include "qpid/broker/SessionState.h" #include "qpid/sys/ClusterSafe.h" #include "qmf/org/apache/qpid/broker/Queue.h" #include using namespace qpid::broker; using namespace qpid::framing; namespace { /** ensure that the configured flow control stop and resume values are * valid with respect to the maximum queue capacity, and each other */ template void validateFlowConfig(T max, T& stop, T& resume, const std::string& type, const std::string& queue) { if (resume > stop) { throw InvalidArgumentException(QPID_MSG("Queue \"" << queue << "\": qpid.flow_resume_" << type << "=" << resume << " must be less than qpid.flow_stop_" << type << "=" << stop)); } if (resume == 0) resume = stop; if (max != 0 && (max < stop)) { throw InvalidArgumentException(QPID_MSG("Queue \"" << queue << "\": qpid.flow_stop_" << type << "=" << stop << " must be less than qpid.max_" << type << "=" << max)); } } /** extract a capacity value as passed in an argument map */ uint64_t getCapacity(const FieldTable& settings, const std::string& key, uint64_t defaultValue) { FieldTable::ValuePtr v = settings.get(key); int64_t result = 0; if (!v) return defaultValue; if (v->getType() == 0x23) { QPID_LOG(debug, "Value for " << key << " specified as float: " << v->get()); } else if (v->getType() == 0x33) { QPID_LOG(debug, "Value for " << key << " specified as double: " << v->get()); } else if (v->convertsTo()) { result = v->get(); QPID_LOG(debug, "Got integer value for " << key << ": " << result); if (result >= 0) return result; } else if (v->convertsTo()) { string s(v->get()); QPID_LOG(debug, "Got string value for " << key << ": " << s); std::istringstream convert(s); if (convert >> result && result >= 0) return result; } QPID_LOG(warning, "Cannot convert " << key << " to unsigned integer, using default (" << defaultValue << ")"); return defaultValue; } } QueueFlowLimit::QueueFlowLimit(Queue *_queue, uint32_t _flowStopCount, uint32_t _flowResumeCount, uint64_t _flowStopSize, uint64_t _flowResumeSize) : StatefulQueueObserver(std::string("QueueFlowLimit")), queue(_queue), queueName(""), flowStopCount(_flowStopCount), flowResumeCount(_flowResumeCount), flowStopSize(_flowStopSize), flowResumeSize(_flowResumeSize), flowStopped(false), count(0), size(0), queueMgmtObj(0), broker(0) { uint32_t maxCount(0); uint64_t maxSize(0); if (queue) { queueName = _queue->getName(); if (queue->getPolicy()) { maxSize = _queue->getPolicy()->getMaxSize(); maxCount = _queue->getPolicy()->getMaxCount(); } broker = queue->getBroker(); queueMgmtObj = dynamic_cast<_qmfBroker::Queue*> (queue->GetManagementObject()); if (queueMgmtObj) { queueMgmtObj->set_flowStopped(isFlowControlActive()); } } validateFlowConfig( maxCount, flowStopCount, flowResumeCount, "count", queueName ); validateFlowConfig( maxSize, flowStopSize, flowResumeSize, "size", queueName ); QPID_LOG(info, "Queue \"" << queueName << "\": Flow limit created: flowStopCount=" << flowStopCount << ", flowResumeCount=" << flowResumeCount << ", flowStopSize=" << flowStopSize << ", flowResumeSize=" << flowResumeSize ); } QueueFlowLimit::~QueueFlowLimit() { sys::Mutex::ScopedLock l(indexLock); if (!index.empty()) { // we're gone - release all pending msgs for (std::map >::iterator itr = index.begin(); itr != index.end(); ++itr) if (itr->second) try { itr->second->getIngressCompletion().finishCompleter(); } catch (...) {} // ignore - not safe for a destructor to throw. index.clear(); } } void QueueFlowLimit::enqueued(const QueuedMessage& msg) { sys::Mutex::ScopedLock l(indexLock); ++count; size += msg.payload->contentSize(); if (!flowStopped) { if (flowStopCount && count > flowStopCount) { flowStopped = true; QPID_LOG(info, "Queue \"" << queueName << "\": has reached " << flowStopCount << " enqueued messages. Producer flow control activated." ); } else if (flowStopSize && size > flowStopSize) { flowStopped = true; QPID_LOG(info, "Queue \"" << queueName << "\": has reached " << flowStopSize << " enqueued bytes. Producer flow control activated." ); } if (flowStopped && queueMgmtObj) { queueMgmtObj->set_flowStopped(true); queueMgmtObj->inc_flowStoppedCount(); } } if (flowStopped || !index.empty()) { // ignore flow control if we are populating the queue due to cluster replication: if (broker && broker->isClusterUpdatee()) { QPID_LOG(trace, "Queue \"" << queueName << "\": ignoring flow control for msg pos=" << msg.position); return; } QPID_LOG(trace, "Queue \"" << queueName << "\": setting flow control for msg pos=" << msg.position); msg.payload->getIngressCompletion().startCompleter(); // don't complete until flow resumes bool unique; unique = index.insert(std::pair >(msg.position, msg.payload)).second; // Like this to avoid tripping up unused variable warning when NDEBUG set if (!unique) assert(unique); } } void QueueFlowLimit::dequeued(const QueuedMessage& msg) { sys::Mutex::ScopedLock l(indexLock); if (count > 0) { --count; } else { throw Exception(QPID_MSG("Flow limit count underflow on dequeue. Queue=" << queueName)); } uint64_t _size = msg.payload->contentSize(); if (_size <= size) { size -= _size; } else { throw Exception(QPID_MSG("Flow limit size underflow on dequeue. Queue=" << queueName)); } if (flowStopped && (flowResumeSize == 0 || size < flowResumeSize) && (flowResumeCount == 0 || count < flowResumeCount)) { flowStopped = false; if (queueMgmtObj) queueMgmtObj->set_flowStopped(false); QPID_LOG(info, "Queue \"" << queueName << "\": has drained below the flow control resume level. Producer flow control deactivated." ); } if (!index.empty()) { if (!flowStopped) { // flow enabled - release all pending msgs for (std::map >::iterator itr = index.begin(); itr != index.end(); ++itr) if (itr->second) itr->second->getIngressCompletion().finishCompleter(); index.clear(); } else { // even if flow controlled, we must release this msg as it is being dequeued std::map >::iterator itr = index.find(msg.position); if (itr != index.end()) { // this msg is flow controlled, release it: msg.payload->getIngressCompletion().finishCompleter(); index.erase(itr); } } } } void QueueFlowLimit::encode(Buffer& buffer) const { buffer.putLong(flowStopCount); buffer.putLong(flowResumeCount); buffer.putLongLong(flowStopSize); buffer.putLongLong(flowResumeSize); buffer.putLong(count); buffer.putLongLong(size); } void QueueFlowLimit::decode ( Buffer& buffer ) { flowStopCount = buffer.getLong(); flowResumeCount = buffer.getLong(); flowStopSize = buffer.getLongLong(); flowResumeSize = buffer.getLongLong(); count = buffer.getLong(); size = buffer.getLongLong(); } uint32_t QueueFlowLimit::encodedSize() const { return sizeof(uint32_t) + // flowStopCount sizeof(uint32_t) + // flowResumecount sizeof(uint64_t) + // flowStopSize sizeof(uint64_t) + // flowResumeSize sizeof(uint32_t) + // count sizeof(uint64_t); // size } const std::string QueueFlowLimit::flowStopCountKey("qpid.flow_stop_count"); const std::string QueueFlowLimit::flowResumeCountKey("qpid.flow_resume_count"); const std::string QueueFlowLimit::flowStopSizeKey("qpid.flow_stop_size"); const std::string QueueFlowLimit::flowResumeSizeKey("qpid.flow_resume_size"); uint64_t QueueFlowLimit::defaultMaxSize; uint QueueFlowLimit::defaultFlowStopRatio; uint QueueFlowLimit::defaultFlowResumeRatio; void QueueFlowLimit::setDefaults(uint64_t maxQueueSize, uint flowStopRatio, uint flowResumeRatio) { defaultMaxSize = maxQueueSize; defaultFlowStopRatio = flowStopRatio; defaultFlowResumeRatio = flowResumeRatio; /** @todo KAG: Verify valid range on Broker::Options instead of here */ if (flowStopRatio > 100 || flowResumeRatio > 100) throw InvalidArgumentException(QPID_MSG("Default queue flow ratios must be between 0 and 100, inclusive:" << " flowStopRatio=" << flowStopRatio << " flowResumeRatio=" << flowResumeRatio)); if (flowResumeRatio > flowStopRatio) throw InvalidArgumentException(QPID_MSG("Default queue flow stop ratio must be >= flow resume ratio:" << " flowStopRatio=" << flowStopRatio << " flowResumeRatio=" << flowResumeRatio)); } void QueueFlowLimit::observe(Queue& queue, const qpid::framing::FieldTable& settings) { QueueFlowLimit *ptr = createLimit( &queue, settings ); if (ptr) { boost::shared_ptr observer(ptr); queue.addObserver(observer); } } /** returns ptr to a QueueFlowLimit, else 0 if no limit */ QueueFlowLimit *QueueFlowLimit::createLimit(Queue *queue, const qpid::framing::FieldTable& settings) { std::string type(QueuePolicy::getType(settings)); if (type == QueuePolicy::RING || type == QueuePolicy::RING_STRICT) { // The size of a RING queue is limited by design - no need for flow control. return 0; } if (settings.get(flowStopCountKey) || settings.get(flowStopSizeKey) || settings.get(flowResumeCountKey) || settings.get(flowResumeSizeKey)) { // user provided (some) flow settings manually... uint32_t flowStopCount = getCapacity(settings, flowStopCountKey, 0); uint32_t flowResumeCount = getCapacity(settings, flowResumeCountKey, 0); uint64_t flowStopSize = getCapacity(settings, flowStopSizeKey, 0); uint64_t flowResumeSize = getCapacity(settings, flowResumeSizeKey, 0); if (flowStopCount == 0 && flowStopSize == 0) { // disable flow control return 0; } return new QueueFlowLimit(queue, flowStopCount, flowResumeCount, flowStopSize, flowResumeSize); } if (defaultFlowStopRatio) { // broker has a default ratio setup... uint64_t maxByteCount = getCapacity(settings, QueuePolicy::maxSizeKey, defaultMaxSize); uint64_t flowStopSize = (uint64_t)(maxByteCount * (defaultFlowStopRatio/100.0) + 0.5); uint64_t flowResumeSize = (uint64_t)(maxByteCount * (defaultFlowResumeRatio/100.0)); uint32_t maxMsgCount = getCapacity(settings, QueuePolicy::maxCountKey, 0); // no size by default uint32_t flowStopCount = (uint32_t)(maxMsgCount * (defaultFlowStopRatio/100.0) + 0.5); uint32_t flowResumeCount = (uint32_t)(maxMsgCount * (defaultFlowResumeRatio/100.0)); return new QueueFlowLimit(queue, flowStopCount, flowResumeCount, flowStopSize, flowResumeSize); } return 0; } /* Cluster replication */ namespace { /** pack a set of sequence number ranges into a framing::Array */ void buildSeqRangeArray(qpid::framing::Array *seqs, const qpid::framing::SequenceNumber& first, const qpid::framing::SequenceNumber& last) { seqs->push_back(qpid::framing::Array::ValuePtr(new Unsigned32Value(first))); seqs->push_back(qpid::framing::Array::ValuePtr(new Unsigned32Value(last))); } } /** Runs on UPDATER to snapshot current state */ void QueueFlowLimit::getState(qpid::framing::FieldTable& state ) const { sys::Mutex::ScopedLock l(indexLock); state.clear(); framing::SequenceSet ss; if (!index.empty()) { /* replicate the set of messages pending flow control */ for (std::map >::const_iterator itr = index.begin(); itr != index.end(); ++itr) { ss.add(itr->first); } framing::Array seqs(TYPE_CODE_UINT32); typedef boost::function arrayBuilder; ss.for_each((arrayBuilder)boost::bind(&buildSeqRangeArray, &seqs, _1, _2)); state.setArray("pendingMsgSeqs", seqs); } QPID_LOG(debug, "Queue \"" << queueName << "\": flow limit replicating pending msgs, range=" << ss); } /** called on UPDATEE to set state from snapshot */ void QueueFlowLimit::setState(const qpid::framing::FieldTable& state) { sys::Mutex::ScopedLock l(indexLock); index.clear(); framing::SequenceSet fcmsg; framing::Array seqArray(TYPE_CODE_UINT32); if (state.getArray("pendingMsgSeqs", seqArray)) { assert((seqArray.count() & 0x01) == 0); // must be even since they are sequence ranges framing::Array::const_iterator i = seqArray.begin(); while (i != seqArray.end()) { framing::SequenceNumber first((*i)->getIntegerValue()); ++i; framing::SequenceNumber last((*i)->getIntegerValue()); ++i; fcmsg.add(first, last); for (SequenceNumber seq = first; seq <= last; ++seq) { QueuedMessage msg; queue->find(seq, msg); // fyi: may not be found if msg is acquired & unacked bool unique; unique = index.insert(std::pair >(seq, msg.payload)).second; // Like this to avoid tripping up unused variable warning when NDEBUG set if (!unique) assert(unique); } } } flowStopped = index.size() != 0; if (queueMgmtObj) { queueMgmtObj->set_flowStopped(isFlowControlActive()); } QPID_LOG(debug, "Queue \"" << queueName << "\": flow limit replicated the pending msgs, range=" << fcmsg) } namespace qpid { namespace broker { std::ostream& operator<<(std::ostream& out, const QueueFlowLimit& f) { out << "; flowStopCount=" << f.flowStopCount << ", flowResumeCount=" << f.flowResumeCount; out << "; flowStopSize=" << f.flowStopSize << ", flowResumeSize=" << f.flowResumeSize; return out; } } } qpidc-0.16/src/qpid/broker/RecoveredEnqueue.cpp0000664000076400007640000000262011546316057022126 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Queue.h" #include "qpid/broker/RecoveredEnqueue.h" using boost::intrusive_ptr; using namespace qpid::broker; RecoveredEnqueue::RecoveredEnqueue(Queue::shared_ptr _queue, intrusive_ptr _msg) : queue(_queue), msg(_msg) { queue->recoverPrepared(msg); } bool RecoveredEnqueue::prepare(TransactionContext*) throw(){ //should never be called; transaction has already prepared if an enqueue is recovered return false; } void RecoveredEnqueue::commit() throw(){ queue->process(msg); } void RecoveredEnqueue::rollback() throw(){ queue->enqueueAborted(msg); } qpidc-0.16/src/qpid/broker/PersistableQueue.h0000664000076400007640000000371611373552075021616 0ustar00jrossjross00000000000000#ifndef _broker_PersistableQueue_h #define _broker_PersistableQueue_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/broker/Persistable.h" #include "qpid/management/Manageable.h" #include namespace qpid { namespace broker { /** * Empty class to be used by any module that wanted to set an external per queue store into * persistableQueue */ class ExternalQueueStore : public management::Manageable { public: virtual ~ExternalQueueStore() {}; }; /** * The interface queues must expose to the MessageStore in order to be * persistable. */ class PersistableQueue : public Persistable { public: typedef boost::shared_ptr shared_ptr; virtual const std::string& getName() const = 0; virtual ~PersistableQueue() { if (externalQueueStore) delete externalQueueStore; }; virtual void setExternalQueueStore(ExternalQueueStore* inst) = 0; virtual void flush() = 0; inline ExternalQueueStore* getExternalQueueStore() const {return externalQueueStore;}; PersistableQueue():externalQueueStore(NULL){ }; protected: ExternalQueueStore* externalQueueStore; }; }} #endif qpidc-0.16/src/qpid/broker/Connection.h0000664000076400007640000001623711717465066020442 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_CONNECTION_H #define QPID_BROKER_CONNECTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include "qpid/broker/ConnectionHandler.h" #include "qpid/broker/ConnectionState.h" #include "qpid/broker/SessionHandler.h" #include "qmf/org/apache/qpid/broker/Connection.h" #include "qpid/Exception.h" #include "qpid/RefCounted.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AMQP_ClientProxy.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/management/ManagementAgent.h" #include "qpid/management/Manageable.h" #include "qpid/ptr_map.h" #include "qpid/sys/AggregateOutput.h" #include "qpid/sys/ConnectionInputHandler.h" #include "qpid/sys/ConnectionOutputHandler.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/sys/Socket.h" #include "qpid/sys/TimeoutHandler.h" #include "qpid/sys/Mutex.h" #include #include #include namespace qpid { namespace broker { class Broker; class LinkRegistry; class SecureConnection; struct ConnectionTimeoutTask; class Connection : public sys::ConnectionInputHandler, public ConnectionState, public RefCounted { public: /** * Listener that can be registered with a Connection to be informed of errors. */ class ErrorListener { public: virtual ~ErrorListener() {} virtual void sessionError(uint16_t channel, const std::string&) = 0; virtual void connectionError(const std::string&) = 0; }; Connection(sys::ConnectionOutputHandler* out, Broker& broker, const std::string& mgmtId, const qpid::sys::SecuritySettings&, bool isLink = false, uint64_t objectId = 0, bool shadow=false, bool delayManagement = false); ~Connection (); /** Get the SessionHandler for channel. Create if it does not already exist */ SessionHandler& getChannel(framing::ChannelId channel); /** Close the connection */ void close(framing::connection::CloseCode code, const std::string& text); // ConnectionInputHandler methods void received(framing::AMQFrame& frame); void idleOut(); void idleIn(); bool doOutput(); void closed(); void closeChannel(framing::ChannelId channel); // Manageable entry points management::ManagementObject* GetManagementObject (void) const; management::Manageable::status_t ManagementMethod (uint32_t methodId, management::Args& args, std::string&); void requestIOProcessing (boost::function0); void recordFromServer (const framing::AMQFrame& frame); void recordFromClient (const framing::AMQFrame& frame); std::string getAuthMechanism(); std::string getAuthCredentials(); std::string getUsername(); std::string getPassword(); std::string getHost(); uint16_t getPort(); void notifyConnectionForced(const std::string& text); void setUserId(const std::string& uid); void raiseConnectEvent(); const std::string& getUserId() const { return ConnectionState::getUserId(); } const std::string& getMgmtId() const { return mgmtId; } management::ManagementAgent* getAgent() const { return agent; } void setUserProxyAuth(bool b); /** Connection does not delete the listener. 0 resets. */ void setErrorListener(ErrorListener* l) { errorListener=l; } ErrorListener* getErrorListener() { return errorListener; } void setHeartbeatInterval(uint16_t heartbeat); void sendHeartbeat(); void restartTimeout(); void abort(); template void eachSessionHandler(F f) { for (ChannelMap::iterator i = channels.begin(); i != channels.end(); ++i) f(*ptr_map_ptr(i)); } void sendClose(); void setSecureConnection(SecureConnection* secured); /** True if this is a shadow connection in a cluster. */ bool isShadow() { return shadow; } // Used by cluster to update connection status sys::AggregateOutput& getOutputTasks() { return outputTasks; } /** Cluster delays adding management object in the constructor then calls this. */ void addManagementObject(); const qpid::sys::SecuritySettings& getExternalSecuritySettings() const { return securitySettings; } /** @return true if the initial connection negotiation is complete. */ bool isOpen(); bool isLink() { return link; } // Used by cluster during catch-up, see cluster::OutputInterceptor void doIoCallbacks(); void setClientProperties(const framing::FieldTable& cp) { clientProperties = cp; } const framing::FieldTable& getClientProperties() const { return clientProperties; } private: typedef boost::ptr_map ChannelMap; typedef std::vector >::iterator queue_iterator; ChannelMap channels; qpid::sys::SecuritySettings securitySettings; ConnectionHandler adapter; const bool link; bool mgmtClosing; const std::string mgmtId; sys::Mutex ioCallbackLock; std::queue > ioCallbacks; qmf::org::apache::qpid::broker::Connection* mgmtObject; LinkRegistry& links; management::ManagementAgent* agent; sys::Timer& timer; boost::intrusive_ptr heartbeatTimer; boost::intrusive_ptr timeoutTimer; ErrorListener* errorListener; uint64_t objectId; bool shadow; framing::FieldTable clientProperties; /** * Chained ConnectionOutputHandler that allows outgoing frames to be * tracked (for updating mgmt stats). */ class OutboundFrameTracker : public sys::ConnectionOutputHandler { public: OutboundFrameTracker(Connection&); void close(); size_t getBuffered() const; void abort(); void activateOutput(); void giveReadCredit(int32_t credit); void send(framing::AMQFrame&); void wrap(sys::ConnectionOutputHandlerPtr&); private: Connection& con; sys::ConnectionOutputHandler* next; }; OutboundFrameTracker outboundTracker; void sent(const framing::AMQFrame& f); public: qmf::org::apache::qpid::broker::Connection* getMgmtObject() { return mgmtObject; } }; }} #endif /*!QPID_BROKER_CONNECTION_H*/ qpidc-0.16/src/qpid/broker/ConnectionToken.h0000664000076400007640000000245211227113407021416 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ConnectionToken_ #define _ConnectionToken_ #include "qpid/broker/OwnershipToken.h" namespace qpid { namespace broker { /** * An empty interface allowing opaque implementations of some * form of token to identify a connection. */ class ConnectionToken : public OwnershipToken { public: virtual bool isLocal(const ConnectionToken* t) const { return this == t; } virtual ~ConnectionToken(){} }; } } #endif qpidc-0.16/src/qpid/broker/NameGenerator.h0000664000076400007640000000220310665074651021053 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _NameGenerator_ #define _NameGenerator_ #include namespace qpid { namespace broker { class NameGenerator{ const std::string base; unsigned int counter; public: NameGenerator(const std::string& base); std::string generate(); }; } } #endif qpidc-0.16/src/qpid/broker/LinkRegistry.h0000664000076400007640000001330611720530342020743 0ustar00jrossjross00000000000000#ifndef _broker_LinkRegistry_h #define _broker_LinkRegistry_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Bridge.h" #include "qpid/broker/MessageStore.h" #include "qpid/Address.h" #include "qpid/sys/Mutex.h" #include "qpid/management/Manageable.h" #include #include #include namespace qpid { namespace broker { class Link; class Broker; class Connection; class LinkRegistry { typedef std::map > LinkMap; typedef std::map BridgeMap; LinkMap links; BridgeMap bridges; qpid::sys::Mutex lock; Broker* broker; management::Manageable* parent; MessageStore* store; bool passive; std::string realm; boost::shared_ptr findLink(const std::string& key); static std::string createKey(const Address& address); static std::string createKey(const std::string& host, uint16_t port); // Methods called by the connection observer. void notifyConnection (const std::string& key, Connection* c); void notifyOpened (const std::string& key); void notifyClosed (const std::string& key); void notifyConnectionForced (const std::string& key, const std::string& text); friend class LinkRegistryConnectionObserver; public: QPID_BROKER_EXTERN LinkRegistry (); // Only used in store tests QPID_BROKER_EXTERN LinkRegistry (Broker* _broker); QPID_BROKER_EXTERN ~LinkRegistry(); QPID_BROKER_EXTERN std::pair, bool> declare(const std::string& host, uint16_t port, const std::string& transport, bool durable, const std::string& authMechanism, const std::string& username, const std::string& password); QPID_BROKER_EXTERN std::pair declare(const std::string& host, uint16_t port, bool durable, const std::string& src, const std::string& dest, const std::string& key, bool isQueue, bool isLocal, const std::string& id, const std::string& excludes, bool dynamic, uint16_t sync, Bridge::InitializeCallback=0 ); QPID_BROKER_EXTERN void destroy(const std::string& host, const uint16_t port); QPID_BROKER_EXTERN void destroy(const std::string& host, const uint16_t port, const std::string& src, const std::string& dest, const std::string& key); /** * Register the manageable parent for declared queues */ void setParent (management::Manageable* _parent) { parent = _parent; } /** * Set the store to use. May only be called once. */ QPID_BROKER_EXTERN void setStore (MessageStore*); /** * Return the message store used. */ QPID_BROKER_EXTERN MessageStore* getStore() const; QPID_BROKER_EXTERN std::string getAuthMechanism (const std::string& key); QPID_BROKER_EXTERN std::string getAuthCredentials (const std::string& key); QPID_BROKER_EXTERN std::string getAuthIdentity (const std::string& key); QPID_BROKER_EXTERN std::string getUsername (const std::string& key); QPID_BROKER_EXTERN std::string getPassword (const std::string& key); QPID_BROKER_EXTERN std::string getHost (const std::string& key); QPID_BROKER_EXTERN uint16_t getPort (const std::string& key); /** * Called by links failing over to new address */ void changeAddress(const Address& oldAddress, const Address& newAddress); /** * Called to alter passive state. In passive state the links * and bridges managed by a link registry will be recorded and * updated but links won't actually establish connections and * bridges won't therefore pull or push any messages. */ QPID_BROKER_EXTERN void setPassive(bool); QPID_BROKER_EXTERN bool isPassive() { return passive; } /** Iterate over each link in the registry. Used for cluster updates. */ QPID_BROKER_EXTERN void eachLink(boost::function)> f); /** Iterate over each bridge in the registry. Used for cluster updates. */ QPID_BROKER_EXTERN void eachBridge(boost::function)> f); }; } } #endif /*!_broker_LinkRegistry_h*/ qpidc-0.16/src/qpid/broker/Queue.h0000664000076400007640000003650611724231307017413 0ustar00jrossjross00000000000000#ifndef _broker_Queue_h #define _broker_Queue_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/OwnershipToken.h" #include "qpid/broker/Consumer.h" #include "qpid/broker/Message.h" #include "qpid/broker/Messages.h" #include "qpid/broker/PersistableQueue.h" #include "qpid/broker/QueuePolicy.h" #include "qpid/broker/QueueBindings.h" #include "qpid/broker/QueueListeners.h" #include "qpid/broker/QueueObserver.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/AtomicValue.h" #include "qpid/sys/Monitor.h" #include "qpid/sys/Timer.h" #include "qpid/management/Manageable.h" #include "qmf/org/apache/qpid/broker/Queue.h" #include "qmf/org/apache/qpid/broker/Broker.h" #include "qpid/framing/amqp_types.h" #include #include #include #include #include #include #include #include #include namespace qpid { namespace broker { class Broker; class MessageStore; class QueueEvents; class QueueRegistry; class TransactionContext; class MessageDistributor; /** * The brokers representation of an amqp queue. Messages are * delivered to a queue from where they can be dispatched to * registered consumers or be stored until dequeued or until one * or more consumers registers. */ class Queue : public boost::enable_shared_from_this, public PersistableQueue, public management::Manageable { struct UsageBarrier { Queue& parent; uint count; UsageBarrier(Queue&); bool acquire(); void release(); void destroy(); }; struct ScopedUse { UsageBarrier& barrier; const bool acquired; ScopedUse(UsageBarrier& b) : barrier(b), acquired(barrier.acquire()) {} ~ScopedUse() { if (acquired) barrier.release(); } }; typedef std::set< boost::shared_ptr > Observers; enum ConsumeCode {NO_MESSAGES=0, CANT_CONSUME=1, CONSUMED=2}; const std::string name; const bool autodelete; MessageStore* store; const OwnershipToken* owner; uint32_t consumerCount; OwnershipToken* exclusive; bool noLocal; bool persistLastNode; bool inLastNodeFailure; std::string traceId; std::vector traceExclude; QueueListeners listeners; std::auto_ptr messages; std::deque pendingDequeues;//used to avoid dequeuing during recovery mutable qpid::sys::Mutex consumerLock; mutable qpid::sys::Monitor messageLock; mutable qpid::sys::Mutex ownershipLock; mutable uint64_t persistenceId; framing::FieldTable settings; std::auto_ptr policy; bool policyExceeded; QueueBindings bindings; std::string alternateExchangeName; boost::shared_ptr alternateExchange; framing::SequenceNumber sequence; qmf::org::apache::qpid::broker::Queue* mgmtObject; qmf::org::apache::qpid::broker::Broker* brokerMgmtObject; sys::AtomicValue dequeueSincePurge; // Count dequeues since last purge. int eventMode; Observers observers; bool insertSeqNo; std::string seqNoKey; Broker* broker; bool deleted; UsageBarrier barrier; int autoDeleteTimeout; boost::intrusive_ptr autoDeleteTask; boost::shared_ptr allocator; void push(boost::intrusive_ptr& msg, bool isRecovery=false); void setPolicy(std::auto_ptr policy); bool getNextMessage(QueuedMessage& msg, Consumer::shared_ptr& c); ConsumeCode consumeNextMessage(QueuedMessage& msg, Consumer::shared_ptr& c); bool browseNextMessage(QueuedMessage& msg, Consumer::shared_ptr& c); void notifyListener(); void removeListener(Consumer::shared_ptr); bool isExcluded(boost::intrusive_ptr& msg); /** update queue observers, stats, policy, etc when the messages' state changes. Lock * must be held by caller */ void observeEnqueue(const QueuedMessage& msg, const sys::Mutex::ScopedLock& lock); void observeAcquire(const QueuedMessage& msg, const sys::Mutex::ScopedLock& lock); void observeRequeue(const QueuedMessage& msg, const sys::Mutex::ScopedLock& lock); void observeDequeue(const QueuedMessage& msg, const sys::Mutex::ScopedLock& lock); bool popAndDequeue(QueuedMessage&, const sys::Mutex::ScopedLock& lock); // acquire message @ position, return true and set msg if acquire succeeds bool acquire(const qpid::framing::SequenceNumber& position, QueuedMessage& msg, const sys::Mutex::ScopedLock& held); void forcePersistent(QueuedMessage& msg); int getEventMode(); void configureImpl(const qpid::framing::FieldTable& settings); void checkNotDeleted(const Consumer::shared_ptr& c); void notifyDeleted(); public: typedef boost::shared_ptr shared_ptr; typedef std::vector vector; QPID_BROKER_EXTERN Queue(const std::string& name, bool autodelete = false, MessageStore* const store = 0, const OwnershipToken* const owner = 0, management::Manageable* parent = 0, Broker* broker = 0); QPID_BROKER_EXTERN ~Queue(); /** allow the Consumer to consume or browse the next available message */ QPID_BROKER_EXTERN bool dispatch(Consumer::shared_ptr); /** allow the Consumer to acquire a message that it has browsed. * @param msg - message to be acquired. * @return false if message is no longer available for acquire. */ QPID_BROKER_EXTERN bool acquire(const QueuedMessage& msg, const std::string& consumer); /** * Used to configure a new queue and create a persistent record * for it in store if required. */ QPID_BROKER_EXTERN void create(const qpid::framing::FieldTable& settings); /** * Used to reconfigure a recovered queue (does not create * persistent record in store). */ QPID_BROKER_EXTERN void configure(const qpid::framing::FieldTable& settings); void destroyed(); QPID_BROKER_EXTERN void bound(const std::string& exchange, const std::string& key, const qpid::framing::FieldTable& args); //TODO: get unbind out of the public interface; only there for purposes of one unit test QPID_BROKER_EXTERN void unbind(ExchangeRegistry& exchanges); /** * Bind self to specified exchange, and record that binding for unbinding on delete. */ QPID_BROKER_EXTERN bool bind( boost::shared_ptr exchange, const std::string& key, const qpid::framing::FieldTable& arguments=qpid::framing::FieldTable()); /** Acquire the message at the given position if it is available for acquire. Not to * be used by clients, but used by the broker for queue management. * @param message - set to the acquired message if true returned. * @return true if the message has been acquired. */ QPID_BROKER_EXTERN bool acquireMessageAt(const qpid::framing::SequenceNumber& position, QueuedMessage& message); /** * Delivers a message to the queue. Will record it as * enqueued if persistent then process it. */ QPID_BROKER_EXTERN void deliver(boost::intrusive_ptr msg); /** * Dispatches the messages immediately to a consumer if * one is available or stores it for later if not. */ QPID_BROKER_EXTERN void process(boost::intrusive_ptr& msg); /** * Returns a message to the in-memory queue (due to lack * of acknowledegement from a receiver). If a consumer is * available it will be dispatched immediately, else it * will be returned to the front of the queue. */ QPID_BROKER_EXTERN void requeue(const QueuedMessage& msg); /** * Used during recovery to add stored messages back to the queue */ QPID_BROKER_EXTERN void recover(boost::intrusive_ptr& msg); QPID_BROKER_EXTERN void consume(Consumer::shared_ptr c, bool exclusive = false); QPID_BROKER_EXTERN void cancel(Consumer::shared_ptr c); QPID_BROKER_EXTERN uint32_t purge(const uint32_t purge_request=0, //defaults to all messages boost::shared_ptr dest=boost::shared_ptr(), const ::qpid::types::Variant::Map *filter=0); QPID_BROKER_EXTERN void purgeExpired(sys::Duration); //move qty # of messages to destination Queue destq QPID_BROKER_EXTERN uint32_t move( const Queue::shared_ptr destq, uint32_t qty, const qpid::types::Variant::Map *filter=0); QPID_BROKER_EXTERN uint32_t getMessageCount() const; QPID_BROKER_EXTERN uint32_t getEnqueueCompleteMessageCount() const; QPID_BROKER_EXTERN uint32_t getConsumerCount() const; inline const std::string& getName() const { return name; } QPID_BROKER_EXTERN bool isExclusiveOwner(const OwnershipToken* const o) const; QPID_BROKER_EXTERN void releaseExclusiveOwnership(); QPID_BROKER_EXTERN bool setExclusiveOwner(const OwnershipToken* const o); QPID_BROKER_EXTERN bool hasExclusiveConsumer() const; QPID_BROKER_EXTERN bool hasExclusiveOwner() const; inline bool isDurable() const { return store != 0; } inline const framing::FieldTable& getSettings() const { return settings; } inline bool isAutoDelete() const { return autodelete; } QPID_BROKER_EXTERN bool canAutoDelete() const; const QueueBindings& getBindings() const { return bindings; } /** * used to take messages from in memory and flush down to disk. */ QPID_BROKER_EXTERN void setLastNodeFailure(); QPID_BROKER_EXTERN void clearLastNodeFailure(); QPID_BROKER_EXTERN bool enqueue(TransactionContext* ctxt, boost::intrusive_ptr& msg, bool suppressPolicyCheck = false); QPID_BROKER_EXTERN void enqueueAborted(boost::intrusive_ptr msg); /** * dequeue from store (only done once messages is acknowledged) */ QPID_BROKER_EXTERN bool dequeue(TransactionContext* ctxt, const QueuedMessage &msg); /** * Inform the queue that a previous transactional dequeue * committed. */ QPID_BROKER_EXTERN void dequeueCommitted(const QueuedMessage& msg); /** * Inform queue of messages that were enqueued, have since * been acquired but not yet accepted or released (and * thus are still logically on the queue) - used in * clustered broker. */ QPID_BROKER_EXTERN void updateEnqueued(const QueuedMessage& msg); /** * Test whether the specified message (identified by its * sequence/position), is still enqueued (note this * doesn't mean it is available for delivery as it may * have been delievered to a subscriber who has not yet * accepted it). */ QPID_BROKER_EXTERN bool isEnqueued(const QueuedMessage& msg); /** * Acquires the next available (oldest) message */ QPID_BROKER_EXTERN QueuedMessage get(); /** Get the message at position pos, returns true if found and sets msg */ QPID_BROKER_EXTERN bool find(framing::SequenceNumber pos, QueuedMessage& msg ) const; QPID_BROKER_EXTERN const QueuePolicy* getPolicy(); QPID_BROKER_EXTERN void setAlternateExchange(boost::shared_ptr exchange); QPID_BROKER_EXTERN boost::shared_ptr getAlternateExchange(); QPID_BROKER_EXTERN bool isLocal(boost::intrusive_ptr& msg); //PersistableQueue support: QPID_BROKER_EXTERN uint64_t getPersistenceId() const; QPID_BROKER_EXTERN void setPersistenceId(uint64_t persistenceId) const; QPID_BROKER_EXTERN void encode(framing::Buffer& buffer) const; QPID_BROKER_EXTERN uint32_t encodedSize() const; /** * Restores a queue from encoded data (used in recovery) * * Note: restored queue will be neither auto-deleted or have an * exclusive owner */ static Queue::shared_ptr restore(QueueRegistry& queues, framing::Buffer& buffer); static void tryAutoDelete(Broker& broker, Queue::shared_ptr); virtual void setExternalQueueStore(ExternalQueueStore* inst); // Increment the rejected-by-consumer counter. QPID_BROKER_EXTERN void countRejected() const; QPID_BROKER_EXTERN void countFlowedToDisk(uint64_t size) const; QPID_BROKER_EXTERN void countLoadedFromDisk(uint64_t size) const; // Manageable entry points QPID_BROKER_EXTERN management::ManagementObject* GetManagementObject (void) const; management::Manageable::status_t QPID_BROKER_EXTERN ManagementMethod (uint32_t methodId, management::Args& args, std::string& text); QPID_BROKER_EXTERN void query(::qpid::types::Variant::Map&) const; /** Apply f to each Message on the queue. */ template void eachMessage(F f) { sys::Mutex::ScopedLock l(messageLock); messages->foreach(f); } /** Apply f to each QueueBinding on the queue */ template void eachBinding(F f) { bindings.eachBinding(f); } /** Apply f to each Observer on the queue */ template void eachObserver(F f) { std::for_each(observers.begin(), observers.end(), f); } /** Set the position sequence number for the next message on the queue. * Must be >= the current sequence number. * Used by cluster to replicate queues. */ QPID_BROKER_EXTERN void setPosition(framing::SequenceNumber pos); /** return current position sequence number for the next message on the queue. */ QPID_BROKER_EXTERN framing::SequenceNumber getPosition(); QPID_BROKER_EXTERN void addObserver(boost::shared_ptr); QPID_BROKER_EXTERN void removeObserver(boost::shared_ptr); QPID_BROKER_EXTERN void insertSequenceNumbers(const std::string& key); /** * Notify queue that recovery has completed. */ QPID_BROKER_EXTERN void recoveryComplete(ExchangeRegistry& exchanges); // For cluster update QPID_BROKER_EXTERN QueueListeners& getListeners(); QPID_BROKER_EXTERN Messages& getMessages(); QPID_BROKER_EXTERN const Messages& getMessages() const; /** * Reserve space in policy for an enqueued message that * has been recovered in the prepared state (dtx only) */ QPID_BROKER_EXTERN void recoverPrepared(boost::intrusive_ptr& msg); QPID_BROKER_EXTERN void flush(); QPID_BROKER_EXTERN Broker* getBroker(); uint32_t getDequeueSincePurge() { return dequeueSincePurge.get(); } QPID_BROKER_EXTERN void setDequeueSincePurge(uint32_t value); }; } } #endif /*!_broker_Queue_h*/ qpidc-0.16/src/qpid/broker/QueueObserver.h0000664000076400007640000000552511643605374021131 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_QUEUEOBSERVER_H #define QPID_BROKER_QUEUEOBSERVER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { namespace broker { struct QueuedMessage; class Consumer; /** * Interface for notifying classes who want to act as 'observers' of a queue of particular * events. * * The events that are monitored reflect the relationship between a particular message and * the queue it has been delivered to. A message can be considered in one of three states * with respect to the queue: * * 1) "Available" - available for transfer to consumers (i.e. for browse or acquire), * * 2) "Acquired" - owned by a particular consumer, no longer available to other consumers * (by either browse or acquire), but still considered on the queue. * * 3) "Dequeued" - removed from the queue and no longer available to any consumer. * * The queue events that are observable are: * * "Enqueued" - the message is "Available" - on the queue for transfer to any consumer * (e.g. browse or acquire) * * "Acquired" - - a consumer has claimed exclusive access to it. It is no longer available * for other consumers to browse or acquire, but it is not yet considered dequeued as it * may be requeued by the consumer. * * "Requeued" - a previously-acquired message is released by its owner: it is put back on * the queue at its original position and returns to the "Available" state. * * "Dequeued" - a message is no longer queued. At this point, the queue no longer tracks * the message, and the broker considers the consumer's transaction complete. */ class QueueObserver { public: virtual ~QueueObserver() {} // note: the Queue will hold the messageLock while calling these methods! virtual void enqueued(const QueuedMessage&) = 0; virtual void dequeued(const QueuedMessage&) = 0; virtual void acquired(const QueuedMessage&) = 0; virtual void requeued(const QueuedMessage&) = 0; virtual void consumerAdded( const Consumer& ) {}; virtual void consumerRemoved( const Consumer& ) {}; private: }; }} // namespace qpid::broker #endif /*!QPID_BROKER_QUEUEOBSERVER_H*/ qpidc-0.16/src/qpid/broker/RecoverableTransaction.h0000664000076400007640000000275311227113407022761 0ustar00jrossjross00000000000000#ifndef _broker_RecoverableTransaction_h #define _broker_RecoverableTransaction_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/broker/RecoverableMessage.h" #include "qpid/broker/RecoverableQueue.h" namespace qpid { namespace broker { /** * The interface through which prepared 2pc transactions are * recovered. */ class RecoverableTransaction { public: typedef boost::shared_ptr shared_ptr; virtual void enqueue(RecoverableQueue::shared_ptr queue, RecoverableMessage::shared_ptr message) = 0; virtual void dequeue(RecoverableQueue::shared_ptr queue, RecoverableMessage::shared_ptr message) = 0; virtual ~RecoverableTransaction() {}; }; }} #endif qpidc-0.16/src/qpid/broker/ConsumerFactory.h0000664000076400007640000000444311717465066021462 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_CONSUMERFACTORY_H #define QPID_BROKER_CONSUMERFACTORY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ // TODO aconway 2011-11-25: it's ugly exposing SemanticState::ConsumerImpl in public. // Refactor to use a more abstract interface. #include "qpid/broker/SemanticState.h" namespace qpid { namespace broker { /** * Base class for consumer factoires. Plugins can register a * ConsumerFactory via Broker:: getConsumerFactories() Each time a * conumer is created, each factory is tried in turn till one returns * non-0. */ class ConsumerFactory { public: virtual ~ConsumerFactory() {} virtual boost::shared_ptr create( SemanticState* parent, const std::string& name, boost::shared_ptr queue, bool ack, bool acquire, bool exclusive, const std::string& tag, const std::string& resumeId, uint64_t resumeTtl, const framing::FieldTable& arguments) = 0; }; /** A set of factories held by the broker * THREAD UNSAFE: see notes on member functions. */ class ConsumerFactories { public: typedef std::vector > Factories; /** Thread safety: May only be called during plug-in initialization. */ void add(const boost::shared_ptr& cf) { factories.push_back(cf); } /** Thread safety: May only be called after plug-in initialization. */ const Factories& get() const { return factories; } private: Factories factories; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_CONSUMERFACTORY_H*/ qpidc-0.16/src/qpid/broker/QueueListeners.h0000664000076400007640000000467011547612316021307 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_QUEUELISTENERS_H #define QPID_BROKER_QUEUELISTENERS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Consumer.h" #include namespace qpid { namespace broker { /** * Track and notify components that wish to be notified of messages * that become available on a queue. * * None of the methods defined here are protected by locking. However * the populate method allows a 'snapshot' to be taken of the * listeners to be notified. NotificationSet::notify() may then be * called outside of any lock that protects the QueueListeners * instance from concurrent access. */ class QueueListeners { public: typedef std::deque Listeners; class NotificationSet { public: void notify(); private: Listeners browsers; Consumer::shared_ptr consumer; friend class QueueListeners; }; class ListenerSet { public: void notifyAll(); private: Listeners listeners; friend class QueueListeners; }; void addListener(Consumer::shared_ptr); void removeListener(Consumer::shared_ptr); void populate(NotificationSet&); void snapshot(ListenerSet&); bool contains(Consumer::shared_ptr c) const; void notifyAll(); template void eachListener(F f) { std::for_each(browsers.begin(), browsers.end(), f); std::for_each(consumers.begin(), consumers.end(), f); } private: Listeners consumers; Listeners browsers; void add(Listeners&, Consumer::shared_ptr); void remove(Listeners&, Consumer::shared_ptr); }; }} // namespace qpid::broker #endif /*!QPID_BROKER_QUEUELISTENERS_H*/ qpidc-0.16/src/qpid/broker/SignalHandler.cpp0000664000076400007640000000314111415115441021357 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/SignalHandler.h" #include "qpid/broker/Broker.h" #include "qpid/sys/Mutex.h" #include namespace qpid { namespace broker { // Lock is to ensure that broker is not concurrently set to 0 and // deleted while we are in a call to broker->shutdown() sys::Mutex brokerLock; Broker* SignalHandler::broker; void SignalHandler::setBroker(Broker* b) { sys::Mutex::ScopedLock l(brokerLock); broker = b; signal(SIGINT,shutdownHandler); signal(SIGTERM, shutdownHandler); signal(SIGHUP,SIG_IGN); signal(SIGCHLD,SIG_IGN); } void SignalHandler::shutdown() { shutdownHandler(0); } void SignalHandler::shutdownHandler(int) { sys::Mutex::ScopedLock l(brokerLock); if (broker) { broker->shutdown(); broker = 0; } } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/SecureConnectionFactory.cpp0000664000076400007640000000566411344233212023454 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/SecureConnectionFactory.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/amqp_0_10/Connection.h" #include "qpid/broker/Connection.h" #include "qpid/broker/SecureConnection.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/log/Statement.h" namespace qpid { namespace broker { using framing::ProtocolVersion; using qpid::sys::SecuritySettings; typedef std::auto_ptr CodecPtr; typedef std::auto_ptr SecureConnectionPtr; typedef std::auto_ptr ConnectionPtr; typedef std::auto_ptr InputPtr; SecureConnectionFactory::SecureConnectionFactory(Broker& b) : broker(b) {} sys::ConnectionCodec* SecureConnectionFactory::create(ProtocolVersion v, sys::OutputControl& out, const std::string& id, const SecuritySettings& external) { if (broker.getConnectionCounter().allowConnection()) { QPID_LOG(error, "Client max connection count limit exceeded: " << broker.getOptions().maxConnections << " connection refused"); return 0; } if (v == ProtocolVersion(0, 10)) { SecureConnectionPtr sc(new SecureConnection()); CodecPtr c(new amqp_0_10::Connection(out, id, false)); ConnectionPtr i(new broker::Connection(c.get(), broker, id, external, false)); i->setSecureConnection(sc.get()); c->setInputHandler(InputPtr(i.release())); sc->setCodec(std::auto_ptr(c)); return sc.release(); } return 0; } sys::ConnectionCodec* SecureConnectionFactory::create(sys::OutputControl& out, const std::string& id, const SecuritySettings& external) { // used to create connections from one broker to another SecureConnectionPtr sc(new SecureConnection()); CodecPtr c(new amqp_0_10::Connection(out, id, true)); ConnectionPtr i(new broker::Connection(c.get(), broker, id, external, true )); i->setSecureConnection(sc.get()); c->setInputHandler(InputPtr(i.release())); sc->setCodec(std::auto_ptr(c)); return sc.release(); } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/SessionOutputException.h0000664000076400007640000000334211326302314023035 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_SESSIONOUTPUTEXCEPTION_H #define QPID_BROKER_SESSIONOUTPUTEXCEPTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" namespace qpid { namespace broker { /** * This exception is used to signal 'session' exceptions (aka * execution exceptions in AMQP 0-10 terms) that occur during output * processing. It simply allows the channel of the session to be * specified in addition to the other details. Special treatment is * required at present because the output processing chain is * different from that which handles incoming commands (specifically * AggregateOutput cannot reasonably handle exceptions as it has no * context). */ struct SessionOutputException : qpid::SessionException { const uint16_t channel; SessionOutputException(const qpid::SessionException& e, uint16_t c) : qpid::SessionException(e.code, e.getMessage()), channel(c) {} }; }} // namespace qpid::broker #endif /*!QPID_BROKER_SESSIONOUTPUTEXCEPTION_H*/ qpidc-0.16/src/qpid/broker/QueuePolicy.cpp0000664000076400007640000002750311715033215021121 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/QueuePolicy.h" #include "qpid/broker/Queue.h" #include "qpid/broker/PriorityQueue.h" #include "qpid/Exception.h" #include "qpid/framing/FieldValue.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include using namespace qpid::broker; using namespace qpid::framing; QueuePolicy::QueuePolicy(const std::string& _name, uint32_t _maxCount, uint64_t _maxSize, const std::string& _type) : maxCount(_maxCount), maxSize(_maxSize), type(_type), count(0), size(0), policyExceeded(false), queue(0), name(_name) { QPID_LOG(info, "Queue \"" << name << "\": Policy created: type=" << type << "; maxCount=" << maxCount << "; maxSize=" << maxSize); } void QueuePolicy::enqueued(uint64_t _size) { if (maxCount) ++count; if (maxSize) size += _size; } void QueuePolicy::dequeued(uint64_t _size) { if (maxCount) { if (count > 0) { --count; } else { throw Exception(QPID_MSG("Attempted count underflow on dequeue(" << _size << "): " << *this)); } } if (maxSize) { if (_size > size) { throw Exception(QPID_MSG("Attempted size underflow on dequeue(" << _size << "): " << *this)); } else { size -= _size; } } } bool QueuePolicy::checkLimit(boost::intrusive_ptr m) { bool sizeExceeded = maxSize && (size + m->contentSize()) > maxSize; bool countExceeded = maxCount && (count + 1) > maxCount; bool exceeded = sizeExceeded || countExceeded; if (exceeded) { if (!policyExceeded) { policyExceeded = true; if (sizeExceeded) QPID_LOG(info, "Queue cumulative message size exceeded policy for " << name); if (countExceeded) QPID_LOG(info, "Queue message count exceeded policy for " << name); } } else { if (policyExceeded) { policyExceeded = false; QPID_LOG(info, "Queue cumulative message size and message count within policy for " << name); } } return !exceeded; } void QueuePolicy::tryEnqueue(boost::intrusive_ptr m) { if (checkLimit(m)) { enqueued(m->contentSize()); } else { throw ResourceLimitExceededException(QPID_MSG("Policy exceeded on " << name << ", policy: " << *this)); } } void QueuePolicy::recoverEnqueued(boost::intrusive_ptr m) { tryEnqueue(m); } void QueuePolicy::enqueueAborted(boost::intrusive_ptr m) { dequeued(m->contentSize()); } void QueuePolicy::enqueued(const QueuedMessage&) {} void QueuePolicy::dequeued(const QueuedMessage& m) { dequeued(m.payload->contentSize()); } bool QueuePolicy::isEnqueued(const QueuedMessage&) { return true; } void QueuePolicy::update(FieldTable& settings) { if (maxCount) settings.setInt(maxCountKey, maxCount); if (maxSize) settings.setInt(maxSizeKey, maxSize); settings.setString(typeKey, type); } template T getCapacity(const FieldTable& settings, const std::string& key, T defaultValue) { FieldTable::ValuePtr v = settings.get(key); T result = 0; if (!v) return defaultValue; if (v->getType() == 0x23) { QPID_LOG(debug, "Value for " << key << " specified as float: " << v->get()); } else if (v->getType() == 0x33) { QPID_LOG(debug, "Value for " << key << " specified as double: " << v->get()); } else if (v->convertsTo()) { result = v->get(); QPID_LOG(debug, "Got integer value for " << key << ": " << result); if (result >= 0) return result; } else if (v->convertsTo()) { string s(v->get()); QPID_LOG(debug, "Got string value for " << key << ": " << s); std::istringstream convert(s); if (convert >> result && result >= 0 && convert.eof()) return result; } throw IllegalArgumentException(QPID_MSG("Cannot convert " << key << " to unsigned integer: " << *v)); } std::string QueuePolicy::getType(const FieldTable& settings) { FieldTable::ValuePtr v = settings.get(typeKey); if (v && v->convertsTo()) { std::string t = v->get(); std::transform(t.begin(), t.end(), t.begin(), tolower); if (t == REJECT || t == FLOW_TO_DISK || t == RING || t == RING_STRICT) return t; } return REJECT; } void QueuePolicy::setDefaultMaxSize(uint64_t s) { defaultMaxSize = s; } void QueuePolicy::getPendingDequeues(Messages&) {} void QueuePolicy::encode(Buffer& buffer) const { buffer.putLong(maxCount); buffer.putLongLong(maxSize); buffer.putLong(count); buffer.putLongLong(size); } void QueuePolicy::decode ( Buffer& buffer ) { maxCount = buffer.getLong(); maxSize = buffer.getLongLong(); count = buffer.getLong(); size = buffer.getLongLong(); } uint32_t QueuePolicy::encodedSize() const { return sizeof(uint32_t) + // maxCount sizeof(uint64_t) + // maxSize sizeof(uint32_t) + // count sizeof(uint64_t); // size } const std::string QueuePolicy::maxCountKey("qpid.max_count"); const std::string QueuePolicy::maxSizeKey("qpid.max_size"); const std::string QueuePolicy::typeKey("qpid.policy_type"); const std::string QueuePolicy::REJECT("reject"); const std::string QueuePolicy::FLOW_TO_DISK("flow_to_disk"); const std::string QueuePolicy::RING("ring"); const std::string QueuePolicy::RING_STRICT("ring_strict"); uint64_t QueuePolicy::defaultMaxSize(0); FlowToDiskPolicy::FlowToDiskPolicy(const std::string& _name, uint32_t _maxCount, uint64_t _maxSize) : QueuePolicy(_name, _maxCount, _maxSize, FLOW_TO_DISK) {} bool FlowToDiskPolicy::checkLimit(boost::intrusive_ptr m) { if (!QueuePolicy::checkLimit(m)) { m->requestContentRelease(); if (queue) queue->countFlowedToDisk(m->contentSize()); } return true; } RingQueuePolicy::RingQueuePolicy(const std::string& _name, uint32_t _maxCount, uint64_t _maxSize, const std::string& _type) : QueuePolicy(_name, _maxCount, _maxSize, _type), strict(_type == RING_STRICT) {} bool before(const QueuedMessage& a, const QueuedMessage& b) { int priorityA = PriorityQueue::getPriority(a); int priorityB = PriorityQueue::getPriority(b); if (priorityA == priorityB) return a.position < b.position; else return priorityA < priorityB; } void RingQueuePolicy::enqueued(const QueuedMessage& m) { //need to insert in correct location based on position queue.insert(lower_bound(queue.begin(), queue.end(), m, before), m); } void RingQueuePolicy::dequeued(const QueuedMessage& m) { //find and remove m from queue if (find(m, pendingDequeues, true) || find(m, queue, true)) { //now update count and size QueuePolicy::dequeued(m); } } bool RingQueuePolicy::isEnqueued(const QueuedMessage& m) { //for non-strict ring policy, a message can be replaced (and //therefore dequeued) before it is accepted or released by //subscriber; need to detect this return find(m, pendingDequeues, false) || find(m, queue, false); } bool RingQueuePolicy::checkLimit(boost::intrusive_ptr m) { // If the message is bigger than the queue size, give up if (getMaxSize() && m->contentSize() > getMaxSize()) { QPID_LOG(debug, "Message too large for ring queue " << name << " [" << *this << "] " << ": message size = " << m->contentSize() << " bytes" << ": max queue size = " << getMaxSize() << " bytes"); return false; } // if within limits, ok to accept if (QueuePolicy::checkLimit(m)) return true; // At this point, we've exceeded maxSize, maxCount, or both. // // If we've exceeded maxCount, we've exceeded it by 1, so // replacing the first message is sufficient. If we've exceeded // maxSize, we need to pop enough messages to get the space we // need. unsigned int haveSpace = getMaxSize() - getCurrentQueueSize(); do { QueuedMessage oldest = queue.front(); if (oldest.queue->acquireMessageAt(oldest.position, oldest) || !strict) { queue.pop_front(); pendingDequeues.push_back(oldest); QPID_LOG(debug, "Ring policy triggered in " << name << ": removed message " << oldest.position << " to make way for new message"); haveSpace += oldest.payload->contentSize(); } else { //in strict mode, if oldest message has been delivered (hence //cannot be acquired) but not yet acked, it should not be //removed and the attempted enqueue should fail QPID_LOG(debug, "Ring policy could not be triggered in " << name << ": oldest message (seq-no=" << oldest.position << ") has been delivered but not yet acknowledged or requeued"); return false; } } while (getMaxSize() && haveSpace < m->contentSize()); return true; } void RingQueuePolicy::getPendingDequeues(Messages& result) { result = pendingDequeues; } bool RingQueuePolicy::find(const QueuedMessage& m, Messages& q, bool remove) { for (Messages::iterator i = q.begin(); i != q.end(); i++) { if (i->payload == m.payload) { if (remove) q.erase(i); return true; } } return false; } std::auto_ptr QueuePolicy::createQueuePolicy(uint32_t maxCount, uint64_t maxSize, const std::string& type) { return createQueuePolicy("", maxCount, maxSize, type); } std::auto_ptr QueuePolicy::createQueuePolicy(const qpid::framing::FieldTable& settings) { return createQueuePolicy("", settings); } std::auto_ptr QueuePolicy::createQueuePolicy(const std::string& name, const qpid::framing::FieldTable& settings) { uint32_t maxCount = getCapacity(settings, maxCountKey, 0); uint64_t maxSize = getCapacity(settings, maxSizeKey, defaultMaxSize); if (maxCount || maxSize) { return createQueuePolicy(name, maxCount, maxSize, getType(settings)); } else { return std::auto_ptr(); } } std::auto_ptr QueuePolicy::createQueuePolicy(const std::string& name, uint32_t maxCount, uint64_t maxSize, const std::string& type) { if (type == RING || type == RING_STRICT) { return std::auto_ptr(new RingQueuePolicy(name, maxCount, maxSize, type)); } else if (type == FLOW_TO_DISK) { return std::auto_ptr(new FlowToDiskPolicy(name, maxCount, maxSize)); } else { return std::auto_ptr(new QueuePolicy(name, maxCount, maxSize, type)); } } namespace qpid { namespace broker { std::ostream& operator<<(std::ostream& out, const QueuePolicy& p) { if (p.maxSize) out << "size: max=" << p.maxSize << ", current=" << p.size; else out << "size: unlimited"; out << "; "; if (p.maxCount) out << "count: max=" << p.maxCount << ", current=" << p.count; else out << "count: unlimited"; out << "; type=" << p.type; return out; } } } qpidc-0.16/src/qpid/broker/SessionAdapter.cpp0000664000076400007640000006660311717465066021624 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/broker/SessionAdapter.h" #include "qpid/broker/Connection.h" #include "qpid/broker/Queue.h" #include "qpid/Exception.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/enum.h" #include "qpid/log/Statement.h" #include "qpid/framing/SequenceSet.h" #include "qpid/management/ManagementAgent.h" #include "qpid/broker/SessionState.h" #include "qmf/org/apache/qpid/broker/EventExchangeDeclare.h" #include "qmf/org/apache/qpid/broker/EventExchangeDelete.h" #include "qmf/org/apache/qpid/broker/EventQueueDeclare.h" #include "qmf/org/apache/qpid/broker/EventQueueDelete.h" #include "qmf/org/apache/qpid/broker/EventBind.h" #include "qmf/org/apache/qpid/broker/EventUnbind.h" #include "qmf/org/apache/qpid/broker/EventSubscribe.h" #include "qmf/org/apache/qpid/broker/EventUnsubscribe.h" #include #include #include namespace qpid { namespace broker { using namespace qpid; using namespace qpid::framing; using namespace qpid::framing::dtx; using namespace qpid::management; namespace _qmf = qmf::org::apache::qpid::broker; typedef std::vector QueueVector; SessionAdapter::SessionAdapter(SemanticState& s) : HandlerImpl(s), exchangeImpl(s), queueImpl(s), messageImpl(s), executionImpl(s), txImpl(s), dtxImpl(s) {} static const std::string _TRUE("true"); static const std::string _FALSE("false"); void SessionAdapter::ExchangeHandlerImpl::declare(const string& exchange, const string& type, const string& alternateExchange, bool passive, bool durable, bool /*autoDelete*/, const FieldTable& args){ //TODO: implement autoDelete Exchange::shared_ptr alternate; if (!alternateExchange.empty()) { alternate = getBroker().getExchanges().get(alternateExchange); } if(passive){ AclModule* acl = getBroker().getAcl(); if (acl) { //TODO: why does a passive declare require create //permission? The purpose of the passive flag is to state //that the exchange should *not* created. For //authorisation a passive declare is similar to //exchange-query. std::map params; params.insert(make_pair(acl::PROP_TYPE, type)); params.insert(make_pair(acl::PROP_ALTERNATE, alternateExchange)); params.insert(make_pair(acl::PROP_PASSIVE, _TRUE)); params.insert(make_pair(acl::PROP_DURABLE, durable ? _TRUE : _FALSE)); if (!acl->authorise(getConnection().getUserId(),acl::ACT_CREATE,acl::OBJ_EXCHANGE,exchange,¶ms) ) throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange create request from " << getConnection().getUserId())); } Exchange::shared_ptr actual(getBroker().getExchanges().get(exchange)); checkType(actual, type); checkAlternate(actual, alternate); }else{ if(exchange.find("amq.") == 0 || exchange.find("qpid.") == 0) { throw framing::NotAllowedException(QPID_MSG("Exchange names beginning with \"amq.\" or \"qpid.\" are reserved. (exchange=\"" << exchange << "\")")); } try{ std::pair response = getBroker().createExchange(exchange, type, durable, alternateExchange, args, getConnection().getUserId(), getConnection().getUrl()); if (!response.second) { //exchange already there, not created checkType(response.first, type); checkAlternate(response.first, alternate); ManagementAgent* agent = getBroker().getManagementAgent(); if (agent) agent->raiseEvent(_qmf::EventExchangeDeclare(getConnection().getUrl(), getConnection().getUserId(), exchange, type, alternateExchange, durable, false, ManagementAgent::toMap(args), "existing")); } }catch(UnknownExchangeTypeException& /*e*/){ throw NotFoundException(QPID_MSG("Exchange type not implemented: " << type)); } } } void SessionAdapter::ExchangeHandlerImpl::checkType(Exchange::shared_ptr exchange, const std::string& type) { if (!type.empty() && exchange->getType() != type) { throw NotAllowedException(QPID_MSG("Exchange declared to be of type " << exchange->getType() << ", requested " << type)); } } void SessionAdapter::ExchangeHandlerImpl::checkAlternate(Exchange::shared_ptr exchange, Exchange::shared_ptr alternate) { if (alternate && ((exchange->getAlternate() && alternate != exchange->getAlternate()) || !exchange->getAlternate())) throw NotAllowedException(QPID_MSG("Exchange declared with alternate-exchange " << (exchange->getAlternate() ? exchange->getAlternate()->getName() : "") << ", requested " << alternate->getName())); } void SessionAdapter::ExchangeHandlerImpl::delete_(const string& name, bool /*ifUnused*/) { //TODO: implement if-unused getBroker().deleteExchange(name, getConnection().getUserId(), getConnection().getUrl()); } ExchangeQueryResult SessionAdapter::ExchangeHandlerImpl::query(const string& name) { AclModule* acl = getBroker().getAcl(); if (acl) { if (!acl->authorise(getConnection().getUserId(),acl::ACT_ACCESS,acl::OBJ_EXCHANGE,name,NULL) ) throw UnauthorizedAccessException(QPID_MSG("ACL denied exchange query request from " << getConnection().getUserId())); } Exchange::shared_ptr exchange(getBroker().getExchanges().find(name)); if (exchange) return ExchangeQueryResult(exchange->getType(), exchange->isDurable(), false, exchange->getArgs()); else return ExchangeQueryResult("", false, true, FieldTable()); } void SessionAdapter::ExchangeHandlerImpl::bind(const string& queueName, const string& exchangeName, const string& routingKey, const FieldTable& arguments) { getBroker().bind(queueName, exchangeName, routingKey, arguments, getConnection().getUserId(), getConnection().getUrl()); } void SessionAdapter::ExchangeHandlerImpl::unbind(const string& queueName, const string& exchangeName, const string& routingKey) { getBroker().unbind(queueName, exchangeName, routingKey, getConnection().getUserId(), getConnection().getUrl()); } ExchangeBoundResult SessionAdapter::ExchangeHandlerImpl::bound(const std::string& exchangeName, const std::string& queueName, const std::string& key, const framing::FieldTable& args) { AclModule* acl = getBroker().getAcl(); if (acl) { std::map params; params.insert(make_pair(acl::PROP_QUEUENAME, queueName)); params.insert(make_pair(acl::PROP_ROUTINGKEY, key)); if (!acl->authorise(getConnection().getUserId(),acl::ACT_ACCESS,acl::OBJ_EXCHANGE,exchangeName,¶ms) ) throw UnauthorizedAccessException(QPID_MSG("ACL denied exchange bound request from " << getConnection().getUserId())); } Exchange::shared_ptr exchange = getBroker().getExchanges().find(exchangeName); Queue::shared_ptr queue; if (!queueName.empty()) { queue = getBroker().getQueues().find(queueName); } if (!exchange) { return ExchangeBoundResult(true, (!queueName.empty() && !queue), false, false, false); } else if (!queueName.empty() && !queue) { return ExchangeBoundResult(false, true, false, false, false); } else if (exchange->isBound(queue, key.empty() ? 0 : &key, args.count() > 0 ? &args : &args)) { return ExchangeBoundResult(false, false, false, false, false); } else { //need to test each specified option individually bool queueMatched = queueName.empty() || exchange->isBound(queue, 0, 0); bool keyMatched = key.empty() || exchange->isBound(Queue::shared_ptr(), &key, 0); bool argsMatched = args.count() == 0 || exchange->isBound(Queue::shared_ptr(), 0, &args); return ExchangeBoundResult(false, false, !queueMatched, !keyMatched, !argsMatched); } } SessionAdapter::QueueHandlerImpl::QueueHandlerImpl(SemanticState& session) : HandlerHelper(session), broker(getBroker()) {} SessionAdapter::QueueHandlerImpl::~QueueHandlerImpl() { try { destroyExclusiveQueues(); } catch (std::exception& e) { QPID_LOG(error, e.what()); } } void SessionAdapter::QueueHandlerImpl::destroyExclusiveQueues() { while (!exclusiveQueues.empty()) { Queue::shared_ptr q(exclusiveQueues.front()); q->releaseExclusiveOwnership(); if (q->canAutoDelete()) { Queue::tryAutoDelete(broker, q); } exclusiveQueues.erase(exclusiveQueues.begin()); } } bool SessionAdapter::QueueHandlerImpl::isLocal(const ConnectionToken* t) const { return session.isLocal(t); } QueueQueryResult SessionAdapter::QueueHandlerImpl::query(const string& name) { AclModule* acl = getBroker().getAcl(); if (acl) { if (!acl->authorise(getConnection().getUserId(),acl::ACT_ACCESS,acl::OBJ_QUEUE,name,NULL) ) throw UnauthorizedAccessException(QPID_MSG("ACL denied queue query request from " << getConnection().getUserId())); } Queue::shared_ptr queue = session.getBroker().getQueues().find(name); if (queue) { Exchange::shared_ptr alternateExchange = queue->getAlternateExchange(); return QueueQueryResult(queue->getName(), alternateExchange ? alternateExchange->getName() : "", queue->isDurable(), queue->hasExclusiveOwner(), queue->isAutoDelete(), queue->getSettings(), queue->getMessageCount(), queue->getConsumerCount()); } else { return QueueQueryResult(); } } void SessionAdapter::QueueHandlerImpl::declare(const string& name, const string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const qpid::framing::FieldTable& arguments) { Queue::shared_ptr queue; if (passive && !name.empty()) { AclModule* acl = getBroker().getAcl(); if (acl) { //TODO: why does a passive declare require create //permission? The purpose of the passive flag is to state //that the queue should *not* created. For //authorisation a passive declare is similar to //queue-query (or indeed a qmf query). std::map params; params.insert(make_pair(acl::PROP_ALTERNATE, alternateExchange)); params.insert(make_pair(acl::PROP_PASSIVE, _TRUE)); params.insert(make_pair(acl::PROP_DURABLE, std::string(durable ? _TRUE : _FALSE))); params.insert(make_pair(acl::PROP_EXCLUSIVE, std::string(exclusive ? _TRUE : _FALSE))); params.insert(make_pair(acl::PROP_AUTODELETE, std::string(autoDelete ? _TRUE : _FALSE))); params.insert(make_pair(acl::PROP_POLICYTYPE, arguments.getAsString("qpid.policy_type"))); params.insert(make_pair(acl::PROP_MAXQUEUECOUNT, boost::lexical_cast(arguments.getAsInt("qpid.max_count")))); params.insert(make_pair(acl::PROP_MAXQUEUESIZE, boost::lexical_cast(arguments.getAsInt64("qpid.max_size")))); if (!acl->authorise(getConnection().getUserId(),acl::ACT_CREATE,acl::OBJ_QUEUE,name,¶ms) ) throw UnauthorizedAccessException(QPID_MSG("ACL denied queue create request from " << getConnection().getUserId())); } queue = getQueue(name); //TODO: check alternate-exchange is as expected } else { std::pair queue_created = getBroker().createQueue(name, durable, autoDelete, exclusive ? &session : 0, alternateExchange, arguments, getConnection().getUserId(), getConnection().getUrl()); queue = queue_created.first; assert(queue); if (queue_created.second) { // This is a new queue //handle automatic cleanup: if (exclusive) { exclusiveQueues.push_back(queue); } } else { if (exclusive && queue->setExclusiveOwner(&session)) { exclusiveQueues.push_back(queue); } ManagementAgent* agent = getBroker().getManagementAgent(); if (agent) agent->raiseEvent(_qmf::EventQueueDeclare(getConnection().getUrl(), getConnection().getUserId(), name, durable, exclusive, autoDelete, alternateExchange, ManagementAgent::toMap(arguments), "existing")); } } if (exclusive && !queue->isExclusiveOwner(&session)) throw ResourceLockedException(QPID_MSG("Cannot grant exclusive access to queue " << queue->getName())); } void SessionAdapter::QueueHandlerImpl::purge(const string& queue){ AclModule* acl = getBroker().getAcl(); if (acl) { if (!acl->authorise(getConnection().getUserId(),acl::ACT_PURGE,acl::OBJ_QUEUE,queue,NULL) ) throw UnauthorizedAccessException(QPID_MSG("ACL denied queue purge request from " << getConnection().getUserId())); } getQueue(queue)->purge(); } void SessionAdapter::QueueHandlerImpl::checkDelete(Queue::shared_ptr queue, bool ifUnused, bool ifEmpty) { if (queue->hasExclusiveOwner() && !queue->isExclusiveOwner(&session)) { throw ResourceLockedException(QPID_MSG("Cannot delete queue " << queue->getName() << "; it is exclusive to another session")); } else if(ifEmpty && queue->getMessageCount() > 0) { throw PreconditionFailedException(QPID_MSG("Cannot delete queue " << queue->getName() << "; queue not empty")); } else if(ifUnused && queue->getConsumerCount() > 0) { throw PreconditionFailedException(QPID_MSG("Cannot delete queue " << queue->getName() << "; queue in use")); } else if (queue->isExclusiveOwner(&session)) { //remove the queue from the list of exclusive queues if necessary QueueVector::iterator i = std::find(exclusiveQueues.begin(), exclusiveQueues.end(), queue); if (i < exclusiveQueues.end()) exclusiveQueues.erase(i); } } void SessionAdapter::QueueHandlerImpl::delete_(const string& queue, bool ifUnused, bool ifEmpty) { getBroker().deleteQueue(queue, getConnection().getUserId(), getConnection().getUrl(), boost::bind(&SessionAdapter::QueueHandlerImpl::checkDelete, this, _1, ifUnused, ifEmpty)); } SessionAdapter::MessageHandlerImpl::MessageHandlerImpl(SemanticState& s) : HandlerHelper(s), releaseRedeliveredOp(boost::bind(&SemanticState::release, &state, _1, _2, true)), releaseOp(boost::bind(&SemanticState::release, &state, _1, _2, false)), rejectOp(boost::bind(&SemanticState::reject, &state, _1, _2)) {} // // Message class method handlers // void SessionAdapter::MessageHandlerImpl::transfer(const string& /*destination*/, uint8_t /*acceptMode*/, uint8_t /*acquireMode*/) { //not yet used (content containing assemblies treated differently at present std::cout << "SessionAdapter::MessageHandlerImpl::transfer() called" << std::endl; } void SessionAdapter::MessageHandlerImpl::release(const SequenceSet& transfers, bool setRedelivered) { transfers.for_each(setRedelivered ? releaseRedeliveredOp : releaseOp); } void SessionAdapter::MessageHandlerImpl::subscribe(const string& queueName, const string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const string& resumeId, uint64_t resumeTtl, const FieldTable& arguments) { AclModule* acl = getBroker().getAcl(); if (acl) { if (!acl->authorise(getConnection().getUserId(),acl::ACT_CONSUME,acl::OBJ_QUEUE,queueName,NULL) ) throw UnauthorizedAccessException(QPID_MSG("ACL denied Queue subscribe request from " << getConnection().getUserId())); } Queue::shared_ptr queue = getQueue(queueName); if(!destination.empty() && state.exists(destination)) throw NotAllowedException(QPID_MSG("Consumer tags must be unique")); if (queue->hasExclusiveOwner() && !queue->isExclusiveOwner(&session) && acquireMode == 0) throw ResourceLockedException(QPID_MSG("Cannot subscribe to exclusive queue " << queue->getName())); state.consume(destination, queue, acceptMode == 0, acquireMode == 0, exclusive, resumeId, resumeTtl, arguments); ManagementAgent* agent = getBroker().getManagementAgent(); if (agent) agent->raiseEvent(_qmf::EventSubscribe(getConnection().getUrl(), getConnection().getUserId(), queueName, destination, exclusive, ManagementAgent::toMap(arguments))); } void SessionAdapter::MessageHandlerImpl::cancel(const string& destination ) { if (!state.cancel(destination)) { throw NotFoundException(QPID_MSG("No such subscription: " << destination)); } ManagementAgent* agent = getBroker().getManagementAgent(); if (agent) agent->raiseEvent(_qmf::EventUnsubscribe(getConnection().getUrl(), getConnection().getUserId(), destination)); } void SessionAdapter::MessageHandlerImpl::reject(const SequenceSet& transfers, uint16_t /*code*/, const string& /*text*/ ) { transfers.for_each(rejectOp); } void SessionAdapter::MessageHandlerImpl::flow(const std::string& destination, uint8_t unit, uint32_t value) { if (unit == 0) { //message state.addMessageCredit(destination, value); } else if (unit == 1) { //bytes state.addByteCredit(destination, value); } else { //unknown throw InvalidArgumentException(QPID_MSG("Invalid value for unit " << unit)); } } void SessionAdapter::MessageHandlerImpl::setFlowMode(const std::string& destination, uint8_t mode) { if (mode == 0) { //credit state.setCreditMode(destination); } else if (mode == 1) { //window state.setWindowMode(destination); } else{ throw InvalidArgumentException(QPID_MSG("Invalid value for mode " << mode)); } } void SessionAdapter::MessageHandlerImpl::flush(const std::string& destination) { state.flush(destination); } void SessionAdapter::MessageHandlerImpl::stop(const std::string& destination) { state.stop(destination); } void SessionAdapter::MessageHandlerImpl::accept(const framing::SequenceSet& commands) { state.accepted(commands); } framing::MessageAcquireResult SessionAdapter::MessageHandlerImpl::acquire(const framing::SequenceSet& transfers) { // FIXME aconway 2008-05-12: create SequenceSet directly, no need for intermediate results vector. SequenceNumberSet results; RangedOperation f = boost::bind(&SemanticState::acquire, &state, _1, _2, boost::ref(results)); transfers.for_each(f); results = results.condense(); SequenceSet acquisitions; RangedOperation g = boost::bind(&SequenceSet::add, &acquisitions, _1, _2); results.processRanges(g); return MessageAcquireResult(acquisitions); } framing::MessageResumeResult SessionAdapter::MessageHandlerImpl::resume(const std::string& /*destination*/, const std::string& /*resumeId*/) { throw NotImplementedException("resuming transfers not yet supported"); } void SessionAdapter::ExecutionHandlerImpl::sync() { session.addPendingExecutionSync(); /** @todo KAG - need a generic mechanism to allow a command to returning "not completed" status back to SessionState */ } void SessionAdapter::ExecutionHandlerImpl::result(const SequenceNumber& /*commandId*/, const string& /*value*/) { //TODO: but currently never used client->server } void SessionAdapter::ExecutionHandlerImpl::exception(uint16_t /*errorCode*/, const SequenceNumber& /*commandId*/, uint8_t /*classCode*/, uint8_t /*commandCode*/, uint8_t /*fieldIndex*/, const std::string& /*description*/, const framing::FieldTable& /*errorInfo*/) { //TODO: again, not really used client->server but may be important //for inter-broker links } void SessionAdapter::TxHandlerImpl::select() { state.startTx(); } void SessionAdapter::TxHandlerImpl::commit() { state.commit(&getBroker().getStore()); } void SessionAdapter::TxHandlerImpl::rollback() { state.rollback(); } std::string SessionAdapter::DtxHandlerImpl::convert(const framing::Xid& xid) { std::string encoded; encode(xid, encoded); return encoded; } void SessionAdapter::DtxHandlerImpl::select() { state.selectDtx(); } XaResult SessionAdapter::DtxHandlerImpl::end(const Xid& xid, bool fail, bool suspend) { try { if (fail) { state.endDtx(convert(xid), true); if (suspend) { throw CommandInvalidException(QPID_MSG("End and suspend cannot both be set.")); } else { return XaResult(XA_STATUS_XA_RBROLLBACK); } } else { if (suspend) { state.suspendDtx(convert(xid)); } else { state.endDtx(convert(xid), false); } return XaResult(XA_STATUS_XA_OK); } } catch (const DtxTimeoutException& /*e*/) { return XaResult(XA_STATUS_XA_RBTIMEOUT); } } XaResult SessionAdapter::DtxHandlerImpl::start(const Xid& xid, bool join, bool resume) { if (join && resume) { throw CommandInvalidException(QPID_MSG("Join and resume cannot both be set.")); } try { if (resume) { state.resumeDtx(convert(xid)); } else { state.startDtx(convert(xid), getBroker().getDtxManager(), join); } return XaResult(XA_STATUS_XA_OK); } catch (const DtxTimeoutException& /*e*/) { return XaResult(XA_STATUS_XA_RBTIMEOUT); } } XaResult SessionAdapter::DtxHandlerImpl::prepare(const Xid& xid) { try { bool ok = getBroker().getDtxManager().prepare(convert(xid)); return XaResult(ok ? XA_STATUS_XA_OK : XA_STATUS_XA_RBROLLBACK); } catch (const DtxTimeoutException& /*e*/) { return XaResult(XA_STATUS_XA_RBTIMEOUT); } } XaResult SessionAdapter::DtxHandlerImpl::commit(const Xid& xid, bool onePhase) { try { bool ok = getBroker().getDtxManager().commit(convert(xid), onePhase); return XaResult(ok ? XA_STATUS_XA_OK : XA_STATUS_XA_RBROLLBACK); } catch (const DtxTimeoutException& /*e*/) { return XaResult(XA_STATUS_XA_RBTIMEOUT); } } XaResult SessionAdapter::DtxHandlerImpl::rollback(const Xid& xid) { try { getBroker().getDtxManager().rollback(convert(xid)); return XaResult(XA_STATUS_XA_OK); } catch (const DtxTimeoutException& /*e*/) { return XaResult(XA_STATUS_XA_RBTIMEOUT); } } DtxRecoverResult SessionAdapter::DtxHandlerImpl::recover() { std::set xids; getBroker().getStore().collectPreparedXids(xids); /* * create array of long structs */ Array indoubt(0xAB); for (std::set::iterator i = xids.begin(); i != xids.end(); i++) { boost::shared_ptr xid(new Struct32Value(*i)); indoubt.add(xid); } return DtxRecoverResult(indoubt); } void SessionAdapter::DtxHandlerImpl::forget(const Xid& xid) { //Currently no heuristic completion is supported, so this should never be used. throw NotImplementedException(QPID_MSG("Forget not implemented. Branch with xid " << xid << " not heuristically completed!")); } DtxGetTimeoutResult SessionAdapter::DtxHandlerImpl::getTimeout(const Xid& xid) { uint32_t timeout = getBroker().getDtxManager().getTimeout(convert(xid)); return DtxGetTimeoutResult(timeout); } void SessionAdapter::DtxHandlerImpl::setTimeout(const Xid& xid, uint32_t timeout) { getBroker().getDtxManager().setTimeout(convert(xid), timeout); } Queue::shared_ptr SessionAdapter::HandlerHelper::getQueue(const string& name) const { Queue::shared_ptr queue; if (name.empty()) { throw framing::IllegalArgumentException(QPID_MSG("No queue name specified.")); } else { queue = session.getBroker().getQueues().find(name); if (!queue) throw framing::NotFoundException(QPID_MSG("Queue not found: "< #include #include namespace qpid { namespace broker { /** * Event manager for queue events. Allows queues to indicate when * events have occured; allows listeners to register for notification * of this. The notification happens asynchronously, in a separate * thread. */ class QueueEvents { public: enum EventType {ENQUEUE, DEQUEUE}; struct Event { EventType type; QueuedMessage msg; QPID_BROKER_EXTERN Event(EventType, const QueuedMessage&); }; typedef boost::function EventListener; QPID_BROKER_EXTERN QueueEvents(const boost::shared_ptr& poller, bool isSync = false); QPID_BROKER_EXTERN ~QueueEvents(); QPID_BROKER_EXTERN void enqueued(const QueuedMessage&); QPID_BROKER_EXTERN void dequeued(const QueuedMessage&); QPID_BROKER_EXTERN void registerListener(const std::string& id, const EventListener&); QPID_BROKER_EXTERN void unregisterListener(const std::string& id); void enable(); void disable(); void observe(Queue&, bool enqueueOnly); //process all outstanding events QPID_BROKER_EXTERN void shutdown(); QPID_BROKER_EXTERN bool isSync(); private: typedef qpid::sys::PollableQueue EventQueue; typedef std::map Listeners; EventQueue eventQueue; Listeners listeners; volatile bool enabled; qpid::sys::Mutex lock;//protect listeners from concurrent access bool sync; EventQueue::Batch::const_iterator handle(const EventQueue::Batch& e); }; }} // namespace qpid::broker #endif /*!QPID_BROKER_QUEUEEVENTS_H*/ qpidc-0.16/src/qpid/broker/MessageBuilder.cpp0000664000076400007640000000661711361633572021564 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/MessageBuilder.h" #include "qpid/broker/Message.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/NullMessageStore.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/reply_exceptions.h" using boost::intrusive_ptr; using namespace qpid::broker; using namespace qpid::framing; namespace { std::string type_str(uint8_t type); const std::string QPID_MANAGEMENT("qpid.management"); } MessageBuilder::MessageBuilder(MessageStore* const _store) : state(DORMANT), store(_store) {} void MessageBuilder::handle(AMQFrame& frame) { uint8_t type = frame.getBody()->type(); switch(state) { case METHOD: checkType(METHOD_BODY, type); state = HEADER; break; case HEADER: if (type == CONTENT_BODY) { //TODO: rethink how to handle non-existent headers(?)... //didn't get a header: add in a dummy AMQFrame header((AMQHeaderBody())); header.setBof(false); header.setEof(false); message->getFrames().append(header); } else if (type != HEADER_BODY) { throw CommandInvalidException( QPID_MSG("Invalid frame sequence for message, expected header or content got " << type_str(type) << ")")); } state = CONTENT; break; case CONTENT: checkType(CONTENT_BODY, type); break; default: throw CommandInvalidException(QPID_MSG("Invalid frame sequence for message (state=" << state << ")")); } message->getFrames().append(frame); } void MessageBuilder::end() { message = 0; state = DORMANT; } void MessageBuilder::start(const SequenceNumber& id) { message = intrusive_ptr(new Message(id)); message->setStore(store); state = METHOD; } namespace { const std::string HEADER_BODY_S = "HEADER"; const std::string METHOD_BODY_S = "METHOD"; const std::string CONTENT_BODY_S = "CONTENT"; const std::string HEARTBEAT_BODY_S = "HEARTBEAT"; const std::string UNKNOWN = "unknown"; std::string type_str(uint8_t type) { switch(type) { case METHOD_BODY: return METHOD_BODY_S; case HEADER_BODY: return HEADER_BODY_S; case CONTENT_BODY: return CONTENT_BODY_S; case HEARTBEAT_BODY: return HEARTBEAT_BODY_S; } return UNKNOWN; } } void MessageBuilder::checkType(uint8_t expected, uint8_t actual) { if (expected != actual) { throw CommandInvalidException(QPID_MSG("Invalid frame sequence for message (expected " << type_str(expected) << " got " << type_str(actual) << ")")); } } qpidc-0.16/src/qpid/broker/TxOp.h0000664000076400007640000000257311227113407017214 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TxOp_ #define _TxOp_ #include "qpid/broker/TxOpVisitor.h" #include "qpid/broker/TransactionalStore.h" #include namespace qpid { namespace broker { class TxOp{ public: typedef boost::shared_ptr shared_ptr; virtual bool prepare(TransactionContext*) throw() = 0; virtual void commit() throw() = 0; virtual void rollback() throw() = 0; virtual ~TxOp(){} virtual void accept(TxOpConstVisitor&) const = 0; }; }} // namespace qpid::broker #endif qpidc-0.16/src/qpid/broker/PersistableExchange.h0000664000076400007640000000234211227113407022234 0ustar00jrossjross00000000000000#ifndef _broker_PersistableExchange_h #define _broker_PersistableExchange_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/broker/Persistable.h" namespace qpid { namespace broker { /** * The interface exchanges must expose to the MessageStore in order to be * persistable. */ class PersistableExchange : public Persistable { public: virtual const std::string& getName() const = 0; virtual ~PersistableExchange() {}; }; }} #endif qpidc-0.16/src/qpid/broker/RecoveredDequeue.h0000664000076400007640000000350211455656100021554 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _RecoveredDequeue_ #define _RecoveredDequeue_ #include "qpid/broker/Deliverable.h" #include "qpid/broker/Message.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/TxOp.h" #include #include #include #include namespace qpid { namespace broker { class RecoveredDequeue : public TxOp{ boost::shared_ptr queue; boost::intrusive_ptr msg; public: RecoveredDequeue(boost::shared_ptr queue, boost::intrusive_ptr msg); virtual bool prepare(TransactionContext* ctxt) throw(); virtual void commit() throw(); virtual void rollback() throw(); virtual ~RecoveredDequeue(){} virtual void accept(TxOpConstVisitor& visitor) const { visitor(*this); } boost::shared_ptr getQueue() const { return queue; } boost::intrusive_ptr getMessage() const { return msg; } }; } } #endif qpidc-0.16/src/qpid/broker/Bridge.cpp0000664000076400007640000002731711717465066020073 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Bridge.h" #include "qpid/broker/FedOps.h" #include "qpid/broker/ConnectionState.h" #include "qpid/broker/Connection.h" #include "qpid/broker/Link.h" #include "qpid/broker/LinkRegistry.h" #include "qpid/ha/BrokerReplicator.h" #include "qpid/broker/SessionState.h" #include "qpid/management/ManagementAgent.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/framing/Uuid.h" #include "qpid/framing/MessageProperties.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/log/Statement.h" #include using qpid::framing::FieldTable; using qpid::framing::Uuid; using qpid::framing::Buffer; using qpid::framing::AMQFrame; using qpid::framing::AMQContentBody; using qpid::framing::AMQHeaderBody; using qpid::framing::MessageProperties; using qpid::framing::MessageTransferBody; using qpid::types::Variant; using qpid::management::ManagementAgent; using std::string; namespace _qmf = qmf::org::apache::qpid::broker; namespace qpid { namespace broker { void Bridge::PushHandler::handle(framing::AMQFrame& frame) { conn->received(frame); } Bridge::Bridge(Link* _link, framing::ChannelId _id, CancellationListener l, const _qmf::ArgsLinkBridge& _args, InitializeCallback init) : link(_link), id(_id), args(_args), mgmtObject(0), listener(l), name(Uuid(true).str()), queueName("qpid.bridge_queue_"), persistenceId(0), initialize(init) { std::stringstream title; title << id << "_" << name; queueName += title.str(); ManagementAgent* agent = link->getBroker()->getManagementAgent(); if (agent != 0) { mgmtObject = new _qmf::Bridge (agent, this, link, id, args.i_durable, args.i_src, args.i_dest, args.i_key, args.i_srcIsQueue, args.i_srcIsLocal, args.i_tag, args.i_excludes, args.i_dynamic, args.i_sync); agent->addObject(mgmtObject); } QPID_LOG(debug, "Bridge " << name << " created from " << args.i_src << " to " << args.i_dest); } Bridge::~Bridge() { mgmtObject->resourceDestroy(); } void Bridge::create(Connection& c) { connState = &c; conn = &c; FieldTable options; if (args.i_sync) options.setInt("qpid.sync_frequency", args.i_sync); SessionHandler& sessionHandler = c.getChannel(id); if (args.i_srcIsLocal) { if (args.i_dynamic) throw Exception("Dynamic routing not supported for push routes"); // Point the bridging commands at the local connection handler pushHandler.reset(new PushHandler(&c)); channelHandler.reset(new framing::ChannelHandler(id, pushHandler.get())); session.reset(new framing::AMQP_ServerProxy::Session(*channelHandler)); peer.reset(new framing::AMQP_ServerProxy(*channelHandler)); session->attach(name, false); session->commandPoint(0,0); } else { sessionHandler.attachAs(name); // Point the bridging commands at the remote peer broker peer.reset(new framing::AMQP_ServerProxy(sessionHandler.out)); } if (args.i_srcIsLocal) sessionHandler.getSession()->disableReceiverTracking(); if (initialize) initialize(*this, sessionHandler); else if (args.i_srcIsQueue) { peer->getMessage().subscribe(args.i_src, args.i_dest, args.i_sync ? 0 : 1, 0, false, "", 0, options); peer->getMessage().flow(args.i_dest, 0, 0xFFFFFFFF); peer->getMessage().flow(args.i_dest, 1, 0xFFFFFFFF); QPID_LOG(debug, "Activated bridge " << name << " for route from queue " << args.i_src << " to " << args.i_dest); } else { FieldTable queueSettings; if (args.i_tag.size()) { queueSettings.setString("qpid.trace.id", args.i_tag); } else { const string& peerTag = c.getFederationPeerTag(); if (peerTag.size()) queueSettings.setString("qpid.trace.id", peerTag); } if (args.i_excludes.size()) { queueSettings.setString("qpid.trace.exclude", args.i_excludes); } else { const string& localTag = link->getBroker()->getFederationTag(); if (localTag.size()) queueSettings.setString("qpid.trace.exclude", localTag); } bool durable = false;//should this be an arg, or would we use srcIsQueue for durable queues? bool autoDelete = !durable;//auto delete transient queues? peer->getQueue().declare(queueName, "", false, durable, true, autoDelete, queueSettings); if (!args.i_dynamic) peer->getExchange().bind(queueName, args.i_src, args.i_key, FieldTable()); peer->getMessage().subscribe(queueName, args.i_dest, 1, 0, false, "", 0, FieldTable()); peer->getMessage().flow(args.i_dest, 0, 0xFFFFFFFF); peer->getMessage().flow(args.i_dest, 1, 0xFFFFFFFF); if (args.i_dynamic) { Exchange::shared_ptr exchange = link->getBroker()->getExchanges().get(args.i_src); if (exchange.get() == 0) throw Exception("Exchange not found for dynamic route"); exchange->registerDynamicBridge(this); QPID_LOG(debug, "Activated bridge " << name << " for dynamic route for exchange " << args.i_src); } else { QPID_LOG(debug, "Activated bridge " << name << " for static route from exchange " << args.i_src << " to " << args.i_dest); } } if (args.i_srcIsLocal) sessionHandler.getSession()->enableReceiverTracking(); } void Bridge::cancel(Connection&) { if (resetProxy()) { peer->getMessage().cancel(args.i_dest); peer->getSession().detach(name); } QPID_LOG(debug, "Cancelled bridge " << name); } void Bridge::closed() { if (args.i_dynamic) { Exchange::shared_ptr exchange = link->getBroker()->getExchanges().find(args.i_src); if (exchange.get()) exchange->removeDynamicBridge(this); } QPID_LOG(debug, "Closed bridge " << name); } void Bridge::destroy() { listener(this); } bool Bridge::isSessionReady() const { SessionHandler& sessionHandler = conn->getChannel(id); return sessionHandler.ready(); } void Bridge::setPersistenceId(uint64_t pId) const { persistenceId = pId; } Bridge::shared_ptr Bridge::decode(LinkRegistry& links, Buffer& buffer) { string host; uint16_t port; string src; string dest; string key; string id; string excludes; buffer.getShortString(host); port = buffer.getShort(); bool durable(buffer.getOctet()); buffer.getShortString(src); buffer.getShortString(dest); buffer.getShortString(key); bool is_queue(buffer.getOctet()); bool is_local(buffer.getOctet()); buffer.getShortString(id); buffer.getShortString(excludes); bool dynamic(buffer.getOctet()); uint16_t sync = buffer.getShort(); return links.declare(host, port, durable, src, dest, key, is_queue, is_local, id, excludes, dynamic, sync).first; } void Bridge::encode(Buffer& buffer) const { buffer.putShortString(string("bridge")); buffer.putShortString(link->getHost()); buffer.putShort(link->getPort()); buffer.putOctet(args.i_durable ? 1 : 0); buffer.putShortString(args.i_src); buffer.putShortString(args.i_dest); buffer.putShortString(args.i_key); buffer.putOctet(args.i_srcIsQueue ? 1 : 0); buffer.putOctet(args.i_srcIsLocal ? 1 : 0); buffer.putShortString(args.i_tag); buffer.putShortString(args.i_excludes); buffer.putOctet(args.i_dynamic ? 1 : 0); buffer.putShort(args.i_sync); } uint32_t Bridge::encodedSize() const { return link->getHost().size() + 1 // short-string (host) + 7 // short-string ("bridge") + 2 // port + 1 // durable + args.i_src.size() + 1 + args.i_dest.size() + 1 + args.i_key.size() + 1 + 1 // srcIsQueue + 1 // srcIsLocal + args.i_tag.size() + 1 + args.i_excludes.size() + 1 + 1 // dynamic + 2; // sync } management::ManagementObject* Bridge::GetManagementObject (void) const { return (management::ManagementObject*) mgmtObject; } management::Manageable::status_t Bridge::ManagementMethod(uint32_t methodId, management::Args& /*args*/, string&) { if (methodId == _qmf::Bridge::METHOD_CLOSE) { //notify that we are closed destroy(); return management::Manageable::STATUS_OK; } else { return management::Manageable::STATUS_UNKNOWN_METHOD; } } void Bridge::propagateBinding(const string& key, const string& tagList, const string& op, const string& origin, qpid::framing::FieldTable* extra_args) { const string& localTag = link->getBroker()->getFederationTag(); const string& peerTag = connState->getFederationPeerTag(); if (tagList.find(peerTag) == tagList.npos) { FieldTable bindArgs; if (extra_args) { for (qpid::framing::FieldTable::ValueMap::iterator i=extra_args->begin(); i != extra_args->end(); ++i) { bindArgs.insert((*i)); } } string newTagList(tagList + string(tagList.empty() ? "" : ",") + localTag); bindArgs.setString(qpidFedOp, op); bindArgs.setString(qpidFedTags, newTagList); if (origin.empty()) bindArgs.setString(qpidFedOrigin, localTag); else bindArgs.setString(qpidFedOrigin, origin); conn->requestIOProcessing(boost::bind(&Bridge::ioThreadPropagateBinding, this, queueName, args.i_src, key, bindArgs)); } } void Bridge::sendReorigin() { FieldTable bindArgs; bindArgs.setString(qpidFedOp, fedOpReorigin); bindArgs.setString(qpidFedTags, link->getBroker()->getFederationTag()); conn->requestIOProcessing(boost::bind(&Bridge::ioThreadPropagateBinding, this, queueName, args.i_src, args.i_key, bindArgs)); } bool Bridge::resetProxy() { SessionHandler& sessionHandler = conn->getChannel(id); if (!sessionHandler.getSession()) peer.reset(); else peer.reset(new framing::AMQP_ServerProxy(sessionHandler.out)); return peer.get(); } void Bridge::ioThreadPropagateBinding(const string& queue, const string& exchange, const string& key, FieldTable args) { if (resetProxy()) { peer->getExchange().bind(queue, exchange, key, args); } else { QPID_LOG(error, "Cannot propagate binding for dynamic bridge as session has been detached, deleting dynamic bridge"); destroy(); } } bool Bridge::containsLocalTag(const string& tagList) const { const string& localTag = link->getBroker()->getFederationTag(); return (tagList.find(localTag) != tagList.npos); } const string& Bridge::getLocalTag() const { return link->getBroker()->getFederationTag(); } }} qpidc-0.16/src/qpid/broker/NullMessageStore.cpp0000664000076400007640000001210411551064740022105 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/NullMessageStore.h" #include "qpid/broker/MessageStoreModule.h" #include "qpid/broker/RecoveryManager.h" #include "qpid/log/Statement.h" #include "qpid/framing/reply_exceptions.h" #include using boost::intrusive_ptr; namespace qpid{ namespace broker{ const std::string nullxid = ""; class SimpleDummyCtxt : public TransactionContext {}; class DummyCtxt : public TPCTransactionContext { const std::string xid; public: DummyCtxt(const std::string& _xid) : xid(_xid) {} static std::string getXid(TransactionContext& ctxt) { DummyCtxt* c(dynamic_cast(&ctxt)); return c ? c->xid : nullxid; } }; NullMessageStore::NullMessageStore() : nextPersistenceId(1) {} bool NullMessageStore::init(const Options* /*options*/) {return true;} void NullMessageStore::truncateInit(const bool /*pushDownStoreFiles*/) {} void NullMessageStore::create(PersistableQueue& queue, const framing::FieldTable& /*args*/) { queue.setPersistenceId(nextPersistenceId++); } void NullMessageStore::destroy(PersistableQueue&) {} void NullMessageStore::create(const PersistableExchange& exchange, const framing::FieldTable& /*args*/) { exchange.setPersistenceId(nextPersistenceId++); } void NullMessageStore::destroy(const PersistableExchange& ) {} void NullMessageStore::bind(const PersistableExchange&, const PersistableQueue&, const std::string&, const framing::FieldTable&){} void NullMessageStore::unbind(const PersistableExchange&, const PersistableQueue&, const std::string&, const framing::FieldTable&){} void NullMessageStore::create(const PersistableConfig& config) { config.setPersistenceId(nextPersistenceId++); } void NullMessageStore::destroy(const PersistableConfig&) {} void NullMessageStore::recover(RecoveryManager&) {} void NullMessageStore::stage(const intrusive_ptr&) {} void NullMessageStore::destroy(PersistableMessage&) {} void NullMessageStore::appendContent(const intrusive_ptr&, const std::string&) {} void NullMessageStore::loadContent(const qpid::broker::PersistableQueue&, const intrusive_ptr&, std::string&, uint64_t, uint32_t) { throw qpid::framing::InternalErrorException("Can't load content; persistence not enabled"); } void NullMessageStore::enqueue(TransactionContext*, const intrusive_ptr& msg, const PersistableQueue&) { msg->enqueueComplete(); } void NullMessageStore::dequeue(TransactionContext*, const intrusive_ptr& msg, const PersistableQueue&) { msg->dequeueComplete(); } void NullMessageStore::flush(const qpid::broker::PersistableQueue&) {} uint32_t NullMessageStore::outstandingQueueAIO(const PersistableQueue& ) { return 0; } std::auto_ptr NullMessageStore::begin() { return std::auto_ptr(new SimpleDummyCtxt()); } std::auto_ptr NullMessageStore::begin(const std::string& xid) { return std::auto_ptr(new DummyCtxt(xid)); } void NullMessageStore::prepare(TPCTransactionContext& ctxt) { qpid::sys::ScopedLock l(lock); prepared.insert(DummyCtxt::getXid(ctxt)); } void NullMessageStore::commit(TransactionContext& ctxt) { qpid::sys::ScopedLock l(lock); prepared.erase(DummyCtxt::getXid(ctxt)); } void NullMessageStore::abort(TransactionContext& ctxt) { qpid::sys::ScopedLock l(lock); prepared.erase(DummyCtxt::getXid(ctxt)); } void NullMessageStore::collectPreparedXids(std::set& out) { qpid::sys::ScopedLock l(lock); out.insert(prepared.begin(), prepared.end()); } bool NullMessageStore::isNull() const { return true; } bool NullMessageStore::isNullStore(const MessageStore* store) { const MessageStoreModule* wrapper = dynamic_cast(store); if (wrapper) { return wrapper->isNull(); } else { const NullMessageStore* test = dynamic_cast(store); return test && test->isNull(); } } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/TxBuffer.cpp0000664000076400007640000000431411625531570020404 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/TxBuffer.h" #include "qpid/log/Statement.h" #include #include using boost::mem_fn; using namespace qpid::broker; bool TxBuffer::prepare(TransactionContext* const ctxt) { for(op_iterator i = ops.begin(); i < ops.end(); i++){ if(!(*i)->prepare(ctxt)){ return false; } } return true; } void TxBuffer::commit() { std::for_each(ops.begin(), ops.end(), mem_fn(&TxOp::commit)); ops.clear(); } void TxBuffer::rollback() { std::for_each(ops.begin(), ops.end(), mem_fn(&TxOp::rollback)); ops.clear(); } void TxBuffer::enlist(TxOp::shared_ptr op) { ops.push_back(op); } bool TxBuffer::commitLocal(TransactionalStore* const store) { if (!store) return false; try { std::auto_ptr ctxt = store->begin(); if (prepare(ctxt.get())) { store->commit(*ctxt); commit(); return true; } else { store->abort(*ctxt); rollback(); return false; } } catch (std::exception& e) { QPID_LOG(error, "Commit failed with exception: " << e.what()); } catch (...) { QPID_LOG(error, "Commit failed with unknown exception"); } return false; } void TxBuffer::accept(TxOpConstVisitor& v) const { std::for_each(ops.begin(), ops.end(), boost::bind(&TxOp::accept, _1, boost::ref(v))); } qpidc-0.16/src/qpid/broker/FifoDistributor.cpp0000664000076400007640000000311011717465066021776 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Queue.h" #include "qpid/broker/FifoDistributor.h" using namespace qpid::broker; FifoDistributor::FifoDistributor(Messages& container) : messages(container) {} bool FifoDistributor::nextConsumableMessage( Consumer::shared_ptr&, QueuedMessage& next ) { return messages.consume(next); } bool FifoDistributor::allocate(const std::string&, const QueuedMessage& ) { // by default, all messages present on the queue may be allocated as they have yet to // be acquired. return true; } bool FifoDistributor::nextBrowsableMessage( Consumer::shared_ptr& c, QueuedMessage& next ) { return messages.browse(c->getPosition(), next, !c->browseAcquired()); } void FifoDistributor::query(qpid::types::Variant::Map&) const { // nothing to see here.... } qpidc-0.16/src/qpid/broker/Link.cpp0000664000076400007640000004031611723533330017551 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Link.h" #include "qpid/broker/LinkRegistry.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Connection.h" #include "qpid/sys/Timer.h" #include "qmf/org/apache/qpid/broker/EventBrokerLinkUp.h" #include "qmf/org/apache/qpid/broker/EventBrokerLinkDown.h" #include "boost/bind.hpp" #include "qpid/log/Statement.h" #include "qpid/framing/enum.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/broker/AclModule.h" namespace qpid { namespace broker { using framing::Buffer; using framing::FieldTable; using framing::UnauthorizedAccessException; using framing::connection::CLOSE_CODE_CONNECTION_FORCED; using management::ManagementAgent; using management::ManagementObject; using management::Manageable; using management::Args; using sys::Mutex; using std::stringstream; using std::string; namespace _qmf = ::qmf::org::apache::qpid::broker; struct LinkTimerTask : public sys::TimerTask { LinkTimerTask(Link& l, sys::Timer& t) : TimerTask(int64_t(l.getBroker()->getOptions().linkMaintenanceInterval* sys::TIME_SEC), "Link retry timer"), link(l), timer(t) {} void fire() { link.maintenanceVisit(); setupNextFire(); timer.add(this); } Link& link; sys::Timer& timer; }; Link::Link(LinkRegistry* _links, MessageStore* _store, const string& _host, uint16_t _port, const string& _transport, bool _durable, const string& _authMechanism, const string& _username, const string& _password, Broker* _broker, Manageable* parent) : links(_links), store(_store), host(_host), port(_port), transport(_transport), durable(_durable), authMechanism(_authMechanism), username(_username), password(_password), persistenceId(0), mgmtObject(0), broker(_broker), state(0), visitCount(0), currentInterval(1), closing(false), reconnectNext(0), // Index of next address for reconnecting in url. channelCounter(1), connection(0), agent(0), timerTask(new LinkTimerTask(*this, broker->getTimer())) { if (parent != 0 && broker != 0) { agent = broker->getManagementAgent(); if (agent != 0) { mgmtObject = new _qmf::Link(agent, this, parent, _host, _port, _transport, _durable); agent->addObject(mgmtObject, 0, durable); } } if (links->isPassive()) { setStateLH(STATE_PASSIVE); } else { setStateLH(STATE_WAITING); startConnectionLH(); } broker->getTimer().add(timerTask); } Link::~Link () { if (state == STATE_OPERATIONAL && connection != 0) connection->close(CLOSE_CODE_CONNECTION_FORCED, "closed by management"); if (mgmtObject != 0) mgmtObject->resourceDestroy (); } void Link::setStateLH (int newState) { if (newState == state) return; state = newState; if (hideManagement()) return; switch (state) { case STATE_WAITING : mgmtObject->set_state("Waiting"); break; case STATE_CONNECTING : mgmtObject->set_state("Connecting"); break; case STATE_OPERATIONAL : mgmtObject->set_state("Operational"); break; case STATE_FAILED : mgmtObject->set_state("Failed"); break; case STATE_CLOSED : mgmtObject->set_state("Closed"); break; case STATE_PASSIVE : mgmtObject->set_state("Passive"); break; } } void Link::startConnectionLH () { assert(state == STATE_WAITING); try { // Set the state before calling connect. It is possible that connect // will fail synchronously and call Link::closed before returning. setStateLH(STATE_CONNECTING); broker->connect (host, boost::lexical_cast(port), transport, boost::bind (&Link::closed, this, _1, _2)); QPID_LOG (debug, "Inter-broker link connecting to " << host << ":" << port); } catch(const std::exception& e) { QPID_LOG(error, "Link connection to " << host << ":" << port << " failed: " << e.what()); setStateLH(STATE_WAITING); if (!hideManagement()) mgmtObject->set_lastError (e.what()); } } void Link::established(Connection* c) { if (state == STATE_PASSIVE) return; stringstream addr; addr << host << ":" << port; QPID_LOG (info, "Inter-broker link established to " << addr.str()); if (!hideManagement() && agent) agent->raiseEvent(_qmf::EventBrokerLinkUp(addr.str())); Mutex::ScopedLock mutex(lock); setStateLH(STATE_OPERATIONAL); currentInterval = 1; visitCount = 0; connection = c; if (closing) destroy(); else // Process any IO tasks bridges added before established. connection->requestIOProcessing (boost::bind(&Link::ioThreadProcessing, this)); } void Link::setUrl(const Url& u) { Mutex::ScopedLock mutex(lock); url = u; reconnectNext = 0; } void Link::opened() { Mutex::ScopedLock mutex(lock); if (!connection) return; // Get default URL from known-hosts if not already set if (url.empty()) { const std::vector& known = connection->getKnownHosts(); // Flatten vector of URLs into a single URL listing all addresses. url.clear(); for(size_t i = 0; i < known.size(); ++i) url.insert(url.end(), known[i].begin(), known[i].end()); reconnectNext = 0; QPID_LOG(debug, "Known hosts for peer of inter-broker link: " << url); } } void Link::closed(int, std::string text) { Mutex::ScopedLock mutex(lock); QPID_LOG (info, "Inter-broker link disconnected from " << host << ":" << port << " " << text); connection = 0; if (state == STATE_OPERATIONAL) { stringstream addr; addr << host << ":" << port; if (!hideManagement() && agent) agent->raiseEvent(_qmf::EventBrokerLinkDown(addr.str())); } for (Bridges::iterator i = active.begin(); i != active.end(); i++) { (*i)->closed(); created.push_back(*i); } active.clear(); if (state != STATE_FAILED && state != STATE_PASSIVE) { setStateLH(STATE_WAITING); if (!hideManagement()) mgmtObject->set_lastError (text); } if (closing) destroy(); } // Called in connection IO thread. void Link::destroy () { Bridges toDelete; { Mutex::ScopedLock mutex(lock); QPID_LOG (info, "Inter-broker link to " << host << ":" << port << " removed by management"); if (connection) connection->close(CLOSE_CODE_CONNECTION_FORCED, "closed by management"); connection = 0; setStateLH(STATE_CLOSED); // Move the bridges to be deleted into a local vector so there is no // corruption of the iterator caused by bridge deletion. for (Bridges::iterator i = active.begin(); i != active.end(); i++) { (*i)->closed(); toDelete.push_back(*i); } active.clear(); for (Bridges::iterator i = created.begin(); i != created.end(); i++) toDelete.push_back(*i); created.clear(); timerTask->cancel(); } // Now delete all bridges on this link (don't hold the lock for this). for (Bridges::iterator i = toDelete.begin(); i != toDelete.end(); i++) (*i)->destroy(); toDelete.clear(); links->destroy (host, port); } void Link::add(Bridge::shared_ptr bridge) { Mutex::ScopedLock mutex(lock); created.push_back (bridge); if (connection) connection->requestIOProcessing (boost::bind(&Link::ioThreadProcessing, this)); } void Link::cancel(Bridge::shared_ptr bridge) { bool needIOProcessing = false; { Mutex::ScopedLock mutex(lock); for (Bridges::iterator i = created.begin(); i != created.end(); i++) { if ((*i).get() == bridge.get()) { created.erase(i); break; } } for (Bridges::iterator i = active.begin(); i != active.end(); i++) { if ((*i).get() == bridge.get()) { cancellations.push_back(bridge); bridge->closed(); active.erase(i); break; } } needIOProcessing = !cancellations.empty(); } if (needIOProcessing && connection) connection->requestIOProcessing (boost::bind(&Link::ioThreadProcessing, this)); } void Link::ioThreadProcessing() { Mutex::ScopedLock mutex(lock); if (state != STATE_OPERATIONAL) return; // check for bridge session errors and recover if (!active.empty()) { Bridges::iterator removed = std::remove_if( active.begin(), active.end(), !boost::bind(&Bridge::isSessionReady, _1)); for (Bridges::iterator i = removed; i != active.end(); ++i) { Bridge::shared_ptr bridge = *i; bridge->closed(); bridge->cancel(*connection); created.push_back(bridge); } active.erase(removed, active.end()); } //process any pending creates and/or cancellations (do //cancellations first in case any of the creates represent //recreation of cancelled subscriptions if (!cancellations.empty()) { for (Bridges::iterator i = cancellations.begin(); i != cancellations.end(); ++i) { (*i)->cancel(*connection); } cancellations.clear(); } if (!created.empty()) { for (Bridges::iterator i = created.begin(); i != created.end(); ++i) { active.push_back(*i); (*i)->create(*connection); } created.clear(); } } void Link::maintenanceVisit () { Mutex::ScopedLock mutex(lock); if (state == STATE_WAITING) { visitCount++; if (visitCount >= currentInterval) { visitCount = 0; //switch host and port to next in url list if possible if (!tryFailoverLH()) { currentInterval *= 2; if (currentInterval > MAX_INTERVAL) currentInterval = MAX_INTERVAL; startConnectionLH(); } } } else if (state == STATE_OPERATIONAL && (!active.empty() || !created.empty() || !cancellations.empty()) && connection != 0) connection->requestIOProcessing (boost::bind(&Link::ioThreadProcessing, this)); } void Link::reconnectLH(const Address& a) { host = a.host; port = a.port; transport = a.protocol; startConnectionLH(); if (!hideManagement()) { stringstream errorString; errorString << "Failed over to " << a; mgmtObject->set_lastError(errorString.str()); } } bool Link::tryFailoverLH() { assert(state == STATE_WAITING); if (reconnectNext >= url.size()) reconnectNext = 0; if (url.empty()) return false; Address next = url[reconnectNext++]; if (next.host != host || next.port != port || next.protocol != transport) { links->changeAddress(Address(transport, host, port), next); QPID_LOG(debug, "Inter-broker link failing over to " << next.host << ":" << next.port); reconnectLH(next); return true; } return false; } // Management updates for a linke are inconsistent in a cluster, so they are // suppressed. bool Link::hideManagement() const { return !mgmtObject || ( broker && broker->isInCluster()); } uint Link::nextChannel() { Mutex::ScopedLock mutex(lock); return channelCounter++; } void Link::notifyConnectionForced(const string text) { Mutex::ScopedLock mutex(lock); setStateLH(STATE_FAILED); if (!hideManagement()) mgmtObject->set_lastError(text); } void Link::setPersistenceId(uint64_t id) const { persistenceId = id; } const string& Link::getName() const { return host; } Link::shared_ptr Link::decode(LinkRegistry& links, Buffer& buffer) { string host; uint16_t port; string transport; string authMechanism; string username; string password; buffer.getShortString(host); port = buffer.getShort(); buffer.getShortString(transport); bool durable(buffer.getOctet()); buffer.getShortString(authMechanism); buffer.getShortString(username); buffer.getShortString(password); return links.declare(host, port, transport, durable, authMechanism, username, password).first; } void Link::encode(Buffer& buffer) const { buffer.putShortString(string("link")); buffer.putShortString(host); buffer.putShort(port); buffer.putShortString(transport); buffer.putOctet(durable ? 1 : 0); buffer.putShortString(authMechanism); buffer.putShortString(username); buffer.putShortString(password); } uint32_t Link::encodedSize() const { return host.size() + 1 // short-string (host) + 5 // short-string ("link") + 2 // port + transport.size() + 1 // short-string(transport) + 1 // durable + authMechanism.size() + 1 + username.size() + 1 + password.size() + 1; } ManagementObject* Link::GetManagementObject (void) const { return (ManagementObject*) mgmtObject; } void Link::close() { Mutex::ScopedLock mutex(lock); if (!closing) { closing = true; if (state != STATE_CONNECTING && connection) { //connection can only be closed on the connections own IO processing thread connection->requestIOProcessing(boost::bind(&Link::destroy, this)); } } } Manageable::status_t Link::ManagementMethod (uint32_t op, Args& args, string& text) { switch (op) { case _qmf::Link::METHOD_CLOSE : close(); return Manageable::STATUS_OK; case _qmf::Link::METHOD_BRIDGE : _qmf::ArgsLinkBridge& iargs = (_qmf::ArgsLinkBridge&) args; QPID_LOG(debug, "Link::bridge() request received"); // Durable bridges are only valid on durable links if (iargs.i_durable && !durable) { text = "Can't create a durable route on a non-durable link"; return Manageable::STATUS_USER; } if (iargs.i_dynamic) { Exchange::shared_ptr exchange = getBroker()->getExchanges().get(iargs.i_src); if (exchange.get() == 0) { text = "Exchange not found"; return Manageable::STATUS_USER; } if (!exchange->supportsDynamicBinding()) { text = "Exchange type does not support dynamic routing"; return Manageable::STATUS_USER; } } std::pair result = links->declare (host, port, iargs.i_durable, iargs.i_src, iargs.i_dest, iargs.i_key, iargs.i_srcIsQueue, iargs.i_srcIsLocal, iargs.i_tag, iargs.i_excludes, iargs.i_dynamic, iargs.i_sync); if (result.second && iargs.i_durable) store->create(*result.first); return Manageable::STATUS_OK; } return Manageable::STATUS_UNKNOWN_METHOD; } void Link::setPassive(bool passive) { Mutex::ScopedLock mutex(lock); if (passive) { setStateLH(STATE_PASSIVE); } else { if (state == STATE_PASSIVE) { setStateLH(STATE_WAITING); } else { QPID_LOG(warning, "Ignoring attempt to activate non-passive link " << host << ":" << port); } } } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/QueueBindings.cpp0000664000076400007640000000343111705641346021422 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Queue.h" #include "qpid/broker/QueueBindings.h" #include "qpid/broker/ExchangeRegistry.h" #include "qpid/framing/reply_exceptions.h" using qpid::framing::FieldTable; using qpid::framing::NotFoundException; using std::string; using namespace qpid::broker; void QueueBindings::add(const string& exchange, const string& key, const FieldTable& args) { sys::Mutex::ScopedLock l(lock); bindings.push_back(QueueBinding(exchange, key, args)); } void QueueBindings::unbind(ExchangeRegistry& exchanges, Queue::shared_ptr queue) { Bindings local; { sys::Mutex::ScopedLock l(lock); local = bindings; } for (Bindings::iterator i = local.begin(); i != local.end(); i++) { Exchange::shared_ptr ex = exchanges.find(i->exchange); if (ex) ex->unbind(queue, i->key, &(i->args)); } } QueueBinding::QueueBinding(const string& _exchange, const string& _key, const FieldTable& _args) : exchange(_exchange), key(_key), args(_args) {} qpidc-0.16/src/qpid/broker/ConnectionObservers.h0000664000076400007640000000454011717465066022327 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_CONNECTIONOBSERVERS_H #define QPID_BROKER_CONNECTIONOBSERVERS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "ConnectionObserver.h" #include "qpid/sys/Mutex.h" #include #include namespace qpid { namespace broker { /** * A collection of connection observers. * Calling a ConnectionObserver function will call that function on each observer. * THREAD SAFE. */ class ConnectionObservers : public ConnectionObserver { public: void add(boost::shared_ptr observer) { sys::Mutex::ScopedLock l(lock); observers.insert(observer); } void remove(boost::shared_ptr observer) { sys::Mutex::ScopedLock l(lock); observers.erase(observer); } void connection(Connection& c) { each(boost::bind(&ConnectionObserver::connection, _1, boost::ref(c))); } void opened(Connection& c) { each(boost::bind(&ConnectionObserver::opened, _1, boost::ref(c))); } void closed(Connection& c) { each(boost::bind(&ConnectionObserver::closed, _1, boost::ref(c))); } void forced(Connection& c, const std::string& text) { each(boost::bind(&ConnectionObserver::forced, _1, boost::ref(c), text)); } private: typedef std::set > Observers; sys::Mutex lock; Observers observers; template void each(F f) { sys::Mutex::ScopedLock l(lock); std::for_each(observers.begin(), observers.end(), f); } }; }} // namespace qpid::broker #endif /*!QPID_BROKER_CONNECTIONOBSERVERS_H*/ qpidc-0.16/src/qpid/broker/DtxManager.h0000664000076400007640000000513411625713331020354 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _DtxManager_ #define _DtxManager_ #include #include "qpid/broker/DtxBuffer.h" #include "qpid/broker/DtxWorkRecord.h" #include "qpid/broker/TransactionalStore.h" #include "qpid/framing/amqp_types.h" #include "qpid/sys/Mutex.h" #include "qpid/ptr_map.h" namespace qpid { namespace broker { class DtxManager{ typedef boost::ptr_map WorkMap; struct DtxCleanup : public sys::TimerTask { DtxManager& mgr; const std::string& xid; DtxCleanup(uint32_t timeout, DtxManager& mgr, const std::string& xid); void fire(); }; WorkMap work; TransactionalStore* store; qpid::sys::Mutex lock; qpid::sys::Timer* timer; void remove(const std::string& xid); DtxWorkRecord* createWork(const std::string& xid); public: DtxManager(sys::Timer&); ~DtxManager(); void start(const std::string& xid, DtxBuffer::shared_ptr work); void join(const std::string& xid, DtxBuffer::shared_ptr work); void recover(const std::string& xid, std::auto_ptr txn, DtxBuffer::shared_ptr work); bool prepare(const std::string& xid); bool commit(const std::string& xid, bool onePhase); void rollback(const std::string& xid); void setTimeout(const std::string& xid, uint32_t secs); uint32_t getTimeout(const std::string& xid); void timedout(const std::string& xid); void setStore(TransactionalStore* store); void setTimer(sys::Timer& t) { timer = &t; } // Used by cluster for replication. template void each(F f) const { for (WorkMap::const_iterator i = work.begin(); i != work.end(); ++i) f(*ptr_map_ptr(i)); } DtxWorkRecord* getWork(const std::string& xid); bool exists(const std::string& xid); }; } } #endif qpidc-0.16/src/qpid/broker/ConnectionObserver.h0000664000076400007640000000340611717465066022144 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_CONNECTIONOBSERVER_H #define QPID_BROKER_CONNECTIONOBSERVER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace broker { class Connection; /** * Observer that is informed of connection events. For use by * plug-ins that want to be notified of, or influence, connection * events. */ class ConnectionObserver { public: virtual ~ConnectionObserver() {} /** Called when a connection is first established. */ virtual void connection(Connection&) {} /** Called when the opening negotiation is done and the connection is authenticated. * @exception Throwing an exception will abort the connection. */ virtual void opened(Connection&) {} /** Called when a connection is closed. */ virtual void closed(Connection&) {} /** Called when a connection is forced closed. */ virtual void forced(Connection&, const std::string& /*message*/) {} }; }} // namespace qpid::broker #endif /*!QPID_BROKER_CONNECTIONOBSERVER_H*/ qpidc-0.16/src/qpid/broker/TxBuffer.h0000664000076400007640000001051511227113407020042 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TxBuffer_ #define _TxBuffer_ #include #include #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/TransactionalStore.h" #include "qpid/broker/TxOp.h" /** * Represents a single transaction. As such, an instance of this class * will hold a list of operations representing the workload of the * transaction. This work can be committed or rolled back. Committing * is a two-stage process: first all the operations should be * prepared, then if that succeeds they can be committed. * * In the 2pc case, a successful prepare may be followed by either a * commit or a rollback. * * Atomicity of prepare is ensured by using a lower level * transactional facility. This saves explicitly rolling back all the * successfully prepared ops when one of them fails. i.e. we do not * use 2pc internally, we instead ensure that prepare is atomic at a * lower level. This makes individual prepare operations easier to * code. * * Transactions on a messaging broker effect three types of 'action': * (1) updates to persistent storage (2) updates to transient storage * or cached data (3) network writes. * * Of these, (1) should always occur atomically during prepare to * ensure that if the broker crashes while a transaction is being * completed the persistent state (which is all that then remains) is * consistent. (3) can only be done on commit, after a successful * prepare. There is a little more flexibility with (2) but any * changes made during prepare should be subject to the control of the * TransactionalStore in use. */ namespace qpid { namespace broker { class TxBuffer{ typedef std::vector::iterator op_iterator; std::vector ops; protected: public: typedef boost::shared_ptr shared_ptr; /** * Adds an operation to the transaction. */ QPID_BROKER_EXTERN void enlist(TxOp::shared_ptr op); /** * Requests that all ops are prepared. This should * primarily involve making sure that a persistent record * of the operations is stored where necessary. * * Once prepared, a transaction can be committed (or in * the 2pc case, rolled back). * * @returns true if all the operations prepared * successfully, false if not. */ QPID_BROKER_EXTERN bool prepare(TransactionContext* const ctxt); /** * Signals that the ops all prepared successfully and can * now commit, i.e. the operation can now be fully carried * out. * * Should only be called after a call to prepare() returns * true. */ QPID_BROKER_EXTERN void commit(); /** * Signals that all ops can be rolled back. * * Should only be called either after a call to prepare() * returns true (2pc) or instead of a prepare call * ('server-local') */ QPID_BROKER_EXTERN void rollback(); /** * Helper method for managing the process of server local * commit */ QPID_BROKER_EXTERN bool commitLocal(TransactionalStore* const store); // Used by cluster to replicate transaction status. void accept(TxOpConstVisitor& v) const; }; } } #endif qpidc-0.16/src/qpid/broker/DtxAck.cpp0000664000076400007640000000447311625531570020043 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/DtxAck.h" #include "qpid/log/Statement.h" using std::bind1st; using std::bind2nd; using std::mem_fun_ref; using namespace qpid::broker; DtxAck::DtxAck(const qpid::framing::SequenceSet& acked, DeliveryRecords& unacked) { remove_copy_if(unacked.begin(), unacked.end(), inserter(pending, pending.end()), not1(bind2nd(mem_fun_ref(&DeliveryRecord::coveredBy), &acked))); } DtxAck::DtxAck(DeliveryRecords& unacked) { pending = unacked; } bool DtxAck::prepare(TransactionContext* ctxt) throw() { try{ //record dequeue in the store for (DeliveryRecords::iterator i = pending.begin(); i != pending.end(); i++) { i->dequeue(ctxt); } return true; }catch(...){ QPID_LOG(error, "Failed to prepare"); return false; } } void DtxAck::commit() throw() { try { for_each(pending.begin(), pending.end(), mem_fun_ref(&DeliveryRecord::committed)); pending.clear(); } catch (const std::exception& e) { QPID_LOG(error, "Failed to commit: " << e.what()); } catch(...) { QPID_LOG(error, "Failed to commit (unknown error)"); } } void DtxAck::rollback() throw() { try { for_each(pending.begin(), pending.end(), mem_fun_ref(&DeliveryRecord::requeue)); pending.clear(); } catch (const std::exception& e) { QPID_LOG(error, "Failed to complete rollback: " << e.what()); } catch(...) { QPID_LOG(error, "Failed to complete rollback (unknown error)"); } } qpidc-0.16/src/qpid/broker/MessageDeque.h0000664000076400007640000000356511717465066020713 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_MESSAGEDEQUE_H #define QPID_BROKER_MESSAGEDEQUE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Messages.h" #include "qpid/broker/QueuedMessage.h" #include namespace qpid { namespace broker { /** * Provides the standard FIFO queue behaviour. */ class MessageDeque : public Messages { public: MessageDeque(); size_t size(); bool deleted(const QueuedMessage&); void release(const QueuedMessage&); bool acquire(const framing::SequenceNumber&, QueuedMessage&); bool find(const framing::SequenceNumber&, QueuedMessage&); bool browse(const framing::SequenceNumber&, QueuedMessage&, bool); bool consume(QueuedMessage&); bool push(const QueuedMessage& added, QueuedMessage& removed); void updateAcquired(const QueuedMessage& acquired); void foreach(Functor); void removeIf(Predicate); private: typedef std::deque Deque; Deque messages; size_t available; size_t head; size_t index(const framing::SequenceNumber&); void clean(); }; }} // namespace qpid::broker #endif /*!QPID_BROKER_MESSAGEDEQUE_H*/ qpidc-0.16/src/qpid/broker/FedOps.h0000664000076400007640000000262411460046143017500 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /* * Strings used to identify federated operations and operands. */ namespace { const std::string qpidFedOp("qpid.fed.op"); // a federation primitive const std::string qpidFedTags("qpid.fed.tags"); // a unique id for a broker const std::string qpidFedOrigin("qpid.fed.origin"); // the tag of the broker on which a propagated binding originated // Operands for qpidFedOp - each identifies a federation primitive const std::string fedOpBind("B"); const std::string fedOpUnbind("U"); const std::string fedOpReorigin("R"); const std::string fedOpHello("H"); } qpidc-0.16/src/qpid/broker/ConnectionFactory.cpp0000664000076400007640000000465611344233212022305 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/ConnectionFactory.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/amqp_0_10/Connection.h" #include "qpid/broker/Connection.h" #include "qpid/sys/SecuritySettings.h" #include "qpid/log/Statement.h" namespace qpid { namespace broker { using framing::ProtocolVersion; using qpid::sys::SecuritySettings; typedef std::auto_ptr ConnectionPtr; typedef std::auto_ptr InputPtr; ConnectionFactory::ConnectionFactory(Broker& b) : broker(b) {} ConnectionFactory::~ConnectionFactory() {} sys::ConnectionCodec* ConnectionFactory::create(ProtocolVersion v, sys::OutputControl& out, const std::string& id, const SecuritySettings& external) { if (broker.getConnectionCounter().allowConnection()) { QPID_LOG(error, "Client max connection count limit exceeded: " << broker.getOptions().maxConnections << " connection refused"); return 0; } if (v == ProtocolVersion(0, 10)) { ConnectionPtr c(new amqp_0_10::Connection(out, id, false)); c->setInputHandler(InputPtr(new broker::Connection(c.get(), broker, id, external, false))); return c.release(); } return 0; } sys::ConnectionCodec* ConnectionFactory::create(sys::OutputControl& out, const std::string& id, const SecuritySettings& external) { // used to create connections from one broker to another ConnectionPtr c(new amqp_0_10::Connection(out, id, true)); c->setInputHandler(InputPtr(new broker::Connection(c.get(), broker, id, external, true))); return c.release(); } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/DeliverableMessage.h0000664000076400007640000000305111564561152022045 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _DeliverableMessage_ #define _DeliverableMessage_ #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Deliverable.h" #include "qpid/broker/Message.h" #include namespace qpid { namespace broker { class QPID_BROKER_CLASS_EXTERN DeliverableMessage : public Deliverable{ boost::intrusive_ptr msg; public: QPID_BROKER_EXTERN DeliverableMessage(const boost::intrusive_ptr& msg); QPID_BROKER_EXTERN virtual void deliverTo(const boost::shared_ptr& queue); QPID_BROKER_EXTERN Message& getMessage(); QPID_BROKER_EXTERN uint64_t contentSize(); virtual ~DeliverableMessage(){} }; } } #endif qpidc-0.16/src/qpid/broker/AclModule.h0000664000076400007640000004073411723741731020200 0ustar00jrossjross00000000000000#ifndef QPID_ACLMODULE_ACL_H #define QPID_ACLMODULE_ACL_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/RefCounted.h" #include #include #include #include #include namespace qpid { namespace acl { // Interface enumerations. // These enumerations define enum lists and implied text strings // to match. They are used in two areas: // 1. In the ACL specifications in the ACL file, file parsing, and // internal rule storage. // 2. In the authorize interface in the rest of the broker where // code requests the ACL module to authorize an action. // ObjectType shared between ACL spec and ACL authorise interface enum ObjectType { OBJ_QUEUE, OBJ_EXCHANGE, OBJ_BROKER, OBJ_LINK, OBJ_METHOD, OBJECTSIZE }; // OBJECTSIZE must be last in list // Action shared between ACL spec and ACL authorise interface enum Action { ACT_CONSUME, ACT_PUBLISH, ACT_CREATE, ACT_ACCESS, ACT_BIND, ACT_UNBIND, ACT_DELETE, ACT_PURGE, ACT_UPDATE, ACTIONSIZE }; // ACTIONSIZE must be last in list // Property used in ACL authorize interface enum Property { PROP_NAME, PROP_DURABLE, PROP_OWNER, PROP_ROUTINGKEY, PROP_PASSIVE, PROP_AUTODELETE, PROP_EXCLUSIVE, PROP_TYPE, PROP_ALTERNATE, PROP_QUEUENAME, PROP_SCHEMAPACKAGE, PROP_SCHEMACLASS, PROP_POLICYTYPE, PROP_MAXQUEUESIZE, PROP_MAXQUEUECOUNT }; // Property used in ACL spec file // Note for properties common to file processing/rule storage and to // broker rule lookups the identical enum values are used. enum SpecProperty { SPECPROP_NAME = PROP_NAME, SPECPROP_DURABLE = PROP_DURABLE, SPECPROP_OWNER = PROP_OWNER, SPECPROP_ROUTINGKEY = PROP_ROUTINGKEY, SPECPROP_PASSIVE = PROP_PASSIVE, SPECPROP_AUTODELETE = PROP_AUTODELETE, SPECPROP_EXCLUSIVE = PROP_EXCLUSIVE, SPECPROP_TYPE = PROP_TYPE, SPECPROP_ALTERNATE = PROP_ALTERNATE, SPECPROP_QUEUENAME = PROP_QUEUENAME, SPECPROP_SCHEMAPACKAGE = PROP_SCHEMAPACKAGE, SPECPROP_SCHEMACLASS = PROP_SCHEMACLASS, SPECPROP_POLICYTYPE = PROP_POLICYTYPE, SPECPROP_MAXQUEUESIZELOWERLIMIT, SPECPROP_MAXQUEUESIZEUPPERLIMIT, SPECPROP_MAXQUEUECOUNTLOWERLIMIT, SPECPROP_MAXQUEUECOUNTUPPERLIMIT }; // AclResult shared between ACL spec and ACL authorise interface enum AclResult { ALLOW, ALLOWLOG, DENY, DENYLOG }; } // namespace acl namespace broker { class AclModule { public: // Some ACLs are invoked on every message transfer. // doTransferAcl pervents time consuming ACL calls on a per-message basis. virtual bool doTransferAcl()=0; virtual bool authorise( const std::string& id, const acl::Action& action, const acl::ObjectType& objType, const std::string& name, std::map* params=0)=0; virtual bool authorise( const std::string& id, const acl::Action& action, const acl::ObjectType& objType, const std::string& ExchangeName, const std::string& RoutingKey)=0; // Add specialized authorise() methods as required. virtual ~AclModule() {}; }; } // namespace broker namespace acl { class AclHelper { private: AclHelper(){} public: static inline ObjectType getObjectType(const std::string& str) { if (str.compare("queue") == 0) return OBJ_QUEUE; if (str.compare("exchange") == 0) return OBJ_EXCHANGE; if (str.compare("broker") == 0) return OBJ_BROKER; if (str.compare("link") == 0) return OBJ_LINK; if (str.compare("method") == 0) return OBJ_METHOD; throw str; } static inline std::string getObjectTypeStr(const ObjectType o) { switch (o) { case OBJ_QUEUE: return "queue"; case OBJ_EXCHANGE: return "exchange"; case OBJ_BROKER: return "broker"; case OBJ_LINK: return "link"; case OBJ_METHOD: return "method"; default: assert(false); // should never get here } return ""; } static inline Action getAction(const std::string& str) { if (str.compare("consume") == 0) return ACT_CONSUME; if (str.compare("publish") == 0) return ACT_PUBLISH; if (str.compare("create") == 0) return ACT_CREATE; if (str.compare("access") == 0) return ACT_ACCESS; if (str.compare("bind") == 0) return ACT_BIND; if (str.compare("unbind") == 0) return ACT_UNBIND; if (str.compare("delete") == 0) return ACT_DELETE; if (str.compare("purge") == 0) return ACT_PURGE; if (str.compare("update") == 0) return ACT_UPDATE; throw str; } static inline std::string getActionStr(const Action a) { switch (a) { case ACT_CONSUME: return "consume"; case ACT_PUBLISH: return "publish"; case ACT_CREATE: return "create"; case ACT_ACCESS: return "access"; case ACT_BIND: return "bind"; case ACT_UNBIND: return "unbind"; case ACT_DELETE: return "delete"; case ACT_PURGE: return "purge"; case ACT_UPDATE: return "update"; default: assert(false); // should never get here } return ""; } static inline Property getProperty(const std::string& str) { if (str.compare("name") == 0) return PROP_NAME; if (str.compare("durable") == 0) return PROP_DURABLE; if (str.compare("owner") == 0) return PROP_OWNER; if (str.compare("routingkey") == 0) return PROP_ROUTINGKEY; if (str.compare("passive") == 0) return PROP_PASSIVE; if (str.compare("autodelete") == 0) return PROP_AUTODELETE; if (str.compare("exclusive") == 0) return PROP_EXCLUSIVE; if (str.compare("type") == 0) return PROP_TYPE; if (str.compare("alternate") == 0) return PROP_ALTERNATE; if (str.compare("queuename") == 0) return PROP_QUEUENAME; if (str.compare("schemapackage") == 0) return PROP_SCHEMAPACKAGE; if (str.compare("schemaclass") == 0) return PROP_SCHEMACLASS; if (str.compare("policytype") == 0) return PROP_POLICYTYPE; if (str.compare("maxqueuesize") == 0) return PROP_MAXQUEUESIZE; if (str.compare("maxqueuecount") == 0) return PROP_MAXQUEUECOUNT; throw str; } static inline std::string getPropertyStr(const Property p) { switch (p) { case PROP_NAME: return "name"; case PROP_DURABLE: return "durable"; case PROP_OWNER: return "owner"; case PROP_ROUTINGKEY: return "routingkey"; case PROP_PASSIVE: return "passive"; case PROP_AUTODELETE: return "autodelete"; case PROP_EXCLUSIVE: return "exclusive"; case PROP_TYPE: return "type"; case PROP_ALTERNATE: return "alternate"; case PROP_QUEUENAME: return "queuename"; case PROP_SCHEMAPACKAGE: return "schemapackage"; case PROP_SCHEMACLASS: return "schemaclass"; case PROP_POLICYTYPE: return "policytype"; case PROP_MAXQUEUESIZE: return "maxqueuesize"; case PROP_MAXQUEUECOUNT: return "maxqueuecount"; default: assert(false); // should never get here } return ""; } static inline SpecProperty getSpecProperty(const std::string& str) { if (str.compare("name") == 0) return SPECPROP_NAME; if (str.compare("durable") == 0) return SPECPROP_DURABLE; if (str.compare("owner") == 0) return SPECPROP_OWNER; if (str.compare("routingkey") == 0) return SPECPROP_ROUTINGKEY; if (str.compare("passive") == 0) return SPECPROP_PASSIVE; if (str.compare("autodelete") == 0) return SPECPROP_AUTODELETE; if (str.compare("exclusive") == 0) return SPECPROP_EXCLUSIVE; if (str.compare("type") == 0) return SPECPROP_TYPE; if (str.compare("alternate") == 0) return SPECPROP_ALTERNATE; if (str.compare("queuename") == 0) return SPECPROP_QUEUENAME; if (str.compare("schemapackage") == 0) return SPECPROP_SCHEMAPACKAGE; if (str.compare("schemaclass") == 0) return SPECPROP_SCHEMACLASS; if (str.compare("policytype") == 0) return SPECPROP_POLICYTYPE; if (str.compare("queuemaxsizelowerlimit") == 0) return SPECPROP_MAXQUEUESIZELOWERLIMIT; if (str.compare("queuemaxsizeupperlimit") == 0) return SPECPROP_MAXQUEUESIZEUPPERLIMIT; if (str.compare("queuemaxcountlowerlimit") == 0) return SPECPROP_MAXQUEUECOUNTLOWERLIMIT; if (str.compare("queuemaxcountupperlimit") == 0) return SPECPROP_MAXQUEUECOUNTUPPERLIMIT; // Allow old names in ACL file as aliases for newly-named properties if (str.compare("maxqueuesize") == 0) return SPECPROP_MAXQUEUESIZEUPPERLIMIT; if (str.compare("maxqueuecount") == 0) return SPECPROP_MAXQUEUECOUNTUPPERLIMIT; throw str; } static inline std::string getPropertyStr(const SpecProperty p) { switch (p) { case SPECPROP_NAME: return "name"; case SPECPROP_DURABLE: return "durable"; case SPECPROP_OWNER: return "owner"; case SPECPROP_ROUTINGKEY: return "routingkey"; case SPECPROP_PASSIVE: return "passive"; case SPECPROP_AUTODELETE: return "autodelete"; case SPECPROP_EXCLUSIVE: return "exclusive"; case SPECPROP_TYPE: return "type"; case SPECPROP_ALTERNATE: return "alternate"; case SPECPROP_QUEUENAME: return "queuename"; case SPECPROP_SCHEMAPACKAGE: return "schemapackage"; case SPECPROP_SCHEMACLASS: return "schemaclass"; case SPECPROP_POLICYTYPE: return "policytype"; case SPECPROP_MAXQUEUESIZELOWERLIMIT: return "queuemaxsizelowerlimit"; case SPECPROP_MAXQUEUESIZEUPPERLIMIT: return "queuemaxsizeupperlimit"; case SPECPROP_MAXQUEUECOUNTLOWERLIMIT: return "queuemaxcountlowerlimit"; case SPECPROP_MAXQUEUECOUNTUPPERLIMIT: return "queuemaxcountupperlimit"; default: assert(false); // should never get here } return ""; } static inline AclResult getAclResult(const std::string& str) { if (str.compare("allow") == 0) return ALLOW; if (str.compare("allow-log") == 0) return ALLOWLOG; if (str.compare("deny") == 0) return DENY; if (str.compare("deny-log") == 0) return DENYLOG; throw str; } static inline std::string getAclResultStr(const AclResult r) { switch (r) { case ALLOW: return "allow"; case ALLOWLOG: return "allow-log"; case DENY: return "deny"; case DENYLOG: return "deny-log"; default: assert(false); // should never get here } return ""; } typedef std::set propSet; typedef boost::shared_ptr propSetPtr; typedef std::pair actionPair; typedef std::map actionMap; typedef boost::shared_ptr actionMapPtr; typedef std::pair objectPair; typedef std::map objectMap; typedef objectMap::const_iterator omCitr; typedef boost::shared_ptr objectMapPtr; typedef std::map propMap; typedef propMap::const_iterator propMapItr; typedef std::map specPropMap; typedef specPropMap::const_iterator specPropMapItr; // This map contains the legal combinations of object/action/properties // found in an ACL file static void loadValidationMap(objectMapPtr& map) { if (!map.get()) return; map->clear(); propSetPtr p0; // empty ptr, used for no properties // == Exchanges == propSetPtr p1(new propSet); p1->insert(PROP_TYPE); p1->insert(PROP_ALTERNATE); p1->insert(PROP_PASSIVE); p1->insert(PROP_DURABLE); propSetPtr p2(new propSet); p2->insert(PROP_ROUTINGKEY); propSetPtr p3(new propSet); p3->insert(PROP_QUEUENAME); p3->insert(PROP_ROUTINGKEY); actionMapPtr a0(new actionMap); a0->insert(actionPair(ACT_CREATE, p1)); a0->insert(actionPair(ACT_DELETE, p0)); a0->insert(actionPair(ACT_ACCESS, p0)); a0->insert(actionPair(ACT_BIND, p2)); a0->insert(actionPair(ACT_UNBIND, p2)); a0->insert(actionPair(ACT_ACCESS, p3)); a0->insert(actionPair(ACT_PUBLISH, p0)); map->insert(objectPair(OBJ_EXCHANGE, a0)); // == Queues == propSetPtr p4(new propSet); p4->insert(PROP_ALTERNATE); p4->insert(PROP_PASSIVE); p4->insert(PROP_DURABLE); p4->insert(PROP_EXCLUSIVE); p4->insert(PROP_AUTODELETE); p4->insert(PROP_POLICYTYPE); p4->insert(PROP_MAXQUEUESIZE); p4->insert(PROP_MAXQUEUECOUNT); actionMapPtr a1(new actionMap); a1->insert(actionPair(ACT_ACCESS, p0)); a1->insert(actionPair(ACT_CREATE, p4)); a1->insert(actionPair(ACT_PURGE, p0)); a1->insert(actionPair(ACT_DELETE, p0)); a1->insert(actionPair(ACT_CONSUME, p0)); map->insert(objectPair(OBJ_QUEUE, a1)); // == Links == actionMapPtr a2(new actionMap); a2->insert(actionPair(ACT_CREATE, p0)); map->insert(objectPair(OBJ_LINK, a2)); // == Method == propSetPtr p5(new propSet); p5->insert(PROP_SCHEMAPACKAGE); p5->insert(PROP_SCHEMACLASS); actionMapPtr a4(new actionMap); a4->insert(actionPair(ACT_ACCESS, p5)); map->insert(objectPair(OBJ_METHOD, a4)); } // // properyMapToString // template static std::string propertyMapToString( const std::map* params) { std::ostringstream ss; ss << "{"; if (params) { for (typename std::map::const_iterator pMItr = params->begin(); pMItr != params->end(); pMItr++) { ss << " " << getPropertyStr((T) pMItr-> first) << "=" << pMItr->second; } } ss << " }"; return ss.str(); } }; }} // namespace qpid::acl #endif // QPID_ACLMODULE_ACL_H qpidc-0.16/src/qpid/broker/ConnectionHandler.h0000664000076400007640000000736211723741731021730 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ConnectionAdapter_ #define _ConnectionAdapter_ #include #include "qpid/Sasl.h" #include "qpid/broker/SaslAuthenticator.h" #include "qpid/framing/amqp_types.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_AllOperations.h" #include "qpid/framing/AMQP_AllProxy.h" #include "qpid/framing/ConnectionStartOkBody.h" #include "qpid/framing/enum.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/ProtocolInitiation.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/Exception.h" #include "qpid/sys/SecurityLayer.h" namespace qpid { namespace sys { struct SecuritySettings; } namespace broker { class Connection; class SecureConnection; class ConnectionHandler : public framing::FrameHandler { struct Handler : public framing::AMQP_AllOperations::ConnectionHandler { framing::AMQP_AllProxy::Connection proxy; Connection& connection; bool serverMode; std::auto_ptr authenticator; SecureConnection* secured; bool isOpen; Handler(Connection& connection, bool isClient, bool isShadow=false); ~Handler(); void startOk(const qpid::framing::ConnectionStartOkBody& body); void startOk(const qpid::framing::FieldTable& clientProperties, const std::string& mechanism, const std::string& response, const std::string& locale); void secureOk(const std::string& response); void tuneOk(uint16_t channelMax, uint16_t frameMax, uint16_t heartbeat); void heartbeat(); void open(const std::string& virtualHost, const framing::Array& capabilities, bool insist); void close(uint16_t replyCode, const std::string& replyText); void closeOk(); void start(const qpid::framing::FieldTable& serverProperties, const framing::Array& mechanisms, const framing::Array& locales); void secure(const std::string& challenge); void tune(uint16_t channelMax, uint16_t frameMax, uint16_t heartbeatMin, uint16_t heartbeatMax); void openOk(const framing::Array& knownHosts); void redirect(const std::string& host, const framing::Array& knownHosts); std::auto_ptr sasl; typedef boost::function GetSecuritySettings; std::string saslUserId; uint16_t maxFrameSize; }; std::auto_ptr handler; bool handle(const qpid::framing::AMQMethodBody& method); public: ConnectionHandler(Connection& connection, bool isClient, bool isShadow=false ); void close(framing::connection::CloseCode code, const std::string& text); void heartbeat(); void handle(framing::AMQFrame& frame); void setSecureConnection(SecureConnection* secured); bool isOpen() { return handler->isOpen; } }; }} #endif qpidc-0.16/src/qpid/broker/FanOutExchange.cpp0000664000076400007640000001010611725210040021475 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/log/Statement.h" #include "qpid/broker/FanOutExchange.h" #include "qpid/broker/FedOps.h" #include using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::sys; namespace _qmf = qmf::org::apache::qpid::broker; FanOutExchange::FanOutExchange(const std::string& _name, Manageable* _parent, Broker* b) : Exchange(_name, _parent, b) { if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } FanOutExchange::FanOutExchange(const std::string& _name, bool _durable, const FieldTable& _args, Manageable* _parent, Broker* b) : Exchange(_name, _durable, _args, _parent, b) { if (mgmtExchange != 0) mgmtExchange->set_type (typeName); } bool FanOutExchange::bind(Queue::shared_ptr queue, const string& /*key*/, const FieldTable* args) { string fedOp(args ? args->getAsString(qpidFedOp) : fedOpBind); string fedTags(args ? args->getAsString(qpidFedTags) : ""); string fedOrigin(args ? args->getAsString(qpidFedOrigin) : ""); bool propagate = false; if (args == 0 || fedOp.empty() || fedOp == fedOpBind) { Binding::shared_ptr binding (new Binding ("", queue, this, FieldTable(), fedOrigin)); if (bindings.add_unless(binding, MatchQueue(queue))) { binding->startManagement(); propagate = fedBinding.addOrigin(queue->getName(), fedOrigin); if (mgmtExchange != 0) { mgmtExchange->inc_bindingCount(); } } else { // queue already present - still need to track fedOrigin fedBinding.addOrigin(queue->getName(), fedOrigin); return false; } } else if (fedOp == fedOpUnbind) { propagate = fedBinding.delOrigin(queue->getName(), fedOrigin); if (fedBinding.countFedBindings(queue->getName()) == 0) unbind(queue, "", args); } else if (fedOp == fedOpReorigin) { if (fedBinding.hasLocal()) { propagateFedOp(string(), string(), fedOpBind, string()); } } routeIVE(); if (propagate) propagateFedOp(string(), fedTags, fedOp, fedOrigin); return true; } bool FanOutExchange::unbind(Queue::shared_ptr queue, const string& /*key*/, const FieldTable* args) { string fedOrigin(args ? args->getAsString(qpidFedOrigin) : ""); bool propagate = false; QPID_LOG(debug, "Unbinding queue " << queue->getName() << " from exchange " << getName() << " origin=" << fedOrigin << ")" ); if (bindings.remove_if(MatchQueue(queue))) { propagate = fedBinding.delOrigin(queue->getName(), fedOrigin); if (mgmtExchange != 0) { mgmtExchange->dec_bindingCount(); } } else { return false; } if (propagate) propagateFedOp(string(), string(), fedOpUnbind, string()); return true; } void FanOutExchange::route(Deliverable& msg) { PreRoute pr(msg, this); doRoute(msg, bindings.snapshot()); } bool FanOutExchange::isBound(Queue::shared_ptr queue, const string* const, const FieldTable* const) { BindingsArray::ConstPtr ptr = bindings.snapshot(); return ptr && std::find_if(ptr->begin(), ptr->end(), MatchQueue(queue)) != ptr->end(); } FanOutExchange::~FanOutExchange() {} const std::string FanOutExchange::typeName("fanout"); qpidc-0.16/src/qpid/broker/MessageStoreModule.cpp0000664000076400007640000001227411455656100022430 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/MessageStoreModule.h" #include "qpid/broker/NullMessageStore.h" #include // This transfer protects against the unloading of the store lib prior to the handling of the exception #define TRANSFER_EXCEPTION(fn) try { fn; } catch (std::exception& e) { throw Exception(e.what()); } using boost::intrusive_ptr; using qpid::framing::FieldTable; using std::string; namespace qpid { namespace broker { MessageStoreModule::MessageStoreModule(boost::shared_ptr& _store) : store(_store) {} MessageStoreModule::~MessageStoreModule() { } bool MessageStoreModule::init(const Options*) { return true; } void MessageStoreModule::truncateInit(const bool pushDownStoreFiles) { TRANSFER_EXCEPTION(store->truncateInit(pushDownStoreFiles)); } void MessageStoreModule::create(PersistableQueue& queue, const FieldTable& args) { TRANSFER_EXCEPTION(store->create(queue, args)); } void MessageStoreModule::destroy(PersistableQueue& queue) { TRANSFER_EXCEPTION(store->destroy(queue)); } void MessageStoreModule::create(const PersistableExchange& exchange, const FieldTable& args) { TRANSFER_EXCEPTION(store->create(exchange, args)); } void MessageStoreModule::destroy(const PersistableExchange& exchange) { TRANSFER_EXCEPTION(store->destroy(exchange)); } void MessageStoreModule::bind(const PersistableExchange& e, const PersistableQueue& q, const std::string& k, const framing::FieldTable& a) { TRANSFER_EXCEPTION(store->bind(e, q, k, a)); } void MessageStoreModule::unbind(const PersistableExchange& e, const PersistableQueue& q, const std::string& k, const framing::FieldTable& a) { TRANSFER_EXCEPTION(store->unbind(e, q, k, a)); } void MessageStoreModule::create(const PersistableConfig& config) { TRANSFER_EXCEPTION(store->create(config)); } void MessageStoreModule::destroy(const PersistableConfig& config) { TRANSFER_EXCEPTION(store->destroy(config)); } void MessageStoreModule::recover(RecoveryManager& registry) { TRANSFER_EXCEPTION(store->recover(registry)); } void MessageStoreModule::stage(const intrusive_ptr& msg) { TRANSFER_EXCEPTION(store->stage(msg)); } void MessageStoreModule::destroy(PersistableMessage& msg) { TRANSFER_EXCEPTION(store->destroy(msg)); } void MessageStoreModule::appendContent(const intrusive_ptr& msg, const std::string& data) { TRANSFER_EXCEPTION(store->appendContent(msg, data)); } void MessageStoreModule::loadContent( const qpid::broker::PersistableQueue& queue, const intrusive_ptr& msg, string& data, uint64_t offset, uint32_t length) { TRANSFER_EXCEPTION(store->loadContent(queue, msg, data, offset, length)); } void MessageStoreModule::enqueue(TransactionContext* ctxt, const intrusive_ptr& msg, const PersistableQueue& queue) { TRANSFER_EXCEPTION(store->enqueue(ctxt, msg, queue)); } void MessageStoreModule::dequeue(TransactionContext* ctxt, const intrusive_ptr& msg, const PersistableQueue& queue) { TRANSFER_EXCEPTION(store->dequeue(ctxt, msg, queue)); } void MessageStoreModule::flush(const qpid::broker::PersistableQueue& queue) { TRANSFER_EXCEPTION(store->flush(queue)); } uint32_t MessageStoreModule::outstandingQueueAIO(const PersistableQueue& queue) { TRANSFER_EXCEPTION(return store->outstandingQueueAIO(queue)); } std::auto_ptr MessageStoreModule::begin() { TRANSFER_EXCEPTION(return store->begin()); } std::auto_ptr MessageStoreModule::begin(const std::string& xid) { TRANSFER_EXCEPTION(return store->begin(xid)); } void MessageStoreModule::prepare(TPCTransactionContext& txn) { TRANSFER_EXCEPTION(store->prepare(txn)); } void MessageStoreModule::commit(TransactionContext& ctxt) { TRANSFER_EXCEPTION(store->commit(ctxt)); } void MessageStoreModule::abort(TransactionContext& ctxt) { TRANSFER_EXCEPTION(store->abort(ctxt)); } void MessageStoreModule::collectPreparedXids(std::set& xids) { TRANSFER_EXCEPTION(store->collectPreparedXids(xids)); } bool MessageStoreModule::isNull() const { return NullMessageStore::isNullStore(store.get()); } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/DtxAck.h0000664000076400007640000000311711625531570017502 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_DTXACK_H #define QPID_BROKER_DTXACK_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "qpid/framing/SequenceSet.h" #include "qpid/broker/DeliveryRecord.h" #include "qpid/broker/TxOp.h" namespace qpid { namespace broker { class DtxAck : public TxOp{ DeliveryRecords pending; public: DtxAck(const framing::SequenceSet& acked, DeliveryRecords& unacked); DtxAck(DeliveryRecords& unacked); virtual bool prepare(TransactionContext* ctxt) throw(); virtual void commit() throw(); virtual void rollback() throw(); virtual ~DtxAck(){} virtual void accept(TxOpConstVisitor& visitor) const { visitor(*this); } const DeliveryRecords& getPending() const { return pending; } }; }} // qpid::broker #endif /*!QPID_BROKER_DTXACK_H*/ qpidc-0.16/src/qpid/broker/SecureConnection.h0000664000076400007640000000351711457521130021570 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_SECURECONNECTION_H #define QPID_BROKER_SECURECONNECTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/ConnectionCodec.h" #include namespace qpid { namespace sys { class SecurityLayer; } namespace broker { /** * A ConnectionCodec 'wrapper' that allows a connection to be * 'secured' e.g. encrypted based on settings negotiatiated at the * time of establishment. */ class SecureConnection : public qpid::sys::ConnectionCodec { public: SecureConnection(); size_t decode(const char* buffer, size_t size); size_t encode(const char* buffer, size_t size); bool canEncode(); void closed(); bool isClosed() const; framing::ProtocolVersion getVersion() const; void setCodec(std::auto_ptr); void activateSecurityLayer(std::auto_ptr, bool secureImmediately=false); private: std::auto_ptr codec; std::auto_ptr securityLayer; bool secured; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_SECURECONNECTION_H*/ qpidc-0.16/src/qpid/broker/Vhost.h0000664000076400007640000000263211202031524017411 0ustar00jrossjross00000000000000#ifndef _Vhost_ #define _Vhost_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/management/Manageable.h" #include "qmf/org/apache/qpid/broker/Vhost.h" #include namespace qpid { namespace broker { class Broker; class Vhost : public management::Manageable { private: qmf::org::apache::qpid::broker::Vhost* mgmtObject; public: typedef boost::shared_ptr shared_ptr; Vhost (management::Manageable* parentBroker, Broker* broker = 0); management::ManagementObject* GetManagementObject (void) const { return mgmtObject; } void setFederationTag(const std::string& tag); }; }} #endif /*!_Vhost_*/ qpidc-0.16/src/qpid/broker/PriorityQueue.cpp0000664000076400007640000001270411717465066021517 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/PriorityQueue.h" #include "qpid/broker/Queue.h" #include "qpid/broker/QueuedMessage.h" #include "qpid/framing/reply_exceptions.h" #include namespace qpid { namespace broker { PriorityQueue::PriorityQueue(int l) : levels(l), messages(levels, Deque()), frontLevel(0), haveFront(false), cached(false) {} bool PriorityQueue::deleted(const QueuedMessage&) { return true; } size_t PriorityQueue::size() { size_t total(0); for (int i = 0; i < levels; ++i) { total += messages[i].size(); } return total; } void PriorityQueue::release(const QueuedMessage& message) { uint p = getPriorityLevel(message); messages[p].insert(lower_bound(messages[p].begin(), messages[p].end(), message), message); clearCache(); } bool PriorityQueue::find(const framing::SequenceNumber& position, QueuedMessage& message, bool remove) { QueuedMessage comp; comp.position = position; for (int i = 0; i < levels; ++i) { if (!messages[i].empty()) { unsigned long diff = position.getValue() - messages[i].front().position.getValue(); long maxEnd = diff < messages[i].size() ? diff : messages[i].size(); Deque::iterator l = lower_bound(messages[i].begin(),messages[i].begin()+maxEnd,comp); if (l != messages[i].end() && l->position == position) { message = *l; if (remove) { messages[i].erase(l); clearCache(); } return true; } } } return false; } bool PriorityQueue::acquire(const framing::SequenceNumber& position, QueuedMessage& message) { return find(position, message, true); } bool PriorityQueue::find(const framing::SequenceNumber& position, QueuedMessage& message) { return find(position, message, false); } bool PriorityQueue::browse(const framing::SequenceNumber& position, QueuedMessage& message, bool) { QueuedMessage match; match.position = position+1; Deque::iterator lowest; bool found = false; for (int i = 0; i < levels; ++i) { Deque::iterator m = lower_bound(messages[i].begin(), messages[i].end(), match); if (m != messages[i].end()) { if (m->position == match.position) { message = *m; return true; } else if (!found || m->position < lowest->position) { lowest = m; found = true; } } } if (found) { message = *lowest; } return found; } bool PriorityQueue::consume(QueuedMessage& message) { if (checkFront()) { message = messages[frontLevel].front(); messages[frontLevel].pop_front(); clearCache(); return true; } else { return false; } } bool PriorityQueue::push(const QueuedMessage& added, QueuedMessage& /*not needed*/) { messages[getPriorityLevel(added)].push_back(added); clearCache(); return false;//adding a message never causes one to be removed for deque } void PriorityQueue::foreach(Functor f) { for (int i = 0; i < levels; ++i) { std::for_each(messages[i].begin(), messages[i].end(), f); } } void PriorityQueue::removeIf(Predicate p) { for (int priority = 0; priority < levels; ++priority) { for (Deque::iterator i = messages[priority].begin(); i != messages[priority].end();) { if (p(*i)) { i = messages[priority].erase(i); clearCache(); } else { ++i; } } } } uint PriorityQueue::getPriorityLevel(const QueuedMessage& m) const { uint priority = m.payload->getPriority(); //Use AMQP 0-10 approach to mapping priorities to a fixed level //(see rule priority-level-implementation) const uint firstLevel = 5 - uint(std::min(5.0, std::ceil((double) levels/2.0))); if (priority <= firstLevel) return 0; return std::min(priority - firstLevel, (uint)levels-1); } void PriorityQueue::clearCache() { cached = false; } bool PriorityQueue::findFrontLevel(uint& l, PriorityLevels& m) { for (int p = levels-1; p >= 0; --p) { if (!m[p].empty()) { l = p; return true; } } return false; } bool PriorityQueue::checkFront() { if (!cached) { haveFront = findFrontLevel(frontLevel, messages); cached = true; } return haveFront; } uint PriorityQueue::getPriority(const QueuedMessage& message) { const PriorityQueue* queue = dynamic_cast(&(message.queue->getMessages())); if (queue) return queue->getPriorityLevel(message); else return 0; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/Persistable.h0000664000076400007640000000331410716661126020601 0ustar00jrossjross00000000000000#ifndef _broker_Persistable_h #define _broker_Persistable_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/Buffer.h" #include "qpid/RefCounted.h" namespace qpid { namespace broker { /** * Base class for all persistable objects */ class Persistable : public RefCounted { public: /** * Allows the store to attach its own identifier to this object */ virtual void setPersistenceId(uint64_t id) const = 0; /** * Returns any identifier the store may have attached to this * object */ virtual uint64_t getPersistenceId() const = 0; /** * Encodes the persistable state of this object into the supplied * buffer */ virtual void encode(framing::Buffer& buffer) const = 0; /** * @returns the size of the buffer needed to encode this object */ virtual uint32_t encodedSize() const = 0; virtual ~Persistable() {}; }; }} #endif qpidc-0.16/src/qpid/broker/MessageStore.h0000664000076400007640000001656311446152121020726 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _MessageStore_ #define _MessageStore_ #include "qpid/broker/PersistableExchange.h" #include "qpid/broker/PersistableMessage.h" #include "qpid/broker/PersistableQueue.h" #include "qpid/broker/PersistableConfig.h" #include "qpid/broker/RecoveryManager.h" #include "qpid/broker/TransactionalStore.h" #include "qpid/framing/FieldTable.h" #include #include #include namespace qpid { namespace broker { /** * An abstraction of the persistent storage for messages. (In * all methods, any pointers/references to queues or messages * are valid only for the duration of the call). */ class MessageStore : public TransactionalStore, public Recoverable { public: /** * If called after initialization but before recovery, will discard the database * content and reinitialize as though it were a new installation. If the parameter * saveStoreContent is true, the content of the store will be saved in such a way * that the truncate can be reversed. This is used when cluster nodes recover and * must get their content from a cluster sync rather than directly from the store. * * @param saveStoreContent If true, will move content of the store to a backup * location where they may be restored later if needed. It is * not necessary to save more than one prior version of the * store. */ virtual void truncateInit(const bool saveStoreContent = false) = 0; /** * Record the existence of a durable queue */ virtual void create(PersistableQueue& queue, const framing::FieldTable& args) = 0; /** * Destroy a durable queue */ virtual void destroy(PersistableQueue& queue) = 0; /** * Record the existence of a durable exchange */ virtual void create(const PersistableExchange& exchange, const framing::FieldTable& args) = 0; /** * Destroy a durable exchange */ virtual void destroy(const PersistableExchange& exchange) = 0; /** * Record a binding */ virtual void bind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const framing::FieldTable& args) = 0; /** * Forget a binding */ virtual void unbind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const framing::FieldTable& args) = 0; /** * Record generic durable configuration */ virtual void create(const PersistableConfig& config) = 0; /** * Destroy generic durable configuration */ virtual void destroy(const PersistableConfig& config) = 0; /** * Stores a messages before it has been enqueued * (enqueueing automatically stores the message so this is * only required if storage is required prior to that * point). If the message has not yet been stored it will * store the headers as well as any content passed in. A * persistence id will be set on the message which can be * used to load the content or to append to it. */ virtual void stage(const boost::intrusive_ptr& msg) = 0; /** * Destroys a previously staged message. This only needs * to be called if the message is never enqueued. (Once * enqueued, deletion will be automatic when the message * is dequeued from all queues it was enqueued onto). */ virtual void destroy(PersistableMessage& msg) = 0; /** * Appends content to a previously staged message */ virtual void appendContent(const boost::intrusive_ptr& msg, const std::string& data) = 0; /** * Loads (a section) of content data for the specified * message (previously stored through a call to stage or * enqueue) into data. The offset refers to the content * only (i.e. an offset of 0 implies that the start of the * content should be loaded, not the headers or related * meta-data). */ virtual void loadContent(const qpid::broker::PersistableQueue& queue, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length) = 0; /** * Enqueues a message, storing the message if it has not * been previously stored and recording that the given * message is on the given queue. * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param msg the message to enqueue * @param queue the name of the queue onto which it is to be enqueued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void enqueue(TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue) = 0; /** * Dequeues a message, recording that the given message is * no longer on the given queue and deleting the message * if it is no longer on any other queue. * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param msg the message to dequeue * @param queue the name of the queue from which it is to be dequeued * @param xid (a pointer to) an identifier of the * distributed transaction in which the operation takes * place or null for 'local' transactions */ virtual void dequeue(TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue) = 0; /** * Flushes all async messages to disk for the specified queue * * Note: that this is async so the return of the function does * not mean the opperation is complete. * * @param queue the name of the queue from which it is to be dequeued */ virtual void flush(const qpid::broker::PersistableQueue& queue)=0; /** * Returns the number of outstanding AIO's for a given queue * * If 0, than all the enqueue / dequeues have been stored * to disk * * @param queue the name of the queue to check for outstanding AIO */ virtual uint32_t outstandingQueueAIO(const PersistableQueue& queue) = 0; virtual ~MessageStore(){} }; } } #endif qpidc-0.16/src/qpid/broker/StatefulQueueObserver.h0000664000076400007640000000405611556256327022642 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_STATEFULQUEUEOBSERVER_H #define QPID_BROKER_STATEFULQUEUEOBSERVER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/QueueObserver.h" #include "qpid/framing/FieldTable.h" namespace qpid { namespace broker { /** * Specialized type of QueueObserver that maintains internal state that has to * be replicated across clustered brokers. */ class StatefulQueueObserver : public QueueObserver { public: StatefulQueueObserver(std::string _id) : id(_id) {} virtual ~StatefulQueueObserver() {} /** This identifier must uniquely identify this particular observer amoung * all observers on a queue. For cluster replication, this id will be used * to identify the peer queue observer for synchronization across * brokers. */ const std::string& getId() const { return id; } /** This method should return the observer's internal state as an opaque * map. */ virtual void getState(qpid::framing::FieldTable& state ) const = 0; /** The input map represents the internal state of the peer observer that * this observer should synchonize to. */ virtual void setState(const qpid::framing::FieldTable&) = 0; private: std::string id; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_STATEFULQUEUEOBSERVER_H*/ qpidc-0.16/src/qpid/broker/TransactionalStore.h0000664000076400007640000000323410607150051022131 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TransactionalStore_ #define _TransactionalStore_ #include #include #include namespace qpid { namespace broker { struct InvalidTransactionContextException : public std::exception {}; class TransactionContext { public: virtual ~TransactionContext(){} }; class TPCTransactionContext : public TransactionContext { public: virtual ~TPCTransactionContext(){} }; class TransactionalStore { public: virtual std::auto_ptr begin() = 0; virtual std::auto_ptr begin(const std::string& xid) = 0; virtual void prepare(TPCTransactionContext& txn) = 0; virtual void commit(TransactionContext& txn) = 0; virtual void abort(TransactionContext& txn) = 0; virtual void collectPreparedXids(std::set& xids) = 0; virtual ~TransactionalStore(){} }; } } #endif qpidc-0.16/src/qpid/broker/PersistableMessage.cpp0000664000076400007640000001013111527755664022450 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/PersistableMessage.h" #include "qpid/broker/MessageStore.h" #include using namespace qpid::broker; namespace qpid { namespace broker { class MessageStore; PersistableMessage::~PersistableMessage() {} PersistableMessage::PersistableMessage() : asyncDequeueCounter(0), store(0) {} void PersistableMessage::flush() { syncList copy; { sys::ScopedLock l(storeLock); if (store) { copy = synclist; } else { return;//early exit as nothing to do } } for (syncList::iterator i = copy.begin(); i != copy.end(); ++i) { PersistableQueue::shared_ptr q(i->lock()); if (q) { q->flush(); } } } void PersistableMessage::setContentReleased() { contentReleaseState.released = true; } bool PersistableMessage::isContentReleased() const { return contentReleaseState.released; } bool PersistableMessage::isStoredOnQueue(PersistableQueue::shared_ptr queue){ if (store && (queue->getPersistenceId()!=0)) { for (syncList::iterator i = synclist.begin(); i != synclist.end(); ++i) { PersistableQueue::shared_ptr q(i->lock()); if (q && q->getPersistenceId() == queue->getPersistenceId()) return true; } } return false; } void PersistableMessage::addToSyncList(PersistableQueue::shared_ptr queue, MessageStore* _store) { if (_store){ sys::ScopedLock l(storeLock); store = _store; boost::weak_ptr q(queue); synclist.push_back(q); } } void PersistableMessage::enqueueAsync(PersistableQueue::shared_ptr queue, MessageStore* _store) { addToSyncList(queue, _store); enqueueStart(); } bool PersistableMessage::isDequeueComplete() { sys::ScopedLock l(asyncDequeueLock); return asyncDequeueCounter == 0; } void PersistableMessage::dequeueComplete() { bool notify = false; { sys::ScopedLock l(asyncDequeueLock); if (asyncDequeueCounter > 0) { if (--asyncDequeueCounter == 0) { notify = true; } } } if (notify) allDequeuesComplete(); } void PersistableMessage::dequeueAsync(PersistableQueue::shared_ptr queue, MessageStore* _store) { if (_store){ sys::ScopedLock l(storeLock); store = _store; boost::weak_ptr q(queue); synclist.push_back(q); } dequeueAsync(); } void PersistableMessage::dequeueAsync() { sys::ScopedLock l(asyncDequeueLock); asyncDequeueCounter++; } PersistableMessage::ContentReleaseState::ContentReleaseState() : blocked(false), requested(false), released(false) {} void PersistableMessage::setStore(MessageStore* s) { store = s; } void PersistableMessage::requestContentRelease() { contentReleaseState.requested = true; } void PersistableMessage::blockContentRelease() { contentReleaseState.blocked = true; } bool PersistableMessage::checkContentReleasable() { return contentReleaseState.requested && !contentReleaseState.blocked; } bool PersistableMessage::isContentReleaseBlocked() { return contentReleaseState.blocked; } bool PersistableMessage::isContentReleaseRequested() { return contentReleaseState.requested; } }} qpidc-0.16/src/qpid/broker/ThresholdAlerts.h0000664000076400007640000000515311643605374021441 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_THRESHOLDALERTS_H #define QPID_BROKER_THRESHOLDALERTS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/QueueObserver.h" #include "qpid/sys/Time.h" #include "qpid/types/Variant.h" #include namespace qpid { namespace framing { class FieldTable; } namespace management { class ManagementAgent; } namespace broker { class Queue; /** * Class to manage generation of QMF alerts when particular thresholds * are breached on a queue. */ class ThresholdAlerts : public QueueObserver { public: ThresholdAlerts(const std::string& name, qpid::management::ManagementAgent& agent, const uint32_t countThreshold, const uint64_t sizeThreshold, const long repeatInterval); void enqueued(const QueuedMessage&); void dequeued(const QueuedMessage&); void acquired(const QueuedMessage&) {}; void requeued(const QueuedMessage&) {}; static void observe(Queue& queue, qpid::management::ManagementAgent& agent, const uint64_t countThreshold, const uint64_t sizeThreshold, const long repeatInterval); static void observe(Queue& queue, qpid::management::ManagementAgent& agent, const qpid::framing::FieldTable& settings, uint16_t limitRatio); static void observe(Queue& queue, qpid::management::ManagementAgent& agent, const qpid::types::Variant::Map& settings, uint16_t limitRatio); private: const std::string name; qpid::management::ManagementAgent& agent; const uint32_t countThreshold; const uint64_t sizeThreshold; const qpid::sys::Duration repeatInterval; uint64_t count; uint64_t size; qpid::sys::AbsTime lastAlert; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_THRESHOLDALERTS_H*/ qpidc-0.16/src/qpid/broker/MessageMap.h0000664000076400007640000000433011717465066020354 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_MESSAGEMAP_H #define QPID_BROKER_MESSAGEMAP_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Messages.h" #include "qpid/framing/SequenceNumber.h" #include #include namespace qpid { namespace broker { /** * Provides a last value queue behaviour, whereby a messages replace * any previous message with the same value for a defined property * (i.e. the key). */ class MessageMap : public Messages { public: MessageMap(const std::string& key); virtual ~MessageMap() {} size_t size(); bool empty(); bool deleted(const QueuedMessage&); void release(const QueuedMessage&); virtual bool acquire(const framing::SequenceNumber&, QueuedMessage&); bool find(const framing::SequenceNumber&, QueuedMessage&); virtual bool browse(const framing::SequenceNumber&, QueuedMessage&, bool); bool consume(QueuedMessage&); virtual bool push(const QueuedMessage& added, QueuedMessage& removed); void foreach(Functor); virtual void removeIf(Predicate); protected: typedef std::map Index; typedef std::map Ordering; const std::string key; Index index; Ordering messages; std::string getKey(const QueuedMessage&); virtual const QueuedMessage& replace(const QueuedMessage&, const QueuedMessage&); void erase(Ordering::iterator); }; }} // namespace qpid::broker #endif /*!QPID_BROKER_MESSAGEMAP_H*/ qpidc-0.16/src/qpid/broker/TxAccept.cpp0000664000076400007640000000601711256205401020363 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/TxAccept.h" #include "qpid/log/Statement.h" using std::bind1st; using std::bind2nd; using std::mem_fun_ref; using namespace qpid::broker; using qpid::framing::SequenceSet; using qpid::framing::SequenceNumber; TxAccept::RangeOp::RangeOp(const AckRange& r) : range(r) {} void TxAccept::RangeOp::prepare(TransactionContext* ctxt) { for_each(range.start, range.end, bind(&DeliveryRecord::dequeue, _1, ctxt)); } void TxAccept::RangeOp::commit() { for_each(range.start, range.end, bind(&DeliveryRecord::committed, _1)); for_each(range.start, range.end, bind(&DeliveryRecord::setEnded, _1)); } TxAccept::RangeOps::RangeOps(DeliveryRecords& u) : unacked(u) {} void TxAccept::RangeOps::operator()(SequenceNumber start, SequenceNumber end) { ranges.push_back(RangeOp(DeliveryRecord::findRange(unacked, start, end))); } void TxAccept::RangeOps::prepare(TransactionContext* ctxt) { std::for_each(ranges.begin(), ranges.end(), bind(&RangeOp::prepare, _1, ctxt)); } void TxAccept::RangeOps::commit() { std::for_each(ranges.begin(), ranges.end(), bind(&RangeOp::commit, _1)); //now remove if isRedundant(): if (!ranges.empty()) { DeliveryRecords::iterator begin = ranges.front().range.start; DeliveryRecords::iterator end = ranges.back().range.end; DeliveryRecords::iterator removed = remove_if(begin, end, mem_fun_ref(&DeliveryRecord::isRedundant)); unacked.erase(removed, end); } } TxAccept::TxAccept(const SequenceSet& _acked, DeliveryRecords& _unacked) : acked(_acked), unacked(_unacked), ops(unacked) { //populate the ops acked.for_each(ops); } bool TxAccept::prepare(TransactionContext* ctxt) throw() { try{ ops.prepare(ctxt); return true; }catch(const std::exception& e){ QPID_LOG(error, "Failed to prepare: " << e.what()); return false; }catch(...){ QPID_LOG(error, "Failed to prepare"); return false; } } void TxAccept::commit() throw() { try { ops.commit(); } catch (const std::exception& e) { QPID_LOG(error, "Failed to commit: " << e.what()); } catch(...) { QPID_LOG(error, "Failed to commit (unknown error)"); } } void TxAccept::rollback() throw() {} qpidc-0.16/src/qpid/broker/Exchange.h0000664000076400007640000002222211725210040020027 0ustar00jrossjross00000000000000#ifndef _broker_Exchange_h #define _broker_Exchange_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Deliverable.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/PersistableExchange.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/Mutex.h" #include "qpid/management/Manageable.h" #include "qmf/org/apache/qpid/broker/Exchange.h" #include "qmf/org/apache/qpid/broker/Binding.h" #include "qmf/org/apache/qpid/broker/Broker.h" namespace qpid { namespace broker { class Broker; class ExchangeRegistry; class QPID_BROKER_CLASS_EXTERN Exchange : public PersistableExchange, public management::Manageable { public: struct Binding : public management::Manageable { typedef boost::shared_ptr shared_ptr; typedef std::vector vector; Exchange* parent; boost::shared_ptr queue; const std::string key; const framing::FieldTable args; std::string origin; qmf::org::apache::qpid::broker::Binding* mgmtBinding; Binding(const std::string& key, boost::shared_ptr queue, Exchange* parent = 0, framing::FieldTable args = framing::FieldTable(), const std::string& origin = std::string()); ~Binding(); void startManagement(); management::ManagementObject* GetManagementObject() const; }; private: const std::string name; const bool durable; std::string alternateName; boost::shared_ptr alternate; uint32_t alternateUsers; mutable uint64_t persistenceId; protected: mutable qpid::framing::FieldTable args; bool sequence; mutable qpid::sys::Mutex sequenceLock; int64_t sequenceNo; bool ive; boost::intrusive_ptr lastMsg; class PreRoute{ public: PreRoute(Deliverable& msg, Exchange* _p); ~PreRoute(); private: Exchange* parent; }; typedef boost::shared_ptr > > ConstBindingList; typedef boost::shared_ptr< std::vector > > BindingList; void doRoute(Deliverable& msg, ConstBindingList b); void routeIVE(); struct MatchQueue { const boost::shared_ptr queue; MatchQueue(boost::shared_ptr q); bool operator()(Exchange::Binding::shared_ptr b); }; /** A FedBinding keeps track of information that Federation needs to know when to propagate changes. Dynamic federation needs to know which exchanges have at least one local binding. The bindings on these exchanges need to be propagated. Federated binds and unbinds need to know which federation origins are associated with the bindings for each queue. When origins are added or deleted, the corresponding bindings need to be propagated. fedBindings[queueName] contains the origins associated with the given queue. */ class FedBinding { uint32_t localBindings; typedef std::set originSet; std::map fedBindings; public: FedBinding() : localBindings(0) {} bool hasLocal() const { return localBindings != 0; } /** Returns true if propagation is needed. */ bool addOrigin(const std::string& queueName, const std::string& origin) { if (origin.empty()) { localBindings++; return localBindings == 1; } fedBindings[queueName].insert(origin); return true; } /** Returns true if propagation is needed. */ bool delOrigin(const std::string& queueName, const std::string& origin){ if (origin.empty()) { // no remote == local binding if (localBindings > 0) localBindings--; return localBindings == 0; } size_t match = fedBindings[queueName].erase(origin); if (fedBindings[queueName].empty()) fedBindings.erase(queueName); return match != 0; } uint32_t count() { return localBindings + fedBindings.size(); } uint32_t countFedBindings(const std::string& queueName) { // don't use '[]' - it may increase size of fedBindings! std::map::iterator i; if ((i = fedBindings.find(queueName)) != fedBindings.end()) return i->second.size(); return 0; } }; qmf::org::apache::qpid::broker::Exchange* mgmtExchange; qmf::org::apache::qpid::broker::Broker* brokerMgmtObject; public: typedef boost::shared_ptr shared_ptr; QPID_BROKER_EXTERN explicit Exchange(const std::string& name, management::Manageable* parent = 0, Broker* broker = 0); QPID_BROKER_EXTERN Exchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, management::Manageable* parent = 0, Broker* broker = 0); QPID_BROKER_INLINE_EXTERN virtual ~Exchange(); const std::string& getName() const { return name; } bool isDurable() { return durable; } qpid::framing::FieldTable& getArgs() { return args; } Exchange::shared_ptr getAlternate() { return alternate; } void setAlternate(Exchange::shared_ptr _alternate); void incAlternateUsers() { alternateUsers++; } void decAlternateUsers() { alternateUsers--; } bool inUseAsAlternate() { return alternateUsers > 0; } virtual std::string getType() const = 0; /** * bind() is used for two distinct purposes: * * 1. To create a binding, in the conventional sense * * 2. As a vehicle for any FedOp, currently including federated * binding, federated unbinding, federated reorigin. * */ virtual bool bind(boost::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args) = 0; virtual bool unbind(boost::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args) = 0; virtual bool isBound(boost::shared_ptr queue, const std::string* const routingKey, const qpid::framing::FieldTable* const args) = 0; QPID_BROKER_EXTERN virtual void setProperties(const boost::intrusive_ptr&); virtual void route(Deliverable& msg) = 0; //PersistableExchange: QPID_BROKER_EXTERN void setPersistenceId(uint64_t id) const; uint64_t getPersistenceId() const { return persistenceId; } QPID_BROKER_EXTERN uint32_t encodedSize() const; QPID_BROKER_EXTERN virtual void encode(framing::Buffer& buffer) const; static QPID_BROKER_EXTERN Exchange::shared_ptr decode(ExchangeRegistry& exchanges, framing::Buffer& buffer); // Manageable entry points QPID_BROKER_EXTERN management::ManagementObject* GetManagementObject(void) const; // Federation hooks class DynamicBridge { public: virtual ~DynamicBridge() {} virtual void propagateBinding(const std::string& key, const std::string& tagList, const std::string& op, const std::string& origin, qpid::framing::FieldTable* extra_args=0) = 0; virtual void sendReorigin() = 0; virtual bool containsLocalTag(const std::string& tagList) const = 0; virtual const std::string& getLocalTag() const = 0; }; void registerDynamicBridge(DynamicBridge* db); void removeDynamicBridge(DynamicBridge* db); virtual bool supportsDynamicBinding() { return false; } Broker* getBroker() const { return broker; } /** * Notify exchange that recovery has completed. */ void recoveryComplete(ExchangeRegistry& exchanges); bool routeWithAlternate(Deliverable& message); void destroy() { destroyed = true; } bool isDestroyed() const { return destroyed; } protected: qpid::sys::Mutex bridgeLock; std::vector bridgeVector; Broker* broker; bool destroyed; QPID_BROKER_EXTERN virtual void handleHelloRequest(); void propagateFedOp(const std::string& routingKey, const std::string& tags, const std::string& op, const std::string& origin, qpid::framing::FieldTable* extra_args=0); }; }} #endif /*!_broker_Exchange.cpp_h*/ qpidc-0.16/src/qpid/broker/RecoverableConfig.h0000664000076400007640000000231611012074207021670 0ustar00jrossjross00000000000000#ifndef _broker_RecoverableConfig_h #define _broker_RecoverableConfig_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace broker { /** * The interface through which configurations are recovered. */ class RecoverableConfig { public: typedef boost::shared_ptr shared_ptr; virtual void setPersistenceId(uint64_t id) = 0; virtual ~RecoverableConfig() {}; }; }} #endif qpidc-0.16/src/qpid/broker/posix/0000775000076400007640000000000011752725715017322 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/broker/posix/BrokerDefaults.cpp0000664000076400007640000000233311226723262022732 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Broker.h" #include namespace qpid { namespace broker { const std::string Broker::Options::DEFAULT_DATA_DIR_LOCATION("/tmp"); const std::string Broker::Options::DEFAULT_DATA_DIR_NAME("/.qpidd"); std::string Broker::Options::getHome() { std::string home; char *home_c = ::getenv("HOME"); if (home_c != 0) home += home_c; return home; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/DeliveryAdapter.h0000664000076400007640000000320211227113407021374 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _DeliveryAdapter_ #define _DeliveryAdapter_ #include "qpid/broker/DeliveryId.h" #include "qpid/broker/Message.h" #include "qpid/framing/amqp_types.h" namespace qpid { namespace broker { class DeliveryRecord; /** * The intention behind this interface is to separate the generic * handling of some form of message delivery to clients that is * contained in the version independent Channel class from the * details required for a particular situation or * version. i.e. where the existing adapters allow (through * supporting the generated interface for a version of the * protocol) inputs of a channel to be adapted to the version * independent part, this does the same for the outputs. */ class DeliveryAdapter { public: virtual void deliver(DeliveryRecord&, bool sync) = 0; virtual ~DeliveryAdapter(){} }; }} #endif qpidc-0.16/src/qpid/broker/Consumer.h0000664000076400007640000000574711717465066020142 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _Consumer_ #define _Consumer_ #include "qpid/broker/Message.h" #include "qpid/broker/QueuedMessage.h" #include "qpid/broker/OwnershipToken.h" namespace qpid { namespace broker { class Queue; class QueueListeners; /** * Base class for consumers which represent a subscription to a queue. */ class Consumer { const bool acquires; // inListeners allows QueueListeners to efficiently track if this // instance is registered for notifications without having to // search its containers bool inListeners; // the name is generated by broker and is unique within broker scope. It is not // provided or known by the remote Consumer. const std::string name; public: typedef boost::shared_ptr shared_ptr; Consumer(const std::string& _name, bool preAcquires = true) : acquires(preAcquires), inListeners(false), name(_name), position(0) {} virtual ~Consumer(){} bool preAcquires() const { return acquires; } const std::string& getName() const { return name; } virtual framing::SequenceNumber getPosition() const { return position; } virtual void setPosition(framing::SequenceNumber pos) { position = pos; } virtual bool deliver(QueuedMessage& msg) = 0; virtual void notify() = 0; virtual bool filter(boost::intrusive_ptr) { return true; } virtual bool accept(boost::intrusive_ptr) { return true; } virtual OwnershipToken* getSession() = 0; virtual void cancel() = 0; /** Returns true if the browser wants acquired as well as * available messages. */ virtual bool browseAcquired() const { return false; }; /** Called when the peer has acknowledged receipt of the message. * Not to be confused with accept() above, which is asking if * this consumer will consume/browse the message. */ virtual void acknowledged(const QueuedMessage&) = 0; /** Called if queue has been deleted, if true suppress the error message. * Used by HA ReplicatingSubscriptions where such errors are normal. */ virtual bool hideDeletedError() { return false; } protected: framing::SequenceNumber position; private: friend class QueueListeners; }; }} #endif qpidc-0.16/src/qpid/broker/QueueCleaner.h0000664000076400007640000000333711576211367020712 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_QUEUECLEANER_H #define QPID_BROKER_QUEUECLEANER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/BrokerImportExport.h" #include "qpid/sys/Timer.h" namespace qpid { namespace broker { class QueueRegistry; /** * TimerTask to purge expired messages from queues */ class QueueCleaner { public: QPID_BROKER_EXTERN QueueCleaner(QueueRegistry& queues, sys::Timer* timer); QPID_BROKER_EXTERN ~QueueCleaner(); QPID_BROKER_EXTERN void start(sys::Duration period); QPID_BROKER_EXTERN void setTimer(sys::Timer* timer); private: class Task : public sys::TimerTask { public: Task(QueueCleaner& parent, sys::Duration duration); void fire(); private: QueueCleaner& parent; }; boost::intrusive_ptr task; QueueRegistry& queues; sys::Timer* timer; sys::Duration period; void fired(); }; }} // namespace qpid::broker #endif /*!QPID_BROKER_QUEUECLEANER_H*/ qpidc-0.16/src/qpid/broker/RecoverableExchange.h0000664000076400007640000000275411272664412022226 0ustar00jrossjross00000000000000#ifndef _broker_RecoverableExchange_h #define _broker_RecoverableExchange_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/FieldTable.h" namespace qpid { namespace broker { /** * The interface through which bindings are recovered. */ class RecoverableExchange { public: typedef boost::shared_ptr shared_ptr; virtual void setPersistenceId(uint64_t id) = 0; /** * Recover binding. Nb: queue must have been recovered earlier. */ virtual void bind(const std::string& queue, const std::string& routingKey, qpid::framing::FieldTable& args) = 0; virtual ~RecoverableExchange() {}; }; }} #endif qpidc-0.16/src/qpid/broker/FifoDistributor.h0000664000076400007640000000330311643605374021443 0ustar00jrossjross00000000000000#ifndef _broker_FifoDistributor_h #define _broker_FifoDistributor_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** Simple MessageDistributor for FIFO Queues - the HEAD message is always the next * available message for consumption. */ #include "qpid/broker/MessageDistributor.h" namespace qpid { namespace broker { class Messages; class FifoDistributor : public MessageDistributor { public: FifoDistributor(Messages& container); /** Locking Note: all methods assume the caller is holding the Queue::messageLock * during the method call. */ /** MessageDistributor interface */ bool nextConsumableMessage( Consumer::shared_ptr& consumer, QueuedMessage& next ); bool allocate(const std::string& consumer, const QueuedMessage& target); bool nextBrowsableMessage( Consumer::shared_ptr& consumer, QueuedMessage& next ); void query(qpid::types::Variant::Map&) const; private: Messages& messages; }; }} #endif qpidc-0.16/src/qpid/broker/DirectExchange.h0000664000076400007640000000536411725210040021172 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _DirectExchange_ #define _DirectExchange_ #include #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Exchange.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/CopyOnWriteArray.h" #include "qpid/sys/Mutex.h" namespace qpid { namespace broker { class DirectExchange : public virtual Exchange { typedef qpid::sys::CopyOnWriteArray Queues; struct BoundKey { Queues queues; FedBinding fedBinding; }; typedef std::map Bindings; Bindings bindings; qpid::sys::Mutex lock; public: static const std::string typeName; QPID_BROKER_EXTERN DirectExchange(const std::string& name, management::Manageable* parent = 0, Broker* broker = 0); QPID_BROKER_EXTERN DirectExchange(const std::string& _name, bool _durable, const qpid::framing::FieldTable& _args, management::Manageable* parent = 0, Broker* broker = 0); virtual std::string getType() const { return typeName; } QPID_BROKER_EXTERN virtual bool bind(boost::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); virtual bool unbind(boost::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); QPID_BROKER_EXTERN virtual void route(Deliverable& msg); QPID_BROKER_EXTERN virtual bool isBound(boost::shared_ptr queue, const std::string* const routingKey, const qpid::framing::FieldTable* const args); QPID_BROKER_EXTERN virtual ~DirectExchange(); virtual bool supportsDynamicBinding() { return true; } }; }} #endif qpidc-0.16/src/qpid/broker/PersistableConfig.h0000664000076400007640000000233511227113407021721 0ustar00jrossjross00000000000000#ifndef _broker_PersistableConfig_h #define _broker_PersistableConfig_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/broker/Persistable.h" namespace qpid { namespace broker { /** * The interface used by general-purpose persistable configuration for * the message store. */ class PersistableConfig : public Persistable { public: virtual const std::string& getName() const = 0; virtual ~PersistableConfig() {}; }; }} #endif qpidc-0.16/src/qpid/broker/ConnectionFactory.h0000664000076400007640000000264211344233212021743 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ConnectionFactory_ #define _ConnectionFactory_ #include "qpid/sys/ConnectionCodec.h" namespace qpid { namespace broker { class Broker; class ConnectionFactory : public sys::ConnectionCodec::Factory { public: ConnectionFactory(Broker& b); virtual ~ConnectionFactory(); sys::ConnectionCodec* create(framing::ProtocolVersion, sys::OutputControl&, const std::string& id, const qpid::sys::SecuritySettings&); sys::ConnectionCodec* create(sys::OutputControl&, const std::string& id, const qpid::sys::SecuritySettings&); private: Broker& broker; }; }} #endif qpidc-0.16/src/qpid/broker/Messages.h0000664000076400007640000000752711717465066020114 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_MESSAGES_H #define QPID_BROKER_MESSAGES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace framing { class SequenceNumber; } namespace broker { struct QueuedMessage; /** * This interface abstracts out the access to the messages held for * delivery by a Queue instance. Note the the assumption at present is * that all locking is done in the Queue itself. */ class Messages { public: typedef boost::function1 Functor; typedef boost::function1 Predicate; virtual ~Messages() {} /** * @return the number of messages available for delivery. */ virtual size_t size() = 0; /** * Called when a message is deleted from the queue. */ virtual bool deleted(const QueuedMessage&) = 0; /** * Releases an acquired message, making it available again. */ virtual void release(const QueuedMessage&) = 0; /** * Acquire the message at the specified position, returning true * if found, false otherwise. The acquired message is passed back * via the second parameter. */ virtual bool acquire(const framing::SequenceNumber&, QueuedMessage&) = 0; /** * Find the message at the specified position, returning true if * found, false otherwise. The matched message is passed back via * the second parameter. */ virtual bool find(const framing::SequenceNumber&, QueuedMessage&) = 0; /** * Retrieve the next message to be given to a browsing * subscription that has reached the specified position. The next * message is passed back via the second parameter. * * @param unacquired, if true, will only browse unacquired messages * * @return true if there is another message, false otherwise. */ virtual bool browse(const framing::SequenceNumber&, QueuedMessage&, bool unacquired) = 0; /** * Retrieve the next message available for a consuming * subscription. * * @return true if there is such a message, false otherwise. */ virtual bool consume(QueuedMessage&) = 0; /** * Pushes a message to the back of the 'queue'. For some types of * queue this may cause another message to be removed; if that is * the case the method will return true and the removed message * will be passed out via the second parameter. */ virtual bool push(const QueuedMessage& added, QueuedMessage& removed) = 0; /** * Add an already acquired message to the queue. * Used by a cluster updatee to replicate acquired messages from the updater. * Only need be implemented by subclasses that keep track of * acquired messages. */ virtual void updateAcquired(const QueuedMessage&) { } /** * Apply, the functor to each message held */ virtual void foreach(Functor) = 0; /** * Remove every message held that for which the specified * predicate returns true */ virtual void removeIf(Predicate) = 0; private: }; }} // namespace qpid::broker #endif /*!QPID_BROKER_MESSAGES_H*/ qpidc-0.16/src/qpid/broker/DtxWorkRecord.cpp0000664000076400007640000001303211625531570021415 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/DtxWorkRecord.h" #include "qpid/framing/reply_exceptions.h" #include #include using boost::mem_fn; using qpid::sys::Mutex; using namespace qpid::broker; using namespace qpid::framing; DtxWorkRecord::DtxWorkRecord(const std::string& _xid, TransactionalStore* const _store) : xid(_xid), store(_store), completed(false), rolledback(false), prepared(false), expired(false) {} DtxWorkRecord::~DtxWorkRecord() { if (timeout.get()) { timeout->cancel(); } } bool DtxWorkRecord::prepare() { Mutex::ScopedLock locker(lock); if (check()) { txn = store->begin(xid); if (prepare(txn.get())) { store->prepare(*txn); prepared = true; } else { abort(); //TODO: this should probably be flagged as internal error } } else { //some part of the work has been marked rollback only abort(); } return prepared; } bool DtxWorkRecord::prepare(TransactionContext* _txn) { bool succeeded(true); for (Work::iterator i = work.begin(); succeeded && i != work.end(); i++) { succeeded = (*i)->prepare(_txn); } return succeeded; } bool DtxWorkRecord::commit(bool onePhase) { Mutex::ScopedLock locker(lock); if (check()) { if (prepared) { //already prepared i.e. 2pc if (onePhase) { throw IllegalStateException(QPID_MSG("Branch with xid " << xid << " has been prepared, one-phase option not valid!")); } store->commit(*txn); txn.reset(); std::for_each(work.begin(), work.end(), mem_fn(&TxBuffer::commit)); return true; } else { //1pc commit optimisation, don't need a 2pc transaction context: if (!onePhase) { throw IllegalStateException(QPID_MSG("Branch with xid " << xid << " has not been prepared, one-phase option required!")); } std::auto_ptr localtxn = store->begin(); if (prepare(localtxn.get())) { store->commit(*localtxn); std::for_each(work.begin(), work.end(), mem_fn(&TxBuffer::commit)); return true; } else { store->abort(*localtxn); abort(); //TODO: this should probably be flagged as internal error return false; } } } else { //some part of the work has been marked rollback only abort(); return false; } } void DtxWorkRecord::rollback() { Mutex::ScopedLock locker(lock); check(); abort(); } void DtxWorkRecord::add(DtxBuffer::shared_ptr ops) { Mutex::ScopedLock locker(lock); if (expired) { throw DtxTimeoutException(QPID_MSG("Branch with xid " << xid << " has timed out.")); } if (completed) { throw CommandInvalidException(QPID_MSG("Branch with xid " << xid << " has been completed!")); } work.push_back(ops); } bool DtxWorkRecord::check() { if (expired) { throw DtxTimeoutException(); } if (!completed) { //iterate through all DtxBuffers and ensure they are all ended for (Work::iterator i = work.begin(); i != work.end(); i++) { if (!(*i)->isEnded()) { throw IllegalStateException(QPID_MSG("Branch with xid " << xid << " not completed!")); } else if ((*i)->isRollbackOnly()) { rolledback = true; } } completed = true; } return !rolledback; } void DtxWorkRecord::abort() { if (txn.get()) { store->abort(*txn); txn.reset(); } std::for_each(work.begin(), work.end(), mem_fn(&TxBuffer::rollback)); } void DtxWorkRecord::recover(std::auto_ptr _txn, DtxBuffer::shared_ptr ops) { add(ops); txn = _txn; ops->markEnded(); completed = true; prepared = true; } void DtxWorkRecord::timedout() { Mutex::ScopedLock locker(lock); expired = true; rolledback = true; if (!completed) { for (Work::iterator i = work.begin(); i != work.end(); i++) { if (!(*i)->isEnded()) { (*i)->timedout(); } } } abort(); } size_t DtxWorkRecord::indexOf(const DtxBuffer::shared_ptr& buf) { Work::iterator i = std::find(work.begin(), work.end(), buf); if (i == work.end()) throw NotFoundException( QPID_MSG("Can't find DTX buffer for xid: " << buf->getXid())); return i - work.begin(); } DtxBuffer::shared_ptr DtxWorkRecord::operator[](size_t i) const { if (i > work.size()) throw NotFoundException( QPID_MSG("Can't find DTX buffer " << i << " for xid: " << xid)); return work[i]; } qpidc-0.16/src/qpid/broker/QueueEvents.cpp0000664000076400007640000001002311643605374021126 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/QueueEvents.h" #include "qpid/broker/Queue.h" #include "qpid/broker/QueueObserver.h" #include "qpid/Exception.h" #include "qpid/log/Statement.h" namespace qpid { namespace broker { QueueEvents::QueueEvents(const boost::shared_ptr& poller, bool isSync) : eventQueue(boost::bind(&QueueEvents::handle, this, _1), poller), enabled(true), sync(isSync) { if (!sync) eventQueue.start(); } QueueEvents::~QueueEvents() { if (!sync) eventQueue.stop(); } void QueueEvents::enqueued(const QueuedMessage& m) { if (enabled) { Event enq(ENQUEUE, m); if (sync) { for (Listeners::iterator j = listeners.begin(); j != listeners.end(); j++) j->second(enq); } else { eventQueue.push(enq); } } } void QueueEvents::dequeued(const QueuedMessage& m) { if (enabled) { Event deq(DEQUEUE, m); if (sync) { for (Listeners::iterator j = listeners.begin(); j != listeners.end(); j++) j->second(deq); } else { eventQueue.push(Event(DEQUEUE, m)); } } } void QueueEvents::registerListener(const std::string& id, const EventListener& listener) { qpid::sys::Mutex::ScopedLock l(lock); if (listeners.find(id) == listeners.end()) { listeners[id] = listener; } else { throw Exception(QPID_MSG("Event listener already registered for '" << id << "'")); } } void QueueEvents::unregisterListener(const std::string& id) { qpid::sys::Mutex::ScopedLock l(lock); if (listeners.find(id) == listeners.end()) { throw Exception(QPID_MSG("No event listener registered for '" << id << "'")); } else { listeners.erase(id); } } QueueEvents::EventQueue::Batch::const_iterator QueueEvents::handle(const EventQueue::Batch& events) { qpid::sys::Mutex::ScopedLock l(lock); for (EventQueue::Batch::const_iterator i = events.begin(); i != events.end(); ++i) { for (Listeners::iterator j = listeners.begin(); j != listeners.end(); j++) { j->second(*i); } } return events.end(); } void QueueEvents::shutdown() { if (!sync && !eventQueue.empty() && !listeners.empty()) eventQueue.shutdown(); } void QueueEvents::enable() { enabled = true; QPID_LOG(debug, "Queue events enabled"); } void QueueEvents::disable() { enabled = false; QPID_LOG(debug, "Queue events disabled"); } bool QueueEvents::isSync() { return sync; } class EventGenerator : public QueueObserver { public: EventGenerator(QueueEvents& mgr, bool enqOnly) : manager(mgr), enqueueOnly(enqOnly) {} void enqueued(const QueuedMessage& m) { manager.enqueued(m); } void dequeued(const QueuedMessage& m) { if (!enqueueOnly) manager.dequeued(m); } void acquired(const QueuedMessage&) {}; void requeued(const QueuedMessage&) {}; private: QueueEvents& manager; const bool enqueueOnly; }; void QueueEvents::observe(Queue& queue, bool enqueueOnly) { boost::shared_ptr observer(new EventGenerator(*this, enqueueOnly)); queue.addObserver(observer); } QueueEvents::Event::Event(EventType t, const QueuedMessage& m) : type(t), msg(m) {} }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/SaslAuthenticator.cpp0000664000076400007640000004245011701335064022312 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "qpid/broker/Connection.h" #include "qpid/log/Statement.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/sys/SecuritySettings.h" #include #if HAVE_SASL #include #include #include "qpid/sys/cyrus/CyrusSecurityLayer.h" using qpid::sys::cyrus::CyrusSecurityLayer; #endif using namespace qpid::framing; using qpid::sys::SecurityLayer; using qpid::sys::SecuritySettings; using boost::format; using boost::str; namespace qpid { namespace broker { class NullAuthenticator : public SaslAuthenticator { Connection& connection; framing::AMQP_ClientProxy::Connection client; std::string realm; const bool encrypt; public: NullAuthenticator(Connection& connection, bool encrypt); ~NullAuthenticator(); void getMechanisms(framing::Array& mechanisms); void start(const std::string& mechanism, const std::string* response); void step(const std::string&) {} std::auto_ptr getSecurityLayer(uint16_t maxFrameSize); }; #if HAVE_SASL class CyrusAuthenticator : public SaslAuthenticator { sasl_conn_t *sasl_conn; Connection& connection; framing::AMQP_ClientProxy::Connection client; const bool encrypt; void processAuthenticationStep(int code, const char *challenge, unsigned int challenge_len); bool getUsername(std::string& uid); public: CyrusAuthenticator(Connection& connection, bool encrypt); ~CyrusAuthenticator(); void init(); void getMechanisms(framing::Array& mechanisms); void start(const std::string& mechanism, const std::string* response); void step(const std::string& response); void getError(std::string& error); void getUid(std::string& uid) { getUsername(uid); } std::auto_ptr getSecurityLayer(uint16_t maxFrameSize); }; bool SaslAuthenticator::available(void) { return true; } // Initialize the SASL mechanism; throw if it fails. void SaslAuthenticator::init(const std::string& saslName, std::string const & saslConfigPath ) { // Check if we have a version of SASL that supports sasl_set_path() #if (SASL_VERSION_FULL >= ((2<<16)|(1<<8)|22)) // If we are not given a sasl path, do nothing and allow the default to be used. if ( saslConfigPath.empty() ) { QPID_LOG ( info, "SASL: no config path set - using default." ); } else { struct stat st; // Make sure the directory exists and we can read up to it. if ( ::stat ( saslConfigPath.c_str(), & st) ) { // Note: not using strerror() here because I think its messages are a little too hazy. if ( errno == ENOENT ) throw Exception ( QPID_MSG ( "SASL: sasl_set_path failed: no such directory: " << saslConfigPath ) ); if ( errno == EACCES ) throw Exception ( QPID_MSG ( "SASL: sasl_set_path failed: cannot read parent of: " << saslConfigPath ) ); // catch-all stat failure throw Exception ( QPID_MSG ( "SASL: sasl_set_path failed: cannot stat: " << saslConfigPath ) ); } // Make sure the directory is readable. if ( ::access ( saslConfigPath.c_str(), R_OK ) ) { throw Exception ( QPID_MSG ( "SASL: sasl_set_path failed: directory not readable:" << saslConfigPath ) ); } // This shouldn't fail now, but check anyway. int code = sasl_set_path(SASL_PATH_TYPE_CONFIG, const_cast(saslConfigPath.c_str())); if(SASL_OK != code) throw Exception(QPID_MSG("SASL: sasl_set_path failed [" << code << "] " )); QPID_LOG(info, "SASL: config path set to " << saslConfigPath ); } #endif int code = sasl_server_init(NULL, saslName.c_str()); if (code != SASL_OK) { // TODO: Figure out who owns the char* returned by // sasl_errstring, though it probably does not matter much throw Exception(sasl_errstring(code, NULL, NULL)); } } void SaslAuthenticator::fini(void) { sasl_done(); } #else typedef NullAuthenticator CyrusAuthenticator; bool SaslAuthenticator::available(void) { return false; } void SaslAuthenticator::init(const std::string& /*saslName*/, std::string const & /*saslConfigPath*/ ) { throw Exception("Requested authentication but SASL unavailable"); } void SaslAuthenticator::fini(void) { return; } #endif std::auto_ptr SaslAuthenticator::createAuthenticator(Connection& c, bool isShadow ) { if (c.getBroker().getOptions().auth) { if ( isShadow ) return std::auto_ptr(new NullAuthenticator(c, c.getBroker().getOptions().requireEncrypted)); else return std::auto_ptr(new CyrusAuthenticator(c, c.getBroker().getOptions().requireEncrypted)); } else { QPID_LOG(debug, "SASL: No Authentication Performed"); return std::auto_ptr(new NullAuthenticator(c, c.getBroker().getOptions().requireEncrypted)); } } NullAuthenticator::NullAuthenticator(Connection& c, bool e) : connection(c), client(c.getOutput()), realm(c.getBroker().getOptions().realm), encrypt(e) {} NullAuthenticator::~NullAuthenticator() {} void NullAuthenticator::getMechanisms(Array& mechanisms) { mechanisms.add(boost::shared_ptr(new Str16Value("ANONYMOUS"))); mechanisms.add(boost::shared_ptr(new Str16Value("PLAIN")));//useful for testing } void NullAuthenticator::start(const string& mechanism, const string* response) { if (encrypt) { #if HAVE_SASL // encryption required - check to see if we are running over an // encrypted SSL connection. SecuritySettings external = connection.getExternalSecuritySettings(); sasl_ssf_t external_ssf = (sasl_ssf_t) external.ssf; if (external_ssf < 1) // < 1 == unencrypted #endif { QPID_LOG(error, "Rejected un-encrypted connection."); throw ConnectionForcedException("Connection must be encrypted."); } } if (mechanism == "PLAIN") { // Old behavior if (response && response->size() > 0) { string uid; string::size_type i = response->find((char)0); if (i == 0 && response->size() > 1) { //no authorization id; use authentication id i = response->find((char)0, 1); if (i != string::npos) uid = response->substr(1, i-1); } else if (i != string::npos) { //authorization id is first null delimited field uid = response->substr(0, i); }//else not a valid SASL PLAIN response, throw error? if (!uid.empty()) { //append realm if it has not already been added i = uid.find(realm); if (i == string::npos || realm.size() + i < uid.size()) { uid = str(format("%1%@%2%") % uid % realm); } connection.setUserId(uid); } } } else { connection.setUserId("anonymous"); } client.tune(framing::CHANNEL_MAX, connection.getFrameMax(), 0, connection.getHeartbeatMax()); } std::auto_ptr NullAuthenticator::getSecurityLayer(uint16_t) { std::auto_ptr securityLayer; return securityLayer; } #if HAVE_SASL CyrusAuthenticator::CyrusAuthenticator(Connection& c, bool _encrypt) : sasl_conn(0), connection(c), client(c.getOutput()), encrypt(_encrypt) { init(); } void CyrusAuthenticator::init() { /* Next to the service name, which specifies the * /etc/sasl2/.conf file to read, the realm is * currently the most important argument below. When * performing authentication the user that is authenticating * will be looked up in a specific realm. If none is given * then the realm defaults to the hostname, which can cause * confusion when the daemon is run on different hosts that * may be logically sharing a realm (aka a user domain). This * is especially important for SASL PLAIN authentication, * which cannot specify a realm for the user that is * authenticating. */ int code; const char *realm = connection.getBroker().getOptions().realm.c_str(); code = sasl_server_new(BROKER_SASL_NAME, /* Service name */ NULL, /* Server FQDN, gethostname() */ realm, /* Authentication realm */ NULL, /* Local IP, needed for some mechanism */ NULL, /* Remote IP, needed for some mechanism */ NULL, /* Callbacks */ 0, /* Connection flags */ &sasl_conn); if (SASL_OK != code) { QPID_LOG(error, "SASL: Connection creation failed: [" << code << "] " << sasl_errdetail(sasl_conn)); // TODO: Change this to an exception signaling // server error, when one is available throw ConnectionForcedException("Unable to perform authentication"); } sasl_security_properties_t secprops; //TODO: should the actual SSF values be configurable here? secprops.min_ssf = encrypt ? 10: 0; secprops.max_ssf = 256; // If the transport provides encryption, notify the SASL library of // the key length and set the ssf range to prevent double encryption. SecuritySettings external = connection.getExternalSecuritySettings(); QPID_LOG(debug, "External ssf=" << external.ssf << " and auth=" << external.authid); sasl_ssf_t external_ssf = (sasl_ssf_t) external.ssf; if (external_ssf) { int result = sasl_setprop(sasl_conn, SASL_SSF_EXTERNAL, &external_ssf); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL error: unable to set external SSF: " << result)); } secprops.max_ssf = secprops.min_ssf = 0; } QPID_LOG(debug, "min_ssf: " << secprops.min_ssf << ", max_ssf: " << secprops.max_ssf << ", external_ssf: " << external_ssf ); if (!external.authid.empty()) { const char* external_authid = external.authid.c_str(); int result = sasl_setprop(sasl_conn, SASL_AUTH_EXTERNAL, external_authid); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL error: unable to set external auth: " << result)); } QPID_LOG(debug, "external auth detected and set to " << external_authid); } secprops.maxbufsize = 65535; secprops.property_names = 0; secprops.property_values = 0; secprops.security_flags = 0; /* or SASL_SEC_NOANONYMOUS etc as appropriate */ /* * The nodict flag restricts SASL authentication mechanisms * to those that are not susceptible to dictionary attacks. * They are: * SRP * PASSDSS-3DES-1 * EXTERNAL */ if (external.nodict) secprops.security_flags |= SASL_SEC_NODICTIONARY; int result = sasl_setprop(sasl_conn, SASL_SEC_PROPS, &secprops); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL error: " << result)); } } CyrusAuthenticator::~CyrusAuthenticator() { if (sasl_conn) { sasl_dispose(&sasl_conn); sasl_conn = 0; } } void CyrusAuthenticator::getError(string& error) { error = string(sasl_errdetail(sasl_conn)); } bool CyrusAuthenticator::getUsername(string& uid) { const void* ptr; int code = sasl_getprop(sasl_conn, SASL_USERNAME, &ptr); if (SASL_OK == code) { uid = string(const_cast(static_cast(ptr))); return true; } else { QPID_LOG(warning, "Failed to retrieve sasl username"); return false; } } void CyrusAuthenticator::getMechanisms(Array& mechanisms) { const char *separator = " "; const char *list; unsigned int list_len; int count; int code = sasl_listmech(sasl_conn, NULL, "", separator, "", &list, &list_len, &count); if (SASL_OK != code) { QPID_LOG(info, "SASL: Mechanism listing failed: " << sasl_errdetail(sasl_conn)); // TODO: Change this to an exception signaling // server error, when one is available throw ConnectionForcedException("Mechanism listing failed"); } else { string mechanism; unsigned int start; unsigned int end; QPID_LOG(info, "SASL: Mechanism list: " << list); end = 0; do { start = end; // Seek to end of next mechanism while (end < list_len && separator[0] != list[end]) end++; // Record the mechanism mechanisms.add(boost::shared_ptr(new Str16Value(string(list, start, end - start)))); end++; } while (end < list_len); } } void CyrusAuthenticator::start(const string& mechanism, const string* response) { const char *challenge; unsigned int challenge_len; // This should be at same debug level as mech list in getMechanisms(). QPID_LOG(info, "SASL: Starting authentication with mechanism: " << mechanism); int code = sasl_server_start(sasl_conn, mechanism.c_str(), (response ? response->c_str() : 0), (response ? response->size() : 0), &challenge, &challenge_len); processAuthenticationStep(code, challenge, challenge_len); qmf::org::apache::qpid::broker::Connection* cnxMgmt = connection.getMgmtObject(); if ( cnxMgmt ) cnxMgmt->set_saslMechanism(mechanism); } void CyrusAuthenticator::step(const string& response) { const char *challenge; unsigned int challenge_len; int code = sasl_server_step(sasl_conn, response.c_str(), response.length(), &challenge, &challenge_len); processAuthenticationStep(code, challenge, challenge_len); } void CyrusAuthenticator::processAuthenticationStep(int code, const char *challenge, unsigned int challenge_len) { if (SASL_OK == code) { std::string uid; if (!getUsername(uid)) { // TODO: Change this to an exception signaling // authentication failure, when one is available throw ConnectionForcedException("Authenticated username unavailable"); } QPID_LOG(info, connection.getMgmtId() << " SASL: Authentication succeeded for: " << uid); connection.setUserId(uid); client.tune(framing::CHANNEL_MAX, connection.getFrameMax(), 0, connection.getHeartbeatMax()); } else if (SASL_CONTINUE == code) { string challenge_str(challenge, challenge_len); QPID_LOG(debug, "SASL: sending challenge to client"); client.secure(challenge_str); } else { std::string uid; //save error detail before trying to retrieve username as error in doing so will overwrite it std::string errordetail = sasl_errdetail(sasl_conn); if (!getUsername(uid)) { QPID_LOG(info, "SASL: Authentication failed (no username available yet):" << errordetail); } else { QPID_LOG(info, "SASL: Authentication failed for " << uid << ":" << errordetail); } // TODO: Change to more specific exceptions, when they are // available switch (code) { case SASL_NOMECH: throw ConnectionForcedException("Unsupported mechanism"); break; case SASL_TRYAGAIN: throw ConnectionForcedException("Transient failure, try again"); break; default: throw ConnectionForcedException("Authentication failed"); break; } } } std::auto_ptr CyrusAuthenticator::getSecurityLayer(uint16_t maxFrameSize) { const void* value(0); int result = sasl_getprop(sasl_conn, SASL_SSF, &value); if (result != SASL_OK) { throw framing::InternalErrorException(QPID_MSG("SASL error: " << sasl_errdetail(sasl_conn))); } uint ssf = *(reinterpret_cast(value)); std::auto_ptr securityLayer; if (ssf) { securityLayer = std::auto_ptr(new CyrusSecurityLayer(sasl_conn, maxFrameSize)); } qmf::org::apache::qpid::broker::Connection* cnxMgmt = connection.getMgmtObject(); if ( cnxMgmt ) cnxMgmt->set_saslSsf(ssf); return securityLayer; } #endif }} qpidc-0.16/src/qpid/broker/MessageGroupManager.h0000664000076400007640000001206411732667547022236 0ustar00jrossjross00000000000000#ifndef _broker_MessageGroupManager_h #define _broker_MessageGroupManager_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /* for managing message grouping on Queues */ #include "qpid/broker/StatefulQueueObserver.h" #include "qpid/broker/MessageDistributor.h" #include "qpid/sys/unordered_map.h" namespace qpid { namespace broker { class QueueObserver; class MessageDistributor; class MessageGroupManager : public StatefulQueueObserver, public MessageDistributor { static std::string defaultGroupId; // assigned if no group id header present const std::string groupIdHeader; // msg header holding group identifier const unsigned int timestamp; // mark messages with timestamp if set Messages& messages; // parent Queue's in memory message container const std::string qName; // name of parent queue (for logs) struct GroupState { // note: update getState()/setState() when changing this object's state implementation // track which messages are in this group, and if they have been acquired struct MessageState { qpid::framing::SequenceNumber position; bool acquired; MessageState() : acquired(false) {} MessageState(const qpid::framing::SequenceNumber& p) : position(p), acquired(false) {} bool operator<(const MessageState& b) const { return position < b.position; } }; typedef std::deque MessageFifo; std::string group; // group identifier std::string owner; // consumer with outstanding acquired messages uint32_t acquired; // count of outstanding acquired messages MessageFifo members; // msgs belonging to this group, in enqueue order GroupState() : acquired(0) {} bool owned() const {return !owner.empty();} MessageFifo::iterator findMsg(const qpid::framing::SequenceNumber &); }; typedef sys::unordered_map GroupMap; typedef std::map GroupFifo; GroupMap messageGroups; // index: group name GroupFifo freeGroups; // ordered by oldest free msg //Consumers consumers; // index: consumer name static const std::string qpidMessageGroupKey; static const std::string qpidSharedGroup; // if specified, one group can be consumed by multiple receivers static const std::string qpidMessageGroupTimestamp; GroupState& findGroup( const QueuedMessage& qm ); unsigned long hits, misses; // for debug uint32_t lastMsg; std::string lastGroup; GroupState *cachedGroup; void unFree( const GroupState& state ); void own( GroupState& state, const std::string& owner ); void disown( GroupState& state ); public: static QPID_BROKER_EXTERN void setDefaults(const std::string& groupId); static boost::shared_ptr create( const std::string& qName, Messages& messages, const qpid::framing::FieldTable& settings ); MessageGroupManager(const std::string& header, const std::string& _qName, Messages& container, unsigned int _timestamp=0 ) : StatefulQueueObserver(std::string("MessageGroupManager:") + header), groupIdHeader( header ), timestamp(_timestamp), messages(container), qName(_qName), hits(0), misses(0), lastMsg(0), cachedGroup(0) {} virtual ~MessageGroupManager(); // QueueObserver iface void enqueued( const QueuedMessage& qm ); void acquired( const QueuedMessage& qm ); void requeued( const QueuedMessage& qm ); void dequeued( const QueuedMessage& qm ); void consumerAdded( const Consumer& ) {}; void consumerRemoved( const Consumer& ) {}; void getState(qpid::framing::FieldTable& state ) const; void setState(const qpid::framing::FieldTable&); // MessageDistributor iface bool nextConsumableMessage(Consumer::shared_ptr& c, QueuedMessage& next); bool allocate(const std::string& c, const QueuedMessage& qm); bool nextBrowsableMessage(Consumer::shared_ptr& c, QueuedMessage& next); void query(qpid::types::Variant::Map&) const; bool match(const qpid::types::Variant::Map*, const QueuedMessage&) const; }; }} #endif qpidc-0.16/src/qpid/broker/Daemon.h0000664000076400007640000000413011155457151017523 0ustar00jrossjross00000000000000#ifndef _broker_Daemon_h #define _broker_Daemon_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/IntegerTypes.h" #include #include #include #include namespace qpid { namespace broker { /** * Tools for forking and managing a daemon process. * NB: Only one Daemon instance is allowed in a process. */ class Daemon : private boost::noncopyable { public: /** Check daemon is running on port, throw exception if not */ static pid_t getPid(std::string pidDir, uint16_t port); Daemon(std::string pidDir); virtual ~Daemon(); /** * Fork a daemon process. * Call parent() in the parent process, child() in the child. */ void fork(); protected: /** Called in parent process */ virtual void parent() = 0; /** Called in child process */ virtual void child() = 0; /** Call from parent(): wait for child to indicate it is ready. * @timeout in seconds to wait for response. * @return port passed by child to ready(). */ uint16_t wait(int timeout); /** Call from child(): Notify the parent we are ready and write the * PID file. *@param port returned by parent call to wait(). */ void ready(uint16_t port); private: static std::string pidFile(std::string pidDir, uint16_t port); pid_t pid; int pipeFds[2]; int lockFileFd; std::string lockFile; std::string pidDir; }; }} // namespace qpid::broker #endif /*!_broker_Daemon_h*/ qpidc-0.16/src/qpid/broker/System.h0000664000076400007640000000260411202031524017571 0ustar00jrossjross00000000000000#ifndef _BrokerSystem_ #define _BrokerSystem_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/management/Manageable.h" #include "qmf/org/apache/qpid/broker/System.h" #include #include namespace qpid { namespace broker { class Broker; class System : public management::Manageable { private: qmf::org::apache::qpid::broker::System* mgmtObject; public: typedef boost::shared_ptr shared_ptr; System (std::string _dataDir, Broker* broker = 0); management::ManagementObject* GetManagementObject (void) const { return mgmtObject; } }; }} #endif /*!_BrokerSystem_*/ qpidc-0.16/src/qpid/broker/Credit.cpp0000664000076400007640000001103111663214325020061 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Credit.h" namespace qpid { namespace broker { const uint32_t CreditBalance::INFINITE_CREDIT(0xFFFFFFFF); CreditBalance::CreditBalance() : balance(0) {} CreditBalance::~CreditBalance() {} void CreditBalance::clear() { balance = 0; } void CreditBalance::grant(uint32_t value) { if (balance != INFINITE_CREDIT) { if (value == INFINITE_CREDIT) { balance = INFINITE_CREDIT; } else if (INFINITE_CREDIT - balance > value) { balance += value; } else { balance = INFINITE_CREDIT - 1; } } } void CreditBalance::consume(uint32_t value) { if (!unlimited()) balance -= value; } bool CreditBalance::check(uint32_t required) const { return balance >= required; } uint32_t CreditBalance::remaining() const { return balance; } uint32_t CreditBalance::allocated() const { return balance; } bool CreditBalance::unlimited() const { return balance == INFINITE_CREDIT; } CreditWindow::CreditWindow() : used(0) {} bool CreditWindow::check(uint32_t required) const { return CreditBalance::check(used + required); } void CreditWindow::consume(uint32_t value) { if (!unlimited()) used += value; } void CreditWindow::move(uint32_t value) { if (!unlimited()) used -= value; } uint32_t CreditWindow::remaining() const { return allocated() - used; } uint32_t CreditWindow::consumed() const { return used; } Credit::Credit() : windowing(true) {} void Credit::setWindowMode(bool b) { windowing = b; } bool Credit::isWindowMode() const { return windowing; } void Credit::addByteCredit(uint32_t value) { bytes().grant(value); } void Credit::addMessageCredit(uint32_t value) { messages().grant(value); } void Credit::cancel() { messages().clear(); bytes().clear(); } void Credit::moveWindow(uint32_t m, uint32_t b) { if (windowing) { window.messages.move(m); window.bytes.move(b); } } void Credit::consume(uint32_t m, uint32_t b) { messages().consume(m); bytes().consume(b); } bool Credit::check(uint32_t m, uint32_t b) const { return messages().check(m) && bytes().check(b); } CreditPair Credit::used() const { CreditPair result; if (windowing) { result.messages = window.messages.consumed(); result.bytes = window.bytes.consumed(); } else { result.messages = 0; result.bytes = 0; } return result; } CreditPair Credit::allocated() const { CreditPair result; result.messages = messages().allocated(); result.bytes = bytes().allocated(); return result; } Credit::operator bool() const { return check(1,1); } CreditBalance& Credit::messages() { if (windowing) return window.messages; else return balance.messages; } CreditBalance& Credit::bytes() { if (windowing) return window.bytes; else return balance.bytes; } const CreditBalance& Credit::messages() const { if (windowing) return window.messages; else return balance.messages; } const CreditBalance& Credit::bytes() const { if (windowing) return window.bytes; else return balance.bytes; } std::ostream& operator<<(std::ostream& out, const CreditBalance& b) { if (b.unlimited()) return out << "unlimited"; else return out << b.balance; } std::ostream& operator<<(std::ostream& out, const CreditWindow& w) { if (w.unlimited()) return out << ((CreditBalance) w); else return out << w.remaining() << " (from window of " << w.allocated() << ")"; } template std::ostream& operator<<(std::ostream& out, const CreditPair& pair) { return out << "messages: " << pair.messages << " bytes: " << pair.bytes; } std::ostream& operator<<(std::ostream& out, const Credit& c) { if (c.windowing) return out << c.window; else return out << c.balance; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/QueueFlowLimit.h0000664000076400007640000001106211643605374021241 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QueueFlowLimit_ #define _QueueFlowLimit_ #include #include #include #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/QueuedMessage.h" #include "qpid/broker/StatefulQueueObserver.h" #include "qpid/framing/FieldTable.h" #include "qpid/sys/AtomicValue.h" #include "qpid/sys/Mutex.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class Queue; }}}}} namespace _qmfBroker = qmf::org::apache::qpid::broker; namespace qpid { namespace broker { class Broker; /** * Producer flow control: when level is > flowStop*, flow control is ON. * then level is < flowResume*, flow control is OFF. If == 0, flow control * is not used. If both byte and msg count thresholds are set, then * passing _either_ level may turn flow control ON, but _both_ must be * below level before flow control will be turned OFF. */ class QueueFlowLimit : public StatefulQueueObserver { static uint64_t defaultMaxSize; static uint defaultFlowStopRatio; static uint defaultFlowResumeRatio; Queue *queue; std::string queueName; uint32_t flowStopCount; uint32_t flowResumeCount; uint64_t flowStopSize; uint64_t flowResumeSize; bool flowStopped; // true = producers held in flow control // current queue utilization uint32_t count; uint64_t size; public: static QPID_BROKER_EXTERN const std::string flowStopCountKey; static QPID_BROKER_EXTERN const std::string flowResumeCountKey; static QPID_BROKER_EXTERN const std::string flowStopSizeKey; static QPID_BROKER_EXTERN const std::string flowResumeSizeKey; QPID_BROKER_EXTERN virtual ~QueueFlowLimit(); /** the queue has added QueuedMessage. Returns true if flow state changes */ QPID_BROKER_EXTERN void enqueued(const QueuedMessage&); /** the queue has removed QueuedMessage. Returns true if flow state changes */ QPID_BROKER_EXTERN void dequeued(const QueuedMessage&); /** ignored */ QPID_BROKER_EXTERN void acquired(const QueuedMessage&) {}; QPID_BROKER_EXTERN void requeued(const QueuedMessage&) {}; /** for clustering: */ QPID_BROKER_EXTERN void getState(qpid::framing::FieldTable&) const; QPID_BROKER_EXTERN void setState(const qpid::framing::FieldTable&); uint32_t getFlowStopCount() const { return flowStopCount; } uint32_t getFlowResumeCount() const { return flowResumeCount; } uint64_t getFlowStopSize() const { return flowStopSize; } uint64_t getFlowResumeSize() const { return flowResumeSize; } uint32_t getFlowCount() const { return count; } uint64_t getFlowSize() const { return size; } bool isFlowControlActive() const { return flowStopped; } bool monitorFlowControl() const { return flowStopCount || flowStopSize; } void encode(framing::Buffer& buffer) const; void decode(framing::Buffer& buffer); uint32_t encodedSize() const; static QPID_BROKER_EXTERN void observe(Queue& queue, const qpid::framing::FieldTable& settings); static QPID_BROKER_EXTERN void setDefaults(uint64_t defaultMaxSize, uint defaultFlowStopRatio, uint defaultFlowResumeRatio); friend QPID_BROKER_EXTERN std::ostream& operator<<(std::ostream&, const QueueFlowLimit&); protected: // msgs waiting for flow to become available. std::map > index; mutable qpid::sys::Mutex indexLock; _qmfBroker::Queue *queueMgmtObj; const Broker *broker; QPID_BROKER_EXTERN QueueFlowLimit(Queue *queue, uint32_t flowStopCount, uint32_t flowResumeCount, uint64_t flowStopSize, uint64_t flowResumeSize); static QPID_BROKER_EXTERN QueueFlowLimit *createLimit(Queue *queue, const qpid::framing::FieldTable& settings); }; }} #endif qpidc-0.16/src/qpid/broker/NameGenerator.cpp0000664000076400007640000000212411227113407021374 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/NameGenerator.h" #include using namespace qpid::broker; NameGenerator::NameGenerator(const std::string& _base) : base(_base), counter(1) {} std::string NameGenerator::generate(){ std::stringstream ss; ss << base << counter++; return ss.str(); } qpidc-0.16/src/qpid/broker/AsyncCompletion.h0000664000076400007640000001632311535530451021433 0ustar00jrossjross00000000000000#ifndef _AsyncCompletion_ #define _AsyncCompletion_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/sys/AtomicValue.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Monitor.h" namespace qpid { namespace broker { /** * Class to implement asynchronous notification of completion. * * Use-case: An "initiator" needs to wait for a set of "completers" to * finish a unit of work before an action can occur. This object * tracks the progress of the set of completers, and allows the action * to occur once all completers have signalled that they are done. * * The initiator and completers may be running in separate threads. * * The initiating thread is the thread that initiates the action, * i.e. the connection read thread. * * A completing thread is any thread that contributes to completion, * e.g. a store thread that does an async write. * There may be zero or more completers. * * When the work is complete, a callback is invoked. The callback * may be invoked in the Initiator thread, or one of the Completer * threads. The callback is passed a flag indicating whether or not * the callback is running under the context of the Initiator thread. * * Use model: * 1) Initiator thread invokes begin() * 2) After begin() has been invoked, zero or more Completers invoke * startCompleter(). Completers may be running in the same or * different thread as the Initiator, as long as they guarantee that * startCompleter() is invoked at least once before the Initiator invokes end(). * 3) Completers may invoke finishCompleter() at any time, even after the * initiator has invoked end(). finishCompleter() may be called from any * thread. * 4) startCompleter()/finishCompleter() calls "nest": for each call to * startCompleter(), a corresponding call to finishCompleter() must be made. * Once the last finishCompleter() is called, the Completer must no longer * reference the completion object. * 5) The Initiator invokes end() at the point where it has finished * dispatching work to the Completers, and is prepared for the callback * handler to be invoked. Note: if there are no outstanding Completers * pending when the Initiator invokes end(), the callback will be invoked * directly, and the sync parameter will be set true. This indicates to the * Initiator that the callback is executing in the context of the end() call, * and the Initiator is free to optimize the handling of the completion, * assuming no need for synchronization with Completer threads. */ class AsyncCompletion { public: /** Supplied by the Initiator to the end() method, allows for a callback * when all outstanding completers are done. If the callback cannot be * made during the end() call, the clone() method must supply a copy of * this callback object that persists after end() returns. The cloned * callback object will be used by the last completer thread, and * released when the callback returns. */ class Callback : public RefCounted { public: virtual void completed(bool) = 0; virtual boost::intrusive_ptr clone() = 0; }; private: mutable qpid::sys::AtomicValue completionsNeeded; mutable qpid::sys::Monitor callbackLock; bool inCallback, active; void invokeCallback(bool sync) { qpid::sys::Mutex::ScopedLock l(callbackLock); if (active) { if (callback.get()) { inCallback = true; { qpid::sys::Mutex::ScopedUnlock ul(callbackLock); callback->completed(sync); } inCallback = false; callback = boost::intrusive_ptr(); callbackLock.notifyAll(); } active = false; } } protected: /** Invoked when all completers have signalled that they have completed * (via calls to finishCompleter()). bool == true if called via end() */ boost::intrusive_ptr callback; public: AsyncCompletion() : completionsNeeded(0), inCallback(false), active(true) {}; virtual ~AsyncCompletion() { cancel(); } /** True when all outstanding operations have compeleted */ bool isDone() { return !active; } /** Called to signal the start of an asynchronous operation. The operation * is considered pending until finishCompleter() is called. * E.g. called when initiating an async store operation. */ void startCompleter() { ++completionsNeeded; } /** Called by completer to signal that it has finished the operation started * when startCompleter() was invoked. * e.g. called when async write complete. */ void finishCompleter() { if (--completionsNeeded == 0) { invokeCallback(false); } } /** called by initiator before any calls to startCompleter can be done. */ void begin() { ++completionsNeeded; } /** called by initiator after all potential completers have called * startCompleter(). */ void end(Callback& cb) { assert(completionsNeeded.get() > 0); // ensure begin() has been called! // the following only "decrements" the count if it is 1. This means // there are no more outstanding completers and we are done. if (completionsNeeded.boolCompareAndSwap(1, 0)) { // done! Complete immediately cb.completed(true); return; } // the compare-and-swap did not succeed. This means there are // outstanding completers pending (count > 1). Get a persistent // Callback object to use when the last completer is done. // Decrement after setting up the callback ensures that pending // completers cannot touch the callback until it is ready. callback = cb.clone(); if (--completionsNeeded == 0) { // note that a completer may have completed during the // callback setup or decrement: invokeCallback(true); } } /** may be called by Initiator to cancel the callback. Will wait for * callback to complete if in progress. */ virtual void cancel() { qpid::sys::Mutex::ScopedLock l(callbackLock); while (inCallback) callbackLock.wait(); callback = boost::intrusive_ptr(); active = false; } }; }} // qpid::broker:: #endif /*!_AsyncCompletion_*/ qpidc-0.16/src/qpid/broker/SessionAdapter.h0000664000076400007640000002305011527572315021251 0ustar00jrossjross00000000000000#ifndef _broker_SessionAdapter_h #define _broker_SessionAdapter_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/broker/HandlerImpl.h" #include "qpid/broker/ConnectionToken.h" #include "qpid/broker/OwnershipToken.h" #include "qpid/Exception.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/StructHelper.h" #include #include #include #include namespace qpid { namespace broker { class Channel; class Connection; class Broker; class Queue; /** * SessionAdapter translates protocol-specific AMQP commands for one * specific version of AMQP into calls on the core broker objects. It * is a container for a collection of adapters. * * Each adapter class provides a client proxy to send methods to the * peer broker or client. * */ class SessionAdapter : public HandlerImpl, public framing::AMQP_ServerOperations { public: SessionAdapter(SemanticState& session); framing::ProtocolVersion getVersion() const { return session.getConnection().getVersion();} MessageHandler* getMessageHandler(){ return &messageImpl; } ExchangeHandler* getExchangeHandler(){ return &exchangeImpl; } QueueHandler* getQueueHandler(){ return &queueImpl; } ExecutionHandler* getExecutionHandler(){ return &executionImpl; } TxHandler* getTxHandler(){ return &txImpl; } DtxHandler* getDtxHandler(){ return &dtxImpl; } ConnectionHandler* getConnectionHandler() { throw framing::NotImplementedException("Class not implemented"); } SessionHandler* getSessionHandler() { throw framing::NotImplementedException("Class not implemented"); } FileHandler* getFileHandler() { throw framing::NotImplementedException("Class not implemented"); } StreamHandler* getStreamHandler() { throw framing::NotImplementedException("Class not implemented"); } template void eachExclusiveQueue(F f) { queueImpl.eachExclusiveQueue(f); } private: //common base for utility methods etc that are specific to this adapter struct HandlerHelper : public HandlerImpl { HandlerHelper(SemanticState& s) : HandlerImpl(s) {} boost::shared_ptr getQueue(const std::string& name) const; }; class ExchangeHandlerImpl : public ExchangeHandler, public HandlerHelper { public: ExchangeHandlerImpl(SemanticState& session) : HandlerHelper(session) {} void declare(const std::string& exchange, const std::string& type, const std::string& alternateExchange, bool passive, bool durable, bool autoDelete, const qpid::framing::FieldTable& arguments); void delete_(const std::string& exchange, bool ifUnused); framing::ExchangeQueryResult query(const std::string& name); void bind(const std::string& queue, const std::string& exchange, const std::string& routingKey, const qpid::framing::FieldTable& arguments); void unbind(const std::string& queue, const std::string& exchange, const std::string& routingKey); framing::ExchangeBoundResult bound(const std::string& exchange, const std::string& queue, const std::string& routingKey, const framing::FieldTable& arguments); private: void checkType(boost::shared_ptr exchange, const std::string& type); void checkAlternate(boost::shared_ptr exchange, boost::shared_ptr alternate); }; class QueueHandlerImpl : public QueueHandler, public HandlerHelper { Broker& broker; std::vector< boost::shared_ptr > exclusiveQueues; public: QueueHandlerImpl(SemanticState& session); ~QueueHandlerImpl(); void declare(const std::string& queue, const std::string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const qpid::framing::FieldTable& arguments); void delete_(const std::string& queue, bool ifUnused, bool ifEmpty); void purge(const std::string& queue); framing::QueueQueryResult query(const std::string& queue); bool isLocal(const ConnectionToken* t) const; void destroyExclusiveQueues(); void checkDelete(boost::shared_ptr queue, bool ifUnused, bool ifEmpty); template void eachExclusiveQueue(F f) { std::for_each(exclusiveQueues.begin(), exclusiveQueues.end(), f); } }; class MessageHandlerImpl : public MessageHandler, public HandlerHelper { typedef boost::function RangedOperation; RangedOperation releaseRedeliveredOp; RangedOperation releaseOp; RangedOperation rejectOp; RangedOperation acceptOp; public: MessageHandlerImpl(SemanticState& session); void transfer(const std::string& destination, uint8_t acceptMode, uint8_t acquireMode); void accept(const framing::SequenceSet& commands); void reject(const framing::SequenceSet& commands, uint16_t code, const std::string& text); void release(const framing::SequenceSet& commands, bool setRedelivered); framing::MessageAcquireResult acquire(const framing::SequenceSet&); void subscribe(const std::string& queue, const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const std::string& resumeId, uint64_t resumeTtl, const framing::FieldTable& arguments); void cancel(const std::string& destination); void setFlowMode(const std::string& destination, uint8_t flowMode); void flow(const std::string& destination, uint8_t unit, uint32_t value); void flush(const std::string& destination); void stop(const std::string& destination); framing::MessageResumeResult resume(const std::string& destination, const std::string& resumeId); }; class ExecutionHandlerImpl : public ExecutionHandler, public HandlerHelper { public: ExecutionHandlerImpl(SemanticState& session) : HandlerHelper(session) {} void sync(); void result(const framing::SequenceNumber& commandId, const std::string& value); void exception(uint16_t errorCode, const framing::SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const framing::FieldTable& errorInfo); }; class TxHandlerImpl : public TxHandler, public HandlerHelper { public: TxHandlerImpl(SemanticState& session) : HandlerHelper(session) {} void select(); void commit(); void rollback(); }; class DtxHandlerImpl : public DtxHandler, public HandlerHelper, private framing::StructHelper { std::string convert(const framing::Xid& xid); public: DtxHandlerImpl(SemanticState& session) : HandlerHelper(session) {} void select(); framing::XaResult start(const framing::Xid& xid, bool join, bool resume); framing::XaResult end(const framing::Xid& xid, bool fail, bool suspend); framing::XaResult commit(const framing::Xid& xid, bool onePhase); void forget(const framing::Xid& xid); framing::DtxGetTimeoutResult getTimeout(const framing::Xid& xid); framing::XaResult prepare(const framing::Xid& xid); framing::DtxRecoverResult recover(); framing::XaResult rollback(const framing::Xid& xid); void setTimeout(const framing::Xid& xid, uint32_t timeout); }; ExchangeHandlerImpl exchangeImpl; QueueHandlerImpl queueImpl; MessageHandlerImpl messageImpl; ExecutionHandlerImpl executionImpl; TxHandlerImpl txImpl; DtxHandlerImpl dtxImpl; }; }} // namespace qpid::broker #endif /*!_broker_SessionAdapter_h*/ qpidc-0.16/src/qpid/broker/QueueCleaner.cpp0000664000076400007640000000414111576211367021237 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Queue.h" #include "qpid/broker/QueueCleaner.h" #include "qpid/broker/Broker.h" #include namespace qpid { namespace broker { QueueCleaner::QueueCleaner(QueueRegistry& q, sys::Timer* t) : queues(q), timer(t) {} QueueCleaner::~QueueCleaner() { if (task) task->cancel(); } void QueueCleaner::start(qpid::sys::Duration p) { period = p; task = new Task(*this, p); timer->add(task); } void QueueCleaner::setTimer(qpid::sys::Timer* timer) { this->timer = timer; } QueueCleaner::Task::Task(QueueCleaner& p, qpid::sys::Duration d) : sys::TimerTask(d,"QueueCleaner"), parent(p) {} void QueueCleaner::Task::fire() { parent.fired(); } namespace { struct CollectQueues { std::vector* queues; CollectQueues(std::vector* q) : queues(q) {} void operator()(Queue::shared_ptr q) { queues->push_back(q); } }; } void QueueCleaner::fired() { //collect copy of list of queues to avoid holding registry lock while we perform purge std::vector copy; CollectQueues collect(©); queues.eachQueue(collect); std::for_each(copy.begin(), copy.end(), boost::bind(&Queue::purgeExpired, _1, period)); task->setupNextFire(); timer->add(task); } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/DtxTimeout.cpp0000664000076400007640000000230211625531570020760 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/DtxTimeout.h" #include "qpid/broker/DtxManager.h" #include "qpid/sys/Time.h" using namespace qpid::broker; DtxTimeout::DtxTimeout(uint32_t _timeout, DtxManager& _mgr, const std::string& _xid) : TimerTask(qpid::sys::Duration(_timeout * qpid::sys::TIME_SEC),"DtxTimeout-"+_xid), timeout(_timeout), mgr(_mgr), xid(_xid) { } void DtxTimeout::fire() { mgr.timedout(xid); } qpidc-0.16/src/qpid/broker/TxPublish.h0000664000076400007640000000611611625531570020250 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TxPublish_ #define _TxPublish_ #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Deliverable.h" #include "qpid/broker/Message.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/TxOp.h" #include #include #include #include namespace qpid { namespace broker { /** * Defines the behaviour for publish operations on a * transactional channel. Messages are routed through * exchanges when received but are not at that stage delivered * to the matching queues, rather the queues are held in an * instance of this class. On prepare() the message is marked * enqueued to the relevant queues in the MessagesStore. On * commit() the messages will be passed to the queue for * dispatch or to be added to the in-memory queue. */ class QPID_BROKER_CLASS_EXTERN TxPublish : public TxOp, public Deliverable{ class Commit{ boost::intrusive_ptr& msg; public: Commit(boost::intrusive_ptr& msg); void operator()(const boost::shared_ptr& queue); }; class Rollback{ boost::intrusive_ptr& msg; public: Rollback(boost::intrusive_ptr& msg); void operator()(const boost::shared_ptr& queue); }; boost::intrusive_ptr msg; std::list > queues; std::list > prepared; void prepare(TransactionContext* ctxt, boost::shared_ptr); public: QPID_BROKER_EXTERN TxPublish(boost::intrusive_ptr msg); QPID_BROKER_EXTERN virtual bool prepare(TransactionContext* ctxt) throw(); QPID_BROKER_EXTERN virtual void commit() throw(); QPID_BROKER_EXTERN virtual void rollback() throw(); virtual Message& getMessage() { return *msg; }; QPID_BROKER_EXTERN virtual void deliverTo(const boost::shared_ptr& queue); virtual ~TxPublish(){} virtual void accept(TxOpConstVisitor& visitor) const { visitor(*this); } QPID_BROKER_EXTERN uint64_t contentSize(); boost::intrusive_ptr getMessage() const { return msg; } const std::list >& getQueues() const { return queues; } const std::list >& getPrepared() const { return prepared; } }; } } #endif qpidc-0.16/src/qpid/broker/BrokerImportExport.h0000664000076400007640000000266611564561152022156 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_IMPORT_EXPORT_H #define QPID_BROKER_IMPORT_EXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #if defined(WIN32) && !defined(QPID_DECLARE_STATIC) # if defined(BROKER_EXPORT) || defined (qpidbroker_EXPORTS) # define QPID_BROKER_EXTERN __declspec(dllexport) # else # define QPID_BROKER_EXTERN __declspec(dllimport) # endif # ifdef _MSC_VER # define QPID_BROKER_CLASS_EXTERN # define QPID_BROKER_INLINE_EXTERN QPID_BROKER_EXTERN # else # define QPID_BROKER_CLASS_EXTERN QPID_BROKER_EXTERN # define QPID_BROKER_INLINE_EXTERN # endif #else # define QPID_BROKER_EXTERN # define QPID_BROKER_CLASS_EXTERN # define QPID_BROKER_INLINE_EXTERN #endif #endif qpidc-0.16/src/qpid/broker/RecoveredDequeue.cpp0000664000076400007640000000262311546316057022117 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Queue.h" #include "qpid/broker/RecoveredDequeue.h" using boost::intrusive_ptr; using namespace qpid::broker; RecoveredDequeue::RecoveredDequeue(Queue::shared_ptr _queue, intrusive_ptr _msg) : queue(_queue), msg(_msg) { queue->recoverPrepared(msg); } bool RecoveredDequeue::prepare(TransactionContext*) throw() { //should never be called; transaction has already prepared if an enqueue is recovered return false; } void RecoveredDequeue::commit() throw() { queue->enqueueAborted(msg); } void RecoveredDequeue::rollback() throw() { queue->process(msg); } qpidc-0.16/src/qpid/broker/RecoveryManagerImpl.h0000664000076400007640000000402611361633572022241 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _RecoveryManagerImpl_ #define _RecoveryManagerImpl_ #include #include "qpid/broker/DtxManager.h" #include "qpid/broker/ExchangeRegistry.h" #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/LinkRegistry.h" #include "qpid/broker/RecoveryManager.h" namespace qpid { namespace broker { class RecoveryManagerImpl : public RecoveryManager{ QueueRegistry& queues; ExchangeRegistry& exchanges; LinkRegistry& links; DtxManager& dtxMgr; public: RecoveryManagerImpl(QueueRegistry& queues, ExchangeRegistry& exchanges, LinkRegistry& links, DtxManager& dtxMgr); ~RecoveryManagerImpl(); RecoverableExchange::shared_ptr recoverExchange(framing::Buffer& buffer); RecoverableQueue::shared_ptr recoverQueue(framing::Buffer& buffer); RecoverableMessage::shared_ptr recoverMessage(framing::Buffer& buffer); RecoverableTransaction::shared_ptr recoverTransaction(const std::string& xid, std::auto_ptr txn); RecoverableConfig::shared_ptr recoverConfig(framing::Buffer& buffer); void recoveryComplete(); }; } } #endif qpidc-0.16/src/qpid/broker/NullMessageStore.h0000664000076400007640000001134511564561152021563 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _NullMessageStore_ #define _NullMessageStore_ #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/Queue.h" #include "qpid/sys/Mutex.h" #include namespace qpid { namespace broker { /** * A null implementation of the MessageStore interface */ class QPID_BROKER_CLASS_EXTERN NullMessageStore : public MessageStore { std::set prepared; uint64_t nextPersistenceId; qpid::sys::Mutex lock; public: QPID_BROKER_EXTERN NullMessageStore(); QPID_BROKER_EXTERN virtual bool init(const Options* options); QPID_BROKER_EXTERN virtual void truncateInit(const bool pushDownStoreFiles = false); QPID_BROKER_EXTERN virtual std::auto_ptr begin(); QPID_BROKER_EXTERN virtual std::auto_ptr begin(const std::string& xid); QPID_BROKER_EXTERN virtual void prepare(TPCTransactionContext& txn); QPID_BROKER_EXTERN virtual void commit(TransactionContext& txn); QPID_BROKER_EXTERN virtual void abort(TransactionContext& txn); QPID_BROKER_EXTERN virtual void collectPreparedXids(std::set& xids); QPID_BROKER_EXTERN virtual void create(PersistableQueue& queue, const framing::FieldTable& args); QPID_BROKER_EXTERN virtual void destroy(PersistableQueue& queue); QPID_BROKER_EXTERN virtual void create(const PersistableExchange& exchange, const framing::FieldTable& args); QPID_BROKER_EXTERN virtual void destroy(const PersistableExchange& exchange); QPID_BROKER_EXTERN virtual void bind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const framing::FieldTable& args); QPID_BROKER_EXTERN virtual void unbind(const PersistableExchange& exchange, const PersistableQueue& queue, const std::string& key, const framing::FieldTable& args); QPID_BROKER_EXTERN virtual void create(const PersistableConfig& config); QPID_BROKER_EXTERN virtual void destroy(const PersistableConfig& config); QPID_BROKER_EXTERN virtual void recover(RecoveryManager& queues); QPID_BROKER_EXTERN virtual void stage(const boost::intrusive_ptr& msg); QPID_BROKER_EXTERN virtual void destroy(PersistableMessage& msg); QPID_BROKER_EXTERN virtual void appendContent(const boost::intrusive_ptr& msg, const std::string& data); QPID_BROKER_EXTERN virtual void loadContent(const qpid::broker::PersistableQueue& queue, const boost::intrusive_ptr& msg, std::string& data, uint64_t offset, uint32_t length); QPID_BROKER_EXTERN virtual void enqueue(TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue); QPID_BROKER_EXTERN virtual void dequeue(TransactionContext* ctxt, const boost::intrusive_ptr& msg, const PersistableQueue& queue); QPID_BROKER_EXTERN virtual uint32_t outstandingQueueAIO(const PersistableQueue& queue); QPID_BROKER_EXTERN virtual void flush(const qpid::broker::PersistableQueue& queue); ~NullMessageStore(){} QPID_BROKER_EXTERN virtual bool isNull() const; static bool isNullStore(const MessageStore*); }; } } #endif qpidc-0.16/src/qpid/broker/TxAccept.h0000664000076400007640000000514211227113407020030 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TxAccept_ #define _TxAccept_ #include #include #include #include "qpid/framing/SequenceSet.h" #include "qpid/broker/DeliveryRecord.h" #include "qpid/broker/TxOp.h" namespace qpid { namespace broker { /** * Defines the transactional behaviour for accepts received by * a transactional channel. */ class TxAccept : public TxOp { struct RangeOp { AckRange range; RangeOp(const AckRange& r); void prepare(TransactionContext* ctxt); void commit(); }; struct RangeOps { std::vector ranges; DeliveryRecords& unacked; RangeOps(DeliveryRecords& u); void operator()(framing::SequenceNumber start, framing::SequenceNumber end); void prepare(TransactionContext* ctxt); void commit(); }; framing::SequenceSet acked; DeliveryRecords& unacked; RangeOps ops; public: /** * @param acked a representation of the accumulation of * acks received * @param unacked the record of delivered messages */ TxAccept(const framing::SequenceSet& acked, DeliveryRecords& unacked); virtual bool prepare(TransactionContext* ctxt) throw(); virtual void commit() throw(); virtual void rollback() throw(); virtual ~TxAccept(){} virtual void accept(TxOpConstVisitor& visitor) const { visitor(*this); } // Used by cluster replication. const framing::SequenceSet& getAcked() const { return acked; } }; } } #endif qpidc-0.16/src/qpid/broker/SessionState.cpp0000664000076400007640000004136411704073172021306 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/SessionState.h" #include "qpid/broker/Broker.h" #include "qpid/broker/ConnectionState.h" #include "qpid/broker/DeliveryRecord.h" #include "qpid/broker/SessionManager.h" #include "qpid/broker/SessionHandler.h" #include "qpid/sys/ClusterSafe.h" #include "qpid/framing/AMQContentBody.h" #include "qpid/framing/AMQHeaderBody.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/ServerInvoker.h" #include "qpid/log/Statement.h" #include "qpid/management/ManagementAgent.h" #include #include namespace qpid { namespace broker { using namespace framing; using sys::Mutex; using boost::intrusive_ptr; using qpid::management::ManagementAgent; using qpid::management::ManagementObject; using qpid::management::Manageable; using qpid::management::Args; using qpid::sys::AbsTime; //using qpid::sys::Timer; namespace _qmf = qmf::org::apache::qpid::broker; SessionState::SessionState( Broker& b, SessionHandler& h, const SessionId& id, const SessionState::Configuration& config, bool delayManagement) : qpid::SessionState(id, config), broker(b), handler(&h), semanticState(*this, *this), adapter(semanticState), msgBuilder(&broker.getStore()), mgmtObject(0), asyncCommandCompleter(new AsyncCommandCompleter(this)) { if (!delayManagement) addManagementObject(); attach(h); } void SessionState::addManagementObject() { if (GetManagementObject()) return; // Already added. Manageable* parent = broker.GetVhostObject (); if (parent != 0) { ManagementAgent* agent = getBroker().getManagementAgent(); if (agent != 0) { mgmtObject = new _qmf::Session (agent, this, parent, getId().getName()); mgmtObject->set_attached (0); mgmtObject->set_detachedLifespan (0); mgmtObject->clr_expireTime(); agent->addObject(mgmtObject); } } } SessionState::~SessionState() { asyncCommandCompleter->cancel(); semanticState.closed(); if (mgmtObject != 0) mgmtObject->resourceDestroy (); } AMQP_ClientProxy& SessionState::getProxy() { assert(isAttached()); return handler->getProxy(); } uint16_t SessionState::getChannel() const { assert(isAttached()); return handler->getChannel(); } ConnectionState& SessionState::getConnection() { assert(isAttached()); return handler->getConnection(); } bool SessionState::isLocal(const ConnectionToken* t) const { return isAttached() && &(handler->getConnection()) == t; } void SessionState::detach() { QPID_LOG(debug, getId() << ": detached on broker."); asyncCommandCompleter->detached(); disableOutput(); handler = 0; if (mgmtObject != 0) mgmtObject->set_attached (0); } void SessionState::disableOutput() { semanticState.detached(); //prevents further activateOutput calls until reattached } void SessionState::attach(SessionHandler& h) { QPID_LOG(debug, getId() << ": attached on broker."); handler = &h; if (mgmtObject != 0) { mgmtObject->set_attached (1); mgmtObject->set_connectionRef (h.getConnection().GetManagementObject()->getObjectId()); mgmtObject->set_channelId (h.getChannel()); } asyncCommandCompleter->attached(); } void SessionState::abort() { if (isAttached()) getConnection().outputTasks.abort(); } void SessionState::activateOutput() { if (isAttached()) getConnection().outputTasks.activateOutput(); } void SessionState::giveReadCredit(int32_t credit) { if (isAttached()) getConnection().outputTasks.giveReadCredit(credit); } ManagementObject* SessionState::GetManagementObject (void) const { return (ManagementObject*) mgmtObject; } Manageable::status_t SessionState::ManagementMethod (uint32_t methodId, Args& /*args*/, string& /*text*/) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; switch (methodId) { case _qmf::Session::METHOD_DETACH : if (handler != 0) { handler->sendDetach(); } status = Manageable::STATUS_OK; break; case _qmf::Session::METHOD_CLOSE : /* if (handler != 0) { handler->getConnection().closeChannel(handler->getChannel()); } status = Manageable::STATUS_OK; break; */ case _qmf::Session::METHOD_SOLICITACK : case _qmf::Session::METHOD_RESETLIFESPAN : status = Manageable::STATUS_NOT_IMPLEMENTED; break; } return status; } void SessionState::handleCommand(framing::AMQMethodBody* method, const SequenceNumber& id) { currentCommandComplete = true; // assumed, can be overridden by invoker method (this sucks). Invoker::Result invocation = invoke(adapter, *method); if (currentCommandComplete) receiverCompleted(id); if (!invocation.wasHandled()) { throw NotImplementedException(QPID_MSG("Not implemented: " << *method)); } else if (invocation.hasResult()) { getProxy().getExecution().result(id, invocation.getResult()); } if (method->isSync() && currentCommandComplete) { sendAcceptAndCompletion(); } } void SessionState::handleContent(AMQFrame& frame, const SequenceNumber& id) { if (frame.getBof() && frame.getBos()) //start of frameset msgBuilder.start(id); intrusive_ptr msg(msgBuilder.getMessage()); msgBuilder.handle(frame); if (frame.getEof() && frame.getEos()) {//end of frameset if (frame.getBof()) { //i.e this is a just a command frame, add a dummy header AMQFrame header((AMQHeaderBody())); header.setBof(false); header.setEof(false); msg->getFrames().append(header); } if (broker.isTimestamping()) msg->setTimestamp(); msg->setPublisher(&getConnection()); msg->getIngressCompletion().begin(); semanticState.handle(msg); msgBuilder.end(); IncompleteIngressMsgXfer xfer(this, msg); msg->getIngressCompletion().end(xfer); // allows msg to complete xfer } } void SessionState::sendAcceptAndCompletion() { if (!accepted.empty()) { getProxy().getMessage().accept(accepted); accepted.clear(); } sendCompletion(); } /** Invoked when the given inbound message is finished being processed * by all interested parties (eg. it is done being enqueued to all queues, * its credit has been accounted for, etc). At this point, msg is considered * by this receiver as 'completed' (as defined by AMQP 0_10) */ void SessionState::completeRcvMsg(SequenceNumber id, bool requiresAccept, bool requiresSync) { // Mark this as a cluster-unsafe scope since it can be called in // journal threads or connection threads as part of asynchronous // command completion. sys::ClusterUnsafeScope cus; bool callSendCompletion = false; receiverCompleted(id); if (requiresAccept) // will cause msg's seq to appear in the next message.accept we send. accepted.add(id); // Are there any outstanding Execution.Sync commands pending the // completion of this msg? If so, complete them. while (!pendingExecutionSyncs.empty() && receiverGetIncomplete().front() >= pendingExecutionSyncs.front()) { const SequenceNumber id = pendingExecutionSyncs.front(); pendingExecutionSyncs.pop(); QPID_LOG(debug, getId() << ": delayed execution.sync " << id << " is completed."); receiverCompleted(id); callSendCompletion = true; // likely peer is pending for this completion. } // if the sender has requested immediate notification of the completion... if (requiresSync || callSendCompletion) { sendAcceptAndCompletion(); } } void SessionState::handleIn(AMQFrame& frame) { SequenceNumber commandId = receiverGetCurrent(); //TODO: make command handling more uniform, regardless of whether //commands carry content. AMQMethodBody* m = frame.getMethod(); if (m == 0 || m->isContentBearing()) { handleContent(frame, commandId); } else if (frame.getBof() && frame.getEof()) { handleCommand(frame.getMethod(), commandId); } else { throw InternalErrorException("Cannot handle multi-frame command segments yet"); } } void SessionState::handleOut(AMQFrame& frame) { assert(handler); handler->out(frame); } void SessionState::deliver(DeliveryRecord& msg, bool sync) { uint32_t maxFrameSize = getConnection().getFrameMax(); assert(senderGetCommandPoint().offset == 0); SequenceNumber commandId = senderGetCommandPoint().command; msg.deliver(getProxy().getHandler(), commandId, maxFrameSize); assert(senderGetCommandPoint() == SessionPoint(commandId+1, 0)); // Delivery has moved sendPoint. if (sync) { AMQP_ClientProxy::Execution& p(getProxy().getExecution()); Proxy::ScopedSync s(p); p.sync(); } } void SessionState::sendCompletion() { handler->sendCompletion(); } void SessionState::senderCompleted(const SequenceSet& commands) { qpid::SessionState::senderCompleted(commands); semanticState.completed(commands); } void SessionState::readyToSend() { QPID_LOG(debug, getId() << ": ready to send, activating output."); assert(handler); semanticState.attached(); } Broker& SessionState::getBroker() { return broker; } // Session resume is not fully implemented so it is useless to set a // non-0 timeout. Moreover it creates problems in a cluster because // dead sessions are kept and interfere with failover. void SessionState::setTimeout(uint32_t) { } framing::AMQP_ClientProxy& SessionState::getClusterOrderProxy() { return handler->getClusterOrderProxy(); } // Current received command is an execution.sync command. // Complete this command only when all preceding commands have completed. // (called via the invoker() in handleCommand() above) void SessionState::addPendingExecutionSync() { SequenceNumber syncCommandId = receiverGetCurrent(); if (receiverGetIncomplete().front() < syncCommandId) { currentCommandComplete = false; pendingExecutionSyncs.push(syncCommandId); asyncCommandCompleter->flushPendingMessages(); QPID_LOG(debug, getId() << ": delaying completion of execution.sync " << syncCommandId); } } /** factory for creating a reference-counted IncompleteIngressMsgXfer object * which will be attached to a message that will be completed asynchronously. */ boost::intrusive_ptr SessionState::IncompleteIngressMsgXfer::clone() { // Optimization: this routine is *only* invoked when the message needs to be asynchronously completed. // If the client is pending the message.transfer completion, flush now to force immediate write to journal. if (requiresSync) msg->flush(); else { // otherwise, we need to track this message in order to flush it if an execution.sync arrives // before it has been completed (see flushPendingMessages()) pending = true; completerContext->addPendingMessage(msg); } return boost::intrusive_ptr(new SessionState::IncompleteIngressMsgXfer(*this)); } /** Invoked by the asynchronous completer associated with a received * msg that is pending Completion. May be invoked by the IO thread * (sync == true), or some external thread (!sync). */ void SessionState::IncompleteIngressMsgXfer::completed(bool sync) { if (pending) completerContext->deletePendingMessage(id); if (!sync) { /** note well: this path may execute in any thread. It is safe to access * the scheduledCompleterContext, since *this has a shared pointer to it. * but not session! */ session = 0; QPID_LOG(debug, ": async completion callback scheduled for msg seq=" << id); completerContext->scheduleMsgCompletion(id, requiresAccept, requiresSync); } else { // this path runs directly from the ac->end() call in handleContent() above, // so *session is definately valid. if (session->isAttached()) { QPID_LOG(debug, ": receive completed for msg seq=" << id); session->completeRcvMsg(id, requiresAccept, requiresSync); } } completerContext = boost::intrusive_ptr(); } /** Scheduled from an asynchronous command's completed callback to run on * the IO thread. */ void SessionState::AsyncCommandCompleter::schedule(boost::intrusive_ptr ctxt) { ctxt->completeCommands(); } /** Track an ingress message that is pending completion */ void SessionState::AsyncCommandCompleter::addPendingMessage(boost::intrusive_ptr msg) { qpid::sys::ScopedLock l(completerLock); std::pair > item(msg->getCommandId(), msg); bool unique = pendingMsgs.insert(item).second; if (!unique) { assert(false); } } /** pending message has completed */ void SessionState::AsyncCommandCompleter::deletePendingMessage(SequenceNumber id) { qpid::sys::ScopedLock l(completerLock); pendingMsgs.erase(id); } /** done when an execution.sync arrives */ void SessionState::AsyncCommandCompleter::flushPendingMessages() { std::map > copy; { qpid::sys::ScopedLock l(completerLock); pendingMsgs.swap(copy); // we've only tracked these in case a flush is needed, so nuke 'em now. } // drop lock, so it is safe to call "flush()" for (std::map >::iterator i = copy.begin(); i != copy.end(); ++i) { i->second->flush(); } } /** mark an ingress Message.Transfer command as completed. * This method must be thread safe - it may run on any thread. */ void SessionState::AsyncCommandCompleter::scheduleMsgCompletion(SequenceNumber cmd, bool requiresAccept, bool requiresSync) { qpid::sys::ScopedLock l(completerLock); if (session && isAttached) { MessageInfo msg(cmd, requiresAccept, requiresSync); completedMsgs.push_back(msg); if (completedMsgs.size() == 1) { session->getConnection().requestIOProcessing(boost::bind(&schedule, session->asyncCommandCompleter)); } } } /** Cause the session to complete all completed commands. * Executes on the IO thread. */ void SessionState::AsyncCommandCompleter::completeCommands() { qpid::sys::ScopedLock l(completerLock); // when session is destroyed, it clears the session pointer via cancel(). if (session && session->isAttached()) { for (std::vector::iterator msg = completedMsgs.begin(); msg != completedMsgs.end(); ++msg) { session->completeRcvMsg(msg->cmd, msg->requiresAccept, msg->requiresSync); } } completedMsgs.clear(); } /** cancel any pending calls to scheduleComplete */ void SessionState::AsyncCommandCompleter::cancel() { qpid::sys::ScopedLock l(completerLock); session = 0; } /** inform the completer that the session has attached, * allows command completion scheduling from any thread */ void SessionState::AsyncCommandCompleter::attached() { qpid::sys::ScopedLock l(completerLock); isAttached = true; } /** inform the completer that the session has detached, * disables command completion scheduling from any thread */ void SessionState::AsyncCommandCompleter::detached() { qpid::sys::ScopedLock l(completerLock); isAttached = false; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/Fairshare.cpp0000664000076400007640000001267611620507203020564 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Fairshare.h" #include "qpid/broker/QueuedMessage.h" #include "qpid/framing/FieldTable.h" #include "qpid/log/Statement.h" #include #include #include namespace qpid { namespace broker { Fairshare::Fairshare(size_t levels, uint limit) : PriorityQueue(levels), limits(levels, limit), priority(levels-1), count(0) {} void Fairshare::setLimit(size_t level, uint limit) { limits[level] = limit; } bool Fairshare::limitReached() { uint l = limits[priority]; return l && ++count > l; } uint Fairshare::currentLevel() { if (limitReached()) { return nextLevel(); } else { return priority; } } uint Fairshare::nextLevel() { count = 1; if (priority) --priority; else priority = levels-1; return priority; } bool Fairshare::isNull() { for (int i = 0; i < levels; i++) if (limits[i]) return false; return true; } bool Fairshare::getState(uint& p, uint& c) const { p = priority; c = count; return true; } bool Fairshare::setState(uint p, uint c) { priority = p; count = c; return true; } bool Fairshare::findFrontLevel(uint& p, PriorityLevels& messages) { const uint start = p = currentLevel(); do { if (!messages[p].empty()) return true; } while ((p = nextLevel()) != start); return false; } bool Fairshare::getState(const Messages& m, uint& priority, uint& count) { const Fairshare* fairshare = dynamic_cast(&m); return fairshare && fairshare->getState(priority, count); } bool Fairshare::setState(Messages& m, uint priority, uint count) { Fairshare* fairshare = dynamic_cast(&m); return fairshare && fairshare->setState(priority, count); } int getIntegerSetting(const qpid::framing::FieldTable& settings, const std::vector& keys) { qpid::framing::FieldTable::ValuePtr v; std::vector::const_iterator i = keys.begin(); while (!v && i != keys.end()) { v = settings.get(*i++); } if (!v) { return 0; } else if (v->convertsTo()) { return v->get(); } else if (v->convertsTo()){ std::string s = v->get(); try { return boost::lexical_cast(s); } catch(const boost::bad_lexical_cast&) { QPID_LOG(warning, "Ignoring invalid integer value for " << *i << ": " << s); return 0; } } else { QPID_LOG(warning, "Ignoring invalid integer value for " << *i << ": " << *v); return 0; } } int getIntegerSettingForKey(const qpid::framing::FieldTable& settings, const std::string& key) { return getIntegerSetting(settings, boost::assign::list_of(key)); } int getSetting(const qpid::framing::FieldTable& settings, const std::vector& keys, int minvalue, int maxvalue) { return std::max(minvalue,std::min(getIntegerSetting(settings, keys), maxvalue)); } std::auto_ptr getFairshareForKey(const qpid::framing::FieldTable& settings, uint levels, const std::string& key) { uint defaultLimit = getIntegerSettingForKey(settings, key); std::auto_ptr fairshare(new Fairshare(levels, defaultLimit)); for (uint i = 0; i < levels; i++) { std::string levelKey = (boost::format("%1%-%2%") % key % i).str(); if(settings.isSet(levelKey)) { fairshare->setLimit(i, getIntegerSettingForKey(settings, levelKey)); } } if (!fairshare->isNull()) { return fairshare; } else { return std::auto_ptr(); } } std::auto_ptr getFairshare(const qpid::framing::FieldTable& settings, uint levels, const std::vector& keys) { std::auto_ptr fairshare; for (std::vector::const_iterator i = keys.begin(); i != keys.end() && !fairshare.get(); ++i) { fairshare = getFairshareForKey(settings, levels, *i); } return fairshare; } std::auto_ptr Fairshare::create(const qpid::framing::FieldTable& settings) { using boost::assign::list_of; std::auto_ptr result; size_t levels = getSetting(settings, list_of("qpid.priorities")("x-qpid-priorities"), 0, 100); if (levels) { std::auto_ptr fairshare = getFairshare(settings, levels, list_of("qpid.fairshare")("x-qpid-fairshare")); if (fairshare.get()) result = fairshare; else result = std::auto_ptr(new PriorityQueue(levels)); } return result; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/QueueRegistry.cpp0000664000076400007640000001034111705641335021471 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Queue.h" #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/QueueEvents.h" #include "qpid/broker/Exchange.h" #include "qpid/log/Statement.h" #include "qpid/framing/reply_exceptions.h" #include #include using namespace qpid::broker; using namespace qpid::sys; using std::string; QueueRegistry::QueueRegistry(Broker* b) : counter(1), store(0), events(0), parent(0), lastNode(false), broker(b) {} QueueRegistry::~QueueRegistry(){} std::pair QueueRegistry::declare(const string& declareName, bool durable, bool autoDelete, const OwnershipToken* owner, boost::shared_ptr alternate, const qpid::framing::FieldTable& arguments, bool recovering/*true if this declare is a result of recovering queue definition from persistente record*/) { RWlock::ScopedWlock locker(lock); string name = declareName.empty() ? generateName() : declareName; assert(!name.empty()); QueueMap::iterator i = queues.find(name); if (i == queues.end()) { Queue::shared_ptr queue(new Queue(name, autoDelete, durable ? store : 0, owner, parent, broker)); if (alternate) { queue->setAlternateExchange(alternate);//need to do this *before* create alternate->incAlternateUsers(); } if (!recovering) { //apply settings & create persistent record if required queue->create(arguments); } else { //i.e. recovering a queue for which we already have a persistent record queue->configure(arguments); } queues[name] = queue; if (lastNode) queue->setLastNodeFailure(); return std::pair(queue, true); } else { return std::pair(i->second, false); } } void QueueRegistry::destroyLH (const string& name){ queues.erase(name); } void QueueRegistry::destroy (const string& name){ RWlock::ScopedWlock locker(lock); destroyLH (name); } Queue::shared_ptr QueueRegistry::find(const string& name){ RWlock::ScopedRlock locker(lock); QueueMap::iterator i = queues.find(name); if (i == queues.end()) { return Queue::shared_ptr(); } else { return i->second; } } Queue::shared_ptr QueueRegistry::get(const string& name) { Queue::shared_ptr q = find(name); if (!q) throw framing::NotFoundException(QPID_MSG("Queue not found: "<second->setLastNodeFailure(); } else { i->second->clearLastNodeFailure(); } } lastNode = _lastNode; } qpidc-0.16/src/qpid/broker/SessionContext.h0000664000076400007640000000342711527755664021335 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_SESSIONCONTEXT_H #define QPID_BROKER_SESSIONCONTEXT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/FrameHandler.h" #include "qpid/framing/AMQP_ClientProxy.h" #include "qpid/framing/amqp_types.h" #include "qpid/sys/OutputControl.h" #include "qpid/broker/ConnectionState.h" #include "qpid/broker/OwnershipToken.h" #include "qpid/SessionId.h" #include namespace qpid { namespace broker { class SessionContext : public OwnershipToken, public sys::OutputControl { public: virtual ~SessionContext(){} virtual bool isLocal(const ConnectionToken* t) const = 0; virtual bool isAttached() const = 0; virtual ConnectionState& getConnection() = 0; virtual framing::AMQP_ClientProxy& getProxy() = 0; virtual Broker& getBroker() = 0; virtual uint16_t getChannel() const = 0; virtual const SessionId& getSessionId() const = 0; virtual void addPendingExecutionSync() = 0; }; }} // namespace qpid::broker #endif /*!QPID_BROKER_SESSIONCONTEXT_H*/ qpidc-0.16/src/qpid/broker/DeliveryRecord.h0000664000076400007640000001153111717465066021255 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_DELIVERYRECORD_H #define QPID_BROKER_DELIVERYRECORD_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include "qpid/framing/SequenceSet.h" #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/QueuedMessage.h" #include "qpid/broker/DeliveryId.h" #include "qpid/broker/Message.h" namespace qpid { namespace broker { class TransactionContext; class SemanticState; struct AckRange; class Consumer; /** * Record of a delivery for which an ack is outstanding. */ class DeliveryRecord { QueuedMessage msg; mutable boost::shared_ptr queue; std::string tag; // name of consumer boost::shared_ptr consumer; DeliveryId id; bool acquired : 1; bool acceptExpected : 1; bool cancelled : 1; bool completed : 1; bool ended : 1; bool windowing : 1; /** * Record required credit on construction as the pointer to the * message may be reset once we no longer need to deliver it * (e.g. when it is accepted), but we will still need to be able * to reallocate credit when it is completed (which could happen * after that). */ uint32_t credit; public: QPID_BROKER_EXTERN DeliveryRecord(const QueuedMessage& msg, const boost::shared_ptr& queue, const std::string& tag, const boost::shared_ptr& consumer, bool acquired, bool accepted, bool windowing, uint32_t credit=0 // Only used if msg is empty. ); bool coveredBy(const framing::SequenceSet* const range) const { return range->contains(id); } void dequeue(TransactionContext* ctxt = 0) const; void requeue() const; void release(bool setRedelivered); void reject(); void cancel(const std::string& tag); void redeliver(SemanticState* const); void acquire(DeliveryIds& results); void complete(); bool accept(TransactionContext* ctxt); // Returns isRedundant() bool setEnded(); // Returns isRedundant() void committed() const; bool isAcquired() const { return acquired; } bool isComplete() const { return completed; } bool isRedundant() const { return ended && (!windowing || completed || cancelled); } bool isCancelled() const { return cancelled; } bool isAccepted() const { return !acceptExpected; } bool isEnded() const { return ended; } bool isWindowing() const { return windowing; } uint32_t getCredit() const; const std::string& getTag() const { return tag; } void deliver(framing::FrameHandler& h, DeliveryId deliveryId, uint16_t framesize); void setId(DeliveryId _id) { id = _id; } typedef std::deque DeliveryRecords; static AckRange findRange(DeliveryRecords& records, DeliveryId first, DeliveryId last); const QueuedMessage& getMessage() const { return msg; } framing::SequenceNumber getId() const { return id; } boost::shared_ptr getQueue() const { return queue; } friend std::ostream& operator<<(std::ostream&, const DeliveryRecord&); }; inline bool operator<(const DeliveryRecord& a, const DeliveryRecord& b) { return a.getId() < b.getId(); } inline bool operator<(const framing::SequenceNumber& a, const DeliveryRecord& b) { return a < b.getId(); } inline bool operator<(const DeliveryRecord& a, const framing::SequenceNumber& b) { return a.getId() < b; } struct AcquireFunctor { DeliveryIds& results; AcquireFunctor(DeliveryIds& _results) : results(_results) {} void operator()(DeliveryRecord& record) { record.acquire(results); } }; typedef DeliveryRecord::DeliveryRecords DeliveryRecords; struct AckRange { DeliveryRecords::iterator start; DeliveryRecords::iterator end; AckRange(DeliveryRecords::iterator _start, DeliveryRecords::iterator _end) : start(_start), end(_end) {} }; } } #endif /*!QPID_BROKER_DELIVERYRECORD_H*/ qpidc-0.16/src/qpid/broker/SecureConnection.cpp0000664000076400007640000000443511457521130022123 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/SecureConnection.h" #include "qpid/sys/SecurityLayer.h" #include "qpid/framing/reply_exceptions.h" namespace qpid { namespace broker { using qpid::sys::SecurityLayer; SecureConnection::SecureConnection() : secured(false) {} size_t SecureConnection::decode(const char* buffer, size_t size) { if (!secured && securityLayer.get()) { //security layer comes into effect on first read after its //activated secured = true; } if (secured) { return securityLayer->decode(buffer, size); } else { return codec->decode(buffer, size); } } size_t SecureConnection::encode(const char* buffer, size_t size) { if (secured) { return securityLayer->encode(buffer, size); } else { return codec->encode(buffer, size); } } bool SecureConnection::canEncode() { if (secured) return securityLayer->canEncode(); else return codec->canEncode(); } void SecureConnection::closed() { codec->closed(); } bool SecureConnection::isClosed() const { return codec->isClosed(); } framing::ProtocolVersion SecureConnection::getVersion() const { return codec->getVersion(); } void SecureConnection:: setCodec(std::auto_ptr c) { codec = c; } void SecureConnection::activateSecurityLayer(std::auto_ptr sl, bool secureImmediately) { securityLayer = sl; securityLayer->init(codec.get()); if ( secureImmediately ) secured = true; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/PersistableMessage.h0000664000076400007640000001053511564561152022111 0ustar00jrossjross00000000000000#ifndef _broker_PersistableMessage_h #define _broker_PersistableMessage_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/Persistable.h" #include "qpid/framing/amqp_types.h" #include "qpid/sys/Mutex.h" #include "qpid/broker/PersistableQueue.h" #include "qpid/broker/AsyncCompletion.h" namespace qpid { namespace broker { class MessageStore; /** * Base class for persistable messages. */ class PersistableMessage : public Persistable { typedef std::list< boost::weak_ptr > syncList; sys::Mutex asyncDequeueLock; sys::Mutex storeLock; /** * "Ingress" messages == messages sent _to_ the broker. * Tracks the number of outstanding asynchronous operations that must * complete before an inbound message can be considered fully received by the * broker. E.g. all enqueues have completed, the message has been written * to store, credit has been replenished, etc. Once all outstanding * operations have completed, the transfer of this message from the client * may be considered complete. */ AsyncCompletion ingressCompletion; /** * Tracks the number of outstanding asynchronous dequeue * operations. When the message is dequeued asynchronously the * count is incremented; when that dequeue completes it is * decremented. Thus when it is 0, there are no outstanding * dequeues. */ int asyncDequeueCounter; void dequeueAsync(); syncList synclist; struct ContentReleaseState { bool blocked; bool requested; bool released; ContentReleaseState(); }; ContentReleaseState contentReleaseState; protected: /** Called when all dequeues are complete for this message. */ virtual void allDequeuesComplete() = 0; void setContentReleased(); MessageStore* store; public: typedef boost::shared_ptr shared_ptr; /** * @returns the size of the headers when encoded */ virtual uint32_t encodedHeaderSize() const = 0; virtual ~PersistableMessage(); PersistableMessage(); void flush(); QPID_BROKER_EXTERN bool isContentReleased() const; QPID_BROKER_EXTERN void setStore(MessageStore*); void requestContentRelease(); void blockContentRelease(); bool checkContentReleasable(); bool isContentReleaseBlocked(); bool isContentReleaseRequested(); virtual QPID_BROKER_EXTERN bool isPersistent() const = 0; /** track the progress of a message received by the broker - see ingressCompletion above */ QPID_BROKER_INLINE_EXTERN bool isIngressComplete() { return ingressCompletion.isDone(); } QPID_BROKER_INLINE_EXTERN AsyncCompletion& getIngressCompletion() { return ingressCompletion; } QPID_BROKER_INLINE_EXTERN void enqueueStart() { ingressCompletion.startCompleter(); } QPID_BROKER_INLINE_EXTERN void enqueueComplete() { ingressCompletion.finishCompleter(); } QPID_BROKER_EXTERN void enqueueAsync(PersistableQueue::shared_ptr queue, MessageStore* _store); QPID_BROKER_EXTERN bool isDequeueComplete(); QPID_BROKER_EXTERN void dequeueComplete(); QPID_BROKER_EXTERN void dequeueAsync(PersistableQueue::shared_ptr queue, MessageStore* _store); bool isStoredOnQueue(PersistableQueue::shared_ptr queue); void addToSyncList(PersistableQueue::shared_ptr queue, MessageStore* _store); }; }} #endif qpidc-0.16/src/qpid/broker/MessageMap.cpp0000664000076400007640000001000011717465066020676 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/MessageMap.h" #include "qpid/broker/QueuedMessage.h" namespace qpid { namespace broker { namespace { const std::string EMPTY; } bool MessageMap::deleted(const QueuedMessage&) { return true; } std::string MessageMap::getKey(const QueuedMessage& message) { const framing::FieldTable* ft = message.payload->getApplicationHeaders(); if (ft) return ft->getAsString(key); else return EMPTY; } size_t MessageMap::size() { return messages.size(); } bool MessageMap::empty() { return messages.empty(); } void MessageMap::release(const QueuedMessage& message) { std::string key = getKey(message); Index::iterator i = index.find(key); if (i == index.end()) { index[key] = message; messages[message.position] = message; } //else message has already been replaced } bool MessageMap::acquire(const framing::SequenceNumber& position, QueuedMessage& message) { Ordering::iterator i = messages.find(position); if (i != messages.end()) { message = i->second; erase(i); return true; } else { return false; } } bool MessageMap::find(const framing::SequenceNumber& position, QueuedMessage& message) { Ordering::iterator i = messages.find(position); if (i != messages.end()) { message = i->second; return true; } else { return false; } } bool MessageMap::browse(const framing::SequenceNumber& position, QueuedMessage& message, bool) { Ordering::iterator i = messages.lower_bound(position+1); if (i != messages.end()) { message = i->second; return true; } else { return false; } } bool MessageMap::consume(QueuedMessage& message) { Ordering::iterator i = messages.begin(); if (i != messages.end()) { message = i->second; erase(i); return true; } else { return false; } } const QueuedMessage& MessageMap::replace(const QueuedMessage& original, const QueuedMessage& update) { messages.erase(original.position); messages[update.position] = update; return update; } bool MessageMap::push(const QueuedMessage& added, QueuedMessage& removed) { std::pair result = index.insert(Index::value_type(getKey(added), added)); if (result.second) { //there was no previous message for this key; nothing needs to //be removed, just add the message into its correct position messages[added.position] = added; return false; } else { //there is already a message with that key which needs to be replaced removed = result.first->second; result.first->second = replace(result.first->second, added); return true; } } void MessageMap::foreach(Functor f) { for (Ordering::iterator i = messages.begin(); i != messages.end(); ++i) { f(i->second); } } void MessageMap::removeIf(Predicate p) { for (Ordering::iterator i = messages.begin(); i != messages.end(); i++) { if (p(i->second)) { erase(i); } } } void MessageMap::erase(Ordering::iterator i) { index.erase(getKey(i->second)); messages.erase(i); } MessageMap::MessageMap(const std::string& k) : key(k) {} }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/DtxManager.cpp0000664000076400007640000001221511625531570020710 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/DtxManager.h" #include "qpid/broker/DtxTimeout.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include "qpid/sys/Timer.h" #include "qpid/ptr_map.h" #include #include using boost::intrusive_ptr; using qpid::sys::Mutex; using qpid::ptr_map_ptr; using namespace qpid::broker; using namespace qpid::framing; DtxManager::DtxManager(qpid::sys::Timer& t) : store(0), timer(&t) {} DtxManager::~DtxManager() {} void DtxManager::start(const std::string& xid, DtxBuffer::shared_ptr ops) { createWork(xid)->add(ops); } void DtxManager::join(const std::string& xid, DtxBuffer::shared_ptr ops) { getWork(xid)->add(ops); } void DtxManager::recover(const std::string& xid, std::auto_ptr txn, DtxBuffer::shared_ptr ops) { createWork(xid)->recover(txn, ops); } bool DtxManager::prepare(const std::string& xid) { QPID_LOG(debug, "preparing: " << xid); try { return getWork(xid)->prepare(); } catch (DtxTimeoutException& e) { remove(xid); throw e; } } bool DtxManager::commit(const std::string& xid, bool onePhase) { QPID_LOG(debug, "committing: " << xid); try { bool result = getWork(xid)->commit(onePhase); remove(xid); return result; } catch (DtxTimeoutException& e) { remove(xid); throw e; } } void DtxManager::rollback(const std::string& xid) { QPID_LOG(debug, "rolling back: " << xid); try { getWork(xid)->rollback(); remove(xid); } catch (DtxTimeoutException& e) { remove(xid); throw e; } } DtxWorkRecord* DtxManager::getWork(const std::string& xid) { Mutex::ScopedLock locker(lock); WorkMap::iterator i = work.find(xid); if (i == work.end()) { throw NotFoundException(QPID_MSG("Unrecognised xid " << xid)); } return ptr_map_ptr(i); } bool DtxManager::exists(const std::string& xid) { Mutex::ScopedLock locker(lock); return work.find(xid) != work.end(); } void DtxManager::remove(const std::string& xid) { Mutex::ScopedLock locker(lock); WorkMap::iterator i = work.find(xid); if (i == work.end()) { throw NotFoundException(QPID_MSG("Unrecognised xid " << xid)); } else { work.erase(i); } } DtxWorkRecord* DtxManager::createWork(const std::string& xid) { Mutex::ScopedLock locker(lock); WorkMap::iterator i = work.find(xid); if (i != work.end()) { throw NotAllowedException(QPID_MSG("Xid " << xid << " is already known (use 'join' to add work to an existing xid)")); } else { std::string ncxid = xid; // Work around const correctness problems in ptr_map. return ptr_map_ptr(work.insert(ncxid, new DtxWorkRecord(ncxid, store)).first); } } void DtxManager::setTimeout(const std::string& xid, uint32_t secs) { DtxWorkRecord* record = getWork(xid); intrusive_ptr timeout = record->getTimeout(); if (timeout.get()) { if (timeout->timeout == secs) return;//no need to do anything further if timeout hasn't changed timeout->cancel(); } timeout = intrusive_ptr(new DtxTimeout(secs, *this, xid)); record->setTimeout(timeout); timer->add(timeout); } uint32_t DtxManager::getTimeout(const std::string& xid) { intrusive_ptr timeout = getWork(xid)->getTimeout(); return !timeout ? 0 : timeout->timeout; } void DtxManager::timedout(const std::string& xid) { Mutex::ScopedLock locker(lock); WorkMap::iterator i = work.find(xid); if (i == work.end()) { QPID_LOG(warning, "Transaction timeout failed: no record for xid"); } else { ptr_map_ptr(i)->timedout(); //TODO: do we want to have a timed task to cleanup, or can we rely on an explicit completion? //timer.add(intrusive_ptr(new DtxCleanup(60*30/*30 mins*/, *this, xid))); } } DtxManager::DtxCleanup::DtxCleanup(uint32_t _timeout, DtxManager& _mgr, const std::string& _xid) : TimerTask(qpid::sys::Duration(_timeout * qpid::sys::TIME_SEC),"DtxCleanup"), mgr(_mgr), xid(_xid) {} void DtxManager::DtxCleanup::fire() { try { mgr.remove(xid); } catch (ConnectionException& /*e*/) { //assume it was explicitly cleaned up after a call to prepare, commit or rollback } } void DtxManager::setStore (TransactionalStore* _store) { store = _store; } qpidc-0.16/src/qpid/broker/RecoveryManagerImpl.cpp0000664000076400007640000002216511546316057022601 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/RecoveryManagerImpl.h" #include "qpid/broker/Message.h" #include "qpid/broker/Queue.h" #include "qpid/broker/Link.h" #include "qpid/broker/Bridge.h" #include "qpid/broker/RecoveredEnqueue.h" #include "qpid/broker/RecoveredDequeue.h" #include "qpid/framing/reply_exceptions.h" using boost::dynamic_pointer_cast; using boost::intrusive_ptr; using std::string; namespace qpid { namespace broker { RecoveryManagerImpl::RecoveryManagerImpl(QueueRegistry& _queues, ExchangeRegistry& _exchanges, LinkRegistry& _links, DtxManager& _dtxMgr) : queues(_queues), exchanges(_exchanges), links(_links), dtxMgr(_dtxMgr) {} RecoveryManagerImpl::~RecoveryManagerImpl() {} class RecoverableMessageImpl : public RecoverableMessage { intrusive_ptr msg; public: RecoverableMessageImpl(const intrusive_ptr& _msg); ~RecoverableMessageImpl() {}; void setPersistenceId(uint64_t id); void setRedelivered(); bool loadContent(uint64_t available); void decodeContent(framing::Buffer& buffer); void recover(Queue::shared_ptr queue); void enqueue(DtxBuffer::shared_ptr buffer, Queue::shared_ptr queue); void dequeue(DtxBuffer::shared_ptr buffer, Queue::shared_ptr queue); }; class RecoverableQueueImpl : public RecoverableQueue { Queue::shared_ptr queue; public: RecoverableQueueImpl(const boost::shared_ptr& _queue) : queue(_queue) {} ~RecoverableQueueImpl() {}; void setPersistenceId(uint64_t id); uint64_t getPersistenceId() const; const std::string& getName() const; void setExternalQueueStore(ExternalQueueStore* inst); ExternalQueueStore* getExternalQueueStore() const; void recover(RecoverableMessage::shared_ptr msg); void enqueue(DtxBuffer::shared_ptr buffer, RecoverableMessage::shared_ptr msg); void dequeue(DtxBuffer::shared_ptr buffer, RecoverableMessage::shared_ptr msg); }; class RecoverableExchangeImpl : public RecoverableExchange { Exchange::shared_ptr exchange; QueueRegistry& queues; public: RecoverableExchangeImpl(Exchange::shared_ptr _exchange, QueueRegistry& _queues) : exchange(_exchange), queues(_queues) {} void setPersistenceId(uint64_t id); void bind(const std::string& queue, const std::string& routingKey, qpid::framing::FieldTable& args); }; class RecoverableConfigImpl : public RecoverableConfig { Link::shared_ptr link; Bridge::shared_ptr bridge; public: RecoverableConfigImpl(Link::shared_ptr _link) : link(_link) {} RecoverableConfigImpl(Bridge::shared_ptr _bridge) : bridge(_bridge) {} void setPersistenceId(uint64_t id); }; class RecoverableTransactionImpl : public RecoverableTransaction { DtxBuffer::shared_ptr buffer; public: RecoverableTransactionImpl(DtxBuffer::shared_ptr _buffer) : buffer(_buffer) {} void enqueue(RecoverableQueue::shared_ptr queue, RecoverableMessage::shared_ptr message); void dequeue(RecoverableQueue::shared_ptr queue, RecoverableMessage::shared_ptr message); }; RecoverableExchange::shared_ptr RecoveryManagerImpl::recoverExchange(framing::Buffer& buffer) { Exchange::shared_ptr e = Exchange::decode(exchanges, buffer); if (e) { return RecoverableExchange::shared_ptr(new RecoverableExchangeImpl(e, queues)); } else { return RecoverableExchange::shared_ptr(); } } RecoverableQueue::shared_ptr RecoveryManagerImpl::recoverQueue(framing::Buffer& buffer) { Queue::shared_ptr queue = Queue::restore(queues, buffer); try { Exchange::shared_ptr exchange = exchanges.getDefault(); if (exchange) { exchange->bind(queue, queue->getName(), 0); queue->bound(exchange->getName(), queue->getName(), framing::FieldTable()); } } catch (const framing::NotFoundException& /*e*/) { //assume no default exchange has been declared } return RecoverableQueue::shared_ptr(new RecoverableQueueImpl(queue)); } RecoverableMessage::shared_ptr RecoveryManagerImpl::recoverMessage(framing::Buffer& buffer) { boost::intrusive_ptr message(new Message()); message->decodeHeader(buffer); return RecoverableMessage::shared_ptr(new RecoverableMessageImpl(message)); } RecoverableTransaction::shared_ptr RecoveryManagerImpl::recoverTransaction(const std::string& xid, std::auto_ptr txn) { DtxBuffer::shared_ptr buffer(new DtxBuffer()); dtxMgr.recover(xid, txn, buffer); return RecoverableTransaction::shared_ptr(new RecoverableTransactionImpl(buffer)); } RecoverableConfig::shared_ptr RecoveryManagerImpl::recoverConfig(framing::Buffer& buffer) { string kind; buffer.getShortString (kind); if (kind == "link") return RecoverableConfig::shared_ptr(new RecoverableConfigImpl(Link::decode (links, buffer))); else if (kind == "bridge") return RecoverableConfig::shared_ptr(new RecoverableConfigImpl(Bridge::decode (links, buffer))); return RecoverableConfig::shared_ptr(); // TODO: raise an exception instead } void RecoveryManagerImpl::recoveryComplete() { //notify all queues and exchanges queues.eachQueue(boost::bind(&Queue::recoveryComplete, _1, boost::ref(exchanges))); exchanges.eachExchange(boost::bind(&Exchange::recoveryComplete, _1, boost::ref(exchanges))); } RecoverableMessageImpl:: RecoverableMessageImpl(const intrusive_ptr& _msg) : msg(_msg) { if (!msg->isPersistent()) { msg->forcePersistent(); // set so that message will get dequeued from store. } } bool RecoverableMessageImpl::loadContent(uint64_t /*available*/) { return true; } void RecoverableMessageImpl::decodeContent(framing::Buffer& buffer) { msg->decodeContent(buffer); } void RecoverableMessageImpl::recover(Queue::shared_ptr queue) { queue->recover(msg); } void RecoverableMessageImpl::setPersistenceId(uint64_t id) { msg->setPersistenceId(id); } void RecoverableMessageImpl::setRedelivered() { msg->redeliver(); } void RecoverableQueueImpl::recover(RecoverableMessage::shared_ptr msg) { dynamic_pointer_cast(msg)->recover(queue); } void RecoverableQueueImpl::setPersistenceId(uint64_t id) { queue->setPersistenceId(id); } uint64_t RecoverableQueueImpl::getPersistenceId() const { return queue->getPersistenceId(); } const std::string& RecoverableQueueImpl::getName() const { return queue->getName(); } void RecoverableQueueImpl::setExternalQueueStore(ExternalQueueStore* inst) { queue->setExternalQueueStore(inst); } ExternalQueueStore* RecoverableQueueImpl::getExternalQueueStore() const { return queue->getExternalQueueStore(); } void RecoverableExchangeImpl::setPersistenceId(uint64_t id) { exchange->setPersistenceId(id); } void RecoverableConfigImpl::setPersistenceId(uint64_t id) { if (link.get()) link->setPersistenceId(id); else if (bridge.get()) bridge->setPersistenceId(id); } void RecoverableExchangeImpl::bind(const string& queueName, const string& key, framing::FieldTable& args) { Queue::shared_ptr queue = queues.find(queueName); exchange->bind(queue, key, &args); queue->bound(exchange->getName(), key, args); } void RecoverableMessageImpl::dequeue(DtxBuffer::shared_ptr buffer, Queue::shared_ptr queue) { buffer->enlist(TxOp::shared_ptr(new RecoveredDequeue(queue, msg))); } void RecoverableMessageImpl::enqueue(DtxBuffer::shared_ptr buffer, Queue::shared_ptr queue) { buffer->enlist(TxOp::shared_ptr(new RecoveredEnqueue(queue, msg))); } void RecoverableQueueImpl::dequeue(DtxBuffer::shared_ptr buffer, RecoverableMessage::shared_ptr message) { dynamic_pointer_cast(message)->dequeue(buffer, queue); } void RecoverableQueueImpl::enqueue(DtxBuffer::shared_ptr buffer, RecoverableMessage::shared_ptr message) { dynamic_pointer_cast(message)->enqueue(buffer, queue); } void RecoverableTransactionImpl::dequeue(RecoverableQueue::shared_ptr queue, RecoverableMessage::shared_ptr message) { dynamic_pointer_cast(queue)->dequeue(buffer, message); } void RecoverableTransactionImpl::enqueue(RecoverableQueue::shared_ptr queue, RecoverableMessage::shared_ptr message) { dynamic_pointer_cast(queue)->enqueue(buffer, message); } }} qpidc-0.16/src/qpid/broker/QueuedMessage.h0000664000076400007640000000275411717465066021077 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QueuedMessage_ #define _QueuedMessage_ #include "qpid/broker/Message.h" namespace qpid { namespace broker { class Queue; struct QueuedMessage { boost::intrusive_ptr payload; framing::SequenceNumber position; typedef enum { AVAILABLE, ACQUIRED, DELETED, REMOVED } Status; Status status; Queue* queue; QueuedMessage(Queue* q=0, boost::intrusive_ptr msg=0, framing::SequenceNumber sn=0, Status st=AVAILABLE ) : payload(msg), position(sn), status(st), queue(q) {} }; inline bool operator<(const QueuedMessage& a, const QueuedMessage& b) { return a.position < b.position; } }} #endif qpidc-0.16/src/qpid/broker/RetryList.cpp0000664000076400007640000000312211372266076020621 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/RetryList.h" namespace qpid { namespace broker { RetryList::RetryList() : urlIndex(0), addressIndex(0) {} void RetryList::reset(const std::vector& u) { urls = u; urlIndex = addressIndex = 0;//reset indices } bool RetryList::next(Address& address) { while (urlIndex < urls.size()) { if (addressIndex < urls[urlIndex].size()) { address = urls[urlIndex][addressIndex++]; return true; } urlIndex++; addressIndex = 0; } urlIndex = addressIndex = 0;//reset indices return false; } std::ostream& operator<<(std::ostream& os, const RetryList& l) { for (size_t i = 0; i < l.urls.size(); i++) { os << l.urls[i] << " "; } return os; } }} // namespace qpid::broker qpidc-0.16/src/qpid/broker/Link.h0000664000076400007640000001252211720530342017211 0ustar00jrossjross00000000000000#ifndef _broker_Link_h #define _broker_Link_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/Url.h" #include "qpid/broker/BrokerImportExport.h" #include "qpid/broker/MessageStore.h" #include "qpid/broker/PersistableConfig.h" #include "qpid/broker/Bridge.h" #include "qpid/broker/BrokerImportExport.h" #include "qpid/sys/Mutex.h" #include "qpid/framing/FieldTable.h" #include "qpid/management/Manageable.h" #include "qpid/management/ManagementAgent.h" #include "qmf/org/apache/qpid/broker/Link.h" #include namespace qpid { namespace sys { class TimerTask; } namespace broker { class LinkRegistry; class Broker; class Connection; class Link : public PersistableConfig, public management::Manageable { private: sys::Mutex lock; LinkRegistry* links; MessageStore* store; std::string host; uint16_t port; std::string transport; bool durable; std::string authMechanism; std::string username; std::string password; mutable uint64_t persistenceId; qmf::org::apache::qpid::broker::Link* mgmtObject; Broker* broker; int state; uint32_t visitCount; uint32_t currentInterval; bool closing; Url url; // URL can contain many addresses. size_t reconnectNext; // Index for next re-connect attempt typedef std::vector Bridges; Bridges created; // Bridges pending creation Bridges active; // Bridges active Bridges cancellations; // Bridges pending cancellation uint channelCounter; Connection* connection; management::ManagementAgent* agent; boost::intrusive_ptr timerTask; static const int STATE_WAITING = 1; static const int STATE_CONNECTING = 2; static const int STATE_OPERATIONAL = 3; static const int STATE_FAILED = 4; static const int STATE_CLOSED = 5; static const int STATE_PASSIVE = 6; static const uint32_t MAX_INTERVAL = 32; void setStateLH (int newState); void startConnectionLH(); // Start the IO Connection void destroy(); // Called when mgmt deletes this link void ioThreadProcessing(); // Called on connection's IO thread by request bool tryFailoverLH(); // Called during maintenance visit bool hideManagement() const; void established(Connection*); // Called when connection is create void opened(); // Called when connection is open (after create) void closed(int, std::string); // Called when connection goes away void reconnectLH(const Address&); //called by LinkRegistry friend class LinkRegistry; // to call established, opened, closed public: typedef boost::shared_ptr shared_ptr; Link(LinkRegistry* links, MessageStore* store, const std::string& host, uint16_t port, const std::string& transport, bool durable, const std::string& authMechanism, const std::string& username, const std::string& password, Broker* broker, management::Manageable* parent = 0); virtual ~Link(); std::string getHost() { return host; } uint16_t getPort() { return port; } std::string getTransport() { return transport; } bool isDurable() { return durable; } void maintenanceVisit (); uint nextChannel(); void add(Bridge::shared_ptr); void cancel(Bridge::shared_ptr); QPID_BROKER_EXTERN void setUrl(const Url&); // Set URL for reconnection. QPID_BROKER_EXTERN void close(); // Close the link from within the broker. std::string getAuthMechanism() { return authMechanism; } std::string getUsername() { return username; } std::string getPassword() { return password; } Broker* getBroker() { return broker; } void notifyConnectionForced(const std::string text); void setPassive(bool p); // PersistableConfig: void setPersistenceId(uint64_t id) const; uint64_t getPersistenceId() const { return persistenceId; } uint32_t encodedSize() const; void encode(framing::Buffer& buffer) const; const std::string& getName() const; static Link::shared_ptr decode(LinkRegistry& links, framing::Buffer& buffer); // Manageable entry points management::ManagementObject* GetManagementObject(void) const; management::Manageable::status_t ManagementMethod(uint32_t, management::Args&, std::string&); }; } } #endif /*!_broker_Link.cpp_h*/ qpidc-0.16/src/qpid/StringUtils.h0000664000076400007640000000265511156273306017334 0ustar00jrossjross00000000000000#ifndef QPID_STRINGUTILS_H #define QPID_STRINGUTILS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" #include #include namespace qpid { /** * Split 'in' into words using delimiters in 'delims' and put * resulting strings into 'out' vector. */ QPID_COMMON_EXTERN void split(std::vector& out, const std::string& in, const std::string& delims); /** * Split 'in' into words using delimiters in 'delims' and return the * resulting strings in a vector. */ QPID_COMMON_EXTERN std::vector split(const std::string& in, const std::string& delims); } // namespace qpid #endif /*!QPID_STRINGUTILS_H*/ qpidc-0.16/src/qpid/framing/0000775000076400007640000000000011752725715016317 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/framing/ConnectionSecureOkBody.h0000664000076400007640000000610011752725676023051 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONSECUREOKBODY_H #define QPID_FRAMING_CONNECTIONSECUREOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionSecureOkBody : public AMQMethodBody { std::string response; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0x4; ConnectionSecureOkBody( ProtocolVersion, const std::string& _response) : response(_response), flags(0){ flags |= (1 << 8); } ConnectionSecureOkBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setResponse(const std::string& _response); QPID_COMMON_EXTERN const std::string& getResponse() const; QPID_COMMON_EXTERN bool hasResponse() const; QPID_COMMON_EXTERN void clearResponseFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.secureOk(getResponse()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionSecureOkBody */ }} #endif /*!QPID_FRAMING_CONNECTIONSECUREOKBODY_H*/ qpidc-0.16/src/qpid/framing/FileStageBody.cpp0000664000076400007640000000336711752725676021523 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileStageBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileStageBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void FileStageBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileStageBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void FileStageBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileStageBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t FileStageBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileStageBody::print(std::ostream& out) const { out << "{FileStageBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/AllInvoker.h0000664000076400007640000005373311752725674020555 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_ALLINVOKER_H #define QPID_FRAMING_ALLINVOKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQP_AllOperations.h" #include "qpid/framing/Invoker.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::Invoker: public qpid::framing::Invoker { AMQP_AllOperations& target; public: Invoker(AMQP_AllOperations& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ConnectionStartBody& body); QPID_COMMON_EXTERN void visit(const ConnectionStartOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionSecureBody& body); QPID_COMMON_EXTERN void visit(const ConnectionSecureOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionTuneBody& body); QPID_COMMON_EXTERN void visit(const ConnectionTuneOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionOpenBody& body); QPID_COMMON_EXTERN void visit(const ConnectionOpenOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionRedirectBody& body); QPID_COMMON_EXTERN void visit(const ConnectionHeartbeatBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseOkBody& body); QPID_COMMON_EXTERN void visit(const SessionAttachBody& body); QPID_COMMON_EXTERN void visit(const SessionAttachedBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachedBody& body); QPID_COMMON_EXTERN void visit(const SessionRequestTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionCommandPointBody& body); QPID_COMMON_EXTERN void visit(const SessionExpectedBody& body); QPID_COMMON_EXTERN void visit(const SessionConfirmedBody& body); QPID_COMMON_EXTERN void visit(const SessionCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionKnownCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionFlushBody& body); QPID_COMMON_EXTERN void visit(const SessionGapBody& body); QPID_COMMON_EXTERN void visit(const ExecutionSyncBody& body); QPID_COMMON_EXTERN void visit(const ExecutionResultBody& body); QPID_COMMON_EXTERN void visit(const ExecutionExceptionBody& body); QPID_COMMON_EXTERN void visit(const MessageAcceptBody& body); QPID_COMMON_EXTERN void visit(const MessageRejectBody& body); QPID_COMMON_EXTERN void visit(const MessageReleaseBody& body); QPID_COMMON_EXTERN void visit(const MessageAcquireBody& body); QPID_COMMON_EXTERN void visit(const MessageResumeBody& body); QPID_COMMON_EXTERN void visit(const MessageSubscribeBody& body); QPID_COMMON_EXTERN void visit(const MessageCancelBody& body); QPID_COMMON_EXTERN void visit(const MessageSetFlowModeBody& body); QPID_COMMON_EXTERN void visit(const MessageFlowBody& body); QPID_COMMON_EXTERN void visit(const MessageFlushBody& body); QPID_COMMON_EXTERN void visit(const MessageStopBody& body); QPID_COMMON_EXTERN void visit(const TxSelectBody& body); QPID_COMMON_EXTERN void visit(const TxCommitBody& body); QPID_COMMON_EXTERN void visit(const TxRollbackBody& body); QPID_COMMON_EXTERN void visit(const DtxSelectBody& body); QPID_COMMON_EXTERN void visit(const DtxStartBody& body); QPID_COMMON_EXTERN void visit(const DtxEndBody& body); QPID_COMMON_EXTERN void visit(const DtxCommitBody& body); QPID_COMMON_EXTERN void visit(const DtxForgetBody& body); QPID_COMMON_EXTERN void visit(const DtxGetTimeoutBody& body); QPID_COMMON_EXTERN void visit(const DtxPrepareBody& body); QPID_COMMON_EXTERN void visit(const DtxRecoverBody& body); QPID_COMMON_EXTERN void visit(const DtxRollbackBody& body); QPID_COMMON_EXTERN void visit(const DtxSetTimeoutBody& body); QPID_COMMON_EXTERN void visit(const ExchangeDeclareBody& body); QPID_COMMON_EXTERN void visit(const ExchangeDeleteBody& body); QPID_COMMON_EXTERN void visit(const ExchangeQueryBody& body); QPID_COMMON_EXTERN void visit(const ExchangeBindBody& body); QPID_COMMON_EXTERN void visit(const ExchangeUnbindBody& body); QPID_COMMON_EXTERN void visit(const ExchangeBoundBody& body); QPID_COMMON_EXTERN void visit(const QueueDeclareBody& body); QPID_COMMON_EXTERN void visit(const QueueDeleteBody& body); QPID_COMMON_EXTERN void visit(const QueuePurgeBody& body); QPID_COMMON_EXTERN void visit(const QueueQueryBody& body); QPID_COMMON_EXTERN void visit(const FileQosBody& body); QPID_COMMON_EXTERN void visit(const FileQosOkBody& body); QPID_COMMON_EXTERN void visit(const FileConsumeBody& body); QPID_COMMON_EXTERN void visit(const FileConsumeOkBody& body); QPID_COMMON_EXTERN void visit(const FileCancelBody& body); QPID_COMMON_EXTERN void visit(const FileOpenBody& body); QPID_COMMON_EXTERN void visit(const FileOpenOkBody& body); QPID_COMMON_EXTERN void visit(const FilePublishBody& body); QPID_COMMON_EXTERN void visit(const FileDeliverBody& body); QPID_COMMON_EXTERN void visit(const FileAckBody& body); QPID_COMMON_EXTERN void visit(const FileRejectBody& body); QPID_COMMON_EXTERN void visit(const StreamQosBody& body); QPID_COMMON_EXTERN void visit(const StreamQosOkBody& body); QPID_COMMON_EXTERN void visit(const StreamConsumeBody& body); QPID_COMMON_EXTERN void visit(const StreamConsumeOkBody& body); QPID_COMMON_EXTERN void visit(const StreamCancelBody& body); QPID_COMMON_EXTERN void visit(const ClusterUpdateRequestBody& body); QPID_COMMON_EXTERN void visit(const ClusterUpdateOfferBody& body); QPID_COMMON_EXTERN void visit(const ClusterRetractOfferBody& body); QPID_COMMON_EXTERN void visit(const ClusterInitialStatusBody& body); QPID_COMMON_EXTERN void visit(const ClusterReadyBody& body); QPID_COMMON_EXTERN void visit(const ClusterConfigChangeBody& body); QPID_COMMON_EXTERN void visit(const ClusterErrorCheckBody& body); QPID_COMMON_EXTERN void visit(const ClusterTimerWakeupBody& body); QPID_COMMON_EXTERN void visit(const ClusterTimerDropBody& body); QPID_COMMON_EXTERN void visit(const ClusterShutdownBody& body); QPID_COMMON_EXTERN void visit(const ClusterDeliverToQueueBody& body); QPID_COMMON_EXTERN void visit(const ClusterClockBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionAnnounceBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDeliverCloseBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDeliverDoOutputBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionAbortBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionShadowSetUserBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionShadowPrepareBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionConsumerStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDeliveryRecordBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxStartBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxAcceptBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxDequeueBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxEnqueueBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxPublishBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxEndBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionAccumulatedAckBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionOutputTaskBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxStartBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxEndBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxAckBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxBufferRefBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxWorkRecordBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionSessionStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionShadowReadyBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionMembershipBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionRetractOfferBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionQueuePositionBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionExchangeBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionAddQueueListenerBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionManagementSetupStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionConfigBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionQueueFairshareStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionQueueObserverStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionClockBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionQueueDequeueSincePurgeStateBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::ConnectionHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::ConnectionHandler& target; public: Invoker(AMQP_AllOperations::ConnectionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ConnectionStartBody& body); QPID_COMMON_EXTERN void visit(const ConnectionStartOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionSecureBody& body); QPID_COMMON_EXTERN void visit(const ConnectionSecureOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionTuneBody& body); QPID_COMMON_EXTERN void visit(const ConnectionTuneOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionOpenBody& body); QPID_COMMON_EXTERN void visit(const ConnectionOpenOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionRedirectBody& body); QPID_COMMON_EXTERN void visit(const ConnectionHeartbeatBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseOkBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::SessionHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::SessionHandler& target; public: Invoker(AMQP_AllOperations::SessionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const SessionAttachBody& body); QPID_COMMON_EXTERN void visit(const SessionAttachedBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachedBody& body); QPID_COMMON_EXTERN void visit(const SessionRequestTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionCommandPointBody& body); QPID_COMMON_EXTERN void visit(const SessionExpectedBody& body); QPID_COMMON_EXTERN void visit(const SessionConfirmedBody& body); QPID_COMMON_EXTERN void visit(const SessionCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionKnownCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionFlushBody& body); QPID_COMMON_EXTERN void visit(const SessionGapBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::ExecutionHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::ExecutionHandler& target; public: Invoker(AMQP_AllOperations::ExecutionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ExecutionSyncBody& body); QPID_COMMON_EXTERN void visit(const ExecutionResultBody& body); QPID_COMMON_EXTERN void visit(const ExecutionExceptionBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::MessageHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::MessageHandler& target; public: Invoker(AMQP_AllOperations::MessageHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const MessageAcceptBody& body); QPID_COMMON_EXTERN void visit(const MessageRejectBody& body); QPID_COMMON_EXTERN void visit(const MessageReleaseBody& body); QPID_COMMON_EXTERN void visit(const MessageAcquireBody& body); QPID_COMMON_EXTERN void visit(const MessageResumeBody& body); QPID_COMMON_EXTERN void visit(const MessageSubscribeBody& body); QPID_COMMON_EXTERN void visit(const MessageCancelBody& body); QPID_COMMON_EXTERN void visit(const MessageSetFlowModeBody& body); QPID_COMMON_EXTERN void visit(const MessageFlowBody& body); QPID_COMMON_EXTERN void visit(const MessageFlushBody& body); QPID_COMMON_EXTERN void visit(const MessageStopBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::TxHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::TxHandler& target; public: Invoker(AMQP_AllOperations::TxHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const TxSelectBody& body); QPID_COMMON_EXTERN void visit(const TxCommitBody& body); QPID_COMMON_EXTERN void visit(const TxRollbackBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::DtxHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::DtxHandler& target; public: Invoker(AMQP_AllOperations::DtxHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const DtxSelectBody& body); QPID_COMMON_EXTERN void visit(const DtxStartBody& body); QPID_COMMON_EXTERN void visit(const DtxEndBody& body); QPID_COMMON_EXTERN void visit(const DtxCommitBody& body); QPID_COMMON_EXTERN void visit(const DtxForgetBody& body); QPID_COMMON_EXTERN void visit(const DtxGetTimeoutBody& body); QPID_COMMON_EXTERN void visit(const DtxPrepareBody& body); QPID_COMMON_EXTERN void visit(const DtxRecoverBody& body); QPID_COMMON_EXTERN void visit(const DtxRollbackBody& body); QPID_COMMON_EXTERN void visit(const DtxSetTimeoutBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::ExchangeHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::ExchangeHandler& target; public: Invoker(AMQP_AllOperations::ExchangeHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ExchangeDeclareBody& body); QPID_COMMON_EXTERN void visit(const ExchangeDeleteBody& body); QPID_COMMON_EXTERN void visit(const ExchangeQueryBody& body); QPID_COMMON_EXTERN void visit(const ExchangeBindBody& body); QPID_COMMON_EXTERN void visit(const ExchangeUnbindBody& body); QPID_COMMON_EXTERN void visit(const ExchangeBoundBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::QueueHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::QueueHandler& target; public: Invoker(AMQP_AllOperations::QueueHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const QueueDeclareBody& body); QPID_COMMON_EXTERN void visit(const QueueDeleteBody& body); QPID_COMMON_EXTERN void visit(const QueuePurgeBody& body); QPID_COMMON_EXTERN void visit(const QueueQueryBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::FileHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::FileHandler& target; public: Invoker(AMQP_AllOperations::FileHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const FileQosBody& body); QPID_COMMON_EXTERN void visit(const FileQosOkBody& body); QPID_COMMON_EXTERN void visit(const FileConsumeBody& body); QPID_COMMON_EXTERN void visit(const FileConsumeOkBody& body); QPID_COMMON_EXTERN void visit(const FileCancelBody& body); QPID_COMMON_EXTERN void visit(const FileOpenBody& body); QPID_COMMON_EXTERN void visit(const FileOpenOkBody& body); QPID_COMMON_EXTERN void visit(const FilePublishBody& body); QPID_COMMON_EXTERN void visit(const FileDeliverBody& body); QPID_COMMON_EXTERN void visit(const FileAckBody& body); QPID_COMMON_EXTERN void visit(const FileRejectBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::StreamHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::StreamHandler& target; public: Invoker(AMQP_AllOperations::StreamHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const StreamQosBody& body); QPID_COMMON_EXTERN void visit(const StreamQosOkBody& body); QPID_COMMON_EXTERN void visit(const StreamConsumeBody& body); QPID_COMMON_EXTERN void visit(const StreamConsumeOkBody& body); QPID_COMMON_EXTERN void visit(const StreamCancelBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::ClusterHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::ClusterHandler& target; public: Invoker(AMQP_AllOperations::ClusterHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ClusterUpdateRequestBody& body); QPID_COMMON_EXTERN void visit(const ClusterUpdateOfferBody& body); QPID_COMMON_EXTERN void visit(const ClusterRetractOfferBody& body); QPID_COMMON_EXTERN void visit(const ClusterInitialStatusBody& body); QPID_COMMON_EXTERN void visit(const ClusterReadyBody& body); QPID_COMMON_EXTERN void visit(const ClusterConfigChangeBody& body); QPID_COMMON_EXTERN void visit(const ClusterErrorCheckBody& body); QPID_COMMON_EXTERN void visit(const ClusterTimerWakeupBody& body); QPID_COMMON_EXTERN void visit(const ClusterTimerDropBody& body); QPID_COMMON_EXTERN void visit(const ClusterShutdownBody& body); QPID_COMMON_EXTERN void visit(const ClusterDeliverToQueueBody& body); QPID_COMMON_EXTERN void visit(const ClusterClockBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_AllOperations::ClusterConnectionHandler::Invoker: public qpid::framing::Invoker { AMQP_AllOperations::ClusterConnectionHandler& target; public: Invoker(AMQP_AllOperations::ClusterConnectionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ClusterConnectionAnnounceBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDeliverCloseBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDeliverDoOutputBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionAbortBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionShadowSetUserBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionShadowPrepareBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionConsumerStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDeliveryRecordBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxStartBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxAcceptBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxDequeueBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxEnqueueBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxPublishBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionTxEndBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionAccumulatedAckBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionOutputTaskBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxStartBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxEndBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxAckBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxBufferRefBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionDtxWorkRecordBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionSessionStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionShadowReadyBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionMembershipBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionRetractOfferBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionQueuePositionBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionExchangeBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionAddQueueListenerBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionManagementSetupStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionConfigBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionQueueFairshareStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionQueueObserverStateBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionClockBody& body); QPID_COMMON_EXTERN void visit(const ClusterConnectionQueueDequeueSincePurgeStateBody& body); }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_ALLINVOKER_H*/ qpidc-0.16/src/qpid/framing/Handler.h0000664000076400007640000000613011200322713020020 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_HANDLER_H #define QPID_FRAMING_HANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include namespace qpid { namespace framing { template struct Handler { typedef T HandledType; typedef void handleFptr(T); typedef void result_type; // Compatible with std/boost functors. Handler(Handler* next_=0) : next(next_) {} virtual ~Handler() {} virtual void handle(T) = 0; /** Allow functor syntax for calling handle */ void operator()(T t) { handle(t); } /** Pointer to next handler in a linked list. */ Handler* next; /** Adapt any void(T) functor as a Handler. * Functor(f) will copy f. * Functor(f) will only take a reference to x. */ template class Functor : public Handler { public: Functor(F f, Handler* next=0) : Handler(next), functor(f) {} void handle(T t) { functor(t); } private: F functor; }; /** Adapt a member function of X as a Handler. * Only holds a reference to its target, not a copy. */ template class MemFunRef : public Handler { public: MemFunRef(X& x, Handler* next=0) : Handler(next), target(&x) {} void handle(T t) { (target->*F)(t); } /** Allow calling with -> syntax */ MemFunRef* operator->() { return this; } private: X* target; }; /** Interface for a handler that implements a * pair of in/out handle operations. * @see InOutHandler */ class InOutHandlerInterface { public: virtual ~InOutHandlerInterface() {} virtual void handleIn(T) = 0; virtual void handleOut(T) = 0; }; /** Support for implementing an in-out handler pair as a single class. * Overrides handleIn, handleOut functions in a single class. */ struct InOutHandler : protected InOutHandlerInterface { InOutHandler(Handler* nextIn=0, Handler* nextOut=0) : in(*this, nextIn), out(*this, nextOut) {} MemFunRef in; MemFunRef out; }; }; }} #endif /*!QPID_FRAMING_HANDLER_H*/ // qpidc-0.16/src/qpid/framing/ExecutionExceptionBody.cpp0000664000076400007640000001442711752725676023501 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExecutionExceptionBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExecutionExceptionBody::setErrorCode(uint16_t _errorCode) { errorCode = _errorCode; flags |= (1 << 8); } uint16_t ExecutionExceptionBody::getErrorCode() const { return errorCode; } bool ExecutionExceptionBody::hasErrorCode() const { return flags & (1 << 8); } void ExecutionExceptionBody::clearErrorCodeFlag() { flags &= ~(1 << 8); } void ExecutionExceptionBody::setCommandId(const SequenceNumber& _commandId) { commandId = _commandId; flags |= (1 << 9); } SequenceNumber ExecutionExceptionBody::getCommandId() const { return commandId; } bool ExecutionExceptionBody::hasCommandId() const { return flags & (1 << 9); } void ExecutionExceptionBody::clearCommandIdFlag() { flags &= ~(1 << 9); } void ExecutionExceptionBody::setClassCode(uint8_t _classCode) { classCode = _classCode; flags |= (1 << 10); } uint8_t ExecutionExceptionBody::getClassCode() const { return classCode; } bool ExecutionExceptionBody::hasClassCode() const { return flags & (1 << 10); } void ExecutionExceptionBody::clearClassCodeFlag() { flags &= ~(1 << 10); } void ExecutionExceptionBody::setCommandCode(uint8_t _commandCode) { commandCode = _commandCode; flags |= (1 << 11); } uint8_t ExecutionExceptionBody::getCommandCode() const { return commandCode; } bool ExecutionExceptionBody::hasCommandCode() const { return flags & (1 << 11); } void ExecutionExceptionBody::clearCommandCodeFlag() { flags &= ~(1 << 11); } void ExecutionExceptionBody::setFieldIndex(uint8_t _fieldIndex) { fieldIndex = _fieldIndex; flags |= (1 << 12); } uint8_t ExecutionExceptionBody::getFieldIndex() const { return fieldIndex; } bool ExecutionExceptionBody::hasFieldIndex() const { return flags & (1 << 12); } void ExecutionExceptionBody::clearFieldIndexFlag() { flags &= ~(1 << 12); } void ExecutionExceptionBody::setDescription(const std::string& _description) { description = _description; flags |= (1 << 13); } const std::string& ExecutionExceptionBody::getDescription() const { return description; } bool ExecutionExceptionBody::hasDescription() const { return flags & (1 << 13); } void ExecutionExceptionBody::clearDescriptionFlag() { flags &= ~(1 << 13); } void ExecutionExceptionBody::setErrorInfo(const FieldTable& _errorInfo) { errorInfo = _errorInfo; flags |= (1 << 14); } const FieldTable& ExecutionExceptionBody::getErrorInfo() const { return errorInfo; } FieldTable& ExecutionExceptionBody::getErrorInfo() { flags |= (1 << 14); return errorInfo; } bool ExecutionExceptionBody::hasErrorInfo() const { return flags & (1 << 14); } void ExecutionExceptionBody::clearErrorInfoFlag() { flags &= ~(1 << 14); } void ExecutionExceptionBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShort(errorCode); if (flags & (1 << 9)) commandId.encode(buffer); if (flags & (1 << 10)) buffer.putOctet(classCode); if (flags & (1 << 11)) buffer.putOctet(commandCode); if (flags & (1 << 12)) buffer.putOctet(fieldIndex); if (flags & (1 << 13)) buffer.putMediumString(description); if (flags & (1 << 14)) errorInfo.encode(buffer); } void ExecutionExceptionBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ExecutionExceptionBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) errorCode = buffer.getShort(); if (flags & (1 << 9)) commandId.decode(buffer); if (flags & (1 << 10)) classCode = buffer.getOctet(); if (flags & (1 << 11)) commandCode = buffer.getOctet(); if (flags & (1 << 12)) fieldIndex = buffer.getOctet(); if (flags & (1 << 13)) buffer.getMediumString(description); if (flags & (1 << 14)) errorInfo.decode(buffer); } void ExecutionExceptionBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ExecutionExceptionBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2;//errorCode if (flags & (1 << 9)) total += commandId.encodedSize(); if (flags & (1 << 10)) total += 1;//classCode if (flags & (1 << 11)) total += 1;//commandCode if (flags & (1 << 12)) total += 1;//fieldIndex if (flags & (1 << 13)) total += 2 + description.size(); if (flags & (1 << 14)) total += errorInfo.encodedSize(); return total; } uint32_t ExecutionExceptionBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ExecutionExceptionBody::print(std::ostream& out) const { out << "{ExecutionExceptionBody: "; if (flags & (1 << 8)) out << "error-code=" << errorCode << "; "; if (flags & (1 << 9)) out << "command-id=" << commandId << "; "; if (flags & (1 << 10)) out << "class-code=" << (int) classCode << "; "; if (flags & (1 << 11)) out << "command-code=" << (int) commandCode << "; "; if (flags & (1 << 12)) out << "field-index=" << (int) fieldIndex << "; "; if (flags & (1 << 13)) out << "description=" << description << "; "; if (flags & (1 << 14)) out << "error-info=" << errorInfo << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/FileConsumeOkBody.h0000664000076400007640000000604211752725676022021 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILECONSUMEOKBODY_H #define QPID_FRAMING_FILECONSUMEOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileConsumeOkBody : public ModelMethod { std::string consumerTag; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0x4; FileConsumeOkBody( ProtocolVersion, const std::string& _consumerTag) : consumerTag(_consumerTag), flags(0){ flags |= (1 << 8); } FileConsumeOkBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setConsumerTag(const std::string& _consumerTag); QPID_COMMON_EXTERN const std::string& getConsumerTag() const; QPID_COMMON_EXTERN bool hasConsumerTag() const; QPID_COMMON_EXTERN void clearConsumerTagFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.consumeOk(getConsumerTag()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileConsumeOkBody */ }} #endif /*!QPID_FRAMING_FILECONSUMEOKBODY_H*/ qpidc-0.16/src/qpid/framing/SendContent.cpp0000664000076400007640000000511011374207227021235 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/SendContent.h" qpid::framing::SendContent::SendContent(FrameHandler& h, uint16_t mfs, uint efc) : handler(h), maxFrameSize(mfs), expectedFrameCount(efc), frameCount(0) {} void qpid::framing::SendContent::operator()(const AMQFrame& f) { bool first = frameCount == 0; bool last = ++frameCount == expectedFrameCount; uint16_t maxContentSize = maxFrameSize - AMQFrame::frameOverhead(); const AMQContentBody* body(f.castBody()); if (body->encodedSize() > maxContentSize) { uint32_t offset = 0; for (int chunk = body->encodedSize() / maxContentSize; chunk > 0; chunk--) { sendFragment(*body, offset, maxContentSize, first && offset == 0, last && offset + maxContentSize == body->encodedSize()); offset += maxContentSize; } uint32_t remainder = body->encodedSize() % maxContentSize; if (remainder) { sendFragment(*body, offset, remainder, first && offset == 0, last); } } else { AMQFrame copy(f); setFlags(copy, first, last); handler.handle(copy); } } void qpid::framing::SendContent::sendFragment(const AMQContentBody& body, uint32_t offset, uint16_t size, bool first, bool last) const { AMQFrame fragment((AMQContentBody(body.getData().substr(offset, size)))); setFlags(fragment, first, last); handler.handle(fragment); } void qpid::framing::SendContent::setFlags(AMQFrame& f, bool first, bool last) const { f.setBof(false); f.setBos(first); f.setEof(true);//content is always the last segment f.setEos(last); } qpidc-0.16/src/qpid/framing/MessageResumeResult.cpp0000664000076400007640000000526611752725676023006 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageResumeResult.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageResumeResult::setOffset(uint64_t _offset) { offset = _offset; flags |= (1 << 8); } uint64_t MessageResumeResult::getOffset() const { return offset; } bool MessageResumeResult::hasOffset() const { return flags & (1 << 8); } void MessageResumeResult::clearOffsetFlag() { flags &= ~(1 << 8); } void MessageResumeResult::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(offset); } void MessageResumeResult::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void MessageResumeResult::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) offset = buffer.getLongLong(); } void MessageResumeResult::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t MessageResumeResult::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 8;//offset return total; } uint32_t MessageResumeResult::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void MessageResumeResult::print(std::ostream& out) const { out << "{MessageResumeResult: "; if (flags & (1 << 8)) out << "offset=" << offset << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const MessageResumeResult& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/ClusterConnectionDtxAckBody.h0000664000076400007640000000521711752725676024061 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONDTXACKBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONDTXACKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionDtxAckBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x1C; ClusterConnectionDtxAckBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.dtxAck(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionDtxAckBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONDTXACKBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionQueueFairshareStateBody.h0000664000076400007640000000744111752725676026616 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONQUEUEFAIRSHARESTATEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONQUEUEFAIRSHARESTATEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionQueueFairshareStateBody : public ModelMethod { std::string queue; uint8_t position; uint8_t count; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x38; ClusterConnectionQueueFairshareStateBody( ProtocolVersion, const std::string& _queue, uint8_t _position, uint8_t _count) : queue(_queue), position(_position), count(_count), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } ClusterConnectionQueueFairshareStateBody(ProtocolVersion=ProtocolVersion()) : position(0), count(0), flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setPosition(uint8_t _position); QPID_COMMON_EXTERN uint8_t getPosition() const; QPID_COMMON_EXTERN bool hasPosition() const; QPID_COMMON_EXTERN void clearPositionFlag(); QPID_COMMON_EXTERN void setCount(uint8_t _count); QPID_COMMON_EXTERN uint8_t getCount() const; QPID_COMMON_EXTERN bool hasCount() const; QPID_COMMON_EXTERN void clearCountFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.queueFairshareState(getQueue(), getPosition(), getCount()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionQueueFairshareStateBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONQUEUEFAIRSHARESTATEBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionDeliverDoOutputBody.cpp0000664000076400007640000000505011752725676026327 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionDeliverDoOutputBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionDeliverDoOutputBody::setLimit(uint32_t _limit) { limit = _limit; flags |= (1 << 8); } uint32_t ClusterConnectionDeliverDoOutputBody::getLimit() const { return limit; } bool ClusterConnectionDeliverDoOutputBody::hasLimit() const { return flags & (1 << 8); } void ClusterConnectionDeliverDoOutputBody::clearLimitFlag() { flags &= ~(1 << 8); } void ClusterConnectionDeliverDoOutputBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLong(limit); } void ClusterConnectionDeliverDoOutputBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionDeliverDoOutputBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) limit = buffer.getLong(); } void ClusterConnectionDeliverDoOutputBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionDeliverDoOutputBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 4;//limit return total; } uint32_t ClusterConnectionDeliverDoOutputBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionDeliverDoOutputBody::print(std::ostream& out) const { out << "{ClusterConnectionDeliverDoOutputBody: "; if (flags & (1 << 8)) out << "limit=" << limit << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/FrameSet.cpp0000664000076400007640000000576111732672260020534 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/FrameSet.h" #include "qpid/framing/all_method_bodies.h" #include "qpid/framing/frame_functors.h" #include "qpid/framing/MessageProperties.h" #include "qpid/framing/TypeFilter.h" using namespace qpid::framing; FrameSet::FrameSet(const SequenceNumber& _id) : id(_id),contentSize(0),recalculateSize(true) { } FrameSet::FrameSet(const FrameSet& original) : id(original.id), contentSize(0), recalculateSize(true) { for (Frames::const_iterator i = original.begin(); i != original.end(); ++i) { parts.push_back(AMQFrame(*(i->getBody()))); parts.back().setFirstSegment(i->isFirstSegment()); parts.back().setLastSegment(i->isLastSegment()); parts.back().setFirstFrame(i->isFirstFrame()); parts.back().setLastFrame(i->isLastFrame()); } } void FrameSet::append(const AMQFrame& part) { parts.push_back(part); recalculateSize = true; } bool FrameSet::isComplete() const { return !parts.empty() && parts.back().getEof() && parts.back().getEos(); } bool FrameSet::isContentBearing() const { const AMQMethodBody* method = getMethod(); return method && method->isContentBearing(); } const AMQMethodBody* FrameSet::getMethod() const { return parts.empty() ? 0 : parts[0].getMethod(); } AMQMethodBody* FrameSet::getMethod() { return parts.empty() ? 0 : parts[0].getMethod(); } const AMQHeaderBody* FrameSet::getHeaders() const { return parts.size() < 2 ? 0 : parts[1].castBody(); } AMQHeaderBody* FrameSet::getHeaders() { return parts.size() < 2 ? 0 : parts[1].castBody(); } uint64_t FrameSet::getContentSize() const { if (recalculateSize) { SumBodySize sum; map_if(sum, TypeFilter()); contentSize = sum.getSize(); recalculateSize = false; } return contentSize; } void FrameSet::getContent(std::string& out) const { out.clear(); out.reserve(getContentSize()); for(Frames::const_iterator i = parts.begin(); i != parts.end(); i++) { if (i->getBody()->type() == CONTENT_BODY) out += i->castBody()->getData(); } } std::string FrameSet::getContent() const { std::string out; getContent(out); return out; } qpidc-0.16/src/qpid/framing/QueueQueryBody.cpp0000664000076400007640000000446111752725676021766 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/QueueQueryBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void QueueQueryBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& QueueQueryBody::getQueue() const { return queue; } bool QueueQueryBody::hasQueue() const { return flags & (1 << 8); } void QueueQueryBody::clearQueueFlag() { flags &= ~(1 << 8); } void QueueQueryBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); } void QueueQueryBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void QueueQueryBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); } void QueueQueryBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t QueueQueryBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); return total; } uint32_t QueueQueryBody::encodedSize() const { uint32_t total = bodySize(); return total; } void QueueQueryBody::print(std::ostream& out) const { out << "{QueueQueryBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/QueueQueryResult.cpp0000664000076400007640000001423011752725676022342 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/QueueQueryResult.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void QueueQueryResult::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& QueueQueryResult::getQueue() const { return queue; } bool QueueQueryResult::hasQueue() const { return flags & (1 << 8); } void QueueQueryResult::clearQueueFlag() { flags &= ~(1 << 8); } void QueueQueryResult::setAlternateExchange(const std::string& _alternateExchange) { alternateExchange = _alternateExchange; flags |= (1 << 9); } const std::string& QueueQueryResult::getAlternateExchange() const { return alternateExchange; } bool QueueQueryResult::hasAlternateExchange() const { return flags & (1 << 9); } void QueueQueryResult::clearAlternateExchangeFlag() { flags &= ~(1 << 9); } void QueueQueryResult::setDurable(bool _durable) { if (_durable) flags |= (1 << 10); else flags &= ~(1 << 10); } bool QueueQueryResult::getDurable() const { return flags & (1 << 10); } void QueueQueryResult::setExclusive(bool _exclusive) { if (_exclusive) flags |= (1 << 11); else flags &= ~(1 << 11); } bool QueueQueryResult::getExclusive() const { return flags & (1 << 11); } void QueueQueryResult::setAutoDelete(bool _autoDelete) { if (_autoDelete) flags |= (1 << 12); else flags &= ~(1 << 12); } bool QueueQueryResult::getAutoDelete() const { return flags & (1 << 12); } void QueueQueryResult::setArguments(const FieldTable& _arguments) { arguments = _arguments; flags |= (1 << 13); } const FieldTable& QueueQueryResult::getArguments() const { return arguments; } FieldTable& QueueQueryResult::getArguments() { flags |= (1 << 13); return arguments; } bool QueueQueryResult::hasArguments() const { return flags & (1 << 13); } void QueueQueryResult::clearArgumentsFlag() { flags &= ~(1 << 13); } void QueueQueryResult::setMessageCount(uint32_t _messageCount) { messageCount = _messageCount; flags |= (1 << 14); } uint32_t QueueQueryResult::getMessageCount() const { return messageCount; } bool QueueQueryResult::hasMessageCount() const { return flags & (1 << 14); } void QueueQueryResult::clearMessageCountFlag() { flags &= ~(1 << 14); } void QueueQueryResult::setSubscriberCount(uint32_t _subscriberCount) { subscriberCount = _subscriberCount; flags |= (1 << 15); } uint32_t QueueQueryResult::getSubscriberCount() const { return subscriberCount; } bool QueueQueryResult::hasSubscriberCount() const { return flags & (1 << 15); } void QueueQueryResult::clearSubscriberCountFlag() { flags &= ~(1 << 15); } void QueueQueryResult::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putShortString(alternateExchange); if (flags & (1 << 13)) arguments.encode(buffer); if (flags & (1 << 14)) buffer.putLong(messageCount); if (flags & (1 << 15)) buffer.putLong(subscriberCount); } void QueueQueryResult::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void QueueQueryResult::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) buffer.getShortString(alternateExchange); if (flags & (1 << 13)) arguments.decode(buffer); if (flags & (1 << 14)) messageCount = buffer.getLong(); if (flags & (1 << 15)) subscriberCount = buffer.getLong(); } void QueueQueryResult::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t QueueQueryResult::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 1 + alternateExchange.size(); if (flags & (1 << 13)) total += arguments.encodedSize(); if (flags & (1 << 14)) total += 4;//messageCount if (flags & (1 << 15)) total += 4;//subscriberCount return total; } uint32_t QueueQueryResult::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void QueueQueryResult::print(std::ostream& out) const { out << "{QueueQueryResult: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "alternate-exchange=" << alternateExchange << "; "; if (flags & (1 << 10)) out << "durable=" << getDurable() << "; "; if (flags & (1 << 11)) out << "exclusive=" << getExclusive() << "; "; if (flags & (1 << 12)) out << "auto-delete=" << getAutoDelete() << "; "; if (flags & (1 << 13)) out << "arguments=" << arguments << "; "; if (flags & (1 << 14)) out << "message-count=" << messageCount << "; "; if (flags & (1 << 15)) out << "subscriber-count=" << subscriberCount << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const QueueQueryResult& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/ClusterConnectionQueuePositionBody.cpp0000664000076400007640000000631711752725676026051 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionQueuePositionBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionQueuePositionBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ClusterConnectionQueuePositionBody::getQueue() const { return queue; } bool ClusterConnectionQueuePositionBody::hasQueue() const { return flags & (1 << 8); } void ClusterConnectionQueuePositionBody::clearQueueFlag() { flags &= ~(1 << 8); } void ClusterConnectionQueuePositionBody::setPosition(const SequenceNumber& _position) { position = _position; flags |= (1 << 9); } SequenceNumber ClusterConnectionQueuePositionBody::getPosition() const { return position; } bool ClusterConnectionQueuePositionBody::hasPosition() const { return flags & (1 << 9); } void ClusterConnectionQueuePositionBody::clearPositionFlag() { flags &= ~(1 << 9); } void ClusterConnectionQueuePositionBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) position.encode(buffer); } void ClusterConnectionQueuePositionBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionQueuePositionBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) position.decode(buffer); } void ClusterConnectionQueuePositionBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionQueuePositionBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += position.encodedSize(); return total; } uint32_t ClusterConnectionQueuePositionBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionQueuePositionBody::print(std::ostream& out) const { out << "{ClusterConnectionQueuePositionBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "position=" << position << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.cpp0000664000076400007640000000703111752725676030622 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionQueueDequeueSincePurgeStateBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ClusterConnectionQueueDequeueSincePurgeStateBody::getQueue() const { return queue; } bool ClusterConnectionQueueDequeueSincePurgeStateBody::hasQueue() const { return flags & (1 << 8); } void ClusterConnectionQueueDequeueSincePurgeStateBody::clearQueueFlag() { flags &= ~(1 << 8); } void ClusterConnectionQueueDequeueSincePurgeStateBody::setDequeueSincePurge(uint32_t _dequeueSincePurge) { dequeueSincePurge = _dequeueSincePurge; flags |= (1 << 9); } uint32_t ClusterConnectionQueueDequeueSincePurgeStateBody::getDequeueSincePurge() const { return dequeueSincePurge; } bool ClusterConnectionQueueDequeueSincePurgeStateBody::hasDequeueSincePurge() const { return flags & (1 << 9); } void ClusterConnectionQueueDequeueSincePurgeStateBody::clearDequeueSincePurgeFlag() { flags &= ~(1 << 9); } void ClusterConnectionQueueDequeueSincePurgeStateBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putLong(dequeueSincePurge); } void ClusterConnectionQueueDequeueSincePurgeStateBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionQueueDequeueSincePurgeStateBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) dequeueSincePurge = buffer.getLong(); } void ClusterConnectionQueueDequeueSincePurgeStateBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionQueueDequeueSincePurgeStateBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 4;//dequeueSincePurge return total; } uint32_t ClusterConnectionQueueDequeueSincePurgeStateBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionQueueDequeueSincePurgeStateBody::print(std::ostream& out) const { out << "{ClusterConnectionQueueDequeueSincePurgeStateBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "dequeueSincePurge=" << dequeueSincePurge << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/SequenceNumberSet.cpp0000664000076400007640000000460311227113407022405 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/SequenceNumberSet.h" using namespace qpid::framing; void SequenceNumberSet::encode(Buffer& buffer) const { buffer.putShort(size() * 4); for (const_iterator i = begin(); i != end(); i++) { buffer.putLong(i->getValue()); } } void SequenceNumberSet::decode(Buffer& buffer) { clear(); uint16_t count = (buffer.getShort() / 4); for (uint16_t i = 0; i < count; i++) { push_back(SequenceNumber(buffer.getLong())); } } uint32_t SequenceNumberSet::encodedSize() const { return 2 /*count*/ + (size() * 4); } SequenceNumberSet SequenceNumberSet::condense() const { SequenceNumberSet result; const_iterator last = end(); const_iterator start = end(); for (const_iterator i = begin(); i != end(); i++) { if (start == end()) { start = i; } else if (*i - *last > 1) { result.push_back(*start); result.push_back(*last); start = i; } last = i; } if (start != end()) { result.push_back(*start); result.push_back(*last); } return result; } void SequenceNumberSet::addRange(const SequenceNumber& start, const SequenceNumber& end) { push_back(start); push_back(end); } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const SequenceNumberSet& set) { out << "{"; for (SequenceNumberSet::const_iterator i = set.begin(); i != set.end(); i++) { if (i != set.begin()) out << ", "; out << (i->getValue()); } out << "}"; return out; } } } qpidc-0.16/src/qpid/framing/ClusterInitialStatusBody.h0000664000076400007640000001166011752725676023457 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERINITIALSTATUSBODY_H #define QPID_FRAMING_CLUSTERINITIALSTATUSBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterInitialStatusBody : public ModelMethod { uint32_t version; Uuid clusterId; uint8_t storeState; Uuid shutdownId; std::string firstConfig; Array urls; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x5; ClusterInitialStatusBody( ProtocolVersion, uint32_t _version, bool _active, const Uuid& _clusterId, uint8_t _storeState, const Uuid& _shutdownId, const std::string& _firstConfig, const Array& _urls) : version(_version), clusterId(_clusterId), storeState(_storeState), shutdownId(_shutdownId), firstConfig(_firstConfig), urls(_urls), flags(0){ setActive(_active); flags |= (1 << 8); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); flags |= (1 << 14); } ClusterInitialStatusBody(ProtocolVersion=ProtocolVersion()) : version(0), storeState(0), flags(0) {} QPID_COMMON_EXTERN void setVersion(uint32_t _version); QPID_COMMON_EXTERN uint32_t getVersion() const; QPID_COMMON_EXTERN bool hasVersion() const; QPID_COMMON_EXTERN void clearVersionFlag(); QPID_COMMON_EXTERN void setActive(bool _active); QPID_COMMON_EXTERN bool getActive() const; QPID_COMMON_EXTERN void setClusterId(const Uuid& _clusterId); QPID_COMMON_EXTERN const Uuid& getClusterId() const; QPID_COMMON_EXTERN bool hasClusterId() const; QPID_COMMON_EXTERN void clearClusterIdFlag(); QPID_COMMON_EXTERN void setStoreState(uint8_t _storeState); QPID_COMMON_EXTERN uint8_t getStoreState() const; QPID_COMMON_EXTERN bool hasStoreState() const; QPID_COMMON_EXTERN void clearStoreStateFlag(); QPID_COMMON_EXTERN void setShutdownId(const Uuid& _shutdownId); QPID_COMMON_EXTERN const Uuid& getShutdownId() const; QPID_COMMON_EXTERN bool hasShutdownId() const; QPID_COMMON_EXTERN void clearShutdownIdFlag(); QPID_COMMON_EXTERN void setFirstConfig(const std::string& _firstConfig); QPID_COMMON_EXTERN const std::string& getFirstConfig() const; QPID_COMMON_EXTERN bool hasFirstConfig() const; QPID_COMMON_EXTERN void clearFirstConfigFlag(); QPID_COMMON_EXTERN void setUrls(const Array& _urls); QPID_COMMON_EXTERN const Array& getUrls() const; QPID_COMMON_EXTERN bool hasUrls() const; QPID_COMMON_EXTERN void clearUrlsFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.initialStatus(getVersion(), getActive(), getClusterId(), getStoreState(), getShutdownId(), getFirstConfig(), getUrls()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterInitialStatusBody */ }} #endif /*!QPID_FRAMING_CLUSTERINITIALSTATUSBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionQueuePositionBody.h0000664000076400007640000000672711752725676025523 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONQUEUEPOSITIONBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONQUEUEPOSITIONBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionQueuePositionBody : public ModelMethod { std::string queue; SequenceNumber position; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x30; ClusterConnectionQueuePositionBody( ProtocolVersion, const std::string& _queue, const SequenceNumber& _position) : queue(_queue), position(_position), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ClusterConnectionQueuePositionBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setPosition(const SequenceNumber& _position); QPID_COMMON_EXTERN SequenceNumber getPosition() const; QPID_COMMON_EXTERN bool hasPosition() const; QPID_COMMON_EXTERN void clearPositionFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.queuePosition(getQueue(), getPosition()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionQueuePositionBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONQUEUEPOSITIONBODY_H*/ qpidc-0.16/src/qpid/framing/DtxGetTimeoutBody.h0000664000076400007640000000573711752725676022076 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXGETTIMEOUTBODY_H #define QPID_FRAMING_DTXGETTIMEOUTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include "qpid/framing/Xid.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxGetTimeoutBody : public ModelMethod { Xid xid; uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0x6; DtxGetTimeoutBody( ProtocolVersion, const Xid& _xid) : xid(_xid), flags(0){ flags |= (1 << 8); } DtxGetTimeoutBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setXid(const Xid& _xid); QPID_COMMON_EXTERN const Xid& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); typedef DtxGetTimeoutResult ResultType; template ResultType invoke(T& invocable) const { return invocable.getTimeout(getXid()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxGetTimeoutBody */ }} #endif /*!QPID_FRAMING_DTXGETTIMEOUTBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterTimerWakeupBody.cpp0000664000076400007640000000461611752725676023455 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterTimerWakeupBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterTimerWakeupBody::setName(const std::string& _name) { name = _name; flags |= (1 << 8); } const std::string& ClusterTimerWakeupBody::getName() const { return name; } bool ClusterTimerWakeupBody::hasName() const { return flags & (1 << 8); } void ClusterTimerWakeupBody::clearNameFlag() { flags &= ~(1 << 8); } void ClusterTimerWakeupBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(name); } void ClusterTimerWakeupBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterTimerWakeupBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(name); } void ClusterTimerWakeupBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterTimerWakeupBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + name.size(); return total; } uint32_t ClusterTimerWakeupBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterTimerWakeupBody::print(std::ostream& out) const { out << "{ClusterTimerWakeupBody: "; if (flags & (1 << 8)) out << "name=" << name << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionDtxStartBody.h0000664000076400007640000000731011752725676024454 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONDTXSTARTBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONDTXSTARTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionDtxStartBody : public ModelMethod { std::string xid; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x1A; ClusterConnectionDtxStartBody( ProtocolVersion, const std::string& _xid, bool _ended, bool _suspended, bool _failed, bool _expired) : xid(_xid), flags(0){ setEnded(_ended); setSuspended(_suspended); setFailed(_failed); setExpired(_expired); flags |= (1 << 8); } ClusterConnectionDtxStartBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setXid(const std::string& _xid); QPID_COMMON_EXTERN const std::string& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); QPID_COMMON_EXTERN void setEnded(bool _ended); QPID_COMMON_EXTERN bool getEnded() const; QPID_COMMON_EXTERN void setSuspended(bool _suspended); QPID_COMMON_EXTERN bool getSuspended() const; QPID_COMMON_EXTERN void setFailed(bool _failed); QPID_COMMON_EXTERN bool getFailed() const; QPID_COMMON_EXTERN void setExpired(bool _expired); QPID_COMMON_EXTERN bool getExpired() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.dtxStart(getXid(), getEnded(), getSuspended(), getFailed(), getExpired()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionDtxStartBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONDTXSTARTBODY_H*/ qpidc-0.16/src/qpid/framing/StreamReturnBody.cpp0000664000076400007640000001026211752725676022303 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/StreamReturnBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void StreamReturnBody::setReplyCode(uint16_t _replyCode) { replyCode = _replyCode; flags |= (1 << 8); } uint16_t StreamReturnBody::getReplyCode() const { return replyCode; } bool StreamReturnBody::hasReplyCode() const { return flags & (1 << 8); } void StreamReturnBody::clearReplyCodeFlag() { flags &= ~(1 << 8); } void StreamReturnBody::setReplyText(const std::string& _replyText) { replyText = _replyText; flags |= (1 << 9); } const std::string& StreamReturnBody::getReplyText() const { return replyText; } bool StreamReturnBody::hasReplyText() const { return flags & (1 << 9); } void StreamReturnBody::clearReplyTextFlag() { flags &= ~(1 << 9); } void StreamReturnBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 10); } const std::string& StreamReturnBody::getExchange() const { return exchange; } bool StreamReturnBody::hasExchange() const { return flags & (1 << 10); } void StreamReturnBody::clearExchangeFlag() { flags &= ~(1 << 10); } void StreamReturnBody::setRoutingKey(const std::string& _routingKey) { routingKey = _routingKey; flags |= (1 << 11); } const std::string& StreamReturnBody::getRoutingKey() const { return routingKey; } bool StreamReturnBody::hasRoutingKey() const { return flags & (1 << 11); } void StreamReturnBody::clearRoutingKeyFlag() { flags &= ~(1 << 11); } void StreamReturnBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShort(replyCode); if (flags & (1 << 9)) buffer.putShortString(replyText); if (flags & (1 << 10)) buffer.putShortString(exchange); if (flags & (1 << 11)) buffer.putShortString(routingKey); } void StreamReturnBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void StreamReturnBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) replyCode = buffer.getShort(); if (flags & (1 << 9)) buffer.getShortString(replyText); if (flags & (1 << 10)) buffer.getShortString(exchange); if (flags & (1 << 11)) buffer.getShortString(routingKey); } void StreamReturnBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t StreamReturnBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2;//replyCode if (flags & (1 << 9)) total += 1 + replyText.size(); if (flags & (1 << 10)) total += 1 + exchange.size(); if (flags & (1 << 11)) total += 1 + routingKey.size(); return total; } uint32_t StreamReturnBody::encodedSize() const { uint32_t total = bodySize(); return total; } void StreamReturnBody::print(std::ostream& out) const { out << "{StreamReturnBody: "; if (flags & (1 << 8)) out << "reply-code=" << replyCode << "; "; if (flags & (1 << 9)) out << "reply-text=" << replyText << "; "; if (flags & (1 << 10)) out << "exchange=" << exchange << "; "; if (flags & (1 << 11)) out << "routing-key=" << routingKey << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/TypeCode.cpp0000664000076400007640000000672411752725676020556 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/TypeCode.h" #include "qpid/Exception.h" #include "qpid/Msg.h" #include namespace qpid { namespace framing { const char* typeName(TypeCode t) { switch (t) { case TYPE_CODE_BIN8: return "bin8"; case TYPE_CODE_INT8: return "int8"; case TYPE_CODE_UINT8: return "uint8"; case TYPE_CODE_CHAR: return "char"; case TYPE_CODE_BOOLEAN: return "boolean"; case TYPE_CODE_BIN16: return "bin16"; case TYPE_CODE_INT16: return "int16"; case TYPE_CODE_UINT16: return "uint16"; case TYPE_CODE_BIN32: return "bin32"; case TYPE_CODE_INT32: return "int32"; case TYPE_CODE_UINT32: return "uint32"; case TYPE_CODE_FLOAT: return "float"; case TYPE_CODE_CHAR_UTF32: return "char-utf32"; case TYPE_CODE_BIN64: return "bin64"; case TYPE_CODE_INT64: return "int64"; case TYPE_CODE_UINT64: return "uint64"; case TYPE_CODE_DOUBLE: return "double"; case TYPE_CODE_DATETIME: return "datetime"; case TYPE_CODE_BIN128: return "bin128"; case TYPE_CODE_UUID: return "uuid"; case TYPE_CODE_BIN256: return "bin256"; case TYPE_CODE_BIN512: return "bin512"; case TYPE_CODE_BIN1024: return "bin1024"; case TYPE_CODE_VBIN8: return "vbin8"; case TYPE_CODE_STR8_LATIN: return "str8-latin"; case TYPE_CODE_STR8: return "str8"; case TYPE_CODE_STR8_UTF16: return "str8-utf16"; case TYPE_CODE_VBIN16: return "vbin16"; case TYPE_CODE_STR16_LATIN: return "str16-latin"; case TYPE_CODE_STR16: return "str16"; case TYPE_CODE_STR16_UTF16: return "str16-utf16"; case TYPE_CODE_VBIN32: return "vbin32"; case TYPE_CODE_MAP: return "map"; case TYPE_CODE_LIST: return "list"; case TYPE_CODE_ARRAY: return "array"; case TYPE_CODE_STRUCT32: return "struct32"; case TYPE_CODE_BIN40: return "bin40"; case TYPE_CODE_DEC32: return "dec32"; case TYPE_CODE_BIN72: return "bin72"; case TYPE_CODE_DEC64: return "dec64"; case TYPE_CODE_VOID: return "void"; case TYPE_CODE_BIT: return "bit"; default: break; } return 0; } bool isTypeCode(uint8_t t) { return typeName(TypeCode(t)); } TypeCode typeCode(uint8_t t) { if (!isTypeCode(t)) throw Exception(QPID_MSG("Invalid TypeCode " << t)); return TypeCode(t); } std::ostream& operator<<(std::ostream& o, TypeCode t) { if (isTypeCode(t)) return o << typeName(t); else return o << "Invalid TypeCode " << t; } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/FileAckBody.cpp0000664000076400007640000000510211752725676021143 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileAckBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileAckBody::setDeliveryTag(uint64_t _deliveryTag) { deliveryTag = _deliveryTag; flags |= (1 << 8); } uint64_t FileAckBody::getDeliveryTag() const { return deliveryTag; } bool FileAckBody::hasDeliveryTag() const { return flags & (1 << 8); } void FileAckBody::clearDeliveryTagFlag() { flags &= ~(1 << 8); } void FileAckBody::setMultiple(bool _multiple) { if (_multiple) flags |= (1 << 9); else flags &= ~(1 << 9); } bool FileAckBody::getMultiple() const { return flags & (1 << 9); } void FileAckBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(deliveryTag); } void FileAckBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileAckBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) deliveryTag = buffer.getLongLong(); } void FileAckBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileAckBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 8;//deliveryTag return total; } uint32_t FileAckBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileAckBody::print(std::ostream& out) const { out << "{FileAckBody: "; if (flags & (1 << 8)) out << "delivery-tag=" << deliveryTag << "; "; if (flags & (1 << 9)) out << "multiple=" << getMultiple() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionOpenBody.h0000664000076400007640000000713711752725676022245 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONOPENBODY_H #define QPID_FRAMING_CONNECTIONOPENBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionOpenBody : public AMQMethodBody { std::string virtualHost; Array capabilities; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0x7; ConnectionOpenBody( ProtocolVersion, const std::string& _virtualHost, const Array& _capabilities, bool _insist) : virtualHost(_virtualHost), capabilities(_capabilities), flags(0){ setInsist(_insist); flags |= (1 << 8); flags |= (1 << 9); } ConnectionOpenBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setVirtualHost(const std::string& _virtualHost); QPID_COMMON_EXTERN const std::string& getVirtualHost() const; QPID_COMMON_EXTERN bool hasVirtualHost() const; QPID_COMMON_EXTERN void clearVirtualHostFlag(); QPID_COMMON_EXTERN void setCapabilities(const Array& _capabilities); QPID_COMMON_EXTERN const Array& getCapabilities() const; QPID_COMMON_EXTERN bool hasCapabilities() const; QPID_COMMON_EXTERN void clearCapabilitiesFlag(); QPID_COMMON_EXTERN void setInsist(bool _insist); QPID_COMMON_EXTERN bool getInsist() const; virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.open(getVirtualHost(), getCapabilities(), getInsist()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionOpenBody */ }} #endif /*!QPID_FRAMING_CONNECTIONOPENBODY_H*/ qpidc-0.16/src/qpid/framing/ServerInvoker.cpp0000664000076400007640000007105711752725674021645 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ServerInvoker.h" #include "qpid/framing/ConnectionStartOkBody.h" #include "qpid/framing/ConnectionSecureOkBody.h" #include "qpid/framing/ConnectionTuneOkBody.h" #include "qpid/framing/ConnectionOpenBody.h" #include "qpid/framing/ConnectionHeartbeatBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/framing/SessionAttachBody.h" #include "qpid/framing/SessionAttachedBody.h" #include "qpid/framing/SessionDetachBody.h" #include "qpid/framing/SessionDetachedBody.h" #include "qpid/framing/SessionRequestTimeoutBody.h" #include "qpid/framing/SessionTimeoutBody.h" #include "qpid/framing/SessionCommandPointBody.h" #include "qpid/framing/SessionExpectedBody.h" #include "qpid/framing/SessionConfirmedBody.h" #include "qpid/framing/SessionCompletedBody.h" #include "qpid/framing/SessionKnownCompletedBody.h" #include "qpid/framing/SessionFlushBody.h" #include "qpid/framing/SessionGapBody.h" #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/ExecutionResultBody.h" #include "qpid/framing/ExecutionExceptionBody.h" #include "qpid/framing/MessageAcceptBody.h" #include "qpid/framing/MessageRejectBody.h" #include "qpid/framing/MessageReleaseBody.h" #include "qpid/framing/MessageAcquireBody.h" #include "qpid/framing/MessageResumeBody.h" #include "qpid/framing/MessageSubscribeBody.h" #include "qpid/framing/MessageCancelBody.h" #include "qpid/framing/MessageSetFlowModeBody.h" #include "qpid/framing/MessageFlowBody.h" #include "qpid/framing/MessageFlushBody.h" #include "qpid/framing/MessageStopBody.h" #include "qpid/framing/TxSelectBody.h" #include "qpid/framing/TxCommitBody.h" #include "qpid/framing/TxRollbackBody.h" #include "qpid/framing/DtxSelectBody.h" #include "qpid/framing/DtxStartBody.h" #include "qpid/framing/DtxEndBody.h" #include "qpid/framing/DtxCommitBody.h" #include "qpid/framing/DtxForgetBody.h" #include "qpid/framing/DtxGetTimeoutBody.h" #include "qpid/framing/DtxPrepareBody.h" #include "qpid/framing/DtxRecoverBody.h" #include "qpid/framing/DtxRollbackBody.h" #include "qpid/framing/DtxSetTimeoutBody.h" #include "qpid/framing/ExchangeDeclareBody.h" #include "qpid/framing/ExchangeDeleteBody.h" #include "qpid/framing/ExchangeQueryBody.h" #include "qpid/framing/ExchangeBindBody.h" #include "qpid/framing/ExchangeUnbindBody.h" #include "qpid/framing/ExchangeBoundBody.h" #include "qpid/framing/QueueDeclareBody.h" #include "qpid/framing/QueueDeleteBody.h" #include "qpid/framing/QueuePurgeBody.h" #include "qpid/framing/QueueQueryBody.h" #include "qpid/framing/FileQosBody.h" #include "qpid/framing/FileConsumeBody.h" #include "qpid/framing/FileCancelBody.h" #include "qpid/framing/FileOpenBody.h" #include "qpid/framing/FileOpenOkBody.h" #include "qpid/framing/FilePublishBody.h" #include "qpid/framing/FileAckBody.h" #include "qpid/framing/FileRejectBody.h" #include "qpid/framing/StreamQosBody.h" #include "qpid/framing/StreamConsumeBody.h" #include "qpid/framing/StreamCancelBody.h" namespace qpid { namespace framing { void AMQP_ServerOperations::Invoker::visit(const ConnectionStartOkBody& body) { AMQP_ServerOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ConnectionSecureOkBody& body) { AMQP_ServerOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ConnectionTuneOkBody& body) { AMQP_ServerOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ConnectionOpenBody& body) { AMQP_ServerOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ConnectionHeartbeatBody& body) { AMQP_ServerOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ConnectionCloseBody& body) { AMQP_ServerOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ConnectionCloseOkBody& body) { AMQP_ServerOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionAttachBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionAttachedBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionDetachBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionDetachedBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionRequestTimeoutBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionTimeoutBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionCommandPointBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionExpectedBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionConfirmedBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionCompletedBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionKnownCompletedBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionFlushBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const SessionGapBody& body) { AMQP_ServerOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ExecutionSyncBody& body) { AMQP_ServerOperations::ExecutionHandler::Invoker invoker(*target.getExecutionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ExecutionResultBody& body) { AMQP_ServerOperations::ExecutionHandler::Invoker invoker(*target.getExecutionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ExecutionExceptionBody& body) { AMQP_ServerOperations::ExecutionHandler::Invoker invoker(*target.getExecutionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageAcceptBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageRejectBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageReleaseBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageAcquireBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageResumeBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageSubscribeBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageCancelBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageSetFlowModeBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageFlowBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageFlushBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const MessageStopBody& body) { AMQP_ServerOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const TxSelectBody& body) { AMQP_ServerOperations::TxHandler::Invoker invoker(*target.getTxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const TxCommitBody& body) { AMQP_ServerOperations::TxHandler::Invoker invoker(*target.getTxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const TxRollbackBody& body) { AMQP_ServerOperations::TxHandler::Invoker invoker(*target.getTxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxSelectBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxStartBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxEndBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxCommitBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxForgetBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxGetTimeoutBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxPrepareBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxRecoverBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxRollbackBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const DtxSetTimeoutBody& body) { AMQP_ServerOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ExchangeDeclareBody& body) { AMQP_ServerOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ExchangeDeleteBody& body) { AMQP_ServerOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ExchangeQueryBody& body) { AMQP_ServerOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ExchangeBindBody& body) { AMQP_ServerOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ExchangeUnbindBody& body) { AMQP_ServerOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const ExchangeBoundBody& body) { AMQP_ServerOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const QueueDeclareBody& body) { AMQP_ServerOperations::QueueHandler::Invoker invoker(*target.getQueueHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const QueueDeleteBody& body) { AMQP_ServerOperations::QueueHandler::Invoker invoker(*target.getQueueHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const QueuePurgeBody& body) { AMQP_ServerOperations::QueueHandler::Invoker invoker(*target.getQueueHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const QueueQueryBody& body) { AMQP_ServerOperations::QueueHandler::Invoker invoker(*target.getQueueHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const FileQosBody& body) { AMQP_ServerOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const FileConsumeBody& body) { AMQP_ServerOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const FileCancelBody& body) { AMQP_ServerOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const FileOpenBody& body) { AMQP_ServerOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const FileOpenOkBody& body) { AMQP_ServerOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const FilePublishBody& body) { AMQP_ServerOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const FileAckBody& body) { AMQP_ServerOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const FileRejectBody& body) { AMQP_ServerOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const StreamQosBody& body) { AMQP_ServerOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const StreamConsumeBody& body) { AMQP_ServerOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::Invoker::visit(const StreamCancelBody& body) { AMQP_ServerOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ServerOperations::ConnectionHandler::Invoker::visit(const ConnectionStartOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ConnectionHandler::Invoker::visit(const ConnectionSecureOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ConnectionHandler::Invoker::visit(const ConnectionTuneOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ConnectionHandler::Invoker::visit(const ConnectionOpenBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ConnectionHandler::Invoker::visit(const ConnectionHeartbeatBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ConnectionHandler::Invoker::visit(const ConnectionCloseBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ConnectionHandler::Invoker::visit(const ConnectionCloseOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionAttachBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionAttachedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionDetachBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionDetachedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionRequestTimeoutBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionTimeoutBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionCommandPointBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionExpectedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionConfirmedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionCompletedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionKnownCompletedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionFlushBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::SessionHandler::Invoker::visit(const SessionGapBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ExecutionHandler::Invoker::visit(const ExecutionSyncBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ExecutionHandler::Invoker::visit(const ExecutionResultBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ExecutionHandler::Invoker::visit(const ExecutionExceptionBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageAcceptBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageRejectBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageReleaseBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageAcquireBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageResumeBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageSubscribeBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageCancelBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageSetFlowModeBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageFlowBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageFlushBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::MessageHandler::Invoker::visit(const MessageStopBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::TxHandler::Invoker::visit(const TxSelectBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::TxHandler::Invoker::visit(const TxCommitBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::TxHandler::Invoker::visit(const TxRollbackBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxSelectBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxStartBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxEndBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxCommitBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxForgetBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxGetTimeoutBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxPrepareBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxRecoverBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxRollbackBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::DtxHandler::Invoker::visit(const DtxSetTimeoutBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ExchangeHandler::Invoker::visit(const ExchangeDeclareBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ExchangeHandler::Invoker::visit(const ExchangeDeleteBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ExchangeHandler::Invoker::visit(const ExchangeQueryBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::ExchangeHandler::Invoker::visit(const ExchangeBindBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ExchangeHandler::Invoker::visit(const ExchangeUnbindBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::ExchangeHandler::Invoker::visit(const ExchangeBoundBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::QueueHandler::Invoker::visit(const QueueDeclareBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::QueueHandler::Invoker::visit(const QueueDeleteBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::QueueHandler::Invoker::visit(const QueuePurgeBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::QueueHandler::Invoker::visit(const QueueQueryBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ServerOperations::FileHandler::Invoker::visit(const FileQosBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::FileHandler::Invoker::visit(const FileConsumeBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::FileHandler::Invoker::visit(const FileCancelBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::FileHandler::Invoker::visit(const FileOpenBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::FileHandler::Invoker::visit(const FileOpenOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::FileHandler::Invoker::visit(const FilePublishBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::FileHandler::Invoker::visit(const FileAckBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::FileHandler::Invoker::visit(const FileRejectBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::StreamHandler::Invoker::visit(const StreamQosBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::StreamHandler::Invoker::visit(const StreamConsumeBody& body) { body.invoke(target); result.handled=true; } void AMQP_ServerOperations::StreamHandler::Invoker::visit(const StreamCancelBody& body) { body.invoke(target); result.handled=true; } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/DtxGetTimeoutResult.cpp0000664000076400007640000000527311752725676023005 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxGetTimeoutResult.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxGetTimeoutResult::setTimeout(uint32_t _timeout) { timeout = _timeout; flags |= (1 << 8); } uint32_t DtxGetTimeoutResult::getTimeout() const { return timeout; } bool DtxGetTimeoutResult::hasTimeout() const { return flags & (1 << 8); } void DtxGetTimeoutResult::clearTimeoutFlag() { flags &= ~(1 << 8); } void DtxGetTimeoutResult::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLong(timeout); } void DtxGetTimeoutResult::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void DtxGetTimeoutResult::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) timeout = buffer.getLong(); } void DtxGetTimeoutResult::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t DtxGetTimeoutResult::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 4;//timeout return total; } uint32_t DtxGetTimeoutResult::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void DtxGetTimeoutResult::print(std::ostream& out) const { out << "{DtxGetTimeoutResult: "; if (flags & (1 << 8)) out << "timeout=" << timeout << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const DtxGetTimeoutResult& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/FileDeliverBody.h0000664000076400007640000001131411752725676021506 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILEDELIVERBODY_H #define QPID_FRAMING_FILEDELIVERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileDeliverBody : public ModelMethod { std::string consumerTag; uint64_t deliveryTag; std::string exchange; std::string routingKey; std::string identifier; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0xb; FileDeliverBody( ProtocolVersion, const std::string& _consumerTag, uint64_t _deliveryTag, bool _redelivered, const std::string& _exchange, const std::string& _routingKey, const std::string& _identifier) : consumerTag(_consumerTag), deliveryTag(_deliveryTag), exchange(_exchange), routingKey(_routingKey), identifier(_identifier), flags(0){ setRedelivered(_redelivered); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); } FileDeliverBody(ProtocolVersion=ProtocolVersion()) : deliveryTag(0), flags(0) {} QPID_COMMON_EXTERN void setConsumerTag(const std::string& _consumerTag); QPID_COMMON_EXTERN const std::string& getConsumerTag() const; QPID_COMMON_EXTERN bool hasConsumerTag() const; QPID_COMMON_EXTERN void clearConsumerTagFlag(); QPID_COMMON_EXTERN void setDeliveryTag(uint64_t _deliveryTag); QPID_COMMON_EXTERN uint64_t getDeliveryTag() const; QPID_COMMON_EXTERN bool hasDeliveryTag() const; QPID_COMMON_EXTERN void clearDeliveryTagFlag(); QPID_COMMON_EXTERN void setRedelivered(bool _redelivered); QPID_COMMON_EXTERN bool getRedelivered() const; QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setRoutingKey(const std::string& _routingKey); QPID_COMMON_EXTERN const std::string& getRoutingKey() const; QPID_COMMON_EXTERN bool hasRoutingKey() const; QPID_COMMON_EXTERN void clearRoutingKeyFlag(); QPID_COMMON_EXTERN void setIdentifier(const std::string& _identifier); QPID_COMMON_EXTERN const std::string& getIdentifier() const; QPID_COMMON_EXTERN bool hasIdentifier() const; QPID_COMMON_EXTERN void clearIdentifierFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.deliver(getConsumerTag(), getDeliveryTag(), getRedelivered(), getExchange(), getRoutingKey(), getIdentifier()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileDeliverBody */ }} #endif /*!QPID_FRAMING_FILEDELIVERBODY_H*/ qpidc-0.16/src/qpid/framing/DtxRecoverBody.h0000664000076400007640000000511311752725676021401 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXRECOVERBODY_H #define QPID_FRAMING_DTXRECOVERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxRecoverBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0x8; DtxRecoverBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef DtxRecoverResult ResultType; template ResultType invoke(T& invocable) const { return invocable.recover(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxRecoverBody */ }} #endif /*!QPID_FRAMING_DTXRECOVERBODY_H*/ qpidc-0.16/src/qpid/framing/DtxCommitBody.h0000664000076400007640000000614511752725676021232 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXCOMMITBODY_H #define QPID_FRAMING_DTXCOMMITBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include "qpid/framing/Xid.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxCommitBody : public ModelMethod { Xid xid; uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0x4; DtxCommitBody( ProtocolVersion, const Xid& _xid, bool _onePhase) : xid(_xid), flags(0){ setOnePhase(_onePhase); flags |= (1 << 8); } DtxCommitBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setXid(const Xid& _xid); QPID_COMMON_EXTERN const Xid& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); QPID_COMMON_EXTERN void setOnePhase(bool _onePhase); QPID_COMMON_EXTERN bool getOnePhase() const; typedef XaResult ResultType; template ResultType invoke(T& invocable) const { return invocable.commit(getXid(), getOnePhase()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxCommitBody */ }} #endif /*!QPID_FRAMING_DTXCOMMITBODY_H*/ qpidc-0.16/src/qpid/framing/SessionAttachedBody.cpp0000664000076400007640000000444411752725676022736 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionAttachedBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionAttachedBody::setName(const std::string& _name) { name = _name; flags |= (1 << 8); } const std::string& SessionAttachedBody::getName() const { return name; } bool SessionAttachedBody::hasName() const { return flags & (1 << 8); } void SessionAttachedBody::clearNameFlag() { flags &= ~(1 << 8); } void SessionAttachedBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(name); } void SessionAttachedBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionAttachedBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(name); } void SessionAttachedBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionAttachedBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 2 + name.size(); return total; } uint32_t SessionAttachedBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionAttachedBody::print(std::ostream& out) const { out << "{SessionAttachedBody: "; if (flags & (1 << 8)) out << "name=" << name << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/frame_functors.h0000664000076400007640000000470611072715510021477 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "qpid/framing/amqp_framing.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/Buffer.h" #ifndef _frame_functors_ #define _frame_functors_ namespace qpid { namespace framing { class SumFrameSize { uint64_t size; public: SumFrameSize() : size(0) {} void operator()(const AMQFrame& f) { size += f.encodedSize(); } uint64_t getSize() { return size; } }; class SumBodySize { uint64_t size; public: SumBodySize() : size(0) {} void operator()(const AMQFrame& f) { size += f.getBody()->encodedSize(); } uint64_t getSize() { return size; } }; class Count { uint count; public: Count() : count(0) {} void operator()(const AMQFrame&) { count++; } uint getCount() { return count; } }; class EncodeFrame { Buffer& buffer; public: EncodeFrame(Buffer& b) : buffer(b) {} void operator()(const AMQFrame& f) { f.encode(buffer); } }; class EncodeBody { Buffer& buffer; public: EncodeBody(Buffer& b) : buffer(b) {} void operator()(const AMQFrame& f) { f.getBody()->encode(buffer); } }; /** * Sends to the specified handler a copy of the frame it is applied to. */ class Relay { FrameHandler& handler; public: Relay(FrameHandler& h) : handler(h) {} void operator()(const AMQFrame& f) { AMQFrame copy(f); handler.handle(copy); } }; class Print { std::ostream& out; public: Print(std::ostream& o) : out(o) {} void operator()(const AMQFrame& f) { out << f << std::endl; } }; class MarkLastSegment { public: void operator()(AMQFrame& f) const { f.setEof(true); } }; } } #endif qpidc-0.16/src/qpid/framing/ClusterConnectionTxAcceptBody.h0000664000076400007640000000613111752725676024412 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONTXACCEPTBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONTXACCEPTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionTxAcceptBody : public ModelMethod { SequenceSet commands; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x13; ClusterConnectionTxAcceptBody( ProtocolVersion, const SequenceSet& _commands) : commands(_commands), flags(0){ flags |= (1 << 8); } ClusterConnectionTxAcceptBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setCommands(const SequenceSet& _commands); QPID_COMMON_EXTERN const SequenceSet& getCommands() const; QPID_COMMON_EXTERN bool hasCommands() const; QPID_COMMON_EXTERN void clearCommandsFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.txAccept(getCommands()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionTxAcceptBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONTXACCEPTBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterRetractOfferBody.cpp0000664000076400007640000000464111752725676023604 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterRetractOfferBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterRetractOfferBody::setUpdatee(uint64_t _updatee) { updatee = _updatee; flags |= (1 << 8); } uint64_t ClusterRetractOfferBody::getUpdatee() const { return updatee; } bool ClusterRetractOfferBody::hasUpdatee() const { return flags & (1 << 8); } void ClusterRetractOfferBody::clearUpdateeFlag() { flags &= ~(1 << 8); } void ClusterRetractOfferBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(updatee); } void ClusterRetractOfferBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterRetractOfferBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) updatee = buffer.getLongLong(); } void ClusterRetractOfferBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterRetractOfferBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 8;//updatee return total; } uint32_t ClusterRetractOfferBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterRetractOfferBody::print(std::ostream& out) const { out << "{ClusterRetractOfferBody: "; if (flags & (1 << 8)) out << "updatee=" << updatee << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterRetractOfferBody.h0000664000076400007640000000602311752725676023245 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERRETRACTOFFERBODY_H #define QPID_FRAMING_CLUSTERRETRACTOFFERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterRetractOfferBody : public ModelMethod { uint64_t updatee; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x3; ClusterRetractOfferBody( ProtocolVersion, uint64_t _updatee) : updatee(_updatee), flags(0){ flags |= (1 << 8); } ClusterRetractOfferBody(ProtocolVersion=ProtocolVersion()) : updatee(0), flags(0) {} QPID_COMMON_EXTERN void setUpdatee(uint64_t _updatee); QPID_COMMON_EXTERN uint64_t getUpdatee() const; QPID_COMMON_EXTERN bool hasUpdatee() const; QPID_COMMON_EXTERN void clearUpdateeFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.retractOffer(getUpdatee()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterRetractOfferBody */ }} #endif /*!QPID_FRAMING_CLUSTERRETRACTOFFERBODY_H*/ qpidc-0.16/src/qpid/framing/ProtocolInitiation.h0000664000076400007640000000375111227113407022311 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/AMQDataBlock.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/CommonImportExport.h" #ifndef _ProtocolInitiation_ #define _ProtocolInitiation_ namespace qpid { namespace framing { class ProtocolInitiation : public AMQDataBlock { private: ProtocolVersion version; public: QPID_COMMON_EXTERN ProtocolInitiation(); QPID_COMMON_EXTERN ProtocolInitiation(uint8_t major, uint8_t minor); QPID_COMMON_EXTERN ProtocolInitiation(ProtocolVersion p); QPID_COMMON_EXTERN virtual ~ProtocolInitiation(); QPID_COMMON_EXTERN virtual void encode(Buffer& buffer) const; QPID_COMMON_EXTERN virtual bool decode(Buffer& buffer); inline virtual uint32_t encodedSize() const { return 8; } inline uint8_t getMajor() const { return version.getMajor(); } inline uint8_t getMinor() const { return version.getMinor(); } inline ProtocolVersion getVersion() const { return version; } bool operator==(ProtocolVersion v) const { return v == getVersion(); } }; QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& o, const framing::ProtocolInitiation& pi); } } #endif qpidc-0.16/src/qpid/framing/StreamQosOkBody.cpp0000664000076400007640000000341111752725676022056 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/StreamQosOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void StreamQosOkBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void StreamQosOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void StreamQosOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void StreamQosOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t StreamQosOkBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t StreamQosOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void StreamQosOkBody::print(std::ostream& out) const { out << "{StreamQosOkBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/Endian.cpp0000664000076400007640000000272711227113407020213 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Endian.h" namespace qpid { namespace framing { Endian::Endian() : littleEndian(!testBigEndian()) {} bool Endian::testBigEndian() { uint16_t a = 1; uint16_t b; uint8_t* p = (uint8_t*) &b; p[0] = 0xFF & (a >> 8); p[1] = 0xFF & (a); return a == b; } uint8_t* Endian::convertIfRequired(uint8_t* const octets, int width) { if (instance.littleEndian) { for (int i = 0; i < (width/2); i++) { uint8_t temp = octets[i]; octets[i] = octets[width - (1 + i)]; octets[width - (1 + i)] = temp; } } return octets; } const Endian Endian::instance; }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/SessionAttachBody.h0000664000076400007640000000621611752725676022071 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONATTACHBODY_H #define QPID_FRAMING_SESSIONATTACHBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionAttachBody : public AMQMethodBody { std::string name; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0x1; SessionAttachBody( ProtocolVersion, const std::string& _name, bool _force) : name(_name), flags(0){ setForce(_force); flags |= (1 << 8); } SessionAttachBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setName(const std::string& _name); QPID_COMMON_EXTERN const std::string& getName() const; QPID_COMMON_EXTERN bool hasName() const; QPID_COMMON_EXTERN void clearNameFlag(); QPID_COMMON_EXTERN void setForce(bool _force); QPID_COMMON_EXTERN bool getForce() const; virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.attach(getName(), getForce()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionAttachBody */ }} #endif /*!QPID_FRAMING_SESSIONATTACHBODY_H*/ qpidc-0.16/src/qpid/framing/OutputHandler.h0000664000076400007640000000227611227113407021257 0ustar00jrossjross00000000000000#ifndef _OutputHandler_ #define _OutputHandler_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/FrameHandler.h" namespace qpid { namespace framing { // TODO aconway 2007-08-29: Replace with FrameHandler. class OutputHandler : public FrameHandler { public: virtual ~OutputHandler() {} virtual void send(AMQFrame&) = 0; void handle(AMQFrame& f) { send(f); } }; }} #endif qpidc-0.16/src/qpid/framing/FileQosOkBody.cpp0000664000076400007640000000336711752725676021514 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileQosOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileQosOkBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void FileQosOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileQosOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void FileQosOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileQosOkBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t FileQosOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileQosOkBody::print(std::ostream& out) const { out << "{FileQosOkBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionConfirmedBody.cpp0000664000076400007640000000567211752725676023133 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionConfirmedBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionConfirmedBody::setCommands(const SequenceSet& _commands) { commands = _commands; flags |= (1 << 8); } const SequenceSet& SessionConfirmedBody::getCommands() const { return commands; } bool SessionConfirmedBody::hasCommands() const { return flags & (1 << 8); } void SessionConfirmedBody::clearCommandsFlag() { flags &= ~(1 << 8); } void SessionConfirmedBody::setFragments(const Array& _fragments) { fragments = _fragments; flags |= (1 << 9); } const Array& SessionConfirmedBody::getFragments() const { return fragments; } bool SessionConfirmedBody::hasFragments() const { return flags & (1 << 9); } void SessionConfirmedBody::clearFragmentsFlag() { flags &= ~(1 << 9); } void SessionConfirmedBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) commands.encode(buffer); if (flags & (1 << 9)) fragments.encode(buffer); } void SessionConfirmedBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionConfirmedBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) commands.decode(buffer); if (flags & (1 << 9)) fragments.decode(buffer); } void SessionConfirmedBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionConfirmedBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += commands.encodedSize(); if (flags & (1 << 9)) total += fragments.encodedSize(); return total; } uint32_t SessionConfirmedBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionConfirmedBody::print(std::ostream& out) const { out << "{SessionConfirmedBody: "; if (flags & (1 << 8)) out << "commands=" << commands << "; "; if (flags & (1 << 9)) out << "fragments=" << fragments << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ExchangeUnbindBody.cpp0000664000076400007640000000712711752725676022540 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExchangeUnbindBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExchangeUnbindBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ExchangeUnbindBody::getQueue() const { return queue; } bool ExchangeUnbindBody::hasQueue() const { return flags & (1 << 8); } void ExchangeUnbindBody::clearQueueFlag() { flags &= ~(1 << 8); } void ExchangeUnbindBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 9); } const std::string& ExchangeUnbindBody::getExchange() const { return exchange; } bool ExchangeUnbindBody::hasExchange() const { return flags & (1 << 9); } void ExchangeUnbindBody::clearExchangeFlag() { flags &= ~(1 << 9); } void ExchangeUnbindBody::setBindingKey(const std::string& _bindingKey) { bindingKey = _bindingKey; flags |= (1 << 10); } const std::string& ExchangeUnbindBody::getBindingKey() const { return bindingKey; } bool ExchangeUnbindBody::hasBindingKey() const { return flags & (1 << 10); } void ExchangeUnbindBody::clearBindingKeyFlag() { flags &= ~(1 << 10); } void ExchangeUnbindBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putShortString(exchange); if (flags & (1 << 10)) buffer.putShortString(bindingKey); } void ExchangeUnbindBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ExchangeUnbindBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) buffer.getShortString(exchange); if (flags & (1 << 10)) buffer.getShortString(bindingKey); } void ExchangeUnbindBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ExchangeUnbindBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 1 + exchange.size(); if (flags & (1 << 10)) total += 1 + bindingKey.size(); return total; } uint32_t ExchangeUnbindBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ExchangeUnbindBody::print(std::ostream& out) const { out << "{ExchangeUnbindBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "exchange=" << exchange << "; "; if (flags & (1 << 10)) out << "binding-key=" << bindingKey << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionGapBody.cpp0000664000076400007640000000441011752725676021721 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionGapBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionGapBody::setCommands(const SequenceSet& _commands) { commands = _commands; flags |= (1 << 8); } const SequenceSet& SessionGapBody::getCommands() const { return commands; } bool SessionGapBody::hasCommands() const { return flags & (1 << 8); } void SessionGapBody::clearCommandsFlag() { flags &= ~(1 << 8); } void SessionGapBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) commands.encode(buffer); } void SessionGapBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionGapBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) commands.decode(buffer); } void SessionGapBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionGapBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += commands.encodedSize(); return total; } uint32_t SessionGapBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionGapBody::print(std::ostream& out) const { out << "{SessionGapBody: "; if (flags & (1 << 8)) out << "commands=" << commands << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterClockBody.cpp0000664000076400007640000000443711752725676022254 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterClockBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterClockBody::setTime(uint64_t _time) { time = _time; flags |= (1 << 8); } uint64_t ClusterClockBody::getTime() const { return time; } bool ClusterClockBody::hasTime() const { return flags & (1 << 8); } void ClusterClockBody::clearTimeFlag() { flags &= ~(1 << 8); } void ClusterClockBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(time); } void ClusterClockBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterClockBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) time = buffer.getLongLong(); } void ClusterClockBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterClockBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 8;//time return total; } uint32_t ClusterClockBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterClockBody::print(std::ostream& out) const { out << "{ClusterClockBody: "; if (flags & (1 << 8)) out << "time=" << time << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionShadowSetUserBody.cpp0000664000076400007640000000510511752725676025772 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionShadowSetUserBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionShadowSetUserBody::setUserId(const std::string& _userId) { userId = _userId; flags |= (1 << 8); } const std::string& ClusterConnectionShadowSetUserBody::getUserId() const { return userId; } bool ClusterConnectionShadowSetUserBody::hasUserId() const { return flags & (1 << 8); } void ClusterConnectionShadowSetUserBody::clearUserIdFlag() { flags &= ~(1 << 8); } void ClusterConnectionShadowSetUserBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(userId); } void ClusterConnectionShadowSetUserBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionShadowSetUserBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(userId); } void ClusterConnectionShadowSetUserBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionShadowSetUserBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + userId.size(); return total; } uint32_t ClusterConnectionShadowSetUserBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionShadowSetUserBody::print(std::ostream& out) const { out << "{ClusterConnectionShadowSetUserBody: "; if (flags & (1 << 8)) out << "user-id=" << userId << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/HeaderProperties.h0000664000076400007640000000236711227113407021727 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/Buffer.h" #ifndef _HeaderProperties_ #define _HeaderProperties_ namespace qpid { namespace framing { class HeaderProperties { public: inline virtual ~HeaderProperties(){} virtual uint8_t classId() const = 0; virtual uint32_t encodedSize() const = 0; virtual void encode(Buffer& buffer) const = 0; virtual void decode(Buffer& buffer, uint32_t size) = 0; }; } } #endif qpidc-0.16/src/qpid/framing/DtxSetTimeoutBody.h0000664000076400007640000000644111752725676022103 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXSETTIMEOUTBODY_H #define QPID_FRAMING_DTXSETTIMEOUTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include "qpid/framing/Xid.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxSetTimeoutBody : public ModelMethod { Xid xid; uint32_t timeout; uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0xa; DtxSetTimeoutBody( ProtocolVersion, const Xid& _xid, uint32_t _timeout) : xid(_xid), timeout(_timeout), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } DtxSetTimeoutBody(ProtocolVersion=ProtocolVersion()) : timeout(0), flags(0) {} QPID_COMMON_EXTERN void setXid(const Xid& _xid); QPID_COMMON_EXTERN const Xid& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); QPID_COMMON_EXTERN void setTimeout(uint32_t _timeout); QPID_COMMON_EXTERN uint32_t getTimeout() const; QPID_COMMON_EXTERN bool hasTimeout() const; QPID_COMMON_EXTERN void clearTimeoutFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.setTimeout(getXid(), getTimeout()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxSetTimeoutBody */ }} #endif /*!QPID_FRAMING_DTXSETTIMEOUTBODY_H*/ qpidc-0.16/src/qpid/framing/ExchangeBindBody.h0000664000076400007640000001016611752725676021637 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXCHANGEBINDBODY_H #define QPID_FRAMING_EXCHANGEBINDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExchangeBindBody : public ModelMethod { std::string queue; std::string exchange; std::string bindingKey; FieldTable arguments; uint16_t flags; public: static const ClassId CLASS_ID = 0x7; static const MethodId METHOD_ID = 0x4; ExchangeBindBody( ProtocolVersion, const std::string& _queue, const std::string& _exchange, const std::string& _bindingKey, const FieldTable& _arguments) : queue(_queue), exchange(_exchange), bindingKey(_bindingKey), arguments(_arguments), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); } ExchangeBindBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setBindingKey(const std::string& _bindingKey); QPID_COMMON_EXTERN const std::string& getBindingKey() const; QPID_COMMON_EXTERN bool hasBindingKey() const; QPID_COMMON_EXTERN void clearBindingKeyFlag(); QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments); QPID_COMMON_EXTERN const FieldTable& getArguments() const; QPID_COMMON_EXTERN FieldTable& getArguments(); QPID_COMMON_EXTERN bool hasArguments() const; QPID_COMMON_EXTERN void clearArgumentsFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.bind(getQueue(), getExchange(), getBindingKey(), getArguments()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExchangeBindBody */ }} #endif /*!QPID_FRAMING_EXCHANGEBINDBODY_H*/ qpidc-0.16/src/qpid/framing/StreamConsumeOkBody.cpp0000664000076400007640000000470111752725676022730 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/StreamConsumeOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void StreamConsumeOkBody::setConsumerTag(const std::string& _consumerTag) { consumerTag = _consumerTag; flags |= (1 << 8); } const std::string& StreamConsumeOkBody::getConsumerTag() const { return consumerTag; } bool StreamConsumeOkBody::hasConsumerTag() const { return flags & (1 << 8); } void StreamConsumeOkBody::clearConsumerTagFlag() { flags &= ~(1 << 8); } void StreamConsumeOkBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(consumerTag); } void StreamConsumeOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void StreamConsumeOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(consumerTag); } void StreamConsumeOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t StreamConsumeOkBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + consumerTag.size(); return total; } uint32_t StreamConsumeOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void StreamConsumeOkBody::print(std::ostream& out) const { out << "{StreamConsumeOkBody: "; if (flags & (1 << 8)) out << "consumer-tag=" << consumerTag << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionShadowPrepareBody.cpp0000664000076400007640000000522311752725676025777 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionShadowPrepareBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionShadowPrepareBody::setManagementId(const std::string& _managementId) { managementId = _managementId; flags |= (1 << 8); } const std::string& ClusterConnectionShadowPrepareBody::getManagementId() const { return managementId; } bool ClusterConnectionShadowPrepareBody::hasManagementId() const { return flags & (1 << 8); } void ClusterConnectionShadowPrepareBody::clearManagementIdFlag() { flags &= ~(1 << 8); } void ClusterConnectionShadowPrepareBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(managementId); } void ClusterConnectionShadowPrepareBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionShadowPrepareBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(managementId); } void ClusterConnectionShadowPrepareBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionShadowPrepareBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + managementId.size(); return total; } uint32_t ClusterConnectionShadowPrepareBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionShadowPrepareBody::print(std::ostream& out) const { out << "{ClusterConnectionShadowPrepareBody: "; if (flags & (1 << 8)) out << "management-id=" << managementId << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/AMQContentBody.cpp0000664000076400007640000000301211300563321021564 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQContentBody.h" #include qpid::framing::AMQContentBody::AMQContentBody(){ } qpid::framing::AMQContentBody::AMQContentBody(const string& _data) : data(_data){ } uint32_t qpid::framing::AMQContentBody::encodedSize() const{ return data.size(); } void qpid::framing::AMQContentBody::encode(Buffer& buffer) const{ buffer.putRawData(data); } void qpid::framing::AMQContentBody::decode(Buffer& buffer, uint32_t _size){ buffer.getRawData(data, _size); } void qpid::framing::AMQContentBody::print(std::ostream& out) const { out << "content (" << encodedSize() << " bytes)"; const size_t max = 32; out << " " << data.substr(0, max); if (data.size() > max) out << "..."; } qpidc-0.16/src/qpid/framing/MessageReleaseBody.h0000664000076400007640000000635611752725676022213 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGERELEASEBODY_H #define QPID_FRAMING_MESSAGERELEASEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageReleaseBody : public ModelMethod { SequenceSet transfers; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0x4; MessageReleaseBody( ProtocolVersion, const SequenceSet& _transfers, bool _setRedelivered) : transfers(_transfers), flags(0){ setSetRedelivered(_setRedelivered); flags |= (1 << 8); } MessageReleaseBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setTransfers(const SequenceSet& _transfers); QPID_COMMON_EXTERN const SequenceSet& getTransfers() const; QPID_COMMON_EXTERN bool hasTransfers() const; QPID_COMMON_EXTERN void clearTransfersFlag(); QPID_COMMON_EXTERN void setSetRedelivered(bool _setRedelivered); QPID_COMMON_EXTERN bool getSetRedelivered() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.release(getTransfers(), getSetRedelivered()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageReleaseBody */ }} #endif /*!QPID_FRAMING_MESSAGERELEASEBODY_H*/ qpidc-0.16/src/qpid/framing/MessageSetFlowModeBody.h0000664000076400007640000000663611752725676023024 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGESETFLOWMODEBODY_H #define QPID_FRAMING_MESSAGESETFLOWMODEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageSetFlowModeBody : public ModelMethod { std::string destination; uint8_t flowMode; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0x9; MessageSetFlowModeBody( ProtocolVersion, const std::string& _destination, uint8_t _flowMode) : destination(_destination), flowMode(_flowMode), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } MessageSetFlowModeBody(ProtocolVersion=ProtocolVersion()) : flowMode(0), flags(0) {} QPID_COMMON_EXTERN void setDestination(const std::string& _destination); QPID_COMMON_EXTERN const std::string& getDestination() const; QPID_COMMON_EXTERN bool hasDestination() const; QPID_COMMON_EXTERN void clearDestinationFlag(); QPID_COMMON_EXTERN void setFlowMode(uint8_t _flowMode); QPID_COMMON_EXTERN uint8_t getFlowMode() const; QPID_COMMON_EXTERN bool hasFlowMode() const; QPID_COMMON_EXTERN void clearFlowModeFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.setFlowMode(getDestination(), getFlowMode()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageSetFlowModeBody */ }} #endif /*!QPID_FRAMING_MESSAGESETFLOWMODEBODY_H*/ qpidc-0.16/src/qpid/framing/QueueDeclareBody.h0000664000076400007640000001103211752725676021655 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_QUEUEDECLAREBODY_H #define QPID_FRAMING_QUEUEDECLAREBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN QueueDeclareBody : public ModelMethod { std::string queue; std::string alternateExchange; FieldTable arguments; uint16_t flags; public: static const ClassId CLASS_ID = 0x8; static const MethodId METHOD_ID = 0x1; QueueDeclareBody( ProtocolVersion, const std::string& _queue, const std::string& _alternateExchange, bool _passive, bool _durable, bool _exclusive, bool _autoDelete, const FieldTable& _arguments) : queue(_queue), alternateExchange(_alternateExchange), arguments(_arguments), flags(0){ setPassive(_passive); setDurable(_durable); setExclusive(_exclusive); setAutoDelete(_autoDelete); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 14); } QueueDeclareBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setAlternateExchange(const std::string& _alternateExchange); QPID_COMMON_EXTERN const std::string& getAlternateExchange() const; QPID_COMMON_EXTERN bool hasAlternateExchange() const; QPID_COMMON_EXTERN void clearAlternateExchangeFlag(); QPID_COMMON_EXTERN void setPassive(bool _passive); QPID_COMMON_EXTERN bool getPassive() const; QPID_COMMON_EXTERN void setDurable(bool _durable); QPID_COMMON_EXTERN bool getDurable() const; QPID_COMMON_EXTERN void setExclusive(bool _exclusive); QPID_COMMON_EXTERN bool getExclusive() const; QPID_COMMON_EXTERN void setAutoDelete(bool _autoDelete); QPID_COMMON_EXTERN bool getAutoDelete() const; QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments); QPID_COMMON_EXTERN const FieldTable& getArguments() const; QPID_COMMON_EXTERN FieldTable& getArguments(); QPID_COMMON_EXTERN bool hasArguments() const; QPID_COMMON_EXTERN void clearArgumentsFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.declare(getQueue(), getAlternateExchange(), getPassive(), getDurable(), getExclusive(), getAutoDelete(), getArguments()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class QueueDeclareBody */ }} #endif /*!QPID_FRAMING_QUEUEDECLAREBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionManagementSetupStateBody.cpp0000664000076400007640000001413511752725676027333 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionManagementSetupStateBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionManagementSetupStateBody::setObjectNum(uint64_t _objectNum) { objectNum = _objectNum; flags |= (1 << 8); } uint64_t ClusterConnectionManagementSetupStateBody::getObjectNum() const { return objectNum; } bool ClusterConnectionManagementSetupStateBody::hasObjectNum() const { return flags & (1 << 8); } void ClusterConnectionManagementSetupStateBody::clearObjectNumFlag() { flags &= ~(1 << 8); } void ClusterConnectionManagementSetupStateBody::setBootSequence(uint16_t _bootSequence) { bootSequence = _bootSequence; flags |= (1 << 9); } uint16_t ClusterConnectionManagementSetupStateBody::getBootSequence() const { return bootSequence; } bool ClusterConnectionManagementSetupStateBody::hasBootSequence() const { return flags & (1 << 9); } void ClusterConnectionManagementSetupStateBody::clearBootSequenceFlag() { flags &= ~(1 << 9); } void ClusterConnectionManagementSetupStateBody::setBrokerId(const Uuid& _brokerId) { brokerId = _brokerId; flags |= (1 << 10); } const Uuid& ClusterConnectionManagementSetupStateBody::getBrokerId() const { return brokerId; } bool ClusterConnectionManagementSetupStateBody::hasBrokerId() const { return flags & (1 << 10); } void ClusterConnectionManagementSetupStateBody::clearBrokerIdFlag() { flags &= ~(1 << 10); } void ClusterConnectionManagementSetupStateBody::setVendor(const std::string& _vendor) { vendor = _vendor; flags |= (1 << 11); } const std::string& ClusterConnectionManagementSetupStateBody::getVendor() const { return vendor; } bool ClusterConnectionManagementSetupStateBody::hasVendor() const { return flags & (1 << 11); } void ClusterConnectionManagementSetupStateBody::clearVendorFlag() { flags &= ~(1 << 11); } void ClusterConnectionManagementSetupStateBody::setProduct(const std::string& _product) { product = _product; flags |= (1 << 12); } const std::string& ClusterConnectionManagementSetupStateBody::getProduct() const { return product; } bool ClusterConnectionManagementSetupStateBody::hasProduct() const { return flags & (1 << 12); } void ClusterConnectionManagementSetupStateBody::clearProductFlag() { flags &= ~(1 << 12); } void ClusterConnectionManagementSetupStateBody::setInstance(const std::string& _instance) { instance = _instance; flags |= (1 << 13); } const std::string& ClusterConnectionManagementSetupStateBody::getInstance() const { return instance; } bool ClusterConnectionManagementSetupStateBody::hasInstance() const { return flags & (1 << 13); } void ClusterConnectionManagementSetupStateBody::clearInstanceFlag() { flags &= ~(1 << 13); } void ClusterConnectionManagementSetupStateBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(objectNum); if (flags & (1 << 9)) buffer.putShort(bootSequence); if (flags & (1 << 10)) brokerId.encode(buffer); if (flags & (1 << 11)) buffer.putLongString(vendor); if (flags & (1 << 12)) buffer.putLongString(product); if (flags & (1 << 13)) buffer.putLongString(instance); } void ClusterConnectionManagementSetupStateBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionManagementSetupStateBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) objectNum = buffer.getLongLong(); if (flags & (1 << 9)) bootSequence = buffer.getShort(); if (flags & (1 << 10)) brokerId.decode(buffer); if (flags & (1 << 11)) buffer.getLongString(vendor); if (flags & (1 << 12)) buffer.getLongString(product); if (flags & (1 << 13)) buffer.getLongString(instance); } void ClusterConnectionManagementSetupStateBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionManagementSetupStateBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 8;//objectNum if (flags & (1 << 9)) total += 2;//bootSequence if (flags & (1 << 10)) total += brokerId.encodedSize(); if (flags & (1 << 11)) total += 4 + vendor.size(); if (flags & (1 << 12)) total += 4 + product.size(); if (flags & (1 << 13)) total += 4 + instance.size(); return total; } uint32_t ClusterConnectionManagementSetupStateBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionManagementSetupStateBody::print(std::ostream& out) const { out << "{ClusterConnectionManagementSetupStateBody: "; if (flags & (1 << 8)) out << "objectNum=" << objectNum << "; "; if (flags & (1 << 9)) out << "bootSequence=" << bootSequence << "; "; if (flags & (1 << 10)) out << "broker-id=" << brokerId << "; "; if (flags & (1 << 11)) out << "vendor=" << vendor << "; "; if (flags & (1 << 12)) out << "product=" << product << "; "; if (flags & (1 << 13)) out << "instance=" << instance << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionDetachedBody.h0000664000076400007640000000645611752725676022374 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONDETACHEDBODY_H #define QPID_FRAMING_SESSIONDETACHEDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionDetachedBody : public AMQMethodBody { std::string name; uint8_t code; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0x4; SessionDetachedBody( ProtocolVersion, const std::string& _name, uint8_t _code) : name(_name), code(_code), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } SessionDetachedBody(ProtocolVersion=ProtocolVersion()) : code(0), flags(0) {} QPID_COMMON_EXTERN void setName(const std::string& _name); QPID_COMMON_EXTERN const std::string& getName() const; QPID_COMMON_EXTERN bool hasName() const; QPID_COMMON_EXTERN void clearNameFlag(); QPID_COMMON_EXTERN void setCode(uint8_t _code); QPID_COMMON_EXTERN uint8_t getCode() const; QPID_COMMON_EXTERN bool hasCode() const; QPID_COMMON_EXTERN void clearCodeFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.detached(getName(), getCode()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionDetachedBody */ }} #endif /*!QPID_FRAMING_SESSIONDETACHEDBODY_H*/ qpidc-0.16/src/qpid/framing/ConnectionTuneBody.h0000664000076400007640000001027011752725676022247 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONTUNEBODY_H #define QPID_FRAMING_CONNECTIONTUNEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionTuneBody : public AMQMethodBody { uint16_t channelMax; uint16_t maxFrameSize; uint16_t heartbeatMin; uint16_t heartbeatMax; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0x5; ConnectionTuneBody( ProtocolVersion, uint16_t _channelMax, uint16_t _maxFrameSize, uint16_t _heartbeatMin, uint16_t _heartbeatMax) : channelMax(_channelMax), maxFrameSize(_maxFrameSize), heartbeatMin(_heartbeatMin), heartbeatMax(_heartbeatMax), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); } ConnectionTuneBody(ProtocolVersion=ProtocolVersion()) : channelMax(0), maxFrameSize(0), heartbeatMin(0), heartbeatMax(0), flags(0) {} QPID_COMMON_EXTERN void setChannelMax(uint16_t _channelMax); QPID_COMMON_EXTERN uint16_t getChannelMax() const; QPID_COMMON_EXTERN bool hasChannelMax() const; QPID_COMMON_EXTERN void clearChannelMaxFlag(); QPID_COMMON_EXTERN void setMaxFrameSize(uint16_t _maxFrameSize); QPID_COMMON_EXTERN uint16_t getMaxFrameSize() const; QPID_COMMON_EXTERN bool hasMaxFrameSize() const; QPID_COMMON_EXTERN void clearMaxFrameSizeFlag(); QPID_COMMON_EXTERN void setHeartbeatMin(uint16_t _heartbeatMin); QPID_COMMON_EXTERN uint16_t getHeartbeatMin() const; QPID_COMMON_EXTERN bool hasHeartbeatMin() const; QPID_COMMON_EXTERN void clearHeartbeatMinFlag(); QPID_COMMON_EXTERN void setHeartbeatMax(uint16_t _heartbeatMax); QPID_COMMON_EXTERN uint16_t getHeartbeatMax() const; QPID_COMMON_EXTERN bool hasHeartbeatMax() const; QPID_COMMON_EXTERN void clearHeartbeatMaxFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.tune(getChannelMax(), getMaxFrameSize(), getHeartbeatMin(), getHeartbeatMax()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionTuneBody */ }} #endif /*!QPID_FRAMING_CONNECTIONTUNEBODY_H*/ qpidc-0.16/src/qpid/framing/Buffer.cpp0000664000076400007640000001724411522036207020226 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Buffer.h" #include "qpid/framing/FieldTable.h" #include "qpid/Msg.h" #include #include namespace qpid { namespace framing { Buffer::Buffer(char* _data, uint32_t _size) : size(_size), data(_data), position(0) { } void Buffer::record(){ r_position = position; } void Buffer::restore(bool reRecord){ uint32_t savedPosition = position; position = r_position; if (reRecord) r_position = savedPosition; } void Buffer::reset(){ position = 0; } /////////////////////////////////////////////////// void Buffer::putOctet(uint8_t i){ data[position++] = i; assert(position <= size); } void Buffer::putShort(uint16_t i){ uint16_t b = i; data[position++] = (uint8_t) (0xFF & (b >> 8)); data[position++] = (uint8_t) (0xFF & b); assert(position <= size); } void Buffer::putLong(uint32_t i){ uint32_t b = i; data[position++] = (uint8_t) (0xFF & (b >> 24)); data[position++] = (uint8_t) (0xFF & (b >> 16)); data[position++] = (uint8_t) (0xFF & (b >> 8)); data[position++] = (uint8_t) (0xFF & b); assert(position <= size); } void Buffer::putLongLong(uint64_t i){ uint32_t hi = i >> 32; uint32_t lo = i; putLong(hi); putLong(lo); } void Buffer::putInt8(int8_t i){ data[position++] = (uint8_t) i; assert(position <= size); } void Buffer::putInt16(int16_t i){ putShort((uint16_t) i); } void Buffer::putInt32(int32_t i){ putLong((uint32_t) i); } void Buffer::putInt64(int64_t i){ putLongLong((uint64_t) i); } void Buffer::putFloat(float f){ union { uint32_t i; float f; } val; val.f = f; putLong (val.i); } void Buffer::putDouble(double f){ union { uint64_t i; double f; } val; val.f = f; putLongLong (val.i); } void Buffer::putBin128(const uint8_t* b){ memcpy (data + position, b, 16); position += 16; } uint8_t Buffer::getOctet(){ uint8_t octet = static_cast(data[position++]); assert(position <= size); return octet; } uint16_t Buffer::getShort(){ uint16_t hi = (unsigned char) data[position++]; hi = hi << 8; hi |= (unsigned char) data[position++]; assert(position <= size); return hi; } uint32_t Buffer::getLong(){ uint32_t a = (unsigned char) data[position++]; uint32_t b = (unsigned char) data[position++]; uint32_t c = (unsigned char) data[position++]; uint32_t d = (unsigned char) data[position++]; assert(position <= size); a = a << 24; a |= b << 16; a |= c << 8; a |= d; return a; } uint64_t Buffer::getLongLong(){ uint64_t hi = getLong(); uint64_t lo = getLong(); hi = hi << 32; return hi | lo; } int8_t Buffer::getInt8(){ int8_t i = static_cast(data[position++]); assert(position <= size); return i; } int16_t Buffer::getInt16(){ return (int16_t) getShort(); } int32_t Buffer::getInt32(){ return (int32_t) getLong(); } int64_t Buffer::getInt64(){ return (int64_t) getLongLong(); } float Buffer::getFloat(){ union { uint32_t i; float f; } val; val.i = getLong(); return val.f; } double Buffer::getDouble(){ union { uint64_t i; double f; } val; val.i = getLongLong(); return val.f; } template <> uint64_t Buffer::getUInt<1>() { return getOctet(); } template <> uint64_t Buffer::getUInt<2>() { return getShort(); } template <> uint64_t Buffer::getUInt<4>() { return getLong(); } template <> uint64_t Buffer::getUInt<8>() { return getLongLong(); } template <> void Buffer::putUInt<1>(uint64_t i) { if (std::numeric_limits::min() <= i && i <= std::numeric_limits::max()) { putOctet(i); return; } throw Exception(QPID_MSG("Could not encode (" << i << ") as uint8_t.")); } template <> void Buffer::putUInt<2>(uint64_t i) { if (std::numeric_limits::min() <= i && i <= std::numeric_limits::max()) { putShort(i); return; } throw Exception(QPID_MSG("Could not encode (" << i << ") as uint16_t.")); } template <> void Buffer::putUInt<4>(uint64_t i) { if (std::numeric_limits::min() <= i && i <= std::numeric_limits::max()) { putLong(i); return; } throw Exception(QPID_MSG("Could not encode (" << i << ") as uint32_t.")); } template <> void Buffer::putUInt<8>(uint64_t i) { putLongLong(i); } void Buffer::putShortString(const string& s){ size_t slen = s.length(); if (slen <= std::numeric_limits::max()) { uint8_t len = (uint8_t) slen; checkAvailable(slen + 1); putOctet(len); s.copy(data + position, len); position += len; return; } throw Exception(QPID_MSG("Could not encode string of " << slen << " bytes as uint8_t string.")); } void Buffer::putMediumString(const string& s){ size_t slen = s.length(); if (slen <= std::numeric_limits::max()) { uint16_t len = (uint16_t) slen; checkAvailable(slen + 2); putShort(len); s.copy(data + position, len); position += len; return; } throw Exception(QPID_MSG("Could not encode string of " << slen << " bytes as uint16_t string.")); } void Buffer::putLongString(const string& s){ uint32_t len = s.length(); checkAvailable(len + 4); putLong(len); s.copy(data + position, len); position += len; } void Buffer::getShortString(string& s){ uint8_t len = getOctet(); checkAvailable(len); s.assign(data + position, len); position += len; } void Buffer::getMediumString(string& s){ uint16_t len = getShort(); checkAvailable(len); s.assign(data + position, len); position += len; } void Buffer::getLongString(string& s){ uint32_t len = getLong(); checkAvailable(len); s.assign(data + position, len); position += len; } void Buffer::getBin128(uint8_t* b){ memcpy (b, data + position, 16); position += 16; } void Buffer::putRawData(const string& s){ uint32_t len = s.length(); checkAvailable(len); s.copy(data + position, len); position += len; } void Buffer::getRawData(string& s, uint32_t len){ checkAvailable(len); s.assign(data + position, len); position += len; } void Buffer::putRawData(const uint8_t* s, size_t len){ checkAvailable(len); memcpy(data + position, s, len); position += len; } void Buffer::getRawData(uint8_t* s, size_t len){ checkAvailable(len); memcpy(s, data + position, len); position += len; } void Buffer::dump(std::ostream& out) const { for (uint32_t i = position; i < size; i++) { if (i != position) out << " "; out << boost::format("%02x") % ((unsigned) (uint8_t) data[i]); } } std::ostream& operator<<(std::ostream& out, const Buffer& b){ out << "Buffer["; b.dump(out); return out << "]"; } }} qpidc-0.16/src/qpid/framing/ClusterConnectionDtxStartBody.cpp0000664000076400007640000000717211752725676025015 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionDtxStartBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionDtxStartBody::setXid(const std::string& _xid) { xid = _xid; flags |= (1 << 8); } const std::string& ClusterConnectionDtxStartBody::getXid() const { return xid; } bool ClusterConnectionDtxStartBody::hasXid() const { return flags & (1 << 8); } void ClusterConnectionDtxStartBody::clearXidFlag() { flags &= ~(1 << 8); } void ClusterConnectionDtxStartBody::setEnded(bool _ended) { if (_ended) flags |= (1 << 9); else flags &= ~(1 << 9); } bool ClusterConnectionDtxStartBody::getEnded() const { return flags & (1 << 9); } void ClusterConnectionDtxStartBody::setSuspended(bool _suspended) { if (_suspended) flags |= (1 << 10); else flags &= ~(1 << 10); } bool ClusterConnectionDtxStartBody::getSuspended() const { return flags & (1 << 10); } void ClusterConnectionDtxStartBody::setFailed(bool _failed) { if (_failed) flags |= (1 << 11); else flags &= ~(1 << 11); } bool ClusterConnectionDtxStartBody::getFailed() const { return flags & (1 << 11); } void ClusterConnectionDtxStartBody::setExpired(bool _expired) { if (_expired) flags |= (1 << 12); else flags &= ~(1 << 12); } bool ClusterConnectionDtxStartBody::getExpired() const { return flags & (1 << 12); } void ClusterConnectionDtxStartBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(xid); } void ClusterConnectionDtxStartBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionDtxStartBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(xid); } void ClusterConnectionDtxStartBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionDtxStartBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + xid.size(); return total; } uint32_t ClusterConnectionDtxStartBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionDtxStartBody::print(std::ostream& out) const { out << "{ClusterConnectionDtxStartBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; if (flags & (1 << 9)) out << "ended=" << getEnded() << "; "; if (flags & (1 << 10)) out << "suspended=" << getSuspended() << "; "; if (flags & (1 << 11)) out << "failed=" << getFailed() << "; "; if (flags & (1 << 12)) out << "expired=" << getExpired() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionAnnounceBody.h0000664000076400007640000001126511752725676024451 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONANNOUNCEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONANNOUNCEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionAnnounceBody : public ModelMethod { std::string managementId; uint32_t ssf; std::string authid; std::string username; std::string initialFrames; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x1; ClusterConnectionAnnounceBody( ProtocolVersion, const std::string& _managementId, uint32_t _ssf, const std::string& _authid, bool _nodict, const std::string& _username, const std::string& _initialFrames) : managementId(_managementId), ssf(_ssf), authid(_authid), username(_username), initialFrames(_initialFrames), flags(0){ setNodict(_nodict); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 12); flags |= (1 << 13); } ClusterConnectionAnnounceBody(ProtocolVersion=ProtocolVersion()) : ssf(0), flags(0) {} QPID_COMMON_EXTERN void setManagementId(const std::string& _managementId); QPID_COMMON_EXTERN const std::string& getManagementId() const; QPID_COMMON_EXTERN bool hasManagementId() const; QPID_COMMON_EXTERN void clearManagementIdFlag(); QPID_COMMON_EXTERN void setSsf(uint32_t _ssf); QPID_COMMON_EXTERN uint32_t getSsf() const; QPID_COMMON_EXTERN bool hasSsf() const; QPID_COMMON_EXTERN void clearSsfFlag(); QPID_COMMON_EXTERN void setAuthid(const std::string& _authid); QPID_COMMON_EXTERN const std::string& getAuthid() const; QPID_COMMON_EXTERN bool hasAuthid() const; QPID_COMMON_EXTERN void clearAuthidFlag(); QPID_COMMON_EXTERN void setNodict(bool _nodict); QPID_COMMON_EXTERN bool getNodict() const; QPID_COMMON_EXTERN void setUsername(const std::string& _username); QPID_COMMON_EXTERN const std::string& getUsername() const; QPID_COMMON_EXTERN bool hasUsername() const; QPID_COMMON_EXTERN void clearUsernameFlag(); QPID_COMMON_EXTERN void setInitialFrames(const std::string& _initialFrames); QPID_COMMON_EXTERN const std::string& getInitialFrames() const; QPID_COMMON_EXTERN bool hasInitialFrames() const; QPID_COMMON_EXTERN void clearInitialFramesFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.announce(getManagementId(), getSsf(), getAuthid(), getNodict(), getUsername(), getInitialFrames()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionAnnounceBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONANNOUNCEBODY_H*/ qpidc-0.16/src/qpid/framing/TransferContent.cpp0000664000076400007640000000515111725251223022130 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/TransferContent.h" namespace qpid { namespace framing { TransferContent::TransferContent(const std::string& data, const std::string& key) { setData(data); if (!key.empty()) getDeliveryProperties().setRoutingKey(key); } const AMQHeaderBody& TransferContent::getHeader() const { return header; } const std::string& TransferContent::getData() const { return data; } std::string& TransferContent::getData() { return data; } void TransferContent::setData(const std::string& _data) { data = _data; header.get(true)->setContentLength(data.size()); } void TransferContent::appendData(const std::string& _data) { data += _data; header.get(true)->setContentLength(data.size()); } MessageProperties& TransferContent::getMessageProperties() { return *header.get(true); } DeliveryProperties& TransferContent::getDeliveryProperties() { return *header.get(true); } void TransferContent::populate(const FrameSet& frameset) { const AMQHeaderBody* h = frameset.getHeaders(); if (h) { header = *h; } frameset.getContent(data); } const MessageProperties& TransferContent::getMessageProperties() const { const MessageProperties* props = header.get(); if (!props) throw Exception("No message properties."); return *props; } const DeliveryProperties& TransferContent::getDeliveryProperties() const { const DeliveryProperties* props = header.get(); if (!props) throw Exception("No message properties."); return *props; } bool TransferContent::hasMessageProperties() const { return header.get(); } bool TransferContent::hasDeliveryProperties() const { return header.get(); } }} qpidc-0.16/src/qpid/framing/ClusterConnectionTxEnqueueBody.h0000664000076400007640000000610311752725676024621 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONTXENQUEUEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONTXENQUEUEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionTxEnqueueBody : public ModelMethod { std::string queue; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x15; ClusterConnectionTxEnqueueBody( ProtocolVersion, const std::string& _queue) : queue(_queue), flags(0){ flags |= (1 << 8); } ClusterConnectionTxEnqueueBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.txEnqueue(getQueue()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionTxEnqueueBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONTXENQUEUEBODY_H*/ qpidc-0.16/src/qpid/framing/MessageSetFlowModeBody.cpp0000664000076400007640000000607711752725676023356 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageSetFlowModeBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageSetFlowModeBody::setDestination(const std::string& _destination) { destination = _destination; flags |= (1 << 8); } const std::string& MessageSetFlowModeBody::getDestination() const { return destination; } bool MessageSetFlowModeBody::hasDestination() const { return flags & (1 << 8); } void MessageSetFlowModeBody::clearDestinationFlag() { flags &= ~(1 << 8); } void MessageSetFlowModeBody::setFlowMode(uint8_t _flowMode) { flowMode = _flowMode; flags |= (1 << 9); } uint8_t MessageSetFlowModeBody::getFlowMode() const { return flowMode; } bool MessageSetFlowModeBody::hasFlowMode() const { return flags & (1 << 9); } void MessageSetFlowModeBody::clearFlowModeFlag() { flags &= ~(1 << 9); } void MessageSetFlowModeBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(destination); if (flags & (1 << 9)) buffer.putOctet(flowMode); } void MessageSetFlowModeBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageSetFlowModeBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(destination); if (flags & (1 << 9)) flowMode = buffer.getOctet(); } void MessageSetFlowModeBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageSetFlowModeBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + destination.size(); if (flags & (1 << 9)) total += 1;//flowMode return total; } uint32_t MessageSetFlowModeBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageSetFlowModeBody::print(std::ostream& out) const { out << "{MessageSetFlowModeBody: "; if (flags & (1 << 8)) out << "destination=" << destination << "; "; if (flags & (1 << 9)) out << "flow-mode=" << (int) flowMode << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/AllInvoker.cpp0000664000076400007640000015137711752725675021114 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AllInvoker.h" #include "qpid/framing/ConnectionStartBody.h" #include "qpid/framing/ConnectionStartOkBody.h" #include "qpid/framing/ConnectionSecureBody.h" #include "qpid/framing/ConnectionSecureOkBody.h" #include "qpid/framing/ConnectionTuneBody.h" #include "qpid/framing/ConnectionTuneOkBody.h" #include "qpid/framing/ConnectionOpenBody.h" #include "qpid/framing/ConnectionOpenOkBody.h" #include "qpid/framing/ConnectionRedirectBody.h" #include "qpid/framing/ConnectionHeartbeatBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/framing/SessionAttachBody.h" #include "qpid/framing/SessionAttachedBody.h" #include "qpid/framing/SessionDetachBody.h" #include "qpid/framing/SessionDetachedBody.h" #include "qpid/framing/SessionRequestTimeoutBody.h" #include "qpid/framing/SessionTimeoutBody.h" #include "qpid/framing/SessionCommandPointBody.h" #include "qpid/framing/SessionExpectedBody.h" #include "qpid/framing/SessionConfirmedBody.h" #include "qpid/framing/SessionCompletedBody.h" #include "qpid/framing/SessionKnownCompletedBody.h" #include "qpid/framing/SessionFlushBody.h" #include "qpid/framing/SessionGapBody.h" #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/ExecutionResultBody.h" #include "qpid/framing/ExecutionExceptionBody.h" #include "qpid/framing/MessageAcceptBody.h" #include "qpid/framing/MessageRejectBody.h" #include "qpid/framing/MessageReleaseBody.h" #include "qpid/framing/MessageAcquireBody.h" #include "qpid/framing/MessageResumeBody.h" #include "qpid/framing/MessageSubscribeBody.h" #include "qpid/framing/MessageCancelBody.h" #include "qpid/framing/MessageSetFlowModeBody.h" #include "qpid/framing/MessageFlowBody.h" #include "qpid/framing/MessageFlushBody.h" #include "qpid/framing/MessageStopBody.h" #include "qpid/framing/TxSelectBody.h" #include "qpid/framing/TxCommitBody.h" #include "qpid/framing/TxRollbackBody.h" #include "qpid/framing/DtxSelectBody.h" #include "qpid/framing/DtxStartBody.h" #include "qpid/framing/DtxEndBody.h" #include "qpid/framing/DtxCommitBody.h" #include "qpid/framing/DtxForgetBody.h" #include "qpid/framing/DtxGetTimeoutBody.h" #include "qpid/framing/DtxPrepareBody.h" #include "qpid/framing/DtxRecoverBody.h" #include "qpid/framing/DtxRollbackBody.h" #include "qpid/framing/DtxSetTimeoutBody.h" #include "qpid/framing/ExchangeDeclareBody.h" #include "qpid/framing/ExchangeDeleteBody.h" #include "qpid/framing/ExchangeQueryBody.h" #include "qpid/framing/ExchangeBindBody.h" #include "qpid/framing/ExchangeUnbindBody.h" #include "qpid/framing/ExchangeBoundBody.h" #include "qpid/framing/QueueDeclareBody.h" #include "qpid/framing/QueueDeleteBody.h" #include "qpid/framing/QueuePurgeBody.h" #include "qpid/framing/QueueQueryBody.h" #include "qpid/framing/FileQosBody.h" #include "qpid/framing/FileQosOkBody.h" #include "qpid/framing/FileConsumeBody.h" #include "qpid/framing/FileConsumeOkBody.h" #include "qpid/framing/FileCancelBody.h" #include "qpid/framing/FileOpenBody.h" #include "qpid/framing/FileOpenOkBody.h" #include "qpid/framing/FilePublishBody.h" #include "qpid/framing/FileDeliverBody.h" #include "qpid/framing/FileAckBody.h" #include "qpid/framing/FileRejectBody.h" #include "qpid/framing/StreamQosBody.h" #include "qpid/framing/StreamQosOkBody.h" #include "qpid/framing/StreamConsumeBody.h" #include "qpid/framing/StreamConsumeOkBody.h" #include "qpid/framing/StreamCancelBody.h" #include "qpid/framing/ClusterUpdateRequestBody.h" #include "qpid/framing/ClusterUpdateOfferBody.h" #include "qpid/framing/ClusterRetractOfferBody.h" #include "qpid/framing/ClusterInitialStatusBody.h" #include "qpid/framing/ClusterReadyBody.h" #include "qpid/framing/ClusterConfigChangeBody.h" #include "qpid/framing/ClusterErrorCheckBody.h" #include "qpid/framing/ClusterTimerWakeupBody.h" #include "qpid/framing/ClusterTimerDropBody.h" #include "qpid/framing/ClusterShutdownBody.h" #include "qpid/framing/ClusterDeliverToQueueBody.h" #include "qpid/framing/ClusterClockBody.h" #include "qpid/framing/ClusterConnectionAnnounceBody.h" #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/ClusterConnectionDeliverDoOutputBody.h" #include "qpid/framing/ClusterConnectionAbortBody.h" #include "qpid/framing/ClusterConnectionShadowSetUserBody.h" #include "qpid/framing/ClusterConnectionShadowPrepareBody.h" #include "qpid/framing/ClusterConnectionConsumerStateBody.h" #include "qpid/framing/ClusterConnectionDeliveryRecordBody.h" #include "qpid/framing/ClusterConnectionTxStartBody.h" #include "qpid/framing/ClusterConnectionTxAcceptBody.h" #include "qpid/framing/ClusterConnectionTxDequeueBody.h" #include "qpid/framing/ClusterConnectionTxEnqueueBody.h" #include "qpid/framing/ClusterConnectionTxPublishBody.h" #include "qpid/framing/ClusterConnectionTxEndBody.h" #include "qpid/framing/ClusterConnectionAccumulatedAckBody.h" #include "qpid/framing/ClusterConnectionOutputTaskBody.h" #include "qpid/framing/ClusterConnectionDtxStartBody.h" #include "qpid/framing/ClusterConnectionDtxEndBody.h" #include "qpid/framing/ClusterConnectionDtxAckBody.h" #include "qpid/framing/ClusterConnectionDtxBufferRefBody.h" #include "qpid/framing/ClusterConnectionDtxWorkRecordBody.h" #include "qpid/framing/ClusterConnectionSessionStateBody.h" #include "qpid/framing/ClusterConnectionShadowReadyBody.h" #include "qpid/framing/ClusterConnectionMembershipBody.h" #include "qpid/framing/ClusterConnectionRetractOfferBody.h" #include "qpid/framing/ClusterConnectionQueuePositionBody.h" #include "qpid/framing/ClusterConnectionExchangeBody.h" #include "qpid/framing/ClusterConnectionAddQueueListenerBody.h" #include "qpid/framing/ClusterConnectionManagementSetupStateBody.h" #include "qpid/framing/ClusterConnectionConfigBody.h" #include "qpid/framing/ClusterConnectionQueueFairshareStateBody.h" #include "qpid/framing/ClusterConnectionQueueObserverStateBody.h" #include "qpid/framing/ClusterConnectionClockBody.h" #include "qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h" namespace qpid { namespace framing { void AMQP_AllOperations::Invoker::visit(const ConnectionStartBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionStartOkBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionSecureBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionSecureOkBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionTuneBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionTuneOkBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionOpenBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionOpenOkBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionRedirectBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionHeartbeatBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionCloseBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ConnectionCloseOkBody& body) { AMQP_AllOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionAttachBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionAttachedBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionDetachBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionDetachedBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionRequestTimeoutBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionTimeoutBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionCommandPointBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionExpectedBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionConfirmedBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionCompletedBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionKnownCompletedBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionFlushBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const SessionGapBody& body) { AMQP_AllOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ExecutionSyncBody& body) { AMQP_AllOperations::ExecutionHandler::Invoker invoker(*target.getExecutionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ExecutionResultBody& body) { AMQP_AllOperations::ExecutionHandler::Invoker invoker(*target.getExecutionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ExecutionExceptionBody& body) { AMQP_AllOperations::ExecutionHandler::Invoker invoker(*target.getExecutionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageAcceptBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageRejectBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageReleaseBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageAcquireBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageResumeBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageSubscribeBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageCancelBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageSetFlowModeBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageFlowBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageFlushBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const MessageStopBody& body) { AMQP_AllOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const TxSelectBody& body) { AMQP_AllOperations::TxHandler::Invoker invoker(*target.getTxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const TxCommitBody& body) { AMQP_AllOperations::TxHandler::Invoker invoker(*target.getTxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const TxRollbackBody& body) { AMQP_AllOperations::TxHandler::Invoker invoker(*target.getTxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxSelectBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxStartBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxEndBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxCommitBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxForgetBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxGetTimeoutBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxPrepareBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxRecoverBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxRollbackBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const DtxSetTimeoutBody& body) { AMQP_AllOperations::DtxHandler::Invoker invoker(*target.getDtxHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ExchangeDeclareBody& body) { AMQP_AllOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ExchangeDeleteBody& body) { AMQP_AllOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ExchangeQueryBody& body) { AMQP_AllOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ExchangeBindBody& body) { AMQP_AllOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ExchangeUnbindBody& body) { AMQP_AllOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ExchangeBoundBody& body) { AMQP_AllOperations::ExchangeHandler::Invoker invoker(*target.getExchangeHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const QueueDeclareBody& body) { AMQP_AllOperations::QueueHandler::Invoker invoker(*target.getQueueHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const QueueDeleteBody& body) { AMQP_AllOperations::QueueHandler::Invoker invoker(*target.getQueueHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const QueuePurgeBody& body) { AMQP_AllOperations::QueueHandler::Invoker invoker(*target.getQueueHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const QueueQueryBody& body) { AMQP_AllOperations::QueueHandler::Invoker invoker(*target.getQueueHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileQosBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileQosOkBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileConsumeBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileConsumeOkBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileCancelBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileOpenBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileOpenOkBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FilePublishBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileDeliverBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileAckBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const FileRejectBody& body) { AMQP_AllOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const StreamQosBody& body) { AMQP_AllOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const StreamQosOkBody& body) { AMQP_AllOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const StreamConsumeBody& body) { AMQP_AllOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const StreamConsumeOkBody& body) { AMQP_AllOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const StreamCancelBody& body) { AMQP_AllOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterUpdateRequestBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterUpdateOfferBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterRetractOfferBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterInitialStatusBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterReadyBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConfigChangeBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterErrorCheckBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterTimerWakeupBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterTimerDropBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterShutdownBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterDeliverToQueueBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterClockBody& body) { AMQP_AllOperations::ClusterHandler::Invoker invoker(*target.getClusterHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionAnnounceBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionDeliverCloseBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionDeliverDoOutputBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionAbortBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionShadowSetUserBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionShadowPrepareBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionConsumerStateBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionDeliveryRecordBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionTxStartBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionTxAcceptBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionTxDequeueBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionTxEnqueueBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionTxPublishBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionTxEndBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionAccumulatedAckBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionOutputTaskBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionDtxStartBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionDtxEndBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionDtxAckBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionDtxBufferRefBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionDtxWorkRecordBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionSessionStateBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionShadowReadyBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionMembershipBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionRetractOfferBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionQueuePositionBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionExchangeBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionAddQueueListenerBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionManagementSetupStateBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionConfigBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionQueueFairshareStateBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionQueueObserverStateBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionClockBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::Invoker::visit(const ClusterConnectionQueueDequeueSincePurgeStateBody& body) { AMQP_AllOperations::ClusterConnectionHandler::Invoker invoker(*target.getClusterConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionStartBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionStartOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionSecureBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionSecureOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionTuneBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionTuneOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionOpenBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionOpenOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionRedirectBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionHeartbeatBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionCloseBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ConnectionHandler::Invoker::visit(const ConnectionCloseOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionAttachBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionAttachedBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionDetachBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionDetachedBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionRequestTimeoutBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionTimeoutBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionCommandPointBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionExpectedBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionConfirmedBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionCompletedBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionKnownCompletedBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionFlushBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::SessionHandler::Invoker::visit(const SessionGapBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ExecutionHandler::Invoker::visit(const ExecutionSyncBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ExecutionHandler::Invoker::visit(const ExecutionResultBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ExecutionHandler::Invoker::visit(const ExecutionExceptionBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageAcceptBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageRejectBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageReleaseBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageAcquireBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageResumeBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageSubscribeBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageCancelBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageSetFlowModeBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageFlowBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageFlushBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::MessageHandler::Invoker::visit(const MessageStopBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::TxHandler::Invoker::visit(const TxSelectBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::TxHandler::Invoker::visit(const TxCommitBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::TxHandler::Invoker::visit(const TxRollbackBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxSelectBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxStartBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxEndBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxCommitBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxForgetBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxGetTimeoutBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxPrepareBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxRecoverBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxRollbackBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::DtxHandler::Invoker::visit(const DtxSetTimeoutBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ExchangeHandler::Invoker::visit(const ExchangeDeclareBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ExchangeHandler::Invoker::visit(const ExchangeDeleteBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ExchangeHandler::Invoker::visit(const ExchangeQueryBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::ExchangeHandler::Invoker::visit(const ExchangeBindBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ExchangeHandler::Invoker::visit(const ExchangeUnbindBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ExchangeHandler::Invoker::visit(const ExchangeBoundBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::QueueHandler::Invoker::visit(const QueueDeclareBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::QueueHandler::Invoker::visit(const QueueDeleteBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::QueueHandler::Invoker::visit(const QueuePurgeBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::QueueHandler::Invoker::visit(const QueueQueryBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileQosBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileQosOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileConsumeBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileConsumeOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileCancelBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileOpenBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileOpenOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FilePublishBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileDeliverBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileAckBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::FileHandler::Invoker::visit(const FileRejectBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::StreamHandler::Invoker::visit(const StreamQosBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::StreamHandler::Invoker::visit(const StreamQosOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::StreamHandler::Invoker::visit(const StreamConsumeBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::StreamHandler::Invoker::visit(const StreamConsumeOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::StreamHandler::Invoker::visit(const StreamCancelBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterUpdateRequestBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterUpdateOfferBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterRetractOfferBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterInitialStatusBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterReadyBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterConfigChangeBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterErrorCheckBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterTimerWakeupBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterTimerDropBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterShutdownBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterDeliverToQueueBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterHandler::Invoker::visit(const ClusterClockBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionAnnounceBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionDeliverCloseBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionDeliverDoOutputBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionAbortBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionShadowSetUserBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionShadowPrepareBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionConsumerStateBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionDeliveryRecordBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionTxStartBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionTxAcceptBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionTxDequeueBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionTxEnqueueBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionTxPublishBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionTxEndBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionAccumulatedAckBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionOutputTaskBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionDtxStartBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionDtxEndBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionDtxAckBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionDtxBufferRefBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionDtxWorkRecordBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionSessionStateBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionShadowReadyBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionMembershipBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionRetractOfferBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionQueuePositionBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionExchangeBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionAddQueueListenerBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionManagementSetupStateBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionConfigBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionQueueFairshareStateBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionQueueObserverStateBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionClockBody& body) { body.invoke(target); result.handled=true; } void AMQP_AllOperations::ClusterConnectionHandler::Invoker::visit(const ClusterConnectionQueueDequeueSincePurgeStateBody& body) { body.invoke(target); result.handled=true; } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/ExecutionSyncBody.cpp0000664000076400007640000000343311752725676022452 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExecutionSyncBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void ExecutionSyncBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ExecutionSyncBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void ExecutionSyncBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ExecutionSyncBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t ExecutionSyncBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ExecutionSyncBody::print(std::ostream& out) const { out << "{ExecutionSyncBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/TxSelectBody.cpp0000664000076400007640000000335611752725676021411 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/TxSelectBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void TxSelectBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void TxSelectBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void TxSelectBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void TxSelectBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t TxSelectBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t TxSelectBody::encodedSize() const { uint32_t total = bodySize(); return total; } void TxSelectBody::print(std::ostream& out) const { out << "{TxSelectBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionDtxEndBody.cpp0000664000076400007640000000356511752725676024430 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionDtxEndBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionDtxEndBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void ClusterConnectionDtxEndBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionDtxEndBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void ClusterConnectionDtxEndBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionDtxEndBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t ClusterConnectionDtxEndBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionDtxEndBody::print(std::ostream& out) const { out << "{ClusterConnectionDtxEndBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionRedirectBody.cpp0000664000076400007640000000570511752725676023437 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionRedirectBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionRedirectBody::setHost(const std::string& _host) { host = _host; flags |= (1 << 8); } const std::string& ConnectionRedirectBody::getHost() const { return host; } bool ConnectionRedirectBody::hasHost() const { return flags & (1 << 8); } void ConnectionRedirectBody::clearHostFlag() { flags &= ~(1 << 8); } void ConnectionRedirectBody::setKnownHosts(const Array& _knownHosts) { knownHosts = _knownHosts; flags |= (1 << 9); } const Array& ConnectionRedirectBody::getKnownHosts() const { return knownHosts; } bool ConnectionRedirectBody::hasKnownHosts() const { return flags & (1 << 9); } void ConnectionRedirectBody::clearKnownHostsFlag() { flags &= ~(1 << 9); } void ConnectionRedirectBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(host); if (flags & (1 << 9)) knownHosts.encode(buffer); } void ConnectionRedirectBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionRedirectBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(host); if (flags & (1 << 9)) knownHosts.decode(buffer); } void ConnectionRedirectBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionRedirectBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 2 + host.size(); if (flags & (1 << 9)) total += knownHosts.encodedSize(); return total; } uint32_t ConnectionRedirectBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionRedirectBody::print(std::ostream& out) const { out << "{ConnectionRedirectBody: "; if (flags & (1 << 8)) out << "host=" << host << "; "; if (flags & (1 << 9)) out << "known-hosts=" << knownHosts << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageCancelBody.h0000664000076400007640000000603711752725676022014 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGECANCELBODY_H #define QPID_FRAMING_MESSAGECANCELBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageCancelBody : public ModelMethod { std::string destination; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0x8; MessageCancelBody( ProtocolVersion, const std::string& _destination) : destination(_destination), flags(0){ flags |= (1 << 8); } MessageCancelBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setDestination(const std::string& _destination); QPID_COMMON_EXTERN const std::string& getDestination() const; QPID_COMMON_EXTERN bool hasDestination() const; QPID_COMMON_EXTERN void clearDestinationFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.cancel(getDestination()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageCancelBody */ }} #endif /*!QPID_FRAMING_MESSAGECANCELBODY_H*/ qpidc-0.16/src/qpid/framing/AMQContentBody.h0000664000076400007640000000346611564561152021262 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/Buffer.h" #include "qpid/CommonImportExport.h" #ifndef _AMQContentBody_ #define _AMQContentBody_ namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQContentBody : public AMQBody { string data; public: QPID_COMMON_EXTERN AMQContentBody(); QPID_COMMON_EXTERN AMQContentBody(const string& data); inline virtual ~AMQContentBody(){} inline uint8_t type() const { return CONTENT_BODY; }; inline const string& getData() const { return data; } inline string& getData() { return data; } QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN void encode(Buffer& buffer) const; QPID_COMMON_EXTERN void decode(Buffer& buffer, uint32_t size); QPID_COMMON_EXTERN void print(std::ostream& out) const; void accept(AMQBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } }; } } #endif qpidc-0.16/src/qpid/framing/MethodBodyFactory.cpp0000664000076400007640000004560211752725677022427 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MethodBodyFactory.h" #include "qpid/framing/BodyFactory.h" #include "qpid/framing/ConnectionStartBody.h" #include "qpid/framing/ConnectionStartOkBody.h" #include "qpid/framing/ConnectionSecureBody.h" #include "qpid/framing/ConnectionSecureOkBody.h" #include "qpid/framing/ConnectionTuneBody.h" #include "qpid/framing/ConnectionTuneOkBody.h" #include "qpid/framing/ConnectionOpenBody.h" #include "qpid/framing/ConnectionOpenOkBody.h" #include "qpid/framing/ConnectionRedirectBody.h" #include "qpid/framing/ConnectionHeartbeatBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/framing/SessionAttachBody.h" #include "qpid/framing/SessionAttachedBody.h" #include "qpid/framing/SessionDetachBody.h" #include "qpid/framing/SessionDetachedBody.h" #include "qpid/framing/SessionRequestTimeoutBody.h" #include "qpid/framing/SessionTimeoutBody.h" #include "qpid/framing/SessionCommandPointBody.h" #include "qpid/framing/SessionExpectedBody.h" #include "qpid/framing/SessionConfirmedBody.h" #include "qpid/framing/SessionCompletedBody.h" #include "qpid/framing/SessionKnownCompletedBody.h" #include "qpid/framing/SessionFlushBody.h" #include "qpid/framing/SessionGapBody.h" #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/ExecutionResultBody.h" #include "qpid/framing/ExecutionExceptionBody.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/MessageAcceptBody.h" #include "qpid/framing/MessageRejectBody.h" #include "qpid/framing/MessageReleaseBody.h" #include "qpid/framing/MessageAcquireBody.h" #include "qpid/framing/MessageResumeBody.h" #include "qpid/framing/MessageSubscribeBody.h" #include "qpid/framing/MessageCancelBody.h" #include "qpid/framing/MessageSetFlowModeBody.h" #include "qpid/framing/MessageFlowBody.h" #include "qpid/framing/MessageFlushBody.h" #include "qpid/framing/MessageStopBody.h" #include "qpid/framing/TxSelectBody.h" #include "qpid/framing/TxCommitBody.h" #include "qpid/framing/TxRollbackBody.h" #include "qpid/framing/DtxSelectBody.h" #include "qpid/framing/DtxStartBody.h" #include "qpid/framing/DtxEndBody.h" #include "qpid/framing/DtxCommitBody.h" #include "qpid/framing/DtxForgetBody.h" #include "qpid/framing/DtxGetTimeoutBody.h" #include "qpid/framing/DtxPrepareBody.h" #include "qpid/framing/DtxRecoverBody.h" #include "qpid/framing/DtxRollbackBody.h" #include "qpid/framing/DtxSetTimeoutBody.h" #include "qpid/framing/ExchangeDeclareBody.h" #include "qpid/framing/ExchangeDeleteBody.h" #include "qpid/framing/ExchangeQueryBody.h" #include "qpid/framing/ExchangeBindBody.h" #include "qpid/framing/ExchangeUnbindBody.h" #include "qpid/framing/ExchangeBoundBody.h" #include "qpid/framing/QueueDeclareBody.h" #include "qpid/framing/QueueDeleteBody.h" #include "qpid/framing/QueuePurgeBody.h" #include "qpid/framing/QueueQueryBody.h" #include "qpid/framing/FileQosBody.h" #include "qpid/framing/FileQosOkBody.h" #include "qpid/framing/FileConsumeBody.h" #include "qpid/framing/FileConsumeOkBody.h" #include "qpid/framing/FileCancelBody.h" #include "qpid/framing/FileOpenBody.h" #include "qpid/framing/FileOpenOkBody.h" #include "qpid/framing/FileStageBody.h" #include "qpid/framing/FilePublishBody.h" #include "qpid/framing/FileReturnBody.h" #include "qpid/framing/FileDeliverBody.h" #include "qpid/framing/FileAckBody.h" #include "qpid/framing/FileRejectBody.h" #include "qpid/framing/StreamQosBody.h" #include "qpid/framing/StreamQosOkBody.h" #include "qpid/framing/StreamConsumeBody.h" #include "qpid/framing/StreamConsumeOkBody.h" #include "qpid/framing/StreamCancelBody.h" #include "qpid/framing/StreamPublishBody.h" #include "qpid/framing/StreamReturnBody.h" #include "qpid/framing/StreamDeliverBody.h" #include "qpid/framing/ClusterUpdateRequestBody.h" #include "qpid/framing/ClusterUpdateOfferBody.h" #include "qpid/framing/ClusterRetractOfferBody.h" #include "qpid/framing/ClusterInitialStatusBody.h" #include "qpid/framing/ClusterReadyBody.h" #include "qpid/framing/ClusterConfigChangeBody.h" #include "qpid/framing/ClusterErrorCheckBody.h" #include "qpid/framing/ClusterTimerWakeupBody.h" #include "qpid/framing/ClusterTimerDropBody.h" #include "qpid/framing/ClusterShutdownBody.h" #include "qpid/framing/ClusterDeliverToQueueBody.h" #include "qpid/framing/ClusterClockBody.h" #include "qpid/framing/ClusterConnectionAnnounceBody.h" #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/ClusterConnectionDeliverDoOutputBody.h" #include "qpid/framing/ClusterConnectionAbortBody.h" #include "qpid/framing/ClusterConnectionShadowSetUserBody.h" #include "qpid/framing/ClusterConnectionShadowPrepareBody.h" #include "qpid/framing/ClusterConnectionConsumerStateBody.h" #include "qpid/framing/ClusterConnectionDeliveryRecordBody.h" #include "qpid/framing/ClusterConnectionTxStartBody.h" #include "qpid/framing/ClusterConnectionTxAcceptBody.h" #include "qpid/framing/ClusterConnectionTxDequeueBody.h" #include "qpid/framing/ClusterConnectionTxEnqueueBody.h" #include "qpid/framing/ClusterConnectionTxPublishBody.h" #include "qpid/framing/ClusterConnectionTxEndBody.h" #include "qpid/framing/ClusterConnectionAccumulatedAckBody.h" #include "qpid/framing/ClusterConnectionOutputTaskBody.h" #include "qpid/framing/ClusterConnectionDtxStartBody.h" #include "qpid/framing/ClusterConnectionDtxEndBody.h" #include "qpid/framing/ClusterConnectionDtxAckBody.h" #include "qpid/framing/ClusterConnectionDtxBufferRefBody.h" #include "qpid/framing/ClusterConnectionDtxWorkRecordBody.h" #include "qpid/framing/ClusterConnectionSessionStateBody.h" #include "qpid/framing/ClusterConnectionShadowReadyBody.h" #include "qpid/framing/ClusterConnectionMembershipBody.h" #include "qpid/framing/ClusterConnectionRetractOfferBody.h" #include "qpid/framing/ClusterConnectionQueuePositionBody.h" #include "qpid/framing/ClusterConnectionExchangeBody.h" #include "qpid/framing/ClusterConnectionAddQueueListenerBody.h" #include "qpid/framing/ClusterConnectionManagementSetupStateBody.h" #include "qpid/framing/ClusterConnectionConfigBody.h" #include "qpid/framing/ClusterConnectionQueueFairshareStateBody.h" #include "qpid/framing/ClusterConnectionQueueObserverStateBody.h" #include "qpid/framing/ClusterConnectionClockBody.h" #include "qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h" #include "qpid/Exception.h" #include "qpid/Msg.h" namespace qpid { namespace framing { boost::intrusive_ptr MethodBodyFactory::create(ClassId c, MethodId m) { switch (c) { case 0x1: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x4: return BodyFactory::create(); case 0x5: return BodyFactory::create(); case 0x6: return BodyFactory::create(); case 0x7: return BodyFactory::create(); case 0x8: return BodyFactory::create(); case 0x9: return BodyFactory::create(); case 0xa: return BodyFactory::create(); case 0xb: return BodyFactory::create(); case 0xc: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class connection ")); } break; case 0x2: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x4: return BodyFactory::create(); case 0x5: return BodyFactory::create(); case 0x6: return BodyFactory::create(); case 0x7: return BodyFactory::create(); case 0x8: return BodyFactory::create(); case 0x9: return BodyFactory::create(); case 0xa: return BodyFactory::create(); case 0xb: return BodyFactory::create(); case 0xc: return BodyFactory::create(); case 0xd: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class session ")); } break; case 0x3: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class execution ")); } break; case 0x4: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x4: return BodyFactory::create(); case 0x5: return BodyFactory::create(); case 0x6: return BodyFactory::create(); case 0x7: return BodyFactory::create(); case 0x8: return BodyFactory::create(); case 0x9: return BodyFactory::create(); case 0xa: return BodyFactory::create(); case 0xb: return BodyFactory::create(); case 0xc: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class message ")); } break; case 0x5: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class tx ")); } break; case 0x6: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x4: return BodyFactory::create(); case 0x5: return BodyFactory::create(); case 0x6: return BodyFactory::create(); case 0x7: return BodyFactory::create(); case 0x8: return BodyFactory::create(); case 0x9: return BodyFactory::create(); case 0xa: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class dtx ")); } break; case 0x7: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x4: return BodyFactory::create(); case 0x5: return BodyFactory::create(); case 0x6: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class exchange ")); } break; case 0x8: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x4: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class queue ")); } break; case 0x9: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x4: return BodyFactory::create(); case 0x5: return BodyFactory::create(); case 0x6: return BodyFactory::create(); case 0x7: return BodyFactory::create(); case 0x8: return BodyFactory::create(); case 0x9: return BodyFactory::create(); case 0xa: return BodyFactory::create(); case 0xb: return BodyFactory::create(); case 0xc: return BodyFactory::create(); case 0xd: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class file ")); } break; case 0xa: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x4: return BodyFactory::create(); case 0x5: return BodyFactory::create(); case 0x6: return BodyFactory::create(); case 0x7: return BodyFactory::create(); case 0x8: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class stream ")); } break; case 0x80: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x5: return BodyFactory::create(); case 0x10: return BodyFactory::create(); case 0x11: return BodyFactory::create(); case 0x14: return BodyFactory::create(); case 0x15: return BodyFactory::create(); case 0x16: return BodyFactory::create(); case 0x20: return BodyFactory::create(); case 0x21: return BodyFactory::create(); case 0x22: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class cluster ")); } break; case 0x81: switch(m) { case 0x1: return BodyFactory::create(); case 0x2: return BodyFactory::create(); case 0x3: return BodyFactory::create(); case 0x4: return BodyFactory::create(); case 0x0E: return BodyFactory::create(); case 0x0F: return BodyFactory::create(); case 0x10: return BodyFactory::create(); case 0x11: return BodyFactory::create(); case 0x12: return BodyFactory::create(); case 0x13: return BodyFactory::create(); case 0x14: return BodyFactory::create(); case 0x15: return BodyFactory::create(); case 0x16: return BodyFactory::create(); case 0x17: return BodyFactory::create(); case 0x18: return BodyFactory::create(); case 0x19: return BodyFactory::create(); case 0x1A: return BodyFactory::create(); case 0x1B: return BodyFactory::create(); case 0x1C: return BodyFactory::create(); case 0x1D: return BodyFactory::create(); case 0x1E: return BodyFactory::create(); case 0x1F: return BodyFactory::create(); case 0x20: return BodyFactory::create(); case 0x21: return BodyFactory::create(); case 0x22: return BodyFactory::create(); case 0x30: return BodyFactory::create(); case 0x31: return BodyFactory::create(); case 0x34: return BodyFactory::create(); case 0x36: return BodyFactory::create(); case 0x37: return BodyFactory::create(); case 0x38: return BodyFactory::create(); case 0x39: return BodyFactory::create(); case 0x40: return BodyFactory::create(); case 0x41: return BodyFactory::create(); default: throw Exception(QPID_MSG("Invalid method id " << int(m) << " for class cluster-connection ")); } break; default: throw Exception(QPID_MSG("Invalid class id " << int(c))); } } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/AMQHeaderBody.h0000664000076400007640000000720011576211367021031 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQHEADERBODY_H #define QPID_FRAMING_AMQHEADERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/DeliveryProperties.h" #include "qpid/framing/MessageProperties.h" #include "qpid/CommonImportExport.h" #include #include namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQHeaderBody : public AMQBody { template struct OptProps { boost::optional props; }; template struct PropSet : public Base, public OptProps { uint32_t encodedSize() const { const boost::optional& p=this->OptProps::props; return (p ? p->encodedSize() : 0) + Base::encodedSize(); } void encode(Buffer& buffer) const { const boost::optional& p=this->OptProps::props; if (p) p->encode(buffer); Base::encode(buffer); } bool decode(Buffer& buffer, uint32_t size, uint16_t type) { boost::optional& p=this->OptProps::props; if (type == T::TYPE) { p=T(); p->decodeStructBody(buffer, size); return true; } else return Base::decode(buffer, size, type); } void print(std::ostream& out) const { const boost::optional& p=this->OptProps::props; if (p) out << *p; Base::print(out); } }; struct Empty { uint32_t encodedSize() const { return 0; } void encode(Buffer&) const {}; bool decode(Buffer&, uint32_t, uint16_t) const { return false; }; void print(std::ostream&) const {} }; // Could use boost::mpl::fold to construct a larger set. typedef PropSet, MessageProperties> Properties; Properties properties; public: inline uint8_t type() const { return HEADER_BODY; } QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN void encode(Buffer& buffer) const; QPID_COMMON_EXTERN void decode(Buffer& buffer, uint32_t size); QPID_COMMON_EXTERN uint64_t getContentLength() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; QPID_COMMON_EXTERN void accept(AMQBodyConstVisitor&) const; template T* get(bool create) { boost::optional& p=properties.OptProps::props; if (create && !p) p=T(); return p.get_ptr(); } template const T* get() const { return properties.OptProps::props.get_ptr(); } template void erase() { properties.OptProps::props.reset(); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } }; }} #endif /*!QPID_FRAMING_AMQHEADERBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionQueueFairshareStateBody.cpp0000664000076400007640000000764111752725676027153 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionQueueFairshareStateBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionQueueFairshareStateBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ClusterConnectionQueueFairshareStateBody::getQueue() const { return queue; } bool ClusterConnectionQueueFairshareStateBody::hasQueue() const { return flags & (1 << 8); } void ClusterConnectionQueueFairshareStateBody::clearQueueFlag() { flags &= ~(1 << 8); } void ClusterConnectionQueueFairshareStateBody::setPosition(uint8_t _position) { position = _position; flags |= (1 << 9); } uint8_t ClusterConnectionQueueFairshareStateBody::getPosition() const { return position; } bool ClusterConnectionQueueFairshareStateBody::hasPosition() const { return flags & (1 << 9); } void ClusterConnectionQueueFairshareStateBody::clearPositionFlag() { flags &= ~(1 << 9); } void ClusterConnectionQueueFairshareStateBody::setCount(uint8_t _count) { count = _count; flags |= (1 << 10); } uint8_t ClusterConnectionQueueFairshareStateBody::getCount() const { return count; } bool ClusterConnectionQueueFairshareStateBody::hasCount() const { return flags & (1 << 10); } void ClusterConnectionQueueFairshareStateBody::clearCountFlag() { flags &= ~(1 << 10); } void ClusterConnectionQueueFairshareStateBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putOctet(position); if (flags & (1 << 10)) buffer.putOctet(count); } void ClusterConnectionQueueFairshareStateBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionQueueFairshareStateBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) position = buffer.getOctet(); if (flags & (1 << 10)) count = buffer.getOctet(); } void ClusterConnectionQueueFairshareStateBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionQueueFairshareStateBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 1;//position if (flags & (1 << 10)) total += 1;//count return total; } uint32_t ClusterConnectionQueueFairshareStateBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionQueueFairshareStateBody::print(std::ostream& out) const { out << "{ClusterConnectionQueueFairshareStateBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "position=" << (int) position << "; "; if (flags & (1 << 10)) out << "count=" << (int) count << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ExchangeUnbindBody.h0000664000076400007640000000733511752725676022206 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXCHANGEUNBINDBODY_H #define QPID_FRAMING_EXCHANGEUNBINDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExchangeUnbindBody : public ModelMethod { std::string queue; std::string exchange; std::string bindingKey; uint16_t flags; public: static const ClassId CLASS_ID = 0x7; static const MethodId METHOD_ID = 0x5; ExchangeUnbindBody( ProtocolVersion, const std::string& _queue, const std::string& _exchange, const std::string& _bindingKey) : queue(_queue), exchange(_exchange), bindingKey(_bindingKey), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } ExchangeUnbindBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setBindingKey(const std::string& _bindingKey); QPID_COMMON_EXTERN const std::string& getBindingKey() const; QPID_COMMON_EXTERN bool hasBindingKey() const; QPID_COMMON_EXTERN void clearBindingKeyFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.unbind(getQueue(), getExchange(), getBindingKey()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExchangeUnbindBody */ }} #endif /*!QPID_FRAMING_EXCHANGEUNBINDBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionDeliveryRecordBody.h0000664000076400007640000001316211752725676025623 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONDELIVERYRECORDBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONDELIVERYRECORDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionDeliveryRecordBody : public ModelMethod { std::string queue; SequenceNumber position; std::string tag; SequenceNumber id; uint32_t credit; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x11; ClusterConnectionDeliveryRecordBody( ProtocolVersion, const std::string& _queue, const SequenceNumber& _position, const std::string& _tag, const SequenceNumber& _id, bool _acquired, bool _accepted, bool _cancelled, bool _completed, bool _ended, bool _windowing, bool _enqueued, uint32_t _credit) : queue(_queue), position(_position), tag(_tag), id(_id), credit(_credit), flags(0){ setAcquired(_acquired); setAccepted(_accepted); setCancelled(_cancelled); setCompleted(_completed); setEnded(_ended); setWindowing(_windowing); setEnqueued(_enqueued); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 3); } ClusterConnectionDeliveryRecordBody(ProtocolVersion=ProtocolVersion()) : credit(0), flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setPosition(const SequenceNumber& _position); QPID_COMMON_EXTERN SequenceNumber getPosition() const; QPID_COMMON_EXTERN bool hasPosition() const; QPID_COMMON_EXTERN void clearPositionFlag(); QPID_COMMON_EXTERN void setTag(const std::string& _tag); QPID_COMMON_EXTERN const std::string& getTag() const; QPID_COMMON_EXTERN bool hasTag() const; QPID_COMMON_EXTERN void clearTagFlag(); QPID_COMMON_EXTERN void setId(const SequenceNumber& _id); QPID_COMMON_EXTERN SequenceNumber getId() const; QPID_COMMON_EXTERN bool hasId() const; QPID_COMMON_EXTERN void clearIdFlag(); QPID_COMMON_EXTERN void setAcquired(bool _acquired); QPID_COMMON_EXTERN bool getAcquired() const; QPID_COMMON_EXTERN void setAccepted(bool _accepted); QPID_COMMON_EXTERN bool getAccepted() const; QPID_COMMON_EXTERN void setCancelled(bool _cancelled); QPID_COMMON_EXTERN bool getCancelled() const; QPID_COMMON_EXTERN void setCompleted(bool _completed); QPID_COMMON_EXTERN bool getCompleted() const; QPID_COMMON_EXTERN void setEnded(bool _ended); QPID_COMMON_EXTERN bool getEnded() const; QPID_COMMON_EXTERN void setWindowing(bool _windowing); QPID_COMMON_EXTERN bool getWindowing() const; QPID_COMMON_EXTERN void setEnqueued(bool _enqueued); QPID_COMMON_EXTERN bool getEnqueued() const; QPID_COMMON_EXTERN void setCredit(uint32_t _credit); QPID_COMMON_EXTERN uint32_t getCredit() const; QPID_COMMON_EXTERN bool hasCredit() const; QPID_COMMON_EXTERN void clearCreditFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.deliveryRecord(getQueue(), getPosition(), getTag(), getId(), getAcquired(), getAccepted(), getCancelled(), getCompleted(), getEnded(), getWindowing(), getEnqueued(), getCredit()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionDeliveryRecordBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONDELIVERYRECORDBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionQueueObserverStateBody.cpp0000664000076400007640000001011011752725676027017 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionQueueObserverStateBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionQueueObserverStateBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ClusterConnectionQueueObserverStateBody::getQueue() const { return queue; } bool ClusterConnectionQueueObserverStateBody::hasQueue() const { return flags & (1 << 8); } void ClusterConnectionQueueObserverStateBody::clearQueueFlag() { flags &= ~(1 << 8); } void ClusterConnectionQueueObserverStateBody::setObserverId(const std::string& _observerId) { observerId = _observerId; flags |= (1 << 9); } const std::string& ClusterConnectionQueueObserverStateBody::getObserverId() const { return observerId; } bool ClusterConnectionQueueObserverStateBody::hasObserverId() const { return flags & (1 << 9); } void ClusterConnectionQueueObserverStateBody::clearObserverIdFlag() { flags &= ~(1 << 9); } void ClusterConnectionQueueObserverStateBody::setState(const FieldTable& _state) { state = _state; flags |= (1 << 10); } const FieldTable& ClusterConnectionQueueObserverStateBody::getState() const { return state; } FieldTable& ClusterConnectionQueueObserverStateBody::getState() { flags |= (1 << 10); return state; } bool ClusterConnectionQueueObserverStateBody::hasState() const { return flags & (1 << 10); } void ClusterConnectionQueueObserverStateBody::clearStateFlag() { flags &= ~(1 << 10); } void ClusterConnectionQueueObserverStateBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putShortString(observerId); if (flags & (1 << 10)) state.encode(buffer); } void ClusterConnectionQueueObserverStateBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionQueueObserverStateBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) buffer.getShortString(observerId); if (flags & (1 << 10)) state.decode(buffer); } void ClusterConnectionQueueObserverStateBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionQueueObserverStateBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 1 + observerId.size(); if (flags & (1 << 10)) total += state.encodedSize(); return total; } uint32_t ClusterConnectionQueueObserverStateBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionQueueObserverStateBody::print(std::ostream& out) const { out << "{ClusterConnectionQueueObserverStateBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "observer-id=" << observerId << "; "; if (flags & (1 << 10)) out << "state=" << state << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/Endian.h0000664000076400007640000000252611100340756017654 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_ENDIAN_H #define QPID_FRAMING_ENDIAN_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" namespace qpid { namespace framing { /** * Conversion utility for little-endian platforms that need to convert * to and from network ordered octet sequences */ class Endian { public: static uint8_t* convertIfRequired(uint8_t* const octets, int width); private: const bool littleEndian; Endian(); static const Endian instance; static bool testBigEndian(); }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_ENDIAN_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionQueueObserverStateBody.h0000664000076400007640000000761311752725676026502 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONQUEUEOBSERVERSTATEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONQUEUEOBSERVERSTATEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionQueueObserverStateBody : public ModelMethod { std::string queue; std::string observerId; FieldTable state; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x39; ClusterConnectionQueueObserverStateBody( ProtocolVersion, const std::string& _queue, const std::string& _observerId, const FieldTable& _state) : queue(_queue), observerId(_observerId), state(_state), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } ClusterConnectionQueueObserverStateBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setObserverId(const std::string& _observerId); QPID_COMMON_EXTERN const std::string& getObserverId() const; QPID_COMMON_EXTERN bool hasObserverId() const; QPID_COMMON_EXTERN void clearObserverIdFlag(); QPID_COMMON_EXTERN void setState(const FieldTable& _state); QPID_COMMON_EXTERN const FieldTable& getState() const; QPID_COMMON_EXTERN FieldTable& getState(); QPID_COMMON_EXTERN bool hasState() const; QPID_COMMON_EXTERN void clearStateFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.queueObserverState(getQueue(), getObserverId(), getState()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionQueueObserverStateBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONQUEUEOBSERVERSTATEBODY_H*/ qpidc-0.16/src/qpid/framing/ConnectionTuneOkBody.h0000664000076400007640000000744011752725676022546 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONTUNEOKBODY_H #define QPID_FRAMING_CONNECTIONTUNEOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionTuneOkBody : public AMQMethodBody { uint16_t channelMax; uint16_t maxFrameSize; uint16_t heartbeat; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0x6; ConnectionTuneOkBody( ProtocolVersion, uint16_t _channelMax, uint16_t _maxFrameSize, uint16_t _heartbeat) : channelMax(_channelMax), maxFrameSize(_maxFrameSize), heartbeat(_heartbeat), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } ConnectionTuneOkBody(ProtocolVersion=ProtocolVersion()) : channelMax(0), maxFrameSize(0), heartbeat(0), flags(0) {} QPID_COMMON_EXTERN void setChannelMax(uint16_t _channelMax); QPID_COMMON_EXTERN uint16_t getChannelMax() const; QPID_COMMON_EXTERN bool hasChannelMax() const; QPID_COMMON_EXTERN void clearChannelMaxFlag(); QPID_COMMON_EXTERN void setMaxFrameSize(uint16_t _maxFrameSize); QPID_COMMON_EXTERN uint16_t getMaxFrameSize() const; QPID_COMMON_EXTERN bool hasMaxFrameSize() const; QPID_COMMON_EXTERN void clearMaxFrameSizeFlag(); QPID_COMMON_EXTERN void setHeartbeat(uint16_t _heartbeat); QPID_COMMON_EXTERN uint16_t getHeartbeat() const; QPID_COMMON_EXTERN bool hasHeartbeat() const; QPID_COMMON_EXTERN void clearHeartbeatFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.tuneOk(getChannelMax(), getMaxFrameSize(), getHeartbeat()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionTuneOkBody */ }} #endif /*!QPID_FRAMING_CONNECTIONTUNEOKBODY_H*/ qpidc-0.16/src/qpid/framing/StreamQosBody.cpp0000664000076400007640000000745211752725676021575 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/StreamQosBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void StreamQosBody::setPrefetchSize(uint32_t _prefetchSize) { prefetchSize = _prefetchSize; flags |= (1 << 8); } uint32_t StreamQosBody::getPrefetchSize() const { return prefetchSize; } bool StreamQosBody::hasPrefetchSize() const { return flags & (1 << 8); } void StreamQosBody::clearPrefetchSizeFlag() { flags &= ~(1 << 8); } void StreamQosBody::setPrefetchCount(uint16_t _prefetchCount) { prefetchCount = _prefetchCount; flags |= (1 << 9); } uint16_t StreamQosBody::getPrefetchCount() const { return prefetchCount; } bool StreamQosBody::hasPrefetchCount() const { return flags & (1 << 9); } void StreamQosBody::clearPrefetchCountFlag() { flags &= ~(1 << 9); } void StreamQosBody::setConsumeRate(uint32_t _consumeRate) { consumeRate = _consumeRate; flags |= (1 << 10); } uint32_t StreamQosBody::getConsumeRate() const { return consumeRate; } bool StreamQosBody::hasConsumeRate() const { return flags & (1 << 10); } void StreamQosBody::clearConsumeRateFlag() { flags &= ~(1 << 10); } void StreamQosBody::setGlobal(bool _global) { if (_global) flags |= (1 << 11); else flags &= ~(1 << 11); } bool StreamQosBody::getGlobal() const { return flags & (1 << 11); } void StreamQosBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLong(prefetchSize); if (flags & (1 << 9)) buffer.putShort(prefetchCount); if (flags & (1 << 10)) buffer.putLong(consumeRate); } void StreamQosBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void StreamQosBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) prefetchSize = buffer.getLong(); if (flags & (1 << 9)) prefetchCount = buffer.getShort(); if (flags & (1 << 10)) consumeRate = buffer.getLong(); } void StreamQosBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t StreamQosBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 4;//prefetchSize if (flags & (1 << 9)) total += 2;//prefetchCount if (flags & (1 << 10)) total += 4;//consumeRate return total; } uint32_t StreamQosBody::encodedSize() const { uint32_t total = bodySize(); return total; } void StreamQosBody::print(std::ostream& out) const { out << "{StreamQosBody: "; if (flags & (1 << 8)) out << "prefetch-size=" << prefetchSize << "; "; if (flags & (1 << 9)) out << "prefetch-count=" << prefetchCount << "; "; if (flags & (1 << 10)) out << "consume-rate=" << consumeRate << "; "; if (flags & (1 << 11)) out << "global=" << getGlobal() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageAcquireResult.cpp0000664000076400007640000000537511752725676023140 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageAcquireResult.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageAcquireResult::setTransfers(const SequenceSet& _transfers) { transfers = _transfers; flags |= (1 << 8); } const SequenceSet& MessageAcquireResult::getTransfers() const { return transfers; } bool MessageAcquireResult::hasTransfers() const { return flags & (1 << 8); } void MessageAcquireResult::clearTransfersFlag() { flags &= ~(1 << 8); } void MessageAcquireResult::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) transfers.encode(buffer); } void MessageAcquireResult::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void MessageAcquireResult::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) transfers.decode(buffer); } void MessageAcquireResult::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t MessageAcquireResult::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += transfers.encodedSize(); return total; } uint32_t MessageAcquireResult::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void MessageAcquireResult::print(std::ostream& out) const { out << "{MessageAcquireResult: "; if (flags & (1 << 8)) out << "transfers=" << transfers << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const MessageAcquireResult& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/ConnectionOpenOkBody.cpp0000664000076400007640000000454511752725676023072 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionOpenOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionOpenOkBody::setKnownHosts(const Array& _knownHosts) { knownHosts = _knownHosts; flags |= (1 << 8); } const Array& ConnectionOpenOkBody::getKnownHosts() const { return knownHosts; } bool ConnectionOpenOkBody::hasKnownHosts() const { return flags & (1 << 8); } void ConnectionOpenOkBody::clearKnownHostsFlag() { flags &= ~(1 << 8); } void ConnectionOpenOkBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) knownHosts.encode(buffer); } void ConnectionOpenOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionOpenOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) knownHosts.decode(buffer); } void ConnectionOpenOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionOpenOkBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += knownHosts.encodedSize(); return total; } uint32_t ConnectionOpenOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionOpenOkBody::print(std::ostream& out) const { out << "{ConnectionOpenOkBody: "; if (flags & (1 << 8)) out << "known-hosts=" << knownHosts << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/FrameSet.h0000664000076400007640000000720611405716562020176 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/InlineVector.h" #include "qpid/framing/amqp_framing.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/CommonImportExport.h" #ifndef _FrameSet_ #define _FrameSet_ namespace qpid { namespace framing { /** * Collects the frames representing a message. */ class FrameSet { typedef InlineVector Frames; const SequenceNumber id; Frames parts; mutable uint64_t contentSize; mutable bool recalculateSize; public: typedef boost::shared_ptr shared_ptr; QPID_COMMON_EXTERN FrameSet(const SequenceNumber& id); QPID_COMMON_EXTERN FrameSet(const FrameSet&); QPID_COMMON_EXTERN void append(const AMQFrame& part); QPID_COMMON_EXTERN bool isComplete() const; QPID_COMMON_EXTERN uint64_t getContentSize() const; QPID_COMMON_EXTERN void getContent(std::string&) const; QPID_COMMON_EXTERN std::string getContent() const; bool isContentBearing() const; QPID_COMMON_EXTERN const AMQMethodBody* getMethod() const; QPID_COMMON_EXTERN AMQMethodBody* getMethod(); QPID_COMMON_EXTERN const AMQHeaderBody* getHeaders() const; QPID_COMMON_EXTERN AMQHeaderBody* getHeaders(); template bool isA() const { const AMQMethodBody* method = getMethod(); return method && method->isA(); } template const T* as() const { const AMQMethodBody* method = getMethod(); return (method && method->isA()) ? dynamic_cast(method) : 0; } template T* as() { AMQMethodBody* method = getMethod(); return (method && method->isA()) ? dynamic_cast(method) : 0; } template const T* getHeaderProperties() const { const AMQHeaderBody* header = getHeaders(); return header ? header->get() : 0; } Frames::const_iterator begin() const { return parts.begin(); } Frames::const_iterator end() const { return parts.end(); } const SequenceNumber& getId() const { return id; } template void remove(P predicate) { parts.erase(std::remove_if(parts.begin(), parts.end(), predicate), parts.end()); } template void map(F& functor) { std::for_each(parts.begin(), parts.end(), functor); } template void map(F& functor) const { std::for_each(parts.begin(), parts.end(), functor); } template void map_if(F& functor, P predicate) { for(Frames::iterator i = parts.begin(); i != parts.end(); i++) { if (predicate(*i)) functor(*i); } } template void map_if(F& functor, P predicate) const { for(Frames::const_iterator i = parts.begin(); i != parts.end(); i++) { if (predicate(*i)) functor(*i); } } }; } } #endif qpidc-0.16/src/qpid/framing/variant.h0000664000076400007640000000557011004143243020117 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_VARIANT_H #define QPID_FRAMING_VARIANT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /**@file Tools for using boost::variant. */ #include namespace qpid { namespace framing { class Buffer; /** boost::static_visitor that throws an exception if variant contains a blank. * Subclasses need to have a using() declaration, which can be generated * with QPID_USING_NOBLANK(R) */ template struct NoBlankVisitor : public boost::static_visitor { R foundBlank() const { assert(0); throw Exception(QPID_MSG("Invalid variant value.")); } R operator()(const boost::blank&) const { return foundBlank(); } R operator()(boost::blank&) const { return foundBlank(); } }; }} // qpid::framing /** Generate a using statement, needed in visitors inheriting NoBlankVisitor * @param R return type. */ #define QPID_USING_NOBLANK(R) using ::qpid::framing::NoBlankVisitor::operator() namespace qpid { namespace framing { /** Convert the variant value to type R. */ template struct ConvertVisitor : public NoBlankVisitor { QPID_USING_NOBLANK(R); template R operator()(T& t) const { return t; } }; /** Convert the address of variant value to type R. */ template struct AddressVisitor : public NoBlankVisitor { QPID_USING_NOBLANK(R); template R operator()(T& t) const { return &t; } }; /** Apply a visitor to the nested variant.*/ template struct ApplyVisitor : public NoBlankVisitor { QPID_USING_NOBLANK(typename V::result_type); const V& visitor; ApplyVisitor(const V& v) : visitor(v) {} template typename V::result_type operator()(T& t) const { return boost::apply_visitor(visitor, t); } }; /** Convenience function to construct and apply an ApplyVisitor */ template typename Visitor::result_type applyApplyVisitor(const Visitor& visitor, Visitable& visitable) { return boost::apply_visitor(ApplyVisitor(visitor), visitable); } }} // namespace qpid::framing #endif /*!QPID_FRAMING_VARIANT_H*/ qpidc-0.16/src/qpid/framing/FrameDecoder.h0000664000076400007640000000302511227113407020772 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FRAMEDECODER_H #define QPID_FRAMING_FRAMEDECODER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQFrame.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { /** * Decode a frame from buffer. If buffer does not contain a complete * frame, caches the fragment for the next call to decode. */ class FrameDecoder { public: QPID_COMMON_EXTERN bool decode(Buffer& buffer); const AMQFrame& getFrame() const { return frame; } AMQFrame& getFrame() { return frame; } void setFragment(const char*, size_t); std::pair getFragment() const; private: std::vector fragment; AMQFrame frame; }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_FRAMEDECODER_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionAddQueueListenerBody.h0000664000076400007640000000672611752725676026114 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONADDQUEUELISTENERBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONADDQUEUELISTENERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionAddQueueListenerBody : public ModelMethod { std::string queue; uint32_t consumer; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x34; ClusterConnectionAddQueueListenerBody( ProtocolVersion, const std::string& _queue, uint32_t _consumer) : queue(_queue), consumer(_consumer), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ClusterConnectionAddQueueListenerBody(ProtocolVersion=ProtocolVersion()) : consumer(0), flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setConsumer(uint32_t _consumer); QPID_COMMON_EXTERN uint32_t getConsumer() const; QPID_COMMON_EXTERN bool hasConsumer() const; QPID_COMMON_EXTERN void clearConsumerFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.addQueueListener(getQueue(), getConsumer()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionAddQueueListenerBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONADDQUEUELISTENERBODY_H*/ qpidc-0.16/src/qpid/framing/StreamProperties.cpp0000664000076400007640000001235211752725676022344 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/StreamProperties.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void StreamProperties::setContentType(const std::string& _contentType) { contentType = _contentType; flags |= (1 << 8); } const std::string& StreamProperties::getContentType() const { return contentType; } bool StreamProperties::hasContentType() const { return flags & (1 << 8); } void StreamProperties::clearContentTypeFlag() { flags &= ~(1 << 8); } void StreamProperties::setContentEncoding(const std::string& _contentEncoding) { contentEncoding = _contentEncoding; flags |= (1 << 9); } const std::string& StreamProperties::getContentEncoding() const { return contentEncoding; } bool StreamProperties::hasContentEncoding() const { return flags & (1 << 9); } void StreamProperties::clearContentEncodingFlag() { flags &= ~(1 << 9); } void StreamProperties::setHeaders(const FieldTable& _headers) { headers = _headers; flags |= (1 << 10); } const FieldTable& StreamProperties::getHeaders() const { return headers; } FieldTable& StreamProperties::getHeaders() { flags |= (1 << 10); return headers; } bool StreamProperties::hasHeaders() const { return flags & (1 << 10); } void StreamProperties::clearHeadersFlag() { flags &= ~(1 << 10); } void StreamProperties::setPriority(uint8_t _priority) { priority = _priority; flags |= (1 << 11); } uint8_t StreamProperties::getPriority() const { return priority; } bool StreamProperties::hasPriority() const { return flags & (1 << 11); } void StreamProperties::clearPriorityFlag() { flags &= ~(1 << 11); } void StreamProperties::setTimestamp(uint64_t _timestamp) { timestamp = _timestamp; flags |= (1 << 12); } uint64_t StreamProperties::getTimestamp() const { return timestamp; } bool StreamProperties::hasTimestamp() const { return flags & (1 << 12); } void StreamProperties::clearTimestampFlag() { flags &= ~(1 << 12); } void StreamProperties::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(contentType); if (flags & (1 << 9)) buffer.putShortString(contentEncoding); if (flags & (1 << 10)) headers.encode(buffer); if (flags & (1 << 11)) buffer.putOctet(priority); if (flags & (1 << 12)) buffer.putLongLong(timestamp); } void StreamProperties::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void StreamProperties::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(contentType); if (flags & (1 << 9)) buffer.getShortString(contentEncoding); if (flags & (1 << 10)) headers.decode(buffer); if (flags & (1 << 11)) priority = buffer.getOctet(); if (flags & (1 << 12)) timestamp = buffer.getLongLong(); } void StreamProperties::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t StreamProperties::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 1 + contentType.size(); if (flags & (1 << 9)) total += 1 + contentEncoding.size(); if (flags & (1 << 10)) total += headers.encodedSize(); if (flags & (1 << 11)) total += 1;//priority if (flags & (1 << 12)) total += 8;//timestamp return total; } uint32_t StreamProperties::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void StreamProperties::print(std::ostream& out) const { out << "{StreamProperties: "; if (flags & (1 << 8)) out << "content-type=" << contentType << "; "; if (flags & (1 << 9)) out << "content-encoding=" << contentEncoding << "; "; if (flags & (1 << 10)) out << "headers=" << headers << "; "; if (flags & (1 << 11)) out << "priority=" << (int) priority << "; "; if (flags & (1 << 12)) out << "timestamp=" << timestamp << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const StreamProperties& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/ClusterUpdateOfferBody.cpp0000664000076400007640000000462411752725676023423 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterUpdateOfferBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterUpdateOfferBody::setUpdatee(uint64_t _updatee) { updatee = _updatee; flags |= (1 << 8); } uint64_t ClusterUpdateOfferBody::getUpdatee() const { return updatee; } bool ClusterUpdateOfferBody::hasUpdatee() const { return flags & (1 << 8); } void ClusterUpdateOfferBody::clearUpdateeFlag() { flags &= ~(1 << 8); } void ClusterUpdateOfferBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(updatee); } void ClusterUpdateOfferBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterUpdateOfferBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) updatee = buffer.getLongLong(); } void ClusterUpdateOfferBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterUpdateOfferBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 8;//updatee return total; } uint32_t ClusterUpdateOfferBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterUpdateOfferBody::print(std::ostream& out) const { out << "{ClusterUpdateOfferBody: "; if (flags & (1 << 8)) out << "updatee=" << updatee << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ResizableBuffer.h0000664000076400007640000000342311516343277021541 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_RESIZABLEBUFFER_H #define QPID_FRAMING_RESIZABLEBUFFER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Buffer.h" #include namespace qpid { namespace framing { /** * A buffer that maintains its own storage and can be resized, * keeping any data already written to the buffer. */ class ResizableBuffer : public Buffer { public: ResizableBuffer(size_t initialSize) : store(initialSize) { static_cast(*this) = Buffer(&store[0], store.size()); } void resize(size_t newSize) { size_t oldPos = getPosition(); store.resize(newSize); static_cast(*this) = Buffer(&store[0], store.size()); setPosition(oldPos); } /** Make sure at least n bytes are available */ void makeAvailable(size_t n) { if (n > available()) resize(getSize() + n - available()); } private: std::vector store; }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_RESIZABLEBUFFER_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionDtxEndBody.h0000664000076400007640000000521711752725676024071 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONDTXENDBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONDTXENDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionDtxEndBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x1B; ClusterConnectionDtxEndBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.dtxEnd(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionDtxEndBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONDTXENDBODY_H*/ qpidc-0.16/src/qpid/framing/Proxy.h0000664000076400007640000000272411227113407017600 0ustar00jrossjross00000000000000#ifndef _framing_Proxy_h #define _framing_Proxy_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/framing/FrameHandler.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class AMQBody; /** * Base class for proxies. */ class Proxy { public: class ScopedSync { Proxy& proxy; public: QPID_COMMON_EXTERN ScopedSync(Proxy& p); QPID_COMMON_EXTERN ~ScopedSync(); }; QPID_COMMON_EXTERN Proxy(FrameHandler& h); QPID_COMMON_EXTERN virtual ~Proxy(); QPID_COMMON_EXTERN void send(const AMQBody&); QPID_COMMON_EXTERN ProtocolVersion getVersion() const; QPID_COMMON_EXTERN FrameHandler& getHandler(); QPID_COMMON_EXTERN void setHandler(FrameHandler&); private: FrameHandler* out; bool sync; }; }} // namespace qpid::framing #endif /*!_framing_Proxy_h*/ qpidc-0.16/src/qpid/framing/ClusterConnectionClockBody.cpp0000664000076400007640000000464111752725676024271 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionClockBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionClockBody::setTime(uint64_t _time) { time = _time; flags |= (1 << 8); } uint64_t ClusterConnectionClockBody::getTime() const { return time; } bool ClusterConnectionClockBody::hasTime() const { return flags & (1 << 8); } void ClusterConnectionClockBody::clearTimeFlag() { flags &= ~(1 << 8); } void ClusterConnectionClockBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(time); } void ClusterConnectionClockBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionClockBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) time = buffer.getLongLong(); } void ClusterConnectionClockBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionClockBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 8;//time return total; } uint32_t ClusterConnectionClockBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionClockBody::print(std::ostream& out) const { out << "{ClusterConnectionClockBody: "; if (flags & (1 << 8)) out << "time=" << time << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionTxAcceptBody.cpp0000664000076400007640000000501611752725676024746 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionTxAcceptBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionTxAcceptBody::setCommands(const SequenceSet& _commands) { commands = _commands; flags |= (1 << 8); } const SequenceSet& ClusterConnectionTxAcceptBody::getCommands() const { return commands; } bool ClusterConnectionTxAcceptBody::hasCommands() const { return flags & (1 << 8); } void ClusterConnectionTxAcceptBody::clearCommandsFlag() { flags &= ~(1 << 8); } void ClusterConnectionTxAcceptBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) commands.encode(buffer); } void ClusterConnectionTxAcceptBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionTxAcceptBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) commands.decode(buffer); } void ClusterConnectionTxAcceptBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionTxAcceptBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += commands.encodedSize(); return total; } uint32_t ClusterConnectionTxAcceptBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionTxAcceptBody::print(std::ostream& out) const { out << "{ClusterConnectionTxAcceptBody: "; if (flags & (1 << 8)) out << "commands=" << commands << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionCloseOkBody.cpp0000664000076400007640000000337411752725676023235 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionCloseOkBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); } void ConnectionCloseOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionCloseOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); } void ConnectionCloseOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionCloseOkBody::bodySize() const { uint32_t total = 0; total += 2; return total; } uint32_t ConnectionCloseOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionCloseOkBody::print(std::ostream& out) const { out << "{ConnectionCloseOkBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionTxEndBody.cpp0000664000076400007640000000355411752725676024262 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionTxEndBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionTxEndBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void ClusterConnectionTxEndBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionTxEndBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void ClusterConnectionTxEndBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionTxEndBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t ClusterConnectionTxEndBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionTxEndBody::print(std::ostream& out) const { out << "{ClusterConnectionTxEndBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/ClientInvoker.cpp0000664000076400007640000004105611752725673021610 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClientInvoker.h" #include "qpid/framing/ConnectionStartBody.h" #include "qpid/framing/ConnectionSecureBody.h" #include "qpid/framing/ConnectionTuneBody.h" #include "qpid/framing/ConnectionOpenOkBody.h" #include "qpid/framing/ConnectionRedirectBody.h" #include "qpid/framing/ConnectionHeartbeatBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/framing/SessionAttachBody.h" #include "qpid/framing/SessionAttachedBody.h" #include "qpid/framing/SessionDetachBody.h" #include "qpid/framing/SessionDetachedBody.h" #include "qpid/framing/SessionRequestTimeoutBody.h" #include "qpid/framing/SessionTimeoutBody.h" #include "qpid/framing/SessionCommandPointBody.h" #include "qpid/framing/SessionExpectedBody.h" #include "qpid/framing/SessionConfirmedBody.h" #include "qpid/framing/SessionCompletedBody.h" #include "qpid/framing/SessionKnownCompletedBody.h" #include "qpid/framing/SessionFlushBody.h" #include "qpid/framing/SessionGapBody.h" #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/ExecutionResultBody.h" #include "qpid/framing/ExecutionExceptionBody.h" #include "qpid/framing/MessageAcceptBody.h" #include "qpid/framing/MessageRejectBody.h" #include "qpid/framing/MessageReleaseBody.h" #include "qpid/framing/MessageResumeBody.h" #include "qpid/framing/MessageSetFlowModeBody.h" #include "qpid/framing/MessageFlowBody.h" #include "qpid/framing/MessageStopBody.h" #include "qpid/framing/FileQosOkBody.h" #include "qpid/framing/FileConsumeOkBody.h" #include "qpid/framing/FileOpenBody.h" #include "qpid/framing/FileOpenOkBody.h" #include "qpid/framing/FileDeliverBody.h" #include "qpid/framing/StreamQosOkBody.h" #include "qpid/framing/StreamConsumeOkBody.h" namespace qpid { namespace framing { void AMQP_ClientOperations::Invoker::visit(const ConnectionStartBody& body) { AMQP_ClientOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ConnectionSecureBody& body) { AMQP_ClientOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ConnectionTuneBody& body) { AMQP_ClientOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ConnectionOpenOkBody& body) { AMQP_ClientOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ConnectionRedirectBody& body) { AMQP_ClientOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ConnectionHeartbeatBody& body) { AMQP_ClientOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ConnectionCloseBody& body) { AMQP_ClientOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ConnectionCloseOkBody& body) { AMQP_ClientOperations::ConnectionHandler::Invoker invoker(*target.getConnectionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionAttachBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionAttachedBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionDetachBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionDetachedBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionRequestTimeoutBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionTimeoutBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionCommandPointBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionExpectedBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionConfirmedBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionCompletedBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionKnownCompletedBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionFlushBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const SessionGapBody& body) { AMQP_ClientOperations::SessionHandler::Invoker invoker(*target.getSessionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ExecutionSyncBody& body) { AMQP_ClientOperations::ExecutionHandler::Invoker invoker(*target.getExecutionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ExecutionResultBody& body) { AMQP_ClientOperations::ExecutionHandler::Invoker invoker(*target.getExecutionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const ExecutionExceptionBody& body) { AMQP_ClientOperations::ExecutionHandler::Invoker invoker(*target.getExecutionHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const MessageAcceptBody& body) { AMQP_ClientOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const MessageRejectBody& body) { AMQP_ClientOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const MessageReleaseBody& body) { AMQP_ClientOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const MessageResumeBody& body) { AMQP_ClientOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const MessageSetFlowModeBody& body) { AMQP_ClientOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const MessageFlowBody& body) { AMQP_ClientOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const MessageStopBody& body) { AMQP_ClientOperations::MessageHandler::Invoker invoker(*target.getMessageHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const FileQosOkBody& body) { AMQP_ClientOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const FileConsumeOkBody& body) { AMQP_ClientOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const FileOpenBody& body) { AMQP_ClientOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const FileOpenOkBody& body) { AMQP_ClientOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const FileDeliverBody& body) { AMQP_ClientOperations::FileHandler::Invoker invoker(*target.getFileHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const StreamQosOkBody& body) { AMQP_ClientOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::Invoker::visit(const StreamConsumeOkBody& body) { AMQP_ClientOperations::StreamHandler::Invoker invoker(*target.getStreamHandler()); body.accept(invoker); result=invoker.getResult(); } void AMQP_ClientOperations::ConnectionHandler::Invoker::visit(const ConnectionStartBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ConnectionHandler::Invoker::visit(const ConnectionSecureBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ConnectionHandler::Invoker::visit(const ConnectionTuneBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ConnectionHandler::Invoker::visit(const ConnectionOpenOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ConnectionHandler::Invoker::visit(const ConnectionRedirectBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ConnectionHandler::Invoker::visit(const ConnectionHeartbeatBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ConnectionHandler::Invoker::visit(const ConnectionCloseBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ConnectionHandler::Invoker::visit(const ConnectionCloseOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionAttachBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionAttachedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionDetachBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionDetachedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionRequestTimeoutBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionTimeoutBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionCommandPointBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionExpectedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionConfirmedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionCompletedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionKnownCompletedBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionFlushBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::SessionHandler::Invoker::visit(const SessionGapBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ExecutionHandler::Invoker::visit(const ExecutionSyncBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ExecutionHandler::Invoker::visit(const ExecutionResultBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::ExecutionHandler::Invoker::visit(const ExecutionExceptionBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::MessageHandler::Invoker::visit(const MessageAcceptBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::MessageHandler::Invoker::visit(const MessageRejectBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::MessageHandler::Invoker::visit(const MessageReleaseBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::MessageHandler::Invoker::visit(const MessageResumeBody& body) { this->encode(body.invoke(target), result.result); result.handled=true; } void AMQP_ClientOperations::MessageHandler::Invoker::visit(const MessageSetFlowModeBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::MessageHandler::Invoker::visit(const MessageFlowBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::MessageHandler::Invoker::visit(const MessageStopBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::FileHandler::Invoker::visit(const FileQosOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::FileHandler::Invoker::visit(const FileConsumeOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::FileHandler::Invoker::visit(const FileOpenBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::FileHandler::Invoker::visit(const FileOpenOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::FileHandler::Invoker::visit(const FileDeliverBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::StreamHandler::Invoker::visit(const StreamQosOkBody& body) { body.invoke(target); result.handled=true; } void AMQP_ClientOperations::StreamHandler::Invoker::visit(const StreamConsumeOkBody& body) { body.invoke(target); result.handled=true; } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/DtxCommitBody.cpp0000664000076400007640000000477211752725676021571 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxCommitBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxCommitBody::setXid(const Xid& _xid) { xid = _xid; flags |= (1 << 8); } const Xid& DtxCommitBody::getXid() const { return xid; } bool DtxCommitBody::hasXid() const { return flags & (1 << 8); } void DtxCommitBody::clearXidFlag() { flags &= ~(1 << 8); } void DtxCommitBody::setOnePhase(bool _onePhase) { if (_onePhase) flags |= (1 << 9); else flags &= ~(1 << 9); } bool DtxCommitBody::getOnePhase() const { return flags & (1 << 9); } void DtxCommitBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) xid.encode(buffer); } void DtxCommitBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxCommitBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) xid.decode(buffer); } void DtxCommitBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxCommitBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += xid.encodedSize(); return total; } uint32_t DtxCommitBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxCommitBody::print(std::ostream& out) const { out << "{DtxCommitBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; if (flags & (1 << 9)) out << "one-phase=" << getOnePhase() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageStopBody.h0000664000076400007640000000601711752725676021552 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGESTOPBODY_H #define QPID_FRAMING_MESSAGESTOPBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageStopBody : public ModelMethod { std::string destination; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0xc; MessageStopBody( ProtocolVersion, const std::string& _destination) : destination(_destination), flags(0){ flags |= (1 << 8); } MessageStopBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setDestination(const std::string& _destination); QPID_COMMON_EXTERN const std::string& getDestination() const; QPID_COMMON_EXTERN bool hasDestination() const; QPID_COMMON_EXTERN void clearDestinationFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.stop(getDestination()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageStopBody */ }} #endif /*!QPID_FRAMING_MESSAGESTOPBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionAbortBody.cpp0000664000076400007640000000355411752725676024307 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionAbortBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionAbortBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void ClusterConnectionAbortBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionAbortBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void ClusterConnectionAbortBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionAbortBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t ClusterConnectionAbortBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionAbortBody::print(std::ostream& out) const { out << "{ClusterConnectionAbortBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionDtxAckBody.cpp0000664000076400007640000000356511752725676024420 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionDtxAckBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionDtxAckBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void ClusterConnectionDtxAckBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionDtxAckBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void ClusterConnectionDtxAckBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionDtxAckBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t ClusterConnectionDtxAckBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionDtxAckBody::print(std::ostream& out) const { out << "{ClusterConnectionDtxAckBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageFlowBody.cpp0000664000076400007640000000665011752725676022072 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageFlowBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageFlowBody::setDestination(const std::string& _destination) { destination = _destination; flags |= (1 << 8); } const std::string& MessageFlowBody::getDestination() const { return destination; } bool MessageFlowBody::hasDestination() const { return flags & (1 << 8); } void MessageFlowBody::clearDestinationFlag() { flags &= ~(1 << 8); } void MessageFlowBody::setUnit(uint8_t _unit) { unit = _unit; flags |= (1 << 9); } uint8_t MessageFlowBody::getUnit() const { return unit; } bool MessageFlowBody::hasUnit() const { return flags & (1 << 9); } void MessageFlowBody::clearUnitFlag() { flags &= ~(1 << 9); } void MessageFlowBody::setValue(uint32_t _value) { value = _value; flags |= (1 << 10); } uint32_t MessageFlowBody::getValue() const { return value; } bool MessageFlowBody::hasValue() const { return flags & (1 << 10); } void MessageFlowBody::clearValueFlag() { flags &= ~(1 << 10); } void MessageFlowBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(destination); if (flags & (1 << 9)) buffer.putOctet(unit); if (flags & (1 << 10)) buffer.putLong(value); } void MessageFlowBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageFlowBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(destination); if (flags & (1 << 9)) unit = buffer.getOctet(); if (flags & (1 << 10)) value = buffer.getLong(); } void MessageFlowBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageFlowBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + destination.size(); if (flags & (1 << 9)) total += 1;//unit if (flags & (1 << 10)) total += 4;//value return total; } uint32_t MessageFlowBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageFlowBody::print(std::ostream& out) const { out << "{MessageFlowBody: "; if (flags & (1 << 8)) out << "destination=" << destination << "; "; if (flags & (1 << 9)) out << "unit=" << (int) unit << "; "; if (flags & (1 << 10)) out << "value=" << value << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageProperties.cpp0000664000076400007640000001760411752725676022502 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageProperties.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageProperties::setContentLength(uint64_t _contentLength) { contentLength = _contentLength; flags |= (1 << 8); } uint64_t MessageProperties::getContentLength() const { return contentLength; } bool MessageProperties::hasContentLength() const { return flags & (1 << 8); } void MessageProperties::clearContentLengthFlag() { flags &= ~(1 << 8); } void MessageProperties::setMessageId(const Uuid& _messageId) { messageId = _messageId; flags |= (1 << 9); } const Uuid& MessageProperties::getMessageId() const { return messageId; } bool MessageProperties::hasMessageId() const { return flags & (1 << 9); } void MessageProperties::clearMessageIdFlag() { flags &= ~(1 << 9); } void MessageProperties::setCorrelationId(const std::string& _correlationId) { correlationId = _correlationId; flags |= (1 << 10); } const std::string& MessageProperties::getCorrelationId() const { return correlationId; } bool MessageProperties::hasCorrelationId() const { return flags & (1 << 10); } void MessageProperties::clearCorrelationIdFlag() { flags &= ~(1 << 10); } void MessageProperties::setReplyTo(const ReplyTo& _replyTo) { replyTo = _replyTo; flags |= (1 << 11); } const ReplyTo& MessageProperties::getReplyTo() const { return replyTo; } bool MessageProperties::hasReplyTo() const { return flags & (1 << 11); } void MessageProperties::clearReplyToFlag() { flags &= ~(1 << 11); } void MessageProperties::setContentType(const std::string& _contentType) { contentType = _contentType; flags |= (1 << 12); } const std::string& MessageProperties::getContentType() const { return contentType; } bool MessageProperties::hasContentType() const { return flags & (1 << 12); } void MessageProperties::clearContentTypeFlag() { flags &= ~(1 << 12); } void MessageProperties::setContentEncoding(const std::string& _contentEncoding) { contentEncoding = _contentEncoding; flags |= (1 << 13); } const std::string& MessageProperties::getContentEncoding() const { return contentEncoding; } bool MessageProperties::hasContentEncoding() const { return flags & (1 << 13); } void MessageProperties::clearContentEncodingFlag() { flags &= ~(1 << 13); } void MessageProperties::setUserId(const std::string& _userId) { userId = _userId; flags |= (1 << 14); } const std::string& MessageProperties::getUserId() const { return userId; } bool MessageProperties::hasUserId() const { return flags & (1 << 14); } void MessageProperties::clearUserIdFlag() { flags &= ~(1 << 14); } void MessageProperties::setAppId(const std::string& _appId) { appId = _appId; flags |= (1 << 15); } const std::string& MessageProperties::getAppId() const { return appId; } bool MessageProperties::hasAppId() const { return flags & (1 << 15); } void MessageProperties::clearAppIdFlag() { flags &= ~(1 << 15); } void MessageProperties::setApplicationHeaders(const FieldTable& _applicationHeaders) { applicationHeaders = _applicationHeaders; flags |= (1 << 0); } const FieldTable& MessageProperties::getApplicationHeaders() const { return applicationHeaders; } FieldTable& MessageProperties::getApplicationHeaders() { flags |= (1 << 0); return applicationHeaders; } bool MessageProperties::hasApplicationHeaders() const { return flags & (1 << 0); } void MessageProperties::clearApplicationHeadersFlag() { flags &= ~(1 << 0); } void MessageProperties::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(contentLength); if (flags & (1 << 9)) messageId.encode(buffer); if (flags & (1 << 10)) buffer.putMediumString(correlationId); if (flags & (1 << 11)) replyTo.encode(buffer); if (flags & (1 << 12)) buffer.putShortString(contentType); if (flags & (1 << 13)) buffer.putShortString(contentEncoding); if (flags & (1 << 14)) buffer.putMediumString(userId); if (flags & (1 << 15)) buffer.putMediumString(appId); if (flags & (1 << 0)) applicationHeaders.encode(buffer); } void MessageProperties::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void MessageProperties::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) contentLength = buffer.getLongLong(); if (flags & (1 << 9)) messageId.decode(buffer); if (flags & (1 << 10)) buffer.getMediumString(correlationId); if (flags & (1 << 11)) replyTo.decode(buffer); if (flags & (1 << 12)) buffer.getShortString(contentType); if (flags & (1 << 13)) buffer.getShortString(contentEncoding); if (flags & (1 << 14)) buffer.getMediumString(userId); if (flags & (1 << 15)) buffer.getMediumString(appId); if (flags & (1 << 0)) applicationHeaders.decode(buffer); } void MessageProperties::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t MessageProperties::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 8;//contentLength if (flags & (1 << 9)) total += messageId.encodedSize(); if (flags & (1 << 10)) total += 2 + correlationId.size(); if (flags & (1 << 11)) total += replyTo.encodedSize(); if (flags & (1 << 12)) total += 1 + contentType.size(); if (flags & (1 << 13)) total += 1 + contentEncoding.size(); if (flags & (1 << 14)) total += 2 + userId.size(); if (flags & (1 << 15)) total += 2 + appId.size(); if (flags & (1 << 0)) total += applicationHeaders.encodedSize(); return total; } uint32_t MessageProperties::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void MessageProperties::print(std::ostream& out) const { out << "{MessageProperties: "; if (flags & (1 << 8)) out << "content-length=" << contentLength << "; "; if (flags & (1 << 9)) out << "message-id=" << messageId << "; "; if (flags & (1 << 10)) out << "correlation-id=" << correlationId << "; "; if (flags & (1 << 11)) out << "reply-to=" << replyTo << "; "; if (flags & (1 << 12)) out << "content-type=" << contentType << "; "; if (flags & (1 << 13)) out << "content-encoding=" << contentEncoding << "; "; if (flags & (1 << 14)) out << "user-id=" << userId << "; "; if (flags & (1 << 15)) out << "app-id=" << appId << "; "; if (flags & (1 << 0)) out << "application-headers=" << applicationHeaders << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const MessageProperties& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/SendContent.h0000664000076400007640000000333111562043244020701 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/amqp_framing.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/FrameHandler.h" #include "qpid/CommonImportExport.h" #ifndef _SendContent_ #define _SendContent_ namespace qpid { namespace framing { /** * Functor that sends frame to handler, refragmenting if * necessary. Currently only works on content frames but this could be * changed once we support multi-frame segments in general. */ class SendContent { FrameHandler& handler; const uint16_t maxFrameSize; uint expectedFrameCount; uint frameCount; void sendFragment(const AMQContentBody& body, uint32_t offset, uint16_t size, bool first, bool last) const; void setFlags(AMQFrame& f, bool first, bool last) const; public: QPID_COMMON_EXTERN SendContent(FrameHandler& _handler, uint16_t _maxFrameSize, uint frameCount); QPID_COMMON_EXTERN void operator()(const AMQFrame& f); }; } } #endif qpidc-0.16/src/qpid/framing/ClusterConnectionDtxWorkRecordBody.cpp0000664000076400007640000000671611752725676026004 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionDtxWorkRecordBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionDtxWorkRecordBody::setXid(const std::string& _xid) { xid = _xid; flags |= (1 << 8); } const std::string& ClusterConnectionDtxWorkRecordBody::getXid() const { return xid; } bool ClusterConnectionDtxWorkRecordBody::hasXid() const { return flags & (1 << 8); } void ClusterConnectionDtxWorkRecordBody::clearXidFlag() { flags &= ~(1 << 8); } void ClusterConnectionDtxWorkRecordBody::setPrepared(bool _prepared) { if (_prepared) flags |= (1 << 9); else flags &= ~(1 << 9); } bool ClusterConnectionDtxWorkRecordBody::getPrepared() const { return flags & (1 << 9); } void ClusterConnectionDtxWorkRecordBody::setTimeout(uint32_t _timeout) { timeout = _timeout; flags |= (1 << 10); } uint32_t ClusterConnectionDtxWorkRecordBody::getTimeout() const { return timeout; } bool ClusterConnectionDtxWorkRecordBody::hasTimeout() const { return flags & (1 << 10); } void ClusterConnectionDtxWorkRecordBody::clearTimeoutFlag() { flags &= ~(1 << 10); } void ClusterConnectionDtxWorkRecordBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(xid); if (flags & (1 << 10)) buffer.putLong(timeout); } void ClusterConnectionDtxWorkRecordBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionDtxWorkRecordBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(xid); if (flags & (1 << 10)) timeout = buffer.getLong(); } void ClusterConnectionDtxWorkRecordBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionDtxWorkRecordBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + xid.size(); if (flags & (1 << 10)) total += 4;//timeout return total; } uint32_t ClusterConnectionDtxWorkRecordBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionDtxWorkRecordBody::print(std::ostream& out) const { out << "{ClusterConnectionDtxWorkRecordBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; if (flags & (1 << 9)) out << "prepared=" << getPrepared() << "; "; if (flags & (1 << 10)) out << "timeout=" << timeout << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionDetachedBody.cpp0000664000076400007640000000547311752725676022725 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionDetachedBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionDetachedBody::setName(const std::string& _name) { name = _name; flags |= (1 << 8); } const std::string& SessionDetachedBody::getName() const { return name; } bool SessionDetachedBody::hasName() const { return flags & (1 << 8); } void SessionDetachedBody::clearNameFlag() { flags &= ~(1 << 8); } void SessionDetachedBody::setCode(uint8_t _code) { code = _code; flags |= (1 << 9); } uint8_t SessionDetachedBody::getCode() const { return code; } bool SessionDetachedBody::hasCode() const { return flags & (1 << 9); } void SessionDetachedBody::clearCodeFlag() { flags &= ~(1 << 9); } void SessionDetachedBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(name); if (flags & (1 << 9)) buffer.putOctet(code); } void SessionDetachedBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionDetachedBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(name); if (flags & (1 << 9)) code = buffer.getOctet(); } void SessionDetachedBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionDetachedBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 2 + name.size(); if (flags & (1 << 9)) total += 1;//code return total; } uint32_t SessionDetachedBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionDetachedBody::print(std::ostream& out) const { out << "{SessionDetachedBody: "; if (flags & (1 << 8)) out << "name=" << name << "; "; if (flags & (1 << 9)) out << "code=" << (int) code << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionSecureBody.h0000664000076400007640000000607111752725676022566 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONSECUREBODY_H #define QPID_FRAMING_CONNECTIONSECUREBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionSecureBody : public AMQMethodBody { std::string challenge; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0x3; ConnectionSecureBody( ProtocolVersion, const std::string& _challenge) : challenge(_challenge), flags(0){ flags |= (1 << 8); } ConnectionSecureBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setChallenge(const std::string& _challenge); QPID_COMMON_EXTERN const std::string& getChallenge() const; QPID_COMMON_EXTERN bool hasChallenge() const; QPID_COMMON_EXTERN void clearChallengeFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.secure(getChallenge()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionSecureBody */ }} #endif /*!QPID_FRAMING_CONNECTIONSECUREBODY_H*/ qpidc-0.16/src/qpid/framing/MessageFlushBody.cpp0000664000076400007640000000463111752725676022241 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageFlushBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageFlushBody::setDestination(const std::string& _destination) { destination = _destination; flags |= (1 << 8); } const std::string& MessageFlushBody::getDestination() const { return destination; } bool MessageFlushBody::hasDestination() const { return flags & (1 << 8); } void MessageFlushBody::clearDestinationFlag() { flags &= ~(1 << 8); } void MessageFlushBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(destination); } void MessageFlushBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageFlushBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(destination); } void MessageFlushBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageFlushBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + destination.size(); return total; } uint32_t MessageFlushBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageFlushBody::print(std::ostream& out) const { out << "{MessageFlushBody: "; if (flags & (1 << 8)) out << "destination=" << destination << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/TxCommitBody.h0000664000076400007640000000506311752725676021064 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_TXCOMMITBODY_H #define QPID_FRAMING_TXCOMMITBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN TxCommitBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x5; static const MethodId METHOD_ID = 0x2; TxCommitBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.commit(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class TxCommitBody */ }} #endif /*!QPID_FRAMING_TXCOMMITBODY_H*/ qpidc-0.16/src/qpid/framing/SessionCompletedBody.h0000664000076400007640000000637111752725676022603 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONCOMPLETEDBODY_H #define QPID_FRAMING_SESSIONCOMPLETEDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionCompletedBody : public AMQMethodBody { SequenceSet commands; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0xa; SessionCompletedBody( ProtocolVersion, const SequenceSet& _commands, bool _timelyReply) : commands(_commands), flags(0){ setTimelyReply(_timelyReply); flags |= (1 << 8); } SessionCompletedBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setCommands(const SequenceSet& _commands); QPID_COMMON_EXTERN const SequenceSet& getCommands() const; QPID_COMMON_EXTERN bool hasCommands() const; QPID_COMMON_EXTERN void clearCommandsFlag(); QPID_COMMON_EXTERN void setTimelyReply(bool _timelyReply); QPID_COMMON_EXTERN bool getTimelyReply() const; virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.completed(getCommands(), getTimelyReply()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionCompletedBody */ }} #endif /*!QPID_FRAMING_SESSIONCOMPLETEDBODY_H*/ qpidc-0.16/src/qpid/framing/TxSelectBody.h0000664000076400007640000000506311752725676021053 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_TXSELECTBODY_H #define QPID_FRAMING_TXSELECTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN TxSelectBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x5; static const MethodId METHOD_ID = 0x1; TxSelectBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.select(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class TxSelectBody */ }} #endif /*!QPID_FRAMING_TXSELECTBODY_H*/ qpidc-0.16/src/qpid/framing/Invoker.h0000664000076400007640000000463411004143243020070 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_INVOKER_H #define QPID_FRAMING_INVOKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/MethodBodyDefaultVisitor.h" #include "qpid/framing/StructHelper.h" #include namespace qpid { namespace framing { class AMQMethodBody; /** * Base class for invoker visitors. */ class Invoker: public MethodBodyDefaultVisitor, protected StructHelper { public: struct Result { public: Result() : handled(false) {} const std::string& getResult() const { return result; } bool hasResult() const { return !result.empty(); } bool wasHandled() const { return handled; } operator bool() const { return handled; } std::string result; bool handled; }; void defaultVisit(const AMQMethodBody&) {} Result getResult() const { return result; } protected: Result result; }; /** * Invoke an invocable object. * Invocable classes must provide a nested type Invoker. */ template Invoker::Result invoke(Invocable& target, const AMQMethodBody& body) { typename Invocable::Invoker invoker(target); body.accept(invoker); return invoker.getResult(); } /** * Invoke an invocable object. * Invocable classes must provide a nested type Invoker. */ template Invoker::Result invoke(Invocable& target, const AMQBody& body) { typename Invocable::Invoker invoker(target); const AMQMethodBody* method = body.getMethod(); if (method) method->accept(invoker); return invoker.getResult(); } }} // namespace qpid::framing #endif /*!QPID_FRAMING_INVOKER_H*/ qpidc-0.16/src/qpid/framing/InputHandler.h0000664000076400007640000000231411227113407021047 0ustar00jrossjross00000000000000#ifndef _InputHandler_ #define _InputHandler_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/FrameHandler.h" #include namespace qpid { namespace framing { // TODO aconway 2007-08-29: Eliminate, replace with FrameHandler. class InputHandler : public FrameHandler { public: virtual ~InputHandler() {} virtual void received(AMQFrame&) = 0; void handle(AMQFrame& f) { received(f); } }; }} #endif qpidc-0.16/src/qpid/framing/ClusterConnectionDtxBufferRefBody.cpp0000664000076400007640000000664411752725676025571 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionDtxBufferRefBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionDtxBufferRefBody::setXid(const std::string& _xid) { xid = _xid; flags |= (1 << 8); } const std::string& ClusterConnectionDtxBufferRefBody::getXid() const { return xid; } bool ClusterConnectionDtxBufferRefBody::hasXid() const { return flags & (1 << 8); } void ClusterConnectionDtxBufferRefBody::clearXidFlag() { flags &= ~(1 << 8); } void ClusterConnectionDtxBufferRefBody::setIndex(uint32_t _index) { index = _index; flags |= (1 << 9); } uint32_t ClusterConnectionDtxBufferRefBody::getIndex() const { return index; } bool ClusterConnectionDtxBufferRefBody::hasIndex() const { return flags & (1 << 9); } void ClusterConnectionDtxBufferRefBody::clearIndexFlag() { flags &= ~(1 << 9); } void ClusterConnectionDtxBufferRefBody::setSuspended(bool _suspended) { if (_suspended) flags |= (1 << 10); else flags &= ~(1 << 10); } bool ClusterConnectionDtxBufferRefBody::getSuspended() const { return flags & (1 << 10); } void ClusterConnectionDtxBufferRefBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(xid); if (flags & (1 << 9)) buffer.putLong(index); } void ClusterConnectionDtxBufferRefBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionDtxBufferRefBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(xid); if (flags & (1 << 9)) index = buffer.getLong(); } void ClusterConnectionDtxBufferRefBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionDtxBufferRefBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + xid.size(); if (flags & (1 << 9)) total += 4;//index return total; } uint32_t ClusterConnectionDtxBufferRefBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionDtxBufferRefBody::print(std::ostream& out) const { out << "{ClusterConnectionDtxBufferRefBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; if (flags & (1 << 9)) out << "index=" << index << "; "; if (flags & (1 << 10)) out << "suspended=" << getSuspended() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionStartOkBody.cpp0000664000076400007640000001062611752725676023263 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionStartOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionStartOkBody::setClientProperties(const FieldTable& _clientProperties) { clientProperties = _clientProperties; flags |= (1 << 8); } const FieldTable& ConnectionStartOkBody::getClientProperties() const { return clientProperties; } FieldTable& ConnectionStartOkBody::getClientProperties() { flags |= (1 << 8); return clientProperties; } bool ConnectionStartOkBody::hasClientProperties() const { return flags & (1 << 8); } void ConnectionStartOkBody::clearClientPropertiesFlag() { flags &= ~(1 << 8); } void ConnectionStartOkBody::setMechanism(const std::string& _mechanism) { mechanism = _mechanism; flags |= (1 << 9); } const std::string& ConnectionStartOkBody::getMechanism() const { return mechanism; } bool ConnectionStartOkBody::hasMechanism() const { return flags & (1 << 9); } void ConnectionStartOkBody::clearMechanismFlag() { flags &= ~(1 << 9); } void ConnectionStartOkBody::setResponse(const std::string& _response) { response = _response; flags |= (1 << 10); } const std::string& ConnectionStartOkBody::getResponse() const { return response; } bool ConnectionStartOkBody::hasResponse() const { return flags & (1 << 10); } void ConnectionStartOkBody::clearResponseFlag() { flags &= ~(1 << 10); } void ConnectionStartOkBody::setLocale(const std::string& _locale) { locale = _locale; flags |= (1 << 11); } const std::string& ConnectionStartOkBody::getLocale() const { return locale; } bool ConnectionStartOkBody::hasLocale() const { return flags & (1 << 11); } void ConnectionStartOkBody::clearLocaleFlag() { flags &= ~(1 << 11); } void ConnectionStartOkBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) clientProperties.encode(buffer); if (flags & (1 << 9)) buffer.putShortString(mechanism); if (flags & (1 << 10)) buffer.putLongString(response); if (flags & (1 << 11)) buffer.putShortString(locale); } void ConnectionStartOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionStartOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) clientProperties.decode(buffer); if (flags & (1 << 9)) buffer.getShortString(mechanism); if (flags & (1 << 10)) buffer.getLongString(response); if (flags & (1 << 11)) buffer.getShortString(locale); } void ConnectionStartOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionStartOkBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += clientProperties.encodedSize(); if (flags & (1 << 9)) total += 1 + mechanism.size(); if (flags & (1 << 10)) total += 4 + response.size(); if (flags & (1 << 11)) total += 1 + locale.size(); return total; } uint32_t ConnectionStartOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionStartOkBody::print(std::ostream& out) const { out << "{ConnectionStartOkBody: "; if (flags & (1 << 8)) out << "client-properties=" << clientProperties << "; "; if (flags & (1 << 9)) out << "mechanism=" << mechanism << "; "; if (flags & (1 << 10)) out << "response=" << "xxxxxx" << "; "; if (flags & (1 << 11)) out << "locale=" << locale << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionAttachBody.cpp0000664000076400007640000000501411752725676022417 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionAttachBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionAttachBody::setName(const std::string& _name) { name = _name; flags |= (1 << 8); } const std::string& SessionAttachBody::getName() const { return name; } bool SessionAttachBody::hasName() const { return flags & (1 << 8); } void SessionAttachBody::clearNameFlag() { flags &= ~(1 << 8); } void SessionAttachBody::setForce(bool _force) { if (_force) flags |= (1 << 9); else flags &= ~(1 << 9); } bool SessionAttachBody::getForce() const { return flags & (1 << 9); } void SessionAttachBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(name); } void SessionAttachBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionAttachBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(name); } void SessionAttachBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionAttachBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 2 + name.size(); return total; } uint32_t SessionAttachBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionAttachBody::print(std::ostream& out) const { out << "{SessionAttachBody: "; if (flags & (1 << 8)) out << "name=" << name << "; "; if (flags & (1 << 9)) out << "force=" << getForce() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MethodBodyDefaultVisitor.cpp0000664000076400007640000003102011752725700023734 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MethodBodyDefaultVisitor.h" #include "qpid/framing/all_method_bodies.h" namespace qpid { namespace framing { void MethodBodyDefaultVisitor::visit(const ConnectionStartBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionStartOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionSecureBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionSecureOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionTuneBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionTuneOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionOpenBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionOpenOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionRedirectBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionHeartbeatBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionCloseBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ConnectionCloseOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionAttachBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionAttachedBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionDetachBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionDetachedBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionRequestTimeoutBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionTimeoutBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionCommandPointBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionExpectedBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionConfirmedBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionCompletedBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionKnownCompletedBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionFlushBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const SessionGapBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ExecutionSyncBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ExecutionResultBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ExecutionExceptionBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageTransferBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageAcceptBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageRejectBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageReleaseBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageAcquireBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageResumeBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageSubscribeBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageCancelBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageSetFlowModeBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageFlowBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageFlushBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const MessageStopBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const TxSelectBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const TxCommitBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const TxRollbackBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxSelectBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxStartBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxEndBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxCommitBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxForgetBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxGetTimeoutBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxPrepareBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxRecoverBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxRollbackBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const DtxSetTimeoutBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ExchangeDeclareBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ExchangeDeleteBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ExchangeQueryBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ExchangeBindBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ExchangeUnbindBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ExchangeBoundBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const QueueDeclareBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const QueueDeleteBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const QueuePurgeBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const QueueQueryBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileQosBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileQosOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileConsumeBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileConsumeOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileCancelBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileOpenBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileOpenOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileStageBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FilePublishBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileReturnBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileDeliverBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileAckBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const FileRejectBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const StreamQosBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const StreamQosOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const StreamConsumeBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const StreamConsumeOkBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const StreamCancelBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const StreamPublishBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const StreamReturnBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const StreamDeliverBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterUpdateRequestBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterUpdateOfferBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterRetractOfferBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterInitialStatusBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterReadyBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConfigChangeBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterErrorCheckBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterTimerWakeupBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterTimerDropBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterShutdownBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterDeliverToQueueBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterClockBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionAnnounceBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionDeliverCloseBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionDeliverDoOutputBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionAbortBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionShadowSetUserBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionShadowPrepareBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionConsumerStateBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionDeliveryRecordBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionTxStartBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionTxAcceptBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionTxDequeueBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionTxEnqueueBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionTxPublishBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionTxEndBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionAccumulatedAckBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionOutputTaskBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionDtxStartBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionDtxEndBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionDtxAckBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionDtxBufferRefBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionDtxWorkRecordBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionSessionStateBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionShadowReadyBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionMembershipBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionRetractOfferBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionQueuePositionBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionExchangeBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionAddQueueListenerBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionManagementSetupStateBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionConfigBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionQueueFairshareStateBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionQueueObserverStateBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionClockBody& b) { defaultVisit(b); } void MethodBodyDefaultVisitor::visit(const ClusterConnectionQueueDequeueSincePurgeStateBody& b) { defaultVisit(b); } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/AMQP_AllOperations.h0000664000076400007640000004354211752725677022101 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQP_ALLOPERATIONS_H #define QPID_FRAMING_AMQP_ALLOPERATIONS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/ProtocolVersion.h" #include "qpid/framing/amqp_structs.h" namespace qpid { namespace framing { class AMQMethodBody; class AMQP_AllOperations { public: class Invoker; // Declared in AllInvoker virtual ~AMQP_AllOperations() {} virtual ProtocolVersion getVersion() const = 0; // Inner classes // ==================== class ConnectionHandler ==================== class ConnectionHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker ConnectionHandler(){}; virtual ~ConnectionHandler() {} // Protocol methods virtual void start(const FieldTable& serverProperties, const Array& mechanisms, const Array& locales) = 0; virtual void startOk(const FieldTable& clientProperties, const std::string& mechanism, const std::string& response, const std::string& locale) = 0; virtual void secure(const std::string& challenge) = 0; virtual void secureOk(const std::string& response) = 0; virtual void tune(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeatMin, uint16_t heartbeatMax) = 0; virtual void tuneOk(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeat) = 0; virtual void open(const std::string& virtualHost, const Array& capabilities, bool insist) = 0; virtual void openOk(const Array& knownHosts) = 0; virtual void redirect(const std::string& host, const Array& knownHosts) = 0; virtual void heartbeat( ) = 0; virtual void close(uint16_t replyCode, const std::string& replyText) = 0; virtual void closeOk( ) = 0; }; // class ConnectionHandler // ==================== class SessionHandler ==================== class SessionHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker SessionHandler(){}; virtual ~SessionHandler() {} // Protocol methods virtual void attach(const std::string& name, bool force) = 0; virtual void attached(const std::string& name) = 0; virtual void detach(const std::string& name) = 0; virtual void detached(const std::string& name, uint8_t code) = 0; virtual void requestTimeout(uint32_t timeout) = 0; virtual void timeout(uint32_t timeout) = 0; virtual void commandPoint(const SequenceNumber& commandId, uint64_t commandOffset) = 0; virtual void expected(const SequenceSet& commands, const Array& fragments) = 0; virtual void confirmed(const SequenceSet& commands, const Array& fragments) = 0; virtual void completed(const SequenceSet& commands, bool timelyReply) = 0; virtual void knownCompleted(const SequenceSet& commands) = 0; virtual void flush(bool expected, bool confirmed, bool completed) = 0; virtual void gap(const SequenceSet& commands) = 0; }; // class SessionHandler // ==================== class ExecutionHandler ==================== class ExecutionHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker ExecutionHandler(){}; virtual ~ExecutionHandler() {} // Protocol methods virtual void sync( ) = 0; virtual void result(const SequenceNumber& commandId, const std::string& value) = 0; virtual void exception(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo) = 0; }; // class ExecutionHandler // ==================== class MessageHandler ==================== class MessageHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker MessageHandler(){}; virtual ~MessageHandler() {} // Protocol methods virtual void accept(const SequenceSet& transfers) = 0; virtual void reject(const SequenceSet& transfers, uint16_t code, const std::string& text) = 0; virtual void release(const SequenceSet& transfers, bool setRedelivered) = 0; virtual MessageAcquireResult acquire(const SequenceSet& transfers) = 0; virtual MessageResumeResult resume(const std::string& destination, const std::string& resumeId) = 0; virtual void subscribe(const std::string& queue, const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const std::string& resumeId, uint64_t resumeTtl, const FieldTable& arguments) = 0; virtual void cancel(const std::string& destination) = 0; virtual void setFlowMode(const std::string& destination, uint8_t flowMode) = 0; virtual void flow(const std::string& destination, uint8_t unit, uint32_t value) = 0; virtual void flush(const std::string& destination) = 0; virtual void stop(const std::string& destination) = 0; }; // class MessageHandler // ==================== class TxHandler ==================== class TxHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker TxHandler(){}; virtual ~TxHandler() {} // Protocol methods virtual void select( ) = 0; virtual void commit( ) = 0; virtual void rollback( ) = 0; }; // class TxHandler // ==================== class DtxHandler ==================== class DtxHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker DtxHandler(){}; virtual ~DtxHandler() {} // Protocol methods virtual void select( ) = 0; virtual XaResult start(const Xid& xid, bool join, bool resume) = 0; virtual XaResult end(const Xid& xid, bool fail, bool suspend) = 0; virtual XaResult commit(const Xid& xid, bool onePhase) = 0; virtual void forget(const Xid& xid) = 0; virtual DtxGetTimeoutResult getTimeout(const Xid& xid) = 0; virtual XaResult prepare(const Xid& xid) = 0; virtual DtxRecoverResult recover( ) = 0; virtual XaResult rollback(const Xid& xid) = 0; virtual void setTimeout(const Xid& xid, uint32_t timeout) = 0; }; // class DtxHandler // ==================== class ExchangeHandler ==================== class ExchangeHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker ExchangeHandler(){}; virtual ~ExchangeHandler() {} // Protocol methods virtual void declare(const std::string& exchange, const std::string& type, const std::string& alternateExchange, bool passive, bool durable, bool autoDelete, const FieldTable& arguments) = 0; virtual void delete_(const std::string& exchange, bool ifUnused) = 0; virtual ExchangeQueryResult query(const std::string& name) = 0; virtual void bind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, const FieldTable& arguments) = 0; virtual void unbind(const std::string& queue, const std::string& exchange, const std::string& bindingKey) = 0; virtual ExchangeBoundResult bound(const std::string& exchange, const std::string& queue, const std::string& bindingKey, const FieldTable& arguments) = 0; }; // class ExchangeHandler // ==================== class QueueHandler ==================== class QueueHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker QueueHandler(){}; virtual ~QueueHandler() {} // Protocol methods virtual void declare(const std::string& queue, const std::string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const FieldTable& arguments) = 0; virtual void delete_(const std::string& queue, bool ifUnused, bool ifEmpty) = 0; virtual void purge(const std::string& queue) = 0; virtual QueueQueryResult query(const std::string& queue) = 0; }; // class QueueHandler // ==================== class FileHandler ==================== class FileHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker FileHandler(){}; virtual ~FileHandler() {} // Protocol methods virtual void qos(uint32_t prefetchSize, uint16_t prefetchCount, bool global) = 0; virtual void qosOk( ) = 0; virtual void consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool noAck, bool exclusive, bool nowait, const FieldTable& arguments) = 0; virtual void consumeOk(const std::string& consumerTag) = 0; virtual void cancel(const std::string& consumerTag) = 0; virtual void open(const std::string& identifier, uint64_t contentSize) = 0; virtual void openOk(uint64_t stagedSize) = 0; virtual void publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate, const std::string& identifier) = 0; virtual void deliver(const std::string& consumerTag, uint64_t deliveryTag, bool redelivered, const std::string& exchange, const std::string& routingKey, const std::string& identifier) = 0; virtual void ack(uint64_t deliveryTag, bool multiple) = 0; virtual void reject(uint64_t deliveryTag, bool requeue) = 0; }; // class FileHandler // ==================== class StreamHandler ==================== class StreamHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker StreamHandler(){}; virtual ~StreamHandler() {} // Protocol methods virtual void qos(uint32_t prefetchSize, uint16_t prefetchCount, uint32_t consumeRate, bool global) = 0; virtual void qosOk( ) = 0; virtual void consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool exclusive, bool nowait, const FieldTable& arguments) = 0; virtual void consumeOk(const std::string& consumerTag) = 0; virtual void cancel(const std::string& consumerTag) = 0; }; // class StreamHandler // ==================== class ClusterHandler ==================== class ClusterHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker ClusterHandler(){}; virtual ~ClusterHandler() {} // Protocol methods virtual void updateRequest(const std::string& url) = 0; virtual void updateOffer(uint64_t updatee) = 0; virtual void retractOffer(uint64_t updatee) = 0; virtual void initialStatus(uint32_t version, bool active, const Uuid& clusterId, uint8_t storeState, const Uuid& shutdownId, const std::string& firstConfig, const Array& urls) = 0; virtual void ready(const std::string& url) = 0; virtual void configChange(const std::string& members, const std::string& joined, const std::string& left) = 0; virtual void errorCheck(uint8_t type, const SequenceNumber& frameSeq) = 0; virtual void timerWakeup(const std::string& name) = 0; virtual void timerDrop(const std::string& name) = 0; virtual void shutdown(const Uuid& shutdownId) = 0; virtual void deliverToQueue(const std::string& queue, const std::string& message) = 0; virtual void clock(uint64_t time) = 0; }; // class ClusterHandler // ==================== class ClusterConnectionHandler ==================== class ClusterConnectionHandler { // Constructors and destructors public: class Invoker; // Declared in AllInvoker ClusterConnectionHandler(){}; virtual ~ClusterConnectionHandler() {} // Protocol methods virtual void announce(const std::string& managementId, uint32_t ssf, const std::string& authid, bool nodict, const std::string& username, const std::string& initialFrames) = 0; virtual void deliverClose( ) = 0; virtual void deliverDoOutput(uint32_t limit) = 0; virtual void abort( ) = 0; virtual void shadowSetUser(const std::string& userId) = 0; virtual void shadowPrepare(const std::string& managementId) = 0; virtual void consumerState(const std::string& name, bool blocked, bool notifyEnabled, const SequenceNumber& position, uint32_t usedMsgCredit, uint32_t usedByteCredit) = 0; virtual void deliveryRecord(const std::string& queue, const SequenceNumber& position, const std::string& tag, const SequenceNumber& id, bool acquired, bool accepted, bool cancelled, bool completed, bool ended, bool windowing, bool enqueued, uint32_t credit) = 0; virtual void txStart( ) = 0; virtual void txAccept(const SequenceSet& commands) = 0; virtual void txDequeue(const std::string& queue) = 0; virtual void txEnqueue(const std::string& queue) = 0; virtual void txPublish(const Array& queues, bool delivered) = 0; virtual void txEnd( ) = 0; virtual void accumulatedAck(const SequenceSet& commands) = 0; virtual void outputTask(uint16_t channel, const std::string& name) = 0; virtual void dtxStart(const std::string& xid, bool ended, bool suspended, bool failed, bool expired) = 0; virtual void dtxEnd( ) = 0; virtual void dtxAck( ) = 0; virtual void dtxBufferRef(const std::string& xid, uint32_t index, bool suspended) = 0; virtual void dtxWorkRecord(const std::string& xid, bool prepared, uint32_t timeout) = 0; virtual void sessionState(const SequenceNumber& replayStart, const SequenceNumber& commandPoint, const SequenceSet& sentIncomplete, const SequenceNumber& expected, const SequenceNumber& received, const SequenceSet& unknownCompleted, const SequenceSet& receivedIncomplete, bool dtxSelected) = 0; virtual void shadowReady(uint64_t memberId, uint64_t connectionId, const std::string& managementId, const std::string& userName, const std::string& fragment, uint32_t sendMax) = 0; virtual void membership(const FieldTable& joiners, const FieldTable& members, const SequenceNumber& frameSeq) = 0; virtual void retractOffer( ) = 0; virtual void queuePosition(const std::string& queue, const SequenceNumber& position) = 0; virtual void exchange(const std::string& encoded) = 0; virtual void addQueueListener(const std::string& queue, uint32_t consumer) = 0; virtual void managementSetupState(uint64_t objectNum, uint16_t bootSequence, const Uuid& brokerId, const std::string& vendor, const std::string& product, const std::string& instance) = 0; virtual void config(const std::string& encoded) = 0; virtual void queueFairshareState(const std::string& queue, uint8_t position, uint8_t count) = 0; virtual void queueObserverState(const std::string& queue, const std::string& observerId, const FieldTable& state) = 0; virtual void clock(uint64_t time) = 0; virtual void queueDequeueSincePurgeState(const std::string& queue, uint32_t dequeueSincePurge) = 0; }; // class ClusterConnectionHandler // Method handler get methods virtual ConnectionHandler* getConnectionHandler() = 0; virtual SessionHandler* getSessionHandler() = 0; virtual ExecutionHandler* getExecutionHandler() = 0; virtual MessageHandler* getMessageHandler() = 0; virtual TxHandler* getTxHandler() = 0; virtual DtxHandler* getDtxHandler() = 0; virtual ExchangeHandler* getExchangeHandler() = 0; virtual QueueHandler* getQueueHandler() = 0; virtual FileHandler* getFileHandler() = 0; virtual StreamHandler* getStreamHandler() = 0; virtual ClusterHandler* getClusterHandler() = 0; virtual ClusterConnectionHandler* getClusterConnectionHandler() = 0; }; /* class AMQP_AllOperations */ }} #endif /*!QPID_FRAMING_AMQP_ALLOPERATIONS_H*/ qpidc-0.16/src/qpid/framing/FileRejectBody.h0000664000076400007640000000624311752725676021335 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILEREJECTBODY_H #define QPID_FRAMING_FILEREJECTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileRejectBody : public ModelMethod { uint64_t deliveryTag; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0xd; FileRejectBody( ProtocolVersion, uint64_t _deliveryTag, bool _requeue) : deliveryTag(_deliveryTag), flags(0){ setRequeue(_requeue); flags |= (1 << 8); } FileRejectBody(ProtocolVersion=ProtocolVersion()) : deliveryTag(0), flags(0) {} QPID_COMMON_EXTERN void setDeliveryTag(uint64_t _deliveryTag); QPID_COMMON_EXTERN uint64_t getDeliveryTag() const; QPID_COMMON_EXTERN bool hasDeliveryTag() const; QPID_COMMON_EXTERN void clearDeliveryTagFlag(); QPID_COMMON_EXTERN void setRequeue(bool _requeue); QPID_COMMON_EXTERN bool getRequeue() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.reject(getDeliveryTag(), getRequeue()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileRejectBody */ }} #endif /*!QPID_FRAMING_FILEREJECTBODY_H*/ qpidc-0.16/src/qpid/framing/Xid.cpp0000664000076400007640000000705711752725676017566 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/Xid.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void Xid::setFormat(uint32_t _format) { format = _format; flags |= (1 << 8); } uint32_t Xid::getFormat() const { return format; } bool Xid::hasFormat() const { return flags & (1 << 8); } void Xid::clearFormatFlag() { flags &= ~(1 << 8); } void Xid::setGlobalId(const std::string& _globalId) { globalId = _globalId; flags |= (1 << 9); } const std::string& Xid::getGlobalId() const { return globalId; } bool Xid::hasGlobalId() const { return flags & (1 << 9); } void Xid::clearGlobalIdFlag() { flags &= ~(1 << 9); } void Xid::setBranchId(const std::string& _branchId) { branchId = _branchId; flags |= (1 << 10); } const std::string& Xid::getBranchId() const { return branchId; } bool Xid::hasBranchId() const { return flags & (1 << 10); } void Xid::clearBranchIdFlag() { flags &= ~(1 << 10); } void Xid::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLong(format); if (flags & (1 << 9)) buffer.putShortString(globalId); if (flags & (1 << 10)) buffer.putShortString(branchId); } void Xid::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void Xid::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) format = buffer.getLong(); if (flags & (1 << 9)) buffer.getShortString(globalId); if (flags & (1 << 10)) buffer.getShortString(branchId); } void Xid::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t Xid::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 4;//format if (flags & (1 << 9)) total += 1 + globalId.size(); if (flags & (1 << 10)) total += 1 + branchId.size(); return total; } uint32_t Xid::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void Xid::print(std::ostream& out) const { out << "{Xid: "; if (flags & (1 << 8)) out << "format=" << format << "; "; if (flags & (1 << 9)) out << "global-id=" << globalId << "; "; if (flags & (1 << 10)) out << "branch-id=" << branchId << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const Xid& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/DtxEndBody.cpp0000664000076400007640000000527011752725676021041 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxEndBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxEndBody::setXid(const Xid& _xid) { xid = _xid; flags |= (1 << 8); } const Xid& DtxEndBody::getXid() const { return xid; } bool DtxEndBody::hasXid() const { return flags & (1 << 8); } void DtxEndBody::clearXidFlag() { flags &= ~(1 << 8); } void DtxEndBody::setFail(bool _fail) { if (_fail) flags |= (1 << 9); else flags &= ~(1 << 9); } bool DtxEndBody::getFail() const { return flags & (1 << 9); } void DtxEndBody::setSuspend(bool _suspend) { if (_suspend) flags |= (1 << 10); else flags &= ~(1 << 10); } bool DtxEndBody::getSuspend() const { return flags & (1 << 10); } void DtxEndBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) xid.encode(buffer); } void DtxEndBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxEndBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) xid.decode(buffer); } void DtxEndBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxEndBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += xid.encodedSize(); return total; } uint32_t DtxEndBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxEndBody::print(std::ostream& out) const { out << "{DtxEndBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; if (flags & (1 << 9)) out << "fail=" << getFail() << "; "; if (flags & (1 << 10)) out << "suspend=" << getSuspend() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/AMQP_ClientOperations.h0000664000076400007640000001605211752725676022602 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQP_CLIENTOPERATIONS_H #define QPID_FRAMING_AMQP_CLIENTOPERATIONS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/ProtocolVersion.h" #include "qpid/framing/amqp_structs.h" namespace qpid { namespace framing { class AMQMethodBody; class AMQP_ClientOperations { public: class Invoker; // Declared in ClientInvoker virtual ~AMQP_ClientOperations() {} virtual ProtocolVersion getVersion() const = 0; // Inner classes // ==================== class ConnectionHandler ==================== class ConnectionHandler { // Constructors and destructors public: class Invoker; // Declared in ClientInvoker ConnectionHandler(){}; virtual ~ConnectionHandler() {} // Protocol methods virtual void start(const FieldTable& serverProperties, const Array& mechanisms, const Array& locales) = 0; virtual void secure(const std::string& challenge) = 0; virtual void tune(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeatMin, uint16_t heartbeatMax) = 0; virtual void openOk(const Array& knownHosts) = 0; virtual void redirect(const std::string& host, const Array& knownHosts) = 0; virtual void heartbeat( ) = 0; virtual void close(uint16_t replyCode, const std::string& replyText) = 0; virtual void closeOk( ) = 0; }; // class ConnectionHandler // ==================== class SessionHandler ==================== class SessionHandler { // Constructors and destructors public: class Invoker; // Declared in ClientInvoker SessionHandler(){}; virtual ~SessionHandler() {} // Protocol methods virtual void attach(const std::string& name, bool force) = 0; virtual void attached(const std::string& name) = 0; virtual void detach(const std::string& name) = 0; virtual void detached(const std::string& name, uint8_t code) = 0; virtual void requestTimeout(uint32_t timeout) = 0; virtual void timeout(uint32_t timeout) = 0; virtual void commandPoint(const SequenceNumber& commandId, uint64_t commandOffset) = 0; virtual void expected(const SequenceSet& commands, const Array& fragments) = 0; virtual void confirmed(const SequenceSet& commands, const Array& fragments) = 0; virtual void completed(const SequenceSet& commands, bool timelyReply) = 0; virtual void knownCompleted(const SequenceSet& commands) = 0; virtual void flush(bool expected, bool confirmed, bool completed) = 0; virtual void gap(const SequenceSet& commands) = 0; }; // class SessionHandler // ==================== class ExecutionHandler ==================== class ExecutionHandler { // Constructors and destructors public: class Invoker; // Declared in ClientInvoker ExecutionHandler(){}; virtual ~ExecutionHandler() {} // Protocol methods virtual void sync( ) = 0; virtual void result(const SequenceNumber& commandId, const std::string& value) = 0; virtual void exception(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo) = 0; }; // class ExecutionHandler // ==================== class MessageHandler ==================== class MessageHandler { // Constructors and destructors public: class Invoker; // Declared in ClientInvoker MessageHandler(){}; virtual ~MessageHandler() {} // Protocol methods virtual void accept(const SequenceSet& transfers) = 0; virtual void reject(const SequenceSet& transfers, uint16_t code, const std::string& text) = 0; virtual void release(const SequenceSet& transfers, bool setRedelivered) = 0; virtual MessageResumeResult resume(const std::string& destination, const std::string& resumeId) = 0; virtual void setFlowMode(const std::string& destination, uint8_t flowMode) = 0; virtual void flow(const std::string& destination, uint8_t unit, uint32_t value) = 0; virtual void stop(const std::string& destination) = 0; }; // class MessageHandler // ==================== class FileHandler ==================== class FileHandler { // Constructors and destructors public: class Invoker; // Declared in ClientInvoker FileHandler(){}; virtual ~FileHandler() {} // Protocol methods virtual void qosOk( ) = 0; virtual void consumeOk(const std::string& consumerTag) = 0; virtual void open(const std::string& identifier, uint64_t contentSize) = 0; virtual void openOk(uint64_t stagedSize) = 0; virtual void deliver(const std::string& consumerTag, uint64_t deliveryTag, bool redelivered, const std::string& exchange, const std::string& routingKey, const std::string& identifier) = 0; }; // class FileHandler // ==================== class StreamHandler ==================== class StreamHandler { // Constructors and destructors public: class Invoker; // Declared in ClientInvoker StreamHandler(){}; virtual ~StreamHandler() {} // Protocol methods virtual void qosOk( ) = 0; virtual void consumeOk(const std::string& consumerTag) = 0; }; // class StreamHandler // Method handler get methods virtual ConnectionHandler* getConnectionHandler() = 0; virtual SessionHandler* getSessionHandler() = 0; virtual ExecutionHandler* getExecutionHandler() = 0; virtual MessageHandler* getMessageHandler() = 0; virtual FileHandler* getFileHandler() = 0; virtual StreamHandler* getStreamHandler() = 0; }; /* class AMQP_ClientOperations */ }} #endif /*!QPID_FRAMING_AMQP_CLIENTOPERATIONS_H*/ qpidc-0.16/src/qpid/framing/SessionGapBody.h0000664000076400007640000000600311752725676021366 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONGAPBODY_H #define QPID_FRAMING_SESSIONGAPBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionGapBody : public AMQMethodBody { SequenceSet commands; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0xd; SessionGapBody( ProtocolVersion, const SequenceSet& _commands) : commands(_commands), flags(0){ flags |= (1 << 8); } SessionGapBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setCommands(const SequenceSet& _commands); QPID_COMMON_EXTERN const SequenceSet& getCommands() const; QPID_COMMON_EXTERN bool hasCommands() const; QPID_COMMON_EXTERN void clearCommandsFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.gap(getCommands()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionGapBody */ }} #endif /*!QPID_FRAMING_SESSIONGAPBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterInitialStatusBody.cpp0000664000076400007640000001345111752725676024012 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterInitialStatusBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterInitialStatusBody::setVersion(uint32_t _version) { version = _version; flags |= (1 << 8); } uint32_t ClusterInitialStatusBody::getVersion() const { return version; } bool ClusterInitialStatusBody::hasVersion() const { return flags & (1 << 8); } void ClusterInitialStatusBody::clearVersionFlag() { flags &= ~(1 << 8); } void ClusterInitialStatusBody::setActive(bool _active) { if (_active) flags |= (1 << 9); else flags &= ~(1 << 9); } bool ClusterInitialStatusBody::getActive() const { return flags & (1 << 9); } void ClusterInitialStatusBody::setClusterId(const Uuid& _clusterId) { clusterId = _clusterId; flags |= (1 << 10); } const Uuid& ClusterInitialStatusBody::getClusterId() const { return clusterId; } bool ClusterInitialStatusBody::hasClusterId() const { return flags & (1 << 10); } void ClusterInitialStatusBody::clearClusterIdFlag() { flags &= ~(1 << 10); } void ClusterInitialStatusBody::setStoreState(uint8_t _storeState) { storeState = _storeState; flags |= (1 << 11); } uint8_t ClusterInitialStatusBody::getStoreState() const { return storeState; } bool ClusterInitialStatusBody::hasStoreState() const { return flags & (1 << 11); } void ClusterInitialStatusBody::clearStoreStateFlag() { flags &= ~(1 << 11); } void ClusterInitialStatusBody::setShutdownId(const Uuid& _shutdownId) { shutdownId = _shutdownId; flags |= (1 << 12); } const Uuid& ClusterInitialStatusBody::getShutdownId() const { return shutdownId; } bool ClusterInitialStatusBody::hasShutdownId() const { return flags & (1 << 12); } void ClusterInitialStatusBody::clearShutdownIdFlag() { flags &= ~(1 << 12); } void ClusterInitialStatusBody::setFirstConfig(const std::string& _firstConfig) { firstConfig = _firstConfig; flags |= (1 << 13); } const std::string& ClusterInitialStatusBody::getFirstConfig() const { return firstConfig; } bool ClusterInitialStatusBody::hasFirstConfig() const { return flags & (1 << 13); } void ClusterInitialStatusBody::clearFirstConfigFlag() { flags &= ~(1 << 13); } void ClusterInitialStatusBody::setUrls(const Array& _urls) { urls = _urls; flags |= (1 << 14); } const Array& ClusterInitialStatusBody::getUrls() const { return urls; } bool ClusterInitialStatusBody::hasUrls() const { return flags & (1 << 14); } void ClusterInitialStatusBody::clearUrlsFlag() { flags &= ~(1 << 14); } void ClusterInitialStatusBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLong(version); if (flags & (1 << 10)) clusterId.encode(buffer); if (flags & (1 << 11)) buffer.putOctet(storeState); if (flags & (1 << 12)) shutdownId.encode(buffer); if (flags & (1 << 13)) buffer.putMediumString(firstConfig); if (flags & (1 << 14)) urls.encode(buffer); } void ClusterInitialStatusBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterInitialStatusBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) version = buffer.getLong(); if (flags & (1 << 10)) clusterId.decode(buffer); if (flags & (1 << 11)) storeState = buffer.getOctet(); if (flags & (1 << 12)) shutdownId.decode(buffer); if (flags & (1 << 13)) buffer.getMediumString(firstConfig); if (flags & (1 << 14)) urls.decode(buffer); } void ClusterInitialStatusBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterInitialStatusBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 4;//version if (flags & (1 << 10)) total += clusterId.encodedSize(); if (flags & (1 << 11)) total += 1;//storeState if (flags & (1 << 12)) total += shutdownId.encodedSize(); if (flags & (1 << 13)) total += 2 + firstConfig.size(); if (flags & (1 << 14)) total += urls.encodedSize(); return total; } uint32_t ClusterInitialStatusBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterInitialStatusBody::print(std::ostream& out) const { out << "{ClusterInitialStatusBody: "; if (flags & (1 << 8)) out << "version=" << version << "; "; if (flags & (1 << 9)) out << "active=" << getActive() << "; "; if (flags & (1 << 10)) out << "cluster-id=" << clusterId << "; "; if (flags & (1 << 11)) out << "store-state=" << (int) storeState << "; "; if (flags & (1 << 12)) out << "shutdown-id=" << shutdownId << "; "; if (flags & (1 << 13)) out << "first-config=" << firstConfig << "; "; if (flags & (1 << 14)) out << "urls=" << urls << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ExecutionExceptionBody.h0000664000076400007640000001243511752725676023143 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXECUTIONEXCEPTIONBODY_H #define QPID_FRAMING_EXECUTIONEXCEPTIONBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExecutionExceptionBody : public ModelMethod { uint16_t errorCode; SequenceNumber commandId; uint8_t classCode; uint8_t commandCode; uint8_t fieldIndex; std::string description; FieldTable errorInfo; uint16_t flags; public: static const ClassId CLASS_ID = 0x3; static const MethodId METHOD_ID = 0x3; ExecutionExceptionBody( ProtocolVersion, uint16_t _errorCode, const SequenceNumber& _commandId, uint8_t _classCode, uint8_t _commandCode, uint8_t _fieldIndex, const std::string& _description, const FieldTable& _errorInfo) : errorCode(_errorCode), commandId(_commandId), classCode(_classCode), commandCode(_commandCode), fieldIndex(_fieldIndex), description(_description), errorInfo(_errorInfo), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); flags |= (1 << 14); } ExecutionExceptionBody(ProtocolVersion=ProtocolVersion()) : errorCode(0), classCode(0), commandCode(0), fieldIndex(0), flags(0) {} QPID_COMMON_EXTERN void setErrorCode(uint16_t _errorCode); QPID_COMMON_EXTERN uint16_t getErrorCode() const; QPID_COMMON_EXTERN bool hasErrorCode() const; QPID_COMMON_EXTERN void clearErrorCodeFlag(); QPID_COMMON_EXTERN void setCommandId(const SequenceNumber& _commandId); QPID_COMMON_EXTERN SequenceNumber getCommandId() const; QPID_COMMON_EXTERN bool hasCommandId() const; QPID_COMMON_EXTERN void clearCommandIdFlag(); QPID_COMMON_EXTERN void setClassCode(uint8_t _classCode); QPID_COMMON_EXTERN uint8_t getClassCode() const; QPID_COMMON_EXTERN bool hasClassCode() const; QPID_COMMON_EXTERN void clearClassCodeFlag(); QPID_COMMON_EXTERN void setCommandCode(uint8_t _commandCode); QPID_COMMON_EXTERN uint8_t getCommandCode() const; QPID_COMMON_EXTERN bool hasCommandCode() const; QPID_COMMON_EXTERN void clearCommandCodeFlag(); QPID_COMMON_EXTERN void setFieldIndex(uint8_t _fieldIndex); QPID_COMMON_EXTERN uint8_t getFieldIndex() const; QPID_COMMON_EXTERN bool hasFieldIndex() const; QPID_COMMON_EXTERN void clearFieldIndexFlag(); QPID_COMMON_EXTERN void setDescription(const std::string& _description); QPID_COMMON_EXTERN const std::string& getDescription() const; QPID_COMMON_EXTERN bool hasDescription() const; QPID_COMMON_EXTERN void clearDescriptionFlag(); QPID_COMMON_EXTERN void setErrorInfo(const FieldTable& _errorInfo); QPID_COMMON_EXTERN const FieldTable& getErrorInfo() const; QPID_COMMON_EXTERN FieldTable& getErrorInfo(); QPID_COMMON_EXTERN bool hasErrorInfo() const; QPID_COMMON_EXTERN void clearErrorInfoFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.exception(getErrorCode(), getCommandId(), getClassCode(), getCommandCode(), getFieldIndex(), getDescription(), getErrorInfo()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExecutionExceptionBody */ }} #endif /*!QPID_FRAMING_EXECUTIONEXCEPTIONBODY_H*/ qpidc-0.16/src/qpid/framing/AMQHeartbeatBody.cpp0000664000076400007640000000201311227113407022055 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQHeartbeatBody.h" #include qpid::framing::AMQHeartbeatBody::~AMQHeartbeatBody() {} void qpid::framing::AMQHeartbeatBody::print(std::ostream& out) const { out << "heartbeat"; } qpidc-0.16/src/qpid/framing/AMQP_ClientProxy.h0000664000076400007640000002473711752725675021610 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQP_CLIENTPROXY_H #define QPID_FRAMING_AMQP_CLIENTPROXY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/Proxy.h" #include "qpid/framing/Array.h" #include "qpid/framing/amqp_types.h" #include "qpid/framing/amqp_structs.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQP_ClientProxy: public Proxy { public: QPID_COMMON_EXTERN AMQP_ClientProxy(FrameHandler& out); class QPID_COMMON_CLASS_EXTERN Connection: public Proxy { public: Connection(FrameHandler& f) : Proxy(f) {} static Connection& get(AMQP_ClientProxy& proxy) { return proxy.getConnection(); } QPID_COMMON_EXTERN virtual void start(const FieldTable& serverProperties, const Array& mechanisms, const Array& locales); QPID_COMMON_EXTERN virtual void secure(const std::string& challenge); QPID_COMMON_EXTERN virtual void tune(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeatMin, uint16_t heartbeatMax); QPID_COMMON_EXTERN virtual void openOk(const Array& knownHosts); QPID_COMMON_EXTERN virtual void redirect(const std::string& host, const Array& knownHosts); QPID_COMMON_EXTERN virtual void heartbeat(); QPID_COMMON_EXTERN virtual void close(uint16_t replyCode, const std::string& replyText); QPID_COMMON_EXTERN virtual void closeOk(); }; Connection& getConnection() { return connectionProxy; } class QPID_COMMON_CLASS_EXTERN Session: public Proxy { public: Session(FrameHandler& f) : Proxy(f) {} static Session& get(AMQP_ClientProxy& proxy) { return proxy.getSession(); } QPID_COMMON_EXTERN virtual void attach(const std::string& name, bool force); QPID_COMMON_EXTERN virtual void attached(const std::string& name); QPID_COMMON_EXTERN virtual void detach(const std::string& name); QPID_COMMON_EXTERN virtual void detached(const std::string& name, uint8_t code); QPID_COMMON_EXTERN virtual void requestTimeout(uint32_t timeout); QPID_COMMON_EXTERN virtual void timeout(uint32_t timeout); QPID_COMMON_EXTERN virtual void commandPoint(const SequenceNumber& commandId, uint64_t commandOffset); QPID_COMMON_EXTERN virtual void expected(const SequenceSet& commands, const Array& fragments); QPID_COMMON_EXTERN virtual void confirmed(const SequenceSet& commands, const Array& fragments); QPID_COMMON_EXTERN virtual void completed(const SequenceSet& commands, bool timelyReply); QPID_COMMON_EXTERN virtual void knownCompleted(const SequenceSet& commands); QPID_COMMON_EXTERN virtual void flush(bool expected, bool confirmed, bool completed); QPID_COMMON_EXTERN virtual void gap(const SequenceSet& commands); }; Session& getSession() { return sessionProxy; } class QPID_COMMON_CLASS_EXTERN Execution: public Proxy { public: Execution(FrameHandler& f) : Proxy(f) {} static Execution& get(AMQP_ClientProxy& proxy) { return proxy.getExecution(); } QPID_COMMON_EXTERN virtual void sync(); QPID_COMMON_EXTERN virtual void result(const SequenceNumber& commandId, const std::string& value); QPID_COMMON_EXTERN virtual void exception(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo); }; Execution& getExecution() { return executionProxy; } class QPID_COMMON_CLASS_EXTERN Message: public Proxy { public: Message(FrameHandler& f) : Proxy(f) {} static Message& get(AMQP_ClientProxy& proxy) { return proxy.getMessage(); } QPID_COMMON_EXTERN virtual void transfer(const std::string& destination, uint8_t acceptMode, uint8_t acquireMode); QPID_COMMON_EXTERN virtual void accept(const SequenceSet& transfers); QPID_COMMON_EXTERN virtual void reject(const SequenceSet& transfers, uint16_t code, const std::string& text); QPID_COMMON_EXTERN virtual void release(const SequenceSet& transfers, bool setRedelivered); QPID_COMMON_EXTERN virtual void resume(const std::string& destination, const std::string& resumeId); QPID_COMMON_EXTERN virtual void setFlowMode(const std::string& destination, uint8_t flowMode); QPID_COMMON_EXTERN virtual void flow(const std::string& destination, uint8_t unit, uint32_t value); QPID_COMMON_EXTERN virtual void stop(const std::string& destination); }; Message& getMessage() { return messageProxy; } class QPID_COMMON_CLASS_EXTERN Tx: public Proxy { public: Tx(FrameHandler& f) : Proxy(f) {} static Tx& get(AMQP_ClientProxy& proxy) { return proxy.getTx(); } }; Tx& getTx() { return txProxy; } class QPID_COMMON_CLASS_EXTERN Dtx: public Proxy { public: Dtx(FrameHandler& f) : Proxy(f) {} static Dtx& get(AMQP_ClientProxy& proxy) { return proxy.getDtx(); } }; Dtx& getDtx() { return dtxProxy; } class QPID_COMMON_CLASS_EXTERN Exchange: public Proxy { public: Exchange(FrameHandler& f) : Proxy(f) {} static Exchange& get(AMQP_ClientProxy& proxy) { return proxy.getExchange(); } }; Exchange& getExchange() { return exchangeProxy; } class QPID_COMMON_CLASS_EXTERN Queue: public Proxy { public: Queue(FrameHandler& f) : Proxy(f) {} static Queue& get(AMQP_ClientProxy& proxy) { return proxy.getQueue(); } }; Queue& getQueue() { return queueProxy; } class QPID_COMMON_CLASS_EXTERN File: public Proxy { public: File(FrameHandler& f) : Proxy(f) {} static File& get(AMQP_ClientProxy& proxy) { return proxy.getFile(); } QPID_COMMON_EXTERN virtual void qosOk(); QPID_COMMON_EXTERN virtual void consumeOk(const std::string& consumerTag); QPID_COMMON_EXTERN virtual void open(const std::string& identifier, uint64_t contentSize); QPID_COMMON_EXTERN virtual void openOk(uint64_t stagedSize); QPID_COMMON_EXTERN virtual void stage(); QPID_COMMON_EXTERN virtual void return_(uint16_t replyCode, const std::string& replyText, const std::string& exchange, const std::string& routingKey); QPID_COMMON_EXTERN virtual void deliver(const std::string& consumerTag, uint64_t deliveryTag, bool redelivered, const std::string& exchange, const std::string& routingKey, const std::string& identifier); }; File& getFile() { return fileProxy; } class QPID_COMMON_CLASS_EXTERN Stream: public Proxy { public: Stream(FrameHandler& f) : Proxy(f) {} static Stream& get(AMQP_ClientProxy& proxy) { return proxy.getStream(); } QPID_COMMON_EXTERN virtual void qosOk(); QPID_COMMON_EXTERN virtual void consumeOk(const std::string& consumerTag); QPID_COMMON_EXTERN virtual void return_(uint16_t replyCode, const std::string& replyText, const std::string& exchange, const std::string& routingKey); QPID_COMMON_EXTERN virtual void deliver(const std::string& consumerTag, uint64_t deliveryTag, const std::string& exchange, const std::string& queue); }; Stream& getStream() { return streamProxy; } class QPID_COMMON_CLASS_EXTERN Cluster: public Proxy { public: Cluster(FrameHandler& f) : Proxy(f) {} static Cluster& get(AMQP_ClientProxy& proxy) { return proxy.getCluster(); } }; Cluster& getCluster() { return clusterProxy; } class QPID_COMMON_CLASS_EXTERN ClusterConnection: public Proxy { public: ClusterConnection(FrameHandler& f) : Proxy(f) {} static ClusterConnection& get(AMQP_ClientProxy& proxy) { return proxy.getClusterConnection(); } }; ClusterConnection& getClusterConnection() { return clusterConnectionProxy; } private: Connection connectionProxy; Session sessionProxy; Execution executionProxy; Message messageProxy; Tx txProxy; Dtx dtxProxy; Exchange exchangeProxy; Queue queueProxy; File fileProxy; Stream streamProxy; Cluster clusterProxy; ClusterConnection clusterConnectionProxy; }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_AMQP_CLIENTPROXY_H*/ qpidc-0.16/src/qpid/framing/DtxSelectBody.h0000664000076400007640000000507111752725676021216 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXSELECTBODY_H #define QPID_FRAMING_DTXSELECTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxSelectBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0x1; DtxSelectBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.select(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxSelectBody */ }} #endif /*!QPID_FRAMING_DTXSELECTBODY_H*/ qpidc-0.16/src/qpid/framing/DtxSetTimeoutBody.cpp0000664000076400007640000000552111752725676022434 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxSetTimeoutBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxSetTimeoutBody::setXid(const Xid& _xid) { xid = _xid; flags |= (1 << 8); } const Xid& DtxSetTimeoutBody::getXid() const { return xid; } bool DtxSetTimeoutBody::hasXid() const { return flags & (1 << 8); } void DtxSetTimeoutBody::clearXidFlag() { flags &= ~(1 << 8); } void DtxSetTimeoutBody::setTimeout(uint32_t _timeout) { timeout = _timeout; flags |= (1 << 9); } uint32_t DtxSetTimeoutBody::getTimeout() const { return timeout; } bool DtxSetTimeoutBody::hasTimeout() const { return flags & (1 << 9); } void DtxSetTimeoutBody::clearTimeoutFlag() { flags &= ~(1 << 9); } void DtxSetTimeoutBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) xid.encode(buffer); if (flags & (1 << 9)) buffer.putLong(timeout); } void DtxSetTimeoutBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxSetTimeoutBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) xid.decode(buffer); if (flags & (1 << 9)) timeout = buffer.getLong(); } void DtxSetTimeoutBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxSetTimeoutBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += xid.encodedSize(); if (flags & (1 << 9)) total += 4;//timeout return total; } uint32_t DtxSetTimeoutBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxSetTimeoutBody::print(std::ostream& out) const { out << "{DtxSetTimeoutBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; if (flags & (1 << 9)) out << "timeout=" << timeout << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/AMQFrame.cpp0000664000076400007640000001157311611360622020405 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/BodyFactory.h" #include "qpid/framing/MethodBodyFactory.h" #include "qpid/Msg.h" #include #include namespace qpid { namespace framing { void AMQFrame::init() { bof = eof = bos = eos = true; subchannel=0; channel=0; } AMQFrame::AMQFrame(const boost::intrusive_ptr& b) : body(b) { init(); } AMQFrame::AMQFrame(const AMQBody& b) : body(b.clone()) { init(); } AMQFrame::~AMQFrame() {} void AMQFrame::setMethod(ClassId c, MethodId m) { body = MethodBodyFactory::create(c,m); } uint32_t AMQFrame::encodedSize() const { uint32_t size = frameOverhead() + body->encodedSize(); if (body->getMethod()) size += sizeof(ClassId)+sizeof(MethodId); return size; } uint32_t AMQFrame::frameOverhead() { return 12 /*frame header*/; } uint16_t AMQFrame::DECODE_SIZE_MIN=4; uint16_t AMQFrame::decodeSize(char* data) { Buffer buf(data+2, DECODE_SIZE_MIN); return buf.getShort(); } void AMQFrame::encode(Buffer& buffer) const { //set track first (controls on track 0, everything else on 1): uint8_t track = getBody()->type() ? 1 : 0; uint8_t flags = (bof ? 0x08 : 0) | (eof ? 0x04 : 0) | (bos ? 0x02 : 0) | (eos ? 0x01 : 0); buffer.putOctet(flags); buffer.putOctet(getBody()->type()); buffer.putShort(encodedSize()); buffer.putOctet(0); buffer.putOctet(0x0f & track); buffer.putShort(channel); buffer.putLong(0); const AMQMethodBody* method=getMethod(); if (method) { buffer.putOctet(method->amqpClassId()); buffer.putOctet(method->amqpMethodId()); } body->encode(buffer); } bool AMQFrame::decode(Buffer& buffer) { if(buffer.available() < frameOverhead()) return false; buffer.record(); uint8_t flags = buffer.getOctet(); uint8_t framing_version = (flags & 0xc0) >> 6; if (framing_version != 0) throw FramingErrorException(QPID_MSG("Framing version unsupported")); bof = flags & 0x08; eof = flags & 0x04; bos = flags & 0x02; eos = flags & 0x01; uint8_t type = buffer.getOctet(); uint16_t frame_size = buffer.getShort(); if (frame_size < frameOverhead()) throw FramingErrorException(QPID_MSG("Frame size too small " << frame_size)); uint8_t reserved1 = buffer.getOctet(); uint8_t field1 = buffer.getOctet(); subchannel = field1 & 0x0f; channel = buffer.getShort(); (void) buffer.getLong(); // reserved2 // Verify that the protocol header meets current spec // TODO: should we check reserved2 against zero as well? - the // spec isn't clear if ((flags & 0x30) != 0 || reserved1 != 0 || (field1 & 0xf0) != 0) throw FramingErrorException(QPID_MSG("Reserved bits not zero")); // TODO: should no longer care about body size and only pass up // B,E,b,e flags uint16_t body_size = frame_size - frameOverhead(); if (buffer.available() < body_size){ buffer.restore(); return false; } switch(type) { case 0://CONTROL case METHOD_BODY: { ClassId c = buffer.getOctet(); MethodId m = buffer.getOctet(); body = MethodBodyFactory::create(c, m); break; } case HEADER_BODY: body = BodyFactory::create(); break; case CONTENT_BODY: body = BodyFactory::create(); break; case HEARTBEAT_BODY: body = BodyFactory::create(); break; default: throw IllegalArgumentException(QPID_MSG("Invalid frame type " << type)); } body->decode(buffer, body_size); return true; } void AMQFrame::cloneBody() { body = body->clone(); } std::ostream& operator<<(std::ostream& out, const AMQFrame& f) { return out << "Frame[" << (f.getBof() ? "B" : "") << (f.getEof() ? "E" : "") << (f.getBos() ? "b" : "") << (f.getEos() ? "e" : "") << "; " << "channel=" << f.getChannel() << "; " << *f.getBody() << "]"; } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/MessageAcquireBody.cpp0000664000076400007640000000461411752725676022552 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageAcquireBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageAcquireBody::setTransfers(const SequenceSet& _transfers) { transfers = _transfers; flags |= (1 << 8); } const SequenceSet& MessageAcquireBody::getTransfers() const { return transfers; } bool MessageAcquireBody::hasTransfers() const { return flags & (1 << 8); } void MessageAcquireBody::clearTransfersFlag() { flags &= ~(1 << 8); } void MessageAcquireBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) transfers.encode(buffer); } void MessageAcquireBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageAcquireBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) transfers.decode(buffer); } void MessageAcquireBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageAcquireBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += transfers.encodedSize(); return total; } uint32_t MessageAcquireBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageAcquireBody::print(std::ostream& out) const { out << "{MessageAcquireBody: "; if (flags & (1 << 8)) out << "transfers=" << transfers << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/FragmentProperties.cpp0000664000076400007640000000640011752725676022651 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FragmentProperties.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FragmentProperties::setFirst(bool _first) { if (_first) flags |= (1 << 8); else flags &= ~(1 << 8); } bool FragmentProperties::getFirst() const { return flags & (1 << 8); } void FragmentProperties::setLast(bool _last) { if (_last) flags |= (1 << 9); else flags &= ~(1 << 9); } bool FragmentProperties::getLast() const { return flags & (1 << 9); } void FragmentProperties::setFragmentSize(uint64_t _fragmentSize) { fragmentSize = _fragmentSize; flags |= (1 << 10); } uint64_t FragmentProperties::getFragmentSize() const { return fragmentSize; } bool FragmentProperties::hasFragmentSize() const { return flags & (1 << 10); } void FragmentProperties::clearFragmentSizeFlag() { flags &= ~(1 << 10); } void FragmentProperties::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 10)) buffer.putLongLong(fragmentSize); } void FragmentProperties::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void FragmentProperties::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 10)) fragmentSize = buffer.getLongLong(); } void FragmentProperties::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t FragmentProperties::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 10)) total += 8;//fragmentSize return total; } uint32_t FragmentProperties::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void FragmentProperties::print(std::ostream& out) const { out << "{FragmentProperties: "; if (flags & (1 << 8)) out << "first=" << getFirst() << "; "; if (flags & (1 << 9)) out << "last=" << getLast() << "; "; if (flags & (1 << 10)) out << "fragment-size=" << fragmentSize << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const FragmentProperties& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/ExchangeDeleteBody.h0000664000076400007640000000627211752725676022170 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXCHANGEDELETEBODY_H #define QPID_FRAMING_EXCHANGEDELETEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExchangeDeleteBody : public ModelMethod { std::string exchange; uint16_t flags; public: static const ClassId CLASS_ID = 0x7; static const MethodId METHOD_ID = 0x2; ExchangeDeleteBody( ProtocolVersion, const std::string& _exchange, bool _ifUnused) : exchange(_exchange), flags(0){ setIfUnused(_ifUnused); flags |= (1 << 8); } ExchangeDeleteBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setIfUnused(bool _ifUnused); QPID_COMMON_EXTERN bool getIfUnused() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.delete_(getExchange(), getIfUnused()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExchangeDeleteBody */ }} #endif /*!QPID_FRAMING_EXCHANGEDELETEBODY_H*/ qpidc-0.16/src/qpid/framing/AccumulatedAck.h0000664000076400007640000000527711227113407021333 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _AccumulatedAck_ #define _AccumulatedAck_ #include #include #include #include #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/SequenceNumberSet.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { struct Range { SequenceNumber start; SequenceNumber end; Range(SequenceNumber s, SequenceNumber e); bool contains(SequenceNumber i) const; bool intersect(const Range& r) const; bool merge(const Range& r); bool mergeable(const SequenceNumber& r) const; }; /** * Keeps an accumulated record of acknowledged messages (by delivery * tag). */ class AccumulatedAck { public: /** * Everything up to this value has been acknowledged. */ SequenceNumber mark; /** * List of individually acknowledged messages greater than the * 'mark'. */ std::list ranges; QPID_COMMON_EXTERN explicit AccumulatedAck(SequenceNumber r = SequenceNumber()); QPID_COMMON_EXTERN void update(SequenceNumber firstTag, SequenceNumber lastTag); QPID_COMMON_EXTERN void consolidate(); QPID_COMMON_EXTERN void clear(); QPID_COMMON_EXTERN bool covers(SequenceNumber tag) const; void collectRanges(SequenceNumberSet& set) const; QPID_COMMON_EXTERN void update(const SequenceNumber cumulative, const SequenceNumberSet& range); void operator()(SequenceNumber first, SequenceNumber last) { update(first, last); } }; QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const Range&); QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const AccumulatedAck&); } } #endif qpidc-0.16/src/qpid/framing/ClusterTimerDropBody.cpp0000664000076400007640000000456411752725676023127 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterTimerDropBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterTimerDropBody::setName(const std::string& _name) { name = _name; flags |= (1 << 8); } const std::string& ClusterTimerDropBody::getName() const { return name; } bool ClusterTimerDropBody::hasName() const { return flags & (1 << 8); } void ClusterTimerDropBody::clearNameFlag() { flags &= ~(1 << 8); } void ClusterTimerDropBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(name); } void ClusterTimerDropBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterTimerDropBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(name); } void ClusterTimerDropBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterTimerDropBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + name.size(); return total; } uint32_t ClusterTimerDropBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterTimerDropBody::print(std::ostream& out) const { out << "{ClusterTimerDropBody: "; if (flags & (1 << 8)) out << "name=" << name << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionConfigBody.cpp0000664000076400007640000000476211752725676024447 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionConfigBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionConfigBody::setEncoded(const std::string& _encoded) { encoded = _encoded; flags |= (1 << 8); } const std::string& ClusterConnectionConfigBody::getEncoded() const { return encoded; } bool ClusterConnectionConfigBody::hasEncoded() const { return flags & (1 << 8); } void ClusterConnectionConfigBody::clearEncodedFlag() { flags &= ~(1 << 8); } void ClusterConnectionConfigBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongString(encoded); } void ClusterConnectionConfigBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionConfigBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getLongString(encoded); } void ClusterConnectionConfigBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionConfigBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 4 + encoded.size(); return total; } uint32_t ClusterConnectionConfigBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionConfigBody::print(std::ostream& out) const { out << "{ClusterConnectionConfigBody: "; if (flags & (1 << 8)) out << "encoded=" << encoded << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionConfigBody.h0000664000076400007640000000607711752725676024115 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONCONFIGBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONCONFIGBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionConfigBody : public ModelMethod { std::string encoded; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x37; ClusterConnectionConfigBody( ProtocolVersion, const std::string& _encoded) : encoded(_encoded), flags(0){ flags |= (1 << 8); } ClusterConnectionConfigBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setEncoded(const std::string& _encoded); QPID_COMMON_EXTERN const std::string& getEncoded() const; QPID_COMMON_EXTERN bool hasEncoded() const; QPID_COMMON_EXTERN void clearEncodedFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.config(getEncoded()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionConfigBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONCONFIGBODY_H*/ qpidc-0.16/src/qpid/framing/AMQP_HighestVersion.h0000664000076400007640000000234311005700726022233 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /* * This file used to be auto-generated by Qpid Gentools v.0.1 * its here temporarily until we get a full solution to multi-version support */ #ifndef qpid_framing_highestProtocolVersion__ #define qpid_framing_highestProtocolVersion__ #include "qpid/framing/ProtocolVersion.h" namespace qpid { namespace framing { static ProtocolVersion highestProtocolVersion(0, 10); } /* namespace framing */ } /* namespace qpid */ #endif qpidc-0.16/src/qpid/framing/Array.cpp0000664000076400007640000001045011341561464020072 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Array.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/FieldValue.h" #include "qpid/Exception.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/Msg.h" #include namespace qpid { namespace framing { Array::Array() : type(TYPE_CODE_VOID) {} Array::Array(TypeCode t) : type(t) {} Array::Array(uint8_t t) : type(typeCode(t)) {} Array::Array(const std::vector& in) { type = TYPE_CODE_STR16; for (std::vector::const_iterator i = in.begin(); i != in.end(); ++i) { ValuePtr value(new Str16Value(*i)); values.push_back(value); } } uint32_t Array::encodedSize() const { //note: size is only included when used as a 'top level' type uint32_t len(4/*size*/ + 1/*type*/ + 4/*count*/); for(ValueVector::const_iterator i = values.begin(); i != values.end(); ++i) { len += (*i)->getData().encodedSize(); } return len; } int Array::count() const { return values.size(); } std::ostream& operator<<(std::ostream& out, const Array& a) { out << typeName(a.getType()) << "{"; for(Array::ValueVector::const_iterator i = a.values.begin(); i != a.values.end(); ++i) { if (i != a.values.begin()) out << ", "; (*i)->print(out); } return out << "}"; } void Array::encode(Buffer& buffer) const{ buffer.putLong(encodedSize() - 4);//size added only when array is a top-level type buffer.putOctet(type); buffer.putLong(count()); for (ValueVector::const_iterator i = values.begin(); i!=values.end(); ++i) { (*i)->getData().encode(buffer); } } void Array::decode(Buffer& buffer){ values.clear(); uint32_t size = buffer.getLong();//size added only when array is a top-level type uint32_t available = buffer.available(); if (available < size) { throw IllegalArgumentException(QPID_MSG("Not enough data for array, expected " << size << " bytes but only " << available << " available")); } if (size) { type = TypeCode(buffer.getOctet()); uint32_t count = buffer.getLong(); FieldValue dummy; dummy.setType(type); available = buffer.available(); if (available < count * dummy.getData().encodedSize()) { throw IllegalArgumentException(QPID_MSG("Not enough data for array, expected " << count << " items of " << dummy.getData().encodedSize() << " bytes each but only " << available << " bytes available")); } for (uint32_t i = 0; i < count; i++) { ValuePtr value(new FieldValue); value->setType(type); value->getData().decode(buffer); values.push_back(ValuePtr(value)); } } } bool Array::operator==(const Array& x) const { if (type != x.type) return false; if (values.size() != x.values.size()) return false; for (ValueVector::const_iterator i = values.begin(), j = x.values.begin(); i != values.end(); ++i, ++j) { if (*(i->get()) != *(j->get())) return false; } return true; } void Array::insert(iterator i, ValuePtr value) { if (type != value->getType()) { // FIXME aconway 2008-10-31: put meaningful strings in this message. throw Exception(QPID_MSG("Wrong type of value in Array, expected " << type << " but found " << TypeCode(value->getType()))); } values.insert(i, value); } } } qpidc-0.16/src/qpid/framing/ExchangeDeleteBody.cpp0000664000076400007640000000524311752725676022520 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExchangeDeleteBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExchangeDeleteBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 8); } const std::string& ExchangeDeleteBody::getExchange() const { return exchange; } bool ExchangeDeleteBody::hasExchange() const { return flags & (1 << 8); } void ExchangeDeleteBody::clearExchangeFlag() { flags &= ~(1 << 8); } void ExchangeDeleteBody::setIfUnused(bool _ifUnused) { if (_ifUnused) flags |= (1 << 9); else flags &= ~(1 << 9); } bool ExchangeDeleteBody::getIfUnused() const { return flags & (1 << 9); } void ExchangeDeleteBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(exchange); } void ExchangeDeleteBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ExchangeDeleteBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(exchange); } void ExchangeDeleteBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ExchangeDeleteBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + exchange.size(); return total; } uint32_t ExchangeDeleteBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ExchangeDeleteBody::print(std::ostream& out) const { out << "{ExchangeDeleteBody: "; if (flags & (1 << 8)) out << "exchange=" << exchange << "; "; if (flags & (1 << 9)) out << "if-unused=" << getIfUnused() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionAnnounceBody.cpp0000664000076400007640000001263111752725676025002 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionAnnounceBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionAnnounceBody::setManagementId(const std::string& _managementId) { managementId = _managementId; flags |= (1 << 8); } const std::string& ClusterConnectionAnnounceBody::getManagementId() const { return managementId; } bool ClusterConnectionAnnounceBody::hasManagementId() const { return flags & (1 << 8); } void ClusterConnectionAnnounceBody::clearManagementIdFlag() { flags &= ~(1 << 8); } void ClusterConnectionAnnounceBody::setSsf(uint32_t _ssf) { ssf = _ssf; flags |= (1 << 9); } uint32_t ClusterConnectionAnnounceBody::getSsf() const { return ssf; } bool ClusterConnectionAnnounceBody::hasSsf() const { return flags & (1 << 9); } void ClusterConnectionAnnounceBody::clearSsfFlag() { flags &= ~(1 << 9); } void ClusterConnectionAnnounceBody::setAuthid(const std::string& _authid) { authid = _authid; flags |= (1 << 10); } const std::string& ClusterConnectionAnnounceBody::getAuthid() const { return authid; } bool ClusterConnectionAnnounceBody::hasAuthid() const { return flags & (1 << 10); } void ClusterConnectionAnnounceBody::clearAuthidFlag() { flags &= ~(1 << 10); } void ClusterConnectionAnnounceBody::setNodict(bool _nodict) { if (_nodict) flags |= (1 << 11); else flags &= ~(1 << 11); } bool ClusterConnectionAnnounceBody::getNodict() const { return flags & (1 << 11); } void ClusterConnectionAnnounceBody::setUsername(const std::string& _username) { username = _username; flags |= (1 << 12); } const std::string& ClusterConnectionAnnounceBody::getUsername() const { return username; } bool ClusterConnectionAnnounceBody::hasUsername() const { return flags & (1 << 12); } void ClusterConnectionAnnounceBody::clearUsernameFlag() { flags &= ~(1 << 12); } void ClusterConnectionAnnounceBody::setInitialFrames(const std::string& _initialFrames) { initialFrames = _initialFrames; flags |= (1 << 13); } const std::string& ClusterConnectionAnnounceBody::getInitialFrames() const { return initialFrames; } bool ClusterConnectionAnnounceBody::hasInitialFrames() const { return flags & (1 << 13); } void ClusterConnectionAnnounceBody::clearInitialFramesFlag() { flags &= ~(1 << 13); } void ClusterConnectionAnnounceBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(managementId); if (flags & (1 << 9)) buffer.putLong(ssf); if (flags & (1 << 10)) buffer.putMediumString(authid); if (flags & (1 << 12)) buffer.putLongString(username); if (flags & (1 << 13)) buffer.putLongString(initialFrames); } void ClusterConnectionAnnounceBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionAnnounceBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(managementId); if (flags & (1 << 9)) ssf = buffer.getLong(); if (flags & (1 << 10)) buffer.getMediumString(authid); if (flags & (1 << 12)) buffer.getLongString(username); if (flags & (1 << 13)) buffer.getLongString(initialFrames); } void ClusterConnectionAnnounceBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionAnnounceBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + managementId.size(); if (flags & (1 << 9)) total += 4;//ssf if (flags & (1 << 10)) total += 2 + authid.size(); if (flags & (1 << 12)) total += 4 + username.size(); if (flags & (1 << 13)) total += 4 + initialFrames.size(); return total; } uint32_t ClusterConnectionAnnounceBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionAnnounceBody::print(std::ostream& out) const { out << "{ClusterConnectionAnnounceBody: "; if (flags & (1 << 8)) out << "management-id=" << managementId << "; "; if (flags & (1 << 9)) out << "ssf=" << ssf << "; "; if (flags & (1 << 10)) out << "authid=" << authid << "; "; if (flags & (1 << 11)) out << "nodict=" << getNodict() << "; "; if (flags & (1 << 12)) out << "username=" << username << "; "; if (flags & (1 << 13)) out << "initial-frames=" << initialFrames << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConfigChangeBody.cpp0000664000076400007640000000716711752725676023537 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConfigChangeBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConfigChangeBody::setMembers(const std::string& _members) { members = _members; flags |= (1 << 8); } const std::string& ClusterConfigChangeBody::getMembers() const { return members; } bool ClusterConfigChangeBody::hasMembers() const { return flags & (1 << 8); } void ClusterConfigChangeBody::clearMembersFlag() { flags &= ~(1 << 8); } void ClusterConfigChangeBody::setJoined(const std::string& _joined) { joined = _joined; flags |= (1 << 9); } const std::string& ClusterConfigChangeBody::getJoined() const { return joined; } bool ClusterConfigChangeBody::hasJoined() const { return flags & (1 << 9); } void ClusterConfigChangeBody::clearJoinedFlag() { flags &= ~(1 << 9); } void ClusterConfigChangeBody::setLeft(const std::string& _left) { left = _left; flags |= (1 << 10); } const std::string& ClusterConfigChangeBody::getLeft() const { return left; } bool ClusterConfigChangeBody::hasLeft() const { return flags & (1 << 10); } void ClusterConfigChangeBody::clearLeftFlag() { flags &= ~(1 << 10); } void ClusterConfigChangeBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(members); if (flags & (1 << 9)) buffer.putMediumString(joined); if (flags & (1 << 10)) buffer.putMediumString(left); } void ClusterConfigChangeBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConfigChangeBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(members); if (flags & (1 << 9)) buffer.getMediumString(joined); if (flags & (1 << 10)) buffer.getMediumString(left); } void ClusterConfigChangeBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConfigChangeBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + members.size(); if (flags & (1 << 9)) total += 2 + joined.size(); if (flags & (1 << 10)) total += 2 + left.size(); return total; } uint32_t ClusterConfigChangeBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConfigChangeBody::print(std::ostream& out) const { out << "{ClusterConfigChangeBody: "; if (flags & (1 << 8)) out << "members=" << members << "; "; if (flags & (1 << 9)) out << "joined=" << joined << "; "; if (flags & (1 << 10)) out << "left=" << left << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ExecutionResultBody.h0000664000076400007640000000655711752725676022473 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXECUTIONRESULTBODY_H #define QPID_FRAMING_EXECUTIONRESULTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExecutionResultBody : public ModelMethod { SequenceNumber commandId; std::string value; uint16_t flags; public: static const ClassId CLASS_ID = 0x3; static const MethodId METHOD_ID = 0x2; ExecutionResultBody( ProtocolVersion, const SequenceNumber& _commandId, const std::string& _value) : commandId(_commandId), value(_value), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ExecutionResultBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setCommandId(const SequenceNumber& _commandId); QPID_COMMON_EXTERN SequenceNumber getCommandId() const; QPID_COMMON_EXTERN bool hasCommandId() const; QPID_COMMON_EXTERN void clearCommandIdFlag(); QPID_COMMON_EXTERN void setValue(const std::string& _value); QPID_COMMON_EXTERN const std::string& getValue() const; QPID_COMMON_EXTERN bool hasValue() const; QPID_COMMON_EXTERN void clearValueFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.result(getCommandId(), getValue()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExecutionResultBody */ }} #endif /*!QPID_FRAMING_EXECUTIONRESULTBODY_H*/ qpidc-0.16/src/qpid/framing/MessageTransferBody.h0000664000076400007640000000742411752725676022414 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGETRANSFERBODY_H #define QPID_FRAMING_MESSAGETRANSFERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageTransferBody : public ModelMethod { std::string destination; uint8_t acceptMode; uint8_t acquireMode; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0x1; MessageTransferBody( ProtocolVersion, const std::string& _destination, uint8_t _acceptMode, uint8_t _acquireMode) : destination(_destination), acceptMode(_acceptMode), acquireMode(_acquireMode), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } MessageTransferBody(ProtocolVersion=ProtocolVersion()) : acceptMode(1), acquireMode(0), flags(0) {} QPID_COMMON_EXTERN void setDestination(const std::string& _destination); QPID_COMMON_EXTERN const std::string& getDestination() const; QPID_COMMON_EXTERN bool hasDestination() const; QPID_COMMON_EXTERN void clearDestinationFlag(); QPID_COMMON_EXTERN void setAcceptMode(uint8_t _acceptMode); QPID_COMMON_EXTERN uint8_t getAcceptMode() const; QPID_COMMON_EXTERN bool hasAcceptMode() const; QPID_COMMON_EXTERN void clearAcceptModeFlag(); QPID_COMMON_EXTERN void setAcquireMode(uint8_t _acquireMode); QPID_COMMON_EXTERN uint8_t getAcquireMode() const; QPID_COMMON_EXTERN bool hasAcquireMode() const; QPID_COMMON_EXTERN void clearAcquireModeFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.transfer(getDestination(), getAcceptMode(), getAcquireMode()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return true; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageTransferBody */ }} #endif /*!QPID_FRAMING_MESSAGETRANSFERBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionDeliveryRecordBody.cpp0000664000076400007640000001625411752725676026163 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionDeliveryRecordBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionDeliveryRecordBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ClusterConnectionDeliveryRecordBody::getQueue() const { return queue; } bool ClusterConnectionDeliveryRecordBody::hasQueue() const { return flags & (1 << 8); } void ClusterConnectionDeliveryRecordBody::clearQueueFlag() { flags &= ~(1 << 8); } void ClusterConnectionDeliveryRecordBody::setPosition(const SequenceNumber& _position) { position = _position; flags |= (1 << 9); } SequenceNumber ClusterConnectionDeliveryRecordBody::getPosition() const { return position; } bool ClusterConnectionDeliveryRecordBody::hasPosition() const { return flags & (1 << 9); } void ClusterConnectionDeliveryRecordBody::clearPositionFlag() { flags &= ~(1 << 9); } void ClusterConnectionDeliveryRecordBody::setTag(const std::string& _tag) { tag = _tag; flags |= (1 << 10); } const std::string& ClusterConnectionDeliveryRecordBody::getTag() const { return tag; } bool ClusterConnectionDeliveryRecordBody::hasTag() const { return flags & (1 << 10); } void ClusterConnectionDeliveryRecordBody::clearTagFlag() { flags &= ~(1 << 10); } void ClusterConnectionDeliveryRecordBody::setId(const SequenceNumber& _id) { id = _id; flags |= (1 << 11); } SequenceNumber ClusterConnectionDeliveryRecordBody::getId() const { return id; } bool ClusterConnectionDeliveryRecordBody::hasId() const { return flags & (1 << 11); } void ClusterConnectionDeliveryRecordBody::clearIdFlag() { flags &= ~(1 << 11); } void ClusterConnectionDeliveryRecordBody::setAcquired(bool _acquired) { if (_acquired) flags |= (1 << 12); else flags &= ~(1 << 12); } bool ClusterConnectionDeliveryRecordBody::getAcquired() const { return flags & (1 << 12); } void ClusterConnectionDeliveryRecordBody::setAccepted(bool _accepted) { if (_accepted) flags |= (1 << 13); else flags &= ~(1 << 13); } bool ClusterConnectionDeliveryRecordBody::getAccepted() const { return flags & (1 << 13); } void ClusterConnectionDeliveryRecordBody::setCancelled(bool _cancelled) { if (_cancelled) flags |= (1 << 14); else flags &= ~(1 << 14); } bool ClusterConnectionDeliveryRecordBody::getCancelled() const { return flags & (1 << 14); } void ClusterConnectionDeliveryRecordBody::setCompleted(bool _completed) { if (_completed) flags |= (1 << 15); else flags &= ~(1 << 15); } bool ClusterConnectionDeliveryRecordBody::getCompleted() const { return flags & (1 << 15); } void ClusterConnectionDeliveryRecordBody::setEnded(bool _ended) { if (_ended) flags |= (1 << 0); else flags &= ~(1 << 0); } bool ClusterConnectionDeliveryRecordBody::getEnded() const { return flags & (1 << 0); } void ClusterConnectionDeliveryRecordBody::setWindowing(bool _windowing) { if (_windowing) flags |= (1 << 1); else flags &= ~(1 << 1); } bool ClusterConnectionDeliveryRecordBody::getWindowing() const { return flags & (1 << 1); } void ClusterConnectionDeliveryRecordBody::setEnqueued(bool _enqueued) { if (_enqueued) flags |= (1 << 2); else flags &= ~(1 << 2); } bool ClusterConnectionDeliveryRecordBody::getEnqueued() const { return flags & (1 << 2); } void ClusterConnectionDeliveryRecordBody::setCredit(uint32_t _credit) { credit = _credit; flags |= (1 << 3); } uint32_t ClusterConnectionDeliveryRecordBody::getCredit() const { return credit; } bool ClusterConnectionDeliveryRecordBody::hasCredit() const { return flags & (1 << 3); } void ClusterConnectionDeliveryRecordBody::clearCreditFlag() { flags &= ~(1 << 3); } void ClusterConnectionDeliveryRecordBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) position.encode(buffer); if (flags & (1 << 10)) buffer.putShortString(tag); if (flags & (1 << 11)) id.encode(buffer); if (flags & (1 << 3)) buffer.putLong(credit); } void ClusterConnectionDeliveryRecordBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionDeliveryRecordBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) position.decode(buffer); if (flags & (1 << 10)) buffer.getShortString(tag); if (flags & (1 << 11)) id.decode(buffer); if (flags & (1 << 3)) credit = buffer.getLong(); } void ClusterConnectionDeliveryRecordBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionDeliveryRecordBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += position.encodedSize(); if (flags & (1 << 10)) total += 1 + tag.size(); if (flags & (1 << 11)) total += id.encodedSize(); if (flags & (1 << 3)) total += 4;//credit return total; } uint32_t ClusterConnectionDeliveryRecordBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionDeliveryRecordBody::print(std::ostream& out) const { out << "{ClusterConnectionDeliveryRecordBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "position=" << position << "; "; if (flags & (1 << 10)) out << "tag=" << tag << "; "; if (flags & (1 << 11)) out << "id=" << id << "; "; if (flags & (1 << 12)) out << "acquired=" << getAcquired() << "; "; if (flags & (1 << 13)) out << "accepted=" << getAccepted() << "; "; if (flags & (1 << 14)) out << "cancelled=" << getCancelled() << "; "; if (flags & (1 << 15)) out << "completed=" << getCompleted() << "; "; if (flags & (1 << 0)) out << "ended=" << getEnded() << "; "; if (flags & (1 << 1)) out << "windowing=" << getWindowing() << "; "; if (flags & (1 << 2)) out << "enqueued=" << getEnqueued() << "; "; if (flags & (1 << 3)) out << "credit=" << credit << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionRetractOfferBody.h0000664000076400007640000000527111752725676025271 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONRETRACTOFFERBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONRETRACTOFFERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionRetractOfferBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x22; ClusterConnectionRetractOfferBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.retractOffer(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionRetractOfferBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONRETRACTOFFERBODY_H*/ qpidc-0.16/src/qpid/framing/SessionTimeoutBody.h0000664000076400007640000000600411752725676022306 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONTIMEOUTBODY_H #define QPID_FRAMING_SESSIONTIMEOUTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionTimeoutBody : public AMQMethodBody { uint32_t timeout; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0x6; SessionTimeoutBody( ProtocolVersion, uint32_t _timeout) : timeout(_timeout), flags(0){ flags |= (1 << 8); } SessionTimeoutBody(ProtocolVersion=ProtocolVersion()) : timeout(0), flags(0) {} QPID_COMMON_EXTERN void setTimeout(uint32_t _timeout); QPID_COMMON_EXTERN uint32_t getTimeout() const; QPID_COMMON_EXTERN bool hasTimeout() const; QPID_COMMON_EXTERN void clearTimeoutFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.timeout(getTimeout()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionTimeoutBody */ }} #endif /*!QPID_FRAMING_SESSIONTIMEOUTBODY_H*/ qpidc-0.16/src/qpid/framing/AccumulatedAck.cpp0000664000076400007640000001102611227113407021653 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AccumulatedAck.h" #include #include #include using std::list; using std::max; using std::min; using namespace qpid::framing; AccumulatedAck::AccumulatedAck(SequenceNumber r) : mark(r) {} void AccumulatedAck::update(SequenceNumber first, SequenceNumber last){ assert(first <= last); if (last < mark) return; Range r(first, last); bool handled = false; bool markMerged = false; list::iterator merged = ranges.end(); if (r.mergeable(mark)) { mark = r.end; markMerged = true; handled = true; } else { for (list::iterator i = ranges.begin(); i != ranges.end() && !handled; i++) { if (i->merge(r)) { merged = i; handled = true; } else if (r.start < i->start) { ranges.insert(i, r); handled = true; } } } if (!handled) { ranges.push_back(r); } else { while (!ranges.empty() && ranges.front().end <= mark) { ranges.pop_front(); } if (markMerged) { //new range is incorporated, but may be possible to consolidate merged = ranges.begin(); while (merged != ranges.end() && merged->mergeable(mark)) { mark = merged->end; merged = ranges.erase(merged); } } if (merged != ranges.end()) { //consolidate ranges list::iterator i = merged; list::iterator j = i++; while (i != ranges.end() && j->merge(*i)) { j = i++; } } } } void AccumulatedAck::consolidate(){} void AccumulatedAck::clear(){ mark = SequenceNumber(0);//not sure that this is valid when wraparound is a possibility ranges.clear(); } bool AccumulatedAck::covers(SequenceNumber tag) const{ if (tag <= mark) return true; for (list::const_iterator i = ranges.begin(); i != ranges.end(); i++) { if (i->contains(tag)) return true; } return false; } void AccumulatedAck::collectRanges(SequenceNumberSet& set) const { for (list::const_iterator i = ranges.begin(); i != ranges.end(); i++) { set.push_back(i->start); set.push_back(i->end); } } void AccumulatedAck::update(const SequenceNumber cumulative, const SequenceNumberSet& range) { update(mark, cumulative); range.processRanges(*this); } bool Range::contains(SequenceNumber i) const { return i >= start && i <= end; } bool Range::intersect(const Range& r) const { return r.contains(start) || r.contains(end) || contains(r.start) || contains(r.end); } bool Range::merge(const Range& r) { if (intersect(r) || mergeable(r.end) || r.mergeable(end)) { start = min(start, r.start); end = max(end, r.end); return true; } else { return false; } } bool Range::mergeable(const SequenceNumber& s) const { if (contains(s) || start - s == 1) { return true; } else { return false; } } Range::Range(SequenceNumber s, SequenceNumber e) : start(s), end(e) {} namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const Range& r) { out << "[" << r.start.getValue() << "-" << r.end.getValue() << "]"; return out; } std::ostream& operator<<(std::ostream& out, const AccumulatedAck& a) { out << "{mark: " << a.mark.getValue() << ", ranges: ("; for (list::const_iterator i = a.ranges.begin(); i != a.ranges.end(); i++) { if (i != a.ranges.begin()) out << ", "; out << *i; } out << ")]"; return out; } }} qpidc-0.16/src/qpid/framing/ClusterShutdownBody.h0000664000076400007640000000601311752725676022471 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERSHUTDOWNBODY_H #define QPID_FRAMING_CLUSTERSHUTDOWNBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterShutdownBody : public ModelMethod { Uuid shutdownId; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x20; ClusterShutdownBody( ProtocolVersion, const Uuid& _shutdownId) : shutdownId(_shutdownId), flags(0){ flags |= (1 << 8); } ClusterShutdownBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setShutdownId(const Uuid& _shutdownId); QPID_COMMON_EXTERN const Uuid& getShutdownId() const; QPID_COMMON_EXTERN bool hasShutdownId() const; QPID_COMMON_EXTERN void clearShutdownIdFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.shutdown(getShutdownId()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterShutdownBody */ }} #endif /*!QPID_FRAMING_CLUSTERSHUTDOWNBODY_H*/ qpidc-0.16/src/qpid/framing/SessionAttachedBody.h0000664000076400007640000000600311752725676022374 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONATTACHEDBODY_H #define QPID_FRAMING_SESSIONATTACHEDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionAttachedBody : public AMQMethodBody { std::string name; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0x2; SessionAttachedBody( ProtocolVersion, const std::string& _name) : name(_name), flags(0){ flags |= (1 << 8); } SessionAttachedBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setName(const std::string& _name); QPID_COMMON_EXTERN const std::string& getName() const; QPID_COMMON_EXTERN bool hasName() const; QPID_COMMON_EXTERN void clearNameFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.attached(getName()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionAttachedBody */ }} #endif /*!QPID_FRAMING_SESSIONATTACHEDBODY_H*/ qpidc-0.16/src/qpid/framing/DtxSelectBody.cpp0000664000076400007640000000336711752725676021557 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxSelectBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxSelectBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void DtxSelectBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxSelectBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void DtxSelectBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxSelectBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t DtxSelectBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxSelectBody::print(std::ostream& out) const { out << "{DtxSelectBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionExchangeBody.h0000664000076400007640000000611711752725676024425 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONEXCHANGEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONEXCHANGEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionExchangeBody : public ModelMethod { std::string encoded; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x31; ClusterConnectionExchangeBody( ProtocolVersion, const std::string& _encoded) : encoded(_encoded), flags(0){ flags |= (1 << 8); } ClusterConnectionExchangeBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setEncoded(const std::string& _encoded); QPID_COMMON_EXTERN const std::string& getEncoded() const; QPID_COMMON_EXTERN bool hasEncoded() const; QPID_COMMON_EXTERN void clearEncodedFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.exchange(getEncoded()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionExchangeBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONEXCHANGEBODY_H*/ qpidc-0.16/src/qpid/framing/MessageReleaseBody.cpp0000664000076400007640000000530711752725676022541 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageReleaseBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageReleaseBody::setTransfers(const SequenceSet& _transfers) { transfers = _transfers; flags |= (1 << 8); } const SequenceSet& MessageReleaseBody::getTransfers() const { return transfers; } bool MessageReleaseBody::hasTransfers() const { return flags & (1 << 8); } void MessageReleaseBody::clearTransfersFlag() { flags &= ~(1 << 8); } void MessageReleaseBody::setSetRedelivered(bool _setRedelivered) { if (_setRedelivered) flags |= (1 << 9); else flags &= ~(1 << 9); } bool MessageReleaseBody::getSetRedelivered() const { return flags & (1 << 9); } void MessageReleaseBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) transfers.encode(buffer); } void MessageReleaseBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageReleaseBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) transfers.decode(buffer); } void MessageReleaseBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageReleaseBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += transfers.encodedSize(); return total; } uint32_t MessageReleaseBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageReleaseBody::print(std::ostream& out) const { out << "{MessageReleaseBody: "; if (flags & (1 << 8)) out << "transfers=" << transfers << "; "; if (flags & (1 << 9)) out << "set-redelivered=" << getSetRedelivered() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionDetachBody.h0000664000076400007640000000576211752725676022062 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONDETACHBODY_H #define QPID_FRAMING_SESSIONDETACHBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionDetachBody : public AMQMethodBody { std::string name; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0x3; SessionDetachBody( ProtocolVersion, const std::string& _name) : name(_name), flags(0){ flags |= (1 << 8); } SessionDetachBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setName(const std::string& _name); QPID_COMMON_EXTERN const std::string& getName() const; QPID_COMMON_EXTERN bool hasName() const; QPID_COMMON_EXTERN void clearNameFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.detach(getName()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionDetachBody */ }} #endif /*!QPID_FRAMING_SESSIONDETACHBODY_H*/ qpidc-0.16/src/qpid/framing/FieldTable.cpp0000664000076400007640000002675511735357161021032 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/FieldTable.h" #include "qpid/framing/Array.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/Endian.h" #include "qpid/framing/FieldValue.h" #include "qpid/Exception.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/Msg.h" #include // The locking rationale in the FieldTable seems a little odd, but it // maintains the concurrent guarantees and requirements that were in // place before the cachedBytes/cachedSize were added: // // The FieldTable client code needs to make sure that they call no write // operation in parallel with any other operation on the FieldTable. // However multiple parallel read operations are safe. // // To this end the only code that is locked is code that can transparently // change the state of the FieldTable during a read only operation. // (In other words the code that required the mutable members in the class // definition!) // namespace qpid { using sys::Mutex; using sys::ScopedLock; namespace framing { FieldTable::FieldTable() : cachedSize(0), newBytes(false) { } FieldTable::FieldTable(const FieldTable& ft) { ScopedLock l(ft.lock); // lock _source_ FieldTable cachedBytes = ft.cachedBytes; cachedSize = ft.cachedSize; newBytes = ft.newBytes; // Only copy the values if we have no raw data // - copying the map is expensive and we can // reconstruct it if necessary from the raw data if (cachedBytes) { newBytes = true; return; } if (!ft.values.empty()) values = ft.values; } FieldTable& FieldTable::operator=(const FieldTable& ft) { FieldTable nft(ft); values.swap(nft.values); cachedBytes.swap(nft.cachedBytes); cachedSize = nft.cachedSize; newBytes = nft.newBytes; return (*this); } uint32_t FieldTable::encodedSize() const { ScopedLock l(lock); if (cachedSize != 0) { return cachedSize; } uint32_t len(4/*size field*/ + 4/*count field*/); for(ValueMap::const_iterator i = values.begin(); i != values.end(); ++i) { // shortstr_len_byte + key size + value size len += 1 + (i->first).size() + (i->second)->encodedSize(); } cachedSize = len; return len; } int FieldTable::count() const { return values.size(); } namespace { std::ostream& operator<<(std::ostream& out, const FieldTable::ValueMap::value_type& i) { return out << i.first << ":" << *i.second; } } std::ostream& operator<<(std::ostream& out, const FieldTable& t) { t.realDecode(); out << "{"; FieldTable::ValueMap::const_iterator i = t.begin(); if (i != t.end()) out << *i++; while (i != t.end()) { out << "," << *i++; } return out << "}"; } void FieldTable::set(const std::string& name, const ValuePtr& value){ realDecode(); values[name] = value; flushRawCache(); } void FieldTable::setString(const std::string& name, const std::string& value){ realDecode(); values[name] = ValuePtr(new Str16Value(value)); flushRawCache(); } void FieldTable::setInt(const std::string& name, const int value){ realDecode(); values[name] = ValuePtr(new IntegerValue(value)); flushRawCache(); } void FieldTable::setInt64(const std::string& name, const int64_t value){ realDecode(); values[name] = ValuePtr(new Integer64Value(value)); flushRawCache(); } void FieldTable::setTimestamp(const std::string& name, const uint64_t value){ realDecode(); values[name] = ValuePtr(new TimeValue(value)); flushRawCache(); } void FieldTable::setUInt64(const std::string& name, const uint64_t value){ realDecode(); values[name] = ValuePtr(new Unsigned64Value(value)); flushRawCache(); } void FieldTable::setTable(const std::string& name, const FieldTable& value) { realDecode(); values[name] = ValuePtr(new FieldTableValue(value)); flushRawCache(); } void FieldTable::setArray(const std::string& name, const Array& value) { realDecode(); values[name] = ValuePtr(new ArrayValue(value)); flushRawCache(); } void FieldTable::setFloat(const std::string& name, const float value){ realDecode(); values[name] = ValuePtr(new FloatValue(value)); flushRawCache(); } void FieldTable::setDouble(const std::string& name, double value){ realDecode(); values[name] = ValuePtr(new DoubleValue(value)); flushRawCache(); } FieldTable::ValuePtr FieldTable::get(const std::string& name) const { // Ensure we have any values we're trying to read realDecode(); ValuePtr value; ValueMap::const_iterator i = values.find(name); if ( i!=values.end() ) value = i->second; return value; } namespace { template T default_value() { return T(); } template <> int default_value() { return 0; } //template <> uint64_t default_value() { return 0; } } template T getValue(const FieldTable::ValuePtr value) { if (!value || !value->convertsTo()) return default_value(); return value->get(); } std::string FieldTable::getAsString(const std::string& name) const { return getValue(get(name)); } int FieldTable::getAsInt(const std::string& name) const { return getValue(get(name)); } uint64_t FieldTable::getAsUInt64(const std::string& name) const { return static_cast( getValue(get(name))); } int64_t FieldTable::getAsInt64(const std::string& name) const { return getValue(get(name)); } bool FieldTable::getTable(const std::string& name, FieldTable& value) const { return getEncodedValue(get(name), value); } bool FieldTable::getArray(const std::string& name, Array& value) const { return getEncodedValue(get(name), value); } template bool getRawFixedWidthValue(FieldTable::ValuePtr vptr, T& value) { if (vptr && vptr->getType() == typecode) { value = vptr->get(); return true; } return false; } bool FieldTable::getFloat(const std::string& name, float& value) const { return getRawFixedWidthValue(get(name), value); } bool FieldTable::getDouble(const std::string& name, double& value) const { return getRawFixedWidthValue(get(name), value); } //uint64_t FieldTable::getTimestamp(const std::string& name) const { // return getValue(name); //} void FieldTable::encode(Buffer& buffer) const { ScopedLock l(lock); // If we've still got the input field table // we can just copy it directly to the output if (cachedBytes) { buffer.putRawData(&cachedBytes[0], cachedSize); } else { uint32_t p = buffer.getPosition(); buffer.putLong(encodedSize() - 4); buffer.putLong(values.size()); for (ValueMap::const_iterator i = values.begin(); i!=values.end(); ++i) { buffer.putShortString(i->first); i->second->encode(buffer); } // Now create raw bytes in case we are used again cachedSize = buffer.getPosition() - p; cachedBytes = boost::shared_array(new uint8_t[cachedSize]); buffer.setPosition(p); buffer.getRawData(&cachedBytes[0], cachedSize); } } // Decode lazily - just record the raw bytes until we need them void FieldTable::decode(Buffer& buffer){ if (buffer.available() < 4) throw IllegalArgumentException(QPID_MSG("Not enough data for field table.")); uint32_t p = buffer.getPosition(); uint32_t len = buffer.getLong(); if (len) { uint32_t available = buffer.available(); if ((available < len) || (available < 4)) throw IllegalArgumentException(QPID_MSG("Not enough data for field table.")); } ScopedLock l(lock); // Throw away previous stored values values.clear(); // Copy data into our buffer cachedBytes = boost::shared_array(new uint8_t[len + 4]); cachedSize = len + 4; newBytes = true; buffer.setPosition(p); buffer.getRawData(&cachedBytes[0], cachedSize); } void FieldTable::realDecode() const { ScopedLock l(lock); // If we've got no raw data stored up then nothing to do if (!newBytes) return; Buffer buffer((char*)&cachedBytes[0], cachedSize); uint32_t len = buffer.getLong(); if (len) { uint32_t available = buffer.available(); uint32_t count = buffer.getLong(); uint32_t leftover = available - len; while(buffer.available() > leftover && count--){ std::string name; ValuePtr value(new FieldValue); buffer.getShortString(name); value->decode(buffer); values[name] = ValuePtr(value); } } newBytes = false; } void FieldTable::flushRawCache() { ScopedLock l(lock); // We can only flush the cache if there are no cached bytes to decode assert(newBytes==false); // Avoid recreating shared array unless we actually have one. if (cachedBytes) cachedBytes.reset(); cachedSize = 0; } bool FieldTable::operator==(const FieldTable& x) const { realDecode(); x.realDecode(); if (values.size() != x.values.size()) return false; for (ValueMap::const_iterator i = values.begin(); i != values.end(); ++i) { ValueMap::const_iterator j = x.values.find(i->first); if (j == x.values.end()) return false; if (*(i->second) != *(j->second)) return false; } return true; } void FieldTable::erase(const std::string& name) { realDecode(); if (values.find(name) != values.end()) { values.erase(name); flushRawCache(); } } void FieldTable::clear() { values.clear(); newBytes = false; flushRawCache(); } // Map-like interface. FieldTable::ValueMap::const_iterator FieldTable::begin() const { realDecode(); return values.begin(); } FieldTable::ValueMap::const_iterator FieldTable::end() const { realDecode(); return values.end(); } FieldTable::ValueMap::const_iterator FieldTable::find(const std::string& s) const { realDecode(); return values.find(s); } FieldTable::ValueMap::iterator FieldTable::begin() { realDecode(); flushRawCache(); return values.begin(); } FieldTable::ValueMap::iterator FieldTable::end() { realDecode(); flushRawCache(); return values.end(); } FieldTable::ValueMap::iterator FieldTable::find(const std::string& s) { realDecode(); flushRawCache(); return values.find(s); } std::pair FieldTable::insert(const ValueMap::value_type& value) { realDecode(); flushRawCache(); return values.insert(value); } FieldTable::ValueMap::iterator FieldTable::insert(ValueMap::iterator position, const ValueMap::value_type& value) { realDecode(); flushRawCache(); return values.insert(position, value); } } } qpidc-0.16/src/qpid/framing/ClusterConnectionDeliverDoOutputBody.h0000664000076400007640000000613311752725676025777 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONDELIVERDOOUTPUTBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONDELIVERDOOUTPUTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionDeliverDoOutputBody : public ModelMethod { uint32_t limit; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x3; ClusterConnectionDeliverDoOutputBody( ProtocolVersion, uint32_t _limit) : limit(_limit), flags(0){ flags |= (1 << 8); } ClusterConnectionDeliverDoOutputBody(ProtocolVersion=ProtocolVersion()) : limit(0), flags(0) {} QPID_COMMON_EXTERN void setLimit(uint32_t _limit); QPID_COMMON_EXTERN uint32_t getLimit() const; QPID_COMMON_EXTERN bool hasLimit() const; QPID_COMMON_EXTERN void clearLimitFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.deliverDoOutput(getLimit()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionDeliverDoOutputBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONDELIVERDOOUTPUTBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h0000664000076400007640000000722111752725676030270 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONQUEUEDEQUEUESINCEPURGESTATEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONQUEUEDEQUEUESINCEPURGESTATEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionQueueDequeueSincePurgeStateBody : public ModelMethod { std::string queue; uint32_t dequeueSincePurge; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x41; ClusterConnectionQueueDequeueSincePurgeStateBody( ProtocolVersion, const std::string& _queue, uint32_t _dequeueSincePurge) : queue(_queue), dequeueSincePurge(_dequeueSincePurge), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ClusterConnectionQueueDequeueSincePurgeStateBody(ProtocolVersion=ProtocolVersion()) : dequeueSincePurge(0), flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setDequeueSincePurge(uint32_t _dequeueSincePurge); QPID_COMMON_EXTERN uint32_t getDequeueSincePurge() const; QPID_COMMON_EXTERN bool hasDequeueSincePurge() const; QPID_COMMON_EXTERN void clearDequeueSincePurgeFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.queueDequeueSincePurgeState(getQueue(), getDequeueSincePurge()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionQueueDequeueSincePurgeStateBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONQUEUEDEQUEUESINCEPURGESTATEBODY_H*/ qpidc-0.16/src/qpid/framing/IsInSequenceSet.h0000664000076400007640000000311411240604757021470 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_ISINSEQUENCESET_H #define QPID_FRAMING_ISINSEQUENCESET_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/SequenceSet.h" namespace qpid { namespace framing { /** * Functor to test whether values are in a sequence set. This is a * stateful functor that requires the values to be supplied in order * and takes advantage of that ordering to avoid multiple scans. */ class IsInSequenceSet { public: IsInSequenceSet(const SequenceSet& s) : set(s), i(set.rangesBegin()) {} bool operator()(const SequenceNumber& n) { while (i != set.rangesEnd() && i->end() <= n) ++i; return i != set.rangesEnd() && i->begin() <= n; } private: const SequenceSet& set; SequenceSet::RangeIterator i; }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_ISINSEQUENCESET_H*/ qpidc-0.16/src/qpid/framing/SessionRequestTimeoutBody.h0000664000076400007640000000607311752725676023665 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONREQUESTTIMEOUTBODY_H #define QPID_FRAMING_SESSIONREQUESTTIMEOUTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionRequestTimeoutBody : public AMQMethodBody { uint32_t timeout; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0x5; SessionRequestTimeoutBody( ProtocolVersion, uint32_t _timeout) : timeout(_timeout), flags(0){ flags |= (1 << 8); } SessionRequestTimeoutBody(ProtocolVersion=ProtocolVersion()) : timeout(0), flags(0) {} QPID_COMMON_EXTERN void setTimeout(uint32_t _timeout); QPID_COMMON_EXTERN uint32_t getTimeout() const; QPID_COMMON_EXTERN bool hasTimeout() const; QPID_COMMON_EXTERN void clearTimeoutFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.requestTimeout(getTimeout()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionRequestTimeoutBody */ }} #endif /*!QPID_FRAMING_SESSIONREQUESTTIMEOUTBODY_H*/ qpidc-0.16/src/qpid/framing/TypeFilter.h0000664000076400007640000000273610716414034020553 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_TYPEFILTER_H #define QPID_FRAMING_TYPEFILTER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/framing/amqp_framing.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/FrameHandler.h" namespace qpid { namespace framing { /** * Predicate that selects frames by type */ template struct TypeFilter { bool operator()(const AMQFrame& f) const { return f.getBody()->type() == Type; } }; template struct TypeFilter2 { bool operator()(const AMQFrame& f) const { return f.getBody()->type() == T1 || f.getBody()->type() == T2; } }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_TYPEFILTER_H*/ qpidc-0.16/src/qpid/framing/SequenceNumber.cpp0000664000076400007640000000250211227113407021725 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/Buffer.h" #include using qpid::framing::SequenceNumber; using qpid::framing::Buffer; void SequenceNumber::encode(Buffer& buffer) const { buffer.putLong(value); } void SequenceNumber::decode(Buffer& buffer) { value = buffer.getLong(); } uint32_t SequenceNumber::encodedSize() const { return 4; } namespace qpid { namespace framing { std::ostream& operator<<(std::ostream& o, const SequenceNumber& n) { return o << n.getValue(); } }} qpidc-0.16/src/qpid/framing/FileReturnBody.h0000664000076400007640000001012011752725676021365 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILERETURNBODY_H #define QPID_FRAMING_FILERETURNBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileReturnBody : public ModelMethod { uint16_t replyCode; std::string replyText; std::string exchange; std::string routingKey; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0xa; FileReturnBody( ProtocolVersion, uint16_t _replyCode, const std::string& _replyText, const std::string& _exchange, const std::string& _routingKey) : replyCode(_replyCode), replyText(_replyText), exchange(_exchange), routingKey(_routingKey), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); } FileReturnBody(ProtocolVersion=ProtocolVersion()) : replyCode(0), flags(0) {} QPID_COMMON_EXTERN void setReplyCode(uint16_t _replyCode); QPID_COMMON_EXTERN uint16_t getReplyCode() const; QPID_COMMON_EXTERN bool hasReplyCode() const; QPID_COMMON_EXTERN void clearReplyCodeFlag(); QPID_COMMON_EXTERN void setReplyText(const std::string& _replyText); QPID_COMMON_EXTERN const std::string& getReplyText() const; QPID_COMMON_EXTERN bool hasReplyText() const; QPID_COMMON_EXTERN void clearReplyTextFlag(); QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setRoutingKey(const std::string& _routingKey); QPID_COMMON_EXTERN const std::string& getRoutingKey() const; QPID_COMMON_EXTERN bool hasRoutingKey() const; QPID_COMMON_EXTERN void clearRoutingKeyFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.return_(getReplyCode(), getReplyText(), getExchange(), getRoutingKey()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return true; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileReturnBody */ }} #endif /*!QPID_FRAMING_FILERETURNBODY_H*/ qpidc-0.16/src/qpid/framing/AMQP_ServerOperations.h0000664000076400007640000002722211752725676022633 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQP_SERVEROPERATIONS_H #define QPID_FRAMING_AMQP_SERVEROPERATIONS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/ProtocolVersion.h" #include "qpid/framing/amqp_structs.h" namespace qpid { namespace framing { class AMQMethodBody; class AMQP_ServerOperations { public: class Invoker; // Declared in ServerInvoker virtual ~AMQP_ServerOperations() {} virtual ProtocolVersion getVersion() const = 0; // Inner classes // ==================== class ConnectionHandler ==================== class ConnectionHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker ConnectionHandler(){}; virtual ~ConnectionHandler() {} // Protocol methods virtual void startOk(const FieldTable& clientProperties, const std::string& mechanism, const std::string& response, const std::string& locale) = 0; virtual void secureOk(const std::string& response) = 0; virtual void tuneOk(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeat) = 0; virtual void open(const std::string& virtualHost, const Array& capabilities, bool insist) = 0; virtual void heartbeat( ) = 0; virtual void close(uint16_t replyCode, const std::string& replyText) = 0; virtual void closeOk( ) = 0; }; // class ConnectionHandler // ==================== class SessionHandler ==================== class SessionHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker SessionHandler(){}; virtual ~SessionHandler() {} // Protocol methods virtual void attach(const std::string& name, bool force) = 0; virtual void attached(const std::string& name) = 0; virtual void detach(const std::string& name) = 0; virtual void detached(const std::string& name, uint8_t code) = 0; virtual void requestTimeout(uint32_t timeout) = 0; virtual void timeout(uint32_t timeout) = 0; virtual void commandPoint(const SequenceNumber& commandId, uint64_t commandOffset) = 0; virtual void expected(const SequenceSet& commands, const Array& fragments) = 0; virtual void confirmed(const SequenceSet& commands, const Array& fragments) = 0; virtual void completed(const SequenceSet& commands, bool timelyReply) = 0; virtual void knownCompleted(const SequenceSet& commands) = 0; virtual void flush(bool expected, bool confirmed, bool completed) = 0; virtual void gap(const SequenceSet& commands) = 0; }; // class SessionHandler // ==================== class ExecutionHandler ==================== class ExecutionHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker ExecutionHandler(){}; virtual ~ExecutionHandler() {} // Protocol methods virtual void sync( ) = 0; virtual void result(const SequenceNumber& commandId, const std::string& value) = 0; virtual void exception(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo) = 0; }; // class ExecutionHandler // ==================== class MessageHandler ==================== class MessageHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker MessageHandler(){}; virtual ~MessageHandler() {} // Protocol methods virtual void accept(const SequenceSet& transfers) = 0; virtual void reject(const SequenceSet& transfers, uint16_t code, const std::string& text) = 0; virtual void release(const SequenceSet& transfers, bool setRedelivered) = 0; virtual MessageAcquireResult acquire(const SequenceSet& transfers) = 0; virtual MessageResumeResult resume(const std::string& destination, const std::string& resumeId) = 0; virtual void subscribe(const std::string& queue, const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const std::string& resumeId, uint64_t resumeTtl, const FieldTable& arguments) = 0; virtual void cancel(const std::string& destination) = 0; virtual void setFlowMode(const std::string& destination, uint8_t flowMode) = 0; virtual void flow(const std::string& destination, uint8_t unit, uint32_t value) = 0; virtual void flush(const std::string& destination) = 0; virtual void stop(const std::string& destination) = 0; }; // class MessageHandler // ==================== class TxHandler ==================== class TxHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker TxHandler(){}; virtual ~TxHandler() {} // Protocol methods virtual void select( ) = 0; virtual void commit( ) = 0; virtual void rollback( ) = 0; }; // class TxHandler // ==================== class DtxHandler ==================== class DtxHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker DtxHandler(){}; virtual ~DtxHandler() {} // Protocol methods virtual void select( ) = 0; virtual XaResult start(const Xid& xid, bool join, bool resume) = 0; virtual XaResult end(const Xid& xid, bool fail, bool suspend) = 0; virtual XaResult commit(const Xid& xid, bool onePhase) = 0; virtual void forget(const Xid& xid) = 0; virtual DtxGetTimeoutResult getTimeout(const Xid& xid) = 0; virtual XaResult prepare(const Xid& xid) = 0; virtual DtxRecoverResult recover( ) = 0; virtual XaResult rollback(const Xid& xid) = 0; virtual void setTimeout(const Xid& xid, uint32_t timeout) = 0; }; // class DtxHandler // ==================== class ExchangeHandler ==================== class ExchangeHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker ExchangeHandler(){}; virtual ~ExchangeHandler() {} // Protocol methods virtual void declare(const std::string& exchange, const std::string& type, const std::string& alternateExchange, bool passive, bool durable, bool autoDelete, const FieldTable& arguments) = 0; virtual void delete_(const std::string& exchange, bool ifUnused) = 0; virtual ExchangeQueryResult query(const std::string& name) = 0; virtual void bind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, const FieldTable& arguments) = 0; virtual void unbind(const std::string& queue, const std::string& exchange, const std::string& bindingKey) = 0; virtual ExchangeBoundResult bound(const std::string& exchange, const std::string& queue, const std::string& bindingKey, const FieldTable& arguments) = 0; }; // class ExchangeHandler // ==================== class QueueHandler ==================== class QueueHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker QueueHandler(){}; virtual ~QueueHandler() {} // Protocol methods virtual void declare(const std::string& queue, const std::string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const FieldTable& arguments) = 0; virtual void delete_(const std::string& queue, bool ifUnused, bool ifEmpty) = 0; virtual void purge(const std::string& queue) = 0; virtual QueueQueryResult query(const std::string& queue) = 0; }; // class QueueHandler // ==================== class FileHandler ==================== class FileHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker FileHandler(){}; virtual ~FileHandler() {} // Protocol methods virtual void qos(uint32_t prefetchSize, uint16_t prefetchCount, bool global) = 0; virtual void consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool noAck, bool exclusive, bool nowait, const FieldTable& arguments) = 0; virtual void cancel(const std::string& consumerTag) = 0; virtual void open(const std::string& identifier, uint64_t contentSize) = 0; virtual void openOk(uint64_t stagedSize) = 0; virtual void publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate, const std::string& identifier) = 0; virtual void ack(uint64_t deliveryTag, bool multiple) = 0; virtual void reject(uint64_t deliveryTag, bool requeue) = 0; }; // class FileHandler // ==================== class StreamHandler ==================== class StreamHandler { // Constructors and destructors public: class Invoker; // Declared in ServerInvoker StreamHandler(){}; virtual ~StreamHandler() {} // Protocol methods virtual void qos(uint32_t prefetchSize, uint16_t prefetchCount, uint32_t consumeRate, bool global) = 0; virtual void consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool exclusive, bool nowait, const FieldTable& arguments) = 0; virtual void cancel(const std::string& consumerTag) = 0; }; // class StreamHandler // Method handler get methods virtual ConnectionHandler* getConnectionHandler() = 0; virtual SessionHandler* getSessionHandler() = 0; virtual ExecutionHandler* getExecutionHandler() = 0; virtual MessageHandler* getMessageHandler() = 0; virtual TxHandler* getTxHandler() = 0; virtual DtxHandler* getDtxHandler() = 0; virtual ExchangeHandler* getExchangeHandler() = 0; virtual QueueHandler* getQueueHandler() = 0; virtual FileHandler* getFileHandler() = 0; virtual StreamHandler* getStreamHandler() = 0; }; /* class AMQP_ServerOperations */ }} #endif /*!QPID_FRAMING_AMQP_SERVEROPERATIONS_H*/ qpidc-0.16/src/qpid/framing/FieldValue.cpp0000664000076400007640000001470511350471350021035 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/FieldValue.h" #include "qpid/framing/Array.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/Endian.h" #include "qpid/framing/List.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/Msg.h" namespace qpid { namespace framing { uint8_t FieldValue::getType() const { return typeOctet; } void FieldValue::setType(uint8_t type) { typeOctet = type; if (typeOctet == 0xA8) { data.reset(new EncodedValue()); } else if (typeOctet == 0xA9) { data.reset(new EncodedValue()); } else if (typeOctet == 0xAA) { data.reset(new EncodedValue()); } else { uint8_t lenType = typeOctet >> 4; switch(lenType){ case 0: data.reset(new FixedWidthValue<1>()); break; case 1: data.reset(new FixedWidthValue<2>()); break; case 2: data.reset(new FixedWidthValue<4>()); break; case 3: data.reset(new FixedWidthValue<8>()); break; case 4: data.reset(new FixedWidthValue<16>()); break; case 5: data.reset(new FixedWidthValue<32>()); break; case 6: data.reset(new FixedWidthValue<64>()); break; case 7: data.reset(new FixedWidthValue<128>()); break; case 8: data.reset(new VariableWidthValue<1>()); break; case 9: data.reset(new VariableWidthValue<2>()); break; case 0xA: data.reset(new VariableWidthValue<4>()); break; case 0xC: data.reset(new FixedWidthValue<5>()); break; case 0xD: data.reset(new FixedWidthValue<9>()); break; case 0xF: data.reset(new FixedWidthValue<0>()); break; default: throw IllegalArgumentException(QPID_MSG("Unknown field table value type: " << (int)typeOctet)); } } } void FieldValue::decode(Buffer& buffer) { setType(buffer.getOctet()); data->decode(buffer); } void FieldValue::encode(Buffer& buffer) { buffer.putOctet(typeOctet); data->encode(buffer); } bool FieldValue::operator==(const FieldValue& v) const { return typeOctet == v.typeOctet && *data == *v.data; } Str8Value::Str8Value(const std::string& v) : FieldValue( TYPE_CODE_STR8, new VariableWidthValue<1>( reinterpret_cast(v.data()), reinterpret_cast(v.data()+v.size()))) { } Str16Value::Str16Value(const std::string& v) : FieldValue( 0x95, new VariableWidthValue<2>( reinterpret_cast(v.data()), reinterpret_cast(v.data()+v.size()))) {} Var16Value::Var16Value(const std::string& v, uint8_t code) : FieldValue( code, new VariableWidthValue<2>( reinterpret_cast(v.data()), reinterpret_cast(v.data()+v.size()))) {} Var32Value::Var32Value(const std::string& v, uint8_t code) : FieldValue( code, new VariableWidthValue<4>( reinterpret_cast(v.data()), reinterpret_cast(v.data()+v.size()))) {} Struct32Value::Struct32Value(const std::string& v) : FieldValue( 0xAB, new VariableWidthValue<4>( reinterpret_cast(v.data()), reinterpret_cast(v.data()+v.size()))) {} IntegerValue::IntegerValue(int v) : FieldValue(0x21, new FixedWidthValue<4>(v)) {} FloatValue::FloatValue(float v) : FieldValue(0x23, new FixedWidthValue<4>(Endian::convertIfRequired(reinterpret_cast(&v), 4))) {} DoubleValue::DoubleValue(double v) : FieldValue(0x33, new FixedWidthValue<8>(Endian::convertIfRequired(reinterpret_cast(&v), 8))) {} Integer64Value::Integer64Value(int64_t v) : FieldValue(0x31, new FixedWidthValue<8>(v)) {} Unsigned64Value::Unsigned64Value(uint64_t v) : FieldValue(0x32, new FixedWidthValue<8>(v)) {} TimeValue::TimeValue(uint64_t v) : FieldValue(0x38, new FixedWidthValue<8>(v)) { } FieldTableValue::FieldTableValue(const FieldTable& f) : FieldValue(0xa8, new EncodedValue(f)) { } ListValue::ListValue(const List& l) : FieldValue(0xa9, new EncodedValue(l)) { } ArrayValue::ArrayValue(const Array& a) : FieldValue(0xaa, new EncodedValue(a)) { } VoidValue::VoidValue() : FieldValue(0xf0, new FixedWidthValue<0>()) {} BoolValue::BoolValue(bool b) : FieldValue(0x08, new FixedWidthValue<1>(b)) {} Unsigned8Value::Unsigned8Value(uint8_t v) : FieldValue(0x02, new FixedWidthValue<1>(v)) {} Unsigned16Value::Unsigned16Value(uint16_t v) : FieldValue(0x12, new FixedWidthValue<2>(v)) {} Unsigned32Value::Unsigned32Value(uint32_t v) : FieldValue(0x22, new FixedWidthValue<4>(v)) {} Integer8Value::Integer8Value(int8_t v) : FieldValue(0x01, new FixedWidthValue<1>(v)) {} Integer16Value::Integer16Value(int16_t v) : FieldValue(0x11, new FixedWidthValue<2>(v)) {} UuidValue::UuidValue(const unsigned char* v) : FieldValue(0x48, new FixedWidthValue<16>(v)) {} void FieldValue::print(std::ostream& out) const { data->print(out); out << TypeCode(typeOctet) << '('; if (data->convertsToString()) out << data->getString(); else if (data->convertsToInt()) out << data->getInt(); else data->print(out); out << ')'; } uint8_t* FieldValue::convertIfRequired(uint8_t* const octets, int width) { return Endian::convertIfRequired(octets, width); } }} qpidc-0.16/src/qpid/framing/SessionTimeoutBody.cpp0000664000076400007640000000442511752725676022646 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionTimeoutBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionTimeoutBody::setTimeout(uint32_t _timeout) { timeout = _timeout; flags |= (1 << 8); } uint32_t SessionTimeoutBody::getTimeout() const { return timeout; } bool SessionTimeoutBody::hasTimeout() const { return flags & (1 << 8); } void SessionTimeoutBody::clearTimeoutFlag() { flags &= ~(1 << 8); } void SessionTimeoutBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLong(timeout); } void SessionTimeoutBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionTimeoutBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) timeout = buffer.getLong(); } void SessionTimeoutBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionTimeoutBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 4;//timeout return total; } uint32_t SessionTimeoutBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionTimeoutBody::print(std::ostream& out) const { out << "{SessionTimeoutBody: "; if (flags & (1 << 8)) out << "timeout=" << timeout << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/AMQP_AllProxy.h0000664000076400007640000005563411752725675021102 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQP_ALLPROXY_H #define QPID_FRAMING_AMQP_ALLPROXY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/Proxy.h" #include "qpid/framing/Array.h" #include "qpid/framing/amqp_types.h" #include "qpid/framing/amqp_structs.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQP_AllProxy: public Proxy { public: QPID_COMMON_EXTERN AMQP_AllProxy(FrameHandler& out); class QPID_COMMON_CLASS_EXTERN Connection: public Proxy { public: Connection(FrameHandler& f) : Proxy(f) {} static Connection& get(AMQP_AllProxy& proxy) { return proxy.getConnection(); } QPID_COMMON_EXTERN virtual void start(const FieldTable& serverProperties, const Array& mechanisms, const Array& locales); QPID_COMMON_EXTERN virtual void startOk(const FieldTable& clientProperties, const std::string& mechanism, const std::string& response, const std::string& locale); QPID_COMMON_EXTERN virtual void secure(const std::string& challenge); QPID_COMMON_EXTERN virtual void secureOk(const std::string& response); QPID_COMMON_EXTERN virtual void tune(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeatMin, uint16_t heartbeatMax); QPID_COMMON_EXTERN virtual void tuneOk(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeat); QPID_COMMON_EXTERN virtual void open(const std::string& virtualHost, const Array& capabilities, bool insist); QPID_COMMON_EXTERN virtual void openOk(const Array& knownHosts); QPID_COMMON_EXTERN virtual void redirect(const std::string& host, const Array& knownHosts); QPID_COMMON_EXTERN virtual void heartbeat(); QPID_COMMON_EXTERN virtual void close(uint16_t replyCode, const std::string& replyText); QPID_COMMON_EXTERN virtual void closeOk(); }; Connection& getConnection() { return connectionProxy; } class QPID_COMMON_CLASS_EXTERN Session: public Proxy { public: Session(FrameHandler& f) : Proxy(f) {} static Session& get(AMQP_AllProxy& proxy) { return proxy.getSession(); } QPID_COMMON_EXTERN virtual void attach(const std::string& name, bool force); QPID_COMMON_EXTERN virtual void attached(const std::string& name); QPID_COMMON_EXTERN virtual void detach(const std::string& name); QPID_COMMON_EXTERN virtual void detached(const std::string& name, uint8_t code); QPID_COMMON_EXTERN virtual void requestTimeout(uint32_t timeout); QPID_COMMON_EXTERN virtual void timeout(uint32_t timeout); QPID_COMMON_EXTERN virtual void commandPoint(const SequenceNumber& commandId, uint64_t commandOffset); QPID_COMMON_EXTERN virtual void expected(const SequenceSet& commands, const Array& fragments); QPID_COMMON_EXTERN virtual void confirmed(const SequenceSet& commands, const Array& fragments); QPID_COMMON_EXTERN virtual void completed(const SequenceSet& commands, bool timelyReply); QPID_COMMON_EXTERN virtual void knownCompleted(const SequenceSet& commands); QPID_COMMON_EXTERN virtual void flush(bool expected, bool confirmed, bool completed); QPID_COMMON_EXTERN virtual void gap(const SequenceSet& commands); }; Session& getSession() { return sessionProxy; } class QPID_COMMON_CLASS_EXTERN Execution: public Proxy { public: Execution(FrameHandler& f) : Proxy(f) {} static Execution& get(AMQP_AllProxy& proxy) { return proxy.getExecution(); } QPID_COMMON_EXTERN virtual void sync(); QPID_COMMON_EXTERN virtual void result(const SequenceNumber& commandId, const std::string& value); QPID_COMMON_EXTERN virtual void exception(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo); }; Execution& getExecution() { return executionProxy; } class QPID_COMMON_CLASS_EXTERN Message: public Proxy { public: Message(FrameHandler& f) : Proxy(f) {} static Message& get(AMQP_AllProxy& proxy) { return proxy.getMessage(); } QPID_COMMON_EXTERN virtual void transfer(const std::string& destination, uint8_t acceptMode, uint8_t acquireMode); QPID_COMMON_EXTERN virtual void accept(const SequenceSet& transfers); QPID_COMMON_EXTERN virtual void reject(const SequenceSet& transfers, uint16_t code, const std::string& text); QPID_COMMON_EXTERN virtual void release(const SequenceSet& transfers, bool setRedelivered); QPID_COMMON_EXTERN virtual void acquire(const SequenceSet& transfers); QPID_COMMON_EXTERN virtual void resume(const std::string& destination, const std::string& resumeId); QPID_COMMON_EXTERN virtual void subscribe(const std::string& queue, const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const std::string& resumeId, uint64_t resumeTtl, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void cancel(const std::string& destination); QPID_COMMON_EXTERN virtual void setFlowMode(const std::string& destination, uint8_t flowMode); QPID_COMMON_EXTERN virtual void flow(const std::string& destination, uint8_t unit, uint32_t value); QPID_COMMON_EXTERN virtual void flush(const std::string& destination); QPID_COMMON_EXTERN virtual void stop(const std::string& destination); }; Message& getMessage() { return messageProxy; } class QPID_COMMON_CLASS_EXTERN Tx: public Proxy { public: Tx(FrameHandler& f) : Proxy(f) {} static Tx& get(AMQP_AllProxy& proxy) { return proxy.getTx(); } QPID_COMMON_EXTERN virtual void select(); QPID_COMMON_EXTERN virtual void commit(); QPID_COMMON_EXTERN virtual void rollback(); }; Tx& getTx() { return txProxy; } class QPID_COMMON_CLASS_EXTERN Dtx: public Proxy { public: Dtx(FrameHandler& f) : Proxy(f) {} static Dtx& get(AMQP_AllProxy& proxy) { return proxy.getDtx(); } QPID_COMMON_EXTERN virtual void select(); QPID_COMMON_EXTERN virtual void start(const Xid& xid, bool join, bool resume); QPID_COMMON_EXTERN virtual void end(const Xid& xid, bool fail, bool suspend); QPID_COMMON_EXTERN virtual void commit(const Xid& xid, bool onePhase); QPID_COMMON_EXTERN virtual void forget(const Xid& xid); QPID_COMMON_EXTERN virtual void getTimeout(const Xid& xid); QPID_COMMON_EXTERN virtual void prepare(const Xid& xid); QPID_COMMON_EXTERN virtual void recover(); QPID_COMMON_EXTERN virtual void rollback(const Xid& xid); QPID_COMMON_EXTERN virtual void setTimeout(const Xid& xid, uint32_t timeout); }; Dtx& getDtx() { return dtxProxy; } class QPID_COMMON_CLASS_EXTERN Exchange: public Proxy { public: Exchange(FrameHandler& f) : Proxy(f) {} static Exchange& get(AMQP_AllProxy& proxy) { return proxy.getExchange(); } QPID_COMMON_EXTERN virtual void declare(const std::string& exchange, const std::string& type, const std::string& alternateExchange, bool passive, bool durable, bool autoDelete, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void delete_(const std::string& exchange, bool ifUnused); QPID_COMMON_EXTERN virtual void query(const std::string& name); QPID_COMMON_EXTERN virtual void bind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void unbind(const std::string& queue, const std::string& exchange, const std::string& bindingKey); QPID_COMMON_EXTERN virtual void bound(const std::string& exchange, const std::string& queue, const std::string& bindingKey, const FieldTable& arguments); }; Exchange& getExchange() { return exchangeProxy; } class QPID_COMMON_CLASS_EXTERN Queue: public Proxy { public: Queue(FrameHandler& f) : Proxy(f) {} static Queue& get(AMQP_AllProxy& proxy) { return proxy.getQueue(); } QPID_COMMON_EXTERN virtual void declare(const std::string& queue, const std::string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void delete_(const std::string& queue, bool ifUnused, bool ifEmpty); QPID_COMMON_EXTERN virtual void purge(const std::string& queue); QPID_COMMON_EXTERN virtual void query(const std::string& queue); }; Queue& getQueue() { return queueProxy; } class QPID_COMMON_CLASS_EXTERN File: public Proxy { public: File(FrameHandler& f) : Proxy(f) {} static File& get(AMQP_AllProxy& proxy) { return proxy.getFile(); } QPID_COMMON_EXTERN virtual void qos(uint32_t prefetchSize, uint16_t prefetchCount, bool global); QPID_COMMON_EXTERN virtual void qosOk(); QPID_COMMON_EXTERN virtual void consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool noAck, bool exclusive, bool nowait, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void consumeOk(const std::string& consumerTag); QPID_COMMON_EXTERN virtual void cancel(const std::string& consumerTag); QPID_COMMON_EXTERN virtual void open(const std::string& identifier, uint64_t contentSize); QPID_COMMON_EXTERN virtual void openOk(uint64_t stagedSize); QPID_COMMON_EXTERN virtual void stage(); QPID_COMMON_EXTERN virtual void publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate, const std::string& identifier); QPID_COMMON_EXTERN virtual void return_(uint16_t replyCode, const std::string& replyText, const std::string& exchange, const std::string& routingKey); QPID_COMMON_EXTERN virtual void deliver(const std::string& consumerTag, uint64_t deliveryTag, bool redelivered, const std::string& exchange, const std::string& routingKey, const std::string& identifier); QPID_COMMON_EXTERN virtual void ack(uint64_t deliveryTag, bool multiple); QPID_COMMON_EXTERN virtual void reject(uint64_t deliveryTag, bool requeue); }; File& getFile() { return fileProxy; } class QPID_COMMON_CLASS_EXTERN Stream: public Proxy { public: Stream(FrameHandler& f) : Proxy(f) {} static Stream& get(AMQP_AllProxy& proxy) { return proxy.getStream(); } QPID_COMMON_EXTERN virtual void qos(uint32_t prefetchSize, uint16_t prefetchCount, uint32_t consumeRate, bool global); QPID_COMMON_EXTERN virtual void qosOk(); QPID_COMMON_EXTERN virtual void consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool exclusive, bool nowait, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void consumeOk(const std::string& consumerTag); QPID_COMMON_EXTERN virtual void cancel(const std::string& consumerTag); QPID_COMMON_EXTERN virtual void publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate); QPID_COMMON_EXTERN virtual void return_(uint16_t replyCode, const std::string& replyText, const std::string& exchange, const std::string& routingKey); QPID_COMMON_EXTERN virtual void deliver(const std::string& consumerTag, uint64_t deliveryTag, const std::string& exchange, const std::string& queue); }; Stream& getStream() { return streamProxy; } class QPID_COMMON_CLASS_EXTERN Cluster: public Proxy { public: Cluster(FrameHandler& f) : Proxy(f) {} static Cluster& get(AMQP_AllProxy& proxy) { return proxy.getCluster(); } QPID_COMMON_EXTERN virtual void updateRequest(const std::string& url); QPID_COMMON_EXTERN virtual void updateOffer(uint64_t updatee); QPID_COMMON_EXTERN virtual void retractOffer(uint64_t updatee); QPID_COMMON_EXTERN virtual void initialStatus(uint32_t version, bool active, const Uuid& clusterId, uint8_t storeState, const Uuid& shutdownId, const std::string& firstConfig, const Array& urls); QPID_COMMON_EXTERN virtual void ready(const std::string& url); QPID_COMMON_EXTERN virtual void configChange(const std::string& members, const std::string& joined, const std::string& left); QPID_COMMON_EXTERN virtual void errorCheck(uint8_t type, const SequenceNumber& frameSeq); QPID_COMMON_EXTERN virtual void timerWakeup(const std::string& name); QPID_COMMON_EXTERN virtual void timerDrop(const std::string& name); QPID_COMMON_EXTERN virtual void shutdown(const Uuid& shutdownId); QPID_COMMON_EXTERN virtual void deliverToQueue(const std::string& queue, const std::string& message); QPID_COMMON_EXTERN virtual void clock(uint64_t time); }; Cluster& getCluster() { return clusterProxy; } class QPID_COMMON_CLASS_EXTERN ClusterConnection: public Proxy { public: ClusterConnection(FrameHandler& f) : Proxy(f) {} static ClusterConnection& get(AMQP_AllProxy& proxy) { return proxy.getClusterConnection(); } QPID_COMMON_EXTERN virtual void announce(const std::string& managementId, uint32_t ssf, const std::string& authid, bool nodict, const std::string& username, const std::string& initialFrames); QPID_COMMON_EXTERN virtual void deliverClose(); QPID_COMMON_EXTERN virtual void deliverDoOutput(uint32_t limit); QPID_COMMON_EXTERN virtual void abort(); QPID_COMMON_EXTERN virtual void shadowSetUser(const std::string& userId); QPID_COMMON_EXTERN virtual void shadowPrepare(const std::string& managementId); QPID_COMMON_EXTERN virtual void consumerState(const std::string& name, bool blocked, bool notifyEnabled, const SequenceNumber& position, uint32_t usedMsgCredit, uint32_t usedByteCredit); QPID_COMMON_EXTERN virtual void deliveryRecord(const std::string& queue, const SequenceNumber& position, const std::string& tag, const SequenceNumber& id, bool acquired, bool accepted, bool cancelled, bool completed, bool ended, bool windowing, bool enqueued, uint32_t credit); QPID_COMMON_EXTERN virtual void txStart(); QPID_COMMON_EXTERN virtual void txAccept(const SequenceSet& commands); QPID_COMMON_EXTERN virtual void txDequeue(const std::string& queue); QPID_COMMON_EXTERN virtual void txEnqueue(const std::string& queue); QPID_COMMON_EXTERN virtual void txPublish(const Array& queues, bool delivered); QPID_COMMON_EXTERN virtual void txEnd(); QPID_COMMON_EXTERN virtual void accumulatedAck(const SequenceSet& commands); QPID_COMMON_EXTERN virtual void outputTask(uint16_t channel, const std::string& name); QPID_COMMON_EXTERN virtual void dtxStart(const std::string& xid, bool ended, bool suspended, bool failed, bool expired); QPID_COMMON_EXTERN virtual void dtxEnd(); QPID_COMMON_EXTERN virtual void dtxAck(); QPID_COMMON_EXTERN virtual void dtxBufferRef(const std::string& xid, uint32_t index, bool suspended); QPID_COMMON_EXTERN virtual void dtxWorkRecord(const std::string& xid, bool prepared, uint32_t timeout); QPID_COMMON_EXTERN virtual void sessionState(const SequenceNumber& replayStart, const SequenceNumber& commandPoint, const SequenceSet& sentIncomplete, const SequenceNumber& expected, const SequenceNumber& received, const SequenceSet& unknownCompleted, const SequenceSet& receivedIncomplete, bool dtxSelected); QPID_COMMON_EXTERN virtual void shadowReady(uint64_t memberId, uint64_t connectionId, const std::string& managementId, const std::string& userName, const std::string& fragment, uint32_t sendMax); QPID_COMMON_EXTERN virtual void membership(const FieldTable& joiners, const FieldTable& members, const SequenceNumber& frameSeq); QPID_COMMON_EXTERN virtual void retractOffer(); QPID_COMMON_EXTERN virtual void queuePosition(const std::string& queue, const SequenceNumber& position); QPID_COMMON_EXTERN virtual void exchange(const std::string& encoded); QPID_COMMON_EXTERN virtual void addQueueListener(const std::string& queue, uint32_t consumer); QPID_COMMON_EXTERN virtual void managementSetupState(uint64_t objectNum, uint16_t bootSequence, const Uuid& brokerId, const std::string& vendor, const std::string& product, const std::string& instance); QPID_COMMON_EXTERN virtual void config(const std::string& encoded); QPID_COMMON_EXTERN virtual void queueFairshareState(const std::string& queue, uint8_t position, uint8_t count); QPID_COMMON_EXTERN virtual void queueObserverState(const std::string& queue, const std::string& observerId, const FieldTable& state); QPID_COMMON_EXTERN virtual void clock(uint64_t time); QPID_COMMON_EXTERN virtual void queueDequeueSincePurgeState(const std::string& queue, uint32_t dequeueSincePurge); }; ClusterConnection& getClusterConnection() { return clusterConnectionProxy; } private: Connection connectionProxy; Session sessionProxy; Execution executionProxy; Message messageProxy; Tx txProxy; Dtx dtxProxy; Exchange exchangeProxy; Queue queueProxy; File fileProxy; Stream streamProxy; Cluster clusterProxy; ClusterConnection clusterConnectionProxy; }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_AMQP_ALLPROXY_H*/ qpidc-0.16/src/qpid/framing/StreamConsumeOkBody.h0000664000076400007640000000606011752725676022375 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_STREAMCONSUMEOKBODY_H #define QPID_FRAMING_STREAMCONSUMEOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StreamConsumeOkBody : public ModelMethod { std::string consumerTag; uint16_t flags; public: static const ClassId CLASS_ID = 0xa; static const MethodId METHOD_ID = 0x4; StreamConsumeOkBody( ProtocolVersion, const std::string& _consumerTag) : consumerTag(_consumerTag), flags(0){ flags |= (1 << 8); } StreamConsumeOkBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setConsumerTag(const std::string& _consumerTag); QPID_COMMON_EXTERN const std::string& getConsumerTag() const; QPID_COMMON_EXTERN bool hasConsumerTag() const; QPID_COMMON_EXTERN void clearConsumerTagFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.consumeOk(getConsumerTag()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class StreamConsumeOkBody */ }} #endif /*!QPID_FRAMING_STREAMCONSUMEOKBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterClockBody.h0000664000076400007640000000567311752725676021724 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCLOCKBODY_H #define QPID_FRAMING_CLUSTERCLOCKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterClockBody : public ModelMethod { uint64_t time; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x22; ClusterClockBody( ProtocolVersion, uint64_t _time) : time(_time), flags(0){ flags |= (1 << 8); } ClusterClockBody(ProtocolVersion=ProtocolVersion()) : time(0), flags(0) {} QPID_COMMON_EXTERN void setTime(uint64_t _time); QPID_COMMON_EXTERN uint64_t getTime() const; QPID_COMMON_EXTERN bool hasTime() const; QPID_COMMON_EXTERN void clearTimeFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.clock(getTime()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterClockBody */ }} #endif /*!QPID_FRAMING_CLUSTERCLOCKBODY_H*/ qpidc-0.16/src/qpid/framing/StreamCancelBody.cpp0000664000076400007640000000463211752725676022215 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/StreamCancelBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void StreamCancelBody::setConsumerTag(const std::string& _consumerTag) { consumerTag = _consumerTag; flags |= (1 << 8); } const std::string& StreamCancelBody::getConsumerTag() const { return consumerTag; } bool StreamCancelBody::hasConsumerTag() const { return flags & (1 << 8); } void StreamCancelBody::clearConsumerTagFlag() { flags &= ~(1 << 8); } void StreamCancelBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(consumerTag); } void StreamCancelBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void StreamCancelBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(consumerTag); } void StreamCancelBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t StreamCancelBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + consumerTag.size(); return total; } uint32_t StreamCancelBody::encodedSize() const { uint32_t total = bodySize(); return total; } void StreamCancelBody::print(std::ostream& out) const { out << "{StreamCancelBody: "; if (flags & (1 << 8)) out << "consumer-tag=" << consumerTag << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionTxEndBody.h0000664000076400007640000000521011752725676023716 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONTXENDBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONTXENDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionTxEndBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x17; ClusterConnectionTxEndBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.txEnd(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionTxEndBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONTXENDBODY_H*/ qpidc-0.16/src/qpid/framing/ConnectionStartBody.h0000664000076400007640000000754611752725676022445 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONSTARTBODY_H #define QPID_FRAMING_CONNECTIONSTARTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionStartBody : public AMQMethodBody { FieldTable serverProperties; Array mechanisms; Array locales; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0x1; ConnectionStartBody( ProtocolVersion, const FieldTable& _serverProperties, const Array& _mechanisms, const Array& _locales) : serverProperties(_serverProperties), mechanisms(_mechanisms), locales(_locales), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } ConnectionStartBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setServerProperties(const FieldTable& _serverProperties); QPID_COMMON_EXTERN const FieldTable& getServerProperties() const; QPID_COMMON_EXTERN FieldTable& getServerProperties(); QPID_COMMON_EXTERN bool hasServerProperties() const; QPID_COMMON_EXTERN void clearServerPropertiesFlag(); QPID_COMMON_EXTERN void setMechanisms(const Array& _mechanisms); QPID_COMMON_EXTERN const Array& getMechanisms() const; QPID_COMMON_EXTERN bool hasMechanisms() const; QPID_COMMON_EXTERN void clearMechanismsFlag(); QPID_COMMON_EXTERN void setLocales(const Array& _locales); QPID_COMMON_EXTERN const Array& getLocales() const; QPID_COMMON_EXTERN bool hasLocales() const; QPID_COMMON_EXTERN void clearLocalesFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.start(getServerProperties(), getMechanisms(), getLocales()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionStartBody */ }} #endif /*!QPID_FRAMING_CONNECTIONSTARTBODY_H*/ qpidc-0.16/src/qpid/framing/FrameDefaultVisitor.h0000664000076400007640000000423311004143243022365 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FRAMEVISITOR_H #define QPID_FRAMING_FRAMEVISITOR_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/MethodBodyDefaultVisitor.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQHeaderBody.h" #include "qpid/framing/AMQContentBody.h" #include "qpid/framing/AMQHeartbeatBody.h" namespace qpid { namespace framing { /** * Visitor for all concrete frame body types, which combines * AMQBodyConstVisitor and MethodBodyDefaultVisitor. * * Derived classes can override visit methods to specify actions. * Derived classes must override defaultVisit(), which is called * for any non-overridden visit functions. * */ struct FrameDefaultVisitor : public AMQBodyConstVisitor, protected MethodBodyDefaultVisitor { virtual void defaultVisit(const AMQBody&) = 0; void defaultVisit(const AMQMethodBody& method) { defaultVisit(static_cast(method)); } void visit(const AMQHeaderBody& b) { defaultVisit(b); } void visit(const AMQContentBody& b) { defaultVisit(b); } void visit(const AMQHeartbeatBody& b) { defaultVisit(b); } void visit(const AMQMethodBody& b) { b.accept(static_cast(*this)); } using AMQBodyConstVisitor::visit; using MethodBodyDefaultVisitor::visit; }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_FRAMEVISITOR_H*/ qpidc-0.16/src/qpid/framing/DtxForgetBody.cpp0000664000076400007640000000435511752725676021564 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxForgetBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxForgetBody::setXid(const Xid& _xid) { xid = _xid; flags |= (1 << 8); } const Xid& DtxForgetBody::getXid() const { return xid; } bool DtxForgetBody::hasXid() const { return flags & (1 << 8); } void DtxForgetBody::clearXidFlag() { flags &= ~(1 << 8); } void DtxForgetBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) xid.encode(buffer); } void DtxForgetBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxForgetBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) xid.decode(buffer); } void DtxForgetBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxForgetBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += xid.encodedSize(); return total; } uint32_t DtxForgetBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxForgetBody::print(std::ostream& out) const { out << "{DtxForgetBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ExchangeDeclareBody.cpp0000664000076400007640000001234211752725676022653 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExchangeDeclareBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExchangeDeclareBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 8); } const std::string& ExchangeDeclareBody::getExchange() const { return exchange; } bool ExchangeDeclareBody::hasExchange() const { return flags & (1 << 8); } void ExchangeDeclareBody::clearExchangeFlag() { flags &= ~(1 << 8); } void ExchangeDeclareBody::setType(const std::string& _type) { type = _type; flags |= (1 << 9); } const std::string& ExchangeDeclareBody::getType() const { return type; } bool ExchangeDeclareBody::hasType() const { return flags & (1 << 9); } void ExchangeDeclareBody::clearTypeFlag() { flags &= ~(1 << 9); } void ExchangeDeclareBody::setAlternateExchange(const std::string& _alternateExchange) { alternateExchange = _alternateExchange; flags |= (1 << 10); } const std::string& ExchangeDeclareBody::getAlternateExchange() const { return alternateExchange; } bool ExchangeDeclareBody::hasAlternateExchange() const { return flags & (1 << 10); } void ExchangeDeclareBody::clearAlternateExchangeFlag() { flags &= ~(1 << 10); } void ExchangeDeclareBody::setPassive(bool _passive) { if (_passive) flags |= (1 << 11); else flags &= ~(1 << 11); } bool ExchangeDeclareBody::getPassive() const { return flags & (1 << 11); } void ExchangeDeclareBody::setDurable(bool _durable) { if (_durable) flags |= (1 << 12); else flags &= ~(1 << 12); } bool ExchangeDeclareBody::getDurable() const { return flags & (1 << 12); } void ExchangeDeclareBody::setAutoDelete(bool _autoDelete) { if (_autoDelete) flags |= (1 << 13); else flags &= ~(1 << 13); } bool ExchangeDeclareBody::getAutoDelete() const { return flags & (1 << 13); } void ExchangeDeclareBody::setArguments(const FieldTable& _arguments) { arguments = _arguments; flags |= (1 << 14); } const FieldTable& ExchangeDeclareBody::getArguments() const { return arguments; } FieldTable& ExchangeDeclareBody::getArguments() { flags |= (1 << 14); return arguments; } bool ExchangeDeclareBody::hasArguments() const { return flags & (1 << 14); } void ExchangeDeclareBody::clearArgumentsFlag() { flags &= ~(1 << 14); } void ExchangeDeclareBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(exchange); if (flags & (1 << 9)) buffer.putShortString(type); if (flags & (1 << 10)) buffer.putShortString(alternateExchange); if (flags & (1 << 14)) arguments.encode(buffer); } void ExchangeDeclareBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ExchangeDeclareBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(exchange); if (flags & (1 << 9)) buffer.getShortString(type); if (flags & (1 << 10)) buffer.getShortString(alternateExchange); if (flags & (1 << 14)) arguments.decode(buffer); } void ExchangeDeclareBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ExchangeDeclareBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + exchange.size(); if (flags & (1 << 9)) total += 1 + type.size(); if (flags & (1 << 10)) total += 1 + alternateExchange.size(); if (flags & (1 << 14)) total += arguments.encodedSize(); return total; } uint32_t ExchangeDeclareBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ExchangeDeclareBody::print(std::ostream& out) const { out << "{ExchangeDeclareBody: "; if (flags & (1 << 8)) out << "exchange=" << exchange << "; "; if (flags & (1 << 9)) out << "type=" << type << "; "; if (flags & (1 << 10)) out << "alternate-exchange=" << alternateExchange << "; "; if (flags & (1 << 11)) out << "passive=" << getPassive() << "; "; if (flags & (1 << 12)) out << "durable=" << getDurable() << "; "; if (flags & (1 << 13)) out << "auto-delete=" << getAutoDelete() << "; "; if (flags & (1 << 14)) out << "arguments=" << arguments << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageFlowBody.h0000664000076400007640000000716511752725676021541 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGEFLOWBODY_H #define QPID_FRAMING_MESSAGEFLOWBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageFlowBody : public ModelMethod { std::string destination; uint8_t unit; uint32_t value; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0xa; MessageFlowBody( ProtocolVersion, const std::string& _destination, uint8_t _unit, uint32_t _value) : destination(_destination), unit(_unit), value(_value), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } MessageFlowBody(ProtocolVersion=ProtocolVersion()) : unit(0), value(0), flags(0) {} QPID_COMMON_EXTERN void setDestination(const std::string& _destination); QPID_COMMON_EXTERN const std::string& getDestination() const; QPID_COMMON_EXTERN bool hasDestination() const; QPID_COMMON_EXTERN void clearDestinationFlag(); QPID_COMMON_EXTERN void setUnit(uint8_t _unit); QPID_COMMON_EXTERN uint8_t getUnit() const; QPID_COMMON_EXTERN bool hasUnit() const; QPID_COMMON_EXTERN void clearUnitFlag(); QPID_COMMON_EXTERN void setValue(uint32_t _value); QPID_COMMON_EXTERN uint32_t getValue() const; QPID_COMMON_EXTERN bool hasValue() const; QPID_COMMON_EXTERN void clearValueFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.flow(getDestination(), getUnit(), getValue()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageFlowBody */ }} #endif /*!QPID_FRAMING_MESSAGEFLOWBODY_H*/ qpidc-0.16/src/qpid/framing/StreamReturnBody.h0000664000076400007640000001013611752725676021750 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_STREAMRETURNBODY_H #define QPID_FRAMING_STREAMRETURNBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StreamReturnBody : public ModelMethod { uint16_t replyCode; std::string replyText; std::string exchange; std::string routingKey; uint16_t flags; public: static const ClassId CLASS_ID = 0xa; static const MethodId METHOD_ID = 0x7; StreamReturnBody( ProtocolVersion, uint16_t _replyCode, const std::string& _replyText, const std::string& _exchange, const std::string& _routingKey) : replyCode(_replyCode), replyText(_replyText), exchange(_exchange), routingKey(_routingKey), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); } StreamReturnBody(ProtocolVersion=ProtocolVersion()) : replyCode(0), flags(0) {} QPID_COMMON_EXTERN void setReplyCode(uint16_t _replyCode); QPID_COMMON_EXTERN uint16_t getReplyCode() const; QPID_COMMON_EXTERN bool hasReplyCode() const; QPID_COMMON_EXTERN void clearReplyCodeFlag(); QPID_COMMON_EXTERN void setReplyText(const std::string& _replyText); QPID_COMMON_EXTERN const std::string& getReplyText() const; QPID_COMMON_EXTERN bool hasReplyText() const; QPID_COMMON_EXTERN void clearReplyTextFlag(); QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setRoutingKey(const std::string& _routingKey); QPID_COMMON_EXTERN const std::string& getRoutingKey() const; QPID_COMMON_EXTERN bool hasRoutingKey() const; QPID_COMMON_EXTERN void clearRoutingKeyFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.return_(getReplyCode(), getReplyText(), getExchange(), getRoutingKey()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return true; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class StreamReturnBody */ }} #endif /*!QPID_FRAMING_STREAMRETURNBODY_H*/ qpidc-0.16/src/qpid/framing/FileQosOkBody.h0000664000076400007640000000507011752725676021152 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILEQOSOKBODY_H #define QPID_FRAMING_FILEQOSOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileQosOkBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0x2; FileQosOkBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.qosOk(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileQosOkBody */ }} #endif /*!QPID_FRAMING_FILEQOSOKBODY_H*/ qpidc-0.16/src/qpid/framing/StreamDeliverBody.cpp0000664000076400007640000001030311752725676022412 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/StreamDeliverBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void StreamDeliverBody::setConsumerTag(const std::string& _consumerTag) { consumerTag = _consumerTag; flags |= (1 << 8); } const std::string& StreamDeliverBody::getConsumerTag() const { return consumerTag; } bool StreamDeliverBody::hasConsumerTag() const { return flags & (1 << 8); } void StreamDeliverBody::clearConsumerTagFlag() { flags &= ~(1 << 8); } void StreamDeliverBody::setDeliveryTag(uint64_t _deliveryTag) { deliveryTag = _deliveryTag; flags |= (1 << 9); } uint64_t StreamDeliverBody::getDeliveryTag() const { return deliveryTag; } bool StreamDeliverBody::hasDeliveryTag() const { return flags & (1 << 9); } void StreamDeliverBody::clearDeliveryTagFlag() { flags &= ~(1 << 9); } void StreamDeliverBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 10); } const std::string& StreamDeliverBody::getExchange() const { return exchange; } bool StreamDeliverBody::hasExchange() const { return flags & (1 << 10); } void StreamDeliverBody::clearExchangeFlag() { flags &= ~(1 << 10); } void StreamDeliverBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 11); } const std::string& StreamDeliverBody::getQueue() const { return queue; } bool StreamDeliverBody::hasQueue() const { return flags & (1 << 11); } void StreamDeliverBody::clearQueueFlag() { flags &= ~(1 << 11); } void StreamDeliverBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(consumerTag); if (flags & (1 << 9)) buffer.putLongLong(deliveryTag); if (flags & (1 << 10)) buffer.putShortString(exchange); if (flags & (1 << 11)) buffer.putShortString(queue); } void StreamDeliverBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void StreamDeliverBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(consumerTag); if (flags & (1 << 9)) deliveryTag = buffer.getLongLong(); if (flags & (1 << 10)) buffer.getShortString(exchange); if (flags & (1 << 11)) buffer.getShortString(queue); } void StreamDeliverBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t StreamDeliverBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + consumerTag.size(); if (flags & (1 << 9)) total += 8;//deliveryTag if (flags & (1 << 10)) total += 1 + exchange.size(); if (flags & (1 << 11)) total += 1 + queue.size(); return total; } uint32_t StreamDeliverBody::encodedSize() const { uint32_t total = bodySize(); return total; } void StreamDeliverBody::print(std::ostream& out) const { out << "{StreamDeliverBody: "; if (flags & (1 << 8)) out << "consumer-tag=" << consumerTag << "; "; if (flags & (1 << 9)) out << "delivery-tag=" << deliveryTag << "; "; if (flags & (1 << 10)) out << "exchange=" << exchange << "; "; if (flags & (1 << 11)) out << "queue=" << queue << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/DtxRollbackBody.h0000664000076400007640000000570411752725676021533 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXROLLBACKBODY_H #define QPID_FRAMING_DTXROLLBACKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include "qpid/framing/Xid.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxRollbackBody : public ModelMethod { Xid xid; uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0x9; DtxRollbackBody( ProtocolVersion, const Xid& _xid) : xid(_xid), flags(0){ flags |= (1 << 8); } DtxRollbackBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setXid(const Xid& _xid); QPID_COMMON_EXTERN const Xid& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); typedef XaResult ResultType; template ResultType invoke(T& invocable) const { return invocable.rollback(getXid()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxRollbackBody */ }} #endif /*!QPID_FRAMING_DTXROLLBACKBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterErrorCheckBody.cpp0000664000076400007640000000570511752725676023247 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterErrorCheckBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterErrorCheckBody::setType(uint8_t _type) { type = _type; flags |= (1 << 8); } uint8_t ClusterErrorCheckBody::getType() const { return type; } bool ClusterErrorCheckBody::hasType() const { return flags & (1 << 8); } void ClusterErrorCheckBody::clearTypeFlag() { flags &= ~(1 << 8); } void ClusterErrorCheckBody::setFrameSeq(const SequenceNumber& _frameSeq) { frameSeq = _frameSeq; flags |= (1 << 9); } SequenceNumber ClusterErrorCheckBody::getFrameSeq() const { return frameSeq; } bool ClusterErrorCheckBody::hasFrameSeq() const { return flags & (1 << 9); } void ClusterErrorCheckBody::clearFrameSeqFlag() { flags &= ~(1 << 9); } void ClusterErrorCheckBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putOctet(type); if (flags & (1 << 9)) frameSeq.encode(buffer); } void ClusterErrorCheckBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterErrorCheckBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) type = buffer.getOctet(); if (flags & (1 << 9)) frameSeq.decode(buffer); } void ClusterErrorCheckBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterErrorCheckBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1;//type if (flags & (1 << 9)) total += frameSeq.encodedSize(); return total; } uint32_t ClusterErrorCheckBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterErrorCheckBody::print(std::ostream& out) const { out << "{ClusterErrorCheckBody: "; if (flags & (1 << 8)) out << "type=" << (int) type << "; "; if (flags & (1 << 9)) out << "frame-seq=" << frameSeq << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterTimerWakeupBody.h0000664000076400007640000000600311752725676023112 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERTIMERWAKEUPBODY_H #define QPID_FRAMING_CLUSTERTIMERWAKEUPBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterTimerWakeupBody : public ModelMethod { std::string name; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x15; ClusterTimerWakeupBody( ProtocolVersion, const std::string& _name) : name(_name), flags(0){ flags |= (1 << 8); } ClusterTimerWakeupBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setName(const std::string& _name); QPID_COMMON_EXTERN const std::string& getName() const; QPID_COMMON_EXTERN bool hasName() const; QPID_COMMON_EXTERN void clearNameFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.timerWakeup(getName()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterTimerWakeupBody */ }} #endif /*!QPID_FRAMING_CLUSTERTIMERWAKEUPBODY_H*/ qpidc-0.16/src/qpid/framing/DeliveryProperties.cpp0000664000076400007640000002054211752725676022674 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DeliveryProperties.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DeliveryProperties::setDiscardUnroutable(bool _discardUnroutable) { if (_discardUnroutable) flags |= (1 << 8); else flags &= ~(1 << 8); } bool DeliveryProperties::getDiscardUnroutable() const { return flags & (1 << 8); } void DeliveryProperties::setImmediate(bool _immediate) { if (_immediate) flags |= (1 << 9); else flags &= ~(1 << 9); } bool DeliveryProperties::getImmediate() const { return flags & (1 << 9); } void DeliveryProperties::setRedelivered(bool _redelivered) { if (_redelivered) flags |= (1 << 10); else flags &= ~(1 << 10); } bool DeliveryProperties::getRedelivered() const { return flags & (1 << 10); } void DeliveryProperties::setPriority(uint8_t _priority) { priority = _priority; flags |= (1 << 11); } uint8_t DeliveryProperties::getPriority() const { return priority; } bool DeliveryProperties::hasPriority() const { return flags & (1 << 11); } void DeliveryProperties::clearPriorityFlag() { flags &= ~(1 << 11); } void DeliveryProperties::setDeliveryMode(uint8_t _deliveryMode) { deliveryMode = _deliveryMode; flags |= (1 << 12); } uint8_t DeliveryProperties::getDeliveryMode() const { return deliveryMode; } bool DeliveryProperties::hasDeliveryMode() const { return flags & (1 << 12); } void DeliveryProperties::clearDeliveryModeFlag() { flags &= ~(1 << 12); } void DeliveryProperties::setTtl(uint64_t _ttl) { ttl = _ttl; flags |= (1 << 13); } uint64_t DeliveryProperties::getTtl() const { return ttl; } bool DeliveryProperties::hasTtl() const { return flags & (1 << 13); } void DeliveryProperties::clearTtlFlag() { flags &= ~(1 << 13); } void DeliveryProperties::setTimestamp(uint64_t _timestamp) { timestamp = _timestamp; flags |= (1 << 14); } uint64_t DeliveryProperties::getTimestamp() const { return timestamp; } bool DeliveryProperties::hasTimestamp() const { return flags & (1 << 14); } void DeliveryProperties::clearTimestampFlag() { flags &= ~(1 << 14); } void DeliveryProperties::setExpiration(uint64_t _expiration) { expiration = _expiration; flags |= (1 << 15); } uint64_t DeliveryProperties::getExpiration() const { return expiration; } bool DeliveryProperties::hasExpiration() const { return flags & (1 << 15); } void DeliveryProperties::clearExpirationFlag() { flags &= ~(1 << 15); } void DeliveryProperties::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 0); } const std::string& DeliveryProperties::getExchange() const { return exchange; } bool DeliveryProperties::hasExchange() const { return flags & (1 << 0); } void DeliveryProperties::clearExchangeFlag() { flags &= ~(1 << 0); } void DeliveryProperties::setRoutingKey(const std::string& _routingKey) { routingKey = _routingKey; flags |= (1 << 1); } const std::string& DeliveryProperties::getRoutingKey() const { return routingKey; } bool DeliveryProperties::hasRoutingKey() const { return flags & (1 << 1); } void DeliveryProperties::clearRoutingKeyFlag() { flags &= ~(1 << 1); } void DeliveryProperties::setResumeId(const std::string& _resumeId) { resumeId = _resumeId; flags |= (1 << 2); } const std::string& DeliveryProperties::getResumeId() const { return resumeId; } bool DeliveryProperties::hasResumeId() const { return flags & (1 << 2); } void DeliveryProperties::clearResumeIdFlag() { flags &= ~(1 << 2); } void DeliveryProperties::setResumeTtl(uint64_t _resumeTtl) { resumeTtl = _resumeTtl; flags |= (1 << 3); } uint64_t DeliveryProperties::getResumeTtl() const { return resumeTtl; } bool DeliveryProperties::hasResumeTtl() const { return flags & (1 << 3); } void DeliveryProperties::clearResumeTtlFlag() { flags &= ~(1 << 3); } void DeliveryProperties::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 11)) buffer.putOctet(priority); if (flags & (1 << 12)) buffer.putOctet(deliveryMode); if (flags & (1 << 13)) buffer.putLongLong(ttl); if (flags & (1 << 14)) buffer.putLongLong(timestamp); if (flags & (1 << 15)) buffer.putLongLong(expiration); if (flags & (1 << 0)) buffer.putShortString(exchange); if (flags & (1 << 1)) buffer.putShortString(routingKey); if (flags & (1 << 2)) buffer.putMediumString(resumeId); if (flags & (1 << 3)) buffer.putLongLong(resumeTtl); } void DeliveryProperties::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void DeliveryProperties::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 11)) priority = buffer.getOctet(); if (flags & (1 << 12)) deliveryMode = buffer.getOctet(); if (flags & (1 << 13)) ttl = buffer.getLongLong(); if (flags & (1 << 14)) timestamp = buffer.getLongLong(); if (flags & (1 << 15)) expiration = buffer.getLongLong(); if (flags & (1 << 0)) buffer.getShortString(exchange); if (flags & (1 << 1)) buffer.getShortString(routingKey); if (flags & (1 << 2)) buffer.getMediumString(resumeId); if (flags & (1 << 3)) resumeTtl = buffer.getLongLong(); } void DeliveryProperties::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t DeliveryProperties::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 11)) total += 1;//priority if (flags & (1 << 12)) total += 1;//deliveryMode if (flags & (1 << 13)) total += 8;//ttl if (flags & (1 << 14)) total += 8;//timestamp if (flags & (1 << 15)) total += 8;//expiration if (flags & (1 << 0)) total += 1 + exchange.size(); if (flags & (1 << 1)) total += 1 + routingKey.size(); if (flags & (1 << 2)) total += 2 + resumeId.size(); if (flags & (1 << 3)) total += 8;//resumeTtl return total; } uint32_t DeliveryProperties::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void DeliveryProperties::print(std::ostream& out) const { out << "{DeliveryProperties: "; if (flags & (1 << 8)) out << "discard-unroutable=" << getDiscardUnroutable() << "; "; if (flags & (1 << 9)) out << "immediate=" << getImmediate() << "; "; if (flags & (1 << 10)) out << "redelivered=" << getRedelivered() << "; "; if (flags & (1 << 11)) out << "priority=" << (int) priority << "; "; if (flags & (1 << 12)) out << "delivery-mode=" << (int) deliveryMode << "; "; if (flags & (1 << 13)) out << "ttl=" << ttl << "; "; if (flags & (1 << 14)) out << "timestamp=" << timestamp << "; "; if (flags & (1 << 15)) out << "expiration=" << expiration << "; "; if (flags & (1 << 0)) out << "exchange=" << exchange << "; "; if (flags & (1 << 1)) out << "routing-key=" << routingKey << "; "; if (flags & (1 << 2)) out << "resume-id=" << resumeId << "; "; if (flags & (1 << 3)) out << "resume-ttl=" << resumeTtl << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const DeliveryProperties& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/AMQP_ServerProxy.cpp0000664000076400007640000003671511752725675022172 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/AMQP_ServerProxy.h" #include "qpid/framing/amqp_types_full.h" #include "qpid/framing/ConnectionStartOkBody.h" #include "qpid/framing/ConnectionSecureOkBody.h" #include "qpid/framing/ConnectionTuneOkBody.h" #include "qpid/framing/ConnectionOpenBody.h" #include "qpid/framing/ConnectionHeartbeatBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/framing/SessionAttachBody.h" #include "qpid/framing/SessionAttachedBody.h" #include "qpid/framing/SessionDetachBody.h" #include "qpid/framing/SessionDetachedBody.h" #include "qpid/framing/SessionRequestTimeoutBody.h" #include "qpid/framing/SessionTimeoutBody.h" #include "qpid/framing/SessionCommandPointBody.h" #include "qpid/framing/SessionExpectedBody.h" #include "qpid/framing/SessionConfirmedBody.h" #include "qpid/framing/SessionCompletedBody.h" #include "qpid/framing/SessionKnownCompletedBody.h" #include "qpid/framing/SessionFlushBody.h" #include "qpid/framing/SessionGapBody.h" #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/ExecutionResultBody.h" #include "qpid/framing/ExecutionExceptionBody.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/MessageAcceptBody.h" #include "qpid/framing/MessageRejectBody.h" #include "qpid/framing/MessageReleaseBody.h" #include "qpid/framing/MessageAcquireBody.h" #include "qpid/framing/MessageResumeBody.h" #include "qpid/framing/MessageSubscribeBody.h" #include "qpid/framing/MessageCancelBody.h" #include "qpid/framing/MessageSetFlowModeBody.h" #include "qpid/framing/MessageFlowBody.h" #include "qpid/framing/MessageFlushBody.h" #include "qpid/framing/MessageStopBody.h" #include "qpid/framing/TxSelectBody.h" #include "qpid/framing/TxCommitBody.h" #include "qpid/framing/TxRollbackBody.h" #include "qpid/framing/DtxSelectBody.h" #include "qpid/framing/DtxStartBody.h" #include "qpid/framing/DtxEndBody.h" #include "qpid/framing/DtxCommitBody.h" #include "qpid/framing/DtxForgetBody.h" #include "qpid/framing/DtxGetTimeoutBody.h" #include "qpid/framing/DtxPrepareBody.h" #include "qpid/framing/DtxRecoverBody.h" #include "qpid/framing/DtxRollbackBody.h" #include "qpid/framing/DtxSetTimeoutBody.h" #include "qpid/framing/ExchangeDeclareBody.h" #include "qpid/framing/ExchangeDeleteBody.h" #include "qpid/framing/ExchangeQueryBody.h" #include "qpid/framing/ExchangeBindBody.h" #include "qpid/framing/ExchangeUnbindBody.h" #include "qpid/framing/ExchangeBoundBody.h" #include "qpid/framing/QueueDeclareBody.h" #include "qpid/framing/QueueDeleteBody.h" #include "qpid/framing/QueuePurgeBody.h" #include "qpid/framing/QueueQueryBody.h" #include "qpid/framing/FileQosBody.h" #include "qpid/framing/FileConsumeBody.h" #include "qpid/framing/FileCancelBody.h" #include "qpid/framing/FileOpenBody.h" #include "qpid/framing/FileOpenOkBody.h" #include "qpid/framing/FileStageBody.h" #include "qpid/framing/FilePublishBody.h" #include "qpid/framing/FileAckBody.h" #include "qpid/framing/FileRejectBody.h" #include "qpid/framing/StreamQosBody.h" #include "qpid/framing/StreamConsumeBody.h" #include "qpid/framing/StreamCancelBody.h" #include "qpid/framing/StreamPublishBody.h" namespace qpid { namespace framing { AMQP_ServerProxy::AMQP_ServerProxy(FrameHandler& f) : Proxy(f), connectionProxy(f), sessionProxy(f), executionProxy(f), messageProxy(f), txProxy(f), dtxProxy(f), exchangeProxy(f), queueProxy(f), fileProxy(f), streamProxy(f), clusterProxy(f), clusterConnectionProxy(f){} void AMQP_ServerProxy::Connection::startOk(const FieldTable& clientProperties, const std::string& mechanism, const std::string& response, const std::string& locale) { send(ConnectionStartOkBody(getVersion(), clientProperties, mechanism, response, locale)); } void AMQP_ServerProxy::Connection::secureOk(const std::string& response) { send(ConnectionSecureOkBody(getVersion(), response)); } void AMQP_ServerProxy::Connection::tuneOk(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeat) { send(ConnectionTuneOkBody(getVersion(), channelMax, maxFrameSize, heartbeat)); } void AMQP_ServerProxy::Connection::open(const std::string& virtualHost, const Array& capabilities, bool insist) { send(ConnectionOpenBody(getVersion(), virtualHost, capabilities, insist)); } void AMQP_ServerProxy::Connection::heartbeat() { send(ConnectionHeartbeatBody(getVersion())); } void AMQP_ServerProxy::Connection::close(uint16_t replyCode, const std::string& replyText) { send(ConnectionCloseBody(getVersion(), replyCode, replyText)); } void AMQP_ServerProxy::Connection::closeOk() { send(ConnectionCloseOkBody(getVersion())); } void AMQP_ServerProxy::Session::attach(const std::string& name, bool force) { send(SessionAttachBody(getVersion(), name, force)); } void AMQP_ServerProxy::Session::attached(const std::string& name) { send(SessionAttachedBody(getVersion(), name)); } void AMQP_ServerProxy::Session::detach(const std::string& name) { send(SessionDetachBody(getVersion(), name)); } void AMQP_ServerProxy::Session::detached(const std::string& name, uint8_t code) { send(SessionDetachedBody(getVersion(), name, code)); } void AMQP_ServerProxy::Session::requestTimeout(uint32_t timeout) { send(SessionRequestTimeoutBody(getVersion(), timeout)); } void AMQP_ServerProxy::Session::timeout(uint32_t timeout) { send(SessionTimeoutBody(getVersion(), timeout)); } void AMQP_ServerProxy::Session::commandPoint(const SequenceNumber& commandId, uint64_t commandOffset) { send(SessionCommandPointBody(getVersion(), commandId, commandOffset)); } void AMQP_ServerProxy::Session::expected(const SequenceSet& commands, const Array& fragments) { send(SessionExpectedBody(getVersion(), commands, fragments)); } void AMQP_ServerProxy::Session::confirmed(const SequenceSet& commands, const Array& fragments) { send(SessionConfirmedBody(getVersion(), commands, fragments)); } void AMQP_ServerProxy::Session::completed(const SequenceSet& commands, bool timelyReply) { send(SessionCompletedBody(getVersion(), commands, timelyReply)); } void AMQP_ServerProxy::Session::knownCompleted(const SequenceSet& commands) { send(SessionKnownCompletedBody(getVersion(), commands)); } void AMQP_ServerProxy::Session::flush(bool expected, bool confirmed, bool completed) { send(SessionFlushBody(getVersion(), expected, confirmed, completed)); } void AMQP_ServerProxy::Session::gap(const SequenceSet& commands) { send(SessionGapBody(getVersion(), commands)); } void AMQP_ServerProxy::Execution::sync() { send(ExecutionSyncBody(getVersion())); } void AMQP_ServerProxy::Execution::result(const SequenceNumber& commandId, const std::string& value) { send(ExecutionResultBody(getVersion(), commandId, value)); } void AMQP_ServerProxy::Execution::exception(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo) { send(ExecutionExceptionBody(getVersion(), errorCode, commandId, classCode, commandCode, fieldIndex, description, errorInfo)); } void AMQP_ServerProxy::Message::transfer(const std::string& destination, uint8_t acceptMode, uint8_t acquireMode) { send(MessageTransferBody(getVersion(), destination, acceptMode, acquireMode)); } void AMQP_ServerProxy::Message::accept(const SequenceSet& transfers) { send(MessageAcceptBody(getVersion(), transfers)); } void AMQP_ServerProxy::Message::reject(const SequenceSet& transfers, uint16_t code, const std::string& text) { send(MessageRejectBody(getVersion(), transfers, code, text)); } void AMQP_ServerProxy::Message::release(const SequenceSet& transfers, bool setRedelivered) { send(MessageReleaseBody(getVersion(), transfers, setRedelivered)); } void AMQP_ServerProxy::Message::acquire(const SequenceSet& transfers) { send(MessageAcquireBody(getVersion(), transfers)); } void AMQP_ServerProxy::Message::resume(const std::string& destination, const std::string& resumeId) { send(MessageResumeBody(getVersion(), destination, resumeId)); } void AMQP_ServerProxy::Message::subscribe(const std::string& queue, const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const std::string& resumeId, uint64_t resumeTtl, const FieldTable& arguments) { send(MessageSubscribeBody(getVersion(), queue, destination, acceptMode, acquireMode, exclusive, resumeId, resumeTtl, arguments)); } void AMQP_ServerProxy::Message::cancel(const std::string& destination) { send(MessageCancelBody(getVersion(), destination)); } void AMQP_ServerProxy::Message::setFlowMode(const std::string& destination, uint8_t flowMode) { send(MessageSetFlowModeBody(getVersion(), destination, flowMode)); } void AMQP_ServerProxy::Message::flow(const std::string& destination, uint8_t unit, uint32_t value) { send(MessageFlowBody(getVersion(), destination, unit, value)); } void AMQP_ServerProxy::Message::flush(const std::string& destination) { send(MessageFlushBody(getVersion(), destination)); } void AMQP_ServerProxy::Message::stop(const std::string& destination) { send(MessageStopBody(getVersion(), destination)); } void AMQP_ServerProxy::Tx::select() { send(TxSelectBody(getVersion())); } void AMQP_ServerProxy::Tx::commit() { send(TxCommitBody(getVersion())); } void AMQP_ServerProxy::Tx::rollback() { send(TxRollbackBody(getVersion())); } void AMQP_ServerProxy::Dtx::select() { send(DtxSelectBody(getVersion())); } void AMQP_ServerProxy::Dtx::start(const Xid& xid, bool join, bool resume) { send(DtxStartBody(getVersion(), xid, join, resume)); } void AMQP_ServerProxy::Dtx::end(const Xid& xid, bool fail, bool suspend) { send(DtxEndBody(getVersion(), xid, fail, suspend)); } void AMQP_ServerProxy::Dtx::commit(const Xid& xid, bool onePhase) { send(DtxCommitBody(getVersion(), xid, onePhase)); } void AMQP_ServerProxy::Dtx::forget(const Xid& xid) { send(DtxForgetBody(getVersion(), xid)); } void AMQP_ServerProxy::Dtx::getTimeout(const Xid& xid) { send(DtxGetTimeoutBody(getVersion(), xid)); } void AMQP_ServerProxy::Dtx::prepare(const Xid& xid) { send(DtxPrepareBody(getVersion(), xid)); } void AMQP_ServerProxy::Dtx::recover() { send(DtxRecoverBody(getVersion())); } void AMQP_ServerProxy::Dtx::rollback(const Xid& xid) { send(DtxRollbackBody(getVersion(), xid)); } void AMQP_ServerProxy::Dtx::setTimeout(const Xid& xid, uint32_t timeout) { send(DtxSetTimeoutBody(getVersion(), xid, timeout)); } void AMQP_ServerProxy::Exchange::declare(const std::string& exchange, const std::string& type, const std::string& alternateExchange, bool passive, bool durable, bool autoDelete, const FieldTable& arguments) { send(ExchangeDeclareBody(getVersion(), exchange, type, alternateExchange, passive, durable, autoDelete, arguments)); } void AMQP_ServerProxy::Exchange::delete_(const std::string& exchange, bool ifUnused) { send(ExchangeDeleteBody(getVersion(), exchange, ifUnused)); } void AMQP_ServerProxy::Exchange::query(const std::string& name) { send(ExchangeQueryBody(getVersion(), name)); } void AMQP_ServerProxy::Exchange::bind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, const FieldTable& arguments) { send(ExchangeBindBody(getVersion(), queue, exchange, bindingKey, arguments)); } void AMQP_ServerProxy::Exchange::unbind(const std::string& queue, const std::string& exchange, const std::string& bindingKey) { send(ExchangeUnbindBody(getVersion(), queue, exchange, bindingKey)); } void AMQP_ServerProxy::Exchange::bound(const std::string& exchange, const std::string& queue, const std::string& bindingKey, const FieldTable& arguments) { send(ExchangeBoundBody(getVersion(), exchange, queue, bindingKey, arguments)); } void AMQP_ServerProxy::Queue::declare(const std::string& queue, const std::string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const FieldTable& arguments) { send(QueueDeclareBody(getVersion(), queue, alternateExchange, passive, durable, exclusive, autoDelete, arguments)); } void AMQP_ServerProxy::Queue::delete_(const std::string& queue, bool ifUnused, bool ifEmpty) { send(QueueDeleteBody(getVersion(), queue, ifUnused, ifEmpty)); } void AMQP_ServerProxy::Queue::purge(const std::string& queue) { send(QueuePurgeBody(getVersion(), queue)); } void AMQP_ServerProxy::Queue::query(const std::string& queue) { send(QueueQueryBody(getVersion(), queue)); } void AMQP_ServerProxy::File::qos(uint32_t prefetchSize, uint16_t prefetchCount, bool global) { send(FileQosBody(getVersion(), prefetchSize, prefetchCount, global)); } void AMQP_ServerProxy::File::consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool noAck, bool exclusive, bool nowait, const FieldTable& arguments) { send(FileConsumeBody(getVersion(), queue, consumerTag, noLocal, noAck, exclusive, nowait, arguments)); } void AMQP_ServerProxy::File::cancel(const std::string& consumerTag) { send(FileCancelBody(getVersion(), consumerTag)); } void AMQP_ServerProxy::File::open(const std::string& identifier, uint64_t contentSize) { send(FileOpenBody(getVersion(), identifier, contentSize)); } void AMQP_ServerProxy::File::openOk(uint64_t stagedSize) { send(FileOpenOkBody(getVersion(), stagedSize)); } void AMQP_ServerProxy::File::stage() { send(FileStageBody(getVersion())); } void AMQP_ServerProxy::File::publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate, const std::string& identifier) { send(FilePublishBody(getVersion(), exchange, routingKey, mandatory, immediate, identifier)); } void AMQP_ServerProxy::File::ack(uint64_t deliveryTag, bool multiple) { send(FileAckBody(getVersion(), deliveryTag, multiple)); } void AMQP_ServerProxy::File::reject(uint64_t deliveryTag, bool requeue) { send(FileRejectBody(getVersion(), deliveryTag, requeue)); } void AMQP_ServerProxy::Stream::qos(uint32_t prefetchSize, uint16_t prefetchCount, uint32_t consumeRate, bool global) { send(StreamQosBody(getVersion(), prefetchSize, prefetchCount, consumeRate, global)); } void AMQP_ServerProxy::Stream::consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool exclusive, bool nowait, const FieldTable& arguments) { send(StreamConsumeBody(getVersion(), queue, consumerTag, noLocal, exclusive, nowait, arguments)); } void AMQP_ServerProxy::Stream::cancel(const std::string& consumerTag) { send(StreamCancelBody(getVersion(), consumerTag)); } void AMQP_ServerProxy::Stream::publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate) { send(StreamPublishBody(getVersion(), exchange, routingKey, mandatory, immediate)); } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/AMQP_ClientProxy.cpp0000664000076400007640000002365311752725675022137 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/AMQP_ClientProxy.h" #include "qpid/framing/amqp_types_full.h" #include "qpid/framing/ConnectionStartBody.h" #include "qpid/framing/ConnectionSecureBody.h" #include "qpid/framing/ConnectionTuneBody.h" #include "qpid/framing/ConnectionOpenOkBody.h" #include "qpid/framing/ConnectionRedirectBody.h" #include "qpid/framing/ConnectionHeartbeatBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/framing/SessionAttachBody.h" #include "qpid/framing/SessionAttachedBody.h" #include "qpid/framing/SessionDetachBody.h" #include "qpid/framing/SessionDetachedBody.h" #include "qpid/framing/SessionRequestTimeoutBody.h" #include "qpid/framing/SessionTimeoutBody.h" #include "qpid/framing/SessionCommandPointBody.h" #include "qpid/framing/SessionExpectedBody.h" #include "qpid/framing/SessionConfirmedBody.h" #include "qpid/framing/SessionCompletedBody.h" #include "qpid/framing/SessionKnownCompletedBody.h" #include "qpid/framing/SessionFlushBody.h" #include "qpid/framing/SessionGapBody.h" #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/ExecutionResultBody.h" #include "qpid/framing/ExecutionExceptionBody.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/MessageAcceptBody.h" #include "qpid/framing/MessageRejectBody.h" #include "qpid/framing/MessageReleaseBody.h" #include "qpid/framing/MessageResumeBody.h" #include "qpid/framing/MessageSetFlowModeBody.h" #include "qpid/framing/MessageFlowBody.h" #include "qpid/framing/MessageStopBody.h" #include "qpid/framing/FileQosOkBody.h" #include "qpid/framing/FileConsumeOkBody.h" #include "qpid/framing/FileOpenBody.h" #include "qpid/framing/FileOpenOkBody.h" #include "qpid/framing/FileStageBody.h" #include "qpid/framing/FileReturnBody.h" #include "qpid/framing/FileDeliverBody.h" #include "qpid/framing/StreamQosOkBody.h" #include "qpid/framing/StreamConsumeOkBody.h" #include "qpid/framing/StreamReturnBody.h" #include "qpid/framing/StreamDeliverBody.h" namespace qpid { namespace framing { AMQP_ClientProxy::AMQP_ClientProxy(FrameHandler& f) : Proxy(f), connectionProxy(f), sessionProxy(f), executionProxy(f), messageProxy(f), txProxy(f), dtxProxy(f), exchangeProxy(f), queueProxy(f), fileProxy(f), streamProxy(f), clusterProxy(f), clusterConnectionProxy(f){} void AMQP_ClientProxy::Connection::start(const FieldTable& serverProperties, const Array& mechanisms, const Array& locales) { send(ConnectionStartBody(getVersion(), serverProperties, mechanisms, locales)); } void AMQP_ClientProxy::Connection::secure(const std::string& challenge) { send(ConnectionSecureBody(getVersion(), challenge)); } void AMQP_ClientProxy::Connection::tune(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeatMin, uint16_t heartbeatMax) { send(ConnectionTuneBody(getVersion(), channelMax, maxFrameSize, heartbeatMin, heartbeatMax)); } void AMQP_ClientProxy::Connection::openOk(const Array& knownHosts) { send(ConnectionOpenOkBody(getVersion(), knownHosts)); } void AMQP_ClientProxy::Connection::redirect(const std::string& host, const Array& knownHosts) { send(ConnectionRedirectBody(getVersion(), host, knownHosts)); } void AMQP_ClientProxy::Connection::heartbeat() { send(ConnectionHeartbeatBody(getVersion())); } void AMQP_ClientProxy::Connection::close(uint16_t replyCode, const std::string& replyText) { send(ConnectionCloseBody(getVersion(), replyCode, replyText)); } void AMQP_ClientProxy::Connection::closeOk() { send(ConnectionCloseOkBody(getVersion())); } void AMQP_ClientProxy::Session::attach(const std::string& name, bool force) { send(SessionAttachBody(getVersion(), name, force)); } void AMQP_ClientProxy::Session::attached(const std::string& name) { send(SessionAttachedBody(getVersion(), name)); } void AMQP_ClientProxy::Session::detach(const std::string& name) { send(SessionDetachBody(getVersion(), name)); } void AMQP_ClientProxy::Session::detached(const std::string& name, uint8_t code) { send(SessionDetachedBody(getVersion(), name, code)); } void AMQP_ClientProxy::Session::requestTimeout(uint32_t timeout) { send(SessionRequestTimeoutBody(getVersion(), timeout)); } void AMQP_ClientProxy::Session::timeout(uint32_t timeout) { send(SessionTimeoutBody(getVersion(), timeout)); } void AMQP_ClientProxy::Session::commandPoint(const SequenceNumber& commandId, uint64_t commandOffset) { send(SessionCommandPointBody(getVersion(), commandId, commandOffset)); } void AMQP_ClientProxy::Session::expected(const SequenceSet& commands, const Array& fragments) { send(SessionExpectedBody(getVersion(), commands, fragments)); } void AMQP_ClientProxy::Session::confirmed(const SequenceSet& commands, const Array& fragments) { send(SessionConfirmedBody(getVersion(), commands, fragments)); } void AMQP_ClientProxy::Session::completed(const SequenceSet& commands, bool timelyReply) { send(SessionCompletedBody(getVersion(), commands, timelyReply)); } void AMQP_ClientProxy::Session::knownCompleted(const SequenceSet& commands) { send(SessionKnownCompletedBody(getVersion(), commands)); } void AMQP_ClientProxy::Session::flush(bool expected, bool confirmed, bool completed) { send(SessionFlushBody(getVersion(), expected, confirmed, completed)); } void AMQP_ClientProxy::Session::gap(const SequenceSet& commands) { send(SessionGapBody(getVersion(), commands)); } void AMQP_ClientProxy::Execution::sync() { send(ExecutionSyncBody(getVersion())); } void AMQP_ClientProxy::Execution::result(const SequenceNumber& commandId, const std::string& value) { send(ExecutionResultBody(getVersion(), commandId, value)); } void AMQP_ClientProxy::Execution::exception(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo) { send(ExecutionExceptionBody(getVersion(), errorCode, commandId, classCode, commandCode, fieldIndex, description, errorInfo)); } void AMQP_ClientProxy::Message::transfer(const std::string& destination, uint8_t acceptMode, uint8_t acquireMode) { send(MessageTransferBody(getVersion(), destination, acceptMode, acquireMode)); } void AMQP_ClientProxy::Message::accept(const SequenceSet& transfers) { send(MessageAcceptBody(getVersion(), transfers)); } void AMQP_ClientProxy::Message::reject(const SequenceSet& transfers, uint16_t code, const std::string& text) { send(MessageRejectBody(getVersion(), transfers, code, text)); } void AMQP_ClientProxy::Message::release(const SequenceSet& transfers, bool setRedelivered) { send(MessageReleaseBody(getVersion(), transfers, setRedelivered)); } void AMQP_ClientProxy::Message::resume(const std::string& destination, const std::string& resumeId) { send(MessageResumeBody(getVersion(), destination, resumeId)); } void AMQP_ClientProxy::Message::setFlowMode(const std::string& destination, uint8_t flowMode) { send(MessageSetFlowModeBody(getVersion(), destination, flowMode)); } void AMQP_ClientProxy::Message::flow(const std::string& destination, uint8_t unit, uint32_t value) { send(MessageFlowBody(getVersion(), destination, unit, value)); } void AMQP_ClientProxy::Message::stop(const std::string& destination) { send(MessageStopBody(getVersion(), destination)); } void AMQP_ClientProxy::File::qosOk() { send(FileQosOkBody(getVersion())); } void AMQP_ClientProxy::File::consumeOk(const std::string& consumerTag) { send(FileConsumeOkBody(getVersion(), consumerTag)); } void AMQP_ClientProxy::File::open(const std::string& identifier, uint64_t contentSize) { send(FileOpenBody(getVersion(), identifier, contentSize)); } void AMQP_ClientProxy::File::openOk(uint64_t stagedSize) { send(FileOpenOkBody(getVersion(), stagedSize)); } void AMQP_ClientProxy::File::stage() { send(FileStageBody(getVersion())); } void AMQP_ClientProxy::File::return_(uint16_t replyCode, const std::string& replyText, const std::string& exchange, const std::string& routingKey) { send(FileReturnBody(getVersion(), replyCode, replyText, exchange, routingKey)); } void AMQP_ClientProxy::File::deliver(const std::string& consumerTag, uint64_t deliveryTag, bool redelivered, const std::string& exchange, const std::string& routingKey, const std::string& identifier) { send(FileDeliverBody(getVersion(), consumerTag, deliveryTag, redelivered, exchange, routingKey, identifier)); } void AMQP_ClientProxy::Stream::qosOk() { send(StreamQosOkBody(getVersion())); } void AMQP_ClientProxy::Stream::consumeOk(const std::string& consumerTag) { send(StreamConsumeOkBody(getVersion(), consumerTag)); } void AMQP_ClientProxy::Stream::return_(uint16_t replyCode, const std::string& replyText, const std::string& exchange, const std::string& routingKey) { send(StreamReturnBody(getVersion(), replyCode, replyText, exchange, routingKey)); } void AMQP_ClientProxy::Stream::deliver(const std::string& consumerTag, uint64_t deliveryTag, const std::string& exchange, const std::string& queue) { send(StreamDeliverBody(getVersion(), consumerTag, deliveryTag, exchange, queue)); } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/ChannelHandler.h0000664000076400007640000000320711227113407021322 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CHANNELHANDLER_H #define QPID_FRAMING_CHANNELHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/FrameHandler.h" #include "qpid/framing/AMQFrame.h" namespace qpid { namespace framing { /** * Sets the channel number on outgoing frames. */ class ChannelHandler : public FrameHandler { public: ChannelHandler(uint16_t channelId=0, FrameHandler* next=0) : FrameHandler(next), channel(channelId) {} void handle(AMQFrame& frame) { frame.setChannel(channel); next->handle(frame); } uint16_t get() const { return channel; } ChannelHandler& set(uint16_t ch) { channel=ch; return *this; } operator uint16_t() const { return get(); } ChannelHandler& operator=(uint16_t ch) { return set(ch); } private: uint16_t channel; }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_CHANNELHANDLER_H*/ qpidc-0.16/src/qpid/framing/SessionKnownCompletedBody.h0000664000076400007640000000613311752725676023614 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONKNOWNCOMPLETEDBODY_H #define QPID_FRAMING_SESSIONKNOWNCOMPLETEDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionKnownCompletedBody : public AMQMethodBody { SequenceSet commands; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0xb; SessionKnownCompletedBody( ProtocolVersion, const SequenceSet& _commands) : commands(_commands), flags(0){ flags |= (1 << 8); } SessionKnownCompletedBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setCommands(const SequenceSet& _commands); QPID_COMMON_EXTERN const SequenceSet& getCommands() const; QPID_COMMON_EXTERN bool hasCommands() const; QPID_COMMON_EXTERN void clearCommandsFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.knownCompleted(getCommands()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionKnownCompletedBody */ }} #endif /*!QPID_FRAMING_SESSIONKNOWNCOMPLETEDBODY_H*/ qpidc-0.16/src/qpid/framing/SessionKnownCompletedBody.cpp0000664000076400007640000000462711752725676024155 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionKnownCompletedBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionKnownCompletedBody::setCommands(const SequenceSet& _commands) { commands = _commands; flags |= (1 << 8); } const SequenceSet& SessionKnownCompletedBody::getCommands() const { return commands; } bool SessionKnownCompletedBody::hasCommands() const { return flags & (1 << 8); } void SessionKnownCompletedBody::clearCommandsFlag() { flags &= ~(1 << 8); } void SessionKnownCompletedBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) commands.encode(buffer); } void SessionKnownCompletedBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionKnownCompletedBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) commands.decode(buffer); } void SessionKnownCompletedBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionKnownCompletedBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += commands.encodedSize(); return total; } uint32_t SessionKnownCompletedBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionKnownCompletedBody::print(std::ostream& out) const { out << "{SessionKnownCompletedBody: "; if (flags & (1 << 8)) out << "commands=" << commands << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/DtxGetTimeoutBody.cpp0000664000076400007640000000444111752725676022420 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxGetTimeoutBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxGetTimeoutBody::setXid(const Xid& _xid) { xid = _xid; flags |= (1 << 8); } const Xid& DtxGetTimeoutBody::getXid() const { return xid; } bool DtxGetTimeoutBody::hasXid() const { return flags & (1 << 8); } void DtxGetTimeoutBody::clearXidFlag() { flags &= ~(1 << 8); } void DtxGetTimeoutBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) xid.encode(buffer); } void DtxGetTimeoutBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxGetTimeoutBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) xid.decode(buffer); } void DtxGetTimeoutBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxGetTimeoutBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += xid.encodedSize(); return total; } uint32_t DtxGetTimeoutBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxGetTimeoutBody::print(std::ostream& out) const { out << "{DtxGetTimeoutBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/DtxStartBody.h0000664000076400007640000000634411752725676021100 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXSTARTBODY_H #define QPID_FRAMING_DTXSTARTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include "qpid/framing/Xid.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxStartBody : public ModelMethod { Xid xid; uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0x2; DtxStartBody( ProtocolVersion, const Xid& _xid, bool _join, bool _resume) : xid(_xid), flags(0){ setJoin(_join); setResume(_resume); flags |= (1 << 8); } DtxStartBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setXid(const Xid& _xid); QPID_COMMON_EXTERN const Xid& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); QPID_COMMON_EXTERN void setJoin(bool _join); QPID_COMMON_EXTERN bool getJoin() const; QPID_COMMON_EXTERN void setResume(bool _resume); QPID_COMMON_EXTERN bool getResume() const; typedef XaResult ResultType; template ResultType invoke(T& invocable) const { return invocable.start(getXid(), getJoin(), getResume()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxStartBody */ }} #endif /*!QPID_FRAMING_DTXSTARTBODY_H*/ qpidc-0.16/src/qpid/framing/all_method_bodies.h0000664000076400007640000001622611752725677022143 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_ALL_METHOD_BODIES_H #define QPID_FRAMING_ALL_METHOD_BODIES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionStartBody.h" #include "qpid/framing/ConnectionStartOkBody.h" #include "qpid/framing/ConnectionSecureBody.h" #include "qpid/framing/ConnectionSecureOkBody.h" #include "qpid/framing/ConnectionTuneBody.h" #include "qpid/framing/ConnectionTuneOkBody.h" #include "qpid/framing/ConnectionOpenBody.h" #include "qpid/framing/ConnectionOpenOkBody.h" #include "qpid/framing/ConnectionRedirectBody.h" #include "qpid/framing/ConnectionHeartbeatBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/framing/SessionAttachBody.h" #include "qpid/framing/SessionAttachedBody.h" #include "qpid/framing/SessionDetachBody.h" #include "qpid/framing/SessionDetachedBody.h" #include "qpid/framing/SessionRequestTimeoutBody.h" #include "qpid/framing/SessionTimeoutBody.h" #include "qpid/framing/SessionCommandPointBody.h" #include "qpid/framing/SessionExpectedBody.h" #include "qpid/framing/SessionConfirmedBody.h" #include "qpid/framing/SessionCompletedBody.h" #include "qpid/framing/SessionKnownCompletedBody.h" #include "qpid/framing/SessionFlushBody.h" #include "qpid/framing/SessionGapBody.h" #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/ExecutionResultBody.h" #include "qpid/framing/ExecutionExceptionBody.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/MessageAcceptBody.h" #include "qpid/framing/MessageRejectBody.h" #include "qpid/framing/MessageReleaseBody.h" #include "qpid/framing/MessageAcquireBody.h" #include "qpid/framing/MessageResumeBody.h" #include "qpid/framing/MessageSubscribeBody.h" #include "qpid/framing/MessageCancelBody.h" #include "qpid/framing/MessageSetFlowModeBody.h" #include "qpid/framing/MessageFlowBody.h" #include "qpid/framing/MessageFlushBody.h" #include "qpid/framing/MessageStopBody.h" #include "qpid/framing/TxSelectBody.h" #include "qpid/framing/TxCommitBody.h" #include "qpid/framing/TxRollbackBody.h" #include "qpid/framing/DtxSelectBody.h" #include "qpid/framing/DtxStartBody.h" #include "qpid/framing/DtxEndBody.h" #include "qpid/framing/DtxCommitBody.h" #include "qpid/framing/DtxForgetBody.h" #include "qpid/framing/DtxGetTimeoutBody.h" #include "qpid/framing/DtxPrepareBody.h" #include "qpid/framing/DtxRecoverBody.h" #include "qpid/framing/DtxRollbackBody.h" #include "qpid/framing/DtxSetTimeoutBody.h" #include "qpid/framing/ExchangeDeclareBody.h" #include "qpid/framing/ExchangeDeleteBody.h" #include "qpid/framing/ExchangeQueryBody.h" #include "qpid/framing/ExchangeBindBody.h" #include "qpid/framing/ExchangeUnbindBody.h" #include "qpid/framing/ExchangeBoundBody.h" #include "qpid/framing/QueueDeclareBody.h" #include "qpid/framing/QueueDeleteBody.h" #include "qpid/framing/QueuePurgeBody.h" #include "qpid/framing/QueueQueryBody.h" #include "qpid/framing/FileQosBody.h" #include "qpid/framing/FileQosOkBody.h" #include "qpid/framing/FileConsumeBody.h" #include "qpid/framing/FileConsumeOkBody.h" #include "qpid/framing/FileCancelBody.h" #include "qpid/framing/FileOpenBody.h" #include "qpid/framing/FileOpenOkBody.h" #include "qpid/framing/FileStageBody.h" #include "qpid/framing/FilePublishBody.h" #include "qpid/framing/FileReturnBody.h" #include "qpid/framing/FileDeliverBody.h" #include "qpid/framing/FileAckBody.h" #include "qpid/framing/FileRejectBody.h" #include "qpid/framing/StreamQosBody.h" #include "qpid/framing/StreamQosOkBody.h" #include "qpid/framing/StreamConsumeBody.h" #include "qpid/framing/StreamConsumeOkBody.h" #include "qpid/framing/StreamCancelBody.h" #include "qpid/framing/StreamPublishBody.h" #include "qpid/framing/StreamReturnBody.h" #include "qpid/framing/StreamDeliverBody.h" #include "qpid/framing/ClusterUpdateRequestBody.h" #include "qpid/framing/ClusterUpdateOfferBody.h" #include "qpid/framing/ClusterRetractOfferBody.h" #include "qpid/framing/ClusterInitialStatusBody.h" #include "qpid/framing/ClusterReadyBody.h" #include "qpid/framing/ClusterConfigChangeBody.h" #include "qpid/framing/ClusterErrorCheckBody.h" #include "qpid/framing/ClusterTimerWakeupBody.h" #include "qpid/framing/ClusterTimerDropBody.h" #include "qpid/framing/ClusterShutdownBody.h" #include "qpid/framing/ClusterDeliverToQueueBody.h" #include "qpid/framing/ClusterClockBody.h" #include "qpid/framing/ClusterConnectionAnnounceBody.h" #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/ClusterConnectionDeliverDoOutputBody.h" #include "qpid/framing/ClusterConnectionAbortBody.h" #include "qpid/framing/ClusterConnectionShadowSetUserBody.h" #include "qpid/framing/ClusterConnectionShadowPrepareBody.h" #include "qpid/framing/ClusterConnectionConsumerStateBody.h" #include "qpid/framing/ClusterConnectionDeliveryRecordBody.h" #include "qpid/framing/ClusterConnectionTxStartBody.h" #include "qpid/framing/ClusterConnectionTxAcceptBody.h" #include "qpid/framing/ClusterConnectionTxDequeueBody.h" #include "qpid/framing/ClusterConnectionTxEnqueueBody.h" #include "qpid/framing/ClusterConnectionTxPublishBody.h" #include "qpid/framing/ClusterConnectionTxEndBody.h" #include "qpid/framing/ClusterConnectionAccumulatedAckBody.h" #include "qpid/framing/ClusterConnectionOutputTaskBody.h" #include "qpid/framing/ClusterConnectionDtxStartBody.h" #include "qpid/framing/ClusterConnectionDtxEndBody.h" #include "qpid/framing/ClusterConnectionDtxAckBody.h" #include "qpid/framing/ClusterConnectionDtxBufferRefBody.h" #include "qpid/framing/ClusterConnectionDtxWorkRecordBody.h" #include "qpid/framing/ClusterConnectionSessionStateBody.h" #include "qpid/framing/ClusterConnectionShadowReadyBody.h" #include "qpid/framing/ClusterConnectionMembershipBody.h" #include "qpid/framing/ClusterConnectionRetractOfferBody.h" #include "qpid/framing/ClusterConnectionQueuePositionBody.h" #include "qpid/framing/ClusterConnectionExchangeBody.h" #include "qpid/framing/ClusterConnectionAddQueueListenerBody.h" #include "qpid/framing/ClusterConnectionManagementSetupStateBody.h" #include "qpid/framing/ClusterConnectionConfigBody.h" #include "qpid/framing/ClusterConnectionQueueFairshareStateBody.h" #include "qpid/framing/ClusterConnectionQueueObserverStateBody.h" #include "qpid/framing/ClusterConnectionClockBody.h" #include "qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h" #endif /*!QPID_FRAMING_ALL_METHOD_BODIES_H*/ qpidc-0.16/src/qpid/framing/QueueQueryBody.h0000664000076400007640000000573011752725676021433 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_QUEUEQUERYBODY_H #define QPID_FRAMING_QUEUEQUERYBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN QueueQueryBody : public ModelMethod { std::string queue; uint16_t flags; public: static const ClassId CLASS_ID = 0x8; static const MethodId METHOD_ID = 0x4; QueueQueryBody( ProtocolVersion, const std::string& _queue) : queue(_queue), flags(0){ flags |= (1 << 8); } QueueQueryBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); typedef QueueQueryResult ResultType; template ResultType invoke(T& invocable) const { return invocable.query(getQueue()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class QueueQueryBody */ }} #endif /*!QPID_FRAMING_QUEUEQUERYBODY_H*/ qpidc-0.16/src/qpid/framing/FileCancelBody.h0000664000076400007640000000601211752725676021300 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILECANCELBODY_H #define QPID_FRAMING_FILECANCELBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileCancelBody : public ModelMethod { std::string consumerTag; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0x5; FileCancelBody( ProtocolVersion, const std::string& _consumerTag) : consumerTag(_consumerTag), flags(0){ flags |= (1 << 8); } FileCancelBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setConsumerTag(const std::string& _consumerTag); QPID_COMMON_EXTERN const std::string& getConsumerTag() const; QPID_COMMON_EXTERN bool hasConsumerTag() const; QPID_COMMON_EXTERN void clearConsumerTagFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.cancel(getConsumerTag()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileCancelBody */ }} #endif /*!QPID_FRAMING_FILECANCELBODY_H*/ qpidc-0.16/src/qpid/framing/AMQBody.cpp0000664000076400007640000000406510754607517020264 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQBody.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQHeaderBody.h" #include "qpid/framing/AMQContentBody.h" #include "qpid/framing/AMQHeartbeatBody.h" #include namespace qpid { namespace framing { std::ostream& operator<<(std::ostream& out, const AMQBody& body) { body.print(out); return out; } AMQBody::~AMQBody() {} namespace { struct MatchBodies : public AMQBodyConstVisitor { const AMQBody& body; bool match; MatchBodies(const AMQBody& b) : body(b), match(false) {} virtual ~MatchBodies() {} virtual void visit(const AMQHeaderBody&) { match=dynamic_cast(&body); } virtual void visit(const AMQContentBody&) { match=dynamic_cast(&body); } virtual void visit(const AMQHeartbeatBody&) { match=dynamic_cast(&body); } virtual void visit(const AMQMethodBody& x) { const AMQMethodBody* y=dynamic_cast(&body); match = (y && y->amqpMethodId() == x.amqpMethodId() && y->amqpClassId() == x.amqpClassId()); } }; } bool AMQBody::match(const AMQBody& a, const AMQBody& b) { MatchBodies matcher(a); b.accept(matcher); return matcher.match; } }} // namespace qpidc-0.16/src/qpid/framing/FileDeliverBody.cpp0000664000076400007640000001216611752725676022047 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileDeliverBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileDeliverBody::setConsumerTag(const std::string& _consumerTag) { consumerTag = _consumerTag; flags |= (1 << 8); } const std::string& FileDeliverBody::getConsumerTag() const { return consumerTag; } bool FileDeliverBody::hasConsumerTag() const { return flags & (1 << 8); } void FileDeliverBody::clearConsumerTagFlag() { flags &= ~(1 << 8); } void FileDeliverBody::setDeliveryTag(uint64_t _deliveryTag) { deliveryTag = _deliveryTag; flags |= (1 << 9); } uint64_t FileDeliverBody::getDeliveryTag() const { return deliveryTag; } bool FileDeliverBody::hasDeliveryTag() const { return flags & (1 << 9); } void FileDeliverBody::clearDeliveryTagFlag() { flags &= ~(1 << 9); } void FileDeliverBody::setRedelivered(bool _redelivered) { if (_redelivered) flags |= (1 << 10); else flags &= ~(1 << 10); } bool FileDeliverBody::getRedelivered() const { return flags & (1 << 10); } void FileDeliverBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 11); } const std::string& FileDeliverBody::getExchange() const { return exchange; } bool FileDeliverBody::hasExchange() const { return flags & (1 << 11); } void FileDeliverBody::clearExchangeFlag() { flags &= ~(1 << 11); } void FileDeliverBody::setRoutingKey(const std::string& _routingKey) { routingKey = _routingKey; flags |= (1 << 12); } const std::string& FileDeliverBody::getRoutingKey() const { return routingKey; } bool FileDeliverBody::hasRoutingKey() const { return flags & (1 << 12); } void FileDeliverBody::clearRoutingKeyFlag() { flags &= ~(1 << 12); } void FileDeliverBody::setIdentifier(const std::string& _identifier) { identifier = _identifier; flags |= (1 << 13); } const std::string& FileDeliverBody::getIdentifier() const { return identifier; } bool FileDeliverBody::hasIdentifier() const { return flags & (1 << 13); } void FileDeliverBody::clearIdentifierFlag() { flags &= ~(1 << 13); } void FileDeliverBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(consumerTag); if (flags & (1 << 9)) buffer.putLongLong(deliveryTag); if (flags & (1 << 11)) buffer.putShortString(exchange); if (flags & (1 << 12)) buffer.putShortString(routingKey); if (flags & (1 << 13)) buffer.putShortString(identifier); } void FileDeliverBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileDeliverBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(consumerTag); if (flags & (1 << 9)) deliveryTag = buffer.getLongLong(); if (flags & (1 << 11)) buffer.getShortString(exchange); if (flags & (1 << 12)) buffer.getShortString(routingKey); if (flags & (1 << 13)) buffer.getShortString(identifier); } void FileDeliverBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileDeliverBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + consumerTag.size(); if (flags & (1 << 9)) total += 8;//deliveryTag if (flags & (1 << 11)) total += 1 + exchange.size(); if (flags & (1 << 12)) total += 1 + routingKey.size(); if (flags & (1 << 13)) total += 1 + identifier.size(); return total; } uint32_t FileDeliverBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileDeliverBody::print(std::ostream& out) const { out << "{FileDeliverBody: "; if (flags & (1 << 8)) out << "consumer-tag=" << consumerTag << "; "; if (flags & (1 << 9)) out << "delivery-tag=" << deliveryTag << "; "; if (flags & (1 << 10)) out << "redelivered=" << getRedelivered() << "; "; if (flags & (1 << 11)) out << "exchange=" << exchange << "; "; if (flags & (1 << 12)) out << "routing-key=" << routingKey << "; "; if (flags & (1 << 13)) out << "identifier=" << identifier << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionAddQueueListenerBody.cpp0000664000076400007640000000635111752725676026441 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionAddQueueListenerBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionAddQueueListenerBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ClusterConnectionAddQueueListenerBody::getQueue() const { return queue; } bool ClusterConnectionAddQueueListenerBody::hasQueue() const { return flags & (1 << 8); } void ClusterConnectionAddQueueListenerBody::clearQueueFlag() { flags &= ~(1 << 8); } void ClusterConnectionAddQueueListenerBody::setConsumer(uint32_t _consumer) { consumer = _consumer; flags |= (1 << 9); } uint32_t ClusterConnectionAddQueueListenerBody::getConsumer() const { return consumer; } bool ClusterConnectionAddQueueListenerBody::hasConsumer() const { return flags & (1 << 9); } void ClusterConnectionAddQueueListenerBody::clearConsumerFlag() { flags &= ~(1 << 9); } void ClusterConnectionAddQueueListenerBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putLong(consumer); } void ClusterConnectionAddQueueListenerBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionAddQueueListenerBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) consumer = buffer.getLong(); } void ClusterConnectionAddQueueListenerBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionAddQueueListenerBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 4;//consumer return total; } uint32_t ClusterConnectionAddQueueListenerBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionAddQueueListenerBody::print(std::ostream& out) const { out << "{ClusterConnectionAddQueueListenerBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "consumer=" << consumer << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionDeliverCloseBody.h0000664000076400007640000000527011752725676025262 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONDELIVERCLOSEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONDELIVERCLOSEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionDeliverCloseBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x2; ClusterConnectionDeliverCloseBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.deliverClose(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionDeliverCloseBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONDELIVERCLOSEBODY_H*/ qpidc-0.16/src/qpid/framing/MethodBodyDefaultVisitor.h0000664000076400007640000002526411752725700023416 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_METHODBODYDEFAULTVISITOR_H #define QPID_FRAMING_METHODBODYDEFAULTVISITOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class AMQMethodBody; class QPID_COMMON_CLASS_EXTERN MethodBodyDefaultVisitor: public MethodBodyConstVisitor { public: virtual void defaultVisit(const AMQMethodBody&) = 0; QPID_COMMON_EXTERN virtual void visit(const ConnectionStartBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionStartOkBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionSecureBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionSecureOkBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionTuneBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionTuneOkBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionOpenBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionOpenOkBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionRedirectBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionHeartbeatBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionCloseBody&); QPID_COMMON_EXTERN virtual void visit(const ConnectionCloseOkBody&); QPID_COMMON_EXTERN virtual void visit(const SessionAttachBody&); QPID_COMMON_EXTERN virtual void visit(const SessionAttachedBody&); QPID_COMMON_EXTERN virtual void visit(const SessionDetachBody&); QPID_COMMON_EXTERN virtual void visit(const SessionDetachedBody&); QPID_COMMON_EXTERN virtual void visit(const SessionRequestTimeoutBody&); QPID_COMMON_EXTERN virtual void visit(const SessionTimeoutBody&); QPID_COMMON_EXTERN virtual void visit(const SessionCommandPointBody&); QPID_COMMON_EXTERN virtual void visit(const SessionExpectedBody&); QPID_COMMON_EXTERN virtual void visit(const SessionConfirmedBody&); QPID_COMMON_EXTERN virtual void visit(const SessionCompletedBody&); QPID_COMMON_EXTERN virtual void visit(const SessionKnownCompletedBody&); QPID_COMMON_EXTERN virtual void visit(const SessionFlushBody&); QPID_COMMON_EXTERN virtual void visit(const SessionGapBody&); QPID_COMMON_EXTERN virtual void visit(const ExecutionSyncBody&); QPID_COMMON_EXTERN virtual void visit(const ExecutionResultBody&); QPID_COMMON_EXTERN virtual void visit(const ExecutionExceptionBody&); QPID_COMMON_EXTERN virtual void visit(const MessageTransferBody&); QPID_COMMON_EXTERN virtual void visit(const MessageAcceptBody&); QPID_COMMON_EXTERN virtual void visit(const MessageRejectBody&); QPID_COMMON_EXTERN virtual void visit(const MessageReleaseBody&); QPID_COMMON_EXTERN virtual void visit(const MessageAcquireBody&); QPID_COMMON_EXTERN virtual void visit(const MessageResumeBody&); QPID_COMMON_EXTERN virtual void visit(const MessageSubscribeBody&); QPID_COMMON_EXTERN virtual void visit(const MessageCancelBody&); QPID_COMMON_EXTERN virtual void visit(const MessageSetFlowModeBody&); QPID_COMMON_EXTERN virtual void visit(const MessageFlowBody&); QPID_COMMON_EXTERN virtual void visit(const MessageFlushBody&); QPID_COMMON_EXTERN virtual void visit(const MessageStopBody&); QPID_COMMON_EXTERN virtual void visit(const TxSelectBody&); QPID_COMMON_EXTERN virtual void visit(const TxCommitBody&); QPID_COMMON_EXTERN virtual void visit(const TxRollbackBody&); QPID_COMMON_EXTERN virtual void visit(const DtxSelectBody&); QPID_COMMON_EXTERN virtual void visit(const DtxStartBody&); QPID_COMMON_EXTERN virtual void visit(const DtxEndBody&); QPID_COMMON_EXTERN virtual void visit(const DtxCommitBody&); QPID_COMMON_EXTERN virtual void visit(const DtxForgetBody&); QPID_COMMON_EXTERN virtual void visit(const DtxGetTimeoutBody&); QPID_COMMON_EXTERN virtual void visit(const DtxPrepareBody&); QPID_COMMON_EXTERN virtual void visit(const DtxRecoverBody&); QPID_COMMON_EXTERN virtual void visit(const DtxRollbackBody&); QPID_COMMON_EXTERN virtual void visit(const DtxSetTimeoutBody&); QPID_COMMON_EXTERN virtual void visit(const ExchangeDeclareBody&); QPID_COMMON_EXTERN virtual void visit(const ExchangeDeleteBody&); QPID_COMMON_EXTERN virtual void visit(const ExchangeQueryBody&); QPID_COMMON_EXTERN virtual void visit(const ExchangeBindBody&); QPID_COMMON_EXTERN virtual void visit(const ExchangeUnbindBody&); QPID_COMMON_EXTERN virtual void visit(const ExchangeBoundBody&); QPID_COMMON_EXTERN virtual void visit(const QueueDeclareBody&); QPID_COMMON_EXTERN virtual void visit(const QueueDeleteBody&); QPID_COMMON_EXTERN virtual void visit(const QueuePurgeBody&); QPID_COMMON_EXTERN virtual void visit(const QueueQueryBody&); QPID_COMMON_EXTERN virtual void visit(const FileQosBody&); QPID_COMMON_EXTERN virtual void visit(const FileQosOkBody&); QPID_COMMON_EXTERN virtual void visit(const FileConsumeBody&); QPID_COMMON_EXTERN virtual void visit(const FileConsumeOkBody&); QPID_COMMON_EXTERN virtual void visit(const FileCancelBody&); QPID_COMMON_EXTERN virtual void visit(const FileOpenBody&); QPID_COMMON_EXTERN virtual void visit(const FileOpenOkBody&); QPID_COMMON_EXTERN virtual void visit(const FileStageBody&); QPID_COMMON_EXTERN virtual void visit(const FilePublishBody&); QPID_COMMON_EXTERN virtual void visit(const FileReturnBody&); QPID_COMMON_EXTERN virtual void visit(const FileDeliverBody&); QPID_COMMON_EXTERN virtual void visit(const FileAckBody&); QPID_COMMON_EXTERN virtual void visit(const FileRejectBody&); QPID_COMMON_EXTERN virtual void visit(const StreamQosBody&); QPID_COMMON_EXTERN virtual void visit(const StreamQosOkBody&); QPID_COMMON_EXTERN virtual void visit(const StreamConsumeBody&); QPID_COMMON_EXTERN virtual void visit(const StreamConsumeOkBody&); QPID_COMMON_EXTERN virtual void visit(const StreamCancelBody&); QPID_COMMON_EXTERN virtual void visit(const StreamPublishBody&); QPID_COMMON_EXTERN virtual void visit(const StreamReturnBody&); QPID_COMMON_EXTERN virtual void visit(const StreamDeliverBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterUpdateRequestBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterUpdateOfferBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterRetractOfferBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterInitialStatusBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterReadyBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConfigChangeBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterErrorCheckBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterTimerWakeupBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterTimerDropBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterShutdownBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterDeliverToQueueBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterClockBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionAnnounceBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionDeliverCloseBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionDeliverDoOutputBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionAbortBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionShadowSetUserBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionShadowPrepareBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionConsumerStateBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionDeliveryRecordBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionTxStartBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionTxAcceptBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionTxDequeueBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionTxEnqueueBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionTxPublishBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionTxEndBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionAccumulatedAckBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionOutputTaskBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionDtxStartBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionDtxEndBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionDtxAckBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionDtxBufferRefBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionDtxWorkRecordBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionSessionStateBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionShadowReadyBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionMembershipBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionRetractOfferBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionQueuePositionBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionExchangeBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionAddQueueListenerBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionManagementSetupStateBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionConfigBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionQueueFairshareStateBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionQueueObserverStateBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionClockBody&); QPID_COMMON_EXTERN virtual void visit(const ClusterConnectionQueueDequeueSincePurgeStateBody&); }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_METHODBODYDEFAULTVISITOR_H*/ qpidc-0.16/src/qpid/framing/ExchangeQueryBody.h0000664000076400007640000000574611752725676022100 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXCHANGEQUERYBODY_H #define QPID_FRAMING_EXCHANGEQUERYBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExchangeQueryBody : public ModelMethod { std::string name; uint16_t flags; public: static const ClassId CLASS_ID = 0x7; static const MethodId METHOD_ID = 0x3; ExchangeQueryBody( ProtocolVersion, const std::string& _name) : name(_name), flags(0){ flags |= (1 << 8); } ExchangeQueryBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setName(const std::string& _name); QPID_COMMON_EXTERN const std::string& getName() const; QPID_COMMON_EXTERN bool hasName() const; QPID_COMMON_EXTERN void clearNameFlag(); typedef ExchangeQueryResult ResultType; template ResultType invoke(T& invocable) const { return invocable.query(getName()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExchangeQueryBody */ }} #endif /*!QPID_FRAMING_EXCHANGEQUERYBODY_H*/ qpidc-0.16/src/qpid/framing/FileReturnBody.cpp0000664000076400007640000001020011752725676021717 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileReturnBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileReturnBody::setReplyCode(uint16_t _replyCode) { replyCode = _replyCode; flags |= (1 << 8); } uint16_t FileReturnBody::getReplyCode() const { return replyCode; } bool FileReturnBody::hasReplyCode() const { return flags & (1 << 8); } void FileReturnBody::clearReplyCodeFlag() { flags &= ~(1 << 8); } void FileReturnBody::setReplyText(const std::string& _replyText) { replyText = _replyText; flags |= (1 << 9); } const std::string& FileReturnBody::getReplyText() const { return replyText; } bool FileReturnBody::hasReplyText() const { return flags & (1 << 9); } void FileReturnBody::clearReplyTextFlag() { flags &= ~(1 << 9); } void FileReturnBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 10); } const std::string& FileReturnBody::getExchange() const { return exchange; } bool FileReturnBody::hasExchange() const { return flags & (1 << 10); } void FileReturnBody::clearExchangeFlag() { flags &= ~(1 << 10); } void FileReturnBody::setRoutingKey(const std::string& _routingKey) { routingKey = _routingKey; flags |= (1 << 11); } const std::string& FileReturnBody::getRoutingKey() const { return routingKey; } bool FileReturnBody::hasRoutingKey() const { return flags & (1 << 11); } void FileReturnBody::clearRoutingKeyFlag() { flags &= ~(1 << 11); } void FileReturnBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShort(replyCode); if (flags & (1 << 9)) buffer.putShortString(replyText); if (flags & (1 << 10)) buffer.putShortString(exchange); if (flags & (1 << 11)) buffer.putShortString(routingKey); } void FileReturnBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileReturnBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) replyCode = buffer.getShort(); if (flags & (1 << 9)) buffer.getShortString(replyText); if (flags & (1 << 10)) buffer.getShortString(exchange); if (flags & (1 << 11)) buffer.getShortString(routingKey); } void FileReturnBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileReturnBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2;//replyCode if (flags & (1 << 9)) total += 1 + replyText.size(); if (flags & (1 << 10)) total += 1 + exchange.size(); if (flags & (1 << 11)) total += 1 + routingKey.size(); return total; } uint32_t FileReturnBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileReturnBody::print(std::ostream& out) const { out << "{FileReturnBody: "; if (flags & (1 << 8)) out << "reply-code=" << replyCode << "; "; if (flags & (1 << 9)) out << "reply-text=" << replyText << "; "; if (flags & (1 << 10)) out << "exchange=" << exchange << "; "; if (flags & (1 << 11)) out << "routing-key=" << routingKey << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionSecureBody.cpp0000664000076400007640000000455611752725676023127 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionSecureBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionSecureBody::setChallenge(const std::string& _challenge) { challenge = _challenge; flags |= (1 << 8); } const std::string& ConnectionSecureBody::getChallenge() const { return challenge; } bool ConnectionSecureBody::hasChallenge() const { return flags & (1 << 8); } void ConnectionSecureBody::clearChallengeFlag() { flags &= ~(1 << 8); } void ConnectionSecureBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongString(challenge); } void ConnectionSecureBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionSecureBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getLongString(challenge); } void ConnectionSecureBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionSecureBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 4 + challenge.size(); return total; } uint32_t ConnectionSecureBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionSecureBody::print(std::ostream& out) const { out << "{ConnectionSecureBody: "; if (flags & (1 << 8)) out << "challenge=" << challenge << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/DtxEndBody.h0000664000076400007640000000633311752725676020507 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXENDBODY_H #define QPID_FRAMING_DTXENDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include "qpid/framing/Xid.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxEndBody : public ModelMethod { Xid xid; uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0x3; DtxEndBody( ProtocolVersion, const Xid& _xid, bool _fail, bool _suspend) : xid(_xid), flags(0){ setFail(_fail); setSuspend(_suspend); flags |= (1 << 8); } DtxEndBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setXid(const Xid& _xid); QPID_COMMON_EXTERN const Xid& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); QPID_COMMON_EXTERN void setFail(bool _fail); QPID_COMMON_EXTERN bool getFail() const; QPID_COMMON_EXTERN void setSuspend(bool _suspend); QPID_COMMON_EXTERN bool getSuspend() const; typedef XaResult ResultType; template ResultType invoke(T& invocable) const { return invocable.end(getXid(), getFail(), getSuspend()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxEndBody */ }} #endif /*!QPID_FRAMING_DTXENDBODY_H*/ qpidc-0.16/src/qpid/framing/AMQMethodBody.h0000664000076400007640000000433011227113407021047 0ustar00jrossjross00000000000000#ifndef _AMQMethodBody_ #define _AMQMethodBody_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/ProtocolVersion.h" #include "qpid/CommonImportExport.h" #include #include #include namespace qpid { namespace framing { class Buffer; class AMQP_ServerOperations; class MethodBodyConstVisitor; class AMQMethodBody : public AMQBody { public: AMQMethodBody() {} QPID_COMMON_EXTERN virtual ~AMQMethodBody(); virtual void accept(MethodBodyConstVisitor&) const = 0; virtual MethodId amqpMethodId() const = 0; virtual ClassId amqpClassId() const = 0; virtual bool isContentBearing() const = 0; virtual bool resultExpected() const = 0; virtual bool responseExpected() const = 0; template bool isA() const { return amqpClassId()==T::CLASS_ID && amqpMethodId()==T::METHOD_ID; } virtual uint32_t encodedSize() const = 0; virtual uint8_t type() const { return METHOD_BODY; } virtual bool isSync() const { return false; /*only ModelMethods can have the sync flag set*/ } virtual void setSync(bool) const { /*only ModelMethods can have the sync flag set*/ } AMQMethodBody* getMethod() { return this; } const AMQMethodBody* getMethod() const { return this; } void accept(AMQBodyConstVisitor& v) const { v.visit(*this); } }; }} // namespace qpid::framing #endif qpidc-0.16/src/qpid/framing/MessageCancelBody.cpp0000664000076400007640000000464611752725676022353 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageCancelBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageCancelBody::setDestination(const std::string& _destination) { destination = _destination; flags |= (1 << 8); } const std::string& MessageCancelBody::getDestination() const { return destination; } bool MessageCancelBody::hasDestination() const { return flags & (1 << 8); } void MessageCancelBody::clearDestinationFlag() { flags &= ~(1 << 8); } void MessageCancelBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(destination); } void MessageCancelBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageCancelBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(destination); } void MessageCancelBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageCancelBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + destination.size(); return total; } uint32_t MessageCancelBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageCancelBody::print(std::ostream& out) const { out << "{MessageCancelBody: "; if (flags & (1 << 8)) out << "destination=" << destination << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/StreamConsumeBody.h0000664000076400007640000001043611752725676022105 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_STREAMCONSUMEBODY_H #define QPID_FRAMING_STREAMCONSUMEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StreamConsumeBody : public ModelMethod { std::string queue; std::string consumerTag; FieldTable arguments; uint16_t flags; public: static const ClassId CLASS_ID = 0xa; static const MethodId METHOD_ID = 0x3; StreamConsumeBody( ProtocolVersion, const std::string& _queue, const std::string& _consumerTag, bool _noLocal, bool _exclusive, bool _nowait, const FieldTable& _arguments) : queue(_queue), consumerTag(_consumerTag), arguments(_arguments), flags(0){ setNoLocal(_noLocal); setExclusive(_exclusive); setNowait(_nowait); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 13); } StreamConsumeBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setConsumerTag(const std::string& _consumerTag); QPID_COMMON_EXTERN const std::string& getConsumerTag() const; QPID_COMMON_EXTERN bool hasConsumerTag() const; QPID_COMMON_EXTERN void clearConsumerTagFlag(); QPID_COMMON_EXTERN void setNoLocal(bool _noLocal); QPID_COMMON_EXTERN bool getNoLocal() const; QPID_COMMON_EXTERN void setExclusive(bool _exclusive); QPID_COMMON_EXTERN bool getExclusive() const; QPID_COMMON_EXTERN void setNowait(bool _nowait); QPID_COMMON_EXTERN bool getNowait() const; QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments); QPID_COMMON_EXTERN const FieldTable& getArguments() const; QPID_COMMON_EXTERN FieldTable& getArguments(); QPID_COMMON_EXTERN bool hasArguments() const; QPID_COMMON_EXTERN void clearArgumentsFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.consume(getQueue(), getConsumerTag(), getNoLocal(), getExclusive(), getNowait(), getArguments()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class StreamConsumeBody */ }} #endif /*!QPID_FRAMING_STREAMCONSUMEBODY_H*/ qpidc-0.16/src/qpid/framing/FileConsumeBody.h0000664000076400007640000001065411752725676021533 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILECONSUMEBODY_H #define QPID_FRAMING_FILECONSUMEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileConsumeBody : public ModelMethod { std::string queue; std::string consumerTag; FieldTable arguments; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0x3; FileConsumeBody( ProtocolVersion, const std::string& _queue, const std::string& _consumerTag, bool _noLocal, bool _noAck, bool _exclusive, bool _nowait, const FieldTable& _arguments) : queue(_queue), consumerTag(_consumerTag), arguments(_arguments), flags(0){ setNoLocal(_noLocal); setNoAck(_noAck); setExclusive(_exclusive); setNowait(_nowait); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 14); } FileConsumeBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setConsumerTag(const std::string& _consumerTag); QPID_COMMON_EXTERN const std::string& getConsumerTag() const; QPID_COMMON_EXTERN bool hasConsumerTag() const; QPID_COMMON_EXTERN void clearConsumerTagFlag(); QPID_COMMON_EXTERN void setNoLocal(bool _noLocal); QPID_COMMON_EXTERN bool getNoLocal() const; QPID_COMMON_EXTERN void setNoAck(bool _noAck); QPID_COMMON_EXTERN bool getNoAck() const; QPID_COMMON_EXTERN void setExclusive(bool _exclusive); QPID_COMMON_EXTERN bool getExclusive() const; QPID_COMMON_EXTERN void setNowait(bool _nowait); QPID_COMMON_EXTERN bool getNowait() const; QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments); QPID_COMMON_EXTERN const FieldTable& getArguments() const; QPID_COMMON_EXTERN FieldTable& getArguments(); QPID_COMMON_EXTERN bool hasArguments() const; QPID_COMMON_EXTERN void clearArgumentsFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.consume(getQueue(), getConsumerTag(), getNoLocal(), getNoAck(), getExclusive(), getNowait(), getArguments()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileConsumeBody */ }} #endif /*!QPID_FRAMING_FILECONSUMEBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionDtxBufferRefBody.h0000664000076400007640000000707111752725676025231 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONDTXBUFFERREFBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONDTXBUFFERREFBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionDtxBufferRefBody : public ModelMethod { std::string xid; uint32_t index; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x1D; ClusterConnectionDtxBufferRefBody( ProtocolVersion, const std::string& _xid, uint32_t _index, bool _suspended) : xid(_xid), index(_index), flags(0){ setSuspended(_suspended); flags |= (1 << 8); flags |= (1 << 9); } ClusterConnectionDtxBufferRefBody(ProtocolVersion=ProtocolVersion()) : index(0), flags(0) {} QPID_COMMON_EXTERN void setXid(const std::string& _xid); QPID_COMMON_EXTERN const std::string& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); QPID_COMMON_EXTERN void setIndex(uint32_t _index); QPID_COMMON_EXTERN uint32_t getIndex() const; QPID_COMMON_EXTERN bool hasIndex() const; QPID_COMMON_EXTERN void clearIndexFlag(); QPID_COMMON_EXTERN void setSuspended(bool _suspended); QPID_COMMON_EXTERN bool getSuspended() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.dtxBufferRef(getXid(), getIndex(), getSuspended()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionDtxBufferRefBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONDTXBUFFERREFBODY_H*/ qpidc-0.16/src/qpid/framing/ConnectionOpenOkBody.h0000664000076400007640000000605411752725676022534 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONOPENOKBODY_H #define QPID_FRAMING_CONNECTIONOPENOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionOpenOkBody : public AMQMethodBody { Array knownHosts; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0x8; ConnectionOpenOkBody( ProtocolVersion, const Array& _knownHosts) : knownHosts(_knownHosts), flags(0){ flags |= (1 << 8); } ConnectionOpenOkBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setKnownHosts(const Array& _knownHosts); QPID_COMMON_EXTERN const Array& getKnownHosts() const; QPID_COMMON_EXTERN bool hasKnownHosts() const; QPID_COMMON_EXTERN void clearKnownHostsFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.openOk(getKnownHosts()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionOpenOkBody */ }} #endif /*!QPID_FRAMING_CONNECTIONOPENOKBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionTxStartBody.h0000664000076400007640000000522611752725676024314 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONTXSTARTBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONTXSTARTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionTxStartBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x12; ClusterConnectionTxStartBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.txStart(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionTxStartBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONTXSTARTBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterReadyBody.h0000664000076400007640000000571111752725676021726 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERREADYBODY_H #define QPID_FRAMING_CLUSTERREADYBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterReadyBody : public ModelMethod { std::string url; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x10; ClusterReadyBody( ProtocolVersion, const std::string& _url) : url(_url), flags(0){ flags |= (1 << 8); } ClusterReadyBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setUrl(const std::string& _url); QPID_COMMON_EXTERN const std::string& getUrl() const; QPID_COMMON_EXTERN bool hasUrl() const; QPID_COMMON_EXTERN void clearUrlFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.ready(getUrl()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterReadyBody */ }} #endif /*!QPID_FRAMING_CLUSTERREADYBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionRetractOfferBody.cpp0000664000076400007640000000365311752725676025626 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionRetractOfferBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionRetractOfferBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void ClusterConnectionRetractOfferBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionRetractOfferBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void ClusterConnectionRetractOfferBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionRetractOfferBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t ClusterConnectionRetractOfferBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionRetractOfferBody::print(std::ostream& out) const { out << "{ClusterConnectionRetractOfferBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionManagementSetupStateBody.h0000664000076400007640000001167511752725676027006 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONMANAGEMENTSETUPSTATEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONMANAGEMENTSETUPSTATEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionManagementSetupStateBody : public ModelMethod { uint64_t objectNum; uint16_t bootSequence; Uuid brokerId; std::string vendor; std::string product; std::string instance; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x36; ClusterConnectionManagementSetupStateBody( ProtocolVersion, uint64_t _objectNum, uint16_t _bootSequence, const Uuid& _brokerId, const std::string& _vendor, const std::string& _product, const std::string& _instance) : objectNum(_objectNum), bootSequence(_bootSequence), brokerId(_brokerId), vendor(_vendor), product(_product), instance(_instance), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); } ClusterConnectionManagementSetupStateBody(ProtocolVersion=ProtocolVersion()) : objectNum(0), bootSequence(0), flags(0) {} QPID_COMMON_EXTERN void setObjectNum(uint64_t _objectNum); QPID_COMMON_EXTERN uint64_t getObjectNum() const; QPID_COMMON_EXTERN bool hasObjectNum() const; QPID_COMMON_EXTERN void clearObjectNumFlag(); QPID_COMMON_EXTERN void setBootSequence(uint16_t _bootSequence); QPID_COMMON_EXTERN uint16_t getBootSequence() const; QPID_COMMON_EXTERN bool hasBootSequence() const; QPID_COMMON_EXTERN void clearBootSequenceFlag(); QPID_COMMON_EXTERN void setBrokerId(const Uuid& _brokerId); QPID_COMMON_EXTERN const Uuid& getBrokerId() const; QPID_COMMON_EXTERN bool hasBrokerId() const; QPID_COMMON_EXTERN void clearBrokerIdFlag(); QPID_COMMON_EXTERN void setVendor(const std::string& _vendor); QPID_COMMON_EXTERN const std::string& getVendor() const; QPID_COMMON_EXTERN bool hasVendor() const; QPID_COMMON_EXTERN void clearVendorFlag(); QPID_COMMON_EXTERN void setProduct(const std::string& _product); QPID_COMMON_EXTERN const std::string& getProduct() const; QPID_COMMON_EXTERN bool hasProduct() const; QPID_COMMON_EXTERN void clearProductFlag(); QPID_COMMON_EXTERN void setInstance(const std::string& _instance); QPID_COMMON_EXTERN const std::string& getInstance() const; QPID_COMMON_EXTERN bool hasInstance() const; QPID_COMMON_EXTERN void clearInstanceFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.managementSetupState(getObjectNum(), getBootSequence(), getBrokerId(), getVendor(), getProduct(), getInstance()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionManagementSetupStateBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONMANAGEMENTSETUPSTATEBODY_H*/ qpidc-0.16/src/qpid/framing/StreamConsumeBody.cpp0000664000076400007640000001075211752725676022441 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/StreamConsumeBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void StreamConsumeBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& StreamConsumeBody::getQueue() const { return queue; } bool StreamConsumeBody::hasQueue() const { return flags & (1 << 8); } void StreamConsumeBody::clearQueueFlag() { flags &= ~(1 << 8); } void StreamConsumeBody::setConsumerTag(const std::string& _consumerTag) { consumerTag = _consumerTag; flags |= (1 << 9); } const std::string& StreamConsumeBody::getConsumerTag() const { return consumerTag; } bool StreamConsumeBody::hasConsumerTag() const { return flags & (1 << 9); } void StreamConsumeBody::clearConsumerTagFlag() { flags &= ~(1 << 9); } void StreamConsumeBody::setNoLocal(bool _noLocal) { if (_noLocal) flags |= (1 << 10); else flags &= ~(1 << 10); } bool StreamConsumeBody::getNoLocal() const { return flags & (1 << 10); } void StreamConsumeBody::setExclusive(bool _exclusive) { if (_exclusive) flags |= (1 << 11); else flags &= ~(1 << 11); } bool StreamConsumeBody::getExclusive() const { return flags & (1 << 11); } void StreamConsumeBody::setNowait(bool _nowait) { if (_nowait) flags |= (1 << 12); else flags &= ~(1 << 12); } bool StreamConsumeBody::getNowait() const { return flags & (1 << 12); } void StreamConsumeBody::setArguments(const FieldTable& _arguments) { arguments = _arguments; flags |= (1 << 13); } const FieldTable& StreamConsumeBody::getArguments() const { return arguments; } FieldTable& StreamConsumeBody::getArguments() { flags |= (1 << 13); return arguments; } bool StreamConsumeBody::hasArguments() const { return flags & (1 << 13); } void StreamConsumeBody::clearArgumentsFlag() { flags &= ~(1 << 13); } void StreamConsumeBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putShortString(consumerTag); if (flags & (1 << 13)) arguments.encode(buffer); } void StreamConsumeBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void StreamConsumeBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) buffer.getShortString(consumerTag); if (flags & (1 << 13)) arguments.decode(buffer); } void StreamConsumeBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t StreamConsumeBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 1 + consumerTag.size(); if (flags & (1 << 13)) total += arguments.encodedSize(); return total; } uint32_t StreamConsumeBody::encodedSize() const { uint32_t total = bodySize(); return total; } void StreamConsumeBody::print(std::ostream& out) const { out << "{StreamConsumeBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "consumer-tag=" << consumerTag << "; "; if (flags & (1 << 10)) out << "no-local=" << getNoLocal() << "; "; if (flags & (1 << 11)) out << "exclusive=" << getExclusive() << "; "; if (flags & (1 << 12)) out << "nowait=" << getNowait() << "; "; if (flags & (1 << 13)) out << "arguments=" << arguments << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterReadyBody.cpp0000664000076400007640000000446311752725676022264 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterReadyBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterReadyBody::setUrl(const std::string& _url) { url = _url; flags |= (1 << 8); } const std::string& ClusterReadyBody::getUrl() const { return url; } bool ClusterReadyBody::hasUrl() const { return flags & (1 << 8); } void ClusterReadyBody::clearUrlFlag() { flags &= ~(1 << 8); } void ClusterReadyBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(url); } void ClusterReadyBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterReadyBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(url); } void ClusterReadyBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterReadyBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + url.size(); return total; } uint32_t ClusterReadyBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterReadyBody::print(std::ostream& out) const { out << "{ClusterReadyBody: "; if (flags & (1 << 8)) out << "url=" << url << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionCloseBody.h0000664000076400007640000000662711752725676022414 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONCLOSEBODY_H #define QPID_FRAMING_CONNECTIONCLOSEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionCloseBody : public AMQMethodBody { uint16_t replyCode; std::string replyText; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0xb; ConnectionCloseBody( ProtocolVersion, uint16_t _replyCode, const std::string& _replyText) : replyCode(_replyCode), replyText(_replyText), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ConnectionCloseBody(ProtocolVersion=ProtocolVersion()) : replyCode(0), flags(0) {} QPID_COMMON_EXTERN void setReplyCode(uint16_t _replyCode); QPID_COMMON_EXTERN uint16_t getReplyCode() const; QPID_COMMON_EXTERN bool hasReplyCode() const; QPID_COMMON_EXTERN void clearReplyCodeFlag(); QPID_COMMON_EXTERN void setReplyText(const std::string& _replyText); QPID_COMMON_EXTERN const std::string& getReplyText() const; QPID_COMMON_EXTERN bool hasReplyText() const; QPID_COMMON_EXTERN void clearReplyTextFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.close(getReplyCode(), getReplyText()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionCloseBody */ }} #endif /*!QPID_FRAMING_CONNECTIONCLOSEBODY_H*/ qpidc-0.16/src/qpid/framing/FileConsumeOkBody.cpp0000664000076400007640000000464711752725676022365 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileConsumeOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileConsumeOkBody::setConsumerTag(const std::string& _consumerTag) { consumerTag = _consumerTag; flags |= (1 << 8); } const std::string& FileConsumeOkBody::getConsumerTag() const { return consumerTag; } bool FileConsumeOkBody::hasConsumerTag() const { return flags & (1 << 8); } void FileConsumeOkBody::clearConsumerTagFlag() { flags &= ~(1 << 8); } void FileConsumeOkBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(consumerTag); } void FileConsumeOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileConsumeOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(consumerTag); } void FileConsumeOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileConsumeOkBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + consumerTag.size(); return total; } uint32_t FileConsumeOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileConsumeOkBody::print(std::ostream& out) const { out << "{FileConsumeOkBody: "; if (flags & (1 << 8)) out << "consumer-tag=" << consumerTag << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ExchangeBoundBody.h0000664000076400007640000001021411752725676022024 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXCHANGEBOUNDBODY_H #define QPID_FRAMING_EXCHANGEBOUNDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExchangeBoundBody : public ModelMethod { std::string exchange; std::string queue; std::string bindingKey; FieldTable arguments; uint16_t flags; public: static const ClassId CLASS_ID = 0x7; static const MethodId METHOD_ID = 0x6; ExchangeBoundBody( ProtocolVersion, const std::string& _exchange, const std::string& _queue, const std::string& _bindingKey, const FieldTable& _arguments) : exchange(_exchange), queue(_queue), bindingKey(_bindingKey), arguments(_arguments), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); } ExchangeBoundBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setBindingKey(const std::string& _bindingKey); QPID_COMMON_EXTERN const std::string& getBindingKey() const; QPID_COMMON_EXTERN bool hasBindingKey() const; QPID_COMMON_EXTERN void clearBindingKeyFlag(); QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments); QPID_COMMON_EXTERN const FieldTable& getArguments() const; QPID_COMMON_EXTERN FieldTable& getArguments(); QPID_COMMON_EXTERN bool hasArguments() const; QPID_COMMON_EXTERN void clearArgumentsFlag(); typedef ExchangeBoundResult ResultType; template ResultType invoke(T& invocable) const { return invocable.bound(getExchange(), getQueue(), getBindingKey(), getArguments()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExchangeBoundBody */ }} #endif /*!QPID_FRAMING_EXCHANGEBOUNDBODY_H*/ qpidc-0.16/src/qpid/framing/Header.cpp0000664000076400007640000000411211752725676020217 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/Header.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void Header::setSync(bool _sync) { if (_sync) flags |= (1 << 0); else flags &= ~(1 << 0); } bool Header::getSync() const { return flags & (1 << 0); } void Header::encodeStructBody(Buffer& buffer) const { buffer.putOctet(flags); } void Header::encode(Buffer& buffer) const { buffer.putOctet(bodySize()); encodeStructBody(buffer); } void Header::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getOctet(); } void Header::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getOctet(); decodeStructBody(buffer); } uint32_t Header::bodySize() const { uint32_t total = 0; total += 1; return total; } uint32_t Header::encodedSize() const { uint32_t total = bodySize(); total += 1/*size field*/; return total; } void Header::print(std::ostream& out) const { out << "{Header: "; if (flags & (1 << 0)) out << "sync=" << getSync() << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const Header& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/MessageSubscribeBody.cpp0000664000076400007640000001474111752725676023104 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageSubscribeBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageSubscribeBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& MessageSubscribeBody::getQueue() const { return queue; } bool MessageSubscribeBody::hasQueue() const { return flags & (1 << 8); } void MessageSubscribeBody::clearQueueFlag() { flags &= ~(1 << 8); } void MessageSubscribeBody::setDestination(const std::string& _destination) { destination = _destination; flags |= (1 << 9); } const std::string& MessageSubscribeBody::getDestination() const { return destination; } bool MessageSubscribeBody::hasDestination() const { return flags & (1 << 9); } void MessageSubscribeBody::clearDestinationFlag() { flags &= ~(1 << 9); } void MessageSubscribeBody::setAcceptMode(uint8_t _acceptMode) { acceptMode = _acceptMode; flags |= (1 << 10); } uint8_t MessageSubscribeBody::getAcceptMode() const { return acceptMode; } bool MessageSubscribeBody::hasAcceptMode() const { return flags & (1 << 10); } void MessageSubscribeBody::clearAcceptModeFlag() { flags &= ~(1 << 10); } void MessageSubscribeBody::setAcquireMode(uint8_t _acquireMode) { acquireMode = _acquireMode; flags |= (1 << 11); } uint8_t MessageSubscribeBody::getAcquireMode() const { return acquireMode; } bool MessageSubscribeBody::hasAcquireMode() const { return flags & (1 << 11); } void MessageSubscribeBody::clearAcquireModeFlag() { flags &= ~(1 << 11); } void MessageSubscribeBody::setExclusive(bool _exclusive) { if (_exclusive) flags |= (1 << 12); else flags &= ~(1 << 12); } bool MessageSubscribeBody::getExclusive() const { return flags & (1 << 12); } void MessageSubscribeBody::setResumeId(const std::string& _resumeId) { resumeId = _resumeId; flags |= (1 << 13); } const std::string& MessageSubscribeBody::getResumeId() const { return resumeId; } bool MessageSubscribeBody::hasResumeId() const { return flags & (1 << 13); } void MessageSubscribeBody::clearResumeIdFlag() { flags &= ~(1 << 13); } void MessageSubscribeBody::setResumeTtl(uint64_t _resumeTtl) { resumeTtl = _resumeTtl; flags |= (1 << 14); } uint64_t MessageSubscribeBody::getResumeTtl() const { return resumeTtl; } bool MessageSubscribeBody::hasResumeTtl() const { return flags & (1 << 14); } void MessageSubscribeBody::clearResumeTtlFlag() { flags &= ~(1 << 14); } void MessageSubscribeBody::setArguments(const FieldTable& _arguments) { arguments = _arguments; flags |= (1 << 15); } const FieldTable& MessageSubscribeBody::getArguments() const { return arguments; } FieldTable& MessageSubscribeBody::getArguments() { flags |= (1 << 15); return arguments; } bool MessageSubscribeBody::hasArguments() const { return flags & (1 << 15); } void MessageSubscribeBody::clearArgumentsFlag() { flags &= ~(1 << 15); } void MessageSubscribeBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putShortString(destination); if (flags & (1 << 10)) buffer.putOctet(acceptMode); if (flags & (1 << 11)) buffer.putOctet(acquireMode); if (flags & (1 << 13)) buffer.putMediumString(resumeId); if (flags & (1 << 14)) buffer.putLongLong(resumeTtl); if (flags & (1 << 15)) arguments.encode(buffer); } void MessageSubscribeBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageSubscribeBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) buffer.getShortString(destination); if (flags & (1 << 10)) acceptMode = buffer.getOctet(); if (flags & (1 << 11)) acquireMode = buffer.getOctet(); if (flags & (1 << 13)) buffer.getMediumString(resumeId); if (flags & (1 << 14)) resumeTtl = buffer.getLongLong(); if (flags & (1 << 15)) arguments.decode(buffer); } void MessageSubscribeBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageSubscribeBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 1 + destination.size(); if (flags & (1 << 10)) total += 1;//acceptMode if (flags & (1 << 11)) total += 1;//acquireMode if (flags & (1 << 13)) total += 2 + resumeId.size(); if (flags & (1 << 14)) total += 8;//resumeTtl if (flags & (1 << 15)) total += arguments.encodedSize(); return total; } uint32_t MessageSubscribeBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageSubscribeBody::print(std::ostream& out) const { out << "{MessageSubscribeBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "destination=" << destination << "; "; if (flags & (1 << 10)) out << "accept-mode=" << (int) acceptMode << "; "; if (flags & (1 << 11)) out << "acquire-mode=" << (int) acquireMode << "; "; if (flags & (1 << 12)) out << "exclusive=" << getExclusive() << "; "; if (flags & (1 << 13)) out << "resume-id=" << resumeId << "; "; if (flags & (1 << 14)) out << "resume-ttl=" << resumeTtl << "; "; if (flags & (1 << 15)) out << "arguments=" << arguments << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/StreamQosBody.h0000664000076400007640000000765311752725676021245 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_STREAMQOSBODY_H #define QPID_FRAMING_STREAMQOSBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StreamQosBody : public ModelMethod { uint32_t prefetchSize; uint16_t prefetchCount; uint32_t consumeRate; uint16_t flags; public: static const ClassId CLASS_ID = 0xa; static const MethodId METHOD_ID = 0x1; StreamQosBody( ProtocolVersion, uint32_t _prefetchSize, uint16_t _prefetchCount, uint32_t _consumeRate, bool _global) : prefetchSize(_prefetchSize), prefetchCount(_prefetchCount), consumeRate(_consumeRate), flags(0){ setGlobal(_global); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } StreamQosBody(ProtocolVersion=ProtocolVersion()) : prefetchSize(0), prefetchCount(0), consumeRate(0), flags(0) {} QPID_COMMON_EXTERN void setPrefetchSize(uint32_t _prefetchSize); QPID_COMMON_EXTERN uint32_t getPrefetchSize() const; QPID_COMMON_EXTERN bool hasPrefetchSize() const; QPID_COMMON_EXTERN void clearPrefetchSizeFlag(); QPID_COMMON_EXTERN void setPrefetchCount(uint16_t _prefetchCount); QPID_COMMON_EXTERN uint16_t getPrefetchCount() const; QPID_COMMON_EXTERN bool hasPrefetchCount() const; QPID_COMMON_EXTERN void clearPrefetchCountFlag(); QPID_COMMON_EXTERN void setConsumeRate(uint32_t _consumeRate); QPID_COMMON_EXTERN uint32_t getConsumeRate() const; QPID_COMMON_EXTERN bool hasConsumeRate() const; QPID_COMMON_EXTERN void clearConsumeRateFlag(); QPID_COMMON_EXTERN void setGlobal(bool _global); QPID_COMMON_EXTERN bool getGlobal() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.qos(getPrefetchSize(), getPrefetchCount(), getConsumeRate(), getGlobal()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class StreamQosBody */ }} #endif /*!QPID_FRAMING_STREAMQOSBODY_H*/ qpidc-0.16/src/qpid/framing/QueueDeclareBody.cpp0000664000076400007640000001150411752725676022214 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/QueueDeclareBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void QueueDeclareBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& QueueDeclareBody::getQueue() const { return queue; } bool QueueDeclareBody::hasQueue() const { return flags & (1 << 8); } void QueueDeclareBody::clearQueueFlag() { flags &= ~(1 << 8); } void QueueDeclareBody::setAlternateExchange(const std::string& _alternateExchange) { alternateExchange = _alternateExchange; flags |= (1 << 9); } const std::string& QueueDeclareBody::getAlternateExchange() const { return alternateExchange; } bool QueueDeclareBody::hasAlternateExchange() const { return flags & (1 << 9); } void QueueDeclareBody::clearAlternateExchangeFlag() { flags &= ~(1 << 9); } void QueueDeclareBody::setPassive(bool _passive) { if (_passive) flags |= (1 << 10); else flags &= ~(1 << 10); } bool QueueDeclareBody::getPassive() const { return flags & (1 << 10); } void QueueDeclareBody::setDurable(bool _durable) { if (_durable) flags |= (1 << 11); else flags &= ~(1 << 11); } bool QueueDeclareBody::getDurable() const { return flags & (1 << 11); } void QueueDeclareBody::setExclusive(bool _exclusive) { if (_exclusive) flags |= (1 << 12); else flags &= ~(1 << 12); } bool QueueDeclareBody::getExclusive() const { return flags & (1 << 12); } void QueueDeclareBody::setAutoDelete(bool _autoDelete) { if (_autoDelete) flags |= (1 << 13); else flags &= ~(1 << 13); } bool QueueDeclareBody::getAutoDelete() const { return flags & (1 << 13); } void QueueDeclareBody::setArguments(const FieldTable& _arguments) { arguments = _arguments; flags |= (1 << 14); } const FieldTable& QueueDeclareBody::getArguments() const { return arguments; } FieldTable& QueueDeclareBody::getArguments() { flags |= (1 << 14); return arguments; } bool QueueDeclareBody::hasArguments() const { return flags & (1 << 14); } void QueueDeclareBody::clearArgumentsFlag() { flags &= ~(1 << 14); } void QueueDeclareBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putShortString(alternateExchange); if (flags & (1 << 14)) arguments.encode(buffer); } void QueueDeclareBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void QueueDeclareBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) buffer.getShortString(alternateExchange); if (flags & (1 << 14)) arguments.decode(buffer); } void QueueDeclareBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t QueueDeclareBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 1 + alternateExchange.size(); if (flags & (1 << 14)) total += arguments.encodedSize(); return total; } uint32_t QueueDeclareBody::encodedSize() const { uint32_t total = bodySize(); return total; } void QueueDeclareBody::print(std::ostream& out) const { out << "{QueueDeclareBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "alternate-exchange=" << alternateExchange << "; "; if (flags & (1 << 10)) out << "passive=" << getPassive() << "; "; if (flags & (1 << 11)) out << "durable=" << getDurable() << "; "; if (flags & (1 << 12)) out << "exclusive=" << getExclusive() << "; "; if (flags & (1 << 13)) out << "auto-delete=" << getAutoDelete() << "; "; if (flags & (1 << 14)) out << "arguments=" << arguments << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/FileOpenOkBody.cpp0000664000076400007640000000452411752725676021647 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileOpenOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileOpenOkBody::setStagedSize(uint64_t _stagedSize) { stagedSize = _stagedSize; flags |= (1 << 8); } uint64_t FileOpenOkBody::getStagedSize() const { return stagedSize; } bool FileOpenOkBody::hasStagedSize() const { return flags & (1 << 8); } void FileOpenOkBody::clearStagedSizeFlag() { flags &= ~(1 << 8); } void FileOpenOkBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(stagedSize); } void FileOpenOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileOpenOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) stagedSize = buffer.getLongLong(); } void FileOpenOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileOpenOkBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 8;//stagedSize return total; } uint32_t FileOpenOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileOpenOkBody::print(std::ostream& out) const { out << "{FileOpenOkBody: "; if (flags & (1 << 8)) out << "staged-size=" << stagedSize << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionTuneBody.cpp0000664000076400007640000001026611752725676022607 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionTuneBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionTuneBody::setChannelMax(uint16_t _channelMax) { channelMax = _channelMax; flags |= (1 << 8); } uint16_t ConnectionTuneBody::getChannelMax() const { return channelMax; } bool ConnectionTuneBody::hasChannelMax() const { return flags & (1 << 8); } void ConnectionTuneBody::clearChannelMaxFlag() { flags &= ~(1 << 8); } void ConnectionTuneBody::setMaxFrameSize(uint16_t _maxFrameSize) { maxFrameSize = _maxFrameSize; flags |= (1 << 9); } uint16_t ConnectionTuneBody::getMaxFrameSize() const { return maxFrameSize; } bool ConnectionTuneBody::hasMaxFrameSize() const { return flags & (1 << 9); } void ConnectionTuneBody::clearMaxFrameSizeFlag() { flags &= ~(1 << 9); } void ConnectionTuneBody::setHeartbeatMin(uint16_t _heartbeatMin) { heartbeatMin = _heartbeatMin; flags |= (1 << 10); } uint16_t ConnectionTuneBody::getHeartbeatMin() const { return heartbeatMin; } bool ConnectionTuneBody::hasHeartbeatMin() const { return flags & (1 << 10); } void ConnectionTuneBody::clearHeartbeatMinFlag() { flags &= ~(1 << 10); } void ConnectionTuneBody::setHeartbeatMax(uint16_t _heartbeatMax) { heartbeatMax = _heartbeatMax; flags |= (1 << 11); } uint16_t ConnectionTuneBody::getHeartbeatMax() const { return heartbeatMax; } bool ConnectionTuneBody::hasHeartbeatMax() const { return flags & (1 << 11); } void ConnectionTuneBody::clearHeartbeatMaxFlag() { flags &= ~(1 << 11); } void ConnectionTuneBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShort(channelMax); if (flags & (1 << 9)) buffer.putShort(maxFrameSize); if (flags & (1 << 10)) buffer.putShort(heartbeatMin); if (flags & (1 << 11)) buffer.putShort(heartbeatMax); } void ConnectionTuneBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionTuneBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) channelMax = buffer.getShort(); if (flags & (1 << 9)) maxFrameSize = buffer.getShort(); if (flags & (1 << 10)) heartbeatMin = buffer.getShort(); if (flags & (1 << 11)) heartbeatMax = buffer.getShort(); } void ConnectionTuneBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionTuneBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 2;//channelMax if (flags & (1 << 9)) total += 2;//maxFrameSize if (flags & (1 << 10)) total += 2;//heartbeatMin if (flags & (1 << 11)) total += 2;//heartbeatMax return total; } uint32_t ConnectionTuneBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionTuneBody::print(std::ostream& out) const { out << "{ConnectionTuneBody: "; if (flags & (1 << 8)) out << "channel-max=" << channelMax << "; "; if (flags & (1 << 9)) out << "max-frame-size=" << maxFrameSize << "; "; if (flags & (1 << 10)) out << "heartbeat-min=" << heartbeatMin << "; "; if (flags & (1 << 11)) out << "heartbeat-max=" << heartbeatMax << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/FileQosBody.h0000664000076400007640000000704011752725676020657 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILEQOSBODY_H #define QPID_FRAMING_FILEQOSBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileQosBody : public ModelMethod { uint32_t prefetchSize; uint16_t prefetchCount; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0x1; FileQosBody( ProtocolVersion, uint32_t _prefetchSize, uint16_t _prefetchCount, bool _global) : prefetchSize(_prefetchSize), prefetchCount(_prefetchCount), flags(0){ setGlobal(_global); flags |= (1 << 8); flags |= (1 << 9); } FileQosBody(ProtocolVersion=ProtocolVersion()) : prefetchSize(0), prefetchCount(0), flags(0) {} QPID_COMMON_EXTERN void setPrefetchSize(uint32_t _prefetchSize); QPID_COMMON_EXTERN uint32_t getPrefetchSize() const; QPID_COMMON_EXTERN bool hasPrefetchSize() const; QPID_COMMON_EXTERN void clearPrefetchSizeFlag(); QPID_COMMON_EXTERN void setPrefetchCount(uint16_t _prefetchCount); QPID_COMMON_EXTERN uint16_t getPrefetchCount() const; QPID_COMMON_EXTERN bool hasPrefetchCount() const; QPID_COMMON_EXTERN void clearPrefetchCountFlag(); QPID_COMMON_EXTERN void setGlobal(bool _global); QPID_COMMON_EXTERN bool getGlobal() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.qos(getPrefetchSize(), getPrefetchCount(), getGlobal()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileQosBody */ }} #endif /*!QPID_FRAMING_FILEQOSBODY_H*/ qpidc-0.16/src/qpid/framing/FileAckBody.h0000664000076400007640000000622211752725676020614 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILEACKBODY_H #define QPID_FRAMING_FILEACKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileAckBody : public ModelMethod { uint64_t deliveryTag; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0xc; FileAckBody( ProtocolVersion, uint64_t _deliveryTag, bool _multiple) : deliveryTag(_deliveryTag), flags(0){ setMultiple(_multiple); flags |= (1 << 8); } FileAckBody(ProtocolVersion=ProtocolVersion()) : deliveryTag(0), flags(0) {} QPID_COMMON_EXTERN void setDeliveryTag(uint64_t _deliveryTag); QPID_COMMON_EXTERN uint64_t getDeliveryTag() const; QPID_COMMON_EXTERN bool hasDeliveryTag() const; QPID_COMMON_EXTERN void clearDeliveryTagFlag(); QPID_COMMON_EXTERN void setMultiple(bool _multiple); QPID_COMMON_EXTERN bool getMultiple() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.ack(getDeliveryTag(), getMultiple()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileAckBody */ }} #endif /*!QPID_FRAMING_FILEACKBODY_H*/ qpidc-0.16/src/qpid/framing/ConnectionCloseBody.cpp0000664000076400007640000000567111752725676022745 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionCloseBody::setReplyCode(uint16_t _replyCode) { replyCode = _replyCode; flags |= (1 << 8); } uint16_t ConnectionCloseBody::getReplyCode() const { return replyCode; } bool ConnectionCloseBody::hasReplyCode() const { return flags & (1 << 8); } void ConnectionCloseBody::clearReplyCodeFlag() { flags &= ~(1 << 8); } void ConnectionCloseBody::setReplyText(const std::string& _replyText) { replyText = _replyText; flags |= (1 << 9); } const std::string& ConnectionCloseBody::getReplyText() const { return replyText; } bool ConnectionCloseBody::hasReplyText() const { return flags & (1 << 9); } void ConnectionCloseBody::clearReplyTextFlag() { flags &= ~(1 << 9); } void ConnectionCloseBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShort(replyCode); if (flags & (1 << 9)) buffer.putShortString(replyText); } void ConnectionCloseBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionCloseBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) replyCode = buffer.getShort(); if (flags & (1 << 9)) buffer.getShortString(replyText); } void ConnectionCloseBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionCloseBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 2;//replyCode if (flags & (1 << 9)) total += 1 + replyText.size(); return total; } uint32_t ConnectionCloseBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionCloseBody::print(std::ostream& out) const { out << "{ConnectionCloseBody: "; if (flags & (1 << 8)) out << "reply-code=" << replyCode << "; "; if (flags & (1 << 9)) out << "reply-text=" << replyText << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/AMQP_ServerProxy.h0000664000076400007640000003473111752725675021633 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQP_SERVERPROXY_H #define QPID_FRAMING_AMQP_SERVERPROXY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/Proxy.h" #include "qpid/framing/Array.h" #include "qpid/framing/amqp_types.h" #include "qpid/framing/amqp_structs.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQP_ServerProxy: public Proxy { public: QPID_COMMON_EXTERN AMQP_ServerProxy(FrameHandler& out); class QPID_COMMON_CLASS_EXTERN Connection: public Proxy { public: Connection(FrameHandler& f) : Proxy(f) {} static Connection& get(AMQP_ServerProxy& proxy) { return proxy.getConnection(); } QPID_COMMON_EXTERN virtual void startOk(const FieldTable& clientProperties, const std::string& mechanism, const std::string& response, const std::string& locale); QPID_COMMON_EXTERN virtual void secureOk(const std::string& response); QPID_COMMON_EXTERN virtual void tuneOk(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeat); QPID_COMMON_EXTERN virtual void open(const std::string& virtualHost, const Array& capabilities, bool insist); QPID_COMMON_EXTERN virtual void heartbeat(); QPID_COMMON_EXTERN virtual void close(uint16_t replyCode, const std::string& replyText); QPID_COMMON_EXTERN virtual void closeOk(); }; Connection& getConnection() { return connectionProxy; } class QPID_COMMON_CLASS_EXTERN Session: public Proxy { public: Session(FrameHandler& f) : Proxy(f) {} static Session& get(AMQP_ServerProxy& proxy) { return proxy.getSession(); } QPID_COMMON_EXTERN virtual void attach(const std::string& name, bool force); QPID_COMMON_EXTERN virtual void attached(const std::string& name); QPID_COMMON_EXTERN virtual void detach(const std::string& name); QPID_COMMON_EXTERN virtual void detached(const std::string& name, uint8_t code); QPID_COMMON_EXTERN virtual void requestTimeout(uint32_t timeout); QPID_COMMON_EXTERN virtual void timeout(uint32_t timeout); QPID_COMMON_EXTERN virtual void commandPoint(const SequenceNumber& commandId, uint64_t commandOffset); QPID_COMMON_EXTERN virtual void expected(const SequenceSet& commands, const Array& fragments); QPID_COMMON_EXTERN virtual void confirmed(const SequenceSet& commands, const Array& fragments); QPID_COMMON_EXTERN virtual void completed(const SequenceSet& commands, bool timelyReply); QPID_COMMON_EXTERN virtual void knownCompleted(const SequenceSet& commands); QPID_COMMON_EXTERN virtual void flush(bool expected, bool confirmed, bool completed); QPID_COMMON_EXTERN virtual void gap(const SequenceSet& commands); }; Session& getSession() { return sessionProxy; } class QPID_COMMON_CLASS_EXTERN Execution: public Proxy { public: Execution(FrameHandler& f) : Proxy(f) {} static Execution& get(AMQP_ServerProxy& proxy) { return proxy.getExecution(); } QPID_COMMON_EXTERN virtual void sync(); QPID_COMMON_EXTERN virtual void result(const SequenceNumber& commandId, const std::string& value); QPID_COMMON_EXTERN virtual void exception(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo); }; Execution& getExecution() { return executionProxy; } class QPID_COMMON_CLASS_EXTERN Message: public Proxy { public: Message(FrameHandler& f) : Proxy(f) {} static Message& get(AMQP_ServerProxy& proxy) { return proxy.getMessage(); } QPID_COMMON_EXTERN virtual void transfer(const std::string& destination, uint8_t acceptMode, uint8_t acquireMode); QPID_COMMON_EXTERN virtual void accept(const SequenceSet& transfers); QPID_COMMON_EXTERN virtual void reject(const SequenceSet& transfers, uint16_t code, const std::string& text); QPID_COMMON_EXTERN virtual void release(const SequenceSet& transfers, bool setRedelivered); QPID_COMMON_EXTERN virtual void acquire(const SequenceSet& transfers); QPID_COMMON_EXTERN virtual void resume(const std::string& destination, const std::string& resumeId); QPID_COMMON_EXTERN virtual void subscribe(const std::string& queue, const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const std::string& resumeId, uint64_t resumeTtl, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void cancel(const std::string& destination); QPID_COMMON_EXTERN virtual void setFlowMode(const std::string& destination, uint8_t flowMode); QPID_COMMON_EXTERN virtual void flow(const std::string& destination, uint8_t unit, uint32_t value); QPID_COMMON_EXTERN virtual void flush(const std::string& destination); QPID_COMMON_EXTERN virtual void stop(const std::string& destination); }; Message& getMessage() { return messageProxy; } class QPID_COMMON_CLASS_EXTERN Tx: public Proxy { public: Tx(FrameHandler& f) : Proxy(f) {} static Tx& get(AMQP_ServerProxy& proxy) { return proxy.getTx(); } QPID_COMMON_EXTERN virtual void select(); QPID_COMMON_EXTERN virtual void commit(); QPID_COMMON_EXTERN virtual void rollback(); }; Tx& getTx() { return txProxy; } class QPID_COMMON_CLASS_EXTERN Dtx: public Proxy { public: Dtx(FrameHandler& f) : Proxy(f) {} static Dtx& get(AMQP_ServerProxy& proxy) { return proxy.getDtx(); } QPID_COMMON_EXTERN virtual void select(); QPID_COMMON_EXTERN virtual void start(const Xid& xid, bool join, bool resume); QPID_COMMON_EXTERN virtual void end(const Xid& xid, bool fail, bool suspend); QPID_COMMON_EXTERN virtual void commit(const Xid& xid, bool onePhase); QPID_COMMON_EXTERN virtual void forget(const Xid& xid); QPID_COMMON_EXTERN virtual void getTimeout(const Xid& xid); QPID_COMMON_EXTERN virtual void prepare(const Xid& xid); QPID_COMMON_EXTERN virtual void recover(); QPID_COMMON_EXTERN virtual void rollback(const Xid& xid); QPID_COMMON_EXTERN virtual void setTimeout(const Xid& xid, uint32_t timeout); }; Dtx& getDtx() { return dtxProxy; } class QPID_COMMON_CLASS_EXTERN Exchange: public Proxy { public: Exchange(FrameHandler& f) : Proxy(f) {} static Exchange& get(AMQP_ServerProxy& proxy) { return proxy.getExchange(); } QPID_COMMON_EXTERN virtual void declare(const std::string& exchange, const std::string& type, const std::string& alternateExchange, bool passive, bool durable, bool autoDelete, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void delete_(const std::string& exchange, bool ifUnused); QPID_COMMON_EXTERN virtual void query(const std::string& name); QPID_COMMON_EXTERN virtual void bind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void unbind(const std::string& queue, const std::string& exchange, const std::string& bindingKey); QPID_COMMON_EXTERN virtual void bound(const std::string& exchange, const std::string& queue, const std::string& bindingKey, const FieldTable& arguments); }; Exchange& getExchange() { return exchangeProxy; } class QPID_COMMON_CLASS_EXTERN Queue: public Proxy { public: Queue(FrameHandler& f) : Proxy(f) {} static Queue& get(AMQP_ServerProxy& proxy) { return proxy.getQueue(); } QPID_COMMON_EXTERN virtual void declare(const std::string& queue, const std::string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void delete_(const std::string& queue, bool ifUnused, bool ifEmpty); QPID_COMMON_EXTERN virtual void purge(const std::string& queue); QPID_COMMON_EXTERN virtual void query(const std::string& queue); }; Queue& getQueue() { return queueProxy; } class QPID_COMMON_CLASS_EXTERN File: public Proxy { public: File(FrameHandler& f) : Proxy(f) {} static File& get(AMQP_ServerProxy& proxy) { return proxy.getFile(); } QPID_COMMON_EXTERN virtual void qos(uint32_t prefetchSize, uint16_t prefetchCount, bool global); QPID_COMMON_EXTERN virtual void consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool noAck, bool exclusive, bool nowait, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void cancel(const std::string& consumerTag); QPID_COMMON_EXTERN virtual void open(const std::string& identifier, uint64_t contentSize); QPID_COMMON_EXTERN virtual void openOk(uint64_t stagedSize); QPID_COMMON_EXTERN virtual void stage(); QPID_COMMON_EXTERN virtual void publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate, const std::string& identifier); QPID_COMMON_EXTERN virtual void ack(uint64_t deliveryTag, bool multiple); QPID_COMMON_EXTERN virtual void reject(uint64_t deliveryTag, bool requeue); }; File& getFile() { return fileProxy; } class QPID_COMMON_CLASS_EXTERN Stream: public Proxy { public: Stream(FrameHandler& f) : Proxy(f) {} static Stream& get(AMQP_ServerProxy& proxy) { return proxy.getStream(); } QPID_COMMON_EXTERN virtual void qos(uint32_t prefetchSize, uint16_t prefetchCount, uint32_t consumeRate, bool global); QPID_COMMON_EXTERN virtual void consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool exclusive, bool nowait, const FieldTable& arguments); QPID_COMMON_EXTERN virtual void cancel(const std::string& consumerTag); QPID_COMMON_EXTERN virtual void publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate); }; Stream& getStream() { return streamProxy; } class QPID_COMMON_CLASS_EXTERN Cluster: public Proxy { public: Cluster(FrameHandler& f) : Proxy(f) {} static Cluster& get(AMQP_ServerProxy& proxy) { return proxy.getCluster(); } }; Cluster& getCluster() { return clusterProxy; } class QPID_COMMON_CLASS_EXTERN ClusterConnection: public Proxy { public: ClusterConnection(FrameHandler& f) : Proxy(f) {} static ClusterConnection& get(AMQP_ServerProxy& proxy) { return proxy.getClusterConnection(); } }; ClusterConnection& getClusterConnection() { return clusterConnectionProxy; } private: Connection connectionProxy; Session sessionProxy; Execution executionProxy; Message messageProxy; Tx txProxy; Dtx dtxProxy; Exchange exchangeProxy; Queue queueProxy; File fileProxy; Stream streamProxy; Cluster clusterProxy; ClusterConnection clusterConnectionProxy; }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_AMQP_SERVERPROXY_H*/ qpidc-0.16/src/qpid/framing/TxCommitBody.cpp0000664000076400007640000000335611752725676021422 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/TxCommitBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void TxCommitBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void TxCommitBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void TxCommitBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void TxCommitBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t TxCommitBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t TxCommitBody::encodedSize() const { uint32_t total = bodySize(); return total; } void TxCommitBody::print(std::ostream& out) const { out << "{TxCommitBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/frame_body_lists.h0000664000076400007640000001204111752725675022020 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FRAME_BODY_LISTS_H #define QPID_FRAMING_FRAME_BODY_LISTS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// /**@file * Macro lists of frame body classes, used to generate Visitors */ #define METHOD_BODIES() \ (ConnectionStartBody) \ (ConnectionStartOkBody) \ (ConnectionSecureBody) \ (ConnectionSecureOkBody) \ (ConnectionTuneBody) \ (ConnectionTuneOkBody) \ (ConnectionOpenBody) \ (ConnectionOpenOkBody) \ (ConnectionRedirectBody) \ (ConnectionHeartbeatBody) \ (ConnectionCloseBody) \ (ConnectionCloseOkBody) \ (SessionAttachBody) \ (SessionAttachedBody) \ (SessionDetachBody) \ (SessionDetachedBody) \ (SessionRequestTimeoutBody) \ (SessionTimeoutBody) \ (SessionCommandPointBody) \ (SessionExpectedBody) \ (SessionConfirmedBody) \ (SessionCompletedBody) \ (SessionKnownCompletedBody) \ (SessionFlushBody) \ (SessionGapBody) \ (ExecutionSyncBody) \ (ExecutionResultBody) \ (ExecutionExceptionBody) \ (MessageTransferBody) \ (MessageAcceptBody) \ (MessageRejectBody) \ (MessageReleaseBody) \ (MessageAcquireBody) \ (MessageResumeBody) \ (MessageSubscribeBody) \ (MessageCancelBody) \ (MessageSetFlowModeBody) \ (MessageFlowBody) \ (MessageFlushBody) \ (MessageStopBody) \ (TxSelectBody) \ (TxCommitBody) \ (TxRollbackBody) \ (DtxSelectBody) \ (DtxStartBody) \ (DtxEndBody) \ (DtxCommitBody) \ (DtxForgetBody) \ (DtxGetTimeoutBody) \ (DtxPrepareBody) \ (DtxRecoverBody) \ (DtxRollbackBody) \ (DtxSetTimeoutBody) \ (ExchangeDeclareBody) \ (ExchangeDeleteBody) \ (ExchangeQueryBody) \ (ExchangeBindBody) \ (ExchangeUnbindBody) \ (ExchangeBoundBody) \ (QueueDeclareBody) \ (QueueDeleteBody) \ (QueuePurgeBody) \ (QueueQueryBody) \ (FileQosBody) \ (FileQosOkBody) \ (FileConsumeBody) \ (FileConsumeOkBody) \ (FileCancelBody) \ (FileOpenBody) \ (FileOpenOkBody) \ (FileStageBody) \ (FilePublishBody) \ (FileReturnBody) \ (FileDeliverBody) \ (FileAckBody) \ (FileRejectBody) \ (StreamQosBody) \ (StreamQosOkBody) \ (StreamConsumeBody) \ (StreamConsumeOkBody) \ (StreamCancelBody) \ (StreamPublishBody) \ (StreamReturnBody) \ (StreamDeliverBody) \ (ClusterUpdateRequestBody) \ (ClusterUpdateOfferBody) \ (ClusterRetractOfferBody) \ (ClusterInitialStatusBody) \ (ClusterReadyBody) \ (ClusterConfigChangeBody) \ (ClusterErrorCheckBody) \ (ClusterTimerWakeupBody) \ (ClusterTimerDropBody) \ (ClusterShutdownBody) \ (ClusterDeliverToQueueBody) \ (ClusterClockBody) \ (ClusterConnectionAnnounceBody) \ (ClusterConnectionDeliverCloseBody) \ (ClusterConnectionDeliverDoOutputBody) \ (ClusterConnectionAbortBody) \ (ClusterConnectionShadowSetUserBody) \ (ClusterConnectionShadowPrepareBody) \ (ClusterConnectionConsumerStateBody) \ (ClusterConnectionDeliveryRecordBody) \ (ClusterConnectionTxStartBody) \ (ClusterConnectionTxAcceptBody) \ (ClusterConnectionTxDequeueBody) \ (ClusterConnectionTxEnqueueBody) \ (ClusterConnectionTxPublishBody) \ (ClusterConnectionTxEndBody) \ (ClusterConnectionAccumulatedAckBody) \ (ClusterConnectionOutputTaskBody) \ (ClusterConnectionDtxStartBody) \ (ClusterConnectionDtxEndBody) \ (ClusterConnectionDtxAckBody) \ (ClusterConnectionDtxBufferRefBody) \ (ClusterConnectionDtxWorkRecordBody) \ (ClusterConnectionSessionStateBody) \ (ClusterConnectionShadowReadyBody) \ (ClusterConnectionMembershipBody) \ (ClusterConnectionRetractOfferBody) \ (ClusterConnectionQueuePositionBody) \ (ClusterConnectionExchangeBody) \ (ClusterConnectionAddQueueListenerBody) \ (ClusterConnectionManagementSetupStateBody) \ (ClusterConnectionConfigBody) \ (ClusterConnectionQueueFairshareStateBody) \ (ClusterConnectionQueueObserverStateBody) \ (ClusterConnectionClockBody) \ (ClusterConnectionQueueDequeueSincePurgeStateBody) #define OTHER_BODIES() (AMQContentBody)(AMQHeaderBody)(AMQHeartbeatBody)) #endif /*!QPID_FRAMING_FRAME_BODY_LISTS_H*/ qpidc-0.16/src/qpid/framing/MessageAcquireBody.h0000664000076400007640000000604211752725676022214 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGEACQUIREBODY_H #define QPID_FRAMING_MESSAGEACQUIREBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageAcquireBody : public ModelMethod { SequenceSet transfers; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0x5; MessageAcquireBody( ProtocolVersion, const SequenceSet& _transfers) : transfers(_transfers), flags(0){ flags |= (1 << 8); } MessageAcquireBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setTransfers(const SequenceSet& _transfers); QPID_COMMON_EXTERN const SequenceSet& getTransfers() const; QPID_COMMON_EXTERN bool hasTransfers() const; QPID_COMMON_EXTERN void clearTransfersFlag(); typedef MessageAcquireResult ResultType; template ResultType invoke(T& invocable) const { return invocable.acquire(getTransfers()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageAcquireBody */ }} #endif /*!QPID_FRAMING_MESSAGEACQUIREBODY_H*/ qpidc-0.16/src/qpid/framing/SequenceSet.cpp0000664000076400007640000000602411341561464021242 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/SequenceSet.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/Msg.h" using namespace qpid::framing; using std::max; using std::min; namespace qpid { namespace framing { namespace { //each range contains 2 numbers, 4 bytes each uint16_t RANGE_SIZE = 2 * 4; } void SequenceSet::encode(Buffer& buffer) const { buffer.putShort(rangesSize() * RANGE_SIZE); for (RangeIterator i = rangesBegin(); i != rangesEnd(); i++) { buffer.putLong(i->first().getValue()); buffer.putLong(i->last().getValue()); } } void SequenceSet::decode(Buffer& buffer) { clear(); uint16_t size = buffer.getShort(); uint16_t count = size / RANGE_SIZE;//number of ranges if (size % RANGE_SIZE) throw IllegalArgumentException(QPID_MSG("Invalid size for sequence set: " << size)); for (uint16_t i = 0; i < count; i++) { add(SequenceNumber(buffer.getLong()), SequenceNumber(buffer.getLong())); } } uint32_t SequenceSet::encodedSize() const { return 2 /*size field*/ + (rangesSize() * RANGE_SIZE); } bool SequenceSet::contains(const SequenceNumber& s) const { return RangeSet::contains(s); } void SequenceSet::add(const SequenceNumber& s) { *this += s; } void SequenceSet::add(const SequenceNumber& start, const SequenceNumber& finish) { *this += Range::makeClosed(std::min(start,finish), std::max(start, finish)); } void SequenceSet::add(const SequenceSet& set) { *this += set; } void SequenceSet::remove(const SequenceSet& set) { *this -= set; } void SequenceSet::remove(const SequenceNumber& start, const SequenceNumber& finish) { *this -= Range::makeClosed(std::min(start,finish), std::max(start, finish)); } void SequenceSet::remove(const SequenceNumber& s) { *this -= s; } struct RangePrinter { std::ostream& out; RangePrinter(std::ostream& o) : out(o) {} void operator()(SequenceNumber i, SequenceNumber j) const { out << "[" << i.getValue() << "," << j.getValue() << "] "; } }; std::ostream& operator<<(std::ostream& o, const SequenceSet& s) { RangePrinter print(o); o << "{ "; s.for_each(print); return o << "}"; } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/StreamPublishBody.cpp0000664000076400007640000000707211752725676022437 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/StreamPublishBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void StreamPublishBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 8); } const std::string& StreamPublishBody::getExchange() const { return exchange; } bool StreamPublishBody::hasExchange() const { return flags & (1 << 8); } void StreamPublishBody::clearExchangeFlag() { flags &= ~(1 << 8); } void StreamPublishBody::setRoutingKey(const std::string& _routingKey) { routingKey = _routingKey; flags |= (1 << 9); } const std::string& StreamPublishBody::getRoutingKey() const { return routingKey; } bool StreamPublishBody::hasRoutingKey() const { return flags & (1 << 9); } void StreamPublishBody::clearRoutingKeyFlag() { flags &= ~(1 << 9); } void StreamPublishBody::setMandatory(bool _mandatory) { if (_mandatory) flags |= (1 << 10); else flags &= ~(1 << 10); } bool StreamPublishBody::getMandatory() const { return flags & (1 << 10); } void StreamPublishBody::setImmediate(bool _immediate) { if (_immediate) flags |= (1 << 11); else flags &= ~(1 << 11); } bool StreamPublishBody::getImmediate() const { return flags & (1 << 11); } void StreamPublishBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(exchange); if (flags & (1 << 9)) buffer.putShortString(routingKey); } void StreamPublishBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void StreamPublishBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(exchange); if (flags & (1 << 9)) buffer.getShortString(routingKey); } void StreamPublishBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t StreamPublishBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + exchange.size(); if (flags & (1 << 9)) total += 1 + routingKey.size(); return total; } uint32_t StreamPublishBody::encodedSize() const { uint32_t total = bodySize(); return total; } void StreamPublishBody::print(std::ostream& out) const { out << "{StreamPublishBody: "; if (flags & (1 << 8)) out << "exchange=" << exchange << "; "; if (flags & (1 << 9)) out << "routing-key=" << routingKey << "; "; if (flags & (1 << 10)) out << "mandatory=" << getMandatory() << "; "; if (flags & (1 << 11)) out << "immediate=" << getImmediate() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageResumeBody.cpp0000664000076400007640000000601511752725676022416 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageResumeBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageResumeBody::setDestination(const std::string& _destination) { destination = _destination; flags |= (1 << 8); } const std::string& MessageResumeBody::getDestination() const { return destination; } bool MessageResumeBody::hasDestination() const { return flags & (1 << 8); } void MessageResumeBody::clearDestinationFlag() { flags &= ~(1 << 8); } void MessageResumeBody::setResumeId(const std::string& _resumeId) { resumeId = _resumeId; flags |= (1 << 9); } const std::string& MessageResumeBody::getResumeId() const { return resumeId; } bool MessageResumeBody::hasResumeId() const { return flags & (1 << 9); } void MessageResumeBody::clearResumeIdFlag() { flags &= ~(1 << 9); } void MessageResumeBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(destination); if (flags & (1 << 9)) buffer.putMediumString(resumeId); } void MessageResumeBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageResumeBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(destination); if (flags & (1 << 9)) buffer.getMediumString(resumeId); } void MessageResumeBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageResumeBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + destination.size(); if (flags & (1 << 9)) total += 2 + resumeId.size(); return total; } uint32_t MessageResumeBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageResumeBody::print(std::ostream& out) const { out << "{MessageResumeBody: "; if (flags & (1 << 8)) out << "destination=" << destination << "; "; if (flags & (1 << 9)) out << "resume-id=" << resumeId << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/TxRollbackBody.cpp0000664000076400007640000000340011752725676021711 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/TxRollbackBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void TxRollbackBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void TxRollbackBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void TxRollbackBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void TxRollbackBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t TxRollbackBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t TxRollbackBody::encodedSize() const { uint32_t total = bodySize(); return total; } void TxRollbackBody::print(std::ostream& out) const { out << "{TxRollbackBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/DtxRecoverResult.cpp0000664000076400007640000000524011752725676022316 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxRecoverResult.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxRecoverResult::setInDoubt(const Array& _inDoubt) { inDoubt = _inDoubt; flags |= (1 << 8); } const Array& DtxRecoverResult::getInDoubt() const { return inDoubt; } bool DtxRecoverResult::hasInDoubt() const { return flags & (1 << 8); } void DtxRecoverResult::clearInDoubtFlag() { flags &= ~(1 << 8); } void DtxRecoverResult::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) inDoubt.encode(buffer); } void DtxRecoverResult::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void DtxRecoverResult::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) inDoubt.decode(buffer); } void DtxRecoverResult::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t DtxRecoverResult::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += inDoubt.encodedSize(); return total; } uint32_t DtxRecoverResult::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void DtxRecoverResult::print(std::ostream& out) const { out << "{DtxRecoverResult: "; if (flags & (1 << 8)) out << "in-doubt=" << inDoubt << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const DtxRecoverResult& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/ClusterConnectionSessionStateBody.cpp0000664000076400007640000001631611752725676025664 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionSessionStateBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionSessionStateBody::setReplayStart(const SequenceNumber& _replayStart) { replayStart = _replayStart; flags |= (1 << 8); } SequenceNumber ClusterConnectionSessionStateBody::getReplayStart() const { return replayStart; } bool ClusterConnectionSessionStateBody::hasReplayStart() const { return flags & (1 << 8); } void ClusterConnectionSessionStateBody::clearReplayStartFlag() { flags &= ~(1 << 8); } void ClusterConnectionSessionStateBody::setCommandPoint(const SequenceNumber& _commandPoint) { commandPoint = _commandPoint; flags |= (1 << 9); } SequenceNumber ClusterConnectionSessionStateBody::getCommandPoint() const { return commandPoint; } bool ClusterConnectionSessionStateBody::hasCommandPoint() const { return flags & (1 << 9); } void ClusterConnectionSessionStateBody::clearCommandPointFlag() { flags &= ~(1 << 9); } void ClusterConnectionSessionStateBody::setSentIncomplete(const SequenceSet& _sentIncomplete) { sentIncomplete = _sentIncomplete; flags |= (1 << 10); } const SequenceSet& ClusterConnectionSessionStateBody::getSentIncomplete() const { return sentIncomplete; } bool ClusterConnectionSessionStateBody::hasSentIncomplete() const { return flags & (1 << 10); } void ClusterConnectionSessionStateBody::clearSentIncompleteFlag() { flags &= ~(1 << 10); } void ClusterConnectionSessionStateBody::setExpected(const SequenceNumber& _expected) { expected = _expected; flags |= (1 << 11); } SequenceNumber ClusterConnectionSessionStateBody::getExpected() const { return expected; } bool ClusterConnectionSessionStateBody::hasExpected() const { return flags & (1 << 11); } void ClusterConnectionSessionStateBody::clearExpectedFlag() { flags &= ~(1 << 11); } void ClusterConnectionSessionStateBody::setReceived(const SequenceNumber& _received) { received = _received; flags |= (1 << 12); } SequenceNumber ClusterConnectionSessionStateBody::getReceived() const { return received; } bool ClusterConnectionSessionStateBody::hasReceived() const { return flags & (1 << 12); } void ClusterConnectionSessionStateBody::clearReceivedFlag() { flags &= ~(1 << 12); } void ClusterConnectionSessionStateBody::setUnknownCompleted(const SequenceSet& _unknownCompleted) { unknownCompleted = _unknownCompleted; flags |= (1 << 13); } const SequenceSet& ClusterConnectionSessionStateBody::getUnknownCompleted() const { return unknownCompleted; } bool ClusterConnectionSessionStateBody::hasUnknownCompleted() const { return flags & (1 << 13); } void ClusterConnectionSessionStateBody::clearUnknownCompletedFlag() { flags &= ~(1 << 13); } void ClusterConnectionSessionStateBody::setReceivedIncomplete(const SequenceSet& _receivedIncomplete) { receivedIncomplete = _receivedIncomplete; flags |= (1 << 14); } const SequenceSet& ClusterConnectionSessionStateBody::getReceivedIncomplete() const { return receivedIncomplete; } bool ClusterConnectionSessionStateBody::hasReceivedIncomplete() const { return flags & (1 << 14); } void ClusterConnectionSessionStateBody::clearReceivedIncompleteFlag() { flags &= ~(1 << 14); } void ClusterConnectionSessionStateBody::setDtxSelected(bool _dtxSelected) { if (_dtxSelected) flags |= (1 << 15); else flags &= ~(1 << 15); } bool ClusterConnectionSessionStateBody::getDtxSelected() const { return flags & (1 << 15); } void ClusterConnectionSessionStateBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) replayStart.encode(buffer); if (flags & (1 << 9)) commandPoint.encode(buffer); if (flags & (1 << 10)) sentIncomplete.encode(buffer); if (flags & (1 << 11)) expected.encode(buffer); if (flags & (1 << 12)) received.encode(buffer); if (flags & (1 << 13)) unknownCompleted.encode(buffer); if (flags & (1 << 14)) receivedIncomplete.encode(buffer); } void ClusterConnectionSessionStateBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionSessionStateBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) replayStart.decode(buffer); if (flags & (1 << 9)) commandPoint.decode(buffer); if (flags & (1 << 10)) sentIncomplete.decode(buffer); if (flags & (1 << 11)) expected.decode(buffer); if (flags & (1 << 12)) received.decode(buffer); if (flags & (1 << 13)) unknownCompleted.decode(buffer); if (flags & (1 << 14)) receivedIncomplete.decode(buffer); } void ClusterConnectionSessionStateBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionSessionStateBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += replayStart.encodedSize(); if (flags & (1 << 9)) total += commandPoint.encodedSize(); if (flags & (1 << 10)) total += sentIncomplete.encodedSize(); if (flags & (1 << 11)) total += expected.encodedSize(); if (flags & (1 << 12)) total += received.encodedSize(); if (flags & (1 << 13)) total += unknownCompleted.encodedSize(); if (flags & (1 << 14)) total += receivedIncomplete.encodedSize(); return total; } uint32_t ClusterConnectionSessionStateBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionSessionStateBody::print(std::ostream& out) const { out << "{ClusterConnectionSessionStateBody: "; if (flags & (1 << 8)) out << "replay-start=" << replayStart << "; "; if (flags & (1 << 9)) out << "command-point=" << commandPoint << "; "; if (flags & (1 << 10)) out << "sent-incomplete=" << sentIncomplete << "; "; if (flags & (1 << 11)) out << "expected=" << expected << "; "; if (flags & (1 << 12)) out << "received=" << received << "; "; if (flags & (1 << 13)) out << "unknown-completed=" << unknownCompleted << "; "; if (flags & (1 << 14)) out << "received-incomplete=" << receivedIncomplete << "; "; if (flags & (1 << 15)) out << "dtx-selected=" << getDtxSelected() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionDetachBody.cpp0000664000076400007640000000441211752725676022404 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionDetachBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionDetachBody::setName(const std::string& _name) { name = _name; flags |= (1 << 8); } const std::string& SessionDetachBody::getName() const { return name; } bool SessionDetachBody::hasName() const { return flags & (1 << 8); } void SessionDetachBody::clearNameFlag() { flags &= ~(1 << 8); } void SessionDetachBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(name); } void SessionDetachBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionDetachBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(name); } void SessionDetachBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionDetachBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 2 + name.size(); return total; } uint32_t SessionDetachBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionDetachBody::print(std::ostream& out) const { out << "{SessionDetachBody: "; if (flags & (1 << 8)) out << "name=" << name << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/Proxy.cpp0000664000076400007640000000262711227113407020135 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/framing/Proxy.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/log/Statement.h" namespace qpid { namespace framing { Proxy::Proxy(FrameHandler& h) : out(&h), sync(false) {} Proxy::~Proxy() {} void Proxy::send(const AMQBody& b) { if (sync) { const AMQMethodBody* m = dynamic_cast(&b); if (m) m->setSync(sync); } AMQFrame f(b); out->handle(f); } ProtocolVersion Proxy::getVersion() const { return ProtocolVersion(); } FrameHandler& Proxy::getHandler() { return *out; } void Proxy::setHandler(FrameHandler& f) { out=&f; } Proxy::ScopedSync::ScopedSync(Proxy& p) : proxy(p) { proxy.sync = true; } Proxy::ScopedSync::~ScopedSync() { proxy.sync = false; } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/MessageSubscribeBody.h0000664000076400007640000001264711752725676022554 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGESUBSCRIBEBODY_H #define QPID_FRAMING_MESSAGESUBSCRIBEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageSubscribeBody : public ModelMethod { std::string queue; std::string destination; uint8_t acceptMode; uint8_t acquireMode; std::string resumeId; uint64_t resumeTtl; FieldTable arguments; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0x7; MessageSubscribeBody( ProtocolVersion, const std::string& _queue, const std::string& _destination, uint8_t _acceptMode, uint8_t _acquireMode, bool _exclusive, const std::string& _resumeId, uint64_t _resumeTtl, const FieldTable& _arguments) : queue(_queue), destination(_destination), acceptMode(_acceptMode), acquireMode(_acquireMode), resumeId(_resumeId), resumeTtl(_resumeTtl), arguments(_arguments), flags(0){ setExclusive(_exclusive); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 13); flags |= (1 << 14); flags |= (1 << 15); } MessageSubscribeBody(ProtocolVersion=ProtocolVersion()) : acceptMode(0), acquireMode(0), resumeTtl(0), flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setDestination(const std::string& _destination); QPID_COMMON_EXTERN const std::string& getDestination() const; QPID_COMMON_EXTERN bool hasDestination() const; QPID_COMMON_EXTERN void clearDestinationFlag(); QPID_COMMON_EXTERN void setAcceptMode(uint8_t _acceptMode); QPID_COMMON_EXTERN uint8_t getAcceptMode() const; QPID_COMMON_EXTERN bool hasAcceptMode() const; QPID_COMMON_EXTERN void clearAcceptModeFlag(); QPID_COMMON_EXTERN void setAcquireMode(uint8_t _acquireMode); QPID_COMMON_EXTERN uint8_t getAcquireMode() const; QPID_COMMON_EXTERN bool hasAcquireMode() const; QPID_COMMON_EXTERN void clearAcquireModeFlag(); QPID_COMMON_EXTERN void setExclusive(bool _exclusive); QPID_COMMON_EXTERN bool getExclusive() const; QPID_COMMON_EXTERN void setResumeId(const std::string& _resumeId); QPID_COMMON_EXTERN const std::string& getResumeId() const; QPID_COMMON_EXTERN bool hasResumeId() const; QPID_COMMON_EXTERN void clearResumeIdFlag(); QPID_COMMON_EXTERN void setResumeTtl(uint64_t _resumeTtl); QPID_COMMON_EXTERN uint64_t getResumeTtl() const; QPID_COMMON_EXTERN bool hasResumeTtl() const; QPID_COMMON_EXTERN void clearResumeTtlFlag(); QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments); QPID_COMMON_EXTERN const FieldTable& getArguments() const; QPID_COMMON_EXTERN FieldTable& getArguments(); QPID_COMMON_EXTERN bool hasArguments() const; QPID_COMMON_EXTERN void clearArgumentsFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.subscribe(getQueue(), getDestination(), getAcceptMode(), getAcquireMode(), getExclusive(), getResumeId(), getResumeTtl(), getArguments()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageSubscribeBody */ }} #endif /*!QPID_FRAMING_MESSAGESUBSCRIBEBODY_H*/ qpidc-0.16/src/qpid/framing/QueueDeleteBody.h0000664000076400007640000000646111752725676021532 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_QUEUEDELETEBODY_H #define QPID_FRAMING_QUEUEDELETEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN QueueDeleteBody : public ModelMethod { std::string queue; uint16_t flags; public: static const ClassId CLASS_ID = 0x8; static const MethodId METHOD_ID = 0x2; QueueDeleteBody( ProtocolVersion, const std::string& _queue, bool _ifUnused, bool _ifEmpty) : queue(_queue), flags(0){ setIfUnused(_ifUnused); setIfEmpty(_ifEmpty); flags |= (1 << 8); } QueueDeleteBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setIfUnused(bool _ifUnused); QPID_COMMON_EXTERN bool getIfUnused() const; QPID_COMMON_EXTERN void setIfEmpty(bool _ifEmpty); QPID_COMMON_EXTERN bool getIfEmpty() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.delete_(getQueue(), getIfUnused(), getIfEmpty()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class QueueDeleteBody */ }} #endif /*!QPID_FRAMING_QUEUEDELETEBODY_H*/ qpidc-0.16/src/qpid/framing/FilePublishBody.h0000664000076400007640000001015311752725676021522 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILEPUBLISHBODY_H #define QPID_FRAMING_FILEPUBLISHBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FilePublishBody : public ModelMethod { std::string exchange; std::string routingKey; std::string identifier; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0x9; FilePublishBody( ProtocolVersion, const std::string& _exchange, const std::string& _routingKey, bool _mandatory, bool _immediate, const std::string& _identifier) : exchange(_exchange), routingKey(_routingKey), identifier(_identifier), flags(0){ setMandatory(_mandatory); setImmediate(_immediate); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 12); } FilePublishBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setRoutingKey(const std::string& _routingKey); QPID_COMMON_EXTERN const std::string& getRoutingKey() const; QPID_COMMON_EXTERN bool hasRoutingKey() const; QPID_COMMON_EXTERN void clearRoutingKeyFlag(); QPID_COMMON_EXTERN void setMandatory(bool _mandatory); QPID_COMMON_EXTERN bool getMandatory() const; QPID_COMMON_EXTERN void setImmediate(bool _immediate); QPID_COMMON_EXTERN bool getImmediate() const; QPID_COMMON_EXTERN void setIdentifier(const std::string& _identifier); QPID_COMMON_EXTERN const std::string& getIdentifier() const; QPID_COMMON_EXTERN bool hasIdentifier() const; QPID_COMMON_EXTERN void clearIdentifierFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.publish(getExchange(), getRoutingKey(), getMandatory(), getImmediate(), getIdentifier()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FilePublishBody */ }} #endif /*!QPID_FRAMING_FILEPUBLISHBODY_H*/ qpidc-0.16/src/qpid/framing/DtxPrepareBody.h0000664000076400007640000000567411752725676021406 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXPREPAREBODY_H #define QPID_FRAMING_DTXPREPAREBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include "qpid/framing/Xid.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxPrepareBody : public ModelMethod { Xid xid; uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0x7; DtxPrepareBody( ProtocolVersion, const Xid& _xid) : xid(_xid), flags(0){ flags |= (1 << 8); } DtxPrepareBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setXid(const Xid& _xid); QPID_COMMON_EXTERN const Xid& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); typedef XaResult ResultType; template ResultType invoke(T& invocable) const { return invocable.prepare(getXid()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxPrepareBody */ }} #endif /*!QPID_FRAMING_DTXPREPAREBODY_H*/ qpidc-0.16/src/qpid/framing/SequenceNumberSet.h0000664000076400007640000000426611227113407022057 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _framing_SequenceNumberSet_h #define _framing_SequenceNumberSet_h #include #include "qpid/framing/amqp_types.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/InlineVector.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class SequenceNumberSet : public InlineVector { typedef InlineVector Base; public: typedef Base::const_iterator const_iterator; typedef Base::iterator iterator; void encode(Buffer& buffer) const; void decode(Buffer& buffer); uint32_t encodedSize() const; QPID_COMMON_EXTERN SequenceNumberSet condense() const; QPID_COMMON_EXTERN void addRange(const SequenceNumber& start, const SequenceNumber& end); template void processRanges(T& t) const { if (size() % 2) { //must be even number throw InvalidArgumentException("SequenceNumberSet contains odd number of elements"); } for (SequenceNumberSet::const_iterator i = begin(); i != end(); i++) { SequenceNumber first = *(i); SequenceNumber last = *(++i); t(first, last); } } friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SequenceNumberSet&); }; }} // namespace qpid::framing #endif qpidc-0.16/src/qpid/framing/FileStageBody.h0000664000076400007640000000506711752725676021167 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILESTAGEBODY_H #define QPID_FRAMING_FILESTAGEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileStageBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0x8; FileStageBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.stage(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return true; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileStageBody */ }} #endif /*!QPID_FRAMING_FILESTAGEBODY_H*/ qpidc-0.16/src/qpid/framing/SessionExpectedBody.cpp0000664000076400007640000000565111752725676022763 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionExpectedBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionExpectedBody::setCommands(const SequenceSet& _commands) { commands = _commands; flags |= (1 << 8); } const SequenceSet& SessionExpectedBody::getCommands() const { return commands; } bool SessionExpectedBody::hasCommands() const { return flags & (1 << 8); } void SessionExpectedBody::clearCommandsFlag() { flags &= ~(1 << 8); } void SessionExpectedBody::setFragments(const Array& _fragments) { fragments = _fragments; flags |= (1 << 9); } const Array& SessionExpectedBody::getFragments() const { return fragments; } bool SessionExpectedBody::hasFragments() const { return flags & (1 << 9); } void SessionExpectedBody::clearFragmentsFlag() { flags &= ~(1 << 9); } void SessionExpectedBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) commands.encode(buffer); if (flags & (1 << 9)) fragments.encode(buffer); } void SessionExpectedBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionExpectedBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) commands.decode(buffer); if (flags & (1 << 9)) fragments.decode(buffer); } void SessionExpectedBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionExpectedBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += commands.encodedSize(); if (flags & (1 << 9)) total += fragments.encodedSize(); return total; } uint32_t SessionExpectedBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionExpectedBody::print(std::ostream& out) const { out << "{SessionExpectedBody: "; if (flags & (1 << 8)) out << "commands=" << commands << "; "; if (flags & (1 << 9)) out << "fragments=" << fragments << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/TxRollbackBody.h0000664000076400007640000000510111752725676021356 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_TXROLLBACKBODY_H #define QPID_FRAMING_TXROLLBACKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN TxRollbackBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x5; static const MethodId METHOD_ID = 0x3; TxRollbackBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.rollback(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class TxRollbackBody */ }} #endif /*!QPID_FRAMING_TXROLLBACKBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionSessionStateBody.h0000664000076400007640000001345011752725676025325 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONSESSIONSTATEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONSESSIONSTATEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionSessionStateBody : public ModelMethod { SequenceNumber replayStart; SequenceNumber commandPoint; SequenceSet sentIncomplete; SequenceNumber expected; SequenceNumber received; SequenceSet unknownCompleted; SequenceSet receivedIncomplete; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x1F; ClusterConnectionSessionStateBody( ProtocolVersion, const SequenceNumber& _replayStart, const SequenceNumber& _commandPoint, const SequenceSet& _sentIncomplete, const SequenceNumber& _expected, const SequenceNumber& _received, const SequenceSet& _unknownCompleted, const SequenceSet& _receivedIncomplete, bool _dtxSelected) : replayStart(_replayStart), commandPoint(_commandPoint), sentIncomplete(_sentIncomplete), expected(_expected), received(_received), unknownCompleted(_unknownCompleted), receivedIncomplete(_receivedIncomplete), flags(0){ setDtxSelected(_dtxSelected); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); flags |= (1 << 14); } ClusterConnectionSessionStateBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setReplayStart(const SequenceNumber& _replayStart); QPID_COMMON_EXTERN SequenceNumber getReplayStart() const; QPID_COMMON_EXTERN bool hasReplayStart() const; QPID_COMMON_EXTERN void clearReplayStartFlag(); QPID_COMMON_EXTERN void setCommandPoint(const SequenceNumber& _commandPoint); QPID_COMMON_EXTERN SequenceNumber getCommandPoint() const; QPID_COMMON_EXTERN bool hasCommandPoint() const; QPID_COMMON_EXTERN void clearCommandPointFlag(); QPID_COMMON_EXTERN void setSentIncomplete(const SequenceSet& _sentIncomplete); QPID_COMMON_EXTERN const SequenceSet& getSentIncomplete() const; QPID_COMMON_EXTERN bool hasSentIncomplete() const; QPID_COMMON_EXTERN void clearSentIncompleteFlag(); QPID_COMMON_EXTERN void setExpected(const SequenceNumber& _expected); QPID_COMMON_EXTERN SequenceNumber getExpected() const; QPID_COMMON_EXTERN bool hasExpected() const; QPID_COMMON_EXTERN void clearExpectedFlag(); QPID_COMMON_EXTERN void setReceived(const SequenceNumber& _received); QPID_COMMON_EXTERN SequenceNumber getReceived() const; QPID_COMMON_EXTERN bool hasReceived() const; QPID_COMMON_EXTERN void clearReceivedFlag(); QPID_COMMON_EXTERN void setUnknownCompleted(const SequenceSet& _unknownCompleted); QPID_COMMON_EXTERN const SequenceSet& getUnknownCompleted() const; QPID_COMMON_EXTERN bool hasUnknownCompleted() const; QPID_COMMON_EXTERN void clearUnknownCompletedFlag(); QPID_COMMON_EXTERN void setReceivedIncomplete(const SequenceSet& _receivedIncomplete); QPID_COMMON_EXTERN const SequenceSet& getReceivedIncomplete() const; QPID_COMMON_EXTERN bool hasReceivedIncomplete() const; QPID_COMMON_EXTERN void clearReceivedIncompleteFlag(); QPID_COMMON_EXTERN void setDtxSelected(bool _dtxSelected); QPID_COMMON_EXTERN bool getDtxSelected() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.sessionState(getReplayStart(), getCommandPoint(), getSentIncomplete(), getExpected(), getReceived(), getUnknownCompleted(), getReceivedIncomplete(), getDtxSelected()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionSessionStateBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONSESSIONSTATEBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionOutputTaskBody.cpp0000664000076400007640000000615311752725676025361 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionOutputTaskBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionOutputTaskBody::setChannel(uint16_t _channel) { channel = _channel; flags |= (1 << 8); } uint16_t ClusterConnectionOutputTaskBody::getChannel() const { return channel; } bool ClusterConnectionOutputTaskBody::hasChannel() const { return flags & (1 << 8); } void ClusterConnectionOutputTaskBody::clearChannelFlag() { flags &= ~(1 << 8); } void ClusterConnectionOutputTaskBody::setName(const std::string& _name) { name = _name; flags |= (1 << 9); } const std::string& ClusterConnectionOutputTaskBody::getName() const { return name; } bool ClusterConnectionOutputTaskBody::hasName() const { return flags & (1 << 9); } void ClusterConnectionOutputTaskBody::clearNameFlag() { flags &= ~(1 << 9); } void ClusterConnectionOutputTaskBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShort(channel); if (flags & (1 << 9)) buffer.putShortString(name); } void ClusterConnectionOutputTaskBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionOutputTaskBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) channel = buffer.getShort(); if (flags & (1 << 9)) buffer.getShortString(name); } void ClusterConnectionOutputTaskBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionOutputTaskBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2;//channel if (flags & (1 << 9)) total += 1 + name.size(); return total; } uint32_t ClusterConnectionOutputTaskBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionOutputTaskBody::print(std::ostream& out) const { out << "{ClusterConnectionOutputTaskBody: "; if (flags & (1 << 8)) out << "channel=" << channel << "; "; if (flags & (1 << 9)) out << "name=" << name << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionTxPublishBody.h0000664000076400007640000000635511752725676024631 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONTXPUBLISHBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONTXPUBLISHBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionTxPublishBody : public ModelMethod { Array queues; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x16; ClusterConnectionTxPublishBody( ProtocolVersion, const Array& _queues, bool _delivered) : queues(_queues), flags(0){ setDelivered(_delivered); flags |= (1 << 8); } ClusterConnectionTxPublishBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueues(const Array& _queues); QPID_COMMON_EXTERN const Array& getQueues() const; QPID_COMMON_EXTERN bool hasQueues() const; QPID_COMMON_EXTERN void clearQueuesFlag(); QPID_COMMON_EXTERN void setDelivered(bool _delivered); QPID_COMMON_EXTERN bool getDelivered() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.txPublish(getQueues(), getDelivered()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionTxPublishBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONTXPUBLISHBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionClockBody.h0000664000076400007640000000600111752725676023726 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONCLOCKBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONCLOCKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionClockBody : public ModelMethod { uint64_t time; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x40; ClusterConnectionClockBody( ProtocolVersion, uint64_t _time) : time(_time), flags(0){ flags |= (1 << 8); } ClusterConnectionClockBody(ProtocolVersion=ProtocolVersion()) : time(0), flags(0) {} QPID_COMMON_EXTERN void setTime(uint64_t _time); QPID_COMMON_EXTERN uint64_t getTime() const; QPID_COMMON_EXTERN bool hasTime() const; QPID_COMMON_EXTERN void clearTimeFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.clock(getTime()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionClockBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONCLOCKBODY_H*/ qpidc-0.16/src/qpid/framing/ReplyTo.cpp0000664000076400007640000000600111752725676020424 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ReplyTo.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ReplyTo::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 8); } const std::string& ReplyTo::getExchange() const { return exchange; } bool ReplyTo::hasExchange() const { return flags & (1 << 8); } void ReplyTo::clearExchangeFlag() { flags &= ~(1 << 8); } void ReplyTo::setRoutingKey(const std::string& _routingKey) { routingKey = _routingKey; flags |= (1 << 9); } const std::string& ReplyTo::getRoutingKey() const { return routingKey; } bool ReplyTo::hasRoutingKey() const { return flags & (1 << 9); } void ReplyTo::clearRoutingKeyFlag() { flags &= ~(1 << 9); } void ReplyTo::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(exchange); if (flags & (1 << 9)) buffer.putShortString(routingKey); } void ReplyTo::encode(Buffer& buffer) const { buffer.putShort(bodySize()); encodeStructBody(buffer); } void ReplyTo::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(exchange); if (flags & (1 << 9)) buffer.getShortString(routingKey); } void ReplyTo::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getShort(); decodeStructBody(buffer); } uint32_t ReplyTo::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 1 + exchange.size(); if (flags & (1 << 9)) total += 1 + routingKey.size(); return total; } uint32_t ReplyTo::encodedSize() const { uint32_t total = bodySize(); total += 2/*size field*/; return total; } void ReplyTo::print(std::ostream& out) const { out << "{ReplyTo: "; if (flags & (1 << 8)) out << "exchange=" << exchange << "; "; if (flags & (1 << 9)) out << "routing-key=" << routingKey << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const ReplyTo& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/MessageResumeBody.h0000664000076400007640000000663411752725676022072 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGERESUMEBODY_H #define QPID_FRAMING_MESSAGERESUMEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageResumeBody : public ModelMethod { std::string destination; std::string resumeId; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0x6; MessageResumeBody( ProtocolVersion, const std::string& _destination, const std::string& _resumeId) : destination(_destination), resumeId(_resumeId), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } MessageResumeBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setDestination(const std::string& _destination); QPID_COMMON_EXTERN const std::string& getDestination() const; QPID_COMMON_EXTERN bool hasDestination() const; QPID_COMMON_EXTERN void clearDestinationFlag(); QPID_COMMON_EXTERN void setResumeId(const std::string& _resumeId); QPID_COMMON_EXTERN const std::string& getResumeId() const; QPID_COMMON_EXTERN bool hasResumeId() const; QPID_COMMON_EXTERN void clearResumeIdFlag(); typedef MessageResumeResult ResultType; template ResultType invoke(T& invocable) const { return invocable.resume(getDestination(), getResumeId()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return true; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageResumeBody */ }} #endif /*!QPID_FRAMING_MESSAGERESUMEBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionConsumerStateBody.cpp0000664000076400007640000001236411752725676026033 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionConsumerStateBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionConsumerStateBody::setName(const std::string& _name) { name = _name; flags |= (1 << 8); } const std::string& ClusterConnectionConsumerStateBody::getName() const { return name; } bool ClusterConnectionConsumerStateBody::hasName() const { return flags & (1 << 8); } void ClusterConnectionConsumerStateBody::clearNameFlag() { flags &= ~(1 << 8); } void ClusterConnectionConsumerStateBody::setBlocked(bool _blocked) { if (_blocked) flags |= (1 << 9); else flags &= ~(1 << 9); } bool ClusterConnectionConsumerStateBody::getBlocked() const { return flags & (1 << 9); } void ClusterConnectionConsumerStateBody::setNotifyEnabled(bool _notifyEnabled) { if (_notifyEnabled) flags |= (1 << 10); else flags &= ~(1 << 10); } bool ClusterConnectionConsumerStateBody::getNotifyEnabled() const { return flags & (1 << 10); } void ClusterConnectionConsumerStateBody::setPosition(const SequenceNumber& _position) { position = _position; flags |= (1 << 11); } SequenceNumber ClusterConnectionConsumerStateBody::getPosition() const { return position; } bool ClusterConnectionConsumerStateBody::hasPosition() const { return flags & (1 << 11); } void ClusterConnectionConsumerStateBody::clearPositionFlag() { flags &= ~(1 << 11); } void ClusterConnectionConsumerStateBody::setUsedMsgCredit(uint32_t _usedMsgCredit) { usedMsgCredit = _usedMsgCredit; flags |= (1 << 12); } uint32_t ClusterConnectionConsumerStateBody::getUsedMsgCredit() const { return usedMsgCredit; } bool ClusterConnectionConsumerStateBody::hasUsedMsgCredit() const { return flags & (1 << 12); } void ClusterConnectionConsumerStateBody::clearUsedMsgCreditFlag() { flags &= ~(1 << 12); } void ClusterConnectionConsumerStateBody::setUsedByteCredit(uint32_t _usedByteCredit) { usedByteCredit = _usedByteCredit; flags |= (1 << 13); } uint32_t ClusterConnectionConsumerStateBody::getUsedByteCredit() const { return usedByteCredit; } bool ClusterConnectionConsumerStateBody::hasUsedByteCredit() const { return flags & (1 << 13); } void ClusterConnectionConsumerStateBody::clearUsedByteCreditFlag() { flags &= ~(1 << 13); } void ClusterConnectionConsumerStateBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(name); if (flags & (1 << 11)) position.encode(buffer); if (flags & (1 << 12)) buffer.putLong(usedMsgCredit); if (flags & (1 << 13)) buffer.putLong(usedByteCredit); } void ClusterConnectionConsumerStateBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionConsumerStateBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(name); if (flags & (1 << 11)) position.decode(buffer); if (flags & (1 << 12)) usedMsgCredit = buffer.getLong(); if (flags & (1 << 13)) usedByteCredit = buffer.getLong(); } void ClusterConnectionConsumerStateBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionConsumerStateBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + name.size(); if (flags & (1 << 11)) total += position.encodedSize(); if (flags & (1 << 12)) total += 4;//usedMsgCredit if (flags & (1 << 13)) total += 4;//usedByteCredit return total; } uint32_t ClusterConnectionConsumerStateBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionConsumerStateBody::print(std::ostream& out) const { out << "{ClusterConnectionConsumerStateBody: "; if (flags & (1 << 8)) out << "name=" << name << "; "; if (flags & (1 << 9)) out << "blocked=" << getBlocked() << "; "; if (flags & (1 << 10)) out << "notifyEnabled=" << getNotifyEnabled() << "; "; if (flags & (1 << 11)) out << "position=" << position << "; "; if (flags & (1 << 12)) out << "used-msg-credit=" << usedMsgCredit << "; "; if (flags & (1 << 13)) out << "used-byte-credit=" << usedByteCredit << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterDeliverToQueueBody.cpp0000664000076400007640000000606711752725676024124 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterDeliverToQueueBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterDeliverToQueueBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ClusterDeliverToQueueBody::getQueue() const { return queue; } bool ClusterDeliverToQueueBody::hasQueue() const { return flags & (1 << 8); } void ClusterDeliverToQueueBody::clearQueueFlag() { flags &= ~(1 << 8); } void ClusterDeliverToQueueBody::setMessage(const std::string& _message) { message = _message; flags |= (1 << 9); } const std::string& ClusterDeliverToQueueBody::getMessage() const { return message; } bool ClusterDeliverToQueueBody::hasMessage() const { return flags & (1 << 9); } void ClusterDeliverToQueueBody::clearMessageFlag() { flags &= ~(1 << 9); } void ClusterDeliverToQueueBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(queue); if (flags & (1 << 9)) buffer.putLongString(message); } void ClusterDeliverToQueueBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterDeliverToQueueBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(queue); if (flags & (1 << 9)) buffer.getLongString(message); } void ClusterDeliverToQueueBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterDeliverToQueueBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + queue.size(); if (flags & (1 << 9)) total += 4 + message.size(); return total; } uint32_t ClusterDeliverToQueueBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterDeliverToQueueBody::print(std::ostream& out) const { out << "{ClusterDeliverToQueueBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "message=" << message << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MethodBodyConstVisitor.h0000664000076400007640000003046611752725675023133 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_METHODBODYCONSTVISITOR_H #define QPID_FRAMING_METHODBODYCONSTVISITOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// namespace qpid { namespace framing { class ConnectionStartBody; class ConnectionStartOkBody; class ConnectionSecureBody; class ConnectionSecureOkBody; class ConnectionTuneBody; class ConnectionTuneOkBody; class ConnectionOpenBody; class ConnectionOpenOkBody; class ConnectionRedirectBody; class ConnectionHeartbeatBody; class ConnectionCloseBody; class ConnectionCloseOkBody; class SessionAttachBody; class SessionAttachedBody; class SessionDetachBody; class SessionDetachedBody; class SessionRequestTimeoutBody; class SessionTimeoutBody; class SessionCommandPointBody; class SessionExpectedBody; class SessionConfirmedBody; class SessionCompletedBody; class SessionKnownCompletedBody; class SessionFlushBody; class SessionGapBody; class ExecutionSyncBody; class ExecutionResultBody; class ExecutionExceptionBody; class MessageTransferBody; class MessageAcceptBody; class MessageRejectBody; class MessageReleaseBody; class MessageAcquireBody; class MessageResumeBody; class MessageSubscribeBody; class MessageCancelBody; class MessageSetFlowModeBody; class MessageFlowBody; class MessageFlushBody; class MessageStopBody; class TxSelectBody; class TxCommitBody; class TxRollbackBody; class DtxSelectBody; class DtxStartBody; class DtxEndBody; class DtxCommitBody; class DtxForgetBody; class DtxGetTimeoutBody; class DtxPrepareBody; class DtxRecoverBody; class DtxRollbackBody; class DtxSetTimeoutBody; class ExchangeDeclareBody; class ExchangeDeleteBody; class ExchangeQueryBody; class ExchangeBindBody; class ExchangeUnbindBody; class ExchangeBoundBody; class QueueDeclareBody; class QueueDeleteBody; class QueuePurgeBody; class QueueQueryBody; class FileQosBody; class FileQosOkBody; class FileConsumeBody; class FileConsumeOkBody; class FileCancelBody; class FileOpenBody; class FileOpenOkBody; class FileStageBody; class FilePublishBody; class FileReturnBody; class FileDeliverBody; class FileAckBody; class FileRejectBody; class StreamQosBody; class StreamQosOkBody; class StreamConsumeBody; class StreamConsumeOkBody; class StreamCancelBody; class StreamPublishBody; class StreamReturnBody; class StreamDeliverBody; class ClusterUpdateRequestBody; class ClusterUpdateOfferBody; class ClusterRetractOfferBody; class ClusterInitialStatusBody; class ClusterReadyBody; class ClusterConfigChangeBody; class ClusterErrorCheckBody; class ClusterTimerWakeupBody; class ClusterTimerDropBody; class ClusterShutdownBody; class ClusterDeliverToQueueBody; class ClusterClockBody; class ClusterConnectionAnnounceBody; class ClusterConnectionDeliverCloseBody; class ClusterConnectionDeliverDoOutputBody; class ClusterConnectionAbortBody; class ClusterConnectionShadowSetUserBody; class ClusterConnectionShadowPrepareBody; class ClusterConnectionConsumerStateBody; class ClusterConnectionDeliveryRecordBody; class ClusterConnectionTxStartBody; class ClusterConnectionTxAcceptBody; class ClusterConnectionTxDequeueBody; class ClusterConnectionTxEnqueueBody; class ClusterConnectionTxPublishBody; class ClusterConnectionTxEndBody; class ClusterConnectionAccumulatedAckBody; class ClusterConnectionOutputTaskBody; class ClusterConnectionDtxStartBody; class ClusterConnectionDtxEndBody; class ClusterConnectionDtxAckBody; class ClusterConnectionDtxBufferRefBody; class ClusterConnectionDtxWorkRecordBody; class ClusterConnectionSessionStateBody; class ClusterConnectionShadowReadyBody; class ClusterConnectionMembershipBody; class ClusterConnectionRetractOfferBody; class ClusterConnectionQueuePositionBody; class ClusterConnectionExchangeBody; class ClusterConnectionAddQueueListenerBody; class ClusterConnectionManagementSetupStateBody; class ClusterConnectionConfigBody; class ClusterConnectionQueueFairshareStateBody; class ClusterConnectionQueueObserverStateBody; class ClusterConnectionClockBody; class ClusterConnectionQueueDequeueSincePurgeStateBody; class MethodBodyConstVisitor { public: virtual ~MethodBodyConstVisitor() {} virtual void visit(const ConnectionStartBody&) = 0; virtual void visit(const ConnectionStartOkBody&) = 0; virtual void visit(const ConnectionSecureBody&) = 0; virtual void visit(const ConnectionSecureOkBody&) = 0; virtual void visit(const ConnectionTuneBody&) = 0; virtual void visit(const ConnectionTuneOkBody&) = 0; virtual void visit(const ConnectionOpenBody&) = 0; virtual void visit(const ConnectionOpenOkBody&) = 0; virtual void visit(const ConnectionRedirectBody&) = 0; virtual void visit(const ConnectionHeartbeatBody&) = 0; virtual void visit(const ConnectionCloseBody&) = 0; virtual void visit(const ConnectionCloseOkBody&) = 0; virtual void visit(const SessionAttachBody&) = 0; virtual void visit(const SessionAttachedBody&) = 0; virtual void visit(const SessionDetachBody&) = 0; virtual void visit(const SessionDetachedBody&) = 0; virtual void visit(const SessionRequestTimeoutBody&) = 0; virtual void visit(const SessionTimeoutBody&) = 0; virtual void visit(const SessionCommandPointBody&) = 0; virtual void visit(const SessionExpectedBody&) = 0; virtual void visit(const SessionConfirmedBody&) = 0; virtual void visit(const SessionCompletedBody&) = 0; virtual void visit(const SessionKnownCompletedBody&) = 0; virtual void visit(const SessionFlushBody&) = 0; virtual void visit(const SessionGapBody&) = 0; virtual void visit(const ExecutionSyncBody&) = 0; virtual void visit(const ExecutionResultBody&) = 0; virtual void visit(const ExecutionExceptionBody&) = 0; virtual void visit(const MessageTransferBody&) = 0; virtual void visit(const MessageAcceptBody&) = 0; virtual void visit(const MessageRejectBody&) = 0; virtual void visit(const MessageReleaseBody&) = 0; virtual void visit(const MessageAcquireBody&) = 0; virtual void visit(const MessageResumeBody&) = 0; virtual void visit(const MessageSubscribeBody&) = 0; virtual void visit(const MessageCancelBody&) = 0; virtual void visit(const MessageSetFlowModeBody&) = 0; virtual void visit(const MessageFlowBody&) = 0; virtual void visit(const MessageFlushBody&) = 0; virtual void visit(const MessageStopBody&) = 0; virtual void visit(const TxSelectBody&) = 0; virtual void visit(const TxCommitBody&) = 0; virtual void visit(const TxRollbackBody&) = 0; virtual void visit(const DtxSelectBody&) = 0; virtual void visit(const DtxStartBody&) = 0; virtual void visit(const DtxEndBody&) = 0; virtual void visit(const DtxCommitBody&) = 0; virtual void visit(const DtxForgetBody&) = 0; virtual void visit(const DtxGetTimeoutBody&) = 0; virtual void visit(const DtxPrepareBody&) = 0; virtual void visit(const DtxRecoverBody&) = 0; virtual void visit(const DtxRollbackBody&) = 0; virtual void visit(const DtxSetTimeoutBody&) = 0; virtual void visit(const ExchangeDeclareBody&) = 0; virtual void visit(const ExchangeDeleteBody&) = 0; virtual void visit(const ExchangeQueryBody&) = 0; virtual void visit(const ExchangeBindBody&) = 0; virtual void visit(const ExchangeUnbindBody&) = 0; virtual void visit(const ExchangeBoundBody&) = 0; virtual void visit(const QueueDeclareBody&) = 0; virtual void visit(const QueueDeleteBody&) = 0; virtual void visit(const QueuePurgeBody&) = 0; virtual void visit(const QueueQueryBody&) = 0; virtual void visit(const FileQosBody&) = 0; virtual void visit(const FileQosOkBody&) = 0; virtual void visit(const FileConsumeBody&) = 0; virtual void visit(const FileConsumeOkBody&) = 0; virtual void visit(const FileCancelBody&) = 0; virtual void visit(const FileOpenBody&) = 0; virtual void visit(const FileOpenOkBody&) = 0; virtual void visit(const FileStageBody&) = 0; virtual void visit(const FilePublishBody&) = 0; virtual void visit(const FileReturnBody&) = 0; virtual void visit(const FileDeliverBody&) = 0; virtual void visit(const FileAckBody&) = 0; virtual void visit(const FileRejectBody&) = 0; virtual void visit(const StreamQosBody&) = 0; virtual void visit(const StreamQosOkBody&) = 0; virtual void visit(const StreamConsumeBody&) = 0; virtual void visit(const StreamConsumeOkBody&) = 0; virtual void visit(const StreamCancelBody&) = 0; virtual void visit(const StreamPublishBody&) = 0; virtual void visit(const StreamReturnBody&) = 0; virtual void visit(const StreamDeliverBody&) = 0; virtual void visit(const ClusterUpdateRequestBody&) = 0; virtual void visit(const ClusterUpdateOfferBody&) = 0; virtual void visit(const ClusterRetractOfferBody&) = 0; virtual void visit(const ClusterInitialStatusBody&) = 0; virtual void visit(const ClusterReadyBody&) = 0; virtual void visit(const ClusterConfigChangeBody&) = 0; virtual void visit(const ClusterErrorCheckBody&) = 0; virtual void visit(const ClusterTimerWakeupBody&) = 0; virtual void visit(const ClusterTimerDropBody&) = 0; virtual void visit(const ClusterShutdownBody&) = 0; virtual void visit(const ClusterDeliverToQueueBody&) = 0; virtual void visit(const ClusterClockBody&) = 0; virtual void visit(const ClusterConnectionAnnounceBody&) = 0; virtual void visit(const ClusterConnectionDeliverCloseBody&) = 0; virtual void visit(const ClusterConnectionDeliverDoOutputBody&) = 0; virtual void visit(const ClusterConnectionAbortBody&) = 0; virtual void visit(const ClusterConnectionShadowSetUserBody&) = 0; virtual void visit(const ClusterConnectionShadowPrepareBody&) = 0; virtual void visit(const ClusterConnectionConsumerStateBody&) = 0; virtual void visit(const ClusterConnectionDeliveryRecordBody&) = 0; virtual void visit(const ClusterConnectionTxStartBody&) = 0; virtual void visit(const ClusterConnectionTxAcceptBody&) = 0; virtual void visit(const ClusterConnectionTxDequeueBody&) = 0; virtual void visit(const ClusterConnectionTxEnqueueBody&) = 0; virtual void visit(const ClusterConnectionTxPublishBody&) = 0; virtual void visit(const ClusterConnectionTxEndBody&) = 0; virtual void visit(const ClusterConnectionAccumulatedAckBody&) = 0; virtual void visit(const ClusterConnectionOutputTaskBody&) = 0; virtual void visit(const ClusterConnectionDtxStartBody&) = 0; virtual void visit(const ClusterConnectionDtxEndBody&) = 0; virtual void visit(const ClusterConnectionDtxAckBody&) = 0; virtual void visit(const ClusterConnectionDtxBufferRefBody&) = 0; virtual void visit(const ClusterConnectionDtxWorkRecordBody&) = 0; virtual void visit(const ClusterConnectionSessionStateBody&) = 0; virtual void visit(const ClusterConnectionShadowReadyBody&) = 0; virtual void visit(const ClusterConnectionMembershipBody&) = 0; virtual void visit(const ClusterConnectionRetractOfferBody&) = 0; virtual void visit(const ClusterConnectionQueuePositionBody&) = 0; virtual void visit(const ClusterConnectionExchangeBody&) = 0; virtual void visit(const ClusterConnectionAddQueueListenerBody&) = 0; virtual void visit(const ClusterConnectionManagementSetupStateBody&) = 0; virtual void visit(const ClusterConnectionConfigBody&) = 0; virtual void visit(const ClusterConnectionQueueFairshareStateBody&) = 0; virtual void visit(const ClusterConnectionQueueObserverStateBody&) = 0; virtual void visit(const ClusterConnectionClockBody&) = 0; virtual void visit(const ClusterConnectionQueueDequeueSincePurgeStateBody&) = 0; }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_METHODBODYCONSTVISITOR_H*/ qpidc-0.16/src/qpid/framing/QueueDeleteBody.cpp0000664000076400007640000000553611752725676022067 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/QueueDeleteBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void QueueDeleteBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& QueueDeleteBody::getQueue() const { return queue; } bool QueueDeleteBody::hasQueue() const { return flags & (1 << 8); } void QueueDeleteBody::clearQueueFlag() { flags &= ~(1 << 8); } void QueueDeleteBody::setIfUnused(bool _ifUnused) { if (_ifUnused) flags |= (1 << 9); else flags &= ~(1 << 9); } bool QueueDeleteBody::getIfUnused() const { return flags & (1 << 9); } void QueueDeleteBody::setIfEmpty(bool _ifEmpty) { if (_ifEmpty) flags |= (1 << 10); else flags &= ~(1 << 10); } bool QueueDeleteBody::getIfEmpty() const { return flags & (1 << 10); } void QueueDeleteBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); } void QueueDeleteBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void QueueDeleteBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); } void QueueDeleteBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t QueueDeleteBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); return total; } uint32_t QueueDeleteBody::encodedSize() const { uint32_t total = bodySize(); return total; } void QueueDeleteBody::print(std::ostream& out) const { out << "{QueueDeleteBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "if-unused=" << getIfUnused() << "; "; if (flags & (1 << 10)) out << "if-empty=" << getIfEmpty() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionDtxWorkRecordBody.h0000664000076400007640000000712111752725676025440 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONDTXWORKRECORDBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONDTXWORKRECORDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionDtxWorkRecordBody : public ModelMethod { std::string xid; uint32_t timeout; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x1E; ClusterConnectionDtxWorkRecordBody( ProtocolVersion, const std::string& _xid, bool _prepared, uint32_t _timeout) : xid(_xid), timeout(_timeout), flags(0){ setPrepared(_prepared); flags |= (1 << 8); flags |= (1 << 10); } ClusterConnectionDtxWorkRecordBody(ProtocolVersion=ProtocolVersion()) : timeout(0), flags(0) {} QPID_COMMON_EXTERN void setXid(const std::string& _xid); QPID_COMMON_EXTERN const std::string& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); QPID_COMMON_EXTERN void setPrepared(bool _prepared); QPID_COMMON_EXTERN bool getPrepared() const; QPID_COMMON_EXTERN void setTimeout(uint32_t _timeout); QPID_COMMON_EXTERN uint32_t getTimeout() const; QPID_COMMON_EXTERN bool hasTimeout() const; QPID_COMMON_EXTERN void clearTimeoutFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.dtxWorkRecord(getXid(), getPrepared(), getTimeout()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionDtxWorkRecordBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONDTXWORKRECORDBODY_H*/ qpidc-0.16/src/qpid/framing/Uuid.cpp0000664000076400007640000000462411647113065017727 0ustar00jrossjross00000000000000/* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/framing/Uuid.h" #include "qpid/sys/uuid.h" #include "qpid/Exception.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/Msg.h" namespace qpid { namespace framing { using namespace std; static const size_t UNPARSED_SIZE=36; Uuid::Uuid(bool unique) { if (unique) { generate(); } else { clear(); } } Uuid::Uuid(const uint8_t* data) { assign(data); } void Uuid::assign(const uint8_t* data) { // This const cast is for Solaris which has a // uuid_copy that takes a non const 2nd argument uuid_copy(c_array(), const_cast(data)); } void Uuid::generate() { uuid_generate(c_array()); } void Uuid::clear() { uuid_clear(c_array()); } // Force int 0/!0 to false/true; avoids compile warnings. bool Uuid::isNull() const { // This const cast is for Solaris which has a // uuid_is_null that takes a non const argument return !!uuid_is_null(const_cast(data())); } void Uuid::encode(Buffer& buf) const { buf.putRawData(data(), size()); } void Uuid::decode(Buffer& buf) { if (buf.available() < size()) throw IllegalArgumentException(QPID_MSG("Not enough data for UUID.")); buf.getRawData(c_array(), size()); } ostream& operator<<(ostream& out, Uuid uuid) { char unparsed[UNPARSED_SIZE + 1]; uuid_unparse(uuid.data(), unparsed); return out << unparsed; } istream& operator>>(istream& in, Uuid& uuid) { char unparsed[UNPARSED_SIZE + 1] = {0}; in.get(unparsed, sizeof(unparsed)); if (!in.fail()) { if (uuid_parse(unparsed, uuid.c_array()) != 0) in.setstate(ios::failbit); } return in; } std::string Uuid::str() const { std::ostringstream os; os << *this; return os.str(); } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/ClusterConnectionConsumerStateBody.h0000664000076400007640000001117511752725676025477 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONCONSUMERSTATEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONCONSUMERSTATEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionConsumerStateBody : public ModelMethod { std::string name; SequenceNumber position; uint32_t usedMsgCredit; uint32_t usedByteCredit; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x10; ClusterConnectionConsumerStateBody( ProtocolVersion, const std::string& _name, bool _blocked, bool _notifyEnabled, const SequenceNumber& _position, uint32_t _usedMsgCredit, uint32_t _usedByteCredit) : name(_name), position(_position), usedMsgCredit(_usedMsgCredit), usedByteCredit(_usedByteCredit), flags(0){ setBlocked(_blocked); setNotifyEnabled(_notifyEnabled); flags |= (1 << 8); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); } ClusterConnectionConsumerStateBody(ProtocolVersion=ProtocolVersion()) : usedMsgCredit(0), usedByteCredit(0), flags(0) {} QPID_COMMON_EXTERN void setName(const std::string& _name); QPID_COMMON_EXTERN const std::string& getName() const; QPID_COMMON_EXTERN bool hasName() const; QPID_COMMON_EXTERN void clearNameFlag(); QPID_COMMON_EXTERN void setBlocked(bool _blocked); QPID_COMMON_EXTERN bool getBlocked() const; QPID_COMMON_EXTERN void setNotifyEnabled(bool _notifyEnabled); QPID_COMMON_EXTERN bool getNotifyEnabled() const; QPID_COMMON_EXTERN void setPosition(const SequenceNumber& _position); QPID_COMMON_EXTERN SequenceNumber getPosition() const; QPID_COMMON_EXTERN bool hasPosition() const; QPID_COMMON_EXTERN void clearPositionFlag(); QPID_COMMON_EXTERN void setUsedMsgCredit(uint32_t _usedMsgCredit); QPID_COMMON_EXTERN uint32_t getUsedMsgCredit() const; QPID_COMMON_EXTERN bool hasUsedMsgCredit() const; QPID_COMMON_EXTERN void clearUsedMsgCreditFlag(); QPID_COMMON_EXTERN void setUsedByteCredit(uint32_t _usedByteCredit); QPID_COMMON_EXTERN uint32_t getUsedByteCredit() const; QPID_COMMON_EXTERN bool hasUsedByteCredit() const; QPID_COMMON_EXTERN void clearUsedByteCreditFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.consumerState(getName(), getBlocked(), getNotifyEnabled(), getPosition(), getUsedMsgCredit(), getUsedByteCredit()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionConsumerStateBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONCONSUMERSTATEBODY_H*/ qpidc-0.16/src/qpid/framing/FileRejectBody.cpp0000664000076400007640000000515111752725676021665 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileRejectBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileRejectBody::setDeliveryTag(uint64_t _deliveryTag) { deliveryTag = _deliveryTag; flags |= (1 << 8); } uint64_t FileRejectBody::getDeliveryTag() const { return deliveryTag; } bool FileRejectBody::hasDeliveryTag() const { return flags & (1 << 8); } void FileRejectBody::clearDeliveryTagFlag() { flags &= ~(1 << 8); } void FileRejectBody::setRequeue(bool _requeue) { if (_requeue) flags |= (1 << 9); else flags &= ~(1 << 9); } bool FileRejectBody::getRequeue() const { return flags & (1 << 9); } void FileRejectBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(deliveryTag); } void FileRejectBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileRejectBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) deliveryTag = buffer.getLongLong(); } void FileRejectBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileRejectBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 8;//deliveryTag return total; } uint32_t FileRejectBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileRejectBody::print(std::ostream& out) const { out << "{FileRejectBody: "; if (flags & (1 << 8)) out << "delivery-tag=" << deliveryTag << "; "; if (flags & (1 << 9)) out << "requeue=" << getRequeue() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ProtocolVersion.cpp0000664000076400007640000000242111227113407022153 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/ProtocolVersion.h" #include using namespace qpid::framing; const std::string ProtocolVersion::toString() const { std::stringstream ss; ss << major_ << "-" << minor_; return ss.str(); } ProtocolVersion& ProtocolVersion::operator=(ProtocolVersion p) { major_ = p.major_; minor_ = p.minor_; return *this; } bool ProtocolVersion::operator==(ProtocolVersion p) const { return major_ == p.major_ && minor_ == p.minor_; } qpidc-0.16/src/qpid/framing/AMQFrame.h0000664000076400007640000000724711725251223020057 0ustar00jrossjross00000000000000#ifndef _AMQFrame_ #define _AMQFrame_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQDataBlock.h" #include "qpid/framing/AMQHeaderBody.h" #include "qpid/framing/AMQContentBody.h" #include "qpid/framing/AMQHeartbeatBody.h" #include "qpid/framing/ProtocolVersion.h" #include #include #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQFrame : public AMQDataBlock { public: QPID_COMMON_EXTERN AMQFrame(const boost::intrusive_ptr& b=0); QPID_COMMON_EXTERN AMQFrame(const AMQBody& b); QPID_COMMON_EXTERN ~AMQFrame(); ChannelId getChannel() const { return channel; } void setChannel(ChannelId c) { channel = c; } AMQBody* getBody() const { return body.get(); } AMQMethodBody* getMethod() { return getBody() ? getBody()->getMethod() : 0; } const AMQMethodBody* getMethod() const { return getBody() ? getBody()->getMethod() : 0; } void setMethod(ClassId c, MethodId m); template T* castBody() { return boost::polymorphic_downcast(getBody()); } template const T* castBody() const { return boost::polymorphic_downcast(getBody()); } /** * Take a deep copy of the body currently referenced */ QPID_COMMON_EXTERN void cloneBody(); QPID_COMMON_EXTERN void encode(Buffer& buffer) const; QPID_COMMON_EXTERN bool decode(Buffer& buffer); QPID_COMMON_EXTERN uint32_t encodedSize() const; // 0-10 terminology: first/last frame (in segment) first/last segment (in assembly) bool isFirstSegment() const { return bof; } bool isLastSegment() const { return eof; } bool isFirstFrame() const { return bos; } bool isLastFrame() const { return eos; } void setFirstSegment(bool set=true) { bof = set; } void setLastSegment(bool set=true) { eof = set; } void setFirstFrame(bool set=true) { bos = set; } void setLastFrame(bool set=true) { eos = set; } // 0-9 terminology: beginning/end of frameset, beginning/end of segment. bool getBof() const { return bof; } void setBof(bool isBof) { bof = isBof; } bool getEof() const { return eof; } void setEof(bool isEof) { eof = isEof; } bool getBos() const { return bos; } void setBos(bool isBos) { bos = isBos; } bool getEos() const { return eos; } void setEos(bool isEos) { eos = isEos; } static uint16_t DECODE_SIZE_MIN; QPID_COMMON_EXTERN static uint32_t frameOverhead(); /** Must point to at least DECODE_SIZE_MIN bytes of data */ static uint16_t decodeSize(char* data); private: void init(); boost::intrusive_ptr body; uint16_t channel : 16; uint8_t subchannel : 8; bool bof : 1; bool eof : 1; bool bos : 1; bool eos : 1; }; QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const AMQFrame&); }} // namespace qpid::framing #endif qpidc-0.16/src/qpid/framing/QueuePurgeBody.cpp0000664000076400007640000000446111752725676021743 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/QueuePurgeBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void QueuePurgeBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& QueuePurgeBody::getQueue() const { return queue; } bool QueuePurgeBody::hasQueue() const { return flags & (1 << 8); } void QueuePurgeBody::clearQueueFlag() { flags &= ~(1 << 8); } void QueuePurgeBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); } void QueuePurgeBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void QueuePurgeBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); } void QueuePurgeBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t QueuePurgeBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); return total; } uint32_t QueuePurgeBody::encodedSize() const { uint32_t total = bodySize(); return total; } void QueuePurgeBody::print(std::ostream& out) const { out << "{QueuePurgeBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/DtxStartBody.cpp0000664000076400007640000000532411752725676021430 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxStartBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxStartBody::setXid(const Xid& _xid) { xid = _xid; flags |= (1 << 8); } const Xid& DtxStartBody::getXid() const { return xid; } bool DtxStartBody::hasXid() const { return flags & (1 << 8); } void DtxStartBody::clearXidFlag() { flags &= ~(1 << 8); } void DtxStartBody::setJoin(bool _join) { if (_join) flags |= (1 << 9); else flags &= ~(1 << 9); } bool DtxStartBody::getJoin() const { return flags & (1 << 9); } void DtxStartBody::setResume(bool _resume) { if (_resume) flags |= (1 << 10); else flags &= ~(1 << 10); } bool DtxStartBody::getResume() const { return flags & (1 << 10); } void DtxStartBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) xid.encode(buffer); } void DtxStartBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxStartBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) xid.decode(buffer); } void DtxStartBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxStartBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += xid.encodedSize(); return total; } uint32_t DtxStartBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxStartBody::print(std::ostream& out) const { out << "{DtxStartBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; if (flags & (1 << 9)) out << "join=" << getJoin() << "; "; if (flags & (1 << 10)) out << "resume=" << getResume() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/AMQP_AllProxy.cpp0000664000076400007640000007155411752725675021434 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/AMQP_AllProxy.h" #include "qpid/framing/amqp_types_full.h" #include "qpid/framing/ConnectionStartBody.h" #include "qpid/framing/ConnectionStartOkBody.h" #include "qpid/framing/ConnectionSecureBody.h" #include "qpid/framing/ConnectionSecureOkBody.h" #include "qpid/framing/ConnectionTuneBody.h" #include "qpid/framing/ConnectionTuneOkBody.h" #include "qpid/framing/ConnectionOpenBody.h" #include "qpid/framing/ConnectionOpenOkBody.h" #include "qpid/framing/ConnectionRedirectBody.h" #include "qpid/framing/ConnectionHeartbeatBody.h" #include "qpid/framing/ConnectionCloseBody.h" #include "qpid/framing/ConnectionCloseOkBody.h" #include "qpid/framing/SessionAttachBody.h" #include "qpid/framing/SessionAttachedBody.h" #include "qpid/framing/SessionDetachBody.h" #include "qpid/framing/SessionDetachedBody.h" #include "qpid/framing/SessionRequestTimeoutBody.h" #include "qpid/framing/SessionTimeoutBody.h" #include "qpid/framing/SessionCommandPointBody.h" #include "qpid/framing/SessionExpectedBody.h" #include "qpid/framing/SessionConfirmedBody.h" #include "qpid/framing/SessionCompletedBody.h" #include "qpid/framing/SessionKnownCompletedBody.h" #include "qpid/framing/SessionFlushBody.h" #include "qpid/framing/SessionGapBody.h" #include "qpid/framing/ExecutionSyncBody.h" #include "qpid/framing/ExecutionResultBody.h" #include "qpid/framing/ExecutionExceptionBody.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/MessageAcceptBody.h" #include "qpid/framing/MessageRejectBody.h" #include "qpid/framing/MessageReleaseBody.h" #include "qpid/framing/MessageAcquireBody.h" #include "qpid/framing/MessageResumeBody.h" #include "qpid/framing/MessageSubscribeBody.h" #include "qpid/framing/MessageCancelBody.h" #include "qpid/framing/MessageSetFlowModeBody.h" #include "qpid/framing/MessageFlowBody.h" #include "qpid/framing/MessageFlushBody.h" #include "qpid/framing/MessageStopBody.h" #include "qpid/framing/TxSelectBody.h" #include "qpid/framing/TxCommitBody.h" #include "qpid/framing/TxRollbackBody.h" #include "qpid/framing/DtxSelectBody.h" #include "qpid/framing/DtxStartBody.h" #include "qpid/framing/DtxEndBody.h" #include "qpid/framing/DtxCommitBody.h" #include "qpid/framing/DtxForgetBody.h" #include "qpid/framing/DtxGetTimeoutBody.h" #include "qpid/framing/DtxPrepareBody.h" #include "qpid/framing/DtxRecoverBody.h" #include "qpid/framing/DtxRollbackBody.h" #include "qpid/framing/DtxSetTimeoutBody.h" #include "qpid/framing/ExchangeDeclareBody.h" #include "qpid/framing/ExchangeDeleteBody.h" #include "qpid/framing/ExchangeQueryBody.h" #include "qpid/framing/ExchangeBindBody.h" #include "qpid/framing/ExchangeUnbindBody.h" #include "qpid/framing/ExchangeBoundBody.h" #include "qpid/framing/QueueDeclareBody.h" #include "qpid/framing/QueueDeleteBody.h" #include "qpid/framing/QueuePurgeBody.h" #include "qpid/framing/QueueQueryBody.h" #include "qpid/framing/FileQosBody.h" #include "qpid/framing/FileQosOkBody.h" #include "qpid/framing/FileConsumeBody.h" #include "qpid/framing/FileConsumeOkBody.h" #include "qpid/framing/FileCancelBody.h" #include "qpid/framing/FileOpenBody.h" #include "qpid/framing/FileOpenOkBody.h" #include "qpid/framing/FileStageBody.h" #include "qpid/framing/FilePublishBody.h" #include "qpid/framing/FileReturnBody.h" #include "qpid/framing/FileDeliverBody.h" #include "qpid/framing/FileAckBody.h" #include "qpid/framing/FileRejectBody.h" #include "qpid/framing/StreamQosBody.h" #include "qpid/framing/StreamQosOkBody.h" #include "qpid/framing/StreamConsumeBody.h" #include "qpid/framing/StreamConsumeOkBody.h" #include "qpid/framing/StreamCancelBody.h" #include "qpid/framing/StreamPublishBody.h" #include "qpid/framing/StreamReturnBody.h" #include "qpid/framing/StreamDeliverBody.h" #include "qpid/framing/ClusterUpdateRequestBody.h" #include "qpid/framing/ClusterUpdateOfferBody.h" #include "qpid/framing/ClusterRetractOfferBody.h" #include "qpid/framing/ClusterInitialStatusBody.h" #include "qpid/framing/ClusterReadyBody.h" #include "qpid/framing/ClusterConfigChangeBody.h" #include "qpid/framing/ClusterErrorCheckBody.h" #include "qpid/framing/ClusterTimerWakeupBody.h" #include "qpid/framing/ClusterTimerDropBody.h" #include "qpid/framing/ClusterShutdownBody.h" #include "qpid/framing/ClusterDeliverToQueueBody.h" #include "qpid/framing/ClusterClockBody.h" #include "qpid/framing/ClusterConnectionAnnounceBody.h" #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/ClusterConnectionDeliverDoOutputBody.h" #include "qpid/framing/ClusterConnectionAbortBody.h" #include "qpid/framing/ClusterConnectionShadowSetUserBody.h" #include "qpid/framing/ClusterConnectionShadowPrepareBody.h" #include "qpid/framing/ClusterConnectionConsumerStateBody.h" #include "qpid/framing/ClusterConnectionDeliveryRecordBody.h" #include "qpid/framing/ClusterConnectionTxStartBody.h" #include "qpid/framing/ClusterConnectionTxAcceptBody.h" #include "qpid/framing/ClusterConnectionTxDequeueBody.h" #include "qpid/framing/ClusterConnectionTxEnqueueBody.h" #include "qpid/framing/ClusterConnectionTxPublishBody.h" #include "qpid/framing/ClusterConnectionTxEndBody.h" #include "qpid/framing/ClusterConnectionAccumulatedAckBody.h" #include "qpid/framing/ClusterConnectionOutputTaskBody.h" #include "qpid/framing/ClusterConnectionDtxStartBody.h" #include "qpid/framing/ClusterConnectionDtxEndBody.h" #include "qpid/framing/ClusterConnectionDtxAckBody.h" #include "qpid/framing/ClusterConnectionDtxBufferRefBody.h" #include "qpid/framing/ClusterConnectionDtxWorkRecordBody.h" #include "qpid/framing/ClusterConnectionSessionStateBody.h" #include "qpid/framing/ClusterConnectionShadowReadyBody.h" #include "qpid/framing/ClusterConnectionMembershipBody.h" #include "qpid/framing/ClusterConnectionRetractOfferBody.h" #include "qpid/framing/ClusterConnectionQueuePositionBody.h" #include "qpid/framing/ClusterConnectionExchangeBody.h" #include "qpid/framing/ClusterConnectionAddQueueListenerBody.h" #include "qpid/framing/ClusterConnectionManagementSetupStateBody.h" #include "qpid/framing/ClusterConnectionConfigBody.h" #include "qpid/framing/ClusterConnectionQueueFairshareStateBody.h" #include "qpid/framing/ClusterConnectionQueueObserverStateBody.h" #include "qpid/framing/ClusterConnectionClockBody.h" #include "qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h" namespace qpid { namespace framing { AMQP_AllProxy::AMQP_AllProxy(FrameHandler& f) : Proxy(f), connectionProxy(f), sessionProxy(f), executionProxy(f), messageProxy(f), txProxy(f), dtxProxy(f), exchangeProxy(f), queueProxy(f), fileProxy(f), streamProxy(f), clusterProxy(f), clusterConnectionProxy(f){} void AMQP_AllProxy::Connection::start(const FieldTable& serverProperties, const Array& mechanisms, const Array& locales) { send(ConnectionStartBody(getVersion(), serverProperties, mechanisms, locales)); } void AMQP_AllProxy::Connection::startOk(const FieldTable& clientProperties, const std::string& mechanism, const std::string& response, const std::string& locale) { send(ConnectionStartOkBody(getVersion(), clientProperties, mechanism, response, locale)); } void AMQP_AllProxy::Connection::secure(const std::string& challenge) { send(ConnectionSecureBody(getVersion(), challenge)); } void AMQP_AllProxy::Connection::secureOk(const std::string& response) { send(ConnectionSecureOkBody(getVersion(), response)); } void AMQP_AllProxy::Connection::tune(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeatMin, uint16_t heartbeatMax) { send(ConnectionTuneBody(getVersion(), channelMax, maxFrameSize, heartbeatMin, heartbeatMax)); } void AMQP_AllProxy::Connection::tuneOk(uint16_t channelMax, uint16_t maxFrameSize, uint16_t heartbeat) { send(ConnectionTuneOkBody(getVersion(), channelMax, maxFrameSize, heartbeat)); } void AMQP_AllProxy::Connection::open(const std::string& virtualHost, const Array& capabilities, bool insist) { send(ConnectionOpenBody(getVersion(), virtualHost, capabilities, insist)); } void AMQP_AllProxy::Connection::openOk(const Array& knownHosts) { send(ConnectionOpenOkBody(getVersion(), knownHosts)); } void AMQP_AllProxy::Connection::redirect(const std::string& host, const Array& knownHosts) { send(ConnectionRedirectBody(getVersion(), host, knownHosts)); } void AMQP_AllProxy::Connection::heartbeat() { send(ConnectionHeartbeatBody(getVersion())); } void AMQP_AllProxy::Connection::close(uint16_t replyCode, const std::string& replyText) { send(ConnectionCloseBody(getVersion(), replyCode, replyText)); } void AMQP_AllProxy::Connection::closeOk() { send(ConnectionCloseOkBody(getVersion())); } void AMQP_AllProxy::Session::attach(const std::string& name, bool force) { send(SessionAttachBody(getVersion(), name, force)); } void AMQP_AllProxy::Session::attached(const std::string& name) { send(SessionAttachedBody(getVersion(), name)); } void AMQP_AllProxy::Session::detach(const std::string& name) { send(SessionDetachBody(getVersion(), name)); } void AMQP_AllProxy::Session::detached(const std::string& name, uint8_t code) { send(SessionDetachedBody(getVersion(), name, code)); } void AMQP_AllProxy::Session::requestTimeout(uint32_t timeout) { send(SessionRequestTimeoutBody(getVersion(), timeout)); } void AMQP_AllProxy::Session::timeout(uint32_t timeout) { send(SessionTimeoutBody(getVersion(), timeout)); } void AMQP_AllProxy::Session::commandPoint(const SequenceNumber& commandId, uint64_t commandOffset) { send(SessionCommandPointBody(getVersion(), commandId, commandOffset)); } void AMQP_AllProxy::Session::expected(const SequenceSet& commands, const Array& fragments) { send(SessionExpectedBody(getVersion(), commands, fragments)); } void AMQP_AllProxy::Session::confirmed(const SequenceSet& commands, const Array& fragments) { send(SessionConfirmedBody(getVersion(), commands, fragments)); } void AMQP_AllProxy::Session::completed(const SequenceSet& commands, bool timelyReply) { send(SessionCompletedBody(getVersion(), commands, timelyReply)); } void AMQP_AllProxy::Session::knownCompleted(const SequenceSet& commands) { send(SessionKnownCompletedBody(getVersion(), commands)); } void AMQP_AllProxy::Session::flush(bool expected, bool confirmed, bool completed) { send(SessionFlushBody(getVersion(), expected, confirmed, completed)); } void AMQP_AllProxy::Session::gap(const SequenceSet& commands) { send(SessionGapBody(getVersion(), commands)); } void AMQP_AllProxy::Execution::sync() { send(ExecutionSyncBody(getVersion())); } void AMQP_AllProxy::Execution::result(const SequenceNumber& commandId, const std::string& value) { send(ExecutionResultBody(getVersion(), commandId, value)); } void AMQP_AllProxy::Execution::exception(uint16_t errorCode, const SequenceNumber& commandId, uint8_t classCode, uint8_t commandCode, uint8_t fieldIndex, const std::string& description, const FieldTable& errorInfo) { send(ExecutionExceptionBody(getVersion(), errorCode, commandId, classCode, commandCode, fieldIndex, description, errorInfo)); } void AMQP_AllProxy::Message::transfer(const std::string& destination, uint8_t acceptMode, uint8_t acquireMode) { send(MessageTransferBody(getVersion(), destination, acceptMode, acquireMode)); } void AMQP_AllProxy::Message::accept(const SequenceSet& transfers) { send(MessageAcceptBody(getVersion(), transfers)); } void AMQP_AllProxy::Message::reject(const SequenceSet& transfers, uint16_t code, const std::string& text) { send(MessageRejectBody(getVersion(), transfers, code, text)); } void AMQP_AllProxy::Message::release(const SequenceSet& transfers, bool setRedelivered) { send(MessageReleaseBody(getVersion(), transfers, setRedelivered)); } void AMQP_AllProxy::Message::acquire(const SequenceSet& transfers) { send(MessageAcquireBody(getVersion(), transfers)); } void AMQP_AllProxy::Message::resume(const std::string& destination, const std::string& resumeId) { send(MessageResumeBody(getVersion(), destination, resumeId)); } void AMQP_AllProxy::Message::subscribe(const std::string& queue, const std::string& destination, uint8_t acceptMode, uint8_t acquireMode, bool exclusive, const std::string& resumeId, uint64_t resumeTtl, const FieldTable& arguments) { send(MessageSubscribeBody(getVersion(), queue, destination, acceptMode, acquireMode, exclusive, resumeId, resumeTtl, arguments)); } void AMQP_AllProxy::Message::cancel(const std::string& destination) { send(MessageCancelBody(getVersion(), destination)); } void AMQP_AllProxy::Message::setFlowMode(const std::string& destination, uint8_t flowMode) { send(MessageSetFlowModeBody(getVersion(), destination, flowMode)); } void AMQP_AllProxy::Message::flow(const std::string& destination, uint8_t unit, uint32_t value) { send(MessageFlowBody(getVersion(), destination, unit, value)); } void AMQP_AllProxy::Message::flush(const std::string& destination) { send(MessageFlushBody(getVersion(), destination)); } void AMQP_AllProxy::Message::stop(const std::string& destination) { send(MessageStopBody(getVersion(), destination)); } void AMQP_AllProxy::Tx::select() { send(TxSelectBody(getVersion())); } void AMQP_AllProxy::Tx::commit() { send(TxCommitBody(getVersion())); } void AMQP_AllProxy::Tx::rollback() { send(TxRollbackBody(getVersion())); } void AMQP_AllProxy::Dtx::select() { send(DtxSelectBody(getVersion())); } void AMQP_AllProxy::Dtx::start(const Xid& xid, bool join, bool resume) { send(DtxStartBody(getVersion(), xid, join, resume)); } void AMQP_AllProxy::Dtx::end(const Xid& xid, bool fail, bool suspend) { send(DtxEndBody(getVersion(), xid, fail, suspend)); } void AMQP_AllProxy::Dtx::commit(const Xid& xid, bool onePhase) { send(DtxCommitBody(getVersion(), xid, onePhase)); } void AMQP_AllProxy::Dtx::forget(const Xid& xid) { send(DtxForgetBody(getVersion(), xid)); } void AMQP_AllProxy::Dtx::getTimeout(const Xid& xid) { send(DtxGetTimeoutBody(getVersion(), xid)); } void AMQP_AllProxy::Dtx::prepare(const Xid& xid) { send(DtxPrepareBody(getVersion(), xid)); } void AMQP_AllProxy::Dtx::recover() { send(DtxRecoverBody(getVersion())); } void AMQP_AllProxy::Dtx::rollback(const Xid& xid) { send(DtxRollbackBody(getVersion(), xid)); } void AMQP_AllProxy::Dtx::setTimeout(const Xid& xid, uint32_t timeout) { send(DtxSetTimeoutBody(getVersion(), xid, timeout)); } void AMQP_AllProxy::Exchange::declare(const std::string& exchange, const std::string& type, const std::string& alternateExchange, bool passive, bool durable, bool autoDelete, const FieldTable& arguments) { send(ExchangeDeclareBody(getVersion(), exchange, type, alternateExchange, passive, durable, autoDelete, arguments)); } void AMQP_AllProxy::Exchange::delete_(const std::string& exchange, bool ifUnused) { send(ExchangeDeleteBody(getVersion(), exchange, ifUnused)); } void AMQP_AllProxy::Exchange::query(const std::string& name) { send(ExchangeQueryBody(getVersion(), name)); } void AMQP_AllProxy::Exchange::bind(const std::string& queue, const std::string& exchange, const std::string& bindingKey, const FieldTable& arguments) { send(ExchangeBindBody(getVersion(), queue, exchange, bindingKey, arguments)); } void AMQP_AllProxy::Exchange::unbind(const std::string& queue, const std::string& exchange, const std::string& bindingKey) { send(ExchangeUnbindBody(getVersion(), queue, exchange, bindingKey)); } void AMQP_AllProxy::Exchange::bound(const std::string& exchange, const std::string& queue, const std::string& bindingKey, const FieldTable& arguments) { send(ExchangeBoundBody(getVersion(), exchange, queue, bindingKey, arguments)); } void AMQP_AllProxy::Queue::declare(const std::string& queue, const std::string& alternateExchange, bool passive, bool durable, bool exclusive, bool autoDelete, const FieldTable& arguments) { send(QueueDeclareBody(getVersion(), queue, alternateExchange, passive, durable, exclusive, autoDelete, arguments)); } void AMQP_AllProxy::Queue::delete_(const std::string& queue, bool ifUnused, bool ifEmpty) { send(QueueDeleteBody(getVersion(), queue, ifUnused, ifEmpty)); } void AMQP_AllProxy::Queue::purge(const std::string& queue) { send(QueuePurgeBody(getVersion(), queue)); } void AMQP_AllProxy::Queue::query(const std::string& queue) { send(QueueQueryBody(getVersion(), queue)); } void AMQP_AllProxy::File::qos(uint32_t prefetchSize, uint16_t prefetchCount, bool global) { send(FileQosBody(getVersion(), prefetchSize, prefetchCount, global)); } void AMQP_AllProxy::File::qosOk() { send(FileQosOkBody(getVersion())); } void AMQP_AllProxy::File::consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool noAck, bool exclusive, bool nowait, const FieldTable& arguments) { send(FileConsumeBody(getVersion(), queue, consumerTag, noLocal, noAck, exclusive, nowait, arguments)); } void AMQP_AllProxy::File::consumeOk(const std::string& consumerTag) { send(FileConsumeOkBody(getVersion(), consumerTag)); } void AMQP_AllProxy::File::cancel(const std::string& consumerTag) { send(FileCancelBody(getVersion(), consumerTag)); } void AMQP_AllProxy::File::open(const std::string& identifier, uint64_t contentSize) { send(FileOpenBody(getVersion(), identifier, contentSize)); } void AMQP_AllProxy::File::openOk(uint64_t stagedSize) { send(FileOpenOkBody(getVersion(), stagedSize)); } void AMQP_AllProxy::File::stage() { send(FileStageBody(getVersion())); } void AMQP_AllProxy::File::publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate, const std::string& identifier) { send(FilePublishBody(getVersion(), exchange, routingKey, mandatory, immediate, identifier)); } void AMQP_AllProxy::File::return_(uint16_t replyCode, const std::string& replyText, const std::string& exchange, const std::string& routingKey) { send(FileReturnBody(getVersion(), replyCode, replyText, exchange, routingKey)); } void AMQP_AllProxy::File::deliver(const std::string& consumerTag, uint64_t deliveryTag, bool redelivered, const std::string& exchange, const std::string& routingKey, const std::string& identifier) { send(FileDeliverBody(getVersion(), consumerTag, deliveryTag, redelivered, exchange, routingKey, identifier)); } void AMQP_AllProxy::File::ack(uint64_t deliveryTag, bool multiple) { send(FileAckBody(getVersion(), deliveryTag, multiple)); } void AMQP_AllProxy::File::reject(uint64_t deliveryTag, bool requeue) { send(FileRejectBody(getVersion(), deliveryTag, requeue)); } void AMQP_AllProxy::Stream::qos(uint32_t prefetchSize, uint16_t prefetchCount, uint32_t consumeRate, bool global) { send(StreamQosBody(getVersion(), prefetchSize, prefetchCount, consumeRate, global)); } void AMQP_AllProxy::Stream::qosOk() { send(StreamQosOkBody(getVersion())); } void AMQP_AllProxy::Stream::consume(const std::string& queue, const std::string& consumerTag, bool noLocal, bool exclusive, bool nowait, const FieldTable& arguments) { send(StreamConsumeBody(getVersion(), queue, consumerTag, noLocal, exclusive, nowait, arguments)); } void AMQP_AllProxy::Stream::consumeOk(const std::string& consumerTag) { send(StreamConsumeOkBody(getVersion(), consumerTag)); } void AMQP_AllProxy::Stream::cancel(const std::string& consumerTag) { send(StreamCancelBody(getVersion(), consumerTag)); } void AMQP_AllProxy::Stream::publish(const std::string& exchange, const std::string& routingKey, bool mandatory, bool immediate) { send(StreamPublishBody(getVersion(), exchange, routingKey, mandatory, immediate)); } void AMQP_AllProxy::Stream::return_(uint16_t replyCode, const std::string& replyText, const std::string& exchange, const std::string& routingKey) { send(StreamReturnBody(getVersion(), replyCode, replyText, exchange, routingKey)); } void AMQP_AllProxy::Stream::deliver(const std::string& consumerTag, uint64_t deliveryTag, const std::string& exchange, const std::string& queue) { send(StreamDeliverBody(getVersion(), consumerTag, deliveryTag, exchange, queue)); } void AMQP_AllProxy::Cluster::updateRequest(const std::string& url) { send(ClusterUpdateRequestBody(getVersion(), url)); } void AMQP_AllProxy::Cluster::updateOffer(uint64_t updatee) { send(ClusterUpdateOfferBody(getVersion(), updatee)); } void AMQP_AllProxy::Cluster::retractOffer(uint64_t updatee) { send(ClusterRetractOfferBody(getVersion(), updatee)); } void AMQP_AllProxy::Cluster::initialStatus(uint32_t version, bool active, const Uuid& clusterId, uint8_t storeState, const Uuid& shutdownId, const std::string& firstConfig, const Array& urls) { send(ClusterInitialStatusBody(getVersion(), version, active, clusterId, storeState, shutdownId, firstConfig, urls)); } void AMQP_AllProxy::Cluster::ready(const std::string& url) { send(ClusterReadyBody(getVersion(), url)); } void AMQP_AllProxy::Cluster::configChange(const std::string& members, const std::string& joined, const std::string& left) { send(ClusterConfigChangeBody(getVersion(), members, joined, left)); } void AMQP_AllProxy::Cluster::errorCheck(uint8_t type, const SequenceNumber& frameSeq) { send(ClusterErrorCheckBody(getVersion(), type, frameSeq)); } void AMQP_AllProxy::Cluster::timerWakeup(const std::string& name) { send(ClusterTimerWakeupBody(getVersion(), name)); } void AMQP_AllProxy::Cluster::timerDrop(const std::string& name) { send(ClusterTimerDropBody(getVersion(), name)); } void AMQP_AllProxy::Cluster::shutdown(const Uuid& shutdownId) { send(ClusterShutdownBody(getVersion(), shutdownId)); } void AMQP_AllProxy::Cluster::deliverToQueue(const std::string& queue, const std::string& message) { send(ClusterDeliverToQueueBody(getVersion(), queue, message)); } void AMQP_AllProxy::Cluster::clock(uint64_t time) { send(ClusterClockBody(getVersion(), time)); } void AMQP_AllProxy::ClusterConnection::announce(const std::string& managementId, uint32_t ssf, const std::string& authid, bool nodict, const std::string& username, const std::string& initialFrames) { send(ClusterConnectionAnnounceBody(getVersion(), managementId, ssf, authid, nodict, username, initialFrames)); } void AMQP_AllProxy::ClusterConnection::deliverClose() { send(ClusterConnectionDeliverCloseBody(getVersion())); } void AMQP_AllProxy::ClusterConnection::deliverDoOutput(uint32_t limit) { send(ClusterConnectionDeliverDoOutputBody(getVersion(), limit)); } void AMQP_AllProxy::ClusterConnection::abort() { send(ClusterConnectionAbortBody(getVersion())); } void AMQP_AllProxy::ClusterConnection::shadowSetUser(const std::string& userId) { send(ClusterConnectionShadowSetUserBody(getVersion(), userId)); } void AMQP_AllProxy::ClusterConnection::shadowPrepare(const std::string& managementId) { send(ClusterConnectionShadowPrepareBody(getVersion(), managementId)); } void AMQP_AllProxy::ClusterConnection::consumerState(const std::string& name, bool blocked, bool notifyEnabled, const SequenceNumber& position, uint32_t usedMsgCredit, uint32_t usedByteCredit) { send(ClusterConnectionConsumerStateBody(getVersion(), name, blocked, notifyEnabled, position, usedMsgCredit, usedByteCredit)); } void AMQP_AllProxy::ClusterConnection::deliveryRecord(const std::string& queue, const SequenceNumber& position, const std::string& tag, const SequenceNumber& id, bool acquired, bool accepted, bool cancelled, bool completed, bool ended, bool windowing, bool enqueued, uint32_t credit) { send(ClusterConnectionDeliveryRecordBody(getVersion(), queue, position, tag, id, acquired, accepted, cancelled, completed, ended, windowing, enqueued, credit)); } void AMQP_AllProxy::ClusterConnection::txStart() { send(ClusterConnectionTxStartBody(getVersion())); } void AMQP_AllProxy::ClusterConnection::txAccept(const SequenceSet& commands) { send(ClusterConnectionTxAcceptBody(getVersion(), commands)); } void AMQP_AllProxy::ClusterConnection::txDequeue(const std::string& queue) { send(ClusterConnectionTxDequeueBody(getVersion(), queue)); } void AMQP_AllProxy::ClusterConnection::txEnqueue(const std::string& queue) { send(ClusterConnectionTxEnqueueBody(getVersion(), queue)); } void AMQP_AllProxy::ClusterConnection::txPublish(const Array& queues, bool delivered) { send(ClusterConnectionTxPublishBody(getVersion(), queues, delivered)); } void AMQP_AllProxy::ClusterConnection::txEnd() { send(ClusterConnectionTxEndBody(getVersion())); } void AMQP_AllProxy::ClusterConnection::accumulatedAck(const SequenceSet& commands) { send(ClusterConnectionAccumulatedAckBody(getVersion(), commands)); } void AMQP_AllProxy::ClusterConnection::outputTask(uint16_t channel, const std::string& name) { send(ClusterConnectionOutputTaskBody(getVersion(), channel, name)); } void AMQP_AllProxy::ClusterConnection::dtxStart(const std::string& xid, bool ended, bool suspended, bool failed, bool expired) { send(ClusterConnectionDtxStartBody(getVersion(), xid, ended, suspended, failed, expired)); } void AMQP_AllProxy::ClusterConnection::dtxEnd() { send(ClusterConnectionDtxEndBody(getVersion())); } void AMQP_AllProxy::ClusterConnection::dtxAck() { send(ClusterConnectionDtxAckBody(getVersion())); } void AMQP_AllProxy::ClusterConnection::dtxBufferRef(const std::string& xid, uint32_t index, bool suspended) { send(ClusterConnectionDtxBufferRefBody(getVersion(), xid, index, suspended)); } void AMQP_AllProxy::ClusterConnection::dtxWorkRecord(const std::string& xid, bool prepared, uint32_t timeout) { send(ClusterConnectionDtxWorkRecordBody(getVersion(), xid, prepared, timeout)); } void AMQP_AllProxy::ClusterConnection::sessionState(const SequenceNumber& replayStart, const SequenceNumber& commandPoint, const SequenceSet& sentIncomplete, const SequenceNumber& expected, const SequenceNumber& received, const SequenceSet& unknownCompleted, const SequenceSet& receivedIncomplete, bool dtxSelected) { send(ClusterConnectionSessionStateBody(getVersion(), replayStart, commandPoint, sentIncomplete, expected, received, unknownCompleted, receivedIncomplete, dtxSelected)); } void AMQP_AllProxy::ClusterConnection::shadowReady(uint64_t memberId, uint64_t connectionId, const std::string& managementId, const std::string& userName, const std::string& fragment, uint32_t sendMax) { send(ClusterConnectionShadowReadyBody(getVersion(), memberId, connectionId, managementId, userName, fragment, sendMax)); } void AMQP_AllProxy::ClusterConnection::membership(const FieldTable& joiners, const FieldTable& members, const SequenceNumber& frameSeq) { send(ClusterConnectionMembershipBody(getVersion(), joiners, members, frameSeq)); } void AMQP_AllProxy::ClusterConnection::retractOffer() { send(ClusterConnectionRetractOfferBody(getVersion())); } void AMQP_AllProxy::ClusterConnection::queuePosition(const std::string& queue, const SequenceNumber& position) { send(ClusterConnectionQueuePositionBody(getVersion(), queue, position)); } void AMQP_AllProxy::ClusterConnection::exchange(const std::string& encoded) { send(ClusterConnectionExchangeBody(getVersion(), encoded)); } void AMQP_AllProxy::ClusterConnection::addQueueListener(const std::string& queue, uint32_t consumer) { send(ClusterConnectionAddQueueListenerBody(getVersion(), queue, consumer)); } void AMQP_AllProxy::ClusterConnection::managementSetupState(uint64_t objectNum, uint16_t bootSequence, const Uuid& brokerId, const std::string& vendor, const std::string& product, const std::string& instance) { send(ClusterConnectionManagementSetupStateBody(getVersion(), objectNum, bootSequence, brokerId, vendor, product, instance)); } void AMQP_AllProxy::ClusterConnection::config(const std::string& encoded) { send(ClusterConnectionConfigBody(getVersion(), encoded)); } void AMQP_AllProxy::ClusterConnection::queueFairshareState(const std::string& queue, uint8_t position, uint8_t count) { send(ClusterConnectionQueueFairshareStateBody(getVersion(), queue, position, count)); } void AMQP_AllProxy::ClusterConnection::queueObserverState(const std::string& queue, const std::string& observerId, const FieldTable& state) { send(ClusterConnectionQueueObserverStateBody(getVersion(), queue, observerId, state)); } void AMQP_AllProxy::ClusterConnection::clock(uint64_t time) { send(ClusterConnectionClockBody(getVersion(), time)); } void AMQP_AllProxy::ClusterConnection::queueDequeueSincePurgeState(const std::string& queue, uint32_t dequeueSincePurge) { send(ClusterConnectionQueueDequeueSincePurgeStateBody(getVersion(), queue, dequeueSincePurge)); } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/ExchangeQueryBody.cpp0000664000076400007640000000451311752725676022422 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExchangeQueryBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExchangeQueryBody::setName(const std::string& _name) { name = _name; flags |= (1 << 8); } const std::string& ExchangeQueryBody::getName() const { return name; } bool ExchangeQueryBody::hasName() const { return flags & (1 << 8); } void ExchangeQueryBody::clearNameFlag() { flags &= ~(1 << 8); } void ExchangeQueryBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(name); } void ExchangeQueryBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ExchangeQueryBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(name); } void ExchangeQueryBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ExchangeQueryBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + name.size(); return total; } uint32_t ExchangeQueryBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ExchangeQueryBody::print(std::ostream& out) const { out << "{ExchangeQueryBody: "; if (flags & (1 << 8)) out << "name=" << name << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionTuneOkBody.cpp0000664000076400007640000000707111752725676023101 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionTuneOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionTuneOkBody::setChannelMax(uint16_t _channelMax) { channelMax = _channelMax; flags |= (1 << 8); } uint16_t ConnectionTuneOkBody::getChannelMax() const { return channelMax; } bool ConnectionTuneOkBody::hasChannelMax() const { return flags & (1 << 8); } void ConnectionTuneOkBody::clearChannelMaxFlag() { flags &= ~(1 << 8); } void ConnectionTuneOkBody::setMaxFrameSize(uint16_t _maxFrameSize) { maxFrameSize = _maxFrameSize; flags |= (1 << 9); } uint16_t ConnectionTuneOkBody::getMaxFrameSize() const { return maxFrameSize; } bool ConnectionTuneOkBody::hasMaxFrameSize() const { return flags & (1 << 9); } void ConnectionTuneOkBody::clearMaxFrameSizeFlag() { flags &= ~(1 << 9); } void ConnectionTuneOkBody::setHeartbeat(uint16_t _heartbeat) { heartbeat = _heartbeat; flags |= (1 << 10); } uint16_t ConnectionTuneOkBody::getHeartbeat() const { return heartbeat; } bool ConnectionTuneOkBody::hasHeartbeat() const { return flags & (1 << 10); } void ConnectionTuneOkBody::clearHeartbeatFlag() { flags &= ~(1 << 10); } void ConnectionTuneOkBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShort(channelMax); if (flags & (1 << 9)) buffer.putShort(maxFrameSize); if (flags & (1 << 10)) buffer.putShort(heartbeat); } void ConnectionTuneOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionTuneOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) channelMax = buffer.getShort(); if (flags & (1 << 9)) maxFrameSize = buffer.getShort(); if (flags & (1 << 10)) heartbeat = buffer.getShort(); } void ConnectionTuneOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionTuneOkBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 2;//channelMax if (flags & (1 << 9)) total += 2;//maxFrameSize if (flags & (1 << 10)) total += 2;//heartbeat return total; } uint32_t ConnectionTuneOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionTuneOkBody::print(std::ostream& out) const { out << "{ConnectionTuneOkBody: "; if (flags & (1 << 8)) out << "channel-max=" << channelMax << "; "; if (flags & (1 << 9)) out << "max-frame-size=" << maxFrameSize << "; "; if (flags & (1 << 10)) out << "heartbeat=" << heartbeat << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionTxDequeueBody.h0000664000076400007640000000610311752725676024607 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONTXDEQUEUEBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONTXDEQUEUEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionTxDequeueBody : public ModelMethod { std::string queue; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x14; ClusterConnectionTxDequeueBody( ProtocolVersion, const std::string& _queue) : queue(_queue), flags(0){ flags |= (1 << 8); } ClusterConnectionTxDequeueBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.txDequeue(getQueue()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionTxDequeueBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONTXDEQUEUEBODY_H*/ qpidc-0.16/src/qpid/framing/DtxPrepareBody.cpp0000664000076400007640000000437211752725676021733 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxPrepareBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxPrepareBody::setXid(const Xid& _xid) { xid = _xid; flags |= (1 << 8); } const Xid& DtxPrepareBody::getXid() const { return xid; } bool DtxPrepareBody::hasXid() const { return flags & (1 << 8); } void DtxPrepareBody::clearXidFlag() { flags &= ~(1 << 8); } void DtxPrepareBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) xid.encode(buffer); } void DtxPrepareBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxPrepareBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) xid.decode(buffer); } void DtxPrepareBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxPrepareBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += xid.encodedSize(); return total; } uint32_t DtxPrepareBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxPrepareBody::print(std::ostream& out) const { out << "{DtxPrepareBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConfigChangeBody.h0000664000076400007640000000731411752725676023176 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONFIGCHANGEBODY_H #define QPID_FRAMING_CLUSTERCONFIGCHANGEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConfigChangeBody : public ModelMethod { std::string members; std::string joined; std::string left; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x11; ClusterConfigChangeBody( ProtocolVersion, const std::string& _members, const std::string& _joined, const std::string& _left) : members(_members), joined(_joined), left(_left), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } ClusterConfigChangeBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setMembers(const std::string& _members); QPID_COMMON_EXTERN const std::string& getMembers() const; QPID_COMMON_EXTERN bool hasMembers() const; QPID_COMMON_EXTERN void clearMembersFlag(); QPID_COMMON_EXTERN void setJoined(const std::string& _joined); QPID_COMMON_EXTERN const std::string& getJoined() const; QPID_COMMON_EXTERN bool hasJoined() const; QPID_COMMON_EXTERN void clearJoinedFlag(); QPID_COMMON_EXTERN void setLeft(const std::string& _left); QPID_COMMON_EXTERN const std::string& getLeft() const; QPID_COMMON_EXTERN bool hasLeft() const; QPID_COMMON_EXTERN void clearLeftFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.configChange(getMembers(), getJoined(), getLeft()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConfigChangeBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONFIGCHANGEBODY_H*/ qpidc-0.16/src/qpid/framing/ExchangeBoundResult.cpp0000664000076400007640000000731311752725676022746 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExchangeBoundResult.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExchangeBoundResult::setExchangeNotFound(bool _exchangeNotFound) { if (_exchangeNotFound) flags |= (1 << 8); else flags &= ~(1 << 8); } bool ExchangeBoundResult::getExchangeNotFound() const { return flags & (1 << 8); } void ExchangeBoundResult::setQueueNotFound(bool _queueNotFound) { if (_queueNotFound) flags |= (1 << 9); else flags &= ~(1 << 9); } bool ExchangeBoundResult::getQueueNotFound() const { return flags & (1 << 9); } void ExchangeBoundResult::setQueueNotMatched(bool _queueNotMatched) { if (_queueNotMatched) flags |= (1 << 10); else flags &= ~(1 << 10); } bool ExchangeBoundResult::getQueueNotMatched() const { return flags & (1 << 10); } void ExchangeBoundResult::setKeyNotMatched(bool _keyNotMatched) { if (_keyNotMatched) flags |= (1 << 11); else flags &= ~(1 << 11); } bool ExchangeBoundResult::getKeyNotMatched() const { return flags & (1 << 11); } void ExchangeBoundResult::setArgsNotMatched(bool _argsNotMatched) { if (_argsNotMatched) flags |= (1 << 12); else flags &= ~(1 << 12); } bool ExchangeBoundResult::getArgsNotMatched() const { return flags & (1 << 12); } void ExchangeBoundResult::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); } void ExchangeBoundResult::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void ExchangeBoundResult::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); } void ExchangeBoundResult::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t ExchangeBoundResult::bodySize() const { uint32_t total = 0; total += 2; return total; } uint32_t ExchangeBoundResult::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void ExchangeBoundResult::print(std::ostream& out) const { out << "{ExchangeBoundResult: "; if (flags & (1 << 8)) out << "exchange-not-found=" << getExchangeNotFound() << "; "; if (flags & (1 << 9)) out << "queue-not-found=" << getQueueNotFound() << "; "; if (flags & (1 << 10)) out << "queue-not-matched=" << getQueueNotMatched() << "; "; if (flags & (1 << 11)) out << "key-not-matched=" << getKeyNotMatched() << "; "; if (flags & (1 << 12)) out << "args-not-matched=" << getArgsNotMatched() << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const ExchangeBoundResult& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/FrameHandler.h0000664000076400007640000000205011227113407020777 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FRAMEHANDLER_H #define QPID_FRAMING_FRAMEHANDLER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Handler.h" namespace qpid { namespace framing { class AMQFrame; typedef Handler FrameHandler; }} #endif /*!QPID_FRAMING_FRAMEHANDLER_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionTxDequeueBody.cpp0000664000076400007640000000500111752725676025136 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionTxDequeueBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionTxDequeueBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ClusterConnectionTxDequeueBody::getQueue() const { return queue; } bool ClusterConnectionTxDequeueBody::hasQueue() const { return flags & (1 << 8); } void ClusterConnectionTxDequeueBody::clearQueueFlag() { flags &= ~(1 << 8); } void ClusterConnectionTxDequeueBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); } void ClusterConnectionTxDequeueBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionTxDequeueBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); } void ClusterConnectionTxDequeueBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionTxDequeueBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); return total; } uint32_t ClusterConnectionTxDequeueBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionTxDequeueBody::print(std::ostream& out) const { out << "{ClusterConnectionTxDequeueBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/AMQMethodBody.cpp0000664000076400007640000000170111227113407021401 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQMethodBody.h" namespace qpid { namespace framing { AMQMethodBody::~AMQMethodBody() {} }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/ExecutionSyncBody.h0000664000076400007640000000511711752725676022120 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXECUTIONSYNCBODY_H #define QPID_FRAMING_EXECUTIONSYNCBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExecutionSyncBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x3; static const MethodId METHOD_ID = 0x1; ExecutionSyncBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.sync(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExecutionSyncBody */ }} #endif /*!QPID_FRAMING_EXECUTIONSYNCBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterErrorCheckBody.h0000664000076400007640000000652311752725676022713 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERERRORCHECKBODY_H #define QPID_FRAMING_CLUSTERERRORCHECKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterErrorCheckBody : public ModelMethod { uint8_t type; SequenceNumber frameSeq; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x14; ClusterErrorCheckBody( ProtocolVersion, uint8_t _type, const SequenceNumber& _frameSeq) : type(_type), frameSeq(_frameSeq), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ClusterErrorCheckBody(ProtocolVersion=ProtocolVersion()) : type(0), flags(0) {} QPID_COMMON_EXTERN void setType(uint8_t _type); QPID_COMMON_EXTERN uint8_t getType() const; QPID_COMMON_EXTERN bool hasType() const; QPID_COMMON_EXTERN void clearTypeFlag(); QPID_COMMON_EXTERN void setFrameSeq(const SequenceNumber& _frameSeq); QPID_COMMON_EXTERN SequenceNumber getFrameSeq() const; QPID_COMMON_EXTERN bool hasFrameSeq() const; QPID_COMMON_EXTERN void clearFrameSeqFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.errorCheck(getType(), getFrameSeq()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterErrorCheckBody */ }} #endif /*!QPID_FRAMING_CLUSTERERRORCHECKBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterTimerDropBody.h0000664000076400007640000000576311752725676022576 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERTIMERDROPBODY_H #define QPID_FRAMING_CLUSTERTIMERDROPBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterTimerDropBody : public ModelMethod { std::string name; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x16; ClusterTimerDropBody( ProtocolVersion, const std::string& _name) : name(_name), flags(0){ flags |= (1 << 8); } ClusterTimerDropBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setName(const std::string& _name); QPID_COMMON_EXTERN const std::string& getName() const; QPID_COMMON_EXTERN bool hasName() const; QPID_COMMON_EXTERN void clearNameFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.timerDrop(getName()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterTimerDropBody */ }} #endif /*!QPID_FRAMING_CLUSTERTIMERDROPBODY_H*/ qpidc-0.16/src/qpid/framing/ExchangeDeclareBody.h0000664000076400007640000001133511752725676022321 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXCHANGEDECLAREBODY_H #define QPID_FRAMING_EXCHANGEDECLAREBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExchangeDeclareBody : public ModelMethod { std::string exchange; std::string type; std::string alternateExchange; FieldTable arguments; uint16_t flags; public: static const ClassId CLASS_ID = 0x7; static const MethodId METHOD_ID = 0x1; ExchangeDeclareBody( ProtocolVersion, const std::string& _exchange, const std::string& _type, const std::string& _alternateExchange, bool _passive, bool _durable, bool _autoDelete, const FieldTable& _arguments) : exchange(_exchange), type(_type), alternateExchange(_alternateExchange), arguments(_arguments), flags(0){ setPassive(_passive); setDurable(_durable); setAutoDelete(_autoDelete); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 14); } ExchangeDeclareBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setType(const std::string& _type); QPID_COMMON_EXTERN const std::string& getType() const; QPID_COMMON_EXTERN bool hasType() const; QPID_COMMON_EXTERN void clearTypeFlag(); QPID_COMMON_EXTERN void setAlternateExchange(const std::string& _alternateExchange); QPID_COMMON_EXTERN const std::string& getAlternateExchange() const; QPID_COMMON_EXTERN bool hasAlternateExchange() const; QPID_COMMON_EXTERN void clearAlternateExchangeFlag(); QPID_COMMON_EXTERN void setPassive(bool _passive); QPID_COMMON_EXTERN bool getPassive() const; QPID_COMMON_EXTERN void setDurable(bool _durable); QPID_COMMON_EXTERN bool getDurable() const; QPID_COMMON_EXTERN void setAutoDelete(bool _autoDelete); QPID_COMMON_EXTERN bool getAutoDelete() const; QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments); QPID_COMMON_EXTERN const FieldTable& getArguments() const; QPID_COMMON_EXTERN FieldTable& getArguments(); QPID_COMMON_EXTERN bool hasArguments() const; QPID_COMMON_EXTERN void clearArgumentsFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.declare(getExchange(), getType(), getAlternateExchange(), getPassive(), getDurable(), getAutoDelete(), getArguments()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExchangeDeclareBody */ }} #endif /*!QPID_FRAMING_EXCHANGEDECLAREBODY_H*/ qpidc-0.16/src/qpid/framing/TransferContent.h0000664000076400007640000000425611725251223021602 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TransferContent_ #define _TransferContent_ #include "qpid/framing/FrameSet.h" #include "qpid/framing/MethodContent.h" #include "qpid/Exception.h" #include "qpid/framing/MessageProperties.h" #include "qpid/framing/DeliveryProperties.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { /** Message content */ class QPID_COMMON_CLASS_EXTERN TransferContent : public MethodContent { AMQHeaderBody header; std::string data; public: QPID_COMMON_EXTERN TransferContent(const std::string& data = std::string(), const std::string& key=std::string()); ///@internal QPID_COMMON_EXTERN const AMQHeaderBody& getHeader() const; QPID_COMMON_EXTERN void setData(const std::string&); QPID_COMMON_EXTERN const std::string& getData() const; QPID_COMMON_EXTERN std::string& getData(); QPID_COMMON_EXTERN void appendData(const std::string&); QPID_COMMON_EXTERN bool hasMessageProperties() const; QPID_COMMON_EXTERN MessageProperties& getMessageProperties(); QPID_COMMON_EXTERN const MessageProperties& getMessageProperties() const; QPID_COMMON_EXTERN bool hasDeliveryProperties() const; QPID_COMMON_EXTERN DeliveryProperties& getDeliveryProperties(); QPID_COMMON_EXTERN const DeliveryProperties& getDeliveryProperties() const; ///@internal QPID_COMMON_EXTERN void populate(const FrameSet& frameset); }; }} #endif qpidc-0.16/src/qpid/framing/AMQDataBlock.h0000664000076400007640000000220411227113407020633 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/Buffer.h" #ifndef _AMQDataBlock_ #define _AMQDataBlock_ namespace qpid { namespace framing { class AMQDataBlock { public: virtual ~AMQDataBlock() {} virtual void encode(Buffer& buffer) const = 0; virtual bool decode(Buffer& buffer) = 0; virtual uint32_t encodedSize() const = 0; }; } } #endif qpidc-0.16/src/qpid/framing/FileCancelBody.cpp0000664000076400007640000000460011752725676021634 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileCancelBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileCancelBody::setConsumerTag(const std::string& _consumerTag) { consumerTag = _consumerTag; flags |= (1 << 8); } const std::string& FileCancelBody::getConsumerTag() const { return consumerTag; } bool FileCancelBody::hasConsumerTag() const { return flags & (1 << 8); } void FileCancelBody::clearConsumerTagFlag() { flags &= ~(1 << 8); } void FileCancelBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(consumerTag); } void FileCancelBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileCancelBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(consumerTag); } void FileCancelBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileCancelBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + consumerTag.size(); return total; } uint32_t FileCancelBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileCancelBody::print(std::ostream& out) const { out << "{FileCancelBody: "; if (flags & (1 << 8)) out << "consumer-tag=" << consumerTag << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/reply_exceptions.cpp0000664000076400007640000000635511752725676022436 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/reply_exceptions.h" #include "qpid/Msg.h" #include #include namespace qpid { namespace framing { sys::ExceptionHolder createSessionException(int code, const std::string& text) { sys::ExceptionHolder holder; switch (code) { case 403: holder = new UnauthorizedAccessException(text); break; case 404: holder = new NotFoundException(text); break; case 405: holder = new ResourceLockedException(text); break; case 406: holder = new PreconditionFailedException(text); break; case 408: holder = new ResourceDeletedException(text); break; case 409: holder = new IllegalStateException(text); break; case 503: holder = new CommandInvalidException(text); break; case 506: holder = new ResourceLimitExceededException(text); break; case 530: holder = new NotAllowedException(text); break; case 531: holder = new IllegalArgumentException(text); break; case 540: holder = new NotImplementedException(text); break; case 541: holder = new InternalErrorException(text); break; case 542: holder = new InvalidArgumentException(text); break; default: holder = new InvalidArgumentException(QPID_MSG("Bad error-code: " << code << ": " << text)); } return holder; } sys::ExceptionHolder createConnectionException(int code, const std::string& text) { sys::ExceptionHolder holder; switch (code) { case 200: break; case 320: holder = new ConnectionForcedException(text); break; case 402: holder = new InvalidPathException(text); break; case 501: holder = new FramingErrorException(text); break; default: holder = new FramingErrorException(QPID_MSG("Bad close-code: " << code << ": " << text)); } return holder; } sys::ExceptionHolder createChannelException(int code, const std::string& text) { sys::ExceptionHolder holder; switch (code) { case 0: break; case 1: holder = new SessionBusyException(text); break; case 2: holder = new TransportBusyException(text); break; case 3: holder = new NotAttachedException(text); break; case 4: holder = new UnknownIdsException(text); break; default: holder = new NotAttachedException(QPID_MSG("Bad detach-code: " << code << ": " << text)); } return holder; } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/MessageRejectBody.h0000664000076400007640000000720211752725676022036 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGEREJECTBODY_H #define QPID_FRAMING_MESSAGEREJECTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageRejectBody : public ModelMethod { SequenceSet transfers; uint16_t code; std::string text; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0x3; MessageRejectBody( ProtocolVersion, const SequenceSet& _transfers, uint16_t _code, const std::string& _text) : transfers(_transfers), code(_code), text(_text), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } MessageRejectBody(ProtocolVersion=ProtocolVersion()) : code(0), flags(0) {} QPID_COMMON_EXTERN void setTransfers(const SequenceSet& _transfers); QPID_COMMON_EXTERN const SequenceSet& getTransfers() const; QPID_COMMON_EXTERN bool hasTransfers() const; QPID_COMMON_EXTERN void clearTransfersFlag(); QPID_COMMON_EXTERN void setCode(uint16_t _code); QPID_COMMON_EXTERN uint16_t getCode() const; QPID_COMMON_EXTERN bool hasCode() const; QPID_COMMON_EXTERN void clearCodeFlag(); QPID_COMMON_EXTERN void setText(const std::string& _text); QPID_COMMON_EXTERN const std::string& getText() const; QPID_COMMON_EXTERN bool hasText() const; QPID_COMMON_EXTERN void clearTextFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.reject(getTransfers(), getCode(), getText()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageRejectBody */ }} #endif /*!QPID_FRAMING_MESSAGEREJECTBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionOutputTaskBody.h0000664000076400007640000000662111752725676025026 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONOUTPUTTASKBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONOUTPUTTASKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionOutputTaskBody : public ModelMethod { uint16_t channel; std::string name; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x19; ClusterConnectionOutputTaskBody( ProtocolVersion, uint16_t _channel, const std::string& _name) : channel(_channel), name(_name), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ClusterConnectionOutputTaskBody(ProtocolVersion=ProtocolVersion()) : channel(0), flags(0) {} QPID_COMMON_EXTERN void setChannel(uint16_t _channel); QPID_COMMON_EXTERN uint16_t getChannel() const; QPID_COMMON_EXTERN bool hasChannel() const; QPID_COMMON_EXTERN void clearChannelFlag(); QPID_COMMON_EXTERN void setName(const std::string& _name); QPID_COMMON_EXTERN const std::string& getName() const; QPID_COMMON_EXTERN bool hasName() const; QPID_COMMON_EXTERN void clearNameFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.outputTask(getChannel(), getName()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionOutputTaskBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONOUTPUTTASKBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionAbortBody.h0000664000076400007640000000520711752725676023751 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONABORTBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONABORTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionAbortBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x4; ClusterConnectionAbortBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.abort(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionAbortBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONABORTBODY_H*/ qpidc-0.16/src/qpid/framing/ExchangeBindBody.cpp0000664000076400007640000001036111752725676022167 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExchangeBindBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExchangeBindBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ExchangeBindBody::getQueue() const { return queue; } bool ExchangeBindBody::hasQueue() const { return flags & (1 << 8); } void ExchangeBindBody::clearQueueFlag() { flags &= ~(1 << 8); } void ExchangeBindBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 9); } const std::string& ExchangeBindBody::getExchange() const { return exchange; } bool ExchangeBindBody::hasExchange() const { return flags & (1 << 9); } void ExchangeBindBody::clearExchangeFlag() { flags &= ~(1 << 9); } void ExchangeBindBody::setBindingKey(const std::string& _bindingKey) { bindingKey = _bindingKey; flags |= (1 << 10); } const std::string& ExchangeBindBody::getBindingKey() const { return bindingKey; } bool ExchangeBindBody::hasBindingKey() const { return flags & (1 << 10); } void ExchangeBindBody::clearBindingKeyFlag() { flags &= ~(1 << 10); } void ExchangeBindBody::setArguments(const FieldTable& _arguments) { arguments = _arguments; flags |= (1 << 11); } const FieldTable& ExchangeBindBody::getArguments() const { return arguments; } FieldTable& ExchangeBindBody::getArguments() { flags |= (1 << 11); return arguments; } bool ExchangeBindBody::hasArguments() const { return flags & (1 << 11); } void ExchangeBindBody::clearArgumentsFlag() { flags &= ~(1 << 11); } void ExchangeBindBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putShortString(exchange); if (flags & (1 << 10)) buffer.putShortString(bindingKey); if (flags & (1 << 11)) arguments.encode(buffer); } void ExchangeBindBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ExchangeBindBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) buffer.getShortString(exchange); if (flags & (1 << 10)) buffer.getShortString(bindingKey); if (flags & (1 << 11)) arguments.decode(buffer); } void ExchangeBindBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ExchangeBindBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 1 + exchange.size(); if (flags & (1 << 10)) total += 1 + bindingKey.size(); if (flags & (1 << 11)) total += arguments.encodedSize(); return total; } uint32_t ExchangeBindBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ExchangeBindBody::print(std::ostream& out) const { out << "{ExchangeBindBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "exchange=" << exchange << "; "; if (flags & (1 << 10)) out << "binding-key=" << bindingKey << "; "; if (flags & (1 << 11)) out << "arguments=" << arguments << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/FileOpenOkBody.h0000664000076400007640000000575511752725676021323 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILEOPENOKBODY_H #define QPID_FRAMING_FILEOPENOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileOpenOkBody : public ModelMethod { uint64_t stagedSize; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0x7; FileOpenOkBody( ProtocolVersion, uint64_t _stagedSize) : stagedSize(_stagedSize), flags(0){ flags |= (1 << 8); } FileOpenOkBody(ProtocolVersion=ProtocolVersion()) : stagedSize(0), flags(0) {} QPID_COMMON_EXTERN void setStagedSize(uint64_t _stagedSize); QPID_COMMON_EXTERN uint64_t getStagedSize() const; QPID_COMMON_EXTERN bool hasStagedSize() const; QPID_COMMON_EXTERN void clearStagedSizeFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.openOk(getStagedSize()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileOpenOkBody */ }} #endif /*!QPID_FRAMING_FILEOPENOKBODY_H*/ qpidc-0.16/src/qpid/framing/BodyHandler.h0000664000076400007640000000301310661127661020652 0ustar00jrossjross00000000000000#ifndef _BodyHandler_ #define _BodyHandler_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace framing { class AMQBody; class AMQMethodBody; class AMQHeaderBody; class AMQContentBody; class AMQHeartbeatBody; // TODO aconway 2007-08-10: rework using Visitor pattern? /** * Interface to handle incoming frame bodies. * Derived classes provide logic for each frame type. */ class BodyHandler { public: virtual ~BodyHandler(); virtual void handleBody(AMQBody* body); protected: virtual void handleMethod(AMQMethodBody*) = 0; virtual void handleHeader(AMQHeaderBody*) = 0; virtual void handleContent(AMQContentBody*) = 0; virtual void handleHeartbeat(AMQHeartbeatBody*) = 0; }; }} #endif qpidc-0.16/src/qpid/framing/ClusterConnectionExchangeBody.cpp0000664000076400007640000000501411752725676024753 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionExchangeBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionExchangeBody::setEncoded(const std::string& _encoded) { encoded = _encoded; flags |= (1 << 8); } const std::string& ClusterConnectionExchangeBody::getEncoded() const { return encoded; } bool ClusterConnectionExchangeBody::hasEncoded() const { return flags & (1 << 8); } void ClusterConnectionExchangeBody::clearEncodedFlag() { flags &= ~(1 << 8); } void ClusterConnectionExchangeBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongString(encoded); } void ClusterConnectionExchangeBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionExchangeBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getLongString(encoded); } void ClusterConnectionExchangeBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionExchangeBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 4 + encoded.size(); return total; } uint32_t ClusterConnectionExchangeBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionExchangeBody::print(std::ostream& out) const { out << "{ClusterConnectionExchangeBody: "; if (flags & (1 << 8)) out << "encoded=" << encoded << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionHeartbeatBody.cpp0000664000076400007640000000341611752725676023572 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionHeartbeatBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionHeartbeatBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); } void ConnectionHeartbeatBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionHeartbeatBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); } void ConnectionHeartbeatBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionHeartbeatBody::bodySize() const { uint32_t total = 0; total += 2; return total; } uint32_t ConnectionHeartbeatBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionHeartbeatBody::print(std::ostream& out) const { out << "{ConnectionHeartbeatBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionFlushBody.cpp0000664000076400007640000000502511752725676022276 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionFlushBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionFlushBody::setExpected(bool _expected) { if (_expected) flags |= (1 << 8); else flags &= ~(1 << 8); } bool SessionFlushBody::getExpected() const { return flags & (1 << 8); } void SessionFlushBody::setConfirmed(bool _confirmed) { if (_confirmed) flags |= (1 << 9); else flags &= ~(1 << 9); } bool SessionFlushBody::getConfirmed() const { return flags & (1 << 9); } void SessionFlushBody::setCompleted(bool _completed) { if (_completed) flags |= (1 << 10); else flags &= ~(1 << 10); } bool SessionFlushBody::getCompleted() const { return flags & (1 << 10); } void SessionFlushBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); } void SessionFlushBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionFlushBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); } void SessionFlushBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionFlushBody::bodySize() const { uint32_t total = 0; total += 2; return total; } uint32_t SessionFlushBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionFlushBody::print(std::ostream& out) const { out << "{SessionFlushBody: "; if (flags & (1 << 8)) out << "expected=" << getExpected() << "; "; if (flags & (1 << 9)) out << "confirmed=" << getConfirmed() << "; "; if (flags & (1 << 10)) out << "completed=" << getCompleted() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/DtxForgetBody.h0000664000076400007640000000566111752725676021232 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXFORGETBODY_H #define QPID_FRAMING_DTXFORGETBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include "qpid/framing/Xid.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxForgetBody : public ModelMethod { Xid xid; uint16_t flags; public: static const ClassId CLASS_ID = 0x6; static const MethodId METHOD_ID = 0x5; DtxForgetBody( ProtocolVersion, const Xid& _xid) : xid(_xid), flags(0){ flags |= (1 << 8); } DtxForgetBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setXid(const Xid& _xid); QPID_COMMON_EXTERN const Xid& getXid() const; QPID_COMMON_EXTERN bool hasXid() const; QPID_COMMON_EXTERN void clearXidFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.forget(getXid()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxForgetBody */ }} #endif /*!QPID_FRAMING_DTXFORGETBODY_H*/ qpidc-0.16/src/qpid/framing/XaResult.cpp0000664000076400007640000000502611752725676020603 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/XaResult.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void XaResult::setStatus(uint16_t _status) { status = _status; flags |= (1 << 8); } uint16_t XaResult::getStatus() const { return status; } bool XaResult::hasStatus() const { return flags & (1 << 8); } void XaResult::clearStatusFlag() { flags &= ~(1 << 8); } void XaResult::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShort(status); } void XaResult::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void XaResult::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) status = buffer.getShort(); } void XaResult::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t XaResult::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 2;//status return total; } uint32_t XaResult::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void XaResult::print(std::ostream& out) const { out << "{XaResult: "; if (flags & (1 << 8)) out << "status=" << status << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const XaResult& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/ExchangeBoundBody.cpp0000664000076400007640000001041311752725676022360 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExchangeBoundBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExchangeBoundBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 8); } const std::string& ExchangeBoundBody::getExchange() const { return exchange; } bool ExchangeBoundBody::hasExchange() const { return flags & (1 << 8); } void ExchangeBoundBody::clearExchangeFlag() { flags &= ~(1 << 8); } void ExchangeBoundBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 9); } const std::string& ExchangeBoundBody::getQueue() const { return queue; } bool ExchangeBoundBody::hasQueue() const { return flags & (1 << 9); } void ExchangeBoundBody::clearQueueFlag() { flags &= ~(1 << 9); } void ExchangeBoundBody::setBindingKey(const std::string& _bindingKey) { bindingKey = _bindingKey; flags |= (1 << 10); } const std::string& ExchangeBoundBody::getBindingKey() const { return bindingKey; } bool ExchangeBoundBody::hasBindingKey() const { return flags & (1 << 10); } void ExchangeBoundBody::clearBindingKeyFlag() { flags &= ~(1 << 10); } void ExchangeBoundBody::setArguments(const FieldTable& _arguments) { arguments = _arguments; flags |= (1 << 11); } const FieldTable& ExchangeBoundBody::getArguments() const { return arguments; } FieldTable& ExchangeBoundBody::getArguments() { flags |= (1 << 11); return arguments; } bool ExchangeBoundBody::hasArguments() const { return flags & (1 << 11); } void ExchangeBoundBody::clearArgumentsFlag() { flags &= ~(1 << 11); } void ExchangeBoundBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(exchange); if (flags & (1 << 9)) buffer.putShortString(queue); if (flags & (1 << 10)) buffer.putShortString(bindingKey); if (flags & (1 << 11)) arguments.encode(buffer); } void ExchangeBoundBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ExchangeBoundBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(exchange); if (flags & (1 << 9)) buffer.getShortString(queue); if (flags & (1 << 10)) buffer.getShortString(bindingKey); if (flags & (1 << 11)) arguments.decode(buffer); } void ExchangeBoundBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ExchangeBoundBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + exchange.size(); if (flags & (1 << 9)) total += 1 + queue.size(); if (flags & (1 << 10)) total += 1 + bindingKey.size(); if (flags & (1 << 11)) total += arguments.encodedSize(); return total; } uint32_t ExchangeBoundBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ExchangeBoundBody::print(std::ostream& out) const { out << "{ExchangeBoundBody: "; if (flags & (1 << 8)) out << "exchange=" << exchange << "; "; if (flags & (1 << 9)) out << "queue=" << queue << "; "; if (flags & (1 << 10)) out << "binding-key=" << bindingKey << "; "; if (flags & (1 << 11)) out << "arguments=" << arguments << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionExpectedBody.h0000664000076400007640000000661411752725676022430 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONEXPECTEDBODY_H #define QPID_FRAMING_SESSIONEXPECTEDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionExpectedBody : public AMQMethodBody { SequenceSet commands; Array fragments; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0x8; SessionExpectedBody( ProtocolVersion, const SequenceSet& _commands, const Array& _fragments) : commands(_commands), fragments(_fragments), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } SessionExpectedBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setCommands(const SequenceSet& _commands); QPID_COMMON_EXTERN const SequenceSet& getCommands() const; QPID_COMMON_EXTERN bool hasCommands() const; QPID_COMMON_EXTERN void clearCommandsFlag(); QPID_COMMON_EXTERN void setFragments(const Array& _fragments); QPID_COMMON_EXTERN const Array& getFragments() const; QPID_COMMON_EXTERN bool hasFragments() const; QPID_COMMON_EXTERN void clearFragmentsFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.expected(getCommands(), getFragments()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionExpectedBody */ }} #endif /*!QPID_FRAMING_SESSIONEXPECTEDBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterDeliverToQueueBody.h0000664000076400007640000000661211752725676023565 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERDELIVERTOQUEUEBODY_H #define QPID_FRAMING_CLUSTERDELIVERTOQUEUEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterDeliverToQueueBody : public ModelMethod { std::string queue; std::string message; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x21; ClusterDeliverToQueueBody( ProtocolVersion, const std::string& _queue, const std::string& _message) : queue(_queue), message(_message), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ClusterDeliverToQueueBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setMessage(const std::string& _message); QPID_COMMON_EXTERN const std::string& getMessage() const; QPID_COMMON_EXTERN bool hasMessage() const; QPID_COMMON_EXTERN void clearMessageFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.deliverToQueue(getQueue(), getMessage()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterDeliverToQueueBody */ }} #endif /*!QPID_FRAMING_CLUSTERDELIVERTOQUEUEBODY_H*/ qpidc-0.16/src/qpid/framing/DtxRollbackBody.cpp0000664000076400007640000000440711752725676022065 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxRollbackBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxRollbackBody::setXid(const Xid& _xid) { xid = _xid; flags |= (1 << 8); } const Xid& DtxRollbackBody::getXid() const { return xid; } bool DtxRollbackBody::hasXid() const { return flags & (1 << 8); } void DtxRollbackBody::clearXidFlag() { flags &= ~(1 << 8); } void DtxRollbackBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) xid.encode(buffer); } void DtxRollbackBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxRollbackBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) xid.decode(buffer); } void DtxRollbackBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxRollbackBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += xid.encodedSize(); return total; } uint32_t DtxRollbackBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxRollbackBody::print(std::ostream& out) const { out << "{DtxRollbackBody: "; if (flags & (1 << 8)) out << "xid=" << xid << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageAcceptBody.h0000664000076400007640000000601311752725676022020 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGEACCEPTBODY_H #define QPID_FRAMING_MESSAGEACCEPTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageAcceptBody : public ModelMethod { SequenceSet transfers; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0x2; MessageAcceptBody( ProtocolVersion, const SequenceSet& _transfers) : transfers(_transfers), flags(0){ flags |= (1 << 8); } MessageAcceptBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setTransfers(const SequenceSet& _transfers); QPID_COMMON_EXTERN const SequenceSet& getTransfers() const; QPID_COMMON_EXTERN bool hasTransfers() const; QPID_COMMON_EXTERN void clearTransfersFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.accept(getTransfers()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageAcceptBody */ }} #endif /*!QPID_FRAMING_MESSAGEACCEPTBODY_H*/ qpidc-0.16/src/qpid/framing/amqp_framing.h0000664000076400007640000000241211227113407021112 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/BodyHandler.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQHeaderBody.h" #include "qpid/framing/AMQContentBody.h" #include "qpid/framing/AMQHeartbeatBody.h" #include "qpid/framing/InputHandler.h" #include "qpid/framing/OutputHandler.h" #include "qpid/framing/ProtocolInitiation.h" #include "qpid/framing/ProtocolVersion.h" qpidc-0.16/src/qpid/framing/SessionCommandPointBody.cpp0000664000076400007640000000605111752725676023605 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionCommandPointBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionCommandPointBody::setCommandId(const SequenceNumber& _commandId) { commandId = _commandId; flags |= (1 << 8); } SequenceNumber SessionCommandPointBody::getCommandId() const { return commandId; } bool SessionCommandPointBody::hasCommandId() const { return flags & (1 << 8); } void SessionCommandPointBody::clearCommandIdFlag() { flags &= ~(1 << 8); } void SessionCommandPointBody::setCommandOffset(uint64_t _commandOffset) { commandOffset = _commandOffset; flags |= (1 << 9); } uint64_t SessionCommandPointBody::getCommandOffset() const { return commandOffset; } bool SessionCommandPointBody::hasCommandOffset() const { return flags & (1 << 9); } void SessionCommandPointBody::clearCommandOffsetFlag() { flags &= ~(1 << 9); } void SessionCommandPointBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) commandId.encode(buffer); if (flags & (1 << 9)) buffer.putLongLong(commandOffset); } void SessionCommandPointBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionCommandPointBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) commandId.decode(buffer); if (flags & (1 << 9)) commandOffset = buffer.getLongLong(); } void SessionCommandPointBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionCommandPointBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += commandId.encodedSize(); if (flags & (1 << 9)) total += 8;//commandOffset return total; } uint32_t SessionCommandPointBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionCommandPointBody::print(std::ostream& out) const { out << "{SessionCommandPointBody: "; if (flags & (1 << 8)) out << "command-id=" << commandId << "; "; if (flags & (1 << 9)) out << "command-offset=" << commandOffset << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionDeliverCloseBody.cpp0000664000076400007640000000365311752725676025620 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionDeliverCloseBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionDeliverCloseBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void ClusterConnectionDeliverCloseBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionDeliverCloseBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void ClusterConnectionDeliverCloseBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionDeliverCloseBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t ClusterConnectionDeliverCloseBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionDeliverCloseBody::print(std::ostream& out) const { out << "{ClusterConnectionDeliverCloseBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionStartBody.cpp0000664000076400007640000000733111752725676022770 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionStartBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionStartBody::setServerProperties(const FieldTable& _serverProperties) { serverProperties = _serverProperties; flags |= (1 << 8); } const FieldTable& ConnectionStartBody::getServerProperties() const { return serverProperties; } FieldTable& ConnectionStartBody::getServerProperties() { flags |= (1 << 8); return serverProperties; } bool ConnectionStartBody::hasServerProperties() const { return flags & (1 << 8); } void ConnectionStartBody::clearServerPropertiesFlag() { flags &= ~(1 << 8); } void ConnectionStartBody::setMechanisms(const Array& _mechanisms) { mechanisms = _mechanisms; flags |= (1 << 9); } const Array& ConnectionStartBody::getMechanisms() const { return mechanisms; } bool ConnectionStartBody::hasMechanisms() const { return flags & (1 << 9); } void ConnectionStartBody::clearMechanismsFlag() { flags &= ~(1 << 9); } void ConnectionStartBody::setLocales(const Array& _locales) { locales = _locales; flags |= (1 << 10); } const Array& ConnectionStartBody::getLocales() const { return locales; } bool ConnectionStartBody::hasLocales() const { return flags & (1 << 10); } void ConnectionStartBody::clearLocalesFlag() { flags &= ~(1 << 10); } void ConnectionStartBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) serverProperties.encode(buffer); if (flags & (1 << 9)) mechanisms.encode(buffer); if (flags & (1 << 10)) locales.encode(buffer); } void ConnectionStartBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionStartBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) serverProperties.decode(buffer); if (flags & (1 << 9)) mechanisms.decode(buffer); if (flags & (1 << 10)) locales.decode(buffer); } void ConnectionStartBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionStartBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += serverProperties.encodedSize(); if (flags & (1 << 9)) total += mechanisms.encodedSize(); if (flags & (1 << 10)) total += locales.encodedSize(); return total; } uint32_t ConnectionStartBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionStartBody::print(std::ostream& out) const { out << "{ConnectionStartBody: "; if (flags & (1 << 8)) out << "server-properties=" << serverProperties << "; "; if (flags & (1 << 9)) out << "mechanisms=" << mechanisms << "; "; if (flags & (1 << 10)) out << "locales=" << locales << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionShadowSetUserBody.h0000664000076400007640000000615511752725676025445 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONSHADOWSETUSERBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONSHADOWSETUSERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionShadowSetUserBody : public ModelMethod { std::string userId; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x0E; ClusterConnectionShadowSetUserBody( ProtocolVersion, const std::string& _userId) : userId(_userId), flags(0){ flags |= (1 << 8); } ClusterConnectionShadowSetUserBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setUserId(const std::string& _userId); QPID_COMMON_EXTERN const std::string& getUserId() const; QPID_COMMON_EXTERN bool hasUserId() const; QPID_COMMON_EXTERN void clearUserIdFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.shadowSetUser(getUserId()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionShadowSetUserBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONSHADOWSETUSERBODY_H*/ qpidc-0.16/src/qpid/framing/FilePublishBody.cpp0000664000076400007640000001021511752725676022054 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FilePublishBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FilePublishBody::setExchange(const std::string& _exchange) { exchange = _exchange; flags |= (1 << 8); } const std::string& FilePublishBody::getExchange() const { return exchange; } bool FilePublishBody::hasExchange() const { return flags & (1 << 8); } void FilePublishBody::clearExchangeFlag() { flags &= ~(1 << 8); } void FilePublishBody::setRoutingKey(const std::string& _routingKey) { routingKey = _routingKey; flags |= (1 << 9); } const std::string& FilePublishBody::getRoutingKey() const { return routingKey; } bool FilePublishBody::hasRoutingKey() const { return flags & (1 << 9); } void FilePublishBody::clearRoutingKeyFlag() { flags &= ~(1 << 9); } void FilePublishBody::setMandatory(bool _mandatory) { if (_mandatory) flags |= (1 << 10); else flags &= ~(1 << 10); } bool FilePublishBody::getMandatory() const { return flags & (1 << 10); } void FilePublishBody::setImmediate(bool _immediate) { if (_immediate) flags |= (1 << 11); else flags &= ~(1 << 11); } bool FilePublishBody::getImmediate() const { return flags & (1 << 11); } void FilePublishBody::setIdentifier(const std::string& _identifier) { identifier = _identifier; flags |= (1 << 12); } const std::string& FilePublishBody::getIdentifier() const { return identifier; } bool FilePublishBody::hasIdentifier() const { return flags & (1 << 12); } void FilePublishBody::clearIdentifierFlag() { flags &= ~(1 << 12); } void FilePublishBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(exchange); if (flags & (1 << 9)) buffer.putShortString(routingKey); if (flags & (1 << 12)) buffer.putShortString(identifier); } void FilePublishBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FilePublishBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(exchange); if (flags & (1 << 9)) buffer.getShortString(routingKey); if (flags & (1 << 12)) buffer.getShortString(identifier); } void FilePublishBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FilePublishBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + exchange.size(); if (flags & (1 << 9)) total += 1 + routingKey.size(); if (flags & (1 << 12)) total += 1 + identifier.size(); return total; } uint32_t FilePublishBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FilePublishBody::print(std::ostream& out) const { out << "{FilePublishBody: "; if (flags & (1 << 8)) out << "exchange=" << exchange << "; "; if (flags & (1 << 9)) out << "routing-key=" << routingKey << "; "; if (flags & (1 << 10)) out << "mandatory=" << getMandatory() << "; "; if (flags & (1 << 11)) out << "immediate=" << getImmediate() << "; "; if (flags & (1 << 12)) out << "identifier=" << identifier << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterUpdateRequestBody.cpp0000664000076400007640000000463311752725676024012 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterUpdateRequestBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterUpdateRequestBody::setUrl(const std::string& _url) { url = _url; flags |= (1 << 8); } const std::string& ClusterUpdateRequestBody::getUrl() const { return url; } bool ClusterUpdateRequestBody::hasUrl() const { return flags & (1 << 8); } void ClusterUpdateRequestBody::clearUrlFlag() { flags &= ~(1 << 8); } void ClusterUpdateRequestBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putMediumString(url); } void ClusterUpdateRequestBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterUpdateRequestBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getMediumString(url); } void ClusterUpdateRequestBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterUpdateRequestBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 2 + url.size(); return total; } uint32_t ClusterUpdateRequestBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterUpdateRequestBody::print(std::ostream& out) const { out << "{ClusterUpdateRequestBody: "; if (flags & (1 << 8)) out << "url=" << url << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ExchangeQueryResult.cpp0000664000076400007640000000767511752725676023017 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExchangeQueryResult.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExchangeQueryResult::setType(const std::string& _type) { type = _type; flags |= (1 << 8); } const std::string& ExchangeQueryResult::getType() const { return type; } bool ExchangeQueryResult::hasType() const { return flags & (1 << 8); } void ExchangeQueryResult::clearTypeFlag() { flags &= ~(1 << 8); } void ExchangeQueryResult::setDurable(bool _durable) { if (_durable) flags |= (1 << 9); else flags &= ~(1 << 9); } bool ExchangeQueryResult::getDurable() const { return flags & (1 << 9); } void ExchangeQueryResult::setNotFound(bool _notFound) { if (_notFound) flags |= (1 << 10); else flags &= ~(1 << 10); } bool ExchangeQueryResult::getNotFound() const { return flags & (1 << 10); } void ExchangeQueryResult::setArguments(const FieldTable& _arguments) { arguments = _arguments; flags |= (1 << 11); } const FieldTable& ExchangeQueryResult::getArguments() const { return arguments; } FieldTable& ExchangeQueryResult::getArguments() { flags |= (1 << 11); return arguments; } bool ExchangeQueryResult::hasArguments() const { return flags & (1 << 11); } void ExchangeQueryResult::clearArgumentsFlag() { flags &= ~(1 << 11); } void ExchangeQueryResult::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(type); if (flags & (1 << 11)) arguments.encode(buffer); } void ExchangeQueryResult::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void ExchangeQueryResult::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(type); if (flags & (1 << 11)) arguments.decode(buffer); } void ExchangeQueryResult::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t ExchangeQueryResult::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 1 + type.size(); if (flags & (1 << 11)) total += arguments.encodedSize(); return total; } uint32_t ExchangeQueryResult::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void ExchangeQueryResult::print(std::ostream& out) const { out << "{ExchangeQueryResult: "; if (flags & (1 << 8)) out << "type=" << type << "; "; if (flags & (1 << 9)) out << "durable=" << getDurable() << "; "; if (flags & (1 << 10)) out << "not-found=" << getNotFound() << "; "; if (flags & (1 << 11)) out << "arguments=" << arguments << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const ExchangeQueryResult& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/AMQHeaderBody.cpp0000664000076400007640000000404711227113407021357 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQHeaderBody.h" #include "qpid/Exception.h" #include "qpid/log/Statement.h" uint32_t qpid::framing::AMQHeaderBody::encodedSize() const { return properties.encodedSize(); } void qpid::framing::AMQHeaderBody::encode(Buffer& buffer) const { properties.encode(buffer); } void qpid::framing::AMQHeaderBody::decode(Buffer& buffer, uint32_t size) { uint32_t limit = buffer.available() - size; while (buffer.available() > limit + 2) { uint32_t len = buffer.getLong(); uint16_t type = buffer.getShort(); if (!properties.decode(buffer, len, type)) { // TODO: should just skip & keep for later dispatch. throw Exception(QPID_MSG("Unexpected property type: " << type)); } } } uint64_t qpid::framing::AMQHeaderBody::getContentLength() const { const MessageProperties* mProps = get(); if (mProps) return mProps->getContentLength(); return 0; } void qpid::framing::AMQHeaderBody::print(std::ostream& out) const { out << "header (" << encodedSize() << " bytes)"; out << "; properties={"; properties.print(out); out << "}"; } void qpid::framing::AMQHeaderBody::accept(AMQBodyConstVisitor& v) const { v.visit(*this); } qpidc-0.16/src/qpid/framing/DtxRecoverBody.cpp0000664000076400007640000000340011752725676021731 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/DtxRecoverBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void DtxRecoverBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void DtxRecoverBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void DtxRecoverBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void DtxRecoverBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t DtxRecoverBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t DtxRecoverBody::encodedSize() const { uint32_t total = bodySize(); return total; } void DtxRecoverBody::print(std::ostream& out) const { out << "{DtxRecoverBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/BodyHandler.cpp0000664000076400007640000000345711732672260021221 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/BodyHandler.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQHeaderBody.h" #include "qpid/framing/AMQContentBody.h" #include "qpid/framing/AMQHeartbeatBody.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/Msg.h" #include using namespace qpid::framing; using boost::polymorphic_downcast; BodyHandler::~BodyHandler() {} // TODO aconway 2007-08-13: Replace with visitor. void BodyHandler::handleBody(AMQBody* body) { switch(body->type()) { case METHOD_BODY: handleMethod(polymorphic_downcast(body)); break; case HEADER_BODY: handleHeader(polymorphic_downcast(body)); break; case CONTENT_BODY: handleContent(polymorphic_downcast(body)); break; case HEARTBEAT_BODY: handleHeartbeat(polymorphic_downcast(body)); break; default: throw FramingErrorException( QPID_MSG("Invalid frame type " << body->type())); } } qpidc-0.16/src/qpid/framing/StreamCancelBody.h0000664000076400007640000000603011752725676021654 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_STREAMCANCELBODY_H #define QPID_FRAMING_STREAMCANCELBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StreamCancelBody : public ModelMethod { std::string consumerTag; uint16_t flags; public: static const ClassId CLASS_ID = 0xa; static const MethodId METHOD_ID = 0x5; StreamCancelBody( ProtocolVersion, const std::string& _consumerTag) : consumerTag(_consumerTag), flags(0){ flags |= (1 << 8); } StreamCancelBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setConsumerTag(const std::string& _consumerTag); QPID_COMMON_EXTERN const std::string& getConsumerTag() const; QPID_COMMON_EXTERN bool hasConsumerTag() const; QPID_COMMON_EXTERN void clearConsumerTagFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.cancel(getConsumerTag()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class StreamCancelBody */ }} #endif /*!QPID_FRAMING_STREAMCANCELBODY_H*/ qpidc-0.16/src/qpid/framing/ModelMethod.h0000664000076400007640000000310611227113407020653 0ustar00jrossjross00000000000000#ifndef _ModelMethod_ #define _ModelMethod_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/Header.h" namespace qpid { namespace framing { class ModelMethod : public AMQMethodBody { mutable Header header; public: virtual ~ModelMethod() {} virtual void encodeHeader(Buffer& buffer) const { header.encode(buffer); } virtual void decodeHeader(Buffer& buffer, uint32_t size=0) { header.decode(buffer, size); } virtual uint32_t headerSize() const { return header.encodedSize(); } virtual bool isSync() const { return header.getSync(); } virtual void setSync(bool on) const { header.setSync(on); } Header& getHeader() { return header; } const Header& getHeader() const { return header; } }; }} // namespace qpid::framing #endif qpidc-0.16/src/qpid/framing/MethodBodyFactory.h0000664000076400007640000000256111562043320022042 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_METHODBODYFACTORY_H #define QPID_FRAMING_METHODBODYFACTORY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/AMQBody.h" #include namespace qpid { namespace framing { class AMQMethodBody; /** * Functions to create instances of AMQMethodBody sub-classes. * Note: MethodBodyFactory.cpp file is generated by rubygen. */ class MethodBodyFactory { public: static boost::intrusive_ptr create(ClassId c, MethodId m); }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_METHODBODYFACTORY_H*/ qpidc-0.16/src/qpid/framing/ServerInvoker.h0000664000076400007640000003216411752725674021306 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SERVERINVOKER_H #define QPID_FRAMING_SERVERINVOKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/Invoker.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations& target; public: Invoker(AMQP_ServerOperations& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ConnectionStartOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionSecureOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionTuneOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionOpenBody& body); QPID_COMMON_EXTERN void visit(const ConnectionHeartbeatBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseOkBody& body); QPID_COMMON_EXTERN void visit(const SessionAttachBody& body); QPID_COMMON_EXTERN void visit(const SessionAttachedBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachedBody& body); QPID_COMMON_EXTERN void visit(const SessionRequestTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionCommandPointBody& body); QPID_COMMON_EXTERN void visit(const SessionExpectedBody& body); QPID_COMMON_EXTERN void visit(const SessionConfirmedBody& body); QPID_COMMON_EXTERN void visit(const SessionCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionKnownCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionFlushBody& body); QPID_COMMON_EXTERN void visit(const SessionGapBody& body); QPID_COMMON_EXTERN void visit(const ExecutionSyncBody& body); QPID_COMMON_EXTERN void visit(const ExecutionResultBody& body); QPID_COMMON_EXTERN void visit(const ExecutionExceptionBody& body); QPID_COMMON_EXTERN void visit(const MessageAcceptBody& body); QPID_COMMON_EXTERN void visit(const MessageRejectBody& body); QPID_COMMON_EXTERN void visit(const MessageReleaseBody& body); QPID_COMMON_EXTERN void visit(const MessageAcquireBody& body); QPID_COMMON_EXTERN void visit(const MessageResumeBody& body); QPID_COMMON_EXTERN void visit(const MessageSubscribeBody& body); QPID_COMMON_EXTERN void visit(const MessageCancelBody& body); QPID_COMMON_EXTERN void visit(const MessageSetFlowModeBody& body); QPID_COMMON_EXTERN void visit(const MessageFlowBody& body); QPID_COMMON_EXTERN void visit(const MessageFlushBody& body); QPID_COMMON_EXTERN void visit(const MessageStopBody& body); QPID_COMMON_EXTERN void visit(const TxSelectBody& body); QPID_COMMON_EXTERN void visit(const TxCommitBody& body); QPID_COMMON_EXTERN void visit(const TxRollbackBody& body); QPID_COMMON_EXTERN void visit(const DtxSelectBody& body); QPID_COMMON_EXTERN void visit(const DtxStartBody& body); QPID_COMMON_EXTERN void visit(const DtxEndBody& body); QPID_COMMON_EXTERN void visit(const DtxCommitBody& body); QPID_COMMON_EXTERN void visit(const DtxForgetBody& body); QPID_COMMON_EXTERN void visit(const DtxGetTimeoutBody& body); QPID_COMMON_EXTERN void visit(const DtxPrepareBody& body); QPID_COMMON_EXTERN void visit(const DtxRecoverBody& body); QPID_COMMON_EXTERN void visit(const DtxRollbackBody& body); QPID_COMMON_EXTERN void visit(const DtxSetTimeoutBody& body); QPID_COMMON_EXTERN void visit(const ExchangeDeclareBody& body); QPID_COMMON_EXTERN void visit(const ExchangeDeleteBody& body); QPID_COMMON_EXTERN void visit(const ExchangeQueryBody& body); QPID_COMMON_EXTERN void visit(const ExchangeBindBody& body); QPID_COMMON_EXTERN void visit(const ExchangeUnbindBody& body); QPID_COMMON_EXTERN void visit(const ExchangeBoundBody& body); QPID_COMMON_EXTERN void visit(const QueueDeclareBody& body); QPID_COMMON_EXTERN void visit(const QueueDeleteBody& body); QPID_COMMON_EXTERN void visit(const QueuePurgeBody& body); QPID_COMMON_EXTERN void visit(const QueueQueryBody& body); QPID_COMMON_EXTERN void visit(const FileQosBody& body); QPID_COMMON_EXTERN void visit(const FileConsumeBody& body); QPID_COMMON_EXTERN void visit(const FileCancelBody& body); QPID_COMMON_EXTERN void visit(const FileOpenBody& body); QPID_COMMON_EXTERN void visit(const FileOpenOkBody& body); QPID_COMMON_EXTERN void visit(const FilePublishBody& body); QPID_COMMON_EXTERN void visit(const FileAckBody& body); QPID_COMMON_EXTERN void visit(const FileRejectBody& body); QPID_COMMON_EXTERN void visit(const StreamQosBody& body); QPID_COMMON_EXTERN void visit(const StreamConsumeBody& body); QPID_COMMON_EXTERN void visit(const StreamCancelBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::ConnectionHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::ConnectionHandler& target; public: Invoker(AMQP_ServerOperations::ConnectionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ConnectionStartOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionSecureOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionTuneOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionOpenBody& body); QPID_COMMON_EXTERN void visit(const ConnectionHeartbeatBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseOkBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::SessionHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::SessionHandler& target; public: Invoker(AMQP_ServerOperations::SessionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const SessionAttachBody& body); QPID_COMMON_EXTERN void visit(const SessionAttachedBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachedBody& body); QPID_COMMON_EXTERN void visit(const SessionRequestTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionCommandPointBody& body); QPID_COMMON_EXTERN void visit(const SessionExpectedBody& body); QPID_COMMON_EXTERN void visit(const SessionConfirmedBody& body); QPID_COMMON_EXTERN void visit(const SessionCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionKnownCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionFlushBody& body); QPID_COMMON_EXTERN void visit(const SessionGapBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::ExecutionHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::ExecutionHandler& target; public: Invoker(AMQP_ServerOperations::ExecutionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ExecutionSyncBody& body); QPID_COMMON_EXTERN void visit(const ExecutionResultBody& body); QPID_COMMON_EXTERN void visit(const ExecutionExceptionBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::MessageHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::MessageHandler& target; public: Invoker(AMQP_ServerOperations::MessageHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const MessageAcceptBody& body); QPID_COMMON_EXTERN void visit(const MessageRejectBody& body); QPID_COMMON_EXTERN void visit(const MessageReleaseBody& body); QPID_COMMON_EXTERN void visit(const MessageAcquireBody& body); QPID_COMMON_EXTERN void visit(const MessageResumeBody& body); QPID_COMMON_EXTERN void visit(const MessageSubscribeBody& body); QPID_COMMON_EXTERN void visit(const MessageCancelBody& body); QPID_COMMON_EXTERN void visit(const MessageSetFlowModeBody& body); QPID_COMMON_EXTERN void visit(const MessageFlowBody& body); QPID_COMMON_EXTERN void visit(const MessageFlushBody& body); QPID_COMMON_EXTERN void visit(const MessageStopBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::TxHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::TxHandler& target; public: Invoker(AMQP_ServerOperations::TxHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const TxSelectBody& body); QPID_COMMON_EXTERN void visit(const TxCommitBody& body); QPID_COMMON_EXTERN void visit(const TxRollbackBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::DtxHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::DtxHandler& target; public: Invoker(AMQP_ServerOperations::DtxHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const DtxSelectBody& body); QPID_COMMON_EXTERN void visit(const DtxStartBody& body); QPID_COMMON_EXTERN void visit(const DtxEndBody& body); QPID_COMMON_EXTERN void visit(const DtxCommitBody& body); QPID_COMMON_EXTERN void visit(const DtxForgetBody& body); QPID_COMMON_EXTERN void visit(const DtxGetTimeoutBody& body); QPID_COMMON_EXTERN void visit(const DtxPrepareBody& body); QPID_COMMON_EXTERN void visit(const DtxRecoverBody& body); QPID_COMMON_EXTERN void visit(const DtxRollbackBody& body); QPID_COMMON_EXTERN void visit(const DtxSetTimeoutBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::ExchangeHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::ExchangeHandler& target; public: Invoker(AMQP_ServerOperations::ExchangeHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ExchangeDeclareBody& body); QPID_COMMON_EXTERN void visit(const ExchangeDeleteBody& body); QPID_COMMON_EXTERN void visit(const ExchangeQueryBody& body); QPID_COMMON_EXTERN void visit(const ExchangeBindBody& body); QPID_COMMON_EXTERN void visit(const ExchangeUnbindBody& body); QPID_COMMON_EXTERN void visit(const ExchangeBoundBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::QueueHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::QueueHandler& target; public: Invoker(AMQP_ServerOperations::QueueHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const QueueDeclareBody& body); QPID_COMMON_EXTERN void visit(const QueueDeleteBody& body); QPID_COMMON_EXTERN void visit(const QueuePurgeBody& body); QPID_COMMON_EXTERN void visit(const QueueQueryBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::FileHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::FileHandler& target; public: Invoker(AMQP_ServerOperations::FileHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const FileQosBody& body); QPID_COMMON_EXTERN void visit(const FileConsumeBody& body); QPID_COMMON_EXTERN void visit(const FileCancelBody& body); QPID_COMMON_EXTERN void visit(const FileOpenBody& body); QPID_COMMON_EXTERN void visit(const FileOpenOkBody& body); QPID_COMMON_EXTERN void visit(const FilePublishBody& body); QPID_COMMON_EXTERN void visit(const FileAckBody& body); QPID_COMMON_EXTERN void visit(const FileRejectBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ServerOperations::StreamHandler::Invoker: public qpid::framing::Invoker { AMQP_ServerOperations::StreamHandler& target; public: Invoker(AMQP_ServerOperations::StreamHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const StreamQosBody& body); QPID_COMMON_EXTERN void visit(const StreamConsumeBody& body); QPID_COMMON_EXTERN void visit(const StreamCancelBody& body); }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_SERVERINVOKER_H*/ qpidc-0.16/src/qpid/framing/SessionFlushBody.h0000664000076400007640000000630511752725676021745 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONFLUSHBODY_H #define QPID_FRAMING_SESSIONFLUSHBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionFlushBody : public AMQMethodBody { uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0xc; SessionFlushBody( ProtocolVersion, bool _expected, bool _confirmed, bool _completed) : flags(0){ setExpected(_expected); setConfirmed(_confirmed); setCompleted(_completed); } SessionFlushBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setExpected(bool _expected); QPID_COMMON_EXTERN bool getExpected() const; QPID_COMMON_EXTERN void setConfirmed(bool _confirmed); QPID_COMMON_EXTERN bool getConfirmed() const; QPID_COMMON_EXTERN void setCompleted(bool _completed); QPID_COMMON_EXTERN bool getCompleted() const; virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.flush(getExpected(), getConfirmed(), getCompleted()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionFlushBody */ }} #endif /*!QPID_FRAMING_SESSIONFLUSHBODY_H*/ qpidc-0.16/src/qpid/framing/QueuePurgeBody.h0000664000076400007640000000571511752725676021413 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_QUEUEPURGEBODY_H #define QPID_FRAMING_QUEUEPURGEBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN QueuePurgeBody : public ModelMethod { std::string queue; uint16_t flags; public: static const ClassId CLASS_ID = 0x8; static const MethodId METHOD_ID = 0x3; QueuePurgeBody( ProtocolVersion, const std::string& _queue) : queue(_queue), flags(0){ flags |= (1 << 8); } QueuePurgeBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.purge(getQueue()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class QueuePurgeBody */ }} #endif /*!QPID_FRAMING_QUEUEPURGEBODY_H*/ qpidc-0.16/src/qpid/framing/AMQHeartbeatBody.h0000664000076400007640000000313011564561152021533 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/AMQBody.h" #include "qpid/framing/Buffer.h" #include "qpid/CommonImportExport.h" #ifndef _AMQHeartbeatBody_ #define _AMQHeartbeatBody_ namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQHeartbeatBody : public AMQBody { public: QPID_COMMON_EXTERN virtual ~AMQHeartbeatBody(); inline uint32_t encodedSize() const { return 0; } inline uint8_t type() const { return HEARTBEAT_BODY; } inline void encode(Buffer& ) const {} inline void decode(Buffer& , uint32_t /*size*/) {} QPID_COMMON_EXTERN virtual void print(std::ostream& out) const; void accept(AMQBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } }; } } #endif qpidc-0.16/src/qpid/framing/FileConsumeBody.cpp0000664000076400007640000001126511752725676022065 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileConsumeBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileConsumeBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& FileConsumeBody::getQueue() const { return queue; } bool FileConsumeBody::hasQueue() const { return flags & (1 << 8); } void FileConsumeBody::clearQueueFlag() { flags &= ~(1 << 8); } void FileConsumeBody::setConsumerTag(const std::string& _consumerTag) { consumerTag = _consumerTag; flags |= (1 << 9); } const std::string& FileConsumeBody::getConsumerTag() const { return consumerTag; } bool FileConsumeBody::hasConsumerTag() const { return flags & (1 << 9); } void FileConsumeBody::clearConsumerTagFlag() { flags &= ~(1 << 9); } void FileConsumeBody::setNoLocal(bool _noLocal) { if (_noLocal) flags |= (1 << 10); else flags &= ~(1 << 10); } bool FileConsumeBody::getNoLocal() const { return flags & (1 << 10); } void FileConsumeBody::setNoAck(bool _noAck) { if (_noAck) flags |= (1 << 11); else flags &= ~(1 << 11); } bool FileConsumeBody::getNoAck() const { return flags & (1 << 11); } void FileConsumeBody::setExclusive(bool _exclusive) { if (_exclusive) flags |= (1 << 12); else flags &= ~(1 << 12); } bool FileConsumeBody::getExclusive() const { return flags & (1 << 12); } void FileConsumeBody::setNowait(bool _nowait) { if (_nowait) flags |= (1 << 13); else flags &= ~(1 << 13); } bool FileConsumeBody::getNowait() const { return flags & (1 << 13); } void FileConsumeBody::setArguments(const FieldTable& _arguments) { arguments = _arguments; flags |= (1 << 14); } const FieldTable& FileConsumeBody::getArguments() const { return arguments; } FieldTable& FileConsumeBody::getArguments() { flags |= (1 << 14); return arguments; } bool FileConsumeBody::hasArguments() const { return flags & (1 << 14); } void FileConsumeBody::clearArgumentsFlag() { flags &= ~(1 << 14); } void FileConsumeBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); if (flags & (1 << 9)) buffer.putShortString(consumerTag); if (flags & (1 << 14)) arguments.encode(buffer); } void FileConsumeBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileConsumeBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); if (flags & (1 << 9)) buffer.getShortString(consumerTag); if (flags & (1 << 14)) arguments.decode(buffer); } void FileConsumeBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileConsumeBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); if (flags & (1 << 9)) total += 1 + consumerTag.size(); if (flags & (1 << 14)) total += arguments.encodedSize(); return total; } uint32_t FileConsumeBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileConsumeBody::print(std::ostream& out) const { out << "{FileConsumeBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; if (flags & (1 << 9)) out << "consumer-tag=" << consumerTag << "; "; if (flags & (1 << 10)) out << "no-local=" << getNoLocal() << "; "; if (flags & (1 << 11)) out << "no-ack=" << getNoAck() << "; "; if (flags & (1 << 12)) out << "exclusive=" << getExclusive() << "; "; if (flags & (1 << 13)) out << "nowait=" << getNowait() << "; "; if (flags & (1 << 14)) out << "arguments=" << arguments << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MethodContent.h0000664000076400007640000000223711725251223021233 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _MethodContent_ #define _MethodContent_ #include #include "qpid/framing/AMQHeaderBody.h" namespace qpid { namespace framing { class MethodContent { public: virtual ~MethodContent() {} //TODO: rethink this interface virtual const AMQHeaderBody& getHeader() const = 0; virtual const std::string& getData() const = 0; }; }} #endif qpidc-0.16/src/qpid/framing/FileQosBody.cpp0000664000076400007640000000625011752725676021214 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileQosBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileQosBody::setPrefetchSize(uint32_t _prefetchSize) { prefetchSize = _prefetchSize; flags |= (1 << 8); } uint32_t FileQosBody::getPrefetchSize() const { return prefetchSize; } bool FileQosBody::hasPrefetchSize() const { return flags & (1 << 8); } void FileQosBody::clearPrefetchSizeFlag() { flags &= ~(1 << 8); } void FileQosBody::setPrefetchCount(uint16_t _prefetchCount) { prefetchCount = _prefetchCount; flags |= (1 << 9); } uint16_t FileQosBody::getPrefetchCount() const { return prefetchCount; } bool FileQosBody::hasPrefetchCount() const { return flags & (1 << 9); } void FileQosBody::clearPrefetchCountFlag() { flags &= ~(1 << 9); } void FileQosBody::setGlobal(bool _global) { if (_global) flags |= (1 << 10); else flags &= ~(1 << 10); } bool FileQosBody::getGlobal() const { return flags & (1 << 10); } void FileQosBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLong(prefetchSize); if (flags & (1 << 9)) buffer.putShort(prefetchCount); } void FileQosBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileQosBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) prefetchSize = buffer.getLong(); if (flags & (1 << 9)) prefetchCount = buffer.getShort(); } void FileQosBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileQosBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 4;//prefetchSize if (flags & (1 << 9)) total += 2;//prefetchCount return total; } uint32_t FileQosBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileQosBody::print(std::ostream& out) const { out << "{FileQosBody: "; if (flags & (1 << 8)) out << "prefetch-size=" << prefetchSize << "; "; if (flags & (1 << 9)) out << "prefetch-count=" << prefetchCount << "; "; if (flags & (1 << 10)) out << "global=" << getGlobal() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/StreamPublishBody.h0000664000076400007640000000736411752725676022110 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_STREAMPUBLISHBODY_H #define QPID_FRAMING_STREAMPUBLISHBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StreamPublishBody : public ModelMethod { std::string exchange; std::string routingKey; uint16_t flags; public: static const ClassId CLASS_ID = 0xa; static const MethodId METHOD_ID = 0x6; StreamPublishBody( ProtocolVersion, const std::string& _exchange, const std::string& _routingKey, bool _mandatory, bool _immediate) : exchange(_exchange), routingKey(_routingKey), flags(0){ setMandatory(_mandatory); setImmediate(_immediate); flags |= (1 << 8); flags |= (1 << 9); } StreamPublishBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setRoutingKey(const std::string& _routingKey); QPID_COMMON_EXTERN const std::string& getRoutingKey() const; QPID_COMMON_EXTERN bool hasRoutingKey() const; QPID_COMMON_EXTERN void clearRoutingKeyFlag(); QPID_COMMON_EXTERN void setMandatory(bool _mandatory); QPID_COMMON_EXTERN bool getMandatory() const; QPID_COMMON_EXTERN void setImmediate(bool _immediate); QPID_COMMON_EXTERN bool getImmediate() const; typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.publish(getExchange(), getRoutingKey(), getMandatory(), getImmediate()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return true; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class StreamPublishBody */ }} #endif /*!QPID_FRAMING_STREAMPUBLISHBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionTxPublishBody.cpp0000664000076400007640000000545111752725676025160 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionTxPublishBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionTxPublishBody::setQueues(const Array& _queues) { queues = _queues; flags |= (1 << 8); } const Array& ClusterConnectionTxPublishBody::getQueues() const { return queues; } bool ClusterConnectionTxPublishBody::hasQueues() const { return flags & (1 << 8); } void ClusterConnectionTxPublishBody::clearQueuesFlag() { flags &= ~(1 << 8); } void ClusterConnectionTxPublishBody::setDelivered(bool _delivered) { if (_delivered) flags |= (1 << 9); else flags &= ~(1 << 9); } bool ClusterConnectionTxPublishBody::getDelivered() const { return flags & (1 << 9); } void ClusterConnectionTxPublishBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) queues.encode(buffer); } void ClusterConnectionTxPublishBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionTxPublishBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) queues.decode(buffer); } void ClusterConnectionTxPublishBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionTxPublishBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += queues.encodedSize(); return total; } uint32_t ClusterConnectionTxPublishBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionTxPublishBody::print(std::ostream& out) const { out << "{ClusterConnectionTxPublishBody: "; if (flags & (1 << 8)) out << "queues=" << queues << "; "; if (flags & (1 << 9)) out << "delivered=" << getDelivered() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageTransferBody.cpp0000664000076400007640000000724011752725676022743 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageTransferBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageTransferBody::setDestination(const std::string& _destination) { destination = _destination; flags |= (1 << 8); } const std::string& MessageTransferBody::getDestination() const { return destination; } bool MessageTransferBody::hasDestination() const { return flags & (1 << 8); } void MessageTransferBody::clearDestinationFlag() { flags &= ~(1 << 8); } void MessageTransferBody::setAcceptMode(uint8_t _acceptMode) { acceptMode = _acceptMode; flags |= (1 << 9); } uint8_t MessageTransferBody::getAcceptMode() const { return acceptMode; } bool MessageTransferBody::hasAcceptMode() const { return flags & (1 << 9); } void MessageTransferBody::clearAcceptModeFlag() { flags &= ~(1 << 9); } void MessageTransferBody::setAcquireMode(uint8_t _acquireMode) { acquireMode = _acquireMode; flags |= (1 << 10); } uint8_t MessageTransferBody::getAcquireMode() const { return acquireMode; } bool MessageTransferBody::hasAcquireMode() const { return flags & (1 << 10); } void MessageTransferBody::clearAcquireModeFlag() { flags &= ~(1 << 10); } void MessageTransferBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(destination); if (flags & (1 << 9)) buffer.putOctet(acceptMode); if (flags & (1 << 10)) buffer.putOctet(acquireMode); } void MessageTransferBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageTransferBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(destination); if (flags & (1 << 9)) acceptMode = buffer.getOctet(); if (flags & (1 << 10)) acquireMode = buffer.getOctet(); } void MessageTransferBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageTransferBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + destination.size(); if (flags & (1 << 9)) total += 1;//acceptMode if (flags & (1 << 10)) total += 1;//acquireMode return total; } uint32_t MessageTransferBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageTransferBody::print(std::ostream& out) const { out << "{MessageTransferBody: "; if (flags & (1 << 8)) out << "destination=" << destination << "; "; if (flags & (1 << 9)) out << "accept-mode=" << (int) acceptMode << "; "; if (flags & (1 << 10)) out << "acquire-mode=" << (int) acquireMode << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/StreamQosOkBody.h0000664000076400007640000000510411752725676021524 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_STREAMQOSOKBODY_H #define QPID_FRAMING_STREAMQOSOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StreamQosOkBody : public ModelMethod { uint16_t flags; public: static const ClassId CLASS_ID = 0xa; static const MethodId METHOD_ID = 0x2; StreamQosOkBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.qosOk(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class StreamQosOkBody */ }} #endif /*!QPID_FRAMING_STREAMQOSOKBODY_H*/ qpidc-0.16/src/qpid/framing/ProtocolInitiation.cpp0000664000076400007640000000374111227113407022643 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/ProtocolInitiation.h" namespace qpid { namespace framing { ProtocolInitiation::ProtocolInitiation(){} ProtocolInitiation::ProtocolInitiation(uint8_t _major, uint8_t _minor) : version(_major, _minor) {} ProtocolInitiation::ProtocolInitiation(ProtocolVersion p) : version(p) {} ProtocolInitiation::~ProtocolInitiation(){} void ProtocolInitiation::encode(Buffer& buffer) const { buffer.putOctet('A'); buffer.putOctet('M'); buffer.putOctet('Q'); buffer.putOctet('P'); buffer.putOctet(1);//class buffer.putOctet(1);//instance buffer.putOctet(version.getMajor()); buffer.putOctet(version.getMinor()); } bool ProtocolInitiation::decode(Buffer& buffer){ if(buffer.available() >= 8){ buffer.getOctet();//A buffer.getOctet();//M buffer.getOctet();//Q buffer.getOctet();//P buffer.getOctet();//class buffer.getOctet();//instance version.setMajor(buffer.getOctet()); version.setMinor(buffer.getOctet()); return true; }else{ return false; } } std::ostream& operator<<(std::ostream& o, const framing::ProtocolInitiation& pi) { return o << int(pi.getMajor()) << "-" << int(pi.getMinor()); } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/SessionCompletedBody.cpp0000664000076400007640000000520311752725676023127 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionCompletedBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionCompletedBody::setCommands(const SequenceSet& _commands) { commands = _commands; flags |= (1 << 8); } const SequenceSet& SessionCompletedBody::getCommands() const { return commands; } bool SessionCompletedBody::hasCommands() const { return flags & (1 << 8); } void SessionCompletedBody::clearCommandsFlag() { flags &= ~(1 << 8); } void SessionCompletedBody::setTimelyReply(bool _timelyReply) { if (_timelyReply) flags |= (1 << 9); else flags &= ~(1 << 9); } bool SessionCompletedBody::getTimelyReply() const { return flags & (1 << 9); } void SessionCompletedBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) commands.encode(buffer); } void SessionCompletedBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionCompletedBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) commands.decode(buffer); } void SessionCompletedBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionCompletedBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += commands.encodedSize(); return total; } uint32_t SessionCompletedBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionCompletedBody::print(std::ostream& out) const { out << "{SessionCompletedBody: "; if (flags & (1 << 8)) out << "commands=" << commands << "; "; if (flags & (1 << 9)) out << "timely-reply=" << getTimelyReply() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/List.cpp0000664000076400007640000000577211625205114017732 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/List.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/FieldValue.h" #include "qpid/Exception.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/Msg.h" namespace qpid { namespace framing { uint32_t List::encodedSize() const { uint32_t len(4/*size*/ + 4/*count*/); for(Values::const_iterator i = values.begin(); i != values.end(); ++i) { len += (*i)->encodedSize(); } return len; } void List::encode(Buffer& buffer) const { buffer.putLong(encodedSize() - 4); buffer.putLong(size()); for (Values::const_iterator i = values.begin(); i!=values.end(); ++i) { (*i)->encode(buffer); } } void List::decode(Buffer& buffer) { values.clear(); if (buffer.available() < 4) throw IllegalArgumentException(QPID_MSG("Not enough data for list, expected at least " " 4 bytes but only " << buffer.available() << " available")); uint32_t size = buffer.getLong(); uint32_t available = buffer.available(); if (available < size) { throw IllegalArgumentException(QPID_MSG("Not enough data for list, expected " << size << " bytes but only " << available << " available")); } if (size) { if (buffer.available() < 4) throw IllegalArgumentException(QPID_MSG("Not enough data for list, expected at least " " 4 bytes but only " << buffer.available() << " available")); uint32_t count = buffer.getLong(); for (uint32_t i = 0; i < count; i++) { ValuePtr value(new FieldValue); value->decode(buffer); values.push_back(value); } } } bool List::operator==(const List& other) const { return values.size() == other.values.size() && std::equal(values.begin(), values.end(), other.values.begin()); } std::ostream& operator<<(std::ostream& out, const List& l) { out << "{"; for(List::Values::const_iterator i = l.values.begin(); i != l.values.end(); ++i) { if (i != l.values.begin()) out << ", "; (*i)->print(out); } return out << "}"; } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/MessageAcceptBody.cpp0000664000076400007640000000457711752725676022370 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageAcceptBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageAcceptBody::setTransfers(const SequenceSet& _transfers) { transfers = _transfers; flags |= (1 << 8); } const SequenceSet& MessageAcceptBody::getTransfers() const { return transfers; } bool MessageAcceptBody::hasTransfers() const { return flags & (1 << 8); } void MessageAcceptBody::clearTransfersFlag() { flags &= ~(1 << 8); } void MessageAcceptBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) transfers.encode(buffer); } void MessageAcceptBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageAcceptBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) transfers.decode(buffer); } void MessageAcceptBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageAcceptBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += transfers.encodedSize(); return total; } uint32_t MessageAcceptBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageAcceptBody::print(std::ostream& out) const { out << "{MessageAcceptBody: "; if (flags & (1 << 8)) out << "transfers=" << transfers << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageRejectBody.cpp0000664000076400007640000000670111752725676022374 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageRejectBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageRejectBody::setTransfers(const SequenceSet& _transfers) { transfers = _transfers; flags |= (1 << 8); } const SequenceSet& MessageRejectBody::getTransfers() const { return transfers; } bool MessageRejectBody::hasTransfers() const { return flags & (1 << 8); } void MessageRejectBody::clearTransfersFlag() { flags &= ~(1 << 8); } void MessageRejectBody::setCode(uint16_t _code) { code = _code; flags |= (1 << 9); } uint16_t MessageRejectBody::getCode() const { return code; } bool MessageRejectBody::hasCode() const { return flags & (1 << 9); } void MessageRejectBody::clearCodeFlag() { flags &= ~(1 << 9); } void MessageRejectBody::setText(const std::string& _text) { text = _text; flags |= (1 << 10); } const std::string& MessageRejectBody::getText() const { return text; } bool MessageRejectBody::hasText() const { return flags & (1 << 10); } void MessageRejectBody::clearTextFlag() { flags &= ~(1 << 10); } void MessageRejectBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) transfers.encode(buffer); if (flags & (1 << 9)) buffer.putShort(code); if (flags & (1 << 10)) buffer.putShortString(text); } void MessageRejectBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageRejectBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) transfers.decode(buffer); if (flags & (1 << 9)) code = buffer.getShort(); if (flags & (1 << 10)) buffer.getShortString(text); } void MessageRejectBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageRejectBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += transfers.encodedSize(); if (flags & (1 << 9)) total += 2;//code if (flags & (1 << 10)) total += 1 + text.size(); return total; } uint32_t MessageRejectBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageRejectBody::print(std::ostream& out) const { out << "{MessageRejectBody: "; if (flags & (1 << 8)) out << "transfers=" << transfers << "; "; if (flags & (1 << 9)) out << "code=" << code << "; "; if (flags & (1 << 10)) out << "text=" << text << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionStartOkBody.h0000664000076400007640000001040311752725676022721 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONSTARTOKBODY_H #define QPID_FRAMING_CONNECTIONSTARTOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionStartOkBody : public AMQMethodBody { FieldTable clientProperties; std::string mechanism; std::string response; std::string locale; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0x2; ConnectionStartOkBody( ProtocolVersion, const FieldTable& _clientProperties, const std::string& _mechanism, const std::string& _response, const std::string& _locale) : clientProperties(_clientProperties), mechanism(_mechanism), response(_response), locale(_locale), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); } ConnectionStartOkBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setClientProperties(const FieldTable& _clientProperties); QPID_COMMON_EXTERN const FieldTable& getClientProperties() const; QPID_COMMON_EXTERN FieldTable& getClientProperties(); QPID_COMMON_EXTERN bool hasClientProperties() const; QPID_COMMON_EXTERN void clearClientPropertiesFlag(); QPID_COMMON_EXTERN void setMechanism(const std::string& _mechanism); QPID_COMMON_EXTERN const std::string& getMechanism() const; QPID_COMMON_EXTERN bool hasMechanism() const; QPID_COMMON_EXTERN void clearMechanismFlag(); QPID_COMMON_EXTERN void setResponse(const std::string& _response); QPID_COMMON_EXTERN const std::string& getResponse() const; QPID_COMMON_EXTERN bool hasResponse() const; QPID_COMMON_EXTERN void clearResponseFlag(); QPID_COMMON_EXTERN void setLocale(const std::string& _locale); QPID_COMMON_EXTERN const std::string& getLocale() const; QPID_COMMON_EXTERN bool hasLocale() const; QPID_COMMON_EXTERN void clearLocaleFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.startOk(getClientProperties(), getMechanism(), getResponse(), getLocale()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionStartOkBody */ }} #endif /*!QPID_FRAMING_CONNECTIONSTARTOKBODY_H*/ qpidc-0.16/src/qpid/framing/SessionRequestTimeoutBody.cpp0000664000076400007640000000456011752725676024217 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/SessionRequestTimeoutBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void SessionRequestTimeoutBody::setTimeout(uint32_t _timeout) { timeout = _timeout; flags |= (1 << 8); } uint32_t SessionRequestTimeoutBody::getTimeout() const { return timeout; } bool SessionRequestTimeoutBody::hasTimeout() const { return flags & (1 << 8); } void SessionRequestTimeoutBody::clearTimeoutFlag() { flags &= ~(1 << 8); } void SessionRequestTimeoutBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLong(timeout); } void SessionRequestTimeoutBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void SessionRequestTimeoutBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) timeout = buffer.getLong(); } void SessionRequestTimeoutBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t SessionRequestTimeoutBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 4;//timeout return total; } uint32_t SessionRequestTimeoutBody::encodedSize() const { uint32_t total = bodySize(); return total; } void SessionRequestTimeoutBody::print(std::ostream& out) const { out << "{SessionRequestTimeoutBody: "; if (flags & (1 << 8)) out << "timeout=" << timeout << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionAccumulatedAckBody.cpp0000664000076400007640000000513411752725676026102 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionAccumulatedAckBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionAccumulatedAckBody::setCommands(const SequenceSet& _commands) { commands = _commands; flags |= (1 << 8); } const SequenceSet& ClusterConnectionAccumulatedAckBody::getCommands() const { return commands; } bool ClusterConnectionAccumulatedAckBody::hasCommands() const { return flags & (1 << 8); } void ClusterConnectionAccumulatedAckBody::clearCommandsFlag() { flags &= ~(1 << 8); } void ClusterConnectionAccumulatedAckBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) commands.encode(buffer); } void ClusterConnectionAccumulatedAckBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionAccumulatedAckBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) commands.decode(buffer); } void ClusterConnectionAccumulatedAckBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionAccumulatedAckBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += commands.encodedSize(); return total; } uint32_t ClusterConnectionAccumulatedAckBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionAccumulatedAckBody::print(std::ostream& out) const { out << "{ClusterConnectionAccumulatedAckBody: "; if (flags & (1 << 8)) out << "commands=" << commands << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClientInvoker.h0000664000076400007640000002034611752725673021254 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLIENTINVOKER_H #define QPID_FRAMING_CLIENTINVOKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQP_ClientOperations.h" #include "qpid/framing/Invoker.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN AMQP_ClientOperations::Invoker: public qpid::framing::Invoker { AMQP_ClientOperations& target; public: Invoker(AMQP_ClientOperations& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ConnectionStartBody& body); QPID_COMMON_EXTERN void visit(const ConnectionSecureBody& body); QPID_COMMON_EXTERN void visit(const ConnectionTuneBody& body); QPID_COMMON_EXTERN void visit(const ConnectionOpenOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionRedirectBody& body); QPID_COMMON_EXTERN void visit(const ConnectionHeartbeatBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseOkBody& body); QPID_COMMON_EXTERN void visit(const SessionAttachBody& body); QPID_COMMON_EXTERN void visit(const SessionAttachedBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachedBody& body); QPID_COMMON_EXTERN void visit(const SessionRequestTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionCommandPointBody& body); QPID_COMMON_EXTERN void visit(const SessionExpectedBody& body); QPID_COMMON_EXTERN void visit(const SessionConfirmedBody& body); QPID_COMMON_EXTERN void visit(const SessionCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionKnownCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionFlushBody& body); QPID_COMMON_EXTERN void visit(const SessionGapBody& body); QPID_COMMON_EXTERN void visit(const ExecutionSyncBody& body); QPID_COMMON_EXTERN void visit(const ExecutionResultBody& body); QPID_COMMON_EXTERN void visit(const ExecutionExceptionBody& body); QPID_COMMON_EXTERN void visit(const MessageAcceptBody& body); QPID_COMMON_EXTERN void visit(const MessageRejectBody& body); QPID_COMMON_EXTERN void visit(const MessageReleaseBody& body); QPID_COMMON_EXTERN void visit(const MessageResumeBody& body); QPID_COMMON_EXTERN void visit(const MessageSetFlowModeBody& body); QPID_COMMON_EXTERN void visit(const MessageFlowBody& body); QPID_COMMON_EXTERN void visit(const MessageStopBody& body); QPID_COMMON_EXTERN void visit(const FileQosOkBody& body); QPID_COMMON_EXTERN void visit(const FileConsumeOkBody& body); QPID_COMMON_EXTERN void visit(const FileOpenBody& body); QPID_COMMON_EXTERN void visit(const FileOpenOkBody& body); QPID_COMMON_EXTERN void visit(const FileDeliverBody& body); QPID_COMMON_EXTERN void visit(const StreamQosOkBody& body); QPID_COMMON_EXTERN void visit(const StreamConsumeOkBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ClientOperations::ConnectionHandler::Invoker: public qpid::framing::Invoker { AMQP_ClientOperations::ConnectionHandler& target; public: Invoker(AMQP_ClientOperations::ConnectionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ConnectionStartBody& body); QPID_COMMON_EXTERN void visit(const ConnectionSecureBody& body); QPID_COMMON_EXTERN void visit(const ConnectionTuneBody& body); QPID_COMMON_EXTERN void visit(const ConnectionOpenOkBody& body); QPID_COMMON_EXTERN void visit(const ConnectionRedirectBody& body); QPID_COMMON_EXTERN void visit(const ConnectionHeartbeatBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseBody& body); QPID_COMMON_EXTERN void visit(const ConnectionCloseOkBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ClientOperations::SessionHandler::Invoker: public qpid::framing::Invoker { AMQP_ClientOperations::SessionHandler& target; public: Invoker(AMQP_ClientOperations::SessionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const SessionAttachBody& body); QPID_COMMON_EXTERN void visit(const SessionAttachedBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachBody& body); QPID_COMMON_EXTERN void visit(const SessionDetachedBody& body); QPID_COMMON_EXTERN void visit(const SessionRequestTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionTimeoutBody& body); QPID_COMMON_EXTERN void visit(const SessionCommandPointBody& body); QPID_COMMON_EXTERN void visit(const SessionExpectedBody& body); QPID_COMMON_EXTERN void visit(const SessionConfirmedBody& body); QPID_COMMON_EXTERN void visit(const SessionCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionKnownCompletedBody& body); QPID_COMMON_EXTERN void visit(const SessionFlushBody& body); QPID_COMMON_EXTERN void visit(const SessionGapBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ClientOperations::ExecutionHandler::Invoker: public qpid::framing::Invoker { AMQP_ClientOperations::ExecutionHandler& target; public: Invoker(AMQP_ClientOperations::ExecutionHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const ExecutionSyncBody& body); QPID_COMMON_EXTERN void visit(const ExecutionResultBody& body); QPID_COMMON_EXTERN void visit(const ExecutionExceptionBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ClientOperations::MessageHandler::Invoker: public qpid::framing::Invoker { AMQP_ClientOperations::MessageHandler& target; public: Invoker(AMQP_ClientOperations::MessageHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const MessageAcceptBody& body); QPID_COMMON_EXTERN void visit(const MessageRejectBody& body); QPID_COMMON_EXTERN void visit(const MessageReleaseBody& body); QPID_COMMON_EXTERN void visit(const MessageResumeBody& body); QPID_COMMON_EXTERN void visit(const MessageSetFlowModeBody& body); QPID_COMMON_EXTERN void visit(const MessageFlowBody& body); QPID_COMMON_EXTERN void visit(const MessageStopBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ClientOperations::FileHandler::Invoker: public qpid::framing::Invoker { AMQP_ClientOperations::FileHandler& target; public: Invoker(AMQP_ClientOperations::FileHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const FileQosOkBody& body); QPID_COMMON_EXTERN void visit(const FileConsumeOkBody& body); QPID_COMMON_EXTERN void visit(const FileOpenBody& body); QPID_COMMON_EXTERN void visit(const FileOpenOkBody& body); QPID_COMMON_EXTERN void visit(const FileDeliverBody& body); }; class QPID_COMMON_CLASS_EXTERN AMQP_ClientOperations::StreamHandler::Invoker: public qpid::framing::Invoker { AMQP_ClientOperations::StreamHandler& target; public: Invoker(AMQP_ClientOperations::StreamHandler& target_) : target(target_) {} using MethodBodyDefaultVisitor::visit; QPID_COMMON_EXTERN void visit(const StreamQosOkBody& body); QPID_COMMON_EXTERN void visit(const StreamConsumeOkBody& body); }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_CLIENTINVOKER_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionShadowReadyBody.cpp0000664000076400007640000001357111752725676025452 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionShadowReadyBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionShadowReadyBody::setMemberId(uint64_t _memberId) { memberId = _memberId; flags |= (1 << 8); } uint64_t ClusterConnectionShadowReadyBody::getMemberId() const { return memberId; } bool ClusterConnectionShadowReadyBody::hasMemberId() const { return flags & (1 << 8); } void ClusterConnectionShadowReadyBody::clearMemberIdFlag() { flags &= ~(1 << 8); } void ClusterConnectionShadowReadyBody::setConnectionId(uint64_t _connectionId) { connectionId = _connectionId; flags |= (1 << 9); } uint64_t ClusterConnectionShadowReadyBody::getConnectionId() const { return connectionId; } bool ClusterConnectionShadowReadyBody::hasConnectionId() const { return flags & (1 << 9); } void ClusterConnectionShadowReadyBody::clearConnectionIdFlag() { flags &= ~(1 << 9); } void ClusterConnectionShadowReadyBody::setManagementId(const std::string& _managementId) { managementId = _managementId; flags |= (1 << 10); } const std::string& ClusterConnectionShadowReadyBody::getManagementId() const { return managementId; } bool ClusterConnectionShadowReadyBody::hasManagementId() const { return flags & (1 << 10); } void ClusterConnectionShadowReadyBody::clearManagementIdFlag() { flags &= ~(1 << 10); } void ClusterConnectionShadowReadyBody::setUserName(const std::string& _userName) { userName = _userName; flags |= (1 << 11); } const std::string& ClusterConnectionShadowReadyBody::getUserName() const { return userName; } bool ClusterConnectionShadowReadyBody::hasUserName() const { return flags & (1 << 11); } void ClusterConnectionShadowReadyBody::clearUserNameFlag() { flags &= ~(1 << 11); } void ClusterConnectionShadowReadyBody::setFragment(const std::string& _fragment) { fragment = _fragment; flags |= (1 << 12); } const std::string& ClusterConnectionShadowReadyBody::getFragment() const { return fragment; } bool ClusterConnectionShadowReadyBody::hasFragment() const { return flags & (1 << 12); } void ClusterConnectionShadowReadyBody::clearFragmentFlag() { flags &= ~(1 << 12); } void ClusterConnectionShadowReadyBody::setSendMax(uint32_t _sendMax) { sendMax = _sendMax; flags |= (1 << 13); } uint32_t ClusterConnectionShadowReadyBody::getSendMax() const { return sendMax; } bool ClusterConnectionShadowReadyBody::hasSendMax() const { return flags & (1 << 13); } void ClusterConnectionShadowReadyBody::clearSendMaxFlag() { flags &= ~(1 << 13); } void ClusterConnectionShadowReadyBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongLong(memberId); if (flags & (1 << 9)) buffer.putLongLong(connectionId); if (flags & (1 << 10)) buffer.putMediumString(managementId); if (flags & (1 << 11)) buffer.putShortString(userName); if (flags & (1 << 12)) buffer.putLongString(fragment); if (flags & (1 << 13)) buffer.putLong(sendMax); } void ClusterConnectionShadowReadyBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionShadowReadyBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) memberId = buffer.getLongLong(); if (flags & (1 << 9)) connectionId = buffer.getLongLong(); if (flags & (1 << 10)) buffer.getMediumString(managementId); if (flags & (1 << 11)) buffer.getShortString(userName); if (flags & (1 << 12)) buffer.getLongString(fragment); if (flags & (1 << 13)) sendMax = buffer.getLong(); } void ClusterConnectionShadowReadyBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionShadowReadyBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 8;//memberId if (flags & (1 << 9)) total += 8;//connectionId if (flags & (1 << 10)) total += 2 + managementId.size(); if (flags & (1 << 11)) total += 1 + userName.size(); if (flags & (1 << 12)) total += 4 + fragment.size(); if (flags & (1 << 13)) total += 4;//sendMax return total; } uint32_t ClusterConnectionShadowReadyBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionShadowReadyBody::print(std::ostream& out) const { out << "{ClusterConnectionShadowReadyBody: "; if (flags & (1 << 8)) out << "member-id=" << memberId << "; "; if (flags & (1 << 9)) out << "connection-id=" << connectionId << "; "; if (flags & (1 << 10)) out << "management-id=" << managementId << "; "; if (flags & (1 << 11)) out << "user-name=" << userName << "; "; if (flags & (1 << 12)) out << "fragment=" << fragment << "; "; if (flags & (1 << 13)) out << "send-max=" << sendMax << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterShutdownBody.cpp0000664000076400007640000000463111752725676023030 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterShutdownBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterShutdownBody::setShutdownId(const Uuid& _shutdownId) { shutdownId = _shutdownId; flags |= (1 << 8); } const Uuid& ClusterShutdownBody::getShutdownId() const { return shutdownId; } bool ClusterShutdownBody::hasShutdownId() const { return flags & (1 << 8); } void ClusterShutdownBody::clearShutdownIdFlag() { flags &= ~(1 << 8); } void ClusterShutdownBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) shutdownId.encode(buffer); } void ClusterShutdownBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterShutdownBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) shutdownId.decode(buffer); } void ClusterShutdownBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterShutdownBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += shutdownId.encodedSize(); return total; } uint32_t ClusterShutdownBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterShutdownBody::print(std::ostream& out) const { out << "{ClusterShutdownBody: "; if (flags & (1 << 8)) out << "shutdown-id=" << shutdownId << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionShadowPrepareBody.h0000664000076400007640000000625111752725676025446 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONSHADOWPREPAREBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONSHADOWPREPAREBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionShadowPrepareBody : public ModelMethod { std::string managementId; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x0F; ClusterConnectionShadowPrepareBody( ProtocolVersion, const std::string& _managementId) : managementId(_managementId), flags(0){ flags |= (1 << 8); } ClusterConnectionShadowPrepareBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setManagementId(const std::string& _managementId); QPID_COMMON_EXTERN const std::string& getManagementId() const; QPID_COMMON_EXTERN bool hasManagementId() const; QPID_COMMON_EXTERN void clearManagementIdFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.shadowPrepare(getManagementId()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionShadowPrepareBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONSHADOWPREPAREBODY_H*/ qpidc-0.16/src/qpid/framing/ConnectionRedirectBody.h0000664000076400007640000000660311752725676023102 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONREDIRECTBODY_H #define QPID_FRAMING_CONNECTIONREDIRECTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionRedirectBody : public AMQMethodBody { std::string host; Array knownHosts; uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0x9; ConnectionRedirectBody( ProtocolVersion, const std::string& _host, const Array& _knownHosts) : host(_host), knownHosts(_knownHosts), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ConnectionRedirectBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setHost(const std::string& _host); QPID_COMMON_EXTERN const std::string& getHost() const; QPID_COMMON_EXTERN bool hasHost() const; QPID_COMMON_EXTERN void clearHostFlag(); QPID_COMMON_EXTERN void setKnownHosts(const Array& _knownHosts); QPID_COMMON_EXTERN const Array& getKnownHosts() const; QPID_COMMON_EXTERN bool hasKnownHosts() const; QPID_COMMON_EXTERN void clearKnownHostsFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.redirect(getHost(), getKnownHosts()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionRedirectBody */ }} #endif /*!QPID_FRAMING_CONNECTIONREDIRECTBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterUpdateRequestBody.h0000664000076400007640000000601011752725676023446 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERUPDATEREQUESTBODY_H #define QPID_FRAMING_CLUSTERUPDATEREQUESTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterUpdateRequestBody : public ModelMethod { std::string url; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x1; ClusterUpdateRequestBody( ProtocolVersion, const std::string& _url) : url(_url), flags(0){ flags |= (1 << 8); } ClusterUpdateRequestBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setUrl(const std::string& _url); QPID_COMMON_EXTERN const std::string& getUrl() const; QPID_COMMON_EXTERN bool hasUrl() const; QPID_COMMON_EXTERN void clearUrlFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.updateRequest(getUrl()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterUpdateRequestBody */ }} #endif /*!QPID_FRAMING_CLUSTERUPDATEREQUESTBODY_H*/ qpidc-0.16/src/qpid/framing/SessionConfirmedBody.h0000664000076400007640000000662411752725676022576 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONCONFIRMEDBODY_H #define QPID_FRAMING_SESSIONCONFIRMEDBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionConfirmedBody : public AMQMethodBody { SequenceSet commands; Array fragments; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0x9; SessionConfirmedBody( ProtocolVersion, const SequenceSet& _commands, const Array& _fragments) : commands(_commands), fragments(_fragments), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } SessionConfirmedBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setCommands(const SequenceSet& _commands); QPID_COMMON_EXTERN const SequenceSet& getCommands() const; QPID_COMMON_EXTERN bool hasCommands() const; QPID_COMMON_EXTERN void clearCommandsFlag(); QPID_COMMON_EXTERN void setFragments(const Array& _fragments); QPID_COMMON_EXTERN const Array& getFragments() const; QPID_COMMON_EXTERN bool hasFragments() const; QPID_COMMON_EXTERN void clearFragmentsFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.confirmed(getCommands(), getFragments()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionConfirmedBody */ }} #endif /*!QPID_FRAMING_SESSIONCONFIRMEDBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionMembershipBody.h0000664000076400007640000000762311752725676025001 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONMEMBERSHIPBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONMEMBERSHIPBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionMembershipBody : public ModelMethod { FieldTable joiners; FieldTable members; SequenceNumber frameSeq; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x21; ClusterConnectionMembershipBody( ProtocolVersion, const FieldTable& _joiners, const FieldTable& _members, const SequenceNumber& _frameSeq) : joiners(_joiners), members(_members), frameSeq(_frameSeq), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } ClusterConnectionMembershipBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setJoiners(const FieldTable& _joiners); QPID_COMMON_EXTERN const FieldTable& getJoiners() const; QPID_COMMON_EXTERN FieldTable& getJoiners(); QPID_COMMON_EXTERN bool hasJoiners() const; QPID_COMMON_EXTERN void clearJoinersFlag(); QPID_COMMON_EXTERN void setMembers(const FieldTable& _members); QPID_COMMON_EXTERN const FieldTable& getMembers() const; QPID_COMMON_EXTERN FieldTable& getMembers(); QPID_COMMON_EXTERN bool hasMembers() const; QPID_COMMON_EXTERN void clearMembersFlag(); QPID_COMMON_EXTERN void setFrameSeq(const SequenceNumber& _frameSeq); QPID_COMMON_EXTERN SequenceNumber getFrameSeq() const; QPID_COMMON_EXTERN bool hasFrameSeq() const; QPID_COMMON_EXTERN void clearFrameSeqFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.membership(getJoiners(), getMembers(), getFrameSeq()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionMembershipBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONMEMBERSHIPBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionTxStartBody.cpp0000664000076400007640000000357611752725676024655 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionTxStartBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionTxStartBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); } void ClusterConnectionTxStartBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionTxStartBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); } void ClusterConnectionTxStartBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionTxStartBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; return total; } uint32_t ClusterConnectionTxStartBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionTxStartBody::print(std::ostream& out) const { out << "{ClusterConnectionTxStartBody: "; out << "}"; } qpidc-0.16/src/qpid/framing/MessageStopBody.cpp0000664000076400007640000000461411752725676022106 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/MessageStopBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void MessageStopBody::setDestination(const std::string& _destination) { destination = _destination; flags |= (1 << 8); } const std::string& MessageStopBody::getDestination() const { return destination; } bool MessageStopBody::hasDestination() const { return flags & (1 << 8); } void MessageStopBody::clearDestinationFlag() { flags &= ~(1 << 8); } void MessageStopBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(destination); } void MessageStopBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void MessageStopBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(destination); } void MessageStopBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t MessageStopBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + destination.size(); return total; } uint32_t MessageStopBody::encodedSize() const { uint32_t total = bodySize(); return total; } void MessageStopBody::print(std::ostream& out) const { out << "{MessageStopBody: "; if (flags & (1 << 8)) out << "destination=" << destination << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterUpdateOfferBody.h0000664000076400007640000000601311752725676023062 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERUPDATEOFFERBODY_H #define QPID_FRAMING_CLUSTERUPDATEOFFERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterUpdateOfferBody : public ModelMethod { uint64_t updatee; uint16_t flags; public: static const ClassId CLASS_ID = 0x80; static const MethodId METHOD_ID = 0x2; ClusterUpdateOfferBody( ProtocolVersion, uint64_t _updatee) : updatee(_updatee), flags(0){ flags |= (1 << 8); } ClusterUpdateOfferBody(ProtocolVersion=ProtocolVersion()) : updatee(0), flags(0) {} QPID_COMMON_EXTERN void setUpdatee(uint64_t _updatee); QPID_COMMON_EXTERN uint64_t getUpdatee() const; QPID_COMMON_EXTERN bool hasUpdatee() const; QPID_COMMON_EXTERN void clearUpdateeFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.updateOffer(getUpdatee()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterUpdateOfferBody */ }} #endif /*!QPID_FRAMING_CLUSTERUPDATEOFFERBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionAccumulatedAckBody.h0000664000076400007640000000621111752725676025544 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONACCUMULATEDACKBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONACCUMULATEDACKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionAccumulatedAckBody : public ModelMethod { SequenceSet commands; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x18; ClusterConnectionAccumulatedAckBody( ProtocolVersion, const SequenceSet& _commands) : commands(_commands), flags(0){ flags |= (1 << 8); } ClusterConnectionAccumulatedAckBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setCommands(const SequenceSet& _commands); QPID_COMMON_EXTERN const SequenceSet& getCommands() const; QPID_COMMON_EXTERN bool hasCommands() const; QPID_COMMON_EXTERN void clearCommandsFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.accumulatedAck(getCommands()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionAccumulatedAckBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONACCUMULATEDACKBODY_H*/ qpidc-0.16/src/qpid/framing/ConnectionSecureOkBody.cpp0000664000076400007640000000457311752725676023420 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionSecureOkBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionSecureOkBody::setResponse(const std::string& _response) { response = _response; flags |= (1 << 8); } const std::string& ConnectionSecureOkBody::getResponse() const { return response; } bool ConnectionSecureOkBody::hasResponse() const { return flags & (1 << 8); } void ConnectionSecureOkBody::clearResponseFlag() { flags &= ~(1 << 8); } void ConnectionSecureOkBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putLongString(response); } void ConnectionSecureOkBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionSecureOkBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getLongString(response); } void ConnectionSecureOkBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionSecureOkBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 4 + response.size(); return total; } uint32_t ConnectionSecureOkBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionSecureOkBody::print(std::ostream& out) const { out << "{ConnectionSecureOkBody: "; if (flags & (1 << 8)) out << "response=" << response << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/SessionCommandPointBody.h0000664000076400007640000000675411752725676023264 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_SESSIONCOMMANDPOINTBODY_H #define QPID_FRAMING_SESSIONCOMMANDPOINTBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN SessionCommandPointBody : public AMQMethodBody { SequenceNumber commandId; uint64_t commandOffset; uint16_t flags; public: static const ClassId CLASS_ID = 0x2; static const MethodId METHOD_ID = 0x7; SessionCommandPointBody( ProtocolVersion, const SequenceNumber& _commandId, uint64_t _commandOffset) : commandId(_commandId), commandOffset(_commandOffset), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } SessionCommandPointBody(ProtocolVersion=ProtocolVersion()) : commandOffset(0), flags(0) {} QPID_COMMON_EXTERN void setCommandId(const SequenceNumber& _commandId); QPID_COMMON_EXTERN SequenceNumber getCommandId() const; QPID_COMMON_EXTERN bool hasCommandId() const; QPID_COMMON_EXTERN void clearCommandIdFlag(); QPID_COMMON_EXTERN void setCommandOffset(uint64_t _commandOffset); QPID_COMMON_EXTERN uint64_t getCommandOffset() const; QPID_COMMON_EXTERN bool hasCommandOffset() const; QPID_COMMON_EXTERN void clearCommandOffsetFlag(); virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.commandPoint(getCommandId(), getCommandOffset()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class SessionCommandPointBody */ }} #endif /*!QPID_FRAMING_SESSIONCOMMANDPOINTBODY_H*/ qpidc-0.16/src/qpid/framing/FrameDecoder.cpp0000664000076400007640000000547211227113407021335 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/FrameDecoder.h" #include "qpid/framing/Buffer.h" #include "qpid/log/Statement.h" #include "qpid/framing/reply_exceptions.h" #include #include namespace qpid { namespace framing { namespace { /** Append up to n bytes from start of buf to end of bytes. */ void append(std::vector& bytes, Buffer& buffer, size_t n) { size_t oldSize = bytes.size(); if ((n = std::min(n, size_t(buffer.available()))) == 0) return; bytes.resize(oldSize+n); char* p = &bytes[oldSize]; buffer.getRawData(reinterpret_cast(p), n); } } bool FrameDecoder::decode(Buffer& buffer) { if (buffer.available() == 0) return false; if (fragment.empty()) { if (frame.decode(buffer)) // Decode from buffer return true; else // Store fragment append(fragment, buffer, buffer.available()); } else { // Already have a fragment // Get enough data to decode the frame size. if (fragment.size() < AMQFrame::DECODE_SIZE_MIN) { append(fragment, buffer, AMQFrame::DECODE_SIZE_MIN - fragment.size()); } if (fragment.size() >= AMQFrame::DECODE_SIZE_MIN) { uint16_t size = AMQFrame::decodeSize(&fragment[0]); if (size <= fragment.size()) throw FramingErrorException(QPID_MSG("Frame size " << size << " is too small.")); append(fragment, buffer, size-fragment.size()); Buffer b(&fragment[0], fragment.size()); if (frame.decode(b)) { assert(b.available() == 0); fragment.clear(); return true; } } } return false; } void FrameDecoder::setFragment(const char* data, size_t size) { fragment.resize(size); ::memcpy(&fragment[0], data, size); } std::pair FrameDecoder::getFragment() const { return std::pair(&fragment[0], fragment.size()); } }} // namespace qpid::framing qpidc-0.16/src/qpid/framing/ExecutionResultBody.cpp0000664000076400007640000000573411752725676023022 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ExecutionResultBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ExecutionResultBody::setCommandId(const SequenceNumber& _commandId) { commandId = _commandId; flags |= (1 << 8); } SequenceNumber ExecutionResultBody::getCommandId() const { return commandId; } bool ExecutionResultBody::hasCommandId() const { return flags & (1 << 8); } void ExecutionResultBody::clearCommandIdFlag() { flags &= ~(1 << 8); } void ExecutionResultBody::setValue(const std::string& _value) { value = _value; flags |= (1 << 9); } const std::string& ExecutionResultBody::getValue() const { return value; } bool ExecutionResultBody::hasValue() const { return flags & (1 << 9); } void ExecutionResultBody::clearValueFlag() { flags &= ~(1 << 9); } void ExecutionResultBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) commandId.encode(buffer); if (flags & (1 << 9)) buffer.putLongString(value); } void ExecutionResultBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ExecutionResultBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) commandId.decode(buffer); if (flags & (1 << 9)) buffer.getLongString(value); } void ExecutionResultBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ExecutionResultBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += commandId.encodedSize(); if (flags & (1 << 9)) total += 4 + value.size(); return total; } uint32_t ExecutionResultBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ExecutionResultBody::print(std::ostream& out) const { out << "{ExecutionResultBody: "; if (flags & (1 << 8)) out << "command-id=" << commandId << "; "; if (flags & (1 << 9)) out << "value=" << value << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/InitiationHandler.h0000664000076400007640000000215411227113407022061 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #ifndef _InitiationHandler_ #define _InitiationHandler_ #include "qpid/framing/ProtocolInitiation.h" namespace qpid { namespace framing { class InitiationHandler{ public: virtual ~InitiationHandler(); virtual void initiated(const ProtocolInitiation&) = 0; }; } } #endif qpidc-0.16/src/qpid/framing/FileOpenBody.h0000664000076400007640000000655311752725676021026 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILEOPENBODY_H #define QPID_FRAMING_FILEOPENBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileOpenBody : public ModelMethod { std::string identifier; uint64_t contentSize; uint16_t flags; public: static const ClassId CLASS_ID = 0x9; static const MethodId METHOD_ID = 0x6; FileOpenBody( ProtocolVersion, const std::string& _identifier, uint64_t _contentSize) : identifier(_identifier), contentSize(_contentSize), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } FileOpenBody(ProtocolVersion=ProtocolVersion()) : contentSize(0), flags(0) {} QPID_COMMON_EXTERN void setIdentifier(const std::string& _identifier); QPID_COMMON_EXTERN const std::string& getIdentifier() const; QPID_COMMON_EXTERN bool hasIdentifier() const; QPID_COMMON_EXTERN void clearIdentifierFlag(); QPID_COMMON_EXTERN void setContentSize(uint64_t _contentSize); QPID_COMMON_EXTERN uint64_t getContentSize() const; QPID_COMMON_EXTERN bool hasContentSize() const; QPID_COMMON_EXTERN void clearContentSizeFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.open(getIdentifier(), getContentSize()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return true; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileOpenBody */ }} #endif /*!QPID_FRAMING_FILEOPENBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionTxEnqueueBody.cpp0000664000076400007640000000500111752725676025150 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionTxEnqueueBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionTxEnqueueBody::setQueue(const std::string& _queue) { queue = _queue; flags |= (1 << 8); } const std::string& ClusterConnectionTxEnqueueBody::getQueue() const { return queue; } bool ClusterConnectionTxEnqueueBody::hasQueue() const { return flags & (1 << 8); } void ClusterConnectionTxEnqueueBody::clearQueueFlag() { flags &= ~(1 << 8); } void ClusterConnectionTxEnqueueBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(queue); } void ClusterConnectionTxEnqueueBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionTxEnqueueBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(queue); } void ClusterConnectionTxEnqueueBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionTxEnqueueBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + queue.size(); return total; } uint32_t ClusterConnectionTxEnqueueBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionTxEnqueueBody::print(std::ostream& out) const { out << "{ClusterConnectionTxEnqueueBody: "; if (flags & (1 << 8)) out << "queue=" << queue << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/FileOpenBody.cpp0000664000076400007640000000566111752725676021360 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileOpenBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileOpenBody::setIdentifier(const std::string& _identifier) { identifier = _identifier; flags |= (1 << 8); } const std::string& FileOpenBody::getIdentifier() const { return identifier; } bool FileOpenBody::hasIdentifier() const { return flags & (1 << 8); } void FileOpenBody::clearIdentifierFlag() { flags &= ~(1 << 8); } void FileOpenBody::setContentSize(uint64_t _contentSize) { contentSize = _contentSize; flags |= (1 << 9); } uint64_t FileOpenBody::getContentSize() const { return contentSize; } bool FileOpenBody::hasContentSize() const { return flags & (1 << 9); } void FileOpenBody::clearContentSizeFlag() { flags &= ~(1 << 9); } void FileOpenBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(identifier); if (flags & (1 << 9)) buffer.putLongLong(contentSize); } void FileOpenBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void FileOpenBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(identifier); if (flags & (1 << 9)) contentSize = buffer.getLongLong(); } void FileOpenBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t FileOpenBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += 1 + identifier.size(); if (flags & (1 << 9)) total += 8;//contentSize return total; } uint32_t FileOpenBody::encodedSize() const { uint32_t total = bodySize(); return total; } void FileOpenBody::print(std::ostream& out) const { out << "{FileOpenBody: "; if (flags & (1 << 8)) out << "identifier=" << identifier << "; "; if (flags & (1 << 9)) out << "content-size=" << contentSize << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ClusterConnectionShadowReadyBody.h0000664000076400007640000001165511752725676025120 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CLUSTERCONNECTIONSHADOWREADYBODY_H #define QPID_FRAMING_CLUSTERCONNECTIONSHADOWREADYBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ClusterConnectionShadowReadyBody : public ModelMethod { uint64_t memberId; uint64_t connectionId; std::string managementId; std::string userName; std::string fragment; uint32_t sendMax; uint16_t flags; public: static const ClassId CLASS_ID = 0x81; static const MethodId METHOD_ID = 0x20; ClusterConnectionShadowReadyBody( ProtocolVersion, uint64_t _memberId, uint64_t _connectionId, const std::string& _managementId, const std::string& _userName, const std::string& _fragment, uint32_t _sendMax) : memberId(_memberId), connectionId(_connectionId), managementId(_managementId), userName(_userName), fragment(_fragment), sendMax(_sendMax), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); } ClusterConnectionShadowReadyBody(ProtocolVersion=ProtocolVersion()) : memberId(0), connectionId(0), sendMax(0), flags(0) {} QPID_COMMON_EXTERN void setMemberId(uint64_t _memberId); QPID_COMMON_EXTERN uint64_t getMemberId() const; QPID_COMMON_EXTERN bool hasMemberId() const; QPID_COMMON_EXTERN void clearMemberIdFlag(); QPID_COMMON_EXTERN void setConnectionId(uint64_t _connectionId); QPID_COMMON_EXTERN uint64_t getConnectionId() const; QPID_COMMON_EXTERN bool hasConnectionId() const; QPID_COMMON_EXTERN void clearConnectionIdFlag(); QPID_COMMON_EXTERN void setManagementId(const std::string& _managementId); QPID_COMMON_EXTERN const std::string& getManagementId() const; QPID_COMMON_EXTERN bool hasManagementId() const; QPID_COMMON_EXTERN void clearManagementIdFlag(); QPID_COMMON_EXTERN void setUserName(const std::string& _userName); QPID_COMMON_EXTERN const std::string& getUserName() const; QPID_COMMON_EXTERN bool hasUserName() const; QPID_COMMON_EXTERN void clearUserNameFlag(); QPID_COMMON_EXTERN void setFragment(const std::string& _fragment); QPID_COMMON_EXTERN const std::string& getFragment() const; QPID_COMMON_EXTERN bool hasFragment() const; QPID_COMMON_EXTERN void clearFragmentFlag(); QPID_COMMON_EXTERN void setSendMax(uint32_t _sendMax); QPID_COMMON_EXTERN uint32_t getSendMax() const; QPID_COMMON_EXTERN bool hasSendMax() const; QPID_COMMON_EXTERN void clearSendMaxFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.shadowReady(getMemberId(), getConnectionId(), getManagementId(), getUserName(), getFragment(), getSendMax()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ClusterConnectionShadowReadyBody */ }} #endif /*!QPID_FRAMING_CLUSTERCONNECTIONSHADOWREADYBODY_H*/ qpidc-0.16/src/qpid/framing/AMQCommandControlBody.h0000664000076400007640000000454511072715510022557 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQCOMMANDCONTROLBODY_H #define QPID_FRAMING_AMQCOMMANDCONTROLBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/amqp_0_10/helpers.h" #include "qpid/framing/AMQBody.h" namespace qpid { namespace framing { /** * AMQBody wrapper for Command and Control. * Temporary measure to fit with old code. */ template class AMQCommandControlBody : public AMQBody, public T { public: virtual uint8_t type() const { return 100+T::SEGMENT_TYPE; } virtual void encode(Buffer& buffer) const { Codec::encode(buffer.getIterator(), static_cast(*this)); } virtual void decode(Buffer& buffer, uint32_t=0) { Codec::decode(buffer.getIterator(), static_cast(*this)); } virtual uint32_t encodedSize() const { Codec::size(buffer.getIterator(), static_cast(*this)); } virtual void print(std::ostream& out) const { out << static_cast(*this) << endl; } virtual void AMQBody::accept(AMQBodyConstVisitor&) const { assert(0); } }; class CommandBody : public AMQCommandControlBody { using Command::accept; // Hide AMQBody::accept virtual Command* getCommand() { return this; } virtual const Command* getCommand() const { return this; } }; class ControlBody : public AMQCommandControlBody { using Control::accept; // Hide AMQBody::accept virtual Control* getControl() { return this; } virtual const Control* getControl() const { return this; } }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_AMQCOMMANDCONTROLBODY_H*/ qpidc-0.16/src/qpid/framing/BodyFactory.h0000664000076400007640000000262211136153430020700 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_BODYFACTORY_H #define QPID_FRAMING_BODYFACTORY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace framing { /** * Indirect creation of body types to allow centralized changes to * memory management strategy. */ class BodyFactory { public: template static boost::intrusive_ptr create() { return new BodyType; } template static boost::intrusive_ptr copy(const BodyType& body) { return new BodyType(body); } }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_BODYFACTORY_H*/ qpidc-0.16/src/qpid/framing/FileProperties.cpp0000664000076400007640000001706111752725676021772 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/FileProperties.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void FileProperties::setContentType(const std::string& _contentType) { contentType = _contentType; flags |= (1 << 8); } const std::string& FileProperties::getContentType() const { return contentType; } bool FileProperties::hasContentType() const { return flags & (1 << 8); } void FileProperties::clearContentTypeFlag() { flags &= ~(1 << 8); } void FileProperties::setContentEncoding(const std::string& _contentEncoding) { contentEncoding = _contentEncoding; flags |= (1 << 9); } const std::string& FileProperties::getContentEncoding() const { return contentEncoding; } bool FileProperties::hasContentEncoding() const { return flags & (1 << 9); } void FileProperties::clearContentEncodingFlag() { flags &= ~(1 << 9); } void FileProperties::setHeaders(const FieldTable& _headers) { headers = _headers; flags |= (1 << 10); } const FieldTable& FileProperties::getHeaders() const { return headers; } FieldTable& FileProperties::getHeaders() { flags |= (1 << 10); return headers; } bool FileProperties::hasHeaders() const { return flags & (1 << 10); } void FileProperties::clearHeadersFlag() { flags &= ~(1 << 10); } void FileProperties::setPriority(uint8_t _priority) { priority = _priority; flags |= (1 << 11); } uint8_t FileProperties::getPriority() const { return priority; } bool FileProperties::hasPriority() const { return flags & (1 << 11); } void FileProperties::clearPriorityFlag() { flags &= ~(1 << 11); } void FileProperties::setReplyTo(const std::string& _replyTo) { replyTo = _replyTo; flags |= (1 << 12); } const std::string& FileProperties::getReplyTo() const { return replyTo; } bool FileProperties::hasReplyTo() const { return flags & (1 << 12); } void FileProperties::clearReplyToFlag() { flags &= ~(1 << 12); } void FileProperties::setMessageId(const std::string& _messageId) { messageId = _messageId; flags |= (1 << 13); } const std::string& FileProperties::getMessageId() const { return messageId; } bool FileProperties::hasMessageId() const { return flags & (1 << 13); } void FileProperties::clearMessageIdFlag() { flags &= ~(1 << 13); } void FileProperties::setFilename(const std::string& _filename) { filename = _filename; flags |= (1 << 14); } const std::string& FileProperties::getFilename() const { return filename; } bool FileProperties::hasFilename() const { return flags & (1 << 14); } void FileProperties::clearFilenameFlag() { flags &= ~(1 << 14); } void FileProperties::setTimestamp(uint64_t _timestamp) { timestamp = _timestamp; flags |= (1 << 15); } uint64_t FileProperties::getTimestamp() const { return timestamp; } bool FileProperties::hasTimestamp() const { return flags & (1 << 15); } void FileProperties::clearTimestampFlag() { flags &= ~(1 << 15); } void FileProperties::setClusterId(const std::string& _clusterId) { clusterId = _clusterId; flags |= (1 << 0); } const std::string& FileProperties::getClusterId() const { return clusterId; } bool FileProperties::hasClusterId() const { return flags & (1 << 0); } void FileProperties::clearClusterIdFlag() { flags &= ~(1 << 0); } void FileProperties::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(contentType); if (flags & (1 << 9)) buffer.putShortString(contentEncoding); if (flags & (1 << 10)) headers.encode(buffer); if (flags & (1 << 11)) buffer.putOctet(priority); if (flags & (1 << 12)) buffer.putShortString(replyTo); if (flags & (1 << 13)) buffer.putShortString(messageId); if (flags & (1 << 14)) buffer.putShortString(filename); if (flags & (1 << 15)) buffer.putLongLong(timestamp); if (flags & (1 << 0)) buffer.putShortString(clusterId); } void FileProperties::encode(Buffer& buffer) const { buffer.putLong(bodySize() + 2/*typecode*/); buffer.putShort(TYPE); encodeStructBody(buffer); } void FileProperties::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(contentType); if (flags & (1 << 9)) buffer.getShortString(contentEncoding); if (flags & (1 << 10)) headers.decode(buffer); if (flags & (1 << 11)) priority = buffer.getOctet(); if (flags & (1 << 12)) buffer.getShortString(replyTo); if (flags & (1 << 13)) buffer.getShortString(messageId); if (flags & (1 << 14)) buffer.getShortString(filename); if (flags & (1 << 15)) timestamp = buffer.getLongLong(); if (flags & (1 << 0)) buffer.getShortString(clusterId); } void FileProperties::decode(Buffer& buffer, uint32_t /*size*/) { buffer.getLong(); if (TYPE != buffer.getShort()) throw FramingErrorException("Bad type code for struct"); decodeStructBody(buffer); } uint32_t FileProperties::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 1 + contentType.size(); if (flags & (1 << 9)) total += 1 + contentEncoding.size(); if (flags & (1 << 10)) total += headers.encodedSize(); if (flags & (1 << 11)) total += 1;//priority if (flags & (1 << 12)) total += 1 + replyTo.size(); if (flags & (1 << 13)) total += 1 + messageId.size(); if (flags & (1 << 14)) total += 1 + filename.size(); if (flags & (1 << 15)) total += 8;//timestamp if (flags & (1 << 0)) total += 1 + clusterId.size(); return total; } uint32_t FileProperties::encodedSize() const { uint32_t total = bodySize(); total += 4/*size field*/; total += 2/*typecode*/; return total; } void FileProperties::print(std::ostream& out) const { out << "{FileProperties: "; if (flags & (1 << 8)) out << "content-type=" << contentType << "; "; if (flags & (1 << 9)) out << "content-encoding=" << contentEncoding << "; "; if (flags & (1 << 10)) out << "headers=" << headers << "; "; if (flags & (1 << 11)) out << "priority=" << (int) priority << "; "; if (flags & (1 << 12)) out << "reply-to=" << replyTo << "; "; if (flags & (1 << 13)) out << "message-id=" << messageId << "; "; if (flags & (1 << 14)) out << "filename=" << filename << "; "; if (flags & (1 << 15)) out << "timestamp=" << timestamp << "; "; if (flags & (1 << 0)) out << "cluster-id=" << clusterId << "; "; out << "}"; } namespace qpid{ namespace framing{ std::ostream& operator<<(std::ostream& out, const FileProperties& s) { s.print(out); return out; } } } qpidc-0.16/src/qpid/framing/ConnectionCloseOkBody.h0000664000076400007640000000520411752725676022674 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONCLOSEOKBODY_H #define QPID_FRAMING_CONNECTIONCLOSEOKBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionCloseOkBody : public AMQMethodBody { uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0xc; ConnectionCloseOkBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.closeOk(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionCloseOkBody */ }} #endif /*!QPID_FRAMING_CONNECTIONCLOSEOKBODY_H*/ qpidc-0.16/src/qpid/framing/ConnectionOpenBody.cpp0000664000076400007640000000640211752725676022572 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ConnectionOpenBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ConnectionOpenBody::setVirtualHost(const std::string& _virtualHost) { virtualHost = _virtualHost; flags |= (1 << 8); } const std::string& ConnectionOpenBody::getVirtualHost() const { return virtualHost; } bool ConnectionOpenBody::hasVirtualHost() const { return flags & (1 << 8); } void ConnectionOpenBody::clearVirtualHostFlag() { flags &= ~(1 << 8); } void ConnectionOpenBody::setCapabilities(const Array& _capabilities) { capabilities = _capabilities; flags |= (1 << 9); } const Array& ConnectionOpenBody::getCapabilities() const { return capabilities; } bool ConnectionOpenBody::hasCapabilities() const { return flags & (1 << 9); } void ConnectionOpenBody::clearCapabilitiesFlag() { flags &= ~(1 << 9); } void ConnectionOpenBody::setInsist(bool _insist) { if (_insist) flags |= (1 << 10); else flags &= ~(1 << 10); } bool ConnectionOpenBody::getInsist() const { return flags & (1 << 10); } void ConnectionOpenBody::encodeStructBody(Buffer& buffer) const { buffer.putShort(flags); if (flags & (1 << 8)) buffer.putShortString(virtualHost); if (flags & (1 << 9)) capabilities.encode(buffer); } void ConnectionOpenBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ConnectionOpenBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { flags = buffer.getShort(); if (flags & (1 << 8)) buffer.getShortString(virtualHost); if (flags & (1 << 9)) capabilities.decode(buffer); } void ConnectionOpenBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ConnectionOpenBody::bodySize() const { uint32_t total = 0; total += 2; if (flags & (1 << 8)) total += 1 + virtualHost.size(); if (flags & (1 << 9)) total += capabilities.encodedSize(); return total; } uint32_t ConnectionOpenBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ConnectionOpenBody::print(std::ostream& out) const { out << "{ConnectionOpenBody: "; if (flags & (1 << 8)) out << "virtual-host=" << virtualHost << "; "; if (flags & (1 << 9)) out << "capabilities=" << capabilities << "; "; if (flags & (1 << 10)) out << "insist=" << getInsist() << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/AMQBody.h0000664000076400007640000000514311564561152017721 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQBODY_H #define QPID_FRAMING_AMQBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/RefCounted.h" #include "qpid/framing/BodyFactory.h" #include #include #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class Buffer; class AMQMethodBody; class AMQHeaderBody; class AMQContentBody; class AMQHeartbeatBody; struct AMQBodyConstVisitor { virtual ~AMQBodyConstVisitor() {} virtual void visit(const AMQHeaderBody&) = 0; virtual void visit(const AMQContentBody&) = 0; virtual void visit(const AMQHeartbeatBody&) = 0; virtual void visit(const AMQMethodBody&) = 0; }; class QPID_COMMON_CLASS_EXTERN AMQBody : public RefCounted { public: AMQBody() {} QPID_COMMON_EXTERN virtual ~AMQBody(); // Make AMQBody copyable even though RefCounted. AMQBody(const AMQBody&) : RefCounted() {} AMQBody& operator=(const AMQBody&) { return *this; } virtual uint8_t type() const = 0; virtual void encode(Buffer& buffer) const = 0; virtual void decode(Buffer& buffer, uint32_t=0) = 0; virtual uint32_t encodedSize() const = 0; virtual void print(std::ostream& out) const = 0; virtual void accept(AMQBodyConstVisitor&) const = 0; virtual AMQMethodBody* getMethod() { return 0; } virtual const AMQMethodBody* getMethod() const { return 0; } /** Match if same type and same class/method ID for methods */ static bool match(const AMQBody& , const AMQBody& ); virtual boost::intrusive_ptr clone() const = 0; }; QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& out, const AMQBody& body) ; enum BodyTypes { METHOD_BODY = 1, HEADER_BODY = 2, CONTENT_BODY = 3, HEARTBEAT_BODY = 8 }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_AMQBODY_H*/ qpidc-0.16/src/qpid/framing/ClusterConnectionMembershipBody.cpp0000664000076400007640000001000111752725676025314 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ClusterConnectionMembershipBody.h" #include "qpid/framing/reply_exceptions.h" using namespace qpid::framing; void ClusterConnectionMembershipBody::setJoiners(const FieldTable& _joiners) { joiners = _joiners; flags |= (1 << 8); } const FieldTable& ClusterConnectionMembershipBody::getJoiners() const { return joiners; } FieldTable& ClusterConnectionMembershipBody::getJoiners() { flags |= (1 << 8); return joiners; } bool ClusterConnectionMembershipBody::hasJoiners() const { return flags & (1 << 8); } void ClusterConnectionMembershipBody::clearJoinersFlag() { flags &= ~(1 << 8); } void ClusterConnectionMembershipBody::setMembers(const FieldTable& _members) { members = _members; flags |= (1 << 9); } const FieldTable& ClusterConnectionMembershipBody::getMembers() const { return members; } FieldTable& ClusterConnectionMembershipBody::getMembers() { flags |= (1 << 9); return members; } bool ClusterConnectionMembershipBody::hasMembers() const { return flags & (1 << 9); } void ClusterConnectionMembershipBody::clearMembersFlag() { flags &= ~(1 << 9); } void ClusterConnectionMembershipBody::setFrameSeq(const SequenceNumber& _frameSeq) { frameSeq = _frameSeq; flags |= (1 << 10); } SequenceNumber ClusterConnectionMembershipBody::getFrameSeq() const { return frameSeq; } bool ClusterConnectionMembershipBody::hasFrameSeq() const { return flags & (1 << 10); } void ClusterConnectionMembershipBody::clearFrameSeqFlag() { flags &= ~(1 << 10); } void ClusterConnectionMembershipBody::encodeStructBody(Buffer& buffer) const { encodeHeader(buffer); buffer.putShort(flags); if (flags & (1 << 8)) joiners.encode(buffer); if (flags & (1 << 9)) members.encode(buffer); if (flags & (1 << 10)) frameSeq.encode(buffer); } void ClusterConnectionMembershipBody::encode(Buffer& buffer) const { encodeStructBody(buffer); } void ClusterConnectionMembershipBody::decodeStructBody(Buffer& buffer, uint32_t /*size*/) { decodeHeader(buffer); flags = buffer.getShort(); if (flags & (1 << 8)) joiners.decode(buffer); if (flags & (1 << 9)) members.decode(buffer); if (flags & (1 << 10)) frameSeq.decode(buffer); } void ClusterConnectionMembershipBody::decode(Buffer& buffer, uint32_t /*size*/) { decodeStructBody(buffer); } uint32_t ClusterConnectionMembershipBody::bodySize() const { uint32_t total = 0; total += headerSize(); total += 2; if (flags & (1 << 8)) total += joiners.encodedSize(); if (flags & (1 << 9)) total += members.encodedSize(); if (flags & (1 << 10)) total += frameSeq.encodedSize(); return total; } uint32_t ClusterConnectionMembershipBody::encodedSize() const { uint32_t total = bodySize(); return total; } void ClusterConnectionMembershipBody::print(std::ostream& out) const { out << "{ClusterConnectionMembershipBody: "; if (flags & (1 << 8)) out << "joiners=" << joiners << "; "; if (flags & (1 << 9)) out << "members=" << members << "; "; if (flags & (1 << 10)) out << "frame-seq=" << frameSeq << "; "; out << "}"; } qpidc-0.16/src/qpid/framing/ConnectionHeartbeatBody.h0000664000076400007640000000522211752725676023234 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONNECTIONHEARTBEATBODY_H #define QPID_FRAMING_CONNECTIONHEARTBEATBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ConnectionHeartbeatBody : public AMQMethodBody { uint16_t flags; public: static const ClassId CLASS_ID = 0x1; static const MethodId METHOD_ID = 0xa; ConnectionHeartbeatBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} virtual uint8_t type() const { return 0;/*control segment*/ } typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.heartbeat(); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ConnectionHeartbeatBody */ }} #endif /*!QPID_FRAMING_CONNECTIONHEARTBEATBODY_H*/ qpidc-0.16/src/qpid/framing/MessageFlushBody.h0000664000076400007640000000602711752725676021707 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGEFLUSHBODY_H #define QPID_FRAMING_MESSAGEFLUSHBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageFlushBody : public ModelMethod { std::string destination; uint16_t flags; public: static const ClassId CLASS_ID = 0x4; static const MethodId METHOD_ID = 0xb; MessageFlushBody( ProtocolVersion, const std::string& _destination) : destination(_destination), flags(0){ flags |= (1 << 8); } MessageFlushBody(ProtocolVersion=ProtocolVersion()) : flags(0) {} QPID_COMMON_EXTERN void setDestination(const std::string& _destination); QPID_COMMON_EXTERN const std::string& getDestination() const; QPID_COMMON_EXTERN bool hasDestination() const; QPID_COMMON_EXTERN void clearDestinationFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.flush(getDestination()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return false; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageFlushBody */ }} #endif /*!QPID_FRAMING_MESSAGEFLUSHBODY_H*/ qpidc-0.16/src/qpid/framing/Visitor.h0000664000076400007640000000575111004143243020113 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_VISITOR_H #define QPID_FRAMING_VISITOR_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include namespace qpid { namespace framing { /** @file Generic visitor pattern. */ /** visit() interface for type T (optional return type R, default is void.) * To create a visitor for a set of types T1, T2 ... do this: * struct MyVisitor : public Visit, public Visit ... {}; *@param T Type to visit. This must be forward declared, and need not be defined. */ template struct Visit { typedef R ReturnType; typedef T VisitType; virtual ~Visit() {} virtual R visit(T&) = 0; }; #define QPID_VISITOR_DECL(_1,_2,T) class T; #define QPID_VISITOR_BASE(_1,_2,T) , public ::qpid::framing::Visit /** Convenience macro to generate a visitor interface. * QPID_VISITOR(MyVisitor,(A)(B)(C)); is equivalent to: * @code * class A; class B; class C; * class MyVisitor : public Visit , public Visit , public Visit {}; * @endcode * @param visitor name of the generated visitor class. * @param bases a sequence of visitable types in the form (T1)(T2)... * Any parenthesized notations are due to quirks of the preprocesser. */ #define QPID_VISITOR(visitor,types) \ BOOST_PP_SEQ_FOR_EACH(QPID_VISITOR_DECL, _, types) \ class visitor : public ::qpid::framing::Visit \ BOOST_PP_SEQ_FOR_EACH(QPID_VISITOR_BASE, _, BOOST_PP_SEQ_TAIL(types)) \ {} /** The root class for the hierarchy of objects visitable by Visitor V. * Defines virtual accept(). */ template struct VisitableRoot { typedef V VisitorType; typedef R ReturnType; virtual ~VisitableRoot() {} virtual R accept(V& v) = 0; }; /** The base class for concrete visitable classes. * Implements accept(). * @param T type of visitable class (CRTP). * @param Base base class to inherit from. */ template struct Visitable : public Base { void accept(typename Base::VisitorType& v) { static_cast& >(v).visit(static_cast(*this)); } }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_VISITOR_H*/ qpidc-0.16/src/qpid/framing/StreamDeliverBody.h0000664000076400007640000001013511752725676022062 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_STREAMDELIVERBODY_H #define QPID_FRAMING_STREAMDELIVERBODY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/AMQP_ServerOperations.h" #include "qpid/framing/MethodBodyConstVisitor.h" #include "qpid/framing/ModelMethod.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StreamDeliverBody : public ModelMethod { std::string consumerTag; uint64_t deliveryTag; std::string exchange; std::string queue; uint16_t flags; public: static const ClassId CLASS_ID = 0xa; static const MethodId METHOD_ID = 0x8; StreamDeliverBody( ProtocolVersion, const std::string& _consumerTag, uint64_t _deliveryTag, const std::string& _exchange, const std::string& _queue) : consumerTag(_consumerTag), deliveryTag(_deliveryTag), exchange(_exchange), queue(_queue), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); } StreamDeliverBody(ProtocolVersion=ProtocolVersion()) : deliveryTag(0), flags(0) {} QPID_COMMON_EXTERN void setConsumerTag(const std::string& _consumerTag); QPID_COMMON_EXTERN const std::string& getConsumerTag() const; QPID_COMMON_EXTERN bool hasConsumerTag() const; QPID_COMMON_EXTERN void clearConsumerTagFlag(); QPID_COMMON_EXTERN void setDeliveryTag(uint64_t _deliveryTag); QPID_COMMON_EXTERN uint64_t getDeliveryTag() const; QPID_COMMON_EXTERN bool hasDeliveryTag() const; QPID_COMMON_EXTERN void clearDeliveryTagFlag(); QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); typedef void ResultType; template ResultType invoke(T& invocable) const { return invocable.deliver(getConsumerTag(), getDeliveryTag(), getExchange(), getQueue()); } using AMQMethodBody::accept; void accept(MethodBodyConstVisitor& v) const { v.visit(*this); } boost::intrusive_ptr clone() const { return BodyFactory::copy(*this); } ClassId amqpClassId() const { return CLASS_ID; } MethodId amqpMethodId() const { return METHOD_ID; } bool isContentBearing() const { return true; } bool resultExpected() const { return false; } bool responseExpected() const { return false; } QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class StreamDeliverBody */ }} #endif /*!QPID_FRAMING_STREAMDELIVERBODY_H*/ qpidc-0.16/src/qpid/types/0000775000076400007640000000000011752725716016041 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/types/Variant.cpp0000664000076400007640000007432611717465066020165 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/types/Variant.h" #include "qpid/log/Statement.h" #include #include #include #include #include #include namespace qpid { namespace types { namespace { const std::string EMPTY; const std::string PREFIX("invalid conversion: "); } InvalidConversion::InvalidConversion(const std::string& msg) : Exception(PREFIX + msg) {} class VariantImpl { public: VariantImpl(); VariantImpl(bool); VariantImpl(uint8_t); VariantImpl(uint16_t); VariantImpl(uint32_t); VariantImpl(uint64_t); VariantImpl(int8_t); VariantImpl(int16_t); VariantImpl(int32_t); VariantImpl(int64_t); VariantImpl(float); VariantImpl(double); VariantImpl(const std::string&, const std::string& encoding=std::string()); VariantImpl(const Variant::Map&); VariantImpl(const Variant::List&); VariantImpl(const Uuid&); ~VariantImpl(); VariantType getType() const; bool asBool() const; uint8_t asUint8() const; uint16_t asUint16() const; uint32_t asUint32() const; uint64_t asUint64() const; int8_t asInt8() const; int16_t asInt16() const; int32_t asInt32() const; int64_t asInt64() const; float asFloat() const; double asDouble() const; std::string asString() const; Uuid asUuid() const; const Variant::Map& asMap() const; Variant::Map& asMap(); const Variant::List& asList() const; Variant::List& asList(); const std::string& getString() const; std::string& getString(); void setEncoding(const std::string&); const std::string& getEncoding() const; bool isEqualTo(VariantImpl&) const; bool isEquivalentTo(VariantImpl&) const; static VariantImpl* create(const Variant&); private: const VariantType type; union { bool b; uint8_t ui8; uint16_t ui16; uint32_t ui32; uint64_t ui64; int8_t i8; int16_t i16; int32_t i32; int64_t i64; float f; double d; void* v;//variable width data } value; std::string encoding;//optional encoding for variable length data template T convertFromString() const { std::string* s = reinterpret_cast(value.v); if (std::numeric_limits::is_signed || s->find('-') != 0) { //lexical_cast won't fail if string is a negative number and T is unsigned try { return boost::lexical_cast(*s); } catch(const boost::bad_lexical_cast&) { //don't return, throw exception below } } else { //T is unsigned and number starts with '-' try { //handle special case of negative zero if (boost::lexical_cast(*s) == 0) return 0; //else its a non-zero negative number so throw exception at end of function } catch(const boost::bad_lexical_cast&) { //wasn't a valid int, therefore not a valid uint } } throw InvalidConversion(QPID_MSG("Cannot convert " << *s)); } }; VariantImpl::VariantImpl() : type(VAR_VOID) { value.i64 = 0; } VariantImpl::VariantImpl(bool b) : type(VAR_BOOL) { value.b = b; } VariantImpl::VariantImpl(uint8_t i) : type(VAR_UINT8) { value.ui8 = i; } VariantImpl::VariantImpl(uint16_t i) : type(VAR_UINT16) { value.ui16 = i; } VariantImpl::VariantImpl(uint32_t i) : type(VAR_UINT32) { value.ui32 = i; } VariantImpl::VariantImpl(uint64_t i) : type(VAR_UINT64) { value.ui64 = i; } VariantImpl::VariantImpl(int8_t i) : type(VAR_INT8) { value.i8 = i; } VariantImpl::VariantImpl(int16_t i) : type(VAR_INT16) { value.i16 = i; } VariantImpl::VariantImpl(int32_t i) : type(VAR_INT32) { value.i32 = i; } VariantImpl::VariantImpl(int64_t i) : type(VAR_INT64) { value.i64 = i; } VariantImpl::VariantImpl(float f) : type(VAR_FLOAT) { value.f = f; } VariantImpl::VariantImpl(double d) : type(VAR_DOUBLE) { value.d = d; } VariantImpl::VariantImpl(const std::string& s, const std::string& e) : type(VAR_STRING), encoding(e) { value.v = new std::string(s); } VariantImpl::VariantImpl(const Variant::Map& m) : type(VAR_MAP) { value.v = new Variant::Map(m); } VariantImpl::VariantImpl(const Variant::List& l) : type(VAR_LIST) { value.v = new Variant::List(l); } VariantImpl::VariantImpl(const Uuid& u) : type(VAR_UUID) { value.v = new Uuid(u); } VariantImpl::~VariantImpl() { switch (type) { case VAR_STRING: delete reinterpret_cast(value.v); break; case VAR_MAP: delete reinterpret_cast(value.v); break; case VAR_LIST: delete reinterpret_cast(value.v); break; case VAR_UUID: delete reinterpret_cast(value.v); break; default: break; } } VariantType VariantImpl::getType() const { return type; } namespace { bool same_char(char a, char b) { return toupper(a) == toupper(b); } bool caseInsensitiveMatch(const std::string& a, const std::string& b) { return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin(), &same_char); } const std::string TRUE("True"); const std::string FALSE("False"); bool toBool(const std::string& s) { if (caseInsensitiveMatch(s, TRUE)) return true; if (caseInsensitiveMatch(s, FALSE)) return false; try { return boost::lexical_cast(s); } catch(const boost::bad_lexical_cast&) {} throw InvalidConversion(QPID_MSG("Cannot convert " << s << " to bool")); } template std::string toString(const T& t) { std::stringstream out; out << t; return out.str(); } template bool equal(const T& a, const T& b) { return a.size() == b.size() && std::equal(a.begin(), a.end(), b.begin()); } } bool VariantImpl::asBool() const { switch(type) { case VAR_VOID: return false; case VAR_BOOL: return value.b; case VAR_UINT8: return value.ui8; case VAR_UINT16: return value.ui16; case VAR_UINT32: return value.ui32; case VAR_UINT64: return value.ui64; case VAR_INT8: return value.i8; case VAR_INT16: return value.i16; case VAR_INT32: return value.i32; case VAR_INT64: return value.i64; case VAR_STRING: return toBool(*reinterpret_cast(value.v)); default: throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_BOOL))); } } uint8_t VariantImpl::asUint8() const { switch(type) { case VAR_UINT8: return value.ui8; case VAR_UINT16: if (value.ui16 <= 0x00ff) return uint8_t(value.ui16); break; case VAR_UINT32: if (value.ui32 <= 0x000000ff) return uint8_t(value.ui32); break; case VAR_UINT64: if (value.ui64 <= 0x00000000000000ff) return uint8_t(value.ui64); break; case VAR_INT8: if (value.i8 >= 0) return uint8_t(value.i8); break; case VAR_INT16: if (value.i16 >= 0 && value.i16 <= 0x00ff) return uint8_t(value.i16); break; case VAR_INT32: if (value.i32 >= 0 && value.i32 <= 0x000000ff) return uint8_t(value.i32); break; case VAR_INT64: if (value.i64 >= 0 && value.i64 <= 0x00000000000000ff) return uint8_t(value.i64); break; case VAR_STRING: return convertFromString(); default: break; } throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_UINT8))); } uint16_t VariantImpl::asUint16() const { switch(type) { case VAR_UINT8: return value.ui8; case VAR_UINT16: return value.ui16; case VAR_UINT32: if (value.ui32 <= 0x0000ffff) return uint16_t(value.ui32); break; case VAR_UINT64: if (value.ui64 <= 0x000000000000ffff) return uint16_t(value.ui64); break; case VAR_INT8: if (value.i8 >= 0) return uint16_t(value.i8); break; case VAR_INT16: if (value.i16 >= 0) return uint16_t(value.i16); break; case VAR_INT32: if (value.i32 >= 0 && value.i32 <= 0x0000ffff) return uint16_t(value.i32); break; case VAR_INT64: if (value.i64 >= 0 && value.i64 <= 0x000000000000ffff) return uint16_t(value.i64); break; case VAR_STRING: return convertFromString(); default: break; } throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_UINT16))); } uint32_t VariantImpl::asUint32() const { switch(type) { case VAR_UINT8: return value.ui8; case VAR_UINT16: return value.ui16; case VAR_UINT32: return value.ui32; case VAR_UINT64: if (value.ui64 <= 0x00000000ffffffff) return uint32_t(value.ui64); break; case VAR_INT8: if (value.i8 >= 0) return uint32_t(value.i8); break; case VAR_INT16: if (value.i16 >= 0) return uint32_t(value.i16); break; case VAR_INT32: if (value.i32 >= 0) return uint32_t(value.i32); break; case VAR_INT64: if (value.i64 >= 0 && value.i64 <= 0x00000000ffffffff) return uint32_t(value.i64); break; case VAR_STRING: return convertFromString(); default: break; } throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_UINT32))); } uint64_t VariantImpl::asUint64() const { switch(type) { case VAR_UINT8: return value.ui8; case VAR_UINT16: return value.ui16; case VAR_UINT32: return value.ui32; case VAR_UINT64: return value.ui64; case VAR_INT8: if (value.i8 >= 0) return uint64_t(value.i8); break; case VAR_INT16: if (value.i16 >= 0) return uint64_t(value.i16); break; case VAR_INT32: if (value.i32 >= 0) return uint64_t(value.i32); break; case VAR_INT64: if (value.i64 >= 0) return uint64_t(value.i64); break; case VAR_STRING: return convertFromString(); default: break; } throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_UINT64))); } int8_t VariantImpl::asInt8() const { switch(type) { case VAR_INT8: return value.i8; case VAR_INT16: if ((value.i16 >= std::numeric_limits::min()) && (value.i16 <= std::numeric_limits::max())) return int8_t(value.i16); break; case VAR_INT32: if ((value.i32 >= std::numeric_limits::min()) && (value.i32 <= std::numeric_limits::max())) return int8_t(value.i32); break; case VAR_INT64: if ((value.i64 >= std::numeric_limits::min()) && (value.i64 <= std::numeric_limits::max())) return int8_t(value.i64); break; case VAR_UINT8: if (value.ui8 <= std::numeric_limits::max()) return int8_t(value.ui8); break; case VAR_UINT16: if (value.ui16 <= std::numeric_limits::max()) return int8_t(value.ui16); break; case VAR_UINT32: if (value.ui32 <= (uint32_t) std::numeric_limits::max()) return int8_t(value.ui32); break; case VAR_UINT64: if (value.ui64 <= (uint64_t) std::numeric_limits::max()) return int8_t(value.ui64); break; case VAR_STRING: return convertFromString(); default: break; } throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_INT8))); } int16_t VariantImpl::asInt16() const { switch(type) { case VAR_INT8: return value.i8; case VAR_INT16: return value.i16; case VAR_INT32: if ((value.i32 >= std::numeric_limits::min()) && (value.i32 <= std::numeric_limits::max())) return int16_t(value.i32); break; case VAR_INT64: if ((value.i64 >= std::numeric_limits::min()) && (value.i64 <= std::numeric_limits::max())) return int16_t(value.i64); break; case VAR_UINT8: return int16_t(value.ui8); case VAR_UINT16: if (value.ui16 <= std::numeric_limits::max()) return int16_t(value.ui16); break; case VAR_UINT32: if (value.ui32 <= (uint32_t) std::numeric_limits::max()) return int16_t(value.ui32); break; case VAR_UINT64: if (value.ui64 <= (uint64_t) std::numeric_limits::max()) return int16_t(value.ui64); break; case VAR_STRING: return convertFromString(); default: break; } throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_INT16))); } int32_t VariantImpl::asInt32() const { switch(type) { case VAR_INT8: return value.i8; case VAR_INT16: return value.i16; case VAR_INT32: return value.i32; case VAR_INT64: if ((value.i64 >= std::numeric_limits::min()) && (value.i64 <= std::numeric_limits::max())) return int32_t(value.i64); break; case VAR_UINT8: return int32_t(value.ui8); case VAR_UINT16: return int32_t(value.ui16); case VAR_UINT32: if (value.ui32 <= (uint32_t) std::numeric_limits::max()) return int32_t(value.ui32); break; case VAR_UINT64: if (value.ui64 <= (uint64_t) std::numeric_limits::max()) return int32_t(value.ui64); break; case VAR_STRING: return convertFromString(); default: break; } throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_INT32))); } int64_t VariantImpl::asInt64() const { switch(type) { case VAR_INT8: return value.i8; case VAR_INT16: return value.i16; case VAR_INT32: return value.i32; case VAR_INT64: return value.i64; case VAR_UINT8: return int64_t(value.ui8); case VAR_UINT16: return int64_t(value.ui16); case VAR_UINT32: return int64_t(value.ui32); case VAR_UINT64: if (value.ui64 <= (uint64_t) std::numeric_limits::max()) return int64_t(value.ui64); break; case VAR_STRING: return convertFromString(); default: break; } throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_INT64))); } float VariantImpl::asFloat() const { switch(type) { case VAR_FLOAT: return value.f; case VAR_STRING: return convertFromString(); default: throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_FLOAT))); } } double VariantImpl::asDouble() const { switch(type) { case VAR_FLOAT: return value.f; case VAR_DOUBLE: return value.d; case VAR_STRING: return convertFromString(); default: throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_DOUBLE))); } } std::string VariantImpl::asString() const { switch(type) { case VAR_VOID: return EMPTY; case VAR_BOOL: return value.b ? TRUE : FALSE; case VAR_UINT8: return boost::lexical_cast((int) value.ui8); case VAR_UINT16: return boost::lexical_cast(value.ui16); case VAR_UINT32: return boost::lexical_cast(value.ui32); case VAR_UINT64: return boost::lexical_cast(value.ui64); case VAR_INT8: return boost::lexical_cast((int) value.i8); case VAR_INT16: return boost::lexical_cast(value.i16); case VAR_INT32: return boost::lexical_cast(value.i32); case VAR_INT64: return boost::lexical_cast(value.i64); case VAR_DOUBLE: return boost::lexical_cast(value.d); case VAR_FLOAT: return boost::lexical_cast(value.f); case VAR_STRING: return *reinterpret_cast(value.v); case VAR_UUID: return reinterpret_cast(value.v)->str(); case VAR_LIST: return toString(asList()); case VAR_MAP: return toString(asMap()); default: throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_STRING))); } } Uuid VariantImpl::asUuid() const { switch(type) { case VAR_UUID: return *reinterpret_cast(value.v); default: throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_UUID))); } } bool VariantImpl::isEqualTo(VariantImpl& other) const { if (type == other.type) { switch(type) { case VAR_VOID: return true; case VAR_BOOL: return value.b == other.value.b; case VAR_UINT8: return value.ui8 == other.value.ui8; case VAR_UINT16: return value.ui16 == other.value.ui16; case VAR_UINT32: return value.ui32 == other.value.ui32; case VAR_UINT64: return value.ui64 == other.value.ui64; case VAR_INT8: return value.i8 == other.value.i8; case VAR_INT16: return value.i16 == other.value.i16; case VAR_INT32: return value.i32 == other.value.i32; case VAR_INT64: return value.i64 == other.value.i64; case VAR_DOUBLE: return value.d == other.value.d; case VAR_FLOAT: return value.f == other.value.f; case VAR_STRING: return *reinterpret_cast(value.v) == *reinterpret_cast(other.value.v); case VAR_UUID: return *reinterpret_cast(value.v) == *reinterpret_cast(other.value.v); case VAR_LIST: return equal(asList(), other.asList()); case VAR_MAP: return equal(asMap(), other.asMap()); } } return false; } const Variant::Map& VariantImpl::asMap() const { switch(type) { case VAR_MAP: return *reinterpret_cast(value.v); default: throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_MAP))); } } Variant::Map& VariantImpl::asMap() { switch(type) { case VAR_MAP: return *reinterpret_cast(value.v); default: throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_MAP))); } } const Variant::List& VariantImpl::asList() const { switch(type) { case VAR_LIST: return *reinterpret_cast(value.v); default: throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_LIST))); } } Variant::List& VariantImpl::asList() { switch(type) { case VAR_LIST: return *reinterpret_cast(value.v); default: throw InvalidConversion(QPID_MSG("Cannot convert from " << getTypeName(type) << " to " << getTypeName(VAR_LIST))); } } std::string& VariantImpl::getString() { switch(type) { case VAR_STRING: return *reinterpret_cast(value.v); default: throw InvalidConversion(QPID_MSG("Variant is not a string; use asString() if conversion is required.")); } } const std::string& VariantImpl::getString() const { switch(type) { case VAR_STRING: return *reinterpret_cast(value.v); default: throw InvalidConversion(QPID_MSG("Variant is not a string; use asString() if conversion is required.")); } } void VariantImpl::setEncoding(const std::string& s) { encoding = s; } const std::string& VariantImpl::getEncoding() const { return encoding; } std::string getTypeName(VariantType type) { switch (type) { case VAR_VOID: return "void"; case VAR_BOOL: return "bool"; case VAR_UINT8: return "uint8"; case VAR_UINT16: return "uint16"; case VAR_UINT32: return "uint32"; case VAR_UINT64: return "uint64"; case VAR_INT8: return "int8"; case VAR_INT16: return "int16"; case VAR_INT32: return "int32"; case VAR_INT64: return "int64"; case VAR_FLOAT: return "float"; case VAR_DOUBLE: return "double"; case VAR_STRING: return "string"; case VAR_MAP: return "map"; case VAR_LIST: return "list"; case VAR_UUID: return "uuid"; } return "";//should never happen } bool isIntegerType(VariantType type) { switch (type) { case VAR_BOOL: case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: return true; default: return false; } } VariantImpl* VariantImpl::create(const Variant& v) { switch (v.getType()) { case VAR_BOOL: return new VariantImpl(v.asBool()); case VAR_UINT8: return new VariantImpl(v.asUint8()); case VAR_UINT16: return new VariantImpl(v.asUint16()); case VAR_UINT32: return new VariantImpl(v.asUint32()); case VAR_UINT64: return new VariantImpl(v.asUint64()); case VAR_INT8: return new VariantImpl(v.asInt8()); case VAR_INT16: return new VariantImpl(v.asInt16()); case VAR_INT32: return new VariantImpl(v.asInt32()); case VAR_INT64: return new VariantImpl(v.asInt64()); case VAR_FLOAT: return new VariantImpl(v.asFloat()); case VAR_DOUBLE: return new VariantImpl(v.asDouble()); case VAR_STRING: return new VariantImpl(v.asString(), v.getEncoding()); case VAR_MAP: return new VariantImpl(v.asMap()); case VAR_LIST: return new VariantImpl(v.asList()); case VAR_UUID: return new VariantImpl(v.asUuid()); default: return new VariantImpl(); } } Variant::Variant() : impl(0) {} Variant::Variant(bool b) : impl(new VariantImpl(b)) {} Variant::Variant(uint8_t i) : impl(new VariantImpl(i)) {} Variant::Variant(uint16_t i) : impl(new VariantImpl(i)) {} Variant::Variant(uint32_t i) : impl(new VariantImpl(i)) {} Variant::Variant(uint64_t i) : impl(new VariantImpl(i)) {} Variant::Variant(int8_t i) : impl(new VariantImpl(i)) {} Variant::Variant(int16_t i) : impl(new VariantImpl(i)) {} Variant::Variant(int32_t i) : impl(new VariantImpl(i)) {} Variant::Variant(int64_t i) : impl(new VariantImpl(i)) {} Variant::Variant(float f) : impl(new VariantImpl(f)) {} Variant::Variant(double d) : impl(new VariantImpl(d)) {} Variant::Variant(const std::string& s) : impl(new VariantImpl(s)) {} Variant::Variant(const char* s) : impl(new VariantImpl(std::string(s))) {} Variant::Variant(const Map& m) : impl(new VariantImpl(m)) {} Variant::Variant(const List& l) : impl(new VariantImpl(l)) {} Variant::Variant(const Variant& v) : impl(VariantImpl::create(v)) {} Variant::Variant(const Uuid& u) : impl(new VariantImpl(u)) {} Variant::~Variant() { if (impl) delete impl; } void Variant::reset() { if (impl) delete impl; impl = 0; } Variant& Variant::operator=(bool b) { if (impl) delete impl; impl = new VariantImpl(b); return *this; } Variant& Variant::operator=(uint8_t i) { if (impl) delete impl; impl = new VariantImpl(i); return *this; } Variant& Variant::operator=(uint16_t i) { if (impl) delete impl; impl = new VariantImpl(i); return *this; } Variant& Variant::operator=(uint32_t i) { if (impl) delete impl; impl = new VariantImpl(i); return *this; } Variant& Variant::operator=(uint64_t i) { if (impl) delete impl; impl = new VariantImpl(i); return *this; } Variant& Variant::operator=(int8_t i) { if (impl) delete impl; impl = new VariantImpl(i); return *this; } Variant& Variant::operator=(int16_t i) { if (impl) delete impl; impl = new VariantImpl(i); return *this; } Variant& Variant::operator=(int32_t i) { if (impl) delete impl; impl = new VariantImpl(i); return *this; } Variant& Variant::operator=(int64_t i) { if (impl) delete impl; impl = new VariantImpl(i); return *this; } Variant& Variant::operator=(float f) { if (impl) delete impl; impl = new VariantImpl(f); return *this; } Variant& Variant::operator=(double d) { if (impl) delete impl; impl = new VariantImpl(d); return *this; } Variant& Variant::operator=(const std::string& s) { if (impl) delete impl; impl = new VariantImpl(s); return *this; } Variant& Variant::operator=(const char* s) { if (impl) delete impl; impl = new VariantImpl(std::string(s)); return *this; } Variant& Variant::operator=(const Uuid& u) { if (impl) delete impl; impl = new VariantImpl(u); return *this; } Variant& Variant::operator=(const Map& m) { if (impl) delete impl; impl = new VariantImpl(m); return *this; } Variant& Variant::operator=(const List& l) { if (impl) delete impl; impl = new VariantImpl(l); return *this; } Variant& Variant::operator=(const Variant& v) { if (impl) delete impl; impl = VariantImpl::create(v); return *this; } Variant& Variant::parse(const std::string& s) { operator=(s); try { return operator=(asInt64()); } catch (const InvalidConversion&) {} try { return operator=(asDouble()); } catch (const InvalidConversion&) {} try { return operator=(asBool()); } catch (const InvalidConversion&) {} return *this; } VariantType Variant::getType() const { return impl ? impl->getType() : VAR_VOID; } bool Variant::isVoid() const { return getType() == VAR_VOID; } bool Variant::asBool() const { return impl && impl->asBool(); } uint8_t Variant::asUint8() const { return impl ? impl->asUint8() : 0; } uint16_t Variant::asUint16() const { return impl ? impl->asUint16() : 0; } uint32_t Variant::asUint32() const { return impl ? impl->asUint32() : 0; } uint64_t Variant::asUint64() const { return impl ? impl->asUint64() : 0; } int8_t Variant::asInt8() const { return impl ? impl->asInt8() : 0; } int16_t Variant::asInt16() const { return impl ? impl->asInt16() : 0; } int32_t Variant::asInt32() const { return impl ? impl->asInt32(): 0; } int64_t Variant::asInt64() const { return impl ? impl->asInt64() : 0; } float Variant::asFloat() const { return impl ? impl->asFloat() : 0; } double Variant::asDouble() const { return impl ? impl->asDouble() : 0; } std::string Variant::asString() const { return impl ? impl->asString() : EMPTY; } Uuid Variant::asUuid() const { return impl ? impl->asUuid() : Uuid(); } const Variant::Map& Variant::asMap() const { if (!impl) throw InvalidConversion("Can't convert VOID to MAP"); return impl->asMap(); } Variant::Map& Variant::asMap() { if (!impl) throw InvalidConversion("Can't convert VOID to MAP"); return impl->asMap(); } const Variant::List& Variant::asList() const { if (!impl) throw InvalidConversion("Can't convert VOID to LIST"); return impl->asList(); } Variant::List& Variant::asList() { if (!impl) throw InvalidConversion("Can't convert VOID to LIST"); return impl->asList(); } const std::string& Variant::getString() const { if (!impl) throw InvalidConversion("Can't convert VOID to STRING"); return impl->getString(); } std::string& Variant::getString() { if (!impl) throw InvalidConversion("Can't convert VOID to STRING"); return impl->getString(); } void Variant::setEncoding(const std::string& s) { if (!impl) impl = new VariantImpl(); impl->setEncoding(s); } const std::string& Variant::getEncoding() const { return impl ? impl->getEncoding() : EMPTY; } Variant::operator bool() const { return asBool(); } Variant::operator uint8_t() const { return asUint8(); } Variant::operator uint16_t() const { return asUint16(); } Variant::operator uint32_t() const { return asUint32(); } Variant::operator uint64_t() const { return asUint64(); } Variant::operator int8_t() const { return asInt8(); } Variant::operator int16_t() const { return asInt16(); } Variant::operator int32_t() const { return asInt32(); } Variant::operator int64_t() const { return asInt64(); } Variant::operator float() const { return asFloat(); } Variant::operator double() const { return asDouble(); } Variant::operator std::string() const { return asString(); } Variant::operator Uuid() const { return asUuid(); } std::ostream& operator<<(std::ostream& out, const Variant::Map& map) { out << "{"; for (Variant::Map::const_iterator i = map.begin(); i != map.end(); ++i) { if (i != map.begin()) out << ", "; out << i->first << ":" << i->second; } out << "}"; return out; } std::ostream& operator<<(std::ostream& out, const Variant::List& list) { out << "["; for (Variant::List::const_iterator i = list.begin(); i != list.end(); ++i) { if (i != list.begin()) out << ", "; out << *i; } out << "]"; return out; } std::ostream& operator<<(std::ostream& out, const Variant& value) { switch (value.getType()) { case VAR_MAP: out << value.asMap(); break; case VAR_LIST: out << value.asList(); break; case VAR_VOID: out << ""; break; default: out << value.asString(); break; } return out; } bool operator==(const Variant& a, const Variant& b) { return a.isEqualTo(b); } bool Variant::isEqualTo(const Variant& other) const { return impl && impl->isEqualTo(*other.impl); } }} // namespace qpid::types qpidc-0.16/src/qpid/types/Exception.cpp0000664000076400007640000000210611357641377020503 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/types/Exception.h" namespace qpid { namespace types { Exception::Exception(const std::string& msg) throw() : message(msg) {} Exception::~Exception() throw() {} const char* Exception::what() const throw() { return message.c_str(); } }} // namespace qpid::types qpidc-0.16/src/qpid/types/Uuid.cpp0000664000076400007640000000712511647304276017455 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/types/Uuid.h" #include "qpid/sys/uuid.h" #include "qpid/sys/IntegerTypes.h" #include #include #include namespace qpid { namespace types { using namespace std; const size_t Uuid::SIZE=16; static const size_t UNPARSED_SIZE=36; Uuid::Uuid(bool unique) { if (unique) { generate(); } else { clear(); } } Uuid::Uuid(const Uuid& other) { ::memcpy(bytes, other.bytes, Uuid::SIZE); } Uuid::Uuid(const unsigned char* uuid) { ::memcpy(bytes, uuid, Uuid::SIZE); } Uuid& Uuid::operator=(const Uuid& other) { if (this == &other) return *this; ::memcpy(bytes, other.bytes, Uuid::SIZE); return *this; } void Uuid::generate() { uuid_generate(bytes); } void Uuid::clear() { uuid_clear(bytes); } // Force int 0/!0 to false/true; avoids compile warnings. bool Uuid::isNull() const { // This const cast is for Solaris which has non const arguments return !!uuid_is_null(const_cast(bytes)); } Uuid::operator bool() const { return !isNull(); } bool Uuid::operator!() const { return isNull(); } size_t Uuid::size() const { return SIZE; } const unsigned char* Uuid::data() const { return bytes; } bool operator==(const Uuid& a, const Uuid& b) { // This const cast is for Solaris which has non const arguments return uuid_compare(const_cast(a.bytes), const_cast(b.bytes)) == 0; } bool operator!=(const Uuid& a, const Uuid& b) { return !(a == b); } bool operator<(const Uuid& a, const Uuid& b) { // This const cast is for Solaris which has non const arguments return uuid_compare(const_cast(a.bytes), const_cast(b.bytes)) < 0; } bool operator>(const Uuid& a, const Uuid& b) { // This const cast is for Solaris which has non const arguments return uuid_compare(const_cast(a.bytes), const_cast(b.bytes)) > 0; } bool operator<=(const Uuid& a, const Uuid& b) { // This const cast is for Solaris which has non const arguments return uuid_compare(const_cast(a.bytes), const_cast(b.bytes)) <= 0; } bool operator>=(const Uuid& a, const Uuid& b) { // This const cast is for Solaris which has non const arguments return uuid_compare(const_cast(a.bytes), const_cast(b.bytes)) >= 0; } ostream& operator<<(ostream& out, Uuid uuid) { char unparsed[UNPARSED_SIZE + 1]; uuid_unparse(uuid.bytes, unparsed); return out << unparsed; } istream& operator>>(istream& in, Uuid& uuid) { char unparsed[UNPARSED_SIZE + 1] = {0}; in.get(unparsed, sizeof(unparsed)); if (uuid_parse(unparsed, uuid.bytes) != 0) in.setstate(ios::failbit); return in; } std::string Uuid::str() const { std::ostringstream os; os << *this; return os.str(); } }} // namespace qpid::types qpidc-0.16/src/qpid/SessionState.cpp0000664000076400007640000002727411426033270020022 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/SessionState.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/framing/AMQMethodBody.h" #include "qpid/framing/enum.h" #include "qpid/log/Statement.h" #include #include namespace qpid { using framing::AMQFrame; using framing::NotImplementedException; using framing::InvalidArgumentException; using framing::IllegalStateException; using framing::ResourceLimitExceededException; using framing::InternalErrorException; using framing::FramingErrorException; namespace { bool isControl(const AMQFrame& f) { return f.getMethod() && f.getMethod()->type() == framing::SEGMENT_TYPE_CONTROL; } bool isCommand(const AMQFrame& f) { return f.getMethod() && f.getMethod()->type() == framing::SEGMENT_TYPE_COMMAND; } } // namespace SessionPoint::SessionPoint(SequenceNumber c, uint64_t o) : command(c), offset(o) {} // TODO aconway 2008-05-22: Do complete frame sequence validity check here, // currently duplicated betwen broker and client session impl. // void SessionPoint::advance(const AMQFrame& f) { if (isControl(f)) return; // Ignore controls. if (f.isFirstSegment() && f.isFirstFrame()) { if (offset != 0) throw FramingErrorException(QPID_MSG("Unexpected command start frame.")); if (!isCommand(f)) throw FramingErrorException( QPID_MSG("Command start frame has invalid type" << f.getBody()->type())); if (f.isLastSegment() && f.isLastFrame()) ++command; // Single-frame command. else offset += f.encodedSize(); } else { // continuation frame for partial command if (offset == 0) throw FramingErrorException(QPID_MSG("Unexpected command continuation frame.")); if (f.isLastSegment() && f.isLastFrame()) { ++command; offset = 0; } else { // TODO aconway 2008-04-24: if we go to support for partial // command replay, then it may be better to record the unframed // data size in a command point rather than the framed size so // that the relationship of fragment offsets to the replay // list can be computed more easily. // offset += f.encodedSize(); } } } bool SessionPoint::operator<(const SessionPoint& x) const { return command < x.command || (command == x.command && offset < x.offset); } bool SessionPoint::operator==(const SessionPoint& x) const { return command == x.command && offset == x.offset; } SessionState::SendState::SendState() : unflushedSize(), replaySize(), bytesSinceKnownCompleted() {} SessionState::ReceiveState::ReceiveState() : bytesSinceKnownCompleted() {} uint32_t SessionState::getTimeout() const { return timeout; } void SessionState::setTimeout(uint32_t seconds) { timeout = seconds; } SessionPoint SessionState::senderGetCommandPoint() { return sender.sendPoint; } SequenceSet SessionState::senderGetIncomplete() const { return sender.incomplete; } SessionPoint SessionState::senderGetReplayPoint() const { return sender.replayPoint; } SessionState::ReplayRange SessionState::senderExpected(const SessionPoint& expect) { if (expect < sender.replayPoint || sender.sendPoint < expect) throw InvalidArgumentException(QPID_MSG(getId() << ": expected command-point out of range.")); QPID_LOG(debug, getId() << ": sender expected point moved to " << expect); ReplayList::iterator i = sender.replayList.begin(); SessionPoint p = sender.replayPoint; while (i != sender.replayList.end() && p.command < expect.command) p.advance(*i++); assert(p.command == expect.command); return boost::make_iterator_range(i, sender.replayList.end()); } void SessionState::senderRecord(const AMQFrame& f) { if (isControl(f)) return; // Ignore control frames. QPID_LOG(trace, getId() << ": sent cmd " << sender.sendPoint.command << ": " << *f.getBody()); stateful = true; if (timeout) sender.replayList.push_back(f); sender.unflushedSize += f.encodedSize(); sender.bytesSinceKnownCompleted += f.encodedSize(); sender.replaySize += f.encodedSize(); sender.incomplete += sender.sendPoint.command; sender.sendPoint.advance(f); if (config.replayHardLimit && config.replayHardLimit < sender.replaySize) throw ResourceLimitExceededException("Replay buffer exceeeded hard limit"); } static const uint32_t SPONTANEOUS_REQUEST_INTERVAL = 65536; bool SessionState::senderNeedFlush() const { return (sender.sendPoint.command % SPONTANEOUS_REQUEST_INTERVAL == 0) || (config.replayFlushLimit && sender.unflushedSize >= config.replayFlushLimit); } void SessionState::senderRecordFlush() { sender.flushPoint = sender.sendPoint; sender.unflushedSize = 0; } bool SessionState::senderNeedKnownCompleted() const { return config.replayFlushLimit && sender.bytesSinceKnownCompleted >= config.replayFlushLimit; } void SessionState::senderRecordKnownCompleted() { sender.bytesSinceKnownCompleted = 0; } void SessionState::senderConfirmed(const SessionPoint& confirmed) { if (confirmed > sender.sendPoint) throw InvalidArgumentException(QPID_MSG(getId() << ": confirmed < " << confirmed << " but only sent < " << sender.sendPoint)); QPID_LOG(debug, getId() << ": sender confirmed point moved to " << confirmed); ReplayList::iterator i = sender.replayList.begin(); while (i != sender.replayList.end() && sender.replayPoint.command < confirmed.command) { sender.replayPoint.advance(*i); assert(sender.replayPoint <= sender.sendPoint); sender.replaySize -= i->encodedSize(); if (sender.replayPoint > sender.flushPoint) sender.unflushedSize -= i->encodedSize(); ++i; } if (sender.replayPoint > sender.flushPoint) sender.flushPoint = sender.replayPoint; sender.replayList.erase(sender.replayList.begin(), i); assert(sender.replayPoint.offset == 0); } void SessionState::senderCompleted(const SequenceSet& commands) { if (commands.empty()) return; QPID_LOG(debug, getId() << ": sender marked completed: " << commands); sender.incomplete -= commands; // Completion implies confirmation but we don't handle out-of-order // confirmation, so confirm up to the end of the first contiguous range of commands. senderConfirmed(SessionPoint(commands.rangesBegin()->end())); } void SessionState::receiverSetCommandPoint(const SessionPoint& point) { if (hasState() && point > receiver.received) throw InvalidArgumentException(QPID_MSG(getId() << ": Command-point out of range.")); QPID_LOG(debug, getId() << ": receiver command-point set to: " << point); receiver.expected = point; if (receiver.expected > receiver.received) receiver.received = receiver.expected; } bool SessionState::receiverRecord(const AMQFrame& f) { if (receiverTrackingDisabled) return true; //Very nasty hack for push bridges if (isControl(f)) return true; // Ignore control frames. stateful = true; receiver.expected.advance(f); receiver.bytesSinceKnownCompleted += f.encodedSize(); bool firstTime = receiver.expected > receiver.received; if (firstTime) { receiver.received = receiver.expected; receiver.incomplete += receiverGetCurrent(); } QPID_LOG(trace, getId() << ": recv cmd " << receiverGetCurrent() << ": " << *f.getBody()); if (!firstTime) QPID_LOG(trace, "Ignoring duplicate frame."); return firstTime; } void SessionState::receiverCompleted(SequenceNumber command, bool cumulative) { if (receiverTrackingDisabled) return; //Very nasty hack for push bridges assert(receiver.incomplete.contains(command)); // Internal error to complete command twice. SequenceNumber first =cumulative ? receiver.incomplete.front() : command; SequenceNumber last = command; receiver.unknownCompleted.add(first, last); receiver.incomplete.remove(first, last); QPID_LOG(debug, getId() << ": receiver marked completed: " << command << " incomplete: " << receiver.incomplete << " unknown-completed: " << receiver.unknownCompleted); } void SessionState::receiverKnownCompleted(const SequenceSet& commands) { if (!commands.empty() && commands.back() > receiver.received.command) throw InvalidArgumentException(QPID_MSG(getId() << ": Known-completed has invalid commands.")); receiver.bytesSinceKnownCompleted=0; receiver.unknownCompleted -= commands; QPID_LOG(debug, getId() << ": receiver known completed: " << commands << " unknown: " << receiver.unknownCompleted); } bool SessionState::receiverNeedKnownCompleted() const { return (receiver.expected.command % SPONTANEOUS_REQUEST_INTERVAL == 0) || (config.replayFlushLimit && receiver.bytesSinceKnownCompleted >= config.replayFlushLimit); } const SessionPoint& SessionState::receiverGetExpected() const { return receiver.expected; } const SessionPoint& SessionState::receiverGetReceived() const { return receiver.received; } const SequenceSet& SessionState::receiverGetUnknownComplete() const { return receiver.unknownCompleted; } const SequenceSet& SessionState::receiverGetIncomplete() const { return receiver.incomplete; } SequenceNumber SessionState::receiverGetCurrent() const { SequenceNumber current = receiver.expected.command; if (receiver.expected.offset == 0) --current; return current; } SessionState::Configuration::Configuration(size_t flush, size_t hard) : replayFlushLimit(flush), replayHardLimit(hard) {} SessionState::SessionState(const SessionId& i, const Configuration& c) : id(i), timeout(0), config(c), stateful(false), receiverTrackingDisabled(false) { QPID_LOG(debug, "SessionState::SessionState " << id << ": " << this); } bool SessionState::hasState() const { return stateful; } SessionState::~SessionState() {} std::ostream& operator<<(std::ostream& o, const SessionPoint& p) { return o << "(" << p.command.getValue() << "+" << p.offset << ")"; } void SessionState::setState( const SequenceNumber& replayStart, const SequenceNumber& sendCommandPoint, const SequenceSet& sentIncomplete, const SequenceNumber& expected, const SequenceNumber& received, const SequenceSet& unknownCompleted, const SequenceSet& receivedIncomplete ) { sender.replayPoint = replayStart; sender.flushPoint = sendCommandPoint; sender.sendPoint = sendCommandPoint; sender.unflushedSize = 0; sender.replaySize = 0; // Replay list will be updated separately. sender.incomplete = sentIncomplete; sender.bytesSinceKnownCompleted = 0; receiver.expected = expected; receiver.received = received; receiver.unknownCompleted = unknownCompleted; receiver.incomplete = receivedIncomplete; receiver.bytesSinceKnownCompleted = 0; } void SessionState::disableReceiverTracking() { receiverTrackingDisabled = true; } void SessionState::enableReceiverTracking() { receiverTrackingDisabled = false; } } // namespace qpid qpidc-0.16/src/qpid/memory.h0000664000076400007640000000164410627321306016346 0ustar00jrossjross00000000000000#ifndef QPID_AUTO_PTR_H #define QPID_AUTO_PTR_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include namespace qpid { /** Convenient template for creating auto_ptr in-place in an argument list. */ template std::auto_ptr make_auto_ptr(T* ptr) { return std::auto_ptr(ptr); } } // namespace qpid #endif /*!QPID_AUTO_PTR_H*/ qpidc-0.16/src/qpid/UrlArray.cpp0000664000076400007640000000265111667435470017146 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "UrlArray.h" namespace qpid { std::vector urlArrayToVector(const framing::Array& array) { std::vector urls; for (framing::Array::ValueVector::const_iterator i = array.begin(); i != array.end(); ++i ) urls.push_back(Url((*i)->get())); return urls; } framing::Array vectorToUrlArray(const std::vector& urls) { framing::Array array(0x95); for (std::vector::const_iterator i = urls.begin(); i != urls.end(); ++i) array.add(boost::shared_ptr(new framing::Str16Value(i->str()))); return array; } } // namespace qpid qpidc-0.16/src/qpid/replication/0000775000076400007640000000000011752725716017206 5ustar00jrossjross00000000000000qpidc-0.16/src/qpid/replication/constants.h0000664000076400007640000000241511234401332021351 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qpid { namespace replication { namespace constants { const std::string REPLICATION_EVENT_TYPE("qpid.replication.type"); const std::string REPLICATION_EVENT_SEQNO("qpid.replication.seqno"); const std::string REPLICATION_TARGET_QUEUE("qpid.replication.target_queue"); const std::string DEQUEUED_MESSAGE_POSITION("qpid.replication.message"); const std::string QUEUE_MESSAGE_POSITION("qpid.replication.queue.position"); const int ENQUEUE(1); const int DEQUEUE(2); }}} qpidc-0.16/src/qpid/replication/ReplicationExchange.cpp0000664000076400007640000002135111725210040023603 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/replication/ReplicationExchange.h" #include "qpid/replication/constants.h" #include "qpid/Plugin.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Queue.h" #include "qpid/broker/QueueRegistry.h" #include "qpid/broker/ExchangeRegistry.h" #include "qpid/framing/reply_exceptions.h" #include "qpid/log/Statement.h" #include namespace qpid { namespace replication { using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::replication::constants; const std::string SEQUENCE_VALUE("qpid.replication-event.sequence"); ReplicationExchange::ReplicationExchange(const std::string& name, bool durable, const FieldTable& _args, QueueRegistry& qr, Manageable* parent, Broker* broker) : Exchange(name, durable, _args, parent, broker), queues(qr), sequence(args.getAsInt64(SEQUENCE_VALUE)), init(false) { args.setInt64(SEQUENCE_VALUE, sequence); if (mgmtExchange != 0) mgmtExchange->set_type(typeName); } std::string ReplicationExchange::getType() const { return typeName; } void ReplicationExchange::route(Deliverable& msg) { const FieldTable* args = msg.getMessage().getApplicationHeaders(); if (mgmtExchange != 0) { mgmtExchange->inc_msgReceives(); mgmtExchange->inc_byteReceives(msg.contentSize()); } if (args) { int eventType = args->getAsInt(REPLICATION_EVENT_TYPE); if (eventType) { if (isDuplicate(args)) return; switch (eventType) { case ENQUEUE: handleEnqueueEvent(args, msg); return; case DEQUEUE: handleDequeueEvent(args, msg); return; default: throw IllegalArgumentException(QPID_MSG("Illegal value for " << REPLICATION_EVENT_TYPE << ": " << eventType)); } } } else { QPID_LOG(warning, "Dropping unexpected message with no headers"); if (mgmtExchange != 0) { mgmtExchange->inc_msgDrops(); mgmtExchange->inc_byteDrops(msg.contentSize()); } } } void ReplicationExchange::handleEnqueueEvent(const FieldTable* args, Deliverable& msg) { std::string queueName = args->getAsString(REPLICATION_TARGET_QUEUE); Queue::shared_ptr queue = queues.find(queueName); if (queue) { SequenceNumber seqno1(args->getAsInt(QUEUE_MESSAGE_POSITION)); // note that queue will ++ before enqueue. if (queue->getPosition() > --seqno1) // test queue.pos < seqnumber { QPID_LOG(error, "Cannot enqueue replicated message. Destination Queue " << queueName << " ahead of source queue"); mgmtExchange->inc_msgDrops(); mgmtExchange->inc_byteDrops(msg.contentSize()); } else { queue->setPosition(seqno1); msg.getMessage().removeCustomProperty(REPLICATION_TARGET_QUEUE); msg.getMessage().removeCustomProperty(REPLICATION_EVENT_SEQNO); msg.getMessage().removeCustomProperty(REPLICATION_EVENT_TYPE); msg.getMessage().removeCustomProperty(QUEUE_MESSAGE_POSITION); msg.deliverTo(queue); QPID_LOG(debug, "Enqueued replicated message onto " << queueName); if (mgmtExchange != 0) { mgmtExchange->inc_msgRoutes(); mgmtExchange->inc_byteRoutes( msg.contentSize()); } } } else { QPID_LOG(error, "Cannot enqueue replicated message. Queue " << queueName << " does not exist"); if (mgmtExchange != 0) { mgmtExchange->inc_msgDrops(); mgmtExchange->inc_byteDrops(msg.contentSize()); } } } void ReplicationExchange::handleDequeueEvent(const FieldTable* args, Deliverable& msg) { std::string queueName = args->getAsString(REPLICATION_TARGET_QUEUE); Queue::shared_ptr queue = queues.find(queueName); if (queue) { SequenceNumber position(args->getAsInt(DEQUEUED_MESSAGE_POSITION)); QueuedMessage dequeued; if (queue->acquireMessageAt(position, dequeued)) { queue->dequeue(0, dequeued); QPID_LOG(debug, "Processed replicated 'dequeue' event from " << queueName << " at position " << position); if (mgmtExchange != 0) { mgmtExchange->inc_msgRoutes(); mgmtExchange->inc_byteRoutes(msg.contentSize()); } } else { QPID_LOG(warning, "Could not acquire message " << position << " from " << queueName); if (mgmtExchange != 0) { mgmtExchange->inc_msgDrops(); mgmtExchange->inc_byteDrops(msg.contentSize()); } } } else { QPID_LOG(error, "Cannot process replicated 'dequeue' event. Queue " << queueName << " does not exist"); if (mgmtExchange != 0) { mgmtExchange->inc_msgDrops(); mgmtExchange->inc_byteDrops(msg.contentSize()); } } } bool ReplicationExchange::isDuplicate(const FieldTable* args) { if (!args->get(REPLICATION_EVENT_SEQNO)) return false; SequenceNumber seqno(args->getAsInt(REPLICATION_EVENT_SEQNO)); if (!init) { init = true; sequence = seqno; return false; } else if (seqno > sequence) { if (seqno - sequence > 1) { QPID_LOG(error, "Gap in replication event sequence between: " << sequence << " and " << seqno); } sequence = seqno; return false; } else { QPID_LOG(info, "Duplicate detected: seqno=" << seqno << " (last seqno=" << sequence << ")"); return true; } } bool ReplicationExchange::bind(Queue::shared_ptr /*queue*/, const std::string& /*routingKey*/, const FieldTable* /*args*/) { throw NotImplementedException("Replication exchange does not support bind operation"); } bool ReplicationExchange::unbind(Queue::shared_ptr /*queue*/, const std::string& /*routingKey*/, const FieldTable* /*args*/) { throw NotImplementedException("Replication exchange does not support unbind operation"); } bool ReplicationExchange::isBound(Queue::shared_ptr /*queue*/, const string* const /*routingKey*/, const FieldTable* const /*args*/) { return false; } const std::string ReplicationExchange::typeName("replication"); void ReplicationExchange::encode(Buffer& buffer) const { args.setInt64(std::string(SEQUENCE_VALUE), sequence); Exchange::encode(buffer); } struct ReplicationExchangePlugin : Plugin { Broker* broker; ReplicationExchangePlugin(); void earlyInitialize(Plugin::Target& target); void initialize(Plugin::Target& target); Exchange::shared_ptr create(const std::string& name, bool durable, const framing::FieldTable& args, management::Manageable* parent, qpid::broker::Broker* broker); }; ReplicationExchangePlugin::ReplicationExchangePlugin() : broker(0) {} Exchange::shared_ptr ReplicationExchangePlugin::create(const std::string& name, bool durable, const framing::FieldTable& args, management::Manageable* parent, qpid::broker::Broker* broker) { Exchange::shared_ptr e(new ReplicationExchange(name, durable, args, broker->getQueues(), parent, broker)); return e; } void ReplicationExchangePlugin::earlyInitialize(Plugin::Target& target) { broker = dynamic_cast(&target); if (broker) { ExchangeRegistry::FactoryFunction f = boost::bind(&ReplicationExchangePlugin::create, this, _1, _2, _3, _4, _5); broker->getExchanges().registerType(ReplicationExchange::typeName, f); QPID_LOG(info, "Registered replication exchange"); } } void ReplicationExchangePlugin::initialize(Target&) {} static ReplicationExchangePlugin exchangePlugin; }} // namespace qpid::replication qpidc-0.16/src/qpid/replication/ReplicatingEventListener.h0000664000076400007640000000520411155567123024322 0ustar00jrossjross00000000000000#ifndef QPID_REPLICATION_REPLICATINGEVENTLISTENER_H #define QPID_REPLICATION_REPLICATINGEVENTLISTENER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Plugin.h" #include "qpid/Options.h" #include "qpid/broker/Exchange.h" #include "qpid/broker/Message.h" #include "qpid/broker/Queue.h" #include "qpid/broker/QueueEvents.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/SequenceNumber.h" namespace qpid { namespace replication { /** * An event listener plugin that records queue events as messages on a * replication queue, from where they can be consumed (e.g. by an * inter-broker link to the corresponding QueueReplicationExchange * plugin. */ class ReplicatingEventListener : public Plugin { public: Options* getOptions(); void earlyInitialize(Plugin::Target& target); void initialize(Plugin::Target& target); void handle(qpid::broker::QueueEvents::Event); private: struct PluginOptions : public Options { std::string queue; std::string exchange; std::string exchangeType; std::string name; bool createQueue; PluginOptions(); }; PluginOptions options; qpid::broker::Queue::shared_ptr queue; qpid::broker::Exchange::shared_ptr exchange; void deliverDequeueMessage(const qpid::broker::QueuedMessage& enqueued); void deliverEnqueueMessage(const qpid::broker::QueuedMessage& enqueued); void route(boost::intrusive_ptr); void shutdown(); boost::intrusive_ptr createMessage(const qpid::framing::FieldTable& headers); boost::intrusive_ptr cloneMessage(qpid::broker::Queue& queue, boost::intrusive_ptr original); }; }} // namespace qpid::replication #endif /*!QPID_REPLICATION_REPLICATINGEVENTLISTENER_H*/ qpidc-0.16/src/qpid/replication/ReplicationExchange.h0000664000076400007640000000526711725210040023260 0ustar00jrossjross00000000000000#ifndef QPID_REPLICATION_REPLICATIONEXCHANGE_H #define QPID_REPLICATION_REPLICATIONEXCHANGE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/broker/Exchange.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/SequenceNumber.h" namespace qpid { namespace broker { class QueueRegistry; } namespace replication { /** * A custom exchange plugin that processes incoming messages * representing enqueue or dequeue events for particular queues and * carries out the corresponding action to replicate that on the local * broker. */ class ReplicationExchange : public qpid::broker::Exchange { public: static const std::string typeName; ReplicationExchange(const std::string& name, bool durable, const qpid::framing::FieldTable& args, qpid::broker::QueueRegistry& queues, qpid::management::Manageable* parent = 0, qpid::broker::Broker* broker = 0); std::string getType() const; void route(qpid::broker::Deliverable& msg); bool bind(boost::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); bool unbind(boost::shared_ptr queue, const std::string& routingKey, const qpid::framing::FieldTable* args); bool isBound(boost::shared_ptr queue, const std::string* const routingKey, const qpid::framing::FieldTable* const args); private: qpid::broker::QueueRegistry& queues; qpid::framing::SequenceNumber sequence; bool init; bool isDuplicate(const qpid::framing::FieldTable* args); void handleEnqueueEvent(const qpid::framing::FieldTable* args, qpid::broker::Deliverable& msg); void handleDequeueEvent(const qpid::framing::FieldTable* args, qpid::broker::Deliverable& msg); void encode(framing::Buffer& buffer) const; }; }} // namespace qpid::replication #endif /*!QPID_REPLICATION_REPLICATIONEXCHANGE_H*/ qpidc-0.16/src/qpid/replication/ReplicatingEventListener.cpp0000664000076400007640000001734011725210040024643 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/replication/ReplicatingEventListener.h" #include "qpid/replication/constants.h" #include "qpid/broker/Broker.h" #include "qpid/broker/DeliverableMessage.h" #include "qpid/broker/QueueEvents.h" #include "qpid/framing/AMQFrame.h" #include "qpid/framing/FrameHandler.h" #include "qpid/framing/MessageTransferBody.h" #include "qpid/log/Statement.h" namespace qpid { namespace replication { using namespace qpid::broker; using namespace qpid::framing; using namespace qpid::replication::constants; void ReplicatingEventListener::handle(QueueEvents::Event event) { switch (event.type) { case QueueEvents::ENQUEUE: deliverEnqueueMessage(event.msg); QPID_LOG(debug, "Queuing 'enqueue' event on " << event.msg.queue->getName() << " for replication"); break; case QueueEvents::DEQUEUE: deliverDequeueMessage(event.msg); QPID_LOG(debug, "Queuing 'dequeue' event from " << event.msg.queue->getName() << " for replication, (from position " << event.msg.position << ")"); break; } } namespace { const std::string EMPTY; } void ReplicatingEventListener::deliverDequeueMessage(const QueuedMessage& dequeued) { FieldTable headers; headers.setString(REPLICATION_TARGET_QUEUE, dequeued.queue->getName()); headers.setInt(REPLICATION_EVENT_TYPE, DEQUEUE); headers.setInt(DEQUEUED_MESSAGE_POSITION, dequeued.position); boost::intrusive_ptr msg(createMessage(headers)); DeliveryProperties* props = msg->getFrames().getHeaders()->get(true); props->setRoutingKey(dequeued.queue->getName()); route(msg); } void ReplicatingEventListener::deliverEnqueueMessage(const QueuedMessage& enqueued) { boost::intrusive_ptr msg(cloneMessage(*(enqueued.queue), enqueued.payload)); msg->insertCustomProperty(REPLICATION_TARGET_QUEUE, enqueued.queue->getName()); msg->insertCustomProperty(REPLICATION_EVENT_TYPE, ENQUEUE); msg->insertCustomProperty(QUEUE_MESSAGE_POSITION,enqueued.position); route(msg); } void ReplicatingEventListener::route(boost::intrusive_ptr msg) { try { if (exchange) { DeliverableMessage deliverable(msg); exchange->route(deliverable); } else if (queue) { queue->deliver(msg); } else { QPID_LOG(error, "Cannot route replication event, neither replication queue nor exchange configured"); } } catch (const std::exception& e) { QPID_LOG(error, "Error enqueing replication event: " << e.what()); } } boost::intrusive_ptr ReplicatingEventListener::createMessage(const FieldTable& headers) { boost::intrusive_ptr msg(new Message()); AMQFrame method((MessageTransferBody(ProtocolVersion(), EMPTY, 0, 0))); AMQFrame header((AMQHeaderBody())); header.setBof(false); header.setEof(true); header.setBos(true); header.setEos(true); msg->getFrames().append(method); msg->getFrames().append(header); MessageProperties* props = msg->getFrames().getHeaders()->get(true); props->setApplicationHeaders(headers); return msg; } struct AppendingHandler : FrameHandler { boost::intrusive_ptr msg; AppendingHandler(boost::intrusive_ptr m) : msg(m) {} void handle(AMQFrame& f) { msg->getFrames().append(f); } }; boost::intrusive_ptr ReplicatingEventListener::cloneMessage(Queue& queue, boost::intrusive_ptr original) { boost::intrusive_ptr copy(new Message()); AMQFrame method((MessageTransferBody(ProtocolVersion(), EMPTY, 0, 0))); AppendingHandler handler(copy); handler.handle(method); //To avoid modifying original headers, create new frame with //cloned body: AMQFrame header(*original->getFrames().getHeaders()); header.setBof(false); header.setEof(!original->getFrames().getContentSize());//if there is any content then the header is not the end of the frameset header.setBos(true); header.setEos(true); handler.handle(header); original->sendContent(queue, handler, std::numeric_limits::max()); return copy; } Options* ReplicatingEventListener::getOptions() { return &options; } void ReplicatingEventListener::initialize(Plugin::Target& target) { Broker* broker = dynamic_cast(&target); if (broker) { broker->addFinalizer(boost::bind(&ReplicatingEventListener::shutdown, this)); if (!options.exchange.empty()) { if (!options.queue.empty()) { QPID_LOG(warning, "Replication queue option ignored as replication exchange has been specified"); } try { exchange = broker->getExchanges().declare(options.exchange, options.exchangeType).first; } catch (const UnknownExchangeTypeException&) { QPID_LOG(error, "Replication disabled due to invalid type: " << options.exchangeType); } } else if (!options.queue.empty()) { if (options.createQueue) { queue = broker->getQueues().declare(options.queue).first; } else { queue = broker->getQueues().find(options.queue); } if (queue) { queue->insertSequenceNumbers(REPLICATION_EVENT_SEQNO); } else { QPID_LOG(error, "Replication queue named '" << options.queue << "' does not exist; replication plugin disabled."); } } if (queue || exchange) { QueueEvents::EventListener callback = boost::bind(&ReplicatingEventListener::handle, this, _1); broker->getQueueEvents().registerListener(options.name, callback); QPID_LOG(info, "Registered replicating queue event listener"); } } } void ReplicatingEventListener::earlyInitialize(Target&) {} void ReplicatingEventListener::shutdown() { queue.reset(); exchange.reset(); } ReplicatingEventListener::PluginOptions::PluginOptions() : Options("Queue Replication Options"), exchangeType("direct"), name("replicator"), createQueue(false) { addOptions() ("replication-exchange-name", optValue(exchange, "EXCHANGE"), "Exchange to which events for other queues are routed") ("replication-exchange-type", optValue(exchangeType, "direct|topic etc"), "Type of exchange to use") ("replication-queue", optValue(queue, "QUEUE"), "Queue on which events for other queues are recorded") ("replication-listener-name", optValue(name, "NAME"), "name by which to register the replicating event listener") ("create-replication-queue", optValue(createQueue), "if set, the replication will be created if it does not exist"); } static ReplicatingEventListener plugin; }} // namespace qpid::replication qpidc-0.16/src/qpid/Plugin.h0000664000076400007640000000776211305036545016305 0ustar00jrossjross00000000000000#ifndef QPID_PLUGIN_H #define QPID_PLUGIN_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include "qpid/CommonImportExport.h" /**@file Generic plug-in framework. */ namespace qpid { struct Options; /** * Plug-in base class. */ class Plugin : private boost::noncopyable { public: typedef std::vector Plugins; /** Default value returned by initOrder() */ static const int DEFAULT_INIT_ORDER=1000; /** * Base interface for targets that can receive plug-ins. * Also allows plug-ins to attach a a function to be called * when the target is 'finalized'. */ class Target : private boost::noncopyable { public: /** Calls finalize() if not already called. */ QPID_COMMON_EXTERN virtual ~Target(); /** Run all the finalizers */ QPID_COMMON_EXTERN void finalize(); /** Add a function to run when finalize() is called */ QPID_COMMON_EXTERN void addFinalizer(const boost::function&); private: std::vector > finalizers; }; /** * Constructor registers the plug-in to appear in getPlugins(). * * A concrete Plugin is instantiated as a global or static * member variable in a library so it is registered during * initialization when the library is loaded. */ QPID_COMMON_EXTERN Plugin(); QPID_COMMON_EXTERN virtual ~Plugin(); /** * Configuration options for the plugin. * Then will be updated during option parsing by the host program. * * @return An options group or 0 for no options. Default returns 0. * Plugin retains ownership of return value. */ QPID_COMMON_EXTERN virtual Options* getOptions(); /** * Initialize Plugin functionality on a Target, called before * initializing the target. * * Plugins should ignore targets they don't recognize. * * Called before the target itself is initialized. */ virtual void earlyInitialize(Target&) = 0; /** * Initialize Plugin functionality on a Target. Called after * initializing the target. * * Plugins should ignore targets they don't recognize. * * Called after the target is fully initialized. */ virtual void initialize(Target&) = 0; /** * Initialization order. If a plugin does not override this, it * returns DEFAULT_INIT_ORDER. Plugins that need to be initialized * earlier/later than normal can override initOrder to return * a lower/higher value than DEFAULT_INIT_ORDER. */ QPID_COMMON_EXTERN virtual int initOrder() const; /** List of registered Plugin objects. * Caller must not delete plugin pointers. */ QPID_COMMON_EXTERN static const Plugins& getPlugins(); /** Call earlyInitialize() on all registered plugins */ QPID_COMMON_EXTERN static void earlyInitAll(Target&); /** Call initialize() on all registered plugins */ QPID_COMMON_EXTERN static void initializeAll(Target&); /** For each registered plugin, add plugin.getOptions() to opts. */ QPID_COMMON_EXTERN static void addOptions(Options& opts); }; } // namespace qpid #endif /*!QPID_PLUGIN_H*/ qpidc-0.16/src/rubygen.cmake0000664000076400007640000011725711752725714016430 0ustar00jrossjross00000000000000# Generated makefile fragment. # Including makefile defines ${rgen_dir} ${rgen_cmd} and ${specs}. set(rgen_generator ${rgen_dir}/framing.0-10/OperationsInvoker.rb ${rgen_dir}/framing.0-10/MethodBodyConstVisitor.rb ${rgen_dir}/framing.0-10/frame_body_lists.rb ${rgen_dir}/framing.0-10/Proxy.rb ${rgen_dir}/framing.0-10/structs.rb ${rgen_dir}/framing.0-10/constants.rb ${rgen_dir}/framing.0-10/Operations.rb ${rgen_dir}/framing.0-10/all_method_bodies.rb ${rgen_dir}/framing.0-10/MethodBodyFactory.rb ${rgen_dir}/framing.0-10/Session.rb ${rgen_dir}/framing.0-10/MethodBodyDefaultVisitor.rb ${rgen_dir}/amqpgen.rb ${rgen_dir}/0-10/handlers.rb ${rgen_dir}/0-10/typecode.rb ${rgen_dir}/0-10/allsegmenttypes.rb ${rgen_dir}/0-10/exceptions.rb ${rgen_dir}/0-10/specification.rb ${rgen_dir}/cppgen.rb ${rgen_dir}/MethodBodyDefaultVisitor.rb ${rgen_dir}/generate) set(rgen_client_srcs ../include/qpid/client/AsyncSession_0_10.h ../include/qpid/client/no_keyword/AsyncSession_0_10.h ./qpid/client/no_keyword/AsyncSession_0_10.cpp ../include/qpid/client/no_keyword/Session_0_10.h ../include/qpid/client/Session_0_10.h ../include/qpid/client/arg.h ./qpid/client/no_keyword/Session_0_10.cpp) set(rgen_framing_srcs ./qpid/framing/MethodBodyDefaultVisitor.cpp ./qpid/framing/FileReturnBody.cpp ../include/qpid/framing/ReplyTo.h ./qpid/framing/DtxRecoverResult.cpp ./qpid/framing/ConnectionCloseBody.cpp ./qpid/framing/FileConsumeOkBody.h ./qpid/framing/TxCommitBody.cpp ./qpid/framing/SessionKnownCompletedBody.h ./qpid/framing/MessageAcquireBody.h ./qpid/framing/DtxSetTimeoutBody.cpp ./qpid/framing/ClusterConnectionConfigBody.cpp ./qpid/framing/ClusterConnectionTxDequeueBody.h ./qpid/framing/ClusterUpdateRequestBody.cpp ./qpid/framing/ExchangeBoundBody.h ../include/qpid/framing/Xid.h ./qpid/framing/SessionGapBody.cpp ./qpid/framing/StreamQosBody.h ./qpid/framing/StreamCancelBody.h ./qpid/framing/ClusterInitialStatusBody.h ./qpid/framing/SessionCompletedBody.h ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h ./qpid/framing/ClusterTimerDropBody.h ./qpid/framing/ConnectionTuneBody.h ./qpid/framing/DtxPrepareBody.cpp ./qpid/framing/ClusterConnectionTxPublishBody.cpp ./qpid/framing/MessageRejectBody.h ./qpid/framing/DeliveryProperties.cpp ./qpid/framing/StreamDeliverBody.h ./qpid/framing/MethodBodyConstVisitor.h ./qpid/framing/ClusterRetractOfferBody.cpp ./qpid/framing/SessionTimeoutBody.h ./qpid/framing/FileRejectBody.h ./qpid/framing/StreamPublishBody.h ./qpid/framing/DtxCommitBody.cpp ./qpid/framing/AMQP_ServerProxy.cpp ./qpid/framing/FilePublishBody.cpp ./qpid/framing/ClusterConnectionAddQueueListenerBody.cpp ./qpid/framing/ClusterConnectionDtxAckBody.h ./qpid/framing/FileStageBody.cpp ./qpid/framing/ClusterConnectionTxEndBody.h ./qpid/framing/ClusterConnectionDtxEndBody.cpp ./qpid/framing/SessionDetachedBody.h ../include/qpid/framing/DtxRecoverResult.h ./qpid/framing/QueueQueryResult.cpp ./qpid/framing/ExchangeQueryBody.cpp ./qpid/framing/SessionAttachBody.h ./qpid/framing/ClusterConnectionShadowSetUserBody.cpp ./qpid/framing/StreamQosOkBody.h ./qpid/framing/FileOpenOkBody.h ./qpid/framing/SessionAttachBody.cpp ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h ../include/qpid/framing/DtxGetTimeoutResult.h ./qpid/framing/FileQosBody.h ./qpid/framing/SessionRequestTimeoutBody.h ./qpid/framing/ClusterConnectionTxDequeueBody.cpp ./qpid/framing/ExchangeUnbindBody.cpp ./qpid/framing/SessionAttachedBody.cpp ./qpid/framing/SessionFlushBody.cpp ./qpid/framing/ClusterConnectionExchangeBody.cpp ./qpid/framing/ExchangeDeleteBody.h ./qpid/framing/FileCancelBody.cpp ./qpid/framing/MessageFlushBody.h ./qpid/framing/ConnectionSecureOkBody.cpp ./qpid/framing/DtxSetTimeoutBody.h ./qpid/framing/FileRejectBody.cpp ../include/qpid/framing/Header.h ../include/qpid/framing/StreamProperties.h ./qpid/framing/AMQP_AllProxy.h ./qpid/framing/ClusterConnectionDtxStartBody.h ./qpid/framing/AllInvoker.cpp ./qpid/framing/FileDeliverBody.h ./qpid/framing/AMQP_ClientOperations.h ./qpid/framing/ClusterConnectionQueuePositionBody.h ./qpid/framing/ClusterConnectionMembershipBody.h ./qpid/framing/ClusterConnectionSessionStateBody.h ./qpid/framing/ClusterConnectionDtxEndBody.h ./qpid/framing/ClusterConnectionDeliverDoOutputBody.cpp ./qpid/framing/ClusterConnectionDeliverCloseBody.h ./qpid/framing/ClusterConnectionAnnounceBody.h ./qpid/framing/ClusterClockBody.h ./qpid/framing/DtxSelectBody.h ./qpid/framing/TxSelectBody.h ../include/qpid/framing/reply_exceptions.h ./qpid/framing/ClusterErrorCheckBody.h ./qpid/framing/SessionConfirmedBody.h ./qpid/framing/MessageFlowBody.cpp ./qpid/framing/StreamQosBody.cpp ./qpid/framing/DtxCommitBody.h ./qpid/framing/ExchangeBoundBody.cpp ./qpid/framing/ExchangeBindBody.h ./qpid/framing/frame_body_lists.h ./qpid/framing/FileConsumeOkBody.cpp ../include/qpid/framing/FragmentProperties.h ./qpid/framing/ClusterUpdateOfferBody.h ./qpid/framing/MessageTransferBody.cpp ./qpid/framing/FileQosOkBody.h ./qpid/framing/ClusterShutdownBody.cpp ./qpid/framing/StreamDeliverBody.cpp ../include/qpid/framing/FileProperties.h ./qpid/framing/ExchangeDeleteBody.cpp ./qpid/framing/ConnectionTuneBody.cpp ./qpid/framing/ExchangeQueryResult.cpp ./qpid/framing/TxCommitBody.h ./qpid/framing/ClientInvoker.h ./qpid/framing/ClusterUpdateOfferBody.cpp ./qpid/framing/reply_exceptions.cpp ./qpid/framing/ClusterConnectionQueueFairshareStateBody.cpp ./qpid/framing/QueueDeclareBody.h ./qpid/framing/StreamConsumeOkBody.h ../include/qpid/framing/constants.h ./qpid/framing/ClusterConnectionManagementSetupStateBody.cpp ./qpid/framing/FilePublishBody.h ./qpid/framing/ConnectionCloseBody.h ./qpid/framing/ConnectionOpenOkBody.cpp ./qpid/framing/ClusterConnectionAbortBody.h ./qpid/framing/ClusterInitialStatusBody.cpp ../include/qpid/framing/XaResult.h ./qpid/framing/XaResult.cpp ./qpid/framing/FileStageBody.h ./qpid/framing/FileAckBody.h ../include/qpid/framing/MessageProperties.h ./qpid/framing/FileQosOkBody.cpp ./qpid/framing/ClusterTimerWakeupBody.cpp ./qpid/framing/ConnectionOpenBody.cpp ./qpid/framing/FileOpenOkBody.cpp ./qpid/framing/StreamConsumeBody.h ./qpid/framing/AMQP_ClientProxy.h ./qpid/framing/QueueDeleteBody.h ./qpid/framing/FileCancelBody.h ./qpid/framing/MessageSubscribeBody.cpp ../include/qpid/framing/enum.h ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h ./qpid/framing/ClusterConnectionDtxBufferRefBody.cpp ./qpid/framing/ClusterConnectionAccumulatedAckBody.cpp ./qpid/framing/MessageAcceptBody.h ./qpid/framing/AMQP_AllProxy.cpp ./qpid/framing/FileConsumeBody.cpp ./qpid/framing/ExecutionExceptionBody.cpp ./qpid/framing/ConnectionCloseOkBody.h ./qpid/framing/ClusterConnectionTxEnqueueBody.cpp ./qpid/framing/ClusterConfigChangeBody.cpp ./qpid/framing/ConnectionStartBody.cpp ./qpid/framing/DtxRecoverBody.h ./qpid/framing/DtxStartBody.h ./qpid/framing/MessageStopBody.h ./qpid/framing/ClientInvoker.cpp ./qpid/framing/MethodBodyFactory.cpp ./qpid/framing/MessageAcceptBody.cpp ../include/qpid/framing/DeliveryProperties.h ./qpid/framing/FileAckBody.cpp ./qpid/framing/QueueQueryBody.cpp ./qpid/framing/ExchangeDeclareBody.h ./qpid/framing/ClusterUpdateRequestBody.h ./qpid/framing/ClusterConnectionDtxAckBody.cpp ./qpid/framing/TxSelectBody.cpp ./qpid/framing/DtxForgetBody.h ./qpid/framing/SessionTimeoutBody.cpp ./qpid/framing/ConnectionStartOkBody.h ./qpid/framing/ConnectionSecureBody.cpp ./qpid/framing/TypeCode.cpp ./qpid/framing/ClusterConnectionQueueObserverStateBody.cpp ./qpid/framing/ClusterConnectionShadowReadyBody.h ./qpid/framing/Xid.cpp ./qpid/framing/ClusterConnectionDeliveryRecordBody.h ./qpid/framing/MessageResumeBody.h ./qpid/framing/ServerInvoker.h ./qpid/framing/AMQP_ServerProxy.h ./qpid/framing/DtxEndBody.cpp ./qpid/framing/SessionDetachBody.cpp ./qpid/framing/ClusterConnectionOutputTaskBody.cpp ./qpid/framing/ClusterConnectionDeliverCloseBody.cpp ./qpid/framing/ConnectionHeartbeatBody.cpp ./qpid/framing/ClusterConnectionTxEnqueueBody.h ./qpid/framing/FileDeliverBody.cpp ./qpid/framing/SessionAttachedBody.h ./qpid/framing/QueuePurgeBody.cpp ./qpid/framing/DtxGetTimeoutResult.cpp ../include/qpid/framing/MessageResumeResult.h ./qpid/framing/DtxEndBody.h ./qpid/framing/ClusterConnectionConfigBody.h ./qpid/framing/ClusterConnectionOutputTaskBody.h ./qpid/framing/FileOpenBody.h ./qpid/framing/ExecutionSyncBody.cpp ./qpid/framing/QueueDeclareBody.cpp ./qpid/framing/QueueQueryBody.h ./qpid/framing/ClusterReadyBody.cpp ./qpid/framing/TxRollbackBody.cpp ./qpid/framing/ConnectionRedirectBody.h ./qpid/framing/ExchangeUnbindBody.h ./qpid/framing/SessionRequestTimeoutBody.cpp ./qpid/framing/ExchangeBindBody.cpp ./qpid/framing/ClusterConnectionDtxBufferRefBody.h ./qpid/framing/ClusterConnectionTxStartBody.h ./qpid/framing/FragmentProperties.cpp ./qpid/framing/QueueDeleteBody.cpp ./qpid/framing/MessageAcquireBody.cpp ../include/qpid/framing/ExchangeBoundResult.h ./qpid/framing/ClusterConnectionRetractOfferBody.cpp ./qpid/framing/MessageFlushBody.cpp ./qpid/framing/QueuePurgeBody.h ./qpid/framing/MessageFlowBody.h ./qpid/framing/SessionDetachBody.h ./qpid/framing/MessageSetFlowModeBody.cpp ./qpid/framing/ClusterConnectionTxAcceptBody.h ./qpid/framing/ClusterRetractOfferBody.h ./qpid/framing/AllInvoker.h ./qpid/framing/ConnectionTuneOkBody.h ./qpid/framing/MessageStopBody.cpp ./qpid/framing/StreamReturnBody.h ./qpid/framing/ConnectionCloseOkBody.cpp ./qpid/framing/all_method_bodies.h ./qpid/framing/AMQP_AllOperations.h ./qpid/framing/ClusterConnectionShadowReadyBody.cpp ./qpid/framing/ClusterConnectionTxAcceptBody.cpp ./qpid/framing/ClusterDeliverToQueueBody.cpp ./qpid/framing/SessionFlushBody.h ./qpid/framing/ServerInvoker.cpp ./qpid/framing/MessageCancelBody.cpp ./qpid/framing/ClusterConnectionTxEndBody.cpp ./qpid/framing/ClusterConnectionAbortBody.cpp ./qpid/framing/ClusterTimerWakeupBody.h ./qpid/framing/StreamConsumeOkBody.cpp ./qpid/framing/FileReturnBody.h ./qpid/framing/ClusterConnectionSessionStateBody.cpp ./qpid/framing/DtxForgetBody.cpp ./qpid/framing/SessionKnownCompletedBody.cpp ./qpid/framing/ReplyTo.cpp ./qpid/framing/MessageTransferBody.h ./qpid/framing/SessionConfirmedBody.cpp ./qpid/framing/ExecutionSyncBody.h ./qpid/framing/DtxRollbackBody.cpp ./qpid/framing/ConnectionTuneOkBody.cpp ./qpid/framing/StreamConsumeBody.cpp ./qpid/framing/ConnectionSecureOkBody.h ./qpid/framing/DtxPrepareBody.h ./qpid/framing/MessageProperties.cpp ./qpid/framing/ExecutionResultBody.cpp ./qpid/framing/ExchangeQueryBody.h ./qpid/framing/ClusterShutdownBody.h ./qpid/framing/SessionExpectedBody.cpp ./qpid/framing/AMQP_ServerOperations.h ../include/qpid/framing/amqp_structs.h ./qpid/framing/ClusterConnectionTxStartBody.cpp ./qpid/framing/FileOpenBody.cpp ./qpid/framing/MessageReleaseBody.cpp ./qpid/framing/SessionGapBody.h ./qpid/framing/ConnectionStartBody.h ./qpid/framing/Header.cpp ./qpid/framing/StreamProperties.cpp ./qpid/framing/MethodBodyDefaultVisitor.h ./qpid/framing/ClusterConnectionShadowPrepareBody.h ./qpid/framing/ClusterErrorCheckBody.cpp ./qpid/framing/AMQP_ClientProxy.cpp ./qpid/framing/DtxSelectBody.cpp ./qpid/framing/ClusterConnectionManagementSetupStateBody.h ./qpid/framing/SessionDetachedBody.cpp ./qpid/framing/ClusterConnectionDtxWorkRecordBody.cpp ./qpid/framing/StreamReturnBody.cpp ./qpid/framing/SessionCommandPointBody.cpp ./qpid/framing/FileQosBody.cpp ./qpid/framing/FileProperties.cpp ./qpid/framing/DtxGetTimeoutBody.cpp ./qpid/framing/MessageSetFlowModeBody.h ./qpid/framing/ClusterTimerDropBody.cpp ./qpid/framing/ExchangeDeclareBody.cpp ./qpid/framing/ExecutionResultBody.h ./qpid/framing/ClusterConnectionClockBody.cpp ./qpid/framing/ClusterConnectionAddQueueListenerBody.h ./qpid/framing/ClusterConnectionRetractOfferBody.h ./qpid/framing/ClusterConnectionDtxStartBody.cpp ./qpid/framing/ClusterConnectionAccumulatedAckBody.h ./qpid/framing/ClusterConnectionShadowPrepareBody.cpp ./qpid/framing/ClusterConnectionAnnounceBody.cpp ./qpid/framing/DtxGetTimeoutBody.h ./qpid/framing/ExecutionExceptionBody.h ./qpid/framing/ClusterDeliverToQueueBody.h ./qpid/framing/FileConsumeBody.h ./qpid/framing/SessionCommandPointBody.h ./qpid/framing/SessionCompletedBody.cpp ./qpid/framing/ClusterConnectionQueueObserverStateBody.h ./qpid/framing/ClusterConnectionQueuePositionBody.cpp ../include/qpid/framing/QueueQueryResult.h ./qpid/framing/MessageAcquireResult.cpp ./qpid/framing/TxRollbackBody.h ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.cpp ./qpid/framing/ClusterConfigChangeBody.h ./qpid/framing/ConnectionSecureBody.h ./qpid/framing/ConnectionHeartbeatBody.h ./qpid/framing/StreamCancelBody.cpp ../include/qpid/framing/MessageAcquireResult.h ./qpid/framing/ConnectionRedirectBody.cpp ../include/qpid/framing/ExchangeQueryResult.h ./qpid/framing/MessageResumeBody.cpp ./qpid/framing/MessageCancelBody.h ./qpid/framing/StreamQosOkBody.cpp ./qpid/framing/SessionExpectedBody.h ./qpid/framing/ExchangeBoundResult.cpp ./qpid/framing/DtxRecoverBody.cpp ../include/qpid/framing/TypeCode.h ./qpid/framing/ClusterConnectionConsumerStateBody.cpp ./qpid/framing/ClusterConnectionShadowSetUserBody.h ./qpid/framing/ConnectionOpenOkBody.h ./qpid/framing/MessageReleaseBody.h ./qpid/framing/ConnectionOpenBody.h ./qpid/framing/StreamPublishBody.cpp ./qpid/framing/ClusterConnectionMembershipBody.cpp ./qpid/framing/ClusterConnectionTxPublishBody.h ./qpid/framing/MessageRejectBody.cpp ./qpid/framing/ClusterConnectionExchangeBody.h ./qpid/framing/ClusterConnectionConsumerStateBody.h ./qpid/framing/ClusterClockBody.cpp ./qpid/framing/ClusterReadyBody.h ./qpid/framing/MessageResumeResult.cpp ./qpid/framing/DtxStartBody.cpp ./qpid/framing/ClusterConnectionClockBody.h ./qpid/framing/ClusterConnectionDeliveryRecordBody.cpp ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h ./qpid/framing/MessageSubscribeBody.h ./qpid/framing/DtxRollbackBody.h ./qpid/framing/ConnectionStartOkBody.cpp) set(rgen_amqp_0_10_srcs ./qpid/amqp_0_10/StructVisitor.h ./qpid/amqp_0_10/ApplyStruct.h ./qpid/amqp_0_10/CommandHolder.cpp ./qpid/amqp_0_10/specification_fwd.h ./qpid/amqp_0_10/structs.h ./qpid/amqp_0_10/exceptions.h ./qpid/amqp_0_10/ProxyTemplate.h ./qpid/amqp_0_10/structs.cpp ./qpid/amqp_0_10/StructHolder.cpp ./qpid/amqp_0_10/ApplyCommand.h ./qpid/amqp_0_10/TypeForCode.h ./qpid/amqp_0_10/ControlVisitor.h ./qpid/amqp_0_10/ControlHolder.h ./qpid/amqp_0_10/specification.h ./qpid/amqp_0_10/CodeForType.h ./qpid/amqp_0_10/StructHolder.h ./qpid/amqp_0_10/ApplyControl.h ./qpid/amqp_0_10/TypeForCode.cpp ./qpid/amqp_0_10/ControlHolder.cpp ./qpid/amqp_0_10/CommandVisitor.h ./qpid/amqp_0_10/specification.cpp ./qpid/amqp_0_10/handlers.h ./qpid/amqp_0_10/CommandHolder.h ./qpid/amqp_0_10/CodeForType.cpp) set(rgen_srcs ./qpid/amqp_0_10/StructVisitor.h ./qpid/framing/MethodBodyDefaultVisitor.cpp ./qpid/framing/FileReturnBody.cpp ../include/qpid/framing/ReplyTo.h ./qpid/framing/DtxRecoverResult.cpp ./qpid/framing/ConnectionCloseBody.cpp ./qpid/framing/FileConsumeOkBody.h ./qpid/framing/TxCommitBody.cpp ./qpid/framing/SessionKnownCompletedBody.h ./qpid/framing/MessageAcquireBody.h ./qpid/framing/DtxSetTimeoutBody.cpp ../include/qpid/client/AsyncSession_0_10.h ./qpid/framing/ClusterConnectionConfigBody.cpp ./qpid/framing/ClusterConnectionTxDequeueBody.h ./qpid/framing/ClusterUpdateRequestBody.cpp ./qpid/framing/ExchangeBoundBody.h ../include/qpid/framing/Xid.h ./qpid/framing/SessionGapBody.cpp ./qpid/framing/StreamQosBody.h ./qpid/framing/StreamCancelBody.h ./qpid/framing/ClusterInitialStatusBody.h ./qpid/framing/SessionCompletedBody.h ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h ./qpid/framing/ClusterTimerDropBody.h ./qpid/framing/ConnectionTuneBody.h ./qpid/framing/DtxPrepareBody.cpp ./qpid/amqp_0_10/ApplyStruct.h ./qpid/framing/ClusterConnectionTxPublishBody.cpp ./qpid/framing/MessageRejectBody.h ./qpid/framing/DeliveryProperties.cpp ./qpid/framing/StreamDeliverBody.h ./qpid/framing/MethodBodyConstVisitor.h ./qpid/framing/ClusterRetractOfferBody.cpp ./qpid/framing/SessionTimeoutBody.h ./qpid/framing/FileRejectBody.h ./qpid/framing/StreamPublishBody.h ./qpid/framing/DtxCommitBody.cpp ./qpid/framing/AMQP_ServerProxy.cpp ./qpid/framing/FilePublishBody.cpp ./qpid/framing/ClusterConnectionAddQueueListenerBody.cpp ./qpid/framing/ClusterConnectionDtxAckBody.h ./qpid/framing/FileStageBody.cpp ./qpid/framing/ClusterConnectionTxEndBody.h ./qpid/framing/ClusterConnectionDtxEndBody.cpp ./qpid/framing/SessionDetachedBody.h ../include/qpid/framing/DtxRecoverResult.h ./qpid/framing/QueueQueryResult.cpp ./qpid/framing/ExchangeQueryBody.cpp ./qpid/framing/SessionAttachBody.h ./qpid/framing/ClusterConnectionShadowSetUserBody.cpp ./qpid/framing/StreamQosOkBody.h ./qpid/framing/FileOpenOkBody.h ./qpid/framing/SessionAttachBody.cpp ../include/qpid/client/no_keyword/AsyncSession_0_10.h ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h ../include/qpid/framing/DtxGetTimeoutResult.h ./qpid/framing/FileQosBody.h ./qpid/framing/SessionRequestTimeoutBody.h ./qpid/amqp_0_10/CommandHolder.cpp ./qpid/amqp_0_10/specification_fwd.h ./qpid/framing/ClusterConnectionTxDequeueBody.cpp ./qpid/framing/ExchangeUnbindBody.cpp ./qpid/framing/SessionAttachedBody.cpp ./qpid/framing/SessionFlushBody.cpp ./qpid/framing/ClusterConnectionExchangeBody.cpp ./qpid/framing/ExchangeDeleteBody.h ./qpid/framing/FileCancelBody.cpp ./qpid/framing/MessageFlushBody.h ./qpid/framing/ConnectionSecureOkBody.cpp ./qpid/framing/DtxSetTimeoutBody.h ./qpid/framing/FileRejectBody.cpp ../include/qpid/framing/Header.h ../include/qpid/framing/StreamProperties.h ./qpid/framing/AMQP_AllProxy.h ./qpid/amqp_0_10/structs.h ./qpid/framing/ClusterConnectionDtxStartBody.h ./qpid/framing/AllInvoker.cpp ./qpid/framing/FileDeliverBody.h ./qpid/framing/AMQP_ClientOperations.h ./qpid/framing/ClusterConnectionQueuePositionBody.h ./qpid/framing/ClusterConnectionMembershipBody.h ./qpid/client/no_keyword/AsyncSession_0_10.cpp ./qpid/framing/ClusterConnectionSessionStateBody.h ./qpid/framing/ClusterConnectionDtxEndBody.h ./qpid/framing/ClusterConnectionDeliverDoOutputBody.cpp ./qpid/framing/ClusterConnectionDeliverCloseBody.h ./qpid/framing/ClusterConnectionAnnounceBody.h ./qpid/framing/ClusterClockBody.h ./qpid/framing/DtxSelectBody.h ./qpid/framing/TxSelectBody.h ../include/qpid/framing/reply_exceptions.h ./qpid/framing/ClusterErrorCheckBody.h ./qpid/framing/SessionConfirmedBody.h ./qpid/framing/MessageFlowBody.cpp ./qpid/framing/StreamQosBody.cpp ./qpid/framing/DtxCommitBody.h ./qpid/framing/ExchangeBoundBody.cpp ./qpid/framing/ExchangeBindBody.h ./qpid/framing/frame_body_lists.h ./qpid/framing/FileConsumeOkBody.cpp ../include/qpid/framing/FragmentProperties.h ./qpid/framing/ClusterUpdateOfferBody.h ./qpid/framing/MessageTransferBody.cpp ./qpid/framing/FileQosOkBody.h ./qpid/framing/ClusterShutdownBody.cpp ./qpid/framing/StreamDeliverBody.cpp ../include/qpid/framing/FileProperties.h ./qpid/framing/ExchangeDeleteBody.cpp ./qpid/framing/ConnectionTuneBody.cpp ./qpid/framing/ExchangeQueryResult.cpp ./qpid/framing/TxCommitBody.h ./qpid/framing/ClientInvoker.h ./qpid/framing/ClusterUpdateOfferBody.cpp ./qpid/framing/reply_exceptions.cpp ./qpid/framing/ClusterConnectionQueueFairshareStateBody.cpp ./qpid/framing/QueueDeclareBody.h ./qpid/framing/StreamConsumeOkBody.h ./qpid/amqp_0_10/exceptions.h ../include/qpid/framing/constants.h ./qpid/framing/ClusterConnectionManagementSetupStateBody.cpp ./qpid/framing/FilePublishBody.h ./qpid/framing/ConnectionCloseBody.h ./qpid/framing/ConnectionOpenOkBody.cpp ./qpid/framing/ClusterConnectionAbortBody.h ./qpid/framing/ClusterInitialStatusBody.cpp ../include/qpid/framing/XaResult.h ./qpid/framing/XaResult.cpp ./qpid/framing/FileStageBody.h ./qpid/framing/FileAckBody.h ./qpid/amqp_0_10/ProxyTemplate.h ../include/qpid/framing/MessageProperties.h ./qpid/framing/FileQosOkBody.cpp ./qpid/framing/ClusterTimerWakeupBody.cpp ./qpid/framing/ConnectionOpenBody.cpp ./qpid/framing/FileOpenOkBody.cpp ./qpid/framing/StreamConsumeBody.h ./qpid/framing/AMQP_ClientProxy.h ./qpid/framing/QueueDeleteBody.h ./qpid/framing/FileCancelBody.h ./qpid/framing/MessageSubscribeBody.cpp ./qpid/amqp_0_10/structs.cpp ../include/qpid/framing/enum.h ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h ./qpid/framing/ClusterConnectionDtxBufferRefBody.cpp ./qpid/framing/ClusterConnectionAccumulatedAckBody.cpp ./qpid/framing/MessageAcceptBody.h ./qpid/framing/AMQP_AllProxy.cpp ./qpid/framing/FileConsumeBody.cpp ./qpid/framing/ExecutionExceptionBody.cpp ./qpid/framing/ConnectionCloseOkBody.h ./qpid/framing/ClusterConnectionTxEnqueueBody.cpp ./qpid/framing/ClusterConfigChangeBody.cpp ./qpid/framing/ConnectionStartBody.cpp ./qpid/framing/DtxRecoverBody.h ./qpid/framing/DtxStartBody.h ./qpid/framing/MessageStopBody.h ./qpid/framing/ClientInvoker.cpp ./qpid/amqp_0_10/StructHolder.cpp ./qpid/framing/MethodBodyFactory.cpp ./qpid/framing/MessageAcceptBody.cpp ../include/qpid/framing/DeliveryProperties.h ./qpid/framing/FileAckBody.cpp ./qpid/framing/QueueQueryBody.cpp ./qpid/framing/ExchangeDeclareBody.h ./qpid/framing/ClusterUpdateRequestBody.h ./qpid/framing/ClusterConnectionDtxAckBody.cpp ./qpid/framing/TxSelectBody.cpp ./qpid/framing/DtxForgetBody.h ./qpid/framing/SessionTimeoutBody.cpp ./qpid/framing/ConnectionStartOkBody.h ./qpid/framing/ConnectionSecureBody.cpp ./qpid/framing/TypeCode.cpp ./qpid/framing/ClusterConnectionQueueObserverStateBody.cpp ./qpid/framing/ClusterConnectionShadowReadyBody.h ./qpid/framing/Xid.cpp ./qpid/framing/ClusterConnectionDeliveryRecordBody.h ./qpid/framing/MessageResumeBody.h ./qpid/framing/ServerInvoker.h ./qpid/framing/AMQP_ServerProxy.h ./qpid/framing/DtxEndBody.cpp ./qpid/framing/SessionDetachBody.cpp ./qpid/framing/ClusterConnectionOutputTaskBody.cpp ./qpid/framing/ClusterConnectionDeliverCloseBody.cpp ./qpid/framing/ConnectionHeartbeatBody.cpp ./qpid/framing/ClusterConnectionTxEnqueueBody.h ./qpid/framing/FileDeliverBody.cpp ./qpid/framing/SessionAttachedBody.h ./qpid/framing/QueuePurgeBody.cpp ./qpid/framing/DtxGetTimeoutResult.cpp ../include/qpid/framing/MessageResumeResult.h ./qpid/framing/DtxEndBody.h ./qpid/framing/ClusterConnectionConfigBody.h ./qpid/framing/ClusterConnectionOutputTaskBody.h ./qpid/framing/FileOpenBody.h ./qpid/framing/ExecutionSyncBody.cpp ./qpid/framing/QueueDeclareBody.cpp ./qpid/framing/QueueQueryBody.h ./qpid/amqp_0_10/ApplyCommand.h ./qpid/framing/ClusterReadyBody.cpp ./qpid/framing/TxRollbackBody.cpp ./qpid/framing/ConnectionRedirectBody.h ./qpid/framing/ExchangeUnbindBody.h ./qpid/framing/SessionRequestTimeoutBody.cpp ./qpid/framing/ExchangeBindBody.cpp ./qpid/amqp_0_10/TypeForCode.h ../include/qpid/client/no_keyword/Session_0_10.h ./qpid/framing/ClusterConnectionDtxBufferRefBody.h ./qpid/framing/ClusterConnectionTxStartBody.h ./qpid/framing/FragmentProperties.cpp ./qpid/framing/QueueDeleteBody.cpp ./qpid/framing/MessageAcquireBody.cpp ../include/qpid/framing/ExchangeBoundResult.h ./qpid/amqp_0_10/ControlVisitor.h ./qpid/amqp_0_10/ControlHolder.h ./qpid/framing/ClusterConnectionRetractOfferBody.cpp ./qpid/framing/MessageFlushBody.cpp ./qpid/framing/QueuePurgeBody.h ./qpid/framing/MessageFlowBody.h ./qpid/framing/SessionDetachBody.h ./qpid/framing/MessageSetFlowModeBody.cpp ./qpid/amqp_0_10/specification.h ./qpid/amqp_0_10/CodeForType.h ./qpid/framing/ClusterConnectionTxAcceptBody.h ./qpid/framing/ClusterRetractOfferBody.h ./qpid/framing/AllInvoker.h ./qpid/framing/ConnectionTuneOkBody.h ./qpid/framing/MessageStopBody.cpp ./qpid/framing/StreamReturnBody.h ./qpid/framing/ConnectionCloseOkBody.cpp ./qpid/framing/all_method_bodies.h ./qpid/framing/AMQP_AllOperations.h ./qpid/framing/ClusterConnectionShadowReadyBody.cpp ./qpid/framing/ClusterConnectionTxAcceptBody.cpp ./qpid/framing/ClusterDeliverToQueueBody.cpp ./qpid/framing/SessionFlushBody.h ./qpid/framing/ServerInvoker.cpp ./qpid/framing/MessageCancelBody.cpp ./qpid/amqp_0_10/StructHolder.h ./qpid/framing/ClusterConnectionTxEndBody.cpp ./qpid/framing/ClusterConnectionAbortBody.cpp ./qpid/framing/ClusterTimerWakeupBody.h ./qpid/framing/StreamConsumeOkBody.cpp ./qpid/framing/FileReturnBody.h ./qpid/framing/ClusterConnectionSessionStateBody.cpp ./qpid/framing/DtxForgetBody.cpp ./qpid/framing/SessionKnownCompletedBody.cpp ./qpid/framing/ReplyTo.cpp ./qpid/framing/MessageTransferBody.h ./qpid/framing/SessionConfirmedBody.cpp ./qpid/framing/ExecutionSyncBody.h ./qpid/framing/DtxRollbackBody.cpp ./qpid/framing/ConnectionTuneOkBody.cpp ./qpid/framing/StreamConsumeBody.cpp ./qpid/framing/ConnectionSecureOkBody.h ./qpid/framing/DtxPrepareBody.h ./qpid/framing/MessageProperties.cpp ./qpid/framing/ExecutionResultBody.cpp ./qpid/framing/ExchangeQueryBody.h ./qpid/framing/ClusterShutdownBody.h ./qpid/framing/SessionExpectedBody.cpp ./qpid/amqp_0_10/ApplyControl.h ./qpid/framing/AMQP_ServerOperations.h ../include/qpid/framing/amqp_structs.h ./qpid/framing/ClusterConnectionTxStartBody.cpp ./qpid/framing/FileOpenBody.cpp ./qpid/framing/MessageReleaseBody.cpp ./qpid/framing/SessionGapBody.h ./qpid/framing/ConnectionStartBody.h ./qpid/framing/Header.cpp ./qpid/framing/StreamProperties.cpp ./qpid/framing/MethodBodyDefaultVisitor.h ./qpid/framing/ClusterConnectionShadowPrepareBody.h ./qpid/framing/ClusterErrorCheckBody.cpp ./qpid/framing/AMQP_ClientProxy.cpp ./qpid/framing/DtxSelectBody.cpp ../include/qpid/client/Session_0_10.h ./qpid/framing/ClusterConnectionManagementSetupStateBody.h ./qpid/framing/SessionDetachedBody.cpp ./qpid/amqp_0_10/TypeForCode.cpp ../include/qpid/client/arg.h ./qpid/framing/ClusterConnectionDtxWorkRecordBody.cpp ./qpid/framing/StreamReturnBody.cpp ./qpid/framing/SessionCommandPointBody.cpp ./qpid/framing/FileQosBody.cpp ./qpid/framing/FileProperties.cpp ./qpid/framing/DtxGetTimeoutBody.cpp ./qpid/framing/MessageSetFlowModeBody.h ./qpid/framing/ClusterTimerDropBody.cpp ./qpid/framing/ExchangeDeclareBody.cpp ./qpid/framing/ExecutionResultBody.h ./qpid/framing/ClusterConnectionClockBody.cpp ./qpid/framing/ClusterConnectionAddQueueListenerBody.h ./qpid/framing/ClusterConnectionRetractOfferBody.h ./qpid/framing/ClusterConnectionDtxStartBody.cpp ./qpid/framing/ClusterConnectionAccumulatedAckBody.h ./qpid/framing/ClusterConnectionShadowPrepareBody.cpp ./qpid/framing/ClusterConnectionAnnounceBody.cpp ./qpid/framing/DtxGetTimeoutBody.h ./qpid/framing/ExecutionExceptionBody.h ./qpid/framing/ClusterDeliverToQueueBody.h ./qpid/framing/FileConsumeBody.h ./qpid/framing/SessionCommandPointBody.h ./qpid/framing/SessionCompletedBody.cpp ./qpid/framing/ClusterConnectionQueueObserverStateBody.h ./qpid/client/no_keyword/Session_0_10.cpp ./qpid/framing/ClusterConnectionQueuePositionBody.cpp ../include/qpid/framing/QueueQueryResult.h ./qpid/amqp_0_10/ControlHolder.cpp ./qpid/framing/MessageAcquireResult.cpp ./qpid/framing/TxRollbackBody.h ./qpid/amqp_0_10/CommandVisitor.h ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.cpp ./qpid/framing/ClusterConfigChangeBody.h ./qpid/framing/ConnectionSecureBody.h ./qpid/framing/ConnectionHeartbeatBody.h ./qpid/framing/StreamCancelBody.cpp ../include/qpid/framing/MessageAcquireResult.h ./qpid/framing/ConnectionRedirectBody.cpp ../include/qpid/framing/ExchangeQueryResult.h ./qpid/framing/MessageResumeBody.cpp ./qpid/framing/MessageCancelBody.h ./qpid/framing/StreamQosOkBody.cpp ./qpid/framing/SessionExpectedBody.h ./qpid/amqp_0_10/specification.cpp ./qpid/framing/ExchangeBoundResult.cpp ./qpid/framing/DtxRecoverBody.cpp ../include/qpid/framing/TypeCode.h ./qpid/framing/ClusterConnectionConsumerStateBody.cpp ./qpid/framing/ClusterConnectionShadowSetUserBody.h ./qpid/framing/ConnectionOpenOkBody.h ./qpid/framing/MessageReleaseBody.h ./qpid/framing/ConnectionOpenBody.h ./qpid/framing/StreamPublishBody.cpp ./qpid/amqp_0_10/handlers.h ./qpid/framing/ClusterConnectionMembershipBody.cpp ./qpid/framing/ClusterConnectionTxPublishBody.h ./qpid/framing/MessageRejectBody.cpp ./qpid/amqp_0_10/CommandHolder.h ./tests/allSegmentTypes.h ./qpid/framing/ClusterConnectionExchangeBody.h ./qpid/framing/ClusterConnectionConsumerStateBody.h ./qpid/framing/ClusterClockBody.cpp ./qpid/framing/ClusterReadyBody.h ./qpid/framing/MessageResumeResult.cpp ./qpid/framing/DtxStartBody.cpp ./qpid/amqp_0_10/CodeForType.cpp ./qpid/framing/ClusterConnectionClockBody.h ./qpid/framing/ClusterConnectionDeliveryRecordBody.cpp ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h ./qpid/framing/MessageSubscribeBody.h ./qpid/framing/DtxRollbackBody.h ./qpid/framing/ConnectionStartOkBody.cpp) # Header file install rules. set(qpid_amqp_0_10dir ${includedir}/qpid/amqp_0_10) set(dist_qpid_amqp_0_10_HEADERS ./qpid/amqp_0_10/StructVisitor.h ./qpid/amqp_0_10/ApplyStruct.h ./qpid/amqp_0_10/specification_fwd.h ./qpid/amqp_0_10/structs.h ./qpid/amqp_0_10/exceptions.h ./qpid/amqp_0_10/ProxyTemplate.h ./qpid/amqp_0_10/ApplyCommand.h ./qpid/amqp_0_10/TypeForCode.h ./qpid/amqp_0_10/ControlVisitor.h ./qpid/amqp_0_10/ControlHolder.h ./qpid/amqp_0_10/specification.h ./qpid/amqp_0_10/CodeForType.h ./qpid/amqp_0_10/StructHolder.h ./qpid/amqp_0_10/ApplyControl.h ./qpid/amqp_0_10/CommandVisitor.h ./qpid/amqp_0_10/handlers.h ./qpid/amqp_0_10/CommandHolder.h) set(qpid_framingdir ${includedir}/qpid/framing) set(dist_qpid_framing_HEADERS ../include/qpid/framing/ReplyTo.h ./qpid/framing/FileConsumeOkBody.h ./qpid/framing/SessionKnownCompletedBody.h ./qpid/framing/MessageAcquireBody.h ./qpid/framing/ClusterConnectionTxDequeueBody.h ./qpid/framing/ExchangeBoundBody.h ../include/qpid/framing/Xid.h ./qpid/framing/StreamQosBody.h ./qpid/framing/StreamCancelBody.h ./qpid/framing/ClusterInitialStatusBody.h ./qpid/framing/SessionCompletedBody.h ./qpid/framing/ClusterConnectionDtxWorkRecordBody.h ./qpid/framing/ClusterTimerDropBody.h ./qpid/framing/ConnectionTuneBody.h ./qpid/framing/MessageRejectBody.h ./qpid/framing/StreamDeliverBody.h ./qpid/framing/MethodBodyConstVisitor.h ./qpid/framing/SessionTimeoutBody.h ./qpid/framing/FileRejectBody.h ./qpid/framing/StreamPublishBody.h ./qpid/framing/ClusterConnectionDtxAckBody.h ./qpid/framing/ClusterConnectionTxEndBody.h ./qpid/framing/SessionDetachedBody.h ../include/qpid/framing/DtxRecoverResult.h ./qpid/framing/SessionAttachBody.h ./qpid/framing/StreamQosOkBody.h ./qpid/framing/FileOpenOkBody.h ./qpid/framing/ClusterConnectionQueueDequeueSincePurgeStateBody.h ../include/qpid/framing/DtxGetTimeoutResult.h ./qpid/framing/FileQosBody.h ./qpid/framing/SessionRequestTimeoutBody.h ./qpid/framing/ExchangeDeleteBody.h ./qpid/framing/MessageFlushBody.h ./qpid/framing/DtxSetTimeoutBody.h ../include/qpid/framing/Header.h ../include/qpid/framing/StreamProperties.h ./qpid/framing/AMQP_AllProxy.h ./qpid/framing/ClusterConnectionDtxStartBody.h ./qpid/framing/FileDeliverBody.h ./qpid/framing/AMQP_ClientOperations.h ./qpid/framing/ClusterConnectionQueuePositionBody.h ./qpid/framing/ClusterConnectionMembershipBody.h ./qpid/framing/ClusterConnectionSessionStateBody.h ./qpid/framing/ClusterConnectionDtxEndBody.h ./qpid/framing/ClusterConnectionDeliverCloseBody.h ./qpid/framing/ClusterConnectionAnnounceBody.h ./qpid/framing/ClusterClockBody.h ./qpid/framing/DtxSelectBody.h ./qpid/framing/TxSelectBody.h ../include/qpid/framing/reply_exceptions.h ./qpid/framing/ClusterErrorCheckBody.h ./qpid/framing/SessionConfirmedBody.h ./qpid/framing/DtxCommitBody.h ./qpid/framing/ExchangeBindBody.h ./qpid/framing/frame_body_lists.h ../include/qpid/framing/FragmentProperties.h ./qpid/framing/ClusterUpdateOfferBody.h ./qpid/framing/FileQosOkBody.h ../include/qpid/framing/FileProperties.h ./qpid/framing/TxCommitBody.h ./qpid/framing/ClientInvoker.h ./qpid/framing/QueueDeclareBody.h ./qpid/framing/StreamConsumeOkBody.h ../include/qpid/framing/constants.h ./qpid/framing/FilePublishBody.h ./qpid/framing/ConnectionCloseBody.h ./qpid/framing/ClusterConnectionAbortBody.h ../include/qpid/framing/XaResult.h ./qpid/framing/FileStageBody.h ./qpid/framing/FileAckBody.h ../include/qpid/framing/MessageProperties.h ./qpid/framing/StreamConsumeBody.h ./qpid/framing/AMQP_ClientProxy.h ./qpid/framing/QueueDeleteBody.h ./qpid/framing/FileCancelBody.h ../include/qpid/framing/enum.h ./qpid/framing/ClusterConnectionQueueFairshareStateBody.h ./qpid/framing/MessageAcceptBody.h ./qpid/framing/ConnectionCloseOkBody.h ./qpid/framing/DtxRecoverBody.h ./qpid/framing/DtxStartBody.h ./qpid/framing/MessageStopBody.h ../include/qpid/framing/DeliveryProperties.h ./qpid/framing/ExchangeDeclareBody.h ./qpid/framing/ClusterUpdateRequestBody.h ./qpid/framing/DtxForgetBody.h ./qpid/framing/ConnectionStartOkBody.h ./qpid/framing/ClusterConnectionShadowReadyBody.h ./qpid/framing/ClusterConnectionDeliveryRecordBody.h ./qpid/framing/MessageResumeBody.h ./qpid/framing/ServerInvoker.h ./qpid/framing/AMQP_ServerProxy.h ./qpid/framing/ClusterConnectionTxEnqueueBody.h ./qpid/framing/SessionAttachedBody.h ../include/qpid/framing/MessageResumeResult.h ./qpid/framing/DtxEndBody.h ./qpid/framing/ClusterConnectionConfigBody.h ./qpid/framing/ClusterConnectionOutputTaskBody.h ./qpid/framing/FileOpenBody.h ./qpid/framing/QueueQueryBody.h ./qpid/framing/ConnectionRedirectBody.h ./qpid/framing/ExchangeUnbindBody.h ./qpid/framing/ClusterConnectionDtxBufferRefBody.h ./qpid/framing/ClusterConnectionTxStartBody.h ../include/qpid/framing/ExchangeBoundResult.h ./qpid/framing/QueuePurgeBody.h ./qpid/framing/MessageFlowBody.h ./qpid/framing/SessionDetachBody.h ./qpid/framing/ClusterConnectionTxAcceptBody.h ./qpid/framing/ClusterRetractOfferBody.h ./qpid/framing/AllInvoker.h ./qpid/framing/ConnectionTuneOkBody.h ./qpid/framing/StreamReturnBody.h ./qpid/framing/all_method_bodies.h ./qpid/framing/AMQP_AllOperations.h ./qpid/framing/SessionFlushBody.h ./qpid/framing/ClusterTimerWakeupBody.h ./qpid/framing/FileReturnBody.h ./qpid/framing/MessageTransferBody.h ./qpid/framing/ExecutionSyncBody.h ./qpid/framing/ConnectionSecureOkBody.h ./qpid/framing/DtxPrepareBody.h ./qpid/framing/ExchangeQueryBody.h ./qpid/framing/ClusterShutdownBody.h ./qpid/framing/AMQP_ServerOperations.h ../include/qpid/framing/amqp_structs.h ./qpid/framing/SessionGapBody.h ./qpid/framing/ConnectionStartBody.h ./qpid/framing/MethodBodyDefaultVisitor.h ./qpid/framing/ClusterConnectionShadowPrepareBody.h ./qpid/framing/ClusterConnectionManagementSetupStateBody.h ./qpid/framing/MessageSetFlowModeBody.h ./qpid/framing/ExecutionResultBody.h ./qpid/framing/ClusterConnectionAddQueueListenerBody.h ./qpid/framing/ClusterConnectionRetractOfferBody.h ./qpid/framing/ClusterConnectionAccumulatedAckBody.h ./qpid/framing/DtxGetTimeoutBody.h ./qpid/framing/ExecutionExceptionBody.h ./qpid/framing/ClusterDeliverToQueueBody.h ./qpid/framing/FileConsumeBody.h ./qpid/framing/SessionCommandPointBody.h ./qpid/framing/ClusterConnectionQueueObserverStateBody.h ../include/qpid/framing/QueueQueryResult.h ./qpid/framing/TxRollbackBody.h ./qpid/framing/ClusterConfigChangeBody.h ./qpid/framing/ConnectionSecureBody.h ./qpid/framing/ConnectionHeartbeatBody.h ../include/qpid/framing/MessageAcquireResult.h ../include/qpid/framing/ExchangeQueryResult.h ./qpid/framing/MessageCancelBody.h ./qpid/framing/SessionExpectedBody.h ../include/qpid/framing/TypeCode.h ./qpid/framing/ClusterConnectionShadowSetUserBody.h ./qpid/framing/ConnectionOpenOkBody.h ./qpid/framing/MessageReleaseBody.h ./qpid/framing/ConnectionOpenBody.h ./qpid/framing/ClusterConnectionTxPublishBody.h ./qpid/framing/ClusterConnectionExchangeBody.h ./qpid/framing/ClusterConnectionConsumerStateBody.h ./qpid/framing/ClusterReadyBody.h ./qpid/framing/ClusterConnectionClockBody.h ./qpid/framing/ClusterConnectionDeliverDoOutputBody.h ./qpid/framing/MessageSubscribeBody.h ./qpid/framing/DtxRollbackBody.h) set(qpid_client_no_keyworddir ${includedir}/qpid/client/no_keyword) set(dist_qpid_client_no_keyword_HEADERS ../include/qpid/client/no_keyword/AsyncSession_0_10.h ../include/qpid/client/no_keyword/Session_0_10.h) set(qpid_clientdir ${includedir}/qpid/client) set(dist_qpid_client_HEADERS ../include/qpid/client/AsyncSession_0_10.h ../include/qpid/client/Session_0_10.h ../include/qpid/client/arg.h) set(qpid_brokerdir ${includedir}/qpid/broker) set(dist_qpid_broker_HEADERS ) qpidc-0.16/src/acl.mk0000664000076400007640000000246511540750270015023 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # acl library makefile fragment, to be included in Makefile.am # dmoduleexec_LTLIBRARIES += acl.la acl_la_SOURCES = \ qpid/acl/Acl.cpp \ qpid/acl/Acl.h \ qpid/acl/AclData.cpp \ qpid/acl/AclData.h \ qpid/acl/AclPlugin.cpp \ qpid/acl/AclReader.cpp \ qpid/acl/AclReader.h \ qpid/acl/AclValidator.cpp \ qpid/acl/AclValidator.h acl_la_LIBADD = libqpidbroker.la if SUNOS acl_la_LIBADD += libqmfagent.la libqmfconsole.la libqpidcommon.la -lboost_program_options $(SUNCC_RUNTIME_LIBS) endif acl_la_LDFLAGS = $(PLUGINLDFLAGS) qpidc-0.16/src/qmf/0000775000076400007640000000000011752725715014522 5ustar00jrossjross00000000000000qpidc-0.16/src/qmf/ConsoleEventImpl.h0000664000076400007640000000606411522733506020117 0ustar00jrossjross00000000000000#ifndef _QMF_CONSOLE_EVENT_IMPL_H_ #define _QMF_CONSOLE_EVENT_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/ConsoleEvent.h" #include "qmf/Agent.h" #include "qmf/Data.h" #include "qpid/types/Variant.h" #include namespace qmf { class ConsoleEventImpl : public virtual qpid::RefCounted { public: // // Impl-only methods // ConsoleEventImpl(ConsoleEventCode e, AgentDelReason r = AGENT_DEL_AGED) : eventType(e), delReason(r), correlator(0), final(false) {} void setCorrelator(uint32_t c) { correlator = c; } void setAgent(const Agent& a) { agent = a; } void addData(const Data& d) { dataList.push_back(Data(d)); } void addSchemaId(const SchemaId& s) { newSchemaIds.push_back(SchemaId(s)); } void setFinal() { final = true; } void setArguments(const qpid::types::Variant::Map& a) { arguments = a; } void setSeverity(int s) { severity = s; } void setTimestamp(uint64_t t) { timestamp = t; } // // Methods from API handle // ConsoleEventCode getType() const { return eventType; } uint32_t getCorrelator() const { return correlator; } Agent getAgent() const { return agent; } AgentDelReason getAgentDelReason() const { return delReason; } uint32_t getSchemaIdCount() const { return newSchemaIds.size(); } SchemaId getSchemaId(uint32_t) const; uint32_t getDataCount() const { return dataList.size(); } Data getData(uint32_t i) const; bool isFinal() const { return final; } const qpid::types::Variant::Map& getArguments() const { return arguments; } int getSeverity() const { return severity; } uint64_t getTimestamp() const { return timestamp; } private: const ConsoleEventCode eventType; const AgentDelReason delReason; uint32_t correlator; Agent agent; bool final; std::list dataList; std::list newSchemaIds; qpid::types::Variant::Map arguments; int severity; uint64_t timestamp; }; struct ConsoleEventImplAccess { static ConsoleEventImpl& get(ConsoleEvent&); static const ConsoleEventImpl& get(const ConsoleEvent&); }; } #endif qpidc-0.16/src/qmf/SchemaProperty.cpp0000664000076400007640000003254011446224071020164 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/SchemaPropertyImpl.h" #include "qmf/PrivateImplRef.h" #include "qmf/exceptions.h" #include "qmf/SchemaTypes.h" #include "qmf/SchemaProperty.h" #include "qmf/Hash.h" #include "qpid/messaging/AddressParser.h" #include #include using namespace std; using qpid::types::Variant; using namespace qmf; typedef PrivateImplRef PI; SchemaProperty::SchemaProperty(SchemaPropertyImpl* impl) { PI::ctor(*this, impl); } SchemaProperty::SchemaProperty(const SchemaProperty& s) : qmf::Handle() { PI::copy(*this, s); } SchemaProperty::~SchemaProperty() { PI::dtor(*this); } SchemaProperty& SchemaProperty::operator=(const SchemaProperty& s) { return PI::assign(*this, s); } SchemaProperty::SchemaProperty(const string& n, int t, const string& o) { PI::ctor(*this, new SchemaPropertyImpl(n, t, o)); } void SchemaProperty::setAccess(int a) { impl->setAccess(a); } void SchemaProperty::setIndex(bool i) { impl->setIndex(i); } void SchemaProperty::setOptional(bool o) { impl->setOptional(o); } void SchemaProperty::setUnit(const string& u) { impl->setUnit(u); } void SchemaProperty::setDesc(const string& d) { impl->setDesc(d); } void SchemaProperty::setSubtype(const string& s) { impl->setSubtype(s); } void SchemaProperty::setDirection(int d) { impl->setDirection(d); } const string& SchemaProperty::getName() const { return impl->getName(); } int SchemaProperty::getType() const { return impl->getType(); } int SchemaProperty::getAccess() const { return impl->getAccess(); } bool SchemaProperty::isIndex() const { return impl->isIndex(); } bool SchemaProperty::isOptional() const { return impl->isOptional(); } const string& SchemaProperty::getUnit() const { return impl->getUnit(); } const string& SchemaProperty::getDesc() const { return impl->getDesc(); } const string& SchemaProperty::getSubtype() const { return impl->getSubtype(); } int SchemaProperty::getDirection() const { return impl->getDirection(); } //======================================================================================== // Impl Method Bodies //======================================================================================== SchemaPropertyImpl::SchemaPropertyImpl(const string& n, int t, const string options) : name(n), dataType(t), access(ACCESS_READ_ONLY), index(false), optional(false), direction(DIR_IN) { if (!options.empty()) { qpid::messaging::AddressParser parser = qpid::messaging::AddressParser(options); Variant::Map optMap; Variant::Map::iterator iter; parser.parseMap(optMap); iter = optMap.find("access"); if (iter != optMap.end()) { const string& v(iter->second.asString()); if (v == "RC") access = ACCESS_READ_CREATE; else if (v == "RO") access = ACCESS_READ_ONLY; else if (v == "RW") access = ACCESS_READ_WRITE; else throw QmfException("Invalid value for 'access' option. Expected RC, RO, or RW"); optMap.erase(iter); } iter = optMap.find("index"); if (iter != optMap.end()) { index = iter->second.asBool(); optMap.erase(iter); } iter = optMap.find("optional"); if (iter != optMap.end()) { optional = iter->second.asBool(); optMap.erase(iter); } iter = optMap.find("unit"); if (iter != optMap.end()) { unit = iter->second.asString(); optMap.erase(iter); } iter = optMap.find("desc"); if (iter != optMap.end()) { desc = iter->second.asString(); optMap.erase(iter); } iter = optMap.find("subtype"); if (iter != optMap.end()) { subtype = iter->second.asString(); optMap.erase(iter); } iter = optMap.find("dir"); if (iter != optMap.end()) { const string& v(iter->second.asString()); if (v == "IN") direction = DIR_IN; else if (v == "OUT") direction = DIR_OUT; else if (v == "INOUT") direction = DIR_IN_OUT; else throw QmfException("Invalid value for 'dir' option. Expected IN, OUT, or INOUT"); optMap.erase(iter); } if (!optMap.empty()) throw QmfException("Unexpected option: " + optMap.begin()->first); } } SchemaPropertyImpl::SchemaPropertyImpl(const Variant::Map& map) : access(ACCESS_READ_ONLY), index(false), optional(false), direction(DIR_IN) { Variant::Map::const_iterator iter; iter = map.find("_name"); if (iter == map.end()) throw QmfException("SchemaProperty without a _name element"); name = iter->second.asString(); iter = map.find("_type"); if (iter == map.end()) throw QmfException("SchemaProperty without a _type element"); const string& ts(iter->second.asString()); if (ts == "TYPE_VOID") dataType = SCHEMA_DATA_VOID; else if (ts == "TYPE_BOOL") dataType = SCHEMA_DATA_BOOL; else if (ts == "TYPE_INT") dataType = SCHEMA_DATA_INT; else if (ts == "TYPE_FLOAT") dataType = SCHEMA_DATA_FLOAT; else if (ts == "TYPE_STRING") dataType = SCHEMA_DATA_STRING; else if (ts == "TYPE_MAP") dataType = SCHEMA_DATA_MAP; else if (ts == "TYPE_LIST") dataType = SCHEMA_DATA_LIST; else if (ts == "TYPE_UUID") dataType = SCHEMA_DATA_UUID; else throw QmfException("SchemaProperty with an invalid type code: " + ts); iter = map.find("_access"); if (iter != map.end()) { const string& as(iter->second.asString()); if (as == "RO") access = ACCESS_READ_ONLY; else if (as == "RC") access = ACCESS_READ_CREATE; else if (as == "RW") access = ACCESS_READ_WRITE; else throw QmfException("SchemaProperty with an invalid access code: " + as); } iter = map.find("_unit"); if (iter != map.end()) unit = iter->second.asString(); iter = map.find("_dir"); if (iter != map.end()) { const string& ds(iter->second.asString()); if (ds == "I") direction = DIR_IN; else if (ds == "O") direction = DIR_OUT; else if (ds == "IO") direction = DIR_IN_OUT; else throw QmfException("SchemaProperty with an invalid direction code: " + ds); } iter = map.find("_desc"); if (iter != map.end()) desc = iter->second.asString(); iter = map.find("_index"); if (iter != map.end()) index = iter->second.asBool(); iter = map.find("_subtype"); if (iter != map.end()) subtype = iter->second.asString(); } Variant::Map SchemaPropertyImpl::asMap() const { Variant::Map map; string ts; map["_name"] = name; switch (dataType) { case SCHEMA_DATA_VOID: ts = "TYPE_VOID"; break; case SCHEMA_DATA_BOOL: ts = "TYPE_BOOL"; break; case SCHEMA_DATA_INT: ts = "TYPE_INT"; break; case SCHEMA_DATA_FLOAT: ts = "TYPE_FLOAT"; break; case SCHEMA_DATA_STRING: ts = "TYPE_STRING"; break; case SCHEMA_DATA_MAP: ts = "TYPE_MAP"; break; case SCHEMA_DATA_LIST: ts = "TYPE_LIST"; break; case SCHEMA_DATA_UUID: ts = "TYPE_UUID"; break; } map["_type"] = ts; switch (access) { case ACCESS_READ_ONLY: ts = "RO"; break; case ACCESS_READ_CREATE: ts = "RC"; break; case ACCESS_READ_WRITE: ts = "RW"; break; } map["_access"] = ts; if (!unit.empty()) map["_unit"] = unit; switch (direction) { case DIR_IN: ts = "I"; break; case DIR_OUT: ts = "O"; break; case DIR_IN_OUT: ts = "IO"; break; } map["_dir"] = ts; if (!desc.empty()) map["_desc"] = desc; if (index) map["_index"] = true; if (!subtype.empty()) map["_subtype"] = subtype; return map; } SchemaPropertyImpl::SchemaPropertyImpl(qpid::management::Buffer& buffer) : access(ACCESS_READ_ONLY), index(false), optional(false), direction(DIR_IN) { Variant::Map::const_iterator iter; Variant::Map pmap; buffer.getMap(pmap); iter = pmap.find("name"); if (iter == pmap.end()) throw QmfException("Received V1 Schema property without a name"); name = iter->second.asString(); iter = pmap.find("type"); if (iter == pmap.end()) throw QmfException("Received V1 Schema property without a type"); fromV1TypeCode(iter->second.asInt8()); iter = pmap.find("unit"); if (iter != pmap.end()) unit = iter->second.asString(); iter = pmap.find("desc"); if (iter != pmap.end()) desc = iter->second.asString(); iter = pmap.find("access"); if (iter != pmap.end()) { int8_t val = iter->second.asInt8(); if (val < 1 || val > 3) throw QmfException("Received V1 Schema property with invalid 'access' code"); access = val; } iter = pmap.find("index"); if (iter != pmap.end()) index = iter->second.asInt64() != 0; iter = pmap.find("optional"); if (iter != pmap.end()) optional = iter->second.asInt64() != 0; iter = pmap.find("dir"); if (iter != pmap.end()) { string dirStr(iter->second.asString()); if (dirStr == "I") direction = DIR_IN; else if (dirStr == "O") direction = DIR_OUT; else if (dirStr == "IO") direction = DIR_IN_OUT; else throw QmfException("Received V1 Schema property with invalid 'dir' code"); } } void SchemaPropertyImpl::updateHash(Hash& hash) const { hash.update(name); hash.update((uint8_t) dataType); hash.update(subtype); hash.update((uint8_t) access); hash.update(index); hash.update(optional); hash.update(unit); hash.update(desc); hash.update((uint8_t) direction); } void SchemaPropertyImpl::encodeV1(qpid::management::Buffer& buffer, bool isArg, bool isMethodArg) const { Variant::Map pmap; pmap["name"] = name; pmap["type"] = v1TypeCode(); if (!unit.empty()) pmap["unit"] = unit; if (!desc.empty()) pmap["desc"] = desc; if (!isArg) { pmap["access"] = access; pmap["index"] = index ? 1 : 0; pmap["optional"] = optional ? 1 : 0; } else { if (isMethodArg) { string dirStr; switch (direction) { case DIR_IN : dirStr = "I"; break; case DIR_OUT : dirStr = "O"; break; case DIR_IN_OUT : dirStr = "IO"; break; } pmap["dir"] = dirStr; } } buffer.putMap(pmap); } uint8_t SchemaPropertyImpl::v1TypeCode() const { switch (dataType) { case SCHEMA_DATA_VOID: return 1; case SCHEMA_DATA_BOOL: return 11; case SCHEMA_DATA_INT: if (subtype == "timestamp") return 8; if (subtype == "duration") return 9; return 19; case SCHEMA_DATA_FLOAT: return 13; case SCHEMA_DATA_STRING: return 7; case SCHEMA_DATA_LIST: return 21; case SCHEMA_DATA_UUID: return 14; case SCHEMA_DATA_MAP: if (subtype == "reference") return 10; if (subtype == "data") return 20; return 15; } return 1; } void SchemaPropertyImpl::fromV1TypeCode(int8_t code) { switch (code) { case 1: // U8 case 2: // U16 case 3: // U32 case 4: // U64 dataType = SCHEMA_DATA_INT; break; case 6: // SSTR case 7: // LSTR dataType = SCHEMA_DATA_STRING; break; case 8: // ABSTIME dataType = SCHEMA_DATA_INT; subtype = "timestamp"; break; case 9: // DELTATIME dataType = SCHEMA_DATA_INT; subtype = "duration"; break; case 10: // REF dataType = SCHEMA_DATA_MAP; subtype = "reference"; break; case 11: // BOOL dataType = SCHEMA_DATA_BOOL; break; case 12: // FLOAT case 13: // DOUBLE dataType = SCHEMA_DATA_FLOAT; break; case 14: // UUID dataType = SCHEMA_DATA_UUID; break; case 15: // FTABLE dataType = SCHEMA_DATA_MAP; break; case 16: // S8 case 17: // S16 case 18: // S32 case 19: // S64 dataType = SCHEMA_DATA_INT; break; case 20: // OBJECT dataType = SCHEMA_DATA_MAP; subtype = "data"; break; case 21: // LIST case 22: // ARRAY dataType = SCHEMA_DATA_LIST; break; default: throw QmfException("Received V1 schema with an unknown data type"); } } SchemaPropertyImpl& SchemaPropertyImplAccess::get(SchemaProperty& item) { return *item.impl; } const SchemaPropertyImpl& SchemaPropertyImplAccess::get(const SchemaProperty& item) { return *item.impl; } qpidc-0.16/src/qmf/SchemaCache.cpp0000664000076400007640000000603111431072571017337 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/SchemaCache.h" #include "qmf/exceptions.h" using namespace std; using namespace qmf; bool SchemaCache::declareSchemaId(const SchemaId& id) { qpid::sys::Mutex::ScopedLock l(lock); SchemaMap::const_iterator iter = schemata.find(id); if (iter == schemata.end()) { schemata[id] = Schema(); return false; } return true; } void SchemaCache::declareSchema(const Schema& schema) { qpid::sys::Mutex::ScopedLock l(lock); SchemaMap::const_iterator iter = schemata.find(schema.getSchemaId()); if (iter == schemata.end() || !iter->second.isValid()) { schemata[schema.getSchemaId()] = schema; // // If there are any threads blocking in SchemaCache::getSchema waiting for // this schema, unblock them all now. // CondMap::iterator cIter = conditions.find(schema.getSchemaId()); if (cIter != conditions.end()) cIter->second->notifyAll(); } } bool SchemaCache::haveSchema(const SchemaId& id) const { qpid::sys::Mutex::ScopedLock l(lock); SchemaMap::const_iterator iter = schemata.find(id); return iter != schemata.end() && iter->second.isValid(); } const Schema& SchemaCache::getSchema(const SchemaId& id, qpid::messaging::Duration timeout) const { qpid::sys::Mutex::ScopedLock l(lock); SchemaMap::const_iterator iter = schemata.find(id); if (iter != schemata.end() && iter->second.isValid()) return iter->second; // // The desired schema is not in the cache. Assume that the caller knows this and has // sent a schema request to the remote agent and now wishes to wait until the schema // information arrives. // CondMap::iterator cIter = conditions.find(id); if (cIter == conditions.end()) conditions[id] = boost::shared_ptr(new qpid::sys::Condition()); uint64_t milliseconds = timeout.getMilliseconds(); conditions[id]->wait(lock, qpid::sys::AbsTime(qpid::sys::now(), qpid::sys::Duration(milliseconds * qpid::sys::TIME_MSEC))); iter = schemata.find(id); if (iter != schemata.end() && iter->second.isValid()) return iter->second; throw QmfException("Schema lookup timed out"); } qpidc-0.16/src/qmf/SchemaCache.h0000664000076400007640000000327311431072571017011 0ustar00jrossjross00000000000000#ifndef QMF_SCHEMA_CACHE_H #define QMF_SCHEMA_CACHE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/SchemaIdImpl.h" #include "qmf/Schema.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Condition.h" #include "qpid/messaging/Duration.h" #include #include #include namespace qmf { class SchemaCache { public: SchemaCache() {} ~SchemaCache() {} bool declareSchemaId(const SchemaId&); void declareSchema(const Schema&); bool haveSchema(const SchemaId&) const; const Schema& getSchema(const SchemaId&, qpid::messaging::Duration) const; private: mutable qpid::sys::Mutex lock; typedef std::map SchemaMap; typedef std::map, SchemaIdCompare> CondMap; SchemaMap schemata; mutable CondMap conditions; }; } #endif qpidc-0.16/src/qmf/DataAddr.cpp0000664000076400007640000000660511703313731016664 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/DataAddrImpl.h" #include "qmf/PrivateImplRef.h" #include "qmf/DataAddr.h" #include using namespace std; using namespace qmf; using qpid::types::Variant; typedef PrivateImplRef PI; DataAddr::DataAddr(DataAddrImpl* impl) { PI::ctor(*this, impl); } DataAddr::DataAddr(const DataAddr& s) : qmf::Handle() { PI::copy(*this, s); } DataAddr::~DataAddr() { PI::dtor(*this); } DataAddr& DataAddr::operator=(const DataAddr& s) { return PI::assign(*this, s); } bool DataAddr::operator==(const DataAddr& o) { return *impl == *o.impl; } bool DataAddr::operator==(const DataAddr& o) const { return *impl == *o.impl; } bool DataAddr::operator<(const DataAddr& o) { return *impl < *o.impl; } bool DataAddr::operator<(const DataAddr& o) const { return *impl < *o.impl; } DataAddr::DataAddr(const qpid::types::Variant::Map& m) { PI::ctor(*this, new DataAddrImpl(m)); } DataAddr::DataAddr(const string& n, const string& a, uint32_t e) { PI::ctor(*this, new DataAddrImpl(n, a, e)); } const string& DataAddr::getName() const { return impl->getName(); } const string& DataAddr::getAgentName() const { return impl->getAgentName(); } uint32_t DataAddr::getAgentEpoch() const { return impl->getAgentEpoch(); } Variant::Map DataAddr::asMap() const { return impl->asMap(); } bool DataAddrImpl::operator==(const DataAddrImpl& other) const { return agentName == other.agentName && name == other.name && agentEpoch == other.agentEpoch; } bool DataAddrImpl::operator<(const DataAddrImpl& other) const { if (agentName < other.agentName) return true; if (agentName > other.agentName) return false; if (name < other.name) return true; if (name > other.name) return false; return agentEpoch < other.agentEpoch; } DataAddrImpl::DataAddrImpl(const Variant::Map& map) : agentEpoch(0) { Variant::Map::const_iterator iter; iter = map.find("_agent_name"); if (iter != map.end()) agentName = iter->second.asString(); iter = map.find("_object_name"); if (iter != map.end()) name = iter->second.asString(); iter = map.find("_agent_epoch"); if (iter != map.end()) agentEpoch = (uint32_t) iter->second.asUint64(); } Variant::Map DataAddrImpl::asMap() const { Variant::Map result; result["_agent_name"] = agentName; result["_object_name"] = name; if (agentEpoch > 0) result["_agent_epoch"] = agentEpoch; return result; } DataAddrImpl& DataAddrImplAccess::get(DataAddr& item) { return *item.impl; } const DataAddrImpl& DataAddrImplAccess::get(const DataAddr& item) { return *item.impl; } qpidc-0.16/src/qmf/ConsoleEvent.cpp0000664000076400007640000000573211522733506017631 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/ConsoleEventImpl.h" #include "qmf/PrivateImplRef.h" #include "qmf/exceptions.h" using namespace std; using namespace qmf; using qpid::types::Variant; typedef PrivateImplRef PI; ConsoleEvent::ConsoleEvent(ConsoleEventImpl* impl) { PI::ctor(*this, impl); } ConsoleEvent::ConsoleEvent(const ConsoleEvent& s) : qmf::Handle() { PI::copy(*this, s); } ConsoleEvent::~ConsoleEvent() { PI::dtor(*this); } ConsoleEvent& ConsoleEvent::operator=(const ConsoleEvent& s) { return PI::assign(*this, s); } ConsoleEventCode ConsoleEvent::getType() const { return impl->getType(); } uint32_t ConsoleEvent::getCorrelator() const { return impl->getCorrelator(); } Agent ConsoleEvent::getAgent() const { return impl->getAgent(); } AgentDelReason ConsoleEvent::getAgentDelReason() const { return impl->getAgentDelReason(); } uint32_t ConsoleEvent::getSchemaIdCount() const { return impl->getSchemaIdCount(); } SchemaId ConsoleEvent::getSchemaId(uint32_t i) const { return impl->getSchemaId(i); } uint32_t ConsoleEvent::getDataCount() const { return impl->getDataCount(); } Data ConsoleEvent::getData(uint32_t i) const { return impl->getData(i); } bool ConsoleEvent::isFinal() const { return impl->isFinal(); } const Variant::Map& ConsoleEvent::getArguments() const { return impl->getArguments(); } int ConsoleEvent::getSeverity() const { return impl->getSeverity(); } uint64_t ConsoleEvent::getTimestamp() const { return impl->getTimestamp(); } SchemaId ConsoleEventImpl::getSchemaId(uint32_t i) const { uint32_t count = 0; for (list::const_iterator iter = newSchemaIds.begin(); iter != newSchemaIds.end(); iter++) { if (count++ == i) return *iter; } throw IndexOutOfRange(); } Data ConsoleEventImpl::getData(uint32_t i) const { uint32_t count = 0; for (list::const_iterator iter = dataList.begin(); iter != dataList.end(); iter++) { if (count++ == i) return *iter; } throw IndexOutOfRange(); } ConsoleEventImpl& ConsoleEventImplAccess::get(ConsoleEvent& item) { return *item.impl; } const ConsoleEventImpl& ConsoleEventImplAccess::get(const ConsoleEvent& item) { return *item.impl; } qpidc-0.16/src/qmf/Agent.cpp0000664000076400007640000005330111607032314016247 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/AgentImpl.h" #include "qmf/PrivateImplRef.h" #include "qmf/ConsoleEventImpl.h" #include "qmf/ConsoleSession.h" #include "qmf/DataImpl.h" #include "qmf/Query.h" #include "qmf/SchemaImpl.h" #include "qmf/agentCapability.h" #include "qmf/constants.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/AddressParser.h" #include "qpid/management/Buffer.h" #include "qpid/log/Statement.h" #include using qpid::types::Variant; using qpid::messaging::Duration; using qpid::messaging::Message; using qpid::messaging::Sender; using namespace std; using namespace qmf; typedef PrivateImplRef PI; Agent::Agent(AgentImpl* impl) { PI::ctor(*this, impl); } Agent::Agent(const Agent& s) : qmf::Handle() { PI::copy(*this, s); } Agent::~Agent() { PI::dtor(*this); } Agent& Agent::operator=(const Agent& s) { return PI::assign(*this, s); } string Agent::getName() const { return isValid() ? impl->getName() : ""; } uint32_t Agent::getEpoch() const { return isValid() ? impl->getEpoch() : 0; } string Agent::getVendor() const { return isValid() ? impl->getVendor() : ""; } string Agent::getProduct() const { return isValid() ? impl->getProduct() : ""; } string Agent::getInstance() const { return isValid() ? impl->getInstance() : ""; } const Variant& Agent::getAttribute(const string& k) const { return impl->getAttribute(k); } const Variant::Map& Agent::getAttributes() const { return impl->getAttributes(); } ConsoleEvent Agent::querySchema(Duration t) { return impl->querySchema(t); } uint32_t Agent::querySchemaAsync() { return impl->querySchemaAsync(); } ConsoleEvent Agent::query(const Query& q, Duration t) { return impl->query(q, t); } ConsoleEvent Agent::query(const string& q, Duration t) { return impl->query(q, t); } uint32_t Agent::queryAsync(const Query& q) { return impl->queryAsync(q); } uint32_t Agent::queryAsync(const string& q) { return impl->queryAsync(q); } ConsoleEvent Agent::callMethod(const string& m, const Variant::Map& a, const DataAddr& d, Duration t) { return impl->callMethod(m, a, d, t); } uint32_t Agent::callMethodAsync(const string& m, const Variant::Map& a, const DataAddr& d) { return impl->callMethodAsync(m, a, d); } uint32_t Agent::getPackageCount() const { return impl->getPackageCount(); } const string& Agent::getPackage(uint32_t i) const { return impl->getPackage(i); } uint32_t Agent::getSchemaIdCount(const string& p) const { return impl->getSchemaIdCount(p); } SchemaId Agent::getSchemaId(const string& p, uint32_t i) const { return impl->getSchemaId(p, i); } Schema Agent::getSchema(const SchemaId& s, Duration t) { return impl->getSchema(s, t); } AgentImpl::AgentImpl(const std::string& n, uint32_t e, ConsoleSessionImpl& s) : name(n), directSubject(n), epoch(e), session(s), touched(true), untouchedCount(0), capability(0), sender(session.directSender), schemaCache(s.schemaCache) { } void AgentImpl::setAttribute(const std::string& k, const qpid::types::Variant& v) { attributes[k] = v; if (k == "qmf.agent_capability") try { capability = v.asUint32(); } catch (std::exception&) {} if (k == "_direct_subject") try { directSubject = v.asString(); sender = session.topicSender; } catch (std::exception&) {} } const Variant& AgentImpl::getAttribute(const string& k) const { Variant::Map::const_iterator iter = attributes.find(k); if (iter == attributes.end()) throw KeyNotFound(k); return iter->second; } ConsoleEvent AgentImpl::query(const Query& query, Duration timeout) { boost::shared_ptr context(new SyncContext()); uint32_t correlator(session.correlator()); ConsoleEvent result; { qpid::sys::Mutex::ScopedLock l(lock); contextMap[correlator] = context; } try { sendQuery(query, correlator); { uint64_t milliseconds = timeout.getMilliseconds(); qpid::sys::Mutex::ScopedLock cl(context->lock); if (!context->response.isValid() || !context->response.isFinal()) context->cond.wait(context->lock, qpid::sys::AbsTime(qpid::sys::now(), qpid::sys::Duration(milliseconds * qpid::sys::TIME_MSEC))); if (context->response.isValid() && ((context->response.getType() == CONSOLE_QUERY_RESPONSE && context->response.isFinal()) || (context->response.getType() == CONSOLE_EXCEPTION))) result = context->response; else { auto_ptr impl(new ConsoleEventImpl(CONSOLE_EXCEPTION)); Data exception(new DataImpl()); exception.setProperty("error_text", "Timed out waiting for the agent to respond"); impl->addData(exception); result = ConsoleEvent(impl.release()); } } } catch (qpid::types::Exception&) { } { qpid::sys::Mutex::ScopedLock l(lock); contextMap.erase(correlator); } return result; } ConsoleEvent AgentImpl::query(const string& text, Duration timeout) { return query(stringToQuery(text), timeout); } uint32_t AgentImpl::queryAsync(const Query& query) { uint32_t correlator(session.correlator()); sendQuery(query, correlator); return correlator; } uint32_t AgentImpl::queryAsync(const string& text) { return queryAsync(stringToQuery(text)); } ConsoleEvent AgentImpl::callMethod(const string& method, const Variant::Map& args, const DataAddr& addr, Duration timeout) { boost::shared_ptr context(new SyncContext()); uint32_t correlator(session.correlator()); ConsoleEvent result; { qpid::sys::Mutex::ScopedLock l(lock); contextMap[correlator] = context; } try { sendMethod(method, args, addr, correlator); { uint64_t milliseconds = timeout.getMilliseconds(); qpid::sys::Mutex::ScopedLock cl(context->lock); if (!context->response.isValid()) context->cond.wait(context->lock, qpid::sys::AbsTime(qpid::sys::now(), qpid::sys::Duration(milliseconds * qpid::sys::TIME_MSEC))); if (context->response.isValid()) result = context->response; else { auto_ptr impl(new ConsoleEventImpl(CONSOLE_EXCEPTION)); Data exception(new DataImpl()); exception.setProperty("error_text", "Timed out waiting for the agent to respond"); impl->addData(exception); result = ConsoleEvent(impl.release()); } } } catch (qpid::types::Exception&) { } { qpid::sys::Mutex::ScopedLock l(lock); contextMap.erase(correlator); } return result; } uint32_t AgentImpl::callMethodAsync(const string& method, const Variant::Map& args, const DataAddr& addr) { uint32_t correlator(session.correlator()); sendMethod(method, args, addr, correlator); return correlator; } uint32_t AgentImpl::getPackageCount() const { qpid::sys::Mutex::ScopedLock l(lock); // // Populate the package set. // for (set::const_iterator iter = schemaIdSet.begin(); iter != schemaIdSet.end(); iter++) packageSet.insert(iter->getPackageName()); return packageSet.size(); } const string& AgentImpl::getPackage(uint32_t idx) const { qpid::sys::Mutex::ScopedLock l(lock); uint32_t count(0); for (set::const_iterator iter = packageSet.begin(); iter != packageSet.end(); iter++) { if (idx == count) return *iter; count++; } throw IndexOutOfRange(); } uint32_t AgentImpl::getSchemaIdCount(const string& pname) const { qpid::sys::Mutex::ScopedLock l(lock); uint32_t count(0); for (set::const_iterator iter = schemaIdSet.begin(); iter != schemaIdSet.end(); iter++) if (iter->getPackageName() == pname) count++; return count; } SchemaId AgentImpl::getSchemaId(const string& pname, uint32_t idx) const { qpid::sys::Mutex::ScopedLock l(lock); uint32_t count(0); for (set::const_iterator iter = schemaIdSet.begin(); iter != schemaIdSet.end(); iter++) { if (iter->getPackageName() == pname) { if (idx == count) return *iter; count++; } } throw IndexOutOfRange(); } Schema AgentImpl::getSchema(const SchemaId& id, Duration timeout) { if (!schemaCache->haveSchema(id)) // // The desired schema is not in the cache. We need to asynchronously query the remote // agent for the information. The call to schemaCache->getSchema will block waiting for // the response to be received. // sendSchemaRequest(id); return schemaCache->getSchema(id, timeout); } void AgentImpl::handleException(const Variant::Map& content, const Message& msg) { const string& cid(msg.getCorrelationId()); Variant::Map::const_iterator aIter; uint32_t correlator; boost::shared_ptr context; try { correlator = boost::lexical_cast(cid); } catch(const boost::bad_lexical_cast&) { correlator = 0; } { qpid::sys::Mutex::ScopedLock l(lock); map >::iterator iter = contextMap.find(correlator); if (iter != contextMap.end()) context = iter->second; } if (context.get() != 0) { // // This exception is associated with a synchronous request. // qpid::sys::Mutex::ScopedLock cl(context->lock); context->response = ConsoleEvent(new ConsoleEventImpl(CONSOLE_EXCEPTION)); ConsoleEventImplAccess::get(context->response).addData(new DataImpl(content, this)); ConsoleEventImplAccess::get(context->response).setAgent(this); context->cond.notify(); } else { // // This exception is associated with an asynchronous request. // auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_EXCEPTION)); eventImpl->setCorrelator(correlator); eventImpl->setAgent(this); eventImpl->addData(new DataImpl(content, this)); session.enqueueEvent(eventImpl.release()); } } void AgentImpl::handleMethodResponse(const Variant::Map& response, const Message& msg) { const string& cid(msg.getCorrelationId()); Variant::Map::const_iterator aIter; Variant::Map argMap; uint32_t correlator; boost::shared_ptr context; QPID_LOG(trace, "RCVD MethodResponse cid=" << cid << " map=" << response); aIter = response.find("_arguments"); if (aIter != response.end()) argMap = aIter->second.asMap(); try { correlator = boost::lexical_cast(cid); } catch(const boost::bad_lexical_cast&) { correlator = 0; } { qpid::sys::Mutex::ScopedLock l(lock); map >::iterator iter = contextMap.find(correlator); if (iter != contextMap.end()) context = iter->second; } if (context.get() != 0) { // // This response is associated with a synchronous request. // qpid::sys::Mutex::ScopedLock cl(context->lock); context->response = ConsoleEvent(new ConsoleEventImpl(CONSOLE_METHOD_RESPONSE)); ConsoleEventImplAccess::get(context->response).setArguments(argMap); ConsoleEventImplAccess::get(context->response).setAgent(this); context->cond.notify(); } else { // // This response is associated with an asynchronous request. // auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_METHOD_RESPONSE)); eventImpl->setCorrelator(correlator); eventImpl->setAgent(this); eventImpl->setArguments(argMap); session.enqueueEvent(eventImpl.release()); } } void AgentImpl::handleDataIndication(const Variant::List& list, const Message& msg) { Variant::Map::const_iterator aIter; const Variant::Map& props(msg.getProperties()); boost::shared_ptr context; aIter = props.find("qmf.content"); if (aIter == props.end()) return; string content_type(aIter->second.asString()); if (content_type != "_event") return; for (Variant::List::const_iterator lIter = list.begin(); lIter != list.end(); lIter++) { const Variant::Map& eventMap(lIter->asMap()); Data data(new DataImpl(eventMap, this)); int severity(SEV_NOTICE); uint64_t timestamp(0); aIter = eventMap.find("_severity"); if (aIter != eventMap.end()) severity = int(aIter->second.asInt8()); aIter = eventMap.find("_timestamp"); if (aIter != eventMap.end()) timestamp = aIter->second.asUint64(); auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_EVENT)); eventImpl->setAgent(this); eventImpl->addData(data); eventImpl->setSeverity(severity); eventImpl->setTimestamp(timestamp); if (data.hasSchema()) learnSchemaId(data.getSchemaId()); session.enqueueEvent(eventImpl.release()); } } void AgentImpl::handleQueryResponse(const Variant::List& list, const Message& msg) { const string& cid(msg.getCorrelationId()); Variant::Map::const_iterator aIter; const Variant::Map& props(msg.getProperties()); uint32_t correlator; bool final(false); boost::shared_ptr context; aIter = props.find("partial"); if (aIter == props.end()) final = true; aIter = props.find("qmf.content"); if (aIter == props.end()) return; string content_type(aIter->second.asString()); if (content_type != "_schema" && content_type != "_schema_id" && content_type != "_data") return; try { correlator = boost::lexical_cast(cid); } catch(const boost::bad_lexical_cast&) { correlator = 0; } { qpid::sys::Mutex::ScopedLock l(lock); map >::iterator iter = contextMap.find(correlator); if (iter != contextMap.end()) context = iter->second; } if (context.get() != 0) { // // This response is associated with a synchronous request. // qpid::sys::Mutex::ScopedLock cl(context->lock); if (!context->response.isValid()) context->response = ConsoleEvent(new ConsoleEventImpl(CONSOLE_QUERY_RESPONSE)); if (content_type == "_data") for (Variant::List::const_iterator lIter = list.begin(); lIter != list.end(); lIter++) { Data data(new DataImpl(lIter->asMap(), this)); ConsoleEventImplAccess::get(context->response).addData(data); if (data.hasSchema()) learnSchemaId(data.getSchemaId()); } else if (content_type == "_schema_id") for (Variant::List::const_iterator lIter = list.begin(); lIter != list.end(); lIter++) { SchemaId schemaId(new SchemaIdImpl(lIter->asMap())); ConsoleEventImplAccess::get(context->response).addSchemaId(schemaId); learnSchemaId(schemaId); } else if (content_type == "_schema") for (Variant::List::const_iterator lIter = list.begin(); lIter != list.end(); lIter++) { Schema schema(new SchemaImpl(lIter->asMap())); schemaCache->declareSchema(schema); } if (final) { ConsoleEventImplAccess::get(context->response).setFinal(); ConsoleEventImplAccess::get(context->response).setAgent(this); context->cond.notify(); } } else { // // This response is associated with an asynchronous request. // auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_QUERY_RESPONSE)); eventImpl->setCorrelator(correlator); eventImpl->setAgent(this); if (content_type == "_data") for (Variant::List::const_iterator lIter = list.begin(); lIter != list.end(); lIter++) { Data data(new DataImpl(lIter->asMap(), this)); eventImpl->addData(data); if (data.hasSchema()) learnSchemaId(data.getSchemaId()); } else if (content_type == "_schema_id") for (Variant::List::const_iterator lIter = list.begin(); lIter != list.end(); lIter++) { SchemaId schemaId(new SchemaIdImpl(lIter->asMap())); eventImpl->addSchemaId(schemaId); learnSchemaId(schemaId); } else if (content_type == "_schema") for (Variant::List::const_iterator lIter = list.begin(); lIter != list.end(); lIter++) { Schema schema(new SchemaImpl(lIter->asMap())); schemaCache->declareSchema(schema); } if (final) eventImpl->setFinal(); if (content_type != "_schema") session.enqueueEvent(eventImpl.release()); } } Query AgentImpl::stringToQuery(const std::string& text) { qpid::messaging::AddressParser parser(text); Variant::Map map; Variant::Map::const_iterator iter; string className; string packageName; parser.parseMap(map); iter = map.find("class"); if (iter != map.end()) className = iter->second.asString(); iter = map.find("package"); if (iter != map.end()) packageName = iter->second.asString(); Query query(QUERY_OBJECT, className, packageName); iter = map.find("where"); if (iter != map.end()) query.setPredicate(iter->second.asList()); return query; } void AgentImpl::sendQuery(const Query& query, uint32_t correlator) { Message msg; Variant::Map map; Variant::Map& headers(msg.getProperties()); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_REQUEST; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_QUERY_REQUEST; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; msg.setReplyTo(session.replyAddress); msg.setCorrelationId(boost::lexical_cast(correlator)); msg.setSubject(directSubject); string userId(session.connection.getAuthenticatedUsername()); if (!userId.empty()) msg.setUserId(userId); encode(QueryImplAccess::get(query).asMap(), msg); if (sender.isValid()) { sender.send(msg); QPID_LOG(trace, "SENT QueryRequest to=" << sender.getName() << "/" << directSubject << " cid=" << correlator); } } void AgentImpl::sendMethod(const string& method, const Variant::Map& args, const DataAddr& addr, uint32_t correlator) { Message msg; Variant::Map map; Variant::Map& headers(msg.getProperties()); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_REQUEST; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_METHOD_REQUEST; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; map["_method_name"] = method; map["_object_id"] = addr.asMap(); map["_arguments"] = args; msg.setReplyTo(session.replyAddress); msg.setCorrelationId(boost::lexical_cast(correlator)); msg.setSubject(directSubject); string userId(session.connection.getAuthenticatedUsername()); if (!userId.empty()) msg.setUserId(userId); encode(map, msg); if (sender.isValid()) { sender.send(msg); QPID_LOG(trace, "SENT MethodRequest method=" << method << " to=" << sender.getName() << "/" << directSubject << " content=" << map << " cid=" << correlator); } } void AgentImpl::sendSchemaRequest(const SchemaId& id) { uint32_t correlator(session.correlator()); if (capability >= AGENT_CAPABILITY_V2_SCHEMA) { Query query(QUERY_SCHEMA, id); sendQuery(query, correlator); return; } #define RAW_BUFFER_SIZE 1024 char rawBuffer[RAW_BUFFER_SIZE]; qpid::management::Buffer buffer(rawBuffer, RAW_BUFFER_SIZE); buffer.putOctet('A'); buffer.putOctet('M'); buffer.putOctet('2'); buffer.putOctet('S'); buffer.putLong(correlator); buffer.putShortString(id.getPackageName()); buffer.putShortString(id.getName()); buffer.putBin128(id.getHash().data()); string content(rawBuffer, buffer.getPosition()); Message msg; msg.setReplyTo(session.replyAddress); msg.setContent(content); msg.setSubject(directSubject); string userId(session.connection.getAuthenticatedUsername()); if (!userId.empty()) msg.setUserId(userId); if (sender.isValid()) { sender.send(msg); QPID_LOG(trace, "SENT V1SchemaRequest to=" << sender.getName() << "/" << directSubject); } } void AgentImpl::learnSchemaId(const SchemaId& id) { schemaCache->declareSchemaId(id); schemaIdSet.insert(id); } AgentImpl& AgentImplAccess::get(Agent& item) { return *item.impl; } const AgentImpl& AgentImplAccess::get(const Agent& item) { return *item.impl; } qpidc-0.16/src/qmf/constants.cpp0000664000076400007640000000725511512611130017226 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "constants.h" using namespace std; using namespace qmf; /** * Header key strings */ const string protocol::HEADER_KEY_APP_ID = "x-amqp-0-10.app-id"; const string protocol::HEADER_KEY_METHOD = "method"; const string protocol::HEADER_KEY_OPCODE = "qmf.opcode"; const string protocol::HEADER_KEY_AGENT = "qmf.agent"; const string protocol::HEADER_KEY_CONTENT = "qmf.content"; const string protocol::HEADER_KEY_PARTIAL = "partial"; /** * Header values per-key */ const string protocol::HEADER_APP_ID_QMF = "qmf2"; const string protocol::HEADER_METHOD_REQUEST = "request"; const string protocol::HEADER_METHOD_RESPONSE = "response"; const string protocol::HEADER_METHOD_INDICATION = "indication"; const string protocol::HEADER_OPCODE_EXCEPTION = "_exception"; const string protocol::HEADER_OPCODE_AGENT_LOCATE_REQUEST = "_agent_locate_request"; const string protocol::HEADER_OPCODE_AGENT_LOCATE_RESPONSE = "_agent_locate_response"; const string protocol::HEADER_OPCODE_AGENT_HEARTBEAT_INDICATION = "_agent_heartbeat_indication"; const string protocol::HEADER_OPCODE_QUERY_REQUEST = "_query_request"; const string protocol::HEADER_OPCODE_QUERY_RESPONSE = "_query_response"; const string protocol::HEADER_OPCODE_SUBSCRIBE_REQUEST = "_subscribe_request"; const string protocol::HEADER_OPCODE_SUBSCRIBE_RESPONSE = "_subscribe_response"; const string protocol::HEADER_OPCODE_SUBSCRIBE_CANCEL_INDICATION = "_subscribe_cancel_indication"; const string protocol::HEADER_OPCODE_SUBSCRIBE_REFRESH_INDICATION = "_subscribe_refresh_indication"; const string protocol::HEADER_OPCODE_DATA_INDICATION = "_data_indication"; const string protocol::HEADER_OPCODE_METHOD_REQUEST = "_method_request"; const string protocol::HEADER_OPCODE_METHOD_RESPONSE = "_method_response"; const string protocol::HEADER_CONTENT_SCHEMA_ID = "_schema_id"; const string protocol::HEADER_CONTENT_SCHEMA_CLASS = "_schema_class"; const string protocol::HEADER_CONTENT_OBJECT_ID = "_object_id"; const string protocol::HEADER_CONTENT_DATA = "_data"; const string protocol::HEADER_CONTENT_EVENT = "_event"; const string protocol::HEADER_CONTENT_QUERY = "_query"; /** * Keywords for Agent attributes */ const string protocol::AGENT_ATTR_VENDOR = "_vendor"; const string protocol::AGENT_ATTR_PRODUCT = "_product"; const string protocol::AGENT_ATTR_INSTANCE = "_instance"; const string protocol::AGENT_ATTR_NAME = "_name"; const string protocol::AGENT_ATTR_TIMESTAMP = "_timestamp"; const string protocol::AGENT_ATTR_HEARTBEAT_INTERVAL = "_heartbeat_interval"; const string protocol::AGENT_ATTR_EPOCH = "_epoch"; const string protocol::AGENT_ATTR_SCHEMA_UPDATED_TIMESTAMP = "_schema_updated"; qpidc-0.16/src/qmf/agentCapability.h0000664000076400007640000000235311446224071017763 0ustar00jrossjross00000000000000#ifndef QMF_AGENT_CAPABILITY_H #define QMF_AGENT_CAPABILITY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qmf { /** * Legacy (Qpid 0.7 C++ Agent, 0.7 Broker Agent) capabilities */ const uint32_t AGENT_CAPABILITY_LEGACY = 0; /** * Qpid 0.8 QMFv2 capabilities */ const uint32_t AGENT_CAPABILITY_0_8 = 1; const uint32_t AGENT_CAPABILITY_V2_SCHEMA = 1; const uint32_t AGENT_CAPABILITY_AGENT_PREDICATE = 1; } #endif qpidc-0.16/src/qmf/AgentSubscription.h0000664000076400007640000000316011512611130020311 0ustar00jrossjross00000000000000#ifndef _QMF_AGENT_SUBSCRIPTION_H_ #define _QMF_AGENT_SUBSCRIPTION_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include "qpid/types/Variant.h" #include "qmf/Query.h" #include "qmf/Data.h" #include namespace qmf { class AgentSubscription { public: AgentSubscription(uint64_t _id, uint64_t _interval, uint64_t _life, const std::string& _replyTo, const std::string& _cid, Query _query); ~AgentSubscription(); bool tick(uint64_t seconds); void keepalive() { timeSinceKeepalive = 0; } private: uint64_t id; uint64_t interval; uint64_t lifetime; uint64_t timeSincePublish; uint64_t timeSinceKeepalive; const std::string replyTo; const std::string cid; Query query; }; } #endif qpidc-0.16/src/qmf/AgentImpl.h0000664000076400007640000001202411607032314016533 0ustar00jrossjross00000000000000#ifndef _QMF_AGENT_IMPL_H_ #define _QMF_AGENT_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/Agent.h" #include "qmf/ConsoleEventImpl.h" #include "qmf/ConsoleSessionImpl.h" #include "qmf/QueryImpl.h" #include "qmf/SchemaCache.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/Sender.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Condition.h" #include #include #include namespace qmf { class AgentImpl : public virtual qpid::RefCounted { public: // // Impl-only methods // AgentImpl(const std::string& n, uint32_t e, ConsoleSessionImpl& s); void setAttribute(const std::string& k, const qpid::types::Variant& v); void setAttribute(const std::string& k, const std::string& v) { attributes[k] = v; } void touch() { touched = true; } uint32_t age() { untouchedCount = touched ? 0 : untouchedCount + 1; touched = false; return untouchedCount; } uint32_t getCapability() const { return capability; } void handleException(const qpid::types::Variant::Map&, const qpid::messaging::Message&); void handleMethodResponse(const qpid::types::Variant::Map&, const qpid::messaging::Message&); void handleDataIndication(const qpid::types::Variant::List&, const qpid::messaging::Message&); void handleQueryResponse(const qpid::types::Variant::List&, const qpid::messaging::Message&); // // Methods from API handle // const std::string& getName() const { return name; } uint32_t getEpoch() const { return epoch; } void setEpoch(uint32_t e) { epoch = e; } std::string getVendor() const { return getAttribute("_vendor").asString(); } std::string getProduct() const { return getAttribute("_product").asString(); } std::string getInstance() const { return getAttribute("_instance").asString(); } const qpid::types::Variant& getAttribute(const std::string& k) const; const qpid::types::Variant::Map& getAttributes() const { return attributes; } ConsoleEvent querySchema(qpid::messaging::Duration t) { return query(Query(QUERY_SCHEMA_ID), t); } uint32_t querySchemaAsync() { return queryAsync(Query(QUERY_SCHEMA_ID)); } ConsoleEvent query(const Query& q, qpid::messaging::Duration t); ConsoleEvent query(const std::string& q, qpid::messaging::Duration t); uint32_t queryAsync(const Query& q); uint32_t queryAsync(const std::string& q); ConsoleEvent callMethod(const std::string& m, const qpid::types::Variant::Map& a, const DataAddr&, qpid::messaging::Duration t); uint32_t callMethodAsync(const std::string& m, const qpid::types::Variant::Map& a, const DataAddr&); uint32_t getPackageCount() const; const std::string& getPackage(uint32_t i) const; uint32_t getSchemaIdCount(const std::string& p) const; SchemaId getSchemaId(const std::string& p, uint32_t i) const; Schema getSchema(const SchemaId& s, qpid::messaging::Duration t); private: struct SyncContext { qpid::sys::Mutex lock; qpid::sys::Condition cond; ConsoleEvent response; }; mutable qpid::sys::Mutex lock; std::string name; std::string directSubject; uint32_t epoch; ConsoleSessionImpl& session; bool touched; uint32_t untouchedCount; uint32_t capability; qpid::messaging::Sender sender; qpid::types::Variant::Map attributes; std::map > contextMap; boost::shared_ptr schemaCache; mutable std::set packageSet; std::set schemaIdSet; Query stringToQuery(const std::string&); void sendQuery(const Query&, uint32_t); void sendSchemaIdQuery(uint32_t); void sendMethod(const std::string&, const qpid::types::Variant::Map&, const DataAddr&, uint32_t); void sendSchemaRequest(const SchemaId&); void learnSchemaId(const SchemaId&); }; struct AgentImplAccess { static AgentImpl& get(Agent&); static const AgentImpl& get(const Agent&); }; } #endif qpidc-0.16/src/qmf/engine/0000775000076400007640000000000011752725715015767 5ustar00jrossjross00000000000000qpidc-0.16/src/qmf/engine/ConsoleImpl.cpp0000664000076400007640000003561711375542547020734 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/ConsoleImpl.h" #include "qmf/engine/MessageImpl.h" #include "qmf/engine/SchemaImpl.h" #include "qmf/engine/Typecode.h" #include "qmf/engine/ObjectImpl.h" #include "qmf/engine/ObjectIdImpl.h" #include "qmf/engine/QueryImpl.h" #include "qmf/engine/ValueImpl.h" #include "qmf/engine/Protocol.h" #include "qmf/engine/SequenceManager.h" #include "qmf/engine/BrokerProxyImpl.h" #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace qmf::engine; using namespace qpid::framing; using namespace qpid::sys; namespace { const char* QMF_EXCHANGE = "qpid.management"; } #define STRING_REF(s) {if (!s.empty()) item.s = const_cast(s.c_str());} ConsoleEvent ConsoleEventImpl::copy() { ConsoleEvent item; ::memset(&item, 0, sizeof(ConsoleEvent)); item.kind = kind; item.agent = agent.get(); item.classKey = classKey; item.object = object.get(); item.context = context; item.event = event.get(); item.timestamp = timestamp; item.hasProps = hasProps; item.hasStats = hasStats; STRING_REF(name); return item; } ConsoleImpl::ConsoleImpl(const ConsoleSettings& s) : settings(s) { bindingList.push_back(pair(string(), "schema.#")); if (settings.rcvObjects && settings.rcvEvents && settings.rcvHeartbeats && !settings.userBindings) { bindingList.push_back(pair(string(), "console.#")); } else { if (settings.rcvObjects && !settings.userBindings) bindingList.push_back(pair(string(), "console.obj.#")); else bindingList.push_back(pair(string(), "console.obj.*.*.org.apache.qpid.broker.agent")); if (settings.rcvEvents) bindingList.push_back(pair(string(), "console.event.#")); if (settings.rcvHeartbeats) bindingList.push_back(pair(string(), "console.heartbeat.#")); } } ConsoleImpl::~ConsoleImpl() { // This function intentionally left blank. } bool ConsoleImpl::getEvent(ConsoleEvent& event) const { Mutex::ScopedLock _lock(lock); if (eventQueue.empty()) return false; event = eventQueue.front()->copy(); return true; } void ConsoleImpl::popEvent() { Mutex::ScopedLock _lock(lock); if (!eventQueue.empty()) eventQueue.pop_front(); } void ConsoleImpl::addConnection(BrokerProxy& broker, void* /*context*/) { Mutex::ScopedLock _lock(lock); brokerList.push_back(broker.impl); } void ConsoleImpl::delConnection(BrokerProxy& broker) { Mutex::ScopedLock _lock(lock); for (vector::iterator iter = brokerList.begin(); iter != brokerList.end(); iter++) if (*iter == broker.impl) { brokerList.erase(iter); break; } } uint32_t ConsoleImpl::packageCount() const { Mutex::ScopedLock _lock(lock); return packages.size(); } const string& ConsoleImpl::getPackageName(uint32_t idx) const { const static string empty; Mutex::ScopedLock _lock(lock); if (idx >= packages.size()) return empty; PackageList::const_iterator iter = packages.begin(); for (uint32_t i = 0; i < idx; i++) iter++; return iter->first; } uint32_t ConsoleImpl::classCount(const char* packageName) const { Mutex::ScopedLock _lock(lock); PackageList::const_iterator pIter = packages.find(packageName); if (pIter == packages.end()) return 0; const ObjectClassList& oList = pIter->second.first; const EventClassList& eList = pIter->second.second; return oList.size() + eList.size(); } const SchemaClassKey* ConsoleImpl::getClass(const char* packageName, uint32_t idx) const { Mutex::ScopedLock _lock(lock); PackageList::const_iterator pIter = packages.find(packageName); if (pIter == packages.end()) return 0; const ObjectClassList& oList = pIter->second.first; const EventClassList& eList = pIter->second.second; uint32_t count = 0; for (ObjectClassList::const_iterator oIter = oList.begin(); oIter != oList.end(); oIter++) { if (count == idx) return oIter->second->getClassKey(); count++; } for (EventClassList::const_iterator eIter = eList.begin(); eIter != eList.end(); eIter++) { if (count == idx) return eIter->second->getClassKey(); count++; } return 0; } ClassKind ConsoleImpl::getClassKind(const SchemaClassKey* key) const { Mutex::ScopedLock _lock(lock); PackageList::const_iterator pIter = packages.find(key->getPackageName()); if (pIter == packages.end()) return CLASS_OBJECT; const EventClassList& eList = pIter->second.second; if (eList.find(key) != eList.end()) return CLASS_EVENT; return CLASS_OBJECT; } const SchemaObjectClass* ConsoleImpl::getObjectClass(const SchemaClassKey* key) const { Mutex::ScopedLock _lock(lock); PackageList::const_iterator pIter = packages.find(key->getPackageName()); if (pIter == packages.end()) return 0; const ObjectClassList& oList = pIter->second.first; ObjectClassList::const_iterator iter = oList.find(key); if (iter == oList.end()) return 0; return iter->second; } const SchemaEventClass* ConsoleImpl::getEventClass(const SchemaClassKey* key) const { Mutex::ScopedLock _lock(lock); PackageList::const_iterator pIter = packages.find(key->getPackageName()); if (pIter == packages.end()) return 0; const EventClassList& eList = pIter->second.second; EventClassList::const_iterator iter = eList.find(key); if (iter == eList.end()) return 0; return iter->second; } void ConsoleImpl::bindPackage(const char* packageName) { stringstream key; key << "console.obj.*.*." << packageName << ".#"; Mutex::ScopedLock _lock(lock); bindingList.push_back(pair(string(), key.str())); for (vector::iterator iter = brokerList.begin(); iter != brokerList.end(); iter++) (*iter)->addBinding(QMF_EXCHANGE, key.str()); } void ConsoleImpl::bindClass(const SchemaClassKey* classKey) { stringstream key; key << "console.obj.*.*." << classKey->getPackageName() << "." << classKey->getClassName() << ".#"; Mutex::ScopedLock _lock(lock); bindingList.push_back(pair(string(), key.str())); for (vector::iterator iter = brokerList.begin(); iter != brokerList.end(); iter++) (*iter)->addBinding(QMF_EXCHANGE, key.str()); } void ConsoleImpl::bindClass(const char* packageName, const char* className) { stringstream key; key << "console.obj.*.*." << packageName << "." << className << ".#"; Mutex::ScopedLock _lock(lock); bindingList.push_back(pair(string(), key.str())); for (vector::iterator iter = brokerList.begin(); iter != brokerList.end(); iter++) (*iter)->addBinding(QMF_EXCHANGE, key.str()); } void ConsoleImpl::bindEvent(const SchemaClassKey* classKey) { bindEvent(classKey->getPackageName(), classKey->getClassName()); } void ConsoleImpl::bindEvent(const char* packageName, const char* eventName) { if (!settings.userBindings) throw qpid::Exception("Console not configured for userBindings."); if (settings.rcvEvents) throw qpid::Exception("Console already configured to receive all events."); stringstream key; key << "console.event.*.*." << packageName; if (eventName && *eventName) { key << "." << eventName << ".#"; } else { key << ".#"; } Mutex::ScopedLock _lock(lock); bindingList.push_back(pair(string(), key.str())); for (vector::iterator iter = brokerList.begin(); iter != brokerList.end(); iter++) (*iter)->addBinding(QMF_EXCHANGE, key.str()); } /* void ConsoleImpl::startSync(const Query& query, void* context, SyncQuery& sync) { } void ConsoleImpl::touchSync(SyncQuery& sync) { } void ConsoleImpl::endSync(SyncQuery& sync) { } */ void ConsoleImpl::learnPackage(const string& packageName) { Mutex::ScopedLock _lock(lock); if (packages.find(packageName) == packages.end()) { packages.insert(pair > (packageName, pair(ObjectClassList(), EventClassList()))); eventNewPackage(packageName); } } void ConsoleImpl::learnClass(SchemaObjectClass* cls) { Mutex::ScopedLock _lock(lock); const SchemaClassKey* key = cls->getClassKey(); PackageList::iterator pIter = packages.find(key->getPackageName()); if (pIter == packages.end()) return; ObjectClassList& list = pIter->second.first; if (list.find(key) == list.end()) { list[key] = cls; eventNewClass(key); } } void ConsoleImpl::learnClass(SchemaEventClass* cls) { Mutex::ScopedLock _lock(lock); const SchemaClassKey* key = cls->getClassKey(); PackageList::iterator pIter = packages.find(key->getPackageName()); if (pIter == packages.end()) return; EventClassList& list = pIter->second.second; if (list.find(key) == list.end()) { list[key] = cls; eventNewClass(key); } } bool ConsoleImpl::haveClass(const SchemaClassKey* key) const { Mutex::ScopedLock _lock(lock); PackageList::const_iterator pIter = packages.find(key->getPackageName()); if (pIter == packages.end()) return false; const ObjectClassList& oList = pIter->second.first; const EventClassList& eList = pIter->second.second; return oList.find(key) != oList.end() || eList.find(key) != eList.end(); } SchemaObjectClass* ConsoleImpl::getSchema(const SchemaClassKey* key) const { Mutex::ScopedLock _lock(lock); PackageList::const_iterator pIter = packages.find(key->getPackageName()); if (pIter == packages.end()) return 0; const ObjectClassList& oList = pIter->second.first; ObjectClassList::const_iterator iter = oList.find(key); if (iter == oList.end()) return 0; return iter->second; } void ConsoleImpl::eventAgentAdded(boost::shared_ptr agent) { ConsoleEventImpl::Ptr event(new ConsoleEventImpl(ConsoleEvent::AGENT_ADDED)); event->agent = agent; Mutex::ScopedLock _lock(lock); eventQueue.push_back(event); } void ConsoleImpl::eventAgentDeleted(boost::shared_ptr agent) { ConsoleEventImpl::Ptr event(new ConsoleEventImpl(ConsoleEvent::AGENT_DELETED)); event->agent = agent; Mutex::ScopedLock _lock(lock); eventQueue.push_back(event); } void ConsoleImpl::eventNewPackage(const string& packageName) { ConsoleEventImpl::Ptr event(new ConsoleEventImpl(ConsoleEvent::NEW_PACKAGE)); event->name = packageName; Mutex::ScopedLock _lock(lock); eventQueue.push_back(event); } void ConsoleImpl::eventNewClass(const SchemaClassKey* key) { ConsoleEventImpl::Ptr event(new ConsoleEventImpl(ConsoleEvent::NEW_CLASS)); event->classKey = key; Mutex::ScopedLock _lock(lock); eventQueue.push_back(event); } void ConsoleImpl::eventObjectUpdate(ObjectPtr object, bool prop, bool stat) { ConsoleEventImpl::Ptr event(new ConsoleEventImpl(ConsoleEvent::OBJECT_UPDATE)); event->object = object; event->hasProps = prop; event->hasStats = stat; Mutex::ScopedLock _lock(lock); eventQueue.push_back(event); } void ConsoleImpl::eventAgentHeartbeat(boost::shared_ptr agent, uint64_t timestamp) { ConsoleEventImpl::Ptr event(new ConsoleEventImpl(ConsoleEvent::AGENT_HEARTBEAT)); event->agent = agent; event->timestamp = timestamp; Mutex::ScopedLock _lock(lock); eventQueue.push_back(event); } void ConsoleImpl::eventEventReceived(EventPtr event) { ConsoleEventImpl::Ptr console_event(new ConsoleEventImpl(ConsoleEvent::EVENT_RECEIVED)); console_event->event = event; Mutex::ScopedLock _lock(lock); eventQueue.push_back(console_event); } //================================================================== // Wrappers //================================================================== Console::Console(const ConsoleSettings& settings) : impl(new ConsoleImpl(settings)) {} Console::~Console() { delete impl; } bool Console::getEvent(ConsoleEvent& event) const { return impl->getEvent(event); } void Console::popEvent() { impl->popEvent(); } void Console::addConnection(BrokerProxy& broker, void* context) { impl->addConnection(broker, context); } void Console::delConnection(BrokerProxy& broker) { impl->delConnection(broker); } uint32_t Console::packageCount() const { return impl->packageCount(); } const char* Console::getPackageName(uint32_t idx) const { return impl->getPackageName(idx).c_str(); } uint32_t Console::classCount(const char* packageName) const { return impl->classCount(packageName); } const SchemaClassKey* Console::getClass(const char* packageName, uint32_t idx) const { return impl->getClass(packageName, idx); } ClassKind Console::getClassKind(const SchemaClassKey* key) const { return impl->getClassKind(key); } const SchemaObjectClass* Console::getObjectClass(const SchemaClassKey* key) const { return impl->getObjectClass(key); } const SchemaEventClass* Console::getEventClass(const SchemaClassKey* key) const { return impl->getEventClass(key); } void Console::bindPackage(const char* packageName) { impl->bindPackage(packageName); } void Console::bindClass(const SchemaClassKey* key) { impl->bindClass(key); } void Console::bindClass(const char* packageName, const char* className) { impl->bindClass(packageName, className); } void Console::bindEvent(const SchemaClassKey *key) { impl->bindEvent(key); } void Console::bindEvent(const char* packageName, const char* eventName) { impl->bindEvent(packageName, eventName); } //void Console::startSync(const Query& query, void* context, SyncQuery& sync) { impl->startSync(query, context, sync); } //void Console::touchSync(SyncQuery& sync) { impl->touchSync(sync); } //void Console::endSync(SyncQuery& sync) { impl->endSync(sync); } qpidc-0.16/src/qmf/engine/SequenceManager.cpp0000664000076400007640000000545611260276515021541 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/SequenceManager.h" using namespace std; using namespace qmf::engine; using namespace qpid::sys; SequenceManager::SequenceManager() : nextSequence(1) {} void SequenceManager::setUnsolicitedContext(SequenceContext::Ptr ctx) { unsolicitedContext = ctx; } uint32_t SequenceManager::reserve(SequenceContext::Ptr ctx) { Mutex::ScopedLock _lock(lock); if (ctx.get() == 0) ctx = unsolicitedContext; uint32_t seq = nextSequence; while (contextMap.find(seq) != contextMap.end()) seq = seq < 0xFFFFFFFF ? seq + 1 : 1; nextSequence = seq < 0xFFFFFFFF ? seq + 1 : 1; contextMap[seq] = ctx; ctx->reserve(); return seq; } void SequenceManager::release(uint32_t sequence) { Mutex::ScopedLock _lock(lock); if (sequence == 0) { if (unsolicitedContext.get() != 0) unsolicitedContext->release(); return; } map::iterator iter = contextMap.find(sequence); if (iter != contextMap.end()) { if (iter->second != 0) iter->second->release(); contextMap.erase(iter); } } void SequenceManager::releaseAll() { Mutex::ScopedLock _lock(lock); contextMap.clear(); } void SequenceManager::dispatch(uint8_t opcode, uint32_t sequence, const string& routingKey, qpid::framing::Buffer& buffer) { Mutex::ScopedLock _lock(lock); bool done; if (sequence == 0) { if (unsolicitedContext.get() != 0) { done = unsolicitedContext->handleMessage(opcode, sequence, routingKey, buffer); if (done) unsolicitedContext->release(); } return; } map::iterator iter = contextMap.find(sequence); if (iter != contextMap.end()) { if (iter->second != 0) { done = iter->second->handleMessage(opcode, sequence, routingKey, buffer); if (done) { iter->second->release(); contextMap.erase(iter); } } } } qpidc-0.16/src/qmf/engine/ConnectionSettingsImpl.cpp0000664000076400007640000002245511267352653023143 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/ConnectionSettingsImpl.h" #include "qmf/engine/Typecode.h" using namespace std; using namespace qmf::engine; using namespace qpid; const string attrProtocol("protocol"); const string attrHost("host"); const string attrPort("port"); const string attrVirtualhost("virtualhost"); const string attrUsername("username"); const string attrPassword("password"); const string attrMechanism("mechanism"); const string attrLocale("locale"); const string attrHeartbeat("heartbeat"); const string attrMaxChannels("maxChannels"); const string attrMaxFrameSize("maxFrameSize"); const string attrBounds("bounds"); const string attrTcpNoDelay("tcpNoDelay"); const string attrService("service"); const string attrMinSsf("minSsf"); const string attrMaxSsf("maxSsf"); const string attrRetryDelayMin("retryDelayMin"); const string attrRetryDelayMax("retryDelayMax"); const string attrRetryDelayFactor("retryDelayFactor"); const string attrSendUserId("sendUserId"); ConnectionSettingsImpl::ConnectionSettingsImpl() : retryDelayMin(1), retryDelayMax(64), retryDelayFactor(2), sendUserId(true) { } ConnectionSettingsImpl::ConnectionSettingsImpl(const string& /*url*/) : retryDelayMin(1), retryDelayMax(64), retryDelayFactor(2), sendUserId(true) { // TODO: Parse the URL } bool ConnectionSettingsImpl::setAttr(const string& key, const Value& value) { if (key == attrProtocol) clientSettings.protocol = value.asString(); else if (key == attrHost) clientSettings.host = value.asString(); else if (key == attrPort) clientSettings.port = value.asUint(); else if (key == attrVirtualhost) clientSettings.virtualhost = value.asString(); else if (key == attrUsername) clientSettings.username = value.asString(); else if (key == attrPassword) clientSettings.password = value.asString(); else if (key == attrMechanism) clientSettings.mechanism = value.asString(); else if (key == attrLocale) clientSettings.locale = value.asString(); else if (key == attrHeartbeat) clientSettings.heartbeat = value.asUint(); else if (key == attrMaxChannels) clientSettings.maxChannels = value.asUint(); else if (key == attrMaxFrameSize) clientSettings.maxFrameSize = value.asUint(); else if (key == attrBounds) clientSettings.bounds = value.asUint(); else if (key == attrTcpNoDelay) clientSettings.tcpNoDelay = value.asBool(); else if (key == attrService) clientSettings.service = value.asString(); else if (key == attrMinSsf) clientSettings.minSsf = value.asUint(); else if (key == attrMaxSsf) clientSettings.maxSsf = value.asUint(); else if (key == attrRetryDelayMin) retryDelayMin = value.asUint(); else if (key == attrRetryDelayMax) retryDelayMax = value.asUint(); else if (key == attrRetryDelayFactor) retryDelayFactor = value.asUint(); else if (key == attrSendUserId) sendUserId = value.asBool(); else return false; return true; } Value ConnectionSettingsImpl::getAttr(const string& key) const { Value strval(TYPE_LSTR); Value intval(TYPE_UINT32); Value boolval(TYPE_BOOL); if (key == attrProtocol) { strval.setString(clientSettings.protocol.c_str()); return strval; } if (key == attrHost) { strval.setString(clientSettings.host.c_str()); return strval; } if (key == attrPort) { intval.setUint(clientSettings.port); return intval; } if (key == attrVirtualhost) { strval.setString(clientSettings.virtualhost.c_str()); return strval; } if (key == attrUsername) { strval.setString(clientSettings.username.c_str()); return strval; } if (key == attrPassword) { strval.setString(clientSettings.password.c_str()); return strval; } if (key == attrMechanism) { strval.setString(clientSettings.mechanism.c_str()); return strval; } if (key == attrLocale) { strval.setString(clientSettings.locale.c_str()); return strval; } if (key == attrHeartbeat) { intval.setUint(clientSettings.heartbeat); return intval; } if (key == attrMaxChannels) { intval.setUint(clientSettings.maxChannels); return intval; } if (key == attrMaxFrameSize) { intval.setUint(clientSettings.maxFrameSize); return intval; } if (key == attrBounds) { intval.setUint(clientSettings.bounds); return intval; } if (key == attrTcpNoDelay) { boolval.setBool(clientSettings.tcpNoDelay); return boolval; } if (key == attrService) { strval.setString(clientSettings.service.c_str()); return strval; } if (key == attrMinSsf) { intval.setUint(clientSettings.minSsf); return intval; } if (key == attrMaxSsf) { intval.setUint(clientSettings.maxSsf); return intval; } if (key == attrRetryDelayMin) { intval.setUint(retryDelayMin); return intval; } if (key == attrRetryDelayMax) { intval.setUint(retryDelayMax); return intval; } if (key == attrRetryDelayFactor) { intval.setUint(retryDelayFactor); return intval; } if (key == attrSendUserId) { boolval.setBool(sendUserId); return boolval; } return strval; } const string& ConnectionSettingsImpl::getAttrString() const { // TODO: build and return attribute string return attrString; } void ConnectionSettingsImpl::transportTcp(uint16_t port) { clientSettings.protocol = "tcp"; clientSettings.port = port; } void ConnectionSettingsImpl::transportSsl(uint16_t port) { clientSettings.protocol = "ssl"; clientSettings.port = port; } void ConnectionSettingsImpl::transportRdma(uint16_t port) { clientSettings.protocol = "rdma"; clientSettings.port = port; } void ConnectionSettingsImpl::authAnonymous(const string& username) { clientSettings.mechanism = "ANONYMOUS"; clientSettings.username = username; } void ConnectionSettingsImpl::authPlain(const string& username, const string& password) { clientSettings.mechanism = "PLAIN"; clientSettings.username = username; clientSettings.password = password; } void ConnectionSettingsImpl::authGssapi(const string& serviceName, uint32_t minSsf, uint32_t maxSsf) { clientSettings.mechanism = "GSSAPI"; clientSettings.service = serviceName; clientSettings.minSsf = minSsf; clientSettings.maxSsf = maxSsf; } void ConnectionSettingsImpl::setRetry(int delayMin, int delayMax, int delayFactor) { retryDelayMin = delayMin; retryDelayMax = delayMax; retryDelayFactor = delayFactor; } const client::ConnectionSettings& ConnectionSettingsImpl::getClientSettings() const { return clientSettings; } void ConnectionSettingsImpl::getRetrySettings(int* min, int* max, int* factor) const { *min = retryDelayMin; *max = retryDelayMax; *factor = retryDelayFactor; } //================================================================== // Wrappers //================================================================== ConnectionSettings::ConnectionSettings(const ConnectionSettings& from) { impl = new ConnectionSettingsImpl(*from.impl); } ConnectionSettings::ConnectionSettings() { impl = new ConnectionSettingsImpl(); } ConnectionSettings::ConnectionSettings(const char* url) { impl = new ConnectionSettingsImpl(url); } ConnectionSettings::~ConnectionSettings() { delete impl; } bool ConnectionSettings::setAttr(const char* key, const Value& value) { return impl->setAttr(key, value); } Value ConnectionSettings::getAttr(const char* key) const { return impl->getAttr(key); } const char* ConnectionSettings::getAttrString() const { return impl->getAttrString().c_str(); } void ConnectionSettings::transportTcp(uint16_t port) { impl->transportTcp(port); } void ConnectionSettings::transportSsl(uint16_t port) { impl->transportSsl(port); } void ConnectionSettings::transportRdma(uint16_t port) { impl->transportRdma(port); } void ConnectionSettings::authAnonymous(const char* username) { impl->authAnonymous(username); } void ConnectionSettings::authPlain(const char* username, const char* password) { impl->authPlain(username, password); } void ConnectionSettings::authGssapi(const char* serviceName, uint32_t minSsf, uint32_t maxSsf) { impl->authGssapi(serviceName, minSsf, maxSsf); } void ConnectionSettings::setRetry(int delayMin, int delayMax, int delayFactor) { impl->setRetry(delayMin, delayMax, delayFactor); } qpidc-0.16/src/qmf/engine/SchemaImpl.cpp0000664000076400007640000005177711646077645020542 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/SchemaImpl.h" #include #include #include #include #include #include #include using namespace std; using namespace qmf::engine; using qpid::framing::Buffer; using qpid::framing::FieldTable; using qpid::framing::Uuid; SchemaHash::SchemaHash() { for (int idx = 0; idx < 16; idx++) hash.b[idx] = 0x5A; } void SchemaHash::encode(Buffer& buffer) const { buffer.putBin128(hash.b); } void SchemaHash::decode(Buffer& buffer) { buffer.getBin128(hash.b); } void SchemaHash::update(uint8_t data) { update((char*) &data, 1); } void SchemaHash::update(const char* data, uint32_t len) { uint64_t* first = &hash.q[0]; uint64_t* second = &hash.q[1]; for (uint32_t idx = 0; idx < len; idx++) { *first = *first ^ (uint64_t) data[idx]; *second = *second << 1; *second |= ((*first & 0x8000000000000000LL) >> 63); *first = *first << 1; *first = *first ^ *second; } } bool SchemaHash::operator==(const SchemaHash& other) const { return ::memcmp(&hash, &other.hash, 16) == 0; } bool SchemaHash::operator<(const SchemaHash& other) const { return ::memcmp(&hash, &other.hash, 16) < 0; } bool SchemaHash::operator>(const SchemaHash& other) const { return ::memcmp(&hash, &other.hash, 16) > 0; } SchemaArgumentImpl::SchemaArgumentImpl(Buffer& buffer) { FieldTable map; map.decode(buffer); name = map.getAsString("name"); typecode = (Typecode) map.getAsInt("type"); unit = map.getAsString("unit"); description = map.getAsString("desc"); dir = DIR_IN; string dstr(map.getAsString("dir")); if (dstr == "O") dir = DIR_OUT; else if (dstr == "IO") dir = DIR_IN_OUT; } SchemaArgument* SchemaArgumentImpl::factory(Buffer& buffer) { SchemaArgumentImpl* impl(new SchemaArgumentImpl(buffer)); return new SchemaArgument(impl); } void SchemaArgumentImpl::encode(Buffer& buffer) const { FieldTable map; map.setString("name", name); map.setInt("type", (int) typecode); if (dir == DIR_IN) map.setString("dir", "I"); else if (dir == DIR_OUT) map.setString("dir", "O"); else map.setString("dir", "IO"); if (!unit.empty()) map.setString("unit", unit); if (!description.empty()) map.setString("desc", description); map.encode(buffer); } void SchemaArgumentImpl::updateHash(SchemaHash& hash) const { hash.update(name); hash.update(typecode); hash.update(dir); hash.update(unit); hash.update(description); } SchemaMethodImpl::SchemaMethodImpl(Buffer& buffer) { FieldTable map; int argCount; map.decode(buffer); name = map.getAsString("name"); argCount = map.getAsInt("argCount"); description = map.getAsString("desc"); for (int idx = 0; idx < argCount; idx++) { SchemaArgument* arg = SchemaArgumentImpl::factory(buffer); addArgument(arg); } } SchemaMethod* SchemaMethodImpl::factory(Buffer& buffer) { SchemaMethodImpl* impl(new SchemaMethodImpl(buffer)); return new SchemaMethod(impl); } void SchemaMethodImpl::encode(Buffer& buffer) const { FieldTable map; map.setString("name", name); map.setInt("argCount", arguments.size()); if (!description.empty()) map.setString("desc", description); map.encode(buffer); for (vector::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++) (*iter)->impl->encode(buffer); } void SchemaMethodImpl::addArgument(const SchemaArgument* argument) { arguments.push_back(argument); } const SchemaArgument* SchemaMethodImpl::getArgument(int idx) const { int count = 0; for (vector::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++, count++) if (idx == count) return (*iter); return 0; } void SchemaMethodImpl::updateHash(SchemaHash& hash) const { hash.update(name); hash.update(description); for (vector::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++) (*iter)->impl->updateHash(hash); } SchemaPropertyImpl::SchemaPropertyImpl(Buffer& buffer) { FieldTable map; map.decode(buffer); name = map.getAsString("name"); typecode = (Typecode) map.getAsInt("type"); access = (Access) map.getAsInt("access"); index = map.getAsInt("index") != 0; optional = map.getAsInt("optional") != 0; unit = map.getAsString("unit"); description = map.getAsString("desc"); } SchemaProperty* SchemaPropertyImpl::factory(Buffer& buffer) { SchemaPropertyImpl* impl(new SchemaPropertyImpl(buffer)); return new SchemaProperty(impl); } void SchemaPropertyImpl::encode(Buffer& buffer) const { FieldTable map; map.setString("name", name); map.setInt("type", (int) typecode); map.setInt("access", (int) access); map.setInt("index", index ? 1 : 0); map.setInt("optional", optional ? 1 : 0); if (!unit.empty()) map.setString("unit", unit); if (!description.empty()) map.setString("desc", description); map.encode(buffer); } void SchemaPropertyImpl::updateHash(SchemaHash& hash) const { hash.update(name); hash.update(typecode); hash.update(access); hash.update(index); hash.update(optional); hash.update(unit); hash.update(description); } SchemaStatisticImpl::SchemaStatisticImpl(Buffer& buffer) { FieldTable map; map.decode(buffer); name = map.getAsString("name"); typecode = (Typecode) map.getAsInt("type"); unit = map.getAsString("unit"); description = map.getAsString("desc"); } SchemaStatistic* SchemaStatisticImpl::factory(Buffer& buffer) { SchemaStatisticImpl* impl(new SchemaStatisticImpl(buffer)); return new SchemaStatistic(impl); } void SchemaStatisticImpl::encode(Buffer& buffer) const { FieldTable map; map.setString("name", name); map.setInt("type", (int) typecode); if (!unit.empty()) map.setString("unit", unit); if (!description.empty()) map.setString("desc", description); map.encode(buffer); } void SchemaStatisticImpl::updateHash(SchemaHash& hash) const { hash.update(name); hash.update(typecode); hash.update(unit); hash.update(description); } SchemaClassKeyImpl::SchemaClassKeyImpl(const string& p, const string& n, const SchemaHash& h) : package(p), name(n), hash(h) {} SchemaClassKeyImpl::SchemaClassKeyImpl(Buffer& buffer) : package(packageContainer), name(nameContainer), hash(hashContainer) { buffer.getShortString(packageContainer); buffer.getShortString(nameContainer); hashContainer.decode(buffer); } SchemaClassKey* SchemaClassKeyImpl::factory(const string& package, const string& name, const SchemaHash& hash) { SchemaClassKeyImpl* impl(new SchemaClassKeyImpl(package, name, hash)); return new SchemaClassKey(impl); } SchemaClassKey* SchemaClassKeyImpl::factory(Buffer& buffer) { SchemaClassKeyImpl* impl(new SchemaClassKeyImpl(buffer)); return new SchemaClassKey(impl); } void SchemaClassKeyImpl::encode(Buffer& buffer) const { buffer.putShortString(package); buffer.putShortString(name); hash.encode(buffer); } bool SchemaClassKeyImpl::operator==(const SchemaClassKeyImpl& other) const { return package == other.package && name == other.name && hash == other.hash; } bool SchemaClassKeyImpl::operator<(const SchemaClassKeyImpl& other) const { if (package < other.package) return true; if (package > other.package) return false; if (name < other.name) return true; if (name > other.name) return false; return hash < other.hash; } const string& SchemaClassKeyImpl::str() const { Uuid printableHash(hash.get()); stringstream str; str << package << ":" << name << "(" << printableHash << ")"; repr = str.str(); return repr; } SchemaObjectClassImpl::SchemaObjectClassImpl(Buffer& buffer) : hasHash(true), classKey(SchemaClassKeyImpl::factory(package, name, hash)) { buffer.getShortString(package); buffer.getShortString(name); hash.decode(buffer); uint16_t propCount = buffer.getShort(); uint16_t statCount = buffer.getShort(); uint16_t methodCount = buffer.getShort(); for (uint16_t idx = 0; idx < propCount; idx++) { const SchemaProperty* property = SchemaPropertyImpl::factory(buffer); addProperty(property); } for (uint16_t idx = 0; idx < statCount; idx++) { const SchemaStatistic* statistic = SchemaStatisticImpl::factory(buffer); addStatistic(statistic); } for (uint16_t idx = 0; idx < methodCount; idx++) { SchemaMethod* method = SchemaMethodImpl::factory(buffer); addMethod(method); } } SchemaObjectClass* SchemaObjectClassImpl::factory(Buffer& buffer) { SchemaObjectClassImpl* impl(new SchemaObjectClassImpl(buffer)); return new SchemaObjectClass(impl); } void SchemaObjectClassImpl::encode(Buffer& buffer) const { buffer.putOctet((uint8_t) CLASS_OBJECT); buffer.putShortString(package); buffer.putShortString(name); hash.encode(buffer); //buffer.putOctet(0); // No parent class buffer.putShort((uint16_t) properties.size()); buffer.putShort((uint16_t) statistics.size()); buffer.putShort((uint16_t) methods.size()); for (vector::const_iterator iter = properties.begin(); iter != properties.end(); iter++) (*iter)->impl->encode(buffer); for (vector::const_iterator iter = statistics.begin(); iter != statistics.end(); iter++) (*iter)->impl->encode(buffer); for (vector::const_iterator iter = methods.begin(); iter != methods.end(); iter++) (*iter)->impl->encode(buffer); } const SchemaClassKey* SchemaObjectClassImpl::getClassKey() const { if (!hasHash) { hasHash = true; hash.update(package); hash.update(name); for (vector::const_iterator iter = properties.begin(); iter != properties.end(); iter++) (*iter)->impl->updateHash(hash); for (vector::const_iterator iter = statistics.begin(); iter != statistics.end(); iter++) (*iter)->impl->updateHash(hash); for (vector::const_iterator iter = methods.begin(); iter != methods.end(); iter++) (*iter)->impl->updateHash(hash); } return classKey.get(); } void SchemaObjectClassImpl::addProperty(const SchemaProperty* property) { properties.push_back(property); } void SchemaObjectClassImpl::addStatistic(const SchemaStatistic* statistic) { statistics.push_back(statistic); } void SchemaObjectClassImpl::addMethod(const SchemaMethod* method) { methods.push_back(method); } const SchemaProperty* SchemaObjectClassImpl::getProperty(int idx) const { int count = 0; for (vector::const_iterator iter = properties.begin(); iter != properties.end(); iter++, count++) if (idx == count) return *iter; return 0; } const SchemaStatistic* SchemaObjectClassImpl::getStatistic(int idx) const { int count = 0; for (vector::const_iterator iter = statistics.begin(); iter != statistics.end(); iter++, count++) if (idx == count) return *iter; return 0; } const SchemaMethod* SchemaObjectClassImpl::getMethod(int idx) const { int count = 0; for (vector::const_iterator iter = methods.begin(); iter != methods.end(); iter++, count++) if (idx == count) return *iter; return 0; } SchemaEventClassImpl::SchemaEventClassImpl(Buffer& buffer) : hasHash(true), classKey(SchemaClassKeyImpl::factory(package, name, hash)) { buffer.getShortString(package); buffer.getShortString(name); hash.decode(buffer); uint16_t argCount = buffer.getShort(); for (uint16_t idx = 0; idx < argCount; idx++) { SchemaArgument* argument = SchemaArgumentImpl::factory(buffer); addArgument(argument); } } SchemaEventClass* SchemaEventClassImpl::factory(Buffer& buffer) { SchemaEventClassImpl* impl(new SchemaEventClassImpl(buffer)); return new SchemaEventClass(impl); } void SchemaEventClassImpl::encode(Buffer& buffer) const { buffer.putOctet((uint8_t) CLASS_EVENT); buffer.putShortString(package); buffer.putShortString(name); hash.encode(buffer); buffer.putShort((uint16_t) arguments.size()); for (vector::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++) (*iter)->impl->encode(buffer); } const SchemaClassKey* SchemaEventClassImpl::getClassKey() const { if (!hasHash) { hasHash = true; hash.update(package); hash.update(name); for (vector::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++) (*iter)->impl->updateHash(hash); } return classKey.get(); } void SchemaEventClassImpl::addArgument(const SchemaArgument* argument) { arguments.push_back(argument); } const SchemaArgument* SchemaEventClassImpl::getArgument(int idx) const { int count = 0; for (vector::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++, count++) if (idx == count) return (*iter); return 0; } //================================================================== // Wrappers //================================================================== SchemaArgument::SchemaArgument(const char* name, Typecode typecode) { impl = new SchemaArgumentImpl(name, typecode); } SchemaArgument::SchemaArgument(SchemaArgumentImpl* i) : impl(i) {} SchemaArgument::SchemaArgument(const SchemaArgument& from) : impl(new SchemaArgumentImpl(*(from.impl))) {} SchemaArgument::~SchemaArgument() { delete impl; } void SchemaArgument::setDirection(Direction dir) { impl->setDirection(dir); } void SchemaArgument::setUnit(const char* val) { impl->setUnit(val); } void SchemaArgument::setDesc(const char* desc) { impl->setDesc(desc); } const char* SchemaArgument::getName() const { return impl->getName().c_str(); } Typecode SchemaArgument::getType() const { return impl->getType(); } Direction SchemaArgument::getDirection() const { return impl->getDirection(); } const char* SchemaArgument::getUnit() const { return impl->getUnit().c_str(); } const char* SchemaArgument::getDesc() const { return impl->getDesc().c_str(); } SchemaMethod::SchemaMethod(const char* name) : impl(new SchemaMethodImpl(name)) {} SchemaMethod::SchemaMethod(SchemaMethodImpl* i) : impl(i) {} SchemaMethod::SchemaMethod(const SchemaMethod& from) : impl(new SchemaMethodImpl(*(from.impl))) {} SchemaMethod::~SchemaMethod() { delete impl; } void SchemaMethod::addArgument(const SchemaArgument* argument) { impl->addArgument(argument); } void SchemaMethod::setDesc(const char* desc) { impl->setDesc(desc); } const char* SchemaMethod::getName() const { return impl->getName().c_str(); } const char* SchemaMethod::getDesc() const { return impl->getDesc().c_str(); } int SchemaMethod::getArgumentCount() const { return impl->getArgumentCount(); } const SchemaArgument* SchemaMethod::getArgument(int idx) const { return impl->getArgument(idx); } SchemaProperty::SchemaProperty(const char* name, Typecode typecode) : impl(new SchemaPropertyImpl(name, typecode)) {} SchemaProperty::SchemaProperty(SchemaPropertyImpl* i) : impl(i) {} SchemaProperty::SchemaProperty(const SchemaProperty& from) : impl(new SchemaPropertyImpl(*(from.impl))) {} SchemaProperty::~SchemaProperty() { delete impl; } void SchemaProperty::setAccess(Access access) { impl->setAccess(access); } void SchemaProperty::setIndex(bool val) { impl->setIndex(val); } void SchemaProperty::setOptional(bool val) { impl->setOptional(val); } void SchemaProperty::setUnit(const char* val) { impl->setUnit(val); } void SchemaProperty::setDesc(const char* desc) { impl->setDesc(desc); } const char* SchemaProperty::getName() const { return impl->getName().c_str(); } Typecode SchemaProperty::getType() const { return impl->getType(); } Access SchemaProperty::getAccess() const { return impl->getAccess(); } bool SchemaProperty::isIndex() const { return impl->isIndex(); } bool SchemaProperty::isOptional() const { return impl->isOptional(); } const char* SchemaProperty::getUnit() const { return impl->getUnit().c_str(); } const char* SchemaProperty::getDesc() const { return impl->getDesc().c_str(); } SchemaStatistic::SchemaStatistic(const char* name, Typecode typecode) : impl(new SchemaStatisticImpl(name, typecode)) {} SchemaStatistic::SchemaStatistic(SchemaStatisticImpl* i) : impl(i) {} SchemaStatistic::SchemaStatistic(const SchemaStatistic& from) : impl(new SchemaStatisticImpl(*(from.impl))) {} SchemaStatistic::~SchemaStatistic() { delete impl; } void SchemaStatistic::setUnit(const char* val) { impl->setUnit(val); } void SchemaStatistic::setDesc(const char* desc) { impl->setDesc(desc); } const char* SchemaStatistic::getName() const { return impl->getName().c_str(); } Typecode SchemaStatistic::getType() const { return impl->getType(); } const char* SchemaStatistic::getUnit() const { return impl->getUnit().c_str(); } const char* SchemaStatistic::getDesc() const { return impl->getDesc().c_str(); } SchemaClassKey::SchemaClassKey(SchemaClassKeyImpl* i) : impl(i) {} SchemaClassKey::SchemaClassKey(const SchemaClassKey& from) : impl(new SchemaClassKeyImpl(*(from.impl))) {} SchemaClassKey::~SchemaClassKey() { delete impl; } const char* SchemaClassKey::getPackageName() const { return impl->getPackageName().c_str(); } const char* SchemaClassKey::getClassName() const { return impl->getClassName().c_str(); } const uint8_t* SchemaClassKey::getHash() const { return impl->getHash(); } const char* SchemaClassKey::asString() const { return impl->str().c_str(); } bool SchemaClassKey::operator==(const SchemaClassKey& other) const { return *impl == *(other.impl); } bool SchemaClassKey::operator<(const SchemaClassKey& other) const { return *impl < *(other.impl); } SchemaObjectClass::SchemaObjectClass(const char* package, const char* name) : impl(new SchemaObjectClassImpl(package, name)) {} SchemaObjectClass::SchemaObjectClass(SchemaObjectClassImpl* i) : impl(i) {} SchemaObjectClass::SchemaObjectClass(const SchemaObjectClass& from) : impl(new SchemaObjectClassImpl(*(from.impl))) {} SchemaObjectClass::~SchemaObjectClass() { delete impl; } void SchemaObjectClass::addProperty(const SchemaProperty* property) { impl->addProperty(property); } void SchemaObjectClass::addStatistic(const SchemaStatistic* statistic) { impl->addStatistic(statistic); } void SchemaObjectClass::addMethod(const SchemaMethod* method) { impl->addMethod(method); } const SchemaClassKey* SchemaObjectClass::getClassKey() const { return impl->getClassKey(); } int SchemaObjectClass::getPropertyCount() const { return impl->getPropertyCount(); } int SchemaObjectClass::getStatisticCount() const { return impl->getStatisticCount(); } int SchemaObjectClass::getMethodCount() const { return impl->getMethodCount(); } const SchemaProperty* SchemaObjectClass::getProperty(int idx) const { return impl->getProperty(idx); } const SchemaStatistic* SchemaObjectClass::getStatistic(int idx) const { return impl->getStatistic(idx); } const SchemaMethod* SchemaObjectClass::getMethod(int idx) const { return impl->getMethod(idx); } SchemaEventClass::SchemaEventClass(const char* package, const char* name, Severity s) : impl(new SchemaEventClassImpl(package, name, s)) {} SchemaEventClass::SchemaEventClass(SchemaEventClassImpl* i) : impl(i) {} SchemaEventClass::SchemaEventClass(const SchemaEventClass& from) : impl(new SchemaEventClassImpl(*(from.impl))) {} SchemaEventClass::~SchemaEventClass() { delete impl; } void SchemaEventClass::addArgument(const SchemaArgument* argument) { impl->addArgument(argument); } void SchemaEventClass::setDesc(const char* desc) { impl->setDesc(desc); } const SchemaClassKey* SchemaEventClass::getClassKey() const { return impl->getClassKey(); } Severity SchemaEventClass::getSeverity() const { return impl->getSeverity(); } int SchemaEventClass::getArgumentCount() const { return impl->getArgumentCount(); } const SchemaArgument* SchemaEventClass::getArgument(int idx) const { return impl->getArgument(idx); } qpidc-0.16/src/qmf/engine/Agent.cpp0000664000076400007640000010105511527755664017541 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/Agent.h" #include "qmf/engine/MessageImpl.h" #include "qmf/engine/SchemaImpl.h" #include "qmf/engine/Typecode.h" #include "qmf/engine/EventImpl.h" #include "qmf/engine/ObjectImpl.h" #include "qmf/engine/ObjectIdImpl.h" #include "qmf/engine/QueryImpl.h" #include "qmf/engine/ValueImpl.h" #include "qmf/engine/Protocol.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace qmf::engine; using namespace qpid::framing; using namespace qpid::sys; namespace qmf { namespace engine { struct AgentEventImpl { typedef boost::shared_ptr Ptr; AgentEvent::EventKind kind; uint32_t sequence; string authUserId; string authToken; string name; Object* object; boost::shared_ptr objectId; boost::shared_ptr query; boost::shared_ptr arguments; string exchange; string bindingKey; const SchemaObjectClass* objectClass; AgentEventImpl(AgentEvent::EventKind k) : kind(k), sequence(0), object(0), objectClass(0) {} ~AgentEventImpl() {} AgentEvent copy(); }; struct AgentQueryContext { typedef boost::shared_ptr Ptr; uint32_t sequence; string exchange; string key; const SchemaMethod* schemaMethod; AgentQueryContext() : schemaMethod(0) {} }; class AgentImpl : public boost::noncopyable { public: AgentImpl(char* label, bool internalStore); ~AgentImpl(); void setStoreDir(const char* path); void setTransferDir(const char* path); void handleRcvMessage(Message& message); bool getXmtMessage(Message& item) const; void popXmt(); bool getEvent(AgentEvent& event) const; void popEvent(); void newSession(); void startProtocol(); void heartbeat(); void methodResponse(uint32_t sequence, uint32_t status, char* text, const Value& arguments); void queryResponse(uint32_t sequence, Object& object, bool prop, bool stat); void queryComplete(uint32_t sequence); void registerClass(SchemaObjectClass* cls); void registerClass(SchemaEventClass* cls); const ObjectId* addObject(Object& obj, uint64_t persistId); const ObjectId* allocObjectId(uint64_t persistId); const ObjectId* allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi); void raiseEvent(Event& event); private: mutable Mutex lock; Mutex addLock; string label; string queueName; string storeDir; string transferDir; bool internalStore; uint64_t nextTransientId; Uuid systemId; uint32_t requestedBrokerBank; uint32_t requestedAgentBank; uint32_t assignedBrokerBank; uint32_t assignedAgentBank; AgentAttachment attachment; uint16_t bootSequence; uint64_t nextObjectId; uint32_t nextContextNum; deque eventQueue; deque xmtQueue; map contextMap; bool attachComplete; static const char* QMF_EXCHANGE; static const char* DIR_EXCHANGE; static const char* BROKER_KEY; static const uint32_t MERR_UNKNOWN_METHOD = 2; static const uint32_t MERR_UNKNOWN_PACKAGE = 8; static const uint32_t MERR_UNKNOWN_CLASS = 9; static const uint32_t MERR_INTERNAL_ERROR = 10; # define MA_BUFFER_SIZE 65536 char outputBuffer[MA_BUFFER_SIZE]; struct AgentClassKey { string name; uint8_t hash[16]; AgentClassKey(const string& n, const uint8_t* h) : name(n) { memcpy(hash, h, 16); } AgentClassKey(Buffer& buffer) { buffer.getShortString(name); buffer.getBin128(hash); } string repr() { return name; } }; struct AgentClassKeyComp { bool operator() (const AgentClassKey& lhs, const AgentClassKey& rhs) const { if (lhs.name != rhs.name) return lhs.name < rhs.name; else for (int i = 0; i < 16; i++) if (lhs.hash[i] != rhs.hash[i]) return lhs.hash[i] < rhs.hash[i]; return false; } }; typedef map ObjectClassMap; typedef map EventClassMap; struct ClassMaps { ObjectClassMap objectClasses; EventClassMap eventClasses; }; map packages; AgentEventImpl::Ptr eventDeclareQueue(const string& queueName); AgentEventImpl::Ptr eventBind(const string& exchange, const string& queue, const string& key); AgentEventImpl::Ptr eventSetupComplete(); AgentEventImpl::Ptr eventQuery(uint32_t num, const string& userId, const string& package, const string& cls, boost::shared_ptr oid); AgentEventImpl::Ptr eventMethod(uint32_t num, const string& userId, const string& method, boost::shared_ptr oid, boost::shared_ptr argMap, const SchemaObjectClass* objectClass); void sendBufferLH(Buffer& buf, const string& destination, const string& routingKey); void sendPackageIndicationLH(const string& packageName); void sendClassIndicationLH(ClassKind kind, const string& packageName, const AgentClassKey& key); void sendCommandCompleteLH(const string& exchange, const string& key, uint32_t seq, uint32_t code = 0, const string& text = "OK"); void sendMethodErrorLH(uint32_t sequence, const string& key, uint32_t code, const string& text=""); void handleAttachResponse(Buffer& inBuffer); void handlePackageRequest(Buffer& inBuffer); void handleClassQuery(Buffer& inBuffer); void handleSchemaRequest(Buffer& inBuffer, uint32_t sequence, const string& replyToExchange, const string& replyToKey); void handleGetQuery(Buffer& inBuffer, uint32_t sequence, const string& replyTo, const string& userId); void handleMethodRequest(Buffer& inBuffer, uint32_t sequence, const string& replyTo, const string& userId); void handleConsoleAddedIndication(); }; } } const char* AgentImpl::QMF_EXCHANGE = "qpid.management"; const char* AgentImpl::DIR_EXCHANGE = "amq.direct"; const char* AgentImpl::BROKER_KEY = "broker"; #define STRING_REF(s) {if (!s.empty()) item.s = const_cast(s.c_str());} AgentEvent AgentEventImpl::copy() { AgentEvent item; ::memset(&item, 0, sizeof(AgentEvent)); item.kind = kind; item.sequence = sequence; item.object = object; item.objectId = objectId.get(); item.query = query.get(); item.arguments = arguments.get(); item.objectClass = objectClass; STRING_REF(authUserId); STRING_REF(authToken); STRING_REF(name); STRING_REF(exchange); STRING_REF(bindingKey); return item; } AgentImpl::AgentImpl(char* _label, bool i) : label(_label), queueName("qmfa-"), internalStore(i), nextTransientId(1), requestedBrokerBank(0), requestedAgentBank(0), assignedBrokerBank(0), assignedAgentBank(0), bootSequence(1), nextObjectId(1), nextContextNum(1), attachComplete(false) { queueName += Uuid(true).str(); } AgentImpl::~AgentImpl() { } void AgentImpl::setStoreDir(const char* path) { Mutex::ScopedLock _lock(lock); if (path) storeDir = path; else storeDir.clear(); } void AgentImpl::setTransferDir(const char* path) { Mutex::ScopedLock _lock(lock); if (path) transferDir = path; else transferDir.clear(); } void AgentImpl::handleRcvMessage(Message& message) { Buffer inBuffer(message.body, message.length); uint8_t opcode; uint32_t sequence; string replyToExchange(message.replyExchange ? message.replyExchange : ""); string replyToKey(message.replyKey ? message.replyKey : ""); string userId(message.userId ? message.userId : ""); while (Protocol::checkHeader(inBuffer, &opcode, &sequence)) { if (opcode == Protocol::OP_ATTACH_RESPONSE) handleAttachResponse(inBuffer); else if (opcode == Protocol::OP_SCHEMA_REQUEST) handleSchemaRequest(inBuffer, sequence, replyToExchange, replyToKey); else if (opcode == Protocol::OP_CONSOLE_ADDED_INDICATION) handleConsoleAddedIndication(); else if (opcode == Protocol::OP_GET_QUERY) handleGetQuery(inBuffer, sequence, replyToKey, userId); else if (opcode == Protocol::OP_METHOD_REQUEST) handleMethodRequest(inBuffer, sequence, replyToKey, userId); else { QPID_LOG(error, "AgentImpl::handleRcvMessage invalid opcode=" << opcode); break; } } } bool AgentImpl::getXmtMessage(Message& item) const { Mutex::ScopedLock _lock(lock); if (xmtQueue.empty()) return false; item = xmtQueue.front()->copy(); return true; } void AgentImpl::popXmt() { Mutex::ScopedLock _lock(lock); if (!xmtQueue.empty()) xmtQueue.pop_front(); } bool AgentImpl::getEvent(AgentEvent& event) const { Mutex::ScopedLock _lock(lock); if (eventQueue.empty()) return false; event = eventQueue.front()->copy(); return true; } void AgentImpl::popEvent() { Mutex::ScopedLock _lock(lock); if (!eventQueue.empty()) eventQueue.pop_front(); } void AgentImpl::newSession() { Mutex::ScopedLock _lock(lock); eventQueue.clear(); xmtQueue.clear(); eventQueue.push_back(eventDeclareQueue(queueName)); eventQueue.push_back(eventBind("amq.direct", queueName, queueName)); eventQueue.push_back(eventSetupComplete()); } void AgentImpl::startProtocol() { Mutex::ScopedLock _lock(lock); char rawbuffer[512]; Buffer buffer(rawbuffer, 512); Protocol::encodeHeader(buffer, Protocol::OP_ATTACH_REQUEST); buffer.putShortString(label); systemId.encode(buffer); buffer.putLong(requestedBrokerBank); buffer.putLong(requestedAgentBank); sendBufferLH(buffer, QMF_EXCHANGE, BROKER_KEY); QPID_LOG(trace, "SENT AttachRequest: reqBroker=" << requestedBrokerBank << " reqAgent=" << requestedAgentBank); } void AgentImpl::heartbeat() { Mutex::ScopedLock _lock(lock); Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_HEARTBEAT_INDICATION); buffer.putLongLong(uint64_t(Duration(EPOCH, now()))); stringstream key; key << "console.heartbeat." << assignedBrokerBank << "." << assignedAgentBank; sendBufferLH(buffer, QMF_EXCHANGE, key.str()); QPID_LOG(trace, "SENT HeartbeatIndication"); } void AgentImpl::methodResponse(uint32_t sequence, uint32_t status, char* text, const Value& argMap) { Mutex::ScopedLock _lock(lock); map::iterator iter = contextMap.find(sequence); if (iter == contextMap.end()) return; AgentQueryContext::Ptr context = iter->second; contextMap.erase(iter); char* buf(outputBuffer); uint32_t bufLen(114 + strlen(text)); // header(8) + status(4) + mstring(2 + size) + margin(100) bool allocated(false); if (status == 0) { for (vector::const_iterator aIter = context->schemaMethod->impl->arguments.begin(); aIter != context->schemaMethod->impl->arguments.end(); aIter++) { const SchemaArgument* schemaArg = *aIter; if (schemaArg->getDirection() == DIR_OUT || schemaArg->getDirection() == DIR_IN_OUT) { if (argMap.keyInMap(schemaArg->getName())) { const Value* val = argMap.byKey(schemaArg->getName()); bufLen += val->impl->encodedSize(); } else { Value val(schemaArg->getType()); bufLen += val.impl->encodedSize(); } } } } if (bufLen > MA_BUFFER_SIZE) { buf = (char*) malloc(bufLen); allocated = true; } Buffer buffer(buf, bufLen); Protocol::encodeHeader(buffer, Protocol::OP_METHOD_RESPONSE, context->sequence); buffer.putLong(status); buffer.putMediumString(text); if (status == 0) { for (vector::const_iterator aIter = context->schemaMethod->impl->arguments.begin(); aIter != context->schemaMethod->impl->arguments.end(); aIter++) { const SchemaArgument* schemaArg = *aIter; if (schemaArg->getDirection() == DIR_OUT || schemaArg->getDirection() == DIR_IN_OUT) { if (argMap.keyInMap(schemaArg->getName())) { const Value* val = argMap.byKey(schemaArg->getName()); val->impl->encode(buffer); } else { Value val(schemaArg->getType()); val.impl->encode(buffer); } } } } sendBufferLH(buffer, context->exchange, context->key); if (allocated) free(buf); QPID_LOG(trace, "SENT MethodResponse seq=" << context->sequence << " status=" << status << " text=" << text); } void AgentImpl::queryResponse(uint32_t sequence, Object& object, bool prop, bool stat) { Mutex::ScopedLock _lock(lock); map::iterator iter = contextMap.find(sequence); if (iter == contextMap.end()) return; AgentQueryContext::Ptr context = iter->second; Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_OBJECT_INDICATION, context->sequence); object.impl->encodeSchemaKey(buffer); object.impl->encodeManagedObjectData(buffer); if (prop) object.impl->encodeProperties(buffer); if (stat) object.impl->encodeStatistics(buffer); sendBufferLH(buffer, context->exchange, context->key); QPID_LOG(trace, "SENT ContentIndication seq=" << context->sequence); } void AgentImpl::queryComplete(uint32_t sequence) { Mutex::ScopedLock _lock(lock); map::iterator iter = contextMap.find(sequence); if (iter == contextMap.end()) return; AgentQueryContext::Ptr context = iter->second; contextMap.erase(iter); sendCommandCompleteLH(context->exchange, context->key, context->sequence, 0, "OK"); } void AgentImpl::registerClass(SchemaObjectClass* cls) { Mutex::ScopedLock _lock(lock); bool newPackage = false; map::iterator iter = packages.find(cls->getClassKey()->getPackageName()); if (iter == packages.end()) { packages[cls->getClassKey()->getPackageName()] = ClassMaps(); iter = packages.find(cls->getClassKey()->getPackageName()); newPackage = true; } AgentClassKey key(cls->getClassKey()->getClassName(), cls->getClassKey()->getHash()); iter->second.objectClasses[key] = cls; // Indicate this new schema if connected. if (attachComplete) { if (newPackage) { sendPackageIndicationLH(iter->first); } sendClassIndicationLH(CLASS_OBJECT, iter->first, key); } } void AgentImpl::registerClass(SchemaEventClass* cls) { Mutex::ScopedLock _lock(lock); bool newPackage = false; map::iterator iter = packages.find(cls->getClassKey()->getPackageName()); if (iter == packages.end()) { packages[cls->getClassKey()->getPackageName()] = ClassMaps(); iter = packages.find(cls->getClassKey()->getPackageName()); newPackage = true; } AgentClassKey key(cls->getClassKey()->getClassName(), cls->getClassKey()->getHash()); iter->second.eventClasses[key] = cls; // Indicate this new schema if connected. if (attachComplete) { if (newPackage) { sendPackageIndicationLH(iter->first); } sendClassIndicationLH(CLASS_EVENT, iter->first, key); } } const ObjectId* AgentImpl::addObject(Object&, uint64_t) { Mutex::ScopedLock _lock(lock); return 0; } const ObjectId* AgentImpl::allocObjectId(uint64_t persistId) { Mutex::ScopedLock _lock(lock); uint16_t sequence = persistId ? 0 : bootSequence; uint64_t objectNum = persistId ? persistId : nextObjectId++; ObjectId* oid = ObjectIdImpl::factory(&attachment, 0, sequence, objectNum); return oid; } const ObjectId* AgentImpl::allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi) { return allocObjectId(((uint64_t) persistIdHi) << 32 | (uint64_t) persistIdLo); } void AgentImpl::raiseEvent(Event& event) { Mutex::ScopedLock _lock(lock); Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_EVENT_INDICATION); event.impl->encodeSchemaKey(buffer); buffer.putLongLong(uint64_t(Duration(EPOCH, now()))); event.impl->encode(buffer); string key(event.impl->getRoutingKey(assignedBrokerBank, assignedAgentBank)); sendBufferLH(buffer, QMF_EXCHANGE, key); QPID_LOG(trace, "SENT EventIndication"); } AgentEventImpl::Ptr AgentImpl::eventDeclareQueue(const string& name) { AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::DECLARE_QUEUE)); event->name = name; return event; } AgentEventImpl::Ptr AgentImpl::eventBind(const string& exchange, const string& queue, const string& key) { AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::BIND)); event->name = queue; event->exchange = exchange; event->bindingKey = key; return event; } AgentEventImpl::Ptr AgentImpl::eventSetupComplete() { AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::SETUP_COMPLETE)); return event; } AgentEventImpl::Ptr AgentImpl::eventQuery(uint32_t num, const string& userId, const string& package, const string& cls, boost::shared_ptr oid) { AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::GET_QUERY)); event->sequence = num; event->authUserId = userId; if (oid.get()) event->query.reset(new Query(oid.get())); else event->query.reset(new Query(cls.c_str(), package.c_str())); return event; } AgentEventImpl::Ptr AgentImpl::eventMethod(uint32_t num, const string& userId, const string& method, boost::shared_ptr oid, boost::shared_ptr argMap, const SchemaObjectClass* objectClass) { AgentEventImpl::Ptr event(new AgentEventImpl(AgentEvent::METHOD_CALL)); event->sequence = num; event->authUserId = userId; event->name = method; event->objectId = oid; event->arguments = argMap; event->objectClass = objectClass; return event; } void AgentImpl::sendBufferLH(Buffer& buf, const string& destination, const string& routingKey) { uint32_t length = buf.getPosition(); MessageImpl::Ptr message(new MessageImpl); buf.reset(); buf.getRawData(message->body, length); message->destination = destination; message->routingKey = routingKey; message->replyExchange = "amq.direct"; message->replyKey = queueName; xmtQueue.push_back(message); } void AgentImpl::sendPackageIndicationLH(const string& packageName) { Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_PACKAGE_INDICATION); buffer.putShortString(packageName); sendBufferLH(buffer, QMF_EXCHANGE, BROKER_KEY); QPID_LOG(trace, "SENT PackageIndication: package_name=" << packageName); } void AgentImpl::sendClassIndicationLH(ClassKind kind, const string& packageName, const AgentClassKey& key) { Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_CLASS_INDICATION); buffer.putOctet((int) kind); buffer.putShortString(packageName); buffer.putShortString(key.name); buffer.putBin128(const_cast(key.hash)); // const_cast needed for older Qpid libraries sendBufferLH(buffer, QMF_EXCHANGE, BROKER_KEY); QPID_LOG(trace, "SENT ClassIndication: package_name=" << packageName << " class_name=" << key.name); } void AgentImpl::sendCommandCompleteLH(const string& exchange, const string& replyToKey, uint32_t sequence, uint32_t code, const string& text) { Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_COMMAND_COMPLETE, sequence); buffer.putLong(code); buffer.putShortString(text); sendBufferLH(buffer, exchange, replyToKey); QPID_LOG(trace, "SENT CommandComplete: seq=" << sequence << " code=" << code << " text=" << text); } void AgentImpl::sendMethodErrorLH(uint32_t sequence, const string& key, uint32_t code, const string& text) { Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_METHOD_RESPONSE, sequence); buffer.putLong(code); string fulltext; switch (code) { case MERR_UNKNOWN_PACKAGE: fulltext = "Unknown Package"; break; case MERR_UNKNOWN_CLASS: fulltext = "Unknown Class"; break; case MERR_UNKNOWN_METHOD: fulltext = "Unknown Method"; break; case MERR_INTERNAL_ERROR: fulltext = "Internal Error"; break; default: fulltext = "Unspecified Error"; break; } if (!text.empty()) { fulltext += " ("; fulltext += text; fulltext += ")"; } buffer.putMediumString(fulltext); sendBufferLH(buffer, DIR_EXCHANGE, key); QPID_LOG(trace, "SENT MethodResponse: errorCode=" << code << " text=" << fulltext); } void AgentImpl::handleAttachResponse(Buffer& inBuffer) { Mutex::ScopedLock _lock(lock); assignedBrokerBank = inBuffer.getLong(); assignedAgentBank = inBuffer.getLong(); QPID_LOG(trace, "RCVD AttachResponse: broker=" << assignedBrokerBank << " agent=" << assignedAgentBank); if ((assignedBrokerBank != requestedBrokerBank) || (assignedAgentBank != requestedAgentBank)) { if (requestedAgentBank == 0) { QPID_LOG(notice, "Initial object-id bank assigned: " << assignedBrokerBank << "." << assignedAgentBank); } else { QPID_LOG(warning, "Collision in object-id! New bank assigned: " << assignedBrokerBank << "." << assignedAgentBank); } //storeData(); // TODO requestedBrokerBank = assignedBrokerBank; requestedAgentBank = assignedAgentBank; } attachment.setBanks(assignedBrokerBank, assignedAgentBank); // Bind to qpid.management to receive commands stringstream key; key << "agent." << assignedBrokerBank << "." << assignedAgentBank; eventQueue.push_back(eventBind(QMF_EXCHANGE, queueName, key.str())); // Send package indications for all local packages for (map::iterator pIter = packages.begin(); pIter != packages.end(); pIter++) { sendPackageIndicationLH(pIter->first); // Send class indications for all local classes ClassMaps cMap = pIter->second; for (ObjectClassMap::iterator cIter = cMap.objectClasses.begin(); cIter != cMap.objectClasses.end(); cIter++) sendClassIndicationLH(CLASS_OBJECT, pIter->first, cIter->first); for (EventClassMap::iterator cIter = cMap.eventClasses.begin(); cIter != cMap.eventClasses.end(); cIter++) sendClassIndicationLH(CLASS_EVENT, pIter->first, cIter->first); } attachComplete = true; } void AgentImpl::handlePackageRequest(Buffer&) { Mutex::ScopedLock _lock(lock); } void AgentImpl::handleClassQuery(Buffer&) { Mutex::ScopedLock _lock(lock); } void AgentImpl::handleSchemaRequest(Buffer& inBuffer, uint32_t sequence, const string& replyExchange, const string& replyKey) { Mutex::ScopedLock _lock(lock); string rExchange(replyExchange); string rKey(replyKey); string packageName; inBuffer.getShortString(packageName); AgentClassKey key(inBuffer); if (rExchange.empty()) rExchange = QMF_EXCHANGE; if (rKey.empty()) rKey = BROKER_KEY; QPID_LOG(trace, "RCVD SchemaRequest: package=" << packageName << " class=" << key.name); map::iterator pIter = packages.find(packageName); if (pIter == packages.end()) { sendCommandCompleteLH(rExchange, rKey, sequence, 1, "package not found"); return; } ClassMaps cMap = pIter->second; ObjectClassMap::iterator ocIter = cMap.objectClasses.find(key); if (ocIter != cMap.objectClasses.end()) { SchemaObjectClass* oImpl = ocIter->second; Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_SCHEMA_RESPONSE, sequence); oImpl->impl->encode(buffer); sendBufferLH(buffer, rExchange, rKey); QPID_LOG(trace, "SENT SchemaResponse: (object) package=" << packageName << " class=" << key.name); return; } EventClassMap::iterator ecIter = cMap.eventClasses.find(key); if (ecIter != cMap.eventClasses.end()) { SchemaEventClass* eImpl = ecIter->second; Buffer buffer(outputBuffer, MA_BUFFER_SIZE); Protocol::encodeHeader(buffer, Protocol::OP_SCHEMA_RESPONSE, sequence); eImpl->impl->encode(buffer); sendBufferLH(buffer, rExchange, rKey); QPID_LOG(trace, "SENT SchemaResponse: (event) package=" << packageName << " class=" << key.name); return; } sendCommandCompleteLH(rExchange, rKey, sequence, 1, "class not found"); } void AgentImpl::handleGetQuery(Buffer& inBuffer, uint32_t sequence, const string& replyTo, const string& userId) { Mutex::ScopedLock _lock(lock); FieldTable ft; FieldTable::ValuePtr value; map::const_iterator pIter = packages.end(); string pname; string cname; string oidRepr; boost::shared_ptr oid; ft.decode(inBuffer); QPID_LOG(trace, "RCVD GetQuery: seq=" << sequence << " map=" << ft); value = ft.get("_package"); if (value.get() && value->convertsTo()) { pname = value->get(); pIter = packages.find(pname); if (pIter == packages.end()) { sendCommandCompleteLH(DIR_EXCHANGE, replyTo, sequence); return; } } value = ft.get("_class"); if (value.get() && value->convertsTo()) { cname = value->get(); // TODO - check for validity of class (in package or any package) if (pIter == packages.end()) { } else { } } value = ft.get("_objectid"); if (value.get() && value->convertsTo()) { oidRepr = value->get(); oid.reset(new ObjectId()); oid->impl->fromString(oidRepr); } AgentQueryContext::Ptr context(new AgentQueryContext); uint32_t contextNum = nextContextNum++; context->sequence = sequence; context->exchange = DIR_EXCHANGE; context->key = replyTo; contextMap[contextNum] = context; eventQueue.push_back(eventQuery(contextNum, userId, pname, cname, oid)); } void AgentImpl::handleMethodRequest(Buffer& buffer, uint32_t sequence, const string& replyTo, const string& userId) { Mutex::ScopedLock _lock(lock); string pname; string method; boost::shared_ptr oid(ObjectIdImpl::factory(buffer)); buffer.getShortString(pname); AgentClassKey classKey(buffer); buffer.getShortString(method); QPID_LOG(trace, "RCVD MethodRequest seq=" << sequence << " method=" << method); map::const_iterator pIter = packages.find(pname); if (pIter == packages.end()) { sendMethodErrorLH(sequence, replyTo, MERR_UNKNOWN_PACKAGE, pname); return; } ObjectClassMap::const_iterator cIter = pIter->second.objectClasses.find(classKey); if (cIter == pIter->second.objectClasses.end()) { sendMethodErrorLH(sequence, replyTo, MERR_UNKNOWN_CLASS, classKey.repr()); return; } const SchemaObjectClass* schema = cIter->second; vector::const_iterator mIter = schema->impl->methods.begin(); for (; mIter != schema->impl->methods.end(); mIter++) { if ((*mIter)->getName() == method) break; } if (mIter == schema->impl->methods.end()) { sendMethodErrorLH(sequence, replyTo, MERR_UNKNOWN_METHOD, method); return; } const SchemaMethod* schemaMethod = *mIter; boost::shared_ptr argMap(new Value(TYPE_MAP)); Value* value; for (vector::const_iterator aIter = schemaMethod->impl->arguments.begin(); aIter != schemaMethod->impl->arguments.end(); aIter++) { const SchemaArgument* schemaArg = *aIter; if (schemaArg->getDirection() == DIR_IN || schemaArg->getDirection() == DIR_IN_OUT) value = ValueImpl::factory(schemaArg->getType(), buffer); else value = ValueImpl::factory(schemaArg->getType()); argMap->insert(schemaArg->getName(), value); } AgentQueryContext::Ptr context(new AgentQueryContext); uint32_t contextNum = nextContextNum++; context->sequence = sequence; context->exchange = DIR_EXCHANGE; context->key = replyTo; context->schemaMethod = schemaMethod; contextMap[contextNum] = context; eventQueue.push_back(eventMethod(contextNum, userId, method, oid, argMap, schema)); } void AgentImpl::handleConsoleAddedIndication() { Mutex::ScopedLock _lock(lock); } //================================================================== // Wrappers //================================================================== Agent::Agent(char* label, bool internalStore) { impl = new AgentImpl(label, internalStore); } Agent::~Agent() { delete impl; } void Agent::setStoreDir(const char* path) { impl->setStoreDir(path); } void Agent::setTransferDir(const char* path) { impl->setTransferDir(path); } void Agent::handleRcvMessage(Message& message) { impl->handleRcvMessage(message); } bool Agent::getXmtMessage(Message& item) const { return impl->getXmtMessage(item); } void Agent::popXmt() { impl->popXmt(); } bool Agent::getEvent(AgentEvent& event) const { return impl->getEvent(event); } void Agent::popEvent() { impl->popEvent(); } void Agent::newSession() { impl->newSession(); } void Agent::startProtocol() { impl->startProtocol(); } void Agent::heartbeat() { impl->heartbeat(); } void Agent::methodResponse(uint32_t sequence, uint32_t status, char* text, const Value& arguments) { impl->methodResponse(sequence, status, text, arguments); } void Agent::queryResponse(uint32_t sequence, Object& object, bool prop, bool stat) { impl->queryResponse(sequence, object, prop, stat); } void Agent::queryComplete(uint32_t sequence) { impl->queryComplete(sequence); } void Agent::registerClass(SchemaObjectClass* cls) { impl->registerClass(cls); } void Agent::registerClass(SchemaEventClass* cls) { impl->registerClass(cls); } const ObjectId* Agent::addObject(Object& obj, uint64_t persistId) { return impl->addObject(obj, persistId); } const ObjectId* Agent::allocObjectId(uint64_t persistId) { return impl->allocObjectId(persistId); } const ObjectId* Agent::allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi) { return impl->allocObjectId(persistIdLo, persistIdHi); } void Agent::raiseEvent(Event& event) { impl->raiseEvent(event); } qpidc-0.16/src/qmf/engine/EventImpl.h0000664000076400007640000000355311364401257020040 0ustar00jrossjross00000000000000#ifndef _QmfEngineEventImpl_ #define _QmfEngineEventImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include namespace qmf { namespace engine { typedef boost::shared_ptr EventPtr; struct EventImpl { typedef boost::shared_ptr ValuePtr; const SchemaEventClass* eventClass; uint64_t timestamp; uint8_t severity; mutable std::map arguments; EventImpl(const SchemaEventClass* type); EventImpl(const SchemaEventClass* type, qpid::framing::Buffer& buffer); static Event* factory(const SchemaEventClass* type, qpid::framing::Buffer& buffer); const SchemaEventClass* getClass() const { return eventClass; } Value* getValue(const char* key) const; void encodeSchemaKey(qpid::framing::Buffer& buffer) const; void encode(qpid::framing::Buffer& buffer) const; std::string getRoutingKey(uint32_t brokerBank, uint32_t agentBank) const; }; } } #endif qpidc-0.16/src/qmf/engine/ConnectionSettingsImpl.h0000664000076400007640000000440111261436126022567 0ustar00jrossjross00000000000000#ifndef _QmfEngineConnectionSettingsImpl_ #define _QmfEngineConnectionSettingsImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/ConnectionSettings.h" #include "qmf/engine/Value.h" #include "qpid/client/ConnectionSettings.h" #include #include namespace qmf { namespace engine { class ConnectionSettingsImpl { qpid::client::ConnectionSettings clientSettings; mutable std::string attrString; int retryDelayMin; int retryDelayMax; int retryDelayFactor; bool sendUserId; public: ConnectionSettingsImpl(); ConnectionSettingsImpl(const std::string& url); ~ConnectionSettingsImpl() {} bool setAttr(const std::string& key, const Value& value); Value getAttr(const std::string& key) const; const std::string& getAttrString() const; void transportTcp(uint16_t port); void transportSsl(uint16_t port); void transportRdma(uint16_t port); void authAnonymous(const std::string& username); void authPlain(const std::string& username, const std::string& password); void authGssapi(const std::string& serviceName, uint32_t minSsf, uint32_t maxSsf); void setRetry(int delayMin, int delayMax, int delayFactor); const qpid::client::ConnectionSettings& getClientSettings() const; void getRetrySettings(int* delayMin, int* delayMax, int* delayFactor) const; bool getSendUserId() const { return sendUserId; } }; } } #endif qpidc-0.16/src/qmf/engine/ValueImpl.cpp0000664000076400007640000004733011513647017020371 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/ValueImpl.h" #include #include #include #include using namespace std; using namespace qmf::engine; //using qpid::framing::Buffer; //using qpid::framing::FieldTable; //using qpid::framing::FieldValue; using namespace qpid::framing; ValueImpl::ValueImpl(Typecode t, Buffer& buf) : typecode(t) { uint64_t first; uint64_t second; FieldTable ft; List fl; switch (typecode) { case TYPE_UINT8 : value.u32 = (uint32_t) buf.getOctet(); break; case TYPE_UINT16 : value.u32 = (uint32_t) buf.getShort(); break; case TYPE_UINT32 : value.u32 = (uint32_t) buf.getLong(); break; case TYPE_UINT64 : value.u64 = buf.getLongLong(); break; case TYPE_SSTR : buf.getShortString(stringVal); break; case TYPE_LSTR : buf.getMediumString(stringVal); break; case TYPE_ABSTIME : value.s64 = buf.getLongLong(); break; case TYPE_DELTATIME : value.u64 = buf.getLongLong(); break; case TYPE_BOOL : value.boolVal = (buf.getOctet() != 0); break; case TYPE_FLOAT : value.floatVal = buf.getFloat(); break; case TYPE_DOUBLE : value.doubleVal = buf.getDouble(); break; case TYPE_INT8 : value.s32 = (int32_t) ((int8_t) buf.getOctet()); break; case TYPE_INT16 : value.s32 = (int32_t) ((int16_t) buf.getShort()); break; case TYPE_INT32 : value.s32 = (int32_t) buf.getLong(); break; case TYPE_INT64 : value.s64 = buf.getLongLong(); break; case TYPE_UUID : buf.getBin128(value.uuidVal); break; case TYPE_REF: first = buf.getLongLong(); second = buf.getLongLong(); refVal.impl->setValue(first, second); break; case TYPE_MAP: ft.decode(buf); initMap(ft); break; case TYPE_LIST: fl.decode(buf); initList(fl); break; case TYPE_ARRAY: case TYPE_OBJECT: default: break; } } ValueImpl::ValueImpl(Typecode t, Typecode at) : typecode(t), valid(false), arrayTypecode(at) { } ValueImpl::ValueImpl(Typecode t) : typecode(t) { ::memset(&value, 0, sizeof(value)); } Value* ValueImpl::factory(Typecode t, Buffer& b) { ValueImpl* impl(new ValueImpl(t, b)); return new Value(impl); } Value* ValueImpl::factory(Typecode t) { ValueImpl* impl(new ValueImpl(t)); return new Value(impl); } ValueImpl::~ValueImpl() { } void ValueImpl::initMap(const FieldTable& ft) { for (FieldTable::ValueMap::const_iterator iter = ft.begin(); iter != ft.end(); iter++) { const string& name(iter->first); const FieldValue& fvalue(*iter->second); uint8_t amqType = fvalue.getType(); if (amqType == 0x32) { Value* subval(new Value(TYPE_UINT64)); subval->setUint64(fvalue.get()); insert(name.c_str(), subval); } else if ((amqType & 0xCF) == 0x02) { Value* subval(new Value(TYPE_UINT32)); switch (amqType) { case 0x02 : subval->setUint(fvalue.get()); break; case 0x12 : subval->setUint(fvalue.get()); break; case 0x22 : subval->setUint(fvalue.get()); break; } insert(name.c_str(), subval); } else if (amqType == 0x31) { // int64 Value* subval(new Value(TYPE_INT64)); subval->setInt64(fvalue.get()); insert(name.c_str(), subval); } else if ((amqType & 0xCF) == 0x01) { // 0x01:int8, 0x11:int16, 0x21:int21 Value* subval(new Value(TYPE_INT32)); subval->setInt((int32_t)fvalue.get()); insert(name.c_str(), subval); } else if (amqType == 0x85 || amqType == 0x95) { Value* subval(new Value(TYPE_LSTR)); subval->setString(fvalue.get().c_str()); insert(name.c_str(), subval); } else if (amqType == 0x23 || amqType == 0x33) { Value* subval(new Value(TYPE_DOUBLE)); subval->setDouble(fvalue.get()); insert(name.c_str(), subval); } else if (amqType == 0xa8) { FieldTable subFt; bool valid = qpid::framing::getEncodedValue(iter->second, subFt); if (valid) { Value* subval(new Value(TYPE_MAP)); subval->impl->initMap(subFt); insert(name.c_str(), subval); } } else if (amqType == 0xa9) { List subList; bool valid = qpid::framing::getEncodedValue(iter->second, subList); if (valid) { Value* subval(new Value(TYPE_LIST)); subval->impl->initList(subList); insert(name.c_str(), subval); } } else if (amqType == 0x08) { Value* subval(new Value(TYPE_BOOL)); subval->setBool(fvalue.get() ? true : false); insert(name.c_str(), subval); } else { QPID_LOG(error, "Unable to decode unsupported AMQP typecode=" << amqType << " map index=" << name); } } } void ValueImpl::mapToFieldTable(FieldTable& ft) const { FieldTable subFt; for (map::const_iterator iter = mapVal.begin(); iter != mapVal.end(); iter++) { const string& name(iter->first); const Value& subval(iter->second); switch (subval.getType()) { case TYPE_UINT8: case TYPE_UINT16: case TYPE_UINT32: ft.setUInt64(name, (uint64_t) subval.asUint()); break; case TYPE_UINT64: case TYPE_DELTATIME: ft.setUInt64(name, subval.asUint64()); break; case TYPE_SSTR: case TYPE_LSTR: ft.setString(name, subval.asString()); break; case TYPE_INT64: case TYPE_ABSTIME: ft.setInt64(name, subval.asInt64()); break; case TYPE_BOOL: ft.set(name, FieldTable::ValuePtr(new BoolValue(subval.asBool()))); break; case TYPE_FLOAT: ft.setFloat(name, subval.asFloat()); break; case TYPE_DOUBLE: ft.setDouble(name, subval.asDouble()); break; case TYPE_INT8: case TYPE_INT16: case TYPE_INT32: ft.setInt(name, subval.asInt()); break; case TYPE_MAP: subFt.clear(); subval.impl->mapToFieldTable(subFt); ft.setTable(name, subFt); break; case TYPE_LIST: { List subList; subval.impl->listToFramingList(subList); ft.set(name, ::qpid::framing::FieldTable::ValuePtr( new ListValue( subList))); } break; case TYPE_ARRAY: case TYPE_OBJECT: case TYPE_UUID: case TYPE_REF: default: break; } } } void ValueImpl::initList(const List& fl) { for (List::const_iterator iter = fl.begin(); iter != fl.end(); iter++) { const FieldValue& fvalue(*iter->get()); uint8_t amqType = fvalue.getType(); if (amqType == 0x32) { Value* subval(new Value(TYPE_UINT64)); subval->setUint64(fvalue.get()); appendToList(subval); } else if ((amqType & 0xCF) == 0x02) { Value* subval(new Value(TYPE_UINT32)); switch (amqType) { case 0x02 : subval->setUint(fvalue.get()); break; // uint8 case 0x12 : subval->setUint(fvalue.get()); break; // uint16 case 0x22 : subval->setUint(fvalue.get()); break; // uint32 } appendToList(subval); } else if (amqType == 0x31) { // int64 Value* subval(new Value(TYPE_INT64)); subval->setInt64(fvalue.get()); appendToList(subval); } else if ((amqType & 0xCF) == 0x01) { // 0x01:int8, 0x11:int16, 0x21:int32 Value* subval(new Value(TYPE_INT32)); subval->setInt((int32_t)fvalue.get()); appendToList(subval); } else if (amqType == 0x85 || amqType == 0x95) { Value* subval(new Value(TYPE_LSTR)); subval->setString(fvalue.get().c_str()); appendToList(subval); } else if (amqType == 0x23 || amqType == 0x33) { Value* subval(new Value(TYPE_DOUBLE)); subval->setDouble(fvalue.get()); appendToList(subval); } else if (amqType == 0xa8) { FieldTable subFt; bool valid = qpid::framing::getEncodedValue(*iter, subFt); if (valid) { Value* subval(new Value(TYPE_MAP)); subval->impl->initMap(subFt); appendToList(subval); } } else if (amqType == 0xa9) { List subList; bool valid = qpid::framing::getEncodedValue(*iter, subList); if (valid) { Value *subVal(new Value(TYPE_LIST)); subVal->impl->initList(subList); appendToList(subVal); } } else if (amqType == 0x08) { Value* subval(new Value(TYPE_BOOL)); subval->setBool(fvalue.get() ? true : false); appendToList(subval); } else { QPID_LOG(error, "Unable to decode unsupported AMQP typecode =" << amqType); } } } void ValueImpl::listToFramingList(List& fl) const { for (vector::const_iterator iter = vectorVal.begin(); iter != vectorVal.end(); iter++) { const Value& subval(*iter); switch (subval.getType()) { case TYPE_UINT8: case TYPE_UINT16: case TYPE_UINT32: fl.push_back(List::ValuePtr(new Unsigned64Value((uint64_t) subval.asUint()))); break; case TYPE_UINT64: case TYPE_DELTATIME: fl.push_back(List::ValuePtr(new Unsigned64Value(subval.asUint64()))); break; case TYPE_SSTR: case TYPE_LSTR: fl.push_back(List::ValuePtr(new Str16Value(subval.asString()))); break; case TYPE_INT64: case TYPE_ABSTIME: fl.push_back(List::ValuePtr(new Integer64Value(subval.asInt64()))); break; case TYPE_BOOL: fl.push_back(List::ValuePtr(new BoolValue(subval.asBool() ? 1 : 0))); break; case TYPE_FLOAT: fl.push_back(List::ValuePtr(new FloatValue(subval.asFloat()))); break; case TYPE_DOUBLE: fl.push_back(List::ValuePtr(new DoubleValue(subval.asDouble()))); break; case TYPE_INT8: case TYPE_INT16: case TYPE_INT32: fl.push_back(List::ValuePtr(new IntegerValue(subval.asInt()))); break; case TYPE_MAP: { FieldTable subFt; subval.impl->mapToFieldTable(subFt); fl.push_back(List::ValuePtr(new FieldTableValue(subFt))); } break; case TYPE_LIST: { List subList; subval.impl->listToFramingList(subList); fl.push_back(List::ValuePtr(new ListValue(subList))); } break; case TYPE_ARRAY: case TYPE_OBJECT: case TYPE_UUID: case TYPE_REF: default: break; } } } void ValueImpl::encode(Buffer& buf) const { FieldTable ft; List fl; switch (typecode) { case TYPE_UINT8 : buf.putOctet((uint8_t) value.u32); break; case TYPE_UINT16 : buf.putShort((uint16_t) value.u32); break; case TYPE_UINT32 : buf.putLong(value.u32); break; case TYPE_UINT64 : buf.putLongLong(value.u64); break; case TYPE_SSTR : buf.putShortString(stringVal); break; case TYPE_LSTR : buf.putMediumString(stringVal); break; case TYPE_ABSTIME : buf.putLongLong(value.s64); break; case TYPE_DELTATIME : buf.putLongLong(value.u64); break; case TYPE_BOOL : buf.putOctet(value.boolVal ? 1 : 0); break; case TYPE_FLOAT : buf.putFloat(value.floatVal); break; case TYPE_DOUBLE : buf.putDouble(value.doubleVal); break; case TYPE_INT8 : buf.putOctet((uint8_t) value.s32); break; case TYPE_INT16 : buf.putShort((uint16_t) value.s32); break; case TYPE_INT32 : buf.putLong(value.s32); break; case TYPE_INT64 : buf.putLongLong(value.s64); break; case TYPE_UUID : buf.putBin128(value.uuidVal); break; case TYPE_REF : refVal.impl->encode(buf); break; case TYPE_MAP: mapToFieldTable(ft); ft.encode(buf); break; case TYPE_LIST: listToFramingList(fl); fl.encode(buf); break; case TYPE_ARRAY: case TYPE_OBJECT: default: break; } } uint32_t ValueImpl::encodedSize() const { FieldTable ft; List fl; switch (typecode) { case TYPE_UINT8 : case TYPE_BOOL : case TYPE_INT8 : return 1; case TYPE_UINT16 : case TYPE_INT16 : return 2; case TYPE_UINT32 : case TYPE_INT32 : case TYPE_FLOAT : return 4; case TYPE_UINT64 : case TYPE_INT64 : case TYPE_DOUBLE : case TYPE_ABSTIME : case TYPE_DELTATIME : return 8; case TYPE_UUID : case TYPE_REF : return 16; case TYPE_SSTR : return 1 + stringVal.size(); case TYPE_LSTR : return 2 + stringVal.size(); case TYPE_MAP: mapToFieldTable(ft); return ft.encodedSize(); case TYPE_LIST: listToFramingList(fl); return fl.encodedSize(); case TYPE_ARRAY: case TYPE_OBJECT: default: break; } return 0; } bool ValueImpl::keyInMap(const char* key) const { return typecode == TYPE_MAP && mapVal.count(key) > 0; } Value* ValueImpl::byKey(const char* key) { if (keyInMap(key)) { map::iterator iter = mapVal.find(key); if (iter != mapVal.end()) return &iter->second; } return 0; } const Value* ValueImpl::byKey(const char* key) const { if (keyInMap(key)) { map::const_iterator iter = mapVal.find(key); if (iter != mapVal.end()) return &iter->second; } return 0; } void ValueImpl::deleteKey(const char* key) { mapVal.erase(key); } void ValueImpl::insert(const char* key, Value* val) { pair entry(key, *val); mapVal.insert(entry); } const char* ValueImpl::key(uint32_t idx) const { map::const_iterator iter = mapVal.begin(); for (uint32_t i = 0; i < idx; i++) { if (iter == mapVal.end()) break; iter++; } if (iter == mapVal.end()) return 0; else return iter->first.c_str(); } Value* ValueImpl::arrayItem(uint32_t) { return 0; } void ValueImpl::appendToArray(Value*) { } void ValueImpl::deleteArrayItem(uint32_t) { } //================================================================== // Wrappers //================================================================== Value::Value(const Value& from) : impl(new ValueImpl(*(from.impl))) {} Value::Value(Typecode t, Typecode at) : impl(new ValueImpl(t, at)) {} Value::Value(ValueImpl* i) : impl(i) {} Value::~Value() { delete impl;} Typecode Value::getType() const { return impl->getType(); } bool Value::isNull() const { return impl->isNull(); } void Value::setNull() { impl->setNull(); } bool Value::isObjectId() const { return impl->isObjectId(); } const ObjectId& Value::asObjectId() const { return impl->asObjectId(); } void Value::setObjectId(const ObjectId& oid) { impl->setObjectId(oid); } bool Value::isUint() const { return impl->isUint(); } uint32_t Value::asUint() const { return impl->asUint(); } void Value::setUint(uint32_t val) { impl->setUint(val); } bool Value::isInt() const { return impl->isInt(); } int32_t Value::asInt() const { return impl->asInt(); } void Value::setInt(int32_t val) { impl->setInt(val); } bool Value::isUint64() const { return impl->isUint64(); } uint64_t Value::asUint64() const { return impl->asUint64(); } void Value::setUint64(uint64_t val) { impl->setUint64(val); } bool Value::isInt64() const { return impl->isInt64(); } int64_t Value::asInt64() const { return impl->asInt64(); } void Value::setInt64(int64_t val) { impl->setInt64(val); } bool Value::isString() const { return impl->isString(); } const char* Value::asString() const { return impl->asString(); } void Value::setString(const char* val) { impl->setString(val); } bool Value::isBool() const { return impl->isBool(); } bool Value::asBool() const { return impl->asBool(); } void Value::setBool(bool val) { impl->setBool(val); } bool Value::isFloat() const { return impl->isFloat(); } float Value::asFloat() const { return impl->asFloat(); } void Value::setFloat(float val) { impl->setFloat(val); } bool Value::isDouble() const { return impl->isDouble(); } double Value::asDouble() const { return impl->asDouble(); } void Value::setDouble(double val) { impl->setDouble(val); } bool Value::isUuid() const { return impl->isUuid(); } const uint8_t* Value::asUuid() const { return impl->asUuid(); } void Value::setUuid(const uint8_t* val) { impl->setUuid(val); } bool Value::isObject() const { return impl->isObject(); } const Object* Value::asObject() const { return impl->asObject(); } void Value::setObject(Object* val) { impl->setObject(val); } bool Value::isMap() const { return impl->isMap(); } bool Value::keyInMap(const char* key) const { return impl->keyInMap(key); } Value* Value::byKey(const char* key) { return impl->byKey(key); } const Value* Value::byKey(const char* key) const { return impl->byKey(key); } void Value::deleteKey(const char* key) { impl->deleteKey(key); } void Value::insert(const char* key, Value* val) { impl->insert(key, val); } uint32_t Value::keyCount() const { return impl->keyCount(); } const char* Value::key(uint32_t idx) const { return impl->key(idx); } bool Value::isList() const { return impl->isList(); } uint32_t Value::listItemCount() const { return impl->listItemCount(); } Value* Value::listItem(uint32_t idx) { return impl->listItem(idx); } void Value::appendToList(Value* val) { impl->appendToList(val); } void Value::deleteListItem(uint32_t idx) { impl->deleteListItem(idx); } bool Value::isArray() const { return impl->isArray(); } Typecode Value::arrayType() const { return impl->arrayType(); } uint32_t Value::arrayItemCount() const { return impl->arrayItemCount(); } Value* Value::arrayItem(uint32_t idx) { return impl->arrayItem(idx); } void Value::appendToArray(Value* val) { impl->appendToArray(val); } void Value::deleteArrayItem(uint32_t idx) { impl->deleteArrayItem(idx); } qpidc-0.16/src/qmf/engine/MessageImpl.h0000664000076400007640000000242211257223366020341 0ustar00jrossjross00000000000000#ifndef _QmfEngineMessageImpl_ #define _QmfEngineMessageImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/Message.h" #include #include namespace qmf { namespace engine { struct MessageImpl { typedef boost::shared_ptr Ptr; std::string body; std::string destination; std::string routingKey; std::string replyExchange; std::string replyKey; std::string userId; Message copy(); }; } } #endif qpidc-0.16/src/qmf/engine/BrokerProxyImpl.cpp0000664000076400007640000007225011513647017021602 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/BrokerProxyImpl.h" #include "qmf/engine/ConsoleImpl.h" #include "qmf/engine/Protocol.h" #include "qpid/Address.h" #include "qpid/sys/SystemInfo.h" #include #include #include #include #include using namespace std; using namespace qmf::engine; using namespace qpid::framing; using namespace qpid::sys; namespace { const char* QMF_EXCHANGE = "qpid.management"; const char* DIR_EXCHANGE = "amq.direct"; const char* BROKER_KEY = "broker"; const char* BROKER_PACKAGE = "org.apache.qpid.broker"; const char* AGENT_CLASS = "agent"; const char* BROKER_AGENT_KEY = "agent.1.0"; } const Object* QueryResponseImpl::getObject(uint32_t idx) const { vector::const_iterator iter = results.begin(); while (idx > 0) { if (iter == results.end()) return 0; iter++; idx--; } return iter->get(); } #define STRING_REF(s) {if (!s.empty()) item.s = const_cast(s.c_str());} BrokerEvent BrokerEventImpl::copy() { BrokerEvent item; ::memset(&item, 0, sizeof(BrokerEvent)); item.kind = kind; STRING_REF(name); STRING_REF(exchange); STRING_REF(bindingKey); item.context = context; item.queryResponse = queryResponse.get(); item.methodResponse = methodResponse.get(); return item; } BrokerProxyImpl::BrokerProxyImpl(BrokerProxy& pub, Console& _console) : publicObject(pub), console(_console) { stringstream qn; qpid::Address addr; SystemInfo::getLocalHostname(addr); qn << "qmfc-" << SystemInfo::getProcessName() << "-" << addr << "-" << SystemInfo::getProcessId(); queueName = qn.str(); seqMgr.setUnsolicitedContext(SequenceContext::Ptr(new StaticContext(*this))); } void BrokerProxyImpl::sessionOpened(SessionHandle& /*sh*/) { Mutex::ScopedLock _lock(lock); agentList.clear(); eventQueue.clear(); xmtQueue.clear(); eventQueue.push_back(eventDeclareQueue(queueName)); eventQueue.push_back(eventBind(DIR_EXCHANGE, queueName, queueName)); eventQueue.push_back(eventSetupComplete()); // TODO: Store session handle } void BrokerProxyImpl::sessionClosed() { Mutex::ScopedLock _lock(lock); agentList.clear(); eventQueue.clear(); xmtQueue.clear(); } void BrokerProxyImpl::startProtocol() { AgentProxyPtr agent(AgentProxyImpl::factory(console, publicObject, 0, "Agent embedded in broker")); { Mutex::ScopedLock _lock(lock); char rawbuffer[512]; Buffer buffer(rawbuffer, 512); agentList[0] = agent; requestsOutstanding = 1; topicBound = false; uint32_t sequence(seqMgr.reserve()); Protocol::encodeHeader(buffer, Protocol::OP_BROKER_REQUEST, sequence); sendBufferLH(buffer, QMF_EXCHANGE, BROKER_KEY); QPID_LOG(trace, "SENT BrokerRequest seq=" << sequence); } console.impl->eventAgentAdded(agent); } void BrokerProxyImpl::sendBufferLH(Buffer& buf, const string& destination, const string& routingKey) { uint32_t length = buf.getPosition(); MessageImpl::Ptr message(new MessageImpl); buf.reset(); buf.getRawData(message->body, length); message->destination = destination; message->routingKey = routingKey; message->replyExchange = DIR_EXCHANGE; message->replyKey = queueName; xmtQueue.push_back(message); } void BrokerProxyImpl::handleRcvMessage(Message& message) { Buffer inBuffer(message.body, message.length); uint8_t opcode; uint32_t sequence; while (Protocol::checkHeader(inBuffer, &opcode, &sequence)) seqMgr.dispatch(opcode, sequence, message.routingKey ? string(message.routingKey) : string(), inBuffer); } bool BrokerProxyImpl::getXmtMessage(Message& item) const { Mutex::ScopedLock _lock(lock); if (xmtQueue.empty()) return false; item = xmtQueue.front()->copy(); return true; } void BrokerProxyImpl::popXmt() { Mutex::ScopedLock _lock(lock); if (!xmtQueue.empty()) xmtQueue.pop_front(); } bool BrokerProxyImpl::getEvent(BrokerEvent& event) const { Mutex::ScopedLock _lock(lock); if (eventQueue.empty()) return false; event = eventQueue.front()->copy(); return true; } void BrokerProxyImpl::popEvent() { Mutex::ScopedLock _lock(lock); if (!eventQueue.empty()) eventQueue.pop_front(); } uint32_t BrokerProxyImpl::agentCount() const { Mutex::ScopedLock _lock(lock); return agentList.size(); } const AgentProxy* BrokerProxyImpl::getAgent(uint32_t idx) const { Mutex::ScopedLock _lock(lock); for (map::const_iterator iter = agentList.begin(); iter != agentList.end(); iter++) if (idx-- == 0) return iter->second.get(); return 0; } void BrokerProxyImpl::sendQuery(const Query& query, void* context, const AgentProxy* agent) { SequenceContext::Ptr queryContext(new QueryContext(*this, context)); Mutex::ScopedLock _lock(lock); bool sent = false; if (agent != 0) { if (sendGetRequestLH(queryContext, query, agent)) sent = true; } else { // TODO (optimization) only send queries to agents that have the requested class+package for (map::const_iterator iter = agentList.begin(); iter != agentList.end(); iter++) { if (sendGetRequestLH(queryContext, query, iter->second.get())) sent = true; } } if (!sent) { queryContext->reserve(); queryContext->release(); } } bool BrokerProxyImpl::sendGetRequestLH(SequenceContext::Ptr queryContext, const Query& query, const AgentProxy* agent) { if (query.impl->singleAgent()) { if (query.impl->agentBank() != agent->getAgentBank()) return false; } stringstream key; Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); uint32_t sequence(seqMgr.reserve(queryContext)); agent->impl->addSequence(sequence); Protocol::encodeHeader(outBuffer, Protocol::OP_GET_QUERY, sequence); query.impl->encode(outBuffer); key << "agent.1." << agent->impl->agentBank; sendBufferLH(outBuffer, QMF_EXCHANGE, key.str()); QPID_LOG(trace, "SENT GetQuery seq=" << sequence << " key=" << key.str()); return true; } string BrokerProxyImpl::encodeMethodArguments(const SchemaMethod* schema, const Value* argmap, Buffer& buffer) { int argCount = schema->getArgumentCount(); if (argmap == 0 || !argmap->isMap()) return string("Arguments must be in a map value"); for (int aIdx = 0; aIdx < argCount; aIdx++) { const SchemaArgument* arg(schema->getArgument(aIdx)); if (arg->getDirection() == DIR_IN || arg->getDirection() == DIR_IN_OUT) { if (argmap->keyInMap(arg->getName())) { const Value* argVal(argmap->byKey(arg->getName())); if (argVal->getType() != arg->getType()) return string("Argument is the wrong type: ") + arg->getName(); argVal->impl->encode(buffer); } else { Value defaultValue(arg->getType()); defaultValue.impl->encode(buffer); } } } return string(); } string BrokerProxyImpl::encodedSizeMethodArguments(const SchemaMethod* schema, const Value* argmap, uint32_t& size) { int argCount = schema->getArgumentCount(); if (argmap == 0 || !argmap->isMap()) return string("Arguments must be in a map value"); for (int aIdx = 0; aIdx < argCount; aIdx++) { const SchemaArgument* arg(schema->getArgument(aIdx)); if (arg->getDirection() == DIR_IN || arg->getDirection() == DIR_IN_OUT) { if (argmap->keyInMap(arg->getName())) { const Value* argVal(argmap->byKey(arg->getName())); if (argVal->getType() != arg->getType()) return string("Argument is the wrong type: ") + arg->getName(); size += argVal->impl->encodedSize(); } else { Value defaultValue(arg->getType()); size += defaultValue.impl->encodedSize(); } } } return string(); } void BrokerProxyImpl::sendMethodRequest(ObjectId* oid, const SchemaObjectClass* cls, const string& methodName, const Value* args, void* userContext) { int methodCount = cls->getMethodCount(); int idx; for (idx = 0; idx < methodCount; idx++) { const SchemaMethod* method = cls->getMethod(idx); if (string(method->getName()) == methodName) { Mutex::ScopedLock _lock(lock); SequenceContext::Ptr methodContext(new MethodContext(*this, userContext, method)); stringstream key; char* buf(outputBuffer); uint32_t bufLen(1024); bool allocated(false); string argErrorString = encodedSizeMethodArguments(method, args, bufLen); if (!argErrorString.empty()) { MethodResponsePtr argError(MethodResponseImpl::factory(1, argErrorString)); eventQueue.push_back(eventMethodResponse(userContext, argError)); return; } if (bufLen > MA_BUFFER_SIZE) { buf = (char*) malloc(bufLen); allocated = true; } Buffer outBuffer(buf, bufLen); uint32_t sequence(seqMgr.reserve(methodContext)); Protocol::encodeHeader(outBuffer, Protocol::OP_METHOD_REQUEST, sequence); oid->impl->encode(outBuffer); cls->getClassKey()->impl->encode(outBuffer); outBuffer.putShortString(methodName); encodeMethodArguments(method, args, outBuffer); key << "agent.1." << oid->impl->getAgentBank(); sendBufferLH(outBuffer, QMF_EXCHANGE, key.str()); QPID_LOG(trace, "SENT MethodRequest seq=" << sequence << " method=" << methodName << " key=" << key.str()); if (allocated) free(buf); return; } } MethodResponsePtr error(MethodResponseImpl::factory(1, string("Unknown method: ") + methodName)); Mutex::ScopedLock _lock(lock); eventQueue.push_back(eventMethodResponse(userContext, error)); } void BrokerProxyImpl::addBinding(const string& exchange, const string& key) { Mutex::ScopedLock _lock(lock); eventQueue.push_back(eventBind(exchange, queueName, key)); } BrokerEventImpl::Ptr BrokerProxyImpl::eventDeclareQueue(const string& queueName) { BrokerEventImpl::Ptr event(new BrokerEventImpl(BrokerEvent::DECLARE_QUEUE)); event->name = queueName; return event; } BrokerEventImpl::Ptr BrokerProxyImpl::eventBind(const string& exchange, const string& queue, const string& key) { BrokerEventImpl::Ptr event(new BrokerEventImpl(BrokerEvent::BIND)); event->name = queue; event->exchange = exchange; event->bindingKey = key; return event; } BrokerEventImpl::Ptr BrokerProxyImpl::eventSetupComplete() { BrokerEventImpl::Ptr event(new BrokerEventImpl(BrokerEvent::SETUP_COMPLETE)); return event; } BrokerEventImpl::Ptr BrokerProxyImpl::eventStable() { QPID_LOG(trace, "Console Link to Broker Stable"); BrokerEventImpl::Ptr event(new BrokerEventImpl(BrokerEvent::STABLE)); return event; } BrokerEventImpl::Ptr BrokerProxyImpl::eventQueryComplete(void* context, QueryResponsePtr response) { BrokerEventImpl::Ptr event(new BrokerEventImpl(BrokerEvent::QUERY_COMPLETE)); event->context = context; event->queryResponse = response; return event; } BrokerEventImpl::Ptr BrokerProxyImpl::eventMethodResponse(void* context, MethodResponsePtr response) { BrokerEventImpl::Ptr event(new BrokerEventImpl(BrokerEvent::METHOD_RESPONSE)); event->context = context; event->methodResponse = response; return event; } void BrokerProxyImpl::handleBrokerResponse(Buffer& inBuffer, uint32_t seq) { brokerId.decode(inBuffer); QPID_LOG(trace, "RCVD BrokerResponse seq=" << seq << " brokerId=" << brokerId); Mutex::ScopedLock _lock(lock); Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); uint32_t sequence(seqMgr.reserve()); incOutstandingLH(); Protocol::encodeHeader(outBuffer, Protocol::OP_PACKAGE_REQUEST, sequence); sendBufferLH(outBuffer, QMF_EXCHANGE, BROKER_KEY); QPID_LOG(trace, "SENT PackageRequest seq=" << sequence); } void BrokerProxyImpl::handlePackageIndication(Buffer& inBuffer, uint32_t seq) { string package; inBuffer.getShortString(package); QPID_LOG(trace, "RCVD PackageIndication seq=" << seq << " package=" << package); console.impl->learnPackage(package); Mutex::ScopedLock _lock(lock); Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); uint32_t sequence(seqMgr.reserve()); incOutstandingLH(); Protocol::encodeHeader(outBuffer, Protocol::OP_CLASS_QUERY, sequence); outBuffer.putShortString(package); sendBufferLH(outBuffer, QMF_EXCHANGE, BROKER_KEY); QPID_LOG(trace, "SENT ClassQuery seq=" << sequence << " package=" << package); } void BrokerProxyImpl::handleCommandComplete(Buffer& inBuffer, uint32_t seq) { string text; uint32_t code = inBuffer.getLong(); inBuffer.getShortString(text); QPID_LOG(trace, "RCVD CommandComplete seq=" << seq << " code=" << code << " text=" << text); } void BrokerProxyImpl::handleClassIndication(Buffer& inBuffer, uint32_t seq) { uint8_t kind = inBuffer.getOctet(); auto_ptr classKey(SchemaClassKeyImpl::factory(inBuffer)); QPID_LOG(trace, "RCVD ClassIndication seq=" << seq << " kind=" << (int) kind << " key=" << classKey->impl->str()); if (!console.impl->haveClass(classKey.get())) { Mutex::ScopedLock _lock(lock); incOutstandingLH(); Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); uint32_t sequence(seqMgr.reserve()); Protocol::encodeHeader(outBuffer, Protocol::OP_SCHEMA_REQUEST, sequence); classKey->impl->encode(outBuffer); sendBufferLH(outBuffer, QMF_EXCHANGE, BROKER_KEY); QPID_LOG(trace, "SENT SchemaRequest seq=" << sequence <<" key=" << classKey->impl->str()); } } MethodResponsePtr BrokerProxyImpl::handleMethodResponse(Buffer& inBuffer, uint32_t seq, const SchemaMethod* schema) { MethodResponsePtr response(MethodResponseImpl::factory(inBuffer, schema)); QPID_LOG(trace, "RCVD MethodResponse seq=" << seq << " status=" << response->getStatus() << " text=" << response->getException()->asString()); return response; } void BrokerProxyImpl::handleHeartbeatIndication(Buffer& inBuffer, uint32_t seq, const string& routingKey) { vector tokens = qpid::split(routingKey, "."); uint32_t agentBank; uint64_t timestamp; if (routingKey.empty() || tokens.size() != 4) agentBank = 0; else agentBank = ::atoi(tokens[3].c_str()); timestamp = inBuffer.getLongLong(); map::const_iterator iter = agentList.find(agentBank); if (iter != agentList.end()) { console.impl->eventAgentHeartbeat(iter->second, timestamp); } QPID_LOG(trace, "RCVD HeartbeatIndication seq=" << seq << " agentBank=" << agentBank); } void BrokerProxyImpl::handleEventIndication(Buffer& inBuffer, uint32_t seq) { auto_ptr classKey(SchemaClassKeyImpl::factory(inBuffer)); const SchemaEventClass *schema = console.impl->getEventClass(classKey.get()); if (schema == 0) { QPID_LOG(trace, "No Schema Found for EventIndication. seq=" << seq << " key=" << classKey->impl->str()); return; } EventPtr eptr(EventImpl::factory(schema, inBuffer)); console.impl->eventEventReceived(eptr); QPID_LOG(trace, "RCVD EventIndication seq=" << seq << " key=" << classKey->impl->str()); } void BrokerProxyImpl::handleSchemaResponse(Buffer& inBuffer, uint32_t seq) { SchemaObjectClass* oClassPtr; SchemaEventClass* eClassPtr; uint8_t kind = inBuffer.getOctet(); const SchemaClassKey* key; if (kind == CLASS_OBJECT) { oClassPtr = SchemaObjectClassImpl::factory(inBuffer); console.impl->learnClass(oClassPtr); key = oClassPtr->getClassKey(); QPID_LOG(trace, "RCVD SchemaResponse seq=" << seq << " kind=object key=" << key->impl->str()); // // If we have just learned about the org.apache.qpid.broker:agent class, send a get // request for the current list of agents so we can have it on-hand before we declare // this session "stable". // if (key->impl->getClassName() == AGENT_CLASS && key->impl->getPackageName() == BROKER_PACKAGE) { Mutex::ScopedLock _lock(lock); incOutstandingLH(); Buffer outBuffer(outputBuffer, MA_BUFFER_SIZE); uint32_t sequence(seqMgr.reserve()); Protocol::encodeHeader(outBuffer, Protocol::OP_GET_QUERY, sequence); FieldTable ft; ft.setString("_class", AGENT_CLASS); ft.setString("_package", BROKER_PACKAGE); ft.encode(outBuffer); sendBufferLH(outBuffer, QMF_EXCHANGE, BROKER_AGENT_KEY); QPID_LOG(trace, "SENT GetQuery seq=" << sequence << " key=" << BROKER_AGENT_KEY); } } else if (kind == CLASS_EVENT) { eClassPtr = SchemaEventClassImpl::factory(inBuffer); console.impl->learnClass(eClassPtr); key = eClassPtr->getClassKey(); QPID_LOG(trace, "RCVD SchemaResponse seq=" << seq << " kind=event key=" << key->impl->str()); } else { QPID_LOG(error, "BrokerProxyImpl::handleSchemaResponse received unknown class kind: " << (int) kind); } } ObjectPtr BrokerProxyImpl::handleObjectIndication(Buffer& inBuffer, uint32_t seq, bool prop, bool stat) { auto_ptr classKey(SchemaClassKeyImpl::factory(inBuffer)); QPID_LOG(trace, "RCVD ObjectIndication seq=" << seq << " key=" << classKey->impl->str()); SchemaObjectClass* schema = console.impl->getSchema(classKey.get()); if (schema == 0) { QPID_LOG(trace, "No Schema Found for ObjectIndication. seq=" << seq << " key=" << classKey->impl->str()); return ObjectPtr(); } ObjectPtr optr(ObjectImpl::factory(schema, this, inBuffer, prop, stat, true)); if (prop && classKey->impl->getPackageName() == BROKER_PACKAGE && classKey->impl->getClassName() == AGENT_CLASS) { // // We've intercepted information about a remote agent... update the agent list accordingly // updateAgentList(optr); } return optr; } void BrokerProxyImpl::updateAgentList(ObjectPtr obj) { Value* value = obj->getValue("agentBank"); Mutex::ScopedLock _lock(lock); if (value != 0 && value->isUint()) { uint32_t agentBank = value->asUint(); if (obj->isDeleted()) { map::iterator iter = agentList.find(agentBank); if (iter != agentList.end()) { AgentProxyPtr agent(iter->second); console.impl->eventAgentDeleted(agent); agentList.erase(agentBank); QPID_LOG(trace, "Agent at bank " << agentBank << " removed from agent list"); // // Release all sequence numbers for requests in-flight to this agent. // Since the agent is no longer connected, these requests would not // otherwise complete. // agent->impl->releaseInFlight(seqMgr); } } else { Value* str = obj->getValue("label"); string label; if (str != 0 && str->isString()) label = str->asString(); map::const_iterator iter = agentList.find(agentBank); if (iter == agentList.end()) { AgentProxyPtr agent(AgentProxyImpl::factory(console, publicObject, agentBank, label)); agentList[agentBank] = agent; console.impl->eventAgentAdded(agent); QPID_LOG(trace, "Agent '" << label << "' found at bank " << agentBank); } } } } void BrokerProxyImpl::incOutstandingLH() { requestsOutstanding++; } void BrokerProxyImpl::decOutstanding() { Mutex::ScopedLock _lock(lock); requestsOutstanding--; if (requestsOutstanding == 0 && !topicBound) { topicBound = true; for (vector >::const_iterator iter = console.impl->bindingList.begin(); iter != console.impl->bindingList.end(); iter++) { string exchange(iter->first.empty() ? QMF_EXCHANGE : iter->first); string key(iter->second); eventQueue.push_back(eventBind(exchange, queueName, key)); } eventQueue.push_back(eventStable()); } } MethodResponseImpl::MethodResponseImpl(const MethodResponseImpl& from) : status(from.status), schema(from.schema) { if (from.exception.get()) exception.reset(new Value(*(from.exception))); if (from.arguments.get()) arguments.reset(new Value(*(from.arguments))); } MethodResponseImpl::MethodResponseImpl(Buffer& buf, const SchemaMethod* s) : schema(s) { string text; status = buf.getLong(); buf.getMediumString(text); exception.reset(new Value(TYPE_LSTR)); exception->setString(text.c_str()); if (status != 0) return; arguments.reset(new Value(TYPE_MAP)); int argCount(schema->getArgumentCount()); for (int idx = 0; idx < argCount; idx++) { const SchemaArgument* arg = schema->getArgument(idx); if (arg->getDirection() == DIR_OUT || arg->getDirection() == DIR_IN_OUT) { Value* value(ValueImpl::factory(arg->getType(), buf)); arguments->insert(arg->getName(), value); } } } MethodResponseImpl::MethodResponseImpl(uint32_t s, const string& text) : schema(0) { status = s; exception.reset(new Value(TYPE_LSTR)); exception->setString(text.c_str()); } MethodResponse* MethodResponseImpl::factory(Buffer& buf, const SchemaMethod* schema) { MethodResponseImpl* impl(new MethodResponseImpl(buf, schema)); return new MethodResponse(impl); } MethodResponse* MethodResponseImpl::factory(uint32_t status, const std::string& text) { MethodResponseImpl* impl(new MethodResponseImpl(status, text)); return new MethodResponse(impl); } bool StaticContext::handleMessage(uint8_t opcode, uint32_t sequence, const string& routingKey, Buffer& buffer) { ObjectPtr object; bool completeContext = false; if (opcode == Protocol::OP_BROKER_RESPONSE) { broker.handleBrokerResponse(buffer, sequence); completeContext = true; } else if (opcode == Protocol::OP_COMMAND_COMPLETE) { broker.handleCommandComplete(buffer, sequence); completeContext = true; } else if (opcode == Protocol::OP_SCHEMA_RESPONSE) { broker.handleSchemaResponse(buffer, sequence); completeContext = true; } else if (opcode == Protocol::OP_PACKAGE_INDICATION) broker.handlePackageIndication(buffer, sequence); else if (opcode == Protocol::OP_CLASS_INDICATION) broker.handleClassIndication(buffer, sequence); else if (opcode == Protocol::OP_HEARTBEAT_INDICATION) broker.handleHeartbeatIndication(buffer, sequence, routingKey); else if (opcode == Protocol::OP_EVENT_INDICATION) broker.handleEventIndication(buffer, sequence); else if (opcode == Protocol::OP_PROPERTY_INDICATION) { object = broker.handleObjectIndication(buffer, sequence, true, false); broker.console.impl->eventObjectUpdate(object, true, false); } else if (opcode == Protocol::OP_STATISTIC_INDICATION) { object = broker.handleObjectIndication(buffer, sequence, false, true); broker.console.impl->eventObjectUpdate(object, false, true); } else if (opcode == Protocol::OP_OBJECT_INDICATION) { object = broker.handleObjectIndication(buffer, sequence, true, true); broker.console.impl->eventObjectUpdate(object, true, true); } else { QPID_LOG(trace, "StaticContext::handleMessage invalid opcode: " << opcode); completeContext = true; } return completeContext; } void QueryContext::reserve() { Mutex::ScopedLock _lock(lock); requestsOutstanding++; } void QueryContext::release() { { Mutex::ScopedLock _lock(lock); if (--requestsOutstanding > 0) return; } Mutex::ScopedLock _block(broker.lock); broker.eventQueue.push_back(broker.eventQueryComplete(userContext, queryResponse)); } bool QueryContext::handleMessage(uint8_t opcode, uint32_t sequence, const string& /*routingKey*/, Buffer& buffer) { bool completeContext = false; ObjectPtr object; if (opcode == Protocol::OP_COMMAND_COMPLETE) { broker.handleCommandComplete(buffer, sequence); completeContext = true; // // Visit each agent and remove the sequence from that agent's in-flight list. // This could be made more efficient because only one agent will have this sequence // in its list. // map copy; { Mutex::ScopedLock _block(broker.lock); copy = broker.agentList; } for (map::iterator iter = copy.begin(); iter != copy.end(); iter++) iter->second->impl->delSequence(sequence); } else if (opcode == Protocol::OP_OBJECT_INDICATION) { object = broker.handleObjectIndication(buffer, sequence, true, true); if (object.get() != 0) queryResponse->impl->results.push_back(object); } else { QPID_LOG(trace, "QueryContext::handleMessage invalid opcode: " << opcode); completeContext = true; } return completeContext; } void MethodContext::release() { Mutex::ScopedLock _block(broker.lock); broker.eventQueue.push_back(broker.eventMethodResponse(userContext, methodResponse)); } bool MethodContext::handleMessage(uint8_t opcode, uint32_t sequence, const string& /*routingKey*/, Buffer& buffer) { if (opcode == Protocol::OP_METHOD_RESPONSE) methodResponse = broker.handleMethodResponse(buffer, sequence, schema); else QPID_LOG(trace, "QueryContext::handleMessage invalid opcode: " << opcode); return true; } //================================================================== // Wrappers //================================================================== AgentProxy::AgentProxy(AgentProxyImpl* i) : impl(i) {} AgentProxy::AgentProxy(const AgentProxy& from) : impl(new AgentProxyImpl(*(from.impl))) {} AgentProxy::~AgentProxy() { delete impl; } const char* AgentProxy::getLabel() const { return impl->getLabel().c_str(); } uint32_t AgentProxy::getBrokerBank() const { return impl->getBrokerBank(); } uint32_t AgentProxy::getAgentBank() const { return impl->getAgentBank(); } BrokerProxy::BrokerProxy(Console& console) : impl(new BrokerProxyImpl(*this, console)) {} BrokerProxy::~BrokerProxy() { delete impl; } void BrokerProxy::sessionOpened(SessionHandle& sh) { impl->sessionOpened(sh); } void BrokerProxy::sessionClosed() { impl->sessionClosed(); } void BrokerProxy::startProtocol() { impl->startProtocol(); } void BrokerProxy::handleRcvMessage(Message& message) { impl->handleRcvMessage(message); } bool BrokerProxy::getXmtMessage(Message& item) const { return impl->getXmtMessage(item); } void BrokerProxy::popXmt() { impl->popXmt(); } bool BrokerProxy::getEvent(BrokerEvent& event) const { return impl->getEvent(event); } void BrokerProxy::popEvent() { impl->popEvent(); } uint32_t BrokerProxy::agentCount() const { return impl->agentCount(); } const AgentProxy* BrokerProxy::getAgent(uint32_t idx) const { return impl->getAgent(idx); } void BrokerProxy::sendQuery(const Query& query, void* context, const AgentProxy* agent) { impl->sendQuery(query, context, agent); } MethodResponse::MethodResponse(const MethodResponse& from) : impl(new MethodResponseImpl(*(from.impl))) {} MethodResponse::MethodResponse(MethodResponseImpl* i) : impl(i) {} MethodResponse::~MethodResponse() {} uint32_t MethodResponse::getStatus() const { return impl->getStatus(); } const Value* MethodResponse::getException() const { return impl->getException(); } const Value* MethodResponse::getArgs() const { return impl->getArgs(); } QueryResponse::QueryResponse(QueryResponseImpl* i) : impl(i) {} QueryResponse::~QueryResponse() {} uint32_t QueryResponse::getStatus() const { return impl->getStatus(); } const Value* QueryResponse::getException() const { return impl->getException(); } uint32_t QueryResponse::getObjectCount() const { return impl->getObjectCount(); } const Object* QueryResponse::getObject(uint32_t idx) const { return impl->getObject(idx); } qpidc-0.16/src/qmf/engine/SchemaImpl.h0000664000076400007640000002250311646077645020170 0ustar00jrossjross00000000000000#ifndef _QmfEngineSchemaImpl_ #define _QmfEngineSchemaImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/Schema.h" #include "qpid/framing/Buffer.h" #include #include #include namespace qmf { namespace engine { // TODO: Destructors for schema classes // TODO: Add "frozen" attribute for schema classes so they can't be modified after // they've been registered. class SchemaHash { union h { uint8_t b[16]; uint64_t q[2]; } hash; public: SchemaHash(); void encode(qpid::framing::Buffer& buffer) const; void decode(qpid::framing::Buffer& buffer); void update(const char* data, uint32_t len); void update(uint8_t data); void update(const std::string& data) { update(data.c_str(), data.size()); } void update(Typecode t) { update((uint8_t) t); } void update(Direction d) { update((uint8_t) d); } void update(Access a) { update((uint8_t) a); } void update(bool b) { update((uint8_t) (b ? 1 : 0)); } const uint8_t* get() const { return hash.b; } bool operator==(const SchemaHash& other) const; bool operator<(const SchemaHash& other) const; bool operator>(const SchemaHash& other) const; }; struct SchemaArgumentImpl { std::string name; Typecode typecode; Direction dir; std::string unit; std::string description; SchemaArgumentImpl(const char* n, Typecode t) : name(n), typecode(t), dir(DIR_IN) {} SchemaArgumentImpl(qpid::framing::Buffer& buffer); static SchemaArgument* factory(qpid::framing::Buffer& buffer); void encode(qpid::framing::Buffer& buffer) const; void setDirection(Direction d) { dir = d; } void setUnit(const char* val) { unit = val; } void setDesc(const char* desc) { description = desc; } const std::string& getName() const { return name; } Typecode getType() const { return typecode; } Direction getDirection() const { return dir; } const std::string& getUnit() const { return unit; } const std::string& getDesc() const { return description; } void updateHash(SchemaHash& hash) const; }; struct SchemaMethodImpl { std::string name; std::string description; std::vector arguments; SchemaMethodImpl(const char* n) : name(n) {} SchemaMethodImpl(qpid::framing::Buffer& buffer); static SchemaMethod* factory(qpid::framing::Buffer& buffer); void encode(qpid::framing::Buffer& buffer) const; void addArgument(const SchemaArgument* argument); void setDesc(const char* desc) { description = desc; } const std::string& getName() const { return name; } const std::string& getDesc() const { return description; } int getArgumentCount() const { return arguments.size(); } const SchemaArgument* getArgument(int idx) const; void updateHash(SchemaHash& hash) const; }; struct SchemaPropertyImpl { std::string name; Typecode typecode; Access access; bool index; bool optional; std::string unit; std::string description; SchemaPropertyImpl(const char* n, Typecode t) : name(n), typecode(t), access(ACCESS_READ_ONLY), index(false), optional(false) {} SchemaPropertyImpl(qpid::framing::Buffer& buffer); static SchemaProperty* factory(qpid::framing::Buffer& buffer); void encode(qpid::framing::Buffer& buffer) const; void setAccess(Access a) { access = a; } void setIndex(bool val) { index = val; } void setOptional(bool val) { optional = val; } void setUnit(const char* val) { unit = val; } void setDesc(const char* desc) { description = desc; } const std::string& getName() const { return name; } Typecode getType() const { return typecode; } Access getAccess() const { return access; } bool isIndex() const { return index; } bool isOptional() const { return optional; } const std::string& getUnit() const { return unit; } const std::string& getDesc() const { return description; } void updateHash(SchemaHash& hash) const; }; struct SchemaStatisticImpl { std::string name; Typecode typecode; std::string unit; std::string description; SchemaStatisticImpl(const char* n, Typecode t) : name(n), typecode(t) {} SchemaStatisticImpl(qpid::framing::Buffer& buffer); static SchemaStatistic* factory(qpid::framing::Buffer& buffer); void encode(qpid::framing::Buffer& buffer) const; void setUnit(const char* val) { unit = val; } void setDesc(const char* desc) { description = desc; } const std::string& getName() const { return name; } Typecode getType() const { return typecode; } const std::string& getUnit() const { return unit; } const std::string& getDesc() const { return description; } void updateHash(SchemaHash& hash) const; }; struct SchemaClassKeyImpl { const std::string& package; const std::string& name; const SchemaHash& hash; mutable std::string repr; // The *Container elements are only used if there isn't an external place to // store these values. std::string packageContainer; std::string nameContainer; SchemaHash hashContainer; SchemaClassKeyImpl(const std::string& package, const std::string& name, const SchemaHash& hash); SchemaClassKeyImpl(qpid::framing::Buffer& buffer); static SchemaClassKey* factory(const std::string& package, const std::string& name, const SchemaHash& hash); static SchemaClassKey* factory(qpid::framing::Buffer& buffer); const std::string& getPackageName() const { return package; } const std::string& getClassName() const { return name; } const uint8_t* getHash() const { return hash.get(); } void encode(qpid::framing::Buffer& buffer) const; bool operator==(const SchemaClassKeyImpl& other) const; bool operator<(const SchemaClassKeyImpl& other) const; const std::string& str() const; }; struct SchemaObjectClassImpl { std::string package; std::string name; mutable SchemaHash hash; mutable bool hasHash; std::auto_ptr classKey; std::vector properties; std::vector statistics; std::vector methods; SchemaObjectClassImpl(const char* p, const char* n) : package(p), name(n), hasHash(false), classKey(SchemaClassKeyImpl::factory(package, name, hash)) {} SchemaObjectClassImpl(qpid::framing::Buffer& buffer); static SchemaObjectClass* factory(qpid::framing::Buffer& buffer); void encode(qpid::framing::Buffer& buffer) const; void addProperty(const SchemaProperty* property); void addStatistic(const SchemaStatistic* statistic); void addMethod(const SchemaMethod* method); const SchemaClassKey* getClassKey() const; int getPropertyCount() const { return properties.size(); } int getStatisticCount() const { return statistics.size(); } int getMethodCount() const { return methods.size(); } const SchemaProperty* getProperty(int idx) const; const SchemaStatistic* getStatistic(int idx) const; const SchemaMethod* getMethod(int idx) const; }; struct SchemaEventClassImpl { std::string package; std::string name; mutable SchemaHash hash; mutable bool hasHash; std::auto_ptr classKey; std::string description; Severity severity; std::vector arguments; SchemaEventClassImpl(const char* p, const char* n, Severity sev) : package(p), name(n), hasHash(false), classKey(SchemaClassKeyImpl::factory(package, name, hash)), severity(sev) {} SchemaEventClassImpl(qpid::framing::Buffer& buffer); static SchemaEventClass* factory(qpid::framing::Buffer& buffer); void encode(qpid::framing::Buffer& buffer) const; void addArgument(const SchemaArgument* argument); void setDesc(const char* desc) { description = desc; } const SchemaClassKey* getClassKey() const; Severity getSeverity() const { return severity; } int getArgumentCount() const { return arguments.size(); } const SchemaArgument* getArgument(int idx) const; }; } } #endif qpidc-0.16/src/qmf/engine/Protocol.h0000664000076400007640000000461011257223366017735 0ustar00jrossjross00000000000000#ifndef _QmfEngineProtocol_ #define _QmfEngineProtocol_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include namespace qpid { namespace framing { class Buffer; } } namespace qmf { namespace engine { class Protocol { public: static bool checkHeader(qpid::framing::Buffer& buf, uint8_t *opcode, uint32_t *seq); static void encodeHeader(qpid::framing::Buffer& buf, uint8_t opcode, uint32_t seq = 0); const static uint8_t OP_ATTACH_REQUEST = 'A'; const static uint8_t OP_ATTACH_RESPONSE = 'a'; const static uint8_t OP_BROKER_REQUEST = 'B'; const static uint8_t OP_BROKER_RESPONSE = 'b'; const static uint8_t OP_CONSOLE_ADDED_INDICATION = 'x'; const static uint8_t OP_COMMAND_COMPLETE = 'z'; const static uint8_t OP_HEARTBEAT_INDICATION = 'h'; const static uint8_t OP_PACKAGE_REQUEST = 'P'; const static uint8_t OP_PACKAGE_INDICATION = 'p'; const static uint8_t OP_CLASS_QUERY = 'Q'; const static uint8_t OP_CLASS_INDICATION = 'q'; const static uint8_t OP_SCHEMA_REQUEST = 'S'; const static uint8_t OP_SCHEMA_RESPONSE = 's'; const static uint8_t OP_METHOD_REQUEST = 'M'; const static uint8_t OP_METHOD_RESPONSE = 'm'; const static uint8_t OP_GET_QUERY = 'G'; const static uint8_t OP_OBJECT_INDICATION = 'g'; const static uint8_t OP_PROPERTY_INDICATION = 'c'; const static uint8_t OP_STATISTIC_INDICATION = 'i'; const static uint8_t OP_EVENT_INDICATION = 'e'; }; } } #endif qpidc-0.16/src/qmf/engine/ObjectIdImpl.h0000664000076400007640000000473011306256021020431 0ustar00jrossjross00000000000000#ifndef _QmfEngineObjectIdImpl_ #define _QmfEngineObjectIdImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include namespace qmf { namespace engine { struct AgentAttachment { uint64_t first; AgentAttachment() : first(0) {} void setBanks(uint32_t broker, uint32_t bank); uint64_t getFirst() const { return first; } }; struct ObjectIdImpl { AgentAttachment* agent; uint64_t first; uint64_t second; mutable std::string repr; ObjectIdImpl() : agent(0), first(0), second(0) {} ObjectIdImpl(qpid::framing::Buffer& buffer); ObjectIdImpl(AgentAttachment* agent, uint8_t flags, uint16_t seq, uint64_t object); static ObjectId* factory(qpid::framing::Buffer& buffer); static ObjectId* factory(AgentAttachment* agent, uint8_t flags, uint16_t seq, uint64_t object); void decode(qpid::framing::Buffer& buffer); void encode(qpid::framing::Buffer& buffer) const; void fromString(const std::string& repr); const std::string& asString() const; uint8_t getFlags() const; uint16_t getSequence() const; uint32_t getBrokerBank() const; uint32_t getAgentBank() const; uint64_t getObjectNum() const; uint32_t getObjectNumHi() const; uint32_t getObjectNumLo() const; bool isDurable() const { return getSequence() == 0; } void setValue(uint64_t f, uint64_t s) { first = f; second = s; agent = 0; } bool operator==(const ObjectIdImpl& other) const; bool operator<(const ObjectIdImpl& other) const; bool operator>(const ObjectIdImpl& other) const; }; } } #endif qpidc-0.16/src/qmf/engine/QueryImpl.h0000664000076400007640000000725111265713077020071 0ustar00jrossjross00000000000000#ifndef _QmfEngineQueryImpl_ #define _QmfEngineQueryImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/Query.h" #include "qmf/engine/Schema.h" #include #include namespace qpid { namespace framing { class Buffer; } } namespace qmf { namespace engine { struct QueryElementImpl { QueryElementImpl(const std::string& a, const Value* v, ValueOper o) : attrName(a), value(v), oper(o) {} ~QueryElementImpl() {} bool evaluate(const Object* object) const; std::string attrName; const Value* value; ValueOper oper; }; struct QueryExpressionImpl { QueryExpressionImpl(ExprOper o, const QueryOperand* operand1, const QueryOperand* operand2) : oper(o), left(operand1), right(operand2) {} ~QueryExpressionImpl() {} bool evaluate(const Object* object) const; ExprOper oper; const QueryOperand* left; const QueryOperand* right; }; struct QueryImpl { // Constructors mapped to public QueryImpl(const std::string& c, const std::string& p) : packageName(p), className(c), select(0), resultLimit(0) {} QueryImpl(const SchemaClassKey* key) : packageName(key->getPackageName()), className(key->getClassName()), select(0), resultLimit(0) {} QueryImpl(const ObjectId* oid) : oid(new ObjectId(*oid)), select(0), resultLimit(0) {} // Factory constructors QueryImpl(qpid::framing::Buffer& buffer); ~QueryImpl() {}; static Query* factory(qpid::framing::Buffer& buffer); void setSelect(const QueryOperand* criterion) { select = criterion; } void setLimit(uint32_t maxResults) { resultLimit = maxResults; } void setOrderBy(const std::string& attrName, bool decreasing) { orderBy = attrName; orderDecreasing = decreasing; } const std::string& getPackage() const { return packageName; } const std::string& getClass() const { return className; } const ObjectId* getObjectId() const { return oid.get(); } bool haveSelect() const { return select != 0; } bool haveLimit() const { return resultLimit > 0; } bool haveOrderBy() const { return !orderBy.empty(); } const QueryOperand* getSelect() const { return select; } uint32_t getLimit() const { return resultLimit; } const std::string& getOrderBy() const { return orderBy; } bool getDecreasing() const { return orderDecreasing; } void encode(qpid::framing::Buffer& buffer) const; bool singleAgent() const { return oid.get() != 0; } uint32_t agentBank() const { return singleAgent() ? oid->getAgentBank() : 0; } std::string packageName; std::string className; boost::shared_ptr oid; const QueryOperand* select; uint32_t resultLimit; std::string orderBy; bool orderDecreasing; }; } } #endif qpidc-0.16/src/qmf/engine/BrokerProxyImpl.h0000664000076400007640000002335711513647017021253 0ustar00jrossjross00000000000000#ifndef _QmfEngineBrokerProxyImpl_ #define _QmfEngineBrokerProxyImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/Console.h" #include "qmf/engine/ObjectImpl.h" #include "qmf/engine/EventImpl.h" #include "qmf/engine/SchemaImpl.h" #include "qmf/engine/ValueImpl.h" #include "qmf/engine/QueryImpl.h" #include "qmf/engine/SequenceManager.h" #include "qmf/engine/MessageImpl.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/Uuid.h" #include "qpid/sys/Mutex.h" #include "boost/shared_ptr.hpp" #include "boost/noncopyable.hpp" #include #include #include #include #include #include namespace qmf { namespace engine { typedef boost::shared_ptr MethodResponsePtr; struct MethodResponseImpl { uint32_t status; const SchemaMethod* schema; std::auto_ptr exception; std::auto_ptr arguments; MethodResponseImpl(const MethodResponseImpl& from); MethodResponseImpl(qpid::framing::Buffer& buf, const SchemaMethod* schema); MethodResponseImpl(uint32_t status, const std::string& text); static MethodResponse* factory(qpid::framing::Buffer& buf, const SchemaMethod* schema); static MethodResponse* factory(uint32_t status, const std::string& text); ~MethodResponseImpl() {} uint32_t getStatus() const { return status; } const Value* getException() const { return exception.get(); } const Value* getArgs() const { return arguments.get(); } }; typedef boost::shared_ptr QueryResponsePtr; struct QueryResponseImpl { uint32_t status; std::auto_ptr exception; std::vector results; QueryResponseImpl() : status(0) {} static QueryResponse* factory() { QueryResponseImpl* impl(new QueryResponseImpl()); return new QueryResponse(impl); } ~QueryResponseImpl() {} uint32_t getStatus() const { return status; } const Value* getException() const { return exception.get(); } uint32_t getObjectCount() const { return results.size(); } const Object* getObject(uint32_t idx) const; }; struct BrokerEventImpl { typedef boost::shared_ptr Ptr; BrokerEvent::EventKind kind; std::string name; std::string exchange; std::string bindingKey; void* context; QueryResponsePtr queryResponse; MethodResponsePtr methodResponse; BrokerEventImpl(BrokerEvent::EventKind k) : kind(k), context(0) {} ~BrokerEventImpl() {} BrokerEvent copy(); }; typedef boost::shared_ptr AgentProxyPtr; struct AgentProxyImpl { Console& console; BrokerProxy& broker; uint32_t agentBank; std::string label; std::set inFlightSequences; AgentProxyImpl(Console& c, BrokerProxy& b, uint32_t ab, const std::string& l) : console(c), broker(b), agentBank(ab), label(l) {} static AgentProxy* factory(Console& c, BrokerProxy& b, uint32_t ab, const std::string& l) { AgentProxyImpl* impl(new AgentProxyImpl(c, b, ab, l)); return new AgentProxy(impl); } ~AgentProxyImpl() {} const std::string& getLabel() const { return label; } uint32_t getBrokerBank() const { return 1; } uint32_t getAgentBank() const { return agentBank; } void addSequence(uint32_t seq) { inFlightSequences.insert(seq); } void delSequence(uint32_t seq) { inFlightSequences.erase(seq); } void releaseInFlight(SequenceManager& seqMgr) { for (std::set::iterator iter = inFlightSequences.begin(); iter != inFlightSequences.end(); iter++) seqMgr.release(*iter); inFlightSequences.clear(); } }; class BrokerProxyImpl : public boost::noncopyable { public: BrokerProxyImpl(BrokerProxy& pub, Console& _console); ~BrokerProxyImpl() {} void sessionOpened(SessionHandle& sh); void sessionClosed(); void startProtocol(); void sendBufferLH(qpid::framing::Buffer& buf, const std::string& destination, const std::string& routingKey); void handleRcvMessage(Message& message); bool getXmtMessage(Message& item) const; void popXmt(); bool getEvent(BrokerEvent& event) const; void popEvent(); uint32_t agentCount() const; const AgentProxy* getAgent(uint32_t idx) const; void sendQuery(const Query& query, void* context, const AgentProxy* agent); bool sendGetRequestLH(SequenceContext::Ptr queryContext, const Query& query, const AgentProxy* agent); std::string encodeMethodArguments(const SchemaMethod* schema, const Value* args, qpid::framing::Buffer& buffer); std::string encodedSizeMethodArguments(const SchemaMethod* schema, const Value* args, uint32_t& size); void sendMethodRequest(ObjectId* oid, const SchemaObjectClass* cls, const std::string& method, const Value* args, void* context); void addBinding(const std::string& exchange, const std::string& key); void staticRelease() { decOutstanding(); } private: friend struct StaticContext; friend struct QueryContext; friend struct MethodContext; BrokerProxy& publicObject; mutable qpid::sys::Mutex lock; Console& console; std::string queueName; qpid::framing::Uuid brokerId; SequenceManager seqMgr; uint32_t requestsOutstanding; bool topicBound; std::map agentList; std::deque xmtQueue; std::deque eventQueue; # define MA_BUFFER_SIZE 65536 char outputBuffer[MA_BUFFER_SIZE]; BrokerEventImpl::Ptr eventDeclareQueue(const std::string& queueName); BrokerEventImpl::Ptr eventBind(const std::string& exchange, const std::string& queue, const std::string& key); BrokerEventImpl::Ptr eventSetupComplete(); BrokerEventImpl::Ptr eventStable(); BrokerEventImpl::Ptr eventQueryComplete(void* context, QueryResponsePtr response); BrokerEventImpl::Ptr eventMethodResponse(void* context, MethodResponsePtr response); void handleBrokerResponse(qpid::framing::Buffer& inBuffer, uint32_t seq); void handlePackageIndication(qpid::framing::Buffer& inBuffer, uint32_t seq); void handleCommandComplete(qpid::framing::Buffer& inBuffer, uint32_t seq); void handleClassIndication(qpid::framing::Buffer& inBuffer, uint32_t seq); MethodResponsePtr handleMethodResponse(qpid::framing::Buffer& inBuffer, uint32_t seq, const SchemaMethod* schema); void handleHeartbeatIndication(qpid::framing::Buffer& inBuffer, uint32_t seq, const std::string& routingKey); void handleEventIndication(qpid::framing::Buffer& inBuffer, uint32_t seq); void handleSchemaResponse(qpid::framing::Buffer& inBuffer, uint32_t seq); ObjectPtr handleObjectIndication(qpid::framing::Buffer& inBuffer, uint32_t seq, bool prop, bool stat); void updateAgentList(ObjectPtr obj); void incOutstandingLH(); void decOutstanding(); }; // // StaticContext is used to handle: // // 1) Responses to console-level requests (for schema info, etc.) // 2) Unsolicited messages from agents (events, published updates, etc.) // struct StaticContext : public SequenceContext { StaticContext(BrokerProxyImpl& b) : broker(b) {} virtual ~StaticContext() {} void reserve() {} void release() { broker.staticRelease(); } bool handleMessage(uint8_t opcode, uint32_t sequence, const std::string& routingKey, qpid::framing::Buffer& buffer); BrokerProxyImpl& broker; }; // // QueryContext is used to track and handle responses associated with a single Get Query // struct QueryContext : public SequenceContext { QueryContext(BrokerProxyImpl& b, void* u) : broker(b), userContext(u), requestsOutstanding(0), queryResponse(QueryResponseImpl::factory()) {} virtual ~QueryContext() {} void reserve(); void release(); bool handleMessage(uint8_t opcode, uint32_t sequence, const std::string& routingKey, qpid::framing::Buffer& buffer); mutable qpid::sys::Mutex lock; BrokerProxyImpl& broker; void* userContext; uint32_t requestsOutstanding; QueryResponsePtr queryResponse; }; struct MethodContext : public SequenceContext { MethodContext(BrokerProxyImpl& b, void* u, const SchemaMethod* s) : broker(b), userContext(u), schema(s) {} virtual ~MethodContext() {} void reserve() {} void release(); bool handleMessage(uint8_t opcode, uint32_t sequence, const std::string& routingKey, qpid::framing::Buffer& buffer); BrokerProxyImpl& broker; void* userContext; const SchemaMethod* schema; MethodResponsePtr methodResponse; }; } } #endif qpidc-0.16/src/qmf/engine/ObjectImpl.cpp0000664000076400007640000001757211364215470020526 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/ObjectImpl.h" #include "qmf/engine/ValueImpl.h" #include "qmf/engine/BrokerProxyImpl.h" #include using namespace std; using namespace qmf::engine; using namespace qpid::sys; using qpid::framing::Buffer; ObjectImpl::ObjectImpl(const SchemaObjectClass* type) : objectClass(type), broker(0), createTime(uint64_t(Duration(EPOCH, now()))), destroyTime(0), lastUpdatedTime(createTime) { int propCount = objectClass->getPropertyCount(); int statCount = objectClass->getStatisticCount(); int idx; for (idx = 0; idx < propCount; idx++) { const SchemaProperty* prop = objectClass->getProperty(idx); properties[prop->getName()] = ValuePtr(new Value(prop->getType())); } for (idx = 0; idx < statCount; idx++) { const SchemaStatistic* stat = objectClass->getStatistic(idx); statistics[stat->getName()] = ValuePtr(new Value(stat->getType())); } } ObjectImpl::ObjectImpl(const SchemaObjectClass* type, BrokerProxyImpl* b, Buffer& buffer, bool prop, bool stat, bool managed) : objectClass(type), broker(b), createTime(0), destroyTime(0), lastUpdatedTime(0) { int idx; if (managed) { lastUpdatedTime = buffer.getLongLong(); createTime = buffer.getLongLong(); destroyTime = buffer.getLongLong(); objectId.reset(ObjectIdImpl::factory(buffer)); } if (prop) { int propCount = objectClass->getPropertyCount(); set excludes; parsePresenceMasks(buffer, excludes); for (idx = 0; idx < propCount; idx++) { const SchemaProperty* prop = objectClass->getProperty(idx); if (excludes.count(prop->getName()) != 0) { properties[prop->getName()] = ValuePtr(new Value(prop->getType())); } else { Value* pval = ValueImpl::factory(prop->getType(), buffer); properties[prop->getName()] = ValuePtr(pval); } } } if (stat) { int statCount = objectClass->getStatisticCount(); for (idx = 0; idx < statCount; idx++) { const SchemaStatistic* stat = objectClass->getStatistic(idx); Value* sval = ValueImpl::factory(stat->getType(), buffer); statistics[stat->getName()] = ValuePtr(sval); } } } Object* ObjectImpl::factory(const SchemaObjectClass* type, BrokerProxyImpl* b, Buffer& buffer, bool prop, bool stat, bool managed) { ObjectImpl* impl(new ObjectImpl(type, b, buffer, prop, stat, managed)); return new Object(impl); } ObjectImpl::~ObjectImpl() { } void ObjectImpl::destroy() { destroyTime = uint64_t(Duration(EPOCH, now())); // TODO - flag deletion } Value* ObjectImpl::getValue(const string& key) const { map::const_iterator iter; iter = properties.find(key); if (iter != properties.end()) return iter->second.get(); iter = statistics.find(key); if (iter != statistics.end()) return iter->second.get(); return 0; } void ObjectImpl::invokeMethod(const string& methodName, const Value* inArgs, void* context) const { if (broker != 0 && objectId.get() != 0) broker->sendMethodRequest(objectId.get(), objectClass, methodName, inArgs, context); } void ObjectImpl::merge(const Object& from) { for (map::const_iterator piter = from.impl->properties.begin(); piter != from.impl->properties.end(); piter++) properties[piter->first] = piter->second; for (map::const_iterator siter = from.impl->statistics.begin(); siter != from.impl->statistics.end(); siter++) statistics[siter->first] = siter->second; } void ObjectImpl::parsePresenceMasks(Buffer& buffer, set& excludeList) { int propCount = objectClass->getPropertyCount(); excludeList.clear(); uint8_t bit = 0; uint8_t mask = 0; for (int idx = 0; idx < propCount; idx++) { const SchemaProperty* prop = objectClass->getProperty(idx); if (prop->isOptional()) { if (bit == 0) { mask = buffer.getOctet(); bit = 1; } if ((mask & bit) == 0) excludeList.insert(string(prop->getName())); if (bit == 0x80) bit = 0; else bit = bit << 1; } } } void ObjectImpl::encodeSchemaKey(qpid::framing::Buffer& buffer) const { buffer.putShortString(objectClass->getClassKey()->getPackageName()); buffer.putShortString(objectClass->getClassKey()->getClassName()); buffer.putBin128(const_cast(objectClass->getClassKey()->getHash())); } void ObjectImpl::encodeManagedObjectData(qpid::framing::Buffer& buffer) const { buffer.putLongLong(lastUpdatedTime); buffer.putLongLong(createTime); buffer.putLongLong(destroyTime); objectId->impl->encode(buffer); } void ObjectImpl::encodeProperties(qpid::framing::Buffer& buffer) const { int propCount = objectClass->getPropertyCount(); uint8_t bit = 0; uint8_t mask = 0; ValuePtr value; for (int idx = 0; idx < propCount; idx++) { const SchemaProperty* prop = objectClass->getProperty(idx); if (prop->isOptional()) { value = properties[prop->getName()]; if (bit == 0) bit = 1; if (!value->isNull()) mask |= bit; if (bit == 0x80) { buffer.putOctet(mask); bit = 0; mask = 0; } else bit = bit << 1; } } if (bit != 0) { buffer.putOctet(mask); } for (int idx = 0; idx < propCount; idx++) { const SchemaProperty* prop = objectClass->getProperty(idx); value = properties[prop->getName()]; if (!prop->isOptional() || !value->isNull()) { value->impl->encode(buffer); } } } void ObjectImpl::encodeStatistics(qpid::framing::Buffer& buffer) const { int statCount = objectClass->getStatisticCount(); for (int idx = 0; idx < statCount; idx++) { const SchemaStatistic* stat = objectClass->getStatistic(idx); ValuePtr value = statistics[stat->getName()]; value->impl->encode(buffer); } } //================================================================== // Wrappers //================================================================== Object::Object(const SchemaObjectClass* type) : impl(new ObjectImpl(type)) {} Object::Object(ObjectImpl* i) : impl(i) {} Object::Object(const Object& from) : impl(new ObjectImpl(*(from.impl))) {} Object::~Object() { delete impl; } void Object::destroy() { impl->destroy(); } const ObjectId* Object::getObjectId() const { return impl->getObjectId(); } void Object::setObjectId(ObjectId* oid) { impl->setObjectId(oid); } const SchemaObjectClass* Object::getClass() const { return impl->getClass(); } Value* Object::getValue(const char* key) const { return impl->getValue(key); } void Object::invokeMethod(const char* m, const Value* a, void* c) const { impl->invokeMethod(m, a, c); } bool Object::isDeleted() const { return impl->isDeleted(); } void Object::merge(const Object& from) { impl->merge(from); } qpidc-0.16/src/qmf/engine/ConsoleImpl.h0000664000076400007640000001262111375542547020367 0ustar00jrossjross00000000000000#ifndef _QmfEngineConsoleEngineImpl_ #define _QmfEngineConsoleEngineImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/Console.h" #include "qmf/engine/MessageImpl.h" #include "qmf/engine/SchemaImpl.h" #include "qmf/engine/Typecode.h" #include "qmf/engine/ObjectImpl.h" #include "qmf/engine/ObjectIdImpl.h" #include "qmf/engine/QueryImpl.h" #include "qmf/engine/ValueImpl.h" #include "qmf/engine/Protocol.h" #include "qmf/engine/SequenceManager.h" #include "qmf/engine/BrokerProxyImpl.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace qmf { namespace engine { struct ConsoleEventImpl { typedef boost::shared_ptr Ptr; ConsoleEvent::EventKind kind; boost::shared_ptr agent; std::string name; const SchemaClassKey* classKey; boost::shared_ptr object; void* context; boost::shared_ptr event; uint64_t timestamp; bool hasProps; bool hasStats; ConsoleEventImpl(ConsoleEvent::EventKind k) : kind(k), classKey(0), context(0), timestamp(0) {} ~ConsoleEventImpl() {} ConsoleEvent copy(); }; class ConsoleImpl : public boost::noncopyable { public: ConsoleImpl(const ConsoleSettings& settings = ConsoleSettings()); ~ConsoleImpl(); bool getEvent(ConsoleEvent& event) const; void popEvent(); void addConnection(BrokerProxy& broker, void* context); void delConnection(BrokerProxy& broker); uint32_t packageCount() const; const std::string& getPackageName(uint32_t idx) const; uint32_t classCount(const char* packageName) const; const SchemaClassKey* getClass(const char* packageName, uint32_t idx) const; ClassKind getClassKind(const SchemaClassKey* key) const; const SchemaObjectClass* getObjectClass(const SchemaClassKey* key) const; const SchemaEventClass* getEventClass(const SchemaClassKey* key) const; void bindPackage(const char* packageName); void bindClass(const SchemaClassKey* key); void bindClass(const char* packageName, const char* className); void bindEvent(const SchemaClassKey* key); void bindEvent(const char* packageName, const char* eventName); /* void startSync(const Query& query, void* context, SyncQuery& sync); void touchSync(SyncQuery& sync); void endSync(SyncQuery& sync); */ private: friend class BrokerProxyImpl; friend struct StaticContext; const ConsoleSettings& settings; mutable qpid::sys::Mutex lock; std::deque eventQueue; std::vector brokerList; std::vector > bindingList; // exchange/key (empty exchange => QMF_EXCHANGE) // Declare a compare class for the class maps that compares the dereferenced // class key pointers. The default behavior would be to compare the pointer // addresses themselves. struct KeyCompare { bool operator()(const SchemaClassKey* left, const SchemaClassKey* right) const { return *left < *right; } }; typedef std::map ObjectClassList; typedef std::map EventClassList; typedef std::map > PackageList; PackageList packages; void learnPackage(const std::string& packageName); void learnClass(SchemaObjectClass* cls); void learnClass(SchemaEventClass* cls); bool haveClass(const SchemaClassKey* key) const; SchemaObjectClass* getSchema(const SchemaClassKey* key) const; void eventAgentAdded(boost::shared_ptr agent); void eventAgentDeleted(boost::shared_ptr agent); void eventNewPackage(const std::string& packageName); void eventNewClass(const SchemaClassKey* key); void eventObjectUpdate(ObjectPtr object, bool prop, bool stat); void eventAgentHeartbeat(boost::shared_ptr agent, uint64_t timestamp); void eventEventReceived(boost::shared_ptr event); }; } } #endif qpidc-0.16/src/qmf/engine/QueryImpl.cpp0000664000076400007640000000770211257223366020423 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/QueryImpl.h" #include "qmf/engine/ObjectIdImpl.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/FieldTable.h" using namespace std; using namespace qmf::engine; using namespace qpid::framing; bool QueryElementImpl::evaluate(const Object* /*object*/) const { // TODO: Implement this return false; } bool QueryExpressionImpl::evaluate(const Object* /*object*/) const { // TODO: Implement this return false; } QueryImpl::QueryImpl(Buffer& buffer) { FieldTable ft; ft.decode(buffer); // TODO } Query* QueryImpl::factory(Buffer& buffer) { QueryImpl* impl(new QueryImpl(buffer)); return new Query(impl); } void QueryImpl::encode(Buffer& buffer) const { FieldTable ft; if (oid.get() != 0) { ft.setString("_objectid", oid->impl->asString()); } else { if (!packageName.empty()) ft.setString("_package", packageName); ft.setString("_class", className); } ft.encode(buffer); } //================================================================== // Wrappers //================================================================== QueryElement::QueryElement(const char* attrName, const Value* value, ValueOper oper) : impl(new QueryElementImpl(attrName, value, oper)) {} QueryElement::QueryElement(QueryElementImpl* i) : impl(i) {} QueryElement::~QueryElement() { delete impl; } bool QueryElement::evaluate(const Object* object) const { return impl->evaluate(object); } QueryExpression::QueryExpression(ExprOper oper, const QueryOperand* operand1, const QueryOperand* operand2) : impl(new QueryExpressionImpl(oper, operand1, operand2)) {} QueryExpression::QueryExpression(QueryExpressionImpl* i) : impl(i) {} QueryExpression::~QueryExpression() { delete impl; } bool QueryExpression::evaluate(const Object* object) const { return impl->evaluate(object); } Query::Query(const char* className, const char* packageName) : impl(new QueryImpl(className, packageName)) {} Query::Query(const SchemaClassKey* key) : impl(new QueryImpl(key)) {} Query::Query(const ObjectId* oid) : impl(new QueryImpl(oid)) {} Query::Query(QueryImpl* i) : impl(i) {} Query::Query(const Query& from) : impl(new QueryImpl(*(from.impl))) {} Query::~Query() { delete impl; } void Query::setSelect(const QueryOperand* criterion) { impl->setSelect(criterion); } void Query::setLimit(uint32_t maxResults) { impl->setLimit(maxResults); } void Query::setOrderBy(const char* attrName, bool decreasing) { impl->setOrderBy(attrName, decreasing); } const char* Query::getPackage() const { return impl->getPackage().c_str(); } const char* Query::getClass() const { return impl->getClass().c_str(); } const ObjectId* Query::getObjectId() const { return impl->getObjectId(); } bool Query::haveSelect() const { return impl->haveSelect(); } bool Query::haveLimit() const { return impl->haveLimit(); } bool Query::haveOrderBy() const { return impl->haveOrderBy(); } const QueryOperand* Query::getSelect() const { return impl->getSelect(); } uint32_t Query::getLimit() const { return impl->getLimit(); } const char* Query::getOrderBy() const { return impl->getOrderBy().c_str(); } bool Query::getDecreasing() const { return impl->getDecreasing(); } qpidc-0.16/src/qmf/engine/ResilientConnection.cpp0000664000076400007640000003645011663012400022436 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/ResilientConnection.h" #include "qmf/engine/MessageImpl.h" #include "qmf/engine/ConnectionSettingsImpl.h" #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 qmf::engine; using namespace qpid; using qpid::sys::Mutex; namespace qmf { namespace engine { struct ResilientConnectionEventImpl { ResilientConnectionEvent::EventKind kind; void* sessionContext; string errorText; MessageImpl message; ResilientConnectionEventImpl(ResilientConnectionEvent::EventKind k, const MessageImpl& m = MessageImpl()) : kind(k), sessionContext(0), message(m) {} ResilientConnectionEvent copy(); }; struct RCSession : public client::MessageListener, public qpid::sys::Runnable, public qpid::RefCounted { typedef boost::intrusive_ptr Ptr; ResilientConnectionImpl& connImpl; string name; client::Connection& connection; client::Session session; client::SubscriptionManager* subscriptions; string userId; void* userContext; vector dests; qpid::sys::Thread thread; RCSession(ResilientConnectionImpl& ci, const string& n, client::Connection& c, void* uc); ~RCSession(); void received(client::Message& msg); void run(); void stop(); }; class ResilientConnectionImpl : public qpid::sys::Runnable, public boost::noncopyable { public: ResilientConnectionImpl(const ConnectionSettings& settings); ~ResilientConnectionImpl(); bool isConnected() const; bool getEvent(ResilientConnectionEvent& event); void popEvent(); bool createSession(const char* name, void* sessionContext, SessionHandle& handle); void destroySession(SessionHandle handle); void sendMessage(SessionHandle handle, qmf::engine::Message& message); void declareQueue(SessionHandle handle, char* queue); void deleteQueue(SessionHandle handle, char* queue); void bind(SessionHandle handle, char* exchange, char* queue, char* key); void unbind(SessionHandle handle, char* exchange, char* queue, char* key); void setNotifyFd(int fd); void notify(); void run(); void failure(); void sessionClosed(RCSession* sess); void EnqueueEvent(ResilientConnectionEvent::EventKind kind, void* sessionContext = 0, const MessageImpl& message = MessageImpl(), const string& errorText = ""); private: int notifyFd; bool connected; bool shutdown; string lastError; const ConnectionSettings settings; client::Connection connection; mutable qpid::sys::Mutex lock; int delayMin; int delayMax; int delayFactor; qpid::sys::Condition cond; deque eventQueue; set sessions; qpid::sys::Thread connThread; }; } } ResilientConnectionEvent ResilientConnectionEventImpl::copy() { ResilientConnectionEvent item; ::memset(&item, 0, sizeof(ResilientConnectionEvent)); item.kind = kind; item.sessionContext = sessionContext; item.message = message.copy(); item.errorText = const_cast(errorText.c_str()); return item; } RCSession::RCSession(ResilientConnectionImpl& ci, const string& n, client::Connection& c, void* uc) : connImpl(ci), name(n), connection(c), session(connection.newSession(name)), subscriptions(new client::SubscriptionManager(session)), userContext(uc), thread(*this) { const qpid::client::ConnectionSettings& operSettings = connection.getNegotiatedSettings(); userId = operSettings.username; } RCSession::~RCSession() { subscriptions->stop(); thread.join(); session.close(); delete subscriptions; } void RCSession::run() { try { subscriptions->run(); } catch (exception& /*e*/) { connImpl.sessionClosed(this); } } void RCSession::stop() { subscriptions->stop(); } void RCSession::received(client::Message& msg) { MessageImpl qmsg; qmsg.body = msg.getData(); qpid::framing::DeliveryProperties dp = msg.getDeliveryProperties(); if (dp.hasRoutingKey()) { qmsg.routingKey = dp.getRoutingKey(); } qpid::framing::MessageProperties mp = msg.getMessageProperties(); if (mp.hasReplyTo()) { const qpid::framing::ReplyTo& rt = mp.getReplyTo(); qmsg.replyExchange = rt.getExchange(); qmsg.replyKey = rt.getRoutingKey(); } if (mp.hasUserId()) { qmsg.userId = mp.getUserId(); } connImpl.EnqueueEvent(ResilientConnectionEvent::RECV, userContext, qmsg); } ResilientConnectionImpl::ResilientConnectionImpl(const ConnectionSettings& _settings) : notifyFd(-1), connected(false), shutdown(false), settings(_settings), delayMin(1), connThread(*this) { connection.registerFailureCallback(boost::bind(&ResilientConnectionImpl::failure, this)); settings.impl->getRetrySettings(&delayMin, &delayMax, &delayFactor); } ResilientConnectionImpl::~ResilientConnectionImpl() { shutdown = true; connected = false; cond.notify(); connThread.join(); connection.close(); } bool ResilientConnectionImpl::isConnected() const { Mutex::ScopedLock _lock(lock); return connected; } bool ResilientConnectionImpl::getEvent(ResilientConnectionEvent& event) { Mutex::ScopedLock _lock(lock); if (eventQueue.empty()) return false; event = eventQueue.front().copy(); return true; } void ResilientConnectionImpl::popEvent() { Mutex::ScopedLock _lock(lock); if (!eventQueue.empty()) eventQueue.pop_front(); } bool ResilientConnectionImpl::createSession(const char* name, void* sessionContext, SessionHandle& handle) { Mutex::ScopedLock _lock(lock); if (!connected) return false; RCSession::Ptr sess = RCSession::Ptr(new RCSession(*this, name, connection, sessionContext)); handle.impl = (void*) sess.get(); sessions.insert(sess); return true; } void ResilientConnectionImpl::destroySession(SessionHandle handle) { Mutex::ScopedLock _lock(lock); RCSession::Ptr sess = RCSession::Ptr((RCSession*) handle.impl); set::iterator iter = sessions.find(sess); if (iter != sessions.end()) { for (vector::iterator dIter = sess->dests.begin(); dIter != sess->dests.end(); dIter++) sess->subscriptions->cancel(dIter->c_str()); sess->subscriptions->stop(); sess->subscriptions->wait(); sessions.erase(iter); return; } } void ResilientConnectionImpl::sendMessage(SessionHandle handle, qmf::engine::Message& message) { Mutex::ScopedLock _lock(lock); RCSession::Ptr sess = RCSession::Ptr((RCSession*) handle.impl); set::iterator iter = sessions.find(sess); qpid::client::Message msg; string data(message.body, message.length); msg.getDeliveryProperties().setRoutingKey(message.routingKey); msg.getMessageProperties().setReplyTo(qpid::framing::ReplyTo(message.replyExchange, message.replyKey)); if (settings.impl->getSendUserId()) msg.getMessageProperties().setUserId(sess->userId); msg.setData(data); try { sess->session.messageTransfer(client::arg::content=msg, client::arg::destination=message.destination); } catch(exception& e) { QPID_LOG(error, "Session Exception during message-transfer: " << e.what()); sessions.erase(iter); EnqueueEvent(ResilientConnectionEvent::SESSION_CLOSED, (*iter)->userContext); } } void ResilientConnectionImpl::declareQueue(SessionHandle handle, char* queue) { Mutex::ScopedLock _lock(lock); RCSession* sess = (RCSession*) handle.impl; sess->session.queueDeclare(client::arg::queue=queue, client::arg::autoDelete=true, client::arg::exclusive=true); sess->subscriptions->setAcceptMode(client::ACCEPT_MODE_NONE); sess->subscriptions->setAcquireMode(client::ACQUIRE_MODE_PRE_ACQUIRED); sess->subscriptions->subscribe(*sess, queue, queue); sess->subscriptions->setFlowControl(queue, client::FlowControl::unlimited()); sess->dests.push_back(string(queue)); } void ResilientConnectionImpl::deleteQueue(SessionHandle handle, char* queue) { Mutex::ScopedLock _lock(lock); RCSession* sess = (RCSession*) handle.impl; sess->session.queueDelete(client::arg::queue=queue); for (vector::iterator iter = sess->dests.begin(); iter != sess->dests.end(); iter++) if (*iter == queue) { sess->subscriptions->cancel(queue); sess->dests.erase(iter); break; } } void ResilientConnectionImpl::bind(SessionHandle handle, char* exchange, char* queue, char* key) { Mutex::ScopedLock _lock(lock); RCSession* sess = (RCSession*) handle.impl; sess->session.exchangeBind(client::arg::exchange=exchange, client::arg::queue=queue, client::arg::bindingKey=key); } void ResilientConnectionImpl::unbind(SessionHandle handle, char* exchange, char* queue, char* key) { Mutex::ScopedLock _lock(lock); RCSession* sess = (RCSession*) handle.impl; sess->session.exchangeUnbind(client::arg::exchange=exchange, client::arg::queue=queue, client::arg::bindingKey=key); } void ResilientConnectionImpl::notify() { if (notifyFd != -1) { if (::write(notifyFd, ".", 1)) {} } } void ResilientConnectionImpl::setNotifyFd(int fd) { notifyFd = fd; if (notifyFd > 0) { int original = fcntl(notifyFd, F_GETFL); fcntl(notifyFd, F_SETFL, O_NONBLOCK | original); } } void ResilientConnectionImpl::run() { int delay(delayMin); while (true) { try { QPID_LOG(trace, "Trying to open connection..."); connection.open(settings.impl->getClientSettings()); { Mutex::ScopedLock _lock(lock); connected = true; EnqueueEvent(ResilientConnectionEvent::CONNECTED); while (connected) cond.wait(lock); delay = delayMin; while (!sessions.empty()) { set::iterator iter = sessions.begin(); RCSession::Ptr sess = *iter; sessions.erase(iter); EnqueueEvent(ResilientConnectionEvent::SESSION_CLOSED, sess->userContext); Mutex::ScopedUnlock _u(lock); sess->stop(); // Nullify the intrusive pointer within the scoped unlock, otherwise, // the reference is held until overwritted above (under lock) which causes // the session destructor to be called with the lock held. sess = 0; } EnqueueEvent(ResilientConnectionEvent::DISCONNECTED); if (shutdown) return; } connection.close(); } catch (exception &e) { QPID_LOG(debug, "connection.open exception: " << e.what()); Mutex::ScopedLock _lock(lock); lastError = e.what(); if (delay < delayMax) delay *= delayFactor; } ::qpid::sys::sleep(delay); } } void ResilientConnectionImpl::failure() { Mutex::ScopedLock _lock(lock); connected = false; lastError = "Closed by Peer"; cond.notify(); } void ResilientConnectionImpl::sessionClosed(RCSession*) { Mutex::ScopedLock _lock(lock); connected = false; lastError = "Closed due to Session failure"; cond.notify(); } void ResilientConnectionImpl::EnqueueEvent(ResilientConnectionEvent::EventKind kind, void* sessionContext, const MessageImpl& message, const string& errorText) { { Mutex::ScopedLock _lock(lock); ResilientConnectionEventImpl event(kind, message); event.sessionContext = sessionContext; event.errorText = errorText; eventQueue.push_back(event); } if (notifyFd != -1) { if (::write(notifyFd, ".", 1)) {} } } //================================================================== // Wrappers //================================================================== ResilientConnection::ResilientConnection(const ConnectionSettings& settings) { impl = new ResilientConnectionImpl(settings); } ResilientConnection::~ResilientConnection() { delete impl; } bool ResilientConnection::isConnected() const { return impl->isConnected(); } bool ResilientConnection::getEvent(ResilientConnectionEvent& event) { return impl->getEvent(event); } void ResilientConnection::popEvent() { impl->popEvent(); } bool ResilientConnection::createSession(const char* name, void* sessionContext, SessionHandle& handle) { return impl->createSession(name, sessionContext, handle); } void ResilientConnection::destroySession(SessionHandle handle) { impl->destroySession(handle); } void ResilientConnection::sendMessage(SessionHandle handle, qmf::engine::Message& message) { impl->sendMessage(handle, message); } void ResilientConnection::declareQueue(SessionHandle handle, char* queue) { impl->declareQueue(handle, queue); } void ResilientConnection::deleteQueue(SessionHandle handle, char* queue) { impl->deleteQueue(handle, queue); } void ResilientConnection::bind(SessionHandle handle, char* exchange, char* queue, char* key) { impl->bind(handle, exchange, queue, key); } void ResilientConnection::unbind(SessionHandle handle, char* exchange, char* queue, char* key) { impl->unbind(handle, exchange, queue, key); } void ResilientConnection::setNotifyFd(int fd) { impl->setNotifyFd(fd); } void ResilientConnection::notify() { impl->notify(); } qpidc-0.16/src/qmf/engine/ValueImpl.h0000664000076400007640000001435711513647017020041 0ustar00jrossjross00000000000000#ifndef _QmfEngineValueImpl_ #define _QmfEngineValueImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include #include #include namespace qpid { namespace framing { class FieldTable; class List; } } namespace qmf { namespace engine { // TODO: set valid flag on all value settors // TODO: add a modified flag and accessors struct ValueImpl { const Typecode typecode; bool valid; ObjectId refVal; std::string stringVal; std::auto_ptr objectVal; std::map mapVal; std::vector vectorVal; Typecode arrayTypecode; union { uint32_t u32; uint64_t u64; int32_t s32; int64_t s64; bool boolVal; float floatVal; double doubleVal; uint8_t uuidVal[16]; } value; ValueImpl(const ValueImpl& from) : typecode(from.typecode), valid(from.valid), refVal(from.refVal), stringVal(from.stringVal), objectVal(from.objectVal.get() ? new Object(*(from.objectVal)) : 0), mapVal(from.mapVal), vectorVal(from.vectorVal), arrayTypecode(from.arrayTypecode), value(from.value) {} ValueImpl(Typecode t, Typecode at); ValueImpl(Typecode t, qpid::framing::Buffer& b); ValueImpl(Typecode t); static Value* factory(Typecode t, qpid::framing::Buffer& b); static Value* factory(Typecode t); ~ValueImpl(); void encode(qpid::framing::Buffer& b) const; uint32_t encodedSize() const; Typecode getType() const { return typecode; } bool isNull() const { return !valid; } void setNull() { valid = false; } bool isObjectId() const { return typecode == TYPE_REF; } const ObjectId& asObjectId() const { return refVal; } void setObjectId(const ObjectId& o) { refVal = o; } // TODO bool isUint() const { return typecode >= TYPE_UINT8 && typecode <= TYPE_UINT32; } uint32_t asUint() const { return value.u32; } void setUint(uint32_t val) { value.u32 = val; } bool isInt() const { return typecode >= TYPE_INT8 && typecode <= TYPE_INT32; } int32_t asInt() const { return value.s32; } void setInt(int32_t val) { value.s32 = val; } bool isUint64() const { return typecode == TYPE_UINT64 || typecode == TYPE_DELTATIME; } uint64_t asUint64() const { return value.u64; } void setUint64(uint64_t val) { value.u64 = val; } bool isInt64() const { return typecode == TYPE_INT64 || typecode == TYPE_ABSTIME; } int64_t asInt64() const { return value.s64; } void setInt64(int64_t val) { value.s64 = val; } bool isString() const { return typecode == TYPE_SSTR || typecode == TYPE_LSTR; } const char* asString() const { return stringVal.c_str(); } void setString(const char* val) { stringVal = val; } bool isBool() const { return typecode == TYPE_BOOL; } bool asBool() const { return value.boolVal; } void setBool(bool val) { value.boolVal = val; } bool isFloat() const { return typecode == TYPE_FLOAT; } float asFloat() const { return value.floatVal; } void setFloat(float val) { value.floatVal = val; } bool isDouble() const { return typecode == TYPE_DOUBLE; } double asDouble() const { return value.doubleVal; } void setDouble(double val) { value.doubleVal = val; } bool isUuid() const { return typecode == TYPE_UUID; } const uint8_t* asUuid() const { return value.uuidVal; } void setUuid(const uint8_t* val) { ::memcpy(value.uuidVal, val, 16); } bool isObject() const { return typecode == TYPE_OBJECT; } Object* asObject() const { return objectVal.get(); } void setObject(Object* val) { objectVal.reset(val); } bool isMap() const { return typecode == TYPE_MAP; } bool keyInMap(const char* key) const; Value* byKey(const char* key); const Value* byKey(const char* key) const; void deleteKey(const char* key); void insert(const char* key, Value* val); uint32_t keyCount() const { return mapVal.size(); } const char* key(uint32_t idx) const; bool isList() const { return typecode == TYPE_LIST; } uint32_t listItemCount() const { return vectorVal.size(); } Value* listItem(uint32_t idx) { return idx < listItemCount() ? &vectorVal[idx] : 0; } const Value* listItem(uint32_t idx) const { return idx < listItemCount() ? &vectorVal[idx] : 0; } void appendToList(Value* val) { vectorVal.push_back(*val); } void deleteListItem(uint32_t idx) { if (idx < listItemCount()) vectorVal.erase(vectorVal.begin()+idx); } bool isArray() const { return typecode == TYPE_ARRAY; } Typecode arrayType() const { return arrayTypecode; } uint32_t arrayItemCount() const { return 0; } Value* arrayItem(uint32_t idx); void appendToArray(Value* val); void deleteArrayItem(uint32_t idx); private: void mapToFieldTable(qpid::framing::FieldTable& ft) const; void initMap(const qpid::framing::FieldTable& ft); void listToFramingList(qpid::framing::List& fl) const; void initList(const qpid::framing::List& fl); }; } } #endif qpidc-0.16/src/qmf/engine/SequenceManager.h0000664000076400007640000000401111260276515021170 0ustar00jrossjross00000000000000#ifndef _QmfEngineSequenceManager_ #define _QmfEngineSequenceManager_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/sys/Mutex.h" #include #include namespace qpid { namespace framing { class Buffer; } } namespace qmf { namespace engine { class SequenceContext { public: typedef boost::shared_ptr Ptr; SequenceContext() {} virtual ~SequenceContext() {} virtual void reserve() = 0; virtual bool handleMessage(uint8_t opcode, uint32_t sequence, const std::string& routingKey, qpid::framing::Buffer& buffer) = 0; virtual void release() = 0; }; class SequenceManager { public: SequenceManager(); void setUnsolicitedContext(SequenceContext::Ptr ctx); uint32_t reserve(SequenceContext::Ptr ctx = SequenceContext::Ptr()); void release(uint32_t sequence); void releaseAll(); void dispatch(uint8_t opcode, uint32_t sequence, const std::string& routingKey, qpid::framing::Buffer& buffer); private: mutable qpid::sys::Mutex lock; uint32_t nextSequence; SequenceContext::Ptr unsolicitedContext; std::map contextMap; }; } } #endif qpidc-0.16/src/qmf/engine/Protocol.cpp0000664000076400007640000000274411310447260020265 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/Protocol.h" #include "qpid/framing/Buffer.h" using namespace std; using namespace qmf::engine; using namespace qpid::framing; bool Protocol::checkHeader(Buffer& buf, uint8_t *opcode, uint32_t *seq) { if (buf.available() < 8) return false; uint8_t h1 = buf.getOctet(); uint8_t h2 = buf.getOctet(); uint8_t h3 = buf.getOctet(); *opcode = buf.getOctet(); *seq = buf.getLong(); return h1 == 'A' && h2 == 'M' && h3 == '2'; } void Protocol::encodeHeader(qpid::framing::Buffer& buf, uint8_t opcode, uint32_t seq) { buf.putOctet('A'); buf.putOctet('M'); buf.putOctet('2'); buf.putOctet(opcode); buf.putLong (seq); } qpidc-0.16/src/qmf/engine/MessageImpl.cpp0000664000076400007640000000246411257223366020702 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/MessageImpl.h" #include using namespace std; using namespace qmf::engine; #define STRING_REF(s) {if (!s.empty()) item.s = const_cast(s.c_str());} Message MessageImpl::copy() { Message item; ::memset(&item, 0, sizeof(Message)); item.body = const_cast(body.c_str()); item.length = body.length(); STRING_REF(destination); STRING_REF(routingKey); STRING_REF(replyExchange); STRING_REF(replyKey); STRING_REF(userId); return item; } qpidc-0.16/src/qmf/engine/ObjectIdImpl.cpp0000664000076400007640000001422611341561464020776 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/ObjectIdImpl.h" #include #include using namespace std; using namespace qmf::engine; using qpid::framing::Buffer; void AgentAttachment::setBanks(uint32_t broker, uint32_t agent) { first = ((uint64_t) (broker & 0x000fffff)) << 28 | ((uint64_t) (agent & 0x0fffffff)); } ObjectIdImpl::ObjectIdImpl(Buffer& buffer) : agent(0) { decode(buffer); } ObjectIdImpl::ObjectIdImpl(AgentAttachment* a, uint8_t flags, uint16_t seq, uint64_t object) : agent(a) { first = ((uint64_t) (flags & 0x0f)) << 60 | ((uint64_t) (seq & 0x0fff)) << 48; second = object; } ObjectId* ObjectIdImpl::factory(Buffer& buffer) { ObjectIdImpl* impl(new ObjectIdImpl(buffer)); return new ObjectId(impl); } ObjectId* ObjectIdImpl::factory(AgentAttachment* agent, uint8_t flags, uint16_t seq, uint64_t object) { ObjectIdImpl* impl(new ObjectIdImpl(agent, flags, seq, object)); return new ObjectId(impl); } void ObjectIdImpl::decode(Buffer& buffer) { first = buffer.getLongLong(); second = buffer.getLongLong(); } void ObjectIdImpl::encode(Buffer& buffer) const { if (agent == 0) buffer.putLongLong(first); else buffer.putLongLong(first | agent->first); buffer.putLongLong(second); } void ObjectIdImpl::fromString(const std::string& repr) { #define FIELDS 5 #if defined (_WIN32) && !defined (atoll) # define atoll(X) _atoi64(X) #endif std::string copy(repr.c_str()); char* cText; char* field[FIELDS]; bool atFieldStart = true; int idx = 0; cText = const_cast(copy.c_str()); for (char* cursor = cText; *cursor; cursor++) { if (atFieldStart) { if (idx >= FIELDS) return; // TODO error field[idx++] = cursor; atFieldStart = false; } else { if (*cursor == '-') { *cursor = '\0'; atFieldStart = true; } } } if (idx != FIELDS) return; // TODO error first = (atoll(field[0]) << 60) + (atoll(field[1]) << 48) + (atoll(field[2]) << 28) + atoll(field[3]); second = atoll(field[4]); agent = 0; } const string& ObjectIdImpl::asString() const { stringstream val; val << (int) getFlags() << "-" << getSequence() << "-" << getBrokerBank() << "-" << getAgentBank() << "-" << getObjectNum(); repr = val.str(); return repr; } #define ACTUAL_FIRST (agent == 0 ? first : first | agent->first) #define ACTUAL_OTHER (other.agent == 0 ? other.first : other.first | other.agent->first) uint8_t ObjectIdImpl::getFlags() const { return (ACTUAL_FIRST & 0xF000000000000000LL) >> 60; } uint16_t ObjectIdImpl::getSequence() const { return (ACTUAL_FIRST & 0x0FFF000000000000LL) >> 48; } uint32_t ObjectIdImpl::getBrokerBank() const { return (ACTUAL_FIRST & 0x0000FFFFF0000000LL) >> 28; } uint32_t ObjectIdImpl::getAgentBank() const { return ACTUAL_FIRST & 0x000000000FFFFFFFLL; } uint64_t ObjectIdImpl::getObjectNum() const { return second; } uint32_t ObjectIdImpl::getObjectNumHi() const { return (uint32_t) (second >> 32); } uint32_t ObjectIdImpl::getObjectNumLo() const { return (uint32_t) (second & 0x00000000FFFFFFFFLL); } bool ObjectIdImpl::operator==(const ObjectIdImpl& other) const { return ACTUAL_FIRST == ACTUAL_OTHER && second == other.second; } bool ObjectIdImpl::operator<(const ObjectIdImpl& other) const { return (ACTUAL_FIRST < ACTUAL_OTHER) || ((ACTUAL_FIRST == ACTUAL_OTHER) && (second < other.second)); } bool ObjectIdImpl::operator>(const ObjectIdImpl& other) const { return (ACTUAL_FIRST > ACTUAL_OTHER) || ((ACTUAL_FIRST == ACTUAL_OTHER) && (second > other.second)); } //================================================================== // Wrappers //================================================================== ObjectId::ObjectId() : impl(new ObjectIdImpl()) {} ObjectId::ObjectId(const ObjectId& from) : impl(new ObjectIdImpl(*(from.impl))) {} ObjectId::ObjectId(ObjectIdImpl* i) : impl(i) {} ObjectId::~ObjectId() { delete impl; } uint64_t ObjectId::getObjectNum() const { return impl->getObjectNum(); } uint32_t ObjectId::getObjectNumHi() const { return impl->getObjectNumHi(); } uint32_t ObjectId::getObjectNumLo() const { return impl->getObjectNumLo(); } bool ObjectId::isDurable() const { return impl->isDurable(); } const char* ObjectId::str() const { return impl->asString().c_str(); } uint8_t ObjectId::getFlags() const { return impl->getFlags(); } uint16_t ObjectId::getSequence() const { return impl->getSequence(); } uint32_t ObjectId::getBrokerBank() const { return impl->getBrokerBank(); } uint32_t ObjectId::getAgentBank() const { return impl->getAgentBank(); } bool ObjectId::operator==(const ObjectId& other) const { return *impl == *other.impl; } bool ObjectId::operator<(const ObjectId& other) const { return *impl < *other.impl; } bool ObjectId::operator>(const ObjectId& other) const { return *impl > *other.impl; } bool ObjectId::operator<=(const ObjectId& other) const { return !(*impl > *other.impl); } bool ObjectId::operator>=(const ObjectId& other) const { return !(*impl < *other.impl); } ObjectId& ObjectId::operator=(const ObjectId& other) { ObjectIdImpl *old; if (this != &other) { old = impl; impl = new ObjectIdImpl(*(other.impl)); if (old) delete old; } return *this; } qpidc-0.16/src/qmf/engine/ObjectImpl.h0000664000076400007640000000555611274115752020174 0ustar00jrossjross00000000000000#ifndef _QmfEngineObjectImpl_ #define _QmfEngineObjectImpl_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include #include namespace qmf { namespace engine { class BrokerProxyImpl; typedef boost::shared_ptr ObjectPtr; struct ObjectImpl { typedef boost::shared_ptr ValuePtr; const SchemaObjectClass* objectClass; BrokerProxyImpl* broker; boost::shared_ptr objectId; uint64_t createTime; uint64_t destroyTime; uint64_t lastUpdatedTime; mutable std::map properties; mutable std::map statistics; ObjectImpl(const SchemaObjectClass* type); ObjectImpl(const SchemaObjectClass* type, BrokerProxyImpl* b, qpid::framing::Buffer& buffer, bool prop, bool stat, bool managed); static Object* factory(const SchemaObjectClass* type, BrokerProxyImpl* b, qpid::framing::Buffer& buffer, bool prop, bool stat, bool managed); ~ObjectImpl(); void destroy(); const ObjectId* getObjectId() const { return objectId.get(); } void setObjectId(ObjectId* oid) { objectId.reset(new ObjectId(*oid)); } const SchemaObjectClass* getClass() const { return objectClass; } Value* getValue(const std::string& key) const; void invokeMethod(const std::string& methodName, const Value* inArgs, void* context) const; bool isDeleted() const { return destroyTime != 0; } void merge(const Object& from); void parsePresenceMasks(qpid::framing::Buffer& buffer, std::set& excludeList); void encodeSchemaKey(qpid::framing::Buffer& buffer) const; void encodeManagedObjectData(qpid::framing::Buffer& buffer) const; void encodeProperties(qpid::framing::Buffer& buffer) const; void encodeStatistics(qpid::framing::Buffer& buffer) const; }; } } #endif qpidc-0.16/src/qmf/engine/EventImpl.cpp0000664000076400007640000000716711364401257020400 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include using namespace std; using namespace qmf::engine; using qpid::framing::Buffer; EventImpl::EventImpl(const SchemaEventClass* type) : eventClass(type), timestamp(0), severity(0) { int argCount = eventClass->getArgumentCount(); int idx; for (idx = 0; idx < argCount; idx++) { const SchemaArgument* arg = eventClass->getArgument(idx); arguments[arg->getName()] = ValuePtr(new Value(arg->getType())); } } EventImpl::EventImpl(const SchemaEventClass* type, Buffer& buffer) : eventClass(type), timestamp(0), severity(0) { int argCount = eventClass->getArgumentCount(); int idx; timestamp = buffer.getLongLong(); severity = buffer.getOctet(); for (idx = 0; idx < argCount; idx++) { const SchemaArgument *arg = eventClass->getArgument(idx); Value* pval = ValueImpl::factory(arg->getType(), buffer); arguments[arg->getName()] = ValuePtr(pval); } } Event* EventImpl::factory(const SchemaEventClass* type, Buffer& buffer) { EventImpl* impl(new EventImpl(type, buffer)); return new Event(impl); } Value* EventImpl::getValue(const char* key) const { map::const_iterator iter; iter = arguments.find(key); if (iter != arguments.end()) return iter->second.get(); return 0; } void EventImpl::encodeSchemaKey(Buffer& buffer) const { buffer.putShortString(eventClass->getClassKey()->getPackageName()); buffer.putShortString(eventClass->getClassKey()->getClassName()); buffer.putBin128(const_cast(eventClass->getClassKey()->getHash())); } void EventImpl::encode(Buffer& buffer) const { buffer.putOctet((uint8_t) eventClass->getSeverity()); int argCount = eventClass->getArgumentCount(); for (int idx = 0; idx < argCount; idx++) { const SchemaArgument* arg = eventClass->getArgument(idx); ValuePtr value = arguments[arg->getName()]; value->impl->encode(buffer); } } string EventImpl::getRoutingKey(uint32_t brokerBank, uint32_t agentBank) const { stringstream key; key << "console.event." << brokerBank << "." << agentBank << "." << eventClass->getClassKey()->getPackageName() << "." << eventClass->getClassKey()->getClassName(); return key.str(); } //================================================================== // Wrappers //================================================================== Event::Event(const SchemaEventClass* type) : impl(new EventImpl(type)) {} Event::Event(EventImpl* i) : impl(i) {} Event::Event(const Event& from) : impl(new EventImpl(*(from.impl))) {} Event::~Event() { delete impl; } const SchemaEventClass* Event::getClass() const { return impl->getClass(); } Value* Event::getValue(const char* key) const { return impl->getValue(key); } qpidc-0.16/src/qmf/Hash.h0000664000076400007640000000273511717537230015557 0ustar00jrossjross00000000000000#ifndef QMF_HASH_H #define QMF_HASH_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include "qpid/types/Uuid.h" #include namespace qmf { class Hash { public: Hash(); qpid::types::Uuid asUuid() const { return qpid::types::Uuid((const unsigned char*) data); } void update(const char* s, uint32_t len); void update(uint8_t v) { update((char*) &v, sizeof(v)); } void update(uint32_t v) { update((char*) &v, sizeof(v)); } void update(const std::string& v) { update(const_cast(v.c_str()), v.size()); } void update(bool v) { update(uint8_t(v ? 1 : 0)); } private: uint64_t data[2]; }; } #endif qpidc-0.16/src/qmf/constants.h0000664000076400007640000000637511512611130016675 0ustar00jrossjross00000000000000#ifndef QMF_CONSTANTS_H #define QMF_CONSTANTS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qmf { struct protocol { /** * Header key strings */ static const std::string HEADER_KEY_APP_ID; static const std::string HEADER_KEY_METHOD; static const std::string HEADER_KEY_OPCODE; static const std::string HEADER_KEY_AGENT; static const std::string HEADER_KEY_CONTENT; static const std::string HEADER_KEY_PARTIAL; /** * Header values per-key */ static const std::string HEADER_APP_ID_QMF; static const std::string HEADER_METHOD_REQUEST; static const std::string HEADER_METHOD_RESPONSE; static const std::string HEADER_METHOD_INDICATION; static const std::string HEADER_OPCODE_EXCEPTION; static const std::string HEADER_OPCODE_AGENT_LOCATE_REQUEST; static const std::string HEADER_OPCODE_AGENT_LOCATE_RESPONSE; static const std::string HEADER_OPCODE_AGENT_HEARTBEAT_INDICATION; static const std::string HEADER_OPCODE_QUERY_REQUEST; static const std::string HEADER_OPCODE_QUERY_RESPONSE; static const std::string HEADER_OPCODE_SUBSCRIBE_REQUEST; static const std::string HEADER_OPCODE_SUBSCRIBE_RESPONSE; static const std::string HEADER_OPCODE_SUBSCRIBE_CANCEL_INDICATION; static const std::string HEADER_OPCODE_SUBSCRIBE_REFRESH_INDICATION; static const std::string HEADER_OPCODE_DATA_INDICATION; static const std::string HEADER_OPCODE_METHOD_REQUEST; static const std::string HEADER_OPCODE_METHOD_RESPONSE; static const std::string HEADER_CONTENT_SCHEMA_ID; static const std::string HEADER_CONTENT_SCHEMA_CLASS; static const std::string HEADER_CONTENT_OBJECT_ID; static const std::string HEADER_CONTENT_DATA; static const std::string HEADER_CONTENT_EVENT; static const std::string HEADER_CONTENT_QUERY; /** * Keywords for Agent attributes */ static const std::string AGENT_ATTR_VENDOR; static const std::string AGENT_ATTR_PRODUCT; static const std::string AGENT_ATTR_INSTANCE; static const std::string AGENT_ATTR_NAME; static const std::string AGENT_ATTR_TIMESTAMP; static const std::string AGENT_ATTR_HEARTBEAT_INTERVAL; static const std::string AGENT_ATTR_EPOCH; static const std::string AGENT_ATTR_SCHEMA_UPDATED_TIMESTAMP; }; } #endif qpidc-0.16/src/qmf/ConsoleSession.cpp0000664000076400007640000005534011634657177020210 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/PrivateImplRef.h" #include "qmf/ConsoleSessionImpl.h" #include "qmf/AgentImpl.h" #include "qmf/SchemaId.h" #include "qmf/SchemaImpl.h" #include "qmf/ConsoleEventImpl.h" #include "qmf/constants.h" #include "qpid/log/Statement.h" #include "qpid/messaging/AddressParser.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Receiver.h" using namespace std; using namespace qmf; using qpid::messaging::Address; using qpid::messaging::Connection; using qpid::messaging::Receiver; using qpid::messaging::Sender; using qpid::messaging::Duration; using qpid::messaging::Message; using qpid::types::Variant; typedef qmf::PrivateImplRef PI; ConsoleSession::ConsoleSession(ConsoleSessionImpl* impl) { PI::ctor(*this, impl); } ConsoleSession::ConsoleSession(const ConsoleSession& s) : qmf::Handle() { PI::copy(*this, s); } ConsoleSession::~ConsoleSession() { PI::dtor(*this); } ConsoleSession& ConsoleSession::operator=(const ConsoleSession& s) { return PI::assign(*this, s); } ConsoleSession::ConsoleSession(Connection& c, const string& o) { PI::ctor(*this, new ConsoleSessionImpl(c, o)); } void ConsoleSession::setDomain(const string& d) { impl->setDomain(d); } void ConsoleSession::setAgentFilter(const string& f) { impl->setAgentFilter(f); } void ConsoleSession::open() { impl->open(); } void ConsoleSession::close() { impl->close(); } bool ConsoleSession::nextEvent(ConsoleEvent& e, Duration t) { return impl->nextEvent(e, t); } int ConsoleSession::pendingEvents() const { return impl->pendingEvents(); } uint32_t ConsoleSession::getAgentCount() const { return impl->getAgentCount(); } Agent ConsoleSession::getAgent(uint32_t i) const { return impl->getAgent(i); } Agent ConsoleSession::getConnectedBrokerAgent() const { return impl->getConnectedBrokerAgent(); } Subscription ConsoleSession::subscribe(const Query& q, const string& f, const string& o) { return impl->subscribe(q, f, o); } Subscription ConsoleSession::subscribe(const string& q, const string& f, const string& o) { return impl->subscribe(q, f, o); } //======================================================================================== // Impl Method Bodies //======================================================================================== ConsoleSessionImpl::ConsoleSessionImpl(Connection& c, const string& options) : connection(c), domain("default"), maxAgentAgeMinutes(5), listenOnDirect(true), strictSecurity(false), maxThreadWaitTime(5), opened(false), eventNotifier(0), thread(0), threadCanceled(false), lastVisit(0), lastAgePass(0), connectedBrokerInAgentList(false), schemaCache(new SchemaCache()), nextCorrelator(1) { if (!options.empty()) { qpid::messaging::AddressParser parser(options); Variant::Map optMap; Variant::Map::const_iterator iter; parser.parseMap(optMap); iter = optMap.find("domain"); if (iter != optMap.end()) domain = iter->second.asString(); iter = optMap.find("max-agent-age"); if (iter != optMap.end()) maxAgentAgeMinutes = iter->second.asUint32(); iter = optMap.find("listen-on-direct"); if (iter != optMap.end()) listenOnDirect = iter->second.asBool(); iter = optMap.find("strict-security"); if (iter != optMap.end()) strictSecurity = iter->second.asBool(); iter = optMap.find("max-thread-wait-time"); if (iter != optMap.end()) maxThreadWaitTime = iter->second.asUint32(); } if (maxThreadWaitTime > 60) maxThreadWaitTime = 60; } ConsoleSessionImpl::~ConsoleSessionImpl() { if (opened) close(); if (thread) { thread->join(); delete thread; } } void ConsoleSessionImpl::setAgentFilter(const string& predicate) { agentQuery = Query(QUERY_OBJECT, predicate); // // Purge the agent list of any agents that don't match the filter. // { qpid::sys::Mutex::ScopedLock l(lock); map toDelete; for (map::iterator iter = agents.begin(); iter != agents.end(); iter++) if (!agentQuery.matchesPredicate(iter->second.getAttributes())) { toDelete[iter->first] = iter->second; if (iter->second.getName() == connectedBrokerAgent.getName()) connectedBrokerInAgentList = false; } for (map::iterator iter = toDelete.begin(); iter != toDelete.end(); iter++) { agents.erase(iter->first); auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_AGENT_DEL, AGENT_DEL_FILTER)); eventImpl->setAgent(iter->second); enqueueEventLH(eventImpl.release()); } if (!connectedBrokerInAgentList && connectedBrokerAgent.isValid() && agentQuery.matchesPredicate(connectedBrokerAgent.getAttributes())) { agents[connectedBrokerAgent.getName()] = connectedBrokerAgent; connectedBrokerInAgentList = true; // // Enqueue a notification of the new agent. // auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_AGENT_ADD)); eventImpl->setAgent(connectedBrokerAgent); enqueueEventLH(ConsoleEvent(eventImpl.release())); } } // // Broadcast an agent locate request with our new criteria. // if (opened) sendAgentLocate(); } void ConsoleSessionImpl::open() { if (opened) throw QmfException("The session is already open"); // If the thread exists, join and delete it before creating a new one. if (thread) { thread->join(); delete thread; } // Establish messaging addresses directBase = "qmf." + domain + ".direct"; topicBase = "qmf." + domain + ".topic"; string myKey("direct-console." + qpid::types::Uuid(true).str()); replyAddress = Address(topicBase + "/" + myKey + ";{node:{type:topic}}"); // Create AMQP session, receivers, and senders session = connection.createSession(); Receiver directRx = session.createReceiver(replyAddress); Receiver topicRx = session.createReceiver(topicBase + "/agent.#"); // TODO: be more discriminating if (!strictSecurity) { Receiver legacyRx = session.createReceiver("amq.direct/" + myKey + ";{node:{type:topic}}"); legacyRx.setCapacity(64); directSender = session.createSender(directBase + ";{create:never,node:{type:topic}}"); directSender.setCapacity(128); } directRx.setCapacity(64); topicRx.setCapacity(128); topicSender = session.createSender(topicBase + ";{create:never,node:{type:topic}}"); topicSender.setCapacity(128); // Start the receiver thread threadCanceled = false; opened = true; thread = new qpid::sys::Thread(*this); // Send an agent_locate to direct address 'broker' to identify the connected-broker-agent. sendBrokerLocate(); if (agentQuery) sendAgentLocate(); } void ConsoleSessionImpl::closeAsync() { if (!opened) throw QmfException("The session is already closed"); // Stop the receiver thread. Don't join it until the destructor is called or open() is called. threadCanceled = true; opened = false; } void ConsoleSessionImpl::close() { closeAsync(); if (thread) { thread->join(); delete thread; thread = 0; } } bool ConsoleSessionImpl::nextEvent(ConsoleEvent& event, Duration timeout) { uint64_t milliseconds = timeout.getMilliseconds(); qpid::sys::Mutex::ScopedLock l(lock); if (eventQueue.empty() && milliseconds > 0) { int64_t nsecs(qpid::sys::TIME_INFINITE); if ((uint64_t)(nsecs / 1000000) > milliseconds) nsecs = (int64_t) milliseconds * 1000000; qpid::sys::Duration then(nsecs); cond.wait(lock, qpid::sys::AbsTime(qpid::sys::now(), then)); } if (!eventQueue.empty()) { event = eventQueue.front(); eventQueue.pop(); if (eventQueue.empty()) alertEventNotifierLH(false); return true; } return false; } int ConsoleSessionImpl::pendingEvents() const { qpid::sys::Mutex::ScopedLock l(lock); return eventQueue.size(); } void ConsoleSessionImpl::setEventNotifier(EventNotifierImpl* notifier) { qpid::sys::Mutex::ScopedLock l(lock); eventNotifier = notifier; } EventNotifierImpl* ConsoleSessionImpl::getEventNotifier() const { qpid::sys::Mutex::ScopedLock l(lock); return eventNotifier; } uint32_t ConsoleSessionImpl::getAgentCount() const { qpid::sys::Mutex::ScopedLock l(lock); return agents.size(); } Agent ConsoleSessionImpl::getAgent(uint32_t i) const { qpid::sys::Mutex::ScopedLock l(lock); uint32_t count = 0; for (map::const_iterator iter = agents.begin(); iter != agents.end(); iter++) if (count++ == i) return iter->second; throw IndexOutOfRange(); } Subscription ConsoleSessionImpl::subscribe(const Query&, const string&, const string&) { return Subscription(); } Subscription ConsoleSessionImpl::subscribe(const string&, const string&, const string&) { return Subscription(); } void ConsoleSessionImpl::enqueueEvent(const ConsoleEvent& event) { qpid::sys::Mutex::ScopedLock l(lock); enqueueEventLH(event); } void ConsoleSessionImpl::enqueueEventLH(const ConsoleEvent& event) { bool notify = eventQueue.empty(); eventQueue.push(event); if (notify) { cond.notify(); alertEventNotifierLH(true); } } void ConsoleSessionImpl::dispatch(Message msg) { const Variant::Map& properties(msg.getProperties()); Variant::Map::const_iterator iter; Variant::Map::const_iterator oiter; oiter = properties.find(protocol::HEADER_KEY_OPCODE); iter = properties.find(protocol::HEADER_KEY_APP_ID); if (iter == properties.end()) iter = properties.find("app_id"); if (iter != properties.end() && iter->second.asString() == protocol::HEADER_APP_ID_QMF && oiter != properties.end()) { // // Dispatch a QMFv2 formatted message // const string& opcode = oiter->second.asString(); iter = properties.find(protocol::HEADER_KEY_AGENT); if (iter == properties.end()) { QPID_LOG(trace, "Message received with no 'qmf.agent' header"); return; } const string& agentName = iter->second.asString(); Agent agent; { qpid::sys::Mutex::ScopedLock l(lock); map::iterator aIter = agents.find(agentName); if (aIter != agents.end()) { agent = aIter->second; AgentImplAccess::get(agent).touch(); } } if (msg.getContentType() == "amqp/map" && (opcode == protocol::HEADER_OPCODE_AGENT_HEARTBEAT_INDICATION || opcode == protocol::HEADER_OPCODE_AGENT_LOCATE_RESPONSE)) { // // This is the one case where it's ok (necessary actually) to receive a QMFv2 // message from an unknown agent (how else are they going to get known?) // Variant::Map content; decode(msg, content); handleAgentUpdate(agentName, content, msg); return; } if (!agent.isValid()) return; AgentImpl& agentImpl(AgentImplAccess::get(agent)); if (msg.getContentType() == "amqp/map") { Variant::Map content; decode(msg, content); if (opcode == protocol::HEADER_OPCODE_EXCEPTION) agentImpl.handleException(content, msg); else if (opcode == protocol::HEADER_OPCODE_METHOD_RESPONSE) agentImpl.handleMethodResponse(content, msg); else QPID_LOG(error, "Received a map-formatted QMFv2 message with opcode=" << opcode); return; } if (msg.getContentType() == "amqp/list") { Variant::List content; decode(msg, content); if (opcode == protocol::HEADER_OPCODE_QUERY_RESPONSE) agentImpl.handleQueryResponse(content, msg); else if (opcode == protocol::HEADER_OPCODE_DATA_INDICATION) agentImpl.handleDataIndication(content, msg); else QPID_LOG(error, "Received a list-formatted QMFv2 message with opcode=" << opcode); return; } } else { // // Dispatch a QMFv1 formatted message // const string& body(msg.getContent()); if (body.size() < 8) return; qpid::management::Buffer buffer(const_cast(body.c_str()), body.size()); if (buffer.getOctet() != 'A') return; if (buffer.getOctet() != 'M') return; if (buffer.getOctet() != '2') return; char v1Opcode(buffer.getOctet()); uint32_t seq(buffer.getLong()); if (v1Opcode == 's') handleV1SchemaResponse(buffer, seq, msg); else { QPID_LOG(trace, "Unknown or Unsupported QMFv1 opcode: " << v1Opcode); } } } void ConsoleSessionImpl::sendBrokerLocate() { Message msg; Variant::Map& headers(msg.getProperties()); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_REQUEST; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_AGENT_LOCATE_REQUEST; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; msg.setReplyTo(replyAddress); msg.setCorrelationId("broker-locate"); msg.setSubject("broker"); Sender sender = session.createSender(directBase + ";{create:never,node:{type:topic}}"); sender.send(msg); sender.close(); QPID_LOG(trace, "SENT AgentLocate to broker"); } void ConsoleSessionImpl::sendAgentLocate() { Message msg; Variant::Map& headers(msg.getProperties()); static const string subject("console.request.agent_locate"); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_REQUEST; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_AGENT_LOCATE_REQUEST; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; msg.setReplyTo(replyAddress); msg.setCorrelationId("agent-locate"); msg.setSubject(subject); encode(agentQuery.getPredicate(), msg); topicSender.send(msg); QPID_LOG(trace, "SENT AgentLocate to=" << topicSender.getName() << "/" << subject); } void ConsoleSessionImpl::handleAgentUpdate(const string& agentName, const Variant::Map& content, const Message& msg) { Variant::Map::const_iterator iter; Agent agent; uint32_t epoch(0); string cid(msg.getCorrelationId()); iter = content.find("_values"); if (iter == content.end()) return; const Variant::Map& in_attrs(iter->second.asMap()); Variant::Map attrs; // // Copy the map from the message to "attrs". Translate any old-style // keys to their new key values in the process. // for (iter = in_attrs.begin(); iter != in_attrs.end(); iter++) { if (iter->first == "epoch") attrs[protocol::AGENT_ATTR_EPOCH] = iter->second; else if (iter->first == "timestamp") attrs[protocol::AGENT_ATTR_TIMESTAMP] = iter->second; else if (iter->first == "heartbeat_interval") attrs[protocol::AGENT_ATTR_HEARTBEAT_INTERVAL] = iter->second; else attrs[iter->first] = iter->second; } iter = attrs.find(protocol::AGENT_ATTR_EPOCH); if (iter != attrs.end()) epoch = iter->second.asUint32(); if (cid == "broker-locate") { qpid::sys::Mutex::ScopedLock l(lock); auto_ptr impl(new AgentImpl(agentName, epoch, *this)); for (iter = attrs.begin(); iter != attrs.end(); iter++) if (iter->first != protocol::AGENT_ATTR_EPOCH) impl->setAttribute(iter->first, iter->second); agent = Agent(impl.release()); connectedBrokerAgent = agent; if (!agentQuery || agentQuery.matchesPredicate(attrs)) { connectedBrokerInAgentList = true; agents[agentName] = agent; // // Enqueue a notification of the new agent. // auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_AGENT_ADD)); eventImpl->setAgent(agent); enqueueEventLH(ConsoleEvent(eventImpl.release())); } return; } // // Check this agent against the agent filter. Exit if it doesn't match. // (only if this isn't the connected broker agent) // if (agentQuery && (!agentQuery.matchesPredicate(attrs))) return; QPID_LOG(trace, "RCVD AgentHeartbeat from an agent matching our filter: " << agentName); { qpid::sys::Mutex::ScopedLock l(lock); map::iterator aIter = agents.find(agentName); if (aIter == agents.end()) { // // This is a new agent. We have no current record of its existence. // auto_ptr impl(new AgentImpl(agentName, epoch, *this)); for (iter = attrs.begin(); iter != attrs.end(); iter++) if (iter->first != protocol::AGENT_ATTR_EPOCH) impl->setAttribute(iter->first, iter->second); agent = Agent(impl.release()); agents[agentName] = agent; // // Enqueue a notification of the new agent. // auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_AGENT_ADD)); eventImpl->setAgent(agent); enqueueEventLH(ConsoleEvent(eventImpl.release())); } else { // // This is a refresh of an agent we are already tracking. // bool detectedRestart(false); agent = aIter->second; AgentImpl& impl(AgentImplAccess::get(agent)); impl.touch(); if (impl.getEpoch() != epoch) { // // The agent has restarted since the last time we heard from it. // Enqueue a notification. // impl.setEpoch(epoch); auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_AGENT_RESTART)); eventImpl->setAgent(agent); enqueueEventLH(ConsoleEvent(eventImpl.release())); detectedRestart = true; } iter = attrs.find(protocol::AGENT_ATTR_SCHEMA_UPDATED_TIMESTAMP); if (iter != attrs.end()) { uint64_t ts(iter->second.asUint64()); if (ts > impl.getAttribute(protocol::AGENT_ATTR_SCHEMA_UPDATED_TIMESTAMP).asUint64()) { // // The agent has added new schema entries since we last heard from it. // Update the attribute and, if this doesn't accompany a restart, enqueue a notification. // if (!detectedRestart) { auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_AGENT_SCHEMA_UPDATE)); eventImpl->setAgent(agent); enqueueEventLH(ConsoleEvent(eventImpl.release())); } impl.setAttribute(protocol::AGENT_ATTR_SCHEMA_UPDATED_TIMESTAMP, iter->second); } } } } } void ConsoleSessionImpl::handleV1SchemaResponse(qpid::management::Buffer& buffer, uint32_t, const Message&) { QPID_LOG(trace, "RCVD V1SchemaResponse"); Schema schema(new SchemaImpl(buffer)); schemaCache->declareSchema(schema); } void ConsoleSessionImpl::periodicProcessing(uint64_t seconds) { // // The granularity of this timer is seconds. Don't waste time looking for work if // it's been less than a second since we last visited. // if (seconds == lastVisit) return; lastVisit = seconds; // // Handle the aging of agent records // if (lastAgePass == 0) lastAgePass = seconds; if (seconds - lastAgePass >= 60) { lastAgePass = seconds; map toDelete; qpid::sys::Mutex::ScopedLock l(lock); for (map::iterator iter = agents.begin(); iter != agents.end(); iter++) if ((iter->second.getName() != connectedBrokerAgent.getName()) && (AgentImplAccess::get(iter->second).age() > maxAgentAgeMinutes)) toDelete[iter->first] = iter->second; for (map::iterator iter = toDelete.begin(); iter != toDelete.end(); iter++) { agents.erase(iter->first); auto_ptr eventImpl(new ConsoleEventImpl(CONSOLE_AGENT_DEL, AGENT_DEL_AGED)); eventImpl->setAgent(iter->second); enqueueEventLH(eventImpl.release()); } } } void ConsoleSessionImpl::alertEventNotifierLH(bool readable) { if (eventNotifier) eventNotifier->setReadable(readable); } void ConsoleSessionImpl::run() { QPID_LOG(debug, "ConsoleSession thread started"); try { while (!threadCanceled) { periodicProcessing((uint64_t) qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now()) / qpid::sys::TIME_SEC); Receiver rx; bool valid = session.nextReceiver(rx, Duration::SECOND * maxThreadWaitTime); if (threadCanceled) break; if (valid) { try { dispatch(rx.fetch()); } catch (qpid::types::Exception& e) { QPID_LOG(error, "Exception caught in message dispatch: " << e.what()); } session.acknowledge(); } } } catch (qpid::types::Exception& e) { QPID_LOG(error, "Exception caught in message thread - exiting: " << e.what()); enqueueEvent(ConsoleEvent(new ConsoleEventImpl(CONSOLE_THREAD_FAILED))); } session.close(); QPID_LOG(debug, "ConsoleSession thread exiting"); } ConsoleSessionImpl& ConsoleSessionImplAccess::get(ConsoleSession& session) { return *session.impl; } const ConsoleSessionImpl& ConsoleSessionImplAccess::get(const ConsoleSession& session) { return *session.impl; } qpidc-0.16/src/qmf/Query.cpp0000664000076400007640000001143511502255322016320 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/PrivateImplRef.h" #include "qmf/exceptions.h" #include "qmf/QueryImpl.h" #include "qmf/DataAddrImpl.h" #include "qmf/SchemaIdImpl.h" #include "qpid/messaging/AddressParser.h" using namespace std; using namespace qmf; using qpid::types::Variant; typedef PrivateImplRef PI; Query::Query(QueryImpl* impl) { PI::ctor(*this, impl); } Query::Query(const Query& s) : qmf::Handle() { PI::copy(*this, s); } Query::~Query() { PI::dtor(*this); } Query& Query::operator=(const Query& s) { return PI::assign(*this, s); } Query::Query(QueryTarget t, const string& pr) { PI::ctor(*this, new QueryImpl(t, pr)); } Query::Query(QueryTarget t, const string& c, const string& p, const string& pr) { PI::ctor(*this, new QueryImpl(t, c, p, pr)); } Query::Query(QueryTarget t, const SchemaId& s, const string& pr) { PI::ctor(*this, new QueryImpl(t, s, pr)); } Query::Query(const DataAddr& a) { PI::ctor(*this, new QueryImpl(a)); } QueryTarget Query::getTarget() const { return impl->getTarget(); } const DataAddr& Query::getDataAddr() const { return impl->getDataAddr(); } const SchemaId& Query::getSchemaId() const { return impl->getSchemaId(); } void Query::setPredicate(const Variant::List& pr) { impl->setPredicate(pr); } const Variant::List& Query::getPredicate() const { return impl->getPredicate(); } bool Query::matchesPredicate(const qpid::types::Variant::Map& map) const { return impl->matchesPredicate(map); } QueryImpl::QueryImpl(const Variant::Map& map) : predicateCompiled(false) { Variant::Map::const_iterator iter; iter = map.find("_what"); if (iter == map.end()) throw QmfException("Query missing _what element"); const string& targetString(iter->second.asString()); if (targetString == "OBJECT") target = QUERY_OBJECT; else if (targetString == "OBJECT_ID") target = QUERY_OBJECT_ID; else if (targetString == "SCHEMA") target = QUERY_SCHEMA; else if (targetString == "SCHEMA_ID") target = QUERY_SCHEMA_ID; else throw QmfException("Query with invalid _what value: " + targetString); iter = map.find("_object_id"); if (iter != map.end()) { auto_ptr addrImpl(new DataAddrImpl(iter->second.asMap())); dataAddr = DataAddr(addrImpl.release()); } iter = map.find("_schema_id"); if (iter != map.end()) { auto_ptr sidImpl(new SchemaIdImpl(iter->second.asMap())); schemaId = SchemaId(sidImpl.release()); } iter = map.find("_where"); if (iter != map.end()) predicate = iter->second.asList(); } Variant::Map QueryImpl::asMap() const { Variant::Map map; string targetString; switch (target) { case QUERY_OBJECT : targetString = "OBJECT"; break; case QUERY_OBJECT_ID : targetString = "OBJECT_ID"; break; case QUERY_SCHEMA : targetString = "SCHEMA"; break; case QUERY_SCHEMA_ID : targetString = "SCHEMA_ID"; break; } map["_what"] = targetString; if (dataAddr.isValid()) map["_object_id"] = DataAddrImplAccess::get(dataAddr).asMap(); if (schemaId.isValid()) map["_schema_id"] = SchemaIdImplAccess::get(schemaId).asMap(); if (!predicate.empty()) map["_where"] = predicate; return map; } bool QueryImpl::matchesPredicate(const qpid::types::Variant::Map& data) const { if (predicate.empty()) return true; if (!predicateCompiled) { expression.reset(new Expression(predicate)); predicateCompiled = true; } return expression->evaluate(data); } void QueryImpl::parsePredicate(const string& pred) { if (pred.empty()) return; if (pred[0] == '[') { // // Parse this as an AddressParser list. // qpid::messaging::AddressParser parser(pred); parser.parseList(predicate); } else throw QmfException("Invalid predicate format"); } QueryImpl& QueryImplAccess::get(Query& item) { return *item.impl; } const QueryImpl& QueryImplAccess::get(const Query& item) { return *item.impl; } qpidc-0.16/src/qmf/AgentEventImpl.h0000664000076400007640000000730711513127136017550 0ustar00jrossjross00000000000000#ifndef _QMF_AGENT_EVENT_IMPL_H_ #define _QMF_AGENT_EVENT_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/IntegerTypes.h" #include "qpid/messaging/Address.h" #include "qmf/AgentEvent.h" #include "qmf/Query.h" #include "qmf/DataAddr.h" #include "qmf/Data.h" #include "qmf/Schema.h" #include namespace qmf { class AgentEventImpl : public virtual qpid::RefCounted { public: // // Impl-only methods // AgentEventImpl(AgentEventCode e) : eventType(e) {} void setUserId(const std::string& u) { userId = u; } void setQuery(const Query& q) { query = q; } void setDataAddr(const DataAddr& d) { dataAddr = d; } void setMethodName(const std::string& m) { methodName = m; } void setArguments(const qpid::types::Variant::Map& a) { arguments = a; } void setArgumentSubtypes(const qpid::types::Variant::Map& a) { argumentSubtypes = a; } void setReplyTo(const qpid::messaging::Address& r) { replyTo = r; } void setSchema(const Schema& s) { schema = s; } const qpid::messaging::Address& getReplyTo() { return replyTo; } void setCorrelationId(const std::string& c) { correlationId = c; } const std::string& getCorrelationId() { return correlationId; } const qpid::types::Variant::Map& getReturnArguments() const { return outArguments; } const qpid::types::Variant::Map& getReturnArgumentSubtypes() const { return outArgumentSubtypes; } uint32_t enqueueData(const Data&); Data dequeueData(); // // Methods from API handle // AgentEventCode getType() const { return eventType; } const std::string& getUserId() const { return userId; } Query getQuery() const { return query; } bool hasDataAddr() const { return dataAddr.isValid(); } DataAddr getDataAddr() const { return dataAddr; } const std::string& getMethodName() const { return methodName; } qpid::types::Variant::Map& getArguments() { return arguments; } qpid::types::Variant::Map& getArgumentSubtypes() { return argumentSubtypes; } void addReturnArgument(const std::string&, const qpid::types::Variant&, const std::string&); private: const AgentEventCode eventType; std::string userId; qpid::messaging::Address replyTo; std::string correlationId; Query query; DataAddr dataAddr; Schema schema; std::string methodName; qpid::types::Variant::Map arguments; qpid::types::Variant::Map argumentSubtypes; qpid::types::Variant::Map outArguments; qpid::types::Variant::Map outArgumentSubtypes; qpid::sys::Mutex lock; std::queue dataQueue; }; struct AgentEventImplAccess { static AgentEventImpl& get(AgentEvent&); static const AgentEventImpl& get(const AgentEvent&); }; } #endif qpidc-0.16/src/qmf/Hash.cpp0000664000076400007640000000253211431072571016100 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/Hash.h" using namespace qmf; Hash::Hash() { data[0] = 0x5A5A5A5A5A5A5A5ALL; data[1] = 0x5A5A5A5A5A5A5A5ALL; } void Hash::update(const char* s, uint32_t len) { uint64_t* first = &data[0]; uint64_t* second = &data[1]; for (uint32_t idx = 0; idx < len; idx++) { uint64_t recycle = ((*second & 0xff00000000000000LL) >> 56); *second = *second << 8; *second |= ((*first & 0xFF00000000000000LL) >> 56); *first = *first << 8; *first = *first + (uint64_t) s[idx] + recycle; } } qpidc-0.16/src/qmf/AgentSessionImpl.h0000664000076400007640000001354211636133574020121 0ustar00jrossjross00000000000000#ifndef __QMF_AGENT_SESSION_IMPL_H #define __QMF_AGENT_SESSION_IMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/PrivateImplRef.h" #include "qmf/exceptions.h" #include "qmf/AgentSession.h" #include "qmf/AgentEventImpl.h" #include "qmf/EventNotifierImpl.h" #include "qpid/messaging/Connection.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Condition.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/log/Statement.h" #include "qpid/messaging/Connection.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/AddressParser.h" #include "qpid/management/Buffer.h" #include "qpid/RefCounted.h" #include "qmf/PrivateImplRef.h" #include "qmf/AgentSession.h" #include "qmf/exceptions.h" #include "qmf/AgentSession.h" #include "qmf/SchemaIdImpl.h" #include "qmf/SchemaImpl.h" #include "qmf/DataAddrImpl.h" #include "qmf/DataImpl.h" #include "qmf/QueryImpl.h" #include "qmf/agentCapability.h" #include "qmf/constants.h" #include #include #include #include using namespace std; using namespace qpid::messaging; using namespace qmf; using qpid::types::Variant; typedef qmf::PrivateImplRef PI; namespace qmf { class AgentSessionImpl : public virtual qpid::RefCounted, public qpid::sys::Runnable { public: ~AgentSessionImpl(); // // Methods from API handle // AgentSessionImpl(Connection& c, const string& o); void setDomain(const string& d) { checkOpen(); domain = d; } void setVendor(const string& v) { checkOpen(); attributes["_vendor"] = v; } void setProduct(const string& p) { checkOpen(); attributes["_product"] = p; } void setInstance(const string& i) { checkOpen(); attributes["_instance"] = i; } void setAttribute(const string& k, const qpid::types::Variant& v) { checkOpen(); attributes[k] = v; } const string& getName() const { return agentName; } void open(); void closeAsync(); void close(); bool nextEvent(AgentEvent& e, Duration t); int pendingEvents() const; void setEventNotifier(EventNotifierImpl* eventNotifier); EventNotifierImpl* getEventNotifier() const; void registerSchema(Schema& s); DataAddr addData(Data& d, const string& n, bool persist); void delData(const DataAddr&); void authAccept(AgentEvent& e); void authReject(AgentEvent& e, const string& m); void raiseException(AgentEvent& e, const string& s); void raiseException(AgentEvent& e, const Data& d); void response(AgentEvent& e, const Data& d); void complete(AgentEvent& e); void methodSuccess(AgentEvent& e); void raiseEvent(const Data& d); void raiseEvent(const Data& d, int s); private: typedef map DataIndex; typedef map SchemaMap; mutable qpid::sys::Mutex lock; qpid::sys::Condition cond; Connection connection; Session session; Sender directSender; Sender topicSender; string domain; Variant::Map attributes; Variant::Map options; string agentName; bool opened; queue eventQueue; EventNotifierImpl* eventNotifier; qpid::sys::Thread* thread; bool threadCanceled; uint32_t bootSequence; uint32_t interval; uint64_t lastHeartbeat; uint64_t lastVisit; bool forceHeartbeat; bool externalStorage; bool autoAllowQueries; bool autoAllowMethods; uint32_t maxSubscriptions; uint32_t minSubInterval; uint32_t subLifetime; bool publicEvents; bool listenOnDirect; bool strictSecurity; uint32_t maxThreadWaitTime; uint64_t schemaUpdateTime; string directBase; string topicBase; SchemaMap schemata; DataIndex globalIndex; map schemaIndex; void checkOpen(); void setAgentName(); void enqueueEvent(const AgentEvent&); void alertEventNotifierLH(bool readable); void handleLocateRequest(const Variant::List& content, const Message& msg); void handleMethodRequest(const Variant::Map& content, const Message& msg); void handleQueryRequest(const Variant::Map& content, const Message& msg); void handleSchemaRequest(AgentEvent&); void handleV1SchemaRequest(qpid::management::Buffer&, uint32_t, const Message&); void dispatch(Message); void sendHeartbeat(); void send(Message, const Address&); void flushResponses(AgentEvent&, bool); void periodicProcessing(uint64_t); void run(); }; struct AgentSessionImplAccess { static AgentSessionImpl& get(AgentSession& session); static const AgentSessionImpl& get(const AgentSession& session); }; } #endif qpidc-0.16/src/qmf/Expression.h0000664000076400007640000000427311446224071017025 0ustar00jrossjross00000000000000#ifndef _QMF_EXPRESSION_H_ #define _QMF_EXPRESSION_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/types/Variant.h" #include #include #include namespace qmf { enum LogicalOp { LOGICAL_ID = 1, LOGICAL_NOT = 2, LOGICAL_AND = 3, LOGICAL_OR = 4 }; enum BooleanOp { BOOL_EQ = 1, BOOL_NE = 2, BOOL_LT = 3, BOOL_LE = 4, BOOL_GT = 5, BOOL_GE = 6, BOOL_RE_MATCH = 7, BOOL_EXISTS = 8, BOOL_TRUE = 9, BOOL_FALSE = 10 }; class Expression { public: Expression(const qpid::types::Variant::List& expr); bool evaluate(const qpid::types::Variant::Map& data) const; private: LogicalOp logicalOp; BooleanOp boolOp; int operandCount; qpid::types::Variant operands[2]; bool quoted[2]; std::list > expressionList; bool boolEval(const qpid::types::Variant::Map& data) const; bool lessThan(const qpid::types::Variant& left, const qpid::types::Variant& right) const; bool lessEqual(const qpid::types::Variant& left, const qpid::types::Variant& right) const; bool greaterThan(const qpid::types::Variant& left, const qpid::types::Variant& right) const; bool greaterEqual(const qpid::types::Variant& left, const qpid::types::Variant& right) const; }; } #endif qpidc-0.16/src/qmf/Expression.cpp0000664000076400007640000003264211446224071017361 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/exceptions.h" #include "qmf/Expression.h" #include using namespace std; using namespace qmf; using namespace qpid::types; Expression::Expression(const Variant::List& expr) { static int level(0); level++; Variant::List::const_iterator iter(expr.begin()); string op(iter->asString()); iter++; if (op == "not") logicalOp = LOGICAL_NOT; else if (op == "and") logicalOp = LOGICAL_AND; else if (op == "or") logicalOp = LOGICAL_OR; else { logicalOp = LOGICAL_ID; if (op == "eq") boolOp = BOOL_EQ; else if (op == "ne") boolOp = BOOL_NE; else if (op == "lt") boolOp = BOOL_LT; else if (op == "le") boolOp = BOOL_LE; else if (op == "gt") boolOp = BOOL_GT; else if (op == "ge") boolOp = BOOL_GE; else if (op == "re_match") boolOp = BOOL_RE_MATCH; else if (op == "exists") boolOp = BOOL_EXISTS; else if (op == "true") boolOp = BOOL_TRUE; else if (op == "false") boolOp = BOOL_FALSE; else throw QmfException("Invalid operator in predicate expression"); } if (logicalOp == LOGICAL_ID) { switch (boolOp) { case BOOL_EQ: case BOOL_NE: case BOOL_LT: case BOOL_LE: case BOOL_GT: case BOOL_GE: case BOOL_RE_MATCH: // // Binary operator: get two operands. // operandCount = 2; break; case BOOL_EXISTS: // // Unary operator: get one operand. // operandCount = 1; break; case BOOL_TRUE: case BOOL_FALSE: // // Literal operator: no operands. // operandCount = 0; break; } for (int idx = 0; idx < operandCount; idx++) { if (iter == expr.end()) throw QmfException("Too few operands for operation: " + op); if (iter->getType() == VAR_STRING) { quoted[idx] = false; operands[idx] = *iter; } else if (iter->getType() == VAR_LIST) { const Variant::List& sublist(iter->asList()); Variant::List::const_iterator subIter(sublist.begin()); if (subIter != sublist.end() && subIter->asString() == "quote") { quoted[idx] = true; subIter++; if (subIter != sublist.end()) { operands[idx] = *subIter; subIter++; if (subIter != sublist.end()) throw QmfException("Extra tokens at end of 'quote'"); } } else throw QmfException("Expected '[quote, ]'"); } else throw QmfException("Expected string or list as operand for: " + op); iter++; } if (iter != expr.end()) throw QmfException("Too many operands for operation: " + op); } else { // // This is a logical expression, collect sub-expressions // while (iter != expr.end()) { if (iter->getType() != VAR_LIST) throw QmfException("Operands of " + op + " must be lists"); expressionList.push_back(boost::shared_ptr(new Expression(iter->asList()))); iter++; } } level--; } bool Expression::evaluate(const Variant::Map& data) const { list >::const_iterator iter; switch (logicalOp) { case LOGICAL_ID: return boolEval(data); case LOGICAL_NOT: for (iter = expressionList.begin(); iter != expressionList.end(); iter++) if ((*iter)->evaluate(data)) return false; return true; case LOGICAL_AND: for (iter = expressionList.begin(); iter != expressionList.end(); iter++) if (!(*iter)->evaluate(data)) return false; return true; case LOGICAL_OR: for (iter = expressionList.begin(); iter != expressionList.end(); iter++) if ((*iter)->evaluate(data)) return true; return false; } return false; } bool Expression::boolEval(const Variant::Map& data) const { Variant val[2]; bool exists[2]; for (int idx = 0; idx < operandCount; idx++) { if (quoted[idx]) { exists[idx] = true; val[idx] = operands[idx]; } else { Variant::Map::const_iterator mIter(data.find(operands[idx].asString())); if (mIter == data.end()) { exists[idx] = false; } else { exists[idx] = true; val[idx] = mIter->second; } } } switch (boolOp) { case BOOL_EQ: return (exists[0] && exists[1] && (val[0].asString() == val[1].asString())); case BOOL_NE: return (exists[0] && exists[1] && (val[0].asString() != val[1].asString())); case BOOL_LT: return (exists[0] && exists[1] && lessThan(val[0], val[1])); case BOOL_LE: return (exists[0] && exists[1] && lessEqual(val[0], val[1])); case BOOL_GT: return (exists[0] && exists[1] && greaterThan(val[0], val[1])); case BOOL_GE: return (exists[0] && exists[1] && greaterEqual(val[0], val[1])); case BOOL_RE_MATCH: return false; // TODO case BOOL_EXISTS: return exists[0]; case BOOL_TRUE: return true; case BOOL_FALSE: return false; } return false; } bool Expression::lessThan(const Variant& left, const Variant& right) const { switch (left.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: switch (right.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: return left.asInt64() < right.asInt64(); case VAR_STRING: try { return left.asInt64() < right.asInt64(); } catch (std::exception&) {} break; default: break; } break; case VAR_FLOAT: case VAR_DOUBLE: switch (right.getType()) { case VAR_FLOAT: case VAR_DOUBLE: return left.asDouble() < right.asDouble(); case VAR_STRING: try { return left.asDouble() < right.asDouble(); } catch (std::exception&) {} break; default: break; } break; case VAR_STRING: switch (right.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: try { return left.asInt64() < right.asInt64(); } catch (std::exception&) {} break; case VAR_FLOAT: case VAR_DOUBLE: try { return left.asDouble() < right.asDouble(); } catch (std::exception&) {} break; case VAR_STRING: return left.asString() < right.asString(); default: break; } default: break; } return false; } bool Expression::lessEqual(const Variant& left, const Variant& right) const { switch (left.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: switch (right.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: return left.asInt64() <= right.asInt64(); case VAR_STRING: try { return left.asInt64() <= right.asInt64(); } catch (std::exception&) {} break; default: break; } break; case VAR_FLOAT: case VAR_DOUBLE: switch (right.getType()) { case VAR_FLOAT: case VAR_DOUBLE: return left.asDouble() <= right.asDouble(); case VAR_STRING: try { return left.asDouble() <= right.asDouble(); } catch (std::exception&) {} break; default: break; } break; case VAR_STRING: switch (right.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: try { return left.asInt64() <= right.asInt64(); } catch (std::exception&) {} break; case VAR_FLOAT: case VAR_DOUBLE: try { return left.asDouble() <= right.asDouble(); } catch (std::exception&) {} break; case VAR_STRING: return left.asString() <= right.asString(); default: break; } default: break; } return false; } bool Expression::greaterThan(const Variant& left, const Variant& right) const { switch (left.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: switch (right.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: return left.asInt64() > right.asInt64(); case VAR_STRING: try { return left.asInt64() > right.asInt64(); } catch (std::exception&) {} break; default: break; } break; case VAR_FLOAT: case VAR_DOUBLE: switch (right.getType()) { case VAR_FLOAT: case VAR_DOUBLE: return left.asDouble() > right.asDouble(); case VAR_STRING: try { return left.asDouble() > right.asDouble(); } catch (std::exception&) {} break; default: break; } break; case VAR_STRING: switch (right.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: try { return left.asInt64() > right.asInt64(); } catch (std::exception&) {} break; case VAR_FLOAT: case VAR_DOUBLE: try { return left.asDouble() > right.asDouble(); } catch (std::exception&) {} break; case VAR_STRING: return left.asString() > right.asString(); default: break; } default: break; } return false; } bool Expression::greaterEqual(const Variant& left, const Variant& right) const { switch (left.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: switch (right.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: return left.asInt64() >= right.asInt64(); case VAR_STRING: try { return left.asInt64() >= right.asInt64(); } catch (std::exception&) {} break; default: break; } break; case VAR_FLOAT: case VAR_DOUBLE: switch (right.getType()) { case VAR_FLOAT: case VAR_DOUBLE: return left.asDouble() >= right.asDouble(); case VAR_STRING: try { return left.asDouble() >= right.asDouble(); } catch (std::exception&) {} break; default: break; } break; case VAR_STRING: switch (right.getType()) { case VAR_UINT8: case VAR_UINT16: case VAR_UINT32: case VAR_UINT64: case VAR_INT8: case VAR_INT16: case VAR_INT32: case VAR_INT64: try { return left.asInt64() >= right.asInt64(); } catch (std::exception&) {} break; case VAR_FLOAT: case VAR_DOUBLE: try { return left.asDouble() >= right.asDouble(); } catch (std::exception&) {} break; case VAR_STRING: return left.asString() >= right.asString(); default: break; } default: break; } return false; } qpidc-0.16/src/qmf/SchemaIdImpl.h0000664000076400007640000000525311446224071017164 0ustar00jrossjross00000000000000#ifndef _QMF_SCHEMA_ID_IMPL_H_ #define _QMF_SCHEMA_ID_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/SchemaId.h" #include "qpid/types/Variant.h" #include "qpid/types/Uuid.h" #include namespace qmf { class SchemaIdImpl : public virtual qpid::RefCounted { public: // // Public impl-only methods // SchemaIdImpl(const qpid::types::Variant::Map&); qpid::types::Variant::Map asMap() const; // // Methods from API handle // SchemaIdImpl(int t, const std::string& p, const std::string& n) : sType(t), package(p), name(n) {} void setHash(const qpid::types::Uuid& h) { hash = h; } int getType() const { return sType; } const std::string& getPackageName() const { return package; } const std::string& getName() const { return name; } const qpid::types::Uuid& getHash() const { return hash; } private: int sType; std::string package; std::string name; qpid::types::Uuid hash; }; struct SchemaIdImplAccess { static SchemaIdImpl& get(SchemaId&); static const SchemaIdImpl& get(const SchemaId&); }; struct SchemaIdCompare { bool operator() (const SchemaId& lhs, const SchemaId& rhs) const { if (lhs.getName() != rhs.getName()) return lhs.getName() < rhs.getName(); if (lhs.getPackageName() != rhs.getPackageName()) return lhs.getPackageName() < rhs.getPackageName(); return lhs.getHash() < rhs.getHash(); } }; struct SchemaIdCompareNoHash { bool operator() (const SchemaId& lhs, const SchemaId& rhs) const { if (lhs.getName() != rhs.getName()) return lhs.getName() < rhs.getName(); return lhs.getPackageName() < rhs.getPackageName(); } }; } #endif qpidc-0.16/src/qmf/SchemaImpl.h0000664000076400007640000000652711512611130016702 0ustar00jrossjross00000000000000#ifndef _QMF_SCHEMAIMPL_H_ #define _QMF_SCHEMAIMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/PrivateImplRef.h" #include "qmf/exceptions.h" #include "qmf/SchemaTypes.h" #include "qmf/SchemaId.h" #include "qmf/Schema.h" #include "qmf/SchemaProperty.h" #include "qmf/SchemaMethod.h" #include namespace qpid { namespace management { class Buffer; }} namespace qmf { class SchemaImpl : public virtual qpid::RefCounted { public: // // Impl-only public methods // SchemaImpl(const qpid::types::Variant::Map& m); qpid::types::Variant::Map asMap() const; SchemaImpl(qpid::management::Buffer& v1Buffer); std::string asV1Content(uint32_t sequence) const; bool isValidProperty(const std::string& k, const qpid::types::Variant& v) const; bool isValidMethodInArg(const std::string& m, const std::string& k, const qpid::types::Variant& v) const; bool isValidMethodOutArg(const std::string& m, const std::string& k, const qpid::types::Variant& v) const; // // Methods from API handle // SchemaImpl(int t, const std::string& p, const std::string& c) : schemaId(t, p, c), finalized(false) {} const SchemaId& getSchemaId() const { checkNotFinal(); return schemaId; } void finalize(); bool isFinalized() const { return finalized; } void addProperty(const SchemaProperty& p) { checkFinal(); properties.push_back(p); } void addMethod(const SchemaMethod& m) { checkFinal(); methods.push_back(m); } void setDesc(const std::string& d) { description = d; } const std::string& getDesc() const { return description; } void setDefaultSeverity(int s) { checkFinal(); defaultSeverity = s; } int getDefaultSeverity() const { return defaultSeverity; } uint32_t getPropertyCount() const { return properties.size(); } SchemaProperty getProperty(uint32_t i) const; uint32_t getMethodCount() const { return methods.size(); } SchemaMethod getMethod(uint32_t i) const; private: SchemaId schemaId; int defaultSeverity; std::string description; bool finalized; std::list properties; std::list methods; void checkFinal() const; void checkNotFinal() const; bool isCompatibleType(int qmfType, qpid::types::VariantType qpidType) const; }; struct SchemaImplAccess { static SchemaImpl& get(Schema&); static const SchemaImpl& get(const Schema&); }; } #endif qpidc-0.16/src/qmf/AgentSubscription.cpp0000664000076400007640000000275011512611130020650 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/AgentSubscription.h" using namespace qmf; AgentSubscription::AgentSubscription(uint64_t _id, uint64_t _interval, uint64_t _life, const std::string& _replyTo, const std::string& _cid, Query _query) : id(_id), interval(_interval), lifetime(_life), timeSincePublish(0), timeSinceKeepalive(0), replyTo(_replyTo), cid(_cid), query(_query) { } AgentSubscription::~AgentSubscription() { } bool AgentSubscription::tick(uint64_t seconds) { timeSinceKeepalive += seconds; if (timeSinceKeepalive >= lifetime) return false; timeSincePublish += seconds; if (timeSincePublish >= interval) { } return true; } qpidc-0.16/src/qmf/SchemaMethod.cpp0000664000076400007640000001336211515566663017576 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/SchemaMethodImpl.h" #include "qmf/PrivateImplRef.h" #include "qmf/exceptions.h" #include "qmf/Hash.h" #include "qpid/messaging/AddressParser.h" #include "qpid/management/Buffer.h" using namespace std; using qpid::types::Variant; using namespace qmf; typedef PrivateImplRef PI; SchemaMethod::SchemaMethod(SchemaMethodImpl* impl) { PI::ctor(*this, impl); } SchemaMethod::SchemaMethod(const SchemaMethod& s) : qmf::Handle() { PI::copy(*this, s); } SchemaMethod::~SchemaMethod() { PI::dtor(*this); } SchemaMethod& SchemaMethod::operator=(const SchemaMethod& s) { return PI::assign(*this, s); } SchemaMethod::SchemaMethod(const string& n, const string& o) { PI::ctor(*this, new SchemaMethodImpl(n, o)); } void SchemaMethod::setDesc(const string& d) { impl->setDesc(d); } void SchemaMethod::addArgument(const SchemaProperty& p) { impl->addArgument(p); } const string& SchemaMethod::getName() const { return impl->getName(); } const string& SchemaMethod::getDesc() const { return impl->getDesc(); } uint32_t SchemaMethod::getArgumentCount() const { return impl->getArgumentCount(); } SchemaProperty SchemaMethod::getArgument(uint32_t i) const { return impl->getArgument(i); } //======================================================================================== // Impl Method Bodies //======================================================================================== SchemaMethodImpl::SchemaMethodImpl(const string& n, const string& options) : name(n) { if (!options.empty()) { qpid::messaging::AddressParser parser = qpid::messaging::AddressParser(options); Variant::Map optMap; Variant::Map::iterator iter; parser.parseMap(optMap); iter = optMap.find("desc"); if (iter != optMap.end()) { desc = iter->second.asString(); optMap.erase(iter); } if (!optMap.empty()) throw QmfException("Unrecognized option: " + optMap.begin()->first); } } SchemaMethodImpl::SchemaMethodImpl(const qpid::types::Variant::Map& map) { Variant::Map::const_iterator iter; Variant::List::const_iterator lIter; iter = map.find("_name"); if (iter == map.end()) throw QmfException("SchemaMethod without a _name element"); name = iter->second.asString(); iter = map.find("_desc"); if (iter != map.end()) desc = iter->second.asString(); iter = map.find("_arguments"); if (iter != map.end()) { const Variant::List& argList(iter->second.asList()); for (lIter = argList.begin(); lIter != argList.end(); lIter++) addArgument(SchemaProperty(new SchemaPropertyImpl(lIter->asMap()))); } } Variant::Map SchemaMethodImpl::asMap() const { Variant::Map map; Variant::List argList; map["_name"] = name; if (!desc.empty()) map["_desc"] = desc; for (list::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++) argList.push_back(SchemaPropertyImplAccess::get(*iter).asMap()); map["_arguments"] = argList; return map; } SchemaMethodImpl::SchemaMethodImpl(qpid::management::Buffer& buffer) { Variant::Map::const_iterator iter; Variant::Map argMap; buffer.getMap(argMap); iter = argMap.find("name"); if (iter == argMap.end()) throw QmfException("Received V1 Method without a name"); name = iter->second.asString(); iter = argMap.find("desc"); if (iter != argMap.end()) desc = iter->second.asString(); iter = argMap.find("argCount"); if (iter == argMap.end()) throw QmfException("Received V1 Method without argCount"); int64_t count = iter->second.asInt64(); for (int idx = 0; idx < count; idx++) { SchemaProperty arg(new SchemaPropertyImpl(buffer)); addArgument(arg); } } SchemaProperty SchemaMethodImpl::getArgument(uint32_t i) const { uint32_t count = 0; for (list::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++) if (count++ == i) return *iter; throw IndexOutOfRange(); } void SchemaMethodImpl::updateHash(Hash& hash) const { hash.update(name); hash.update(desc); for (list::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++) SchemaPropertyImplAccess::get(*iter).updateHash(hash); } void SchemaMethodImpl::encodeV1(qpid::management::Buffer& buffer) const { Variant::Map map; map["name"] = name; map["argCount"] = (uint64_t) arguments.size(); if (!desc.empty()) map["desc"] = desc; buffer.putMap(map); for (list::const_iterator iter = arguments.begin(); iter != arguments.end(); iter++) SchemaPropertyImplAccess::get(*iter).encodeV1(buffer, true, true); } SchemaMethodImpl& SchemaMethodImplAccess::get(SchemaMethod& item) { return *item.impl; } const SchemaMethodImpl& SchemaMethodImplAccess::get(const SchemaMethod& item) { return *item.impl; } qpidc-0.16/src/qmf/DataImpl.h0000664000076400007640000000572611512611130016353 0ustar00jrossjross00000000000000#ifndef _QMF_DATA_IMPL_H_ #define _QMF_DATA_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/Data.h" #include "qmf/SchemaId.h" #include "qmf/Schema.h" #include "qmf/DataAddr.h" #include "qmf/Agent.h" #include "qmf/AgentSubscription.h" #include "qpid/types/Variant.h" namespace qmf { class DataImpl : public virtual qpid::RefCounted { public: // // Public impl-only methods // DataImpl(const qpid::types::Variant::Map&, const Agent&); qpid::types::Variant::Map asMap() const; DataImpl() {} void addSubscription(boost::shared_ptr); void delSubscription(uint64_t); qpid::types::Variant::Map publishSubscription(uint64_t); const Schema& getSchema() const { return schema; } // // Methods from API handle // DataImpl(const Schema& s) : schema(s) {} void setAddr(const DataAddr& a) { dataAddr = a; } void setProperty(const std::string& k, const qpid::types::Variant& v); void overwriteProperties(const qpid::types::Variant::Map& m); bool hasSchema() const { return schemaId.isValid() || schema.isValid(); } bool hasAddr() const { return dataAddr.isValid(); } const SchemaId& getSchemaId() const { if (schema.isValid()) return schema.getSchemaId(); else return schemaId; } const DataAddr& getAddr() const { return dataAddr; } const qpid::types::Variant& getProperty(const std::string& k) const; const qpid::types::Variant::Map& getProperties() const { return properties; } bool hasAgent() const { return agent.isValid(); } const Agent& getAgent() const { return agent; } private: struct Subscr { boost::shared_ptr subscription; qpid::types::Variant::Map deltas; }; std::map > subscriptions; SchemaId schemaId; Schema schema; DataAddr dataAddr; qpid::types::Variant::Map properties; Agent agent; }; struct DataImplAccess { static DataImpl& get(Data&); static const DataImpl& get(const Data&); }; } #endif qpidc-0.16/src/qmf/ConsoleSessionImpl.h0000664000076400007640000001104211636133574020456 0ustar00jrossjross00000000000000#ifndef _QMF_CONSOLE_SESSION_IMPL_H_ #define _QMF_CONSOLE_SESSION_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/ConsoleSession.h" #include "qmf/AgentImpl.h" #include "qmf/SchemaId.h" #include "qmf/Schema.h" #include "qmf/ConsoleEventImpl.h" #include "qmf/EventNotifierImpl.h" #include "qmf/SchemaCache.h" #include "qmf/Query.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Condition.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/log/Statement.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/Connection.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/Sender.h" #include "qpid/messaging/Address.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include #include #include using namespace std; namespace qmf { class ConsoleSessionImpl : public virtual qpid::RefCounted, public qpid::sys::Runnable { public: ~ConsoleSessionImpl(); // // Methods from API handle // ConsoleSessionImpl(qpid::messaging::Connection& c, const std::string& o); void setDomain(const std::string& d) { domain = d; } void setAgentFilter(const std::string& f); void open(); void closeAsync(); void close(); bool nextEvent(ConsoleEvent& e, qpid::messaging::Duration t); int pendingEvents() const; void setEventNotifier(EventNotifierImpl* notifier); EventNotifierImpl* getEventNotifier() const; uint32_t getAgentCount() const; Agent getAgent(uint32_t i) const; Agent getConnectedBrokerAgent() const { return connectedBrokerAgent; } Subscription subscribe(const Query&, const std::string& agentFilter, const std::string& options); Subscription subscribe(const std::string&, const std::string& agentFilter, const std::string& options); protected: mutable qpid::sys::Mutex lock; qpid::sys::Condition cond; qpid::messaging::Connection connection; qpid::messaging::Session session; qpid::messaging::Sender directSender; qpid::messaging::Sender topicSender; std::string domain; uint32_t maxAgentAgeMinutes; bool listenOnDirect; bool strictSecurity; uint32_t maxThreadWaitTime; Query agentQuery; bool opened; std::queue eventQueue; EventNotifierImpl* eventNotifier; qpid::sys::Thread* thread; bool threadCanceled; uint64_t lastVisit; uint64_t lastAgePass; std::map agents; Agent connectedBrokerAgent; bool connectedBrokerInAgentList; qpid::messaging::Address replyAddress; std::string directBase; std::string topicBase; boost::shared_ptr schemaCache; qpid::sys::Mutex corrlock; uint32_t nextCorrelator; void enqueueEvent(const ConsoleEvent&); void enqueueEventLH(const ConsoleEvent&); void dispatch(qpid::messaging::Message); void sendBrokerLocate(); void sendAgentLocate(); void handleAgentUpdate(const std::string&, const qpid::types::Variant::Map&, const qpid::messaging::Message&); void handleV1SchemaResponse(qpid::management::Buffer&, uint32_t, const qpid::messaging::Message&); void periodicProcessing(uint64_t); void alertEventNotifierLH(bool readable); void run(); uint32_t correlator() { qpid::sys::Mutex::ScopedLock l(corrlock); return nextCorrelator++; } friend class AgentImpl; }; struct ConsoleSessionImplAccess { static ConsoleSessionImpl& get(ConsoleSession& session); static const ConsoleSessionImpl& get(const ConsoleSession& session); }; } #endif qpidc-0.16/src/qmf/PosixEventNotifierImpl.h0000664000076400007640000000341011633730116021304 0ustar00jrossjross00000000000000#ifndef __QMF_POSIX_EVENT_NOTIFIER_IMPL_H #define __QMF_POSIX_EVENT_NOTIFIER_IMPL_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/posix/EventNotifier.h" #include "qmf/EventNotifierImpl.h" #include "qpid/RefCounted.h" namespace qmf { class AgentSession; class ConsoleSession; class PosixEventNotifierImpl : public EventNotifierImpl, public virtual qpid::RefCounted { public: PosixEventNotifierImpl(AgentSession& agentSession); PosixEventNotifierImpl(ConsoleSession& consoleSession); virtual ~PosixEventNotifierImpl(); int getHandle() const { return yourHandle; } private: int myHandle; int yourHandle; void openHandle(); void closeHandle(); protected: void update(bool readable); }; struct PosixEventNotifierImplAccess { static PosixEventNotifierImpl& get(posix::EventNotifier& notifier); static const PosixEventNotifierImpl& get(const posix::EventNotifier& notifier); }; } #endif qpidc-0.16/src/qmf/QueryImpl.h0000664000076400007640000000542111446224071016611 0ustar00jrossjross00000000000000#ifndef _QMF_QUERY_IMPL_H_ #define _QMF_QUERY_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/Query.h" #include "qmf/DataAddr.h" #include "qmf/SchemaId.h" #include "qmf/Expression.h" #include "qpid/types/Variant.h" #include namespace qmf { class QueryImpl : public virtual qpid::RefCounted { public: // // Public impl-only methods // QueryImpl(const qpid::types::Variant::Map&); qpid::types::Variant::Map asMap() const; // // Methods from API handle // QueryImpl(QueryTarget t, const std::string& pr) : target(t), predicateCompiled(false) { parsePredicate(pr); } QueryImpl(QueryTarget t, const std::string& c, const std::string& p, const std::string& pr) : target(t), schemaId(SCHEMA_TYPE_DATA, p, c), predicateCompiled(false) { parsePredicate(pr); } QueryImpl(QueryTarget t, const SchemaId& s, const std::string& pr) : target(t), schemaId(s), predicateCompiled(false) { parsePredicate(pr); } QueryImpl(const DataAddr& a) : target(QUERY_OBJECT), dataAddr(a), predicateCompiled(false) {} QueryTarget getTarget() const { return target; } const DataAddr& getDataAddr() const { return dataAddr; } const SchemaId& getSchemaId() const { return schemaId; } void setPredicate(const qpid::types::Variant::List& pr) { predicate = pr; } const qpid::types::Variant::List& getPredicate() const { return predicate; } bool matchesPredicate(const qpid::types::Variant::Map& map) const; private: QueryTarget target; SchemaId schemaId; DataAddr dataAddr; qpid::types::Variant::List predicate; mutable bool predicateCompiled; mutable boost::shared_ptr expression; void parsePredicate(const std::string& s); }; struct QueryImplAccess { static QueryImpl& get(Query&); static const QueryImpl& get(const Query&); }; } #endif qpidc-0.16/src/qmf/SchemaId.cpp0000664000076400007640000000555511522317631016702 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/SchemaIdImpl.h" #include "qmf/PrivateImplRef.h" using namespace std; using namespace qmf; using qpid::types::Variant; typedef PrivateImplRef PI; SchemaId::SchemaId(SchemaIdImpl* impl) { PI::ctor(*this, impl); } SchemaId::SchemaId(const SchemaId& s) : qmf::Handle() { PI::copy(*this, s); } SchemaId::~SchemaId() { PI::dtor(*this); } SchemaId& SchemaId::operator=(const SchemaId& s) { return PI::assign(*this, s); } SchemaId::SchemaId(int t, const string& p, const string& n) { PI::ctor(*this, new SchemaIdImpl(t, p, n)); } void SchemaId::setHash(const qpid::types::Uuid& h) { impl->setHash(h); } int SchemaId::getType() const { return impl->getType(); } const string& SchemaId::getPackageName() const { return impl->getPackageName(); } const string& SchemaId::getName() const { return impl->getName(); } const qpid::types::Uuid& SchemaId::getHash() const { return impl->getHash(); } SchemaIdImpl::SchemaIdImpl(const Variant::Map& map) { Variant::Map::const_iterator iter; iter = map.find("_package_name"); if (iter != map.end()) package = iter->second.asString(); iter = map.find("_class_name"); if (iter != map.end()) name = iter->second.asString(); iter = map.find("_type"); if (iter != map.end()) { const string& stype = iter->second.asString(); if (stype == "_data") sType = SCHEMA_TYPE_DATA; else if (stype == "_event") sType = SCHEMA_TYPE_EVENT; } iter = map.find("_hash"); if (iter != map.end()) hash = iter->second.asUuid(); } Variant::Map SchemaIdImpl::asMap() const { Variant::Map result; result["_package_name"] = package; result["_class_name"] = name; if (sType == SCHEMA_TYPE_DATA) result["_type"] = "_data"; else result["_type"] = "_event"; if (!hash.isNull()) result["_hash"] = hash; return result; } SchemaIdImpl& SchemaIdImplAccess::get(SchemaId& item) { return *item.impl; } const SchemaIdImpl& SchemaIdImplAccess::get(const SchemaId& item) { return *item.impl; } qpidc-0.16/src/qmf/PosixEventNotifierImpl.cpp0000664000076400007640000000545711634217567021667 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "PosixEventNotifierImpl.h" #include "qpid/log/Statement.h" #include #include #include #define BUFFER_SIZE 10 using namespace qmf; PosixEventNotifierImpl::PosixEventNotifierImpl(AgentSession& agentSession) : EventNotifierImpl(agentSession) { openHandle(); } PosixEventNotifierImpl::PosixEventNotifierImpl(ConsoleSession& consoleSession) : EventNotifierImpl(consoleSession) { openHandle(); } PosixEventNotifierImpl::~PosixEventNotifierImpl() { closeHandle(); } void PosixEventNotifierImpl::update(bool readable) { char buffer[BUFFER_SIZE]; if(readable && !this->isReadable()) { if (::write(myHandle, "1", 1) == -1) QPID_LOG(error, "PosixEventNotifierImpl::update write failed: " << errno); } else if(!readable && this->isReadable()) { if (::read(yourHandle, buffer, BUFFER_SIZE) == -1) QPID_LOG(error, "PosixEventNotifierImpl::update read failed: " << errno); } } void PosixEventNotifierImpl::openHandle() { int pair[2]; if(::pipe(pair) == -1) throw QmfException("Unable to open event notifier handle."); yourHandle = pair[0]; myHandle = pair[1]; int flags; flags = ::fcntl(yourHandle, F_GETFL); if((::fcntl(yourHandle, F_SETFL, flags | O_NONBLOCK)) == -1) throw QmfException("Unable to make remote handle non-blocking."); flags = ::fcntl(myHandle, F_GETFL); if((::fcntl(myHandle, F_SETFL, flags | O_NONBLOCK)) == -1) throw QmfException("Unable to make local handle non-blocking."); } void PosixEventNotifierImpl::closeHandle() { if(myHandle > 0) { ::close(myHandle); myHandle = -1; } if(yourHandle > 0) { ::close(yourHandle); yourHandle = -1; } } PosixEventNotifierImpl& PosixEventNotifierImplAccess::get(posix::EventNotifier& notifier) { return *notifier.impl; } const PosixEventNotifierImpl& PosixEventNotifierImplAccess::get(const posix::EventNotifier& notifier) { return *notifier.impl; } qpidc-0.16/src/qmf/Subscription.cpp0000664000076400007640000000432111512611130017665 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/PrivateImplRef.h" #include "qmf/exceptions.h" #include "qmf/SubscriptionImpl.h" #include "qmf/DataImpl.h" using namespace std; using namespace qmf; using qpid::types::Variant; typedef PrivateImplRef PI; Subscription::Subscription(SubscriptionImpl* impl) { PI::ctor(*this, impl); } Subscription::Subscription(const Subscription& s) : qmf::Handle() { PI::copy(*this, s); } Subscription::~Subscription() { PI::dtor(*this); } Subscription& Subscription::operator=(const Subscription& s) { return PI::assign(*this, s); } void Subscription::cancel() { impl->cancel(); } bool Subscription::isActive() const { return impl->isActive(); } void Subscription::lock() { impl->lock(); } void Subscription::unlock() { impl->unlock(); } uint32_t Subscription::getDataCount() const { return impl->getDataCount(); } Data Subscription::getData(uint32_t i) const { return impl->getData(i); } void SubscriptionImpl::cancel() { } bool SubscriptionImpl::isActive() const { return false; } void SubscriptionImpl::lock() { } void SubscriptionImpl::unlock() { } uint32_t SubscriptionImpl::getDataCount() const { return 0; } Data SubscriptionImpl::getData(uint32_t) const { return Data(); } SubscriptionImpl& SubscriptionImplAccess::get(Subscription& item) { return *item.impl; } const SubscriptionImpl& SubscriptionImplAccess::get(const Subscription& item) { return *item.impl; } qpidc-0.16/src/qmf/EventNotifierImpl.cpp0000664000076400007640000000324411633730116020621 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/EventNotifierImpl.h" #include "qmf/AgentSessionImpl.h" #include "qmf/ConsoleSessionImpl.h" EventNotifierImpl::EventNotifierImpl(AgentSession& agentSession) : readable(false), agent(agentSession) { AgentSessionImplAccess::get(agent).setEventNotifier(this); } EventNotifierImpl::EventNotifierImpl(ConsoleSession& consoleSession) : readable(false), console(consoleSession) { ConsoleSessionImplAccess::get(console).setEventNotifier(this); } EventNotifierImpl::~EventNotifierImpl() { if (agent.isValid()) AgentSessionImplAccess::get(agent).setEventNotifier(NULL); if (console.isValid()) ConsoleSessionImplAccess::get(console).setEventNotifier(NULL); } void EventNotifierImpl::setReadable(bool readable) { update(readable); this->readable = readable; } bool EventNotifierImpl::isReadable() const { return this->readable; } qpidc-0.16/src/qmf/org/0000775000076400007640000000000011752725714015310 5ustar00jrossjross00000000000000qpidc-0.16/src/qmf/org/apache/0000775000076400007640000000000011752725714016531 5ustar00jrossjross00000000000000qpidc-0.16/src/qmf/org/apache/qpid/0000775000076400007640000000000011752725714017466 5ustar00jrossjross00000000000000qpidc-0.16/src/qmf/org/apache/qpid/ha/0000775000076400007640000000000011752725715020057 5ustar00jrossjross00000000000000qpidc-0.16/src/qmf/org/apache/qpid/ha/Package.cpp0000664000076400007640000000207111752725673022121 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "Package.h" #include "HaBroker.h" using namespace qmf::org::apache::qpid::ha; Package::Package (::qpid::management::ManagementAgent* agent) { HaBroker::registerSelf(agent); } qpidc-0.16/src/qmf/org/apache/qpid/ha/ArgsHaBrokerReplicate.h0000664000076400007640000000237111752725673024401 0ustar00jrossjross00000000000000 #ifndef _ARGS_HABROKERREPLICATE_ #define _ARGS_HABROKERREPLICATE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace ha { class ArgsHaBrokerReplicate : public ::qpid::management::Args { public: std::string i_broker; std::string i_queue; }; }}}}} #endif /*!_ARGS_HABROKERREPLICATE_*/ qpidc-0.16/src/qmf/org/apache/qpid/ha/HaBroker.cpp0000664000076400007640000004062411752725673022271 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "HaBroker.h" #include "ArgsHaBrokerSetBrokers.h" #include "ArgsHaBrokerSetPublicBrokers.h" #include "ArgsHaBrokerSetExpectedBackups.h" #include "ArgsHaBrokerReplicate.h" #include #include using namespace qmf::org::apache::qpid::ha; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string HaBroker::packageName = string ("org.apache.qpid.ha"); string HaBroker::className = string ("habroker"); uint8_t HaBroker::md5Sum[MD5_LEN] = {0xc6,0x81,0xdf,0x94,0x41,0xcb,0xc4,0xfd,0x90,0x59,0xd7,0x94,0xe3,0x47,0xdf,0x80}; HaBroker::HaBroker (ManagementAgent*, Manageable* _core, const std::string& _name) : ManagementObject(_core),name(_name) { status = ""; brokers = ""; publicBrokers = ""; expectedBackups = 0; } HaBroker::~HaBroker () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void HaBroker::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void HaBroker::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (5); // Config Element Count buf.putShort (0); // Inst Element Count buf.putShort (5); // Method Count // Properties ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; ft[DESC] = "Primary Key"; buf.putMap(ft); ft.clear(); ft[NAME] = "status"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "HA status: primary or backup"; buf.putMap(ft); ft.clear(); ft[NAME] = "brokers"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Multiple-address URL used by HA brokers to connect to each other."; buf.putMap(ft); ft.clear(); ft[NAME] = "publicBrokers"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Multiple-address URL used by clients to connect to the HA brokers."; buf.putMap(ft); ft.clear(); ft[NAME] = "expectedBackups"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Number of HA backup brokers expected."; buf.putMap(ft); // Statistics // Methods ft.clear(); ft[NAME] = "promote"; ft[ARGCOUNT] = 0; ft[DESC] = "Promote a backup broker to primary."; buf.putMap(ft); ft.clear(); ft[NAME] = "setBrokers"; ft[ARGCOUNT] = 1; ft[DESC] = "Set URL for HA brokers to connect to each other."; buf.putMap(ft); ft.clear(); ft[NAME] = "url"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "setPublicBrokers"; ft[ARGCOUNT] = 1; ft[DESC] = "Set URL for clients to connect to HA brokers"; buf.putMap(ft); ft.clear(); ft[NAME] = "url"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "setExpectedBackups"; ft[ARGCOUNT] = 1; ft[DESC] = "Set number of backups expected"; buf.putMap(ft); ft.clear(); ft[NAME] = "expectedBackups"; ft[TYPE] = TYPE_U16; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "replicate"; ft[ARGCOUNT] = 2; ft[DESC] = "Replicate from a remote queue to the local broker."; buf.putMap(ft); ft.clear(); ft[NAME] = "broker"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "queue"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t HaBroker::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += (1 + name.length()); // name size += (1 + status.length()); // status size += (1 + brokers.length()); // brokers size += (1 + publicBrokers.length()); // publicBrokers size += 2; // expectedBackups return size; } void HaBroker::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } buf.getShortString(name); buf.getShortString(status); buf.getShortString(brokers); buf.getShortString(publicBrokers); expectedBackups = buf.getShort(); delete [] _tmpBuf; } void HaBroker::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } buf.putShortString(name); buf.putShortString(status); buf.putShortString(brokers); buf.putShortString(publicBrokers); buf.putShort(expectedBackups); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void HaBroker::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void HaBroker::doMethod (string& methodName, const string& inStr, string& outStr, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); char *_tmpBuf = new char[inStr.length()]; memcpy(_tmpBuf, inStr.data(), inStr.length()); ::qpid::management::Buffer inBuf(_tmpBuf, inStr.length()); if (methodName == "promote") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_PROMOTE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_PROMOTE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "setBrokers") { _matched = true; ArgsHaBrokerSetBrokers ioArgs; inBuf.getShortString(ioArgs.i_url); bool allow = coreObject->AuthorizeMethod(METHOD_SETBROKERS, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETBROKERS, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "setPublicBrokers") { _matched = true; ArgsHaBrokerSetPublicBrokers ioArgs; inBuf.getShortString(ioArgs.i_url); bool allow = coreObject->AuthorizeMethod(METHOD_SETPUBLICBROKERS, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETPUBLICBROKERS, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "setExpectedBackups") { _matched = true; ArgsHaBrokerSetExpectedBackups ioArgs; ioArgs.i_expectedBackups = inBuf.getShort(); bool allow = coreObject->AuthorizeMethod(METHOD_SETEXPECTEDBACKUPS, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETEXPECTEDBACKUPS, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "replicate") { _matched = true; ArgsHaBrokerReplicate ioArgs; inBuf.getShortString(ioArgs.i_broker); inBuf.getShortString(ioArgs.i_queue); bool allow = coreObject->AuthorizeMethod(METHOD_REPLICATE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_REPLICATE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } delete [] _tmpBuf; if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string HaBroker::getKey() const { std::stringstream key; key << name; return key.str(); } void HaBroker::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["name"] = ::qpid::types::Variant(name); _map["status"] = ::qpid::types::Variant(status); _map["brokers"] = ::qpid::types::Variant(brokers); _map["publicBrokers"] = ::qpid::types::Variant(publicBrokers); _map["expectedBackups"] = ::qpid::types::Variant(expectedBackups); } if (includeStatistics) { instChanged = false; // Maintenance of hi-lo statistics } } void HaBroker::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } if ((_i = _map.find("status")) != _map.end()) { status = (_i->second).getString(); } if ((_i = _map.find("brokers")) != _map.end()) { brokers = (_i->second).getString(); } if ((_i = _map.find("publicBrokers")) != _map.end()) { publicBrokers = (_i->second).getString(); } if ((_i = _map.find("expectedBackups")) != _map.end()) { expectedBackups = _i->second; } } void HaBroker::doMethod (string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "promote") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_PROMOTE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_PROMOTE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "setBrokers") { ArgsHaBrokerSetBrokers ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("url")) != inMap.end()) { ioArgs.i_url = (_i->second).getString(); } bool allow = coreObject->AuthorizeMethod(METHOD_SETBROKERS, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETBROKERS, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "setPublicBrokers") { ArgsHaBrokerSetPublicBrokers ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("url")) != inMap.end()) { ioArgs.i_url = (_i->second).getString(); } bool allow = coreObject->AuthorizeMethod(METHOD_SETPUBLICBROKERS, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETPUBLICBROKERS, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "setExpectedBackups") { ArgsHaBrokerSetExpectedBackups ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("expectedBackups")) != inMap.end()) { ioArgs.i_expectedBackups = _i->second; } bool allow = coreObject->AuthorizeMethod(METHOD_SETEXPECTEDBACKUPS, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETEXPECTEDBACKUPS, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "replicate") { ArgsHaBrokerReplicate ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("broker")) != inMap.end()) { ioArgs.i_broker = (_i->second).getString(); } if ((_i = inMap.find("queue")) != inMap.end()) { ioArgs.i_queue = (_i->second).getString(); } bool allow = coreObject->AuthorizeMethod(METHOD_REPLICATE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_REPLICATE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/ha/Package.h0000664000076400007640000000253211752725673021570 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_HA_ #define _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_HA_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementAgent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace ha { class Package { public: QPID_BROKER_EXTERN Package (::qpid::management::ManagementAgent* agent); QPID_BROKER_EXTERN ~Package () {} }; }}}}} #endif /*!_MANAGEMENT_PACKAGE_ORG_APACHE_QPID_HA_*/ qpidc-0.16/src/qmf/org/apache/qpid/ha/ArgsHaBrokerSetExpectedBackups.h0000664000076400007640000000241211752725673026213 0ustar00jrossjross00000000000000 #ifndef _ARGS_HABROKERSETEXPECTEDBACKUPS_ #define _ARGS_HABROKERSETEXPECTEDBACKUPS_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace ha { class ArgsHaBrokerSetExpectedBackups : public ::qpid::management::Args { public: uint16_t i_expectedBackups; }; }}}}} #endif /*!_ARGS_HABROKERSETEXPECTEDBACKUPS_*/ qpidc-0.16/src/qmf/org/apache/qpid/ha/HaBroker.h0000664000076400007640000001233111752725673021730 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_HA_HABROKER_ #define _MANAGEMENT_ORG_APACHE_QPID_HA_HABROKER_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace ha { QPID_BROKER_CLASS_EXTERN class HaBroker : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties std::string name; std::string status; std::string brokers; std::string publicBrokers; uint16_t expectedBackups; // Statistics public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } // Stub for getInstChanged. There are no statistics in this class. bool getInstChanged() { return false; } bool hasInst() { return false; } QPID_BROKER_EXTERN HaBroker( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, const std::string& _name); QPID_BROKER_EXTERN ~HaBroker(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_PROMOTE = 1; QPID_BROKER_EXTERN static const uint32_t METHOD_SETBROKERS = 2; QPID_BROKER_EXTERN static const uint32_t METHOD_SETPUBLICBROKERS = 3; QPID_BROKER_EXTERN static const uint32_t METHOD_SETEXPECTEDBACKUPS = 4; QPID_BROKER_EXTERN static const uint32_t METHOD_REPLICATE = 5; // Accessor Methods inline void set_status (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); status = val; configChanged = true; } inline const std::string& get_status() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return status; } inline void set_brokers (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); brokers = val; configChanged = true; } inline const std::string& get_brokers() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return brokers; } inline void set_publicBrokers (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); publicBrokers = val; configChanged = true; } inline const std::string& get_publicBrokers() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return publicBrokers; } inline void set_expectedBackups (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); expectedBackups = val; configChanged = true; } inline uint16_t get_expectedBackups() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return expectedBackups; } }; }}}}} #endif /*!_MANAGEMENT_HABROKER_*/ qpidc-0.16/src/qmf/org/apache/qpid/ha/ArgsHaBrokerSetPublicBrokers.h0000664000076400007640000000237111752725673025713 0ustar00jrossjross00000000000000 #ifndef _ARGS_HABROKERSETPUBLICBROKERS_ #define _ARGS_HABROKERSETPUBLICBROKERS_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace ha { class ArgsHaBrokerSetPublicBrokers : public ::qpid::management::Args { public: std::string i_url; }; }}}}} #endif /*!_ARGS_HABROKERSETPUBLICBROKERS_*/ qpidc-0.16/src/qmf/org/apache/qpid/ha/ArgsHaBrokerSetBrokers.h0000664000076400007640000000234111752725673024551 0ustar00jrossjross00000000000000 #ifndef _ARGS_HABROKERSETBROKERS_ #define _ARGS_HABROKERSETBROKERS_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace ha { class ArgsHaBrokerSetBrokers : public ::qpid::management::Args { public: std::string i_url; }; }}}}} #endif /*!_ARGS_HABROKERSETBROKERS_*/ qpidc-0.16/src/qmf/org/apache/qpid/acl/0000775000076400007640000000000011752725715020226 5ustar00jrossjross00000000000000qpidc-0.16/src/qmf/org/apache/qpid/acl/Package.cpp0000664000076400007640000000247611752725673022301 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "Package.h" #include "Acl.h" #include "EventAllow.h" #include "EventDeny.h" #include "EventFileLoaded.h" #include "EventFileLoadFailed.h" using namespace qmf::org::apache::qpid::acl; Package::Package (::qpid::management::ManagementAgent* agent) { Acl::registerSelf(agent); EventAllow::registerSelf(agent); EventDeny::registerSelf(agent); EventFileLoaded::registerSelf(agent); EventFileLoadFailed::registerSelf(agent); } qpidc-0.16/src/qmf/org/apache/qpid/acl/Acl.h0000664000076400007640000001412311752725673021102 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_ACL_ACL_ #define _MANAGEMENT_ORG_APACHE_QPID_ACL_ACL_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace acl { QPID_BROKER_CLASS_EXTERN class Acl : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties ::qpid::management::ObjectId brokerRef; std::string policyFile; bool enforcingAcl; bool transferAcl; int64_t lastAclLoad; // Statistics // Per-Thread Statistics public: struct PerThreadStats { uint64_t aclDenyCount; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->aclDenyCount = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Acl( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent); QPID_BROKER_EXTERN ~Acl(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_RELOADACLFILE = 1; // Accessor Methods inline void set_brokerRef (const ::qpid::management::ObjectId& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); brokerRef = val; configChanged = true; } inline const ::qpid::management::ObjectId& get_brokerRef() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return brokerRef; } inline void set_policyFile (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); policyFile = val; configChanged = true; } inline const std::string& get_policyFile() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return policyFile; } inline void set_enforcingAcl (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); enforcingAcl = val; configChanged = true; } inline bool get_enforcingAcl() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return enforcingAcl; } inline void set_transferAcl (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); transferAcl = val; configChanged = true; } inline bool get_transferAcl() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return transferAcl; } inline void set_lastAclLoad (int64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); lastAclLoad = val; configChanged = true; } inline int64_t get_lastAclLoad() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return lastAclLoad; } inline void inc_aclDenyCount (uint64_t by = 1) { getThreadStats()->aclDenyCount += by; instChanged = true; } inline void dec_aclDenyCount (uint64_t by = 1) { getThreadStats()->aclDenyCount -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}} #endif /*!_MANAGEMENT_ACL_*/ qpidc-0.16/src/qmf/org/apache/qpid/acl/EventFileLoaded.cpp0000664000076400007640000000650211752725673023732 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventFileLoaded.h" using namespace qmf::org::apache::qpid::acl; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventFileLoaded::packageName = string ("org.apache.qpid.acl"); string EventFileLoaded::eventName = string ("fileLoaded"); uint8_t EventFileLoaded::md5Sum[16] = {0x9b,0x79,0x80,0xfe,0xa6,0xfe,0x94,0x44,0x3c,0x21,0xf9,0xbe,0x10,0x90,0x74,0x7d}; EventFileLoaded::EventFileLoaded (const std::string& _userId) : userId(_userId) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventFileLoaded::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventFileLoaded::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (1); // Argument Count // Arguments ft.clear(); ft[NAME] = "userId"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventFileLoaded::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(userId); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventFileLoaded::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["userId"] = ::qpid::types::Variant(userId); } bool EventFileLoaded::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/acl/EventDeny.cpp0000664000076400007640000001034411752725673022640 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventDeny.h" using namespace qmf::org::apache::qpid::acl; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventDeny::packageName = string ("org.apache.qpid.acl"); string EventDeny::eventName = string ("deny"); uint8_t EventDeny::md5Sum[16] = {0x8c,0x6a,0xec,0x3d,0xcb,0x5a,0xe0,0xbf,0x83,0xdc,0xba,0xcc,0x10,0x45,0xb,0x3a}; EventDeny::EventDeny (const std::string& _userId, const std::string& _action, const std::string& _objectType, const std::string& _objectName, const ::qpid::types::Variant::Map& _arguments) : userId(_userId), action(_action), objectType(_objectType), objectName(_objectName), arguments(_arguments) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventDeny::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventDeny::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (5); // Argument Count // Arguments ft.clear(); ft[NAME] = "userId"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); ft.clear(); ft[NAME] = "action"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); ft.clear(); ft[NAME] = "objectType"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); ft.clear(); ft[NAME] = "objectName"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); ft.clear(); ft[NAME] = "arguments"; ft[TYPE] = TYPE_FTABLE; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventDeny::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(userId); buf.putShortString(action); buf.putShortString(objectType); buf.putShortString(objectName); buf.putMap(arguments); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventDeny::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["userId"] = ::qpid::types::Variant(userId); map["action"] = ::qpid::types::Variant(action); map["objectType"] = ::qpid::types::Variant(objectType); map["objectName"] = ::qpid::types::Variant(objectName); map["arguments"] = ::qpid::types::Variant(arguments); } bool EventDeny::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/acl/EventFileLoaded.h0000664000076400007640000000421511752725673023376 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_FILELOADED_ #define _MANAGEMENT_FILELOADED_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace acl { QPID_BROKER_CLASS_EXTERN class EventFileLoaded : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& userId; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventFileLoaded(const std::string& _userId); QPID_BROKER_EXTERN ~EventFileLoaded() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_FILELOADED_*/ qpidc-0.16/src/qmf/org/apache/qpid/acl/EventFileLoadFailed.h0000664000076400007640000000435011752725673024172 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_FILELOADFAILED_ #define _MANAGEMENT_FILELOADFAILED_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace acl { QPID_BROKER_CLASS_EXTERN class EventFileLoadFailed : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& userId; const std::string& reason; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventFileLoadFailed(const std::string& _userId, const std::string& _reason); QPID_BROKER_EXTERN ~EventFileLoadFailed() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 3; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_FILELOADFAILED_*/ qpidc-0.16/src/qmf/org/apache/qpid/acl/EventAllow.cpp0000664000076400007640000001036111752725673023016 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventAllow.h" using namespace qmf::org::apache::qpid::acl; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventAllow::packageName = string ("org.apache.qpid.acl"); string EventAllow::eventName = string ("allow"); uint8_t EventAllow::md5Sum[16] = {0x7a,0xf6,0x20,0x16,0xb7,0x10,0x15,0xb5,0x46,0x2c,0xc9,0x3e,0x2a,0x27,0x27,0x59}; EventAllow::EventAllow (const std::string& _userId, const std::string& _action, const std::string& _objectType, const std::string& _objectName, const ::qpid::types::Variant::Map& _arguments) : userId(_userId), action(_action), objectType(_objectType), objectName(_objectName), arguments(_arguments) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventAllow::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventAllow::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (5); // Argument Count // Arguments ft.clear(); ft[NAME] = "userId"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); ft.clear(); ft[NAME] = "action"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); ft.clear(); ft[NAME] = "objectType"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); ft.clear(); ft[NAME] = "objectName"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); ft.clear(); ft[NAME] = "arguments"; ft[TYPE] = TYPE_FTABLE; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventAllow::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(userId); buf.putShortString(action); buf.putShortString(objectType); buf.putShortString(objectName); buf.putMap(arguments); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventAllow::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["userId"] = ::qpid::types::Variant(userId); map["action"] = ::qpid::types::Variant(action); map["objectType"] = ::qpid::types::Variant(objectType); map["objectName"] = ::qpid::types::Variant(objectName); map["arguments"] = ::qpid::types::Variant(arguments); } bool EventAllow::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/acl/Package.h0000664000076400007640000000253611752725673021743 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_ACL_ #define _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_ACL_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementAgent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace acl { class Package { public: QPID_BROKER_EXTERN Package (::qpid::management::ManagementAgent* agent); QPID_BROKER_EXTERN ~Package () {} }; }}}}} #endif /*!_MANAGEMENT_PACKAGE_ORG_APACHE_QPID_ACL_*/ qpidc-0.16/src/qmf/org/apache/qpid/acl/Acl.cpp0000664000076400007640000002567611752725673021454 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Acl.h" #include #include using namespace qmf::org::apache::qpid::acl; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Acl::packageName = string ("org.apache.qpid.acl"); string Acl::className = string ("acl"); uint8_t Acl::md5Sum[MD5_LEN] = {0x20,0x69,0x0,0xd5,0xad,0xca,0x4,0xb4,0x32,0xad,0x81,0xdc,0x9b,0xb4,0xf2,0x46}; Acl::Acl (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent) : ManagementObject(_core) { brokerRef = _parent->GetManagementObject ()->getObjectId (); policyFile = ""; enforcingAcl = 0; transferAcl = 0; lastAclLoad = 0; perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Acl::~Acl () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Acl::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Acl::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (5); // Config Element Count buf.putShort (1); // Inst Element Count buf.putShort (1); // Method Count // Properties ft.clear(); ft[NAME] = "brokerRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "policyFile"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Name of the policy file"; buf.putMap(ft); ft.clear(); ft[NAME] = "enforcingAcl"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Currently Enforcing ACL"; buf.putMap(ft); ft.clear(); ft[NAME] = "transferAcl"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Any transfer ACL rules in force"; buf.putMap(ft); ft.clear(); ft[NAME] = "lastAclLoad"; ft[TYPE] = TYPE_ABSTIME; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Timestamp of last successful load of ACL"; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "aclDenyCount"; ft[TYPE] = TYPE_U64; ft[UNIT] = "request"; ft[DESC] = "Number of ACL requests denied"; buf.putMap(ft); // Methods ft.clear(); ft[NAME] = "reloadACLFile"; ft[ARGCOUNT] = 0; ft[DESC] = "Reload the ACL file"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Acl::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->aclDenyCount = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->aclDenyCount += threadStats->aclDenyCount; } } } uint32_t Acl::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 16; // brokerRef size += (2 + policyFile.length()); // policyFile size += 1; // enforcingAcl size += 1; // transferAcl size += 8; // lastAclLoad return size; } void Acl::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } {std::string _s; buf.getRawData(_s, brokerRef.encodedSize()); brokerRef.decode(_s);}; buf.getMediumString(policyFile); enforcingAcl = buf.getOctet()==1; transferAcl = buf.getOctet()==1; lastAclLoad = buf.getLongLong(); delete [] _tmpBuf; } void Acl::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } {std::string _s; brokerRef.encode(_s); buf.putRawData(_s);}; buf.putMediumString(policyFile); buf.putOctet(enforcingAcl?1:0); buf.putOctet(transferAcl?1:0); buf.putLongLong(lastAclLoad); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Acl::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } buf.putLongLong(totals.aclDenyCount); // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Acl::doMethod (string& methodName, const string&, string& outStr, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (methodName == "reloadACLFile") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_RELOADACLFILE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_RELOADACLFILE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Acl::getKey() const { std::stringstream key; key << brokerRef.getV2Key(); return key.str(); } void Acl::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["brokerRef"] = ::qpid::types::Variant(brokerRef); _map["policyFile"] = ::qpid::types::Variant(policyFile); _map["enforcingAcl"] = ::qpid::types::Variant(enforcingAcl); _map["transferAcl"] = ::qpid::types::Variant(transferAcl); _map["lastAclLoad"] = ::qpid::types::Variant(lastAclLoad); } if (includeStatistics) { instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["aclDenyCount"] = ::qpid::types::Variant(totals.aclDenyCount); // Maintenance of hi-lo statistics } } void Acl::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("brokerRef")) != _map.end()) { brokerRef = _i->second; } if ((_i = _map.find("policyFile")) != _map.end()) { policyFile = (_i->second).getString(); } if ((_i = _map.find("enforcingAcl")) != _map.end()) { enforcingAcl = _i->second; } if ((_i = _map.find("transferAcl")) != _map.end()) { transferAcl = _i->second; } if ((_i = _map.find("lastAclLoad")) != _map.end()) { lastAclLoad = _i->second; } } void Acl::doMethod (string& methodName, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "reloadACLFile") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_RELOADACLFILE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_RELOADACLFILE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/acl/EventAllow.h0000664000076400007640000000466111752725673022471 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ALLOW_ #define _MANAGEMENT_ALLOW_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace acl { QPID_BROKER_CLASS_EXTERN class EventAllow : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& userId; const std::string& action; const std::string& objectType; const std::string& objectName; const ::qpid::types::Variant::Map& arguments; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventAllow(const std::string& _userId, const std::string& _action, const std::string& _objectType, const std::string& _objectName, const ::qpid::types::Variant::Map& _arguments); QPID_BROKER_EXTERN ~EventAllow() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_ALLOW_*/ qpidc-0.16/src/qmf/org/apache/qpid/acl/EventDeny.h0000664000076400007640000000465311752725673022313 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_DENY_ #define _MANAGEMENT_DENY_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace acl { QPID_BROKER_CLASS_EXTERN class EventDeny : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& userId; const std::string& action; const std::string& objectType; const std::string& objectName; const ::qpid::types::Variant::Map& arguments; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventDeny(const std::string& _userId, const std::string& _action, const std::string& _objectType, const std::string& _objectName, const ::qpid::types::Variant::Map& _arguments); QPID_BROKER_EXTERN ~EventDeny() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 5; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_DENY_*/ qpidc-0.16/src/qmf/org/apache/qpid/acl/EventFileLoadFailed.cpp0000664000076400007640000000713011752725673024524 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventFileLoadFailed.h" using namespace qmf::org::apache::qpid::acl; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventFileLoadFailed::packageName = string ("org.apache.qpid.acl"); string EventFileLoadFailed::eventName = string ("fileLoadFailed"); uint8_t EventFileLoadFailed::md5Sum[16] = {0x89,0xef,0xf2,0xca,0x80,0x2b,0x70,0x99,0x78,0x62,0x10,0x5c,0x80,0xf8,0x55,0x15}; EventFileLoadFailed::EventFileLoadFailed (const std::string& _userId, const std::string& _reason) : userId(_userId), reason(_reason) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventFileLoadFailed::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventFileLoadFailed::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (2); // Argument Count // Arguments ft.clear(); ft[NAME] = "userId"; ft[TYPE] = TYPE_SSTR; buf.putMap(ft); ft.clear(); ft[NAME] = "reason"; ft[TYPE] = TYPE_LSTR; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventFileLoadFailed::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(userId); buf.putMediumString(reason); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventFileLoadFailed::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["userId"] = ::qpid::types::Variant(userId); map["reason"] = ::qpid::types::Variant(reason); } bool EventFileLoadFailed::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/cluster/0000775000076400007640000000000011752725715021150 5ustar00jrossjross00000000000000qpidc-0.16/src/qmf/org/apache/qpid/cluster/Package.cpp0000664000076400007640000000207411752725673023215 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "Package.h" #include "Cluster.h" using namespace qmf::org::apache::qpid::cluster; Package::Package (::qpid::management::ManagementAgent* agent) { Cluster::registerSelf(agent); } qpidc-0.16/src/qmf/org/apache/qpid/cluster/Cluster.h0000664000076400007640000001352211752725673022750 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_CLUSTER_CLUSTER_ #define _MANAGEMENT_ORG_APACHE_QPID_CLUSTER_CLUSTER_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace cluster { QPID_BROKER_CLASS_EXTERN class Cluster : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties ::qpid::management::ObjectId brokerRef; std::string clusterName; std::string clusterID; std::string memberID; std::string publishedURL; uint16_t clusterSize; std::string status; std::string members; std::string memberIDs; // Statistics public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } // Stub for getInstChanged. There are no statistics in this class. bool getInstChanged() { return false; } bool hasInst() { return false; } QPID_BROKER_EXTERN Cluster( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const std::string& _clusterName, const std::string& _publishedURL); QPID_BROKER_EXTERN ~Cluster(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_STOPCLUSTERNODE = 1; QPID_BROKER_EXTERN static const uint32_t METHOD_STOPFULLCLUSTER = 2; // Accessor Methods inline void set_clusterID (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); clusterID = val; configChanged = true; } inline const std::string& get_clusterID() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return clusterID; } inline void set_memberID (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); memberID = val; configChanged = true; } inline const std::string& get_memberID() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return memberID; } inline void set_clusterSize (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); clusterSize = val; configChanged = true; } inline uint16_t get_clusterSize() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return clusterSize; } inline void set_status (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); status = val; configChanged = true; } inline const std::string& get_status() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return status; } inline void set_members (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); members = val; configChanged = true; } inline const std::string& get_members() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return members; } inline void set_memberIDs (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); memberIDs = val; configChanged = true; } inline const std::string& get_memberIDs() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return memberIDs; } }; }}}}} #endif /*!_MANAGEMENT_CLUSTER_*/ qpidc-0.16/src/qmf/org/apache/qpid/cluster/Cluster.cpp0000664000076400007640000003345111752725673023306 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Cluster.h" #include "ArgsClusterStopClusterNode.h" #include #include using namespace qmf::org::apache::qpid::cluster; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Cluster::packageName = string ("org.apache.qpid.cluster"); string Cluster::className = string ("cluster"); uint8_t Cluster::md5Sum[MD5_LEN] = {0x21,0x76,0xfa,0xed,0xc1,0x65,0x9,0x13,0x77,0x40,0x17,0xf7,0xd1,0x4f,0xcc,0xa1}; Cluster::Cluster (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const std::string& _clusterName, const std::string& _publishedURL) : ManagementObject(_core),clusterName(_clusterName),publishedURL(_publishedURL) { brokerRef = _parent->GetManagementObject ()->getObjectId (); clusterID = ""; memberID = ""; clusterSize = 0; status = ""; members = ""; memberIDs = ""; } Cluster::~Cluster () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Cluster::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Cluster::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (9); // Config Element Count buf.putShort (0); // Inst Element Count buf.putShort (2); // Method Count // Properties ft.clear(); ft[NAME] = "brokerRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "clusterName"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Name of cluster this server is a member of"; buf.putMap(ft); ft.clear(); ft[NAME] = "clusterID"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Globally unique ID (UUID) for this cluster instance"; buf.putMap(ft); ft.clear(); ft[NAME] = "memberID"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "ID of this member of the cluster"; buf.putMap(ft); ft.clear(); ft[NAME] = "publishedURL"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "URL this node advertizes itself as"; buf.putMap(ft); ft.clear(); ft[NAME] = "clusterSize"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Number of brokers currently in the cluster"; buf.putMap(ft); ft.clear(); ft[NAME] = "status"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Cluster node status (STALLED,ACTIVE,JOINING)"; buf.putMap(ft); ft.clear(); ft[NAME] = "members"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "List of member URLs delimited by ';'"; buf.putMap(ft); ft.clear(); ft[NAME] = "memberIDs"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "List of member IDs delimited by ';'"; buf.putMap(ft); // Statistics // Methods ft.clear(); ft[NAME] = "stopClusterNode"; ft[ARGCOUNT] = 1; buf.putMap(ft); ft.clear(); ft[NAME] = "brokerId"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "stopFullCluster"; ft[ARGCOUNT] = 0; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t Cluster::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 16; // brokerRef size += (1 + clusterName.length()); // clusterName size += (1 + clusterID.length()); // clusterID size += (1 + memberID.length()); // memberID size += (1 + publishedURL.length()); // publishedURL size += 2; // clusterSize size += (1 + status.length()); // status size += (2 + members.length()); // members size += (2 + memberIDs.length()); // memberIDs return size; } void Cluster::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } {std::string _s; buf.getRawData(_s, brokerRef.encodedSize()); brokerRef.decode(_s);}; buf.getShortString(clusterName); buf.getShortString(clusterID); buf.getShortString(memberID); buf.getShortString(publishedURL); clusterSize = buf.getShort(); buf.getShortString(status); buf.getMediumString(members); buf.getMediumString(memberIDs); delete [] _tmpBuf; } void Cluster::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } {std::string _s; brokerRef.encode(_s); buf.putRawData(_s);}; buf.putShortString(clusterName); buf.putShortString(clusterID); buf.putShortString(memberID); buf.putShortString(publishedURL); buf.putShort(clusterSize); buf.putShortString(status); buf.putMediumString(members); buf.putMediumString(memberIDs); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Cluster::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Cluster::doMethod (string& methodName, const string& inStr, string& outStr, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); char *_tmpBuf = new char[inStr.length()]; memcpy(_tmpBuf, inStr.data(), inStr.length()); ::qpid::management::Buffer inBuf(_tmpBuf, inStr.length()); if (methodName == "stopClusterNode") { _matched = true; ArgsClusterStopClusterNode ioArgs; inBuf.getShortString(ioArgs.i_brokerId); bool allow = coreObject->AuthorizeMethod(METHOD_STOPCLUSTERNODE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_STOPCLUSTERNODE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "stopFullCluster") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_STOPFULLCLUSTER, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_STOPFULLCLUSTER, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } delete [] _tmpBuf; if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Cluster::getKey() const { std::stringstream key; key << brokerRef.getV2Key(); return key.str(); } void Cluster::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["brokerRef"] = ::qpid::types::Variant(brokerRef); _map["clusterName"] = ::qpid::types::Variant(clusterName); _map["clusterID"] = ::qpid::types::Variant(clusterID); _map["memberID"] = ::qpid::types::Variant(memberID); _map["publishedURL"] = ::qpid::types::Variant(publishedURL); _map["clusterSize"] = ::qpid::types::Variant(clusterSize); _map["status"] = ::qpid::types::Variant(status); _map["members"] = ::qpid::types::Variant(members); _map["memberIDs"] = ::qpid::types::Variant(memberIDs); } if (includeStatistics) { instChanged = false; // Maintenance of hi-lo statistics } } void Cluster::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("brokerRef")) != _map.end()) { brokerRef = _i->second; } if ((_i = _map.find("clusterName")) != _map.end()) { clusterName = (_i->second).getString(); } if ((_i = _map.find("clusterID")) != _map.end()) { clusterID = (_i->second).getString(); } if ((_i = _map.find("memberID")) != _map.end()) { memberID = (_i->second).getString(); } if ((_i = _map.find("publishedURL")) != _map.end()) { publishedURL = (_i->second).getString(); } if ((_i = _map.find("clusterSize")) != _map.end()) { clusterSize = _i->second; } if ((_i = _map.find("status")) != _map.end()) { status = (_i->second).getString(); } if ((_i = _map.find("members")) != _map.end()) { members = (_i->second).getString(); } if ((_i = _map.find("memberIDs")) != _map.end()) { memberIDs = (_i->second).getString(); } } void Cluster::doMethod (string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "stopClusterNode") { ArgsClusterStopClusterNode ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("brokerId")) != inMap.end()) { ioArgs.i_brokerId = (_i->second).getString(); } bool allow = coreObject->AuthorizeMethod(METHOD_STOPCLUSTERNODE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_STOPCLUSTERNODE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "stopFullCluster") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_STOPFULLCLUSTER, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_STOPFULLCLUSTER, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/cluster/Package.h0000664000076400007640000000255611752725673022667 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_CLUSTER_ #define _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_CLUSTER_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementAgent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace cluster { class Package { public: QPID_BROKER_EXTERN Package (::qpid::management::ManagementAgent* agent); QPID_BROKER_EXTERN ~Package () {} }; }}}}} #endif /*!_MANAGEMENT_PACKAGE_ORG_APACHE_QPID_CLUSTER_*/ qpidc-0.16/src/qmf/org/apache/qpid/cluster/ArgsClusterStopClusterNode.h0000664000076400007640000000237311752725673026605 0ustar00jrossjross00000000000000 #ifndef _ARGS_CLUSTERSTOPCLUSTERNODE_ #define _ARGS_CLUSTERSTOPCLUSTERNODE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace cluster { class ArgsClusterStopClusterNode : public ::qpid::management::Args { public: std::string i_brokerId; }; }}}}} #endif /*!_ARGS_CLUSTERSTOPCLUSTERNODE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/0000775000076400007640000000000011752725715020753 5ustar00jrossjross00000000000000qpidc-0.16/src/qmf/org/apache/qpid/broker/Package.cpp0000664000076400007640000000550211752725673023017 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "Package.h" #include "System.h" #include "Memory.h" #include "Broker.h" #include "Agent.h" #include "Vhost.h" #include "Queue.h" #include "Exchange.h" #include "Binding.h" #include "Subscription.h" #include "Connection.h" #include "Link.h" #include "Bridge.h" #include "Session.h" #include "ManagementSetupState.h" #include "EventClientConnect.h" #include "EventClientConnectFail.h" #include "EventClientDisconnect.h" #include "EventBrokerLinkUp.h" #include "EventBrokerLinkDown.h" #include "EventQueueDeclare.h" #include "EventQueueDelete.h" #include "EventExchangeDeclare.h" #include "EventExchangeDelete.h" #include "EventBind.h" #include "EventUnbind.h" #include "EventSubscribe.h" #include "EventUnsubscribe.h" #include "EventQueueThresholdExceeded.h" using namespace qmf::org::apache::qpid::broker; Package::Package (::qpid::management::ManagementAgent* agent) { System::registerSelf(agent); Memory::registerSelf(agent); Broker::registerSelf(agent); Agent::registerSelf(agent); Vhost::registerSelf(agent); Queue::registerSelf(agent); Exchange::registerSelf(agent); Binding::registerSelf(agent); Subscription::registerSelf(agent); Connection::registerSelf(agent); Link::registerSelf(agent); Bridge::registerSelf(agent); Session::registerSelf(agent); ManagementSetupState::registerSelf(agent); EventClientConnect::registerSelf(agent); EventClientConnectFail::registerSelf(agent); EventClientDisconnect::registerSelf(agent); EventBrokerLinkUp::registerSelf(agent); EventBrokerLinkDown::registerSelf(agent); EventQueueDeclare::registerSelf(agent); EventQueueDelete::registerSelf(agent); EventExchangeDeclare::registerSelf(agent); EventExchangeDelete::registerSelf(agent); EventBind::registerSelf(agent); EventUnbind::registerSelf(agent); EventSubscribe::registerSelf(agent); EventUnsubscribe::registerSelf(agent); EventQueueThresholdExceeded::registerSelf(agent); } qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerGetLogLevel.h0000664000076400007640000000234311752725673025264 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERGETLOGLEVEL_ #define _ARGS_BROKERGETLOGLEVEL_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerGetLogLevel : public ::qpid::management::Args { public: std::string o_level; }; }}}}} #endif /*!_ARGS_BROKERGETLOGLEVEL_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventClientDisconnect.h0000664000076400007640000000436111752725673025365 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_CLIENTDISCONNECT_ #define _MANAGEMENT_CLIENTDISCONNECT_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventClientDisconnect : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventClientDisconnect(const std::string& _rhost, const std::string& _user); QPID_BROKER_EXTERN ~EventClientDisconnect() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_CLIENTDISCONNECT_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Subscription.h0000664000076400007640000001207311752725673023616 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_SUBSCRIPTION_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_SUBSCRIPTION_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Subscription : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties ::qpid::management::ObjectId sessionRef; ::qpid::management::ObjectId queueRef; std::string name; bool browsing; bool acknowledged; bool exclusive; std::string creditMode; ::qpid::types::Variant::Map arguments; // Statistics // Per-Thread Statistics public: struct PerThreadStats { uint64_t delivered; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->delivered = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Subscription( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const ::qpid::management::ObjectId& _queueRef, const std::string& _name, bool _browsing, bool _acknowledged, bool _exclusive, const ::qpid::types::Variant::Map& _arguments); QPID_BROKER_EXTERN ~Subscription(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs // Accessor Methods inline void set_creditMode (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); creditMode = val; configChanged = true; } inline const std::string& get_creditMode() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return creditMode; } inline void inc_delivered (uint64_t by = 1) { getThreadStats()->delivered += by; instChanged = true; } inline void dec_delivered (uint64_t by = 1) { getThreadStats()->delivered -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}} #endif /*!_MANAGEMENT_SUBSCRIPTION_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Session.h0000664000076400007640000002251411752725673022556 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_SESSION_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_SESSION_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Session : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; uint8_t presenceMask[1]; static const uint8_t presenceByte_expireTime = 0; static const uint8_t presenceMask_expireTime = 1; static const uint8_t presenceByte_maxClientRate = 0; static const uint8_t presenceMask_maxClientRate = 2; // Properties ::qpid::management::ObjectId vhostRef; std::string name; uint16_t channelId; ::qpid::management::ObjectId connectionRef; uint32_t detachedLifespan; bool attached; int64_t expireTime; uint32_t maxClientRate; // Statistics // Per-Thread Statistics public: struct PerThreadStats { uint32_t framesOutstanding; uint64_t TxnStarts; uint64_t TxnCommits; uint64_t TxnRejects; uint32_t TxnCount; uint32_t clientCredit; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->framesOutstanding = 0; threadStats->TxnStarts = 0; threadStats->TxnCommits = 0; threadStats->TxnRejects = 0; threadStats->TxnCount = 0; threadStats->clientCredit = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Session( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const std::string& _name); QPID_BROKER_EXTERN ~Session(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_SOLICITACK = 1; QPID_BROKER_EXTERN static const uint32_t METHOD_DETACH = 2; QPID_BROKER_EXTERN static const uint32_t METHOD_RESETLIFESPAN = 3; QPID_BROKER_EXTERN static const uint32_t METHOD_CLOSE = 4; // Accessor Methods inline void set_channelId (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); channelId = val; configChanged = true; } inline uint16_t get_channelId() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return channelId; } inline void set_connectionRef (const ::qpid::management::ObjectId& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); connectionRef = val; configChanged = true; } inline const ::qpid::management::ObjectId& get_connectionRef() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return connectionRef; } inline void set_detachedLifespan (uint32_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); detachedLifespan = val; configChanged = true; } inline uint32_t get_detachedLifespan() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return detachedLifespan; } inline void set_attached (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); attached = val; configChanged = true; } inline bool get_attached() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return attached; } inline void set_expireTime (int64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); expireTime = val; presenceMask[presenceByte_expireTime] |= presenceMask_expireTime; configChanged = true; } inline int64_t get_expireTime() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return expireTime; } inline void clr_expireTime() { presenceMask[presenceByte_expireTime] &= ~presenceMask_expireTime; configChanged = true; } inline bool isSet_expireTime() { return (presenceMask[presenceByte_expireTime] & presenceMask_expireTime) != 0; } inline void set_maxClientRate (uint32_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); maxClientRate = val; presenceMask[presenceByte_maxClientRate] |= presenceMask_maxClientRate; configChanged = true; } inline uint32_t get_maxClientRate() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return maxClientRate; } inline void clr_maxClientRate() { presenceMask[presenceByte_maxClientRate] &= ~presenceMask_maxClientRate; configChanged = true; } inline bool isSet_maxClientRate() { return (presenceMask[presenceByte_maxClientRate] & presenceMask_maxClientRate) != 0; } inline void inc_framesOutstanding (uint32_t by = 1) { getThreadStats()->framesOutstanding += by; instChanged = true; } inline void dec_framesOutstanding (uint32_t by = 1) { getThreadStats()->framesOutstanding -= by; instChanged = true; } inline void inc_TxnStarts (uint64_t by = 1) { getThreadStats()->TxnStarts += by; instChanged = true; } inline void dec_TxnStarts (uint64_t by = 1) { getThreadStats()->TxnStarts -= by; instChanged = true; } inline void inc_TxnCommits (uint64_t by = 1) { getThreadStats()->TxnCommits += by; instChanged = true; } inline void dec_TxnCommits (uint64_t by = 1) { getThreadStats()->TxnCommits -= by; instChanged = true; } inline void inc_TxnRejects (uint64_t by = 1) { getThreadStats()->TxnRejects += by; instChanged = true; } inline void dec_TxnRejects (uint64_t by = 1) { getThreadStats()->TxnRejects -= by; instChanged = true; } inline void inc_TxnCount (uint32_t by = 1) { getThreadStats()->TxnCount += by; instChanged = true; } inline void dec_TxnCount (uint32_t by = 1) { getThreadStats()->TxnCount -= by; instChanged = true; } inline void inc_clientCredit (uint32_t by = 1) { getThreadStats()->clientCredit += by; instChanged = true; } inline void dec_clientCredit (uint32_t by = 1) { getThreadStats()->clientCredit -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}} #endif /*!_MANAGEMENT_SESSION_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerCreate.h0000664000076400007640000000244711752725673024323 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERCREATE_ #define _ARGS_BROKERCREATE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerCreate : public ::qpid::management::Args { public: std::string i_type; std::string i_name; ::qpid::types::Variant::Map i_properties; bool i_strict; }; }}}}} #endif /*!_ARGS_BROKERCREATE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventBind.h0000664000076400007640000000471111752725673023010 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_BIND_ #define _MANAGEMENT_BIND_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventBind : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; const std::string& exName; const std::string& qName; const std::string& key; const ::qpid::types::Variant::Map& args; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventBind(const std::string& _rhost, const std::string& _user, const std::string& _exName, const std::string& _qName, const std::string& _key, const ::qpid::types::Variant::Map& _args); QPID_BROKER_EXTERN ~EventBind() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_BIND_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Broker.cpp0000664000076400007640000013761711752725673022725 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Broker.h" #include "ArgsBrokerEcho.h" #include "ArgsBrokerConnect.h" #include "ArgsBrokerQueueMoveMessages.h" #include "ArgsBrokerSetLogLevel.h" #include "ArgsBrokerGetLogLevel.h" #include "ArgsBrokerGetTimestampConfig.h" #include "ArgsBrokerSetTimestampConfig.h" #include "ArgsBrokerCreate.h" #include "ArgsBrokerDelete.h" #include "ArgsBrokerQuery.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Broker::packageName = string ("org.apache.qpid.broker"); string Broker::className = string ("broker"); uint8_t Broker::md5Sum[MD5_LEN] = {0x51,0x39,0x10,0x71,0x15,0x43,0xcd,0xa4,0xe,0xae,0x70,0x15,0x2a,0xf2,0xca,0x82}; Broker::Broker (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const std::string& _name) : ManagementObject(_core),name(_name) { systemRef = _parent->GetManagementObject ()->getObjectId (); port = 0; workerThreads = 0; maxConns = 0; connBacklog = 0; stagingThreshold = 0; mgmtPublish = 0; mgmtPubInterval = 0; version = ""; dataDir = ""; uptime = 0; // Optional properties start out not-present for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = 0; perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Broker::~Broker () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Broker::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Broker::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (11); // Config Element Count buf.putShort (34); // Inst Element Count buf.putShort (10); // Method Count // Properties ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; ft[DESC] = "Index for the broker at this agent"; buf.putMap(ft); ft.clear(); ft[NAME] = "systemRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "System ID"; buf.putMap(ft); ft.clear(); ft[NAME] = "port"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "TCP Port for AMQP Service"; buf.putMap(ft); ft.clear(); ft[NAME] = "workerThreads"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Thread pool size"; buf.putMap(ft); ft.clear(); ft[NAME] = "maxConns"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Maximum allowed connections"; buf.putMap(ft); ft.clear(); ft[NAME] = "connBacklog"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Connection backlog limit for listening socket"; buf.putMap(ft); ft.clear(); ft[NAME] = "stagingThreshold"; ft[TYPE] = TYPE_U32; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Broker stages messages over this size to disk"; buf.putMap(ft); ft.clear(); ft[NAME] = "mgmtPublish"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Broker's management agent sends unsolicited data on the publish interval"; buf.putMap(ft); ft.clear(); ft[NAME] = "mgmtPubInterval"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RW; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[UNIT] = "second"; ft[MIN] = 1; ft[DESC] = "Interval for management broadcasts"; buf.putMap(ft); ft.clear(); ft[NAME] = "version"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Running software version"; buf.putMap(ft); ft.clear(); ft[NAME] = "dataDir"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "Persistent configuration storage location"; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "uptime"; ft[TYPE] = TYPE_DELTATIME; buf.putMap(ft); ft.clear(); ft[NAME] = "queueCount"; ft[TYPE] = TYPE_U64; ft[UNIT] = "queue"; ft[DESC] = "Number of queues in the broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgTotalEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total messages enqueued to broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgTotalDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total messages dequeued from broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteTotalEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total bytes enqueued to broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteTotalDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total bytes dequeued from broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgDepth"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Current number of messages on queues in broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteDepth"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Current number of bytes on queues in broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgPersistEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total persistent messages enqueued to broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgPersistDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total persistent messages dequeued from broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "bytePersistEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total persistent bytes enqueued to broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "bytePersistDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total persistent bytes dequeued from broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgTxnEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total transactional messages enqueued to broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgTxnDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total transactional messages dequeued from broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteTxnEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total transactional bytes enqueued to broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteTxnDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total transactional bytes dequeued from broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgFtdEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total message bodies released from memory and flowed-to-disk on broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgFtdDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total message bodies dequeued from the broker having been flowed-to-disk"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteFtdEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total bytes released from memory and flowed-to-disk on broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteFtdDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total bytes dequeued from the broker having been flowed-to-disk"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgFtdDepth"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Current number of messages flowed-to-disk"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteFtdDepth"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Current number of bytes flowed-to-disk"; buf.putMap(ft); ft.clear(); ft[NAME] = "releases"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Acquired messages reinserted into the queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "acquires"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages acquired from the queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsNoRoute"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to no-route from exchange"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsTtl"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to TTL expiration"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsRing"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to ring-queue overflow"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsLvq"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to LVQ insert"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsOverflow"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to reject-policy overflow"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsSubscriber"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to subscriber reject"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsPurge"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to management purge"; buf.putMap(ft); ft.clear(); ft[NAME] = "reroutes"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages dequeued to management re-route"; buf.putMap(ft); ft.clear(); ft[NAME] = "abandoned"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages left in a deleted queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "abandonedViaAlt"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages routed to alternate exchange from a deleted queue"; buf.putMap(ft); // Methods ft.clear(); ft[NAME] = "echo"; ft[ARGCOUNT] = 2; ft[DESC] = "Request a response to test the path to the management broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "sequence"; ft[TYPE] = TYPE_U32; ft[DIR] = "IO"; ft[DEFAULT] = "0"; buf.putMap(ft); ft.clear(); ft[NAME] = "body"; ft[TYPE] = TYPE_LSTR; ft[DIR] = "IO"; ft[DEFAULT] = ""; buf.putMap(ft); ft.clear(); ft[NAME] = "connect"; ft[ARGCOUNT] = 7; ft[DESC] = "Establish a connection to another broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "host"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "port"; ft[TYPE] = TYPE_U32; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "durable"; ft[TYPE] = TYPE_BOOL; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "authMechanism"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "username"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "password"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "transport"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "queueMoveMessages"; ft[ARGCOUNT] = 4; ft[DESC] = "Move messages from one queue to another"; buf.putMap(ft); ft.clear(); ft[NAME] = "srcQueue"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; ft[DESC] = "Source queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "destQueue"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; ft[DESC] = "Destination queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "qty"; ft[TYPE] = TYPE_U32; ft[DIR] = "I"; ft[DESC] = "# of messages to move. 0 means all messages"; buf.putMap(ft); ft.clear(); ft[NAME] = "filter"; ft[TYPE] = TYPE_FTABLE; ft[DIR] = "I"; ft[DEFAULT] = "{}"; ft[DESC] = "if specified, move only those messages matching this filter"; buf.putMap(ft); ft.clear(); ft[NAME] = "setLogLevel"; ft[ARGCOUNT] = 1; ft[DESC] = "Set the log level"; buf.putMap(ft); ft.clear(); ft[NAME] = "level"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "getLogLevel"; ft[ARGCOUNT] = 1; ft[DESC] = "Get the current log level"; buf.putMap(ft); ft.clear(); ft[NAME] = "level"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "O"; buf.putMap(ft); ft.clear(); ft[NAME] = "getTimestampConfig"; ft[ARGCOUNT] = 1; ft[DESC] = "Get the message timestamping configuration"; buf.putMap(ft); ft.clear(); ft[NAME] = "receive"; ft[TYPE] = TYPE_BOOL; ft[DIR] = "O"; ft[DESC] = "True if received messages are timestamped."; buf.putMap(ft); ft.clear(); ft[NAME] = "setTimestampConfig"; ft[ARGCOUNT] = 1; ft[DESC] = "Set the message timestamping configuration"; buf.putMap(ft); ft.clear(); ft[NAME] = "receive"; ft[TYPE] = TYPE_BOOL; ft[DIR] = "I"; ft[DESC] = "Set true to enable timestamping received messages."; buf.putMap(ft); ft.clear(); ft[NAME] = "create"; ft[ARGCOUNT] = 4; ft[DESC] = "Create an object of the specified type"; buf.putMap(ft); ft.clear(); ft[NAME] = "type"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; ft[DESC] = "The type of object to create"; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; ft[DESC] = "The name of the object to create"; buf.putMap(ft); ft.clear(); ft[NAME] = "properties"; ft[TYPE] = TYPE_FTABLE; ft[DIR] = "I"; ft[DESC] = "Type specific object properties"; buf.putMap(ft); ft.clear(); ft[NAME] = "strict"; ft[TYPE] = TYPE_BOOL; ft[DIR] = "I"; ft[DESC] = "If specified, treat unrecognised object properties as an error"; buf.putMap(ft); ft.clear(); ft[NAME] = "delete"; ft[ARGCOUNT] = 3; ft[DESC] = "Delete an object of the specified type"; buf.putMap(ft); ft.clear(); ft[NAME] = "type"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; ft[DESC] = "The type of object to delete"; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; ft[DESC] = "The name of the object to delete"; buf.putMap(ft); ft.clear(); ft[NAME] = "options"; ft[TYPE] = TYPE_FTABLE; ft[DIR] = "I"; ft[DESC] = "Type specific object options for deletion"; buf.putMap(ft); ft.clear(); ft[NAME] = "query"; ft[ARGCOUNT] = 3; ft[DESC] = "Query the current state of an object."; buf.putMap(ft); ft.clear(); ft[NAME] = "type"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; ft[DESC] = "The type of object to query."; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; ft[DESC] = "The name of the object to query"; buf.putMap(ft); ft.clear(); ft[NAME] = "results"; ft[TYPE] = TYPE_FTABLE; ft[DIR] = "O"; ft[DESC] = "A snapshot of the object's state."; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Broker::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->queueCount = 0; totals->msgTotalEnqueues = 0; totals->msgTotalDequeues = 0; totals->byteTotalEnqueues = 0; totals->byteTotalDequeues = 0; totals->msgDepth = 0; totals->byteDepth = 0; totals->msgPersistEnqueues = 0; totals->msgPersistDequeues = 0; totals->bytePersistEnqueues = 0; totals->bytePersistDequeues = 0; totals->msgTxnEnqueues = 0; totals->msgTxnDequeues = 0; totals->byteTxnEnqueues = 0; totals->byteTxnDequeues = 0; totals->msgFtdEnqueues = 0; totals->msgFtdDequeues = 0; totals->byteFtdEnqueues = 0; totals->byteFtdDequeues = 0; totals->msgFtdDepth = 0; totals->byteFtdDepth = 0; totals->releases = 0; totals->acquires = 0; totals->discardsNoRoute = 0; totals->discardsTtl = 0; totals->discardsRing = 0; totals->discardsLvq = 0; totals->discardsOverflow = 0; totals->discardsSubscriber = 0; totals->discardsPurge = 0; totals->reroutes = 0; totals->abandoned = 0; totals->abandonedViaAlt = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->queueCount += threadStats->queueCount; totals->msgTotalEnqueues += threadStats->msgTotalEnqueues; totals->msgTotalDequeues += threadStats->msgTotalDequeues; totals->byteTotalEnqueues += threadStats->byteTotalEnqueues; totals->byteTotalDequeues += threadStats->byteTotalDequeues; totals->msgDepth += threadStats->msgDepth; totals->byteDepth += threadStats->byteDepth; totals->msgPersistEnqueues += threadStats->msgPersistEnqueues; totals->msgPersistDequeues += threadStats->msgPersistDequeues; totals->bytePersistEnqueues += threadStats->bytePersistEnqueues; totals->bytePersistDequeues += threadStats->bytePersistDequeues; totals->msgTxnEnqueues += threadStats->msgTxnEnqueues; totals->msgTxnDequeues += threadStats->msgTxnDequeues; totals->byteTxnEnqueues += threadStats->byteTxnEnqueues; totals->byteTxnDequeues += threadStats->byteTxnDequeues; totals->msgFtdEnqueues += threadStats->msgFtdEnqueues; totals->msgFtdDequeues += threadStats->msgFtdDequeues; totals->byteFtdEnqueues += threadStats->byteFtdEnqueues; totals->byteFtdDequeues += threadStats->byteFtdDequeues; totals->msgFtdDepth += threadStats->msgFtdDepth; totals->byteFtdDepth += threadStats->byteFtdDepth; totals->releases += threadStats->releases; totals->acquires += threadStats->acquires; totals->discardsNoRoute += threadStats->discardsNoRoute; totals->discardsTtl += threadStats->discardsTtl; totals->discardsRing += threadStats->discardsRing; totals->discardsLvq += threadStats->discardsLvq; totals->discardsOverflow += threadStats->discardsOverflow; totals->discardsSubscriber += threadStats->discardsSubscriber; totals->discardsPurge += threadStats->discardsPurge; totals->reroutes += threadStats->reroutes; totals->abandoned += threadStats->abandoned; totals->abandonedViaAlt += threadStats->abandonedViaAlt; } } } uint32_t Broker::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 1; size += (1 + name.length()); // name size += 16; // systemRef size += 2; // port size += 2; // workerThreads size += 2; // maxConns size += 2; // connBacklog size += 4; // stagingThreshold size += 1; // mgmtPublish size += 2; // mgmtPubInterval size += (1 + version.length()); // version if (presenceMask[presenceByte_dataDir] & presenceMask_dataDir) { size += (2 + dataDir.length()); // dataDir } return size; } void Broker::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = buf.getOctet(); buf.getShortString(name); {std::string _s; buf.getRawData(_s, systemRef.encodedSize()); systemRef.decode(_s);}; port = buf.getShort(); workerThreads = buf.getShort(); maxConns = buf.getShort(); connBacklog = buf.getShort(); stagingThreshold = buf.getLong(); mgmtPublish = buf.getOctet()==1; mgmtPubInterval = buf.getShort(); buf.getShortString(version); if (presenceMask[presenceByte_dataDir] & presenceMask_dataDir) { buf.getMediumString(dataDir); } delete [] _tmpBuf; } void Broker::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) buf.putOctet(presenceMask[idx]); buf.putShortString(name); {std::string _s; systemRef.encode(_s); buf.putRawData(_s);}; buf.putShort(port); buf.putShort(workerThreads); buf.putShort(maxConns); buf.putShort(connBacklog); buf.putLong(stagingThreshold); buf.putOctet(mgmtPublish?1:0); buf.putShort(mgmtPubInterval); buf.putShortString(version); if (presenceMask[presenceByte_dataDir] & presenceMask_dataDir) { buf.putMediumString(dataDir); } uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Broker::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { threadStats->msgDepth = (uint64_t) (threadStats->msgTotalEnqueues - threadStats->msgTotalDequeues); threadStats->byteDepth = (uint64_t) (threadStats->byteTotalEnqueues - threadStats->byteTotalDequeues); threadStats->msgFtdDepth = (uint64_t) (threadStats->msgFtdEnqueues - threadStats->msgFtdDequeues); threadStats->byteFtdDepth = (uint64_t) (threadStats->byteFtdEnqueues - threadStats->byteFtdDequeues); } } struct PerThreadStats totals; aggregatePerThreadStats(&totals); if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } buf.putLongLong(uptime); buf.putLongLong(totals.queueCount); buf.putLongLong(totals.msgTotalEnqueues); buf.putLongLong(totals.msgTotalDequeues); buf.putLongLong(totals.byteTotalEnqueues); buf.putLongLong(totals.byteTotalDequeues); buf.putLongLong(totals.msgDepth); buf.putLongLong(totals.byteDepth); buf.putLongLong(totals.msgPersistEnqueues); buf.putLongLong(totals.msgPersistDequeues); buf.putLongLong(totals.bytePersistEnqueues); buf.putLongLong(totals.bytePersistDequeues); buf.putLongLong(totals.msgTxnEnqueues); buf.putLongLong(totals.msgTxnDequeues); buf.putLongLong(totals.byteTxnEnqueues); buf.putLongLong(totals.byteTxnDequeues); buf.putLongLong(totals.msgFtdEnqueues); buf.putLongLong(totals.msgFtdDequeues); buf.putLongLong(totals.byteFtdEnqueues); buf.putLongLong(totals.byteFtdDequeues); buf.putLongLong(totals.msgFtdDepth); buf.putLongLong(totals.byteFtdDepth); buf.putLongLong(totals.releases); buf.putLongLong(totals.acquires); buf.putLongLong(totals.discardsNoRoute); buf.putLongLong(totals.discardsTtl); buf.putLongLong(totals.discardsRing); buf.putLongLong(totals.discardsLvq); buf.putLongLong(totals.discardsOverflow); buf.putLongLong(totals.discardsSubscriber); buf.putLongLong(totals.discardsPurge); buf.putLongLong(totals.reroutes); buf.putLongLong(totals.abandoned); buf.putLongLong(totals.abandonedViaAlt); // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Broker::doMethod (string& methodName, const string& inStr, string& outStr, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); char *_tmpBuf = new char[inStr.length()]; memcpy(_tmpBuf, inStr.data(), inStr.length()); ::qpid::management::Buffer inBuf(_tmpBuf, inStr.length()); if (methodName == "echo") { _matched = true; ArgsBrokerEcho ioArgs; ioArgs.io_sequence = inBuf.getLong(); inBuf.getMediumString(ioArgs.io_body); bool allow = coreObject->AuthorizeMethod(METHOD_ECHO, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_ECHO, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); outBuf.putLong(ioArgs.io_sequence); outBuf.putMediumString(ioArgs.io_body); } if (methodName == "connect") { _matched = true; ArgsBrokerConnect ioArgs; inBuf.getShortString(ioArgs.i_host); ioArgs.i_port = inBuf.getLong(); ioArgs.i_durable = inBuf.getOctet()==1; inBuf.getShortString(ioArgs.i_authMechanism); inBuf.getShortString(ioArgs.i_username); inBuf.getShortString(ioArgs.i_password); inBuf.getShortString(ioArgs.i_transport); bool allow = coreObject->AuthorizeMethod(METHOD_CONNECT, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CONNECT, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "queueMoveMessages") { _matched = true; ArgsBrokerQueueMoveMessages ioArgs; inBuf.getShortString(ioArgs.i_srcQueue); inBuf.getShortString(ioArgs.i_destQueue); ioArgs.i_qty = inBuf.getLong(); inBuf.getMap(ioArgs.i_filter); bool allow = coreObject->AuthorizeMethod(METHOD_QUEUEMOVEMESSAGES, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_QUEUEMOVEMESSAGES, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "setLogLevel") { _matched = true; ArgsBrokerSetLogLevel ioArgs; inBuf.getShortString(ioArgs.i_level); bool allow = coreObject->AuthorizeMethod(METHOD_SETLOGLEVEL, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETLOGLEVEL, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "getLogLevel") { _matched = true; ArgsBrokerGetLogLevel ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_GETLOGLEVEL, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_GETLOGLEVEL, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); outBuf.putShortString(ioArgs.o_level); } if (methodName == "getTimestampConfig") { _matched = true; ArgsBrokerGetTimestampConfig ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_GETTIMESTAMPCONFIG, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_GETTIMESTAMPCONFIG, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); outBuf.putOctet(ioArgs.o_receive?1:0); } if (methodName == "setTimestampConfig") { _matched = true; ArgsBrokerSetTimestampConfig ioArgs; ioArgs.i_receive = inBuf.getOctet()==1; bool allow = coreObject->AuthorizeMethod(METHOD_SETTIMESTAMPCONFIG, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETTIMESTAMPCONFIG, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "create") { _matched = true; ArgsBrokerCreate ioArgs; inBuf.getShortString(ioArgs.i_type); inBuf.getShortString(ioArgs.i_name); inBuf.getMap(ioArgs.i_properties); ioArgs.i_strict = inBuf.getOctet()==1; bool allow = coreObject->AuthorizeMethod(METHOD_CREATE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CREATE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "delete") { _matched = true; ArgsBrokerDelete ioArgs; inBuf.getShortString(ioArgs.i_type); inBuf.getShortString(ioArgs.i_name); inBuf.getMap(ioArgs.i_options); bool allow = coreObject->AuthorizeMethod(METHOD_DELETE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_DELETE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "query") { _matched = true; ArgsBrokerQuery ioArgs; inBuf.getShortString(ioArgs.i_type); inBuf.getShortString(ioArgs.i_name); bool allow = coreObject->AuthorizeMethod(METHOD_QUERY, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_QUERY, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); outBuf.putMap(ioArgs.o_results); } delete [] _tmpBuf; if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Broker::getKey() const { std::stringstream key; key << name; return key.str(); } void Broker::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["name"] = ::qpid::types::Variant(name); _map["systemRef"] = ::qpid::types::Variant(systemRef); _map["port"] = ::qpid::types::Variant(port); _map["workerThreads"] = ::qpid::types::Variant(workerThreads); _map["maxConns"] = ::qpid::types::Variant(maxConns); _map["connBacklog"] = ::qpid::types::Variant(connBacklog); _map["stagingThreshold"] = ::qpid::types::Variant(stagingThreshold); _map["mgmtPublish"] = ::qpid::types::Variant(mgmtPublish); _map["mgmtPubInterval"] = ::qpid::types::Variant(mgmtPubInterval); _map["version"] = ::qpid::types::Variant(version); if (presenceMask[presenceByte_dataDir] & presenceMask_dataDir) { _map["dataDir"] = ::qpid::types::Variant(dataDir); } } if (includeStatistics) { instChanged = false; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { threadStats->msgDepth = (uint64_t) (threadStats->msgTotalEnqueues - threadStats->msgTotalDequeues); threadStats->byteDepth = (uint64_t) (threadStats->byteTotalEnqueues - threadStats->byteTotalDequeues); threadStats->msgFtdDepth = (uint64_t) (threadStats->msgFtdEnqueues - threadStats->msgFtdDequeues); threadStats->byteFtdDepth = (uint64_t) (threadStats->byteFtdEnqueues - threadStats->byteFtdDequeues); } } struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["uptime"] = ::qpid::types::Variant(uptime); _map["queueCount"] = ::qpid::types::Variant(totals.queueCount); _map["msgTotalEnqueues"] = ::qpid::types::Variant(totals.msgTotalEnqueues); _map["msgTotalDequeues"] = ::qpid::types::Variant(totals.msgTotalDequeues); _map["byteTotalEnqueues"] = ::qpid::types::Variant(totals.byteTotalEnqueues); _map["byteTotalDequeues"] = ::qpid::types::Variant(totals.byteTotalDequeues); _map["msgDepth"] = ::qpid::types::Variant(totals.msgDepth); _map["byteDepth"] = ::qpid::types::Variant(totals.byteDepth); _map["msgPersistEnqueues"] = ::qpid::types::Variant(totals.msgPersistEnqueues); _map["msgPersistDequeues"] = ::qpid::types::Variant(totals.msgPersistDequeues); _map["bytePersistEnqueues"] = ::qpid::types::Variant(totals.bytePersistEnqueues); _map["bytePersistDequeues"] = ::qpid::types::Variant(totals.bytePersistDequeues); _map["msgTxnEnqueues"] = ::qpid::types::Variant(totals.msgTxnEnqueues); _map["msgTxnDequeues"] = ::qpid::types::Variant(totals.msgTxnDequeues); _map["byteTxnEnqueues"] = ::qpid::types::Variant(totals.byteTxnEnqueues); _map["byteTxnDequeues"] = ::qpid::types::Variant(totals.byteTxnDequeues); _map["msgFtdEnqueues"] = ::qpid::types::Variant(totals.msgFtdEnqueues); _map["msgFtdDequeues"] = ::qpid::types::Variant(totals.msgFtdDequeues); _map["byteFtdEnqueues"] = ::qpid::types::Variant(totals.byteFtdEnqueues); _map["byteFtdDequeues"] = ::qpid::types::Variant(totals.byteFtdDequeues); _map["msgFtdDepth"] = ::qpid::types::Variant(totals.msgFtdDepth); _map["byteFtdDepth"] = ::qpid::types::Variant(totals.byteFtdDepth); _map["releases"] = ::qpid::types::Variant(totals.releases); _map["acquires"] = ::qpid::types::Variant(totals.acquires); _map["discardsNoRoute"] = ::qpid::types::Variant(totals.discardsNoRoute); _map["discardsTtl"] = ::qpid::types::Variant(totals.discardsTtl); _map["discardsRing"] = ::qpid::types::Variant(totals.discardsRing); _map["discardsLvq"] = ::qpid::types::Variant(totals.discardsLvq); _map["discardsOverflow"] = ::qpid::types::Variant(totals.discardsOverflow); _map["discardsSubscriber"] = ::qpid::types::Variant(totals.discardsSubscriber); _map["discardsPurge"] = ::qpid::types::Variant(totals.discardsPurge); _map["reroutes"] = ::qpid::types::Variant(totals.reroutes); _map["abandoned"] = ::qpid::types::Variant(totals.abandoned); _map["abandonedViaAlt"] = ::qpid::types::Variant(totals.abandonedViaAlt); // Maintenance of hi-lo statistics } } void Broker::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); bool _found; if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } if ((_i = _map.find("systemRef")) != _map.end()) { systemRef = _i->second; } if ((_i = _map.find("port")) != _map.end()) { port = _i->second; } if ((_i = _map.find("workerThreads")) != _map.end()) { workerThreads = _i->second; } if ((_i = _map.find("maxConns")) != _map.end()) { maxConns = _i->second; } if ((_i = _map.find("connBacklog")) != _map.end()) { connBacklog = _i->second; } if ((_i = _map.find("stagingThreshold")) != _map.end()) { stagingThreshold = _i->second; } if ((_i = _map.find("mgmtPublish")) != _map.end()) { mgmtPublish = _i->second; } if ((_i = _map.find("mgmtPubInterval")) != _map.end()) { mgmtPubInterval = _i->second; } if ((_i = _map.find("version")) != _map.end()) { version = (_i->second).getString(); } _found = false; if ((_i = _map.find("dataDir")) != _map.end()) { dataDir = (_i->second).getString(); _found = true; } if (_found) { presenceMask[presenceByte_dataDir] |= presenceMask_dataDir; } } void Broker::doMethod (string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "echo") { ArgsBrokerEcho ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("sequence")) != inMap.end()) { ioArgs.io_sequence = _i->second; } if ((_i = inMap.find("body")) != inMap.end()) { ioArgs.io_body = (_i->second).getString(); } bool allow = coreObject->AuthorizeMethod(METHOD_ECHO, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_ECHO, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); outMap["sequence"] = ::qpid::types::Variant(ioArgs.io_sequence); outMap["body"] = ::qpid::types::Variant(ioArgs.io_body); return; } if (methodName == "connect") { ArgsBrokerConnect ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("host")) != inMap.end()) { ioArgs.i_host = (_i->second).getString(); } if ((_i = inMap.find("port")) != inMap.end()) { ioArgs.i_port = _i->second; } if ((_i = inMap.find("durable")) != inMap.end()) { ioArgs.i_durable = _i->second; } if ((_i = inMap.find("authMechanism")) != inMap.end()) { ioArgs.i_authMechanism = (_i->second).getString(); } if ((_i = inMap.find("username")) != inMap.end()) { ioArgs.i_username = (_i->second).getString(); } if ((_i = inMap.find("password")) != inMap.end()) { ioArgs.i_password = (_i->second).getString(); } if ((_i = inMap.find("transport")) != inMap.end()) { ioArgs.i_transport = (_i->second).getString(); } bool allow = coreObject->AuthorizeMethod(METHOD_CONNECT, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CONNECT, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "queueMoveMessages") { ArgsBrokerQueueMoveMessages ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("srcQueue")) != inMap.end()) { ioArgs.i_srcQueue = (_i->second).getString(); } if ((_i = inMap.find("destQueue")) != inMap.end()) { ioArgs.i_destQueue = (_i->second).getString(); } if ((_i = inMap.find("qty")) != inMap.end()) { ioArgs.i_qty = _i->second; } if ((_i = inMap.find("filter")) != inMap.end()) { ioArgs.i_filter = (_i->second).asMap(); } bool allow = coreObject->AuthorizeMethod(METHOD_QUEUEMOVEMESSAGES, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_QUEUEMOVEMESSAGES, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "setLogLevel") { ArgsBrokerSetLogLevel ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("level")) != inMap.end()) { ioArgs.i_level = (_i->second).getString(); } bool allow = coreObject->AuthorizeMethod(METHOD_SETLOGLEVEL, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETLOGLEVEL, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "getLogLevel") { ArgsBrokerGetLogLevel ioArgs; ::qpid::types::Variant::Map::const_iterator _i; bool allow = coreObject->AuthorizeMethod(METHOD_GETLOGLEVEL, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_GETLOGLEVEL, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); outMap["level"] = ::qpid::types::Variant(ioArgs.o_level); return; } if (methodName == "getTimestampConfig") { ArgsBrokerGetTimestampConfig ioArgs; ::qpid::types::Variant::Map::const_iterator _i; bool allow = coreObject->AuthorizeMethod(METHOD_GETTIMESTAMPCONFIG, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_GETTIMESTAMPCONFIG, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); outMap["receive"] = ::qpid::types::Variant(ioArgs.o_receive); return; } if (methodName == "setTimestampConfig") { ArgsBrokerSetTimestampConfig ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("receive")) != inMap.end()) { ioArgs.i_receive = _i->second; } bool allow = coreObject->AuthorizeMethod(METHOD_SETTIMESTAMPCONFIG, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SETTIMESTAMPCONFIG, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "create") { ArgsBrokerCreate ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("type")) != inMap.end()) { ioArgs.i_type = (_i->second).getString(); } if ((_i = inMap.find("name")) != inMap.end()) { ioArgs.i_name = (_i->second).getString(); } if ((_i = inMap.find("properties")) != inMap.end()) { ioArgs.i_properties = (_i->second).asMap(); } if ((_i = inMap.find("strict")) != inMap.end()) { ioArgs.i_strict = _i->second; } bool allow = coreObject->AuthorizeMethod(METHOD_CREATE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CREATE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "delete") { ArgsBrokerDelete ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("type")) != inMap.end()) { ioArgs.i_type = (_i->second).getString(); } if ((_i = inMap.find("name")) != inMap.end()) { ioArgs.i_name = (_i->second).getString(); } if ((_i = inMap.find("options")) != inMap.end()) { ioArgs.i_options = (_i->second).asMap(); } bool allow = coreObject->AuthorizeMethod(METHOD_DELETE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_DELETE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "query") { ArgsBrokerQuery ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("type")) != inMap.end()) { ioArgs.i_type = (_i->second).getString(); } if ((_i = inMap.find("name")) != inMap.end()) { ioArgs.i_name = (_i->second).getString(); } bool allow = coreObject->AuthorizeMethod(METHOD_QUERY, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_QUERY, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); outMap["results"] = ::qpid::types::Variant(ioArgs.o_results); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/Queue.cpp0000664000076400007640000010575511752725673022563 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Queue.h" #include "ArgsQueuePurge.h" #include "ArgsQueueReroute.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Queue::packageName = string ("org.apache.qpid.broker"); string Queue::className = string ("queue"); uint8_t Queue::md5Sum[MD5_LEN] = {0xea,0x2e,0x43,0xd,0xfc,0x12,0xd4,0x91,0xdd,0x53,0x74,0xda,0x3b,0xa7,0x65,0x76}; Queue::Queue (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const std::string& _name, bool _durable, bool _autoDelete, bool _exclusive) : ManagementObject(_core),name(_name),durable(_durable),autoDelete(_autoDelete),exclusive(_exclusive) { vhostRef = _parent->GetManagementObject ()->getObjectId (); arguments = ::qpid::types::Variant::Map(); altExchange = ::qpid::management::ObjectId(); consumerCount = 0; consumerCountHigh = 0; consumerCountLow = 0; bindingCount = 0; bindingCountHigh = 0; bindingCountLow = 0; unackedMessages = 0; unackedMessagesHigh = 0; unackedMessagesLow = 0; flowStopped = 0; // Optional properties start out not-present for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = 0; perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Queue::~Queue () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Queue::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Queue::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (7); // Config Element Count buf.putShort (44); // Inst Element Count buf.putShort (2); // Method Count // Properties ft.clear(); ft[NAME] = "vhostRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "durable"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "autoDelete"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "exclusive"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "arguments"; ft[TYPE] = TYPE_FTABLE; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Arguments supplied in queue.declare"; buf.putMap(ft); ft.clear(); ft[NAME] = "altExchange"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "msgTotalEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total messages enqueued"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgTotalDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total messages dequeued"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgTxnEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Transactional messages enqueued"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgTxnDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Transactional messages dequeued"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgPersistEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Persistent messages enqueued"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgPersistDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Persistent messages dequeued"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgDepth"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Current size of queue in messages"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteDepth"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Current size of queue in bytes"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteTotalEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total messages enqueued"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteTotalDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total messages dequeued"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteTxnEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Transactional messages enqueued"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteTxnDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Transactional messages dequeued"; buf.putMap(ft); ft.clear(); ft[NAME] = "bytePersistEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Persistent messages enqueued"; buf.putMap(ft); ft.clear(); ft[NAME] = "bytePersistDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Persistent messages dequeued"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgFtdEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total message bodies released from memory and flowed-to-disk on broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgFtdDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Total message bodies dequeued from the broker having been flowed-to-disk"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteFtdEnqueues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total bytes released from memory and flowed-to-disk on broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteFtdDequeues"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Total bytes dequeued from the broker having been flowed-to-disk"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgFtdDepth"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Current number of messages flowed-to-disk"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteFtdDepth"; ft[TYPE] = TYPE_U64; ft[UNIT] = "octet"; ft[DESC] = "Current number of bytes flowed-to-disk"; buf.putMap(ft); ft.clear(); ft[NAME] = "releases"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Acquired messages reinserted into the queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "acquires"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages acquired from the queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsTtl"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to TTL expiration"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsRing"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to ring-queue overflow"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsLvq"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to LVQ insert"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsOverflow"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to reject-policy overflow"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsSubscriber"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to subscriber reject"; buf.putMap(ft); ft.clear(); ft[NAME] = "discardsPurge"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages discarded due to management purge"; buf.putMap(ft); ft.clear(); ft[NAME] = "reroutes"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages dequeued to management re-route"; buf.putMap(ft); ft.clear(); ft[NAME] = "consumerCount"; ft[TYPE] = TYPE_U32; ft[UNIT] = "consumer"; ft[DESC] = "Current consumers on queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "consumerCountHigh"; ft[TYPE] = TYPE_U32; ft[UNIT] = "consumer"; ft[DESC] = "Current consumers on queue (High)"; buf.putMap(ft); ft.clear(); ft[NAME] = "consumerCountLow"; ft[TYPE] = TYPE_U32; ft[UNIT] = "consumer"; ft[DESC] = "Current consumers on queue (Low)"; buf.putMap(ft); ft.clear(); ft[NAME] = "bindingCount"; ft[TYPE] = TYPE_U32; ft[UNIT] = "binding"; ft[DESC] = "Current bindings"; buf.putMap(ft); ft.clear(); ft[NAME] = "bindingCountHigh"; ft[TYPE] = TYPE_U32; ft[UNIT] = "binding"; ft[DESC] = "Current bindings (High)"; buf.putMap(ft); ft.clear(); ft[NAME] = "bindingCountLow"; ft[TYPE] = TYPE_U32; ft[UNIT] = "binding"; ft[DESC] = "Current bindings (Low)"; buf.putMap(ft); ft.clear(); ft[NAME] = "unackedMessages"; ft[TYPE] = TYPE_U32; ft[UNIT] = "message"; ft[DESC] = "Messages consumed but not yet acked"; buf.putMap(ft); ft.clear(); ft[NAME] = "unackedMessagesHigh"; ft[TYPE] = TYPE_U32; ft[UNIT] = "message"; ft[DESC] = "Messages consumed but not yet acked (High)"; buf.putMap(ft); ft.clear(); ft[NAME] = "unackedMessagesLow"; ft[TYPE] = TYPE_U32; ft[UNIT] = "message"; ft[DESC] = "Messages consumed but not yet acked (Low)"; buf.putMap(ft); ft.clear(); ft[NAME] = "messageLatencySamples"; ft[TYPE] = TYPE_DELTATIME; ft[UNIT] = "nanosecond"; ft[DESC] = "Broker latency through this queue (Samples)"; buf.putMap(ft); ft.clear(); ft[NAME] = "messageLatencyMin"; ft[TYPE] = TYPE_DELTATIME; ft[UNIT] = "nanosecond"; ft[DESC] = "Broker latency through this queue (Min)"; buf.putMap(ft); ft.clear(); ft[NAME] = "messageLatencyMax"; ft[TYPE] = TYPE_DELTATIME; ft[UNIT] = "nanosecond"; ft[DESC] = "Broker latency through this queue (Max)"; buf.putMap(ft); ft.clear(); ft[NAME] = "messageLatencyAverage"; ft[TYPE] = TYPE_DELTATIME; ft[UNIT] = "nanosecond"; ft[DESC] = "Broker latency through this queue (Average)"; buf.putMap(ft); ft.clear(); ft[NAME] = "flowStopped"; ft[TYPE] = TYPE_BOOL; ft[DESC] = "Flow control active."; buf.putMap(ft); ft.clear(); ft[NAME] = "flowStoppedCount"; ft[TYPE] = TYPE_U32; ft[DESC] = "Number of times flow control was activated for this queue"; buf.putMap(ft); // Methods ft.clear(); ft[NAME] = "purge"; ft[ARGCOUNT] = 2; ft[DESC] = "Discard all or some messages on a queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "request"; ft[TYPE] = TYPE_U32; ft[DIR] = "I"; ft[DESC] = "0 for all messages or n>0 for n messages"; buf.putMap(ft); ft.clear(); ft[NAME] = "filter"; ft[TYPE] = TYPE_FTABLE; ft[DIR] = "I"; ft[DEFAULT] = "{}"; ft[DESC] = "if specified, purge only those messages matching this filter"; buf.putMap(ft); ft.clear(); ft[NAME] = "reroute"; ft[ARGCOUNT] = 4; ft[DESC] = "Remove all or some messages on this queue and route them to an exchange"; buf.putMap(ft); ft.clear(); ft[NAME] = "request"; ft[TYPE] = TYPE_U32; ft[DIR] = "I"; ft[DESC] = "0 for all messages or n>0 for n messages"; buf.putMap(ft); ft.clear(); ft[NAME] = "useAltExchange"; ft[TYPE] = TYPE_BOOL; ft[DIR] = "I"; ft[DESC] = "Iff true, use the queue's configured alternate exchange; iff false, use exchange named in the 'exchange' argument"; buf.putMap(ft); ft.clear(); ft[NAME] = "exchange"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; ft[DESC] = "Name of the exchange to route the messages through"; buf.putMap(ft); ft.clear(); ft[NAME] = "filter"; ft[TYPE] = TYPE_FTABLE; ft[DIR] = "I"; ft[DEFAULT] = "{}"; ft[DESC] = "if specified, reroute only those messages matching this filter"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Queue::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->msgTotalEnqueues = 0; totals->msgTotalDequeues = 0; totals->msgTxnEnqueues = 0; totals->msgTxnDequeues = 0; totals->msgPersistEnqueues = 0; totals->msgPersistDequeues = 0; totals->msgDepth = 0; totals->byteDepth = 0; totals->byteTotalEnqueues = 0; totals->byteTotalDequeues = 0; totals->byteTxnEnqueues = 0; totals->byteTxnDequeues = 0; totals->bytePersistEnqueues = 0; totals->bytePersistDequeues = 0; totals->msgFtdEnqueues = 0; totals->msgFtdDequeues = 0; totals->byteFtdEnqueues = 0; totals->byteFtdDequeues = 0; totals->msgFtdDepth = 0; totals->byteFtdDepth = 0; totals->releases = 0; totals->acquires = 0; totals->discardsTtl = 0; totals->discardsRing = 0; totals->discardsLvq = 0; totals->discardsOverflow = 0; totals->discardsSubscriber = 0; totals->discardsPurge = 0; totals->reroutes = 0; totals->messageLatencyCount = 0; totals->messageLatencyMin = std::numeric_limits::max(); totals->messageLatencyMax = std::numeric_limits::min(); totals->messageLatencyTotal = 0; totals->flowStoppedCount = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->msgTotalEnqueues += threadStats->msgTotalEnqueues; totals->msgTotalDequeues += threadStats->msgTotalDequeues; totals->msgTxnEnqueues += threadStats->msgTxnEnqueues; totals->msgTxnDequeues += threadStats->msgTxnDequeues; totals->msgPersistEnqueues += threadStats->msgPersistEnqueues; totals->msgPersistDequeues += threadStats->msgPersistDequeues; totals->msgDepth += threadStats->msgDepth; totals->byteDepth += threadStats->byteDepth; totals->byteTotalEnqueues += threadStats->byteTotalEnqueues; totals->byteTotalDequeues += threadStats->byteTotalDequeues; totals->byteTxnEnqueues += threadStats->byteTxnEnqueues; totals->byteTxnDequeues += threadStats->byteTxnDequeues; totals->bytePersistEnqueues += threadStats->bytePersistEnqueues; totals->bytePersistDequeues += threadStats->bytePersistDequeues; totals->msgFtdEnqueues += threadStats->msgFtdEnqueues; totals->msgFtdDequeues += threadStats->msgFtdDequeues; totals->byteFtdEnqueues += threadStats->byteFtdEnqueues; totals->byteFtdDequeues += threadStats->byteFtdDequeues; totals->msgFtdDepth += threadStats->msgFtdDepth; totals->byteFtdDepth += threadStats->byteFtdDepth; totals->releases += threadStats->releases; totals->acquires += threadStats->acquires; totals->discardsTtl += threadStats->discardsTtl; totals->discardsRing += threadStats->discardsRing; totals->discardsLvq += threadStats->discardsLvq; totals->discardsOverflow += threadStats->discardsOverflow; totals->discardsSubscriber += threadStats->discardsSubscriber; totals->discardsPurge += threadStats->discardsPurge; totals->reroutes += threadStats->reroutes; totals->messageLatencyCount += threadStats->messageLatencyCount; if (totals->messageLatencyMin > threadStats->messageLatencyMin) totals->messageLatencyMin = threadStats->messageLatencyMin; if (totals->messageLatencyMax < threadStats->messageLatencyMax) totals->messageLatencyMax = threadStats->messageLatencyMax; totals->messageLatencyTotal += threadStats->messageLatencyTotal; totals->flowStoppedCount += threadStats->flowStoppedCount; } } } uint32_t Queue::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 1; size += 16; // vhostRef size += (1 + name.length()); // name size += 1; // durable size += 1; // autoDelete size += 1; // exclusive size += ::qpid::amqp_0_10::MapCodec::encodedSize(arguments); // arguments if (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) { size += 16; // altExchange } return size; } void Queue::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = buf.getOctet(); {std::string _s; buf.getRawData(_s, vhostRef.encodedSize()); vhostRef.decode(_s);}; buf.getShortString(name); durable = buf.getOctet()==1; autoDelete = buf.getOctet()==1; exclusive = buf.getOctet()==1; buf.getMap(arguments); if (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) { {std::string _s; buf.getRawData(_s, altExchange.encodedSize()); altExchange.decode(_s);}; } delete [] _tmpBuf; } void Queue::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) buf.putOctet(presenceMask[idx]); {std::string _s; vhostRef.encode(_s); buf.putRawData(_s);}; buf.putShortString(name); buf.putOctet(durable?1:0); buf.putOctet(autoDelete?1:0); buf.putOctet(exclusive?1:0); buf.putMap(arguments); if (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) { {std::string _s; altExchange.encode(_s); buf.putRawData(_s);}; } uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Queue::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { threadStats->msgDepth = (uint64_t) (threadStats->msgTotalEnqueues - threadStats->msgTotalDequeues); threadStats->byteDepth = (uint64_t) (threadStats->byteTotalEnqueues - threadStats->byteTotalDequeues); threadStats->msgFtdDepth = (uint64_t) (threadStats->msgFtdEnqueues - threadStats->msgFtdDequeues); threadStats->byteFtdDepth = (uint64_t) (threadStats->byteFtdEnqueues - threadStats->byteFtdDequeues); } } struct PerThreadStats totals; aggregatePerThreadStats(&totals); if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } buf.putLongLong(totals.msgTotalEnqueues); buf.putLongLong(totals.msgTotalDequeues); buf.putLongLong(totals.msgTxnEnqueues); buf.putLongLong(totals.msgTxnDequeues); buf.putLongLong(totals.msgPersistEnqueues); buf.putLongLong(totals.msgPersistDequeues); buf.putLongLong(totals.msgDepth); buf.putLongLong(totals.byteDepth); buf.putLongLong(totals.byteTotalEnqueues); buf.putLongLong(totals.byteTotalDequeues); buf.putLongLong(totals.byteTxnEnqueues); buf.putLongLong(totals.byteTxnDequeues); buf.putLongLong(totals.bytePersistEnqueues); buf.putLongLong(totals.bytePersistDequeues); buf.putLongLong(totals.msgFtdEnqueues); buf.putLongLong(totals.msgFtdDequeues); buf.putLongLong(totals.byteFtdEnqueues); buf.putLongLong(totals.byteFtdDequeues); buf.putLongLong(totals.msgFtdDepth); buf.putLongLong(totals.byteFtdDepth); buf.putLongLong(totals.releases); buf.putLongLong(totals.acquires); buf.putLongLong(totals.discardsTtl); buf.putLongLong(totals.discardsRing); buf.putLongLong(totals.discardsLvq); buf.putLongLong(totals.discardsOverflow); buf.putLongLong(totals.discardsSubscriber); buf.putLongLong(totals.discardsPurge); buf.putLongLong(totals.reroutes); buf.putLong(consumerCount); buf.putLong(consumerCountHigh); buf.putLong(consumerCountLow); buf.putLong(bindingCount); buf.putLong(bindingCountHigh); buf.putLong(bindingCountLow); buf.putLong(unackedMessages); buf.putLong(unackedMessagesHigh); buf.putLong(unackedMessagesLow); buf.putLongLong(totals.messageLatencyCount); buf.putLongLong(totals.messageLatencyCount ? totals.messageLatencyMin : 0); buf.putLongLong(totals.messageLatencyMax); buf.putLongLong(totals.messageLatencyCount ? totals.messageLatencyTotal / totals.messageLatencyCount : 0); buf.putOctet(flowStopped?1:0); buf.putLong(totals.flowStoppedCount); // Maintenance of hi-lo statistics consumerCountHigh = consumerCount; consumerCountLow = consumerCount; bindingCountHigh = bindingCount; bindingCountLow = bindingCount; unackedMessagesHigh = unackedMessages; unackedMessagesLow = unackedMessages; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { threadStats->messageLatencyCount = 0; threadStats->messageLatencyTotal = 0; threadStats->messageLatencyMin = std::numeric_limits::max(); threadStats->messageLatencyMax = std::numeric_limits::min(); } } uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Queue::doMethod (string& methodName, const string& inStr, string& outStr, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); char *_tmpBuf = new char[inStr.length()]; memcpy(_tmpBuf, inStr.data(), inStr.length()); ::qpid::management::Buffer inBuf(_tmpBuf, inStr.length()); if (methodName == "purge") { _matched = true; ArgsQueuePurge ioArgs; ioArgs.i_request = inBuf.getLong(); inBuf.getMap(ioArgs.i_filter); bool allow = coreObject->AuthorizeMethod(METHOD_PURGE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_PURGE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "reroute") { _matched = true; ArgsQueueReroute ioArgs; ioArgs.i_request = inBuf.getLong(); ioArgs.i_useAltExchange = inBuf.getOctet()==1; inBuf.getShortString(ioArgs.i_exchange); inBuf.getMap(ioArgs.i_filter); bool allow = coreObject->AuthorizeMethod(METHOD_REROUTE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_REROUTE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } delete [] _tmpBuf; if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Queue::getKey() const { std::stringstream key; key << name; return key.str(); } void Queue::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["vhostRef"] = ::qpid::types::Variant(vhostRef); _map["name"] = ::qpid::types::Variant(name); _map["durable"] = ::qpid::types::Variant(durable); _map["autoDelete"] = ::qpid::types::Variant(autoDelete); _map["exclusive"] = ::qpid::types::Variant(exclusive); _map["arguments"] = ::qpid::types::Variant(arguments); if (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) { _map["altExchange"] = ::qpid::types::Variant(altExchange); } } if (includeStatistics) { instChanged = false; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { threadStats->msgDepth = (uint64_t) (threadStats->msgTotalEnqueues - threadStats->msgTotalDequeues); threadStats->byteDepth = (uint64_t) (threadStats->byteTotalEnqueues - threadStats->byteTotalDequeues); threadStats->msgFtdDepth = (uint64_t) (threadStats->msgFtdEnqueues - threadStats->msgFtdDequeues); threadStats->byteFtdDepth = (uint64_t) (threadStats->byteFtdEnqueues - threadStats->byteFtdDequeues); } } struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["msgTotalEnqueues"] = ::qpid::types::Variant(totals.msgTotalEnqueues); _map["msgTotalDequeues"] = ::qpid::types::Variant(totals.msgTotalDequeues); _map["msgTxnEnqueues"] = ::qpid::types::Variant(totals.msgTxnEnqueues); _map["msgTxnDequeues"] = ::qpid::types::Variant(totals.msgTxnDequeues); _map["msgPersistEnqueues"] = ::qpid::types::Variant(totals.msgPersistEnqueues); _map["msgPersistDequeues"] = ::qpid::types::Variant(totals.msgPersistDequeues); _map["msgDepth"] = ::qpid::types::Variant(totals.msgDepth); _map["byteDepth"] = ::qpid::types::Variant(totals.byteDepth); _map["byteTotalEnqueues"] = ::qpid::types::Variant(totals.byteTotalEnqueues); _map["byteTotalDequeues"] = ::qpid::types::Variant(totals.byteTotalDequeues); _map["byteTxnEnqueues"] = ::qpid::types::Variant(totals.byteTxnEnqueues); _map["byteTxnDequeues"] = ::qpid::types::Variant(totals.byteTxnDequeues); _map["bytePersistEnqueues"] = ::qpid::types::Variant(totals.bytePersistEnqueues); _map["bytePersistDequeues"] = ::qpid::types::Variant(totals.bytePersistDequeues); _map["msgFtdEnqueues"] = ::qpid::types::Variant(totals.msgFtdEnqueues); _map["msgFtdDequeues"] = ::qpid::types::Variant(totals.msgFtdDequeues); _map["byteFtdEnqueues"] = ::qpid::types::Variant(totals.byteFtdEnqueues); _map["byteFtdDequeues"] = ::qpid::types::Variant(totals.byteFtdDequeues); _map["msgFtdDepth"] = ::qpid::types::Variant(totals.msgFtdDepth); _map["byteFtdDepth"] = ::qpid::types::Variant(totals.byteFtdDepth); _map["releases"] = ::qpid::types::Variant(totals.releases); _map["acquires"] = ::qpid::types::Variant(totals.acquires); _map["discardsTtl"] = ::qpid::types::Variant(totals.discardsTtl); _map["discardsRing"] = ::qpid::types::Variant(totals.discardsRing); _map["discardsLvq"] = ::qpid::types::Variant(totals.discardsLvq); _map["discardsOverflow"] = ::qpid::types::Variant(totals.discardsOverflow); _map["discardsSubscriber"] = ::qpid::types::Variant(totals.discardsSubscriber); _map["discardsPurge"] = ::qpid::types::Variant(totals.discardsPurge); _map["reroutes"] = ::qpid::types::Variant(totals.reroutes); _map["consumerCount"] = ::qpid::types::Variant(consumerCount); _map["consumerCountHigh"] = ::qpid::types::Variant(consumerCountHigh); _map["consumerCountLow"] = ::qpid::types::Variant(consumerCountLow); _map["bindingCount"] = ::qpid::types::Variant(bindingCount); _map["bindingCountHigh"] = ::qpid::types::Variant(bindingCountHigh); _map["bindingCountLow"] = ::qpid::types::Variant(bindingCountLow); _map["unackedMessages"] = ::qpid::types::Variant(unackedMessages); _map["unackedMessagesHigh"] = ::qpid::types::Variant(unackedMessagesHigh); _map["unackedMessagesLow"] = ::qpid::types::Variant(unackedMessagesLow); _map["messageLatencyCount"] = ::qpid::types::Variant(totals.messageLatencyCount); _map["messageLatencyMin"] = (totals.messageLatencyCount ? ::qpid::types::Variant(totals.messageLatencyMin) : ::qpid::types::Variant(0)); _map["messageLatencyMax"] = ::qpid::types::Variant(totals.messageLatencyMax); _map["messageLatencyAvg"] = (totals.messageLatencyCount ? ::qpid::types::Variant((totals.messageLatencyTotal / totals.messageLatencyCount)) : ::qpid::types::Variant(0)); _map["flowStopped"] = ::qpid::types::Variant(flowStopped); _map["flowStoppedCount"] = ::qpid::types::Variant(totals.flowStoppedCount); // Maintenance of hi-lo statistics consumerCountHigh = consumerCount; consumerCountLow = consumerCount; bindingCountHigh = bindingCount; bindingCountLow = bindingCount; unackedMessagesHigh = unackedMessages; unackedMessagesLow = unackedMessages; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { threadStats->messageLatencyCount = 0; threadStats->messageLatencyTotal = 0; threadStats->messageLatencyMin = std::numeric_limits::max(); threadStats->messageLatencyMax = std::numeric_limits::min(); } } } } void Queue::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); bool _found; if ((_i = _map.find("vhostRef")) != _map.end()) { vhostRef = _i->second; } if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } if ((_i = _map.find("durable")) != _map.end()) { durable = _i->second; } if ((_i = _map.find("autoDelete")) != _map.end()) { autoDelete = _i->second; } if ((_i = _map.find("exclusive")) != _map.end()) { exclusive = _i->second; } if ((_i = _map.find("arguments")) != _map.end()) { arguments = (_i->second).asMap(); } _found = false; if ((_i = _map.find("altExchange")) != _map.end()) { altExchange = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_altExchange] |= presenceMask_altExchange; } } void Queue::doMethod (string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "purge") { ArgsQueuePurge ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("request")) != inMap.end()) { ioArgs.i_request = _i->second; } if ((_i = inMap.find("filter")) != inMap.end()) { ioArgs.i_filter = (_i->second).asMap(); } bool allow = coreObject->AuthorizeMethod(METHOD_PURGE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_PURGE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "reroute") { ArgsQueueReroute ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("request")) != inMap.end()) { ioArgs.i_request = _i->second; } if ((_i = inMap.find("useAltExchange")) != inMap.end()) { ioArgs.i_useAltExchange = _i->second; } if ((_i = inMap.find("exchange")) != inMap.end()) { ioArgs.i_exchange = (_i->second).getString(); } if ((_i = inMap.find("filter")) != inMap.end()) { ioArgs.i_filter = (_i->second).asMap(); } bool allow = coreObject->AuthorizeMethod(METHOD_REROUTE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_REROUTE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.cpp0000664000076400007640000001006411752725673027055 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventQueueThresholdExceeded.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventQueueThresholdExceeded::packageName = string ("org.apache.qpid.broker"); string EventQueueThresholdExceeded::eventName = string ("queueThresholdExceeded"); uint8_t EventQueueThresholdExceeded::md5Sum[16] = {0x4f,0xdb,0x27,0x39,0xd,0x3e,0xe2,0x12,0x33,0xe6,0xf3,0xd3,0xf9,0xc7,0x4d,0x9e}; EventQueueThresholdExceeded::EventQueueThresholdExceeded (const std::string& _qName, const uint64_t _msgDepth, const uint64_t _byteDepth) : qName(_qName), msgDepth(_msgDepth), byteDepth(_byteDepth) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventQueueThresholdExceeded::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventQueueThresholdExceeded::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (3); // Argument Count // Arguments ft.clear(); ft[NAME] = "qName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of a queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgDepth"; ft[TYPE] = TYPE_U64; ft[DESC] = "Current size of queue in messages"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteDepth"; ft[TYPE] = TYPE_U64; ft[DESC] = "Current size of queue in bytes"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventQueueThresholdExceeded::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(qName); buf.putLongLong(msgDepth); buf.putLongLong(byteDepth); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventQueueThresholdExceeded::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["qName"] = ::qpid::types::Variant(qName); map["msgDepth"] = ::qpid::types::Variant(msgDepth); map["byteDepth"] = ::qpid::types::Variant(byteDepth); } bool EventQueueThresholdExceeded::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/Agent.cpp0000664000076400007640000002254611752725673022531 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Agent.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Agent::packageName = string ("org.apache.qpid.broker"); string Agent::className = string ("agent"); uint8_t Agent::md5Sum[MD5_LEN] = {0xa8,0x13,0xb1,0x5,0x63,0x14,0x4c,0x5,0x83,0xd4,0xcb,0xd5,0x37,0x31,0x3d,0x81}; Agent::Agent (ManagementAgent*, Manageable* _core) : ManagementObject(_core) { connectionRef = ::qpid::management::ObjectId(); label = ""; registeredTo = ::qpid::management::ObjectId(); systemId = ::qpid::types::Uuid(); brokerBank = 0; agentBank = 0; } Agent::~Agent () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Agent::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Agent::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (6); // Config Element Count buf.putShort (0); // Inst Element Count buf.putShort (0); // Method Count // Properties ft.clear(); ft[NAME] = "connectionRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "label"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Label for agent"; buf.putMap(ft); ft.clear(); ft[NAME] = "registeredTo"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Broker agent is registered to"; buf.putMap(ft); ft.clear(); ft[NAME] = "systemId"; ft[TYPE] = TYPE_UUID; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Identifier of system where agent resides"; buf.putMap(ft); ft.clear(); ft[NAME] = "brokerBank"; ft[TYPE] = TYPE_U32; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Assigned object-id broker bank"; buf.putMap(ft); ft.clear(); ft[NAME] = "agentBank"; ft[TYPE] = TYPE_U32; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Assigned object-id agent bank"; buf.putMap(ft); // Statistics // Methods { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t Agent::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 16; // connectionRef size += (1 + label.length()); // label size += 16; // registeredTo size += 16; // systemId size += 4; // brokerBank size += 4; // agentBank return size; } void Agent::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } {std::string _s; buf.getRawData(_s, connectionRef.encodedSize()); connectionRef.decode(_s);}; buf.getShortString(label); {std::string _s; buf.getRawData(_s, registeredTo.encodedSize()); registeredTo.decode(_s);}; { unsigned char d[16]; buf.getRawData(d, 16); systemId = ::qpid::types::Uuid(d); }; brokerBank = buf.getLong(); agentBank = buf.getLong(); delete [] _tmpBuf; } void Agent::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } {std::string _s; connectionRef.encode(_s); buf.putRawData(_s);}; buf.putShortString(label); {std::string _s; registeredTo.encode(_s); buf.putRawData(_s);}; buf.putRawData(systemId.data(), 16); buf.putLong(brokerBank); buf.putLong(agentBank); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Agent::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Agent::doMethod (string&, const string&, string& outStr, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Agent::getKey() const { std::stringstream key; key << connectionRef.getV2Key(); return key.str(); } void Agent::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["connectionRef"] = ::qpid::types::Variant(connectionRef); _map["label"] = ::qpid::types::Variant(label); _map["registeredTo"] = ::qpid::types::Variant(registeredTo); _map["systemId"] = ::qpid::types::Variant(::qpid::types::Uuid((systemId).data())); _map["brokerBank"] = ::qpid::types::Variant(brokerBank); _map["agentBank"] = ::qpid::types::Variant(agentBank); } if (includeStatistics) { instChanged = false; // Maintenance of hi-lo statistics } } void Agent::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("connectionRef")) != _map.end()) { connectionRef = _i->second; } if ((_i = _map.find("label")) != _map.end()) { label = (_i->second).getString(); } if ((_i = _map.find("registeredTo")) != _map.end()) { registeredTo = _i->second; } if ((_i = _map.find("systemId")) != _map.end()) { systemId = (_i->second).asUuid().data(); } if ((_i = _map.find("brokerBank")) != _map.end()) { brokerBank = _i->second; } if ((_i = _map.find("agentBank")) != _map.end()) { agentBank = _i->second; } } void Agent::doMethod (string&, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerSetTimestampConfig.h0000664000076400007640000000237211752725673026662 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERSETTIMESTAMPCONFIG_ #define _ARGS_BROKERSETTIMESTAMPCONFIG_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerSetTimestampConfig : public ::qpid::management::Args { public: bool i_receive; }; }}}}} #endif /*!_ARGS_BROKERSETTIMESTAMPCONFIG_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Exchange.cpp0000664000076400007640000003566011752725673023216 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Exchange.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Exchange::packageName = string ("org.apache.qpid.broker"); string Exchange::className = string ("exchange"); uint8_t Exchange::md5Sum[MD5_LEN] = {0xc9,0xbb,0x43,0xdf,0x44,0xac,0x63,0xd5,0xcc,0x1c,0x6a,0x3,0x20,0x25,0xc9,0x7d}; Exchange::Exchange (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const std::string& _name) : ManagementObject(_core),name(_name) { vhostRef = _parent->GetManagementObject ()->getObjectId (); type = ""; durable = 0; autoDelete = 0; altExchange = ::qpid::management::ObjectId(); arguments = ::qpid::types::Variant::Map(); producerCount = 0; producerCountHigh = 0; producerCountLow = 0; bindingCount = 0; bindingCountHigh = 0; bindingCountLow = 0; // Optional properties start out not-present for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = 0; perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Exchange::~Exchange () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Exchange::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Exchange::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (7); // Config Element Count buf.putShort (12); // Inst Element Count buf.putShort (0); // Method Count // Properties ft.clear(); ft[NAME] = "vhostRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "type"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "durable"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "autoDelete"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "altExchange"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; buf.putMap(ft); ft.clear(); ft[NAME] = "arguments"; ft[TYPE] = TYPE_FTABLE; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Arguments supplied in exchange.declare"; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "producerCount"; ft[TYPE] = TYPE_U32; ft[DESC] = "Current producers on exchange"; buf.putMap(ft); ft.clear(); ft[NAME] = "producerCountHigh"; ft[TYPE] = TYPE_U32; ft[DESC] = "Current producers on exchange (High)"; buf.putMap(ft); ft.clear(); ft[NAME] = "producerCountLow"; ft[TYPE] = TYPE_U32; ft[DESC] = "Current producers on exchange (Low)"; buf.putMap(ft); ft.clear(); ft[NAME] = "bindingCount"; ft[TYPE] = TYPE_U32; ft[DESC] = "Current bindings"; buf.putMap(ft); ft.clear(); ft[NAME] = "bindingCountHigh"; ft[TYPE] = TYPE_U32; ft[DESC] = "Current bindings (High)"; buf.putMap(ft); ft.clear(); ft[NAME] = "bindingCountLow"; ft[TYPE] = TYPE_U32; ft[DESC] = "Current bindings (Low)"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgReceives"; ft[TYPE] = TYPE_U64; ft[DESC] = "Total messages received"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgDrops"; ft[TYPE] = TYPE_U64; ft[DESC] = "Total messages dropped (no matching key)"; buf.putMap(ft); ft.clear(); ft[NAME] = "msgRoutes"; ft[TYPE] = TYPE_U64; ft[DESC] = "Total routed messages"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteReceives"; ft[TYPE] = TYPE_U64; ft[DESC] = "Total bytes received"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteDrops"; ft[TYPE] = TYPE_U64; ft[DESC] = "Total bytes dropped (no matching key)"; buf.putMap(ft); ft.clear(); ft[NAME] = "byteRoutes"; ft[TYPE] = TYPE_U64; ft[DESC] = "Total routed bytes"; buf.putMap(ft); // Methods { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Exchange::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->msgReceives = 0; totals->msgDrops = 0; totals->msgRoutes = 0; totals->byteReceives = 0; totals->byteDrops = 0; totals->byteRoutes = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->msgReceives += threadStats->msgReceives; totals->msgDrops += threadStats->msgDrops; totals->msgRoutes += threadStats->msgRoutes; totals->byteReceives += threadStats->byteReceives; totals->byteDrops += threadStats->byteDrops; totals->byteRoutes += threadStats->byteRoutes; } } } uint32_t Exchange::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 1; size += 16; // vhostRef size += (1 + name.length()); // name size += (1 + type.length()); // type size += 1; // durable size += 1; // autoDelete if (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) { size += 16; // altExchange } size += ::qpid::amqp_0_10::MapCodec::encodedSize(arguments); // arguments return size; } void Exchange::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = buf.getOctet(); {std::string _s; buf.getRawData(_s, vhostRef.encodedSize()); vhostRef.decode(_s);}; buf.getShortString(name); buf.getShortString(type); durable = buf.getOctet()==1; autoDelete = buf.getOctet()==1; if (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) { {std::string _s; buf.getRawData(_s, altExchange.encodedSize()); altExchange.decode(_s);}; } buf.getMap(arguments); delete [] _tmpBuf; } void Exchange::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) buf.putOctet(presenceMask[idx]); {std::string _s; vhostRef.encode(_s); buf.putRawData(_s);}; buf.putShortString(name); buf.putShortString(type); buf.putOctet(durable?1:0); buf.putOctet(autoDelete?1:0); if (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) { {std::string _s; altExchange.encode(_s); buf.putRawData(_s);}; } buf.putMap(arguments); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Exchange::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } buf.putLong(producerCount); buf.putLong(producerCountHigh); buf.putLong(producerCountLow); buf.putLong(bindingCount); buf.putLong(bindingCountHigh); buf.putLong(bindingCountLow); buf.putLongLong(totals.msgReceives); buf.putLongLong(totals.msgDrops); buf.putLongLong(totals.msgRoutes); buf.putLongLong(totals.byteReceives); buf.putLongLong(totals.byteDrops); buf.putLongLong(totals.byteRoutes); // Maintenance of hi-lo statistics producerCountHigh = producerCount; producerCountLow = producerCount; bindingCountHigh = bindingCount; bindingCountLow = bindingCount; uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Exchange::doMethod (string&, const string&, string& outStr, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Exchange::getKey() const { std::stringstream key; key << name; return key.str(); } void Exchange::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["vhostRef"] = ::qpid::types::Variant(vhostRef); _map["name"] = ::qpid::types::Variant(name); _map["type"] = ::qpid::types::Variant(type); _map["durable"] = ::qpid::types::Variant(durable); _map["autoDelete"] = ::qpid::types::Variant(autoDelete); if (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) { _map["altExchange"] = ::qpid::types::Variant(altExchange); } _map["arguments"] = ::qpid::types::Variant(arguments); } if (includeStatistics) { instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["producerCount"] = ::qpid::types::Variant(producerCount); _map["producerCountHigh"] = ::qpid::types::Variant(producerCountHigh); _map["producerCountLow"] = ::qpid::types::Variant(producerCountLow); _map["bindingCount"] = ::qpid::types::Variant(bindingCount); _map["bindingCountHigh"] = ::qpid::types::Variant(bindingCountHigh); _map["bindingCountLow"] = ::qpid::types::Variant(bindingCountLow); _map["msgReceives"] = ::qpid::types::Variant(totals.msgReceives); _map["msgDrops"] = ::qpid::types::Variant(totals.msgDrops); _map["msgRoutes"] = ::qpid::types::Variant(totals.msgRoutes); _map["byteReceives"] = ::qpid::types::Variant(totals.byteReceives); _map["byteDrops"] = ::qpid::types::Variant(totals.byteDrops); _map["byteRoutes"] = ::qpid::types::Variant(totals.byteRoutes); // Maintenance of hi-lo statistics producerCountHigh = producerCount; producerCountLow = producerCount; bindingCountHigh = bindingCount; bindingCountLow = bindingCount; } } void Exchange::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); bool _found; if ((_i = _map.find("vhostRef")) != _map.end()) { vhostRef = _i->second; } if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } if ((_i = _map.find("type")) != _map.end()) { type = (_i->second).getString(); } if ((_i = _map.find("durable")) != _map.end()) { durable = _i->second; } if ((_i = _map.find("autoDelete")) != _map.end()) { autoDelete = _i->second; } _found = false; if ((_i = _map.find("altExchange")) != _map.end()) { altExchange = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_altExchange] |= presenceMask_altExchange; } if ((_i = _map.find("arguments")) != _map.end()) { arguments = (_i->second).asMap(); } } void Exchange::doMethod (string&, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/Bridge.h0000664000076400007640000001004111752725673022317 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_BRIDGE_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_BRIDGE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Bridge : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties ::qpid::management::ObjectId linkRef; uint16_t channelId; bool durable; std::string src; std::string dest; std::string key; bool srcIsQueue; bool srcIsLocal; std::string tag; std::string excludes; bool dynamic; uint16_t sync; // Statistics public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } // Stub for getInstChanged. There are no statistics in this class. bool getInstChanged() { return false; } bool hasInst() { return false; } QPID_BROKER_EXTERN Bridge( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, uint16_t _channelId, bool _durable, const std::string& _src, const std::string& _dest, const std::string& _key, bool _srcIsQueue, bool _srcIsLocal, const std::string& _tag, const std::string& _excludes, bool _dynamic, uint16_t _sync); QPID_BROKER_EXTERN ~Bridge(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_CLOSE = 1; // Accessor Methods }; }}}}} #endif /*!_MANAGEMENT_BRIDGE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventBrokerLinkDown.h0000664000076400007640000000424611752725673025031 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_BROKERLINKDOWN_ #define _MANAGEMENT_BROKERLINKDOWN_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventBrokerLinkDown : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventBrokerLinkDown(const std::string& _rhost); QPID_BROKER_EXTERN ~EventBrokerLinkDown() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 4; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_BROKERLINKDOWN_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/System.cpp0000664000076400007640000002202611752725673022750 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "System.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string System::packageName = string ("org.apache.qpid.broker"); string System::className = string ("system"); uint8_t System::md5Sum[MD5_LEN] = {0x92,0xf7,0x52,0x2b,0x18,0x88,0x82,0xd7,0x49,0xea,0x66,0x8d,0xb4,0xc5,0xea,0xb}; System::System (ManagementAgent*, Manageable* _core, const ::qpid::types::Uuid& _systemId) : ManagementObject(_core),systemId(_systemId) { osName = ""; nodeName = ""; release = ""; version = ""; machine = ""; } System::~System () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void System::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void System::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (6); // Config Element Count buf.putShort (0); // Inst Element Count buf.putShort (0); // Method Count // Properties ft.clear(); ft[NAME] = "systemId"; ft[TYPE] = TYPE_UUID; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "osName"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Operating System Name"; buf.putMap(ft); ft.clear(); ft[NAME] = "nodeName"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Node Name"; buf.putMap(ft); ft.clear(); ft[NAME] = "release"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "version"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "machine"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); // Statistics // Methods { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t System::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 16; // systemId size += (1 + osName.length()); // osName size += (1 + nodeName.length()); // nodeName size += (1 + release.length()); // release size += (1 + version.length()); // version size += (1 + machine.length()); // machine return size; } void System::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } { unsigned char d[16]; buf.getRawData(d, 16); systemId = ::qpid::types::Uuid(d); }; buf.getShortString(osName); buf.getShortString(nodeName); buf.getShortString(release); buf.getShortString(version); buf.getShortString(machine); delete [] _tmpBuf; } void System::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } buf.putRawData(systemId.data(), 16); buf.putShortString(osName); buf.putShortString(nodeName); buf.putShortString(release); buf.putShortString(version); buf.putShortString(machine); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void System::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void System::doMethod (string&, const string&, string& outStr, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string System::getKey() const { std::stringstream key; key << systemId; return key.str(); } void System::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["systemId"] = ::qpid::types::Variant(::qpid::types::Uuid((systemId).data())); _map["osName"] = ::qpid::types::Variant(osName); _map["nodeName"] = ::qpid::types::Variant(nodeName); _map["release"] = ::qpid::types::Variant(release); _map["version"] = ::qpid::types::Variant(version); _map["machine"] = ::qpid::types::Variant(machine); } if (includeStatistics) { instChanged = false; // Maintenance of hi-lo statistics } } void System::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("systemId")) != _map.end()) { systemId = (_i->second).asUuid().data(); } if ((_i = _map.find("osName")) != _map.end()) { osName = (_i->second).getString(); } if ((_i = _map.find("nodeName")) != _map.end()) { nodeName = (_i->second).getString(); } if ((_i = _map.find("release")) != _map.end()) { release = (_i->second).getString(); } if ((_i = _map.find("version")) != _map.end()) { version = (_i->second).getString(); } if ((_i = _map.find("machine")) != _map.end()) { machine = (_i->second).getString(); } } void System::doMethod (string&, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventQueueDeclare.h0000664000076400007640000000522211752725673024476 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_QUEUEDECLARE_ #define _MANAGEMENT_QUEUEDECLARE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventQueueDeclare : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; const std::string& qName; const bool durable; const bool excl; const bool autoDel; const std::string& altEx; const ::qpid::types::Variant::Map& args; const std::string& disp; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventQueueDeclare(const std::string& _rhost, const std::string& _user, const std::string& _qName, const bool _durable, const bool _excl, const bool _autoDel, const std::string& _altEx, const ::qpid::types::Variant::Map& _args, const std::string& _disp); QPID_BROKER_EXTERN ~EventQueueDeclare() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_QUEUEDECLARE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventUnsubscribe.cpp0000664000076400007640000000766211752725673024763 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventUnsubscribe.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventUnsubscribe::packageName = string ("org.apache.qpid.broker"); string EventUnsubscribe::eventName = string ("unsubscribe"); uint8_t EventUnsubscribe::md5Sum[16] = {0x37,0xbe,0xd,0xbf,0xc1,0xe0,0x5a,0x79,0xa9,0x9b,0xbc,0xfc,0x5f,0x24,0x99,0xa1}; EventUnsubscribe::EventUnsubscribe (const std::string& _rhost, const std::string& _user, const std::string& _dest) : rhost(_rhost), user(_user), dest(_dest) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventUnsubscribe::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventUnsubscribe::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (3); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); ft.clear(); ft[NAME] = "dest"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Destination tag for a subscription"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventUnsubscribe::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); buf.putShortString(dest); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventUnsubscribe::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); map["dest"] = ::qpid::types::Variant(dest); } bool EventUnsubscribe::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventClientConnectFail.h0000664000076400007640000000447211752725673025464 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_CLIENTCONNECTFAIL_ #define _MANAGEMENT_CLIENTCONNECTFAIL_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventClientConnectFail : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; const std::string& reason; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventClientConnectFail(const std::string& _rhost, const std::string& _user, const std::string& _reason); QPID_BROKER_EXTERN ~EventClientConnectFail() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 4; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_CLIENTCONNECTFAIL_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventExchangeDeclare.cpp0000664000076400007640000001325111752725673025470 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventExchangeDeclare.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventExchangeDeclare::packageName = string ("org.apache.qpid.broker"); string EventExchangeDeclare::eventName = string ("exchangeDeclare"); uint8_t EventExchangeDeclare::md5Sum[16] = {0xac,0x64,0xab,0xd6,0x49,0x4c,0x59,0x50,0x5d,0x78,0x28,0x9e,0x42,0xc1,0x53,0x7}; EventExchangeDeclare::EventExchangeDeclare (const std::string& _rhost, const std::string& _user, const std::string& _exName, const std::string& _exType, const std::string& _altEx, const bool _durable, const bool _autoDel, const ::qpid::types::Variant::Map& _args, const std::string& _disp) : rhost(_rhost), user(_user), exName(_exName), exType(_exType), altEx(_altEx), durable(_durable), autoDel(_autoDel), args(_args), disp(_disp) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventExchangeDeclare::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventExchangeDeclare::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (9); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); ft.clear(); ft[NAME] = "exName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of an exchange"; buf.putMap(ft); ft.clear(); ft[NAME] = "exType"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Type of an exchange"; buf.putMap(ft); ft.clear(); ft[NAME] = "altEx"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of the alternate exchange"; buf.putMap(ft); ft.clear(); ft[NAME] = "durable"; ft[TYPE] = TYPE_BOOL; ft[DESC] = "Created object is durable"; buf.putMap(ft); ft.clear(); ft[NAME] = "autoDel"; ft[TYPE] = TYPE_BOOL; ft[DESC] = "Created object is automatically deleted when no longer in use"; buf.putMap(ft); ft.clear(); ft[NAME] = "args"; ft[TYPE] = TYPE_FTABLE; ft[DESC] = "Supplemental arguments or parameters supplied"; buf.putMap(ft); ft.clear(); ft[NAME] = "disp"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Disposition of a declaration: 'created' if object was created, 'existing' if object already existed"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventExchangeDeclare::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); buf.putShortString(exName); buf.putShortString(exType); buf.putShortString(altEx); buf.putOctet(durable?1:0); buf.putOctet(autoDel?1:0); buf.putMap(args); buf.putShortString(disp); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventExchangeDeclare::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); map["exName"] = ::qpid::types::Variant(exName); map["exType"] = ::qpid::types::Variant(exType); map["altEx"] = ::qpid::types::Variant(altEx); map["durable"] = ::qpid::types::Variant(durable); map["autoDel"] = ::qpid::types::Variant(autoDel); map["args"] = ::qpid::types::Variant(args); map["disp"] = ::qpid::types::Variant(disp); } bool EventExchangeDeclare::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/ManagementSetupState.cpp0000664000076400007640000001645511752725673025573 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "ManagementSetupState.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string ManagementSetupState::packageName = string ("org.apache.qpid.broker"); string ManagementSetupState::className = string ("managementsetupstate"); uint8_t ManagementSetupState::md5Sum[MD5_LEN] = {0x63,0xd4,0x88,0xe6,0xb3,0x89,0x60,0x84,0x33,0xb2,0x73,0xc0,0x8e,0xdc,0xeb,0x7c}; ManagementSetupState::ManagementSetupState (ManagementAgent*, Manageable* _core) : ManagementObject(_core) { objectNum = 0; bootSequence = 0; } ManagementSetupState::~ManagementSetupState () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void ManagementSetupState::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void ManagementSetupState::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (2); // Config Element Count buf.putShort (0); // Inst Element Count buf.putShort (0); // Method Count // Properties ft.clear(); ft[NAME] = "objectNum"; ft[TYPE] = TYPE_U64; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "bootSequence"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); // Statistics // Methods { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t ManagementSetupState::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 8; // objectNum size += 2; // bootSequence return size; } void ManagementSetupState::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } objectNum = buf.getLongLong(); bootSequence = buf.getShort(); delete [] _tmpBuf; } void ManagementSetupState::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } buf.putLongLong(objectNum); buf.putShort(bootSequence); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void ManagementSetupState::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void ManagementSetupState::doMethod (string&, const string&, string& outStr, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string ManagementSetupState::getKey() const { std::stringstream key; return key.str(); } void ManagementSetupState::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["objectNum"] = ::qpid::types::Variant(objectNum); _map["bootSequence"] = ::qpid::types::Variant(bootSequence); } if (includeStatistics) { instChanged = false; // Maintenance of hi-lo statistics } } void ManagementSetupState::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("objectNum")) != _map.end()) { objectNum = _i->second; } if ((_i = _map.find("bootSequence")) != _map.end()) { bootSequence = _i->second; } } void ManagementSetupState::doMethod (string&, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerConnect.h0000664000076400007640000000256111752725673024506 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERCONNECT_ #define _ARGS_BROKERCONNECT_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerConnect : public ::qpid::management::Args { public: std::string i_host; uint32_t i_port; bool i_durable; std::string i_authMechanism; std::string i_username; std::string i_password; std::string i_transport; }; }}}}} #endif /*!_ARGS_BROKERCONNECT_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventClientConnect.cpp0000664000076400007640000000727511752725673025227 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventClientConnect.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventClientConnect::packageName = string ("org.apache.qpid.broker"); string EventClientConnect::eventName = string ("clientConnect"); uint8_t EventClientConnect::md5Sum[16] = {0xf5,0x9f,0xe6,0x34,0x9c,0x51,0xcf,0xce,0xb3,0xbe,0x63,0xbf,0x6,0x3a,0xa,0xc2}; EventClientConnect::EventClientConnect (const std::string& _rhost, const std::string& _user) : rhost(_rhost), user(_user) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventClientConnect::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventClientConnect::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (2); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventClientConnect::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventClientConnect::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); } bool EventClientConnect::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventSubscribe.cpp0000664000076400007640000001132511752725673024407 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventSubscribe.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventSubscribe::packageName = string ("org.apache.qpid.broker"); string EventSubscribe::eventName = string ("subscribe"); uint8_t EventSubscribe::md5Sum[16] = {0xfb,0xe1,0x8f,0x36,0x6e,0x50,0x34,0xd4,0x5f,0x4c,0x41,0x35,0x8a,0x37,0x99,0x42}; EventSubscribe::EventSubscribe (const std::string& _rhost, const std::string& _user, const std::string& _qName, const std::string& _dest, const bool _excl, const ::qpid::types::Variant::Map& _args) : rhost(_rhost), user(_user), qName(_qName), dest(_dest), excl(_excl), args(_args) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventSubscribe::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventSubscribe::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (6); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); ft.clear(); ft[NAME] = "qName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of a queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "dest"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Destination tag for a subscription"; buf.putMap(ft); ft.clear(); ft[NAME] = "excl"; ft[TYPE] = TYPE_BOOL; ft[DESC] = "Created object is exclusive for the use of the owner only"; buf.putMap(ft); ft.clear(); ft[NAME] = "args"; ft[TYPE] = TYPE_FTABLE; ft[DESC] = "Supplemental arguments or parameters supplied"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventSubscribe::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); buf.putShortString(qName); buf.putShortString(dest); buf.putOctet(excl?1:0); buf.putMap(args); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventSubscribe::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); map["qName"] = ::qpid::types::Variant(qName); map["dest"] = ::qpid::types::Variant(dest); map["excl"] = ::qpid::types::Variant(excl); map["args"] = ::qpid::types::Variant(args); } bool EventSubscribe::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/Connection.cpp0000664000076400007640000004520711752725673023571 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Connection.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Connection::packageName = string ("org.apache.qpid.broker"); string Connection::className = string ("connection"); uint8_t Connection::md5Sum[MD5_LEN] = {0x9,0xa3,0x9a,0x61,0xd0,0x9a,0x6a,0x80,0x1f,0x85,0x67,0xa,0x97,0x55,0x7a,0x46}; Connection::Connection (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const std::string& _address, bool _incoming, bool _SystemConnection) : ManagementObject(_core),address(_address),incoming(_incoming),SystemConnection(_SystemConnection) { vhostRef = _parent->GetManagementObject ()->getObjectId (); userProxyAuth = 0; federationLink = 0; authIdentity = ""; remoteProcessName = ""; remotePid = 0; remoteParentPid = 0; shadow = 0; saslMechanism = ""; saslSsf = 0; closing = 0; // Optional properties start out not-present for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = 0; perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Connection::~Connection () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Connection::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Connection::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (13); // Config Element Count buf.putShort (7); // Inst Element Count buf.putShort (1); // Method Count // Properties ft.clear(); ft[NAME] = "vhostRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "address"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "incoming"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "SystemConnection"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Infrastructure/ Inter-system connection (Cluster, Federation, ...)"; buf.putMap(ft); ft.clear(); ft[NAME] = "userProxyAuth"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Authorization to proxy for users not on broker"; buf.putMap(ft); ft.clear(); ft[NAME] = "federationLink"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "Is this a federation link"; buf.putMap(ft); ft.clear(); ft[NAME] = "authIdentity"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "authId of connection if authentication enabled"; buf.putMap(ft); ft.clear(); ft[NAME] = "remoteProcessName"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "Name of executable running as remote client"; buf.putMap(ft); ft.clear(); ft[NAME] = "remotePid"; ft[TYPE] = TYPE_U32; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "Process ID of remote client"; buf.putMap(ft); ft.clear(); ft[NAME] = "remoteParentPid"; ft[TYPE] = TYPE_U32; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "Parent Process ID of remote client"; buf.putMap(ft); ft.clear(); ft[NAME] = "shadow"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "True for shadow connections"; buf.putMap(ft); ft.clear(); ft[NAME] = "saslMechanism"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "SASL mechanism"; buf.putMap(ft); ft.clear(); ft[NAME] = "saslSsf"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "SASL security strength factor"; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "closing"; ft[TYPE] = TYPE_BOOL; ft[DESC] = "This client is closing by management request"; buf.putMap(ft); ft.clear(); ft[NAME] = "framesFromClient"; ft[TYPE] = TYPE_U64; buf.putMap(ft); ft.clear(); ft[NAME] = "framesToClient"; ft[TYPE] = TYPE_U64; buf.putMap(ft); ft.clear(); ft[NAME] = "bytesFromClient"; ft[TYPE] = TYPE_U64; buf.putMap(ft); ft.clear(); ft[NAME] = "bytesToClient"; ft[TYPE] = TYPE_U64; buf.putMap(ft); ft.clear(); ft[NAME] = "msgsFromClient"; ft[TYPE] = TYPE_U64; buf.putMap(ft); ft.clear(); ft[NAME] = "msgsToClient"; ft[TYPE] = TYPE_U64; buf.putMap(ft); // Methods ft.clear(); ft[NAME] = "close"; ft[ARGCOUNT] = 0; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Connection::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->framesFromClient = 0; totals->framesToClient = 0; totals->bytesFromClient = 0; totals->bytesToClient = 0; totals->msgsFromClient = 0; totals->msgsToClient = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->framesFromClient += threadStats->framesFromClient; totals->framesToClient += threadStats->framesToClient; totals->bytesFromClient += threadStats->bytesFromClient; totals->bytesToClient += threadStats->bytesToClient; totals->msgsFromClient += threadStats->msgsFromClient; totals->msgsToClient += threadStats->msgsToClient; } } } uint32_t Connection::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 1; size += 16; // vhostRef size += (1 + address.length()); // address size += 1; // incoming size += 1; // SystemConnection size += 1; // userProxyAuth size += 1; // federationLink size += (1 + authIdentity.length()); // authIdentity if (presenceMask[presenceByte_remoteProcessName] & presenceMask_remoteProcessName) { size += (2 + remoteProcessName.length()); // remoteProcessName } if (presenceMask[presenceByte_remotePid] & presenceMask_remotePid) { size += 4; // remotePid } if (presenceMask[presenceByte_remoteParentPid] & presenceMask_remoteParentPid) { size += 4; // remoteParentPid } size += 1; // shadow size += (1 + saslMechanism.length()); // saslMechanism size += 2; // saslSsf return size; } void Connection::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = buf.getOctet(); {std::string _s; buf.getRawData(_s, vhostRef.encodedSize()); vhostRef.decode(_s);}; buf.getShortString(address); incoming = buf.getOctet()==1; SystemConnection = buf.getOctet()==1; userProxyAuth = buf.getOctet()==1; federationLink = buf.getOctet()==1; buf.getShortString(authIdentity); if (presenceMask[presenceByte_remoteProcessName] & presenceMask_remoteProcessName) { buf.getMediumString(remoteProcessName); } if (presenceMask[presenceByte_remotePid] & presenceMask_remotePid) { remotePid = buf.getLong(); } if (presenceMask[presenceByte_remoteParentPid] & presenceMask_remoteParentPid) { remoteParentPid = buf.getLong(); } shadow = buf.getOctet()==1; buf.getShortString(saslMechanism); saslSsf = buf.getShort(); delete [] _tmpBuf; } void Connection::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) buf.putOctet(presenceMask[idx]); {std::string _s; vhostRef.encode(_s); buf.putRawData(_s);}; buf.putShortString(address); buf.putOctet(incoming?1:0); buf.putOctet(SystemConnection?1:0); buf.putOctet(userProxyAuth?1:0); buf.putOctet(federationLink?1:0); buf.putShortString(authIdentity); if (presenceMask[presenceByte_remoteProcessName] & presenceMask_remoteProcessName) { buf.putMediumString(remoteProcessName); } if (presenceMask[presenceByte_remotePid] & presenceMask_remotePid) { buf.putLong(remotePid); } if (presenceMask[presenceByte_remoteParentPid] & presenceMask_remoteParentPid) { buf.putLong(remoteParentPid); } buf.putOctet(shadow?1:0); buf.putShortString(saslMechanism); buf.putShort(saslSsf); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Connection::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } buf.putOctet(closing?1:0); buf.putLongLong(totals.framesFromClient); buf.putLongLong(totals.framesToClient); buf.putLongLong(totals.bytesFromClient); buf.putLongLong(totals.bytesToClient); buf.putLongLong(totals.msgsFromClient); buf.putLongLong(totals.msgsToClient); // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Connection::doMethod (string& methodName, const string&, string& outStr, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (methodName == "close") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_CLOSE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CLOSE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Connection::getKey() const { std::stringstream key; key << address; return key.str(); } void Connection::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["vhostRef"] = ::qpid::types::Variant(vhostRef); _map["address"] = ::qpid::types::Variant(address); _map["incoming"] = ::qpid::types::Variant(incoming); _map["SystemConnection"] = ::qpid::types::Variant(SystemConnection); _map["userProxyAuth"] = ::qpid::types::Variant(userProxyAuth); _map["federationLink"] = ::qpid::types::Variant(federationLink); _map["authIdentity"] = ::qpid::types::Variant(authIdentity); if (presenceMask[presenceByte_remoteProcessName] & presenceMask_remoteProcessName) { _map["remoteProcessName"] = ::qpid::types::Variant(remoteProcessName); } if (presenceMask[presenceByte_remotePid] & presenceMask_remotePid) { _map["remotePid"] = ::qpid::types::Variant(remotePid); } if (presenceMask[presenceByte_remoteParentPid] & presenceMask_remoteParentPid) { _map["remoteParentPid"] = ::qpid::types::Variant(remoteParentPid); } _map["shadow"] = ::qpid::types::Variant(shadow); _map["saslMechanism"] = ::qpid::types::Variant(saslMechanism); _map["saslSsf"] = ::qpid::types::Variant(saslSsf); } if (includeStatistics) { instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["closing"] = ::qpid::types::Variant(closing); _map["framesFromClient"] = ::qpid::types::Variant(totals.framesFromClient); _map["framesToClient"] = ::qpid::types::Variant(totals.framesToClient); _map["bytesFromClient"] = ::qpid::types::Variant(totals.bytesFromClient); _map["bytesToClient"] = ::qpid::types::Variant(totals.bytesToClient); _map["msgsFromClient"] = ::qpid::types::Variant(totals.msgsFromClient); _map["msgsToClient"] = ::qpid::types::Variant(totals.msgsToClient); // Maintenance of hi-lo statistics } } void Connection::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); bool _found; if ((_i = _map.find("vhostRef")) != _map.end()) { vhostRef = _i->second; } if ((_i = _map.find("address")) != _map.end()) { address = (_i->second).getString(); } if ((_i = _map.find("incoming")) != _map.end()) { incoming = _i->second; } if ((_i = _map.find("SystemConnection")) != _map.end()) { SystemConnection = _i->second; } if ((_i = _map.find("userProxyAuth")) != _map.end()) { userProxyAuth = _i->second; } if ((_i = _map.find("federationLink")) != _map.end()) { federationLink = _i->second; } if ((_i = _map.find("authIdentity")) != _map.end()) { authIdentity = (_i->second).getString(); } _found = false; if ((_i = _map.find("remoteProcessName")) != _map.end()) { remoteProcessName = (_i->second).getString(); _found = true; } if (_found) { presenceMask[presenceByte_remoteProcessName] |= presenceMask_remoteProcessName; } _found = false; if ((_i = _map.find("remotePid")) != _map.end()) { remotePid = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_remotePid] |= presenceMask_remotePid; } _found = false; if ((_i = _map.find("remoteParentPid")) != _map.end()) { remoteParentPid = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_remoteParentPid] |= presenceMask_remoteParentPid; } if ((_i = _map.find("shadow")) != _map.end()) { shadow = _i->second; } if ((_i = _map.find("saslMechanism")) != _map.end()) { saslMechanism = (_i->second).getString(); } if ((_i = _map.find("saslSsf")) != _map.end()) { saslSsf = _i->second; } } void Connection::doMethod (string& methodName, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "close") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_CLOSE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CLOSE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/Binding.cpp0000664000076400007640000002520611752725673023041 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Binding.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Binding::packageName = string ("org.apache.qpid.broker"); string Binding::className = string ("binding"); uint8_t Binding::md5Sum[MD5_LEN] = {0x79,0x31,0x1b,0xb,0x40,0x77,0x92,0xc0,0x20,0x1,0x79,0xe7,0x52,0x25,0xda,0xa3}; Binding::Binding (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const ::qpid::management::ObjectId& _queueRef, const std::string& _bindingKey, const ::qpid::types::Variant::Map& _arguments) : ManagementObject(_core),queueRef(_queueRef),bindingKey(_bindingKey),arguments(_arguments) { exchangeRef = _parent->GetManagementObject ()->getObjectId (); origin = ""; // Optional properties start out not-present for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = 0; perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Binding::~Binding () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Binding::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Binding::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (5); // Config Element Count buf.putShort (1); // Inst Element Count buf.putShort (0); // Method Count // Properties ft.clear(); ft[NAME] = "exchangeRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "queueRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "bindingKey"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "arguments"; ft[TYPE] = TYPE_FTABLE; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "origin"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "msgMatched"; ft[TYPE] = TYPE_U64; buf.putMap(ft); // Methods { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Binding::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->msgMatched = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->msgMatched += threadStats->msgMatched; } } } uint32_t Binding::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 1; size += 16; // exchangeRef size += 16; // queueRef size += (2 + bindingKey.length()); // bindingKey size += ::qpid::amqp_0_10::MapCodec::encodedSize(arguments); // arguments if (presenceMask[presenceByte_origin] & presenceMask_origin) { size += (1 + origin.length()); // origin } return size; } void Binding::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = buf.getOctet(); {std::string _s; buf.getRawData(_s, exchangeRef.encodedSize()); exchangeRef.decode(_s);}; {std::string _s; buf.getRawData(_s, queueRef.encodedSize()); queueRef.decode(_s);}; buf.getMediumString(bindingKey); buf.getMap(arguments); if (presenceMask[presenceByte_origin] & presenceMask_origin) { buf.getShortString(origin); } delete [] _tmpBuf; } void Binding::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) buf.putOctet(presenceMask[idx]); {std::string _s; exchangeRef.encode(_s); buf.putRawData(_s);}; {std::string _s; queueRef.encode(_s); buf.putRawData(_s);}; buf.putMediumString(bindingKey); buf.putMap(arguments); if (presenceMask[presenceByte_origin] & presenceMask_origin) { buf.putShortString(origin); } uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Binding::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } buf.putLongLong(totals.msgMatched); // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Binding::doMethod (string&, const string&, string& outStr, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Binding::getKey() const { std::stringstream key; key << exchangeRef.getV2Key() << ","; key << queueRef.getV2Key() << ","; key << bindingKey; return key.str(); } void Binding::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["exchangeRef"] = ::qpid::types::Variant(exchangeRef); _map["queueRef"] = ::qpid::types::Variant(queueRef); _map["bindingKey"] = ::qpid::types::Variant(bindingKey); _map["arguments"] = ::qpid::types::Variant(arguments); if (presenceMask[presenceByte_origin] & presenceMask_origin) { _map["origin"] = ::qpid::types::Variant(origin); } } if (includeStatistics) { instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["msgMatched"] = ::qpid::types::Variant(totals.msgMatched); // Maintenance of hi-lo statistics } } void Binding::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); bool _found; if ((_i = _map.find("exchangeRef")) != _map.end()) { exchangeRef = _i->second; } if ((_i = _map.find("queueRef")) != _map.end()) { queueRef = _i->second; } if ((_i = _map.find("bindingKey")) != _map.end()) { bindingKey = (_i->second).getString(); } if ((_i = _map.find("arguments")) != _map.end()) { arguments = (_i->second).asMap(); } _found = false; if ((_i = _map.find("origin")) != _map.end()) { origin = (_i->second).getString(); _found = true; } if (_found) { presenceMask[presenceByte_origin] |= presenceMask_origin; } } void Binding::doMethod (string&, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerDelete.h0000664000076400007640000000242111752725673024312 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERDELETE_ #define _ARGS_BROKERDELETE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerDelete : public ::qpid::management::Args { public: std::string i_type; std::string i_name; ::qpid::types::Variant::Map i_options; }; }}}}} #endif /*!_ARGS_BROKERDELETE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerSetLogLevel.h0000664000076400007640000000234311752725673025300 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERSETLOGLEVEL_ #define _ARGS_BROKERSETLOGLEVEL_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerSetLogLevel : public ::qpid::management::Args { public: std::string i_level; }; }}}}} #endif /*!_ARGS_BROKERSETLOGLEVEL_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsQueuePurge.h0000664000076400007640000000236011752725673024034 0ustar00jrossjross00000000000000 #ifndef _ARGS_QUEUEPURGE_ #define _ARGS_QUEUEPURGE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsQueuePurge : public ::qpid::management::Args { public: uint32_t i_request; ::qpid::types::Variant::Map i_filter; }; }}}}} #endif /*!_ARGS_QUEUEPURGE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Broker.h0000664000076400007640000004622711752725673022366 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_BROKER_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_BROKER_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Broker : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; uint8_t presenceMask[1]; static const uint8_t presenceByte_dataDir = 0; static const uint8_t presenceMask_dataDir = 1; // Properties std::string name; ::qpid::management::ObjectId systemRef; uint16_t port; uint16_t workerThreads; uint16_t maxConns; uint16_t connBacklog; uint32_t stagingThreshold; bool mgmtPublish; uint16_t mgmtPubInterval; std::string version; std::string dataDir; // Statistics uint64_t uptime; // Per-Thread Statistics public: struct PerThreadStats { uint64_t queueCount; uint64_t msgTotalEnqueues; uint64_t msgTotalDequeues; uint64_t byteTotalEnqueues; uint64_t byteTotalDequeues; uint64_t msgDepth; uint64_t byteDepth; uint64_t msgPersistEnqueues; uint64_t msgPersistDequeues; uint64_t bytePersistEnqueues; uint64_t bytePersistDequeues; uint64_t msgTxnEnqueues; uint64_t msgTxnDequeues; uint64_t byteTxnEnqueues; uint64_t byteTxnDequeues; uint64_t msgFtdEnqueues; uint64_t msgFtdDequeues; uint64_t byteFtdEnqueues; uint64_t byteFtdDequeues; uint64_t msgFtdDepth; uint64_t byteFtdDepth; uint64_t releases; uint64_t acquires; uint64_t discardsNoRoute; uint64_t discardsTtl; uint64_t discardsRing; uint64_t discardsLvq; uint64_t discardsOverflow; uint64_t discardsSubscriber; uint64_t discardsPurge; uint64_t reroutes; uint64_t abandoned; uint64_t abandonedViaAlt; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->queueCount = 0; threadStats->msgTotalEnqueues = 0; threadStats->msgTotalDequeues = 0; threadStats->byteTotalEnqueues = 0; threadStats->byteTotalDequeues = 0; threadStats->msgDepth = 0; threadStats->byteDepth = 0; threadStats->msgPersistEnqueues = 0; threadStats->msgPersistDequeues = 0; threadStats->bytePersistEnqueues = 0; threadStats->bytePersistDequeues = 0; threadStats->msgTxnEnqueues = 0; threadStats->msgTxnDequeues = 0; threadStats->byteTxnEnqueues = 0; threadStats->byteTxnDequeues = 0; threadStats->msgFtdEnqueues = 0; threadStats->msgFtdDequeues = 0; threadStats->byteFtdEnqueues = 0; threadStats->byteFtdDequeues = 0; threadStats->msgFtdDepth = 0; threadStats->byteFtdDepth = 0; threadStats->releases = 0; threadStats->acquires = 0; threadStats->discardsNoRoute = 0; threadStats->discardsTtl = 0; threadStats->discardsRing = 0; threadStats->discardsLvq = 0; threadStats->discardsOverflow = 0; threadStats->discardsSubscriber = 0; threadStats->discardsPurge = 0; threadStats->reroutes = 0; threadStats->abandoned = 0; threadStats->abandonedViaAlt = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Broker( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const std::string& _name); QPID_BROKER_EXTERN ~Broker(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_ECHO = 1; QPID_BROKER_EXTERN static const uint32_t METHOD_CONNECT = 2; QPID_BROKER_EXTERN static const uint32_t METHOD_QUEUEMOVEMESSAGES = 3; QPID_BROKER_EXTERN static const uint32_t METHOD_SETLOGLEVEL = 4; QPID_BROKER_EXTERN static const uint32_t METHOD_GETLOGLEVEL = 5; QPID_BROKER_EXTERN static const uint32_t METHOD_GETTIMESTAMPCONFIG = 6; QPID_BROKER_EXTERN static const uint32_t METHOD_SETTIMESTAMPCONFIG = 7; QPID_BROKER_EXTERN static const uint32_t METHOD_CREATE = 8; QPID_BROKER_EXTERN static const uint32_t METHOD_DELETE = 9; QPID_BROKER_EXTERN static const uint32_t METHOD_QUERY = 10; // Accessor Methods inline void set_systemRef (const ::qpid::management::ObjectId& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); systemRef = val; configChanged = true; } inline const ::qpid::management::ObjectId& get_systemRef() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return systemRef; } inline void set_port (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); port = val; configChanged = true; } inline uint16_t get_port() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return port; } inline void set_workerThreads (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); workerThreads = val; configChanged = true; } inline uint16_t get_workerThreads() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return workerThreads; } inline void set_maxConns (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); maxConns = val; configChanged = true; } inline uint16_t get_maxConns() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return maxConns; } inline void set_connBacklog (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); connBacklog = val; configChanged = true; } inline uint16_t get_connBacklog() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return connBacklog; } inline void set_stagingThreshold (uint32_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); stagingThreshold = val; configChanged = true; } inline uint32_t get_stagingThreshold() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return stagingThreshold; } inline void set_mgmtPublish (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); mgmtPublish = val; configChanged = true; } inline bool get_mgmtPublish() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return mgmtPublish; } inline void set_mgmtPubInterval (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); mgmtPubInterval = val; configChanged = true; } inline uint16_t get_mgmtPubInterval() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return mgmtPubInterval; } inline void set_version (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); version = val; configChanged = true; } inline const std::string& get_version() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return version; } inline void set_dataDir (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); dataDir = val; presenceMask[presenceByte_dataDir] |= presenceMask_dataDir; configChanged = true; } inline const std::string& get_dataDir() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return dataDir; } inline void clr_dataDir() { presenceMask[presenceByte_dataDir] &= ~presenceMask_dataDir; configChanged = true; } inline bool isSet_dataDir() { return (presenceMask[presenceByte_dataDir] & presenceMask_dataDir) != 0; } inline void set_uptime (uint64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); uptime = val; instChanged = true; } inline uint64_t get_uptime() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return uptime; } inline void inc_queueCount (uint64_t by = 1) { getThreadStats()->queueCount += by; instChanged = true; } inline void dec_queueCount (uint64_t by = 1) { getThreadStats()->queueCount -= by; instChanged = true; } inline void inc_msgTotalEnqueues (uint64_t by = 1) { getThreadStats()->msgTotalEnqueues += by; instChanged = true; } inline void dec_msgTotalEnqueues (uint64_t by = 1) { getThreadStats()->msgTotalEnqueues -= by; instChanged = true; } inline void inc_msgTotalDequeues (uint64_t by = 1) { getThreadStats()->msgTotalDequeues += by; instChanged = true; } inline void dec_msgTotalDequeues (uint64_t by = 1) { getThreadStats()->msgTotalDequeues -= by; instChanged = true; } inline void inc_byteTotalEnqueues (uint64_t by = 1) { getThreadStats()->byteTotalEnqueues += by; instChanged = true; } inline void dec_byteTotalEnqueues (uint64_t by = 1) { getThreadStats()->byteTotalEnqueues -= by; instChanged = true; } inline void inc_byteTotalDequeues (uint64_t by = 1) { getThreadStats()->byteTotalDequeues += by; instChanged = true; } inline void dec_byteTotalDequeues (uint64_t by = 1) { getThreadStats()->byteTotalDequeues -= by; instChanged = true; } inline void inc_msgPersistEnqueues (uint64_t by = 1) { getThreadStats()->msgPersistEnqueues += by; instChanged = true; } inline void dec_msgPersistEnqueues (uint64_t by = 1) { getThreadStats()->msgPersistEnqueues -= by; instChanged = true; } inline void inc_msgPersistDequeues (uint64_t by = 1) { getThreadStats()->msgPersistDequeues += by; instChanged = true; } inline void dec_msgPersistDequeues (uint64_t by = 1) { getThreadStats()->msgPersistDequeues -= by; instChanged = true; } inline void inc_bytePersistEnqueues (uint64_t by = 1) { getThreadStats()->bytePersistEnqueues += by; instChanged = true; } inline void dec_bytePersistEnqueues (uint64_t by = 1) { getThreadStats()->bytePersistEnqueues -= by; instChanged = true; } inline void inc_bytePersistDequeues (uint64_t by = 1) { getThreadStats()->bytePersistDequeues += by; instChanged = true; } inline void dec_bytePersistDequeues (uint64_t by = 1) { getThreadStats()->bytePersistDequeues -= by; instChanged = true; } inline void inc_msgTxnEnqueues (uint64_t by = 1) { getThreadStats()->msgTxnEnqueues += by; instChanged = true; } inline void dec_msgTxnEnqueues (uint64_t by = 1) { getThreadStats()->msgTxnEnqueues -= by; instChanged = true; } inline void inc_msgTxnDequeues (uint64_t by = 1) { getThreadStats()->msgTxnDequeues += by; instChanged = true; } inline void dec_msgTxnDequeues (uint64_t by = 1) { getThreadStats()->msgTxnDequeues -= by; instChanged = true; } inline void inc_byteTxnEnqueues (uint64_t by = 1) { getThreadStats()->byteTxnEnqueues += by; instChanged = true; } inline void dec_byteTxnEnqueues (uint64_t by = 1) { getThreadStats()->byteTxnEnqueues -= by; instChanged = true; } inline void inc_byteTxnDequeues (uint64_t by = 1) { getThreadStats()->byteTxnDequeues += by; instChanged = true; } inline void dec_byteTxnDequeues (uint64_t by = 1) { getThreadStats()->byteTxnDequeues -= by; instChanged = true; } inline void inc_msgFtdEnqueues (uint64_t by = 1) { getThreadStats()->msgFtdEnqueues += by; instChanged = true; } inline void dec_msgFtdEnqueues (uint64_t by = 1) { getThreadStats()->msgFtdEnqueues -= by; instChanged = true; } inline void inc_msgFtdDequeues (uint64_t by = 1) { getThreadStats()->msgFtdDequeues += by; instChanged = true; } inline void dec_msgFtdDequeues (uint64_t by = 1) { getThreadStats()->msgFtdDequeues -= by; instChanged = true; } inline void inc_byteFtdEnqueues (uint64_t by = 1) { getThreadStats()->byteFtdEnqueues += by; instChanged = true; } inline void dec_byteFtdEnqueues (uint64_t by = 1) { getThreadStats()->byteFtdEnqueues -= by; instChanged = true; } inline void inc_byteFtdDequeues (uint64_t by = 1) { getThreadStats()->byteFtdDequeues += by; instChanged = true; } inline void dec_byteFtdDequeues (uint64_t by = 1) { getThreadStats()->byteFtdDequeues -= by; instChanged = true; } inline void inc_releases (uint64_t by = 1) { getThreadStats()->releases += by; instChanged = true; } inline void dec_releases (uint64_t by = 1) { getThreadStats()->releases -= by; instChanged = true; } inline void inc_acquires (uint64_t by = 1) { getThreadStats()->acquires += by; instChanged = true; } inline void dec_acquires (uint64_t by = 1) { getThreadStats()->acquires -= by; instChanged = true; } inline void inc_discardsNoRoute (uint64_t by = 1) { getThreadStats()->discardsNoRoute += by; instChanged = true; } inline void dec_discardsNoRoute (uint64_t by = 1) { getThreadStats()->discardsNoRoute -= by; instChanged = true; } inline void inc_discardsTtl (uint64_t by = 1) { getThreadStats()->discardsTtl += by; instChanged = true; } inline void dec_discardsTtl (uint64_t by = 1) { getThreadStats()->discardsTtl -= by; instChanged = true; } inline void inc_discardsRing (uint64_t by = 1) { getThreadStats()->discardsRing += by; instChanged = true; } inline void dec_discardsRing (uint64_t by = 1) { getThreadStats()->discardsRing -= by; instChanged = true; } inline void inc_discardsLvq (uint64_t by = 1) { getThreadStats()->discardsLvq += by; instChanged = true; } inline void dec_discardsLvq (uint64_t by = 1) { getThreadStats()->discardsLvq -= by; instChanged = true; } inline void inc_discardsOverflow (uint64_t by = 1) { getThreadStats()->discardsOverflow += by; instChanged = true; } inline void dec_discardsOverflow (uint64_t by = 1) { getThreadStats()->discardsOverflow -= by; instChanged = true; } inline void inc_discardsSubscriber (uint64_t by = 1) { getThreadStats()->discardsSubscriber += by; instChanged = true; } inline void dec_discardsSubscriber (uint64_t by = 1) { getThreadStats()->discardsSubscriber -= by; instChanged = true; } inline void inc_discardsPurge (uint64_t by = 1) { getThreadStats()->discardsPurge += by; instChanged = true; } inline void dec_discardsPurge (uint64_t by = 1) { getThreadStats()->discardsPurge -= by; instChanged = true; } inline void inc_reroutes (uint64_t by = 1) { getThreadStats()->reroutes += by; instChanged = true; } inline void dec_reroutes (uint64_t by = 1) { getThreadStats()->reroutes -= by; instChanged = true; } inline void inc_abandoned (uint64_t by = 1) { getThreadStats()->abandoned += by; instChanged = true; } inline void dec_abandoned (uint64_t by = 1) { getThreadStats()->abandoned -= by; instChanged = true; } inline void inc_abandonedViaAlt (uint64_t by = 1) { getThreadStats()->abandonedViaAlt += by; instChanged = true; } inline void dec_abandonedViaAlt (uint64_t by = 1) { getThreadStats()->abandonedViaAlt -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}} #endif /*!_MANAGEMENT_BROKER_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventBind.cpp0000664000076400007640000001120511752725673023337 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventBind.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventBind::packageName = string ("org.apache.qpid.broker"); string EventBind::eventName = string ("bind"); uint8_t EventBind::md5Sum[16] = {0x4,0x2a,0xf4,0x9f,0xee,0xa7,0x5c,0xd1,0xa,0xc1,0x10,0xb0,0xe0,0x57,0x3c,0xab}; EventBind::EventBind (const std::string& _rhost, const std::string& _user, const std::string& _exName, const std::string& _qName, const std::string& _key, const ::qpid::types::Variant::Map& _args) : rhost(_rhost), user(_user), exName(_exName), qName(_qName), key(_key), args(_args) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventBind::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventBind::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (6); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); ft.clear(); ft[NAME] = "exName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of an exchange"; buf.putMap(ft); ft.clear(); ft[NAME] = "qName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of a queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "key"; ft[TYPE] = TYPE_LSTR; ft[DESC] = "Key text used for routing or binding"; buf.putMap(ft); ft.clear(); ft[NAME] = "args"; ft[TYPE] = TYPE_FTABLE; ft[DESC] = "Supplemental arguments or parameters supplied"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventBind::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); buf.putShortString(exName); buf.putShortString(qName); buf.putMediumString(key); buf.putMap(args); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventBind::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); map["exName"] = ::qpid::types::Variant(exName); map["qName"] = ::qpid::types::Variant(qName); map["key"] = ::qpid::types::Variant(key); map["args"] = ::qpid::types::Variant(args); } bool EventBind::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/Binding.h0000664000076400007640000001255211752725673022506 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_BINDING_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_BINDING_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Binding : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; uint8_t presenceMask[1]; static const uint8_t presenceByte_origin = 0; static const uint8_t presenceMask_origin = 1; // Properties ::qpid::management::ObjectId exchangeRef; ::qpid::management::ObjectId queueRef; std::string bindingKey; ::qpid::types::Variant::Map arguments; std::string origin; // Statistics // Per-Thread Statistics public: struct PerThreadStats { uint64_t msgMatched; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->msgMatched = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Binding( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const ::qpid::management::ObjectId& _queueRef, const std::string& _bindingKey, const ::qpid::types::Variant::Map& _arguments); QPID_BROKER_EXTERN ~Binding(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs // Accessor Methods inline void set_origin (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); origin = val; presenceMask[presenceByte_origin] |= presenceMask_origin; configChanged = true; } inline const std::string& get_origin() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return origin; } inline void clr_origin() { presenceMask[presenceByte_origin] &= ~presenceMask_origin; configChanged = true; } inline bool isSet_origin() { return (presenceMask[presenceByte_origin] & presenceMask_origin) != 0; } inline void inc_msgMatched (uint64_t by = 1) { getThreadStats()->msgMatched += by; instChanged = true; } inline void dec_msgMatched (uint64_t by = 1) { getThreadStats()->msgMatched -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}} #endif /*!_MANAGEMENT_BINDING_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.h0000664000076400007640000000452611752725673026530 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_QUEUETHRESHOLDEXCEEDED_ #define _MANAGEMENT_QUEUETHRESHOLDEXCEEDED_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventQueueThresholdExceeded : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& qName; const uint64_t msgDepth; const uint64_t byteDepth; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventQueueThresholdExceeded(const std::string& _qName, const uint64_t _msgDepth, const uint64_t _byteDepth); QPID_BROKER_EXTERN ~EventQueueThresholdExceeded() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 4; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_QUEUETHRESHOLDEXCEEDED_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventBrokerLinkDown.cpp0000664000076400007640000000671211752725673025364 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventBrokerLinkDown.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventBrokerLinkDown::packageName = string ("org.apache.qpid.broker"); string EventBrokerLinkDown::eventName = string ("brokerLinkDown"); uint8_t EventBrokerLinkDown::md5Sum[16] = {0x28,0x36,0xca,0x18,0xfb,0xce,0xc0,0xce,0xee,0x58,0xb0,0xab,0xc6,0xb7,0xf2,0xd4}; EventBrokerLinkDown::EventBrokerLinkDown (const std::string& _rhost) : rhost(_rhost) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventBrokerLinkDown::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventBrokerLinkDown::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (1); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventBrokerLinkDown::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventBrokerLinkDown::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); } bool EventBrokerLinkDown::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/Memory.cpp0000664000076400007640000003443311752725673022741 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Memory.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Memory::packageName = string ("org.apache.qpid.broker"); string Memory::className = string ("memory"); uint8_t Memory::md5Sum[MD5_LEN] = {0x4c,0x4b,0xf,0x36,0x8,0xca,0xdf,0xd5,0xf3,0x1,0x90,0x39,0x36,0x59,0x86,0x68}; Memory::Memory (ManagementAgent*, Manageable* _core, const std::string& _name) : ManagementObject(_core),name(_name) { malloc_arena = 0; malloc_ordblks = 0; malloc_hblks = 0; malloc_hblkhd = 0; malloc_uordblks = 0; malloc_fordblks = 0; malloc_keepcost = 0; // Optional properties start out not-present for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = 0; } Memory::~Memory () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Memory::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Memory::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (8); // Config Element Count buf.putShort (0); // Inst Element Count buf.putShort (0); // Method Count // Properties ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; ft[DESC] = "Index for the broker at this agent"; buf.putMap(ft); ft.clear(); ft[NAME] = "malloc_arena"; ft[TYPE] = TYPE_U64; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "Total size of memory allocated with `sbrk' by `malloc', in bytes"; buf.putMap(ft); ft.clear(); ft[NAME] = "malloc_ordblks"; ft[TYPE] = TYPE_U64; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "The number of chunks not in use"; buf.putMap(ft); ft.clear(); ft[NAME] = "malloc_hblks"; ft[TYPE] = TYPE_U64; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "Total number of chunks allocated with `mmap'"; buf.putMap(ft); ft.clear(); ft[NAME] = "malloc_hblkhd"; ft[TYPE] = TYPE_U64; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "Total size of memory allocated with `mmap', in bytes"; buf.putMap(ft); ft.clear(); ft[NAME] = "malloc_uordblks"; ft[TYPE] = TYPE_U64; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "Total size of memory occupied by chunks handed out by `malloc'"; buf.putMap(ft); ft.clear(); ft[NAME] = "malloc_fordblks"; ft[TYPE] = TYPE_U64; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "Total size of memory occupied by free (not in use) chunks"; buf.putMap(ft); ft.clear(); ft[NAME] = "malloc_keepcost"; ft[TYPE] = TYPE_U64; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[DESC] = "The size of the top-most releasable chunk that normally borders the end of the heap"; buf.putMap(ft); // Statistics // Methods { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t Memory::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 1; size += (1 + name.length()); // name if (presenceMask[presenceByte_malloc_arena] & presenceMask_malloc_arena) { size += 8; // malloc_arena } if (presenceMask[presenceByte_malloc_ordblks] & presenceMask_malloc_ordblks) { size += 8; // malloc_ordblks } if (presenceMask[presenceByte_malloc_hblks] & presenceMask_malloc_hblks) { size += 8; // malloc_hblks } if (presenceMask[presenceByte_malloc_hblkhd] & presenceMask_malloc_hblkhd) { size += 8; // malloc_hblkhd } if (presenceMask[presenceByte_malloc_uordblks] & presenceMask_malloc_uordblks) { size += 8; // malloc_uordblks } if (presenceMask[presenceByte_malloc_fordblks] & presenceMask_malloc_fordblks) { size += 8; // malloc_fordblks } if (presenceMask[presenceByte_malloc_keepcost] & presenceMask_malloc_keepcost) { size += 8; // malloc_keepcost } return size; } void Memory::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = buf.getOctet(); buf.getShortString(name); if (presenceMask[presenceByte_malloc_arena] & presenceMask_malloc_arena) { malloc_arena = buf.getLongLong(); } if (presenceMask[presenceByte_malloc_ordblks] & presenceMask_malloc_ordblks) { malloc_ordblks = buf.getLongLong(); } if (presenceMask[presenceByte_malloc_hblks] & presenceMask_malloc_hblks) { malloc_hblks = buf.getLongLong(); } if (presenceMask[presenceByte_malloc_hblkhd] & presenceMask_malloc_hblkhd) { malloc_hblkhd = buf.getLongLong(); } if (presenceMask[presenceByte_malloc_uordblks] & presenceMask_malloc_uordblks) { malloc_uordblks = buf.getLongLong(); } if (presenceMask[presenceByte_malloc_fordblks] & presenceMask_malloc_fordblks) { malloc_fordblks = buf.getLongLong(); } if (presenceMask[presenceByte_malloc_keepcost] & presenceMask_malloc_keepcost) { malloc_keepcost = buf.getLongLong(); } delete [] _tmpBuf; } void Memory::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) buf.putOctet(presenceMask[idx]); buf.putShortString(name); if (presenceMask[presenceByte_malloc_arena] & presenceMask_malloc_arena) { buf.putLongLong(malloc_arena); } if (presenceMask[presenceByte_malloc_ordblks] & presenceMask_malloc_ordblks) { buf.putLongLong(malloc_ordblks); } if (presenceMask[presenceByte_malloc_hblks] & presenceMask_malloc_hblks) { buf.putLongLong(malloc_hblks); } if (presenceMask[presenceByte_malloc_hblkhd] & presenceMask_malloc_hblkhd) { buf.putLongLong(malloc_hblkhd); } if (presenceMask[presenceByte_malloc_uordblks] & presenceMask_malloc_uordblks) { buf.putLongLong(malloc_uordblks); } if (presenceMask[presenceByte_malloc_fordblks] & presenceMask_malloc_fordblks) { buf.putLongLong(malloc_fordblks); } if (presenceMask[presenceByte_malloc_keepcost] & presenceMask_malloc_keepcost) { buf.putLongLong(malloc_keepcost); } uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Memory::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Memory::doMethod (string&, const string&, string& outStr, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Memory::getKey() const { std::stringstream key; key << name; return key.str(); } void Memory::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["name"] = ::qpid::types::Variant(name); if (presenceMask[presenceByte_malloc_arena] & presenceMask_malloc_arena) { _map["malloc_arena"] = ::qpid::types::Variant(malloc_arena); } if (presenceMask[presenceByte_malloc_ordblks] & presenceMask_malloc_ordblks) { _map["malloc_ordblks"] = ::qpid::types::Variant(malloc_ordblks); } if (presenceMask[presenceByte_malloc_hblks] & presenceMask_malloc_hblks) { _map["malloc_hblks"] = ::qpid::types::Variant(malloc_hblks); } if (presenceMask[presenceByte_malloc_hblkhd] & presenceMask_malloc_hblkhd) { _map["malloc_hblkhd"] = ::qpid::types::Variant(malloc_hblkhd); } if (presenceMask[presenceByte_malloc_uordblks] & presenceMask_malloc_uordblks) { _map["malloc_uordblks"] = ::qpid::types::Variant(malloc_uordblks); } if (presenceMask[presenceByte_malloc_fordblks] & presenceMask_malloc_fordblks) { _map["malloc_fordblks"] = ::qpid::types::Variant(malloc_fordblks); } if (presenceMask[presenceByte_malloc_keepcost] & presenceMask_malloc_keepcost) { _map["malloc_keepcost"] = ::qpid::types::Variant(malloc_keepcost); } } if (includeStatistics) { instChanged = false; // Maintenance of hi-lo statistics } } void Memory::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); bool _found; if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } _found = false; if ((_i = _map.find("malloc_arena")) != _map.end()) { malloc_arena = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_malloc_arena] |= presenceMask_malloc_arena; } _found = false; if ((_i = _map.find("malloc_ordblks")) != _map.end()) { malloc_ordblks = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_malloc_ordblks] |= presenceMask_malloc_ordblks; } _found = false; if ((_i = _map.find("malloc_hblks")) != _map.end()) { malloc_hblks = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_malloc_hblks] |= presenceMask_malloc_hblks; } _found = false; if ((_i = _map.find("malloc_hblkhd")) != _map.end()) { malloc_hblkhd = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_malloc_hblkhd] |= presenceMask_malloc_hblkhd; } _found = false; if ((_i = _map.find("malloc_uordblks")) != _map.end()) { malloc_uordblks = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_malloc_uordblks] |= presenceMask_malloc_uordblks; } _found = false; if ((_i = _map.find("malloc_fordblks")) != _map.end()) { malloc_fordblks = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_malloc_fordblks] |= presenceMask_malloc_fordblks; } _found = false; if ((_i = _map.find("malloc_keepcost")) != _map.end()) { malloc_keepcost = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_malloc_keepcost] |= presenceMask_malloc_keepcost; } } void Memory::doMethod (string&, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/Vhost.cpp0000664000076400007640000001733711752725673022600 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Vhost.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Vhost::packageName = string ("org.apache.qpid.broker"); string Vhost::className = string ("vhost"); uint8_t Vhost::md5Sum[MD5_LEN] = {0x14,0xa3,0xfa,0x67,0x8a,0xe2,0x89,0x88,0xcd,0x94,0x40,0xef,0x63,0xd,0x1b,0x49}; Vhost::Vhost (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const std::string& _name) : ManagementObject(_core),name(_name) { brokerRef = _parent->GetManagementObject ()->getObjectId (); federationTag = ""; } Vhost::~Vhost () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Vhost::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Vhost::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (3); // Config Element Count buf.putShort (0); // Inst Element Count buf.putShort (0); // Method Count // Properties ft.clear(); ft[NAME] = "brokerRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "federationTag"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); // Statistics // Methods { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t Vhost::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 16; // brokerRef size += (1 + name.length()); // name size += (1 + federationTag.length()); // federationTag return size; } void Vhost::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } {std::string _s; buf.getRawData(_s, brokerRef.encodedSize()); brokerRef.decode(_s);}; buf.getShortString(name); buf.getShortString(federationTag); delete [] _tmpBuf; } void Vhost::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } {std::string _s; brokerRef.encode(_s); buf.putRawData(_s);}; buf.putShortString(name); buf.putShortString(federationTag); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Vhost::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Vhost::doMethod (string&, const string&, string& outStr, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Vhost::getKey() const { std::stringstream key; key << brokerRef.getV2Key() << ","; key << name; return key.str(); } void Vhost::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["brokerRef"] = ::qpid::types::Variant(brokerRef); _map["name"] = ::qpid::types::Variant(name); _map["federationTag"] = ::qpid::types::Variant(federationTag); } if (includeStatistics) { instChanged = false; // Maintenance of hi-lo statistics } } void Vhost::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("brokerRef")) != _map.end()) { brokerRef = _i->second; } if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } if ((_i = _map.find("federationTag")) != _map.end()) { federationTag = (_i->second).getString(); } } void Vhost::doMethod (string&, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerEcho.h0000664000076400007640000000234111752725673023767 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERECHO_ #define _ARGS_BROKERECHO_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerEcho : public ::qpid::management::Args { public: uint32_t io_sequence; std::string io_body; }; }}}}} #endif /*!_ARGS_BROKERECHO_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventQueueDelete.cpp0000664000076400007640000000764711752725673024711 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventQueueDelete.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventQueueDelete::packageName = string ("org.apache.qpid.broker"); string EventQueueDelete::eventName = string ("queueDelete"); uint8_t EventQueueDelete::md5Sum[16] = {0xfb,0x1c,0xe7,0x12,0xc0,0x41,0xd7,0x74,0x10,0x2d,0x32,0xd7,0x16,0x66,0x57,0x4b}; EventQueueDelete::EventQueueDelete (const std::string& _rhost, const std::string& _user, const std::string& _qName) : rhost(_rhost), user(_user), qName(_qName) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventQueueDelete::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventQueueDelete::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (3); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); ft.clear(); ft[NAME] = "qName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of a queue"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventQueueDelete::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); buf.putShortString(qName); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventQueueDelete::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); map["qName"] = ::qpid::types::Variant(qName); } bool EventQueueDelete::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventQueueDeclare.cpp0000664000076400007640000001320711752725673025033 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventQueueDeclare.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventQueueDeclare::packageName = string ("org.apache.qpid.broker"); string EventQueueDeclare::eventName = string ("queueDeclare"); uint8_t EventQueueDeclare::md5Sum[16] = {0x81,0xc1,0x4a,0x6d,0x4e,0x35,0xa,0x72,0x44,0xdb,0x7f,0x8a,0x9,0xd0,0x64,0x6e}; EventQueueDeclare::EventQueueDeclare (const std::string& _rhost, const std::string& _user, const std::string& _qName, const bool _durable, const bool _excl, const bool _autoDel, const std::string& _altEx, const ::qpid::types::Variant::Map& _args, const std::string& _disp) : rhost(_rhost), user(_user), qName(_qName), durable(_durable), excl(_excl), autoDel(_autoDel), altEx(_altEx), args(_args), disp(_disp) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventQueueDeclare::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventQueueDeclare::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (9); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); ft.clear(); ft[NAME] = "qName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of a queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "durable"; ft[TYPE] = TYPE_BOOL; ft[DESC] = "Created object is durable"; buf.putMap(ft); ft.clear(); ft[NAME] = "excl"; ft[TYPE] = TYPE_BOOL; ft[DESC] = "Created object is exclusive for the use of the owner only"; buf.putMap(ft); ft.clear(); ft[NAME] = "autoDel"; ft[TYPE] = TYPE_BOOL; ft[DESC] = "Created object is automatically deleted when no longer in use"; buf.putMap(ft); ft.clear(); ft[NAME] = "altEx"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of the alternate exchange"; buf.putMap(ft); ft.clear(); ft[NAME] = "args"; ft[TYPE] = TYPE_FTABLE; ft[DESC] = "Supplemental arguments or parameters supplied"; buf.putMap(ft); ft.clear(); ft[NAME] = "disp"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Disposition of a declaration: 'created' if object was created, 'existing' if object already existed"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventQueueDeclare::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); buf.putShortString(qName); buf.putOctet(durable?1:0); buf.putOctet(excl?1:0); buf.putOctet(autoDel?1:0); buf.putShortString(altEx); buf.putMap(args); buf.putShortString(disp); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventQueueDeclare::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); map["qName"] = ::qpid::types::Variant(qName); map["durable"] = ::qpid::types::Variant(durable); map["excl"] = ::qpid::types::Variant(excl); map["autoDel"] = ::qpid::types::Variant(autoDel); map["altEx"] = ::qpid::types::Variant(altEx); map["args"] = ::qpid::types::Variant(args); map["disp"] = ::qpid::types::Variant(disp); } bool EventQueueDeclare::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventClientDisconnect.cpp0000664000076400007640000000734111752725673025721 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventClientDisconnect.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventClientDisconnect::packageName = string ("org.apache.qpid.broker"); string EventClientDisconnect::eventName = string ("clientDisconnect"); uint8_t EventClientDisconnect::md5Sum[16] = {0x1e,0x86,0x65,0xcf,0xf2,0x41,0x5,0xdf,0x78,0x63,0xc,0x44,0xc0,0xbb,0x33,0xc6}; EventClientDisconnect::EventClientDisconnect (const std::string& _rhost, const std::string& _user) : rhost(_rhost), user(_user) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventClientDisconnect::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventClientDisconnect::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (2); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventClientDisconnect::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventClientDisconnect::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); } bool EventClientDisconnect::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/Connection.h0000664000076400007640000002624611752725673023240 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_CONNECTION_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_CONNECTION_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Connection : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; uint8_t presenceMask[1]; static const uint8_t presenceByte_remoteProcessName = 0; static const uint8_t presenceMask_remoteProcessName = 1; static const uint8_t presenceByte_remotePid = 0; static const uint8_t presenceMask_remotePid = 2; static const uint8_t presenceByte_remoteParentPid = 0; static const uint8_t presenceMask_remoteParentPid = 4; // Properties ::qpid::management::ObjectId vhostRef; std::string address; bool incoming; bool SystemConnection; bool userProxyAuth; bool federationLink; std::string authIdentity; std::string remoteProcessName; uint32_t remotePid; uint32_t remoteParentPid; bool shadow; std::string saslMechanism; uint16_t saslSsf; // Statistics bool closing; // Per-Thread Statistics public: struct PerThreadStats { uint64_t framesFromClient; uint64_t framesToClient; uint64_t bytesFromClient; uint64_t bytesToClient; uint64_t msgsFromClient; uint64_t msgsToClient; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->framesFromClient = 0; threadStats->framesToClient = 0; threadStats->bytesFromClient = 0; threadStats->bytesToClient = 0; threadStats->msgsFromClient = 0; threadStats->msgsToClient = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Connection( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const std::string& _address, bool _incoming, bool _SystemConnection); QPID_BROKER_EXTERN ~Connection(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_CLOSE = 1; // Accessor Methods inline void set_userProxyAuth (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); userProxyAuth = val; configChanged = true; } inline bool get_userProxyAuth() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return userProxyAuth; } inline void set_federationLink (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); federationLink = val; configChanged = true; } inline bool get_federationLink() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return federationLink; } inline void set_authIdentity (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); authIdentity = val; configChanged = true; } inline const std::string& get_authIdentity() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return authIdentity; } inline void set_remoteProcessName (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); remoteProcessName = val; presenceMask[presenceByte_remoteProcessName] |= presenceMask_remoteProcessName; configChanged = true; } inline const std::string& get_remoteProcessName() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return remoteProcessName; } inline void clr_remoteProcessName() { presenceMask[presenceByte_remoteProcessName] &= ~presenceMask_remoteProcessName; configChanged = true; } inline bool isSet_remoteProcessName() { return (presenceMask[presenceByte_remoteProcessName] & presenceMask_remoteProcessName) != 0; } inline void set_remotePid (uint32_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); remotePid = val; presenceMask[presenceByte_remotePid] |= presenceMask_remotePid; configChanged = true; } inline uint32_t get_remotePid() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return remotePid; } inline void clr_remotePid() { presenceMask[presenceByte_remotePid] &= ~presenceMask_remotePid; configChanged = true; } inline bool isSet_remotePid() { return (presenceMask[presenceByte_remotePid] & presenceMask_remotePid) != 0; } inline void set_remoteParentPid (uint32_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); remoteParentPid = val; presenceMask[presenceByte_remoteParentPid] |= presenceMask_remoteParentPid; configChanged = true; } inline uint32_t get_remoteParentPid() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return remoteParentPid; } inline void clr_remoteParentPid() { presenceMask[presenceByte_remoteParentPid] &= ~presenceMask_remoteParentPid; configChanged = true; } inline bool isSet_remoteParentPid() { return (presenceMask[presenceByte_remoteParentPid] & presenceMask_remoteParentPid) != 0; } inline void set_shadow (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); shadow = val; configChanged = true; } inline bool get_shadow() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return shadow; } inline void set_saslMechanism (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); saslMechanism = val; configChanged = true; } inline const std::string& get_saslMechanism() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return saslMechanism; } inline void set_saslSsf (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); saslSsf = val; configChanged = true; } inline uint16_t get_saslSsf() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return saslSsf; } inline void set_closing (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); closing = val; instChanged = true; } inline bool get_closing() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return closing; } inline void inc_framesFromClient (uint64_t by = 1) { getThreadStats()->framesFromClient += by; instChanged = true; } inline void dec_framesFromClient (uint64_t by = 1) { getThreadStats()->framesFromClient -= by; instChanged = true; } inline void inc_framesToClient (uint64_t by = 1) { getThreadStats()->framesToClient += by; instChanged = true; } inline void dec_framesToClient (uint64_t by = 1) { getThreadStats()->framesToClient -= by; instChanged = true; } inline void inc_bytesFromClient (uint64_t by = 1) { getThreadStats()->bytesFromClient += by; instChanged = true; } inline void dec_bytesFromClient (uint64_t by = 1) { getThreadStats()->bytesFromClient -= by; instChanged = true; } inline void inc_bytesToClient (uint64_t by = 1) { getThreadStats()->bytesToClient += by; instChanged = true; } inline void dec_bytesToClient (uint64_t by = 1) { getThreadStats()->bytesToClient -= by; instChanged = true; } inline void inc_msgsFromClient (uint64_t by = 1) { getThreadStats()->msgsFromClient += by; instChanged = true; } inline void dec_msgsFromClient (uint64_t by = 1) { getThreadStats()->msgsFromClient -= by; instChanged = true; } inline void inc_msgsToClient (uint64_t by = 1) { getThreadStats()->msgsToClient += by; instChanged = true; } inline void dec_msgsToClient (uint64_t by = 1) { getThreadStats()->msgsToClient -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}} #endif /*!_MANAGEMENT_CONNECTION_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventSubscribe.h0000664000076400007640000000472511752725673024062 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_SUBSCRIBE_ #define _MANAGEMENT_SUBSCRIBE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventSubscribe : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; const std::string& qName; const std::string& dest; const bool excl; const ::qpid::types::Variant::Map& args; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventSubscribe(const std::string& _rhost, const std::string& _user, const std::string& _qName, const std::string& _dest, const bool _excl, const ::qpid::types::Variant::Map& _args); QPID_BROKER_EXTERN ~EventSubscribe() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_SUBSCRIBE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Queue.h0000664000076400007640000004366711752725673022233 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_QUEUE_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_QUEUE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Queue : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; uint8_t presenceMask[1]; static const uint8_t presenceByte_altExchange = 0; static const uint8_t presenceMask_altExchange = 1; // Properties ::qpid::management::ObjectId vhostRef; std::string name; bool durable; bool autoDelete; bool exclusive; ::qpid::types::Variant::Map arguments; ::qpid::management::ObjectId altExchange; // Statistics uint32_t consumerCount; uint32_t consumerCountHigh; uint32_t consumerCountLow; uint32_t bindingCount; uint32_t bindingCountHigh; uint32_t bindingCountLow; uint32_t unackedMessages; uint32_t unackedMessagesHigh; uint32_t unackedMessagesLow; bool flowStopped; // Per-Thread Statistics public: struct PerThreadStats { uint64_t msgTotalEnqueues; uint64_t msgTotalDequeues; uint64_t msgTxnEnqueues; uint64_t msgTxnDequeues; uint64_t msgPersistEnqueues; uint64_t msgPersistDequeues; uint64_t msgDepth; uint64_t byteDepth; uint64_t byteTotalEnqueues; uint64_t byteTotalDequeues; uint64_t byteTxnEnqueues; uint64_t byteTxnDequeues; uint64_t bytePersistEnqueues; uint64_t bytePersistDequeues; uint64_t msgFtdEnqueues; uint64_t msgFtdDequeues; uint64_t byteFtdEnqueues; uint64_t byteFtdDequeues; uint64_t msgFtdDepth; uint64_t byteFtdDepth; uint64_t releases; uint64_t acquires; uint64_t discardsTtl; uint64_t discardsRing; uint64_t discardsLvq; uint64_t discardsOverflow; uint64_t discardsSubscriber; uint64_t discardsPurge; uint64_t reroutes; uint64_t messageLatencyCount; uint64_t messageLatencyTotal; uint64_t messageLatencyMin; uint64_t messageLatencyMax; uint32_t flowStoppedCount; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->msgTotalEnqueues = 0; threadStats->msgTotalDequeues = 0; threadStats->msgTxnEnqueues = 0; threadStats->msgTxnDequeues = 0; threadStats->msgPersistEnqueues = 0; threadStats->msgPersistDequeues = 0; threadStats->msgDepth = 0; threadStats->byteDepth = 0; threadStats->byteTotalEnqueues = 0; threadStats->byteTotalDequeues = 0; threadStats->byteTxnEnqueues = 0; threadStats->byteTxnDequeues = 0; threadStats->bytePersistEnqueues = 0; threadStats->bytePersistDequeues = 0; threadStats->msgFtdEnqueues = 0; threadStats->msgFtdDequeues = 0; threadStats->byteFtdEnqueues = 0; threadStats->byteFtdDequeues = 0; threadStats->msgFtdDepth = 0; threadStats->byteFtdDepth = 0; threadStats->releases = 0; threadStats->acquires = 0; threadStats->discardsTtl = 0; threadStats->discardsRing = 0; threadStats->discardsLvq = 0; threadStats->discardsOverflow = 0; threadStats->discardsSubscriber = 0; threadStats->discardsPurge = 0; threadStats->reroutes = 0; threadStats->messageLatencyCount = 0; threadStats->messageLatencyMin = std::numeric_limits::max(); threadStats->messageLatencyMax = std::numeric_limits::min(); threadStats->messageLatencyTotal = 0; threadStats->flowStoppedCount = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Queue( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const std::string& _name, bool _durable, bool _autoDelete, bool _exclusive); QPID_BROKER_EXTERN ~Queue(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_PURGE = 1; QPID_BROKER_EXTERN static const uint32_t METHOD_REROUTE = 2; // Accessor Methods inline void set_arguments (const ::qpid::types::Variant::Map& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); arguments = val; configChanged = true; } inline const ::qpid::types::Variant::Map& get_arguments() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return arguments; } inline void set_altExchange (const ::qpid::management::ObjectId& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); altExchange = val; presenceMask[presenceByte_altExchange] |= presenceMask_altExchange; configChanged = true; } inline const ::qpid::management::ObjectId& get_altExchange() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return altExchange; } inline void clr_altExchange() { presenceMask[presenceByte_altExchange] &= ~presenceMask_altExchange; configChanged = true; } inline bool isSet_altExchange() { return (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) != 0; } inline void inc_msgTotalEnqueues (uint64_t by = 1) { getThreadStats()->msgTotalEnqueues += by; instChanged = true; } inline void dec_msgTotalEnqueues (uint64_t by = 1) { getThreadStats()->msgTotalEnqueues -= by; instChanged = true; } inline void inc_msgTotalDequeues (uint64_t by = 1) { getThreadStats()->msgTotalDequeues += by; instChanged = true; } inline void dec_msgTotalDequeues (uint64_t by = 1) { getThreadStats()->msgTotalDequeues -= by; instChanged = true; } inline void inc_msgTxnEnqueues (uint64_t by = 1) { getThreadStats()->msgTxnEnqueues += by; instChanged = true; } inline void dec_msgTxnEnqueues (uint64_t by = 1) { getThreadStats()->msgTxnEnqueues -= by; instChanged = true; } inline void inc_msgTxnDequeues (uint64_t by = 1) { getThreadStats()->msgTxnDequeues += by; instChanged = true; } inline void dec_msgTxnDequeues (uint64_t by = 1) { getThreadStats()->msgTxnDequeues -= by; instChanged = true; } inline void inc_msgPersistEnqueues (uint64_t by = 1) { getThreadStats()->msgPersistEnqueues += by; instChanged = true; } inline void dec_msgPersistEnqueues (uint64_t by = 1) { getThreadStats()->msgPersistEnqueues -= by; instChanged = true; } inline void inc_msgPersistDequeues (uint64_t by = 1) { getThreadStats()->msgPersistDequeues += by; instChanged = true; } inline void dec_msgPersistDequeues (uint64_t by = 1) { getThreadStats()->msgPersistDequeues -= by; instChanged = true; } inline void inc_byteTotalEnqueues (uint64_t by = 1) { getThreadStats()->byteTotalEnqueues += by; instChanged = true; } inline void dec_byteTotalEnqueues (uint64_t by = 1) { getThreadStats()->byteTotalEnqueues -= by; instChanged = true; } inline void inc_byteTotalDequeues (uint64_t by = 1) { getThreadStats()->byteTotalDequeues += by; instChanged = true; } inline void dec_byteTotalDequeues (uint64_t by = 1) { getThreadStats()->byteTotalDequeues -= by; instChanged = true; } inline void inc_byteTxnEnqueues (uint64_t by = 1) { getThreadStats()->byteTxnEnqueues += by; instChanged = true; } inline void dec_byteTxnEnqueues (uint64_t by = 1) { getThreadStats()->byteTxnEnqueues -= by; instChanged = true; } inline void inc_byteTxnDequeues (uint64_t by = 1) { getThreadStats()->byteTxnDequeues += by; instChanged = true; } inline void dec_byteTxnDequeues (uint64_t by = 1) { getThreadStats()->byteTxnDequeues -= by; instChanged = true; } inline void inc_bytePersistEnqueues (uint64_t by = 1) { getThreadStats()->bytePersistEnqueues += by; instChanged = true; } inline void dec_bytePersistEnqueues (uint64_t by = 1) { getThreadStats()->bytePersistEnqueues -= by; instChanged = true; } inline void inc_bytePersistDequeues (uint64_t by = 1) { getThreadStats()->bytePersistDequeues += by; instChanged = true; } inline void dec_bytePersistDequeues (uint64_t by = 1) { getThreadStats()->bytePersistDequeues -= by; instChanged = true; } inline void inc_msgFtdEnqueues (uint64_t by = 1) { getThreadStats()->msgFtdEnqueues += by; instChanged = true; } inline void dec_msgFtdEnqueues (uint64_t by = 1) { getThreadStats()->msgFtdEnqueues -= by; instChanged = true; } inline void inc_msgFtdDequeues (uint64_t by = 1) { getThreadStats()->msgFtdDequeues += by; instChanged = true; } inline void dec_msgFtdDequeues (uint64_t by = 1) { getThreadStats()->msgFtdDequeues -= by; instChanged = true; } inline void inc_byteFtdEnqueues (uint64_t by = 1) { getThreadStats()->byteFtdEnqueues += by; instChanged = true; } inline void dec_byteFtdEnqueues (uint64_t by = 1) { getThreadStats()->byteFtdEnqueues -= by; instChanged = true; } inline void inc_byteFtdDequeues (uint64_t by = 1) { getThreadStats()->byteFtdDequeues += by; instChanged = true; } inline void dec_byteFtdDequeues (uint64_t by = 1) { getThreadStats()->byteFtdDequeues -= by; instChanged = true; } inline void inc_releases (uint64_t by = 1) { getThreadStats()->releases += by; instChanged = true; } inline void dec_releases (uint64_t by = 1) { getThreadStats()->releases -= by; instChanged = true; } inline void inc_acquires (uint64_t by = 1) { getThreadStats()->acquires += by; instChanged = true; } inline void dec_acquires (uint64_t by = 1) { getThreadStats()->acquires -= by; instChanged = true; } inline void inc_discardsTtl (uint64_t by = 1) { getThreadStats()->discardsTtl += by; instChanged = true; } inline void dec_discardsTtl (uint64_t by = 1) { getThreadStats()->discardsTtl -= by; instChanged = true; } inline void inc_discardsRing (uint64_t by = 1) { getThreadStats()->discardsRing += by; instChanged = true; } inline void dec_discardsRing (uint64_t by = 1) { getThreadStats()->discardsRing -= by; instChanged = true; } inline void inc_discardsLvq (uint64_t by = 1) { getThreadStats()->discardsLvq += by; instChanged = true; } inline void dec_discardsLvq (uint64_t by = 1) { getThreadStats()->discardsLvq -= by; instChanged = true; } inline void inc_discardsOverflow (uint64_t by = 1) { getThreadStats()->discardsOverflow += by; instChanged = true; } inline void dec_discardsOverflow (uint64_t by = 1) { getThreadStats()->discardsOverflow -= by; instChanged = true; } inline void inc_discardsSubscriber (uint64_t by = 1) { getThreadStats()->discardsSubscriber += by; instChanged = true; } inline void dec_discardsSubscriber (uint64_t by = 1) { getThreadStats()->discardsSubscriber -= by; instChanged = true; } inline void inc_discardsPurge (uint64_t by = 1) { getThreadStats()->discardsPurge += by; instChanged = true; } inline void dec_discardsPurge (uint64_t by = 1) { getThreadStats()->discardsPurge -= by; instChanged = true; } inline void inc_reroutes (uint64_t by = 1) { getThreadStats()->reroutes += by; instChanged = true; } inline void dec_reroutes (uint64_t by = 1) { getThreadStats()->reroutes -= by; instChanged = true; } inline void inc_consumerCount (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); consumerCount += by; if (consumerCountHigh < consumerCount) consumerCountHigh = consumerCount; instChanged = true; } inline void dec_consumerCount (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); consumerCount -= by; if (consumerCountLow > consumerCount) consumerCountLow = consumerCount; instChanged = true; } inline void inc_bindingCount (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); bindingCount += by; if (bindingCountHigh < bindingCount) bindingCountHigh = bindingCount; instChanged = true; } inline void dec_bindingCount (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); bindingCount -= by; if (bindingCountLow > bindingCount) bindingCountLow = bindingCount; instChanged = true; } inline void inc_unackedMessages (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); unackedMessages += by; if (unackedMessagesHigh < unackedMessages) unackedMessagesHigh = unackedMessages; instChanged = true; } inline void dec_unackedMessages (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); unackedMessages -= by; if (unackedMessagesLow > unackedMessages) unackedMessagesLow = unackedMessages; instChanged = true; } inline void set_messageLatency (uint64_t val) { getThreadStats()->messageLatencyCount++; getThreadStats()->messageLatencyTotal += val; if (getThreadStats()->messageLatencyMin > val) getThreadStats()->messageLatencyMin = val; if (getThreadStats()->messageLatencyMax < val) getThreadStats()->messageLatencyMax = val; instChanged = true; } inline void set_flowStopped (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); flowStopped = val; instChanged = true; } inline bool get_flowStopped() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return flowStopped; } inline void inc_flowStoppedCount (uint32_t by = 1) { getThreadStats()->flowStoppedCount += by; instChanged = true; } inline void dec_flowStoppedCount (uint32_t by = 1) { getThreadStats()->flowStoppedCount -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}} #endif /*!_MANAGEMENT_QUEUE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsQueueReroute.h0000664000076400007640000000245711752725673024406 0ustar00jrossjross00000000000000 #ifndef _ARGS_QUEUEREROUTE_ #define _ARGS_QUEUEREROUTE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsQueueReroute : public ::qpid::management::Args { public: uint32_t i_request; bool i_useAltExchange; std::string i_exchange; ::qpid::types::Variant::Map i_filter; }; }}}}} #endif /*!_ARGS_QUEUEREROUTE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsLinkBridge.h0000664000076400007640000000262211752725673023760 0ustar00jrossjross00000000000000 #ifndef _ARGS_LINKBRIDGE_ #define _ARGS_LINKBRIDGE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsLinkBridge : public ::qpid::management::Args { public: bool i_durable; std::string i_src; std::string i_dest; std::string i_key; std::string i_tag; std::string i_excludes; bool i_srcIsQueue; bool i_srcIsLocal; bool i_dynamic; uint16_t i_sync; }; }}}}} #endif /*!_ARGS_LINKBRIDGE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerQuery.h0000664000076400007640000000241511752725673024220 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERQUERY_ #define _ARGS_BROKERQUERY_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerQuery : public ::qpid::management::Args { public: std::string i_type; std::string i_name; ::qpid::types::Variant::Map o_results; }; }}}}} #endif /*!_ARGS_BROKERQUERY_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventClientConnect.h0000664000076400007640000000433711752725673024670 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_CLIENTCONNECT_ #define _MANAGEMENT_CLIENTCONNECT_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventClientConnect : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventClientConnect(const std::string& _rhost, const std::string& _user); QPID_BROKER_EXTERN ~EventClientConnect() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_CLIENTCONNECT_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Bridge.cpp0000664000076400007640000003117411752725673022664 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Bridge.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Bridge::packageName = string ("org.apache.qpid.broker"); string Bridge::className = string ("bridge"); uint8_t Bridge::md5Sum[MD5_LEN] = {0xa2,0x51,0xe2,0x3,0x3d,0x1a,0xc,0xed,0x6e,0x98,0x6e,0xd5,0x68,0x28,0xf4,0x7a}; Bridge::Bridge (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, uint16_t _channelId, bool _durable, const std::string& _src, const std::string& _dest, const std::string& _key, bool _srcIsQueue, bool _srcIsLocal, const std::string& _tag, const std::string& _excludes, bool _dynamic, uint16_t _sync) : ManagementObject(_core),channelId(_channelId),durable(_durable),src(_src),dest(_dest),key(_key),srcIsQueue(_srcIsQueue),srcIsLocal(_srcIsLocal),tag(_tag),excludes(_excludes),dynamic(_dynamic),sync(_sync) { linkRef = _parent->GetManagementObject ()->getObjectId (); } Bridge::~Bridge () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Bridge::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Bridge::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (12); // Config Element Count buf.putShort (0); // Inst Element Count buf.putShort (1); // Method Count // Properties ft.clear(); ft[NAME] = "linkRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "channelId"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "durable"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "src"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "dest"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "key"; ft[TYPE] = TYPE_LSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "srcIsQueue"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "srcIsLocal"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "tag"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "excludes"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "dynamic"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "sync"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); // Statistics // Methods ft.clear(); ft[NAME] = "close"; ft[ARGCOUNT] = 0; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t Bridge::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 16; // linkRef size += 2; // channelId size += 1; // durable size += (1 + src.length()); // src size += (1 + dest.length()); // dest size += (2 + key.length()); // key size += 1; // srcIsQueue size += 1; // srcIsLocal size += (1 + tag.length()); // tag size += (1 + excludes.length()); // excludes size += 1; // dynamic size += 2; // sync return size; } void Bridge::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } {std::string _s; buf.getRawData(_s, linkRef.encodedSize()); linkRef.decode(_s);}; channelId = buf.getShort(); durable = buf.getOctet()==1; buf.getShortString(src); buf.getShortString(dest); buf.getMediumString(key); srcIsQueue = buf.getOctet()==1; srcIsLocal = buf.getOctet()==1; buf.getShortString(tag); buf.getShortString(excludes); dynamic = buf.getOctet()==1; sync = buf.getShort(); delete [] _tmpBuf; } void Bridge::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } {std::string _s; linkRef.encode(_s); buf.putRawData(_s);}; buf.putShort(channelId); buf.putOctet(durable?1:0); buf.putShortString(src); buf.putShortString(dest); buf.putMediumString(key); buf.putOctet(srcIsQueue?1:0); buf.putOctet(srcIsLocal?1:0); buf.putShortString(tag); buf.putShortString(excludes); buf.putOctet(dynamic?1:0); buf.putShort(sync); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Bridge::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Bridge::doMethod (string& methodName, const string&, string& outStr, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (methodName == "close") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_CLOSE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CLOSE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Bridge::getKey() const { std::stringstream key; key << linkRef.getV2Key() << ","; key << channelId; return key.str(); } void Bridge::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["linkRef"] = ::qpid::types::Variant(linkRef); _map["channelId"] = ::qpid::types::Variant(channelId); _map["durable"] = ::qpid::types::Variant(durable); _map["src"] = ::qpid::types::Variant(src); _map["dest"] = ::qpid::types::Variant(dest); _map["key"] = ::qpid::types::Variant(key); _map["srcIsQueue"] = ::qpid::types::Variant(srcIsQueue); _map["srcIsLocal"] = ::qpid::types::Variant(srcIsLocal); _map["tag"] = ::qpid::types::Variant(tag); _map["excludes"] = ::qpid::types::Variant(excludes); _map["dynamic"] = ::qpid::types::Variant(dynamic); _map["sync"] = ::qpid::types::Variant(sync); } if (includeStatistics) { instChanged = false; // Maintenance of hi-lo statistics } } void Bridge::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("linkRef")) != _map.end()) { linkRef = _i->second; } if ((_i = _map.find("channelId")) != _map.end()) { channelId = _i->second; } if ((_i = _map.find("durable")) != _map.end()) { durable = _i->second; } if ((_i = _map.find("src")) != _map.end()) { src = (_i->second).getString(); } if ((_i = _map.find("dest")) != _map.end()) { dest = (_i->second).getString(); } if ((_i = _map.find("key")) != _map.end()) { key = (_i->second).getString(); } if ((_i = _map.find("srcIsQueue")) != _map.end()) { srcIsQueue = _i->second; } if ((_i = _map.find("srcIsLocal")) != _map.end()) { srcIsLocal = _i->second; } if ((_i = _map.find("tag")) != _map.end()) { tag = (_i->second).getString(); } if ((_i = _map.find("excludes")) != _map.end()) { excludes = (_i->second).getString(); } if ((_i = _map.find("dynamic")) != _map.end()) { dynamic = _i->second; } if ((_i = _map.find("sync")) != _map.end()) { sync = _i->second; } } void Bridge::doMethod (string& methodName, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "close") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_CLOSE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CLOSE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventExchangeDelete.cpp0000664000076400007640000000772611752725673025345 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventExchangeDelete.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventExchangeDelete::packageName = string ("org.apache.qpid.broker"); string EventExchangeDelete::eventName = string ("exchangeDelete"); uint8_t EventExchangeDelete::md5Sum[16] = {0x3d,0xc3,0x5f,0x89,0xec,0x32,0xa2,0x79,0x7d,0x53,0x35,0x46,0x9e,0xfa,0xa0,0xcf}; EventExchangeDelete::EventExchangeDelete (const std::string& _rhost, const std::string& _user, const std::string& _exName) : rhost(_rhost), user(_user), exName(_exName) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventExchangeDelete::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventExchangeDelete::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (3); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); ft.clear(); ft[NAME] = "exName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of an exchange"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventExchangeDelete::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); buf.putShortString(exName); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventExchangeDelete::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); map["exName"] = ::qpid::types::Variant(exName); } bool EventExchangeDelete::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventUnbind.h0000664000076400007640000000456611752725673023363 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_UNBIND_ #define _MANAGEMENT_UNBIND_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventUnbind : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; const std::string& exName; const std::string& qName; const std::string& key; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventUnbind(const std::string& _rhost, const std::string& _user, const std::string& _exName, const std::string& _qName, const std::string& _key); QPID_BROKER_EXTERN ~EventUnbind() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_UNBIND_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/ManagementSetupState.h0000664000076400007640000001027011752725673025225 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_MANAGEMENTSETUPSTATE_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_MANAGEMENTSETUPSTATE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class ManagementSetupState : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties uint64_t objectNum; uint16_t bootSequence; // Statistics public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } // Stub for getInstChanged. There are no statistics in this class. bool getInstChanged() { return false; } bool hasInst() { return false; } QPID_BROKER_EXTERN ManagementSetupState( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject); QPID_BROKER_EXTERN ~ManagementSetupState(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs // Accessor Methods inline void set_objectNum (uint64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); objectNum = val; configChanged = true; } inline uint64_t get_objectNum() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return objectNum; } inline void set_bootSequence (uint16_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); bootSequence = val; configChanged = true; } inline uint16_t get_bootSequence() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return bootSequence; } }; }}}}} #endif /*!_MANAGEMENT_MANAGEMENTSETUPSTATE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Package.h0000664000076400007640000000255211752725673022466 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_BROKER_ #define _MANAGEMENT_PACKAGE_ORG_APACHE_QPID_BROKER_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementAgent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class Package { public: QPID_BROKER_EXTERN Package (::qpid::management::ManagementAgent* agent); QPID_BROKER_EXTERN ~Package () {} }; }}}}} #endif /*!_MANAGEMENT_PACKAGE_ORG_APACHE_QPID_BROKER_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Link.cpp0000664000076400007640000003376311752725673022373 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Link.h" #include "ArgsLinkBridge.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Link::packageName = string ("org.apache.qpid.broker"); string Link::className = string ("link"); uint8_t Link::md5Sum[MD5_LEN] = {0xbc,0x33,0xc1,0xb3,0x25,0xcd,0xe0,0xce,0x4,0xd7,0xad,0x68,0x4e,0xd3,0x6d,0x91}; Link::Link (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const std::string& _host, uint16_t _port, const std::string& _transport, bool _durable) : ManagementObject(_core),host(_host),port(_port),transport(_transport),durable(_durable) { vhostRef = _parent->GetManagementObject ()->getObjectId (); state = ""; lastError = ""; } Link::~Link () { } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Link::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Link::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (5); // Config Element Count buf.putShort (2); // Inst Element Count buf.putShort (2); // Method Count // Properties ft.clear(); ft[NAME] = "vhostRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "host"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "port"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "transport"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "durable"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "state"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Operational state of the link"; buf.putMap(ft); ft.clear(); ft[NAME] = "lastError"; ft[TYPE] = TYPE_LSTR; ft[DESC] = "Reason link is not operational"; buf.putMap(ft); // Methods ft.clear(); ft[NAME] = "close"; ft[ARGCOUNT] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "bridge"; ft[ARGCOUNT] = 10; ft[DESC] = "Bridge messages over the link"; buf.putMap(ft); ft.clear(); ft[NAME] = "durable"; ft[TYPE] = TYPE_BOOL; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "src"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "dest"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "key"; ft[TYPE] = TYPE_LSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "tag"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "excludes"; ft[TYPE] = TYPE_SSTR; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "srcIsQueue"; ft[TYPE] = TYPE_BOOL; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "srcIsLocal"; ft[TYPE] = TYPE_BOOL; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "dynamic"; ft[TYPE] = TYPE_BOOL; ft[DIR] = "I"; buf.putMap(ft); ft.clear(); ft[NAME] = "sync"; ft[TYPE] = TYPE_U16; ft[DIR] = "I"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } uint32_t Link::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 16; // vhostRef size += (1 + host.length()); // host size += 2; // port size += (1 + transport.length()); // transport size += 1; // durable return size; } void Link::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } {std::string _s; buf.getRawData(_s, vhostRef.encodedSize()); vhostRef.decode(_s);}; buf.getShortString(host); port = buf.getShort(); buf.getShortString(transport); durable = buf.getOctet()==1; delete [] _tmpBuf; } void Link::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } {std::string _s; vhostRef.encode(_s); buf.putRawData(_s);}; buf.putShortString(host); buf.putShort(port); buf.putShortString(transport); buf.putOctet(durable?1:0); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Link::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } buf.putShortString(state); buf.putMediumString(lastError); // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Link::doMethod (string& methodName, const string& inStr, string& outStr, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); char *_tmpBuf = new char[inStr.length()]; memcpy(_tmpBuf, inStr.data(), inStr.length()); ::qpid::management::Buffer inBuf(_tmpBuf, inStr.length()); if (methodName == "close") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_CLOSE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CLOSE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "bridge") { _matched = true; ArgsLinkBridge ioArgs; ioArgs.i_durable = inBuf.getOctet()==1; inBuf.getShortString(ioArgs.i_src); inBuf.getShortString(ioArgs.i_dest); inBuf.getMediumString(ioArgs.i_key); inBuf.getShortString(ioArgs.i_tag); inBuf.getShortString(ioArgs.i_excludes); ioArgs.i_srcIsQueue = inBuf.getOctet()==1; ioArgs.i_srcIsLocal = inBuf.getOctet()==1; ioArgs.i_dynamic = inBuf.getOctet()==1; ioArgs.i_sync = inBuf.getShort(); bool allow = coreObject->AuthorizeMethod(METHOD_BRIDGE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_BRIDGE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } delete [] _tmpBuf; if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Link::getKey() const { std::stringstream key; key << host << ","; key << port; return key.str(); } void Link::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["vhostRef"] = ::qpid::types::Variant(vhostRef); _map["host"] = ::qpid::types::Variant(host); _map["port"] = ::qpid::types::Variant(port); _map["transport"] = ::qpid::types::Variant(transport); _map["durable"] = ::qpid::types::Variant(durable); } if (includeStatistics) { instChanged = false; _map["state"] = ::qpid::types::Variant(state); _map["lastError"] = ::qpid::types::Variant(lastError); // Maintenance of hi-lo statistics } } void Link::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("vhostRef")) != _map.end()) { vhostRef = _i->second; } if ((_i = _map.find("host")) != _map.end()) { host = (_i->second).getString(); } if ((_i = _map.find("port")) != _map.end()) { port = _i->second; } if ((_i = _map.find("transport")) != _map.end()) { transport = (_i->second).getString(); } if ((_i = _map.find("durable")) != _map.end()) { durable = _i->second; } } void Link::doMethod (string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "close") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_CLOSE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CLOSE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "bridge") { ArgsLinkBridge ioArgs; ::qpid::types::Variant::Map::const_iterator _i; if ((_i = inMap.find("durable")) != inMap.end()) { ioArgs.i_durable = _i->second; } if ((_i = inMap.find("src")) != inMap.end()) { ioArgs.i_src = (_i->second).getString(); } if ((_i = inMap.find("dest")) != inMap.end()) { ioArgs.i_dest = (_i->second).getString(); } if ((_i = inMap.find("key")) != inMap.end()) { ioArgs.i_key = (_i->second).getString(); } if ((_i = inMap.find("tag")) != inMap.end()) { ioArgs.i_tag = (_i->second).getString(); } if ((_i = inMap.find("excludes")) != inMap.end()) { ioArgs.i_excludes = (_i->second).getString(); } if ((_i = inMap.find("srcIsQueue")) != inMap.end()) { ioArgs.i_srcIsQueue = _i->second; } if ((_i = inMap.find("srcIsLocal")) != inMap.end()) { ioArgs.i_srcIsLocal = _i->second; } if ((_i = inMap.find("dynamic")) != inMap.end()) { ioArgs.i_dynamic = _i->second; } if ((_i = inMap.find("sync")) != inMap.end()) { ioArgs.i_sync = _i->second; } bool allow = coreObject->AuthorizeMethod(METHOD_BRIDGE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_BRIDGE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/Memory.h0000664000076400007640000002252211752725673022402 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_MEMORY_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_MEMORY_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Memory : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; uint8_t presenceMask[1]; static const uint8_t presenceByte_malloc_arena = 0; static const uint8_t presenceMask_malloc_arena = 1; static const uint8_t presenceByte_malloc_ordblks = 0; static const uint8_t presenceMask_malloc_ordblks = 2; static const uint8_t presenceByte_malloc_hblks = 0; static const uint8_t presenceMask_malloc_hblks = 4; static const uint8_t presenceByte_malloc_hblkhd = 0; static const uint8_t presenceMask_malloc_hblkhd = 8; static const uint8_t presenceByte_malloc_uordblks = 0; static const uint8_t presenceMask_malloc_uordblks = 16; static const uint8_t presenceByte_malloc_fordblks = 0; static const uint8_t presenceMask_malloc_fordblks = 32; static const uint8_t presenceByte_malloc_keepcost = 0; static const uint8_t presenceMask_malloc_keepcost = 64; // Properties std::string name; uint64_t malloc_arena; uint64_t malloc_ordblks; uint64_t malloc_hblks; uint64_t malloc_hblkhd; uint64_t malloc_uordblks; uint64_t malloc_fordblks; uint64_t malloc_keepcost; // Statistics public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } // Stub for getInstChanged. There are no statistics in this class. bool getInstChanged() { return false; } bool hasInst() { return false; } QPID_BROKER_EXTERN Memory( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, const std::string& _name); QPID_BROKER_EXTERN ~Memory(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs // Accessor Methods inline void set_malloc_arena (uint64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); malloc_arena = val; presenceMask[presenceByte_malloc_arena] |= presenceMask_malloc_arena; configChanged = true; } inline uint64_t get_malloc_arena() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return malloc_arena; } inline void clr_malloc_arena() { presenceMask[presenceByte_malloc_arena] &= ~presenceMask_malloc_arena; configChanged = true; } inline bool isSet_malloc_arena() { return (presenceMask[presenceByte_malloc_arena] & presenceMask_malloc_arena) != 0; } inline void set_malloc_ordblks (uint64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); malloc_ordblks = val; presenceMask[presenceByte_malloc_ordblks] |= presenceMask_malloc_ordblks; configChanged = true; } inline uint64_t get_malloc_ordblks() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return malloc_ordblks; } inline void clr_malloc_ordblks() { presenceMask[presenceByte_malloc_ordblks] &= ~presenceMask_malloc_ordblks; configChanged = true; } inline bool isSet_malloc_ordblks() { return (presenceMask[presenceByte_malloc_ordblks] & presenceMask_malloc_ordblks) != 0; } inline void set_malloc_hblks (uint64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); malloc_hblks = val; presenceMask[presenceByte_malloc_hblks] |= presenceMask_malloc_hblks; configChanged = true; } inline uint64_t get_malloc_hblks() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return malloc_hblks; } inline void clr_malloc_hblks() { presenceMask[presenceByte_malloc_hblks] &= ~presenceMask_malloc_hblks; configChanged = true; } inline bool isSet_malloc_hblks() { return (presenceMask[presenceByte_malloc_hblks] & presenceMask_malloc_hblks) != 0; } inline void set_malloc_hblkhd (uint64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); malloc_hblkhd = val; presenceMask[presenceByte_malloc_hblkhd] |= presenceMask_malloc_hblkhd; configChanged = true; } inline uint64_t get_malloc_hblkhd() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return malloc_hblkhd; } inline void clr_malloc_hblkhd() { presenceMask[presenceByte_malloc_hblkhd] &= ~presenceMask_malloc_hblkhd; configChanged = true; } inline bool isSet_malloc_hblkhd() { return (presenceMask[presenceByte_malloc_hblkhd] & presenceMask_malloc_hblkhd) != 0; } inline void set_malloc_uordblks (uint64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); malloc_uordblks = val; presenceMask[presenceByte_malloc_uordblks] |= presenceMask_malloc_uordblks; configChanged = true; } inline uint64_t get_malloc_uordblks() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return malloc_uordblks; } inline void clr_malloc_uordblks() { presenceMask[presenceByte_malloc_uordblks] &= ~presenceMask_malloc_uordblks; configChanged = true; } inline bool isSet_malloc_uordblks() { return (presenceMask[presenceByte_malloc_uordblks] & presenceMask_malloc_uordblks) != 0; } inline void set_malloc_fordblks (uint64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); malloc_fordblks = val; presenceMask[presenceByte_malloc_fordblks] |= presenceMask_malloc_fordblks; configChanged = true; } inline uint64_t get_malloc_fordblks() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return malloc_fordblks; } inline void clr_malloc_fordblks() { presenceMask[presenceByte_malloc_fordblks] &= ~presenceMask_malloc_fordblks; configChanged = true; } inline bool isSet_malloc_fordblks() { return (presenceMask[presenceByte_malloc_fordblks] & presenceMask_malloc_fordblks) != 0; } inline void set_malloc_keepcost (uint64_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); malloc_keepcost = val; presenceMask[presenceByte_malloc_keepcost] |= presenceMask_malloc_keepcost; configChanged = true; } inline uint64_t get_malloc_keepcost() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return malloc_keepcost; } inline void clr_malloc_keepcost() { presenceMask[presenceByte_malloc_keepcost] &= ~presenceMask_malloc_keepcost; configChanged = true; } inline bool isSet_malloc_keepcost() { return (presenceMask[presenceByte_malloc_keepcost] & presenceMask_malloc_keepcost) != 0; } }; }}}}} #endif /*!_MANAGEMENT_MEMORY_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventExchangeDeclare.h0000664000076400007640000000527211752725673025141 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_EXCHANGEDECLARE_ #define _MANAGEMENT_EXCHANGEDECLARE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventExchangeDeclare : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; const std::string& exName; const std::string& exType; const std::string& altEx; const bool durable; const bool autoDel; const ::qpid::types::Variant::Map& args; const std::string& disp; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventExchangeDeclare(const std::string& _rhost, const std::string& _user, const std::string& _exName, const std::string& _exType, const std::string& _altEx, const bool _durable, const bool _autoDel, const ::qpid::types::Variant::Map& _args, const std::string& _disp); QPID_BROKER_EXTERN ~EventExchangeDeclare() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_EXCHANGEDECLARE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Vhost.h0000664000076400007640000000766311752725673022246 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_VHOST_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_VHOST_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Vhost : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties ::qpid::management::ObjectId brokerRef; std::string name; std::string federationTag; // Statistics public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } // Stub for getInstChanged. There are no statistics in this class. bool getInstChanged() { return false; } bool hasInst() { return false; } QPID_BROKER_EXTERN Vhost( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const std::string& _name); QPID_BROKER_EXTERN ~Vhost(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs // Accessor Methods inline void set_federationTag (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); federationTag = val; configChanged = true; } inline const std::string& get_federationTag() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return federationTag; } }; }}}}} #endif /*!_MANAGEMENT_VHOST_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Subscription.cpp0000664000076400007640000002660011752725673024152 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Subscription.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Subscription::packageName = string ("org.apache.qpid.broker"); string Subscription::className = string ("subscription"); uint8_t Subscription::md5Sum[MD5_LEN] = {0x7c,0xc0,0xee,0x44,0x57,0xd4,0x2e,0xd7,0x1a,0x4b,0x31,0x56,0xed,0x9a,0x43,0x43}; Subscription::Subscription (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const ::qpid::management::ObjectId& _queueRef, const std::string& _name, bool _browsing, bool _acknowledged, bool _exclusive, const ::qpid::types::Variant::Map& _arguments) : ManagementObject(_core),queueRef(_queueRef),name(_name),browsing(_browsing),acknowledged(_acknowledged),exclusive(_exclusive),arguments(_arguments) { sessionRef = _parent->GetManagementObject ()->getObjectId (); creditMode = ""; perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Subscription::~Subscription () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Subscription::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Subscription::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (8); // Config Element Count buf.putShort (1); // Inst Element Count buf.putShort (0); // Method Count // Properties ft.clear(); ft[NAME] = "sessionRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "queueRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "browsing"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "acknowledged"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "exclusive"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "creditMode"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[DESC] = "WINDOW or CREDIT"; buf.putMap(ft); ft.clear(); ft[NAME] = "arguments"; ft[TYPE] = TYPE_FTABLE; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "delivered"; ft[TYPE] = TYPE_U64; ft[UNIT] = "message"; ft[DESC] = "Messages delivered"; buf.putMap(ft); // Methods { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Subscription::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->delivered = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->delivered += threadStats->delivered; } } } uint32_t Subscription::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 16; // sessionRef size += 16; // queueRef size += (1 + name.length()); // name size += 1; // browsing size += 1; // acknowledged size += 1; // exclusive size += (1 + creditMode.length()); // creditMode size += ::qpid::amqp_0_10::MapCodec::encodedSize(arguments); // arguments return size; } void Subscription::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } {std::string _s; buf.getRawData(_s, sessionRef.encodedSize()); sessionRef.decode(_s);}; {std::string _s; buf.getRawData(_s, queueRef.encodedSize()); queueRef.decode(_s);}; buf.getShortString(name); browsing = buf.getOctet()==1; acknowledged = buf.getOctet()==1; exclusive = buf.getOctet()==1; buf.getShortString(creditMode); buf.getMap(arguments); delete [] _tmpBuf; } void Subscription::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } {std::string _s; sessionRef.encode(_s); buf.putRawData(_s);}; {std::string _s; queueRef.encode(_s); buf.putRawData(_s);}; buf.putShortString(name); buf.putOctet(browsing?1:0); buf.putOctet(acknowledged?1:0); buf.putOctet(exclusive?1:0); buf.putShortString(creditMode); buf.putMap(arguments); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Subscription::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } buf.putLongLong(totals.delivered); // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Subscription::doMethod (string&, const string&, string& outStr, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Subscription::getKey() const { std::stringstream key; key << sessionRef.getV2Key() << ","; key << queueRef.getV2Key() << ","; key << name; return key.str(); } void Subscription::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["sessionRef"] = ::qpid::types::Variant(sessionRef); _map["queueRef"] = ::qpid::types::Variant(queueRef); _map["name"] = ::qpid::types::Variant(name); _map["browsing"] = ::qpid::types::Variant(browsing); _map["acknowledged"] = ::qpid::types::Variant(acknowledged); _map["exclusive"] = ::qpid::types::Variant(exclusive); _map["creditMode"] = ::qpid::types::Variant(creditMode); _map["arguments"] = ::qpid::types::Variant(arguments); } if (includeStatistics) { instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["delivered"] = ::qpid::types::Variant(totals.delivered); // Maintenance of hi-lo statistics } } void Subscription::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); if ((_i = _map.find("sessionRef")) != _map.end()) { sessionRef = _i->second; } if ((_i = _map.find("queueRef")) != _map.end()) { queueRef = _i->second; } if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } if ((_i = _map.find("browsing")) != _map.end()) { browsing = _i->second; } if ((_i = _map.find("acknowledged")) != _map.end()) { acknowledged = _i->second; } if ((_i = _map.find("exclusive")) != _map.end()) { exclusive = _i->second; } if ((_i = _map.find("creditMode")) != _map.end()) { creditMode = (_i->second).getString(); } if ((_i = _map.find("arguments")) != _map.end()) { arguments = (_i->second).asMap(); } } void Subscription::doMethod (string&, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string&) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventUnbind.cpp0000664000076400007640000001057611752725673023714 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventUnbind.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventUnbind::packageName = string ("org.apache.qpid.broker"); string EventUnbind::eventName = string ("unbind"); uint8_t EventUnbind::md5Sum[16] = {0x70,0x16,0x3d,0x9d,0xb5,0x14,0x8d,0x7c,0x9e,0xa4,0x17,0x38,0x43,0xd6,0x35,0x8a}; EventUnbind::EventUnbind (const std::string& _rhost, const std::string& _user, const std::string& _exName, const std::string& _qName, const std::string& _key) : rhost(_rhost), user(_user), exName(_exName), qName(_qName), key(_key) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventUnbind::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventUnbind::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (5); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); ft.clear(); ft[NAME] = "exName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of an exchange"; buf.putMap(ft); ft.clear(); ft[NAME] = "qName"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Name of a queue"; buf.putMap(ft); ft.clear(); ft[NAME] = "key"; ft[TYPE] = TYPE_LSTR; ft[DESC] = "Key text used for routing or binding"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventUnbind::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); buf.putShortString(exName); buf.putShortString(qName); buf.putMediumString(key); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventUnbind::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); map["exName"] = ::qpid::types::Variant(exName); map["qName"] = ::qpid::types::Variant(qName); map["key"] = ::qpid::types::Variant(key); } bool EventUnbind::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventBrokerLinkUp.h0000664000076400007640000000423211752725673024501 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_BROKERLINKUP_ #define _MANAGEMENT_BROKERLINKUP_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventBrokerLinkUp : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventBrokerLinkUp(const std::string& _rhost); QPID_BROKER_EXTERN ~EventBrokerLinkUp() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_BROKERLINKUP_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Exchange.h0000664000076400007640000002274311752725673022661 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_EXCHANGE_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_EXCHANGE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Exchange : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; uint8_t presenceMask[1]; static const uint8_t presenceByte_altExchange = 0; static const uint8_t presenceMask_altExchange = 1; // Properties ::qpid::management::ObjectId vhostRef; std::string name; std::string type; bool durable; bool autoDelete; ::qpid::management::ObjectId altExchange; ::qpid::types::Variant::Map arguments; // Statistics uint32_t producerCount; uint32_t producerCountHigh; uint32_t producerCountLow; uint32_t bindingCount; uint32_t bindingCountHigh; uint32_t bindingCountLow; // Per-Thread Statistics public: struct PerThreadStats { uint64_t msgReceives; uint64_t msgDrops; uint64_t msgRoutes; uint64_t byteReceives; uint64_t byteDrops; uint64_t byteRoutes; }; private: struct PerThreadStats** perThreadStatsArray; inline struct PerThreadStats* getThreadStats() { int idx = getThreadIndex(); struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats == 0) { threadStats = new(PerThreadStats); perThreadStatsArray[idx] = threadStats; threadStats->msgReceives = 0; threadStats->msgDrops = 0; threadStats->msgRoutes = 0; threadStats->byteReceives = 0; threadStats->byteDrops = 0; threadStats->byteRoutes = 0; } return threadStats; } void aggregatePerThreadStats(struct PerThreadStats*) const; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Exchange( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const std::string& _name); QPID_BROKER_EXTERN ~Exchange(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs // Accessor Methods inline void set_type (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); type = val; configChanged = true; } inline const std::string& get_type() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return type; } inline void set_durable (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); durable = val; configChanged = true; } inline bool get_durable() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return durable; } inline void set_autoDelete (bool val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); autoDelete = val; configChanged = true; } inline bool get_autoDelete() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return autoDelete; } inline void set_altExchange (const ::qpid::management::ObjectId& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); altExchange = val; presenceMask[presenceByte_altExchange] |= presenceMask_altExchange; configChanged = true; } inline const ::qpid::management::ObjectId& get_altExchange() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return altExchange; } inline void clr_altExchange() { presenceMask[presenceByte_altExchange] &= ~presenceMask_altExchange; configChanged = true; } inline bool isSet_altExchange() { return (presenceMask[presenceByte_altExchange] & presenceMask_altExchange) != 0; } inline void set_arguments (const ::qpid::types::Variant::Map& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); arguments = val; configChanged = true; } inline const ::qpid::types::Variant::Map& get_arguments() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return arguments; } inline void inc_producerCount (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); producerCount += by; if (producerCountHigh < producerCount) producerCountHigh = producerCount; instChanged = true; } inline void dec_producerCount (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); producerCount -= by; if (producerCountLow > producerCount) producerCountLow = producerCount; instChanged = true; } inline void inc_bindingCount (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); bindingCount += by; if (bindingCountHigh < bindingCount) bindingCountHigh = bindingCount; instChanged = true; } inline void dec_bindingCount (uint32_t by = 1) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); bindingCount -= by; if (bindingCountLow > bindingCount) bindingCountLow = bindingCount; instChanged = true; } inline void inc_msgReceives (uint64_t by = 1) { getThreadStats()->msgReceives += by; instChanged = true; } inline void dec_msgReceives (uint64_t by = 1) { getThreadStats()->msgReceives -= by; instChanged = true; } inline void inc_msgDrops (uint64_t by = 1) { getThreadStats()->msgDrops += by; instChanged = true; } inline void dec_msgDrops (uint64_t by = 1) { getThreadStats()->msgDrops -= by; instChanged = true; } inline void inc_msgRoutes (uint64_t by = 1) { getThreadStats()->msgRoutes += by; instChanged = true; } inline void dec_msgRoutes (uint64_t by = 1) { getThreadStats()->msgRoutes -= by; instChanged = true; } inline void inc_byteReceives (uint64_t by = 1) { getThreadStats()->byteReceives += by; instChanged = true; } inline void dec_byteReceives (uint64_t by = 1) { getThreadStats()->byteReceives -= by; instChanged = true; } inline void inc_byteDrops (uint64_t by = 1) { getThreadStats()->byteDrops += by; instChanged = true; } inline void dec_byteDrops (uint64_t by = 1) { getThreadStats()->byteDrops -= by; instChanged = true; } inline void inc_byteRoutes (uint64_t by = 1) { getThreadStats()->byteRoutes += by; instChanged = true; } inline void dec_byteRoutes (uint64_t by = 1) { getThreadStats()->byteRoutes -= by; instChanged = true; } struct PerThreadStats* getStatistics() { return getThreadStats(); } void statisticsUpdated() { instChanged = true; } }; }}}}} #endif /*!_MANAGEMENT_EXCHANGE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerGetTimestampConfig.h0000664000076400007640000000237211752725673026646 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERGETTIMESTAMPCONFIG_ #define _ARGS_BROKERGETTIMESTAMPCONFIG_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerGetTimestampConfig : public ::qpid::management::Args { public: bool o_receive; }; }}}}} #endif /*!_ARGS_BROKERGETTIMESTAMPCONFIG_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventUnsubscribe.h0000664000076400007640000000442211752725673024417 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_UNSUBSCRIBE_ #define _MANAGEMENT_UNSUBSCRIBE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventUnsubscribe : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; const std::string& dest; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventUnsubscribe(const std::string& _rhost, const std::string& _user, const std::string& _dest); QPID_BROKER_EXTERN ~EventUnsubscribe() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_UNSUBSCRIBE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/System.h0000664000076400007640000001230211752725673022411 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_SYSTEM_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_SYSTEM_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class System : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties ::qpid::types::Uuid systemId; std::string osName; std::string nodeName; std::string release; std::string version; std::string machine; // Statistics public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } // Stub for getInstChanged. There are no statistics in this class. bool getInstChanged() { return false; } bool hasInst() { return false; } QPID_BROKER_EXTERN System( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, const ::qpid::types::Uuid& _systemId); QPID_BROKER_EXTERN ~System(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs // Accessor Methods inline void set_osName (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); osName = val; configChanged = true; } inline const std::string& get_osName() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return osName; } inline void set_nodeName (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); nodeName = val; configChanged = true; } inline const std::string& get_nodeName() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return nodeName; } inline void set_release (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); release = val; configChanged = true; } inline const std::string& get_release() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return release; } inline void set_version (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); version = val; configChanged = true; } inline const std::string& get_version() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return version; } inline void set_machine (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); machine = val; configChanged = true; } inline const std::string& get_machine() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return machine; } }; }}}}} #endif /*!_MANAGEMENT_SYSTEM_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Agent.h0000664000076400007640000001315011752725673022165 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_AGENT_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_AGENT_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Agent : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties ::qpid::management::ObjectId connectionRef; std::string label; ::qpid::management::ObjectId registeredTo; ::qpid::types::Uuid systemId; uint32_t brokerBank; uint32_t agentBank; // Statistics public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } // Stub for getInstChanged. There are no statistics in this class. bool getInstChanged() { return false; } bool hasInst() { return false; } QPID_BROKER_EXTERN Agent( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject); QPID_BROKER_EXTERN ~Agent(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs // Accessor Methods inline void set_connectionRef (const ::qpid::management::ObjectId& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); connectionRef = val; configChanged = true; } inline const ::qpid::management::ObjectId& get_connectionRef() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return connectionRef; } inline void set_label (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); label = val; configChanged = true; } inline const std::string& get_label() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return label; } inline void set_registeredTo (const ::qpid::management::ObjectId& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); registeredTo = val; configChanged = true; } inline const ::qpid::management::ObjectId& get_registeredTo() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return registeredTo; } inline void set_systemId (const ::qpid::types::Uuid& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); systemId = val; configChanged = true; } inline const ::qpid::types::Uuid& get_systemId() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return systemId; } inline void set_brokerBank (uint32_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); brokerBank = val; configChanged = true; } inline uint32_t get_brokerBank() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return brokerBank; } inline void set_agentBank (uint32_t val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); agentBank = val; configChanged = true; } inline uint32_t get_agentBank() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return agentBank; } }; }}}}} #endif /*!_MANAGEMENT_AGENT_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventBrokerLinkUp.cpp0000664000076400007640000000666211752725673025045 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventBrokerLinkUp.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventBrokerLinkUp::packageName = string ("org.apache.qpid.broker"); string EventBrokerLinkUp::eventName = string ("brokerLinkUp"); uint8_t EventBrokerLinkUp::md5Sum[16] = {0x23,0x18,0x17,0xfb,0xb7,0x9d,0xc8,0x12,0xec,0x9b,0xbe,0x50,0xd9,0xc7,0xcd,0x8d}; EventBrokerLinkUp::EventBrokerLinkUp (const std::string& _rhost) : rhost(_rhost) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventBrokerLinkUp::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventBrokerLinkUp::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (1); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventBrokerLinkUp::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventBrokerLinkUp::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); } bool EventBrokerLinkUp::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/ArgsBrokerQueueMoveMessages.h0000664000076400007640000000253111752725673026515 0ustar00jrossjross00000000000000 #ifndef _ARGS_BROKERQUEUEMOVEMESSAGES_ #define _ARGS_BROKERQUEUEMOVEMESSAGES_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Args.h" #include namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { class ArgsBrokerQueueMoveMessages : public ::qpid::management::Args { public: std::string i_srcQueue; std::string i_destQueue; uint32_t i_qty; ::qpid::types::Variant::Map i_filter; }; }}}}} #endif /*!_ARGS_BROKERQUEUEMOVEMESSAGES_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/EventQueueDelete.h0000664000076400007640000000442411752725673024344 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_QUEUEDELETE_ #define _MANAGEMENT_QUEUEDELETE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventQueueDelete : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; const std::string& qName; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventQueueDelete(const std::string& _rhost, const std::string& _user, const std::string& _qName); QPID_BROKER_EXTERN ~EventQueueDelete() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_QUEUEDELETE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Session.cpp0000664000076400007640000004453711752725673023122 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "Session.h" #include #include using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string Session::packageName = string ("org.apache.qpid.broker"); string Session::className = string ("session"); uint8_t Session::md5Sum[MD5_LEN] = {0x9a,0x57,0xd0,0xd2,0x8b,0x17,0x8c,0x84,0x4f,0xac,0x5c,0x9a,0x96,0xc2,0xcf,0x75}; Session::Session (ManagementAgent*, Manageable* _core, ::qpid::management::Manageable* _parent, const std::string& _name) : ManagementObject(_core),name(_name) { vhostRef = _parent->GetManagementObject ()->getObjectId (); channelId = 0; connectionRef = ::qpid::management::ObjectId(); detachedLifespan = 0; attached = 0; expireTime = 0; maxClientRate = 0; // Optional properties start out not-present for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = 0; perThreadStatsArray = new struct PerThreadStats*[maxThreads]; for (int idx = 0; idx < maxThreads; idx++) perThreadStatsArray[idx] = 0; } Session::~Session () { for (int idx = 0; idx < maxThreads; idx++) if (perThreadStatsArray[idx] != 0) delete perThreadStatsArray[idx]; delete[] perThreadStatsArray; } namespace { const string NAME("name"); const string TYPE("type"); const string ACCESS("access"); const string IS_INDEX("index"); const string IS_OPTIONAL("optional"); const string UNIT("unit"); const string MIN("min"); const string MAX("max"); const string MAXLEN("maxlen"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); const string DIR("dir"); const string DEFAULT("default"); } void Session::registerSelf(ManagementAgent* agent) { agent->registerClass(packageName, className, md5Sum, writeSchema); } void Session::writeSchema (std::string& schema) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_TABLE); buf.putShortString (packageName); // Package Name buf.putShortString (className); // Class Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (8); // Config Element Count buf.putShort (6); // Inst Element Count buf.putShort (4); // Method Count // Properties ft.clear(); ft[NAME] = "vhostRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "name"; ft[TYPE] = TYPE_SSTR; ft[ACCESS] = ACCESS_RC; ft[IS_INDEX] = 1; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "channelId"; ft[TYPE] = TYPE_U16; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "connectionRef"; ft[TYPE] = TYPE_REF; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "detachedLifespan"; ft[TYPE] = TYPE_U32; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; ft[UNIT] = "second"; buf.putMap(ft); ft.clear(); ft[NAME] = "attached"; ft[TYPE] = TYPE_BOOL; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "expireTime"; ft[TYPE] = TYPE_ABSTIME; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; buf.putMap(ft); ft.clear(); ft[NAME] = "maxClientRate"; ft[TYPE] = TYPE_U32; ft[ACCESS] = ACCESS_RO; ft[IS_INDEX] = 0; ft[IS_OPTIONAL] = 1; ft[UNIT] = "msgs/sec"; buf.putMap(ft); // Statistics ft.clear(); ft[NAME] = "framesOutstanding"; ft[TYPE] = TYPE_U32; buf.putMap(ft); ft.clear(); ft[NAME] = "TxnStarts"; ft[TYPE] = TYPE_U64; ft[UNIT] = "transaction"; ft[DESC] = "Total transactions started "; buf.putMap(ft); ft.clear(); ft[NAME] = "TxnCommits"; ft[TYPE] = TYPE_U64; ft[UNIT] = "transaction"; ft[DESC] = "Total transactions committed"; buf.putMap(ft); ft.clear(); ft[NAME] = "TxnRejects"; ft[TYPE] = TYPE_U64; ft[UNIT] = "transaction"; ft[DESC] = "Total transactions rejected"; buf.putMap(ft); ft.clear(); ft[NAME] = "TxnCount"; ft[TYPE] = TYPE_U32; ft[UNIT] = "transaction"; ft[DESC] = "Current pending transactions"; buf.putMap(ft); ft.clear(); ft[NAME] = "clientCredit"; ft[TYPE] = TYPE_U32; ft[UNIT] = "message"; ft[DESC] = "Client message credit"; buf.putMap(ft); // Methods ft.clear(); ft[NAME] = "solicitAck"; ft[ARGCOUNT] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "detach"; ft[ARGCOUNT] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "resetLifespan"; ft[ARGCOUNT] = 0; buf.putMap(ft); ft.clear(); ft[NAME] = "close"; ft[ARGCOUNT] = 0; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void Session::aggregatePerThreadStats(struct PerThreadStats* totals) const { totals->framesOutstanding = 0; totals->TxnStarts = 0; totals->TxnCommits = 0; totals->TxnRejects = 0; totals->TxnCount = 0; totals->clientCredit = 0; for (int idx = 0; idx < maxThreads; idx++) { struct PerThreadStats* threadStats = perThreadStatsArray[idx]; if (threadStats != 0) { totals->framesOutstanding += threadStats->framesOutstanding; totals->TxnStarts += threadStats->TxnStarts; totals->TxnCommits += threadStats->TxnCommits; totals->TxnRejects += threadStats->TxnRejects; totals->TxnCount += threadStats->TxnCount; totals->clientCredit += threadStats->clientCredit; } } } uint32_t Session::writePropertiesSize() const { uint32_t size = writeTimestampsSize(); size += 1; size += 16; // vhostRef size += (1 + name.length()); // name size += 2; // channelId size += 16; // connectionRef size += 4; // detachedLifespan size += 1; // attached if (presenceMask[presenceByte_expireTime] & presenceMask_expireTime) { size += 8; // expireTime } if (presenceMask[presenceByte_maxClientRate] & presenceMask_maxClientRate) { size += 4; // maxClientRate } return size; } void Session::readProperties (const std::string& _sBuf) { char *_tmpBuf = new char[_sBuf.length()]; memcpy(_tmpBuf, _sBuf.data(), _sBuf.length()); ::qpid::management::Buffer buf(_tmpBuf, _sBuf.length()); Mutex::ScopedLock mutex(accessLock); { std::string _tbuf; buf.getRawData(_tbuf, writeTimestampsSize()); readTimestamps(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) presenceMask[idx] = buf.getOctet(); {std::string _s; buf.getRawData(_s, vhostRef.encodedSize()); vhostRef.decode(_s);}; buf.getShortString(name); channelId = buf.getShort(); {std::string _s; buf.getRawData(_s, connectionRef.encodedSize()); connectionRef.decode(_s);}; detachedLifespan = buf.getLong(); attached = buf.getOctet()==1; if (presenceMask[presenceByte_expireTime] & presenceMask_expireTime) { expireTime = buf.getLongLong(); } if (presenceMask[presenceByte_maxClientRate] & presenceMask_maxClientRate) { maxClientRate = buf.getLong(); } delete [] _tmpBuf; } void Session::writeProperties (std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); configChanged = false; { std::string _tbuf; writeTimestamps(_tbuf); buf.putRawData(_tbuf); } for (uint8_t idx = 0; idx < 1; idx++) buf.putOctet(presenceMask[idx]); {std::string _s; vhostRef.encode(_s); buf.putRawData(_s);}; buf.putShortString(name); buf.putShort(channelId); {std::string _s; connectionRef.encode(_s); buf.putRawData(_s);}; buf.putLong(detachedLifespan); buf.putOctet(attached?1:0); if (presenceMask[presenceByte_expireTime] & presenceMask_expireTime) { buf.putLongLong(expireTime); } if (presenceMask[presenceByte_maxClientRate] & presenceMask_maxClientRate) { buf.putLong(maxClientRate); } uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Session::writeStatistics (std::string& _sBuf, bool skipHeaders) { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); Mutex::ScopedLock mutex(accessLock); instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); if (!skipHeaders) { std::string _tbuf; writeTimestamps (_tbuf); buf.putRawData(_tbuf); } buf.putLong(totals.framesOutstanding); buf.putLongLong(totals.TxnStarts); buf.putLongLong(totals.TxnCommits); buf.putLongLong(totals.TxnRejects); buf.putLong(totals.TxnCount); buf.putLong(totals.clientCredit); // Maintenance of hi-lo statistics uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void Session::doMethod (string& methodName, const string&, string& outStr, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; bool _matched = false; const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer outBuf(_msgChars, _bufSize); if (methodName == "solicitAck") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_SOLICITACK, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SOLICITACK, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "detach") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_DETACH, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_DETACH, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "resetLifespan") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_RESETLIFESPAN, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_RESETLIFESPAN, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (methodName == "close") { _matched = true; ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_CLOSE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CLOSE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outBuf.putLong (status); outBuf.putMediumString(::qpid::management::Manageable::StatusText (status, text)); } if (!_matched) { outBuf.putLong(status); outBuf.putShortString(Manageable::StatusText(status, text)); } uint32_t _bufLen = outBuf.getPosition(); outBuf.reset(); outBuf.getRawData(outStr, _bufLen); } std::string Session::getKey() const { std::stringstream key; key << name; return key.str(); } void Session::mapEncodeValues (::qpid::types::Variant::Map& _map, bool includeProperties, bool includeStatistics) { using namespace ::qpid::types; Mutex::ScopedLock mutex(accessLock); if (includeProperties) { configChanged = false; _map["vhostRef"] = ::qpid::types::Variant(vhostRef); _map["name"] = ::qpid::types::Variant(name); _map["channelId"] = ::qpid::types::Variant(channelId); _map["connectionRef"] = ::qpid::types::Variant(connectionRef); _map["detachedLifespan"] = ::qpid::types::Variant(detachedLifespan); _map["attached"] = ::qpid::types::Variant(attached); if (presenceMask[presenceByte_expireTime] & presenceMask_expireTime) { _map["expireTime"] = ::qpid::types::Variant(expireTime); } if (presenceMask[presenceByte_maxClientRate] & presenceMask_maxClientRate) { _map["maxClientRate"] = ::qpid::types::Variant(maxClientRate); } } if (includeStatistics) { instChanged = false; struct PerThreadStats totals; aggregatePerThreadStats(&totals); _map["framesOutstanding"] = ::qpid::types::Variant(totals.framesOutstanding); _map["TxnStarts"] = ::qpid::types::Variant(totals.TxnStarts); _map["TxnCommits"] = ::qpid::types::Variant(totals.TxnCommits); _map["TxnRejects"] = ::qpid::types::Variant(totals.TxnRejects); _map["TxnCount"] = ::qpid::types::Variant(totals.TxnCount); _map["clientCredit"] = ::qpid::types::Variant(totals.clientCredit); // Maintenance of hi-lo statistics } } void Session::mapDecodeValues (const ::qpid::types::Variant::Map& _map) { ::qpid::types::Variant::Map::const_iterator _i; Mutex::ScopedLock mutex(accessLock); bool _found; if ((_i = _map.find("vhostRef")) != _map.end()) { vhostRef = _i->second; } if ((_i = _map.find("name")) != _map.end()) { name = (_i->second).getString(); } if ((_i = _map.find("channelId")) != _map.end()) { channelId = _i->second; } if ((_i = _map.find("connectionRef")) != _map.end()) { connectionRef = _i->second; } if ((_i = _map.find("detachedLifespan")) != _map.end()) { detachedLifespan = _i->second; } if ((_i = _map.find("attached")) != _map.end()) { attached = _i->second; } _found = false; if ((_i = _map.find("expireTime")) != _map.end()) { expireTime = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_expireTime] |= presenceMask_expireTime; } _found = false; if ((_i = _map.find("maxClientRate")) != _map.end()) { maxClientRate = _i->second; _found = true; } if (_found) { presenceMask[presenceByte_maxClientRate] |= presenceMask_maxClientRate; } } void Session::doMethod (string& methodName, const ::qpid::types::Variant::Map&, ::qpid::types::Variant::Map& outMap, const string& userId) { Manageable::status_t status = Manageable::STATUS_UNKNOWN_METHOD; std::string text; if (methodName == "solicitAck") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_SOLICITACK, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_SOLICITACK, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "detach") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_DETACH, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_DETACH, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "resetLifespan") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_RESETLIFESPAN, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_RESETLIFESPAN, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } if (methodName == "close") { ::qpid::management::ArgsNone ioArgs; bool allow = coreObject->AuthorizeMethod(METHOD_CLOSE, ioArgs, userId); if (allow) status = coreObject->ManagementMethod (METHOD_CLOSE, ioArgs, text); else status = Manageable::STATUS_FORBIDDEN; outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = ::qpid::management::Manageable::StatusText(status, text); return; } outMap["_status_code"] = (uint32_t) status; outMap["_status_text"] = Manageable::StatusText(status, text); } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventClientConnectFail.cpp0000664000076400007640000000777211752725673026025 0ustar00jrossjross00000000000000 // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/Manageable.h" #include "qpid/management/Buffer.h" #include "qpid/types/Variant.h" #include "qpid/amqp_0_10/Codecs.h" #include "qpid/management/ManagementAgent.h" #include "EventClientConnectFail.h" using namespace qmf::org::apache::qpid::broker; using qpid::management::ManagementAgent; using qpid::management::Manageable; using qpid::management::ManagementObject; using qpid::management::Args; using qpid::management::Mutex; using std::string; string EventClientConnectFail::packageName = string ("org.apache.qpid.broker"); string EventClientConnectFail::eventName = string ("clientConnectFail"); uint8_t EventClientConnectFail::md5Sum[16] = {0xe6,0x58,0x6,0xac,0x3a,0x74,0x47,0x8f,0x1,0x90,0x2e,0xa6,0xe6,0xee,0x21,0xe1}; EventClientConnectFail::EventClientConnectFail (const std::string& _rhost, const std::string& _user, const std::string& _reason) : rhost(_rhost), user(_user), reason(_reason) {} namespace { const string NAME("name"); const string TYPE("type"); const string DESC("desc"); const string ARGCOUNT("argCount"); const string ARGS("args"); } void EventClientConnectFail::registerSelf(ManagementAgent* agent) { agent->registerEvent(packageName, eventName, md5Sum, writeSchema); } void EventClientConnectFail::writeSchema (std::string& schema) { const int _bufSize = 65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); ::qpid::types::Variant::Map ft; // Schema class header: buf.putOctet (CLASS_KIND_EVENT); buf.putShortString (packageName); // Package Name buf.putShortString (eventName); // Event Name buf.putBin128 (md5Sum); // Schema Hash buf.putShort (3); // Argument Count // Arguments ft.clear(); ft[NAME] = "rhost"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Address (i.e. DNS name, IP address, etc.) of a remotely connected host"; buf.putMap(ft); ft.clear(); ft[NAME] = "user"; ft[TYPE] = TYPE_SSTR; ft[DESC] = "Authentication identity"; buf.putMap(ft); ft.clear(); ft[NAME] = "reason"; ft[TYPE] = TYPE_LSTR; ft[DESC] = "Reason for a failure"; buf.putMap(ft); { uint32_t _len = buf.getPosition(); buf.reset(); buf.getRawData(schema, _len); } } void EventClientConnectFail::encode(std::string& _sBuf) const { const int _bufSize=65536; char _msgChars[_bufSize]; ::qpid::management::Buffer buf(_msgChars, _bufSize); buf.putShortString(rhost); buf.putShortString(user); buf.putMediumString(reason); uint32_t _bufLen = buf.getPosition(); buf.reset(); buf.getRawData(_sBuf, _bufLen); } void EventClientConnectFail::mapEncode(::qpid::types::Variant::Map& map) const { using namespace ::qpid::types; map["rhost"] = ::qpid::types::Variant(rhost); map["user"] = ::qpid::types::Variant(user); map["reason"] = ::qpid::types::Variant(reason); } bool EventClientConnectFail::match(const std::string& evt, const std::string& pkg) { return eventName == evt && packageName == pkg; } qpidc-0.16/src/qmf/org/apache/qpid/broker/EventExchangeDelete.h0000664000076400007640000000445011752725673025001 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_EXCHANGEDELETE_ #define _MANAGEMENT_EXCHANGEDELETE_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementEvent.h" #include "qmf/BrokerImportExport.h" namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class EventExchangeDelete : public ::qpid::management::ManagementEvent { private: static void writeSchema (std::string& schema); static std::string packageName; static std::string eventName; static uint8_t md5Sum[MD5_LEN]; const std::string& rhost; const std::string& user; const std::string& exName; public: writeSchemaCall_t getWriteSchemaCall(void) { return writeSchema; } QPID_BROKER_EXTERN EventExchangeDelete(const std::string& _rhost, const std::string& _user, const std::string& _exName); QPID_BROKER_EXTERN ~EventExchangeDelete() {}; static void registerSelf(::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getEventName() const { return eventName; } uint8_t* getMd5Sum() const { return md5Sum; } uint8_t getSeverity() const { return 6; } QPID_BROKER_EXTERN void encode(std::string& buffer) const; QPID_BROKER_EXTERN void mapEncode(::qpid::types::Variant::Map& map) const; QPID_BROKER_EXTERN static bool match(const std::string& evt, const std::string& pkg); }; }}}}} #endif /*!_MANAGEMENT_EXCHANGEDELETE_*/ qpidc-0.16/src/qmf/org/apache/qpid/broker/Link.h0000664000076400007640000001051011752725673022021 0ustar00jrossjross00000000000000 #ifndef _MANAGEMENT_ORG_APACHE_QPID_BROKER_LINK_ #define _MANAGEMENT_ORG_APACHE_QPID_BROKER_LINK_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // This source file was created by a code generator. // Please do not edit. #include "qpid/management/ManagementObject.h" #include "qmf/BrokerImportExport.h" namespace qpid { namespace management { class ManagementAgent; } } namespace qmf { namespace org { namespace apache { namespace qpid { namespace broker { QPID_BROKER_CLASS_EXTERN class Link : public ::qpid::management::ManagementObject { private: static std::string packageName; static std::string className; static uint8_t md5Sum[MD5_LEN]; // Properties ::qpid::management::ObjectId vhostRef; std::string host; uint16_t port; std::string transport; bool durable; // Statistics std::string state; std::string lastError; public: QPID_BROKER_EXTERN static void writeSchema(std::string& schema); QPID_BROKER_EXTERN void mapEncodeValues(::qpid::types::Variant::Map& map, bool includeProperties=true, bool includeStatistics=true); QPID_BROKER_EXTERN void mapDecodeValues(const ::qpid::types::Variant::Map& map); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const ::qpid::types::Variant::Map& inMap, ::qpid::types::Variant::Map& outMap, const std::string& userId); QPID_BROKER_EXTERN std::string getKey() const; QPID_BROKER_EXTERN uint32_t writePropertiesSize() const; QPID_BROKER_EXTERN void readProperties(const std::string& buf); QPID_BROKER_EXTERN void writeProperties(std::string& buf) const; QPID_BROKER_EXTERN void writeStatistics(std::string& buf, bool skipHeaders = false); QPID_BROKER_EXTERN void doMethod(std::string& methodName, const std::string& inBuf, std::string& outBuf, const std::string& userId); writeSchemaCall_t getWriteSchemaCall() { return writeSchema; } QPID_BROKER_EXTERN Link( ::qpid::management::ManagementAgent* agent, ::qpid::management::Manageable* coreObject, ::qpid::management::Manageable* _parent, const std::string& _host, uint16_t _port, const std::string& _transport, bool _durable); QPID_BROKER_EXTERN ~Link(); QPID_BROKER_EXTERN static void registerSelf( ::qpid::management::ManagementAgent* agent); std::string& getPackageName() const { return packageName; } std::string& getClassName() const { return className; } uint8_t* getMd5Sum() const { return md5Sum; } // Method IDs QPID_BROKER_EXTERN static const uint32_t METHOD_CLOSE = 1; QPID_BROKER_EXTERN static const uint32_t METHOD_BRIDGE = 2; // Accessor Methods inline void set_state (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); state = val; instChanged = true; } inline const std::string& get_state() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return state; } inline void set_lastError (const std::string& val) { ::qpid::management::Mutex::ScopedLock mutex(accessLock); lastError = val; instChanged = true; } inline const std::string& get_lastError() { ::qpid::management::Mutex::ScopedLock mutex(accessLock); return lastError; } }; }}}}} #endif /*!_MANAGEMENT_LINK_*/ qpidc-0.16/src/qmf/SchemaPropertyImpl.h0000664000076400007640000000601411446224071020450 0ustar00jrossjross00000000000000#ifndef _QMF_SCHEMA_PROPERTY_IMPL_H_ #define _QMF_SCHEMA_PROPERTY_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/SchemaTypes.h" #include "qmf/SchemaProperty.h" #include "qpid/types/Variant.h" #include "qpid/management/Buffer.h" namespace qpid { namespace management { class Buffer; }} namespace qmf { class Hash; class SchemaPropertyImpl : public virtual qpid::RefCounted { public: // // Public impl-only methods // SchemaPropertyImpl(const qpid::types::Variant::Map& m); SchemaPropertyImpl(qpid::management::Buffer& v1Buffer); qpid::types::Variant::Map asMap() const; void updateHash(Hash&) const; void encodeV1(qpid::management::Buffer&, bool isArg, bool isMethodArg) const; // // Methods from API handle // SchemaPropertyImpl(const std::string& n, int t, const std::string o); void setAccess(int a) { access = a; } void setIndex(bool i) { index = i; } void setOptional(bool o) { optional = o; } void setUnit(const std::string& u) { unit = u; } void setDesc(const std::string& d) { desc = d; } void setSubtype(const std::string& s) { subtype = s; } void setDirection(int d) { direction = d; } const std::string& getName() const { return name; } int getType() const { return dataType; } int getAccess() const { return access; } bool isIndex() const { return index; } bool isOptional() const { return optional; } const std::string& getUnit() const { return unit; } const std::string& getDesc() const { return desc; } const std::string& getSubtype() const { return subtype; } int getDirection() const { return direction; } private: std::string name; int dataType; std::string subtype; int access; bool index; bool optional; std::string unit; std::string desc; int direction; uint8_t v1TypeCode() const; void fromV1TypeCode(int8_t); }; struct SchemaPropertyImplAccess { static SchemaPropertyImpl& get(SchemaProperty&); static const SchemaPropertyImpl& get(const SchemaProperty&); }; } #endif qpidc-0.16/src/qmf/AgentSession.cpp0000664000076400007640000010176111703313731017621 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/AgentSessionImpl.h" AgentSession::AgentSession(AgentSessionImpl* impl) { PI::ctor(*this, impl); } AgentSession::AgentSession(const AgentSession& s) : qmf::Handle() { PI::copy(*this, s); } AgentSession::~AgentSession() { PI::dtor(*this); } AgentSession& AgentSession::operator=(const AgentSession& s) { return PI::assign(*this, s); } AgentSession::AgentSession(Connection& c, const string& o) { PI::ctor(*this, new AgentSessionImpl(c, o)); } void AgentSession::setDomain(const string& d) { impl->setDomain(d); } void AgentSession::setVendor(const string& v) { impl->setVendor(v); } void AgentSession::setProduct(const string& p) { impl->setProduct(p); } void AgentSession::setInstance(const string& i) { impl->setInstance(i); } void AgentSession::setAttribute(const string& k, const qpid::types::Variant& v) { impl->setAttribute(k, v); } const string& AgentSession::getName() const { return impl->getName(); } void AgentSession::open() { impl->open(); } void AgentSession::close() { impl->close(); } bool AgentSession::nextEvent(AgentEvent& e, Duration t) { return impl->nextEvent(e, t); } int AgentSession::pendingEvents() const { return impl->pendingEvents(); } void AgentSession::registerSchema(Schema& s) { impl->registerSchema(s); } DataAddr AgentSession::addData(Data& d, const string& n, bool p) { return impl->addData(d, n, p); } void AgentSession::delData(const DataAddr& a) { impl->delData(a); } void AgentSession::authAccept(AgentEvent& e) { impl->authAccept(e); } void AgentSession::authReject(AgentEvent& e, const string& m) { impl->authReject(e, m); } void AgentSession::raiseException(AgentEvent& e, const string& s) { impl->raiseException(e, s); } void AgentSession::raiseException(AgentEvent& e, const Data& d) { impl->raiseException(e, d); } void AgentSession::response(AgentEvent& e, const Data& d) { impl->response(e, d); } void AgentSession::complete(AgentEvent& e) { impl->complete(e); } void AgentSession::methodSuccess(AgentEvent& e) { impl->methodSuccess(e); } void AgentSession::raiseEvent(const Data& d) { impl->raiseEvent(d); } void AgentSession::raiseEvent(const Data& d, int s) { impl->raiseEvent(d, s); } //======================================================================================== // Impl Method Bodies //======================================================================================== AgentSessionImpl::AgentSessionImpl(Connection& c, const string& options) : connection(c), domain("default"), opened(false), eventNotifier(0), thread(0), threadCanceled(false), bootSequence(1), interval(60), lastHeartbeat(0), lastVisit(0), forceHeartbeat(false), externalStorage(false), autoAllowQueries(true), autoAllowMethods(true), maxSubscriptions(64), minSubInterval(3000), subLifetime(300), publicEvents(true), listenOnDirect(true), strictSecurity(false), maxThreadWaitTime(5), schemaUpdateTime(uint64_t(qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now()))) { // // Set Agent Capability Level // attributes["qmf.agent_capability"] = AGENT_CAPABILITY_0_8; if (!options.empty()) { qpid::messaging::AddressParser parser(options); Variant::Map optMap; Variant::Map::const_iterator iter; parser.parseMap(optMap); iter = optMap.find("domain"); if (iter != optMap.end()) domain = iter->second.asString(); iter = optMap.find("interval"); if (iter != optMap.end()) { interval = iter->second.asUint32(); if (interval < 1) interval = 1; } iter = optMap.find("external"); if (iter != optMap.end()) externalStorage = iter->second.asBool(); iter = optMap.find("allow-queries"); if (iter != optMap.end()) autoAllowQueries = iter->second.asBool(); iter = optMap.find("allow-methods"); if (iter != optMap.end()) autoAllowMethods = iter->second.asBool(); iter = optMap.find("max-subscriptions"); if (iter != optMap.end()) maxSubscriptions = iter->second.asUint32(); iter = optMap.find("min-sub-interval"); if (iter != optMap.end()) minSubInterval = iter->second.asUint32(); iter = optMap.find("sub-lifetime"); if (iter != optMap.end()) subLifetime = iter->second.asUint32(); iter = optMap.find("public-events"); if (iter != optMap.end()) publicEvents = iter->second.asBool(); iter = optMap.find("listen-on-direct"); if (iter != optMap.end()) listenOnDirect = iter->second.asBool(); iter = optMap.find("strict-security"); if (iter != optMap.end()) strictSecurity = iter->second.asBool(); iter = optMap.find("max-thread-wait-time"); if (iter != optMap.end()) maxThreadWaitTime = iter->second.asUint32(); } if (maxThreadWaitTime > interval) maxThreadWaitTime = interval; } AgentSessionImpl::~AgentSessionImpl() { if (opened) close(); if (thread) { thread->join(); delete thread; } } void AgentSessionImpl::open() { if (opened) throw QmfException("The session is already open"); // If the thread exists, join and delete it before creating a new one. if (thread) { thread->join(); delete thread; } const string addrArgs(";{create:never,node:{type:topic}}"); const string routableAddr("direct-agent.route." + qpid::types::Uuid(true).str()); attributes["_direct_subject"] = routableAddr; // Establish messaging addresses setAgentName(); directBase = "qmf." + domain + ".direct"; topicBase = "qmf." + domain + ".topic"; // Create AMQP session, receivers, and senders session = connection.createSession(); Receiver directRx; Receiver routableDirectRx = session.createReceiver(topicBase + "/" + routableAddr + addrArgs); Receiver topicRx = session.createReceiver(topicBase + "/console.#" + addrArgs); if (listenOnDirect && !strictSecurity) { directRx = session.createReceiver(directBase + "/" + agentName + addrArgs); directRx.setCapacity(64); } routableDirectRx.setCapacity(64); topicRx.setCapacity(64); if (!strictSecurity) directSender = session.createSender(directBase + addrArgs); topicSender = session.createSender(topicBase + addrArgs); // Start the receiver thread threadCanceled = false; opened = true; thread = new qpid::sys::Thread(*this); // Send an initial agent heartbeat message sendHeartbeat(); } void AgentSessionImpl::closeAsync() { if (!opened) return; // Stop the receiver thread. Don't join it until the destructor is called or open() is called. threadCanceled = true; opened = false; } void AgentSessionImpl::close() { closeAsync(); if (thread) { thread->join(); delete thread; thread = 0; } } bool AgentSessionImpl::nextEvent(AgentEvent& event, Duration timeout) { uint64_t milliseconds = timeout.getMilliseconds(); qpid::sys::Mutex::ScopedLock l(lock); if (eventQueue.empty() && milliseconds > 0) { int64_t nsecs(qpid::sys::TIME_INFINITE); if ((uint64_t)(nsecs / 1000000) > milliseconds) nsecs = (int64_t) milliseconds * 1000000; qpid::sys::Duration then(nsecs); cond.wait(lock, qpid::sys::AbsTime(qpid::sys::now(), then)); } if (!eventQueue.empty()) { event = eventQueue.front(); eventQueue.pop(); if (eventQueue.empty()) alertEventNotifierLH(false); return true; } return false; } int AgentSessionImpl::pendingEvents() const { qpid::sys::Mutex::ScopedLock l(lock); return eventQueue.size(); } void AgentSessionImpl::setEventNotifier(EventNotifierImpl* notifier) { qpid::sys::Mutex::ScopedLock l(lock); eventNotifier = notifier; } EventNotifierImpl* AgentSessionImpl::getEventNotifier() const { qpid::sys::Mutex::ScopedLock l(lock); return eventNotifier; } void AgentSessionImpl::registerSchema(Schema& schema) { if (!schema.isFinalized()) schema.finalize(); const SchemaId& schemaId(schema.getSchemaId()); qpid::sys::Mutex::ScopedLock l(lock); schemata[schemaId] = schema; schemaIndex[schemaId] = DataIndex(); // // Get the news out at the next periodic interval that there is new schema information. // schemaUpdateTime = uint64_t(qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now())); forceHeartbeat = true; } DataAddr AgentSessionImpl::addData(Data& data, const string& name, bool persistent) { if (externalStorage) throw QmfException("addData() must not be called when the 'external' option is enabled."); string dataName; if (name.empty()) dataName = qpid::types::Uuid(true).str(); else dataName = name; DataAddr addr(dataName, agentName, persistent ? 0 : bootSequence); data.setAddr(addr); { qpid::sys::Mutex::ScopedLock l(lock); DataIndex::const_iterator iter = globalIndex.find(addr); if (iter != globalIndex.end()) throw QmfException("Duplicate Data Address"); globalIndex[addr] = data; if (data.hasSchema()) schemaIndex[data.getSchemaId()][addr] = data; } // // TODO: Survey active subscriptions to see if they need to hear about this new data. // return addr; } void AgentSessionImpl::delData(const DataAddr& addr) { { qpid::sys::Mutex::ScopedLock l(lock); DataIndex::iterator iter = globalIndex.find(addr); if (iter == globalIndex.end()) return; if (iter->second.hasSchema()) { const SchemaId& schemaId(iter->second.getSchemaId()); schemaIndex[schemaId].erase(addr); } globalIndex.erase(iter); } // // TODO: Survey active subscriptions to see if they need to hear about this deleted data. // } void AgentSessionImpl::authAccept(AgentEvent& authEvent) { auto_ptr eventImpl(new AgentEventImpl(AGENT_QUERY)); eventImpl->setQuery(authEvent.getQuery()); eventImpl->setUserId(authEvent.getUserId()); eventImpl->setReplyTo(AgentEventImplAccess::get(authEvent).getReplyTo()); eventImpl->setCorrelationId(AgentEventImplAccess::get(authEvent).getCorrelationId()); AgentEvent event(eventImpl.release()); if (externalStorage) { enqueueEvent(event); return; } const Query& query(authEvent.getQuery()); if (query.getDataAddr().isValid()) { { qpid::sys::Mutex::ScopedLock l(lock); DataIndex::const_iterator iter = globalIndex.find(query.getDataAddr()); if (iter != globalIndex.end()) response(event, iter->second); } complete(event); return; } if (query.getSchemaId().isValid()) { { qpid::sys::Mutex::ScopedLock l(lock); map::const_iterator iter = schemaIndex.find(query.getSchemaId()); if (iter != schemaIndex.end()) for (DataIndex::const_iterator dIter = iter->second.begin(); dIter != iter->second.end(); dIter++) if (query.matchesPredicate(dIter->second.getProperties())) response(event, dIter->second); } complete(event); return; } raiseException(event, "Query is Invalid"); } void AgentSessionImpl::authReject(AgentEvent& event, const string& error) { raiseException(event, "Action Forbidden - " + error); } void AgentSessionImpl::raiseException(AgentEvent& event, const string& error) { Data exception(new DataImpl()); exception.setProperty("error_text", error); raiseException(event, exception); } void AgentSessionImpl::raiseException(AgentEvent& event, const Data& data) { Message msg; Variant::Map map; Variant::Map& headers(msg.getProperties()); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_RESPONSE; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_EXCEPTION; headers[protocol::HEADER_KEY_CONTENT] = protocol::HEADER_CONTENT_DATA; headers[protocol::HEADER_KEY_AGENT] = agentName; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; AgentEventImpl& eventImpl(AgentEventImplAccess::get(event)); const DataImpl& dataImpl(DataImplAccess::get(data)); msg.setCorrelationId(eventImpl.getCorrelationId()); encode(dataImpl.asMap(), msg); send(msg, eventImpl.getReplyTo()); QPID_LOG(trace, "SENT Exception to=" << eventImpl.getReplyTo()); } void AgentSessionImpl::response(AgentEvent& event, const Data& data) { AgentEventImpl& impl(AgentEventImplAccess::get(event)); uint32_t count = impl.enqueueData(data); if (count >= 8) flushResponses(event, false); } void AgentSessionImpl::complete(AgentEvent& event) { flushResponses(event, true); } void AgentSessionImpl::methodSuccess(AgentEvent& event) { Message msg; Variant::Map map; Variant::Map& headers(msg.getProperties()); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_RESPONSE; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_METHOD_RESPONSE; headers[protocol::HEADER_KEY_AGENT] = agentName; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; AgentEventImpl& eventImpl(AgentEventImplAccess::get(event)); const Variant::Map& outArgs(eventImpl.getReturnArguments()); const Variant::Map& outSubtypes(eventImpl.getReturnArgumentSubtypes()); map["_arguments"] = outArgs; if (!outSubtypes.empty()) map["_subtypes"] = outSubtypes; msg.setCorrelationId(eventImpl.getCorrelationId()); encode(map, msg); send(msg, eventImpl.getReplyTo()); QPID_LOG(trace, "SENT MethodResponse to=" << eventImpl.getReplyTo()); } void AgentSessionImpl::raiseEvent(const Data& data) { int severity(SEV_NOTICE); if (data.hasSchema()) { const Schema& schema(DataImplAccess::get(data).getSchema()); if (schema.isValid()) severity = schema.getDefaultSeverity(); } raiseEvent(data, severity); } void AgentSessionImpl::raiseEvent(const Data& data, int severity) { Message msg; Variant::Map map; Variant::Map& headers(msg.getProperties()); string subject("agent.ind.event"); if (data.hasSchema()) { const SchemaId& schemaId(data.getSchemaId()); if (schemaId.getType() != SCHEMA_TYPE_EVENT) throw QmfException("Cannot call raiseEvent on data that is not an Event"); subject = subject + "." + schemaId.getPackageName() + "." + schemaId.getName(); } if (severity < SEV_EMERG || severity > SEV_DEBUG) throw QmfException("Invalid severity value"); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_INDICATION; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_DATA_INDICATION; headers[protocol::HEADER_KEY_CONTENT] = protocol::HEADER_CONTENT_EVENT; headers[protocol::HEADER_KEY_AGENT] = agentName; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; msg.setSubject(subject); Variant::List list; Variant::Map dataAsMap(DataImplAccess::get(data).asMap()); dataAsMap["_severity"] = severity; dataAsMap["_timestamp"] = uint64_t(qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now())); list.push_back(dataAsMap); encode(list, msg); topicSender.send(msg); QPID_LOG(trace, "SENT EventIndication to=" << topicSender.getName() << "/" << subject); } void AgentSessionImpl::checkOpen() { if (opened) throw QmfException("Operation must be performed before calling open()"); } void AgentSessionImpl::enqueueEvent(const AgentEvent& event) { qpid::sys::Mutex::ScopedLock l(lock); bool notify = eventQueue.empty(); eventQueue.push(event); if (notify) { cond.notify(); alertEventNotifierLH(true); } } void AgentSessionImpl::setAgentName() { Variant::Map::iterator iter; string vendor; string product; string instance; iter = attributes.find("_vendor"); if (iter == attributes.end()) attributes["_vendor"] = vendor; else vendor = iter->second.asString(); iter = attributes.find("_product"); if (iter == attributes.end()) attributes["_product"] = product; else product = iter->second.asString(); iter = attributes.find("_instance"); if (iter == attributes.end()) { instance = qpid::types::Uuid(true).str(); attributes["_instance"] = instance; } else instance = iter->second.asString(); agentName = vendor + ":" + product + ":" + instance; attributes["_name"] = agentName; } void AgentSessionImpl::handleLocateRequest(const Variant::List& predicate, const Message& msg) { QPID_LOG(trace, "RCVD AgentLocateRequest from=" << msg.getReplyTo()); if (!predicate.empty()) { Query agentQuery(QUERY_OBJECT); agentQuery.setPredicate(predicate); if (!agentQuery.matchesPredicate(attributes)) { QPID_LOG(trace, "AgentLocate predicate does not match this agent, ignoring"); return; } } Message reply; Variant::Map map; Variant::Map& headers(reply.getProperties()); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_INDICATION; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_AGENT_LOCATE_RESPONSE; headers[protocol::HEADER_KEY_AGENT] = agentName; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; map["_values"] = attributes; map["_values"].asMap()[protocol::AGENT_ATTR_TIMESTAMP] = uint64_t(qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now())); map["_values"].asMap()[protocol::AGENT_ATTR_HEARTBEAT_INTERVAL] = interval; map["_values"].asMap()[protocol::AGENT_ATTR_EPOCH] = bootSequence; map["_values"].asMap()[protocol::AGENT_ATTR_SCHEMA_UPDATED_TIMESTAMP] = schemaUpdateTime; encode(map, reply); send(reply, msg.getReplyTo()); QPID_LOG(trace, "SENT AgentLocateResponse to=" << msg.getReplyTo()); } void AgentSessionImpl::handleMethodRequest(const Variant::Map& content, const Message& msg) { QPID_LOG(trace, "RCVD MethodRequest map=" << content << " from=" << msg.getReplyTo() << " cid=" << msg.getCorrelationId()); // // Construct an AgentEvent to be sent to the application. // auto_ptr eventImpl(new AgentEventImpl(AGENT_METHOD)); eventImpl->setUserId(msg.getUserId()); eventImpl->setReplyTo(msg.getReplyTo()); eventImpl->setCorrelationId(msg.getCorrelationId()); Variant::Map::const_iterator iter; iter = content.find("_method_name"); if (iter == content.end()) { AgentEvent event(eventImpl.release()); raiseException(event, "Malformed MethodRequest: missing _method_name field"); return; } eventImpl->setMethodName(iter->second.asString()); iter = content.find("_arguments"); if (iter != content.end()) eventImpl->setArguments(iter->second.asMap()); iter = content.find("_subtypes"); if (iter != content.end()) eventImpl->setArgumentSubtypes(iter->second.asMap()); iter = content.find("_object_id"); if (iter != content.end()) { DataAddr addr(new DataAddrImpl(iter->second.asMap())); eventImpl->setDataAddr(addr); if (!externalStorage) { DataIndex::const_iterator iter(globalIndex.find(addr)); if (iter == globalIndex.end()) { AgentEvent event(eventImpl.release()); raiseException(event, "No data object found with the specified address"); return; } const Schema& schema(DataImplAccess::get(iter->second).getSchema()); if (schema.isValid()) { eventImpl->setSchema(schema); for (Variant::Map::const_iterator aIter = eventImpl->getArguments().begin(); aIter != eventImpl->getArguments().end(); aIter++) { const Schema& schema(DataImplAccess::get(iter->second).getSchema()); if (!SchemaImplAccess::get(schema).isValidMethodInArg(eventImpl->getMethodName(), aIter->first, aIter->second)) { AgentEvent event(eventImpl.release()); raiseException(event, "Invalid argument: " + aIter->first); return; } } } } } enqueueEvent(AgentEvent(eventImpl.release())); } void AgentSessionImpl::handleQueryRequest(const Variant::Map& content, const Message& msg) { QPID_LOG(trace, "RCVD QueryRequest query=" << content << " from=" << msg.getReplyTo() << " cid=" << msg.getCorrelationId()); // // Construct an AgentEvent to be sent to the application or directly handled by the agent. // auto_ptr queryImpl(new QueryImpl(content)); auto_ptr eventImpl(new AgentEventImpl(AGENT_AUTH_QUERY)); eventImpl->setUserId(msg.getUserId()); eventImpl->setReplyTo(msg.getReplyTo()); eventImpl->setCorrelationId(msg.getCorrelationId()); eventImpl->setQuery(queryImpl.release()); AgentEvent ae(eventImpl.release()); if (ae.getQuery().getTarget() == QUERY_SCHEMA_ID || ae.getQuery().getTarget() == QUERY_SCHEMA) { handleSchemaRequest(ae); return; } if (autoAllowQueries) authAccept(ae); else enqueueEvent(ae); } void AgentSessionImpl::handleSchemaRequest(AgentEvent& event) { SchemaMap::const_iterator iter; string error; const Query& query(event.getQuery()); Message msg; Variant::List content; Variant::Map map; Variant::Map& headers(msg.getProperties()); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_RESPONSE; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_QUERY_RESPONSE; headers[protocol::HEADER_KEY_AGENT] = agentName; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; { qpid::sys::Mutex::ScopedLock l(lock); if (query.getTarget() == QUERY_SCHEMA_ID) { headers[protocol::HEADER_KEY_CONTENT] = "_schema_id"; for (iter = schemata.begin(); iter != schemata.end(); iter++) content.push_back(SchemaIdImplAccess::get(iter->first).asMap()); } else if (query.getSchemaId().isValid()) { headers[protocol::HEADER_KEY_CONTENT] = "_schema"; iter = schemata.find(query.getSchemaId()); if (iter != schemata.end()) content.push_back(SchemaImplAccess::get(iter->second).asMap()); } else { error = "Invalid Schema Query: Requests for SCHEMA must supply a valid schema ID."; } } if (!error.empty()) { raiseException(event, error); return; } AgentEventImpl& eventImpl(AgentEventImplAccess::get(event)); msg.setCorrelationId(eventImpl.getCorrelationId()); encode(content, msg); send(msg, eventImpl.getReplyTo()); QPID_LOG(trace, "SENT QueryResponse(Schema) to=" << eventImpl.getReplyTo()); } void AgentSessionImpl::handleV1SchemaRequest(qpid::management::Buffer& buffer, uint32_t seq, const Message& msg) { string packageName; string className; uint8_t hashBits[16]; buffer.getShortString(packageName); buffer.getShortString(className); buffer.getBin128(hashBits); QPID_LOG(trace, "RCVD QMFv1 SchemaRequest for " << packageName << ":" << className); qpid::types::Uuid hash(hashBits); map::const_iterator iter; string replyContent; SchemaId dataId(SCHEMA_TYPE_DATA, packageName, className); dataId.setHash(hash); { qpid::sys::Mutex::ScopedLock l(lock); iter = schemata.find(dataId); if (iter != schemata.end()) replyContent = SchemaImplAccess::get(iter->second).asV1Content(seq); else { SchemaId eventId(SCHEMA_TYPE_EVENT, packageName, className); eventId.setHash(hash); iter = schemata.find(dataId); if (iter != schemata.end()) replyContent = SchemaImplAccess::get(iter->second).asV1Content(seq); else return; } } Message reply; Variant::Map& headers(reply.getProperties()); headers[protocol::HEADER_KEY_AGENT] = agentName; reply.setContent(replyContent); send(reply, msg.getReplyTo()); QPID_LOG(trace, "SENT QMFv1 SchemaResponse to=" << msg.getReplyTo()); } void AgentSessionImpl::dispatch(Message msg) { const Variant::Map& properties(msg.getProperties()); Variant::Map::const_iterator iter; // // If strict-security is enabled, make sure that reply-to address complies with the // strict-security addressing pattern (i.e. start with 'qmf..topic/direct-console.'). // if (strictSecurity && msg.getReplyTo()) { if (msg.getReplyTo().getName() != topicBase || msg.getReplyTo().getSubject().find("direct-console.") != 0) { QPID_LOG(warning, "Reply-to violates strict-security policy: " << msg.getReplyTo().str()); return; } } iter = properties.find(protocol::HEADER_KEY_APP_ID); if (iter != properties.end() && iter->second.asString() == protocol::HEADER_APP_ID_QMF) { // // Dispatch a QMFv2 formatted message // iter = properties.find(protocol::HEADER_KEY_OPCODE); if (iter == properties.end()) { QPID_LOG(trace, "Message received with no 'qmf.opcode' header"); return; } const string& opcode = iter->second.asString(); if (msg.getContentType() == "amqp/list") { Variant::List content; decode(msg, content); if (opcode == protocol::HEADER_OPCODE_AGENT_LOCATE_REQUEST) handleLocateRequest(content, msg); else { QPID_LOG(trace, "Unexpected QMFv2 opcode with 'amqp/list' content: " << opcode); } } else if (msg.getContentType() == "amqp/map") { Variant::Map content; decode(msg, content); if (opcode == protocol::HEADER_OPCODE_METHOD_REQUEST) handleMethodRequest(content, msg); else if (opcode == protocol::HEADER_OPCODE_QUERY_REQUEST) handleQueryRequest(content, msg); else { QPID_LOG(trace, "Unexpected QMFv2 opcode with 'amqp/map' content: " << opcode); } } else { QPID_LOG(trace, "Unexpected QMFv2 content type. Expected amqp/list or amqp/map"); } } else { // // Dispatch a QMFv1 formatted message // const string& body(msg.getContent()); if (body.size() < 8) return; qpid::management::Buffer buffer(const_cast(body.c_str()), body.size()); if (buffer.getOctet() != 'A') return; if (buffer.getOctet() != 'M') return; if (buffer.getOctet() != '2') return; char v1Opcode(buffer.getOctet()); uint32_t seq(buffer.getLong()); if (v1Opcode == 'S') handleV1SchemaRequest(buffer, seq, msg); else { QPID_LOG(trace, "Unknown or Unsupported QMFv1 opcode: " << v1Opcode); } } } void AgentSessionImpl::sendHeartbeat() { Message msg; Variant::Map map; Variant::Map& headers(msg.getProperties()); std::stringstream address; address << "agent.ind.heartbeat"; // append .. to address key if present. Variant::Map::const_iterator v; if ((v = attributes.find("_vendor")) != attributes.end() && !v->second.getString().empty()) { address << "." << v->second.getString(); if ((v = attributes.find("_product")) != attributes.end() && !v->second.getString().empty()) { address << "." << v->second.getString(); } } headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_INDICATION; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_AGENT_HEARTBEAT_INDICATION; headers[protocol::HEADER_KEY_AGENT] = agentName; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; msg.setSubject(address.str()); map["_values"] = attributes; map["_values"].asMap()[protocol::AGENT_ATTR_TIMESTAMP] = uint64_t(qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now())); map["_values"].asMap()[protocol::AGENT_ATTR_HEARTBEAT_INTERVAL] = interval; map["_values"].asMap()[protocol::AGENT_ATTR_EPOCH] = bootSequence; map["_values"].asMap()[protocol::AGENT_ATTR_SCHEMA_UPDATED_TIMESTAMP] = schemaUpdateTime; encode(map, msg); topicSender.send(msg); QPID_LOG(trace, "SENT AgentHeartbeat name=" << agentName); } void AgentSessionImpl::send(Message msg, const Address& to) { Sender sender; if (strictSecurity && to.getName() != topicBase) { QPID_LOG(warning, "Address violates strict-security policy: " << to); return; } if (to.getName() == directBase) { msg.setSubject(to.getSubject()); sender = directSender; } else if (to.getName() == topicBase) { msg.setSubject(to.getSubject()); sender = topicSender; } else sender = session.createSender(to); sender.send(msg); } void AgentSessionImpl::flushResponses(AgentEvent& event, bool final) { Message msg; Variant::Map map; Variant::Map& headers(msg.getProperties()); headers[protocol::HEADER_KEY_METHOD] = protocol::HEADER_METHOD_RESPONSE; headers[protocol::HEADER_KEY_OPCODE] = protocol::HEADER_OPCODE_QUERY_RESPONSE; headers[protocol::HEADER_KEY_CONTENT] = protocol::HEADER_CONTENT_DATA; headers[protocol::HEADER_KEY_AGENT] = agentName; headers[protocol::HEADER_KEY_APP_ID] = protocol::HEADER_APP_ID_QMF; if (!final) headers[protocol::HEADER_KEY_PARTIAL] = Variant(); Variant::List body; AgentEventImpl& eventImpl(AgentEventImplAccess::get(event)); Data data(eventImpl.dequeueData()); while (data.isValid()) { DataImpl& dataImpl(DataImplAccess::get(data)); body.push_back(dataImpl.asMap()); data = eventImpl.dequeueData(); } msg.setCorrelationId(eventImpl.getCorrelationId()); encode(body, msg); send(msg, eventImpl.getReplyTo()); QPID_LOG(trace, "SENT QueryResponse to=" << eventImpl.getReplyTo()); } void AgentSessionImpl::periodicProcessing(uint64_t seconds) { // // The granularity of this timer is seconds. Don't waste time looking for work if // it's been less than a second since we last visited. // if (seconds == lastVisit) return; //uint64_t thisInterval(seconds - lastVisit); lastVisit = seconds; // // First time through, set lastHeartbeat to the current time. // if (lastHeartbeat == 0) lastHeartbeat = seconds; // // If the hearbeat interval has elapsed, send a heartbeat. // if (forceHeartbeat || (seconds - lastHeartbeat >= interval)) { lastHeartbeat = seconds; forceHeartbeat = false; sendHeartbeat(); } // // TODO: process any active subscriptions on their intervals. // } void AgentSessionImpl::alertEventNotifierLH(bool readable) { if (eventNotifier) eventNotifier->setReadable(readable); } void AgentSessionImpl::run() { QPID_LOG(debug, "AgentSession thread started for agent " << agentName); try { while (!threadCanceled) { periodicProcessing((uint64_t) qpid::sys::Duration(qpid::sys::EPOCH, qpid::sys::now()) / qpid::sys::TIME_SEC); Receiver rx; bool valid = session.nextReceiver(rx, Duration::SECOND * maxThreadWaitTime); if (threadCanceled) break; if (valid) { try { dispatch(rx.fetch()); } catch (qpid::types::Exception& e) { QPID_LOG(error, "Exception caught in message dispatch: " << e.what()); } session.acknowledge(); } } } catch (qpid::types::Exception& e) { QPID_LOG(error, "Exception caught in message thread - exiting: " << e.what()); enqueueEvent(AgentEvent(new AgentEventImpl(AGENT_THREAD_FAILED))); } session.close(); QPID_LOG(debug, "AgentSession thread exiting for agent " << agentName); } AgentSessionImpl& AgentSessionImplAccess::get(AgentSession& session) { return *session.impl; } const AgentSessionImpl& AgentSessionImplAccess::get(const AgentSession& session) { return *session.impl; } qpidc-0.16/src/qmf/PrivateImplRef.h0000664000076400007640000000556211562043320017554 0ustar00jrossjross00000000000000#ifndef QMF_PRIVATEIMPL_H #define QMF_PRIVATEIMPL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/ImportExport.h" #include "qpid/RefCounted.h" #include namespace qmf { /** * Helper class to implement a class with a private, reference counted * implementation and reference semantics. * * Such classes are used in the public API to hide implementation, they * should. Example of use: * * === Foo.h * * template PrivateImplRef; * class FooImpl; * * Foo : public Handle { * public: * Foo(FooImpl* = 0); * Foo(const Foo&); * ~Foo(); * Foo& operator=(const Foo&); * * int fooDo(); // and other Foo functions... * * private: * typedef FooImpl Impl; * Impl* impl; * friend class PrivateImplRef; * * === Foo.cpp * * typedef PrivateImplRef PI; * Foo::Foo(FooImpl* p) { PI::ctor(*this, p); } * Foo::Foo(const Foo& c) : Handle() { PI::copy(*this, c); } * Foo::~Foo() { PI::dtor(*this); } * Foo& Foo::operator=(const Foo& c) { return PI::assign(*this, c); } * * int foo::fooDo() { return impl->fooDo(); } * */ template class PrivateImplRef { public: typedef typename T::Impl Impl; typedef boost::intrusive_ptr intrusive_ptr; /** Get the implementation pointer from a handle */ static intrusive_ptr get(const T& t) { return intrusive_ptr(t.impl); } /** Set the implementation pointer in a handle */ static void set(T& t, const intrusive_ptr& p) { if (t.impl == p) return; if (t.impl) boost::intrusive_ptr_release(t.impl); t.impl = p.get(); if (t.impl) boost::intrusive_ptr_add_ref(t.impl); } // Helper functions to implement the ctor, dtor, copy, assign static void ctor(T& t, Impl* p) { t.impl = p; if (p) boost::intrusive_ptr_add_ref(p); } static void copy(T& t, const T& x) { if (&t == &x) return; t.impl = 0; assign(t, x); } static void dtor(T& t) { if(t.impl) boost::intrusive_ptr_release(t.impl); } static T& assign(T& t, const T& x) { set(t, get(x)); return t;} }; } // namespace qmf #endif /*!QMF_PRIVATEIMPL_H*/ qpidc-0.16/src/qmf/EventNotifierImpl.h0000664000076400007640000000260211633730116020263 0ustar00jrossjross00000000000000#ifndef __QMF_EVENT_NOTIFIER_IMPL_H #define __QMF_EVENT_NOTIFIER_IMPL_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/AgentSession.h" #include "qmf/ConsoleSession.h" namespace qmf { class EventNotifierImpl { private: bool readable; AgentSession agent; ConsoleSession console; public: EventNotifierImpl(AgentSession& agentSession); EventNotifierImpl(ConsoleSession& consoleSession); virtual ~EventNotifierImpl(); void setReadable(bool readable); bool isReadable() const; protected: virtual void update(bool readable) = 0; }; } #endif qpidc-0.16/src/qmf/PosixEventNotifier.cpp0000664000076400007640000000340711634657177021043 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/posix/EventNotifier.h" #include "qmf/PosixEventNotifierImpl.h" #include "qmf/PrivateImplRef.h" using namespace qmf; using namespace std; typedef qmf::PrivateImplRef PI; posix::EventNotifier::EventNotifier(PosixEventNotifierImpl* impl) { PI::ctor(*this, impl); } posix::EventNotifier::EventNotifier(AgentSession& agentSession) { PI::ctor(*this, new PosixEventNotifierImpl(agentSession)); } posix::EventNotifier::EventNotifier(ConsoleSession& consoleSession) { PI::ctor(*this, new PosixEventNotifierImpl(consoleSession)); } posix::EventNotifier::EventNotifier(const posix::EventNotifier& that) : Handle() { PI::copy(*this, that); } posix::EventNotifier::~EventNotifier() { PI::dtor(*this); } posix::EventNotifier& posix::EventNotifier::operator=(const posix::EventNotifier& that) { return PI::assign(*this, that); } int posix::EventNotifier::getHandle() const { return impl->getHandle(); } qpidc-0.16/src/qmf/Schema.cpp0000664000076400007640000002733211512650117016420 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/SchemaImpl.h" #include "qmf/PrivateImplRef.h" #include "qmf/exceptions.h" #include "qmf/SchemaTypes.h" #include "qmf/SchemaIdImpl.h" #include "qmf/SchemaPropertyImpl.h" #include "qmf/SchemaMethodImpl.h" #include "qmf/Hash.h" #include "qpid/log/Statement.h" #include "qpid/management/Buffer.h" #include using namespace std; using qpid::types::Variant; using namespace qmf; typedef PrivateImplRef PI; Schema::Schema(SchemaImpl* impl) { PI::ctor(*this, impl); } Schema::Schema(const Schema& s) : qmf::Handle() { PI::copy(*this, s); } Schema::~Schema() { PI::dtor(*this); } Schema& Schema::operator=(const Schema& s) { return PI::assign(*this, s); } Schema::Schema(int t, const string& p, const string& c) { PI::ctor(*this, new SchemaImpl(t, p, c)); } const SchemaId& Schema::getSchemaId() const { return impl->getSchemaId(); } void Schema::finalize() { impl->finalize(); } bool Schema::isFinalized() const { return impl->isFinalized(); } void Schema::addProperty(const SchemaProperty& p) { impl->addProperty(p); } void Schema::addMethod(const SchemaMethod& m) { impl->addMethod(m); } void Schema::setDesc(const string& d) { impl->setDesc(d); } const string& Schema::getDesc() const { return impl->getDesc(); } void Schema::setDefaultSeverity(int s) { impl->setDefaultSeverity(s); } int Schema::getDefaultSeverity() const { return impl->getDefaultSeverity(); } uint32_t Schema::getPropertyCount() const { return impl->getPropertyCount(); } SchemaProperty Schema::getProperty(uint32_t i) const { return impl->getProperty(i); } uint32_t Schema::getMethodCount() const { return impl->getMethodCount(); } SchemaMethod Schema::getMethod(uint32_t i) const { return impl->getMethod(i); } //======================================================================================== // Impl Method Bodies //======================================================================================== SchemaImpl::SchemaImpl(const Variant::Map& map) : finalized(false) { Variant::Map::const_iterator iter; Variant::List::const_iterator lIter; iter = map.find("_schema_id"); if (iter == map.end()) throw QmfException("Schema map missing _schema_id element"); schemaId = SchemaId(new SchemaIdImpl(iter->second.asMap())); iter = map.find("_desc"); if (iter != map.end()) description = iter->second.asString(); iter = map.find("_default_severity"); if (iter != map.end()) defaultSeverity = int(iter->second.asUint32()); iter = map.find("_properties"); if (iter != map.end()) { const Variant::List& props(iter->second.asList()); for (lIter = props.begin(); lIter != props.end(); lIter++) addProperty(SchemaProperty(new SchemaPropertyImpl(lIter->asMap()))); } iter = map.find("_methods"); if (iter != map.end()) { const Variant::List& meths(iter->second.asList()); for (lIter = meths.begin(); lIter != meths.end(); lIter++) addMethod(SchemaMethod(new SchemaMethodImpl(lIter->asMap()))); } finalized = true; } Variant::Map SchemaImpl::asMap() const { Variant::Map map; Variant::List propList; Variant::List methList; checkNotFinal(); map["_schema_id"] = SchemaIdImplAccess::get(schemaId).asMap(); if (!description.empty()) map["_desc"] = description; if (schemaId.getType() == SCHEMA_TYPE_EVENT) map["_default_severity"] = uint32_t(defaultSeverity); for (list::const_iterator pIter = properties.begin(); pIter != properties.end(); pIter++) propList.push_back(SchemaPropertyImplAccess::get(*pIter).asMap()); for (list::const_iterator mIter = methods.begin(); mIter != methods.end(); mIter++) methList.push_back(SchemaMethodImplAccess::get(*mIter).asMap()); map["_properties"] = propList; map["_methods"] = methList; return map; } SchemaImpl::SchemaImpl(qpid::management::Buffer& buffer) : finalized(false) { int schemaType; string packageName; string className; uint8_t hash[16]; schemaType = int(buffer.getOctet()); buffer.getShortString(packageName); buffer.getShortString(className); buffer.getBin128(hash); schemaId = SchemaId(schemaType, packageName, className); schemaId.setHash(qpid::types::Uuid(hash)); if (schemaType == SCHEMA_TYPE_DATA) { uint16_t propCount(buffer.getShort()); uint16_t statCount(buffer.getShort()); uint16_t methCount(buffer.getShort()); for (uint16_t idx = 0; idx < propCount + statCount; idx++) addProperty(new SchemaPropertyImpl(buffer)); for (uint16_t idx = 0; idx < methCount; idx++) addMethod(new SchemaMethodImpl(buffer)); } finalized = true; } string SchemaImpl::asV1Content(uint32_t sequence) const { #define RAW_BUF_SIZE 65536 char rawBuf[RAW_BUF_SIZE]; qpid::management::Buffer buffer(rawBuf, RAW_BUF_SIZE); // // Encode the QMFv1 Header // buffer.putOctet('A'); buffer.putOctet('M'); buffer.putOctet('2'); buffer.putOctet('s'); buffer.putLong(sequence); // // Encode the common schema information // buffer.putOctet(uint8_t(schemaId.getType())); buffer.putShortString(schemaId.getPackageName()); buffer.putShortString(schemaId.getName()); buffer.putBin128(schemaId.getHash().data()); if (schemaId.getType() == SCHEMA_TYPE_DATA) { buffer.putShort(properties.size()); buffer.putShort(0); buffer.putShort(methods.size()); for (list::const_iterator pIter = properties.begin(); pIter != properties.end(); pIter++) SchemaPropertyImplAccess::get(*pIter).encodeV1(buffer, false, false); for (list::const_iterator mIter = methods.begin(); mIter != methods.end(); mIter++) SchemaMethodImplAccess::get(*mIter).encodeV1(buffer); } else { buffer.putShort(properties.size()); for (list::const_iterator pIter = properties.begin(); pIter != properties.end(); pIter++) SchemaPropertyImplAccess::get(*pIter).encodeV1(buffer, true, false); } return string(rawBuf, buffer.getPosition()); } bool SchemaImpl::isValidProperty(const std::string& k, const Variant& v) const { for (list::const_iterator iter = properties.begin(); iter != properties.end(); iter++) if (iter->getName() == k) return (isCompatibleType(iter->getType(), v.getType())); return false; } bool SchemaImpl::isValidMethodInArg(const std::string& m, const std::string& k, const Variant& v) const { for (list::const_iterator mIter = methods.begin(); mIter != methods.end(); mIter++) { if (mIter->getName() == m) { uint32_t count(mIter->getArgumentCount()); for (uint32_t i = 0; i < count; i++) { const SchemaProperty prop(mIter->getArgument(i)); if (prop.getName() == k) { if (prop.getDirection() == DIR_IN || prop.getDirection() == DIR_IN_OUT) return (isCompatibleType(prop.getType(), v.getType())); else return false; } } } } return false; } bool SchemaImpl::isValidMethodOutArg(const std::string& m, const std::string& k, const Variant& v) const { for (list::const_iterator mIter = methods.begin(); mIter != methods.end(); mIter++) { if (mIter->getName() == m) { uint32_t count(mIter->getArgumentCount()); for (uint32_t i = 0; i < count; i++) { const SchemaProperty prop(mIter->getArgument(i)); if (prop.getName() == k) { if (prop.getDirection() == DIR_OUT || prop.getDirection() == DIR_IN_OUT) return (isCompatibleType(prop.getType(), v.getType())); else return false; } } } } return false; } void SchemaImpl::finalize() { Hash hash; hash.update((uint8_t) schemaId.getType()); hash.update(schemaId.getPackageName()); hash.update(schemaId.getName()); for (list::const_iterator pIter = properties.begin(); pIter != properties.end(); pIter++) SchemaPropertyImplAccess::get(*pIter).updateHash(hash); for (list::const_iterator mIter = methods.begin(); mIter != methods.end(); mIter++) SchemaMethodImplAccess::get(*mIter).updateHash(hash); schemaId.setHash(hash.asUuid()); QPID_LOG(debug, "Schema Finalized: " << schemaId.getPackageName() << ":" << schemaId.getName() << ":" << schemaId.getHash()); finalized = true; } SchemaProperty SchemaImpl::getProperty(uint32_t i) const { uint32_t count = 0; for (list::const_iterator iter = properties.begin(); iter != properties.end(); iter++) if (count++ == i) return *iter; throw IndexOutOfRange(); } SchemaMethod SchemaImpl::getMethod(uint32_t i) const { uint32_t count = 0; for (list::const_iterator iter = methods.begin(); iter != methods.end(); iter++) if (count++ == i) return *iter; throw IndexOutOfRange(); } void SchemaImpl::checkFinal() const { if (finalized) throw QmfException("Modification of a finalized schema is forbidden"); } void SchemaImpl::checkNotFinal() const { if (!finalized) throw QmfException("Schema is not yet finalized/registered"); } bool SchemaImpl::isCompatibleType(int qmfType, qpid::types::VariantType qpidType) const { bool typeValid(false); switch (qpidType) { case qpid::types::VAR_VOID: if (qmfType == SCHEMA_DATA_VOID) typeValid = true; break; case qpid::types::VAR_BOOL: if (qmfType == SCHEMA_DATA_BOOL) typeValid = true; break; case qpid::types::VAR_UINT8: case qpid::types::VAR_UINT16: case qpid::types::VAR_UINT32: case qpid::types::VAR_UINT64: case qpid::types::VAR_INT8: case qpid::types::VAR_INT16: case qpid::types::VAR_INT32: case qpid::types::VAR_INT64: if (qmfType == SCHEMA_DATA_INT) typeValid = true; break; case qpid::types::VAR_FLOAT: case qpid::types::VAR_DOUBLE: if (qmfType == SCHEMA_DATA_FLOAT) typeValid = true; break; case qpid::types::VAR_STRING: if (qmfType == SCHEMA_DATA_STRING) typeValid = true; break; case qpid::types::VAR_MAP: if (qmfType == SCHEMA_DATA_MAP) typeValid = true; break; case qpid::types::VAR_LIST: if (qmfType == SCHEMA_DATA_LIST) typeValid = true; break; case qpid::types::VAR_UUID: if (qmfType == SCHEMA_DATA_UUID) typeValid = true; break; } return typeValid; } SchemaImpl& SchemaImplAccess::get(Schema& item) { return *item.impl; } const SchemaImpl& SchemaImplAccess::get(const Schema& item) { return *item.impl; } qpidc-0.16/src/qmf/exceptions.cpp0000664000076400007640000000257511431072571017405 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/exceptions.h" namespace qmf { QmfException::QmfException(const std::string& msg) : qpid::types::Exception(msg) {} QmfException::~QmfException() throw() {} KeyNotFound::KeyNotFound(const std::string& msg) : QmfException("Key Not Found: " + msg) {} KeyNotFound::~KeyNotFound() throw() {} IndexOutOfRange::IndexOutOfRange() : QmfException("Index out-of-range") {} IndexOutOfRange::~IndexOutOfRange() throw() {} OperationTimedOut::OperationTimedOut() : QmfException("Timeout Expired") {} OperationTimedOut::~OperationTimedOut() throw() {} } qpidc-0.16/src/qmf/SchemaMethodImpl.h0000664000076400007640000000452111446224071020045 0ustar00jrossjross00000000000000#ifndef _QMF_SCHEMA_METHOD_IMPL_H_ #define _QMF_SCHEMA_METHOD_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/SchemaTypes.h" #include "qmf/SchemaMethod.h" #include "qmf/SchemaPropertyImpl.h" #include "qpid/management/Buffer.h" #include #include namespace qpid { namespace management { class Buffer; }} namespace qmf { class Hash; class SchemaMethodImpl : public virtual qpid::RefCounted { public: // // Public impl-only methods // SchemaMethodImpl(const qpid::types::Variant::Map& m); SchemaMethodImpl(qpid::management::Buffer& v1Buffer); qpid::types::Variant::Map asMap() const; void updateHash(Hash&) const; void encodeV1(qpid::management::Buffer&) const; // // Methods from API handle // SchemaMethodImpl(const std::string& n, const std::string& options); void setDesc(const std::string& d) { desc = d; } void addArgument(const SchemaProperty& p) { arguments.push_back(p); } const std::string& getName() const { return name; } const std::string& getDesc() const { return desc; } uint32_t getArgumentCount() const { return arguments.size(); } SchemaProperty getArgument(uint32_t i) const; private: std::string name; std::string desc; std::list arguments; }; struct SchemaMethodImplAccess { static SchemaMethodImpl& get(SchemaMethod&); static const SchemaMethodImpl& get(const SchemaMethod&); }; } #endif qpidc-0.16/src/qmf/DataAddrImpl.h0000664000076400007640000000466211607071066017161 0ustar00jrossjross00000000000000#ifndef _QMF_DATA_ADDR_IMPL_H_ #define _QMF_DATA_ADDR_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qpid/sys/IntegerTypes.h" #include "qpid/types/Variant.h" #include "qmf/DataAddr.h" namespace qmf { class DataAddrImpl : public virtual qpid::RefCounted { public: // // Impl-only methods // void setName(const std::string& n) { name = n; } void setAgent(const std::string& n, uint32_t e=0) { agentName = n; agentEpoch = e; } // // Methods from API handle // bool operator==(const DataAddrImpl&) const; bool operator<(const DataAddrImpl&) const; DataAddrImpl(const qpid::types::Variant::Map&); DataAddrImpl(const std::string& _name, const std::string& _agentName, uint32_t _agentEpoch=0) : agentName(_agentName), name(_name), agentEpoch(_agentEpoch) {} const std::string& getName() const { return name; } const std::string& getAgentName() const { return agentName; } uint32_t getAgentEpoch() const { return agentEpoch; } qpid::types::Variant::Map asMap() const; private: std::string agentName; std::string name; uint32_t agentEpoch; }; struct DataAddrImplAccess { static DataAddrImpl& get(DataAddr&); static const DataAddrImpl& get(const DataAddr&); }; struct DataAddrCompare { bool operator() (const DataAddr& lhs, const DataAddr& rhs) const { if (lhs.getName() != rhs.getName()) return lhs.getName() < rhs.getName(); return lhs.getAgentName() < rhs.getAgentName(); } }; } #endif qpidc-0.16/src/qmf/BrokerImportExport.h0000664000076400007640000000266611720530342020507 0ustar00jrossjross00000000000000#ifndef QPID_BROKER_IMPORT_EXPORT_H #define QPID_BROKER_IMPORT_EXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #if defined(WIN32) && !defined(QPID_DECLARE_STATIC) # if defined(BROKER_EXPORT) || defined (qpidbroker_EXPORTS) # define QPID_BROKER_EXTERN __declspec(dllexport) # else # define QPID_BROKER_EXTERN __declspec(dllimport) # endif # ifdef _MSC_VER # define QPID_BROKER_CLASS_EXTERN # define QPID_BROKER_INLINE_EXTERN QPID_BROKER_EXTERN # else # define QPID_BROKER_CLASS_EXTERN QPID_BROKER_EXTERN # define QPID_BROKER_INLINE_EXTERN # endif #else # define QPID_BROKER_EXTERN # define QPID_BROKER_CLASS_EXTERN # define QPID_BROKER_INLINE_EXTERN #endif #endif qpidc-0.16/src/qmf/AgentEvent.cpp0000664000076400007640000000574411513127136017264 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/AgentEventImpl.h" #include "qmf/PrivateImplRef.h" #include "qmf/SchemaImpl.h" using namespace std; using namespace qmf; using qpid::types::Variant; typedef PrivateImplRef PI; AgentEvent::AgentEvent(AgentEventImpl* impl) { PI::ctor(*this, impl); } AgentEvent::AgentEvent(const AgentEvent& s) : qmf::Handle() { PI::copy(*this, s); } AgentEvent::~AgentEvent() { PI::dtor(*this); } AgentEvent& AgentEvent::operator=(const AgentEvent& s) { return PI::assign(*this, s); } AgentEventCode AgentEvent::getType() const { return impl->getType(); } const string& AgentEvent::getUserId() const { return impl->getUserId(); } Query AgentEvent::getQuery() const { return impl->getQuery(); } bool AgentEvent::hasDataAddr() const { return impl->hasDataAddr(); } DataAddr AgentEvent::getDataAddr() const { return impl->getDataAddr(); } const string& AgentEvent::getMethodName() const { return impl->getMethodName(); } qpid::types::Variant::Map& AgentEvent::getArguments() { return impl->getArguments(); } qpid::types::Variant::Map& AgentEvent::getArgumentSubtypes() { return impl->getArgumentSubtypes(); } void AgentEvent::addReturnArgument(const std::string& k, const qpid::types::Variant& v, const std::string& s) { impl->addReturnArgument(k, v, s); } uint32_t AgentEventImpl::enqueueData(const Data& data) { qpid::sys::Mutex::ScopedLock l(lock); dataQueue.push(data); return dataQueue.size(); } Data AgentEventImpl::dequeueData() { qpid::sys::Mutex::ScopedLock l(lock); if (dataQueue.empty()) return Data(); Data data(dataQueue.front()); dataQueue.pop(); return data; } void AgentEventImpl::addReturnArgument(const string& key, const Variant& val, const string& subtype) { if (schema.isValid() && !SchemaImplAccess::get(schema).isValidMethodOutArg(methodName, key, val)) throw QmfException("Output argument is unknown or the type is incompatible"); outArguments[key] = val; if (!subtype.empty()) outArgumentSubtypes[key] = subtype; } AgentEventImpl& AgentEventImplAccess::get(AgentEvent& item) { return *item.impl; } const AgentEventImpl& AgentEventImplAccess::get(const AgentEvent& item) { return *item.impl; } qpidc-0.16/src/qmf/SubscriptionImpl.h0000664000076400007640000000313611512611130020157 0ustar00jrossjross00000000000000#ifndef _QMF_SUBSCRIPTION_IMPL_H_ #define _QMF_SUBSCRIPTION_IMPL_H_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/RefCounted.h" #include "qmf/Subscription.h" namespace qmf { class SubscriptionImpl : public virtual qpid::RefCounted { public: // // Public impl-only methods // SubscriptionImpl(int p) : placeholder(p) {} ~SubscriptionImpl(); // // Methods from API handle // void cancel(); bool isActive() const; void lock(); void unlock(); uint32_t getDataCount() const; Data getData(uint32_t) const; private: int placeholder; }; struct SubscriptionImplAccess { static SubscriptionImpl& get(Subscription&); static const SubscriptionImpl& get(const Subscription&); }; } #endif qpidc-0.16/src/qmf/Data.cpp0000664000076400007640000001015711512611130016056 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/DataImpl.h" #include "qmf/DataAddrImpl.h" #include "qmf/SchemaImpl.h" #include "qmf/SchemaIdImpl.h" #include "qmf/PrivateImplRef.h" #include "qmf/SchemaProperty.h" using namespace std; using namespace qmf; using qpid::types::Variant; typedef PrivateImplRef PI; Data::Data(DataImpl* impl) { PI::ctor(*this, impl); } Data::Data(const Data& s) : qmf::Handle() { PI::copy(*this, s); } Data::~Data() { PI::dtor(*this); } Data& Data::operator=(const Data& s) { return PI::assign(*this, s); } Data::Data(const Schema& s) { PI::ctor(*this, new DataImpl(s)); } void Data::setAddr(const DataAddr& a) { impl->setAddr(a); } void Data::setProperty(const string& k, const qpid::types::Variant& v) { impl->setProperty(k, v); } void Data::overwriteProperties(const qpid::types::Variant::Map& m) { impl->overwriteProperties(m); } bool Data::hasSchema() const { return impl->hasSchema(); } bool Data::hasAddr() const { return impl->hasAddr(); } const SchemaId& Data::getSchemaId() const { return impl->getSchemaId(); } const DataAddr& Data::getAddr() const { return impl->getAddr(); } const Variant& Data::getProperty(const string& k) const { return impl->getProperty(k); } const Variant::Map& Data::getProperties() const { return impl->getProperties(); } bool Data::hasAgent() const { return impl->hasAgent(); } const Agent& Data::getAgent() const { return impl->getAgent(); } void DataImpl::overwriteProperties(const Variant::Map& m) { for (Variant::Map::const_iterator iter = m.begin(); iter != m.end(); iter++) properties[iter->first] = iter->second; } const Variant& DataImpl::getProperty(const string& k) const { Variant::Map::const_iterator iter = properties.find(k); if (iter == properties.end()) throw KeyNotFound(k); return iter->second; } DataImpl::DataImpl(const qpid::types::Variant::Map& map, const Agent& a) { Variant::Map::const_iterator iter; agent = a; iter = map.find("_values"); if (iter != map.end()) properties = iter->second.asMap(); iter = map.find("_object_id"); if (iter != map.end()) dataAddr = DataAddr(new DataAddrImpl(iter->second.asMap())); iter = map.find("_schema_id"); if (iter != map.end()) schemaId = SchemaId(new SchemaIdImpl(iter->second.asMap())); } Variant::Map DataImpl::asMap() const { Variant::Map result; result["_values"] = properties; if (hasAddr()) { const DataAddrImpl& aImpl(DataAddrImplAccess::get(getAddr())); result["_object_id"] = aImpl.asMap(); } if (hasSchema()) { const SchemaIdImpl& sImpl(SchemaIdImplAccess::get(getSchemaId())); result["_schema_id"] = sImpl.asMap(); } return result; } void DataImpl::setProperty(const std::string& k, const qpid::types::Variant& v) { if (schema.isValid()) { // // If we have a valid schema, make sure that the property is included in the // schema and that the variant type is compatible with the schema type. // if (!SchemaImplAccess::get(schema).isValidProperty(k, v)) throw QmfException("Property '" + k + "' either not in the schema or value is of incompatible type"); } properties[k] = v; } DataImpl& DataImplAccess::get(Data& item) { return *item.impl; } const DataImpl& DataImplAccess::get(const Data& item) { return *item.impl; } qpidc-0.16/src/cluster.cmake0000664000076400007640000001530011715002376016407 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Cluster library CMake fragment, to be included in CMakeLists.txt # # Optional cluster support. Requires CPG; if building it, can optionally # include CMAN support as well. include(CheckIncludeFiles) include(CheckLibraryExists) set(LIBCPG_PATH /usr/lib/openais /usr/lib64/openais /usr/lib/corosync /usr/lib64/corosync CACHE STRING "Default locations for libcpg (cluster library)" ) find_library(LIBCPG cpg ${LIBCPG_PATH}) if (LIBCPG) CHECK_LIBRARY_EXISTS (${LIBCPG} cpg_local_get "" HAVE_LIBCPG) CHECK_INCLUDE_FILES (openais/cpg.h HAVE_OPENAIS_CPG_H) CHECK_INCLUDE_FILES (corosync/cpg.h HAVE_COROSYNC_CPG_H) endif (LIBCPG) set (cluster_default ${cluster_force}) if (CMAKE_SYSTEM_NAME STREQUAL Windows) else (CMAKE_SYSTEM_NAME STREQUAL Windows) if (HAVE_LIBCPG) if (HAVE_OPENAIS_CPG_H OR HAVE_COROSYNC_CPG_H) set (cluster_default ON) endif (HAVE_OPENAIS_CPG_H OR HAVE_COROSYNC_CPG_H) endif (HAVE_LIBCPG) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) option(BUILD_CLUSTER "Build with CPG support for clustering" ${cluster_default}) if (BUILD_CLUSTER) if (NOT HAVE_LIBCPG) message(FATAL_ERROR "libcpg not found, install openais-devel or corosync-devel") endif (NOT HAVE_LIBCPG) if (NOT HAVE_OPENAIS_CPG_H AND NOT HAVE_COROSYNC_CPG_H) message(FATAL_ERROR "cpg.h not found, install openais-devel or corosync-devel") endif (NOT HAVE_OPENAIS_CPG_H AND NOT HAVE_COROSYNC_CPG_H) CHECK_LIBRARY_EXISTS (cman cman_is_quorate "" HAVE_LIBCMAN) CHECK_INCLUDE_FILES (libcman.h HAVE_LIBCMAN_H) set(cluster_quorum_default ${cluster_quorum_force}) if (HAVE_LIBCMAN AND HAVE_LIBCMAN_H) set(cluster_quorum_default ON) endif (HAVE_LIBCMAN AND HAVE_LIBCMAN_H) option(BUILD_CLUSTER_QUORUM "Include libcman quorum service integration" ${cluster_quorum_default}) if (BUILD_CLUSTER_QUORUM) if (NOT HAVE_LIBCMAN) message(FATAL_ERROR "libcman not found, install cman-devel or cmanlib-devel") endif (NOT HAVE_LIBCMAN) if (NOT HAVE_LIBCMAN_H) message(FATAL_ERROR "libcman.h not found, install cman-devel or cmanlib-devel") endif (NOT HAVE_LIBCMAN_H) set (CMAN_SOURCES qpid/cluster/Quorum_cman.h qpid/cluster/Quorum_cman.cpp) set (CMAN_LIB cman) else (BUILD_CLUSTER_QUORUM) set (CMAN_SOURCES qpid/cluster/Quorum_null.h) endif (BUILD_CLUSTER_QUORUM) set (cluster_SOURCES ${CMAN_SOURCES} qpid/cluster/Cluster.cpp qpid/cluster/Cluster.h qpid/cluster/ClusterTimer.cpp qpid/cluster/ClusterTimer.h qpid/cluster/Decoder.cpp qpid/cluster/Decoder.h qpid/cluster/PollableQueue.h qpid/cluster/ClusterMap.cpp qpid/cluster/ClusterMap.h qpid/cluster/ClusterPlugin.cpp qpid/cluster/ClusterSettings.h qpid/cluster/Connection.cpp qpid/cluster/Connection.h qpid/cluster/ConnectionCodec.cpp qpid/cluster/ConnectionCodec.h qpid/cluster/Cpg.cpp qpid/cluster/Cpg.h qpid/cluster/CredentialsExchange.cpp qpid/cluster/CredentialsExchange.h qpid/cluster/Dispatchable.h qpid/cluster/UpdateClient.cpp qpid/cluster/UpdateClient.h qpid/cluster/RetractClient.cpp qpid/cluster/RetractClient.h qpid/cluster/ErrorCheck.cpp qpid/cluster/ErrorCheck.h qpid/cluster/Event.cpp qpid/cluster/Event.h qpid/cluster/EventFrame.h qpid/cluster/EventFrame.cpp qpid/cluster/ExpiryPolicy.h qpid/cluster/ExpiryPolicy.cpp qpid/cluster/FailoverExchange.cpp qpid/cluster/FailoverExchange.h qpid/cluster/UpdateExchange.cpp qpid/cluster/UpdateExchange.h qpid/cluster/UpdateReceiver.h qpid/cluster/LockedConnectionMap.h qpid/cluster/Multicaster.cpp qpid/cluster/Multicaster.h qpid/cluster/McastFrameHandler.h qpid/cluster/NoOpConnectionOutputHandler.h qpid/cluster/Numbering.h qpid/cluster/OutputInterceptor.cpp qpid/cluster/OutputInterceptor.h qpid/cluster/PollerDispatch.cpp qpid/cluster/PollerDispatch.h qpid/cluster/ProxyInputHandler.h qpid/cluster/Quorum.h qpid/cluster/InitialStatusMap.h qpid/cluster/InitialStatusMap.cpp qpid/cluster/MemberSet.h qpid/cluster/MemberSet.cpp qpid/cluster/types.h qpid/cluster/SecureConnectionFactory.h qpid/cluster/SecureConnectionFactory.cpp qpid/cluster/StoreStatus.h qpid/cluster/StoreStatus.cpp qpid/cluster/UpdateDataExchange.h qpid/cluster/UpdateDataExchange.cpp ) add_library (cluster MODULE ${cluster_SOURCES}) target_link_libraries (cluster ${LIBCPG} ${CMAN_LIB} qpidbroker qpidclient ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY}) set_target_properties (cluster PROPERTIES PREFIX "") # Create a second shared library for linking with test executables, # cmake will not allow a module to be linked with an executable. add_library (cluster_shared SHARED ${cluster_SOURCES}) target_link_libraries (cluster_shared ${LIBCPG} ${CMAN_LIB} qpidbroker qpidclient ${Boost_FILESYSTEM_LIBRARY}) if (CMAKE_COMPILER_IS_GNUCXX) # Turn off optimisation based on strict-aliasing because we get warnings about violations set_target_properties(cluster cluster_shared PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing" LINK_FLAGS "${GCC_CATCH_UNDEFINED} -pthread") endif (CMAKE_COMPILER_IS_GNUCXX) add_library (watchdog MODULE qpid/cluster/WatchDogPlugin.cpp) set_target_properties (watchdog PROPERTIES PREFIX "") add_executable(qpidd_watchdog qpid/cluster/qpidd_watchdog.cpp) install (TARGETS cluster watchdog DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) install (TARGETS qpidd_watchdog DESTINATION ${QPID_LIBEXEC_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) endif (BUILD_CLUSTER) # Distribute all sources. #EXTRA_DIST += qpid/cluster/Quorum_cman.h qpid/cluster/Quorum_cman.cpp qpid/cluster/Quorum_null.h qpidc-0.16/src/qmf2.pc.in0000664000076400007640000000033711657233673015541 0ustar00jrossjross00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: qmf2 Version: @VERSION@ Description: Qpid Management Framework Requires: qpid Libs: -L${libdir} -lqmf2 @LIBS@ Cflags: -I${includedir} qpidc-0.16/src/managementgen.mk0000664000076400007640000003015611752725673017106 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # This source file was created by a code generator. # Please do not edit. mgen_generator=$(mgen_dir)/qmf-gen \ $(mgen_dir)/qmfgen/generate.py \ $(mgen_dir)/qmfgen/schema.py \ $(mgen_dir)/qmfgen/management-types.xml \ $(top_srcdir)/../specs/management-schema.xml \ $(mgen_dir)/qmfgen/templates/Class.h \ $(mgen_dir)/qmfgen/templates/Class.cpp \ $(mgen_dir)/qmfgen/templates/Args.h \ $(mgen_dir)/qmfgen/templates/Event.h \ $(mgen_dir)/qmfgen/templates/Event.cpp \ $(mgen_dir)/qmfgen/templates/Package.h \ $(mgen_dir)/qmfgen/templates/Package.cpp \ $(mgen_dir)/qmfgen/templates/Class.h \ $(mgen_dir)/qmfgen/templates/Class.cpp \ $(mgen_dir)/qmfgen/templates/Args.h \ $(mgen_dir)/qmfgen/templates/Event.h \ $(mgen_dir)/qmfgen/templates/Event.cpp \ $(mgen_dir)/qmfgen/templates/Package.h \ $(mgen_dir)/qmfgen/templates/Package.cpp \ $(mgen_dir)/qmfgen/templates/Class.h \ $(mgen_dir)/qmfgen/templates/Class.cpp \ $(mgen_dir)/qmfgen/templates/Args.h \ $(mgen_dir)/qmfgen/templates/Event.h \ $(mgen_dir)/qmfgen/templates/Event.cpp \ $(mgen_dir)/qmfgen/templates/Package.h \ $(mgen_dir)/qmfgen/templates/Package.cpp \ $(mgen_dir)/qmfgen/templates/Class.h \ $(mgen_dir)/qmfgen/templates/Class.cpp \ $(mgen_dir)/qmfgen/templates/Args.h \ $(mgen_dir)/qmfgen/templates/Event.h \ $(mgen_dir)/qmfgen/templates/Event.cpp \ $(mgen_dir)/qmfgen/templates/Package.h \ $(mgen_dir)/qmfgen/templates/Package.cpp \ $(mgen_dir)/qmfgen/templates/Makefile.mk mgen_broker_cpp=qmf/org/apache/qpid/broker/System.cpp \ qmf/org/apache/qpid/broker/Memory.cpp \ qmf/org/apache/qpid/broker/Broker.cpp \ qmf/org/apache/qpid/broker/Agent.cpp \ qmf/org/apache/qpid/broker/Vhost.cpp \ qmf/org/apache/qpid/broker/Queue.cpp \ qmf/org/apache/qpid/broker/Exchange.cpp \ qmf/org/apache/qpid/broker/Binding.cpp \ qmf/org/apache/qpid/broker/Subscription.cpp \ qmf/org/apache/qpid/broker/Connection.cpp \ qmf/org/apache/qpid/broker/Link.cpp \ qmf/org/apache/qpid/broker/Bridge.cpp \ qmf/org/apache/qpid/broker/Session.cpp \ qmf/org/apache/qpid/broker/ManagementSetupState.cpp \ qmf/org/apache/qpid/broker/EventClientConnect.cpp \ qmf/org/apache/qpid/broker/EventClientConnectFail.cpp \ qmf/org/apache/qpid/broker/EventClientDisconnect.cpp \ qmf/org/apache/qpid/broker/EventBrokerLinkUp.cpp \ qmf/org/apache/qpid/broker/EventBrokerLinkDown.cpp \ qmf/org/apache/qpid/broker/EventQueueDeclare.cpp \ qmf/org/apache/qpid/broker/EventQueueDelete.cpp \ qmf/org/apache/qpid/broker/EventExchangeDeclare.cpp \ qmf/org/apache/qpid/broker/EventExchangeDelete.cpp \ qmf/org/apache/qpid/broker/EventBind.cpp \ qmf/org/apache/qpid/broker/EventUnbind.cpp \ qmf/org/apache/qpid/broker/EventSubscribe.cpp \ qmf/org/apache/qpid/broker/EventUnsubscribe.cpp \ qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.cpp \ qmf/org/apache/qpid/broker/Package.cpp \ qmf/org/apache/qpid/acl/Acl.cpp \ qmf/org/apache/qpid/acl/EventAllow.cpp \ qmf/org/apache/qpid/acl/EventDeny.cpp \ qmf/org/apache/qpid/acl/EventFileLoaded.cpp \ qmf/org/apache/qpid/acl/EventFileLoadFailed.cpp \ qmf/org/apache/qpid/acl/Package.cpp \ qmf/org/apache/qpid/cluster/Cluster.cpp \ qmf/org/apache/qpid/cluster/Package.cpp \ qmf/org/apache/qpid/ha/HaBroker.cpp \ qmf/org/apache/qpid/ha/Package.cpp # Header file install rules. org_apache_qpid_brokerdir = $(includedir)/qmf/org/apache/qpid/broker dist_org_apache_qpid_broker_HEADERS = qmf/org/apache/qpid/broker/System.h \ qmf/org/apache/qpid/broker/Memory.h \ qmf/org/apache/qpid/broker/Broker.h \ qmf/org/apache/qpid/broker/Agent.h \ qmf/org/apache/qpid/broker/Vhost.h \ qmf/org/apache/qpid/broker/Queue.h \ qmf/org/apache/qpid/broker/Exchange.h \ qmf/org/apache/qpid/broker/Binding.h \ qmf/org/apache/qpid/broker/Subscription.h \ qmf/org/apache/qpid/broker/Connection.h \ qmf/org/apache/qpid/broker/Link.h \ qmf/org/apache/qpid/broker/Bridge.h \ qmf/org/apache/qpid/broker/Session.h \ qmf/org/apache/qpid/broker/ManagementSetupState.h \ qmf/org/apache/qpid/broker/ArgsBrokerEcho.h \ qmf/org/apache/qpid/broker/ArgsBrokerConnect.h \ qmf/org/apache/qpid/broker/ArgsBrokerQueueMoveMessages.h \ qmf/org/apache/qpid/broker/ArgsBrokerSetLogLevel.h \ qmf/org/apache/qpid/broker/ArgsBrokerGetLogLevel.h \ qmf/org/apache/qpid/broker/ArgsBrokerGetTimestampConfig.h \ qmf/org/apache/qpid/broker/ArgsBrokerSetTimestampConfig.h \ qmf/org/apache/qpid/broker/ArgsBrokerCreate.h \ qmf/org/apache/qpid/broker/ArgsBrokerDelete.h \ qmf/org/apache/qpid/broker/ArgsBrokerQuery.h \ qmf/org/apache/qpid/broker/ArgsQueuePurge.h \ qmf/org/apache/qpid/broker/ArgsQueueReroute.h \ qmf/org/apache/qpid/broker/ArgsLinkBridge.h \ qmf/org/apache/qpid/broker/EventClientConnect.h \ qmf/org/apache/qpid/broker/EventClientConnectFail.h \ qmf/org/apache/qpid/broker/EventClientDisconnect.h \ qmf/org/apache/qpid/broker/EventBrokerLinkUp.h \ qmf/org/apache/qpid/broker/EventBrokerLinkDown.h \ qmf/org/apache/qpid/broker/EventQueueDeclare.h \ qmf/org/apache/qpid/broker/EventQueueDelete.h \ qmf/org/apache/qpid/broker/EventExchangeDeclare.h \ qmf/org/apache/qpid/broker/EventExchangeDelete.h \ qmf/org/apache/qpid/broker/EventBind.h \ qmf/org/apache/qpid/broker/EventUnbind.h \ qmf/org/apache/qpid/broker/EventSubscribe.h \ qmf/org/apache/qpid/broker/EventUnsubscribe.h \ qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.h \ qmf/org/apache/qpid/broker/Package.h org_apache_qpid_acldir = $(includedir)/qmf/org/apache/qpid/acl dist_org_apache_qpid_acl_HEADERS = qmf/org/apache/qpid/acl/Acl.h \ qmf/org/apache/qpid/acl/EventAllow.h \ qmf/org/apache/qpid/acl/EventDeny.h \ qmf/org/apache/qpid/acl/EventFileLoaded.h \ qmf/org/apache/qpid/acl/EventFileLoadFailed.h \ qmf/org/apache/qpid/acl/Package.h org_apache_qpid_clusterdir = $(includedir)/qmf/org/apache/qpid/cluster dist_org_apache_qpid_cluster_HEADERS = qmf/org/apache/qpid/cluster/Cluster.h \ qmf/org/apache/qpid/cluster/ArgsClusterStopClusterNode.h \ qmf/org/apache/qpid/cluster/Package.h org_apache_qpid_hadir = $(includedir)/qmf/org/apache/qpid/ha dist_org_apache_qpid_ha_HEADERS = qmf/org/apache/qpid/ha/HaBroker.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetBrokers.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetPublicBrokers.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetExpectedBackups.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerReplicate.h \ qmf/org/apache/qpid/ha/Package.h if GENERATE $(srcdir)/managementgen.mk: $(mgen_generator) $(mgen_cmd) $(mgen_generator): endif qmfgen_sources=qmf/org/apache/qpid/broker/System.h \ qmf/org/apache/qpid/broker/Memory.h \ qmf/org/apache/qpid/broker/Broker.h \ qmf/org/apache/qpid/broker/Agent.h \ qmf/org/apache/qpid/broker/Vhost.h \ qmf/org/apache/qpid/broker/Queue.h \ qmf/org/apache/qpid/broker/Exchange.h \ qmf/org/apache/qpid/broker/Binding.h \ qmf/org/apache/qpid/broker/Subscription.h \ qmf/org/apache/qpid/broker/Connection.h \ qmf/org/apache/qpid/broker/Link.h \ qmf/org/apache/qpid/broker/Bridge.h \ qmf/org/apache/qpid/broker/Session.h \ qmf/org/apache/qpid/broker/ManagementSetupState.h \ qmf/org/apache/qpid/broker/ArgsBrokerEcho.h \ qmf/org/apache/qpid/broker/ArgsBrokerConnect.h \ qmf/org/apache/qpid/broker/ArgsBrokerQueueMoveMessages.h \ qmf/org/apache/qpid/broker/ArgsBrokerSetLogLevel.h \ qmf/org/apache/qpid/broker/ArgsBrokerGetLogLevel.h \ qmf/org/apache/qpid/broker/ArgsBrokerGetTimestampConfig.h \ qmf/org/apache/qpid/broker/ArgsBrokerSetTimestampConfig.h \ qmf/org/apache/qpid/broker/ArgsBrokerCreate.h \ qmf/org/apache/qpid/broker/ArgsBrokerDelete.h \ qmf/org/apache/qpid/broker/ArgsBrokerQuery.h \ qmf/org/apache/qpid/broker/ArgsQueuePurge.h \ qmf/org/apache/qpid/broker/ArgsQueueReroute.h \ qmf/org/apache/qpid/broker/ArgsLinkBridge.h \ qmf/org/apache/qpid/broker/EventClientConnect.h \ qmf/org/apache/qpid/broker/EventClientConnectFail.h \ qmf/org/apache/qpid/broker/EventClientDisconnect.h \ qmf/org/apache/qpid/broker/EventBrokerLinkUp.h \ qmf/org/apache/qpid/broker/EventBrokerLinkDown.h \ qmf/org/apache/qpid/broker/EventQueueDeclare.h \ qmf/org/apache/qpid/broker/EventQueueDelete.h \ qmf/org/apache/qpid/broker/EventExchangeDeclare.h \ qmf/org/apache/qpid/broker/EventExchangeDelete.h \ qmf/org/apache/qpid/broker/EventBind.h \ qmf/org/apache/qpid/broker/EventUnbind.h \ qmf/org/apache/qpid/broker/EventSubscribe.h \ qmf/org/apache/qpid/broker/EventUnsubscribe.h \ qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.h \ qmf/org/apache/qpid/broker/Package.h \ qmf/org/apache/qpid/acl/Acl.h \ qmf/org/apache/qpid/acl/EventAllow.h \ qmf/org/apache/qpid/acl/EventDeny.h \ qmf/org/apache/qpid/acl/EventFileLoaded.h \ qmf/org/apache/qpid/acl/EventFileLoadFailed.h \ qmf/org/apache/qpid/acl/Package.h \ qmf/org/apache/qpid/cluster/Cluster.h \ qmf/org/apache/qpid/cluster/ArgsClusterStopClusterNode.h \ qmf/org/apache/qpid/cluster/Package.h \ qmf/org/apache/qpid/ha/HaBroker.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetBrokers.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetPublicBrokers.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerSetExpectedBackups.h \ qmf/org/apache/qpid/ha/ArgsHaBrokerReplicate.h \ qmf/org/apache/qpid/ha/Package.h \ qmf/org/apache/qpid/broker/System.cpp \ qmf/org/apache/qpid/broker/Memory.cpp \ qmf/org/apache/qpid/broker/Broker.cpp \ qmf/org/apache/qpid/broker/Agent.cpp \ qmf/org/apache/qpid/broker/Vhost.cpp \ qmf/org/apache/qpid/broker/Queue.cpp \ qmf/org/apache/qpid/broker/Exchange.cpp \ qmf/org/apache/qpid/broker/Binding.cpp \ qmf/org/apache/qpid/broker/Subscription.cpp \ qmf/org/apache/qpid/broker/Connection.cpp \ qmf/org/apache/qpid/broker/Link.cpp \ qmf/org/apache/qpid/broker/Bridge.cpp \ qmf/org/apache/qpid/broker/Session.cpp \ qmf/org/apache/qpid/broker/ManagementSetupState.cpp \ qmf/org/apache/qpid/broker/EventClientConnect.cpp \ qmf/org/apache/qpid/broker/EventClientConnectFail.cpp \ qmf/org/apache/qpid/broker/EventClientDisconnect.cpp \ qmf/org/apache/qpid/broker/EventBrokerLinkUp.cpp \ qmf/org/apache/qpid/broker/EventBrokerLinkDown.cpp \ qmf/org/apache/qpid/broker/EventQueueDeclare.cpp \ qmf/org/apache/qpid/broker/EventQueueDelete.cpp \ qmf/org/apache/qpid/broker/EventExchangeDeclare.cpp \ qmf/org/apache/qpid/broker/EventExchangeDelete.cpp \ qmf/org/apache/qpid/broker/EventBind.cpp \ qmf/org/apache/qpid/broker/EventUnbind.cpp \ qmf/org/apache/qpid/broker/EventSubscribe.cpp \ qmf/org/apache/qpid/broker/EventUnsubscribe.cpp \ qmf/org/apache/qpid/broker/EventQueueThresholdExceeded.cpp \ qmf/org/apache/qpid/broker/Package.cpp \ qmf/org/apache/qpid/acl/Acl.cpp \ qmf/org/apache/qpid/acl/EventAllow.cpp \ qmf/org/apache/qpid/acl/EventDeny.cpp \ qmf/org/apache/qpid/acl/EventFileLoaded.cpp \ qmf/org/apache/qpid/acl/EventFileLoadFailed.cpp \ qmf/org/apache/qpid/acl/Package.cpp \ qmf/org/apache/qpid/cluster/Cluster.cpp \ qmf/org/apache/qpid/cluster/Package.cpp \ qmf/org/apache/qpid/ha/HaBroker.cpp \ qmf/org/apache/qpid/ha/Package.cpp qpidc-0.16/src/CMakeLists.txt0000664000076400007640000015500511721017063016467 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # library versions include (versions.cmake) # Option to require building optional plugins foreach (r ${REQUIRE}) set(${r}_force ON) message(STATUS "Forcing ${r} to ${${r}_force}") endforeach(r) include(CheckFunctionExists) include(CheckIncludeFileCXX) include(CheckIncludeFiles) include(CheckIncludeFileCXX) include(CheckLibraryExists) include(CheckSymbolExists) include(FindBoost) include(FindDoxygen) #set (CMAKE_VERBOSE_MAKEFILE ON) # for debugging # # Set up installation of .pdb files if the compiler is Visual Studio # # Sample: install_pdb (qpidcommon ${QPID_COMPONENT_COMMON}) # MACRO (install_pdb theLibrary theComponent) if (MSVC) get_target_property(library_dll ${theLibrary} LOCATION) string(REPLACE .dll .pdb library_pdb ${library_dll}) string(REPLACE $(OutDir) \${CMAKE_INSTALL_CONFIG_NAME} library_pdb ${library_pdb}) string(REPLACE $(Configuration) \${CMAKE_INSTALL_CONFIG_NAME} library_pdb ${library_pdb}) string(REPLACE .pdb d.pdb libraryd_pdb ${library_pdb}) #message(STATUS "_pdb: ${library_pdb}, ${libraryd_pdb}") install (PROGRAMS ${library_pdb} DESTINATION ${QPID_INSTALL_LIBDIR}/ReleasePDB COMPONENT ${theComponent} OPTIONAL CONFIGURATIONS Release|MinSizeRel) install (PROGRAMS ${library_pdb} DESTINATION ${QPID_INSTALL_LIBDIR}/ReleasePDB COMPONENT ${theComponent} CONFIGURATIONS RelWithDebInfo) install (PROGRAMS ${libraryd_pdb} DESTINATION ${QPID_INSTALL_LIBDIR}/DebugPDB COMPONENT ${theComponent} CONFIGURATIONS Debug) endif (MSVC) ENDMACRO (install_pdb) # # inherit_value - if the symbol is undefined then set it to the given value. # Set flag to indicate this symbol was defined here. # MACRO (inherit_value theSymbol theValue) if (NOT DEFINED ${theSymbol}) set (${theSymbol} ${theValue}) # message ("Set symbol '${theSymbol}' to value '${theValue}'") set (${theSymbol}_inherited = "true") endif (NOT DEFINED ${theSymbol}) ENDMACRO (inherit_value) # # If compiler is Visual Studio then create a "version resource" for the project. # Use this call to override CPACK and file global settings but not file per-project settings. # Two groups of four version numbers specify "file" and "product" versions separately. # # Sample: add_msvc_version_full (qmfengine library dll 1 0 0 1 1 0 0 1) # MACRO (add_msvc_version_full verProject verProjectType verProjectFileExt verFN1 verFN2 verFN3 verFN4 verPN1 verPN2 verPN3 verPN4) if (MSVC) # Create project-specific version strings inherit_value ("winver_${verProject}_FileVersionBinary" "${verFN1},${verFN2},${verFN3},${verFN4}") inherit_value ("winver_${verProject}_ProductVersionBinary" "${verPN1},${verPN2},${verPN3},${verPN4}") inherit_value ("winver_${verProject}_FileVersionString" "${verFN1}, ${verFN2}, ${verFN3}, ${verFN4}") inherit_value ("winver_${verProject}_ProductVersionString" "${verPN1}, ${verPN2}, ${verPN3}, ${verPN4}") inherit_value ("winver_${verProject}_FileDescription" "${winver_PACKAGE_NAME}-${verProject} ${verProjectType}") inherit_value ("winver_${verProject}_LegalCopyright" "${winver_LEGAL_COPYRIGHT}") inherit_value ("winver_${verProject}_InternalName" "${verProject}") inherit_value ("winver_${verProject}_OriginalFilename" "${verProject}.${verProjectFileExt}") inherit_value ("winver_${verProject}_ProductName" "${winver_DESCRIPTION_SUMMARY}") # Create strings to be substituted into the template file set ("winverFileVersionBinary" "${winver_${verProject}_FileVersionBinary}") set ("winverProductVersionBinary" "${winver_${verProject}_ProductVersionBinary}") set ("winverFileVersionString" "${winver_${verProject}_FileVersionString}") set ("winverProductVersionString" "${winver_${verProject}_ProductVersionString}") set ("winverFileDescription" "${winver_${verProject}_FileDescription}") set ("winverLegalCopyright" "${winver_${verProject}_LegalCopyright}") set ("winverInternalName" "${winver_${verProject}_InternalName}") set ("winverOriginalFilename" "${winver_${verProject}_OriginalFilename}") set ("winverProductName" "${winver_${verProject}_ProductName}") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/resources/template-resource.rc ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc) set (${verProject}_SOURCES ${${verProject}_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/${verProject}-resource.rc ) endif (MSVC) ENDMACRO (add_msvc_version_full) # # If compiler is Visual Studio then create a "version resource" for the project. # Use this call to accept file override version settings or # inherited CPACK_PACKAGE_VERSION version settings. # # Sample: add_msvc_version (qpidcommon library dll) # MACRO (add_msvc_version verProject verProjectType verProjectFileExt) if (MSVC) add_msvc_version_full (${verProject} ${verProjectType} ${verProjectFileExt} ${winver_FILE_VERSION_N1} ${winver_FILE_VERSION_N2} ${winver_FILE_VERSION_N3} ${winver_FILE_VERSION_N4} ${winver_PRODUCT_VERSION_N1} ${winver_PRODUCT_VERSION_N2} ${winver_PRODUCT_VERSION_N3} ${winver_PRODUCT_VERSION_N4}) endif (MSVC) ENDMACRO (add_msvc_version) # # Install optional windows version settings. Override variables are specified in a file. # include (./CMakeWinVersions.cmake OPTIONAL) # # Inherit global windows version settings from CPACK settings. # inherit_value ("winver_PACKAGE_NAME" "${CPACK_PACKAGE_NAME}") inherit_value ("winver_DESCRIPTION_SUMMARY" "${CPACK_PACKAGE_DESCRIPTION_SUMMARY}") inherit_value ("winver_FILE_VERSION_N1" "${CPACK_PACKAGE_VERSION_MAJOR}") inherit_value ("winver_FILE_VERSION_N2" "${CPACK_PACKAGE_VERSION_MINOR}") inherit_value ("winver_FILE_VERSION_N3" "${CPACK_PACKAGE_VERSION_PATCH}") inherit_value ("winver_FILE_VERSION_N4" "1") inherit_value ("winver_PRODUCT_VERSION_N1" "${winver_FILE_VERSION_N1}") inherit_value ("winver_PRODUCT_VERSION_N2" "${winver_FILE_VERSION_N2}") inherit_value ("winver_PRODUCT_VERSION_N3" "${winver_FILE_VERSION_N3}") inherit_value ("winver_PRODUCT_VERSION_N4" "${winver_FILE_VERSION_N4}") inherit_value ("winver_LEGAL_COPYRIGHT" "") # check if we generate source as part of the build # - rubygen generates the amqp spec and clustering # - managementgen generates the broker management code # # rubygen subdir is excluded from stable distributions # If the main AMQP spec is present, then check if ruby and python are # present, and if any sources have changed, forcing a re-gen of source code. set(AMQP_SPEC_DIR ${qpid-cpp_SOURCE_DIR}/../specs) set(AMQP_SPEC ${AMQP_SPEC_DIR}/amqp.0-10-qpid-errata.xml) if (EXISTS ${AMQP_SPEC}) include(FindRuby) include(FindPythonInterp) if (NOT RUBY_EXECUTABLE) message(FATAL_ERROR "Can't locate ruby, needed to generate source files.") endif (NOT RUBY_EXECUTABLE) if (NOT PYTHON_EXECUTABLE) message(FATAL_ERROR "Can't locate python, needed to generate source files.") endif (NOT PYTHON_EXECUTABLE) set(specs ${AMQP_SPEC} ${qpid-cpp_SOURCE_DIR}/xml/cluster.xml) set(regen_amqp OFF) set(rgen_dir ${qpid-cpp_SOURCE_DIR}/rubygen) file(GLOB_RECURSE rgen_progs ${rgen_dir}/*.rb) # If any of the specs, or any of the sources used to generate code, change # then regenerate the sources. foreach (spec_file ${specs} ${rgen_progs}) if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake) set(regen_amqp ON) endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake) endforeach (spec_file ${specs}) if (regen_amqp) message(STATUS "Regenerating AMQP protocol sources") execute_process(COMMAND ${RUBY_EXECUTABLE} -I ${rgen_dir} ${rgen_dir}/generate ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/../include ${specs} all rubygen.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) else (regen_amqp) message(STATUS "No need to generate AMQP protocol sources") endif (regen_amqp) set(mgmt_specs ${AMQP_SPEC_DIR}/management-schema.xml ${CMAKE_CURRENT_SOURCE_DIR}/qpid/acl/management-schema.xml ${CMAKE_CURRENT_SOURCE_DIR}/qpid/cluster/management-schema.xml ${CMAKE_CURRENT_SOURCE_DIR}/qpid/ha/management-schema.xml ) set(mgen_dir ${qpid-cpp_SOURCE_DIR}/managementgen) set(regen_mgmt OFF) foreach (spec_file ${mgmt_specs}) if (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake) message(STATUS "${spec_file} is newer") set(regen_mgmt ON) endif (${spec_file} IS_NEWER_THAN ${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake) endforeach (spec_file ${mgmt_specs}) if (regen_mgmt) message(STATUS "Regenerating Qpid Management Framework sources") execute_process(COMMAND ${PYTHON_EXECUTABLE} ${mgen_dir}/qmf-gen -c managementgen.cmake -b -q -o ${CMAKE_CURRENT_BINARY_DIR}/qmf ${mgmt_specs} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) else (regen_mgmt) message(STATUS "No need to generate Qpid Management Framework sources") endif (regen_mgmt) # Pull in the names of the generated files, i.e. ${rgen_framing_srcs} include (${CMAKE_CURRENT_BINARY_DIR}/rubygen.cmake) include (${CMAKE_CURRENT_BINARY_DIR}/managementgen.cmake) else (EXISTS ${AMQP_SPEC}) message(STATUS "No AMQP spec... presume generated sources are included") set(QPID_GENERATED_HEADERS_IN_SOURCE ON) include (rubygen.cmake) include (managementgen.cmake) endif (EXISTS ${AMQP_SPEC}) find_program(HELP2MAN help2man DOC "Location of the help2man program") option(GEN_MANPAGES "Use help2man to generate man pages" ON) if (GEN_MANPAGES AND NOT HELP2MAN) message(STATUS "Can't locate the help2man command; man pages will not be generated") set (GEN_MANPAGES OFF) endif (GEN_MANPAGES AND NOT HELP2MAN) # FindDoxygen module tries to locate doxygen and Graphviz dot set (docs_default ON) if (NOT DOXYGEN_EXECUTABLE) set (docs_default OFF) endif (NOT DOXYGEN_EXECUTABLE) option(GEN_DOXYGEN "Use doxygen to generate user documentation" ${docs_default}) if (GEN_DOXYGEN AND NOT DOXYGEN_EXECUTABLE) message(STATUS "Can't locate the doxygen command; user documentation will not be generated") set (GEN_DOXYGEN OFF) endif (GEN_DOXYGEN AND NOT DOXYGEN_EXECUTABLE) find_program(VALGRIND valgrind DOC "Location of the valgrind program") option(ENABLE_VALGRIND "Use valgrind to detect run-time problems" ON) if (ENABLE_VALGRIND AND NOT VALGRIND) message(STATUS "Can't locate the valgrind command; no run-time error detection") endif (ENABLE_VALGRIND AND NOT VALGRIND) if (CMAKE_COMPILER_IS_GNUCXX) # Warnings: Enable as many as possible, keep the code clean. Please # do not disable warnings or remove -Werror without discussing on # qpid-dev list. # # The following warnings are deliberately omitted, they warn on valid code. # -Wunreachable-code -Wpadded -Winline # -Wshadow - warns about boost headers. set (WARNING_FLAGS "-Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -Woverloaded-virtual") set (GCC_CATCH_UNDEFINED "-Wl,--no-undefined") # gcc on SunOS uses native linker whose "-z defs" is too fussy if (CMAKE_SYSTEM_NAME STREQUAL SunOS) set (GCC_CATCH_UNDEFINED "") endif (CMAKE_SYSTEM_NAME STREQUAL SunOS) endif (CMAKE_COMPILER_IS_GNUCXX) if (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) set (COMPILER_FLAGS "-library=stlport4 -mt") set (WARNING_FLAGS "+w2") endif (CMAKE_CXX_COMPILER_ID STREQUAL SunPro) option(ENABLE_WARNINGS "Enable lots of compiler warnings (recommended)" ON) if (NOT ENABLE_WARNINGS) set (WARNING_FLAGS "") endif (NOT ENABLE_WARNINGS) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS} ${WARNING_FLAGS}") # Expand a bit from the basic Find_Boost; be specific about what's needed. # Boost.system is sometimes needed; it's handled separately, below. if (CMAKE_SYSTEM_NAME STREQUAL Windows) set (Boost_components filesystem program_options date_time thread unit_test_framework regex) else (CMAKE_SYSTEM_NAME STREQUAL Windows) set (Boost_components filesystem program_options unit_test_framework) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) # Visual Studio 2010 requires boost 1.45 or better. # The choice here is to fail demanding the user to update CMake to version N # where Boost 1.45 is supported, or we can just accept some versions using # the Additional_versions variable. if (NOT DEFINED Boost_ADDITIONAL_VERSIONS) set (Boost_ADDITIONAL_VERSIONS "1.45" "1.45.0" "1.46" "1.46.0" "1.47" "1.47.0") endif (NOT DEFINED Boost_ADDITIONAL_VERSIONS) find_package(Boost 1.33 REQUIRED COMPONENTS ${Boost_components}) if(NOT Boost_FOUND) message(FATAL_ERROR "Boost C++ libraries not found. Please install or try setting BOOST_ROOT") endif(NOT Boost_FOUND) # Boost.system was introduced at Boost 1.35; it's needed secondarily by other # Boost libs Qpid needs, so be sure it's there. if (Boost_VERSION GREATER 103499) find_package(Boost COMPONENTS system) # Allow for cmake pre 2.6 and boost post 1.35 if (NOT Boost_SYSTEM_LIBRARY) set(Boost_SYSTEM_LIBRARY boost_system) endif (NOT Boost_SYSTEM_LIBRARY) endif (Boost_VERSION GREATER 103499) # Versions of cmake pre 2.6 don't set the Boost_*_LIBRARY variables correctly # these values are correct for Linux if (NOT Boost_PROGRAM_OPTIONS_LIBRARY) set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options) endif (NOT Boost_PROGRAM_OPTIONS_LIBRARY) if (NOT Boost_FILESYSTEM_LIBRARY) set(Boost_FILESYSTEM_LIBRARY boost_filesystem) endif (NOT Boost_FILESYSTEM_LIBRARY) if (NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY) set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY boost_unit_test_framework) endif (NOT Boost_UNIT_TEST_FRAMEWORK_LIBRARY) if (NOT Boost_REGEX_LIBRARY) set(Boost_REGEX_LIBRARY boost_regex) endif (NOT Boost_REGEX_LIBRARY) # The Windows install also wants the Boost DLLs, libs and headers that the # release is built with. The DLLs enable everything to run, and the headers # and libs ensure that users building Qpid C++ client programs can compile # (the C++ API still exposes Boost headers, but hopefully this will be fixed # in the future). # # On Windows you can pick whether the static or dynamic versions of the libs # are used; allow this choice to the user. Since we also install the Boost # DLLs that are needed for the Windows package, none are needed for the # static link case; else drop them into the install. Do this all first, since # Boost on Windows can use automatic linking to pick up the correct # Boost libs based on compile-time touching of the headers. Since we don't # really need to add them to the link lines, set the names to blanks. if (MSVC) install (PROGRAMS ${Boost_DATE_TIME_LIBRARY_DEBUG} ${Boost_DATE_TIME_LIBRARY_RELEASE} ${Boost_FILESYSTEM_LIBRARY_DEBUG} ${Boost_FILESYSTEM_LIBRARY_RELEASE} ${Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG} ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE} ${Boost_REGEX_LIBRARY_DEBUG} ${Boost_REGEX_LIBRARY_RELEASE} ${Boost_THREAD_LIBRARY_DEBUG} ${Boost_THREAD_LIBRARY_RELEASE} DESTINATION ${QPID_INSTALL_LIBDIR}/boost COMPONENT ${QPID_COMPONENT_COMMON}) if (NOT Boost_VERSION LESS 103500) install (PROGRAMS ${Boost_SYSTEM_LIBRARY_DEBUG} ${Boost_SYSTEM_LIBRARY_RELEASE} DESTINATION ${QPID_INSTALL_LIBDIR}/boost COMPONENT ${QPID_COMPONENT_COMMON}) endif (NOT Boost_VERSION LESS 103500) option(QPID_LINK_BOOST_DYNAMIC "Link with dynamic Boost libs (OFF to link static)" ON) if (QPID_LINK_BOOST_DYNAMIC) add_definitions( /D BOOST_ALL_DYN_LINK) string (REPLACE .lib .dll _boost_date_time_debug ${Boost_DATE_TIME_LIBRARY_DEBUG}) string (REPLACE .lib .dll _boost_date_time_release ${Boost_DATE_TIME_LIBRARY_RELEASE}) string (REPLACE .lib .dll _boost_filesystem_debug ${Boost_FILESYSTEM_LIBRARY_DEBUG}) string (REPLACE .lib .dll _boost_filesystem_release ${Boost_FILESYSTEM_LIBRARY_RELEASE}) string (REPLACE .lib .dll _boost_program_options_debug ${Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG}) string (REPLACE .lib .dll _boost_program_options_release ${Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE}) string (REPLACE .lib .dll _boost_regex_debug ${Boost_REGEX_LIBRARY_DEBUG}) string (REPLACE .lib .dll _boost_regex_release ${Boost_REGEX_LIBRARY_RELEASE}) string (REPLACE .lib .dll _boost_thread_debug ${Boost_THREAD_LIBRARY_DEBUG}) string (REPLACE .lib .dll _boost_thread_release ${Boost_THREAD_LIBRARY_RELEASE}) # Boost 1.35 added the system library, which gets indirectly linked in # via other Boost libs. So, if building with Boost 1.35 or later, also # include system in the Windows install package. if (NOT Boost_VERSION LESS 103500) string (REPLACE boost_thread boost_system _boost_system_debug ${_boost_thread_debug}) string (REPLACE boost_thread boost_system _boost_system_release ${_boost_thread_release}) endif (NOT Boost_VERSION LESS 103500) install (PROGRAMS ${_boost_date_time_debug} ${_boost_date_time_release} ${_boost_filesystem_debug} ${_boost_filesystem_release} ${_boost_program_options_debug} ${_boost_program_options_release} ${_boost_regex_debug} ${_boost_regex_release} ${_boost_system_debug} ${_boost_system_release} ${_boost_thread_debug} ${_boost_thread_release} DESTINATION ${QPID_INSTALL_LIBDIR}/boost COMPONENT ${QPID_COMPONENT_COMMON}) endif (QPID_LINK_BOOST_DYNAMIC) # Need the boost headers regardless of which way the libs go. Try to # weed out what we don't need, else it's giant and unnecessary. install (DIRECTORY ${Boost_INCLUDE_DIR}/boost DESTINATION ${QPID_INSTALL_INCLUDEDIR} COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE} PATTERN "accumulators/*" EXCLUDE PATTERN "algorithm/*" EXCLUDE PATTERN "archive/*" EXCLUDE PATTERN "asio*" EXCLUDE PATTERN "bimap*" EXCLUDE PATTERN "circular_buffer*" EXCLUDE PATTERN "concept*" EXCLUDE PATTERN "dynamic_bitset*" EXCLUDE PATTERN "flyweight*" EXCLUDE PATTERN "fusion/*" EXCLUDE PATTERN "gil/*" EXCLUDE PATTERN "graph/*" EXCLUDE PATTERN "interprocess/*" EXCLUDE PATTERN "lambda/*" EXCLUDE PATTERN "logic/*" EXCLUDE PATTERN "math*" EXCLUDE PATTERN "mpi*" EXCLUDE PATTERN "multi_*" EXCLUDE PATTERN "numeric/*" EXCLUDE PATTERN "pending/*" EXCLUDE PATTERN "pool/*" EXCLUDE PATTERN "property_map/*" EXCLUDE PATTERN "proto/*" EXCLUDE PATTERN "random*" EXCLUDE PATTERN "signals*" EXCLUDE PATTERN "spirit*" EXCLUDE PATTERN "statechart/*" EXCLUDE PATTERN "units/*" EXCLUDE PATTERN "unordered*" EXCLUDE PATTERN "wave*" EXCLUDE PATTERN "xpressive/*" EXCLUDE) set(Boost_DATE_TIME_LIBRARY "") set(Boost_THREAD_LIBRARY "") set(Boost_PROGRAM_OPTIONS_LIBRARY "") set(Boost_FILESYSTEM_LIBRARY "") set(Boost_UNIT_TEST_FRAMEWORK_LIBRARY "") set(Boost_REGEX_LIBRARY "") include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/windows/resources ) endif (MSVC) include_directories( ${Boost_INCLUDE_DIR} ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../include ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) include_directories( ${CMAKE_CURRENT_BINARY_DIR}/../include ) link_directories( ${Boost_LIBRARY_DIRS} ) CHECK_LIBRARY_EXISTS (rt clock_gettime "" CLOCK_GETTIME_IN_RT) if (NOT CLOCK_GETTIME_IN_RT) CHECK_FUNCTION_EXISTS (clock_gettime QPID_HAS_CLOCK_GETTIME) else (NOT CLOCK_GETTIME_IN_RT) set(CMAKE_REQUIRED_LIBS ${CMAKE_REQUIRED_LIBS} rt) set(QPID_HAS_CLOCK_GETTIME YES CACHE BOOL "Platform has clock_gettime") endif (NOT CLOCK_GETTIME_IN_RT) # Check for header file for dtrace static probes check_include_files(sys/sdt.h HAVE_SYS_SDT_H) if (HAVE_SYS_SDT_H) set(probes_default ON) endif (HAVE_SYS_SDT_H) option(BUILD_PROBES "Build with DTrace/systemtap static probes" ${probes_default}) if (NOT BUILD_PROBES) set (HAVE_SYS_SDT_H 0) endif (NOT BUILD_PROBES) # Check for poll/epoll header files check_include_files(sys/poll.h HAVE_POLL) check_include_files(sys/epoll.h HAVE_EPOLL) # Set default poller implementation (check from general to specific to allow overriding) if (HAVE_POLL) set(poller_default poll) endif (HAVE_POLL) if (HAVE_EPOLL) set(poller_default epoll) endif (HAVE_EPOLL) set(POLLER ${poller_default} CACHE STRING "Poller implementation (poll/epoll)") # If not windows ensure that we have uuid library if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) CHECK_LIBRARY_EXISTS (uuid uuid_compare "" HAVE_UUID) CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H) if (NOT HAVE_UUID AND NOT HAVE_UUID_H) message(FATAL_ERROR "Uuid library and/or header file not found") endif (NOT HAVE_UUID AND NOT HAVE_UUID_H) endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) # See if Cyrus SASL is desired and available CHECK_LIBRARY_EXISTS (sasl2 sasl_checkpass "" HAVE_SASL) CHECK_INCLUDE_FILES (sasl/sasl.h HAVE_SASL_H) set (sasl_default ${sasl_force}) if (HAVE_SASL AND HAVE_SASL_H) set (sasl_default ON) endif (HAVE_SASL AND HAVE_SASL_H) option(BUILD_SASL "Build with Cyrus SASL support" ${sasl_default}) if (BUILD_SASL) if (NOT HAVE_SASL) message(FATAL_ERROR "Cyrus SASL support requested but libsasl2 not found") endif (NOT HAVE_SASL) if (NOT HAVE_SASL_H) message(FATAL_ERROR "Cyrus SASL support requested but sasl.h not found") endif (NOT HAVE_SASL_H) find_program(SASLPASSWD2 saslpasswd2 DOC "Location of the saslpasswd2 program") set(BROKER_SASL_NAME "qpidd" CACHE STRING "SASL app name for the qpid broker") set(qpidcommon_sasl_source qpid/sys/cyrus/CyrusSecurityLayer.h qpid/sys/cyrus/CyrusSecurityLayer.cpp ) set(qpidcommon_sasl_lib sasl2) endif (BUILD_SASL) # See if XML Exchange is desired and prerequisites are available CHECK_LIBRARY_EXISTS (xerces-c _init "" HAVE_XERCES) CHECK_INCLUDE_FILE_CXX (xercesc/framework/MemBufInputSource.hpp HAVE_XERCES_H) CHECK_INCLUDE_FILE_CXX (xqilla/xqilla-simple.hpp HAVE_XQILLA_H) CHECK_INCLUDE_FILE_CXX (xqilla/ast/XQEffectiveBooleanValue.hpp HAVE_XQ_EBV) set (xml_default ${xml_force}) if (CMAKE_SYSTEM_NAME STREQUAL Windows) else (CMAKE_SYSTEM_NAME STREQUAL Windows) if (HAVE_XERCES AND HAVE_XERCES_H) if (HAVE_XQILLA_H) set (xml_default ON) endif (HAVE_XQILLA_H) endif (HAVE_XERCES AND HAVE_XERCES_H) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) option(BUILD_XML "Build with XML Exchange" ${xml_default}) if (BUILD_XML) if (NOT HAVE_XERCES) message(FATAL_ERROR "XML Exchange support requested but xerces-c library not found") endif (NOT HAVE_XERCES) if (NOT HAVE_XERCES_H) message(FATAL_ERROR "XML Exchange support requested but Xerces-C headers not found") endif (NOT HAVE_XERCES_H) if (NOT HAVE_XQILLA_H) message(FATAL_ERROR "XML Exchange support requested but XQilla headers not found") endif (NOT HAVE_XQILLA_H) if (HAVE_XQ_EBV) add_definitions(-DXQ_EFFECTIVE_BOOLEAN_VALUE_HPP) endif (HAVE_XQ_EBV) add_library (xml MODULE qpid/xml/XmlExchange.cpp qpid/xml/XmlExchange.h qpid/xml/XmlExchangePlugin.cpp) set_target_properties (xml PROPERTIES PREFIX "") target_link_libraries (xml xerces-c xqilla qpidbroker pthread) if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties (xml PROPERTIES PREFIX "" LINK_FLAGS ${GCC_CATCH_UNDEFINED}) endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS xml DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) set(xml_tests XmlClientSessionTest) endif (BUILD_XML) # Build the ACL plugin set (acl_default ON) option(BUILD_ACL "Build ACL enforcement broker plugin" ${acl_default}) if (BUILD_ACL) set (acl_SOURCES qpid/acl/Acl.cpp qpid/acl/Acl.h qpid/acl/AclData.cpp qpid/acl/AclData.h qpid/acl/AclPlugin.cpp qpid/acl/AclReader.cpp qpid/acl/AclReader.h qpid/acl/AclValidator.cpp qpid/acl/AclValidator.h ) # Windows builds the ACL code into the qpidbroker library; see QPID-1842 # for history and rationale. If this is changed, remove the acl_SOURCES from # the qpidbroker platform-specific source list. if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) add_library (acl MODULE ${acl_SOURCES}) set_target_properties (acl PROPERTIES PREFIX "") target_link_libraries (acl qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY}) if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties (acl PROPERTIES PREFIX "" LINK_FLAGS "${GCC_CATCH_UNDEFINED}") endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS acl DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows) endif (BUILD_ACL) set (ha_default ON) option(BUILD_HA "Build Active-Passive HA plugin" ${ha_default}) if (BUILD_HA) set (ha_SOURCES qpid/ha/Backup.cpp qpid/ha/Backup.h qpid/ha/HaBroker.cpp qpid/ha/HaBroker.h qpid/ha/HaPlugin.cpp qpid/ha/Settings.h qpid/ha/QueueReplicator.h qpid/ha/QueueReplicator.cpp qpid/ha/ReplicatingSubscription.h qpid/ha/ReplicatingSubscription.cpp qpid/ha/BrokerReplicator.cpp qpid/ha/BrokerReplicator.h qpid/ha/ConnectionExcluder.cpp qpid/ha/ConnectionExcluder.h ) add_library (ha MODULE ${ha_SOURCES}) set_target_properties (ha PROPERTIES PREFIX "") target_link_libraries (ha qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY}) if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties (ha PROPERTIES PREFIX "" LINK_FLAGS -Wl,--no-undefined) endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS ha DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) endif (BUILD_HA) # Check for optional cluster support requirements include (cluster.cmake) # Check for optional RDMA support requirements include (rdma.cmake) # Check for optional SSL support requirements include (ssl.cmake) # Check for syslog capabilities not present on all systems check_symbol_exists (LOG_AUTHPRIV "sys/syslog.h" HAVE_LOG_AUTHPRIV) check_symbol_exists (LOG_FTP "sys/syslog.h" HAVE_LOG_FTP) # Allow MSVC user to select 'WinXP-SP3/Windows Server 2003' as build target version set (win32_winnt_default OFF) if (CMAKE_SYSTEM_NAME STREQUAL Windows) if (MSVC) set (win32_winnt_default ON) endif (MSVC) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) option(SET_WIN32_WINNT "In Windows-MSVC build: define _WIN32_WINNT=0x0502 to select target version: Windows XP with SP3" ${win32_winnt_default}) if (CMAKE_SYSTEM_NAME STREQUAL Windows) if (MSVC) add_definitions( /D "_CRT_NONSTDC_NO_WARNINGS" /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /wd4244 /wd4800 /wd4355 /wd4267 ) if (SET_WIN32_WINNT) add_definitions(/D "_WIN32_WINNT=0x0502") endif (SET_WIN32_WINNT) # set the RelWithDebInfo compile/link switches to equal Release set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MD /O2 /Ob2 /D NDEBUG") set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO "/debug /INCREMENTAL:NO") if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src) # Set the windows version for the .NET Binding cpp project configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc ${CMAKE_CURRENT_BINARY_DIR}/windows/resources/org.apache.qpid.messaging.rc) # Set the windows version for the .NET Binding sessionreceiver project configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src/sessionreceiver/properties/sessionreceiver-AssemblyInfo-template.cs ${CMAKE_CURRENT_BINARY_DIR}/windows/generated_src/sessionreceiver-AssemblyInfo.cs) endif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../bindings/qpid/dotnet/src) endif (MSVC) set (qpidtypes_platform_SOURCES qpid/sys/windows/uuid.cpp ) set (qpidtypes_platform_LIBS rpcrt4 ) set (qpidcommon_platform_SOURCES qpid/log/windows/SinkOptions.cpp qpid/sys/windows/AsynchIO.cpp qpid/sys/windows/FileSysDir.cpp qpid/sys/windows/IocpPoller.cpp qpid/sys/windows/IOHandle.cpp qpid/sys/windows/LockFile.cpp qpid/sys/windows/PipeHandle.cpp qpid/sys/windows/PollableCondition.cpp qpid/sys/windows/Shlib.cpp qpid/sys/windows/Socket.cpp qpid/sys/windows/SocketAddress.cpp qpid/sys/windows/StrError.cpp qpid/sys/windows/SystemInfo.cpp qpid/sys/windows/Thread.cpp qpid/sys/windows/Time.cpp qpid/sys/windows/MemStat.cpp qpid/client/windows/SaslFactory.cpp ${sslcommon_windows_SOURCES} ) set (qpidcommon_platform_LIBS ${Boost_THREAD_LIBRARY} ${windows_ssl_libs} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_DATE_TIME_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY} ws2_32 ) set (qpidbroker_platform_SOURCES qpid/broker/windows/BrokerDefaults.cpp qpid/broker/windows/SaslAuthenticator.cpp ${acl_SOURCES} ${sslbroker_windows_SOURCES} ) set (qpidbroker_platform_LIBS ${windows_ssl_libs} ${windows_ssl_server_libs} ) set (qpidclient_platform_SOURCES ${sslclient_windows_SOURCES} ) set (qpidclient_platform_LIBS ${windows_ssl_libs} ) set (qpidd_platform_SOURCES windows/QpiddBroker.cpp windows/SCM.cpp ) set (qpidmessaging_platform_SOURCES qpid/messaging/HandleInstantiator.cpp ) else (CMAKE_SYSTEM_NAME STREQUAL Windows) # POSIX (Non-Windows) platforms have a lot of overlap in sources; the only # major difference is the poller module. if (POLLER STREQUAL poll) set (qpid_poller_module qpid/sys/posix/PosixPoller.cpp ) elseif (POLLER STREQUAL epoll) set (qpid_poller_module qpid/sys/epoll/EpollPoller.cpp ) endif (POLLER STREQUAL poll) if (CMAKE_SYSTEM_NAME STREQUAL Linux) set (qpid_system_module qpid/sys/posix/SystemInfo.cpp ) add_definitions(-pthread) set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread") if (CMAKE_COMPILER_IS_GNUCXX) set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${GCC_CATCH_UNDEFINED} -pthread") endif (CMAKE_COMPILER_IS_GNUCXX) endif (CMAKE_SYSTEM_NAME STREQUAL Linux) set (qpidtypes_platform_SOURCES) set (qpidtypes_platform_LIBS uuid ${Boost_SYSTEM_LIBRARY} ) if (CMAKE_SYSTEM_NAME STREQUAL SunOS) set (qpid_system_module qpid/sys/solaris/SystemInfo.cpp ) # On Sun we want -lpthread -lthread as the 2nd last and last libs passed to linker set (qpidtypes_platform_LIBS ${qpidtypes_platform_LIBS} pthread thread ) endif (CMAKE_SYSTEM_NAME STREQUAL SunOS) set (qpidcommon_platform_SOURCES qpid/sys/posix/AsynchIO.cpp qpid/sys/posix/Fork.cpp qpid/sys/posix/FileSysDir.cpp qpid/sys/posix/IOHandle.cpp qpid/sys/posix/LockFile.cpp qpid/sys/posix/MemStat.cpp qpid/sys/posix/Mutex.cpp qpid/sys/posix/PipeHandle.cpp qpid/sys/posix/PollableCondition.cpp qpid/sys/posix/Shlib.cpp qpid/log/posix/SinkOptions.cpp qpid/sys/posix/Socket.cpp qpid/sys/posix/SocketAddress.cpp qpid/sys/posix/StrError.cpp qpid/sys/posix/Thread.cpp qpid/sys/posix/Time.cpp qpid/SaslFactory.cpp ${qpid_system_module} ${qpid_poller_module} ) set (qpidcommon_platform_LIBS ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY} ${CMAKE_DL_LIBS} ) set (qpidbroker_platform_SOURCES qpid/broker/Daemon.cpp qpid/broker/SaslAuthenticator.cpp qpid/broker/SignalHandler.h qpid/broker/SignalHandler.cpp qpid/broker/posix/BrokerDefaults.cpp ) set (qpidclient_platform_SOURCES ) set (qpidd_platform_SOURCES posix/QpiddBroker.cpp ) set (qpidmessaging_platform_SOURCES ) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) set (qpidcommon_SOURCES ${rgen_framing_srcs} ${qpidcommon_platform_SOURCES} ${qpidcommon_sasl_source} qpid/assert.cpp qpid/Address.cpp qpid/DataDir.cpp qpid/Exception.cpp qpid/Modules.cpp qpid/Options.cpp qpid/Plugin.cpp qpid/RefCountedBuffer.cpp qpid/SessionState.cpp qpid/SessionId.cpp qpid/StringUtils.cpp qpid/Url.cpp qpid/UrlArray.cpp qpid/amqp_0_10/SessionHandler.cpp qpid/framing/AccumulatedAck.cpp qpid/framing/AMQBody.cpp qpid/framing/AMQMethodBody.cpp qpid/framing/AMQContentBody.cpp qpid/framing/AMQFrame.cpp qpid/framing/AMQHeaderBody.cpp qpid/framing/AMQHeartbeatBody.cpp qpid/framing/Array.cpp qpid/framing/BodyHandler.cpp qpid/framing/Buffer.cpp qpid/framing/Endian.cpp qpid/framing/FieldTable.cpp qpid/framing/FieldValue.cpp qpid/framing/FrameSet.cpp qpid/framing/FrameDecoder.cpp qpid/framing/List.cpp qpid/framing/ProtocolInitiation.cpp qpid/framing/ProtocolVersion.cpp qpid/framing/SendContent.cpp qpid/framing/SequenceNumber.cpp qpid/framing/SequenceNumberSet.cpp qpid/framing/SequenceSet.cpp qpid/framing/Proxy.cpp qpid/framing/Uuid.cpp qpid/framing/TransferContent.cpp qpid/log/Logger.cpp qpid/log/Options.cpp qpid/log/OstreamOutput.cpp qpid/log/Selector.cpp qpid/log/Statement.cpp qpid/management/Buffer.cpp qpid/management/ConnectionSettings.cpp qpid/management/Mutex.cpp qpid/management/Manageable.cpp qpid/management/ManagementObject.cpp qpid/sys/AggregateOutput.cpp qpid/sys/AsynchIOHandler.cpp qpid/sys/ClusterSafe.cpp qpid/sys/Dispatcher.cpp qpid/sys/DispatchHandle.cpp qpid/sys/Runnable.cpp qpid/sys/Shlib.cpp qpid/sys/Timer.cpp qpid/sys/TimerWarnings.cpp qpid/amqp_0_10/Codecs.cpp ) add_msvc_version (qpidcommon library dll) add_library (qpidcommon SHARED ${qpidcommon_SOURCES}) if (CLOCK_GETTIME_IN_RT) set (qpidcommon_platform_LIBS ${qpidcommon_platform_LIBS} rt) endif (CLOCK_GETTIME_IN_RT) target_link_libraries (qpidcommon qpidtypes ${qpidcommon_platform_LIBS} ${qpidcommon_sasl_lib}) set_target_properties (qpidcommon PROPERTIES VERSION ${qpidcommon_version}) install (TARGETS qpidcommon DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_COMMON}) install_pdb (qpidcommon ${QPID_COMPONENT_COMMON}) set(qpidtypes_SOURCES qpid/types/Exception.cpp qpid/types/Uuid.cpp qpid/types/Variant.cpp ${qpidtypes_platform_SOURCES} ) add_msvc_version (qpidtypes library dll) add_library(qpidtypes SHARED ${qpidtypes_SOURCES}) target_link_libraries(qpidtypes ${qpidtypes_platform_LIBS}) set_target_properties (qpidtypes PROPERTIES VERSION ${qpidtypes_version}) install(TARGETS qpidtypes DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_COMMON}) install_pdb (qpidtypes ${QPID_COMPONENT_COMMON}) set (qpidclient_SOURCES ${rgen_client_srcs} ${qpidclient_platform_SOURCES} qpid/client/Bounds.cpp qpid/client/Completion.cpp qpid/client/Connection.cpp qpid/client/ConnectionHandler.cpp qpid/client/ConnectionImpl.cpp qpid/client/ConnectionSettings.cpp qpid/client/Connector.cpp qpid/client/Demux.cpp qpid/client/Dispatcher.cpp qpid/client/FailoverManager.cpp qpid/client/FailoverListener.cpp qpid/client/Future.cpp qpid/client/FutureCompletion.cpp qpid/client/FutureResult.cpp qpid/client/LoadPlugins.cpp qpid/client/LocalQueue.cpp qpid/client/LocalQueueImpl.cpp qpid/client/Message.cpp qpid/client/MessageImpl.cpp qpid/client/MessageListener.cpp qpid/client/MessageReplayTracker.cpp qpid/client/QueueOptions.cpp qpid/client/Results.cpp qpid/client/SessionBase_0_10.cpp qpid/client/SessionBase_0_10Access.h qpid/client/ConnectionAccess.h qpid/client/SessionImpl.cpp qpid/client/StateManager.cpp qpid/client/Subscription.cpp qpid/client/SubscriptionImpl.cpp qpid/client/SubscriptionManager.cpp qpid/client/SubscriptionManagerImpl.cpp qpid/client/TCPConnector.cpp ) add_msvc_version (qpidclient library dll) add_library (qpidclient SHARED ${qpidclient_SOURCES}) target_link_libraries (qpidclient qpidcommon ${qpidclient_platform_LIBS}) set_target_properties (qpidclient PROPERTIES VERSION ${qpidclient_version}) install (TARGETS qpidclient DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_CLIENT}) install (DIRECTORY ../include/qpid DESTINATION ${QPID_INSTALL_INCLUDEDIR} COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE} PATTERN ".svn" EXCLUDE) install_pdb (qpidclient ${QPID_COMPONENT_CLIENT}) set (qpidmessaging_SOURCES ${qpidmessaging_platform_SOURCES} qpid/messaging/Address.cpp qpid/messaging/AddressParser.h qpid/messaging/AddressParser.cpp qpid/messaging/Connection.cpp qpid/messaging/ConnectionImpl.h qpid/messaging/Duration.cpp qpid/messaging/exceptions.cpp qpid/messaging/Message.cpp qpid/messaging/MessageImpl.h qpid/messaging/MessageImpl.cpp qpid/messaging/Receiver.cpp qpid/messaging/ReceiverImpl.h qpid/messaging/Session.cpp qpid/messaging/SessionImpl.h qpid/messaging/Sender.cpp qpid/messaging/SenderImpl.h qpid/messaging/FailoverUpdates.cpp qpid/client/amqp0_10/AcceptTracker.h qpid/client/amqp0_10/AcceptTracker.cpp qpid/client/amqp0_10/AddressResolution.h qpid/client/amqp0_10/AddressResolution.cpp qpid/client/amqp0_10/ConnectionImpl.h qpid/client/amqp0_10/ConnectionImpl.cpp qpid/client/amqp0_10/IncomingMessages.h qpid/client/amqp0_10/IncomingMessages.cpp qpid/client/amqp0_10/MessageSink.h qpid/client/amqp0_10/MessageSource.h qpid/client/amqp0_10/OutgoingMessage.h qpid/client/amqp0_10/OutgoingMessage.cpp qpid/client/amqp0_10/ReceiverImpl.h qpid/client/amqp0_10/ReceiverImpl.cpp qpid/client/amqp0_10/SessionImpl.h qpid/client/amqp0_10/SessionImpl.cpp qpid/client/amqp0_10/SenderImpl.h qpid/client/amqp0_10/SenderImpl.cpp ) add_msvc_version (qpidmessaging library dll) add_library (qpidmessaging SHARED ${qpidmessaging_SOURCES}) target_link_libraries (qpidmessaging qpidclient) set_target_properties (qpidmessaging PROPERTIES VERSION ${qpidmessaging_version}) install (TARGETS qpidmessaging DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_CLIENT}) install_pdb (qpidmessaging ${QPID_COMPONENT_CLIENT}) # Released source artifacts from Apache have the generated headers included in # the source tree, not the binary tree. So don't attempt to grab them when # they're not supposed to be there. if (NOT QPID_GENERATED_HEADERS_IN_SOURCE) install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../include/qpid DESTINATION ${QPID_INSTALL_INCLUDEDIR} COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE}) endif (NOT QPID_GENERATED_HEADERS_IN_SOURCE) if (MSVC) # Install the DtcPlugin project and call it qpidxarm. set(AMQP_WCF_DIR ${qpid-cpp_SOURCE_DIR}/../wcf) set(qpidxarm_SOURCES ${AMQP_WCF_DIR}/src/Apache/Qpid/DtcPlugin/DtcPlugin.cpp) if (EXISTS ${qpidxarm_SOURCES}) add_msvc_version (qpidxarm library dll) add_library (qpidxarm SHARED ${qpidxarm_SOURCES}) target_link_libraries (qpidxarm qpidclient qpidcommon) install (TARGETS qpidxarm DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_CLIENT}) install_pdb (qpidxarm ${QPID_COMPONENT_CLIENT}) endif (EXISTS ${qpidxarm_SOURCES}) endif (MSVC) set (qpidbroker_SOURCES ${mgen_broker_cpp} ${qpidbroker_platform_SOURCES} qpid/amqp_0_10/Connection.h qpid/amqp_0_10/Connection.cpp qpid/broker/Broker.cpp qpid/broker/Credit.cpp qpid/broker/Exchange.cpp qpid/broker/ExpiryPolicy.cpp qpid/broker/Fairshare.cpp qpid/broker/LegacyLVQ.cpp qpid/broker/MessageDeque.cpp qpid/broker/MessageMap.cpp qpid/broker/PriorityQueue.cpp qpid/broker/Queue.cpp qpid/broker/QueueCleaner.cpp qpid/broker/QueueListeners.cpp qpid/broker/FifoDistributor.cpp qpid/broker/MessageGroupManager.cpp qpid/broker/PersistableMessage.cpp qpid/broker/Bridge.cpp qpid/broker/Connection.cpp qpid/broker/ConnectionHandler.cpp qpid/broker/ConnectionFactory.cpp qpid/broker/DeliverableMessage.cpp qpid/broker/DeliveryRecord.cpp qpid/broker/DirectExchange.cpp qpid/broker/DtxAck.cpp qpid/broker/DtxBuffer.cpp qpid/broker/DtxManager.cpp qpid/broker/DtxTimeout.cpp qpid/broker/DtxWorkRecord.cpp qpid/broker/ExchangeRegistry.cpp qpid/broker/FanOutExchange.cpp qpid/broker/HeadersExchange.cpp qpid/broker/Link.cpp qpid/broker/LinkRegistry.cpp qpid/broker/Message.cpp qpid/broker/MessageAdapter.cpp qpid/broker/MessageBuilder.cpp qpid/broker/MessageStoreModule.cpp qpid/broker/NameGenerator.cpp qpid/broker/NullMessageStore.cpp qpid/broker/QueueBindings.cpp qpid/broker/QueueEvents.cpp qpid/broker/QueuePolicy.cpp qpid/broker/QueueRegistry.cpp qpid/broker/QueueFlowLimit.cpp qpid/broker/RecoveryManagerImpl.cpp qpid/broker/RecoveredEnqueue.cpp qpid/broker/RecoveredDequeue.cpp qpid/broker/RetryList.cpp qpid/broker/SecureConnection.cpp qpid/broker/SecureConnectionFactory.cpp qpid/broker/SemanticState.h qpid/broker/SemanticState.cpp qpid/broker/SessionAdapter.cpp qpid/broker/SessionState.h qpid/broker/SessionState.cpp qpid/broker/SessionManager.h qpid/broker/SessionManager.cpp qpid/broker/SessionContext.h qpid/broker/SessionHandler.h qpid/broker/SessionHandler.cpp qpid/broker/System.cpp qpid/broker/ThresholdAlerts.cpp qpid/broker/TopicExchange.cpp qpid/broker/TxAccept.cpp qpid/broker/TxBuffer.cpp qpid/broker/TxPublish.cpp qpid/broker/Vhost.cpp qpid/management/ManagementAgent.cpp qpid/management/ManagementDirectExchange.cpp qpid/management/ManagementTopicExchange.cpp qpid/sys/TCPIOPlugin.cpp ) add_msvc_version (qpidbroker library dll) add_library (qpidbroker SHARED ${qpidbroker_SOURCES}) target_link_libraries (qpidbroker qpidcommon ${qpidbroker_platform_LIBS}) set_target_properties (qpidbroker PROPERTIES VERSION ${qpidbroker_version}) if (MSVC) set_target_properties (qpidbroker PROPERTIES COMPILE_FLAGS /wd4290) endif (MSVC) install (TARGETS qpidbroker DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_BROKER}) install_pdb (qpidbroker ${QPID_COMPONENT_BROKER}) set (qpidd_SOURCES ${qpidd_platform_SOURCES} qpidd.cpp qpidd.h ) add_msvc_version (qpidd application exe) add_executable (qpidd ${qpidd_SOURCES}) target_link_libraries (qpidd qpidbroker qpidcommon ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}) install (TARGETS qpidd RUNTIME DESTINATION ${QPID_INSTALL_SBINDIR} COMPONENT ${QPID_COMPONENT_BROKER}) if (CPACK_GENERATOR STREQUAL "NSIS") set (CPACK_NSIS_MENU_LINKS "qpidd" "Start Qpid Broker") endif (CPACK_GENERATOR STREQUAL "NSIS") if (UNIX) install (CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${QPID_LOCALSTATE_DIR}/lib/qpidd)") install (CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}${QPID_LOCALSTATE_DIR}/spool/qpidd)") endif (UNIX) set (qmf_SOURCES qpid/agent/ManagementAgentImpl.cpp qpid/agent/ManagementAgentImpl.h ) set (qmf_HEADERS ../include/qpid/agent/ManagementAgent.h ../include/qpid/agent/QmfAgentImportExport.h ) add_msvc_version (qmf library dll) add_library (qmf SHARED ${qmf_SOURCES}) target_link_libraries (qmf qmfengine) set_target_properties (qmf PROPERTIES VERSION ${qmf_version}) install (TARGETS qmf OPTIONAL DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_QMF}) install (FILES ${qmf_HEADERS} DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qpid/agent COMPONENT ${QPID_COMPONENT_QMF}) install_pdb (qmf ${QPID_COMPONENT_QMF}) if(NOT WIN32) set (qmf2_HEADERS ../include/qmf/AgentEvent.h ../include/qmf/Agent.h ../include/qmf/AgentSession.h ../include/qmf/ConsoleEvent.h ../include/qmf/ConsoleSession.h ../include/qmf/DataAddr.h ../include/qmf/Data.h ../include/qmf/exceptions.h ../include/qmf/Handle.h ../include/qmf/ImportExport.h ../include/qmf/posix/EventNotifier.h ../include/qmf/Query.h ../include/qmf/Schema.h ../include/qmf/SchemaId.h ../include/qmf/SchemaMethod.h ../include/qmf/SchemaProperty.h ../include/qmf/SchemaTypes.h ../include/qmf/Subscription.h ) set (qmf2_SOURCES ${qmf2_HEADERS} qmf/agentCapability.h qmf/Agent.cpp qmf/AgentEvent.cpp qmf/AgentEventImpl.h qmf/AgentImpl.h qmf/AgentSession.cpp qmf/AgentSubscription.cpp qmf/AgentSubscription.h qmf/ConsoleEvent.cpp qmf/ConsoleEventImpl.h qmf/ConsoleSession.cpp qmf/ConsoleSessionImpl.h qmf/constants.cpp qmf/constants.h qmf/DataAddr.cpp qmf/DataAddrImpl.h qmf/Data.cpp qmf/DataImpl.h qmf/EventNotifierImpl.h qmf/EventNotifierImpl.cpp qmf/PosixEventNotifier.cpp qmf/PosixEventNotifierImpl.cpp qmf/exceptions.cpp qmf/Expression.cpp qmf/Expression.h qmf/Hash.cpp qmf/Hash.h qmf/PrivateImplRef.h qmf/Query.cpp qmf/QueryImpl.h qmf/Schema.cpp qmf/SchemaCache.cpp qmf/SchemaCache.h qmf/SchemaId.cpp qmf/SchemaIdImpl.h qmf/SchemaImpl.h qmf/SchemaMethod.cpp qmf/SchemaMethodImpl.h qmf/SchemaProperty.cpp qmf/SchemaPropertyImpl.h qmf/Subscription.cpp qmf/SubscriptionImpl.h ) add_msvc_version (qmf2 library dll) add_library (qmf2 SHARED ${qmf2_SOURCES}) target_link_libraries (qmf2 qpidmessaging qpidtypes qpidclient qpidcommon) set_target_properties (qmf2 PROPERTIES VERSION ${qmf2_version}) install (TARGETS qmf2 OPTIONAL DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_QMF}) install (FILES ${qmf2_HEADERS} DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qmf COMPONENT ${QPID_COMPONENT_QMF}) install_pdb (qmf2 ${QPID_COMPONENT_QMF}) endif (NOT WIN32) set (qmfengine_SOURCES qmf/engine/Agent.cpp qmf/engine/BrokerProxyImpl.cpp qmf/engine/BrokerProxyImpl.h qmf/engine/ConnectionSettingsImpl.cpp qmf/engine/ConnectionSettingsImpl.h qmf/engine/ConsoleImpl.cpp qmf/engine/ConsoleImpl.h qmf/engine/EventImpl.cpp qmf/engine/EventImpl.h qmf/engine/MessageImpl.cpp qmf/engine/MessageImpl.h qmf/engine/ObjectIdImpl.cpp qmf/engine/ObjectIdImpl.h qmf/engine/ObjectImpl.cpp qmf/engine/ObjectImpl.h qmf/engine/Protocol.cpp qmf/engine/Protocol.h qmf/engine/QueryImpl.cpp qmf/engine/QueryImpl.h qmf/engine/SequenceManager.cpp qmf/engine/SequenceManager.h qmf/engine/SchemaImpl.cpp qmf/engine/SchemaImpl.h qmf/engine/ValueImpl.cpp qmf/engine/ValueImpl.h ) set (qmfengine_HEADERS ../include/qmf/engine/Agent.h ../include/qmf/engine/ConnectionSettings.h ../include/qmf/engine/Console.h ../include/qmf/engine/Event.h ../include/qmf/engine/Message.h ../include/qmf/engine/Object.h ../include/qmf/engine/ObjectId.h ../include/qmf/engine/QmfEngineImportExport.h ../include/qmf/engine/Query.h ../include/qmf/engine/ResilientConnection.h ../include/qmf/engine/Schema.h ../include/qmf/engine/Typecode.h ../include/qmf/engine/Value.h ) install (FILES ${qmfengine_HEADERS} DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qmf/engine COMPONENT ${QPID_COMPONENT_QMF}) if (NOT WIN32) list(APPEND qmfengine_SOURCES qmf/engine/ResilientConnection.cpp) endif (NOT WIN32) add_msvc_version (qmfengine library dll) add_library (qmfengine SHARED ${qmfengine_SOURCES}) target_link_libraries (qmfengine qpidclient) set_target_properties (qmfengine PROPERTIES VERSION ${qmfengine_version}) install (TARGETS qmfengine OPTIONAL DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_QMF}) install_pdb (qmfengine ${QPID_COMPONENT_QMF}) set (qmfconsole_SOURCES qpid/console/Agent.cpp qpid/console/Broker.cpp qpid/console/ClassKey.cpp qpid/console/Event.cpp qpid/console/Object.cpp qpid/console/ObjectId.cpp qpid/console/Package.cpp qpid/console/Schema.cpp qpid/console/SequenceManager.cpp qpid/console/SessionManager.cpp qpid/console/Value.cpp ) set (qmfconsole_HEADERS ../include/qpid/console/Agent.h ../include/qpid/console/Broker.h ../include/qpid/console/ClassKey.h ../include/qpid/console/ConsoleImportExport.h ../include/qpid/console/ConsoleListener.h ../include/qpid/console/Event.h ../include/qpid/console/Object.h ../include/qpid/console/ObjectId.h ../include/qpid/console/Package.h ../include/qpid/console/Schema.h ../include/qpid/console/SequenceManager.h ../include/qpid/console/SessionManager.h ../include/qpid/console/Value.h ) add_msvc_version (qmfconsole library dll) add_library (qmfconsole SHARED ${qmfconsole_SOURCES}) target_link_libraries (qmfconsole qpidclient) set_target_properties (qmfconsole PROPERTIES VERSION ${qmfconsole_version}) install (TARGETS qmfconsole DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_QMF}) install (FILES ${qmfconsole_HEADERS} DESTINATION ${QPID_INSTALL_INCLUDEDIR}/qpid/console COMPONENT ${QPID_COMPONENT_QMF}) install_pdb (qmfconsole ${QPID_COMPONENT_QMF}) # A queue event listener plugin that creates messages on a replication # queue corresponding to enqueue and dequeue events: set (replicating_listener_SOURCES qpid/replication/constants.h qpid/replication/ReplicatingEventListener.cpp qpid/replication/ReplicatingEventListener.h ) add_msvc_version (replicating_listener library dll) add_library (replicating_listener MODULE ${replicating_listener_SOURCES}) target_link_libraries (replicating_listener qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY}) set_target_properties (replicating_listener PROPERTIES PREFIX "") if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(replicating_listener PROPERTIES LINK_FLAGS "${GCC_CATCH_UNDEFINED}") endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS replicating_listener DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) # A custom exchange plugin that allows an exchange to be created that # can process the messages from a replication queue (populated on the # source system by the replicating listener plugin above) and take the # corresponding action on the local queues set (replication_exchange_SOURCES qpid/replication/constants.h qpid/replication/ReplicationExchange.cpp qpid/replication/ReplicationExchange.h ) add_msvc_version (replication_exchange library dll) add_library (replication_exchange MODULE ${replication_exchange_SOURCES}) target_link_libraries (replication_exchange qpidbroker) set_target_properties (replication_exchange PROPERTIES PREFIX "") if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(replication_exchange PROPERTIES LINK_FLAGS "${GCC_CATCH_UNDEFINED}") endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS replication_exchange DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) # This is only really needed until all the trunk builds (Linux, UNIX, Windows) # are all on cmake only. This is because cmake builds always have a config.h # file whereas older builds only have config.h on autoconf-generated builds. add_definitions(-DHAVE_CONFIG_H) add_definitions(-DBOOST_FILESYSTEM_VERSION=2) # Now create the config file from all the info learned above. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) add_subdirectory(qpid/store) add_subdirectory(tests) # Support for pkg-config if (UNIX) add_custom_target(pkgconfig ALL echo DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qpid.pc.in ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid.pc DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig COMPONENT ${QPID_COMPONENT_COMMON}) add_dependencies(pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/qmf2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pc DESTINATION ${QPID_INSTALL_LIBDIR}/pkgconfig COMPONENT ${QPID_COMPONENT_COMMON}) endif (UNIX) qpidc-0.16/src/ssl.cmake0000664000076400007640000001043111715002376015527 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # SSL/TLS CMake fragment, to be included in CMakeLists.txt # # Optional SSL/TLS support. Requires Netscape Portable Runtime on Linux. include(FindPkgConfig) # According to some cmake docs this is not a reliable way to detect # pkg-configed libraries, but it's no worse than what we did under # autotools pkg_check_modules(NSS nss) set (ssl_default ${ssl_force}) if (CMAKE_SYSTEM_NAME STREQUAL Windows) set (ssl_default ON) else (CMAKE_SYSTEM_NAME STREQUAL Windows) if (NSS_FOUND) set (ssl_default ON) endif (NSS_FOUND) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) option(BUILD_SSL "Build with support for SSL" ${ssl_default}) if (BUILD_SSL) if (CMAKE_SYSTEM_NAME STREQUAL Windows) set (sslclient_windows_SOURCES qpid/client/windows/SslConnector.cpp) set (sslbroker_windows_SOURCES qpid/broker/windows/SslProtocolFactory.cpp) set (sslcommon_windows_SOURCES qpid/sys/windows/SslAsynchIO.cpp ) set (windows_ssl_libs Secur32.lib) set (windows_ssl_server_libs Crypt32.lib) else (CMAKE_SYSTEM_NAME STREQUAL Windows) if (NOT NSS_FOUND) message(FATAL_ERROR "nss/nspr not found, required for ssl support") endif (NOT NSS_FOUND) foreach(f ${NSS_CFLAGS}) set (NSS_COMPILE_FLAGS "${NSS_COMPILE_FLAGS} ${f}") endforeach(f) foreach(f ${NSS_LDFLAGS}) set (NSS_LINK_FLAGS "${NSS_LINK_FLAGS} ${f}") endforeach(f) set (sslcommon_SOURCES qpid/sys/ssl/check.h qpid/sys/ssl/check.cpp qpid/sys/ssl/util.h qpid/sys/ssl/util.cpp qpid/sys/ssl/SslSocket.h qpid/sys/ssl/SslSocket.cpp qpid/sys/ssl/SslIo.h qpid/sys/ssl/SslIo.cpp ) add_library (sslcommon SHARED ${sslcommon_SOURCES}) target_link_libraries (sslcommon qpidcommon) set_target_properties (sslcommon PROPERTIES VERSION ${sslcommon_version} COMPILE_FLAGS ${NSS_COMPILE_FLAGS} LINK_FLAGS ${NSS_LINK_FLAGS}) install (TARGETS sslcommon DESTINATION ${QPID_INSTALL_LIBDIR} COMPONENT ${QPID_COMPONENT_COMMON}) install_pdb (sslcommon ${QPID_COMPONENT_COMMON}) set (ssl_SOURCES qpid/sys/SslPlugin.cpp qpid/sys/ssl/SslHandler.h qpid/sys/ssl/SslHandler.cpp ) add_library (ssl MODULE ${ssl_SOURCES}) target_link_libraries (ssl qpidbroker sslcommon ${Boost_PROGRAM_OPTIONS_LIBRARY}) set_target_properties (ssl PROPERTIES PREFIX "" COMPILE_FLAGS ${NSS_COMPILE_FLAGS}) if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(ssl PROPERTIES LINK_FLAGS "${GCC_CATCH_UNDEFINED}") endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS ssl DESTINATION ${QPIDD_MODULE_DIR} COMPONENT ${QPID_COMPONENT_BROKER}) add_library (sslconnector MODULE qpid/client/SslConnector.cpp) target_link_libraries (sslconnector qpidclient sslcommon) set_target_properties (sslconnector PROPERTIES PREFIX "" COMPILE_FLAGS ${NSS_COMPILE_FLAGS}) if (CMAKE_COMPILER_IS_GNUCXX) set_target_properties(sslconnector PROPERTIES LINK_FLAGS "${GCC_CATCH_UNDEFINED}") endif (CMAKE_COMPILER_IS_GNUCXX) install (TARGETS sslconnector DESTINATION ${QPIDC_MODULE_DIR} COMPONENT ${QPID_COMPONENT_CLIENT}) endif (CMAKE_SYSTEM_NAME STREQUAL Windows) endif (BUILD_SSL) qpidc-0.16/src/cluster.mk0000664000076400007640000000745611667435470015766 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Cluster library makefile fragment, to be included in Makefile.am # # Optional CMAN support # Distribute all sources. EXTRA_DIST += qpid/cluster/Quorum_cman.h qpid/cluster/Quorum_cman.cpp qpid/cluster/Quorum_null.h if HAVE_LIBCMAN CMAN_SOURCES = qpid/cluster/Quorum_cman.h qpid/cluster/Quorum_cman.cpp libcman = -lcman else CMAN_SOURCES = qpid/cluster/Quorum_null.h endif if HAVE_LIBCPG dmoduleexec_LTLIBRARIES += cluster.la cluster_la_SOURCES = \ $(CMAN_SOURCES) \ qpid/cluster/Cluster.cpp \ qpid/cluster/Cluster.h \ qpid/cluster/ClusterTimer.cpp \ qpid/cluster/ClusterTimer.h \ qpid/cluster/Decoder.cpp \ qpid/cluster/Decoder.h \ qpid/cluster/PollableQueue.h \ qpid/cluster/ClusterMap.cpp \ qpid/cluster/ClusterMap.h \ qpid/cluster/ClusterPlugin.cpp \ qpid/cluster/ClusterSettings.h \ qpid/cluster/Connection.cpp \ qpid/cluster/Connection.h \ qpid/cluster/ConnectionCodec.cpp \ qpid/cluster/ConnectionCodec.h \ qpid/cluster/Cpg.cpp \ qpid/cluster/Cpg.h \ qpid/cluster/CredentialsExchange.cpp \ qpid/cluster/CredentialsExchange.h \ qpid/cluster/Dispatchable.h \ qpid/cluster/UpdateClient.cpp \ qpid/cluster/UpdateClient.h \ qpid/cluster/RetractClient.cpp \ qpid/cluster/RetractClient.h \ qpid/cluster/ErrorCheck.cpp \ qpid/cluster/ErrorCheck.h \ qpid/cluster/Event.cpp \ qpid/cluster/Event.h \ qpid/cluster/EventFrame.h \ qpid/cluster/EventFrame.cpp \ qpid/cluster/ExpiryPolicy.h \ qpid/cluster/ExpiryPolicy.cpp \ qpid/cluster/FailoverExchange.cpp \ qpid/cluster/FailoverExchange.h \ qpid/cluster/UpdateExchange.h \ qpid/cluster/UpdateExchange.cpp \ qpid/cluster/UpdateReceiver.h \ qpid/cluster/LockedConnectionMap.h \ qpid/cluster/Multicaster.cpp \ qpid/cluster/Multicaster.h \ qpid/cluster/McastFrameHandler.h \ qpid/cluster/NoOpConnectionOutputHandler.h \ qpid/cluster/Numbering.h \ qpid/cluster/OutputInterceptor.cpp \ qpid/cluster/OutputInterceptor.h \ qpid/cluster/PollerDispatch.cpp \ qpid/cluster/PollerDispatch.h \ qpid/cluster/ProxyInputHandler.h \ qpid/cluster/Quorum.h \ qpid/cluster/InitialStatusMap.h \ qpid/cluster/InitialStatusMap.cpp \ qpid/cluster/MemberSet.h \ qpid/cluster/MemberSet.cpp \ qpid/cluster/types.h \ qpid/cluster/SecureConnectionFactory.h \ qpid/cluster/SecureConnectionFactory.cpp \ qpid/cluster/StoreStatus.h \ qpid/cluster/StoreStatus.cpp \ qpid/cluster/UpdateDataExchange.h \ qpid/cluster/UpdateDataExchange.cpp cluster_la_LIBADD= -lcpg $(libcman) libqpidbroker.la libqpidclient.la cluster_la_CXXFLAGS = $(AM_CXXFLAGS) -fno-strict-aliasing cluster_la_LDFLAGS = $(PLUGINLDFLAGS) # The watchdog plugin and helper executable dmoduleexec_LTLIBRARIES += watchdog.la watchdog_la_SOURCES = qpid/cluster/WatchDogPlugin.cpp watchdog_la_LIBADD = libqpidbroker.la watchdog_la_LDFLAGS = $(PLUGINLDFLAGS) qpidexec_PROGRAMS += qpidd_watchdog qpidd_watchdog_SOURCES = qpid/cluster/qpidd_watchdog.cpp endif # HAVE_LIBCPG qpidc-0.16/src/ssl.mk0000664000076400007640000000362211540750270015061 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Makefile fragment, conditionally included in Makefile.am # libsslcommon_la_SOURCES = \ qpid/sys/ssl/check.h \ qpid/sys/ssl/check.cpp \ qpid/sys/ssl/util.h \ qpid/sys/ssl/util.cpp \ qpid/sys/ssl/SslSocket.h \ qpid/sys/ssl/SslSocket.cpp \ qpid/sys/ssl/SslIo.h \ qpid/sys/ssl/SslIo.cpp SSLCOMMON_VERSION_INFO = 2:0:0 libsslcommon_la_LDFLAGS = -version-info $(SSLCOMMON_VERSION_INFO) libsslcommon_la_LIBADD= -lnss3 -lssl3 -lnspr4 libqpidcommon.la libsslcommon_la_CXXFLAGS=$(AM_CXXFLAGS) $(SSL_CFLAGS) lib_LTLIBRARIES += libsslcommon.la ssl_la_SOURCES = \ qpid/sys/SslPlugin.cpp \ qpid/sys/ssl/SslHandler.h \ qpid/sys/ssl/SslHandler.cpp ssl_la_LIBADD= libqpidbroker.la libsslcommon.la ssl_la_CXXFLAGS=$(AM_CXXFLAGS) $(SSL_CFLAGS) ssl_la_LDFLAGS = $(PLUGINLDFLAGS) dmoduleexec_LTLIBRARIES += ssl.la sslconnector_la_SOURCES = \ qpid/client/SslConnector.cpp sslconnector_la_LIBADD = \ libqpidclient.la \ libsslcommon.la sslconnector_la_CXXFLAGS = $(AM_CXXFLAGS) -DQPIDC_CONF_FILE=\"$(confdir)/qpidc.conf\" $(SSL_CFLAGS) sslconnector_la_LDFLAGS = $(PLUGINLDFLAGS) cmoduleexec_LTLIBRARIES += \ sslconnector.la qpidc-0.16/src/qpid.pc.in0000664000076400007640000000035511656771321015625 0ustar00jrossjross00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: qpid Version: @VERSION@ Description: Qpid C++ client library Requires: Libs: -L${libdir} -lqpidmessaging -lqpidtypes @LIBS@ Cflags: -I${includedir} qpidc-0.16/src/posix/0000775000076400007640000000000011752725716015102 5ustar00jrossjross00000000000000qpidc-0.16/src/posix/QpiddBroker.cpp0000664000076400007640000001541011650340075020001 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "config.h" #include "qpidd.h" #include "qpid/Exception.h" #include "qpid/broker/Broker.h" #include "qpid/broker/Daemon.h" #include "qpid/broker/SignalHandler.h" #include "qpid/log/Logger.h" #include #include #include #include using namespace std; using namespace qpid; using qpid::broker::Broker; using qpid::broker::Daemon; BootstrapOptions::BootstrapOptions(const char* argv0) : qpid::Options("Options"), common("", QPIDD_CONF_FILE), module(QPIDD_MODULE_DIR), log(argv0) { add(common); add(module); add(log); } namespace { const std::string TCP = "tcp"; } struct DaemonOptions : public qpid::Options { bool daemon; bool quit; bool check; int wait; std::string piddir; std::string transport; DaemonOptions() : qpid::Options("Daemon options"), daemon(false), quit(false), check(false), wait(600), transport(TCP) { char *home = ::getenv("HOME"); if (home == 0) piddir += "/tmp"; else piddir += home; piddir += "/.qpidd"; addOptions() ("daemon,d", optValue(daemon), "Run as a daemon. Logs to syslog by default in this mode.") ("transport", optValue(transport, "TRANSPORT"), "The transport for which to return the port") ("pid-dir", optValue(piddir, "DIR"), "Directory where port-specific PID file is stored") ("wait,w", optValue(wait, "SECONDS"), "Sets the maximum wait time to initialize the daemon. If the daemon fails to initialize, prints an error and returns 1") ("check,c", optValue(check), "Prints the daemon's process ID to stdout and returns 0 if the daemon is running, otherwise returns 1") ("quit,q", optValue(quit), "Tells the daemon to shut down"); } }; struct QpiddPosixOptions : public QpiddOptionsPrivate { DaemonOptions daemon; QpiddOptions *parent; QpiddPosixOptions(QpiddOptions *parent_) : parent(parent_) { parent->add(daemon); } }; QpiddOptions::QpiddOptions(const char* argv0) : qpid::Options("Options"), common("", QPIDD_CONF_FILE), module(QPIDD_MODULE_DIR), log(argv0) { add(common); add(module); add(broker); add(log); platform.reset(new QpiddPosixOptions(this)); qpid::Plugin::addOptions(*this); } void QpiddOptions::usage() const { cout << "Usage: qpidd [OPTIONS]" << endl << endl << *this << endl; } // Set the broker pointer on the signal handler, then reset at end of scope. // This is to ensure that the signal handler doesn't keep a broker // reference after main() has returned. // struct ScopedSetBroker { ScopedSetBroker(const boost::intrusive_ptr& broker) { qpid::broker::SignalHandler::setBroker(broker.get()); } ~ScopedSetBroker() { qpid::broker::SignalHandler::setBroker(0); } }; struct QpiddDaemon : public Daemon { QpiddPosixOptions *options; QpiddDaemon(std::string pidDir, QpiddPosixOptions *opts) : Daemon(pidDir), options(opts) {} /** Code for parent process */ void parent() { uint16_t port = wait(options->daemon.wait); if (options->parent->broker.port == 0 || options->daemon.transport != TCP) cout << port << endl; } /** Code for forked child process */ void child() { boost::intrusive_ptr brokerPtr(new Broker(options->parent->broker)); ScopedSetBroker ssb(brokerPtr); brokerPtr->accept(); uint16_t port=brokerPtr->getPort(options->daemon.transport); ready(port); // Notify parent. if (options->parent->broker.enableMgmt && (options->parent->broker.port == 0 || options->daemon.transport != TCP)) { dynamic_cast(brokerPtr->GetManagementObject())->set_port(port); } brokerPtr->run(); } }; int QpiddBroker::execute (QpiddOptions *options) { // Options that affect a running daemon. QpiddPosixOptions *myOptions = static_cast(options->platform.get()); if (myOptions == 0) throw Exception("Internal error obtaining platform options"); if (myOptions->daemon.check || myOptions->daemon.quit) { pid_t pid = Daemon::getPid(myOptions->daemon.piddir, options->broker.port); if (pid < 0) return 1; if (myOptions->daemon.check) cout << pid << endl; if (myOptions->daemon.quit) { if (kill(pid, SIGINT) < 0) throw Exception("Failed to stop daemon: " + qpid::sys::strError(errno)); // Wait for the process to die before returning int retry=10000; // Try up to 10 seconds while (kill(pid,0) == 0 && --retry) sys::usleep(1000); if (retry == 0) throw Exception("Gave up waiting for daemon process to exit"); } return 0; } // Starting the broker. if (myOptions->daemon.daemon) { // For daemon mode replace default stderr with syslog. options->log.sinkOptions->detached(); qpid::log::Logger::instance().configure(options->log); // Fork the daemon QpiddDaemon d(myOptions->daemon.piddir, myOptions); d.fork(); // Broker is stared in QpiddDaemon::child() } else { // Non-daemon broker. boost::intrusive_ptr brokerPtr(new Broker(options->broker)); ScopedSetBroker ssb(brokerPtr); brokerPtr->accept(); if (options->broker.port == 0 || myOptions->daemon.transport != TCP) { uint16_t port = brokerPtr->getPort(myOptions->daemon.transport); cout << port << endl; if (options->broker.enableMgmt) { dynamic_cast(brokerPtr->GetManagementObject())->set_port(port); } } brokerPtr->run(); } return 0; } int main(int argc, char* argv[]) { return run_broker(argc, argv); } qpidc-0.16/src/qpidd.cpp0000664000076400007640000000616111650340075015535 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "./qpidd.h" #include "qpid/Plugin.h" #include "qpid/Version.h" #include "qpid/log/Logger.h" #include "qpid/log/Statement.h" #include #include using namespace std; auto_ptr options; // Broker real entry; various system-invoked entrypoints call here. int run_broker(int argc, char *argv[], bool hidden) { try { BootstrapOptions bootOptions(argv[0]); string defaultPath (bootOptions.module.loadDir); // Parse only the common, load, and log options to see which // modules need to be loaded. Once the modules are loaded, // the command line will be re-parsed with all of the // module-supplied options. try { bootOptions.parse (argc, argv, bootOptions.common.config, true); if (hidden) bootOptions.log.sinkOptions->detached(); qpid::log::Logger::instance().configure(bootOptions.log); } catch (const std::exception& e) { // Couldn't configure logging so write the message direct to stderr. cerr << "Unexpected error: " << e.what() << endl; return 1; } for (vector::iterator iter = bootOptions.module.load.begin(); iter != bootOptions.module.load.end(); iter++) qpid::tryShlib (iter->data(), false); if (!bootOptions.module.noLoad) { bool isDefault = defaultPath == bootOptions.module.loadDir; qpid::loadModuleDir (bootOptions.module.loadDir, isDefault); } // Parse options options.reset(new QpiddOptions(argv[0])); options->parse(argc, argv, options->common.config); // Options that just print information. if (options->common.help || options->common.version) { if (options->common.version) cout << "qpidd (" << qpid::product << ") version " << qpid::version << endl; else if (options->common.help) options->usage(); return 0; } // Everything else is driven by the platform-specific broker // logic. QpiddBroker broker; return broker.execute(options.get()); } catch(const exception& e) { QPID_LOG(critical, "Unexpected error: " << e.what()); } return 1; } qpidc-0.16/src/replication.mk0000664000076400007640000000404611540750270016572 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # Make file for building two plugins for asynchronously replicating # queues. dmoduleexec_LTLIBRARIES += replicating_listener.la replication_exchange.la # a queue event listener plugin that creates messages on a replication # queue corresponding to enqueue and dequeue events: replicating_listener_la_SOURCES = \ qpid/replication/constants.h \ qpid/replication/ReplicatingEventListener.cpp \ qpid/replication/ReplicatingEventListener.h replicating_listener_la_LIBADD = libqpidbroker.la if SUNOS replicating_listener_la_LIBADD += libqpidcommon.la -lboost_program_options -luuid $(SUNCC_RUNTIME_LIBS) endif replicating_listener_la_LDFLAGS = $(PLUGINLDFLAGS) # a custom exchange plugin that allows an exchange to be created that # can process the messages from a replication queue (populated on the # source system by the replicating listener plugin above) and take the # corresponding action on the local queues replication_exchange_la_SOURCES = \ qpid/replication/constants.h \ qpid/replication/ReplicationExchange.cpp \ qpid/replication/ReplicationExchange.h replication_exchange_la_LIBADD = libqpidbroker.la if SUNOS replication_exchange_la_LIBADD += libqpidcommon.la -lboost_program_options $(SUNCC_RUNTIME_LIBS) -luuid endif replication_exchange_la_LDFLAGS = $(PLUGINLDFLAGS) qpidc-0.16/Makefile.am0000664000076400007640000000257011611360622015172 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # LIBTOOL_DEPS = @LIBTOOL_DEPS@ AUTOMAKE_OPTIONS = 1.9.2 foreign ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = \ LICENSE NOTICE README.txt SSL RELEASE_NOTES DESIGN \ xml/cluster.xml INSTALL-WINDOWS CMakeLists.txt BuildInstallSettings.cmake \ packaging/NSIS QPID_VERSION.txt bindings/swig_python_typemaps.i \ bindings/swig_ruby_typemaps.i bindings/swig_perl_typemaps.i SUBDIRS = managementgen etc src docs/api docs/man examples bindings/qmf bindings/qpid bindings/qmf2 # Update libtool, if needed. libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck check-long: all $(MAKE) -C src/tests check-long qpidc-0.16/SSL0000664000076400007640000001235011453466111013523 0ustar00jrossjross00000000000000 Using SSL ========= The implementation and use of SSL has some differences on Linux and on Windows. Linux ===== SSL support for Qpid-C++, based on Mozilla's Network Security Services library, is provided as two loadable modules: one for the client (sslconnector.so), one for the broker (ssl.so). Either these libraries should be present in the relevant module directory or the 'load-module' option (or QPID_LOAD_MODULE environment variable) is used to ensure they are loaded. Broker side SSL Settings (note you can get these by qpidd --help providing the ssl.so module is loaded): SSL Settings: --ssl-use-export-policy Use NSS export policy --ssl-cert-password-file PATH File containing password to use for accessing certificate database --ssl-cert-db PATH Path to directory containing certificate database --ssl-cert-name NAME (hostname) Name of the certificate to use --ssl-port PORT (5671) Port on which to listen for SSL connections --ssl-require-client-authentication Forces clients to authenticate in order to establish an SSL connection --ssl-sasl-no-dict Disables SASL mechanisms that are vulner able to passive dictionary-based password attacks The first four of these are also available as client options (where they must either be in the client config file or set as environment variables e.g. QPID_SSL_CERT_DB). To run either the broker or client you need ssl-cert-db-path to point to the directory where relevant certificate and key databases can be found. Certificate databases are set up using certutil (included in the nss-tools package on fedora). See the NSS site for examples[1] and full details[2]. For a simple testing you can set up a single db with a single self signed certificate. E.g (with myhost and mydomain replaced by the hostname and domainname of the machine in question respectively): mkdir test_cert_db certutil -N -d test_cert_db -f cert.password certutil -S -d test_cert_db -n "myhost.mydomain" \ -s "CN=myhost.mydomain" -t "CT,," -x \ -f cert.password -z /usr/bin/certutil Here cert.password is a file with a password in it that will be needed for accessing the created db. The daemon can then be started with something like the following: ./src/qpidd --auth no --load-module src/.libs/ssl.so \ --ssl-cert-db ./test_cert_db \ --ssl-cert-password-file ./cert.password \ --ssl-cert-name myhost.mydomain then for client set: QPID_LOAD_MODULE=./src/.libs/sslconnector.so QPID_SSL_CERT_DB=./test_cert_db and run e.g. ./src/tests/perftest --count 10000 -P ssl --port 5671 \ --broker myhost.mydomain When authentication is enabled, the EXTERNAL mechanism will be available on client authenticated SSL connections. This allows the clients authorisation id to be taken from the validated client certificate (it will be the CN with any DCs present appended as the domain, e.g. CN=bob,DC=acme,DC=com would result in an identity of bob@acme.com). [1] http://www.mozilla.org/projects/security/pki/nss/ref/ssl/gtstd.html [2] http://www.mozilla.org/projects/security/pki/nss/tools/certutil.html Windows ======= SSL support for Qpid-C++ on Windows is implemented using the Microsoft Secure Channel (Schannel) package. Currently, only registry based certificates scoped to the local machine are supported, however Schannel also supports file based and user scoped certificates, so additional support could be added as required. Client certificate authentication is not supported at this time. For testing purposes, a self signed certificate can be created as follows (requiring Administrator privilege on more recent versions of Windows): makecert -ss qpidstore -n "CN=myhost.mydomain" -r -sr localmachine myhost.cer where "qpidstore" is an abitrary certificate store name. The resulting output file "myhost.cer" is the public key of the certificate that will be required by any client that wishes to authenticate myhost. To run the server (also as Administrator on recent Windows versions): qpidd --ssl-cert-name myhost.mydomain --ssl-cert-store qpidstore [other-args] On the Windows client side, the SSL support is available without loading a separate support module. For each machine or separate user that will be using qpid, you must import the self signed certificate as a trusted root. This can be done from the MMC certificate snapin or directly using certmgr.exe. From the main window: select "Third-Party Root Certification Authorities" select "Action" -> "Import..." then direct the Certificate Import Wizard to the "myhost.cer" file To test the setup: perftest --count 10000 -P ssl --port 5671 --broker myhost.mydomain To export the certificate to non Windows clients, note that "myhost.cer" is the X.509 representation of the public key of the certificate in DER format. Import the certificate into the other clients if they support the DER format. Otherwise the certificate can be converted to PEM format using OpenSSL openssl x509 -in myhost.cer -inform DER -out myhost.pem -outform PEM qpidc-0.16/INSTALL0000664000076400007640000003056311625772557014215 0ustar00jrossjross00000000000000 Installing Qpid/C++ =================== Table of Contents ================= 1. Introduction 2. Prerequisites 2.1. What to Install 2.2. How to Install 2.2.1. Using Package Management Tools 2.2.2. From Source a. openais b. boost c. autotools 2.3. Important Environment Variable Settings 3. Building from a Source Distribution 4. Building a Repository Working Copy 5. Portability 6. Tests 7. Doxygen 8. Troubleshooting 1. Introduction =============== Note that the daemon and client API can be installed separately. This document describes how to build the Qpid/C++ broker and client, either from a checkout of the source or from a source distribution, on Linux/UNIX. Please see INSTALL-WINDOWS for information on building on Windows. This also explains how to install the required prerequisites for Qpid/C++. 2. Prerequisites ================ We prefer to avoid spending time accommodating older versions of these packages, so please make sure that you have the latest stable versions. Known version numbers for a succesfull build are given in brackets, take these as a recommended minimum version. Older unix versions, for example, Redhat Linux 3, will almost certainly require some packages to be upgraded. 2.1. What to Install ==================== The following libraries and header files must be installed to build a source distribution: * boost (1.35)(*) * libuuid (2.19) * pkgconfig (0.21) (*) earlier versions of boost e.g. 1.33 also work and there is a patch to get 1.32 working in the svn tree though that is only recommended as a last resort. Optional cluster functionality requires ONE of: * openais (0.80.3) * corosync (1.0.0.rc1) Optional XML exchange requires: * xqilla (2.0.0) * xerces-c (2.7.0) Optional SSL support requires: * nss * nspr Optional binding support for ruby requires: * ruby and ruby devel * swig Qpid has been built using the GNU C++ compiler: * gcc (3.4.6) If you want to build directly from the SVN repository you will need all of the above plus: * GNU make (3.8.0) * autoconf (2.61) * automake (1.9.6) * help2man (1.36.4) * libtool (1.5.22) * doxygen (1.5.1) * graphviz (2.12) * ruby 1.8 (1.8.4) NOTE: make sure to install the related '-devel' packages also! To build the QMF (Qpid Management Framework) bindings for Ruby and Python, the following must also be installed: * ruby-devel * python-devel * swig (1.3.35) UUID problems: In some earlier Linux releases (such as Fedora 11), the uuid/uuid.h file is located in the e2fsprogs-devel package instead of libuuid-devel. If you are using an older Linux release and run into a problem during configure in which uuid.h cannot be found, install the e2fsprogs-devel package. 2.2. How to Install =================== 2.2.1. Using Package Management Tools ===================================== On linux most packages can be installed using your distribution's package management tool. For example on Fedora: # yum install boost-devel libuuid-devel pkgconfig gcc-c++ make autoconf automake ruby libtool help2man doxygen graphviz The optional clustering packages changed name in Fedora 10. On Fedora 9 or earlier: # yum install openais-devel cman-devel On Fedora 10 or later # yum install corosync-devel cmanlib-devel On Fedora 12 they changed again: # yum install corosynclib-devel clusterlib-devel For SASL and SSL, include # yum install cyrus-sasl-devel nss-devel nspr-devel For the XML Exchange, include: # yum install xqilla-devel xerces-c-devel Optional ruby binding support include: # yum install ruby ruby-devel swig Follow the manual installation instruction below for any packages not available through your distributions packaging tool. 2.2.2. From Source ================== Required dependencies can be installed and built from source distributions. It is recommended that you create a directory to install them to, for example, ~/qpid-tools. To build and install the dependency pakcages: 1. Unzip and untar them and cd to the untared directory. 2. do: # ./configure --prefix=~/qpid-tools # make install The exceptions are openais and boost. a. openais ========== If ais is shipped with you platform and you have 0.80.3-x or later, skip builing ais To build ais: Unpack the source distribution and do: # make # sudo make install DESTDIR= # sudo ldconfig This will install in the standard places (/usr/lib, /usr/include etc.) Configuring ais: Edit /etc/ais/openais.conf and modify the "bindnetaddr" setting to your hosts IP address. Do not use 127.0.0.1. Make sure the UDP port set for mcastport in openais.conf (5405 by default) is not blocked by your firewall. Disable the firewall or configure it to allow this port for UDP. Finally start the ais daemon (must be done as root): # sudo /sbin/aisexec Note that to run the AIS tests your primary group must be "ais". You can change your primary group with the usermod command or set it temporarily with the newgrp command. Troubleshooting tips: If aisexec goes into a loop printing "entering GATHER state", verify your firewall is allowing UDP traffic on the mcastport set in openais.conf. If aisexec reports "got nodejoin message 127.0.0.1" verify the bindnetaddr in openais.conf is an active local IP address. ifconfig will list local addresses. When aisexec is working correctly, the start-up log messages will end with "entering OPERATIONAL state." and "got nodejoin message " where is the local IP address specified for bindnetaddr in openais.conf. For further info on openais http://openais.org/ b. boost ======== 1. Unpack boost-jam. 2. Add bjam in the unpacked directory to your path. 3. Unpack boost and cd to the boost untarred directory. 4. do: # bjam toolset=gcc variant=release threading=single link=shared \ --layout=system --prefix=~/qpid-tools install c. autotools ============ If you don't have sufficiently up-to-date autotools you can get the latest by running the script qpid-autotools-install. 1. Decide where you would like to install the tools. It should be in a local directory so that you do not need root privileges. (Suggest $HOME/qpid-tools.) Create an empty directory. 2. Modify your environment variable PATH to ensure that the bin directory within this directory comes first in the PATH string: PATH=$HOME/qpid-tools/bin:$PATH 3. Set PKG_CONFIG_PATH=$HOME/qpid-tools/lib/pkgconfig:/usr/lib/pkgconfig (or if it already exists, make sure that the above path to your qpid-tools directory is first). 4. Run the install utility from the cpp directory: ./qpid-autotools-install --prefix=$HOME/qpid-tools --skip-check (Note that --prefix will only accept an absolute path, so don't use ~/qpid-tools.) The utility will download, compile and install the required tools into the qpid-tools directory (this may take a little time). Watch for any notices about paths at the end of the install - this means that your environment is not correct - see steps 2 and 3 above. NOTE: If you omit the --skip-check option, the check of the build can add up to an hour to what is normally a few minutes of install time. 5. Perform a check: from the command-line run "which automake" and ensure that it finds the automake in your qpid-tools directory. If not, check that the build completed normally and your environment. 6. (Optional) If having the build artifacts lying around bothers you, delete the (hidden) build directory cpp/.build-auto-tools. To see help, run ./qpid-autotools-install --help. 2.3. Important Environment Variable Settings ============================================ Ensure that all the build tools are available on your path, when they are manually installed to non-standard locations. For example: # export PATH=~/qpid-tools/bin:$PATH Ensure that pkg-config is set up correctly. For example: # export PKG_CONFIG_PATH=~/qpid-tools/lib/pkgconfig:/usr/local/pkgconfig # export PKG_CONFIG=~/qpid-tools/bin/pkg-config Ensure that the boost libraries are made available on the gcc library path. For example: # export CXXFLAGS=-I~/qpid-tools/include/boost-1_33_1 3. Building from a Source Distribution ====================================== In the distribution directory Build and install with: # ./configure --prefix= # make all # make install To build and test everything: # make # make check This builds in the source tree. You can have multiple builds in the same working copy with different configuration. For example you can do the following to build twice, once for debug, the other with optimization: # make distclean # mkdir .build-dbg .build-opt # (cd .build-opt ../configure --prefix=/tmp/x && make && make check) # (cd .build-dbg ../configure CXXFLAGS=-g --prefix=/tmp/x \ && make && make check) 4. Building a Repository Working Copy ===================================== To get the source code from the subversion repository (trunk) do: # svn checkout http://svn.apache.org/repos/asf/qpid/trunk/qpid/. To build a fresh checkout: Cd to qpid/cpp subdirectory. Before running make on a fresh checkout do: # ./bootstrap This generates config, makefiles and the like - check the script for details. You only need to do this once, "make" will keep everything up to date thereafter (including re-generating configuration & Makefiles if the automake templates change etc.) If you are developing code yourself, or if you want to help us keep the code as tight and robust as possible, consider enabling the use of valgrind. If you configure like this: # ./configure --enable-valgrind That will arrange (assuming you have valgrind installed) for "make check" to run tests via valgrind. That makes the tests run more slowly, but helps detect certain types of bugs, as well as memory leaks. If you run "make check" and valgrind detects a leak that is not listed as being "ignorable-for-now", the test script in question will fail. However, recording whether a leak is ignorable is not easy, when the stack signature, libraries, compiler, O/S, architecture, etc., may all vary, so if you see a new leak, try to figure out if it's one you can fix before adding it to the list. Now follow instruction for building from a source distribution in step (3). 5. Portability ============== All system calls are abstracted by classes under lib/common/sys. This provides an object-oriented C++ API and contains platform-specific code. These wrappers are mainly inline by-value classes so they impose no run-time penalty compared do direct system calls. Initially we will have a full linux implementation and a portable implementation sufficient for the client using the APR portability library. The implementations may change in future but the interface for qpid code outside the qpid/sys namespace should remain stable. 6. Tests ======== See src/tests/README.txt for details. 7. Doxygen ========== Doxygen generates documentation in several formats from source code using special comments. You can use javadoc style comments if you know javadoc, if you don't or want to know the fully story on doxygen markup see http://www.stack.nl/~dimitri/doxygen/ Even even if the code is completely uncommented, doxygen generates UML-esque dependency diagrams that are ''extremely'' useful in navigating around the code, especially for newcomers. To try it out "make doxygen" then open doxygen/html/index.html. 8. Troubleshooting ================== When building, get the following on configure configure: error: Package requirements (apr-1 >= 1.2.2) were not met: No package 'apr-1' found The following has not been set export PKG_CONFIG_PATH=$HOME/qpid-tools/lib/pkgconfig:/usr/lib/pkgconfig qpidc-0.16/examples/0000775000076400007640000000000011752725720014762 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/0000775000076400007640000000000011752725720016371 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/Makefile.in0000664000076400007640000005307511752725662020455 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_XML_TRUE@am__append_1 = xml-exchange subdir = examples/old_api DIST_COMMON = $(dist_examples_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(dist_examples_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = direct pub-sub fanout request-response failover \ tradedemo xml-exchange DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ # For older versions of automake abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # SUBDIRS = direct pub-sub fanout request-response failover tradedemo \ $(am__append_1) @HAVE_XML_FALSE@broker_args = "--no-module-dir --data-dir \"\" --auth no" @HAVE_XML_TRUE@broker_args = "--no-module-dir --data-dir \"\" --auth no --load-module $(top_builddir)/src/.libs/xml.so" @HAVE_XML_FALSE@exclude_examples_regexp = "xml" # Exclude XML examples. MAKEDIST = .libs/Makefile examplesdir = $(pkgdatadir)/examples/old_api dist_examples_DATA = $(MAKEDIST) EXTRA_DIST = README.verify verify verify_all CMakeLists.txt 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/old_api/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/old_api/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_examplesDATA: $(dist_examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-dist_examplesDATA: @$(NORMAL_UNINSTALL) @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files # 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): @fail= 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; \ ($(am__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" $(RECURSIVE_CLEAN_TARGETS): @fail= 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-local check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dist_examplesDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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-dist_examplesDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) check-am \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am check-local clean clean-generic \ clean-libtool ctags ctags-recursive 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-dist_examplesDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-dist_examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo 'all clean:' ; \ echo ' for d in $(SUBDIRS) ; do $$(MAKE) -C $$$$d $$@ ; done' ; \ ) > $(MAKEDIST) # Verify the examples in the buid tree. check-local: $(srcdir)/verify_all $(abs_top_srcdir)/.. $(abs_top_builddir) $(broker_args) $(exclude_examples_regexp) # 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: qpidc-0.16/examples/old_api/Makefile.am0000664000076400007640000000327311545117300020417 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # SUBDIRS = direct pub-sub fanout request-response failover tradedemo if HAVE_XML SUBDIRS += xml-exchange broker_args = "--no-module-dir --data-dir \"\" --auth no --load-module $(top_builddir)/src/.libs/xml.so" endif if !HAVE_XML exclude_examples_regexp="xml" # Exclude XML examples. broker_args = "--no-module-dir --data-dir \"\" --auth no" endif MAKEDIST=.libs/Makefile $(MAKEDIST): Makefile mkdir -p .libs @(echo 'all clean:' ; \ echo ' for d in $(SUBDIRS) ; do $$(MAKE) -C $$$$d $$@ ; done' ; \ ) > $(MAKEDIST) examplesdir=$(pkgdatadir)/examples/old_api dist_examples_DATA = $(MAKEDIST) EXTRA_DIST = README.verify verify verify_all CMakeLists.txt # For older versions of automake abs_top_srcdir = @abs_top_srcdir@ abs_top_builddir = @abs_top_builddir@ # Verify the examples in the buid tree. check-local: $(srcdir)/verify_all $(abs_top_srcdir)/.. $(abs_top_builddir) $(broker_args) $(exclude_examples_regexp) qpidc-0.16/examples/old_api/verify0000775000076400007640000000655711654250562017636 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # export LC_ALL=C # Driver script to verify installed examples (also used for build tests.) # # Usage: verify example_dir [ example_dir ...] # Where each example_dir must contain a verify sub-script to include. # # If $QPIDD is set, run a private QPIDD and use it. # If $QPID_HOST or $QPID_PORT are set, use them to connect. # QPID_NO_MODULE_DIR=1 QPID_DATA_DIR= # Use temporary directory if $HOME does not exist if [ ! -e "$HOME" ]; then QPID_DATA_DIR=/tmp/qpid QPID_PID_DIR=/tmp/qpid fi export QPID_DATA_DIR QPID_NO_MODULE_DIR QPID_PID_DIR cleanup() { test -n "$QPIDD" && $QPIDD -q # Private broker kill %% > /dev/null 2>&1 # Leftover background jobs } trap cleanup EXIT ARGS="${QPID_HOST:-localhost} $QPID_PORT" outfile() { file=$1 while [ -f $file.out ]; do file="${file}X"; done echo $file.out } fail() { test -n "$*" && echo $* 1>&2 ; FAIL=1; return 1; } client() { "$@" $ARGS > `outfile $*` || fail; } clients() { for cmd in "$@"; do client $cmd; done; } waitfor() { until grep -a -l "$2" $1 >/dev/null 2>&1 ; do sleep 1 ; done ; } background() { pattern=$1; shift out=`outfile $*` eval "$* $ARGS > $out &" || { fail; return 1; } waitfor $out "$pattern" } name() { for x in $*; do name="$name `basename $x`"; done echo $name; } outputs() { wait 2> /dev/null # Wait for all backgroud processes to complete rm -f $script.out for f in "$@"; do { echo "==== `name $f`"; eval "cat $f"; } >> $script.out || fail done } normalize() { echo `cd $1 && pwd`; } verify() { FAIL= arg=$1 srcdir=$(normalize $2) builddir=$(normalize $3) if [ -d $arg ]; then dir=$(normalize $arg); script=verify; else dir=$(normalize `dirname $arg`); script=`basename $arg`; fi # if the example is in the "cpp" area, make sure we run from the build directory, not the source dir. rundir=${dir/$srcdir\/cpp/$builddir/} cd $rundir || return 1 rm -f *.out { source $dir/$script && diff -ac $script.out $dir/$script.in ; } || fail test -z "$FAIL" && rm -f *.out return $FAIL } HEX="[a-fA-F0-9]" remove_uuid() { sed "s/$HEX\{8\}-$HEX\{4\}-$HEX\{4\}-$HEX\{4\}-$HEX\{12\}//g" $* } remove_uuid64() { sed 's/[-A-Za-z0-9_]\{22\}==//g' $* } # Start private broker if QPIDD is set. if [ -n "$QPIDD" ] ; then export QPID_PORT=`$QPIDD -dp0` || { echo "Cannot start $QPIDD" ; exit 1; } trap "$QPIDD -q" EXIT fi topsrcdir=$1 topbuilddir=$2 shift 2 for example in "$@"; do echo "== $example" if ( verify $example $topsrcdir $topbuilddir; ) then echo "PASS"; else echo "FAIL"; RET=1; fi done exit $RET qpidc-0.16/examples/old_api/failover/0000775000076400007640000000000011752725721020201 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/failover/Makefile.in0000664000076400007640000005305711752725662022264 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS = declare_queues$(EXEEXT) resuming_receiver$(EXEEXT) \ replaying_sender$(EXEEXT) subdir = examples/old_api/failover ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_declare_queues_OBJECTS = declare_queues.$(OBJEXT) declare_queues_OBJECTS = $(am_declare_queues_OBJECTS) declare_queues_DEPENDENCIES = $(CLIENT_LIB) am_replaying_sender_OBJECTS = replaying_sender.$(OBJEXT) replaying_sender_OBJECTS = $(am_replaying_sender_OBJECTS) replaying_sender_DEPENDENCIES = $(CLIENT_LIB) am_resuming_receiver_OBJECTS = resuming_receiver.$(OBJEXT) resuming_receiver_OBJECTS = $(am_resuming_receiver_OBJECTS) resuming_receiver_DEPENDENCIES = $(CLIENT_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(declare_queues_SOURCES) $(replaying_sender_SOURCES) \ $(resuming_receiver_SOURCES) DIST_SOURCES = $(declare_queues_SOURCES) $(replaying_sender_SOURCES) \ $(resuming_receiver_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir = $(pkgdatadir)/examples/old_api/failover MAKELDFLAGS = $(CLIENTFLAGS) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB = $(top_builddir)/src/libqpidclient.la CONSOLE_LIB = $(top_builddir)/src/libqmfconsole.la CLIENTFLAGS = -lqpidclient CONSOLEFLAGS = -lqmfconsole # Generate a simple non-automake Makefile for distribution. MAKEDIST = .libs/Makefile declare_queues_SOURCES = declare_queues.cpp declare_queues_LDADD = $(CLIENT_LIB) resuming_receiver_SOURCES = resuming_receiver.cpp resuming_receiver_LDADD = $(CLIENT_LIB) replaying_sender_SOURCES = replaying_sender.cpp replaying_sender_LDADD = $(CLIENT_LIB) examples_DATA = \ declare_queues.cpp \ resuming_receiver.cpp \ replaying_sender.cpp \ $(MAKEDIST) # FIXME aconway 2008-10-10: add verify scripts. EXTRA_DIST = \ CMakeLists.txt \ failover_declare_queues.vcproj \ failover_replaying_sender.vcproj \ failover_resuming_receiver.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/examples/makedist.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/old_api/failover/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/old_api/failover/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list declare_queues$(EXEEXT): $(declare_queues_OBJECTS) $(declare_queues_DEPENDENCIES) @rm -f declare_queues$(EXEEXT) $(CXXLINK) $(declare_queues_OBJECTS) $(declare_queues_LDADD) $(LIBS) replaying_sender$(EXEEXT): $(replaying_sender_OBJECTS) $(replaying_sender_DEPENDENCIES) @rm -f replaying_sender$(EXEEXT) $(CXXLINK) $(replaying_sender_OBJECTS) $(replaying_sender_LDADD) $(LIBS) resuming_receiver$(EXEEXT): $(resuming_receiver_OBJECTS) $(resuming_receiver_DEPENDENCIES) @rm -f resuming_receiver$(EXEEXT) $(CXXLINK) $(resuming_receiver_OBJECTS) $(resuming_receiver_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/declare_queues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replaying_sender.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resuming_receiver.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo CXX=$(CXX) ; \ echo CXXFLAGS=$(CXXFLAGS) ; \ echo LDFLAGS=$(MAKELDFLAGS) ; \ echo ; \ echo all: $(noinst_PROGRAMS) ; \ echo ; \ echo clean: ; \ echo " rm -f $(noinst_PROGRAMS)" ; \ ) > $(MAKEDIST) # 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: qpidc-0.16/examples/old_api/failover/Makefile.am0000664000076400007640000000303211536454602022230 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir=$(pkgdatadir)/examples/old_api/failover MAKELDFLAGS=$(CLIENTFLAGS) include $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS=declare_queues resuming_receiver replaying_sender declare_queues_SOURCES=declare_queues.cpp declare_queues_LDADD=$(CLIENT_LIB) resuming_receiver_SOURCES=resuming_receiver.cpp resuming_receiver_LDADD=$(CLIENT_LIB) replaying_sender_SOURCES=replaying_sender.cpp replaying_sender_LDADD=$(CLIENT_LIB) examples_DATA= \ declare_queues.cpp \ resuming_receiver.cpp \ replaying_sender.cpp \ $(MAKEDIST) # FIXME aconway 2008-10-10: add verify scripts. EXTRA_DIST= \ CMakeLists.txt \ failover_declare_queues.vcproj \ failover_replaying_sender.vcproj \ failover_resuming_receiver.vcproj qpidc-0.16/examples/old_api/failover/declare_queues.cpp0000664000076400007640000000327411105045735023671 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include using namespace qpid::client; using namespace std; int main(int argc, char ** argv) { ConnectionSettings settings; if (argc > 1) settings.host = argv[1]; if (argc > 2) settings.port = atoi(argv[2]); FailoverManager connection(settings); try { bool complete = false; while (!complete) { Session session = connection.connect().newSession(); try { session.queueDeclare(arg::queue="message_queue"); complete = true; } catch (const qpid::TransportFailure&) {} } connection.close(); return 0; } catch (const std::exception& error) { std::cout << "Failed:" << error.what() << std::endl; return 1; } } qpidc-0.16/examples/old_api/failover/failover_resuming_receiver.vcproj0000664000076400007640000002535211334317457027040 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/failover/failover_replaying_sender.vcproj0000664000076400007640000002533711334317457026660 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/failover/replaying_sender.cpp0000664000076400007640000000537511104052520024226 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include using namespace qpid; using namespace qpid::client; using namespace qpid::framing; using namespace std; class Sender : public FailoverManager::Command { public: Sender(const std::string& queue, uint count); void execute(AsyncSession& session, bool isRetry); uint getSent(); private: MessageReplayTracker sender; const uint count; uint sent; Message message; }; Sender::Sender(const std::string& queue, uint count_) : sender(10), count(count_), sent(0) { message.getDeliveryProperties().setRoutingKey(queue); } void Sender::execute(AsyncSession& session, bool isRetry) { if (isRetry) sender.replay(session); else sender.init(session); while (sent < count) { stringstream message_data; message_data << ++sent; message.setData(message_data.str()); message.getHeaders().setInt("sn", sent); sender.send(message); if (count > 1000 && !(sent % 1000)) { std::cout << "sent " << sent << " of " << count << std::endl; } } message.setData("That's all, folks!"); sender.send(message); } uint Sender::getSent() { return sent; } int main(int argc, char ** argv) { ConnectionSettings settings; if (argc > 1) settings.host = argv[1]; if (argc > 2) settings.port = atoi(argv[2]); FailoverManager connection(settings); Sender sender("message_queue", argc > 3 ? atoi(argv[3]) : 1000); try { connection.execute(sender); std::cout << "Sent " << sender.getSent() << " messages." << std::endl; connection.close(); return 0; } catch(const std::exception& error) { std::cout << "Failed: " << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/failover/resuming_receiver.cpp0000664000076400007640000000702711105045735024420 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include using namespace qpid; using namespace qpid::client; using namespace qpid::framing; using namespace std; class Listener : public MessageListener, public FailoverManager::Command, public FailoverManager::ReconnectionStrategy { public: Listener(); void received(Message& message); void execute(AsyncSession& session, bool isRetry); void check(); void editUrlList(std::vector& urls); private: Subscription subscription; uint count; uint skipped; uint lastSn; bool gaps; }; Listener::Listener() : count(0), skipped(0), lastSn(0), gaps(false) {} void Listener::received(Message & message) { if (message.getData() == "That's all, folks!") { std::cout << "Shutting down listener for " << message.getDestination() << std::endl; std::cout << "Listener received " << count << " messages (" << skipped << " skipped)" << std::endl; subscription.cancel(); } else { uint sn = message.getHeaders().getAsInt("sn"); if (lastSn < sn) { if (sn - lastSn > 1) { std::cout << "Error: gap in sequence between " << lastSn << " and " << sn << std::endl; gaps = true; } lastSn = sn; ++count; } else { ++skipped; } } } void Listener::check() { if (gaps) throw Exception("Detected gaps in sequence; messages appear to have been lost."); } void Listener::execute(AsyncSession& session, bool isRetry) { if (isRetry) { std::cout << "Resuming from " << count << std::endl; } SubscriptionManager subs(session); subscription = subs.subscribe(*this, "message_queue"); subs.run(); } void Listener::editUrlList(std::vector& urls) { /** * A more realistic algorithm would be to search through the list * for prefered hosts and ensure they come first in the list. */ if (urls.size() > 1) std::rotate(urls.begin(), urls.begin() + 1, urls.end()); } int main(int argc, char ** argv) { ConnectionSettings settings; if (argc > 1) settings.host = argv[1]; if (argc > 2) settings.port = atoi(argv[2]); Listener listener; FailoverManager connection(settings, &listener); try { connection.execute(listener); connection.close(); listener.check(); std::cout << "Completed without error." << std::endl; return 0; } catch(const std::exception& error) { std::cout << "Failure: " << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/failover/CMakeLists.txt0000664000076400007640000000161211201113763022723 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # add_example(failover declare_queues) add_example(failover resuming_receiver) add_example(failover replaying_sender) qpidc-0.16/examples/old_api/failover/failover_declare_queues.vcproj0000664000076400007640000002531111334317457026304 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/.libs/0000775000076400007640000000000011752725720017400 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/.libs/Makefile0000664000076400007640000000017211752725720021040 0ustar00jrossjross00000000000000all clean: for d in direct pub-sub fanout request-response failover tradedemo xml-exchange ; do $(MAKE) -C $$d $@ ; done qpidc-0.16/examples/old_api/README.verify0000664000076400007640000000277711533216634020565 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # = Qpid C++ Examples = For more information read examples/README. == The Verify All Script == The verify_all script will run each C++ example and compare its output against what is expected. === Arguments === The verify_all script expects the path to Qpid trunk as an argument. == The Verify Script == The verify script is capable of running one or many scripts designed to verify the success of Qpid examples. The verify script is utilized by the verify_all scripts. === Verifying an individual example === This will require you using the verify script, and providing the necessary sub script(s) it will utilize in the process. Please note that it is your responsibility to setup the necessary environment for the verification process qpidc-0.16/examples/old_api/fanout/0000775000076400007640000000000011752725720017665 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/fanout/fanout_producer.cpp0000664000076400007640000000554711156273306023577 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * fanout_producer.cpp: * * This program is one of two programs designed to be used * together. * * fanout_producer.cpp (this program): * * Publishes messages to the "amq.fanout" exchange. * * listener.cpp * * Creates a private queue, binds it to the "amq.fanout" * exchange, and reads messages from its queue as they * arrive. Messages sent before the listener binds the queue are * not received. * * Multiple listeners can run at the same time. * */ #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using std::stringstream; using std::string; int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Unlike topic exchanges and direct exchanges, a fanout // exchange need not set a routing key. Message message; // Now send some messages ... for (int i=0; i<10; i++) { stringstream message_data; message_data << "Message " << i; message.setData(message_data.str()); // Asynchronous transfer sends messages as quickly as // possible without waiting for confirmation. async(session).messageTransfer(arg::content=message, arg::destination="amq.fanout"); } // And send a final message to indicate termination. message.setData("That's all, folks!"); session.messageTransfer(arg::content=message, arg::destination="amq.fanout"); //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/fanout/Makefile.in0000664000076400007640000005136411752725662021750 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS = fanout_producer$(EXEEXT) listener$(EXEEXT) subdir = examples/old_api/fanout ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_fanout_producer_OBJECTS = fanout_producer.$(OBJEXT) fanout_producer_OBJECTS = $(am_fanout_producer_OBJECTS) fanout_producer_DEPENDENCIES = $(CLIENT_LIB) am_listener_OBJECTS = listener.$(OBJEXT) listener_OBJECTS = $(am_listener_OBJECTS) listener_DEPENDENCIES = $(CLIENT_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(fanout_producer_SOURCES) $(listener_SOURCES) DIST_SOURCES = $(fanout_producer_SOURCES) $(listener_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir = $(pkgdatadir)/examples/old_api/fanout MAKELDFLAGS = $(CLIENTFLAGS) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB = $(top_builddir)/src/libqpidclient.la CONSOLE_LIB = $(top_builddir)/src/libqmfconsole.la CLIENTFLAGS = -lqpidclient CONSOLEFLAGS = -lqmfconsole # Generate a simple non-automake Makefile for distribution. MAKEDIST = .libs/Makefile fanout_producer_SOURCES = fanout_producer.cpp fanout_producer_LDADD = $(CLIENT_LIB) listener_SOURCES = listener.cpp listener_LDADD = $(CLIENT_LIB) examples_DATA = \ fanout_producer.cpp \ listener.cpp \ $(MAKEDIST) EXTRA_DIST = \ $(examples_DATA) \ CMakeLists.txt \ verify \ verify.in \ fanout_fanout_producer.vcproj \ fanout_listener.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/examples/makedist.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/old_api/fanout/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/old_api/fanout/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list fanout_producer$(EXEEXT): $(fanout_producer_OBJECTS) $(fanout_producer_DEPENDENCIES) @rm -f fanout_producer$(EXEEXT) $(CXXLINK) $(fanout_producer_OBJECTS) $(fanout_producer_LDADD) $(LIBS) listener$(EXEEXT): $(listener_OBJECTS) $(listener_DEPENDENCIES) @rm -f listener$(EXEEXT) $(CXXLINK) $(listener_OBJECTS) $(listener_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fanout_producer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listener.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo CXX=$(CXX) ; \ echo CXXFLAGS=$(CXXFLAGS) ; \ echo LDFLAGS=$(MAKELDFLAGS) ; \ echo ; \ echo all: $(noinst_PROGRAMS) ; \ echo ; \ echo clean: ; \ echo " rm -f $(noinst_PROGRAMS)" ; \ ) > $(MAKEDIST) # 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: qpidc-0.16/examples/old_api/fanout/Makefile.am0000664000076400007640000000253211536454602021721 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir=$(pkgdatadir)/examples/old_api/fanout MAKELDFLAGS=$(CLIENTFLAGS) include $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS=fanout_producer listener fanout_producer_SOURCES=fanout_producer.cpp fanout_producer_LDADD=$(CLIENT_LIB) listener_SOURCES=listener.cpp listener_LDADD=$(CLIENT_LIB) examples_DATA= \ fanout_producer.cpp \ listener.cpp \ $(MAKEDIST) EXTRA_DIST= \ $(examples_DATA) \ CMakeLists.txt \ verify \ verify.in \ fanout_fanout_producer.vcproj \ fanout_listener.vcproj qpidc-0.16/examples/old_api/fanout/fanout_listener.vcproj0000664000076400007640000002517311334317457024323 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/fanout/verify0000664000076400007640000000214311121631567021107 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify background "Listening" ./listener background "Listening" ./listener background "Listening" ./listener clients ./fanout_producer outputs ./fanout_producer.out "./listener.out | remove_uuid" "./listenerX.out | remove_uuid" "./listenerXX.out | remove_uuid" qpidc-0.16/examples/old_api/fanout/.libs/0000775000076400007640000000000011752725720020674 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/fanout/.libs/Makefile0000664000076400007640000000016411752725720022335 0ustar00jrossjross00000000000000CXX=g++ CXXFLAGS=-g -O2 LDFLAGS=-lqpidclient all: fanout_producer listener clean: rm -f fanout_producer listener qpidc-0.16/examples/old_api/fanout/verify.in0000664000076400007640000000157411027017713021517 0ustar00jrossjross00000000000000==== fanout_producer.out ==== listener.out | remove_uuid Listening Message: Message 0 Message: Message 1 Message: Message 2 Message: Message 3 Message: Message 4 Message: Message 5 Message: Message 6 Message: Message 7 Message: Message 8 Message: Message 9 Message: That's all, folks! Shutting down listener for ==== listenerX.out | remove_uuid Listening Message: Message 0 Message: Message 1 Message: Message 2 Message: Message 3 Message: Message 4 Message: Message 5 Message: Message 6 Message: Message 7 Message: Message 8 Message: Message 9 Message: That's all, folks! Shutting down listener for ==== listenerXX.out | remove_uuid Listening Message: Message 0 Message: Message 1 Message: Message 2 Message: Message 3 Message: Message 4 Message: Message 5 Message: Message 6 Message: Message 7 Message: Message 8 Message: Message 9 Message: That's all, folks! Shutting down listener for qpidc-0.16/examples/old_api/fanout/fanout_fanout_producer.vcproj0000664000076400007640000002531011334317457025666 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/fanout/listener.cpp0000664000076400007640000000761211156273306022220 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * listener.cpp * * This program is one of two programs designed to be used * together. * * fanout_producer.cpp * * Publishes messages to the "amq.fanout" exchange. * * listener.cpp (this program) * * Creates a private queue, binds it to the "amq.fanout" * exchange, and reads messages from its queue as they * arrive. Messages sent before the listener binds the queue are * not received. * * Multiple listeners can run at the same time. * */ #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; class Listener : public MessageListener{ private: SubscriptionManager& subscriptions; public: Listener(SubscriptionManager& subscriptions); virtual void received(Message& message); }; Listener::Listener(SubscriptionManager& subs) : subscriptions(subs) {} void Listener::received(Message& message) { std::cout << "Message: " << message.getData() << std::endl; if (message.getData() == "That's all, folks!") { std::cout << "Shutting down listener for " << message.getDestination() << std::endl; subscriptions.cancel(message.getDestination()); } } int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Each client creates its own private queue, using the // session id to guarantee a unique name. It then routes // all messages from the fanout exchange to its own queue // by binding to the queue. // // The binding specifies a binding key, but for a fanout // exchange, the binding key is optional and is not used // for routing decisions. It can be useful for tracking // messages and routing in logs. std::string myQueue=session.getId().getName(); session.queueDeclare(arg::queue=myQueue, arg::exclusive=true, arg::autoDelete=true); session.exchangeBind(arg::exchange="amq.fanout", arg::queue=myQueue, arg::bindingKey="my-key"); // Create a listener and subscribe it to my queue. SubscriptionManager subscriptions(session); Listener listener(subscriptions); subscriptions.subscribe(listener, myQueue); // Receive messages until the subscription is cancelled // by Listener::received() std::cout << "Listening" << std::endl; subscriptions.run(); //--------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/fanout/CMakeLists.txt0000664000076400007640000000152711201113763022415 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # add_example(fanout fanout_producer) add_example(fanout listener) qpidc-0.16/examples/old_api/xml-exchange/0000775000076400007640000000000011752725721020752 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/xml-exchange/Makefile.in0000664000076400007640000005232311752725662023030 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS = declare_queues$(EXEEXT) xml_producer$(EXEEXT) \ listener$(EXEEXT) subdir = examples/old_api/xml-exchange ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_declare_queues_OBJECTS = declare_queues.$(OBJEXT) declare_queues_OBJECTS = $(am_declare_queues_OBJECTS) declare_queues_DEPENDENCIES = $(CLIENT_LIB) am_listener_OBJECTS = listener.$(OBJEXT) listener_OBJECTS = $(am_listener_OBJECTS) listener_DEPENDENCIES = $(CLIENT_LIB) am_xml_producer_OBJECTS = xml_producer.$(OBJEXT) xml_producer_OBJECTS = $(am_xml_producer_OBJECTS) xml_producer_DEPENDENCIES = $(CLIENT_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(declare_queues_SOURCES) $(listener_SOURCES) \ $(xml_producer_SOURCES) DIST_SOURCES = $(declare_queues_SOURCES) $(listener_SOURCES) \ $(xml_producer_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir = $(pkgdatadir)/examples/old_api/xml-exchange MAKELDFLAGS = $(CLIENTFLAGS) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB = $(top_builddir)/src/libqpidclient.la CONSOLE_LIB = $(top_builddir)/src/libqmfconsole.la CLIENTFLAGS = -lqpidclient CONSOLEFLAGS = -lqmfconsole # Generate a simple non-automake Makefile for distribution. MAKEDIST = .libs/Makefile declare_queues_SOURCES = declare_queues.cpp declare_queues_LDADD = $(CLIENT_LIB) xml_producer_SOURCES = xml_producer.cpp xml_producer_LDADD = $(CLIENT_LIB) listener_SOURCES = listener.cpp listener_LDADD = $(CLIENT_LIB) EXTRA_DIST = \ README.txt \ CMakeLists.txt examples_DATA = \ $(EXTRA_DIST) \ declare_queues.cpp \ listener.cpp \ xml_producer.cpp \ $(MAKEDIST) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/examples/makedist.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/old_api/xml-exchange/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/old_api/xml-exchange/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list declare_queues$(EXEEXT): $(declare_queues_OBJECTS) $(declare_queues_DEPENDENCIES) @rm -f declare_queues$(EXEEXT) $(CXXLINK) $(declare_queues_OBJECTS) $(declare_queues_LDADD) $(LIBS) listener$(EXEEXT): $(listener_OBJECTS) $(listener_DEPENDENCIES) @rm -f listener$(EXEEXT) $(CXXLINK) $(listener_OBJECTS) $(listener_LDADD) $(LIBS) xml_producer$(EXEEXT): $(xml_producer_OBJECTS) $(xml_producer_DEPENDENCIES) @rm -f xml_producer$(EXEEXT) $(CXXLINK) $(xml_producer_OBJECTS) $(xml_producer_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/declare_queues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xml_producer.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo CXX=$(CXX) ; \ echo CXXFLAGS=$(CXXFLAGS) ; \ echo LDFLAGS=$(MAKELDFLAGS) ; \ echo ; \ echo all: $(noinst_PROGRAMS) ; \ echo ; \ echo clean: ; \ echo " rm -f $(noinst_PROGRAMS)" ; \ ) > $(MAKEDIST) # 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: qpidc-0.16/examples/old_api/xml-exchange/Makefile.am0000664000076400007640000000255411536454602023011 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir=$(pkgdatadir)/examples/old_api/xml-exchange MAKELDFLAGS=$(CLIENTFLAGS) include $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS=declare_queues xml_producer listener declare_queues_SOURCES=declare_queues.cpp declare_queues_LDADD=$(CLIENT_LIB) xml_producer_SOURCES=xml_producer.cpp xml_producer_LDADD=$(CLIENT_LIB) listener_SOURCES=listener.cpp listener_LDADD=$(CLIENT_LIB) EXTRA_DIST= \ README.txt \ CMakeLists.txt examples_DATA= \ $(EXTRA_DIST) \ declare_queues.cpp \ listener.cpp \ xml_producer.cpp \ $(MAKEDIST) qpidc-0.16/examples/old_api/xml-exchange/xml_producer.cpp0000664000076400007640000000627511202066000024145 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * * xml_producer.cpp * * This is one of three programs used to implement XML-based content * routing in C++. * * declare_queues.cpp * * Creates a queue named "message_qaueue" on the broker, * declares an XML Exchange, subscribes the queue to the XML * Exchange using an XQuery in the binding, then exits. * * xml_producer.cpp (this program) * * Publishes messages to the XML Exchange. * * listener.cpp * * Reads messages from the "message_queue" queue. */ #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using std::stringstream; using std::string; int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; Message message; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Publish some XML messages. Use the control property to // indicate when we are finished. // // In the XML exchange, the routing key and the name of // the query match. message.getDeliveryProperties().setRoutingKey("content_feed"); message.getHeaders().setString("control","continue"); // Now send some messages ... for (int i=0; i<10; i++) { stringstream message_data; message_data << "" << i << ""; std::cout << "Message data: " << message_data.str() << std::endl; message.setData(message_data.str()); // Asynchronous transfer sends messages as quickly as // possible without waiting for confirmation. async(session).messageTransfer(arg::content=message, arg::destination="xml"); } // And send a final message to indicate termination. message.getHeaders().setString("control","end"); message.setData("That's all, folks!"); session.messageTransfer(arg::content=message, arg::destination="xml"); //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/xml-exchange/declare_queues.cpp0000664000076400007640000000567711202066000024435 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * * declare_queues.cpp * * This is one of three programs used to implement XML-based content * routing in C++. * * declare_queues.cpp (this program) * * Creates a queue named "message_qaueue" on the broker, * declares an XML Exchange, subscribes the queue to the XML * Exchange using an XQuery in the binding, then exits. * * xml_producer.cpp * * Publishes messages to the XML Exchange. * * listener.cpp * * Reads messages from the "message_queue" queue. */ #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using std::string; int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Set up queues, bind them with queries. Note that the XML exchange // is not in the AMQP specification, so it is called "xml", not "amq.xml". // Note that the XML exchange is not predeclared in Qpid, it must // be declared by the application. session.queueDeclare(arg::queue="message_queue"); session.exchangeDeclare(arg::exchange="xml", arg::type="xml"); // Application message properties are mapped to external variables // in the XQuery. An XML Exchange can query message properties much // like JMS, query the XML content of the message, or both. FieldTable binding; binding.setString("xquery", "declare variable $control external;" "./message/id mod 2 = 1 or $control = 'end'"); session.exchangeBind(arg::exchange="xml", arg::queue="message_queue", arg::bindingKey="content_feed", arg::arguments=binding); //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/xml-exchange/README.txt0000664000076400007640000000345111410407722022440 0ustar00jrossjross00000000000000This example shows how to program a simple application using the XML Exchange. [Note: The XML Exchange is not a standard AMQP exchange type. To run this example you need to have a broker that has support for the xml exchange. If you are compiling the broker from source please refer to the INSTALL notes from qpid.] To run the example, execute the programs in the following order: 1 ./declare_queues 2 ./listener 3 ./message_producer (in a separate window) The XML Exchange must be explicitly declared. Bindings are established using queries in XQuery. These queries can reference message content, message application properties (which are declared as external variables in the XQuery), or both. Once this is done, message producers publish to the exchange using the exchange name and a routing key, just as for other exchange types. Message consumers read from the queues to which messages are routed. If a message does not have XML content, or is missing message application properties needed by the query, the query is not routed. Queries can use message application headers to provide functionality similar to JMS selectors. If a query does not use the content of a message, the message content is not parsed, and need not be XML. The XQuery processor, XQilla, does path-based document projection, so once the portion of a document needed to evaluate a query has been read, it stops parsing the document. Suppose a long document has a header section. You can indicate in the query that only one header section needs to be queried, and there is no need to parse the entire document to see if there are further header sections, using a path like this: ./message/header[1]/date If you used a path like this, all children of the message element would be read to see if there are further headers: ./message/header/date qpidc-0.16/examples/old_api/xml-exchange/listener.cpp0000664000076400007640000000606511202066000023264 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * * listener.cpp * * This is one of three programs used to implement XML-based content * routing in C++. * * declare_queues.cpp * * Creates a queue named "message_qaueue" on the broker, * declares an XML Exchange, subscribes the queue to the XML * Exchange using an XQuery in the binding, then exits. * * xml_producer.cpp * * Publishes messages to the XML Exchange. * * listener.cpp (this program) * * Reads messages from the "message_queue" queue. */ #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; class Listener : public MessageListener{ private: SubscriptionManager& subscriptions; public: Listener(SubscriptionManager& subscriptions); virtual void received(Message& message); }; Listener::Listener(SubscriptionManager& subs) : subscriptions(subs) {} void Listener::received(Message& message) { std::cout << "Message: " << message.getData() << std::endl; if (message.getHeaders().getAsString("control") == "end") { std::cout << "Shutting down listener for " << message.getDestination() << std::endl; subscriptions.cancel(message.getDestination()); } } int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- SubscriptionManager subscriptions(session); // Create a listener and subscribe it to the queue named "message_queue" Listener listener(subscriptions); subscriptions.subscribe(listener, "message_queue"); // Receive messages until the subscription is cancelled // by Listener::received() subscriptions.run(); //--------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/xml-exchange/CMakeLists.txt0000664000076400007640000000165211277122266023513 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if (BUILD_XML) add_example(xml-exchange declare_queues) add_example(xml-exchange xml_producer) add_example(xml-exchange listener) endif (BUILD_XML) qpidc-0.16/examples/old_api/direct/0000775000076400007640000000000011752725720017643 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/direct/Makefile.in0000664000076400007640000005256611752725662021733 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS = direct_producer$(EXEEXT) listener$(EXEEXT) \ declare_queues$(EXEEXT) subdir = examples/old_api/direct ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_declare_queues_OBJECTS = declare_queues.$(OBJEXT) declare_queues_OBJECTS = $(am_declare_queues_OBJECTS) declare_queues_DEPENDENCIES = $(CLIENT_LIB) am_direct_producer_OBJECTS = direct_producer.$(OBJEXT) direct_producer_OBJECTS = $(am_direct_producer_OBJECTS) direct_producer_DEPENDENCIES = $(CLIENT_LIB) am_listener_OBJECTS = listener.$(OBJEXT) listener_OBJECTS = $(am_listener_OBJECTS) listener_DEPENDENCIES = $(CLIENT_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(declare_queues_SOURCES) $(direct_producer_SOURCES) \ $(listener_SOURCES) DIST_SOURCES = $(declare_queues_SOURCES) $(direct_producer_SOURCES) \ $(listener_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir = $(pkgdatadir)/examples/old_api/direct MAKELDFLAGS = $(CLIENTFLAGS) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB = $(top_builddir)/src/libqpidclient.la CONSOLE_LIB = $(top_builddir)/src/libqmfconsole.la CLIENTFLAGS = -lqpidclient CONSOLEFLAGS = -lqmfconsole # Generate a simple non-automake Makefile for distribution. MAKEDIST = .libs/Makefile direct_producer_SOURCES = direct_producer.cpp direct_producer_LDADD = $(CLIENT_LIB) listener_SOURCES = listener.cpp listener_LDADD = $(CLIENT_LIB) declare_queues_SOURCES = declare_queues.cpp declare_queues_LDADD = $(CLIENT_LIB) examples_DATA = \ direct_producer.cpp \ listener.cpp \ declare_queues.cpp \ $(MAKEDIST) EXTRA_DIST = \ $(examples_DATA) \ CMakeLists.txt \ verify \ verify.in \ direct_declare_queues.vcproj \ direct_direct_producer.vcproj \ direct_listener.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/examples/makedist.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/old_api/direct/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/old_api/direct/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list declare_queues$(EXEEXT): $(declare_queues_OBJECTS) $(declare_queues_DEPENDENCIES) @rm -f declare_queues$(EXEEXT) $(CXXLINK) $(declare_queues_OBJECTS) $(declare_queues_LDADD) $(LIBS) direct_producer$(EXEEXT): $(direct_producer_OBJECTS) $(direct_producer_DEPENDENCIES) @rm -f direct_producer$(EXEEXT) $(CXXLINK) $(direct_producer_OBJECTS) $(direct_producer_LDADD) $(LIBS) listener$(EXEEXT): $(listener_OBJECTS) $(listener_DEPENDENCIES) @rm -f listener$(EXEEXT) $(CXXLINK) $(listener_OBJECTS) $(listener_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/declare_queues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/direct_producer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listener.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo CXX=$(CXX) ; \ echo CXXFLAGS=$(CXXFLAGS) ; \ echo LDFLAGS=$(MAKELDFLAGS) ; \ echo ; \ echo all: $(noinst_PROGRAMS) ; \ echo ; \ echo clean: ; \ echo " rm -f $(noinst_PROGRAMS)" ; \ ) > $(MAKEDIST) # 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: qpidc-0.16/examples/old_api/direct/Makefile.am0000664000076400007640000000276111536454602021703 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir=$(pkgdatadir)/examples/old_api/direct MAKELDFLAGS=$(CLIENTFLAGS) include $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS=direct_producer listener declare_queues direct_producer_SOURCES=direct_producer.cpp direct_producer_LDADD=$(CLIENT_LIB) listener_SOURCES=listener.cpp listener_LDADD=$(CLIENT_LIB) declare_queues_SOURCES=declare_queues.cpp declare_queues_LDADD=$(CLIENT_LIB) examples_DATA= \ direct_producer.cpp \ listener.cpp \ declare_queues.cpp \ $(MAKEDIST) EXTRA_DIST= \ $(examples_DATA) \ CMakeLists.txt \ verify \ verify.in \ direct_declare_queues.vcproj \ direct_direct_producer.vcproj \ direct_listener.vcproj qpidc-0.16/examples/old_api/direct/direct_declare_queues.vcproj0000664000076400007640000002527511334317457025423 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/direct/declare_queues.cpp0000664000076400007640000000457611107073213023334 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * declare_queues.cpp * * This program is one of three programs designed to be used * together. * * declare_queues.cpp: (this program): * * Creates a queue named "message_queue" on a broker, binding the * queue to the "amq.direct" exchange, using the routing key * "routing_key". * * direct_producer.cpp * * Publishes to the "amq.direct" exchange, specifying the routing * key "routing_key" * * listener.cpp * * Reads from the "message_queue" queue on the broker using a * message listener. * */ #include #include using namespace qpid::client; using namespace qpid::framing; int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Create a queue named "message_queue", and route all messages whose // routing key is "routing_key" to this newly created queue. session.queueDeclare(arg::queue="message_queue"); session.exchangeBind(arg::exchange="amq.direct", arg::queue="message_queue", arg::bindingKey="routing_key"); //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/direct/verify0000664000076400007640000000173711121631567021075 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify clients ./declare_queues ./direct_producer ./listener outputs ./declare_queues.out ./direct_producer.out ./listener.out qpidc-0.16/examples/old_api/direct/.libs/0000775000076400007640000000000011752725720020652 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/direct/.libs/Makefile0000664000076400007640000000022211752725720022306 0ustar00jrossjross00000000000000CXX=g++ CXXFLAGS=-g -O2 LDFLAGS=-lqpidclient all: direct_producer listener declare_queues clean: rm -f direct_producer listener declare_queues qpidc-0.16/examples/old_api/direct/direct_producer.cpp0000664000076400007640000000602511156273306023523 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * direct_producer.cpp: * * This program is one of three programs designed to be used * together. * * create_queues.cpp: * * Creates a queue named "message_queue" on a broker, binding the * queue to the "amq.direct" exchange, using the routing key * "routing_key". * * direct_producer.cpp (this program): * * Publishes to the "amq.direct" exchange, specifying the routing * key "routing_key" * * listener.cpp * * Reads from the "message_queue" queue on the broker using a * message listener. * */ #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using std::stringstream; using std::string; int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; int count = argc>3 ? atoi(argv[3]) : 10; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // The routing key is a message property. We will use the same // routing key for each message, so we'll set this property // just once. (In most simple cases, there is no need to set // other message properties.) Message message; message.getDeliveryProperties().setRoutingKey("routing_key"); // Now send some messages ... for (int i=0; i #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; class Listener : public MessageListener{ private: SubscriptionManager& subscriptions; public: Listener(SubscriptionManager& subscriptions); virtual void received(Message& message); }; Listener::Listener(SubscriptionManager& subs) : subscriptions(subs) {} void Listener::received(Message& message) { std::cout << "Message: " << message.getData() << std::endl; if (message.getData() == "That's all, folks!") { std::cout << "Shutting down listener for " << message.getDestination() << std::endl; subscriptions.cancel(message.getDestination()); } } int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- SubscriptionManager subscriptions(session); // Create a listener and subscribe it to the queue named "message_queue" Listener listener(subscriptions); subscriptions.subscribe(listener, "message_queue"); // Receive messages until the subscription is cancelled // by Listener::received() subscriptions.run(); //--------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/direct/direct_direct_producer.vcproj0000664000076400007640000002531011334317457025600 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/direct/direct_listener.vcproj0000664000076400007640000002517311334317457024257 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/direct/CMakeLists.txt0000664000076400007640000000157211201113763022373 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # add_example(direct declare_queues) add_example(direct direct_producer) add_example(direct listener) qpidc-0.16/examples/old_api/CMakeLists.txt0000664000076400007640000000173211533216711021124 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # add_subdirectory(direct) add_subdirectory(failover) add_subdirectory(fanout) add_subdirectory(pub-sub) add_subdirectory(request-response) add_subdirectory(tradedemo) add_subdirectory(xml-exchange) qpidc-0.16/examples/old_api/verify_all0000775000076400007640000000303211654250562020447 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Verify all examples verify=`dirname $0`/verify topsrcdir=$1 topbuilddir=$2 qpidd=$topbuilddir/src/qpidd broker_args=$3 exclude_regexp=$4 # Use temporary directory if $HOME does not exist if ! test -e "$HOME"; then export QPID_DATA_DIR=/tmp/qpid export QPID_PID_DIR=/tmp/qpid fi trap "$qpidd -q" exit QPID_PORT=`$qpidd -dp0 $broker_args` || { echo "Can't run qpidd" ; exit 1; } export QPID_PORT find="find $topsrcdir/cpp/examples/old_api" find="$find -mindepth 2 -name verify" all_examples=`$find` if test -z "$exclude_regexp"; then run_examples=$all_examples else for f in $all_examples; do { echo $f | grep $exclude_regexp > /dev/null ; } || run_examples="$run_examples $f" done fi $verify $topsrcdir $topbuilddir $run_examples qpidc-0.16/examples/old_api/pub-sub/0000775000076400007640000000000011752725720017746 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/pub-sub/Makefile.in0000664000076400007640000005155411752725662022032 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS = topic_listener$(EXEEXT) topic_publisher$(EXEEXT) subdir = examples/old_api/pub-sub ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_topic_listener_OBJECTS = topic_listener.$(OBJEXT) topic_listener_OBJECTS = $(am_topic_listener_OBJECTS) topic_listener_DEPENDENCIES = $(CLIENT_LIB) am_topic_publisher_OBJECTS = topic_publisher.$(OBJEXT) topic_publisher_OBJECTS = $(am_topic_publisher_OBJECTS) topic_publisher_DEPENDENCIES = $(CLIENT_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(topic_listener_SOURCES) $(topic_publisher_SOURCES) DIST_SOURCES = $(topic_listener_SOURCES) $(topic_publisher_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir = $(pkgdatadir)/examples/old_api/pub-sub MAKELDFLAGS = $(CLIENTFLAGS) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB = $(top_builddir)/src/libqpidclient.la CONSOLE_LIB = $(top_builddir)/src/libqmfconsole.la CLIENTFLAGS = -lqpidclient CONSOLEFLAGS = -lqmfconsole # Generate a simple non-automake Makefile for distribution. MAKEDIST = .libs/Makefile topic_listener_SOURCES = topic_listener.cpp topic_listener_LDADD = $(CLIENT_LIB) topic_publisher_SOURCES = topic_publisher.cpp topic_publisher_LDADD = $(CLIENT_LIB) examples_DATA = \ topic_listener.cpp \ topic_publisher.cpp \ $(MAKEDIST) EXTRA_DIST = \ $(examples_DATA) \ CMakeLists.txt \ verify \ verify.in \ pub-sub_topic_listener.vcproj \ pub-sub_topic_publisher.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/examples/makedist.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/old_api/pub-sub/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/old_api/pub-sub/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list topic_listener$(EXEEXT): $(topic_listener_OBJECTS) $(topic_listener_DEPENDENCIES) @rm -f topic_listener$(EXEEXT) $(CXXLINK) $(topic_listener_OBJECTS) $(topic_listener_LDADD) $(LIBS) topic_publisher$(EXEEXT): $(topic_publisher_OBJECTS) $(topic_publisher_DEPENDENCIES) @rm -f topic_publisher$(EXEEXT) $(CXXLINK) $(topic_publisher_OBJECTS) $(topic_publisher_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topic_listener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topic_publisher.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo CXX=$(CXX) ; \ echo CXXFLAGS=$(CXXFLAGS) ; \ echo LDFLAGS=$(MAKELDFLAGS) ; \ echo ; \ echo all: $(noinst_PROGRAMS) ; \ echo ; \ echo clean: ; \ echo " rm -f $(noinst_PROGRAMS)" ; \ ) > $(MAKEDIST) # 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: qpidc-0.16/examples/old_api/pub-sub/Makefile.am0000664000076400007640000000257411536454602022010 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir=$(pkgdatadir)/examples/old_api/pub-sub MAKELDFLAGS=$(CLIENTFLAGS) include $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS=topic_listener topic_publisher topic_listener_SOURCES=topic_listener.cpp topic_listener_LDADD=$(CLIENT_LIB) topic_publisher_SOURCES=topic_publisher.cpp topic_publisher_LDADD=$(CLIENT_LIB) examples_DATA= \ topic_listener.cpp \ topic_publisher.cpp \ $(MAKEDIST) EXTRA_DIST= \ $(examples_DATA) \ CMakeLists.txt \ verify \ verify.in \ pub-sub_topic_listener.vcproj \ pub-sub_topic_publisher.vcproj qpidc-0.16/examples/old_api/pub-sub/pub-sub_topic_listener.vcproj0000664000076400007640000002530311334317457025656 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/pub-sub/verify0000664000076400007640000000175711121631567021202 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify background "Listening" ./topic_listener clients ./topic_publisher outputs ./topic_publisher.out "topic_listener.out | remove_uuid | sort" qpidc-0.16/examples/old_api/pub-sub/.libs/0000775000076400007640000000000011752725720020755 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/pub-sub/.libs/Makefile0000664000076400007640000000020011752725720022405 0ustar00jrossjross00000000000000CXX=g++ CXXFLAGS=-g -O2 LDFLAGS=-lqpidclient all: topic_listener topic_publisher clean: rm -f topic_listener topic_publisher qpidc-0.16/examples/old_api/pub-sub/topic_listener.cpp0000664000076400007640000001241411156273306023473 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * topic_listener.cpp: * * This program is one of two programs designed to be used * together. These programs implement a publish-subscribe example * using the "amq.topic" exchange. * * topic_publisher.cpp * * Sends messages to the "amq.topic" exchange, using the * multipart routing keys "usa.news", "usa.weather", * "europe.news", and "europe.weather". * * topic_listener.cpp (this program) * * Creates private queues for "news", "weather", "usa", and * "europe", binding them to the amq.topic exchange using * bindings that match the corresponding parts of the multipart * routing keys. * * Multiple listeners can be run at the same time. * */ #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; class Listener : public MessageListener { private: Session& session; SubscriptionManager subscriptions; public: Listener(Session& session); virtual void prepareQueue(std::string queue, std::string exchange, std::string routing_key); virtual void received(Message& message); virtual void listen(); ~Listener() { }; }; /* * Listener::Listener * * Subscribe to the queue, route it to a client destination for the * listener. (The destination name merely identifies the destination * in the listener, you can use any name as long as you use the same * name for the listener). */ Listener::Listener(Session& session) : session(session), subscriptions(session) { } void Listener::prepareQueue(std::string queue, std::string exchange, std::string routing_key) { /* Create a unique queue name for this consumer by concatenating * the queue name parameter with the Session ID. */ queue += session.getId().getName(); std::cout << "Declaring queue: " << queue << std::endl; /* Declare an exclusive queue on the broker */ session.queueDeclare(arg::queue=queue, arg::exclusive=true, arg::autoDelete=true); /* Route messages to the new queue if they match the routing key. * * Also route any messages to with the "control" routing key to * this queue so we know when it's time to stop. A publisher sends * a message with the content "That's all, Folks!", using the * "control" routing key, when it is finished. */ session.exchangeBind(arg::exchange=exchange, arg::queue=queue, arg::bindingKey=routing_key); session.exchangeBind(arg::exchange=exchange, arg::queue=queue, arg::bindingKey="control"); /* * subscribe to the queue using the subscription manager. */ std::cout << "Subscribing to queue " << queue << std::endl; subscriptions.subscribe(*this, queue); } void Listener::received(Message& message) { std::cout << "Message: " << message.getData() << " from " << message.getDestination() << std::endl; if (message.getData() == "That's all, folks!") { std::cout << "Shutting down listener for " << message.getDestination() << std::endl; subscriptions.cancel(message.getDestination()); } } void Listener::listen() { // Receive messages subscriptions.run(); } int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; std::string exchange = argc>3 ? argv[3] : "amq.topic"; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Create a listener for the session Listener listener(session); // Subscribe to messages on the queues we are interested in listener.prepareQueue("usa", exchange, "usa.#"); listener.prepareQueue("europe", exchange, "europe.#"); listener.prepareQueue("news", exchange, "#.news"); listener.prepareQueue("weather", exchange, "#.weather"); std::cout << "Listening for messages ..." << std::endl; // Give up control and receive messages listener.listen(); //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/pub-sub/verify.in0000664000076400007640000000337111027017713021575 0ustar00jrossjross00000000000000==== topic_publisher.out ==== topic_listener.out | remove_uuid | sort Declaring queue: europe Declaring queue: news Declaring queue: usa Declaring queue: weather Listening for messages ... Message: Message 0 from europe Message: Message 0 from europe Message: Message 0 from news Message: Message 0 from news Message: Message 0 from usa Message: Message 0 from usa Message: Message 0 from weather Message: Message 0 from weather Message: Message 1 from europe Message: Message 1 from europe Message: Message 1 from news Message: Message 1 from news Message: Message 1 from usa Message: Message 1 from usa Message: Message 1 from weather Message: Message 1 from weather Message: Message 2 from europe Message: Message 2 from europe Message: Message 2 from news Message: Message 2 from news Message: Message 2 from usa Message: Message 2 from usa Message: Message 2 from weather Message: Message 2 from weather Message: Message 3 from europe Message: Message 3 from europe Message: Message 3 from news Message: Message 3 from news Message: Message 3 from usa Message: Message 3 from usa Message: Message 3 from weather Message: Message 3 from weather Message: Message 4 from europe Message: Message 4 from europe Message: Message 4 from news Message: Message 4 from news Message: Message 4 from usa Message: Message 4 from usa Message: Message 4 from weather Message: Message 4 from weather Message: That's all, folks! from europe Message: That's all, folks! from news Message: That's all, folks! from usa Message: That's all, folks! from weather Shutting down listener for europe Shutting down listener for news Shutting down listener for usa Shutting down listener for weather Subscribing to queue europe Subscribing to queue news Subscribing to queue usa Subscribing to queue weather qpidc-0.16/examples/old_api/pub-sub/pub-sub_topic_publisher.vcproj0000664000076400007640000002531611334317457026032 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/pub-sub/topic_publisher.cpp0000664000076400007640000000713011156273306023642 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * topic_publisher.cpp: * * This program is one of two programs designed to be used * together. These programs implement a publish-subscribe example * using the "amq.topic" exchange. * * topic_publisher.cpp (this program) * * Sends messages to the "amq.topic" exchange, using the * multipart routing keys "usa.news", "usa.weather", * "europe.news", and "europe.weather". * * topic_listener.cpp * * Creates private queues for "news", "weather", "usa", and * "europe", binding them to the amq.topic exchange using * bindings that match the corresponding parts of the multipart * routing keys. * * Multiple listeners can be run at the same time. * */ #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using std::stringstream; using std::string; void publish_messages(Session& session, string routing_key) { Message message; // Set the routing key once, we'll use the same routing key for all // messages. message.getDeliveryProperties().setRoutingKey(routing_key); for (int i=0; i<5; i++) { stringstream message_data; message_data << "Message " << i; message.setData(message_data.str()); // Asynchronous transfer sends messages as quickly as // possible without waiting for confirmation. async(session).messageTransfer(arg::content=message, arg::destination="amq.topic"); } } /* * no_more_messages() * * Send a message to indicate that no more messages are coming. * Use the 'control' routing key (see comments in topic_config_queues.cpp). * */ void no_more_messages(Session& session) { Message message; message.getDeliveryProperties().setRoutingKey("control"); message.setData("That's all, folks!"); session.messageTransfer(arg::content=message, arg::destination="amq.topic"); } int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- publish_messages(session, "usa.news"); publish_messages(session, "usa.weather"); publish_messages(session, "europe.news"); publish_messages(session, "europe.weather"); no_more_messages(session); //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/pub-sub/CMakeLists.txt0000664000076400007640000000153711277122266022512 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # add_example(pub-sub topic_listener) add_example(pub-sub topic_publisher) qpidc-0.16/examples/old_api/request-response/0000775000076400007640000000000011752725720021715 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/request-response/client.cpp0000664000076400007640000001211711156273306023675 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * client.cpp * * This program is one of two programs that illustrate the * request/response pattern. * * * client.cpp (this program) * * A client application that sends messages to the "amq.direct" * exchange, using the routing key "request" to route messages to * the server. * * Each instance of the client creates its own private response * queue, binding it to the "amq.direct" exchange using it's * session identifier as the routing key, and places its session * identifier in the "reply-to" property of each message it sends. * * * server.cpp * * A service that accepts messages from a request queue, converts * their content to upper case, and sends the result to the * original sender. * * This program creates a request queue, binds it to "amq.direct" * using the routing key "request", then receives messages from * the request queue. Each incoming message is converted to upper * case, then sent to the "amq.direct" exchange using the * request's reply-to property as the routing key for the * response. * * */ #include #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using std::stringstream; using std::string; class Listener : public MessageListener{ private: SubscriptionManager& subscriptions; int counter; public: Listener(SubscriptionManager& subscriptions); virtual void received(Message& message); }; Listener::Listener(SubscriptionManager& subs) : subscriptions(subs), counter(0) {} void Listener::received(Message& message) { std::cout << "Response: " << message.getData() << std::endl; ++ counter; if (counter > 3) { std::cout << "Shutting down listener for " << message.getDestination() << std::endl; subscriptions.cancel(message.getDestination()); } } int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Create a response queue so the server can send us responses // to our requests. Use the client's session ID as the name // of the response queue. stringstream response_queue; response_queue << "client" << session.getId().getName(); // Use the name of the response queue as the routing key session.queueDeclare(arg::queue=response_queue.str()); session.exchangeBind(arg::exchange="amq.direct", arg::queue=response_queue.str(), arg::bindingKey=response_queue.str()); // Each client sends the name of their own response queue so // the service knows where to route messages. Message request; request.getDeliveryProperties().setRoutingKey("request"); request.getMessageProperties().setReplyTo(ReplyTo("amq.direct", response_queue.str())); // Create a listener for the response queue and listen for response messages. std::cout << "Activating response queue listener for: " << response_queue.str() << std::endl; SubscriptionManager subscriptions(session); Listener listener(subscriptions); subscriptions.subscribe(listener, response_queue.str()); // Now send some requests ... string s[] = { "Twas brillig, and the slithy toves", "Did gire and gymble in the wabe.", "All mimsy were the borogroves,", "And the mome raths outgrabe." }; for (int i=0; i<4; i++) { request.setData(s[i]); session.messageTransfer(arg::content=request, arg::destination="amq.direct"); std::cout << "Request: " << s[i] << std::endl; } std::cout << "Waiting for all responses to arrive ..." << std::endl; subscriptions.run(); //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/request-response/Makefile.in0000664000076400007640000005113711752725662023776 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS = client$(EXEEXT) server$(EXEEXT) subdir = examples/old_api/request-response ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_client_OBJECTS = client.$(OBJEXT) client_OBJECTS = $(am_client_OBJECTS) client_DEPENDENCIES = $(CLIENT_LIB) am_server_OBJECTS = server.$(OBJEXT) server_OBJECTS = $(am_server_OBJECTS) server_DEPENDENCIES = $(CLIENT_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(client_SOURCES) $(server_SOURCES) DIST_SOURCES = $(client_SOURCES) $(server_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir = $(pkgdatadir)/examples/old_api/request-response MAKELDFLAGS = $(CLIENTFLAGS) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB = $(top_builddir)/src/libqpidclient.la CONSOLE_LIB = $(top_builddir)/src/libqmfconsole.la CLIENTFLAGS = -lqpidclient CONSOLEFLAGS = -lqmfconsole # Generate a simple non-automake Makefile for distribution. MAKEDIST = .libs/Makefile client_SOURCES = client.cpp client_LDADD = $(CLIENT_LIB) server_SOURCES = server.cpp server_LDADD = $(CLIENT_LIB) examples_DATA = \ server.cpp \ client.cpp \ $(MAKEDIST) EXTRA_DIST = \ $(examples_DATA) \ CMakeLists.txt \ verify \ verify.in \ request-response_client.vcproj \ request-response_server.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/examples/makedist.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/old_api/request-response/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/old_api/request-response/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list client$(EXEEXT): $(client_OBJECTS) $(client_DEPENDENCIES) @rm -f client$(EXEEXT) $(CXXLINK) $(client_OBJECTS) $(client_LDADD) $(LIBS) server$(EXEEXT): $(server_OBJECTS) $(server_DEPENDENCIES) @rm -f server$(EXEEXT) $(CXXLINK) $(server_OBJECTS) $(server_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo CXX=$(CXX) ; \ echo CXXFLAGS=$(CXXFLAGS) ; \ echo LDFLAGS=$(MAKELDFLAGS) ; \ echo ; \ echo all: $(noinst_PROGRAMS) ; \ echo ; \ echo clean: ; \ echo " rm -f $(noinst_PROGRAMS)" ; \ ) > $(MAKEDIST) # 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: qpidc-0.16/examples/old_api/request-response/Makefile.am0000664000076400007640000000250211536454602023746 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir=$(pkgdatadir)/examples/old_api/request-response MAKELDFLAGS=$(CLIENTFLAGS) include $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS=client server client_SOURCES=client.cpp client_LDADD=$(CLIENT_LIB) server_SOURCES=server.cpp server_LDADD=$(CLIENT_LIB) examples_DATA= \ server.cpp \ client.cpp \ $(MAKEDIST) EXTRA_DIST= \ $(examples_DATA) \ CMakeLists.txt \ verify \ verify.in \ request-response_client.vcproj \ request-response_server.vcproj qpidc-0.16/examples/old_api/request-response/request-response_server.vcproj0000664000076400007640000002524111334317457030060 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/request-response/verify0000664000076400007640000000176711121631567023152 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # See https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid/bin/verify background "Waiting" ./server clients ./client kill %% # Must kill the server. outputs "./client.out | remove_uuid" "server.out | remove_uuid" qpidc-0.16/examples/old_api/request-response/.libs/0000775000076400007640000000000011752725720022724 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/request-response/.libs/Makefile0000664000076400007640000000013611752725720024364 0ustar00jrossjross00000000000000CXX=g++ CXXFLAGS=-g -O2 LDFLAGS=-lqpidclient all: client server clean: rm -f client server qpidc-0.16/examples/old_api/request-response/verify.in0000664000076400007640000000142111027017713023536 0ustar00jrossjross00000000000000==== client.out | remove_uuid Activating response queue listener for: client Request: Twas brillig, and the slithy toves Request: Did gire and gymble in the wabe. Request: All mimsy were the borogroves, Request: And the mome raths outgrabe. Waiting for all responses to arrive ... Response: TWAS BRILLIG, AND THE SLITHY TOVES Response: DID GIRE AND GYMBLE IN THE WABE. Response: ALL MIMSY WERE THE BOROGROVES, Response: AND THE MOME RATHS OUTGRABE. Shutting down listener for client ==== server.out | remove_uuid Activating request queue listener for: request Waiting for requests Request: Twas brillig, and the slithy toves (client) Request: Did gire and gymble in the wabe. (client) Request: All mimsy were the borogroves, (client) Request: And the mome raths outgrabe. (client) qpidc-0.16/examples/old_api/request-response/CMakeLists.txt0000664000076400007640000000154011201113763024440 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # add_example(request-response client) add_example(request-response server) qpidc-0.16/examples/old_api/request-response/request-response_client.vcproj0000664000076400007640000002524111334317457030030 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/request-response/server.cpp0000664000076400007640000001210511156273306023722 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * server.cpp * * This program is one of two programs that illustrate the * request/response pattern. * * * client.cpp * * A client application that sends messages to the "amq.direct" * exchange, using the routing key "request" to route messages to * the server. * * Each instance of the client creates its own private response * queue, binding it to the "amq.direct" exchange using it's * session identifier as the routing key, and places its session * identifier in the "reply-to" property of each message it sends. * * * server.cpp (this program) * * A service that accepts messages from a request queue, converts * their content to upper case, and sends the result to the * original sender. * * This program creates a request queue, binds it to "amq.direct" * using the routing key "request", then receives messages from * the request queue. Each incoming message is converted to upper * case, then sent to the "amq.direct" exchange using the * request's reply-to property as the routing key for the * response. * * */ #include #include #include #include #include #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using std::stringstream; using std::string; class Listener : public MessageListener{ private: SubscriptionManager& subscriptions; AsyncSession asyncSession; public: Listener(SubscriptionManager& subscriptions, Session& session); virtual void received(Message& message); }; Listener::Listener(SubscriptionManager& subs, Session& session) : subscriptions(subs), asyncSession(session) {} void Listener::received(Message& request) { Message response; // Get routing key for response from the request's replyTo property string routingKey; if (request.getMessageProperties().hasReplyTo()) { routingKey = request.getMessageProperties().getReplyTo().getRoutingKey(); } else { std::cout << "Error: " << "No routing key for request (" << request.getData() << ")" << std::endl; return; } std::cout << "Request: " << request.getData() << " (" <1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Create a request queue for clients to use when making // requests. string request_queue = "request"; // Use the name of the request queue as the routing key session.queueDeclare(arg::queue=request_queue); session.exchangeBind(arg::exchange="amq.direct", arg::queue=request_queue, arg::bindingKey=request_queue); // Create a listener and subscribe it to the request_queue std::cout << "Activating request queue listener for: " << request_queue << std::endl; SubscriptionManager subscriptions(session); Listener listener(subscriptions, session); subscriptions.subscribe(listener, request_queue); // Deliver messages until the subscription is cancelled // by Listener::received() std::cout << "Waiting for requests" << std::endl; subscriptions.run(); //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/tradedemo/0000775000076400007640000000000011752725721020336 5ustar00jrossjross00000000000000qpidc-0.16/examples/old_api/tradedemo/Makefile.in0000664000076400007640000005265711752725662022426 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS = topic_listener$(EXEEXT) topic_publisher$(EXEEXT) \ declare_queues$(EXEEXT) subdir = examples/old_api/tradedemo ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_declare_queues_OBJECTS = declare_queues.$(OBJEXT) declare_queues_OBJECTS = $(am_declare_queues_OBJECTS) declare_queues_DEPENDENCIES = $(CLIENT_LIB) am_topic_listener_OBJECTS = topic_listener.$(OBJEXT) topic_listener_OBJECTS = $(am_topic_listener_OBJECTS) topic_listener_DEPENDENCIES = $(CLIENT_LIB) am_topic_publisher_OBJECTS = topic_publisher.$(OBJEXT) topic_publisher_OBJECTS = $(am_topic_publisher_OBJECTS) topic_publisher_DEPENDENCIES = $(CLIENT_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(declare_queues_SOURCES) $(topic_listener_SOURCES) \ $(topic_publisher_SOURCES) DIST_SOURCES = $(declare_queues_SOURCES) $(topic_listener_SOURCES) \ $(topic_publisher_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir = $(pkgdatadir)/examples/old_api/tradedemo MAKELDFLAGS = $(CLIENTFLAGS) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB = $(top_builddir)/src/libqpidclient.la CONSOLE_LIB = $(top_builddir)/src/libqmfconsole.la CLIENTFLAGS = -lqpidclient CONSOLEFLAGS = -lqmfconsole # Generate a simple non-automake Makefile for distribution. MAKEDIST = .libs/Makefile topic_listener_SOURCES = topic_listener.cpp topic_listener_LDADD = $(CLIENT_LIB) topic_publisher_SOURCES = topic_publisher.cpp topic_publisher_LDADD = $(CLIENT_LIB) declare_queues_SOURCES = declare_queues.cpp declare_queues_LDADD = $(CLIENT_LIB) examples_DATA = \ topic_listener.cpp \ topic_publisher.cpp \ declare_queues.cpp \ $(MAKEDIST) EXTRA_DIST = \ CMakeLists.txt \ tradedemo_declare_queues.vcproj \ tradedemo_topic_listener.vcproj \ tradedemo_topic_publisher.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/examples/makedist.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/old_api/tradedemo/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/old_api/tradedemo/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list declare_queues$(EXEEXT): $(declare_queues_OBJECTS) $(declare_queues_DEPENDENCIES) @rm -f declare_queues$(EXEEXT) $(CXXLINK) $(declare_queues_OBJECTS) $(declare_queues_LDADD) $(LIBS) topic_listener$(EXEEXT): $(topic_listener_OBJECTS) $(topic_listener_DEPENDENCIES) @rm -f topic_listener$(EXEEXT) $(CXXLINK) $(topic_listener_OBJECTS) $(topic_listener_LDADD) $(LIBS) topic_publisher$(EXEEXT): $(topic_publisher_OBJECTS) $(topic_publisher_DEPENDENCIES) @rm -f topic_publisher$(EXEEXT) $(CXXLINK) $(topic_publisher_OBJECTS) $(topic_publisher_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/declare_queues.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topic_listener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/topic_publisher.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo CXX=$(CXX) ; \ echo CXXFLAGS=$(CXXFLAGS) ; \ echo LDFLAGS=$(MAKELDFLAGS) ; \ echo ; \ echo all: $(noinst_PROGRAMS) ; \ echo ; \ echo clean: ; \ echo " rm -f $(noinst_PROGRAMS)" ; \ ) > $(MAKEDIST) # 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: qpidc-0.16/examples/old_api/tradedemo/Makefile.am0000664000076400007640000000272311536454602022373 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir=$(pkgdatadir)/examples/old_api/tradedemo MAKELDFLAGS=$(CLIENTFLAGS) include $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS=topic_listener topic_publisher declare_queues topic_listener_SOURCES=topic_listener.cpp topic_listener_LDADD=$(CLIENT_LIB) topic_publisher_SOURCES=topic_publisher.cpp topic_publisher_LDADD=$(CLIENT_LIB) declare_queues_SOURCES=declare_queues.cpp declare_queues_LDADD=$(CLIENT_LIB) examples_DATA= \ topic_listener.cpp \ topic_publisher.cpp \ declare_queues.cpp \ $(MAKEDIST) EXTRA_DIST= \ CMakeLists.txt \ tradedemo_declare_queues.vcproj \ tradedemo_topic_listener.vcproj \ tradedemo_topic_publisher.vcproj qpidc-0.16/examples/old_api/tradedemo/declare_queues.cpp0000664000076400007640000000656311144035553024032 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * topic_publisher.cpp: * * This program is one of three programs designed to be used * together. These programs implement a publish-subscribe example * using the "amq.topic" exchange. In the example multiple listeners * can subscribe to the same queues for TTL messages. * The TTL messages are all ticker price data. Messages are * browsed and therefore shared among the multiple listeners. * Messages timeout using TTL so that they don't stay in the queue * for too long and fill it up. * Local exclusive LVQ are also declared for market data. * * declare_queues.cpp * * Declares several non-exclusive queues bound to the amq:topic exchange * * topic_publisher.cpp * * Sends messages to the "amq.topic" exchange, using the * multipart routing keys for ticker price and market data * Ticker messages are sent using a TTL value. * * topic_listener.cpp (this program) * * Subscribes to non-exclusive queues in NOT_ACQUIRE mode for * ticker price data and declares two LVQs for market data. * * Multiple listeners can be run at the same time. * */ #include #include using namespace qpid::client; using namespace qpid::framing; int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Create a queue named "message_queue", and route all messages whose // routing key is "routing_key" to this newly created queue. session.queueDeclare(arg::queue="TICKER.NYSE", arg::exclusive=false); session.exchangeBind(arg::exchange="amq.topic", arg::queue="TICKER.NYSE", arg::bindingKey="TICKER.NYSE.#"); std::cout << "Declared queue Ticker NYSE non-exclusive with amq:topic binding TICKER.NYSE.#" << std::endl; session.queueDeclare(arg::queue="TICKER.NASDAQ", arg::exclusive=false); session.exchangeBind(arg::exchange="amq.topic", arg::queue="TICKER.NASDAQ", arg::bindingKey="TICKER.NASDAQ.#"); std::cout << "Declared queue Ticker NASDAQ non-exclusive with amq:topic binding TICKER.NASDAQ.#" << std::endl; //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/tradedemo/topic_listener.cpp0000664000076400007640000001306211156273306024062 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * topic_publisher.cpp: * * This program is one of three programs designed to be used * together. These programs implement a publish-subscribe example * using the "amq.topic" exchange. In the example multiple listeners * can subscribe to the same queues for TTL messages. * The TTL messages are all ticker price data. Messages are * browsed and therefore shared among the multiple listeners. * Messages timeout using TTL so that they don't stay in the queue * for too long and fill it up. * Local exclusive LVQ are also declared for market data. * * declare_queues.cpp * * Declares several non-exclusive queues bound to the amq:topic exchange * * topic_publisher.cpp * * Sends messages to the "amq.topic" exchange, using the * multipart routing keys for ticker price and market data * Ticker messages are sent using a TTL value. * * topic_listener.cpp (this program) * * Subscribes to non-exclusive queues in NOT_ACQUIRE mode for * ticker price data and declares two LVQs for market data. * * Multiple listeners can be run at the same time. * */ #include #include #include #include #include #include "qpid/client/QueueOptions.h" #include #include using namespace qpid::client; using namespace qpid::framing; class Listener : public MessageListener { private: Session& session; SubscriptionManager subscriptions; public: Listener(Session& session); virtual void subscribeTTLQueue(std::string queue); virtual void subscribeLVQQueue(std::string queue); virtual void received(Message& message); virtual void listen(); ~Listener() { }; }; /* * Listener::Listener * * Subscribe to the queue, route it to a client destination for the * listener. (The destination name merely identifies the destination * in the listener, you can use any name as long as you use the same * name for the listener). */ Listener::Listener(Session& session) : session(session), subscriptions(session) { } void Listener::subscribeTTLQueue(std::string queue) { /* * Subscribe to the queue using the subscription manager. * The queues were declared elsewhere alog with their bindings. */ std::cout << "Subscribing to queue " << queue << std::endl; subscriptions.subscribe(*this, queue); // Will not acquire messages but instead browse them. subscriptions.setAcquireMode(message::ACQUIRE_MODE_NOT_ACQUIRED); } void Listener::subscribeLVQQueue(std::string queue) { /* * Declare and subscribe to the queue using the subscription manager. */ QueueOptions qo; qo.setOrdering(LVQ); std::string binding = queue + ".#"; queue += session.getId().getName(); session.queueDeclare(arg::queue=queue, arg::exclusive=true, arg::arguments=qo); session.exchangeBind(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=binding); std::cout << "Declared queue " << queue << " non-exclusive with amq:topic binding " << binding << std::endl; std::cout << "Subscribing to queue " << queue << std::endl; subscriptions.subscribe(*this, queue, SubscriptionSettings(FlowControl::unlimited(), ACCEPT_MODE_NONE)); } void Listener::received(Message& message) { // If you want to see the destination you can swap the following lines. // std::cout << message.getDestination() << "\t" << message.getData() << std::endl; std::cout << message.getData() << std::endl; } void Listener::listen() { // Receive messages subscriptions.run(); } int main(int argc, char** argv) { const char* host = argc>1 ? argv[1] : "127.0.0.1"; int port = argc>2 ? atoi(argv[2]) : 5672; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); //--------- Main body of program -------------------------------------------- // Create a listener for the session Listener listener(session); // Subscribe to messages on the queues we are interested in listener.subscribeTTLQueue("TICKER.NASDAQ"); listener.subscribeTTLQueue("TICKER.NYSE"); listener.subscribeLVQQueue("MRKT.NASDAQ"); listener.subscribeLVQQueue("MRKT.NYSE"); std::cout << "Starting Listener -C to exit." << std::endl; std::cout << "Listening for messages ..." << std::endl; // Give up control and receive messages listener.listen(); //----------------------------------------------------------------------------- connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; } return 1; } qpidc-0.16/examples/old_api/tradedemo/tradedemo_declare_queues.vcproj0000664000076400007640000002531711334317457026604 0ustar00jrossjross00000000000000 qpidc-0.16/examples/old_api/tradedemo/topic_publisher.cpp0000664000076400007640000002012411156273306024227 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** * topic_publisher.cpp: * * This program is one of three programs designed to be used * together. These programs implement a publish-subscribe example * using the "amq.topic" exchange. In the example multiple listeners * can subscribe to the same queues for TTL messages. * The TTL messages are all ticker price data. Messages are * browsed and therefore shared among the multiple listeners. * Messages timeout using TTL so that they don't stay in the queue * for too long and fill it up. * Local exclusive LVQ are also declared for market data. * * declare_queues.cpp * * Declares several non-exclusive queues bound to the amq:topic exchange * * topic_publisher.cpp * * Sends messages to the "amq.topic" exchange, using the * multipart routing keys for ticker price and market data * Ticker messages are sent using a TTL value. * * topic_listener.cpp (this program) * * Subscribes to non-exclusive queues in NOT_ACQUIRE mode for * ticker price data and declares two LVQs for market data. * * Multiple listeners can be run at the same time. * */ #include #include #include #include #include "qpid/client/QueueOptions.h" #include #include #include #include #include using namespace qpid::client; using namespace qpid::framing; using std::stringstream; using std::string; class Publisher { private: Session& session; int ttl_time; unsigned long seq; unsigned short high_[6]; unsigned short low_[6]; unsigned long shares_[6]; unsigned long volume_[6]; QueueOptions args; public: Publisher( Session& session, const int ttl_time, const unsigned long shares[6]); virtual void publish_ticker(const std::string queue, unsigned short& curr_price); virtual void publish_market(const std::string queue, unsigned short& curr_price, int i); virtual ~Publisher() { }; }; Publisher::Publisher(Session& session, int ttl_time, const unsigned long shares[6]) : session(session), ttl_time(ttl_time), seq(0) { for (unsigned short i=0; i < 6; i++) { high_[i] = 0; low_[i] = 9999; volume_[i] = 0; shares_[i] = shares[i]; } } void Publisher::publish_ticker(const std::string symbol, unsigned short& curr_price) { Message message; // Set the routing key once, we'll use the same routing key for all // messages. std::string routing_key = "TICKER." + symbol; std::cout << "Setting routing key:" << routing_key << std::endl; message.getDeliveryProperties().setRoutingKey(routing_key); // Randomally generate some price flucuations bool mvmnt; unsigned short change = rand() % 3; if (rand() % 2 == 0) { mvmnt = true; curr_price += change; } else { mvmnt = false; curr_price = (curr_price - change)>0 ? (curr_price - change) : 0; } // Was there change in price or no change ? std::string movement; if (!change) { movement = "] [--]"; } else { movement = (mvmnt ? "] [UP]" : "] [DOWN]"); } stringstream ticker_data; // Build up the ticker info ticker_data << "[TICKER] " << "Symbol:" << symbol << " \tPrice[" << curr_price << "] \t[" << change << movement; message.setData(ticker_data.str()); // Set TTL value so that message will timeout after a period and be purged from queues message.getDeliveryProperties().setTtl(ttl_time); // Asynchronous transfer sends messages as quickly as // possible without waiting for confirmation. async(session).messageTransfer(arg::content=message, arg::destination="amq.topic"); } void Publisher::publish_market(const std::string symbol, unsigned short& curr_price, int i) { Message message; // Set the routing key std::string routing_key = "MRKT." + symbol; std::cout << "Setting routing key:" << routing_key << std::endl; message.getDeliveryProperties().setRoutingKey(routing_key); // Calculate the market data low/hi change, vol, market cap etc. if (curr_price < low_[i] || low_[i] == 0) { low_[i] = curr_price; } else if (curr_price > high_[i] || high_[i] == 9999) { high_[i] = curr_price; } volume_[i] += rand() % 1000; // increase the daily volume tracker int mkt_cap = shares_[i] * curr_price; // calculate new market cap based on current price stringstream market_data; // Build up the ticker info market_data << "[MARKET] " << "Symbol:" << symbol << "\tVolume: " << volume_[i] << "\tHi:" << high_[i] << "\tLo:" << low_[i] << "\tMktCap:" << mkt_cap <<"M\tSEQ[" << seq << "]"; message.setData(market_data.str()); std::string key; args.getLVQKey(key); message.getHeaders().setString(key, symbol); // Asynchronous transfer sends messages as quickly as // possible without waiting for confirmation. async(session).messageTransfer(arg::content=message, arg::destination="amq.topic"); seq++; // This sequence number is really just to demonstrate the LVQ nature of the queue. // You will notice some messages don't show because they are overwritten by last value. } int main(int argc, char** argv) { unsigned int pub_cycles = argc>1 ? atoi(argv[1]) : 100; unsigned int ttl_time = argc>2 ? atoi(argv[2]) : 4000; const char* host = argc>3 ? argv[3] : "127.0.0.1"; int port = argc>4 ? atoi(argv[4]) : 5672; std::cout <<"Usage: topic_publisher " << std::endl; std::cout <<"\tparameters are optional but must be in this order when used." << std::endl; // Set up the stocks symbols and their prices std::string symbol[6]; unsigned short price[6]; symbol[0] = "NYSE.RHT"; // Red Hat symbol[1] = "NYSE.IBM"; // IBM Corp. symbol[2] = "NASDAQ.MSFT"; // Microsoft symbol[3] = "NASDAQ.CSCO"; // Cisco Systems symbol[4] = "NASDAQ.YHOO"; // Yahoo symbol[5] = "NASDAQ.GOOG"; // Google // Rough starting values. price[0] = rand() % 30 +1; price[1] = rand() % 120 +1; price[2] = rand() % 20 +1; price[3] = rand() % 75 +1; price[4] = rand() % 10 +1; price[5] = rand() % 323 +1; // Shares oustanding in millions. unsigned long shares[6] = {190,1340,8890, 5860, 1390, 314}; Connection connection; try { connection.open(host, port); Session session = connection.newSession(); Publisher theFeed(session,ttl_time, shares); //--------- Main body of program -------------------------------------------- // Print the opening values for each symbol std::cout << std::endl << "Opening values:" << std::endl; for (int i=0; i < 6; i++) { std::cout << symbol[i] << ":" << price[i] << std::endl; } // For the duration of the publishing cycles publish // ticker and market data for each symbol for (unsigned int j=0; j qpidc-0.16/examples/old_api/tradedemo/tradedemo_topic_listener.vcproj0000664000076400007640000002531711334317457026641 0ustar00jrossjross00000000000000 qpidc-0.16/examples/Makefile.in0000664000076400007640000005162611752725661017045 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = examples DIST_COMMON = $(dist_examples_DATA) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(dist_examples_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ # For older versions of automake abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # SUBDIRS = qmf-console messaging old_api MAKEDIST = .libs/Makefile examplesdir = $(pkgdatadir)/examples dist_examples_DATA = README.txt $(MAKEDIST) EXTRA_DIST = examples.sln CMakeLists.txt 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_examplesDATA: $(dist_examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-dist_examplesDATA: @$(NORMAL_UNINSTALL) @list='$(dist_examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files # 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): @fail= 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; \ ($(am__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" $(RECURSIVE_CLEAN_TARGETS): @fail= 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dist_examplesDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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-dist_examplesDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive 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-dist_examplesDATA install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-dist_examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo 'all clean:' ; \ echo ' for d in $(SUBDIRS) ; do $$(MAKE) -C $$$$d $$@ ; done' ; \ ) > $(MAKEDIST) # 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: qpidc-0.16/examples/Makefile.am0000664000076400007640000000231711533216634017015 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # SUBDIRS = qmf-console messaging old_api MAKEDIST=.libs/Makefile $(MAKEDIST): Makefile mkdir -p .libs @(echo 'all clean:' ; \ echo ' for d in $(SUBDIRS) ; do $$(MAKE) -C $$$$d $$@ ; done' ; \ ) > $(MAKEDIST) examplesdir=$(pkgdatadir)/examples dist_examples_DATA = README.txt $(MAKEDIST) EXTRA_DIST = examples.sln CMakeLists.txt # For older versions of automake abs_top_srcdir = @abs_top_srcdir@ abs_top_builddir = @abs_top_builddir@ qpidc-0.16/examples/messaging/0000775000076400007640000000000011752725720016737 5ustar00jrossjross00000000000000qpidc-0.16/examples/messaging/client.cpp0000664000076400007640000000467211443763356020736 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include using namespace qpid::messaging; using std::stringstream; using std::string; int main(int argc, char** argv) { const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672"; std::string connectionOptions = argc > 2 ? argv[2] : ""; Connection connection(url, connectionOptions); try { connection.open(); Session session = connection.createSession(); Sender sender = session.createSender("service_queue"); //create temp queue & receiver... Address responseQueue("#response-queue; {create:always, delete:always}"); Receiver receiver = session.createReceiver(responseQueue); // Now send some messages ... string s[] = { "Twas brillig, and the slithy toves", "Did gire and gymble in the wabe.", "All mimsy were the borogroves,", "And the mome raths outgrabe." }; Message request; request.setReplyTo(responseQueue); for (int i=0; i<4; i++) { request.setContent(s[i]); sender.send(request); Message response = receiver.fetch(); std::cout << request.getContent() << " -> " << response.getContent() << std::endl; } connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; connection.close(); } return 1; } qpidc-0.16/examples/messaging/Makefile.in0000664000076400007640000005551411752725661021022 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = drain$(EXEEXT) spout$(EXEEXT) client$(EXEEXT) \ server$(EXEEXT) map_sender$(EXEEXT) map_receiver$(EXEEXT) \ hello_world$(EXEEXT) hello_xml$(EXEEXT) subdir = examples/messaging DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_client_OBJECTS = client.$(OBJEXT) client_OBJECTS = $(am_client_OBJECTS) client_DEPENDENCIES = $(CLIENT_LIB) am_drain_OBJECTS = drain.$(OBJEXT) OptionParser.$(OBJEXT) drain_OBJECTS = $(am_drain_OBJECTS) drain_DEPENDENCIES = $(CLIENT_LIB) am_hello_world_OBJECTS = hello_world.$(OBJEXT) hello_world_OBJECTS = $(am_hello_world_OBJECTS) hello_world_DEPENDENCIES = $(CLIENT_LIB) am_hello_xml_OBJECTS = hello_xml.$(OBJEXT) hello_xml_OBJECTS = $(am_hello_xml_OBJECTS) hello_xml_DEPENDENCIES = $(CLIENT_LIB) am_map_receiver_OBJECTS = map_receiver.$(OBJEXT) map_receiver_OBJECTS = $(am_map_receiver_OBJECTS) map_receiver_DEPENDENCIES = $(CLIENT_LIB) am_map_sender_OBJECTS = map_sender.$(OBJEXT) map_sender_OBJECTS = $(am_map_sender_OBJECTS) map_sender_DEPENDENCIES = $(CLIENT_LIB) am_server_OBJECTS = server.$(OBJEXT) server_OBJECTS = $(am_server_OBJECTS) server_DEPENDENCIES = $(CLIENT_LIB) am_spout_OBJECTS = spout.$(OBJEXT) OptionParser.$(OBJEXT) spout_OBJECTS = $(am_spout_OBJECTS) spout_DEPENDENCIES = $(CLIENT_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --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 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(client_SOURCES) $(drain_SOURCES) $(hello_world_SOURCES) \ $(hello_xml_SOURCES) $(map_receiver_SOURCES) \ $(map_sender_SOURCES) $(server_SOURCES) $(spout_SOURCES) DIST_SOURCES = $(client_SOURCES) $(drain_SOURCES) \ $(hello_world_SOURCES) $(hello_xml_SOURCES) \ $(map_receiver_SOURCES) $(map_sender_SOURCES) \ $(server_SOURCES) $(spout_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir = $(pkgdatadir)/examples/messaging # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB = $(top_builddir)/src/libqpidmessaging.la CLIENTFLAGS = -lqpidmessaging hello_world_SOURCES = hello_world.cpp hello_world_LDADD = $(CLIENT_LIB) hello_xml_SOURCES = hello_xml.cpp hello_xml_LDADD = $(CLIENT_LIB) drain_SOURCES = drain.cpp OptionParser.h OptionParser.cpp drain_LDADD = $(CLIENT_LIB) spout_SOURCES = spout.cpp OptionParser.h OptionParser.cpp spout_LDADD = $(CLIENT_LIB) client_SOURCES = client.cpp client_LDADD = $(CLIENT_LIB) server_SOURCES = server.cpp server_LDADD = $(CLIENT_LIB) map_sender_SOURCES = map_sender.cpp map_sender_LDADD = $(CLIENT_LIB) map_receiver_SOURCES = map_receiver.cpp map_receiver_LDADD = $(CLIENT_LIB) examples_DATA = \ hello_world.cpp \ hello_xml.cpp \ drain.cpp \ spout.cpp \ OptionParser.cpp \ OptionParser.h \ client.cpp \ server.cpp \ map_sender.cpp \ map_receiver.cpp \ extra_dist/Makefile EXTRA_DIST = \ $(examples_DATA) \ CMakeLists.txt \ messaging_client.vcproj \ messaging_drain.vcproj \ messaging_map_receiver.vcproj \ messaging_map_sender.vcproj \ messaging_server.vcproj \ messaging_spout.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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/messaging/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/messaging/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list client$(EXEEXT): $(client_OBJECTS) $(client_DEPENDENCIES) @rm -f client$(EXEEXT) $(CXXLINK) $(client_OBJECTS) $(client_LDADD) $(LIBS) drain$(EXEEXT): $(drain_OBJECTS) $(drain_DEPENDENCIES) @rm -f drain$(EXEEXT) $(CXXLINK) $(drain_OBJECTS) $(drain_LDADD) $(LIBS) hello_world$(EXEEXT): $(hello_world_OBJECTS) $(hello_world_DEPENDENCIES) @rm -f hello_world$(EXEEXT) $(CXXLINK) $(hello_world_OBJECTS) $(hello_world_LDADD) $(LIBS) hello_xml$(EXEEXT): $(hello_xml_OBJECTS) $(hello_xml_DEPENDENCIES) @rm -f hello_xml$(EXEEXT) $(CXXLINK) $(hello_xml_OBJECTS) $(hello_xml_LDADD) $(LIBS) map_receiver$(EXEEXT): $(map_receiver_OBJECTS) $(map_receiver_DEPENDENCIES) @rm -f map_receiver$(EXEEXT) $(CXXLINK) $(map_receiver_OBJECTS) $(map_receiver_LDADD) $(LIBS) map_sender$(EXEEXT): $(map_sender_OBJECTS) $(map_sender_DEPENDENCIES) @rm -f map_sender$(EXEEXT) $(CXXLINK) $(map_sender_OBJECTS) $(map_sender_LDADD) $(LIBS) server$(EXEEXT): $(server_OBJECTS) $(server_DEPENDENCIES) @rm -f server$(EXEEXT) $(CXXLINK) $(server_OBJECTS) $(server_LDADD) $(LIBS) spout$(EXEEXT): $(spout_OBJECTS) $(spout_DEPENDENCIES) @rm -f spout$(EXEEXT) $(CXXLINK) $(spout_OBJECTS) $(spout_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OptionParser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hello_world.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hello_xml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_receiver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/map_sender.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spout.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-examplesDATA # 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: qpidc-0.16/examples/messaging/Makefile.am0000664000076400007640000000430711373307026020771 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir=$(pkgdatadir)/examples/messaging # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB=$(top_builddir)/src/libqpidmessaging.la CLIENTFLAGS=-lqpidmessaging noinst_PROGRAMS=drain spout client server map_sender map_receiver hello_world hello_xml hello_world_SOURCES=hello_world.cpp hello_world_LDADD=$(CLIENT_LIB) hello_xml_SOURCES=hello_xml.cpp hello_xml_LDADD=$(CLIENT_LIB) drain_SOURCES=drain.cpp OptionParser.h OptionParser.cpp drain_LDADD=$(CLIENT_LIB) spout_SOURCES=spout.cpp OptionParser.h OptionParser.cpp spout_LDADD=$(CLIENT_LIB) client_SOURCES=client.cpp client_LDADD=$(CLIENT_LIB) server_SOURCES=server.cpp server_LDADD=$(CLIENT_LIB) map_sender_SOURCES=map_sender.cpp map_sender_LDADD=$(CLIENT_LIB) map_receiver_SOURCES=map_receiver.cpp map_receiver_LDADD=$(CLIENT_LIB) examples_DATA= \ hello_world.cpp \ hello_xml.cpp \ drain.cpp \ spout.cpp \ OptionParser.cpp \ OptionParser.h \ client.cpp \ server.cpp \ map_sender.cpp \ map_receiver.cpp \ extra_dist/Makefile EXTRA_DIST= \ $(examples_DATA) \ CMakeLists.txt \ messaging_client.vcproj \ messaging_drain.vcproj \ messaging_map_receiver.vcproj \ messaging_map_sender.vcproj \ messaging_server.vcproj \ messaging_spout.vcproj qpidc-0.16/examples/messaging/messaging_client.vcproj0000664000076400007640000002654011454623236023504 0ustar00jrossjross00000000000000 qpidc-0.16/examples/messaging/messaging_drain.vcproj0000664000076400007640000002144311454623236023320 0ustar00jrossjross00000000000000 qpidc-0.16/examples/messaging/map_receiver.cpp0000664000076400007640000000363411443763356022116 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include using namespace qpid::messaging; using namespace qpid::types; using std::stringstream; using std::string; int main(int argc, char** argv) { const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672"; const char* address = argc>2 ? argv[2] : "message_queue; {create: always}"; std::string connectionOptions = argc > 3 ? argv[3] : ""; Connection connection(url, connectionOptions); try { connection.open(); Session session = connection.createSession(); Receiver receiver = session.createReceiver(address); Variant::Map content; decode(receiver.fetch(), content); std::cout << content << std::endl; session.acknowledge(); receiver.close(); connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; connection.close(); } return 1; } qpidc-0.16/examples/messaging/hello_xml.cpp0000664000076400007640000000530111471524442021421 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include using std::stringstream; using namespace qpid::messaging; int main(int argc, char** argv) { std::string broker = argc > 1 ? argv[1] : "localhost:5672"; std::string connectionOptions = argc > 2 ? argv[2] : ""; std::string query = "let $w := ./weather " "return $w/station = 'Raleigh-Durham International Airport (KRDU)' " " and $w/temperature_f > 50" " and $w/temperature_f - $w/dewpoint > 5" " and $w/wind_speed_mph > 7" " and $w/wind_speed_mph < 20"; stringstream address; address << "xml-exchange; {" " create: always, " // This line and the next are not in docs " node: { type: topic, x-declare: { type: xml } }, " // Added so it works "out of the box" " link: { " " x-bindings: [{ exchange: xml-exchange, key: weather, arguments: { xquery:\"" << query << "\"} }] " " } " "}"; Connection connection(broker, connectionOptions); try { connection.open(); Session session = connection.createSession(); Receiver receiver = session.createReceiver(address.str()); Message message; message.setContent( "" "Raleigh-Durham International Airport (KRDU)" "16" "70" "35" ""); Sender sender = session.createSender("xml-exchange/weather"); sender.send(message); Message response = receiver.fetch(); std::cout << response.getContent() << std::endl; connection.close(); return 0; } catch(const std::exception& error) { std::cerr << error.what() << std::endl; connection.close(); return 1; } } qpidc-0.16/examples/messaging/extra_dist/0000775000076400007640000000000011752725720021105 5ustar00jrossjross00000000000000qpidc-0.16/examples/messaging/extra_dist/Makefile0000664000076400007640000000203011461772231022534 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # CXX=g++ CXXFLAGS=-g -O2 LDFLAGS=-lqpidmessaging all: drain spout client server map_sender map_receiver hello_world drain: drain.o OptionParser.o spout: spout.o OptionParser.o clean: rm -f drain spout client server map_sender map_receiver hello_world *.o qpidc-0.16/examples/messaging/OptionParser.cpp0000664000076400007640000001642011406135602022061 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "OptionParser.h" #include #include #include #include #include #include class Option { public: Option(const std::string& name, const std::string& description); virtual ~Option() {} virtual void setValue(const std::string&) = 0; virtual bool isValueExpected() = 0; bool match(const std::string&); std::ostream& print(std::ostream& out); private: std::string longName; std::string shortName; std::string description; std::ostream& printNames(std::ostream& out); friend class OptionParser; }; class StringOption : public Option { public: StringOption(const std::string& name, const std::string& description, std::string& v) : Option(name, description), value(v) {} void setValue(const std::string& v) { value = v; } bool isValueExpected() { return true; } private: std::string& value; }; class IntegerOption : public Option { public: IntegerOption(const std::string& name, const std::string& description, int& v) : Option(name, description), value(v) {} void setValue(const std::string& v) { value = atoi(v.c_str()); } bool isValueExpected() { return true; } private: int& value; }; class BooleanOption : public Option { public: BooleanOption(const std::string& name, const std::string& description, bool& v) : Option(name, description), value(v) {} void setValue(const std::string&) { value = true; } bool isValueExpected() { return false; } private: bool& value; }; class MultiStringOption : public Option { public: MultiStringOption(const std::string& name, const std::string& description, std::vector& v) : Option(name, description), value(v) {} void setValue(const std::string& v) { value.push_back(v); } bool isValueExpected() { return true; } private: std::vector& value; }; class OptionMatch { public: OptionMatch(const std::string& argument); bool operator()(Option* option); bool isOption(); private: std::string name; }; class OptionsError : public qpid::types::Exception { public: OptionsError(const std::string& message) : qpid::types::Exception(message) {} }; Option::Option(const std::string& name, const std::string& desc) : description(desc) { std::string::size_type i = name.find(","); if (i != std::string::npos) { longName = name.substr(0, i); if (i + 1 < name.size()) shortName = name.substr(i+1); } else { longName = name; } } bool Option::match(const std::string& name) { return name == longName || name == shortName; } std::ostream& Option::printNames(std::ostream& out) { if (shortName.size()) { out << "-" << shortName; if (isValueExpected()) out << " VALUE"; out << ", --" << longName; if (isValueExpected()) out << " VALUE"; } else { out << "--" << longName; if (isValueExpected()) out << " VALUE"; } return out; } std::ostream& Option::print(std::ostream& out) { std::stringstream names; printNames(names); out << std::setw(30) << std::left << names.str() << description << std::endl; return out; } std::vector& OptionParser::getArguments() { return arguments; } void OptionParser::add(Option* option) { options.push_back(option); } void OptionParser::add(const std::string& name, std::string& value, const std::string& description) { add(new StringOption(name, description, value)); } void OptionParser::add(const std::string& name, int& value, const std::string& description) { add(new IntegerOption(name, description, value)); } void OptionParser::add(const std::string& name, bool& value, const std::string& description) { add(new BooleanOption(name, description, value)); } void OptionParser::add(const std::string& name, std::vector& value, const std::string& description) { add(new MultiStringOption(name, description, value)); } OptionMatch::OptionMatch(const std::string& argument) { if (argument.find("--") == 0) { name = argument.substr(2); } else if (argument.find("-") == 0) { name = argument.substr(1); } } bool OptionMatch::operator()(Option* option) { return option->match(name); } bool OptionMatch::isOption() { return name.size() > 0; } OptionParser::OptionParser(const std::string& s, const std::string& d) : summary(s), description(d), help(false) { add("help,h", help, "show this message"); } Option* OptionParser::getOption(const std::string& argument) { OptionMatch match(argument); if (match.isOption()) { Options::iterator i = std::find_if(options.begin(), options.end(), match); if (i == options.end()) { std::stringstream error; error << "Unrecognised option: " << argument; throw OptionsError(error.str()); } else { return *i; } } else { return 0; } } void OptionParser::error(const std::string& message) { std::cout << summary << std::endl << std::endl; std::cerr << "Error: " << message << "; try --help for more information" << std::endl; } bool OptionParser::parse(int argc, char** argv) { try { for (int i = 1; i < argc; ++i) { std::string argument = argv[i]; Option* o = getOption(argument); if (o) { if (o->isValueExpected()) { if (i + 1 < argc) { o->setValue(argv[++i]); } else { std::stringstream error; error << "Value expected for option " << o->longName; throw OptionsError(error.str()); } } else { o->setValue(""); } } else { arguments.push_back(argument); } } if (help) { std::cout << summary << std::endl << std::endl; std::cout << description << std::endl << std::endl; std::cout << "Options: " << std::endl; for (Options::iterator i = options.begin(); i != options.end(); ++i) { (*i)->print(std::cout); } return false; } else { return true; } } catch (const std::exception& e) { error(e.what()); return false; } } OptionParser::~OptionParser() { for (Options::iterator i = options.begin(); i != options.end(); ++i) { delete *i; } } qpidc-0.16/examples/messaging/messaging_map_sender.vcproj0000664000076400007640000002660411454623236024344 0ustar00jrossjross00000000000000 qpidc-0.16/examples/messaging/spout.cpp0000664000076400007640000001306011565433200020604 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include #include "OptionParser.h" using namespace qpid::messaging; using namespace qpid::types; typedef std::vector string_vector; struct Options : OptionParser { std::string url; std::string address; int timeout; int count; std::string id; std::string replyto; string_vector properties; string_vector entries; std::string content; std::string connectionOptions; Options() : OptionParser("Usage: spout [OPTIONS] ADDRESS", "Send messages to the specified address"), url("127.0.0.1"), timeout(0), count(1) { add("broker,b", url, "url of broker to connect to"); add("timeout,t", timeout, "exit after the specified time"); add("count,c", count, "stop after count messages have been sent, zero disables"); add("id,i", id, "use the supplied id instead of generating one"); add("reply-to", replyto, "specify reply-to address"); add("property,P", properties, "specify message property"); add("map,M", entries, "specify entry for map content"); add("content", content, "specify textual content"); add("connection-options", connectionOptions, "connection options string in the form {name1:value1, name2:value2}"); } static bool nameval(const std::string& in, std::string& name, std::string& value) { std::string::size_type i = in.find("="); if (i == std::string::npos) { name = in; return false; } else { name = in.substr(0, i); if (i+1 < in.size()) { value = in.substr(i+1); return true; } else { return false; } } } static void setProperty(Message& message, const std::string& property) { std::string name; std::string value; if (nameval(property, name, value)) { message.getProperties()[name] = value; } else { message.getProperties()[name] = Variant(); } } void setProperties(Message& message) const { for (string_vector::const_iterator i = properties.begin(); i != properties.end(); ++i) { setProperty(message, *i); } } void setEntries(Variant::Map& content) const { for (string_vector::const_iterator i = entries.begin(); i != entries.end(); ++i) { std::string name; std::string value; if (nameval(*i, name, value)) { content[name] = value; } else { content[name] = Variant(); } } } bool checkAddress() { if (getArguments().empty()) { error("Address is required"); return false; } else { address = getArguments()[0]; return true; } } }; int main(int argc, char** argv) { Options options; if (options.parse(argc, argv) && options.checkAddress()) { Connection connection(options.url, options.connectionOptions); try { connection.open(); Session session = connection.createSession(); Sender sender = session.createSender(options.address); Message message; options.setProperties(message); if (options.entries.size()) { Variant::Map content; options.setEntries(content); encode(content, message); } else if (options.content.size()) { message.setContent(options.content); message.setContentType("text/plain"); } std::time_t start = std::time(0); for (int count = 0; (count < options.count || options.count == 0) && (options.timeout == 0 || std::difftime(std::time(0), start) < options.timeout); count++) { if (!options.replyto.empty()) message.setReplyTo(Address(options.replyto)); std::string id = options.id.empty() ? Uuid(true).str() : options.id; std::stringstream spoutid; spoutid << id << ":" << count; message.getProperties()["spout-id"] = spoutid.str(); sender.send(message); } session.sync(); connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; connection.close(); } } return 1; } qpidc-0.16/examples/messaging/messaging_map_receiver.vcproj0000664000076400007640000002662611454623236024674 0ustar00jrossjross00000000000000 qpidc-0.16/examples/messaging/OptionParser.h0000664000076400007640000000357611370251725021543 0ustar00jrossjross00000000000000#ifndef OPTIONPARSER_H #define OPTIONPARSER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include class Option; class OptionParser { public: OptionParser(const std::string& usage, const std::string& description); ~OptionParser(); void add(const std::string& name, std::string& value, const std::string& description = std::string()); void add(const std::string& name, int& value, const std::string& description = std::string()); void add(const std::string& name, bool& value, const std::string& description = std::string()); void add(const std::string& name, std::vector& value, const std::string& description = std::string()); bool parse(int argc, char** argv); void error(const std::string& message); std::vector& getArguments(); private: typedef std::vector Options; const std::string summary; const std::string description; bool help; Options options; std::vector arguments; void add(Option*); Option* getOption(const std::string& argument); }; #endif /*!OPTIONPARSER_H*/ qpidc-0.16/examples/messaging/map_sender.cpp0000664000076400007640000000430111443763356021562 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include using namespace qpid::messaging; using namespace qpid::types; using std::stringstream; using std::string; int main(int argc, char** argv) { const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672"; const char* address = argc>2 ? argv[2] : "message_queue; {create: always}"; std::string connectionOptions = argc > 3 ? argv[3] : ""; Connection connection(url, connectionOptions); try { connection.open(); Session session = connection.createSession(); Sender sender = session.createSender(address); Message message; Variant::Map content; content["id"] = 987654321; content["name"] = "Widget"; content["percent"] = 0.99; Variant::List colours; colours.push_back(Variant("red")); colours.push_back(Variant("green")); colours.push_back(Variant("white")); content["colours"] = colours; content["uuid"] = Uuid(true); encode(content, message); sender.send(message, true); connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; connection.close(); } return 1; } qpidc-0.16/examples/messaging/messaging_spout.vcproj0000664000076400007640000002145211454623236023375 0ustar00jrossjross00000000000000 qpidc-0.16/examples/messaging/CMakeLists.txt0000664000076400007640000000516011462552034021473 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # drain and spout have explicit Boost.program_options usage in them, so be # sure that lib is linked in. macro(add_messaging_example example) add_executable(${example} ${example}.cpp OptionParser.cpp) set_target_properties(${example} PROPERTIES OUTPUT_NAME ${example}) target_link_libraries(${example} qpidmessaging ${_boost_libs_needed}) # For installs, don't install the built example; that would be pointless. # Install the things a user needs to build the example on-site. install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${example}.cpp ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.h ${CMAKE_CURRENT_SOURCE_DIR}/OptionParser.cpp DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging COMPONENT ${QPID_COMPONENT_EXAMPLES}) if (MSVC) install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/messaging_${example}.vcproj DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging COMPONENT ${QPID_COMPONENT_EXAMPLES}) endif (MSVC) endmacro(add_messaging_example) add_messaging_example(drain) add_messaging_example(spout) add_messaging_example(map_receiver) add_messaging_example(map_sender) add_messaging_example(client) add_messaging_example(server) # These don't need Boost or OptionParser add_executable(hello_world hello_world.cpp) set_target_properties(hello_world PROPERTIES OUTPUT_NAME hello_world) target_link_libraries(hello_world qpidmessaging) install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/hello_world.cpp DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging COMPONENT ${QPID_COMPONENT_EXAMPLES}) add_executable(hello_xml hello_xml.cpp) set_target_properties(hello_xml PROPERTIES OUTPUT_NAME hello_xml) target_link_libraries(hello_xml qpidmessaging) install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/hello_xml.cpp DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/messaging COMPONENT ${QPID_COMPONENT_EXAMPLES}) qpidc-0.16/examples/messaging/hello_world.cpp0000664000076400007640000000363011461772231021753 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include using namespace qpid::messaging; int main(int argc, char** argv) { std::string broker = argc > 1 ? argv[1] : "localhost:5672"; std::string address = argc > 2 ? argv[2] : "amq.topic"; std::string connectionOptions = argc > 3 ? argv[3] : ""; Connection connection(broker, connectionOptions); try { connection.open(); Session session = connection.createSession(); Receiver receiver = session.createReceiver(address); Sender sender = session.createSender(address); sender.send(Message("Hello world!")); Message message = receiver.fetch(Duration::SECOND * 1); std::cout << message.getContent() << std::endl; session.acknowledge(); connection.close(); return 0; } catch(const std::exception& error) { std::cerr << error.what() << std::endl; connection.close(); return 1; } } qpidc-0.16/examples/messaging/drain.cpp0000664000076400007640000000722111625214001020522 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include "OptionParser.h" using namespace qpid::messaging; using namespace qpid::types; struct Options : OptionParser { std::string url; std::string address; std::string connectionOptions; int timeout; bool forever; int count; Options() : OptionParser("Usage: drain [OPTIONS] ADDRESS", "Drains messages from the specified address"), url("127.0.0.1"), timeout(0), forever(false), count(0) { add("broker,b", url, "url of broker to connect to"); add("timeout,t", timeout, "timeout in seconds to wait before exiting"); add("forever,f", forever, "ignore timeout and wait forever"); add("connection-options", connectionOptions, "connection options string in the form {name1:value1, name2:value2}"); add("count,c", count, "number of messages to read before exiting"); } Duration getTimeout() { if (forever) return Duration::FOREVER; else return timeout*Duration::SECOND; } int getCount() { return count; } bool checkAddress() { if (getArguments().empty()) { error("Address is required"); return false; } else { address = getArguments()[0]; return true; } } }; int main(int argc, char** argv) { Options options; if (options.parse(argc, argv) && options.checkAddress()) { Connection connection(options.url, options.connectionOptions); try { connection.open(); Session session = connection.createSession(); Receiver receiver = session.createReceiver(options.address); Duration timeout = options.getTimeout(); int count = options.getCount(); Message message; int i = 0; while (receiver.fetch(message, timeout)) { std::cout << "Message(properties=" << message.getProperties() << ", content='" ; if (message.getContentType() == "amqp/map") { Variant::Map map; decode(message, map); std::cout << map; } else { std::cout << message.getContent(); } std::cout << "')" << std::endl; session.acknowledge(); if (count && (++i == count)) break; } receiver.close(); session.close(); connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; connection.close(); } } return 1; } qpidc-0.16/examples/messaging/messaging_server.vcproj0000664000076400007640000002654011454623236023534 0ustar00jrossjross00000000000000 qpidc-0.16/examples/messaging/server.cpp0000664000076400007640000000515211531764201020744 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include #include #include #include #include #include #include using namespace qpid::messaging; using std::stringstream; using std::string; int main(int argc, char** argv) { const char* url = argc>1 ? argv[1] : "amqp:tcp:127.0.0.1:5672"; std::string connectionOptions = argc > 2 ? argv[2] : ""; Connection connection(url, connectionOptions); try { connection.open(); Session session = connection.createSession(); Receiver receiver = session.createReceiver("service_queue; {create: always}"); while (true) { Message request = receiver.fetch(); const Address& address = request.getReplyTo(); if (address) { Sender sender = session.createSender(address); std::string s = request.getContent(); std::transform(s.begin(), s.end(), s.begin(), toupper); Message response(s); sender.send(response); std::cout << "Processed request: " << request.getContent() << " -> " << response.getContent() << std::endl; session.acknowledge(); } else { std::cerr << "Error: no reply address specified for request: " << request.getContent() << std::endl; session.reject(request); } } connection.close(); return 0; } catch(const std::exception& error) { std::cout << error.what() << std::endl; connection.close(); } return 1; } qpidc-0.16/examples/README.txt0000664000076400007640000001637111471523634016466 0ustar00jrossjross00000000000000= Qpid C++ Examples = This directory contains example C++ programs for Apache Qpid. They are based on the 0-10 version of the AMQP specification (see www.amqp.org for details). A short description of each example follows. = Messaging API Examples = Qpid now uses a new, simpler API called the Messaging API. The examples that use this API are in the cpp/examples/messaging directory. If you are new to Qpid, we encourage you to start with these examples. == hello_world.cpp == hello_world.cpp is a simple example that creates a Sender and a Receiver for the same address, sends a message to the address, reads it, and prints it: $ ./hello_world Hello world! By default, this program connects to a broker running on localhost:5672. You can specify a host and port explicitly on the command line: $ ./hello_world localhost:5673 == drain.cpp, spout.cpp == drain and spout provide many features for sending or receiving messages. Use --help to see all available options. To learn how to specify various kinds of addresses using these programs, read the chapter on Addresses here: http://qpid.apache.org/books/0.7/Programming-In-Apache-Qpid/html/ If you do not have qpid-config installed, you can create queues explicitly as part of an address. For instance, to create a queue named 'hello-world' and send a message to it, you can use spout as follows: $ ./spout "hello-world ; { create: always }" Now you can read the message from this queue using drain: $ ./drain hello-world Message(properties={spout-id:c877e622-d57b-4df2-bf3e-6014c68da0ea:0}, content='') == map_sender.cpp, map_receiver.cpp == These examples show how to send and receive typed data. Send the data with map_sender, then receive it with map_receiver: $ ./map_sender $ ./map_receiver {colours:[red, green, white], id:987654321, name:Widget, percent:0.98999999999999999, uuid:34935b4a-fd55-4212-9c41-e5baebc6e7a5} == hello-xml.cpp == This example shows how to route XML messages with an XQuery using an XML Exchange. $ ./hello_xml Raleigh-Durham International Airport (KRDU)167035 = Examples that use the Legacy API = The following examples use an older API that is now deprecated. If you are new to Qpid, we encourage you to use the Messaging API instead. These examples may not be part of future distributions. Please note that by default these examples attempt to connect to a Qpid broker running on the local host (127.0.0.1) at the standard AMQP port (5672). It is possible to instruct the examples to connect to an alternate broker host and port by specifying the host name/address and port number as arguments to the programs. For example, to have the declare_queues program connect to a broker running on host1, port 9999, run the following command: On Linux: # ./declare_queues host1 9999 On Windows: C:\Program Files\qpidc-0.7\examples\direct> declare_queues host1 9999 The qpid C++ broker executable is named qpidd on Linux and qpidd.exe on Windows. The default install locations are: - Linux: /usr/sbin - Windows: C:\Program Files\qpidc-0.7\bin In a C++ source distribution the broker is located in the src subdirectory (generally, from this examples directory, ../src). == Direct == This example shows how to create Point-to-Point applications using Qpid. This example contains three components. 1. declare_queues This will bind a queue to the amq.direct exchange, so that the messages sent to the amq.direct exchange with a given routing key (routing_key) are delivered to a specific queue (message_queue). 2. direct_producer Publishes messages to the amq.direct exchange using the given routing key (routing_key) discussed above. 3. listener Uses a message listener to listen for messages from a specific queue (message_queue) as discussed above. In order to run this example, On Linux: # ./declare_queues # ./direct_producer # ./listener On Windows: C:\Program Files\qpidc-0.7\examples\direct> declare_queues C:\Program Files\qpidc-0.7\examples\direct> direct_producer C:\Program Files\qpidc-0.7\examples\direct> listener Note that there is no requirement for the listener to be running before the messages are published. The messages are stored in the queue until consumed by the listener. == Fanout == This example shows how to create Fanout exchange applications using Qpid. This example has two components. Unlike the Direct example, the Fanout exchange does not need a routing key to be specified. 1. fanout_producer Publishes a message to the amq.fanout exchange, without using a routing key. 2. listener Uses a message listener to listen for messages from the amq.fanout exchange. Note that unlike the Direct example, it is necessary to start the listener before the messages are published. The fanout exchange does not hold messages in a queue. Therefore, it is recommended that the two parts of the example be run in separate windows. In order to run this example: On Linux: # ./listener # ./fanout_producer On Windows: C:\Program Files\qpidc-0.7\examples\fanout> listener C:\Program Files\qpidc-0.7\examples\direct> fanout_producer == Publisher/Subscriber == This example demonstrates the ability to create topic Publishers and Subscribers using Qpid. This example has two components. 1. topic_publisher This application is used to publish messages to the amq.topic exchange using multipart routing keys, usa.weather, europe.weather, usa.news and europe.news. 2. topic_listener This application is used to subscribe to several private queues, such as usa, europe, weather and news. In this program, each private queue created is bound to the amq.topic exchange using bindings that match the corresponding parts of the multipart routing keys. For example, subscribing to #.news will retrieve news irrespective of destination. This example also shows the use of the 'control' routing key which is used by control messages. Due to this example's design, the topic_listener must be running before starting the topic_publisher. Therefore, it is recommended that the two parts of the example be run in separate windows. In order to run this example, On Linux: # ./topic_listener # ./topic_publisher On Windows: C:\Program Files\qpidc-0.7\examples\pub-sub> topic_listener C:\Program Files\qpidc-0.7\examples\pub-sub> topic_publisher == Request/Response == This example shows a simple server that will accept strings from a client, convert them to upper case, and send them back to the client. This example has two components. 1. client This sends lines of poetry to the server. 2. server This is a simple service that will convert incoming strings to upper case and send the result to amq.direct exchange on which the client listens. It uses the request's reply_to property as the response's routing key. In order to run this example, On Linux: # ./server # ./client On Windows: C:\Program Files\qpidc-0.7\examples\request-response> server C:\Program Files\qpidc-0.7\examples\request-response> client == qmf-console == This directory contains examples which demonstrate integration with the Qpid Management Framework (QMF). Refer to the README.txt file within the directory for more information. qpidc-0.16/examples/.libs/0000775000076400007640000000000011752725720015771 5ustar00jrossjross00000000000000qpidc-0.16/examples/.libs/Makefile0000664000076400007640000000012111752725720017423 0ustar00jrossjross00000000000000all clean: for d in qmf-console messaging old_api ; do $(MAKE) -C $$d $@ ; done qpidc-0.16/examples/qmf-console/0000775000076400007640000000000011752725720017205 5ustar00jrossjross00000000000000qpidc-0.16/examples/qmf-console/Makefile.in0000664000076400007640000005413011752725662021262 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS = console$(EXEEXT) printevents$(EXEEXT) ping$(EXEEXT) \ queuestats$(EXEEXT) cluster-qmon$(EXEEXT) subdir = examples/qmf-console ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_cluster_qmon_OBJECTS = cluster-qmon.$(OBJEXT) cluster_qmon_OBJECTS = $(am_cluster_qmon_OBJECTS) cluster_qmon_DEPENDENCIES = $(CONSOLE_LIB) am_console_OBJECTS = console.$(OBJEXT) console_OBJECTS = $(am_console_OBJECTS) console_DEPENDENCIES = $(CONSOLE_LIB) am_ping_OBJECTS = ping.$(OBJEXT) ping_OBJECTS = $(am_ping_OBJECTS) ping_DEPENDENCIES = $(CONSOLE_LIB) am_printevents_OBJECTS = printevents.$(OBJEXT) printevents_OBJECTS = $(am_printevents_OBJECTS) printevents_DEPENDENCIES = $(CONSOLE_LIB) am_queuestats_OBJECTS = queuestats.$(OBJEXT) queuestats_OBJECTS = $(am_queuestats_OBJECTS) queuestats_DEPENDENCIES = $(CONSOLE_LIB) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(cluster_qmon_SOURCES) $(console_SOURCES) $(ping_SOURCES) \ $(printevents_SOURCES) $(queuestats_SOURCES) DIST_SOURCES = $(cluster_qmon_SOURCES) $(console_SOURCES) \ $(ping_SOURCES) $(printevents_SOURCES) $(queuestats_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(examplesdir)" DATA = $(examples_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ examplesdir = $(pkgdatadir)/examples/qmf-console MAKELDFLAGS = $(CONSOLEFLAGS) # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB = $(top_builddir)/src/libqpidclient.la CONSOLE_LIB = $(top_builddir)/src/libqmfconsole.la CLIENTFLAGS = -lqpidclient CONSOLEFLAGS = -lqmfconsole # Generate a simple non-automake Makefile for distribution. MAKEDIST = .libs/Makefile console_SOURCES = console.cpp console_LDADD = $(CONSOLE_LIB) printevents_SOURCES = printevents.cpp printevents_LDADD = $(CONSOLE_LIB) ping_SOURCES = ping.cpp ping_LDADD = $(CONSOLE_LIB) queuestats_SOURCES = queuestats.cpp queuestats_LDADD = $(CONSOLE_LIB) cluster_qmon_SOURCES = cluster-qmon.cpp cluster_qmon_LDADD = $(CONSOLE_LIB) examples_DATA = \ console.cpp \ printevents.cpp \ ping.cpp \ queuestats.cpp \ cluster-qmon.cpp \ $(MAKEDIST) EXTRA_DIST = \ README.txt \ CMakeLists.txt \ qmf-console_console.vcproj \ qmf-console_ping.vcproj \ qmf-console_printevents.vcproj \ qmf-console_queuestats.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/examples/makedist.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/qmf-console/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/qmf-console/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list cluster-qmon$(EXEEXT): $(cluster_qmon_OBJECTS) $(cluster_qmon_DEPENDENCIES) @rm -f cluster-qmon$(EXEEXT) $(CXXLINK) $(cluster_qmon_OBJECTS) $(cluster_qmon_LDADD) $(LIBS) console$(EXEEXT): $(console_OBJECTS) $(console_DEPENDENCIES) @rm -f console$(EXEEXT) $(CXXLINK) $(console_OBJECTS) $(console_LDADD) $(LIBS) ping$(EXEEXT): $(ping_OBJECTS) $(ping_DEPENDENCIES) @rm -f ping$(EXEEXT) $(CXXLINK) $(ping_OBJECTS) $(ping_LDADD) $(LIBS) printevents$(EXEEXT): $(printevents_OBJECTS) $(printevents_DEPENDENCIES) @rm -f printevents$(EXEEXT) $(CXXLINK) $(printevents_OBJECTS) $(printevents_LDADD) $(LIBS) queuestats$(EXEEXT): $(queuestats_OBJECTS) $(queuestats_DEPENDENCIES) @rm -f queuestats$(EXEEXT) $(CXXLINK) $(queuestats_OBJECTS) $(queuestats_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cluster-qmon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/console.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printevents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queuestats.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 install-examplesDATA: $(examples_DATA) @$(NORMAL_INSTALL) test -z "$(examplesdir)" || $(MKDIR_P) "$(DESTDIR)$(examplesdir)" @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(examplesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(examplesdir)" || exit $$?; \ done uninstall-examplesDATA: @$(NORMAL_UNINSTALL) @list='$(examples_DATA)'; test -n "$(examplesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(examplesdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(examplesdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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) $(DATA) installdirs: for dir in "$(DESTDIR)$(examplesdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-examplesDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-examplesDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-examplesDATA install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-examplesDATA $(MAKEDIST): Makefile mkdir -p .libs @(echo CXX=$(CXX) ; \ echo CXXFLAGS=$(CXXFLAGS) ; \ echo LDFLAGS=$(MAKELDFLAGS) ; \ echo ; \ echo all: $(noinst_PROGRAMS) ; \ echo ; \ echo clean: ; \ echo " rm -f $(noinst_PROGRAMS)" ; \ ) > $(MAKEDIST) # 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: qpidc-0.16/examples/qmf-console/Makefile.am0000664000076400007640000000307111471021177021233 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # examplesdir=$(pkgdatadir)/examples/qmf-console MAKELDFLAGS=$(CONSOLEFLAGS) include $(top_srcdir)/examples/makedist.mk noinst_PROGRAMS=console printevents ping queuestats cluster-qmon console_SOURCES=console.cpp console_LDADD=$(CONSOLE_LIB) printevents_SOURCES=printevents.cpp printevents_LDADD=$(CONSOLE_LIB) ping_SOURCES=ping.cpp ping_LDADD=$(CONSOLE_LIB) queuestats_SOURCES=queuestats.cpp queuestats_LDADD=$(CONSOLE_LIB) cluster_qmon_SOURCES=cluster-qmon.cpp cluster_qmon_LDADD=$(CONSOLE_LIB) examples_DATA= \ console.cpp \ printevents.cpp \ ping.cpp \ queuestats.cpp \ cluster-qmon.cpp \ $(MAKEDIST) EXTRA_DIST= \ README.txt \ CMakeLists.txt \ qmf-console_console.vcproj \ qmf-console_ping.vcproj \ qmf-console_printevents.vcproj \ qmf-console_queuestats.vcproj qpidc-0.16/examples/qmf-console/ping.cpp0000664000076400007640000001025711605133555020647 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/SessionManager.h" #include "qpid/sys/Time.h" using namespace std; using namespace qpid::console; //============================================================== // Main program //============================================================== int main_int(int /*argc*/, char** /*argv*/) { // // Declare connection settings for the messaging broker. // qpid::client::ConnectionSettings connSettings; // // Declare the (optional) session manager settings. Override the default timeout // for methods calls to be 2 seconds. // SessionManager::Settings smSettings; smSettings.methodTimeout = 2; smSettings.getTimeout = 2; // // Declare the console session manager. With a null listener argument, it defaults to // synchronous-only access mode. // SessionManager sm(0, smSettings); // // Add a broker connection to the session manager. // Broker* broker = sm.addBroker(connSettings); broker->waitForStable(); uint32_t count = 5; // The number of echo requests we will send to the broker. Object::Vector list; // A container for holding objects retrieved from the broker. for (uint32_t iter = 0; iter < count; iter++) { cout << "Ping Broker: " << broker->getUrl() << "... "; cout.flush(); // // Query for a list of 'broker' objects from the Management Database // sm.getObjects(list, "broker"); // // We expect one object (since we are connected to only one broker) // if (list.size() == 1) { Object& brokerObject = *(list.begin()); // // Declare a container for arguments to be sent with the "echo" method // that we will invoke on the remote "broker" object. // Object::AttributeMap args; // // Declare a container for the result of the method invocation. // MethodResponse result; // // Set the values of the input arguments. // args.addUint("sequence", iter); args.addString("body", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"); // // Invoke the method. This is a synchronous operation that will block until // the method completes and returns a result. // brokerObject.invokeMethod("echo", args, result); // // result.code is the return code (0 => Success) // result.text is the return text // result.arguments is a container (of type Object::AttributeMap) that holds // the output arguments (if any) from the method. // cout << "Result: code=" << result.code << " text=" << result.text; if (result.code == 0) cout << " seq=" << result.arguments["sequence"]->asUint(); cout << endl; if (result.code == 0 && iter < count - 1) qpid::sys::sleep(1); } else { cout << "Disconnected..." << endl; qpid::sys::sleep(1); } } // // Disconnect the broker from the session manager. // sm.delBroker(broker); return 0; } int main(int argc, char** argv) { try { return main_int(argc, argv); } catch(std::exception& e) { cout << "Top Level Exception: " << e.what() << endl; } } qpidc-0.16/examples/qmf-console/README.txt0000664000076400007640000000305111471021050020661 0ustar00jrossjross00000000000000The QMF console library provides an interface infrastructure for broker management. This directory contains example applications that use the QMF console library to interact with the broker. cluster-qmon.cpp: This example maintains connections to a number of brokers (assumed to be running on localhost and at ports listed in the command line arguments). The program then periodically polls queue information from a single operational broker. This is a useful illustration of how one might monitor statistics on a cluster of brokers. console.cpp: A simple application that attaches to a broker (assumed to be available as "localhost:5672"), and extracts: * Management Schema (packages and classes) * Management state for all active Exchanges * Management state for all active Queues It then invokes the broker's "echo" test method before detaching from the broker. ping.cpp: Connects to a broker (assumed to be available as "localhost:5672"), and invokes the "echo" test method five times. printevents.cpp: An example of a passive broker monitor. This application connects to a broker (assumed to be available as "localhost:5672"), and registers a callback listener. The listener's callbacks are invoked when various management events are signalled by the broker. queuestats.cpp: An example of a passive broker monitor. This application connects to a broker (assumed to be available as "localhost:5672"), and registers a callback listener for status updates only for Queue objects. The listener's callback is invoked whenever the status of a Queue changes. qpidc-0.16/examples/qmf-console/printevents.cpp0000664000076400007640000000643711605133555022300 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/ConsoleListener.h" #include "qpid/console/SessionManager.h" #include "qpid/sys/Time.h" #include using namespace std; using namespace qpid::console; // // Define a listener class to receive asynchronous events. // class Listener : public ConsoleListener { public: void brokerConnected(const Broker& broker) { cout << qpid::sys::now() << " NOTIC qpid-printevents:brokerConnected broker=" << broker.getUrl() << endl; } void brokerDisconnected(const Broker& broker) { cout << qpid::sys::now() << " NOTIC qpid-printevents:brokerDisconnected broker=" << broker.getUrl() << endl; } void event(Event& event) { cout << event << endl; } }; //============================================================== // Main program //============================================================== struct Main { bool stopping; Main() : stopping(false) {} int run(int /*argc*/, char** /*argv*/) { // // Declare an instance of our listener. // Listener listener; // // Declare connection settings for the messaging broker. // qpid::client::ConnectionSettings connSettings; // // Declare the (optional) session manager settings. Disable the reception of // object updates and heartbeats. Note that by disabling the reception of things // we don't need, we don't unnecessarily use network bandwidth. // SessionManager::Settings smSettings; smSettings.rcvObjects = false; smSettings.rcvHeartbeats = false; // // Declare the console session manager. // SessionManager sm(&listener, smSettings); // // Add a broker connection to the session manager. If desired, multiple brokers may // be connected. // Broker* broker = sm.addBroker(connSettings); // // Sleep indefinitely while asynchronous events are handled by the listener. // while (!stopping) qpid::sys::sleep(1); sm.delBroker(broker); return 0; } void stop() { stopping = true; } }; Main main_program; void signal_handler(int) { main_program.stop(); } int main(int argc, char** argv) { signal(SIGINT, signal_handler); try { return main_program.run(argc, argv); } catch(std::exception& e) { cout << "Top Level Exception: " << e.what() << endl; } } qpidc-0.16/examples/qmf-console/queuestats.cpp0000664000076400007640000001045611156273306022116 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/ConsoleListener.h" #include "qpid/console/SessionManager.h" #include "qpid/sys/Time.h" using namespace std; using namespace qpid::console; // // Declare a subclass of ConsoleListener to receive asynchronous data. // class Listener : public ConsoleListener { // // Declare a map from ObjectId to string to store queue names by their object IDs. // typedef map QueueMap; QueueMap queueMap; public: ~Listener() {} // // Receive property updates from the agent. // void objectProps(Broker& /*broker*/, Object& object) { string name = object.attrString("name"); ObjectId oid = object.getObjectId(); QueueMap::iterator iter = queueMap.find(oid); if (iter == queueMap.end()) { // // Object is not in the map. Learn it. // cout << "New Queue: " << name << endl; queueMap[oid] = name; } } // // Receive statistic updates from the agent. // void objectStats(Broker& /*broker*/, Object& object) { ObjectId oid = object.getObjectId(); QueueMap::iterator iter = queueMap.find(oid); if (iter == queueMap.end()) // // Object id is not in the map. We are not interested in this update. // return; cout << "Stats for: " << iter->second << endl; cout << " msgTotalEnqueues = " << object.attrUint64("msgTotalEnqueues") << endl; cout << " msgTotalDequeues = " << object.attrUint64("msgTotalDequeues") << endl; cout << " msgDepth = " << object.attrUint("msgDepth") << endl; if (object.isDeleted()) { // // Object was deleted and is in the map. Remove it. // cout << "Queue Deleted: " << iter->second << endl; queueMap.erase(oid); } // // Note that the object-delete logic is done after processing statistics. // This allows us to get the "final" statistics for a deleted object. It also // assures that very short-lived objects are accounted for (i.e. created, used, // and destroyed all within a single reporting interval). // } }; //============================================================== // Main program //============================================================== int main_int(int /*argc*/, char** /*argv*/) { Listener listener; // // Tune the settings for this application: We wish to receive objects but not events. // By using "userBindings", we can restrict which objects we receive updates for. // SessionManager::Settings sessionSettings; sessionSettings.rcvObjects = true; sessionSettings.rcvEvents = false; sessionSettings.rcvHeartbeats = false; sessionSettings.userBindings = true; SessionManager sm(&listener, sessionSettings); // // We want to receive updates only for the broker queue object. // sm.bindClass("org.apache.qpid.broker", "queue"); // // Connect to the broker. // qpid::client::ConnectionSettings connSettings; Broker* broker = sm.addBroker(connSettings); // // Sleep while the listener does all the work asynchronously. // for (;;) { qpid::sys::sleep(1); } sm.delBroker(broker); return 0; } int main(int argc, char** argv) { try { return main_int(argc, argv); } catch(std::exception& e) { cout << "Top Level Exception: " << e.what() << endl; } } qpidc-0.16/examples/qmf-console/qmf-console_console.vcproj0000664000076400007640000002531411334317457024404 0ustar00jrossjross00000000000000 qpidc-0.16/examples/qmf-console/qmf-console_queuestats.vcproj0000664000076400007640000002535511334317457025152 0ustar00jrossjross00000000000000 qpidc-0.16/examples/qmf-console/cluster-qmon.cpp0000664000076400007640000001273511215763566022356 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/ConsoleListener.h" #include "qpid/console/SessionManager.h" #include "qpid/sys/Time.h" #include "qpid/sys/Mutex.h" #include #include using namespace std; using namespace qpid::console; using qpid::sys::Mutex; // // This example maintains connections to a number of brokers (assumed // to be running on localhost and at ports listed in the command line // arguments). // // The program then periodically polls queue information from a // single operational broker. This is a useful illustration of how // one might monitor statistics on a cluster of brokers. // //============================================================== // Main program //============================================================== // // The Main class extends ConsoleListener so it can receive broker connected/disconnected // notifications. // class Main : public ConsoleListener { bool stopping; // Used to tell the program to exit Mutex lock; // Mutex to protect the broker-map map brokerMap; // Map of broker-pointers to boolean "operational" status public: Main() : stopping(false) {} /** Invoked when a connection is established to a broker */ void brokerConnected(const Broker& broker) { Mutex::ScopedLock l(lock); brokerMap[const_cast(&broker)] = true; } /** Invoked when the connection to a broker is lost */ void brokerDisconnected(const Broker& broker) { Mutex::ScopedLock l(lock); brokerMap[const_cast(&broker)] = false; } int run(int argc, char** argv) { // // Tune the settings for this application: We will operate synchronously only, we don't // wish to use the bandwidth needed to aysnchronously receive objects or events. // SessionManager::Settings sessionSettings; sessionSettings.rcvObjects = false; sessionSettings.rcvEvents = false; sessionSettings.rcvHeartbeats = false; SessionManager sm(this, sessionSettings); // // Connect to the brokers. // for (int idx = 1; idx < argc; idx++) { qpid::client::ConnectionSettings connSettings; connSettings.host = "localhost"; connSettings.port = atoi(argv[idx]); Broker* broker = sm.addBroker(connSettings); Mutex::ScopedLock l(lock); brokerMap[broker] = false; // initially assume broker is disconnected } // // Periodically poll the first connected broker. // while (!stopping) { // // Find an operational broker // Broker* operationalBroker = 0; { Mutex::ScopedLock l(lock); for (map::iterator iter = brokerMap.begin(); iter != brokerMap.end(); iter++) { if (iter->second) { operationalBroker = iter->first; break; } } } if (operationalBroker != 0) { Object::Vector list; sm.getObjects(list, "queue", operationalBroker); for (Object::Vector::iterator i = list.begin(); i != list.end(); i++) { cout << "queue: " << i->attrString("name"); cout << " bindingCount=" << i->attrUint64("bindingCount") << endl; } } else { cout << "No operational brokers" << endl; } qpid::sys::sleep(10); if (stopping) break; } { // // The following code structure uses the mutex to protect the broker map while // ensuring that sm.delBroker is called without the mutex held (which leads to // a deadlock). // Mutex::ScopedLock l(lock); map::iterator iter = brokerMap.begin(); while (iter != brokerMap.end()) { Broker* broker = iter->first; brokerMap.erase(iter); { Mutex::ScopedUnlock ul(lock); sm.delBroker(broker); } iter = brokerMap.begin(); } } return 0; } void stop() { stopping = true; } }; Main main_program; void signal_handler(int) { main_program.stop(); } int main(int argc, char** argv) { signal(SIGINT, signal_handler); try { return main_program.run(argc, argv); } catch(std::exception& e) { cout << "Top Level Exception: " << e.what() << endl; } } qpidc-0.16/examples/qmf-console/qmf-console_printevents.vcproj0000664000076400007640000002537011334317457025325 0ustar00jrossjross00000000000000 qpidc-0.16/examples/qmf-console/console.cpp0000664000076400007640000001111111402007502021325 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/ConsoleListener.h" #include "qpid/console/SessionManager.h" using namespace std; using namespace qpid::console; class Listener : public ConsoleListener { public: ~Listener() {} void brokerConnected(const Broker& broker) { cout << "brokerConnected: " << broker << endl; } void brokerDisconnected(const Broker& broker) { cout << "brokerDisconnected: " << broker << endl; } void newPackage(const std::string& name) { cout << "newPackage: " << name << endl; } void newClass(const ClassKey& classKey) { cout << "newClass: key=" << classKey << endl; } void newAgent(const Agent& agent) { cout << "newAgent: " << agent << endl; } void delAgent(const Agent& agent) { cout << "delAgent: " << agent << endl; } void objectProps(Broker& broker, Object& object) { cout << "objectProps: broker=" << broker << " object=" << object << endl; } void objectStats(Broker& broker, Object& object) { cout << "objectStats: broker=" << broker << " object=" << object << endl; } void event(Event& event) { cout << "event: " << event << endl; } }; //============================================================== // Main program //============================================================== int main_int(int /*argc*/, char** /*argv*/) { //Listener listener; qpid::client::ConnectionSettings settings; cout << "Creating SessionManager" << endl; SessionManager sm; cout << "Adding broker" << endl; Broker* broker; broker = sm.addBroker(settings); broker->waitForStable(); cout << "Package List:" << endl; vector packages; sm.getPackages(packages); for (vector::iterator iter = packages.begin(); iter != packages.end(); iter++) { cout << " " << *iter << endl; SessionManager::KeyVector classKeys; sm.getClasses(classKeys, *iter); for (SessionManager::KeyVector::iterator cIter = classKeys.begin(); cIter != classKeys.end(); cIter++) cout << " " << *cIter << endl; } Object::Vector list; cout << "getting exchanges..." << endl; sm.getObjects(list, "exchange"); cout << " returned " << list.size() << " elements" << endl; for (Object::Vector::iterator i = list.begin(); i != list.end(); i++) { cout << "exchange: " << *i << endl; } list.clear(); cout << "getting queues..." << endl; sm.getObjects(list, "queue"); cout << " returned " << list.size() << " elements" << endl; for (Object::Vector::iterator i = list.begin(); i != list.end(); i++) { cout << "queue: " << *i << endl; cout << " bindingCount=" << i->attrUint("bindingCount") << endl; cout << " arguments=" << i->attrMap("arguments") << endl; } list.clear(); sm.getObjects(list, "broker"); if (list.size() == 1) { Object& broker = *list.begin(); cout << "Broker: " << broker << endl; Object::AttributeMap args; MethodResponse result; args.addUint("sequence", 1); args.addString("body", "Testing..."); cout << "Call echo method..." << endl; broker.invokeMethod("echo", args, result); cout << "Result: code=" << result.code << " text=" << result.text << endl; for (Object::AttributeMap::iterator aIter = result.arguments.begin(); aIter != result.arguments.end(); aIter++) { cout << " Output Arg: " << aIter->first << " => " << aIter->second->str() << endl; } } sm.delBroker(broker); return 0; } int main(int argc, char** argv) { try { return main_int(argc, argv); } catch(std::exception& e) { cout << "Top Level Exception: " << e.what() << endl; } } qpidc-0.16/examples/qmf-console/qmf-console_ping.vcproj0000664000076400007640000002570111334317457023677 0ustar00jrossjross00000000000000 qpidc-0.16/examples/qmf-console/CMakeLists.txt0000664000076400007640000000176211670507530021747 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # add_installed_example(qmf-console console qmfconsole) add_installed_example(qmf-console printevents qmfconsole) add_installed_example(qmf-console ping qmfconsole) add_installed_example(qmf-console queuestats qmfconsole) qpidc-0.16/examples/examples.sln0000664000076400007640000001740211533443147017317 0ustar00jrossjross00000000000000Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 # # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License # # Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "messaging_client", "messaging\messaging_client.vcproj", "{80B58CBC-FECA-1BAD-1FEE-AE349A6B75AA}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "messaging_map_receiver", "messaging\messaging_map_receiver.vcproj", "{92D8F5AA-FECA-1BAD-1FEE-AE349A6B75AA}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "messaging_map_sender", "messaging\messaging_map_sender.vcproj", "{3B9EA507-FECA-1BAD-1FEE-AE349A6B75AA}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "messaging_server", "messaging\messaging_server.vcproj", "{E0A50687-FECA-1BAD-1FEE-AE349A6B75AA}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "messaging_drain", "messaging\messaging_drain.vcproj", "{D79791E5-C593-4F23-B545-0CE72D181F2A}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "messaging_spout", "messaging\messaging_spout.vcproj", "{D3115AC9-91C4-4D79-BCAC-DE837C70F1EA}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qmf_console_console", "qmf-console\qmf-console_console.vcproj", "{490473E1-FECA-1BAD-2E13-3FFA2B8669C3}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qmf_console_ping", "qmf-console\qmf-console_ping.vcproj", "{C1FFDE95-3442-49AE-9985-7EEE3D45B4A3}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qmf_console_printevents", "qmf-console\qmf-console_printevents.vcproj", "{72C74624-FECA-1BAD-2E13-3FFA2B8669C3}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qmf_console_queuestats", "qmf-console\qmf-console_queuestats.vcproj", "{B21825EA-FECA-1BAD-2E13-3FFA2B8669C3}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {80B58CBC-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|Win32.ActiveCfg = Debug|Win32 {80B58CBC-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|Win32.Build.0 = Debug|Win32 {80B58CBC-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|x64.ActiveCfg = Debug|x64 {80B58CBC-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|x64.Build.0 = Debug|x64 {80B58CBC-FECA-1BAD-1FEE-AE349A6B75AA}.Release|Win32.ActiveCfg = Release|Win32 {80B58CBC-FECA-1BAD-1FEE-AE349A6B75AA}.Release|Win32.Build.0 = Release|Win32 {80B58CBC-FECA-1BAD-1FEE-AE349A6B75AA}.Release|x64.ActiveCfg = Release|x64 {80B58CBC-FECA-1BAD-1FEE-AE349A6B75AA}.Release|x64.Build.0 = Release|x64 {92D8F5AA-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|Win32.ActiveCfg = Debug|Win32 {92D8F5AA-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|Win32.Build.0 = Debug|Win32 {92D8F5AA-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|x64.ActiveCfg = Debug|x64 {92D8F5AA-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|x64.Build.0 = Debug|x64 {92D8F5AA-FECA-1BAD-1FEE-AE349A6B75AA}.Release|Win32.ActiveCfg = Release|Win32 {92D8F5AA-FECA-1BAD-1FEE-AE349A6B75AA}.Release|Win32.Build.0 = Release|Win32 {92D8F5AA-FECA-1BAD-1FEE-AE349A6B75AA}.Release|x64.ActiveCfg = Release|x64 {92D8F5AA-FECA-1BAD-1FEE-AE349A6B75AA}.Release|x64.Build.0 = Release|x64 {3B9EA507-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|Win32.ActiveCfg = Debug|Win32 {3B9EA507-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|Win32.Build.0 = Debug|Win32 {3B9EA507-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|x64.ActiveCfg = Debug|x64 {3B9EA507-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|x64.Build.0 = Debug|x64 {3B9EA507-FECA-1BAD-1FEE-AE349A6B75AA}.Release|Win32.ActiveCfg = Release|Win32 {3B9EA507-FECA-1BAD-1FEE-AE349A6B75AA}.Release|Win32.Build.0 = Release|Win32 {3B9EA507-FECA-1BAD-1FEE-AE349A6B75AA}.Release|x64.ActiveCfg = Release|x64 {3B9EA507-FECA-1BAD-1FEE-AE349A6B75AA}.Release|x64.Build.0 = Release|x64 {E0A50687-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|Win32.ActiveCfg = Debug|Win32 {E0A50687-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|Win32.Build.0 = Debug|Win32 {E0A50687-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|x64.ActiveCfg = Debug|x64 {E0A50687-FECA-1BAD-1FEE-AE349A6B75AA}.Debug|x64.Build.0 = Debug|x64 {E0A50687-FECA-1BAD-1FEE-AE349A6B75AA}.Release|Win32.ActiveCfg = Release|Win32 {E0A50687-FECA-1BAD-1FEE-AE349A6B75AA}.Release|Win32.Build.0 = Release|Win32 {E0A50687-FECA-1BAD-1FEE-AE349A6B75AA}.Release|x64.ActiveCfg = Release|x64 {E0A50687-FECA-1BAD-1FEE-AE349A6B75AA}.Release|x64.Build.0 = Release|x64 {D79791E5-C593-4F23-B545-0CE72D181F2A}.Debug|Win32.ActiveCfg = Debug|Win32 {D79791E5-C593-4F23-B545-0CE72D181F2A}.Debug|Win32.Build.0 = Debug|Win32 {D79791E5-C593-4F23-B545-0CE72D181F2A}.Debug|x64.ActiveCfg = Debug|x64 {D79791E5-C593-4F23-B545-0CE72D181F2A}.Debug|x64.Build.0 = Debug|x64 {D79791E5-C593-4F23-B545-0CE72D181F2A}.Release|Win32.ActiveCfg = Release|Win32 {D79791E5-C593-4F23-B545-0CE72D181F2A}.Release|Win32.Build.0 = Release|Win32 {D79791E5-C593-4F23-B545-0CE72D181F2A}.Release|x64.ActiveCfg = Release|x64 {D79791E5-C593-4F23-B545-0CE72D181F2A}.Release|x64.Build.0 = Release|x64 {D3115AC9-91C4-4D79-BCAC-DE837C70F1EA}.Debug|Win32.ActiveCfg = Debug|Win32 {D3115AC9-91C4-4D79-BCAC-DE837C70F1EA}.Debug|Win32.Build.0 = Debug|Win32 {D3115AC9-91C4-4D79-BCAC-DE837C70F1EA}.Debug|x64.ActiveCfg = Debug|x64 {D3115AC9-91C4-4D79-BCAC-DE837C70F1EA}.Debug|x64.Build.0 = Debug|x64 {D3115AC9-91C4-4D79-BCAC-DE837C70F1EA}.Release|Win32.ActiveCfg = Release|Win32 {D3115AC9-91C4-4D79-BCAC-DE837C70F1EA}.Release|Win32.Build.0 = Release|Win32 {D3115AC9-91C4-4D79-BCAC-DE837C70F1EA}.Release|x64.ActiveCfg = Release|x64 {D3115AC9-91C4-4D79-BCAC-DE837C70F1EA}.Release|x64.Build.0 = Release|x64 {490473E1-FECA-1BAD-2E13-3FFA2B8669C3}.Debug|Win32.ActiveCfg = Debug|Win32 {490473E1-FECA-1BAD-2E13-3FFA2B8669C3}.Debug|Win32.Build.0 = Debug|Win32 {490473E1-FECA-1BAD-2E13-3FFA2B8669C3}.Release|Win32.ActiveCfg = Release|Win32 {490473E1-FECA-1BAD-2E13-3FFA2B8669C3}.Release|Win32.Build.0 = Release|Win32 {C1FFDE95-3442-49AE-9985-7EEE3D45B4A3}.Debug|Win32.ActiveCfg = Debug|Win32 {C1FFDE95-3442-49AE-9985-7EEE3D45B4A3}.Debug|Win32.Build.0 = Debug|Win32 {C1FFDE95-3442-49AE-9985-7EEE3D45B4A3}.Release|Win32.ActiveCfg = Release|Win32 {C1FFDE95-3442-49AE-9985-7EEE3D45B4A3}.Release|Win32.Build.0 = Release|Win32 {72C74624-FECA-1BAD-2E13-3FFA2B8669C3}.Debug|Win32.ActiveCfg = Debug|Win32 {72C74624-FECA-1BAD-2E13-3FFA2B8669C3}.Debug|Win32.Build.0 = Debug|Win32 {72C74624-FECA-1BAD-2E13-3FFA2B8669C3}.Release|Win32.ActiveCfg = Release|Win32 {72C74624-FECA-1BAD-2E13-3FFA2B8669C3}.Release|Win32.Build.0 = Release|Win32 {B21825EA-FECA-1BAD-2E13-3FFA2B8669C3}.Debug|Win32.ActiveCfg = Debug|Win32 {B21825EA-FECA-1BAD-2E13-3FFA2B8669C3}.Debug|Win32.Build.0 = Debug|Win32 {B21825EA-FECA-1BAD-2E13-3FFA2B8669C3}.Release|Win32.ActiveCfg = Release|Win32 {B21825EA-FECA-1BAD-2E13-3FFA2B8669C3}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal qpidc-0.16/examples/makedist.mk0000664000076400007640000000301011461772231017102 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Settings to build the examples in automake AM_CXXFLAGS = $(WARNING_CFLAGS) INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include CLIENT_LIB=$(top_builddir)/src/libqpidclient.la CONSOLE_LIB=$(top_builddir)/src/libqmfconsole.la CLIENTFLAGS=-lqpidclient CONSOLEFLAGS=-lqmfconsole # Generate a simple non-automake Makefile for distribution. MAKEDIST=.libs/Makefile $(MAKEDIST): Makefile mkdir -p .libs @(echo CXX=$(CXX) ; \ echo CXXFLAGS=$(CXXFLAGS) ; \ echo LDFLAGS=$(MAKELDFLAGS) ; \ echo ; \ echo all: $(noinst_PROGRAMS) ; \ echo ; \ echo clean: ; \ echo " rm -f $(noinst_PROGRAMS)" ; \ ) > $(MAKEDIST) qpidc-0.16/examples/CMakeLists.txt0000664000076400007640000000761211670507530017524 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # project(qpidc_examples) cmake_minimum_required(VERSION 2.4.0 FATAL_ERROR) if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) include_directories(${CMAKE_BINARY_DIR}/include) include_directories(${CMAKE_SOURCE_DIR}/include) # Shouldn't need this... but there are still client header inclusions # of Boost. When building examples at an install site, the Boost files # should be locatable aside from these settings. # So set up to find the headers, find the libs at link time, but dynamically # link them all and clear the CMake Boost library names to avoid adding them to # the project files. include_directories( ${Boost_INCLUDE_DIR} ) link_directories( ${Boost_LIBRARY_DIRS} ) # Visual Studio needs some Windows-specific simplifications. # Linux needs to reference the boost libs, even though they should be # resolved via the Qpid libs. if (MSVC) add_definitions( /D "NOMINMAX" /D "WIN32_LEAN_AND_MEAN" /D "BOOST_ALL_DYN_LINK" ) # On Windows, prevent the accidental inclusion of Boost headers from # autolinking in the Boost libs. There should be no direct references to # Boost in the examples, and references via qpidclient/qpidcommon are # resolved in the Qpid libs. add_definitions( /D "BOOST_ALL_NO_LIB" ) else (MSVC) set(_boost_libs_needed ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}) endif (MSVC) # There are numerous duplicate names within the examples. Since all target # names must be unique, define a macro to prepend a prefix and manage the # actual names. # There can be an optional arguments at the end: libs to include macro(add_example subdir example) add_executable(${subdir}_${example} ${example}.cpp) set_target_properties(${subdir}_${example} PROPERTIES OUTPUT_NAME ${example}) if (${ARGC} GREATER 2) target_link_libraries(${subdir}_${example} ${ARGN} qpidclient ${_boost_libs_needed}) else (${ARGC} GREATER 2) target_link_libraries(${subdir}_${example} qpidclient ${_boost_libs_needed}) endif (${ARGC} GREATER 2) endmacro(add_example) macro(add_installed_example subdir example) add_example(${subdir} ${example} ${ARGN}) # For installs, don't install the built example; that would be pointless. # Install the things a user needs to build the example on-site. install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${example}.cpp DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/${subdir} COMPONENT ${QPID_COMPONENT_EXAMPLES}) if (MSVC) install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}_${example}.vcproj DESTINATION ${QPID_INSTALL_EXAMPLESDIR}/${subdir} COMPONENT ${QPID_COMPONENT_EXAMPLES}) endif (MSVC) endmacro(add_installed_example) install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/README.txt DESTINATION ${QPID_INSTALL_EXAMPLESDIR} COMPONENT ${QPID_COMPONENT_EXAMPLES}) if (MSVC) install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/examples.sln DESTINATION ${QPID_INSTALL_EXAMPLESDIR} COMPONENT ${QPID_COMPONENT_EXAMPLES}) endif (MSVC) add_subdirectory(qmf-console) add_subdirectory(messaging) add_subdirectory(old_api) qpidc-0.16/configure.ac0000664000076400007640000005046211741633572015442 0ustar00jrossjross00000000000000dnl Process this file with autoconf to produce a configure script. dnl dnl This file is free software; as a special exception the author gives dnl unlimited permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. dnl # Pick up the version from QPID_VERSION.txt in the qpid/cpp source tree. # NB. You need to re-run bootstrap if the global qpid/QPID_VERSION.txt changes. AC_INIT([qpidc], [m4_esyscmd([cat QPID_VERSION.txt | tr -d '\n'])], [dev@qpid.apache.org]) AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([dist-bzip2 subdir-objects tar-ustar]) # Minimum Autoconf version required. AC_PREREQ(2.59) AC_CONFIG_HEADERS([src/config.h]) AC_PROG_CC_STDC AM_PROG_CC_C_O AC_PROG_CXX AC_USE_SYSTEM_EXTENSIONS AC_LANG([C++]) # Check for optional use of help2man AC_CHECK_PROG([HELP2MAN], [help2man], [help2man]) AC_ARG_WITH([help2man], [AS_HELP_STRING([--with-help2man], [Use help2man to generate man pages.])], [case "$withval" in yes) test -z "$HELP2MAN" && AC_MSG_ERROR([help2man not found.]) ;; no) HELP2MAN="" ;; *) AC_MSG_ERROR([Bad value ${withval} for --with-help2man.]) ;; esac]) AM_CONDITIONAL([HAVE_HELP2MAN], [test -n "$HELP2MAN"]) # Check for optional use of doxygen AC_CHECK_PROG([DOXYGEN], [doxygen], [doxygen]) AC_ARG_WITH([doxygen], [AS_HELP_STRING([--with-doxygen], [Use doxygen to generate API documentation.])], [case "$withval" in yes) test -z "$DOXYGEN" && AC_MSG_ERROR([doxygen not found.]) ;; no) DOXYGEN="" ;; *) AC_MSG_ERROR([Bad value ${withval} for --with-doxygen.]) ;; esac]) AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"]) AC_ARG_ENABLE(warnings, [ --enable-warnings turn on lots of compiler warnings (recommended)], [case "${enableval}" in yes|no) ;; *) AC_MSG_ERROR([bad value ${enableval} for warnings option]) ;; esac], [enableval=yes]) # Set up for gcc as compiler if test x$GXX = xyes; then # Warnings: Enable as many as possible, keep the code clean. Please # do not disable warnings or remove -Werror without discussing on # qpid-dev list. # # The following warnings are deliberately omitted, they warn on valid code. # -Wunreachable-code -Wpadded -Winline # -Wshadow - warns about boost headers. # Can't test for -Werror as whether it fails or not depends on what's in # CFLAGS/CXXFLAGS. In any case it's been in gcc for a long time (since 2.95 at least) if test "${enableval}" = yes; then COMPILER_FLAGS="-Werror" gl_COMPILER_FLAGS(-pedantic) gl_COMPILER_FLAGS(-Wall) gl_COMPILER_FLAGS(-Wextra) gl_COMPILER_FLAGS(-Wno-shadow) gl_COMPILER_FLAGS(-Wpointer-arith) gl_COMPILER_FLAGS(-Wcast-qual) gl_COMPILER_FLAGS(-Wcast-align) gl_COMPILER_FLAGS(-Wno-long-long) gl_COMPILER_FLAGS(-Wvolatile-register-var) gl_COMPILER_FLAGS(-Winvalid-pch) gl_COMPILER_FLAGS(-Wno-system-headers) gl_COMPILER_FLAGS(-Woverloaded-virtual) AC_SUBST([WARNING_CFLAGS], [$COMPILER_FLAGS]) AC_DEFINE([lint], 1, [Define to 1 if the compiler is checking for lint.]) COMPILER_FLAGS= fi else AC_CHECK_DECL([__SUNPRO_CC], [SUNCC=yes], [SUNCC=no]) # Set up for sun CC compiler if test x$SUNCC = xyes; then if test "${enableval}" = yes; then WARNING_FLAGS=+w fi CXXFLAGS="$CXXFLAGS -library=stlport4 -mt" LD="$CXX" LDFLAGS="$LDFLAGS -library=stlport4 -mt" AC_SUBST([SUNCC_RUNTIME_LIBS], [-lCrun]) fi fi AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_SUBST([LIBTOOL_DEPS]) # For libraries (libcommon) that use dlopen, dlerror, etc., # test whether we need to link with -ldl. gl_saved_libs=$LIBS AC_SEARCH_LIBS(dlopen, [dl], [test "$ac_cv_search_dlopen" = "none required" || LIB_DLOPEN=$ac_cv_search_dlopen]) AC_SUBST([LIB_DLOPEN]) LIBS=$gl_saved_libs gl_CLOCK_TIME # Enable Valgrind AC_ARG_ENABLE([valgrind], [AS_HELP_STRING([--enable-valgrind], [run valgrind memory checker on tests, if available (default yes)])], [case $enableval in yes|no) enable_VALGRIND=$enableval;; *) AC_MSG_ERROR([Invalid value for --enable-valgrind: $enableval]);; esac], [enable_VALGRIND=yes] ) # We use valgrind for the tests. See if it's available. # Check for it unconditionally, so we don't have to duplicate its # use of AC_SUBST([VALGRIND]). AC_CHECK_PROG([VALGRIND], [valgrind], [valgrind]) test "$enable_VALGRIND" = no && VALGRIND= # If rpmlint is available we'll run it when building RPMs. AC_CHECK_PROG([RPMLINT], [rpmlint], [rpmlint]) AM_CONDITIONAL([HAS_RPMLINT], [test -n "$RPMLINT"]) # Code generation: generated code is included in the distribution # so code generation is only required in an svn checkout. # It requires several external tools and files, which we check for here. AC_CHECK_PROG([RUBY], [ruby], [ruby]) # Swig binding generator is needed for the script (Ruby, Python, etc.) bindings. AC_PROG_SWIG(1.3.26) test ! -x "$SWIG" && SWIG="" AC_ARG_WITH([swig], [AS_HELP_STRING([--with-swig], [Use swig to generate qmf bindings.])], [case "$withval" in yes) test -z "$SWIG" && AC_MSG_ERROR([swig not found.]) ;; no) SWIG="" ;; *) AC_MSG_ERROR([Bad value ${withval} for --with-swig.]) ;; esac]) AM_CONDITIONAL([HAVE_SWIG], [test -n "$SWIG"]) # Ruby bindings: To build ruby wrappers, the ruby-devel files must be present. AC_PATH_PROGS(RUBY, [ruby1.8 ruby], []) AC_ARG_VAR(RUBY, [Ruby interpreter]) if test -n "$RUBY" ; then AC_ARG_VAR(RUBY_INC, [Directory where ruby.h can be found]) if test -z "$RUBY_INC" ; then [RUBY_INC=`$RUBY -rrbconfig -e 'puts Config::CONFIG["rubyhdrdir"] || Config::CONFIG["archdir"]'`] fi AC_SUBST(RUBY_INC) AC_ARG_VAR(RUBY_INC_ARCH, [Directory where ruby/config.h can be found (needed from Ruby 1.9)]) if test -z "$RUBY_INC_ARCH" ; then [RUBY_INC_ARCH=`$RUBY -rrbconfig -e 'd = Config::CONFIG["rubyhdrdir"];if d != nil; print d + "/" + Config::CONFIG["arch"]; end'`] dnl For earlier versions, just make it the same as RUBY_INC. test x"$RUBY_INC_ARCH" != x || RUBY_INC_ARCH=$RUBY_INC fi AC_SUBST(RUBY_INC_ARCH) AC_ARG_VAR(RUBY_LIB, [Directory to install ruby files into]) if test -z "$RUBY_LIB" ; then dnl Kludge to install ruby files under $prefix [RUBY_LIB=`$RUBY -rrbconfig -e 'puts Config::CONFIG["sitelibdir"].gsub("/usr", "${prefix}")'`] fi AC_SUBST(RUBY_LIB) AC_ARG_VAR(RUBY_LIB_ARCH, [Directory to install ruby binary modules into]) if test -z "$RUBY_LIB_ARCH" ; then dnl Kludge to install ruby files under $prefix [RUBY_LIB_ARCH=`$RUBY -rrbconfig -e 'puts Config::CONFIG["sitearchdir"].gsub("/usr", "${prefix}")'`] fi AC_SUBST(RUBY_LIB_ARCH) RUBY_LIBS= case $host_os in cygwin*) RUBY_LIBS=-lruby ;; esac AC_SUBST(RUBY_LIBS) RUBY_DLEXT=`$RUBY -rrbconfig -e 'puts Config::CONFIG[["DLEXT"]]'` AC_SUBST(RUBY_DLEXT) fi AM_CONDITIONAL([HAVE_RUBY_DEVEL], [test -f $RUBY_INC/ruby.h && test -n "$SWIG"]) # Python bindings: To build python wrappers, the python-devel files must be present. AM_PATH_PYTHON() AS_IF([test -n "$PYTHON"], [ PKG_CHECK_MODULES([PYTHON], [python-$PYTHON_VERSION], [have_python_dev=yes],[ # We didn't find pkg-config information for python-2.7 this # may mean we have an earlier python version: # Try to find the include and library files directly in the default # location AC_MSG_WARN([Didn't find Python 2.7 developer libs - looking for older version]) PYTHON_INC=$($PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()') AC_CHECK_LIB([python$PYTHON_VERSION],[Py_Initialize]) AC_CHECK_FILE(["$PYTHON_INC/Python.h"],[ PYTHON_CFLAGS="-I$PYTHON_INC" PYTHON_LIBS="-lpython$PYTHON_VERSION" have_python_dev=yes ],[ if test yes = "$with_python" ; then AC_MSG_ERROR([Couldn't find Python developer libs - you probably need to install a python-dev or python-devel package]) else AC_MSG_WARN([Couldn't find Python developer libs - you probably don't have a python-dev or python-devel package installed]) fi ]) ]) AC_SUBST(PYTHON_CFLAGS) AC_SUBST(PYTHON_LIBS) ]) AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test x$have_python_dev = xyes && test -n "$SWIG"]) # Perl bindings: AC_CHECK_PROG([PERL], [perl], [perl]) if test -n "$PERL"; then PERL_ARCHLIB=`perl -MConfig -e 'print "$Config{archlib}";'` AC_CHECK_FILE( ["$PERL_ARCHLIB/CORE/perl.h"], [AC_SUBST([PERL_INC], ["$PERL_ARCHLIB/CORE"])] ) AC_SUBST(PERL_ARCHLIB) fi AM_CONDITIONAL([HAVE_PERL_DEVEL], [test -n "$PERL" && test -n "$SWIG" && test -n "$PERL_INC"]) specdir=`pwd`/$srcdir/../specs AMQP_FINAL_XML=$specdir/amqp.0-10-qpid-errata.xml AC_SUBST(AMQP_FINAL_XML) AM_CONDITIONAL([GENERATE], [test -f $AMQP_FINAL_XML]) test -f $AMQP_FINAL_XML -a -z "$RUBY" && AC_MSG_ERROR([Missing ruby installation (try "yum install ruby").]) # URL and download URL for the package. URL=http://rhm.et.redhat.com/qpidc AC_SUBST(URL) DOWNLOAD_URL=http://rhm.et.redhat.com/download AC_SUBST(DOWNLOAD_URL) # Check for headers from required devel kits. AC_CHECK_HEADERS([boost/shared_ptr.hpp uuid/uuid.h],, AC_MSG_ERROR([Missing required header files.])) # Check for optional cluster requirements. tmp_LIBS=$LIBS tmp_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -L/usr/lib/openais -L/usr/lib64/openais -L/usr/lib/corosync -L/usr/lib64/corosync" AC_CHECK_LIB([cpg],[cpg_local_get],[have_libcpg=yes],) AC_CHECK_HEADERS([openais/cpg.h corosync/cpg.h],[have_cpg_h=yes],) AC_ARG_WITH([cpg], [AS_HELP_STRING([--with-cpg], [Build with CPG support for clustering.])], [case "${withval}" in yes) # yes - require dependencies test x$have_libcpg = xyes || AC_MSG_ERROR([libcpg not found, install openais-devel or corosync-devel]) test x$have_cpg_h = xyes || AC_MSG_ERROR([cpg.h not found, install openais-devel or corosync-devel]) with_cpg=yes ;; no) with_cpg=no ;; *) AC_MSG_ERROR([Bad value ${withval} for --with-cpg option]) ;; esac], [ # not specified - use if present test x$have_libcpg = xyes -a x$have_cpg_h = xyes && with_cpg=yes ] ) AM_CONDITIONAL([HAVE_LIBCPG], [test x$with_cpg = xyes]) # Clean up unnceccassary flags if we don't use clustering AS_IF([test ! x$with_cpg = xyes], [LDFLAGS=$tmp_LDFLAGS]) AC_CHECK_LIB([cman],[cman_is_quorate],have_libcman=yes,) AC_CHECK_HEADERS([libcman.h],have_libcman_h=yes,) AC_ARG_WITH([libcman], [AS_HELP_STRING([--with-libcman], [Integration with libcman quorum service.])], [case "${withval}" in yes) # yes - require dependencies test x$have_libcman = xyes || AC_MSG_ERROR([libcman not found, install cman-devel or cmanlib-devel]) test x$have_libcman_h = xyes || AC_MSG_ERROR([libcman.h not found, install cman-devel or cmanlib-devel]) with_libcman=yes ;; no) with_libcman=no ;; *) AC_MSG_ERROR([Bad value ${withval} for --with-libcman option]) ;; esac], [ # not specified - use if present and we're using with_cpg test x$have_libcman = xyes -a x$have_libcman_h = xyes -a x$with_cpg = xyes && with_libcman=yes ] ) AM_CONDITIONAL([HAVE_LIBCMAN], [test x$with_libcman = xyes]) LIBS=$tmp_LIBS # Setup --with-sasl/--without-sasl as arguments to configure AC_ARG_WITH([sasl], [AS_HELP_STRING([--with-sasl], [Build with SASL authentication support])], [WANT_SASL="$withval"], [WANT_SASL=check]) # Make sure --with-sasl/--without-sasl were only give yes|no|check AS_IF([test "x$WANT_SASL" != xyes -a \ "x$WANT_SASL" != xno -a \ "x$WANT_SASL" != xcheck], [AC_MSG_ERROR([Bad value for --with-sasl: $withval])]) # If we weren't explicitly asked /not/ to test, i.e. not given --without-sasl have_sasl=no AS_IF([test "x$WANT_SASL" != xno], # Perform tests for headers and libraries. Remember, AC_CHECK_LIB # will give you some useful default behavior, e.g. setup LDFLAGS, if # you do not give it a second argument, so try not to [AC_CHECK_HEADER([sasl/sasl.h], , [HAVE_SASL_H=no]) tmp_LIBS=$LIBS AC_CHECK_LIB([sasl2], [sasl_checkpass], , [HAVE_SASL_LIB=no]) # Remove from LIBS, we will link it explicitly in make files. LIBS=$tmp_LIBS # If any of the tests failed AS_IF([test "x$HAVE_SASL_H" = xno -o \ "x$HAVE_SASL_LIB" = xno], # And we were given --with, then fail [AS_IF([test "x$WANT_SASL" = xyes], [AC_MSG_ERROR([sasl requested but not available])])], # Otherwise, no tests failed, setup AC_SUBST/AC_DEFINE/vars for AM_CONDITIONALs [AC_DEFINE([BROKER_SASL_NAME], ["qpidd"], [The SASL app name for the qpid Broker]) AC_DEFINE([HAVE_SASL], [1], [Enable if libsasl is present]) have_sasl=yes]) AC_PATH_PROG([SASL_PASSWD], [saslpasswd2], [], [$PATH$PATH_SEPARATOR/usr/sbin]) AS_IF([test x$SASL_PASSWD = x], [AC_MSG_ERROR([saslpasswd2 not found])], []) ]) AM_CONDITIONAL([HAVE_SASL], [test "x$have_sasl" = xyes]) AC_SUBST([SASL_PASSWD]) # Setup --with-xml/--without-xml as arguments to configure use_xml=yes want_xml=check AC_ARG_WITH([xml], [AS_HELP_STRING([--with-xml], [Build with XML Exchange])], [want_xml=$withval]) case $want_xml in yes|no|check) ;; *) AC_MSG_ERROR([Bad value for --with-xml: $withval]) ;; esac test $want_xml = no && use_xml=no # If the user doesn't say not to use XML, see if it's available. if test $use_xml != no; then # Then see if XQilla is available tmp_LIBS=$LIBS AC_CHECK_LIB([xerces-c], [_init], , [use_xml=no]) AC_CHECK_HEADER([xercesc/framework/MemBufInputSource.hpp], , [use_xml=no]) AC_CHECK_HEADER([xqilla/xqilla-simple.hpp], , [use_xml=no]) AC_CHECK_LIB([xqilla], [_init], , [use_xml=no]) # Remove from LIBS, we will link it explicitly in make files. LIBS=$tmp_LIBS # If XQilla is not available, yet specifically requested, die. test $use_xml:$want_xml = no:yes && AC_MSG_ERROR([XML Exchange requested, but XQilla or Xerces-C not available]) # Else XQilla is available - use it to build test $use_xml = yes && AC_DEFINE([HAVE_XML], [1], [Compile-in XML Exchange support.]) # Check to see if we need to use legacy calls for effective boolean value xqilla_has_ebv=yes AC_CHECK_HEADER([xqilla/ast/XQEffectiveBooleanValue.hpp], , [xqilla_has_ebv=no]) test $xqilla_has_ebv = yes && AC_DEFINE([XQ_EFFECTIVE_BOOLEAN_VALUE_HPP], [1], [XQilla version has xqilla/ast/XQEffectiveBooleanValue.hpp.]) fi AM_CONDITIONAL([HAVE_XML], [test $use_xml = yes]) # Setup --with-rdma/--without-rdma as arguments to configure tmp_LIBS=$LIBS AC_ARG_WITH([rdma], [AS_HELP_STRING([--with-rdma], [Build with support for Remote DMA protocols])], [case ${withval} in yes) with_RDMA=yes AC_CHECK_LIB([ibverbs],[ibv_create_qp],,[AC_MSG_ERROR([libibverbs not found])]) AC_CHECK_LIB([rdmacm],[rdma_create_id],,[AC_MSG_ERROR([librdmacm not found])]) AC_CHECK_HEADERS([infiniband/verbs.h],,[AC_MSG_ERROR([ibverbs header files not found])]) AC_CHECK_HEADERS([rdma/rdma_cma.h],,[AC_MSG_ERROR([rdma_cm header files not found])]) ;; no) with_RDMA=no ;; *) AC_MSG_ERROR([Bad value for --with-rdma: ${withval}]) ;; esac], [ with_RDMA=yes AC_CHECK_LIB([ibverbs],[ibv_create_qp],,[with_RDMA=no]) AC_CHECK_LIB([rdmacm],[rdma_create_id],,[with_RDMA=no]) AC_CHECK_HEADERS([infiniband/verbs.h],,[with_RDMA=no]) AC_CHECK_HEADERS([rdma/rdma_cma.h],,[with_RDMA=no]) ] ) # Remove from LIBS, we will link it explicitly in make files. LIBS=$tmp_LIBS AM_CONDITIONAL([RDMA], [test x$with_RDMA = xyes]) # Setup --with-ssl/--without-ssl as arguments to configure SSL_CFLAGS="" SSL_LDFLAGS="" AC_ARG_WITH([ssl], [AS_HELP_STRING([--with-ssl], [Build with support for SSL])], [case ${withval} in yes) with_SSL=yes AC_PATH_PROG([NSPR_CONFIG], [nspr-config]) AS_IF([test x$NSPR_CONFIG = x], [AC_MSG_ERROR([libnspr not found])], []) AC_PATH_PROG([NSS_CONFIG], [nss-config]) AS_IF([test x$NSS_CONFIG = x], [AC_MSG_ERROR([libnss not found])], []) SSL_CFLAGS="`$NSPR_CONFIG --cflags` `$NSS_CONFIG --cflags`" SSL_LDFLAGS="`$NSPR_CONFIG --libs` `$NSS_CONFIG --libs`" ;; no) with_SSL=no ;; *) AC_MSG_ERROR([Bad value for --with-ssl: ${withval}]) ;; esac], [ with_SSL=yes AC_PATH_PROG([NSPR_CONFIG], [nspr-config]) AS_IF([test x$NSPR_CONFIG = x], [with_SSL=no], [AC_PATH_PROG([NSS_CONFIG], [nss-config]) AS_IF([test x$NSS_CONFIG = x], [with_SSL=no], [SSL_CFLAGS="`$NSPR_CONFIG --cflags` `$NSS_CONFIG --cflags`" SSL_LDFLAGS="`$NSPR_CONFIG --libs` `$NSS_CONFIG --libs`"])]) ] ) # Remove from LIBS, we will link it explicitly in make files. AM_CONDITIONAL([SSL], [test x$with_SSL = xyes]) AC_SUBST([SSL_CFLAGS]) AC_SUBST([SSL_LDFLAGS]) poller=no AC_ARG_WITH([poller], [AS_HELP_STRING([--with-poller], [The low level poller implementation: poll/solaris-ecf/epoll])], [case ${withval} in poll) AC_CHECK_HEADERS([sys/poll.h],[poller=poll],[AC_MSG_ERROR([Can't find poll.h header file for poll])]) ;; solaris-ecf) AC_CHECK_HEADERS([port.h],[poller=solaris-ecf],[AC_MSG_ERROR([Can't find port.h header file for solaris-ecf])]) ;; epoll) AC_CHECK_HEADERS([sys/epoll.h],[poller=epoll],[AC_MSG_ERROR([Can't find epoll.h header file for epoll])]) ;; esac], [ # We check for poll first so that it is overridden AC_CHECK_HEADERS([sys/poll.h],[poller=poll],) # Not currently supported - WIP #AC_CHECK_HEADERS([port.h],[poller=solaris-ecf],) AC_CHECK_HEADERS([sys/epoll.h],[poller=epoll],) ] ) AM_CONDITIONAL([USE_ECF], [test x$poller = xsolaris-ecf]) AM_CONDITIONAL([USE_POLL], [test x$poller = xpoll]) AM_CONDITIONAL([USE_EPOLL], [test x$poller = xepoll]) #Filter not implemented or invalid mechanisms if test $poller = xno; then AC_MSG_ERROR([Polling mechanism not implemented for $host]) fi #Guess host architecture, to choose platform-dependent objects case "$host" in *sun-solaris*) arch=solaris ;; esac AM_CONDITIONAL([SUNOS], [test x$arch = xsolaris]) # Check whether we've got the header for dtrace static probes AC_ARG_WITH([probes], [AS_HELP_STRING([--with-probes], [Build with dtrace/systemtap static probes])], [case ${withval} in yes) AC_CHECK_HEADERS([sys/sdt.h]) ;; no) ;; *) AC_MSG_ERROR([Bad value for --with-probes: ${withval}]) ;; esac], [ AC_CHECK_HEADERS([sys/sdt.h]) ] ) # Check for some syslog capabilities not present in all systems AC_TRY_COMPILE([#include ], [int v = LOG_AUTHPRIV;], [AC_DEFINE([HAVE_LOG_AUTHPRIV], [1], [Set to 1 whether LOG_AUTHPRIV is supported.])],) AC_TRY_COMPILE([#include ], [int v = LOG_FTP;], [AC_DEFINE([HAVE_LOG_FTP], [1], [Set to 1 whether LOG_FTP is supported.])],) #Check if we need to include libacl to provide acl API gl_saved_libs=$LIBS AC_SEARCH_LIBS(acl, [acl], [test "$ac_cv_search_acl" = "none required" || LIB_ACL=$ac_cv_search_acl]) AC_SUBST([LIB_ACL]) LIBS=$gl_saved_libs SOCKLIBS="" AC_CHECK_LIB([socket],[socket],[SOCKET_LIB="-lsocket"],[SOCKET_LIB=""],[]) AC_CHECK_LIB([nsl],[getipnodebyname],[NSL_LIB="-lnsl"],[NSL_LIB=""],[]) SOCKLIBS="$SOCKET_LIB $NSL_LIB" AC_SUBST([SOCKLIBS]) # Used by env scripts to find libraries in cmake or autoconf builds. builddir_lib_suffix="/.libs" AC_SUBST([builddir_lib_suffix]) # Files to generate AC_CONFIG_FILES([ Makefile examples/Makefile examples/old_api/Makefile examples/old_api/direct/Makefile examples/old_api/fanout/Makefile examples/old_api/pub-sub/Makefile examples/old_api/request-response/Makefile examples/old_api/failover/Makefile examples/old_api/xml-exchange/Makefile examples/qmf-console/Makefile examples/old_api/tradedemo/Makefile examples/messaging/Makefile bindings/qpid/Makefile bindings/qpid/ruby/Makefile bindings/qpid/python/Makefile bindings/qpid/perl/Makefile.PL bindings/qpid/dotnet/Makefile bindings/qmf/Makefile bindings/qmf/ruby/Makefile bindings/qmf/python/Makefile bindings/qmf/tests/Makefile bindings/qmf2/Makefile bindings/qmf2/ruby/Makefile bindings/qmf2/python/Makefile bindings/qmf2/examples/cpp/Makefile managementgen/Makefile etc/Makefile src/Makefile src/tests/Makefile src/tests/test_env.sh src/tests/install_env.sh src/qpid.pc src/qmf2.pc docs/man/Makefile docs/api/Makefile docs/api/user.doxygen docs/api/developer.doxygen ]) AC_OUTPUT qpidc-0.16/QPID_VERSION.txt0000664000076400007640000000000511752725656015652 0ustar00jrossjross000000000000000.16 qpidc-0.16/README.txt0000664000076400007640000000264111472502571014641 0ustar00jrossjross00000000000000 Qpid/C++ ======== Table of Contents ================= 1. Introduction 2. Available Documentation 3. Quick start 1. Introduction =============== Qpid/C++ is a C++ implementation of the AMQP protcol described at http://amqp.org/ This release of Qpid/C++ implements the AMQP 0-10. It will not inter-operate with AMQP 0-8/0-9 implementations. For additional software or information on the Qpid project go to: http://qpid.apache.org For documentation, go to: http://qpid.apache.org/documentation 2. Available Documentation ========================== - INSTALL - How to install Qpid/C++. - SSL - How to setup SSL - RELEASE_NOTES - Release notes. - DESIGN - Qpid/C++ implementation. - LICENSE - Apache license. - NOTICE - Corresponds to the section 4 d of the Apache License, Version 2.0. 3. Quick start ============== In C++ distributions: ./configure && make - compiles all sources make check - runs tests make install - installs the client and daemon In some distributions, no ./configure file is provided. To create the ./configure file, you must have autotools installed. Run ./bootstrap from the qpid/cpp directory, then follow the above instructions. The INSTALL notes contain more detailed information on compiling and installing this software. qpid/cpp/examples/README.txt describes the C++ client API examples. qpidc-0.16/DESIGN0000664000076400007640000000702411053506073014033 0ustar00jrossjross00000000000000Qpid C++ AMQP implementation ============================= = Project layout = For Build system design see comment at start of Makefile. Project contains: * Client library (lib/libqpid_client): src/qpid/client * Broker library (lib/libqpid_broker): src/qpid/broker * Common classes * src/qpid/framing: wire encoding/decoding * src/qpid/sys: io, threading etc * src/qpid/Exception.cpp, QpidError.cpp: Exception classes. * Qpid Daemon (bin/qpidd): src/qpidd.cpp Unit tests in test/unit: each *Test.cpp builds a CppUnit plugin. Client tests in test/client: each *.cpp builds a test executable. Test utilities: test/include = Client Design = The client module is primarily concerned with presenting the functionality offered by AMQP to users through a simple API that nevertheless allows all the protocol functionality to be exploited. [Note: it is currently nothing like complete in this regard!] The code in the client module is concerned with the logic of the AMQP protocol and interacts with the lower level transport issues through the InputHandler and OutputHandler abstractions defined in common/framing. It uses these in conjunction with the Connector interface, defined in common/io, for establishing a connection to the broker and interacting with it through the sending and receiving of messages represented by AMQFrame (defined in common/framing). The Connector implementation is responsible for connection set up, threading strategy and getting data on and off the wire. It delegates to the framing module for encode/decode operations. The interface between the io and the framing modules is primarily through the Buffer and AMQFrame classes. A Buffer allows 'raw' data to be read or written in terms of the AMQP defined 'types' (octet, short, long, long long, short string, long string, field table etc.). AMQP is defined in terms frames with specific bodies and the frame (as well as these different bodies) are defined in terms of these 'types'. The AMQFrame class allows a frame to be decoded by reading from the supplied buffer, or it allows a particular frame to be constructed and then encoded by writing to the supplied buffer. The io layer can then access the raw data that 'backs' the buffer to either out it on the wire or to populate it from the wire. One minor exception to this is the protocol initiation. AMQP defines a protocol 'header', that is not a frame, and is sent by a client to intiate a connection. The Connector allows (indeed requires) such a frame to be passed in to initialise the connection (the Acceptor, when defined, will allow an InitiationHandler to be set allowing the broker to hook into the connection initiation). In order to remove duplication, the ProtocolInitiation class and the AMQFrame class both implement a AMQDataBlock class that defines the encode and decode methods. This allows both types to be treated generically for the purposes of encoding. In decoding, the context determines which type is expected and should be used for decoding (this is only relevant to the broker). --------api-------- Client Impl ...............uses..... input handler --> --------- --------- <-- output handler . A | . | | framing utils | V . ------------------- <-- connector . IO Layer ................uses.... qpidc-0.16/include/0000775000076400007640000000000011752725714014572 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/0000775000076400007640000000000011752725715015530 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/sys/0000775000076400007640000000000011752725715016346 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/sys/Thread.h0000664000076400007640000000366411564625557017743 0ustar00jrossjross00000000000000#ifndef _sys_Thread_h #define _sys_Thread_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/CommonImportExport.h" #ifdef _WIN32 # ifdef _MSC_VER # define QPID_TSS __declspec(thread) # else # define QPID_TSS __thread # endif #elif defined (__GNUC__) # define QPID_TSS __thread #elif defined (__SUNPRO_CC) # define QPID_TSS __thread #else # error "Dont know how to define QPID_TSS for this platform" #endif namespace qpid { namespace sys { class Runnable; class ThreadPrivate; class Thread { boost::shared_ptr impl; public: QPID_COMMON_EXTERN Thread(); QPID_COMMON_EXTERN explicit Thread(qpid::sys::Runnable*); QPID_COMMON_EXTERN explicit Thread(qpid::sys::Runnable&); QPID_COMMON_EXTERN operator bool(); QPID_COMMON_EXTERN bool operator==(const Thread&) const; QPID_COMMON_EXTERN bool operator!=(const Thread&) const; QPID_COMMON_EXTERN void join(); QPID_COMMON_EXTERN static Thread current(); /** ID of current thread for logging. * Workaround for broken Thread::current() in APR */ QPID_COMMON_EXTERN static unsigned long logId(); }; }} #endif /*!_sys_Thread_h*/ qpidc-0.16/include/qpid/sys/Mutex.h0000664000076400007640000000362611227403641017614 0ustar00jrossjross00000000000000#ifndef _sys_Mutex_h #define _sys_Mutex_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ namespace qpid { namespace sys { /** * Scoped lock template: calls lock() in ctor, unlock() in dtor. * L can be any class with lock() and unlock() functions. */ template class ScopedLock { public: ScopedLock(L& l) : mutex(l) { l.lock(); } ~ScopedLock() { mutex.unlock(); } private: L& mutex; }; template class ScopedUnlock { public: ScopedUnlock(L& l) : mutex(l) { l.unlock(); } ~ScopedUnlock() { mutex.lock(); } private: L& mutex; }; template class ScopedRlock { public: ScopedRlock(L& l) : mutex(l) { l.rlock(); } ~ScopedRlock() { mutex.unlock(); } private: L& mutex; }; template class ScopedWlock { public: ScopedWlock(L& l) : mutex(l) { l.wlock(); } ~ScopedWlock() { mutex.unlock(); } private: L& mutex; }; template class ConditionalScopedLock { public: ConditionalScopedLock(L& l) : mutex(l) { acquired = l.trylock(); } ~ConditionalScopedLock() { if (acquired) mutex.unlock(); } bool lockAcquired() { return acquired; } private: L& mutex; bool acquired; }; }} #ifdef USE_APR_PLATFORM #include "apr/Mutex.h" #elif defined (_WIN32) #include "windows/Mutex.h" #else #include "posix/Mutex.h" #endif #endif /*!_sys_Mutex_h*/ qpidc-0.16/include/qpid/sys/SystemInfo.h0000664000076400007640000000555511372266076020627 0ustar00jrossjross00000000000000#ifndef QPID_SYS_SYSTEMINFO_H #define QPID_SYS_SYSTEMINFO_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" #include "qpid/Address.h" #include "qpid/CommonImportExport.h" #include namespace qpid { namespace sys { /** * Retrieve information about the system we are running on. * Results may be dependent on OS/hardware. */ namespace SystemInfo { /** * Estimate available concurrency, e.g. number of CPU cores. * -1 means estimate not available on this platform. */ QPID_COMMON_EXTERN long concurrency(); /** * Get the local host name and set it in the specified. * Returns false if it can't be obtained and sets errno to any error value. */ QPID_COMMON_EXTERN bool getLocalHostname (Address &address); QPID_COMMON_EXTERN void getLocalIpAddresses (uint16_t port, std::vector
&addrList); /** * Retrieve system identifiers and versions. This is information that can * generally be retrieved via POSIX uname(). * * @param osName Receives the OS name; e.g., GNU/Linux or Windows * @param nodeName Receives the nodename. This may or may not match the * set hostname from getLocalHostname(). * @param release Receives the OS release identifier. * @param version Receives the OS release version (kernel, build, sp, etc.) * @param machine Receives the hardware type. */ QPID_COMMON_EXTERN void getSystemId (std::string &osName, std::string &nodeName, std::string &release, std::string &version, std::string &machine); /** * Get the process ID of the current process. */ QPID_COMMON_EXTERN uint32_t getProcessId(); /** * Get the process ID of the parent of the current process. */ QPID_COMMON_EXTERN uint32_t getParentProcessId(); /** * Get the name of the current process (i.e. the name of the executable) */ QPID_COMMON_EXTERN std::string getProcessName(); }}} // namespace qpid::sys::SystemInfo #endif /*!QPID_SYS_SYSTEMINFO_H*/ qpidc-0.16/include/qpid/sys/windows/0000775000076400007640000000000011752725716020041 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/sys/windows/Mutex.h0000775000076400007640000000757311247304123021313 0ustar00jrossjross00000000000000#ifndef _sys_windows_Mutex_h #define _sys_windows_Mutex_h /* * * Copyright (c) 2008 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/windows/check.h" #include #if (BOOST_VERSION < 103500) #error The Windows port requires Boost version 1.35.0 or later #endif #include #include #include #include #include namespace qpid { namespace sys { class Condition; /** * Mutex lock. */ class Mutex : private boost::noncopyable { friend class Condition; public: typedef ::qpid::sys::ScopedLock ScopedLock; typedef ::qpid::sys::ScopedUnlock ScopedUnlock; inline Mutex(); inline ~Mutex(); inline void lock(); inline void unlock(); inline bool trylock(); protected: boost::recursive_mutex mutex; }; /** * RW lock. */ class RWlock : private boost::noncopyable { friend class Condition; public: typedef ::qpid::sys::ScopedRlock ScopedRlock; typedef ::qpid::sys::ScopedWlock ScopedWlock; inline RWlock(); inline ~RWlock(); inline void wlock(); // will write-lock inline void rlock(); // will read-lock inline void unlock(); inline void trywlock(); // will write-try inline void tryrlock(); // will read-try protected: boost::shared_mutex rwMutex; boost::thread_specific_ptr haveWrite; inline bool &write (void); }; /** * PODMutex is a POD, can be static-initialized with * PODMutex m = QPID_PODMUTEX_INITIALIZER */ struct PODMutex { typedef ::qpid::sys::ScopedLock ScopedLock; inline void lock(); inline void unlock(); inline bool trylock(); // Must be public to be a POD: boost::recursive_mutex mutex; }; #define QPID_MUTEX_INITIALIZER 0 void PODMutex::lock() { mutex.lock(); } void PODMutex::unlock() { mutex.unlock(); } bool PODMutex::trylock() { return mutex.try_lock(); } Mutex::Mutex() { } Mutex::~Mutex(){ } void Mutex::lock() { mutex.lock(); } void Mutex::unlock() { mutex.unlock(); } bool Mutex::trylock() { return mutex.try_lock(); } RWlock::RWlock() { } RWlock::~RWlock(){ } void RWlock::wlock() { bool &writer = write(); rwMutex.lock(); writer = true; // Remember this thread has write lock held. } void RWlock::rlock() { bool &writer = write(); rwMutex.lock_shared(); writer = false; // Remember this thread has shared lock held. } void RWlock::unlock() { bool &writer = write(); if (writer) rwMutex.unlock(); else rwMutex.unlock_shared(); } void RWlock::trywlock() { bool &writer = write(); // shared_mutex::try_lock() seems to not be available... emulate it with // a timed lock(). boost::system_time now = boost::get_system_time(); if (rwMutex.timed_lock(now)) writer = true; } void RWlock::tryrlock() { bool &writer = write(); if (rwMutex.try_lock_shared()) writer = false; } bool & RWlock::write (void) { // Accessing thread-specific and stack-local info, so no locks needed. bool *writePtr = haveWrite.get(); if (writePtr == 0) { writePtr = new bool(false); haveWrite.reset(writePtr); } return *writePtr; } }} #endif /*!_sys_windows_Mutex_h*/ qpidc-0.16/include/qpid/sys/windows/IntegerTypes.h0000775000076400007640000000254111616577105022635 0ustar00jrossjross00000000000000#ifndef QPID_SYS_WINDOWS_INTEGERTYPES_H #define QPID_SYS_WINDOWS_INTEGERTYPES_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef short int16_t; typedef unsigned int uint32_t; typedef int int32_t; #if defined(_MSC_VER) typedef signed char int8_t; typedef unsigned __int64 uint64_t; typedef __int64 int64_t; #else #include #endif // Visual Studio doesn't define other common types, so set them up here too. typedef unsigned int uint; #endif /*!QPID_SYS_WINDOWS_INTEGERTYPES_H*/ qpidc-0.16/include/qpid/sys/windows/check.h0000775000076400007640000000362211341561464021265 0ustar00jrossjross00000000000000#ifndef _windows_check_h #define _windows_check_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/Msg.h" #include "qpid/sys/StrError.h" #define QPID_WINDOWS_ERROR(ERRVAL) qpid::Exception(QPID_MSG(qpid::sys::strError(ERRVAL))) #define QPID_WINDOWS_CRT_ERROR(ERRNO) qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO))) /** THROW QPID_WINDOWS_ERROR(::GetLastError()) if RESULT is NULL */ #define QPID_WINDOWS_CHECK_NULL(RESULT) \ if ((RESULT) == NULL) throw QPID_WINDOWS_ERROR((::GetLastError())) #define QPID_WINDOWS_CHECK_NOT(RESULT,VAL) \ if ((RESULT) == (VAL)) throw QPID_WINDOWS_ERROR((::GetLastError())) #define QPID_WINDOWS_CHECK_ASYNC_START(STATUS) \ if (!(STATUS) && ::WSAGetLastError() != ERROR_IO_PENDING) \ throw QPID_WINDOWS_ERROR((::WSAGetLastError())) #define QPID_WINDOWS_CHECK_CRT_NZ(VAL) \ if ((VAL) == 0) throw QPID_WINDOWS_CRT_ERROR(errno) #define QPID_WINSOCK_CHECK(OP) \ if ((OP) == SOCKET_ERROR) throw QPID_WINDOWS_ERROR((::WSAGetLastError())) #endif /*!_windows_check_h*/ qpidc-0.16/include/qpid/sys/windows/Time.h0000664000076400007640000000206211227674200021074 0ustar00jrossjross00000000000000#ifndef QPID_SYS_WINDOWS_TIME_H #define QPID_SYS_WINDOWS_TIME_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include namespace qpid { namespace sys { /** * Class to represent an instant in time. Boost has this stuff already done * so just reuse it. We can also grab this for quick use with the Condition * wait operations. */ typedef boost::posix_time::ptime TimePrivate; }} // namespace qpid::sys #endif /*!QPID_SYS_WINDOWS_TIME_H*/ qpidc-0.16/include/qpid/sys/windows/Condition.h0000775000076400007640000000360211357262174022137 0ustar00jrossjross00000000000000#ifndef _sys_windows_Condition_h #define _sys_windows_Condition_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Mutex.h" #include "qpid/sys/Time.h" #include #include #include #include #include namespace qpid { namespace sys { /** * A condition variable for thread synchronization. */ class Condition : private boost::noncopyable { public: inline Condition(); inline ~Condition(); inline void wait(Mutex&); inline bool wait(Mutex&, const AbsTime& absoluteTime); inline void notify(); inline void notifyAll(); private: boost::condition_variable_any condition; }; Condition::Condition() { } Condition::~Condition() { } void Condition::wait(Mutex& mutex) { condition.wait(mutex.mutex); } bool Condition::wait(Mutex& mutex, const AbsTime& absoluteTime){ return condition.timed_wait(mutex.mutex, absoluteTime.timepoint); } void Condition::notify(){ condition.notify_one(); } void Condition::notifyAll(){ condition.notify_all(); } }} #endif /*!_sys_windows_Condition_h*/ qpidc-0.16/include/qpid/sys/StrError.h0000664000076400007640000000214011227403641020262 0ustar00jrossjross00000000000000#ifndef _sys_StrError_h #define _sys_StrError_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/CommonImportExport.h" namespace qpid { namespace sys { /** Get the error message for a system number err, e.g. errno. */ QPID_COMMON_EXTERN std::string strError(int err); }} // namespace qpid #endif // _sys_StrError_h qpidc-0.16/include/qpid/sys/IntegerTypes.h0000775000076400007640000000211011564561152021130 0ustar00jrossjross00000000000000#ifndef QPID_SYS_INTEGERTYPES_H #define QPID_SYS_INTEGERTYPES_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #if (defined(_WINDOWS) || defined (WIN32)) #include "qpid/sys/windows/IntegerTypes.h" #endif #if !defined _WINDOWS && !defined WIN32 #include "qpid/sys/posix/IntegerTypes.h" #endif #endif /*!QPID_SYS_INTEGERTYPES_H*/ qpidc-0.16/include/qpid/sys/ExceptionHolder.h0000664000076400007640000000434411553120725021605 0ustar00jrossjross00000000000000#ifndef QPID_EXCEPTIONHOLDER_H #define QPID_EXCEPTIONHOLDER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace sys { struct Raisable { virtual ~Raisable() {}; virtual void raise() const=0; virtual std::string what() const=0; }; /** * Holder for exceptions. Allows the thread that notices an error condition to * create an exception and store it to be thrown by another thread. */ class ExceptionHolder : public Raisable { public: ExceptionHolder() {} // Use default copy & assign. /** Take ownership of ex */ template ExceptionHolder(Ex* ex) { wrap(ex); } template ExceptionHolder& operator=(Ex* ex) { wrap(ex); return *this; } void raise() const { if (wrapper.get()) wrapper->raise() ; } std::string what() const { return wrapper.get() ? wrapper->what() : std::string(); } bool empty() const { return !wrapper.get(); } operator bool() const { return !empty(); } void reset() { wrapper.reset(); } private: template struct Wrapper : public Raisable { Wrapper(Ex* ptr) : exception(ptr) {} void raise() const { throw *exception; } std::string what() const { return exception->what(); } boost::shared_ptr exception; }; template void wrap(Ex* ex) { wrapper.reset(new Wrapper(ex)); } boost::shared_ptr wrapper; }; }} // namespace qpid::sys #endif /*!QPID_EXCEPTIONHOLDER_H*/ qpidc-0.16/include/qpid/sys/Monitor.h0000664000076400007640000000244011227403641020132 0ustar00jrossjross00000000000000#ifndef _sys_Monitor_h #define _sys_Monitor_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Condition.h" namespace qpid { namespace sys { /** * A monitor is a condition variable and a mutex */ class Monitor : public Mutex, public Condition { public: inline void wait(); inline bool wait(const AbsTime& absoluteTime); }; void Monitor::wait() { Condition::wait(*this); } bool Monitor::wait(const AbsTime& absoluteTime) { return Condition::wait(*this, absoluteTime); } }} #endif /*!_sys_Monitor_h*/ qpidc-0.16/include/qpid/sys/Runnable.h0000664000076400007640000000256011564561152020262 0ustar00jrossjross00000000000000#ifndef _Runnable_ #define _Runnable_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/CommonImportExport.h" namespace qpid { namespace sys { /** * Interface for objects that can be run, e.g. in a thread. */ class QPID_COMMON_CLASS_EXTERN Runnable { public: /** Type to represent a runnable as a Functor */ typedef boost::function0 Functor; QPID_COMMON_EXTERN virtual ~Runnable(); /** Derived classes override run(). */ virtual void run() = 0; /** Create a functor object that will call this->run(). */ Functor functor(); }; }} #endif qpidc-0.16/include/qpid/sys/Time.h0000664000076400007640000001264011564561152017412 0ustar00jrossjross00000000000000#ifndef _sys_Time_h #define _sys_Time_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/IntegerTypes.h" /* * The platform defines its notion of time as a TimePrivate type. The * platform's implementation knows how to handle this type. */ #if defined (_WIN32) # include "windows/Time.h" #else # include "posix/Time.h" #endif #include "qpid/CommonImportExport.h" #include #include namespace qpid { namespace sys { class Duration; /** * @class AbsTime * * Class to represent an instant in time. * * The time resolution is in nanosecs, and this is held with 64 bits * giving a total time span from about 25 million years ago to 25 million * years hence. As an aside the internal time can sensibly be negative * meaning before the epoch (probably 1/1/1970 although this class doesn't * care). * * The AbsTime class is a value class and so you don't need to add any * accessors to its internal state. If you think you want to replace its value, * you need to construct a new AbsTime and assign it, viz: * * AbsTime when = now(); * ... * when = AbsTime(when, 2*TIME_SEC); // Advance timer 2 secs * * AbsTime is not intended to be used to represent calendar dates/times * but you can construct a Duration since the Unix Epoch, 1970-1-1-00:00, * so that you can convert to a date/time if needed: * * int64_t nanosec_since_epoch = Duration(EPOCH, now()); * * There are some sensible operations that are currently missing from * AbsTime, but nearly all that's needed can be done with a mixture of * AbsTimes and Durations. * * For example, convenience operators to add a Duration and AbsTime returning * an AbsTime would fit here (although you can already perform the operation * with one of the AbsTime constructors). However trying to add 2 AbsTimes * doesn't make sense. */ class AbsTime { friend class Duration; friend class Condition; TimePrivate timepoint; public: inline AbsTime() : timepoint() {} QPID_COMMON_EXTERN AbsTime(const AbsTime& time0, const Duration& duration); // Default assignment operation fine // Default copy constructor fine QPID_COMMON_EXTERN static AbsTime now(); QPID_COMMON_EXTERN static AbsTime FarFuture(); QPID_COMMON_EXTERN static AbsTime Epoch(); bool operator==(const AbsTime& t) const { return t.timepoint == timepoint; } friend bool operator<(const AbsTime& a, const AbsTime& b); friend bool operator>(const AbsTime& a, const AbsTime& b); QPID_COMMON_EXTERN friend std::ostream& operator << (std::ostream&, const AbsTime&); }; QPID_COMMON_EXTERN std::ostream& operator << (std::ostream&, const AbsTime&); /** * @class Duration * Class to represent the duration between instants of time. * * As AbsTime, this class also uses nanosecs for its time * resolution where possible. For the most part a duration can be dealt * with like a 64 bit integer, and indeed there is an implicit conversion which * makes this quite convenient. */ class Duration { static int64_t max() { return std::numeric_limits::max(); } int64_t nanosecs; friend class AbsTime; public: QPID_COMMON_INLINE_EXTERN inline Duration(int64_t time0 = 0); QPID_COMMON_EXTERN explicit Duration(const AbsTime& start, const AbsTime& finish); inline operator int64_t() const; }; std::ostream& operator << (std::ostream&, const Duration&); inline AbsTime now() { return AbsTime::now(); } inline bool operator<(const AbsTime& a, const AbsTime& b) { return a.timepoint < b.timepoint; } inline bool operator>(const AbsTime& a, const AbsTime& b) { return a.timepoint > b.timepoint; } Duration::Duration(int64_t time0) : nanosecs(time0) {} Duration::operator int64_t() const { return nanosecs; } /** Nanoseconds per second. */ const Duration TIME_SEC = 1000*1000*1000; /** Nanoseconds per millisecond */ const Duration TIME_MSEC = 1000*1000; /** Nanoseconds per microseconds. */ const Duration TIME_USEC = 1000; /** Nanoseconds per nanosecond. */ const Duration TIME_NSEC = 1; /** Value to represent an infinite timeout */ const Duration TIME_INFINITE = std::numeric_limits::max(); /** Absolute time point for the Unix epoch: 1970-01-01T00:00:00 */ const AbsTime EPOCH = AbsTime::Epoch(); /** Time greater than any other time */ const AbsTime FAR_FUTURE = AbsTime::FarFuture(); /** Portable sleep for a number of seconds */ QPID_COMMON_EXTERN void sleep(int secs); /** Portable sleep for a number of microseconds */ QPID_COMMON_EXTERN void usleep(uint64_t usecs); /** Output formatted date/time for now*/ void outputFormattedNow(std::ostream&); /** Output unformatted nanosecond-resolution time for now */ void outputHiresNow(std::ostream&); }} #endif /*!_sys_Time_h*/ qpidc-0.16/include/qpid/sys/posix/0000775000076400007640000000000011752725714017507 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/sys/posix/Mutex.h0000664000076400007640000000665311227403641020761 0ustar00jrossjross00000000000000#ifndef _sys_posix_Mutex_h #define _sys_posix_Mutex_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/posix/check.h" #include #include namespace qpid { namespace sys { class Condition; /** * Mutex lock. */ class Mutex : private boost::noncopyable { friend class Condition; static const pthread_mutexattr_t* getAttribute(); public: typedef ::qpid::sys::ScopedLock ScopedLock; typedef ::qpid::sys::ScopedUnlock ScopedUnlock; inline Mutex(); inline ~Mutex(); inline void lock(); inline void unlock(); inline bool trylock(); protected: pthread_mutex_t mutex; }; /** * RW lock. */ class RWlock : private boost::noncopyable { friend class Condition; public: typedef ::qpid::sys::ScopedRlock ScopedRlock; typedef ::qpid::sys::ScopedWlock ScopedWlock; inline RWlock(); inline ~RWlock(); inline void wlock(); // will write-lock inline void rlock(); // will read-lock inline void unlock(); inline void trywlock(); // will write-try inline void tryrlock(); // will read-try protected: pthread_rwlock_t rwlock; }; /** * PODMutex is a POD, can be static-initialized with * PODMutex m = QPID_PODMUTEX_INITIALIZER */ struct PODMutex { typedef ::qpid::sys::ScopedLock ScopedLock; inline void lock(); inline void unlock(); inline bool trylock(); // Must be public to be a POD: pthread_mutex_t mutex; }; #define QPID_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER } void PODMutex::lock() { QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_lock(&mutex)); } void PODMutex::unlock() { QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_unlock(&mutex)); } bool PODMutex::trylock() { return pthread_mutex_trylock(&mutex) == 0; } Mutex::Mutex() { QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_init(&mutex, getAttribute())); } Mutex::~Mutex(){ QPID_POSIX_ABORT_IF(pthread_mutex_destroy(&mutex)); } void Mutex::lock() { QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_lock(&mutex)); } void Mutex::unlock() { QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_unlock(&mutex)); } bool Mutex::trylock() { return pthread_mutex_trylock(&mutex) == 0; } RWlock::RWlock() { QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_init(&rwlock, NULL)); } RWlock::~RWlock(){ QPID_POSIX_ABORT_IF(pthread_rwlock_destroy(&rwlock)); } void RWlock::wlock() { QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_wrlock(&rwlock)); } void RWlock::rlock() { QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_rdlock(&rwlock)); } void RWlock::unlock() { QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_unlock(&rwlock)); } void RWlock::trywlock() { QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_trywrlock(&rwlock)); } void RWlock::tryrlock() { QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_tryrdlock(&rwlock)); } }} #endif /*!_sys_posix_Mutex_h*/ qpidc-0.16/include/qpid/sys/posix/IntegerTypes.h0000775000076400007640000000166311227403641022300 0ustar00jrossjross00000000000000#ifndef QPID_SYS_POSIX_INTEGERTYPES_H #define QPID_SYS_POSIX_INTEGERTYPES_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #endif /*!QPID_SYS_INTEGERTYPES_H*/ qpidc-0.16/include/qpid/sys/posix/PrivatePosix.h0000664000076400007640000000376711263530041022312 0ustar00jrossjross00000000000000#ifndef _sys_posix_PrivatePosix_h #define _sys_posix_PrivatePosix_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/Time.h" #include "qpid/sys/IOHandle.h" struct timespec; struct timeval; struct addrinfo; namespace qpid { namespace sys { // Private Time related implementation details struct timespec& toTimespec(struct timespec& ts, const Duration& t); struct timeval& toTimeval(struct timeval& tv, const Duration& t); Duration toTime(const struct timespec& ts); // Private SocketAddress details class SocketAddress; const struct addrinfo& getAddrInfo(const SocketAddress&); // Private fd related implementation details class IOHandlePrivate { public: IOHandlePrivate(int f = -1) : fd(f) {} int fd; }; int toFd(const IOHandlePrivate* h); // Posix fd as an IOHandle class PosixIOHandle : public IOHandle { public: PosixIOHandle(int fd) : IOHandle(new IOHandlePrivate(fd)) {} }; // Dummy IOHandle for places it's required in the API // but we promise not to actually try to do any operations on the IOHandle class NullIOHandle : public IOHandle { public: NullIOHandle() : IOHandle(new IOHandlePrivate) {} }; extern NullIOHandle DummyIOHandle; }} #endif /*!_sys_posix_PrivatePosix_h*/ qpidc-0.16/include/qpid/sys/posix/check.h0000664000076400007640000000350711341561464020734 0ustar00jrossjross00000000000000#ifndef _posix_check_h #define _posix_check_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/Msg.h" #include #include #include #include #define QPID_POSIX_ERROR(ERRNO) qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO))) /** THROW QPID_POSIX_ERROR(errno) if RESULT is less than zero */ #define QPID_POSIX_CHECK(RESULT) \ if ((RESULT) < 0) throw QPID_POSIX_ERROR((errno)) /** Throw a posix error if ERRNO is non-zero */ #define QPID_POSIX_THROW_IF(ERRNO) \ do { int e=(ERRNO); if (e) throw QPID_POSIX_ERROR(e); } while(0) /** Same as _THROW_IF in a release build, but abort a debug build */ #ifdef NDEBUG #define QPID_POSIX_ASSERT_THROW_IF(ERRNO) QPID_POSIX_THROW_IF(ERRNO) #else #define QPID_POSIX_ASSERT_THROW_IF(ERRNO) \ do { int e=(ERRNO); if (e) { errno=e; ::perror(0); assert(0); } } while(0) #endif #define QPID_POSIX_ABORT_IF(ERRNO) if ((int) ERRNO) { errno=ERRNO; ::perror(0); abort(); } #endif /*!_posix_check_h*/ qpidc-0.16/include/qpid/sys/posix/Time.h0000775000076400007640000000160111227403641020544 0ustar00jrossjross00000000000000#ifndef QPID_SYS_POSIX_TIME_H #define QPID_SYS_POSIX_TIME_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/IntegerTypes.h" namespace qpid { namespace sys { /** * Class to represent an instant in time. */ typedef int64_t TimePrivate; }} // namespace qpid::sys #endif /*!QPID_SYS_POSIX_TIME_H*/ qpidc-0.16/include/qpid/sys/posix/Condition.h0000664000076400007640000000436411364215470021605 0ustar00jrossjross00000000000000#ifndef _sys_posix_Condition_h #define _sys_posix_Condition_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/sys/posix/PrivatePosix.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Time.h" #include #include #include namespace qpid { namespace sys { /** * A condition variable for thread synchronization. */ class Condition { public: inline Condition(); inline ~Condition(); inline void wait(Mutex&); inline bool wait(Mutex&, const AbsTime& absoluteTime); inline void notify(); inline void notifyAll(); private: pthread_cond_t condition; }; Condition::Condition() { QPID_POSIX_ASSERT_THROW_IF(pthread_cond_init(&condition, 0)); } Condition::~Condition() { QPID_POSIX_ABORT_IF(pthread_cond_destroy(&condition)); } void Condition::wait(Mutex& mutex) { QPID_POSIX_ASSERT_THROW_IF(pthread_cond_wait(&condition, &mutex.mutex)); } bool Condition::wait(Mutex& mutex, const AbsTime& absoluteTime){ struct timespec ts; toTimespec(ts, Duration(EPOCH, absoluteTime)); int status = pthread_cond_timedwait(&condition, &mutex.mutex, &ts); if (status != 0) { if (status == ETIMEDOUT) return false; throw QPID_POSIX_ERROR(status); } return true; } void Condition::notify(){ QPID_POSIX_ASSERT_THROW_IF(pthread_cond_signal(&condition)); } void Condition::notifyAll(){ QPID_POSIX_ASSERT_THROW_IF(pthread_cond_broadcast(&condition)); } }} #endif /*!_sys_posix_Condition_h*/ qpidc-0.16/include/qpid/sys/IOHandle.h0000664000076400007640000000247111267701361020136 0ustar00jrossjross00000000000000#ifndef _sys_IOHandle_h #define _sys_IOHandle_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" namespace qpid { namespace sys { /** * This is a class intended to abstract the Unix concept of file descriptor * or the Windows concept of HANDLE */ class PollerHandle; class IOHandlePrivate; class IOHandle { friend class PollerHandle; friend class IOHandlePrivate; protected: IOHandlePrivate* const impl; IOHandle(IOHandlePrivate*); QPID_COMMON_EXTERN virtual ~IOHandle(); }; }} #endif // _sys_IOHandle_h qpidc-0.16/include/qpid/sys/Condition.h0000664000076400007640000000202411227403641020427 0ustar00jrossjross00000000000000#ifndef _sys_Condition_h #define _sys_Condition_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifdef USE_APR_PLATFORM #include "apr/Condition.h" #elif defined (_WIN32) #include "windows/Condition.h" #else #include "posix/Condition.h" #endif #endif /*!_sys_Condition_h*/ qpidc-0.16/include/qpid/agent/0000775000076400007640000000000011752725714016625 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/agent/QmfAgentImportExport.h0000664000076400007640000000236211564561152023073 0ustar00jrossjross00000000000000#ifndef QMF_AGENT_IMPORT_EXPORT_H #define QMF_AGENT_IMPORT_EXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/ImportExport.h" #if defined(QMF_EXPORT) || defined (qmf_EXPORTS) # define QMF_AGENT_EXTERN QPID_EXPORT # define QMF_AGENT_CLASS_EXTERN QPID_CLASS_EXPORT # define QMF_AGENT_INLINE_EXTERN QPID_INLINE_EXPORT #else # define QMF_AGENT_EXTERN QPID_IMPORT # define QMF_AGENT_CLASS_EXTERN QPID_CLASS_IMPORT # define QMF_AGENT_INLINE_EXTERN QPID_INLINE_IMPORT #endif #endif qpidc-0.16/include/qpid/agent/ManagementAgent.h0000664000076400007640000002035711605133555022031 0ustar00jrossjross00000000000000#ifndef _qpid_agent_ManagementAgent_ #define _qpid_agent_ManagementAgent_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/agent/QmfAgentImportExport.h" #include "qpid/management/ManagementObject.h" #include "qpid/management/ManagementEvent.h" #include "qpid/management/Manageable.h" #include "qpid/management/ConnectionSettings.h" namespace qpid { namespace management { class Notifyable { public: virtual ~Notifyable() {} virtual void notify() = 0; }; class ManagementAgent { public: class Singleton { public: QMF_AGENT_EXTERN Singleton(bool disableManagement = false); QMF_AGENT_EXTERN ~Singleton(); QMF_AGENT_EXTERN static ManagementAgent* getInstance(); }; typedef enum { SEV_EMERG = 0, SEV_ALERT = 1, SEV_CRIT = 2, SEV_ERROR = 3, SEV_WARN = 4, SEV_NOTE = 5, SEV_INFO = 6, SEV_DEBUG = 7, SEV_DEFAULT = 8 } severity_t; ManagementAgent() {} virtual ~ManagementAgent() {} virtual int getMaxThreads() = 0; // Set the name of the agent // // vendor - Vendor name or domain (i.e. "apache.org") // product - Product name (i.e. "qpid") // instance - A unique identifier for this instance of the agent. // If empty, the agent will create a GUID for the instance. // Note: the ":" character is reserved - do no use it in the vendor or product name. // virtual void setName(const std::string& vendor, const std::string& product, const std::string& instance="") = 0; // Retrieve the name of the agent as assigned by setName() // virtual void getName(std::string& vendor, std::string& product, std::string& instance) = 0; // Obtain the fully qualified name of the agent // virtual const std::string& getAddress() = 0; // Connect to a management broker // // brokerHost - Hostname or IP address (dotted-quad) of broker. // // brokerPort - TCP port of broker. // // intervalSeconds - The interval (in seconds) that this agent shall use // between broadcast updates to the broker. // // useExternalThread - If true, the thread of control used for callbacks // must be supplied by the user of the object (via the // pollCallbacks method). // // If false, callbacks shall be invoked on the management // agent's thread. In this case, the callback implementations // MUST be thread safe. // // storeFile - File where this process has read and write access. This // file shall be used to store persistent state. // virtual void init(const std::string& brokerHost = "localhost", uint16_t brokerPort = 5672, uint16_t intervalSeconds = 10, bool useExternalThread = false, const std::string& storeFile = "", const std::string& uid = "", const std::string& pwd = "", const std::string& mech = "PLAIN", const std::string& proto = "tcp") = 0; virtual void init(const management::ConnectionSettings& settings, uint16_t intervalSeconds = 10, bool useExternalThread = false, const std::string& storeFile = "") = 0; // Register a schema with the management agent. This is normally called by the // package initializer generated by the management code generator. // virtual void registerClass(const std::string& packageName, const std::string& className, uint8_t* md5Sum, management::ManagementObject::writeSchemaCall_t schemaCall) = 0; virtual void registerEvent(const std::string& packageName, const std::string& eventName, uint8_t* md5Sum, management::ManagementEvent::writeSchemaCall_t schemaCall) = 0; // Add a management object to the agent. Once added, this object shall be visible // in the greater management context. // // Please note that ManagementObject instances are not explicitly deleted from // the management agent. When the core object represented by a management object // is deleted, the "resourceDestroy" method on the management object must be called. // It will then be reclaimed in due course by the management agent. // // Once a ManagementObject instance is added to the agent, the agent then owns the // instance. The caller MUST NOT free the resources of the instance at any time. // When it is no longer needed, invoke its "resourceDestroy" method and discard the // pointer. This allows the management agent to report the deletion of the object // in an orderly way. // virtual ObjectId addObject(ManagementObject* objectPtr, uint64_t persistId = 0) = 0; virtual ObjectId addObject(ManagementObject* objectPtr, const std::string& key, bool persistent = true) = 0; // // virtual void raiseEvent(const ManagementEvent& event, severity_t severity = SEV_DEFAULT) = 0; // If "useExternalThread" was set to true in init, this method must // be called to provide a thread for any pending method calls that have arrived. // The method calls for ManagementObject instances shall be invoked synchronously // during the execution of this method. // // callLimit may optionally be used to limit the number of callbacks invoked. // if 0, no limit is imposed. // // The return value is the number of callbacks that remain queued after this // call is complete. It can be used to determine whether or not further calls // to pollCallbacks are necessary to clear the backlog. If callLimit is zero, // the return value will also be zero. // virtual uint32_t pollCallbacks(uint32_t callLimit = 0) = 0; // In the "useExternalThread" scenario, there are three ways that an application can // use to be notified that there is work to do. Of course the application may periodically // call pollCallbacks if it wishes, but this will cause long latencies in the responses // to method calls. // // The notification methods are: // // 1) Register a C-style callback by providing a pointer to a function // 2) Register a C++-style callback by providing an object of a class that is derived // from Notifyable // 3) Call getSignalFd() to get a file descriptor that can be used in a select // call. The file descriptor shall become readable when the agent has work to // do. Note that this mechanism is specific to Posix-based operating environments. // getSignalFd will probably not function correctly on Windows. // // If a callback is registered, the callback function will be called on the agent's // thread. The callback function must perform no work other than to signal the application // thread to call pollCallbacks. // typedef void (*cb_t)(void*); virtual void setSignalCallback(cb_t callback, void* context) = 0; virtual void setSignalCallback(Notifyable& notifyable) = 0; virtual int getSignalFd() = 0; }; }} #endif /*!_qpid_agent_ManagementAgent_*/ qpidc-0.16/include/qpid/messaging/0000775000076400007640000000000011752725715017505 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/messaging/Session.h0000664000076400007640000001673011674106141021275 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_SESSION_H #define QPID_MESSAGING_SESSION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" #include "qpid/messaging/exceptions.h" #include "qpid/messaging/Duration.h" #include "qpid/messaging/Handle.h" #include namespace qpid { namespace messaging { #ifndef SWIG template class PrivateImplRef; #endif class Address; class Connection; class Message; class Sender; class Receiver; class SessionImpl; /** \ingroup messaging * A session represents a distinct 'conversation' which can involve * sending and receiving messages to and from different addresses. */ class QPID_MESSAGING_CLASS_EXTERN Session : public qpid::messaging::Handle { public: QPID_MESSAGING_EXTERN Session(SessionImpl* impl = 0); QPID_MESSAGING_EXTERN Session(const Session&); QPID_MESSAGING_EXTERN ~Session(); QPID_MESSAGING_EXTERN Session& operator=(const Session&); /** * Closes a session and all associated senders and receivers. An * opened session should be closed before the last handle to it * goes out of scope. All a connections sessions can be closed by * a call to Connection::close(). */ QPID_MESSAGING_EXTERN void close(); /** * Commits the sessions transaction. * * @exception TransactionAborted if the original session is lost * forcing an automatic rollback. */ QPID_MESSAGING_EXTERN void commit(); QPID_MESSAGING_EXTERN void rollback(); /** * Acknowledges all outstanding messages that have been received * by the application on this session. * * @param sync if true, blocks until the acknowledgement has been * processed by the server */ QPID_MESSAGING_EXTERN void acknowledge(bool sync=false); /** * Acknowledges the specified message. */ QPID_MESSAGING_EXTERN void acknowledge(Message&, bool sync=false); /** * Acknowledges all message up to the specified message. */ QPID_MESSAGING_EXTERN void acknowledgeUpTo(Message&, bool sync=false); /** * Rejects the specified message. The broker does not redeliver a * message that has been rejected. Once a message has been * acknowledged, it can no longer be rejected. */ QPID_MESSAGING_EXTERN void reject(Message&); /** * Releases the specified message. The broker may redeliver the * message. Once a message has been acknowledged, it can no longer * be released. */ QPID_MESSAGING_EXTERN void release(Message&); /** * Request synchronisation with the server. * * @param block if true, this call will block until the server * confirms completion of all pending operations; if false the * call will request notification from the server but will return * before receiving it. */ QPID_MESSAGING_EXTERN void sync(bool block=true); /** * Returns the total number of messages received and waiting to be * fetched by all Receivers belonging to this session. This is the * total number of available messages across all receivers on this * session. */ QPID_MESSAGING_EXTERN uint32_t getReceivable(); /** * Returns a count of the number of messages received this session * that have been acknowledged, but for which that acknowledgement * has not yet been confirmed as processed by the server. */ QPID_MESSAGING_EXTERN uint32_t getUnsettledAcks(); /** * Retrieves the receiver for the next available message. If there * are no available messages at present the call will block for up * to the specified timeout waiting for one to arrive. Returns * true if a message was available at the point of return, in * which case the passed in receiver reference will be set to the * receiver for that message or false if no message was available. */ QPID_MESSAGING_EXTERN bool nextReceiver(Receiver&, Duration timeout=Duration::FOREVER); /** * Returns the receiver for the next available message. If there * are no available messages at present the call will block for up * to the specified timeout waiting for one to arrive. * * @exception Receiver::NoMessageAvailable if no message became * available in time. */ QPID_MESSAGING_EXTERN Receiver nextReceiver(Duration timeout=Duration::FOREVER); /** * Create a new sender through which messages can be sent to the * specified address. * * @exception ResolutionError if there is an error in resolving * the address */ QPID_MESSAGING_EXTERN Sender createSender(const Address& address); /** * Create a new sender through which messages can be sent to the * specified address. * * @exception ResolutionError if there is an error in resolving * the address * * @exception MalformedAddress if the syntax of address is not * valid */ QPID_MESSAGING_EXTERN Sender createSender(const std::string& address); /** * Create a new receiver through which messages can be received * from the specified address. * * @exception ResolutionError if there is an error in resolving * the address */ QPID_MESSAGING_EXTERN Receiver createReceiver(const Address& address); /** * Create a new receiver through which messages can be received * from the specified address. * * @exception ResolutionError if there is an error in resolving * the address * * @exception MalformedAddress if the syntax of address is not * valid */ QPID_MESSAGING_EXTERN Receiver createReceiver(const std::string& address); /** * Returns the sender with the specified name. * @exception KeyError if there is none for that name. */ QPID_MESSAGING_EXTERN Sender getSender(const std::string& name) const; /** * Returns the receiver with the specified name. * @exception KeyError if there is none for that name. */ QPID_MESSAGING_EXTERN Receiver getReceiver(const std::string& name) const; /** * Returns a handle to the connection this session is associated * with. */ QPID_MESSAGING_EXTERN Connection getConnection() const; /** * @returns true if the session has been rendered invalid by some * exception, false if it is valid for use. */ QPID_MESSAGING_EXTERN bool hasError(); /** * If the session has been rendered invalid by some exception, * this method will result in that exception being thrown on * calling this method. */ QPID_MESSAGING_EXTERN void checkError(); #ifndef SWIG private: friend class qpid::messaging::PrivateImplRef; #endif }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_SESSION_H*/ qpidc-0.16/include/qpid/messaging/FailoverUpdates.h0000664000076400007640000000312611564561152022747 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_AMQP0_10_FAILOVERUPDATES_H #define QPID_CLIENT_AMQP0_10_FAILOVERUPDATES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" namespace qpid { namespace messaging { class Connection; struct FailoverUpdatesImpl; /** * A utility to listen for updates on cluster membership and update * the list of known urls for a connection accordingly. */ class QPID_MESSAGING_CLASS_EXTERN FailoverUpdates { public: QPID_MESSAGING_EXTERN FailoverUpdates(Connection& connection); QPID_MESSAGING_EXTERN ~FailoverUpdates(); private: FailoverUpdatesImpl* impl; //no need to copy instances of this class FailoverUpdates(const FailoverUpdates&); FailoverUpdates& operator=(const FailoverUpdates&); }; }} // namespace qpid::messaging #endif /*!QPID_CLIENT_AMQP0_10_FAILOVERUPDATES_H*/ qpidc-0.16/include/qpid/messaging/Message.h0000664000076400007640000002224111575671260021241 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_MESSAGE_H #define QPID_MESSAGING_MESSAGE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" #include "qpid/messaging/Duration.h" #include "qpid/types/Exception.h" #include "qpid/types/Variant.h" #include namespace qpid { namespace messaging { class Address; class Codec; struct MessageImpl; /** \ingroup messaging * Representation of a message. */ class QPID_MESSAGING_CLASS_EXTERN Message { public: QPID_MESSAGING_EXTERN Message(const std::string& bytes = std::string()); QPID_MESSAGING_EXTERN Message(const char*, size_t); QPID_MESSAGING_EXTERN Message(const Message&); QPID_MESSAGING_EXTERN ~Message(); QPID_MESSAGING_EXTERN Message& operator=(const Message&); QPID_MESSAGING_EXTERN void setReplyTo(const Address&); QPID_MESSAGING_EXTERN const Address& getReplyTo() const; QPID_MESSAGING_EXTERN void setSubject(const std::string&); QPID_MESSAGING_EXTERN const std::string& getSubject() const; /** * Set the content type (i.e. the MIME type) for the message. This * should be set by the sending application and indicates to * recipients of message how to interpret or decode the content. */ QPID_MESSAGING_EXTERN void setContentType(const std::string&); /** * Returns the content type (i.e. the MIME type) for the * message. This can be used to determine how to decode the * message content. */ QPID_MESSAGING_EXTERN const std::string& getContentType() const; /** * Set an application defined identifier for the message. At * present this must be a stringfied UUID (support for less * restrictive IDs is anticipated however). */ QPID_MESSAGING_EXTERN void setMessageId(const std::string&); QPID_MESSAGING_EXTERN const std::string& getMessageId() const; /** * Sets the user id of the message. This should in general be the * user-id as which the sending connection authenticated itself as * the messaging infrastructure will verify this. See * Connection::getAuthenticatedUsername() */ QPID_MESSAGING_EXTERN void setUserId(const std::string&); QPID_MESSAGING_EXTERN const std::string& getUserId() const; /** * Can be used to set application specific correlation identifiers * as part of a protocol for message exchange patterns. E.g. a * request-reponse pattern might require the correlation-id of the * request and response to match, or might use the message-id of * the request as the correlation-id on the response etc. */ QPID_MESSAGING_EXTERN void setCorrelationId(const std::string&); QPID_MESSAGING_EXTERN const std::string& getCorrelationId() const; /** * Sets a priority level on the message. This may be used by the * messaging infrastructure to prioritise delivery of higher * priority messages. */ QPID_MESSAGING_EXTERN void setPriority(uint8_t); QPID_MESSAGING_EXTERN uint8_t getPriority() const; /** * Set the time to live for this message in milliseconds. This can * be used by the messaging infrastructure to discard messages * that are no longer of relevance. */ QPID_MESSAGING_EXTERN void setTtl(Duration ttl); /** *Get the time to live for this message in milliseconds. */ QPID_MESSAGING_EXTERN Duration getTtl() const; /** * Mark the message as durable. This is a hint to the messaging * infrastructure that the message should be persisted or * otherwise stored such that failoures or shutdown do not cause * it to be lost. */ QPID_MESSAGING_EXTERN void setDurable(bool durable); QPID_MESSAGING_EXTERN bool getDurable() const; /** * The redelivered flag if set implies that the message *may* have * been previously delivered and thus is a hint to the application * or messaging infrastructure that if de-duplication is required * this message should be examined to determine if it is a * duplicate. */ QPID_MESSAGING_EXTERN bool getRedelivered() const; /** * Can be used to provide a hint to the application or messaging * infrastructure that if de-duplication is required this message * should be examined to determine if it is a duplicate. */ QPID_MESSAGING_EXTERN void setRedelivered(bool); /** * In addition to a payload (i.e. the content), messages can * include annotations describing aspectf of the message. In * addition to the standard annotations such as TTL and content * type, application- or context- specific properties can also be * defined. Each message has a map of name values for such custom * properties. The value is specified as a Variant. */ QPID_MESSAGING_EXTERN const qpid::types::Variant::Map& getProperties() const; QPID_MESSAGING_EXTERN qpid::types::Variant::Map& getProperties(); /** * Set the content to the data held in the string parameter. Note: * this is treated as raw bytes and need not be text. Consider * setting the content-type to indicate how the data should be * interpreted by recipients. */ QPID_MESSAGING_EXTERN void setContent(const std::string&); /** * Copy count bytes from the region pointed to by chars as the * message content. */ QPID_MESSAGING_EXTERN void setContent(const char* chars, size_t count); /** Get the content as a std::string */ QPID_MESSAGING_EXTERN std::string getContent() const; /** * Get a const pointer to the start of the content data. The * memory pointed to is owned by the message. The getContentSize() * method indicates how much data there is (i.e. the extent of the * memory region pointed to by the return value of this method). */ QPID_MESSAGING_EXTERN const char* getContentPtr() const; /** Get the size of content in bytes. */ QPID_MESSAGING_EXTERN size_t getContentSize() const; QPID_MESSAGING_EXTERN void setProperty(const std::string&, const qpid::types::Variant&); private: MessageImpl* impl; friend struct MessageImplAccess; }; struct QPID_MESSAGING_CLASS_EXTERN EncodingException : qpid::types::Exception { QPID_MESSAGING_EXTERN EncodingException(const std::string& msg); }; /** * Decodes message content into a Variant::Map. * * @param message the message whose content should be decoded * @param map the map into which the message contents will be decoded * @param encoding if specified, the encoding to use - this overrides * any encoding specified by the content-type of the message * @exception EncodingException */ QPID_MESSAGING_EXTERN void decode(const Message& message, qpid::types::Variant::Map& map, const std::string& encoding = std::string()); /** * Decodes message content into a Variant::List. * * @param message the message whose content should be decoded * @param list the list into which the message contents will be decoded * @param encoding if specified, the encoding to use - this overrides * any encoding specified by the content-type of the message * @exception EncodingException */ QPID_MESSAGING_EXTERN void decode(const Message& message, qpid::types::Variant::List& list, const std::string& encoding = std::string()); /** * Encodes a Variant::Map into a message. * * @param map the map to be encoded * @param message the message whose content should be set to the encoded map * @param encoding if specified, the encoding to use - this overrides * any encoding specified by the content-type of the message * @exception EncodingException */ QPID_MESSAGING_EXTERN void encode(const qpid::types::Variant::Map& map, Message& message, const std::string& encoding = std::string()); /** * Encodes a Variant::List into a message. * * @param list the list to be encoded * @param message the message whose content should be set to the encoded list * @param encoding if specified, the encoding to use - this overrides * any encoding specified by the content-type of the message * @exception EncodingException */ QPID_MESSAGING_EXTERN void encode(const qpid::types::Variant::List& list, Message& message, const std::string& encoding = std::string()); }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_MESSAGE_H*/ qpidc-0.16/include/qpid/messaging/exceptions.h0000664000076400007640000001342611631216107022027 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_EXCEPTIONS_H #define QPID_MESSAGING_EXCEPTIONS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" #include "qpid/types/Exception.h" #include "qpid/types/Variant.h" namespace qpid { namespace messaging { /** \ingroup messaging */ /** * This is the base class for all messaging related exceptions thrown * by this API. */ struct QPID_MESSAGING_CLASS_EXTERN MessagingException : public qpid::types::Exception { QPID_MESSAGING_EXTERN MessagingException(const std::string& msg); QPID_MESSAGING_EXTERN virtual ~MessagingException() throw(); qpid::types::Variant::Map detail; //TODO: override what() to include detail if present }; /** * Thrown when the syntax of the option string used to configure a * connection in not valid */ struct QPID_MESSAGING_CLASS_EXTERN InvalidOptionString : public MessagingException { QPID_MESSAGING_EXTERN InvalidOptionString(const std::string& msg); }; /** * Thrown to indicate a failed lookup of some local object. For * example when attempting to retrieve a session, sender or receiver * by name. */ struct QPID_MESSAGING_CLASS_EXTERN KeyError : public MessagingException { QPID_MESSAGING_EXTERN KeyError(const std::string&); }; struct QPID_MESSAGING_CLASS_EXTERN LinkError : public MessagingException { QPID_MESSAGING_EXTERN LinkError(const std::string&); }; struct QPID_MESSAGING_CLASS_EXTERN AddressError : public LinkError { QPID_MESSAGING_EXTERN AddressError(const std::string&); }; /** * Thrown when a syntactically correct address cannot be resolved or * used. */ struct QPID_MESSAGING_CLASS_EXTERN ResolutionError : public AddressError { QPID_MESSAGING_EXTERN ResolutionError(const std::string& msg); }; /** * Thrown when creating a sender or receiver for an address for which * some asserted property of the node is not matched. */ struct QPID_MESSAGING_CLASS_EXTERN AssertionFailed : public ResolutionError { QPID_MESSAGING_EXTERN AssertionFailed(const std::string& msg); }; /** * Thrown on attempts to create a sender or receiver to a non-existent * node. */ struct QPID_MESSAGING_CLASS_EXTERN NotFound : public ResolutionError { QPID_MESSAGING_EXTERN NotFound(const std::string& msg); }; /** * Thrown when an address string with invalid syntax is used. */ struct QPID_MESSAGING_CLASS_EXTERN MalformedAddress : public AddressError { QPID_MESSAGING_EXTERN MalformedAddress(const std::string& msg); }; struct QPID_MESSAGING_CLASS_EXTERN ReceiverError : public LinkError { QPID_MESSAGING_EXTERN ReceiverError(const std::string&); }; struct QPID_MESSAGING_CLASS_EXTERN FetchError : public ReceiverError { QPID_MESSAGING_EXTERN FetchError(const std::string&); }; /** * Thrown by Receiver::fetch(), Receiver::get() and * Session::nextReceiver() to indicate that there no message was * available before the timeout specified. */ struct QPID_MESSAGING_CLASS_EXTERN NoMessageAvailable : public FetchError { QPID_MESSAGING_EXTERN NoMessageAvailable(); }; struct QPID_MESSAGING_CLASS_EXTERN SenderError : public LinkError { QPID_MESSAGING_EXTERN SenderError(const std::string&); }; struct QPID_MESSAGING_CLASS_EXTERN SendError : public SenderError { QPID_MESSAGING_EXTERN SendError(const std::string&); }; /** * Thrown to indicate that the sender attempted to send a message that * would result in the target node on the peer exceeding a * preconfigured capacity. */ struct QPID_MESSAGING_CLASS_EXTERN TargetCapacityExceeded : public SendError { QPID_MESSAGING_EXTERN TargetCapacityExceeded(const std::string&); }; struct QPID_MESSAGING_CLASS_EXTERN SessionError : public MessagingException { QPID_MESSAGING_EXTERN SessionError(const std::string&); }; struct QPID_MESSAGING_CLASS_EXTERN TransactionError : public SessionError { QPID_MESSAGING_EXTERN TransactionError(const std::string&); }; /** * Thrown on Session::commit() if reconnection results in the * transaction being automatically aborted. */ struct QPID_MESSAGING_CLASS_EXTERN TransactionAborted : public TransactionError { QPID_MESSAGING_EXTERN TransactionAborted(const std::string&); }; /** * Thrown to indicate that the application attempted to do something * for which it was not authorised by its peer. */ struct QPID_MESSAGING_CLASS_EXTERN UnauthorizedAccess : public SessionError { QPID_MESSAGING_EXTERN UnauthorizedAccess(const std::string&); }; struct QPID_MESSAGING_CLASS_EXTERN ConnectionError : public MessagingException { QPID_MESSAGING_EXTERN ConnectionError(const std::string&); }; /** * Thrown to indicate loss of underlying connection. When * auto-reconnect is used this will be caught by the library and used * to trigger reconnection attempts. If reconnection fails (according * to whatever settings have been configured), then an instnace of * this class will be thrown to signal that. */ struct QPID_MESSAGING_CLASS_EXTERN TransportFailure : public MessagingException { QPID_MESSAGING_EXTERN TransportFailure(const std::string&); }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_EXCEPTIONS_H*/ qpidc-0.16/include/qpid/messaging/Connection.h0000664000076400007640000001050411717465066021756 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_CONNECTION_H #define QPID_MESSAGING_CONNECTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" #include "qpid/messaging/Handle.h" #include "qpid/messaging/exceptions.h" #include "qpid/types/Variant.h" #include namespace qpid { namespace messaging { #ifndef SWIG template class PrivateImplRef; #endif class ConnectionImpl; class Session; /** \ingroup messaging * A connection represents a network connection to a remote endpoint. */ class QPID_MESSAGING_CLASS_EXTERN Connection : public qpid::messaging::Handle { public: QPID_MESSAGING_EXTERN Connection(ConnectionImpl* impl); QPID_MESSAGING_EXTERN Connection(const Connection&); QPID_MESSAGING_EXTERN Connection(); /** * Current implementation supports the following options: * * - username * - password * - heartbeat * - tcp_nodelay * - sasl_mechanisms * - sasl_service * - sasl_min_ssf * - sasl_max_ssf * - transport * * Reconnect behaviour can be controlled through the following options: * * - reconnect: true/false (enables/disables reconnect entirely) * - reconnect_timeout: seconds (give up and report failure after specified time) * - reconnect_limit: n (give up and report failure after specified number of attempts) * - reconnect_interval_min: seconds (initial delay between failed reconnection attempts) * - reconnect_interval_max: seconds (maximum delay between failed reconnection attempts) * - reconnect_interval: shorthand for setting the same reconnect_interval_min/max * - reconnect_urls: list of alternate urls to try when connecting * * The reconnect_interval is the time that the client waits for * after a failed attempt to reconnect before retrying. It starts * at the value of the min_retry_interval and is doubled every * failure until the value of max_retry_interval is reached. * * Values in seconds can be fractional, for example 0.001 is a * millisecond delay. */ QPID_MESSAGING_EXTERN Connection(const std::string& url, const qpid::types::Variant::Map& options = qpid::types::Variant::Map()); /** * Creates a connection using an option string of the form * {name:value,name2:value2...}, see above for options supported. * * @exception InvalidOptionString if the string does not match the correct syntax */ QPID_MESSAGING_EXTERN Connection(const std::string& url, const std::string& options); QPID_MESSAGING_EXTERN ~Connection(); QPID_MESSAGING_EXTERN Connection& operator=(const Connection&); QPID_MESSAGING_EXTERN void setOption(const std::string& name, const qpid::types::Variant& value); QPID_MESSAGING_EXTERN void open(); QPID_MESSAGING_EXTERN bool isOpen(); QPID_MESSAGING_EXTERN bool isOpen() const; /** * Closes a connection and all sessions associated with it. An * opened connection must be closed before the last handle is * allowed to go out of scope. */ QPID_MESSAGING_EXTERN void close(); QPID_MESSAGING_EXTERN Session createTransactionalSession(const std::string& name = std::string()); QPID_MESSAGING_EXTERN Session createSession(const std::string& name = std::string()); QPID_MESSAGING_EXTERN Session getSession(const std::string& name) const; QPID_MESSAGING_EXTERN std::string getAuthenticatedUsername(); #ifndef SWIG private: friend class qpid::messaging::PrivateImplRef; #endif }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_CONNECTION_H*/ qpidc-0.16/include/qpid/messaging/ImportExport.h0000664000076400007640000000251111564561152022323 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_IMPORTEXPORT_H #define QPID_MESSAGING_IMPORTEXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/ImportExport.h" #if defined(CLIENT_EXPORT) || defined (qpidmessaging_EXPORTS) # define QPID_MESSAGING_EXTERN QPID_EXPORT # define QPID_MESSAGING_CLASS_EXTERN QPID_CLASS_EXPORT # define QPID_MESSAGING_INLINE_EXTERN QPID_INLINE_EXPORT #else # define QPID_MESSAGING_EXTERN QPID_IMPORT # define QPID_MESSAGING_CLASS_EXTERN QPID_CLASS_IMPORT # define QPID_MESSAGING_INLINE_EXTERN QPID_INLINE_IMPORT #endif #endif /*!QPID_MESSAGING_IMPORTEXPORT_H*/ qpidc-0.16/include/qpid/messaging/Handle.h0000664000076400007640000000450311564561152021045 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_HANDLE_H #define QPID_MESSAGING_HANDLE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" namespace qpid { namespace messaging { template class PrivateImplRef; /** \ingroup messaging * A handle is like a pointer: refers to an underlying implementation object. * Copying the handle does not copy the object. * * Handles can be null, like a 0 pointer. Use isValid(), isNull() or the * conversion to bool to test for a null handle. */ template class Handle { public: /**@return true if handle is valid, i.e. not null. */ QPID_MESSAGING_INLINE_EXTERN bool isValid() const { return impl; } /**@return true if handle is null. It is an error to call any function on a null handle. */ QPID_MESSAGING_INLINE_EXTERN bool isNull() const { return !impl; } /** Conversion to bool supports idiom if (handle) { handle->... } */ QPID_MESSAGING_INLINE_EXTERN operator bool() const { return impl; } /** Operator ! supports idiom if (!handle) { do_if_handle_is_null(); } */ QPID_MESSAGING_INLINE_EXTERN bool operator !() const { return !impl; } void swap(Handle& h) { T* t = h.impl; h.impl = impl; impl = t; } protected: typedef T Impl; QPID_MESSAGING_INLINE_EXTERN Handle() :impl() {} // Not implemented,subclasses must implement. QPID_MESSAGING_EXTERN Handle(const Handle&); QPID_MESSAGING_EXTERN Handle& operator=(const Handle&); Impl* impl; friend class PrivateImplRef; }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_HANDLE_H*/ qpidc-0.16/include/qpid/messaging/Sender.h0000664000076400007640000000577611564561152021107 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_SENDER_H #define QPID_MESSAGING_SENDER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" #include "qpid/messaging/Handle.h" #include "qpid/sys/IntegerTypes.h" #include namespace qpid { namespace messaging { #ifndef SWIG template class PrivateImplRef; #endif class Message; class SenderImpl; class Session; /** \ingroup messaging * Interface through which messages are sent. */ class QPID_MESSAGING_CLASS_EXTERN Sender : public qpid::messaging::Handle { public: QPID_MESSAGING_EXTERN Sender(SenderImpl* impl = 0); QPID_MESSAGING_EXTERN Sender(const Sender&); QPID_MESSAGING_EXTERN ~Sender(); QPID_MESSAGING_EXTERN Sender& operator=(const Sender&); /** * Sends a message * * @param message the message to send * @param sync if true the call will block until the server * confirms receipt of the messages; if false will only block for * available capacity (i.e. pending == capacity) */ QPID_MESSAGING_EXTERN void send(const Message& message, bool sync=false); QPID_MESSAGING_EXTERN void close(); /** * Sets the capacity for the sender. The capacity determines how * many outgoing messages can be held pending confirmation of * receipt by the broker. */ QPID_MESSAGING_EXTERN void setCapacity(uint32_t); /** * Returns the capacity of the sender. * @see setCapacity */ QPID_MESSAGING_EXTERN uint32_t getCapacity(); /** * Returns the number of sent messages pending confirmation of * receipt by the broker. (These are the 'in-doubt' messages). */ QPID_MESSAGING_EXTERN uint32_t getUnsettled(); /** * Returns the number of messages for which there is available * capacity. */ QPID_MESSAGING_EXTERN uint32_t getAvailable(); /** * Returns the name of this sender. */ QPID_MESSAGING_EXTERN const std::string& getName() const; /** * Returns a handle to the session associated with this sender. */ QPID_MESSAGING_EXTERN Session getSession() const; #ifndef SWIG private: friend class qpid::messaging::PrivateImplRef; #endif }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_SENDER_H*/ qpidc-0.16/include/qpid/messaging/Duration.h0000664000076400007640000000373711564561152021447 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_DURATION_H #define QPID_MESSAGING_DURATION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" #include "qpid/sys/IntegerTypes.h" namespace qpid { namespace messaging { /** \ingroup messaging * A duration is a time in milliseconds. */ class QPID_MESSAGING_CLASS_EXTERN Duration { public: QPID_MESSAGING_EXTERN explicit Duration(uint64_t milliseconds); QPID_MESSAGING_EXTERN uint64_t getMilliseconds() const; QPID_MESSAGING_EXTERN static const Duration FOREVER; QPID_MESSAGING_EXTERN static const Duration IMMEDIATE; QPID_MESSAGING_EXTERN static const Duration SECOND; QPID_MESSAGING_EXTERN static const Duration MINUTE; private: uint64_t milliseconds; }; QPID_MESSAGING_EXTERN Duration operator*(const Duration& duration, uint64_t multiplier); QPID_MESSAGING_EXTERN Duration operator*(uint64_t multiplier, const Duration& duration); QPID_MESSAGING_EXTERN bool operator==(const Duration& a, const Duration& b); QPID_MESSAGING_EXTERN bool operator!=(const Duration& a, const Duration& b); }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_DURATION_H*/ qpidc-0.16/include/qpid/messaging/Address.h0000664000076400007640000001365511564561152021247 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_ADDRESS_H #define QPID_MESSAGING_ADDRESS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" #include "qpid/messaging/exceptions.h" #include "qpid/types/Variant.h" #include #include namespace qpid { namespace messaging { class AddressImpl; /** \ingroup messaging * Represents an address to which messages can be sent and from which * messages can be received. Often a simple name is sufficient for * this, however this can be augmented with a subject pattern and * options. * * All parts of an address can be specified in a string of the * following form: * * <address> [ / <subject> ] ; [ { <key> : <value> , ... } ] * * Here the <address> is a simple name for the addressed * entity and <subject> is a subject or subject pattern for * messages sent to or received from this address. The options are * specified as a series of key value pairs enclosed in curly brackets * (denoting a map). Values can be nested maps, or lists (which are * denoted as a comma separated list of values inside square brackets, * e.g. [a, b, c]). * * The currently supported options are as follows: * * * * * * * * * * * * * * * * * * * * * * * * * * * * * For receivers there is one other option of interest: * *
createIndicate whether the address should be automatically created * or not. Can be one of always, never, * sender or receiver. The properties of the node * to be created can be specified via the node options (see * below). *
assertIndicate whether or not to assert any specified node * properties(see below) match the address. Can be one of * always, never, sender or * receiver. *
deleteIndicate whether or not to delete the addressed node when a * sender or receiver is cancelled. Can be one of always, * never, sender or receiver. *
nodeA nested map describing properties of the addressed * node. Current properties supported are type (topic or queue), * durable (boolean), x-declare and x-bindings. The x-declare * option is a nested map in whcih protocol amqp 0-10 specific * options for queue or exchange declare can be specified. The * x-bindings option is a nested list, each element of which can * specify a queue, an exchange, a binding-key and arguments, * which are used to establish a binding on create. The node * will be used if queue or exchange values are not specified. *
linkA nested map through which properties of the 'link' from * sender/receiver to node can be configured. Current propeties * are name, durable, realiability, x-declare, x-subscribe and * x-bindings. *
* *
mode(only relevant for queues) * indicates whether the subscribe should consume (the default) or * merely browse the messages. Valid values are 'consume' and * 'browse'
* * An address has value semantics. */ class QPID_MESSAGING_CLASS_EXTERN Address { public: QPID_MESSAGING_EXTERN Address(); QPID_MESSAGING_EXTERN Address(const std::string& address); QPID_MESSAGING_EXTERN Address(const std::string& name, const std::string& subject, const qpid::types::Variant::Map& options, const std::string& type = ""); QPID_MESSAGING_EXTERN Address(const Address& address); QPID_MESSAGING_EXTERN ~Address(); QPID_MESSAGING_EXTERN Address& operator=(const Address&); QPID_MESSAGING_EXTERN const std::string& getName() const; QPID_MESSAGING_EXTERN void setName(const std::string&); QPID_MESSAGING_EXTERN const std::string& getSubject() const; QPID_MESSAGING_EXTERN void setSubject(const std::string&); QPID_MESSAGING_EXTERN const qpid::types::Variant::Map& getOptions() const; QPID_MESSAGING_EXTERN qpid::types::Variant::Map& getOptions(); QPID_MESSAGING_EXTERN void setOptions(const qpid::types::Variant::Map&); QPID_MESSAGING_EXTERN std::string getType() const; /** * The type of and addressed node influences how receivers and * senders are constructed for it. It also affects how a reply-to * address is encoded. If the type is not specified in the address * itself, it will be automatically determined by querying the * broker. The type can be explicitly set to prevent this if * needed. */ QPID_MESSAGING_EXTERN void setType(const std::string&); QPID_MESSAGING_EXTERN std::string str() const; QPID_MESSAGING_EXTERN operator bool() const; QPID_MESSAGING_EXTERN bool operator !() const; private: AddressImpl* impl; }; #ifndef SWIG QPID_MESSAGING_EXTERN std::ostream& operator<<(std::ostream& out, const Address& address); #endif }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_ADDRESS_H*/ qpidc-0.16/include/qpid/messaging/Receiver.h0000664000076400007640000001177711564561152021431 0ustar00jrossjross00000000000000#ifndef QPID_MESSAGING_RECEIVER_H #define QPID_MESSAGING_RECEIVER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/messaging/ImportExport.h" #include "qpid/messaging/exceptions.h" #include "qpid/messaging/Handle.h" #include "qpid/messaging/Duration.h" namespace qpid { namespace messaging { #ifndef SWIG template class PrivateImplRef; #endif class Message; class ReceiverImpl; class Session; /** \ingroup messaging * Interface through which messages are received. */ class QPID_MESSAGING_CLASS_EXTERN Receiver : public qpid::messaging::Handle { public: QPID_MESSAGING_EXTERN Receiver(ReceiverImpl* impl = 0); QPID_MESSAGING_EXTERN Receiver(const Receiver&); QPID_MESSAGING_EXTERN ~Receiver(); QPID_MESSAGING_EXTERN Receiver& operator=(const Receiver&); /** * Retrieves a message from this receivers local queue, or waits * for upto the specified timeout for a message to become * available. */ QPID_MESSAGING_EXTERN bool get(Message& message, Duration timeout=Duration::FOREVER); /** * Retrieves a message from this receivers local queue, or waits * for up to the specified timeout for a message to become * available. * * @exception NoMessageAvailable if there is no message to give * after waiting for the specified timeout, or if the Receiver is * closed, in which case isClose() will be true. */ QPID_MESSAGING_EXTERN Message get(Duration timeout=Duration::FOREVER); /** * Retrieves a message for this receivers subscription or waits * for up to the specified timeout for one to become * available. Unlike get() this method will check with the server * that there is no message for the subscription this receiver is * serving before returning false. * * @return false if there is no message to give after * waiting for the specified timeout, or if the Receiver is * closed, in which case isClose() will be true. */ QPID_MESSAGING_EXTERN bool fetch(Message& message, Duration timeout=Duration::FOREVER); /** * Retrieves a message for this receivers subscription or waits * for up to the specified timeout for one to become * available. Unlike get() this method will check with the server * that there is no message for the subscription this receiver is * serving before throwing an exception. * * @exception NoMessageAvailable if there is no message to give * after waiting for the specified timeout, or if the Receiver is * closed, in which case isClose() will be true. */ QPID_MESSAGING_EXTERN Message fetch(Duration timeout=Duration::FOREVER); /** * Sets the capacity for the receiver. The capacity determines how * many incoming messages can be held in the receiver before being * requested by a client via fetch() (or pushed to a listener). */ QPID_MESSAGING_EXTERN void setCapacity(uint32_t); /** * @return the capacity of the receiver. The capacity determines * how many incoming messages can be held in the receiver before * being requested by a client via fetch() (or pushed to a * listener). */ QPID_MESSAGING_EXTERN uint32_t getCapacity(); /** * @return the number of messages received and waiting to be * fetched. */ QPID_MESSAGING_EXTERN uint32_t getAvailable(); /** * @return a count of the number of messages received on this * receiver that have been acknowledged, but for which that * acknowledgement has not yet been confirmed as processed by the * server. */ QPID_MESSAGING_EXTERN uint32_t getUnsettled(); /** * Cancels this receiver. */ QPID_MESSAGING_EXTERN void close(); /** * Return true if the receiver was closed by a call to close() */ QPID_MESSAGING_EXTERN bool isClosed() const; /** * Returns the name of this receiver. */ QPID_MESSAGING_EXTERN const std::string& getName() const; /** * Returns a handle to the session associated with this receiver. */ QPID_MESSAGING_EXTERN Session getSession() const; #ifndef SWIG private: friend class qpid::messaging::PrivateImplRef; #endif }; }} // namespace qpid::messaging #endif /*!QPID_MESSAGING_RECEIVER_H*/ qpidc-0.16/include/qpid/InlineAllocator.h0000664000076400007640000000625011227403641020747 0ustar00jrossjross00000000000000#ifndef QPID_INLINEALLOCATOR_H #define QPID_INLINEALLOCATOR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include namespace qpid { template struct InlineRebind; /** * An allocator that has inline storage for up to Max objects * of type BaseAllocator::value_type. */ template class InlineAllocator : public BaseAllocator { public: typedef typename BaseAllocator::pointer pointer; typedef typename BaseAllocator::size_type size_type; typedef typename BaseAllocator::value_type value_type; InlineAllocator() : allocated(false) {} InlineAllocator(const InlineAllocator& x) : BaseAllocator(x), allocated(false) {} pointer allocate(size_type n) { if (n <= Max && !allocated) { allocated=true; return reinterpret_cast(address()); } else return BaseAllocator::allocate(n, 0); } void deallocate(pointer p, size_type n) { if (p == address()) { assert(allocated); allocated=false; } else BaseAllocator::deallocate(p, n); } template struct rebind { typedef typename InlineRebind::other other; }; private: // POD object with alignment and size to hold Max value_types. static const size_t ALIGNMENT=boost::alignment_of::value; typedef typename boost::type_with_alignment::type Aligner; union Store { Aligner aligner_; char sizer_[sizeof(value_type)*Max]; } store; value_type* address() { return reinterpret_cast(&store); } bool allocated; }; // Rebind: if RequestedType == InlineType, use the InlineAllocator, // otherwise, use the BaseAllocator without any inlining. template struct InlineRebind { typedef typename BaseAllocator::template rebind::other other; }; template struct InlineRebind { typedef typename qpid::InlineAllocator other; }; } // namespace qpid #endif /*!QPID_INLINEALLOCATOR_H*/ qpidc-0.16/include/qpid/amqp_0_10/0000775000076400007640000000000011752725715017205 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/amqp_0_10/Codecs.h0000664000076400007640000000472111640160735020551 0ustar00jrossjross00000000000000#ifndef QPID_AMQP_0_10_CODECS_H #define QPID_AMQP_0_10_CODECS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" #include "qpid/types/Variant.h" namespace qpid { namespace framing { class FieldTable; } namespace amqp_0_10 { /** * Codec for encoding/decoding a map of Variants using the AMQP 0-10 * map encoding. */ class QPID_COMMON_CLASS_EXTERN MapCodec { public: typedef qpid::types::Variant::Map ObjectType; static void QPID_COMMON_EXTERN encode(const ObjectType&, std::string&); static void QPID_COMMON_EXTERN decode(const std::string&, ObjectType&); static size_t QPID_COMMON_EXTERN encodedSize(const ObjectType&); static const QPID_COMMON_EXTERN std::string contentType; private: }; /** * Codec for encoding/decoding a list of Variants using the AMQP 0-10 * list encoding. */ class QPID_COMMON_CLASS_EXTERN ListCodec { public: typedef qpid::types::Variant::List ObjectType; static void QPID_COMMON_EXTERN encode(const ObjectType&, std::string&); static void QPID_COMMON_EXTERN decode(const std::string&, ObjectType&); static size_t QPID_COMMON_EXTERN encodedSize(const ObjectType&); static const QPID_COMMON_EXTERN std::string contentType; private: }; /** * @internal * * Conversion functions between qpid::types:Variant::Map and the * deprecated qpid::framing::FieldTable. * */ QPID_COMMON_EXTERN void translate(const qpid::types::Variant::Map& from, qpid::framing::FieldTable& to); QPID_COMMON_EXTERN void translate(const qpid::framing::FieldTable& from, qpid::types::Variant::Map& to); }} // namespace qpid::amqp_0_10 #endif /*!QPID_AMQP_0_10_CODECS_H*/ qpidc-0.16/include/qpid/Options.h0000664000076400007640000001106211564504651017327 0ustar00jrossjross00000000000000#ifndef QPID_COMMONOPTIONS_H #define QPID_COMMONOPTIONS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" // Disable warnings triggered by boost. #ifdef _MSC_VER # pragma warning(push) # pragma warning(disable : 4251 4275) #endif #include #include #ifdef _MSC_VER # pragma warning(pop) #endif #include #include #include #include #include "qpid/CommonImportExport.h" namespace qpid { namespace po=boost::program_options; ///@internal QPID_COMMON_EXTERN std::string prettyArg(const std::string&, const std::string&); /** @internal Normally only constructed by optValue() */ template class OptionValue : public po::typed_value { public: OptionValue(T& value, const std::string& arg) : po::typed_value(&value), argName(arg) {} std::string name() const { return argName; } private: std::string argName; }; /** Create an option value. * name, value appear after the option name in help like this: * (=) * T must support operator <<. *@see Options for example of use. */ template po::value_semantic* optValue(T& value, const char* name) { std::string valstr(boost::lexical_cast(value)); return new OptionValue(value, prettyArg(name, valstr)); } /** Create a vector value. Multiple occurences of the option are * accumulated into the vector */ template po::value_semantic* optValue(std::vector& value, const char* name) { using namespace std; ostringstream os; copy(value.begin(), value.end(), ostream_iterator(os, " ")); string val=os.str(); if (!val.empty()) val.erase(val.end()-1); // Remove trailing " " return (new OptionValue >(value, prettyArg(name, val))); } /** Create a boolean switch value. Presence of the option sets the value. */ inline po::value_semantic* optValue(bool& value) { return po::bool_switch(&value); } /** * Base class for options. * Example of use: @code struct MySubOptions : public Options { int x; string y; MySubOptions() : Options("Sub options") { addOptions() ("x", optValue(x,"XUNIT"), "Option X") ("y", optValue(y, "YUNIT"), "Option Y"); } }; struct MyOptions : public Options { bool z; vector foo; MySubOptions subOptions; MyOptions() : Options("My Options") { addOptions() ("z", boolSwitch(z), "Option Z") ("foo", optValue(foo), "Multiple option foo"); add(subOptions); } main(int argc, char** argv) { Options opts; opts.parse(argc, char** argv); // Use values dosomething(opts.subOptions.x); if (error) cout << opts << end; // Help message. } @endcode */ struct Options : public po::options_description { struct Exception : public qpid::Exception { Exception(const std::string& msg) : qpid::Exception(msg) {} }; QPID_COMMON_EXTERN Options(const std::string& name=std::string()); /** * Parses options from argc/argv, environment variables and config file. * Note the filename argument can reference an options variable that * is updated by argc/argv or environment variable parsing. */ QPID_COMMON_EXTERN void parse(int argc, char const* const* argv, const std::string& configfile=std::string(), bool allowUnknown = false); boost::program_options::options_description_easy_init addOptions() { return add_options(); } }; /** * Standard options for configuration */ struct CommonOptions : public Options { QPID_COMMON_EXTERN CommonOptions(const std::string& name=std::string(), const std::string& configfile=std::string()); bool help; bool version; std::string config; }; } // namespace qpid #endif /*!QPID_COMMONOPTIONS_H*/ qpidc-0.16/include/qpid/management/0000775000076400007640000000000011752725715017644 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/management/ManagementEvent.h0000664000076400007640000000333411354735350023070 0ustar00jrossjross00000000000000#ifndef _ManagementEvent_ #define _ManagementEvent_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/management/ManagementObject.h" #include "qpid/types/Variant.h" #include namespace qpid { namespace management { class ManagementAgent; class ManagementEvent : public ManagementItem { public: static const uint8_t MD5_LEN = 16; //typedef void (*writeSchemaCall_t)(qpid::framing::Buffer&); typedef void (*writeSchemaCall_t)(std::string&); virtual ~ManagementEvent() {} virtual writeSchemaCall_t getWriteSchemaCall(void) = 0; //virtual mapEncodeSchemaCall_t getMapEncodeSchemaCall(void) = 0; virtual std::string& getEventName() const = 0; virtual std::string& getPackageName() const = 0; virtual uint8_t* getMd5Sum() const = 0; virtual uint8_t getSeverity() const = 0; virtual void encode(std::string&) const = 0; virtual void mapEncode(qpid::types::Variant::Map&) const = 0; }; }} #endif /*!_ManagementEvent_*/ qpidc-0.16/include/qpid/management/Mutex.h0000664000076400007640000000351411357726403021116 0ustar00jrossjross00000000000000#ifndef _management_Mutex_h #define _management_Mutex_h /* * * Copyright (c) 2008 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/CommonImportExport.h" namespace qpid { namespace sys { class Mutex; } namespace management { /** * Scoped lock template: calls lock() in ctor, unlock() in dtor. * L can be any class with lock() and unlock() functions. */ template class ScopedLockTemplate { public: ScopedLockTemplate(L& l) : mutex(l) { mutex.lock(); } ~ScopedLockTemplate() { mutex.unlock(); } private: L& mutex; }; template class ScopedUnlockTemplate { public: ScopedUnlockTemplate(L& l) : mutex(l) { mutex.unlock(); } ~ScopedUnlockTemplate() { mutex.lock(); } private: L& mutex; }; class Mutex { public: typedef ScopedLockTemplate ScopedLock; typedef ScopedUnlockTemplate ScopedUnlock; QPID_COMMON_EXTERN Mutex(); QPID_COMMON_EXTERN ~Mutex(); QPID_COMMON_EXTERN void lock(); QPID_COMMON_EXTERN void unlock(); private: sys::Mutex* impl; }; } } #endif qpidc-0.16/include/qpid/management/Buffer.h0000664000076400007640000000735411357720053021226 0ustar00jrossjross00000000000000#ifndef _Management_Buffer_ #define _Management_Buffer_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" #include "qpid/types/Exception.h" #include "qpid/types/Variant.h" #include namespace qpid { namespace framing { class Buffer; } namespace management { struct OutOfBounds : qpid::types::Exception { OutOfBounds() : qpid::types::Exception(std::string("Out of Bounds")) {} }; /** * This class is a wrapper around qpid::framing::Buffer that does not include any dependencies * from boost or from qpid::framing. */ class Buffer { public: QPID_COMMON_EXTERN Buffer(char* data=0, uint32_t size=0); QPID_COMMON_EXTERN ~Buffer(); QPID_COMMON_EXTERN void record(); QPID_COMMON_EXTERN void restore(bool reRecord = false); QPID_COMMON_EXTERN void reset(); QPID_COMMON_EXTERN uint32_t available(); QPID_COMMON_EXTERN uint32_t getSize(); QPID_COMMON_EXTERN uint32_t getPosition(); QPID_COMMON_EXTERN char* getPointer(); QPID_COMMON_EXTERN void putOctet(uint8_t i); QPID_COMMON_EXTERN void putShort(uint16_t i); QPID_COMMON_EXTERN void putLong(uint32_t i); QPID_COMMON_EXTERN void putLongLong(uint64_t i); QPID_COMMON_EXTERN void putInt8(int8_t i); QPID_COMMON_EXTERN void putInt16(int16_t i); QPID_COMMON_EXTERN void putInt32(int32_t i); QPID_COMMON_EXTERN void putInt64(int64_t i); QPID_COMMON_EXTERN void putFloat(float f); QPID_COMMON_EXTERN void putDouble(double f); QPID_COMMON_EXTERN void putBin128(const uint8_t* b); QPID_COMMON_EXTERN uint8_t getOctet(); QPID_COMMON_EXTERN uint16_t getShort(); QPID_COMMON_EXTERN uint32_t getLong(); QPID_COMMON_EXTERN uint64_t getLongLong(); QPID_COMMON_EXTERN int8_t getInt8(); QPID_COMMON_EXTERN int16_t getInt16(); QPID_COMMON_EXTERN int32_t getInt32(); QPID_COMMON_EXTERN int64_t getInt64(); QPID_COMMON_EXTERN float getFloat(); QPID_COMMON_EXTERN double getDouble(); QPID_COMMON_EXTERN void putShortString(const std::string& s); QPID_COMMON_EXTERN void putMediumString(const std::string& s); QPID_COMMON_EXTERN void putLongString(const std::string& s); QPID_COMMON_EXTERN void getShortString(std::string& s); QPID_COMMON_EXTERN void getMediumString(std::string& s); QPID_COMMON_EXTERN void getLongString(std::string& s); QPID_COMMON_EXTERN void getBin128(uint8_t* b); QPID_COMMON_EXTERN void putMap(const types::Variant::Map& map); QPID_COMMON_EXTERN void putList(const types::Variant::List& list); QPID_COMMON_EXTERN void getMap(types::Variant::Map& map); QPID_COMMON_EXTERN void getList(types::Variant::List& list); QPID_COMMON_EXTERN void putRawData(const std::string& s); QPID_COMMON_EXTERN void getRawData(std::string& s, uint32_t size); QPID_COMMON_EXTERN void putRawData(const uint8_t* data, size_t size); QPID_COMMON_EXTERN void getRawData(uint8_t* data, size_t size); private: framing::Buffer* impl; }; }} // namespace qpid::management #endif qpidc-0.16/include/qpid/management/ManagementObject.h0000664000076400007640000002203211564561152023211 0ustar00jrossjross00000000000000#ifndef _ManagementObject_ #define _ManagementObject_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" #include "qpid/management/Mutex.h" #include "qpid/types/Variant.h" #include #include namespace qpid { namespace management { class Manageable; class ObjectId; class ManagementObject; class AgentAttachment { friend class ObjectId; private: uint64_t first; public: AgentAttachment() : first(0) {} QPID_COMMON_EXTERN void setBanks(uint32_t broker, uint32_t bank); uint64_t getFirst() const { return first; } }; class ObjectId { protected: const AgentAttachment* agent; uint64_t first; uint64_t second; uint64_t agentEpoch; std::string v2Key; std::string agentName; void fromString(const std::string&); public: QPID_COMMON_INLINE_EXTERN ObjectId() : agent(0), first(0), second(0), agentEpoch(0) {} QPID_COMMON_INLINE_EXTERN ObjectId(const types::Variant& map) : agent(0), first(0), second(0), agentEpoch(0) { mapDecode(map.asMap()); } QPID_COMMON_EXTERN ObjectId(uint8_t flags, uint16_t seq, uint32_t broker); QPID_COMMON_EXTERN ObjectId(AgentAttachment* _agent, uint8_t flags, uint16_t seq); QPID_COMMON_EXTERN ObjectId(std::istream&); QPID_COMMON_EXTERN ObjectId(const std::string&); QPID_COMMON_INLINE_EXTERN ObjectId(const std::string& agentAddress, const std::string& key, uint64_t epoch=0) : agent(0), first(0), second(0), agentEpoch(epoch), v2Key(key), agentName(agentAddress) {} // Deprecated: QPID_COMMON_EXTERN ObjectId(uint8_t flags, uint16_t seq, uint32_t broker, uint64_t object); QPID_COMMON_EXTERN bool operator==(const ObjectId &other) const; QPID_COMMON_EXTERN bool operator<(const ObjectId &other) const; QPID_COMMON_EXTERN void mapEncode(types::Variant::Map& map) const; QPID_COMMON_EXTERN void mapDecode(const types::Variant::Map& map); QPID_COMMON_EXTERN operator types::Variant::Map() const; QPID_COMMON_INLINE_EXTERN uint32_t encodedSize() const { return 16; }; QPID_COMMON_EXTERN void encode(std::string& buffer) const; QPID_COMMON_EXTERN void decode(const std::string& buffer); QPID_COMMON_EXTERN bool equalV1(const ObjectId &other) const; QPID_COMMON_INLINE_EXTERN void setV2Key(const std::string& _key) { v2Key = _key; } QPID_COMMON_EXTERN void setV2Key(const ManagementObject& object); QPID_COMMON_INLINE_EXTERN void setAgentName(const std::string& _name) { agentName = _name; } QPID_COMMON_INLINE_EXTERN const std::string& getAgentName() const { return agentName; } QPID_COMMON_INLINE_EXTERN const std::string& getV2Key() const { return v2Key; } friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const ObjectId&); }; class ManagementItem { public: static const uint8_t TYPE_U8 = 1; static const uint8_t TYPE_U16 = 2; static const uint8_t TYPE_U32 = 3; static const uint8_t TYPE_U64 = 4; static const uint8_t TYPE_SSTR = 6; static const uint8_t TYPE_LSTR = 7; static const uint8_t TYPE_ABSTIME = 8; static const uint8_t TYPE_DELTATIME = 9; static const uint8_t TYPE_REF = 10; static const uint8_t TYPE_BOOL = 11; static const uint8_t TYPE_FLOAT = 12; static const uint8_t TYPE_DOUBLE = 13; static const uint8_t TYPE_UUID = 14; static const uint8_t TYPE_FTABLE = 15; static const uint8_t TYPE_S8 = 16; static const uint8_t TYPE_S16 = 17; static const uint8_t TYPE_S32 = 18; static const uint8_t TYPE_S64 = 19; static const uint8_t TYPE_LIST = 21; static const uint8_t ACCESS_RC = 1; static const uint8_t ACCESS_RW = 2; static const uint8_t ACCESS_RO = 3; static const uint8_t DIR_I = 1; static const uint8_t DIR_O = 2; static const uint8_t DIR_IO = 3; static const uint8_t FLAG_CONFIG = 0x01; static const uint8_t FLAG_INDEX = 0x02; static const uint8_t FLAG_END = 0x80; const static uint8_t CLASS_KIND_TABLE = 1; const static uint8_t CLASS_KIND_EVENT = 2; public: virtual ~ManagementItem() {} }; class QPID_COMMON_CLASS_EXTERN ManagementObject : public ManagementItem { protected: uint64_t createTime; uint64_t destroyTime; uint64_t updateTime; ObjectId objectId; mutable bool configChanged; mutable bool instChanged; bool deleted; Manageable* coreObject; mutable Mutex accessLock; uint32_t flags; static int nextThreadIndex; bool forcePublish; QPID_COMMON_EXTERN int getThreadIndex(); QPID_COMMON_EXTERN void writeTimestamps(std::string& buf) const; QPID_COMMON_EXTERN void readTimestamps(const std::string& buf); QPID_COMMON_EXTERN uint32_t writeTimestampsSize() const; public: QPID_COMMON_EXTERN static const uint8_t MD5_LEN = 16; QPID_COMMON_EXTERN static int maxThreads; //typedef void (*writeSchemaCall_t) (qpid::framing::Buffer&); typedef void (*writeSchemaCall_t) (std::string&); QPID_COMMON_EXTERN ManagementObject(Manageable* _core); virtual ~ManagementObject() {} virtual writeSchemaCall_t getWriteSchemaCall() = 0; virtual std::string getKey() const = 0; // Encode & Decode the property and statistics values // for this object. virtual void mapEncodeValues(types::Variant::Map& map, bool includeProperties, bool includeStatistics) = 0; virtual void mapDecodeValues(const types::Variant::Map& map) = 0; virtual void doMethod(std::string& methodName, const types::Variant::Map& inMap, types::Variant::Map& outMap, const std::string& userId) = 0; QPID_COMMON_EXTERN void writeTimestamps(types::Variant::Map& map) const; QPID_COMMON_EXTERN void readTimestamps(const types::Variant::Map& buf); /** * The following five methods are not pure-virtual because they will only * be overridden in cases where QMFv1 is to be supported. */ virtual uint32_t writePropertiesSize() const { return 0; } virtual void readProperties(const std::string&) {} virtual void writeProperties(std::string&) const {} virtual void writeStatistics(std::string&, bool = false) {} virtual void doMethod(std::string&, const std::string&, std::string&, const std::string&) {} QPID_COMMON_EXTERN virtual void setReference(ObjectId objectId); virtual std::string& getClassName() const = 0; virtual std::string& getPackageName() const = 0; virtual uint8_t* getMd5Sum() const = 0; void setObjectId(ObjectId oid) { objectId = oid; } ObjectId getObjectId() { return objectId; } inline bool getConfigChanged() { return configChanged; } virtual bool getInstChanged() { return instChanged; } virtual bool hasInst() { return true; } inline void setForcePublish(bool f) { forcePublish = f; } inline bool getForcePublish() { return forcePublish; } QPID_COMMON_EXTERN void setUpdateTime(); QPID_COMMON_EXTERN void resourceDestroy(); inline bool isDeleted() { return deleted; } inline void setFlags(uint32_t f) { flags = f; } inline uint32_t getFlags() { return flags; } bool isSameClass(ManagementObject& other) { for (int idx = 0; idx < MD5_LEN; idx++) if (other.getMd5Sum()[idx] != getMd5Sum()[idx]) return false; return other.getClassName() == getClassName() && other.getPackageName() == getPackageName(); } // QPID_COMMON_EXTERN void encode(qpid::framing::Buffer& buf) const { writeProperties(buf); } // QPID_COMMON_EXTERN void decode(qpid::framing::Buffer& buf) { readProperties(buf); } //QPID_COMMON_EXTERN uint32_t encodedSize() const { return writePropertiesSize(); } // Encode/Decode the entire object as a map //QPID_COMMON_EXTERN void mapEncode(types::Variant::Map& map, //bool includeProperties=true, //bool includeStatistics=true); //QPID_COMMON_EXTERN void mapDecode(const types::Variant::Map& map); }; typedef std::map ManagementObjectMap; typedef std::vector ManagementObjectVector; }} #endif /*!_ManagementObject_*/ qpidc-0.16/include/qpid/management/Args.h0000664000076400007640000000200611227403641020673 0ustar00jrossjross00000000000000#ifndef _Args_ #define _Args_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // namespace qpid { namespace management { class Args { public: virtual ~Args (void) = 0; }; inline Args::~Args (void) {} class ArgsNone : public Args { }; }} #endif /*!_Args_*/ qpidc-0.16/include/qpid/management/Manageable.h0000664000076400007640000000574211466334727022042 0ustar00jrossjross00000000000000#ifndef _Manageable_ #define _Manageable_ // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // #include "qpid/management/ManagementObject.h" #include "qpid/management/Args.h" #include #include "qpid/CommonImportExport.h" namespace qpid { namespace management { class QPID_COMMON_EXTERN Manageable { public: virtual ~Manageable(void) = 0; // status_t is a type used to pass completion status from the method handler. // typedef uint32_t status_t; static std::string StatusText(status_t status, std::string text = std::string()); static const status_t STATUS_OK = 0; static const status_t STATUS_UNKNOWN_OBJECT = 1; static const status_t STATUS_UNKNOWN_METHOD = 2; static const status_t STATUS_NOT_IMPLEMENTED = 3; static const status_t STATUS_PARAMETER_INVALID = 4; static const status_t STATUS_FEATURE_NOT_IMPLEMENTED = 5; static const status_t STATUS_FORBIDDEN = 6; static const status_t STATUS_EXCEPTION = 7; static const status_t STATUS_USER = 0x00010000; // Every "Manageable" object must hold a reference to exactly one // management object. This object is always of a class derived from // the pure-virtual "ManagementObject". // // This accessor function returns a pointer to the management object. // virtual ManagementObject* GetManagementObject(void) const = 0; // Every "Manageable" object must implement ManagementMethod. This // function is called when a remote management client invokes a method // on this object. The input and output arguments are specific to the // method being called and must be down-cast to the appropriate sub class // before use. virtual status_t ManagementMethod(uint32_t methodId, Args& args, std::string& text); // This optional method can be overridden to allow the agent application to // authorize method invocations. Return true iff the authenticated user identified // in userId us authorized to execute the method. virtual bool AuthorizeMethod(uint32_t methodId, Args& args, const std::string& userId); }; inline Manageable::~Manageable(void) {} }} #endif /*!_Manageable_*/ qpidc-0.16/include/qpid/management/ConnectionSettings.h0000664000076400007640000000615111376754211023633 0ustar00jrossjross00000000000000#ifndef _management_ConnectionSettings_h #define _management_ConnectionSettings_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" #include "qpid/types/Variant.h" #include namespace qpid { namespace management { /** * Settings for a Connection. */ struct ConnectionSettings { QPID_COMMON_EXTERN ConnectionSettings(); QPID_COMMON_EXTERN virtual ~ConnectionSettings(); /** * The protocol used for the connection (defaults to 'tcp') */ std::string protocol; /** * The host (or ip address) to connect to (defaults to 'localhost'). */ std::string host; /** * The port to connect to (defaults to 5672). */ uint16_t port; /** * Allows an AMQP 'virtual host' to be specified for the * connection. */ std::string virtualhost; /** * The username to use when authenticating the connection. If not * specified the current users login is used if available. */ std::string username; /** * The password to use when authenticating the connection. */ std::string password; /** * The SASL mechanism to use when authenticating the connection; * the options are currently PLAIN or ANONYMOUS. */ std::string mechanism; /** * Allows a locale to be specified for the connection. */ std::string locale; /** * Allows a heartbeat frequency to be specified */ uint16_t heartbeat; /** * The maximum number of channels that the client will request for * use on this connection. */ uint16_t maxChannels; /** * The maximum frame size that the client will request for this * connection. */ uint16_t maxFrameSize; /** * Limit the size of the connections send buffer . The buffer * is limited to bounds * maxFrameSize. */ unsigned int bounds; /** * If true, TCP_NODELAY will be set for the connection. */ bool tcpNoDelay; /** * SASL service name */ std::string service; /** * Minimum acceptable strength of any SASL negotiated security * layer. 0 means no security layer required. */ unsigned int minSsf; /** * Maximum acceptable strength of any SASL negotiated security * layer. 0 means no security layer allowed. */ unsigned int maxSsf; }; }} #endif qpidc-0.16/include/qpid/console/0000775000076400007640000000000011752725714017171 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/console/SessionManager.h0000664000076400007640000002124411375542547022265 0ustar00jrossjross00000000000000#ifndef _QPID_CONSOLE_SESSION_MANAGER_H #define _QPID_CONSOLE_SESSION_MANAGER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/console/ConsoleImportExport.h" #include "qpid/console/Broker.h" #include "qpid/console/Package.h" #include "qpid/console/SequenceManager.h" #include "qpid/console/ClassKey.h" #include "qpid/console/Schema.h" #include "qpid/console/Agent.h" #include "qpid/console/Object.h" #include "qpid/console/ObjectId.h" #include "qpid/console/Value.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Condition.h" #include "qpid/client/ConnectionSettings.h" #include #include namespace qpid { namespace console { class ConsoleListener; /** * * \ingroup qmfconsoleapi */ class SessionManager { public: typedef std::vector NameVector; typedef std::vector KeyVector; QPID_CONSOLE_EXTERN ~SessionManager(); struct Settings { bool rcvObjects; bool rcvEvents; bool rcvHeartbeats; bool userBindings; uint32_t methodTimeout; uint32_t getTimeout; Settings() : rcvObjects(true), rcvEvents(true), rcvHeartbeats(true), userBindings(false), methodTimeout(20), getTimeout(20) {} }; /** Create a new SessionManager * * Provide your own subclass of ConsoleListener to receive updates and indications * asynchronously or leave it as its default and use only synchronous methods. * *@param listener Listener object to receive asynchronous indications. *@param settings.rcvObjects Listener wishes to receive managed object data. *@param settings.rcvEvents Listener wishes to receive events. *@param settings.rcvHeartbeats Listener wishes to receive agent heartbeats. *@param settings.userBindings If rcvObjects is true, userBindings allows the * console client to control which object classes are received. See the bindPackage * and bindClass methods. If userBindings is false, the listener will receive * updates for all object classes. */ QPID_CONSOLE_EXTERN SessionManager(ConsoleListener* listener = 0, Settings settings = Settings()); /** Connect a broker to the console session * *@param settings Connection settings for client access *@return broker object if operation is successful * an exception shall be thrown. */ QPID_CONSOLE_EXTERN Broker* addBroker(client::ConnectionSettings& settings); /** Disconnect a broker from the console session * *@param broker The broker object returned from an earlier call to addBroker. */ QPID_CONSOLE_EXTERN void delBroker(Broker* broker); /** Get a list of known management packages * *@param packages Vector of package names returned by the session manager. */ QPID_CONSOLE_EXTERN void getPackages(NameVector& packages); /** Get a list of class keys associated with a package * *@param classKeys List of class keys returned by the session manager. *@param packageName Name of package being queried. */ QPID_CONSOLE_EXTERN void getClasses(KeyVector& classKeys, const std::string& packageName); /** Get the schema of a class given its class key * *@param classKey Class key of the desired schema. */ QPID_CONSOLE_EXTERN SchemaClass& getSchema(const ClassKey& classKey); /** Request that updates be received for all classes within a package * * Note that this method is only meaningful if a ConsoleListener was provided at session * creation and if the 'userBindings' flag was set to true. * *@param packageName Name of the package to which to bind. */ QPID_CONSOLE_EXTERN void bindPackage(const std::string& packageName); /** Request update to be received for a particular class * * Note that this method is only meaningful if a ConsoleListener was provided at session * creation and if the 'userBindings' flag was set to true. * *@param classKey Class key of class to which to bind. */ QPID_CONSOLE_EXTERN void bindClass(const ClassKey& classKey); QPID_CONSOLE_EXTERN void bindClass(const std::string& packageName, const std::string& className); /** Request events from a particular package. * * Note that this method is only meaningful if a ConsoleListener was provided at session * creation and if the 'userBindings' flag was set to true. * * @param classKey Class key of event of interest * @param packageName Name of package of event of interest. * @param eventName Name of event of interest. Default=All events defined by package. */ QPID_CONSOLE_EXTERN void bindEvent(const ClassKey& classKey); QPID_CONSOLE_EXTERN void bindEvent(const std::string& packageName, const std::string& eventName=""); /** Get a list of qmf agents known to the session manager. * *@param agents Vector of Agent objects returned by the session manager. *@param broker Return agents registered with this broker only. If NULL, return agents * from all connected brokers. */ QPID_CONSOLE_EXTERN void getAgents(Agent::Vector& agents, Broker* broker = 0); /** Get objects from agents. There are four variants of this method with different ways of * specifying from which class objects are being queried. * *@param objects List of objects received. *@param classKey ClassKey object identifying class to be queried. *@param className Class name identifying class to be queried. *@param objectId Object Id of the single object to be queried. *@param broker Restrict the query to this broker, or all brokers if NULL. *@param agent Restrict the query to this agent, or all agents if NULL. */ QPID_CONSOLE_EXTERN void getObjects(Object::Vector& objects, const std::string& className, Broker* broker = 0, Agent* agent = 0); //void getObjects(Object::Vector& objects, const ClassKey& classKey, // Broker* broker = 0, Agent* agent = 0); //void getObjects(Object::Vector& objects, const ObjectId& objectId, // Broker* broker = 0, Agent* agent = 0); private: friend class Broker; friend class Broker::ConnectionThread; friend class Object; sys::Mutex lock; sys::Mutex brokerListLock; ConsoleListener* listener; std::vector brokers; std::map packages; SequenceManager sequenceManager; sys::Condition cv; SequenceManager::set syncSequenceList; Object::Vector getResult; std::string error; Settings settings; NameVector bindingKeyList; void bindingKeys(); void allBrokersStable(); void startProtocol(Broker* broker); void handleBrokerResp(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); void handlePackageInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); void handleCommandComplete(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); void handleClassInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); void handleMethodResp(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); void handleHeartbeatInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); void handleEventInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); void handleSchemaResp(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence); void handleContentInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence, bool prop, bool stat); void handleBrokerConnect(Broker* broker); void handleBrokerDisconnect(Broker* broker); }; }} // namespace qpid::console #endif /*!_QPID_CONSOLE_SESSION_MANAGER_H*/ qpidc-0.16/include/qpid/console/ConsoleImportExport.h0000664000076400007640000000242511564561152023337 0ustar00jrossjross00000000000000#ifndef QPID_CONSOLE_IMPORT_EXPORT_H #define QPID_CONSOLE_IMPORT_EXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/ImportExport.h" #if defined(CONSOLE_EXPORT) || defined (qmfconsole_EXPORTS) # define QPID_CONSOLE_EXTERN QPID_EXPORT # define QPID_CONSOLE_CLASS_EXTERN QPID_CLASS_EXPORT # define QPID_CONSOLE_INLINE_EXTERN QPID_INLINE_EXPORT #else # define QPID_CONSOLE_EXTERN QPID_IMPORT # define QPID_CONSOLE_CLASS_EXTERN QPID_CLASS_IMPORT # define QPID_CONSOLE_INLINE_EXTERN QPID_INLINE_IMPORT #endif #endif qpidc-0.16/include/qpid/console/Event.h0000664000076400007640000000615611227403641020420 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_EVENT_H_ #define _QPID_CONSOLE_EVENT_H_ #include "qpid/console/ConsoleImportExport.h" #include "qpid/console/Object.h" #include "qpid/framing/Uuid.h" #include "qpid/framing/FieldTable.h" namespace qpid { namespace framing { class Buffer; } namespace console { class Broker; struct SchemaClass; class ClassKey; /** * * \ingroup qmfconsoleapi */ class Event { public: typedef enum { SEV_EMERGENCY = 0, SEV_ALERT = 1, SEV_CRITICAL = 2, SEV_ERROR = 3, SEV_WARNING = 4, SEV_NOTICE = 5, SEV_INFO = 6, SEV_DEBUG = 7 } Severity; QPID_CONSOLE_EXTERN Event(Broker* broker, SchemaClass* schemaClass, framing::Buffer& buffer); Broker* getBroker() const { return broker; } QPID_CONSOLE_EXTERN const ClassKey& getClassKey() const; SchemaClass* getSchema() const { return schema; } const Object::AttributeMap& getAttributes() const { return attributes; } uint64_t getTimestamp() const { return timestamp; } uint8_t getSeverity() const { return severity; } QPID_CONSOLE_EXTERN std::string getSeverityString() const; QPID_CONSOLE_EXTERN ObjectId attrRef(const std::string& key) const; QPID_CONSOLE_EXTERN uint32_t attrUint(const std::string& key) const; QPID_CONSOLE_EXTERN int32_t attrInt(const std::string& key) const; QPID_CONSOLE_EXTERN uint64_t attrUint64(const std::string& key) const; QPID_CONSOLE_EXTERN int64_t attrInt64(const std::string& key) const; QPID_CONSOLE_EXTERN std::string attrString(const std::string& key) const; QPID_CONSOLE_EXTERN bool attrBool(const std::string& key) const; QPID_CONSOLE_EXTERN float attrFloat(const std::string& key) const; QPID_CONSOLE_EXTERN double attrDouble(const std::string& key) const; QPID_CONSOLE_EXTERN framing::Uuid attrUuid(const std::string& key) const; QPID_CONSOLE_EXTERN framing::FieldTable attrMap(const std::string& key) const; private: Broker* broker; SchemaClass* schema; uint64_t timestamp; Severity severity; Object::AttributeMap attributes; }; QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const Event& event); } } #endif qpidc-0.16/include/qpid/console/Value.h0000664000076400007640000001540611227403641020411 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_VALUE_H_ #define _QPID_CONSOLE_VALUE_H_ #include "qpid/Exception.h" #include "qpid/framing/Uuid.h" #include "qpid/framing/FieldTable.h" #include "qpid/console/ObjectId.h" #include namespace qpid { namespace framing { class Buffer; } namespace console { /** * \ingroup qmfconsoleapi */ class Value { public: typedef boost::shared_ptr Ptr; virtual ~Value() {} virtual std::string str() const = 0; virtual bool isNull() const { return false; } virtual bool isObjectId() const { return false; } virtual bool isUint() const { return false; } virtual bool isInt() const { return false; } virtual bool isUint64() const { return false; } virtual bool isInt64() const { return false; } virtual bool isString() const { return false; } virtual bool isBool() const { return false; } virtual bool isFloat() const { return false; } virtual bool isDouble() const { return false; } virtual bool isUuid() const { return false; } virtual bool isMap() const { return false; } virtual ObjectId asObjectId() const { incompatible(); return ObjectId(); } virtual uint32_t asUint() const { incompatible(); return 0; } virtual int32_t asInt() const { incompatible(); return 0; } virtual uint64_t asUint64() const { incompatible(); return 0; } virtual int64_t asInt64() const { incompatible(); return 0; } virtual std::string asString() const { incompatible(); return std::string(); } virtual bool asBool() const { incompatible(); return false; } virtual float asFloat() const { incompatible(); return 0.0; } virtual double asDouble() const { incompatible(); return 0.0; } virtual framing::Uuid asUuid() const { incompatible(); return framing::Uuid(); } virtual framing::FieldTable asMap() const { incompatible(); return framing::FieldTable(); } private: void incompatible() const { throw Exception("Incompatible Type"); } }; class NullValue : public Value { public: NullValue() {} std::string str() const; bool isNull() const { return true; } }; class RefValue : public Value { public: RefValue(ObjectId v) : value(v) {} RefValue(framing::Buffer& buffer); std::string str() const; bool isObjectId() const { return true; } ObjectId asObjectId() const { return value; } private: ObjectId value; }; class UintValue : public Value { public: UintValue(uint32_t v) : value(v) {} std::string str() const; bool isUint() const { return true; } uint32_t asUint() const { return value; } bool isUint64() const { return true; } uint64_t asUint64() const { return (uint64_t) value; } private: uint32_t value; }; class IntValue : public Value { public: IntValue(int32_t v) : value(v) {} std::string str() const; bool isInt() const { return true; } int32_t asInt() const { return value; } bool isInt64() const { return true; } int64_t asInt64() const { return (int64_t) value; } private: int32_t value; }; class Uint64Value : public Value { public: Uint64Value(uint64_t v) : value(v) {} std::string str() const; bool isUint64() const { return true; } uint64_t asUint64() const { return value; } private: uint64_t value; }; class Int64Value : public Value { public: Int64Value(int64_t v) : value(v) {} std::string str() const; bool isInt64() const { return true; } int64_t asInt64() const { return value; } private: int64_t value; }; class StringValue : public Value { public: StringValue(const std::string& v) : value(v) {} StringValue(framing::Buffer& buffer, int tc); std::string str() const { return value; } bool isString() const { return true; } std::string asString() const { return value; } private: std::string value; }; class BoolValue : public Value { public: BoolValue(bool v) : value(v) {} BoolValue(uint8_t v) : value(v != 0) {} std::string str() const; bool isBool() const { return true; } bool asBool() const { return value; } private: bool value; }; class FloatValue : public Value { public: FloatValue(float v) : value(v) {} std::string str() const; bool isFloat() const { return true; } float asFloat() const { return value; } bool isDouble() const { return true; } double asDouble() const { return (double) value; } private: float value; }; class DoubleValue : public Value { public: DoubleValue(double v) : value(v) {} std::string str() const; bool isDouble() const { return true; } double asDouble() const { return value; } private: double value; }; class UuidValue : public Value { public: UuidValue(const framing::Uuid& v) : value(v) {} UuidValue(framing::Buffer& buffer); std::string str() const { return value.str(); } bool isUuid() const { return true; } framing::Uuid asUuid() const { return value; } private: framing::Uuid value; }; class MapValue : public Value { public: MapValue(const framing::FieldTable& v) : value(v) {} MapValue(framing::Buffer& buffer); std::string str() const; bool isMap() const { return true; } framing::FieldTable asMap() const { return value; } private: framing::FieldTable value; }; class ValueFactory { public: static Value::Ptr newValue(int typeCode, framing::Buffer& buffer); static void encodeValue(int typeCode, Value::Ptr value, framing::Buffer& buffer); }; } } #endif qpidc-0.16/include/qpid/console/Schema.h0000664000076400007640000000551511227403641020535 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_SCHEMA_H_ #define _QPID_CONSOLE_SCHEMA_H_ #include "qpid/console/ClassKey.h" #include #include namespace qpid { namespace framing { class Buffer; } namespace console { class Value; struct SchemaArgument { SchemaArgument(framing::Buffer& buffer, bool forMethod = false); boost::shared_ptr decodeValue(framing::Buffer& buffer); std::string name; uint8_t typeCode; bool dirInput; bool dirOutput; std::string unit; int min; int max; int maxLen; std::string desc; std::string defaultVal; }; struct SchemaProperty { SchemaProperty(framing::Buffer& buffer); boost::shared_ptr decodeValue(framing::Buffer& buffer); std::string name; uint8_t typeCode; uint8_t accessCode; bool isIndex; bool isOptional; std::string unit; int min; int max; int maxLen; std::string desc; }; struct SchemaStatistic { SchemaStatistic(framing::Buffer& buffer); boost::shared_ptr decodeValue(framing::Buffer& buffer); std::string name; uint8_t typeCode; std::string unit; std::string desc; }; struct SchemaMethod { SchemaMethod(framing::Buffer& buffer); ~SchemaMethod(); std::string name; std::string desc; std::vector arguments; }; struct SchemaClass { static const uint8_t KIND_TABLE = 1; static const uint8_t KIND_EVENT = 2; SchemaClass(const uint8_t kind, const ClassKey& key, framing::Buffer& buffer); ~SchemaClass(); const ClassKey& getClassKey() const { return key; } const uint8_t kind; const ClassKey key; std::vector properties; std::vector statistics; std::vector methods; std::vector arguments; }; } } #endif qpidc-0.16/include/qpid/console/Broker.h0000664000076400007640000001147011564561152020564 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_BROKER_H_ #define _QPID_CONSOLE_BROKER_H_ #include "qpid/console/ConsoleImportExport.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/client/Session.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/Message.h" #include "qpid/client/MessageListener.h" #include "qpid/sys/Thread.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Condition.h" #include "qpid/Url.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/Uuid.h" #include #include namespace qpid { namespace console { class SessionManager; class Agent; class Object; /** * * \ingroup qpidconsoleapi */ class Broker : public client::MessageListener { public: QPID_CONSOLE_EXTERN Broker(SessionManager& sm, client::ConnectionSettings& settings); QPID_CONSOLE_EXTERN ~Broker(); QPID_CONSOLE_INLINE_EXTERN bool isConnected() const { return connected; } QPID_CONSOLE_INLINE_EXTERN const std::string& getError() const { return error; } QPID_CONSOLE_INLINE_EXTERN const std::string& getSessionId() const { return amqpSessionId; } QPID_CONSOLE_INLINE_EXTERN const framing::Uuid& getBrokerId() const { return brokerId; } QPID_CONSOLE_INLINE_EXTERN uint32_t getBrokerBank() const { return 1; } QPID_CONSOLE_INLINE_EXTERN void addBinding(const std::string& key) { connThreadBody.bindExchange("qpid.management", key); } QPID_CONSOLE_EXTERN std::string getUrl() const; QPID_CONSOLE_EXTERN void waitForStable(); private: friend class SessionManager; friend class Object; typedef std::map AgentMap; static const int SYNC_TIME = 60; SessionManager& sessionManager; AgentMap agents; bool connected; std::string error; std::string amqpSessionId; client::ConnectionSettings connectionSettings; sys::Mutex lock; sys::Condition cond; framing::Uuid brokerId; uint32_t reqsOutstanding; bool syncInFlight; bool topicBound; Object* methodObject; friend class ConnectionThread; class ConnectionThread : public sys::Runnable { bool operational; bool shuttingDown; Broker& broker; framing::Uuid sessionId; client::Connection connection; client::Session session; client::SubscriptionManager* subscriptions; std::stringstream queueName; sys::Mutex connLock; void run(); public: ConnectionThread(Broker& _broker) : operational(false), shuttingDown(false), broker(_broker), subscriptions(0) {} ~ConnectionThread(); void sendBuffer(qpid::framing::Buffer& buf, uint32_t length, const std::string& exchange = "qpid.management", const std::string& routingKey = "broker"); void bindExchange(const std::string& exchange, const std::string& key); void shutdown(); }; ConnectionThread connThreadBody; sys::Thread connThread; void encodeHeader(framing::Buffer& buf, uint8_t opcode, uint32_t seq = 0) const; bool checkHeader(framing::Buffer& buf, uint8_t *opcode, uint32_t *seq) const; void received(client::Message& msg); void resetAgents(); void updateAgent(const Object& object); void incOutstanding(); void decOutstanding(); void setBrokerId(const framing::Uuid& id) { brokerId = id; } void appendAgents(std::vector& agents) const; friend std::ostream& operator<<(std::ostream& o, const Broker& k); }; std::ostream& operator<<(std::ostream& o, const Broker& k); } } #endif qpidc-0.16/include/qpid/console/ObjectId.h0000664000076400007640000000455411641426557021035 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_OBJECTID_H #define _QPID_CONSOLE_OBJECTID_H #include #include "qpid/console/ConsoleImportExport.h" #include "qpid/sys/IntegerTypes.h" namespace qpid { namespace framing { class Buffer; } namespace console { /** * * \ingroup qmfconsoleapi */ class QPID_CONSOLE_EXTERN ObjectId { public: ObjectId() : first(0), second(0) {} ObjectId(framing::Buffer& buffer); uint8_t getFlags() const { return (uint8_t)((first & 0xF000000000000000LL) >> 60); } uint16_t getSequence() const { return (uint16_t)((first & 0x0FFF000000000000LL) >> 48); } uint32_t getBrokerBank() const { return (uint32_t)((first & 0x0000FFFFF0000000LL) >> 28); } uint32_t getAgentBank() const { return (uint32_t) (first & 0x000000000FFFFFFFLL); } uint64_t getObject() const { return second; } bool isDurable() const { return getSequence() == 0; } void decode(framing::Buffer& buffer); void encode(framing::Buffer& buffer); void setValue(uint64_t f, uint64_t s) { first = f; second = s; } bool operator==(const ObjectId& other) const; bool operator!=(const ObjectId& other) const; bool operator<(const ObjectId& other) const; bool operator>(const ObjectId& other) const; bool operator<=(const ObjectId& other) const; bool operator>=(const ObjectId& other) const; private: uint64_t first; uint64_t second; }; QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const ObjectId& id); } } #endif qpidc-0.16/include/qpid/console/ConsoleListener.h0000664000076400007640000000536411227403641022447 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_CONSOLE_LISTENER_H_ #define _QPID_CONSOLE_CONSOLE_LISTENER_H_ #include #include "qpid/console/ConsoleImportExport.h" #include "qpid/console/Broker.h" #include "qpid/console/ClassKey.h" #include "qpid/console/Object.h" #include "qpid/console/Event.h" namespace qpid { namespace console { /** * Implement a subclass of ConsoleListener and subscribe it using * the SessionManager to receive indications. * * \ingroup qmfconsoleapi */ class QPID_CONSOLE_EXTERN ConsoleListener{ public: virtual ~ConsoleListener() {}; /** Invoked when a connection is established to a broker */ virtual void brokerConnected(const Broker&) {} /** Invoked when the connection to a broker is lost */ virtual void brokerDisconnected(const Broker&) {} /** Invoked when a QMF package is discovered. */ virtual void newPackage(const std::string&) {} /** Invoked when a new class is discovered. Session.getSchema can be * used to obtain details about the class. */ virtual void newClass(const ClassKey&) {} /** Invoked when a QMF agent is discovered. */ virtual void newAgent(const Agent&) {} /** Invoked when a QMF agent disconects. */ virtual void delAgent(const Agent&) {} /** Invoked when an object is updated. */ virtual void objectProps(Broker&, Object&) {} /** Invoked when an object is updated. */ virtual void objectStats(Broker&, Object&) {} /** Invoked when an event is raised. */ virtual void event(Event&) {} /** */ //virtual void heartbeat(Agent&, uint64_t) {} /** */ virtual void brokerInfo(Broker&) {} /** */ //virtual void methodResponse(Broker&, uint32_t seq, MethodResponse&) {} }; } } #endif qpidc-0.16/include/qpid/console/Package.h0000664000076400007640000000450611227403641020667 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_PACKAGE_H_ #define _QPID_CONSOLE_PACKAGE_H_ #include #include #include "qpid/console/ConsoleImportExport.h" #include "qpid/sys/IntegerTypes.h" namespace qpid { namespace console { struct SchemaClass; /** * * \ingroup qmfconsoleapi */ class Package { public: Package(const std::string& n) : name(n) {} const std::string& getName() const { return name; } private: friend class SessionManager; struct NameHash { std::string name; uint8_t hash[16]; NameHash(const std::string& n, const uint8_t* h) : name(n) { for (int i = 0; i < 16; i++) hash[i] = h[i]; } }; struct NameHashComp { bool operator() (const NameHash& lhs, const NameHash& rhs) const { if (lhs.name != rhs.name) return lhs.name < rhs.name; else for (int i = 0; i < 16; i++) if (lhs.hash[i] != rhs.hash[i]) return lhs.hash[i] < rhs.hash[i]; return false; } }; typedef std::map ClassMap; const std::string name; ClassMap classes; SchemaClass* getClass(const std::string& className, uint8_t* hash); void addClass(const std::string& className, uint8_t* hash, SchemaClass* schemaClass); }; } } #endif qpidc-0.16/include/qpid/console/ClassKey.h0000664000076400007640000000457611640160735021064 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_CLASSKEY_H_ #define _QPID_CONSOLE_CLASSKEY_H_ #include #include "qpid/console/ConsoleImportExport.h" #include "qpid/console/Package.h" #include "qpid/framing/Buffer.h" namespace qpid { namespace console { /** * * \ingroup qmfconsoleapi */ class QPID_CONSOLE_CLASS_EXTERN ClassKey { public: QPID_CONSOLE_EXTERN static const int HASH_SIZE = 16; QPID_CONSOLE_EXTERN ClassKey(const std::string& package, const std::string& name, const uint8_t* hash); const QPID_CONSOLE_EXTERN std::string& getPackageName() const { return package; } const QPID_CONSOLE_EXTERN std::string& getClassName() const { return name; } const QPID_CONSOLE_EXTERN uint8_t* getHash() const { return hash; } QPID_CONSOLE_EXTERN std::string getHashString() const; QPID_CONSOLE_EXTERN std::string str() const; QPID_CONSOLE_EXTERN bool operator==(const ClassKey& other) const; QPID_CONSOLE_EXTERN bool operator!=(const ClassKey& other) const; QPID_CONSOLE_EXTERN bool operator<(const ClassKey& other) const; QPID_CONSOLE_EXTERN bool operator>(const ClassKey& other) const; QPID_CONSOLE_EXTERN bool operator<=(const ClassKey& other) const; QPID_CONSOLE_EXTERN bool operator>=(const ClassKey& other) const; QPID_CONSOLE_EXTERN void encode(framing::Buffer& buffer) const; private: std::string package; std::string name; uint8_t hash[HASH_SIZE]; }; QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const ClassKey& k); } } #endif qpidc-0.16/include/qpid/console/SequenceManager.h0000664000076400007640000000275111227403641022377 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_SEQUENCEMANAGER_H_ #define _QPID_CONSOLE_SEQUENCEMANAGER_H_ #include "qpid/console/ConsoleImportExport.h" #include "qpid/sys/Mutex.h" #include #include #include namespace qpid { namespace console { /** * * \ingroup qpidconsoleapi */ class SequenceManager { public: typedef std::set set; SequenceManager() : sequence(0) {} QPID_CONSOLE_EXTERN uint32_t reserve(const std::string& context = ""); QPID_CONSOLE_EXTERN std::string release(uint32_t seq); private: sys::Mutex lock; uint32_t sequence; std::map pending; }; } } #endif qpidc-0.16/include/qpid/console/Agent.h0000664000076400007640000000362211564561152020376 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_AGENT_H_ #define _QPID_CONSOLE_AGENT_H_ #include "qpid/console/Broker.h" #include "qpid/console/ConsoleImportExport.h" namespace qpid { namespace console { /** * * \ingroup qmfconsoleapi */ class QPID_CONSOLE_CLASS_EXTERN Agent { public: typedef std::vector Vector; QPID_CONSOLE_INLINE_EXTERN Agent(Broker* _broker, uint32_t _bank, const std::string& _label) : broker(_broker), brokerBank(broker->getBrokerBank()), agentBank(_bank), label(_label) {} QPID_CONSOLE_INLINE_EXTERN Broker* getBroker() const { return broker; } QPID_CONSOLE_INLINE_EXTERN uint32_t getBrokerBank() const { return brokerBank; } QPID_CONSOLE_INLINE_EXTERN uint32_t getAgentBank() const { return agentBank; } QPID_CONSOLE_INLINE_EXTERN const std::string& getLabel() const { return label; } private: Broker* broker; const uint32_t brokerBank; const uint32_t agentBank; const std::string label; }; std::ostream& operator<<(std::ostream& o, const Agent& agent); } } #endif qpidc-0.16/include/qpid/console/Object.h0000664000076400007640000001214711227403641020542 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _QPID_CONSOLE_OBJECT_H_ #define _QPID_CONSOLE_OBJECT_H_ #include "qpid/console/ConsoleImportExport.h" #include "qpid/console/ObjectId.h" #include "qpid/framing/Uuid.h" #include "qpid/framing/FieldTable.h" #include #include #include #include namespace qpid { namespace framing { class Buffer; } namespace console { class Broker; struct SchemaClass; struct SchemaMethod; class ObjectId; class ClassKey; class Value; /** * \ingroup qmfconsoleapi */ struct MethodResponse { uint32_t code; std::string text; std::map > arguments; }; class Object { public: typedef std::vector Vector; struct AttributeMap : public std::map > { QPID_CONSOLE_EXTERN void addRef(const std::string& key, const ObjectId& val); QPID_CONSOLE_EXTERN void addUint(const std::string& key, uint32_t val); QPID_CONSOLE_EXTERN void addInt(const std::string& key, int32_t val); QPID_CONSOLE_EXTERN void addUint64(const std::string& key, uint64_t val); QPID_CONSOLE_EXTERN void addInt64(const std::string& key, int64_t val); QPID_CONSOLE_EXTERN void addString(const std::string& key, const std::string& val); QPID_CONSOLE_EXTERN void addBool(const std::string& key, bool val); QPID_CONSOLE_EXTERN void addFloat(const std::string& key, float val); QPID_CONSOLE_EXTERN void addDouble(const std::string& key, double val); QPID_CONSOLE_EXTERN void addUuid(const std::string& key, const framing::Uuid& val); QPID_CONSOLE_EXTERN void addMap(const std::string& key, const framing::FieldTable& val); }; QPID_CONSOLE_EXTERN Object(Broker* broker, SchemaClass* schemaClass, framing::Buffer& buffer, bool prop, bool stat); QPID_CONSOLE_EXTERN ~Object(); Broker* getBroker() const { return broker; } const ObjectId& getObjectId() const { return objectId; } QPID_CONSOLE_EXTERN const ClassKey& getClassKey() const; SchemaClass* getSchema() const { return schema; } uint64_t getCurrentTime() const { return currentTime; } uint64_t getCreateTime() const { return createTime; } uint64_t getDeleteTime() const { return deleteTime; } bool isDeleted() const { return deleteTime != 0; } QPID_CONSOLE_EXTERN std::string getIndex() const; QPID_CONSOLE_EXTERN void mergeUpdate(const Object& updated); const AttributeMap& getAttributes() const { return attributes; } QPID_CONSOLE_EXTERN void invokeMethod(const std::string name, const AttributeMap& args, MethodResponse& result); QPID_CONSOLE_EXTERN void handleMethodResp(framing::Buffer& buffer, uint32_t sequence); QPID_CONSOLE_EXTERN ObjectId attrRef(const std::string& key) const; QPID_CONSOLE_EXTERN uint32_t attrUint(const std::string& key) const; QPID_CONSOLE_EXTERN int32_t attrInt(const std::string& key) const; QPID_CONSOLE_EXTERN uint64_t attrUint64(const std::string& key) const; QPID_CONSOLE_EXTERN int64_t attrInt64(const std::string& key) const; QPID_CONSOLE_EXTERN std::string attrString(const std::string& key) const; QPID_CONSOLE_EXTERN bool attrBool(const std::string& key) const; QPID_CONSOLE_EXTERN float attrFloat(const std::string& key) const; QPID_CONSOLE_EXTERN double attrDouble(const std::string& key) const; QPID_CONSOLE_EXTERN framing::Uuid attrUuid(const std::string& key) const; QPID_CONSOLE_EXTERN framing::FieldTable attrMap(const std::string& key) const; private: Broker* broker; SchemaClass* schema; ObjectId objectId; uint64_t currentTime; uint64_t createTime; uint64_t deleteTime; AttributeMap attributes; SchemaMethod* pendingMethod; MethodResponse methodResponse; void parsePresenceMasks(framing::Buffer& buffer, std::set& excludeList); }; QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const Object& object); } } #endif qpidc-0.16/include/qpid/Url.h0000664000076400007640000000705511723446736016453 0ustar00jrossjross00000000000000#ifndef QPID_URL_H #define QPID_URL_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/Address.h" #include "qpid/Exception.h" #include #include #include #include #include "qpid/CommonImportExport.h" namespace qpid { /** An AMQP URL contains a list of addresses */ struct Url : public std::vector
{ /** Url with the hostname as returned by gethostname(2) */ QPID_COMMON_EXTERN static Url getHostNameUrl(uint16_t port); /** Url with local IP address(es), may be more than one address * on a multi-homed host. */ QPID_COMMON_EXTERN static Url getIpAddressesUrl(uint16_t port); struct Invalid : public Exception { Invalid(const std::string& s); }; /** Convert to string form. */ QPID_COMMON_EXTERN std::string str() const; /** Empty URL. */ Url() {} /** URL containing a single address */ explicit Url(const Address& addr) { push_back(addr); } /** Parse url, throw Invalid if invalid. */ explicit Url(const std::string& url) { parse(url.c_str()); } /** Parse url, throw Invalid if invalid. */ explicit Url(const std::string& url, const std::string& defaultProtocol) { parse(url.c_str(), defaultProtocol); } /** Parse url, throw Invalid if invalid. */ explicit Url(const char* url) { parse(url); } Url& operator=(const char* s) { parse(s); return *this; } Url& operator=(const std::string& s) { parse(s); return *this; } /** Throw Invalid if the URL does not contain any addresses. */ QPID_COMMON_EXTERN void throwIfEmpty() const; /** Replace contents with parsed url *@exception Invalid if the url is invalid. */ QPID_COMMON_EXTERN void parse(const char* url); QPID_COMMON_EXTERN void parse(const char* url, const std::string& defaultProtocol); QPID_COMMON_INLINE_EXTERN void parse(const std::string& url) { parse(url.c_str()); } /** Replace contesnts with parsed URL. Replace with empty URL if invalid. */ QPID_COMMON_EXTERN void parseNoThrow(const char* url); QPID_COMMON_EXTERN void parseNoThrow(const char* url, const std::string& defaultProtocol); /** Add a protocol tag to be recognzed in URLs. * Only for use by protcol plug-in initializers. */ QPID_COMMON_EXTERN static void addProtocol(const std::string& tag); QPID_COMMON_EXTERN void setUser(const std::string&); QPID_COMMON_EXTERN void setPass(const std::string&); QPID_COMMON_EXTERN std::string getUser() const; QPID_COMMON_EXTERN std::string getPass() const; private: mutable std::string cache; // cache string form for efficiency. std::string user, pass; friend class UrlParser; }; inline bool operator==(const Url& a, const Url& b) { return a.str()==b.str(); } inline bool operator!=(const Url& a, const Url& b) { return a.str()!=b.str(); } QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& os, const Url& url); QPID_COMMON_EXTERN std::istream& operator>>(std::istream& is, Url& url); } // namespace qpid #endif /*!QPID_URL_H*/ qpidc-0.16/include/qpid/ImportExport.h0000664000076400007640000000431411564561152020351 0ustar00jrossjross00000000000000#ifndef QPID_IMPORTEXPORT_H #define QPID_IMPORTEXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ // // This header file defines the following macros for the control of library/DLL // import and export: // // QPID_EXPORT - Export declaration for Methods // QPID_CLASS_EXPORT - Export declaration for Classes // QPID_INLINE_EXPORT - Export declaration for Inline methods // // QPID_IMPORT - Import declaration for Methods // QPID_CLASS_IMPORT - Import declaration for Classes // QPID_INLINE_IMPORT - Import declaration for Inline methods // #if defined(WIN32) && !defined(QPID_DECLARE_STATIC) // // Import and Export definitions for Windows: // # define QPID_EXPORT __declspec(dllexport) # define QPID_IMPORT __declspec(dllimport) # ifdef _MSC_VER // // Specific to the Microsoft compiler: // # define QPID_CLASS_EXPORT # define QPID_CLASS_IMPORT # define QPID_INLINE_EXPORT QPID_EXPORT # define QPID_INLINE_IMPORT QPID_IMPORT # else // // Specific to non-Microsoft compilers (mingw32): // # define QPID_CLASS_EXPORT QPID_EXPORT # define QPID_CLASS_IMPORT QPID_IMPORT # define QPID_INLINE_EXPORT # define QPID_INLINE_IMPORT # endif #else // // Non-Windows (Linux, etc.) definitions: // # define QPID_EXPORT # define QPID_IMPORT # define QPID_CLASS_EXPORT # define QPID_CLASS_IMPORT # define QPID_INLINE_EXPORT # define QPID_INLINE_IMPORT #endif #endif /*!QPID_IMPORTEXPORT_H*/ qpidc-0.16/include/qpid/log/0000775000076400007640000000000011752725715016311 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/log/SinkOptions.h0000664000076400007640000000401011227403641020721 0ustar00jrossjross00000000000000#ifndef QPID_LOG_SINKOPTIONS_H #define QPID_LOG_SINKOPTIONS_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/Options.h" #include namespace qpid { namespace log { class Logger; /** * Logging sink options. * * Most logging sink options will be platform-specific, even if some are * duplicated. The range of platforms to which this code may be ported * can't be assumed to all have C++ iostreams or files. Thus, this class * is primarily for implementing in a platform-specific way. */ struct SinkOptions : public qpid::Options { // Create a platform's SinkOptions. Pass argv0 as the program name, // useful for syslog-type logging. static SinkOptions *create(const std::string& argv0=std::string()); SinkOptions(const std::string& name="Logging sink options") : qpid::Options(name) {} virtual ~SinkOptions() {} virtual SinkOptions& operator=(const SinkOptions&) = 0; // This allows the caller to indicate that there's no normal outputs // available. For example, when running as a daemon. In these cases, the // platform's "syslog"-type output should replace the default stderr // unless some other sink has been selected. virtual void detached(void) = 0; // The Logger acting on these options calls setup() to request any // Sinks be set up and fed back to the logger. virtual void setup(Logger *logger) = 0; }; }} // namespace qpid::log #endif /*!QPID_LOG_OPTIONS_H*/ qpidc-0.16/include/qpid/log/Options.h0000664000076400007640000000274111557527644020125 0ustar00jrossjross00000000000000#ifndef QPID_LOG_OPTIONS_H #define QPID_LOG_OPTIONS_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/Options.h" #include "qpid/CommonImportExport.h" #include "qpid/log/SinkOptions.h" #include #include namespace qpid { namespace log { /** Logging options for config parser. */ struct Options : public qpid::Options { /** Pass argv[0] for use in syslog output */ QPID_COMMON_EXTERN Options(const std::string& argv0_=std::string(), const std::string& name_="Logging options"); QPID_COMMON_EXTERN Options(const Options &); QPID_COMMON_EXTERN Options& operator=(const Options&); std::string argv0; std::string name; std::vector selectors; bool time, level, thread, source, function, hiresTs; bool trace; std::string prefix; std::auto_ptr sinkOptions; }; }} // namespace qpid::log #endif /*!QPID_LOG_OPTIONS_H*/ qpidc-0.16/include/qpid/log/Selector.h0000664000076400007640000000361311227403641020231 0ustar00jrossjross00000000000000#ifndef SELECTOR_H #define SELECTOR_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/Statement.h" #include "qpid/CommonImportExport.h" #include namespace qpid { namespace log { struct Options; /** * A selector identifies the set of log messages to enable. * * Thread object unsafe, pass-by-value type. */ class Selector { public: /** Empty selector selects nothing */ Selector() {} /** Set selector from Options */ QPID_COMMON_EXTERN Selector(const Options&); /** Equavlient to: Selector s; s.enable(l, s) */ Selector(Level l, const std::string& s=std::string()) { enable(l,s); } Selector(const std::string& enableStr) { enable(enableStr); } /** * Enable messages with level in levels where the file * name contains substring. Empty string matches all. */ void enable(Level level, const std::string& substring=std::string()) { substrings[level].push_back(substring); } /** Enable based on a 'level[+]:file' string */ QPID_COMMON_EXTERN void enable(const std::string& enableStr); /** True if level is enabled for file. */ QPID_COMMON_EXTERN bool isEnabled(Level level, const char* function); private: std::vector substrings[LevelTraits::COUNT]; }; }} // namespace qpid::log #endif /*!SELECTOR_H*/ qpidc-0.16/include/qpid/log/Statement.h0000664000076400007640000001116011471024410020403 0ustar00jrossjross00000000000000#ifndef STATEMENT_H #define STATEMENT_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/Msg.h" #include "qpid/CommonImportExport.h" #include namespace qpid { namespace log { /** Debugging severity levels * - trace: High-volume debugging messages. * - debug: Debugging messages. * - info: Informational messages. * - notice: Normal but significant condition. * - warning: Warn of a possible problem. * - error: A definite error has occured. * - critical: System in danger of severe failure. */ enum Level { trace, debug, info, notice, warning, error, critical }; struct LevelTraits { static const int COUNT=critical+1; /** Get level from string name. *@exception if name invalid. */ static Level level(const char* name); /** Get level from string name. *@exception if name invalid. */ static Level level(const std::string& name) { return level(name.c_str()); } /** String name of level */ static const char* name(Level); }; /** POD struct representing a logging statement in source code. */ struct Statement { bool enabled; const char* file; int line; const char* function; Level level; QPID_COMMON_EXTERN void log(const std::string& message); struct Initializer { QPID_COMMON_EXTERN Initializer(Statement& s); Statement& statement; }; }; ///@internal static initializer for a Statement. #define QPID_LOG_STATEMENT_INIT(level) \ { 0, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, (::qpid::log::level) } /** * Like QPID_LOG but computes an additional boolean test expression * to determine if the message should be logged. Evaluation of both * the test and message expressions occurs only if the requested log level * is enabled. *@param LEVEL severity Level for message, should be one of: * debug, info, notice, warning, error, critical. NB no qpid::log:: prefix. *@param TEST message is logged only if expression TEST evaluates to true. *@param MESSAGE any object with an @eostream operator<<, or a sequence * like of ostreamable objects separated by @e<<. */ #define QPID_LOG_IF(LEVEL, TEST, MESSAGE) \ do { \ using ::qpid::log::Statement; \ static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \ static Statement::Initializer init_(stmt_); \ if (stmt_.enabled && (TEST)) \ stmt_.log(::qpid::Msg() << MESSAGE); \ } while(0) /** * FLAG must be a boolean variable. Assigns FLAG to true iff logging * is enabled for LEVEL in the calling context. Use when extra * support code is needed to generate log messages, to ensure that it * is only run if the logging level is enabled. * e.g. * bool logWarning; * QPID_LOG_TEST(LEVEL, logWarning); * if (logWarning) { do stuff needed for warning log messages } */ #define QPID_LOG_TEST(LEVEL, FLAG) \ do { \ using ::qpid::log::Statement; \ static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \ static Statement::Initializer init_(stmt_); \ FLAG = stmt_.enabled; \ } while(0) /** * Macro for log statements. Example of use: * @code * QPID_LOG(debug, "There are " << foocount << " foos in the bar."); * QPID_LOG(error, boost::format("Dohickey %s exploded") % dohicky.name()); * @endcode * * You can subscribe to log messages by level, by component, by filename * or a combination @see Configuration. *@param LEVEL severity Level for message, should be one of: * debug, info, notice, warning, error, critical. NB no qpid::log:: prefix. *@param MESSAGE any object with an @eostream operator<<, or a sequence * like of ostreamable objects separated by @e<<. */ #define QPID_LOG(LEVEL, MESSAGE) QPID_LOG_IF(LEVEL, true, MESSAGE); }} // namespace qpid::log #endif /*!STATEMENT_H*/ qpidc-0.16/include/qpid/log/Logger.h0000664000076400007640000000657111564561152017704 0ustar00jrossjross00000000000000#ifndef QPID_LOG_LOGGER_H #define QPID_LOG_LOGGER_H /* * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/log/Selector.h" #include "qpid/log/Options.h" #include "qpid/sys/Mutex.h" #include #include #include #include "qpid/CommonImportExport.h" namespace qpid { namespace log { /** * Central logging agent. * * Thread safe, singleton. * * The Logger provides all needed functionality for selecting and * formatting logging output. The actual outputting of log records * is handled by Logger::Output-derived classes instantiated by the * platform's sink-related options. */ class QPID_COMMON_CLASS_EXTERN Logger : private boost::noncopyable { public: /** Flags indicating what to include in the log output */ enum FormatFlag { FILE=1, LINE=2, FUNCTION=4, LEVEL=8, TIME=16, THREAD=32, HIRES=64}; /** * Logging output sink. * * The Output sink provides an interface to direct logging output to. * Logging sinks are primarily platform-specific as provided for on * each platform. * * Implementations of Output must be thread safe. */ class Output { public: QPID_COMMON_EXTERN Output(); QPID_COMMON_EXTERN virtual ~Output(); /** Receives the statemnt of origin and formatted message to log. */ virtual void log(const Statement&, const std::string&) =0; }; QPID_COMMON_EXTERN static Logger& instance(); QPID_COMMON_EXTERN Logger(); QPID_COMMON_EXTERN ~Logger(); /** Select the messages to be logged. */ QPID_COMMON_EXTERN void select(const Selector& s); /** Set the formatting flags, bitwise OR of FormatFlag values. */ QPID_COMMON_EXTERN void format(int formatFlags); /** Set format flags from options object. *@returns computed flags. */ QPID_COMMON_EXTERN int format(const Options&); /** Configure logger from Options */ QPID_COMMON_EXTERN void configure(const Options& o); /** Reset the log selectors */ QPID_COMMON_EXTERN void reconfigure(const std::vector& selectors); /** Add a statement. */ QPID_COMMON_EXTERN void add(Statement& s); /** Log a message. */ QPID_COMMON_EXTERN void log(const Statement&, const std::string&); /** Add an output destination for messages */ QPID_COMMON_EXTERN void output(std::auto_ptr out); /** Set a prefix for all messages */ QPID_COMMON_EXTERN void setPrefix(const std::string& prefix); /** Reset the logger. */ QPID_COMMON_EXTERN void clear(); /** Get the options used to configure the logger. */ QPID_COMMON_INLINE_EXTERN const Options& getOptions() const { return options; } private: typedef boost::ptr_vector Outputs; typedef std::set Statements; sys::Mutex lock; inline void enable_unlocked(Statement* s); Statements statements; Outputs outputs; Selector selector; int flags; std::string prefix; Options options; }; }} // namespace qpid::log #endif /*!QPID_LOG_LOGGER_H*/ qpidc-0.16/include/qpid/SessionId.h0000664000076400007640000000363711227403641017576 0ustar00jrossjross00000000000000#ifndef QPID_SESSIONID_H #define QPID_SESSIONID_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include namespace qpid { /** Identifier for a session. * There are two parts to a session identifier: * * getUserId() returns the authentication principal associated with * the session's connection. * * getName() returns the session name. * * The name must be unique among sessions with the same authentication * principal. */ class SessionId : boost::totally_ordered1 { std::string userId; std::string name; public: QPID_COMMON_EXTERN SessionId(const std::string& userId=std::string(), const std::string& name=std::string()); std::string getUserId() const { return userId; } std::string getName() const { return name; } QPID_COMMON_EXTERN bool operator<(const SessionId&) const ; QPID_COMMON_EXTERN bool operator==(const SessionId& id) const; // Convert to a string QPID_COMMON_EXTERN std::string str() const; }; QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SessionId&); } // namespace qpid #endif /*!QPID_SESSIONID_H*/ qpidc-0.16/include/qpid/CommonImportExport.h0000664000076400007640000000241411564561152021521 0ustar00jrossjross00000000000000#ifndef QPID_COMMON_IMPORT_EXPORT_H #define QPID_COMMON_IMPORT_EXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/ImportExport.h" #if defined(COMMON_EXPORT) || defined (qpidcommon_EXPORTS) # define QPID_COMMON_EXTERN QPID_EXPORT # define QPID_COMMON_CLASS_EXTERN QPID_CLASS_EXPORT # define QPID_COMMON_INLINE_EXTERN QPID_INLINE_EXPORT #else # define QPID_COMMON_EXTERN QPID_IMPORT # define QPID_COMMON_CLASS_EXTERN QPID_CLASS_IMPORT # define QPID_COMMON_INLINE_EXTERN QPID_INLINE_IMPORT #endif #endif qpidc-0.16/include/qpid/client/0000775000076400007640000000000011752725715017006 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/client/MessageListener.h0000664000076400007640000000607211564561152022250 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/client/ClientImportExport.h" #ifndef _MessageListener_ #define _MessageListener_ #include "qpid/client/Message.h" namespace qpid { namespace client { /** * Implement a subclass of MessageListener and subscribe it using * the SubscriptionManager to receive messages. * * Another way to receive messages is by using a LocalQueue. * * \ingroup clientapi * \details * *

Using a MessageListener

* *
    *
  • *

    The received() function is called when a message arrives:

    *
    virtual void received(Message& message)=0;
    *
  • *
  • *

    Derive your own listener, implement the received() function:

    *
         * class Listener : public MessageListener {
         *  private:
         *    SubscriptionManager& subscriptions;
         *  public:
         *    Listener(SubscriptionManager& subscriptions);
         *    virtual void received(Message& message);
         * };
         *
         * Listener::Listener(SubscriptionManager& subs) : subscriptions(subs)
         * {}
         *
         * void Listener::received(Message& message) {
         *   std::cout << "Message: " << message.getData() << std::endl;
         *   if (message.getData() == "That's all, folks!") {
         *       std::cout << "Shutting down listener for " << message.getDestination()
         *                << std::endl;
         *       subscriptions.cancel(message.getDestination());
         *   }
         * }
         *
    *
         * SubscriptionManager subscriptions(session);
         *
         * // Create a listener and subscribe it to the queue named "message_queue"
         * Listener listener(subscriptions);
         * subscriptions.subscribe(listener, "message_queue");
         *
         * // Receive messages until the subscription is cancelled
         * // by Listener::received()
         * subscriptions.run();
         * 
    *
  • *
* */ class QPID_CLIENT_CLASS_EXTERN MessageListener{ public: QPID_CLIENT_EXTERN virtual ~MessageListener(); /** Called for each message arriving from the broker. Override * in your own subclass to process messages. */ virtual void received(Message& msg) = 0; }; } } #endif qpidc-0.16/include/qpid/client/Subscription.h0000664000076400007640000001116411564561152021640 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_SUBSCRIPTION_H #define QPID_CLIENT_SUBSCRIPTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Handle.h" #include "qpid/client/Session.h" #include "qpid/client/SubscriptionSettings.h" #include "qpid/client/Message.h" #include "qpid/client/ClientImportExport.h" namespace qpid { namespace client { template class PrivateImplRef; class SubscriptionImpl; class SubscriptionManager; /** * A handle to an active subscription. Provides methods to query the subscription status * and control acknowledgement (acquire and accept) of messages. */ class QPID_CLIENT_CLASS_EXTERN Subscription : public Handle { public: QPID_CLIENT_EXTERN Subscription(SubscriptionImpl* = 0); QPID_CLIENT_EXTERN Subscription(const Subscription&); QPID_CLIENT_EXTERN ~Subscription(); QPID_CLIENT_EXTERN Subscription& operator=(const Subscription&); /** The name of the subscription, used as the "destination" for messages from the broker. * Usually the same as the queue name but can be set differently. */ QPID_CLIENT_EXTERN std::string getName() const; /** Name of the queue this subscription subscribes to */ QPID_CLIENT_EXTERN std::string getQueue() const; /** Get the flow control and acknowledgement settings for this subscription */ QPID_CLIENT_EXTERN const SubscriptionSettings& getSettings() const; /** Set the flow control parameters */ QPID_CLIENT_EXTERN void setFlowControl(const FlowControl&); /** Automatically acknowledge (acquire and accept) batches of n messages. * You can disable auto-acknowledgement by setting n=0, and use acquire() and accept() * to manually acquire and accept messages. */ QPID_CLIENT_EXTERN void setAutoAck(unsigned int n); /** Get the set of ID's for messages received by this subscription but not yet acquired. * This will always be empty if getSettings().acquireMode=ACQUIRE_MODE_PRE_ACQUIRED */ QPID_CLIENT_EXTERN SequenceSet getUnacquired() const; /** Get the set of ID's for messages received by this subscription but not yet accepted. */ QPID_CLIENT_EXTERN SequenceSet getUnaccepted() const; /** Acquire messageIds and remove them from the unacquired set. * oAdd them to the unaccepted set if getSettings().acceptMode == ACCEPT_MODE_EXPLICIT. */ QPID_CLIENT_EXTERN void acquire(const SequenceSet& messageIds); /** Accept messageIds and remove them from the unaccepted set. *@pre messageIds is a subset of getUnaccepted() */ QPID_CLIENT_EXTERN void accept(const SequenceSet& messageIds); /** Release messageIds and remove them from the unaccepted set. *@pre messageIds is a subset of getUnaccepted() */ QPID_CLIENT_EXTERN void release(const SequenceSet& messageIds); /* Acquire a single message */ QPID_CLIENT_INLINE_EXTERN void acquire(const Message& m) { acquire(SequenceSet(m.getId())); } /* Accept a single message */ QPID_CLIENT_INLINE_EXTERN void accept(const Message& m) { accept(SequenceSet(m.getId())); } /* Release a single message */ QPID_CLIENT_INLINE_EXTERN void release(const Message& m) { release(SequenceSet(m.getId())); } /** Get the session associated with this subscription */ QPID_CLIENT_EXTERN Session getSession() const; /** Get the subscription manager associated with this subscription */ QPID_CLIENT_EXTERN SubscriptionManager getSubscriptionManager(); /** Cancel the subscription. */ QPID_CLIENT_EXTERN void cancel(); /** Grant the specified amount of message credit */ QPID_CLIENT_EXTERN void grantMessageCredit(uint32_t); /** Grant the specified amount of byte credit */ QPID_CLIENT_EXTERN void grantByteCredit(uint32_t); private: friend class PrivateImplRef; friend class SubscriptionManager; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_SUBSCRIPTION_H*/ qpidc-0.16/include/qpid/client/arg.h0000664000076400007640000000605211752725677017742 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_ARG_H #define QPID_CLIENT_ARG_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #define BOOST_PARAMETER_MAX_ARITY 9 #include namespace qpid { namespace client { namespace arg { BOOST_PARAMETER_KEYWORD(keyword_tags, sync) BOOST_PARAMETER_KEYWORD(keyword_tags, commandId) BOOST_PARAMETER_KEYWORD(keyword_tags, value) BOOST_PARAMETER_KEYWORD(keyword_tags, errorCode) BOOST_PARAMETER_KEYWORD(keyword_tags, classCode) BOOST_PARAMETER_KEYWORD(keyword_tags, commandCode) BOOST_PARAMETER_KEYWORD(keyword_tags, fieldIndex) BOOST_PARAMETER_KEYWORD(keyword_tags, description) BOOST_PARAMETER_KEYWORD(keyword_tags, errorInfo) BOOST_PARAMETER_KEYWORD(keyword_tags, destination) BOOST_PARAMETER_KEYWORD(keyword_tags, acceptMode) BOOST_PARAMETER_KEYWORD(keyword_tags, acquireMode) BOOST_PARAMETER_KEYWORD(keyword_tags, content) BOOST_PARAMETER_KEYWORD(keyword_tags, transfers) BOOST_PARAMETER_KEYWORD(keyword_tags, code) BOOST_PARAMETER_KEYWORD(keyword_tags, text) BOOST_PARAMETER_KEYWORD(keyword_tags, setRedelivered) BOOST_PARAMETER_KEYWORD(keyword_tags, resumeId) BOOST_PARAMETER_KEYWORD(keyword_tags, queue) BOOST_PARAMETER_KEYWORD(keyword_tags, exclusive) BOOST_PARAMETER_KEYWORD(keyword_tags, resumeTtl) BOOST_PARAMETER_KEYWORD(keyword_tags, arguments) BOOST_PARAMETER_KEYWORD(keyword_tags, flowMode) BOOST_PARAMETER_KEYWORD(keyword_tags, unit) BOOST_PARAMETER_KEYWORD(keyword_tags, xid) BOOST_PARAMETER_KEYWORD(keyword_tags, join) BOOST_PARAMETER_KEYWORD(keyword_tags, resume) BOOST_PARAMETER_KEYWORD(keyword_tags, fail) BOOST_PARAMETER_KEYWORD(keyword_tags, suspend) BOOST_PARAMETER_KEYWORD(keyword_tags, onePhase) BOOST_PARAMETER_KEYWORD(keyword_tags, timeout) BOOST_PARAMETER_KEYWORD(keyword_tags, exchange) BOOST_PARAMETER_KEYWORD(keyword_tags, type) BOOST_PARAMETER_KEYWORD(keyword_tags, alternateExchange) BOOST_PARAMETER_KEYWORD(keyword_tags, passive) BOOST_PARAMETER_KEYWORD(keyword_tags, durable) BOOST_PARAMETER_KEYWORD(keyword_tags, autoDelete) BOOST_PARAMETER_KEYWORD(keyword_tags, ifUnused) BOOST_PARAMETER_KEYWORD(keyword_tags, name) BOOST_PARAMETER_KEYWORD(keyword_tags, bindingKey) BOOST_PARAMETER_KEYWORD(keyword_tags, ifEmpty) }}} // namespace qpid::client::arg #endif /*!QPID_CLIENT_ARG_H*/ qpidc-0.16/include/qpid/client/Session.h0000664000076400007640000000214111227403641020564 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_SESSION_H #define QPID_CLIENT_SESSION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Session_0_10.h" namespace qpid { namespace client { /** * Session is an alias for Session_0_10 * * \ingroup clientapi */ typedef Session_0_10 Session; }} // namespace qpid::client #endif /*!QPID_CLIENT_SESSION_H*/ qpidc-0.16/include/qpid/client/Message.h0000664000076400007640000001246611564561152020546 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_MESSAGE_H #define QPID_CLIENT_MESSAGE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ClientImportExport.h" #include "qpid/framing/MessageProperties.h" #include "qpid/framing/DeliveryProperties.h" #include namespace qpid { namespace framing { class FieldTable; class SequenceNumber; // FIXME aconway 2009-04-17: remove with getID? } namespace client { class MessageImpl; /** * A message sent to or received from the broker. * * \ingroup clientapi * \details * *

Getting and setting message contents

* *
    *
  • *

    getData()

    *
    std::cout << "Response: " << message.getData() << std::endl;
    *
  • *
  • *

    setData()

    *
    message.setData("That's all, folks!");
  • *
  • *

    appendData()

    *
    message.appendData(" ... let's add a bit more ...");
  • *
* *

Getting and Setting Delivery Properties

* *
    *
  • *

    getDeliveryProperties()

    *
    message.getDeliveryProperties().setRoutingKey("control");
    *
    message.getDeliveryProperties().setDeliveryMode(PERSISTENT);
    *
    message.getDeliveryProperties().setPriority(9);
    *
    message.getDeliveryProperties().setTtl(100);
  • * *
  • *

    hasDeliveryProperties()

    *
    if (! message.hasDeliveryProperties()) {
     *  ...
     *}
  • *
* *

Getting and Setting Message Properties

* *
    *
  • *

    getMessageProperties()

    *
     *request.getMessageProperties().setReplyTo(ReplyTo("amq.direct", response_queue.str()));
     * 
    *
     *routingKey = request.getMessageProperties().getReplyTo().getRoutingKey();
     *exchange = request.getMessageProperties().getReplyTo().getExchange();
     * 
    *
    message.getMessageProperties().setContentType("text/plain");
    *
    message.getMessageProperties().setContentEncoding("text/plain");
    *
  • *
  • *

    hasMessageProperties()

    *
    request.getMessageProperties().hasReplyTo();
    *
  • *
* *

Getting and Setting Application Headers

* *
    *
  • *

    getHeaders()

    *
     *message.getHeaders().getString("control");
     * 
    *
     *message.getHeaders().setString("control","continue");
     * 
  • *
* * */ class QPID_CLIENT_CLASS_EXTERN Message { public: /** Create a Message. *@param data Data for the message body. *@param routingKey Passed to the exchange that routes the message. */ QPID_CLIENT_EXTERN Message( const std::string& data=std::string(), const std::string& routingKey=std::string()); Message(MessageImpl*); ///< @internal QPID_CLIENT_EXTERN Message(const Message&); QPID_CLIENT_EXTERN ~Message(); QPID_CLIENT_EXTERN Message& operator=(const Message&); QPID_CLIENT_EXTERN void swap(Message&); QPID_CLIENT_EXTERN void setData(const std::string&); QPID_CLIENT_EXTERN const std::string& getData() const; QPID_CLIENT_EXTERN std::string& getData(); QPID_CLIENT_EXTERN void appendData(const std::string&); QPID_CLIENT_EXTERN bool hasMessageProperties() const; QPID_CLIENT_EXTERN framing::MessageProperties& getMessageProperties(); QPID_CLIENT_EXTERN const framing::MessageProperties& getMessageProperties() const; QPID_CLIENT_EXTERN bool hasDeliveryProperties() const; QPID_CLIENT_EXTERN framing::DeliveryProperties& getDeliveryProperties(); QPID_CLIENT_EXTERN const framing::DeliveryProperties& getDeliveryProperties() const; /** The destination of messages sent to the broker is the exchange * name. The destination of messages received from the broker is * the delivery tag identifyig the local subscription (often this * is the name of the subscribed queue.) */ QPID_CLIENT_EXTERN std::string getDestination() const; /** Check the redelivered flag. */ QPID_CLIENT_EXTERN bool isRedelivered() const; /** Set the redelivered flag. */ QPID_CLIENT_EXTERN void setRedelivered(bool redelivered); /** Get a modifyable reference to the message headers. */ QPID_CLIENT_EXTERN framing::FieldTable& getHeaders(); /** Get a non-modifyable reference to the message headers. */ QPID_CLIENT_EXTERN const framing::FieldTable& getHeaders() const; // FIXME aconway 2009-04-17: does this need to be in public API? ///@internal QPID_CLIENT_EXTERN const framing::SequenceNumber& getId() const; private: MessageImpl* impl; friend class MessageImpl; // Helper template for implementation }; }} #endif /*!QPID_CLIENT_MESSAGE_H*/ qpidc-0.16/include/qpid/client/no_keyword/0000775000076400007640000000000011752725714021165 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/client/no_keyword/AsyncSession_0_10.h0000664000076400007640000011130411752725677024506 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_NO_KEYWORD_ASYNCSESSION_0_10_H #define QPID_CLIENT_NO_KEYWORD_ASYNCSESSION_0_10_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/client/SessionBase_0_10.h" #include "qpid/client/ClientImportExport.h" namespace qpid { namespace client { namespace no_keyword { /** * AMQP 0-10 asynchronous session API. * * A session is a named interaction between two peers. Session names are chosen by the upper * layers and may be used indefinitely. The model layer may associate long-lived or durable state * with a given session name. The session layer provides transport of commands associated with * this interaction. * */ class AsyncSession_0_10: public SessionBase_0_10 { public: QPID_CLIENT_EXTERN AsyncSession_0_10(); QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10(const SessionBase_0_10& other); QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10& operator=(const SessionBase_0_10& other); /** * * This command is complete when all prior commands are completed. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion executionSync(bool sync=false); /** * * This command carries data resulting from the execution of a command. * * * @param commandId * * @param value * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion executionResult(const SequenceNumber& commandId=SequenceNumber(), const std::string& value=std::string(), bool sync=false); /** * * This command informs a peer of an execution exception. The command-id, when given, * correlates the error to a specific command. * * * @param errorCode * * @param commandId * * The command-id of the command which caused the exception. If the exception was not caused * by a specific command, this value is not set. * * * @param classCode * * @param commandCode * * @param fieldIndex * * The zero based index of the exceptional field within the arguments to the exceptional * command. If the exception was not caused by a specific field, this value is not set. * * * @param description * * The description provided is implementation defined, but MUST be in the language * appropriate for the selected locale. The intention is that this description is suitable * for logging or alerting output. * * * @param errorInfo * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion executionException(uint16_t errorCode=0, const SequenceNumber& commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string& description=std::string(), const FieldTable& errorInfo=FieldTable(), bool sync=false); /** * * This command transfers a message between two peers. When a client uses this command to * publish a message to a broker, the destination identifies a specific exchange. The message * will then be routed to queues as defined by the exchange configuration. * * The client may request a broker to transfer messages to it, from a particular queue, by * issuing a subscribe command. The subscribe command specifies the destination that the broker * should use for any resulting transfers. * * * @param destination * * Specifies the destination to which the message is to be transferred. * * * @param acceptMode * * Indicates whether message.accept, session.complete, or nothing at all is required to * indicate successful transfer of the message. * * * @param acquireMode * * Indicates whether or not the transferred message has been acquired. * * * @param content * Message content * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageTransfer(const std::string& destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message& content=Message(std::string()), bool sync=false); /** * * Accepts the message. Once a transfer is accepted, the command-id may no longer be referenced * from other commands. * * * @param transfers * * Identifies the messages previously transferred that should be accepted. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageAccept(const SequenceSet& transfers=SequenceSet(), bool sync=false); /** * * Indicates that the message transfers are unprocessable in some way. A server may reject a * message if it is unroutable. A client may reject a message if it is invalid. A message may * be rejected for other reasons as well. Once a transfer is rejected, the command-id may no * longer be referenced from other commands. * * * @param transfers * * Identifies the messages previously transferred that should be rejected. * * * @param code * * Code describing the reason for rejection. * * * @param text * * Text describing the reason for rejection. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageReject(const SequenceSet& transfers=SequenceSet(), uint16_t code=0, const std::string& text=std::string(), bool sync=false); /** * * Release previously transferred messages. When acquired messages are released, they become * available for acquisition by any subscriber. Once a transfer is released, the command-id may * no longer be referenced from other commands. * * * @param transfers * * Indicates the messages to be released. * * * @param setRedelivered * * By setting set-redelivered to true, any acquired messages released to a queue with this * command will be marked as redelivered on their next transfer from that queue. If this flag * is not set, then an acquired message will retain its original redelivered status on the * queue. Messages that are not acquired are unaffected by the value of this flag. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageRelease(const SequenceSet& transfers=SequenceSet(), bool setRedelivered=false, bool sync=false); /** * * Acquires previously transferred messages for consumption. The acquired ids (if any) are * sent via message.acquired. * * * @param transfers * * Indicates the messages to be acquired. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult messageAcquire(const SequenceSet& transfers=SequenceSet(), bool sync=false); /** * * This command resumes an interrupted transfer. The recipient should return the amount of * partially transferred data associated with the given resume-id, or zero if there is no data * at all. If a non-zero result is returned, the recipient should expect to receive message * fragment(s) containing the remainder of the interrupted message. * * * @param destination * * The destination to which the remaining message fragments are transferred. * * * @param resumeId * * The name of the transfer being resumed. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult messageResume(const std::string& destination=std::string(), const std::string& resumeId=std::string(), bool sync=false); /** * This command asks the server to start a "subscription", which is a request for messages * from a specific queue. Subscriptions last as long as the session they were created on, or * until the client cancels them. * * @param queue * Specifies the name of the subscribed queue. * * @param destination * The client specified name for the subscription. This is used as the destination for * all messages transferred from this subscription. The destination is scoped to the session. * * * @param acceptMode * The accept-mode to use for messages transferred from this subscription. * * @param acquireMode * The acquire-mode to use for messages transferred from this subscription. * * @param exclusive * Request an exclusive subscription. This prevents other subscribers from subscribing to * the queue. * * @param resumeId * Requests that the broker use the supplied resume-id when transferring messages for * this subscription. * * @param resumeTtl * Requested duration in milliseconds for the broker use as resume-ttl when transferring * messages for this subscription. * * @param arguments * The syntax and semantics of these arguments depends on the providers implementation. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageSubscribe(const std::string& queue=std::string(), const std::string& destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string& resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable& arguments=FieldTable(), bool sync=false); /** * * This command cancels a subscription. This does not affect already delivered messages, but it * does mean the server will not send any more messages for that subscription. The client may * receive an arbitrary number of messages in between sending the cancel command and receiving * notification that the cancel command is complete. * * * @param destination * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageCancel(const std::string& destination=std::string(), bool sync=false); /** * * Sets the mode of flow control used for a given destination to either window or credit based * flow control. * * With credit based flow control, the sender of messages continually maintains its current * credit balance with the recipient. The credit balance consists of two values, a message * count, and a byte count. Whenever message data is sent, both counts must be decremented. * If either value reaches zero, the flow of message data must stop. Additional credit is * received via the message.flow command. * * The sender MUST NOT send partial assemblies. This means that if there is not enough byte * credit available to send a complete message, the sender must either wait or use message * fragmentation (see the fragment-properties header struct) to send the first part of the * message data in a complete assembly. * * Window based flow control is identical to credit based flow control, however message * transfer completion implicitly grants a single unit of message credit, and the size of the * message in byte credits for each completed message transfer. Completion of the transfer * command with session.completed is the only way credit is implicitly updated; message.accept, * message.release, message.reject, tx.commit and tx.rollback have no effect on the outstanding * credit balances. * * * @param destination * * @param flowMode * * The new flow control mode. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageSetFlowMode(const std::string& destination=std::string(), uint8_t flowMode=0, bool sync=false); /** * * This command controls the flow of message data to a given destination. It is used by the * recipient of messages to dynamically match the incoming rate of message flow to its * processing or forwarding capacity. Upon receipt of this command, the sender must add "value" * number of the specified unit to the available credit balance for the specified destination. * A value of (0xFFFFFFFF) indicates an infinite amount of credit. This disables any limit for * the given unit until the credit balance is zeroed with message.stop or message.flush. * * * @param destination * * @param unit * * The unit of value. * * * @param value * * If the value is not set then this indicates an infinite amount of credit. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageFlow(const std::string& destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=false); /** * * Forces the sender to exhaust his credit supply. The sender's credit will always be zero when * this command completes. The command completes when immediately available message data has * been transferred, or when the credit supply is exhausted. * * * @param destination * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageFlush(const std::string& destination=std::string(), bool sync=false); /** * * On receipt of this command, a producer of messages MUST set his credit to zero for the given * destination. When notifying of completion, credit MUST be zero and no further messages will * be sent until such a time as further credit is received. * * * @param destination * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion messageStop(const std::string& destination=std::string(), bool sync=false); /** * * This command sets the session to use standard transactions. The client must use this command * exactly once on a session before using the Commit or Rollback commands. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion txSelect(bool sync=false); /** * * This command commits all messages published and accepted in the current transaction. A * new transaction starts immediately after a commit. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion txCommit(bool sync=false); /** * * This command abandons the current transaction. In particular the transfers from Client to * Server (publishes) and accepts of transfers from Server to Client which occurred in the * current transaction are discarded. A new transaction starts immediately after a rollback. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion txRollback(bool sync=false); /** * * This command sets the session to use distributed transactions. The client must use this * command at least once on a session before using XA demarcation operations. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion dtxSelect(bool sync=false); /** * * This command is called when messages should be produced and consumed on behalf a transaction * branch identified by xid. * * * @param xid * * Specifies the xid of the transaction branch to be started. * * * @param join * * Indicate whether this is joining an already associated xid. Indicate that the start * applies to joining a transaction previously seen. * * * @param resume * * Indicate that the start applies to resuming a suspended transaction branch specified. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult dtxStart(const Xid& xid=Xid(), bool join=false, bool resume=false, bool sync=false); /** * * This command is called when the work done on behalf a transaction branch finishes or needs * to be suspended. * * * @param xid * * Specifies the xid of the transaction branch to be ended. * * * @param fail * * If set, indicates that this portion of work has failed; otherwise this portion of work has * completed successfully. * * * @param suspend * * Indicates that the transaction branch is temporarily suspended in an incomplete state. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult dtxEnd(const Xid& xid=Xid(), bool fail=false, bool suspend=false, bool sync=false); /** * * Commit the work done on behalf a transaction branch. This command commits the work * associated with xid. Any produced messages are made available and any consumed messages are * discarded. * * * @param xid * * Specifies the xid of the transaction branch to be committed. * * * @param onePhase * * Used to indicate whether one-phase or two-phase commit is used. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult dtxCommit(const Xid& xid=Xid(), bool onePhase=false, bool sync=false); /** * * This command is called to forget about a heuristically completed transaction branch. * * * @param xid * * Specifies the xid of the transaction branch to be forgotten. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion dtxForget(const Xid& xid=Xid(), bool sync=false); /** * * This command obtains the current transaction timeout value in seconds. If set-timeout was * not used prior to invoking this command, the return value is the default timeout; otherwise, * the value used in the previous set-timeout call is returned. * * * @param xid * * Specifies the xid of the transaction branch for getting the timeout. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult dtxGetTimeout(const Xid& xid=Xid(), bool sync=false); /** * * This command prepares for commitment any message produced or consumed on behalf of xid. * * * @param xid * * Specifies the xid of the transaction branch that can be prepared. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult dtxPrepare(const Xid& xid=Xid(), bool sync=false); /** * * This command is called to obtain a list of transaction branches that are in a prepared or * heuristically completed state. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult dtxRecover(bool sync=false); /** * * This command rolls back the work associated with xid. Any produced messages are discarded * and any consumed messages are re-enqueued. * * * @param xid * * Specifies the xid of the transaction branch that can be rolled back. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult dtxRollback(const Xid& xid=Xid(), bool sync=false); /** * * Sets the specified transaction branch timeout value in seconds. * * * @param xid * * Specifies the xid of the transaction branch for setting the timeout. * * * @param timeout * * The transaction timeout value in seconds. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion dtxSetTimeout(const Xid& xid=Xid(), uint32_t timeout=0, bool sync=false); /** * * This command creates an exchange if it does not already exist, and if the exchange exists, * verifies that it is of the correct and expected class. * * * @param exchange * * @param type * * Each exchange belongs to one of a set of exchange types implemented by the server. The * exchange types define the functionality of the exchange - i.e. how messages are routed * through it. It is not valid or meaningful to attempt to change the type of an existing * exchange. * * * @param alternateExchange * * In the event that a message cannot be routed, this is the name of the exchange to which * the message will be sent. Messages transferred using message.transfer will be routed to * the alternate-exchange only if they are sent with the "none" accept-mode, and the * discard-unroutable delivery property is set to false, and there is no queue to route to * for the given message according to the bindings on this exchange. * * * @param passive * * If set, the server will not create the exchange. The client can use this to check whether * an exchange exists without modifying the server state. * * * @param durable * * If set when creating a new exchange, the exchange will be marked as durable. Durable * exchanges remain active when a server restarts. Non-durable exchanges (transient * exchanges) are purged if/when a server restarts. * * * @param autoDelete * * If set, the exchange is deleted automatically when there remain no bindings between the * exchange and any queue. Such an exchange will not be automatically deleted until at least * one binding has been made to prevent the immediate deletion of the exchange upon creation. * * * @param arguments * * A set of arguments for the declaration. The syntax and semantics of these arguments * depends on the server implementation. This field is ignored if passive is 1. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion exchangeDeclare(const std::string& exchange=std::string(), const std::string& type=std::string(), const std::string& alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable& arguments=FieldTable(), bool sync=false); /** * * This command deletes an exchange. When an exchange is deleted all queue bindings on the * exchange are cancelled. * * * @param exchange * * @param ifUnused * * If set, the server will only delete the exchange if it has no queue bindings. If the * exchange has queue bindings the server does not delete it but raises an exception * instead. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion exchangeDelete(const std::string& exchange=std::string(), bool ifUnused=false, bool sync=false); /** * * This command is used to request information on a particular exchange. * * * @param name * * The name of the exchange for which information is requested. If not specified explicitly * the default exchange is implied. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult exchangeQuery(const std::string& name=std::string(), bool sync=false); /** * This command binds a queue to an exchange. Until a queue is bound it will not receive * any messages. In a classic messaging model, store-and-forward queues are bound to a direct * exchange and subscription queues are bound to a topic exchange. * * @param queue * Specifies the name of the queue to bind. * * @param exchange * * @param bindingKey * The binding-key uniquely identifies a binding between a given (exchange, queue) pair. * Depending on the exchange configuration, the binding key may be matched against the * message routing key in order to make routing decisions. The match algorithm depends on the * exchange type. Some exchange types may ignore the binding key when making routing * decisions. Refer to the specific exchange type documentation. The meaning of an empty * binding key depends on the exchange implementation. * * @param arguments * A set of arguments for the binding. The syntax and semantics of these arguments * depends on the exchange class. * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion exchangeBind(const std::string& queue=std::string(), const std::string& exchange=std::string(), const std::string& bindingKey=std::string(), const FieldTable& arguments=FieldTable(), bool sync=false); /** * * This command unbinds a queue from an exchange. * * * @param queue * * Specifies the name of the queue to unbind. * * * @param exchange * * The name of the exchange to unbind from. * * * @param bindingKey * * Specifies the binding-key of the binding to unbind. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion exchangeUnbind(const std::string& queue=std::string(), const std::string& exchange=std::string(), const std::string& bindingKey=std::string(), bool sync=false); /** * * This command is used to request information on the bindings to a particular exchange. * * * @param exchange * * The name of the exchange for which binding information is being requested. If not * specified explicitly the default exchange is implied. * * * @param queue * * If populated then determine whether the given queue is bound to the exchange. * * * @param bindingKey * * If populated defines the binding-key of the binding of interest, if not populated the * request will ignore the binding-key on bindings when searching for a match. * * * @param arguments * * If populated defines the arguments of the binding of interest if not populated the request * will ignore the arguments on bindings when searching for a match * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult exchangeBound(const std::string& exchange=std::string(), const std::string& queue=std::string(), const std::string& bindingKey=std::string(), const FieldTable& arguments=FieldTable(), bool sync=false); /** * * This command creates or checks a queue. When creating a new queue the client can specify * various properties that control the durability of the queue and its contents, and the level * of sharing for the queue. * * * @param queue * * @param alternateExchange * * The alternate-exchange field specifies how messages on this queue should be treated when * they are rejected by a subscriber, or when they are orphaned by queue deletion. When * present, rejected or orphaned messages MUST be routed to the alternate-exchange. In all * cases the messages MUST be removed from the queue. * * * @param passive * * If set, the server will not create the queue. This field allows the client to assert the * presence of a queue without modifying the server state. * * * @param durable * * If set when creating a new queue, the queue will be marked as durable. Durable queues * remain active when a server restarts. Non-durable queues (transient queues) are purged * if/when a server restarts. Note that durable queues do not necessarily hold persistent * messages, although it does not make sense to send persistent messages to a transient * queue. * * * @param exclusive * * Exclusive queues can only be used from one session at a time. Once a session * declares an exclusive queue, that queue cannot be used by any other session until the * declaring session closes. * * * @param autoDelete * * If this field is set and the exclusive field is also set, then the queue MUST be deleted * when the session closes. * * If this field is set and the exclusive field is not set the queue is deleted when all * the consumers have finished using it. Last consumer can be cancelled either explicitly * or because its session is closed. If there was no consumer ever on the queue, it won't * be deleted. * * * @param arguments * * A set of arguments for the declaration. The syntax and semantics of these arguments * depends on the server implementation. This field is ignored if passive is 1. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion queueDeclare(const std::string& queue=std::string(), const std::string& alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable& arguments=FieldTable(), bool sync=false); /** * * This command deletes a queue. When a queue is deleted any pending messages are sent to the * alternate-exchange if defined, or discarded if it is not. * * * @param queue * * Specifies the name of the queue to delete. * * * @param ifUnused * * If set, the server will only delete the queue if it has no consumers. If the queue has * consumers the server does does not delete it but raises an exception instead. * * * @param ifEmpty * * If set, the server will only delete the queue if it has no messages. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion queueDelete(const std::string& queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=false); /** * * This command removes all messages from a queue. It does not cancel subscribers. Purged * messages are deleted without any formal "undo" mechanism. * * * @param queue * * Specifies the name of the queue to purge. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN Completion queuePurge(const std::string& queue=std::string(), bool sync=false); /** * * This command requests information about a queue. * * * @param queue * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN TypedResult queueQuery(const std::string& queue=std::string(), bool sync=false); }; }}} // namespace qpid::client::no_keyword #endif /*!QPID_CLIENT_NO_KEYWORD_ASYNCSESSION_0_10_H*/ qpidc-0.16/include/qpid/client/no_keyword/Session_0_10.h0000664000076400007640000011050211752725677023507 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_NO_KEYWORD_SESSION_0_10_H #define QPID_CLIENT_NO_KEYWORD_SESSION_0_10_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/client/SessionBase_0_10.h" #include "qpid/client/ClientImportExport.h" namespace qpid { namespace client { namespace no_keyword { /** * AMQP 0-10 synchronous session API. * * A session is a named interaction between two peers. Session names are chosen by the upper * layers and may be used indefinitely. The model layer may associate long-lived or durable state * with a given session name. The session layer provides transport of commands associated with * this interaction. * */ class Session_0_10: public SessionBase_0_10 { public: QPID_CLIENT_EXTERN Session_0_10(); QPID_CLIENT_INLINE_EXTERN Session_0_10(const SessionBase_0_10& other); QPID_CLIENT_INLINE_EXTERN Session_0_10& operator=(const SessionBase_0_10& other); /** * * This command is complete when all prior commands are completed. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void executionSync(bool sync=true); /** * * This command carries data resulting from the execution of a command. * * * @param commandId * * @param value * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void executionResult(const SequenceNumber& commandId=SequenceNumber(), const std::string& value=std::string(), bool sync=true); /** * * This command informs a peer of an execution exception. The command-id, when given, * correlates the error to a specific command. * * * @param errorCode * * @param commandId * * The command-id of the command which caused the exception. If the exception was not caused * by a specific command, this value is not set. * * * @param classCode * * @param commandCode * * @param fieldIndex * * The zero based index of the exceptional field within the arguments to the exceptional * command. If the exception was not caused by a specific field, this value is not set. * * * @param description * * The description provided is implementation defined, but MUST be in the language * appropriate for the selected locale. The intention is that this description is suitable * for logging or alerting output. * * * @param errorInfo * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void executionException(uint16_t errorCode=0, const SequenceNumber& commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string& description=std::string(), const FieldTable& errorInfo=FieldTable(), bool sync=true); /** * * This command transfers a message between two peers. When a client uses this command to * publish a message to a broker, the destination identifies a specific exchange. The message * will then be routed to queues as defined by the exchange configuration. * * The client may request a broker to transfer messages to it, from a particular queue, by * issuing a subscribe command. The subscribe command specifies the destination that the broker * should use for any resulting transfers. * * * @param destination * * Specifies the destination to which the message is to be transferred. * * * @param acceptMode * * Indicates whether message.accept, session.complete, or nothing at all is required to * indicate successful transfer of the message. * * * @param acquireMode * * Indicates whether or not the transferred message has been acquired. * * * @param content * Message content * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageTransfer(const std::string& destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message& content=Message(std::string()), bool sync=true); /** * * Accepts the message. Once a transfer is accepted, the command-id may no longer be referenced * from other commands. * * * @param transfers * * Identifies the messages previously transferred that should be accepted. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageAccept(const SequenceSet& transfers=SequenceSet(), bool sync=true); /** * * Indicates that the message transfers are unprocessable in some way. A server may reject a * message if it is unroutable. A client may reject a message if it is invalid. A message may * be rejected for other reasons as well. Once a transfer is rejected, the command-id may no * longer be referenced from other commands. * * * @param transfers * * Identifies the messages previously transferred that should be rejected. * * * @param code * * Code describing the reason for rejection. * * * @param text * * Text describing the reason for rejection. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageReject(const SequenceSet& transfers=SequenceSet(), uint16_t code=0, const std::string& text=std::string(), bool sync=true); /** * * Release previously transferred messages. When acquired messages are released, they become * available for acquisition by any subscriber. Once a transfer is released, the command-id may * no longer be referenced from other commands. * * * @param transfers * * Indicates the messages to be released. * * * @param setRedelivered * * By setting set-redelivered to true, any acquired messages released to a queue with this * command will be marked as redelivered on their next transfer from that queue. If this flag * is not set, then an acquired message will retain its original redelivered status on the * queue. Messages that are not acquired are unaffected by the value of this flag. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageRelease(const SequenceSet& transfers=SequenceSet(), bool setRedelivered=false, bool sync=true); /** * * Acquires previously transferred messages for consumption. The acquired ids (if any) are * sent via message.acquired. * * * @param transfers * * Indicates the messages to be acquired. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::MessageAcquireResult messageAcquire(const SequenceSet& transfers=SequenceSet(), bool sync=true); /** * * This command resumes an interrupted transfer. The recipient should return the amount of * partially transferred data associated with the given resume-id, or zero if there is no data * at all. If a non-zero result is returned, the recipient should expect to receive message * fragment(s) containing the remainder of the interrupted message. * * * @param destination * * The destination to which the remaining message fragments are transferred. * * * @param resumeId * * The name of the transfer being resumed. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::MessageResumeResult messageResume(const std::string& destination=std::string(), const std::string& resumeId=std::string(), bool sync=true); /** * This command asks the server to start a "subscription", which is a request for messages * from a specific queue. Subscriptions last as long as the session they were created on, or * until the client cancels them. * * @param queue * Specifies the name of the subscribed queue. * * @param destination * The client specified name for the subscription. This is used as the destination for * all messages transferred from this subscription. The destination is scoped to the session. * * * @param acceptMode * The accept-mode to use for messages transferred from this subscription. * * @param acquireMode * The acquire-mode to use for messages transferred from this subscription. * * @param exclusive * Request an exclusive subscription. This prevents other subscribers from subscribing to * the queue. * * @param resumeId * Requests that the broker use the supplied resume-id when transferring messages for * this subscription. * * @param resumeTtl * Requested duration in milliseconds for the broker use as resume-ttl when transferring * messages for this subscription. * * @param arguments * The syntax and semantics of these arguments depends on the providers implementation. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageSubscribe(const std::string& queue=std::string(), const std::string& destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string& resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable& arguments=FieldTable(), bool sync=true); /** * * This command cancels a subscription. This does not affect already delivered messages, but it * does mean the server will not send any more messages for that subscription. The client may * receive an arbitrary number of messages in between sending the cancel command and receiving * notification that the cancel command is complete. * * * @param destination * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageCancel(const std::string& destination=std::string(), bool sync=true); /** * * Sets the mode of flow control used for a given destination to either window or credit based * flow control. * * With credit based flow control, the sender of messages continually maintains its current * credit balance with the recipient. The credit balance consists of two values, a message * count, and a byte count. Whenever message data is sent, both counts must be decremented. * If either value reaches zero, the flow of message data must stop. Additional credit is * received via the message.flow command. * * The sender MUST NOT send partial assemblies. This means that if there is not enough byte * credit available to send a complete message, the sender must either wait or use message * fragmentation (see the fragment-properties header struct) to send the first part of the * message data in a complete assembly. * * Window based flow control is identical to credit based flow control, however message * transfer completion implicitly grants a single unit of message credit, and the size of the * message in byte credits for each completed message transfer. Completion of the transfer * command with session.completed is the only way credit is implicitly updated; message.accept, * message.release, message.reject, tx.commit and tx.rollback have no effect on the outstanding * credit balances. * * * @param destination * * @param flowMode * * The new flow control mode. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageSetFlowMode(const std::string& destination=std::string(), uint8_t flowMode=0, bool sync=true); /** * * This command controls the flow of message data to a given destination. It is used by the * recipient of messages to dynamically match the incoming rate of message flow to its * processing or forwarding capacity. Upon receipt of this command, the sender must add "value" * number of the specified unit to the available credit balance for the specified destination. * A value of (0xFFFFFFFF) indicates an infinite amount of credit. This disables any limit for * the given unit until the credit balance is zeroed with message.stop or message.flush. * * * @param destination * * @param unit * * The unit of value. * * * @param value * * If the value is not set then this indicates an infinite amount of credit. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageFlow(const std::string& destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=true); /** * * Forces the sender to exhaust his credit supply. The sender's credit will always be zero when * this command completes. The command completes when immediately available message data has * been transferred, or when the credit supply is exhausted. * * * @param destination * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageFlush(const std::string& destination=std::string(), bool sync=true); /** * * On receipt of this command, a producer of messages MUST set his credit to zero for the given * destination. When notifying of completion, credit MUST be zero and no further messages will * be sent until such a time as further credit is received. * * * @param destination * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void messageStop(const std::string& destination=std::string(), bool sync=true); /** * * This command sets the session to use standard transactions. The client must use this command * exactly once on a session before using the Commit or Rollback commands. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void txSelect(bool sync=true); /** * * This command commits all messages published and accepted in the current transaction. A * new transaction starts immediately after a commit. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void txCommit(bool sync=true); /** * * This command abandons the current transaction. In particular the transfers from Client to * Server (publishes) and accepts of transfers from Server to Client which occurred in the * current transaction are discarded. A new transaction starts immediately after a rollback. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void txRollback(bool sync=true); /** * * This command sets the session to use distributed transactions. The client must use this * command at least once on a session before using XA demarcation operations. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void dtxSelect(bool sync=true); /** * * This command is called when messages should be produced and consumed on behalf a transaction * branch identified by xid. * * * @param xid * * Specifies the xid of the transaction branch to be started. * * * @param join * * Indicate whether this is joining an already associated xid. Indicate that the start * applies to joining a transaction previously seen. * * * @param resume * * Indicate that the start applies to resuming a suspended transaction branch specified. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::XaResult dtxStart(const Xid& xid=Xid(), bool join=false, bool resume=false, bool sync=true); /** * * This command is called when the work done on behalf a transaction branch finishes or needs * to be suspended. * * * @param xid * * Specifies the xid of the transaction branch to be ended. * * * @param fail * * If set, indicates that this portion of work has failed; otherwise this portion of work has * completed successfully. * * * @param suspend * * Indicates that the transaction branch is temporarily suspended in an incomplete state. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::XaResult dtxEnd(const Xid& xid=Xid(), bool fail=false, bool suspend=false, bool sync=true); /** * * Commit the work done on behalf a transaction branch. This command commits the work * associated with xid. Any produced messages are made available and any consumed messages are * discarded. * * * @param xid * * Specifies the xid of the transaction branch to be committed. * * * @param onePhase * * Used to indicate whether one-phase or two-phase commit is used. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::XaResult dtxCommit(const Xid& xid=Xid(), bool onePhase=false, bool sync=true); /** * * This command is called to forget about a heuristically completed transaction branch. * * * @param xid * * Specifies the xid of the transaction branch to be forgotten. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void dtxForget(const Xid& xid=Xid(), bool sync=true); /** * * This command obtains the current transaction timeout value in seconds. If set-timeout was * not used prior to invoking this command, the return value is the default timeout; otherwise, * the value used in the previous set-timeout call is returned. * * * @param xid * * Specifies the xid of the transaction branch for getting the timeout. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::DtxGetTimeoutResult dtxGetTimeout(const Xid& xid=Xid(), bool sync=true); /** * * This command prepares for commitment any message produced or consumed on behalf of xid. * * * @param xid * * Specifies the xid of the transaction branch that can be prepared. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::XaResult dtxPrepare(const Xid& xid=Xid(), bool sync=true); /** * * This command is called to obtain a list of transaction branches that are in a prepared or * heuristically completed state. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::DtxRecoverResult dtxRecover(bool sync=true); /** * * This command rolls back the work associated with xid. Any produced messages are discarded * and any consumed messages are re-enqueued. * * * @param xid * * Specifies the xid of the transaction branch that can be rolled back. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::XaResult dtxRollback(const Xid& xid=Xid(), bool sync=true); /** * * Sets the specified transaction branch timeout value in seconds. * * * @param xid * * Specifies the xid of the transaction branch for setting the timeout. * * * @param timeout * * The transaction timeout value in seconds. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void dtxSetTimeout(const Xid& xid=Xid(), uint32_t timeout=0, bool sync=true); /** * * This command creates an exchange if it does not already exist, and if the exchange exists, * verifies that it is of the correct and expected class. * * * @param exchange * * @param type * * Each exchange belongs to one of a set of exchange types implemented by the server. The * exchange types define the functionality of the exchange - i.e. how messages are routed * through it. It is not valid or meaningful to attempt to change the type of an existing * exchange. * * * @param alternateExchange * * In the event that a message cannot be routed, this is the name of the exchange to which * the message will be sent. Messages transferred using message.transfer will be routed to * the alternate-exchange only if they are sent with the "none" accept-mode, and the * discard-unroutable delivery property is set to false, and there is no queue to route to * for the given message according to the bindings on this exchange. * * * @param passive * * If set, the server will not create the exchange. The client can use this to check whether * an exchange exists without modifying the server state. * * * @param durable * * If set when creating a new exchange, the exchange will be marked as durable. Durable * exchanges remain active when a server restarts. Non-durable exchanges (transient * exchanges) are purged if/when a server restarts. * * * @param autoDelete * * If set, the exchange is deleted automatically when there remain no bindings between the * exchange and any queue. Such an exchange will not be automatically deleted until at least * one binding has been made to prevent the immediate deletion of the exchange upon creation. * * * @param arguments * * A set of arguments for the declaration. The syntax and semantics of these arguments * depends on the server implementation. This field is ignored if passive is 1. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void exchangeDeclare(const std::string& exchange=std::string(), const std::string& type=std::string(), const std::string& alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable& arguments=FieldTable(), bool sync=true); /** * * This command deletes an exchange. When an exchange is deleted all queue bindings on the * exchange are cancelled. * * * @param exchange * * @param ifUnused * * If set, the server will only delete the exchange if it has no queue bindings. If the * exchange has queue bindings the server does not delete it but raises an exception * instead. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void exchangeDelete(const std::string& exchange=std::string(), bool ifUnused=false, bool sync=true); /** * * This command is used to request information on a particular exchange. * * * @param name * * The name of the exchange for which information is requested. If not specified explicitly * the default exchange is implied. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::ExchangeQueryResult exchangeQuery(const std::string& name=std::string(), bool sync=true); /** * This command binds a queue to an exchange. Until a queue is bound it will not receive * any messages. In a classic messaging model, store-and-forward queues are bound to a direct * exchange and subscription queues are bound to a topic exchange. * * @param queue * Specifies the name of the queue to bind. * * @param exchange * * @param bindingKey * The binding-key uniquely identifies a binding between a given (exchange, queue) pair. * Depending on the exchange configuration, the binding key may be matched against the * message routing key in order to make routing decisions. The match algorithm depends on the * exchange type. Some exchange types may ignore the binding key when making routing * decisions. Refer to the specific exchange type documentation. The meaning of an empty * binding key depends on the exchange implementation. * * @param arguments * A set of arguments for the binding. The syntax and semantics of these arguments * depends on the exchange class. * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void exchangeBind(const std::string& queue=std::string(), const std::string& exchange=std::string(), const std::string& bindingKey=std::string(), const FieldTable& arguments=FieldTable(), bool sync=true); /** * * This command unbinds a queue from an exchange. * * * @param queue * * Specifies the name of the queue to unbind. * * * @param exchange * * The name of the exchange to unbind from. * * * @param bindingKey * * Specifies the binding-key of the binding to unbind. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void exchangeUnbind(const std::string& queue=std::string(), const std::string& exchange=std::string(), const std::string& bindingKey=std::string(), bool sync=true); /** * * This command is used to request information on the bindings to a particular exchange. * * * @param exchange * * The name of the exchange for which binding information is being requested. If not * specified explicitly the default exchange is implied. * * * @param queue * * If populated then determine whether the given queue is bound to the exchange. * * * @param bindingKey * * If populated defines the binding-key of the binding of interest, if not populated the * request will ignore the binding-key on bindings when searching for a match. * * * @param arguments * * If populated defines the arguments of the binding of interest if not populated the request * will ignore the arguments on bindings when searching for a match * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::ExchangeBoundResult exchangeBound(const std::string& exchange=std::string(), const std::string& queue=std::string(), const std::string& bindingKey=std::string(), const FieldTable& arguments=FieldTable(), bool sync=true); /** * * This command creates or checks a queue. When creating a new queue the client can specify * various properties that control the durability of the queue and its contents, and the level * of sharing for the queue. * * * @param queue * * @param alternateExchange * * The alternate-exchange field specifies how messages on this queue should be treated when * they are rejected by a subscriber, or when they are orphaned by queue deletion. When * present, rejected or orphaned messages MUST be routed to the alternate-exchange. In all * cases the messages MUST be removed from the queue. * * * @param passive * * If set, the server will not create the queue. This field allows the client to assert the * presence of a queue without modifying the server state. * * * @param durable * * If set when creating a new queue, the queue will be marked as durable. Durable queues * remain active when a server restarts. Non-durable queues (transient queues) are purged * if/when a server restarts. Note that durable queues do not necessarily hold persistent * messages, although it does not make sense to send persistent messages to a transient * queue. * * * @param exclusive * * Exclusive queues can only be used from one session at a time. Once a session * declares an exclusive queue, that queue cannot be used by any other session until the * declaring session closes. * * * @param autoDelete * * If this field is set and the exclusive field is also set, then the queue MUST be deleted * when the session closes. * * If this field is set and the exclusive field is not set the queue is deleted when all * the consumers have finished using it. Last consumer can be cancelled either explicitly * or because its session is closed. If there was no consumer ever on the queue, it won't * be deleted. * * * @param arguments * * A set of arguments for the declaration. The syntax and semantics of these arguments * depends on the server implementation. This field is ignored if passive is 1. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void queueDeclare(const std::string& queue=std::string(), const std::string& alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable& arguments=FieldTable(), bool sync=true); /** * * This command deletes a queue. When a queue is deleted any pending messages are sent to the * alternate-exchange if defined, or discarded if it is not. * * * @param queue * * Specifies the name of the queue to delete. * * * @param ifUnused * * If set, the server will only delete the queue if it has no consumers. If the queue has * consumers the server does does not delete it but raises an exception instead. * * * @param ifEmpty * * If set, the server will only delete the queue if it has no messages. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void queueDelete(const std::string& queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=true); /** * * This command removes all messages from a queue. It does not cancel subscribers. Purged * messages are deleted without any formal "undo" mechanism. * * * @param queue * * Specifies the name of the queue to purge. * * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN void queuePurge(const std::string& queue=std::string(), bool sync=true); /** * * This command requests information about a queue. * * * @param queue * * @param sync * If true the broker will respond with completion status as soon as possible. * */ QPID_CLIENT_EXTERN qpid::framing::QueueQueryResult queueQuery(const std::string& queue=std::string(), bool sync=true); }; }}} // namespace qpid::client::no_keyword #endif /*!QPID_CLIENT_NO_KEYWORD_SESSION_0_10_H*/ qpidc-0.16/include/qpid/client/Future.h0000664000076400007640000000340511564561152020425 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _Future_ #define _Future_ #include #include #include "qpid/Exception.h" #include "qpid/framing/SequenceNumber.h" #include "qpid/client/FutureCompletion.h" #include "qpid/client/FutureResult.h" #include "qpid/client/ClientImportExport.h" namespace qpid { namespace client { /**@internal */ class QPID_CLIENT_CLASS_EXTERN Future { framing::SequenceNumber command; boost::shared_ptr result; bool complete; public: Future() : complete(false) {} Future(const framing::SequenceNumber& id) : command(id), complete(false) {} std::string getResult(SessionImpl& session) { if (result) return result->getResult(session); else throw Exception("Result not expected"); } QPID_CLIENT_EXTERN void wait(SessionImpl& session); QPID_CLIENT_EXTERN bool isComplete(SessionImpl& session); QPID_CLIENT_EXTERN void setFutureResult(boost::shared_ptr r); }; }} #endif qpidc-0.16/include/qpid/client/QueueOptions.h0000664000076400007640000001061411564561152021613 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ClientImportExport.h" #include "qpid/framing/FieldTable.h" #ifndef _QueueOptions_ #define _QueueOptions_ namespace qpid { namespace client { enum QueueSizePolicy {NONE, REJECT, FLOW_TO_DISK, RING, RING_STRICT}; enum QueueOrderingPolicy {FIFO, LVQ, LVQ_NO_BROWSE}; /** * A help class to set options on the Queue. Create a configured args while * still allowing any custom configuration via the FieldTable base class */ class QPID_CLIENT_CLASS_EXTERN QueueOptions: public framing::FieldTable { public: QPID_CLIENT_EXTERN QueueOptions(); QPID_CLIENT_EXTERN virtual ~QueueOptions(); /** * Sets the queue sizing policy * * @param sp SizePolicy * REJECT - reject if queue greater than size/count * FLOW_TO_DISK - page messages to disk from this point is greater than size/count * RING - limit the queue to size/count and over-write old messages round a ring * RING_STRICT - limit the queue to size/count and reject is head == tail * NONE - Use default broker sizing policy * @param maxSize Set the max number of bytes for the sizing policies * @param setMaxCount Set the max number of messages for the sizing policies */ QPID_CLIENT_EXTERN void setSizePolicy(QueueSizePolicy sp, uint64_t maxSize, uint32_t maxCount ); /** * Enables the persisting of a queue to the store module when a cluster fails down to it's last * node. Does so optimistically. Will start persisting when cluster count >1 again. */ QPID_CLIENT_EXTERN void setPersistLastNode(); /** * Sets the odering policy on the Queue, default ordering is FIFO. */ QPID_CLIENT_EXTERN void setOrdering(QueueOrderingPolicy op); /** * Use broker defualt sizing ploicy */ QPID_CLIENT_EXTERN void clearSizePolicy(); /** * Clear Persist Last Node Policy */ QPID_CLIENT_EXTERN void clearPersistLastNode(); /** * get the key used match LVQ in args for message transfer */ QPID_CLIENT_EXTERN void getLVQKey(std::string& key); /** * Use default odering policy */ QPID_CLIENT_EXTERN void clearOrdering(); /** * Turns on event generation for this queue (either enqueue only * or for enqueue and dequeue events); the events can then be * processed by a regsitered broker plugin. * * DEPRECATED * * This is confusing to anyone who sees only the function call * and not the variable name / doxygen. Consider the following call: * * options.enableQueueEvents(false); * * It looks like it disables queue events, but what it really does is * enable both enqueue and dequeue events. * * Use setInt() instead: * * options.setInt("qpid.queue_event_generation", 2); */ QPID_CLIENT_EXTERN void enableQueueEvents(bool enqueueOnly); static QPID_CLIENT_EXTERN const std::string strMaxCountKey; static QPID_CLIENT_EXTERN const std::string strMaxSizeKey; static QPID_CLIENT_EXTERN const std::string strTypeKey; static QPID_CLIENT_EXTERN const std::string strREJECT; static QPID_CLIENT_EXTERN const std::string strFLOW_TO_DISK; static QPID_CLIENT_EXTERN const std::string strRING; static QPID_CLIENT_EXTERN const std::string strRING_STRICT; static QPID_CLIENT_EXTERN const std::string strLastValueQueue; static QPID_CLIENT_EXTERN const std::string strPersistLastNode; static QPID_CLIENT_EXTERN const std::string strLVQMatchProperty; static QPID_CLIENT_EXTERN const std::string strLastValueQueueNoBrowse; static QPID_CLIENT_EXTERN const std::string strQueueEventMode; }; } } #endif qpidc-0.16/include/qpid/client/AsyncSession_0_10.h0000664000076400007640000005750011752725677022335 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_ASYNCSESSION_0_10_H #define QPID_CLIENT_ASYNCSESSION_0_10_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/client/no_keyword/AsyncSession_0_10.h" #include "qpid/client/arg.h" #include "qpid/client/ClientImportExport.h" namespace qpid { namespace client { /** * AMQP 0-10 session API with keyword arguments. * This class provides the same set of functions as no_keyword::AsyncSession_0_10, but also * allows parameters be passed using keywords. The keyword is the * parameter name in the namespace "arg". * * For example given the normal function "foo(int x=0, int y=0, int z=0)" * you could call it in either of the following ways: * * @code * session.foo(1,2,3); // Normal no keywords * session.foo(arg::z=3, arg::x=1); // Keywords and a default * @endcode * * The keyword functions are easy to use but their declarations are hard * to read. You may find it easier to read the documentation for no_keyword::AsyncSession_0_10 * which provides the same set of functions using normal non-keyword * declarations. * * \ingroup clientapi * * * \details * *

Publishing Messages

*
    *
  • messageTransfer()

    *
    session.messageTransfer(arg::content=message, arg::destination="amq.topic");
  • *
  • messageTransfer() — asynchronous

    *
    #include <qpid/client/AsyncSession.h>
     * 
     * for (int i=0; i<10; i++) {
     *     message.setData(message_data.str());
     *     async(session).messageTransfer(arg::content=message,  arg::destination="amq.direct");        
     * }
     * 
     * session.sync();
     * 
    *
  • *
* *

Exchanges

*
    *
  • exchangeBind()

    *
    session.exchangeBind(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=routing_key);
    *
  • *
  • exchangeUnbind()

    *
    session.exchangeUnBind(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=routing_key);
  • *
  • exchangeBound()

    *
    if (session.exchangeBound(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=rk)){...}
    *
    if (session.exchangeBound(arg::exchange="amq.topic", arg::queue=queue)){...}
    *
  • *
  • exchangeDeclare()

    *
    session.exchangeDeclare(arg::exchange="my.topic", arg::type="topic");
    *
    session.exchangeDeclare(arg::exchange="xml", arg::type="xml");
    *
  • *
  • exchangeDelete()

    *
    session.exchangeDeclare(arg::exchange="my.topic");
    *
    session.exchangeDeclare(arg::exchange="xml", arg::ifUnused=true);
    *
  • *
  • exchangeQuery()

    *
    ExchangeQueryResult eqr = session.exchangeQuery(arg::exchange="my.topic");
  • *
* * *

Configuring exchanges in session.exchangeDeclare

* *
arg::durable=true
*

Default: false.

*

If durable=true, an exchange remains active even if the server is restarted. If durable=false, an exchange is purged when a server restarts.

* *
arg::autoDelete=true
*

Default: false.

*

If autoDelete=true, deleting the last binding for an exchange also deletes the exchange.

* *
arg::alternatExchange="my.exchange"
*

Default: none.

*

If an alternate exchange is specified, messages that can not be delivered to any queue are sent to the alternate exchange.

* *

Queues

*
    *
  • queueDeclare()

    *
    session.queueDeclare(arg::queue="message_queue");
    *
  • *
  • queueDelete()

    *
    session.queueDelete(arg::queue="message_queue");
  • *
  • queuePurge()

    *
    session.queuePurge(arg::queue="message_queue");
  • *
  • queueQuery()

    *
    QueueQueryResult qqr = session.queueQuery(arg::queue="message_queue");
  • *
* * *

Configuring queues with session.queueDeclare

*
arg::durable=true
*

Default: false.

*

If durable=true, a queue remains active if the server is restarted. If durable=false, a queue and its contents are lost when a server restarts.

*
* *
arg::autoDelete=true
*

Default: false.

*

If autoDelete=true, the queue is deleted when the last active Subscription to the Queue is canceled.

*
* *
arg::exclusive=true
*

Default: false.

*

If exclusive=true, only the Session that created a queue can access it.

*
* *
arg::alternateExchange="my.exchange"
*

Default: none.

*

If an alternate exchange is specified, messages are routed to it if (1) they are rejected by a client, or (2) they remain on the queue when it is deleted.

*
* * *

Accepting, Acquiring, Rejecting, or Releasing Messages

*
    *
  • messageAccept() — acknowledges messages

    *
    SequenceSet tobeAccepted; 
     * toAccepted.add(msg.getId()); 
     * session.messageAccept(toBeAccepted);
    *
  • *
  • messageAcquire()

    *
    SequenceSet tobeAcquired;
     * toBeAcquired.add(msg.getId()); 
     * session.messageAcquire(toBeAcquired);
    *
  • *
  • messageReject()

    *
    SequenceSet tobeRejected; 
     * toRejected.add(msg.getId()); 
     * session.messageReject(toBeRejected);
    *
  • *
  • messageRelease()

    *
    SequenceSet tobeReleased; 
     * toReleased.add(msg.getId()); 
     * session.messageRelease(toBeReleased);
  • *
* *

Transactions

*
    *
  • txSelect()

    *
    session.txSelect();
    *
  • *
  • txCommit()

    *
    session.txSelect();
  • *
  • txRollback()

    *
    session.txRollback();
  • *
* * * */ class AsyncSession_0_10: public no_keyword::AsyncSession_0_10 { public: QPID_CLIENT_EXTERN AsyncSession_0_10(); QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10(const SessionBase_0_10& other); QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10& operator=(const SessionBase_0_10& other); private: typedef boost::parameter::parameters ExecutionSyncParameters; typedef boost::parameter::parameters ExecutionResultParameters; typedef boost::parameter::parameters ExecutionExceptionParameters; typedef boost::parameter::parameters MessageTransferParameters; typedef boost::parameter::parameters MessageAcceptParameters; typedef boost::parameter::parameters MessageRejectParameters; typedef boost::parameter::parameters MessageReleaseParameters; typedef boost::parameter::parameters MessageAcquireParameters; typedef boost::parameter::parameters MessageResumeParameters; typedef boost::parameter::parameters MessageSubscribeParameters; typedef boost::parameter::parameters MessageCancelParameters; typedef boost::parameter::parameters MessageSetFlowModeParameters; typedef boost::parameter::parameters MessageFlowParameters; typedef boost::parameter::parameters MessageFlushParameters; typedef boost::parameter::parameters MessageStopParameters; typedef boost::parameter::parameters TxSelectParameters; typedef boost::parameter::parameters TxCommitParameters; typedef boost::parameter::parameters TxRollbackParameters; typedef boost::parameter::parameters DtxSelectParameters; typedef boost::parameter::parameters DtxStartParameters; typedef boost::parameter::parameters DtxEndParameters; typedef boost::parameter::parameters DtxCommitParameters; typedef boost::parameter::parameters DtxForgetParameters; typedef boost::parameter::parameters DtxGetTimeoutParameters; typedef boost::parameter::parameters DtxPrepareParameters; typedef boost::parameter::parameters DtxRecoverParameters; typedef boost::parameter::parameters DtxRollbackParameters; typedef boost::parameter::parameters DtxSetTimeoutParameters; typedef boost::parameter::parameters ExchangeDeclareParameters; typedef boost::parameter::parameters ExchangeDeleteParameters; typedef boost::parameter::parameters ExchangeQueryParameters; typedef boost::parameter::parameters ExchangeBindParameters; typedef boost::parameter::parameters ExchangeUnbindParameters; typedef boost::parameter::parameters ExchangeBoundParameters; typedef boost::parameter::parameters QueueDeclareParameters; typedef boost::parameter::parameters QueueDeleteParameters; typedef boost::parameter::parameters QueuePurgeParameters; typedef boost::parameter::parameters QueueQueryParameters; friend class Connection; public: BOOST_PARAMETER_MEMFUN(Completion, executionSync, 0, 1, ExecutionSyncParameters) { return no_keyword::AsyncSession_0_10::executionSync( p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, executionResult, 0, 3, ExecutionResultParameters) { return no_keyword::AsyncSession_0_10::executionResult( p[arg::commandId|SequenceNumber()], p[arg::value|std::string()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, executionException, 0, 8, ExecutionExceptionParameters) { return no_keyword::AsyncSession_0_10::executionException( p[arg::errorCode|0], p[arg::commandId|SequenceNumber()], p[arg::classCode|0], p[arg::commandCode|0], p[arg::fieldIndex|0], p[arg::description|std::string()], p[arg::errorInfo|FieldTable()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageTransfer, 0, 5, MessageTransferParameters) { return no_keyword::AsyncSession_0_10::messageTransfer( p[arg::destination|std::string()], p[arg::acceptMode|1], p[arg::acquireMode|0], p[arg::content|Message(std::string())], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageAccept, 0, 2, MessageAcceptParameters) { return no_keyword::AsyncSession_0_10::messageAccept( p[arg::transfers|SequenceSet()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageReject, 0, 4, MessageRejectParameters) { return no_keyword::AsyncSession_0_10::messageReject( p[arg::transfers|SequenceSet()], p[arg::code|0], p[arg::text|std::string()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageRelease, 0, 3, MessageReleaseParameters) { return no_keyword::AsyncSession_0_10::messageRelease( p[arg::transfers|SequenceSet()], p[arg::setRedelivered|false], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, messageAcquire, 0, 2, MessageAcquireParameters) { return no_keyword::AsyncSession_0_10::messageAcquire( p[arg::transfers|SequenceSet()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, messageResume, 0, 3, MessageResumeParameters) { return no_keyword::AsyncSession_0_10::messageResume( p[arg::destination|std::string()], p[arg::resumeId|std::string()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageSubscribe, 0, 9, MessageSubscribeParameters) { return no_keyword::AsyncSession_0_10::messageSubscribe( p[arg::queue|std::string()], p[arg::destination|std::string()], p[arg::acceptMode|0], p[arg::acquireMode|0], p[arg::exclusive|false], p[arg::resumeId|std::string()], p[arg::resumeTtl|0], p[arg::arguments|FieldTable()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageCancel, 0, 2, MessageCancelParameters) { return no_keyword::AsyncSession_0_10::messageCancel( p[arg::destination|std::string()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageSetFlowMode, 0, 3, MessageSetFlowModeParameters) { return no_keyword::AsyncSession_0_10::messageSetFlowMode( p[arg::destination|std::string()], p[arg::flowMode|0], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageFlow, 0, 4, MessageFlowParameters) { return no_keyword::AsyncSession_0_10::messageFlow( p[arg::destination|std::string()], p[arg::unit|0], p[arg::value|0], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageFlush, 0, 2, MessageFlushParameters) { return no_keyword::AsyncSession_0_10::messageFlush( p[arg::destination|std::string()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, messageStop, 0, 2, MessageStopParameters) { return no_keyword::AsyncSession_0_10::messageStop( p[arg::destination|std::string()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, txSelect, 0, 1, TxSelectParameters) { return no_keyword::AsyncSession_0_10::txSelect( p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, txCommit, 0, 1, TxCommitParameters) { return no_keyword::AsyncSession_0_10::txCommit( p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, txRollback, 0, 1, TxRollbackParameters) { return no_keyword::AsyncSession_0_10::txRollback( p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, dtxSelect, 0, 1, DtxSelectParameters) { return no_keyword::AsyncSession_0_10::dtxSelect( p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, dtxStart, 0, 4, DtxStartParameters) { return no_keyword::AsyncSession_0_10::dtxStart( p[arg::xid|Xid()], p[arg::join|false], p[arg::resume|false], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, dtxEnd, 0, 4, DtxEndParameters) { return no_keyword::AsyncSession_0_10::dtxEnd( p[arg::xid|Xid()], p[arg::fail|false], p[arg::suspend|false], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, dtxCommit, 0, 3, DtxCommitParameters) { return no_keyword::AsyncSession_0_10::dtxCommit( p[arg::xid|Xid()], p[arg::onePhase|false], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, dtxForget, 0, 2, DtxForgetParameters) { return no_keyword::AsyncSession_0_10::dtxForget( p[arg::xid|Xid()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, dtxGetTimeout, 0, 2, DtxGetTimeoutParameters) { return no_keyword::AsyncSession_0_10::dtxGetTimeout( p[arg::xid|Xid()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, dtxPrepare, 0, 2, DtxPrepareParameters) { return no_keyword::AsyncSession_0_10::dtxPrepare( p[arg::xid|Xid()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, dtxRecover, 0, 1, DtxRecoverParameters) { return no_keyword::AsyncSession_0_10::dtxRecover( p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, dtxRollback, 0, 2, DtxRollbackParameters) { return no_keyword::AsyncSession_0_10::dtxRollback( p[arg::xid|Xid()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, dtxSetTimeout, 0, 3, DtxSetTimeoutParameters) { return no_keyword::AsyncSession_0_10::dtxSetTimeout( p[arg::xid|Xid()], p[arg::timeout|0], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, exchangeDeclare, 0, 8, ExchangeDeclareParameters) { return no_keyword::AsyncSession_0_10::exchangeDeclare( p[arg::exchange|std::string()], p[arg::type|std::string()], p[arg::alternateExchange|std::string()], p[arg::passive|false], p[arg::durable|false], p[arg::autoDelete|false], p[arg::arguments|FieldTable()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, exchangeDelete, 0, 3, ExchangeDeleteParameters) { return no_keyword::AsyncSession_0_10::exchangeDelete( p[arg::exchange|std::string()], p[arg::ifUnused|false], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, exchangeQuery, 0, 2, ExchangeQueryParameters) { return no_keyword::AsyncSession_0_10::exchangeQuery( p[arg::name|std::string()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, exchangeBind, 0, 5, ExchangeBindParameters) { return no_keyword::AsyncSession_0_10::exchangeBind( p[arg::queue|std::string()], p[arg::exchange|std::string()], p[arg::bindingKey|std::string()], p[arg::arguments|FieldTable()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, exchangeUnbind, 0, 4, ExchangeUnbindParameters) { return no_keyword::AsyncSession_0_10::exchangeUnbind( p[arg::queue|std::string()], p[arg::exchange|std::string()], p[arg::bindingKey|std::string()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, exchangeBound, 0, 5, ExchangeBoundParameters) { return no_keyword::AsyncSession_0_10::exchangeBound( p[arg::exchange|std::string()], p[arg::queue|std::string()], p[arg::bindingKey|std::string()], p[arg::arguments|FieldTable()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, queueDeclare, 0, 8, QueueDeclareParameters) { return no_keyword::AsyncSession_0_10::queueDeclare( p[arg::queue|std::string()], p[arg::alternateExchange|std::string()], p[arg::passive|false], p[arg::durable|false], p[arg::exclusive|false], p[arg::autoDelete|false], p[arg::arguments|FieldTable()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, queueDelete, 0, 4, QueueDeleteParameters) { return no_keyword::AsyncSession_0_10::queueDelete( p[arg::queue|std::string()], p[arg::ifUnused|false], p[arg::ifEmpty|false], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(Completion, queuePurge, 0, 2, QueuePurgeParameters) { return no_keyword::AsyncSession_0_10::queuePurge( p[arg::queue|std::string()], p[arg::sync|false]); } BOOST_PARAMETER_MEMFUN(TypedResult, queueQuery, 0, 2, QueueQueryParameters) { return no_keyword::AsyncSession_0_10::queueQuery( p[arg::queue|std::string()], p[arg::sync|false]); } }; /** Conversion to AsyncSession_0_10 from another session type */ inline AsyncSession_0_10 async(const SessionBase_0_10& other) { return (other); } inline AsyncSession_0_10::AsyncSession_0_10() {} inline AsyncSession_0_10::AsyncSession_0_10(const SessionBase_0_10& other) { *this = other; } inline AsyncSession_0_10& AsyncSession_0_10::operator=(const SessionBase_0_10& other) { impl = static_cast(other).impl; return *this; } }} // namespace qpid::client #endif /*!QPID_CLIENT_ASYNCSESSION_0_10_H*/ qpidc-0.16/include/qpid/client/LocalQueue.h0000664000076400007640000000752111564561152021215 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_LOCALQUEUE_H #define QPID_CLIENT_LOCALQUEUE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ClientImportExport.h" #include "qpid/client/Handle.h" #include "qpid/client/Message.h" #include "qpid/sys/Time.h" namespace qpid { namespace client { class LocalQueueImpl; template class PrivateImplRef; /** * A local queue to collect messages retrieved from a remote broker * queue. Create a queue and subscribe it using the SubscriptionManager. * Messages from the remote queue on the broker will be stored in the * local queue until you retrieve them. * * \ingroup clientapi * * \details Using a Local Queue * *
 * LocalQueue local_queue;
 * subscriptions.subscribe(local_queue, string("message_queue"));
 * for (int i=0; i<10; i++) {
 *   Message message = local_queue.get();
 *   std::cout << message.getData() << std::endl;
 * }
 * 
* *

Getting Messages

* *
  • *

    get()

    *
    Message message = local_queue.get();
    *
    // Specifying timeouts (TIME_SEC, TIME_MSEC, TIME_USEC, TIME_NSEC)
     *#include 
     *Message message;
     *local_queue.get(message, 5*sys::TIME_SEC);
* *

Checking size

*
  • *

    empty()

    *
    if (local_queue.empty()) { ... }
  • *
  • size()

    *
    std::cout << local_queue.size();
  • *
*/ class QPID_CLIENT_CLASS_EXTERN LocalQueue : public Handle { public: /** Create a local queue. Subscribe the local queue to a remote broker * queue with a SubscriptionManager. * * LocalQueue is an alternative to implementing a MessageListener. */ QPID_CLIENT_EXTERN LocalQueue(); QPID_CLIENT_EXTERN LocalQueue(const LocalQueue&); QPID_CLIENT_EXTERN ~LocalQueue(); QPID_CLIENT_EXTERN LocalQueue& operator=(const LocalQueue&); /** Wait up to timeout for the next message from the local queue. *@param result Set to the message from the queue. *@param timeout wait up this timeout for a message to appear. *@return true if result was set, false if queue was empty after timeout. */ QPID_CLIENT_EXTERN bool get(Message& result, sys::Duration timeout=0); /** Get the next message off the local queue, or wait up to the timeout * for message from the broker queue. *@param timeout wait up this timeout for a message to appear. *@return message from the queue. *@throw ClosedException if subscription is closed or timeout exceeded. */ QPID_CLIENT_EXTERN Message get(sys::Duration timeout=sys::TIME_INFINITE); /** Synonym for get() */ QPID_CLIENT_EXTERN Message pop(sys::Duration timeout=sys::TIME_INFINITE); /** Return true if local queue is empty. */ QPID_CLIENT_EXTERN bool empty() const; /** Number of messages on the local queue */ QPID_CLIENT_EXTERN size_t size() const; LocalQueue(LocalQueueImpl*); ///<@internal private: typedef LocalQueueImpl Impl; friend class PrivateImplRef; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_LOCALQUEUE_H*/ qpidc-0.16/include/qpid/client/AsyncSession.h0000664000076400007640000000220311227403641021561 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_ASYNCSESSION_H #define QPID_CLIENT_ASYNCSESSION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/AsyncSession_0_10.h" namespace qpid { namespace client { /** * AsyncSession is an alias for Session_0_10 * * \ingroup clientapi */ typedef AsyncSession_0_10 AsyncSession; }} // namespace qpid::client #endif /*!QPID_CLIENT_ASYNCSESSION_H*/ qpidc-0.16/include/qpid/client/FutureCompletion.h0000664000076400007640000000233611227403641022453 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _FutureCompletion_ #define _FutureCompletion_ #include "qpid/framing/amqp_framing.h" #include "qpid/sys/Monitor.h" namespace qpid { namespace client { ///@internal class FutureCompletion { protected: mutable sys::Monitor lock; bool complete; public: FutureCompletion(); virtual ~FutureCompletion(){} bool isComplete() const; void waitForCompletion() const; void completed(); }; }} #endif qpidc-0.16/include/qpid/client/Session_0_10.h0000664000076400007640000005627711752725677021351 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_SESSION_0_10_H #define QPID_CLIENT_SESSION_0_10_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/client/no_keyword/Session_0_10.h" #include "qpid/client/arg.h" #include "qpid/client/ClientImportExport.h" namespace qpid { namespace client { /** * AMQP 0-10 session API with keyword arguments. * This class provides the same set of functions as no_keyword::Session_0_10, but also * allows parameters be passed using keywords. The keyword is the * parameter name in the namespace "arg". * * For example given the normal function "foo(int x=0, int y=0, int z=0)" * you could call it in either of the following ways: * * @code * session.foo(1,2,3); // Normal no keywords * session.foo(arg::z=3, arg::x=1); // Keywords and a default * @endcode * * The keyword functions are easy to use but their declarations are hard * to read. You may find it easier to read the documentation for no_keyword::Session_0_10 * which provides the same set of functions using normal non-keyword * declarations. * * \ingroup clientapi * * * \details * *

Publishing Messages

*
    *
  • messageTransfer()

    *
    session.messageTransfer(arg::content=message, arg::destination="amq.topic");
  • *
  • messageTransfer() — asynchronous

    *
    #include <qpid/client/AsyncSession.h>
     * 
     * for (int i=0; i<10; i++) {
     *     message.setData(message_data.str());
     *     async(session).messageTransfer(arg::content=message,  arg::destination="amq.direct");        
     * }
     * 
     * session.sync();
     * 
    *
  • *
* *

Exchanges

*
    *
  • exchangeBind()

    *
    session.exchangeBind(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=routing_key);
    *
  • *
  • exchangeUnbind()

    *
    session.exchangeUnBind(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=routing_key);
  • *
  • exchangeBound()

    *
    if (session.exchangeBound(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=rk)){...}
    *
    if (session.exchangeBound(arg::exchange="amq.topic", arg::queue=queue)){...}
    *
  • *
  • exchangeDeclare()

    *
    session.exchangeDeclare(arg::exchange="my.topic", arg::type="topic");
    *
    session.exchangeDeclare(arg::exchange="xml", arg::type="xml");
    *
  • *
  • exchangeDelete()

    *
    session.exchangeDeclare(arg::exchange="my.topic");
    *
    session.exchangeDeclare(arg::exchange="xml", arg::ifUnused=true);
    *
  • *
  • exchangeQuery()

    *
    ExchangeQueryResult eqr = session.exchangeQuery(arg::exchange="my.topic");
  • *
* * *

Configuring exchanges in session.exchangeDeclare

* *
arg::durable=true
*

Default: false.

*

If durable=true, an exchange remains active even if the server is restarted. If durable=false, an exchange is purged when a server restarts.

* *
arg::autoDelete=true
*

Default: false.

*

If autoDelete=true, deleting the last binding for an exchange also deletes the exchange.

* *
arg::alternatExchange="my.exchange"
*

Default: none.

*

If an alternate exchange is specified, messages that can not be delivered to any queue are sent to the alternate exchange.

* *

Queues

*
    *
  • queueDeclare()

    *
    session.queueDeclare(arg::queue="message_queue");
    *
  • *
  • queueDelete()

    *
    session.queueDelete(arg::queue="message_queue");
  • *
  • queuePurge()

    *
    session.queuePurge(arg::queue="message_queue");
  • *
  • queueQuery()

    *
    QueueQueryResult qqr = session.queueQuery(arg::queue="message_queue");
  • *
* * *

Configuring queues with session.queueDeclare

*
arg::durable=true
*

Default: false.

*

If durable=true, a queue remains active if the server is restarted. If durable=false, a queue and its contents are lost when a server restarts.

*
* *
arg::autoDelete=true
*

Default: false.

*

If autoDelete=true, the queue is deleted when the last active Subscription to the Queue is canceled.

*
* *
arg::exclusive=true
*

Default: false.

*

If exclusive=true, only the Session that created a queue can access it.

*
* *
arg::alternateExchange="my.exchange"
*

Default: none.

*

If an alternate exchange is specified, messages are routed to it if (1) they are rejected by a client, or (2) they remain on the queue when it is deleted.

*
* * *

Accepting, Acquiring, Rejecting, or Releasing Messages

*
    *
  • messageAccept() — acknowledges messages

    *
    SequenceSet tobeAccepted; 
     * toAccepted.add(msg.getId()); 
     * session.messageAccept(toBeAccepted);
    *
  • *
  • messageAcquire()

    *
    SequenceSet tobeAcquired;
     * toBeAcquired.add(msg.getId()); 
     * session.messageAcquire(toBeAcquired);
    *
  • *
  • messageReject()

    *
    SequenceSet tobeRejected; 
     * toRejected.add(msg.getId()); 
     * session.messageReject(toBeRejected);
    *
  • *
  • messageRelease()

    *
    SequenceSet tobeReleased; 
     * toReleased.add(msg.getId()); 
     * session.messageRelease(toBeReleased);
  • *
* *

Transactions

*
    *
  • txSelect()

    *
    session.txSelect();
    *
  • *
  • txCommit()

    *
    session.txSelect();
  • *
  • txRollback()

    *
    session.txRollback();
  • *
* * * */ class Session_0_10: public no_keyword::Session_0_10 { public: QPID_CLIENT_EXTERN Session_0_10(); QPID_CLIENT_INLINE_EXTERN Session_0_10(const SessionBase_0_10& other); QPID_CLIENT_INLINE_EXTERN Session_0_10& operator=(const SessionBase_0_10& other); private: typedef boost::parameter::parameters ExecutionSyncParameters; typedef boost::parameter::parameters ExecutionResultParameters; typedef boost::parameter::parameters ExecutionExceptionParameters; typedef boost::parameter::parameters MessageTransferParameters; typedef boost::parameter::parameters MessageAcceptParameters; typedef boost::parameter::parameters MessageRejectParameters; typedef boost::parameter::parameters MessageReleaseParameters; typedef boost::parameter::parameters MessageAcquireParameters; typedef boost::parameter::parameters MessageResumeParameters; typedef boost::parameter::parameters MessageSubscribeParameters; typedef boost::parameter::parameters MessageCancelParameters; typedef boost::parameter::parameters MessageSetFlowModeParameters; typedef boost::parameter::parameters MessageFlowParameters; typedef boost::parameter::parameters MessageFlushParameters; typedef boost::parameter::parameters MessageStopParameters; typedef boost::parameter::parameters TxSelectParameters; typedef boost::parameter::parameters TxCommitParameters; typedef boost::parameter::parameters TxRollbackParameters; typedef boost::parameter::parameters DtxSelectParameters; typedef boost::parameter::parameters DtxStartParameters; typedef boost::parameter::parameters DtxEndParameters; typedef boost::parameter::parameters DtxCommitParameters; typedef boost::parameter::parameters DtxForgetParameters; typedef boost::parameter::parameters DtxGetTimeoutParameters; typedef boost::parameter::parameters DtxPrepareParameters; typedef boost::parameter::parameters DtxRecoverParameters; typedef boost::parameter::parameters DtxRollbackParameters; typedef boost::parameter::parameters DtxSetTimeoutParameters; typedef boost::parameter::parameters ExchangeDeclareParameters; typedef boost::parameter::parameters ExchangeDeleteParameters; typedef boost::parameter::parameters ExchangeQueryParameters; typedef boost::parameter::parameters ExchangeBindParameters; typedef boost::parameter::parameters ExchangeUnbindParameters; typedef boost::parameter::parameters ExchangeBoundParameters; typedef boost::parameter::parameters QueueDeclareParameters; typedef boost::parameter::parameters QueueDeleteParameters; typedef boost::parameter::parameters QueuePurgeParameters; typedef boost::parameter::parameters QueueQueryParameters; friend class Connection; public: BOOST_PARAMETER_MEMFUN(void, executionSync, 0, 1, ExecutionSyncParameters) { return no_keyword::Session_0_10::executionSync( p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, executionResult, 0, 3, ExecutionResultParameters) { return no_keyword::Session_0_10::executionResult( p[arg::commandId|SequenceNumber()], p[arg::value|std::string()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, executionException, 0, 8, ExecutionExceptionParameters) { return no_keyword::Session_0_10::executionException( p[arg::errorCode|0], p[arg::commandId|SequenceNumber()], p[arg::classCode|0], p[arg::commandCode|0], p[arg::fieldIndex|0], p[arg::description|std::string()], p[arg::errorInfo|FieldTable()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageTransfer, 0, 5, MessageTransferParameters) { return no_keyword::Session_0_10::messageTransfer( p[arg::destination|std::string()], p[arg::acceptMode|1], p[arg::acquireMode|0], p[arg::content|Message(std::string())], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageAccept, 0, 2, MessageAcceptParameters) { return no_keyword::Session_0_10::messageAccept( p[arg::transfers|SequenceSet()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageReject, 0, 4, MessageRejectParameters) { return no_keyword::Session_0_10::messageReject( p[arg::transfers|SequenceSet()], p[arg::code|0], p[arg::text|std::string()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageRelease, 0, 3, MessageReleaseParameters) { return no_keyword::Session_0_10::messageRelease( p[arg::transfers|SequenceSet()], p[arg::setRedelivered|false], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::MessageAcquireResult, messageAcquire, 0, 2, MessageAcquireParameters) { return no_keyword::Session_0_10::messageAcquire( p[arg::transfers|SequenceSet()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::MessageResumeResult, messageResume, 0, 3, MessageResumeParameters) { return no_keyword::Session_0_10::messageResume( p[arg::destination|std::string()], p[arg::resumeId|std::string()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageSubscribe, 0, 9, MessageSubscribeParameters) { return no_keyword::Session_0_10::messageSubscribe( p[arg::queue|std::string()], p[arg::destination|std::string()], p[arg::acceptMode|0], p[arg::acquireMode|0], p[arg::exclusive|false], p[arg::resumeId|std::string()], p[arg::resumeTtl|0], p[arg::arguments|FieldTable()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageCancel, 0, 2, MessageCancelParameters) { return no_keyword::Session_0_10::messageCancel( p[arg::destination|std::string()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageSetFlowMode, 0, 3, MessageSetFlowModeParameters) { return no_keyword::Session_0_10::messageSetFlowMode( p[arg::destination|std::string()], p[arg::flowMode|0], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageFlow, 0, 4, MessageFlowParameters) { return no_keyword::Session_0_10::messageFlow( p[arg::destination|std::string()], p[arg::unit|0], p[arg::value|0], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageFlush, 0, 2, MessageFlushParameters) { return no_keyword::Session_0_10::messageFlush( p[arg::destination|std::string()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, messageStop, 0, 2, MessageStopParameters) { return no_keyword::Session_0_10::messageStop( p[arg::destination|std::string()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, txSelect, 0, 1, TxSelectParameters) { return no_keyword::Session_0_10::txSelect( p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, txCommit, 0, 1, TxCommitParameters) { return no_keyword::Session_0_10::txCommit( p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, txRollback, 0, 1, TxRollbackParameters) { return no_keyword::Session_0_10::txRollback( p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, dtxSelect, 0, 1, DtxSelectParameters) { return no_keyword::Session_0_10::dtxSelect( p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxStart, 0, 4, DtxStartParameters) { return no_keyword::Session_0_10::dtxStart( p[arg::xid|Xid()], p[arg::join|false], p[arg::resume|false], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxEnd, 0, 4, DtxEndParameters) { return no_keyword::Session_0_10::dtxEnd( p[arg::xid|Xid()], p[arg::fail|false], p[arg::suspend|false], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxCommit, 0, 3, DtxCommitParameters) { return no_keyword::Session_0_10::dtxCommit( p[arg::xid|Xid()], p[arg::onePhase|false], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, dtxForget, 0, 2, DtxForgetParameters) { return no_keyword::Session_0_10::dtxForget( p[arg::xid|Xid()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::DtxGetTimeoutResult, dtxGetTimeout, 0, 2, DtxGetTimeoutParameters) { return no_keyword::Session_0_10::dtxGetTimeout( p[arg::xid|Xid()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxPrepare, 0, 2, DtxPrepareParameters) { return no_keyword::Session_0_10::dtxPrepare( p[arg::xid|Xid()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::DtxRecoverResult, dtxRecover, 0, 1, DtxRecoverParameters) { return no_keyword::Session_0_10::dtxRecover( p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxRollback, 0, 2, DtxRollbackParameters) { return no_keyword::Session_0_10::dtxRollback( p[arg::xid|Xid()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, dtxSetTimeout, 0, 3, DtxSetTimeoutParameters) { return no_keyword::Session_0_10::dtxSetTimeout( p[arg::xid|Xid()], p[arg::timeout|0], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, exchangeDeclare, 0, 8, ExchangeDeclareParameters) { return no_keyword::Session_0_10::exchangeDeclare( p[arg::exchange|std::string()], p[arg::type|std::string()], p[arg::alternateExchange|std::string()], p[arg::passive|false], p[arg::durable|false], p[arg::autoDelete|false], p[arg::arguments|FieldTable()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, exchangeDelete, 0, 3, ExchangeDeleteParameters) { return no_keyword::Session_0_10::exchangeDelete( p[arg::exchange|std::string()], p[arg::ifUnused|false], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::ExchangeQueryResult, exchangeQuery, 0, 2, ExchangeQueryParameters) { return no_keyword::Session_0_10::exchangeQuery( p[arg::name|std::string()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, exchangeBind, 0, 5, ExchangeBindParameters) { return no_keyword::Session_0_10::exchangeBind( p[arg::queue|std::string()], p[arg::exchange|std::string()], p[arg::bindingKey|std::string()], p[arg::arguments|FieldTable()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, exchangeUnbind, 0, 4, ExchangeUnbindParameters) { return no_keyword::Session_0_10::exchangeUnbind( p[arg::queue|std::string()], p[arg::exchange|std::string()], p[arg::bindingKey|std::string()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::ExchangeBoundResult, exchangeBound, 0, 5, ExchangeBoundParameters) { return no_keyword::Session_0_10::exchangeBound( p[arg::exchange|std::string()], p[arg::queue|std::string()], p[arg::bindingKey|std::string()], p[arg::arguments|FieldTable()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, queueDeclare, 0, 8, QueueDeclareParameters) { return no_keyword::Session_0_10::queueDeclare( p[arg::queue|std::string()], p[arg::alternateExchange|std::string()], p[arg::passive|false], p[arg::durable|false], p[arg::exclusive|false], p[arg::autoDelete|false], p[arg::arguments|FieldTable()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, queueDelete, 0, 4, QueueDeleteParameters) { return no_keyword::Session_0_10::queueDelete( p[arg::queue|std::string()], p[arg::ifUnused|false], p[arg::ifEmpty|false], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(void, queuePurge, 0, 2, QueuePurgeParameters) { return no_keyword::Session_0_10::queuePurge( p[arg::queue|std::string()], p[arg::sync|true]); } BOOST_PARAMETER_MEMFUN(qpid::framing::QueueQueryResult, queueQuery, 0, 2, QueueQueryParameters) { return no_keyword::Session_0_10::queueQuery( p[arg::queue|std::string()], p[arg::sync|true]); } }; /** Conversion to Session_0_10 from another session type */ inline Session_0_10 sync(const SessionBase_0_10& other) { return (other); } inline Session_0_10::Session_0_10() {} inline Session_0_10::Session_0_10(const SessionBase_0_10& other) { *this = other; } inline Session_0_10& Session_0_10::operator=(const SessionBase_0_10& other) { impl = static_cast(other).impl; return *this; } }} // namespace qpid::client #endif /*!QPID_CLIENT_SESSION_0_10_H*/ qpidc-0.16/include/qpid/client/SessionBase_0_10.h0000664000076400007640000000664711564561152022123 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_SESSIONBASE_H #define QPID_CLIENT_SESSIONBASE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/SessionId.h" #include "qpid/framing/amqp_structs.h" #include "qpid/client/Message.h" #include "qpid/client/Completion.h" #include "qpid/client/TypedResult.h" #include "qpid/client/ClientImportExport.h" #include namespace qpid { namespace client { class Connection; class SessionImpl; using std::string; using framing::Content; using framing::FieldTable; using framing::SequenceNumber; using framing::SequenceSet; using framing::SequenceNumberSet; using qpid::SessionId; using framing::Xid; /** Unit of message credit: messages or bytes */ enum CreditUnit { MESSAGE_CREDIT=0, BYTE_CREDIT=1, UNLIMITED_CREDIT=0xFFFFFFFF }; /** * Base class for handles to an AMQP session. * * Subclasses provide the AMQP commands for a given * version of the protocol. */ class QPID_CLIENT_CLASS_EXTERN SessionBase_0_10 { public: ///@internal QPID_CLIENT_EXTERN SessionBase_0_10(); QPID_CLIENT_EXTERN ~SessionBase_0_10(); /** Get the session ID */ QPID_CLIENT_EXTERN SessionId getId() const; /** Close the session. * A session is automatically closed when all handles to it are destroyed. */ QPID_CLIENT_EXTERN void close(); /** * Synchronize the session: sync() waits until all commands issued * on this session so far have been completed by the broker. * * Note sync() is always synchronous, even on an AsyncSession object * because that's almost always what you want. You can call * AsyncSession::executionSync() directly in the unusual event * that you want to do an asynchronous sync. */ QPID_CLIENT_EXTERN void sync(); /** Set the timeout for this session. */ QPID_CLIENT_EXTERN uint32_t timeout(uint32_t seconds); /** Suspend the session - detach it from its connection */ QPID_CLIENT_EXTERN void suspend(); /** Resume a suspended session with a new connection */ QPID_CLIENT_EXTERN void resume(Connection); /** Get the channel associated with this session */ QPID_CLIENT_EXTERN uint16_t getChannel() const; QPID_CLIENT_EXTERN void flush(); QPID_CLIENT_EXTERN void markCompleted(const framing::SequenceSet& ids, bool notifyPeer); QPID_CLIENT_EXTERN void markCompleted(const framing::SequenceNumber& id, bool cumulative, bool notifyPeer); QPID_CLIENT_EXTERN void sendCompletion(); QPID_CLIENT_EXTERN bool isValid() const; QPID_CLIENT_EXTERN Connection getConnection(); protected: boost::shared_ptr impl; friend class SessionBase_0_10Access; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_SESSIONBASE_H*/ qpidc-0.16/include/qpid/client/Connection.h0000664000076400007640000001677111605133555021262 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_CONNECTION_H #define QPID_CLIENT_CONNECTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "qpid/client/Session.h" #include "qpid/client/ClientImportExport.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/framing/ProtocolVersion.h" #include "boost/function.hpp" namespace qpid { struct Url; namespace client { class ConnectionImpl; /** * Represents a connection to an AMQP broker. All communication is * initiated by establishing a connection, then creating one or more * Session objects using the connection. @see newSession() * * \ingroup clientapi * * Some methods use an AMQP 0-10 URL to specify connection parameters. * This is defined in the AMQP 0-10 specification (http://jira.amqp.org/confluence/display/AMQP/AMQP+Specification). * * amqp_url = "amqp:" prot_addr_list * prot_addr_list = [prot_addr ","]* prot_addr * prot_addr = tcp_prot_addr | tls_prot_addr * * tcp_prot_addr = tcp_id tcp_addr * tcp_id = "tcp:" | "" * tcp_addr = [host [":" port] ] * host = * port = number]]> * */ class QPID_CLIENT_CLASS_EXTERN Connection { framing::ProtocolVersion version; boost::function failureCallback; protected: boost::shared_ptr impl; public: /** * Creates a Connection object, but does not open the connection. * @see open() */ QPID_CLIENT_EXTERN Connection(); /** * Destroys a Connection object but does not close the connection if it * was open. @see close() */ QPID_CLIENT_EXTERN ~Connection(); /** * Opens a connection to a broker. * * @param host the host on which the broker is running. * * @param port the port on the which the broker is listening. * * @param uid the userid to connect with. * * @param pwd the password to connect with (currently SASL * PLAIN is the only authentication method supported so this * is sent in clear text). * * @param virtualhost the AMQP virtual host to use (virtual * hosts, where implemented(!), provide namespace partitioning * within a single broker). */ QPID_CLIENT_EXTERN void open(const std::string& host, int port = 5672, const std::string& uid = "", const std::string& pwd = "", const std::string& virtualhost = "/", uint16_t maxFrameSize=65535); /** * Opens a connection to a broker using a URL. * If the URL contains multiple addresses, try each in turn * till connection is successful. * * @url address of the broker to connect to. * * @param uid the userid to connect with. * * @param pwd the password to connect with (currently SASL * PLAIN is the only authentication method supported so this * is sent in clear text). * * @param virtualhost the AMQP virtual host to use (virtual * hosts, where implemented(!), provide namespace partitioning * within a single broker). */ QPID_CLIENT_EXTERN void open(const Url& url, const std::string& uid = "", const std::string& pwd = "", const std::string& virtualhost = "/", uint16_t maxFrameSize=65535); /** * Opens a connection to a broker using a URL. * If the URL contains multiple addresses, try each in turn * till connection is successful. * * @url address of the broker to connect to. * * @param settings used for any settings not provided by the URL. * Settings provided by the url (e.g. host, port) are ignored. */ QPID_CLIENT_EXTERN void open(const Url& url, const ConnectionSettings& settings); /** * Opens a connection to a broker. * * @param the settings to use (host, port etc). @see ConnectionSettings. */ QPID_CLIENT_EXTERN void open(const ConnectionSettings& settings); /** * Close the connection. * * Any further use of this connection (without reopening it) will * not succeed. */ QPID_CLIENT_EXTERN void close(); /** * Create a new session on this connection. Sessions allow * multiple streams of work to be multiplexed over the same * connection. The returned Session provides functions to send * commands to the broker. * * Session functions are synchronous. In other words, a Session * function will send a command to the broker and does not return * until it receives the broker's response confirming the command * was executed. * * AsyncSession provides asynchronous versions of the same * functions. These functions send a command to the broker but do * not wait for a response. * * You can convert a Session s into an AsyncSession as follows: * @code * #include * AsyncSession as = async(s); * @endcode * * You can execute a single command asynchronously will a Session s * like ths: * @code * async(s).messageTransfer(...); * @endcode * * Using an AsyncSession is faster for sending large numbers of * commands, since each command is sent as soon as possible * without waiting for the previous command to be confirmed. * * However with AsyncSession you cannot assume that a command has * completed until you explicitly synchronize. The simplest way to * do this is to call Session::sync() or AsyncSession::sync(). * Both of these functions wait for the broker to confirm all * commands issued so far on the session. * *@param name: A name to identify the session. @see qpid::SessionId * If the name is empty (the default) then a unique name will be * chosen using a Universally-unique identifier (UUID) algorithm. */ QPID_CLIENT_EXTERN Session newSession(const std::string& name=std::string(), uint32_t timeoutSeconds = 0); /** * Resume a suspended session. A session may be resumed * on a different connection to the one that created it. */ QPID_CLIENT_EXTERN void resume(Session& session); QPID_CLIENT_EXTERN bool isOpen() const; /** In a cluster, returns the initial set of known broker URLs * at the time of connection. */ QPID_CLIENT_EXTERN std::vector getInitialBrokers(); QPID_CLIENT_EXTERN void registerFailureCallback ( boost::function fn ); /** * Return the set of client negotiated settings */ QPID_CLIENT_EXTERN const ConnectionSettings& getNegotiatedSettings(); friend struct ConnectionAccess; ///<@internal friend class SessionBase_0_10; ///<@internal }; }} // namespace qpid::client #endif /*!QPID_CLIENT_CONNECTION_H*/ qpidc-0.16/include/qpid/client/SubscriptionManager.h0000664000076400007640000002451511564561152023137 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_SUBSCRIPTIONMANAGER_H #define QPID_CLIENT_SUBSCRIPTIONMANAGER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Session.h" #include "qpid/client/Subscription.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Thread.h" #include "qpid/client/ClientImportExport.h" #include "qpid/client/MessageListener.h" #include "qpid/client/LocalQueue.h" #include "qpid/client/Handle.h" #include namespace qpid { namespace client { class SubscriptionManagerImpl; /** * A class to help create and manage subscriptions. * * Set up your subscriptions, then call run() to have messages * delivered. * * \ingroup clientapi * * \details * *

Subscribing and canceling subscriptions

* *
    *
  • *

    subscribe()

    *
     SubscriptionManager subscriptions(session);
     * Listener listener(subscriptions);
     * subscriptions.subscribe(listener, myQueue);
    *
     SubscriptionManager subscriptions(session);
     * LocalQueue local_queue;
     * subscriptions.subscribe(local_queue, string("message_queue"));
  • *
  • *

    cancel()

    *
    subscriptions.cancel();
  • *
* *

Waiting for messages (and returning)

* *
    *
  • *

    run()

    *
     // Give up control to receive messages
     * subscriptions.run();
  • *
  • *

    stop()

    *
    .// Use this code in a listener to return from run()
     * subscriptions.stop();
  • *
  • *

    setAutoStop()

    *
    .// Return from subscriptions.run() when last subscription is cancelled
     *.subscriptions.setAutoStop(true);
     *.subscriptons.run();
     * 
  • *
  • *

    Ending a subscription in a listener

    *
     * void Listener::received(Message& message) {
     *
     *  if (message.getData() == "That's all, folks!") {
     *       subscriptions.cancel(message.getDestination());
     *   }
     * }
     * 
    *
  • *
* */ class QPID_CLIENT_CLASS_EXTERN SubscriptionManager : public sys::Runnable, public Handle { public: /** Create a new SubscriptionManager associated with a session */ QPID_CLIENT_EXTERN SubscriptionManager(const Session& session); QPID_CLIENT_EXTERN SubscriptionManager(const SubscriptionManager&); QPID_CLIENT_EXTERN ~SubscriptionManager(); QPID_CLIENT_EXTERN SubscriptionManager& operator=(const SubscriptionManager&); /** * Subscribe a MessagesListener to receive messages from queue. * * Provide your own subclass of MessagesListener to process * incoming messages. It will be called for each message received. * *@param listener Listener object to receive messages. *@param queue Name of the queue to subscribe to. *@param settings settings for the subscription. *@param name unique destination name for the subscription, defaults to queue name. */ QPID_CLIENT_EXTERN Subscription subscribe(MessageListener& listener, const std::string& queue, const SubscriptionSettings& settings, const std::string& name=std::string()); /** * Subscribe a LocalQueue to receive messages from queue. * * Incoming messages are stored in the queue for you to retrieve. * *@param queue Name of the queue to subscribe to. *@param flow initial FlowControl for the subscription. *@param name unique destination name for the subscription, defaults to queue name. * If not specified, the queue name is used. */ QPID_CLIENT_EXTERN Subscription subscribe(LocalQueue& localQueue, const std::string& queue, const SubscriptionSettings& settings, const std::string& name=std::string()); /** * Subscribe a MessagesListener to receive messages from queue. * * Provide your own subclass of MessagesListener to process * incoming messages. It will be called for each message received. * *@param listener Listener object to receive messages. *@param queue Name of the queue to subscribe to. *@param name unique destination name for the subscription, defaults to queue name. * If not specified, the queue name is used. */ QPID_CLIENT_EXTERN Subscription subscribe(MessageListener& listener, const std::string& queue, const std::string& name=std::string()); /** * Subscribe a LocalQueue to receive messages from queue. * * Incoming messages are stored in the queue for you to retrieve. * *@param queue Name of the queue to subscribe to. *@param name unique destination name for the subscription, defaults to queue name. * If not specified, the queue name is used. */ QPID_CLIENT_EXTERN Subscription subscribe(LocalQueue& localQueue, const std::string& queue, const std::string& name=std::string()); /** Get a single message from a queue. * (Note: this currently uses a subscription per invocation and is * thus relatively expensive. The subscription is cancelled as * part of each call which can trigger auto-deletion). *@param result is set to the message from the queue. *@param timeout wait up this timeout for a message to appear. *@return true if result was set, false if no message available after timeout. */ QPID_CLIENT_EXTERN bool get(Message& result, const std::string& queue, sys::Duration timeout=0); /** Get a single message from a queue. * (Note: this currently uses a subscription per invocation and is * thus relatively expensive. The subscription is cancelled as * part of each call which can trigger auto-deletion). *@param timeout wait up this timeout for a message to appear. *@return message from the queue. *@throw Exception if the timeout is exceeded. */ QPID_CLIENT_EXTERN Message get(const std::string& queue, sys::Duration timeout=sys::TIME_INFINITE); /** Get a subscription by name. *@throw Exception if not found. */ QPID_CLIENT_EXTERN Subscription getSubscription(const std::string& name) const; /** Cancel a subscription. See also: Subscription.cancel() */ QPID_CLIENT_EXTERN void cancel(const std::string& name); /** Deliver messages in the current thread until stop() is called. * Only one thread may be running in a SubscriptionManager at a time. * @see run */ QPID_CLIENT_EXTERN void run(); /** Start a new thread to deliver messages. * Only one thread may be running in a SubscriptionManager at a time. * @see start */ QPID_CLIENT_EXTERN void start(); /** * Wait for the thread started by a call to start() to complete. */ QPID_CLIENT_EXTERN void wait(); /** If set true, run() will stop when all subscriptions * are cancelled. If false, run will only stop when stop() * is called. True by default. */ QPID_CLIENT_EXTERN void setAutoStop(bool set=true); /** Stop delivery. Causes run() to return, or the thread started with start() to exit. */ QPID_CLIENT_EXTERN void stop(); static const uint32_t UNLIMITED=0xFFFFFFFF; /** Set the flow control for a subscription. */ QPID_CLIENT_EXTERN void setFlowControl(const std::string& name, const FlowControl& flow); /** Set the flow control for a subscription. *@param name: name of the subscription. *@param messages: message credit. *@param bytes: byte credit. *@param window: if true use window-based flow control. */ QPID_CLIENT_EXTERN void setFlowControl(const std::string& name, uint32_t messages, uint32_t bytes, bool window=true); /** Set the default settings for subscribe() calls that don't * include a SubscriptionSettings parameter. */ QPID_CLIENT_EXTERN void setDefaultSettings(const SubscriptionSettings& s); /** Get the default settings for subscribe() calls that don't * include a SubscriptionSettings parameter. */ QPID_CLIENT_EXTERN const SubscriptionSettings& getDefaultSettings() const; /** Get the default settings for subscribe() calls that don't * include a SubscriptionSettings parameter. */ QPID_CLIENT_EXTERN SubscriptionSettings& getDefaultSettings(); /** * Set the default flow control settings for subscribe() calls * that don't include a SubscriptionSettings parameter. * *@param messages: message credit. *@param bytes: byte credit. *@param window: if true use window-based flow control. */ QPID_CLIENT_EXTERN void setFlowControl(uint32_t messages, uint32_t bytes, bool window=true); /** *Set the default accept-mode for subscribe() calls that don't *include a SubscriptionSettings parameter. */ QPID_CLIENT_EXTERN void setAcceptMode(AcceptMode mode); /** * Set the default acquire-mode subscribe()s that don't specify SubscriptionSettings. */ QPID_CLIENT_EXTERN void setAcquireMode(AcquireMode mode); QPID_CLIENT_EXTERN void registerFailoverHandler ( boost::function fh ); QPID_CLIENT_EXTERN Session getSession() const; SubscriptionManager(SubscriptionManagerImpl*); ///<@internal private: typedef SubscriptionManagerImpl Impl; friend class PrivateImplRef; }; /** AutoCancel cancels a subscription in its destructor */ class AutoCancel { public: AutoCancel(SubscriptionManager& sm_, const std::string& tag_) : sm(sm_), tag(tag_) {} ~AutoCancel() { sm.cancel(tag); } private: SubscriptionManager& sm; std::string tag; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_SUBSCRIPTIONMANAGER_H*/ qpidc-0.16/include/qpid/client/FailoverManager.h0000664000076400007640000001144611564561152022221 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_FAILOVERMANAGER_H #define QPID_CLIENT_FAILOVERMANAGER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/client/AsyncSession.h" #include "qpid/client/ClientImportExport.h" #include "qpid/client/Connection.h" #include "qpid/client/ConnectionSettings.h" #include "qpid/client/FailoverListener.h" #include "qpid/sys/Monitor.h" #include namespace qpid { namespace client { struct CannotConnectException : qpid::Exception { CannotConnectException(const std::string& m) : qpid::Exception(m) {} }; /** * Utility to manage failover. */ class QPID_CLIENT_CLASS_EXTERN FailoverManager { public: /** * Interface to implement for doing work that can be resumed on * failover */ struct Command { /** * This method will be called with isRetry=false when the * command is first executed. The session to use for the work * will be passed to the implementing class. If the connection * fails while the execute call is in progress, the * FailoverManager controlling the execution will re-establish * a connection, open a new session and call back to the * Command implementations execute method with the new session * and isRetry=true. */ virtual void execute(AsyncSession& session, bool isRetry) = 0; virtual ~Command() {} }; struct ReconnectionStrategy { /** * This method is called by the FailoverManager prior to * establishing a connection (or re-connection) and can be * used if the application wishes to edit or re-order the list * which will default to the list of known brokers for the * last connection. */ virtual void editUrlList(std::vector& urls) = 0; virtual ~ReconnectionStrategy() {} }; /** * Create a manager to control failover for a logical connection. * * @param settings the initial connection settings * @param strategy optional stratgey callback allowing application * to edit or reorder the list of urls to which reconnection is * attempted */ QPID_CLIENT_EXTERN FailoverManager(const ConnectionSettings& settings, ReconnectionStrategy* strategy = 0); /** * Return the current connection if open or attept to reconnect to * the specified list of urls. If no list is specified the list of * known brokers from the last connection will be used. If no list * is specified and this is the first connect attempt, the host * and port from the initial settings will be used. * * If the full list is tried and all attempts fail, * CannotConnectException is thrown. */ QPID_CLIENT_EXTERN Connection& connect(std::vector brokers = std::vector()); /** * Return the current connection whether open or not */ QPID_CLIENT_EXTERN Connection& getConnection(); /** * Close the current connection */ QPID_CLIENT_EXTERN void close(); /** * Reliably execute the specified command. This involves creating * a session on which to carry out the work of the command, * handling failover occuring while exeuting that command and * re-starting the work. * * Multiple concurrent threads can call execute with different * commands; each thread will be allocated its own * session. FailoverManager will coordinate the different threads * on failover to ensure they continue to use the same logical * connection. */ QPID_CLIENT_EXTERN void execute(Command&); private: enum State {IDLE, CONNECTING, CANT_CONNECT}; qpid::sys::Monitor lock; Connection connection; std::auto_ptr failoverListener; ConnectionSettings settings; ReconnectionStrategy* strategy; State state; void attempt(Connection&, ConnectionSettings settings, std::vector urls); void attempt(Connection&, ConnectionSettings settings); }; }} // namespace qpid::client #endif /*!QPID_CLIENT_FAILOVERMANAGER_H*/ qpidc-0.16/include/qpid/client/Handle.h0000664000076400007640000000446311564561152020353 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_HANDLE_H #define QPID_CLIENT_HANDLE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ClientImportExport.h" namespace qpid { namespace client { template class PrivateImplRef; /** * A handle is like a pointer: refers to an underlying implementation object. * Copying the handle does not copy the object. * * Handles can be null, like a 0 pointer. Use isValid(), isNull() or the * conversion to bool to test for a null handle. */ template class Handle { public: /**@return true if handle is valid, i.e. not null. */ QPID_CLIENT_INLINE_EXTERN bool isValid() const { return impl; } /**@return true if handle is null. It is an error to call any function on a null handle. */ QPID_CLIENT_INLINE_EXTERN bool isNull() const { return !impl; } /** Conversion to bool supports idiom if (handle) { handle->... } */ QPID_CLIENT_INLINE_EXTERN operator bool() const { return impl; } /** Operator ! supports idiom if (!handle) { do_if_handle_is_null(); } */ QPID_CLIENT_INLINE_EXTERN bool operator !() const { return !impl; } void swap(Handle& h) { T* t = h.impl; h.impl = impl; impl = t; } protected: typedef T Impl; QPID_CLIENT_INLINE_EXTERN Handle() :impl() {} // Not implemented,subclasses must implement. QPID_CLIENT_EXTERN Handle(const Handle&); QPID_CLIENT_EXTERN Handle& operator=(const Handle&); Impl* impl; friend class PrivateImplRef; // FIXME aconway 2009-04-30: Specify }; }} // namespace qpid::client #endif /*!QPID_CLIENT_HANDLE_H*/ qpidc-0.16/include/qpid/client/SubscriptionSettings.h0000664000076400007640000001163411310504307023347 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_SUBSCRIPTIONSETTINGS_H #define QPID_CLIENT_SUBSCRIPTIONSETTINGS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/FlowControl.h" #include "qpid/framing/enum.h" namespace qpid { namespace client { /** Bring AMQP enum definitions for message class into this namespace. */ using namespace qpid::framing::message; enum CompletionMode { MANUAL_COMPLETION = 0, COMPLETE_ON_DELIVERY = 1, COMPLETE_ON_ACCEPT = 2 }; /** * Settings for a subscription. */ struct SubscriptionSettings { SubscriptionSettings( FlowControl flow=FlowControl::unlimited(), AcceptMode accept=ACCEPT_MODE_EXPLICIT, AcquireMode acquire=ACQUIRE_MODE_PRE_ACQUIRED, unsigned int autoAck_=1, CompletionMode completion=COMPLETE_ON_DELIVERY ) : flowControl(flow), acceptMode(accept), acquireMode(acquire), autoAck(autoAck_), completionMode(completion), exclusive(false) {} FlowControl flowControl; ///@< Flow control settings. @see FlowControl /** * The acceptMode determines whether the broker should expect * delivery of messages to be acknowledged by the client * indicating that it accepts them. A value of * ACCEPT_MODE_EXPLICIT means that messages must be accepted * (note: this may be done automatically by the library - see * autoAck - or through an explicit call be the application - see * Subscription::accept()) before they can be dequeued. A value of * ACCEPT_MODE_NONE means that the broker can dequeue a message as * soon as it is acquired. */ AcceptMode acceptMode; ///@< ACCEPT_MODE_EXPLICIT or ACCEPT_MODE_NONE /** * The acquireMode determines whether messages are locked for the * subscriber when delivered, and thus are not delivered to any * other subscriber unless this subscriber releases them. * * The default is ACQUIRE_MODE_PRE_ACQUIRED meaning that the * subscriber expects to have been given that message exclusively * (i.e. the message will not be given to any other subscriber * unless released explicitly or by this subscribers session * failing without having accepted the message). * * Delivery of message in ACQUIRE_MODE_NOT_ACQUIRED mode means the * message will still be available for other subscribers to * receive. The application can if desired acquire a (set of) * messages through an explicit acquire call - see * Subscription::acquire(). */ AcquireMode acquireMode; ///@< ACQUIRE_MODE_PRE_ACQUIRED or ACQUIRE_MODE_NOT_ACQUIRED /** * Configures the frequency at which messages are automatically * accepted (e.g. a value of 5 means that messages are accepted in * batches of 5). A value of 0 means no automatic acknowledgement * will occur and the application will itself be responsible for * accepting messages. */ unsigned int autoAck; /** * In windowing mode, completion of a message will cause the * credit used up by that message to be reallocated. The * subscriptions completion mode controls how completion is * managed. * * If set to COMPLETE_ON_DELIVERY (which is the default), messages * will be marked as completed once they have been received. The * server will be explicitly notified of all completed messages * for the session when the next accept is sent through the * subscription (either explictly or through autAck). However the * server may also periodically request information on the * completed messages. * * If set to COMPLETE_ON_ACCEPT, messages will be marked as * completed once they are accepted (via the Subscription class) * and the server will also be notified of all completed messages * for the session. * * If set to MANUAL_COMPLETION the application is responsible for * completing messages (@see Session::markCompleted()). */ CompletionMode completionMode; /** * If set, requests that no other subscriber be allowed to access * the queue while this subscription is active. */ bool exclusive; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_SUBSCRIPTIONSETTINGS_H*/ qpidc-0.16/include/qpid/client/FlowControl.h0000664000076400007640000000600611227403641021415 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_FLOWCONTROL_H #define QPID_CLIENT_FLOWCONTROL_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include namespace qpid { namespace client { /** * Flow control works by associating a finite amount of "credit" * with a subscription. * * Credit includes a message count and a byte count. Each message * received decreases the message count by one, and the byte count by * the size of the message. Either count can have the special value * UNLIMITED which is never decreased. * * A subscription's credit is exhausted when the message count is 0 or * the byte count is too small for the next available message. The * subscription will not receive any further messages until is credit * is renewed. * * In "window mode" credit is automatically renewed when a message is * completed (which by default happens when it is accepted). In * non-window mode credit is not automatically renewed, it must be * explicitly re-set (@see Subscription) */ struct FlowControl { static const uint32_t UNLIMITED=0xFFFFFFFF; FlowControl(uint32_t messages_=0, uint32_t bytes_=0, bool window_=false) : messages(messages_), bytes(bytes_), window(window_) {} static FlowControl messageCredit(uint32_t messages_) { return FlowControl(messages_,UNLIMITED,false); } static FlowControl messageWindow(uint32_t messages_) { return FlowControl(messages_,UNLIMITED,true); } static FlowControl byteCredit(uint32_t bytes_) { return FlowControl(UNLIMITED,bytes_,false); } static FlowControl byteWindow(uint32_t bytes_) { return FlowControl(UNLIMITED,bytes_,true); } static FlowControl unlimited() { return FlowControl(UNLIMITED, UNLIMITED, false); } static FlowControl zero() { return FlowControl(0, 0, false); } /** Message credit: subscription can accept up to this many messages. */ uint32_t messages; /** Byte credit: subscription can accept up to this many bytes of message content. */ uint32_t bytes; /** Window mode. If true credit is automatically renewed as messages are acknowledged. */ bool window; bool operator==(const FlowControl& x) { return messages == x.messages && bytes == x.bytes && window == x.window; }; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_FLOWCONTROL_H*/ qpidc-0.16/include/qpid/client/TypedResult.h0000664000076400007640000000341411227403641021431 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _TypedResult_ #define _TypedResult_ #include "qpid/client/Completion.h" #include "qpid/framing/StructHelper.h" namespace qpid { namespace client { /** * Returned by asynchronous commands that return a result. * You can use get() to wait for completion and get the result value. * \ingroup clientapi */ template class TypedResult : public Completion { T result; bool decoded; public: ///@internal TypedResult(const Completion& c) : Completion(c), decoded(false) {} /** * Wait for the asynchronous command that returned this TypedResult to complete * and return its result. * *@return The result returned by the command. *@exception If the command returns an error, get() throws an exception. * */ T& get() { if (!decoded) { framing::StructHelper helper; helper.decode(result, getResult()); decoded = true; } return result; } }; }} #endif qpidc-0.16/include/qpid/client/FailoverListener.h0000664000076400007640000000557111564561152022436 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_FAILOVERLISTENER_H #define QPID_CLIENT_FAILOVERLISTENER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ClientImportExport.h" #include "qpid/client/MessageListener.h" #include "qpid/client/Connection.h" #include "qpid/client/Session.h" #include "qpid/client/SubscriptionManager.h" #include "qpid/Url.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/Runnable.h" #include "qpid/sys/Thread.h" #include namespace qpid { namespace client { /** * Listen for updates from the amq.failover exchange. * * In a cluster, the amq.failover exchange provides updates whenever * the cluster membership changes. This class subscribes to the * failover exchange and providees the latest list of known brokers. * * You can also subscribe to amq.failover yourself and use * FailoverListener::decode to extract a list of broker URLs from a * failover exchange message. */ class QPID_CLIENT_CLASS_EXTERN FailoverListener : private MessageListener, private qpid::sys::Runnable { public: /** The name of the standard failover exchange amq.failover */ static QPID_CLIENT_EXTERN const std::string AMQ_FAILOVER; /** Extract the broker list from a failover exchange message */ static QPID_CLIENT_EXTERN std::vector getKnownBrokers(const Message& m); /** Subscribe to amq.failover exchange. */ QPID_CLIENT_EXTERN FailoverListener(Connection); /** Subscribe to amq.failover exchange. *@param useInitial If true use the connection's initial brokers as * the initial value of getKnownBrokers */ QPID_CLIENT_EXTERN FailoverListener(Connection, bool useInitial); QPID_CLIENT_EXTERN ~FailoverListener(); /** Returns the latest list of known broker URLs. */ QPID_CLIENT_EXTERN std::vector getKnownBrokers() const; private: void received(Message& msg); void run(); void init(bool); mutable sys::Mutex lock; Connection connection; Session session; SubscriptionManager subscriptions; sys::Thread thread; std::vector knownBrokers; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_FAILOVERLISTENER_H*/ qpidc-0.16/include/qpid/client/ClientImportExport.h0000664000076400007640000000241411564561152022765 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_IMPORT_EXPORT_H #define QPID_CLIENT_IMPORT_EXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/ImportExport.h" #if defined(CLIENT_EXPORT) || defined (qpidclient_EXPORTS) # define QPID_CLIENT_EXTERN QPID_EXPORT # define QPID_CLIENT_CLASS_EXTERN QPID_CLASS_EXPORT # define QPID_CLIENT_INLINE_EXTERN QPID_INLINE_EXPORT #else # define QPID_CLIENT_EXTERN QPID_IMPORT # define QPID_CLIENT_CLASS_EXTERN QPID_CLASS_IMPORT # define QPID_CLIENT_INLINE_EXTERN QPID_INLINE_IMPORT #endif #endif qpidc-0.16/include/qpid/client/FutureResult.h0000664000076400007640000000245511564561152021630 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _FutureResult_ #define _FutureResult_ #include #include "qpid/client/ClientImportExport.h" #include "qpid/framing/amqp_framing.h" #include "qpid/client/FutureCompletion.h" namespace qpid { namespace client { class SessionImpl; ///@internal class QPID_CLIENT_CLASS_EXTERN FutureResult : public FutureCompletion { std::string result; public: QPID_CLIENT_EXTERN const std::string& getResult(SessionImpl& session) const; void received(const std::string& result); }; }} #endif qpidc-0.16/include/qpid/client/Completion.h0000664000076400007640000000374611564561152021274 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_COMPLETION_H #define QPID_CLIENT_COMPLETION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/Handle.h" #include "qpid/client/ClientImportExport.h" #include namespace qpid { namespace client { class CompletionImpl; template class PrivateImplRef; /** * Asynchronous commands that do not return a result will return a * Completion. You can use the completion to wait for that specific * command to complete. * *@see TypedResult * *\ingroup clientapi */ class QPID_CLIENT_CLASS_EXTERN Completion : public Handle { public: QPID_CLIENT_EXTERN Completion(CompletionImpl* = 0); QPID_CLIENT_EXTERN Completion(const Completion&); QPID_CLIENT_EXTERN ~Completion(); QPID_CLIENT_EXTERN Completion& operator=(const Completion&); /** Wait for the asynchronous command that returned this *Completion to complete. * *@exception If the command returns an error. */ QPID_CLIENT_EXTERN void wait(); QPID_CLIENT_EXTERN bool isComplete(); protected: QPID_CLIENT_EXTERN std::string getResult(); private: typedef CompletionImpl Impl; friend class PrivateImplRef; }; }} #endif /*!QPID_CLIENT_COMPLETION_H*/ qpidc-0.16/include/qpid/client/MessageReplayTracker.h0000664000076400007640000000447311564561152023236 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_MESSAGEREPLAYTRACKER_H #define QPID_CLIENT_MESSAGEREPLAYTRACKER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/AsyncSession.h" #include "qpid/client/Message.h" #include "qpid/client/ClientImportExport.h" #include #include namespace qpid { namespace client { /** * Utility to track messages sent asynchronously, allowing those that * are indoubt to be replayed over a new session. */ class QPID_CLIENT_CLASS_EXTERN MessageReplayTracker { public: QPID_CLIENT_EXTERN MessageReplayTracker(uint flushInterval); QPID_CLIENT_EXTERN void send(const Message& message, const std::string& destination = ""); QPID_CLIENT_EXTERN void init(AsyncSession session); QPID_CLIENT_EXTERN void replay(AsyncSession session); QPID_CLIENT_EXTERN void setFlushInterval(uint interval); QPID_CLIENT_EXTERN uint getFlushInterval(); QPID_CLIENT_EXTERN void checkCompletion(); template void foreach(F& f) { for (std::list::const_iterator i = buffer.begin(); i != buffer.end(); i++) { f(i->message); } } private: struct ReplayRecord { Completion status; Message message; std::string destination; ReplayRecord(const Message& message, const std::string& destination); void send(MessageReplayTracker&); bool isComplete(); }; AsyncSession session; uint flushInterval; uint count; std::list buffer; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_MESSAGEREPLAYTRACKER_H*/ qpidc-0.16/include/qpid/client/ConnectionSettings.h0000664000076400007640000000715511564561152023001 0ustar00jrossjross00000000000000#ifndef QPID_CLIENT_CONNECTIONSETTINGS_H #define QPID_CLIENT_CONNECTIONSETTINGS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/client/ClientImportExport.h" #include "qpid/sys/IntegerTypes.h" #include namespace qpid { namespace sys { class Socket; } namespace client { /** * Settings for a Connection. */ struct QPID_CLIENT_CLASS_EXTERN ConnectionSettings { QPID_CLIENT_EXTERN ConnectionSettings(); QPID_CLIENT_EXTERN virtual ~ConnectionSettings(); /** * Allows socket to be configured; default only sets tcp-nodelay * based on the flag set. Can be overridden. */ QPID_CLIENT_EXTERN virtual void configureSocket(qpid::sys::Socket&) const; /** * The protocol used for the connection (defaults to 'tcp') */ std::string protocol; /** * The host (or ip address) to connect to (defaults to 'localhost'). */ std::string host; /** * The port to connect to (defaults to 5672). */ uint16_t port; /** * Allows an AMQP 'virtual host' to be specified for the * connection. */ std::string virtualhost; /** * The username to use when authenticating the connection. If not * specified the current users login is used if available. */ std::string username; /** * The password to use when authenticating the connection. */ std::string password; /** * The SASL mechanism to use when authenticating the connection; * the options are currently PLAIN or ANONYMOUS. */ std::string mechanism; /** * Allows a locale to be specified for the connection. */ std::string locale; /** * Allows a heartbeat frequency to be specified */ uint16_t heartbeat; /** * The maximum number of channels that the client will request for * use on this connection. */ uint16_t maxChannels; /** * The maximum frame size that the client will request for this * connection. */ uint16_t maxFrameSize; /** * Limit the size of the connections send buffer . The buffer * is limited to bounds * maxFrameSize. */ unsigned int bounds; /** * If true, TCP_NODELAY will be set for the connection. */ bool tcpNoDelay; /** * SASL service name */ std::string service; /** * Minimum acceptable strength of any SASL negotiated security * layer. 0 means no security layer required. */ unsigned int minSsf; /** * Maximum acceptable strength of any SASL negotiated security * layer. 0 means no security layer allowed. */ unsigned int maxSsf; /** * SSL cert-name for the connection. Overrides global SSL * settings. Used only when a client connects to the broker. */ std::string sslCertName; }; }} // namespace qpid::client #endif /*!QPID_CLIENT_CONNECTIONSETTINGS_H*/ qpidc-0.16/include/qpid/Address.h0000775000076400007640000000304611564561152017266 0ustar00jrossjross00000000000000#ifndef QPID_ADDRESS_H #define QPID_ADDRESS_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/sys/IntegerTypes.h" #include "qpid/CommonImportExport.h" #include #include namespace qpid { namespace client { struct ConnectionSettings; } /** * Contains the protocol address of an AMQP broker. */ struct Address { public: static const std::string TCP; // Default TCP protocol tag. static const uint16_t AMQP_PORT=5672; // Default AMQP port. QPID_COMMON_INLINE_EXTERN explicit Address( const std::string& protocol_=std::string(), const std::string& host_=std::string(), uint16_t port_=0 ) : protocol(protocol_), host(host_), port(port_) {} std::string protocol; std::string host; uint16_t port; }; QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& os, const Address& addr); QPID_COMMON_EXTERN bool operator==(const Address& x, const Address& y); } // namespace qpid #endif /*!QPID_ADDRESS_H*/ qpidc-0.16/include/qpid/Exception.h0000664000076400007640000000615611564561152017641 0ustar00jrossjross00000000000000#ifndef _Exception_ #define _Exception_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/constants.h" #include "qpid/framing/enum.h" #include "qpid/sys/StrError.h" #include "qpid/CommonImportExport.h" #include #include namespace qpid { /** * Base class for Qpid runtime exceptions. */ class QPID_COMMON_CLASS_EXTERN Exception : public std::exception { public: QPID_COMMON_EXTERN explicit Exception(const std::string& message=std::string()) throw(); QPID_COMMON_EXTERN virtual ~Exception() throw(); QPID_COMMON_EXTERN virtual const char* what() const throw(); // prefix: message QPID_COMMON_EXTERN virtual std::string getMessage() const; // Unprefixed message QPID_COMMON_EXTERN virtual std::string getPrefix() const; // Prefix private: std::string message; mutable std::string whatStr; }; /** Exception that includes an errno message. */ struct QPID_COMMON_CLASS_EXTERN ErrnoException : public Exception { ErrnoException(const std::string& msg, int err) : Exception(msg+": "+qpid::sys::strError(err)) {} ErrnoException(const std::string& msg) : Exception(msg+": "+qpid::sys::strError(errno)) {} }; struct QPID_COMMON_CLASS_EXTERN SessionException : public Exception { const framing::execution::ErrorCode code; SessionException(framing::execution::ErrorCode code_, const std::string& message) : Exception(message), code(code_) {} }; struct QPID_COMMON_CLASS_EXTERN ChannelException : public Exception { const framing::session::DetachCode code; ChannelException(framing::session::DetachCode _code, const std::string& message) : Exception(message), code(_code) {} }; struct QPID_COMMON_CLASS_EXTERN ConnectionException : public Exception { const framing::connection::CloseCode code; ConnectionException(framing::connection::CloseCode _code, const std::string& message) : Exception(message), code(_code) {} }; struct QPID_COMMON_CLASS_EXTERN ClosedException : public Exception { QPID_COMMON_EXTERN ClosedException(const std::string& msg=std::string()); QPID_COMMON_EXTERN std::string getPrefix() const; }; /** * Exception representing transport failure */ struct TransportFailure : public Exception { TransportFailure(const std::string& msg=std::string()) : Exception(msg) {} }; } // namespace qpid #endif /*!_Exception_*/ qpidc-0.16/include/qpid/framing/0000775000076400007640000000000011752725715017153 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/framing/Header.h0000664000076400007640000000361711752725676020531 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_HEADER_H #define QPID_FRAMING_HEADER_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN Header { uint8_t flags; public: Header( bool _sync) : flags(0){ setSync(_sync); } Header() : flags(0) {} QPID_COMMON_EXTERN void setSync(bool _sync); QPID_COMMON_EXTERN bool getSync() const; QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const Header&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class Header */ }} #endif /*!QPID_FRAMING_HEADER_H*/ qpidc-0.16/include/qpid/framing/FileProperties.h0000664000076400007640000001207011752725676022266 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FILEPROPERTIES_H #define QPID_FRAMING_FILEPROPERTIES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FileProperties { std::string contentType; std::string contentEncoding; FieldTable headers; uint8_t priority; std::string replyTo; std::string messageId; std::string filename; uint64_t timestamp; std::string clusterId; uint16_t flags; public: static const uint16_t TYPE = 2305; FileProperties( const std::string& _contentType, const std::string& _contentEncoding, const FieldTable& _headers, uint8_t _priority, const std::string& _replyTo, const std::string& _messageId, const std::string& _filename, uint64_t _timestamp, const std::string& _clusterId) : contentType(_contentType), contentEncoding(_contentEncoding), headers(_headers), priority(_priority), replyTo(_replyTo), messageId(_messageId), filename(_filename), timestamp(_timestamp), clusterId(_clusterId), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); flags |= (1 << 14); flags |= (1 << 15); flags |= (1 << 0); } FileProperties() : priority(0), timestamp(0), flags(0) {} QPID_COMMON_EXTERN void setContentType(const std::string& _contentType); QPID_COMMON_EXTERN const std::string& getContentType() const; QPID_COMMON_EXTERN bool hasContentType() const; QPID_COMMON_EXTERN void clearContentTypeFlag(); QPID_COMMON_EXTERN void setContentEncoding(const std::string& _contentEncoding); QPID_COMMON_EXTERN const std::string& getContentEncoding() const; QPID_COMMON_EXTERN bool hasContentEncoding() const; QPID_COMMON_EXTERN void clearContentEncodingFlag(); QPID_COMMON_EXTERN void setHeaders(const FieldTable& _headers); QPID_COMMON_EXTERN const FieldTable& getHeaders() const; QPID_COMMON_EXTERN FieldTable& getHeaders(); QPID_COMMON_EXTERN bool hasHeaders() const; QPID_COMMON_EXTERN void clearHeadersFlag(); QPID_COMMON_EXTERN void setPriority(uint8_t _priority); QPID_COMMON_EXTERN uint8_t getPriority() const; QPID_COMMON_EXTERN bool hasPriority() const; QPID_COMMON_EXTERN void clearPriorityFlag(); QPID_COMMON_EXTERN void setReplyTo(const std::string& _replyTo); QPID_COMMON_EXTERN const std::string& getReplyTo() const; QPID_COMMON_EXTERN bool hasReplyTo() const; QPID_COMMON_EXTERN void clearReplyToFlag(); QPID_COMMON_EXTERN void setMessageId(const std::string& _messageId); QPID_COMMON_EXTERN const std::string& getMessageId() const; QPID_COMMON_EXTERN bool hasMessageId() const; QPID_COMMON_EXTERN void clearMessageIdFlag(); QPID_COMMON_EXTERN void setFilename(const std::string& _filename); QPID_COMMON_EXTERN const std::string& getFilename() const; QPID_COMMON_EXTERN bool hasFilename() const; QPID_COMMON_EXTERN void clearFilenameFlag(); QPID_COMMON_EXTERN void setTimestamp(uint64_t _timestamp); QPID_COMMON_EXTERN uint64_t getTimestamp() const; QPID_COMMON_EXTERN bool hasTimestamp() const; QPID_COMMON_EXTERN void clearTimestampFlag(); QPID_COMMON_EXTERN void setClusterId(const std::string& _clusterId); QPID_COMMON_EXTERN const std::string& getClusterId() const; QPID_COMMON_EXTERN bool hasClusterId() const; QPID_COMMON_EXTERN void clearClusterIdFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const FileProperties&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FileProperties */ }} #endif /*!QPID_FRAMING_FILEPROPERTIES_H*/ qpidc-0.16/include/qpid/framing/DtxGetTimeoutResult.h0000664000076400007640000000432711752725676023305 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXGETTIMEOUTRESULT_H #define QPID_FRAMING_DTXGETTIMEOUTRESULT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxGetTimeoutResult { uint32_t timeout; uint16_t flags; public: static const uint16_t TYPE = 1538; DtxGetTimeoutResult( uint32_t _timeout) : timeout(_timeout), flags(0){ flags |= (1 << 8); } DtxGetTimeoutResult() : timeout(0), flags(0) {} QPID_COMMON_EXTERN void setTimeout(uint32_t _timeout); QPID_COMMON_EXTERN uint32_t getTimeout() const; QPID_COMMON_EXTERN bool hasTimeout() const; QPID_COMMON_EXTERN void clearTimeoutFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const DtxGetTimeoutResult&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxGetTimeoutResult */ }} #endif /*!QPID_FRAMING_DTXGETTIMEOUTRESULT_H*/ qpidc-0.16/include/qpid/framing/TypeCode.h0000664000076400007640000000514411752725676021052 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_TYPECODE_H #define QPID_FRAMING_TYPECODE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/sys/IntegerTypes.h" namespace qpid { namespace framing { enum TypeCode { TYPE_CODE_BIN8 = 0x00, TYPE_CODE_INT8 = 0x01, TYPE_CODE_UINT8 = 0x02, TYPE_CODE_CHAR = 0x04, TYPE_CODE_BOOLEAN = 0x08, TYPE_CODE_BIN16 = 0x10, TYPE_CODE_INT16 = 0x11, TYPE_CODE_UINT16 = 0x12, TYPE_CODE_BIN32 = 0x20, TYPE_CODE_INT32 = 0x21, TYPE_CODE_UINT32 = 0x22, TYPE_CODE_FLOAT = 0x23, TYPE_CODE_CHAR_UTF32 = 0x27, TYPE_CODE_BIN64 = 0x30, TYPE_CODE_INT64 = 0x31, TYPE_CODE_UINT64 = 0x32, TYPE_CODE_DOUBLE = 0x33, TYPE_CODE_DATETIME = 0x38, TYPE_CODE_BIN128 = 0x40, TYPE_CODE_UUID = 0x48, TYPE_CODE_BIN256 = 0x50, TYPE_CODE_BIN512 = 0x60, TYPE_CODE_BIN1024 = 0x70, TYPE_CODE_VBIN8 = 0x80, TYPE_CODE_STR8_LATIN = 0x84, TYPE_CODE_STR8 = 0x85, TYPE_CODE_STR8_UTF16 = 0x86, TYPE_CODE_VBIN16 = 0x90, TYPE_CODE_STR16_LATIN = 0x94, TYPE_CODE_STR16 = 0x95, TYPE_CODE_STR16_UTF16 = 0x96, TYPE_CODE_VBIN32 = 0xa0, TYPE_CODE_MAP = 0xa8, TYPE_CODE_LIST = 0xa9, TYPE_CODE_ARRAY = 0xaa, TYPE_CODE_STRUCT32 = 0xab, TYPE_CODE_BIN40 = 0xc0, TYPE_CODE_DEC32 = 0xc8, TYPE_CODE_BIN72 = 0xd0, TYPE_CODE_DEC64 = 0xd8, TYPE_CODE_VOID = 0xf0, TYPE_CODE_BIT = 0xf1 }; /** True if t is a valid TypeCode value */ bool isTypeCode(uint8_t t); /** Throw exception if not a valid TypeCode */ TypeCode typeCode(uint8_t); /**@return 0 if t is not a valid enum TypeCode value. */ const char* typeName(TypeCode t); std::ostream& operator<<(std::ostream&, TypeCode); }} // namespace qpid::framing #endif /*!QPID_FRAMING_TYPECODE_H*/ qpidc-0.16/include/qpid/framing/SequenceSet.h0000664000076400007640000000476611720530342021546 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _framing_SequenceSet_h #define _framing_SequenceSet_h #include "qpid/framing/SequenceNumber.h" #include "qpid/RangeSet.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class Buffer; class QPID_COMMON_CLASS_EXTERN SequenceSet : public RangeSet { public: SequenceSet() {} SequenceSet(const RangeSet& r) : RangeSet(r) {} SequenceSet(const SequenceNumber& s) { add(s); } SequenceSet(const SequenceNumber& start, const SequenceNumber finish) { add(start,finish); } QPID_COMMON_EXTERN void encode(Buffer& buffer) const; QPID_COMMON_EXTERN void decode(Buffer& buffer); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN bool contains(const SequenceNumber& s) const; QPID_COMMON_EXTERN void add(const SequenceNumber& s); QPID_COMMON_EXTERN void add(const SequenceNumber& start, const SequenceNumber& finish); // Closed range QPID_COMMON_EXTERN void add(const SequenceSet& set); QPID_COMMON_EXTERN void remove(const SequenceNumber& s); QPID_COMMON_EXTERN void remove(const SequenceNumber& start, const SequenceNumber& finish); // Closed range QPID_COMMON_EXTERN void remove(const SequenceSet& set); template void for_each(T& t) const { for (RangeIterator i = rangesBegin(); i != rangesEnd(); i++) t(i->first(), i->last()); } template void for_each(const T& t) const { for (RangeIterator i = rangesBegin(); i != rangesEnd(); i++) t(i->first(), i->last()); } friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SequenceSet&); }; }} // namespace qpid::framing #endif qpidc-0.16/include/qpid/framing/Uuid.h0000664000076400007640000000524511564561152020232 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_UUID_H #define QPID_FRAMING_UUID_H /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #include "qpid/CommonImportExport.h" #include "qpid/sys/IntegerTypes.h" #include #include #include namespace qpid { namespace framing { class Buffer; /** * A UUID is represented as a boost::array of 16 bytes. * * Full value semantics, operators ==, < etc. are provided by * boost::array so Uuid can be the key type in a map etc. * * TODO: change this implementation as it leaks boost into the * client API */ struct Uuid : public boost::array { /** If unique is true, generate a unique ID else a null ID. */ QPID_COMMON_EXTERN Uuid(bool unique=false); /** Copy from 16 bytes of data. */ QPID_COMMON_EXTERN Uuid(const uint8_t* data); // Default op= and copy ctor are fine. // boost::array gives us ==, < etc. /** Copy from 16 bytes of data. */ QPID_COMMON_EXTERN void assign(const uint8_t* data); /** Set to a new unique identifier. */ QPID_COMMON_EXTERN void generate(); /** Set to all zeros. */ QPID_COMMON_EXTERN void clear(); /** Test for null (all zeros). */ QPID_COMMON_EXTERN bool isNull() const; QPID_COMMON_INLINE_EXTERN operator bool() const { return !isNull(); } QPID_COMMON_INLINE_EXTERN bool operator!() const { return isNull(); } QPID_COMMON_EXTERN void encode(framing::Buffer& buf) const; QPID_COMMON_EXTERN void decode(framing::Buffer& buf); QPID_COMMON_INLINE_EXTERN uint32_t encodedSize() const { return static_cast(size()); } /** String value in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ QPID_COMMON_EXTERN std::string str() const; template void serialize(S& s) { s.raw(begin(), size()); } }; /** Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, Uuid); /** Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ QPID_COMMON_EXTERN std::istream& operator>>(std::istream&, Uuid&); }} // namespace qpid::framing #endif /*!QPID_FRAMING_UUID_H*/ qpidc-0.16/include/qpid/framing/amqp_structs.h0000664000076400007640000000323511752725676022062 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_AMQP_STRUCTS_H #define QPID_FRAMING_AMQP_STRUCTS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/Header.h" #include "qpid/framing/DeliveryProperties.h" #include "qpid/framing/FragmentProperties.h" #include "qpid/framing/ReplyTo.h" #include "qpid/framing/MessageProperties.h" #include "qpid/framing/MessageAcquireResult.h" #include "qpid/framing/MessageResumeResult.h" #include "qpid/framing/XaResult.h" #include "qpid/framing/Xid.h" #include "qpid/framing/DtxGetTimeoutResult.h" #include "qpid/framing/DtxRecoverResult.h" #include "qpid/framing/ExchangeQueryResult.h" #include "qpid/framing/ExchangeBoundResult.h" #include "qpid/framing/QueueQueryResult.h" #include "qpid/framing/FileProperties.h" #include "qpid/framing/StreamProperties.h" #endif /*!QPID_FRAMING_AMQP_STRUCTS_H*/ qpidc-0.16/include/qpid/framing/SequenceNumber.h0000664000076400007640000000466311720530342022237 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _framing_SequenceNumber_h #define _framing_SequenceNumber_h #include "qpid/framing/amqp_types.h" #include #include #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class Buffer; /** * 4-byte sequence number that 'wraps around'. */ class QPID_COMMON_CLASS_EXTERN SequenceNumber : public boost::equality_comparable< SequenceNumber, boost::less_than_comparable< SequenceNumber, boost::incrementable< SequenceNumber, boost::decrementable > > > { int32_t value; public: SequenceNumber(uint32_t v=0) : value(v) {} SequenceNumber& operator++() { ++value; return *this; } SequenceNumber& operator--() { --value; return *this; } bool operator==(const SequenceNumber& other) const { return value == other.value; } bool operator<(const SequenceNumber& other) const { return (value - other.value) < 0; } uint32_t getValue() const { return uint32_t(value); } operator uint32_t() const { return uint32_t(value); } QPID_COMMON_EXTERN void encode(Buffer& buffer) const; QPID_COMMON_EXTERN void decode(Buffer& buffer); QPID_COMMON_EXTERN uint32_t encodedSize() const; template void serialize(S& s) { s(value); } friend inline int32_t operator-(const SequenceNumber& a, const SequenceNumber& b); }; inline int32_t operator-(const SequenceNumber& a, const SequenceNumber& b) { return int32_t(a.value - b.value); } struct Window { SequenceNumber hwm; SequenceNumber lwm; }; QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& o, const SequenceNumber& n); }} // namespace qpid::framing #endif qpidc-0.16/include/qpid/framing/MessageAcquireResult.h0000664000076400007640000000440611752725676023433 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGEACQUIRERESULT_H #define QPID_FRAMING_MESSAGEACQUIRERESULT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageAcquireResult { SequenceSet transfers; uint16_t flags; public: static const uint16_t TYPE = 1028; MessageAcquireResult( const SequenceSet& _transfers) : transfers(_transfers), flags(0){ flags |= (1 << 8); } MessageAcquireResult() : flags(0) {} QPID_COMMON_EXTERN void setTransfers(const SequenceSet& _transfers); QPID_COMMON_EXTERN const SequenceSet& getTransfers() const; QPID_COMMON_EXTERN bool hasTransfers() const; QPID_COMMON_EXTERN void clearTransfersFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const MessageAcquireResult&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageAcquireResult */ }} #endif /*!QPID_FRAMING_MESSAGEACQUIRERESULT_H*/ qpidc-0.16/include/qpid/framing/constants.h0000664000076400007640000001465211752725676021356 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_CONSTANTS_H #define QPID_FRAMING_CONSTANTS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// namespace qpid { namespace framing { enum AmqpConstant { MIN_MAX_FRAME_SIZE=4096, CONNECTION_CLASS_ID=0x1, CONNECTION_START_METHOD_ID=0x1, CONNECTION_START_OK_METHOD_ID=0x2, CONNECTION_SECURE_METHOD_ID=0x3, CONNECTION_SECURE_OK_METHOD_ID=0x4, CONNECTION_TUNE_METHOD_ID=0x5, CONNECTION_TUNE_OK_METHOD_ID=0x6, CONNECTION_OPEN_METHOD_ID=0x7, CONNECTION_OPEN_OK_METHOD_ID=0x8, CONNECTION_REDIRECT_METHOD_ID=0x9, CONNECTION_HEARTBEAT_METHOD_ID=0xa, CONNECTION_CLOSE_METHOD_ID=0xb, CONNECTION_CLOSE_OK_METHOD_ID=0xc, SESSION_CLASS_ID=0x2, SESSION_ATTACH_METHOD_ID=0x1, SESSION_ATTACHED_METHOD_ID=0x2, SESSION_DETACH_METHOD_ID=0x3, SESSION_DETACHED_METHOD_ID=0x4, SESSION_REQUEST_TIMEOUT_METHOD_ID=0x5, SESSION_TIMEOUT_METHOD_ID=0x6, SESSION_COMMAND_POINT_METHOD_ID=0x7, SESSION_EXPECTED_METHOD_ID=0x8, SESSION_CONFIRMED_METHOD_ID=0x9, SESSION_COMPLETED_METHOD_ID=0xa, SESSION_KNOWN_COMPLETED_METHOD_ID=0xb, SESSION_FLUSH_METHOD_ID=0xc, SESSION_GAP_METHOD_ID=0xd, EXECUTION_CLASS_ID=0x3, EXECUTION_SYNC_METHOD_ID=0x1, EXECUTION_RESULT_METHOD_ID=0x2, EXECUTION_EXCEPTION_METHOD_ID=0x3, MESSAGE_CLASS_ID=0x4, MESSAGE_TRANSFER_METHOD_ID=0x1, MESSAGE_ACCEPT_METHOD_ID=0x2, MESSAGE_REJECT_METHOD_ID=0x3, MESSAGE_RELEASE_METHOD_ID=0x4, MESSAGE_ACQUIRE_METHOD_ID=0x5, MESSAGE_RESUME_METHOD_ID=0x6, MESSAGE_SUBSCRIBE_METHOD_ID=0x7, MESSAGE_CANCEL_METHOD_ID=0x8, MESSAGE_SET_FLOW_MODE_METHOD_ID=0x9, MESSAGE_FLOW_METHOD_ID=0xa, MESSAGE_FLUSH_METHOD_ID=0xb, MESSAGE_STOP_METHOD_ID=0xc, TX_CLASS_ID=0x5, TX_SELECT_METHOD_ID=0x1, TX_COMMIT_METHOD_ID=0x2, TX_ROLLBACK_METHOD_ID=0x3, DTX_CLASS_ID=0x6, DTX_SELECT_METHOD_ID=0x1, DTX_START_METHOD_ID=0x2, DTX_END_METHOD_ID=0x3, DTX_COMMIT_METHOD_ID=0x4, DTX_FORGET_METHOD_ID=0x5, DTX_GET_TIMEOUT_METHOD_ID=0x6, DTX_PREPARE_METHOD_ID=0x7, DTX_RECOVER_METHOD_ID=0x8, DTX_ROLLBACK_METHOD_ID=0x9, DTX_SET_TIMEOUT_METHOD_ID=0xa, EXCHANGE_CLASS_ID=0x7, EXCHANGE_DECLARE_METHOD_ID=0x1, EXCHANGE_DELETE_METHOD_ID=0x2, EXCHANGE_QUERY_METHOD_ID=0x3, EXCHANGE_BIND_METHOD_ID=0x4, EXCHANGE_UNBIND_METHOD_ID=0x5, EXCHANGE_BOUND_METHOD_ID=0x6, QUEUE_CLASS_ID=0x8, QUEUE_DECLARE_METHOD_ID=0x1, QUEUE_DELETE_METHOD_ID=0x2, QUEUE_PURGE_METHOD_ID=0x3, QUEUE_QUERY_METHOD_ID=0x4, FILE_CLASS_ID=0x9, FILE_QOS_METHOD_ID=0x1, FILE_QOS_OK_METHOD_ID=0x2, FILE_CONSUME_METHOD_ID=0x3, FILE_CONSUME_OK_METHOD_ID=0x4, FILE_CANCEL_METHOD_ID=0x5, FILE_OPEN_METHOD_ID=0x6, FILE_OPEN_OK_METHOD_ID=0x7, FILE_STAGE_METHOD_ID=0x8, FILE_PUBLISH_METHOD_ID=0x9, FILE_RETURN_METHOD_ID=0xa, FILE_DELIVER_METHOD_ID=0xb, FILE_ACK_METHOD_ID=0xc, FILE_REJECT_METHOD_ID=0xd, STREAM_CLASS_ID=0xa, STREAM_QOS_METHOD_ID=0x1, STREAM_QOS_OK_METHOD_ID=0x2, STREAM_CONSUME_METHOD_ID=0x3, STREAM_CONSUME_OK_METHOD_ID=0x4, STREAM_CANCEL_METHOD_ID=0x5, STREAM_PUBLISH_METHOD_ID=0x6, STREAM_RETURN_METHOD_ID=0x7, STREAM_DELIVER_METHOD_ID=0x8, CLUSTER_CLASS_ID=0x80, CLUSTER_UPDATE_REQUEST_METHOD_ID=0x1, CLUSTER_UPDATE_OFFER_METHOD_ID=0x2, CLUSTER_RETRACT_OFFER_METHOD_ID=0x3, CLUSTER_INITIAL_STATUS_METHOD_ID=0x5, CLUSTER_READY_METHOD_ID=0x10, CLUSTER_CONFIG_CHANGE_METHOD_ID=0x11, CLUSTER_ERROR_CHECK_METHOD_ID=0x14, CLUSTER_TIMER_WAKEUP_METHOD_ID=0x15, CLUSTER_TIMER_DROP_METHOD_ID=0x16, CLUSTER_SHUTDOWN_METHOD_ID=0x20, CLUSTER_DELIVER_TO_QUEUE_METHOD_ID=0x21, CLUSTER_CLOCK_METHOD_ID=0x22, CLUSTER_CONNECTION_CLASS_ID=0x81, CLUSTER_CONNECTION_ANNOUNCE_METHOD_ID=0x1, CLUSTER_CONNECTION_DELIVER_CLOSE_METHOD_ID=0x2, CLUSTER_CONNECTION_DELIVER_DO_OUTPUT_METHOD_ID=0x3, CLUSTER_CONNECTION_ABORT_METHOD_ID=0x4, CLUSTER_CONNECTION_SHADOW_SET_USER_METHOD_ID=0x0E, CLUSTER_CONNECTION_SHADOW_PREPARE_METHOD_ID=0x0F, CLUSTER_CONNECTION_CONSUMER_STATE_METHOD_ID=0x10, CLUSTER_CONNECTION_DELIVERY_RECORD_METHOD_ID=0x11, CLUSTER_CONNECTION_TX_START_METHOD_ID=0x12, CLUSTER_CONNECTION_TX_ACCEPT_METHOD_ID=0x13, CLUSTER_CONNECTION_TX_DEQUEUE_METHOD_ID=0x14, CLUSTER_CONNECTION_TX_ENQUEUE_METHOD_ID=0x15, CLUSTER_CONNECTION_TX_PUBLISH_METHOD_ID=0x16, CLUSTER_CONNECTION_TX_END_METHOD_ID=0x17, CLUSTER_CONNECTION_ACCUMULATED_ACK_METHOD_ID=0x18, CLUSTER_CONNECTION_OUTPUT_TASK_METHOD_ID=0x19, CLUSTER_CONNECTION_DTX_START_METHOD_ID=0x1A, CLUSTER_CONNECTION_DTX_END_METHOD_ID=0x1B, CLUSTER_CONNECTION_DTX_ACK_METHOD_ID=0x1C, CLUSTER_CONNECTION_DTX_BUFFER_REF_METHOD_ID=0x1D, CLUSTER_CONNECTION_DTX_WORK_RECORD_METHOD_ID=0x1E, CLUSTER_CONNECTION_SESSION_STATE_METHOD_ID=0x1F, CLUSTER_CONNECTION_SHADOW_READY_METHOD_ID=0x20, CLUSTER_CONNECTION_MEMBERSHIP_METHOD_ID=0x21, CLUSTER_CONNECTION_RETRACT_OFFER_METHOD_ID=0x22, CLUSTER_CONNECTION_QUEUE_POSITION_METHOD_ID=0x30, CLUSTER_CONNECTION_EXCHANGE_METHOD_ID=0x31, CLUSTER_CONNECTION_ADD_QUEUE_LISTENER_METHOD_ID=0x34, CLUSTER_CONNECTION_MANAGEMENT_SETUP_STATE_METHOD_ID=0x36, CLUSTER_CONNECTION_CONFIG_METHOD_ID=0x37, CLUSTER_CONNECTION_QUEUE_FAIRSHARE_STATE_METHOD_ID=0x38, CLUSTER_CONNECTION_QUEUE_OBSERVER_STATE_METHOD_ID=0x39, CLUSTER_CONNECTION_CLOCK_METHOD_ID=0x40, CLUSTER_CONNECTION_QUEUE_DEQUEUE_SINCE_PURGE_STATE_METHOD_ID=0x41 }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_CONSTANTS_H*/ qpidc-0.16/include/qpid/framing/ExchangeBoundResult.h0000664000076400007640000000557111752725676023253 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXCHANGEBOUNDRESULT_H #define QPID_FRAMING_EXCHANGEBOUNDRESULT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExchangeBoundResult { uint16_t flags; public: static const uint16_t TYPE = 1794; ExchangeBoundResult( bool _exchangeNotFound, bool _queueNotFound, bool _queueNotMatched, bool _keyNotMatched, bool _argsNotMatched) : flags(0){ setExchangeNotFound(_exchangeNotFound); setQueueNotFound(_queueNotFound); setQueueNotMatched(_queueNotMatched); setKeyNotMatched(_keyNotMatched); setArgsNotMatched(_argsNotMatched); } ExchangeBoundResult() : flags(0) {} QPID_COMMON_EXTERN void setExchangeNotFound(bool _exchangeNotFound); QPID_COMMON_EXTERN bool getExchangeNotFound() const; QPID_COMMON_EXTERN void setQueueNotFound(bool _queueNotFound); QPID_COMMON_EXTERN bool getQueueNotFound() const; QPID_COMMON_EXTERN void setQueueNotMatched(bool _queueNotMatched); QPID_COMMON_EXTERN bool getQueueNotMatched() const; QPID_COMMON_EXTERN void setKeyNotMatched(bool _keyNotMatched); QPID_COMMON_EXTERN bool getKeyNotMatched() const; QPID_COMMON_EXTERN void setArgsNotMatched(bool _argsNotMatched); QPID_COMMON_EXTERN bool getArgsNotMatched() const; QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const ExchangeBoundResult&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExchangeBoundResult */ }} #endif /*!QPID_FRAMING_EXCHANGEBOUNDRESULT_H*/ qpidc-0.16/include/qpid/framing/StructHelper.h0000664000076400007640000000330411564561152021742 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _StructHelper_ #define _StructHelper_ #include "qpid/Exception.h" #include "qpid/CommonImportExport.h" #include "qpid/framing/Buffer.h" #include // For alloca namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StructHelper { public: template void encode(const T t, std::string& data) { uint32_t size = t.bodySize() + 2/*type*/; data.resize(size); Buffer wbuffer(const_cast(data.data()), size); wbuffer.putShort(T::TYPE); t.encodeStructBody(wbuffer); } template void decode(T& t, const std::string& data) { Buffer rbuffer(const_cast(data.data()), data.length()); uint16_t type = rbuffer.getShort(); if (type == T::TYPE) { t.decodeStructBody(rbuffer); } else { throw Exception("Type code does not match"); } } }; }} #endif qpidc-0.16/include/qpid/framing/List.h0000664000076400007640000000543111616577105020237 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_LIST_H #define QPID_FRAMING_LIST_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/CommonImportExport.h" #include "qpid/framing/amqp_types.h" #include #include #include namespace qpid { namespace framing { class Buffer; class FieldValue; /** * Representation of an AMQP 0-10 list */ class QPID_COMMON_CLASS_EXTERN List { public: typedef boost::shared_ptr ValuePtr; typedef ValuePtr value_type; typedef std::list Values; typedef Values::const_iterator const_iterator; typedef Values::iterator iterator; typedef Values::const_reference const_reference; typedef Values::reference reference; QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN void encode(Buffer& buffer) const; QPID_COMMON_EXTERN void decode(Buffer& buffer); QPID_COMMON_EXTERN bool operator==(const List& other) const; // std collection interface. QPID_COMMON_INLINE_EXTERN const_iterator begin() const { return values.begin(); } QPID_COMMON_INLINE_EXTERN const_iterator end() const { return values.end(); } QPID_COMMON_INLINE_EXTERN iterator begin() { return values.begin(); } QPID_COMMON_INLINE_EXTERN iterator end(){ return values.end(); } QPID_COMMON_INLINE_EXTERN ValuePtr front() const { return values.front(); } QPID_COMMON_INLINE_EXTERN ValuePtr back() const { return values.back(); } QPID_COMMON_INLINE_EXTERN size_t size() const { return values.size(); } QPID_COMMON_INLINE_EXTERN iterator insert(iterator i, ValuePtr value) { return values.insert(i, value); } QPID_COMMON_INLINE_EXTERN void erase(iterator i) { values.erase(i); } QPID_COMMON_INLINE_EXTERN void push_back(ValuePtr value) { values.insert(end(), value); } QPID_COMMON_INLINE_EXTERN void pop_back() { values.pop_back(); } private: Values values; friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& out, const List& list); }; }} // namespace qpid::framing #endif /*!QPID_FRAMING_LIST_H*/ qpidc-0.16/include/qpid/framing/amqp_types.h0000664000076400007640000000335211227403641021475 0ustar00jrossjross00000000000000#ifndef AMQP_TYPES_H #define AMQP_TYPES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /** \file * Definitions and forward declarations of all types used * in AMQP messages. */ #include "qpid/sys/IntegerTypes.h" #include namespace qpid { namespace framing { using std::string; typedef uint8_t FrameType; typedef uint16_t ChannelId; typedef uint32_t BatchOffset; typedef uint8_t ClassId; typedef uint8_t MethodId; typedef uint16_t ReplyCode; // Types represented by classes. class Content; class FieldTable; class SequenceNumberSet; struct Uuid; // Useful constants /** Maximum channel ID used by broker. Reserve high bit for internal use.*/ const ChannelId CHANNEL_MAX=(ChannelId(~1))>>1; const ChannelId CHANNEL_HIGH_BIT= ChannelId(~CHANNEL_MAX); // Forward declare class types class FramingContent; class FieldTable; class SequenceNumberSet; class SequenceSet; struct Uuid; // Enum types enum DeliveryMode { TRANSIENT = 1, PERSISTENT = 2}; }} // namespace qpid::framing #endif qpidc-0.16/include/qpid/framing/StreamProperties.h0000664000076400007640000000727411752725676022654 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_STREAMPROPERTIES_H #define QPID_FRAMING_STREAMPROPERTIES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN StreamProperties { std::string contentType; std::string contentEncoding; FieldTable headers; uint8_t priority; uint64_t timestamp; uint16_t flags; public: static const uint16_t TYPE = 2561; StreamProperties( const std::string& _contentType, const std::string& _contentEncoding, const FieldTable& _headers, uint8_t _priority, uint64_t _timestamp) : contentType(_contentType), contentEncoding(_contentEncoding), headers(_headers), priority(_priority), timestamp(_timestamp), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 12); } StreamProperties() : priority(0), timestamp(0), flags(0) {} QPID_COMMON_EXTERN void setContentType(const std::string& _contentType); QPID_COMMON_EXTERN const std::string& getContentType() const; QPID_COMMON_EXTERN bool hasContentType() const; QPID_COMMON_EXTERN void clearContentTypeFlag(); QPID_COMMON_EXTERN void setContentEncoding(const std::string& _contentEncoding); QPID_COMMON_EXTERN const std::string& getContentEncoding() const; QPID_COMMON_EXTERN bool hasContentEncoding() const; QPID_COMMON_EXTERN void clearContentEncodingFlag(); QPID_COMMON_EXTERN void setHeaders(const FieldTable& _headers); QPID_COMMON_EXTERN const FieldTable& getHeaders() const; QPID_COMMON_EXTERN FieldTable& getHeaders(); QPID_COMMON_EXTERN bool hasHeaders() const; QPID_COMMON_EXTERN void clearHeadersFlag(); QPID_COMMON_EXTERN void setPriority(uint8_t _priority); QPID_COMMON_EXTERN uint8_t getPriority() const; QPID_COMMON_EXTERN bool hasPriority() const; QPID_COMMON_EXTERN void clearPriorityFlag(); QPID_COMMON_EXTERN void setTimestamp(uint64_t _timestamp); QPID_COMMON_EXTERN uint64_t getTimestamp() const; QPID_COMMON_EXTERN bool hasTimestamp() const; QPID_COMMON_EXTERN void clearTimestampFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const StreamProperties&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class StreamProperties */ }} #endif /*!QPID_FRAMING_STREAMPROPERTIES_H*/ qpidc-0.16/include/qpid/framing/reply_exceptions.h0000664000076400007640000002242711752725676022735 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_REPLY_EXCEPTIONS_H #define QPID_FRAMING_REPLY_EXCEPTIONS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/Exception.h" #include "qpid/sys/ExceptionHolder.h" #include "qpid/framing/enum.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { /** * * The client attempted to work with a server entity to which it has no access due to * security settings. * */ struct UnauthorizedAccessException: SessionException { std::string getPrefix() const { return "unauthorized-access"; } UnauthorizedAccessException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_UNAUTHORIZED_ACCESS, ""+msg) {} }; /** * * The client attempted to work with a server entity that does not exist. * */ struct NotFoundException: SessionException { std::string getPrefix() const { return "not-found"; } NotFoundException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_FOUND, ""+msg) {} }; /** * * The client attempted to work with a server entity to which it has no access because * another client is working with it. * */ struct ResourceLockedException: SessionException { std::string getPrefix() const { return "resource-locked"; } ResourceLockedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LOCKED, ""+msg) {} }; /** * * The client requested a command that was not allowed because some precondition failed. * */ struct PreconditionFailedException: SessionException { std::string getPrefix() const { return "precondition-failed"; } PreconditionFailedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_PRECONDITION_FAILED, ""+msg) {} }; /** * * A server entity the client is working with has been deleted. * */ struct ResourceDeletedException: SessionException { std::string getPrefix() const { return "resource-deleted"; } ResourceDeletedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_DELETED, ""+msg) {} }; /** * * The peer sent a command that is not permitted in the current state of the session. * */ struct IllegalStateException: SessionException { std::string getPrefix() const { return "illegal-state"; } IllegalStateException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_STATE, ""+msg) {} }; /** * * The command segments could not be decoded. * */ struct CommandInvalidException: SessionException { std::string getPrefix() const { return "command-invalid"; } CommandInvalidException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_COMMAND_INVALID, ""+msg) {} }; /** * * The client exceeded its resource allocation. * */ struct ResourceLimitExceededException: SessionException { std::string getPrefix() const { return "resource-limit-exceeded"; } ResourceLimitExceededException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LIMIT_EXCEEDED, ""+msg) {} }; /** * * The peer tried to use a command a manner that is inconsistent with the rules described * in the specification. * */ struct NotAllowedException: SessionException { std::string getPrefix() const { return "not-allowed"; } NotAllowedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_ALLOWED, ""+msg) {} }; /** * * The command argument is malformed, i.e. it does not fall within the specified domain. * The illegal-argument exception can be raised on execution of any command which has * domain valued fields. * */ struct IllegalArgumentException: SessionException { std::string getPrefix() const { return "illegal-argument"; } IllegalArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_ARGUMENT, ""+msg) {} }; /** * * The peer tried to use functionality that is not implemented in its partner. * */ struct NotImplementedException: SessionException { std::string getPrefix() const { return "not-implemented"; } NotImplementedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_IMPLEMENTED, ""+msg) {} }; /** * * The peer could not complete the command because of an internal error. The peer may * require intervention by an operator in order to resume normal operations. * */ struct InternalErrorException: SessionException { std::string getPrefix() const { return "internal-error"; } InternalErrorException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INTERNAL_ERROR, ""+msg) {} }; /** * * An invalid argument was passed to a command, and the operation could not * proceed. An invalid argument is not illegal (see illegal-argument), i.e. it matches * the domain definition; however the particular value is invalid in this context. * */ struct InvalidArgumentException: SessionException { std::string getPrefix() const { return "invalid-argument"; } InvalidArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INVALID_ARGUMENT, ""+msg) {} }; QPID_COMMON_EXTERN sys::ExceptionHolder createSessionException(int code, const std::string& text); /** * * An operator intervened to close the connection for some reason. The client may retry at * some later date. * */ struct ConnectionForcedException: ConnectionException { std::string getPrefix() const { return "connection-forced"; } ConnectionForcedException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_CONNECTION_FORCED, ""+msg) {} }; /** * * The client tried to work with an unknown virtual host. * */ struct InvalidPathException: ConnectionException { std::string getPrefix() const { return "invalid-path"; } InvalidPathException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_INVALID_PATH, ""+msg) {} }; /** * * A valid frame header cannot be formed from the incoming byte stream. * */ struct FramingErrorException: ConnectionException { std::string getPrefix() const { return "framing-error"; } FramingErrorException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_FRAMING_ERROR, ""+msg) {} }; QPID_COMMON_EXTERN sys::ExceptionHolder createConnectionException(int code, const std::string& text); /** * * The session is currently attached to another transport. * */ struct SessionBusyException: ChannelException { std::string getPrefix() const { return "session-busy"; } SessionBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_SESSION_BUSY, ""+msg) {} }; /** * * The transport is currently attached to another session. * */ struct TransportBusyException: ChannelException { std::string getPrefix() const { return "transport-busy"; } TransportBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_TRANSPORT_BUSY, ""+msg) {} }; /** * * The transport is not currently attached to any session. * */ struct NotAttachedException: ChannelException { std::string getPrefix() const { return "not-attached"; } NotAttachedException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_NOT_ATTACHED, ""+msg) {} }; /** * * Command data was received prior to any use of the command-point control. * */ struct UnknownIdsException: ChannelException { std::string getPrefix() const { return "unknown-ids"; } UnknownIdsException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_UNKNOWN_IDS, ""+msg) {} }; QPID_COMMON_EXTERN sys::ExceptionHolder createChannelException(int code, const std::string& text); }} // namespace qpid::framing #endif /*!QPID_FRAMING_REPLY_EXCEPTIONS_H*/ qpidc-0.16/include/qpid/framing/Buffer.h0000664000076400007640000001124711564561152020534 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/Exception.h" #include "qpid/CommonImportExport.h" #include #ifndef _Buffer_ #define _Buffer_ namespace qpid { namespace framing { struct QPID_COMMON_CLASS_EXTERN OutOfBounds : qpid::Exception { OutOfBounds() : qpid::Exception(std::string("Out of Bounds")) {} }; class Content; class FieldTable; class QPID_COMMON_CLASS_EXTERN Buffer { uint32_t size; char* data; uint32_t position; uint32_t r_position; public: void checkAvailable(uint32_t count) { if (position + count > size) throw OutOfBounds(); } /** Buffer input/output iterator. * Supports using an amqp_0_10::Codec with a framing::Buffer. */ class Iterator : public boost::iterator_facade< Iterator, char, boost::random_access_traversal_tag> { public: Iterator(Buffer& b) : buffer(&b) {} private: friend class boost::iterator_core_access; char& dereference() const { return buffer->data[buffer->position]; } void increment() { ++buffer->position; } bool equal(const Iterator& x) const { return buffer == x.buffer; } Buffer* buffer; }; friend class Iterator; QPID_COMMON_EXTERN Buffer(char* data=0, uint32_t size=0); QPID_COMMON_EXTERN void record(); QPID_COMMON_EXTERN void restore(bool reRecord = false); QPID_COMMON_EXTERN void reset(); QPID_COMMON_INLINE_EXTERN uint32_t available() { return size - position; } QPID_COMMON_INLINE_EXTERN uint32_t getSize() { return size; } QPID_COMMON_INLINE_EXTERN uint32_t getPosition() { return position; } QPID_COMMON_INLINE_EXTERN void setPosition(uint32_t p) { position = p; } QPID_COMMON_INLINE_EXTERN Iterator getIterator() { return Iterator(*this); } QPID_COMMON_INLINE_EXTERN char* getPointer() { return data; } QPID_COMMON_EXTERN void putOctet(uint8_t i); QPID_COMMON_EXTERN void putShort(uint16_t i); QPID_COMMON_EXTERN void putLong(uint32_t i); QPID_COMMON_EXTERN void putLongLong(uint64_t i); QPID_COMMON_EXTERN void putInt8(int8_t i); QPID_COMMON_EXTERN void putInt16(int16_t i); QPID_COMMON_EXTERN void putInt32(int32_t i); QPID_COMMON_EXTERN void putInt64(int64_t i); QPID_COMMON_EXTERN void putFloat(float f); QPID_COMMON_EXTERN void putDouble(double f); QPID_COMMON_EXTERN void putBin128(const uint8_t* b); QPID_COMMON_EXTERN uint8_t getOctet(); QPID_COMMON_EXTERN uint16_t getShort(); QPID_COMMON_EXTERN uint32_t getLong(); QPID_COMMON_EXTERN uint64_t getLongLong(); QPID_COMMON_EXTERN int8_t getInt8(); QPID_COMMON_EXTERN int16_t getInt16(); QPID_COMMON_EXTERN int32_t getInt32(); QPID_COMMON_EXTERN int64_t getInt64(); QPID_COMMON_EXTERN float getFloat(); QPID_COMMON_EXTERN double getDouble(); template QPID_COMMON_EXTERN uint64_t getUInt(); template QPID_COMMON_EXTERN void putUInt(uint64_t); QPID_COMMON_EXTERN void putShortString(const string& s); QPID_COMMON_EXTERN void putMediumString(const string& s); QPID_COMMON_EXTERN void putLongString(const string& s); QPID_COMMON_EXTERN void getShortString(string& s); QPID_COMMON_EXTERN void getMediumString(string& s); QPID_COMMON_EXTERN void getLongString(string& s); QPID_COMMON_EXTERN void getBin128(uint8_t* b); QPID_COMMON_EXTERN void putRawData(const string& s); QPID_COMMON_EXTERN void getRawData(string& s, uint32_t size); QPID_COMMON_EXTERN void putRawData(const uint8_t* data, size_t size); QPID_COMMON_EXTERN void getRawData(uint8_t* data, size_t size); template void put(const T& data) { data.encode(*this); } template void get(T& data) { data.decode(*this); } QPID_COMMON_EXTERN void dump(std::ostream&) const; }; std::ostream& operator<<(std::ostream&, const Buffer&); }} // namespace qpid::framing #endif qpidc-0.16/include/qpid/framing/Xid.h0000664000076400007640000000541611752725676020064 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_XID_H #define QPID_FRAMING_XID_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN Xid { uint32_t format; std::string globalId; std::string branchId; uint16_t flags; public: static const uint16_t TYPE = 1540; Xid( uint32_t _format, const std::string& _globalId, const std::string& _branchId) : format(_format), globalId(_globalId), branchId(_branchId), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); } Xid() : format(0), flags(0) {} QPID_COMMON_EXTERN void setFormat(uint32_t _format); QPID_COMMON_EXTERN uint32_t getFormat() const; QPID_COMMON_EXTERN bool hasFormat() const; QPID_COMMON_EXTERN void clearFormatFlag(); QPID_COMMON_EXTERN void setGlobalId(const std::string& _globalId); QPID_COMMON_EXTERN const std::string& getGlobalId() const; QPID_COMMON_EXTERN bool hasGlobalId() const; QPID_COMMON_EXTERN void clearGlobalIdFlag(); QPID_COMMON_EXTERN void setBranchId(const std::string& _branchId); QPID_COMMON_EXTERN const std::string& getBranchId() const; QPID_COMMON_EXTERN bool hasBranchId() const; QPID_COMMON_EXTERN void clearBranchIdFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const Xid&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class Xid */ }} #endif /*!QPID_FRAMING_XID_H*/ qpidc-0.16/include/qpid/framing/ReplyTo.h0000664000076400007640000000474011752725676020735 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_REPLYTO_H #define QPID_FRAMING_REPLYTO_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ReplyTo { std::string exchange; std::string routingKey; uint16_t flags; public: ReplyTo( const std::string& _exchange, const std::string& _routingKey) : exchange(_exchange), routingKey(_routingKey), flags(0){ flags |= (1 << 8); flags |= (1 << 9); } ReplyTo() : flags(0) {} QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setRoutingKey(const std::string& _routingKey); QPID_COMMON_EXTERN const std::string& getRoutingKey() const; QPID_COMMON_EXTERN bool hasRoutingKey() const; QPID_COMMON_EXTERN void clearRoutingKeyFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const ReplyTo&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ReplyTo */ }} #endif /*!QPID_FRAMING_REPLYTO_H*/ qpidc-0.16/include/qpid/framing/MessageProperties.h0000664000076400007640000001235311752725676022777 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGEPROPERTIES_H #define QPID_FRAMING_MESSAGEPROPERTIES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include "qpid/framing/ReplyTo.h" #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageProperties { uint64_t contentLength; Uuid messageId; std::string correlationId; ReplyTo replyTo; std::string contentType; std::string contentEncoding; std::string userId; std::string appId; FieldTable applicationHeaders; uint16_t flags; public: static const uint16_t TYPE = 1027; MessageProperties( uint64_t _contentLength, const Uuid& _messageId, const std::string& _correlationId, const ReplyTo& _replyTo, const std::string& _contentType, const std::string& _contentEncoding, const std::string& _userId, const std::string& _appId, const FieldTable& _applicationHeaders) : contentLength(_contentLength), messageId(_messageId), correlationId(_correlationId), replyTo(_replyTo), contentType(_contentType), contentEncoding(_contentEncoding), userId(_userId), appId(_appId), applicationHeaders(_applicationHeaders), flags(0){ flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 10); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); flags |= (1 << 14); flags |= (1 << 15); flags |= (1 << 0); } MessageProperties() : contentLength(0), flags(0) {} QPID_COMMON_EXTERN void setContentLength(uint64_t _contentLength); QPID_COMMON_EXTERN uint64_t getContentLength() const; QPID_COMMON_EXTERN bool hasContentLength() const; QPID_COMMON_EXTERN void clearContentLengthFlag(); QPID_COMMON_EXTERN void setMessageId(const Uuid& _messageId); QPID_COMMON_EXTERN const Uuid& getMessageId() const; QPID_COMMON_EXTERN bool hasMessageId() const; QPID_COMMON_EXTERN void clearMessageIdFlag(); QPID_COMMON_EXTERN void setCorrelationId(const std::string& _correlationId); QPID_COMMON_EXTERN const std::string& getCorrelationId() const; QPID_COMMON_EXTERN bool hasCorrelationId() const; QPID_COMMON_EXTERN void clearCorrelationIdFlag(); QPID_COMMON_EXTERN void setReplyTo(const ReplyTo& _replyTo); QPID_COMMON_EXTERN const ReplyTo& getReplyTo() const; QPID_COMMON_EXTERN bool hasReplyTo() const; QPID_COMMON_EXTERN void clearReplyToFlag(); QPID_COMMON_EXTERN void setContentType(const std::string& _contentType); QPID_COMMON_EXTERN const std::string& getContentType() const; QPID_COMMON_EXTERN bool hasContentType() const; QPID_COMMON_EXTERN void clearContentTypeFlag(); QPID_COMMON_EXTERN void setContentEncoding(const std::string& _contentEncoding); QPID_COMMON_EXTERN const std::string& getContentEncoding() const; QPID_COMMON_EXTERN bool hasContentEncoding() const; QPID_COMMON_EXTERN void clearContentEncodingFlag(); QPID_COMMON_EXTERN void setUserId(const std::string& _userId); QPID_COMMON_EXTERN const std::string& getUserId() const; QPID_COMMON_EXTERN bool hasUserId() const; QPID_COMMON_EXTERN void clearUserIdFlag(); QPID_COMMON_EXTERN void setAppId(const std::string& _appId); QPID_COMMON_EXTERN const std::string& getAppId() const; QPID_COMMON_EXTERN bool hasAppId() const; QPID_COMMON_EXTERN void clearAppIdFlag(); QPID_COMMON_EXTERN void setApplicationHeaders(const FieldTable& _applicationHeaders); QPID_COMMON_EXTERN const FieldTable& getApplicationHeaders() const; QPID_COMMON_EXTERN FieldTable& getApplicationHeaders(); QPID_COMMON_EXTERN bool hasApplicationHeaders() const; QPID_COMMON_EXTERN void clearApplicationHeadersFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const MessageProperties&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageProperties */ }} #endif /*!QPID_FRAMING_MESSAGEPROPERTIES_H*/ qpidc-0.16/include/qpid/framing/QueueQueryResult.h0000664000076400007640000001040611752725676022644 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_QUEUEQUERYRESULT_H #define QPID_FRAMING_QUEUEQUERYRESULT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN QueueQueryResult { std::string queue; std::string alternateExchange; FieldTable arguments; uint32_t messageCount; uint32_t subscriberCount; uint16_t flags; public: static const uint16_t TYPE = 2049; QueueQueryResult( const std::string& _queue, const std::string& _alternateExchange, bool _durable, bool _exclusive, bool _autoDelete, const FieldTable& _arguments, uint32_t _messageCount, uint32_t _subscriberCount) : queue(_queue), alternateExchange(_alternateExchange), arguments(_arguments), messageCount(_messageCount), subscriberCount(_subscriberCount), flags(0){ setDurable(_durable); setExclusive(_exclusive); setAutoDelete(_autoDelete); flags |= (1 << 8); flags |= (1 << 9); flags |= (1 << 13); flags |= (1 << 14); flags |= (1 << 15); } QueueQueryResult() : messageCount(0), subscriberCount(0), flags(0) {} QPID_COMMON_EXTERN void setQueue(const std::string& _queue); QPID_COMMON_EXTERN const std::string& getQueue() const; QPID_COMMON_EXTERN bool hasQueue() const; QPID_COMMON_EXTERN void clearQueueFlag(); QPID_COMMON_EXTERN void setAlternateExchange(const std::string& _alternateExchange); QPID_COMMON_EXTERN const std::string& getAlternateExchange() const; QPID_COMMON_EXTERN bool hasAlternateExchange() const; QPID_COMMON_EXTERN void clearAlternateExchangeFlag(); QPID_COMMON_EXTERN void setDurable(bool _durable); QPID_COMMON_EXTERN bool getDurable() const; QPID_COMMON_EXTERN void setExclusive(bool _exclusive); QPID_COMMON_EXTERN bool getExclusive() const; QPID_COMMON_EXTERN void setAutoDelete(bool _autoDelete); QPID_COMMON_EXTERN bool getAutoDelete() const; QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments); QPID_COMMON_EXTERN const FieldTable& getArguments() const; QPID_COMMON_EXTERN FieldTable& getArguments(); QPID_COMMON_EXTERN bool hasArguments() const; QPID_COMMON_EXTERN void clearArgumentsFlag(); QPID_COMMON_EXTERN void setMessageCount(uint32_t _messageCount); QPID_COMMON_EXTERN uint32_t getMessageCount() const; QPID_COMMON_EXTERN bool hasMessageCount() const; QPID_COMMON_EXTERN void clearMessageCountFlag(); QPID_COMMON_EXTERN void setSubscriberCount(uint32_t _subscriberCount); QPID_COMMON_EXTERN uint32_t getSubscriberCount() const; QPID_COMMON_EXTERN bool hasSubscriberCount() const; QPID_COMMON_EXTERN void clearSubscriberCountFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const QueueQueryResult&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class QueueQueryResult */ }} #endif /*!QPID_FRAMING_QUEUEQUERYRESULT_H*/ qpidc-0.16/include/qpid/framing/FieldValue.h0000664000076400007640000003164111564561152021343 0ustar00jrossjross00000000000000#ifndef _framing_FieldValue_h #define _framing_FieldValue_h /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/Exception.h" #include "qpid/framing/amqp_types.h" #include "qpid/framing/Buffer.h" #include "qpid/framing/FieldTable.h" #include "qpid/CommonImportExport.h" #include #include #include #include namespace qpid { namespace framing { /** * Exception that is the base exception for all field table errors. * * \ingroup clientapi */ class QPID_COMMON_CLASS_EXTERN FieldValueException : public qpid::Exception {}; /** * Exception thrown when we can't perform requested conversion * * \ingroup clientapi */ struct QPID_COMMON_CLASS_EXTERN InvalidConversionException : public FieldValueException { InvalidConversionException() {} }; class List; /** * Value that can appear in an AMQP field table * * \ingroup clientapi */ class QPID_COMMON_CLASS_EXTERN FieldValue { public: /* * Abstract type for content of different types */ class Data { public: virtual ~Data() {}; virtual uint32_t encodedSize() const = 0; virtual void encode(Buffer& buffer) = 0; virtual void decode(Buffer& buffer) = 0; virtual bool operator==(const Data&) const = 0; virtual bool convertsToInt() const { return false; } virtual bool convertsToString() const { return false; } virtual int64_t getInt() const { throw InvalidConversionException();} virtual std::string getString() const { throw InvalidConversionException(); } virtual void print(std::ostream& out) const = 0; }; FieldValue(): data(0) {}; // Default assignment operator is fine void setType(uint8_t type); QPID_COMMON_EXTERN uint8_t getType() const; Data& getData() { return *data; } uint32_t encodedSize() const { return 1 + data->encodedSize(); }; bool empty() const { return data.get() == 0; } void encode(Buffer& buffer); void decode(Buffer& buffer); QPID_COMMON_EXTERN bool operator==(const FieldValue&) const; QPID_COMMON_INLINE_EXTERN bool operator!=(const FieldValue& v) const { return !(*this == v); } QPID_COMMON_EXTERN void print(std::ostream& out) const; template bool convertsTo() const { return false; } template T get() const { throw InvalidConversionException(); } template T getIntegerValue() const; template T getIntegerValue() const; template T getFloatingPointValue() const; template void getFixedWidthValue(unsigned char*) const; template bool get(T&) const; protected: FieldValue(uint8_t t, Data* d): typeOctet(t), data(d) {} QPID_COMMON_EXTERN static uint8_t* convertIfRequired(uint8_t* const octets, int width); private: uint8_t typeOctet; std::auto_ptr data; }; template <> inline bool FieldValue::convertsTo() const { return data->convertsToInt(); } template <> inline bool FieldValue::convertsTo() const { return data->convertsToInt(); } template <> inline bool FieldValue::convertsTo() const { return data->convertsToString(); } template <> inline int FieldValue::get() const { return static_cast(data->getInt()); } template <> inline int64_t FieldValue::get() const { return data->getInt(); } template <> inline std::string FieldValue::get() const { return data->getString(); } inline std::ostream& operator<<(std::ostream& out, const FieldValue& v) { v.print(out); return out; } template class FixedWidthValue : public FieldValue::Data { uint8_t octets[width]; public: FixedWidthValue() {} FixedWidthValue(const uint8_t (&data)[width]) : octets(data) {} FixedWidthValue(const uint8_t* const data) { for (int i = 0; i < width; i++) octets[i] = data[i]; } FixedWidthValue(uint64_t v) { for (int i = width; i > 1; --i) { octets[i-1] = (uint8_t) (0xFF & v); v >>= 8; } octets[0] = (uint8_t) (0xFF & v); } uint32_t encodedSize() const { return width; } void encode(Buffer& buffer) { buffer.putRawData(octets, width); } void decode(Buffer& buffer) { buffer.getRawData(octets, width); } bool operator==(const Data& d) const { const FixedWidthValue* rhs = dynamic_cast< const FixedWidthValue* >(&d); if (rhs == 0) return false; else return std::equal(&octets[0], &octets[width], &rhs->octets[0]); } bool convertsToInt() const { return true; } int64_t getInt() const { int64_t v = 0; for (int i = 0; i < width-1; ++i) { v |= octets[i]; v <<= 8; } v |= octets[width-1]; return v; } uint8_t* rawOctets() { return octets; } uint8_t* rawOctets() const { return octets; } void print(std::ostream& o) const { o << "F" << width << ":"; }; }; template inline T FieldValue::getIntegerValue() const { FixedWidthValue* const fwv = dynamic_cast< FixedWidthValue* const>(data.get()); if (fwv) { uint8_t* octets = fwv->rawOctets(); T v = 0; for (int i = 0; i < W-1; ++i) { v |= octets[i]; v <<= 8; } v |= octets[W-1]; return v; } else { throw InvalidConversionException(); } } template inline T FieldValue::getIntegerValue() const { FixedWidthValue<1>* const fwv = dynamic_cast< FixedWidthValue<1>* const>(data.get()); if (fwv) { uint8_t* octets = fwv->rawOctets(); return octets[0]; } else { throw InvalidConversionException(); } } template inline T FieldValue::getFloatingPointValue() const { FixedWidthValue* const fwv = dynamic_cast< FixedWidthValue* const>(data.get()); if (fwv) { T value; uint8_t* const octets = convertIfRequired(fwv->rawOctets(), W); uint8_t* const target = reinterpret_cast(&value); for (size_t i = 0; i < W; ++i) target[i] = octets[i]; return value; } else { throw InvalidConversionException(); } } template void FieldValue::getFixedWidthValue(unsigned char* value) const { FixedWidthValue* const fwv = dynamic_cast< FixedWidthValue* const>(data.get()); if (fwv) { for (size_t i = 0; i < W; ++i) value[i] = fwv->rawOctets()[i]; } else { throw InvalidConversionException(); } } template <> inline float FieldValue::get() const { return getFloatingPointValue(); } template <> inline double FieldValue::get() const { return getFloatingPointValue(); } template <> class FixedWidthValue<0> : public FieldValue::Data { public: // Implicit default constructor is fine uint32_t encodedSize() const { return 0; } void encode(Buffer&) {}; void decode(Buffer&) {}; bool operator==(const Data& d) const { const FixedWidthValue<0>* rhs = dynamic_cast< const FixedWidthValue<0>* >(&d); return rhs != 0; } void print(std::ostream& o) const { o << "F0"; }; }; template class VariableWidthValue : public FieldValue::Data { std::vector octets; public: VariableWidthValue() {} VariableWidthValue(const std::vector& data) : octets(data) {} VariableWidthValue(const uint8_t* start, const uint8_t* end) : octets(start, end) {} uint32_t encodedSize() const { return lenwidth + octets.size(); } void encode(Buffer& buffer) { buffer.putUInt(octets.size()); if (octets.size() > 0) buffer.putRawData(&octets[0], octets.size()); }; void decode(Buffer& buffer) { uint32_t len = buffer.getUInt(); octets.resize(len); if (len > 0) buffer.getRawData(&octets[0], len); } bool operator==(const Data& d) const { const VariableWidthValue* rhs = dynamic_cast< const VariableWidthValue* >(&d); if (rhs == 0) return false; else return octets==rhs->octets; } bool convertsToString() const { return true; } std::string getString() const { return std::string(octets.begin(), octets.end()); } void print(std::ostream& o) const { o << "V" << lenwidth << ":" << octets.size() << ":"; }; }; template class EncodedValue : public FieldValue::Data { T value; public: EncodedValue() {} EncodedValue(const T& v) : value(v) {} T& getValue() { return value; } const T& getValue() const { return value; } uint32_t encodedSize() const { return value.encodedSize(); } void encode(Buffer& buffer) { value.encode(buffer); }; void decode(Buffer& buffer) { value.decode(buffer); } bool operator==(const Data& d) const { const EncodedValue* rhs = dynamic_cast< const EncodedValue* >(&d); if (rhs == 0) return false; else return value==rhs->value; } void print(std::ostream& o) const { o << "[" << value << "]"; }; }; /** * Accessor that can be used to get values of type FieldTable, Array * and List. */ template inline bool FieldValue::get(T& t) const { const EncodedValue* v = dynamic_cast< EncodedValue* >(data.get()); if (v != 0) { t = v->getValue(); return true; } else { try { t = get(); return true; } catch (const InvalidConversionException&) { return false; } } } class Str8Value : public FieldValue { public: QPID_COMMON_EXTERN Str8Value(const std::string& v); }; class Str16Value : public FieldValue { public: QPID_COMMON_EXTERN Str16Value(const std::string& v); }; class Var16Value : public FieldValue { public: QPID_COMMON_EXTERN Var16Value(const std::string& v, uint8_t code); }; class Var32Value : public FieldValue { public: QPID_COMMON_EXTERN Var32Value(const std::string& v, uint8_t code); }; class Struct32Value : public FieldValue { public: QPID_COMMON_EXTERN Struct32Value(const std::string& v); }; class FloatValue : public FieldValue { public: QPID_COMMON_EXTERN FloatValue(float f); }; class DoubleValue : public FieldValue { public: QPID_COMMON_EXTERN DoubleValue(double f); }; /* * Basic integer value encodes as signed 32 bit */ class IntegerValue : public FieldValue { public: QPID_COMMON_EXTERN IntegerValue(int v); }; class TimeValue : public FieldValue { public: QPID_COMMON_EXTERN TimeValue(uint64_t v); }; class Integer64Value : public FieldValue { public: QPID_COMMON_EXTERN Integer64Value(int64_t v); }; class Unsigned64Value : public FieldValue { public: QPID_COMMON_EXTERN Unsigned64Value(uint64_t v); }; class FieldTableValue : public FieldValue { public: typedef FieldTable ValueType; QPID_COMMON_EXTERN FieldTableValue(const FieldTable&); }; class ArrayValue : public FieldValue { public: QPID_COMMON_EXTERN ArrayValue(const Array&); }; class VoidValue : public FieldValue { public: QPID_COMMON_EXTERN VoidValue(); }; class BoolValue : public FieldValue { public: QPID_COMMON_EXTERN BoolValue(bool); }; class Unsigned8Value : public FieldValue { public: QPID_COMMON_EXTERN Unsigned8Value(uint8_t); }; class Unsigned16Value : public FieldValue { public: QPID_COMMON_EXTERN Unsigned16Value(uint16_t); }; class Unsigned32Value : public FieldValue { public: QPID_COMMON_EXTERN Unsigned32Value(uint32_t); }; class Integer8Value : public FieldValue { public: QPID_COMMON_EXTERN Integer8Value(int8_t); }; class Integer16Value : public FieldValue { public: QPID_COMMON_EXTERN Integer16Value(int16_t); }; typedef IntegerValue Integer32Value; class ListValue : public FieldValue { public: typedef List ValueType; QPID_COMMON_EXTERN ListValue(const List&); }; class UuidValue : public FieldValue { public: QPID_COMMON_EXTERN UuidValue(const unsigned char*); }; template bool getEncodedValue(FieldTable::ValuePtr vptr, T& value) { if (vptr) { const EncodedValue* ev = dynamic_cast< EncodedValue* >(&(vptr->getData())); if (ev != 0) { value = ev->getValue(); return true; } } return false; } }} // qpid::framing #endif qpidc-0.16/include/qpid/framing/FragmentProperties.h0000664000076400007640000000503411752725676023154 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_FRAGMENTPROPERTIES_H #define QPID_FRAMING_FRAGMENTPROPERTIES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN FragmentProperties { uint64_t fragmentSize; uint16_t flags; public: static const uint16_t TYPE = 1026; FragmentProperties( bool _first, bool _last, uint64_t _fragmentSize) : fragmentSize(_fragmentSize), flags(0){ setFirst(_first); setLast(_last); flags |= (1 << 10); } FragmentProperties() : fragmentSize(0), flags(0) {} QPID_COMMON_EXTERN void setFirst(bool _first); QPID_COMMON_EXTERN bool getFirst() const; QPID_COMMON_EXTERN void setLast(bool _last); QPID_COMMON_EXTERN bool getLast() const; QPID_COMMON_EXTERN void setFragmentSize(uint64_t _fragmentSize); QPID_COMMON_EXTERN uint64_t getFragmentSize() const; QPID_COMMON_EXTERN bool hasFragmentSize() const; QPID_COMMON_EXTERN void clearFragmentSizeFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const FragmentProperties&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class FragmentProperties */ }} #endif /*!QPID_FRAMING_FRAGMENTPROPERTIES_H*/ qpidc-0.16/include/qpid/framing/Array.h0000664000076400007640000000634511564561152020404 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/FieldValue.h" #include "qpid/framing/TypeCode.h" #include #include #include #include "qpid/CommonImportExport.h" #ifndef _Array_ #define _Array_ namespace qpid { namespace framing { class Buffer; class QPID_COMMON_CLASS_EXTERN Array { public: typedef boost::shared_ptr ValuePtr; typedef std::vector ValueVector; typedef ValueVector::const_iterator const_iterator; typedef ValueVector::iterator iterator; QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN void encode(Buffer& buffer) const; QPID_COMMON_EXTERN void decode(Buffer& buffer); QPID_COMMON_EXTERN int count() const; QPID_COMMON_EXTERN bool operator==(const Array& other) const; QPID_COMMON_EXTERN Array(); QPID_COMMON_EXTERN Array(TypeCode type); QPID_COMMON_EXTERN Array(uint8_t type); //creates a longstr array QPID_COMMON_EXTERN Array(const std::vector& in); QPID_COMMON_INLINE_EXTERN TypeCode getType() const { return type; } // std collection interface. QPID_COMMON_INLINE_EXTERN const_iterator begin() const { return values.begin(); } QPID_COMMON_INLINE_EXTERN const_iterator end() const { return values.end(); } QPID_COMMON_INLINE_EXTERN iterator begin() { return values.begin(); } QPID_COMMON_INLINE_EXTERN iterator end(){ return values.end(); } QPID_COMMON_INLINE_EXTERN ValuePtr front() const { return values.front(); } QPID_COMMON_INLINE_EXTERN ValuePtr back() const { return values.back(); } QPID_COMMON_INLINE_EXTERN size_t size() const { return values.size(); } QPID_COMMON_EXTERN void insert(iterator i, ValuePtr value); QPID_COMMON_INLINE_EXTERN void erase(iterator i) { values.erase(i); } QPID_COMMON_INLINE_EXTERN void push_back(ValuePtr value) { values.insert(end(), value); } QPID_COMMON_INLINE_EXTERN void pop_back() { values.pop_back(); } // Non-std interface QPID_COMMON_INLINE_EXTERN void add(ValuePtr value) { push_back(value); } template void collect(std::vector& out) const { for (ValueVector::const_iterator i = values.begin(); i != values.end(); ++i) { out.push_back((*i)->get()); } } private: TypeCode type; ValueVector values; friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& out, const Array& body); }; } } #endif qpidc-0.16/include/qpid/framing/amqp_types_full.h0000664000076400007640000000232011227403641022511 0ustar00jrossjross00000000000000#ifndef _framing_amqp_types_decl_h #define _framing_amqp_types_decl_h /* * * Copyright (c) 2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ /** \file * Definitions and full declarations of all types used * in AMQP messages. * * It's better to include amqp_types.h in another header instead of this file * unless the header actually needs the full declarations. Including * full declarations when forward declarations would increase compile * times. */ #include "qpid/framing/amqp_types.h" #include "qpid/framing/Array.h" #include "qpid/framing/FieldTable.h" #include "qpid/framing/SequenceSet.h" #include "qpid/framing/Uuid.h" #endif /*!_framing_amqp_types_decl_h*/ qpidc-0.16/include/qpid/framing/XaResult.h0000664000076400007640000000416511752725676021107 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_XARESULT_H #define QPID_FRAMING_XARESULT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN XaResult { uint16_t status; uint16_t flags; public: static const uint16_t TYPE = 1537; XaResult( uint16_t _status) : status(_status), flags(0){ flags |= (1 << 8); } XaResult() : status(0), flags(0) {} QPID_COMMON_EXTERN void setStatus(uint16_t _status); QPID_COMMON_EXTERN uint16_t getStatus() const; QPID_COMMON_EXTERN bool hasStatus() const; QPID_COMMON_EXTERN void clearStatusFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const XaResult&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class XaResult */ }} #endif /*!QPID_FRAMING_XARESULT_H*/ qpidc-0.16/include/qpid/framing/ProtocolVersion.h0000664000076400007640000000353111564561152022467 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #ifndef _ProtocolVersion_ #define _ProtocolVersion_ #include "qpid/framing/amqp_types.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ProtocolVersion { private: uint8_t major_; uint8_t minor_; public: explicit ProtocolVersion(uint8_t _major=0, uint8_t _minor=0) : major_(_major), minor_(_minor) {} QPID_COMMON_INLINE_EXTERN uint8_t getMajor() const { return major_; } QPID_COMMON_INLINE_EXTERN void setMajor(uint8_t major) { major_ = major; } QPID_COMMON_INLINE_EXTERN uint8_t getMinor() const { return minor_; } QPID_COMMON_INLINE_EXTERN void setMinor(uint8_t minor) { minor_ = minor; } QPID_COMMON_EXTERN const std::string toString() const; QPID_COMMON_EXTERN ProtocolVersion& operator=(ProtocolVersion p); QPID_COMMON_EXTERN bool operator==(ProtocolVersion p) const; QPID_COMMON_INLINE_EXTERN bool operator!=(ProtocolVersion p) const { return ! (*this == p); } }; } // namespace framing } // namespace qpid #endif // ifndef _ProtocolVersion_ qpidc-0.16/include/qpid/framing/MessageResumeResult.h0000664000076400007640000000431511752725676023301 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_MESSAGERESUMERESULT_H #define QPID_FRAMING_MESSAGERESUMERESULT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN MessageResumeResult { uint64_t offset; uint16_t flags; public: static const uint16_t TYPE = 1029; MessageResumeResult( uint64_t _offset) : offset(_offset), flags(0){ flags |= (1 << 8); } MessageResumeResult() : offset(0), flags(0) {} QPID_COMMON_EXTERN void setOffset(uint64_t _offset); QPID_COMMON_EXTERN uint64_t getOffset() const; QPID_COMMON_EXTERN bool hasOffset() const; QPID_COMMON_EXTERN void clearOffsetFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const MessageResumeResult&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class MessageResumeResult */ }} #endif /*!QPID_FRAMING_MESSAGERESUMERESULT_H*/ qpidc-0.16/include/qpid/framing/FieldTable.h0000664000076400007640000001266611732672244021326 0ustar00jrossjross00000000000000#ifndef _FieldTable_ #define _FieldTable_ /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/framing/amqp_types.h" #include "qpid/sys/Mutex.h" #include #include #include #include #include "qpid/CommonImportExport.h" namespace qpid { /** * The framing namespace contains classes that are used to create, * send and receive the basic packets from which AMQP is built. */ namespace framing { class Array; class FieldValue; class Buffer; /** * A set of name-value pairs. (See the AMQP spec for more details on * AMQP field tables). * * \ingroup clientapi */ class FieldTable { public: typedef boost::shared_ptr ValuePtr; typedef std::map ValueMap; typedef ValueMap::iterator iterator; typedef ValueMap::const_iterator const_iterator; typedef ValueMap::const_reference const_reference; typedef ValueMap::reference reference; typedef ValueMap::value_type value_type; QPID_COMMON_EXTERN FieldTable(); QPID_COMMON_EXTERN FieldTable(const FieldTable&); QPID_COMMON_EXTERN FieldTable& operator=(const FieldTable&); // Compiler default destructor fine QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN void encode(Buffer& buffer) const; QPID_COMMON_EXTERN void decode(Buffer& buffer); QPID_COMMON_EXTERN int count() const; QPID_COMMON_INLINE_EXTERN size_t size() const { return values.size(); } QPID_COMMON_INLINE_EXTERN bool empty() { return size() == 0; } QPID_COMMON_EXTERN void set(const std::string& name, const ValuePtr& value); QPID_COMMON_EXTERN ValuePtr get(const std::string& name) const; QPID_COMMON_INLINE_EXTERN bool isSet(const std::string& name) const { return get(name).get() != 0; } QPID_COMMON_EXTERN void setString(const std::string& name, const std::string& value); QPID_COMMON_EXTERN void setInt(const std::string& name, const int value); QPID_COMMON_EXTERN void setInt64(const std::string& name, const int64_t value); QPID_COMMON_EXTERN void setTimestamp(const std::string& name, const uint64_t value); QPID_COMMON_EXTERN void setUInt64(const std::string& name, const uint64_t value); QPID_COMMON_EXTERN void setTable(const std::string& name, const FieldTable& value); QPID_COMMON_EXTERN void setArray(const std::string& name, const Array& value); QPID_COMMON_EXTERN void setFloat(const std::string& name, const float value); QPID_COMMON_EXTERN void setDouble(const std::string& name, const double value); //void setDecimal(string& name, xxx& value); QPID_COMMON_EXTERN int getAsInt(const std::string& name) const; QPID_COMMON_EXTERN uint64_t getAsUInt64(const std::string& name) const; QPID_COMMON_EXTERN int64_t getAsInt64(const std::string& name) const; QPID_COMMON_EXTERN std::string getAsString(const std::string& name) const; QPID_COMMON_EXTERN bool getTable(const std::string& name, FieldTable& value) const; QPID_COMMON_EXTERN bool getArray(const std::string& name, Array& value) const; QPID_COMMON_EXTERN bool getFloat(const std::string& name, float& value) const; QPID_COMMON_EXTERN bool getDouble(const std::string& name, double& value) const; //QPID_COMMON_EXTERN bool getTimestamp(const std::string& name, uint64_t& value) const; //QPID_COMMON_EXTERN bool getDecimal(string& name, xxx& value); QPID_COMMON_EXTERN void erase(const std::string& name); QPID_COMMON_EXTERN bool operator==(const FieldTable& other) const; // Map-like interface. QPID_COMMON_EXTERN ValueMap::const_iterator begin() const; QPID_COMMON_EXTERN ValueMap::const_iterator end() const; QPID_COMMON_EXTERN ValueMap::const_iterator find(const std::string& s) const; QPID_COMMON_EXTERN ValueMap::iterator begin(); QPID_COMMON_EXTERN ValueMap::iterator end(); QPID_COMMON_EXTERN ValueMap::iterator find(const std::string& s); QPID_COMMON_EXTERN std::pair insert(const ValueMap::value_type&); QPID_COMMON_EXTERN ValueMap::iterator insert(ValueMap::iterator, const ValueMap::value_type&); QPID_COMMON_EXTERN void clear(); private: void realDecode() const; void flushRawCache(); mutable qpid::sys::Mutex lock; mutable ValueMap values; mutable boost::shared_array cachedBytes; mutable uint32_t cachedSize; // if = 0 then non cached size as 0 is not a legal size mutable bool newBytes; QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream& out, const FieldTable& body); }; //class FieldNotFoundException{}; //class UnknownFieldName : public FieldNotFoundException{}; //class IncorrectFieldType : public FieldNotFoundException{}; } } #endif qpidc-0.16/include/qpid/framing/DeliveryProperties.h0000664000076400007640000001272611752725676023202 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DELIVERYPROPERTIES_H #define QPID_FRAMING_DELIVERYPROPERTIES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DeliveryProperties { uint8_t priority; uint8_t deliveryMode; uint64_t ttl; uint64_t timestamp; uint64_t expiration; std::string exchange; std::string routingKey; std::string resumeId; uint64_t resumeTtl; uint16_t flags; public: static const uint16_t TYPE = 1025; DeliveryProperties( bool _discardUnroutable, bool _immediate, bool _redelivered, uint8_t _priority, uint8_t _deliveryMode, uint64_t _ttl, uint64_t _timestamp, uint64_t _expiration, const std::string& _exchange, const std::string& _routingKey, const std::string& _resumeId, uint64_t _resumeTtl) : priority(_priority), deliveryMode(_deliveryMode), ttl(_ttl), timestamp(_timestamp), expiration(_expiration), exchange(_exchange), routingKey(_routingKey), resumeId(_resumeId), resumeTtl(_resumeTtl), flags(0){ setDiscardUnroutable(_discardUnroutable); setImmediate(_immediate); setRedelivered(_redelivered); flags |= (1 << 11); flags |= (1 << 12); flags |= (1 << 13); flags |= (1 << 14); flags |= (1 << 15); flags |= (1 << 0); flags |= (1 << 1); flags |= (1 << 2); flags |= (1 << 3); } DeliveryProperties() : priority(0), deliveryMode(0), ttl(0), timestamp(0), expiration(0), resumeTtl(0), flags(0) {} QPID_COMMON_EXTERN void setDiscardUnroutable(bool _discardUnroutable); QPID_COMMON_EXTERN bool getDiscardUnroutable() const; QPID_COMMON_EXTERN void setImmediate(bool _immediate); QPID_COMMON_EXTERN bool getImmediate() const; QPID_COMMON_EXTERN void setRedelivered(bool _redelivered); QPID_COMMON_EXTERN bool getRedelivered() const; QPID_COMMON_EXTERN void setPriority(uint8_t _priority); QPID_COMMON_EXTERN uint8_t getPriority() const; QPID_COMMON_EXTERN bool hasPriority() const; QPID_COMMON_EXTERN void clearPriorityFlag(); QPID_COMMON_EXTERN void setDeliveryMode(uint8_t _deliveryMode); QPID_COMMON_EXTERN uint8_t getDeliveryMode() const; QPID_COMMON_EXTERN bool hasDeliveryMode() const; QPID_COMMON_EXTERN void clearDeliveryModeFlag(); QPID_COMMON_EXTERN void setTtl(uint64_t _ttl); QPID_COMMON_EXTERN uint64_t getTtl() const; QPID_COMMON_EXTERN bool hasTtl() const; QPID_COMMON_EXTERN void clearTtlFlag(); QPID_COMMON_EXTERN void setTimestamp(uint64_t _timestamp); QPID_COMMON_EXTERN uint64_t getTimestamp() const; QPID_COMMON_EXTERN bool hasTimestamp() const; QPID_COMMON_EXTERN void clearTimestampFlag(); QPID_COMMON_EXTERN void setExpiration(uint64_t _expiration); QPID_COMMON_EXTERN uint64_t getExpiration() const; QPID_COMMON_EXTERN bool hasExpiration() const; QPID_COMMON_EXTERN void clearExpirationFlag(); QPID_COMMON_EXTERN void setExchange(const std::string& _exchange); QPID_COMMON_EXTERN const std::string& getExchange() const; QPID_COMMON_EXTERN bool hasExchange() const; QPID_COMMON_EXTERN void clearExchangeFlag(); QPID_COMMON_EXTERN void setRoutingKey(const std::string& _routingKey); QPID_COMMON_EXTERN const std::string& getRoutingKey() const; QPID_COMMON_EXTERN bool hasRoutingKey() const; QPID_COMMON_EXTERN void clearRoutingKeyFlag(); QPID_COMMON_EXTERN void setResumeId(const std::string& _resumeId); QPID_COMMON_EXTERN const std::string& getResumeId() const; QPID_COMMON_EXTERN bool hasResumeId() const; QPID_COMMON_EXTERN void clearResumeIdFlag(); QPID_COMMON_EXTERN void setResumeTtl(uint64_t _resumeTtl); QPID_COMMON_EXTERN uint64_t getResumeTtl() const; QPID_COMMON_EXTERN bool hasResumeTtl() const; QPID_COMMON_EXTERN void clearResumeTtlFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const DeliveryProperties&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DeliveryProperties */ }} #endif /*!QPID_FRAMING_DELIVERYPROPERTIES_H*/ qpidc-0.16/include/qpid/framing/ExchangeQueryResult.h0000664000076400007640000000565011752725676023307 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_EXCHANGEQUERYRESULT_H #define QPID_FRAMING_EXCHANGEQUERYRESULT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN ExchangeQueryResult { std::string type; FieldTable arguments; uint16_t flags; public: static const uint16_t TYPE = 1793; ExchangeQueryResult( const std::string& _type, bool _durable, bool _notFound, const FieldTable& _arguments) : type(_type), arguments(_arguments), flags(0){ setDurable(_durable); setNotFound(_notFound); flags |= (1 << 8); flags |= (1 << 11); } ExchangeQueryResult() : flags(0) {} QPID_COMMON_EXTERN void setType(const std::string& _type); QPID_COMMON_EXTERN const std::string& getType() const; QPID_COMMON_EXTERN bool hasType() const; QPID_COMMON_EXTERN void clearTypeFlag(); QPID_COMMON_EXTERN void setDurable(bool _durable); QPID_COMMON_EXTERN bool getDurable() const; QPID_COMMON_EXTERN void setNotFound(bool _notFound); QPID_COMMON_EXTERN bool getNotFound() const; QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments); QPID_COMMON_EXTERN const FieldTable& getArguments() const; QPID_COMMON_EXTERN FieldTable& getArguments(); QPID_COMMON_EXTERN bool hasArguments() const; QPID_COMMON_EXTERN void clearArgumentsFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const ExchangeQueryResult&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class ExchangeQueryResult */ }} #endif /*!QPID_FRAMING_EXCHANGEQUERYRESULT_H*/ qpidc-0.16/include/qpid/framing/enum.h0000664000076400007640000000767211752725676020312 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_ENUM_H #define QPID_FRAMING_ENUM_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// namespace qpid { namespace framing { enum SegmentType { SEGMENT_TYPE_CONTROL=0, SEGMENT_TYPE_COMMAND=1, SEGMENT_TYPE_HEADER=2, SEGMENT_TYPE_BODY=3 }; enum Track { TRACK_CONTROL=0, TRACK_COMMAND=1 }; namespace connection { enum CloseCode { CLOSE_CODE_NORMAL=200, CLOSE_CODE_CONNECTION_FORCED=320, CLOSE_CODE_INVALID_PATH=402, CLOSE_CODE_FRAMING_ERROR=501 }; } // namespace connection namespace session { enum DetachCode { DETACH_CODE_NORMAL=0, DETACH_CODE_SESSION_BUSY=1, DETACH_CODE_TRANSPORT_BUSY=2, DETACH_CODE_NOT_ATTACHED=3, DETACH_CODE_UNKNOWN_IDS=4 }; } // namespace session namespace execution { enum ErrorCode { ERROR_CODE_UNAUTHORIZED_ACCESS=403, ERROR_CODE_NOT_FOUND=404, ERROR_CODE_RESOURCE_LOCKED=405, ERROR_CODE_PRECONDITION_FAILED=406, ERROR_CODE_RESOURCE_DELETED=408, ERROR_CODE_ILLEGAL_STATE=409, ERROR_CODE_COMMAND_INVALID=503, ERROR_CODE_RESOURCE_LIMIT_EXCEEDED=506, ERROR_CODE_NOT_ALLOWED=530, ERROR_CODE_ILLEGAL_ARGUMENT=531, ERROR_CODE_NOT_IMPLEMENTED=540, ERROR_CODE_INTERNAL_ERROR=541, ERROR_CODE_INVALID_ARGUMENT=542 }; } // namespace execution namespace message { enum AcceptMode { ACCEPT_MODE_EXPLICIT=0, ACCEPT_MODE_NONE=1 }; enum AcquireMode { ACQUIRE_MODE_PRE_ACQUIRED=0, ACQUIRE_MODE_NOT_ACQUIRED=1 }; enum RejectCode { REJECT_CODE_UNSPECIFIED=0, REJECT_CODE_UNROUTABLE=1, REJECT_CODE_IMMEDIATE=2 }; enum DeliveryMode { DELIVERY_MODE_NON_PERSISTENT=1, DELIVERY_MODE_PERSISTENT=2 }; enum DeliveryPriority { DELIVERY_PRIORITY_LOWEST=0, DELIVERY_PRIORITY_LOWER=1, DELIVERY_PRIORITY_LOW=2, DELIVERY_PRIORITY_BELOW_AVERAGE=3, DELIVERY_PRIORITY_MEDIUM=4, DELIVERY_PRIORITY_ABOVE_AVERAGE=5, DELIVERY_PRIORITY_HIGH=6, DELIVERY_PRIORITY_HIGHER=7, DELIVERY_PRIORITY_VERY_HIGH=8, DELIVERY_PRIORITY_HIGHEST=9 }; enum FlowMode { FLOW_MODE_CREDIT=0, FLOW_MODE_WINDOW=1 }; enum CreditUnit { CREDIT_UNIT_MESSAGE=0, CREDIT_UNIT_BYTE=1 }; } // namespace message namespace dtx { enum XaStatus { XA_STATUS_XA_OK=0, XA_STATUS_XA_RBROLLBACK=1, XA_STATUS_XA_RBTIMEOUT=2, XA_STATUS_XA_HEURHAZ=3, XA_STATUS_XA_HEURCOM=4, XA_STATUS_XA_HEURRB=5, XA_STATUS_XA_HEURMIX=6, XA_STATUS_XA_RDONLY=7 }; } // namespace dtx namespace file { enum ReturnCode { RETURN_CODE_CONTENT_TOO_LARGE=311, RETURN_CODE_NO_ROUTE=312, RETURN_CODE_NO_CONSUMERS=313 }; } // namespace file namespace stream { enum ReturnCode { RETURN_CODE_CONTENT_TOO_LARGE=311, RETURN_CODE_NO_ROUTE=312, RETURN_CODE_NO_CONSUMERS=313 }; } // namespace stream namespace cluster { enum StoreState { STORE_STATE_NO_STORE=0, STORE_STATE_EMPTY_STORE=1, STORE_STATE_CLEAN_STORE=2, STORE_STATE_DIRTY_STORE=3 }; enum ErrorType { ERROR_TYPE_NONE=0, ERROR_TYPE_SESSION=1, ERROR_TYPE_CONNECTION=2 }; } // namespace cluster }} // namespace qpid::framing #endif /*!QPID_FRAMING_ENUM_H*/ qpidc-0.16/include/qpid/framing/DtxRecoverResult.h0000664000076400007640000000427411752725676022625 0ustar00jrossjross00000000000000#ifndef QPID_FRAMING_DTXRECOVERRESULT_H #define QPID_FRAMING_DTXRECOVERRESULT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ /// /// This file was automatically generated from the AMQP specification. /// Do not edit. /// #include #include "qpid/framing/amqp_types_full.h" #include "qpid/CommonImportExport.h" namespace qpid { namespace framing { class QPID_COMMON_CLASS_EXTERN DtxRecoverResult { Array inDoubt; uint16_t flags; public: static const uint16_t TYPE = 1539; DtxRecoverResult( const Array& _inDoubt) : inDoubt(_inDoubt), flags(0){ flags |= (1 << 8); } DtxRecoverResult() : flags(0) {} QPID_COMMON_EXTERN void setInDoubt(const Array& _inDoubt); QPID_COMMON_EXTERN const Array& getInDoubt() const; QPID_COMMON_EXTERN bool hasInDoubt() const; QPID_COMMON_EXTERN void clearInDoubtFlag(); QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const DtxRecoverResult&); QPID_COMMON_EXTERN void encode(Buffer&) const; QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0); QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const; QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0); QPID_COMMON_EXTERN uint32_t encodedSize() const; QPID_COMMON_EXTERN uint32_t bodySize() const; QPID_COMMON_EXTERN void print(std::ostream& out) const; }; /* class DtxRecoverResult */ }} #endif /*!QPID_FRAMING_DTXRECOVERRESULT_H*/ qpidc-0.16/include/qpid/types/0000775000076400007640000000000011752725715016674 5ustar00jrossjross00000000000000qpidc-0.16/include/qpid/types/Uuid.h0000664000076400007640000000655511564561152017760 0ustar00jrossjross00000000000000#ifndef QPID_TYPES_UUID_H #define QPID_TYPES_UUID_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/types/ImportExport.h" #include #include namespace qpid { namespace types { class QPID_TYPES_CLASS_EXTERN Uuid { public: static const size_t SIZE; /** * If unique is true, this will generate a new unique uuid, if not * it will construct a null uuid. */ QPID_TYPES_EXTERN Uuid(bool unique=false); QPID_TYPES_EXTERN Uuid(const Uuid&); QPID_TYPES_EXTERN Uuid& operator=(const Uuid&); /** Copy the UUID from data16, which must point to a 16-byte UUID */ QPID_TYPES_EXTERN Uuid(const unsigned char* data16); /** Set to a new unique identifier. */ QPID_TYPES_EXTERN void generate(); /** Set to all zeros. */ QPID_TYPES_EXTERN void clear(); /** Test for null (all zeros). */ QPID_TYPES_EXTERN bool isNull() const; QPID_TYPES_EXTERN operator bool() const; QPID_TYPES_EXTERN bool operator!() const; /** String value in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ QPID_TYPES_EXTERN std::string str() const; QPID_TYPES_EXTERN size_t size() const; QPID_TYPES_EXTERN const unsigned char* data() const; friend QPID_TYPES_EXTERN bool operator==(const Uuid&, const Uuid&); friend QPID_TYPES_EXTERN bool operator!=(const Uuid&, const Uuid&); friend QPID_TYPES_EXTERN bool operator<(const Uuid&, const Uuid&); friend QPID_TYPES_EXTERN bool operator>(const Uuid&, const Uuid&); friend QPID_TYPES_EXTERN bool operator<=(const Uuid&, const Uuid&); friend QPID_TYPES_EXTERN bool operator>=(const Uuid&, const Uuid&); friend QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream&, Uuid); friend QPID_TYPES_EXTERN std::istream& operator>>(std::istream&, Uuid&); private: unsigned char bytes[16]; }; /** Returns true if the uuids are equal, false otherwise. **/ QPID_TYPES_EXTERN bool operator==(const Uuid&, const Uuid&); /** Returns true if the uuids are NOT equal, false if they are. **/ QPID_TYPES_EXTERN bool operator!=(const Uuid&, const Uuid&); QPID_TYPES_EXTERN bool operator<(const Uuid&, const Uuid&); QPID_TYPES_EXTERN bool operator>(const Uuid&, const Uuid&); QPID_TYPES_EXTERN bool operator<=(const Uuid&, const Uuid&); QPID_TYPES_EXTERN bool operator>=(const Uuid&, const Uuid&); /** Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream&, Uuid); /** Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ QPID_TYPES_EXTERN std::istream& operator>>(std::istream&, Uuid&); }} // namespace qpid::types #endif /*!QPID_TYPES_UUID_H*/ qpidc-0.16/include/qpid/types/ImportExport.h0000664000076400007640000000244011564561152021513 0ustar00jrossjross00000000000000#ifndef QPID_TYPES_IMPORTEXPORT_H #define QPID_TYPES_IMPORTEXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/ImportExport.h" #if defined(TYPES_EXPORT) || defined (qpidtypes_EXPORTS) # define QPID_TYPES_EXTERN QPID_EXPORT # define QPID_TYPES_CLASS_EXTERN QPID_CLASS_EXPORT # define QPID_TYPES_INLINE_EXTERN QPID_INLINE_EXPORT #else # define QPID_TYPES_EXTERN QPID_IMPORT # define QPID_TYPES_CLASS_EXTERN QPID_CLASS_IMPORT # define QPID_TYPES_INLINE_EXTERN QPID_INLINE_IMPORT #endif #endif /*!QPID_TYPES_IMPORTEXPORT_H*/ qpidc-0.16/include/qpid/types/Variant.h0000664000076400007640000001406111720530342020434 0ustar00jrossjross00000000000000#ifndef QPID_TYPES_VARIANT_H #define QPID_TYPES_VARIANT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include #include #include "Uuid.h" #include "qpid/types/Exception.h" #include "qpid/sys/IntegerTypes.h" #include "qpid/types/ImportExport.h" namespace qpid { namespace types { /** * Thrown when an illegal conversion of a variant is attempted. */ struct QPID_TYPES_CLASS_EXTERN InvalidConversion : public Exception { InvalidConversion(const std::string& msg); }; enum VariantType { VAR_VOID = 0, VAR_BOOL, VAR_UINT8, VAR_UINT16, VAR_UINT32, VAR_UINT64, VAR_INT8, VAR_INT16, VAR_INT32, VAR_INT64, VAR_FLOAT, VAR_DOUBLE, VAR_STRING, VAR_MAP, VAR_LIST, VAR_UUID }; QPID_TYPES_EXTERN std::string getTypeName(VariantType type); QPID_TYPES_EXTERN bool isIntegerType(VariantType type); class VariantImpl; /** * Represents a value of variable type. */ class QPID_TYPES_CLASS_EXTERN Variant { public: typedef std::map Map; typedef std::list List; QPID_TYPES_EXTERN Variant(); QPID_TYPES_EXTERN Variant(bool); QPID_TYPES_EXTERN Variant(uint8_t); QPID_TYPES_EXTERN Variant(uint16_t); QPID_TYPES_EXTERN Variant(uint32_t); QPID_TYPES_EXTERN Variant(uint64_t); QPID_TYPES_EXTERN Variant(int8_t); QPID_TYPES_EXTERN Variant(int16_t); QPID_TYPES_EXTERN Variant(int32_t); QPID_TYPES_EXTERN Variant(int64_t); QPID_TYPES_EXTERN Variant(float); QPID_TYPES_EXTERN Variant(double); QPID_TYPES_EXTERN Variant(const std::string&); QPID_TYPES_EXTERN Variant(const char*); QPID_TYPES_EXTERN Variant(const Map&); QPID_TYPES_EXTERN Variant(const List&); QPID_TYPES_EXTERN Variant(const Variant&); QPID_TYPES_EXTERN Variant(const Uuid&); QPID_TYPES_EXTERN ~Variant(); QPID_TYPES_EXTERN VariantType getType() const; QPID_TYPES_EXTERN bool isVoid() const; QPID_TYPES_EXTERN Variant& operator=(bool); QPID_TYPES_EXTERN Variant& operator=(uint8_t); QPID_TYPES_EXTERN Variant& operator=(uint16_t); QPID_TYPES_EXTERN Variant& operator=(uint32_t); QPID_TYPES_EXTERN Variant& operator=(uint64_t); QPID_TYPES_EXTERN Variant& operator=(int8_t); QPID_TYPES_EXTERN Variant& operator=(int16_t); QPID_TYPES_EXTERN Variant& operator=(int32_t); QPID_TYPES_EXTERN Variant& operator=(int64_t); QPID_TYPES_EXTERN Variant& operator=(float); QPID_TYPES_EXTERN Variant& operator=(double); QPID_TYPES_EXTERN Variant& operator=(const std::string&); QPID_TYPES_EXTERN Variant& operator=(const char*); QPID_TYPES_EXTERN Variant& operator=(const Map&); QPID_TYPES_EXTERN Variant& operator=(const List&); QPID_TYPES_EXTERN Variant& operator=(const Variant&); QPID_TYPES_EXTERN Variant& operator=(const Uuid&); /** * Parses the argument and assigns itself the appropriate * value. Recognises integers, doubles and booleans. */ QPID_TYPES_EXTERN Variant& parse(const std::string&); QPID_TYPES_EXTERN bool asBool() const; QPID_TYPES_EXTERN uint8_t asUint8() const; QPID_TYPES_EXTERN uint16_t asUint16() const; QPID_TYPES_EXTERN uint32_t asUint32() const; QPID_TYPES_EXTERN uint64_t asUint64() const; QPID_TYPES_EXTERN int8_t asInt8() const; QPID_TYPES_EXTERN int16_t asInt16() const; QPID_TYPES_EXTERN int32_t asInt32() const; QPID_TYPES_EXTERN int64_t asInt64() const; QPID_TYPES_EXTERN float asFloat() const; QPID_TYPES_EXTERN double asDouble() const; QPID_TYPES_EXTERN std::string asString() const; QPID_TYPES_EXTERN Uuid asUuid() const; QPID_TYPES_EXTERN operator bool() const; QPID_TYPES_EXTERN operator uint8_t() const; QPID_TYPES_EXTERN operator uint16_t() const; QPID_TYPES_EXTERN operator uint32_t() const; QPID_TYPES_EXTERN operator uint64_t() const; QPID_TYPES_EXTERN operator int8_t() const; QPID_TYPES_EXTERN operator int16_t() const; QPID_TYPES_EXTERN operator int32_t() const; QPID_TYPES_EXTERN operator int64_t() const; QPID_TYPES_EXTERN operator float() const; QPID_TYPES_EXTERN operator double() const; QPID_TYPES_EXTERN operator std::string() const; QPID_TYPES_EXTERN operator Uuid() const; QPID_TYPES_EXTERN const Map& asMap() const; QPID_TYPES_EXTERN Map& asMap(); QPID_TYPES_EXTERN const List& asList() const; QPID_TYPES_EXTERN List& asList(); /** * Unlike asString(), getString() will not do any conversions and * will throw InvalidConversion if the type is not STRING. */ QPID_TYPES_EXTERN const std::string& getString() const; QPID_TYPES_EXTERN std::string& getString(); QPID_TYPES_EXTERN void setEncoding(const std::string&); QPID_TYPES_EXTERN const std::string& getEncoding() const; QPID_TYPES_EXTERN bool isEqualTo(const Variant& a) const; QPID_TYPES_EXTERN void reset(); private: VariantImpl* impl; }; #ifndef SWIG QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream& out, const Variant& value); QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream& out, const Variant::Map& map); QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream& out, const Variant::List& list); QPID_TYPES_EXTERN bool operator==(const Variant& a, const Variant& b); #endif }} // namespace qpid::types #endif /*!QPID_TYPES_VARIANT_H*/ qpidc-0.16/include/qpid/types/Exception.h0000664000076400007640000000253011564561152020775 0ustar00jrossjross00000000000000#ifndef QPID_TYPES_EXCEPTION_H #define QPID_TYPES_EXCEPTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/types/ImportExport.h" namespace qpid { namespace types { class QPID_TYPES_CLASS_EXTERN Exception : public std::exception { public: QPID_TYPES_EXTERN explicit Exception(const std::string& message=std::string()) throw(); QPID_TYPES_EXTERN virtual ~Exception() throw(); QPID_TYPES_EXTERN virtual const char* what() const throw(); private: const std::string message; }; }} // namespace qpid::types #endif /*!QPID_TYPES_EXCEPTION_H*/ qpidc-0.16/include/qpid/Msg.h0000664000076400007640000000507311627206754016432 0ustar00jrossjross00000000000000#ifndef QPID_MSG_H #define QPID_MSG_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include #include "qpid/types/ImportExport.h" namespace qpid { /** A simple wrapper for std::ostringstream that allows * in place construction of a message and automatic conversion * to string. * E.g. *@code * void foo(const std::string&); * foo(Msg() << "hello " << 32); *@endcode * Will construct the string "hello 32" and pass it to foo() */ struct Msg { std::ostringstream os; Msg() {} Msg(const Msg& m) : os(m.str()) {} std::string str() const { return os.str(); } operator std::string() const { return str(); } Msg& operator<<(long n) { os << n; return *this; } Msg& operator<<(unsigned long n) { os << n; return *this; } Msg& operator<<(bool n) { os << n; return *this; } Msg& operator<<(short n) { os << n; return *this; } Msg& operator<<(unsigned short n) { os << n; return *this; } Msg& operator<<(int n) { os << n; return *this; } Msg& operator<<(unsigned int n) { os << n; return *this; } #ifdef _GLIBCXX_USE_LONG_LONG Msg& operator<<(long long n) { os << n; return *this; } Msg& operator<<(unsigned long long n) { os << n; return *this; } #endif Msg& operator<<(double n) { os << n; return *this; } Msg& operator<<(float n) { os << n; return *this; } Msg& operator<<(long double n) { os << n; return *this; } template Msg& operator<<(const T& t) { os < namespace qpid { /** * A vector that stores up to Max elements in inline storage, * otherwise uses normal vector allocation. * * NOTE: depends on some non-standard but highly probably assumptions * about how std::vector uses its allocator, they are true for g++. * - default constructor does not allocate. * - reserve(N) does not allocate more than N elements. * - vector never re-allocates when size() < capacity() */ template > class InlineVector : public std::vector > { typedef std::vector > Base; public: typedef typename Base::allocator_type allocator_type; typedef typename Base::value_type value_type; typedef typename Base::size_type size_type; explicit InlineVector(const allocator_type& a=allocator_type()) : Base(a) { this->reserve(Max); } explicit InlineVector(size_type n, const value_type& x = value_type(), const allocator_type& a=allocator_type()) : Base(a) { this->reserve(std::max(n, Max)); this->insert(this->end(), n, x); } InlineVector(const InlineVector& x) : Base() { this->reserve(std::max(x.size(), Max)); *this = x; } }; } // namespace qpid #endif /*!QPID_INLINEVECTOR_H*/ qpidc-0.16/include/qpid/RangeSet.h0000664000076400007640000002524511522550030017376 0ustar00jrossjross00000000000000#ifndef QPID_RANGESET_H #define QPID_RANGESET_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qpid/InlineVector.h" #include #include #include #include #include namespace qpid { /** A range of values, used in RangeSet. * Range(begin, end) includes begin but excludes end. * Range::makeClosed(first,last) includes both first and last. */ template class Range { public: static Range makeClosed(const T& first, T last) { return Range(first, ++last); } Range() : begin_(), end_() {} explicit Range(const T& t) : begin_(t), end_(t) { ++end_; } Range(const T& b, const T& e) : begin_(b), end_(e) { assert(b <= e); } T begin() const { return begin_; } /** End of _open_ range, i.e. !contains(end()) */ T end() const { return end_; } T first() const { assert(!empty()); return begin_; } /** Last in closed range, i.e. contains(end()) */ T last() const { assert(!empty()); T ret=end_; return --ret; } void begin(const T& t) { begin_ = t; } void end(const T& t) { end_ = t; } size_t size() const { return end_ - begin_; } bool empty() const { return begin_ == end_; } bool contains(const T& x) const { return begin_ <= x && x < end_; } bool contains(const Range& r) const { return begin_ <= r.begin_ && r.end_ <= end_; } bool strictContains(const Range& r) const { return begin_ < r.begin_ && r.end_ < end_; } bool operator==(const Range& x) { return begin_ == x.begin_ && end_== x.end_; } bool operator<(const T& t) const { return end_ < t; } bool operator<(const Range& r) const { return end_ < r.begin_; } /** touching ranges can be merged into a single range. */ bool touching(const Range& r) const { return std::max(begin_, r.begin_) <= std::min(end_, r.end_); } /** @pre touching */ void merge(const Range& r) { assert(touching(r)); begin_ = std::min(begin_, r.begin_); end_ = std::max(end_, r.end_); } operator bool() const { return !empty(); } template void serialize(S& s) { s(begin_)(end_); } private: T begin_, end_; }; /** * A set implemented as a list of [begin, end) ranges. * T must be LessThanComparable and Incrementable. * RangeSet only provides const iterators. */ template class RangeSet : boost::additive1, boost::additive2, Range, boost::additive2, T> > > { typedef InlineVector, 3> Ranges; // TODO aconway 2008-04-21: what's the optimial inlined value? public: class iterator : public boost::iterator_facade< iterator, const T, boost::forward_traversal_tag> { public: iterator() : ranges(), iter(), value() {} private: typedef typename Ranges::const_iterator RangesIter; iterator(const Ranges& r, const RangesIter& i, const T& t) : ranges(&r), iter(i), value(t) {} void increment(); bool equal(const iterator& i) const; const T& dereference() const { return value; } const Ranges* ranges; RangesIter iter; T value; friend class RangeSet; friend class boost::iterator_core_access; }; typedef iterator const_iterator; RangeSet() {} explicit RangeSet(const Range& r) { *this += r; } RangeSet(const T& a, const T& b) { *this += Range(a,b); } bool contiguous() const { return ranges.size() <= 1; } bool contains(const T& t) const; bool contains(const Range&) const; /**@pre contiguous() */ Range toRange() const; bool operator==(const RangeSet&) const; void addRange (const Range&); void addSet (const RangeSet&); RangeSet& operator+=(const T& t) { return *this += Range(t); } RangeSet& operator+=(const Range& r) { addRange(r); return *this; } RangeSet& operator+=(const RangeSet& s) { addSet(s); return *this; } void removeRange (const Range&); void removeSet (const RangeSet&); RangeSet& operator-=(const T& t) { return *this -= Range(t); } RangeSet& operator-=(const Range& r) { removeRange(r); return *this; } RangeSet& operator-=(const RangeSet& s) { removeSet(s); return *this; } T front() const { return ranges.front().begin(); } T back() const { return ranges.back().end(); } // Iterate over elements in the set. iterator begin() const; iterator end() const; // Iterate over ranges in the set. typedef typename Ranges::const_iterator RangeIterator; RangeIterator rangesBegin() const { return ranges.begin(); } RangeIterator rangesEnd() const { return ranges.end(); } size_t rangesSize() const { return ranges.size(); } // The difference between the start and end of this range set uint32_t span() const; size_t size() const; bool empty() const { return ranges.empty(); } void clear() { ranges.clear(); } /** Return the largest contiguous range containing x. * Returns the empty range [x,x) if x is not in the set. */ Range rangeContaining(const T&) const; template void serialize(S& s) { s.split(*this); s(ranges.begin(), ranges.end()); } template void encode(S& s) const { s(uint16_t(ranges.size()*sizeof(Range))); } template void decode(S& s) { uint16_t sz; s(sz); ranges.resize(sz/sizeof(Range)); } private: static size_t accumulateSize(size_t s, const Range& r) { return s+r.size(); } Ranges ranges; template friend std::ostream& operator<<(std::ostream& o, const RangeSet& r); friend class iterator; }; template std::ostream& operator<<(std::ostream& o, const Range& r) { return o << "[" << r.begin() << "," << r.end() << ")"; } template std::ostream& operator<<(std::ostream& o, const RangeSet& rs) { std::ostream_iterator > i(o, " "); o << "{ "; std::copy(rs.ranges.begin(), rs.ranges.end(), i); return o << "}"; } template bool RangeSet::contains(const T& t) const { typename Ranges::const_iterator i = std::lower_bound(ranges.begin(), ranges.end(), Range(t)); return i != ranges.end() && i->contains(t); } template bool RangeSet::contains(const Range& r) const { typename Ranges::const_iterator i = std::lower_bound(ranges.begin(), ranges.end(), r); return i != ranges.end() && i->contains(r); } template void RangeSet::addRange(const Range& r) { if (r.empty()) return; typename Ranges::iterator i = std::lower_bound(ranges.begin(), ranges.end(), r); if (i == ranges.end() || !i->touching(r)) ranges.insert(i, r); else { i->merge(r); typename Ranges::iterator j = i; if (++j != ranges.end() && i->touching(*j)) { i->merge(*j); ranges.erase(j); } } } template void RangeSet::addSet(const RangeSet& s) { typedef RangeSet& (RangeSet::*RangeSetRangeOp)(const Range&); std::for_each(s.ranges.begin(), s.ranges.end(), boost::bind((RangeSetRangeOp)&RangeSet::operator+=, this, _1)); } template void RangeSet::removeRange(const Range& r) { if (r.empty()) return; typename Ranges::iterator i,j; i = std::lower_bound(ranges.begin(), ranges.end(), r); if (i == ranges.end() || i->begin() >= r.end()) return; // Outside of set if (*i == r) // Erase i ranges.erase(i); else if (i->strictContains(r)) { // Split i Range i1(i->begin(), r.begin()); Range i2(r.end(), i->end()); *i = i2; ranges.insert(i, i1); } else { if (i->begin() < r.begin()) { // Truncate i i->end(r.begin()); ++i; } for (j = i; j != ranges.end() && r.contains(*j); ++j) ; // Ranges to erase. if (j != ranges.end() && r.end() > j->begin()) j->begin(r.end()); // Truncate j ranges.erase(i,j); } } template void RangeSet::removeSet(const RangeSet& r) { std::for_each( r.ranges.begin(), r.ranges.end(), boost::bind(&RangeSet::removeRange, this, _1)); } template Range RangeSet::toRange() const { assert(contiguous()); return empty() ? Range() : ranges.front(); } template void RangeSet::iterator::increment() { assert(ranges && iter != ranges->end()); if (!iter->contains(++value)) { ++iter; if (iter == ranges->end()) *this=iterator(); // end() iterator else value=iter->begin(); } } template bool RangeSet::operator==(const RangeSet& r) const { return ranges.size() == r.ranges.size() && std::equal(ranges.begin(), ranges.end(), r.ranges.begin()); } template typename RangeSet::iterator RangeSet::begin() const { return empty() ? end() : iterator(ranges, ranges.begin(), front()); } template typename RangeSet::iterator RangeSet::end() const { return iterator(); } template bool RangeSet::iterator::equal(const iterator& i) const { return ranges==i.ranges && (ranges==0 || value==i.value); } template Range RangeSet::rangeContaining(const T& t) const { typename Ranges::const_iterator i = std::lower_bound(ranges.begin(), ranges.end(), Range(t)); return (i != ranges.end() && i->contains(t)) ? *i : Range(t,t); } template uint32_t RangeSet::span() const { if (ranges.empty()) return 0; return ranges.back().last() - ranges.front().first(); } template size_t RangeSet::size() const { return std::accumulate(rangesBegin(), rangesEnd(), 0, &RangeSet::accumulateSize); } } // namespace qpid #endif /*!QPID_RANGESET_H*/ qpidc-0.16/include/qmf/0000775000076400007640000000000011752725714015355 5ustar00jrossjross00000000000000qpidc-0.16/include/qmf/AgentEvent.h0000664000076400007640000000451211564561152017563 0ustar00jrossjross00000000000000#ifndef QMF_AGENT_EVENT_H #define QMF_AGENT_EVENT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qpid/types/Variant.h" namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class AgentEventImpl; class Query; class DataAddr; enum AgentEventCode { AGENT_AUTH_QUERY = 1, AGENT_AUTH_SUBSCRIBE = 2, AGENT_QUERY = 3, AGENT_METHOD = 4, AGENT_SUBSCRIBE_BEGIN = 5, AGENT_SUBSCRIBE_TOUCH = 6, AGENT_SUBSCRIBE_END = 7, AGENT_THREAD_FAILED = 8 }; class QMF_CLASS_EXTERN AgentEvent : public qmf::Handle { public: QMF_EXTERN AgentEvent(AgentEventImpl* impl = 0); QMF_EXTERN AgentEvent(const AgentEvent&); QMF_EXTERN AgentEvent& operator=(const AgentEvent&); QMF_EXTERN ~AgentEvent(); QMF_EXTERN AgentEventCode getType() const; QMF_EXTERN const std::string& getUserId() const; QMF_EXTERN Query getQuery() const; QMF_EXTERN bool hasDataAddr() const; QMF_EXTERN DataAddr getDataAddr() const; QMF_EXTERN const std::string& getMethodName() const; QMF_EXTERN qpid::types::Variant::Map& getArguments(); QMF_EXTERN qpid::types::Variant::Map& getArgumentSubtypes(); QMF_EXTERN void addReturnArgument(const std::string&, const qpid::types::Variant&, const std::string& st=""); #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct AgentEventImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/Subscription.h0000664000076400007640000000532711564561152020214 0ustar00jrossjross00000000000000#ifndef QMF_SUBSCRIPTION_H #define QMF_SUBSCRIPTION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qpid/types/Variant.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class SubscriptionImpl; class Data; class QMF_CLASS_EXTERN Subscription : public qmf::Handle { public: QMF_EXTERN Subscription(SubscriptionImpl* impl = 0); QMF_EXTERN Subscription(const Subscription&); QMF_EXTERN Subscription& operator=(const Subscription&); QMF_EXTERN ~Subscription(); /** * Construction: A subscription is created by calling ConsoleSession::subscribe. */ /** * Cancel subscriptions to all subscribed agents. After this is called, the subscription * shall be inactive. */ QMF_EXTERN void cancel(); /** * Check to see if this subscription is active. It is active if it has a live subscription * on at least one agent. If it is not active, there is nothing that can be done to make it * active, it can only be deleted. */ QMF_EXTERN bool isActive() const; /** * lock and unlock should be used to bracket a traversal of the data set. After lock is called, * the subscription will not change its set of available data objects. Between calls to getDataCount * and getData, no data objects will be added or removed. After unlock is called, the set of data * will catch up to any activity that occurred while the lock was in effect. */ QMF_EXTERN void lock(); QMF_EXTERN void unlock(); QMF_EXTERN uint32_t getDataCount() const; QMF_EXTERN Data getData(uint32_t) const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct SubscriptionImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/SchemaId.h0000664000076400007640000000352111564561152017177 0ustar00jrossjross00000000000000#ifndef QMF_SCHEMA_ID_H #define QMF_SCHEMA_ID_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qpid/types/Uuid.h" #include "qmf/SchemaTypes.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class SchemaIdImpl; class QMF_CLASS_EXTERN SchemaId : public qmf::Handle { public: QMF_EXTERN SchemaId(SchemaIdImpl* impl = 0); QMF_EXTERN SchemaId(const SchemaId&); QMF_EXTERN SchemaId& operator=(const SchemaId&); QMF_EXTERN ~SchemaId(); QMF_EXTERN SchemaId(int, const std::string&, const std::string&); QMF_EXTERN void setHash(const qpid::types::Uuid&); QMF_EXTERN int getType() const; QMF_EXTERN const std::string& getPackageName() const; QMF_EXTERN const std::string& getName() const; QMF_EXTERN const qpid::types::Uuid& getHash() const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct SchemaIdImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/ConsoleEvent.h0000664000076400007640000000546011564561152020132 0ustar00jrossjross00000000000000#ifndef QMF_CONSOLE_EVENT_H #define QMF_CONSOLE_EVENT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qmf/Agent.h" #include "qmf/Data.h" #include "qmf/SchemaId.h" #include "qpid/types/Variant.h" namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class ConsoleEventImpl; enum ConsoleEventCode { CONSOLE_AGENT_ADD = 1, CONSOLE_AGENT_DEL = 2, CONSOLE_AGENT_RESTART = 3, CONSOLE_AGENT_SCHEMA_UPDATE = 4, CONSOLE_AGENT_SCHEMA_RESPONSE = 5, CONSOLE_EVENT = 6, CONSOLE_QUERY_RESPONSE = 7, CONSOLE_METHOD_RESPONSE = 8, CONSOLE_EXCEPTION = 9, CONSOLE_SUBSCRIBE_ADD = 10, CONSOLE_SUBSCRIBE_UPDATE = 11, CONSOLE_SUBSCRIBE_DEL = 12, CONSOLE_THREAD_FAILED = 13 }; enum AgentDelReason { AGENT_DEL_AGED = 1, AGENT_DEL_FILTER = 2 }; class QMF_CLASS_EXTERN ConsoleEvent : public qmf::Handle { public: QMF_EXTERN ConsoleEvent(ConsoleEventImpl* impl = 0); QMF_EXTERN ConsoleEvent(const ConsoleEvent&); QMF_EXTERN ConsoleEvent& operator=(const ConsoleEvent&); QMF_EXTERN ~ConsoleEvent(); QMF_EXTERN ConsoleEventCode getType() const; QMF_EXTERN uint32_t getCorrelator() const; QMF_EXTERN Agent getAgent() const; QMF_EXTERN AgentDelReason getAgentDelReason() const; QMF_EXTERN uint32_t getSchemaIdCount() const; QMF_EXTERN SchemaId getSchemaId(uint32_t) const; QMF_EXTERN uint32_t getDataCount() const; QMF_EXTERN Data getData(uint32_t) const; QMF_EXTERN bool isFinal() const; QMF_EXTERN const qpid::types::Variant::Map& getArguments() const; QMF_EXTERN int getSeverity() const; QMF_EXTERN uint64_t getTimestamp() const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct ConsoleEventImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/SchemaMethod.h0000664000076400007640000000375611564561152020075 0ustar00jrossjross00000000000000#ifndef QMF_SCHEMA_METHOD_H #define QMF_SCHEMA_METHOD_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/ImportExport.h" #include "qpid/sys/IntegerTypes.h" #include "qmf/Handle.h" #include "qmf/SchemaTypes.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class SchemaMethodImpl; class SchemaProperty; class QMF_CLASS_EXTERN SchemaMethod : public qmf::Handle { public: QMF_EXTERN SchemaMethod(SchemaMethodImpl* impl = 0); QMF_EXTERN SchemaMethod(const SchemaMethod&); QMF_EXTERN SchemaMethod& operator=(const SchemaMethod&); QMF_EXTERN ~SchemaMethod(); QMF_EXTERN SchemaMethod(const std::string&, const std::string& o=""); QMF_EXTERN void setDesc(const std::string&); QMF_EXTERN void addArgument(const SchemaProperty&); QMF_EXTERN const std::string& getName() const; QMF_EXTERN const std::string& getDesc() const; QMF_EXTERN uint32_t getArgumentCount() const; QMF_EXTERN SchemaProperty getArgument(uint32_t) const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct SchemaMethodImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/exceptions.h0000664000076400007640000000335511564561152017710 0ustar00jrossjross00000000000000#ifndef QMF_EXCEPTIONS_H #define QMF_EXCEPTIONS_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/ImportExport.h" #include "qpid/types/Exception.h" #include "qpid/types/Variant.h" namespace qmf { /** \ingroup qmf */ struct QMF_CLASS_EXTERN QmfException : public qpid::types::Exception { QMF_EXTERN QmfException(const std::string& msg); QMF_EXTERN virtual ~QmfException() throw(); qpid::types::Variant::Map detail; }; struct QMF_CLASS_EXTERN KeyNotFound : public QmfException { QMF_EXTERN KeyNotFound(const std::string& msg); QMF_EXTERN virtual ~KeyNotFound() throw(); }; struct QMF_CLASS_EXTERN IndexOutOfRange : public QmfException { QMF_EXTERN IndexOutOfRange(); QMF_EXTERN virtual ~IndexOutOfRange() throw(); }; struct QMF_CLASS_EXTERN OperationTimedOut : public QmfException { QMF_EXTERN OperationTimedOut(); QMF_EXTERN virtual ~OperationTimedOut() throw(); }; } #endif qpidc-0.16/include/qmf/engine/0000775000076400007640000000000011752725714016622 5ustar00jrossjross00000000000000qpidc-0.16/include/qmf/engine/QmfEngineImportExport.h0000664000076400007640000000254311564561152023240 0ustar00jrossjross00000000000000#ifndef QMF_ENGINE_IMPORT_EXPORT_H #define QMF_ENGINE_IMPORT_EXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #if defined(WIN32) && !defined(QPID_DECLARE_STATIC) # if defined(QMF_EXPORT) || defined (qmfengine_EXPORTS) # define QMFE_EXTERN __declspec(dllexport) # else # define QMFE_EXTERN __declspec(dllimport) # endif # ifdef _MSC_VER # define QMFE_CLASS_EXTERN # define QMFE_INLINE_EXTERN QMFE_EXTERN # else # define QMFE_CLASS_EXTERN QMFE_EXTERN # define QMFE_INLINE_EXTERN # endif #else # define QMFE_EXTERN # define QMFE_CLASS_EXTERN # define QMFE_INLINE_EXTERN #endif #endif qpidc-0.16/include/qmf/engine/Message.h0000664000076400007640000000222211257223366020351 0ustar00jrossjross00000000000000#ifndef _QmfEngineMessage_ #define _QmfEngineMessage_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/sys/IntegerTypes.h" namespace qmf { namespace engine { struct Message { char* body; uint32_t length; char* destination; char* routingKey; char* replyExchange; char* replyKey; char* userId; }; } } #endif qpidc-0.16/include/qmf/engine/Event.h0000664000076400007640000000250411326115704020042 0ustar00jrossjross00000000000000#ifndef _QmfEngineEvent_ #define _QmfEngineEvent_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace qmf { namespace engine { class SchemaEventClass; class Value; struct EventImpl; class Event { public: Event(const SchemaEventClass* type); Event(const Event& from); ~Event(); const SchemaEventClass* getClass() const; Value* getValue(const char* key) const; private: friend struct EventImpl; friend class AgentImpl; Event(EventImpl* impl); EventImpl* impl; }; } } #endif qpidc-0.16/include/qmf/engine/Value.h0000664000076400007640000000654311323332437020045 0ustar00jrossjross00000000000000#ifndef _QmfEngineValue_ #define _QmfEngineValue_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include namespace qmf { namespace engine { class Object; struct ValueImpl; class Value { public: // Value(); Value(const Value& from); Value(Typecode t, Typecode arrayType = TYPE_UINT8); ~Value(); Typecode getType() const; bool isNull() const; void setNull(); bool isObjectId() const; const ObjectId& asObjectId() const; void setObjectId(const ObjectId& oid); bool isUint() const; uint32_t asUint() const; void setUint(uint32_t val); bool isInt() const; int32_t asInt() const; void setInt(int32_t val); bool isUint64() const; uint64_t asUint64() const; void setUint64(uint64_t val); bool isInt64() const; int64_t asInt64() const; void setInt64(int64_t val); bool isString() const; const char* asString() const; void setString(const char* val); bool isBool() const; bool asBool() const; void setBool(bool val); bool isFloat() const; float asFloat() const; void setFloat(float val); bool isDouble() const; double asDouble() const; void setDouble(double val); bool isUuid() const; const uint8_t* asUuid() const; void setUuid(const uint8_t* val); bool isObject() const; const Object* asObject() const; void setObject(Object* val); bool isMap() const; bool keyInMap(const char* key) const; Value* byKey(const char* key); const Value* byKey(const char* key) const; void deleteKey(const char* key); void insert(const char* key, Value* val); uint32_t keyCount() const; const char* key(uint32_t idx) const; bool isList() const; uint32_t listItemCount() const; Value* listItem(uint32_t idx); void appendToList(Value* val); void deleteListItem(uint32_t idx); bool isArray() const; Typecode arrayType() const; uint32_t arrayItemCount() const; Value* arrayItem(uint32_t idx); void appendToArray(Value* val); void deleteArrayItem(uint32_t idx); private: friend struct ValueImpl; friend class BrokerProxyImpl; friend struct ObjectImpl; friend struct EventImpl; friend class AgentImpl; Value(ValueImpl* impl); ValueImpl* impl; }; } } #endif qpidc-0.16/include/qmf/engine/Schema.h0000664000076400007640000001506511323332437020170 0ustar00jrossjross00000000000000#ifndef _QmfEngineSchema_ #define _QmfEngineSchema_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include namespace qmf { namespace engine { enum Access { ACCESS_READ_CREATE = 1, ACCESS_READ_WRITE = 2, ACCESS_READ_ONLY = 3 }; enum Direction { DIR_IN = 1, DIR_OUT = 2, DIR_IN_OUT = 3 }; enum ClassKind { CLASS_OBJECT = 1, CLASS_EVENT = 2 }; enum Severity { SEV_EMERG = 0, SEV_ALERT = 1, SEV_CRIT = 2, SEV_ERROR = 3, SEV_WARN = 4, SEV_NOTICE = 5, SEV_INFORM = 6, SEV_DEBUG = 7 }; struct SchemaArgumentImpl; struct SchemaMethodImpl; struct SchemaPropertyImpl; struct SchemaStatisticImpl; struct SchemaObjectClassImpl; struct SchemaEventClassImpl; struct SchemaClassKeyImpl; /** */ class SchemaArgument { public: SchemaArgument(const char* name, Typecode typecode); SchemaArgument(const SchemaArgument& from); ~SchemaArgument(); void setDirection(Direction dir); void setUnit(const char* val); void setDesc(const char* desc); const char* getName() const; Typecode getType() const; Direction getDirection() const; const char* getUnit() const; const char* getDesc() const; private: friend struct SchemaArgumentImpl; friend struct SchemaMethodImpl; friend struct SchemaEventClassImpl; SchemaArgument(SchemaArgumentImpl* impl); SchemaArgumentImpl* impl; }; /** */ class SchemaMethod { public: SchemaMethod(const char* name); SchemaMethod(const SchemaMethod& from); ~SchemaMethod(); void addArgument(const SchemaArgument* argument); void setDesc(const char* desc); const char* getName() const; const char* getDesc() const; int getArgumentCount() const; const SchemaArgument* getArgument(int idx) const; private: friend struct SchemaMethodImpl; friend struct SchemaObjectClassImpl; friend class AgentImpl; SchemaMethod(SchemaMethodImpl* impl); SchemaMethodImpl* impl; }; /** */ class SchemaProperty { public: SchemaProperty(const char* name, Typecode typecode); SchemaProperty(const SchemaProperty& from); ~SchemaProperty(); void setAccess(Access access); void setIndex(bool val); void setOptional(bool val); void setUnit(const char* val); void setDesc(const char* desc); const char* getName() const; Typecode getType() const; Access getAccess() const; bool isIndex() const; bool isOptional() const; const char* getUnit() const; const char* getDesc() const; private: friend struct SchemaPropertyImpl; friend struct SchemaObjectClassImpl; SchemaProperty(SchemaPropertyImpl* impl); SchemaPropertyImpl* impl; }; /** */ class SchemaStatistic { public: SchemaStatistic(const char* name, Typecode typecode); SchemaStatistic(const SchemaStatistic& from); ~SchemaStatistic(); void setUnit(const char* val); void setDesc(const char* desc); const char* getName() const; Typecode getType() const; const char* getUnit() const; const char* getDesc() const; private: friend struct SchemaStatisticImpl; friend struct SchemaObjectClassImpl; SchemaStatistic(SchemaStatisticImpl* impl); SchemaStatisticImpl* impl; }; /** */ class SchemaClassKey { public: SchemaClassKey(const SchemaClassKey& from); ~SchemaClassKey(); const char* getPackageName() const; const char* getClassName() const; const uint8_t* getHash() const; const char* asString() const; bool operator==(const SchemaClassKey& other) const; bool operator<(const SchemaClassKey& other) const; private: friend struct SchemaClassKeyImpl; friend class BrokerProxyImpl; friend class ConsoleImpl; SchemaClassKey(SchemaClassKeyImpl* impl); SchemaClassKeyImpl* impl; }; /** */ class SchemaObjectClass { public: SchemaObjectClass(const char* package, const char* name); SchemaObjectClass(const SchemaObjectClass& from); ~SchemaObjectClass(); void addProperty(const SchemaProperty* property); void addStatistic(const SchemaStatistic* statistic); void addMethod(const SchemaMethod* method); const SchemaClassKey* getClassKey() const; int getPropertyCount() const; int getStatisticCount() const; int getMethodCount() const; const SchemaProperty* getProperty(int idx) const; const SchemaStatistic* getStatistic(int idx) const; const SchemaMethod* getMethod(int idx) const; private: friend struct SchemaObjectClassImpl; friend class BrokerProxyImpl; friend class AgentImpl; SchemaObjectClass(SchemaObjectClassImpl* impl); SchemaObjectClassImpl* impl; }; /** */ class SchemaEventClass { public: SchemaEventClass(const char* package, const char* name, Severity severity); SchemaEventClass(const SchemaEventClass& from); ~SchemaEventClass(); void addArgument(const SchemaArgument* argument); void setDesc(const char* desc); const SchemaClassKey* getClassKey() const; Severity getSeverity() const; int getArgumentCount() const; const SchemaArgument* getArgument(int idx) const; private: friend struct SchemaEventClassImpl; friend class BrokerProxyImpl; friend class AgentImpl; SchemaEventClass(SchemaEventClassImpl* impl); SchemaEventClassImpl* impl; }; } } #endif qpidc-0.16/include/qmf/engine/Console.h0000664000076400007640000001545511527755664020416 0ustar00jrossjross00000000000000#ifndef _QmfEngineConsole_ #define _QmfEngineConsole_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include #include namespace qmf { namespace engine { class Console; class ConsoleImpl; class BrokerProxyImpl; class AgentProxy; struct AgentProxyImpl; struct MethodResponseImpl; struct QueryResponseImpl; struct QueryContext; /** * */ class MethodResponse { public: MethodResponse(const MethodResponse& from); ~MethodResponse(); uint32_t getStatus() const; const Value* getException() const; const Value* getArgs() const; private: friend struct MethodResponseImpl; friend class ConsoleImpl; MethodResponse(MethodResponseImpl* impl); MethodResponseImpl* impl; }; /** * */ class QueryResponse { public: ~QueryResponse(); uint32_t getStatus() const; const Value* getException() const; uint32_t getObjectCount() const; const Object* getObject(uint32_t idx) const; private: friend struct QueryResponseImpl; friend struct QueryContext; QueryResponse(QueryResponseImpl* impl); QueryResponseImpl *impl; }; /** * */ struct ConsoleEvent { enum EventKind { AGENT_ADDED = 1, AGENT_DELETED = 2, NEW_PACKAGE = 3, NEW_CLASS = 4, OBJECT_UPDATE = 5, EVENT_RECEIVED = 7, AGENT_HEARTBEAT = 8 }; EventKind kind; AgentProxy* agent; // (AGENT_[ADDED|DELETED|HEARTBEAT]) char* name; // (NEW_PACKAGE) const SchemaClassKey* classKey; // (NEW_CLASS) Object* object; // (OBJECT_UPDATE) void* context; // (OBJECT_UPDATE) Event* event; // (EVENT_RECEIVED) uint64_t timestamp; // (AGENT_HEARTBEAT) QueryResponse* queryResponse; // (QUERY_COMPLETE) bool hasProps; bool hasStats; }; /** * */ struct BrokerEvent { enum EventKind { BROKER_INFO = 10, DECLARE_QUEUE = 11, DELETE_QUEUE = 12, BIND = 13, UNBIND = 14, SETUP_COMPLETE = 15, STABLE = 16, QUERY_COMPLETE = 17, METHOD_RESPONSE = 18 }; EventKind kind; char* name; // ([DECLARE|DELETE]_QUEUE, [UN]BIND) char* exchange; // ([UN]BIND) char* bindingKey; // ([UN]BIND) void* context; // (QUERY_COMPLETE, METHOD_RESPONSE) QueryResponse* queryResponse; // (QUERY_COMPLETE) MethodResponse* methodResponse; // (METHOD_RESPONSE) }; /** * */ class AgentProxy { public: AgentProxy(const AgentProxy& from); ~AgentProxy(); const char* getLabel() const; uint32_t getBrokerBank() const; uint32_t getAgentBank() const; private: friend struct StaticContext; friend struct QueryContext; friend struct AgentProxyImpl; friend class BrokerProxyImpl; AgentProxy(AgentProxyImpl* impl); AgentProxyImpl* impl; }; /** * */ class BrokerProxy { public: BrokerProxy(Console& console); ~BrokerProxy(); void sessionOpened(SessionHandle& sh); void sessionClosed(); void startProtocol(); void handleRcvMessage(Message& message); bool getXmtMessage(Message& item) const; void popXmt(); bool getEvent(BrokerEvent& event) const; void popEvent(); uint32_t agentCount() const; const AgentProxy* getAgent(uint32_t idx) const; void sendQuery(const Query& query, void* context, const AgentProxy* agent = 0); private: friend class ConsoleImpl; friend struct StaticContext; BrokerProxyImpl* impl; }; // TODO - move this to a public header struct ConsoleSettings { bool rcvObjects; bool rcvEvents; bool rcvHeartbeats; bool userBindings; ConsoleSettings() : rcvObjects(true), rcvEvents(true), rcvHeartbeats(true), userBindings(false) {} }; class Console { public: Console(const ConsoleSettings& settings = ConsoleSettings()); ~Console(); bool getEvent(ConsoleEvent& event) const; void popEvent(); void addConnection(BrokerProxy& broker, void* context); void delConnection(BrokerProxy& broker); uint32_t packageCount() const; const char* getPackageName(uint32_t idx) const; uint32_t classCount(const char* packageName) const; const SchemaClassKey* getClass(const char* packageName, uint32_t idx) const; ClassKind getClassKind(const SchemaClassKey* key) const; const SchemaObjectClass* getObjectClass(const SchemaClassKey* key) const; const SchemaEventClass* getEventClass(const SchemaClassKey* key) const; void bindPackage(const char* packageName); void bindClass(const SchemaClassKey* key); void bindClass(const char* packageName, const char* className); void bindEvent(const SchemaClassKey *key); void bindEvent(const char* packageName, const char* eventName); /* void startSync(const Query& query, void* context, SyncQuery& sync); void touchSync(SyncQuery& sync); void endSync(SyncQuery& sync); */ private: friend class BrokerProxyImpl; friend struct AgentProxyImpl; friend struct StaticContext; ConsoleImpl* impl; }; } } #endif qpidc-0.16/include/qmf/engine/ObjectId.h0000664000076400007640000000405711334101502020437 0ustar00jrossjross00000000000000#ifndef _QmfEngineObjectId_ #define _QmfEngineObjectId_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include namespace qmf { namespace engine { // TODO: Add to/from string and << operator struct ObjectIdImpl; class ObjectId { public: ObjectId(); ObjectId(const ObjectId& from); ~ObjectId(); uint64_t getObjectNum() const; uint32_t getObjectNumHi() const; uint32_t getObjectNumLo() const; bool isDurable() const; const char* str() const; uint8_t getFlags() const; uint16_t getSequence() const; uint32_t getBrokerBank() const; uint32_t getAgentBank() const; bool operator==(const ObjectId& other) const; bool operator<(const ObjectId& other) const; bool operator>(const ObjectId& other) const; bool operator<=(const ObjectId& other) const; bool operator>=(const ObjectId& other) const; ObjectId& operator=(const ObjectId &other); private: friend struct ObjectIdImpl; friend struct ObjectImpl; friend class BrokerProxyImpl; friend struct QueryImpl; friend struct ValueImpl; friend class AgentImpl; ObjectId(ObjectIdImpl* impl); ObjectIdImpl* impl; }; } } #endif qpidc-0.16/include/qmf/engine/ResilientConnection.h0000664000076400007640000001406411335316263022746 0ustar00jrossjross00000000000000#ifndef _QmfEngineResilientConnection_ #define _QmfEngineResilientConnection_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include namespace qmf { namespace engine { class ResilientConnectionImpl; /** * Represents events that occur, unsolicited, from ResilientConnection. */ struct ResilientConnectionEvent { enum EventKind { CONNECTED = 1, DISCONNECTED = 2, SESSION_CLOSED = 3, RECV = 4 }; EventKind kind; void* sessionContext; // SESSION_CLOSED, RECV char* errorText; // DISCONNECTED, SESSION_CLOSED Message message; // RECV }; class SessionHandle { friend class ResilientConnectionImpl; void* impl; }; /** * ResilientConnection represents a Qpid connection that is resilient. * * Upon creation, ResilientConnection attempts to establish a connection to the * messaging broker. If it fails, it will continue to retry at an interval that * increases over time (to a maximum interval). If an extablished connection is * dropped, a reconnect will be attempted. */ class ResilientConnection { public: /** * Create a new resilient connection. *@param settings Settings that define how the connection is to be made. *@param delayMin Minimum delay (in seconds) between retries. *@param delayMax Maximum delay (in seconds) between retries. *@param delayFactor Factor to multiply retry delay by after each failure. */ ResilientConnection(const ConnectionSettings& settings); ~ResilientConnection(); /** * Get the connected status of the resilient connection. *@return true iff the connection is established. */ bool isConnected() const; /** * Get the next event (if present) from the connection. *@param event Returned event if one is available. *@return true if event is valid, false if there are no more events to handle. */ bool getEvent(ResilientConnectionEvent& event); /** * Discard the event on the front of the queue. This should be invoked after processing * the event from getEvent. */ void popEvent(); /** * Create a new AMQP session. *@param name Unique name for the session. *@param sessionContext Optional user-context value that will be provided in events * pertaining to this session. *@param handle Output handle to be stored and used in subsequent calls pertaining to * this session. *@return true iff the session was successfully created. */ bool createSession(const char* name, void* sessionContext, SessionHandle& handle); /** * Destroy a created session. *@param handle SessionHandle returned by createSession. */ void destroySession(SessionHandle handle); /** * Send a message into the AMQP broker via a session. *@param handle The session handle of the session to transmit through. *@param message The QMF message to transmit. */ void sendMessage(SessionHandle handle, Message& message); /** * Declare an exclusive, auto-delete queue for a session. *@param handle The session handle for the owner of the queue. *@param queue The name of the queue. */ void declareQueue(SessionHandle handle, char* queue); /** * Delete a queue. *@param handle The session handle for the owner of the queue. *@param queue The name of the queue. */ void deleteQueue(SessionHandle handle, char* queue); /** * Bind a queue to an exchange. *@param handle The session handle of the session to use for binding. *@param exchange The name of the exchange for binding. *@param queue The name of the queue for binding. *@param key The binding key. */ void bind(SessionHandle handle, char* exchange, char* queue, char* key); /** * Remove a binding. *@param handle The session handle of the session to use for un-binding. *@param exchange The name of the exchange. *@param queue The name of the queue. *@param key The binding key. */ void unbind(SessionHandle handle, char* exchange, char* queue, char* key); /** * Establish a file descriptor for event notification. *@param fd A file descriptor into which the connection shall write a character each * time an event is enqueued. This fd may be in a pair, the other fd of which * is used in a select loop to control execution. */ void setNotifyFd(int fd); /** * Send a byte into the notify file descriptor. * * This can be used to wake up the event processing portion of the engine from either the * wrapped implementation or the engine itself. */ void notify(); private: ResilientConnectionImpl* impl; }; } } #endif qpidc-0.16/include/qmf/engine/Typecode.h0000664000076400007640000000303511257223366020544 0ustar00jrossjross00000000000000#ifndef _QmfEngineTypecode_ #define _QmfEngineTypecode_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace qmf { namespace engine { enum Typecode { TYPE_UINT8 = 1, TYPE_UINT16 = 2, TYPE_UINT32 = 3, TYPE_UINT64 = 4, TYPE_SSTR = 6, TYPE_LSTR = 7, TYPE_ABSTIME = 8, TYPE_DELTATIME = 9, TYPE_REF = 10, TYPE_BOOL = 11, TYPE_FLOAT = 12, TYPE_DOUBLE = 13, TYPE_UUID = 14, TYPE_MAP = 15, TYPE_INT8 = 16, TYPE_INT16 = 17, TYPE_INT32 = 18, TYPE_INT64 = 19, TYPE_OBJECT = 20, TYPE_LIST = 21, TYPE_ARRAY = 22 }; } } #endif qpidc-0.16/include/qmf/engine/Query.h0000664000076400007640000000607711270061522020073 0ustar00jrossjross00000000000000#ifndef _QmfEngineQuery_ #define _QmfEngineQuery_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include namespace qmf { namespace engine { class Object; struct QueryElementImpl; struct QueryImpl; struct QueryExpressionImpl; class SchemaClassKey; enum ValueOper { O_EQ = 1, O_NE = 2, O_LT = 3, O_LE = 4, O_GT = 5, O_GE = 6, O_RE_MATCH = 7, O_RE_NOMATCH = 8, O_PRESENT = 9, O_NOT_PRESENT = 10 }; struct QueryOperand { virtual ~QueryOperand() {} virtual bool evaluate(const Object* object) const = 0; }; struct QueryElement : public QueryOperand { QueryElement(const char* attrName, const Value* value, ValueOper oper); QueryElement(QueryElementImpl* impl); virtual ~QueryElement(); bool evaluate(const Object* object) const; QueryElementImpl* impl; }; enum ExprOper { E_NOT = 1, E_AND = 2, E_OR = 3, E_XOR = 4 }; struct QueryExpression : public QueryOperand { QueryExpression(ExprOper oper, const QueryOperand* operand1, const QueryOperand* operand2); QueryExpression(QueryExpressionImpl* impl); virtual ~QueryExpression(); bool evaluate(const Object* object) const; QueryExpressionImpl* impl; }; class Query { public: Query(const char* className, const char* packageName); Query(const SchemaClassKey* key); Query(const ObjectId* oid); Query(const Query& from); ~Query(); void setSelect(const QueryOperand* criterion); void setLimit(uint32_t maxResults); void setOrderBy(const char* attrName, bool decreasing); const char* getPackage() const; const char* getClass() const; const ObjectId* getObjectId() const; bool haveSelect() const; bool haveLimit() const; bool haveOrderBy() const; const QueryOperand* getSelect() const; uint32_t getLimit() const; const char* getOrderBy() const; bool getDecreasing() const; private: friend struct QueryImpl; friend class BrokerProxyImpl; Query(QueryImpl* impl); QueryImpl* impl; }; } } #endif qpidc-0.16/include/qmf/engine/Agent.h0000664000076400007640000001743611527755664020053 0ustar00jrossjross00000000000000#ifndef _QmfEngineAgent_ #define _QmfEngineAgent_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include namespace qmf { namespace engine { /** * AgentEvent * * This structure represents a QMF event coming from the agent to * the application. */ struct AgentEvent { enum EventKind { GET_QUERY = 1, START_SYNC = 2, END_SYNC = 3, METHOD_CALL = 4, DECLARE_QUEUE = 5, DELETE_QUEUE = 6, BIND = 7, UNBIND = 8, SETUP_COMPLETE = 9 }; EventKind kind; uint32_t sequence; // Protocol sequence (for all kinds) char* authUserId; // Authenticated user ID (for all kinds) char* authToken; // Authentication token if issued (for all kinds) char* name; // Name of the method/sync query // (METHOD_CALL, START_SYNC, END_SYNC, DECLARE_QUEUE, BIND, UNBIND) Object* object; // Object involved in method call (METHOD_CALL) ObjectId* objectId; // ObjectId for method call (METHOD_CALL) Query* query; // Query parameters (GET_QUERY, START_SYNC) Value* arguments; // Method parameters (METHOD_CALL) char* exchange; // Exchange for bind (BIND, UNBIND) char* bindingKey; // Key for bind (BIND, UNBIND) const SchemaObjectClass* objectClass; // (METHOD_CALL) }; class AgentImpl; /** * Agent - Protocol engine for the QMF agent */ class Agent { public: Agent(char* label, bool internalStore=true); ~Agent(); /** * Configure the directory path for storing persistent data. *@param path Null-terminated string containing a directory path where files can be * created, written, and read. If NULL, no persistent storage will be * attempted. */ void setStoreDir(const char* path); /** * Configure the directory path for files transferred over QMF. *@param path Null-terminated string containing a directory path where files can be * created, deleted, written, and read. If NULL, file transfers shall not * be permitted. */ void setTransferDir(const char* path); /** * Pass messages received from the AMQP session to the Agent engine. *@param message AMQP messages received on the agent session. */ void handleRcvMessage(Message& message); /** * Get the next message to be sent to the AMQP network. *@param item The Message structure describing the message to be produced. *@return true if the Message is valid, false if there are no messages to send. */ bool getXmtMessage(Message& item) const; /** * Remove and discard one message from the head of the transmit queue. */ void popXmt(); /** * Get the next application event from the agent engine. *@param event The event iff the return value is true *@return true if event is valid, false if there are no events to process */ bool getEvent(AgentEvent& event) const; /** * Remove and discard one event from the head of the event queue. */ void popEvent(); /** * A new AMQP session has been established for Agent communication. */ void newSession(); /** * Start the QMF Agent protocol. This should be invoked after a SETUP_COMPLETE event * is received from the Agent engine. */ void startProtocol(); /** * This method is called periodically so the agent can supply a heartbeat. */ void heartbeat(); /** * Respond to a method request. *@param sequence The sequence number from the method request event. *@param status The method's completion status. *@param text Status text ("OK" or an error message) *@param arguments The list of output arguments from the method call. */ void methodResponse(uint32_t sequence, uint32_t status, char* text, const Value& arguments); /** * Send a content indication to the QMF bus. This is only needed for objects that are * managed by the application. This is *NOT* needed for objects managed by the Agent * (inserted using addObject). *@param sequence The sequence number of the GET request or the SYNC_START request. *@param object The object (annotated with "changed" flags) for publication. *@param prop If true, changed object properties are transmitted. *@param stat If true, changed object statistics are transmitted. */ void queryResponse(uint32_t sequence, Object& object, bool prop = true, bool stat = true); /** * Indicate the completion of a query. This is not used for SYNC_START requests. *@param sequence The sequence number of the GET request. */ void queryComplete(uint32_t sequence); /** * Register a schema class with the Agent. *@param cls A SchemaObejctClass object that defines data managed by the agent. */ void registerClass(SchemaObjectClass* cls); /** * Register a schema class with the Agent. *@param cls A SchemaEventClass object that defines events sent by the agent. */ void registerClass(SchemaEventClass* cls); /** * Give an object to the Agent for storage and management. Once added, the agent takes * responsibility for the life cycle of the object. *@param obj The object to be managed by the Agent. *@param persistId A unique non-zero value if the object-id is to be persistent. *@return The objectId of the managed object. */ const ObjectId* addObject(Object& obj, uint64_t persistId); // const ObjectId* addObject(Object& obj, uint32_t persistIdLo, uint32_t persistIdHi); /** * Allocate an object-id for an object that will be managed by the application. *@param persistId A unique non-zero value if the object-id is to be persistent. *@return The objectId structure for the allocated ID. */ const ObjectId* allocObjectId(uint64_t persistId); const ObjectId* allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi); /** * Raise an event into the QMF network.. *@param event The event object for the event to be raised. */ void raiseEvent(Event& event); private: AgentImpl* impl; }; } } #endif qpidc-0.16/include/qmf/engine/Object.h0000664000076400007640000000323711257223366020202 0ustar00jrossjross00000000000000#ifndef _QmfEngineObject_ #define _QmfEngineObject_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include namespace qmf { namespace engine { struct ObjectImpl; class Object { public: Object(const SchemaObjectClass* type); Object(const Object& from); virtual ~Object(); void destroy(); const ObjectId* getObjectId() const; void setObjectId(ObjectId* oid); const SchemaObjectClass* getClass() const; Value* getValue(const char* key) const; void invokeMethod(const char* methodName, const Value* inArgs, void* context) const; bool isDeleted() const; void merge(const Object& from); private: friend struct ObjectImpl; friend class AgentImpl; Object(ObjectImpl* impl); ObjectImpl* impl; }; } } #endif qpidc-0.16/include/qmf/engine/ConnectionSettings.h0000664000076400007640000001252411261436126022606 0ustar00jrossjross00000000000000#ifndef _QmfEngineConnectionSettings_ #define _QmfEngineConnectionSettings_ /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qmf/engine/QmfEngineImportExport.h" #include "qpid/sys/IntegerTypes.h" namespace qmf { namespace engine { class ConnectionSettingsImpl; class Value; /** * Settings for AMQP connections to the broker. * * \ingroup qmfapi */ class ConnectionSettings { public: /** * Create a set of default connection settings. * * If no further attributes are set, the settings will cause a connection to be made to * the default broker (on localhost or at a host/port supplied by service discovery) and * authentication will be the best-available (GSSAPI/Kerberos, Anonymous, Plain with prompts * for username and password). */ QMFE_EXTERN ConnectionSettings(); /** * Create a set of connection settings by URL. * * @param url Universal resource locator describing the broker address and additional attributes. * * The URL is of the form: * amqp[s]://host[:port][?key=value[&key=value]*] * * For example: * amqp://localhost * amqp://broker?transport=rdma&authmech=GSSAPI&authservice=qpidd * amqps://broker?authmech=PLAIN&authuser=guest&authpass=guest */ QMFE_EXTERN ConnectionSettings(const char* url); /** * Copy Constructor. */ ConnectionSettings(const ConnectionSettings& from); /** * Destroy the connection settings object. */ QMFE_EXTERN ~ConnectionSettings(); /** * Set an attribute to control connection setup. * * @param key A null-terminated string that is an attribute name. * * @param value Reference to a value to be stored as the attribute. The type of the value * is specific to the key. * * @return True if success, False if invalid attribute */ QMFE_EXTERN bool setAttr(const char* key, const Value& value); /** * Get the value of an attribute. * * @param key A null-terminated attribute name. * * @return The value associated with the attribute name. */ QMFE_EXTERN Value getAttr(const char* key) const; /** * Get the attribute string (the portion of the URL following the '?') for the settings. * * @return A pointer to the attribute string. If the content of this string needs to be * available beyond the scope of the calling function, it should be copied. The * returned pointer may become invalid if the set of attributes is changed. */ QMFE_EXTERN const char* getAttrString() const; /** * Shortcuts for setting the transport for the connection. * * @param port The port value for the connection address. */ QMFE_EXTERN void transportTcp(uint16_t port = 5672); QMFE_EXTERN void transportSsl(uint16_t port = 5671); QMFE_EXTERN void transportRdma(uint16_t port = 5672); /** * Shortcuts for setting authentication mechanisms. * * @param username Null-terminated authentication user name. * * @param password Null-terminated authentication password. * * @param serviceName Null-terminated GSSAPI service name (Kerberos service principal) * * @param minSsf Minimum security factor for connections. 0 = encryption not required. * * @param maxSsf Maximum security factor for connections. 0 = encryption not permitted. */ QMFE_EXTERN void authAnonymous(const char* username = 0); QMFE_EXTERN void authPlain(const char* username = 0, const char* password = 0); QMFE_EXTERN void authGssapi(const char* serviceName, uint32_t minSsf = 0, uint32_t maxSsf = 256); /** * Shortcut for setting connection retry attributes. * * @param delayMin Minimum delay (in seconds) between connection attempts. * * @param delaxMax Maximum delay (in seconds) between connection attempts. * * @param delayFactor Factor to multiply the delay by between failed connection attempts. */ QMFE_EXTERN void setRetry(int delayMin = 1, int delayMax = 128, int delayFactor = 2); private: friend class ResilientConnectionImpl; ConnectionSettingsImpl* impl; }; } } #endif qpidc-0.16/include/qmf/Schema.h0000664000076400007640000000443511564561152016727 0ustar00jrossjross00000000000000#ifndef QMF_SCHEMA_H #define QMF_SCHEMA_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qpid/sys/IntegerTypes.h" #include "qmf/Handle.h" #include "qmf/SchemaTypes.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class SchemaImpl; class SchemaId; class SchemaProperty; class SchemaMethod; class QMF_CLASS_EXTERN Schema : public qmf::Handle { public: QMF_EXTERN Schema(SchemaImpl* impl = 0); QMF_EXTERN Schema(const Schema&); QMF_EXTERN Schema& operator=(const Schema&); QMF_EXTERN ~Schema(); QMF_EXTERN Schema(int, const std::string&, const std::string&); QMF_EXTERN const SchemaId& getSchemaId() const; QMF_EXTERN void finalize(); QMF_EXTERN bool isFinalized() const; QMF_EXTERN void addProperty(const SchemaProperty&); QMF_EXTERN void addMethod(const SchemaMethod&); QMF_EXTERN void setDesc(const std::string&); QMF_EXTERN const std::string& getDesc() const; QMF_EXTERN void setDefaultSeverity(int); QMF_EXTERN int getDefaultSeverity() const; QMF_EXTERN uint32_t getPropertyCount() const; QMF_EXTERN SchemaProperty getProperty(uint32_t) const; QMF_EXTERN uint32_t getMethodCount() const; QMF_EXTERN SchemaMethod getMethod(uint32_t) const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct SchemaImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/DataAddr.h0000664000076400007640000000410411607071066017162 0ustar00jrossjross00000000000000#ifndef QMF_DATA_ADDR_H #define QMF_DATA_ADDR_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qpid/types/Variant.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class DataAddrImpl; class QMF_CLASS_EXTERN DataAddr : public qmf::Handle { public: QMF_EXTERN DataAddr(DataAddrImpl* impl = 0); QMF_EXTERN DataAddr(const DataAddr&); QMF_EXTERN DataAddr& operator=(const DataAddr&); QMF_EXTERN ~DataAddr(); QMF_EXTERN bool operator==(const DataAddr&); QMF_EXTERN bool operator<(const DataAddr&); QMF_EXTERN DataAddr(const qpid::types::Variant::Map&); QMF_EXTERN DataAddr(const std::string& name, const std::string& agentName, uint32_t agentEpoch=0); QMF_EXTERN const std::string& getName() const; QMF_EXTERN const std::string& getAgentName() const; QMF_EXTERN uint32_t getAgentEpoch() const; QMF_EXTERN qpid::types::Variant::Map asMap() const; QMF_EXTERN bool operator==(const DataAddr&) const; QMF_EXTERN bool operator<(const DataAddr&) const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct DataAddrImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/ImportExport.h0000664000076400007640000000230311564561152020173 0ustar00jrossjross00000000000000#ifndef QMF_IMPORT_EXPORT_H #define QMF_IMPORT_EXPORT_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include "qpid/ImportExport.h" #if defined(QMF_EXPORT) || defined (qmf2_EXPORTS) # define QMF_EXTERN QPID_EXPORT # define QMF_CLASS_EXTERN QPID_CLASS_EXPORT # define QMF_INLINE_EXTERN QPID_INLINE_EXPORT #else # define QMF_EXTERN QPID_IMPORT # define QMF_CLASS_EXTERN QPID_CLASS_IMPORT # define QMF_INLINE_EXTERN QPID_INLINE_IMPORT #endif #endif qpidc-0.16/include/qmf/SchemaTypes.h0000664000076400007640000000323211431072571017741 0ustar00jrossjross00000000000000#ifndef QMF_SCHEMA_TYPES_H #define QMF_SCHEMA_TYPES_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace qmf { const int SCHEMA_TYPE_DATA = 1; const int SCHEMA_TYPE_EVENT = 2; const int SCHEMA_DATA_VOID = 1; const int SCHEMA_DATA_BOOL = 2; const int SCHEMA_DATA_INT = 3; const int SCHEMA_DATA_FLOAT = 4; const int SCHEMA_DATA_STRING = 5; const int SCHEMA_DATA_MAP = 6; const int SCHEMA_DATA_LIST = 7; const int SCHEMA_DATA_UUID = 8; const int ACCESS_READ_CREATE = 1; const int ACCESS_READ_WRITE = 2; const int ACCESS_READ_ONLY = 3; const int DIR_IN = 1; const int DIR_OUT = 2; const int DIR_IN_OUT = 3; const int SEV_EMERG = 0; const int SEV_ALERT = 1; const int SEV_CRIT = 2; const int SEV_ERROR = 3; const int SEV_WARN = 4; const int SEV_NOTICE = 5; const int SEV_INFORM = 6; const int SEV_DEBUG = 7; } #endif qpidc-0.16/include/qmf/Handle.h0000664000076400007640000000423711564561152016722 0ustar00jrossjross00000000000000#ifndef QMF_HANDLE_H #define QMF_HANDLE_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include "qmf/ImportExport.h" namespace qmf { template class PrivateImplRef; /** \ingroup qmf * A handle is like a pointer: refers to an underlying implementation object. * Copying the handle does not copy the object. * * Handles can be null, like a 0 pointer. Use isValid(), isNull() or the * conversion to bool to test for a null handle. */ template class Handle { public: /**@return true if handle is valid, i.e. not null. */ QMF_INLINE_EXTERN bool isValid() const { return impl; } /**@return true if handle is null. It is an error to call any function on a null handle. */ QMF_INLINE_EXTERN bool isNull() const { return !impl; } /** Conversion to bool supports idiom if (handle) { handle->... } */ QMF_INLINE_EXTERN operator bool() const { return impl; } /** Operator ! supports idiom if (!handle) { do_if_handle_is_null(); } */ QMF_INLINE_EXTERN bool operator !() const { return !impl; } void swap(Handle& h) { T* t = h.impl; h.impl = impl; impl = t; } protected: typedef T Impl; QMF_INLINE_EXTERN Handle() :impl() {} // Not implemented,subclasses must implement. QMF_EXTERN Handle(const Handle&); QMF_EXTERN Handle& operator=(const Handle&); Impl* impl; friend class PrivateImplRef; }; } // namespace qmf #endif /*!QMF_HANDLE_H*/ qpidc-0.16/include/qmf/ConsoleSession.h0000664000076400007640000001412011633730116020460 0ustar00jrossjross00000000000000#ifndef QMF_CONSOLE_SESSION_H #define QMF_CONSOLE_SESSION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qmf/Agent.h" #include "qmf/Subscription.h" #include "qpid/messaging/Duration.h" #include "qpid/messaging/Connection.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class ConsoleSessionImpl; class ConsoleEvent; class QMF_CLASS_EXTERN ConsoleSession : public qmf::Handle { public: QMF_EXTERN ConsoleSession(ConsoleSessionImpl* impl = 0); QMF_EXTERN ConsoleSession(const ConsoleSession&); QMF_EXTERN ConsoleSession& operator=(const ConsoleSession&); QMF_EXTERN ~ConsoleSession(); /** * ConsoleSession * A session that runs over an AMQP connection for QMF console operation. * * @param connection - An opened qpid::messaging::Connection * @param options - An optional string containing options * * The options string is of the form "{key:value,key:value}". The following keys are supported: * * domain:NAME - QMF Domain to join [default: "default"] * max-agent-age:N - Maximum time, in minutes, that we will tolerate not hearing from * an agent before deleting it [default: 5] * listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default] * If False: Listen only on the routable direct address * strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network * - If False: Operate more flexibly with regard to use of messaging facilities [default] * max-thread-wait-time:N - Time (in seconds) the session thread will wait for messages from the network between * periodic background processing passes. * Must not be greater than 60. Larger numbers will cause fewer wake-ups but will * increase the time it takes to shut down the process. [default: 5] */ QMF_EXTERN ConsoleSession(qpid::messaging::Connection& conn, const std::string& options=""); /** * setDomain - Change the QMF domain that this console will operate in. If this is not called, * the domain will be "default". Agents in a domain can be seen only by consoles in the same domain. * This must be called prior to opening the console session. */ QMF_EXTERN void setDomain(const std::string& domain); QMF_EXTERN void setAgentFilter(const std::string& filter); /** * Open the console session. After opening the session, the domain cannot be changed. */ QMF_EXTERN void open(); /** * Close the session. Once closed, the session no longer communicates on the messaging network. */ QMF_EXTERN void close(); /** * Get the next event from the console session. Events represent actions that must be acted upon by the * console application. This method blocks for up to the timeout if there are no events to be handled. * This method will typically be the focus of the console application's main execution loop. * If the timeout is set to Duration::IMMEDIATE, the call will not block. */ QMF_EXTERN bool nextEvent(ConsoleEvent& outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER); /** * Return the number of events pending for nextEvent. This method will never block. */ QMF_EXTERN int pendingEvents() const; /** * getAgentCount, getAgent - Retrieve the set of agents that match the console session's agent filter. */ QMF_EXTERN uint32_t getAgentCount() const; QMF_EXTERN Agent getAgent(uint32_t agentIndex) const; /** * Get the agent for the connected broker (i.e. the agent embedded in the broker to which we have a connection). */ QMF_EXTERN Agent getConnectedBrokerAgent() const; /** * Create a subscription that involves a subset of the known agents. The set of known agents is defined by * the session's agent-filter (see setAgentFilter). The agentFilter argument to the subscribe method is used * to further refine the set of agents. If agentFilter is the empty string (i.e. match-all) the subscription * will involve all known agents. If agentFilter is non-empty, it will be applied only to the set of known * agents. A subscription cannot be created that involves an agent not known by the session. */ QMF_EXTERN Subscription subscribe(const Query& query, const std::string& agentFilter = "", const std::string& options = ""); QMF_EXTERN Subscription subscribe(const std::string& query, const std::string& agentFilter = "", const std::string& options = ""); #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct ConsoleSessionImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/posix/0000775000076400007640000000000011752725714016517 5ustar00jrossjross00000000000000qpidc-0.16/include/qmf/posix/EventNotifier.h0000664000076400007640000000346711634657177021471 0ustar00jrossjross00000000000000#ifndef __QMF_POSIX_EVENT_NOTIFIER_H #define __QMF_POSIX_EVENT_NOTIFIER_H /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include "qmf/Handle.h" #include "qmf/AgentSession.h" #include "qmf/ConsoleSession.h" namespace qmf { class PosixEventNotifierImpl; class PosixEventNotifierImplAccess; namespace posix { #ifndef SWIG template class PrivateImplRef; #endif class QMF_CLASS_EXTERN EventNotifier : public qmf::Handle { public: QMF_EXTERN EventNotifier(PosixEventNotifierImpl* impl = 0); QMF_EXTERN EventNotifier(::qmf::AgentSession& agentSession); QMF_EXTERN EventNotifier(::qmf::ConsoleSession& consoleSession); QMF_EXTERN EventNotifier(const EventNotifier& that); QMF_EXTERN ~EventNotifier(); QMF_EXTERN EventNotifier& operator=(const EventNotifier& that); QMF_EXTERN int getHandle() const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct qmf::PosixEventNotifierImplAccess; #endif }; }} #endif qpidc-0.16/include/qmf/Query.h0000664000076400007640000000446111564561152016633 0ustar00jrossjross00000000000000#ifndef QMF_QUERY_H #define QMF_QUERY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qpid/types/Variant.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class QueryImpl; class SchemaId; class DataAddr; enum QueryTarget { QUERY_OBJECT = 1, QUERY_OBJECT_ID = 2, QUERY_SCHEMA = 3, QUERY_SCHEMA_ID = 4 }; class QMF_CLASS_EXTERN Query : public qmf::Handle { public: QMF_EXTERN Query(QueryImpl* impl = 0); QMF_EXTERN Query(const Query&); QMF_EXTERN Query& operator=(const Query&); QMF_EXTERN ~Query(); QMF_EXTERN Query(QueryTarget, const std::string& predicate=""); QMF_EXTERN Query(QueryTarget, const std::string& className, const std::string& package, const std::string& predicate=""); QMF_EXTERN Query(QueryTarget, const SchemaId&, const std::string& predicate=""); QMF_EXTERN Query(const DataAddr&); QMF_EXTERN QueryTarget getTarget() const; QMF_EXTERN const DataAddr& getDataAddr() const; QMF_EXTERN const SchemaId& getSchemaId() const; QMF_EXTERN void setPredicate(const qpid::types::Variant::List&); QMF_EXTERN const qpid::types::Variant::List& getPredicate() const; QMF_EXTERN bool matchesPredicate(const qpid::types::Variant::Map& map) const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct QueryImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/Data.h0000664000076400007640000000430111564561152016370 0ustar00jrossjross00000000000000#ifndef QMF_DATA_H #define QMF_DATA_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qmf/exceptions.h" #include "qpid/types/Variant.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class DataImpl; class Schema; class SchemaId; class DataAddr; class Agent; class QMF_CLASS_EXTERN Data : public qmf::Handle { public: QMF_EXTERN Data(DataImpl* impl = 0); QMF_EXTERN Data(const Data&); QMF_EXTERN Data& operator=(const Data&); QMF_EXTERN ~Data(); QMF_EXTERN Data(const Schema&); QMF_EXTERN void setAddr(const DataAddr&); QMF_EXTERN void setProperty(const std::string&, const qpid::types::Variant&); QMF_EXTERN void overwriteProperties(const qpid::types::Variant::Map&); QMF_EXTERN bool hasSchema() const; QMF_EXTERN bool hasAddr() const; QMF_EXTERN const SchemaId& getSchemaId() const; QMF_EXTERN const DataAddr& getAddr() const; QMF_EXTERN const qpid::types::Variant& getProperty(const std::string&) const; QMF_EXTERN const qpid::types::Variant::Map& getProperties() const; QMF_EXTERN bool hasAgent() const; QMF_EXTERN const Agent& getAgent() const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct DataImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/Agent.h0000664000076400007640000001307311564561152016563 0ustar00jrossjross00000000000000#ifndef QMF_AGENT_H #define QMF_AGENT_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" //#include "qmf/Subscription.h" #include "qmf/exceptions.h" #include "qpid/messaging/Duration.h" #include "qpid/types/Variant.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class AgentImpl; class ConsoleEvent; class Query; class DataAddr; class SchemaId; class Schema; class QMF_CLASS_EXTERN Agent : public qmf::Handle { public: QMF_EXTERN Agent(AgentImpl* impl = 0); QMF_EXTERN Agent(const Agent&); QMF_EXTERN Agent& operator=(const Agent&); QMF_EXTERN ~Agent(); QMF_EXTERN std::string getName() const; QMF_EXTERN uint32_t getEpoch() const; QMF_EXTERN std::string getVendor() const; QMF_EXTERN std::string getProduct() const; QMF_EXTERN std::string getInstance() const; QMF_EXTERN const qpid::types::Variant& getAttribute(const std::string&) const; QMF_EXTERN const qpid::types::Variant::Map& getAttributes() const; QMF_EXTERN ConsoleEvent query(const Query&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE); QMF_EXTERN ConsoleEvent query(const std::string&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE); QMF_EXTERN uint32_t queryAsync(const Query&); QMF_EXTERN uint32_t queryAsync(const std::string&); /** * Create a subscription to this agent */ //QMF_EXTERN Subscription subscribe(const Query&, const std::string& options = ""); //QMF_EXTERN Subscription subscribe(const std::string&, const std::string& options = ""); QMF_EXTERN ConsoleEvent callMethod(const std::string&, const qpid::types::Variant::Map&, const DataAddr&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE); QMF_EXTERN uint32_t callMethodAsync(const std::string&, const qpid::types::Variant::Map&, const DataAddr&); /** * Query the agent for a list of schema classes that it exposes. This operation comes in both * synchronous (blocking) and asynchronous flavors. * * This method will typically be used after receiving an AGENT_SCHEMA_UPDATE event from the console session. * It may also be used on a newly discovered agent to learn what schemata are exposed. * * querySchema returns a ConsoleEvent that contains a list of SchemaId objects exposed by the agent. * This list is cached locally and can be locally queried using getPackage[Count] and getSchemaId[Count]. */ QMF_EXTERN ConsoleEvent querySchema(qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE); QMF_EXTERN uint32_t querySchemaAsync(); /** * Get the list of schema packages exposed by the agent. * * getPackageCount returns the number of packages exposed. * getPackage returns the name of the package by index (0..package-count) * * Note that both of these calls are synchronous and non-blocking. They only return locally cached data * and will not send any messages to the remote agent. Use querySchema[Async] to get the latest schema * information from the remote agent. */ QMF_EXTERN uint32_t getPackageCount() const; QMF_EXTERN const std::string& getPackage(uint32_t) const; /** * Get the list of schema identifiers for a particular package. * * getSchemaIdCount returns the number of IDs in the indicates package. * getSchemaId returns the SchemaId by index (0..schema-id-count) * * Note that both of these calls are synchronous and non-blocking. They only return locally cached data * and will not send any messages to the remote agent. Use querySchema[Async] to get the latest schema * information from the remote agent. */ QMF_EXTERN uint32_t getSchemaIdCount(const std::string&) const; QMF_EXTERN SchemaId getSchemaId(const std::string&, uint32_t) const; /** * Get detailed schema information for a specified schema ID. * * This call will return cached information if it is available. If not, it will send a query message to the * remote agent and block waiting for a response. The timeout argument specifies the maximum time to wait * for a response from the agent. */ QMF_EXTERN Schema getSchema(const SchemaId&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE); #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct AgentImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/SchemaProperty.h0000664000076400007640000000466311564561152020477 0ustar00jrossjross00000000000000#ifndef QMF_SCHEMA_PROPERTY_H #define QMF_SCHEMA_PROPERTY_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qpid/types/Uuid.h" #include "qpid/types/Variant.h" #include "qmf/SchemaTypes.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class SchemaPropertyImpl; class QMF_CLASS_EXTERN SchemaProperty : public Handle { public: QMF_EXTERN SchemaProperty(SchemaPropertyImpl* impl = 0); QMF_EXTERN SchemaProperty(const SchemaProperty&); QMF_EXTERN SchemaProperty& operator=(const SchemaProperty&); QMF_EXTERN ~SchemaProperty(); QMF_EXTERN SchemaProperty(const std::string&, int, const std::string& o=""); QMF_EXTERN void setAccess(int); QMF_EXTERN void setIndex(bool); QMF_EXTERN void setOptional(bool); QMF_EXTERN void setUnit(const std::string&); QMF_EXTERN void setDesc(const std::string&); QMF_EXTERN void setSubtype(const std::string&); QMF_EXTERN void setDirection(int); QMF_EXTERN const std::string& getName() const; QMF_EXTERN int getType() const; QMF_EXTERN int getAccess() const; QMF_EXTERN bool isIndex() const; QMF_EXTERN bool isOptional() const; QMF_EXTERN const std::string& getUnit() const; QMF_EXTERN const std::string& getDesc() const; QMF_EXTERN const std::string& getSubtype() const; QMF_EXTERN int getDirection() const; #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct SchemaPropertyImplAccess; #endif }; } #endif qpidc-0.16/include/qmf/AgentSession.h0000664000076400007640000002301011633730116020112 0ustar00jrossjross00000000000000#ifndef QMF_AGENT_SESSION_H #define QMF_AGENT_SESSION_H /* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ #include #include "qmf/Handle.h" #include "qpid/messaging/Duration.h" #include "qpid/messaging/Connection.h" #include "qpid/types/Variant.h" #include namespace qmf { #ifndef SWIG template class PrivateImplRef; #endif class AgentSessionImpl; class AgentEvent; class Schema; class Data; class DataAddr; class QMF_CLASS_EXTERN AgentSession : public qmf::Handle { public: QMF_EXTERN AgentSession(AgentSessionImpl* impl = 0); QMF_EXTERN AgentSession(const AgentSession&); QMF_EXTERN AgentSession& operator=(const AgentSession&); QMF_EXTERN ~AgentSession(); /** * AgentSession * A session that runs over an AMQP connection for QMF agent operation. * * @param connection - An opened qpid::messaging::Connection * @param options - An optional string containing options * * The options string is of the form "{key:value,key:value}". The following keys are supported: * * interval:N - Heartbeat interval in seconds [default: 60] * external:{True,False} - Use external data storage (queries and subscriptions are pass-through) [default: False] * allow-queries:{True,False} - If True: automatically allow all queries [default] * If False: generate an AUTH_QUERY event to allow per-query authorization * allow-methods:{True,False} - If True: automatically allow all methods [default] * If False: generate an AUTH_METHOD event to allow per-method authorization * max-subscriptions:N - Maximum number of concurrent subscription queries permitted [default: 64] * min-sub-interval:N - Minimum publish interval (in milliseconds) permitted for a subscription [default: 3000] * sub-lifetime:N - Lifetime (in seconds with no keepalive) for a subscription [default: 300] * public-events:{True,False} - If True: QMF events are sent to the topic exchange [default] * If False: QMF events are only sent to authorized subscribers * listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default] * If False: Listen only on the routable direct address * strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network * - If False: Operate more flexibly with regard to use of messaging facilities [default] * max-thread-wait-time:N - Time (in seconds) the session thread will wait for messages from the network between * periodic background processing passes. [default: 5] * Must not be greater than 'interval'. Larger numbers will cause fewer wake-ups but will * increase the time it takes to shut down the process. This setting will not affect the * agent's response time for queries or method invocation. */ QMF_EXTERN AgentSession(qpid::messaging::Connection& conn, const std::string& options=""); /** * setDomain - Change the QMF domain that this agent will operate in. If this is not called, * the domain will be "default". Agents in a domain can be seen only by consoles in the same domain. * This must be called prior to opening the agent session. */ QMF_EXTERN void setDomain(const std::string& domain); /** * Set identifying attributes of this agent. * setVendor - Set the vendor string * setProduct - Set the product name string * setInstance - Set the unique instance name (if not set, a UUID will be assigned) * These must be called prior to opening the agent session. */ QMF_EXTERN void setVendor(const std::string& vendor); QMF_EXTERN void setProduct(const std::string& product); QMF_EXTERN void setInstance(const std::string& instance); /** * setAttribute - Set an arbitrary attribute for this agent. The attributes are not used * to uniquely identify the agent but can be used as a search criteria when looking for agents. * This must be called prior to opening the agent session. */ QMF_EXTERN void setAttribute(const std::string& key, const qpid::types::Variant& value); /** * Get the identifying name of the agent. */ QMF_EXTERN const std::string& getName() const; /** * Open the agent session. After opening the session, the domain, identifying strings, and attributes cannot * be changed. */ QMF_EXTERN void open(); /** * Close the session. Once closed, the session no longer communicates on the messaging network. */ QMF_EXTERN void close(); /** * Get the next event from the agent session. Events represent actions that must be acted upon by the * agent application. This method blocks for up to the timeout if there are no events to be handled. * This method will typically be the focus of the agent application's main execution loop. * If the timeout is set to Duration::IMMEDIATE, the call will not block. */ QMF_EXTERN bool nextEvent(AgentEvent& outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER); /** * Return the number of events pending for nextEvent. This method will never block. */ QMF_EXTERN int pendingEvents() const; /** * Register a schema to be exposed by this agent. */ QMF_EXTERN void registerSchema(Schema& schema); /** * Add data to be managed internally by the agent. If the option external:True is selected, this call * should not be used. * * @param data - The data object being managed by the agent. * @param name - A name unique to this object to be used to address the object. * If left default, a unique name will be assigned by the agent. * @param persistent - Set this to true if the data object is to be considered persistent * across different sessions. If persistent, it is the agent application's * responsibility to ensure the name is the same each time it is added. */ QMF_EXTERN DataAddr addData(Data& data, const std::string& name="", bool persistent=false); /** * Delete data from internal agent management. */ QMF_EXTERN void delData(const DataAddr& dataAddr); /** * The following methods are used to respond to events received in nextEvent. * * authAccept - Accept an authorization request. * authReject - Reject/forbid an authorization request. * raiseException - indicate failure of an operation (i.e. query or method call). * response - Provide data in response to a query (only for option: external:True) * complete - Indicate that the response to a query is complete (external:True only) * methodSuccess - Indicate the successful completion of a method call. */ QMF_EXTERN void authAccept(AgentEvent& event); QMF_EXTERN void authReject(AgentEvent& event, const std::string& diag=""); QMF_EXTERN void raiseException(AgentEvent& event, const std::string& errorText); QMF_EXTERN void raiseException(AgentEvent& event, const Data& errorData); QMF_EXTERN void response(AgentEvent& event, const Data& responseData); QMF_EXTERN void complete(AgentEvent& event); QMF_EXTERN void methodSuccess(AgentEvent& event); /** * Raise an event to be sent into the QMF network. * * @param data - A data object that contains the event contents. * @param severity - Explicit severity (from qmf/SchemaTypes.h). If omitted, the severity is set to * the default severity for the data's schema. If the data has no schema, the severity defaults * to SEV_NOTICE. */ QMF_EXTERN void raiseEvent(const Data& data); QMF_EXTERN void raiseEvent(const Data& data, int severity); #ifndef SWIG private: friend class qmf::PrivateImplRef; friend struct AgentSessionImplAccess; #endif }; } #endif qpidc-0.16/packaging/0000775000076400007640000000000011752725673015077 5ustar00jrossjross00000000000000qpidc-0.16/packaging/NSIS/0000775000076400007640000000000011752725652015650 5ustar00jrossjross00000000000000qpidc-0.16/packaging/NSIS/Makefile.am0000664000076400007640000000156311320735437017702 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # EXTRA_DIST = \ qpid-icon.ico qpid-icon.png qpid-install-banner.bmp qpid-install-banner.png qpidc-0.16/packaging/NSIS/qpid-install-banner.bmp0000664000076400007640000002301611263471472022211 0ustar00jrossjross00000000000000BM&6(–9Ø!  Ÿ³¯óŒZ£?>AÌÌÌKyxwy¨¨© poq^\G&)!¿Â³M ÄÞÞÞufÚJIKoÚûÿú ™€´´µ#"&Vª‡†ˆQ'?Bƒ«÷÷÷< ŒfffÛåñ11:…ÅØhPÙ ^;„‰³Ô‘’ÈÓØäæù]Gµ…jßÀÀÁW]f"ŒŠŒONQjjlµÒÞÙàôK/Ç¡ ¢.-0&%)æææ&(K— ëF‘ff“N!ÛÅÅέ¤ðN&Hp-VRQS!!v‰ÞŽÐàæe$]\_E<™õ÷íQ'ƾÀèX­:9< W(=FEH::B((- Ÿ¡e]èYj>¶JšµZ5ÏîîïUTW[¤! #ÖÖÖZZ\™™™ŒŒ­­®BACV»””•MLOYGݺ¹º°ª¡òÿúj$€bd~€K%Í[)Þ47O PÏ[A658X4Äs+eÅÅÆ„ƒ…srt333ÿÿÿXµS>½_^`áìóV%LÐäèŠráQdc¡c±U.Ö`)>½½¾÷øü)(*¥¥¦ÐÐÑBBJ{z|µµ½ZRZ piÜd!’ÛÛõÌÃί¬íÖÛêW"ÌR&I}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\\\\}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}a766`}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}`}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}0'`}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}0'`}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}0'`}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}0'`}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}2H}}0'`}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}l!Zƒ}}0'`}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}F%}}}0'`}}\}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}5 0PPSJŒ}}}}}™"*)}}}0'`dD6v1}}}}}}}}}e0}}}}}}}z{og,}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}]_::ŠŠ:|o}}œY=›}}}}0'ŽS_____}}}}}}}D#'sc}}}}}`€_:::::v,‹€}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}yh:ŠŠŠŠ_77:/N[n}}}}0'77'_Š:'77‹D\}}}}}}aŠ7:G}}}}dŠŠŠŠe7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}cŠŠ77':P0€aS6Š_7;9MX-w3}}}}}0'77Š6&`yge‹]}}}}}aŠ7:G}}}77a1]U:'77}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}‹_7Sg`}}}}\,’6;rˆ.‚t}}}}}}0'7e}}}}}cŠ#}}}}}aŠ7:G}}8Ž7_1}}}8}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}‹77:Pd}}}}}}}}}}}L>pIžK }}}}}}0''}}}}}}}}g7_`}}}}aŠ7:G}}{‹7ŠV}}}}}}}}7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}‹77:1\}}}}}}}}}}}}Aq˜Bf _`}}}}}0'`}}}}}}}}}a7:1}}}}aŠ7:G}8Ž_7:o}}}}}}}}}yŠ7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}j::}}}}}}}}}}}}}„ mO4U_S}}}}0'`}}}}}}}}}ŠŽ8}}}aŠ7:G}:7_6\}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}P'7: }}}}}}}}}}}}}+~xRW(P'7‹g}}}}0'`}}}}}}}}}}'7}}}aŠ7:G}7}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}b‹7'}}}}}}}}}}}}^C‰†i}y'6\}}}0'`}}}}}}}}}}7:z}}}aŠ7:&}aŠ7:g}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}P'7,}}}}}}}}}}}}u…‡—}}}:7‹b}}}0'`}}}}}}}}}}b:71}}}aŠ7:&}'7}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},7ŠD}}}}}}}}}}}}}k $?<}}}}__Š}}}0'`}}}}}}}}}}57ŠJ}}}aŠ7:&}e'7j}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}o:7:}}}}}}}}}}}gš)}}}}}}}€}}0'`}}}}}}}}}}V:7ŠJ}}}aŠ7:&}h'7j}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}0Š_7}}}}}}}}}}}}L}}}}}}}}V:7d}}0'`}}}}}}}}}}:71}}}aŠ7:G}J7:}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}ve}}}}}}}}}}}}}}}}}}}}}}}}}':}}0'`}}}}}}}}}}7:}}}aŠ7:G}:7}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}Ž_Ša}}}}}}}}}}}}}}}}}}}}}}}}}7_{}}0'`}}}}}}}}}|_7:d}}}aŠ7:G}j7}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}7_}}}}}}}}}}}}}}}}}}}}}}}}}\6_1}}0'`}}}}}}}}}V:7__}}}aŠ7:G}|7d}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}7_ŠJ}}}}}}}}}}}}}}}}}}}}}}}}}8Ž_ }}0'}}}}}}}}`Ž_7€}}}}aŠ7:G}}c‹7|\}}}}}}}}yŠ7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\|_'S}}}}}}}}}}}}}}}}}}}}}}}}}:}}0'7'\}}}}}}j6'7_Š}}}}J7:G}}\v'7\}}}}}}} Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}S'_U8}}}}}}}}}}}}}}}}}}}}}}}}:7:5}}0'77|ojj&DŠ77#c0'7:G}}},_7v\}}}77}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} 7}}}}}}}}}}}}}}}}}}}}}}}}1'}}0'77'''Š#1},‹:G}}}}V‹_7|]€D7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}:7€}}}}}}}}}}}}}}}}}}}}}}}\U_P}}es:Šg‹Š___Š‹_G}},777:G}}}}}ŠŠŠ_Š77}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}\6__'`}}}}}}}}}}}}}}}}}}}}}}c:7:o}}}& {baP66|h}}}Œs}}}}}}`J::'€b_7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}:7]}}}}}}}}}}}}}}}}}}}}}`}}}}}}}}}}}88\}}}}}}8ddddddd`}}}}}}}}`5o{V}Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}:&}}}}}}}}}}}}}}}}}}}}hŠ7:1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}G‹7}}}}}}}}}}}}}}}}}}:778}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}0:7_&}}}}}}}}}}}}}}}\a:77‹d}}}}}}}}}}}}}}}}}}}}}}}}}}}}z0ahŒ}}}}}}}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}8v7:a}}}}}}}}}}}}d|77‹z}}}}}}}}}}}}}}}}}}}}}}}}}}}}}0•ŠQ}}}}}}}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}v77j\}}}}}}85h7_‹’}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}aŠ7:}}}}}}}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}80‹_7|]{1hŽŠ77ŠŠ&}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}hQ:5}}}}}}}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}c_:_77_Š'_77'‹ey}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}dGgc`}}}}}}}}}}}}}}}},Š7}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}{7:_':V}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}jQ:Q]}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}8V€P7'''_6’Œ}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}bbbj}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}yy`8}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}qpidc-0.16/packaging/NSIS/qpid-icon.png0000664000076400007640000027731011263223637020244 0ustar00jrossjross00000000000000‰PNG  IHDR\r¨fsBIT|dˆ pHYs  ÒÝ~ütEXtCreation Time10/07/096|gãtEXtSoftwareAdobe FireworksO³NMprVWxœíZ[lWþ×{ó®/ãËÚ›Y¯‰“·iê±wÚŸ™Ýi+ T J­ ŠJP]AEÚ¨È[RáhU? P‹Ú*D­@-Ôh …FM —&m.Îűã8¾.ÿ¹Ì^g×cÇu_r¼ïܾÿÿÏ?çðòï/Ã8P #…<~æ ã¹B_ZAË4­¹hyvEž½óùñ|>G?ÆÇóãø–Ïçs¹|NËk¹¼¦å!—žÇ+Ø{|<7>®Ñkñ;—Ïiøk\ËkÚ8äÆA£‡ñ{çržÇœ¦å`<¹h;ª±·¦þiÀþö5úLœþ9üóøßŸ=yâ$¼ðüó{¦¦¦ s—#£#»C¹Û†‡á–[wÀââ~äÚÚÚà™gž£GîžñBD’[`*¼×&`Âà]¼ޥ밹à‡6üž[ø"0 ¯­K×–f ° h! ¶ßÞM0»4 ù«#3oÁ‚,--Àµ…KÐìmƒPp;Ì…a2Øü8ëxß¿ï^ƒ¿¿÷ýö<üõųpþw—¡ý x÷ÈóðÎO>ýìŸãÇC86{(é p—uôDzrûü}}}ðÒ‹/}>tuzÎ|ø!|ê¾Ï€ÿ¡+M„ú{àOCðèû„øŸg:šB y‚0¹|f Wa © ‚ž&x 0³4gÏBW`z›‡À‹Ï˜]ºs…k0½t&æOCȆx(ÍMa( Ü&=Ëp©0ç—§`yšaÞBÙ!x® ‚Ç–Àó§Yð¿~æÞ: §Î^ÿ¶èöY|ã øÞSOAk[Ûî¹¹9èï¿ÿ4„z¿I–áÏo¾¹ÛŽ;Ÿ+Â!€H;tü:ž+3p9P€>œ.ªÁùœ"?tA +@¡°§/ _\™?…d·AY›Ã©šY„ ߢóçõz¡³³ ~ñ þ^hõvA j–6¾)•€3K³Ðö.Ó²w£á¡{~䈢©VèNwm8>œ†Yˆz;¡ ­íüÂù Ç÷·B[ó–iôûݿڻ%IUT‡ª&vJÒ*€>bª)~¼M~4ÖU`«*1Ó#c覡guÃ2Ó!š²xðÁ}ߥö×ÝÝ/ÿòe·÷!×þ¥MBŒ 2Ÿ%$£áÄߪâö9èC/ÌŸnBItRn†¤ši3ÍQ:²­?ðMLBOªî¤01ñî{îÙsÑ‹³½ÇübÈ9Ã3(²Îè0LI„žG’ºÝÐîk‡Œ†=Ú›Væ_aFŽ‘Õ*ŸIDœÁ™p1 …0œ÷ÎÃÜò$ Ͱ’’‰rK1(§i!*Â_Ⱦ!hLgGVš…Û[`!î…Sï½ÿöú`{ã«UÝbH\ˆlÒ7?@éÊÒŸé"uHŽ¥6~"zý%LZàƒ9ôD§]«0=£O¸” JÝDö-Â1!B7„ŽX¤¡áÀþÇàðáÃ{Ð]¸ÐˆyäÊÖ °Ó|ƒÂQÆqV2ÜQY.F­ÊØXS‹S˜–ƒþ`:‚u/Ù×M>ßYμ«iL ÐõHŒÃïÀ‰'à“÷Þ»ï"­mºèVX„Ëls¶ÇÌòØdd‘§z=è\ÆÚ UÁ_ËÓ=.÷²·‡ÄŒ…£ãíµw_ñÌaa6[—ƒü Îðg¬èËG17aq«æþ_½ö:´Þýúuèíí…þ¨†~‹ÙÉ `õðL€ÂÒ'TŸõ@_‹L='ç?€…š›Ó<àõ`-ð(Ž˜ÛªVs­X÷µdî„©XxþõŸÊ³Ôò3Ô„Œµ _`;"ÕŠðt:šæa'¿ýjUþED`gù†«tÎiH"ZSKª€Ç1´)Ì>–§Ñ”ô»v,wÒ]×c³.ÐÓ5*xervóÏ=á‡o UœqžÊßÉvÝm>Ð!Uª`;Z .c°\˜ƒ‹ñGÁO !¼µN>ž±´3V `^{õUü…}ø³³ü±ÃÖ9ÊÀóÂ% g+$¹< — ×àba. +*ÿŠ˜1–_ßÍÁ­þ/îÙO~çɇËd#ÙèÆŠI¼›±ÅΞ¬ a.ÏcÍíÍž0L,ObPJš¹l£n갺Ѯ‹8Tõ¸W^ù Äd¶ î–Å?•Æmaþ7O]¹x˜E*Äy¦iÎL-ÀÄéY˜¾T:^ŒÛ7äzJC˜£¡tÔ“¨þ‰E,./‘ÿ]ƒ}Tu?Ž]"ªäÐþû9¸W9´ÿë}ƒ*ž¸Í°#ß õ“ë‘0iÝÂTP)DÌ'¾’K~õàÁDU¿]<‘ÊØq·ìê$yÝà)SÔÒe.µ¾HWMR[²¬}ì¢!æ€ÝÍ?€õäŸ=”c®ðEsuýæÏ‚ÝðÏ epõŸXšÉ;Ó+᫬yi:ÖÌkív”|j=|î«Yõ»æº¯zH¢KŒª]Â)árü¬.ºéë…ßECŠIÛ¸†#~9ÿ+xw}ãË'Ë3ººøÔLMÞøZ/|•ñÄòŠMuðY×B++ d7c^Ê;¸øàô®Jü°¾Š 9JÍ“j P9•ÒæúH¼w[~êóO'ˬÎ …ú¸þº(¢˜-ç¨.¾D;Vb©Ç >ŠÀR%e§"µÖ¹€£³Õ«uñòÎ+¦2rS€y•º¹­YîvZF“x)4” ´>>*€n7`ÜáS¥7ÞÛäà³Ô,G/÷~ð•bç:c¸rÁTø» ’’ûârhKD÷žTöëãCÙb–+ ”6+;¥nÓH%å¾é¨<›Õo•Ci€¯òÖkÖm ’¤~ïÖÔ(É"IYŽuWÔMl ‚êžYÑKj€/QOÅ+`Ss#€Þ[“££)‹Œ Åû‚‘2Ô4k• E|&º–KvwE@÷­r) Fjt'!ZTC‰V¾|]¸r2á‹uÖÿrç@–wÈ£)Fj³YáºÇrÿй,ƒWãã]bM7ë6 zãr_29D•`(‰èä`ŠU¬|«ÔˆÚ¡NÐ4Ü÷½}±2S‚1$ Ö£ <˜3Û¯Žf ñyÂÊm–¤Ý©€$ÇåÉѤ@%ôжîLãKl½×ì¦ËDÔ‹$Q )r<ˆHc¬û¬óU*¿TœxG|ØfÙK7”wÛ³¼(uª)bŒ¢/l‰~‚¥\&[3®hÌ?_»^ ¿ë…¶Ê!QäÔ:‚!5Å⹞©¾v%|ÉöZ†ƒòÔ•€oÞ‘”©¢#Äé0mý«¹%|ÚA¯UlÄ»,ºcÌ“Y‚FŽ% ¾úäðø•ðíÎ9Ä® )ÔtcTY'ÅáÞ•ñAÔl4²4w"bÌv˜$)Çä¨ZíxÝã7 »/ÜŠÀ‹°8hT±Š®ïªðùúÛë#´Ð`FE;H&o×Çh>Ýåh½nð9¨@Ââ¯ÔJûè&’¡$îÈÜ‘ŒË›œïp…Ï0ˆð„bJƒm~l }%£¨Ccz*ï‹õ® Ðy&¤‹]0tóŸêD‚DY/nOKÄ›û’£c˜Æc1'‚KÈáFøà³¸ ±²©M €*¶ÿphe§F,¾é‡_bF›ãèŠ tÍ1§Í}.ùÇ¡²ö=!ö²ÛãE÷ ÑT’⥂X¬µ›Gi²½™ú¡; æ#NY¹{|¾Ÿ„íjmÜŒØeÛ¿X»Ð%ó&ë¡Fc˜% –ÔÎÀ*ðYya/ ¤K»2ÒöÎ7j¢Ââ«öTÖ–h£ª@_¬9ê„v‹ÏwcØì›¥}€T1Ùf¸li; ïZd3´ÅäL°.ˆE;jž¸ þ©†uQ³¬ÔÞ(ö—ØûÿÄ*¾Øn™Öh09*kÔäêX%>=›fœÚû‚L{Ä&HvœjeÛ§'’ŠŽ¨Õ6°j|áÛÄKª`¼FÒÈ|_¨i‘ÛÊ6S$䨍|'&d±ªX>ðM°–­ˆojñ-N|k¦U³9Ýëc3°øl›Ÿa颦EÓË2c«‘¤Æ׊ÌÓª¨é {ÑÍßTTeÀùò^ Ç1m ^ý³Z|A„¢¨bt+ ·¿Kþxø–tGåøFñW5¢±@b°£Â o(>lŠøÔžŽNwý`x"¾‘HgÙ.—"px#ðAòuvné¿}DtF:·w–œÐFãttFK­¡ÇoG¤´Í¬*ün~E—ücà¿bÜÄÿhGxåKn‚ܹ rä&ÈM› 3ÈÿÄÉ‘0õxHmkBFúÞÊþ)¤3¡72mkTSxœí}[sÛ¸².÷¬ÉdìÜgVÍ~Ø/®:ûÔyÊ,ÞE=Z–e{"ÛZ¢œ8ó’¢(1ñžÄɲÏšíÒ?ènð‚Iëâ$Œ*†D$ð¡ñ¡»Ñ _t®o^ݳ›öìåððìF›õ†;‰døÏ£³ÃZöÄðg§ýàF½¦äÕA7¸Ñ-{¶0¢/Ã]7¸i鳡{rÆNèì±küßlÐï_ßtìÏÎöèòFùQ+¾òFé(žr©œ)þìàèÈŽŸ³ãûìø…2Q¶”>Ë=W¦³a÷x —Ý>«o³jSgÖéœÝ˜³Î!«ÿ”%ì°7븻x’ÛƒftÜ}üÕéSò“#~ÝþŽðÜ^õ†˜ÑAwÀÎõgeŽèê#—nrH×£ä`jyµRgÝc ªÓ=Öá2Ýc“;¨³D§Ä€dV›'l†ÊGå3;6Q¦Êä¶i_>B¡ô¸ —@¹ºôhY[~´[¢£-W~btn)?"FU$hÍ=äm3|.ö÷3CëÇêGŽUŒa:Pï<¶Iø`þ\|3…šÂÇÐÓMn9ÆtBH'„LBÈ$„Ì™;øzÕuÙÌS3\÷TÁðÇpĤëßLÞ>³üyrfè2A+Rks(õ±_Jß!(ñøÒÀÔÛåÀ|ÌÁÜa÷ž}Δ· .Où¤¼Sþâ€n$„òûþQùX¦ÆG­f”¦}M5åÃV-¶–JH"’WzäêNi, G', mR»âÝštŽOÈM¤P¨EÓ¥^“ìÊAV ²qzg¥2-H ²pˆTÂÈ/¨ óe 1°)à„Bµ ²² ÔºtÈrÇ8@Ï ÅLk/VÎ;©.GÎ~à½bsÁ•– b‚ÒQ¤—AÑ>úÚñqb·“!ý^ïP§÷™Ä0äiÚÁy(ÿ¯RtÏñÒt_Š˜@ø-¿ºH™6AæqÌŒ‰Yzî¬?(Ù uË# aª©ŽäÉÿŠ¡ù¾’Ybæ ™ô‰’@FÜÆDdñ8|n¨¹‘Z~dI/ ¿ +C|?m\T猹æŠse|§\3ÂpÛ^4ÀC†«>fâ¤QŒYYNŠºU¨ ûzõ1©Ç–NІå°Ó¦¥©1<=HA·A3È_8—Ö±ÍÒ¦š5}e²îp-’’hº -›Ð² -›†2 |ÂP†9f¸_Çû‘¶â)Ìñ‘8„b›PD-¢z[MB‘DL £åŽzŽ–ÊÝmîhs$¹àÙ\òl3L:’“)Õ„rÄF:Iå*£¸”T–Óžåb‰ƒ&êñÂù'Ã!ÃäLCsÏ|ñìâ`~‡ü—vW%rJz©á¸«´šîª|”žJQê¢coÌTðâa}WqÒW„Óˆã3fž|©8 Çi#Âé#ÓH®Vè.â±¶oÖ4Òø” 4*A£4*A£–„æ±T„øjLuñIs½ºúÕ—"2²!‹²nEÙûh½^ϱ^ïê G‰ÍØ“E0Y“G0y“'Õý{`nâr˸F"LLýÚRù·©rQF«¢:hÖ´Ìbƒ*5ò+9¹âÀÕY‡ rHù§µ†|ÇH1vûè`zÇMï­ÒØÖˆnK°€°7Õ”"KvSF‘•F”Ųqo©Ø•‡*‘ý¢|Aýo¾lD‚×:—¶b½†3iir–ÔëcOhªèIr¦ð¼ŸRóÏ»æ^r!K˜W0L#°Ç$X?p°ŽaÉ€C´™ç [»mžvåÕ NkfL†`Z†¦PèjCΖZ wE ‹ƒ¥;dû ¥³ Ÿm“åcBŠîĹ>K`#öpQOõ¸VV"š¸çX˜Lt V‡ãê°¾CÀúXßíuø2 ¿¤8eE_BÓ`ÈmÒá0tqºYw¬+B'ÝJà7&¥à\tú…ë®9¾“ë}&aÏ$ÄSSDšP”"“8Œ‚>$Á/ ïfïúT 岌þ.j‡Áš7-oýÇ#ͬÀ·.Ëåƒk›ÕÀ Ó‚ÈG‚êó™âg¹™‡c”ãßVMþ-5Mq×^à 1Nsœ¢_SF¿!œ"OXÜŽ³¸!ÇÒtÐy¡†¨;äÔÌÐZ ¥äÐÂ0(ÏÙ·¬¸jÊs–{Æ Ÿ»–”^'¯í}.²ý*èiAuê:²Èü§ &†Ûìèûýœ}E,ù‹‹Ål±zÓ1 §ù6É¿gÿá›9ýy¤G@:E«žÉh³ Iq_¡F3åK“(ƒÂ‚F9ï·ÙÕå8°ÄXQ#U¦[-KJ‘ŒÖÌã…6ôU„_†Ç‰i[¥ÙDÒò—[4Ò™œ’h‡kFF¸îk•XnS²5#Ùyc¿ŒUŒò€kAZ{ ¼ –17oë’‹¨.C¬ò¤-¶‰’!_¹†ýQù ð%LAçJAY0]Ë0Ô,“0´Óz ´¥r(Ujhé·ŽVJaš0u.†˜˜Òèµùð-Z(p´HRl®²A+„IÊgµ¼v|›ÅjlÎ_4laÑñ¢/}!ýÚ™rý¾ B ÝÐô†INr˜†q=0adˆŽÍ”qJ_ëºp¾F eÁrûcjÈ0õ¹ÁÒæÞµ6êhÛä)B³$\#ïÄfJ¸f.xÇóAŒ­é1=T(‹ÅÓª«ûT˜QÈæKøÞ*Da1ûP*žp¼Ç÷èx%ÎÖ->Y·HBCHQ@÷É4¬6Ø_#žÅ³Kz†.7XE—ä’9–.† –´tvÉsLäEȤ#0¹(¢Åœ³ä„AuŽõgTÀCµüÑPº5ÂÛZeöÑ”1iŒ´Š“‰ŠÄQÎm¦;_ð>ÍÑUpÚŒqbvàª9#&`Êm= !ÓæËœ/`´©Œ µ•Bö0Ò`Þa4¸¦™Ð{6»îšƒV~0²U »zP`¨γúöCÕy?«:σîY4ç¾Ç]U—ä+„·=Œ'O¬3xRm:¾2žXq&– _¨Ñ £Å‚¬Sv³ãWèðš·ýtØ*ï€0lÏŸ4ÂðTA^Ðð ebóÏÐW¸tÌDRR!l;éÅ®@:kÈ×…__N2}PtãÄË\\‹Iú±I\Y[MËv5i}YÎÑ”yÇ€ç[$ŠevqqEó´#Ý"~âz•˜<©%ýÆÍó|œ@ðßèÄÙBOEe Ñ1Xa³k„£9ß”®½>¶r‰I~KŽA>x ü.¿ ¸2 M¤Ù„v)®Îë…_x/¼Ä/£_/qñ|Ä[1ÁT§ÚJUV°¥l’lA›BW[–K*i ÷ܵÎRäÞ=ÉùmÀ;'åÌÄÞJ,•9é•2Ð÷g½~÷ú¦—|Ò@€Ýâ¢Cî,D`wášÆ쨓ÜÞ=¤GÜÐ#z»(ŽaO)oŸ’SHf½¤Gâ}‹M¨R2ç$7§^•tªKö¢=cõñ£õˆ —ƫĒÏeÄÅ>ù€©ÏWþ`<®^ôö^2àvèâìûÞžÂÒ£‡¬¨øo–ÈÒÂ,þüÈ{ yêí¯£Õ¼D˜ÿzÉ€«€ï©8Cßîgl¿ØoCŽ^V”’9õúÍ ~3š~«Òoy¿ 2>k-øMÞ ½÷8ê#Ù9'%Ωףõ¨×ôh•ÝŒF"¬€.“´k‚Ä:A˜wRW¯çLê9³é¹:c‘zà õŸ‹/a,ÊÏ9)qέØUÓš.­Ò¥±nåaüL¼Ñ0à.þðøIÎñzÝeQwYMoÕé­*‘~â9R÷n„ÇOrŽ×ë­õV«é­:½ÕCD&a¯ÄÇOrŽ×ë-‡zËiz«Jo=⽵˟)ó ù-©œ<âý#;ãdîõú²M}Ùnú²J_Þç}ÙÁÅÔËh‰5ˆžèp:ñh½~ò©Ÿü¦ŸªôÓFdÜÁX¡ Ò¢AçˆyœS¯Ï&Ôg“¦ÏêÌj¯0^sš™Õâã'9ÇëõÖ”zkÚôVc{¯sE:þf¤&óN òêõ\@=¤*ö0£©2VºØïp.\oÅFÌ?™“_¯’÷ôBÚÕˆöºzê—‘úe¦~ળÙ:°1-ÓZ=Mô™5Ľ ¯1ƒ¢Xb˜ iÝÚª:Ö“uSµâµÝÇŠ .ë&ëø™pÚðXĿƕ«ºçåµ°ìtf[,Yó‚o´.¨s¨!g 6F%dA¶åõ2‹ÉÆéNœ«·½V:×´âܱ-–µ‹Š¶ ŠjbÄ®ûòª¿.ØH¨¶0›Åb`ÊjÓn™¶& #ã‰ã[éL'ʵ}}ªÙÒ†LƒÉØŸd»r=UX÷\³‹á~€±k{ðÌJÍ£ºjøéº%…\·[Ú8Oȵ©˜VŽÛÞÔWµÜü,9FÊ\gÝLKÐDš×Íæ-ê•á[ÔαÜeTÂH•xˆO[¼TþÈ=_¼Cü¤Æ.|“‡"!NÃÞ±ŠKE5Lœo-ß`µy®Œéœ^x’8óƒ2¯ø“Ï’ÂRšPж?¥d:&9^ê¾òþ—œô}ãÞú?ù|£`’)¿ÁÊ«‰¡–û¨Þ_!H|Ä+<À+¼çJ²¬þ‰ÒBI·#N°²’‰š Øíò—{1)a#ßÃ17¯íY‰pQ–ÿd=1Vþ‡F9/{Õ<&—Fè`¯]áøqQò®r%ãY¸;•Ÿy‘+±bɨ¤8®Å3ÿCâVÿöÂM– ÞÇìï™ìÒ£Ï>0™üˆ#þ‚K2Û ;ÿˆ6†ò»Ξϻcf‰©,·ü9EÞ5q¬„¼ ö™Ç>ãÚÐR‡³ö;`L7açÏV€å¼¶'kð_¬­vk@ìð†ÝëøäOöû*ªÌbÿÝé¶} þ¦®zOñÆû޵=Íw?*“’VÞ=–[Ì8ÒjHÉfjoh˜·Úù\Ç÷I:L>X»Û=Gy å ŽQ²&³8¨(0«Ï*ϼ¶ÐógEqM±ì|’LJËa+s#L.7u$ðaêJëójZ\W PK]²Å>&;¿¾VõjZ’Ù²ñjfí™´¤eï!«ã„iŸ±m[ ìIê~a]DÚ)çÊ?D®¨=WL" 6÷QFH†ÚLª´”4Aþ„]EÅù¤®zôçLÑFY¢ÕH³×XRò ^ý#Cþ<âÚ¬þî W/Sj3u%YyÀò?£þ¹Å,šç/kHp„Éò” 9Fc(šËÕᔇR,4aÿU”©UHE^›Ó½a¿ß*ãÜžO—yÇå']êo¬ÍVfvž „]•¼Ó£Äùåï²Áò‡ì¯x}­dë§¹–zQëãRå[Ÿ§¼ÖßEl}òúéÖ?Íiý[%|Ûpž}–‡€XRV¿ÇæÝñ‰‰2w{B#{Ñ» Gd¬Ð»ÿäµqŒk˜.'«ß# Åw{,Åbþ6SHˆ÷ÐîK?Sö¡VlærÑCð™î3ÍbæñI4ëwn/ÓþtŸ¾ÃóË̼0j³×,Sò)ZáÕ5„‡¬Ä{<7²|9‘{‹Ö%}ì sm\Œ´M#i3ÉÚ›–.œ;ûÊêz—³½to0º¾9íïÀË"_S2‹é–EGáË,sMð-òšc^_èu„,¹Ð«®Kº7/cÝâ’ô~ÅöùåÛD{ÏG߇+:mÁ>‡ñâ¥V}ЃŽñ#SalÜËõžË¼5÷Ùxù„žo=Eóevåc#áݦ›äÎÈËòÎÈú«ZŸÿÜYWËÖѱ¿4ÎOÏѯ2Ql‰­£®ÕÖI·ô.Œ·¤ÍU{6I[›zdmZwÎÚ”µ·±4K³±4Ksõ–æ=Æd°·|ññSî ÷™oqÏØ6»ò'ðA×`g˜ ö´ÙÙg©‰k¨Iv¶p…¡\ËrØy~ë×Ó+›ØÎs¾ZN13u¼²F ©Ø¢àªu¼ò£bO€þ¸ÞyRÞâU ÿ}´¦DØÇ¿ëà­±¼yÈŒ¼à¡½{—ô’¸•ëÀø1F„@Œx:¶ÂÜ[胀»ku&2ŽŽ×Æ1qmÊB« Ð…Þ±X^}Ð"ï¯÷â–/©/Wý ëÞ?œ‡.¤ž«ïBé¹ïçÜÒÿb©§¼OÙߌϑ„§Ê+÷½gg¸R»iHZjdwnÎo}²G "yv²žùEuüÄZô+²þÇ^Ëø¨ü®Àsn>, ·Û| ØßväEÔ‘sawÍ£¸À·ÑÇ2fé½&ÔQ Ô;VÑÛù­^þ¸ÊΡ{WóϤ%ëŽ÷¨å[Ø›’ëªó¬~‡çYY{×3ãÂÝÃõÛ:‹!è ¶nãˆzŽç“ÌľpÆÕpfµ0¾rŠ#oÊòà O}–Ëšq‹Z¾ü‘÷ ÇX¼²”}be[{Ï-›_)ŽÀû<–ècÊÏ£ÚÜ5ælE‚u%"=&Í;<&çµ}ù2ñ3rn\ƒ7è¸ÄÝÏ‹˜Ç‹®/ã|K»_ Ê_íÝ(!yâÑê’æ£ü€ ñµdÕÒŽ˜¬UÛZ«¤‰m]óËQ˜>z«Ù¢Buüoñõ6j`­ÌHãI×…~«Wã×9ÂõQXÉ{aõέ8§6ßNO#tÇèÑñig`ŸÛ;ð×ÂIaä9h»SÔ™Á^M/äµ:­¡zxÖvŸð¬rlõ³´ägžŠû V_q_¡}‡éØððÙûX—_ù>Ãt”öâŸJdgÊÌßi¨ %æí4ë¦ê® q­¡ÙkH+(Í^ïg¯¡#Hßzwï|Ÿ³cGÎÂáóáŽðú ã®:öçëcâê{¾—ÏÄÙ}‡ 7\üõqqù”«ØÑ–ÇÅ?0”ߣV?a#4Œq‡6ÑÕ.PŠ 7¶RgÖ‹Ô›ânG›Y;>²+¬úÅ‘•ÚHà›lG±zm´k-”SXGZMŒûüö/ß/µú—Äj‚‘ÔF‹"Ú‚<ûQ-óK¶qÅÕ(! ?ܲ×\ù3¹ïÁçë@íÄ^4Úͯ2¹Xïnþ¾úþ~þ„í§5ã0b7Ü«:@ö¼B~§ÐSÖ`޽FéO¢—•„åjf๞âÌ Ž^®)–¥ÈC)‚Ô ™Q¬¯Îe®Ír`=2-Eßã(÷ú’¨c-k'lœáߡ˺p6Ø]ßtvúg7A â¿Y/ýkõôè…}?Ÿ"Ò±ƒŒŽ}’›3ìoØuG3Hv{˜¸‡g7:û5:»Ñf½aO)oŸ’SHf£ÓÎõ Ýø›~ž3åœ5çÅõÍ«;ÇQgû<¹¿³ë±VŒX+Fݳ›V01ôcN{‹¹Ðl÷tp}Ó;AývúXéA[2ØFûGtlHŒøo†„6Ûô)q¡ÑÛÛ;øk»‹‰Ë.3egv¡À^oñÛàŸg7¤.ý<¦då÷züæÂ9Kwéç.÷›ÛA`ûDô*·çöáXß=¤KIßÅØq¡ØîŽ 9zí¯¾‹¿öG‡p‘ý‘@‰ DòOL1ànvÚÃ*žbýGC¼+ Éiw/Þ;ePfG‡æõ ûsvcÏ0 (Ñ(Q…„¥=8Ÿ‰5ÄáîѤ£í>Þnð oe™‡G¬ÀáQï6;8D¸}Jàðc8#L  بD@¨Á˜/z€wð…;>çOÐp:šàƒ ð;dÐô Ú× çþök6Ð^ìÁ“!öxŸ‘W ª1ŽVs€­ßǺxÞá^¦{€ðïôa@îÂ%w^ÀñÝ>Ük6{yÀÚ÷’NšÍ2÷SùýîÇ÷a÷ÔR÷Ré^Zñ½÷¢§Ç=Ü D î2hÐsm†£(hÓ(ÒT‹†‘“EŽj¾7ã#jÚj©á÷¶eŒ£ãŽmGÇÛ­è»X`‚ÙÞ°{}³w| UÛ;~‰Ë~6K_SJdgã?V¢Ë& ½.B±×}A<ÿÙ¯},Ý—p«cÉëØÝFQtwØm‡LÔÛ³—ÃC¢°D2ü'ð†´ì‰áÏÒ»§^ta»”=Û?Ñ—á®Ü´ôÙÐ=Ëwöv ôQƒ®“$å1’rÍc6õD ãÈý|®y˜ ˜ÑpgI¨³ÍªmLY§{pvcÎ:‡‡À8CvØ›uÜ]<ÉÅñÕ!&îtú”¼Àdçˆ_€¨¼3Dæëô¢Né°sD]F< ‘gDW¹t“Cº%ÛPË#¨“ýc ªÓ=Öá2Ýc“ž“F·§Sb@2+Í“ 6C¾ß“Û"¤}ù…Ò:[n!=Z`Ö–í–èhË•Ÿ[ʈQ Z3F9FÛ zPü.̽‹¸IXÅ¡õNÀc›„æÏÅÇ1Sø¨)| =Ðä–cL'„tBÈ$„LBÈœ¹ƒß©W]˜ñü1;pLÍpÝc$¯ôÈÕÒXŽNXÚ¤2vź5!蟛.H¡P‹¦K½&Ù•ƒ¬.@ÿdã”\!I€L‹ÒÆ‚l"•0ò‹*ˆÅ|ÙBBLàl 8¡P-¨¬lEµî¢«èy¡˜iíÅÊÙb'ÕåÈÙ#0¯¤è´”Ž"½ ЦðÑ׎;èû» é?ˆð¢`0Ý}ïiÚ‰|•¢{Ž—¦ûRÄÂoùÕEÊ´ 2cfLÌÒsgýAÉn¨[ SMu$´( ‹‘• Ì3gΜ O”2â6$ê$‹ÇàsCmÈÔ’ð KzIøeXâûi㢠¼8gÌ5'Pœ+ã;åš €Ûö¢2\õé”0'bÌê(ÈrRÔ­BÙ׫ñH=¶t‚Ž0,‡6-M‘àéA ºº tü}ŒB†«ÙfiÓ M„š¾2Yw¸–‚FII´ ]†–MhÙ„–MC™¾Œa(Ã3ܯ€ãýH[ñ”?æøHB±M(¢Š–@Q½-Š&¡H"&…ÑòG½GKån€6÷´9’\ðl.y¶™&I€É”ÎjB9Âg/øÊUFq)©,§=ËÅ3LÔã…óN08†C ‡É™†æžùâÙÅÁüù/í®Jä”ôR/ÂpWi5ÝUù(=•¢ÔEÇ­6‰8é+Âi„kØŸ¾XœŒ…ã´áô#ÁVç.â±¶oÖ4Òø” 4*A£4*A£–„æ±T„øjLuñIs½ºúÕ—"2²!‹²nEÙû|e½Øz½«+ %6c#LÁdLÁäLžT÷ïaì+,·Œ€k$ÂtÁÔ/Úë ß`%½„*VEuЬi™ÅUjäWrrÅ«³AåòOk ùŽ‘bìöyÌsü¼[;ÐÑm ö¦šRdÉnÊ(²ÒÁˆ²XÖ#î-»òP…#2Ï4ÑÿæËF$x­si+¶Ñk8“–&gI½>ö$¦Šž$gZÏû)5ÿ|±kî%²„©qÃ4 pL‚õë– ¢g„…æùŸ§]yuƒÀš™“!˜–¡)ºÚP 3†¥VÂGQÃâ`éÙ>hél£Á†ÂgÛdù˜¢;q.†Ï~Äà®-ŒW}ùYž+FÔwJC ž¬‚¥ß#Puª¯ þµ ÷ÑÄ=ÇÂd¢K°:W‡€õÖçÀúŽh¯Ã—aø%5À)+ú:˜Cn“Bp&¹8ݬ»NÖ¡“n%ð“Rð .ºýÂu×_‰Éõ>“°g b©)"M(J‘ÆIFA’à—…w3‚—ölcÄy ý'\Ôƒ-4oZß2ú%0FšYo] –Ë×6«§‘Ôç3ÅÏr2Ç(Ç¿­šü[jšâ®½Àb8œæ8E¿¦Œ~C8Ež°¸gqCŽ¥é  òB PwÈ©™ÿ µ@JÉ¡…3à^²â ›ìø¿ç¯%¥×Ék{Ÿ‹l¿ :@ZPºŽƒ,2ÿ)CYzŽÛAžãÃKÏÐ2œ»È±XÌ«7-³pšOC7y¦ÌœA³%WÅôª;*(˜å§˜R@á8þËÎ- yBŽKi9HÃéz/ <À=*Ë ö˫镢Íí“ÓŸG@z¤“QԹꙌ6KšððmñäK“ÉâÿÙe¼7BÜ^dW—sàÀcEiŒtT™nµ,)E2Z3ÚÐW~'¦m•fAHËc\nÑHwdrJ "®ắU`¹MiÈÖŒpdçýj0V1Ê®=ií1ðJ€XÆÜ¼­H.¢º A²Ê“VP´Ø&FH†|9äöGåƒÀ—ôÜØkΙ CÍ2 C;¡WB[*‡R¥†–~ëh5¡¦ Sçbˆ©)^›ßò …G‹$ÅæŠ!´B˜¤|vQËk×È·Y¬ÆæüEóÈVÍ`/úbÐÒ¯)ׯáË ÄÐ M¿aÈ‘äô(‡iØÃ‡ƒJ›)ã:”¾*Öuá|Ê‚äöÇÔaê;rƒ¥Í½kmÔѶÉS„fI¸Fމ͔pÍ\ðŽçƒ[Óô\|®I¡xZuuŸ 3 Ù| ß[…(,fJÅŽ÷øñ ÄÙºÅ'ëIh) è>™†ÕûkijxvIÏÐ¥â«è’\2ÇÒÅPÁ’–Î.yމ¼™t&E´˜sö‚ÀLÏ•øÅ…¡Z~ƒh(Ýám­2ûhʘ4FZÅIÈDEâŠ(ç6Ó‰/xŸæè*8mÆ8%^Û^ˆ˜t‚)·õ(„L›/s¾t‚Ѧ22ÔV ÙÃHƒyGÏÀ爡÷"lvÝ5­ü*`d«võ ÀPœgõ퇪ó~VužݳhÎ}»>ª.3ÈWo/zOžXgð¤Út(|e<±âL,¾P£F‹Y¦ì¦ç_½/±ýtØ*ï€0lÏŸ4ÂðTA^Ðð ep@²À×%Ë`&’Ò aÛI/vÒYC¾~(øúr ”郢'^æâZLÒMâÊزhZ¶«Ië£Èrþˆ¦Ì;|Ûæå\™¶¸€¸¢yÚ‘n‘?Hq½Ê LžÔ’~ãfÀy>N øotâl¡§¢2†è¬°Ù5ÂÑœoJ×^[¹Ä$„N¿% HÇ <~ —_\™„&Ò‚lB»WçõÂ/¼è9K>F¿^ò÷¥)ô„íˆ`ªÓ m¥*+ØR6I ¶ M¡«-Ë%•4Pƒûˆ îZg)r ïžäü6à“rfbo%–ÊœôJèû³^¿{}sç­ÔKZqT!þذ؄*%sNrsêUI§*±d/ªÑ3V?Z˜pi¼J,ù\F\ìó˜˜ú|åÆ#áêEoï%?`ß÷ð–=d…?ô*‘¥…Yüù+÷òÔÛ_G«y‰0 þõ’WßSq†¾ÝÏØ~±ßo'ú-™S¯ß ê7£é·*ýö˜÷Û?ŸÞ“î½ÇQÉÎ9)qN½õ¨G½¦G«ôèf4a-à Û5Ab Ì;)È«×s&õœÙô\±>ýšÞ:ÌñÆ¢üœ“çÜŠ]5­éÒ*]ëVÆÏÄ îâŸä¯×]u—ÕôVÞ é'ž#pïFxü$çx½ÞjQoµšÞªÓ[=zà„GØ+ññ“œãõzË¡ÞršÞªÒ[xoíògÊ|B~K*'xÿÈÎ8™{F½¾lS_¶›¾¬Ò—÷y_vp1õ2Zb ¢':\D£N8·Êâ+h™-™S§Gø4›·¨W†oQ;Çr—Q #Uâ!>m^nœw¾x‡øIò—©ÿ {CÄ*.Õ0q¾!´|ƒÕæ=º2¦száIâÌC ʼâL>CJ KiB)Úþ”’éÌ+ìáÍðöQÙëëãÞú?ù|£`’)¿ÁÊ«‰¡–û¨Þ_!H|Ä+<À+¼çJ²¬þ‰ÒBI·#N°²’‰š Øíò—{1)a#ßÃ17¯íY‰pQ–ÿd=1Vþ‡Fyôî=&—Fè`¯]áøqQò®r%ãY¸;•Ÿy‘+±bɨ¤8®Å3—óÒé ÆÝJpî,õ‚ðùì¼ÁÙùw{¿³{¼mºaè¥3´Ñ0tÃÐ C—`èÍ,C+zÃÑ G/£Í†£Žn8º‚cˆ;! ºaçå³³Õ°sÃÎ ;Wðq jp?s C7 ½l†¶†nºaè ýgh—];|ˆ‹Æ ½Â±á솳—ÍÙzÃÙ g7œ]A«NpvÃÐ C/¡E®mºaèo™¡%’üMFÞi ;ßvn"ïvþÚÙ9–ÎÛ°ó·y×0ô]`è&ò®a膡Ë0ô·y×pô]àè&ò®á膣«ø8¾È»†ï;7‘w ;7ì\ÅÇñíDÞ5 }º‰¼kºaè2 ÝDÞ5œ}78»‰¼k8»áì*Zõ·y×0ô]`è&ò®a膡c†î²³@þý=W’:~ÑÆ›ÔY«ekñ[[1Ùg®ç,„­‹¥X”AOÐî6S¥çÅY'Ï¥'sÆìb Ü<7OæZ-Ér¤Á°V"{¡àëYeNµf™Ïwb„lY¦È“ôåÈ¡¹9”ËM |˜ºÒúüUלÿAKh±Éί/…UýU–„UVC•IKÙ{‚#ý=Ž ÔÕ”_á“‘ÀùR4VÚ¬'}ö´Ç)j&j ¡w d(@†£~‡³ó@ö&ìüÙ œ×öd þ‹µµÃî` ˆñÞ°{] ë6õ'û}ÕÆäÿFwº‡mß‚¿©«ÞS.U¾õùwÊk}ñ]ÄÖ'¯ŸnýӜֿUÂ7ÈæéÜyˆ%eõ{,AaÞŸH‘(s·)4²÷-F9"c…Þç&¯ˆc\Ãt9YýIÐ(¾Ûc)óï´™BB¼‡¶¬Y¢KÿÂîzù¸Î®üCÔûkÏéca`ß1ê{¤¶VZJ3„|ÀXÅy¸»ÞŽ Îí¢'i9Ü] ‰ôèKJ¾Á«ƒ”žGvSv”ùÂÕË”Z—¬l&^¸ÅÑ¿bKc‚2a¢¾å£•ë¡×±-X c^Ê3‰^\㜠òt/×Ã#³;ï3û„Þ¸¿Þ6ñÌ„ út’Ë0˲3eýU­Ï7ØàÙk”êŰÀ4bãာ½iNGíÇÛGå ÇîåloÀÝŒ®oNû;ðЯהÌâcºeÑQø2Ë\~Êíìpã÷¢n³+ÿz v†YÑ`A£ò}–š¸Šdg סÊE±,‡ç·~=½²‰í<ç«å3Sǃ`¤Šý ê®ÛÄëƒ*öØæë'å-^úßG+„}ü»ÞË ‡ÌhÅ$´¼ï’^·ro„¿ÙÙ‡Xçl¤]U´õ;Œ¶¬½ëÀý©²Çêõ-»3\ÜŠj¶]\tqãÎõÂüÖ'ëðwœ¯“g‡³öêu®ò~Ž"m~b-ú¹6ÿc¯¥×c¿…ž€Û÷¸ÅzÌÁ™ÚfˆØ8«Üþ5qèÖ0ªÀÂèˆjÍÏÁ3׳ډÈ\ŠØVY_¯7b;ÝÒå3ËŽÒ¿$ý±Em”yð¶…U ?ªe~É6Ú.F‰þ}†;— œó`Vغe¯OP§n¡ŽÕÆ^·Ñ–j§z}ŒÖv;Õëð?ÀsWcw—iÿ×( °ãä¢B–ZûÆ|p΀5š=>a¼ú®?l¥0ÍÊÇrãûôÎx¸ëÃBͽ6Z¬½xÈ(°»ÈÆøç•ïñÐöKËÖ÷(~‚¹Å'Ž-+¢´ ΢¶H»ÄÓ{nÂçÈa@Xuüåªw†§w_-þ9râ>Æ2{Ã5¡Ä¼½á` WÛ-™Ý¡ÓìW½›ýáßâþðUìü>g/®œ‹Ã§ví#f¾%‹eî‹r×°pÃÂ_ ;¥YxOGH±ðl°=º¾éìôÏn‚@ų^ú× âéÑëù&Þ›iÍAFk>ÉÍvÇ7캣Î$»=LÜóýÝh³Þ°‹§ ‡”·OÉ)$³Ñiçú†n|5}¦œÏÝ×7¯ìGíótäþήÇZ1:`­tÏnZÁÄ Ðƒ7:í-æB³ÝÓÁõMïpõÛéc¥}lÉ`›Î~ѱ!]d0â¿Úl{ЧąFooïà¯í.&.»Ì”Ù…{}¼ÅoƒžÝXºôó˜’”ßë@ò› çx,Ý¥Ÿ#¸ÜoníÑ#¨ÜžÛ‡c}÷’.%}{`Ç=„b»;.4æèµ ¿ú.þÚÂEöGdwqAûS µ›ö°Š§‡XÿÑ/ÇJBrÚÝÆ‹÷NÙ”ÙÑ¡y}ÃþœÝØ3LJ4JT!aiÎgâcÍ0a$¼{´éh»·¼Â›CEYæá+pxÔÅ»Í{GèÔ(Nƒ[ŒÄÂÁAŸ8õ¿]þcüKnWÃìÈk£Ë…À|4ž[ü!>.„Úèº3s£ï2¸û¯èýí×lԽ؃ۜ ®ôôÙ5þRè ë>¶äúèp%¥{€ý°Ó‡‘¹ —ÛyÙ»}vƒƒÃ½èÀéq· Q‚›„ Ú"ô\›¡ˆmqMµHƤˆ;ªøÞŒ‹û´ÕRÃïmËGÇÛŽŽ·[Ñw/°€ÏFÛ¬ÕðïåÃÿ%Õ}6Ë@ q6ËM`[1)4‚A-†!s¿ÙÞ°{}³w| Pì¿ÆÄe¿ ›¥¯)%æ³ñ+Ñeç^o¶×}A¤ÿÙ¯}9Ý—p£c™ìØÝF¹üÿ¡üh¢„K|¾mkBSxœ]NË‚0ìÍßðƒàÊÆ­¨¼± WMš˜Íþ»- ç2“™ÍÈ*5XÔ|DŸZà=êfº‰Lcîé(”F? ¨ÎŽ›ëhÒÒ¶ô‚ BÒL«r°ñµGp’od¬göd/¶e>Éf 9ØÏ]“WÎÈA²\ö\L›fú[xiílÏ££ýƒTs1öH ûQ‰lÄH‚اE‡ÑÐÿtìö«ã(S‰AZð§¦_Y íX µmkBTúÎÊþWºxœí‘Û8 FSHI!)$¤’FRHn›wóî HÉY¯Ûx3žÕꇤ¢úùs†a†a†a†axI¾ÿþÛïÇÿ»'UŽ{—áÙùðáÃo¿¯_¿þª÷Ú¾gýW9ª Ãû¼Ïâöð–þ¹»¶ŽÕo'®GW {>~üØÖÕJþîÿlúôé×ßoß¾ýüòåËú¢öµ¯ò)*/Îåç‘Ný\®ÚϱÚoù“v[iZ_Õ±aÏJÎþ/:ùþüù×6õOÿ-¹” 92b?çTþÈ™×þlôkÎ%?·Úåöìä_2òø¯èäÏ1äBµ ‘sµ÷YäÇ5à>¾:†>Êc=1ìÙÉÿ¬þOùwï èyä^«- ×Ú¶,ýÌXÉßzèû•žuÃÐsMù#×’U]ë>H_÷˜ÀyøY’Çvº!Û‰õŒå_mÄi ÿRuâþs´]ÍXœm§_gû)YYÞ)úmæ]×y,—²¬mÚ z†1Éêša†a†axEÇß“G°×§ÿóo/ïYòÝú\êkº6õ®x„ËèíjÏægHð–ö¾»–÷óüÏØñ|†yž÷u¾Ä.½•üÿ†þó\þô³aÏæŽM&ýwéÛÃäké#Ïú$?Î]ùMço¤Œ\ýȾ,Û/íßÚ¥—ò·âQÛ@Êß~6s?)}‰Î,¹ l¾ìçœô ØgX #ìvçQç´“ög·Ú ÷Bž™òîìÙ™^Êßuô¨ã®ÿuh½à¾m?Ž}{]ŒÐ.~È}Ðv_÷ÿJ;ëxçoÌgJöëôY]’Þ³ë@¶é.ì«)™áoqC–ü¿“?}ß>@ÇûXŸÀÎߘò'-üäÓÉÿ(½W‘?Ïöú›²±¼‹ôÅÛçúÞéô‰Û ºÅºvþÆ”¿ÏëäOœÊ™ôRþœ×ùÃþvì[K?[A}¥?-ýwöíåµÔmÑÕ‘ý}¿g\=ö€c¿¶}ñ³M¾‹ ½ÃüÃgggÓêüàÖ èÇ„çÜÀô-B^ëók_g?Ìò ¯F?œ£³« ÿ•Ý×v0||ØŽÐØ=ǧH¿PÆîÛgçsì·ã/ÇhØ‘ñI ÇtýÜ~×{‘òçún^§}¶ïZæøºyDžë—óÏì·ó5èˆéÿçXÉ¥ÿWvðô¥§O)í"û±c0ÎËvYà“ØÅ ÿçZòï|~à¹_%/Ï,Îôp\€ËɹyΰçZò/ÐÉé;/x†ÖáÎsõü_é·9?ÿ«PÌܯ5Ý»\í[½ãy|ÞÙÃçõÄ8ÔÏÝøŸgäû¿ËʱL{ä? Ã0 Ã0 ç_àk3¾Àç†>´’ãøŸÛÜÆøzä«Éø_ƒüÇøü\Sþã |<®)ÿb|ÅÊç7¾Àa†a†axn.µ•të†a?lÄ÷^Cã•ßvk­¬Ø½#®àýÜ~eûî)ÿ´3<3^×Û¶¹Âkð¬dlùcÁ&·jK+›œåo"eòú<.ãÊž`›Áê^(3zÌòÏöèu ŸÁ¦lÛ+6»úßv´î›<™†×ï‡ ¾k7]ÿ/lÓc[`ýOÚöùÐn}½×çòš„«ï ‘GÊß뎱š×Äzt¸^vßä2)?;WmÆrõ5üoäcö³ŸþIzì?ú¾˜‘Oî÷zx÷Œ{¹&ØÇ!û…e¹z.þ©ü»ýüÓÔÅ"ѯÑí¤ô ¹Ý1üÖóäÁñGg×ÿí{+Ò·’×lûw<ý=}GݽìÚFƨ^ú)õ¶ìzIpäG¿•ü ¯ãKì¬ÖœÎ{Í{ÙÉßeÈï ûšG•‘12éÇÛ­¯Ïq¯§™iumf—“>¿.¿ÕþÝ}¬®Íëòœ®~žaì? Ã0 Ã0 °š[u´¿›+ð7øSvq¬ÃïìæÖ­öyÎ…ç ½?Þ‚‘}¶¡åœXùçwíŶ‘ÚvÌ?ßå°ß©ð÷DðÿùZÛ“ð-q/–?ß³ñ=¿ê<ËÌ~¶Œ›‡#ýßÙæ­ÿÙæ»>¶ÓÙFkÿŒÛ"qþøz°r­¿Qèo 9ÆÄr¦,øˆî­§nÍY[;í§oæ:)@¸-`×§-Ø7‹ü({α߯›SÒí§Ýú»@¯ÂµåßõŸKäï9èîüÖ ¿É¸“>:ŸnÁ3éç _[ÿ_*ëmt°cmìÃC>äq¤ÿSþ´L“øÇ<²?ç=÷çÝ<ò¼6Ç;ùãÇ«ôsü÷èþÜa†a†a†{àxËŒ™\ÅÞŠÝûêpxç¶?0׋¼#ÿ5žßàøzæÇÑ™ƒc¿]¦³²¡x^úêl‡ò¼ •ÐÇ(×fù±ÿ:~Ÿ¦ËÓÙ£^l iÅnç59¯³©žWÇÏ~·\;Û?vþnŽ—í»öç’6eÌr¥ßÑý¿óUbS~vù§þ£^¹÷U O7O(é|;+ùSÏéGôü4|?Øfí´ÿÐ÷¶*?ÇrŽ—÷W~Ï2ÏoÅNþ–ÙŸÊ¥ÿSþ9ÿ×~dŽa«ç˜çòîÖ‡ÜÉßmH‹6öìmÀXÿ[ÿÝJþ…ý~Îs.ãÚyœÑÿmƒ4Ù¶OÜíï|Bÿ­düžò÷ø/çøÙ˜þÁb5þÛÉ¿ÈyþÝøïUä? Ã0 Ã0 Ã0 Ã0 Ã0 Ã0 Ã0¼.ÄP—~þ*ÖÎ1@G\⟿äÜKÊðÞßrKXÿ˜µs2â±(ߥò纎Jëì·º8”ŽŒ'>â’X@â–¼ÎQ¬ûQýb£àÚqôŽòwx‰ ìb÷)“¿ëî¸_ÊK|•‘vÎ ÞÜ1çŽÕM¼6keŸe-2Ç›ïú5ùŸ9—ó?K^ŽEº¤~‰9òϱQï±®Y®×F¹8–ëN?å~;:=J<—ïÛßþ¡-ìtñºÄ’yNAÞÇég»þCþŽ \áûNýâXÊKê—s)'é^Kÿg\~âç2}›6í}Ô³¿·áï)¹Ün]O»ûrÞ^Ì÷³j‡~†"·î{pæ¹âù29w€6”Õ/Ð.Ÿz-ví:û+ýÇÿ£ó²M{ÞW—ýûJY¹¯Z÷­Êêµ¢`%·Œ íÒ¤l9…¼ç•íž¶™Õ¯Ï#OÏUz+èÁUÿ?;îýùsŽçÜdš~vñàN·›‡Dç7*.Yç«+v:Óye;ôø8Ë}¦~éÿÝ|…·²+ÑޅNþ9£àÝÀ}•{BÆž#t¯é˜×xîãÕ­sXÉ¿k¯ŒS¬Ví›ü/Õç»uJ=oê Gý¿ð<‹Õ»L'ÿ£²óL¬ò:äD]²6Üj¬f™ògL˜ëz/¯+ؽ[{Ž™ßºrðÝCôM®Y×q¦~áè[»{y‹¼£®òÍy cÈzA¿§Þô»ô‘Þ;Óîwï„«±€Ç9—¬zÉszW¿”ûH®œóìóV‡ax3ÿ ‚ú à¿%£×mkBTúÎÊþ’xœí‘) …ˆq ĉ8âDÈ^éê>×»gI@ÏÏþX¯jjg»iЃž——Á`0 ƒÁ`0 ƒÁà?üúõëåçÏŸ|â:÷ªçâs¥¬eø÷ÁÿQéùŠþ3|ÿþýåÓ§O|â:÷2|ùòåßÏ.¾}ûö;ï°7eôûGFÔû´ž•žOõ¿6Ñþ®ö_õQúv•¦“×íßù]Tò¬ä]½^¥Ë®gí¼{>pjç«zëìåkßu¹´o{šyªþ¯yeõŽûŸ?þ÷{è-Òýøñã÷½x†º¨/ D:½é3Dþž&òˆ¼¹e«^H×õyê i#/OGôzüϪÿÇ߯_¿þ~î :ûsMeÑò#M”Ï3YŸ#=÷2û» QžÛ›ÇßЙ¦‰ïŒ[\s=Eó8´}E>¤GÈ©éTîø  Ú²Ê×Tªg-Ÿñ}×þú̬üVfÖÿé¼Ìþêo¨SVwìzV}Ñ.âƒ/Ð>¨~Ê!?÷UýùÏËßÿï1¸Åþè<ú#õîä¥þ•ý}âÀ¶Ø=þF[ þ÷~†¬ôQÚ‹Bó¡N™.ð·.+푹^edÔç½üLo+[\Å-ö§k»ïä döW‡ïÍú(}Ýýê6îqÝý$¾#³?zÐ6–éBÓ©ÍiÈïöÇ?òLüåÍ7®!ã3ìO_Q}Пuõïêoßš™é[ú=ž¥tk¥È‹ûøMÀÿ‘Æï!'}/õƇdºÐr2ùÉ_ÇCú‡ÿﲨü:—©ôéº ƒÁ`0 :8÷—ÝÍòoÁ=¸„+8-ó4}ÅÛžÂcåÄ¥XÏdq{bUþêÙŸÖq˜Â©Î®è¸âmï!«Æ¶«g*ΪòU\z·ü[ù´GAåÖ=^§+ruñü{µëLVåÕüþ çU¥?)ÿV>­Ò“ó†Î)úçx…|œYé¬ÒÆ»giôãœ\ÅyiÜ^cæUúÓòoáÓ*=£ À³Âó!óÊþÄíT•³ÓY¥µ?rfògþÿÊšûWœ—sÖʽVÙnùÔõ*ŸVÙîXù#å=ÿÌFÈÜýªÏ«’—+[¡«àFô~ÅyH«\L—~·ü[ù´ÎOÒ‡£Œhô5žÝµ¿ŽžöT§ö¿êoà”w¯|Sf®ûÜÁÓŸ”+ŸÖé)³·Î;´ìÌFå³´;:x ûëØÉÇ÷â)/ˆOSÎ y²ëUú“òoáÓ2ÞÎeÊ)Ve3'w®”ç‘gGg™Ž=ïJþ®^ƒÁ`0 ƒÁ ľˆùœ‚u k˜U,ªKsÛþçØ‘5€nYæ®,÷çbXw{ ⬿wÖ&Ýúõ™û3®Q×”øN¬ðQev× ]¨¯Æ·ºö¯gcH¯úËžçîi½÷Š{î—ôÌA¦3žéôIó8†Çh³òwòÊdÌÒu×wËÈô¸ƒUI÷äWçq”ƒð8­îÕ×çI£>+—£ñ@åì”p™ôQÅŸáóÈGcþZ—ªüò\ƪÌêú޼ÄUƬìß·]ÌÒù/ø:íÿèÊÏ3dç;É«:gB9ÈRÈôï|GW~•—î×w«2«ë;òfz†áŸt|éø+—i5þ«Ünÿ€žá«ÎŸgºZÍY|<õ1NyŬ|E7þkúªÌêú޼÷°?õ®Öÿz/k›Ü×>ä<šÏÿ=Α}NŸÍå»Î…ùžü>åuåWy­d¬Ê¬®¯Òdz ƒÁ`0 *èÜ\?W8ÀG£’Ë×ÏâY»ûÌÕ:‚ýÒÏDg«öc¾g<‹ Ìö2+²¸€îÙÕýÿ'ëWµ±6½žqnØŸ{žrèuç"w¸<ÒTkôÎ.™ô\ r¤•¾nåOàûïÕ>Uì˜~c‡#T?£ñ+®ëžyöï{¼QùÂ,,^qF/XÅûv8º.Ö©gá×3}íȸâOPùì ~n%ãhUÞG4§çø(_û…sn|W}Tg&x^cëô“,Fíý…¶Çù°ÃÑ­¸ò«ôµ+㊠<ÁÊÿ#+}/ãUw8BÎRh_ÏÊïäÑ|»33!m–r\7U9Œmêß({ÅÑp™¾veÜåwÐé[û¬úx¯ëG¨ïµÌú¿Žß]ÿß±?g;õ,çnßÒ½Úow8º]®³Òוþ¯Ïßb÷ÿÈîã?úÇOVé¼=ù¸ZÙ_óÎÆÿû£#¿veü?áèv¹ÎN_WÆÿ³Žªõ¿rÞYL€ëÚo;Žù°ŸÎ1³g²9pV^•Gµ~>™[_áèv¸NO·S÷Ÿ3 ƒÁ`0¼ÀçèÚïQ¸’·¾[ãï¾×ØÀ veO\k^8Ö”¨v<ëZbzº¯²Û\ŽáOìp¥Ž¯b¾n$~ð}¬¾Çoèz•3ñј mKã è«ãvUÆÎþ]^»i´NºÞå¸WAö»#´÷xŽë”«é‘æjßÊtÄõì q ³:£¿ÏE=Ð z%Ö…ßqù)CcñÕYµEÅÑí¤q™´®ÊyRGý-¡+u (K\ûh¬PÓ'¥Ü*^Ø¡²¿^¯ì¯ñqÚ=m=y|KóòøvÅ«eü‰Û\ý˜rÈŠ4µŸÇ=Ž›ñ{Wê¸úÝ1Òûû;=Ý·åòxÚëpû;o@>ú›”ȘéT\ÔŽý+C±“=*ï™É«|˜¿GðJO¸CÊåW]ù–xŽ1.³™ïµ 9_EŸÐ±©â ½ýVýqÇþõÊã)vÒ(ç¨ã Ê‘}Ïì¿[Gåñùw¨œŸîǺÛôã{-âƒoô½ÜSdו_ËžïÎ׃Êþø2åÔ;iT&Ÿw*ßÎwú‡·™“:Ôº§ÇÇg×­¶“SþO¡ãsÌìÞjÝêºï%Z[~_˯déÖ®·¤ñ²+œÖñô¹Ìw]Ùÿ7 ƒÁ`0ø» ë]ÏÜkÙíIŒu¾+e§L]«ïÎÖ‚ïoA^ç°î;=GR¡³?œév쯱Ö;<÷ôy‚· o$Nî1ç´ˆ=:ߥPîVãžuŸ£<´Ç <&«ü¿ê3K«yC©¸/ù4–£rÇ)i=µþ*/|ÎŽ^]ËQ¹NÐ1qŽG¹¥w>ù{å•á ?ÓKvÏå:A¶þó}E:·ÈÎ_«n+{ÑþuÿÃ=ì¯ó¿êÜr ³›÷qÍ“¾Ì³]>>ÿËdÑ}+½øüÏå|L¼…õâàõ0öÿ»1üþ`0 î…lý·Še€·ô®ùŽg:…®×ºñ¶Šž`W×÷,3ËOã?«½‘]—¾\9ûPø×î~Í[°£kOÿûWùiìGc~Æ)ãÄ-<žw¦¼.ý3qÌ}•ãž'vªuðw$V±’¬n“Ñváò(²r²ºÂÿ¸®5Žï2©½ˆS;W¸‹ÊÿkŒ_ÏKÑÏ”ó­8B/ÝÁhùèEÏÕ —'‹9êw?K;Òx:òxðº<–ì|@¶Ûc³ÄϽ®‡§ùVúàyâÆ»c÷ÿ@Û–ŽSwÍ8B•òq®Ãîÿ]û£=é2ôlBÓe6V}eö÷¹ˆž­«òRý(·ØéÃËáÞ VþßeÊöZT¡ë„4Ýûïad¢­e2Þ’ý+nñYöÏæøBõ—ºŸTq„®Sü×ÿ»þß”é<›Ãïø­[&Ï=üfÿŽ[|†ÿ÷õ÷s°zîPç)GèåèÙÁª}{Z×…Î3«³™n7ÅjþpûWó¿Îwfåtöï¸E¿wÏùß[ǽ×;ƒ÷…±ÿ`l? ƒÁ`0 ƒÁ`0 ƒÁ`ð÷á{ÑÙûô‘Á~ÿ¬ö½³ÇÒßi`oLöy„>uo©Ãßi\q‰ìKó|}ÿïÒû7žÉSvu9ÍG÷íñ©ì¯¿c¾#öÙé>·,Ïjoð­òw{õÕ†ú‡Öݲ‡Lûù=«mWèêòÈ2u_¤ö¬ÿ8د–åéŸjož?»Ú²kÞËDúøßß±¡öm¼†ýýwÔ>ôÃì#® }©ÛË×õ·E:¬ìOÛ¡O;<ÿ¬ÿsüy—›î¡Ô}›Ú›¾k‰}~úŒî±Õ|µM’†ï'8CTþ®¡¬o+¨[Wžú‚ÌöŒ½ø†U™ä©ïïQ™õýr'ö÷½î\ç­'ç’tœTY¸ÏwôŠÌz.Dó¥=¨ÜW|ÓÉ~q=_¡¾yª¾M»ÜñçÙÙÍÇ÷–¯äÇkþt§ïbS=2æû|¥Ò±Ïy´NÚ_}O¯îe×ù”摽ÛöàýðtLàœS6Ÿq`CÿíÌjfý´3–#Ëéܰ³?zÕ1 ÿéíHí¯þ]÷š“ç‰ýõ\"íWËÌÞ]åó¬ÊþüO;¾2'@¾ìã@~tGÎü:º«üªç{åÝuÊþê7m1‹è™Q]ßPWVç2ûS®Žåz]Ï¥zŸÒsý‘ÉÛ×3ÐÅ]vç‘îªÜÝxwÒžôÝ:Ú—>ÚyŠÁ`ð¡ñˆ$j¢ëw½ ámkBTúÎÊþ•;xœí]kPUמþhEAy#òPÔÔˆ¢( â‘‡1M¦[ãD|>¢¶>Ði}@4>*&bÔdRQ bLg¢‰6PßoG|¬ÞoëéÜ¡”{öÙçö7ó rϹë[wïµ×Z{zöì5‡Àð¡äîâJ½}T§§uíÜ… òóI‚,ÑôÈQ\õ÷ñò¢œœÁ26,Ñ|\uà¤'/oêèÞ6ef ¶±a‰þ³fΤ®nÜôwsv¡%‹ ¶±a‰þ+W¬ 7w.úƒÎ4gv¢` –蟻?£yéï`ߎ~?ý}Á26,Ñÿ§ÒRòìàÁMGûö”?I¬ Kô¿qýyyt䦿›“3 LwïÜl%ãÂýoÞ¼Éõó¹Å߯}wâ„`+–è_qû6u7郵:ýñº.ŽN´Oæ¸Áýkjj(jL$×5€Í­);+K°•Œ Kô–¥gc»öÜô·³±¥…))â dpXªîþ\jÛº 7ý‘_FáîÝ»­d\4Wž:|˜l8êïÝÑ“|¼¼©¼¼\°¥¬æŸU|ÿøñczòä þñ¿ŸY¢ÿño Mó¿Ó‰— T\\,Ä~FüÀÒñÿŽim>jørqrâ¦?«,’u€æZ>}šv~¶‹Ž=Fw*îüß¿òuÞܨmnú{º{а!C5·QpùòeZ¹rÓàa”¶$þuò{ö;K?ÿ@JR2Ù¶âôô ªª*æ3 Ya~ÅFES;;òpq§Y3>PEÿìmY,À+@yÆ­[¶²žqPuÿ>emÞBAo¾E¿ùÕ¯UÑk³þ}û‘‡+¿<bÀfÌd5㡬¼Œ>š;Oý!ááäî̧tur¦°A¡tãÆuÖ2& £Zú¿?m:·^ epvp¤¹¹,e\¨¥ÿwE'¸ÖAä‚S““XɸPKĨ×vñéÄMøW¯À@Vw”Pjé_[[KãÆŽåZ „o!Ì;rD€¥Œ µôþ±gÙr¬€câbb4¶’q¡¦þEdzZ0¯~9¿.¾TVV¦±¥Œ 5õ¿ÿ>½7žk?ö¸˜Ö2Tjê,LI%›V­¹Î®ŽN>(”®_»¦¡¥Œ µõÏË;Âömòì Æ€µ òΖAmýÁƒÂXÍ–ëàäÌú‚Ѓ(Ñ|ðÐQj*×\ B§ö”+ó‡þ˜—±/˜g.D®c@S÷#Ñ8xèÿèÑ#ŠŽá> À5öìÞ­‘µŒú_8@mÞhÅ} ÀþáÃè^e¥Ö2xééÒ% îÛ—{ˆ\S»¶v´=;[k¼ô’“°ý;¼ã@ìêýUËþ°×Oý,.¦Àîþ\Ï1Ç ç¸ú“Uœ­e<ðÔøÝøñÜçeð6±¤¤„£µŒÞúŸ(*b¹Þq ˆ|ÀÄ·'PíÇ-f,ðÖûÆŽ£I>cæÛ·s´˜±ÀSåÿ}ýÕ×,_Ï[Œ1¦g` ]8ž§Ù -ôG]8rôhjogÏ}Àë#'0yRO³¼ÇåÿîÚ¹“Å<{C̉kemÛÆËl†úƒõ¦8y:-Ö oȳƒ~Zé>tˆÅèZ¬@\ ûFåz qðÖ_¹ðôéSÖ¦Õ ä…>ž7‡é ­ôWþ¦èx9;:r=/œ¨Â2×oàa>«‡ú+×Qø‡?rï7'òÏØ;rèàA5Mgh©¿òwg:Ëê<÷Š4œP#êá@çÎSÛ„V ­õWþö/«×°½Bâ9Dé_SSKCÂÂÙ:M3x±,:jœéúÔ6¥UB+ý^ 8^ø-ûLj *t°³§‰&°=‹-¢ôqþÖf<ÏŽjÜÚÑ{S¦°úTK†HýÊ{•Ô·O·çH5Fe]øÞÔ©¬_µ¥BKý_v=àЗÙ< õ@<0eò»ô°…æõ ?°xá"Mêƒ/L>01žêêêÔ0©UA´þÊkáYÁýúiº&l8ÄÅIJóL[´Ö¿±k§~øõÌ»_´1‡†QIÉj˜Ö* ý•×Üò÷ÍÏcÇ㎓)&ìÈεo ЛþXNN˜Lö¶mÉ·Sg!>€ú$ö¯g®_¯†‰u =鯼.ÎÃùâA…ÈI9·w`{X*ïÝSÃÔº„ý›º.P^þ èî¯y^Àœˆ íml)bÈPúþäI‹ß³¡Gý•×ÏÙ»—õñA‘>àâàD¾;Ó>Óý°gg¢ôoêÚ –ed°ý¢ôW¨ì-Hˆ§‹/ªòþõ½êo~¹ú3;SJä8 ŒðÅ>½{ÓÖÍÆ8‹^Ïú›_gÚÔ©l‰¨xМˆI0/½›@gÏžUÅ¢ RÿW½>PS[Kq±±¦õ¹výÃMÑåEÍbÅòåtÛJÏ$¶ý•ëÝ©¨ ‘ÃX@´ö üy{[;Ð/˜vdjuñ¡µè¯\óçÿL!Áý5ÝGÐàYåèe9|äXX“þÊuKÏ”²çÍ O§Pü=­ˆ±ÿð‹}Ÿ«f'^°6ý•k£FlòŒ¢u1Ga/rtTíÞ¹‹êëëU³™š­sï8uêõR3~"‡ ÿD=sÖ¦ÌlþÒ¬UåΙÖ_CÃÃYÍP> Ì Ø?íÚÅ—-\Hû?ÿB½‡zÐßÒû¸yã&ÅŽ‹fùÑ9¢_¢²^ÀÞ'ÄŠ£FŒ ¤çÓ™’3Â|ÁÚõWºšÅ\Èêuh87àœ ä‘Pç4ˆÖ¬ZÍžs}MÃsí ¿r?Ož>¥9‰‰¬w@´¾¯CÔ0.`C͹„´¥K)këVv~OèEKî¥á=¥&§°¸K˽Ej‘­!]ÝÙu¤¿_7Š1ÍmÓ§MgyFøC}]½jó…‘ô7¿/ÔgkÁDô©å X;à=(þŒ÷Ò+  ¡Iã)#-þùÍ7T|º˜JKK©¼¬œ®^½Êzh^¥§Ýhú›ßz6°îÒCýX-`ç\šbÌÈ5¹9¹°º4zØá~¾]©_Ÿ 9l8Å¿ó}8k-HJ¢eéô×5kØ9™2iýÚuôÉÊ•†ÔßüoݺEqÑ1ÌFžœŸO)šJÁüÂÙ…ÅØç†x{ìãLvÐÆDÌ1FÖ_¹Oœ;“ž–Æl£§º¨'ýyú€ç†öäú|:kcKÐßüž¯\¹ÂžU޵·gÒêzÓ_ >ÍÎfÏ©³¶\Ô_=@ïÆ;Sl„Ø %ÆzÔ_ 0;w|F½{½ù|ÐÁ£EùAKÖßü}TVVÒ‡3g2›´¤9¡¥ëßð½Ë;JQ‘c™h}.‘Ô_Œþ ßW]Ý#ÊÙ›C}~Û›­DîA“ú‹ñàAu5˯ãÙbÈ•!¯f´Ø@¯ú‹öó÷Xqû6-^´ˆíGÕ{‰ÔŸŸàìØukײ¼æ䨭Ýô¬¿}@m5mÉR é?€ÕÝpNµúÔ¿ùïûÑÇ´qC&c½ˆEë)õ×Þ°^(,,¤9³Y uôõ!—$Z_k×_ï>`n |WQQAÖ­§è›oW¶n@ÍY¯óƒÔ_}?PPŸOK/¦¸˜jošЇ„:ƒhÍ¥þÚúƒèh^ë»8 „|:z²¾>¬°ŽéRm}¡ªªŠ.\¸@Û¸‰ÆEŽ¥ÐÔÉÛ›å›qÖüA˹Bê/Æà¹¹¹lOXâìÙ4 8˜í@žÉùÅÞAžþ` ú¢µÓÊ.]¼hš+ŽÒÜ”¾4õñ"ŽTú~‘ƒVrOÊüŸa­ßÃW^Ç_¤þú`c¨6ÍXSœ?ž­13ÒÓYßTd$E ÂÎ+Fª»Ÿó¬5gbü°kcKmMëôþâ+Ö"m[Û<ÿÚÆFwý¿MA´Fzñ sàÌúòò2*((`ç  ¯ŲålÝ‘šœL SSiÁüù”²àù÷8Ï45%Åô³$¶OJêo}Tl!m*ù:~Òðg¢ïORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRòµø_N£aÛJN©mkBTúÎÊþ™vxœíà !û‡þ³€ „¶¥ªê7O¥ªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªªúzâêÁPãdymkBTúÎÊþ¢6xœíš‰më0]HI!)$¤’FRˆ?6øc>>~Úsm£®+ŒvÁu…Õ‘øνYšuÌ8³´ú³uNÒ?¤WP>Ê1Js¤ŠWiVÿçü‘ý_uKðEÿ‰Ï¸ˆ/rœÌù£Âˆ_âšgK•W]×±ž™ÍEYòclÊó,[¦ŸTœYH»T¾Ïàÿ¶›ùÿíííðŽˆ}x¦÷ÇL#}A› ¼ÒâœöGüžVË7¼—‘^÷}>“iÒžº²-çøèþŸiæÿì;}žLJø°ìXí&ÇTÊP÷3ýTÞ#¯ôߨgÿ®ðJÖùl eäý'ï=ŠÖø?…͘oéçùn€í±aöëì›ô½|7ù>šý?ÇôU–%Ë;«ï¢­ü/ñmöµžN/èãI޵Ù÷fóQÖƒüz{Èñ<ÓdÌé6éd™nù;è¯ÚÊÿ¥²Q¾–mû{{÷5í$ýÀûiѦxæÿg<Æ$ò"Í^¾%=êü¯”RJ)¥žS—ÚçÍtïe/ùÖ”ë —°a};kú÷Ô_µöyµ?¬9ÔšÉlÍzÒÿ}m#¿óGßüKk!¬›ôók(Ë9êGüã1»¿”Þèz–×,­Q¿&îlÍiV濊ý²Üû#_Ö<òœöÂ3¹Îžm$÷^9g —{9&°w³&¼Û:Ë™ë‰uõfÖšúºR…÷:Ö½L+mWÇôW^£§Äz%÷I—½î¥2Ÿ£î—lo£þÏZ¶f?¾k4öW¼ÜÇ-è#¬ó­ ?V/ì—c^ÿ·!÷!{u̵ʴU¦ÙóÙ·ÿAœÑý‘ÿGe>G}þ?Åÿöþv✽Žø3ÿÉX~j½úœ—{øzT§ôA·O^ÏòʰÑ>÷³?syÊ|®¶ðßG)ŸP¦U{× °.ï».Tæç}6žÚ³‘-Æ×F`‡£Ãp]Åkß…~Ãóbà ¶ О$Áwݓٱ„ÁñÍ|süñCo•›ÝA+Õq3¶¾lOàx@á(é0ða¹¯+?÷  ÜT,¤_¯7¸s\ÛÞϘ^Bl1)üCó•Ò+ÔkÛ(îFyN"8õ–dPCÌ_9ÈÒ>O0&l«4¸Im+þîënwîÛGrŰø™à»ø)/tih“f˜õÕ Ñ¸X†>ÊʨËEËÅòã)–Ô<,é6ös4ÅáÀÖ5›zàbð?¤¢Jðàö\<OM%O#(7ä6à:§= ªêýÓ‹YA£÷ƒH ¶«L s6›ÎMƒXêÈùBcX&ǘJ½te».Êöü¨Ï 3.je(”Ï?Ô?õèÉLÚjï³=€ÝÚ%wƒZˆizFTxô„$¯kPö8›E·mòø jAO™ñÔ×úÞ€«ž>~þ’†åÜàØ†‘ºéB9úµâ † Ö¤8U­«KCÃv´jbëL èåçC¼ï€y¯¡ ç;¤mj P.Ô —øãïDkñÂêwþ¡UÿE€3ôܨÁ”‘•’8xëUÀ…JÊü¹s£‰ž\„³èÉŸŽ+;}s­FãQ(KI­î÷¦XÝ›„ƨ ¹1 Ëúþ+Kú¨èdXŒ];JÄ£Žïcˆx$§DÑ×·Þž¢X`i× ì¨ëÑ@lÌûrn°m$¨Æ^×9΄ïzBGÏž Q=Ænfäk„Dêö¬e; <¨ýøaÓü>,µâ¢ž›jÆïk‡0BŸ[p(õâ$¿º‡Ç ‘ÛöÌpý4 nËËq`”XÆ“ù úvϵöèÙ.xõHnŒûorŸJ¾€Ï5¬ñÁàÿHàu©‰ñê뇗 fà§ í××a앆‰[Z:><ÇM@J£9óý¬â$Óq]¡}=H… kÐþ3ÆÊºã¯ù鲺t¿Q“=‚, 7ÆÇµß»ýìêçs Ä>ã¢3ø¶ïÞÜ6[¦Ñg•¨— RLت¨ù­?·( &wÝ.7C#~B{‚]¯Ó ×â—UÔW² 7™Ò1jk~‚e”cG»¿rËÇùÐãDØ.=ôËK´ÜîëÅ@ÝWÝDZMû0å€ãûíèä¼0Î\Úòxó®vÏqßNZ¢ >#Æ ƒ„ŒàBE— ™¥)•‚º&yØA}tå?Bûê Yìm(ÂWIpáɱò€ñ ¸|½2—+èýà\2·ö íÞ)lÜ8·ÖtlÁ@Z.B½€£ï•eñ…‹ƒRSßôƃm>d˜Iéþlþôò'N a†dÄ¢G3¹%†¼#«)?è¼Ï$sß _5=²íYÇBR#-k"qGP-Ðeþ"çf­ÁÂá%Ö©-Ï“37êÐäÌÈ8ÔM9™ÏŠŠ,¬èä_*n;H‚ÁúÆEBƱ†Öcl¿~øÎî±ç Ë[ƒŽ/saŸg¸IE2å,zÒ1Út:’kLÆÓçÎÁ¡ÍíÈ™壋G)æÔ{7ÊoðËÅnd¨ø¤è·ðá•{@rõP˜>ÆkÂwŒk×½¾¡ #¸kXfy‘ÖEÇ÷šÈA©ÍBÂ9ÂuM°ÛÞ4P=¹_Ól’ÆgW®Ø‡ÝN•Õ#–_n™‡Gï¤pp ,Z…ÿUu›6È“÷ÃV¦›Ó°¸å0EK‘7*|·ý]¯{ü75F\éÔ¶»úzQØ z!á‚Ç uH€>îÿó¦upš²ÚöõTÙ£»o3P)ˆø´[à^Õ6ãÖÚóã` -šd&á*=¶%ÄÀÊfY’<¿^’ƒØ·`_6¨ßÈ|h¸Ìë3Ø¡>€„2 Pºúqÿ×7ÏŽ³ ýÕü,Ns¾j»F™=BµŠü` ¨í³•C§òöiŽU’)Ré@LÅßÒ®„‹ÿ‰·Ç§mb<2FH“Rq°²ùF½åãø÷Xºi䎲õOm¬GAýÝ·ôÒ}:¶*¾Ëu ÄfØ:@Ê«RH™.òÙ6Âñ¼±Ã6Žjå§cæGOpO- ú­6HÒýúÜÊKÉJæÛUÀÎì:ºJǃ¾ŠýÉvÆ,¡•¸¯3ÿ‹DìZ‹¹EñÊÆ®ÒqqðìØ7p?¸ƒÈŒÞK¬÷Å%ȧ$;â¼?ýQ¬r6³pP7`¼a™†¸é^=„„ýÉRç¶_†õ™³)m£„Ç>ÀD3#£ ¼_' çIþÂÉ­uÍ‹CÁÊ-Rne㯄³²Ïóss•ÀîLÏÌ<È­/µàR)|Lt_1»éòÁ¨L¿kÇ=‹rr 4ùìê§ü/gýšEÀrþÀ~P†¦nBß[ ®\g[{¡«‡’g£ãYÛvRŸW'†‡ {Fe°m1ïÞŒ{ Ýw¾LÿÕ;7¨&$‘çþxúcÚøÃÐ0Ÿ ŽžnÝö‰óí&úÚuÅ@5sCèCÕ±mœñ8Hƒãefñï¹Æt ’Îx{q(a¿²ÛÑ‚a¡?€ŽÐþQ“%ò§ÌlÁ¬ö4ô‚¤Ï‚xmWI׆€Gí¯¦CèÒôì1ê’Ûk×QÖýŒ3iJhÜ,Çÿ€úãú‰KºšRˆ÷ÅÄð¢ÄÂÈöÈO`úÈç…ʲ»†½þ4á)ú%ˆùÔb6îB8ý\ ³pµõšÉì«e<êºíS鹂ØìÚ+ÓjsðÄpŒ„¸ß%<&t{3?Œ£¬|N)p7b™Ôîãé?Ôa¤iäDµWl’¡½ðˆX—ŸÀZÚ>;uø)¤ko)#WáÈÍSšn®cR½xô”{[ÀsXv1¤¬95‰_¬¬0KéõÁжՙ7Ú>žTp¡5‡‹¸Ù´¤l3¥Sü"ØêLXê…ç«[á5mö¡ø º¿Q="u}ö‘ÆpϘ*xböÕ‰ºîã—ã#iM+³ù@»Z! þ·Ï®~jàÒY”ݬ‘¡´Ò$?5Š• mtêuˆ] ‡%Ž@Ž÷Ý…:4h8Ûƒ¸˜¡»tuì3À;ú ΑO¤1A/r‹¿¾™ ÆÏR*5ÀÇûÿËìiÜ&j#Y2:º$Z(a­dæ@ß>'z ž„×L¬¯³¬Û뇶©½6ZÑÀ8|`Æ6Ý"åŒX1ß_€z' îF-©÷»Ñû?°úX^ò A:?1¢;ØÌh/KžVB'õ üvOnÏFSò‚¼É õƤê°ïÌÞQ{=kh7™ÀMå¯ÀwXQùpü\vïÍ“ÎO/ÿ¶.ÅöÚñ¹ ôN3·ÍHKRðÉlŠK–"›qò”‰^Wܳh¼1wtùã  h@§¬Ñ3ðe6þN|–’¶Á©‹I;yîó?8t[ƒ[é!‘ ú¥µ$,ήL­·e–"z¦å%IÞ†AêkÜÌRäl!3uú8àÚyßë?_žWÅé½)ƒAbCÒõéõOù!rz¿„a¢¤5S±ÍnÖ—£³ˆ#Â<ý43yÜ6"ª ÒRýêÑô߃C‚Qå¿&>¸[¼# BHÍǽß{v¡eà×kOÃ×TÉlq(UHð͵h »Ý”8º,@t°µöÈÃÕ‚LÛ{p´•ü‰/Ø*ËL"d_y ïŸk,4î GÌ–ýÑbD>,ÁÏ.ok"ýD;†|7–[.µDÖCíAœŸä#‰iÇæélÿü¯‰ÏŸ¡IÖ¬ÐòâóÞD¿q½]+ÞeE •ò–_«-- ™ƒ¦ Ú°c©›³èç€^ø¿¥Lô˜q±1~ëCßC“ÿ”øžC“9¡ŽgNäóýÿû“õHÈ8Bkhêç«JÁŽ#Z¤-`úVo§™MËa 9r$îÕºZ-¼hókhò ?C“$· û^–ñtÄ÷¿9d(‘8PÝ…]Ú¶š£×w[¢wléÏ;µŒd•Ôn—׆ôoÎK«èdù H¦Þ„(Dú¯…¯Ÿ¡InüIÌ Mïãü_(ù¼ðœ’îð5)6H/öõÌYÍ1‡¸ ±QRæŒk,nËÖûXH½­ʉð‘ƒÊË?>ÿšdf“ç&6³üü½^EJ–m‹ªétÞÈ{¥C—µ›½ÌC¬c`½îÙ0Ê…v5ÃÂx<äƒó\9Y·Ýÿcáû×Ðä}1Ú06"×´!ÖóŸë9êdl:'– û1H"Áz'7ùQ‡q›„¹Ž¾¹ÉŒí#KâR.ò/C“»VÖÜgÇQ×Ȭ¨åéãó\ âì`¸·?dÜÛ1y³”åuMÛ6Ƶ8ZX]8Ãø^p…ªwQëE¾ç &­1frRšÁKiûñçÐ$G¤ÎÓðÔÝœÛÇЕŒ¯ðh3'À®Âø”·“Ç{¼±š;;Ö~F öKî37Ðkš–Ìu<pöµdÊŽåèˆ+C¨š¤™ Rá‘÷Mz¹Æç¿7)nÒ€©æöÔ lEGyÍl½‡:Ì‘ÿIÞí’o±BìÞÿ—S%|ë‚ÎЕïsTuÆleÁõ’bšA}A¸ëæížÍ´þ1ãý0ÀA{ÉKù“ʘÓº¼tjÑòÇÐdLI=rž ¢PRgóûÇó_Lb¸R³£é Åžël?«â”ž)!°Ö[«‰FÂæoÖç wi&k^”CV(t@püW2Ó÷²ó{hÒxH—GRn²͉ŒeCbúxÔ‰°ªé6GÁ³©÷‘¬Q…Öd27\ÌØ«dœS‘É=\»F§f*¼0é‘Û£ÜOPúÇ5(r„Zß™xQ‘Z>¥~G AeN-õãùÿjYôÜ7—Ò¾n;ún?Ó¹"P·¯xÒ}‡·•/àNäöÞW:ÝŠ&´—×¾†Ù:x" ꭥу;†ÄRç펔¹ ®cä›…Ñ™õ±ñÜýüýElmG§a= hò¨BG_æu…³×YnZì«­FYs ôUéµ"zM&Ë:ËÝGn¸Ïuí.õDX‰ƒÉ5XnšÁ¡ö›;Þ}¶Ô«%XO?½~2&ùÝØî¸Frjj¢¢…8ˆ› yAÊÆä*±W ¡³‰€©ÒIÒ˜÷“9/¹§u‚b)õZ³l:ë sá¼¹ 8²5ÀÀJõš>~ÿi´œÐó˜I¿þ3YÏÔ•;ç:#hEL¬×[ROd‹Ê^GéšAË©fß~Y!ýËÐäEåêñn·ôü0¯~Åà/«AÝò –Kåm÷‚±>^ÿÝWY¢q†"µ¥â<цFвÎë*c¹½:xÛw„|¤Ížw­—%ýehRg°åØúæÜæd¿9ç´üÌ•ªËÃvž3Àv Dg™hç>>?ÿò3é‰hŸYDkgCã(ʹƒªÔ•ô×SÉ·†¬Ôœ|è 2QÁü94©(ñ½?OG•Q34… fëcc³¶PopT€Yaƒ–W(£>Çÿ@­tãX4ˆ`ðLG¦Ùžp•‹É„ãaïãšÅ°l\¤[9‚cû26óâU M6f,ºŠò¼Ë'›¤…žCÐÖñ4øi¥?W~p¯sÏ ?žÿk³ÞA÷×KÃrŵÄÅÎk@–Ið|>^xðs¸?ý\Õð`,DèäõÌ’©Œ°Žû5¯éWÛüÉ^£èøçw €DÓµMˆáøXf_8<%|8_왉pPó1†…ãî„WþÀlm߃˜“Šf?4žý¼»:½òÌ“_£Ô”v ûûMà;kž:pÍÖ²â_ÖùásjØŽqw]$F‡£}ÿ¢»y« ××û,b'Õè°N‡Îþ=Ôo¹öÖôÔ0, õ¨Çÿº»â~–ÆM‹ƒÄû Y•R´‰¥4â6+!”}@~u‡j°ctCÔúàõP.ÅY(ýxÿ׎ ½×zµ?70ÆWXFÜ£¾oŒ½·¯‹3z‹Š€0°®Ác8¨R£êG±¢g›0àö ¦T—Uëøò„½»‹w­"/4³ÞÖ÷¿¾îC¾Q`[{O³“ºcÈn¯]•¶+•{Û{­ç¼ÞÕÎ N!3•<®ÞÇVí‚ìyxé,!C æ™b². êlfÖ×åÁø'„ÒÁ\ ןÎÏíãëgu,μ·¸šw-/ôß3Û¥ùºñíN°íâX(›c ƒŽÓâoõMDð‘sÊ¢a·#ü#0{c ÁÈÀð%µuDWCB¥Z€AéÍZ6»,Øçûxý (Z%‡±µØçw€ÑÀáŠHbhTb2ùþ<$÷Æ*cÀ¼ænk÷³”_÷וð«Ð÷¿#{D+B<™!âÇüS/¼gÿÃ`ø9”­.^]ŸÃŸ™ÆCíÌ+>™ì3ïƒ+•ý5Æë]¤q‡„Äp¦j' r¯9µ¼FDȬ)~: ã躟—9GmÜì“x2’¥ù-?s–raG"yvU³pa;R«çãø÷ăœ ÌAŸ\&ú¹“ ÿ?#Äìn Ûí0Úee½´“d~o’qå¶­¯!!DzP^H)>¾oµëÈ‘.®Ä¼‘Ô¶=Hy»7´S´-M½ á?Þÿô8y£c¶Î™ß§q„|Ü#Þ5"ù2Б ‡lµm#—ýU‰ÑÊ»ìýeüΤÎV†ÎÈbMƒ¤Í˜÷jAÌc7¾Z ä]> 4½gbö Äýñõs 2WRsKgí6Þæç 's8qzñTT[”R›[wÄÍ)I‹—9ø5x¥ŽÜWjýÚ #”!nN+zP’ÄÚ”â ÁKgâ²ÁÞTEŒ,ÂÁùÇë?³¥{é^R¨DÝ¥=´R¥u^zîc¯’§³Ì¥&D¼‰'i74øSËJ½ß”í&H¥æU©Gà»[û‚ácrÃͦŠ<ú’‹¡׿~þ‰4}Ú…žíh¢°Î;¯üòlpAZð´%’XÔZ;t®Q?„±÷÷žóy™ïk1+Ƴu6Â[«©ÌÖè† áDõ™c4¿ÆœÚóÐÝ*d„•B#!}Þÿe>Çsamh¡¹ÿêG3c^çæ—8u9󼵕⸈߂ÏUéy‡‡B;f "Yi=ÖD§ =Êâ‚Á4‘íŠ&¡Ž’Þ×|¾Cý“Ò3»Ä÷šg]Ø~üþ›WgjhSIXU“‘"1A5Fr4×{üáÜëAä—éljŸw¸TðÎá–Ýt6<ï/NÁ  \û¤õó«R¥tÇû˜a| Æi¨ÌÍ>‰T.šWo>>ÿxŒ•ϯ¼Y¼æÈ{ç··m,J²{gg}Év~)ê]Ñæs!?wøè÷X›‰æè˜G—F°¥l!7ކUœÖ|Cnáfï³…:.@mq%®Á臔±ÜÿÓRu?.–:¯èaBë¼ÖºÌÌE#Gƒg'yX«Dåÿu‡SWºä™ÇŠD)Œ˜21×ѵ‰VµˆagW¬àP޳²q½ç«ÏÈ’Ï Ís”?¶•@åg")ªíªç©s\ÖTòâô{Þê«f3g÷‰oÑþÏ^w:^ë¼"•Ý{¹ªd#³!φtà}©,nÆyWFKv„X”4–ƒ|<ûB+ è®Â8ˆi=-;´³X 5l=/xlêóŽw•–å÷n³]ì à+SÛÓ¼,{Õž¯/ДâV¡û»+<< ØÌ¤®Ào ŸâÞçèÔ‡eNpù^Oÿþ¼ÙùŽOv qR¶ £wHF3ûÝß=oý;ü`~k’RÏwCßÏí²”u¦ãk¡jE˜|û‰qÏ©ŽÔ‚KV,Ï àÏ*?ÞÿþxkáÜ}QxÁU¹éœ/MÛüÞÄÂá= ¤Õ°pý¾Êæ=çŠÎ^xúBË÷ÞÚKx«§Ó@ð[òÎI™¾ÔYB]Tª¦âž™çÿúÑKqÉ.á½€PÖÛwÿ¼ÃÓAG\ôšWÂÏ‹Øâ9ùãÏ2S³—åA\è“Y\œßy=ǨðGj÷¾ÌéÇõÕ¢ÂMî@âŒtÔ‚¶„vD¾üƒzÎ+²ÙÌBĺ\·Ÿ¬ü¼ÃÕ¬…÷Ùë6ËÛk™6Lþ¸Ê¦ÚRß_rýnl|UAϯ< ¢¹Ë|¦²!‚¸;ºÁ8™_1ÜgésÞùÆCŸ‡ÿ¿ä >êVB‰~æ,¶¹® Ë˜_ÿ&f™äÕjpñ/WÙÔÊwaùO ¼š°H 3ÉÛûþ¾I`˜ÈòuØù»õ¸1êͤÉû·ÈÏ÷ÿå+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò€ÿÝš™w)¦÷ mkBTúÎÊþçpxœíùS–×Çû¨ìˆ¬*âB\Ñ#hTÜ—$M\Šš¢¸$Ñt¦UQÑmšEŒFA´qIMƒâ†U#±‹èÔhcSÄÁ QÔ=}¿‡¼Dp)Ë{Ÿç¾z¾3gbòCîõýœçžsîJ< ±gÚ~ADO2³û&&üÅ„¿˜ðþbÂ_Lø‹ 1á/&üÅ„¿˜ð×ÒÌ’­øÛ¸­çÒÌ­øÇÇű-Œ§ÄÅ‹éƒ?|@ëSSi_f&åææREE…Š>=Sf†lÅßÙÁ‘ÍÅb®NÎäáæN¾^ÞÔ9 #…†ô¤áýihD ‹B¯ŽCïÍyÒÓÓ©°°JJJ¨¬¬Œîݻלþ=f´lÅ¿S‡€:ÖÑ¿´÷'ÿ¶í¨¯ùyû°?X ÿŽÿÞÞ¯-[P·î4mê4úbëô×}û(ûH6ݾ}»©}µ[3Zªø7Öà+>ž^äâèDŽ-[±oŒcÅΛOË“’èäÉ“Íí¿Ý˜‘Ò…}ëЮ=µqoMN­ÈÝÅ•‚{ÑàƒhJä$:°?•–”Reeå3é ÂÿÑX‚a`ÇO /·m£cG>S~ üfÈ![´d_˜1m:ý~é2:wî\sþŽZ˜‘²gþ0Ôˆ¨9`½CC¹¾Øµs•——Û¥ÿ¦[[ßÚú¢[à ´üý$»ŒÂß6yƒ›eL@|˜m©-·6çï/üíŒýøàëåC¼B©©©tãÆ ­}@øÛÞྞ55Dïž¡”––F/\ÐÖ„¿Z_À¦[·n5õwþvȆ؀9GW7êÛ§mXŸVgÎÙlþFøÀóÌßjÈà ÂÂigFUWWkáÂßXC݈ñ`rä$:qüøÏ¿“I~ ü5ÄŒXsìÔ™ÄÆRyYyS~/áoç†y¬A…[rÄ=»w›âÂßüñkO^mèíY³¨ ?ßp?þæêE7gêÌ{ÚŒôá¯!?ôóñ¡Y3fš}ÌšBÙGŽâÂ_/C^€=®]:v¢IË-õá»ôáß èPS#´vu¥¹11týÚ5¥> 3ÏÖœ#{·ñ|d/öÃCaŸ'ÆO³ÙÙz,@<9|8;z¬)¿­ÝóÏ:”Eé_¥Óºµkiib"ż;›÷ç 2”ú½Ô—×Û°~ñpuçñ~¿0›¡-|Ÿ:Òî]jæ tæÿÿÚ¸ÿ>úîmúüsZ”@ïXjé‰ãÆSïÐ^ð⵸֮n<^˜Í²9†¯Y½Ææ>`¯üŸ¦œœÚ™±“6nØ@sfÇPhpyº×ÄøÆ{‹ˆqðåeK—6åw6ÔÌæ__E/Rîé\Z•œL#‡ § îÝyOÖdðmÙ‹/` À|Ñܘ9µ{„ãuåÊ‹/¬¢©¿Ž¢^–ÂÙÁçäu÷ë¾3äoMžB%¥%ý½…=åäü—þ´q#EN˜H¾ž^#ðéî ¨ÆŽM…?þØ”ß]©Ø«p–üLn.%.^ÂuE[K\À˜ kÿÄAÄÀAµ> üm#ì×ZóéjzmÌXw™Íû±æ@Þ–þ:Œ ¸ï:ø€½ó¯•å'ÉØ±ƒ¢£¦² WDn:÷‡ 9|tÐ+élaaM·…¿MU]UÍgÅǽñfíbü€c‹«%CEE—¸ÏÂ_¾>xó®6ÝEb6« 'DkÝw.üÕ ç¾Âû…ñ‚N9"Æ&ÌyUýtïðW'Ü1”¸d vîÂßž1! ?ßw²8aQm?öç…¿Uyyyôæë¿$7'žW45&Ô̺;»RjJ ÷Oø«WUu5mÞ´‰ºv ä3f ,9ÊÖ-[¸FúÀóÈß*Ì!M7žã0ö*˜9`,Â?ÿu¬fÿ€ð7NÉÉÉ̵¹™>?2x0]¿Þð}DÍ•ð¯Ñ7YY|Îë5f­'ðWwš5µ¶_ª}@øÿ¬ÒÒRËoÅ>€¼ÌŒ±ûIqWÅÒĆïhŽ„}= „øxÞ£fV}€}/~Þ¾tø›Ã5=þ†kcÚ°Ž`F,À΢_¹|…û#ü×?ÿþ æ±À¬8€ûN­w¨ðáÿtåççÓK½_äœÀŒq¾÷—m_r_„¿9:[x–ú[jÔ‡FóG‚{¾ÿÏ÷Ü[û€ðo˜‡‡Ž0Å\(jÊ[µ}þ樨¨ˆï 7:XÏ›nÙ¼™û!üÍÓ…óç9/7zÀº5Ö+Ê~:sn+þWñ¥K#爰·÷Û—]½Ê}þæjÛŸ·z†cSËV|ŽÖ*áo®Þ_¶Œ×íŒÌƒºv£kåÏ#áß|ݽ{—fDGsf”`ßÒ’„n_ø›¯;wnóÞ ìá0‚?æQZï#lªÛ w¿`®Æ¨\{‡ãæÇ5«þ¶Õú”jãfÌ€z°£É=Ãm =4kú ^»U͵‹­m»±> üm¯¼¼(¨{~kƈqñærq1·-üõPzúvòóò6d/)Î6Ο7ÛþúhjT”!óØêғϸAÂ_;w–k4œ-PÉc ò?üˆÛþúhå'+9GS°_tôˆ‘¼‡j¨µÂùþ1£F+ŸBŒqhÑ’ì?Àí }´{ç.Cî.ÄœðäÈHªªªâvâÂßýjüCÖ‰1/Œ}jð×Gß?Îušê{'àc ãr› ©…¿q›1¸wBu À׸o[øë¥ììlþþÛ+¬kÞZhO;¶oç6…¿>ÂݪkGK;o~vŸÖ'áoœþvø0£*ó¬; ïO.œç6…¿^;jŒò9A¼§qèëCÜÞÓb€ð7^¸k{ÅT® à>)Ü!aå.üõÞƒè¦t>ñï-ݼy“ÛþziÕÊdrvpTcò~Èãöž„¿9:qâ[êX{ï› ÃÿÛZý„7mT¾W€¹ ¼Q =i.Hø›§”uëxŒVµ.„üo/–]-ãö„¿^Bn¤l¿8r@œQþlMÍ[„Â_?MŽœ¤4plÑŠâãp[Â_?íÛ›©ô>Ì3LŸM÷îÝåö„¿^Â{—§UÍ#¿èÚ¹ :õ·W þæªâNßí¤rM1ààÇï þækCZÏ׫âïÔÊ2vdp[õë@áo¾2339TUà ÂoæÎ}äчÿ,üÍÓåË—ùmPU÷̯ðNêõë×¹½F0þi挙ü. ª€=¥%uÏ}„ÝËÃSÙ\ Ί_´Ôð×OÛ¿J§µuàÞ={¸-ᯟÊËÊ(¤‡º¹`ä—ó~û;nKøë©°¾/ó8­‚?μ6öUnGøë)¼K©j_ ø?n-Xøë£øØ8椎·#üõÎl¨ºW{„‡ÓŠ nKøë§ÜÓ§•­ ®„‡PNN·%üõS~^Ó*æ¬ïfîÝËm ýt¶°ßúQQb^ÁÇÓ›Ö­]Ëm ýT\\L}_죤À˜‚½¦+’’¸-ᯟ°>3jÄ%5€õލÄÅ‹¸-ᯟ*++iʤÉ|—“ŠÐÅÁ‘.ˆç¶„¿žš3;FÙ™œ7ZÇí=µha‚²»ƒÁ?v~Ýó@Â_/}øÁ• äï?V¾õÙê5ü¾|ÿϧ֧¦òý-Jò?G§Ú5`Høë§´õëùOuãÍ[òýë©Ô”uß¿…Üüº÷B ½ôéªU–øï ìû¯Pøë¥Ë—[¾S'e߬|ÿZ õî‹W6þ«‰ÿÿë>]¹S'k 5òmkBTúÎÊþèfxœí½TUçÖîÿÝñ÷Üÿý¾$VúÞÔM/ÒÔOŒé¤H¤Ú{]ì½÷ŽDEŠ"Š]°wÅÞk4Éï¾k%˜˜“œ“D¶bÂcžíÈaïw­õÌwÎçyÛ‚Z{kûþûïIJ쌶†&æ*Ój÷uêÒ¯Oß×mýAÿ/ñµßòZ«{òä a!¡èië¨ÿ†uë1 ¹­ZükžÝ¹s×Ö.(”ÕŽ½™‰ ­†Œ1Bn«ÿšgW®\¡±“3ƆՎ¿©± úz fΘ!·U‹ͳ³gÎÈýTed\íø›ÉŸ×o۪ſæÙ™S§PˆÚ/Å@uão¤o@cG'Nœ8!·U‹ͳC¢£©¥îg(8ÅW_6çÙ³gr[µø×<›;g. ]µà/Õþ6‚[Jö'°¯ÅÿXj—µpÿ*ü]kñ¯Ñæíá)×iuáïïë/·S‹Í´Ïš4}ÍÓ«½þ+õéݳ§ÜN-þ5ÏÎ=K#[µh¿*þ¿yÓ&¹­ZükžÍ™5[÷‘ÆiÔ¿ôÛ—/_–Ûª©ø÷ÝwÕõSœuÍ슮¦¶Z°—ÜÄÀˆ›7nÊm©ÿª¿{{ùò¥ø¿g ÄFÇ Õ ¡z°œ¢©scîÝ»'·¥®þ/õß?/]âÖ­Û¯¿ÿC üÔî·ß~[mϸ¦ÚÉ“'dî§.í§«¥-òKæëg©îü/ý}U,ü;{ôè! —® ìàA^½z%}‘o_½‰÷ß¡&¬Y½F÷SWí¯÷I²×eËmýIìÿ#þ%{J~µ¯Êßýû>yæ,óWf³eky;vðâùsΜ¿Àªµëyüø±ü7ü'M˜HÝ?Q[í—~{[n®Ü–ºð7ÔÕ§cû8ö•–rÿþý¹ÇŸÿV•íÞˆÙÛÈËßÅŒ¹‹X¹n«¶°*{#ÏŸ?«úâùä/Z îß»—»J]=µ`/é>[+kŽ9"·§.üôøŸÿýÑ×QèÀŠ¥Ë¸yóæ÷ZUÏ«b`ÿ‘r&.ÊfCÎv&ÎYÆÌÕ[YWÌéÓgÿå{ß‹< Õˆ·å˜5ÍΊ(a¯Ž9?É5ë7$¡CG^ ^%™ºðß¼i3¾žÞ4ø¤>ýŸÿFOK/O¦N™Båõë¯ïWú­óçϳ{÷nvífÒÒÍÌ]¶Žq3±dçAVlÍçªÐ©ß|ó W¯U²ióVy]Ô_Õ$Ý/ñ3µåþ>¡oï>r[oýïâÒøÂð¡ÃhdmG½ÿ©CýêÊšÖµsæÎãÉÓ§òß=u~íúMtí;ŒS3xÒ|ºËbᎃ,^·…íÛ·‘½mSæ.fÃÆM"^¼~^ß}÷û¸å‡bÞžžjYï#¹Ä'¥Ü2cút¹-uã_e{vï!",…¨Ú 4Ñ9HOKWhÜöìÝ»÷õßÍ]¼Š¸ÃH:™„C™¹©„Q3–0kåflÜAÞ΂_­ùUøèÜðܹsrmVט¯¤'ÿùùܽsWnï]á/ÙÝ»÷˜0.‹&öÎè6ÔF»ž¦ÈEu±·iÄ䉓y!úôƒè3t4‘idü‡ÎZÃà™+™¼®eÙ[EÍúFÖž?åìɓܸq—¿1>ô!æ„áÆÉóýêªýRßwui#·õ–Øÿaü«l_É^â¢ãPJ¹ ¡” 4Qˆ\Ʊ£Ç(Ù[F|f?¢ºô&cøTÍ\˸ùk8^^!ÿTQ e±})ÿ,‚²àHòÆŽ¤âÄ ®nyëÁãiïC‰iNpPÚÖúK.ÍùUSíÿÓøKöàÁCfLFSGgQ´ÐÓÔE£n;4fÊÄIŒ›…oH4±I6í…%ò÷oÞÎ>»Pî}âÆ­:nÑkÁ6§æäF†R< 3ù“p¨h'Ÿ¿x£½*ükrä =.ᣮù^É%íwæô¹½÷‰•9}š°¶!"hÉqаNL iÓ²Á„Çg9h ÷Ÿ<æTÙ!¶7‰âê'>”ëz³KÇ…ƒ ]¹¡åÁ '/^Eùs§—y݃É^:;òìåO\¡&óéÚú÷íGý:uÕ†½Äýì¬mxôèÑë6ßþ÷ïÞæâÅ‹ÒUðøñ#FE#+[‘¢«¡#ò6ÎìiÑÒ•Í9ÛÄ_}ÏÊðÞìÑ %O?€…'§t}y¬ÀㆾœÓt§ÌÆ=Þžìu§¸G[öMÏ$oÙΜ9Íwßÿôœ«¼&™4.bci¥Ö¾¯ÝPCð‹áð+Ïâ]á/Ýç‘cLŸ³¸ä®Œ7‰]Å%œ8y†å+VãççR[Op½>µô8d0›æ­c®]ó£YaÊQÃ(*•í8.b G§%y­8ÞÀëÆ^<ó†ÌHÉõ)áä-Ëãoöû?3/¥N›7g®\÷-LÍÔ†¿4æ»}ûv¹½jÀþãêÌ9æ¯Ëeü²Æ,ÍeÐìlºg-!mä,2†MfØäytï7”Ï!jÖûêééÐÊ¢5Ýlº1Á¶;¹–])5ëÄ&ƒ –è»S¨çÁ mžiùq»¾g”nøÂÒpö'{²±GÛVÏçDù¾yõf=¨ øKz¶ÙgŸ«µïKý©åW-¸|ù’Üæ»ÆÿÁý{,X±†E›òÙZTƪyŒ™¶n#¦“*´~ê×3Hè7ŽÈ¤tHL'#½+^ž^‚¯(ÑÓÖ’Ç œM¾ §}?8Œbªef¨B(4ŽâŠA4çÁh»’«ÕŠB k¶áŒµ'ׂ¸Û=”[c"99£«&póÖOcÐUœà}ÆÁ¢… e]®.Í'÷ý>¦wÏ^oÜ÷»ÄÿáÃB£ä¡àý§ÊËYŸ›Ïôå›é1r*¦,cØÜ$OlZ?®Ìæ‘à{.§]PŒ·[žw,¯¨`ٖ̔”qûÇ9áÊ«WY8†,‹ž µD¼À¼“ý:8Œ&Z`ÜÑq žVí1×·œPCÄ6M¾¤§Ã 8Žc•u Ì¢˜(p_àЋ‚¦c8þéh8÷f»]v™ûSÑÀ[u\ìÂéi¡lœ•NñÞ½|óò§ëU'/ú~‹/›«moO•Ks 1QQBc¼zïøÿܤùÞªu½‚}³wárÌâØ¥Jf¬Y£Íc˜iÝ^VI"ÐÃi ñŽY‰z)rB¨]Œ?E!8¡ŽàÒZ“ ‹P&6™Êô&Y µßµïMw§ñŒ´Î|«N,1b½¾7ºn”ÕoÃQ­¼9Ó­-‡²ÂÈYйK9#têÏMøKë»Ôu¦ËÏ]âýÛ¶m{}5ÿŸÛ Á÷ {fqH'œÕ¦áŒ7`³yÍãe•”FC"<Æ:™‘ ’œg’ÚtíGÈœÀ@¡‡®BcÁ <ͼH²ëN¦Óz7™Bwç tñÒÕNÔË$öªâ¸¨lÇí@7ðå¹ßøóý˜ö|¿-‰;‡SÙ“?“§¾qÕÒúim¯ºÖwU¹T[|}|¸uûÖë{¨‰ø¿¿U1=&ÁLÓsa‡q„Ðt±LQµc…e& múÒת3]EŽ&úr‡,R§k?‚PÛL|¬â±2°CG·ZÂ?3iNšã×"gd‘ÜhNcè×x:3E É9¥Ì8–ã‚#–k{q +ûŒÜØ×Ú‹ýqTŒŠâøªÖ.Ëäè…_YsV q‘šNƒºõÔŠ½4–а^}&ŒÏRöÕ†¿dïÜeu×a,×så´~+Y§Š!Ï<¹ælÅ ë®Lµ`ŒˆŒFƒðù ÞqiMâgˆµ º‚*:89)þÿMf2¨Éú7žM_牌°ëÆd³H晄²Æ$Œ­†a)C8 È1 ?ÊøpÊÐí6-YÙ¥/§~œ+«.+,(À@O¡¶uÝU.'5qræö-µõýjÅ_²ò‡9h"c°ÖЗRÑO‹T˜© g¡i,ë,2YlÝSð¹Þ$Xv¤£ˆ©D‰Xˆn4˜ˆFýq6n†RðB=¡ lE<ÄØ¤2PôýLÇÑÄÙõ"Eà?Fp‡ev=ɱJgY‡ŒÚs ‚KÊp® Žx³~wÿáÆÙÿõOr¿ˆæÄ¾#¯¯ñm8¡´~±uËV >®îº/ííîÛ»·:±¯vüoß»MYhwŠë|E¡®§Œ¢)0Žd¡Q°¨ Øn–ÌF‹TF }×Côí!BÆ Ì;Øv#YäÔ&‚8Œ¢©ñWè‹ ¥W… žæAt±DOçI pžJ–à„óí²Ö¦Û-Ó(1Kd¿q { B(Öó¥Àʃ/?ŽE°Ã­%‹zuçÄéóÿÔ†úNôž”ûÍD~¹qãÆ…¿¤*Ï]`{æpʾT*ÂÉ3ôg“AGE.اŠg…i4_‹ü=ǦÃmºÑMäý¢ÿ÷³Kºã:;M•µA 3?ŒDԖƊħ»™?½'3¸é|ú‹ÏqŽ£Xl7ˆu¢¦¬±èH¶ˆ±|myñŠ£7wÒÃy´¨ S9·;™[Fr¢¢âëý#1°kW>F†ë«g]g•Kó‡ò™Žýú¿qþUvõÂE˽ÉÓs£DáÇyƒ(J Û1Gh¸æ‰,¹{€ˆƒi–)̲ëÏ8‘ÿÛM¬mO‘FËãî–Q˜ê«äq¥¨_ªZ .8’!ŸÎg°Ó$†5’b(yfQì< R7˜‡ ýxÜЇgÎþl±L%׬› CÈQxS`äIq3Oò|(Ž ¢ÄÓƒE¾`Õ´y¼úYùÿy¸ví_}ù¥Ì÷ßEÞ—æøì^ï³ý«à/ÙKÇö–’‘εú^ìõ`½¢ Wu‚¸¨øa=è"U;¶m¸LÄÀB뾌Z?Ú²Iú’*¸`¢ðH¡ƒ¬SùÔÄEèCm™+ð³Še°ÈcogÆ,³ÖR¬ë!¸‡×”žÜó âñ°ždwᛊÞ\.Zti"»‹¶ðòå›PÚ“¥öyÝ*—âKÚÏ¿rùŠ‰Å¿þUvãö-ŽGôf_–5hÁ-*µÙ¨ð Ç$RÔæNl1ïÂZ‹L™ÇÒÓ*žÑöÃèï8žŽ†e“Lwlj$8Œç U‘—uP(´D,(pz±‹àŽãEMØjÞ“"¯ÜÖ á‘hãa]/îys+4ˆ›Ã¢¹µ*‰‡§{óâNwŽ”e²¯lÛy@šk:¿Ê54$( »w«eOWÅ_²ÛW®²#c;,]y¬ãMeCoÖ x@hÃ}F±”¨YdÃ0ÓXue®í@F mØYpÃÁÖ録É §i¢ö÷y %F }™*º´4õd”Ãp¶6 8E ;E^Éù?WGÄ—¶;;LÝ)±÷¢¤‰'¥­|D,rx` ËF'P\º—g‚Ìž5 ú Ôº–óç.í•x_aAá»Æþ½à/ÙÝçO)?ž[ŸzqÓÈKàãÊ)e‚–Ç0Ã8€•ªX6[d°Òª7C,;1Ô,BÄCfØ d˜èçqÒ¸¡Ã8Z™b(ú¿RO¥RA+SúØug€m:ý­“™j•L¶E<Å&±” zEðÛõü¹ÿ‰7þÛ“‡†Þ\öðäÐÀt¶,™‡=ZšXš™¿ü¥“ž’ú>°oøKv¡â'c¹Ñʃ"£6\Ô à²Àg§~ «„~ÛkÒ‘]¦I,3ïÌpUÙ¦ÙhžÉËLzXw&Îa)M/n&úµ‘Ò@æ… Q>3ùŠ§Ñ ýt>ÓƲApÊ"‹d‹Ð儞å:žÓt稆+åî lÞn1,™<+k[ •ê]×QÅùÙ¿í^$þ/¿ûŽòÍk8Ü)”–͹VÇ‹ºAB·{PbÌ1£ñÌ0 a‘‘ûU ìñ0ËLš;H¥Ðü‰Âcl{‘)ꃧE˜¨F-™4Sµ UÔ‚¡§3NüÍ,Ë,s­a ùJñ{ºÞO*ºsDÓƒŽîlóhÆâÌx,]†ÊÄT­ë¹¥ß–ê̺µkßöïÉž¿ú–ò½¬ˆOᬦ+·x±]p3Š@Në‡ >ÉlOöˆx(}·À$Š,ÓH¡ z3Î~©×îBógÙÍ`‡,|ÌÛ .¨+ÏIó‡†Î„Û$ÑÍ^è Û ÖX¦PdÏQƒ‘‚8­íÍYm΋¨TzñÈ-€S±B#΋·ÆjäÒÜ~|‡Ž¯ŸÅßÿ*»,tÁÑ„^œ×”tÁWBú‹Z"ò@ ›î\ÔkË9[ ƒ˜aËë>L9½E{f[uaŽM?& }ÐIä…f‚ªôÍÐWêÉúÐѨ)iN_“å”Å ÁçšE³È8˜u†Ò¡à"ßä븱£¡ ùÆ.kíÊÑô(æŽN}ÁË-Ô€½Ä÷¤sO<ù>±¯1øKvãÜYŠ;wg©A3®Ôuå¾Ð…{DŽ.¹ù¶fuYgàÇ:Ñ7Yte²E"ÓTal6Oa½eÆY&a“B‚Ót<­: RªÐUh ^¨‡“ñçtÚq²mw[v3½ªxNÆp^ä‚kŠP¡Cƒ¹ÔÀ‡³ìÓkΆö)ÄÇ' ¡UýgøIã|7l|ߨ×(ü%»óøy‹–rØ9˜çuÝ9¤ëÁ!C7ž4ô夆'k |Ù­êHžY3ö¹&‘ìœ`«YgúšE’(éDr£¾DYFa¡o!´¡4V¨Åç"ŒµëÅûáäÙd’ožÈvQO¶‰œ’«ïÃ&=w¶è¸°[« å·¦¢NktìO|D4ZÒ8éÛã.i iÝXçN^ßs-þoš4 Sž½‰SÛrHëK*šyð²Q¥:mؤô¡Â(–m&Ñ,±pDôÝ#ÆXaNËx†9Œ$Õ¦;£¾Ó….è"t‚ : -´uµø§Ñç ³Ic¶M:³E˜/øàjãrE)TŠØRøˆœãI±Ð£{ëµ$ÿ7!·c?b:Æ¡ý–ãÀÒwu„®”öpÞ¹s§&`_#ñ—LšŸ=W´‡õíSÙèÅ«Ð` ì])Ôñæ’~[^;õ¼¸¢h'¸\3/°éÆx›Œ4‹a™EKlû3]äƒ ‹v˜XÈÚPGpCC{úZ%°Ö¦yVéì3Oâ¸qg "¹¬A¥^(·Dí¹£ÀÝ(¬×œí#&Ñ©K2ºH{8ÌŒU”í/“ï±`_cñ¯²k÷ï±{ù\nf„²ßµ µ$FŽž'Ço¿§Â…/ Eÿ_gÕ ‚®9=×<•ué µ>Î~¾6]03öéŠZ Ã—&Ÿ2ɶl{°R|g¥¨%k Ø¢”Ö«¸³Sו=JWN(=©ü?.œû¨ GúM&>©3 E üQN(õ}é\ Yäûª¸øKöàñ#*–N¢8Ö‹ƒz­¸­Àv… —Ež¾§áÇV=ÁbÙlšÈ\£`J¥qU"³M#ȰJ¦›ÓdÒÏÅ]æ„&2БÆŒœI·Na”m_–.Yh)ðâ’¶—5Ü9«r爛7{|9ÔÈ•7ç`)¤tIEGû÷¯’×s ­—öãŸd5÷É=}ÂîËØìFeWŠM]¸ù¹•úžlÒqç q{V…Êüà’Aņ‚¨ùÚ¶£HwGºmoÍB±œPGŽM>Uµ¡—ó8Ža«eÊŒ"9¥1 éÅåî\näÅÕ¤.OmÏ©^mÙæêKÎÄxxùþîyaéüÿ_ÿ×ëÌjæþ’IÛú*öíçH‹Xv™4ãFD çZû°SéÁiýH–ê{±_׋Ûza,Uº3Jð»Å¢ÆO´Hk¡D_mÛL³p,”Fòœ‘Bð/MÛÐö+¬:3Ç4œeÆÁ¬×÷#[×lM6«\ØééÅÑ‘‘ìŸƦEBkN‹®–î\ ZµžçØÑ£ò=Ô¼?Xü%“zÐ…’2VvHädr g¢Ø'p¿ Ê×Má¾LÔwa¹y'²-»2É¢ ³Uäšub‹e&3¬Òð³ˆÀRZO&4¡"×/³íÉN›® >xؤ#gD¹¬ßŽ«Z!œ«ëËQ‘}áÍŽ.^äoÌbü´ ˜™üæ±ôß%Ÿ““#_{ ÀúƒÇ¿ÊÎ_¯äЂ”'ûrÂÀCäê6ºpËЋ 6ÌÐw§@ÏV³dѧ۱Ý(„ý&ñä©:0Xä4§)„ îg.8¡¶¼÷Ôx³@–Xg²RèÈu"^¶ˆïì2 ñÄiQn6 àþûp»Ž;ùæÍÙ0jnþ¾(Š7ê€ôoiNWšÓ_¾l™|½5ç¿þ’]¿z޲ÙC8êäÉÿñ`»µ+7ÛøqÐÌ…‚·š.WÇ*CŽë‡pÒ0š5Æ¡ôœo¸ãº:Œ§µy*}Zzò:3?zÚ÷a‚u–ˆXcàÇj…++õZ²F·ùºm8­)Úû‡Ð¢Ö,O€¹õ1 Rï“O˜>mÚëk­8ÿåð—lÑŠ%Œ §ÒÜOpþœ ä˜àh^œÑ"Ï(ŒB+ÞÔmËIE°<—8Ŧ“í îŸFR£Šºo¦oŽ–n}Tæ´·ëÆ”Æ3ɶÀ~ÓÎ)#„Öðç´¶;{µ[“cÑ’|WŽÕmÎY½@–§ÀÂÖåïù‘Ö‰<øõ5ÖŒÿrøKïULN쌵àV_´üŠE’ÈkÈžX.&S¢ü];Œ¥?ešn<ÕšÞiB®³êÉË4zXÄ1Ê~¦âc%ú¿šºõäµåQv™ŒtËr+¥f‰\üò¾N°<ýPéÍewö·÷§È©9EŽÁ,î?ŽFŽh4h@fZºül%«øþ¥ð?î<£FŽ”s­´nFÚ+c"xVÓ/>'ÄÓ—©)í9;,†ý¶®\¯H‘¨å&n<zn–n V›µg§y“ÍceÙI^K4Îa©v}q1ó}X]i5-bnÌtñ¹Ù¨‡!\Òöç~=_ž+}ù6$”G£Ûs0ɇµ©Œ?…ˆv<ýñ}¯^IïDùî}áú—Âÿâ…‹d½­<†þË1X©æ* ŒpsweýÄ®¸{qó#Ê„6,oíÅ9gf*[³ß¨=…¦™"­-&†ÆŽNòÞ×êÚs£µ¢uó̈ïÈ.‰¶:ð#oNëø²MáÁ ýPù¬ÉFÌ2 &Ï"™if±´“Îi²” ÛL,¤ñ!¡ Í…>Œ¶Ë`¸Ð…s퇱Ã2•ÃFÑœÔ  \Û“}Úm(TºPhâÊÙú.\ú¯ÏÉóë­»5fž¿Fà/™'­yËÉÉ%.&VÞï&­–æRªûüdé·ŒÄo·håBÏqlˆ 䎞‡¼ßd—Ž«ÈßA\Ô§È ˜%Fì5g¢È‘úÓ¥ñ<:8ŒÁÏJ:“È Ý:ØXÑÞ:‘þ"?L²Ne£yyÏÊ%½¶Ü×ôã¡¶—‹\ãïÇ~›–lüpÏÚ\ª¶ýü¼úäjÇÿúõë¬ÏÎfÆ´éòû°«ÆH$¼%Þ®Î5Ö’Kc±f6Vt óá[÷ =Ù­éÂy-_®ë¶eÒŸ†¢‹þ<^äT?‡‰tj4D‡±òùdfúòak£O)bbŽàƒóXaÊ&}?òuÝØ¯Ñ†³šnÜý*€›Û²3Ê‹Móf¿~UÏ\qð˶Þ%þUïù®¼vMÎé=ºu':*š–Í¿ÂP©”ß] ½Aç$ÿ–Kg Ûú‹»¦sϯ-GÌ]V¢ß°_דB…/g•¡d™0Ì®7Y¾¦«M*= `ˆÓT-"Q*ôÐ|ÀGÕŠ9Vä™§²×$Nð¾vSrDÇ›½ ](6nE‰‡¨/™ìÀ©ƒ»ÿ .ï_ZuãÿêÛW2/¿yã¦Ðâ8)r¸4§yøÐ!Ì_@FZ:>^^|Ú¸‰<ß)ëq]oiì}`þF-<ÒHhƒà öI猯/'¬Üy¬íG™è·u¼¸ jùc?fZ÷`ŽM_YwâkÁ÷&Š:ÐϦ'Þ&-Q(ueMÐÆ¤5}­3˜b‘È“v”ês^ן» ½¸oäÉeNt5%Í“eýb9t°ê,Jõa®ü‡B÷nÝˆïØ‘àÀ@Zµh)×l‰—KçÝKs\_“ÎÓò¬Jh¯w‘Óÿ¨Ëcâš ŒèÈÖNí(ñrã³/®œÖð⬶Yƾ¬±LZ ¡æ1ÌϳéÃ8«TQóSðZPSž/4ÆÍ*žöN‰³JšMWF™wd‘Q¹º^vðâJl ÷‡Früë@ÖLêɉ3þ]Ôª ‰K{”¤~,ép©fË8×@Œ¯›˜äÇ”è`ÎùpôŸ\zà´†+3 ü(0Of£YãT¡¬ÿ^#éBQëW‹˜˜)xÿ—†i¨Û@^[bד䦋ˆo<‹®Žã#¸Ã\óV ]‘méËNW.ôãÚ’h ×äÜ…‹¿ Ÿ·µêÂÿ}c¥7±«2·ÄËLJ=9îÍÕfBªÜY ôâ ª#[L"™b@¾Y"¹Âg«ÂÙd/t_OÆ[$ÐÔÀ–ºckè@”ý ’šÌ—Ï)ì0š9¶ØlžI‰A‚¨-aì‘Ö%ûP<^ü»hµüÎûªçÿK.X]V‹ÿo»T TBZXÙ0$3™üž¸éÏ7ÁçÝäyã†!,2ô¥Lð»&1,5 ¢È$–]fIì´ìJ†Y †ÆhéÖ¥±I3Ú7êCb#‚/ ²¼À*…•æ ›´ç¬V;.ìÃ~ó,ë“&ïu«ÂH]V‹ÿð×è|þÏæ ížBy÷Hn%³¥‘;µBÙ-4a¶è·§ "(0ÿöçf¦SïÉ)-WNÕ÷`§¶´5ˆB7véºrM·-W”!,4ô#¼Ñº4Y(ŸQú•yš‚ªôM`MŽE†¼·T:û¸R7”‡ üyjåÇ㎂ö #/Î9ƒûqíÎý×xU÷{jjñÿm—´ª4þèçãKiÉï¤–Þ vþÄa¶ÏÿšœÖ¾×oM^kžhùR¬Ñš2Í6ÜÓ à–¶£ ƒwO²àü‰ç‘b“I˜3 ØZÒÙ<‚±YbB¡¨#šÞ\kà΃Ï|ù¶kßΈ¥tj,{vmþÌjñW_—Æ,ê}\gG'&deÉg¹ÿÒžŠgr¼¨€üÐv4nγ¦ì·ršÀ•§Z~T6p¥§I1Mfügé<•a–]Ø¢Š$À°)Š†Ø©Zî0œD‡ôubœ4o¬ dƒ‘Å_zr")ˆ«ÓÃ)^Õ3—NWæµøÿ¶Kc‘ú"×§¥¤pñâ¥ß|N’I™xßÖ Ìò¦2ć3mp÷æ•£?4]H6O¢C“YtÞÎ)‹IB+ž1êÀB“0씦èˆ< Õ„8Ç,2ÇóµÐ󭺳QÕ™ýv”*ý8`çÉfOͳ_œ?Y‹õ¸ÔßeÜE¾òýxß¾ßõ|${þÝ÷änÞÌÁ^¹žĸ^†…p²©É6]éäA! u`‚eg–›'RlÇHŽ×õe{“–¬ÇÉó'߸¯?c:þUù]:3GZðÏÏ¿ ¬m»væóðáÃ_½×wiwoßb}§ál‹äñ¤Ö5f«~[-S™f,ô|f¡?·t‚)2¡ƒE;YZ+Ma.r¿y'V‡ŠØðg‹Ð‡´©øÿ]XÕ$PèÔýo´õgƆ?dü%½.qx3•J>3'K:'üÇw`þÚ=¾/»qûù ³¸:;šîAìщfIóÍ9náÆ#mî6ôfƒž7“mz‘n%t¡>nFŸ“m‘Æa‘ÿ+ôÃ9&´C‰Â"#v4üŠÂ^ãåuñU÷øWÅ_^Ÿ­oðzŒFêïÒkËæÍ›ßÈï?¿§šdÞ¢lý ¶zsXSôaýÖZrÔÓ‡§x ´Á*wмmÓ—0W*tp3nÆdó8òŒ£8«,¿£âFc»·a‘‹;û‹KÞh§jáïµšŠ¿´nLÚ¿)­–ÖJ{><ÜÜèGQa¡üþ‹ŸÕTÝKM¶Ê;×ÈŸ:#ÆBÏk´¥Ø(ˆÒ¶~<‹å³·Ð nòÙõ»,2™¡Š ÂކJZ›y3Ê&ƒy&äh{sZ×g¾\ÎðgÇÄ^\¹révþH¨)øK\]Zÿ+V_h5 ÿÈð (ïç-?^^]0¼W{ôüe™£¹PÏ“«ûPØÚ‡;}"yÓ–lgW¶DPªJ`•qEº^DëÚ ­4¦³U< l³Ø<‰UúÁl6sãD˜7G‡²gq*+¯¾nãèAuá/åg S)WK\\ÊÛ¾R—>«Ö‡Vý“àêÉ“X³z ;wì`ÿþý¼xþâW¯õC·[·o²¯çŽ+ýح׊£É|;<†ž^ëŠÚ`-ó½³Ú~Tèøáª«ÂXaIwëŽ,ºa³~òu¢Ø©ô¡¸¥éžd/ǽ§?í%ý½1P]øKã+õ?©+÷]éÜbiÞ\ÂYâçMËgÙzº{àíáIp@ Ý»veíš5B'_–ϸ•Þe&Õ®w}%{ôêΕ²»Ï$6¦'q{b{tôÜЛ«ºalQx ®ïÆ÷¢N¬W¸ Rèñ™³5Ë3:°Ú;‘5Ú1ø8’³sD» Zz±{×®7Úbà?Õ‚êÂ_ÊÓ `È Áò{ ³Æg1wζlÙ"ïã{òäÉo_Ä¿¹ž¿ºIéê5Ž­OY¿@JŒ]¸[/ˆb¥ÀßÊçZ¾\1ôed„ VvÆôMiÍí=Ø7'‘õa*ø‡?·…&,iÂÁm9¼øÙsûµ>õs«.üý§6þÎvïþŠVŽcK³6<¨ã!ï.sñäù\¹àôèLâ±®_gxp³¼§ÊÓØµ¤=¹1AñFý¯8Ћc;óÞøí÷l« ÿ?ð;Êßâºk¼óãýÝyö˜mS&qås/ÎY¸²'ȇçqa\tö¢bP4ö÷$!¸™|þÔì!\ßߣ%)”ubÇò”t ãÀW_‘Ó£/O_ýt†l5í#}/øWCÜ~^·Üçø×8ï'¸`{õæzhûû„s­ “£;“Ѿÿt²âغd8?ˆ›ºq¼¸ ûŠ’È_ÁÊ©é>vXèão_ãÿÝwo}¾Ð{íÿÏò‘2õîÈ®D/îãa÷HööåкD.ìÉàþÁžµnŒËçvì]‘ÀãC½y|¬Ê{pñPvıvi/¡ ¯Wg_©Åÿ¸d/ÅgEAKî—¦Fñrb<û‡s ;‘ã]D¡ÆöÙ±Ø[¨tub_v'oM¤t}åÄ‘ímîÃn¡NmïÄé­ÉœËI£`a†fz°dV¸ÐƒÉlZÞ…ee¯û-þ¸ÿÈ ¾7nÜ`_ÉöäŽbïš[׋ÛÓX;1‚tÁ ó—E²gk%{vÈß‘æ„kóÿ_ÇÊ÷å}A9 »²gi§6&°uN›f“=¯·oÿÄÿ„×â_ƒ½J#|ó *++)ÊYÊ®å}ر¢ù‡sòèOë„kñÿëz•IuAZ#}½òOŸ½xÜkñÿ½*¼îóo¿¤ÿ¿·×âÿ÷öZüÿÞ^‹ÿßÛkñÿ{û¿Ãÿÿ/K"öŒ"ž HmkBTúÎÊþ€?Êxœí‰OWWÇÿÙdGpCDQ·*-²)êŒm¬¸M]ë( ‚à@§µZÔª˜ªÕ6ŒN:**mDA[GÔt c´F‘MAq÷Ì;×üŒ!Z÷î=ï=î79)‰IïÏ»÷žsîÏž=iÒ¤I“&Mš4iÒ¤I“&Mš4iÒ¤I“&Mš44):Q³—üiă…ä¯OµÇÇw ´´þñý÷ðÅŽ°þ“õ°.5 Ö&§@Êš5¿k’¿¾Õr¯jkk¡ººÊËËáËÝ»aÁüù1qLaŠ9 ô¯^àêÔzØ­µ ØZYƒÍLò×—jÎ…wôìÞ¹ ¦M™ ýz÷O7wðr÷W7pwq7g—æáâÆþÍÛÓ‹}½{yCoŸ6™äO¯üãùž¶`Ò„pèéàÖ]º‚-cÝží5É_¬šÿ×Ìúòýû÷Clt ŒýûôUúëî¬?vQúolüxKþâõðáCÖ§gó „ emûqKÿÝËÃSoÉ_œJÏž…´ÔT˜ù‡?‚£“uïfÅÆi*Ö’?ÕÖÔÀW{öÀİ 0Èo Øt³VØÛsÃ%ñzÙø7öïk““Y Ž}ºkOgݵuÉ¿czÝ{?}ú”Õ[°ÇœÛÉΞœ§ä¯^÷ÎõõõðÙÆ0fÔh–«až¦×þ]òo¿^÷®ÿ©€m[·B?%_Ãþûy‘¹šä¯½Úò~õuuð׌ 2h°ÏY¶­KþÏÕÖwkjj‚ Ÿ~ ACwÌÛûúô&g&ùwLm}/¬×üý»ï 8p8;:1îÔœ$ÿö©£ïRb¢¢X=ërfkïfçßÑ÷¸sç,^¸í=ºÛs‘üÛ.µï½o‹íœìXÍÆìmÞÈü;ú¼¯zv\O±`Þ<¶Nëv‰»ÑøkÁÝòܸߝ÷îeë*ì:Q_oDþZq·<óµk×`þÜy¬n‡s°Ôþ§6=ñ×’õ«žõÇ~??p´³ï”}½ùóbþòs>~ü>JOg±¶{Éžž?oî–g¬ªª‚بhÖæ;[l¯'þ"x·~¶ŸNŸ†QÃG€½mSrÇZÎ?y{x²Z~߸NزFç¨p=¡³ƒë÷0¿Å9jfø·b<ù‹dÞú¹víÜ ýæøŽçS³Ò‚5òEž¶vÐSy/\÷ßu€ÿ V«3¢#£`ÎìxX•˜›23aß¾}pôÈ(.*bëÑÊ/^dyï¿/\€_JJ4çOÁ¼õ3%¯^£p·gíÀÈíÛ6Î1[wíö¼&©¼Køø0˜?V,_›7m†¼¼<¶?Dt¿¬Þ­Ÿã¼¥‹—@kcæôÈûqün-ñ îóÙ²y3ädgCaa!ܾ}»ÝŒyðד¡áÝ™3Y[1R›Çº#ŽÍ–¼dDP0«Iž˜åFzl÷ÓaüŽy9Æî—/]"¦üzQól/ûË—.³š¶{=±ÇgÁXÎÙёŵ= ®ÿö1Ý7‹ši{Ø×ÔÔ@xèx?Qó~Ù0®Ãú rOMIaë†"j®meßÜÜ SbbY¥—v¹&Žñ8-Y´Ê.^$¦Ù~Q³m {ÔìY³X~¯ö¬¯WrÎIááTq1!Au¢æÛöË—}Èêzz©íà|â€þ¾°}Û6áõ­EÍøMìqß•^ÖccmÞAaókçÏ'¤¦¨9ÿÿo''òv¿Ï1Ðwd)mþÉ“'ÄÔ´5ç×±¯¨¨?¥¥Þ{…¹<ö?ÃÃá¿¿þJLK{Q³~ûºÚ:ý;3‡2ÞCö¸ÿoUR444“â#jÞ­Ùãþ{ï¾ÇÖåS®ÛAîý•ßÇù3‹šykþ»¾ØÉæòúµ{ìo0Æ<œ­4»¨™¿ÌþÌ™3ÐKés±¦BÕî±¶8=.®\¹BLFŒ¨¹[ØWUÝ‚ÁÁdc>ævxŽÏŠå†»wïS'=°G¥­M%Y§¿‡õ{ìóñÜôÎ&=ð?tðY]c|\Sýù–-Ä$hD;þv=cs(¢Ùcœ±æö­Ûˆ)Љ’ÿãÇ qåJvîµhö>ž½Ø\ýެ,j¤¢ó‹þy’õû¢ÏÐÃßsQòû¬íÛ =¯QñÇûí1!Â÷è`œqfæÆÄž×‡¨øoú,“d>æxééÄ^×(Ø—],csi"ÏßÀï ¿·Å {\_¢÷—-YÂîBÙî±®59š›;Om§-ÍÿTQ1‹ù0ïÅ÷Áãùn—Êˉ½­?‰dk¥¦Ošëc¬ï£|kF^£ÇS"ùçÎó!{ü½ý9û‰½¬_‰âg*‡‡M`}±¨¶±þ þDíb]KTÛÏÉÉak*DÕz°¦?vô[pãÆ bë["ØãÙ ‘Âæ÷Ø™Hʘ_RRBì]ýKÿ¼cyÂjüø}áwöQF±g!Þìq=¶}µdg›EEFvª5jÄ›±’wá¸/¢ß·Ü‘]TTDìUãˆ7ÿéÓ¦ ‹ù1×K^½šØ£ÆOöçJKÁ€Ÿõœ8¯7lèP¨«¯#ö¨±Ä“ÿÚä°îÒMHÛÇ31óŽ#ö¦ñÄ‹ýµ«WÙYv¼k½–y½)Ñ1ðàþboO¼ø>t˜}Ä;îÃ~ßÝÅ Nœ ö¤1ŃýƒØY"r>œKœ=ë}–gJµ_<øcÍUÄÙ\/ê|?ÿLìEãŠÿÔ”T!û¶ñ›OìAcKkö¨Ð·¹çüx&þÆÙ³g ½g|iÍ?ÿøq¶oã2žü±Æÿþl9î«”Öü×¥¦±³šx²·œË€÷ZH©“–ì`FÜ´gó2œã™ ÷îÝ#öžñ¥%ÿÓ§N±ýó<×xà¸ïæì ;äÞM¤%ÿ¿}{€û˜÷ûù€«W¯Ò:ʤRÃõÉdzš<·¾ßÑ fÄÅɼŸ“ÔðG&Ñ‘Q\×yã9a›23‰½d^©ýñ<^÷sáÿצ›5ädg{ɼRÿººšëœ®óúâ‘Ü\b/™WjøßªºÅu¯‡«+[ësá¼9îZÔ£Ôð//+ãÚþœ 2b2Üoi!ö’y¥*÷;xëz/ÜÓ=7~±‡Ì-5ü7nØÀ5öǼrÑ ‰=dn©áwÞóZóƒ±?Ö}W%&{ÈÜRÃÆôéàÎé|‡çëü]`ÃúÎw'—H©áùN·ó=¿—‡ìݳ‡ØCæ–þ“&„são™OÌ•¹?W©áç9óäïÛ·”ü$Ïvà)UüLJq㵿¾~PY!ç}yJÏüüýYYŠŸôÊß²ÏSÎûò•žù ‘ç{p–ÞùË5¿|¥wþ="ö¹¥gþxg[SS±‡Ì-½òÇøð@¸yó&±‡Ì-½Ö¿_ÿP^&ïlä¨ÿó¬°t¸Â2iTXtXML:com.adobe.xmp Adobe Fireworks CS3 2009-10-07T21:41:58Z 2009-10-07T23:19:00Z image/png §ªfÍ IDATxœìwœ\UùÿßçÞ;wúl/Ùͦg“ž@H€$$(H•*Rô+EŠ ˆ~¿~õ+øSQ)J±¡ˆR%H-ôl’M¶×éý–ßacBQ sg'Ùû~½òJXfÏsfæžÏyÎsžóaš¦Éûì÷O›Ã!Äÿ-õS?lll [ll0¶ØØ `l°±ÀØ`c3€±ÀÆfc €ÍÆ›Œ-66[ll0J.ù`z¡Mþ°Ó· ‡þó äDlòÏÇ}éV?„¶à|<¦ir“¡-‡õ`}܃ …hܵ‹Ýt´· GH%“躎iŸÈž$Š‚Û㥤¤˜šš† ΰaÃp»ÝŸ¸Ï6…-‡}ƒ=™H‹Ç0 ƒžžV®XÁÛo¿MKS3ÙlH&“Ä¢Qb±©d’L6‹¦é`|Ò!)Ø+Š¢ ª*ŸßÏçÃéT\.ÃGŒäØÙÇ2uêT¼^/²,STT„Ãá8@ ’j^€ÈÅqàCé Jtvt°iÓ&RÉÍÍÍ,|åÞ{ï=R©B ÃÀ4;7IHH²„$I!öýù,ôµmƾ?ûÛB쳘~ÔQœp ””1yÊd¼^ïmîä{<|šÏôCž¤-…Å¢W±bÙ2b‰8Ö¿ÇÚµkIÄã8ÞŸ‰NgÁ~Þ†aJ¥H$èºNII 3f͈‘#(*.âó'žÈ´iÓ>ô{‡£(äó;²à%OÄyíµ×xæ©§ ‡B´µµÑÑÑišx<Ün7’thîÖêºN<'•Jáp8¨<˜²²2j ⢯\Ì”)S p¹\û~çp[l>’L&ÊåËiiiáþ­[·îsçŠrø…fLÓDÓ44M@–efΚřgÉ!C˜9kÖ¯?”±ÀæÖ¬^ÍsÏ=GÃö-\H:“¡¤¤‡ÃÑß]ëWR©áPˆ’ÒR>ÿù:l(^|Æ ;àu‡š Ø`CWg'ñEžzò)ÚÚÚØ³{ªª( ØŸÙ~!Ð4P(Àˆ‘#¨TÃ%—]ƱÇKYYÙ¾×*B` Àbÿ­Ó4YüƼ¶hO<þ™LÓ4q8~¶ÿ¤¤Ói Ã@A ࢋ/fîñs¹%B¾Æ…-yäƒÛ`}†Áïx€¥K—ñêÂ…HB(*ê.V˜¦I°·Ÿßω'~ž¹óæqÁ…~è5…ˆ-‡ülúÞsOO>ò/<÷<Û·o'›ÍRRR2 >“|±ÿÁãñ2jô(.¸èBÎ=÷\Š‹‹Â[>nàoÛºW^ù'¿½÷·Ä¢Q„8ÎCvËîPA×u2é ¨®®æÊo\Íç?÷9ê†  Oò16lÈŸä€MOw7Ü?ÏþåYvíÜIyEÅaóþ5t]§»»›‰“&qÎ9çpÙ×/Ççóíûÿ… ¶8ÿé=÷½·H$Â÷ßÏ_ž~†íÛ¶áp»Ýñ d„Äãq²™ #Fäò˿Η¾|þ¾ôãBø~ 鄦-ïóIÞ«‚L&à Ï?ÏÏöÿhjjBQ”2×l Ó4I¥R˜¦ÉÈ‘#ùö ×sÚé§ïK8êO!° Ÿù¬Ðë‹^ãî»Ã’ÅK(..ÆápÄŒbóïI¥R¤S)>ÒI\wݵL?ê(€½§!ûáû³ Ÿø´ï§ï}ƒAn¹ùf^ùç+ôööˆbSøô¥V‡B!ÊËË9ë쳸þ†)+ßû=æ[ÄmÈ#ûûÓŸ¸ë—wÑÚÚŠÛíFUU{Ö?„Éd2¤R)FÍMßû.§~:_°À"rñ%öõ}Ó¦MüæW¿â™§ž¦¤´EQì˜ÐËI§Óœqæ¹á†5z4?!°rŒ 8ÈÕ—&„À4Mþøè£ÜyÇtwuQj»û‡-º®‡2t?¹õVN>å ?"` @Èå%„`÷îÝüôÖÛxñ…PU§Ó™³öm —T*N>ùn½í¶¼Å¬'‡¥Xõeôõõ•¾ÂwoúíÛîþÃ4MB¡S§Mã–ÞÂ1Ç»ïçVa À  ¬iwÞ~;?ô0©TŠ@ `þŠ‚P(DII _»änúïï"‡œò¯5X[[ߺú¬X±ÇcGøm@:“!‘ˆsÁ…rËHIi©åh.9ä ?¶`V®XÁw¿sÛ¶m£ÔÂ/¸¿0߯àk{Ëïûoó_•}÷þ“÷+ ÷}ïFûWî«ö»uᾦ¶!½½½5ã(nþÁ-Ìœ5Èý³:` ?\_¿~÷àƒÜõó_ ‡)..ÞWïPÅ|¿¾^&“!›É"˪êÄåvíólÜEEE”••QQQAeU%唕–ðz½8U$ ]ÓöÞ'‹ éé馳³“®Î.ºººƒD£Q2™ Éd’D"A:FËj Àétâp8ö¥Ýªô- ÊÊʹýÎ;8ýŒÜç ((„ü뛿ÿ¿<üÐïq:]¸\®Cvæ7 ƒt:M$AQÊÊË>luuuŠ ®ÂØqc™>}:ååå@n¶>Oâ½õï±~ý:vìØAWg'ÁÞ ;v¥•X,ŠÓéÄëõÒÕR©Š¢pãM7qõ7®r»õœk F epõûn¼þÿócû¶y%ú.âÐuT*…Çãáˆ#Žàs'~žŠŠ jjk™4i¥¥¥ýÝU6nÜHÃö‚Á^Ö®YËòeËhmiEHÿª‘°ÿ"‡†a‰D¸æºkùß›o Wú] !áp˜o}ó›¼øü TWW2ïK×u‰°÷–ÒÒR&NšÈ…_Ì AÕ”—WPRRÒϽüÏ475ÆX´èUþñÒË´´¶ †H%“8]®‚¾Üd4M#‰pÑÅóÃÿ(gÛŶX„‚Ö–V¾õo°dÉÊÊʉ-“É ‡ñùýLš4™±ãÆpÊi§1gΜâÂP{{;Ï<ý kV¯æ½÷ÞcGÃvœN~¿¿ ¿Ÿ>O2‹qÒ¾À?ÿU•U=Nl°!7näºk®aó¦Í¿¿oš¦‘H$¨««ã‹gžÉÔiÓ8ás'Öõ6nÜÀ;o¿Ã¾ÂÒ%KÐ —Ë…,Ë-Ñh”£fÅ/ﺋ#G7^rŸù¬v Bðî;ïpÍ·¾Å®;)..)Ø÷Òwco `ÌØ±\÷íë]_O]]]w-¯$“Iv76òôSOóâ /ÐÙÑA:“ÙwËp¡aš&ápˆI“&sÿƒ0bäH[ !k×®áW^ÍîÆFü@wéC!H§ÓôööR__ϱÇË^ÄQGÏ pç¼üÇùã£`á+¯ðÖ[o¡iÚ¾j¿… ñxŒI“'óë{îfÔ¨Q!V„¬_·ž«®¼’–æf<OÁ½]׉ÅbÔÔÔðÕ¯ý'tcÇëïn&&üíoåï/¼È /¼€ËåBUÕ‚Šƒ!ˆF£Œ7Žßýþw 1âJ¡?l@Á–Í[øúe—±sÇEEÓ!ÉdMËRYYÅåW\Áé§Ÿ¶¯tµÍ¿G×tÖ­_Ç·ßÁêwß%ãóù FLÓ$ 1ó˜c¸ç·¿eðàÚÏôìÙðBÐÙÙÉ]t1kÖ®-(wÑ0 ‚Á uuuœ~ÆéÜxÓM pYr¨ðêÂ…Üs÷ݼµêMªZ0^žišÄb1æÍ›Çý¿{ŸÏ÷™KÐå¢/ŸÕæ!'Bb±_ûê±bùrŠ dæ7M“l6‹®ë|ñÌ3¹òª+?aBwë°á‰ÇçþûîgÛ–-øüþ‚ F"¾tþùüü?Gù”Ecmø”ôuþÒ¯}çŸ{žŠŠŠ‚ès*•BËf™ à ðûǯ¿‘WÛŸ–‚Œ!xçwøò—ÎÇÐuTUí—~„B!ŽŸwó—¼Úþ¤Ô@ÁóÏ=ÏUW\Ñ/9þ}8oúÞw¹öºëòjÛÆZvíÜÅ%_ý* ;vàóùòj;NãñxXðÔSLœ41çKÃb „ §·‡ŸÞvŽOy¨"d2‰ÿý?ÿcþÃá#†³àé§™0a±X,¯¶N'Üõ‹_…µ+P0 iY~vûlß¶-ïûý†nɤ¹ù–ðÍk¾•WÛ6ù£zP5¿äaÆqDÞ—¥eeüýïç±?ÿ9¯vÿý¾èSÃ¥‹—pþ—¾”÷†aL$øŸ›ÿ—o|ó›y³kÓìÙ½›ÿúÊWÙ¾}{^—º®ãr¹x}ÉÊËË>v¼YyÕ^A.âñ8?úáp:yÍ«×4p8Ìõ7Þ`þÄ¡Cyì‰Ç9r$ñx¯—Eo¼NiÙ‡‚ŸF¹ `_ÆÝÝ¿ùM^ï•7 —Óɯïþ=ømàÆ›nâŒ3Ï  æÅž,ËôôörÏo~“{G¿-^úûK,^¼8o¥œ à òã[oµ‹vÚ|UU¹ë׿bÊÔ)D"‘¼Ø”e™§Ÿ~††íÛ?43çËïÈd2Ü{Ï=yÍø …BœuöÙ\páy±gsèáñxùñÿý¿ßŸ—x€Ó餭­G~tàBðÌ3ÏðÞúõy;¢Ç?~<ÿûƒ›óbÏæÐe欙|÷{ß%ËÏéÁ¢¢"žyúi¶nÙÚ/ÁÀ¼ @ßöÛ“O—_~9ªªZ:#›¦I àÏúã—šXi3/Àúõï±qãFËÓ~³Ù,N§‹o^ó-œ®ü—·9|9ý‹gpì±ÇZ ðx<,]²”öövKíôa©!H§ÓüáÑGó²ïŸH$˜Â|fÏ™c©›Éõ7Þ€iš–ßReš&>ðà‡~f–{ÝÝݼýÖ[–oý†×ëåÊ«®ÌK ÑfàqäQGqÊ©§ †,µcË—-ËËux– Àƒ÷?ˆÂòÙ?Nsü¼ã9zæLKíØ l¾ò__¥¸¤˜l&c™ UUÙݸ›çþö7Ës,€¾Ž¯Xn½’™¦‰iš\mö´±˜Y³f1gî\’©”e6E¡§»‹·ßz°¶b¥À¢W_¥¥¥Åò­¿P(ÄçO<‘I“&YjÇÆFÁW¾ú<¥[ PÄÊ•+Ù³g·e6ÀbX¶tmmm–®Éu]ÇáppιçØk›¼0÷øã™0a"š¦YfÃíq³vͶokØ÷3+–Ñ–@ßAœ-›7[~ËO<cÖ1³8~Þ2™ —\z©¥6ll>ŽéÓdÆŒ£-]èºÎêÕ«øY.½K`Ëæ-ÉÚäŸd2ɤɓ¨««³Ì†Íb欙x<ëRu%‰x,FwW·%@Kà>jyYåH$Âé§ŸAqI‰¥vllþ_¾àJJK,Ë PU•ÆÆFžyæiKÚ·D1 ëfMÓ(-+cÂÄ –Ù°±ù$øý~ÆŸ`YN€$IÄ¢1Zš[¬i?— !èîî&‘HXýO$Lž<™£f̰̆Í'å‚ . eaj°êTéèè ›Íä|óQú÷^ iÏÕš¬¼¾µÖèÑ£íbŸ6ÁÄIñûý–-¼^/+—/gÓ¦Mû~–«˜CÎ`×ÎF"á²dÍ¥¦iâ÷ûíŠ?6CYY9Çwœe ;ªªÒÜÜBgGgÎÛι¤Ò)KÝÓ0)))áÄ“N´Ì†Í§Áíq3{îK·…$ˆÇü,^@ÎFª‚î®.6¼÷nuùÿº¡3dÈKEÆÆæÓRU]Mqq±e»_{K…-F×õœÆr:жnÝʆ ïYz(“NsÒÉ_°¬}›ÏÂÔ©S=z´eÁ@·ÛͲ¥Ë>tuùÁz9€X,F8±lv6MÃ4™3w®%íÛØ|V ĈQ£,«$Ë2===d3Ùœ¶›Ó‘šÎd‘,<©ë:å8ËlØØ|V*ÊËQÖ•7M“t&·çr"}k’M7 Z˜ÿŸJ¥Ä8***,³acóY™:u*¯ÛRX¿n]NÛÌ™ÇysÕ›–VÿM$̘9ÓÞÿ·)Hæ?¿Ïo©,]²4§mæL’‰ –Õÿ3M ªªÊ’öml–²òr¼^¯e A†a°mÛ¶œ¶™3Ð ƒ„…%’ ÃÀð[^cÀÆæ`¨®®¶ôl"‘øÏ/úäLLúºeš–¥¢¢Â>þkSÐŒ3Æâ“°Z¨··ÇRåËf4jjk©¯¯·Ì†ÍÁ2íÈé– @ßU{‰d2g“mΠ¡¡ÁRÐ4ÊÊJ\W¶±9ÆŽkY  ïhð®;s×f®Ú¶m›¥ $ay‰1›ƒEQ‡55üß/º»±1wm檡=»÷Xºý!K~¿ß’ömlr…¢(ø|>K¼I’ˆÇ477ç®Í\5ÔÕÝz²¢PZj—ÿ²)lœ.—e‡‚„d2iBÁ`ÎÚÌ™$bñÇ'Dq(”Û€6ŽÛí¦´¬Ô²@ ®ë¤Ó¹;p”3°òž4Ó4q(**+-³ac“ Ün7¥¥e–Œ!¦aÍæN\r&†…î?ì][U”•[jÃÆæ`q¹\”””X昀aæ.¾»Ó€ €išÈ²BiY™e6llr…•…A€œ™²:Š"( ôw7llþ#@À²\IänØ`š&’$[zÓ°M®ðx<˜ @a.,F;ÈæÐÀ¡Z“{Ç¡ûþ}°2Ø…@m „–m‰›¦‰¢Èûþ}°R#ÊêûmlraXu.Vð¯? <Ã0,­»nc“+Òé4"‡ºý1I`€Ã0,»yÅÆ&—ÄãqË–«‚½wc@¡yÐ4P0d© ›\ GdëæÖ¾_P€•åÀ…èºFOO·e6llriš„B!dÙš»1œÞ»™3P,®ÕŸÕ²tuÛ`SØ$ z{{-!DN½‹œµäñz¬‹| –ÕèîÌýí¨66¹$•JÒÛÓƒ¢(9oÛ4MdEÁãñä¬Íœ @EE…¥qMÓlÀ¦àI&Sôƒ–x¦iât:))É]]Œœ ÀСC-« Üö殂¤S)¡%»†aàv»T=(gm欗õõõ––×u#ç5ÑmlrùþýV @ `Tý蜵™³^Ž5ÊR;Ȧà‰Åãè†aÉX0 ¯ÏÇСCsÖfΠ¤¤ÔRp8Z[Zéíé±Ì†ÍÁ²fÍZËv ÓDUUÜîÜ]@š3’°´,¸âpÐÞÞÆöíÛ-³acs°¬[k9ßi˙Ȓ„×¢rȰ·$XOO­­­–´oc“ vîØaé©U7·51r˜àeô¨Qd³Ù\5y’$Åíó6Mww·e IãÆÉm›¹jÈãñpôÌ™¤R¹+YüAdEÎéµH66¹dçŽ$ K·Ã=¶™S©wÄdÒé\6y^¯—7W½Ioo¯e6ll>+o¼þÑhÔR˜8iRNÛ̉ôÿTÕu•Ð@UU¶74ÌáÍ(‰ýƒ´¦i¢iÚÞ"+9 ÞZY ³ÐÙ¼e ©dÊ£À§šÛ²x9í©ß(`YåY–‰„ÃÄãqKÚ?ÜÙfB (ÊÞˆµ躎i𽓳·)=ÝÝèº5ähšFyE95·‡îr"}Ö˜±ã˜8qÉ”u ;ªªòÂsÏ[ÖþáŒiš¬[·ŽO<Éâ7ÓÓý¯œ Y–÷Ö²{_>ìÞ³‡®®î}íhš~@;¡”ÛÖ­[زy³e××'“IfÏC ÛÒø9óLÓ¤¬¬Œñ&LX'ÅÁòeË,kÿpFAii)-­­Üüý›¹à¼ó¹ý¶Ûyç­·÷½F’¤}‚nÆ‚h4Â’å«ØÓÜ„¦iHB ‰½mìÿçpgã†M466¢ªª%í'“IŽ;n6²,ç4ß&w‰@ïÉNÕ‰iX—$ÉííD£QËlÎÔÕÕqÃ ßæö;~JIi wýüœwö¹\ûÍo±jåª}³µbŸ˜¦ù±Un[;º0'¼±d étš]MM<ó×çÔ–mkK ÉdÒ²õ¿išx<¹÷.rÞÛ‘£FRT\d™Û'„ ó—gž±¤ý€‚ãæÌæ÷<ÄÏñÿ4hÜ÷ œ{>W_q%o¿õ¡Pè€×÷U£ýàò 'E¨.;w·òü?²¶aHÒ¾òÕÒû"b¦ËP0Ä?ÿñü~¿%íg2êêꨮ®ÎyÛ9€SO?ºº:´¬5ÁI’ˆÇã¼óÎ;–´?ð|õÒKøã‚?sýM7"™Çÿô8çžy—_rO=±€Îýа|ÔÒ@UUÂÑÉ´FÚTé„™|Ä8\.wß/îýë3ÄzzzX·nn‹ÖÿñXœcŽ9†qãÆå¼íœ—-)--Åíq[ºäp8ØÚ±s, IDAT²y íímTçðlô@eÔÈQÜ~ÇíÌ™3›ﻟeK—óÏ—ÿÁª•+™:}§œz gž}6ƒª«÷- ikk#k€t£hº†·´ =ÆãRÉd2tu÷°ví:ŽŸ;¯×‹r^î²ø7ÐuݲXG&“¡¢²Å‘û‡äýèG?:ØF>øÆW,_ACCƒ%e‘`ï¹€ÖÖV¦OŸNý˜Ü¦FT„€Ñõ£9vöqø|^Z[Ûèîì¦yO+V¬`åª7Éhõcê÷H[ûÞ&-yMq‹'é ©<3"ëeSco¯YGÀ㤾~²¼÷y0Œy‡C€ð‡·ÜB°×š*@†a Ë2§Ÿq:Ó<ò Ûûàçm‰T”—ó×gŸµ´0b4¥®®ŽãçÍ³ÄÆ@¥¨¨ˆÙsf3yÊÂá(-m­èšF{k ‹__̶­Û©TͰaÃ7¦ž–¶6n߉aJÄ¢*k†ÐÕÞF MÈ «,áÄÏÍDZ_ÑØ¾Àâþªìܹ“û{º®[L§Ó :”ÿûÉ­¸süàgm‰?6zL½å_lQQ/<ÿ<Ý]]–ÙÈÌ:f¿¾ç×ÜtÓwR7YRÐ3ý˳\uù•Ü{÷½¤3iÎ>íóTûUzº÷~m­¤„ƒ´Ãªg8þ¸™H²L8•`ÇÖ­tt´“5}; ûšO²íXh<¹`Á`вè¿ax¼^JËJ-ùl,ñV­\IÓž&K—Ìž3‡áÇ[bc ãv»9zÖL¦L™L8¥qw#’ÑHŒ•Ë—³vÍZ&MžÌ°º:6lÞB*•AH2NOE‹sÌÄQTWW³}Ù*Úo}ñÐóô.•-Í ¤KÊHiÍÄëÚ»wÞ—3Ð?*tÏ ™Lrß}÷Ѹk.—ˆapòÉ'3ÿ„ù9i//K‡Ã$I<óôÓx½Þƒmþc‘$‰öö6Î=ï<ËlØ@íàÁÌwr*ë^ZDâ†û¹r'î ±]Ûoy—DÃ[´7¬#”1ñUÖ ¾?Yô=O…¾DXüúëÜßý8NK=€_üò—”–•椽¼,jkkq:–îȲ̆÷6ÐÐÐ`™ ›½¸âê«øó‚Ç™wÂñ膎,+ìÚ¹“_ýò.^ýû (ÙéX‡gú´ l{w-Ý?þ#5 Ú|6ytô´Ê¤f/s7Å8zW[×ÑýÂ},úëôD"$³ÿJD*ä-CÓ4Yºt‘HÄ2/×0 ü~?UÕU–´.ŠŠŠØ´a#[·nµÌ=BDp8v0ÐbB½Ýttv1bÄpN:ù ¨ªÊΆÄb1tÝ ««=›!“JpÑùg1aÜX^¿éÊVwÓê3 ¡Q‡“a8QuA{T£1¢Ñ™5q‘ÆÛC¤y-ÛwnÃp•R\Rö¡ëæ Éèêêâ¾÷=E±lö„Ã\vÅœp 9«öÁÏÐécƎ套^¢¨¨È}kÆeK—ÑÖÚÊ šKì d:;;iïìaå[ïðöšõÔÊÑ3Žä´/žEݰ,xâ1Þ]õèè袣½‹·ß^…Ù'¶!Å6Ÿ·€qº¿®³›ÍRY jsP›õá.uB¼“v½ +5ªë¾Ïyไ> A^zñïtwwS\\l™—’J§™qô ¹¹ô£°Ì0Lƒ¥K–’Íf-SI‡ÃÁÎ;©¯¯gò”ɖبlkØÉëïnbsk˜´âÃSVC8«°qW k6n%¥›ø¼>B]ÝD#aÒé,†a°vÝ»4¼ÝˆCÔàT} ~Éd‡e·”¢Gà¥ZRÐ]ÁÑ$M‰,Ñx’P¨‡¶xœ,’räý(Aÿ €®ë\wÍ5¤ÓiËžëD<Á„‰¹ìòËr:æ-0oÞ|jkjÉd2–ÙBàv»YðÄöÅ!9$ ²jõZd‡ÊØÁå õKx³ÌT3›F—ìéÒÖeü‘38÷Ë_fÆ13ðøœ l oáõä Úd'í®JÞ•5Z2uJÕ âŠÂÛ"ÉjG’¶”޼]§tNM‡“cL“)‹ËîcÕßko:ò§9¥h%O<þ8MMM–VÿF#Ìœ9“ºº!–Ù‹=€ÆÆ]¬]³Ö²@ ìÍGß½{7ã'N`Œ˜2™ ~‡£Æ×ãÐ’ãI28‡CøŠJ —‘ˆѳŽŸ3‹«®¼„ãçÏeûÆ&wïBvD´^š³­„…ŒÏ1ˆaJ9^I¢ÅŒÓ@ YHŒÀÅ¡Ra*bàŽ™$ ˆ0ÀÌÐݱ‹õ{º¨2¿Ïó¡g-ßÞ@,ã¶ŸÜJsSNgn«óô¡i^ŸK.»”±cÇæTì>ôù™ûµþY ý»/¡­µ•Y3ŽÆíñXªÚétš#Ž8‚_~©ß]ÄÉ»ö°rÝf I!ÔÛKJ¨‡‹Þ¶fÊ|Nf;iãëiÚÚÌòç¶ðÎ+[Ù´g9íÚ&ÂZSÇ%ù™éŸË±®ñ¨Ù2é6†2#4 ¿–Å©gF’¸®Ñ-;H .Â3¶œâ‘E(ZÕ ]¾:J†Îeê‘3ñ:÷μ}»V–áþ }öY¾yõ7ðz½–y‰D‚úúz¾¶(çmç-ØGiYGϚś«VY¶{½€7òÌÓOsÞ—¾d™Äö;XºêMª*êj'¡úË!ÒÊ ÓÇ0sæQC㵇þÁ[i`wS†„ehàHJ²ƒÙ_IO¶‰´ãÍè´gZ™èÏtÏ8ÔL˜°ˆc'k¦èr($=U”{*áàNË„zâ»b¸õ(^×›´lÞJ¬c“ŽùUUƒßç+W ›Íò‡GEa©û/KsæÎÝ÷Þ¬Äràï/¾ÈE\È Aƒ,}C±XŒÉS¦ðØãQœÃ+”*K–,E’efÎ8Šm ¼üú fL›Â¸u”WVÒÖÒÂÂÛ|½›˜p³G #É~4á#k¦Q%­©M4ÄVÓ{0ìªç„À Œ~<éfÙnÂ’ƒ"w%ÃÔ2Ê„IZ Ìt¢¤{¨ìNQ®Ix'9‘U s°=PƒwìLžr ò~ža–zyæ®ùæ·r^–냤Ói–­ZAmMmÎÇK^2?ˆËåbÙ²¥tuup($×(ŠÂÎ;1b“&Û;KuU#F G’etM-ÍqG‰¿¨ˆ`0ÈŠÛþˆöÂvTÉA»Ü‰_H¸p1¢(J1>Ç J%º™$©ÉšiBZ7͙Ғ“˜ì"á,£Ä3„ ÅO2gS6DK&Jq‚½½üßm·1jÔhK¼å¼nîϹç˰áÃ,Ý„½7íÚµ‹ßÿî÷–Úh¸\.„Øû¸dMƒÌ¦&ª¢IºE/’–༤´^J©|ZLº2¥–*÷¦ŸI•:U8IqVÇWñÏÐK¼—j%(—!ÔZ»I³Añ 9«¨R+*—1Lõ3<ãbxƒ`HƒÉdÍ͉ƒL®z“®æ?±uÛš}}ÍõÚyGÃì1˃‘H„¹óç1eêKíìOÞ`â¤IŒšfM©°>LÓÄï÷sï½÷²aÃKm Td$ÊÇ'âÉÒ•èbd-¬§j:ðë)ÒÙVÊÉ0Z.§'@c0Ú{ “§R,W“Ô£¼[Éêø›è¦‰®gId{qÉ~ÜÎzÒ¥t;TÚeØãÐÙK³nm”wþÑÉ»O¶ÓùJ@w›V?Æ{;öõ1—g ~{ϽlÛ¶ ÇsÐm}¦i’Íf™?o>åyËsÈË ÚÚZžzò)ËöO÷ïO,¥­µ•/œz  s"’¸ë*XßÓŒsÃÆâe·ˆS,¹)NBFŒ¸cˆTŠSH¨Â$®Gh×Ú)UGPéƒ,I½—´™ ªéÊ4ã»Gã’<˜H„„A¯¡ÓˆÐ%CTu’q¸‘u'Î çf±,‰cqŒô›Í4µ÷à5„²÷OÎå¢$ùÒ%K¸í'?Áç÷[ºÓN§©««ãŽ;ïÀcá Ú~‰ôQ=h+–/·´N@‡ƒÍ›73dȜߧfªÇ åŠ_xŽTMjñ €N3L9Jq#abšYš´vÜJªRJ8Ó„KòSåCZ×zˆéQÂZ'ÉG±RJLÓí"W Pª–Ü /·$á“|’‚;.QÛfP²j;»V¿GvâÊk÷ž Û&ý´8“Épåׯ  ¢X¼†½AƳÏ9›ÓN?ÝÒÙ¿ßÀ4MdY¦¤¤”'ÜRw öÖ 0tuëÖqÒI'ÙÛ‚ \ ¡Õ‰mÛ‰[vP.»‰’!ndŠEdtš ¦ì¢ÂQIPïF2x•J¼ê`Jµ¤´q£‡ˆ¢=ÝDÆLPJ)vTâ“KñJnèH¦‰„‰$@à B†3EWy†Ð‘N¤>’z'[C=¨CFQ^VrPgî¸ýþþâ‹–ÎȰwl(²Ì}>hiúÙBPQYÁêÕï²}ÛvËE@UUz{{inná‹gži©­ˆËíAš6š6=‰S+å†L»H š&ÕBEºÌ8½h QªHL#Ä`¹…¬©#$'.Ň*\ĵnfœ`¶‰çTÙKÜÔ1Õ˜hDHӢȩeAå UÓ|”Í.¥æôÊÆfhjk&­•R^Q±o)ði†/~ƒÞòCŠÃÒm?!=ÝÝ\zùåœvúi–ÙÙßÞþäMú¾€½ÑdÁ¢Wí»ÎJTUeË–-”——3yJþ¢«øKŠqÖ!õê[”4…hw¤)6eJQ‰›išIR%— “Îl'u‹Or"¡#£Ñ¥u¢*åÔ¸' ™¸ÖEÚHÒ•m&ª÷PªVãu”’1 "f˜n3„ª¥ªÃ(C¡Üp‡ÁÑ‘d§W¥|„Ÿò¡Qv·µ ;GâßoVý$"F¹æ×ÐÖÚŠÇkí$•Éd(*.â§·ßNYY™õ™ýéô1fÜ8^íuZ[Z,M êÃ0 V®XÉQ3ŽbðàÁ–ÛhxŠ‹‘%¼½‘ÞH„AšL@RØmÆpH*ƒ%-Z/’™a¨ ‚°!"©8åÈ’ƒru¹ˆ°ÖNÒÌvÒ:qI~4!DCQJ¨>J…„‚IFd ëiö„“´Æ2t6'i};L¼1A¼»½Y†ŸŽÂ¥ÆþßÿÞ³páBKÏú÷ì òµK/áœsÏÍKä¿ @–eÊÊJùë³µô|@Š¢‰Dغe gŸw®½+c$ÅÓÆaÌ™@¯O¦ü\YfU£Fò"€]z!ÂE‘P‘0ÉiºÌ$.G% EG–œx¥b43ffHq"zîLeŽ*†¸Ç"ÉE¤H›I‚f”V)K·ÃAVrâªøv ›³x—§,‘Y±…æxßÔ±xTç9õÜ>þØcüúW¿ÂçóYî¦R)**+¸ýÎ;)ÉSŒªßc}9’5«WÓÐÐ/ÀårÑØØH4á„Ï}Îr{ A ¢ç˜:‚+ÞÆÛÔE\‘¨nBdè4âŒÁ‹ŒI§Ç=Ind4 SF™mxä"†z¦“Ò#¤Œ0 #B0ÛGöã–üta¢f !É”²Ÿ á$ I8 E’AºDmGýÕµlëj£öäÙ(²ô±1Í›7qÝ·®%“ÉXvËïþd2.½ì2N?㌼íû„{£ô55µ<ùäÙººjûãt:Yµj>¯#:Êr{ÏOo@¦­a+éÖ^†š:å i#ÍhÓ…ŒIÆÌÒJ–¹0P%‰^­ƒˆ¦Ì9šµŸRB8ÛJR3"tfšÈš)ªÔZÊ•bJ…¯PÐL¸ÈÐ¥'èÕãÄÔ4Ñá:$zŽô’,Ó´e ;e…úiS>ð¸ !hmmå²K.¡©©É²K>÷GÓ4ÊÊÊøÍ½÷äÅ î£ß`/ ®®ŽÖæV¬XaiùðýmK’ÄŠ+¨¯¯gôèÑ–ÛhHJÇŽ&>~¡ U[;H™Ùdˆî@:H‘UTÊ%7ºi ¢&IsvåŽZœr))3Mڈˉ„ÞMÚHÒºPe?ê(4t‚Zi-Œ#¦4§:£S#IÔ sS7£ˆAsË|ÁPÊO)¥'ÞLoD¢zÐHdYìó4MãÛ×\Ë[o½eùI?ØûvwwsÇw2ýÈé–Ûû íýé7 ï÷†Æ« Ç-O‚½ñ€t:ÍÊ+9~þ<ÊËË-·9ÐT®¥dÎ4zwî"»©ÕÐ$œ`š4‰~Ù‹×”H¦I“Ö…KrQ£”#€ˆA×;¨sަØ9Š´%ªu¡‘¡=ÝH܈£ÈJ%ƒz–ÑšD¡PjJ¨ =ª“ud„IÚ0ñ-¢~‚ƒh|-UÕ#÷y·þßOxrÁ‚¼ ~€`0ȼùó¹öÛ×áv»óZÞ¬  ¢¢‚L:Ã믽fùI«>T§“ÞžÞ~û-Î<ë,ËS“*>iÆXšÒ!ô¶†¦M§EÖ$ÜÈ&8‘è0#DÍ$#åJ\(dÉÍ41D¸H.ܲY6S$õY3M¯Ö†Ž`„k U²‡Œ¡ÝH²[Òh– Z³Ý=YbÛSß Ñ³°›Øò0Fwˆm-»‰:*¨¨¬æ<Ìí·ýŸÏ——eh6›E–eîüÙÏr^îë“Pp „`â¤É¼ñúë´··ç% Èûù»wïfíÚµœvú©8Ö}"ž@€¢¹G4Ã5ïDd¡;«S)T²4™j…ŸbáB èÔ; èq†H%(RFˆ©rMBH¶Ó4éÕ; i ¥”ÝŠJ£ê%ë,ÆíôR,{¨H)T„d*»ÍE³”l7¨Œ‡Ñ’ílhïà¶_ÞM"Ççóåe0& Î;ï<®¸êÊ~)lZðÁ׫ªƒ‘#F²`ÁdYÎ[7—ËŶ-[ؼy3_8ùäüˆÏÄ­80Š|Äö¬ÇeĈF JS N!Ña&Á„!’ ˆ"¬u0ž^˜f†=DI(•xÕ*ŠÚÁµƒ½,]º4/Á>\n77ld×®œ|Ê)y-09ð–•Ó-Dºwo QTp8$šIR)9ñ!c"Øc)74F?&fŒ^ÙM@)'n$ÉjÝŒV‡#$7½Ù 2Ä´^z"¹¡ÕCDÍa3MØÌ c"LP PLÐb&š!J¶WÇœÿU–-Y‚ÀºÚ‚¦i‡ùù/ÁÔ©Sû­¬yÁ €$IL;r:¯üóz{zò:;]NÞ[ÿ œxÒIy F4d!ð¯'RUEco/ ¸²&ÝŠNé@F:]z˜1¦ ¿I‘bÐñªåxpÓº)ÒC VJ©p CÙfЛí¢;Ó’¡xP…D¹pQ)TJ ÛŠdâÒ¡8#3¢"@@‰à¬.c[oœöövd‹&€ÞÞ^Î>çnúîw-iÿ“R0ðQ¿ãv»©4ˆ¿ýíoy Ì !p:¬_·Ž†í¶X…"IT J`Ö‘DÛvÃÖFÙ,’ YH„EYÏ0Òp"cÒNŠ„â¦TH™)²Z£„ §)ãD–œ$¦Ðˆé!RF‚:ï$Jär²z„£‹É ŠNH2‰ “®t–öX§là”b¦LáùWã³À5O¥RTVVrׯ¼¼_/5)ø¸vF×&™H²xñbËO ~жÓédÃúõlݲ…SN=ÕÒS`™"ŽÆîpM»w3$&ðK ]f_V§ÊÑÐi–t¼r #B±c0^\Htë=ì–µÞãP%¡L Y²$õ=ÙÜ’“2É…(“\T Õ8©NªP©ÀIQB uBtK†ß‡2¡žÕë×át8rºÈd2üâ®»˜uÌ1ý~ÛqA @_[cÆŽeÑk‹hinÉk°dŸlØÀš5k˜7~^Eh á+)Å;w‘šbÄö]TwÆ ;Ld—IUZ¢×ÈÐ娒¼˜˜Dõ ÃM…*š™f›EWë$/¥Â RЭõ2“Dô^ÒF‚zçH†8*pÃÔ “¡ÇLÒIŠRtK4L1‰²-]L?Žø ÖoÙŒËuð¨$Ituuqö9gsý 7äàS;x J>î÷|>Ó¦Nåùç_ ›Éäu&Bàr¹Ø²e Ë–,eêô©TVZw?û@Æ£º6i"Á*Ñ[ȆzqwRáTiL¦H …á"B]‹2ÜPQ´˜Qº^J¤2­ 13ŒrŽÀ¯”Ð¥u‘0µ]zŸRŒõ1öÖpš·PBT!«ëÄßÚĘ£¦“3ˆëÞÃ})ºB¡&Mâ·÷ßÇâ›±>M¿ö§à<€> „Ïëcá+¯àÌc®tn·›¦={xuá«ÔÔÔÚwZ„cë‰Ìöx%İ*•]© ®¨L…pÒaÆ)Ö² 6¤È°Cdñ;«ÁHáÉtRg:Q… H A=ˆa¦é1ÂìѺ¨Tª¡TS.©T 'e¦B ¥ÂI©é ÂP(s¸(3"[v0þôùCªx÷wpªêgz¾Óé4·‡û|‘£FÄà‡CH„Lš<‰M›7³vÍš¼%jìËí& ñêÂ…¨ªÃ>@d P2¤ÿÜ£‰9îÈ.‰$®6™:Ì8ƒt“2´’$¢¸)•D²] Ñ Š%YvaÒ®z¼Ž ÂZ+š‘&bĈ‰uê`¼’B·¢‹$]F’^3A™¤[¤ +Yp)Ô„À·|“çKtD%kÖ¬Áû)' !½½½Üôßß㬳Ï*˜Á‡ÀÞ5Ôì9³Y¶d)»q÷ÃzÜáp`š&‹¾J$aÊ´©åÚ|<~—›À°QtÆz‰u5âØ•¤8«Ð¥$©AAÍšì³ø•"„iÕBŒ68‘Ømi–ÝxÕê ‘l3š™¡G Óª÷Q¡;*ðb2È„ZäZƒ2ÍÄ夯ÊôŒWÑÑÑ_^ÏQÇÎCSÃ굫q9?ÙwÞwÐç+_ý*?üÑ-þÄ>='ÿéw=Ç7›—^z‰h$Ò/Ùz’$¡ª*K/fåÊ•ŒSOmmmÞû1p©N\#ÇÓérÒ½³™Ê=¢Å&•µ.²É,­ºIµâ§ÓˆR¬¥‰“™dµ”¢HŒOÈÄŒ å† ]Fˆ¤™"¨‡ˆ …jßJ•"T3ÃБ1Q %aâ–Eã=¸O.C«Ò¶f£fÎgO2JãΟèØn(döì9üþ‘‡òr¹ç§¥àà“PZZJee%/¿ôŽoÑ|R„¸Ýnš›šyùå—¨4ˆú1cìÌA p:Tªë'`ŽJtã¡Ê'ùI8MA“rÓI³aˆnRa*¬!DJ-a° ‹AFkf”–d¼Z‡S¸Ø£·“1³Dõnbz—ä%cf’¤[2è‘ MÒh‹déjNíMããÃq´LÔ›¡¨öV.]…€N¥R”•—s÷½÷PU]]pƒ TþÓï !wÄÞ[…^[´¨_ó¨U§Š®ëüõÙ¿²iÓF¦N›Fqqq¿ôçpFÊjkHÌö` E¾8Â)a4ø³ !3ÁhMA34V;ÒÔ8*ñ Ñ£TdC AEAà=„åÄÌ8i-JHï¦èÿ·wæQr]õÿÜ·Ö¾tõ¾/’ºµ´dK²dɲ ± ØdB&Ì$$1pØ9 2a’Ir’!! „„À›l,Ù–-[Ö.Kê–Z½VWWU×öêíóG«Ù±d-Ý’ësNÖiUß÷«[ï÷}÷þ´.Úå0uè4Šmrˆ9HKE'2ìa?QDŒ88^šÖËè[¿§Ÿx!^þ~¯ìóåÿýçl]ëý¯Ä’€s½Æ Û¶‘ÉdxìÑG ‡Ã‹2˜·E×uöíÛÇÃ=„"+\síµ‹bËÕŒí­„6­§TÍ@f„À .º!˜ UéReò–ɘªÐ#Åðñ©z9º]‡$:¶WåˆðÑÈ*Ì8§0¼"S~I褤 žÁ¬oRUÙCWeR®Bê´OÇô®ý„W¯`È19vÖÉQ!¶mS(øÂ—¾ÈÛî¹gÉ:?\Á07ÞñF†‡†Ø³gÏe=4ôr¶ƒArÙ?ô ` –`䯯ڳIDATŒD¡¾•liqhŒºI‡™FhìÑÉ™[¡M SÁ§@'D0ŠÁ„#.'P¥0†oRqó”Ý"§4Ór'Ø'$$ÏÂv«Ìze&ü2£²ÉlÀC•º'%ûFh¹a=;'‡¨K "àº.Ùì øÙÏðž_üÅÅí¨s`É Àù$½íodÿþý¼pä(àâFäUUEÓ4<Äwþé;TÍ*ËW¬XTqº‰Ä’<||”S#¬¬xvem/$c¥}šŽï2‘´™i• LWè:V¢ÿ®7°kr£T^È6ýÁ}ˆä#KúéKXÎMU¹å–[Øýä“?qbÑbg£8ŽÃC>Ì#?Œ®j¬Z³º$¼ 8Á§~û“|ýïÿaá’º¦Ív±6õõ:ö°CÒP(Š*QË¢ÍU8"•ÉèZ¤%·HÉ+Ò¢6Q§u`9{‚’›%gOã)q$¥Oøè’Oȃ”'ÑâÈ´ù*¡^ÙMAòåb§*¬{Û[yvôé©IÞýîwóûø‡K2âÿr\ ‡¹nÓ&žØµ‹ñññËšYõ•$‰`0Àt:ÍÃ<Â#?BGGííí5!x  ó7ý×|ì#eïÞ½ø®K¹Xæ@µÈP,H ¹žžëè,ÉœLN3‰…|–Ïã’AJ¯'éËLûyTI'.„‹‚¸B¢àf)9yòöaT>³XžƒçûøxhÄó>mÍRw4QŠ)Û Ý7ßF8àO¾ø4MÃq\æ¾âʼnK+W¤êSlÚ¼™];w2==}Yr¹ÿ4„¨š†,ËLLLðõ¯}£GŽ‚+Û¼+‚S'OñÕ¿ý;~óŸàÁ=€ªª¹lQBP.žš"'kt­îANçh¶©A]&cëCŸâxÂ!í—©!B¾‚ëÛØ~•Fµƒªo“q&1=ÝwY§6S'‚”1IK&ia‘–M¦ª³“UdáÓ±¡½½ŠPø¹÷|€æ¦¦3õέìØbsU @cc#×m¾ŽÇßÉÄÄÄ’Ið)„@Q‚Á ûöíãýˆ]»v‚+úûkG_†¡C|ö3Ÿá Ÿÿ<ßþÖ·’Døe*ôH’„&KLN¤9š7 ôtÒ;뜩b¯ `4 Šc.=n—Ï¢I ¢"ï2ë—H( Rj#¯8W•ØËRŧCIÑ&…i*u"€.)Yư =QfêTMö% de—DÛ*‚І@,yç‡%.¯µ¦¦&ÖoXÏ“O<Áøøø’ˆ œM0D’$Nœ8ÁŽ;ø×ù.–e‹ÅI¥R‹mÞ¢R,yîÙgùýßý=þ賟å™gž¡T*‘H&ªHÊ’D6“ã´çÓº¼åe3êbµkø/Ø´[:eÉf›&@Aàá÷ÊÄ„†&ɘJ#>2{‚17Ǩð)«õd=Û¯D")„F“«“˜(û,Ü=Y†Ÿ;ÄIäuíj‚êk;4t¹y©Â?+rñZƒóƒ_ˆ Gáƒï?û÷ ‹-É Œïû8ŽC¹\&U_Ï;·¿“uk×qçÝw½®²>t˜;çÿþìÚ¹ USÑuýüc%¾éºôõvóö•täO㨘ÿa²l"ÈxÀã¸dÑ-'q%œGü2MjSTÙ«Ö#ä8û ße¢ú9Î5±ÛY fŽSoM²+Dl ÝwÑ]ˆz2%äŠI&ä1uÏÚ>þKt,GõaéÝu?aÉ À…Ú159Å‡zˆT*µdUy~I6›%‹±vÝZÖ­»†wnßNÿ@ÿU)år…ýî¿ðà°ß~†N ¡ô‹RŠ«bYô÷ôòŽþeôwÙ„ž¦ó)‰Ù¨ÄIÙ¦CŠáJ:SÂeH2éV›8î•y<ÐL*0ȸ±‡…ï“·ÓÄ•®OÜE¿>@³=M—™&UÍ°Š¸®I›ªêƒ&ÑšóP³e^¸gëþϧi¨»ô%¾/„«Z`ΖR©Äî?ÿüïмD÷dŸëº†‚h4Jk[+oyË[¹å¶[©¯¯§µµu±M|MضÍðÐÃ'Oñßø{÷î%ŸÏS©TÐ4 ]×/Ú½ãû>¶ëÒÝ·ŒÍ;Ù:•gë–)ó‚jÑ!E‘eÓÂfDòèSRìö‹<^NBëÁpfȘ'8V~‚´=L“ÚÆ¦ÈÍ´Ë)Ü"ÝN™VÓ Þ¶‰Ù’ä‘ïðÉ´ËxÇ äf"_ú›ï½‰¹’ôKñásÕ ÌÙãzÿØÇøêßþÝ5Ïö<Ïó0 |ŸeË—óæ;†¶ÖVVô÷sý–-‹mâ«299Éî§žbrb’'Ÿ|’];w’Ïç ¨ªŠ$I—Ô1lÛF‰†¸up¿’Óè>bp¨bÑ"BeaÙfFôŠ(?’*œŒ¬$&Õ3íeR”œ3γ³ßgÖaPëãÁk©÷Udw– cvª„*Û#)$’«B8«–*Tn¹‡»~ñ½ÀOîáK¹20ßîùøË!pqDàw?ý;üÕ_þ%š¦]ö:lŠïûX¦ÅlaEQhii¡`€ºTŠeËúضm6lDHâ²O<ÏÃu]2ÓÓìØ±ƒç÷>ÏäÔ§Obhèùü,@€H$rÙWžß»—ãÇ‘žJS©T¨T*T«UÇAUç‚y‹¹Ìé{6‚M®áã+:ˆÂ9fÑžÕ9êV¤¤ñOºG,Ø,TFý š'¬40mgØkìæ9ë®ï3¨¯fS`--®A³] Ý¶hpâ–õ)®”)wªÌª G¸÷ýg‡ù\èm|.¾U€WaÞ¶§wïæcù(‡¢®®î¢´½˜ø¾ÿ¢—ëº¸Ž‹íØàûè‘h”D3,„B!Âá0‘HäE¯p8L(" Ð4íEp¥|Ç/Ex.§gòäÃqVõ· DTHØŽÏ„RŠgPô«tI!dߥêUH h”bÔ)Iƽ<£ÎiªNŽ:µ‰ R‡ãûè¢BžÛ(dh„F|f©”L¼h–J$A[ÇÊ…Ó/  qùw^1p)n»ñFײk×.2ÓÓW­ÔI–ñ,‹|±L¢·—ƺõ²‰Lçmºíe,,ߦ Ç·0=ƒFÀ§I S•d†ü³ö¶W¢NŽ"{&w×7°„ƒ#»U‰&C!~Ø¢z4˰f‘X·ø™£áóBºŽ?Ï#—šžÞ^îºûn¦ÓÓØ¿Ïó®ÊÍ75æDÀ®L–LíôD=ê¢03iÓ<«bHí¾JÙ3q=“&t>¶gp\‰ài½”ì ²öõ¾ÇV£Ç.Ðlçˆ[dk–‚["«Uq‚ÆQåT–Ù¾šW¯D>kÉn1ý劀KÝQñxœ»ßr7M<õäSd2™Z)°«EQHO¥94tšm›V±¢Á'“6ˆžGv0ñèö5fü ÂwiAC¦ý{´:RáèB¶F˜r¦©“ *-4zÍžO§ ]¦G£ìâôÁ쀊<[bbx”ȦkI¤’ yj#€%Â\’uÜvûí EžÙ½m‘—±j\\„†ïû|èc¿ÁÚm7QÍ`•gÐŽ™hT„K»§ö d<š< —CÂæH¨›ˆRO\iÆñ ÆÍãœör¤ä:š¤( š|A¬ B¢au}sŒ‚ȳw4MÓšk‰†æ¦š5X"mŸMCCw¿ån:;»xþù癚šZˆ„׸r©¥R‰ë6mâË_þSî»÷RíÝÂÍLIÙ©I"Å*U|Ú=™)×$ä }ɳة¨LFV2žPiõlšœYziÆü†§$+¼2®oázm×£®%DÏÚn°@ÎÒѽXÜQÀ'—!kyû;ÞÁôtšááafffjÓ‚+ !žç1ž¦½³“ûß?ÿóÿ˜Î®.$ YßLóºðzÛ˜ž<ˆëèL†É*²"h² §ÊŽP#܇†OÑ·è6§xQ²xtFÉÉAÜðÒV&™1M0%|¦*&3%úfÈù9¬H7uñÔ‚‹Õ7gS€—0Ÿí÷gÁÁA&§¦8røðk;ªZcQ(—Ëx®ËöŸßΟ|ñK¼éMoB–åÿ´^® A}g™ˆÎ¡¡ƒtÕùÈ:fDÐ*ÉäJ&†[ñ-HBPõªô•‡ÙìéDäû½ÓκP‰k}HJ]Q"„üÚŒÀ=jb¨032ÆqÛaùu[QϸËbŒjpt÷ôpï}÷Ðß?ÀÞçž#“Éàºî¢”'«ñêxžG¥RÁu]6oÞÌŸþùŸñKï}/‰DüU7ÊHBê]Ál4_%4)êq »Ý6ëqßÎr}e„Æe•‘@ygšIë’›§ÉsQœY\'OÝ•ˆf õ°‰64J&)Ñ´v ‹3¨ Ày¢( +W­dûöí!çÔ©S lj,.B …¦i2¸v-¿ó{¿ËÇótttç¶KN•]Ë—SÑ5ŒÌQ\ß . +|ŽÌÄ za tkŠ[ÊÓD|ŸÝª†ÛLH„™²†);3¬S›¹Ij Û±iqL’މêT)ÇlŒ.•WaôÔ ŒåËiik]°ÿrŠÀ)KA`4]gÛÛxÛ=oCÕ4†††˜œ˜  . û^ضM:fë 7ðk÷ÿ:ŸÿŸÐ&ßâ«9þÙ›qæ¿; 5w’ñ%F'Gˆ¨&²ª0<¢ut„䬌²µRİ#”ÂÐÛ©ÓÚñ|‹1ó^‰œ@–Tð,b@›#ÑãÈ4tP¯‹RNZd5…¦¾Õ ù+k#€+ˆp8ÌM7ßÌ-·ÞJWW{žÙC¥R™;‡®(¯«¾X Ç¡R©àû>ÝÝÝüÑçþ˜}èÃlÙ:—'á•ÿ\vੲL]×åd³Å 7CfX"PÖAvH9“l°LF]=Ñ6$9Ž‹ ß.ÓêyÆgƒJ Ÿ¬eDLÊyË@*Ú4&uúúã„ÄGÒ3$:VÐôÙ}¹¦WŒ,%ÇBP__ϦM›Øþ®w!d³YÆGG©z °¤ì½ÒBà8™L†`0Ⱥµkùä§?Ío}ò·$üTÇ?Wd!hmnÆK¶’ž9NþøÑ´Ž/y$“YV‡á°-1©7—u*î,ëŒîòë8-lö;§Ñä8]¡kI))tYÇRr¶KzÖÀ”ZÛttyšãAkÏ*¤³RŠ×à b~ÅàÆ›ndûöí$’I„$qäÈÇYu ®t<Ïc&“!‰ðÎíÛùµûïçS¿óiVô¯@UÕ‹æø/%–Lá7tpbä$ÊÁi¢® ¾¬J{»ÄACÆ5D…Œé¤YUžd%:å8ã”ØoC‘ƒ4(­D|HH* B'XäGJŒ êÚ–*é\®k 6_j®˜ãÀ/ÇR>º;ß–e²{÷ÓüËwþ™ýî\úo×uÑ4­4<|ßǬVñ<YQ¨¯¯ç}¿ú«lظa¡óKïƒKyÿšžàÐg¾†ógh¾Vè|ÿÁ*~º 9bÈåæÂ4½REÑyTäù¤€œp¸!¸…µJ+qפÉói÷,šJ¦Q`rE‘üÝ=¬ù¯£¿§ás½–ÏrUæx%–²ÀYyÚ€™L†üæ·øþ÷¾Ç©S§#F_·£¦—c>Cr.—C–ehooçWÞ÷>®Ý°žX,¶ðÞË5W>›lfšÇ?ù7K{ز9ʃß.®ƒp€“æ7– 4Ä—Žj_ *;uI®á„3Æ?–w°Fiç}ú&º ÍÊãÚeJ²‰£ºXEõ¼õ¿õ˄á…ìN5x®8›³û§\.óôîÝ9r”o~ãŒ>ãº8ŽƒUU¯JQ˜ÏihÛ6’$¡ª*²,³íÆùÙw¼Ö––…!þüûaiÅ— …iŽíø ²ÿ ?ÖÐQŽ„Š,ë³éK+Ø#U|ŒÄ br”oOó€¹Zw«ýôÛ6=¦A£ãPét™¬¯²ß‘øô§ØxÃõ ×q]÷¼’°Ôà âì¾*‹ÌÌÌðàÄ~ðr¹£c£dg²àû„ÂaWðŠ‚ëº”K%ŒjMÓèêꢡ±¶¶6~á=ïaÕêÕD£ÑÅFû¼üOcbfœ£ßú7êþ׃4%ND<Ô냬ƒeÎØHj 9ÆQgŠÇªûø¡˜æšàFîЖÓ`¤i)ÏÒ+9´_"Óçq¬{€÷¾ööÎ…ëœÏT &W /×g†aðàƒ²÷¹çÈçó<óôÓá¦e¡kú™ÜúKÕA<Ï£Z­bžëR—J±eËV–­XF<çwÜÁªÕ«ÛÌ ¦X5yá·¿Lê+;P™¡Í°jsœà˜Éf‰L7UÃŒxyš«eþ†“üP®p_ôv6ËíÈÖº‘&(Ò»A£n}ˆ-+è¾õ—iii~RXäu›øÕ¸ZDàl^®GNbhh˜R©ÄýûÙùøãœ> øø ûÑ9ó;ðgŠjšF8&ŽDæ* A  §·‡ë·laãu× …e™h4úŸ’©œý}]éŽ6EÇbêɽ¤°›lå×÷ŒìÏa~Ï¡SDØ'iqÖ¹1þMÏñÑМàƒ7mA9¦"ž6è.»Äý*åH–½«‚,ûÔGÙzóÍ ×˜¯añjÓ×ÀÕ//å\úز,NŸa||‚‰±q2™ •JË2±m!I8¶$ÉH²„ë¸ ?eYFHsB KsOõ`(D,¥¹¥…¾Þ^ÚÚÛ ŸIpùj\Îuú¥€ ŒSØý-ÌçÇþ‡+rqGª„£.3™ üßm¾ºï÷½¡—¾gÃ{ Lü{žän‹î) Tâø¶:ôßøo¬ºýô3ýæºî«f¨º¸úÂÍW)¯¶ãm~H®i}}Ëèë[vÙí8Ûž«Ýá_Š t¶µ’»åÝt|Š­?@ž©´F›I锎뺈ôGøü_k*ž |ç[˜]Õ‚£Û¸)…Pg×÷Hg+DS>yÿfš’a>ü¹ÇxêéqB’JW<Šº=+ëéë/0´ÿ›d2Óge¾øîZ€5.2h\þ¦Ÿc,š¤ ÛÛƒH O@Ù¶ItFyß;×0­ð¹¯<ÃáSYNŒæ9z<‡]öioŒ MòìÓãû¼hêv1©MjÔ¸ÈBPßÕ‹o¢j Óó({à%¤°DCREñË[<öìѨÆ[ïYa‰\Ö$›µQTÏw'ˆD¢ m_È4 ¶ P£Æe`>¸ºzýV^0cš{ˆx>eßCX>®€ªðxó h’Äg¾²IHÜûÖ>š›B¶‹eÉdGNòÌÓp×Ýï.~ÁÚ FK„ïûHvne\Ná„]$ÙÁÏÇñ} Óåömܶ¥¯û0O=‰Xîe[ñ•MŒœ*Sµ+¸2Ã*9ÓFKèl¿£³âóíG‡È`R.A]Eu')r/ió© @—ß?èô_szݽL¤£dKêR Žìc&É„Êß5H)cñÿþù(¶ðÑSAd”CûžÄõ.î’`MjÔ¸Œø¾O<fÓ¶»Y6øß™.® h‚!ñ±ðéh‰p× ŒÙóÌ¡p€@Èfrü0¶íowåE9 X£FócÞy³Ù éÑ'ÈŒ>‚䥩Ê[A £é?~~œž×o¨ãð ‚–eïaý† ¹^ëuç©í¨Qcð}ÔÕ…H$o#Ù´†‘áƒÌö U^ ,AWk„™|?Þ5NkD¦.òfò÷\ø’`mP£Æà'#‚ë¡| ’ªÔöÔ¨ñ:¦&5j¼Ž© @¯cjP£Æë˜šÔ¨ñ:æÿM@¾1Œ&bIEND®B`‚qpidc-0.16/packaging/NSIS/qpid-install-banner.png0000664000076400007640000015760211263471472022230 0ustar00jrossjross00000000000000‰PNG  IHDR–9ÔKÒÙsBIT|dˆ pHYs  ÒÝ~ütEXtCreation Time05/29/092ñl‰tEXtXML:com.adobe.xmp Adobe Fireworks CS3 2009-05-29T17:56:00Z 2009-10-07T21:35:58Z image/png P@ã)tEXtSoftwareAdobe FireworksO³N›prVWxœíšKlEÇ·ylÛм¼Î£éØŽíŒw½^¤J P^.´Q)pŠ ‹CEª*¯C¡¨i\Šäc„¤FÐSj/í!J"ä*¹pàq ¡||óÙëGâ<½ŠU2ïÊû˜Ìo¾of¾oÖ›_—®ÿ¥œVN€ƒpHã–vèÜ¡ÝqÒøqðb:å¤ÒN*åØ¸ÙŽ’r;M·…R¸¥Ò6nvZI¥[\ÀKB6~R¶RR)ŶéܦݶüØŠ¢Ð‘B;HIm£”m–äK~5ùKKKP¼ï4~µý/ù’/ù’/ùÕáçžjðoÜ%nµò_4Ò ­-~øü³/v¤ÿ«=þªUã«ã$mmÐØ†K¯ÍW5#iqËÂÝH°Uë\î ü Oø*G0çŒ1®' ‹k«T¸QÂc÷‚¯¡Õê`ÍbòúÜy·!ø1ÝÜÓfæKØ~·‘Ì[Ÿ¿{o8P Rè ‰œ‰V"?äùâ¼R¾j%Âù“:ÖÓ,À6Š'òü€©³lÿc(â{¹‘(d›½]½]µ”éw##fž\ÿï1õ˜§|4¨¨–û»z÷ׯtŠsØÿ»ÜFR¤Á몊±À-ô`ü“EÝXÛÒ»¿3ëbnÄ|ni–2 3×­ÂüódýÃ(Ñž?ko utÖßâuY<'÷ ÿkb(¸Ô-Æÿåü† 6@BO„»ÂMäwõ|„7¬`ƒ’‹? -ÕTŸŠ­ÒMoÖŸšXõaµ˜P°)û:zöå̉†Y®Y7àè4u“‹,äÉúGHÅ®[–‰ýŒá°¦3rá¥çƧ(„…uS¤_mýï>÷ ]*óü¡ihjÀOÖ4uf팹ã KdyõbQ¢Ð‚lö;ÚÝ”×)¾«±±$þU¬«?_[tKóÿjÚ­å¿ÊµNÿ—Îÿ+Ãmåâ_uøVUýó|åÊ|ùbéïþžøýCò%ÿÿ̯æûWv -Ímø …Á¡vÜïÏòý·äK¾äK¾äWƒåÊ(¼òò« Fè=ðvóþhtA…± =ÛÎokÑèù»­U#û5;<ôàAþnߺM÷Ä¥¹©^;ù:õÑòœ½Ú.%%%%%%´•œ±ÖýL&—/§ßzú‡'úy í;ÏyNÂùóŸÂµk×avv¶l›2™9x£ÿw8Ô8Ïÿþ±Xrßým\¼Ÿûää$üðýðÒñ4 kâ·ëHO >ܧN½ w~¹³¦Í®Þ}ç=xö™#pôÅ~8|ø)øæëá5m¾‹öŽ ÀÇç>3gÎÂï—.} 7oÜ„¹¹9*ó7Ú966ô===½á|-s¶”””””«Í䎭ä–ÅÅEXXX }£|¡…þ…³¦àésßÁ…ÑßDÉüßçlñì*r¶+ñ?n™Ì]‡©©)˜ŸŸß½[ñÓF´Z9™³¥¤¤¤¤6«Jrô”„jY6¢—HmkBFúÞÊþ)¤3¡7mkTSxœí}[wÛÆ’.&;Ž#[¾%³ö<Ì‹Ö:sÖyJ6î$EQ””PCP¶œ/$lMÙ#ÉJ<\ü離º—F R”mH¶@¢qéþªú«êêjàð×öÍìåÀ;›µæ/‡g3cÞìÄ6ƒßŽÎf¶m7œ‰cÏO{;ÁLŸ¿f›W`f8ú|ÿ`ÌœÆ|°ë³†9x'gPÞÞƒKügÞïõnfí>üÙÙ^Í´ m¬ùÚ­¯Mµ øt¦ÏŽ¡ä”\@‰¡ý¥gÚßpÄù|Ð9ãE·èÚÛPgkÚœ·;XÏö!T>€ ìÍÛÞ.äu©ÌÛ§M»G;Û¿Òfçˆ_`·KßC:¨Û¦oÝmŽØN¯¹óöÙÕ‡»É!»Ûlc-°Vú¼slœÍš°1ñ2c‹6]ØiÂÆd 7óBÈü‡ mKÛ†½×ðý'øtÛ‘v%“»Ä̸%fƪ0{Ì1ÛÓ.—Ú;(»Ö¦¹ØØ ›i6ºßO`£ç`ã76–YÃfðŒ<#O“ÁÓdð4ç^ÿw¸Ëxîy|Û?ÔœìàŠø‚¸£½åz0‚jÒÅŒƒ &4M'ÍQ4%MËCSÒ´Ñr{'Aèº ½~›•xl‡ô{i›úã™æs@Ÿq@=3]ÜÒðé#ì›,ìµJ,À^n¿µüŠývT¶ßfa´É1Ú‡ý—¤n=(½XU¿-aJ`£¯›g)ln©?K¶”ëGh3ÕÃ*kÜ·ÊèÏšû– ô¡óŽt#©A±’Šy(™÷”Œ¥£ô\‰R‡úÚLa¾6ÝWœÌ¥ãôT‰g§ò­¯ó4Éa9 !çVým¶#íFûôYZ|#é‹: &‡Á4b0LjO³h‡‚ãþ¹v8kén#Äé=·ë;ts]pß®hÙtΠÑ4:ƒFgÐè h694Û —`ÝÛð÷#‚ÄúžTÌ¢¡Hcø¸6ˆÊÔ´s¢±] ¢É-=#“!d2„l†Í²Ù€Åšña3h¸;Ê`(ÆÍCP¯¿AÉ>²_>’Ê>˜¤ÑâPšã¼Á³ e©áse0ÍV10Ÿr0w@áÎ)ó6 7|’z-*åŸðù½ö>?@û­avÖ Ý.ßo!I„€Hy£çdÏ5›…±´š|m“ÒØåwèÆ„A×ôrÓ%¹zž[aV$»bUè7è§gxT ÛacI·DôOgùyÕb±n!Æpr¹Q ¥ZPiÝ ;jÕ:€Ò1uЋ\53ZËÕ³åW£gßqŒ^-¸V¢ÓTLò:òFÓxjsíøP|‚¨íé?ñzGc4f†M…6íÝDÊÏ÷ó%¼ ÓW"&~Ã/¯R6•Ž8fÖÄ.l;«wʶˆœrSSÉ>‘ÿõâÙ ÉÀ.`9a9ÑŸ(dÈmHòI–#Âç oɹ%â"ËüñaPâ‡É€YxÉf,O:—ÆwÊ=<¦(ÿR®ætÊ0“F>fUd5)ÒLI6t¾Y¾‡î±c2è†Å°3¦…©1T<3P^wÈ‚|"[Zel–šÑ¡bĺHG6›ÜK¡AIA´,S…–ËÐrZ.ëÊŒñÃ8º2Ú˜Á~ †ÞÊHûcAh¤ÉPl1ÉE‹¡¨ßE›¡ÈTL #Î "ŽfŽ€[ÅB$-Ž$W<—kžkgÎÌ 0uä)[)‡4=ìk”éÅ…´²˜÷¬VKêÌh¨ÇKç?20Ô‡ƒ¸¥a¶'[=Cv)'Z†«S†/AI·´Cþiª]QØ2δHHFí -É{tSSðm‘Évó±Û'7üwÇß‘ûs©œo';Aê©'º;³.©î®™/7­»âP‰èz/„([ÑäQН X™9ƒ”È“©àr¯LÏâìùÛØŸÉßnNKàù0A†ËO.îÓ—“GT¢›†`É™1ßq°Ž914EŸ'á=š£ñˆ|>¿”.t¯}Õœà‹?b¸™Ü"û¦äAO¸ȼõ6`gè59|M†ŸÏS|Ž ß”-2~ˆ餙AøA¸ý·:ƒÄxi‡\%ŠG1QœÑøpÑDѨ¬Î _Íï"µ$_HØn16$nIyBFÿ÷v¹4ºL„1™æmò0jÌFBSm» D#Xˆáãpøw*lM ©°4 587:áQÚÜ£´’–Ϥ­E[B’i¢R[Ɉ£’º†vYõVô<1Q窈ÿ#BÿbJÊMo;%ÅÕÔ‘Ô4ɬȷegƒëÚåÀÀAèI€æbõüQ=Òæ“VÅ:}£b§/d¦ø(I3)N{œèó¶ªÏ 8e®uø<¨Ã'Ba›œšb¾ú€ê 8ðï´(yà úõ÷)oP‚§4(*–§ Íý…^g±yf S”tBF B¹UhC™:ÆÝ¢Á:yòâÃà8¦Ô:ÃZÊ-Žq±§ÙT†hx´D„ŸÓ±#§8ÀjËR;)m6+±¶Œe\Ö€skäÖ`´$à¶Ã#µŠš*™Ï÷³Â»<Ë*bnÞkJÆó»/´'vp1 Cñ†nÃQ ]¥ê*Yø¨J¾„ÐÂd†¼ÉÕ¶mYïuy÷-ÚC-ž‚“oÌ-U§•¦Zu%VzqÛC|›Æjl/¼…–\ ¼!Á^ìƒÅ>0ëJf}ðC_`è Çh 8’ù¡Å0s‹]4ð*DÇvÂõÚWÆ÷Ì] Aªšjïˆcj©0õ›jsÞâcÏ ·\漓Ñq¶vdÄEÜMŠeƒùšÿ0ŽÈSÊWO§ê,v ‹Â<¢Øp¨ÄLxOJõÄý]¾¿Ëö‡P’µnpcÝ`* %ÝgŽS¹ÎþšðÌ·.I ]hî±n&{ûX™j'ù™Jë’å¶gEÙ“³¸\ÉŸÌÈ';¨.ÈP¤ÁŽpâÿÉA|I»OYÔW´v C›¸”h‹fx1O?R³cóåE焬Å#x?É§ä ¥Çïv©q'7âÏ÷„-aÌÃï|<Ï(•sAÂÛ$ÍŽyúͤ£_R ¸@,­SaβQ$9²H„ÔJúœI†¾[m³©ˆ—ì3§© N"œ@E÷Èïü+1¥Å/–O* 3“€¯´øÆTeŒ;…l3t)ßQæ F™§©|*6·j\Î(>i-·üL¯ðÌ­»Üc™ýôXft/B'èœRùÊF–Õ·W=JŠ…–GÊáP¾"#Ù5R*ŸàÃAN{”E;ð1ì¿&k³h%Ø2:°S<^$aØZlÅEÎ4¾YR÷:šãÕë`jz\i¡­V39¿(­†:Æ.emøj T9èòBêhfƒ»•ñ°SWh`Ãa~’[N[Ÿ„¡Œ÷4¶|Àó¼·|]Þú—<;ÝTæ=c`*†¸Y&`œ¥µÌáôÒ£òE>!ø7EÕ¶(tTCÊU+±‚!ÄÑ^Û¨ü8 ^0BòŠ,#ÊI âƒp"ûÜ»Ç&²9¸˜»Oón¯s3ëÆWà$ rg±%JÉàˆð'Iç$³„ˤËé2Uì2…êîhÝA‡ XÙ>ÛœâfÞâX…ø‚_±IUŠ—œd–T«’ɪ›½°F/ >~øŠ ì\Çž§pv}ŸOe"ÓúÚ ¶âqݽ—üÑ»ø|ÞëãCXºì!+:ýÌcE†(âÏ_Á²×X¦ßþ:FÅKˆ"üéÆÓž—uF±ÝÔ~YnŽ^Z•â%Õäf1¹YµÜÊÈí)—Ûñ¡µ7y+Iïi(#Õ1'Ž©&Ñ“訖h‰> {"Π錻ÑAlž@”ä”U“œÍ$g×’«Ò™®)¼v)ð’ú¢ú˜“ÇÜŠ] £i‘F¾Õˆžî%+<Ä/öŸdì¯&.‡‰Ë©¥UEZ}r"ýØZô€¦Åþ“ŒýÕ¤Õ`ÒjÔÒª"­.!2 ñR‰öŸdì¯&­&“V³–Vi=áÒÚåëR?¿Å“'\>ª#NQM–-&ËV-Ë2²|ÈeÙ¦ÉÔ«pŠ5W…]†½NÞ[MN>““_Ë©Œœ6ÂÁööøy@•Èò¨¤šÌ&Lf“ZfU¬Ú+Êל¦¬Z´ÿ$c5iM™´¦µ´ª ¶ûÑ´Jèã? ½ÃxÙINY5ÉLrA¢b›¡Mµ±Ö!Q¼£Y1½+ÔF.?YP^­’ôâ¶cÄívÌÄ7+ñÍN|âUçó= `WQÓG\M”{Þ¦ùÙ… Ê* ÖŠ–®Í‚ Zì:KPÐJÐ){s¶ª6­†íR°Â0ž4}G2fa©ë›SÃU6dLÆþ$-ÊõTa]âxÎűKyÊ”GFI·á(fQ5uËOù(¡’ãVÃg)¹1µÛÉPrw4õu#KÉÓ6äê£÷ºúëR 1Ö=rÊ:Úé±E„$RÞj‡ëÊîB I<±d!ÉnœåŠÁ¿Â¾ö=®þº=ɯ!6y+úž$ ÅüÉù‚à_©»ì°ü(InU7YFðw·Û¹™ívcóšS‚ù€2™Ñú´áï =áTÌ‹MÃå #íz¾Û÷nf]üó+ wµ€mc<àÈŠ­¯;ão(é켄£¾å±‚é|;÷qâÜCzÑÖáçü_m¦5¨ÔÕ øÕ5Sû >û°?á¾ ½‰® ûP¢Ó¯CG6à¯%ømž¸ëFÔFm¨}Bˆßñß4=q䣨‘¯h)̵öŽû Ö(qô“ØÑ"yé’ÑwxNCs¤sváª0l¦ÐRYØÒ FžÐ»öÞÒÀ[¼]è‚λ ϰglҳȮ€9²Ž—ï=ǬÃn2¢ Ó?H2VÑYa cÇ[RË7 6çä€NHáYìÈCJʼæ¯ã8#×UœeHg±Õ6 ŽèƒŸõPû?€À5'yß§´¶þ/EÆ^0I¿çë±_K $,÷‰«ó¯Ä~å+<¦+œó(‚ªþ±³¥3=Zý6¡V¨ÎŒÕ\Ân—¿ ´zþˆúÜ¢¶§5Â#]þ $1Öþ›õr~î¨-ú¹W)Fh“Ô®©ÿx¤y×™šñB,†äG^fj¬|æFx¦Ü¯å#ÿ ñÔ¿KR˜RLç’KãîqºË ô'èä{êñ—°/Îl'pü[‡Èïò8Ƹ[1Î%Š®ÀÎÊáz[³sÍÎ+gg§fçškv.ÀÎ!;¤ûaŸ«ºfèU3´[3tÍÐ5C—`h®ÍW»× ]3ôÊZæÚš¡k†®ZÅÐ?¤šOiˆ{ùlÍÙ5g¯š³Íš³kή9»g?âœý;õ½ßáo¡÷Ô]sôª9Ú®9ºæèš£KD>b]3tÍÐ+gh«fèš¡k†Z¡É_eæQ³ó=`ç:ó®fç/#í\;™w5;ßv®3ïjv®Ù¹;}™w5C߆®3ïj†®º C=™w5C߆®3ïj†®ºC×™w5gßή3ïjή9»g™w5Gߎ®3ïjŽ®9ºLäãëɼ«ú>0tyW3tÍÐCwà(Ôÿ˜<ÃGœ3†Žž¹ø&qÔݲõø­¥Ùð;ë5—ÂÖùZ,ëàH?Jœ½(Ï:~,{HcÄ.¶Ä ñc³t®‘Ó’4GZ€€s'º'ôi+¡+euOäq«òÕéš+Í¡.Oך¥u ½ó3Ö¶§\ÛâvGöF¿çú†q]°_|ž±%iL¶/*Ç?_OTnǺ=Ñ:ËøsôD ©oמh6?oF| Cû =€;œ¢_6C˾fÍÐ5C× ]Ç –ËÐO">Õ&¹ý,!Å-j{?Ëy"fà‘tΨ,~ÆÏø›âìż;†‘˜¥-âÏ)ñ®M}Eð.ŽÏFð׊‘:Ý„ï0ÝŽŸß–‹Ú¯ÁB[Ûp€jÀØá Üë’ùä/ø~Ö­Øÿ†wz@mß¿‰«>ÐFã}mOòÝ÷Ú¤à(ï”æsõ´ Z²™Xº¾˜’Ã-u@6-y~m8^薟Ƥ]“]šä¤…hÙoSr\UÇ”Ò^¤J[ªèÞ£ÄÕDÙÝêI:Õ]ƒ>G:†\…ìU]ïŠx}®$¯Å™<Ÿ]ԗɲū±”öh¡Zo’¸ ½dÆGjÏV ¦{ÿÔ.Cï”c­ýK–We[inX`ûƤ-ŒÅZ WFB¯°|WÑÉž"ïµÈžÍ”Ç(«A³I +Î|CWÈ_„úžöß}éêEÎZ¢¥.¥+ßÅsL+èÂäê€>\¾?‘›ÈãÕfh‹PÐúMà¿Nštºlé}À~Ƃݮ*÷FdiÊB™y ç($`®Uªö&½‡+ê%—4þzÃyø |«3{[òœw¼Ï&Ïúi©l•&Ô«¯ ÞéIìøâwÙ€rÄàOø+_ß(Øúift$¯õÑYÅ[Ÿ}§¬ÖçßEn}üúÉÖ?Ïhý[M¼—3kLœ…€|¦ª~O(,ºã3%Eîö8Fú>rDGÈXcïV×NÆ1ªaòâ¨bÒúQyæG¾•×Üõ,ÒC­;Lfˆ‹gìS]Þáë “¹ÓË*‘›:gñJCC:cÑJCô­Êf¶Ës÷õZC–‘P¯5ürÖ6%í[ï Šo3VM¨YX<6þ®g8¿<&.¿æ{õLœ^wXsqÍÅ__Ívk*³¸ø;@ùœ¼ú ôP±)¾¯Êè; ùéðyä±˲f+¸uàÍõ®àN¶tõcíÇPq¿ôh{ˆC[Ò³46ˆQ?圅í„mù¾ e¸\K`oÛº¥Ô'enml‘Ô]šÕm%¤>¦9¾VBêø? cïf¶¯Hû¿D]@~þ@¨°9c‘—$Öªö‰=¯‰…ßiì)khco8¦iýX­g†‘»)Y–€|,Œ¯Né ¡[#b\Ëž[áhrþiA Ά$uë[Ò?æ/É>ÖªV–Á=Ἷ=¼™µwzg³ ÐégÞM~뇒þžbŸo¢çS„>vò±O2Kãñ ®;lŸáf·Kïðlf·áÙ̘w:d0`eûlsŠ›ùð´}3c7~æá9Ó. 9¿ÞÌ^õᘦ>ßçÛ¡÷;\Z1<€V :g³F0±Šã O»Ë¹Ð|÷´3ë±~;=ªt¿G-éoȽ#¶oÀ.Òò1ßî÷ØÆÃFooïзím<¸ÌŽìà {=ºÅ/ýßÎfn=öõ˜múxþ^÷7¿xx̶»ìë/÷‹×&`{}Bô+·çõp_Ï;ÁM‡mzI`Ç;ÄÓvw‹³-J?B2a©‘6`tÐô´¯çÞökèh¿î᎓I¼ÇûÈ+8qL½uýaëõ¨‡w¸C—éü;=ì»xÉ_qÿnï5Ÿ¿<€ö½dÍç©ûéü~£ûÀ=Ľtv/#ÿ^‡{áŽÓã.å;³ e:[<ÏyNÈm±Nd5X'j&ûPËmàãB†ÛÔ¹ó½Açf¶w|Šß;~M¾Y.l_³-£+—~àŒ˜½5f¯ó+c2üßöQÝ;/ñVÇÑϱ·MÊÔïìÀm ¬­ùËÁ!#¡ØfðtYÛ¶ÎıçÉ,ïW`f@‡Ü?3§1ìzÁ¬aÎÞ ^½½·ƒÕ`?З¡õíˆU7H…Þ3Ÿá,öþ‘1±'Æú°ÿoû þlo‡´·¡ÎÖ´9ow°žíÃCì9íCØ=š·½]:È£îÑF"…M›ÞnÿJ›#~ÆÄíW»Kø´»Äfí#¶ÓÞh¹ó6ãîö]}è±›²ë±ÍÁ6Öòkª{l€äacâe:Çmºr~§k²…›y!dþC… å•^Çôe˜žQÄW»Ý!fÆ-13V…Ùc޳th¥ŽIó°±6Ólt%6¾ŸÀFÏÁÆo2l,³4:†Íà1xF ž&ƒ§Éàiν>ÐŽ?ž{ߢ½4Á6zÿP ÀÀ( Ÿ=ì,~dL¸0¡i:yhŽ  )iZš’¦–Û; B`Ù4„^¿ÍJ<¶Cú=‡´Mý¼ãp†ž*"z[Ú€ÏNöZ%–F`/·ßZ~Å~;*Ûo³0ÚäíÓ(`Â}ú‹UõÛv 6új°y–Âæ–ú³dK¹~„6S=¬²öÈ}«Œþ¬¹o Jï:ïH7’+I ˜‡’yOÈX:JÏ•(u¨¯±8Ì爓¹tœž*qâìT£µóuž&9 !‡!äܪ¿íó€Á§ÏÒâI_Ôa09 ¦ƒiÄ`R{šE;Ü„>Ûg-½Ãm„8½§É¶»ss]pß®hÙtΠÑ4:ƒFgÐè h694Û ì-M—”÷.|Ú=¨˜EC‘Æðqm•/¨içDc»D“[zF&CÈdÙ !›!d³Š51âÃfÐpv”ÁPŒ›1"ÿ·Æž–±HÑ,eÌÒhq(ÍqÞàY†²Ôð¹2˜f«˜O9˜;4Ä" Ÿ¤^Û¦h1NÏ¿ÏÐðnkX…uC·Ë÷[GgH! ’AÞè9ÙsÍfa,­&G[Ƥ4vùº1aÐ5}†ÜtIn…žçV˜É®dUú ú)›‡Œd; c,é–ˆþé #?¯£¢Z,Ö-"ÄN.7 ¤T+*­[aG­ÚA4ÏŠô"WÍŒÖrõl¹ÃÅÕèÙw#œ»¹V¢ÓTLò:òFÓxjsíøP|‚¨íé?ñb«)|šk?—´i'œ Ì÷ó%¼ ÓW"&~Ã/¯R6•Ž8fÖÄ.l;«wʶˆœrSSÉ>ËÈ\<$!Ø,g ,'ú ¹I>ÉòqDø<á ¹1·D|@d™_"> JCü00+/ÙŒ…ã RçÒøN¹g‚'#Àå_*ÀÀÕœNf²ÑÈÇ¬Šƒ¬&Eš)ɆÎ7Ë÷ñÐ=vLðvÆ´05†ŠgÊÁëYOdK«ŒÍ’C3"TŒXéÈf“{)4()ˆ–eªÐrZ.CËe]™ ~RWF3Ø/ãÃÐ[i,4Š-†"¹h1õÛ¢h3™Š)aÄ9A–ꔣÃÃàV±I‹#ÉÏåšçÚY`†3sÌ@yÊVÊ!MûÚezq!­,æ=«Õ’:3êñÒù õaä ni˜íÉVOÁ]JDÀ‰–!ÆêáKPR¶?a²O…-°áL‹„dԮВ¼G75ß™l÷1»}¾,#z𨌘o';Aê©'º;³.©î®™/7­»âP‰èz´‚%[ÑäQН X™9ƒ”È“©àr¯LÏâìùÛØŸÉßnNKàù0A†ËO.îÓ—“GT¢›†`É™1ßq°Ž914}O©Ô[”~N ^Ò}T†m¤t¡ x5è«æ_üÃÍäÙ7%z½@æ­/°!;C¯Éák2ü|žjäsý¦l‘ñÃ@|H'Í ÂÂ…ì¸ÕÁÜg6ˆñÒ¹Jb¢`k‡MÊê¬ð…Ðü.ÒXKò…„ícCâ–”'dð¿qo—K£Ë¤A“iÞ&ƒ Æl$4Õ¶Ë@4‚…>‡w ÂÖ¤ K™Pƒs£Ó¥Í=J›!iù IÚZ´%$™&*µ•Œ8*)¡;`h—UQ/+½ E1üúSRÆhzÛ))®¦Ž¤¦IfE¾õ(8\×.®ÎBO’4«çê‘6Ÿ´*Öé;}!3Å@ÁHšIápÚãDŸ·U}^À)s­ÃçA> ÛäÔóÕ PoÀù€G @ÉO8ЯØMÞˆ?'ûûÐ-’§ Íý…^g±yf S”tBF B¹UhC™:ÆÝ¢Á:yòâÃà8¦Ô:ÃZÊ-Žq±§ÙT†hx´D„ŸÓ±#§8ÀjËR;)m6+±¶Œe\Ö€skäÖ`´$à¶Ã#µŠš*™Ï÷³Â»<Ë*bnÞkJÆŸ=øË¡ù?Sah86ÃÐMb8*¡«ÔC]! UÉ—Z˜Ì7¹ÒÖ¢-ë½.ï¾ÅA{¨ÅSpò¹¥ê´ÒT«®ÄJ/n{ˆoÓXíÅ·Ð’K7$X‹}°Øf}`@ɬ~è =á G2?´¦bn±KOóT :¶®§Ð¾2¾gî ÂPÐT{GSK…©ßT›ó{¶x`¸å2猶ˆ³µ##.ânRì(ÄÈ×dѤ“䪧Su»„EaQl8Tb&¼'¥zâþ.ßßeûC(ÉZ7¸±n0 ’‚î3Ç©\gMxæ[—¤….4÷XH7“½}¬Lµ“üL¥uÉrÛ³¢ìÉY\®ŠäOfä“á/´èýJÑŠx"[ÉîSõ'™ƞžÙgk‘L@*cvl¾¼èœµxï'ù”|¡ôøÝ.5îäFÜâùž°%Œyøç¥r.Hx›¤Ù1O¿™tôK 䈥u*ÌY6Š$G‰ZIŸ3©ÑÐw+£m6ñ’}æ4•ÁéQ„SìÕ幈)-~±|R™±˜|¥Å7¦*ëdÜ)d›¡KùŽ=­žø çSɰ¹UãrFñI‹pðh¹ågz…g¾hÝå¾Ëì§Ç2‹ {:Aç”ÊW6²¬žÐ¸½êQ’P,´ {"Π錻ÑAlž@”ä”U“œÍ$g×’«ÒÅã«ß“SÄñ’ú¢ú˜“ÇÜŠ] £i‘F¾{K}”¬ð¿Ø’±¿š¸&.§–ViõɉôckÑ>˜ûO2öW“VƒI«QK«Š´ºì‰ý!B*Ñþ“ŒýÕ¤ÕdÒjÖÒ*#­'\Z»|]êâ·¸sò„ËGuÄÉÂ#ªÉ²ÅdÙªeYF–¹,Û4™zN±᪰˰×É{«ÉÉgròk9•‘ÓF8¸Ã¾Â¿#È£y@•T“Ù„ÉlRˬŠU{¥±QËV-Ú’±¿š´¦LZÓZZUÛýhZ%ôñ…Þa¼ì$§¬šä&¹ Q±ÍPðÝÅ;šõÓ»Bmäò“åÕ*iðH/n;Fü!ý3ñÍJ|³߆xÕù|ØUÔôWÓåž³—,/TPVµV´t}lTÐb×Y‚‚V‚æYš=J:ÃcÓ YŧÿìDu£§˜gU[ÕÅWu“uÁ»ÁáõèÑ>ì ¤®ª6-«z‘l­Ù¥¶‰¿ÉR;c쌭±‘,uE¡xÞ|¼°ž:™â¯„¦Ž¿ia}~Õ_—<Õà”ãÛþ\¤ *Å7ã…¨Ý (£ ›#¹ÐgvýçftÙÌþ$ªSHîoÝ×Mµ˜FùžÒª®µc¾ªìíb{d¶ô‘ÓÊh\ÃW æ×YH£ ýÈÈ·\l°™»—W«b»ÈuÖЋ˜Ë Z{M)zì•z ŒöÏQ%ÆÐÇF5˜Pœ,lÉgæî%ßh]P?åPcÉ£M”N•Yɺn5e‹ì p\kÔȲƒàº9 ˜>µ‘sª!ר}ßëê¯Û›Û¡—•}¼9[U›VÃv ©XaOš¾#³°ÔõÍ©á*2 &c’åzª°.q<çâØ¥ÏØ’4&Û•㎟¯'*·cÝžheü9z¢†Ô·kO4›Ÿ7#>†Ž¡} †ÀÎÑ/›¡e_³fèš¡k†®cËeè'Ÿj“\Ž~–ⵋ½Ÿå<3ðH:gT?ãgüMqöbÞÃHL‡Òñç”xצ¾"xÇg#ø €kÅHnÂ÷˜nÇÏïËEm×à?¡­m¸G@5`ìðîuI |ò|¿ë‡VìÃ;= ¶oáßÄUh#‰ñ¾¶'ùî{mRp”÷Jó9‚zZ-ÙL¬ ]_LÉá–: –¼¿6/tË‚OcÒ®IÈ.MòÒB´ì·‹)9 ®ªcJi/R¥-UtïQâj¢ìnõÎ$j‚®AŸ#C®Böª®wE¼>W’×bLžÏ.êËdÙâÕXJû´P­7I Ü„^2ã#µg+† Ó½j—¡wʱÖþ%Ë«²­´@7,°}cÒÆb-Ð+#¡WX>«èdO‘÷ZäGOÈfÊc”Õ Y‰¤g¾¡«¿ä/B}Oûï¾tõ"g-ÑR—Ò•ïâ9¦taru@ .ßŸÈÆM€äñj3´E¨ hý&ð_'Mº ]H¶ô>`¿cHÁnW•{#²´ å¡Ì¼ Ðs0×*U{“ÞÃõ’K½á<ü¾¿ÕÆ™½-yÎ;Þg“gýƒ´T¶JêÕ×ïô$v|ñ»l@9bð'ü•¯olý43:’×úè¬â­Ï¾SVëóï"·>~ýdëŸg´þ­&ÞË™5&ÎB@>SU¿§ Ýñ™‰"w{œ@#}9¢£Fd¬±w «k'ãÕ0yžª~Ohäßí©‹Åwz”@B¾‡q/Øù1”¤ÈÌVœ·nÍÐFÈÐö½cè¬6×,]³tÍÒ5Kß?–~¡íÓ‹hÿ#}Œ$¦Ãûàl9#ÜI8Â5ïÝ·Hû“2}GÇ“b¯M_³È™Ï)>]~ì¼ gœÓ±aLXÒõ<ÊúFp;„Î µq9Ú6 µÍºwÚ¦joR»Èvöïµ3Š‚\Í÷úè^x3;ííàk”_³Í<Úg:Û‹æ©kâ¬Ñ2¯¹ñúR¯ûX°äR¯º.í~íR¦IçwÞ~Û¡ö)r=¢\‡–ÃÆþ2JäCÐÜ2eVN¥¾ñ s^YK~ýåÍ cïùÚËtNÀFlÞ™n’i‘W;VÉ+)óp}\[>I¹KzÊæeYvF•QN@9):HqÇM@ó£Ñ,—N£”ÇzG9êßEK£ÿœÇ¢Å*ÿ->úÚ†+Ày¦ ’0I&õœù,>lmšÁŽ7šé)–C´I,ný]HåÛpV“É$ú^¥P_o‡c}aÕïÓX?jå:0~J!˜#€þÜ–(½Eq·h¶Ø&7éú¨ó6ÍM9d;]”Že-ò¼P!ïß îù-_‘,bWýê)î/Æu—Jÿü@(i¹~Ì<û`;ÒÎVòÔñ…š€ò£‹Ûk‚un¹P;—ìPÀg¤lê‹i‚Aw(ï3.ÑlÒ£”ǰ*MÈkùê5áÉ;×Å5AÎïiIzðï™çfçý,Ò„çÚœõ‘F‹gtþ2x!{ÕÃØ«uïøxqë“ø¿•ŽŽË@ôÑaŽÅТŸÉ;Ëþu×b 6ÂVn‘/9×eí®yí®ª½ëÀ}Sû]Ã'Mý¹„^ÖâkØeÝ0Zaú¸¾mLœ‹¬ìÒXnL|ÐèΤ1úžw~v«WÏ·Ïávï²V÷…òÌ¢÷!ÏX»¤œò‹pícroy©ûÔ“pŒ‡™flÄÇÖ%¤G|µö9¹­wÑßÔ¨o&÷ÞŠó0KϤÿϽiQ/l¤8Oä÷­ ÿìV¯OÏ ž´þ„•l…YŠUY0iƒì{lƒµ}õ\ø#1^Tƒ74ËtE«ÿ—á½ä]_ŸŽÄ¸ÿÌ9ÿ:oí’ï9¢(0ÎWˆþ¿MVo+*©¬oSÒruÇgóI§,²º>÷rñ¯C+’Dö/ÚÚ)Yl ßMÿÏjuÒ>Žè¨7pqT1iý¨<ó#ßÊë îzé;m‡îÿjxæ]Æ÷U F«Œ×}îgµb9%l½Š²^ïz•dKWÏ,¡â~iÙc¤_0†%­Ü þý)笀bÚ­ò}Aùæ —K²yh¶n)õ ùÔ ò±Z$u—bX­„ÔÇÑh%¤Žÿ:önbEÚÿ%ê®fù@¨°™˜…™ù}²åfÖãeZQ|+iZ?V;Ó†~Ê”x4 ø?z“S:CèÖˆW.¹4S­“-aüÓ‚û%uë[Ò?ÆÜòÇV•÷_gÙ[d«Ä“ëyÄ“böIªï¿ðUáÉ•.ˆœ›:gñºpC:cѺp —]‡$gZÕ+ÃYþX½2üËYÞ”´o½ëݾÍXã¦fañ4Ï#º>ŽÈî:åËcâòOèX=§W‰×\\sñ—ÇÅÅ×ßÅ øÏûÛÛY{§w6 ~æÝä·~ÈÖßSÔóMôdНƒ_Ÿd– :Çã\wØ>ÃÍn—6ÞáÙÌ„oó™1ï:tÈ`ÀÊöÙæ7óáiûfÆnüš‚>Ó.æ‡Þ¯7³W}8¦©Ï÷ùvèý׃V  ÃÎÙ¬Lì€"xÃÓîr.4ß=íß̺‡C¬ßN*ÝïQKúÛp8|9bûì"ý!ÿHóí~mßózxxÏ;ÁM‡mz gÇ;ăvwi와uZrÈdt¸CJÔa¢Ûéa§ÝÅËíüŠÅ»=¸ÁÁá^¸ãô¸KÊlC¹ÉÏLž“ò»-¦üVƒ)3©û-·ønC½ñçå *NªoÄP؀ي“hˆÁ¢ç7$u¿ùÞ s3Û;>ÅÆì¿¦ß,¶¯Ù–ÑšK?pFʽÝl¯ó+c<üßöá{—x£chêØÛ&ÍúÿÜþHãÔѰû¾mkBSxœ]NË‚0ìÍßðƒàÊÆ­¨¼± WMš˜Íþ»- ç2“™ÍÈ*5XÔ|DŸZà=êfº‰Lcîé(”F? ¨ÎŽ›ëhÒÒ¶ô‚ BÒL«r°ñµGp’od¬göd/¶e>Éf 9ØÏ]“WÎÈA²\ö\L›fú[xiílÏ££ýƒTs1öH ûQ‰lÄH‚اE‡ÑÐÿtìö«ã(S‰AZð§¦_Y íX µmkBTúÎÊþWºxœí‘Û8 FSHI!)$¤’FRHn›wóî HÉY¯Ûx3žÕꇤ¢úùs†a†a†a†axI¾ÿþÛïÇÿ»'UŽ{—áÙùðáÃo¿¯_¿þª÷Ú¾gýW9ª Ãû¼Ïâöð–þ¹»¶ŽÕo'®GW {>~üØÖÕJþîÿlúôé×ßoß¾ýüòåËú¢öµ¯ò)*/Îåç‘Ný\®ÚϱÚoù“v[iZ_Õ±aÏJÎþ/:ùþüù×6õOÿ-¹” 92b?çTþÈ™×þlôkÎ%?·Úåöìä_2òø¯èäÏ1äBµ ‘sµ÷YäÇ5à>¾:†>Êc=1ìÙÉÿ¬þOùwï èyä^«- ×Ú¶,ýÌXÉßzèû•žuÃÐsMù#×’U]ë>H_÷˜ÀyøY’Çvº!Û‰õŒå_mÄi ÿRuâþs´]ÍXœm§_gû)YYÞ)úmæ]×y,—²¬mÚ z†1Éêša†a†axEÇß“G°×§ÿóo/ïYòÝú\êkº6õ®x„ËèíjÏægHð–ö¾»–÷óüÏØñ|†yž÷u¾Ä.½•üÿ†þó\þô³aÏæŽM&ýwéÛÃäké#Ïú$?Î]ùMço¤Œ\ýȾ,Û/íßÚ¥—ò·âQÛ@Êß~6s?)}‰Î,¹ l¾ìçœô ØgX #ìvçQç´“ög·Ú ÷Bž™òîìÙ™^Êßuô¨ã®ÿuh½à¾m?Ž}{]ŒÐ.~È}Ðv_÷ÿJ;ëxçoÌgJöëôY]’Þ³ë@¶é.ì«)™áoqC–ü¿“?}ß>@ÇûXŸÀÎߘò'-üäÓÉÿ(½W‘?Ïöú›²±¼‹ôÅÛçúÞéô‰Û ºÅºvþÆ”¿ÏëäOœÊ™ôRþœ×ùÃþvì[K?[A}¥?-ýwöíåµÔmÑÕ‘ý}¿g\=ö€c¿¶}ñ³M¾‹ ½ÃüÃgggÓêüàÖ èÇ„çÜÀô-B^ëók_g?Ìò ¯F?œ£³« ÿ•Ý×v0||ØŽÐØ=ǧH¿PÆîÛgçsì·ã/ÇhØ‘ñI ÇtýÜ~×{‘òçún^§}¶ïZæøºyDžë—óÏì·ó5èˆéÿçXÉ¥ÿWvðô¥§O)í"û±c0ÎËvYà“ØÅ ÿçZòï|~à¹_%/Ï,Îôp\€ËɹyΰçZò/ÐÉé;/x†ÖáÎsõü_é·9?ÿ«PÌܯ5Ý»\í[½ãy|ÞÙÃçõÄ8ÔÏÝøŸgäû¿ËʱL{ä? Ã0 Ã0 ç_àk3¾Àç†>´’ãøŸÛÜÆøzä«Éø_ƒüÇøü\Sþã |<®)ÿb|ÅÊç7¾Àa†a†axn.µ•të†a?lÄ÷^Cã•ßvk­¬Ø½#®àýÜ~eûî)ÿ´3<3^×Û¶¹Âkð¬dlùcÁ&·jK+›œåo"eòú<.ãÊž`›Áê^(3zÌòÏöèu ŸÁ¦lÛ+6»úßv´î›<™†×ï‡ ¾k7]ÿ/lÓc[`ýOÚöùÐn}½×çòš„«ï ‘GÊß뎱š×Äzt¸^vßä2)?;WmÆrõ5üoäcö³ŸþIzì?ú¾˜‘Oî÷zx÷Œ{¹&ØÇ!û…e¹z.þ©ü»ýüÓÔÅ"ѯÑí¤ô ¹Ý1üÖóäÁñGg×ÿí{+Ò·’×lûw<ý=}GݽìÚFƨ^ú)õ¶ìzIpäG¿•ü ¯ãKì¬ÖœÎ{Í{ÙÉßeÈï ûšG•‘12éÇÛ­¯Ïq¯§™iumf—“>¿.¿ÕþÝ}¬®Íëòœ®~žaì? Ã0 Ã0 °š[u´¿›+ð7øSvq¬ÃïìæÖ­öyÎ…ç ½?Þ‚‘}¶¡åœXùçwíŶ‘ÚvÌ?ßå°ß©ð÷DðÿùZÛ“ð-q/–?ß³ñ=¿ê<ËÌ~¶Œ›‡#ýßÙæ­ÿÙæ»>¶ÓÙFkÿŒÛ"qþøz°r­¿Qèo 9ÆÄr¦,øˆî­§nÍY[;í§oæ:)@¸-`×§-Ø7‹ü({α߯›SÒí§Ýú»@¯ÂµåßõŸKäï9èîüÖ ¿É¸“>:ŸnÁ3éç _[ÿ_*ëmt°cmìÃC>äq¤ÿSþ´L“øÇ<²?ç=÷çÝ<ò¼6Ç;ùãÇ«ôsü÷èþÜa†a†a†{àxËŒ™\ÅÞŠÝûêpxç¶?0׋¼#ÿ5žßàøzæÇÑ™ƒc¿]¦³²¡x^úêl‡ò¼ •ÐÇ(×fù±ÿ:~Ÿ¦ËÓÙ£^l iÅnç59¯³©žWÇÏ~·\;Û?vþnŽ—í»öç’6eÌr¥ßÑý¿óUbS~vù§þ£^¹÷U O7O(é|;+ùSÏéGôü4|?Øfí´ÿÐ÷¶*?ÇrŽ—÷W~Ï2ÏoÅNþ–ÙŸÊ¥ÿSþ9ÿ×~dŽa«ç˜çòîÖ‡ÜÉßmH‹6öìmÀXÿ[ÿÝJþ…ý~Îs.ãÚyœÑÿmƒ4Ù¶OÜíï|Bÿ­düžò÷ø/çøÙ˜þÁb5þÛÉ¿ÈyþÝøïUä? Ã0 Ã0 Ã0 Ã0 Ã0 Ã0 Ã0¼.ÄP—~þ*ÖÎ1@G\⟿äÜKÊðÞßrKXÿ˜µs2â±(ߥò纎Jëì·º8”ŽŒ'>â’X@â–¼ÎQ¬ûQýb£àÚqôŽòwx‰ ìb÷)“¿ëî¸_ÊK|•‘vÎ ÞÜ1çŽÕM¼6keŸe-2Ç›ïú5ùŸ9—ó?K^ŽEº¤~‰9òϱQï±®Y®×F¹8–ëN?å~;:=J<—ïÛßþ¡-ìtñºÄ’yNAÞÇég»þCþŽ \áûNýâXÊKê—s)'é^Kÿg\~âç2}›6í}Ô³¿·áï)¹Ün]O»ûrÞ^Ì÷³j‡~†"·î{pæ¹âù29w€6”Õ/Ð.Ÿz-ví:û+ýÇÿ£ó²M{ÞW—ýûJY¹¯Z÷­Êêµ¢`%·Œ íÒ¤l9…¼ç•íž¶™Õ¯Ï#OÏUz+èÁUÿ?;îýùsŽçÜdš~vñàN·›‡Dç7*.Yç«+v:Óye;ôø8Ë}¦~éÿÝ|…·²+ÑޅNþ9£àÝÀ}•{BÆž#t¯é˜×xîãÕ­sXÉ¿k¯ŒS¬Ví›ü/Õç»uJ=oê Gý¿ð<‹Õ»L'ÿ£²óL¬ò:äD]²6Üj¬f™ògL˜ëz/¯+ؽ[{Ž™ßºrðÝCôM®Y×q¦~áè[»{y‹¼£®òÍy cÈzA¿§Þô»ô‘Þ;Óîwï„«±€Ç9—¬zÉszW¿”ûH®œóìóV‡ax3ÿ ‚ú à¿%£×mkBTúÎÊþ’xœí‘) …ˆq ĉ8âDÈ^éê>×»gI@ÏÏþX¯jjg»iЃž——Á`0 ƒÁ`0 ƒÁà?üúõëåçÏŸ|â:÷ªçâs¥¬eø÷ÁÿQéùŠþ3|ÿþýåÓ§O|â:÷2|ùòåßÏ.¾}ûö;ï°7eôûGFÔû´ž•žOõ¿6Ñþ®ö_õQúv•¦“×íßù]Tò¬ä]½^¥Ë®gí¼{>pjç«zëìåkßu¹´o{šyªþ¯yeõŽûŸ?þ÷{è-Òýøñã÷½x†º¨/ D:½é3Dþž&òˆ¼¹e«^H×õyê i#/OGôzüϪÿÇ߯_¿þ~î :ûsMeÑò#M”Ï3YŸ#=÷2û» QžÛ›ÇßЙ¦‰ïŒ[\s=Eó8´}E>¤GÈ©éTîø  Ú²Ê×Tªg-Ÿñ}×þú̬üVfÖÿé¼Ìþêo¨SVwìzV}Ñ.âƒ/Ð>¨~Ê!?÷UýùÏËßÿï1¸Åþè<ú#õîä¥þ•ý}âÀ¶Ø=þF[ þ÷~†¬ôQÚ‹Bó¡N™.ð·.+푹^edÔç½üLo+[\Å-ö§k»ïä döW‡ïÍú(}Ýýê6îqÝý$¾#³?zÐ6–éBÓ©ÍiÈïöÇ?òLüåÍ7®!ã3ìO_Q}Пuõïêoßš™é[ú=ž¥tk¥È‹ûøMÀÿ‘Æï!'}/õƇdºÐr2ùÉ_ÇCú‡ÿﲨü:—©ôéº ƒÁ`0 :8÷—ÝÍòoÁ=¸„+8-ó4}ÅÛžÂcåÄ¥XÏdq{bUþêÙŸÖq˜Â©Î®è¸âmï!«Æ¶«g*ΪòU\z·ü[ù´GAåÖ=^§+ruñü{µëLVåÕüþ çU¥?)ÿV>­Ò“ó†Î)úçx…|œYé¬ÒÆ»giôãœ\ÅyiÜ^cæUúÓòoáÓ*=£ À³Âó!óÊþÄíT•³ÓY¥µ?rfògþÿÊšûWœ—sÖʽVÙnùÔõ*ŸVÙîXù#å=ÿÌFÈÜýªÏ«’—+[¡«àFô~ÅyH«\L—~·ü[ù´ÎOÒ‡£Œhô5žÝµ¿ŽžöT§ö¿êoà”w¯|Sf®ûÜÁÓŸ”+ŸÖé)³·Î;´ìÌFå³´;:x ûëØÉÇ÷â)/ˆOSÎ y²ëUú“òoáÓ2ÞÎeÊ)Ve3'w®”ç‘gGg™Ž=ïJþ®^ƒÁ`0 ƒÁ ľˆùœ‚u k˜U,ªKsÛþçØ‘5€nYæ®,÷çbXw{ ⬿wÖ&Ýúõ™û3®Q×”øN¬ðQev× ]¨¯Æ·ºö¯gcH¯úËžçîi½÷Š{î—ôÌA¦3žéôIó8†Çh³òwòÊdÌÒu×wËÈô¸ƒUI÷äWçq”ƒð8­îÕ×çI£>+—£ñ@åì”p™ôQÅŸáóÈGcþZ—ªüò\ƪÌêú޼ÄUƬìß·]ÌÒù/ø:íÿèÊÏ3dç;É«:gB9ÈRÈôï|GW~•—î×w«2«ë;òfz†áŸt|éø+—i5þ«Ünÿ€žá«ÎŸgºZÍY|<õ1NyŬ|E7þkúªÌêú޼÷°?õ®Öÿz/k›Ü×>ä<šÏÿ=Α}NŸÍå»Î…ùžü>åuåWy­d¬Ê¬®¯Òdz ƒÁ`0 *èÜ\?W8ÀG£’Ë×ÏâY»ûÌÕ:‚ýÒÏDg«öc¾g<‹ Ìö2+²¸€îÙÕýÿ'ëWµ±6½žqnØŸ{žrèuç"w¸<ÒTkôÎ.™ô\ r¤•¾nåOàûïÕ>Uì˜~c‡#T?£ñ+®ëžyöï{¼QùÂ,,^qF/XÅûv8º.Ö©gá×3}íȸâOPùì ~n%ãhUÞG4§çø(_û…sn|W}Tg&x^cëô“,Fíý…¶Çù°ÃÑ­¸ò«ôµ+㊠<ÁÊÿ#+}/ãUw8BÎRh_ÏÊïäÑ|»33!m–r\7U9Œmêß({ÅÑp™¾veÜåwÐé[û¬úx¯ëG¨ïµÌú¿Žß]ÿß±?g;õ,çnßÒ½Úow8º]®³Òוþ¯Ïßb÷ÿÈîã?úÇOVé¼=ù¸ZÙ_óÎÆÿû£#¿veü?áèv¹ÎN_WÆÿ³Žªõ¿rÞYL€ëÚo;Žù°ŸÎ1³g²9pV^•Gµ~>™[_áèv¸NO·S÷Ÿ3 ƒÁ`0¼ÀçèÚïQ¸’·¾[ãï¾×ØÀ veO\k^8Ö”¨v<ëZbzº¯²Û\ŽáOìp¥Ž¯b¾n$~ð}¬¾Çoèz•3ñј mKã è«ãvUÆÎþ]^»i´NºÞå¸WAö»#´÷xŽë”«é‘æjßÊtÄõì q ³:£¿ÏE=Ð z%Ö…ßqù)CcñÕYµEÅÑí¤q™´®ÊyRGý-¡+u (K\ûh¬PÓ'¥Ü*^Ø¡²¿^¯ì¯ñqÚ=m=y|KóòøvÅ«eü‰Û\ý˜rÈŠ4µŸÇ=Ž›ñ{Wê¸úÝ1Òûû;=Ý·åòxÚëpû;o@>ú›”ȘéT\ÔŽý+C±“=*ï™É«|˜¿GðJO¸CÊåW]ù–xŽ1.³™ïµ 9_EŸÐ±©â ½ýVýqÇþõÊã)vÒ(ç¨ã Ê‘}Ïì¿[Gåñùw¨œŸîǺÛôã{-âƒoô½ÜSdו_ËžïÎ׃Êþø2åÔ;iT&Ÿw*ßÎwú‡·™“:Ôº§ÇÇg×­¶“SþO¡ãsÌìÞjÝêºï%Z[~_˯déÖ®·¤ñ²+œÖñô¹Ìw]Ùÿ7 ƒÁ`0ø» ë]ÏÜkÙíIŒu¾+e§L]«ïÎÖ‚ïoA^ç°î;=GR¡³?œév쯱Ö;<÷ôy‚· o$Nî1ç´ˆ=:ߥPîVãžuŸ£<´Ç <&«ü¿ê3K«yC©¸/ù4–£rÇ)i=µþ*/|ÎŽ^]ËQ¹NÐ1qŽG¹¥w>ù{å•á ?ÓKvÏå:A¶þó}E:·ÈÎ_«n+{ÑþuÿÃ=ì¯ó¿êÜr ³›÷qÍ“¾Ì³]>>ÿËdÑ}+½øüÏå|L¼…õâàõ0öÿ»1üþ`0 î…lý·Še€·ô®ùŽg:…®×ºñ¶Šž`W×÷,3ËOã?«½‘]—¾\9ûPø×î~Í[°£kOÿûWùiìGc~Æ)ãÄ-<žw¦¼.ý3qÌ}•ãž'vªuðw$V±’¬n“Ñváò(²r²ºÂÿ¸®5Žï2©½ˆS;W¸‹ÊÿkŒ_ÏKÑÏ”ó­8B/ÝÁhùèEÏÕ —'‹9êw?K;Òx:òxðº<–ì|@¶Ûc³ÄϽ®‡§ùVúàyâÆ»c÷ÿ@Û–ŽSwÍ8B•òq®Ãîÿ]û£=é2ôlBÓe6V}eö÷¹ˆž­«òRý(·ØéÃËáÞ VþßeÊöZT¡ë„4Ýûïad¢­e2Þ’ý+nñYöÏæøBõ—ºŸTq„®Sü×ÿ»þß”é<›Ãïø­[&Ï=üfÿŽ[|†ÿ÷õ÷s°zîPç)GèåèÙÁª}{Z×…Î3«³™n7ÅjþpûWó¿Îwfåtöï¸E¿wÏùß[ǽ×;ƒ÷…±ÿ`l? ƒÁ`0 ƒÁ`0 ƒÁ`ð÷á{ÑÙûô‘Á~ÿ¬ö½³ÇÒßi`oLöy„>uo©Ãßi\q‰ìKó|}ÿïÒû7žÉSvu9ÍG÷íñ©ì¯¿c¾#öÙé>·,Ïjoð­òw{õÕ†ú‡Öݲ‡Lûù=«mWèêòÈ2u_¤ö¬ÿ8د–åéŸjož?»Ú²kÞËDúøßß±¡öm¼†ýýwÔ>ôÃì#® }©ÛË×õ·E:¬ìOÛ¡O;<ÿ¬ÿsüy—›î¡Ô}›Ú›¾k‰}~úŒî±Õ|µM’†ï'8CTþ®¡¬o+¨[Wžú‚ÌöŒ½ø†U™ä©ïïQ™õýr'ö÷½î\ç­'ç’tœTY¸ÏwôŠÌz.Dó¥=¨ÜW|ÓÉ~q=_¡¾yª¾M»ÜñçÙÙÍÇ÷–¯äÇkþt§ïbS=2æû|¥Ò±Ïy´NÚ_}O¯îe×ù”摽ÛöàýðtLàœS6Ÿq`CÿíÌjfý´3–#Ëéܰ³?zÕ1 ÿéíHí¯þ]÷š“ç‰ýõ\"íWËÌÞ]åó¬ÊþüO;¾2'@¾ìã@~tGÎü:º«üªç{åÝuÊþê7m1‹è™Q]ßPWVç2ûS®Žåz]Ï¥zŸÒsý‘ÉÛ×3ÐÅ]vç‘îªÜÝxwÒžôÝ:Ú—>ÚyŠÁ`ð¡ñˆ$j¢ëw½ÀmkBTúÎÊþ–wxœí[ xM×ö^[^M‰‰Œ$j,ÕAÍs A+„HQ)­©Z´ˆÖQ15èCbj ¡OhIªÔÌãIQI¤T"ãzçßÉ>ïÜ›{“‘ÄMÖú¾ÿ»â {ïõ¯½öÚk¯C="ÆSrDTT(é±1˜óÏ`þ¥„Sä)Ы¹ ÄùÉÊÊ¢óçÏÓ‰'èð¡Ctäðaúí·ßèÊ•+&ÛBi±™BÚ¿ÙðéâE  #¿ÁC¨Åo’›‹+ÙÛÖ¤š5lœí©Á+õ©kç.4yÒ$ÚóózðàQ7ÿƤ°ïüã?(ôëPZñÍ?)tÉ×´kç΂¼÷©çÿ÷„7f,¹»ºQÕ*Tê9ÚÙSm'gr­U[µÈÎÆ–¬,,ÉZ¹¯m«Ö¶rÝ¿?—NJ ÿÑQQôÂsåŘË?ó,õëëeÖüËÿ{øð! ž16p‹9_§¶ 9;8’­u ª^ÕJ\«fYUð îq?îà,+W¡ömÛÑÁr鼸ø—òýÖ­2¾˜§_Í›'֬´ Ù»gÐÆ[£Zu6ÔÏ,ù×þ}éÒ%êÕ£'YT¬¤òîâ\Kpl£Œ±Ù«M©¿W?š0~<Íš9“¦Ò¨FRnT·Ž›°¬ Ð ž…~l«[Ó sÙYqòþ=ÿìsÂfÿ^®­/óüë'11‘^oöšàPÎ÷VÕÉÉÞF Ÿ~ŠŽ¦›7n1¹pá­Y½šº+º†p¨i'Þ¿`Q©2Mž8ÉàsEŹVö÷&Å1¦jUiÃwß1ÿš±¤]¾,¸ÇÌ_¬»x?ö°±ÔÔT{Ššÿ¼úWVù‡¤¤¤‹S-5ÖƒÏ/ì¼×ì1çlªY îÑÆ‡#GˆcRTü›"¥ÿ‰Ÿ|*ü3¸Ç¼Þy·@ú3U’““Õ<| bøØ8}å'wîÜ¡+^Qb•4º¡‡jÇõgZmÞ¸IÙó}o7l Ø³gs=§ß¸¸8±O˜6e*}JÖmèûÌü$á\‚z6x3#“²ÜÏ÷™ðUadUåÿúÞ¡^+ ÿAJÜ/yĺðþvsñ??›äylrìñ躵kMnÓ\ù—ýG^ÓJ³ûvýú|ùÓ üîöÈíºp!Í[FÿÙœî^JÍó™÷ù ]cØj̤†ÿ•+VªûÊìxÖG§]}þ„dç‹P« ÷…è—©5|sçy2ëªÕDÿ1Žwzõ6•z ßø=u8ˆ¾|k%8õ «a¡trû‚”äÁ9ø…ßé¦ì±´þ¨0ü¯ _-ü‰©ü#× AÎû_ÉaTT”Émš;ÿwïÞ¥–-Z¨ã‡ßĘ "¨8—˜Dk¼ƒ©ÝòsèEÿrJ¿M×ÎëÜûÉÇÔs`Ke¿µ,t©ÎõÂð¿44TÇÿ0" oþC²ù÷èÜEÿ˜ Û¶m+üË1,[ºTÝûB¨ÛEAåÜG!´¶Òê[4µt«¥ÄNýéæÅlÿ~ôÈñ~p‹˜ç8éééOŒÄmrþƒß™3fäÉ¿<ãÆ¹’­æÿQZ–øÇŽs5™û‚Æ|4ºÀüÓÔ0ƒvTîGÃꣷݼh£u_JóFq§Póo“½MMцEÅÊ´xÑ"UW…á_J×N•÷ÛªqedddžüËø>IÚ üƈáÃËÿ¨]»„N\œ³Ï3p&ˆºÞÇ‘ócƒè@…î4­vµªÓ‹"ìûÑá†TßÍ^kwêÐQ¬=OŠÿÇO¨çAÙgõr}dŒÔÈýž…_BŽÊ”vK ÿì—Q†±@°‘"7^P¹±6‚’ÜÐB'?êìÚƒ¢múÒî–}ÈÉÝ•œ(öl¬Žž ñ.âããóÔ§ïBÿÒÉœ¢öcü_¾|YäÁÐ^öÐRœ7IÉ«íC–þ!þJÿ¥ H=amرÅàýÆ$ýÎmZäïO'\áGPŸ€¶´’z!•æÌž-ÖK™;3wþµÍUë]´ßsAoˆÝßlþºà ¹赋{5nÐP<ƒ¹ˆµÛ{<;;òps¥CJ0Ϧ?ù8xѦý(3%Þ §Zþå·C8ßE®æØ±c¢fïð¡ÃbÎwh×N­ÑûIeþ¢Fã~Îw§¦ò/ïùñ‡…Ëzø ă°‰6-[Ñ@eÁž²¿——¨•À;dÌ\Zø×þße¿†ÜÆ)瘌 `à ÿ½“¨!qpRm×?¸(scjp¥íý™N6ó&?û!4±jW:çÿ1=2ÒòvÀ…¬Å‚®eÍú„6³yª%üUoÏ^tëÖ­\ú7…y¾Yq²wÔ±+ô6€ga°Iô¿83}Uî…íø j¶üÓ[ä¶mb^¡æzÃ81~É ê´ýÈoqžŠÚN|O&åJÂYú¡eM´ð –)}óV£üCçõ”9Ö±]{q6 ÷²vXæÀÚÅNæ,Œ¹ÍJ/WvôÒó/ˆ:!CcÆ™ó`__Ñ–ø¾ÕBSû™3¾æM›Ñ·ëÖÓþ}ûÅ5ôþG[w`îüë_OHHµÐÈ àÜ礈 QÉ:2_±öâ»ä ÉmåñžïSp…´£“ÝKM3È¿ä866VÄžïôî#jd]ìµY£Fޤ£GŽí¿v “?¨¬íɳ{jÓª•ˆÝòsBÂï¢ß«á[×)Ÿ}.êQ÷îÙ«Æ?™™C§•˜¿ÉÉɦrÿTðo* b"Ôã†ÄØ{dÝ¡¤9hÓméLäÒ¾]Ë?æø—‚øgE§N"Ô®üõ×_ù¶g¬ï¦ôÓ”çL}Ÿ¹óoª~L}öÝ¢¸ƒ3hÇò®”–£>o,ÿSØö ûŽ"‚Ùòÿ$ì¿I§vÐ¥”üù/éþ2ÿEcúÂü—þ ÙóÏü3ÿÌ?ó_6ùïÖÕƒ¬sr°ÈÓà;\s óÿøü£ÇÝÕUœ%à^îÿKºÌñùûëׯÓàç‘%Ý'æ¿ø`HJºOÌ?ƒùg0ÿ æŸa&ü3 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`0 ƒÁ`”vüŽÖ¬®iêUúymkBTúÎÊþ¢6xœíš‰më0]HI!)$¤’FRˆ?6øc>>~Úsm£®+ŒvÁu…Õ‘øνYšuÌ8³´ú³uNÒ?¤WP>Ê1Js¤ŠWiVÿçü‘ý_uKðEÿ‰Ï¸ˆ/rœÌù£Âˆ_âšgK•W]×±ž™ÍEYòclÊó,[¦ŸTœYH»T¾Ïàÿ¶›ùÿíííðŽˆ}x¦÷ÇL#}A› ¼ÒâœöGüžVË7¼—‘^÷}>“iÒžº²-çøèþŸiæÿì;}žLJø°ìXí&ÇTÊP÷3ýTÞ#¯ôߨgÿ®ðJÖùl eäý'ï=ŠÖø?…͘oéçùn€í±aöëì›ô½|7ù>šý?ÇôU–%Ë;«ï¢­ü/ñmöµžN/èãI޵Ù÷fóQÖƒüz{Èñ<ÓdÌé6éd™nù;è¯ÚÊÿ¥²Q¾–mû{{÷5í$ýÀûiѦxæÿg<Æ$ò"Í^¾%=êü¯”RJ)¥žS—ÚçÍtïe/ùÖ”ë —°a};kú÷Ô_µöyµ?¬9ÔšÉlÍzÒÿ}m#¿óGßüKk!¬›ôók(Ë9êGüã1»¿”Þèz–×,­Q¿&îlÍiV濊ý²Üû#_Ö<òœöÂ3¹Îžm$÷^9g —{9&°w³&¼Û:Ë™ë‰uõfÖšúºR…÷:Ö½L+mWÇôW^£§Äz%÷I—½î¥2Ÿ£î—lo£þÏZ¶f?¾k4öW¼ÜÇ-è#¬ó­ ?V/ì—c^ÿ·!÷!{u̵ʴU¦ÙóÙ·ÿAœÑý‘ÿGe>G}þ?Åÿöþv✽Žø3ÿÉX~j½úœ—{øzT§ôA·O^ÏòʰÑ>÷³?syÊ|®¶ðßG)ŸP¦U{× °.ï».Tæç}6žÚ³‘-Æ×F`‡£Ãp]Åkß…~Ãóbà ¶ О$Áwݓٱ„ÁñÍ|süñCo•›ÝA+Õq3¶¾lOàx@á(é0ða¹¯+?÷  ÜT,¤_¯7¸s\ÛÞϘ^Bl1)üCó•Ò+ÔkÛ(îFyN"8õ–dPCÌ_9ÈÒ>O0&l«4¸Im+þîënwîÛGrŰø™à»ø)/tih“f˜õÕ Ñ¸X†>ÊʨËEËÅòã)–Ô<,é6ös4ÅáÀÖ5›zàbð?¤¢Jðàö\<OM%O#(7ä6à:§= ªêýÓ‹YA£÷ƒH ¶«L s6›ÎMƒXêÈùBcX&ǘJ½te».Êöü¨Ï 3.je(”Ï?Ô?õèÉLÚjï³=€ÝÚ%wƒZˆizFTxô„$¯kPö8›E·mòø jAO™ñÔ×úÞ€«ž>~þ’†åÜàØ†‘ºéB9úµâ † Ö¤8U­«KCÃv´jbëL èåçC¼ï€y¯¡ ç;¤mj P.Ô —øãïDkñÂêwþ¡UÿE€3ôܨÁ”‘•’8xëUÀ…JÊü¹s£‰ž\„³èÉŸŽ+;}s­FãQ(KI­î÷¦XÝ›„ƨ ¹1 Ëúþ+Kú¨èdXŒ];JÄ£Žïcˆx$§DÑ×·Þž¢X`i× ì¨ëÑ@lÌûrn°m$¨Æ^×9΄ïzBGÏž Q=Ænfäk„Dêö¬e; <¨ýøaÓü>,µâ¢ž›jÆïk‡0BŸ[p(õâ$¿º‡Ç ‘ÛöÌpý4 nËËq`”XÆ“ù úvϵöèÙ.xõHnŒûorŸJ¾€Ï5¬ñÁàÿHàu©‰ñê뇗 fà§ í××a앆‰[Z:><ÇM@J£9óý¬â$Óq]¡}=H… kÐþ3ÆÊºã¯ù鲺t¿Q“=‚, 7ÆÇµß»ýìêçs Ä>ã¢3ø¶ïÞÜ6[¦Ñg•¨— RLت¨ù­?·( &wÝ.7C#~B{‚]¯Ó ×â—UÔW² 7™Ò1jk~‚e”cG»¿rËÇùÐãDØ.=ôËK´ÜîëÅ@ÝWÝDZMû0å€ãûíèä¼0Î\Úòxó®vÏqßNZ¢ >#Æ ƒ„ŒàBE— ™¥)•‚º&yØA}tå?Bûê Yìm(ÂWIpáɱò€ñ ¸|½2—+èýà\2·ö íÞ)lÜ8·ÖtlÁ@Z.B½€£ï•eñ…‹ƒRSßôƃm>d˜Iéþlþôò'N a†dÄ¢G3¹%†¼#«)?è¼Ï$sß _5=²íYÇBR#-k"qGP-Ðeþ"çf­ÁÂá%Ö©-Ï“37êÐäÌÈ8ÔM9™ÏŠŠ,¬èä_*n;H‚ÁúÆEBƱ†Öcl¿~øÎî±ç Ë[ƒŽ/saŸg¸IE2å,zÒ1Út:’kLÆÓçÎÁ¡ÍíÈ™壋G)æÔ{7ÊoðËÅnd¨ø¤è·ðá•{@rõP˜>ÆkÂwŒk×½¾¡ #¸kXfy‘ÖEÇ÷šÈA©ÍBÂ9ÂuM°ÛÞ4P=¹_Ól’ÆgW®Ø‡ÝN•Õ#–_n™‡Gï¤pp ,Z…ÿUu›6È“÷ÃV¦›Ó°¸å0EK‘7*|·ý]¯{ü75F\éÔ¶»úzQØ z!á‚Ç uH€>îÿó¦upš²ÚöõTÙ£»o3P)ˆø´[à^Õ6ãÖÚóã` -šd&á*=¶%ÄÀÊfY’<¿^’ƒØ·`_6¨ßÈ|h¸Ìë3Ø¡>€„2 Pºúqÿ×7ÏŽ³ ýÕü,Ns¾j»F™=BµŠü` ¨í³•C§òöiŽU’)Ré@LÅßÒ®„‹ÿ‰·Ç§mb<2FH“Rq°²ùF½åãø÷Xºi䎲õOm¬GAýÝ·ôÒ}:¶*¾Ëu ÄfØ:@Ê«RH™.òÙ6Âñ¼±Ã6Žjå§cæGOpO- ú­6HÒýúÜÊKÉJæÛUÀÎì:ºJǃ¾ŠýÉvÆ,¡•¸¯3ÿ‹DìZ‹¹EñÊÆ®ÒqqðìØ7p?¸ƒÈŒÞK¬÷Å%ȧ$;â¼?ýQ¬r6³pP7`¼a™†¸é^=„„ýÉRç¶_†õ™³)m£„Ç>ÀD3#£ ¼_' çIþÂÉ­uÍ‹CÁÊ-Rne㯄³²Ïóss•ÀîLÏÌ<È­/µàR)|Lt_1»éòÁ¨L¿kÇ=‹rr 4ùìê§ü/gýšEÀrþÀ~P†¦nBß[ ®\g[{¡«‡’g£ãYÛvRŸW'†‡ {Fe°m1ïÞŒ{ Ýw¾LÿÕ;7¨&$‘çþxúcÚøÃÐ0Ÿ ŽžnÝö‰óí&úÚuÅ@5sCèCÕ±mœñ8Hƒãefñï¹Æt ’Îx{q(a¿²ÛÑ‚a¡?€ŽÐþQ“%ò§ÌlÁ¬ö4ô‚¤Ï‚xmWI׆€Gí¯¦CèÒôì1ê’Ûk×QÖýŒ3iJhÜ,Çÿ€úãú‰KºšRˆ÷ÅÄð¢ÄÂÈöÈO`úÈç…ʲ»†½þ4á)ú%ˆùÔb6îB8ý\ ³pµõšÉì«e<êºíS鹂ØìÚ+ÓjsðÄpŒ„¸ß%<&t{3?Œ£¬|N)p7b™Ôîãé?Ôa¤iäDµWl’¡½ðˆX—ŸÀZÚ>;uø)¤ko)#WáÈÍSšn®cR½xô”{[ÀsXv1¤¬95‰_¬¬0KéõÁжՙ7Ú>žTp¡5‡‹¸Ù´¤l3¥Sü"ØêLXê…ç«[á5mö¡ø º¿Q="u}ö‘ÆpϘ*xböÕ‰ºîã—ã#iM+³ù@»Z! þ·Ï®~jàÒY”ݬ‘¡´Ò$?5Š• mtêuˆ] ‡%Ž@Ž÷Ý…:4h8Ûƒ¸˜¡»tuì3À;ú ΑO¤1A/r‹¿¾™ ÆÏR*5ÀÇûÿËìiÜ&j#Y2:º$Z(a­dæ@ß>'z ž„×L¬¯³¬Û뇶©½6ZÑÀ8|`Æ6Ý"åŒX1ß_€z' îF-©÷»Ñû?°úX^ò A:?1¢;ØÌh/KžVB'õ üvOnÏFSò‚¼É õƤê°ïÌÞQ{=kh7™ÀMå¯ÀwXQùpü\vïÍ“ÎO/ÿ¶.ÅöÚñ¹ ôN3·ÍHKRðÉlŠK–"›qò”‰^Wܳh¼1wtùã  h@§¬Ñ3ðe6þN|–’¶Á©‹I;yîó?8t[ƒ[é!‘ ú¥µ$,ήL­·e–"z¦å%IÞ†AêkÜÌRäl!3uú8àÚyßë?_žWÅé½)ƒAbCÒõéõOù!rz¿„a¢¤5S±ÍnÖ—£³ˆ#Â<ý43yÜ6"ª ÒRýêÑô߃C‚Qå¿&>¸[¼# BHÍǽß{v¡eà×kOÃ×TÉlq(UHð͵h »Ý”8º,@t°µöÈÃÕ‚LÛ{p´•ü‰/Ø*ËL"d_y ïŸk,4î GÌ–ýÑbD>,ÁÏ.ok"ýD;†|7–[.µDÖCíAœŸä#‰iÇæélÿü¯‰ÏŸ¡IÖ¬ÐòâóÞD¿q½]+ÞeE •ò–_«-- ™ƒ¦ Ú°c©›³èç€^ø¿¥Lô˜q±1~ëCßC“ÿ”øžC“9¡ŽgNäóýÿû“õHÈ8Bkhêç«JÁŽ#Z¤-`úVo§™MËa 9r$îÕºZ-¼hókhò ?C“$· û^–ñtÄ÷¿9d(‘8PÝ…]Ú¶š£×w[¢wléÏ;µŒd•Ôn—׆ôoÎK«èdù H¦Þ„(Dú¯…¯Ÿ¡InüIÌ Mïãü_(ù¼ðœ’îð5)6H/öõÌYÍ1‡¸ ±QRæŒk,nËÖûXH½­ʉð‘ƒÊË?>ÿšdf“ç&6³üü½^EJ–m‹ªétÞÈ{¥C—µ›½ÌC¬c`½îÙ0Ê…v5ÃÂx<äƒó\9Y·Ýÿcáû×Ðä}1Ú06"×´!ÖóŸë9êdl:'– û1H"Áz'7ùQ‡q›„¹Ž¾¹ÉŒí#KâR.ò/C“»VÖÜgÇQ×Ȭ¨åéãó\ âì`¸·?dÜÛ1y³”åuMÛ6Ƶ8ZX]8Ãø^p…ªwQëE¾ç &­1frRšÁKiûñçÐ$G¤ÎÓðÔÝœÛÇЕŒ¯ðh3'À®Âø”·“Ç{¼±š;;Ö~F öKî37Ðkš–Ìu<pöµdÊŽåèˆ+C¨š¤™ Rá‘÷Mz¹Æç¿7)nÒ€©æöÔ lEGyÍl½‡:Ì‘ÿIÞí’o±BìÞÿ—S%|ë‚ÎЕïsTuÆleÁõ’bšA}A¸ëæížÍ´þ1ãý0ÀA{ÉKù“ʘÓº¼tjÑòÇÐdLI=rž ¢PRgóûÇó_Lb¸R³£é Åžël?«â”ž)!°Ö[«‰FÂæoÖç wi&k^”CV(t@püW2Ó÷²ó{hÒxH—GRn²͉ŒeCbúxÔ‰°ªé6GÁ³©÷‘¬Q…Öd27\ÌØ«dœS‘É=\»F§f*¼0é‘Û£ÜOPúÇ5(r„Zß™xQ‘Z>¥~G AeN-õãùÿjYôÜ7—Ò¾n;ún?Ó¹"P·¯xÒ}‡·•/àNäöÞW:ÝŠ&´—×¾†Ù:x" ꭥу;†ÄRç펔¹ ®cä›…Ñ™õ±ñÜýüýElmG§a= hò¨BG_æu…³×YnZì«­FYs ôUéµ"zM&Ë:ËÝGn¸Ïuí.õDX‰ƒÉ5XnšÁ¡ö›;Þ}¶Ô«%XO?½~2&ùÝØî¸Frjj¢¢…8ˆ› yAÊÆä*±W ¡³‰€©ÒIÒ˜÷“9/¹§u‚b)õZ³l:ë sá¼¹ 8²5ÀÀJõš>~ÿi´œÐó˜I¿þ3YÏÔ•;ç:#hEL¬×[ROd‹Ê^GéšAË©fß~Y!ýËÐäEåêñn·ôü0¯~Åà/«AÝò –Kåm÷‚±>^ÿÝWY¢q†"µ¥â<цFвÎë*c¹½:xÛw„|¤Ížw­—%ýehRg°åØúæÜæd¿9ç´üÌ•ªËÃvž3Àv Dg™hç>>?ÿò3é‰hŸYDkgCã(ʹƒªÔ•ô×SÉ·†¬Ôœ|è 2QÁü94©(ñ½?OG•Q34… fëcc³¶PopT€Yaƒ–W(£>Çÿ@­tãX4ˆ`ðLG¦Ùžp•‹É„ãaïãšÅ°l\¤[9‚cû26óâU M6f,ºŠò¼Ë'›¤…žCÐÖñ4øi¥?W~p¯sÏ ?žÿk³ÞA÷×KÃrŵÄÅÎk@–Ið|>^xðs¸?ý\Õð`,DèäõÌ’©Œ°Žû5¯éWÛüÉ^£èøçw €DÓµMˆáøXf_8<%|8_왉pPó1†…ãî„WþÀlm߃˜“Šf?4žý¼»:½òÌ“_£Ô”v ûûMà;kž:pÍÖ²â_ÖùásjØŽqw]$F‡£}ÿ¢»y« ××û,b'Õè°N‡Îþ=Ôo¹öÖôÔ0, õ¨Çÿº»â~–ÆM‹ƒÄû Y•R´‰¥4â6+!”}@~u‡j°ctCÔúàõP.ÅY(ýxÿ׎ ½×zµ?70ÆWXFÜ£¾oŒ½·¯‹3z‹Š€0°®Ác8¨R£êG±¢g›0àö ¦T—Uëøò„½»‹w­"/4³ÞÖ÷¿¾îC¾Q`[{O³“ºcÈn¯]•¶+•{Û{­ç¼ÞÕÎ N!3•<®ÞÇVí‚ìyxé,!C æ™b². êlfÖ×åÁø'„ÒÁ\ ןÎÏíãëgu,μ·¸šw-/ôß3Û¥ùºñíN°íâX(›c ƒŽÓâoõMDð‘sÊ¢a·#ü#0{c ÁÈÀð%µuDWCB¥Z€AéÍZ6»,Øçûxý (Z%‡±µØçw€ÑÀáŠHbhTb2ùþ<$÷Æ*cÀ¼ænk÷³”_÷וð«Ð÷¿#{D+B<™!âÇüS/¼gÿÃ`ø9”­.^]ŸÃŸ™ÆCíÌ+>™ì3ïƒ+•ý5Æë]¤q‡„Äp¦j' r¯9µ¼FDȬ)~: ã躟—9GmÜì“x2’¥ù-?s–raG"yvU³pa;R«çãø÷ăœ ÌAŸ\&ú¹“ ÿ?#Äìn Ûí0Úee½´“d~o’qå¶­¯!!DzP^H)>¾oµëÈ‘.®Ä¼‘Ô¶=Hy»7´S´-M½ á?Þÿô8y£c¶Î™ß§q„|Ü#Þ5"ù2Б ‡lµm#—ýU‰ÑÊ»ìýeüΤÎV†ÎÈbMƒ¤Í˜÷jAÌc7¾Z ä]> 4½gbö Äýñõs 2WRsKgí6Þæç 's8qzñTT[”R›[wÄÍ)I‹—9ø5x¥ŽÜWjýÚ #”!nN+zP’ÄÚ”â ÁKgâ²ÁÞTEŒ,ÂÁùÇë?³¥{é^R¨DÝ¥=´R¥u^zîc¯’§³Ì¥&D¼‰'i74øSËJ½ß”í&H¥æU©Gà»[û‚ácrÃͦŠ<ú’‹¡׿~þ‰4}Ú…žíh¢°Î;¯üòlpAZð´%’XÔZ;t®Q?„±÷÷žóy™ïk1+Ƴu6Â[«©ÌÖè† áDõ™c4¿ÆœÚóÐÝ*d„•B#!}Þÿe>Çsamh¡¹ÿêG3c^çæ—8u9󼵕⸈߂ÏUéy‡‡B;f "Yi=ÖD§ =Êâ‚Á4‘íŠ&¡Ž’Þ×|¾Cý“Ò3»Ä÷šg]Ø~üþ›WgjhSIXU“‘"1A5Fr4×{üáÜëAä—éljŸw¸TðÎá–Ýt6<ï/NÁ  \û¤õó«R¥tÇû˜a| Æi¨ÌÍ>‰T.šWo>>ÿxŒ•ϯ¼Y¼æÈ{ç··m,J²{gg}Év~)ê]Ñæs!?wøè÷X›‰æè˜G—F°¥l!7ކUœÖ|Cnáfï³…:.@mq%®Á臔±ÜÿÓRu?.–:¯èaBë¼ÖºÌÌE#Gƒg'yX«Dåÿu‡SWºä™ÇŠD)Œ˜21×ѵ‰VµˆagW¬àP޳²q½ç«ÏÈ’Ï Ís”?¶•@åg")ªíªç©s\ÖTòâô{Þê«f3g÷‰oÑþÏ^w:^ë¼"•Ý{¹ªd#³!φtà}©,nÆyWFKv„X”4–ƒ|<ûB+ è®Â8ˆi=-;´³X 5l=/xlêóŽw•–å÷n³]ì à+SÛÓ¼,{Õž¯/ДâV¡û»+<< ØÌ¤®Ào ŸâÞçèÔ‡eNpù^Oÿþ¼ÙùŽOv qR¶ £wHF3ûÝß=oý;ü`~k’RÏwCßÏí²”u¦ãk¡jE˜|û‰qÏ©ŽÔ‚KV,Ï àÏ*?ÞÿþxkáÜ}QxÁU¹éœ/MÛüÞÄÂá= ¤Õ°pý¾Êæ=çŠÎ^xúBË÷ÞÚKx«§Ó@ð[òÎI™¾ÔYB]Tª¦âž™çÿúÑKqÉ.á½€PÖÛwÿ¼ÃÓAG\ôšWÂÏ‹Øâ9ùãÏ2S³—åA\è“Y\œßy=ǨðGj÷¾ÌéÇõÕ¢ÂMî@âŒtÔ‚¶„vD¾üƒzÎ+²ÙÌBĺ\·Ÿ¬ü¼ÃÕ¬…÷Ùë6ËÛk™6Lþ¸Ê¦ÚRß_rýnl|UAϯ< ¢¹Ë|¦²!‚¸;ºÁ8™_1ÜgésÞùÆCŸ‡ÿ¿ä >êVB‰~æ,¶¹® Ë˜_ÿ&f™äÕjpñ/WÙÔÊwaùO ¼š°H 3ÉÛûþ¾I`˜ÈòuØù»õ¸1êͤÉû·ÈÏ÷ÿå+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò•¯|å+_ùÊW¾ò€ÿÝš™w)¦÷2iTXtXML:com.adobe.xmp Adobe Fireworks CS3 2009-05-29T17:56:00Z 2009-10-08T22:16:02Z image/png ÇÍæ½WIDATxœíyxTÕùÇ?wæÞÙg2ÌLH0Aö¢¢¢…B‹ AQ[Am\ú« ‚àŠ,*›@«D­Ò*¶€hmQÁ¥VA¬²4Æ„ =3Éìsïýý‘dš@™„ óyžyž$÷œó¾÷Üï=ç¼g™ªªªÄ‰sšÑœiâ´MÄڿį³Aδ "ÞbÅiâŠÓ"Ä…§Eˆ +N‹ ž:IóhÌ`34´=bVS¢’`0HAAÅÅÅ„‚AAÀj³‘˜˜Hbbb2Ùñv[«ë«¿Öz/'£ÅZ¬£?þȇ~ÈÖ-ŸpàÀŠ‹‹ñù|(Š€NÒa±YIMMåÒ>—rÍ5×2pÐ@´Z-pæ+»¡¨9~ ‚@~~>7lD'I„B!ºvëʬ¬3~¿§¡öÌ{cnîT-ÖwÙÙ,[ºŒw7¾KQQ!’(¢7E¦îN–eB¡@­VKFFwÞu£î(Šuüù©[¬–Ö¿?ü‡Ý€ÕjÅív3|ÄÖ®{­Ñå¶–y¬f·Xªª"Š¢ðüüù,_¶·ÛÍfÃår¡ª*áp¿ßO$AQA@£Ñ Iz½“É@vv6>òûÛߘ5{ý ˆÚ¨±óSPcç­õëÉÍÍE¯ÓãøÉ:”ŒŒŒf‰K’$œN'‹Q±Z­§Ëí³Š& «¦rAàèÑ£Œ{?[6o¦ÃÓéD–eÊËËÑ);Ò½{w:vL¥ÃA8¦¨°ˆ¼Ü\²³³)..F§Óa6›1™L|»?·¸…ÉÓ¦1aâA8#]Å_Vþ™>ø›ÍFIi .—‹ŒŒŒŸÜÖHÌÂ:¾{ÊÉÉaÔoF’““Cû¤$TUÅ]îÆ`4póðጸe}ûöÅ–PoyGŽaó¦M¼¾îuvîØÁ`Àjµ‰D˜9}:ÇŽ1gÞÜo­ê+ßf³át:±Z­èõúõ¡-Ñäy,A(8vŒQ¿Innn´•*-)aðUƒy{Ã;,]¾Œ«¯¹¦AQ¤¦¦2úŽ;x{Ã;,[±‚¤¤$ÊÊÊE—ËÅÒ—0oÎܦºÙ,ü>TVTPáñ‡Ïˆ­‘&u…‚ Ë2ãÆÞOÎw98]NB¡^¯—'§OgâC6É™›‡ßÌ Ÿ⡉yÿ½÷qº\$¶OdÁüùôLOgÄ-#šTnS¹´OTÀd2QQQÁyç÷“ÚoÕ¨µP¥QUUÕ… žWÛÙÔôij®ÝÔäÄöêšÕ«ÕÓ¢(ê˜{ïSN5½GšÚ¹ãùj¯´žê‘#Gbö5–{ŠÅ¿¦Úؼi“š’ÜAíÙ½‡Ú¡}’zïïî[1w…‚ ——Ç’Å/âp8(/+cê´iŒ¼ýöÓ"vAxqéú÷ïÇíÁh4R\Tijx&ærêû´ Ùki»g#Mê W,[NYy.— ·ÛÍUW_Ýäî¯AÇD‘…‹‘u͵„B!ìíÚñÖúõŒ?žžé=£éNõÀž EÁ`4Í£Ö D ØúÉVDIª·œP(ÈE]Dz¯^õ^¯)óàÁƒìܱƒœïrðz½X¬Îïx>}.ëCï‹/Æl6·¹ÉÐúˆIX‚ PRRÂÆ °ÙlȲŒ$I<5cz‹8×¹sgÆŒËïçÍÃåráõzY³f5³fÏŽ>ÈÅ‹‘û}.’NB‘¦ÏœÀkk_cÓÇ“—›KEEªª¢×ëIIIáÊý¹í׿¦K—.Q[{÷îåŽÑ£±ÙlõúR\\ÌÜyóNVûöíã¹gžå“-[¨¬¨@Ðh¢Ó$ª¢`0’•EæW`0Z¢ºÎ*bn±6}¼‰ü§Ó‰Çãáúaøà [Â7îúíݼòòËø|>, ÿû#¦M{½¡*ôký[ìØ¾£É„N§£K×.¼þÚ:¾ùæ z:½­V‹x½^Ž;ƶmÛXù§—x`âD¬niEQÄn·×™°¬Ý*Šr‚ j®¯]³–'¦NÅëõ’€Ãé$ QN‡N§ãý÷Þãã>Â`0D—¶Ú*1±¶mÝ]ÏS…á#†Ÿv§jãt:ùÅàÁTVV¢ÓéÈËËcßþ}ÑëV«•víÚáp8°ÙlüaÞï9tð Ru—&Ë2>¯·ÇC(Âd2‘˜˜ˆª(Ìœ>'L@£Ñ  …BÑOcþ+/¿Â„ñãp:«¢ãòòrœ.?8¬ë®#óŠ+Ðét(Õ-|[ÄÐbÕ,ÛÅ—_~]rª lÙ¼™iS¦`·Û‘$‰òòr:wîÌCøS'O¦¨¨³ÙŒËåâù ¸fȵ\rÉ%uòØl6"‘È vAÀãñ0åñɈ¢ˆ$I¸Ýnú\v¯¼º —ËM«V¯qvéÒ…¥Ë—¡Óéøûo`±Xš_1g11u…¯×‹F£©j±Ú'¶”_upº\˜-fEA£ÕPRRrBEQÐjµ<6y.—3ºp]û0$kk×­Ãf³ …EY–Y´ð n¤(ËrƒQçÊ—^âСC˜Íf~?)©©¬zõÕèÂ{m›µyûÈs"*ŒIXJíÊRTŒÆ»ˆ–@¯×#IRÔvCcFC0l°œšœÖ3I?­V+ŸnÛF~~~£æ›*++Y·ö5l6ªªâóû™:mÎjAŸŒ@ pNÌiÅ$,Q£wVCeEE‹8u<>Ÿ`õÎSUUÑéêŸk‚Æï—ºå¶[éÔ¹3áp­VKYY;?ßѨ¼Û?ÛN^^z½ž` @FF7ýò¦Få=WˆIXíÚµ‹Î_‰¢HAAÁOáRYY‰F£AU’’“›Užªª˜Ífúôéƒßïþ}ß¾}'Éõ?v|þyô¾}~?ý 8acâ¹NL²X,œwÞy„Ãa$I"??Ÿ~ø!&ƒÙÿÍfïž=x*½åÇdzoÏ^þê.DèÞ½{L6¢{ÑÁ¹V«¥  àäª{°ììl$±:îQá‚ /8-þ´%-¬š·±÷Å Ñjµ”––òé¶m1ìp^òò³|ñbV®ù;û·MèèÉŹiÓ&DIDQl6½{÷ŽÉfC¸\®­ Ñh¨¬¬) »ÝN$¦¤´”cGRXXH8®Jc²°íÇ&™==‡Ï·oG’$Ìf3F£UU9zô(ù‡#+  E$QŠîK …Bã°Û¹üž{èzùå'­äÛ3sÑ~ÞJº¯˜‡p—EA’$ÊÊʘûôœè®ˆP(D0Äh4âp8P™‚‚_u/ýy%¢VóƒVU•¡× eÙŠ<úð#”––’€ÝnGQrrr8xð`t; èt:zöìI~~>ª¢ (J›X³ºÂÚ§]TU%33“·7¼Ã_^y™ƒ¡* ¥¥¥¸Ýîª]¢ˆ^¯GWâûþèõÄÄDÆ=0ž÷ÿý!3DÒÏ“²æI†w6€"ðÞ›_Söæ†}QUI§#--€?€T½OŒF#v»=º UYéå¾1cXóÚZ¬Vkƒ7àõzñù|x½ÞNB«ªÊÍÃofãûï2ì†a(ŠBII åeå"‘²,WÍ‘¥¤ðÇùó™1kååå„#‘èõ¶H³¿Æèø<µ¯ggg³ý³Ïøj÷WäåæRZZJ8F, IÉI¤÷êEff&ý23ë{ø²³92i>ï|´—^ý»pퟟCJIŠ^¿ù—¿b×_`0x{ãìÿ–Õ«W“ýßÿF¡Óép:\Þ¯/£GßA¿Ì~ ÞsÍ=<9u;¿ø³É„Ûãæž{îåöÑ£¼çììïøbçN¾ÏÉÁí.Ç`0’Ü!™ŒŒ èÛ¯/&“ ¯·’ììïÐjµÈ²LBB:u:e½7Tÿg+1 «Ñ×Sáp8ú†Öwª¡‡,~a»B_Òë’,2nx<ºx\[X‘H„w?xŸôôt *8(+-ÅW½ü”œœŒ±Z€ ÙkÈ÷Æøy*j† )¯!Z‹°Zìýê{«%IŠžži(]}åhõR’Ðg‹ùnß\?d‘”rñ ik|Ôàp8¢§µk¯©4¶Ü¶:¦:žÿrÛšS¡ªª" VÒ®œŠÎúÊ©·p5Û^œæñ“ «¹DO»\tý™v%N#h5‚¿ô-ÎÙK|‡Zœ!.¬8-B«ê ë#‰D'_eY޼ÏZ½°l6íí0ŒÈ²=÷çÌÒb¤?•••D"ª¶¤[­Ö6-®Ö´´za+ÿ›¦†Ö"¬Vß¶eµfâQaœ!.¬8-B\XqZ„ÿ[Ä] ;¥_IEND®B`‚qpidc-0.16/packaging/NSIS/qpid-icon.ico0000664000076400007640000014735411263223637020236 0ustar00jrossjross00000000000000 èÆè®(–00¨¾ ¨fÈhÖ$ n`>*00 ¨%¬Š  ¨T° ˆ üÀ h„Ê( @€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿˆÿÿÿÿÿÿÿ‡ruxÿÿÿ—ÿÿÿÿÿøpa$7‡ÿÿÿÿÿÿp$G—_ÿÿÿÿÿ‡wˆˆw5Uÿÿÿÿøpxÿÿÿÿ‡u9ÿÿÿÿÿðpÿÿÿÿÿ‰Up?ÿÿÿÿppÿÿÿÿø•Gÿÿÿÿÿÿÿÿÿ…ux`ÿÿ÷ÿÿÿÿøUYÿ÷ÿÿðÿÿÿÿ÷uÿøÿÿ€Rÿÿÿÿÿˆÿÿÿpÿÿrÿÿÿÿÿÿÿÿÿÿuÿÿpÿÿÿÿÿÿÿÿÿÿ€'ÿÿqÿÿÿÿÿÿÿÿÿÿÿÿphÿÿÿÿÿÿÿÿÿÿ€Gÿÿqÿÿÿÿÿÿÿÿÿÿsÿÿq%ÿÿÿÿÿÿÿÿÿÿpHÿÿð`ÿÿÿÿÿÿÿÿÿÿ0ÿÿôÿÿÿÿÿÿÿÿ÷?ÿÿø$ÿÿÿÿÿÿÿÿ‡ÿÿÿ5ÿÿÿÿÿÿÿÿa%ÿÿÿÿ„ ÿÿÿÿÿÿó@ÿÿÿÿ÷@ÿÿÿÿøCCÿÿÿÿÿrRÿÿøpÿÿÿÿÿÿøap!a`ÿÿÿÿÿÿÿ‡%%%%xÿÿÿÿÿÿÿÿÿ‡xÿÿÿÿÿÿÿÿÿÿÿÿˆˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ(0€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿˆÿÿÿÿÿø‡wÿø˜ÿÿÿÿ÷@ÿÿÿø!BwUÿÿÿÿ€@ÿÿ÷—ÿÿÿøÿÿÿøUpÿÿñÿÿÿÿuoÿÿwÿÿÿ÷Uñ'ÿÿ`ÿÿÿ÷xÿ÷ÿÿÿÿÿÿÿøPÿøÿÿÿÿÿÿÿÿø0ÿÿÿÿÿÿÿÿ@øÿÿÿÿÿÿÿÿÿÿpÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ÷ÿÿ(ÿÿÿÿÿÿðÿÿðÿÿÿÿÿÿpÿÿøAoÿÿÿÿ÷ÿÿÿpÿÿøÿÿÿÿø%wwÿÿÿÿÿ‡xÿÿÿÿÿÿÿ÷wwˆÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ( €€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿˆÿ÷ÿÿvwÿÿ÷ˆøq_ÿÿpÿøu7ÿøÿÿõxq÷ÿÿ‡ô÷ÿÿÿÿõ/òÿÿÿÿö÷ÿÿÿÿ÷÷Xÿÿÿÿðÿÿÿÿÿpÿÿ€ÿÿ÷ÿÿ÷w‡pÿÿÿ‡pxÿÿÿÿÿøÿÿÿÿ(0`#"%$#&%$&&%(('*)(+*),,+.-,/.-00/2002214436658879:9<<;=L%???EL%@K%FK$JI$NL%M@?BF#WH#SV&Rn+XV%dQ.fC=}y-in+zz.zBADGFHIHJMLNRQTTSVUTVXWYYX[[Z\^]_HFrh_bdceeeghfiihjkjllkmnmoyqionpqqrttvyxz{z|}|~€/pN Œ[&€]%‚Z%‰B:€]%‘^#ž_$œK4ža%u+‡s*ˆj&žk(˜x.–w7X¾U%¬\"¾g&£c#¦f%¦d$«c$­j8©`%½d7²PFœUUQrž€[_¥SÇTÆO!ÈU#Ã\!ÀX%ÄS)Å].ÇW6ÇY0ÊO$ÐM ÕT7Ñ]5ÕS:ÐQ:Ýa-Áf4Ã\IÛf\ÎeAÓf\ÙiiÏcÏoj×lgÙ{g×€~àZ”­`¡·y„ÜnºØ{¼Õ‚ƒ…„†‡‡ˆˆ‡‰‰ˆŠ‹ŠŒŽ‘‘’“’””“•””•—–˜˜—™˜˜™›šœžž¥™‰¡¡¢¥¤¥¨§¨©¨ª«ª¬¬«¬®®¯·¯¤°°±³³´µµ¶ºº»»»¼½½¾Ù•“ܫϱ Çª¶Þ­ á´¶àŽÉ×½ÔßÀÀÁÃÃÄÄÃÄÅÄÅÈÈÉÌËÌÍÍÎÍÄÖÏÏÐÐÏÐÒÒÒÔÓÔÕÕÖßÛÖØÙÙÞÜÙÛÛÜÝÝÞËÂêÌËèÏÜîÔÚëØÜîÛÓðÞÙóàÛñØàìÕèìáááããäåååççèèçèäëíéèéììëíííñïöçðóéñôíñôñññöööòòøöøøùùùýýýôQÿöqÿ÷‘ÿù±ÿûÑÿÿÿÿ/-P?pRc°vψð™ÿ¦1ÿ´QÿÂqÿÏ‘ÿܱÿëÑÿÿÿÿ/Pp!°&Ï,ð>ÿX1ÿqQÿŒqÿ¦‘ÿ¿±ÿÚÑÿÿÿÿßÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙØªÓÙÙßßÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙ߯~ÌÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙß¿€}©ÙÙÙßßÙÙßßßßßßÙÙÙÙÙÙÙÙÙßߨɱ¯¯´ËØßßßÙßÙßßßÙßÁr]wÅßßÙÙÙÙÙßßßßßßÙÙÙÙÙÙÙÙ±‡*  ,жßÙßÙßßß§n@Q¨ßßßÙßßÙÙßßßßßßÙÙÙÙßÔ‘$%”ÕßÙÙ¤Z@BsØßßßÙÙÙÙÙßßßßßÙÙÙÙØ”—Ø£XIh¾ßßßßÙßßÙÙßßßßßÙÙÙÇ)_aFd¢ßßßßßÙÙÙÙÙßßßßßÙÙ¡  1‰—Ÿ ˜‹4DbJTvÓÙßÙßßÙßßÙÙßÙßßÙß™2«Õßßßßßßßߨ®9 fSGl½ÙÙÙÙÙÙÙÙÙÙÙßßÙßßž-¶ßßßßßßßßßßßßßß¹[fUEk/¡ÙÙÙÙÙÙÙßßÙÙßßßÙ³’ÙßßßßßßßßßßßÙßßÖzcLCj\ ·ÙÙÙÙÙÙÙÙÙÙßßßÔ ®ÙßßßßßßßßßßßßßßÃtRMA`H%ÕÙÙÙÙÙßßÙÙßßß>°ßßßßßßßßßßßßßßßÄmVKBix„ßÙÙÙÙÙÙÙÙßÙ·šßßßßßßßßßßßßßßßÂgW?"eyÓ«¼ÙÙÙÙßßÙÙßß5:ßßßßßßßßßßßßÙßÙÐqL!#YuÑß߃;ßÙÙÙÙÙÙÙßÇ ÍßßßßßßßßßßßßßßÔ²ONpÒßßßÔÍÙÙÙßßÙÙß‹†ßßßßßßßßßßßßßß߸“0Po¦Øßßßßß’‘ßÙÙÙÙÙÙß'Éßßßßßßßßßßßßßßß¶38¥|ÀßßßßßßßÔ+ÙÙÙßßÙÙÎ*ßßßßßßßßßßßßßßÕ’‘Λºßßßßßßßßßß5ÔÙÙÙÙÙÙ«ŠÙßßßßßßßßßßßßßÉØßßÕßßßßßßßßßßß•°ÙÙßßÙÙ’¡ßßÙßßßßßßßßßßßßßßßßßßßßßßßßßßß¶–ÙÙÙÙÙÙƒ»ÙßßßÙßßßßßßßßßßßßßßßßßßßßßßßßßψÙÙßßÙÙ=ÎßÙßÙßÙßßßßßßßßßßßßßßßßßßßßßßßßÕ ‚ÙÙÙÙßß=ÏßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßÕ ‚ÙÙßßßÙ^»ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßφÙÙÙÙßß«ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß¹”ÙÙßßßÙžßßßßßßßßßßßßßßßßßßßßßßßßßßßßÙߘ«ßÙÙÙßßÇ.ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß:ÍßÙßßßÙÙÏßßßßßßßßßßßßßßßßßßßßßßßßßßßßÕ &ÙßÙÙÙßßß^Œßßßßßßßßßßßßßßßßßßßßßßßßßßßß—†ßßÙßßßßß±ÔßßßßßßßßßßßßßßßßßßßßßßßÙßߨ$¹ßßÙÙÙßßßÙ({ßßßßßßßßßßßßßßßßßßßßßßßßÙß-ßßßÙßßßßßß «ßßßßßßßßßßßßßßßßßßßßßÙßÙ´®ßßßÙÙÙßßßßÙ- »ßßßßßßßßßßßßßßßßßßßßßßÉ1ÙßßßÙßßÙÙÙÙÙ» ·ßßßßßßßßßßßßßÙÙßßÙÙßÇ$ ÈßßßßÙÙÙÙÙÙÙÙß— žßßßßßßßßßßßßßßÙßß߬œßßßßßÙßßÙÙÙÙÙÙÙƒ:ÍßßßßßßßßßÙßÙßßÏ^‡ÙßßßßßÙÙÙÙÙÙÙÙÙÙÙ<^·ÙßßßßßßßÙÙ¼… >ÙÙßßßßßÙßßÙÙßßßÙÙÙÙ‡%>—®··®˜‚'ˆÙÙÙßßßßßÙÙÙÙÙßÙßßßßÙÙ  žÙÙÙßßßßßßÙßßÙÙßßßßßßßßßÊ67ÊÙÙÙÙßßßßßßÙÙÙßßßßßßßßßßßßß±24³ÙÙÙÙÙÙßßßßßßÙßßßÙßßßßßßßßßßßßßÈŽ++ÈÙÙÙÙÙÙÙÙßßßßÙßÙÙÙÙÙßßßßÙÙÙÙÙßßßßßßß×µœŠŠœ¶ÕÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙßÙÙÙÙÙÙÙÙÙÙÙÙßßßßßßßßßÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÙÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿøÿø( @#"%$#&%$'&%(('*((**),-,/./476988::9<<<>86G>=@20K@?B\(Uh*X^'b_'vP"y]&yX&~b(hf)yA@BCBDDCFFFHIHJMLNNMPPORRQTUTVVUXXWZZY\]\^_^`ZU}`_af]cbacbadddfhgiiikkjlonprqsssuttvvvxxwy{{|}|~S#…S!’X!Ÿo-†q.N2¡O>¦_"±\-³W&¸R'¿R,¾Z(¿O1¸g%¤q<¦~€wy™Y+Ì_JÐjOÉhPÎrZÊ`FÑh¨Âs¥Ñ‚ƒƒ‚„……‡ŽŽ’’“““”””•˜˜™›šœ­¦ž¡ ¢££¤¦¦§¨¨©««¬¬«¬¬¬­¸°¥¯¯°°¯°³³´µµ¶··¸¹¹º¾¾¿†ß›€Ü¡žÞœ…⳨綳ä‘ÀÓ¸ÔÝÀÀÁÄÃÄÆÅÆÍÍÎÏÏÐÑÑÑÖÖÖÙÙÚÝÝÝßßàÞÙäÜßïÖÕðÚÔñÓÙñÛÝñàßàåååççèèèéííîíëòííøëòôëôöññññóõôóôõõõúúúüüûüûüþþþðiÿyÿŠ1ÿQÿ¯qÿÁ‘ÿÒ±ÿåÑÿÿÿ/Pp ° Ï ðÿ ÿ>1ÿ\Qÿzqÿ—‘ÿ¶±ÿÔÑÿÿÿ/Pp!+°6Ï@ðIÿZÿ1pÿQ†ÿqœÿ‘²ÿ±ÈÿÑßÿÿÿ/ P6pLb°xÏŽð¤ÿ³ÿ1¾ÿQÇÿqÑÿ‘Üÿ±åÿÑðÿÿÿ,/KPip‡¥°ÄÏáððÿò1ÿôQÿöqÿ÷‘ÿù±ÿûÑÿÿÿÿ/-P?pRc°vψð™ÿ¦1ÿ´QÿÂqÿÏ‘ÿܱÿëÑÿÿÿÿ/Pp!°&Ï,ð>ÿX1ÿqQÿŒqÿ¦‘ÿ¿±ÿÚÑÿÿÿÿ––Ÿ–Ÿ––Ÿ–––––––––––Ÿ–––––––Ÿ––––––––Ÿ–Ÿ––Ÿ–––––––––––Ÿ–––––Žtu––––Ÿ–Ÿ––Ÿ–––––––––––Ÿ––––––ŒSR–––––ŸŸ–Ÿ––Ÿ–ˆb7%&8dŠ–ŸŸŸƒN?sŸ––––ŸŸŸ––Ÿ–y./{Ÿ„IP–Ÿ–––––ŸŸ–Ÿ4KLBŸŸ––––ŸŸŸŸ~ Xly{lZ"D=O‚––(3––––ŸŠvŸŸŸŸŸŸŸŸŸ”^+Cn–ŸŸy‘––––i –ŸŸŸŸŸŸŸŸ”khf‹–ŸŸŸŸ–l––––V5ŸŸŸŸŸŸŸŸŸ‘•–”–ŸŸŸŸŸŸTW––––0\ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸa2––––'cŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸk-––––*_ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸg.––––6VŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸ[9––––\#ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸ-_––––{‡ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŠ}–––––TŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸX––––––]|ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸ†_––––––’ ŠŸŸŸŸŸŸŸŸŸŸŸŸŸŸ‘“Ÿ––––––m‰ŸŸŸŸŸŸŸŸŸŸŸŸŠ#w–Ÿ–––––––X kŸŸŸŸŸŸŸŸŸŸm Z––Ÿ––––––––U!b‰ŸŸŸŸŠe$V––ŸŸ–––Ÿ–––––_ `Ÿ––ŸŸ–––––ŸŸ––Ÿ}*,}––––ŸŸŸ––––ŸŸŸŸŸŸ–{9 J{Ÿ––––ŸŸŸ–––––––––––––––ˆxjjx‰–––––––––––––––––––––––––––––––––––––––––––––(0$#&$$&&%(('*)(+*),,+.-,//.10/221321443687:;:=>=@g)ki)yBADGFHIHJJILONQQPRSRUWVXYXZ[Z]\[]]]__^a`_a``bkjllkmnmo{tosrtwvxxwyyxz}|~\'€T#‰[(‰C4‚D7…F5ŠU$’[$]%‘[&–g,„`5¢T@¬{[³YÏyaÀ‰»‹o؉|Úq®Ä‡‡‰ŠŠ‹ŒŽŽ‘••–˜—™™™šœ›œœ¡¡¢¤¤¥©©ª¬¬­±±²·¶·¹¹º¼¼½§ˆÈª™Ô¿¿Àµ­ç³²éÀ¿À»ÅæÃÃÄÆÅÆÈÇÈÉÉÉÌËÌÌÌÌÔÓÔÔÔÕÛÛÜÝÝÝÄßìßßòââãæäáåååççèéééìëêíííëòõñññõõõöôûöõü÷ùùùúúùûüþþþZptް©ÏÂðÑÿØÿ1ÞÿQãÿqéÿ‘ïÿ±öÿÑÿÿÿ/&PAp[t°ŽÏ©ðÃÿÒÿØ1ÿÝQÿäqÿê‘ÿð±ÿöÑÿÿÿ/P"p0>°MÏ[ðiÿyÿŠ1ÿQÿ¯qÿÁ‘ÿÒ±ÿåÑÿÿÿ/Pp ° Ï ðÿ ÿ>1ÿ\Qÿzqÿ—‘ÿ¶±ÿÔÑÿÿÿ/Pp!+°6Ï@ðIÿZÿ1pÿQ†ÿqœÿ‘²ÿ±ÈÿÑßÿÿÿ/ P6pLb°xÏŽð¤ÿ³ÿ1¾ÿQÇÿqÑÿ‘Üÿ±åÿÑðÿÿÿ,/KPip‡¥°ÄÏáððÿò1ÿôQÿöqÿ÷‘ÿù±ÿûÑÿÿÿÿ/-P?pRc°vψð™ÿ¦1ÿ´QÿÂqÿÏ‘ÿܱÿëÑÿÿÿÿ/Pp!°&Ï,ð>ÿX1ÿqQÿŒqÿ¦‘ÿ¿±ÿÚÑÿÿÿÿrrrrrrrrrrrrrrrrrrrrrjqrrrrrrrrrrrrrrrrrra=orrrrrrrkM@'(ANlrrrS6Vrrrrrrrf()fQ,9rrrrrrrL "".15brrrrrrH DikF-30:rrrrrrRen;2+/Wrrrrlkrm8*<lrrG^qP4 IlrrlJ?rrrrrrrrrD(( Errrrrrrrrr] ^rrrrrrrrrrrrr`G%%G`rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr( $#&%$'&%(*),,+--,//.11035476586.VBACDCFIHKNMPPOQQPSUUWVUXZY[]\^_^`^]hdcfeeggfhihjlkmtsuvvwwvxxxy|{}M*W*Z-“i4‰t?™~€tG°Z±bº„ƒ…‹ŠŒŒŒ‘“’”™˜™œ›žžŸ™‡¬››¤¡ ¡§§¨¨§¨·¶·¹¸¹†…ÍÄ¿ìÄÁÀÇÆÇÈÈÉÎÎÎÑÑÑÙÙÙÞÝÞÂÓæßÞîÝÜõÑãêâââæææííîæà÷òòòöõöõóûøøùùûüþþþ/Pp ° Ïð ÿ=ÿ1[ÿQyÿq˜ÿ‘µÿ±ÔÿÑÿÿÿ/"P0p=L°YÏgðxÿŠÿ1œÿQ®ÿqÀÿ‘Òÿ±äÿÑÿÿÿ&/@PZptް©ÏÂðÑÿØÿ1ÞÿQãÿqéÿ‘ïÿ±öÿÑÿÿÿ/&PAp[t°ŽÏ©ðÃÿÒÿØ1ÿÝQÿäqÿê‘ÿð±ÿöÑÿÿÿ/P"p0>°MÏ[ðiÿyÿŠ1ÿQÿ¯qÿÁ‘ÿÒ±ÿåÑÿÿÿ/Pp ° Ï ðÿ ÿ>1ÿ\Qÿzqÿ—‘ÿ¶±ÿÔÑÿÿÿ/Pp!+°6Ï@ðIÿZÿ1pÿQ†ÿqœÿ‘²ÿ±ÈÿÑßÿÿÿ/ P6pLb°xÏŽð¤ÿ³ÿ1¾ÿQÇÿqÑÿ‘Üÿ±åÿÑðÿÿÿ,/KPip‡¥°ÄÏáððÿò1ÿôQÿöqÿ÷‘ÿù±ÿûÑÿÿÿÿ/-P?pRc°vψð™ÿ¦1ÿ´QÿÂqÿÏ‘ÿܱÿëÑÿÿÿÿ/Pp!°&Ï,ð>ÿX1ÿqQÿŒqÿ¦‘ÿ¿±ÿÚÑÿÿÿÿOOOOOOOO_OOOONEOOOOOOM<66=MOL9BOOOON/ 3()OOOOK7FF8!"C_OOO4O___I'# OOO>*____K%$:+?OO H___O;2D_J&OO____N_O___OO __________ OO __________OO,@________A-OOFN______NGOOO0H____H1OOOOO-44.O_OOOOO>>OO_OOOOOOOMAAMOOOOOO‰PNG  IHDR\r¨f`5IDATxÚì]xUÅÖ]··ô^„ÐBïE”Ž4i‚¥WõÙ(°+*¨ôªHQéM@¥—@BKBBzr{ýg^~ä=•rÏÍMr_¾vfÎ9³×ì½g‰‹â¶ÿŠ!¢B"‘üõk‘Dˆ(; @„ˆ2 ‘Dˆ(à @„ˆ2 ‘Dˆ(à @„ˆ2 ‘Dˆ(à @„ˆ2 ‘Dˆ(à @„ˆ2 Aà΋ŠðDÒö—ÜË  ”àïÞ•ÐïB$œFqÈ‚H¥ô^îöçåçãò¥K¸rù2232_P³É‡ÃÁ®ã¼«kH¤R(ärh´:!&&ñ+">>æ®ç\!€Á`2š 7èát:‘““ƒƒàÈ‘#H»– ›Íz{&&ìú¢"èõz.øVö}»ÝÁ^®wûvém È (•JhµZøùûÃÏÏ*•’ý\µZŠ •ðp‹‡Q¿~}èt:Èd2B¡Püåze ¼-"”RÜÈÌÄ™3g˜ ›‘ššŠŸ¶oÇÉ“'a6›ù3'" wvû{“J¤ÊØ`ú÷ÇýÀ}mÇýqûXt]÷8„€€4lÜmÚ´ášC@@ êÖ«ËÉáök–vˆ â¾ñËÏ¿àÀ¾}Ð 8uâ$Ž;£ÁÅŸ;±J¥òÙçMAäd4¹ÉŒ&Mš"¡RƒÑ®}{4hÐà¿þ®4’‚7ß‘H%ú"= LÐwìØÕ«¾G³ß¯_¿ŽL¶óÓ» '››vÙ’"#/"2 bË•Chh(b¢£1`àÓ¨W¯>¸9áFi!‘DüOX­VØ¿iiiXºx Ο?K' í]Ú@kËn·óù ÍzÝ{tGùòåùÿoÿý’ ‘Düüþ;Ö¯_‹.â—Ÿ~‚…©Èw:ÌÊH; Í'8$íÚµG…ø èÿô~âp;J!ˆ Y7n`ó¦MXµrWí¯^¹Ê½ê¤öŠÏìÿAÏ‚4ƒ|FòÄDÇà™¡Cñð#s³Á’B"”!Ü~NOÿß½kvüò ¾[þWùé{´Ó—õÝþna±X¸IDÏ”N<ý4}ìÑg"xK.Dð"î<sƒì¼9s°wï>üÌT|)-ÞÀÀâžn‰=ï¼Ü\‡Ð¾};<Úªžêßÿ¿~Ç!@)ÂÏÆ}ϳxÑ"l\¿.\à9dÛ—…gâ-Ün"hµ:T®RO èÞ½{#((ˆÿŽ/’€H¥'øIç“°}ûøê˯xä}ŸÎèKê‘]I-Z-V®…‘cF£]Û¶ˆ+_žÿÜ׈À²!€‡p7 69ÙÙ˜3{6Ö®Y‹K)) /5÷_Ò@dÍÞGí:uЫW/ >Œ‡+»á d €ãßîÙ}o………\ð×|¿’’àÀƒt|a‘•eÐû¡`#›ÕŠ„Ê•0lØpôé×÷Vø±/¼_ÊÐ àî•ø7lÀÇ~„k×®ñ Û#×Døè}RL}®T©žŸøºtíz+à¨8‰@$€bÆý> ¿ìÀÌ™_`Ïî=ÜÙDÇx¾°£ˆøgXØG»ðÜsx‚¿¹bx"îõ~Ü÷‘——‡)“&aûÛ‘››û—@¾wh5„……¡GÏxaâ‹ »ù½Mâ"xzß.[†ŸÎ@zz:·ñ)rOÜõK.È„# J•*xù•ÿp³€àÍw*€Üø¿Íòî¿øì3ž•Gqédë‹‚_:àöåP„a·îO`âĉ¨Ìà­w,¤Œ”9ðÔK£yÓµ–.^ŒÞÿÙYYÕýR :6,((@ù åñδix¼S'þ}o€H^¾Ñ»™ó•+Wðî´éØ´q#Wõ)GDé™Hôøã0mút¯ù„’“RIB½ ÷\ÉÁ÷Ÿ—_BfF&÷ð‹ê~Ù½orÖoÐS¦NAó‡¾õ}¡ €oä~çI1å¼÷.XÈwÊ6…¿l‚Ö‘ån yæ¼üêxÁÓ’F%ž¼eƒQNþ¸ÑcpàÀ^nKôð‹ •KÅYŒFÏ2œ2u*w ­z%ŽŠã†Jhÿ祗‘””„_pqÁ]Á×å¼YþûÖ×·Uö½ùsö?+ »ŸÁŸÏèö*Âîj¿·W¾ów|éø÷AA÷B1›4ƤÉSÐì¡f·ž«§Çñ4J‡À¹ç5oî\Ìøøäp{ß]¯¤Â]_޶lVd2)ÓfTPkÔ·4 ûL5ú)ˆ)<<‘¾O*&-.ÚñÉŽ¢{w”Ò¦m›R]oàôéS8zä(~úq;ö2’v°ç@÷KD_&r‚Ò Á§3f ¡R%þ½Y_žöÏÜ︥‚è¦~;zãÇãeº‚‚‚}ö^Ü{‰ ª%&â¹çŸC•ªU9 ”%Ðiµ0ÿ~Õ÷<›¡Òy¼»Ë°¯ÖSAA>×ÐfÏÃI@$Ýбc`ÌÈÑ|AQ©._Í‘<øtÎ\• ;5»xªÿ4nÚ¾»çyTÒ‹Ú¤Q÷ãÇsÍÈ]íקࢹêQ§n]|>k&*W®ì$Pf €næÄñ5r$ÒRS¹§Ü×î{dCÆÄÄ`ÐÁèС³ñ«÷´|ìÕ­[÷6oÜ„L+ Ó€b|ÉBkŽÌz‡óæÏCÅ„„B_j€näÜÙs>t(R’“y_™?ÍT\»Ý†ˆˆH 1]»v¹UºZÄ?Ãawàø‰ãøà½÷ñûo¿q ªýú ps ?Íš7Ǭ¯¾B¹r±÷µöD¸OÐMP¤ÚàOãcÇ|J]$çEÓ‘MO‘dLàƒfIIuYš5s&ú ¦ øŠ–Gs Í®U«V˜=o.'¨û-A特Üï˜%ŽèèÁ4˜·Ùô‘Ÿæ@]Hå'þÈQ#Q³V­âžV©ÁwË—cö׳‘tî?.õG!Å ôéÛò1ä÷X4V$€{„{òÏ‚ ë7ðˆ8_˜3EêÙ™ð×­_¯¿ñ:~ä‘âžR©Dff&æÎ™ƒß­àù tbPÜfÓáDn^.ÆO˜Àƒ…Þ&2Aî‰O|þ,Z¸ÙÖ>qnLê~Dd$F…ÑcÆû‚,  ŒÎI¯½Ž];wAç§+Þ¶))ª¨°Ó߯ ÀÓpOúÝiÓxÅ^_(ÓÍ#ÄŠŠÐ¥[7ÎþuëÕ-î)•)Ø™©µ‚™ä(¤Ðoò 7(šó㟢ÿ€^%2A«V®Ä‹/¼À»ÃçÎOψŠG„„„r;äèÑ>c–Eœ;{o½ùvïÚÅ5Ê3(®uL±4þÒeKѤY³»ž‡Hÿ2ᤤ èÝ£w¸g˜,9ø(_œxfΜ‰J•+÷ãñ'è}PÍÊ« ƒâZË´F)kŪ•¾»Â3"üÃd³³²Ñ§W/œeL\|!¾$üt¶?pð ¼òê«>uô(â&vîØ7§Lå>:z-M‘ÉËGç®]0áþ=¡I T€;ëÙgžÅ¶Í›y5›âªäCÇŽlA}øÉ'èÜ¥sq?ÿŠyôæM›o&ñöº&G0URzŽ™¬“&ß]-‘þÇDçÍ™‹7§N½ß_L%Åòrsy™>ù5o^ÜEÄ]Á…©“§ðÊÏînÎÞ^Û7cBœX¼t kõ˜H÷šäÑ£GѯO_8™êMñàŲ÷éå½ûþûHHH(îÇ"â±xá"L{ç®I‡ïˆr(ù뻕+ýÏ…iD¸m‚ׯg wÏH¹˜\,v¿»Ì ÁƒñÖ;osURDÉľ={ñÂsÏ!#3ÓëïÑm têÔ —,æ§EB@©!÷äÈ‘óõW_y½|7OÎ>:Ï}ᥗðÊ«¯ëóá\¸pƒŸˆK—.ñÐqoƒ’™¨È“}ûˆðo“£ßQ#FKŒ¿»'µ‘žÀv ¥—R.á™Aƒp19™'îx@J+V­âG„ž&RA4±œÜtîØ ×ÓÓ¡Ñh¼:¾»}ôëo¼±ãÇÛs!2˜i9„‘À©S§¼N9ÙÙèÚ­7'ke–;ÞxíuÌŸ7Ÿ'ùx”Ða4ðÆäÉ<ž_DéEjj*ž<§Nžôª9ànFúég3x•a‘î˜ÐÞÝ{зO¯~ Ø“ш×&½1cÇzýþExW¯\Áàƒ¸oÀ›š™˜t±sÏ„……zŒJ<“¤[ç®HIIöê™-yû騆œ}_zÉë÷.¢øž–†§úöck.徊yÜ/(¨¬G˜ùÕ—"¸'4ã“Oñáx¬ñÂÝ‚ŠtNxþ9Lbª¿ˆ²êfÔ§wo=è­ü ¢ªÐK–-EëÖ­ÿç˜e†x-ÿS§Ñ¿_?~îN™TÞ—ì±ÞO>‰™_Îòê=‹ð-P³’¾OöáN`o ÑÚ{衇0oÁ|â~§Ü• pOäù °tÉR^àÃ[ ‚ŽMÙ øfùr¦þ‰A>e+W¬Ä+/¿ìµÇ´ö332xiñƒñïÝ.{e†öï݇'™ æÍfÔ‰‡ÈfÙ·ß z^»_¾÷¦OÇŸ}À ïœ CЭû_víDHhèi%Žhä}ïß·<èµ3žMÈîqÑÒ%bÝ>™ãǎźÖy­+mFÆ Å”·Þ*{°iã&^Óß[Ž?~òøúÙgxªÿS^¹O% Té©ÇÝqòÄI¯”r§À3:øaý:žqz¿$Pâ€<¡Otí†Ó§Ny­–yüÉé÷Õ쯽2žˆ’‰CaðÀ|Ãð†Yš‘£FcÚ»Óþëg¥’hË—/Ç^|‰ ¿7‚~(΀ú¸}óÝrÄÆÆ >žˆ’óæaò“(¼@›¡\®ÀúX=ñ¾œ%†hpªà:èé§9Óz#Û˜œÆ áoÚ´© c‰(==b$V¯^-xjž““ƒá#G`ú»ïòïÝ+ ”(ضu<õ”WâýižˆÒƒ¤¤óèûd_äfç@£ÞIM§{öíEtLLé$w¿^=zð޾Býpm#?Mj†o™É!õq¯X³f-^|î9¨ÔjÁ ŒRÁÙþOÀ{ï¿_z `ß¾}è÷d¯„]Ò±¹xÙR´hÑBбD”^ }öYüÈ´V¡×,Õ¡ ø”[6#22òÖX¥Šúõí‹ûö{ÅóO¾†¡Ã†bÚŸv•÷ƒË—/¡k§.Ü‘,dmJ’=2WÉT}~â ¥‹hÐcüÁ;úRÌ¿ÐE>ÉÔ Åæm[&èX"J?¾øü L{ûm $¤)@q* 6ÄüE7{_Þ- ”˜2i2f²)Øtƒ3P9æŽ|,¥”Â;à©þ8rø° B7 â^ǪիѾCûÒA4à•Ë—Ñ¿ßS¼‹a¿î,¿‡~ß~÷TjïdŠ(ýظ~ÆÇ×BjL¥è.^Ì{Ü ø<lܰ @tt´ ~Rýív-Y„V­[ 6Žˆ²‰lÛ¿¿àiÃ"¼÷À~”+W®d F7CêÓoG ~ôGþ…Ž?޹óçqö!“8zäzõèÉ×±¬t"0hȼýÎÛwu$èÓ––†æM›qÏ¿»ÿ­ˆ¿åߢi³f‚#¢lcôÈQXóýj„„†6™UªVÅO¿üü-‘0uòT,Y¼Hpµ‰)Èq2oÁAÇQ¶qàÀ 8fn*:Í"S–I>úä#ôèÙó_ÍŸ$÷@íZ·Áùóç=û§y¬Û¸ 4l"h­ : [6oôD€*;ï¾ÿÞ­qKüòóÏ?vÊÒ&ÏËËC—®]1gÞ\Ñö!8vïÚ…¡Ï<ËýBùLF*WÂ’eKP¾|…’IoM}ŸÍ˜ÁC…%QÐîOŽ¿N; 6Ž·£{×'pâÄqAƒÚ233±zíZ´iÛæÍŸ#w"Ψ#±{÷nAU%jäùp‹GS.óZq"vîØÁÛ× ™ÒNk{ÌøñxcÒ\¦þN ðI8°?zvïÁ…_(5‰æk6›ðêk¯q{I„oκwë†Ë—. æà¦“-ºöþCo%#•ø~ÕJ¦Œ4¥ŸýÓÎ*†¶Ï"Ê6f}1S§Lt“ÿlÛöí¨Z­êßš>E4õÚ£àŸcÇŽ j#‘íß«w/^èS„oã·ßŽò7}‘^° 7 ¤{ª~Pb€ÒÕkÀcñ… þ¡”ßí?ÿ„Úuê6†ÿ: ؼi¯n-((¨FÍšL øño£}Žì?Àcÿ©ÓŠP ÝŸŠ(®\µ A^ªã.BĘ7w.Þ›þ._ëB$ QXp\\~X¿aáaÿS ð99|~ܶMÐè?:"ygÚ4Œ›0^°1Dˆø7Pÿc-[¢° P2â¼}=ÛìÞ˜< £F.С]{œ;sV°bŠäü£™.X¸µj%È"DÜ-=={÷ìÌ™‘É7ºw¦Oóm ‹S£ê®’zõš`ùø”õ×졇x?±Ø§ˆâÆÖÍ[ðì3Ï P “(Št}¢{w|ùõ—ÌÔPþ×q OÀ’E‹0uÊT(” ȤžW‰hޤvQWÕ>úÐã×!â^‘zíZ?vS"æ…ŽuZ-¾Y±uëÖû/-À§àÍÉSñÅçŸ#"R˜vßdÑ8ŸÏœ‰Žwd "î·?–ÙçÛ¶m,ê•Ì€Uk¾G»öí}›^ýÏ+˜?w÷X ‡ÝÁ ~øõWÚŠ‰q7X´p!&>ÿ‚`y/7nÜàeº÷èþ_Ç>AÜþÏÊâÇÌ6'u¨Q£FŒ W r}"î[¶lÁØQ£y6ª§T˜´o¿¾øðãùõo×|†öïÛÇÛ~)••LÒ3ûÿ­iï`è°a‚\_„ˆûUóüô@œ={VͲ^)ñhÛOÛyøûýʪ @gÿ”!%”ävîÞ·UªTd "î£FŽÂº5k L£ãï‡qÿšOÀ† ñÌÀÆH@ËØuæˆd "î“ߘ„E 1 @+HT µßµw ô)p_ôý÷ÞÃç3>ì<”ì -ÁüE‹Äó>‡µ«×àÕW_E© u8óËYèÜ¥‹ïõN{ºÿÞL¨ˆ(ò„Nž:/Lœ(ÈõEˆxädg£}Ûv½zãèÑ£‚ÔÁ ¨^£Æ¥ß #€Œëx¤ysÁªòZ,f„……cÁ¢…¨S·® cˆñ ˜üúXºt© =0o@u^!ÈçàÌéÓèÚ¹‹`U]iظV®Z µ€ FEˆxü°v-/…ïçççñkSm€Š ±yÛ6h™ ܼ FÖ¯Ç󞬵üîúD7Ì[0_ë‹á œ=smZµ$'€NBCC±xÙRÔ¬YÓ·àã>—3g v@å¿zõîY_})ÈõEˆð.$%¡më6¼ާáCö'3>å=0|Š&Œϵ!ªÑ¼ z=Œ÷>xßã×!ÂS¸”’‚.:óÝÚÓG” k6[0iÊ$Œ9Ò·à©~ýppß~Aìó›õÿÍ7~^~å__„O!==OöìÅs]Ä> ÒT©(îÏ?ýÄ»ùxp7fÜ8¼=íß"€Ç;täGB©S .DÓ‡šyüú"Dxt¶â»ïéÅ`ôØ1˜6}º@û8sæŒ @Q€Z­«×®A•ªb°߯›S¦âËY³ø‘§A0rô(¼ûÞ{e‹ü±åÇm5.B„'ðéÇŸ`ú´i‚ô äÀ¦¼[†4wPÊ…Ó€Eø:fõ5^õUD°Y•I €€Ê!Q!P¡r DˆðÌŸ—^˜ˆÈ¨(_›ún >œ§îUfK4:rX¬,Âç±pÁ^!8J¸iŒf&À»eOØè   GEˆðæÏ›‡—'¾(Œð§ 0™„2£Бʎݻk¼ B„§@'“_Ÿ$HsÒÆŒû—>÷‚It @A›¶nALLŒÇ¯/B„'ñáàÃ÷>¤9i#þt|G0ˆ@£ÑbŪ•¨Q³†Ç¯/B„'1éõ70wÎn¶zÜ3Ó}Í t(0Ùþ³çÎA‹–-=~}"<’!*²fõjAªcûl(ð]»ñŠÀBؼßÿðCôìÙÓã×!ÂS êØÃ‡Þݻ© D•‡ÇN7ßzË·@èt`*úêk¯bĨQ¿¾žBNN6ôësçÎy¼6Æ­tà—^Ä^yÅ·`ÂøñذN¸‚ T‘Ž?Þ˜4Éã×!ÂSHMMEÏî=øNíé#kÒ„©7À¤)“1|Äß"€O>þ³¾˜)XI°¢¢B<Õ>þôA®/B„'|ñ":u|œ «§+Ñq8EÂ~üÉ'èÒ­«oÀÆ ðÜø ÂÍÏGÏ^½ðÕ쯹¾žÀŤ$´zô1ÞÃÒÓ5©ÌXXX–~û }‹¨*ÕB*R¯ ¿;=ŽEK r}"<r„“ DÀšÅlF|B¶lÛÊí>EB71 ¨^£&¾[ùBȳ! îÀS&M$k•ü`‰Õ«ãÇŸ|°1ˆÐ­ÁHý¡hÀ¹óç¡i3±*ßUZ÷Â8Ãyg FÛ|‘(@¡u«Ö0³I ‘±GN£ÑÈÛ#÷cDø(ºuîÂâ„ê Ø°Qc¬]·Ö÷€„s`ÿøý÷ß; ÈÌÈÄ_ÎÄÀAƒ¹¾ Ò‚©½¦0öПgú>|ÿÌøôSAB T aÂs0åÍ7¹¾‚”äd@Ñ€ž>$L±î·+APظa#† ˆðϧAHªU«–-ÿVD " ç/àµIø…0ƒ)–ÊâÅÅÅù¸/üã¶mè×·""Ê ”°»õÇm¨T©’ c”fÐûu/ú?žìk-VY»{8”E¼üÒËX¾ìøx¾Án³ó²xTgÀ' àÀþ}ðTfÿ(Q´ý—ŸQ§NA®_VAdàÜ `¡]J.—±k”=xvÈ3زi‚‚ƒ=~mФ  ­Ûär}ŠÜÍÉÉÁ3ƒã÷?~‡ŸÎó™Pr6Ž5 oLsîô~Oœ8³gÎ!::Š›S¡a© Üý>ï–®\½ ­F‹ðð0þ÷D&·;Á„‹õ5œ?Ž­ý!¼7 G€EEEèÿô¼ÿÁüYú¸ÕË×^y•C¢&:Áfµ¡Zb5laf€ˆ{ǵk×°jÕj¬[³• ­Ú¶A»vmѨIã¿ü½O÷;ý'" u›¶¡FbÔ­]r¶8&ðòÿø²`¬eÏsܘ1<Xˆ{¥“…EK–à‰îO<°¦þ—¯=©Þœ<_|þ¹ õмIˆ¿?víÛ+Hïµ²zÏû÷îÃÌÏ¿ÀÎ;yÔZ×'º²æi4fDpçnÍ×Áÿ¸Öù‹É8ôÇ)Dø«¡P*Тys\»žcÇN c»Ö\ ÊP"ÜäI“k\Cv«VvíÛû6,[²S&Oæ* jŸ[Åœ ü\Èr™`“"† LP9)d5(ˆuᇆzðHçžÐjtÐ(nÚÒîhD_ôмޜ2³fÎ,ê•4!:ZÜwð—£E………=b$vìØ!˜zDó5èõʱo$Úb‚ŸeaZ„Ë€8‡U*g³#_gGay ì†8¡ €ªqÄU¯„ª5¡”ÿ¿I@(n Óó±-y ”pU°¨R­*/]Œ¸¸ò%“í[·Å¹ó牑vƒ‚‚¨>À÷k×:NYBA~Öoß ©.aþг¯¯¤^GfVf÷C¦€Ùh€17*§j’’ÎáôÉãÜq%‘(¥­€¶þ­Q]âƒ9 2[ª;U¨ÈÀê0"Õ^³ËSж†tá hk¨ ®¨„#B\2Cª#ñÑ~ˆ¿éL¾Û,E!ñͲe¼8ùŸ„šCfFï<ý½woÝ·'àux‡Ùæ æ/,*Ð ò9Ì™?]ÅÈ@ °°i鈎FFZ*Î¥ÞÀõ<#.]¹µ_0”?\¿r†‚\´jÞÝ;µašX&½ø6víÝ™’´BQ¨©©‡šòXÔtI΄Þ`ÍA®=Ÿi.TrÈ´ •Ó)©ùaU‘¢(^g¸—6܈l‚6=‡":òfí‚âô ÿƒŠß9|~…þ’c•*_Q¼'žx°ôß;áu¸žžŽ‡š4…†íÌBÙJ23jÔ¨M[·»ŠXš|é*? §TŽüÜ\˜%JHjä^OE¨Ÿ -nˆ5«âÚùTì_G·ŸÇ™«û‘a?ƒ{¬.ÔR4ó«™:oËd&ÄuTtÊ`—ÂßnƒÊÁ4'3/vd“fQ.ÚÄ0U „<ÜŠte²üâ\áQÔoÔ :Uñü°v-ÆŽÃó„Êj¤àŸªU«â§¿xüÚ^'ÌAOᇠªÐÜi¬>ùOöé#Ø8e ’“±÷ЯˆŒˆF~VÒóôPø‡±šZ‰UЬYc&¸vì[¾ ‡×\Ä•kV]EЪýQhË@Šá rl×`qZ ’êPAUµ55ÑPŠküm°›M,™&m(´ˆ×@%C~¤…Î\ftç"G]„¬€ Ö ušwDdd4d.;oÅ Pôé“={áÈ‘#‚Ö¢ `Ï Š)oNõø¦éu lÞ´‰× Œfê¤Z©guëÕ÷˿¤.[YÞ={!e»\³&‘tñ"¶î<€& ê¡zBÂ""p=- ?M_¼ÙÐK4¸*/`¿ï»Ä6—J©éæ3¸¨?½#NÈPN]mÚp¿€Ö’ £-R5Lð•¡•0"·ç!ÏzrK"²Ícš‚®Ž ²‡•È‹WàB@ t‰ÝØ»n~‹BY³z5Æ'Hß¿ÛAÙ¾C[:àêÕ«ŒžÂ•ËWuÒÑ Z3>› 6NYíDª?µ¶Œë×qâä)<Ö²”ì{†½çÍЯ»»*IŠ|Ȥ8¤Á¸Î„_¦ˆ€³ÿm=.èwàŠñwF…pÀ…0E êš F­L(E0¢$28mE¸îÔÃe×#Á¨GœÙ­Ý‡Ý ›Ê I TM5°ÆIp^àÚ}ѸAS(ÿÌ9Ò7@»‡¶íx´P° äÐnÛ®-æ/\ÀL yé ÂÔÉSðÅgŸ#2J¸˜fÄÆÆbûÏ? æ¤)‹ ¬4•JÉ«ý:™Yöò§mÚ©ÁoÒ|8%rÊÃqÉe„D#€<— ¹¶Thd:Øœfœ×ïF–õ2.;ÔLSh¨mŠ–-¡„ÙÖ4 €CŽP‡ ‘Ö«P˜³ág· ÈnƒÎì„R%¼†ŠèceÈ .ET}”OhŠÊ•nÍU“€J~½ÿÞ{¼2 ïÿªµkЮ];A´åb#€“'Np_@AA  Js!-à•W_Åó_lœ² ‹Ëïςÿ’ÃHfòpÍaFUE4’a†™ »Ž ?³Ü‘lϘí¯SU‚\¦A‘- Çó×3a¿ û§–hQ]S ñêP+B "óê Øs¡u¡¶Í‚j63¢,fø±Ï*›r?¤ TP<ÌȽ޹r$å#$¦ªU­kŽž$ªøCÉm”)¤K'YMš5żó^º€@5ö1»Rè³z2èN~X¿Ž—¾áYØÙ:¹°t#²ÞùgÌù¨ªŠ„M¢@²ÄÊÔû(X˜°'9éÄÀŽ`E< ™ ›™ª_hχɑ££ ‡ÇÁÉ®—ÀH i`G¨$˜ý¯”ûC'õCœÃ€ò– „™²¡¶Bâ°ÀÌTqG[o•äTPAWMgE'’쑨Ül4jÇßQ† n¼øüD,Y²˜×å 4WJ£ŸÓÁ¤,^4×@Þ8І(bZÁÉKˆ¯<1‘ÿ_ÎünB‡iÓèÝ£N:Éw!’Ì µFõ6ðf,BûÆŠv‡ƒWR¥£Aod…|K–-EÓfͯ¬Á’¬†}æz\ËÈ@‚Sƒ•?ŽK 0É5ˆbpÒ™Ï +*Éb —ɘv Æ5˜q•}–+ËA!UBêr"Ít§‹~F »‹"+£ŽÿcÐ1Âê4 „ý^-›­ùµAÁˆÁj1!_bƒ=^y,³Õ˜FP‰² Èm}†ÃmÁßðâó/àÛo¿} .¼w‹ì¬lŒ0o½ý¶àc|‚è÷·mÝÊÛ)Sµ oÜ8™õêÕÚõëÄS`c»pæ™ 8³f¾ÜÎlu9ŽjíL`BÄ„ü # å˜:̾6HeÈg¤q^B~ñ0Iý`a»²Rªåv}’aÒÍçoËàǹÁÌdhÐ ÚÚÜY¨³å#Ò’…ýÜa€ŒÙ"jxV¡ŸÍµÍ΃…Wƒ¥p=Û5ÇB¨ßM[þŸ|Ë™à¿òò¼¢ÒÆDëÿ‡ ë‘Pú À=ý>yééxeï^áãÜs¤¡g‡>ËÌ÷¯¬"5# Yƒ¦ êð\Ô)'AºÔ‰cLh( ˜)`‘Êq&ä* TD ™-Ȱœãê¿F„3…?á†5v—‘@$3s JY zG.ü™9ã° †RŒÚ¬Ð8-»ìÙ» ¹ÝM¡éŒTÒ†µF‹¯¦@­øÿwjgÏžAŸ^OòÍ‚@hPÖߘ±cñêë¯yEø >Aî¿¡æ½{õä½å½Ñ0’Ʀ—;õÍ71jÌhÁÇ+‹ sàìúÍ(øh ̧3P_3j®2õ½©$” ¹‚©ëÀ )³ßÙÏŒôŒŒ2.; áÈA„º&üåáȱ\ı‚ ȶ^c×µ#@‚ÊÚzHÔ6@#H» ÁN3t=dL°[ÉO`„Fá„,–q@„ ?%d9F\L-€zÔ0t1ò?7öÛ×bzz:ÏW9î¼W´R:§rb?ïÜ!hY±;QìàÇý7do-Z´HÐòá·ãfµ o´øx§N^³¬ÁFêý¯Gú(ïm)ôQøð)pÿ-e ¾;}ºW¼®|L©…¨Q³Öüðƒ×^|YDvjNÌXl݇&ùJÙ€#*Ê)Bá`‚O&ÀE‰ Wabß‹c_û!‹½Ÿ+lgbD VD1bÀe[Î “™—2fTÑÔGG¿‡Q›ÙþZã8,…°9m¼ì8­#Û̵:fZ*]úË ‹VÀ^™Ùúº0ĵ| ê7Äò%‹ñÚ+¯ò5 TÏÛAiÅTTtٷߢEË^~‚O€ÑhBnÝpþüyî|ñ–7”˜¸EË–X²l ´ÚÒÙºÚk6âì침ºò¸2cfâ™6à 0afÿC!‚¥ÐÉé„@óL8ôˆ“ÇÂ,× ›)ÌTHƒpɸɆ_™9àQTU×A3M-È]Ìð`ÂÅ–NŒÓÊL‚-fXíüT@î°CbwB!EA 'ršTÅõ*uðêŸ#óz:BØæCŽi¡A1}™ÆûéçŸy]ø >AwŽE`ß~<Ù»7?ð†CÐ|Fí;v`êØ<¯x~Ë*.Ÿ=ËÌO””‰ )vÄý U¨pQjEŽÄÅ„=f©×¥.\rd †$2i ¥ä04![φzëu$éw"Í|†íöPC‚8u54êŒE8Â,9ˆ±å Ø^ÕÀL¤3nonJ]Žeå¤p&8P”ƒKê`ú׋`,,äõ„ùÈÁHŽ?oi»wÂ' €@ì;eÒ$f‹Í¬ÕÒß!?/ݺwÃW³g{E ,‹°±÷{aÛ:Ø6~ÜÝ×Q-Ý2H’éà'Õ±Ý_‰ã(€– v¢,’G &K̸¨ðƒ\U‘×0Ù2*Õàœå,ÎèÁæ2BÊþ•×$¢¡;„ËC 5_¿= Z› »ÁLåöcj¦ÈØÑ 3gÍòŠ3²,Âlw å·ý8µp ®;‡'ÔvTèà’ªÏ4¿Î\Ô€2?dKŒ \pj☺„+Ž<¨ùˆQ–G¡Dƒ£Æ8fØjGD'Šr¨îױ̔ˆvQí¸Œ­F(Øg™Ã„ܩݵF¿šL㈶#«ù£øpÃnœ:y 6j^Ó³W/îø#”yø_ãÑu¶nÞ‚aC‡zå8æÎ¹Pµ¢.]»ò#B¡Ó•Ë2®eg!Ò øýð+Ò˜Z^QÉìo™i2;r˜àÖrùÃ!“#‰™W•þðSÄ02pá†=™¦@¾“LƒSöLœ²^D†å¬.N;"™©Ð2¤;⡆i [.~#üœ¤XyÞE :mŒ€°¶ï׎ÄÑò‰xiÚ§ˆ ÕÜÃ÷KtÖ¿jõ÷¨Z­Z± ?Áç €0ííw0ó‹/¼~DÂ5Fœ7²tYYGfJ2.~2W7@‹f¨ýp– ¼ÌnCÓ r þP8et ûY>ÊËÂag&@2ôøi :U ¤šŽâ|Ñ.]zÈ\2D¨* ©¶jH´²ë„?ÄáB #•Ëδr:`³Y˜9`G®Ò€Œu±InáU¤‚t~ ¦cg2/»tíR¬ÂOðip_‹‚$z3uéÂù$¯;KÜšÀc­Zá˯¿âñ"„A޾¬Û‚ðÏ@µ‹zœÓ²u¤t¢Š^…T‰g´rD*"`”*q‰™\rø‘ciûQ„MHäL¥OE¡õ*£™T.i½¨-™ÔŸi9ÛŒpØ p2 Ãå´Âæ°AÊ4†@§AF'Ó*SŸæ˜cº‚õ?ýˆ <¨*@$BÍUûöëËÖÒ×ü{"Ü¿#cü>OöÝf+–˜“¨ßà§ŸÏ@­Zµ½>~Y¼[¿òéKa¼šU?T.RãzdÉÕH‡"UêDÛýkÀŸçœ“qZ镺nØrPŽÙõþŠHœ¶^Ænýd9²@§„UT•ÐQבԺؚ 9x?öáï ~„v¦-¸ aÚ“ir³ &½Ö!ðÒ±mý&=@H0­ajï]½fM®úÓFRÜÂïž×_¾öEp_sÑ‚…˜ôÆð§@b˜ H-Çß|ûmtí&ö t˜—¶ï N-Z ¿‚d´Thpà\!$™JTPã´ÄÀìw ªH‘'sâÌ—¶"Èÿoµf¢¼4NE)øÙrÇM¿ÁÄÃÁ¶õ(¦!tÖ6EiüF:¬ÐÚÌP³ÏJ¶¦(>@NÚÓ*ìz#’ä&X_éÕiç±fÅJùÜ—9@Í=” %–¯\†ú„ðJPÄÔðañqýz~4è@;ç@ÅDHyéå—0j̯Ž_ÖžŸ‡Ë?®CåÃÛqõt.dÇ”ˆ‘ù㘤å˜ ÃÔùsR3.ªtðWÅâ*Ït @ #ö ®ªÊ#Ûž†³E?Á`¿Ùˆ¤ªºžÔ¶@FfË ¦v˜™I`Úiƒ‚kN¨e@0ä¼a…I!þ…nø2÷ Ö®úaA÷d к!Õê[oaÂs|FøÝsûË×¾JîëR©ä¾½ŸäÅC‚½ìtƒˆˆê 1Ï¿8ÁAA^ŸCYA¾é— —ÙáÚí&ÄYq\U„ªN%ül üª´BªŽ„]ªF&#€šÐÁE'’"œQA¦IäÉEç p¡h'ŒN2µÍ- @,3â¬z„ÛLL°BÂ46 •å0i¥P%›áL1C2¦“ðý÷+èw•x‰¯ìl<=p f|þÿžHÿ‚#ääôêÑyŒ Š+Z×mÏÉA£&Mðö;o£1û,B 8¹c#ò¿Ø€ú‡s‘áD•p©6üns"Fd—»µ™úMbÇv¹…­DÈä¸Îvr0r0[R°×| 9Ž|·¡‚¦ZuF"Ûù#LWn·?U¶2ag$r2HÑÁYSÓ5=®ün³sO|±}-þ8|è®Ò„)²ôáGZàûµ«¹éàKÂO(qà¾þÚ5kðÜø Bk&$RQ×ÅšºˆtÙ¡d€ŸÝ Ó Tä ´Øa±˜aYáH”#· Òömq,U‚Y~™Tò?×;­_ªí?oátèÐÁ'…ŸP" àö1¨^ÛÜ9sx‘âÒÜó¥ØîJ•+aäÈQòì3Å6—ÒŽK×Q°})”GBºÑ^ãþEh ² VìÕȨŒãñé®<( D¾Ä‰ƒrruµi½Šß ×£€™™Ú©âQE<N*,jä¯u9¡uºD%ƨ©Ñ»Â†SQF }_ÜÓG~ƒN£ýKM *2C­é¿˜5}ûõóYáwÏ÷/_—¸}œ‘ÇcÍê5üd ¸6±>ií;´Ç˯¼‚ÄÄÄbOiEFZ Ò¶-‡òëCˆ9ç±xjÇjvÙ€ &%ª)¢) í¹¨îTB.Uã´Ô‚ãÌ4P«*!— ÷1ã~\6C‘£Z‰µ)ZP[ѶB„Yò ¶éár°÷é²Aæ’ 2ÄÚÉ·#+Lã}bêŽÕ0æÜ"rçädã=¦Ž5ŠÏµ¸×ä?Ág ànÇçõ˜Ð=;döìÜÀ ïTþ7è™I@íȇŽÁlnÞÎh, øfÕrd­ÝŒ~ÇŒ¸Ê„8ìј²ìH;î@%W.˘ o-D-—yRv«¤°kà¢ÐaG.¬ò dØnà¤þ¦ dÁ_Ž–ÝÐPU±–4Äš2b6@á0Àì4#6ä3u@¥Q ì’]Žö®…7 ˜ò ±¨yÀظ ã1iòd>G_X‹ÿ„Oîñr²³1dà >r„‡ 7hNTí¥  5jTgfÁHôíÿ”è$ôR’“1ã“O±sÏE†aTBMD]È€.Á†­ ×4!VïK 3tª3øUaÄy](¢å˜Y`ÆUWBÕU`”àwÃ!F»ap"\‡†íPSƒ ÖlÞo ¬GÍÌL+' jÉ‘ ˜ç²E+]ÂG¿AúÕ+ÄÖàGŸ~Âß¿¯ ?¡T€{Ì I0|èP$%%y­¿ÀÝ܃Éh„” ~í:uðf4¸¹H÷K)—°zõ÷X8Oצ4m©‚íÆQˆ Ç£•BÑ>Ò‰¼×Q.ÕýÌQ:[$Ç÷r‚ý*"D€3ȇ‘™ÌL0ÈÔ¸âÐãŒù$’LÀê`Ã4æš&¨(Ó!„íþq+bmvÛ­°8¡öÍ506Òââål\–WÆåøJøýèAÌ™;‡ŸLÙíöŽIŠÏ/u7(5à÷Ìé35b._¾ Nç$à¾rQ$!¥?ñÄx¢G÷âžV‰À•ËW°î‡°xÑ"dfdpÓêöp\²»ÍNjÕ¨ŠÑ×FÐÖsHÜëĵ`:“BïÄ/™VÔ——‡I.ÃIÂO%9¥2\‡©GGpÖô;ïT\KQÝ´õ 9ÓäòØ g`Žº3ÔJÖÌ!-qM œ–Ä¡v‹§Q¥rå[-Çî¦íXq£T€{lêá6zäh$_¼è“>é´@Ív¯&ÍšâÉ'û G¯žP(„k8YR‘’œÂ«óîÛ»gϜᑟ´ëÿݺ0[lH¨Q ÐsO.$éE0µÓÁδ€sûÍhèˆ@Û•OÄE(œR- %R¤@­2¹. ~f¦@ª5N8ÐD•ˆNªˆw) u˜øÉ€“}v0"°[m°)-P–S ¸±¦êj«´@½¤ÒòÌA—Ç+ x>M÷;ž=xìÆ‹ .[½µíZ¤ P¡‘òåË£ÿ€hÕº5ªT­RÜS+VP<ÅéS§xâu‰"UŸÌ¥»‰øt1-€JE&Äclte´:–…üL•”ÈÙ Gms0ÒÞ‚¬‚<”‡°¥zÞU„ ^mX£N#RÌgq…i.‰ •ÔÕÐPU‘6=Ê1ó ÖÉv~6ŽŸÝ%U6Ûx“’ #Δ“@þdO´>Áš›Ee}mÝ݉RIî9œ?wÏ“'O ÞÕõAîŠC„†…¡ßSýP·N]têÒ¹LÕ#<{æ,öï߇m[¶òVñaÇmü{U¡Ùó´0Á¬ÄH`B¹êˆË¿W¢–­T¾®AºÚÉ ÆË‚áªÇ.Îe@¤"™Ì8¦ƒDˆ“…ëqÝœ5û½€¶¨¢Ndö:¬×j£¨A*&â`ZàïB-RÈŒdkÈìÞ±¯<‹øÄ*P¸¸Œ€ ðyxÐydfdb¸qøå—_xvq ýÛ\éÔ€’ˆ¬êÔ­ƒºuë1Bx Õ«•J20ŒØ°~~þé'œIÅR0ˆtäþZ´®]#ó”ˆ?g£Ñ-42.1m G&A‚ÄÛ¥F\ö«Ži²œ¹0’ȳ§ã÷‚Í(pä ¶²Úiê#Ì¥€ÌQðç©€™øÙœ–H\C { 9Në0¶êŽÎC†òy¸×ðˆ= ÷uïõøü/_û"<È\îœÓ[SßĜٳùŽã­®Cž|V‹…Ü$ˆŽŽfæA"B¡U®\ <ò6lÄ®Äë&‘i.ÙYYصkŽ;ŽŒÌL\»r))ÉLè ¸Ðûùùy=Âb±!(6/=Ò .¦áÚÙ<èò…嘤rÄH4ؤ´Â K„Ž‘Aª#rYtòHcZÀaýX\64ÓÔÆʺ(ÏîÕß®‡Úa†Œ€Óa…Éf†=À Y¢ AÕÕ(Š G`›A¨Z¿ù­÷çIüœ‰ð/óZ¼p>úè#^O€Ê3{»²§žín”rJ B£j­NéÉåËW@õêÕѨq#„‡G@®C¥TA­Qsâ£ß½ÛRçv‡&£éæ‡É³Å³±Ià?Á„ý.^¼€™7¸:O4/rnÒ.Oª}q>¹¨ù$hÒ°^©ÿS)°_°¢\® çFHåJK•X£r"@S 2‰©®l' cö–-ÇL‡ñ‡õï7P[UMÔuí0!ÊVˆŗ„#« RŠªË`(¯@ÚŒKþHì1õê×?|Àe|7²%À]ÌíÈáÃxùÅ—pæÌ™bO'ön>q'¥8¨ÔµÝÆMí¾þþ¼°%‹†„† ˆ}¦ˆI?#RÉ•ô€Ønæ`Bnæ_XTÈUv"ËÜÜ<^à‚Žæ¨"’-zÒ4¨y†Œ}H©”®‚«õ÷ –ËH€‘´oÒ=CÕJÍAõ ’3Ìð·0S„ñÓ&­ qªÞŠ<ٙǻ )™fçÔC!qáË 0‚N€j~m£©‰£iùˆ± ÚZˆ‹‘‘@h=ü*i‘&3â¼_Ôè8‰ ÝÏüïu-ÜïµK=Ü>GªÓ6aì8ìÞ½›íœ(ÿ!Ȥ¤ÃíKàÄàþ`á *¸þìVJ+nvL&–ʤ|÷¦vúLîkB~·°±[|¤~M4Õ)ÐÑ`!ÓÿKìûvi5¨¦.‡B¦ê_p NÆîSŽkŽ<”“… N|c:€3Ö„1Í nPw„kjÂê4#ÀQ„(G>B¨ª¥ M>Ê»P±©ÊjJ$kk ¶^_$ÄW¸ëT÷û…H÷0OZøTXdþÜy\uõ•€´3…«UÁı¹šŠ°«€1ÃŽƒSábª»Ë€Ìþ'mà#ƒ()Ó’ œpåa#‹¶ËˆQVF}FþÊ ®¸î üó­ßcܸ±êïO|ŽÔiañ¹{ÝKìùÍ£\-Lþ`Ҁϯ0¥ËH[[€{²ÊpNCJG<È\ïn–%Ìl×¹;º‹ž¤—Ié )M_$D I^܇+$'ÀíÇ’ bÌŠÑ9>ŠçÒ¥¬øÖmXß·þGÊ Ðà3âxÌ÷/¿ô ÿýóŸÓÚÚzÒÁ*4N/© TÒ·ž={6wsæ¬YêwŸ”tF†Û²îUò¶=+ìá˜?AU(¦¦~îV¢X&‘x$ÚÉ ïf$­¼™fä©´BÛ % ߸á†ÁïN&Õ܉„£Q½ù -[^¤*"Þ¯ã¹Í9cxLiX|¬ìï$j4òˆ³>ût¹ˆêÌÀFòy\c™ÉDÌÂðãŠ+¸"qœº‰Š4uÓP£8o`Ö%,Xñ #å“êúIu×àëÚÐРF¶yðþÔ$²|Ò5ÐÄà³Eî8”;徸¸˜U·~—%‹—¨ b$õœœì}‰ w ¶¶–ØÎ?’ßYÏ–?¥“ôŒÆc1àäo}>°zTqK qQ˜øµt·óB¼™S!ÕéQ(Îå.CAl€¢`ˆqVcæ8°N·ÑnsÄ5‡)K¿†3ÃþrŸÊósAÀpÊ7Ò ­¯ éõÈC³~ýzêêÔ2:335!A††O“;9+ÊË¹éæ›ÕˆIrªV2ÜŽ"-Mtn|”ƒkak,Âc5‘élfy4ÆF7l±—c2¢+fŽÿJ‚Ÿ%x=ÞB…pØ/@{¬K¤Ë€‡#BÁ43Åsíôfšh)XÆœ‹¿€L'Š ¤ ÀUôt0´ÞñVzüw«Á1ä>¹´XÃвcô 3?;7—åË—sñ%—pÅ•œOÿ0†=°&޶Ö:Þ¸ÿ7¤¯éÀ¤³cŸÚÇ<{‚?Õ‰ï%¤™œ´Æ»YÔßDµ.›ZC„{ãµìHz˜éXÊ\óT\ŠŸ¼¸œ’î'¤ó «Ò1ár;=…•”^¾J¸ÃÐà, ÕrÖ`ÇŽ<ÿ‡?òâ /¨ÉA䜴œƒÖr|2òK1•_Æ1å~õÌê÷ƒl|øtÞgEsO~ö$Ê3»½&—™yeÃÉîB M±6ûz(Ñ;…è›Ù¬óòãä{xt ó­5L1àŒGÈ®EQ"J~ J$죳Ì÷ªb*¯ÿ>“Š' ÖK³F°²g‚Á8mâù ×>»†W^~™ææfÚÛÛÕ™øSsþJÊÄ— °ä4«Ì°\TT¤fÛ^=ãÉ^†ã+Ÿ*}î¶ýø1¬ÝÔ̱³á¹ –#Ùnáh¤ƒ…ùXIŒ4˜ôEX<ÿz3çϼŽt?M&MÎ!†¶•L‹%ç±7¬ÿ3ëÖ­SMà¶ö6úzûÔ¸~¶ôtÕe8›:Á§AM‡>½7ny£ò(,,äk+WR^Q¡ºCCÇF>ËÀ#AGï1Ö¼DöÝå×s8#AÚ,…*«…èþ o¸…À¥!Óà AébË@-ëu=L³Îd©i"yán\Á~Jô E³l¸K?™²konÏØÁë|W@€sk3ioذ½{ö¨9wíÜɡƃD¢QÌ2‘Æû±õÏÖ"Z9G/ë!CqÉðå55ó˜P6§ÃÉeK—ŠN_~¦‹9lüïü59¿ÝDšxƒ7Íò9N¬í^{¯ŸŒž<ìié´$¼ŒòGYo±Â~)s E¢]˜…Ø,~JªMdϰqØUÆø‹oÂå*lË“¼ `8å<›ù°6lQcìQ½·oonÛ¦¦AD"ƒ9?ÜSœ#À3u|Ô¹O†”Oš .šºVê--ÏŸ *çp:E‡¯Q“žfeebw8¨ª¬RÓ =çpÊt¶Ðãîæè=Ob{jý ?ök”8Øü¦ó3Ùæ ê>¦F’DEU¿«{ƒú4®s.`¹Øýl±~’F/¦‰ ñ©:<3/aÑço"Ëv<ÑèÉŠ€&çÕžá2ȽíÒu3 Rd’M¿_†í©T~ …éTßÄ)‘PÓW'jx,é^È–šÒZ £=!X^;©F –[šîé‘{Ò32ÔÕŽr§tMŠKŠÕLErÓ\#Å@šô'îšz¿ÎõŽ?¿¥ë­½t¯ÛA_¨ž¹ÅaZöyˆ¼¬0V—A­ÞK´ÿÔ¸ƒ—̾ÇòFg²jQ ƃ’Ûf|0Ž39@0£½åV&Üuó/¼F*‡Åǹœ §¬ç*'ÓÆrÍAkk ÇŽuÐÑ~ ·Û­F>–käà›ìÔŠ:gPÃË0á©OÙie†!Ù®ýñ·ºUtj‡ÃÎh—‹Ò’ ‹ŠT1ø$Nç<ýÙ€ 0Ò.ÚÛ·c ‘=Ûˆ=å£Ìã¤.c€t{œÉ½&ÜVxzAˆ'j³bI «VVsd¯Ž?yÉÚe|W«>À¡Ù˜oÿ:å—.Åü~»Iaÿ¸­èš\À¤ÞÞgËb¬ó½³o/û_[ÿ¾uÌÛg¤Ýª#\!3}ÍQ‚«FóÚ@/÷<ô7~©‚oÜP—B"¯ùpý%Â(·°î¦f`úñ**/ºtðÜwϸhœýœ(©ý<eÊùô¼éŽWÞp€w~÷8Ÿ{j=Ѿ]•f¦;Óéz×Oèê ®pqÇmãÏÛ[ùÑ?ÎäÊe%ô(‚µ+Øv1íì gÎþû¿a3ê?0î2ìrj qº‰7×¹@JÜý^ºú%¶·ws,;)‚‡ü´•Z(Xê¢×æñ?Ö±óÝ.¼ób*§æÑí Ð ”Llí§Ç›GÙ•”Oªî˜þý¶’"0¼`¢šhh|ÖˆNÖ\»ï³Ðïé`jY>úŽ(uÆæYYdæ[É´˜¸ñö×éEøéª*ÊrÀ˜$®OàFèíóÓÜ5йKþ —kôˆçÊüY ‘EÝÛ úÒ¡­¯³ç•Õ,¯Ã¥XØë `˜âÄœe¤¢b4¯?ˆÛîÞJé8'wÜ2 “YG$*×OXq8¡þ°¿îR®¸úËïOÞ ßÐ@Cã4 Ž«ˆÏwvüýáµT#ê 2Ö‚1ÛHùÄ,Zë}ìÚÝÍköqíß”òíoM§½7@wkHM^Š~¿2–ÊY7“ŸïÒ@Cã\B 8ª@ãöÕ”FvãéÒeM’fO£¼2›¦z/Efoloãg¿ÝÍõ×}Žk——‚±¸:}{´ÅOÜz9W^õåÁþ9Ð@Cã4";\kó!šž&-؆G—@g³2¹<‹¦/ù: é6#ÿñè.^BpûßOgÉü1´{C$,IŒi1޹]LœöuÆŽ;ì>ª €†ÆiDÖ|[s-­uo@ìÎÌ(cÇeÓÑ.SŠ cD…É¿~[ ïÔwóŸß[À˜â,º»}ôø}x# ™c¯§¢j‰&ç©Nçõ…ély ×ÈËÑ1Gut»ÃŒvXÈuZ¹ó·èFøæ—§2®ÀNDQ8ÜÞIw¼†Ë–ßDºux9+5ÐÐ8ïw:"Ô¾½†ï&rrÓÈЧ ($”eyìÙÙɯžz—1¬ü»Éè„õàëñrÌ_ÄÌK¾C~þ¨a j ¡q9žÈ$H}íFüîÍädx)ÈqÐéŽPVफ-€Çaõ«É.2óÅkÊHÄ£´ cu-‹.YŽAÿ×MBŸV4ÐÐ8Ã_z ͇h¬}‘’ü.ɹ¸;ȶ˜ØÛàfíÆÃ,ZXÄü.Ž6uÓá«âÚ/݆Ål±};šhhœR±¯/DwÛvÜmÑ'ºÉµÐÅŒtFÚºl}÷Å“3™[M]£ׄ•̨®Œpª×üY 3„îxü…„èv=Ý]ÂÌßâÛ>ÐHº0óíö Þ9àfëžc,_Zˆ9Óι‚¹5«[„O%‘ˆ&g!µ¼Ôïyÿ±·p=äØ4uûˆ+ Š©„ùWÝJnî(ÍÐÐ8ßHÍDèíéàpí&âÞýÄu z›׸‹˜Tu¦ÿßßàÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿñññÿCBDÿ%$'ÿ%$'ÿ('*ÿ¢¡£ÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿ³¨çÿZ(¿ÿ]&yÿS#…ÿO1¸ÿ./4ÿGFIÿôóôÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿwvxÿ%$'ÿ%$'ÿ'&)ÿºº»ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿœ…âÿ_"±ÿb(hÿX&~ÿ`FÑÿ86Gÿ%$'ÿ%$'ÿ}}~ÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÒÑÒÿ%$'ÿ%$'ÿ$#&ÿ›šœÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿ›€Üÿg%¤ÿh*Xÿf)yÿ_JÐÿÛÝñÿ©¨ªÿ$#&ÿ%$'ÿ&%(ÿ×××ÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿkjlÿ%$'ÿ%$'ÿRQTÿýýýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýýýÿÞÙäÿq.ÿ\(Uÿo-†ÿhPÎÿÖÕðÿþþþÿþþþÿ_^`ÿ%$'ÿ%$'ÿrqsÿþþþÿþþþÿþþþÿþþþÿþþþÿïïïÿ('*ÿ%$'ÿ$#&ÿÀÀÁÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüüûÿ­¦žÿf]cÿW&¸ÿ†ßÿðóöÿþþþÿÿÿÿÿÿÿÿÿÎÎÎÿ$#&ÿ%$'ÿ+*-ÿóóóÿþþþÿþþþÿþþþÿþþþÿ³³´ÿ%$'ÿ%$'ÿ;:=ÿýýýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûûûÿ·¶·ÿ°¯°ÿ¸°¥ÿíëòÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿGGIÿ%$'ÿ%$'ÿ¹¹ºÿþþþÿþþþÿþþþÿþþþÿ†…‡ÿ%$'ÿ%$'ÿttvÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿóóóÿüûüÿþþþÿûûûÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‚‚ƒÿ%$'ÿ%$'ÿŒŽÿþþþÿþþþÿþþþÿþþþÿiikÿ%$'ÿ%$'ÿ˜˜™ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¦¦§ÿ%$'ÿ%$'ÿonpÿþþþÿþþþÿþþþÿþþþÿ^]_ÿ%$'ÿ%$'ÿ««¬ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ··¸ÿ%$'ÿ%$'ÿcbdÿþþþÿþþþÿþþþÿþþþÿ`_aÿ%$'ÿ%$'ÿ¡¡¢ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¯¯°ÿ%$'ÿ%$'ÿedfÿþþþÿþþþÿþþþÿþþþÿvvxÿ%$'ÿ%$'ÿ†…‡ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ””•ÿ%$'ÿ%$'ÿ}|~ÿþþþÿþþþÿþþþÿþþþÿ™™šÿ%$'ÿ%$'ÿUTVÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿbadÿ%$'ÿ%$'ÿ¡ ¡ÿþþþÿþþþÿþþþÿþþþÿÑÐÑÿ$#&ÿ%$'ÿ&%(ÿäääÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿîîîÿ*),ÿ%$'ÿ$#&ÿØØØÿþþþÿþþþÿþþþÿþþþÿýýýÿ@?Bÿ%$'ÿ%$'ÿ‚ƒÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ%$'ÿ%$'ÿFFHÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ››œÿ%$'ÿ%$'ÿ((*ÿÖÖÖÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿàßàÿ-,/ÿ%$'ÿ%$'ÿ¢¡£ÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿõõõÿ<<>ÿ%$'ÿ%$'ÿDCFÿîîïÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿóóôÿMLNÿ%$'ÿ%$'ÿA@Bÿøøøÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ¾¾¿ÿ%$'ÿ%$'ÿ%$'ÿMLNÿèèèÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿííîÿUTWÿ%$'ÿ%$'ÿ%$'ÿÄÃÄÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿŽÿ$#&ÿ%$'ÿ%$'ÿ769ÿ¶¶·ÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾¾¿ÿ=<>ÿ%$'ÿ%$'ÿ$#&ÿ““”ÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿýýýÿƒ‚„ÿ$#&ÿ%$'ÿ%$'ÿ$#&ÿPORÿ¨¨©ÿèèéÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿìììÿ¬¬­ÿVUXÿ$#&ÿ%$'ÿ%$'ÿ$#&ÿ……‡ÿýýýÿþþþÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ  ¡ÿ*),ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ$#&ÿ88:ÿNMPÿONQÿ:9<ÿ$#&ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ+*,ÿ££¤ÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿÚÚÛÿ`_bÿ$#&ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ$#&ÿbacÿÛÛÛÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿÒÒÒÿ}}~ÿ=<>ÿ#"%ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ$#&ÿ>=@ÿ~€ÿÓÓÓÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿçççÿÆÅÆÿµ´µÿµ´µÿÆÆÇÿèèèÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ(0 þþþÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýþýÿëòõÿùûûÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿýýýÿþþþÿþþþÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÄßìÿq®Äÿ÷ùùÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿñññÿ·¶·ÿŒŽÿwvxÿxwyÿŽÿ¹¹ºÿóóóÿþþþÿþþþÿþþþÿµ­çÿT@¬ÿ»Åæÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿæææÿzy{ÿ,+.ÿ%$'ÿ$#&ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ-,/ÿ}}~ÿççèÿª™Ôÿ[(‰ÿyaÀÿýþýÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿýýýÿ²²³ÿ0/2ÿ%$'ÿ%$'ÿ('*ÿONQÿkjlÿlkmÿQPSÿ)(+ÿ%$'ÿ%$'ÿD7…ÿ[$ÿ`5¢ÿßßòÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿ¡¡¢ÿ&%(ÿ$#&ÿ213ÿ˜—™ÿíííÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïïïÿœ›ÿC4‚ÿ[&–ÿU$’ÿ‰»ÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ¿¿Àÿ&%(ÿ%$'ÿQPRÿæææÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿöõüÿ‹oØÿ]%‘ÿT#‰ÿF5Šÿ'&)ÿÃÃÄÿþþþÿþþþÿþþþÿþþþÿþþþÿôôõÿ;:=ÿ%$'ÿIHJÿññòÿþþþÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿöôûÿYÏÿi)yÿ\'€ÿˆ|ÛÿSRUÿ%$'ÿ>=@ÿöööÿþþþÿþþþÿþþþÿþþþÿœœÿ%$'ÿ'&)ÿÕÕÖÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûûûÿ§ˆÈÿg)kÿg,„ÿŠ}ÙÿùûüÿÝÝÝÿ*),ÿ%$'ÿ¡¡¢ÿþþþÿþþþÿþþþÿþþþÿJILÿ%$'ÿnmoÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿìëêÿ{toÿ{[³ÿ³²éÿýýýÿÿÿÿÿÿÿÿÿxwyÿ%$'ÿONQÿýýýÿþþþÿþþþÿéééÿ%$'ÿ%$'ÿ¹¹ºÿÿÿÿÿÿÿÿÿþþþÿÿÿÿÿÿÿÿÿþþþÿöööÿÌËÌÿæäáÿöõõÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÃÃÄÿ$#&ÿ&%(ÿîíîÿþþþÿþþþÿÈÇÈÿ$#&ÿ$#&ÿåååÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïïïÿ$#&ÿ%$'ÿÌÌÌÿþþþÿþþþÿ¼¼½ÿ$#&ÿ%$'ÿöööÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿûûûÿ)(+ÿ%$'ÿÀ¿ÀÿþþþÿþþþÿÅÄÅÿ$#&ÿ$#&ÿææçÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿñññÿ%$'ÿ$#&ÿÉÉÉÿþþþÿþþþÿäääÿ$#&ÿ%$'ÿ¼¼½ÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÇÆÇÿ$#&ÿ%$'ÿéééÿþþþÿþþþÿýýýÿBADÿ$#&ÿsrtÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿ}|~ÿ%$'ÿGFHÿþþþÿþþþÿþþþÿýýýÿ‘ÿ$#&ÿ)(+ÿÛÛÜÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿââãÿ,+.ÿ$$&ÿ••–ÿþþþÿþþþÿþþþÿþþþÿíííÿ214ÿ%$'ÿONQÿõõöÿþþþÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿøøøÿWVXÿ%$'ÿ436ÿðððÿþþþÿþþþÿþþþÿýýýÿýýýÿ¬¬­ÿ%$'ÿ$#&ÿYXZÿìììÿþþþÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿÿÿÿÿðððÿ`_aÿ%$'ÿ%$'ÿ±°±ÿþþþÿþþþÿþþþÿþþþÿýýýÿýýýÿýýýÿ‡‡‰ÿ$#&ÿ$#&ÿ87:ÿ¤¤¥ÿôôôÿþþþÿþþþÿÿÿÿÿÿÿÿÿöööÿ©©ªÿ;;=ÿ%$'ÿ$#&ÿŠŠ‹ÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿýýýÿ˜˜™ÿ('*ÿ$#&ÿ$#&ÿ-,/ÿ[Z]ÿxxyÿyxzÿ]]_ÿ/.1ÿ%$'ÿ%$'ÿ('*ÿšš›ÿýýýÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÔÓÔÿ_^aÿ%$'ÿ$#&ÿ$#&ÿ$#&ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ``bÿÔÔÕÿþþþÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿÝÝÞÿœÿsrtÿ\[]ÿ\[^ÿsstÿžÿÞÞÞÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿýýýÿþþþÿþþþÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿýýýÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿAAAAAAAAAAAAAAAAAAAAAAAA(  þþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿùûüÿÑãêÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿøøøÿÇÆÇÿ§§¨ÿ¨§¨ÿÈÈÉÿùùùÿþþþÿõóûÿ†…ÍÿÂÓæÿþþþÿþþþÿþþþÿþþþÿúúúÿ™˜™ÿ547ÿ%$'ÿ%$'ÿ%$'ÿ%$'ÿ658ÿ››¤ÿZ±ÿbºÿþþþÿþþþÿþþþÿþþþÿöööÿ_^`ÿ$#&ÿ^]_ÿ·¶·ÿáááÿâââÿ¹¸¹ÿ^]hÿM*ÿW*ÿßÞîÿþþþÿþþþÿþþþÿþþþÿtsuÿ%$'ÿ¡ ¡ÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿæà÷ÿtG°ÿZ-“ÿ6.VÿwvxÿþþþÿþþþÿþþþÿÎÎÏÿ%$'ÿ„ƒ…ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿöõ÷ÿt?™ÿi4‰ÿÄ¿ìÿ‹ŠŒÿ%$'ÿÑÑÑÿþþþÿþþþÿ|{}ÿ*),ÿïîïÿÿÿÿÿÿÿÿÿÿÿÿÿþþþÿÄÁÀÿ™‡¬ÿÝÜõÿþþþÿòòòÿ-,/ÿ~€ÿþþþÿþþþÿNMPÿUUWÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüüüÿþþþÿþþþÿÿÿÿÿÿÿÿÿÿÿÿÿ\\^ÿQPSÿþþþÿþþþÿBACÿeegÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿlkmÿDCFÿþþþÿþþþÿVUXÿIHKÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿPOQÿZY[ÿþþþÿþþþÿŒŒÿ%$'ÿÙÙÙÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿßÞßÿ&%(ÿ‘ÿþþþÿþþþÿãããÿ**,ÿZY[ÿúúûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿüüüÿ__aÿ,+-ÿæææÿþþþÿþþþÿþþþÿœ›ÿ$#&ÿdcfÿìììÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿîîïÿihjÿ$#&ÿžžŸÿþþþÿþþþÿþþþÿþþþÿýýýÿ‘‘’ÿ&%(ÿ/.1ÿvvwÿ¡ ¢ÿ¢¡¢ÿxxyÿ103ÿ&%(ÿ“’”ÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿÎÎÎÿfegÿ*),ÿ%$'ÿ%$'ÿ+*-ÿgfhÿÎÎÎÿþþþÿþþþÿÿÿÿÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿøøøÿÝÝÞÿÞÝÞÿøøøÿþþþÿþþþÿþþþÿþþþÿþþþÿþþþÿ¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬A¬Aqpidc-0.16/RELEASE_NOTES0000664000076400007640000000062111472553406015115 0ustar00jrossjross00000000000000Apache Qpid C++ 0.8 Release Notes -------------------------------- The Qpid 0.8 release of the c++ client and broker support the 0-10 version of the AMQP specification. You can access this specification from: http://www.amqp.org/confluence/display/AMQP/AMQP+Specification Please take time to go through the README file provided with the distro to get a good understanding about build system etc. qpidc-0.16/xml/0000775000076400007640000000000011752725673013753 5ustar00jrossjross00000000000000qpidc-0.16/xml/cluster.xml0000664000076400007640000003103411667435470016155 0ustar00jrossjross00000000000000 Qpid extension class to allow clustered brokers to communicate. > qpidc-0.16/INSTALL-WINDOWS0000664000076400007640000001403011530520730015307 0ustar00jrossjross00000000000000 Installing Qpid/C++ on Windows ============================== Table of Contents ================= 1. Introduction 2. Prerequisites 2.1. What to Install 2.2. Important Environment Variable Settings 3. Building from a Source Distribution 4. Building a Repository Working Copy 5. Tests 6. Doxygen 7. Troubleshooting 1. Introduction =============== Note that the broker and client API can be built and installed separately. They both link against a common library. This document describes how to build the Qpid/C++ broker and client on Windows using Microsoft Visual Studio 2008 (VC9). It describes how to build from both a checkout of the source and from a source distribution. Please see INSTALL for information on building on Linux/UNIX. 2. Prerequisites ================ We prefer to avoid spending time accommodating older versions of these packages, so please make sure that you have the latest stable versions. Known version numbers for a successful build are given in parentheses. Take these as a recommended minimum version. 2.1. What to Install ==================== The following libraries and header files must be installed to build from either a source checkout or a source distribution: * boost (1.35)(*) earlier versions of boost e.g. 1.33 also work To build from a source repository (SVN) checkout you will need boost plus: * CMake (2.4) * python (2.5.2) * ruby (1.8.4) Regardless of which type of build you perform, if you wish to run the full test suite, you will need to have python, listed above, installed. 2.2. Important Environment Variable Settings ============================================ Ensure that all the build tools are available on your path, when they are manually installed to non-standard locations. For example: # set PATH=C:\python25;%PATH% It is also necessary to set BOOST_ROOT to refer to the base of your Boost installation. The Visual Studio projects refer to it. For example: # set BOOST_ROOT="C:\Program Files\boost\boost_1_35_0" 3. Building from a Source Distribution ====================================== The Qpid client/broker, examples, and tests are built with a single Visual Studio solution file which is generated by CMake. From a command prompt: # cd qpid\cpp # cmake -i -G "Visual Studio 9 2008" . Output from CMake includes .h files in the include directory, .vcproj files for executables and dlls, and the qpid-cpp.sln solution file. Open the qpid-cpp.sln solution, select Debug or Release, and build. You can build both Release and Debug from the same project. If you build all the projects you can then "Build" the RUN_TESTS project. This will run the test suite against the Qpid version just built. 4. Building a Repository Working Copy ===================================== This section will assume that you will create a directory for your Qpid work. This directory will be referred to below as C:\qpid. To get the source code from the subversion repository (trunk) do: C:\qpid> svn checkout https://svn.apache.org/repos/asf/qpid/trunk The first step in the build is to configure and generate the Visual Studio projects. This step also generates a significant number of source files that are part of the build. - Run CMakeSetup. The CMake binary install often leaves a shortcut to CMakeSetup on the desktop - it is named CMake. - The CMakeSetup window has 2 directory selection areas at the top; one for where the source is located (C:\qpid\trunk\qpid\cpp) and one for where you wish to place the build. A directory separate from the source directory is generally preferred; it can be, but need not be, a subdirectory to the source. (C:\qpid\build) - The first time you run CMakeSetup it will ask you to select a generator. You should select the method you prefer to build with: Visual Studio 2008 or NMake Makefiles. - The Cache Values area of the window is where the system and build settings are displayed. You can change these by clicking on the values if desired. - Click the Configure button. The first time Qpid is configured this step may take a few minutes and you will see lots of messages about generated source files. If the Cache Values area has any red lines, change or correct the value if needed (it may only be red because it's new - you only need to change/correct items that correspond to errors in configuration). Click Configure again. Repeat until all the Cache Values are gray. - Click the OK button to generate the project/make files. Open the qpid-cpp.sln solution located in the build directory, select Debug or Release, and build. You can build both Release and Debug from the same project. If you build all the projects you can then "Build" the RUN_TESTS project. This will run the test suite against the Qpid version just built. 5. Tests ======== See src/tests/README.txt for details. 6. Doxygen ========== Doxygen generates documentation in several formats from source code using special comments. You can use javadoc style comments if you know javadoc, if you don't or want to know the fully story on doxygen markup see http://www.stack.nl/~dimitri/doxygen/ Even even if the code is completely uncommented, doxygen generates UML-esque dependency diagrams that are ''extremely'' useful in navigating around the code, especially for newcomers. The user-level API documentation can be generated by building the user-api-docs project from the generated Visual Studio solution. The documentation is generated into the docs/api/html directory under your build directory. 7. Troubleshooting ================== When the broker is executed it will try to store a file in the "qpidd" subdirectory of the current user's temporary file directory, or in C:\WINDOWS\TEMP. If the qpidd directory can't be created or accessed the broker startup will fail. qpidc-0.16/bindings/0000775000076400007640000000000011752725673014750 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf2/0000775000076400007640000000000011752725722015610 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf2/Makefile.in0000664000076400007640000004537511752725661017675 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_RUBY_DEVEL_TRUE@@HAVE_SWIG_TRUE@am__append_1 = ruby @HAVE_PYTHON_DEVEL_TRUE@@HAVE_SWIG_TRUE@am__append_2 = python subdir = bindings/qmf2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = examples/cpp ruby python DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_SWIG_TRUE@EXTRA_DIST = CMakeLists.txt qmf2.i @HAVE_SWIG_TRUE@SUBDIRS = examples/cpp $(am__append_1) $(am__append_2) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qmf2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qmf2/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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): @fail= 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; \ ($(am__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" $(RECURSIVE_CLEAN_TARGETS): @fail= 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: qpidc-0.16/bindings/qmf2/Makefile.am0000664000076400007640000000167511656043025017645 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if HAVE_SWIG EXTRA_DIST = CMakeLists.txt qmf2.i SUBDIRS = examples/cpp if HAVE_RUBY_DEVEL SUBDIRS += ruby endif if HAVE_PYTHON_DEVEL SUBDIRS += python endif endif qpidc-0.16/bindings/qmf2/examples/0000775000076400007640000000000011752725722017426 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf2/examples/cpp/0000775000076400007640000000000011752725722020210 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf2/examples/cpp/Makefile.in0000664000076400007640000004431611752725661022267 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = agent$(EXEEXT) event_driven_list_agents$(EXEEXT) \ list_agents$(EXEEXT) print_events$(EXEEXT) subdir = bindings/qmf2/examples/cpp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_agent_OBJECTS = agent.$(OBJEXT) agent_OBJECTS = $(am_agent_OBJECTS) agent_DEPENDENCIES = $(top_builddir)/src/libqmf2.la am_event_driven_list_agents_OBJECTS = \ event_driven_list_agents.$(OBJEXT) event_driven_list_agents_OBJECTS = \ $(am_event_driven_list_agents_OBJECTS) event_driven_list_agents_DEPENDENCIES = \ $(top_builddir)/src/libqmf2.la am_list_agents_OBJECTS = list_agents.$(OBJEXT) list_agents_OBJECTS = $(am_list_agents_OBJECTS) list_agents_DEPENDENCIES = $(top_builddir)/src/libqmf2.la am_print_events_OBJECTS = print_events.$(OBJEXT) print_events_OBJECTS = $(am_print_events_OBJECTS) print_events_DEPENDENCIES = $(top_builddir)/src/libqmf2.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(agent_SOURCES) $(event_driven_list_agents_SOURCES) \ $(list_agents_SOURCES) $(print_events_SOURCES) DIST_SOURCES = $(agent_SOURCES) $(event_driven_list_agents_SOURCES) \ $(list_agents_SOURCES) $(print_events_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDE = -I$(top_srcdir)/include AM_CPPFLAGS = $(INCLUDE) agent_SOURCES = agent.cpp agent_LDADD = $(top_builddir)/src/libqmf2.la list_agents_SOURCES = list_agents.cpp list_agents_LDADD = $(top_builddir)/src/libqmf2.la event_driven_list_agents_SOURCES = event_driven_list_agents.cpp event_driven_list_agents_LDADD = $(top_builddir)/src/libqmf2.la print_events_SOURCES = print_events.cpp print_events_LDADD = $(top_builddir)/src/libqmf2.la 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qmf2/examples/cpp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qmf2/examples/cpp/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 $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list agent$(EXEEXT): $(agent_OBJECTS) $(agent_DEPENDENCIES) @rm -f agent$(EXEEXT) $(CXXLINK) $(agent_OBJECTS) $(agent_LDADD) $(LIBS) event_driven_list_agents$(EXEEXT): $(event_driven_list_agents_OBJECTS) $(event_driven_list_agents_DEPENDENCIES) @rm -f event_driven_list_agents$(EXEEXT) $(CXXLINK) $(event_driven_list_agents_OBJECTS) $(event_driven_list_agents_LDADD) $(LIBS) list_agents$(EXEEXT): $(list_agents_OBJECTS) $(list_agents_DEPENDENCIES) @rm -f list_agents$(EXEEXT) $(CXXLINK) $(list_agents_OBJECTS) $(list_agents_LDADD) $(LIBS) print_events$(EXEEXT): $(print_events_OBJECTS) $(print_events_DEPENDENCIES) @rm -f print_events$(EXEEXT) $(CXXLINK) $(print_events_OBJECTS) $(print_events_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/event_driven_list_agents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list_agents.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_events.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: qpidc-0.16/bindings/qmf2/examples/cpp/Makefile.am0000664000076400007640000000241311633730116022233 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # INCLUDE = -I$(top_srcdir)/include AM_CPPFLAGS = $(INCLUDE) noinst_PROGRAMS=agent event_driven_list_agents list_agents print_events agent_SOURCES=agent.cpp agent_LDADD=$(top_builddir)/src/libqmf2.la list_agents_SOURCES=list_agents.cpp list_agents_LDADD=$(top_builddir)/src/libqmf2.la event_driven_list_agents_SOURCES=event_driven_list_agents.cpp event_driven_list_agents_LDADD=$(top_builddir)/src/libqmf2.la print_events_SOURCES=print_events.cpp print_events_LDADD=$(top_builddir)/src/libqmf2.la qpidc-0.16/bindings/qmf2/examples/cpp/list_agents.cpp0000664000076400007640000000452011467052422023222 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include #include using namespace std; using namespace qmf; using qpid::types::Variant; using qpid::messaging::Duration; int main(int argc, char** argv) { string url("localhost"); string connectionOptions; string sessionOptions; if (argc > 1) url = argv[1]; if (argc > 2) connectionOptions = argv[2]; if (argc > 3) sessionOptions = argv[3]; qpid::messaging::Connection connection(url, connectionOptions); connection.open(); ConsoleSession session(connection, sessionOptions); session.open(); session.setAgentFilter(""); while (true) { ConsoleEvent event; if (session.nextEvent(event)) { if (event.getType() == CONSOLE_AGENT_ADD) { string extra; if (event.getAgent().getName() == session.getConnectedBrokerAgent().getName()) extra = " [Connected Broker]"; cout << "Agent Added: " << event.getAgent().getName() << extra << endl; } if (event.getType() == CONSOLE_AGENT_DEL) { if (event.getAgentDelReason() == AGENT_DEL_AGED) cout << "Agent Aged: " << event.getAgent().getName() << endl; else cout << "Agent Filtered: " << event.getAgent().getName() << endl; } } } } qpidc-0.16/bindings/qmf2/examples/cpp/event_driven_list_agents.cpp0000664000076400007640000000733411633730116025776 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include #include #include "qmf/posix/EventNotifier.h" #include #include using namespace std; using namespace qmf; using qpid::types::Variant; using qpid::messaging::Duration; int main(int argc, char** argv) { string url("localhost"); string connectionOptions; string sessionOptions; if (argc > 1) url = argv[1]; if (argc > 2) connectionOptions = argv[2]; if (argc > 3) sessionOptions = argv[3]; qpid::messaging::Connection connection(url, connectionOptions); connection.open(); ConsoleSession session(connection, sessionOptions); session.open(); session.setAgentFilter(""); posix::EventNotifier notifier(session); int fd(notifier.getHandle()); time_t lastUpdate; bool ftl = false; time(&lastUpdate); while (true) { fd_set rfds; struct timeval tv; int nfds, retval; FD_ZERO(&rfds); FD_SET(fd, &rfds); nfds = fd + 1; tv.tv_sec = 10; tv.tv_usec = 0; retval = select(nfds, &rfds, NULL, NULL, &tv); if (retval > 0 && FD_ISSET(fd, &rfds)) { ConsoleEvent event; while (session.nextEvent(event, Duration::IMMEDIATE)) { string eventType = ""; switch(event.getType()) { case CONSOLE_AGENT_ADD: eventType = "Added"; break; case CONSOLE_AGENT_DEL: eventType = "Deleted"; break; case CONSOLE_AGENT_RESTART: eventType = "Restarted"; break; case CONSOLE_AGENT_SCHEMA_UPDATE: eventType = "Schema Updated"; break; case CONSOLE_AGENT_SCHEMA_RESPONSE: eventType = "Schema Response"; break; case CONSOLE_EVENT: eventType = "Event"; break; case CONSOLE_QUERY_RESPONSE: eventType = "Query Response"; break; case CONSOLE_METHOD_RESPONSE: eventType = "Method Response"; break; case CONSOLE_EXCEPTION: eventType = "Exception"; break; case CONSOLE_SUBSCRIBE_ADD: eventType = "Subscription Added"; break; case CONSOLE_SUBSCRIBE_UPDATE: eventType = "Subscription Updated"; break; case CONSOLE_SUBSCRIBE_DEL: eventType = "Subscription Deleted" ; break; case CONSOLE_THREAD_FAILED: eventType = "Thread Failure"; break; default: eventType = "[UNDEFINED]"; } cout << "Agent " << eventType << ": " << event.getAgent().getName() << endl; } } else { cout << "No message received within waiting period." << endl; } } } qpidc-0.16/bindings/qmf2/examples/cpp/agent.cpp0000664000076400007640000001763311522413351022007 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace qmf; using qpid::types::Variant; using qpid::messaging::Duration; class ExampleAgent { public: ExampleAgent(const string& url); ~ExampleAgent(); void setupSchema(); void populateData(); void run(); private: qpid::messaging::Connection connection; AgentSession session; Schema sch_exception; Schema sch_control; Schema sch_child; Schema sch_event; Data control; DataAddr controlAddr; bool method(AgentEvent& event); }; ExampleAgent::ExampleAgent(const string& url) { // // Create and open a messaging connection to a broker. // connection = qpid::messaging::Connection(url, "{reconnect:True}"); connection.open(); // // Create, configure, and open a QMFv2 agent session using the connection. // session = AgentSession(connection, "{interval:30}"); session.setVendor("profitron.com"); session.setProduct("gizmo"); session.setAttribute("attr1", 2000); session.open(); } ExampleAgent::~ExampleAgent() { // // Clean up the QMF session and the AMQP connection. // session.close(); connection.close(); } void ExampleAgent::setupSchema() { // // Create and register schema for this agent. // string package("com.profitron.gizmo"); // // Declare a schema for a structured exception that can be used in failed // method invocations. // sch_exception = Schema(SCHEMA_TYPE_DATA, package, "exception"); sch_exception.addProperty(SchemaProperty("whatHappened", SCHEMA_DATA_STRING)); sch_exception.addProperty(SchemaProperty("howBad", SCHEMA_DATA_INT)); sch_exception.addProperty(SchemaProperty("details", SCHEMA_DATA_MAP)); // // Declare a control object to test methods against. // sch_control = Schema(SCHEMA_TYPE_DATA, package, "control"); sch_control.addProperty(SchemaProperty("state", SCHEMA_DATA_STRING)); sch_control.addProperty(SchemaProperty("methodCount", SCHEMA_DATA_INT)); SchemaMethod stopMethod("stop", "{desc:'Stop Agent'}"); stopMethod.addArgument(SchemaProperty("message", SCHEMA_DATA_STRING)); sch_control.addMethod(stopMethod); SchemaMethod echoMethod("echo", "{desc:'Echo Arguments'}"); echoMethod.addArgument(SchemaProperty("sequence", SCHEMA_DATA_INT, "{dir:INOUT}")); echoMethod.addArgument(SchemaProperty("map", SCHEMA_DATA_MAP, "{dir:INOUT}")); sch_control.addMethod(echoMethod); SchemaMethod eventMethod("event", "{desc:'Raise an Event'}"); eventMethod.addArgument(SchemaProperty("text", SCHEMA_DATA_STRING, "{dir:IN}")); eventMethod.addArgument(SchemaProperty("severity", SCHEMA_DATA_INT, "{dir:IN}")); sch_control.addMethod(eventMethod); SchemaMethod failMethod("fail", "{desc:'Expected to Fail'}"); failMethod.addArgument(SchemaProperty("useString", SCHEMA_DATA_BOOL, "{dir:IN}")); failMethod.addArgument(SchemaProperty("stringVal", SCHEMA_DATA_STRING, "{dir:IN}")); failMethod.addArgument(SchemaProperty("details", SCHEMA_DATA_MAP, "{dir:IN}")); sch_control.addMethod(failMethod); SchemaMethod createMethod("create_child", "{desc:'Create Child Object'}"); createMethod.addArgument(SchemaProperty("name", SCHEMA_DATA_STRING, "{dir:IN}")); createMethod.addArgument(SchemaProperty("childAddr", SCHEMA_DATA_MAP, "{dir:OUT}")); sch_control.addMethod(createMethod); // // Declare the child class // sch_child = Schema(SCHEMA_TYPE_DATA, package, "child"); sch_child.addProperty(SchemaProperty("name", SCHEMA_DATA_STRING)); // // Declare the event class // sch_event = Schema(SCHEMA_TYPE_EVENT, package, "event"); sch_event.addProperty(SchemaProperty("text", SCHEMA_DATA_STRING)); // // Register our schemata with the agent session. // session.registerSchema(sch_exception); session.registerSchema(sch_control); session.registerSchema(sch_child); session.registerSchema(sch_event); } void ExampleAgent::populateData() { // // Create a control object and give it to the agent session to manage. // control = Data(sch_control); control.setProperty("state", "OPERATIONAL"); control.setProperty("methodCount", 0); controlAddr = session.addData(control, "singleton"); } void ExampleAgent::run() { AgentEvent event; bool running(true); while (running) { bool valid(session.nextEvent(event, Duration::SECOND)); if (valid && running) { switch (event.getType()) { case AGENT_METHOD: running = method(event); break; } } } } bool ExampleAgent::method(AgentEvent& event) { const string& name(event.getMethodName()); control.setProperty("methodCount", control.getProperty("methodCount").asUint32() + 1); try { if (controlAddr == event.getDataAddr()) { if (name == "stop") { cout << "Stopping: message=" << event.getArguments()["message"] << endl; session.methodSuccess(event); return false; } if (name == "echo") { event.addReturnArgument("sequence", event.getArguments()["sequence"]); event.addReturnArgument("map", event.getArguments()["map"]); session.methodSuccess(event); return true; } if (name == "event") { Data ev(sch_event); ev.setProperty("text", event.getArguments()["text"]); session.raiseEvent(ev, event.getArguments()["severity"]); session.methodSuccess(event); return true; } if (name == "fail") { if (event.getArguments()["useString"]) session.raiseException(event, event.getArguments()["stringVal"]); else { Data ex(sch_exception); ex.setProperty("whatHappened", "It Failed"); ex.setProperty("howBad", 75); ex.setProperty("details", event.getArguments()["details"]); session.raiseException(event, ex); } } if (name == "create_child") { const string& name(event.getArguments()["name"]); Data child(sch_child); child.setProperty("name", name); DataAddr addr(session.addData(child, name)); event.addReturnArgument("childAddr", addr.asMap()); session.methodSuccess(event); } } } catch (const exception& e) { // // Pass the exception on to the caller. // session.raiseException(event, e.what()); } return true; } int main() { ExampleAgent agent("localhost"); agent.setupSchema(); agent.populateData(); agent.run(); } qpidc-0.16/bindings/qmf2/examples/cpp/print_events.cpp0000664000076400007640000000370011525133577023433 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include #include using namespace std; using namespace qmf; using qpid::types::Variant; using qpid::messaging::Duration; int main(int argc, char** argv) { string url("localhost"); string connectionOptions; string sessionOptions; if (argc > 1) url = argv[1]; if (argc > 2) connectionOptions = argv[2]; if (argc > 3) sessionOptions = argv[3]; qpid::messaging::Connection connection(url, connectionOptions); connection.open(); ConsoleSession session(connection, sessionOptions); session.open(); while (true) { ConsoleEvent event; if (session.nextEvent(event)) { if (event.getType() == CONSOLE_EVENT) { const Data& data(event.getData(0)); cout << "Event: timestamp=" << event.getTimestamp() << " severity=" << event.getSeverity() << " content=" << data.getProperties() << endl; } } } } qpidc-0.16/bindings/qmf2/python/0000775000076400007640000000000011752725722017131 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf2/python/Makefile.in0000664000076400007640000005574711752725661021222 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings/qmf2/python DIST_COMMON = $(am__cqpid_PYTHON_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pylibdir)" "$(DESTDIR)$(cqpiddir)" LTLIBRARIES = $(pylib_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_PYTHON_DEVEL_TRUE@_cqmf2_la_DEPENDENCIES = \ @HAVE_PYTHON_DEVEL_TRUE@ $(am__DEPENDENCIES_1) \ @HAVE_PYTHON_DEVEL_TRUE@ $(top_builddir)/src/libqmf2.la @HAVE_PYTHON_DEVEL_TRUE@nodist__cqmf2_la_OBJECTS = _cqmf2_la-cqmf2.lo _cqmf2_la_OBJECTS = $(nodist__cqmf2_la_OBJECTS) _cqmf2_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(_cqmf2_la_CXXFLAGS) \ $(CXXFLAGS) $(_cqmf2_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_PYTHON_DEVEL_TRUE@am__cqmf2_la_rpath = -rpath $(pylibdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist__cqmf2_la_SOURCES) DIST_SOURCES = am__cqpid_PYTHON_DIST = qmf2.py cqmf2.py py_compile = $(top_srcdir)/build-aux/py-compile ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_PYTHON_DEVEL_TRUE@INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src $(QMF_INCLUDES) @HAVE_PYTHON_DEVEL_TRUE@generated_file_list = \ @HAVE_PYTHON_DEVEL_TRUE@ cqmf2.cpp \ @HAVE_PYTHON_DEVEL_TRUE@ cqmf2.py @HAVE_PYTHON_DEVEL_TRUE@EXTRA_DIST = CMakeLists.txt python.i @HAVE_PYTHON_DEVEL_TRUE@BUILT_SOURCES = $(generated_file_list) @HAVE_PYTHON_DEVEL_TRUE@SWIG_FLAGS = -w362,401 @HAVE_PYTHON_DEVEL_TRUE@pylibdir = $(pyexecdir) @HAVE_PYTHON_DEVEL_TRUE@pylib_LTLIBRARIES = _cqmf2.la @HAVE_PYTHON_DEVEL_TRUE@cqpiddir = $(pythondir) @HAVE_PYTHON_DEVEL_TRUE@cqpid_PYTHON = qmf2.py cqmf2.py @HAVE_PYTHON_DEVEL_TRUE@_cqmf2_la_LDFLAGS = -avoid-version -module -shared @HAVE_PYTHON_DEVEL_TRUE@_cqmf2_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs $(top_builddir)/src/libqmf2.la @HAVE_PYTHON_DEVEL_TRUE@_cqmf2_la_CXXFLAGS = $(INCLUDES) -I$(srcdir)/qmf $(PYTHON_CFLAGS) -fno-strict-aliasing @HAVE_PYTHON_DEVEL_TRUE@nodist__cqmf2_la_SOURCES = cqmf2.cpp @HAVE_PYTHON_DEVEL_TRUE@CLEANFILES = $(generated_file_list) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qmf2/python/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qmf2/python/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 $(am__aclocal_m4_deps): install-pylibLTLIBRARIES: $(pylib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pylibdir)" || $(MKDIR_P) "$(DESTDIR)$(pylibdir)" @list='$(pylib_LTLIBRARIES)'; test -n "$(pylibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pylibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pylibdir)"; \ } uninstall-pylibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pylib_LTLIBRARIES)'; test -n "$(pylibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pylibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pylibdir)/$$f"; \ done clean-pylibLTLIBRARIES: -test -z "$(pylib_LTLIBRARIES)" || rm -f $(pylib_LTLIBRARIES) @list='$(pylib_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 _cqmf2.la: $(_cqmf2_la_OBJECTS) $(_cqmf2_la_DEPENDENCIES) $(_cqmf2_la_LINK) $(am__cqmf2_la_rpath) $(_cqmf2_la_OBJECTS) $(_cqmf2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_cqmf2_la-cqmf2.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 $@ $< _cqmf2_la-cqmf2.lo: cqmf2.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_cqmf2_la_CXXFLAGS) $(CXXFLAGS) -MT _cqmf2_la-cqmf2.lo -MD -MP -MF $(DEPDIR)/_cqmf2_la-cqmf2.Tpo -c -o _cqmf2_la-cqmf2.lo `test -f 'cqmf2.cpp' || echo '$(srcdir)/'`cqmf2.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/_cqmf2_la-cqmf2.Tpo $(DEPDIR)/_cqmf2_la-cqmf2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cqmf2.cpp' object='_cqmf2_la-cqmf2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_cqmf2_la_CXXFLAGS) $(CXXFLAGS) -c -o _cqmf2_la-cqmf2.lo `test -f 'cqmf2.cpp' || echo '$(srcdir)/'`cqmf2.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-cqpidPYTHON: $(cqpid_PYTHON) @$(NORMAL_INSTALL) test -z "$(cqpiddir)" || $(MKDIR_P) "$(DESTDIR)$(cqpiddir)" @list='$(cqpid_PYTHON)'; dlist=; list2=; test -n "$(cqpiddir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cqpiddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(cqpiddir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(cqpiddir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(cqpiddir)" $$dlist; \ fi; \ else :; fi uninstall-cqpidPYTHON: @$(NORMAL_UNINSTALL) @list='$(cqpid_PYTHON)'; test -n "$(cqpiddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(cqpiddir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(cqpiddir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(cqpiddir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(cqpiddir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(cqpiddir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(cqpiddir)" && rm -f $$fileso ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pylibdir)" "$(DESTDIR)$(cqpiddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-pylibLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-cqpidPYTHON install-pylibLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-cqpidPYTHON uninstall-pylibLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pylibLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-cqpidPYTHON install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-pylibLTLIBRARIES \ 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-cqpidPYTHON uninstall-pylibLTLIBRARIES @HAVE_PYTHON_DEVEL_TRUE@$(generated_file_list): $(srcdir)/python.i $(srcdir)/../qmf2.i $(srcdir)/../../swig_python_typemaps.i @HAVE_PYTHON_DEVEL_TRUE@ $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqmf2.cpp $(srcdir)/python.i # 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: qpidc-0.16/bindings/qmf2/python/Makefile.am0000664000076400007640000000331511656043025021157 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if HAVE_PYTHON_DEVEL INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src $(QMF_INCLUDES) generated_file_list = \ cqmf2.cpp \ cqmf2.py EXTRA_DIST = CMakeLists.txt python.i BUILT_SOURCES = $(generated_file_list) SWIG_FLAGS = -w362,401 $(generated_file_list): $(srcdir)/python.i $(srcdir)/../qmf2.i $(srcdir)/../../swig_python_typemaps.i $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqmf2.cpp $(srcdir)/python.i pylibdir = $(pyexecdir) pylib_LTLIBRARIES = _cqmf2.la cqpiddir = $(pythondir) cqpid_PYTHON = qmf2.py cqmf2.py _cqmf2_la_LDFLAGS = -avoid-version -module -shared _cqmf2_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs $(top_builddir)/src/libqmf2.la _cqmf2_la_CXXFLAGS = $(INCLUDES) -I$(srcdir)/qmf $(PYTHON_CFLAGS) -fno-strict-aliasing nodist__cqmf2_la_SOURCES = cqmf2.cpp CLEANFILES = $(generated_file_list) endif # HAVE_PYTHON_DEVEL qpidc-0.16/bindings/qmf2/python/python.i0000664000076400007640000000236611446224071020622 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %module cqmf2 %include "std_string.i" %include "../../swig_python_typemaps.i" /* Define the general-purpose exception handling */ %exception { std::string error; Py_BEGIN_ALLOW_THREADS; try { $action } catch (qpid::types::Exception& ex) { error = ex.what(); } Py_END_ALLOW_THREADS; if (!error.empty()) { PyErr_SetString(PyExc_RuntimeError, error.c_str()); return NULL; } } %include "../qmf2.i" qpidc-0.16/bindings/qmf2/python/cqmf2.py0000664000076400007640000006366011752725722020526 0ustar00jrossjross00000000000000# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.4 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_cqmf2', [dirname(__file__)]) except ImportError: import _cqmf2 return _cqmf2 if fp is not None: try: _mod = imp.load_module('_cqmf2', fp, pathname, description) finally: fp.close() return _mod _cqmf2 = swig_import_helper() del swig_import_helper else: import _cqmf2 del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0 class Duration(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Duration, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Duration, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqmf2.new_Duration(*args) try: self.this.append(this) except: self.this = this def getMilliseconds(self): return _cqmf2.Duration_getMilliseconds(self) __swig_destroy__ = _cqmf2.delete_Duration __del__ = lambda self : None; Duration_swigregister = _cqmf2.Duration_swigregister Duration_swigregister(Duration) cvar = _cqmf2.cvar Duration.FOREVER = _cqmf2.cvar.Duration_FOREVER Duration.IMMEDIATE = _cqmf2.cvar.Duration_IMMEDIATE Duration.SECOND = _cqmf2.cvar.Duration_SECOND Duration.MINUTE = _cqmf2.cvar.Duration_MINUTE def __eq__(*args): return _cqmf2.__eq__(*args) __eq__ = _cqmf2.__eq__ def __ne__(*args): return _cqmf2.__ne__(*args) __ne__ = _cqmf2.__ne__ class QmfException(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, QmfException, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, QmfException, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqmf2.new_QmfException(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqmf2.delete_QmfException __del__ = lambda self : None; __swig_setmethods__["detail"] = _cqmf2.QmfException_detail_set __swig_getmethods__["detail"] = _cqmf2.QmfException_detail_get if _newclass:detail = _swig_property(_cqmf2.QmfException_detail_get, _cqmf2.QmfException_detail_set) QmfException_swigregister = _cqmf2.QmfException_swigregister QmfException_swigregister(QmfException) def __mul__(*args): return _cqmf2.__mul__(*args) __mul__ = _cqmf2.__mul__ class KeyNotFound(QmfException): __swig_setmethods__ = {} for _s in [QmfException]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) __setattr__ = lambda self, name, value: _swig_setattr(self, KeyNotFound, name, value) __swig_getmethods__ = {} for _s in [QmfException]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, KeyNotFound, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqmf2.new_KeyNotFound(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqmf2.delete_KeyNotFound __del__ = lambda self : None; KeyNotFound_swigregister = _cqmf2.KeyNotFound_swigregister KeyNotFound_swigregister(KeyNotFound) class IndexOutOfRange(QmfException): __swig_setmethods__ = {} for _s in [QmfException]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) __setattr__ = lambda self, name, value: _swig_setattr(self, IndexOutOfRange, name, value) __swig_getmethods__ = {} for _s in [QmfException]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, IndexOutOfRange, name) __repr__ = _swig_repr def __init__(self): this = _cqmf2.new_IndexOutOfRange() try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqmf2.delete_IndexOutOfRange __del__ = lambda self : None; IndexOutOfRange_swigregister = _cqmf2.IndexOutOfRange_swigregister IndexOutOfRange_swigregister(IndexOutOfRange) class OperationTimedOut(QmfException): __swig_setmethods__ = {} for _s in [QmfException]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) __setattr__ = lambda self, name, value: _swig_setattr(self, OperationTimedOut, name, value) __swig_getmethods__ = {} for _s in [QmfException]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, OperationTimedOut, name) __repr__ = _swig_repr def __init__(self): this = _cqmf2.new_OperationTimedOut() try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqmf2.delete_OperationTimedOut __del__ = lambda self : None; OperationTimedOut_swigregister = _cqmf2.OperationTimedOut_swigregister OperationTimedOut_swigregister(OperationTimedOut) AGENT_AUTH_QUERY = _cqmf2.AGENT_AUTH_QUERY AGENT_AUTH_SUBSCRIBE = _cqmf2.AGENT_AUTH_SUBSCRIBE AGENT_QUERY = _cqmf2.AGENT_QUERY AGENT_METHOD = _cqmf2.AGENT_METHOD AGENT_SUBSCRIBE_BEGIN = _cqmf2.AGENT_SUBSCRIBE_BEGIN AGENT_SUBSCRIBE_TOUCH = _cqmf2.AGENT_SUBSCRIBE_TOUCH AGENT_SUBSCRIBE_END = _cqmf2.AGENT_SUBSCRIBE_END AGENT_THREAD_FAILED = _cqmf2.AGENT_THREAD_FAILED class AgentEvent(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, AgentEvent, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, AgentEvent, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqmf2.new_AgentEvent(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqmf2.delete_AgentEvent __del__ = lambda self : None; def getType(self): return _cqmf2.AgentEvent_getType(self) def getUserId(self): return _cqmf2.AgentEvent_getUserId(self) def getQuery(self): return _cqmf2.AgentEvent_getQuery(self) def hasDataAddr(self): return _cqmf2.AgentEvent_hasDataAddr(self) def getDataAddr(self): return _cqmf2.AgentEvent_getDataAddr(self) def getMethodName(self): return _cqmf2.AgentEvent_getMethodName(self) def getArguments(self): return _cqmf2.AgentEvent_getArguments(self) def getArgumentSubtypes(self): return _cqmf2.AgentEvent_getArgumentSubtypes(self) def addReturnArgument(self, *args): return _cqmf2.AgentEvent_addReturnArgument(self, *args) AgentEvent_swigregister = _cqmf2.AgentEvent_swigregister AgentEvent_swigregister(AgentEvent) class Agent(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Agent, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Agent, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqmf2.new_Agent(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqmf2.delete_Agent __del__ = lambda self : None; def getName(self): return _cqmf2.Agent_getName(self) def getEpoch(self): return _cqmf2.Agent_getEpoch(self) def getVendor(self): return _cqmf2.Agent_getVendor(self) def getProduct(self): return _cqmf2.Agent_getProduct(self) def getInstance(self): return _cqmf2.Agent_getInstance(self) def getAttribute(self, *args): return _cqmf2.Agent_getAttribute(self, *args) def getAttributes(self): return _cqmf2.Agent_getAttributes(self) def query(self, *args): return _cqmf2.Agent_query(self, *args) def queryAsync(self, *args): return _cqmf2.Agent_queryAsync(self, *args) def callMethod(self, *args): return _cqmf2.Agent_callMethod(self, *args) def callMethodAsync(self, *args): return _cqmf2.Agent_callMethodAsync(self, *args) def querySchema(self, *args): return _cqmf2.Agent_querySchema(self, *args) def querySchemaAsync(self): return _cqmf2.Agent_querySchemaAsync(self) def getPackageCount(self): return _cqmf2.Agent_getPackageCount(self) def getPackage(self, *args): return _cqmf2.Agent_getPackage(self, *args) def getSchemaIdCount(self, *args): return _cqmf2.Agent_getSchemaIdCount(self, *args) def getSchemaId(self, *args): return _cqmf2.Agent_getSchemaId(self, *args) def getSchema(self, *args): return _cqmf2.Agent_getSchema(self, *args) Agent_swigregister = _cqmf2.Agent_swigregister Agent_swigregister(Agent) class AgentSession(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, AgentSession, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, AgentSession, name) __repr__ = _swig_repr __swig_destroy__ = _cqmf2.delete_AgentSession __del__ = lambda self : None; def __init__(self, *args): this = _cqmf2.new_AgentSession(*args) try: self.this.append(this) except: self.this = this def setDomain(self, *args): return _cqmf2.AgentSession_setDomain(self, *args) def setVendor(self, *args): return _cqmf2.AgentSession_setVendor(self, *args) def setProduct(self, *args): return _cqmf2.AgentSession_setProduct(self, *args) def setInstance(self, *args): return _cqmf2.AgentSession_setInstance(self, *args) def setAttribute(self, *args): return _cqmf2.AgentSession_setAttribute(self, *args) def getName(self): return _cqmf2.AgentSession_getName(self) def open(self): return _cqmf2.AgentSession_open(self) def close(self): return _cqmf2.AgentSession_close(self) def nextEvent(self, *args): return _cqmf2.AgentSession_nextEvent(self, *args) def pendingEvents(self): return _cqmf2.AgentSession_pendingEvents(self) def registerSchema(self, *args): return _cqmf2.AgentSession_registerSchema(self, *args) def addData(self, *args): return _cqmf2.AgentSession_addData(self, *args) def delData(self, *args): return _cqmf2.AgentSession_delData(self, *args) def authAccept(self, *args): return _cqmf2.AgentSession_authAccept(self, *args) def authReject(self, *args): return _cqmf2.AgentSession_authReject(self, *args) def raiseException(self, *args): return _cqmf2.AgentSession_raiseException(self, *args) def response(self, *args): return _cqmf2.AgentSession_response(self, *args) def complete(self, *args): return _cqmf2.AgentSession_complete(self, *args) def methodSuccess(self, *args): return _cqmf2.AgentSession_methodSuccess(self, *args) def raiseEvent(self, *args): return _cqmf2.AgentSession_raiseEvent(self, *args) AgentSession_swigregister = _cqmf2.AgentSession_swigregister AgentSession_swigregister(AgentSession) CONSOLE_AGENT_ADD = _cqmf2.CONSOLE_AGENT_ADD CONSOLE_AGENT_DEL = _cqmf2.CONSOLE_AGENT_DEL CONSOLE_AGENT_RESTART = _cqmf2.CONSOLE_AGENT_RESTART CONSOLE_AGENT_SCHEMA_UPDATE = _cqmf2.CONSOLE_AGENT_SCHEMA_UPDATE CONSOLE_AGENT_SCHEMA_RESPONSE = _cqmf2.CONSOLE_AGENT_SCHEMA_RESPONSE CONSOLE_EVENT = _cqmf2.CONSOLE_EVENT CONSOLE_QUERY_RESPONSE = _cqmf2.CONSOLE_QUERY_RESPONSE CONSOLE_METHOD_RESPONSE = _cqmf2.CONSOLE_METHOD_RESPONSE CONSOLE_EXCEPTION = _cqmf2.CONSOLE_EXCEPTION CONSOLE_SUBSCRIBE_ADD = _cqmf2.CONSOLE_SUBSCRIBE_ADD CONSOLE_SUBSCRIBE_UPDATE = _cqmf2.CONSOLE_SUBSCRIBE_UPDATE CONSOLE_SUBSCRIBE_DEL = _cqmf2.CONSOLE_SUBSCRIBE_DEL CONSOLE_THREAD_FAILED = _cqmf2.CONSOLE_THREAD_FAILED AGENT_DEL_AGED = _cqmf2.AGENT_DEL_AGED AGENT_DEL_FILTER = _cqmf2.AGENT_DEL_FILTER class ConsoleEvent(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ConsoleEvent, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ConsoleEvent, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqmf2.new_ConsoleEvent(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqmf2.delete_ConsoleEvent __del__ = lambda self : None; def getType(self): return _cqmf2.ConsoleEvent_getType(self) def getCorrelator(self): return _cqmf2.ConsoleEvent_getCorrelator(self) def getAgent(self): return _cqmf2.ConsoleEvent_getAgent(self) def getAgentDelReason(self): return _cqmf2.ConsoleEvent_getAgentDelReason(self) def getSchemaIdCount(self): return _cqmf2.ConsoleEvent_getSchemaIdCount(self) def getSchemaId(self, *args): return _cqmf2.ConsoleEvent_getSchemaId(self, *args) def getDataCount(self): return _cqmf2.ConsoleEvent_getDataCount(self) def getData(self, *args): return _cqmf2.ConsoleEvent_getData(self, *args) def isFinal(self): return _cqmf2.ConsoleEvent_isFinal(self) def getArguments(self): return _cqmf2.ConsoleEvent_getArguments(self) def getSeverity(self): return _cqmf2.ConsoleEvent_getSeverity(self) def getTimestamp(self): return _cqmf2.ConsoleEvent_getTimestamp(self) ConsoleEvent_swigregister = _cqmf2.ConsoleEvent_swigregister ConsoleEvent_swigregister(ConsoleEvent) class ConsoleSession(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ConsoleSession, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ConsoleSession, name) __repr__ = _swig_repr __swig_destroy__ = _cqmf2.delete_ConsoleSession __del__ = lambda self : None; def __init__(self, *args): this = _cqmf2.new_ConsoleSession(*args) try: self.this.append(this) except: self.this = this def setDomain(self, *args): return _cqmf2.ConsoleSession_setDomain(self, *args) def setAgentFilter(self, *args): return _cqmf2.ConsoleSession_setAgentFilter(self, *args) def open(self): return _cqmf2.ConsoleSession_open(self) def close(self): return _cqmf2.ConsoleSession_close(self) def nextEvent(self, *args): return _cqmf2.ConsoleSession_nextEvent(self, *args) def pendingEvents(self): return _cqmf2.ConsoleSession_pendingEvents(self) def getAgentCount(self): return _cqmf2.ConsoleSession_getAgentCount(self) def getAgent(self, *args): return _cqmf2.ConsoleSession_getAgent(self, *args) def getConnectedBrokerAgent(self): return _cqmf2.ConsoleSession_getConnectedBrokerAgent(self) def subscribe(self, *args): return _cqmf2.ConsoleSession_subscribe(self, *args) ConsoleSession_swigregister = _cqmf2.ConsoleSession_swigregister ConsoleSession_swigregister(ConsoleSession) class DataAddr(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, DataAddr, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, DataAddr, name) __repr__ = _swig_repr __swig_destroy__ = _cqmf2.delete_DataAddr __del__ = lambda self : None; def __init__(self, *args): this = _cqmf2.new_DataAddr(*args) try: self.this.append(this) except: self.this = this def getName(self): return _cqmf2.DataAddr_getName(self) def getAgentName(self): return _cqmf2.DataAddr_getAgentName(self) def getAgentEpoch(self): return _cqmf2.DataAddr_getAgentEpoch(self) def asMap(self): return _cqmf2.DataAddr_asMap(self) def __eq__(self, *args): return _cqmf2.DataAddr___eq__(self, *args) def __lt__(self, *args): return _cqmf2.DataAddr___lt__(self, *args) DataAddr_swigregister = _cqmf2.DataAddr_swigregister DataAddr_swigregister(DataAddr) class Data(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Data, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Data, name) __repr__ = _swig_repr __swig_destroy__ = _cqmf2.delete_Data __del__ = lambda self : None; def __init__(self, *args): this = _cqmf2.new_Data(*args) try: self.this.append(this) except: self.this = this def setAddr(self, *args): return _cqmf2.Data_setAddr(self, *args) def setProperty(self, *args): return _cqmf2.Data_setProperty(self, *args) def overwriteProperties(self, *args): return _cqmf2.Data_overwriteProperties(self, *args) def hasSchema(self): return _cqmf2.Data_hasSchema(self) def hasAddr(self): return _cqmf2.Data_hasAddr(self) def getSchemaId(self): return _cqmf2.Data_getSchemaId(self) def getAddr(self): return _cqmf2.Data_getAddr(self) def getProperty(self, *args): return _cqmf2.Data_getProperty(self, *args) def getProperties(self): return _cqmf2.Data_getProperties(self) def hasAgent(self): return _cqmf2.Data_hasAgent(self) def getAgent(self): return _cqmf2.Data_getAgent(self) Data_swigregister = _cqmf2.Data_swigregister Data_swigregister(Data) QUERY_OBJECT = _cqmf2.QUERY_OBJECT QUERY_OBJECT_ID = _cqmf2.QUERY_OBJECT_ID QUERY_SCHEMA = _cqmf2.QUERY_SCHEMA QUERY_SCHEMA_ID = _cqmf2.QUERY_SCHEMA_ID class Query(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Query, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Query, name) __repr__ = _swig_repr __swig_destroy__ = _cqmf2.delete_Query __del__ = lambda self : None; def __init__(self, *args): this = _cqmf2.new_Query(*args) try: self.this.append(this) except: self.this = this def getTarget(self): return _cqmf2.Query_getTarget(self) def getDataAddr(self): return _cqmf2.Query_getDataAddr(self) def getSchemaId(self): return _cqmf2.Query_getSchemaId(self) def setPredicate(self, *args): return _cqmf2.Query_setPredicate(self, *args) def getPredicate(self): return _cqmf2.Query_getPredicate(self) def matchesPredicate(self, *args): return _cqmf2.Query_matchesPredicate(self, *args) Query_swigregister = _cqmf2.Query_swigregister Query_swigregister(Query) class Schema(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Schema, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Schema, name) __repr__ = _swig_repr __swig_destroy__ = _cqmf2.delete_Schema __del__ = lambda self : None; def __init__(self, *args): this = _cqmf2.new_Schema(*args) try: self.this.append(this) except: self.this = this def getSchemaId(self): return _cqmf2.Schema_getSchemaId(self) def finalize(self): return _cqmf2.Schema_finalize(self) def isFinalized(self): return _cqmf2.Schema_isFinalized(self) def addProperty(self, *args): return _cqmf2.Schema_addProperty(self, *args) def addMethod(self, *args): return _cqmf2.Schema_addMethod(self, *args) def setDesc(self, *args): return _cqmf2.Schema_setDesc(self, *args) def getDesc(self): return _cqmf2.Schema_getDesc(self) def setDefaultSeverity(self, *args): return _cqmf2.Schema_setDefaultSeverity(self, *args) def getDefaultSeverity(self): return _cqmf2.Schema_getDefaultSeverity(self) def getPropertyCount(self): return _cqmf2.Schema_getPropertyCount(self) def getProperty(self, *args): return _cqmf2.Schema_getProperty(self, *args) def getMethodCount(self): return _cqmf2.Schema_getMethodCount(self) def getMethod(self, *args): return _cqmf2.Schema_getMethod(self, *args) Schema_swigregister = _cqmf2.Schema_swigregister Schema_swigregister(Schema) class SchemaId(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaId, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaId, name) __repr__ = _swig_repr __swig_destroy__ = _cqmf2.delete_SchemaId __del__ = lambda self : None; def __init__(self, *args): this = _cqmf2.new_SchemaId(*args) try: self.this.append(this) except: self.this = this def setHash(self, *args): return _cqmf2.SchemaId_setHash(self, *args) def getType(self): return _cqmf2.SchemaId_getType(self) def getPackageName(self): return _cqmf2.SchemaId_getPackageName(self) def getName(self): return _cqmf2.SchemaId_getName(self) def getHash(self): return _cqmf2.SchemaId_getHash(self) SchemaId_swigregister = _cqmf2.SchemaId_swigregister SchemaId_swigregister(SchemaId) class SchemaMethod(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaMethod, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaMethod, name) __repr__ = _swig_repr __swig_destroy__ = _cqmf2.delete_SchemaMethod __del__ = lambda self : None; def __init__(self, *args): this = _cqmf2.new_SchemaMethod(*args) try: self.this.append(this) except: self.this = this def setDesc(self, *args): return _cqmf2.SchemaMethod_setDesc(self, *args) def addArgument(self, *args): return _cqmf2.SchemaMethod_addArgument(self, *args) def getName(self): return _cqmf2.SchemaMethod_getName(self) def getDesc(self): return _cqmf2.SchemaMethod_getDesc(self) def getArgumentCount(self): return _cqmf2.SchemaMethod_getArgumentCount(self) def getArgument(self, *args): return _cqmf2.SchemaMethod_getArgument(self, *args) SchemaMethod_swigregister = _cqmf2.SchemaMethod_swigregister SchemaMethod_swigregister(SchemaMethod) class SchemaProperty(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaProperty, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaProperty, name) __repr__ = _swig_repr __swig_destroy__ = _cqmf2.delete_SchemaProperty __del__ = lambda self : None; def __init__(self, *args): this = _cqmf2.new_SchemaProperty(*args) try: self.this.append(this) except: self.this = this def setAccess(self, *args): return _cqmf2.SchemaProperty_setAccess(self, *args) def setIndex(self, *args): return _cqmf2.SchemaProperty_setIndex(self, *args) def setOptional(self, *args): return _cqmf2.SchemaProperty_setOptional(self, *args) def setUnit(self, *args): return _cqmf2.SchemaProperty_setUnit(self, *args) def setDesc(self, *args): return _cqmf2.SchemaProperty_setDesc(self, *args) def setSubtype(self, *args): return _cqmf2.SchemaProperty_setSubtype(self, *args) def setDirection(self, *args): return _cqmf2.SchemaProperty_setDirection(self, *args) def getName(self): return _cqmf2.SchemaProperty_getName(self) def getType(self): return _cqmf2.SchemaProperty_getType(self) def getAccess(self): return _cqmf2.SchemaProperty_getAccess(self) def isIndex(self): return _cqmf2.SchemaProperty_isIndex(self) def isOptional(self): return _cqmf2.SchemaProperty_isOptional(self) def getUnit(self): return _cqmf2.SchemaProperty_getUnit(self) def getDesc(self): return _cqmf2.SchemaProperty_getDesc(self) def getSubtype(self): return _cqmf2.SchemaProperty_getSubtype(self) def getDirection(self): return _cqmf2.SchemaProperty_getDirection(self) SchemaProperty_swigregister = _cqmf2.SchemaProperty_swigregister SchemaProperty_swigregister(SchemaProperty) class Subscription(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Subscription, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Subscription, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqmf2.new_Subscription(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqmf2.delete_Subscription __del__ = lambda self : None; def cancel(self): return _cqmf2.Subscription_cancel(self) def isActive(self): return _cqmf2.Subscription_isActive(self) def lock(self): return _cqmf2.Subscription_lock(self) def unlock(self): return _cqmf2.Subscription_unlock(self) def getDataCount(self): return _cqmf2.Subscription_getDataCount(self) def getData(self, *args): return _cqmf2.Subscription_getData(self, *args) Subscription_swigregister = _cqmf2.Subscription_swigregister Subscription_swigregister(Subscription) SCHEMA_TYPE_DATA = cvar.SCHEMA_TYPE_DATA SCHEMA_TYPE_EVENT = cvar.SCHEMA_TYPE_EVENT SCHEMA_DATA_VOID = cvar.SCHEMA_DATA_VOID SCHEMA_DATA_BOOL = cvar.SCHEMA_DATA_BOOL SCHEMA_DATA_INT = cvar.SCHEMA_DATA_INT SCHEMA_DATA_FLOAT = cvar.SCHEMA_DATA_FLOAT SCHEMA_DATA_STRING = cvar.SCHEMA_DATA_STRING SCHEMA_DATA_MAP = cvar.SCHEMA_DATA_MAP SCHEMA_DATA_LIST = cvar.SCHEMA_DATA_LIST SCHEMA_DATA_UUID = cvar.SCHEMA_DATA_UUID ACCESS_READ_CREATE = cvar.ACCESS_READ_CREATE ACCESS_READ_WRITE = cvar.ACCESS_READ_WRITE ACCESS_READ_ONLY = cvar.ACCESS_READ_ONLY DIR_IN = cvar.DIR_IN DIR_OUT = cvar.DIR_OUT DIR_IN_OUT = cvar.DIR_IN_OUT SEV_EMERG = cvar.SEV_EMERG SEV_ALERT = cvar.SEV_ALERT SEV_CRIT = cvar.SEV_CRIT SEV_ERROR = cvar.SEV_ERROR SEV_WARN = cvar.SEV_WARN SEV_NOTICE = cvar.SEV_NOTICE SEV_INFORM = cvar.SEV_INFORM SEV_DEBUG = cvar.SEV_DEBUG # This file is compatible with both classic and new-style classes. qpidc-0.16/bindings/qmf2/python/qmf2.py0000664000076400007640000006475011526224037020354 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import cqmf2 import cqpid from threading import Thread import time #=================================================================================================== # CONSTANTS #=================================================================================================== SCHEMA_TYPE_DATA = cqmf2.SCHEMA_TYPE_DATA SCHEMA_TYPE_EVENT = cqmf2.SCHEMA_TYPE_EVENT SCHEMA_DATA_VOID = cqmf2.SCHEMA_DATA_VOID SCHEMA_DATA_BOOL = cqmf2.SCHEMA_DATA_BOOL SCHEMA_DATA_INT = cqmf2.SCHEMA_DATA_INT SCHEMA_DATA_FLOAT = cqmf2.SCHEMA_DATA_FLOAT SCHEMA_DATA_STRING = cqmf2.SCHEMA_DATA_STRING SCHEMA_DATA_MAP = cqmf2.SCHEMA_DATA_MAP SCHEMA_DATA_LIST = cqmf2.SCHEMA_DATA_LIST SCHEMA_DATA_UUID = cqmf2.SCHEMA_DATA_UUID ACCESS_READ_CREATE = cqmf2.ACCESS_READ_CREATE ACCESS_READ_WRITE = cqmf2.ACCESS_READ_WRITE ACCESS_READ_ONLY = cqmf2.ACCESS_READ_ONLY DIR_IN = cqmf2.DIR_IN DIR_OUT = cqmf2.DIR_OUT DIR_IN_OUT = cqmf2.DIR_IN_OUT SEV_EMERG = cqmf2.SEV_EMERG SEV_ALERT = cqmf2.SEV_ALERT SEV_CRIT = cqmf2.SEV_CRIT SEV_ERROR = cqmf2.SEV_ERROR SEV_WARN = cqmf2.SEV_WARN SEV_NOTICE = cqmf2.SEV_NOTICE SEV_INFORM = cqmf2.SEV_INFORM SEV_DEBUG = cqmf2.SEV_DEBUG QUERY_OBJECT = cqmf2.QUERY_OBJECT QUERY_OBJECT_ID = cqmf2.QUERY_OBJECT_ID QUERY_SCHEMA = cqmf2.QUERY_SCHEMA QUERY_SCHEMA_ID = cqmf2.QUERY_SCHEMA_ID #=================================================================================================== # EXCEPTIONS #=================================================================================================== class QmfAgentException(Exception): """ This exception class represents an exception that was raised by a remote agent and propagated to a console via QMFv2. """ def __init__(self, data): self.value = data def __str__(self): return "From Remote Agent: %r" % self.value.getProperties() #=================================================================================================== # AGENT HANDLER #=================================================================================================== class AgentHandler(Thread): """ Agent applications can create a subclass of AgentHandler to handle asynchronous events (like incoming method calls) that occur on the agent session. AgentHandler contains a thread on which the handler callbacks are invoked. There are two ways to operate the handler: Cause it to start its own thread by calling start() and later stop it by calling cancel(); and directly calling run() to operate it on the main thread. Example Usage: class MyAgentHandler(qmf2.AgentHandler): def __init__(self, agentSession): qmf2.AgentHandler.__init__(self, agentSession) def method(self, handle, methodName, args, subtypes, addr, userId): ...method handling code goes here... For success, add output arguments: handle.addReturnArgument("argname", argvalue) ... self.agent.methodSuccess(handle) For failure, raise an exception: self.agent.raiseException(handle, "error text") Or, if you have created a schema for a structured exception: ex = qmf2.Data(exceptionSchema) ex.whatHappened = "it failed" ex.howBad = 84 ex.detailMap = {} ... self.agent.raiseException(handle, ex) """ def __init__(self, agentSession): Thread.__init__(self) self.__agent = agentSession self.__running = True def cancel(self): """ Stop the handler thread. """ self.__running = None def run(self): event = cqmf2.AgentEvent() while self.__running: valid = self.__agent._impl.nextEvent(event, cqpid.Duration.SECOND) if valid and self.__running: if event.getType() == cqmf2.AGENT_METHOD: self.method(event, event.getMethodName(), event.getArguments(), event.getArgumentSubtypes(), DataAddr(event.getDataAddr()), event.getUserId()) def method(self, handle, methodName, args, subtypes, addr, userId): """ Override this method to create your own method handler. """ pass #=================================================================================================== # CONSOLE HANDLER #=================================================================================================== class ConsoleHandler(Thread): def __init__(self, consoleSession): Thread.__init__(self) self.__session = consoleSession self.__running = True def cancel(self): """ Stop the handler thread. """ self.__running = None def run(self): event = cqmf2.ConsoleEvent() while self.__running: valid = self.__session._impl.nextEvent(event, cqpid.Duration.SECOND) if valid and self.__running: if event.getType() == cqmf2.CONSOLE_AGENT_ADD: self.agentAdded(Agent(event.getAgent())) elif event.getType() == cqmf2.CONSOLE_AGENT_DEL: reason = 'filter' if event.getAgentDelReason() == cqmf2.AGENT_DEL_AGED: reason = 'aged' self.agentDeleted(Agent(event.getAgent()), reason) elif event.getType() == cqmf2.CONSOLE_AGENT_RESTART: self.agentRestarted(Agent(event.getAgent())) elif event.getType() == cqmf2.CONSOLE_AGENT_SCHEMA_UPDATE: self.agentSchemaUpdated(Agent(event.getAgent())) elif event.getType() == cqmf2.CONSOLE_EVENT: self.eventRaised(Agent(event.getAgent()), Data(event.getData(0)), event.getTimestamp(), event.getSeverity()) ## ## The following methods are intended to be overridden in a sub-class. They are ## handlers for events that occur on QMF consoles. ## # # A new agent, whose attributes match the console's agent filter, has been discovered. # def agentAdded(self, agent): pass # # A known agent has been removed from the agent list. There are two possible reasons # for agent deletion: # # 1) 'aged' - The agent hasn't been heard from for the maximum age interval and is # presumed dead. # 2) 'filter' - The agent no longer matches the console's agent-filter and has been # effectively removed from the agent list. Such occurrences are likely # to be seen immediately after setting the filter to a new value. # def agentDeleted(self, agent, reason): pass # # An agent-restart was detected. This occurs when the epoch number advertised by the # agent changes. It indicates that the agent in question was shut-down/crashed and # restarted. # def agentRestarted(self, agent): pass # # The agent has registered new schema information which can now be queried, if desired. # def agentSchemaUpdated(self, agent): pass # # An agent raised an event. The 'data' argument is a Data object that contains the # content of the event. # def eventRaised(self, agent, data, timestamp, severity): pass #=================================================================================================== # CONSOLE SESSION #=================================================================================================== class ConsoleSession(object): """ """ def __init__(self, connection, options=""): """ ## The options string is of the form "{key:value,key:value}". The following keys are supported: ## ## domain:NAME - QMF Domain to join [default: "default"] ## max-agent-age:N - Maximum time, in minutes, that we will tolerate not hearing from ## an agent before deleting it [default: 5] ## listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default] ## If False: Listen only on the routable direct address ## strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network ## - If False: Operate more flexibly with regard to use of messaging facilities [default] ## """ self._impl = cqmf2.ConsoleSession(connection, options) def setDomain(self, domain): """ """ self._impl.setDomain(domain) def setAgentFilter(self, filt): """ """ self._impl.setAgentFilter(filt) def open(self): """ """ self._impl.open() def close(self): """ """ self._impl.close() def getAgents(self): """ """ result = [] count = self._impl.getAgentCount() for i in range(count): result.append(Agent(self._impl.getAgent(i))) return result def getConnectedBrokerAgent(self): """ """ return Agent(self._impl.getConnectedBrokerAgent()) ## TODO: Async methods #=================================================================================================== # AGENT SESSION #=================================================================================================== class AgentSession(object): """ """ def __init__(self, connection, options=""): """ ## The options string is of the form "{key:value,key:value}". The following keys are supported: ## ## interval:N - Heartbeat interval in seconds [default: 60] ## external:{True,False} - Use external data storage (queries and subscriptions are pass-through) [default: False] ## allow-queries:{True,False} - If True: automatically allow all queries [default] ## If False: generate an AUTH_QUERY event to allow per-query authorization ## allow-methods:{True,False} - If True: automatically allow all methods [default] ## If False: generate an AUTH_METHOD event to allow per-method authorization ## max-subscriptions:N - Maximum number of concurrent subscription queries permitted [default: 64] ## min-sub-interval:N - Minimum publish interval (in milliseconds) permitted for a subscription [default: 3000] ## sub-lifetime:N - Lifetime (in seconds with no keepalive) for a subscription [default: 300] ## public-events:{True,False} - If True: QMF events are sent to the topic exchange [default] ## If False: QMF events are only sent to authorized subscribers ## listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default] ## If False: Listen only on the routable direct address ## strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network ## - If False: Operate more flexibly with regard to use of messaging facilities [default] ## """ self._impl = cqmf2.AgentSession(connection, options) def setDomain(self, domain): """ """ self._impl.setDomain(domain) def setVendor(self, val): """ """ self._impl.setVendor(val) def setProduct(self, val): """ """ self._impl.setProduct(val) def setInstance(self, val): """ """ self._impl.setInstance(val) def setAttribute(self, key, val): """ """ self._impl.setAttribute(key, val) def open(self): """ """ self._impl.open() def close(self): """ """ self._impl.close() def registerSchema(self, schema): """ """ self._impl.registerSchema(schema._impl) def addData(self, data, name="", persistent=False): """ """ return DataAddr(self._impl.addData(data._impl, name, persistent)) def delData(self, addr): """ """ self._impl.delData(addr._impl) def methodSuccess(self, handle): """ """ self._impl.methodSuccess(handle) def raiseException(self, handle, data): """ """ if data.__class__ == Data: self._impl.raiseException(handle, data._impl) else: self._impl.raiseException(handle, data) def raiseEvent(self, data, severity=None): """ """ if not severity: self._impl.raiseEvent(data._impl) else: if (severity.__class__ != int and severity.__class__ != long) or severity < 0 or severity > 7: raise Exception("Severity must be an int between 0..7") self._impl.raiseEvent(data._impl, severity); #=================================================================================================== # AGENT PROXY #=================================================================================================== class Agent(object): """ """ def __init__(self, impl): self._impl = impl def __repr__(self): return self.getName() def getName(self): """ """ return self._impl.getName() def getEpoch(self): """ """ return self._impl.getEpoch() def getVendor(self): """ """ return self._impl.getVendor() def getProduct(self): """ """ return self._impl.getProduct() def getInstance(self): """ """ return self._impl.getInstance() def getAttributes(self): """ """ return self._impl.getAttributes() def query(self, q, timeout=30): """ """ if q.__class__ == Query: q_arg = q._impl else: q_arg = q dur = cqpid.Duration(cqpid.Duration.SECOND.getMilliseconds() * timeout) result = self._impl.query(q_arg, dur) if result.getType() == cqmf2.CONSOLE_EXCEPTION: raise Exception(Data(result.getData(0))) if result.getType() != cqmf2.CONSOLE_QUERY_RESPONSE: raise Exception("Protocol error, expected CONSOLE_QUERY_RESPONSE, got %d" % result.getType()) dataList = [] count = result.getDataCount() for i in range(count): dataList.append(Data(result.getData(i))) return dataList def loadSchemaInfo(self, timeout=30): """ """ dur = cqpid.Duration(cqpid.Duration.SECOND.getMilliseconds() * timeout) self._impl.querySchema(dur) def getPackages(self): """ """ result = [] count = self._impl.getPackageCount() for i in range(count): result.append(self._impl.getPackage(i)) return result def getSchemaIds(self, package): """ """ result = [] count = self._impl.getSchemaIdCount(package) for i in range(count): result.append(SchemaId(self._impl.getSchemaId(package, i))) return result def getSchema(self, schemaId, timeout=30): """ """ dur = cqpid.Duration(cqpid.Duration.SECOND.getMilliseconds() * timeout) return Schema(self._impl.getSchema(schemaId._impl, dur)) ## TODO: Async query ## TODO: Agent method #=================================================================================================== # QUERY #=================================================================================================== class Query(object): """ """ def __init__(self, arg1, arg2=None, arg3=None, *kwargs): """ """ if arg1.__class__ == DataAddr: self._impl = cqmf2.Query(arg1._impl) def getAddr(self): """ """ return DataAddr(self._impl.getDataAddr()) def getSchemaId(self): """ """ return SchemaId(self._impl.getSchemaId()) def getPredicate(self): """ """ return self._impl.getPredicate() def matches(self, data): """ """ m = data if data.__class__ == Data: m = data.getProperties() return self._impl.matchesPredicate(m) #=================================================================================================== # DATA #=================================================================================================== class Data(object): """ """ def __init__(self, arg=None): """ """ if arg == None: self._impl = cqmf2.Data() elif arg.__class__ == cqmf2.Data: self._impl = arg elif arg.__class__ == Schema: self._impl = cqmf2.Data(arg._impl) else: raise Exception("Unsupported initializer for Data") self._schema = None def getSchemaId(self): """ """ if self._impl.hasSchema(): return SchemaId(self._impl.getSchemaId()) return None def getAddr(self): """ """ if self._impl.hasAddr(): return DataAddr(self._impl.getAddr()) return None def getAgent(self): """ """ return Agent(self._impl.getAgent()) def update(self, timeout=5): dur = cqpid.Duration(cqpid.Duration.SECOND.getMilliseconds() * timeout) agent = self._impl.getAgent() query = cqmf2.Query(self._impl.getAddr()) result = agent.query(query, dur) if result.getType() != cqmf2.CONSOLE_QUERY_RESPONSE: raise "Update query failed" if result.getDataCount == 0: raise "Object no longer exists on agent" self._impl = cqmf2.Data(result.getData(0)) def getProperties(self): """ """ return self._impl.getProperties(); def _getSchema(self): if not self._schema: if not self._impl.hasSchema(): raise Exception("Data object has no schema") self._schema = Schema(self._impl.getAgent().getSchema(self._impl.getSchemaId())) def _invoke(self, name, args, kwargs): ## ## Get local copies of the agent and the address of the data object ## agent = self._impl.getAgent() addr = self._impl.getAddr() ## ## Set up the timeout duration for the method call. Set the default and override ## it if the _timeout keyword arg was supplied. ## timeout = 30 if '_timeout' in kwargs: timeout = kwargs['_timeout'] dur = cqpid.Duration(cqpid.Duration.SECOND.getMilliseconds() * timeout) ## ## Get the list of arguments from the schema, isolate those that are IN or IN_OUT, ## validate that we have the right number of arguments supplied, and marshall them ## into a map for transmission. ## arglist = [] methods = self._schema.getMethods() for m in methods: if m.getName() == name: arglist = m.getArguments() break argmap = {} count = 0 for a in arglist: if a.getDirection() == DIR_IN or a.getDirection() == DIR_IN_OUT: count += 1 if count != len(args): raise Exception("Wrong number of arguments: expected %d, got %d" % (count, len(args))) i = 0 for a in arglist: if a.getDirection() == DIR_IN or a.getDirection() == DIR_IN_OUT: argmap[a.getName()] = args[i] i += 1 ## ## Invoke the method through the agent proxy. ## result = agent.callMethod(name, argmap, addr, dur) ## ## If the agent sent an exception, raise it in a QmfAgentException. ## if result.getType() == cqmf2.CONSOLE_EXCEPTION: exdata = result.getData(0) raise QmfAgentException(exdata) ## ## If a successful method response was received, collect the output arguments into a map ## and return them to the caller. ## if result.getType() != cqmf2.CONSOLE_METHOD_RESPONSE: raise Exception("Protocol error: Unexpected event type in method-response: %d" % result.getType()) return result.getArguments() def __getattr__(self, name): ## ## If we have a schema and an address, check to see if this name is the name of a method. ## if self._impl.hasSchema() and self._impl.hasAddr() and self._impl.hasAgent(): ## ## Get the schema for the data object. Note that this call will block if the remote agent ## needs to be queried for the schema (i.e. the schema is not in the local cache). ## self._getSchema() methods = self._schema.getMethods() ## ## If the name matches a method in the schema, return a closure to be invoked. ## for method in methods: if name == method.getName(): return lambda *args, **kwargs : self._invoke(name, args, kwargs) ## ## This is not a method call, return the property matching the name. ## return self._impl.getProperty(name) def __setattr__(self, name, value): if name[0] == '_': super.__setattr__(self, name, value) return self._impl.setProperty(name, value) #=================================================================================================== # DATA ADDRESS #=================================================================================================== class DataAddr(object): """ """ def __init__(self, arg, agentName=""): if arg.__class__ == dict: self._impl = cqmf2.DataAddr(arg) elif arg.__class__ == cqmf2.DataAddr: self._impl = arg else: self._impl = cqmf2.DataAddr(arg, agentName) def __repr__(self): return "%s:%s" % (self.getAgentName(), self.getName()) def __eq__(self, other): return self.getAgentName() == other.getAgentName() and \ self.getName() == other.getName() and \ self.getAgentEpoch() == other.getAgentEpoch() def asMap(self): """ """ return self._impl.asMap() def getAgentName(self): """ """ return self._impl.getAgentName() def getName(self): """ """ return self._impl.getName() def getAgentEpoch(self): """ """ return self._impl.getAgentEpoch() #=================================================================================================== # SCHEMA ID #=================================================================================================== class SchemaId(object): """ """ def __init__(self, impl): self._impl = impl def __repr__(self): return "%s:%s" % (self.getPackageName(), self.getName()) def getType(self): """ """ return self._impl.getType() def getPackageName(self): """ """ return self._impl.getPackageName() def getName(self): """ """ return self._impl.getName() def getHash(self): """ """ return self._impl.getHash() #=================================================================================================== # SCHEMA #=================================================================================================== class Schema(object): """ """ def __init__(self, stype, packageName=None, className=None, desc=None, sev=None): if stype.__class__ == cqmf2.Schema: self._impl = stype else: self._impl = cqmf2.Schema(stype, packageName, className) if desc: self._impl.setDesc(desc) if sev: self._impl.setDefaultSeverity(sev) def __repr__(self): return "QmfSchema:%r" % SchemaId(self._impl.getSchemaId()) def finalize(self): """ """ self._impl.finalize() def getSchemaId(self): """ """ return SchemaId(self._impl.getSchemaId()) def getDesc(self): """ """ return self._impl.getDesc() def getSev(self): """ """ return self._impl.getDefaultSeverity() def addProperty(self, prop): """ """ self._impl.addProperty(prop._impl) def addMethod(self, meth): """ """ self._impl.addMethod(meth._impl) def getProperties(self): """ """ props = [] count = self._impl.getPropertyCount() for i in range(count): props.append(SchemaProperty(self._impl.getProperty(i))) return props def getMethods(self): """ """ meths = [] count = self._impl.getMethodCount() for i in range(count): meths.append(SchemaMethod(self._impl.getMethod(i))) return meths #=================================================================================================== # SCHEMA PROPERTY #=================================================================================================== class SchemaProperty(object): """ """ def __init__(self, name, dtype=None, **kwargs): """ """ if name.__class__ == cqmf2.SchemaProperty: self._impl = name else: self._impl = cqmf2.SchemaProperty(name, dtype) if 'access' in kwargs: self._impl.setAccess(kwargs['access']) if 'index' in kwargs: self._impl.setIndex(kwargs['index']) if 'optional' in kwargs: self._impl.setOptional(kwargs['optional']) if 'unit' in kwargs: self._impl.setUnit(kwargs['unit']) if 'desc' in kwargs: self._impl.setDesc(kwargs['desc']) if 'subtype' in kwargs: self._impl.setSubtype(kwargs['subtype']) if 'direction' in kwargs: self._impl.setDirection(kwargs['direction']) def __repr__(self): return self._impl.getName() def getName(self): """ """ return self._impl.getName() def getType(self): """ """ return self._impl.getType() def getAccess(self): """ """ return self._impl.getAccess() def isIndex(self): """ """ return self._impl.isIndex() def isOptional(self): """ """ return self._impl.isOptional() def getUnit(self): """ """ return self._impl.getUnit() def getDesc(self): """ """ return self._impl.getDesc() def getSubtype(self): """ """ return self._impl.getSubtype() def getDirection(self): """ """ return self._impl.getDirection() #=================================================================================================== # SCHEMA METHOD #=================================================================================================== class SchemaMethod(object): """ """ def __init__(self, name, **kwargs): """ """ if name.__class__ == cqmf2.SchemaMethod: self._impl = name else: self._impl = cqmf2.SchemaMethod(name) if 'desc' in kwargs: self._impl.setDesc(kwargs['desc']) def __repr__(self): return "%s()" % self._impl.getName() def getName(self): """ """ return self._impl.getName() def getDesc(self): """ """ return self._impl.getDesc() def addArgument(self, arg): """ """ self._impl.addArgument(arg._impl) def getArguments(self): """ """ result = [] count = self._impl.getArgumentCount() for i in range(count): result.append(SchemaProperty(self._impl.getArgument(i))) return result qpidc-0.16/bindings/qmf2/python/CMakeLists.txt0000664000076400007640000000604311654522741021671 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ##------------------------------------------------------ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES CPLUSPLUS ON) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") swig_add_module(cqmf2_python python ${CMAKE_CURRENT_SOURCE_DIR}/python.i) swig_link_libraries(cqmf2_python qmf2 ${PYTHON_LIBRARIES}) set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${PYTHON_INCLUDE_PATH} -I${qpid-cpp_SOURCE_DIR}/include") ##------------------------------------ ## Install the complete Python binding ##------------------------------------ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cqmf2.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile cqmf2.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/qmf2.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qmf2.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qmf2.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cqmf2.py ${CMAKE_CURRENT_BINARY_DIR}/cqmf2.pyc ${CMAKE_CURRENT_BINARY_DIR}/cqmf2.pyo ${CMAKE_CURRENT_BINARY_DIR}/qmf2.py ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pyc ${CMAKE_CURRENT_BINARY_DIR}/qmf2.pyo DESTINATION ${PYTHON_SITE_PACKAGES} COMPONENT ${QPID_COMPONENT_CLIENT} ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_cqmf2_python.so RENAME _cqmf2.so DESTINATION ${PYTHON_SITE_PACKAGES} COMPONENT ${QPID_COMPONENT_CLIENT} ) qpidc-0.16/bindings/qmf2/CMakeLists.txt0000664000076400007640000000215011654522741020343 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # include(FindSWIG) include(UseSWIG) include(FindRuby) include(FindPythonLibs) include(FindPerlLibs) if (SWIG_FOUND) set(CMAKE_SWIG_FLAGS "-w362,401") if (PYTHONLIBS_FOUND) add_subdirectory(python) endif (PYTHONLIBS_FOUND) if (RUBY_FOUND) add_subdirectory(ruby) endif (RUBY_FOUND) endif (SWIG_FOUND) qpidc-0.16/bindings/qmf2/ruby/0000775000076400007640000000000011752725722016571 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf2/ruby/Makefile.in0000664000076400007640000005432611752725661020652 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings/qmf2/ruby DIST_COMMON = $(am__dist_rubylib_DATA_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(rubylibarchdir)" \ "$(DESTDIR)$(rubylibdir)" LTLIBRARIES = $(rubylibarch_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_RUBY_DEVEL_TRUE@cqmf2_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_RUBY_DEVEL_TRUE@ $(top_builddir)/src/libqmf2.la @HAVE_RUBY_DEVEL_TRUE@nodist_cqmf2_la_OBJECTS = cqmf2_la-cqmf2.lo cqmf2_la_OBJECTS = $(nodist_cqmf2_la_OBJECTS) cqmf2_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(cqmf2_la_CXXFLAGS) \ $(CXXFLAGS) $(cqmf2_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_RUBY_DEVEL_TRUE@am_cqmf2_la_rpath = -rpath $(rubylibarchdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_cqmf2_la_SOURCES) DIST_SOURCES = am__dist_rubylib_DATA_DIST = qmf2.rb DATA = $(dist_rubylib_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_RUBY_DEVEL_TRUE@INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src $(QMF_INCLUDES) @HAVE_RUBY_DEVEL_TRUE@EXTRA_DIST = CMakeLists.txt ruby.i @HAVE_RUBY_DEVEL_TRUE@BUILT_SOURCES = cqmf2.cpp @HAVE_RUBY_DEVEL_TRUE@SWIG_FLAGS = -w362,401 @HAVE_RUBY_DEVEL_TRUE@rubylibdir = $(RUBY_LIB) @HAVE_RUBY_DEVEL_TRUE@rubylibarchdir = $(RUBY_LIB_ARCH) @HAVE_RUBY_DEVEL_TRUE@rubylibarch_LTLIBRARIES = cqmf2.la @HAVE_RUBY_DEVEL_TRUE@dist_rubylib_DATA = qmf2.rb @HAVE_RUBY_DEVEL_TRUE@cqmf2_la_LDFLAGS = -avoid-version -module -shared -shrext ".$(RUBY_DLEXT)" @HAVE_RUBY_DEVEL_TRUE@cqmf2_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqmf2 $(top_builddir)/src/libqmf2.la @HAVE_RUBY_DEVEL_TRUE@cqmf2_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH) -fno-strict-aliasing @HAVE_RUBY_DEVEL_TRUE@nodist_cqmf2_la_SOURCES = cqmf2.cpp @HAVE_RUBY_DEVEL_TRUE@CLEANFILES = cqmf2.cpp all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qmf2/ruby/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qmf2/ruby/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 $(am__aclocal_m4_deps): install-rubylibarchLTLIBRARIES: $(rubylibarch_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(rubylibarchdir)" || $(MKDIR_P) "$(DESTDIR)$(rubylibarchdir)" @list='$(rubylibarch_LTLIBRARIES)'; test -n "$(rubylibarchdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(rubylibarchdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(rubylibarchdir)"; \ } uninstall-rubylibarchLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(rubylibarch_LTLIBRARIES)'; test -n "$(rubylibarchdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(rubylibarchdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(rubylibarchdir)/$$f"; \ done clean-rubylibarchLTLIBRARIES: -test -z "$(rubylibarch_LTLIBRARIES)" || rm -f $(rubylibarch_LTLIBRARIES) @list='$(rubylibarch_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 cqmf2.la: $(cqmf2_la_OBJECTS) $(cqmf2_la_DEPENDENCIES) $(cqmf2_la_LINK) $(am_cqmf2_la_rpath) $(cqmf2_la_OBJECTS) $(cqmf2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cqmf2_la-cqmf2.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 $@ $< cqmf2_la-cqmf2.lo: cqmf2.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cqmf2_la_CXXFLAGS) $(CXXFLAGS) -MT cqmf2_la-cqmf2.lo -MD -MP -MF $(DEPDIR)/cqmf2_la-cqmf2.Tpo -c -o cqmf2_la-cqmf2.lo `test -f 'cqmf2.cpp' || echo '$(srcdir)/'`cqmf2.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cqmf2_la-cqmf2.Tpo $(DEPDIR)/cqmf2_la-cqmf2.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cqmf2.cpp' object='cqmf2_la-cqmf2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cqmf2_la_CXXFLAGS) $(CXXFLAGS) -c -o cqmf2_la-cqmf2.lo `test -f 'cqmf2.cpp' || echo '$(srcdir)/'`cqmf2.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_rubylibDATA: $(dist_rubylib_DATA) @$(NORMAL_INSTALL) test -z "$(rubylibdir)" || $(MKDIR_P) "$(DESTDIR)$(rubylibdir)" @list='$(dist_rubylib_DATA)'; test -n "$(rubylibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rubylibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rubylibdir)" || exit $$?; \ done uninstall-dist_rubylibDATA: @$(NORMAL_UNINSTALL) @list='$(dist_rubylib_DATA)'; test -n "$(rubylibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(rubylibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(rubylibdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(rubylibarchdir)" "$(DESTDIR)$(rubylibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-rubylibarchLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_rubylibDATA \ install-rubylibarchLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_rubylibDATA \ uninstall-rubylibarchLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-rubylibarchLTLIBRARIES 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-dist_rubylibDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am \ install-rubylibarchLTLIBRARIES 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-dist_rubylibDATA \ uninstall-rubylibarchLTLIBRARIES @HAVE_RUBY_DEVEL_TRUE@cqmf2.cpp: $(srcdir)/ruby.i $(srcdir)/../qmf2.i $(srcdir)/../../swig_ruby_typemaps.i @HAVE_RUBY_DEVEL_TRUE@ $(SWIG) -ruby -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqmf2.cpp $(srcdir)/ruby.i # 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: qpidc-0.16/bindings/qmf2/ruby/Makefile.am0000664000076400007640000000321411656043025020615 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if HAVE_RUBY_DEVEL INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src $(QMF_INCLUDES) EXTRA_DIST = CMakeLists.txt ruby.i BUILT_SOURCES = cqmf2.cpp SWIG_FLAGS = -w362,401 rubylibdir = $(RUBY_LIB) cqmf2.cpp: $(srcdir)/ruby.i $(srcdir)/../qmf2.i $(srcdir)/../../swig_ruby_typemaps.i $(SWIG) -ruby -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqmf2.cpp $(srcdir)/ruby.i rubylibarchdir = $(RUBY_LIB_ARCH) rubylibarch_LTLIBRARIES = cqmf2.la dist_rubylib_DATA = qmf2.rb cqmf2_la_LDFLAGS = -avoid-version -module -shared -shrext ".$(RUBY_DLEXT)" cqmf2_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqmf2 $(top_builddir)/src/libqmf2.la cqmf2_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH) -fno-strict-aliasing nodist_cqmf2_la_SOURCES = cqmf2.cpp CLEANFILES = cqmf2.cpp endif # HAVE_RUBY_DEVEL qpidc-0.16/bindings/qmf2/ruby/qmf2.rb0000664000076400007640000006541511525107220017757 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # require 'cqmf2' require 'cqpid' require 'thread' require 'socket' require 'monitor' module Qmf2 Cqmf2.constants.each do |c| if c.index('AGENT_') == 0 or c.index('CONSOLE_') == 0 or c.index('SCHEMA_') == 0 or c.index('SEV_') == 0 or c.index('QUERY') == 0 const_set(c, Cqmf2.const_get(c)) end end SCHEMA_TYPE_DATA = Cqmf2::SCHEMA_TYPE_DATA() SCHEMA_TYPE_EVENT = Cqmf2::SCHEMA_TYPE_EVENT() SCHEMA_DATA_VOID = Cqmf2::SCHEMA_DATA_VOID() SCHEMA_DATA_BOOL = Cqmf2::SCHEMA_DATA_BOOL() SCHEMA_DATA_INT = Cqmf2::SCHEMA_DATA_INT() SCHEMA_DATA_FLOAT = Cqmf2::SCHEMA_DATA_FLOAT() SCHEMA_DATA_STRING = Cqmf2::SCHEMA_DATA_STRING() SCHEMA_DATA_MAP = Cqmf2::SCHEMA_DATA_MAP() SCHEMA_DATA_LIST = Cqmf2::SCHEMA_DATA_LIST() SCHEMA_DATA_UUID = Cqmf2::SCHEMA_DATA_UUID() ACCESS_READ_CREATE = Cqmf2::ACCESS_READ_CREATE() ACCESS_READ_WRITE = Cqmf2::ACCESS_READ_WRITE() ACCESS_READ_ONLY = Cqmf2::ACCESS_READ_ONLY() DIR_IN = Cqmf2::DIR_IN() DIR_OUT = Cqmf2::DIR_OUT() DIR_IN_OUT = Cqmf2::DIR_IN_OUT() SEV_EMERG = Cqmf2::SEV_EMERG() SEV_ALERT = Cqmf2::SEV_ALERT() SEV_CRIT = Cqmf2::SEV_CRIT() SEV_ERROR = Cqmf2::SEV_ERROR() SEV_WARN = Cqmf2::SEV_WARN() SEV_NOTICE = Cqmf2::SEV_NOTICE() SEV_INFORM = Cqmf2::SEV_INFORM() SEV_DEBUG = Cqmf2::SEV_DEBUG() ##============================================================================== ## EXCEPTIONS ##============================================================================== class QmfAgentException < RuntimeError attr :data def initialize(data) @data = data end def to_s "QmfAgentException: #{@data}" end end ##============================================================================== ## AGENT HANDLER ##============================================================================== class AgentHandler def initialize(session) @_session = session @_running = false @_thread = nil end ## ## Call the "start" method to run the handler on a new thread. ## def start @_thread = Thread.new do run end end ## ## Request that the running thread complete and exit. ## def cancel @_running = false @_thread.join if @_thread @_thread = nil end ## ## Call the "run" method only if you want the handler to run on your own thread. ## def run @_running = true event = Cqmf2::AgentEvent.new while @_running do valid = @_session.impl.nextEvent(event, Cqpid::Duration.SECOND) if valid and @_running case event.getType when Cqmf2::AGENT_AUTH_QUERY yes = authorize_query(Query.new(event.getQuery()), event.getUserId()) if yes == true @_session.impl.authAccept(event) else @_session.impl.authReject(event) end when Cqmf2::AGENT_QUERY context = QueryContext.new(@_session, event) get_query(context, Query.new(event.getQuery()), event.getUserId()) when Cqmf2::AGENT_METHOD context = MethodContext.new(@_session, event) begin method_call(context, event.getMethodName(), event.getDataAddr(), event.getArguments(), event.getUserId()) rescue Exception => ex @_session.impl.raiseException(event, "#{ex}") end end end end end ## ## The following methods are intended to be overridden in a sub-class. They are ## handlers for events that occur on QMF consoles. ## # # This method will only be invoked if the "allow-queries" option is enabled on the # agent session. When invoked, it provides the query and the authenticated user-id # of the querying client. # # This method must return true if the query is permitted, false otherwise. # def authorize_query(query, user_id); end # # This method will only be invoked if the "external" option is "True" on the agent # session. When invoked, the method should begin the process of responding to a data # query. The authenticated user-id of the requestor is provided for informational # purposes. The 'context' variable is used to provide the results back to the requestor. # # For each matching Data object, call context.response(data). When the query is complete, # call context.complete(). After completing the query, you should not use 'context' any # longer. # # Note: It is not necessary to process the query synchronously. If desired, this method # may store the context for asynchronous processing or pass it to another thread for # processing. There is no restriction on the number of contexts that may be in-flight # concurrently. # def get_query(context, query, user_id); end # # This method is invoked when a console calls a QMF method on the agent. Supplied are # a context for the response, the method name, the data address of the data object being # called, the input arguments (a dictionary), and the caller's authenticated user-id. # # A method call can end one of two ways: Successful completion, in which the output # arguments (if any) are supplied; and Exceptional completion if there is an error. # # Successful Completion: # For each output argument, assign the value directly to context (context.arg1 = "value") # Once arguments are assigned, call context._success(). # # Exceptional Completion: # Method 1: Call context._exception(data) where 'data' is a string or a Data object. # Method 2: Raise an exception (raise "Error Text") synchronously in the method body. # # Note: Like get_query, method_call may process methods synchronously or asynchronously. # This method may store the context for later asynchronous processing. There is no # restriction on the number of contexts that may be in-flight concurrently. # # However, "Method 2" for Exceptional Completion can only be done synchronously. # def method_call(context, method_name, data_addr, args, user_id); end end class QueryContext def initialize(agent, context) @agent = agent @context = context end def response(data) @agent.impl.response(@context, data.impl) end def complete @agent.impl.complete(@context) end end class MethodContext def initialize(agent, context) @agent = agent @context = context end def _success @agent.impl.methodSuccess(@context) end def _exception(ex) if ex.class == Data @agent.impl.raiseException(@context, ex.impl) else @agent.impl.raiseException(@context, ex) end end def method_missing(name_in, *args) name = name_in.to_s if name[name.length - 1] == 61 name = name[0..name.length - 2] @context.impl.addReturnArgument(name, args[0]) else super.method_missing(name_in, args) end end end ##============================================================================== ## CONSOLE HANDLER ##============================================================================== class ConsoleHandler def initialize(session) @_session = session @_running = false @_thread = nil end ## ## Call the "start" method to run the handler on a new thread. ## def start @_thread = Thread.new do run end end ## ## Request that the running thread complete and exit. ## def cancel @_running = false @_thread.join if @_thread @_thread = nil end ## ## Call the "run" method only if you want the handler to run on your own thread. ## def run @_running = true event = Cqmf2::ConsoleEvent.new while @_running do valid = @_session.impl.nextEvent(event, Cqpid::Duration.SECOND) if valid and @_running case event.getType when Cqmf2::CONSOLE_AGENT_ADD agent_added(Agent.new(event.getAgent)) when Cqmf2::CONSOLE_AGENT_DEL reason = :filter reason = :aged if event.getAgentDelReason == Cqmf2::AGENT_DEL_AGED agent_deleted(Agent.new(event.getAgent), reason) when Cqmf2::CONSOLE_AGENT_RESTART agent_restarted(Agent.new(event.getAgent)) when Cqmf2::CONSOLE_AGENT_SCHEMA_UPDATE agent_schema_updated(Agent.new(event.getAgent)) when Cqmf2::CONSOLE_EVENT event_raised(Agent.new(event.getAgent), Data.new(event.getData(0)), event.getTimestamp, event.getSeverity) end end end end ## ## The following methods are intended to be overridden in a sub-class. They are ## handlers for events that occur on QMF consoles. ## # # A new agent, whose attributes match the console's agent filter, has been discovered. # def agent_added(agent); end # # A known agent has been removed from the agent list. There are two possible reasons # for agent deletion: # # 1) :aged - The agent hasn't been heard from for the maximum age interval and is # presumed dead. # 2) :filter - The agent no longer matches the console's agent-filter and has been # effectively removed from the agent list. Such occurrences are likely # to be seen immediately after setting the filter to a new value. # def agent_deleted(agent, reason); end # # An agent-restart was detected. This occurs when the epoch number advertised by the # agent changes. It indicates that the agent in question was shut-down/crashed and # restarted. # def agent_restarted(agent); end # # The agent has registered new schema information which can now be queried, if desired. # def agent_schema_updated(agent); end # # An agent raised an event. The 'data' argument is a Data object that contains the # content of the event. # def event_raised(agent, data, timestamp, severity); end end ##============================================================================== ## CONSOLE SESSION ##============================================================================== class ConsoleSession attr_reader :impl ## The options string is of the form "{key:value,key:value}". The following keys are supported: ## ## domain:NAME - QMF Domain to join [default: "default"] ## max-agent-age:N - Maximum time, in minutes, that we will tolerate not hearing from ## an agent before deleting it [default: 5] ## listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default] ## If False: Listen only on the routable direct address ## strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network ## - If False: Operate more flexibly with regard to use of messaging facilities [default] ## def initialize(connection, options="") @impl = Cqmf2::ConsoleSession.new(connection, options) end def set_domain(domain) @impl.setDomain(domain) end def set_agent_filter(filter) @impl.setAgentFilter(filter) end def open() @impl.open end def close() @impl.close end def agents result = [] count = @impl.getAgentCount for i in 0...count result << Agent.new(@impl.getAgent(i)) end return result end def connected_broker_agent Agent.new(@impl.getConnectedBrokerAgent) end end ##============================================================================== ## AGENT SESSION ##============================================================================== class AgentSession attr_reader :impl ## The options string is of the form "{key:value,key:value}". The following keys are supported: ## ## interval:N - Heartbeat interval in seconds [default: 60] ## external:{True,False} - Use external data storage (queries and subscriptions are pass-through) [default: False] ## allow-queries:{True,False} - If True: automatically allow all queries [default] ## If False: generate an AUTH_QUERY event to allow per-query authorization ## allow-methods:{True,False} - If True: automatically allow all methods [default] ## If False: generate an AUTH_METHOD event to allow per-method authorization ## max-subscriptions:N - Maximum number of concurrent subscription queries permitted [default: 64] ## min-sub-interval:N - Minimum publish interval (in milliseconds) permitted for a subscription [default: 3000] ## sub-lifetime:N - Lifetime (in seconds with no keepalive) for a subscription [default: 300] ## public-events:{True,False} - If True: QMF events are sent to the topic exchange [default] ## If False: QMF events are only sent to authorized subscribers ## listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default] ## If False: Listen only on the routable direct address ## strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network ## - If False: Operate more flexibly with regard to use of messaging facilities [default] ## def initialize(connection, options="") @impl = Cqmf2::AgentSession.new(connection, options) end def set_domain(val) @impl.setDomain(val) end def set_vendor(val) @impl.setVendor(val) end def set_product(val) @impl.setProduct(val) end def set_instance(val) @impl.setInstance(val) end def set_attribute(key, val) @impl.setAttribute(key, val) end def open() @impl.open end def close() @impl.close end def register_schema(cls) @impl.registerSchema(cls.impl) end def add_data(data, name="", persistent=false) DataAddr.new(@impl.addData(data.impl, name, persistent)) end def del_data(addr) @impl.del_data(addr.impl) end def raise_event(data, severity=nil) if !severity @impl.raiseEvent(data.impl) else @impl.raiseEvent(data.impl, severity) end end end ##============================================================================== ## AGENT PROXY ##============================================================================== class Agent attr_reader :impl def initialize(impl) @impl = impl end def name() @impl.getName end def epoch() @impl.getEpoch end def vendor() @impl.getVendor end def product() @impl.getProduct end def instance() @impl.getInstance end def attributes() @impl.getAttributes end def to_s "#{vendor}:#{product}:#{instance}" end def query(q, timeout=30) if q.class == Query q_arg = q.impl else q_arg = q end dur = Cqpid::Duration.new(Cqpid::Duration.SECOND.getMilliseconds * timeout) result = @impl.query(q_arg, dur) raise QmfAgentException.new(Data.new(result.getData(0))) if result.getType == Cqmf2::CONSOLE_EXCEPTION raise "Protocol error, expected CONSOLE_QUERY_RESPONSE, got #{result.getType}" if result.getType != Cqmf2::CONSOLE_QUERY_RESPONSE data_list = [] count = result.getDataCount for i in 0...count data_list << Data.new(result.getData(i)) end return data_list end def load_schema_info(timeout=30) dur = Cqpid::Duration.new(Cqpid::Duration.SECOND.getMilliseconds * timeout) @impl.querySchema(dur) end def packages result = [] count = @impl.getPackageCount for i in 0...count result << @impl.getPackage(i) end return result end def schema_ids(package) result = [] count = @impl.getSchemaIdCount(package) for i in 0...count result << SchemaId.new(@impl.getSchemaId(package, i)) end return result end def schema(sid, timeout=30) dur = Cqpid::Duration.new(Cqpid::Duration.SECOND.getMilliseconds * timeout) Schema.new(@impl.getSchema(sid.impl, dur)) end end ##============================================================================== ## QUERY ##============================================================================== class Query attr_reader :impl def initialize(arg1, arg2=nil, arg3=nil) if arg1.class == Qmf2::DataAddr @impl = Cqmf2::Query.new(arg1.impl) end end def addr() DataAddr.new(@impl.getDataAddr()) end def schema_id() SchemaId.new(@impl.getSchemaId()) end def predicate() @impl.getPredicate() end def matches?(data) map = data map = data.properties if data.class == Data @impl.matchesPredicate(map) end end ##============================================================================== ## DATA ##============================================================================== class Data attr_reader :impl def initialize(arg=nil) @schema = nil if arg == nil @impl = Cqmf2::Data.new elsif arg.class == Cqmf2::Data @impl = arg elsif arg.class == Schema @impl = Cqmf2::Data.new(arg.impl) @schema = arg else raise "Unsupported initializer for Data" end end def to_s "#{@impl.getProperties}" end def schema_id if @impl.hasSchema return SchemaId.new(@impl.getSchemaId) end return nil end def set_addr(addr) @impl.setAddr(addr.impl) end def addr if @impl.hasAddr return DataAddr.new(@impl.getAddr) end return nil end def agent return Agent.new(@impl.getAgent) end def update(timeout=5) dur = Cqpid::Duration.new(Cqpid::Duration.SECOND.getMilliseconds * timeout) agent = @impl.getAgent query = Cqmf2::Query.new(@impl.getAddr) result = agent.query(query, dur) raise "Update query failed" if result.getType != Cqmf2::CONSOLE_QUERY_RESPONSE raise "Object no longer exists on agent" if result.getDataCount == 0 @impl = Cqmf2::Data.new(result.getData(0)) return nil end def properties return @impl.getProperties end def get_attr(name) @impl.getProperty(name) end def set_attr(name, v) @impl.setProperty(name, v) end def [](name) get_attr(name) end def []=(name, value) set_attr(name, value) end def _get_schema unless @schema raise "Data object has no schema" unless @impl.hasSchema @schema = Schema.new(@impl.getAgent.getSchema(@impl.getSchemaId)) end end def method_missing(name_in, *args) # # Convert the name to a string and determine if it represents an # attribute assignment (i.e. "attr=") # name = name_in.to_s attr_set = (name[name.length - 1] == 61) name = name[0..name.length - 2] if attr_set # # We'll be needing the schema to determine how to proceed. Get the schema. # Note that this call may block if the remote agent needs to be queried # for the schema (i.e. the schema isn't in the local cache). # _get_schema # # If the name matches a property name, set or return the value of the property. # @schema.properties.each do |prop| if prop.name == name if attr_set return set_attr(name, args[0]) else return get_attr(name) end end end # # If we still haven't found a match for the name, check to see if # it matches a method name. If so, marshall the arguments and invoke # the method. # @schema.methods.each do |method| if method.name == name raise "Sets not permitted on methods" if attr_set result = @impl.getAgent.callMethod(name, _marshall(method, args), @impl.getAddr) if result.getType == Cqmf2::CONSOLE_EXCEPTION raise QmfAgentException, result.getData(0) end return result.getArguments end end # # This name means nothing to us, pass it up the line to the parent # class's handler. # super.method_missing(name_in, args) end # # Convert a Ruby array of arguments (positional) into a Value object of type "map". # private def _marshall(schema, args) count = 0 schema.arguments.each do |arg| if arg.direction == DIR_IN || arg.direction == DIR_IN_OUT count += 1 end end raise "Wrong number of arguments: expecter #{count}, got #{arge.length}" if count != args.length map = {} count = 0 schema.arguments.each do |arg| if arg.direction == DIR_IN || arg.direction == DIR_IN_OUT map[arg.name] = args[count] count += 1 end end return map end end ##============================================================================== ## DATA ADDRESS ##============================================================================== class DataAddr attr_reader :impl def initialize(arg, agentName="") if arg.class == Hash @impl = Cqmf2::DataAddr.new(arg) elsif arg.class == Cqmf2::DataAddr @impl = arg else @impl = Cqmf2::DataAddr.new(arg, agentName) end end def ==(other) return @impl == other.impl end def as_map() @impl.asMap end def agent_name() @impl.getAgentName end def name() @impl.getName end def agent_epoch() @impl.getAgentEpoch end end ##============================================================================== ## SCHEMA ID ##============================================================================== class SchemaId attr_reader :impl def initialize(impl) @impl = impl end def type() @impl.getType end def package_name() @impl.getPackageName end def class_name() @impl.getName end def hash() @impl.getHash end end ##============================================================================== ## SCHEMA ##============================================================================== class Schema attr_reader :impl def initialize(arg, packageName="", className="", kwargs={}) if arg.class == Cqmf2::Schema @impl = arg else @impl = Cqmf2::Schema.new(arg, packageName, className) @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc) @impl.setDefaultSeverity(kwargs[:sev]) if kwargs.include?(:sev) end end def finalize() @impl.finalize end def schema_id() SchemaId.new(@impl.getSchemaId) end def desc() @impl.getDesc end def sev() @impl.getDefaultSeverity end def add_property(prop) @impl.addProperty(prop.impl) end def add_method(meth) @impl.addMethod(meth.impl) end def properties result = [] count = @impl.getPropertyCount for i in 0...count result << SchemaProperty.new(@impl.getProperty(i)) end return result end def methods result = [] count = @impl.getMethodCount for i in 0...count result << SchemaMethod.new(@impl.getMethod(i)) end return result end end ##============================================================================== ## SCHEMA PROPERTY ##============================================================================== class SchemaProperty attr_reader :impl def initialize(arg, dtype=nil, kwargs={}) if arg.class == Cqmf2::SchemaProperty @impl = arg else @impl = Cqmf2::SchemaProperty.new(arg, dtype) @impl.setAccess(kwargs[:access]) if kwargs.include?(:access) @impl.setIndex(kwargs[:index]) if kwargs.include?(:index) @impl.setOptional(kwargs[:optional]) if kwargs.include?(:optional) @impl.setUnit(kwargs[:unit]) if kwargs.include?(:unit) @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc) @impl.setSubtype(kwargs[:subtype]) if kwargs.include?(:subtype) @impl.setDirection(kwargs[:direction]) if kwargs.include?(:direction) end end def name() @impl.getName end def access() @impl.getAccess end def index?() @impl.isIndex end def optional?() @impl.isOptional end def unit() @impl.getUnit end def desc() @impl.getDesc end def subtype() @impl.getSubtype end def direction() @impl.getDirection end def to_s name end end ##============================================================================== ## SCHEMA METHOD ##============================================================================== class SchemaMethod attr_reader :impl def initialize(arg, kwargs={}) if arg.class == Cqmf2::SchemaMethod @impl = arg else @impl = Cqmf2::SchemaMethod.new(arg) @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc) end end def name() @impl.getName end def desc() @impl.getDesc end def add_argument(arg) @impl.addArgument(arg.impl) end def arguments result = [] count = @impl.getArgumentCount for i in 0...count result << SchemaProperty.new(@impl.getArgument(i)) end return result end def to_s name end end end qpidc-0.16/bindings/qmf2/ruby/ruby.i0000664000076400007640000000222711446530160017715 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %module cqmf2 %include "std_string.i" %include "../../swig_ruby_typemaps.i" /* Define the general-purpose exception handling */ %exception { try { $action } catch (qpid::types::Exception& mex) { static VALUE qmferror = rb_define_class("QmfError", rb_eStandardError); rb_raise(qmferror, mex.what()); } } %include "../qmf2.i" qpidc-0.16/bindings/qmf2/ruby/CMakeLists.txt0000664000076400007640000000327211654522741021332 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ##------------------------------------------------------ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") swig_add_module(cqmf2_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i) swig_link_libraries(cqmf2_ruby qmf2 ${RUBY_LIBRARY}) set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include") ##---------------------------------- ## Install the complete Ruby binding ##---------------------------------- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqmf2_ruby.so RENAME cqmf2.so DESTINATION ${RUBY_ARCH_DIR} COMPONENT ${QPID_COMPONENT_CLIENT} ) qpidc-0.16/bindings/qmf2/qmf2.i0000664000076400007640000000343011564611351016620 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %{ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include %} %include %include %include %include %include %include %include %include %include %include %include %include %include %include %include %include %include %include %include %{ using namespace qmf; %}; qpidc-0.16/bindings/swig_ruby_typemaps.i0000664000076400007640000002243111701076501021037 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %wrapper %{ #include VALUE MapToRb(const qpid::types::Variant::Map*); VALUE ListToRb(const qpid::types::Variant::List*); void RbToMap(VALUE, qpid::types::Variant::Map*); void RbToList(VALUE, qpid::types::Variant::List*); qpid::types::Variant RbToVariant(VALUE value) { switch (TYPE(value)) { case T_FLOAT: return qpid::types::Variant(NUM2DBL(value)); case T_STRING: return qpid::types::Variant(StringValuePtr(value)); case T_FIXNUM: return qpid::types::Variant((int64_t) FIX2LONG(value)); case T_BIGNUM: return qpid::types::Variant((int64_t) NUM2LL(value)); case T_TRUE: return qpid::types::Variant(true); case T_FALSE: return qpid::types::Variant(false); case T_HASH: { qpid::types::Variant::Map map; RbToMap(value, &map); return qpid::types::Variant(map); } case T_ARRAY: { qpid::types::Variant::List list; RbToList(value, &list); return qpid::types::Variant(list); } default: return qpid::types::Variant(); } } VALUE VariantToRb(const qpid::types::Variant* v) { VALUE result = Qnil; try { switch (v->getType()) { case qpid::types::VAR_VOID: { result = Qnil; break; } case qpid::types::VAR_BOOL : { result = v->asBool() ? Qtrue : Qfalse; break; } case qpid::types::VAR_UINT8 : case qpid::types::VAR_UINT16 : case qpid::types::VAR_UINT32 : { result = UINT2NUM(v->asUint32()); break; } case qpid::types::VAR_UINT64 : { result = ULL2NUM(v->asUint64()); break; } case qpid::types::VAR_INT8 : case qpid::types::VAR_INT16 : case qpid::types::VAR_INT32 : { result = INT2NUM(v->asInt32()); break; } case qpid::types::VAR_INT64 : { result = LL2NUM(v->asInt64()); break; } case qpid::types::VAR_FLOAT : { result = rb_float_new((double) v->asFloat()); break; } case qpid::types::VAR_DOUBLE : { result = rb_float_new(v->asDouble()); break; } case qpid::types::VAR_STRING : { const std::string val(v->asString()); result = rb_str_new(val.c_str(), val.size()); break; } case qpid::types::VAR_MAP : { result = MapToRb(&(v->asMap())); break; } case qpid::types::VAR_LIST : { result = ListToRb(&(v->asList())); break; } case qpid::types::VAR_UUID : { } } } catch (qpid::types::Exception& ex) { static VALUE error = rb_define_class("Error", rb_eStandardError); rb_raise(error, ex.what()); } return result; } VALUE MapToRb(const qpid::types::Variant::Map* map) { VALUE result = rb_hash_new(); qpid::types::Variant::Map::const_iterator iter; for (iter = map->begin(); iter != map->end(); iter++) { const std::string key(iter->first); VALUE rbval = VariantToRb(&(iter->second)); rb_hash_aset(result, rb_str_new(key.c_str(), key.size()), rbval); } return result; } VALUE ListToRb(const qpid::types::Variant::List* list) { VALUE result = rb_ary_new2(list->size()); qpid::types::Variant::List::const_iterator iter; for (iter = list->begin(); iter != list->end(); iter++) { VALUE rbval = VariantToRb(&(*iter)); rb_ary_push(result, rbval); } return result; } VALUE HashIter(VALUE data_ary, VALUE context) { VALUE key = rb_ary_entry(data_ary, 0); VALUE val = rb_ary_entry(data_ary, 1); qpid::types::Variant::Map* map((qpid::types::Variant::Map*) context); (*map)[std::string(StringValuePtr(key))] = RbToVariant(val); return data_ary; } VALUE AryIter(VALUE data, VALUE context) { qpid::types::Variant::List* list((qpid::types::Variant::List*) context); list->push_back(RbToVariant(data)); return data; } void RbToMap(VALUE hash, qpid::types::Variant::Map* map) { map->clear(); rb_iterate(rb_each, hash, (VALUE(*)(ANYARGS))HashIter, (VALUE) map); } void RbToList(VALUE ary, qpid::types::Variant::List* list) { list->clear(); rb_iterate(rb_each, ary, (VALUE(*)(ANYARGS))AryIter, (VALUE) list); } %} %typemap (in) void * { $1 = (void *) $input; } %typemap (out) void * { $result = (VALUE) $1; } %typemap (in) uint8_t { $1 = NUM2UINT ($input); } %typemap (out) uint8_t { $result = UINT2NUM((uint8_t) $1); } %typemap (in) int8_t { $1 = NUM2INT ($input); } %typemap (out) int8_t { $result = INT2NUM((int8_t) $1); } %typemap (in) uint16_t { $1 = NUM2UINT ($input); } %typemap (out) uint16_t { $result = UINT2NUM((uint16_t) $1); } %typemap (in) uint32_t { if (TYPE($input) == T_BIGNUM) $1 = NUM2UINT($input); else $1 = FIX2UINT($input); } %typemap (out) uint32_t { $result = UINT2NUM((uint32_t) $1); } %typemap (in) int32_t { if (TYPE($input) == T_BIGNUM) $1 = NUM2INT($input); else $1 = FIX2INT($input); } %typemap (out) int32_t { $result = INT2NUM((int32_t) $1); } %typemap (typecheck, precedence=SWIG_TYPECHECK_INTEGER) uint32_t { $1 = FIXNUM_P($input); } %typemap (in) uint64_t { if (TYPE($input) == T_BIGNUM) $1 = NUM2ULL($input); else $1 = (uint64_t) FIX2ULONG($input); } %typemap (out) uint64_t { $result = ULL2NUM((uint64_t) $1); } %typemap (in) int64_t { if (TYPE($input) == T_BIGNUM) $1 = NUM2LL($input); else $1 = (int64_t) FIX2LONG($input); } %typemap (out) int64_t { $result = LL2NUM((int64_t) $1); } /* * Variant types: C++ --> Ruby */ %typemap(out) qpid::types::Variant::Map { $result = MapToRb(&$1); } %typemap(out) qpid::types::Variant::Map& { $result = MapToRb($1); } %typemap(out) qpid::types::Variant::List { $result = ListToRb(&$1); } %typemap(out) qpid::types::Variant::List& { $result = ListToRb($1); } %typemap(out) qpid::types::Variant& { $result = VariantToRb($1); } /* * Variant types: Ruby --> C++ */ %typemap(in) qpid::types::Variant& { $1 = new qpid::types::Variant(RbToVariant($input)); } %typemap(in) qpid::types::Variant::Map& { $1 = new qpid::types::Variant::Map(); RbToMap($input, $1); } %typemap(in) qpid::types::Variant::List& { $1 = new qpid::types::Variant::List(); RbToList($input, $1); } %typemap(in) const qpid::types::Variant::Map const & { $1 = new qpid::types::Variant::Map(); RbToMap($input, $1); } %typemap(in) const qpid::types::Variant::List const & { $1 = new qpid::types::Variant::List(); RbToList($input, $1); } %typemap(freearg) qpid::types::Variant& { delete $1; } %typemap(freearg) qpid::types::Variant::Map& { delete $1; } %typemap(freearg) qpid::types::Variant::List& { delete $1; } /* * Variant types: typecheck maps */ %typemap(typecheck) qpid::types::Variant::Map& { $1 = (TYPE($input) == T_HASH) ? 1 : 0; } %typemap(typecheck) qpid::types::Variant::List& { $1 = (TYPE($input) == T_ARRAY) ? 1 : 0; } %typemap(typecheck) qpid::types::Variant& { $1 = (TYPE($input) == T_FLOAT || TYPE($input) == T_STRING || TYPE($input) == T_FIXNUM || TYPE($input) == T_BIGNUM || TYPE($input) == T_TRUE || TYPE($input) == T_FALSE) ? 1 : 0; } %typemap(typecheck) qpid::types::Variant::Map const & { $1 = (TYPE($input) == T_HASH) ? 1 : 0; } %typemap(typecheck) qpid::types::Variant::List const & { $1 = (TYPE($input) == T_ARRAY) ? 1 : 0; } %typemap(typecheck) const qpid::types::Variant const & { $1 = (TYPE($input) == T_FLOAT || TYPE($input) == T_STRING || TYPE($input) == T_FIXNUM || TYPE($input) == T_BIGNUM || TYPE($input) == T_TRUE || TYPE($input) == T_FALSE) ? 1 : 0; } %typemap(typecheck) bool { $1 = (TYPE($input) == T_TRUE || TYPE($input) == T_FALSE) ? 1 : 0; } %typemap (typecheck, precedence=SWIG_TYPECHECK_INTEGER) uint64_t { $1 = FIXNUM_P($input); } qpidc-0.16/bindings/qpid/0000775000076400007640000000000011752725721015677 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/0000775000076400007640000000000011752725721017174 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/Makefile.in0000664000076400007640000004674511752725661021264 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings/qpid/dotnet DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = configure-windows.ps1 \ examples/csharp.direct.receiver/csharp.direct.receiver.cs \ examples/csharp.direct.receiver/Properties/AssemblyInfo.cs \ examples/csharp.direct.sender/csharp.direct.sender.cs \ examples/csharp.direct.sender/Properties/AssemblyInfo.cs \ examples/csharp.example.client/csharp.example.client.cs \ examples/csharp.example.client/Properties/AssemblyInfo.cs \ examples/csharp.example.declare_queues/csharp.example.declare_queues.cs \ examples/csharp.example.declare_queues/Properties/AssemblyInfo.cs \ examples/csharp.example.drain/csharp.example.drain.cs \ examples/csharp.example.drain/Options.cs \ examples/csharp.example.drain/Properties/AssemblyInfo.cs \ examples/csharp.example.helloworld/csharp.example.helloworld.cs \ examples/csharp.example.helloworld/Properties/AssemblyInfo.cs \ examples/csharp.example.server/csharp.example.server.cs \ examples/csharp.example.server/Properties/AssemblyInfo.cs \ examples/csharp.example.spout/csharp.example.spout.cs \ examples/csharp.example.spout/Options.cs \ examples/csharp.example.spout/Properties/AssemblyInfo.cs \ examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs \ examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs \ examples/csharp.map.callback.sender/csharp.map.callback.sender.cs \ examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs \ examples/csharp.map.receiver/csharp.map.receiver.cs \ examples/csharp.map.receiver/Properties/AssemblyInfo.cs \ examples/csharp.map.sender/csharp.map.sender.cs \ examples/csharp.map.sender/Properties/AssemblyInfo.cs \ examples/msvc10/csharp.direct.receiver/app.config \ examples/msvc10/csharp.direct.receiver/csharp.direct.receiver.csproj \ examples/msvc10/csharp.direct.sender/app.config \ examples/msvc10/csharp.direct.sender/csharp.direct.sender.csproj \ examples/msvc10/csharp.example.client/app.config \ examples/msvc10/csharp.example.client/csharp.example.client.csproj \ examples/msvc10/csharp.example.declare_queues/app.config \ examples/msvc10/csharp.example.declare_queues/csharp.example.declare_queues.csproj \ examples/msvc10/csharp.example.drain/app.config \ examples/msvc10/csharp.example.drain/csharp.example.drain.csproj \ examples/msvc10/csharp.example.helloworld/app.config \ examples/msvc10/csharp.example.helloworld/csharp.example.helloworld.csproj \ examples/msvc10/csharp.example.server/app.config \ examples/msvc10/csharp.example.server/csharp.example.server.csproj \ examples/msvc10/csharp.example.spout/app.config \ examples/msvc10/csharp.example.spout/csharp.example.spout.csproj \ examples/msvc10/csharp.map.callback.receiver/app.config \ examples/msvc10/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj \ examples/msvc10/csharp.map.callback.sender/app.config \ examples/msvc10/csharp.map.callback.sender/csharp.map.callback.sender.csproj \ examples/msvc10/csharp.map.receiver/app.config \ examples/msvc10/csharp.map.receiver/csharp.map.receiver.csproj \ examples/msvc10/csharp.map.sender/app.config \ examples/msvc10/csharp.map.sender/csharp.map.sender.csproj \ examples/msvc9/csharp.direct.receiver/csharp.direct.receiver.csproj \ examples/msvc9/csharp.direct.sender/csharp.direct.sender.csproj \ examples/msvc9/csharp.example.client/csharp.example.client.csproj \ examples/msvc9/csharp.example.declare_queues/csharp.example.declare_queues.csproj \ examples/msvc9/csharp.example.drain/csharp.example.drain.csproj \ examples/msvc9/csharp.example.helloworld/csharp.example.helloworld.csproj \ examples/msvc9/csharp.example.server/csharp.example.server.csproj \ examples/msvc9/csharp.example.spout/csharp.example.spout.csproj \ examples/msvc9/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj \ examples/msvc9/csharp.map.callback.sender/csharp.map.callback.sender.csproj \ examples/msvc9/csharp.map.receiver/csharp.map.receiver.csproj \ examples/msvc9/csharp.map.sender/csharp.map.sender.csproj \ Makefile.am \ msvc10/org.apache.qpid.messaging.sessionreceiver.sln \ msvc10/org.apache.qpid.messaging.sln \ msvc9/org.apache.qpid.messaging.sessionreceiver.sln \ msvc9/org.apache.qpid.messaging.sln \ ReadMe.txt \ src/Address.cpp \ src/Address.h \ src/app.rc \ src/AssemblyInfo.cpp \ src/Connection.cpp \ src/Connection.h \ src/Duration.h \ src/FailoverUpdates.cpp \ src/FailoverUpdates.h \ src/Message.cpp \ src/Message.h \ src/msvc10/org.apache.qpid.messaging.vcxproj \ src/msvc10/org.apache.qpid.messaging.vcxproj.filters \ src/msvc9/org.apache.qpid.messaging.vcproj \ src/org.apache.qpid.messaging.template.rc \ src/qpid.snk \ src/QpidException.h \ src/QpidMarshal.h \ src/QpidTypeCheck.h \ src/ReadMe.txt \ src/Receiver.cpp \ src/Receiver.h \ src/resource1.h \ src/Sender.cpp \ src/Sender.h \ src/Session.cpp \ src/Session.h \ src/sessionreceiver/msvc10/org.apache.qpid.messaging.sessionreceiver.csproj \ src/sessionreceiver/msvc9/org.apache.qpid.messaging.sessionreceiver.csproj \ src/sessionreceiver/Properties/sessionreceiver-AssemblyInfo-template.cs \ src/sessionreceiver/qpid.snk \ src/sessionreceiver/sessionreceiver.cs \ src/TypeTranslator.cpp \ src/TypeTranslator.h \ test/messaging.test/messaging.test.address.cs \ test/messaging.test/messaging.test.connection.cs \ test/messaging.test/messaging.test.cs \ test/messaging.test/messaging.test.duration.cs \ test/messaging.test/messaging.test.message.cs \ test/messaging.test/msvc10/messaging.test.csproj \ test/messaging.test/msvc9/messaging.test.csproj \ test/messaging.test/Properties/AssemblyInfo.cs \ winsdk_sources/msvc10/examples/csharp.direct.receiver/csharp.direct.receiver.csproj \ winsdk_sources/msvc10/examples/csharp.direct.sender/csharp.direct.sender.csproj \ winsdk_sources/msvc10/examples/csharp.example.client/csharp.example.client.csproj \ winsdk_sources/msvc10/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj \ winsdk_sources/msvc10/examples/csharp.example.drain/csharp.example.drain.csproj \ winsdk_sources/msvc10/examples/csharp.example.helloworld/csharp.example.helloworld.csproj \ winsdk_sources/msvc10/examples/csharp.example.server/csharp.example.server.csproj \ winsdk_sources/msvc10/examples/csharp.example.spout/csharp.example.spout.csproj \ winsdk_sources/msvc10/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj \ winsdk_sources/msvc10/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj \ winsdk_sources/msvc10/examples/csharp.map.receiver/csharp.map.receiver.csproj \ winsdk_sources/msvc10/examples/csharp.map.sender/csharp.map.sender.csproj \ winsdk_sources/msvc10/winsdk_dotnet_examples.sln \ winsdk_sources/msvc9/examples/csharp.direct.receiver/csharp.direct.receiver.csproj \ winsdk_sources/msvc9/examples/csharp.direct.sender/csharp.direct.sender.csproj \ winsdk_sources/msvc9/examples/csharp.example.client/csharp.example.client.csproj \ winsdk_sources/msvc9/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj \ winsdk_sources/msvc9/examples/csharp.example.drain/csharp.example.drain.csproj \ winsdk_sources/msvc9/examples/csharp.example.helloworld/csharp.example.helloworld.csproj \ winsdk_sources/msvc9/examples/csharp.example.server/csharp.example.server.csproj \ winsdk_sources/msvc9/examples/csharp.example.spout/csharp.example.spout.csproj \ winsdk_sources/msvc9/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj \ winsdk_sources/msvc9/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj \ winsdk_sources/msvc9/examples/csharp.map.receiver/csharp.map.receiver.csproj \ winsdk_sources/msvc9/examples/csharp.map.sender/csharp.map.sender.csproj \ winsdk_sources/msvc9/winsdk_dotnet_examples.sln \ ../../../src/windows/resources/qpid-icon.ico \ ../../../src/windows/resources/template-resource.rc \ ../../../src/windows/resources/version-resource.h 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qpid/dotnet/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qpid/dotnet/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: qpidc-0.16/bindings/qpid/dotnet/src/0000775000076400007640000000000011752725721017763 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/src/TypeTranslator.h0000664000076400007640000000506611674416657023146 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include #include "qpid/types/Variant.h" #include "QpidTypeCheck.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// TypeTranslator provides codec between .NET Dictionary/List and /// qpid messaging Map/List. /// public ref class TypeTranslator sealed { private: TypeTranslator::TypeTranslator() {} public: // The given object is a managed Dictionary. // Add its elements to the qpid map. static void ManagedToNative(QpidMap ^ theDictionary, ::qpid::types::Variant::Map & qpidMap); // The given object is a managed List. // Add its elements to the qpid list. static void ManagedToNative(QpidList ^ theList, ::qpid::types::Variant::List & qpidList); // The given object is a simple managed type (not a Dictionary or List) // Returns a variant representing simple native type object. static void ManagedToNativeObject(System::Object ^ managedValue, ::qpid::types::Variant & qpidVariant); // The given object is a qpid map. // Add its elements to the managed Dictionary. static void NativeToManaged(::qpid::types::Variant::Map & qpidMap, QpidMap ^ dict); // The given object is a qpid list. // Add its elements to the managed List. static void NativeToManaged(::qpid::types::Variant::List & qpidList, QpidList ^ managedList); }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/Session.h0000664000076400007640000001304711674416657021574 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include #include "qpid/messaging/Session.h" #include "qpid/messaging/Connection.h" #include "qpid/messaging/Duration.h" #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Sender.h" namespace qpid { namespace messaging { // Dummy class to satisfy linker class SessionImpl {}; }} namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Session is a managed wrapper for a ::qpid::messaging::Session /// ref class Address; ref class Connection; ref class Duration; ref class Receiver; ref class Sender; ref class Message; public ref class Session { private: // The kept object in the Messaging C++ DLL ::qpid::messaging::Session * nativeObjPtr; // The connection that created this session Connection ^ parentConnectionp; // per-instance lock object System::Object ^ privateLock; // Disallow use after object is destroyed void ThrowIfDisposed(); public: // unmanaged clone Session(const ::qpid::messaging::Session & nativeObjPtr, Connection ^ connRef); // copy constructor Session(const Session ^ session); Session(const Session % session); ~Session(); !Session(); // assignment operator Session % operator=(const Session % rhs) { msclr::lock lk(privateLock); ThrowIfDisposed(); if (this == %rhs) { // Self assignment, do nothing } else { if (NULL != nativeObjPtr) delete nativeObjPtr; nativeObjPtr = new ::qpid::messaging::Session( *(const_cast(rhs).NativeSession) ); parentConnectionp = rhs.parentConnectionp; } return *this; } // // IsDisposed // property bool IsDisposed { bool get() { return NULL == nativeObjPtr; } } // // NativeSession // property ::qpid::messaging::Session * NativeSession { ::qpid::messaging::Session * get () { return nativeObjPtr; } } void Close(); void Commit(); void Rollback(); void Acknowledge(); void Acknowledge(bool sync); void Acknowledge(Message ^ message); void Acknowledge(Message ^ message, bool sync); void AcknowledgeUpTo(Message ^ message); void AcknowledgeUpTo(Message ^ message, bool sync); void Reject(Message ^); void Release(Message ^); void Sync(); void Sync(bool block); property System::UInt32 Receivable { System::UInt32 get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getReceivable(); } } property System::UInt32 UnsettledAcks { System::UInt32 get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getUnsettledAcks(); } } // next(receiver) bool NextReceiver(Receiver ^ rcvr); bool NextReceiver(Receiver ^ rcvr, Duration ^ timeout); // receiver = next() Receiver ^ NextReceiver(); Receiver ^ NextReceiver(Duration ^ timeout); Sender ^ CreateSender(System::String ^ address); Sender ^ CreateSender(Address ^ address); Receiver ^ CreateReceiver(System::String ^ address); Receiver ^ CreateReceiver(Address ^ address); Sender ^ GetSender(System::String ^ name); Receiver ^ GetReceiver(System::String ^ name); property Org::Apache::Qpid::Messaging::Connection ^ Connection { Org::Apache::Qpid::Messaging::Connection ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return parentConnectionp; } } property System::Boolean HasError { System::Boolean get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->hasError(); } } void CheckError(); }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/QpidMarshal.h0000664000076400007640000000333211674416657022352 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once using namespace System; using namespace System::Text; namespace Org { namespace Apache { namespace Qpid { namespace Messaging { // Helper functions for marshaling. private ref class QpidMarshal { private: QpidMarshal::QpidMarshal() {} public: /// /// Convert managed String into native UTF8-encoded string /// TODO: figure out some encoding other than UTF-8 /// static std::string ToNative (System::String^ managed) { if (managed->Length == 0) { return std::string(); } array^ mbytes = Encoding::UTF8->GetBytes(managed); if (mbytes->Length == 0) { return std::string(); } pin_ptr pinnedBuf = &mbytes[0]; std::string native((char *) pinnedBuf, mbytes->Length); return native; } }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/FailoverUpdates.h0000664000076400007640000000427711674416657023253 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// FailoverUpdates is a managed wrapper for a qpid::messaging::FailoverUpdates /// ref class Connection; public ref class FailoverUpdates { private: // The kept object in the Messaging C++ DLL ::qpid::messaging::FailoverUpdates * nativeObjPtr; // per-instance lock object System::Object ^ privateLock; // Disallow use after object is destroyed void ThrowIfDisposed(); public: FailoverUpdates(Connection ^ connection); ~FailoverUpdates(); !FailoverUpdates(); // // IsDisposed // property bool IsDisposed { bool get() { return NULL == nativeObjPtr; } } private: // unmanaged clone // not defined // copy constructor FailoverUpdates(const FailoverUpdates ^ failoverUpdates) {} FailoverUpdates(const FailoverUpdates % failoverUpdates) {} // assignment operator FailoverUpdates % operator=(const FailoverUpdates % rhs) { return *this; } }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/sessionreceiver/0000775000076400007640000000000011752725721023173 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/src/sessionreceiver/Properties/0000775000076400007640000000000011752725721025327 5ustar00jrossjross00000000000000sessionreceiver-AssemblyInfo-template.cs0000664000076400007640000000467011454621516035214 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/src/sessionreceiver/Properties/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Org.Apache.Qpid.Messaging.SessionReceiver")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Org.Apache.Qpid.Messaging.SessionReceiver")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("e18f363a-a9b0-4251-8f3c-de0e9d9d6827")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("${winver_PRODUCT_VERSION_N1}.${winver_PRODUCT_VERSION_N2}.${winver_PRODUCT_VERSION_N3}.${winver_PRODUCT_VERSION_N4}")] [assembly: AssemblyFileVersion("${winver_FILE_VERSION_N1}.${winver_FILE_VERSION_N2}.${winver_FILE_VERSION_N3}.${winver_FILE_VERSION_N4}")] qpidc-0.16/bindings/qpid/dotnet/src/sessionreceiver/sessionreceiver.cs0000664000076400007640000001056111472764374026743 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using System.Collections.Generic; using Org.Apache.Qpid.Messaging; namespace Org.Apache.Qpid.Messaging.SessionReceiver { /// /// ISessionReceiver interface defines the callback for users to supply. /// Once established this callback will receive all messages for all /// receivers defined by the current session. /// Users are expected not to 'fetch' or 'get' messages by any other means. /// Users must acknowledge() the Session's messages either in the callback /// function or by some other scheme. /// public interface ISessionReceiver { void SessionReceiver(Receiver receiver, Message message); } /// /// EventEngine - wait for messages from the underlying C++ code. /// When available get them and deliver them via callback to our /// client through the ISessionReceiver interface. /// This class consumes the thread that calls the Run() function. /// internal class EventEngine { private Session session; private ISessionReceiver callback; private bool keepRunning; public EventEngine(Session theSession, ISessionReceiver thecallback) { this.session = theSession; this.callback = thecallback; } /// /// Function to call Session's nextReceiver, discover messages, /// and to deliver messages through the callback. /// public void Open() { Receiver rcvr; Message msg; keepRunning = true; while (keepRunning) { rcvr = session.NextReceiver(DurationConstants.SECOND); if (null != rcvr) { if (keepRunning) { msg = rcvr.Fetch(DurationConstants.SECOND); this.callback.SessionReceiver(rcvr, msg); } } //else // receive timed out // EventEngine exits the nextReceiver() function periodically // in order to test the keepRunning flag } // Private thread is now exiting. } /// /// Function to stop the EventEngine. Private thread will exit within /// one second. /// public void Close() { keepRunning = false; } } /// /// server is the class that users instantiate to connect a SessionReceiver /// callback to the stream of received messages received on a Session. /// public class CallbackServer { private EventEngine ee; /// /// Constructor for the server. /// /// The Session whose messages are collected. /// The user function call with each message. /// public CallbackServer(Session session, ISessionReceiver callback) { ee = new EventEngine(session, callback); new System.Threading.Thread( new System.Threading.ThreadStart(ee.Open)).Start(); } /// /// Function to stop the server. /// public void Close() { ee.Close(); } } } qpidc-0.16/bindings/qpid/dotnet/src/sessionreceiver/msvc9/0000775000076400007640000000000011752725721024234 5ustar00jrossjross00000000000000org.apache.qpid.messaging.sessionreceiver.csproj0000664000076400007640000001361711656310053035524 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/src/sessionreceiver/msvc9 Debug AnyCPU 9.0.21022 2.0 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05} Library Properties org.apache.qpid.messaging.sessionreceiver org.apache.qpid.messaging.sessionreceiver v2.0 512 true ..\qpid.snk true full false $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE prompt 4 pdbonly true $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE prompt 4 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly AnyCPU prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/src/sessionreceiver/msvc10/0000775000076400007640000000000011752725721024304 5ustar00jrossjross00000000000000org.apache.qpid.messaging.sessionreceiver.csproj0000664000076400007640000001410711657030265035574 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/src/sessionreceiver/msvc10 Debug AnyCPU 9.0.21022 2.0 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05} Library Properties org.apache.qpid.messaging.sessionreceiver org.apache.qpid.messaging.sessionreceiver v4.0 512 true $(ProjectDir)..\qpid.snk 3.5 true full false $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE prompt 4 pdbonly true $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE prompt 4 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly AnyCPU prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/src/sessionreceiver/qpid.snk0000664000076400007640000000112411460351217024632 0ustar00jrossjross00000000000000$RSA2Mõ «2¦·6ך‚gB¸=ŽŠ“æl‘ûdVrëP(€<\ðpÍ¥íF‰ÃV¨‡{ »$HurµÍµëÁãÿ—ÞT”Q'¯«‰ ¤­AׄóÕ hªÌDŒi>Y³Õùಔ…¶Å½ ÆfC¹ÑwàP«óéæ]¹7. \Él¯¹#¿¯JC}?% 3"Ž?iý}ηÇ}X9îíïÁÑ…';vî©ôÉzÎ,×4¸Ôp"°gˆk6lãۛŞÕìVÜl´œêY` Ì4úDOëhDÚð §áÿ„¹¾¹‘SÀ(JŽH¦Lt~„„ûo± “l£9ª>3Î×=B蓦Æb1Üán"S@dàRçbò§ë{ m.ƃ$gîñ6–.1¤,û¬çí Ïka#ƒ¯“ÌGá/†¿µtæAxÎOàGÉc\D£å+§jÁFÉ)Ȇh¥0øRSS}‹ÉO.‡è‡7é“f˨pš5¢o¯J‘ u~•RŠO-õÀvVÒYM ßJë«õMgñmÝè«YV¹{j¥c-ÒÄЊ~"À]éïb‘lZª,=‚·Ø‰ìÖk•ٺвɹJúºxü;ãtbôíá´Ъ‡¬¡„v-$QnqÑæãÚ6`/í—‚¬ÑÊ+ˆ¾phB†‰vŒÑµ¨±Ž1U_÷"²t_6?©êç™~pNv²¢b 0ŒÅ5]ú¼öì@?RÞ±Ð;éÿjE뉷d¨qpidc-0.16/bindings/qpid/dotnet/src/Message.h0000664000076400007640000003010511674416657021527 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include #include "qpid/messaging/Message.h" #include "QpidMarshal.h" #include "Address.h" #include "Duration.h" #include "TypeTranslator.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { ref class Address; ref class Duration; /// /// Message is a managed wrapper for a ::qpid::messaging::Message /// public ref class Message { private: // The kept object in the Messaging C++ DLL ::qpid::messaging::Message * nativeObjPtr; // per-instance lock object System::Object ^ privateLock; // Disallow use after object is destroyed void ThrowIfDisposed(); public: // Create empty message Message(); // Create from String Message(System::String ^ theStr); // Create from object Message(System::Object ^ theValue); // Create from byte array Message(array ^ bytes); // Create from byte array slice Message(array ^ bytes, int offset, int size); // System destructor/finalizer entry points ~Message(); !Message(); // Copy constructor Message(const Message ^ message); Message(const Message % message); // unmanaged clone Message(const ::qpid::messaging::Message & msgp); // assignment operator Message % operator=(const Message % rhs) { msclr::lock lk(privateLock); ThrowIfDisposed(); if (this == %rhs) { // Self assignment, do nothing } else { if (NULL != nativeObjPtr) delete nativeObjPtr; nativeObjPtr = new ::qpid::messaging::Message( *(const_cast(rhs).NativeMessage) ); } return *this; } // // IsDisposed // property bool IsDisposed { bool get() { return NULL == nativeObjPtr; } } // // NativeMessage // property ::qpid::messaging::Message * NativeMessage { ::qpid::messaging::Message * get () { return nativeObjPtr; } } // // ReplyTo // property Address ^ ReplyTo { void set (Address ^ address) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setReplyTo(*(address->NativeAddress)); } Address ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); const ::qpid::messaging::Address & addrp = nativeObjPtr->::qpid::messaging::Message::getReplyTo(); return gcnew Address(addrp); } } // // Subject // property System::String ^ Subject { void set (System::String ^ subject) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setSubject(QpidMarshal::ToNative(subject)); } System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew String(nativeObjPtr->getSubject().c_str()); } } // // ContentType // property System::String ^ ContentType { void set (System::String ^ ct) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setContentType(QpidMarshal::ToNative(ct)); } System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew String(nativeObjPtr->::qpid::messaging::Message::getContentType().c_str()); } } // // MessageId // property System::String ^ MessageId { void set (System::String ^ messageId) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setMessageId(QpidMarshal::ToNative(messageId)); } System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew String(nativeObjPtr->getMessageId().c_str()); } } // // UserId // property System::String ^ UserId { void set (System::String ^ uId) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setUserId(QpidMarshal::ToNative(uId)); } System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew String(nativeObjPtr->getUserId().c_str()); } } // // CorrelationId // property System::String ^ CorrelationId { void set (System::String ^ correlationId) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setCorrelationId(QpidMarshal::ToNative(correlationId)); } System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew String(nativeObjPtr->getCorrelationId().c_str()); } } // // Priority // property unsigned char Priority { void set (unsigned char priority) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setPriority(priority); } unsigned char get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getPriority(); } } // // Ttl // property Duration ^ Ttl { void set (Duration ^ ttl) { msclr::lock lk(privateLock); ThrowIfDisposed(); ::qpid::messaging::Duration dur(ttl->Milliseconds); nativeObjPtr->setTtl(dur); } Duration ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); Duration ^ dur = gcnew Duration(nativeObjPtr->getTtl().getMilliseconds()); return dur; } } // // Durable // property bool Durable { void set (bool durable) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setDurable(durable); } bool get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getDurable(); } } // // Redelivered // property bool Redelivered { bool get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getRedelivered(); } void set (bool redelivered) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setRedelivered(redelivered); } } // // Property // void Message::SetProperty(System::String ^ name, System::Object ^ value); // // Properties // property System::Collections::Generic::Dictionary< System::String^, System::Object^> ^ Properties { System::Collections::Generic::Dictionary< System::String^, System::Object^> ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); ::qpid::types::Variant::Map map; map = nativeObjPtr->getProperties(); System::Collections::Generic::Dictionary< System::String^, System::Object^> ^ dict = gcnew System::Collections::Generic::Dictionary< System::String^, System::Object^> ; TypeTranslator::NativeToManaged(map, dict); return dict; } void set (System::Collections::Generic::Dictionary< System::String^, System::Object^> ^ properties) { msclr::lock lk(privateLock); ThrowIfDisposed(); for each (System::Collections::Generic::KeyValuePair kvp in properties) { SetProperty(kvp.Key, kvp.Value); } } } void SetContent(System::String ^ content); void SetContent(cli::array ^ bytes); void SetContent(cli::array ^ bytes, int offset, int size); //TODO:: void setContent(Bytes{} bytes, offset, length); // get content as string System::String ^ GetContent(); // get content as dictionary void GetContent(System::Collections::Generic::Dictionary< System::String^, System::Object^> ^ dict); // get content as map void GetContent(System::Collections::ObjectModel::Collection< System::Object^> ^); // get content as bytes void GetContent(cli::array ^ arr); // // ContentSize // property System::UInt64 ContentSize { System::UInt64 get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getContentSize(); } } // A message has been returned to managed code through GetContent(). // Display the content of that System::Object as a string. System::String ^ AsString(System::Object ^ obj); System::String ^ MapAsString(System::Collections::Generic::Dictionary< System::String^, System::Object^> ^ dict); System::String ^ ListAsString(System::Collections::ObjectModel::Collection< System::Object^> ^ list); //TODO: EncodingException // Note: encode/decode functions are in TypeTranslator }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/Message.cpp0000664000076400007640000004663611674660004022065 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include #include #include "qpid/messaging/Message.h" #include "qpid/types/Variant.h" #include "QpidMarshal.h" #include "Address.h" #include "Duration.h" #include "Message.h" #include "QpidTypeCheck.h" #include "QpidException.h" #include "TypeTranslator.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Message is a managed wrapper for a ::qpid::messaging::Message /// // Disallow access if object has been destroyed. void Message::ThrowIfDisposed() { if (IsDisposed) throw gcnew ObjectDisposedException (GetType()->FullName); } // Create empty message Message::Message() { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Message(QpidMarshal::ToNative("")); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Create from string Message::Message(System::String ^ theStr) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Message(QpidMarshal::ToNative(theStr)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Create from object Message::Message(System::Object ^ theValue) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Message(QpidMarshal::ToNative("")); if (QpidTypeCheck::ObjectIsMap(theValue)) { // Create a mapped message using given dictionary // Allocate a map ::qpid::types::Variant::Map newMap; // Add the map variables to the map TypeTranslator::ManagedToNative((QpidMap ^)theValue, newMap); // Set message content type nativeObjPtr->setContentType("ampq/map"); // Insert the map into the message ::qpid::messaging::encode(newMap, *nativeObjPtr, QpidMarshal::ToNative("amqp/map")); } else if (QpidTypeCheck::ObjectIsList(theValue)) { // Create a list message using given list // Allocate a list ::qpid::types::Variant::List newList; // Add the list variables to the list TypeTranslator::ManagedToNative((QpidList ^)theValue, newList); // Set message content type nativeObjPtr->setContentType("ampq/list"); // Insert the list into the message ::qpid::messaging::encode(newList, *nativeObjPtr, QpidMarshal::ToNative("amqp/list")); } else { // Create a binary string message nativeObjPtr->setContent(QpidMarshal::ToNative(theValue->ToString())); } } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Create from bytes Message::Message(array ^ bytes) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); pin_ptr pBytes = &bytes[0]; nativeObjPtr = new ::qpid::messaging::Message((char *)pBytes, bytes->Length); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Create from byte array slice Message::Message(array ^ bytes, int offset, int size) { if ((offset + size) > bytes->Length) throw gcnew QpidException("Message::Message Create from byte array slice: buffer length exceeded"); System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); pin_ptr pBytes = &bytes[offset]; nativeObjPtr = new ::qpid::messaging::Message((char *)pBytes, size); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // unmanaged clone Message::Message(const ::qpid::messaging::Message & msgp) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Message(msgp); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Destructor // Called by .NET Dispose() or C++ delete. Message::~Message() { this->!Message(); } // Finalizer // Called by Destructor or by System::GC Message::!Message() { if (NULL != nativeObjPtr) { msclr::lock lk(privateLock); if (NULL != nativeObjPtr) { delete nativeObjPtr; nativeObjPtr = NULL; } } } // Copy constructor look-alike (C#) Message::Message(const Message ^ message) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Message( *(const_cast(message)->NativeMessage)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Copy constructor implicitly dereferenced (C++) Message::Message(const Message % message) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Message( *(const_cast(message).NativeMessage)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Property void Message::SetProperty(System::String ^ name, System::Object ^ value) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { ::qpid::types::Variant entryValue; TypeTranslator::ManagedToNativeObject(value, entryValue); nativeObjPtr->getProperties()[QpidMarshal::ToNative(name)] = entryValue; } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Content void Message::SetContent(System::String ^ content) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->setContent(QpidMarshal::ToNative(content)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Message::SetContent(cli::array ^ bytes) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { pin_ptr pBytes = &bytes[0]; nativeObjPtr->setContent((char *)pBytes, bytes->Length); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Message::SetContent(cli::array ^ bytes, int offset, int size) { msclr::lock lk(privateLock); ThrowIfDisposed(); if ((offset + size) > bytes->Length) throw gcnew QpidException("Message::SetContent from byte array slice: buffer length exceeded"); System::Exception ^ newException = nullptr; try { pin_ptr pBytes = &bytes[offset]; nativeObjPtr->setContent((char *)pBytes, size); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } System::String ^ Message::GetContent() { msclr::lock lk(privateLock); ThrowIfDisposed(); System::String ^ result = nullptr; System::Exception ^ newException = nullptr; try { result = gcnew String(nativeObjPtr->getContent().c_str()); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } return result; } // // User wants to extract a Dictionary from the message // void Message::GetContent(System::Collections::Generic::Dictionary< System::String^, System::Object^> ^ dict) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { // Extract the message map from the message ::qpid::types::Variant::Map map; ::qpid::messaging::decode(*nativeObjPtr, map, QpidMarshal::ToNative("amqp/map")); TypeTranslator::NativeToManaged(map, dict); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // // User wants to extract a list from the message // void Message::GetContent(System::Collections::ObjectModel::Collection< System::Object^> ^ list) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { // allocate a native messaging::List ::qpid::types::Variant::List nativeList; // Extract the list from the message in native format ::qpid::messaging::decode(*nativeObjPtr, nativeList, QpidMarshal::ToNative("amqp/list")); // translate native list into user's managed list TypeTranslator::NativeToManaged(nativeList, list); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // // Return message content to raw byte array. // On entry, message size must not be zero and // caller's byte array size must be equal to message size. // void Message::GetContent(array ^ arr) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { System::UInt32 size = (System::UInt32) nativeObjPtr->getContentSize(); if (0 == size) throw gcnew QpidException("Message::GetRaw - message size is zero"); if (arr->Length != size) throw gcnew QpidException("Message::GetRaw - receive buffer is wrong size"); const char * pMsgSrc = nativeObjPtr->getContentPtr(); pin_ptr pArr = &arr[0]; memcpy(pArr, pMsgSrc, size); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } System::String ^ Message::MapAsString(System::Collections::Generic::Dictionary< System::String^, System::Object^> ^ dict) { System::Text::StringBuilder ^ sb = gcnew System::Text::StringBuilder("{"); System::Exception ^ newException = nullptr; try { System::String ^ leading = ""; for each (System::Collections::Generic::KeyValuePair kvp in dict) { sb->Append(leading); leading = ", "; if (QpidTypeCheck::ObjectIsMap(kvp.Value)) { sb->AppendFormat( "{0}={1}", kvp.Key, MapAsString((System::Collections::Generic::Dictionary ^)kvp.Value)); } else if (QpidTypeCheck::ObjectIsList(kvp.Value)) { sb->AppendFormat( "{0}={1}", kvp.Key, ListAsString((System::Collections::ObjectModel::Collection< System::Object^> ^)kvp.Value)); } else if (nullptr == kvp.Value) { sb->AppendFormat( "{0}=", kvp.Key); } else sb->AppendFormat("{0}={1}", kvp.Key, kvp.Value); } sb->Append("}"); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } System::String ^ result = gcnew System::String(sb->ToString()); return result; } /// /// A function to display a ampq/list message packaged as a List. /// /// The AMQP list System::String ^ Message::ListAsString(System::Collections::ObjectModel::Collection ^ list) { System::Text::StringBuilder ^ sb = gcnew System::Text::StringBuilder("["); System::Exception ^ newException = nullptr; try { System::String ^ leading = ""; for each (System::Object ^ obj in list) { sb->Append(leading); leading = ", "; if (QpidTypeCheck::ObjectIsMap(obj)) { sb->Append(MapAsString((System::Collections::Generic::Dictionary< System::String^, System::Object^> ^)obj)); } else if (QpidTypeCheck::ObjectIsList(obj)) { sb->Append(ListAsString((System::Collections::ObjectModel::Collection< System::Object^> ^)obj)); } else if (nullptr == obj) { // no display for null objects } else sb->Append(obj->ToString()); } sb->Append("]"); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } System::String ^ result = gcnew System::String(sb->ToString()); return result; } System::String ^ Message::AsString(System::Object ^ obj) { if (QpidTypeCheck::ObjectIsMap(obj)) return MapAsString((System::Collections::Generic::Dictionary< System::String^, System::Object^> ^)obj); else if (QpidTypeCheck::ObjectIsList(obj)) return ListAsString((System::Collections::ObjectModel::Collection< System::Object^> ^)obj); else return obj->ToString(); } }}}} qpidc-0.16/bindings/qpid/dotnet/src/AssemblyInfo.cpp0000664000076400007640000000415211372066617023064 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using namespace System; using namespace System::Reflection; using namespace System::Runtime::CompilerServices; using namespace System::Runtime::InteropServices; using namespace System::Security::Permissions; // // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. // [assembly:AssemblyTitleAttribute("org.apache.qpid.messaging")]; [assembly:AssemblyDescriptionAttribute("")]; [assembly:AssemblyConfigurationAttribute("")]; [assembly:AssemblyCompanyAttribute("")]; [assembly:AssemblyProductAttribute("org.apache.qpid.messaging")]; [assembly:AssemblyCopyrightAttribute("Copyright (c) 2010")]; [assembly:AssemblyTrademarkAttribute("")]; [assembly:AssemblyCultureAttribute("")]; // // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the value or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly:AssemblyVersionAttribute("1.0.*")]; [assembly:ComVisible(false)]; [assembly:CLSCompliantAttribute(true)]; [assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)]; qpidc-0.16/bindings/qpid/dotnet/src/Connection.cpp0000664000076400007640000002613711674660004022572 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include "qpid/messaging/Connection.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/exceptions.h" #include "QpidMarshal.h" #include "Connection.h" #include "Session.h" #include "QpidException.h" #include "TypeTranslator.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Connection is a managed wrapper for a qpid::messaging::Connection /// // Disallow access if object has been destroyed. void Connection::ThrowIfDisposed() { if (IsDisposed) throw gcnew ObjectDisposedException (GetType()->FullName); } // constructors Connection::Connection(System::String ^ url) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Connection(QpidMarshal::ToNative(url)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } Connection::Connection(System::String ^ url, System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ options) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Connection(QpidMarshal::ToNative(url)); for each (System::Collections::Generic::KeyValuePair kvp in options) { SetOption(kvp.Key, kvp.Value); } } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } Connection::Connection(System::String ^ url, System::String ^ options) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Connection(QpidMarshal::ToNative(url), QpidMarshal::ToNative(options)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Copy constructor look-alike (C#) Connection::Connection(const Connection ^ connection) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Connection( *(const_cast(connection)->NativeConnection)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Copy constructor implicitly dereferenced (C++) Connection::Connection(const Connection % connection) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Connection( *(const_cast(connection).NativeConnection)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Destructor Connection::~Connection() { this->!Connection(); } // Finalizer Connection::!Connection() { if (NULL != nativeObjPtr) { msclr::lock lk(privateLock); if (NULL != nativeObjPtr) { delete nativeObjPtr; nativeObjPtr = NULL; } } } void Connection::SetOption(System::String ^ name, System::Object ^ value) { System::Exception ^ newException = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); ::qpid::types::Variant entryValue; TypeTranslator::ManagedToNativeObject(value, entryValue); std::string entryName = QpidMarshal::ToNative(name); nativeObjPtr->::qpid::messaging::Connection::setOption(entryName, entryValue); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Connection::Open() { System::Exception ^ newException = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->open(); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Connection::Close() { System::Exception ^ newException = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->close(); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // // CreateTransactionalSession() // Session ^ Connection::CreateTransactionalSession() { return CreateTransactionalSession(""); } Session ^ Connection::CreateTransactionalSession(System::String ^ name) { System::Exception ^ newException = nullptr; Session ^ newSession = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); // create native session ::qpid::messaging::Session sessionp = nativeObjPtr->createTransactionalSession(QpidMarshal::ToNative(name)); // create managed session newSession = gcnew Session(sessionp, this); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { // Clean up and throw on caught exceptions if (newException != nullptr) { if (newSession != nullptr) { delete newSession; } } } if (newException != nullptr) { throw newException; } return newSession; } // // CreateSession() // Session ^ Connection::CreateSession() { return CreateSession(""); } Session ^ Connection::CreateSession(System::String ^ name) { System::Exception ^ newException = nullptr; Session ^ newSession = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); // create native session ::qpid::messaging::Session sessionp = nativeObjPtr->createSession(QpidMarshal::ToNative(name)); // create managed session newSession = gcnew Session(sessionp, this); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { // Clean up and throw on caught exceptions if (newException != nullptr) { if (newSession != nullptr) { delete newSession; } } } if (nullptr != newException) { throw newException; } return newSession; } Session ^ Connection::GetSession(System::String ^ name) { System::Exception ^ newException = nullptr; Session ^ newSession = nullptr; try { const std::string n = QpidMarshal::ToNative(name); msclr::lock lk(privateLock); ThrowIfDisposed(); ::qpid::messaging::Session sess = nativeObjPtr->::qpid::messaging::Connection::getSession(n); newSession = gcnew Session(sess, this); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { // Clean up and throw on caught exceptions if (newException != nullptr) { if (newSession != nullptr) { delete newSession; } } } if (nullptr != newException) { throw newException; } return newSession; } }}}} qpidc-0.16/bindings/qpid/dotnet/src/QpidTypeCheck.h0000664000076400007640000000531011674416657022640 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// QpidTypeCheck determines if a given managed object represents /// a qpid type per the scheme presented by the messaging DLL. /// // The supported mapping is: /// * a managed Dictionary and a Qpid Messaging Map /// * a managed Collection and a Qpid Messaging List /// typedef System::Collections::Generic::Dictionary< System::String^, System::Object^> QpidMap; typedef System::Collections::ObjectModel::Collection< System::Object^> QpidList; private ref class QpidTypeCheckConstants sealed { private: QpidTypeCheckConstants::QpidTypeCheckConstants() {} public: static System::Type const ^ const mapTypeP = System::Type::GetType( "System.Collections.Generic.Dictionary`2[System.String,System.Object]"); static System::Type const ^ const listTypeP = System::Type::GetType( "System.Collections.ObjectModel.Collection`1[System.Object]"); }; public ref class QpidTypeCheck sealed { private: QpidTypeCheck::QpidTypeCheck() {} public: static bool ObjectIsMap (System::Object ^ theValue) { if (nullptr == theValue) return false; else return (*theValue).GetType() == QpidTypeCheckConstants::mapTypeP; } static bool ObjectIsList(System::Object ^ theValue) { if (nullptr == theValue) return false; else return (*theValue).GetType() == QpidTypeCheckConstants::listTypeP; } }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/org.apache.qpid.messaging.template.rc0000664000076400007640000000703111656351505027041 0ustar00jrossjross00000000000000// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // Microsoft Visual C++ generated resource script. // #include "..\resource1.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource1.h\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\r\n" "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Version // VS_VERSION_INFO VERSIONINFO FILEVERSION ${winver_FILE_VERSION_N1},${winver_FILE_VERSION_N2},${winver_FILE_VERSION_N3},${winver_FILE_VERSION_N4} PRODUCTVERSION ${winver_PRODUCT_VERSION_N1},${winver_PRODUCT_VERSION_N2},${winver_PRODUCT_VERSION_N3},${winver_PRODUCT_VERSION_N4} FILEFLAGSMASK 0x17L #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "FileDescription", "org.apache.qpid.messaging" VALUE "FileVersion", "${winver_FILE_VERSION_N1}, ${winver_FILE_VERSION_N2}, ${winver_FILE_VERSION_N3}, ${winver_FILE_VERSION_N4}" VALUE "InternalName", "org.apache.qpid.messaging" VALUE "LegalCopyright", "" VALUE "OriginalFilename", "org.apache.qpid.messaging" VALUE "ProductName", "org.apache.qpid.messaging" VALUE "ProductVersion", "${winver_PRODUCT_VERSION_N1}, ${winver_PRODUCT_VERSION_N2}, ${winver_PRODUCT_VERSION_N3}, ${winver_PRODUCT_VERSION_N4}" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED qpidc-0.16/bindings/qpid/dotnet/src/TypeTranslator.cpp0000664000076400007640000003774111674416657023506 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include #include #include "TypeTranslator.h" #include "QpidTypeCheck.h" #include "QpidMarshal.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Translate between managed and native types. /// // // The given object is a Dictionary. // Add its elements to the qpid map. // void TypeTranslator::ManagedToNative(QpidMap ^ theDictionary, ::qpid::types::Variant::Map & qpidMap) { // iterate the items, converting each to a variant and adding to the map for each (System::Collections::Generic::KeyValuePair kvp in theDictionary) { if (QpidTypeCheck::ObjectIsMap(kvp.Value)) { // Recurse on inner map // Allocate a map ::qpid::types::Variant::Map newMap; // Add the map variables to the map ManagedToNative((QpidMap ^)kvp.Value, newMap); // Create a variant entry for the inner map std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newMap)); // Get map's name std::string entryName = QpidMarshal::ToNative(kvp.Key); // Add inner map to outer map qpidMap.insert(std::make_pair(entryName, *newVariantp)); } else if (QpidTypeCheck::ObjectIsList(kvp.Value)) { // Recurse on inner list // Allocate a list ::qpid::types::Variant::List newList; // Add the List variables to the list ManagedToNative((QpidList ^)kvp.Value, newList); // Create a variant entry for the inner map ::qpid::types::Variant::List newVariant(newList); //std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newList)); // Get list's name std::string entryName = QpidMarshal::ToNative(kvp.Key); // Add inner list to outer map qpidMap.insert(std::make_pair(entryName, newVariant)); } else { // Add a simple native type to map ::qpid::types::Variant entryValue; if (nullptr != kvp.Value) { ManagedToNativeObject(kvp.Value, entryValue); } std::string entryName = QpidMarshal::ToNative(kvp.Key); qpidMap.insert(std::make_pair(entryName, entryValue)); } } } // // The given object is a List. // Add its elements to the qpid list. // void TypeTranslator::ManagedToNative(QpidList ^ theList, ::qpid::types::Variant::List & qpidList) { // iterate the items, converting each to a variant and adding to the map for each (System::Object ^ listObj in theList) { if (QpidTypeCheck::ObjectIsMap(listObj)) { // Recurse on inner map // Allocate a map ::qpid::types::Variant::Map newMap; // Add the map variables to the map ManagedToNative((QpidMap ^)listObj, newMap); // Create a variant entry for the inner map std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newMap)); // Add inner map to outer list qpidList.push_back(*newVariantp); } else if (QpidTypeCheck::ObjectIsList(listObj)) { // Recurse on inner list // Allocate a list ::qpid::types::Variant::List newList; // Add the List variables to the list ManagedToNative((QpidList ^)listObj, newList); // Create a variant entry for the inner list std::auto_ptr<::qpid::types::Variant> newVariantp(new ::qpid::types::Variant(newList)); // Add inner list to outer list qpidList.push_back(*newVariantp); } else { // Add a simple native type to list ::qpid::types::Variant entryValue; if (nullptr != listObj) { ManagedToNativeObject(listObj, entryValue); } qpidList.push_back(entryValue); } } } // // Returns a variant representing simple native type object. // Not to be called for Map/List objects. // void TypeTranslator::ManagedToNativeObject(System::Object ^ managedValue, ::qpid::types::Variant & qpidVariant) { System::Type ^ typeP = (*managedValue).GetType(); System::TypeCode typeCode = System::Type::GetTypeCode( typeP ); switch (typeCode) { case System::TypeCode::Boolean : qpidVariant = System::Convert::ToBoolean(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::Byte : qpidVariant = System::Convert::ToByte(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::UInt16 : qpidVariant = System::Convert::ToUInt16(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::UInt32 : qpidVariant = System::Convert::ToUInt32(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::UInt64 : qpidVariant = System::Convert::ToUInt64(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::Char : case System::TypeCode::SByte : qpidVariant = System::Convert::ToSByte(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::Int16 : qpidVariant = System::Convert::ToInt16(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::Int32 : qpidVariant = System::Convert::ToInt32(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::Int64 : qpidVariant = System::Convert::ToInt64(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::Single : qpidVariant = System::Convert::ToSingle(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::Double : qpidVariant = System::Convert::ToDouble(managedValue, System::Globalization::CultureInfo::InvariantCulture); break; case System::TypeCode::String : { std::string rString; System::String ^ rpString; rpString = System::Convert::ToString(managedValue, System::Globalization::CultureInfo::InvariantCulture); rString = QpidMarshal::ToNative(rpString); qpidVariant = rString; qpidVariant.setEncoding(QpidMarshal::ToNative("utf8")); } break; case System::TypeCode::Object : { // // Derived classes // if ("System.Guid" == typeP->ToString()) { cli::array ^ guidBytes = ((System::Guid)managedValue).ToByteArray(); pin_ptr pinnedBuf = &guidBytes[0]; ::qpid::types::Uuid newUuid = ::qpid::types::Uuid(pinnedBuf); qpidVariant = newUuid; } else { throw gcnew System::NotImplementedException(); } } break; default: throw gcnew System::NotImplementedException(); } } // Given a user Dictionary and a qpid map, // extract the qpid elements and put them into the dictionary. // void TypeTranslator::NativeToManaged(::qpid::types::Variant::Map & qpidMap, QpidMap ^ dict) { // For each object in the message map, // create a .NET object and add it to the dictionary. for (::qpid::types::Variant::Map::const_iterator i = qpidMap.begin(); i != qpidMap.end(); ++i) { // Get the name System::String ^ elementName = gcnew String(i->first.c_str()); ::qpid::types::Variant variant = i->second; ::qpid::types::VariantType vType = variant.getType(); switch (vType) { case ::qpid::types::VAR_VOID: dict[elementName] = nullptr; break; case ::qpid::types::VAR_BOOL: dict[elementName] = variant.asBool(); break; case ::qpid::types::VAR_UINT8: dict[elementName] = variant.asUint8(); break; case ::qpid::types::VAR_UINT16: dict[elementName] = variant.asUint16(); break; case ::qpid::types::VAR_UINT32: dict[elementName] = variant.asUint32(); break; case ::qpid::types::VAR_UINT64: dict[elementName] = variant.asUint64(); break; case ::qpid::types::VAR_INT8: dict[elementName] = variant.asInt8(); break; case ::qpid::types::VAR_INT16: dict[elementName] = variant.asInt16(); break; case ::qpid::types::VAR_INT32: dict[elementName] = variant.asInt32(); break; case ::qpid::types::VAR_INT64: dict[elementName] = variant.asInt64(); break; case ::qpid::types::VAR_FLOAT: dict[elementName] = variant.asFloat(); break; case ::qpid::types::VAR_DOUBLE: dict[elementName] = variant.asDouble(); break; case ::qpid::types::VAR_STRING: { System::String ^ elementValue = gcnew System::String(variant.asString().c_str()); dict[elementName] = elementValue; break; } case ::qpid::types::VAR_MAP: { QpidMap ^ newDict = gcnew QpidMap(); NativeToManaged(variant.asMap(), newDict); dict[elementName] = newDict; break; } case ::qpid::types::VAR_LIST: { QpidList ^ newList = gcnew QpidList(); NativeToManaged(variant.asList(), newList); dict[elementName] = newList; break; } case ::qpid::types::VAR_UUID: { System::String ^ elementValue = gcnew System::String(variant.asUuid().str().c_str()); System::Guid ^ newGuid = System::Guid(elementValue); dict[elementName] = newGuid; } break; } } } void TypeTranslator::NativeToManaged(::qpid::types::Variant::List & qpidList, QpidList ^ managedList) { // For each object in the qpidList // create a .NET object and add it to the managed List. for (::qpid::types::Variant::List::const_iterator i = qpidList.begin(); i != qpidList.end(); ++i) { ::qpid::types::Variant variant = *i; ::qpid::types::VariantType vType = variant.getType(); switch (vType) { case ::qpid::types::VAR_VOID: (*managedList).Add(nullptr); break; case ::qpid::types::VAR_BOOL: (*managedList).Add(variant.asBool()); break; case ::qpid::types::VAR_UINT8: (*managedList).Add(variant.asUint8()); break; case ::qpid::types::VAR_UINT16: (*managedList).Add(variant.asUint16()); break; case ::qpid::types::VAR_UINT32: (*managedList).Add(variant.asUint32()); break; case ::qpid::types::VAR_UINT64: (*managedList).Add(variant.asUint64()); break; case ::qpid::types::VAR_INT8: (*managedList).Add(variant.asInt8()); break; case ::qpid::types::VAR_INT16: (*managedList).Add(variant.asInt16()); break; case ::qpid::types::VAR_INT32: (*managedList).Add(variant.asInt32()); break; case ::qpid::types::VAR_INT64: (*managedList).Add(variant.asInt64()); break; case ::qpid::types::VAR_FLOAT: (*managedList).Add(variant.asFloat()); break; case ::qpid::types::VAR_DOUBLE: (*managedList).Add(variant.asDouble()); break; case ::qpid::types::VAR_STRING: { System::String ^ elementValue = gcnew System::String(variant.asString().c_str()); (*managedList).Add(elementValue); break; } case ::qpid::types::VAR_MAP: { QpidMap ^ newDict = gcnew QpidMap(); NativeToManaged(variant.asMap(), newDict); (*managedList).Add(newDict); break; } case ::qpid::types::VAR_LIST: { QpidList ^ newList = gcnew QpidList(); NativeToManaged(variant.asList(), newList); (*managedList).Add(newList); break; } case ::qpid::types::VAR_UUID: { System::String ^ elementValue = gcnew System::String(variant.asUuid().str().c_str()); System::Guid ^ newGuid = System::Guid(elementValue); (*managedList).Add(newGuid); } break; } } } }}}} qpidc-0.16/bindings/qpid/dotnet/src/Connection.h0000664000076400007640000001020411674416657022240 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include #include "qpid/messaging/Connection.h" #include "qpid/messaging/Session.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Connection is a managed wrapper for a qpid::messaging::Connection /// ref class Session; public ref class Connection { private: // The kept object in the Messaging C++ DLL ::qpid::messaging::Connection * nativeObjPtr; // per-instance lock object System::Object ^ privateLock; // Disallow use after object is destroyed void ThrowIfDisposed(); public: Connection(System::String ^ url); Connection(System::String ^ url, System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ options); Connection(System::String ^ url, System::String ^ options); // copy constructor Connection(const Connection ^ connection); Connection(const Connection % connection); // unmanaged clone // not defined ~Connection(); !Connection(); // assignment operator Connection % operator=(const Connection % rhs) { msclr::lock lk(privateLock); ThrowIfDisposed(); if (this == %rhs) { // Self assignment, do nothing } else { if (NULL != nativeObjPtr) delete nativeObjPtr; nativeObjPtr = new ::qpid::messaging::Connection( *(const_cast(rhs).NativeConnection) ); } return *this; } // // IsDisposed // property bool IsDisposed { bool get() { return NULL == nativeObjPtr; } } // // NativeConnection // property ::qpid::messaging::Connection * NativeConnection { ::qpid::messaging::Connection * get () { return nativeObjPtr; } } void SetOption(System::String ^ name, System::Object ^ value); void Open(); void Close(); property System::Boolean IsOpen { System::Boolean get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->isOpen(); } } // CreateTransactionalSession() Session ^ CreateTransactionalSession(); Session ^ CreateTransactionalSession(System::String ^ name); // CreateSession() Session ^ CreateSession(); Session ^ CreateSession(System::String ^ name); Session ^ GetSession(System::String ^ name); property System::String ^ AuthenticatedUsername { System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew System::String(nativeObjPtr->getAuthenticatedUsername().c_str()); } } }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/QpidException.h0000664000076400007640000000217711674416657022727 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once namespace Org { namespace Apache { namespace Qpid { namespace Messaging { using namespace System; [Serializable] public ref class QpidException : System::Exception { public: QpidException() : System::Exception() {} QpidException(String^ estring) : System::Exception(estring) {} }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/app.rc0000664000076400007640000000411511462041467021066 0ustar00jrossjross00000000000000// // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // Microsoft Visual C++ generated resource script. // #include "resource.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources ///////////////////////////////////////////////////////////////////////////// // // Icon // // Icon placed first or with lowest ID value becomes application icon LANGUAGE 9, 1 #pragma code_page(1252) 1 ICON "app.ico" #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // TEXTINCLUDE // 1 TEXTINCLUDE BEGIN "resource.h\0" "\0" END 2 TEXTINCLUDE BEGIN "#include ""afxres.h""\r\n" "\0" END 3 TEXTINCLUDE BEGIN "\0" END #endif // APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 3 resource. // ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED qpidc-0.16/bindings/qpid/dotnet/src/Sender.cpp0000664000076400007640000001221311674660004021701 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include "qpid/messaging/Sender.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/Message.h" #include "Sender.h" #include "Message.h" #include "QpidException.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Sender a managed wrapper for a ::qpid::messaging::Sender /// // Disallow access if object has been destroyed. void Sender::ThrowIfDisposed() { if (IsDisposed) throw gcnew ObjectDisposedException (GetType()->FullName); } // unmanaged clone Sender::Sender(const ::qpid::messaging::Sender & s, Org::Apache::Qpid::Messaging::Session ^ sessRef) : parentSession(sessRef) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Sender (s); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Destructor Sender::~Sender() { this->!Sender(); } // Finalizer Sender::!Sender() { if (NULL != nativeObjPtr) { msclr::lock lk(privateLock); if (NULL != nativeObjPtr) { delete nativeObjPtr; nativeObjPtr = NULL; } } } // Copy constructor look-alike (C#) Sender::Sender(const Sender ^ sender) : parentSession(sender->parentSession) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Sender( *(const_cast(sender)->NativeSender)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Copy constructor implicitly dereferenced (C++) Sender::Sender(const Sender % sender) : parentSession(sender.parentSession) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Sender( *(const_cast(sender).NativeSender)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // // Send(msg) // void Sender::Send(Message ^ mmsgp) { Send(mmsgp, false); } void Sender::Send(Message ^ mmsgp, bool sync) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->::qpid::messaging::Sender::send(*((*mmsgp).NativeMessage), sync); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Sender::Close() { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->close(); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } }}}} qpidc-0.16/bindings/qpid/dotnet/src/resource1.h0000664000076400007640000000233711674416657022061 0ustar00jrossjross00000000000000//{{NO_DEPENDENCIES}} // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. // // Microsoft Visual C++ generated include file. // Used by org.apache.qpid.messaging.rc // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 101 #define _APS_NEXT_COMMAND_VALUE 40001 #define _APS_NEXT_CONTROL_VALUE 1001 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif qpidc-0.16/bindings/qpid/dotnet/src/Address.cpp0000664000076400007640000001643211674660004022055 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include "qpid/messaging/Address.h" #include "Address.h" #include "QpidMarshal.h" #include "QpidTypeCheck.h" #include "TypeTranslator.h" #include "QpidException.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Address is a managed wrapper for a qpid::messaging::Address /// // Disallow access if object has been destroyed. void Address::ThrowIfDisposed() { if (IsDisposed) throw gcnew ObjectDisposedException (GetType()->FullName); } // Create empty Address::Address() { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Address(QpidMarshal::ToNative("")); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Create string address Address::Address(System::String ^ address) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Address(QpidMarshal::ToNative(address)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Create with options Address::Address(System::String ^ name, System::String ^ subject, System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ options) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Address(); Name = name; Subject = subject; Options = options; Type = ""; } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Create with options and type Address::Address(System::String ^ name, System::String ^ subject, System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ options, System::String ^ type) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Address(); Name = name; Subject = subject; Options = options; Type = type; } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Copy constructor look-alike (C#) Address::Address(const Address ^ address) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Address( *(const_cast
(address)->NativeAddress)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Copy constructor implicitly dereferenced (C++) Address::Address(const Address % address) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Address( *(const_cast
(address).NativeAddress)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // unmanaged clone Address::Address(const ::qpid::messaging::Address & addrp) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Address(addrp); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Destructor Address::~Address() { this->!Address(); } // Finalizer Address::!Address() { if (NULL != nativeObjPtr) { msclr::lock lk(privateLock); if (NULL != nativeObjPtr) { delete nativeObjPtr; nativeObjPtr = NULL; } } } // // ToString // System::String ^ Address::ToStr() { System::String ^ result = nullptr; System::Exception ^ newException = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); result = gcnew System::String(nativeObjPtr->str().c_str()); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } return result; } }}}} qpidc-0.16/bindings/qpid/dotnet/src/msvc9/0000775000076400007640000000000011752725721021024 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/src/msvc9/org.apache.qpid.messaging.vcproj0000664000076400007640000004024311663241152027163 0ustar00jrossjross00000000000000 qpidc-0.16/bindings/qpid/dotnet/src/Sender.h0000664000076400007640000001157211674416657021372 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include #include "qpid/messaging/Sender.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/Message.h" namespace qpid { namespace messaging { // Dummy class to satisfy linker class SenderImpl {}; }} namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Sender is a managed wrapper for a ::qpid::messaging::Sender /// ref class Session; ref class Message; public ref class Sender { private: // The kept object in the Messaging C++ DLL ::qpid::messaging::Sender * nativeObjPtr; // The session that created this Sender Session ^ parentSession; // per-instance lock object System::Object ^ privateLock; // Disallow use after object is destroyed void ThrowIfDisposed(); public: // unmanaged clone Sender(const ::qpid::messaging::Sender & s, Session ^ sessRef); // copy constructor Sender(const Sender ^ sender); Sender(const Sender % sender); ~Sender(); !Sender(); // assignment operator Sender % operator=(const Sender % rhs) { msclr::lock lk(privateLock); ThrowIfDisposed(); if (this == %rhs) { // Self assignment, do nothing } else { if (NULL != nativeObjPtr) delete nativeObjPtr; nativeObjPtr = new ::qpid::messaging::Sender( *(const_cast(rhs).NativeSender)); parentSession = rhs.parentSession; } return *this; } // // IsDisposed // property bool IsDisposed { bool get() { return NULL == nativeObjPtr; } } // // NativeSender // property ::qpid::messaging::Sender * NativeSender { ::qpid::messaging::Sender * get () { return nativeObjPtr; } } // Send(message) void Send(Message ^ mmsgp); void Send(Message ^ mmsgp, bool sync); void Close(); property System::UInt32 Capacity { System::UInt32 get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getCapacity(); } void set (System::UInt32 capacity) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setCapacity(capacity); } } property System::UInt32 Unsettled { System::UInt32 get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getUnsettled(); } } property System::UInt32 Available { System::UInt32 get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getAvailable(); } } property System::String ^ Name { System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew System::String(nativeObjPtr->getName().c_str()); } } // // Session // property Org::Apache::Qpid::Messaging::Session ^ Session { Org::Apache::Qpid::Messaging::Session ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return parentSession; } } }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/msvc10/0000775000076400007640000000000011752725721021074 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/src/msvc10/org.apache.qpid.messaging.vcxproj.filters0000664000076400007640000000640111657030265031074 0ustar00jrossjross00000000000000 {4FC737F1-C7A5-4376-A066-2A32D752A2FF} cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hpp;hxx;hm;inl;inc;xsd {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Source Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Header Files Resource Files Resource Files Resource Files qpidc-0.16/bindings/qpid/dotnet/src/msvc10/org.apache.qpid.messaging.vcxproj0000664000076400007640000004625111657030265027434 0ustar00jrossjross00000000000000 Debug Win32 Debug x64 Release Win32 Release x64 RelWithDebInfo Win32 RelWithDebInfo x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D} org.apache.qpid.messaging ManagedCProj v4.0 DynamicLibrary Unicode true false DynamicLibrary Unicode true false DynamicLibrary Unicode true false DynamicLibrary Unicode true false DynamicLibrary Unicode true false DynamicLibrary Unicode true false <_ProjectFileVersion>10.0.30319.1 $(QPID_BUILD_ROOT)\src\$(Configuration)\ $(ProjectDir)obj\$(Platform)\$(Configuration)\ false $(QPID_BUILD_ROOT)\src\$(Configuration)\ $(ProjectDir)obj\$(Platform)\$(Configuration)\ false $(QPID_BUILD_ROOT)\src\$(Configuration)\ $(ProjectDir)obj\$(Platform)\$(Configuration)\ false $(QPID_BUILD_ROOT)\src\$(Configuration)\ $(ProjectDir)obj\$(Platform)\$(Configuration)\ false $(QPID_BUILD_ROOT)\src\$(Configuration)\ $(ProjectDir)obj\$(Platform)\$(Configuration)\ false $(QPID_BUILD_ROOT)\src\$(Configuration)\ $(ProjectDir)obj\$(Platform)\$(Configuration)\ false ..\qpid.snk true /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions) Disabled $(ProjectDir)..\..\..\..\..\include;$(ProjectDir)..\..\..\..\..\src;%(AdditionalIncludeDirectories) WIN32;_WINDOWS;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) MultiThreadedDebugDLL Level3 ProgramDatabase /STACK:10000000 /machine:I386 /KEYFILE:..\qpid.snk %(AdditionalOptions) $(QPID_BUILD_ROOT)\src\$(Configuration)\qpidclientd.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidcommond.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidmessagingd.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidtypesd.lib;%(AdditionalDependencies) $(QPID_BUILD_ROOT)\src\$(Configuration)\org.apache.qpid.messaging.dll true true MachineX86 sn.exe -Ra "$(TargetPath)" "..\qpid.snk" X64 /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions) Disabled $(ProjectDir)..\..\..\..\..\include;$(ProjectDir)..\..\..\..\..\src;%(AdditionalIncludeDirectories) WIN32;_WINDOWS;_DEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) MultiThreadedDebugDLL Level3 ProgramDatabase /STACK:10000000 /KEYFILE:..\qpid.snk %(AdditionalOptions) $(QPID_BUILD_ROOT)\src\$(Configuration)\qpidclientd.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidcommond.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidmessagingd.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidtypesd.lib;%(AdditionalDependencies) $(QPID_BUILD_ROOT)\src\$(Configuration)\org.apache.qpid.messaging.dll true true MachineX64 sn.exe -Ra "$(TargetPath)" "..\qpid.snk" /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions) Disabled $(ProjectDir)..\..\..\..\..\include;$(ProjectDir)..\..\..\..\..\src;%(AdditionalIncludeDirectories) WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase /STACK:10000000 /machine:I386 /KEYFILE:..\qpid.snk %(AdditionalOptions) $(QPID_BUILD_ROOT)\src\$(Configuration)\qpidclient.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidcommon.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidmessaging.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidtypes.lib;%(AdditionalDependencies) $(QPID_BUILD_ROOT)\src\$(Configuration)\org.apache.qpid.messaging.dll true true MachineX86 sn.exe -Ra "$(TargetPath)" "..\qpid.snk" X64 /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions) Disabled $(ProjectDir)..\..\..\..\..\include;$(ProjectDir)..\..\..\..\..\src;%(AdditionalIncludeDirectories) WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase /STACK:10000000 /KEYFILE:..\qpid.snk %(AdditionalOptions) $(QPID_BUILD_ROOT)\src\$(Configuration)\qpidclient.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidcommon.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidmessaging.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidtypes.lib;%(AdditionalDependencies) $(QPID_BUILD_ROOT)\src\$(Configuration)\org.apache.qpid.messaging.dll true true MachineX64 sn.exe -Ra "$(TargetPath)" "..\qpid.snk" /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions) Disabled $(ProjectDir)..\..\..\..\..\include;$(ProjectDir)..\..\..\..\..\src;%(AdditionalIncludeDirectories) WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase /STACK:10000000 /machine:I386 /KEYFILE:..\qpid.snk %(AdditionalOptions) $(QPID_BUILD_ROOT)\src\$(Configuration)\qpidclient.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidcommon.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidmessaging.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidtypes.lib;%(AdditionalDependencies) $(QPID_BUILD_ROOT)\src\$(Configuration)\org.apache.qpid.messaging.dll true true MachineX86 sn.exe -Ra "$(TargetPath)" "..\qpid.snk" X64 /Zm1000 /wd4244 /wd4800 /wd4355 %(AdditionalOptions) Disabled $(ProjectDir)..\..\..\..\..\include;$(ProjectDir)..\..\..\..\..\src;%(AdditionalIncludeDirectories) WIN32;_WINDOWS;NDEBUG;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions) MultiThreadedDLL Level3 ProgramDatabase /STACK:10000000 /KEYFILE:..\qpid.snk %(AdditionalOptions) $(QPID_BUILD_ROOT)\src\$(Configuration)\qpidclient.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidcommon.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidmessaging.lib;$(QPID_BUILD_ROOT)\src\$(Configuration)\qpidtypes.lib;%(AdditionalDependencies) $(QPID_BUILD_ROOT)\src\$(Configuration)\org.apache.qpid.messaging.dll true true MachineX64 sn.exe -Ra "$(TargetPath)" "..\qpid.snk" true true true true qpidc-0.16/bindings/qpid/dotnet/src/Duration.h0000664000076400007640000000651711674416657021742 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Duration is a time interval in milliseconds. /// It is a managed equivalent of ::qpid::messaging::Duration /// public ref class Duration sealed { private: System::UInt64 milliseconds; public: Duration(const Duration % rhs) : milliseconds(rhs.milliseconds) {} explicit Duration(System::UInt64 mS) : milliseconds(mS) {} Duration() : milliseconds(System::UInt64::MaxValue) {} property System::UInt64 Milliseconds { System::UInt64 get () { return milliseconds; } } static Duration ^ operator * (Duration ^ dur, const System::UInt64 multiplier) { Duration ^ result = gcnew Duration(dur->Milliseconds * multiplier); return result; } static Duration ^ operator * (const System::UInt64 multiplier, Duration ^ dur) { Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds); return result; } static Duration ^ Multiply (Duration ^ dur, const System::UInt64 multiplier) { Duration ^ result = gcnew Duration(dur->Milliseconds * multiplier); return result; } static Duration ^ Multiply (const System::UInt64 multiplier, Duration ^ dur) { Duration ^ result = gcnew Duration(multiplier * dur->Milliseconds); return result; } static bool operator == (Duration ^ a, Duration ^ b) { return a->Milliseconds == b->Milliseconds; } static bool operator != (Duration ^ a, Duration ^ b) { return a->Milliseconds != b->Milliseconds; } }; public ref class DurationConstants sealed { private: DurationConstants::DurationConstants() {} public: static Duration ^ FORVER; static Duration ^ IMMEDIATE; static Duration ^ SECOND; static Duration ^ MINUTE; static DurationConstants() { FORVER = gcnew Duration(); IMMEDIATE = gcnew Duration(0); SECOND = gcnew Duration(1000); MINUTE = gcnew Duration(60000); } }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/ReadMe.txt0000664000076400007640000000271311674416657021674 0ustar00jrossjross00000000000000======================================================================== DYNAMIC LINK LIBRARY : Org.Apache.Qpid.Messaging Project Overview ======================================================================== AppWizard has created this Org.Apache.Qpid.Messaging DLL for you. This file contains a summary of what you will find in each of the files that make up your Org.Apache.Qpid.Messaging application. Org.Apache.Qpid.Messaging.vcproj This is the main project file for VC++ projects generated using an Application Wizard. It contains information about the version of Visual C++ that generated the file, and information about the platforms, configurations, and project features selected with the Application Wizard. Connection.[cpp h] Duration.[cpp h] Message.[cpp h] Receiver.[cpp h] Sender.[cpp h] Session.[cpp h] Managed code Interop layer modules to provide access to functions exported by qpidcommon.dll. AssemblyInfo.cpp Contains custom attributes for modifying assembly metadata. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" to indicate parts of the source code you should add to or customize. Current TODOs include: * Add locking as needed * Add remaining modules and methods * Capture and repackage exceptions emitted from messaging DLLs ///////////////////////////////////////////////////////////////////////////// qpidc-0.16/bindings/qpid/dotnet/src/Address.h0000664000076400007640000001455511674416657021543 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include #include "qpid/messaging/Address.h" #include "QpidMarshal.h" #include "QpidTypeCheck.h" #include "TypeTranslator.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Address is a managed wrapper for a qpid::messaging::Address /// public ref class Address { private: // The kept object in the Messaging C++ DLL ::qpid::messaging::Address * nativeObjPtr; // per-instance lock object System::Object ^ privateLock; // Disallow use after object is destroyed void ThrowIfDisposed(); public: Address(); Address(System::String ^ address); Address(System::String ^ name, System::String ^ subject, System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ options); Address(System::String ^ name, System::String ^ subject, System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ options, System::String ^ type); // copy constructor Address(const Address ^ address); Address(const Address % address); // unmanaged clone Address(const ::qpid::messaging::Address & addrp); // System destructor/finalizer entry points ~Address(); !Address(); // assignment operator Address % operator=(const Address % rhs) { msclr::lock lk(privateLock); ThrowIfDisposed(); if (this == %rhs) { // Self assignment, do nothing } else { if (NULL != nativeObjPtr) delete nativeObjPtr; nativeObjPtr = new ::qpid::messaging::Address( *(const_cast
(rhs).NativeAddress) ); } return *this; } // // IsDisposed // property bool IsDisposed { bool get() { return NULL == nativeObjPtr; } } // // NativeAddress // property ::qpid::messaging::Address * NativeAddress { ::qpid::messaging::Address * get () { return nativeObjPtr; } } // // name // property System::String ^ Name { System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew System::String(nativeObjPtr->getName().c_str()); } void set (System::String ^ name) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->::qpid::messaging::Address::setName(QpidMarshal::ToNative(name)); } } // // subject // property System::String ^ Subject { System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew System::String(nativeObjPtr->getSubject().c_str()); } void set (System::String ^ subject) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setSubject(QpidMarshal::ToNative(subject)); } } // // options // property System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ Options { System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); ::qpid::types::Variant::Map map; System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ newMap = gcnew System::Collections::Generic::Dictionary< System::String ^, System::Object ^>; map = nativeObjPtr->getOptions(); TypeTranslator::NativeToManaged(map, newMap); return newMap; } void set (System::Collections::Generic::Dictionary< System::String ^, System::Object ^> ^ options) { msclr::lock lk(privateLock); ThrowIfDisposed(); ::qpid::types::Variant::Map map; TypeTranslator::ManagedToNative(options, map); nativeObjPtr->setOptions(map); } } // // type // property System::String ^ Type { System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew System::String(nativeObjPtr->getType().c_str()); } void set (System::String ^ type) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setType(QpidMarshal::ToNative(type)); } } System::String ^ ToStr(); }; }}}} qpidc-0.16/bindings/qpid/dotnet/src/FailoverUpdates.cpp0000664000076400007640000000476311674660004023571 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include "qpid/messaging/FailoverUpdates.h" #include "Connection.h" #include "FailoverUpdates.h" #include "QpidException.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// FailoverUpdates is a managed wrapper for a qpid::messaging::FailoverUpdates /// // Disallow access if object has been destroyed. void FailoverUpdates::ThrowIfDisposed() { if (IsDisposed) throw gcnew ObjectDisposedException (GetType()->FullName); } // constructors FailoverUpdates::FailoverUpdates(Connection ^ connection) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::FailoverUpdates(*(connection->NativeConnection)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Destructor FailoverUpdates::~FailoverUpdates() { this->!FailoverUpdates(); } // Finalizer FailoverUpdates::!FailoverUpdates() { if (NULL != nativeObjPtr) { msclr::lock lk(privateLock); if (NULL != nativeObjPtr) { delete nativeObjPtr; nativeObjPtr = NULL; } } } }}}} qpidc-0.16/bindings/qpid/dotnet/src/qpid.snk0000664000076400007640000000112411400003306021405 0ustar00jrossjross00000000000000$RSA2Mõ «2¦·6ך‚gB¸=ŽŠ“æl‘ûdVrëP(€<\ðpÍ¥íF‰ÃV¨‡{ »$HurµÍµëÁãÿ—ÞT”Q'¯«‰ ¤­AׄóÕ hªÌDŒi>Y³Õùಔ…¶Å½ ÆfC¹ÑwàP«óéæ]¹7. \Él¯¹#¿¯JC}?% 3"Ž?iý}ηÇ}X9îíïÁÑ…';vî©ôÉzÎ,×4¸Ôp"°gˆk6lãۛŞÕìVÜl´œêY` Ì4úDOëhDÚð §áÿ„¹¾¹‘SÀ(JŽH¦Lt~„„ûo± “l£9ª>3Î×=B蓦Æb1Üán"S@dàRçbò§ë{ m.ƃ$gîñ6–.1¤,û¬çí Ïka#ƒ¯“ÌGá/†¿µtæAxÎOàGÉc\D£å+§jÁFÉ)Ȇh¥0øRSS}‹ÉO.‡è‡7é“f˨pš5¢o¯J‘ u~•RŠO-õÀvVÒYM ßJë«õMgñmÝè«YV¹{j¥c-ÒÄЊ~"À]éïb‘lZª,=‚·Ø‰ìÖk•ٺвɹJúºxü;ãtbôíá´Ъ‡¬¡„v-$QnqÑæãÚ6`/í—‚¬ÑÊ+ˆ¾phB†‰vŒÑµ¨±Ž1U_÷"²t_6?©êç™~pNv²¢b 0ŒÅ5]ú¼öì@?RÞ±Ð;éÿjE뉷d¨qpidc-0.16/bindings/qpid/dotnet/src/Session.cpp0000664000076400007640000004512411674660004022113 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include "qpid/messaging/Session.h" #include "qpid/messaging/exceptions.h" #include "QpidMarshal.h" #include "Address.h" #include "Session.h" #include "Connection.h" #include "Duration.h" #include "Receiver.h" #include "Sender.h" #include "Message.h" #include "QpidException.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Session is a managed wrapper for a ::qpid::messaging::Session /// // Disallow access if object has been destroyed. void Session::ThrowIfDisposed() { if (IsDisposed) throw gcnew ObjectDisposedException (GetType()->FullName); } // unmanaged clone Session::Session(const ::qpid::messaging::Session & session, Org::Apache::Qpid::Messaging::Connection ^ connRef) : parentConnectionp(connRef) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Session (session); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Destructor Session::~Session() { this->!Session(); } // Finalizer Session::!Session() { if (NULL != nativeObjPtr) { msclr::lock lk(privateLock); if (NULL != nativeObjPtr) { delete nativeObjPtr; nativeObjPtr = NULL; } } } // Copy constructor look-alike (C#) Session::Session(const Session ^ session) : parentConnectionp(session->parentConnectionp) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Session( *(const_cast(session)->NativeSession)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Copy constructor implicitly dereferenced (C++) Session::Session(const Session % session) : parentConnectionp(session.parentConnectionp) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Session( *(const_cast(session).NativeSession)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Session::Close() { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->close(); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Session::Commit() { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->commit(); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Session::Rollback() { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->rollback(); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Session::Acknowledge() { Acknowledge(false); } void Session::Acknowledge(bool sync) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->acknowledge(sync); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Session::Acknowledge(Message ^ message) { Acknowledge(message, false); } void Session::Acknowledge(Message ^ message, bool sync) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->acknowledge(*(message->NativeMessage), sync); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Session::AcknowledgeUpTo(Message ^ message) { AcknowledgeUpTo(message, false); } void Session::AcknowledgeUpTo(Message ^ message, bool sync) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->acknowledgeUpTo(*(message->NativeMessage), sync); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Session::Reject(Message ^ message) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->::qpid::messaging::Session::reject(*(message->NativeMessage)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Session::Release(Message ^ message) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->::qpid::messaging::Session::release(*(message->NativeMessage)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } void Session::Sync() { Sync(true); } void Session::Sync(bool block) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->sync(block); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // next(receiver) bool Session::NextReceiver(Receiver ^ rcvr) { return NextReceiver(rcvr, DurationConstants::FORVER); } bool Session::NextReceiver(Receiver ^ rcvr, Duration ^ timeout) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { // create a duration object ::qpid::messaging::Duration dur(timeout->Milliseconds); // wait for the next received message return nativeObjPtr->nextReceiver(*(rcvr->NativeReceiver), dur); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); if ("No message to fetch" == errmsg){ return false; } newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } return true; } // receiver = next() Receiver ^ Session::NextReceiver() { return NextReceiver(DurationConstants::FORVER); } Receiver ^ Session::NextReceiver(Duration ^ timeout) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { ::qpid::messaging::Duration dur(timeout->Milliseconds); ::qpid::messaging::Receiver receiver = nativeObjPtr->::qpid::messaging::Session::nextReceiver(dur); Receiver ^ newRcvr = gcnew Receiver(receiver, this); return newRcvr; } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); if ("No message to fetch" == errmsg) { return nullptr; } newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } return nullptr; } Sender ^ Session::CreateSender (System::String ^ address) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; Sender ^ newSender = nullptr; try { // create the sender ::qpid::messaging::Sender sender = nativeObjPtr->::qpid::messaging::Session::createSender(QpidMarshal::ToNative(address)); // create a managed sender newSender = gcnew Sender(sender, this); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { if (newException != nullptr) { if (newSender != nullptr) { delete newSender; } } } if (newException != nullptr) { throw newException; } return newSender; } Sender ^ Session::CreateSender (Address ^ address) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; Sender ^ newSender = nullptr; try { // allocate a native sender ::qpid::messaging::Sender sender = nativeObjPtr->::qpid::messaging::Session::createSender(*(address->NativeAddress)); // create a managed sender newSender = gcnew Sender(sender, this); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { if (newException != nullptr) { if (newSender != nullptr) { delete newSender; } } } if (newException != nullptr) { throw newException; } return newSender; } Receiver ^ Session::CreateReceiver(System::String ^ address) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; Receiver ^ newReceiver = nullptr; try { // create the receiver ::qpid::messaging::Receiver receiver = nativeObjPtr->createReceiver(QpidMarshal::ToNative(address)); // create a managed receiver newReceiver = gcnew Receiver(receiver, this); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { if (newException != nullptr) { if (newReceiver != nullptr) { delete newReceiver; } } } if (newException != nullptr) { throw newException; } return newReceiver; } Receiver ^ Session::CreateReceiver(Address ^ address) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; Receiver ^ newReceiver = nullptr; try { // create the receiver ::qpid::messaging::Receiver receiver = nativeObjPtr->createReceiver(*(address->NativeAddress)); // create a managed receiver newReceiver = gcnew Receiver(receiver, this); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { if (newException != nullptr) { if (newReceiver != nullptr) { delete newReceiver; } } } if (newException != nullptr) { throw newException; } return newReceiver; } Sender ^ Session::GetSender(System::String ^ name) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; Sender ^ newSender = nullptr; try { ::qpid::messaging::Sender senderp = nativeObjPtr->::qpid::messaging::Session::getSender(QpidMarshal::ToNative(name)); newSender = gcnew Sender(senderp, this); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { if (newException != nullptr) { if (newSender != nullptr) { delete newSender; } } } if (newException != nullptr) { throw newException; } return newSender; } Receiver ^ Session::GetReceiver(System::String ^ name) { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; Receiver ^ newReceiver = nullptr; try { ::qpid::messaging::Receiver receiver = nativeObjPtr->::qpid::messaging::Session::getReceiver(QpidMarshal::ToNative(name)); newReceiver = gcnew Receiver(receiver, this); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { if (newException != nullptr) { if (newReceiver != nullptr) { delete newReceiver; } } } if (newException != nullptr) { throw newException; } return newReceiver; } void Session::CheckError() { msclr::lock lk(privateLock); ThrowIfDisposed(); System::Exception ^ newException = nullptr; try { nativeObjPtr->checkError(); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } }}}} qpidc-0.16/bindings/qpid/dotnet/src/Receiver.cpp0000664000076400007640000002200211674660004022222 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #include #include #include #include #include #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/exceptions.h" #include "Receiver.h" #include "Session.h" #include "Message.h" #include "Duration.h" #include "QpidException.h" namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Receiver is a managed wrapper for a ::qpid::messaging::Receiver /// // Disallow access if object has been destroyed. void Receiver::ThrowIfDisposed() { if (IsDisposed) throw gcnew ObjectDisposedException (GetType()->FullName); } // unmanaged clone Receiver::Receiver(const ::qpid::messaging::Receiver & r, Org::Apache::Qpid::Messaging::Session ^ sessRef) : parentSession(sessRef) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Receiver (r); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // unmanaged clone // undefined // Destructor Receiver::~Receiver() { this->!Receiver(); } // Finalizer Receiver::!Receiver() { if (NULL != nativeObjPtr) { msclr::lock lk(privateLock); if (NULL != nativeObjPtr) { delete nativeObjPtr; nativeObjPtr = NULL; } } } // Copy constructor look-alike (C#) Receiver::Receiver(const Receiver ^ receiver) : parentSession(receiver->parentSession) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Receiver( *(const_cast(receiver)->NativeReceiver)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // Copy constructor implicitly dereferenced (C++) Receiver::Receiver(const Receiver % receiver) : parentSession(receiver.parentSession) { System::Exception ^ newException = nullptr; try { privateLock = gcnew System::Object(); nativeObjPtr = new ::qpid::messaging::Receiver( *(const_cast(receiver).NativeReceiver)); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } } // // Get(message) // bool Receiver::Get(Message ^% mmsgp) { return Get(mmsgp, DurationConstants::FORVER); } bool Receiver::Get(Message ^% mmsgp, Duration ^ durationp) { System::Exception ^ newException = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); ::qpid::messaging::Duration dur((*durationp).Milliseconds); ::qpid::messaging::Message tmpMsg; bool result = nativeObjPtr->Receiver::get(tmpMsg, dur); if (result) { mmsgp = gcnew Message(tmpMsg); } return result; } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } return false; } // // message = Get() // Message ^ Receiver::Get() { return Get(DurationConstants::FORVER); } Message ^ Receiver::Get(Duration ^ durationp) { System::Exception ^ newException = nullptr; Message ^ newMessage = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); // translate the duration ::qpid::messaging::Duration dur((*durationp).Milliseconds); // get the message ::qpid::messaging::Message msg = nativeObjPtr->::qpid::messaging::Receiver::get(dur); // create new managed message with received message embedded in it newMessage = gcnew Message(msg); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { if (newException != nullptr) { if (newMessage != nullptr) { delete newMessage; } } } if (newException != nullptr) { throw newException; } return newMessage; } // // Fetch(message) // bool Receiver::Fetch(Message ^% mmsgp) { return Fetch(mmsgp, DurationConstants::FORVER); } bool Receiver::Fetch(Message ^% mmsgp, Duration ^ durationp) { System::Exception ^ newException = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); ::qpid::messaging::Duration dur((*durationp).Milliseconds); ::qpid::messaging::Message tmpMsg; bool result = nativeObjPtr->Receiver::fetch(tmpMsg, dur); if (result) { mmsgp = gcnew Message(tmpMsg); } return result; } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } if (newException != nullptr) { throw newException; } return false; } // // message = Fetch() // Message ^ Receiver::Fetch() { return Fetch(DurationConstants::FORVER); } Message ^ Receiver::Fetch(Duration ^ durationp) { System::Exception ^ newException = nullptr; Message ^ newMessage = nullptr; try { msclr::lock lk(privateLock); ThrowIfDisposed(); // translate the duration ::qpid::messaging::Duration dur((*durationp).Milliseconds); // get the message ::qpid::messaging::Message msg = nativeObjPtr->::qpid::messaging::Receiver::fetch(dur); // create new managed message with received message embedded in it newMessage = gcnew Message(msg); } catch (const ::qpid::types::Exception & error) { String ^ errmsg = gcnew String(error.what()); newException = gcnew QpidException(errmsg); } finally { if (newException != nullptr) { if (newMessage != nullptr) { delete newMessage; } } } if (newException != nullptr) { throw newException; } return newMessage; } void Receiver::Close() { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->close(); } }}}} qpidc-0.16/bindings/qpid/dotnet/src/Receiver.h0000664000076400007640000001355111674416657021715 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #pragma once #include #include #include #include #include #include "qpid/messaging/Receiver.h" #include "qpid/messaging/Session.h" #include "qpid/messaging/Message.h" #include "qpid/messaging/Duration.h" namespace qpid { namespace messaging { // Dummy class to satisfy linker class ReceiverImpl {}; }} namespace Org { namespace Apache { namespace Qpid { namespace Messaging { /// /// Receiver is a managed wrapper for a ::qpid::messaging::Receiver /// ref class Session; ref class Message; ref class Duration; public ref class Receiver { private: // The session that created this Receiver Session ^ parentSession; // The kept object in the Messaging C++ DLL ::qpid::messaging::Receiver * nativeObjPtr; // per-instance lock object System::Object ^ privateLock; // Disallow use after object is destroyed void ThrowIfDisposed(); public: // unmanaged clone Receiver(const ::qpid::messaging::Receiver & r, Session ^ sessRef); // copy constructor Receiver(const Receiver ^ receiver); Receiver(const Receiver % receiver); // unmanaged clone // undefined ~Receiver(); !Receiver(); // assignment operator Receiver % operator=(const Receiver % rhs) { msclr::lock lk(privateLock); ThrowIfDisposed(); if (this == %rhs) { // Self assignment, do nothing } else { if (NULL != nativeObjPtr) delete nativeObjPtr; nativeObjPtr = new ::qpid::messaging::Receiver( *(const_cast(rhs).NativeReceiver)); parentSession = rhs.parentSession; } return *this; } // // IsDisposed // property bool IsDisposed { bool get() { return NULL == nativeObjPtr; } } // // NativeReceiver // property ::qpid::messaging::Receiver * NativeReceiver { ::qpid::messaging::Receiver * get () { return nativeObjPtr; } } // Get(message) bool Get(Message ^% mmsgp); bool Get(Message ^% mmsgp, Duration ^ durationp); // message = Get() Message ^ Get(); Message ^ Get(Duration ^ durationp); // Fetch(message) bool Fetch(Message ^% mmsgp); bool Fetch(Message ^% mmsgp, Duration ^ duration); // message = Fetch() Message ^ Fetch(); Message ^ Fetch(Duration ^ durationp); // // Capacity // property System::UInt32 Capacity { void set (System::UInt32 capacity) { msclr::lock lk(privateLock); ThrowIfDisposed(); nativeObjPtr->setCapacity(capacity); } System::UInt32 get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getCapacity(); } } // // Available // property System::UInt32 Available { System::UInt32 get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getAvailable(); } } // // Unsettled // property System::UInt32 Unsettled { System::UInt32 get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->getUnsettled(); } } void Close(); // // IsClosed // property System::Boolean IsClosed { System::Boolean get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return nativeObjPtr->isClosed(); } } // // Name // property System::String ^ Name { System::String ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return gcnew System::String(nativeObjPtr->getName().c_str()); } } // // Session // property Org::Apache::Qpid::Messaging::Session ^ Session { Org::Apache::Qpid::Messaging::Session ^ get () { msclr::lock lk(privateLock); ThrowIfDisposed(); return parentSession; } } }; }}}} qpidc-0.16/bindings/qpid/dotnet/Makefile.am0000664000076400007640000002146611721011366021226 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # EXTRA_DIST = configure-windows.ps1 \ examples/csharp.direct.receiver/csharp.direct.receiver.cs \ examples/csharp.direct.receiver/Properties/AssemblyInfo.cs \ examples/csharp.direct.sender/csharp.direct.sender.cs \ examples/csharp.direct.sender/Properties/AssemblyInfo.cs \ examples/csharp.example.client/csharp.example.client.cs \ examples/csharp.example.client/Properties/AssemblyInfo.cs \ examples/csharp.example.declare_queues/csharp.example.declare_queues.cs \ examples/csharp.example.declare_queues/Properties/AssemblyInfo.cs \ examples/csharp.example.drain/csharp.example.drain.cs \ examples/csharp.example.drain/Options.cs \ examples/csharp.example.drain/Properties/AssemblyInfo.cs \ examples/csharp.example.helloworld/csharp.example.helloworld.cs \ examples/csharp.example.helloworld/Properties/AssemblyInfo.cs \ examples/csharp.example.server/csharp.example.server.cs \ examples/csharp.example.server/Properties/AssemblyInfo.cs \ examples/csharp.example.spout/csharp.example.spout.cs \ examples/csharp.example.spout/Options.cs \ examples/csharp.example.spout/Properties/AssemblyInfo.cs \ examples/csharp.map.callback.receiver/csharp.map.callback.receiver.cs \ examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs \ examples/csharp.map.callback.sender/csharp.map.callback.sender.cs \ examples/csharp.map.callback.sender/Properties/AssemblyInfo.cs \ examples/csharp.map.receiver/csharp.map.receiver.cs \ examples/csharp.map.receiver/Properties/AssemblyInfo.cs \ examples/csharp.map.sender/csharp.map.sender.cs \ examples/csharp.map.sender/Properties/AssemblyInfo.cs \ examples/msvc10/csharp.direct.receiver/app.config \ examples/msvc10/csharp.direct.receiver/csharp.direct.receiver.csproj \ examples/msvc10/csharp.direct.sender/app.config \ examples/msvc10/csharp.direct.sender/csharp.direct.sender.csproj \ examples/msvc10/csharp.example.client/app.config \ examples/msvc10/csharp.example.client/csharp.example.client.csproj \ examples/msvc10/csharp.example.declare_queues/app.config \ examples/msvc10/csharp.example.declare_queues/csharp.example.declare_queues.csproj \ examples/msvc10/csharp.example.drain/app.config \ examples/msvc10/csharp.example.drain/csharp.example.drain.csproj \ examples/msvc10/csharp.example.helloworld/app.config \ examples/msvc10/csharp.example.helloworld/csharp.example.helloworld.csproj \ examples/msvc10/csharp.example.server/app.config \ examples/msvc10/csharp.example.server/csharp.example.server.csproj \ examples/msvc10/csharp.example.spout/app.config \ examples/msvc10/csharp.example.spout/csharp.example.spout.csproj \ examples/msvc10/csharp.map.callback.receiver/app.config \ examples/msvc10/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj \ examples/msvc10/csharp.map.callback.sender/app.config \ examples/msvc10/csharp.map.callback.sender/csharp.map.callback.sender.csproj \ examples/msvc10/csharp.map.receiver/app.config \ examples/msvc10/csharp.map.receiver/csharp.map.receiver.csproj \ examples/msvc10/csharp.map.sender/app.config \ examples/msvc10/csharp.map.sender/csharp.map.sender.csproj \ examples/msvc9/csharp.direct.receiver/csharp.direct.receiver.csproj \ examples/msvc9/csharp.direct.sender/csharp.direct.sender.csproj \ examples/msvc9/csharp.example.client/csharp.example.client.csproj \ examples/msvc9/csharp.example.declare_queues/csharp.example.declare_queues.csproj \ examples/msvc9/csharp.example.drain/csharp.example.drain.csproj \ examples/msvc9/csharp.example.helloworld/csharp.example.helloworld.csproj \ examples/msvc9/csharp.example.server/csharp.example.server.csproj \ examples/msvc9/csharp.example.spout/csharp.example.spout.csproj \ examples/msvc9/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj \ examples/msvc9/csharp.map.callback.sender/csharp.map.callback.sender.csproj \ examples/msvc9/csharp.map.receiver/csharp.map.receiver.csproj \ examples/msvc9/csharp.map.sender/csharp.map.sender.csproj \ Makefile.am \ msvc10/org.apache.qpid.messaging.sessionreceiver.sln \ msvc10/org.apache.qpid.messaging.sln \ msvc9/org.apache.qpid.messaging.sessionreceiver.sln \ msvc9/org.apache.qpid.messaging.sln \ ReadMe.txt \ src/Address.cpp \ src/Address.h \ src/app.rc \ src/AssemblyInfo.cpp \ src/Connection.cpp \ src/Connection.h \ src/Duration.h \ src/FailoverUpdates.cpp \ src/FailoverUpdates.h \ src/Message.cpp \ src/Message.h \ src/msvc10/org.apache.qpid.messaging.vcxproj \ src/msvc10/org.apache.qpid.messaging.vcxproj.filters \ src/msvc9/org.apache.qpid.messaging.vcproj \ src/org.apache.qpid.messaging.template.rc \ src/qpid.snk \ src/QpidException.h \ src/QpidMarshal.h \ src/QpidTypeCheck.h \ src/ReadMe.txt \ src/Receiver.cpp \ src/Receiver.h \ src/resource1.h \ src/Sender.cpp \ src/Sender.h \ src/Session.cpp \ src/Session.h \ src/sessionreceiver/msvc10/org.apache.qpid.messaging.sessionreceiver.csproj \ src/sessionreceiver/msvc9/org.apache.qpid.messaging.sessionreceiver.csproj \ src/sessionreceiver/Properties/sessionreceiver-AssemblyInfo-template.cs \ src/sessionreceiver/qpid.snk \ src/sessionreceiver/sessionreceiver.cs \ src/TypeTranslator.cpp \ src/TypeTranslator.h \ test/messaging.test/messaging.test.address.cs \ test/messaging.test/messaging.test.connection.cs \ test/messaging.test/messaging.test.cs \ test/messaging.test/messaging.test.duration.cs \ test/messaging.test/messaging.test.message.cs \ test/messaging.test/msvc10/messaging.test.csproj \ test/messaging.test/msvc9/messaging.test.csproj \ test/messaging.test/Properties/AssemblyInfo.cs \ winsdk_sources/msvc10/examples/csharp.direct.receiver/csharp.direct.receiver.csproj \ winsdk_sources/msvc10/examples/csharp.direct.sender/csharp.direct.sender.csproj \ winsdk_sources/msvc10/examples/csharp.example.client/csharp.example.client.csproj \ winsdk_sources/msvc10/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj \ winsdk_sources/msvc10/examples/csharp.example.drain/csharp.example.drain.csproj \ winsdk_sources/msvc10/examples/csharp.example.helloworld/csharp.example.helloworld.csproj \ winsdk_sources/msvc10/examples/csharp.example.server/csharp.example.server.csproj \ winsdk_sources/msvc10/examples/csharp.example.spout/csharp.example.spout.csproj \ winsdk_sources/msvc10/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj \ winsdk_sources/msvc10/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj \ winsdk_sources/msvc10/examples/csharp.map.receiver/csharp.map.receiver.csproj \ winsdk_sources/msvc10/examples/csharp.map.sender/csharp.map.sender.csproj \ winsdk_sources/msvc10/winsdk_dotnet_examples.sln \ winsdk_sources/msvc9/examples/csharp.direct.receiver/csharp.direct.receiver.csproj \ winsdk_sources/msvc9/examples/csharp.direct.sender/csharp.direct.sender.csproj \ winsdk_sources/msvc9/examples/csharp.example.client/csharp.example.client.csproj \ winsdk_sources/msvc9/examples/csharp.example.declare_queues/csharp.example.declare_queues.csproj \ winsdk_sources/msvc9/examples/csharp.example.drain/csharp.example.drain.csproj \ winsdk_sources/msvc9/examples/csharp.example.helloworld/csharp.example.helloworld.csproj \ winsdk_sources/msvc9/examples/csharp.example.server/csharp.example.server.csproj \ winsdk_sources/msvc9/examples/csharp.example.spout/csharp.example.spout.csproj \ winsdk_sources/msvc9/examples/csharp.map.callback.receiver/csharp.map.callback.receiver.csproj \ winsdk_sources/msvc9/examples/csharp.map.callback.sender/csharp.map.callback.sender.csproj \ winsdk_sources/msvc9/examples/csharp.map.receiver/csharp.map.receiver.csproj \ winsdk_sources/msvc9/examples/csharp.map.sender/csharp.map.sender.csproj \ winsdk_sources/msvc9/winsdk_dotnet_examples.sln \ ../../../src/windows/resources/qpid-icon.ico \ ../../../src/windows/resources/template-resource.rc \ ../../../src/windows/resources/version-resource.h qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/0000775000076400007640000000000011752725721022236 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/0000775000076400007640000000000011752725721023277 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/0000775000076400007640000000000011752725721025115 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.client/0000775000076400007640000000000011752725721031304 5ustar00jrossjross00000000000000csharp.example.client.csproj0000664000076400007640000001173611667757216036657 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.client Debug x86 9.0.30729 2.0 {0DE01712-C2D1-4CA4-B42C-5856456A8696} Exe Properties csharp.example.client csharp.example.client v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.spout/0000775000076400007640000000000011752725721031200 5ustar00jrossjross00000000000000csharp.example.spout.csproj0000664000076400007640000001211211667757216036434 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.spout Debug x86 9.0.30729 2.0 {EB36626D-36C2-41B3-B65E-762BAF27F137} Exe Properties csharp.example.spout csharp.example.spout v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.receiver/0000775000076400007640000000000011752725721031451 5ustar00jrossjross00000000000000csharp.direct.receiver.csproj0000664000076400007640000001174111667757216037165 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.receiver Debug x86 9.0.30729 2.0 {52F880E7-D677-4C91-8516-D679CE0F46A8} Exe Properties csharp.direct.receiver csharp.direct.receiver v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.declare_queues/0000775000076400007640000000000011752725721033014 5ustar00jrossjross00000000000000csharp.example.declare_queues.csproj0000664000076400007640000001176611667757216042102 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.declare_queues Debug x86 9.0.30729 2.0 {E31B349C-830C-4583-8BD9-30DA4398349F} Exe Properties csharp.example.declare_queues csharp.example.declare_queues v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.sender/0000775000076400007640000000000011752725721032163 5ustar00jrossjross00000000000000csharp.map.callback.sender.csproj0000664000076400007640000001231111667757216040403 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.sender Debug x86 9.0.30729 2.0 {12F1C14F-5C7D-4075-9BAE-C091394FF99A} Exe Properties csharp.map.callback.sender csharp.map.callback.sender v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 true pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE true full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE true full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.server/0000775000076400007640000000000011752725721031334 5ustar00jrossjross00000000000000csharp.example.server.csproj0000664000076400007640000001173611667757216036737 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.server Debug x86 9.0.30729 2.0 {090A081D-E8B5-4949-AA43-EE182B7101E3} Exe Properties csharp.example.server csharp.example.server v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.receiver/0000775000076400007640000000000011752725721030754 5ustar00jrossjross00000000000000csharp.map.receiver.csproj0000664000076400007640000001173011667757216035771 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.receiver Debug x86 9.0.30729 2.0 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9} Exe Properties csharp.map.receiver csharp.map.receiver v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.sender/0000775000076400007640000000000011752725721031125 5ustar00jrossjross00000000000000csharp.direct.sender.csproj0000664000076400007640000001033011667757216036306 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.direct.sender Debug x86 9.0.30729 2.0 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068} Exe Properties csharp.direct.sender csharp.direct.sender v3.5 512 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.sender/0000775000076400007640000000000011752725721030430 5ustar00jrossjross00000000000000csharp.map.sender.csproj0000664000076400007640000001172211667757216035122 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.sender Debug x86 9.0.30729 2.0 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10} Exe Properties csharp.map.sender csharp.map.sender v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.helloworld/0000775000076400007640000000000011752725721032201 5ustar00jrossjross00000000000000csharp.example.helloworld.csproj0000664000076400007640000001147311667757216040447 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.helloworld Debug x86 9.0.30729 2.0 {8CC1C265-0507-44A3-9483-8FAF48513F4D} Exe Properties csharp.example.helloworld csharp.example.helloworld v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False False qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.drain/0000775000076400007640000000000011752725721031123 5ustar00jrossjross00000000000000csharp.example.drain.csproj0000664000076400007640000001200111667757216036277 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.example.drain Debug x86 9.0.30729 2.0 {C43DEB69-8088-420B-B0CA-C699535E6D08} Exe Properties csharp.example.drain csharp.example.drain v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.receiver/0000775000076400007640000000000011752725721032507 5ustar00jrossjross00000000000000csharp.map.callback.receiver.csproj0000664000076400007640000001334511667757216041263 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/examples/csharp.map.callback.receiver Debug x86 9.0.30729 2.0 {68A43817-2358-4A31-8FDF-FE21722BFBCF} Exe Properties csharp.map.callback.receiver csharp.map.callback.receiver v3.5 512 true full false $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE prompt 4 pdbonly true $(ProjectDir)..\..\..\bin\$(Configuration) TRACE prompt 4 true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration) DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration) TRACE true pdbonly x64 prompt False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.sessionreceiver.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll False ..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.sessionreceiver.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc9/winsdk_dotnet_examples.sln0000664000076400007640000003050311657257143030572 0ustar00jrossjross00000000000000Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License # Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.sender", "examples\csharp.direct.sender\csharp.direct.sender.csproj", "{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.receiver", "examples\csharp.direct.receiver\csharp.direct.receiver.csproj", "{52F880E7-D677-4C91-8516-D679CE0F46A8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.sender", "examples\csharp.map.sender\csharp.map.sender.csproj", "{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.receiver", "examples\csharp.map.receiver\csharp.map.receiver.csproj", "{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.receiver", "examples\csharp.map.callback.receiver\csharp.map.callback.receiver.csproj", "{68A43817-2358-4A31-8FDF-FE21722BFBCF}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.sender", "examples\csharp.map.callback.sender\csharp.map.callback.sender.csproj", "{12F1C14F-5C7D-4075-9BAE-C091394FF99A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.client", "examples\csharp.example.client\csharp.example.client.csproj", "{0DE01712-C2D1-4CA4-B42C-5856456A8696}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.server", "examples\csharp.example.server\csharp.example.server.csproj", "{090A081D-E8B5-4949-AA43-EE182B7101E3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.drain", "examples\csharp.example.drain\csharp.example.drain.csproj", "{C43DEB69-8088-420B-B0CA-C699535E6D08}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.spout", "examples\csharp.example.spout\csharp.example.spout.csproj", "{EB36626D-36C2-41B3-B65E-762BAF27F137}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.declare_queues", "examples\csharp.example.declare_queues\csharp.example.declare_queues.csproj", "{E31B349C-830C-4583-8BD9-30DA4398349F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.helloworld", "examples\csharp.example.helloworld\csharp.example.helloworld.csproj", "{8CC1C265-0507-44A3-9483-8FAF48513F4D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Win32 = Release|Win32 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|Win32.ActiveCfg = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.ActiveCfg = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.Build.0 = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.ActiveCfg = Debug|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.Build.0 = Debug|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|Win32.ActiveCfg = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.ActiveCfg = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.Build.0 = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.ActiveCfg = Release|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.Build.0 = Release|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.ActiveCfg = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.Build.0 = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.ActiveCfg = Debug|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.Build.0 = Debug|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.ActiveCfg = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.Build.0 = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.ActiveCfg = Release|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.Build.0 = Release|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.ActiveCfg = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.Build.0 = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.ActiveCfg = Debug|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.Build.0 = Debug|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.ActiveCfg = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.Build.0 = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.ActiveCfg = Release|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.Build.0 = Release|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.ActiveCfg = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.Build.0 = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.ActiveCfg = Debug|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.Build.0 = Debug|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.ActiveCfg = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.Build.0 = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.ActiveCfg = Release|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.Build.0 = Release|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.ActiveCfg = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.Build.0 = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.ActiveCfg = Debug|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.Build.0 = Debug|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.ActiveCfg = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.Build.0 = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.ActiveCfg = Release|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.Build.0 = Release|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.ActiveCfg = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.Build.0 = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.ActiveCfg = Debug|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.Build.0 = Debug|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.ActiveCfg = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.Build.0 = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.ActiveCfg = Release|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.Build.0 = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|Win32.ActiveCfg = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.ActiveCfg = Debug|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.Build.0 = Debug|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.ActiveCfg = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.Build.0 = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|Win32.ActiveCfg = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.ActiveCfg = Release|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.Build.0 = Release|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.ActiveCfg = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.Build.0 = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|Win32.ActiveCfg = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.ActiveCfg = Debug|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.Build.0 = Debug|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.ActiveCfg = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.Build.0 = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|Win32.ActiveCfg = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.ActiveCfg = Release|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.Build.0 = Release|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.ActiveCfg = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.Build.0 = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|Win32.ActiveCfg = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.ActiveCfg = Debug|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.Build.0 = Debug|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.ActiveCfg = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.Build.0 = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|Win32.ActiveCfg = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.ActiveCfg = Release|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.Build.0 = Release|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.ActiveCfg = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.Build.0 = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|Win32.ActiveCfg = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.ActiveCfg = Debug|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.Build.0 = Debug|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.ActiveCfg = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.Build.0 = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|Win32.ActiveCfg = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.ActiveCfg = Release|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.Build.0 = Release|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.ActiveCfg = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.Build.0 = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|Win32.ActiveCfg = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.ActiveCfg = Debug|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.Build.0 = Debug|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.ActiveCfg = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.Build.0 = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|Win32.ActiveCfg = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.ActiveCfg = Release|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.Build.0 = Release|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.ActiveCfg = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.Build.0 = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|Win32.ActiveCfg = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.ActiveCfg = Debug|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.Build.0 = Debug|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.ActiveCfg = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.Build.0 = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|Win32.ActiveCfg = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.ActiveCfg = Release|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.Build.0 = Release|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.ActiveCfg = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.Build.0 = Release|x86 {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Debug|Win32.ActiveCfg = Debug|Win32 {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Debug|Win32.Build.0 = Debug|Win32 {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Debug|x64.ActiveCfg = Debug|Win32 {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Debug|x86.ActiveCfg = Debug|Win32 {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Release|Win32.ActiveCfg = Release|Win32 {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Release|Win32.Build.0 = Release|Win32 {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Release|x64.ActiveCfg = Release|Win32 {7A13FEB0-3D89-4CCF-AA87-416A3D06303F}.Release|x86.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/0000775000076400007640000000000011752725721023347 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/0000775000076400007640000000000011752725721025165 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.client/0000775000076400007640000000000011752725721031354 5ustar00jrossjross00000000000000csharp.example.client.csproj0000664000076400007640000000755611670216630036714 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.client Debug x86 9.0.21022 2.0 {0DE01712-C2D1-4CA4-B42C-5856456A8696} Exe Properties csharp.example.client csharp.example.client v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.spout/0000775000076400007640000000000011752725721031250 5ustar00jrossjross00000000000000csharp.example.spout.csproj0000664000076400007640000000766511670216630036505 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.spout Debug x86 9.0.21022 2.0 {EB36626D-36C2-41B3-B65E-762BAF27F137} Exe Properties csharp.example.spout csharp.example.spout v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.direct.receiver/0000775000076400007640000000000011752725721031521 5ustar00jrossjross00000000000000csharp.direct.receiver.csproj0000664000076400007640000000756111670216630037222 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.direct.receiver Debug x86 9.0.21022 2.0 {52F880E7-D677-4C91-8516-D679CE0F46A8} Exe Properties csharp.direct.receiver csharp.direct.receiver v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.declare_queues/0000775000076400007640000000000011752725721033064 5ustar00jrossjross00000000000000csharp.example.declare_queues.csproj0000664000076400007640000000760611670216630042130 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.declare_queues Debug x86 9.0.21022 2.0 {E31B349C-830C-4583-8BD9-30DA4398349F} Exe Properties csharp.example.declare_queues csharp.example.declare_queues v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.map.callback.sender/0000775000076400007640000000000011752725721032233 5ustar00jrossjross00000000000000csharp.map.callback.sender.csproj0000664000076400007640000001000311670216630040427 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.map.callback.sender Debug x86 9.0.21022 2.0 {12F1C14F-5C7D-4075-9BAE-C091394FF99A} Exe Properties csharp.map.callback.sender csharp.map.callback.sender v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE true full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE true full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.server/0000775000076400007640000000000011752725721031404 5ustar00jrossjross00000000000000csharp.example.server.csproj0000664000076400007640000000755611670216630036774 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.server Debug x86 9.0.21022 2.0 {090A081D-E8B5-4949-AA43-EE182B7101E3} Exe Properties csharp.example.server csharp.example.server v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.map.receiver/0000775000076400007640000000000011752725721031024 5ustar00jrossjross00000000000000csharp.map.receiver.csproj0000664000076400007640000000755011670216630036026 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.map.receiver Debug x86 9.0.21022 2.0 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9} Exe Properties csharp.map.receiver csharp.map.receiver v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.direct.sender/0000775000076400007640000000000011752725721031175 5ustar00jrossjross00000000000000csharp.direct.sender.csproj0000664000076400007640000000755311670216630036353 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.direct.sender Debug x86 9.0.21022 2.0 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068} Exe Properties csharp.direct.sender csharp.direct.sender v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.map.sender/0000775000076400007640000000000011752725721030500 5ustar00jrossjross00000000000000csharp.map.sender.csproj0000664000076400007640000000754211670216630035157 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.map.sender Debug x86 9.0.21022 2.0 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10} Exe Properties csharp.map.sender csharp.map.sender v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.helloworld/0000775000076400007640000000000011752725721032251 5ustar00jrossjross00000000000000csharp.example.helloworld.csproj0000664000076400007640000000757511670216630040507 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.helloworld Debug x86 9.0.21022 2.0 {8CC1C265-0507-44A3-9483-8FAF48513F4D} Exe Properties csharp.example.helloworld csharp.example.helloworld v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.drain/0000775000076400007640000000000011752725721031173 5ustar00jrossjross00000000000000csharp.example.drain.csproj0000664000076400007640000000762111670216630036343 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.example.drain Debug x86 9.0.21022 2.0 {C43DEB69-8088-420B-B0CA-C699535E6D08} Exe Properties csharp.example.drain csharp.example.drain v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.map.callback.receiver/0000775000076400007640000000000011752725721032557 5ustar00jrossjross00000000000000csharp.map.callback.receiver.csproj0000664000076400007640000001016311670216630041306 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/examples/csharp.map.callback.receiver Debug x86 9.0.21022 2.0 {68A43817-2358-4A31-8FDF-FE21722BFBCF} Exe Properties csharp.map.callback.receiver csharp.map.callback.receiver v4.0 512 3.5 true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x86 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x86 prompt true $(ProjectDir)..\..\..\bin\$(Configuration)\ DEBUG;TRACE full x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\ TRACE true pdbonly x64 prompt $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.dll $(ProjectDir)..\..\..\bin\$(Configuration)\org.apache.qpid.messaging.sessionreceiver.dll qpidc-0.16/bindings/qpid/dotnet/winsdk_sources/msvc10/winsdk_dotnet_examples.sln0000664000076400007640000002731311657257143030647 0ustar00jrossjross00000000000000Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.sender", "examples\csharp.direct.sender\csharp.direct.sender.csproj", "{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.receiver", "examples\csharp.direct.receiver\csharp.direct.receiver.csproj", "{52F880E7-D677-4C91-8516-D679CE0F46A8}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.sender", "examples\csharp.map.sender\csharp.map.sender.csproj", "{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.receiver", "examples\csharp.map.receiver\csharp.map.receiver.csproj", "{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.receiver", "examples\csharp.map.callback.receiver\csharp.map.callback.receiver.csproj", "{68A43817-2358-4A31-8FDF-FE21722BFBCF}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.sender", "examples\csharp.map.callback.sender\csharp.map.callback.sender.csproj", "{12F1C14F-5C7D-4075-9BAE-C091394FF99A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.client", "examples\csharp.example.client\csharp.example.client.csproj", "{0DE01712-C2D1-4CA4-B42C-5856456A8696}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.server", "examples\csharp.example.server\csharp.example.server.csproj", "{090A081D-E8B5-4949-AA43-EE182B7101E3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.drain", "examples\csharp.example.drain\csharp.example.drain.csproj", "{C43DEB69-8088-420B-B0CA-C699535E6D08}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.spout", "examples\csharp.example.spout\csharp.example.spout.csproj", "{EB36626D-36C2-41B3-B65E-762BAF27F137}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.declare_queues", "examples\csharp.example.declare_queues\csharp.example.declare_queues.csproj", "{E31B349C-830C-4583-8BD9-30DA4398349F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.helloworld", "examples\csharp.example.helloworld\csharp.example.helloworld.csproj", "{8CC1C265-0507-44A3-9483-8FAF48513F4D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Win32 = Release|Win32 Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|Win32.ActiveCfg = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.ActiveCfg = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.Build.0 = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.ActiveCfg = Debug|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.Build.0 = Debug|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|Win32.ActiveCfg = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.ActiveCfg = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.Build.0 = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.ActiveCfg = Release|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.Build.0 = Release|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|Win32.ActiveCfg = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.ActiveCfg = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.Build.0 = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.ActiveCfg = Debug|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.Build.0 = Debug|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|Win32.ActiveCfg = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.ActiveCfg = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.Build.0 = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.ActiveCfg = Release|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.Build.0 = Release|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|Win32.ActiveCfg = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.ActiveCfg = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.Build.0 = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.ActiveCfg = Debug|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.Build.0 = Debug|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|Win32.ActiveCfg = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.ActiveCfg = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.Build.0 = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.ActiveCfg = Release|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.Build.0 = Release|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|Win32.ActiveCfg = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.ActiveCfg = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.Build.0 = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.ActiveCfg = Debug|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.Build.0 = Debug|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|Win32.ActiveCfg = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.ActiveCfg = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.Build.0 = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.ActiveCfg = Release|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.Build.0 = Release|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|Win32.ActiveCfg = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.ActiveCfg = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.Build.0 = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.ActiveCfg = Debug|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.Build.0 = Debug|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|Win32.ActiveCfg = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.ActiveCfg = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.Build.0 = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.ActiveCfg = Release|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.Build.0 = Release|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|Win32.ActiveCfg = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.ActiveCfg = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.Build.0 = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.ActiveCfg = Debug|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.Build.0 = Debug|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|Win32.ActiveCfg = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.ActiveCfg = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.Build.0 = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.ActiveCfg = Release|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.Build.0 = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|Win32.ActiveCfg = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.ActiveCfg = Debug|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.Build.0 = Debug|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.ActiveCfg = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.Build.0 = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|Win32.ActiveCfg = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.ActiveCfg = Release|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.Build.0 = Release|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.ActiveCfg = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.Build.0 = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|Win32.ActiveCfg = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.ActiveCfg = Debug|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.Build.0 = Debug|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.ActiveCfg = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.Build.0 = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|Win32.ActiveCfg = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.ActiveCfg = Release|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.Build.0 = Release|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.ActiveCfg = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.Build.0 = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|Win32.ActiveCfg = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.ActiveCfg = Debug|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.Build.0 = Debug|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.ActiveCfg = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.Build.0 = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|Win32.ActiveCfg = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.ActiveCfg = Release|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.Build.0 = Release|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.ActiveCfg = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.Build.0 = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|Win32.ActiveCfg = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.ActiveCfg = Debug|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.Build.0 = Debug|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.ActiveCfg = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.Build.0 = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|Win32.ActiveCfg = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.ActiveCfg = Release|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.Build.0 = Release|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.ActiveCfg = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.Build.0 = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|Win32.ActiveCfg = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.ActiveCfg = Debug|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.Build.0 = Debug|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.ActiveCfg = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.Build.0 = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|Win32.ActiveCfg = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.ActiveCfg = Release|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.Build.0 = Release|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.ActiveCfg = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.Build.0 = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|Win32.ActiveCfg = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.ActiveCfg = Debug|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.Build.0 = Debug|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.ActiveCfg = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.Build.0 = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|Win32.ActiveCfg = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.ActiveCfg = Release|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.Build.0 = Release|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.ActiveCfg = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal qpidc-0.16/bindings/qpid/dotnet/examples/0000775000076400007640000000000011752725721021012 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.client/0000775000076400007640000000000011752725721025201 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.client/Properties/0000775000076400007640000000000011752725721027335 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.client/Properties/AssemblyInfo.cs0000664000076400007640000000436011466064376032266 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.example.client")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.example.client")] [assembly: AssemblyCopyright("Copyright ? 2010")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.client/csharp.example.client.cs0000664000076400007640000000522511475523745031727 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using Org.Apache.Qpid.Messaging; namespace Org.Apache.Qpid.Messaging.Examples { class Client { static int Main(string[] args) { String url = "amqp:tcp:127.0.0.1:5672"; String connectionOptions = ""; if (args.Length > 0) url = args[0]; if (args.Length > 1) connectionOptions = args[1]; Connection connection = new Connection(url, connectionOptions); try { connection.Open(); Session session = connection.CreateSession(); Sender sender = session.CreateSender("service_queue"); Address responseQueue = new Address("#response-queue; {create:always, delete:always}"); Receiver receiver = session.CreateReceiver(responseQueue); String[] s = new String[] { "Twas brillig, and the slithy toves", "Did gire and gymble in the wabe.", "All mimsy were the borogroves,", "And the mome raths outgrabe." }; Message request = new Message(""); request.ReplyTo = responseQueue; for (int i = 0; i < s.Length; i++) { request.SetContent(s[i]); sender.Send(request); Message response = receiver.Fetch(); Console.WriteLine("{0} -> {1}", request.GetContent(), response.GetContent()); } connection.Close(); return 0; } catch (Exception e) { Console.WriteLine("Exception {0}.", e); connection.Close(); } return 1; } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.spout/0000775000076400007640000000000011752725721025075 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.spout/Options.cs0000664000076400007640000001233211466573123027057 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace Org.Apache.Qpid.Messaging.Examples { using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; public class Options { private string url; private string address; private int timeout; private int count; private string id; private string replyTo; private Collection properties; private Collection entries; private string content; private string connectionOptions; private bool forever; public Options(string[] args) { this.url = "amqp:tcp:127.0.0.1:5672"; this.address = ""; this.timeout = 0; this.count = 1; this.id = ""; this.replyTo = ""; properties = new Collection(); entries = new Collection(); this.content = ""; this.connectionOptions = ""; this.forever = false; Parse(args); } private void Parse(string[] args) { int argCount = args.Length; int current = 0; while ((current + 1) < argCount) { string arg = args[current]; if (arg == "--broker") { this.url = args[++current]; } else if (arg == "--address") { this.address = args[++current]; } else if (arg == "--timeout") { arg = args[++current]; int i = int.Parse(arg); if (i >= 0) { this.timeout = i; } } else if (arg == "--count") { arg = args[++current]; int i = int.Parse(arg); if (i >= 0) { this.count = i; } } else if (arg == "--id") { this.id = args[++current]; } else if (arg == "--reply-to") { this.replyTo = args[++current]; } else if (arg == "--properties") { this.properties.Add(args[++current]); } else if (arg == "--map") { this.entries.Add(args[++current]); } else if (arg == "--content") { this.content = args[++current]; } else if (arg == "--connection-options") { this.connectionOptions = args[++current]; } else if (arg == "--forever") { this.forever = true; } else { throw new ArgumentException(String.Format("unknown argument \"{0}\"", arg)); } current++; } if (current == argCount) { throw new ArgumentException("missing argument: address"); } address = args[current]; } public string Url { get { return this.url; } } public string Address { get { return this.address; } } public int Timeout { get { return this.timeout; } } public int Count { get { return this.count; } } public string Id { get { return this.id; } } public string ReplyTo { get { return this.replyTo; } } public Collection Entries { get { return this.entries; } } public string Content { get { return content; } } public string ConnectionOptions { get { return this.connectionOptions; } } public bool Forever { get { return this.forever; } } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.spout/Properties/0000775000076400007640000000000011752725721027231 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.spout/Properties/AssemblyInfo.cs0000664000076400007640000000435611466064376032167 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.example.spout")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.example.spout")] [assembly: AssemblyCopyright("Copyright ? 2010")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.spout/csharp.example.spout.cs0000664000076400007640000001052111475523745031512 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using System.Diagnostics; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; namespace Org.Apache.Qpid.Messaging.Examples { class Spout { // // Sample invocation: csharp.example.spout.exe --broker localhost:5672 my-queue // static bool NameVal(string In, out string nameOut, out string valueOut) { int pos = In.IndexOf("="); if (-1 == pos) { nameOut = In; valueOut = ""; return false; } else { nameOut = In.Substring(0, pos); if (pos + 1 < In.Length) { valueOut = In.Substring(pos + 1); return true; } else { valueOut = ""; return false; } } } static void SetEntries(Collection entries, Dictionary content) { foreach (String entry in entries) { string name = ""; string value = ""; if (NameVal(entry, out name, out value)) content.Add(name, value); else content.Add(name, ""); } } static int Main(string[] args) { Options options = new Options(args); Connection connection = null; try { connection = new Connection(options.Url, options.ConnectionOptions); connection.Open(); Session session = connection.CreateSession(); Sender sender = session.CreateSender(options.Address); Message message; if (options.Entries.Count > 0) { Dictionary content = new Dictionary(); SetEntries(options.Entries, content); message = new Message(content); } else { message = new Message(options.Content); message.ContentType = "text/plain"; } Address replyToAddr = new Address(options.ReplyTo); Stopwatch stopwatch = new Stopwatch(); TimeSpan timespan = new TimeSpan(0,0,options.Timeout); stopwatch.Start(); for (int count = 0; (0 == options.Count || count < options.Count) && (0 == options.Timeout || stopwatch.Elapsed <= timespan); count++) { if ("" != options.ReplyTo) message.ReplyTo = replyToAddr; string id = options.Id ; if ("" == id) { Guid g = Guid.NewGuid(); id = g.ToString(); } string spoutid = id + ":" + count; message.SetProperty("spout-id", spoutid); sender.Send(message); } session.Sync(); connection.Close(); return 0; } catch (Exception e) { Console.WriteLine("Exception {0}.", e); if (null != connection) connection.Close(); } return 1; } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.direct.receiver/0000775000076400007640000000000011752725721025346 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/0000775000076400007640000000000011752725721027502 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.direct.receiver/Properties/AssemblyInfo.cs0000664000076400007640000000435011623011227032410 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.direct.receiver")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.direct.receiver")] [assembly: AssemblyCopyright("Copyright 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/examples/csharp.direct.receiver/csharp.direct.receiver.cs0000664000076400007640000000545111475523745032242 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using Org.Apache.Qpid.Messaging; namespace CSharpDirect { class Program { // Direct receiver example // // Receive 10 messages from localhost:5672, amq.direct/key // Messages are assumed to be printable strings. // static int Main(string[] args) { String host = "localhost:5672"; String addr = "amq.direct/key"; Int32 nMsg = 10; if (args.Length > 0) host = args[0]; if (args.Length > 1) addr = args[1]; if (args.Length > 2) nMsg = Convert.ToInt32(args[2]); Console.WriteLine("csharp.direct.receiver"); Console.WriteLine("host : {0}", host); Console.WriteLine("addr : {0}", addr); Console.WriteLine("nMsg : {0}", nMsg); Console.WriteLine(); Connection connection = null; try { connection = new Connection(host); connection.Open(); if (!connection.IsOpen) { Console.WriteLine("Failed to open connection to host : {0}", host); } else { Session session = connection.CreateSession(); Receiver receiver = session.CreateReceiver(addr); Message message = new Message(""); for (int i = 0; i < nMsg; i++) { Message msg2 = receiver.Fetch(DurationConstants.FORVER); Console.WriteLine("Rcvd msg {0} : {1}", i, msg2.GetContent()); } connection.Close(); return 0; } } catch (Exception e) { Console.WriteLine("Exception {0}.", e); if (null != connection) connection.Close(); } return 1; } } }qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.declare_queues/0000775000076400007640000000000011752725721026711 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.declare_queues/Properties/0000775000076400007640000000000011752725721031045 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.declare_queues/Properties/AssemblyInfo.cs0000664000076400007640000000440011462344661033763 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.example.declare_queues")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.example.declare_queues")] [assembly: AssemblyCopyright("Copyright ? 2010")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] csharp.example.declare_queues.cs0000664000076400007640000000401411475523745035063 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.declare_queues/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using Org.Apache.Qpid.Messaging; namespace Org.Apache.Qpid.Messaging.Examples { class DeclareQueues { // // Sample invocation: csharp.example.declare_queues.exe localhost:5672 my-queue // static int Main(string[] args) { string addr = "localhost:5672"; string queue = "my-queue"; if (args.Length > 0) addr = args[0]; if (args.Length > 1) queue = args[1]; Connection connection = null; try { connection = new Connection(addr); connection.Open(); Session session = connection.CreateSession(); String queueName = queue + "; {create: always}"; Sender sender = session.CreateSender(queueName); session.Close(); connection.Close(); return 0; } catch (Exception e) { Console.WriteLine("Exception {0}.", e); if (null != connection) connection.Close(); } return 1; } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.callback.sender/0000775000076400007640000000000011752725721026060 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.callback.sender/csharp.map.callback.sender.cs0000664000076400007640000001440511475523745033465 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; namespace Org.Apache.Qpid.Messaging.Examples { class MapSender { // // usage // static void usage(string url, string addr, UInt32 count, string connOpts) { Console.WriteLine("usage: {0} [url [addr [count]]]", System.Diagnostics.Process.GetCurrentProcess().ProcessName); Console.WriteLine(); Console.WriteLine("A program to connect to a broker and send N"); Console.WriteLine("messages to a named exchange with a routing key."); Console.WriteLine(); Console.WriteLine(" url = target address for 'new Connection(url)'"); Console.WriteLine(" addr = address for 'session.CreateReceiver(addr)'"); Console.WriteLine(" count = number of messages to send"); Console.WriteLine(" connectionOptions = options list"); Console.WriteLine(); Console.WriteLine("Default values:"); Console.WriteLine(" {0} {1} {2} {3} {4}", System.Diagnostics.Process.GetCurrentProcess().ProcessName, url, addr, count, connOpts); } // // TestProgram // public int TestProgram(string[] args) { string url = "amqp:tcp:localhost:5672"; string addr = "amq.direct/map_example"; UInt32 count = 1; string connectionOptions = ""; if (1 == args.Length) { if (args[0].Equals("-h") || args[0].Equals("-H") || args[0].Equals("/?")) { usage(url, addr, count, connectionOptions); return 1; } } if (args.Length > 0) url = args[0]; if (args.Length > 1) addr = args[1]; if (args.Length > 2) count = System.Convert.ToUInt32(args[2]); if (args.Length > 3) connectionOptions = args[3]; // // Create and open an AMQP connection to the broker URL // Connection connection = new Connection(url, connectionOptions); connection.Open(); // // Create a session and a sender to the direct exchange using the // routing key "map_example". // Session session = connection.CreateSession(); Sender sender = session.CreateSender(addr); // // Create structured content for the message. This example builds a // map of items including a nested map and a list of values. // Dictionary content = new Dictionary(); Dictionary subMap = new Dictionary(); Collection colors = new Collection(); // add simple types content["id"] = 987654321; content["name"] = "Widget"; content["percent"] = 0.99; // add nested amqp/map subMap["name"] = "Smith"; subMap["number"] = 354; content["nestedMap"] = subMap; // add an amqp/list colors.Add("red"); colors.Add("green"); colors.Add("white"); content["colorsList"] = colors; // add one of each supported amqp data type bool mybool = true; content["mybool"] = mybool; byte mybyte = 4; content["mybyte"] = mybyte; UInt16 myUInt16 = 5; content["myUInt16"] = myUInt16; UInt32 myUInt32 = 6; content["myUInt32"] = myUInt32; UInt64 myUInt64 = 7; content["myUInt64"] = myUInt64; char mychar = 'h'; content["mychar"] = mychar; Int16 myInt16 = 9; content["myInt16"] = myInt16; Int32 myInt32 = 10; content["myInt32"] = myInt32; Int64 myInt64 = 11; content["myInt64"] = myInt64; Single mySingle = (Single)12.12; content["mySingle"] = mySingle; Double myDouble = 13.13; content["myDouble"] = myDouble; Guid myGuid = new Guid("000102030405060708090a0b0c0d0e0f"); content["myGuid"] = myGuid; // // Construct a message with the map content and send it synchronously // via the sender. // Message message = new Message(content); for (UInt32 i = 0; i 0) url = args[0]; // address args[1] is not used in this example if (args.Length > 2) connectionOptions = args[2]; try { Connection connection = new Connection(url, connectionOptions); connection.Open(); Session session = connection.CreateSession(); Receiver receiver = session.CreateReceiver("service_queue; {create: always}"); while (true) { Message request = receiver.Fetch(); Address address = request.ReplyTo; if (null != address) { Sender sender = session.CreateSender(address); String s = request.GetContent(); Message response = new Message(s.ToUpper()); sender.Send(response); Console.WriteLine("Processed request: {0} -> {1}", request.GetContent(), response.GetContent()); session.Acknowledge(); } else { Console.WriteLine("Error: no reply address specified for request: {0}", request.GetContent()); session.Reject(request); } } // connection.Close(); // unreachable in this example } catch (Exception e) { Console.WriteLine("Exception {0}.", e); } return 1; } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.receiver/0000775000076400007640000000000011752725721024651 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/0000775000076400007640000000000011752725721027005 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.receiver/Properties/AssemblyInfo.cs0000664000076400007640000000434511623011227031717 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.map.receiver")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.map.receiver")] [assembly: AssemblyCopyright("Copyright 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("002049f9-41c5-420f-9ff6-45bb652dded6")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.receiver/csharp.map.receiver.cs0000664000076400007640000000547511510415706031041 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using System.Collections.Generic; using Org.Apache.Qpid.Messaging; namespace Org.Apache.Qpid.Messaging.examples { class MapReceiver { // csharp.map.receiver example // // Send an amqp/map message to amqp:tcp:localhost:5672 amq.direct/map_example // The map message // static int Main(string[] args) { string url = "amqp:tcp:localhost:5672"; string address = "message_queue; {create: always}"; string connectionOptions = ""; if (args.Length > 0) url = args[0]; if (args.Length > 1) address = args[1]; if (args.Length > 2) connectionOptions = args[3]; // // Create and open an AMQP connection to the broker URL // Connection connection = new Connection(url); connection.Open(); // // Create a session and a receiver fir the direct exchange using the // routing key "map_example". // Session session = connection.CreateSession(); Receiver receiver = session.CreateReceiver(address); // // Fetch the message from the broker // Message message = receiver.Fetch(DurationConstants.MINUTE); // // Extract the structured content from the message. // Dictionary content = new Dictionary(); message.GetContent(content); Console.WriteLine("{0}", message.AsString(content)); // // Acknowledge the receipt of all received messages. // session.Acknowledge(); // // Close the receiver and the connection. // receiver.Close(); connection.Close(); return 0; } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.direct.sender/0000775000076400007640000000000011752725721025022 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/0000775000076400007640000000000011752725721027156 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.direct.sender/Properties/AssemblyInfo.cs0000664000076400007640000000434411623011227032067 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.direct.sender")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.direct.sender")] [assembly: AssemblyCopyright("Copyright 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("19ce67e4-db90-4480-88c4-3721f47634c7")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/examples/csharp.direct.sender/csharp.direct.sender.cs0000664000076400007640000000537011475523745031372 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using Org.Apache.Qpid.Messaging; namespace csharp.direct.sender { class Program { // Direct sender example // // Send 10 messages from localhost:5672, amq.direct/key // Messages are assumed to be printable strings. // static int Main(string[] args) { String host = "localhost:5672"; String addr = "amq.direct/key"; Int32 nMsg = 10; if (args.Length > 0) host = args[0]; if (args.Length > 1) addr = args[1]; if (args.Length > 2) nMsg = Convert.ToInt32(args[2]); Console.WriteLine("csharp.direct.sender"); Console.WriteLine("host : {0}", host); Console.WriteLine("addr : {0}", addr); Console.WriteLine("nMsg : {0}", nMsg); Console.WriteLine(); Connection connection = null; try { connection = new Connection(host); connection.Open(); if (!connection.IsOpen) { Console.WriteLine("Failed to open connection to host : {0}", host); } else { Session session = connection.CreateSession(); Sender sender = session.CreateSender(addr); for (int i = 0; i < nMsg; i++) { Message message = new Message(String.Format("Test Message {0}", i)); sender.Send(message); } session.Sync(); connection.Close(); return 0; } } catch (Exception e) { Console.WriteLine("Exception {0}.", e); if (null != connection) connection.Close(); } return 1; } } } qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/0000775000076400007640000000000011752725721022053 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.client/0000775000076400007640000000000011752725721026242 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.client/csharp.example.client.csproj0000664000076400007640000001102711656310053033643 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {0DE01712-C2D1-4CA4-B42C-5856456A8696} Exe Properties csharp.example.client csharp.example.client v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.spout/0000775000076400007640000000000011752725721026136 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.spout/csharp.example.spout.csproj0000664000076400007640000001122611656310053033434 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {EB36626D-36C2-41B3-B65E-762BAF27F137} Exe Properties csharp.example.spout csharp.example.spout v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.direct.receiver/0000775000076400007640000000000011752725721026407 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.direct.receiver/csharp.direct.receiver.csproj0000664000076400007640000001103411656310053034153 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {52F880E7-D677-4C91-8516-D679CE0F46A8} Exe Properties csharp.direct.receiver csharp.direct.receiver v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.declare_queues/0000775000076400007640000000000011752725721027752 5ustar00jrossjross00000000000000csharp.example.declare_queues.csproj0000664000076400007640000001107711656310053037011 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.declare_queues Debug x86 9.0.30729 2.0 {E31B349C-830C-4583-8BD9-30DA4398349F} Exe Properties csharp.example.declare_queues csharp.example.declare_queues v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.sender/0000775000076400007640000000000011752725721027121 5ustar00jrossjross00000000000000csharp.map.callback.sender.csproj0000664000076400007640000001132511656310053035323 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.sender Debug x86 9.0.21022 2.0 {12F1C14F-5C7D-4075-9BAE-C091394FF99A} Exe Properties csharp.map.callback.sender csharp.map.callback.sender v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE true full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE true full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.server/0000775000076400007640000000000011752725721026272 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.server/csharp.example.server.csproj0000664000076400007640000001102711656310053033723 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {090A081D-E8B5-4949-AA43-EE182B7101E3} Exe Properties csharp.example.server csharp.example.server v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.map.receiver/0000775000076400007640000000000011752725721025712 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.map.receiver/csharp.map.receiver.csproj0000664000076400007640000001101511656310053032760 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9} Exe Properties csharp.map.receiver csharp.map.receiver v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.direct.sender/0000775000076400007640000000000011752725721026063 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.direct.sender/csharp.direct.sender.csproj0000664000076400007640000001102211656310053033300 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068} Exe Properties csharp.direct.sender csharp.direct.sender v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.map.sender/0000775000076400007640000000000011752725721025366 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.map.sender/csharp.map.sender.csproj0000664000076400007640000001100311656310053032105 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10} Exe Properties csharp.map.sender csharp.map.sender v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.helloworld/0000775000076400007640000000000011752725721027137 5ustar00jrossjross00000000000000csharp.example.helloworld.csproj0000664000076400007640000001105311656310053035355 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.helloworld Debug x86 9.0.21022 2.0 {8CC1C265-0507-44A3-9483-8FAF48513F4D} Exe Properties csharp.example.helloworld csharp.example.helloworld v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.drain/0000775000076400007640000000000011752725721026061 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.example.drain/csharp.example.drain.csproj0000664000076400007640000001112311656310053033276 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {C43DEB69-8088-420B-B0CA-C699535E6D08} Exe Properties csharp.example.drain csharp.example.drain v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.receiver/0000775000076400007640000000000011752725721027445 5ustar00jrossjross00000000000000csharp.map.callback.receiver.csproj0000664000076400007640000001161311656310053036173 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc9/csharp.map.callback.receiver Debug x86 9.0.30729 2.0 {68A43817-2358-4A31-8FDF-FE21722BFBCF} Exe Properties csharp.map.callback.receiver csharp.map.callback.receiver v3.5 512 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05} org.apache.qpid.messaging.sessionreceiver qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/0000775000076400007640000000000011752725721022123 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.client/0000775000076400007640000000000011752725721026312 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.client/csharp.example.client.csproj0000664000076400007640000001136711657030265033727 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {0DE01712-C2D1-4CA4-B42C-5856456A8696} Exe Properties csharp.example.client csharp.example.client v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.client/app.config0000664000076400007640000000022011657030265030247 0ustar00jrossjross00000000000000 qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.spout/0000775000076400007640000000000011752725721026206 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.spout/app.config0000664000076400007640000000022011657030265030143 0ustar00jrossjross00000000000000 qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.spout/csharp.example.spout.csproj0000664000076400007640000001156611657030265033520 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {EB36626D-36C2-41B3-B65E-762BAF27F137} Exe Properties csharp.example.spout csharp.example.spout v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.direct.receiver/0000775000076400007640000000000011752725721026457 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.direct.receiver/app.config0000664000076400007640000000022011657030265030414 0ustar00jrossjross00000000000000 qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.direct.receiver/csharp.direct.receiver.csproj0000664000076400007640000001137411657030265034237 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {52F880E7-D677-4C91-8516-D679CE0F46A8} Exe Properties csharp.direct.receiver csharp.direct.receiver v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.declare_queues/0000775000076400007640000000000011752725721030022 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.declare_queues/app.config0000664000076400007640000000022011657030265031757 0ustar00jrossjross00000000000000 csharp.example.declare_queues.csproj0000664000076400007640000001143711657030265037066 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.declare_queues Debug x86 9.0.21022 2.0 {E31B349C-830C-4583-8BD9-30DA4398349F} Exe Properties csharp.example.declare_queues csharp.example.declare_queues v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.callback.sender/0000775000076400007640000000000011752725721027171 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.callback.sender/app.config0000664000076400007640000000022011657030265031126 0ustar00jrossjross00000000000000 csharp.map.callback.sender.csproj0000664000076400007640000001166511657030265035407 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.callback.sender Debug x86 9.0.21022 2.0 {12F1C14F-5C7D-4075-9BAE-C091394FF99A} Exe Properties csharp.map.callback.sender csharp.map.callback.sender v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE true full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE true full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.server/0000775000076400007640000000000011752725721026342 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.server/app.config0000664000076400007640000000022011657030265030277 0ustar00jrossjross00000000000000 qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.server/csharp.example.server.csproj0000664000076400007640000001136711657030265034007 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {090A081D-E8B5-4949-AA43-EE182B7101E3} Exe Properties csharp.example.server csharp.example.server v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.receiver/0000775000076400007640000000000011752725721025762 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.receiver/csharp.map.receiver.csproj0000664000076400007640000001135511657030265033044 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9} Exe Properties csharp.map.receiver csharp.map.receiver v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.receiver/app.config0000664000076400007640000000022011657030265027717 0ustar00jrossjross00000000000000 qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.direct.sender/0000775000076400007640000000000011752725721026133 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.direct.sender/app.config0000664000076400007640000000022011657030265030070 0ustar00jrossjross00000000000000 qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.direct.sender/csharp.direct.sender.csproj0000664000076400007640000001136211657030265033364 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068} Exe Properties csharp.direct.sender csharp.direct.sender v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.sender/0000775000076400007640000000000011752725721025436 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.sender/csharp.map.sender.csproj0000664000076400007640000001134311657030265032171 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10} Exe Properties csharp.map.sender csharp.map.sender v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.sender/app.config0000664000076400007640000000022011657030265027373 0ustar00jrossjross00000000000000 qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.helloworld/0000775000076400007640000000000011752725721027207 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.helloworld/app.config0000664000076400007640000000022011657030265031144 0ustar00jrossjross00000000000000 csharp.example.helloworld.csproj0000664000076400007640000001141311657030265035432 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.helloworld Debug x86 9.0.21022 2.0 {8CC1C265-0507-44A3-9483-8FAF48513F4D} Exe Properties csharp.example.helloworld csharp.example.helloworld v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.drain/0000775000076400007640000000000011752725721026131 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.drain/app.config0000664000076400007640000000022011657030265030066 0ustar00jrossjross00000000000000 qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.example.drain/csharp.example.drain.csproj0000664000076400007640000001146311657030265033362 0ustar00jrossjross00000000000000 Debug x86 9.0.21022 2.0 {C43DEB69-8088-420B-B0CA-C699535E6D08} Exe Properties csharp.example.drain csharp.example.drain v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.callback.receiver/0000775000076400007640000000000011752725721027515 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.callback.receiver/app.config0000664000076400007640000000022011657030265031452 0ustar00jrossjross00000000000000 csharp.map.callback.receiver.csproj0000664000076400007640000001215411657030265036251 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/msvc10/csharp.map.callback.receiver Debug x86 9.0.21022 2.0 {68A43817-2358-4A31-8FDF-FE21722BFBCF} Exe Properties csharp.map.callback.receiver csharp.map.callback.receiver v4.0 512 3.5 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05} org.apache.qpid.messaging.sessionreceiver qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.sender/0000775000076400007640000000000011752725721024325 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/0000775000076400007640000000000011752725721026461 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.sender/Properties/AssemblyInfo.cs0000664000076400007640000000434111623011227031367 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.map.sender")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.map.sender")] [assembly: AssemblyCopyright("Copyright 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("1eec2eca-adbd-4394-8b01-f4c4645bb122")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.sender/csharp.map.sender.cs0000664000076400007640000001127311475523745030177 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; namespace Org.Apache.Qpid.Messaging.examples { class MapSender { // csharp.map.sender example // // Send an amqp/map message to amqp:tcp:localhost:5672 amq.direct/map_example // The map message contains simple types, a nested amqp/map, // an ampq/list, and specific instances of each supported type. // static int Main(string[] args) { string url = "amqp:tcp:localhost:5672"; string address = "message_queue; {create: always}"; string connectionOptions = ""; if (args.Length > 0) url = args[0]; if (args.Length > 1) address = args[1]; if (args.Length > 2) connectionOptions = args[2]; // // Create and open an AMQP connection to the broker URL // Connection connection = new Connection(url, connectionOptions); connection.Open(); // // Create a session and a sender to the direct exchange // Session session = connection.CreateSession(); Sender sender = session.CreateSender(address); // // Create structured content for the message. This example builds a // map of items including a nested map and a list of values. // Dictionary content = new Dictionary(); Dictionary subMap = new Dictionary(); Collection colors = new Collection(); // add simple types content["id"] = 987654321; content["name"] = "Widget"; content["percent"] = 0.99; // add nested amqp/map subMap["name"] = "Smith"; subMap["number"] = 354; content["nestedMap"] = subMap; // add an amqp/list colors.Add("red"); colors.Add("green"); colors.Add("white"); // list contains null value colors.Add(null); content["colorsList"] = colors; // add one of each supported amqp data type bool mybool = true; content["mybool"] = mybool; byte mybyte = 4; content["mybyte"] = mybyte; UInt16 myUInt16 = 5 ; content["myUInt16"] = myUInt16; UInt32 myUInt32 = 6; content["myUInt32"] = myUInt32; UInt64 myUInt64 = 7; content["myUInt64"] = myUInt64; char mychar = 'h'; content["mychar"] = mychar; Int16 myInt16 = 9; content["myInt16"] = myInt16; Int32 myInt32 = 10; content["myInt32"] = myInt32; Int64 myInt64 = 11; content["myInt64"] = myInt64; Single mySingle = (Single)12.12; content["mySingle"] = mySingle; Double myDouble = 13.13; content["myDouble"] = myDouble; Guid myGuid = new Guid("000102030405060708090a0b0c0d0e0f"); content["myGuid"] = myGuid; content["myNull"] = null; // // Construct a message with the map content and send it synchronously // via the sender. // Message message = new Message(content); sender.Send(message, true); // // Wait until broker receives all messages. // session.Sync(); // // Close the connection. // connection.Close(); return 0; } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.helloworld/0000775000076400007640000000000011752725721026076 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.helloworld/Properties/0000775000076400007640000000000011752725721030232 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.helloworld/Properties/AssemblyInfo.cs0000664000076400007640000000437011466064376033164 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.example.helloworld")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.example.helloworld")] [assembly: AssemblyCopyright("Copyright ? 2010")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("19ce67e4-db90-4480-88c4-3721f47634c7")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.helloworld/csharp.example.helloworld.cs0000664000076400007640000000376111410651053033503 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using Org.Apache.Qpid.Messaging; namespace Org.Apache.Qpid.Messaging { class Program { static void Main(string[] args) { String broker = args.Length > 0 ? args[0] : "localhost:5672"; String address = args.Length > 1 ? args[1] : "amq.topic"; Connection connection = null; try { connection = new Connection(broker); connection.Open(); Session session = connection.CreateSession(); Receiver receiver = session.CreateReceiver(address); Sender sender = session.CreateSender(address); sender.Send(new Message("Hello world!")); Message message = new Message(); message = receiver.Fetch(DurationConstants.SECOND * 1); Console.WriteLine("{0}", message.GetContent()); session.Acknowledge(); connection.Close(); } catch (Exception e) { Console.WriteLine("Exception {0}.", e); if (null != connection) connection.Close(); } } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.drain/0000775000076400007640000000000011752725721025020 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.drain/Options.cs0000664000076400007640000001171511466573123027006 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace Org.Apache.Qpid.Messaging.Examples { using System; public class Options { private string url; private string address; private UInt64 timeout; private int count; private string id; private string replyTo; //private string[] properties; //private string[] entries; private string content; private string connectionOptions; private bool forever; public Options(string[] args) { this.url = "amqp:tcp:127.0.0.1:5672"; this.address = ""; this.timeout = 0; this.count = 1; this.id = ""; this.replyTo = ""; this.content = ""; this.connectionOptions = ""; this.forever = false; Parse(args); } private void Parse(string[] args) { int argCount = args.Length; int current = 0; while ((current + 1) < argCount) { string arg = args[current]; if (arg == "--broker") { this.url = args[++current]; } else if (arg == "--address") { this.address = args[++current]; } else if (arg == "--timeout") { arg = args[++current]; UInt64 i = UInt64.Parse(arg); if (i >= 0) { this.timeout = i; } } else if (arg == "--count") { arg = args[++current]; int i = int.Parse(arg); if (i >= 0) { this.count = i; } } else if (arg == "--id") { this.id = args[++current]; } else if (arg == "--reply-to") { this.replyTo = args[++current]; } else if (arg == "--properties") { throw new ArgumentException("TODO: properties not implemented"); } else if (arg == "--entries") { throw new ArgumentException("TODO: entries not implemented"); } else if (arg == "--content") { this.content = args[++current]; } else if (arg == "--connection-options") { this.connectionOptions = args[++current]; } else if (arg == "--forever") { this.forever = true; } else { throw new ArgumentException(String.Format("unknown argument \"{0}\"", arg)); } current++; } if (current == argCount) { throw new ArgumentException("missing argument: address"); } address = args[current]; } public string Url { get { return this.url; } } public string Address { get { return this.address; } } public UInt64 Timeout { get { return this.timeout; } } public int Count { get { return this.count; } } public string Id { get { return this.id; } } public string ReplyTo { get { return this.replyTo; } } public string Content { get { return content; } } public string ConnectionOptions { get { return this.connectionOptions; } } public bool Forever { get { return this.forever; } } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.drain/Properties/0000775000076400007640000000000011752725721027154 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.drain/Properties/AssemblyInfo.cs0000664000076400007640000000435611466064376032112 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.example.drain")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.example.drain")] [assembly: AssemblyCopyright("Copyright ? 2010")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c60b17ab-a82c-4edf-ba95-1e88bd4c3e75")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/examples/csharp.example.drain/csharp.example.drain.cs0000664000076400007640000000670011510400173031337 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; namespace Org.Apache.Qpid.Messaging.Examples { class Drain { // // Sample invocation: csharp.example.drain.exe --broker localhost:5672 --timeout 30 my-queue // static int Main(string[] args) { Options options = new Options(args); Connection connection = null; try { connection = new Connection(options.Url, options.ConnectionOptions); connection.Open(); Session session = connection.CreateSession(); Receiver receiver = session.CreateReceiver(options.Address); Duration timeout = options.Forever ? DurationConstants.FORVER : DurationConstants.SECOND * options.Timeout; Message message = new Message(); while (receiver.Fetch(ref message, timeout)) { Dictionary properties = new Dictionary(); properties = message.Properties; Console.Write("Message(properties={0}, content='", message.MapAsString(properties)); if ("amqp/map" == message.ContentType) { Dictionary content = new Dictionary(); message.GetContent(content); Console.Write(message.MapAsString(content)); } else if ("amqp/list" == message.ContentType) { Collection content = new Collection(); message.GetContent(content); Console.Write(message.ListAsString(content)); } else { Console.Write(message.GetContent()); } Console.WriteLine("')"); session.Acknowledge(); } receiver.Close(); session.Close(); connection.Close(); return 0; } catch (Exception e) { Console.WriteLine("Exception {0}.", e); if (null != connection) connection.Close(); } return 1; } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/0000775000076400007640000000000011752725721026404 5ustar00jrossjross00000000000000csharp.map.callback.receiver.cs0000664000076400007640000002414111475523745034254 0ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; using Org.Apache.Qpid.Messaging.SessionReceiver; namespace Org.Apache.Qpid.Messaging.Examples { /// /// A class with functions to display structured messages. /// public static class MessageViewer { /// /// A Function to display a amqp/map message packaged as a Dictionary. /// /// The AMQP map /// Nested depth public static void ShowDictionary(Dictionary dict, int level) { foreach (KeyValuePair kvp in dict) { Console.Write(new string(' ', level * 4)); if (QpidTypeCheck.ObjectIsMap(kvp.Value)) { Console.WriteLine("Key: {0}, Value: Dictionary", kvp.Key); ShowDictionary((Dictionary)kvp.Value, level + 1); } else if (QpidTypeCheck.ObjectIsList(kvp.Value)) { Console.WriteLine("Key: {0}, Value: List", kvp.Key); ShowList((Collection)kvp.Value, level + 1); } else Console.WriteLine("Key: {0}, Value: {1}, Type: {2}", kvp.Key, kvp.Value, kvp.Value.GetType().ToString()); } } /// /// A function to display a ampq/list message packaged as a List. /// /// The AMQP list /// Nested depth public static void ShowList(Collection list, int level) { foreach (object obj in list) { Console.Write(new string(' ', level * 4)); if (QpidTypeCheck.ObjectIsMap(obj)) { Console.WriteLine("Dictionary"); ShowDictionary((Dictionary)obj, level + 1); } else if (QpidTypeCheck.ObjectIsList(obj)) { Console.WriteLine("List"); ShowList((Collection)obj, level + 1); } else Console.WriteLine("Value: {0}, Type: {1}", obj.ToString(), obj.GetType().ToString()); } } /// /// A function to diplay a Message. The native Object type is /// decomposed into AMQP types. /// /// The Message public static void ShowMessage(Message message) { if ("amqp/map" == message.ContentType) { Console.WriteLine("Received a Dictionary"); Dictionary content = new Dictionary(); message.GetContent(content); ShowDictionary(content, 0); } else if ("amqp/list" == message.ContentType) { Console.WriteLine("Received a List"); Collection content = new Collection(); message.GetContent(content); ShowList(content, 0); } else { Console.WriteLine("Received a String"); Console.WriteLine(message.GetContent()); } } } /// /// A model class to demonstrate how a user may use the Qpid Messaging /// interface to receive Session messages using a callback. /// class ReceiverProcess : ISessionReceiver { UInt32 messagesReceived = 0; /// /// SessionReceiver implements the ISessionReceiver interface. /// It is the callback function that receives all messages for a Session. /// It may be called any time server is running. /// It is always called on server's private thread. /// /// The Receiver associated with the message. /// The Message public void SessionReceiver(Receiver receiver, Message message) { // // Indicate message reception // Console.WriteLine("--- Message {0}", ++messagesReceived); // // Display the received message // MessageViewer.ShowMessage(message); // // Acknowledge the receipt of all received messages. // receiver.Session.Acknowledge(); } /// /// Usage /// /// Connection target /// Address: broker exchange + routing key /// n seconds to keep callback open static void usage(string url, string addr, int nSec) { Console.WriteLine("usage: {0} [url [addr [nSec]]]", System.Diagnostics.Process.GetCurrentProcess().ProcessName); Console.WriteLine(); Console.WriteLine("A program to connect to a broker and receive"); Console.WriteLine("messages from a named exchange with a routing key."); Console.WriteLine("The receiver uses a session callback and keeps the callback"); Console.WriteLine("server open for so many seconds."); Console.WriteLine("The details of the message body's types and values are shown."); Console.WriteLine(); Console.WriteLine(" url = target address for 'new Connection(url)'"); Console.WriteLine(" addr = address for 'session.CreateReceiver(addr)'"); Console.WriteLine(" nSec = time in seconds to keep the receiver callback open"); Console.WriteLine(); Console.WriteLine("Default values:"); Console.WriteLine(" {0} {1} {2} {3}", System.Diagnostics.Process.GetCurrentProcess().ProcessName, url, addr, nSec); } /// /// A function to illustrate how to open a Session callback and /// receive messages. /// /// Main program arguments public int TestProgram(string[] args) { string url = "amqp:tcp:localhost:5672"; string addr = "amq.direct/map_example"; int nSec = 30; string connectionOptions = ""; if (1 == args.Length) { if (args[0].Equals("-h") || args[0].Equals("-H") || args[0].Equals("/?")) { usage(url, addr, nSec); return 1; } } if (args.Length > 0) url = args[0]; if (args.Length > 1) addr = args[1]; if (args.Length > 2) nSec = System.Convert.ToInt32(args[2]); if (args.Length > 3) connectionOptions = args[3]; // // Create and open an AMQP connection to the broker URL // Connection connection = new Connection(url, connectionOptions); connection.Open(); // // Create a session. // Session session = connection.CreateSession(); // // Receive through callback // // Create callback server and implicitly start it // SessionReceiver.CallbackServer cbServer = new SessionReceiver.CallbackServer(session, this); // // The callback server is running and executing callbacks on a // separate thread. // // // Create a receiver for the direct exchange using the // routing key "map_example". // Receiver receiver = session.CreateReceiver(addr); // // Establish a capacity // receiver.Capacity = 100; // // Wait so many seconds for messages to arrive. // System.Threading.Thread.Sleep(nSec * 1000); // in mS // // Stop the callback server. // cbServer.Close(); // // Close the receiver and the connection. // receiver.Close(); connection.Close(); return 0; } } class MapCallbackReceiverMain { /// /// Main program /// /// Main prgram args static int Main(string[] args) { // Invoke 'TestProgram' as non-static class. ReceiverProcess mainProc = new ReceiverProcess(); int result = mainProc.TestProgram(args); return result; } } } qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/0000775000076400007640000000000011752725721030540 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/examples/csharp.map.callback.receiver/Properties/AssemblyInfo.cs0000664000076400007640000000433111623011227033445 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("csharp.map.callback.receiver")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("csharp.map.callback.receiver")] [assembly: AssemblyCopyright("Copyright 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("002049f9-41c5-420f-9ff6-45bb652dded6")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/test/0000775000076400007640000000000011752725721020153 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/0000775000076400007640000000000011752725721023106 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/messaging.test.address.cs0000664000076400007640000001202311471316616030007 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace Org.Apache.Qpid.Messaging.UnitTest { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; using NUnit.Framework; [TestFixture] public class AddressTests { [SetUp] public void SetUp() { } [TearDown] public void TearDown() { } // // Address test // [Test] public void AddressConstructor_Empty() { Address addr = new Address(); StringAssert.IsMatch("", addr.ToStr()); StringAssert.IsMatch("", addr.Name); StringAssert.IsMatch("", addr.Subject); Dictionary opts = addr.Options; Assert.AreEqual(0, opts.Count); StringAssert.IsMatch("", addr.Type); } [Test] public void AddressConstructor_Name() { Address addr = new Address("name1"); StringAssert.IsMatch("", addr.ToStr()); StringAssert.IsMatch("name1", addr.Name); StringAssert.IsMatch("", addr.Subject); Dictionary opts = addr.Options; Assert.AreEqual(0, opts.Count); StringAssert.IsMatch("", addr.Type); } [Test] public void AddressConstructor_NameSubjOpts() { Dictionary options = new Dictionary(); options["one"] = 1; options["two"] = "two"; Address addr = new Address("name2", "subj2", options); StringAssert.IsMatch("name2/subj2;{node:{type:}, one:1, two:two}", addr.ToStr()); StringAssert.IsMatch("name2", addr.Name); StringAssert.IsMatch("subj2", addr.Subject); Dictionary opts = addr.Options; Assert.AreEqual(3, opts.Count); StringAssert.IsMatch("", addr.Type); } [Test] public void AddressConstructor_NameSubjOptsType() { Dictionary options = new Dictionary(); options["one"] = 1; options["two"] = "two"; Address addr = new Address("name3", "subj3", options, "type3"); StringAssert.IsMatch("name3/subj3;{node:{type:type3}, one:1, two:two}", addr.ToStr()); StringAssert.IsMatch("name3", addr.Name); StringAssert.IsMatch("subj3", addr.Subject); Dictionary opts = addr.Options; Assert.AreEqual(3, opts.Count); StringAssert.IsMatch("type3", addr.Type); } [Test] public void AddressProperty() { Dictionary options = new Dictionary(); options["one"] = 1; options["two"] = "two"; options["pi"] = 3.14159; Dictionary opts; Address addr = new Address(); addr.Name = "name4"; StringAssert.IsMatch("name4", addr.Name); StringAssert.IsMatch("", addr.Subject); opts = addr.Options; Assert.AreEqual(0, opts.Count); StringAssert.IsMatch("", addr.Type); addr.Subject = "subject4"; StringAssert.IsMatch("name4", addr.Name); StringAssert.IsMatch("subject4", addr.Subject); opts = addr.Options; Assert.AreEqual(0, opts.Count); StringAssert.IsMatch("", addr.Type); addr.Type = "type4"; StringAssert.IsMatch("name4", addr.Name); StringAssert.IsMatch("subject4", addr.Subject); opts = addr.Options; Assert.AreEqual(1, opts.Count); StringAssert.IsMatch("type4", addr.Type); addr.Options = options; StringAssert.IsMatch("name4", addr.Name); StringAssert.IsMatch("subject4", addr.Subject); opts = addr.Options; Assert.AreEqual(3, opts.Count); StringAssert.IsMatch("", addr.Type); } } } qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/Properties/0000775000076400007640000000000011752725721025242 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/Properties/AssemblyInfo.cs0000664000076400007640000000433011623011227030146 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("messaging.test")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("messaging.test")] [assembly: AssemblyCopyright("Copyright 2011")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("fdf30e75-69ba-45c2-a196-df09085dd56a")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/messaging.test.connection.cs0000664000076400007640000000566711471316616030541 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace Org.Apache.Qpid.Messaging.UnitTest { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; using NUnit.Framework; [TestFixture] public class ConnectionTests { [SetUp] public void SetUp() { } [TearDown] public void TearDown() { } // // Doing without a real connection // [Test] public void ConnectionCreate_1() { Connection myConn = new Connection("url"); Assert.IsFalse(myConn.IsOpen); } [Test] public void ConnectionCreate_2() { Dictionary options = new Dictionary(); options["id"] = 987654321; options["name"] = "Widget"; options["percent"] = 0.99; Connection myConn = new Connection("url", options); Assert.IsFalse(myConn.IsOpen); } [Test] public void ConnectionCreate_3() { Connection myConn = new Connection("url", "{reconnect:True}"); Assert.IsFalse(myConn.IsOpen); } [Test] public void ConnectionSetOption() { Dictionary options = new Dictionary(); options["id"] = 987654321; options["name"] = "Widget"; options["percent"] = 0.99; Connection myConn = new Connection("url", options); myConn.SetOption("name", "purple"); Assert.IsFalse(myConn.IsOpen); } [Test] public void ConnectionClose() { Dictionary options = new Dictionary(); options["id"] = 987654321; options["name"] = "Widget"; options["percent"] = 0.99; Connection myConn = new Connection("url", options); myConn.Close(); Assert.IsFalse(myConn.IsOpen); } } } qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/messaging.test.cs0000664000076400007640000000456511471316616026377 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ // // Note: // NUnit tests require all libraries to be on the project path // or in the project working directory. If an unmanaged DLL // (boost_xxx, for instance) is missing then NUnit will give // the error message: // System.IO.FileNotFoundException : // The specified module could not be found. // (Exception from HRESULT: 0x8007007E) // // Users may need to adjust this project's reference to the // NUnit assembly. // namespace Org.Apache.Qpid.Messaging.UnitTest { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; using NUnit.Framework; [TestFixture] public class BasicTests { [SetUp] public void SetUp() { } [TearDown] public void TearDown() { } // // Types representing amqp.map and amqp.list // [Test] public void TypeTestForDictionary() { Dictionary dx = new Dictionary(); StringAssert.Contains("System.Collections.Generic.Dictionary`2[System.String,System.Object]", dx.GetType().ToString()); } [Test] public void TypeTestForCollection() { Collection cx = new Collection(); StringAssert.Contains("System.Collections.ObjectModel.Collection`1[System.Object]", cx.GetType().ToString()); } } } qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/messaging.test.message.cs0000664000076400007640000002441111471316616030012 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace Org.Apache.Qpid.Messaging.UnitTest { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; using NUnit.Framework; [TestFixture] public class MessageTests { [SetUp] public void SetUp() { } [TearDown] public void TearDown() { } [Test] public void SimpleMessageSize() { Message m2 = new Message("rarey"); UInt64 m2Size = m2.ContentSize; Assert.AreEqual(5, m2Size); } [Test] public void SimpleMessageStringContent() { Message m2 = new Message("rarely"); string mString = m2.GetContent(); StringAssert.IsMatch("rarely", mString); } [Test] public void MessageReceiveContentAsByteArray() { Message m2 = new Message("while"); UInt64 m2Size = m2.ContentSize; byte[] myRaw = new byte [m2Size]; m2.GetContent(myRaw); Assert.IsTrue(true); } [Test] public void MessageAsByteArray() { byte[] rawData = new byte[10]; for (byte i = 0; i < 10; i++) rawData[i] = i; Message m3 = new Message(rawData); byte[] readback = new byte[m3.ContentSize]; m3.GetContent(readback); for (byte i = 0; i < 10; i++) Assert.AreEqual(i, readback[i]); } [Test] public void MessageAsByteArraySlice() { byte[] rawData = new byte[10]; for (byte i = 0; i < 10; i++) rawData[i] = i; Message m3 = new Message(rawData, 1, 8); Assert.AreEqual(8, m3.ContentSize); byte[] readback = new byte[m3.ContentSize]; m3.GetContent(readback); for (byte i = 0; i < 8; i++) Assert.AreEqual(i + 1, readback[i]); } [Test] public void MessageProperties() { Message msgGetSet = new Message("12345"); msgGetSet.Subject = "Subject"; msgGetSet.MessageId = "MessageId"; msgGetSet.UserId = "UserId"; msgGetSet.CorrelationId = "CorrelationId"; msgGetSet.Ttl = DurationConstants.SECOND; msgGetSet.Priority = (byte)'z'; msgGetSet.Durable = false; msgGetSet.Redelivered = true; Dictionary props = new Dictionary(); props.Add("firstProperty", 1); props.Add("secondProperty", 2); msgGetSet.Properties = props; Address replyToAddr = new Address("replyTo"); replyToAddr.Subject = "topsecret"; msgGetSet.ReplyTo = replyToAddr; StringAssert.IsMatch("Subject", msgGetSet.Subject); StringAssert.IsMatch("", msgGetSet.ContentType); StringAssert.IsMatch("MessageId", msgGetSet.MessageId); StringAssert.IsMatch("UserId", msgGetSet.UserId); StringAssert.IsMatch("CorrelationId", msgGetSet.CorrelationId); Assert.AreEqual(1000, msgGetSet.Ttl.Milliseconds); Assert.AreEqual((byte)'z', msgGetSet.Priority); Assert.IsFalse( msgGetSet.Durable); Assert.IsTrue( msgGetSet.Redelivered); Dictionary gotProps = msgGetSet.Properties; StringAssert.IsMatch("1", gotProps["firstProperty"].ToString()); StringAssert.IsMatch("2", gotProps["secondProperty"].ToString()); Address gotReply = msgGetSet.ReplyTo; StringAssert.IsMatch("replyTo", gotReply.Name); StringAssert.IsMatch("topsecret", msgGetSet.ReplyTo.Subject); } [Test] public void SimpleMessageCopy() { Message m2 = new Message("rarely"); Message m3 = m2; StringAssert.IsMatch("rarely", m3.GetContent()); } [Test] public void MessageAsMap_AllVariableTypes() { // // Create structured content for the message. This example builds a // map of items including a nested map and a list of values. // Dictionary content = new Dictionary(); Dictionary subMap = new Dictionary(); Collection colors = new Collection(); // add simple types content["id"] = 987654321; content["name"] = "Widget"; content["percent"] = 0.99; // add nested amqp/map subMap["name"] = "Smith"; subMap["number"] = 354; content["nestedMap"] = subMap; // add an amqp/list colors.Add("red"); colors.Add("green"); colors.Add("white"); // list contains null value colors.Add(null); content["colorsList"] = colors; // add one of each supported amqp data type bool mybool = true; content["mybool"] = mybool; byte mybyte = 4; content["mybyte"] = mybyte; UInt16 myUInt16 = 5; content["myUInt16"] = myUInt16; UInt32 myUInt32 = 6; content["myUInt32"] = myUInt32; UInt64 myUInt64 = 7; content["myUInt64"] = myUInt64; char mychar = 'h'; content["mychar"] = mychar; Int16 myInt16 = 9; content["myInt16"] = myInt16; Int32 myInt32 = 10; content["myInt32"] = myInt32; Int64 myInt64 = 11; content["myInt64"] = myInt64; Single mySingle = (Single)12.12; content["mySingle"] = mySingle; Double myDouble = 13.13; content["myDouble"] = myDouble; Guid myGuid = new Guid("000102030405060708090a0b0c0d0e0f"); content["myGuid"] = myGuid; content["myNull"] = null; // Create the message Message message = new Message(content); // Copy the message Message rxMsg = message; // Extract the content Dictionary rxContent = new Dictionary(); rxMsg.GetContent(rxContent); Dictionary rxSubMap = (Dictionary)rxContent["nestedMap"]; Collection rxColors = (Collection)rxContent["colorsList"]; StringAssert.IsMatch("System.Boolean", rxContent["mybool"].GetType().ToString()); bool rxbool = (bool)rxContent["mybool"]; StringAssert.IsMatch("System.SByte", rxContent["mybyte"].GetType().ToString()); sbyte rxbyte = (sbyte)rxContent["mybyte"]; StringAssert.IsMatch("System.UInt16", rxContent["myUInt16"].GetType().ToString()); UInt16 rxUInt16 = (UInt16)rxContent["myUInt16"]; StringAssert.IsMatch("System.UInt32", rxContent["myUInt32"].GetType().ToString()); UInt32 rxUInt32 = (UInt32)rxContent["myUInt32"]; StringAssert.IsMatch("System.UInt64", rxContent["myUInt64"].GetType().ToString()); UInt64 rxUInt64 = (UInt64)rxContent["myUInt64"]; StringAssert.IsMatch("System.Int32", rxContent["mychar"].GetType().ToString()); char rxchar = System.Convert.ToChar(rxContent["mychar"]); StringAssert.IsMatch("System.Int16", rxContent["myInt16"].GetType().ToString()); Int16 rxInt16 = (Int16)rxContent["myInt16"]; StringAssert.IsMatch("System.Int32", rxContent["myInt32"].GetType().ToString()); Int32 rxInt32 = (Int32)rxContent["myInt32"]; StringAssert.IsMatch("System.Int64", rxContent["myInt64"].GetType().ToString()); Int64 rxInt64 = (Int64)rxContent["myInt64"]; StringAssert.IsMatch("System.Single", rxContent["mySingle"].GetType().ToString()); Single rxSingle = (Single)rxContent["mySingle"]; StringAssert.IsMatch("System.Double", rxContent["myDouble"].GetType().ToString()); Double rxDouble = (Double)rxContent["myDouble"]; StringAssert.IsMatch("System.Guid", rxContent["myGuid"].GetType().ToString()); Guid rxGuid = (Guid)rxContent["myGuid"]; // Verify the values StringAssert.IsMatch("Smith", rxSubMap["name"].ToString()); Assert.AreEqual(4, rxColors.Count); Assert.IsTrue(rxbool); Assert.AreEqual(4, rxbyte); Assert.AreEqual(5, rxUInt16); Assert.AreEqual(6, rxUInt32); Assert.AreEqual(7, rxUInt64); Assert.AreEqual((char)'h', rxchar); Assert.AreEqual(9, rxInt16); Assert.AreEqual(10, rxInt32); Assert.AreEqual(11, rxInt64); Assert.AreEqual((Single)12.12, rxSingle); Assert.AreEqual((Double)13.13, rxDouble); StringAssert.IsMatch("00010203-0405-0607-0809-0a0b0c0d0e0f", rxGuid.ToString()); } } } qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/msvc9/0000775000076400007640000000000011752725721024147 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/msvc9/messaging.test.csproj0000664000076400007640000001737611656310053030331 0ustar00jrossjross00000000000000 Debug AnyCPU 9.0.21022 2.0 {AF2FBC78-266C-430C-BC29-9477AB596A36} Library Properties messaging.test messaging.test v3.5 512 publish\ true Disk false Foreground 7 Days false false true 0 1.0.0.%2a false false true true full false $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE prompt 4 pdbonly true $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE prompt 4 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt bin\RelWithDebInfo\ TRACE true pdbonly AnyCPU prompt bin\x86\RelWithDebInfo\ TRACE true pdbonly x86 prompt bin\x64\RelWithDebInfo\ TRACE true pdbonly x64 prompt False C:\Program Files (x86)\NUnit 2.5.3\bin\net-1.1\framework\nunit.framework.dll False .NET Framework 2.0 %28x86%29 false False .NET Framework 3.0 %28x86%29 false False .NET Framework 3.5 true False Windows Installer 3.1 true {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/messaging.test.duration.cs0000664000076400007640000000544111471316616030215 0ustar00jrossjross00000000000000/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ namespace Org.Apache.Qpid.Messaging.UnitTest { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using Org.Apache.Qpid.Messaging; using NUnit.Framework; [TestFixture] public class DurationTests { [SetUp] public void SetUp() { } [TearDown] public void TearDown() { } [Test] public void ValueOfUSERVALUE() { Duration myDuration = new Duration(1234); Assert.AreEqual(1234, myDuration.Milliseconds); } [Test] public void ValueOfFOREVER() { bool result = DurationConstants.FORVER.Milliseconds > 1.0E18; Assert.True(result); } [Test] public void ValueOfIMMEDIATE() { Assert.AreEqual(0, DurationConstants.IMMEDIATE.Milliseconds); } [Test] public void ValueOfSECOND() { Assert.AreEqual(1000, DurationConstants.SECOND.Milliseconds); } [Test] public void ValueOfMINUTE() { Assert.AreEqual(60000, DurationConstants.MINUTE.Milliseconds); } [Test] public void ValueOfDefaultIsFOREVER() { Duration isInfinite = new Duration(); bool result = isInfinite.Milliseconds > 1.0E18; Assert.True(result); } [Test] public void ComputedValueFiveMinutes_1() { Duration fiveMinutes = new Duration(DurationConstants.MINUTE.Milliseconds * 5); Assert.AreEqual(5 * 60000, fiveMinutes.Milliseconds); } [Test] public void ComputedValueFiveMinutes_2() { Duration fiveMinutes = new Duration(5 * DurationConstants.MINUTE.Milliseconds); Assert.AreEqual(5 * 60000, fiveMinutes.Milliseconds); } } }qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/msvc10/0000775000076400007640000000000011752725721024217 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/test/messaging.test/msvc10/messaging.test.csproj0000664000076400007640000001763411657030265030403 0ustar00jrossjross00000000000000 Debug AnyCPU 9.0.21022 2.0 {AF2FBC78-266C-430C-BC29-9477AB596A36} Library Properties messaging.test messaging.test v4.0 512 publish\ true Disk false Foreground 7 Days false false true 0 1.0.0.%2a false false true 3.5 true full false $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE prompt 4 pdbonly true $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE prompt 4 true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x86 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x86 prompt true $(QPID_BUILD_ROOT)\src\$(Configuration)\ DEBUG;TRACE full x64 prompt $(QPID_BUILD_ROOT)\src\$(Configuration)\ TRACE true pdbonly x64 prompt bin\RelWithDebInfo\ TRACE true pdbonly AnyCPU prompt bin\x86\RelWithDebInfo\ TRACE true pdbonly x86 prompt bin\x64\RelWithDebInfo\ TRACE true pdbonly x64 prompt False C:\Program Files (x86)\NUnit 2.5.3\bin\net-1.1\framework\nunit.framework.dll False .NET Framework 2.0 %28x86%29 false False .NET Framework 3.0 %28x86%29 false False .NET Framework 3.5 true False Windows Installer 3.1 true {AA5A3B83-5F98-406D-A01C-5A921467A57D} Org.Apache.Qpid.Messaging qpidc-0.16/bindings/qpid/dotnet/msvc9/0000775000076400007640000000000011752725721020235 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/msvc9/org.apache.qpid.messaging.sessionreceiver.sln0000664000076400007640000001075011656310053031073 0ustar00jrossjross00000000000000Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License # Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Org.Apache.Qpid.Messaging", "..\src\msvc9\org.apache.qpid.messaging.vcproj", "{AA5A3B83-5F98-406D-A01C-5A921467A57D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "org.apache.qpid.messaging.sessionreceiver", "..\src\msvc9\sessionreceiver\org.apache.qpid.messaging.sessionreceiver.csproj", "{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Win32 = Release|Win32 Release|x64 = Release|x64 Release|x86 = Release|x86 RelWithDebInfo|Win32 = RelWithDebInfo|Win32 RelWithDebInfo|x64 = RelWithDebInfo|x64 RelWithDebInfo|x86 = RelWithDebInfo|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.ActiveCfg = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.Build.0 = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.ActiveCfg = Debug|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.Build.0 = Debug|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.ActiveCfg = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.Build.0 = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.ActiveCfg = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.Build.0 = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.ActiveCfg = Release|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.Build.0 = Release|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.ActiveCfg = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.Build.0 = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|Win32 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|Win32.ActiveCfg = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.ActiveCfg = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.Build.0 = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.ActiveCfg = Debug|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.Build.0 = Debug|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|Win32.ActiveCfg = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.ActiveCfg = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.Build.0 = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.ActiveCfg = Release|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.Build.0 = Release|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal qpidc-0.16/bindings/qpid/dotnet/msvc9/org.apache.qpid.messaging.sln0000664000076400007640000006306211656310053025670 0ustar00jrossjross00000000000000Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License # Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Org.Apache.Qpid.Messaging", "..\src\msvc9\org.apache.qpid.messaging.vcproj", "{AA5A3B83-5F98-406D-A01C-5A921467A57D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{34C477FB-B0CC-4AB9-A346-EA7B055469AC}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Direct", "Direct", "{DE58D329-10DC-4C8D-9EFA-230A57314089}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Pub-Sub", "Pub-Sub", "{878FDDF8-A870-41D6-9E36-0A050EC5ACAB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.sender", "..\examples\msvc9\csharp.direct.sender\csharp.direct.sender.csproj", "{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.receiver", "..\examples\msvc9\csharp.direct.receiver\csharp.direct.receiver.csproj", "{52F880E7-D677-4C91-8516-D679CE0F46A8}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{39E9D1BF-3A0B-4D86-BF6B-F463E1A2245A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "messaging.test", "..\test\messaging.test\msvc9\messaging.test.csproj", "{AF2FBC78-266C-430C-BC29-9477AB596A36}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StructuredMessage", "StructuredMessage", "{E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.sender", "..\examples\msvc9\csharp.map.sender\csharp.map.sender.csproj", "{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.receiver", "..\examples\msvc9\csharp.map.receiver\csharp.map.receiver.csproj", "{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "org.apache.qpid.messaging.sessionreceiver", "..\src\sessionreceiver\msvc9\org.apache.qpid.messaging.sessionreceiver.csproj", "{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.receiver", "..\examples\msvc9\csharp.map.callback.receiver\csharp.map.callback.receiver.csproj", "{68A43817-2358-4A31-8FDF-FE21722BFBCF}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.sender", "..\examples\msvc9\csharp.map.callback.sender\csharp.map.callback.sender.csproj", "{12F1C14F-5C7D-4075-9BAE-C091394FF99A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client-Server", "Client-Server", "{9232212E-F3C6-4D18-8D25-0C31DD5FF3DB}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.client", "..\examples\msvc9\csharp.example.client\csharp.example.client.csproj", "{0DE01712-C2D1-4CA4-B42C-5856456A8696}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.server", "..\examples\msvc9\csharp.example.server\csharp.example.server.csproj", "{090A081D-E8B5-4949-AA43-EE182B7101E3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Drain-Spout", "Drain-Spout", "{89CE04CB-21DE-4ABB-9236-50529DD8C022}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.drain", "..\examples\msvc9\csharp.example.drain\csharp.example.drain.csproj", "{C43DEB69-8088-420B-B0CA-C699535E6D08}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.spout", "..\examples\msvc9\csharp.example.spout\csharp.example.spout.csproj", "{EB36626D-36C2-41B3-B65E-762BAF27F137}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.declare_queues", "..\examples\msvc9\csharp.example.declare_queues\csharp.example.declare_queues.csproj", "{E31B349C-830C-4583-8BD9-30DA4398349F}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Hello World", "Hello World", "{4408A2DA-ED2D-44AE-A465-0B6D75E1FF86}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.helloworld", "..\examples\msvc9\csharp.example.helloworld\csharp.example.helloworld.csproj", "{8CC1C265-0507-44A3-9483-8FAF48513F4D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Win32 = Release|Win32 Release|x64 = Release|x64 Release|x86 = Release|x86 RelWithDebInfo|Win32 = RelWithDebInfo|Win32 RelWithDebInfo|x64 = RelWithDebInfo|x64 RelWithDebInfo|x86 = RelWithDebInfo|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.ActiveCfg = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.Build.0 = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.ActiveCfg = Debug|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.Build.0 = Debug|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.ActiveCfg = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.Build.0 = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.ActiveCfg = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.Build.0 = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.ActiveCfg = Release|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.Build.0 = Release|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.ActiveCfg = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Win32 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|Win32.ActiveCfg = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.ActiveCfg = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.Build.0 = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.ActiveCfg = Debug|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.Build.0 = Debug|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|Win32.ActiveCfg = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.ActiveCfg = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.Build.0 = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.ActiveCfg = Release|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.Build.0 = Release|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|Win32.ActiveCfg = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.ActiveCfg = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.Build.0 = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.ActiveCfg = Debug|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.Build.0 = Debug|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|Win32.ActiveCfg = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.ActiveCfg = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.Build.0 = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.ActiveCfg = Release|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.Build.0 = Release|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|Win32.ActiveCfg = Debug|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x64.ActiveCfg = Debug|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x64.Build.0 = Debug|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x86.ActiveCfg = Debug|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x86.Build.0 = Debug|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|Win32.ActiveCfg = Release|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x64.ActiveCfg = Release|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x64.Build.0 = Release|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x86.ActiveCfg = Release|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x86.Build.0 = Release|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|Win32.ActiveCfg = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.ActiveCfg = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.Build.0 = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.ActiveCfg = Debug|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.Build.0 = Debug|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|Win32.ActiveCfg = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.ActiveCfg = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.Build.0 = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.ActiveCfg = Release|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.Build.0 = Release|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|Win32.ActiveCfg = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.ActiveCfg = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.Build.0 = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.ActiveCfg = Debug|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.Build.0 = Debug|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|Win32.ActiveCfg = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.ActiveCfg = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.Build.0 = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.ActiveCfg = Release|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.Build.0 = Release|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|Win32.ActiveCfg = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.ActiveCfg = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.Build.0 = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.ActiveCfg = Debug|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.Build.0 = Debug|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|Win32.ActiveCfg = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.ActiveCfg = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.Build.0 = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.ActiveCfg = Release|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.Build.0 = Release|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|Win32.ActiveCfg = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.ActiveCfg = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.Build.0 = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.ActiveCfg = Debug|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.Build.0 = Debug|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|Win32.ActiveCfg = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.ActiveCfg = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.Build.0 = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.ActiveCfg = Release|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.Build.0 = Release|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|Win32.ActiveCfg = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.ActiveCfg = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.Build.0 = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.ActiveCfg = Debug|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.Build.0 = Debug|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|Win32.ActiveCfg = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.ActiveCfg = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.Build.0 = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.ActiveCfg = Release|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.Build.0 = Release|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|Win32.ActiveCfg = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.ActiveCfg = Debug|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.Build.0 = Debug|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.ActiveCfg = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.Build.0 = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|Win32.ActiveCfg = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.ActiveCfg = Release|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.Build.0 = Release|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.ActiveCfg = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.Build.0 = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|Win32.ActiveCfg = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.ActiveCfg = Debug|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.Build.0 = Debug|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.ActiveCfg = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.Build.0 = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|Win32.ActiveCfg = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.ActiveCfg = Release|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.Build.0 = Release|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.ActiveCfg = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.Build.0 = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|Win32.ActiveCfg = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.ActiveCfg = Debug|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.Build.0 = Debug|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.ActiveCfg = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.Build.0 = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|Win32.ActiveCfg = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.ActiveCfg = Release|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.Build.0 = Release|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.ActiveCfg = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.Build.0 = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|Win32.ActiveCfg = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.ActiveCfg = Debug|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.Build.0 = Debug|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.ActiveCfg = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.Build.0 = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|Win32.ActiveCfg = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.ActiveCfg = Release|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.Build.0 = Release|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.ActiveCfg = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.Build.0 = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|Win32.ActiveCfg = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.ActiveCfg = Debug|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.Build.0 = Debug|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.ActiveCfg = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.Build.0 = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|Win32.ActiveCfg = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.ActiveCfg = Release|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.Build.0 = Release|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.ActiveCfg = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.Build.0 = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|Win32.ActiveCfg = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.ActiveCfg = Debug|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.Build.0 = Debug|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.ActiveCfg = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.Build.0 = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|Win32.ActiveCfg = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.ActiveCfg = Release|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.Build.0 = Release|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.ActiveCfg = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.Build.0 = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {DE58D329-10DC-4C8D-9EFA-230A57314089} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {878FDDF8-A870-41D6-9E36-0A050EC5ACAB} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {89CE04CB-21DE-4ABB-9236-50529DD8C022} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {4408A2DA-ED2D-44AE-A465-0B6D75E1FF86} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068} = {DE58D329-10DC-4C8D-9EFA-230A57314089} {52F880E7-D677-4C91-8516-D679CE0F46A8} = {DE58D329-10DC-4C8D-9EFA-230A57314089} {AF2FBC78-266C-430C-BC29-9477AB596A36} = {39E9D1BF-3A0B-4D86-BF6B-F463E1A2245A} {5D8252F5-E1D3-44A0-94C7-7CB75E843C10} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} {68A43817-2358-4A31-8FDF-FE21722BFBCF} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} {12F1C14F-5C7D-4075-9BAE-C091394FF99A} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} {0DE01712-C2D1-4CA4-B42C-5856456A8696} = {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB} {090A081D-E8B5-4949-AA43-EE182B7101E3} = {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB} {C43DEB69-8088-420B-B0CA-C699535E6D08} = {89CE04CB-21DE-4ABB-9236-50529DD8C022} {EB36626D-36C2-41B3-B65E-762BAF27F137} = {89CE04CB-21DE-4ABB-9236-50529DD8C022} {E31B349C-830C-4583-8BD9-30DA4398349F} = {89CE04CB-21DE-4ABB-9236-50529DD8C022} {8CC1C265-0507-44A3-9483-8FAF48513F4D} = {4408A2DA-ED2D-44AE-A465-0B6D75E1FF86} EndGlobalSection EndGlobal qpidc-0.16/bindings/qpid/dotnet/configure-windows.ps10000664000076400007640000005246311656330466023305 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # configure-windows.ps1 # ===================== # # This script configures a qpid\cpp developer build environment under Windows # to enable working with cpp\bindings\qpid\dotnet binding source code. # # * Supports multiple versions of Visual Studio (VS2008, VS2010) as CMake # generator. # # * Supports 32-bit and/or 64-bit development platforms. # # * User chooses in-source or out-of-source build directories. # # - 'In-source' builds happen when CMake is run from directory qpid\cpp. # Hundreds of CMake-generated output files are placed in qpid\cpp\src. # These files go right on top of files that are part of the source tree # in qpid\cpp\src. # In-source builds support only one platform. # Choose only a 32-bit or a 64-bit platform but not both. # # - Out-of-source builds happen when the user chooses another directory # under qpid in which to run CMake. Out-of-source builds are required # in order to build both x86 and x64 targets using the same source tree. # For each build platform (32-bit x86 or Win32, or 64-bit x64) the user # specifies a build directory and a specific version of Boost. # Many platform/Boost-version directories may reside side by side. # # * User chooses to run CMake or not. # # - When a new build directory is created then the user is given the # option of running CMake in that directory. Running CMake is a # necessary step as CMake creates important source, solution, and # project files. # # - If a directory "looks like" is has already had CMake run in it # then this script skips running CMake again. # # # Prerequisites # # 1. Powershell must be installed. # 2. 32-bit and/or 64-bit Boost libraries must be installed in separate # directories. A user system may have any number of Boost library # versions installed on it as long as each may be referred to through # a separate BOOST_ROOT directory path. # 3. CMake 2.8 (or later) must be installed. The cmake\bin directory # must be in the user's path. # 4. Boost library specifications may or may not be in the user's path. # The script author recommeds not to have Boost in the path and only # allow the Boost path to be specified by generated command procedures. # 5. Visual Studio build environment must be installed. # # # Use case: Create a new build environment # ======================================== # # Required Boost: # 32-bit library - C:\Boost # 64-bit library - D:\Boost_64 # # Required Qpid checkout tree # C:\svn\qpid\... # # Run this script. It will ask for four directories: # # Needed info User clicks on or adds new # ---------------- -------------------------- # 32-bit Boost C:\boost # 32-bit build dir C:\svn\qpid\build32 # 64-bit Boost D:\Boost_64 # 64-bit build dir C:\svn\qpid\build64 # # In this example the build dirs are new. The script will prompt # asking if CMake is to run in the build directories. User chooses Yes. # # Now this script runs CMake twice, once each with the 32-bit and 64-bit # generators. # * This step creates qpid-cpp.sln and related project files. # C:\svn\qpid\build32\qpid-cpp.sln # C:\svn\qpid\build64\qpid-cpp.sln # # This script generates other scripts as follows: # # C:\svn\qpid\build32\start-devenv-messaging-x86-32bit.ps1 # C:\svn\qpid\build32\start-devenv-messaging-x86-32bit.bat # C:\svn\qpid\build32\setenv-messaging-x86-32bit.bat # # C:\svn\qpid\build64\start-devenv-messaging-x64-64bit.ps1 # C:\svn\qpid\build64\start-devenv-messaging-x64-64bit.bat # C:\svn\qpid\build64\setenv-messaging-x64-64bit.bat # # Next the user compiles solution qpid\build32\qpid-cpp.sln. # # Using the generated scripts: # # Case 1. Run an executable in 32-bit mode. # 1. Open a command prompt. # 2. > CD c:\svn\qpid\build32 # 3. > CALL setenv-messaging-x86-32bit.bat # 4. > CD src\debug # 5. > run the chosen program # # Note: Step #3 adds Boost to the user's path. This script selects the # version of Boost to match the executables in src\debug. # # Case 2. Launch Visual Studio org.apache.qpid.messaging.sln in 64-bit mode. # 1. > CD c:\svn\qpid\build64 # 2. > powershell start-devenv-messaging-x64-64bit.ps1 # or # 1. Double-click c:\svn\qpid\build64\start-devenv-messaging-x64-64bit.bat # # Note: In this case the scripts set QPID_BUILD_ROOT to point to the out-of- # source directory used by qpid-cpp.sln. Also the scripts put Boost in # the path so that executables may run directly from Visual Studio. # Set-PSDebug -Trace 0 Set-PSDebug -strict $ErrorActionPreference='Stop' ############################# # global strings to be written to script files # $global:txtPath = '$env:PATH' $global:txtQR = '$env:QPID_BUILD_ROOT' $global:txtWH = 'Write-Host' ############################# # Visual Studio version selection dialog items and choice # [array]$global:VsVersionCmakeChoiceList = "Visual Studio 2010", "Visual Studio 2008" $global:vsVersion = '' $global:cmakeGenerator = '' $global:vsSubdir = '' ############################# # Select-Folder # Return a folder or null # function Select-Folder ($message="Select a folder", $path=0) { $shellApp = New-Object -comObject Shell.Application $folder = $shellApp.BrowseForFolder(0, $message, 0, $path) if ($folder -ne $null) { $folder.self.Path } } ############################# # AskYesOrNo # Show modal dialog messagebox and return yes or no # function AskYesOrNo ($Question="No question?", $Title="No Title?") { $dlg = [Windows.Forms.MessageBox]::Show($Question, $Title, ` [Windows.Forms.MessageBoxButtons]::YesNo, ` [Windows.Forms.MessageBoxIcon]::Question) $result = $dlg -eq [Windows.Forms.DialogResult]::Yes $result } ############################# # SanityCheckBoostPath # A path is a "boost path" if it contains # both lib and include subdirectories. # function SanityCheckBoostPath ($path=0) { $result = $true $displayPath = "" if ($path -ne $null) { $displayPath = $path $toTest = ('include', 'lib') foreach ($pattern in $toTest) { $target = Join-Path $path $pattern if (!(Test-Path -path $target)) { $result = $false } } } else { $result = $false } if (! $result) { Write-Host "The path ""$displayPath"" does not appear to be a Boost root path." } $result } ############################# # SanityCheckBuildPath # A path is a "build path" if it contains # various subdirectories. # function SanityCheckBuildPath ($path=0) { $result = $true $displayPath = "" if ($path -ne $null) { $displayPath = $path $toTest = ('CMakeFiles', 'docs', 'etc', 'examples', 'include', 'managementgen', 'src') foreach ($pattern in $toTest) { $target = Join-Path $path $pattern if (!(Test-Path -path $target)) { $result = $false } } } else { $result = $false } if (! $result) { Write-Host "The path ""$displayPath"" does not appear to be a Qpid C++ build root path." } $result } ############################# # WriteDotnetBindingSlnLauncherPs1 # Write a powershell script that sets up the environment # and then launches Visual Studio solution file. # function WriteDotnetBindingSlnLauncherPs1 { param ( [string] $slnName, [string] $boostRoot, [string] $buildRoot, [string] $cppDir, [string] $vsPlatform, [string] $nBits, [string] $outfileName, [string] $studioVersion, [string] $studioSubdir ) $out = @("# # Launch $slnName in $studioVersion $vsPlatform ($nBits-bit) environment # $global:txtPath = ""$boostRoot\lib;$global:txtPath"" $global:txtQR = ""$buildRoot"" $global:txtWH ""Launch $slnName in $studioVersion $vsPlatform ($nBits-bit) environment."" $cppDir\bindings\qpid\dotnet\$vsSubdir\$slnName ") Write-Host " $buildRoot\$outfileName" $out | Out-File "$buildRoot\$outfileName" -encoding ASCII } ############################# # WriteDotnetBindingSlnLauncherBat # Write a batch file that # launches a powershell script. # function WriteDotnetBindingSlnLauncherBat { param ( [string] $slnName, [string] $buildRoot, [string] $vsPlatform, [string] $nBits, [string] $psScriptName, [string] $outfileName, [string] $studioVersion, [string] $studioSubdir ) $out = @("@ECHO OFF REM REM Launch $slnName in $studioVersion $vsPlatform ($nBits-bit) environment REM ECHO Launch $slnName in $studioVersion $vsPlatform ($nBits-bit) environment powershell $buildRoot\$psScriptName ") Write-Host " $buildRoot\$outfileName" $out | Out-File "$buildRoot\$outfileName" -encoding ASCII } ############################# # WriteDotnetBindingEnvSetupBat # Write a batch file that sets the desired environment into # the user's current environment settings. # function WriteDotnetBindingEnvSetupBat { param ( [string] $slnName, [string] $boostRoot, [string] $buildRoot, [string] $vsPlatform, [string] $nBits, [string] $outfileName, [string] $studioVersion, [string] $studioSubdir ) $out = @("@ECHO OFF REM REM Call this command procedure from a command prompt to set up a REM $studioVersion $vsPlatform ($nBits-bit) REM $slnName environment REM REM > call $outfileName REM > REM ECHO %PATH% | FINDSTR /I boost > NUL IF %ERRORLEVEL% EQU 0 ECHO WARNING: Boost is defined in your path multiple times! SET PATH=$boostRoot\lib;%PATH% SET QPID_BUILD_ROOT=$buildRoot ECHO Environment set for $slnName $studioVersion $vsPlatform $nBits-bit development. ") Write-Host " $buildRoot\$outfileName" $out | Out-File "$buildRoot\$outfileName" -encoding ASCII } ############################# # Return the SelectedItem from the dropdown list and close the form. # function Return-DropDown { if ($DropDown.SelectedItem -ne $null) { $global:vsVersion = $DropDown.SelectedItem.ToString() if ($global:vsVersion -eq 'Visual Studio 2010') { $global:cmakeGenerator = "Visual Studio 10" $global:vsSubdir = "msvc10" } else { if ($global:vsVersion -eq 'Visual Studio 2008') { $global:cmakeGenerator = "Visual Studio 9 2008" $global:vsSubdir = "msvc9" } else { Write-Host "Visual Studio must be 2008 or 2010" exit } } $Form.Close() Write-Host "Selected generator: $global:cmakeGenerator" } } ############################# # Create the Visual Studio version form and launch it # function SelectVisualStudioVersion { $Form = New-Object System.Windows.Forms.Form $Form.width = 350 $Form.height = 150 $Form.Text = ”Select Visual Studio Version” $DropDown = new-object System.Windows.Forms.ComboBox $DropDown.Location = new-object System.Drawing.Size(120,10) $DropDown.Size = new-object System.Drawing.Size(150,30) ForEach ($Item in $global:VsVersionCmakeChoiceList) { $DropDown.Items.Add($Item) } $DropDown.SelectedIndex = 0 $Form.Controls.Add($DropDown) # $DropDownLabel.Location = new-object System.Drawing.Size(10,10) # $DropDownLabel.size = new-object System.Drawing.Size(100,20) # $DropDownLabel.Text = "" # $Form.Controls.Add($DropDownLabel) $Button = new-object System.Windows.Forms.Button $Button.Location = new-object System.Drawing.Size(120,50) $Button.Size = new-object System.Drawing.Size(120,20) $Button.Text = "Select" $Button.Add_Click({Return-DropDown}) $form.Controls.Add($Button) $Form.Add_Shown({$Form.Activate()}) $Form.ShowDialog() } ############################# # Main ############################# # # curDir is qpid\cpp\bindings\qpid\dotnet. # [string] $curDir = Split-Path -parent $MyInvocation.MyCommand.Definition [string] $projRoot = Resolve-Path (Join-Path $curDir "..\..\..\..") [string] $cppDir = Resolve-Path (Join-Path $curDir "..\..\..") [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") | Out-Null ############################# # User dialog to select a version of Visual Studio as CMake generator # SelectVisualStudioVersion ############################# # User dialog to get optional 32-bit boost and build paths # $boost32 = Select-Folder -message "Select 32-bit BOOST_ROOT folder for $global:vsVersion build. Press CANCEL to skip 32-bit processing." $defined32 = ($boost32 -ne $null) -and ($boost32 -ne '') if ($defined32) { $found = SanityCheckBoostPath $boost32 if (! $found) { exit } } $make32 = $false if ($defined32) { $build32 = Select-Folder -message "Select 32-bit QPID_BUILD_ROOT folder for $global:vsVersion build." -path $projRoot $found = ($build32 -ne $null) -and ($build32 -ne '') if (! $found) { Write-Host "You must select a build root folder for 32-bit builds" exit } $found = SanityCheckBuildPath $build32 if ($found) { Write-Host "Directory ""$build32"" is already set by CMake. CMake will not be re-run." } else { $make32 = AskYesOrNo "Run CMake in $build32 ?" "32-Bit Builds - Choose CMake run or not" } } ############################# # User dialog to get optional 64-bit boost and build paths # $boost64 = Select-Folder -message "Select 64-bit BOOST_ROOT folder for $global:vsVersion build. Press CANCEL to skip 64-bit processing." $defined64 = ($boost64 -ne $null) -and ($boost64 -ne '') if ($defined64) { $found = SanityCheckBoostPath $boost64 if (! $found) { exit } } $make64 = $false if ($defined64) { $build64 = Select-Folder -message "Select 64-bit QPID_BUILD_ROOT folder for $global:vsVersion build." -path $projRoot $found = ($build64 -ne $null) -and ($build64 -ne '') if (! $found) { Write-Host "You must select a build root folder for 64-bit builds" exit } $found = SanityCheckBuildPath $build64 if ($found) { Write-Host "Directory ""$build64"" is already set by CMake. CMake will not be re-run." } else { $make64 = AskYesOrNo "Run CMake in $build64 ?" "64-Bit Builds - Choose CMake run or not" } } ############################# # Conditionally run CMake # # 32-bit X86 # if ($make32) { $env:BOOST_ROOT = "$boost32" cd "$build32" Write-Host "Running 32-bit CMake in $build32 ..." CMake -G "$global:cmakeGenerator" "-DCMAKE_INSTALL_PREFIX=install_x86" $cppDir } else { Write-Host "Skipped 32-bit CMake." } # # 64-bit X64 # if ($make64) { $env:BOOST_ROOT = "$boost64" cd "$build64" Write-Host "Running 64-bit CMake in $build64" CMake -G "$global:cmakeGenerator Win64" "-DCMAKE_INSTALL_PREFIX=install_x64" $cppDir } else { Write-Host "Skipped 64-bit CMake." } ############################# # Emit scripts # # 32-bit scripts # if ($defined32) { Write-Host "Writing 32-bit scripts..." ########### # Powershell script to launch org.apache.qpid.messaging.sln # WriteDotnetBindingSlnLauncherPs1 -slnName "org.apache.qpid.messaging.sln" ` -boostRoot "$boost32" ` -buildRoot "$build32" ` -cppDir "$cppDir" ` -vsPlatform "x86" ` -nBits "32" ` -outfileName "start-devenv-messaging-$global:vsSubdir-x86-32bit.ps1" ` -studioVersion "$global:vsVersion" ` -studioSubdir "$global:vsSubdir" ########### # Batch script (that you doubleclick) to launch powershell script # that launches org.apache.qpid.messaging.sln. # WriteDotnetBindingSlnLauncherBat -slnName "org.apache.qpid.messaging.sln" ` -buildRoot "$build32" ` -vsPlatform "x86" ` -nBits "32" ` -psScriptName "start-devenv-messaging-$global:vsSubdir-x86-32bit.ps1" ` -outfileName "start-devenv-messaging-$global:vsSubdir-x86-32bit.bat" ` -studioVersion "$global:vsVersion" ` -studioSubdir "$global:vsSubdir" ########### # Batch script (that you CALL from a command prompt) # to establish the org.apache.qpid.messaging.sln build environment. # WriteDotnetBindingEnvSetupBat -slnName "org.apache.qpid.messaging.sln" ` -boostRoot "$boost32" ` -buildRoot "$build32" ` -vsPlatform "x86" ` -nBits "32" ` -outfileName "setenv-messaging-$global:vsSubdir-x86-32bit.bat" ` -studioVersion "$global:vsVersion" ` -studioSubdir "$global:vsSubdir" } else { Write-Host "Skipped writing 32-bit scripts." } ############################# # 64-bit scripts # if ($defined64) { Write-Host "Writing 64-bit scripts..." ########### # Powershell script to launch org.apache.qpid.messaging.sln # WriteDotnetBindingSlnLauncherPs1 -slnName "org.apache.qpid.messaging.sln" ` -boostRoot "$boost64" ` -buildRoot "$build64" ` -cppDir "$cppDir" ` -vsPlatform "x64" ` -nBits "64" ` -outfileName "start-devenv-messaging-$global:vsSubdir-x64-64bit.ps1" ` -studioVersion "$global:vsVersion" ` -studioSubdir "$global:vsSubdir" ########### # Batch script (that you doubleclick) to launch powershell script # that launches org.apache.qpid.messaging.sln. # WriteDotnetBindingSlnLauncherBat -slnName "org.apache.qpid.messaging.sln" ` -buildRoot "$build64" ` -vsPlatform "x64" ` -nBits "64" ` -psScriptName "start-devenv-messaging-$global:vsSubdir-x64-64bit.ps1" ` -outfileName "start-devenv-messaging-$global:vsSubdir-x64-64bit.bat" ` -studioVersion "$global:vsVersion" ` -studioSubdir "$global:vsSubdir" ########### # Batch script (that you CALL from a command prompt) # to establish the org.apache.qpid.messaging.sln build environment. # WriteDotnetBindingEnvSetupBat -slnName "org.apache.qpid.messaging.sln" ` -boostRoot "$boost64" ` -buildRoot "$build64" ` -vsPlatform "x64" ` -nBits "64" ` -outfileName "setenv-messaging-$global:vsSubdir-x64-64bit.bat" ` -studioVersion "$global:vsVersion" ` -studioSubdir "$global:vsSubdir" } else { Write-Host "Skipped writing 64-bit scripts." } ############################# # Pause on exit. If user ran this script through a graphical launch and there's # an error then the window closes and the user never sees the error. This pause # gives him a chance to figure it out. # Write-Host "Press any key to continue ..." $x = $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown") qpidc-0.16/bindings/qpid/dotnet/msvc10/0000775000076400007640000000000011752725721020305 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/dotnet/msvc10/org.apache.qpid.messaging.sessionreceiver.sln0000664000076400007640000000730311657032262031147 0ustar00jrossjross00000000000000Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "org.apache.qpid.messaging", "..\src\msvc10\org.apache.qpid.messaging.vcxproj", "{AA5A3B83-5F98-406D-A01C-5A921467A57D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "org.apache.qpid.messaging.sessionreceiver", "..\src\sessionreceiver\msvc10\org.apache.qpid.messaging.sessionreceiver.csproj", "{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Win32 = Release|Win32 Release|x64 = Release|x64 Release|x86 = Release|x86 RelWithDebInfo|Win32 = RelWithDebInfo|Win32 RelWithDebInfo|x64 = RelWithDebInfo|x64 RelWithDebInfo|x86 = RelWithDebInfo|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.ActiveCfg = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.Build.0 = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.ActiveCfg = Debug|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.Build.0 = Debug|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.ActiveCfg = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.Build.0 = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.ActiveCfg = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.Build.0 = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.ActiveCfg = Release|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.Build.0 = Release|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.ActiveCfg = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.Build.0 = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|Win32 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|Win32.ActiveCfg = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.ActiveCfg = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.Build.0 = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.ActiveCfg = Debug|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.Build.0 = Debug|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|Win32.ActiveCfg = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.ActiveCfg = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.Build.0 = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.ActiveCfg = Release|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.Build.0 = Release|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal qpidc-0.16/bindings/qpid/dotnet/msvc10/org.apache.qpid.messaging.sln0000664000076400007640000006121511657030265025743 0ustar00jrossjross00000000000000Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{34C477FB-B0CC-4AB9-A346-EA7B055469AC}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Direct", "Direct", "{DE58D329-10DC-4C8D-9EFA-230A57314089}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Pub-Sub", "Pub-Sub", "{878FDDF8-A870-41D6-9E36-0A050EC5ACAB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{39E9D1BF-3A0B-4D86-BF6B-F463E1A2245A}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "StructuredMessage", "StructuredMessage", "{E99FEFEE-B866-4BBA-9AA3-79DDF1C92960}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client-Server", "Client-Server", "{9232212E-F3C6-4D18-8D25-0C31DD5FF3DB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Drain-Spout", "Drain-Spout", "{89CE04CB-21DE-4ABB-9236-50529DD8C022}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "org.apache.qpid.messaging", "..\src\msvc10\org.apache.qpid.messaging.vcxproj", "{AA5A3B83-5F98-406D-A01C-5A921467A57D}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.sender", "..\examples\msvc10\csharp.direct.sender\csharp.direct.sender.csproj", "{7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.direct.receiver", "..\examples\msvc10\csharp.direct.receiver\csharp.direct.receiver.csproj", "{52F880E7-D677-4C91-8516-D679CE0F46A8}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "messaging.test", "..\test\messaging.test\msvc10\messaging.test.csproj", "{AF2FBC78-266C-430C-BC29-9477AB596A36}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.sender", "..\examples\msvc10\csharp.map.sender\csharp.map.sender.csproj", "{5D8252F5-E1D3-44A0-94C7-7CB75E843C10}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.receiver", "..\examples\msvc10\csharp.map.receiver\csharp.map.receiver.csproj", "{AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}" ProjectSection(ProjectDependencies) = postProject {AA5A3B83-5F98-406D-A01C-5A921467A57D} = {AA5A3B83-5F98-406D-A01C-5A921467A57D} EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "org.apache.qpid.messaging.sessionreceiver", "..\src\sessionreceiver\msvc10\org.apache.qpid.messaging.sessionreceiver.csproj", "{B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.receiver", "..\examples\msvc10\csharp.map.callback.receiver\csharp.map.callback.receiver.csproj", "{68A43817-2358-4A31-8FDF-FE21722BFBCF}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.map.callback.sender", "..\examples\msvc10\csharp.map.callback.sender\csharp.map.callback.sender.csproj", "{12F1C14F-5C7D-4075-9BAE-C091394FF99A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.client", "..\examples\msvc10\csharp.example.client\csharp.example.client.csproj", "{0DE01712-C2D1-4CA4-B42C-5856456A8696}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.server", "..\examples\msvc10\csharp.example.server\csharp.example.server.csproj", "{090A081D-E8B5-4949-AA43-EE182B7101E3}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.drain", "..\examples\msvc10\csharp.example.drain\csharp.example.drain.csproj", "{C43DEB69-8088-420B-B0CA-C699535E6D08}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.spout", "..\examples\msvc10\csharp.example.spout\csharp.example.spout.csproj", "{EB36626D-36C2-41B3-B65E-762BAF27F137}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.declare_queues", "..\examples\msvc10\csharp.example.declare_queues\csharp.example.declare_queues.csproj", "{E31B349C-830C-4583-8BD9-30DA4398349F}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp.example.helloworld", "..\examples\msvc10\csharp.example.helloworld\csharp.example.helloworld.csproj", "{8CC1C265-0507-44A3-9483-8FAF48513F4D}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 Release|Win32 = Release|Win32 Release|x64 = Release|x64 Release|x86 = Release|x86 RelWithDebInfo|Win32 = RelWithDebInfo|Win32 RelWithDebInfo|x64 = RelWithDebInfo|x64 RelWithDebInfo|x86 = RelWithDebInfo|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.ActiveCfg = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|Win32.Build.0 = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.ActiveCfg = Debug|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x64.Build.0 = Debug|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.ActiveCfg = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Debug|x86.Build.0 = Debug|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.ActiveCfg = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|Win32.Build.0 = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.ActiveCfg = Release|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x64.Build.0 = Release|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.Release|x86.ActiveCfg = Release|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {AA5A3B83-5F98-406D-A01C-5A921467A57D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|Win32 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|Win32.ActiveCfg = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.ActiveCfg = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x64.Build.0 = Debug|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.ActiveCfg = Debug|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Debug|x86.Build.0 = Debug|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|Win32.ActiveCfg = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.ActiveCfg = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x64.Build.0 = Release|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.ActiveCfg = Release|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.Release|x86.Build.0 = Release|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|Win32.ActiveCfg = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.ActiveCfg = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x64.Build.0 = Debug|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.ActiveCfg = Debug|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Debug|x86.Build.0 = Debug|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|Win32.ActiveCfg = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.ActiveCfg = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x64.Build.0 = Release|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.ActiveCfg = Release|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.Release|x86.Build.0 = Release|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {52F880E7-D677-4C91-8516-D679CE0F46A8}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|Win32.ActiveCfg = Debug|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x64.ActiveCfg = Debug|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x64.Build.0 = Debug|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x86.ActiveCfg = Debug|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Debug|x86.Build.0 = Debug|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|Win32.ActiveCfg = Release|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x64.ActiveCfg = Release|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x64.Build.0 = Release|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x86.ActiveCfg = Release|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.Release|x86.Build.0 = Release|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {AF2FBC78-266C-430C-BC29-9477AB596A36}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|Win32.ActiveCfg = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.ActiveCfg = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x64.Build.0 = Debug|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.ActiveCfg = Debug|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Debug|x86.Build.0 = Debug|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|Win32.ActiveCfg = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.ActiveCfg = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x64.Build.0 = Release|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.ActiveCfg = Release|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.Release|x86.Build.0 = Release|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {5D8252F5-E1D3-44A0-94C7-7CB75E843C10}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|Win32.ActiveCfg = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.ActiveCfg = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x64.Build.0 = Debug|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.ActiveCfg = Debug|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Debug|x86.Build.0 = Debug|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|Win32.ActiveCfg = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.ActiveCfg = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x64.Build.0 = Release|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.ActiveCfg = Release|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.Release|x86.Build.0 = Release|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|Win32.ActiveCfg = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.ActiveCfg = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x64.Build.0 = Debug|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.ActiveCfg = Debug|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Debug|x86.Build.0 = Debug|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|Win32.ActiveCfg = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.ActiveCfg = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x64.Build.0 = Release|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.ActiveCfg = Release|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.Release|x86.Build.0 = Release|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {B0A51CEC-30A2-4C2E-90BE-AE95107EAA05}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|Win32.ActiveCfg = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.ActiveCfg = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x64.Build.0 = Debug|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.ActiveCfg = Debug|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Debug|x86.Build.0 = Debug|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|Win32.ActiveCfg = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.ActiveCfg = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x64.Build.0 = Release|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.ActiveCfg = Release|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.Release|x86.Build.0 = Release|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {68A43817-2358-4A31-8FDF-FE21722BFBCF}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|Win32.ActiveCfg = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.ActiveCfg = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x64.Build.0 = Debug|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.ActiveCfg = Debug|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Debug|x86.Build.0 = Debug|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|Win32.ActiveCfg = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.ActiveCfg = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x64.Build.0 = Release|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.ActiveCfg = Release|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.Release|x86.Build.0 = Release|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {12F1C14F-5C7D-4075-9BAE-C091394FF99A}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|Win32.ActiveCfg = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.ActiveCfg = Debug|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x64.Build.0 = Debug|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.ActiveCfg = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Debug|x86.Build.0 = Debug|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|Win32.ActiveCfg = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.ActiveCfg = Release|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x64.Build.0 = Release|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.ActiveCfg = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.Release|x86.Build.0 = Release|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {0DE01712-C2D1-4CA4-B42C-5856456A8696}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|Win32.ActiveCfg = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.ActiveCfg = Debug|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x64.Build.0 = Debug|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.ActiveCfg = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Debug|x86.Build.0 = Debug|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|Win32.ActiveCfg = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.ActiveCfg = Release|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x64.Build.0 = Release|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.ActiveCfg = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.Release|x86.Build.0 = Release|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {090A081D-E8B5-4949-AA43-EE182B7101E3}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|Win32.ActiveCfg = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.ActiveCfg = Debug|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x64.Build.0 = Debug|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.ActiveCfg = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Debug|x86.Build.0 = Debug|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|Win32.ActiveCfg = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.ActiveCfg = Release|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x64.Build.0 = Release|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.ActiveCfg = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.Release|x86.Build.0 = Release|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {C43DEB69-8088-420B-B0CA-C699535E6D08}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|Win32.ActiveCfg = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.ActiveCfg = Debug|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x64.Build.0 = Debug|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.ActiveCfg = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Debug|x86.Build.0 = Debug|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|Win32.ActiveCfg = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.ActiveCfg = Release|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x64.Build.0 = Release|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.ActiveCfg = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.Release|x86.Build.0 = Release|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {EB36626D-36C2-41B3-B65E-762BAF27F137}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|Win32.ActiveCfg = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.ActiveCfg = Debug|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x64.Build.0 = Debug|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.ActiveCfg = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Debug|x86.Build.0 = Debug|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|Win32.ActiveCfg = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.ActiveCfg = Release|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x64.Build.0 = Release|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.ActiveCfg = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.Release|x86.Build.0 = Release|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {E31B349C-830C-4583-8BD9-30DA4398349F}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|Win32.ActiveCfg = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.ActiveCfg = Debug|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x64.Build.0 = Debug|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.ActiveCfg = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Debug|x86.Build.0 = Debug|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|Win32.ActiveCfg = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.ActiveCfg = Release|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x64.Build.0 = Release|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.ActiveCfg = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.Release|x86.Build.0 = Release|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x64.ActiveCfg = RelWithDebInfo|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x64.Build.0 = RelWithDebInfo|x64 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x86.ActiveCfg = RelWithDebInfo|x86 {8CC1C265-0507-44A3-9483-8FAF48513F4D}.RelWithDebInfo|x86.Build.0 = RelWithDebInfo|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {DE58D329-10DC-4C8D-9EFA-230A57314089} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {878FDDF8-A870-41D6-9E36-0A050EC5ACAB} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {89CE04CB-21DE-4ABB-9236-50529DD8C022} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {4408A2DA-ED2D-44AE-A465-0B6D75E1FF86} = {34C477FB-B0CC-4AB9-A346-EA7B055469AC} {7B71CE78-8E78-4632-ADBE-F4D5DFAE0068} = {DE58D329-10DC-4C8D-9EFA-230A57314089} {52F880E7-D677-4C91-8516-D679CE0F46A8} = {DE58D329-10DC-4C8D-9EFA-230A57314089} {AF2FBC78-266C-430C-BC29-9477AB596A36} = {39E9D1BF-3A0B-4D86-BF6B-F463E1A2245A} {5D8252F5-E1D3-44A0-94C7-7CB75E843C10} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} {AD9E53D7-DB10-4DA2-84D2-A81BE09B04E9} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} {68A43817-2358-4A31-8FDF-FE21722BFBCF} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} {12F1C14F-5C7D-4075-9BAE-C091394FF99A} = {E99FEFEE-B866-4BBA-9AA3-79DDF1C92960} {0DE01712-C2D1-4CA4-B42C-5856456A8696} = {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB} {090A081D-E8B5-4949-AA43-EE182B7101E3} = {9232212E-F3C6-4D18-8D25-0C31DD5FF3DB} {C43DEB69-8088-420B-B0CA-C699535E6D08} = {89CE04CB-21DE-4ABB-9236-50529DD8C022} {EB36626D-36C2-41B3-B65E-762BAF27F137} = {89CE04CB-21DE-4ABB-9236-50529DD8C022} {E31B349C-830C-4583-8BD9-30DA4398349F} = {89CE04CB-21DE-4ABB-9236-50529DD8C022} {8CC1C265-0507-44A3-9483-8FAF48513F4D} = {4408A2DA-ED2D-44AE-A465-0B6D75E1FF86} EndGlobalSection EndGlobal qpidc-0.16/bindings/qpid/dotnet/ReadMe.txt0000664000076400007640000000501511424631173021064 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # Qpid.cpp.bindings.qpid.dotnet binding package. 1. Features =========== A. This binding package provides a .NET Interop wrapper around the Qpid C++ Messaging interface. It exposes the Messaging interface through a series of managed code classes that may be used by any .NET language. B. A sessionreceiver assembly provides session message callback functionality. 2. Prerequisites ================ A. From a fresh check-out of Qpid sources, execute an in-source CMake. This command puts the CMake output files in the same directories as the Qpid source files. > cd cpp > cmake -i B. Build the qpid-cpp solution. > qpid-cpp.sln Select Configuration Debug Select Platform Win32 Compile the ALL_BUILD project 3. Building the Dotnet Binding solution ======================================= A. Open solution file cpp\bindings\qpid\dotnet\org.apache.qpid.messaging.sln Select Configuration Debug Select Platform x86 Compile the solution 4. Running the examples ======================= A. csharp.direct.receiver B. csharp.direct.sender C. csharp.map.receiver D. csharp.map.sender E. csharp.map.callback.receiver F. csharp.map.callback.sender G. csharp.example.server H. visualbasic.example.server I. csharp.example.client J. csharp.example.drain K. csharp.example.spout L. csharp.example.declare_queues M. csharp.example.helloworld N. powershell.example.helloworld 5. Running the tests ==================== A. TBD 6. Notes ======== A. Directory cpp\bindings\qpid\dotnet\bld holds a solution file and two project files that are executed during automated winsdk builds. These are not meant to be run interactively. qpidc-0.16/bindings/qpid/Makefile.in0000664000076400007640000005337711752725661017766 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_RUBY_DEVEL_TRUE@@HAVE_SWIG_TRUE@am__append_1 = ruby @HAVE_PYTHON_DEVEL_TRUE@@HAVE_SWIG_TRUE@am__append_2 = python @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@am__append_3 = perl/perl.i perl/CMakeLists.txt subdir = bindings/qpid DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = dotnet ruby python DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = dotnet $(am__append_1) $(am__append_2) @HAVE_SWIG_TRUE@EXTRA_DIST = CMakeLists.txt qpid.i $(am__append_3) @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src -I$(PERL_INC) @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@BUILT_SOURCES = perl/cqpid_perl.cpp @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@SWIG_FLAGS = -w362,401 @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@DISTCLEANFILES = perl/Makefile.PL @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@CLEANFILES = perl/cqpid_perl.cpp perl/Makefile.old perl/cqpid_perl.pm all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qpid/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qpid/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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): @fail= 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; \ ($(am__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" $(RECURSIVE_CLEAN_TARGETS): @fail= 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive @HAVE_PERL_DEVEL_FALSE@all-local: @HAVE_SWIG_FALSE@all-local: all-am: Makefile all-local installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) @HAVE_PERL_DEVEL_FALSE@distclean-local: @HAVE_SWIG_FALSE@distclean-local: @HAVE_PERL_DEVEL_FALSE@maintainer-clean-local: @HAVE_SWIG_FALSE@maintainer-clean-local: @HAVE_PERL_DEVEL_FALSE@install-exec-local: @HAVE_SWIG_FALSE@install-exec-local: @HAVE_PERL_DEVEL_FALSE@clean-local: @HAVE_SWIG_FALSE@clean-local: clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-local \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-exec-local install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ ctags-recursive install install-am install-strip \ tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am all-local check check-am clean clean-generic \ clean-libtool clean-local ctags ctags-recursive distclean \ distclean-generic distclean-libtool distclean-local \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-exec-local \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@perl/cqpid_perl.cpp: $(srcdir)/perl/perl.i $(srcdir)/qpid.i $(srcdir)/../swig_perl_typemaps.i @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ $(SWIG) -perl -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o perl/cqpid_perl.cpp $(srcdir)/perl/perl.i @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@perl/Makefile: perl/cqpid_perl.cpp @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd perl; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ $(PERL) Makefile.PL PREFIX=$(prefix) LIB=$(PERL_ARCHLIB) ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd .. @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@all-local: perl/Makefile @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd perl; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ $(MAKE) OPTIMIZE="$(CXXFLAGS)" ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd .. @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@install-exec-local: @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd perl ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ $(MAKE) pure_install DESTDIR=$(prefix) ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd .. @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@clean-local: @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd perl ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ $(MAKE) clean ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd .. @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@distclean-local: @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd perl ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ $(MAKE) distclean ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd .. @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@maintainer-clean-local: @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd perl ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ $(PERL) maintainer-clean ; \ @HAVE_PERL_DEVEL_TRUE@@HAVE_SWIG_TRUE@ cd .. # 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: qpidc-0.16/bindings/qpid/Makefile.am0000664000076400007640000000372411721257043017732 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # SUBDIRS = dotnet if HAVE_SWIG EXTRA_DIST = CMakeLists.txt qpid.i if HAVE_RUBY_DEVEL SUBDIRS += ruby endif if HAVE_PYTHON_DEVEL SUBDIRS += python endif if HAVE_PERL_DEVEL INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src -I$(PERL_INC) EXTRA_DIST += perl/perl.i perl/CMakeLists.txt BUILT_SOURCES = perl/cqpid_perl.cpp SWIG_FLAGS = -w362,401 perl/cqpid_perl.cpp: $(srcdir)/perl/perl.i $(srcdir)/qpid.i $(srcdir)/../swig_perl_typemaps.i $(SWIG) -perl -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o perl/cqpid_perl.cpp $(srcdir)/perl/perl.i perl/Makefile: perl/cqpid_perl.cpp cd perl; \ $(PERL) Makefile.PL PREFIX=$(prefix) LIB=$(PERL_ARCHLIB) ; \ cd .. all-local: perl/Makefile cd perl; \ $(MAKE) OPTIMIZE="$(CXXFLAGS)" ; \ cd .. install-exec-local: cd perl ; \ $(MAKE) pure_install DESTDIR=$(prefix) ; \ cd .. clean-local: cd perl ; \ $(MAKE) clean ; \ cd .. distclean-local: cd perl ; \ $(MAKE) distclean ; \ cd .. maintainer-clean-local: cd perl ; \ $(PERL) maintainer-clean ; \ cd .. DISTCLEANFILES = perl/Makefile.PL CLEANFILES = perl/cqpid_perl.cpp perl/Makefile.old perl/cqpid_perl.pm endif endif qpidc-0.16/bindings/qpid/perl/0000775000076400007640000000000011752725721016641 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/perl/perl.i0000664000076400007640000000213011527542623017747 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %module cqpid_perl %include "std_string.i" %include "../../swig_perl_typemaps.i" /* Define the general-purpose exception handling */ %exception { try { $action } catch (qpid::messaging::MessagingException& mex) { Perl_croak(aTHX_ mex.what()); } } %include "../qpid.i" qpidc-0.16/bindings/qpid/perl/CMakeLists.txt0000664000076400007640000000340611654522741021402 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ##------------------------------------------------------ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/perl.i PROPERTIES CPLUSPLUS ON) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/perl.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") swig_add_module(cqpid_perl perl ${CMAKE_CURRENT_SOURCE_DIR}/perl.i) swig_link_libraries(cqpid_perl qpidmessaging qpidtypes qmf2 ${PERL_LIBRARY}) set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${PERL_INCLUDE_PATH} -I${qpid-cpp_SOURCE_DIR}/include") ##---------------------------------- ## Install the complete Perl binding ##---------------------------------- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqpid_perl.so ${CMAKE_CURRENT_BINARY_DIR}/cqpid_perl.pm DESTINATION ${PERL_ARCHLIB} COMPONENT ${QPID_COMPONENT_CLIENT} ) qpidc-0.16/bindings/qpid/perl/Makefile.PL.in0000664000076400007640000000114511656553250021220 0ustar00jrossjross00000000000000#!/usr/bin/perl -w use strict; use ExtUtils::MakeMaker; use Config; WriteMakefile( NAME => 'cqpid_perl', PREREQ_PM => {}, AUTHOR => 'Jan-Marek Glogowski ', LIBS => ["-L@top_builddir@/src/.libs -lqpidmessaging -lqpidtypes"], DEFINE => '', INC => '-I@top_srcdir@/include -I@top_builddir@/include -I@top_srcdir@/src -I@top_builddir@/src -I@PERL_INC@', C => ['cqpid_perl.cpp'], # Un-comment this if you add C files to link with later: OBJECT => 'cqpid_perl.o', ); qpidc-0.16/bindings/qpid/python/0000775000076400007640000000000011752725722017221 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/python/Makefile.in0000664000076400007640000005617011752725661021301 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings/qpid/python DIST_COMMON = $(am__cqpid_PYTHON_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pylibdir)" "$(DESTDIR)$(cqpiddir)" LTLIBRARIES = $(pylib_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_PYTHON_DEVEL_TRUE@_cqpid_la_DEPENDENCIES = \ @HAVE_PYTHON_DEVEL_TRUE@ $(am__DEPENDENCIES_1) \ @HAVE_PYTHON_DEVEL_TRUE@ $(top_builddir)/src/libqpidmessaging.la \ @HAVE_PYTHON_DEVEL_TRUE@ $(top_builddir)/src/libqpidtypes.la @HAVE_PYTHON_DEVEL_TRUE@nodist__cqpid_la_OBJECTS = _cqpid_la-cqpid.lo _cqpid_la_OBJECTS = $(nodist__cqpid_la_OBJECTS) _cqpid_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(_cqpid_la_CXXFLAGS) \ $(CXXFLAGS) $(_cqpid_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_PYTHON_DEVEL_TRUE@am__cqpid_la_rpath = -rpath $(pylibdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist__cqpid_la_SOURCES) DIST_SOURCES = am__cqpid_PYTHON_DIST = cqpid.py py_compile = $(top_srcdir)/build-aux/py-compile ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_PYTHON_DEVEL_TRUE@INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src/qmf -I$(top_srcdir)/src -I$(top_builddir)/src @HAVE_PYTHON_DEVEL_TRUE@generated_file_list = \ @HAVE_PYTHON_DEVEL_TRUE@ cqpid.cpp \ @HAVE_PYTHON_DEVEL_TRUE@ cqpid.py @HAVE_PYTHON_DEVEL_TRUE@EXTRA_DIST = CMakeLists.txt python.i @HAVE_PYTHON_DEVEL_TRUE@BUILT_SOURCES = $(generated_file_list) @HAVE_PYTHON_DEVEL_TRUE@SWIG_FLAGS = -w362,401 @HAVE_PYTHON_DEVEL_TRUE@pylibdir = $(pyexecdir) @HAVE_PYTHON_DEVEL_TRUE@pylib_LTLIBRARIES = _cqpid.la @HAVE_PYTHON_DEVEL_TRUE@cqpiddir = $(pythondir) @HAVE_PYTHON_DEVEL_TRUE@cqpid_PYTHON = cqpid.py @HAVE_PYTHON_DEVEL_TRUE@_cqpid_la_LDFLAGS = -avoid-version -module -shared @HAVE_PYTHON_DEVEL_TRUE@_cqpid_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs -lqpidmessaging -lqpidtypes $(top_builddir)/src/libqpidmessaging.la $(top_builddir)/src/libqpidtypes.la @HAVE_PYTHON_DEVEL_TRUE@_cqpid_la_CXXFLAGS = $(INCLUDES) $(PYTHON_CFLAGS) -fno-strict-aliasing @HAVE_PYTHON_DEVEL_TRUE@nodist__cqpid_la_SOURCES = cqpid.cpp @HAVE_PYTHON_DEVEL_TRUE@CLEANFILES = $(generated_file_list) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qpid/python/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qpid/python/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 $(am__aclocal_m4_deps): install-pylibLTLIBRARIES: $(pylib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pylibdir)" || $(MKDIR_P) "$(DESTDIR)$(pylibdir)" @list='$(pylib_LTLIBRARIES)'; test -n "$(pylibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pylibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pylibdir)"; \ } uninstall-pylibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pylib_LTLIBRARIES)'; test -n "$(pylibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pylibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pylibdir)/$$f"; \ done clean-pylibLTLIBRARIES: -test -z "$(pylib_LTLIBRARIES)" || rm -f $(pylib_LTLIBRARIES) @list='$(pylib_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 _cqpid.la: $(_cqpid_la_OBJECTS) $(_cqpid_la_DEPENDENCIES) $(_cqpid_la_LINK) $(am__cqpid_la_rpath) $(_cqpid_la_OBJECTS) $(_cqpid_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_cqpid_la-cqpid.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 $@ $< _cqpid_la-cqpid.lo: cqpid.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_cqpid_la_CXXFLAGS) $(CXXFLAGS) -MT _cqpid_la-cqpid.lo -MD -MP -MF $(DEPDIR)/_cqpid_la-cqpid.Tpo -c -o _cqpid_la-cqpid.lo `test -f 'cqpid.cpp' || echo '$(srcdir)/'`cqpid.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/_cqpid_la-cqpid.Tpo $(DEPDIR)/_cqpid_la-cqpid.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cqpid.cpp' object='_cqpid_la-cqpid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_cqpid_la_CXXFLAGS) $(CXXFLAGS) -c -o _cqpid_la-cqpid.lo `test -f 'cqpid.cpp' || echo '$(srcdir)/'`cqpid.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-cqpidPYTHON: $(cqpid_PYTHON) @$(NORMAL_INSTALL) test -z "$(cqpiddir)" || $(MKDIR_P) "$(DESTDIR)$(cqpiddir)" @list='$(cqpid_PYTHON)'; dlist=; list2=; test -n "$(cqpiddir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cqpiddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(cqpiddir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(cqpiddir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(cqpiddir)" $$dlist; \ fi; \ else :; fi uninstall-cqpidPYTHON: @$(NORMAL_UNINSTALL) @list='$(cqpid_PYTHON)'; test -n "$(cqpiddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(cqpiddir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(cqpiddir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(cqpiddir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(cqpiddir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(cqpiddir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(cqpiddir)" && rm -f $$fileso ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pylibdir)" "$(DESTDIR)$(cqpiddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-pylibLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-cqpidPYTHON install-pylibLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-cqpidPYTHON uninstall-pylibLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pylibLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-cqpidPYTHON install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-pylibLTLIBRARIES \ 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-cqpidPYTHON uninstall-pylibLTLIBRARIES @HAVE_PYTHON_DEVEL_TRUE@$(generated_file_list): $(srcdir)/python.i $(srcdir)/../qpid.i $(srcdir)/../../swig_python_typemaps.i @HAVE_PYTHON_DEVEL_TRUE@ $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I$(top_srcdir)/src/qmf -I/usr/include -o cqpid.cpp $(srcdir)/python.i # 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: qpidc-0.16/bindings/qpid/python/Makefile.am0000664000076400007640000000343611654610577021265 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if HAVE_PYTHON_DEVEL INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src/qmf -I$(top_srcdir)/src -I$(top_builddir)/src generated_file_list = \ cqpid.cpp \ cqpid.py EXTRA_DIST = CMakeLists.txt python.i BUILT_SOURCES = $(generated_file_list) SWIG_FLAGS = -w362,401 $(generated_file_list): $(srcdir)/python.i $(srcdir)/../qpid.i $(srcdir)/../../swig_python_typemaps.i $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I$(top_srcdir)/src/qmf -I/usr/include -o cqpid.cpp $(srcdir)/python.i pylibdir = $(pyexecdir) pylib_LTLIBRARIES = _cqpid.la cqpiddir = $(pythondir) cqpid_PYTHON = cqpid.py _cqpid_la_LDFLAGS = -avoid-version -module -shared _cqpid_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs -lqpidmessaging -lqpidtypes $(top_builddir)/src/libqpidmessaging.la $(top_builddir)/src/libqpidtypes.la _cqpid_la_CXXFLAGS = $(INCLUDES) $(PYTHON_CFLAGS) -fno-strict-aliasing nodist__cqpid_la_SOURCES = cqpid.cpp CLEANFILES = $(generated_file_list) endif # HAVE_PYTHON_DEVEL qpidc-0.16/bindings/qpid/python/python.i0000664000076400007640000003345111743050346020713 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %module cqpid %include "std_string.i" %include "../../swig_python_typemaps.i" /* Needed for get/setPriority methods. Surprising SWIG 1.3.40 doesn't * convert uint8_t by default. */ %apply unsigned char { uint8_t }; /* * Exceptions * * The convention below is that exceptions in _cqpid.so have the same * names as in the C++ library. They get renamed to their Python * equivalents when brought into the Python wrapping */ %{ static PyObject* pNoMessageAvailable; static PyObject* pTargetCapacityExceeded; static PyObject* pNotFound; static PyObject* pTransportFailure; %} %init %{ pNoMessageAvailable = PyErr_NewException( "_cqpid.NoMessageAvailable", NULL, NULL); Py_INCREF(pNoMessageAvailable); PyModule_AddObject(m, "NoMessageAvailable", pNoMessageAvailable); pTargetCapacityExceeded = PyErr_NewException( "_cqpid.TargetCapacityExceeded", NULL, NULL); Py_INCREF(pTargetCapacityExceeded); PyModule_AddObject(m, "TargetCapacityExceeded", pTargetCapacityExceeded); pNotFound = PyErr_NewException( "_cqpid.NotFound", NULL, NULL); Py_INCREF(pNotFound); PyModule_AddObject(m, "NotFound", pNotFound); pTransportFailure = PyErr_NewException( "_cqpid.TransportFailure", NULL, NULL); Py_INCREF(pTransportFailure); PyModule_AddObject(m, "TransportFailure", pTransportFailure); %} %pythoncode %{ Empty = _cqpid.NoMessageAvailable TargetCapacityExceeded = _cqpid.TargetCapacityExceeded NotFound = _cqpid.NotFound ConnectError = _cqpid.TransportFailure %} /* Define the general-purpose exception handling */ %exception { PyObject * pExceptionType = NULL; std::string error; Py_BEGIN_ALLOW_THREADS; try { $action } catch (qpid::messaging::NoMessageAvailable & ex) { pExceptionType = pNoMessageAvailable; error = ex.what(); } catch (qpid::messaging::TargetCapacityExceeded & ex) { pExceptionType = pTargetCapacityExceeded; error = ex.what(); } catch (qpid::messaging::NotFound & ex) { pExceptionType = pNotFound; error = ex.what(); } catch (qpid::messaging::TransportFailure & ex) { pExceptionType = pTransportFailure; error = ex.what(); } catch (qpid::types::Exception& ex) { pExceptionType = PyExc_RuntimeError; error = ex.what(); } Py_END_ALLOW_THREADS; if (!error.empty()) { PyErr_SetString(pExceptionType, error.c_str()); return NULL; } } /* This only renames the non-const version (I believe). Then again, I * don't even know why there is a non-const version of the method. */ %rename(opened) qpid::messaging::Connection::isOpen(); %rename(receiver) qpid::messaging::Session::createReceiver; %rename(sender) qpid::messaging::Session::createSender; %rename(_acknowledge_all) qpid::messaging::Session::acknowledge(bool); %rename(_acknowledge_msg) qpid::messaging::Session::acknowledge( Message &, bool); %rename(_fetch) qpid::messaging::Receiver::fetch; %rename(unsettled) qpid::messaging::Receiver::getUnsettled; %rename(available) qpid::messaging::Receiver::getAvailable; %rename(unsettled) qpid::messaging::Sender::getUnsettled; %rename(available) qpid::messaging::Sender::getAvailable; %rename(_send) qpid::messaging::Sender::send; %rename(_getReplyTo) qpid::messaging::Message::getReplyTo; %rename(_setReplyTo) qpid::messaging::Message::setReplyTo; %rename(_getTtl) qpid::messaging::Message::getTtl; %rename(_setTtl) qpid::messaging::Message::setTtl; %include "../qpid.i" %extend qpid::messaging::Connection { %pythoncode %{ # Handle the different options by converting underscores to hyphens. # Also, the sasl_mechanisms option in Python has no direct # equivalent in C++, so we will translate them to sasl_mechanism # when possible. def __init__(self, url=None, **options): if url: args = [url] else: args = [] if options : if "sasl_mechanisms" in options : if ' ' in options.get("sasl_mechanisms",'') : raise Exception( "C++ Connection objects are unable to handle " "multiple sasl-mechanisms") options["sasl_mechanism"] = options.pop("sasl_mechanisms") args.append(options) this = _cqpid.new_Connection(*args) try: self.this.append(this) except: self.this = this %} /* Return a pre-existing session with the given name, if one * exists, otherwise return a new one. (Note that if a * pre-existing session exists, the transactional argument is * ignored, and the returned session might not satisfy the desired * setting. */ qpid::messaging::Session _session(const std::string & name, bool transactional) { if (!name.empty()) { try { return self->getSession(name); } catch (const qpid::messaging::KeyError &) { } } if (transactional) { return self->createTransactionalSession(name); } else { return self->createSession(name); } } %pythoncode %{ def session(self, name=None, transactional=False) : if name is None : name = '' return self._session(name, transactional) %} %pythoncode %{ @staticmethod def establish(url=None, **options) : conn = Connection(url, **options) conn.open() return conn %} } %extend qpid::messaging::Session { %pythoncode %{ def acknowledge(self, message=None, disposition=None, sync=True) : if disposition : raise Exception("SWIG does not support dispositions yet. Use " "Session.reject and Session.release instead") if message : self._acknowledge_msg(message, sync) else : self._acknowledge_all(sync) __swig_getmethods__["connection"] = getConnection if _newclass: connection = property(getConnection) %} } %extend qpid::messaging::Receiver { %pythoncode %{ __swig_getmethods__["capacity"] = getCapacity __swig_setmethods__["capacity"] = setCapacity if _newclass: capacity = property(getCapacity, setCapacity) __swig_getmethods__["session"] = getSession if _newclass: session = property(getSession) %} %pythoncode %{ def fetch(self, timeout=None) : if timeout is None : return self._fetch() else : # Python API uses timeouts in seconds, # but C++ API uses milliseconds return self._fetch(Duration(int(1000*timeout))) %} } %extend qpid::messaging::Sender { %pythoncode %{ def send(self, object, sync=True) : if isinstance(object, Message): message = object else: message = Message(object) return self._send(message, sync) __swig_getmethods__["capacity"] = getCapacity __swig_setmethods__["capacity"] = setCapacity if _newclass: capacity = property(getCapacity, setCapacity) __swig_getmethods__["session"] = getSession if _newclass: session = property(getSession) %} } %extend qpid::messaging::Message { %pythoncode %{ # UNSPECIFIED was module level before, but I do not # know how to insert python code at the top of the module. # (A bare "%pythoncode" inserts at the end. UNSPECIFIED=object() def __init__(self, content=None, content_type=UNSPECIFIED, id=None, subject=None, user_id=None, reply_to=None, correlation_id=None, durable=None, priority=None, ttl=None, properties=None): this = _cqpid.new_Message('') try: self.this.append(this) except: self.this = this if content : self.content = content if content_type != UNSPECIFIED : self.content_type = content_type if id is not None : self.id = id if subject is not None : self.subject = subject if user_id is not None : self.user_id = user_id if reply_to is not None : self.reply_to = reply_to if correlation_id is not None : self.correlation_id = correlation_id if durable is not None : self.durable = durable if priority is not None : self.priority = priority if ttl is not None : self.ttl = ttl if properties is not None : # Can't set properties via (inst).getProperties, because # the typemaps make a copy of the underlying properties. # Instead, set via setProperty for the time-being for k, v in properties.iteritems() : self.setProperty(k, v) def _get_content(self) : if self.content_type == "amqp/list" : return decodeList(self) if self.content_type == "amqp/map" : return decodeMap(self) return self.getContent() def _set_content(self, content) : if isinstance(content, basestring) : self.setContent(content) elif isinstance(content, list) or isinstance(content, dict) : encode(content, self) else : # Not a type we can handle. Try setting it anyway, # although this will probably lead to a swig error self.setContent(content) __swig_getmethods__["content"] = _get_content __swig_setmethods__["content"] = _set_content if _newclass: content = property(_get_content, _set_content) __swig_getmethods__["content_type"] = getContentType __swig_setmethods__["content_type"] = setContentType if _newclass: content_type = property(getContentType, setContentType) __swig_getmethods__["id"] = getMessageId __swig_setmethods__["id"] = setMessageId if _newclass: id = property(getMessageId, setMessageId) __swig_getmethods__["subject"] = getSubject __swig_setmethods__["subject"] = setSubject if _newclass: subject = property(getSubject, setSubject) __swig_getmethods__["priority"] = getPriority __swig_setmethods__["priority"] = setPriority if _newclass: priority = property(getPriority, setPriority) def getTtl(self) : return self._getTtl().getMilliseconds()/1000.0 def setTtl(self, duration) : self._setTtl(Duration(int(1000*duration))) __swig_getmethods__["ttl"] = getTtl __swig_setmethods__["ttl"] = setTtl if _newclass: ttl = property(getTtl, setTtl) __swig_getmethods__["user_id"] = getUserId __swig_setmethods__["user_id"] = setUserId if _newclass: user_id = property(getUserId, setUserId) __swig_getmethods__["correlation_id"] = getCorrelationId __swig_setmethods__["correlation_id"] = setCorrelationId if _newclass: correlation_id = property(getCorrelationId, setCorrelationId) __swig_getmethods__["redelivered"] = getRedelivered __swig_setmethods__["redelivered"] = setRedelivered if _newclass: redelivered = property(getRedelivered, setRedelivered) __swig_getmethods__["durable"] = getDurable __swig_setmethods__["durable"] = setDurable if _newclass: durable = property(getDurable, setDurable) __swig_getmethods__["properties"] = getProperties if _newclass: properties = property(getProperties) def getReplyTo(self) : return self._getReplyTo().str() def setReplyTo(self, address_str) : self._setReplyTo(Address(address_str)) __swig_getmethods__["reply_to"] = getReplyTo __swig_setmethods__["reply_to"] = setReplyTo if _newclass: reply_to = property(getReplyTo, setReplyTo) def __repr__(self): args = [] for name in ["id", "subject", "user_id", "reply_to", "correlation_id", "priority", "ttl", "durable", "redelivered", "properties", "content_type"] : value = getattr(self, name) if value : args.append("%s=%r" % (name, value)) if self.content is not None: if args: args.append("content=%r" % self.content) else: args.append(repr(self.content)) return "Message(%s)" % ", ".join(args) %} } %pythoncode %{ # Bring into module scope UNSPECIFIED = Message.UNSPECIFIED %} qpidc-0.16/bindings/qpid/python/cqpid.py0000664000076400007640000005336511752725722020707 0ustar00jrossjross00000000000000# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.4 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_cqpid', [dirname(__file__)]) except ImportError: import _cqpid return _cqpid if fp is not None: try: _mod = imp.load_module('_cqpid', fp, pathname, description) finally: fp.close() return _mod _cqpid = swig_import_helper() del swig_import_helper else: import _cqpid del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0 Empty = _cqpid.NoMessageAvailable TargetCapacityExceeded = _cqpid.TargetCapacityExceeded NotFound = _cqpid.NotFound ConnectError = _cqpid.TransportFailure class Address(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Address, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Address, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqpid.new_Address(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqpid.delete_Address __del__ = lambda self : None; def getName(self): return _cqpid.Address_getName(self) def setName(self, *args): return _cqpid.Address_setName(self, *args) def getSubject(self): return _cqpid.Address_getSubject(self) def setSubject(self, *args): return _cqpid.Address_setSubject(self, *args) def getOptions(self, *args): return _cqpid.Address_getOptions(self, *args) def setOptions(self, *args): return _cqpid.Address_setOptions(self, *args) def getType(self): return _cqpid.Address_getType(self) def setType(self, *args): return _cqpid.Address_setType(self, *args) def str(self): return _cqpid.Address_str(self) def __nonzero__(self): return _cqpid.Address___nonzero__(self) __bool__ = __nonzero__ Address_swigregister = _cqpid.Address_swigregister Address_swigregister(Address) class Duration(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Duration, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Duration, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqpid.new_Duration(*args) try: self.this.append(this) except: self.this = this def getMilliseconds(self): return _cqpid.Duration_getMilliseconds(self) __swig_destroy__ = _cqpid.delete_Duration __del__ = lambda self : None; Duration_swigregister = _cqpid.Duration_swigregister Duration_swigregister(Duration) cvar = _cqpid.cvar Duration.FOREVER = _cqpid.cvar.Duration_FOREVER Duration.IMMEDIATE = _cqpid.cvar.Duration_IMMEDIATE Duration.SECOND = _cqpid.cvar.Duration_SECOND Duration.MINUTE = _cqpid.cvar.Duration_MINUTE def __eq__(*args): return _cqpid.__eq__(*args) __eq__ = _cqpid.__eq__ def __ne__(*args): return _cqpid.__ne__(*args) __ne__ = _cqpid.__ne__ class Message(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Message, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Message, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqpid.new_Message(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqpid.delete_Message __del__ = lambda self : None; def _setReplyTo(self, *args): return _cqpid.Message__setReplyTo(self, *args) def _getReplyTo(self): return _cqpid.Message__getReplyTo(self) def setSubject(self, *args): return _cqpid.Message_setSubject(self, *args) def getSubject(self): return _cqpid.Message_getSubject(self) def setContentType(self, *args): return _cqpid.Message_setContentType(self, *args) def getContentType(self): return _cqpid.Message_getContentType(self) def setMessageId(self, *args): return _cqpid.Message_setMessageId(self, *args) def getMessageId(self): return _cqpid.Message_getMessageId(self) def setUserId(self, *args): return _cqpid.Message_setUserId(self, *args) def getUserId(self): return _cqpid.Message_getUserId(self) def setCorrelationId(self, *args): return _cqpid.Message_setCorrelationId(self, *args) def getCorrelationId(self): return _cqpid.Message_getCorrelationId(self) def setPriority(self, *args): return _cqpid.Message_setPriority(self, *args) def getPriority(self): return _cqpid.Message_getPriority(self) def _setTtl(self, *args): return _cqpid.Message__setTtl(self, *args) def _getTtl(self): return _cqpid.Message__getTtl(self) def setDurable(self, *args): return _cqpid.Message_setDurable(self, *args) def getDurable(self): return _cqpid.Message_getDurable(self) def getRedelivered(self): return _cqpid.Message_getRedelivered(self) def setRedelivered(self, *args): return _cqpid.Message_setRedelivered(self, *args) def getProperties(self, *args): return _cqpid.Message_getProperties(self, *args) def setContent(self, *args): return _cqpid.Message_setContent(self, *args) def getContent(self): return _cqpid.Message_getContent(self) def getContentPtr(self): return _cqpid.Message_getContentPtr(self) def getContentSize(self): return _cqpid.Message_getContentSize(self) def setProperty(self, *args): return _cqpid.Message_setProperty(self, *args) # UNSPECIFIED was module level before, but I do not # know how to insert python code at the top of the module. # (A bare "%pythoncode" inserts at the end. UNSPECIFIED=object() def __init__(self, content=None, content_type=UNSPECIFIED, id=None, subject=None, user_id=None, reply_to=None, correlation_id=None, durable=None, priority=None, ttl=None, properties=None): this = _cqpid.new_Message('') try: self.this.append(this) except: self.this = this if content : self.content = content if content_type != UNSPECIFIED : self.content_type = content_type if id is not None : self.id = id if subject is not None : self.subject = subject if user_id is not None : self.user_id = user_id if reply_to is not None : self.reply_to = reply_to if correlation_id is not None : self.correlation_id = correlation_id if durable is not None : self.durable = durable if priority is not None : self.priority = priority if ttl is not None : self.ttl = ttl if properties is not None : # Can't set properties via (inst).getProperties, because # the typemaps make a copy of the underlying properties. # Instead, set via setProperty for the time-being for k, v in properties.iteritems() : self.setProperty(k, v) def _get_content(self) : if self.content_type == "amqp/list" : return decodeList(self) if self.content_type == "amqp/map" : return decodeMap(self) return self.getContent() def _set_content(self, content) : if isinstance(content, basestring) : self.setContent(content) elif isinstance(content, list) or isinstance(content, dict) : encode(content, self) else : # Not a type we can handle. Try setting it anyway, # although this will probably lead to a swig error self.setContent(content) __swig_getmethods__["content"] = _get_content __swig_setmethods__["content"] = _set_content if _newclass: content = property(_get_content, _set_content) __swig_getmethods__["content_type"] = getContentType __swig_setmethods__["content_type"] = setContentType if _newclass: content_type = property(getContentType, setContentType) __swig_getmethods__["id"] = getMessageId __swig_setmethods__["id"] = setMessageId if _newclass: id = property(getMessageId, setMessageId) __swig_getmethods__["subject"] = getSubject __swig_setmethods__["subject"] = setSubject if _newclass: subject = property(getSubject, setSubject) __swig_getmethods__["priority"] = getPriority __swig_setmethods__["priority"] = setPriority if _newclass: priority = property(getPriority, setPriority) def getTtl(self) : return self._getTtl().getMilliseconds()/1000.0 def setTtl(self, duration) : self._setTtl(Duration(int(1000*duration))) __swig_getmethods__["ttl"] = getTtl __swig_setmethods__["ttl"] = setTtl if _newclass: ttl = property(getTtl, setTtl) __swig_getmethods__["user_id"] = getUserId __swig_setmethods__["user_id"] = setUserId if _newclass: user_id = property(getUserId, setUserId) __swig_getmethods__["correlation_id"] = getCorrelationId __swig_setmethods__["correlation_id"] = setCorrelationId if _newclass: correlation_id = property(getCorrelationId, setCorrelationId) __swig_getmethods__["redelivered"] = getRedelivered __swig_setmethods__["redelivered"] = setRedelivered if _newclass: redelivered = property(getRedelivered, setRedelivered) __swig_getmethods__["durable"] = getDurable __swig_setmethods__["durable"] = setDurable if _newclass: durable = property(getDurable, setDurable) __swig_getmethods__["properties"] = getProperties if _newclass: properties = property(getProperties) def getReplyTo(self) : return self._getReplyTo().str() def setReplyTo(self, address_str) : self._setReplyTo(Address(address_str)) __swig_getmethods__["reply_to"] = getReplyTo __swig_setmethods__["reply_to"] = setReplyTo if _newclass: reply_to = property(getReplyTo, setReplyTo) def __repr__(self): args = [] for name in ["id", "subject", "user_id", "reply_to", "correlation_id", "priority", "ttl", "durable", "redelivered", "properties", "content_type"] : value = getattr(self, name) if value : args.append("%s=%r" % (name, value)) if self.content is not None: if args: args.append("content=%r" % self.content) else: args.append(repr(self.content)) return "Message(%s)" % ", ".join(args) Message_swigregister = _cqpid.Message_swigregister Message_swigregister(Message) def __mul__(*args): return _cqpid.__mul__(*args) __mul__ = _cqpid.__mul__ class EncodingException(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, EncodingException, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, EncodingException, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqpid.new_EncodingException(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqpid.delete_EncodingException __del__ = lambda self : None; EncodingException_swigregister = _cqpid.EncodingException_swigregister EncodingException_swigregister(EncodingException) class Receiver(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Receiver, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Receiver, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqpid.new_Receiver(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqpid.delete_Receiver __del__ = lambda self : None; def get(self, *args): return _cqpid.Receiver_get(self, *args) def _fetch(self, *args): return _cqpid.Receiver__fetch(self, *args) def setCapacity(self, *args): return _cqpid.Receiver_setCapacity(self, *args) def getCapacity(self): return _cqpid.Receiver_getCapacity(self) def available(self): return _cqpid.Receiver_available(self) def unsettled(self): return _cqpid.Receiver_unsettled(self) def close(self): return _cqpid.Receiver_close(self) def isClosed(self): return _cqpid.Receiver_isClosed(self) def getName(self): return _cqpid.Receiver_getName(self) def getSession(self): return _cqpid.Receiver_getSession(self) __swig_getmethods__["capacity"] = getCapacity __swig_setmethods__["capacity"] = setCapacity if _newclass: capacity = property(getCapacity, setCapacity) __swig_getmethods__["session"] = getSession if _newclass: session = property(getSession) def fetch(self, timeout=None) : if timeout is None : return self._fetch() else : # Python API uses timeouts in seconds, # but C++ API uses milliseconds return self._fetch(Duration(int(1000*timeout))) Receiver_swigregister = _cqpid.Receiver_swigregister Receiver_swigregister(Receiver) def decode(*args): return _cqpid.decode(*args) decode = _cqpid.decode def encode(*args): return _cqpid.encode(*args) encode = _cqpid.encode class Sender(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Sender, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Sender, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqpid.new_Sender(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqpid.delete_Sender __del__ = lambda self : None; def _send(self, *args): return _cqpid.Sender__send(self, *args) def close(self): return _cqpid.Sender_close(self) def setCapacity(self, *args): return _cqpid.Sender_setCapacity(self, *args) def getCapacity(self): return _cqpid.Sender_getCapacity(self) def unsettled(self): return _cqpid.Sender_unsettled(self) def available(self): return _cqpid.Sender_available(self) def getName(self): return _cqpid.Sender_getName(self) def getSession(self): return _cqpid.Sender_getSession(self) def send(self, object, sync=True) : if isinstance(object, Message): message = object else: message = Message(object) return self._send(message, sync) __swig_getmethods__["capacity"] = getCapacity __swig_setmethods__["capacity"] = setCapacity if _newclass: capacity = property(getCapacity, setCapacity) __swig_getmethods__["session"] = getSession if _newclass: session = property(getSession) Sender_swigregister = _cqpid.Sender_swigregister Sender_swigregister(Sender) class Session(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Session, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Session, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqpid.new_Session(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqpid.delete_Session __del__ = lambda self : None; def close(self): return _cqpid.Session_close(self) def commit(self): return _cqpid.Session_commit(self) def rollback(self): return _cqpid.Session_rollback(self) def _acknowledge_all(self, sync = False): return _cqpid.Session__acknowledge_all(self, sync) def _acknowledge_msg(self, *args): return _cqpid.Session__acknowledge_msg(self, *args) def acknowledge(self, *args): return _cqpid.Session_acknowledge(self, *args) def acknowledgeUpTo(self, *args): return _cqpid.Session_acknowledgeUpTo(self, *args) def reject(self, *args): return _cqpid.Session_reject(self, *args) def release(self, *args): return _cqpid.Session_release(self, *args) def sync(self, block = True): return _cqpid.Session_sync(self, block) def getReceivable(self): return _cqpid.Session_getReceivable(self) def getUnsettledAcks(self): return _cqpid.Session_getUnsettledAcks(self) def nextReceiver(self, *args): return _cqpid.Session_nextReceiver(self, *args) def sender(self, *args): return _cqpid.Session_sender(self, *args) def receiver(self, *args): return _cqpid.Session_receiver(self, *args) def getSender(self, *args): return _cqpid.Session_getSender(self, *args) def getReceiver(self, *args): return _cqpid.Session_getReceiver(self, *args) def getConnection(self): return _cqpid.Session_getConnection(self) def hasError(self): return _cqpid.Session_hasError(self) def checkError(self): return _cqpid.Session_checkError(self) def acknowledge(self, message=None, disposition=None, sync=True) : if disposition : raise Exception("SWIG does not support dispositions yet. Use " "Session.reject and Session.release instead") if message : self._acknowledge_msg(message, sync) else : self._acknowledge_all(sync) __swig_getmethods__["connection"] = getConnection if _newclass: connection = property(getConnection) Session_swigregister = _cqpid.Session_swigregister Session_swigregister(Session) class Connection(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Connection, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Connection, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqpid.new_Connection(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqpid.delete_Connection __del__ = lambda self : None; def setOption(self, *args): return _cqpid.Connection_setOption(self, *args) def open(self): return _cqpid.Connection_open(self) def opened(self): return _cqpid.Connection_opened(self) def isOpen(self): return _cqpid.Connection_isOpen(self) def close(self): return _cqpid.Connection_close(self) def createTransactionalSession(self, *args): return _cqpid.Connection_createTransactionalSession(self, *args) def createSession(self, *args): return _cqpid.Connection_createSession(self, *args) def getSession(self, *args): return _cqpid.Connection_getSession(self, *args) def getAuthenticatedUsername(self): return _cqpid.Connection_getAuthenticatedUsername(self) # Handle the different options by converting underscores to hyphens. # Also, the sasl_mechanisms option in Python has no direct # equivalent in C++, so we will translate them to sasl_mechanism # when possible. def __init__(self, url=None, **options): if url: args = [url] else: args = [] if options : if "sasl_mechanisms" in options : if ' ' in options.get("sasl_mechanisms",'') : raise Exception( "C++ Connection objects are unable to handle " "multiple sasl-mechanisms") options["sasl_mechanism"] = options.pop("sasl_mechanisms") args.append(options) this = _cqpid.new_Connection(*args) try: self.this.append(this) except: self.this = this def _session(self, *args): return _cqpid.Connection__session(self, *args) def session(self, name=None, transactional=False) : if name is None : name = '' return self._session(name, transactional) @staticmethod def establish(url=None, **options) : conn = Connection(url, **options) conn.open() return conn Connection_swigregister = _cqpid.Connection_swigregister Connection_swigregister(Connection) class FailoverUpdates(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, FailoverUpdates, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, FailoverUpdates, name) __repr__ = _swig_repr def __init__(self, *args): this = _cqpid.new_FailoverUpdates(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _cqpid.delete_FailoverUpdates __del__ = lambda self : None; FailoverUpdates_swigregister = _cqpid.FailoverUpdates_swigregister FailoverUpdates_swigregister(FailoverUpdates) def decodeMap(*args): return _cqpid.decodeMap(*args) decodeMap = _cqpid.decodeMap def decodeList(*args): return _cqpid.decodeList(*args) decodeList = _cqpid.decodeList # Bring into module scope UNSPECIFIED = Message.UNSPECIFIED # This file is compatible with both classic and new-style classes. qpidc-0.16/bindings/qpid/python/CMakeLists.txt0000664000076400007640000000501111654522741021753 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ##------------------------------------------------------ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES CPLUSPLUS ON) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") swig_add_module(cqpid_python python ${CMAKE_CURRENT_SOURCE_DIR}/python.i) swig_link_libraries(cqpid_python qpidmessaging qpidtypes qmf2 ${PYTHON_LIBRARIES}) set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${PYTHON_INCLUDE_PATH} -I${qpid-cpp_SOURCE_DIR}/include") ##------------------------------------ ## Install the complete Python binding ##------------------------------------ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile cqpid.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile cqpid.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cqpid.py ${CMAKE_CURRENT_BINARY_DIR}/cqpid.pyc ${CMAKE_CURRENT_BINARY_DIR}/cqpid.pyo DESTINATION ${PYTHON_SITE_PACKAGES} COMPONENT ${QPID_COMPONENT_CLIENT} ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_cqpid_python.so RENAME _cqpid.so DESTINATION ${PYTHON_SITE_PACKAGES} COMPONENT ${QPID_COMPONENT_CLIENT} ) qpidc-0.16/bindings/qpid/CMakeLists.txt0000664000076400007640000000230711530535574020440 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # include(FindSWIG) include(UseSWIG) include(FindRuby) include(FindPythonLibs) include(FindPerlLibs) if (SWIG_FOUND) set(CMAKE_SWIG_FLAGS "-w361,362,401,467,503") if (PYTHONLIBS_FOUND) add_subdirectory(python) endif (PYTHONLIBS_FOUND) if (RUBY_FOUND) add_subdirectory(ruby) endif (RUBY_FOUND) if (PERLLIBS_FOUND) add_subdirectory(perl) endif (PERLLIBS_FOUND) endif (SWIG_FOUND) qpidc-0.16/bindings/qpid/qpid.i0000664000076400007640000000424111564611351017001 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %{ #include #include #include #include #include #include #include #include #include // // Wrapper functions for map-decode and list-decode. This allows us to avoid // the complexity of output parameter mapping. // qpid::types::Variant::Map& decodeMap(const qpid::messaging::Message& msg) { static qpid::types::Variant::Map map; map.clear(); qpid::messaging::decode(msg, map); return map; } qpid::types::Variant::List& decodeList(const qpid::messaging::Message& msg) { static qpid::types::Variant::List list; list.clear(); qpid::messaging::decode(msg, list); return list; } %} %include %include %include %include %include %include %include %include %include %include qpid::types::Variant::Map& decodeMap(const qpid::messaging::Message&); qpid::types::Variant::List& decodeList(const qpid::messaging::Message&); %{ %}; qpidc-0.16/bindings/qpid/ruby/0000775000076400007640000000000011752725721016660 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qpid/ruby/Makefile.in0000664000076400007640000005236311752725661020741 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings/qpid/ruby DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in TODO ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(rubylibarchdir)" LTLIBRARIES = $(rubylibarch_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_RUBY_DEVEL_TRUE@cqpid_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ @HAVE_RUBY_DEVEL_TRUE@ $(top_builddir)/src/libqpidmessaging.la \ @HAVE_RUBY_DEVEL_TRUE@ $(top_builddir)/src/libqpidtypes.la @HAVE_RUBY_DEVEL_TRUE@nodist_cqpid_la_OBJECTS = cqpid_la-cqpid.lo cqpid_la_OBJECTS = $(nodist_cqpid_la_OBJECTS) cqpid_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(cqpid_la_CXXFLAGS) \ $(CXXFLAGS) $(cqpid_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_RUBY_DEVEL_TRUE@am_cqpid_la_rpath = -rpath $(rubylibarchdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_cqpid_la_SOURCES) DIST_SOURCES = ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_RUBY_DEVEL_TRUE@INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src @HAVE_RUBY_DEVEL_TRUE@EXTRA_DIST = CMakeLists.txt ruby.i @HAVE_RUBY_DEVEL_TRUE@BUILT_SOURCES = cqpid.cpp @HAVE_RUBY_DEVEL_TRUE@SWIG_FLAGS = -w362,401 @HAVE_RUBY_DEVEL_TRUE@rubylibdir = $(RUBY_LIB) @HAVE_RUBY_DEVEL_TRUE@rubylibarchdir = $(RUBY_LIB_ARCH) @HAVE_RUBY_DEVEL_TRUE@rubylibarch_LTLIBRARIES = cqpid.la @HAVE_RUBY_DEVEL_TRUE@cqpid_la_LDFLAGS = -avoid-version -module -shared -shrext ".$(RUBY_DLEXT)" @HAVE_RUBY_DEVEL_TRUE@cqpid_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqpidmessaging -lqpidtypes \ @HAVE_RUBY_DEVEL_TRUE@ $(top_builddir)/src/libqpidmessaging.la $(top_builddir)/src/libqpidtypes.la @HAVE_RUBY_DEVEL_TRUE@cqpid_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH) -fno-strict-aliasing @HAVE_RUBY_DEVEL_TRUE@nodist_cqpid_la_SOURCES = cqpid.cpp @HAVE_RUBY_DEVEL_TRUE@CLEANFILES = cqpid.cpp all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qpid/ruby/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qpid/ruby/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 $(am__aclocal_m4_deps): install-rubylibarchLTLIBRARIES: $(rubylibarch_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(rubylibarchdir)" || $(MKDIR_P) "$(DESTDIR)$(rubylibarchdir)" @list='$(rubylibarch_LTLIBRARIES)'; test -n "$(rubylibarchdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(rubylibarchdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(rubylibarchdir)"; \ } uninstall-rubylibarchLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(rubylibarch_LTLIBRARIES)'; test -n "$(rubylibarchdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(rubylibarchdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(rubylibarchdir)/$$f"; \ done clean-rubylibarchLTLIBRARIES: -test -z "$(rubylibarch_LTLIBRARIES)" || rm -f $(rubylibarch_LTLIBRARIES) @list='$(rubylibarch_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 cqpid.la: $(cqpid_la_OBJECTS) $(cqpid_la_DEPENDENCIES) $(cqpid_la_LINK) $(am_cqpid_la_rpath) $(cqpid_la_OBJECTS) $(cqpid_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cqpid_la-cqpid.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 $@ $< cqpid_la-cqpid.lo: cqpid.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cqpid_la_CXXFLAGS) $(CXXFLAGS) -MT cqpid_la-cqpid.lo -MD -MP -MF $(DEPDIR)/cqpid_la-cqpid.Tpo -c -o cqpid_la-cqpid.lo `test -f 'cqpid.cpp' || echo '$(srcdir)/'`cqpid.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/cqpid_la-cqpid.Tpo $(DEPDIR)/cqpid_la-cqpid.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='cqpid.cpp' object='cqpid_la-cqpid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(cqpid_la_CXXFLAGS) $(CXXFLAGS) -c -o cqpid_la-cqpid.lo `test -f 'cqpid.cpp' || echo '$(srcdir)/'`cqpid.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(rubylibarchdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-rubylibarchLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-rubylibarchLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-rubylibarchLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-rubylibarchLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-rubylibarchLTLIBRARIES 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-rubylibarchLTLIBRARIES @HAVE_RUBY_DEVEL_TRUE@cqpid.cpp: $(srcdir)/ruby.i $(srcdir)/../qpid.i $(srcdir)/../../swig_ruby_typemaps.i @HAVE_RUBY_DEVEL_TRUE@ $(SWIG) -ruby -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqpid.cpp $(srcdir)/ruby.i # 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: qpidc-0.16/bindings/qpid/ruby/Makefile.am0000664000076400007640000000324511567211031020704 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if HAVE_RUBY_DEVEL INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src EXTRA_DIST = CMakeLists.txt ruby.i BUILT_SOURCES = cqpid.cpp SWIG_FLAGS = -w362,401 rubylibdir = $(RUBY_LIB) cqpid.cpp: $(srcdir)/ruby.i $(srcdir)/../qpid.i $(srcdir)/../../swig_ruby_typemaps.i $(SWIG) -ruby -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqpid.cpp $(srcdir)/ruby.i rubylibarchdir = $(RUBY_LIB_ARCH) rubylibarch_LTLIBRARIES = cqpid.la cqpid_la_LDFLAGS = -avoid-version -module -shared -shrext ".$(RUBY_DLEXT)" cqpid_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqpidmessaging -lqpidtypes \ $(top_builddir)/src/libqpidmessaging.la $(top_builddir)/src/libqpidtypes.la cqpid_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH) -fno-strict-aliasing nodist_cqpid_la_SOURCES = cqpid.cpp CLEANFILES = cqpid.cpp endif # HAVE_RUBY_DEVEL qpidc-0.16/bindings/qpid/ruby/ruby.i0000664000076400007640000000224711431073453020010 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %module cqpid %include "std_string.i" %include "../../swig_ruby_typemaps.i" /* Define the general-purpose exception handling */ %exception { try { $action } catch (qpid::messaging::MessagingException& mex) { static VALUE merror = rb_define_class("MessagingError", rb_eStandardError); rb_raise(merror, mex.what()); } } %include "../qpid.i" qpidc-0.16/bindings/qpid/ruby/CMakeLists.txt0000664000076400007640000000536311654522741021425 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ##-------------------------------------------------- ## Properties used for generating the Ruby bindings. ##-------------------------------------------------- set(GEM_BINDINGS_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/ext/cqpid) set(GEM_BINDINGS_SOURCE_FILE ${GEM_BINDINGS_SOURCE_DIR}/cqpid.cpp) set(GEM_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) set(GEM_OUTPUT_FILE ${GEM_OUTPUT_PATH}/pkg/qpid-${qpidc_version}.0.gem) ##------------------------------------------------------ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") swig_add_module(cqpid_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i) swig_link_libraries(cqpid_ruby qpidmessaging qpidtypes qmf2 ${RUBY_LIBRARY}) set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include") ##---------------------------------- ## Install the complete Ruby binding ##---------------------------------- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcqpid_ruby.so RENAME cqpid.so DESTINATION ${RUBY_ARCH_DIR} COMPONENT ${QPID_COMPONENT_CLIENT} ) add_custom_command(OUTPUT ${GEM_BINDINGS_SOURCE_FILE} COMMAND cp ${swig_generated_file_fullname} ${GEM_BINDINGS_SOURCE_FILE} DEPENDS ${swig_generated_file_fullname} ) add_custom_command(OUTPUT ${GEM_OUTPUT_FILE} COMMAND OUTPUT_DIR=${GEM_OUTPUT_PATH} rake clean clobber package WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${swig_generated_file_fullname} ${GEM_BINDINGS_SOURCE_FILE} ) add_custom_target(gemfile DEPENDS ${GEM_OUTPUT_FILE} ) qpidc-0.16/bindings/qpid/ruby/TODO0000664000076400007640000000032711641333332017340 0ustar00jrossjross00000000000000TODO Items ----------------------------------------------------------------------------- Version 0.11.0: * Deliver the Ruby bindings as a gem. * Rework the blocking tasks to not bring the main thread to a halt. qpidc-0.16/bindings/qmf/0000775000076400007640000000000011752725721015525 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf/Makefile.in0000664000076400007640000004536111752725661017606 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_RUBY_DEVEL_TRUE@@HAVE_SWIG_TRUE@am__append_1 = ruby @HAVE_PYTHON_DEVEL_TRUE@@HAVE_SWIG_TRUE@am__append_2 = python subdir = bindings/qmf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = tests ruby python DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_SWIG_TRUE@EXTRA_DIST = CMakeLists.txt qmfengine.i @HAVE_SWIG_TRUE@SUBDIRS = tests $(am__append_1) $(am__append_2) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qmf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qmf/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # 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): @fail= 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; \ ($(am__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" $(RECURSIVE_CLEAN_TARGETS): @fail= 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; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ 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 || \ set "$$@" "$$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; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive 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-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: qpidc-0.16/bindings/qmf/Makefile.am0000664000076400007640000000167311656043025017561 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if HAVE_SWIG EXTRA_DIST = CMakeLists.txt qmfengine.i SUBDIRS = tests if HAVE_RUBY_DEVEL SUBDIRS += ruby endif if HAVE_PYTHON_DEVEL SUBDIRS += python endif endif qpidc-0.16/bindings/qmf/tests/0000775000076400007640000000000011752725721016667 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf/tests/Makefile.in0000664000076400007640000003457411752725661020754 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings/qmf/tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = run_interop_tests EXTRA_DIST = \ agent_ruby.rb \ python_agent.py \ python_console.py \ ruby_console.rb \ run_interop_tests 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qmf/tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qmf/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ 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`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ 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 \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ 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`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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-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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: qpidc-0.16/bindings/qmf/tests/Makefile.am0000664000076400007640000000167511247760773020741 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # TESTS = run_interop_tests EXTRA_DIST = \ agent_ruby.rb \ python_agent.py \ python_console.py \ ruby_console.rb \ run_interop_tests qpidc-0.16/bindings/qmf/tests/python_console.py0000775000076400007640000002562211446375676022330 0ustar00jrossjross00000000000000#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import sys from qpid.testlib import TestBase010 from qpid.datatypes import Message from qpid.queue import Empty from time import sleep import qmf.console class QmfInteropTests(TestBase010): def test_A_agent_presence(self): self.startQmf(); qmf = self.qmf agents = [] count = 0 while len(agents) == 0: agents = qmf.getObjects(_class="agent") sleep(1) count += 1 if count > 10: self.fail("Timed out waiting for remote agent") def test_B_basic_method_invocation(self): self.startQmf(); qmf = self.qmf parents = qmf.getObjects(_class="parent") self.assertEqual(len(parents), 1) parent = parents[0] for seq in range(10): result = parent.echo(seq, _timeout=5) self.assertEqual(result.status, 0) self.assertEqual(result.text, "OK") self.assertEqual(result.sequence, seq) result = parent.set_numerics("bogus") self.assertEqual(result.status, 1) self.assertEqual(result.text, "Invalid argument value for test") def test_C_basic_types_numeric_big(self): self.startQmf(); qmf = self.qmf parents = qmf.getObjects(_class="parent") self.assertEqual(len(parents), 1) parent = parents[0] result = parent.set_numerics("big") self.assertEqual(result.status, 0) self.assertEqual(result.text, "OK") parent.update() self.assertEqual(parent.uint64val, 0x9494949449494949) self.assertEqual(parent.uint32val, 0xA5A55A5A) self.assertEqual(parent.uint16val, 0xB66B) self.assertEqual(parent.uint8val, 0xC7) self.assertEqual(parent.int64val, 1000000000000000000) self.assertEqual(parent.int32val, 1000000000) self.assertEqual(parent.int16val, 10000) self.assertEqual(parent.int8val, 100) def test_C_basic_types_numeric_small(self): self.startQmf(); qmf = self.qmf parents = qmf.getObjects(_class="parent") self.assertEqual(len(parents), 1) parent = parents[0] result = parent.set_numerics("small") self.assertEqual(result.status, 0) self.assertEqual(result.text, "OK") parent.update() self.assertEqual(parent.uint64val, 4) self.assertEqual(parent.uint32val, 5) self.assertEqual(parent.uint16val, 6) self.assertEqual(parent.uint8val, 7) self.assertEqual(parent.int64val, 8) self.assertEqual(parent.int32val, 9) self.assertEqual(parent.int16val, 10) self.assertEqual(parent.int8val, 11) def test_C_basic_types_numeric_negative(self): self.startQmf(); qmf = self.qmf parents = qmf.getObjects(_class="parent") self.assertEqual(len(parents), 1) parent = parents[0] result = parent.set_numerics("negative") self.assertEqual(result.status, 0) self.assertEqual(result.text, "OK") parent.update() self.assertEqual(parent.uint64val, 0) self.assertEqual(parent.uint32val, 0) self.assertEqual(parent.uint16val, 0) self.assertEqual(parent.uint8val, 0) self.assertEqual(parent.int64val, -10000000000) self.assertEqual(parent.int32val, -100000) self.assertEqual(parent.int16val, -1000) self.assertEqual(parent.int8val, -100) def disabled_test_D_userid_for_method(self): self.startQmf(); qmf = self.qmf parents = qmf.getObjects(_class="parent") self.assertEqual(len(parents), 1) parent = parents[0] result = parent.probe_userid() self.assertEqual(result.status, 0) self.assertEqual(result.userid, "guest") def test_D_get_by_object_id(self): self.startQmf() qmf = self.qmf parents = qmf.getObjects(_class="parent") self.assertEqual(len(parents), 1) parent = parents[0] newList = qmf.getObjects(_objectId=parent.getObjectId()) self.assertEqual(len(newList), 1) def test_E_filter_by_object_id(self): self.startQmf() qmf = self.qmf list = qmf.getObjects(_class="exchange", name="qpid.management") self.assertEqual(len(list), 1, "No Management Exchange") mgmt_exchange = list[0] bindings = qmf.getObjects(_class="binding", exchangeRef=mgmt_exchange.getObjectId()) if len(bindings) == 0: self.fail("No bindings found on management exchange") for binding in bindings: self.assertEqual(binding.exchangeRef, mgmt_exchange.getObjectId()) def test_F_events(self): class Handler(qmf.console.Console): def __init__(self): self.queue = [] def event(self, broker, event): if event.getClassKey().getClassName() == "test_event": self.queue.append(event) handler = Handler() self.startQmf(handler) parents = self.qmf.getObjects(_class="parent") self.assertEqual(len(parents), 1) parent = parents[0] parent.set_numerics("big") parent.set_numerics("small") parent.set_numerics("negative") parent.set_short_string("TEST") parent.set_long_string("LONG_TEST") parent.probe_userid() queue = handler.queue self.assertEqual(len(queue), 5) self.assertEqual(queue[0].arguments["uint32val"], 0xA5A55A5A) self.assertEqual(queue[0].arguments["strval"], "Unused") # verify map and list event content. # see agent for structure of listval and mapval listval = queue[0].arguments["listval"] self.assertTrue(isinstance(listval, list)) self.assertEqual(len(listval), 5) self.assertTrue(isinstance(listval[4], list)) self.assertEqual(len(listval[4]), 4) self.assertTrue(isinstance(listval[4][3], dict)) self.assertEqual(listval[4][3]["hi"], 10) self.assertEqual(listval[4][3]["lo"], 5) self.assertEqual(listval[4][3]["neg"], -3) mapval = queue[0].arguments["mapval"] self.assertTrue(isinstance(mapval, dict)) self.assertEqual(len(mapval), 7) self.assertEqual(mapval['aLong'], 9999999999) self.assertEqual(mapval['aInt'], 54321) self.assertEqual(mapval['aSigned'], -666) self.assertEqual(mapval['aString'], "A String"), self.assertEqual(mapval['aFloat'], 3.1415), self.assertTrue(isinstance(mapval['aMap'], dict)) self.assertEqual(len(mapval['aMap']), 2) self.assertEqual(mapval['aMap']['second'], 2) self.assertTrue(isinstance(mapval['aList'], list)) self.assertEqual(len(mapval['aList']), 4) self.assertEqual(mapval['aList'][1], -1) self.assertEqual(queue[1].arguments["uint32val"], 5) self.assertEqual(queue[1].arguments["strval"], "Unused") self.assertEqual(queue[2].arguments["uint32val"], 0) self.assertEqual(queue[2].arguments["strval"], "Unused") self.assertEqual(queue[3].arguments["uint32val"], 0) self.assertEqual(queue[3].arguments["strval"], "TEST") self.assertEqual(queue[4].arguments["uint32val"], 0) self.assertEqual(queue[4].arguments["strval"], "LONG_TEST") def test_G_basic_map_list_data(self): self.startQmf(); qmf = self.qmf parents = qmf.getObjects(_class="parent") self.assertEqual(len(parents), 1) parent = parents[0] # see agent for structure of listval self.assertTrue(isinstance(parent.listval, list)) self.assertEqual(len(parent.listval), 5) self.assertTrue(isinstance(parent.listval[4], list)) self.assertEqual(len(parent.listval[4]), 4) self.assertTrue(isinstance(parent.listval[4][3], dict)) self.assertEqual(parent.listval[4][3]["hi"], 10) self.assertEqual(parent.listval[4][3]["lo"], 5) self.assertEqual(parent.listval[4][3]["neg"], -3) # see agent for structure of mapval self.assertTrue(isinstance(parent.mapval, dict)) self.assertEqual(len(parent.mapval), 7) self.assertEqual(parent.mapval['aLong'], 9999999999) self.assertEqual(parent.mapval['aInt'], 54321) self.assertEqual(parent.mapval['aSigned'], -666) self.assertEqual(parent.mapval['aString'], "A String"), self.assertEqual(parent.mapval['aFloat'], 3.1415), self.assertTrue(isinstance(parent.mapval['aMap'], dict)) self.assertEqual(len(parent.mapval['aMap']), 2) self.assertEqual(parent.mapval['aMap']['second'], 2) self.assertTrue(isinstance(parent.mapval['aList'], list)) self.assertEqual(len(parent.mapval['aList']), 4) self.assertEqual(parent.mapval['aList'][1], -1) def test_H_map_list_method_call(self): self.startQmf(); qmf = self.qmf parents = qmf.getObjects(_class="parent") self.assertEqual(len(parents), 1) parent = parents[0] inMap = {'aLong' : long(9999999999), 'aInt' : int(54321), 'aSigned' : -666, 'aString' : "A String", 'aFloat' : 3.1415, 'aList' : ['x', -1, 'y', 2], 'abool' : False} inList = ['aString', long(1), -1, 2.7182, {'aMap': -8}, True] result = parent.test_map_list(inMap, inList) self.assertEqual(result.status, 0) self.assertEqual(result.text, "OK") # verify returned values self.assertEqual(len(inMap), len(result.outArgs['outMap'])) for key,value in result.outArgs['outMap'].items(): self.assertEqual(inMap[key], value) self.assertEqual(len(inList), len(result.outArgs['outList'])) for idx in range(len(inList)): self.assertEqual(inList[idx], result.outArgs['outList'][idx]) def getProperty(self, msg, name): for h in msg.headers: if hasattr(h, name): return getattr(h, name) return None def getAppHeader(self, msg, name): headers = self.getProperty(msg, "application_headers") if headers: return headers[name] return None qpidc-0.16/bindings/qmf/tests/run_interop_tests0000775000076400007640000001033611721215323022372 0ustar00jrossjross00000000000000#!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Run the qmf interoperability tests. MY_DIR=`dirname \`which $0\`` QPID_DIR=${MY_DIR}/../../../.. BUILD_DIR=../../.. PYTHON_DIR=${QPID_DIR}/python TOOLS_PY_DIR=${QPID_DIR}/tools/src/py QMF_DIR=${QPID_DIR}/extras/qmf QMF_DIR_PY=${QMF_DIR}/src/py BROKER_DIR=${BUILD_DIR}/src API_DIR=${BUILD_DIR}/bindings/qmf SPEC_DIR=${QPID_DIR}/specs RUBY_LIB_DIR=${API_DIR}/ruby/.libs PYTHON_LIB_DIR=${API_DIR}/python/.libs trap stop_broker INT TERM QUIT start_broker() { ${BROKER_DIR}/qpidd --daemon --port 0 --no-data-dir --no-module-dir --auth no > _qpidd.port BROKER_PORT=`cat _qpidd.port` } stop_broker() { ${BROKER_DIR}/qpidd -q --port $BROKER_PORT echo "Broker stopped" } start_ruby_agent() { ruby -I${MY_DIR}/../ruby -I${RUBY_LIB_DIR} ${MY_DIR}/agent_ruby.rb localhost $BROKER_PORT & AGENT_PID=$! } stop_ruby_agent() { kill $AGENT_PID } start_python_agent() { PYTHONPATH="${MY_DIR}/../python:${API_DIR}/python:${PYTHON_LIB_DIR}" python ${MY_DIR}/python_agent.py localhost $BROKER_PORT & PY_AGENT_PID=$! } stop_python_agent() { kill $PY_AGENT_PID } TESTS_FAILED=0 if test -d ${PYTHON_DIR} ; then start_broker echo "Running qmf interop tests using broker on port $BROKER_PORT" PYTHONPATH=${PYTHON_DIR}:${QMF_DIR_PY}:${MY_DIR}:${TOOLS_PY_DIR} export PYTHONPATH if test -d ${PYTHON_LIB_DIR} ; then echo " Python Agent (external storage) vs. Pure-Python Console" start_python_agent echo " Python agent started at pid $PY_AGENT_PID" ${PYTHON_DIR}/qpid-python-test -m python_console -b localhost:$BROKER_PORT $@ RETCODE=$? stop_python_agent if test x$RETCODE != x0; then echo "FAIL qmf interop tests (Python Agent)"; TESTS_FAILED=1 fi fi if test -d ${RUBY_LIB_DIR} ; then echo " Ruby Agent (external storage) vs. Pure-Python Console" start_ruby_agent echo " Ruby agent started at pid $AGENT_PID" ${PYTHON_DIR}/qpid-python-test -m python_console -b localhost:$BROKER_PORT $@ RETCODE=$? if test x$RETCODE != x0; then echo "FAIL qmf interop tests (Ruby Agent)"; TESTS_FAILED=1 fi echo " Ruby Agent (external storage) vs. Ruby Console" ruby -I${MY_DIR} -I${MY_DIR}/../ruby -I${RUBY_LIB_DIR} ${MY_DIR}/ruby_console_test.rb localhost $BROKER_PORT $@ RETCODE=$? stop_ruby_agent if test x$RETCODE != x0; then echo "FAIL qmf interop tests (Ruby Console/Ruby Agent)"; TESTS_FAILED=1 fi if test -d ${PYTHON_LIB_DIR} ; then echo " Python Agent (external storage) vs. Ruby Console" start_python_agent ruby -I${MY_DIR} -I${MY_DIR}/../ruby -I${RUBY_LIB_DIR} ${MY_DIR}/ruby_console_test.rb localhost $BROKER_PORT $@ RETCODE=$? stop_python_agent if test x$RETCODE != x0; then echo "FAIL qmf interop tests (Ruby Console/Python Agent)"; TESTS_FAILED=1 fi fi fi # Also against the Pure-Python console: # Ruby agent (internal storage) # Python agent (external and internal) # C++ agent (external and internal) # # Other consoles against the same set of agents: # Wrapped Python console # Ruby console # C++ console stop_broker if test x$TESTS_FAILED != x0; then echo "TEST FAILED!" exit 1 fi fi qpidc-0.16/bindings/qmf/tests/python_agent.py0000664000076400007640000003333511422137321021732 0ustar00jrossjross00000000000000#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import qmf import sys import time class Model: # attr_reader :parent_class, :child_class def __init__(self): self.parent_class = qmf.SchemaObjectClass("org.apache.qpid.qmf", "parent") self.parent_class.add_property(qmf.SchemaProperty("name", qmf.TYPE_SSTR, {"index":True})) self.parent_class.add_property(qmf.SchemaProperty("state", qmf.TYPE_SSTR)) self.parent_class.add_property(qmf.SchemaProperty("uint64val", qmf.TYPE_UINT64)) self.parent_class.add_property(qmf.SchemaProperty("uint32val", qmf.TYPE_UINT32)) self.parent_class.add_property(qmf.SchemaProperty("uint16val", qmf.TYPE_UINT16)) self.parent_class.add_property(qmf.SchemaProperty("uint8val", qmf.TYPE_UINT8)) self.parent_class.add_property(qmf.SchemaProperty("int64val", qmf.TYPE_INT64)) self.parent_class.add_property(qmf.SchemaProperty("int32val", qmf.TYPE_INT32)) self.parent_class.add_property(qmf.SchemaProperty("int16val", qmf.TYPE_INT16)) self.parent_class.add_property(qmf.SchemaProperty("int8val", qmf.TYPE_INT8)) self.parent_class.add_property(qmf.SchemaProperty("sstrval", qmf.TYPE_SSTR)) self.parent_class.add_property(qmf.SchemaProperty("lstrval", qmf.TYPE_LSTR)) self.parent_class.add_property(qmf.SchemaProperty("mapval", qmf.TYPE_MAP)) self.parent_class.add_property(qmf.SchemaProperty("listval", qmf.TYPE_LIST)) self.parent_class.add_statistic(qmf.SchemaStatistic("queryCount", qmf.TYPE_UINT32, {"unit":"query", "desc":"Query count"})) _method = qmf.SchemaMethod("echo", {"desc":"Check responsiveness of the agent object"}) _method.add_argument(qmf.SchemaArgument("sequence", qmf.TYPE_UINT32, {"dir":qmf.DIR_IN_OUT})) self.parent_class.add_method(_method) _method = qmf.SchemaMethod("set_numerics", {"desc":"Set the numeric values in the object"}) _method.add_argument(qmf.SchemaArgument("test", qmf.TYPE_SSTR, {"dir":qmf.DIR_IN})) self.parent_class.add_method(_method) _method = qmf.SchemaMethod("test_map_list", {"desc":"A method call that accepts map and list arguments."}) _method.add_argument(qmf.SchemaArgument("inMap", qmf.TYPE_MAP, {"dir":qmf.DIR_IN})) _method.add_argument(qmf.SchemaArgument("inList", qmf.TYPE_LIST, {"dir":qmf.DIR_IN})) _method.add_argument(qmf.SchemaArgument("outMap", qmf.TYPE_MAP, {"dir":qmf.DIR_OUT})) _method.add_argument(qmf.SchemaArgument("outList", qmf.TYPE_LIST, {"dir":qmf.DIR_OUT})) self.parent_class.add_method(_method) _method = qmf.SchemaMethod("set_short_string", {"desc":"Set the short string value in the object"}) _method.add_argument(qmf.SchemaArgument("value", qmf.TYPE_SSTR, {"dir":qmf.DIR_IN_OUT})) self.parent_class.add_method(_method) _method = qmf.SchemaMethod("set_long_string", {"desc":"Set the long string value in the object"}) _method.add_argument(qmf.SchemaArgument("value", qmf.TYPE_LSTR, {"dir":qmf.DIR_IN_OUT})) self.parent_class.add_method(_method) _method = qmf.SchemaMethod("create_child", {"desc":"Create a new child object"}) _method.add_argument(qmf.SchemaArgument("child_name", qmf.TYPE_LSTR, {"dir":qmf.DIR_IN})) _method.add_argument(qmf.SchemaArgument("child_ref", qmf.TYPE_REF, {"dir":qmf.DIR_OUT})) self.parent_class.add_method(_method) _method = qmf.SchemaMethod("probe_userid", {"desc":"Return the user-id for this method call"}) _method.add_argument(qmf.SchemaArgument("userid", qmf.TYPE_SSTR, {"dir":qmf.DIR_OUT})) self.parent_class.add_method(_method) self.child_class = qmf.SchemaObjectClass("org.apache.qpid.qmf", "child") self.child_class.add_property(qmf.SchemaProperty("name", qmf.TYPE_SSTR, {"index":True})) self.event_class = qmf.SchemaEventClass("org.apache.qpid.qmf", "test_event", qmf.SEV_NOTICE) self.event_class.add_argument(qmf.SchemaArgument("uint32val", qmf.TYPE_UINT32)) self.event_class.add_argument(qmf.SchemaArgument("strval", qmf.TYPE_LSTR)) self.event_class.add_argument(qmf.SchemaArgument("mapval", qmf.TYPE_MAP)) self.event_class.add_argument(qmf.SchemaArgument("listval", qmf.TYPE_LIST)) def register(self, agent): agent.register_class(self.parent_class) agent.register_class(self.child_class) agent.register_class(self.event_class) class App(qmf.AgentHandler): ''' Object that handles events received by the Agent. ''' def get_query(self, context, query, userId): ''' Respond to a Query request from a console. ''' #print "Query: user=%s context=%d class=%s" % (userId, context, query.class_name()) #if query.object_id(): # print query.object_id().object_num_low() self._parent.inc_attr("queryCount") if query.class_name() == 'parent': self._agent.query_response(context, self._parent) elif query.object_id() == self._parent_oid: self._agent.query_response(context, self._parent) self._agent.query_complete(context) def method_call(self, context, name, object_id, args, userId): ''' Invoke a method call requested by the console. ''' #print "Method: name=%s user=%s context=%d object_id=%s args=%s" % (name, userId, context, object_id, args) if name == "echo": self._agent.method_response(context, 0, "OK", args) elif name == "test_map_list": # build the output map from the input map, accessing each key, # value to ensure they are encoded/decoded outMap = {} for key,value in args['inMap'].items(): outMap[key] = value # same deal for the output list outList = [] for value in args['inList']: outList.append(value) args['outMap'] = outMap args['outList'] = outList self._agent.method_response(context, 0, "OK", args) elif name == "set_numerics": _retCode = 0 _retText = "OK" if args['test'] == "big": # # note the alternate forms for setting object attributes: # self._parent.set_attr("uint64val", 0x9494949449494949) self._parent.uint32val = 0xa5a55a5a self._parent.set_attr("uint16val", 0xb66b) self._parent["uint8val"] = 0xc7 self._parent.int64val = 1000000000000000000 self._parent.set_attr("int32val", 1000000000) self._parent["int16val"] = 10000 self._parent.set_attr("int8val", 100) event = qmf.QmfEvent(self._model.event_class) event.uint32val = self._parent.get_attr("uint32val") event.strval = "Unused" event.mapval = self._parent.get_attr("mapval") event.listval = self._parent["listval"] self._agent.raise_event(event) ## Test the __getattr__ implementation: ## @todo: remove once python_client implements this ## form of property access assert self._parent["uint8val"] == 0xc7 assert self._parent.uint64val == 0x9494949449494949 # note the alternative argument access syntax: elif args.test == "small": self._parent.set_attr("uint64val", 4) self._parent.set_attr("uint32val", 5) self._parent.set_attr("uint16val", 6) self._parent.set_attr("uint8val", 7) self._parent.set_attr("int64val", 8) self._parent.set_attr("int32val", 9) self._parent.set_attr("int16val", 10) self._parent.set_attr("int8val", 11) event = qmf.QmfEvent(self._model.event_class) event.uint32val = self._parent.uint32val event.strval = "Unused" self._agent.raise_event(event) elif args['test'] == "negative": self._parent.set_attr("uint64val", 0) self._parent.set_attr("uint32val", 0) self._parent.set_attr("uint16val", 0) self._parent.set_attr("uint8val", 0) self._parent.set_attr("int64val", -10000000000) self._parent.set_attr("int32val", -100000) self._parent.set_attr("int16val", -1000) self._parent.set_attr("int8val", -100) event = qmf.QmfEvent(self._model.event_class) event.uint32val = self._parent.uint32val event.strval = "Unused" self._agent.raise_event(event) else: _retCode = 1 _retText = "Invalid argument value for test" self._agent.method_response(context, _retCode, _retText, args) elif name == "set_short_string": self._parent.set_attr('sstrval', args['value']) event = qmf.QmfEvent(self._model.event_class) event.uint32val = 0 event.strval = self._parent.sstrval self._agent.raise_event(event) self._agent.method_response(context, 0, "OK", args) elif name == "set_long_string": self._parent.set_attr('lstrval', args['value']) event = qmf.QmfEvent(self._model.event_class) event.uint32val = 0 event.strval = self._parent.lstrval self._agent.raise_event(event) self._agent.method_response(context, 0, "OK", args) elif name == "create_child": # # Instantiate an object based on the Child Schema Class # _oid = self._agent.alloc_object_id(2) args['child_ref'] = _oid self._child = qmf.AgentObject(self._model.child_class) self._child.set_attr("name", args["child_name"]) self._child.set_object_id(_oid) self._agent.method_response(context, 0, "OK", args) elif name == "probe_userid": args['userid'] = userId self._agent.method_response(context, 0, "OK", args) else: self._agent.method_response(context, 1, "Unimplemented Method: %s" % name, args) def main(self): ''' Agent application's main processing loop. ''' # Connect to the broker self._settings = qmf.ConnectionSettings() self._settings.sendUserId = True if len(sys.argv) > 1: self._settings.host = str(sys.argv[1]) if len(sys.argv) > 2: self._settings.port = int(sys.argv[2]) self._connection = qmf.Connection(self._settings) # Instantiate an Agent to serve me queries and method calls self._agent = qmf.Agent(self, "agent_test_label") # Dynamically define the parent and child schemas, then # register them with the agent self._model = Model() self._model.register(self._agent) # Tell the agent about our connection to the broker self._agent.set_connection(self._connection) # Instantiate and populate an instance of the Parent # Schema Object self._parent = qmf.AgentObject(self._model.parent_class) ## @todo how do we force a test failure? # verify the properties() and statistics() object methods: assert len(self._parent.properties()) == 14 assert len(self._parent.statistics()) == 1 self._parent.set_attr("name", "Parent One") self._parent.set_attr("state", "OPERATIONAL") self._parent.set_attr("uint64val", 0) self._parent.set_attr("uint32val", 0) self._parent.set_attr("uint16val", 0) self._parent.set_attr("uint8val", 0) self._parent.set_attr("int64val", 0) self._parent.set_attr("int32val", 0) self._parent.set_attr("int16val", 0) self._parent.set_attr("int8val", 0) # a list containing a list that contains a map (so there!) self._parent.set_attr("listval", ['a', 1, 'b', -2, ['c', True, 3.1415, {"hi": 10, "lo": 5, "neg": -3}]]) # a default map self._parent.set_attr("mapval", {'aLong' : long(9999999999), 'aInt' : int(54321), 'aSigned' : -666, 'aString' : "A String", 'aFloat' : 3.1415, 'aMap' : {'first' : 1, 'second': 2}, 'aList' : ['x', -1, 'y', 2]}) self._parent_oid = self._agent.alloc_object_id(1) self._parent.set_object_id(self._parent_oid) # Now wait for events arriving on the connection # to the broker... while True: time.sleep(1000) app = App() app.main() qpidc-0.16/bindings/qmf/tests/ruby_console.rb0000775000076400007640000001117711270373156021725 0ustar00jrossjross00000000000000#!/usr/bin/ruby # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # require 'qmf' require 'socket' class App < Qmf::ConsoleHandler def agent_added(agent) puts "AgentAdded: label=#{agent.label} key=#{agent.key}" end def agent_deleted(agent) puts "AgentDeleted: #{agent.label}" end def new_package(package) puts "NewPackage: #{package}" end def new_class(class_key) puts "NewClass: #{class_key}" end def object_update(object, hasProps, hasStats) puts "ObjectUpdate: #{object.object_class.class_name} props=#{hasProps} stats=#{hasStats}" puts " agent-key=#{object.object_id.agent_key}" puts " package=#{object.object_class.package_name}" end def event_received(event); end def agent_heartbeat(agent, timestamp) puts "AgentHeartbeat: #{agent.label} time=#{timestamp/1000000000}" end def method_response(resp); end def broker_info(broker); end def dump_schema packages = @qmfc.packages puts "----- Packages -----" packages.each do |p| puts p puts " ----- Object Classes -----" classes = @qmfc.classes(p) classes.each do |c| puts " #{c.name}" puts " ---- Properties ----" props = c.properties props.each do |prop| puts " #{prop.name}" end puts " ---- Statistics ----" stats = c.statistics stats.each do |stat| puts " #{stat.name}" end puts " ---- Methods ----" methods = c.methods methods.each do |method| puts " #{method.name}" puts " ---- Args ----" args = method.arguments args.each do |arg| puts " #{arg.name}" end end end puts " ----- Event Classes -----" classes = @qmfc.classes(p, Qmf::CLASS_EVENT) classes.each do |c| puts " #{c.name}" puts " ---- Args ----" args = c.arguments args.each do |arg| puts " #{arg.name}" end end end puts "-----" end def main @settings = Qmf::ConnectionSettings.new @settings.host = ARGV[0] if ARGV.size > 0 @settings.port = ARGV[1].to_i if ARGV.size > 1 @connection = Qmf::Connection.new(@settings) @qmfc = Qmf::Console.new(self) @broker = @qmfc.add_connection(@connection) @broker.wait_for_stable ##dump_schema agents = @qmfc.agents() puts "---- Agents ----" agents.each do |a| puts " => #{a.label}" end puts "----" for idx in 0...20 blist = @qmfc.objects(Qmf::Query.new(:class => "broker")) puts "---- Brokers ----" blist.each do |b| puts " ---- Broker ----" puts " systemRef: #{b.systemRef}" puts " port : #{b.port}" puts " uptime : #{b.uptime / 1000000000}" puts " properties : #{b.properties}" puts " statistics : #{b.statistics}" for rep in 0...1 puts " Pinging..." ret = b.echo(45, 'text string') puts " status=#{ret.status} text=#{ret.exception.asString} seq=#{ret.args.sequence} body=#{ret.args.body}" end end puts "----" elist = @qmfc.objects(:package => "org.apache.qpid.broker", :class => "exchange", 'durable' => true) puts "---- Durable Exchanges ----" elist.each do |e| puts "Exchange: #{e.name}" end puts "----" qlist = @qmfc.objects(Qmf::Query.new(:package => "org.apache.qpid.broker", :class => "queue")) puts "---- Queues ----" qlist.each do |q| puts " ---- Queue ----" puts " name : #{q.name}" end puts "----" sleep(5) end sleep(5) puts "Deleting connection..." @qmfc.del_connection(@broker) puts " done" sleep end end app = App.new app.main qpidc-0.16/bindings/qmf/tests/agent_ruby.rb0000775000076400007640000002356611422137321021355 0ustar00jrossjross00000000000000#!/usr/bin/ruby # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # require 'qmf' require 'socket' class Model attr_reader :parent_class, :child_class, :event_class def initialize @parent_class = Qmf::SchemaObjectClass.new("org.apache.qpid.qmf", "parent") @parent_class.add_property(Qmf::SchemaProperty.new("name", Qmf::TYPE_SSTR, :index => true)) @parent_class.add_property(Qmf::SchemaProperty.new("state", Qmf::TYPE_SSTR)) @parent_class.add_property(Qmf::SchemaProperty.new("uint64val", Qmf::TYPE_UINT64)) @parent_class.add_property(Qmf::SchemaProperty.new("uint32val", Qmf::TYPE_UINT32)) @parent_class.add_property(Qmf::SchemaProperty.new("uint16val", Qmf::TYPE_UINT16)) @parent_class.add_property(Qmf::SchemaProperty.new("uint8val", Qmf::TYPE_UINT8)) @parent_class.add_property(Qmf::SchemaProperty.new("int64val", Qmf::TYPE_INT64)) @parent_class.add_property(Qmf::SchemaProperty.new("int32val", Qmf::TYPE_INT32)) @parent_class.add_property(Qmf::SchemaProperty.new("int16val", Qmf::TYPE_INT16)) @parent_class.add_property(Qmf::SchemaProperty.new("int8val", Qmf::TYPE_INT8)) @parent_class.add_property(Qmf::SchemaProperty.new("sstrval", Qmf::TYPE_SSTR)) @parent_class.add_property(Qmf::SchemaProperty.new("lstrval", Qmf::TYPE_LSTR)) @parent_class.add_property(Qmf::SchemaProperty.new("mapval", Qmf::TYPE_MAP)) @parent_class.add_property(Qmf::SchemaProperty.new("listval", Qmf::TYPE_LIST)) @parent_class.add_statistic(Qmf::SchemaStatistic.new("queryCount", Qmf::TYPE_UINT32, :unit => "query", :desc => "Query count")) method = Qmf::SchemaMethod.new("echo", :desc => "Check responsiveness of the agent object") method.add_argument(Qmf::SchemaArgument.new("sequence", Qmf::TYPE_UINT32, :dir => Qmf::DIR_IN_OUT)) @parent_class.add_method(method) method = Qmf::SchemaMethod.new("set_numerics", :desc => "Set the numeric values in the object") method.add_argument(Qmf::SchemaArgument.new("test", Qmf::TYPE_SSTR, :dir => Qmf::DIR_IN)) @parent_class.add_method(method) method = Qmf::SchemaMethod.new("test_map_list", :desc => "A method call that accepts map and list arguments.") method.add_argument(Qmf::SchemaArgument.new("inMap", Qmf::TYPE_MAP, :dir => Qmf::DIR_IN)) method.add_argument(Qmf::SchemaArgument.new("inList", Qmf::TYPE_LIST, :dir => Qmf::DIR_IN)) method.add_argument(Qmf::SchemaArgument.new("outMap", Qmf::TYPE_MAP, :dir => Qmf::DIR_OUT)) method.add_argument(Qmf::SchemaArgument.new("outList", Qmf::TYPE_LIST, :dir => Qmf::DIR_OUT)) @parent_class.add_method(method) method = Qmf::SchemaMethod.new("set_short_string", :desc => "Set the short string value in the object") method.add_argument(Qmf::SchemaArgument.new("value", Qmf::TYPE_SSTR, :dir => Qmf::DIR_IN_OUT)) @parent_class.add_method(method) method = Qmf::SchemaMethod.new("set_long_string", :desc => "Set the long string value in the object") method.add_argument(Qmf::SchemaArgument.new("value", Qmf::TYPE_LSTR, :dir => Qmf::DIR_IN_OUT)) @parent_class.add_method(method) method = Qmf::SchemaMethod.new("create_child", :desc => "Create a new child object") method.add_argument(Qmf::SchemaArgument.new("child_name", Qmf::TYPE_LSTR, :dir => Qmf::DIR_IN)) method.add_argument(Qmf::SchemaArgument.new("child_ref", Qmf::TYPE_REF, :dir => Qmf::DIR_OUT)) @parent_class.add_method(method) method = Qmf::SchemaMethod.new("probe_userid", :desc => "Return the user-id for this method call") method.add_argument(Qmf::SchemaArgument.new("userid", Qmf::TYPE_SSTR, :dir => Qmf::DIR_OUT)) @parent_class.add_method(method) @child_class = Qmf::SchemaObjectClass.new("org.apache.qpid.qmf", "child") @child_class.add_property(Qmf::SchemaProperty.new("name", Qmf::TYPE_SSTR, :index => true)) @event_class = Qmf::SchemaEventClass.new("org.apache.qpid.qmf", "test_event", Qmf::SEV_INFORM) @event_class.add_argument(Qmf::SchemaArgument.new("uint32val", Qmf::TYPE_UINT32)) @event_class.add_argument(Qmf::SchemaArgument.new("strval", Qmf::TYPE_LSTR)) @event_class.add_argument(Qmf::SchemaArgument.new("mapval", Qmf::TYPE_MAP)) @event_class.add_argument(Qmf::SchemaArgument.new("listval", Qmf::TYPE_LIST)) end def register(agent) agent.register_class(@parent_class) agent.register_class(@child_class) agent.register_class(@event_class) end end class App < Qmf::AgentHandler def get_query(context, query, userId) # puts "Query: user=#{userId} context=#{context} class=#{query.class_name} object_num=#{query.object_id if query.object_id}" if query.class_name == 'parent' @agent.query_response(context, @parent) elsif query.object_id == @parent_oid @agent.query_response(context, @parent) end @agent.query_complete(context) end def method_call(context, name, object_id, args, userId) # puts "Method: user=#{userId} context=#{context} method=#{name} object_num=#{object_id if object_id} args=#{args}" retCode = 0 retText = "OK" if name == "echo" @agent.method_response(context, 0, "OK", args) elsif name == "test_map_list" # build the output map from the input map, accessing each key, # value to ensure they are encoded/decoded outMap = {} args['inMap'].each do |k,v| outMap[k] = v end # same deal for the output list outList = [] args['inList'].each do |v| outList << v end args['outMap'] = outMap args['outList'] = outList elsif name == "set_numerics" if args['test'] == "big" @parent.uint64val = 0x9494949449494949 @parent.uint32val = 0xa5a55a5a @parent.uint16val = 0xb66b @parent.uint8val = 0xc7 @parent.int64val = 1000000000000000000 @parent.int32val = 1000000000 @parent.int16val = 10000 @parent.int8val = 100 event = Qmf::QmfEvent.new(@model.event_class) event.uint32val = @parent.uint32val event.strval = "Unused" event.mapval = @parent.mapval event.listval = @parent.listval @agent.raise_event(event) elsif args['test'] == "small" @parent.uint64val = 4 @parent.uint32val = 5 @parent.uint16val = 6 @parent.uint8val = 7 @parent.int64val = 8 @parent.int32val = 9 @parent.int16val = 10 @parent.int8val = 11 event = Qmf::QmfEvent.new(@model.event_class) event.uint32val = @parent.uint32val event.strval = "Unused" @agent.raise_event(event) elsif args['test'] == "negative" @parent.uint64val = 0 @parent.uint32val = 0 @parent.uint16val = 0 @parent.uint8val = 0 @parent.int64val = -10000000000 @parent.int32val = -100000 @parent.int16val = -1000 @parent.int8val = -100 event = Qmf::QmfEvent.new(@model.event_class) event.uint32val = @parent.uint32val event.strval = "Unused" @agent.raise_event(event) else retCode = 1 retText = "Invalid argument value for test" end elsif name == "set_short_string" @parent.sstrval = args['value'] event = Qmf::QmfEvent.new(@model.event_class) event.uint32val = 0 event.strval = @parent.sstrval @agent.raise_event(event) elsif name == "set_long_string" @parent.lstrval = args['value'] event = Qmf::QmfEvent.new(@model.event_class) event.uint32val = 0 event.strval = @parent.lstrval @agent.raise_event(event) elsif name == "create_child" oid = @agent.alloc_object_id(2) args['child_ref'] = oid @child = Qmf::AgentObject.new(@model.child_class) @child.name = args.by_key("child_name") @child.set_object_id(oid) elsif name == "probe_userid" args['userid'] = userId else retCode = 1 retText = "Unimplemented Method: #{name}" end @agent.method_response(context, retCode, retText, args) end def main @settings = Qmf::ConnectionSettings.new @settings.set_attr("host", ARGV[0]) if ARGV.size > 0 @settings.set_attr("port", ARGV[1].to_i) if ARGV.size > 1 @connection = Qmf::Connection.new(@settings) @agent = Qmf::Agent.new(self, "agent_test_label") @model = Model.new @model.register(@agent) @agent.set_connection(@connection) @parent = Qmf::AgentObject.new(@model.parent_class) @parent.name = "Parent One" @parent.state = "OPERATIONAL" @parent.uint64val = 0 @parent.uint32val = 0 @parent.uint16val = 0 @parent.uint8val = 0 @parent.int64val = 0 @parent.int32val = 0 @parent.int16val = 0 @parent.int8val = 0 # a list containing a list that contains a map (so there!) @parent.listval = ['a', 1, 'b', -2, ['c', true, 3.1415, {"hi" => 10, "lo" => 5, "neg" => -3}]] # a default map @parent.mapval = {'aLong' => 9999999999, 'aInt' => 54321, 'aSigned' => -666, 'aString' => "A String", 'aFloat'=> 3.1415, 'aMap' => {"first" => 1, "second" => 2}, 'aList' => ['x', -1, 'y', 2]} @parent_oid = @agent.alloc_object_id(1) @parent.set_object_id(@parent_oid) sleep end end app = App.new app.main qpidc-0.16/bindings/qmf/python/0000775000076400007640000000000011752725721017046 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf/python/qmf.py0000664000076400007640000015223211375542547020214 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # import sys import socket import os import logging from threading import Thread from threading import RLock from threading import Condition import qmfengine from qmfengine import (ACCESS_READ_CREATE, ACCESS_READ_ONLY, ACCESS_READ_WRITE) from qmfengine import (CLASS_EVENT, CLASS_OBJECT) from qmfengine import (DIR_IN, DIR_IN_OUT, DIR_OUT) from qmfengine import (TYPE_ABSTIME, TYPE_ARRAY, TYPE_BOOL, TYPE_DELTATIME, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT16, TYPE_INT32, TYPE_INT64, TYPE_INT8, TYPE_LIST, TYPE_LSTR, TYPE_MAP, TYPE_OBJECT, TYPE_REF, TYPE_SSTR, TYPE_UINT16, TYPE_UINT32, TYPE_UINT64, TYPE_UINT8, TYPE_UUID) from qmfengine import (O_EQ, O_NE, O_LT, O_LE, O_GT, O_GE, O_RE_MATCH, O_RE_NOMATCH, E_NOT, E_AND, E_OR, E_XOR) from qmfengine import (SEV_EMERG, SEV_ALERT, SEV_CRIT, SEV_ERROR, SEV_WARN, SEV_NOTICE, SEV_INFORM, SEV_DEBUG) def qmf_to_native(val): typecode = val.getType() if typecode == TYPE_UINT8: return val.asUint() elif typecode == TYPE_UINT16: return val.asUint() elif typecode == TYPE_UINT32: return val.asUint() elif typecode == TYPE_UINT64: return val.asUint64() elif typecode == TYPE_SSTR: return val.asString() elif typecode == TYPE_LSTR: return val.asString() elif typecode == TYPE_ABSTIME: return val.asInt64() elif typecode == TYPE_DELTATIME: return val.asUint64() elif typecode == TYPE_REF: return ObjectId(val.asObjectId()) elif typecode == TYPE_BOOL: return val.asBool() elif typecode == TYPE_FLOAT: return val.asFloat() elif typecode == TYPE_DOUBLE: return val.asDouble() elif typecode == TYPE_UUID: return val.asUuid() elif typecode == TYPE_INT8: return val.asInt() elif typecode == TYPE_INT16: return val.asInt() elif typecode == TYPE_INT32: return val.asInt() elif typecode == TYPE_INT64: return val.asInt64() elif typecode == TYPE_MAP: return value_to_dict(val) elif typecode == TYPE_LIST: return value_to_list(val) else: # when TYPE_OBJECT logging.error( "Unsupported type for get_attr? '%s'" % str(val.getType()) ) return None def native_to_qmf(target, value): val = None typecode = None if target.__class__ == qmfengine.Value: val = target typecode = val.getType() else: typecode = target val = qmfengine.Value(typecode) if typecode == TYPE_UINT8: val.setUint(value) elif typecode == TYPE_UINT16: val.setUint(value) elif typecode == TYPE_UINT32: val.setUint(value) elif typecode == TYPE_UINT64: val.setUint64(value) elif typecode == TYPE_SSTR: if value: val.setString(value) else: val.setString('') elif typecode == TYPE_LSTR: if value: val.setString(value) else: val.setString('') elif typecode == TYPE_ABSTIME: val.setInt64(value) elif typecode == TYPE_DELTATIME: val.setUint64(value) elif typecode == TYPE_REF: val.setObjectId(value.impl) elif typecode == TYPE_BOOL: val.setBool(value) elif typecode == TYPE_FLOAT: val.setFloat(value) elif typecode == TYPE_DOUBLE: val.setDouble(value) elif typecode == TYPE_UUID: val.setUuid(value) elif typecode == TYPE_INT8: val.setInt(value) elif typecode == TYPE_INT16: val.setInt(value) elif typecode == TYPE_INT32: val.setInt(value) elif typecode == TYPE_INT64: val.setInt64(value) elif typecode == TYPE_MAP: dict_to_value(val, value) elif typecode == TYPE_LIST: list_to_value(val, value) else: # when TYPE_OBJECT logging.error("Unsupported type for get_attr? '%s'" % str(val.getType())) return None return val def pick_qmf_type(value): if value.__class__ == int: if value >= 0: if value < 0x100000000: return TYPE_UINT32 return TYPE_UINT64 else: if value > -0xffffffff: return TYPE_INT32 return TYPE_INT64 if value.__class__ == long: if value >= 0: return TYPE_UINT64 return TYPE_INT64 if value.__class__ == str: if len(value) < 256: return TYPE_SSTR return TYPE_LSTR if value.__class__ == float: return TYPE_DOUBLE if value.__class__ == bool: return TYPE_BOOL if value == None: return TYPE_BOOL if value.__class__ == dict: return TYPE_MAP if value.__class__ == list: return TYPE_LIST raise "QMF type not known for native type %s" % value.__class__ def value_to_dict(val): if not val.isMap(): raise "value_to_dict must be given a map value" mymap = {} for i in range(val.keyCount()): key = val.key(i) mymap[key] = qmf_to_native(val.byKey(key)) return mymap def dict_to_value(val, mymap): for key, value in mymap.items(): if key.__class__ != str: raise "QMF map key must be a string" typecode = pick_qmf_type(value) val.insert(key, native_to_qmf(typecode, value)) def value_to_list(val): mylist = [] if val.isList(): for i in range(val.listItemCount()): mylist.append(qmf_to_native(val.listItem(i))) return mylist #if val.isArray(): # for i in range(val.arrayItemCount()): # mylist.append(qmf_to_native(val.arrayItem(i))) # return mylist raise "value_to_list must be given a list value" def list_to_value(val, mylist): for item in mylist: typecode = pick_qmf_type(item) val.appendToList(native_to_qmf(typecode, item)) ##============================================================================== ## CONNECTION ##============================================================================== class ConnectionSettings(object): #attr_reader :impl def __init__(self, url=None): if url: self.impl = qmfengine.ConnectionSettings(url) else: self.impl = qmfengine.ConnectionSettings() def set_attr(self, key, val): if type(val) == str: _v = qmfengine.Value(TYPE_LSTR) _v.setString(val) elif type(val) == int: _v = qmfengine.Value(TYPE_UINT32) _v.setUint(val) elif type(val) == bool: _v = qmfengine.Value(TYPE_BOOL) _v.setBool(val) else: raise Exception("Argument error: value for attribute '%s' has unsupported type: %s" % ( key, type(val))) good = self.impl.setAttr(key, _v) if not good: raise Exception("Argument error: unsupported attribute '%s'" % key ) def get_attr(self, key): _v = self.impl.getAttr(key) if _v.isString(): return _v.asString() elif _v.isUint(): return _v.asUint() elif _v.isBool(): return _v.asBool() else: raise Exception("Argument error: value for attribute '%s' has unsupported type: %s" % ( key, str(_v.getType()))) def __getattr__(self, name): return self.get_attr(name) def __setattr__(self, name, value): if name == "impl": return super.__setattr__(self, name, value) return self.set_attr(name, value) class ConnectionHandler: def conn_event_connected(self): None def conn_event_disconnected(self, error): None def conn_event_visit(self): None def sess_event_session_closed(self, context, error): None def sess_event_recv(self, context, message): None class Connection(Thread): def __init__(self, settings): Thread.__init__(self) self._lock = RLock() self.impl = qmfengine.ResilientConnection(settings.impl) self._sockEngine, self._sock = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM) self.impl.setNotifyFd(self._sockEngine.fileno()) self._new_conn_handlers = [] self._conn_handlers_to_delete = [] self._conn_handlers = [] self._connected = False self._operational = True self.start() def destroy(self, timeout=None): logging.debug("Destroying Connection...") self._operational = False self.kick() self.join(timeout) logging.debug("... Conn Destroyed!" ) if self.isAlive(): logging.error("Error: Connection thread '%s' is hung..." % self.getName()) def connected(self): return self._connected def kick(self): self.impl.notify() def add_conn_handler(self, handler): self._lock.acquire() try: self._new_conn_handlers.append(handler) finally: self._lock.release() self.kick() def del_conn_handler(self, handler): self._lock.acquire() try: self._conn_handlers_to_delete.append(handler) finally: self._lock.release() self.kick() def run(self): eventImpl = qmfengine.ResilientConnectionEvent() new_handlers = [] del_handlers = [] bt_count = 0 while self._operational: logging.debug("Connection thread waiting for socket data...") self._sock.recv(1) self._lock.acquire() try: new_handlers = self._new_conn_handlers del_handlers = self._conn_handlers_to_delete self._new_conn_handlers = [] self._conn_handlers_to_delete = [] finally: self._lock.release() for nh in new_handlers: self._conn_handlers.append(nh) if self._connected: nh.conn_event_connected() new_handlers = [] for dh in del_handlers: if dh in self._conn_handlers: self._conn_handlers.remove(dh) del_handlers = [] valid = self.impl.getEvent(eventImpl) while valid: try: if eventImpl.kind == qmfengine.ResilientConnectionEvent.CONNECTED: logging.debug("Connection thread: CONNECTED event received.") self._connected = True for h in self._conn_handlers: h.conn_event_connected() elif eventImpl.kind == qmfengine.ResilientConnectionEvent.DISCONNECTED: logging.debug("Connection thread: DISCONNECTED event received.") self._connected = False for h in self._conn_handlers: h.conn_event_disconnected(eventImpl.errorText) elif eventImpl.kind == qmfengine.ResilientConnectionEvent.SESSION_CLOSED: logging.debug("Connection thread: SESSION_CLOSED event received.") eventImpl.sessionContext.handler.sess_event_session_closed(eventImpl.sessionContext, eventImpl.errorText) elif eventImpl.kind == qmfengine.ResilientConnectionEvent.RECV: logging.debug("Connection thread: RECV event received.") eventImpl.sessionContext.handler.sess_event_recv(eventImpl.sessionContext, eventImpl.message) else: logging.debug("Connection thread received unknown event: '%s'" % str(eventImpl.kind)) except: import traceback logging.error( "Exception occurred during Connection event processing:" ) logging.error( str(sys.exc_info()) ) if bt_count < 2: traceback.print_exc() traceback.print_stack() bt_count += 1 self.impl.popEvent() valid = self.impl.getEvent(eventImpl) for h in self._conn_handlers: h.conn_event_visit() logging.debug("Shutting down Connection thread") class Session: def __init__(self, conn, label, handler): self._conn = conn self._label = label self.handler = handler self.handle = qmfengine.SessionHandle() result = self._conn.impl.createSession(label, self, self.handle) def destroy(self): self._conn.impl.destroySession(self.handle) ##============================================================================== ## OBJECTS and EVENTS ##============================================================================== class QmfEvent(object): # attr_reader :impl, :event_class def __init__(self, cls, kwargs={}): self._allow_sets = True if kwargs.has_key("broker"): self._broker = kwargs["broker"] else: self._broker = None if cls: self.event_class = cls self.impl = qmfengine.Event(self.event_class.impl) elif kwargs.has_key("impl"): self.impl = qmfengine.Event(kwargs["impl"]) self.event_class = SchemaEventClass(None, None, 0, {"impl":self.impl.getClass()}) else: raise Exception("Argument error: required parameter ('impl') not supplied") def arguments(self): list = [] for arg in self.event_class.arguments: list.append([arg, self.get_attr(arg.name())]) return list def get_attr(self, name): val = self._value(name) return qmf_to_native(val) def set_attr(self, name, v): val = self._value(name) native_to_qmf(val, v) def __getitem__(self, name): return self.get_attr(name) def __setitem__(self, name, value): self.set_attr(name, value) def __setattr__(self, name, value): # # Ignore the internal attributes, set them normally... # if (name[0] == '_' or name == 'impl' or name == 'event_class'): return super.__setattr__(self, name, value) if not self._allow_sets: raise Exception("'Set' operations not permitted on this object") # # If the name matches an argument name, set the value of the argument. # # print "set name=%s" % str(name) for arg in self.event_class.arguments: if arg.name() == name: return self.set_attr(name, value) # unrecognized name? should I raise an exception? super.__setattr__(self, name, value) def __getattr__(self, name, *args): # # If the name matches an argument name, return the value of the argument. # for arg in self.event_class.arguments: if arg.name() == name: return self.get_attr(name) # # This name means nothing to us, pass it up the line to the parent # class's handler. # # print "__getattr__=%s" % str(name) super.__getattr__(self, name) def _value(self, name): val = self.impl.getValue(name) if not val: raise Exception("Argument error: attribute named '%s' not defined for package %s, class %s" % (name, self.event_class.impl.getClassKey().getPackageName(), self.event_class.impl.getClassKey().getClassName())) return val class QmfObject(object): # attr_reader :impl, :object_class def __init__(self, cls, kwargs={}): self._cv = Condition() self._sync_count = 0 self._sync_result = None self._allow_sets = False if kwargs.has_key("broker"): self._broker = kwargs["broker"] else: self._broker = None if cls: self.object_class = cls self.impl = qmfengine.Object(self.object_class.impl) elif kwargs.has_key("impl"): self.impl = qmfengine.Object(kwargs["impl"]) self.object_class = SchemaObjectClass(None, None, {"impl":self.impl.getClass()}) else: raise Exception("Argument error: required parameter ('impl') not supplied") def destroy(self): self.impl.destroy() def object_id(self): return ObjectId(self.impl.getObjectId()) def set_object_id(self, oid): self.impl.setObjectId(oid.impl) def properties(self): list = [] for prop in self.object_class.properties: list.append([prop, self.get_attr(prop.name())]) return list def statistics(self): list = [] for stat in self.object_class.statistics: list.append([stat, self.get_attr(stat.name())]) return list def get_attr(self, name): val = self._value(name) return qmf_to_native(val) def set_attr(self, name, v): val = self._value(name) native_to_qmf(val, v) def __getitem__(self, name): return self.get_attr(name) def __setitem__(self, name, value): self.set_attr(name, value) def inc_attr(self, name, by=1): self.set_attr(name, self.get_attr(name) + by) def dec_attr(self, name, by=1): self.set_attr(name, self.get_attr(name) - by) def __setattr__(self, name, value): # # Ignore the internal attributes, set them normally... # if (name[0] == '_' or name == 'impl' or name == 'object_class'): return super.__setattr__(self, name, value) if not self._allow_sets: raise Exception("'Set' operations not permitted on this object") # # If the name matches a property name, set the value of the property. # # print "set name=%s" % str(name) for prop in self.object_class.properties: if prop.name() == name: return self.set_attr(name, value) # # otherwise, check for a statistic set... # for stat in self.object_class.statistics: if stat.name() == name: return self.set_attr(name, value) # unrecognized name? should I raise an exception? super.__setattr__(self, name, value) def __getattr__(self, name, *args): # # If the name matches a property name, return the value of the property. # for prop in self.object_class.properties: if prop.name() == name: return self.get_attr(name) # # Do the same for statistics # for stat in self.object_class.statistics: if stat.name() == name: return self.get_attr(name) # # If we still haven't found a match for the name, check to see if # it matches a method name. If so, marshall up the arguments into # a map, and invoke the method. # for method in self.object_class.methods: if method.name() == name: argMap = self._marshall(method, args) return lambda name, argMap : self._invokeMethod(name, argMap) # # This name means nothing to us, pass it up the line to the parent # class's handler. # # print "__getattr__=%s" % str(name) super.__getattr__(self, name) def _invokeMethod(self, name, argMap): """ Private: Helper function that invokes an object's method, and waits for the result. """ self._cv.acquire() try: timeout = 30 self._sync_count = 1 self.impl.invokeMethod(name, argMap, self) if self._broker: self._broker.conn.kick() self._cv.wait(timeout) if self._sync_count == 1: raise Exception("Timed out: waiting for response to method call.") finally: self._cv.release() return self._sync_result def _method_result(self, result): """ Called to return the result of a method call on an object """ self._cv.acquire(); try: self._sync_result = result self._sync_count -= 1 self._cv.notify() finally: self._cv.release() def _marshall(schema, args): ''' Private: Convert a list of arguments (positional) into a Value object of type "map". Used to create the argument parameter for an object's method invokation. ''' # Build a map of the method's arguments map = qmfengine.Value(TYPE_MAP) for arg in schema.arguments: if arg.direction == DIR_IN or arg.direction == DIR_IN_OUT: map.insert(arg.name, qmfengine.Value(arg.typecode)) # install each argument's value into the map marshalled = Arguments(map) idx = 0 for arg in schema.arguments: if arg.direction == DIR_IN or arg.direction == DIR_IN_OUT: if args[idx]: marshalled[arg.name] = args[idx] idx += 1 return marshalled.map def _value(self, name): val = self.impl.getValue(name) if not val: raise Exception("Argument error: attribute named '%s' not defined for package %s, class %s" % (name, self.object_class.impl.getClassKey().getPackageName(), self.object_class.impl.getClassKey().getClassName())) return val class AgentObject(QmfObject): def __init__(self, cls, kwargs={}): QmfObject.__init__(self, cls, kwargs) self._allow_sets = True def destroy(self): self.impl.destroy() def set_object_id(self, oid): self.impl.setObjectId(oid.impl) class ConsoleObject(QmfObject): # attr_reader :current_time, :create_time, :delete_time def __init__(self, cls, kwargs={}): QmfObject.__init__(self, cls, kwargs) def update(self): if not self._broker: raise Exception("No linkage to broker") newer = self._broker.console.objects(Query({"object_id":object_id})) if newer.size != 1: raise Exception("Expected exactly one update for this object, %d present" % int(newer.size)) self.merge_update(newer[0]) def merge_update(self, newObject): self.impl.merge(new_object.impl) def is_deleted(self): return self.impl.isDeleted() def key(self): pass class ObjectId: def __init__(self, impl=None): if impl: self.impl = impl else: self.impl = qmfengine.ObjectId() self.agent_key = "%d.%d" % (self.impl.getBrokerBank(), self.impl.getAgentBank()) def object_num_high(self): return self.impl.getObjectNumHi() def object_num_low(self): return self.impl.getObjectNumLo() def agent_key(self): self.agent_key def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.impl == other.impl def __ne__(self, other): return not self.__eq__(other) def __repr__(self): return self.impl.str() class Arguments(object): def __init__(self, map): self.map = map self._by_hash = {} key_count = self.map.keyCount() a = 0 while a < key_count: key = self.map.key(a) self._by_hash[key] = qmf_to_native(self.map.byKey(key)) a += 1 def __getitem__(self, key): return self._by_hash[key] def __setitem__(self, key, value): self._by_hash[key] = value self.set(key, value) def __iter__(self): return self._by_hash.__iter__ def __getattr__(self, name): if name in self._by_hash: return self._by_hash[name] return super.__getattr__(self, name) def __setattr__(self, name, value): # # ignore local data members # if (name[0] == '_' or name == 'map'): return super.__setattr__(self, name, value) if name in self._by_hash: self._by_hash[name] = value return self.set(name, value) return super.__setattr__(self, name, value) def set(self, key, value): val = self.map.byKey(key) native_to_qmf(val, value) class MethodResponse(object): def __init__(self, impl): self.impl = qmfengine.MethodResponse(impl) def status(self): return self.impl.getStatus() def exception(self): return self.impl.getException() def text(self): return exception().asString() def args(self): return Arguments(self.impl.getArgs()) def __getattr__(self, name): myArgs = self.args() return myArgs.__getattr__(name) def __setattr__(self, name, value): if name == 'impl': return super.__setattr__(self, name, value) myArgs = self.args() return myArgs.__setattr__(name, value) ##============================================================================== ## QUERY ##============================================================================== class Query: def __init__(self, kwargs={}): if "impl" in kwargs: self.impl = kwargs["impl"] else: package = '' if "key" in kwargs: # construct using SchemaClassKey: self.impl = qmfengine.Query(kwargs["key"]) elif "object_id" in kwargs: self.impl = qmfengine.Query(kwargs["object_id"].impl) else: if "package" in kwargs: package = kwargs["package"] if "class" in kwargs: self.impl = qmfengine.Query(kwargs["class"], package) else: raise Exception("Argument error: invalid arguments, use 'key', 'object_id' or 'class'[,'package']") def package_name(self): return self.impl.getPackage() def class_name(self): return self.impl.getClass() def object_id(self): _objid = self.impl.getObjectId() if _objid: return ObjectId(_objid) else: return None ##============================================================================== ## SCHEMA ##============================================================================== class SchemaArgument: #attr_reader :impl def __init__(self, name, typecode, kwargs={}): if "impl" in kwargs: self.impl = kwargs["impl"] else: self.impl = qmfengine.SchemaArgument(name, typecode) if kwargs.has_key("dir"): self.impl.setDirection(kwargs["dir"]) if kwargs.has_key("unit"): self.impl.setUnit(kwargs["unit"]) if kwargs.has_key("desc"): self.impl.setDesc(kwargs["desc"]) def name(self): return self.impl.getName() def direction(self): return self.impl.getDirection() def typecode(self): return self.impl.getType() def __repr__(self): return self.name() class SchemaMethod: # attr_reader :impl, arguments def __init__(self, name, kwargs={}): self.arguments = [] if "impl" in kwargs: self.impl = kwargs["impl"] for i in range(self.impl.getArgumentCount()): self.arguments.append(SchemaArgument(None,None,{"impl":self.impl.getArgument(i)})) else: self.impl = qmfengine.SchemaMethod(name) if kwargs.has_key("desc"): self.impl.setDesc(kwargs["desc"]) def add_argument(self, arg): self.arguments.append(arg) self.impl.addArgument(arg.impl) def name(self): return self.impl.getName() def __repr__(self): return self.name() class SchemaProperty: #attr_reader :impl def __init__(self, name, typecode, kwargs={}): if "impl" in kwargs: self.impl = kwargs["impl"] else: self.impl = qmfengine.SchemaProperty(name, typecode) if kwargs.has_key("access"): self.impl.setAccess(kwargs["access"]) if kwargs.has_key("index"): self.impl.setIndex(kwargs["index"]) if kwargs.has_key("optional"): self.impl.setOptional(kwargs["optional"]) if kwargs.has_key("unit"): self.impl.setUnit(kwargs["unit"]) if kwargs.has_key("desc"): self.impl.setDesc(kwargs["desc"]) def name(self): return self.impl.getName() def __repr__(self): return self.name() class SchemaStatistic: # attr_reader :impl def __init__(self, name, typecode, kwargs={}): if "impl" in kwargs: self.impl = kwargs["impl"] else: self.impl = qmfengine.SchemaStatistic(name, typecode) if kwargs.has_key("unit"): self.impl.setUnit(kwargs["unit"]) if kwargs.has_key("desc"): self.impl.setDesc(kwargs["desc"]) def name(self): return self.impl.getName() def __repr__(self): return self.name() class SchemaClassKey: #attr_reader :impl def __init__(self, i): self.impl = i def package_name(self): return self.impl.getPackageName() def class_name(self): return self.impl.getClassName() def __repr__(self): return self.impl.asString() class SchemaObjectClass: # attr_reader :impl, :properties, :statistics, :methods def __init__(self, package, name, kwargs={}): self.properties = [] self.statistics = [] self.methods = [] if "impl" in kwargs: self.impl = kwargs["impl"] for i in range(self.impl.getPropertyCount()): self.properties.append(SchemaProperty(None, None, {"impl":self.impl.getProperty(i)})) for i in range(self.impl.getStatisticCount()): self.statistics.append(SchemaStatistic(None, None, {"impl":self.impl.getStatistic(i)})) for i in range(self.impl.getMethodCount()): self.methods.append(SchemaMethod(None, {"impl":self.impl.getMethod(i)})) else: self.impl = qmfengine.SchemaObjectClass(package, name) def add_property(self, prop): self.properties.append(prop) self.impl.addProperty(prop.impl) def add_statistic(self, stat): self.statistics.append(stat) self.impl.addStatistic(stat.impl) def add_method(self, meth): self.methods.append(meth) self.impl.addMethod(meth.impl) def class_key(self): return SchemaClassKey(self.impl.getClassKey()) def package_name(self): return self.impl.getClassKey().getPackageName() def class_name(self): return self.impl.getClassKey().getClassName() class SchemaEventClass: # attr_reader :impl :arguments def __init__(self, package, name, sev, kwargs={}): self.arguments = [] if "impl" in kwargs: self.impl = kwargs["impl"] for i in range(self.impl.getArgumentCount()): self.arguments.append(SchemaArgument(nil, nil, {"impl":self.impl.getArgument(i)})) else: self.impl = qmfengine.SchemaEventClass(package, name, sev) if kwargs.has_key("desc"): self.impl.setDesc(kwargs["desc"]) def add_argument(self, arg): self.arguments.append(arg) self.impl.addArgument(arg.impl) def name(self): return self.impl.getClassKey().getClassName() def class_key(self): return SchemaClassKey(self.impl.getClassKey()) def package_name(self): return self.impl.getClassKey().getPackageName() def class_name(self): return self.impl.getClassKey().getClassName() ##============================================================================== ## CONSOLE ##============================================================================== class ConsoleHandler: def agent_added(self, agent): pass def agent_deleted(self, agent): pass def new_package(self, package): pass def new_class(self, class_key): pass def object_update(self, obj, hasProps, hasStats): pass def event_received(self, event): pass def agent_heartbeat(self, agent, timestamp): pass def method_response(self, resp): pass def broker_info(self, broker): pass class Console(Thread): # attr_reader :impl def __init__(self, handler=None, kwargs={}): Thread.__init__(self) self._handler = handler self.impl = qmfengine.Console() self._event = qmfengine.ConsoleEvent() self._broker_list = [] self._cv = Condition() self._sync_count = 0 self._sync_result = None self._select = {} self._cb_cond = Condition() self._operational = True self.start() def destroy(self, timeout=None): logging.debug("Destroying Console...") self._operational = False self.start_console_events() # wake thread up self.join(timeout) logging.debug("... Console Destroyed!") if self.isAlive(): logging.error( "Console thread '%s' is hung..." % self.getName() ) def add_connection(self, conn): broker = Broker(self, conn) self._cv.acquire() try: self._broker_list.append(broker) finally: self._cv.release() return broker def del_connection(self, broker): logging.debug("shutting down broker...") broker.shutdown() logging.debug("...broker down.") self._cv.acquire() try: self._broker_list.remove(broker) finally: self._cv.release() logging.debug("del_connection() finished") def packages(self): plist = [] for i in range(self.impl.packageCount()): plist.append(self.impl.getPackageName(i)) return plist def classes(self, package, kind=CLASS_OBJECT): clist = [] for i in range(self.impl.classCount(package)): key = self.impl.getClass(package, i) class_kind = self.impl.getClassKind(key) if class_kind == kind: if kind == CLASS_OBJECT: clist.append(SchemaObjectClass(None, None, {"impl":self.impl.getObjectClass(key)})) elif kind == CLASS_EVENT: clist.append(SchemaEventClass(None, None, 0, {"impl":self.impl.getEventClass(key)})) return clist def bind_package(self, package): return self.impl.bindPackage(package) def bind_class(self, kwargs = {}): if "key" in kwargs: self.impl.bindClass(kwargs["key"]) elif "package" in kwargs: package = kwargs["package"] if "class" in kwargs: self.impl.bindClass(package, kwargs["class"]) else: self.impl.bindClass(package, "*") else: raise Exception("Argument error: invalid arguments, use 'key' or 'package'[,'class']") def bind_event(self, kwargs = {}): if "key" in kwargs: self.impl.bindEvent(kwargs["key"]) elif "package" in kwargs: package = kwargs["package"] if "event" in kwargs: self.impl.bindEvent(package, kwargs["event"]) else: self.impl.bindEvent(package, "*") else: raise Exception("Argument error: invalid arguments, use 'key' or 'package'[,'event']") def agents(self, broker=None): blist = [] if broker: blist.append(broker) else: self._cv.acquire() try: # copy while holding lock blist = self._broker_list[:] finally: self._cv.release() agents = [] for b in blist: for idx in range(b.impl.agentCount()): agents.append(AgentProxy(b.impl.getAgent(idx), b)) return agents def objects(self, query, kwargs = {}): timeout = 30 agent = None temp_args = kwargs.copy() if type(query) == type({}): temp_args.update(query) if "_timeout" in temp_args: timeout = temp_args["_timeout"] temp_args.pop("_timeout") if "_agent" in temp_args: agent = temp_args["_agent"] temp_args.pop("_agent") if type(query) == type({}): query = Query(temp_args) self._select = {} for k in temp_args.iterkeys(): if type(k) == str: self._select[k] = temp_args[k] self._cv.acquire() try: self._sync_count = 1 self._sync_result = [] broker = self._broker_list[0] broker.send_query(query.impl, None, agent) self._cv.wait(timeout) if self._sync_count == 1: raise Exception("Timed out: waiting for query response") finally: self._cv.release() return self._sync_result def object(self, query, kwargs = {}): ''' Return one and only one object or None. ''' objs = objects(query, kwargs) if len(objs) == 1: return objs[0] else: return None def first_object(self, query, kwargs = {}): ''' Return the first of potentially many objects. ''' objs = objects(query, kwargs) if objs: return objs[0] else: return None # Check the object against select to check for a match def _select_match(self, object): schema_props = object.properties() for key in self._select.iterkeys(): for prop in schema_props: if key == p[0].name() and self._select[key] != p[1]: return False return True def _get_result(self, list, context): ''' Called by Broker proxy to return the result of a query. ''' self._cv.acquire() try: for item in list: if self._select_match(item): self._sync_result.append(item) self._sync_count -= 1 self._cv.notify() finally: self._cv.release() def start_sync(self, query): pass def touch_sync(self, sync): pass def end_sync(self, sync): pass def run(self): while self._operational: self._cb_cond.acquire() try: self._cb_cond.wait(1) while self._do_console_events(): pass finally: self._cb_cond.release() logging.debug("Shutting down Console thread") def start_console_events(self): self._cb_cond.acquire() try: self._cb_cond.notify() finally: self._cb_cond.release() def _do_console_events(self): ''' Called by the Console thread to poll for events. Passes the events onto the ConsoleHandler associated with this Console. Is called periodically, but can also be kicked by Console.start_console_events(). ''' count = 0 valid = self.impl.getEvent(self._event) while valid: count += 1 try: if self._event.kind == qmfengine.ConsoleEvent.AGENT_ADDED: logging.debug("Console Event AGENT_ADDED received") if self._handler: self._handler.agent_added(AgentProxy(self._event.agent, None)) elif self._event.kind == qmfengine.ConsoleEvent.AGENT_DELETED: logging.debug("Console Event AGENT_DELETED received") if self._handler: self._handler.agent_deleted(AgentProxy(self._event.agent, None)) elif self._event.kind == qmfengine.ConsoleEvent.NEW_PACKAGE: logging.debug("Console Event NEW_PACKAGE received") if self._handler: self._handler.new_package(self._event.name) elif self._event.kind == qmfengine.ConsoleEvent.NEW_CLASS: logging.debug("Console Event NEW_CLASS received") if self._handler: self._handler.new_class(SchemaClassKey(self._event.classKey)) elif self._event.kind == qmfengine.ConsoleEvent.OBJECT_UPDATE: logging.debug("Console Event OBJECT_UPDATE received") if self._handler: self._handler.object_update(ConsoleObject(None, {"impl":self._event.object}), self._event.hasProps, self._event.hasStats) elif self._event.kind == qmfengine.ConsoleEvent.EVENT_RECEIVED: logging.debug("Console Event EVENT_RECEIVED received") elif self._event.kind == qmfengine.ConsoleEvent.AGENT_HEARTBEAT: logging.debug("Console Event AGENT_HEARTBEAT received") if self._handler: self._handler.agent_heartbeat(AgentProxy(self._event.agent, None), self._event.timestamp) elif self._event.kind == qmfengine.ConsoleEvent.METHOD_RESPONSE: logging.debug("Console Event METHOD_RESPONSE received") else: logging.debug("Console thread received unknown event: '%s'" % str(self._event.kind)) except e: print "Exception caught in callback thread:", e self.impl.popEvent() valid = self.impl.getEvent(self._event) return count class AgentProxy: # attr_reader :broker def __init__(self, impl, broker): self.impl = impl self.broker = broker self.key = "%d.%d" % (self.impl.getBrokerBank(), self.impl.getAgentBank()) def label(self): return self.impl.getLabel() def key(self): return self.key class Broker(ConnectionHandler): # attr_reader :impl :conn, :console, :broker_bank def __init__(self, console, conn): self.broker_bank = 1 self.console = console self.conn = conn self._session = None self._cv = Condition() self._stable = None self._event = qmfengine.BrokerEvent() self._xmtMessage = qmfengine.Message() self.impl = qmfengine.BrokerProxy(self.console.impl) self.console.impl.addConnection(self.impl, self) self.conn.add_conn_handler(self) self._operational = True def shutdown(self): logging.debug("broker.shutdown() called.") self.console.impl.delConnection(self.impl) self.conn.del_conn_handler(self) if self._session: self.impl.sessionClosed() logging.debug("broker.shutdown() sessionClosed done.") self._session.destroy() logging.debug("broker.shutdown() session destroy done.") self._session = None self._operational = False logging.debug("broker.shutdown() done.") def wait_for_stable(self, timeout = None): self._cv.acquire() try: if self._stable: return if timeout: self._cv.wait(timeout) if not self._stable: raise Exception("Timed out: waiting for broker connection to become stable") else: while not self._stable: self._cv.wait() finally: self._cv.release() def send_query(self, query, ctx, agent): agent_impl = None if agent: agent_impl = agent.impl self.impl.sendQuery(query, ctx, agent_impl) self.conn.kick() def _do_broker_events(self): count = 0 valid = self.impl.getEvent(self._event) while valid: count += 1 if self._event.kind == qmfengine.BrokerEvent.BROKER_INFO: logging.debug("Broker Event BROKER_INFO received"); elif self._event.kind == qmfengine.BrokerEvent.DECLARE_QUEUE: logging.debug("Broker Event DECLARE_QUEUE received"); self.conn.impl.declareQueue(self._session.handle, self._event.name) elif self._event.kind == qmfengine.BrokerEvent.DELETE_QUEUE: logging.debug("Broker Event DELETE_QUEUE received"); self.conn.impl.deleteQueue(self._session.handle, self._event.name) elif self._event.kind == qmfengine.BrokerEvent.BIND: logging.debug("Broker Event BIND received"); self.conn.impl.bind(self._session.handle, self._event.exchange, self._event.name, self._event.bindingKey) elif self._event.kind == qmfengine.BrokerEvent.UNBIND: logging.debug("Broker Event UNBIND received"); self.conn.impl.unbind(self._session.handle, self._event.exchange, self._event.name, self._event.bindingKey) elif self._event.kind == qmfengine.BrokerEvent.SETUP_COMPLETE: logging.debug("Broker Event SETUP_COMPLETE received"); self.impl.startProtocol() elif self._event.kind == qmfengine.BrokerEvent.STABLE: logging.debug("Broker Event STABLE received"); self._cv.acquire() try: self._stable = True self._cv.notify() finally: self._cv.release() elif self._event.kind == qmfengine.BrokerEvent.QUERY_COMPLETE: result = [] for idx in range(self._event.queryResponse.getObjectCount()): result.append(ConsoleObject(None, {"impl":self._event.queryResponse.getObject(idx), "broker":self})) self.console._get_result(result, self._event.context) elif self._event.kind == qmfengine.BrokerEvent.METHOD_RESPONSE: obj = self._event.context obj._method_result(MethodResponse(self._event.methodResponse())) self.impl.popEvent() valid = self.impl.getEvent(self._event) return count def _do_broker_messages(self): count = 0 valid = self.impl.getXmtMessage(self._xmtMessage) while valid: count += 1 logging.debug("Broker: sending msg on connection") self.conn.impl.sendMessage(self._session.handle, self._xmtMessage) self.impl.popXmt() valid = self.impl.getXmtMessage(self._xmtMessage) return count def _do_events(self): while True: self.console.start_console_events() bcnt = self._do_broker_events() mcnt = self._do_broker_messages() if bcnt == 0 and mcnt == 0: break; def conn_event_connected(self): logging.debug("Broker: Connection event CONNECTED") self._session = Session(self.conn, "qmfc-%s.%d" % (socket.gethostname(), os.getpid()), self) self.impl.sessionOpened(self._session.handle) self._do_events() def conn_event_disconnected(self, error): logging.debug("Broker: Connection event DISCONNECTED") pass def conn_event_visit(self): self._do_events() def sess_event_session_closed(self, context, error): logging.debug("Broker: Session event CLOSED") self.impl.sessionClosed() def sess_event_recv(self, context, message): logging.debug("Broker: Session event MSG_RECV") if not self._operational: logging.warning("Unexpected session event message received by Broker proxy: context='%s'" % str(context)) self.impl.handleRcvMessage(message) self._do_events() ##============================================================================== ## AGENT ##============================================================================== class AgentHandler: def get_query(self, context, query, userId): None def method_call(self, context, name, object_id, args, userId): None class Agent(ConnectionHandler): def __init__(self, handler, label=""): if label == "": self._agentLabel = "rb-%s.%d" % (socket.gethostname(), os.getpid()) else: self._agentLabel = label self._conn = None self._handler = handler self.impl = qmfengine.Agent(self._agentLabel) self._event = qmfengine.AgentEvent() self._xmtMessage = qmfengine.Message() def set_connection(self, conn): self._conn = conn self._conn.add_conn_handler(self) def register_class(self, cls): self.impl.registerClass(cls.impl) def alloc_object_id(self, low = 0, high = 0): return ObjectId(self.impl.allocObjectId(low, high)) def raise_event(self, event): self.impl.raiseEvent(event.impl) def query_response(self, context, obj): self.impl.queryResponse(context, obj.impl) def query_complete(self, context): self.impl.queryComplete(context) def method_response(self, context, status, text, arguments): self.impl.methodResponse(context, status, text, arguments.map) def do_agent_events(self): count = 0 valid = self.impl.getEvent(self._event) while valid: count += 1 if self._event.kind == qmfengine.AgentEvent.GET_QUERY: self._handler.get_query(self._event.sequence, Query({"impl":self._event.query}), self._event.authUserId) elif self._event.kind == qmfengine.AgentEvent.START_SYNC: pass elif self._event.kind == qmfengine.AgentEvent.END_SYNC: pass elif self._event.kind == qmfengine.AgentEvent.METHOD_CALL: args = Arguments(self._event.arguments) self._handler.method_call(self._event.sequence, self._event.name, ObjectId(self._event.objectId), args, self._event.authUserId) elif self._event.kind == qmfengine.AgentEvent.DECLARE_QUEUE: self._conn.impl.declareQueue(self._session.handle, self._event.name) elif self._event.kind == qmfengine.AgentEvent.DELETE_QUEUE: self._conn.impl.deleteQueue(self._session.handle, self._event.name) elif self._event.kind == qmfengine.AgentEvent.BIND: self._conn.impl.bind(self._session.handle, self._event.exchange, self._event.name, self._event.bindingKey) elif self._event.kind == qmfengine.AgentEvent.UNBIND: self._conn.impl.unbind(self._session.handle, self._event.exchange, self._event.name, self._event.bindingKey) elif self._event.kind == qmfengine.AgentEvent.SETUP_COMPLETE: self.impl.startProtocol() self.impl.popEvent() valid = self.impl.getEvent(self._event) return count def do_agent_messages(self): count = 0 valid = self.impl.getXmtMessage(self._xmtMessage) while valid: count += 1 self._conn.impl.sendMessage(self._session.handle, self._xmtMessage) self.impl.popXmt() valid = self.impl.getXmtMessage(self._xmtMessage) return count def do_events(self): while True: ecnt = self.do_agent_events() mcnt = self.do_agent_messages() if ecnt == 0 and mcnt == 0: break def conn_event_connected(self): logging.debug("Agent Connection Established...") self._session = Session(self._conn, "qmfa-%s.%d" % (socket.gethostname(), os.getpid()), self) self.impl.newSession() self.do_events() def conn_event_disconnected(self, error): logging.debug("Agent Connection Lost") pass def conn_event_visit(self): self.do_events() def sess_event_session_closed(self, context, error): logging.debug("Agent Session Lost") pass def sess_event_recv(self, context, message): self.impl.handleRcvMessage(message) self.do_events() qpidc-0.16/bindings/qmf/python/Makefile.in0000664000076400007640000005664311752725661021134 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings/qmf/python DIST_COMMON = $(am__qengine_PYTHON_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pylibdir)" "$(DESTDIR)$(qenginedir)" LTLIBRARIES = $(pylib_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_PYTHON_DEVEL_TRUE@_qmfengine_la_DEPENDENCIES = \ @HAVE_PYTHON_DEVEL_TRUE@ $(am__DEPENDENCIES_1) \ @HAVE_PYTHON_DEVEL_TRUE@ $(top_builddir)/src/libqmf.la @HAVE_PYTHON_DEVEL_TRUE@nodist__qmfengine_la_OBJECTS = \ @HAVE_PYTHON_DEVEL_TRUE@ _qmfengine_la-qmfengine.lo _qmfengine_la_OBJECTS = $(nodist__qmfengine_la_OBJECTS) _qmfengine_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(_qmfengine_la_CXXFLAGS) \ $(CXXFLAGS) $(_qmfengine_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_PYTHON_DEVEL_TRUE@am__qmfengine_la_rpath = -rpath $(pylibdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist__qmfengine_la_SOURCES) DIST_SOURCES = am__qengine_PYTHON_DIST = qmfengine.py qmf.py py_compile = $(top_srcdir)/build-aux/py-compile ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_PYTHON_DEVEL_TRUE@INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src/qmf -I$(top_srcdir)/src -I$(top_builddir)/src @HAVE_PYTHON_DEVEL_TRUE@generated_file_list = \ @HAVE_PYTHON_DEVEL_TRUE@ qmfengine.cpp \ @HAVE_PYTHON_DEVEL_TRUE@ qmfengine.py @HAVE_PYTHON_DEVEL_TRUE@EXTRA_DIST = CMakeLists.txt python.i @HAVE_PYTHON_DEVEL_TRUE@BUILT_SOURCES = $(generated_file_list) @HAVE_PYTHON_DEVEL_TRUE@SWIG_FLAGS = -w362,401 @HAVE_PYTHON_DEVEL_TRUE@pylibdir = $(pyexecdir) @HAVE_PYTHON_DEVEL_TRUE@pylib_LTLIBRARIES = _qmfengine.la @HAVE_PYTHON_DEVEL_TRUE@qenginedir = $(pythondir) @HAVE_PYTHON_DEVEL_TRUE@qengine_PYTHON = qmfengine.py qmf.py #_qmfengine_la_LDFLAGS = -avoid-version -module -shrext "$(PYTHON_SO)" #_qmfengine_la_LDFLAGS = -avoid-version -module -shrext ".so" @HAVE_PYTHON_DEVEL_TRUE@_qmfengine_la_LDFLAGS = -avoid-version -module -shared @HAVE_PYTHON_DEVEL_TRUE@_qmfengine_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmf.la @HAVE_PYTHON_DEVEL_TRUE@_qmfengine_la_CXXFLAGS = $(INCLUDES) -I$(srcdir)/qmf $(PYTHON_CFLAGS) -fno-strict-aliasing @HAVE_PYTHON_DEVEL_TRUE@nodist__qmfengine_la_SOURCES = qmfengine.cpp @HAVE_PYTHON_DEVEL_TRUE@CLEANFILES = $(generated_file_list) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qmf/python/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qmf/python/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 $(am__aclocal_m4_deps): install-pylibLTLIBRARIES: $(pylib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pylibdir)" || $(MKDIR_P) "$(DESTDIR)$(pylibdir)" @list='$(pylib_LTLIBRARIES)'; test -n "$(pylibdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pylibdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pylibdir)"; \ } uninstall-pylibLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(pylib_LTLIBRARIES)'; test -n "$(pylibdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pylibdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pylibdir)/$$f"; \ done clean-pylibLTLIBRARIES: -test -z "$(pylib_LTLIBRARIES)" || rm -f $(pylib_LTLIBRARIES) @list='$(pylib_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 _qmfengine.la: $(_qmfengine_la_OBJECTS) $(_qmfengine_la_DEPENDENCIES) $(_qmfengine_la_LINK) $(am__qmfengine_la_rpath) $(_qmfengine_la_OBJECTS) $(_qmfengine_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/_qmfengine_la-qmfengine.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 $@ $< _qmfengine_la-qmfengine.lo: qmfengine.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_qmfengine_la_CXXFLAGS) $(CXXFLAGS) -MT _qmfengine_la-qmfengine.lo -MD -MP -MF $(DEPDIR)/_qmfengine_la-qmfengine.Tpo -c -o _qmfengine_la-qmfengine.lo `test -f 'qmfengine.cpp' || echo '$(srcdir)/'`qmfengine.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/_qmfengine_la-qmfengine.Tpo $(DEPDIR)/_qmfengine_la-qmfengine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qmfengine.cpp' object='_qmfengine_la-qmfengine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(_qmfengine_la_CXXFLAGS) $(CXXFLAGS) -c -o _qmfengine_la-qmfengine.lo `test -f 'qmfengine.cpp' || echo '$(srcdir)/'`qmfengine.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-qenginePYTHON: $(qengine_PYTHON) @$(NORMAL_INSTALL) test -z "$(qenginedir)" || $(MKDIR_P) "$(DESTDIR)$(qenginedir)" @list='$(qengine_PYTHON)'; dlist=; list2=; test -n "$(qenginedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(qenginedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(qenginedir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ if test -z "$(DESTDIR)"; then \ PYTHON=$(PYTHON) $(py_compile) --basedir "$(qenginedir)" $$dlist; \ else \ PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(qenginedir)" $$dlist; \ fi; \ else :; fi uninstall-qenginePYTHON: @$(NORMAL_UNINSTALL) @list='$(qengine_PYTHON)'; test -n "$(qenginedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ filesc=`echo "$$files" | sed 's|$$|c|'`; \ fileso=`echo "$$files" | sed 's|$$|o|'`; \ echo " ( cd '$(DESTDIR)$(qenginedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(qenginedir)" && rm -f $$files || exit $$?; \ echo " ( cd '$(DESTDIR)$(qenginedir)' && rm -f" $$filesc ")"; \ cd "$(DESTDIR)$(qenginedir)" && rm -f $$filesc || exit $$?; \ echo " ( cd '$(DESTDIR)$(qenginedir)' && rm -f" $$fileso ")"; \ cd "$(DESTDIR)$(qenginedir)" && rm -f $$fileso ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pylibdir)" "$(DESTDIR)$(qenginedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-pylibLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pylibLTLIBRARIES install-qenginePYTHON install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-pylibLTLIBRARIES uninstall-qenginePYTHON .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pylibLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-pylibLTLIBRARIES install-qenginePYTHON 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-pylibLTLIBRARIES \ uninstall-qenginePYTHON @HAVE_PYTHON_DEVEL_TRUE@$(generated_file_list): $(srcdir)/python.i $(srcdir)/../qmfengine.i @HAVE_PYTHON_DEVEL_TRUE@ $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I$(top_srcdir)/src/qmf -I/usr/include -o qmfengine.cpp $(srcdir)/python.i # 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: qpidc-0.16/bindings/qmf/python/Makefile.am0000664000076400007640000000360711656043025021101 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if HAVE_PYTHON_DEVEL INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src/qmf -I$(top_srcdir)/src -I$(top_builddir)/src generated_file_list = \ qmfengine.cpp \ qmfengine.py EXTRA_DIST = CMakeLists.txt python.i BUILT_SOURCES = $(generated_file_list) SWIG_FLAGS = -w362,401 $(generated_file_list): $(srcdir)/python.i $(srcdir)/../qmfengine.i $(SWIG) -c++ -python $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I$(top_srcdir)/src/qmf -I/usr/include -o qmfengine.cpp $(srcdir)/python.i pylibdir = $(pyexecdir) pylib_LTLIBRARIES = _qmfengine.la qenginedir = $(pythondir) qengine_PYTHON = qmfengine.py qmf.py #_qmfengine_la_LDFLAGS = -avoid-version -module -shrext "$(PYTHON_SO)" #_qmfengine_la_LDFLAGS = -avoid-version -module -shrext ".so" _qmfengine_la_LDFLAGS = -avoid-version -module -shared _qmfengine_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmf.la _qmfengine_la_CXXFLAGS = $(INCLUDES) -I$(srcdir)/qmf $(PYTHON_CFLAGS) -fno-strict-aliasing nodist__qmfengine_la_SOURCES = qmfengine.cpp CLEANFILES = $(generated_file_list) endif # HAVE_PYTHON_DEVEL qpidc-0.16/bindings/qmf/python/python.i0000664000076400007640000000753611247501031020535 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %module qmfengine /* unsigned32 Convert from Python --> C */ %typemap(in) uint32_t { if (PyInt_Check($input)) { $1 = (uint32_t) PyInt_AsUnsignedLongMask($input); } else if (PyLong_Check($input)) { $1 = (uint32_t) PyLong_AsUnsignedLong($input); } else { SWIG_exception_fail(SWIG_ValueError, "unknown integer type"); } } /* unsinged32 Convert from C --> Python */ %typemap(out) uint32_t { $result = PyInt_FromLong((long)$1); } /* unsigned16 Convert from Python --> C */ %typemap(in) uint16_t { if (PyInt_Check($input)) { $1 = (uint16_t) PyInt_AsUnsignedLongMask($input); } else if (PyLong_Check($input)) { $1 = (uint16_t) PyLong_AsUnsignedLong($input); } else { SWIG_exception_fail(SWIG_ValueError, "unknown integer type"); } } /* unsigned16 Convert from C --> Python */ %typemap(out) uint16_t { $result = PyInt_FromLong((long)$1); } /* signed32 Convert from Python --> C */ %typemap(in) int32_t { if (PyInt_Check($input)) { $1 = (int32_t) PyInt_AsLong($input); } else if (PyLong_Check($input)) { $1 = (int32_t) PyLong_AsLong($input); } else { SWIG_exception_fail(SWIG_ValueError, "unknown integer type"); } } /* signed32 Convert from C --> Python */ %typemap(out) int32_t { $result = PyInt_FromLong((long)$1); } /* unsigned64 Convert from Python --> C */ %typemap(in) uint64_t { %#ifdef HAVE_LONG_LONG if (PyLong_Check($input)) { $1 = (uint64_t)PyLong_AsUnsignedLongLong($input); } else if (PyInt_Check($input)) { $1 = (uint64_t)PyInt_AsUnsignedLongLongMask($input); } else %#endif { SWIG_exception_fail(SWIG_ValueError, "unsupported integer size - uint64_t input too large"); } } /* unsigned64 Convert from C --> Python */ %typemap(out) uint64_t { %#ifdef HAVE_LONG_LONG $result = PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)$1); %#else SWIG_exception_fail(SWIG_ValueError, "unsupported integer size - uint64_t output too large"); %#endif } /* signed64 Convert from Python --> C */ %typemap(in) int64_t { %#ifdef HAVE_LONG_LONG if (PyLong_Check($input)) { $1 = (int64_t)PyLong_AsLongLong($input); } else if (PyInt_Check($input)) { $1 = (int64_t)PyInt_AsLong($input); } else %#endif { SWIG_exception_fail(SWIG_ValueError, "unsupported integer size - int64_t input too large"); } } /* signed64 Convert from C --> Python */ %typemap(out) int64_t { %#ifdef HAVE_LONG_LONG $result = PyLong_FromLongLong((PY_LONG_LONG)$1); %#else SWIG_exception_fail(SWIG_ValueError, "unsupported integer size - int64_t output too large"); %#endif } /* Convert from Python --> C */ %typemap(in) void * { $1 = (void *)$input; } /* Convert from C --> Python */ %typemap(out) void * { $result = (PyObject *) $1; Py_INCREF($result); } %typemap (typecheck, precedence=SWIG_TYPECHECK_UINT64) uint64_t { $1 = PyLong_Check($input) ? 1 : 0; } %typemap (typecheck, precedence=SWIG_TYPECHECK_UINT32) uint32_t { $1 = PyInt_Check($input) ? 1 : 0; } %include "../qmfengine.i" qpidc-0.16/bindings/qmf/python/CMakeLists.txt0000664000076400007640000000611311654522741021605 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ##------------------------------------------------------ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES CPLUSPLUS ON) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/python.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") swig_add_module(qmfengine_python python ${CMAKE_CURRENT_SOURCE_DIR}/python.i) swig_link_libraries(qmfengine_python qmf qmfconsole ${PYTHON_LIBRARIES}) set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-fno-strict-aliasing -I${PYTHON_INCLUDE_PATH} -I${qpid-cpp_SOURCE_DIR}/include") ##------------------------------------ ## Install the complete Python binding ##------------------------------------ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE) install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qmfengine.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qmfengine.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/qmf.py DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qmf.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qmf.py WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmfengine.py ${CMAKE_CURRENT_BINARY_DIR}/qmfengine.pyc ${CMAKE_CURRENT_BINARY_DIR}/qmfengine.pyo ${CMAKE_CURRENT_SOURCE_DIR}/qmf.py ${CMAKE_CURRENT_BINARY_DIR}/qmf.pyc ${CMAKE_CURRENT_BINARY_DIR}/qmf.pyo DESTINATION ${PYTHON_SITE_PACKAGES} COMPONENT ${QPID_COMPONENT_CLIENT} ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_qmfengine_python.so RENAME _qmfengine.so DESTINATION ${PYTHON_SITE_PACKAGES} COMPONENT ${QPID_COMPONENT_CLIENT} ) qpidc-0.16/bindings/qmf/python/qmfengine.py0000664000076400007640000015214211752725721021376 0ustar00jrossjross00000000000000# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.4 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import dirname import imp fp = None try: fp, pathname, description = imp.find_module('_qmfengine', [dirname(__file__)]) except ImportError: import _qmfengine return _qmfengine if fp is not None: try: _mod = imp.load_module('_qmfengine', fp, pathname, description) finally: fp.close() return _mod _qmfengine = swig_import_helper() del swig_import_helper else: import _qmfengine del version_info try: _swig_property = property except NameError: pass # Python < 2.2 doesn't have 'property'. def _swig_setattr_nondynamic(self,class_type,name,value,static=1): if (name == "thisown"): return self.this.own(value) if (name == "this"): if type(value).__name__ == 'SwigPyObject': self.__dict__[name] = value return method = class_type.__swig_setmethods__.get(name,None) if method: return method(self,value) if (not static): self.__dict__[name] = value else: raise AttributeError("You cannot add attributes to %s" % self) def _swig_setattr(self,class_type,name,value): return _swig_setattr_nondynamic(self,class_type,name,value,0) def _swig_getattr(self,class_type,name): if (name == "thisown"): return self.this.own() method = class_type.__swig_getmethods__.get(name,None) if method: return method(self) raise AttributeError(name) def _swig_repr(self): try: strthis = "proxy of " + self.this.__repr__() except: strthis = "" return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) try: _object = object _newclass = 1 except AttributeError: class _object : pass _newclass = 0 O_EQ = _qmfengine.O_EQ O_NE = _qmfengine.O_NE O_LT = _qmfengine.O_LT O_LE = _qmfengine.O_LE O_GT = _qmfengine.O_GT O_GE = _qmfengine.O_GE O_RE_MATCH = _qmfengine.O_RE_MATCH O_RE_NOMATCH = _qmfengine.O_RE_NOMATCH O_PRESENT = _qmfengine.O_PRESENT O_NOT_PRESENT = _qmfengine.O_NOT_PRESENT class QueryOperand(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, QueryOperand, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, QueryOperand, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined - class is abstract") __repr__ = _swig_repr __swig_destroy__ = _qmfengine.delete_QueryOperand __del__ = lambda self : None; def evaluate(self, *args): return _qmfengine.QueryOperand_evaluate(self, *args) QueryOperand_swigregister = _qmfengine.QueryOperand_swigregister QueryOperand_swigregister(QueryOperand) class QueryElement(QueryOperand): __swig_setmethods__ = {} for _s in [QueryOperand]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) __setattr__ = lambda self, name, value: _swig_setattr(self, QueryElement, name, value) __swig_getmethods__ = {} for _s in [QueryOperand]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, QueryElement, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_QueryElement(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_QueryElement __del__ = lambda self : None; def evaluate(self, *args): return _qmfengine.QueryElement_evaluate(self, *args) __swig_setmethods__["impl"] = _qmfengine.QueryElement_impl_set __swig_getmethods__["impl"] = _qmfengine.QueryElement_impl_get if _newclass:impl = _swig_property(_qmfengine.QueryElement_impl_get, _qmfengine.QueryElement_impl_set) QueryElement_swigregister = _qmfengine.QueryElement_swigregister QueryElement_swigregister(QueryElement) E_NOT = _qmfengine.E_NOT E_AND = _qmfengine.E_AND E_OR = _qmfengine.E_OR E_XOR = _qmfengine.E_XOR class QueryExpression(QueryOperand): __swig_setmethods__ = {} for _s in [QueryOperand]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{})) __setattr__ = lambda self, name, value: _swig_setattr(self, QueryExpression, name, value) __swig_getmethods__ = {} for _s in [QueryOperand]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{})) __getattr__ = lambda self, name: _swig_getattr(self, QueryExpression, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_QueryExpression(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_QueryExpression __del__ = lambda self : None; def evaluate(self, *args): return _qmfengine.QueryExpression_evaluate(self, *args) __swig_setmethods__["impl"] = _qmfengine.QueryExpression_impl_set __swig_getmethods__["impl"] = _qmfengine.QueryExpression_impl_get if _newclass:impl = _swig_property(_qmfengine.QueryExpression_impl_get, _qmfengine.QueryExpression_impl_set) QueryExpression_swigregister = _qmfengine.QueryExpression_swigregister QueryExpression_swigregister(QueryExpression) class Query(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Query, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Query, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_Query(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_Query __del__ = lambda self : None; def setSelect(self, *args): return _qmfengine.Query_setSelect(self, *args) def setLimit(self, *args): return _qmfengine.Query_setLimit(self, *args) def setOrderBy(self, *args): return _qmfengine.Query_setOrderBy(self, *args) def getPackage(self): return _qmfengine.Query_getPackage(self) def getClass(self): return _qmfengine.Query_getClass(self) def getObjectId(self): return _qmfengine.Query_getObjectId(self) def haveSelect(self): return _qmfengine.Query_haveSelect(self) def haveLimit(self): return _qmfengine.Query_haveLimit(self) def haveOrderBy(self): return _qmfengine.Query_haveOrderBy(self) def getSelect(self): return _qmfengine.Query_getSelect(self) def getLimit(self): return _qmfengine.Query_getLimit(self) def getOrderBy(self): return _qmfengine.Query_getOrderBy(self) def getDecreasing(self): return _qmfengine.Query_getDecreasing(self) Query_swigregister = _qmfengine.Query_swigregister Query_swigregister(Query) class Message(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Message, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Message, name) __repr__ = _swig_repr __swig_setmethods__["body"] = _qmfengine.Message_body_set __swig_getmethods__["body"] = _qmfengine.Message_body_get if _newclass:body = _swig_property(_qmfengine.Message_body_get, _qmfengine.Message_body_set) __swig_setmethods__["length"] = _qmfengine.Message_length_set __swig_getmethods__["length"] = _qmfengine.Message_length_get if _newclass:length = _swig_property(_qmfengine.Message_length_get, _qmfengine.Message_length_set) __swig_setmethods__["destination"] = _qmfengine.Message_destination_set __swig_getmethods__["destination"] = _qmfengine.Message_destination_get if _newclass:destination = _swig_property(_qmfengine.Message_destination_get, _qmfengine.Message_destination_set) __swig_setmethods__["routingKey"] = _qmfengine.Message_routingKey_set __swig_getmethods__["routingKey"] = _qmfengine.Message_routingKey_get if _newclass:routingKey = _swig_property(_qmfengine.Message_routingKey_get, _qmfengine.Message_routingKey_set) __swig_setmethods__["replyExchange"] = _qmfengine.Message_replyExchange_set __swig_getmethods__["replyExchange"] = _qmfengine.Message_replyExchange_get if _newclass:replyExchange = _swig_property(_qmfengine.Message_replyExchange_get, _qmfengine.Message_replyExchange_set) __swig_setmethods__["replyKey"] = _qmfengine.Message_replyKey_set __swig_getmethods__["replyKey"] = _qmfengine.Message_replyKey_get if _newclass:replyKey = _swig_property(_qmfengine.Message_replyKey_get, _qmfengine.Message_replyKey_set) __swig_setmethods__["userId"] = _qmfengine.Message_userId_set __swig_getmethods__["userId"] = _qmfengine.Message_userId_get if _newclass:userId = _swig_property(_qmfengine.Message_userId_get, _qmfengine.Message_userId_set) def __init__(self): this = _qmfengine.new_Message() try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_Message __del__ = lambda self : None; Message_swigregister = _qmfengine.Message_swigregister Message_swigregister(Message) class AgentEvent(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, AgentEvent, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, AgentEvent, name) __repr__ = _swig_repr GET_QUERY = _qmfengine.AgentEvent_GET_QUERY START_SYNC = _qmfengine.AgentEvent_START_SYNC END_SYNC = _qmfengine.AgentEvent_END_SYNC METHOD_CALL = _qmfengine.AgentEvent_METHOD_CALL DECLARE_QUEUE = _qmfengine.AgentEvent_DECLARE_QUEUE DELETE_QUEUE = _qmfengine.AgentEvent_DELETE_QUEUE BIND = _qmfengine.AgentEvent_BIND UNBIND = _qmfengine.AgentEvent_UNBIND SETUP_COMPLETE = _qmfengine.AgentEvent_SETUP_COMPLETE __swig_setmethods__["kind"] = _qmfengine.AgentEvent_kind_set __swig_getmethods__["kind"] = _qmfengine.AgentEvent_kind_get if _newclass:kind = _swig_property(_qmfengine.AgentEvent_kind_get, _qmfengine.AgentEvent_kind_set) __swig_setmethods__["sequence"] = _qmfengine.AgentEvent_sequence_set __swig_getmethods__["sequence"] = _qmfengine.AgentEvent_sequence_get if _newclass:sequence = _swig_property(_qmfengine.AgentEvent_sequence_get, _qmfengine.AgentEvent_sequence_set) __swig_setmethods__["authUserId"] = _qmfengine.AgentEvent_authUserId_set __swig_getmethods__["authUserId"] = _qmfengine.AgentEvent_authUserId_get if _newclass:authUserId = _swig_property(_qmfengine.AgentEvent_authUserId_get, _qmfengine.AgentEvent_authUserId_set) __swig_setmethods__["authToken"] = _qmfengine.AgentEvent_authToken_set __swig_getmethods__["authToken"] = _qmfengine.AgentEvent_authToken_get if _newclass:authToken = _swig_property(_qmfengine.AgentEvent_authToken_get, _qmfengine.AgentEvent_authToken_set) __swig_setmethods__["name"] = _qmfengine.AgentEvent_name_set __swig_getmethods__["name"] = _qmfengine.AgentEvent_name_get if _newclass:name = _swig_property(_qmfengine.AgentEvent_name_get, _qmfengine.AgentEvent_name_set) __swig_setmethods__["object"] = _qmfengine.AgentEvent_object_set __swig_getmethods__["object"] = _qmfengine.AgentEvent_object_get if _newclass:object = _swig_property(_qmfengine.AgentEvent_object_get, _qmfengine.AgentEvent_object_set) __swig_setmethods__["objectId"] = _qmfengine.AgentEvent_objectId_set __swig_getmethods__["objectId"] = _qmfengine.AgentEvent_objectId_get if _newclass:objectId = _swig_property(_qmfengine.AgentEvent_objectId_get, _qmfengine.AgentEvent_objectId_set) __swig_setmethods__["query"] = _qmfengine.AgentEvent_query_set __swig_getmethods__["query"] = _qmfengine.AgentEvent_query_get if _newclass:query = _swig_property(_qmfengine.AgentEvent_query_get, _qmfengine.AgentEvent_query_set) __swig_setmethods__["arguments"] = _qmfengine.AgentEvent_arguments_set __swig_getmethods__["arguments"] = _qmfengine.AgentEvent_arguments_get if _newclass:arguments = _swig_property(_qmfengine.AgentEvent_arguments_get, _qmfengine.AgentEvent_arguments_set) __swig_setmethods__["exchange"] = _qmfengine.AgentEvent_exchange_set __swig_getmethods__["exchange"] = _qmfengine.AgentEvent_exchange_get if _newclass:exchange = _swig_property(_qmfengine.AgentEvent_exchange_get, _qmfengine.AgentEvent_exchange_set) __swig_setmethods__["bindingKey"] = _qmfengine.AgentEvent_bindingKey_set __swig_getmethods__["bindingKey"] = _qmfengine.AgentEvent_bindingKey_get if _newclass:bindingKey = _swig_property(_qmfengine.AgentEvent_bindingKey_get, _qmfengine.AgentEvent_bindingKey_set) __swig_setmethods__["objectClass"] = _qmfengine.AgentEvent_objectClass_set __swig_getmethods__["objectClass"] = _qmfengine.AgentEvent_objectClass_get if _newclass:objectClass = _swig_property(_qmfengine.AgentEvent_objectClass_get, _qmfengine.AgentEvent_objectClass_set) def __init__(self): this = _qmfengine.new_AgentEvent() try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_AgentEvent __del__ = lambda self : None; AgentEvent_swigregister = _qmfengine.AgentEvent_swigregister AgentEvent_swigregister(AgentEvent) class Agent(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Agent, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Agent, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_Agent(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_Agent __del__ = lambda self : None; def setStoreDir(self, *args): return _qmfengine.Agent_setStoreDir(self, *args) def setTransferDir(self, *args): return _qmfengine.Agent_setTransferDir(self, *args) def handleRcvMessage(self, *args): return _qmfengine.Agent_handleRcvMessage(self, *args) def getXmtMessage(self, *args): return _qmfengine.Agent_getXmtMessage(self, *args) def popXmt(self): return _qmfengine.Agent_popXmt(self) def getEvent(self, *args): return _qmfengine.Agent_getEvent(self, *args) def popEvent(self): return _qmfengine.Agent_popEvent(self) def newSession(self): return _qmfengine.Agent_newSession(self) def startProtocol(self): return _qmfengine.Agent_startProtocol(self) def heartbeat(self): return _qmfengine.Agent_heartbeat(self) def methodResponse(self, *args): return _qmfengine.Agent_methodResponse(self, *args) def queryResponse(self, *args): return _qmfengine.Agent_queryResponse(self, *args) def queryComplete(self, *args): return _qmfengine.Agent_queryComplete(self, *args) def registerClass(self, *args): return _qmfengine.Agent_registerClass(self, *args) def addObject(self, *args): return _qmfengine.Agent_addObject(self, *args) def allocObjectId(self, *args): return _qmfengine.Agent_allocObjectId(self, *args) def raiseEvent(self, *args): return _qmfengine.Agent_raiseEvent(self, *args) Agent_swigregister = _qmfengine.Agent_swigregister Agent_swigregister(Agent) class MethodResponse(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, MethodResponse, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, MethodResponse, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_MethodResponse(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_MethodResponse __del__ = lambda self : None; def getStatus(self): return _qmfengine.MethodResponse_getStatus(self) def getException(self): return _qmfengine.MethodResponse_getException(self) def getArgs(self): return _qmfengine.MethodResponse_getArgs(self) MethodResponse_swigregister = _qmfengine.MethodResponse_swigregister MethodResponse_swigregister(MethodResponse) class QueryResponse(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, QueryResponse, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, QueryResponse, name) def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined") __repr__ = _swig_repr __swig_destroy__ = _qmfengine.delete_QueryResponse __del__ = lambda self : None; def getStatus(self): return _qmfengine.QueryResponse_getStatus(self) def getException(self): return _qmfengine.QueryResponse_getException(self) def getObjectCount(self): return _qmfengine.QueryResponse_getObjectCount(self) def getObject(self, *args): return _qmfengine.QueryResponse_getObject(self, *args) QueryResponse_swigregister = _qmfengine.QueryResponse_swigregister QueryResponse_swigregister(QueryResponse) class ConsoleEvent(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ConsoleEvent, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ConsoleEvent, name) __repr__ = _swig_repr AGENT_ADDED = _qmfengine.ConsoleEvent_AGENT_ADDED AGENT_DELETED = _qmfengine.ConsoleEvent_AGENT_DELETED NEW_PACKAGE = _qmfengine.ConsoleEvent_NEW_PACKAGE NEW_CLASS = _qmfengine.ConsoleEvent_NEW_CLASS OBJECT_UPDATE = _qmfengine.ConsoleEvent_OBJECT_UPDATE EVENT_RECEIVED = _qmfengine.ConsoleEvent_EVENT_RECEIVED AGENT_HEARTBEAT = _qmfengine.ConsoleEvent_AGENT_HEARTBEAT __swig_setmethods__["kind"] = _qmfengine.ConsoleEvent_kind_set __swig_getmethods__["kind"] = _qmfengine.ConsoleEvent_kind_get if _newclass:kind = _swig_property(_qmfengine.ConsoleEvent_kind_get, _qmfengine.ConsoleEvent_kind_set) __swig_setmethods__["agent"] = _qmfengine.ConsoleEvent_agent_set __swig_getmethods__["agent"] = _qmfengine.ConsoleEvent_agent_get if _newclass:agent = _swig_property(_qmfengine.ConsoleEvent_agent_get, _qmfengine.ConsoleEvent_agent_set) __swig_setmethods__["name"] = _qmfengine.ConsoleEvent_name_set __swig_getmethods__["name"] = _qmfengine.ConsoleEvent_name_get if _newclass:name = _swig_property(_qmfengine.ConsoleEvent_name_get, _qmfengine.ConsoleEvent_name_set) __swig_setmethods__["classKey"] = _qmfengine.ConsoleEvent_classKey_set __swig_getmethods__["classKey"] = _qmfengine.ConsoleEvent_classKey_get if _newclass:classKey = _swig_property(_qmfengine.ConsoleEvent_classKey_get, _qmfengine.ConsoleEvent_classKey_set) __swig_setmethods__["object"] = _qmfengine.ConsoleEvent_object_set __swig_getmethods__["object"] = _qmfengine.ConsoleEvent_object_get if _newclass:object = _swig_property(_qmfengine.ConsoleEvent_object_get, _qmfengine.ConsoleEvent_object_set) __swig_setmethods__["context"] = _qmfengine.ConsoleEvent_context_set __swig_getmethods__["context"] = _qmfengine.ConsoleEvent_context_get if _newclass:context = _swig_property(_qmfengine.ConsoleEvent_context_get, _qmfengine.ConsoleEvent_context_set) __swig_setmethods__["event"] = _qmfengine.ConsoleEvent_event_set __swig_getmethods__["event"] = _qmfengine.ConsoleEvent_event_get if _newclass:event = _swig_property(_qmfengine.ConsoleEvent_event_get, _qmfengine.ConsoleEvent_event_set) __swig_setmethods__["timestamp"] = _qmfengine.ConsoleEvent_timestamp_set __swig_getmethods__["timestamp"] = _qmfengine.ConsoleEvent_timestamp_get if _newclass:timestamp = _swig_property(_qmfengine.ConsoleEvent_timestamp_get, _qmfengine.ConsoleEvent_timestamp_set) __swig_setmethods__["queryResponse"] = _qmfengine.ConsoleEvent_queryResponse_set __swig_getmethods__["queryResponse"] = _qmfengine.ConsoleEvent_queryResponse_get if _newclass:queryResponse = _swig_property(_qmfengine.ConsoleEvent_queryResponse_get, _qmfengine.ConsoleEvent_queryResponse_set) __swig_setmethods__["hasProps"] = _qmfengine.ConsoleEvent_hasProps_set __swig_getmethods__["hasProps"] = _qmfengine.ConsoleEvent_hasProps_get if _newclass:hasProps = _swig_property(_qmfengine.ConsoleEvent_hasProps_get, _qmfengine.ConsoleEvent_hasProps_set) __swig_setmethods__["hasStats"] = _qmfengine.ConsoleEvent_hasStats_set __swig_getmethods__["hasStats"] = _qmfengine.ConsoleEvent_hasStats_get if _newclass:hasStats = _swig_property(_qmfengine.ConsoleEvent_hasStats_get, _qmfengine.ConsoleEvent_hasStats_set) def __init__(self): this = _qmfengine.new_ConsoleEvent() try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_ConsoleEvent __del__ = lambda self : None; ConsoleEvent_swigregister = _qmfengine.ConsoleEvent_swigregister ConsoleEvent_swigregister(ConsoleEvent) class BrokerEvent(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, BrokerEvent, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, BrokerEvent, name) __repr__ = _swig_repr BROKER_INFO = _qmfengine.BrokerEvent_BROKER_INFO DECLARE_QUEUE = _qmfengine.BrokerEvent_DECLARE_QUEUE DELETE_QUEUE = _qmfengine.BrokerEvent_DELETE_QUEUE BIND = _qmfengine.BrokerEvent_BIND UNBIND = _qmfengine.BrokerEvent_UNBIND SETUP_COMPLETE = _qmfengine.BrokerEvent_SETUP_COMPLETE STABLE = _qmfengine.BrokerEvent_STABLE QUERY_COMPLETE = _qmfengine.BrokerEvent_QUERY_COMPLETE METHOD_RESPONSE = _qmfengine.BrokerEvent_METHOD_RESPONSE __swig_setmethods__["kind"] = _qmfengine.BrokerEvent_kind_set __swig_getmethods__["kind"] = _qmfengine.BrokerEvent_kind_get if _newclass:kind = _swig_property(_qmfengine.BrokerEvent_kind_get, _qmfengine.BrokerEvent_kind_set) __swig_setmethods__["name"] = _qmfengine.BrokerEvent_name_set __swig_getmethods__["name"] = _qmfengine.BrokerEvent_name_get if _newclass:name = _swig_property(_qmfengine.BrokerEvent_name_get, _qmfengine.BrokerEvent_name_set) __swig_setmethods__["exchange"] = _qmfengine.BrokerEvent_exchange_set __swig_getmethods__["exchange"] = _qmfengine.BrokerEvent_exchange_get if _newclass:exchange = _swig_property(_qmfengine.BrokerEvent_exchange_get, _qmfengine.BrokerEvent_exchange_set) __swig_setmethods__["bindingKey"] = _qmfengine.BrokerEvent_bindingKey_set __swig_getmethods__["bindingKey"] = _qmfengine.BrokerEvent_bindingKey_get if _newclass:bindingKey = _swig_property(_qmfengine.BrokerEvent_bindingKey_get, _qmfengine.BrokerEvent_bindingKey_set) __swig_setmethods__["context"] = _qmfengine.BrokerEvent_context_set __swig_getmethods__["context"] = _qmfengine.BrokerEvent_context_get if _newclass:context = _swig_property(_qmfengine.BrokerEvent_context_get, _qmfengine.BrokerEvent_context_set) __swig_setmethods__["queryResponse"] = _qmfengine.BrokerEvent_queryResponse_set __swig_getmethods__["queryResponse"] = _qmfengine.BrokerEvent_queryResponse_get if _newclass:queryResponse = _swig_property(_qmfengine.BrokerEvent_queryResponse_get, _qmfengine.BrokerEvent_queryResponse_set) __swig_setmethods__["methodResponse"] = _qmfengine.BrokerEvent_methodResponse_set __swig_getmethods__["methodResponse"] = _qmfengine.BrokerEvent_methodResponse_get if _newclass:methodResponse = _swig_property(_qmfengine.BrokerEvent_methodResponse_get, _qmfengine.BrokerEvent_methodResponse_set) def __init__(self): this = _qmfengine.new_BrokerEvent() try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_BrokerEvent __del__ = lambda self : None; BrokerEvent_swigregister = _qmfengine.BrokerEvent_swigregister BrokerEvent_swigregister(BrokerEvent) class AgentProxy(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, AgentProxy, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, AgentProxy, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_AgentProxy(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_AgentProxy __del__ = lambda self : None; def getLabel(self): return _qmfengine.AgentProxy_getLabel(self) def getBrokerBank(self): return _qmfengine.AgentProxy_getBrokerBank(self) def getAgentBank(self): return _qmfengine.AgentProxy_getAgentBank(self) AgentProxy_swigregister = _qmfengine.AgentProxy_swigregister AgentProxy_swigregister(AgentProxy) class BrokerProxy(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, BrokerProxy, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, BrokerProxy, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_BrokerProxy(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_BrokerProxy __del__ = lambda self : None; def sessionOpened(self, *args): return _qmfengine.BrokerProxy_sessionOpened(self, *args) def sessionClosed(self): return _qmfengine.BrokerProxy_sessionClosed(self) def startProtocol(self): return _qmfengine.BrokerProxy_startProtocol(self) def handleRcvMessage(self, *args): return _qmfengine.BrokerProxy_handleRcvMessage(self, *args) def getXmtMessage(self, *args): return _qmfengine.BrokerProxy_getXmtMessage(self, *args) def popXmt(self): return _qmfengine.BrokerProxy_popXmt(self) def getEvent(self, *args): return _qmfengine.BrokerProxy_getEvent(self, *args) def popEvent(self): return _qmfengine.BrokerProxy_popEvent(self) def agentCount(self): return _qmfengine.BrokerProxy_agentCount(self) def getAgent(self, *args): return _qmfengine.BrokerProxy_getAgent(self, *args) def sendQuery(self, *args): return _qmfengine.BrokerProxy_sendQuery(self, *args) BrokerProxy_swigregister = _qmfengine.BrokerProxy_swigregister BrokerProxy_swigregister(BrokerProxy) class ConsoleSettings(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ConsoleSettings, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ConsoleSettings, name) __repr__ = _swig_repr __swig_setmethods__["rcvObjects"] = _qmfengine.ConsoleSettings_rcvObjects_set __swig_getmethods__["rcvObjects"] = _qmfengine.ConsoleSettings_rcvObjects_get if _newclass:rcvObjects = _swig_property(_qmfengine.ConsoleSettings_rcvObjects_get, _qmfengine.ConsoleSettings_rcvObjects_set) __swig_setmethods__["rcvEvents"] = _qmfengine.ConsoleSettings_rcvEvents_set __swig_getmethods__["rcvEvents"] = _qmfengine.ConsoleSettings_rcvEvents_get if _newclass:rcvEvents = _swig_property(_qmfengine.ConsoleSettings_rcvEvents_get, _qmfengine.ConsoleSettings_rcvEvents_set) __swig_setmethods__["rcvHeartbeats"] = _qmfengine.ConsoleSettings_rcvHeartbeats_set __swig_getmethods__["rcvHeartbeats"] = _qmfengine.ConsoleSettings_rcvHeartbeats_get if _newclass:rcvHeartbeats = _swig_property(_qmfengine.ConsoleSettings_rcvHeartbeats_get, _qmfengine.ConsoleSettings_rcvHeartbeats_set) __swig_setmethods__["userBindings"] = _qmfengine.ConsoleSettings_userBindings_set __swig_getmethods__["userBindings"] = _qmfengine.ConsoleSettings_userBindings_get if _newclass:userBindings = _swig_property(_qmfengine.ConsoleSettings_userBindings_get, _qmfengine.ConsoleSettings_userBindings_set) def __init__(self): this = _qmfengine.new_ConsoleSettings() try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_ConsoleSettings __del__ = lambda self : None; ConsoleSettings_swigregister = _qmfengine.ConsoleSettings_swigregister ConsoleSettings_swigregister(ConsoleSettings) class Console(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Console, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Console, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_Console(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_Console __del__ = lambda self : None; def getEvent(self, *args): return _qmfengine.Console_getEvent(self, *args) def popEvent(self): return _qmfengine.Console_popEvent(self) def addConnection(self, *args): return _qmfengine.Console_addConnection(self, *args) def delConnection(self, *args): return _qmfengine.Console_delConnection(self, *args) def packageCount(self): return _qmfengine.Console_packageCount(self) def getPackageName(self, *args): return _qmfengine.Console_getPackageName(self, *args) def classCount(self, *args): return _qmfengine.Console_classCount(self, *args) def getClass(self, *args): return _qmfengine.Console_getClass(self, *args) def getClassKind(self, *args): return _qmfengine.Console_getClassKind(self, *args) def getObjectClass(self, *args): return _qmfengine.Console_getObjectClass(self, *args) def getEventClass(self, *args): return _qmfengine.Console_getEventClass(self, *args) def bindPackage(self, *args): return _qmfengine.Console_bindPackage(self, *args) def bindClass(self, *args): return _qmfengine.Console_bindClass(self, *args) def bindEvent(self, *args): return _qmfengine.Console_bindEvent(self, *args) Console_swigregister = _qmfengine.Console_swigregister Console_swigregister(Console) class ConnectionSettings(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ConnectionSettings, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ConnectionSettings, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_ConnectionSettings(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_ConnectionSettings __del__ = lambda self : None; def setAttr(self, *args): return _qmfengine.ConnectionSettings_setAttr(self, *args) def getAttr(self, *args): return _qmfengine.ConnectionSettings_getAttr(self, *args) def getAttrString(self): return _qmfengine.ConnectionSettings_getAttrString(self) def transportTcp(self, port = 5672): return _qmfengine.ConnectionSettings_transportTcp(self, port) def transportSsl(self, port = 5671): return _qmfengine.ConnectionSettings_transportSsl(self, port) def transportRdma(self, port = 5672): return _qmfengine.ConnectionSettings_transportRdma(self, port) def authAnonymous(self, username = None): return _qmfengine.ConnectionSettings_authAnonymous(self, username) def authPlain(self, username = None, password = None): return _qmfengine.ConnectionSettings_authPlain(self, username, password) def authGssapi(self, *args): return _qmfengine.ConnectionSettings_authGssapi(self, *args) def setRetry(self, delayMin = 1, delayMax = 128, delayFactor = 2): return _qmfengine.ConnectionSettings_setRetry(self, delayMin, delayMax, delayFactor) ConnectionSettings_swigregister = _qmfengine.ConnectionSettings_swigregister ConnectionSettings_swigregister(ConnectionSettings) class ResilientConnectionEvent(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ResilientConnectionEvent, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ResilientConnectionEvent, name) __repr__ = _swig_repr CONNECTED = _qmfengine.ResilientConnectionEvent_CONNECTED DISCONNECTED = _qmfengine.ResilientConnectionEvent_DISCONNECTED SESSION_CLOSED = _qmfengine.ResilientConnectionEvent_SESSION_CLOSED RECV = _qmfengine.ResilientConnectionEvent_RECV __swig_setmethods__["kind"] = _qmfengine.ResilientConnectionEvent_kind_set __swig_getmethods__["kind"] = _qmfengine.ResilientConnectionEvent_kind_get if _newclass:kind = _swig_property(_qmfengine.ResilientConnectionEvent_kind_get, _qmfengine.ResilientConnectionEvent_kind_set) __swig_setmethods__["sessionContext"] = _qmfengine.ResilientConnectionEvent_sessionContext_set __swig_getmethods__["sessionContext"] = _qmfengine.ResilientConnectionEvent_sessionContext_get if _newclass:sessionContext = _swig_property(_qmfengine.ResilientConnectionEvent_sessionContext_get, _qmfengine.ResilientConnectionEvent_sessionContext_set) __swig_setmethods__["errorText"] = _qmfengine.ResilientConnectionEvent_errorText_set __swig_getmethods__["errorText"] = _qmfengine.ResilientConnectionEvent_errorText_get if _newclass:errorText = _swig_property(_qmfengine.ResilientConnectionEvent_errorText_get, _qmfengine.ResilientConnectionEvent_errorText_set) __swig_setmethods__["message"] = _qmfengine.ResilientConnectionEvent_message_set __swig_getmethods__["message"] = _qmfengine.ResilientConnectionEvent_message_get if _newclass:message = _swig_property(_qmfengine.ResilientConnectionEvent_message_get, _qmfengine.ResilientConnectionEvent_message_set) def __init__(self): this = _qmfengine.new_ResilientConnectionEvent() try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_ResilientConnectionEvent __del__ = lambda self : None; ResilientConnectionEvent_swigregister = _qmfengine.ResilientConnectionEvent_swigregister ResilientConnectionEvent_swigregister(ResilientConnectionEvent) class SessionHandle(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SessionHandle, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SessionHandle, name) __repr__ = _swig_repr def __init__(self): this = _qmfengine.new_SessionHandle() try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_SessionHandle __del__ = lambda self : None; SessionHandle_swigregister = _qmfengine.SessionHandle_swigregister SessionHandle_swigregister(SessionHandle) class ResilientConnection(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ResilientConnection, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ResilientConnection, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_ResilientConnection(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_ResilientConnection __del__ = lambda self : None; def isConnected(self): return _qmfengine.ResilientConnection_isConnected(self) def getEvent(self, *args): return _qmfengine.ResilientConnection_getEvent(self, *args) def popEvent(self): return _qmfengine.ResilientConnection_popEvent(self) def createSession(self, *args): return _qmfengine.ResilientConnection_createSession(self, *args) def destroySession(self, *args): return _qmfengine.ResilientConnection_destroySession(self, *args) def sendMessage(self, *args): return _qmfengine.ResilientConnection_sendMessage(self, *args) def declareQueue(self, *args): return _qmfengine.ResilientConnection_declareQueue(self, *args) def deleteQueue(self, *args): return _qmfengine.ResilientConnection_deleteQueue(self, *args) def bind(self, *args): return _qmfengine.ResilientConnection_bind(self, *args) def unbind(self, *args): return _qmfengine.ResilientConnection_unbind(self, *args) def setNotifyFd(self, *args): return _qmfengine.ResilientConnection_setNotifyFd(self, *args) def notify(self): return _qmfengine.ResilientConnection_notify(self) ResilientConnection_swigregister = _qmfengine.ResilientConnection_swigregister ResilientConnection_swigregister(ResilientConnection) TYPE_UINT8 = _qmfengine.TYPE_UINT8 TYPE_UINT16 = _qmfengine.TYPE_UINT16 TYPE_UINT32 = _qmfengine.TYPE_UINT32 TYPE_UINT64 = _qmfengine.TYPE_UINT64 TYPE_SSTR = _qmfengine.TYPE_SSTR TYPE_LSTR = _qmfengine.TYPE_LSTR TYPE_ABSTIME = _qmfengine.TYPE_ABSTIME TYPE_DELTATIME = _qmfengine.TYPE_DELTATIME TYPE_REF = _qmfengine.TYPE_REF TYPE_BOOL = _qmfengine.TYPE_BOOL TYPE_FLOAT = _qmfengine.TYPE_FLOAT TYPE_DOUBLE = _qmfengine.TYPE_DOUBLE TYPE_UUID = _qmfengine.TYPE_UUID TYPE_MAP = _qmfengine.TYPE_MAP TYPE_INT8 = _qmfengine.TYPE_INT8 TYPE_INT16 = _qmfengine.TYPE_INT16 TYPE_INT32 = _qmfengine.TYPE_INT32 TYPE_INT64 = _qmfengine.TYPE_INT64 TYPE_OBJECT = _qmfengine.TYPE_OBJECT TYPE_LIST = _qmfengine.TYPE_LIST TYPE_ARRAY = _qmfengine.TYPE_ARRAY ACCESS_READ_CREATE = _qmfengine.ACCESS_READ_CREATE ACCESS_READ_WRITE = _qmfengine.ACCESS_READ_WRITE ACCESS_READ_ONLY = _qmfengine.ACCESS_READ_ONLY DIR_IN = _qmfengine.DIR_IN DIR_OUT = _qmfengine.DIR_OUT DIR_IN_OUT = _qmfengine.DIR_IN_OUT CLASS_OBJECT = _qmfengine.CLASS_OBJECT CLASS_EVENT = _qmfengine.CLASS_EVENT SEV_EMERG = _qmfengine.SEV_EMERG SEV_ALERT = _qmfengine.SEV_ALERT SEV_CRIT = _qmfengine.SEV_CRIT SEV_ERROR = _qmfengine.SEV_ERROR SEV_WARN = _qmfengine.SEV_WARN SEV_NOTICE = _qmfengine.SEV_NOTICE SEV_INFORM = _qmfengine.SEV_INFORM SEV_DEBUG = _qmfengine.SEV_DEBUG class SchemaArgument(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaArgument, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaArgument, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_SchemaArgument(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_SchemaArgument __del__ = lambda self : None; def setDirection(self, *args): return _qmfengine.SchemaArgument_setDirection(self, *args) def setUnit(self, *args): return _qmfengine.SchemaArgument_setUnit(self, *args) def setDesc(self, *args): return _qmfengine.SchemaArgument_setDesc(self, *args) def getName(self): return _qmfengine.SchemaArgument_getName(self) def getType(self): return _qmfengine.SchemaArgument_getType(self) def getDirection(self): return _qmfengine.SchemaArgument_getDirection(self) def getUnit(self): return _qmfengine.SchemaArgument_getUnit(self) def getDesc(self): return _qmfengine.SchemaArgument_getDesc(self) SchemaArgument_swigregister = _qmfengine.SchemaArgument_swigregister SchemaArgument_swigregister(SchemaArgument) class SchemaMethod(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaMethod, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaMethod, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_SchemaMethod(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_SchemaMethod __del__ = lambda self : None; def addArgument(self, *args): return _qmfengine.SchemaMethod_addArgument(self, *args) def setDesc(self, *args): return _qmfengine.SchemaMethod_setDesc(self, *args) def getName(self): return _qmfengine.SchemaMethod_getName(self) def getDesc(self): return _qmfengine.SchemaMethod_getDesc(self) def getArgumentCount(self): return _qmfengine.SchemaMethod_getArgumentCount(self) def getArgument(self, *args): return _qmfengine.SchemaMethod_getArgument(self, *args) SchemaMethod_swigregister = _qmfengine.SchemaMethod_swigregister SchemaMethod_swigregister(SchemaMethod) class SchemaProperty(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaProperty, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaProperty, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_SchemaProperty(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_SchemaProperty __del__ = lambda self : None; def setAccess(self, *args): return _qmfengine.SchemaProperty_setAccess(self, *args) def setIndex(self, *args): return _qmfengine.SchemaProperty_setIndex(self, *args) def setOptional(self, *args): return _qmfengine.SchemaProperty_setOptional(self, *args) def setUnit(self, *args): return _qmfengine.SchemaProperty_setUnit(self, *args) def setDesc(self, *args): return _qmfengine.SchemaProperty_setDesc(self, *args) def getName(self): return _qmfengine.SchemaProperty_getName(self) def getType(self): return _qmfengine.SchemaProperty_getType(self) def getAccess(self): return _qmfengine.SchemaProperty_getAccess(self) def isIndex(self): return _qmfengine.SchemaProperty_isIndex(self) def isOptional(self): return _qmfengine.SchemaProperty_isOptional(self) def getUnit(self): return _qmfengine.SchemaProperty_getUnit(self) def getDesc(self): return _qmfengine.SchemaProperty_getDesc(self) SchemaProperty_swigregister = _qmfengine.SchemaProperty_swigregister SchemaProperty_swigregister(SchemaProperty) class SchemaStatistic(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaStatistic, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaStatistic, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_SchemaStatistic(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_SchemaStatistic __del__ = lambda self : None; def setUnit(self, *args): return _qmfengine.SchemaStatistic_setUnit(self, *args) def setDesc(self, *args): return _qmfengine.SchemaStatistic_setDesc(self, *args) def getName(self): return _qmfengine.SchemaStatistic_getName(self) def getType(self): return _qmfengine.SchemaStatistic_getType(self) def getUnit(self): return _qmfengine.SchemaStatistic_getUnit(self) def getDesc(self): return _qmfengine.SchemaStatistic_getDesc(self) SchemaStatistic_swigregister = _qmfengine.SchemaStatistic_swigregister SchemaStatistic_swigregister(SchemaStatistic) class SchemaClassKey(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaClassKey, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaClassKey, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_SchemaClassKey(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_SchemaClassKey __del__ = lambda self : None; def getPackageName(self): return _qmfengine.SchemaClassKey_getPackageName(self) def getClassName(self): return _qmfengine.SchemaClassKey_getClassName(self) def getHash(self): return _qmfengine.SchemaClassKey_getHash(self) def asString(self): return _qmfengine.SchemaClassKey_asString(self) def __eq__(self, *args): return _qmfengine.SchemaClassKey___eq__(self, *args) def __lt__(self, *args): return _qmfengine.SchemaClassKey___lt__(self, *args) SchemaClassKey_swigregister = _qmfengine.SchemaClassKey_swigregister SchemaClassKey_swigregister(SchemaClassKey) class SchemaObjectClass(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaObjectClass, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaObjectClass, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_SchemaObjectClass(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_SchemaObjectClass __del__ = lambda self : None; def addProperty(self, *args): return _qmfengine.SchemaObjectClass_addProperty(self, *args) def addStatistic(self, *args): return _qmfengine.SchemaObjectClass_addStatistic(self, *args) def addMethod(self, *args): return _qmfengine.SchemaObjectClass_addMethod(self, *args) def getClassKey(self): return _qmfengine.SchemaObjectClass_getClassKey(self) def getPropertyCount(self): return _qmfengine.SchemaObjectClass_getPropertyCount(self) def getStatisticCount(self): return _qmfengine.SchemaObjectClass_getStatisticCount(self) def getMethodCount(self): return _qmfengine.SchemaObjectClass_getMethodCount(self) def getProperty(self, *args): return _qmfengine.SchemaObjectClass_getProperty(self, *args) def getStatistic(self, *args): return _qmfengine.SchemaObjectClass_getStatistic(self, *args) def getMethod(self, *args): return _qmfengine.SchemaObjectClass_getMethod(self, *args) SchemaObjectClass_swigregister = _qmfengine.SchemaObjectClass_swigregister SchemaObjectClass_swigregister(SchemaObjectClass) class SchemaEventClass(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, SchemaEventClass, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, SchemaEventClass, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_SchemaEventClass(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_SchemaEventClass __del__ = lambda self : None; def addArgument(self, *args): return _qmfengine.SchemaEventClass_addArgument(self, *args) def setDesc(self, *args): return _qmfengine.SchemaEventClass_setDesc(self, *args) def getClassKey(self): return _qmfengine.SchemaEventClass_getClassKey(self) def getSeverity(self): return _qmfengine.SchemaEventClass_getSeverity(self) def getArgumentCount(self): return _qmfengine.SchemaEventClass_getArgumentCount(self) def getArgument(self, *args): return _qmfengine.SchemaEventClass_getArgument(self, *args) SchemaEventClass_swigregister = _qmfengine.SchemaEventClass_swigregister SchemaEventClass_swigregister(SchemaEventClass) class Value(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Value, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Value, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_Value(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_Value __del__ = lambda self : None; def getType(self): return _qmfengine.Value_getType(self) def isNull(self): return _qmfengine.Value_isNull(self) def setNull(self): return _qmfengine.Value_setNull(self) def isObjectId(self): return _qmfengine.Value_isObjectId(self) def asObjectId(self): return _qmfengine.Value_asObjectId(self) def setObjectId(self, *args): return _qmfengine.Value_setObjectId(self, *args) def isUint(self): return _qmfengine.Value_isUint(self) def asUint(self): return _qmfengine.Value_asUint(self) def setUint(self, *args): return _qmfengine.Value_setUint(self, *args) def isInt(self): return _qmfengine.Value_isInt(self) def asInt(self): return _qmfengine.Value_asInt(self) def setInt(self, *args): return _qmfengine.Value_setInt(self, *args) def isUint64(self): return _qmfengine.Value_isUint64(self) def asUint64(self): return _qmfengine.Value_asUint64(self) def setUint64(self, *args): return _qmfengine.Value_setUint64(self, *args) def isInt64(self): return _qmfengine.Value_isInt64(self) def asInt64(self): return _qmfengine.Value_asInt64(self) def setInt64(self, *args): return _qmfengine.Value_setInt64(self, *args) def isString(self): return _qmfengine.Value_isString(self) def asString(self): return _qmfengine.Value_asString(self) def setString(self, *args): return _qmfengine.Value_setString(self, *args) def isBool(self): return _qmfengine.Value_isBool(self) def asBool(self): return _qmfengine.Value_asBool(self) def setBool(self, *args): return _qmfengine.Value_setBool(self, *args) def isFloat(self): return _qmfengine.Value_isFloat(self) def asFloat(self): return _qmfengine.Value_asFloat(self) def setFloat(self, *args): return _qmfengine.Value_setFloat(self, *args) def isDouble(self): return _qmfengine.Value_isDouble(self) def asDouble(self): return _qmfengine.Value_asDouble(self) def setDouble(self, *args): return _qmfengine.Value_setDouble(self, *args) def isUuid(self): return _qmfengine.Value_isUuid(self) def asUuid(self): return _qmfengine.Value_asUuid(self) def setUuid(self, *args): return _qmfengine.Value_setUuid(self, *args) def isObject(self): return _qmfengine.Value_isObject(self) def asObject(self): return _qmfengine.Value_asObject(self) def setObject(self, *args): return _qmfengine.Value_setObject(self, *args) def isMap(self): return _qmfengine.Value_isMap(self) def keyInMap(self, *args): return _qmfengine.Value_keyInMap(self, *args) def byKey(self, *args): return _qmfengine.Value_byKey(self, *args) def deleteKey(self, *args): return _qmfengine.Value_deleteKey(self, *args) def insert(self, *args): return _qmfengine.Value_insert(self, *args) def keyCount(self): return _qmfengine.Value_keyCount(self) def key(self, *args): return _qmfengine.Value_key(self, *args) def isList(self): return _qmfengine.Value_isList(self) def listItemCount(self): return _qmfengine.Value_listItemCount(self) def listItem(self, *args): return _qmfengine.Value_listItem(self, *args) def appendToList(self, *args): return _qmfengine.Value_appendToList(self, *args) def deleteListItem(self, *args): return _qmfengine.Value_deleteListItem(self, *args) def isArray(self): return _qmfengine.Value_isArray(self) def arrayType(self): return _qmfengine.Value_arrayType(self) def arrayItemCount(self): return _qmfengine.Value_arrayItemCount(self) def arrayItem(self, *args): return _qmfengine.Value_arrayItem(self, *args) def appendToArray(self, *args): return _qmfengine.Value_appendToArray(self, *args) def deleteArrayItem(self, *args): return _qmfengine.Value_deleteArrayItem(self, *args) Value_swigregister = _qmfengine.Value_swigregister Value_swigregister(Value) class ObjectId(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ObjectId, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ObjectId, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_ObjectId(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_ObjectId __del__ = lambda self : None; def getObjectNum(self): return _qmfengine.ObjectId_getObjectNum(self) def getObjectNumHi(self): return _qmfengine.ObjectId_getObjectNumHi(self) def getObjectNumLo(self): return _qmfengine.ObjectId_getObjectNumLo(self) def isDurable(self): return _qmfengine.ObjectId_isDurable(self) def str(self): return _qmfengine.ObjectId_str(self) def getFlags(self): return _qmfengine.ObjectId_getFlags(self) def getSequence(self): return _qmfengine.ObjectId_getSequence(self) def getBrokerBank(self): return _qmfengine.ObjectId_getBrokerBank(self) def getAgentBank(self): return _qmfengine.ObjectId_getAgentBank(self) def __eq__(self, *args): return _qmfengine.ObjectId___eq__(self, *args) def __lt__(self, *args): return _qmfengine.ObjectId___lt__(self, *args) def __gt__(self, *args): return _qmfengine.ObjectId___gt__(self, *args) def __le__(self, *args): return _qmfengine.ObjectId___le__(self, *args) def __ge__(self, *args): return _qmfengine.ObjectId___ge__(self, *args) ObjectId_swigregister = _qmfengine.ObjectId_swigregister ObjectId_swigregister(ObjectId) class Object(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Object, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Object, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_Object(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_Object __del__ = lambda self : None; def destroy(self): return _qmfengine.Object_destroy(self) def getObjectId(self): return _qmfengine.Object_getObjectId(self) def setObjectId(self, *args): return _qmfengine.Object_setObjectId(self, *args) def getClass(self): return _qmfengine.Object_getClass(self) def getValue(self, *args): return _qmfengine.Object_getValue(self, *args) def invokeMethod(self, *args): return _qmfengine.Object_invokeMethod(self, *args) def isDeleted(self): return _qmfengine.Object_isDeleted(self) def merge(self, *args): return _qmfengine.Object_merge(self, *args) Object_swigregister = _qmfengine.Object_swigregister Object_swigregister(Object) class Event(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, Event, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, Event, name) __repr__ = _swig_repr def __init__(self, *args): this = _qmfengine.new_Event(*args) try: self.this.append(this) except: self.this = this __swig_destroy__ = _qmfengine.delete_Event __del__ = lambda self : None; def getClass(self): return _qmfengine.Event_getClass(self) def getValue(self, *args): return _qmfengine.Event_getValue(self, *args) Event_swigregister = _qmfengine.Event_swigregister Event_swigregister(Event) # This file is compatible with both classic and new-style classes. qpidc-0.16/bindings/qmf/CMakeLists.txt0000664000076400007640000000215011654522741020261 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # include(FindSWIG) include(UseSWIG) include(FindRuby) include(FindPythonLibs) include(FindPerlLibs) if (SWIG_FOUND) set(CMAKE_SWIG_FLAGS "-w362,401") if (PYTHONLIBS_FOUND) add_subdirectory(python) endif (PYTHONLIBS_FOUND) if (RUBY_FOUND) add_subdirectory(ruby) endif (RUBY_FOUND) endif (SWIG_FOUND) qpidc-0.16/bindings/qmf/qmfengine.i0000664000076400007640000000271611323332437017646 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %{ #include "qmf/engine/Agent.h" #include "qmf/engine/Console.h" #include "qmf/engine/ResilientConnection.h" %} %include %include %include %include %include %include %include %include %include %include %include %include %include %inline { using namespace std; using namespace qmf::engine; namespace qmf { namespace engine { } } } %{ %}; qpidc-0.16/bindings/qmf/ruby/0000775000076400007640000000000011752725721016506 5ustar00jrossjross00000000000000qpidc-0.16/bindings/qmf/ruby/qmf.rb0000664000076400007640000011632011375542547017625 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # require 'qmfengine' require 'thread' require 'socket' require 'monitor' module Qmf # Pull all the TYPE_* constants into Qmf namespace. Maybe there's an easier way? Qmfengine.constants.each do |c| if c.index('TYPE_') == 0 or c.index('ACCESS_') == 0 or c.index('DIR_') == 0 or c.index('CLASS_') == 0 or c.index('SEV_') == 0 const_set(c, Qmfengine.const_get(c)) end end class Util def qmf_to_native(val) case val.getType when TYPE_UINT8, TYPE_UINT16, TYPE_UINT32 then val.asUint when TYPE_UINT64 then val.asUint64 when TYPE_SSTR, TYPE_LSTR then val.asString when TYPE_ABSTIME then val.asInt64 when TYPE_DELTATIME then val.asUint64 when TYPE_REF then ObjectId.new(val.asObjectId) when TYPE_BOOL then val.asBool when TYPE_FLOAT then val.asFloat when TYPE_DOUBLE then val.asDouble when TYPE_UUID then val.asUuid when TYPE_INT8, TYPE_INT16, TYPE_INT32 then val.asInt when TYPE_INT64 then val.asInt64 when TYPE_MAP then value_to_dict(val) when TYPE_LIST then value_to_list(val) when TYPE_OBJECT when TYPE_ARRAY end end def native_to_qmf(target, value) if target.class == Qmfengine::Value val = target typecode = val.getType else typecode = target val = Qmfengine::Value.new(typecode) end case typecode when TYPE_UINT8, TYPE_UINT16, TYPE_UINT32 then val.setUint(value) when TYPE_UINT64 then val.setUint64(value) when TYPE_SSTR, TYPE_LSTR then value ? val.setString(value) : val.setString('') when TYPE_ABSTIME then val.setInt64(value) when TYPE_DELTATIME then val.setUint64(value) when TYPE_REF then val.setObjectId(value.impl) when TYPE_BOOL then value ? val.setBool(value) : val.setBool(0) when TYPE_FLOAT then val.setFloat(value) when TYPE_DOUBLE then val.setDouble(value) when TYPE_UUID then val.setUuid(value) when TYPE_INT8, TYPE_INT16, TYPE_INT32 then val.setInt(value) when TYPE_INT64 then val.setInt64(value) when TYPE_MAP then dict_to_value(val, value) when TYPE_LIST then list_to_value(val, value) when TYPE_OBJECT when TYPE_ARRAY end return val end def pick_qmf_type(value) if value.class == Fixnum if value >= 0 return TYPE_UINT32 if value < 0x100000000 return TYPE_UINT64 else return TYPE_INT32 if value > -0xffffffff return TYPE_INT64 end end if value.class == Bignum return TYPE_UINT64 if value >= 0 return TYPE_INT64 end if value.class == String return TYPE_SSTR if value.length < 256 return TYPE_LSTR end return TYPE_DOUBLE if value.class == Float return TYPE_BOOL if value.class == TrueClass return TYPE_BOOL if value.class == FalseClass return TYPE_BOOL if value.class == NilClass return TYPE_MAP if value.class == Hash return TYPE_LIST if value.class == Array raise ArgumentError, "QMF type not known for native type #{value.class}" end def value_to_dict(val) # Assume val is of type Qmfengine::Value raise ArgumentError, "value_to_dict must be given a map value" if !val.isMap map = {} for i in 0...val.keyCount key = val.key(i) map[key] = qmf_to_native(val.byKey(key)) end return map end def dict_to_value(val, map) map.each do |key, value| raise ArgumentError, "QMF map key must be a string" if key.class != String typecode = pick_qmf_type(value) val.insert(key, native_to_qmf(typecode, value)) end end def value_to_list(val) # Assume val is of type Qmfengine::Value raise ArgumentError, "value_to_dict must be given a map value" if !val.isList list = [] for i in 0...val.listItemCount list.push(qmf_to_native(val.listItem(i))) end return list end def list_to_value(val, list) list.each do |value| typecode = pick_qmf_type(value) val.appendToList(native_to_qmf(typecode, value)) end end end $util = Util.new ##============================================================================== ## CONNECTION ##============================================================================== class ConnectionSettings attr_reader :impl def initialize(url = nil) if url @impl = Qmfengine::ConnectionSettings.new(url) else @impl = Qmfengine::ConnectionSettings.new() end end def set_attr(key, val) if val.class == String v = Qmfengine::Value.new(TYPE_LSTR) v.setString(val) elsif val.class == TrueClass or val.class == FalseClass v = Qmfengine::Value.new(TYPE_BOOL) v.setBool(val) elsif val.class == Fixnum v = Qmfengine::Value.new(TYPE_UINT32) v.setUint(val) else raise ArgumentError, "Value for attribute '#{key}' has unsupported type: #{val.class}" end good = @impl.setAttr(key, v) raise "Invalid attribute '#{key}'" unless good end def get_attr(key) _v = @impl.getAttr(key) if _v.isString() return _v.asString() elsif _v.isUint() return _v.asUint() elsif _v.isBool() return _v.asBool() else raise Exception("Argument error: value for attribute '#{key}' has unsupported type: #{_v.getType()}") end end def method_missing(name_in, *args) name = name_in.to_s if name[name.length - 1] == 61 attr = name[0..name.length - 2] set_attr(attr, args[0]) return else return get_attr(name) end end end class ConnectionHandler def conn_event_connected(); end def conn_event_disconnected(error); end def conn_event_visit(); end def sess_event_session_closed(context, error); end def sess_event_recv(context, message); end end class Connection include MonitorMixin attr_reader :impl def initialize(settings) super() @impl = Qmfengine::ResilientConnection.new(settings.impl) @sockEngine, @sock = Socket::socketpair(Socket::PF_UNIX, Socket::SOCK_STREAM, 0) @impl.setNotifyFd(@sockEngine.fileno) @new_conn_handlers = [] @conn_handlers_to_delete = [] @conn_handlers = [] @connected = nil @thread = Thread.new do run end end def connected? @connected end def kick @impl.notify end def add_conn_handler(handler) synchronize do @new_conn_handlers << handler end kick end def del_conn_handler(handler) synchronize do @conn_handlers_to_delete << handler end kick end def run() eventImpl = Qmfengine::ResilientConnectionEvent.new new_handlers = nil del_handlers = nil bt_count = 0 while :true @sock.read(1) synchronize do new_handlers = @new_conn_handlers del_handlers = @conn_handlers_to_delete @new_conn_handlers = [] @conn_handlers_to_delete = [] end new_handlers.each do |nh| @conn_handlers << nh nh.conn_event_connected() if @connected end new_handlers = nil del_handlers.each do |dh| d = @conn_handlers.delete(dh) end del_handlers = nil valid = @impl.getEvent(eventImpl) while valid begin case eventImpl.kind when Qmfengine::ResilientConnectionEvent::CONNECTED @connected = :true @conn_handlers.each { |h| h.conn_event_connected() } when Qmfengine::ResilientConnectionEvent::DISCONNECTED @connected = nil @conn_handlers.each { |h| h.conn_event_disconnected(eventImpl.errorText) } when Qmfengine::ResilientConnectionEvent::SESSION_CLOSED eventImpl.sessionContext.handler.sess_event_session_closed(eventImpl.sessionContext, eventImpl.errorText) when Qmfengine::ResilientConnectionEvent::RECV eventImpl.sessionContext.handler.sess_event_recv(eventImpl.sessionContext, eventImpl.message) end rescue Exception => ex puts "Event Exception: #{ex}" if bt_count < 2 puts ex.backtrace bt_count += 1 end end @impl.popEvent valid = @impl.getEvent(eventImpl) end @conn_handlers.each { |h| h.conn_event_visit } end end end class Session attr_reader :handle, :handler def initialize(conn, label, handler) @conn = conn @label = label @handler = handler @handle = Qmfengine::SessionHandle.new result = @conn.impl.createSession(label, self, @handle) end def destroy() @conn.impl.destroySession(@handle) end end ##============================================================================== ## OBJECTS and EVENTS ##============================================================================== class QmfEvent attr_reader :impl, :event_class def initialize(cls, kwargs={}) @broker = kwargs[:broker] if kwargs.include?(:broker) @allow_sets = :true if cls: @event_class = cls @impl = Qmfengine::Event.new(@event_class.impl) elsif kwargs.include?(:impl) @impl = Qmfengine::Event.new(kwargs[:impl]) @event_class = SchemaEventClass.new(nil, nil, nil, :impl => @impl.getClass) end end def arguments list = [] @event_class.arguments.each do |arg| list << [arg, get_attr(arg.name)] end return list end def get_attr(name) val = value(name) $util.qmf_to_native(val) end def set_attr(name, v) val = value(name) $util.native_to_qmf(val, v) end def [](name) get_attr(name) end def []=(name, value) set_attr(name, value) end def method_missing(name_in, *args) # # Convert the name to a string and determine if it represents an # attribute assignment (i.e. "attr=") # name = name_in.to_s attr_set = (name[name.length - 1] == 61) name = name[0..name.length - 2] if attr_set raise "Sets not permitted on this object" if attr_set && !@allow_sets # # If the name matches an argument name, set or return the value of the argument. # @event_class.arguments.each do |arg| if arg.name == name if attr_set return set_attr(name, args[0]) else return get_attr(name) end end end # # This name means nothing to us, pass it up the line to the parent # class's handler. # super.method_missing(name_in, args) end private def value(name) val = @impl.getValue(name.to_s) if val.nil? raise ArgumentError, "Attribute '#{name}' not defined for event #{@event_class.impl.getClassKey.getPackageName}:#{@object_class.impl.getClassKey.getClassName}" end return val end end class QmfObject include MonitorMixin attr_reader :impl, :object_class def initialize(cls, kwargs={}) super() @cv = new_cond @sync_count = 0 @sync_result = nil @allow_sets = :false @broker = kwargs[:broker] if kwargs.include?(:broker) if cls: @object_class = cls @impl = Qmfengine::Object.new(@object_class.impl) elsif kwargs.include?(:impl) @impl = Qmfengine::Object.new(kwargs[:impl]) @object_class = SchemaObjectClass.new(nil, nil, :impl => @impl.getClass) end end def object_id return ObjectId.new(@impl.getObjectId) end def properties list = [] @object_class.properties.each do |prop| list << [prop, get_attr(prop.name)] end return list end def statistics list = [] @object_class.statistics.each do |stat| list << [stat, get_attr(stat.name)] end return list end def get_attr(name) val = value(name) $util.qmf_to_native(val) end def set_attr(name, v) val = value(name) $util.native_to_qmf(val, v) end def [](name) get_attr(name) end def []=(name, value) set_attr(name, value) end def inc_attr(name, by=1) set_attr(name, get_attr(name) + by) end def dec_attr(name, by=1) set_attr(name, get_attr(name) - by) end def method_missing(name_in, *args) # # Convert the name to a string and determine if it represents an # attribute assignment (i.e. "attr=") # name = name_in.to_s attr_set = (name[name.length - 1] == 61) name = name[0..name.length - 2] if attr_set raise "Sets not permitted on this object" if attr_set && !@allow_sets # # If the name matches a property name, set or return the value of the property. # @object_class.properties.each do |prop| if prop.name == name if attr_set return set_attr(name, args[0]) else return get_attr(name) end end end # # Do the same for statistics # @object_class.statistics.each do |stat| if stat.name == name if attr_set return set_attr(name, args[0]) else return get_attr(name) end end end # # If we still haven't found a match for the name, check to see if # it matches a method name. If so, marshall the arguments and invoke # the method. # @object_class.methods.each do |method| if method.name == name raise "Sets not permitted on methods" if attr_set timeout = 30 synchronize do @sync_count = 1 @impl.invokeMethod(name, _marshall(method, args), self) @broker.conn.kick if @broker unless @cv.wait(timeout) { @sync_count == 0 } raise "Timed out waiting for response" end end return @sync_result end end # # This name means nothing to us, pass it up the line to the parent # class's handler. # super.method_missing(name_in, args) end def _method_result(result) synchronize do @sync_result = result @sync_count -= 1 @cv.signal end end # # Convert a Ruby array of arguments (positional) into a Value object of type "map". # private def _marshall(schema, args) map = Qmfengine::Value.new(TYPE_MAP) schema.arguments.each do |arg| if arg.direction == DIR_IN || arg.direction == DIR_IN_OUT map.insert(arg.name, Qmfengine::Value.new(arg.typecode)) end end marshalled = Arguments.new(map) idx = 0 schema.arguments.each do |arg| if arg.direction == DIR_IN || arg.direction == DIR_IN_OUT marshalled[arg.name] = args[idx] unless args[idx] == nil idx += 1 end end return marshalled.map end private def value(name) val = @impl.getValue(name.to_s) if val.nil? raise ArgumentError, "Attribute '#{name}' not defined for class #{@object_class.impl.getClassKey.getPackageName}:#{@object_class.impl.getClassKey.getClassName}" end return val end end class AgentObject < QmfObject def initialize(cls, kwargs={}) super(cls, kwargs) @allow_sets = :true end def destroy @impl.destroy end def set_object_id(oid) @impl.setObjectId(oid.impl) end end class ConsoleObject < QmfObject attr_reader :current_time, :create_time, :delete_time def initialize(cls, kwargs={}) super(cls, kwargs) end def update() raise "No linkage to broker" unless @broker newer = @broker.console.objects(Query.new(:object_id => object_id)) raise "Expected exactly one update for this object" unless newer.size == 1 merge_update(newer[0]) end def merge_update(new_object) @impl.merge(new_object.impl) end def deleted?() @impl.isDeleted end def key() end end class ObjectId attr_reader :impl, :agent_key def initialize(impl=nil) if impl @impl = Qmfengine::ObjectId.new(impl) else @impl = Qmfengine::ObjectId.new end @agent_key = "#{@impl.getBrokerBank}.#{@impl.getAgentBank}" end def object_num_high @impl.getObjectNumHi end def object_num_low @impl.getObjectNumLo end def ==(other) return @impl == other.impl end def to_s @impl.str end end class Arguments attr_reader :map def initialize(map) @map = map @by_hash = {} key_count = @map.keyCount a = 0 while a < key_count key = @map.key(a) @by_hash[key] = $util.qmf_to_native(@map.byKey(key)) a += 1 end end def [] (key) return @by_hash[key] end def []= (key, value) @by_hash[key] = value set(key, value) end def each @by_hash.each { |k, v| yield(k, v) } end def method_missing(name, *args) if @by_hash.include?(name.to_s) return @by_hash[name.to_s] end super.method_missing(name, args) end def set(key, value) val = @map.byKey(key) $util.native_to_qmf(val, value) end end class MethodResponse def initialize(impl) @impl = Qmfengine::MethodResponse.new(impl) end def status @impl.getStatus end def exception @impl.getException end def text exception.asString end def args Arguments.new(@impl.getArgs) end def method_missing(name, *extra_args) args.__send__(name, extra_args) end end ##============================================================================== ## QUERY ##============================================================================== class Query attr_reader :impl def initialize(kwargs = {}) if kwargs.include?(:impl) @impl = Qmfengine::Query.new(kwargs[:impl]) else package = '' if kwargs.include?(:key) @impl = Qmfengine::Query.new(kwargs[:key]) elsif kwargs.include?(:object_id) @impl = Qmfengine::Query.new(kwargs[:object_id].impl) else package = kwargs[:package] if kwargs.include?(:package) if kwargs.include?(:class) @impl = Qmfengine::Query.new(kwargs[:class], package) else raise ArgumentError, "Invalid arguments, use :key, :object_id or :class[,:package]" end end end end def package_name @impl.getPackage end def class_name @impl.getClass end def object_id objid = @impl.getObjectId if objid.class == NilClass return nil end return ObjectId.new(objid) end end ##============================================================================== ## SCHEMA ##============================================================================== class SchemaArgument attr_reader :impl def initialize(name, typecode, kwargs={}) if kwargs.include?(:impl) @impl = kwargs[:impl] else @impl = Qmfengine::SchemaArgument.new(name, typecode) @impl.setDirection(kwargs[:dir]) if kwargs.include?(:dir) @impl.setUnit(kwargs[:unit]) if kwargs.include?(:unit) @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc) end end def name @impl.getName end def direction @impl.getDirection end def typecode @impl.getType end def to_s name end end class SchemaMethod attr_reader :impl, :arguments def initialize(name, kwargs={}) @arguments = [] if kwargs.include?(:impl) @impl = kwargs[:impl] arg_count = @impl.getArgumentCount for i in 0...arg_count @arguments << SchemaArgument.new(nil, nil, :impl => @impl.getArgument(i)) end else @impl = Qmfengine::SchemaMethod.new(name) @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc) end end def add_argument(arg) @arguments << arg @impl.addArgument(arg.impl) end def name @impl.getName end def to_s name end end class SchemaProperty attr_reader :impl def initialize(name, typecode, kwargs={}) if kwargs.include?(:impl) @impl = kwargs[:impl] else @impl = Qmfengine::SchemaProperty.new(name, typecode) @impl.setAccess(kwargs[:access]) if kwargs.include?(:access) @impl.setIndex(kwargs[:index]) if kwargs.include?(:index) @impl.setOptional(kwargs[:optional]) if kwargs.include?(:optional) @impl.setUnit(kwargs[:unit]) if kwargs.include?(:unit) @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc) end end def name @impl.getName end def to_s name end end class SchemaStatistic attr_reader :impl def initialize(name, typecode, kwargs={}) if kwargs.include?(:impl) @impl = kwargs[:impl] else @impl = Qmfengine::SchemaStatistic.new(name, typecode) @impl.setUnit(kwargs[:unit]) if kwargs.include?(:unit) @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc) end end def name @impl.getName end def to_s name end end class SchemaClassKey attr_reader :impl def initialize(i) @impl = Qmfengine::SchemaClassKey.new(i) end def package_name @impl.getPackageName end def class_name @impl.getClassName end def to_s @impl.asString end end class SchemaObjectClass attr_reader :impl, :properties, :statistics, :methods def initialize(package, name, kwargs={}) @properties = [] @statistics = [] @methods = [] if kwargs.include?(:impl) @impl = kwargs[:impl] @impl.getPropertyCount.times do |i| @properties << SchemaProperty.new(nil, nil, :impl => @impl.getProperty(i)) end @impl.getStatisticCount.times do |i| @statistics << SchemaStatistic.new(nil, nil, :impl => @impl.getStatistic(i)) end @impl.getMethodCount.times do |i| @methods << SchemaMethod.new(nil, :impl => @impl.getMethod(i)) end else @impl = Qmfengine::SchemaObjectClass.new(package, name) end end def add_property(prop) @properties << prop @impl.addProperty(prop.impl) end def add_statistic(stat) @statistics << stat @impl.addStatistic(stat.impl) end def add_method(meth) @methods << meth @impl.addMethod(meth.impl) end def class_key SchemaClassKey.new(@impl.getClassKey) end def package_name @impl.getClassKey.getPackageName end def class_name @impl.getClassKey.getClassName end end class SchemaEventClass attr_reader :impl, :arguments def initialize(package, name, sev, kwargs={}) @arguments = [] if kwargs.include?(:impl) @impl = kwargs[:impl] @impl.getArgumentCount.times do |i| @arguments << SchemaArgument.new(nil, nil, :impl => @impl.getArgument(i)) end else @impl = Qmfengine::SchemaEventClass.new(package, name, sev) @impl.setDesc(kwargs[:desc]) if kwargs.include?(:desc) end end def add_argument(arg) @arguments << arg @impl.addArgument(arg.impl) end def name @impl.getClassKey.getClassName end def class_key SchemaClassKey.new(@impl.getClassKey) end def package_name @impl.getClassKey.getPackageName end def class_name @impl.getClassKey.getClassName end end ##============================================================================== ## CONSOLE ##============================================================================== class ConsoleHandler def agent_added(agent); end def agent_deleted(agent); end def new_package(package); end def new_class(class_key); end def object_update(object, hasProps, hasStats); end def event_received(event); end def agent_heartbeat(agent, timestamp); end def method_response(resp); end def broker_info(broker); end end class Console include MonitorMixin attr_reader :impl def initialize(handler = nil, kwargs={}) super() @handler = handler @impl = Qmfengine::Console.new @event = Qmfengine::ConsoleEvent.new @broker_list = [] @cv = new_cond @sync_count = nil @sync_result = nil @select = [] @bt_count = 0 @cb_cond = new_cond @cb_thread = Thread.new do run_cb_thread end end def add_connection(conn) broker = Broker.new(self, conn) synchronize { @broker_list << broker } return broker end def del_connection(broker) broker.shutdown synchronize { @broker_list.delete(broker) } end def packages() plist = [] count = @impl.packageCount for i in 0...count plist << @impl.getPackageName(i) end return plist end def classes(package, kind=CLASS_OBJECT) clist = [] count = @impl.classCount(package) for i in 0...count key = @impl.getClass(package, i) class_kind = @impl.getClassKind(key) if class_kind == kind if kind == CLASS_OBJECT clist << SchemaObjectClass.new(nil, nil, :impl => @impl.getObjectClass(key)) elsif kind == CLASS_EVENT clist << SchemaEventClass.new(nil, nil, nil, :impl => @impl.getEventClass(key)) end end end return clist end def bind_package(package) @impl.bindPackage(package) end def bind_class(kwargs = {}) if kwargs.include?(:key) @impl.bindClass(kwargs[:key]) elsif kwargs.include?(:package) package = kwargs[:package] if kwargs.include?(:class) @impl.bindClass(package, kwargs[:class]) else @impl.bindClass(package) end else raise ArgumentError, "Invalid arguments, use :key or :package[,:class]" end end def bind_event(kwargs = {}) if kwargs.include?(:key) @impl.bindEvent(kwargs[:key]) elsif kwargs.include?(:package) package = kwargs[:package] if kwargs.include?(:event) @impl.bindEvent(package, kwargs[:event]) else @impl.bindEvent(package, "*") end else raise ArgumentError, "Invalid arguments, use :key or :package[,:event]" end end def agents(broker = nil) blist = [] if broker blist << broker else synchronize { blist = @broker_list } end agents = [] blist.each do |b| count = b.impl.agentCount for idx in 0...count agents << AgentProxy.new(b.impl.getAgent(idx), b) end end return agents end def objects(query, kwargs = {}) timeout = 30 agent = nil kwargs.merge!(query) if query.class == Hash if kwargs.include?(:timeout) timeout = kwargs[:timeout] kwargs.delete(:timeout) end if kwargs.include?(:agent) agent = kwargs[:agent] kwargs.delete(:agent) end query = Query.new(kwargs) if query.class == Hash @select = [] kwargs.each do |k,v| @select << [k, v] if k.is_a?(String) end synchronize do @sync_count = 1 @sync_result = [] broker = nil synchronize { broker = @broker_list[0] } broker.send_query(query.impl, nil, agent) unless @cv.wait(timeout) { @sync_count == 0 } raise "Timed out waiting for response" end return @sync_result end end # Return one and only one object or nil. def object(query, kwargs = {}) objs = objects(query, kwargs) return objs.length == 1 ? objs[0] : nil end # Return the first of potentially many objects. def first_object(query, kwargs = {}) objs = objects(query, kwargs) return objs.length > 0 ? objs[0] : nil end # Check the object against select to check for a match def select_match(object) @select.each do |key, value| object.properties.each do |prop, propval| if key == prop.name && value != propval return nil end end end return :true end def _get_result(list, context) synchronize do list.each do |item| @sync_result << item if select_match(item) end @sync_count -= 1 @cv.signal end end def start_sync(query) end def touch_sync(sync) end def end_sync(sync) end def run_cb_thread while :true synchronize { @cb_cond.wait(1) } begin count = do_console_events end until count == 0 end end def start_console_events synchronize { @cb_cond.signal } end def do_console_events count = 0 valid = @impl.getEvent(@event) while valid count += 1 begin case @event.kind when Qmfengine::ConsoleEvent::AGENT_ADDED @handler.agent_added(AgentProxy.new(@event.agent, nil)) if @handler when Qmfengine::ConsoleEvent::AGENT_DELETED @handler.agent_deleted(AgentProxy.new(@event.agent, nil)) if @handler when Qmfengine::ConsoleEvent::NEW_PACKAGE @handler.new_package(@event.name) if @handler when Qmfengine::ConsoleEvent::NEW_CLASS @handler.new_class(SchemaClassKey.new(@event.classKey)) if @handler when Qmfengine::ConsoleEvent::OBJECT_UPDATE @handler.object_update(ConsoleObject.new(nil, :impl => @event.object), @event.hasProps, @event.hasStats) if @handler when Qmfengine::ConsoleEvent::EVENT_RECEIVED @handler.event_received(QmfEvent.new(nil, :impl => @event.event)) if @handler when Qmfengine::ConsoleEvent::AGENT_HEARTBEAT @handler.agent_heartbeat(AgentProxy.new(@event.agent, nil), @event.timestamp) if @handler when Qmfengine::ConsoleEvent::METHOD_RESPONSE end rescue Exception => ex puts "Exception caught in callback: #{ex}" if @bt_count < 2 puts ex.backtrace @bt_count += 1 end end @impl.popEvent valid = @impl.getEvent(@event) end return count end end class AgentProxy attr_reader :impl, :broker, :label, :key def initialize(impl, broker) @impl = Qmfengine::AgentProxy.new(impl) @broker = broker @label = @impl.getLabel @key = "#{@impl.getBrokerBank}.#{@impl.getAgentBank}" end end class Broker < ConnectionHandler include MonitorMixin attr_reader :impl, :conn, :console, :broker_bank def initialize(console, conn) super() @broker_bank = 1 @console = console @conn = conn @session = nil @cv = new_cond @stable = nil @event = Qmfengine::BrokerEvent.new @xmtMessage = Qmfengine::Message.new @impl = Qmfengine::BrokerProxy.new(@console.impl) @console.impl.addConnection(@impl, self) @conn.add_conn_handler(self) @operational = :true end def shutdown() @console.impl.delConnection(@impl) @conn.del_conn_handler(self) @operational = :false end def wait_for_stable(timeout = nil) synchronize do return if @stable if timeout unless @cv.wait(timeout) { @stable } raise "Timed out waiting for broker connection to become stable" end else while not @stable @cv.wait end end end end def send_query(query, ctx, agent) agent_impl = agent.impl if agent @impl.sendQuery(query, ctx, agent_impl) @conn.kick end def do_broker_events() count = 0 valid = @impl.getEvent(@event) while valid count += 1 case @event.kind when Qmfengine::BrokerEvent::BROKER_INFO when Qmfengine::BrokerEvent::DECLARE_QUEUE @conn.impl.declareQueue(@session.handle, @event.name) when Qmfengine::BrokerEvent::DELETE_QUEUE @conn.impl.deleteQueue(@session.handle, @event.name) when Qmfengine::BrokerEvent::BIND @conn.impl.bind(@session.handle, @event.exchange, @event.name, @event.bindingKey) when Qmfengine::BrokerEvent::UNBIND @conn.impl.unbind(@session.handle, @event.exchange, @event.name, @event.bindingKey) when Qmfengine::BrokerEvent::SETUP_COMPLETE @impl.startProtocol when Qmfengine::BrokerEvent::STABLE synchronize do @stable = :true @cv.signal end when Qmfengine::BrokerEvent::QUERY_COMPLETE result = [] for idx in 0...@event.queryResponse.getObjectCount result << ConsoleObject.new(nil, :impl => @event.queryResponse.getObject(idx), :broker => self) end @console._get_result(result, @event.context) when Qmfengine::BrokerEvent::METHOD_RESPONSE obj = @event.context obj._method_result(MethodResponse.new(@event.methodResponse)) end @impl.popEvent valid = @impl.getEvent(@event) end return count end def do_broker_messages() count = 0 valid = @impl.getXmtMessage(@xmtMessage) while valid count += 1 @conn.impl.sendMessage(@session.handle, @xmtMessage) @impl.popXmt valid = @impl.getXmtMessage(@xmtMessage) end return count end def do_events() begin @console.start_console_events bcnt = do_broker_events mcnt = do_broker_messages end until bcnt == 0 and mcnt == 0 end def conn_event_connected() puts "Console Connection Established..." @session = Session.new(@conn, "qmfc-%s.%d" % [Socket.gethostname, Process::pid], self) @impl.sessionOpened(@session.handle) do_events end def conn_event_disconnected(error) puts "Console Connection Lost" end def conn_event_visit do_events end def sess_event_session_closed(context, error) puts "Console Session Lost" @impl.sessionClosed() end def sess_event_recv(context, message) puts "Unexpected RECV Event" if not @operational @impl.handleRcvMessage(message) do_events end end ##============================================================================== ## AGENT ##============================================================================== class AgentHandler def get_query(context, query, userId); end def method_call(context, name, object_id, args, userId); end end class Agent < ConnectionHandler def initialize(handler, label="") if label == "" @agentLabel = "rb-%s.%d" % [Socket.gethostname, Process::pid] else @agentLabel = label end @conn = nil @handler = handler @impl = Qmfengine::Agent.new(@agentLabel) @event = Qmfengine::AgentEvent.new @xmtMessage = Qmfengine::Message.new end def set_connection(conn) @conn = conn @conn.add_conn_handler(self) end def register_class(cls) @impl.registerClass(cls.impl) end def alloc_object_id(low = 0, high = 0) ObjectId.new(@impl.allocObjectId(low, high)) end def raise_event(event) @impl.raiseEvent(event.impl) end def query_response(context, object) @impl.queryResponse(context, object.impl) end def query_complete(context) @impl.queryComplete(context) end def method_response(context, status, text, arguments) @impl.methodResponse(context, status, text, arguments.map) end def do_agent_events() count = 0 valid = @impl.getEvent(@event) while valid count += 1 case @event.kind when Qmfengine::AgentEvent::GET_QUERY @handler.get_query(@event.sequence, Query.new(:impl => @event.query), @event.authUserId) when Qmfengine::AgentEvent::START_SYNC when Qmfengine::AgentEvent::END_SYNC when Qmfengine::AgentEvent::METHOD_CALL args = Arguments.new(@event.arguments) @handler.method_call(@event.sequence, @event.name, ObjectId.new(@event.objectId), args, @event.authUserId) when Qmfengine::AgentEvent::DECLARE_QUEUE @conn.impl.declareQueue(@session.handle, @event.name) when Qmfengine::AgentEvent::DELETE_QUEUE @conn.impl.deleteQueue(@session.handle, @event.name) when Qmfengine::AgentEvent::BIND @conn.impl.bind(@session.handle, @event.exchange, @event.name, @event.bindingKey) when Qmfengine::AgentEvent::UNBIND @conn.impl.unbind(@session.handle, @event.exchange, @event.name, @event.bindingKey) when Qmfengine::AgentEvent::SETUP_COMPLETE @impl.startProtocol() end @impl.popEvent valid = @impl.getEvent(@event) end return count end def do_agent_messages() count = 0 valid = @impl.getXmtMessage(@xmtMessage) while valid count += 1 @conn.impl.sendMessage(@session.handle, @xmtMessage) @impl.popXmt valid = @impl.getXmtMessage(@xmtMessage) end return count end def do_events() begin ecnt = do_agent_events mcnt = do_agent_messages end until ecnt == 0 and mcnt == 0 end def conn_event_connected() puts "Agent Connection Established..." @session = Session.new(@conn, "qmfa-%s.%d" % [Socket.gethostname, Process::pid], self) @impl.newSession do_events end def conn_event_disconnected(error) puts "Agent Connection Lost" end def conn_event_visit do_events end def sess_event_session_closed(context, error) puts "Agent Session Lost" end def sess_event_recv(context, message) @impl.handleRcvMessage(message) do_events end end end qpidc-0.16/bindings/qmf/ruby/Makefile.in0000664000076400007640000005467511752725661020577 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = bindings/qmf/ruby DIST_COMMON = $(am__dist_rubylib_DATA_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(rubylibarchdir)" \ "$(DESTDIR)$(rubylibdir)" LTLIBRARIES = $(rubylibarch_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_RUBY_DEVEL_TRUE@qmfengine_la_DEPENDENCIES = \ @HAVE_RUBY_DEVEL_TRUE@ $(am__DEPENDENCIES_1) \ @HAVE_RUBY_DEVEL_TRUE@ $(top_builddir)/src/libqmfengine.la @HAVE_RUBY_DEVEL_TRUE@nodist_qmfengine_la_OBJECTS = \ @HAVE_RUBY_DEVEL_TRUE@ qmfengine_la-qmfengine.lo qmfengine_la_OBJECTS = $(nodist_qmfengine_la_OBJECTS) qmfengine_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(qmfengine_la_CXXFLAGS) \ $(CXXFLAGS) $(qmfengine_la_LDFLAGS) $(LDFLAGS) -o $@ @HAVE_RUBY_DEVEL_TRUE@am_qmfengine_la_rpath = -rpath $(rubylibarchdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(nodist_qmfengine_la_SOURCES) DIST_SOURCES = am__dist_rubylib_DATA_DIST = qmf.rb DATA = $(dist_rubylib_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_RUBY_DEVEL_TRUE@INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src @HAVE_RUBY_DEVEL_TRUE@EXTRA_DIST = CMakeLists.txt ruby.i @HAVE_RUBY_DEVEL_TRUE@BUILT_SOURCES = qmfengine.cpp @HAVE_RUBY_DEVEL_TRUE@SWIG_FLAGS = -w362,401 @HAVE_RUBY_DEVEL_TRUE@rubylibdir = $(RUBY_LIB) @HAVE_RUBY_DEVEL_TRUE@dist_rubylib_DATA = qmf.rb @HAVE_RUBY_DEVEL_TRUE@rubylibarchdir = $(RUBY_LIB_ARCH) @HAVE_RUBY_DEVEL_TRUE@rubylibarch_LTLIBRARIES = qmfengine.la @HAVE_RUBY_DEVEL_TRUE@qmfengine_la_LDFLAGS = -avoid-version -module -shared -shrext ".$(RUBY_DLEXT)" @HAVE_RUBY_DEVEL_TRUE@qmfengine_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmfengine.la @HAVE_RUBY_DEVEL_TRUE@qmfengine_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH) -fno-strict-aliasing @HAVE_RUBY_DEVEL_TRUE@nodist_qmfengine_la_SOURCES = qmfengine.cpp @HAVE_RUBY_DEVEL_TRUE@CLEANFILES = qmfengine.cpp all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bindings/qmf/ruby/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bindings/qmf/ruby/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 $(am__aclocal_m4_deps): install-rubylibarchLTLIBRARIES: $(rubylibarch_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(rubylibarchdir)" || $(MKDIR_P) "$(DESTDIR)$(rubylibarchdir)" @list='$(rubylibarch_LTLIBRARIES)'; test -n "$(rubylibarchdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(rubylibarchdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(rubylibarchdir)"; \ } uninstall-rubylibarchLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(rubylibarch_LTLIBRARIES)'; test -n "$(rubylibarchdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(rubylibarchdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(rubylibarchdir)/$$f"; \ done clean-rubylibarchLTLIBRARIES: -test -z "$(rubylibarch_LTLIBRARIES)" || rm -f $(rubylibarch_LTLIBRARIES) @list='$(rubylibarch_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 qmfengine.la: $(qmfengine_la_OBJECTS) $(qmfengine_la_DEPENDENCIES) $(qmfengine_la_LINK) $(am_qmfengine_la_rpath) $(qmfengine_la_OBJECTS) $(qmfengine_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qmfengine_la-qmfengine.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @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@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @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 $@ $< qmfengine_la-qmfengine.lo: qmfengine.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qmfengine_la_CXXFLAGS) $(CXXFLAGS) -MT qmfengine_la-qmfengine.lo -MD -MP -MF $(DEPDIR)/qmfengine_la-qmfengine.Tpo -c -o qmfengine_la-qmfengine.lo `test -f 'qmfengine.cpp' || echo '$(srcdir)/'`qmfengine.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/qmfengine_la-qmfengine.Tpo $(DEPDIR)/qmfengine_la-qmfengine.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='qmfengine.cpp' object='qmfengine_la-qmfengine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(qmfengine_la_CXXFLAGS) $(CXXFLAGS) -c -o qmfengine_la-qmfengine.lo `test -f 'qmfengine.cpp' || echo '$(srcdir)/'`qmfengine.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_rubylibDATA: $(dist_rubylib_DATA) @$(NORMAL_INSTALL) test -z "$(rubylibdir)" || $(MKDIR_P) "$(DESTDIR)$(rubylibdir)" @list='$(dist_rubylib_DATA)'; test -n "$(rubylibdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rubylibdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rubylibdir)" || exit $$?; \ done uninstall-dist_rubylibDATA: @$(NORMAL_UNINSTALL) @list='$(dist_rubylib_DATA)'; test -n "$(rubylibdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(rubylibdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(rubylibdir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(rubylibarchdir)" "$(DESTDIR)$(rubylibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-rubylibarchLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_rubylibDATA \ install-rubylibarchLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_rubylibDATA \ uninstall-rubylibarchLTLIBRARIES .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-rubylibarchLTLIBRARIES 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-dist_rubylibDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am \ install-rubylibarchLTLIBRARIES 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-dist_rubylibDATA \ uninstall-rubylibarchLTLIBRARIES @HAVE_RUBY_DEVEL_TRUE@qmfengine.cpp: $(srcdir)/ruby.i $(srcdir)/../qmfengine.i @HAVE_RUBY_DEVEL_TRUE@ $(SWIG) -ruby -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o qmfengine.cpp $(srcdir)/ruby.i # 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: qpidc-0.16/bindings/qmf/ruby/Makefile.am0000664000076400007640000000321711656043025020536 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if HAVE_RUBY_DEVEL INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src EXTRA_DIST = CMakeLists.txt ruby.i BUILT_SOURCES = qmfengine.cpp SWIG_FLAGS = -w362,401 rubylibdir = $(RUBY_LIB) dist_rubylib_DATA = qmf.rb qmfengine.cpp: $(srcdir)/ruby.i $(srcdir)/../qmfengine.i $(SWIG) -ruby -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o qmfengine.cpp $(srcdir)/ruby.i rubylibarchdir = $(RUBY_LIB_ARCH) rubylibarch_LTLIBRARIES = qmfengine.la qmfengine_la_LDFLAGS = -avoid-version -module -shared -shrext ".$(RUBY_DLEXT)" qmfengine_la_LIBADD = $(RUBY_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmfengine.la qmfengine_la_CXXFLAGS = $(INCLUDES) -I$(RUBY_INC) -I$(RUBY_INC_ARCH) -fno-strict-aliasing nodist_qmfengine_la_SOURCES = qmfengine.cpp CLEANFILES = qmfengine.cpp endif # HAVE_RUBY_DEVEL qpidc-0.16/bindings/qmf/ruby/ruby.i0000664000076400007640000000407011320713330017622 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %include stl.i %module qmfengine %typemap (in) void * { $1 = (void *) $input; } %typemap (out) void * { $result = (VALUE) $1; } %typemap (in) uint16_t { $1 = NUM2UINT ($input); } %typemap (out) uint16_t { $result = UINT2NUM((uint16_t) $1); } %typemap (in) uint32_t { if (TYPE($input) == T_BIGNUM) $1 = NUM2UINT($input); else $1 = FIX2UINT($input); } %typemap (out) uint32_t { $result = UINT2NUM((uint32_t) $1); } %typemap (in) int32_t { if (TYPE($input) == T_BIGNUM) $1 = NUM2INT($input); else $1 = FIX2INT($input); } %typemap (out) int32_t { $result = INT2NUM((int32_t) $1); } %typemap (typecheck, precedence=SWIG_TYPECHECK_INTEGER) uint32_t { $1 = FIXNUM_P($input); } %typemap (in) uint64_t { if (TYPE($input) == T_BIGNUM) $1 = NUM2ULL($input); else $1 = (uint64_t) FIX2ULONG($input); } %typemap (out) uint64_t { $result = ULL2NUM((uint64_t) $1); } %typemap (in) int64_t { if (TYPE($input) == T_BIGNUM) $1 = NUM2LL($input); else $1 = (int64_t) FIX2LONG($input); } %typemap (out) int64_t { $result = LL2NUM((int64_t) $1); } %typemap (typecheck, precedence=SWIG_TYPECHECK_INTEGER) uint64_t { $1 = FIXNUM_P($input); } %include "../qmfengine.i" qpidc-0.16/bindings/qmf/ruby/CMakeLists.txt0000664000076400007640000000332311654522741021245 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # ##------------------------------------------------------ ## Use Swig to generate a literal binding to the C++ API ##------------------------------------------------------ set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES CPLUSPLUS ON) set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/ruby.i PROPERTIES SWIG_FLAGS "-I${qpid-cpp_SOURCE_DIR}/include") swig_add_module(qmfengine_ruby ruby ${CMAKE_CURRENT_SOURCE_DIR}/ruby.i) swig_link_libraries(qmfengine_ruby qmf qmfconsole ${RUBY_LIBRARY}) set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-I${RUBY_INCLUDE_DIR} -I${qpid-cpp_SOURCE_DIR}/include") ##---------------------------------- ## Install the complete Ruby binding ##---------------------------------- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libqmfengine_ruby.so RENAME qmfengine.so DESTINATION ${RUBY_ARCH_DIR} COMPONENT ${QPID_COMPONENT_CLIENT} ) qpidc-0.16/bindings/swig_python_typemaps.i0000664000076400007640000003113411743050346021404 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /* For UUID objects, to convert them to Python uuid.UUID objects, * we'll need a reference to the uuid module. */ %{ static PyObject* pUuidModule; %} %init %{ /* Instead of directly referencing the uuid module (which is not available * on older versions of Python), reference the wrapper defined in * qpid.datatypes. */ pUuidModule = PyImport_ImportModule("qpid.datatypes"); /* Although it is not required, we'll publish the uuid module in our * module, as if this module was a python module and we called * "import uuid" */ Py_INCREF(pUuidModule); PyModule_AddObject(m, "uuid", pUuidModule); %} %wrapper %{ #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX #define PY_SSIZE_T_MIN INT_MIN #endif PyObject* MapToPy(const qpid::types::Variant::Map*); PyObject* ListToPy(const qpid::types::Variant::List*); PyObject* UuidToPy(const qpid::types::Uuid*); void PyToMap(PyObject*, qpid::types::Variant::Map*); void PyToList(PyObject*, qpid::types::Variant::List*); qpid::types::Variant PyToVariant(PyObject* value) { if (PyBool_Check(value)) return qpid::types::Variant(bool(PyInt_AS_LONG(value) ? true : false)); if (PyFloat_Check(value)) return qpid::types::Variant(PyFloat_AS_DOUBLE(value)); if (PyInt_Check(value)) return qpid::types::Variant(int64_t(PyInt_AS_LONG(value))); if (PyLong_Check(value)) return qpid::types::Variant(int64_t(PyLong_AsLongLong(value))); if (PyString_Check(value)) return qpid::types::Variant(std::string(PyString_AS_STRING(value))); if (PyDict_Check(value)) { qpid::types::Variant::Map map; PyToMap(value, &map); return qpid::types::Variant(map); } if (PyList_Check(value)) { qpid::types::Variant::List list; PyToList(value, &list); return qpid::types::Variant(list); } return qpid::types::Variant(); } PyObject* VariantToPy(const qpid::types::Variant* v) { PyObject* result; try { switch (v->getType()) { case qpid::types::VAR_VOID: { result = Py_None; break; } case qpid::types::VAR_BOOL : { result = v->asBool() ? Py_True : Py_False; break; } case qpid::types::VAR_UINT8 : case qpid::types::VAR_UINT16 : case qpid::types::VAR_UINT32 : { result = PyInt_FromLong((long) v->asUint32()); break; } case qpid::types::VAR_UINT64 : { result = PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) v->asUint64()); break; } case qpid::types::VAR_INT8 : case qpid::types::VAR_INT16 : case qpid::types::VAR_INT32 : { result = PyInt_FromLong((long) v->asInt32()); break; } case qpid::types::VAR_INT64 : { result = PyLong_FromLongLong((PY_LONG_LONG) v->asInt64()); break; } case qpid::types::VAR_FLOAT : { result = PyFloat_FromDouble((double) v->asFloat()); break; } case qpid::types::VAR_DOUBLE : { result = PyFloat_FromDouble((double) v->asDouble()); break; } case qpid::types::VAR_STRING : { const std::string val(v->asString()); result = PyString_FromStringAndSize(val.c_str(), val.size()); break; } case qpid::types::VAR_MAP : { result = MapToPy(&(v->asMap())); break; } case qpid::types::VAR_LIST : { result = ListToPy(&(v->asList())); break; } case qpid::types::VAR_UUID : { qpid::types::Uuid uuid = v->asUuid(); result = UuidToPy(&uuid); break; } } } catch (qpid::types::Exception& ex) { PyErr_SetString(PyExc_RuntimeError, ex.what()); result = 0; } return result; } PyObject* MapToPy(const qpid::types::Variant::Map* map) { PyObject* result = PyDict_New(); qpid::types::Variant::Map::const_iterator iter; for (iter = map->begin(); iter != map->end(); iter++) { const std::string key(iter->first); PyObject* pyval = VariantToPy(&(iter->second)); if (pyval == 0) return 0; PyDict_SetItem(result, PyString_FromStringAndSize(key.c_str(), key.size()), pyval); } return result; } PyObject* ListToPy(const qpid::types::Variant::List* list) { PyObject* result = PyList_New(list->size()); qpid::types::Variant::List::const_iterator iter; Py_ssize_t idx(0); for (iter = list->begin(); iter != list->end(); iter++) { PyObject* pyval = VariantToPy(&(*iter)); if (pyval == 0) return 0; PyList_SetItem(result, idx, pyval); idx++; } return result; } PyObject* UuidToPy(const qpid::types::Uuid * uuid) { PyObject* pUuidClass = PyObject_GetAttrString(pUuidModule, "UUID"); if (!pUuidClass) { // Failed to get UUID class return 0; } PyObject* pArgs = PyTuple_New(0); PyObject* pKw = PyDict_New(); PyObject* pData = PyString_FromStringAndSize( (const char*)(uuid->data()), 16); PyDict_SetItemString(pKw, "bytes", pData); PyObject* result = PyObject_Call(pUuidClass, pArgs, pKw); Py_DECREF(pData); Py_DECREF(pKw); Py_DECREF(pArgs); Py_DECREF(pUuidClass); return result; } void PyToMap(PyObject* obj, qpid::types::Variant::Map* map) { map->clear(); Py_ssize_t iter(0); PyObject *key; PyObject *val; while (PyDict_Next(obj, &iter, &key, &val)) (*map)[std::string(PyString_AS_STRING(key))] = PyToVariant(val); } void PyToList(PyObject* obj, qpid::types::Variant::List* list) { list->clear(); Py_ssize_t count(PyList_Size(obj)); for (Py_ssize_t idx = 0; idx < count; idx++) list->push_back(PyToVariant(PyList_GetItem(obj, idx))); } %} /* unsigned32 Convert from Python --> C */ %typemap(in) uint32_t { if (PyInt_Check($input)) { $1 = (uint32_t) PyInt_AsUnsignedLongMask($input); } else if (PyLong_Check($input)) { $1 = (uint32_t) PyLong_AsUnsignedLong($input); } else { SWIG_exception_fail(SWIG_ValueError, "unknown integer type"); } } /* unsinged32 Convert from C --> Python */ %typemap(out) uint32_t { $result = PyInt_FromLong((long)$1); } /* unsigned16 Convert from Python --> C */ %typemap(in) uint16_t { if (PyInt_Check($input)) { $1 = (uint16_t) PyInt_AsUnsignedLongMask($input); } else if (PyLong_Check($input)) { $1 = (uint16_t) PyLong_AsUnsignedLong($input); } else { SWIG_exception_fail(SWIG_ValueError, "unknown integer type"); } } /* unsigned16 Convert from C --> Python */ %typemap(out) uint16_t { $result = PyInt_FromLong((long)$1); } /* signed32 Convert from Python --> C */ %typemap(in) int32_t { if (PyInt_Check($input)) { $1 = (int32_t) PyInt_AsLong($input); } else if (PyLong_Check($input)) { $1 = (int32_t) PyLong_AsLong($input); } else { SWIG_exception_fail(SWIG_ValueError, "unknown integer type"); } } /* signed32 Convert from C --> Python */ %typemap(out) int32_t { $result = PyInt_FromLong((long)$1); } /* unsigned64 Convert from Python --> C */ %typemap(in) uint64_t { %#ifdef HAVE_LONG_LONG if (PyLong_Check($input)) { $1 = (uint64_t)PyLong_AsUnsignedLongLong($input); } else if (PyInt_Check($input)) { $1 = (uint64_t)PyInt_AsUnsignedLongLongMask($input); } else %#endif { SWIG_exception_fail(SWIG_ValueError, "unsupported integer size - uint64_t input too large"); } } /* unsigned64 Convert from C --> Python */ %typemap(out) uint64_t { %#ifdef HAVE_LONG_LONG $result = PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)$1); %#else SWIG_exception_fail(SWIG_ValueError, "unsupported integer size - uint64_t output too large"); %#endif } /* signed64 Convert from Python --> C */ %typemap(in) int64_t { %#ifdef HAVE_LONG_LONG if (PyLong_Check($input)) { $1 = (int64_t)PyLong_AsLongLong($input); } else if (PyInt_Check($input)) { $1 = (int64_t)PyInt_AsLong($input); } else %#endif { SWIG_exception_fail(SWIG_ValueError, "unsupported integer size - int64_t input too large"); } } /* signed64 Convert from C --> Python */ %typemap(out) int64_t { %#ifdef HAVE_LONG_LONG $result = PyLong_FromLongLong((PY_LONG_LONG)$1); %#else SWIG_exception_fail(SWIG_ValueError, "unsupported integer size - int64_t output too large"); %#endif } /* Convert from Python --> C */ %typemap(in) void * { $1 = (void *)$input; } /* Convert from C --> Python */ %typemap(out) void * { $result = (PyObject *) $1; Py_INCREF($result); } /* * Variant types: C++ --> Python */ %typemap(out) qpid::types::Variant::Map { $result = MapToPy(&$1); } %typemap(out) qpid::types::Variant::Map& { $result = MapToPy($1); } %typemap(out) qpid::types::Variant::List { $result = ListToPy(&$1); } %typemap(out) qpid::types::Variant::List& { $result = ListToPy($1); } %typemap(out) qpid::types::Variant& { $result = VariantToPy($1); } /* * UUID type: C++ --> Python */ %typemap(out) qpid::types::UUID & { $result = UuidToPy($1); } /* * Variant types: Ruby --> C++ */ %typemap(in) qpid::types::Variant& { $1 = new qpid::types::Variant(PyToVariant($input)); } %typemap(in) qpid::types::Variant::Map& { $1 = new qpid::types::Variant::Map(); PyToMap($input, $1); } %typemap(in) qpid::types::Variant::List& { $1 = new qpid::types::Variant::List(); PyToList($input, $1); } %typemap(in) const qpid::types::Variant::Map const & { $1 = new qpid::types::Variant::Map(); PyToMap($input, $1); } %typemap(in) const qpid::types::Variant::List const & { $1 = new qpid::types::Variant::List(); PyToList($input, $1); } %typemap(freearg) qpid::types::Variant& { delete $1; } %typemap(freearg) qpid::types::Variant::Map& { delete $1; } %typemap(freearg) qpid::types::Variant::List& { delete $1; } /* * Variant types: typecheck maps */ %typemap(typecheck) qpid::types::Variant::Map& { $1 = PyDict_Check($input) ? 1 : 0; } %typemap(typecheck) qpid::types::Variant::List& { $1 = PyList_Check($input) ? 1 : 0; } %typemap(typecheck) qpid::types::Variant& { $1 = (PyFloat_Check($input) || PyString_Check($input) || PyInt_Check($input) || PyLong_Check($input) || PyDict_Check($input) || PyList_Check($input) || PyBool_Check($input)) ? 1 : 0; } %typemap(typecheck) const qpid::types::Variant::Map const & { $1 = PyDict_Check($input) ? 1 : 0; } %typemap(typecheck) const qpid::types::Variant::List const & { $1 = PyList_Check($input) ? 1 : 0; } %typemap(typecheck) const qpid::types::Variant const & { $1 = (PyFloat_Check($input) || PyString_Check($input) || PyInt_Check($input) || PyLong_Check($input) || PyDict_Check($input) || PyList_Check($input) || PyBool_Check($input)) ? 1 : 0; } %typemap(typecheck) bool { $1 = PyBool_Check($input) ? 1 : 0; } %typemap (typecheck, precedence=SWIG_TYPECHECK_UINT64) uint64_t { $1 = PyLong_Check($input) ? 1 : 0; } %typemap (typecheck, precedence=SWIG_TYPECHECK_UINT32) uint32_t { $1 = PyInt_Check($input) ? 1 : 0; } qpidc-0.16/bindings/swig_perl_typemaps.i0000664000076400007640000002126011520322650021015 0ustar00jrossjross00000000000000/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ %wrapper %{ #include SV* MapToPerl(const qpid::types::Variant::Map*); SV* ListToPerl(const qpid::types::Variant::List*); void PerlToMap(SV*, qpid::types::Variant::Map*); void PerlToList(SV*, qpid::types::Variant::List*); qpid::types::Variant PerlToVariant(SV* value) { if (SvROK(value)) { if (SvTYPE(SvRV(value)) == SVt_PVHV) { qpid::types::Variant::Map map; PerlToMap(value, &map); return qpid::types::Variant(map); } else if (SvTYPE(SvRV(value)) == SVt_PVAV) { qpid::types::Variant::List list; PerlToList(value, &list); return qpid::types::Variant(list); } } else { if (SvIOK(value)) { return qpid::types::Variant((int64_t) SvIV(value)); } else if (SvNOK(value)) { return qpid::types::Variant((float)SvNV(value)); } else if (SvPOK(value)) { return qpid::types::Variant(std::string(SvPV_nolen(value))); } } return qpid::types::Variant(); } SV* VariantToPerl(const qpid::types::Variant* v) { SV* result = newSV(0); try { switch (v->getType()) { case qpid::types::VAR_VOID: { sv_setiv(result, (IV)0); break; } case qpid::types::VAR_BOOL : { result = boolSV(v->asBool()); break; } case qpid::types::VAR_UINT8 : case qpid::types::VAR_UINT16 : case qpid::types::VAR_UINT32 : { sv_setuv(result, (UV)v->asUint32()); break; } case qpid::types::VAR_UINT64 : { sv_setuv(result, (UV)v->asUint64()); break; } case qpid::types::VAR_INT8 : case qpid::types::VAR_INT16 : case qpid::types::VAR_INT32 : { sv_setiv(result, (IV)v->asInt32()); break; } case qpid::types::VAR_INT64 : { sv_setiv(result, (IV)v->asInt64()); break; } case qpid::types::VAR_FLOAT : { sv_setnv(result, (double)v->asFloat()); break; } case qpid::types::VAR_DOUBLE : { sv_setnv(result, (double)v->asDouble()); break; } case qpid::types::VAR_STRING : { const std::string val(v->asString()); result = newSVpvn(val.c_str(), val.size()); break; } case qpid::types::VAR_MAP : { result = MapToPerl(&(v->asMap())); break; } case qpid::types::VAR_LIST : { result = ListToPerl(&(v->asList())); break; } case qpid::types::VAR_UUID : { } } } catch (qpid::types::Exception& ex) { Perl_croak(aTHX_ ex.what()); } return result; } SV* MapToPerl(const qpid::types::Variant::Map* map) { SV *result = newSV(0); HV *hv = (HV *)sv_2mortal((SV *)newHV()); qpid::types::Variant::Map::const_iterator iter; for (iter = map->begin(); iter != map->end(); iter++) { const std::string key(iter->first); SV* perlval = VariantToPerl(&(iter->second)); hv_store(hv, key.c_str(), key.size(), perlval, 0); } SvSetSV(result, newRV_noinc((SV *)hv)); return result; } SV* ListToPerl(const qpid::types::Variant::List* list) { SV* result = newSV(0); AV* av = (AV *)sv_2mortal((SV *)newAV()); qpid::types::Variant::List::const_iterator iter; for (iter = list->begin(); iter != list->end(); iter++) { SV* perlval = VariantToPerl(&(*iter)); av_push(av, perlval); } SvSetSV(result, newRV_noinc((SV *)av)); return result; } void PerlToMap(SV* hash, qpid::types::Variant::Map* map) { map->clear(); HV* hv = (HV *)SvRV(hash); HE* he; while((he = hv_iternext(hv)) != NULL) { SV* svkey = HeSVKEY_force(he); SV* svval = HeVAL(he); (*map)[std::string(SvPV_nolen(svkey))] = PerlToVariant(svval); } } void PerlToList(SV* ary, qpid::types::Variant::List* list) { list->clear(); AV * av = (AV *)SvRV(ary); I32 len = av_len(av) + 1; if (len > 0) { for (I32 i = 0; i < len; i++) { list->push_back(PerlToVariant(*av_fetch(av, i, 0))); } } } %} %typemap (in) void * { $1 = (void *)SvIV($input); } %typemap (out) void * { sv_setiv($result, (IV)$1); argvi++; } %typemap (in) uint16_t, uint32_t, uint64_t { if (SvIOK($input)) { $1 = ($1_ltype)SvUV($input); } else { SWIG_exception_fail(SWIG_ValueError, "not an integer"); } } %typemap (out) uint16_t, uint32_t, uint64_t { sv_setuv($result, (UV)$1); argvi++; } %typemap (in) int32_t, int64_t { if (SvIOK($input)) { $1 = ($1_ltype)SvIV($input); } else { SWIG_exception_fail(SWIG_ValueError, "not an integer"); } } %typemap (out) int32_t, int64_t { sv_setiv($result, (IV)$1); argvi++; } %typemap(in) bool { $1 = (bool)SvTRUE($input); } %typemap (out) bool { $result = boolSV($1); argvi++; } %typemap (typecheck, precedence=SWIG_TYPECHECK_UINT64) uint64_t { $1 = SvIOK($input) ? 1 : 0; } %typemap (typecheck, precedence=SWIG_TYPECHECK_UINT32) uint32_t { $1 = SvIOK($input) ? 1 : 0; } /* * Variant types: C++ --> Perl */ %typemap(out) qpid::types::Variant::Map { $result = MapToPerl(&$1); argvi++; } %typemap(out) qpid::types::Variant::Map& { $result = MapToPerl($1); argvi++; } %typemap(out) qpid::types::Variant::List { $result = ListToPerl(&$1); argvi++; } %typemap(out) qpid::types::Variant::List& { $result = ListToPerl($1); argvi++; } %typemap(out) qpid::types::Variant& { $result = VariantToPerl($1); argvi++; } /* * Variant types: Perl --> C++ */ %typemap(in) qpid::types::Variant& { $1 = new qpid::types::Variant(PerlToVariant($input)); } %typemap(in) qpid::types::Variant::Map& { $1 = new qpid::types::Variant::Map(); PerlToMap($input, $1); } %typemap(in) qpid::types::Variant::List& { $1 = new qpid::types::Variant::List(); PerlToList($input, $1); } %typemap(in) const qpid::types::Variant::Map const & { $1 = new qpid::types::Variant::Map(); PerlToMap($input, $1); } %typemap(in) const qpid::types::Variant::List const & { $1 = new qpid::types::Variant::List(); PerlToList($input, $1); } %typemap(freearg) qpid::types::Variant& { delete $1; } %typemap(freearg) qpid::types::Variant::Map& { delete $1; } %typemap(freearg) qpid::types::Variant::List& { delete $1; } /* * Variant types: typecheck maps */ %typemap(typecheck) qpid::types::Variant::Map& { $1 = (SvTYPE(SvRV($input)) == SVt_PVHV) ? 1 : 0; } %typemap(typecheck) qpid::types::Variant::List& { $1 = (SvTYPE(SvRV($input)) == SVt_PVAV) ? 1 : 0; } %typemap(typecheck) qpid::types::Variant& { $1 = (SvIOK($input) || SvNOK($input) || SvPOK($input) ) ? 1 : 0; } %typemap(typecheck) const qpid::types::Variant::Map const & { $1 = (SvTYPE(SvRV($input)) == SVt_PVHV) ? 1 : 0; } %typemap(typecheck) const qpid::types::Variant::List const & { $1 = (SvTYPE(SvRV($input)) == SVt_PVAV) ? 1 : 0; } %typemap(typecheck) const qpid::types::Variant const & { $1 = (SvIOK($input) || SvNOK($input) || SvPOK($input) ) ? 1 : 0; } /* No boolean type for perl. Boolean is simply and integer in perl */ %typecheck(SWIG_TYPECHECK_BOOL) bool { $1 = (SvIOK($input)) ? 1 : 0; } qpidc-0.16/etc/0000775000076400007640000000000011752725673013726 5ustar00jrossjross00000000000000qpidc-0.16/etc/Makefile.in0000664000076400007640000003613711752725661016002 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @HAVE_SASL_TRUE@am__append_1 = \ @HAVE_SASL_TRUE@ $(SASL_CONF) subdir = etc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(confdir)" "$(DESTDIR)$(sysconfdir)" DATA = $(nobase_conf_DATA) $(nobase_sysconf_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # SASL_CONF = sasl2/qpidd.conf EXTRA_DIST = \ $(SASL_CONF) \ qpidd qpidd.conf qpidc.conf CMakeLists.txt confdir = $(sysconfdir)/qpid nobase_conf_DATA = \ qpidc.conf nobase_sysconf_DATA = qpidd.conf $(am__append_1) 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu etc/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nobase_confDATA: $(nobase_conf_DATA) @$(NORMAL_INSTALL) test -z "$(confdir)" || $(MKDIR_P) "$(DESTDIR)$(confdir)" @list='$(nobase_conf_DATA)'; test -n "$(confdir)" || list=; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo "$(MKDIR_P) '$(DESTDIR)$(confdir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(confdir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(confdir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(confdir)/$$dir" || exit $$?; }; \ done uninstall-nobase_confDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_conf_DATA)'; test -n "$(confdir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(confdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(confdir)" && rm -f $$files install-nobase_sysconfDATA: $(nobase_sysconf_DATA) @$(NORMAL_INSTALL) test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" @list='$(nobase_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo "$(MKDIR_P) '$(DESTDIR)$(sysconfdir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(sysconfdir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(sysconfdir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(sysconfdir)/$$dir" || exit $$?; }; \ done uninstall-nobase_sysconfDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(sysconfdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sysconfdir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 $(DATA) installdirs: for dir in "$(DESTDIR)$(confdir)" "$(DESTDIR)$(sysconfdir)"; 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nobase_confDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-nobase_sysconfDATA install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-nobase_confDATA uninstall-nobase_sysconfDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nobase_confDATA install-nobase_sysconfDATA install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-nobase_confDATA uninstall-nobase_sysconfDATA # 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: qpidc-0.16/etc/Makefile.am0000664000076400007640000000203211605133555015744 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # SASL_CONF = sasl2/qpidd.conf EXTRA_DIST = \ $(SASL_CONF) \ qpidd qpidd.conf qpidc.conf CMakeLists.txt confdir=$(sysconfdir)/qpid nobase_conf_DATA=\ qpidc.conf nobase_sysconf_DATA = \ qpidd.conf if HAVE_SASL nobase_sysconf_DATA += \ $(SASL_CONF) endif qpidc-0.16/etc/sasl2/0000775000076400007640000000000011752725673014752 5ustar00jrossjross00000000000000qpidc-0.16/etc/sasl2/qpidd.conf0000664000076400007640000000523711654530041016711 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # #--------------------------------- # Mechanisms and Users #--------------------------------- # # This default qpidd configuration allows for only SASL ANONYMOUS authentication. # To additionally enable DIGEST-MD5 authentication: # # 1. edit the mech_list below to read # mech_list: DIGEST-MD5 ANONYMOUS # # 2. To add new a new user+password to the sasldb file: # echo $PASSWD | saslpasswd2 -c -p -f $SASLTEST_DB -u QPID $USERNAME # # # PLEASE NOTE # For production messaging systems, a high-security mechanism such as # DIGEST-MD5 or PLAIN+SSL should be enabled. # # pwcheck_method: auxprop auxprop_plugin: sasldb sasldb_path: /var/lib/qpidd/qpidd.sasldb mech_list: ANONYMOUS #--------------------------------- # Other Notes #--------------------------------- # # 1. If you use a nonstandard location for your sasl_config directory, # you can point qpidd to it by using the --sasl-config option. # If your nonstandard sasl directory is $MY_SASL_DIR, put a copy # of this file at $MY_SASL_DIR/qpidd.conf, alter the mech list as # appropriate for your installation, and then use the saslpasswd2 # command to add new user+passwd pairs: # echo $PASSWD | saslpasswd2 -c -p -f $MY_SASL_DIR/qpidd.sasldb -u QPID $USERNAME # # # 2. The standard location for the qpidd sasldb file is # /var/lib/qpidd/qpidd.sasldb # # 3. You can see what usernames have been stored in the sasldb, with the # sasldblistusers2 command. # # 4. The REALM is important and should be the same as the --realm # option to the broker. This lets the broker properly find the user in # the sasldb file. # # 5. The sasldb file must be readable by the user running the qpidd # daemon, and should be readable only by that user. # # The following line stops spurious 'sql_select option missing' errors when # cyrus-sql-sasl plugin is installed sql_select: dummy select qpidc-0.16/etc/qpidc.conf0000664000076400007640000000164111121436707015662 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Configuration file for the qpid c++ client library. Entries are of # the form: # name=value # # (Note: no spaces on either side of '=') qpidc-0.16/etc/qpidd.conf0000664000076400007640000000177511605133555015675 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Configuration file for qpidd. Entries are of the form: # name=value # # (Note: no spaces on either side of '='). Using default settings: # "qpidd --help" or "man qpidd" for more details. cluster-mechanism=DIGEST-MD5 ANONYMOUS qpidc-0.16/etc/qpidd0000775000076400007640000000566011404430360014740 0ustar00jrossjross00000000000000#!/bin/bash # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # qpidd Startup script for the Qpid messaging daemon. # ### BEGIN INIT INFO # Provides: qpidd # Required-Start: $local_fs # Required-Stop: $local_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start or stop qpidd # Description: Qpidd is an AMQP broker. It receives, stores, routes and forwards messages using the AMQP protcol. ### END INIT INFO # chkconfig: - 85 15 # description: Qpidd is an AMQP broker. It receives, stores, routes and forwards messages using the AMQP protcol. # processname: qpidd prog=qpidd lockfile=/var/lock/subsys/$prog pidfile=/var/run/qpidd.pid # Source function library. . /etc/rc.d/init.d/functions if [ -f /etc/sysconfig/$prog ] ; then . /etc/sysconfig/$prog fi RETVAL=0 #ensure binary is present and executable if [[ !(-x /usr/sbin/$prog) ]] ; then echo "/usr/sbin/$prog not found or not executable" exit 5 fi #ensure user has sufficient permissions runuser -s /bin/sh qpidd -c "echo x > /dev/null" 2> /dev/null || RETVAL=4 if [ $RETVAL = 4 ]; then echo "user had insufficient privilege"; exit $RETVAL fi start() { [[ $QPID_DATA_DIR ]] || QPID_DATA_DIR=/var/lib/qpidd echo -n $"Starting Qpid AMQP daemon: " daemon --pidfile $pidfile --check $prog --user qpidd /usr/sbin/$prog --data-dir $QPID_DATA_DIR --daemon $QPIDD_OPTIONS RETVAL=$? echo [ $RETVAL = 0 ] && touch $lockfile if [ $RETVAL = 0 ]; then touch $pidfile chown qpidd.qpidd $pidfile [ -x /sbin/restorecon ] && /sbin/restorecon $pidfile runuser - -s /bin/sh qpidd -c "/usr/sbin/$prog --check > $pidfile" fi return $RETVAL } stop() { echo -n $"Stopping Qpid AMQP daemon: " killproc -p ${pidfile} $prog RETVAL=$? echo [ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile} } reload() { echo 1>&2 $"$0: reload not supported" exit 3 } restart() { stop start } # See how we were called. case "$1" in start|stop|restart|reload) $1 ;; status) status $prog RETVAL=$? ;; force-reload) restart ;; try-restart|condrestart) [ -e $lockfile ] && restart || : ;; *) echo 1>&2 $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|force-reload}" exit 2 esac exit $RETVAL qpidc-0.16/etc/CMakeLists.txt0000664000076400007640000000230311654522741016454 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # install(FILES qpidc.conf DESTINATION ${QPID_INSTALL_CONFDIR} COMPONENT ${QPID_COMPONENT_CLIENT}) install(FILES qpidd.conf DESTINATION ${QPID_INSTALL_CONFDIR} COMPONENT ${QPID_COMPONENT_BROKER}) if (BUILD_SASL) install(FILES sasl2/qpidd.conf DESTINATION ${QPID_INSTALL_SASLDIR} COMPONENT ${QPID_COMPONENT_BROKER} RENAME ${BROKER_SASL_NAME}.conf) endif (BUILD_SASL) qpidc-0.16/aclocal.m40000664000076400007640000124266211752725660015024 0ustar00jrossjross00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 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. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_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 "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl 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 # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. 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 delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -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 Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # 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 cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_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 _LT_EOF ;; esac _LT_PROG_LTMAIN # 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) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])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_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$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. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$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 -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_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${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # 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. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_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 '$LINENO' "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-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|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-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; 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-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) 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_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[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" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 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 case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$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:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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 m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$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 "$_lt_linker_boilerplate" | $SED '/^$/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 -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # 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* | cegcc*) # 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; ;; mint*) # On MiNT this can take a long time and run out of memory. 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 ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then 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` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # 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. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 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` fi ;; 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 max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_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 <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #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 /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 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; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_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_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_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* | cegcc*) 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="-ldld"], [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="-ldld"]) ]) ]) ]) ]) ]) ;; 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_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_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 _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$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:$LINENO: $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:$LINENO: \$? = $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 "$_lt_compiler_boilerplate" | $SED '/^$/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_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 .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_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 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_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 _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_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_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; 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 _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) 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" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # 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. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) 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" 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' ;; aix[[4-9]]*) 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*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) 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=`func_echo_all "$lib" | $SED '\''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' ;; esac ;; 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* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc 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~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' 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}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; 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 dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. 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 # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # 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' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # 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}${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`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 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 ;; 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 ;; *) # from 4.6 on, and DragonFly 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 ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" 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=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 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' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) 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* | k*bsd*-gnu | kopensolaris*-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' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # 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/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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' ;; 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=qnx 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='ldqnx.so' ;; 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" ;; rdos*) dynamic_linker=no ;; 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 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 shlibpath_overrides_runpath=yes 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' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 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' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/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}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[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]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_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="m4_if([$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 <<_LT_EOF 1>&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 _LT_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 _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_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 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_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])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 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | 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 ;; haiku*) 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])(-bit)?( [LM]SB)? 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 ;; interix[[3-9]]*) # 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* | k*bsd*-gnu | kopensolaris*-gnu) 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=pass_all ;; 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 ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 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 ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi 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 _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (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 : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-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_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # 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]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' 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 # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \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\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # 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 # Try without a prefix underscore, 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. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $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 <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_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_globsym_save_LIBS CFLAGS=$lt_globsym_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 -rf 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 # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_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_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # 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_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_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 ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # 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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_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_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_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_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_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_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_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_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # 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_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_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_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # 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_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # 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). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_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_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # 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 # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_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_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_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_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # 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. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # 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_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = 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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[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 aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, 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 install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_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_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_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_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_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_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' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$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' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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 '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&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. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_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_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 ;; *) # 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. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_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_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_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_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_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) 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 # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_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]].*|aix[[5-9]]*) 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_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 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 : else # We have old collect2 _LT_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_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_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_SYS_MODULE_PATH_AIX([$1]) _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_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*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # 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. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # 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_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_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' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_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_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_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_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_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_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_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_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_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_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_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' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_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} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_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_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_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_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_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_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$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_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [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]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl 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_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # 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 ;; aix[[4-9]]*) 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]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl 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 else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_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_CFLAGS=$CFLAGS 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++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_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_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_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_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_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_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 -v "^Configured with:" | $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_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) 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]].*|aix[[5-9]]*) 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_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 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 : else # We have old collect2 _LT_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_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_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 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_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_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_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 func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_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_SYS_MODULE_PATH_AIX([$1]) _LT_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_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_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # 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_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_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_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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_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_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_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) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_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_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_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; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${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_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_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_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_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_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-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_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_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) 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_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_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; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_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_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # 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_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_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' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_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=`func_echo_all "$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; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_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 -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_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::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_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_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_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | 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_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_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_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=`func_echo_all "$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; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_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" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_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 -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_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_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # 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_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_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_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_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -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 -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_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 -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_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. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$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_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC 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 fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([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. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= 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... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); 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 for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${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 fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} 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 "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${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 "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$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 "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # 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. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_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_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then 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 ;; aix[[4-9]]*) 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]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_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_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then 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 ;; aix[[4-9]]*) 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]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_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_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # 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. _LT_TAG_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_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # 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. # m4_defun([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]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # 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 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_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=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_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=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_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=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_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=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # 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 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # 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. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # 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 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT]) ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .]) ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # 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, 2006, 2008 # 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 9 # 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])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl 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, 2006, 2009 # 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 10 # 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], UPC, [depcc="$UPC" am_compiler_list=], [$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 am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) 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 # 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. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; 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 ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj 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])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # 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 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf 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. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/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, 2006, 2008, 2009 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 16 # 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.62])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 if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi 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 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])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) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 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 AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # 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_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 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 if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi 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, 2009 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_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .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 # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # 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 6 # 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 AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # 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, 2006 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 for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 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_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], [m4_foreach_w([_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])]) # 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_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # 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 5 # 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 # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # 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="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 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_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # 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([m4/ac_pkg_swig.m4]) m4_include([m4/clock_time.m4]) m4_include([m4/compiler-flags.m4]) m4_include([m4/extensions.m4]) m4_include([m4/python.m4]) qpidc-0.16/build-aux/0000775000076400007640000000000011752725672015044 5ustar00jrossjross00000000000000qpidc-0.16/build-aux/config.guess0000775000076400007640000012636510533734621017367 0ustar00jrossjross00000000000000#! /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, 2006 Free Software Foundation, # Inc. timestamp='2006-11-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 "$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 ;; sh5el) machine=sh5le-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 ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-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:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac 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*:[3456]*) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T:Interix*:[3456]* | authenticamd:Interix*:[3456]*) echo x86_64-unknown-interix${UNAME_RELEASE} 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*:*:* | x86_64: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 ;; avr32*: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 | sed -n ' /^CPU/{ s: ::g p }'`" 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 | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-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 ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-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 #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" 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 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 ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos 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: qpidc-0.16/build-aux/config.rpath0000775000076400007640000003744410533734621017356 0ustar00jrossjross00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2006 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's _LT_CC_BASENAME. for cc_temp in $CC""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; darwin*) case $cc_basename in xlc*) wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $cc_basename in icc* | ecc*) wl='-Wl,' ;; pgcc | pgf77 | pgf90) wl='-Wl,' ;; ccc*) wl='-Wl,' ;; como) wl='-lopt=' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) wl='-Wl,' ;; esac ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; unicos*) wl='-Wl,' ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we cannot use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; interix3*) hardcode_direct=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' else ld_shlibs=no fi ;; esac ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then hardcode_libdir_flag_spec= fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) hardcode_direct=no if test "$GCC" = yes ; then : else case $cc_basename in xlc*) ;; *) ld_shlibs=no ;; esac fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd* | kfreebsd*-gnu | dragonfly*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no ;; *) hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) ;; sysv5* | sco3.2v5* | sco5v6*) hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi[45]*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; kfreebsd*-gnu) ;; freebsd* | dragonfly*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case $host_cpu in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; interix3*) ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; knetbsd*-gnu) ;; netbsd*) ;; newsos6) ;; nto-qnx*) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.3*) ;; sysv4*MP*) ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <, 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [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 # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # 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. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4 TIMESTAMP="" package_revision=1.3293 # 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+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # 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" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; 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 that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # 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 "$opt_dry_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" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # 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= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_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 $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE 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. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # 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 () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # 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. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # 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 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) 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 "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" 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 $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -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] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; 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 LANGUAGE 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 } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # 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. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; 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. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append 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 -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_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 test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append 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 func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile="$func_basename_result" 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "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) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" 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 func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result 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" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_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've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # 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+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # 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 variables: generated_by_libtool_version='$macro_version' 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 file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} 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 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #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 # define FOPEN_WB "wb" # 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 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ 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; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" 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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append 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 func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" 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 func_append 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. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append 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 func_append 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" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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* | *-cegcc* | *-*-haiku*) # 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 func_append deplibs " System.ltframework" 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 func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" 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*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" 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 func_append 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. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append 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 func_append 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" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" 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. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'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\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append 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 $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; 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 # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi 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 "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" 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|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; 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 func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" 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 func_dirname "$lib" "" "." ladir="$func_dirname_result" 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 *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; 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 func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` 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 use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac 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. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # 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 func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append 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 func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" 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. func_append dlprefiles " $lib $dependency_libs" else func_append 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 func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$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 func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac 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 func_append 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*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; 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 $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append 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 *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append 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 case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" 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* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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 "$opt_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 (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then 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 && test "$hardcode_direct_absolute" = no; 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 [\\/]*) func_append 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 func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append 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:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; 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:"*) ;; *) func_append 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 [\\/]*) func_append 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*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append 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" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= 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 "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi 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 "*) ;; *) func_append 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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" 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 test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # 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="$1" number_minor="$2" number_revision="$3" # # 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) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; 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]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result 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 func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; 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 func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_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 | *.gcno) ;; $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 func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-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 func_append 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. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; 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 " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) 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 ;; esac ;; 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 with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 "$opt_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 func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 func_append 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 "$opt_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 shift realname="$1" 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 func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "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" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_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:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append 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. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "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" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi 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\" test "X$libobjs" = "X " && libobjs= 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( 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 "$opt_mode" = relink; then $opt_dry_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 func_show_eval '${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 func_show_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 "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_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 "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_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" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status 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 func_append 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 func_append 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi 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" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` 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 "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result 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 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } 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 $symfileobj" 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" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append 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 # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # 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 func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$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 eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 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 func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { 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) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # 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' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug 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) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append 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 func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # 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 build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 qpidc-0.16/build-aux/compile0000775000076400007640000000717310533734621016420 0ustar00jrossjross00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2005-05-14.22 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # 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: qpidc-0.16/build-aux/mdate-sh0000775000076400007640000001255310533734621016470 0ustar00jrossjross00000000000000#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2005-06-29.22 # Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005 Free Software # Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 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. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No file. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification time of FILE. Report bugs to . EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume `unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # A `ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named `Jan', or `Feb', etc. However, it's unlikely that `/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`ls -l -d /` # Find which argument is the month. month= command= until test $month do shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac case $3 in ???*) day=$1;; *) day=$3; shift;; esac # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year # 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: qpidc-0.16/build-aux/install-sh0000775000076400007640000003160010533734621017036 0ustar00jrossjross00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-10-14.15 # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment 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}" posix_glob= posix_mkdir= # Desired mode of installed file. mode=0755 chmodcmd=$chmodprog 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 $# -ne 0; 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) mode=$2 shift shift case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac 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 $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac done if test $# -ne 0 && test -z "$dir_arg$dstarg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done fi if test $# -eq 0; 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 if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. 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 dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix=/ ;; -*) prefix=./ ;; *) prefix= ;; esac case $posix_glob in '') if (set -f) 2>/dev/null; then posix_glob=true else posix_glob=false fi ;; esac oIFS=$IFS IFS=/ $posix_glob && set -f set fnord $dstdir shift $posix_glob && set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # 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 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $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 $mode "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dst"; then $doit $rmcmd -f "$dst" 2>/dev/null \ || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null \ && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }; }\ || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } } || exit 1 trap '' 0 fi done # 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: qpidc-0.16/build-aux/depcomp0000775000076400007640000004224610533734621016417 0ustar00jrossjross00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2006-10-15.18 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 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. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else 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" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # 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 mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $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: qpidc-0.16/build-aux/missing0000775000076400007640000002557710533734621016451 0ustar00jrossjross00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # 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=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. 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' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c 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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` 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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -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 test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -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 "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... 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: qpidc-0.16/build-aux/config.sub0000775000076400007640000007753310533734621017034 0ustar00jrossjross00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-11-07' # 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-newlib* | 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 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -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/'` ;; -sco5v6*) # 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 | avr32 \ | 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 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | 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 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) 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) ;; ms1) basic_machine=mt-unknown ;; # 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-* | avr32-* \ | 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-* \ | m32c-* | 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-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | 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-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # 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 ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; 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 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; 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 ;; rdos) basic_machine=i386-pc os=-rdos ;; 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 ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; 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 | sparcv9v) 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* | -solidbsd* \ | -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-newlib* | -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* | -rdos* | -toppers*) # 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 score-*) os=-elf ;; spu-*) os=-elf ;; *-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: qpidc-0.16/build-aux/py-compile0000755000076400007640000001013511354106464017034 0ustar00jrossjross00000000000000#!/bin/sh # py-compile - Compile a Python program scriptversion=2009-04-28.21; # UTC # Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008, 2009 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . if [ -z "$PYTHON" ]; then PYTHON=python fi basedir= destdir= files= while test $# -ne 0; do case "$1" in --basedir) basedir=$2 if test -z "$basedir"; then echo "$0: Missing argument to --basedir." 1>&2 exit 1 fi shift ;; --destdir) destdir=$2 if test -z "$destdir"; then echo "$0: Missing argument to --destdir." 1>&2 exit 1 fi shift ;; -h|--h*) cat <<\EOF Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." Byte compile some python scripts FILES. Use --destdir to specify any leading directory path to the FILES that you don't want to include in the byte compiled file. Specify --basedir for any additional path information you do want to be shown in the byte compiled file. Example: py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py Report bugs to . EOF exit $? ;; -v|--v*) echo "py-compile $scriptversion" exit $? ;; *) files="$files $1" ;; esac shift done if test -z "$files"; then echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 fi # if basedir was given, then it should be prepended to filenames before # byte compilation. if [ -z "$basedir" ]; then pathtrans="path = file" else pathtrans="path = os.path.join('$basedir', file)" fi # if destdir was given, then it needs to be prepended to the filename to # byte compile but not go into the compiled file. if [ -z "$destdir" ]; then filetrans="filepath = path" else filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" fi $PYTHON -c " import sys, os, py_compile files = '''$files''' sys.stdout.write('Byte-compiling python modules...\n') for file in files.split(): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue sys.stdout.write(file) sys.stdout.flush() py_compile.compile(filepath, filepath + 'c', path) sys.stdout.write('\n')" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " import sys, os, py_compile files = '''$files''' sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') for file in files.split(): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue sys.stdout.write(file) sys.stdout.flush() py_compile.compile(filepath, filepath + 'o', path) sys.stdout.write('\n')" 2>/dev/null || : # 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: qpidc-0.16/LICENSE0000664000076400007640000003152711056012631014144 0ustar00jrossjross00000000000000========================================================================= == Apache License == ========================================================================= Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ========================================================================= == Boost License == ========================================================================= Boost 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. qpidc-0.16/CMakeLists.txt0000664000076400007640000000640111654522741015704 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # project(qpid-cpp) cmake_minimum_required(VERSION 2.4.0 FATAL_ERROR) if(COMMAND cmake_policy) cmake_policy(SET CMP0003 NEW) endif(COMMAND cmake_policy) include(BuildInstallSettings.cmake) set (qpidc_version ${QPID_VERSION_MAJOR}.${QPID_VERSION_MINOR}) enable_testing() include (CTest) if (MSVC) # Change warning C4996 from level 1 to level 4. These are real and shouldn't # be completely ignored, but they're pretty well checked out and will throw # a run-time error if violated. # "warning C4996: 'std::equal': Function call with parameters that may # be unsafe..." add_definitions(/w44996) endif (MSVC) # Overall packaging/install options. # This section also has all the setup for various packaging-specific options. set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") if (WIN32) # Include installing the MSVCRT library include(InstallRequiredSystemLibraries) set (CPACK_GENERATOR "NSIS") set (CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/NSIS\\\\qpid-icon.ico") set (CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/NSIS\\\\qpid-icon.ico") set (CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/NSIS\\\\qpid-install-banner.bmp") set (CPACK_NSIS_URL_INFO_ABOUT "http://qpid.apache.org/") # Needs this to correctly set up Start menu links later. set (CPACK_PACKAGE_EXECUTABLES "") endif (WIN32) set (QPIDC_CONF_FILE ${QPID_INSTALL_CONFDIR}/qpidc.conf CACHE STRING "Name of the Qpid client configuration file") set (QPIDD_CONF_FILE ${QPID_INSTALL_CONFDIR}/qpidd.conf CACHE STRING "Name of the Qpid broker configuration file") install(FILES LICENSE NOTICE DESTINATION ${CMAKE_INSTALL_PREFIX}) install(FILES xml/cluster.xml DESTINATION ${QPID_INSTALL_DATADIR}) if (WIN32) set (CMAKE_DEBUG_POSTFIX "d") endif (WIN32) # set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CPACK_PACKAGE_NAME "qpid-cpp") set(CPACK_PACKAGE_VENDOR "Apache Software Foundation") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Qpid C++") set(CPACK_PACKAGE_VERSION "${qpidc_version}") set(CPACK_PACKAGE_VERSION_MAJOR "${QPID_VERSION_MAJOR}") set(CPACK_PACKAGE_VERSION_MINOR "${QPID_VERSION_MINOR}") set(CPACK_PACKAGE_VERSION_PATCH "0") set(CPACK_PACKAGE_INSTALL_DIRECTORY "qpidc-${qpidc_version}") add_subdirectory(managementgen) add_subdirectory(src) add_subdirectory(etc) add_subdirectory(bindings/qpid) add_subdirectory(bindings/qmf) add_subdirectory(bindings/qmf2) add_subdirectory(docs/api) add_subdirectory(docs/man) add_subdirectory(examples) include (CPack) qpidc-0.16/NOTICE0000664000076400007640000000155111076056706014052 0ustar00jrossjross00000000000000========================================================================= == NOTICE file corresponding to the section 4 d of == == the Apache License, Version 2.0, == == in this case for the Apache Qpid distribution. == ========================================================================= This product includes software developed by the Apache Software Foundation (http://www.apache.org/). Please read the LICENSE file present in the root directory of this distribution. Aside from contributions to the Apache Qpid project, this software also includes (binary only): - None at this time Project requires, not packaged: * boost version 1.33.1 or later under the Boost Software License, and can be downloaded from http://www.boost.org - Included in most OS platforms by default. qpidc-0.16/m4/0000775000076400007640000000000011752725672013472 5ustar00jrossjross00000000000000qpidc-0.16/m4/python.m40000664000076400007640000001616311060237013015237 0ustar00jrossjross00000000000000## ------------------------ -*- Autoconf -*- ## Python file handling ## From Andrew Dalke ## Updated by James Henstridge ## ------------------------ # 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. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 1.5 are not dnl supported because the default installation locations changed from dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages dnl in 1.5. m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python2.5 python2.4 python2.3 python2.2 dnl python2.1 python2.0 python1.6 python1.5]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT(yes)], [AC_MSG_ERROR(too old)]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [am_cv_python_pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(0,0,prefix='$PYTHON_PREFIX')" 2>/dev/null || echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. distutils does not exist in dnl Python 1.5, so we fall back to the hardcoded directory if it dnl doesn't work. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [am_cv_python_pyexecdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1,0,prefix='$PYTHON_EXEC_PREFIX')" 2>/dev/null || echo "${PYTHON_EXEC_PREFIX}/lib/python${PYTHON_VERSION}/site-packages"`]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # hexversion has been introduced in Python 1.5.2; it's probably not # worth to support older versions (1.5.1 was released on October 31, 1998). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('$2', '.')) + [[0, 0, 0]] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) qpidc-0.16/m4/compiler-flags.m40000664000076400007640000000140310533734621016624 0ustar00jrossjross00000000000000# serial 3 # Find valid warning flags for the C Compiler. -*-Autoconf-*- dnl Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Jesse Thilo. AC_DEFUN([gl_COMPILER_FLAGS], [AC_MSG_CHECKING(whether compiler accepts $1) AC_SUBST(COMPILER_FLAGS) ac_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $1" AC_TRY_COMPILE(, [int x;], COMPILER_FLAGS="$COMPILER_FLAGS $1" AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) CFLAGS="$ac_save_CFLAGS" CXXFLAGS="$ac_save_CXXFLAGS" ]) qpidc-0.16/m4/clock_time.m40000664000076400007640000000245510533734621016041 0ustar00jrossjross00000000000000# clock_time.m4 serial 8 dnl Copyright (C) 2002-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME. # For a program named, say foo, you should add a line like the following # in the corresponding Makefile.am file: # foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME) AC_DEFUN([gl_CLOCK_TIME], [ dnl Persuade glibc and Solaris to declare these functions. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* # programs in the package would end up linked with that potentially-shared # library, inducing unnecessary run-time overhead. gl_saved_libs=$LIBS AC_SEARCH_LIBS(clock_gettime, [rt posix4], [test "$ac_cv_search_clock_gettime" = "none required" || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) AC_SUBST([LIB_CLOCK_GETTIME]) AC_CHECK_FUNCS(clock_gettime clock_settime) LIBS=$gl_saved_libs ]) qpidc-0.16/m4/ac_pkg_swig.m40000664000076400007640000001431711423637565016215 0ustar00jrossjross00000000000000# =========================================================================== # http://www.nongnu.org/autoconf-archive/ac_pkg_swig.html # =========================================================================== # # SYNOPSIS # # AC_PROG_SWIG([major.minor.micro]) # # DESCRIPTION # # This macro searches for a SWIG installation on your system. If found you # should call SWIG via $(SWIG). You can use the optional first argument to # check if the version of the available SWIG is greater than or equal to # the value of the argument. It should have the format: N[.N[.N]] (N is a # number between 0 and 999. Only the first N is mandatory.) # # If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks that # the swig package is this version number or higher. # # In configure.in, use as: # # AC_PROG_SWIG(1.3.17) # SWIG_ENABLE_CXX # SWIG_MULTI_MODULE_SUPPORT # SWIG_PYTHON # # LICENSE # # Copyright (c) 2008 Sebastian Huber # Copyright (c) 2008 Alan W. Irwin # Copyright (c) 2008 Rafael Laboissiere # Copyright (c) 2008 Andrew Collier # # 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, see . # # 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 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. # # Fixed by Sandro Santilli to consider 2.0.0 > 1.3.37 (2010-06-15) AC_DEFUN([AC_PROG_SWIG],[ AC_PATH_PROG([SWIG],[swig]) if test -z "$SWIG" ; then AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org]) SWIG='echo "Error: SWIG is not installed. You should look at http://www.swig.org" ; false' elif test -n "$1" ; then AC_MSG_CHECKING([for SWIG version]) [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] AC_MSG_RESULT([$swig_version]) if test -n "$swig_version" ; then # Calculate the required version number components [required=$1] [required_major=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_major" ; then [required_major=0] fi [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] [required_minor=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_minor" ; then [required_minor=0] fi [required=`echo $required | sed 's/[0-9]*[^0-9]//'`] [required_patch=`echo $required | sed 's/[^0-9].*//'`] if test -z "$required_patch" ; then [required_patch=0] fi # Calculate the available version number components [available=$swig_version] [available_major=`echo $available | sed 's/[^0-9].*//'`] if test -z "$available_major" ; then [available_major=0] fi [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] [available_minor=`echo $available | sed 's/[^0-9].*//'`] if test -z "$available_minor" ; then [available_minor=0] fi [available=`echo $available | sed 's/[0-9]*[^0-9]//'`] [available_patch=`echo $available | sed 's/[^0-9].*//'`] if test -z "$available_patch" ; then [available_patch=0] fi [required_full=`printf %2.2d%2.2d%2.2d%2.2d $required_major $required_minor $required_patch]` [available_full=`printf %2.2d%2.2d%2.2d%2.2d $available_major $available_minor $available_patch]` if test $available_full -lt $required_full; then AC_MSG_WARN([SWIG version >= $1 is required. You have $swig_version. You should look at http://www.swig.org]) SWIG='echo "Error: SWIG version >= $1 is required. You have '"$swig_version"'. You should look at http://www.swig.org" ; false' else AC_MSG_NOTICE([SWIG executable is '$SWIG']) SWIG_LIB=`$SWIG -swiglib` AC_MSG_NOTICE([SWIG library directory is '$SWIG_LIB']) fi else AC_MSG_WARN([cannot determine SWIG version]) SWIG='echo "Error: Cannot determine SWIG version. You should look at http://www.swig.org" ; false' fi fi AC_SUBST([SWIG_LIB]) ]) qpidc-0.16/m4/extensions.m40000664000076400007640000000373611121672221016121 0ustar00jrossjross00000000000000# serial 5 -*- Autoconf -*- # Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006, 2008 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 definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS # Autoconf. Perhaps we can remove this once we can assume Autoconf # 2.61 or later everywhere, but since CVS Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. # AC_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [], [ AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [ AC_BEFORE([$0], [AC_COMPILE_IFELSE]) AC_BEFORE([$0], [AC_RUN_IFELSE]) AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_AIX]) AC_REQUIRE([AC_MINIX]) AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([ # define __EXTENSIONS__ 1 AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) ])]) # gl_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])]) qpidc-0.16/docs/0000775000076400007640000000000011752725673014103 5ustar00jrossjross00000000000000qpidc-0.16/docs/api/0000775000076400007640000000000011752725720014645 5ustar00jrossjross00000000000000qpidc-0.16/docs/api/Makefile.in0000664000076400007640000003064511752725661016726 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Run doxygen to generate HTML doc. # Generate dependency files so its rebuilt only when needed. # VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/api DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/developer.doxygen.in $(srcdir)/user.doxygen.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = user.doxygen developer.doxygen CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_DOXYGEN_TRUE@EXTRA_DIST = html user.doxygen developer.doxygen html.timestamp CMakeLists.txt \ @HAVE_DOXYGEN_TRUE@ header.html footer.html 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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/api/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/api/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 $(am__aclocal_m4_deps): user.doxygen: $(top_builddir)/config.status $(srcdir)/user.doxygen.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ developer.doxygen: $(top_builddir)/config.status $(srcdir)/developer.doxygen.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 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) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @HAVE_DOXYGEN_FALSE@clean-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: @HAVE_DOXYGEN_FALSE@html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am @HAVE_DOXYGEN_TRUE@html: html.timestamp @HAVE_DOXYGEN_TRUE@html.timestamp: @HAVE_DOXYGEN_TRUE@ test $(srcdir) = . || cp $(srcdir)/header.html $(srcdir)/footer.html . @HAVE_DOXYGEN_TRUE@ doxygen user.doxygen @HAVE_DOXYGEN_TRUE@ touch $@ @HAVE_DOXYGEN_TRUE@clean-local: @HAVE_DOXYGEN_TRUE@ rm -rf html html-dev html.timestamp # 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: qpidc-0.16/docs/api/Makefile.am0000664000076400007640000000231511320732341016666 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # # Run doxygen to generate HTML doc. # Generate dependency files so its rebuilt only when needed. # if HAVE_DOXYGEN EXTRA_DIST = html user.doxygen developer.doxygen html.timestamp CMakeLists.txt \ header.html footer.html html: html.timestamp html.timestamp: test $(srcdir) = . || cp $(srcdir)/header.html $(srcdir)/footer.html . doxygen user.doxygen touch $@ clean-local: rm -rf html html-dev html.timestamp endif qpidc-0.16/docs/api/developer.doxygen.in0000664000076400007640000014612211563472770020650 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # ---------------------------------------------------------------- # Doxygen settings for Qpid developer documentation. # # ---------------------------------------------------------------- # Doxyfile 1.4.6 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = Qpid # 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 = 0 # 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 = . # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, # Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, # Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, # Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # This tag can be used to specify the encoding used in the generated output. # The encoding is not always determined by the language that is chosen, # but also whether or not the output is meant for Windows or non-Windows users. # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES # forces the Windows encoding (this is the default for the Windows binary), # whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = YES # was NO - jwr # 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 = ../../src ../../ # 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 = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = YES # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = YES # was 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 # was NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # 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 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 = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # was YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = NO # was 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 # was YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = YES # 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 = YES # 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 = doxygen.log #--------------------------------------------------------------------------- # 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 = @top_srcdir@/docs/api/doxygen_developer_mainpage.h @top_srcdir@/include @top_srcdir@/src @top_builddir@/include @top_builddir@/src # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: FILE_PATTERNS = *.h *.cpp # 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 = test # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , 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 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-dev # 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 = YES # 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 = YES # 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 = QPID_CLIENT_EXTERN= QPID_COMMON_EXTERN= QPID_CONSOLE_EXTERN= QPID_BROKER_EXTERN= QPID_MESSAGING_EXTERN= QMF_EXTERN= QMFE_EXTERN= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = NO # 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 = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that a graph may be further truncated if the graph's # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = YES qpidc-0.16/docs/api/html.timestamp0000664000076400007640000000000011752725720017524 0ustar00jrossjross00000000000000qpidc-0.16/docs/api/user.doxygen0000664000076400007640000014410011752725671017227 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # ---------------------------------------------------------------- # Doxygen settings for Qpid user documentation. # # Note: Only public members of classes that are part of the public API # should be documented here. For complete developer documentation use # the developer.doxygen configuration. # ---------------------------------------------------------------- # Doxyfile 1.4.6 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "Qpid C++ Client API" # 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 = 0 # 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 = . # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, # Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, # Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, # Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # 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 = YES # 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 = ../../include ../../include ../../src/gen # 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 = ../../include ../../include # 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 = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = YES # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # 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 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 = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = NO # 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 # jwr 2008-11-25 # 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 = YES # 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 = YES # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is 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 = doxygen.log #--------------------------------------------------------------------------- # 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 = ../../docs/api/doxygen_mainpage.h ../../include ../../include # 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: FILE_PATTERNS = *.h # 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 = test tests broker amqp_0_10 log sys cluster management # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , 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 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 = NO #--------------------------------------------------------------------------- # 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 = YES # 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 = ./header.html # 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 = ./footer.html # 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 = YES # 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 = QPID_CLIENT_EXTERN= QPID_COMMON_EXTERN= QPID_CONSOLE_EXTERN= QPID_BROKER_EXTERN= QPID_MESSAGING_EXTERN= QMF_EXTERN= QMFE_EXTERN= # 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 = BOOST_PARAMETER_MEMFUN # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = NO # 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 = NO # 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 = NO # 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 = NO # 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 = NO # 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 = NO # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = NO # 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 = NO # 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_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that a graph may be further truncated if the graph's # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO qpidc-0.16/docs/api/html/0000775000076400007640000000000011752725720015611 5ustar00jrossjross00000000000000qpidc-0.16/docs/api/html/a00803.html0000664000076400007640000001372211752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::InvalidPathException Member List
This is the complete list of members for qpid::framing::InvalidPathException, including all inherited members.
codeqpid::ConnectionException
ConnectionException(framing::connection::CloseCode _code, const std::string &message)qpid::ConnectionException [inline]
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::InvalidPathException [inline, virtual]
InvalidPathException(const std::string &msg=std::string())qpid::framing::InvalidPathException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00668.html0000664000076400007640000002131111752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Range Member List
This is the complete list of members for qpid::Range, including all inherited members.
begin() const qpid::Range [inline]
begin(const T &t)qpid::Range [inline]
contains(const T &x) const qpid::Range [inline]
contains(const Range &r) const qpid::Range [inline]
empty() const qpid::Range [inline]
end() const qpid::Range [inline]
end(const T &t)qpid::Range [inline]
first() const qpid::Range [inline]
last() const qpid::Range [inline]
makeClosed(const T &first, T last)qpid::Range [inline, static]
merge(const Range &r)qpid::Range [inline]
operator bool() const qpid::Range [inline]
operator<(const T &t) const qpid::Range [inline]
operator<(const Range< T > &r) const qpid::Range [inline]
operator==(const Range &x)qpid::Range [inline]
Range()qpid::Range [inline]
Range(const T &t)qpid::Range [inline, explicit]
Range(const T &b, const T &e)qpid::Range [inline]
serialize(S &s)qpid::Range [inline]
size() const qpid::Range [inline]
strictContains(const Range &r) const qpid::Range [inline]
touching(const Range &r) const qpid::Range [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00463_source.html0000664000076400007640000003151611752725717020710 0ustar00jrossjross00000000000000 qpid/messaging/Connection.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Connection.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_CONNECTION_H
00002 #define QPID_MESSAGING_CONNECTION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/messaging/ImportExport.h"
00025 
00026 #include "qpid/messaging/Handle.h"
00027 #include "qpid/messaging/exceptions.h"
00028 #include "qpid/types/Variant.h"
00029 
00030 #include <string>
00031 
00032 namespace qpid {
00033 namespace messaging {
00034 
00035 #ifndef SWIG
00036 template <class> class PrivateImplRef;
00037 #endif
00038 class ConnectionImpl;
00039 class Session;
00040 
00045 class QPID_MESSAGING_CLASS_EXTERN Connection : public qpid::messaging::Handle<ConnectionImpl>
00046 {
00047   public:
00048     QPID_MESSAGING_EXTERN Connection(ConnectionImpl* impl);
00049     QPID_MESSAGING_EXTERN Connection(const Connection&);
00050     QPID_MESSAGING_EXTERN Connection();
00082     QPID_MESSAGING_EXTERN Connection(const std::string& url, const qpid::types::Variant::Map& options = qpid::types::Variant::Map());
00089     QPID_MESSAGING_EXTERN Connection(const std::string& url, const std::string& options);
00090     QPID_MESSAGING_EXTERN ~Connection();
00091     QPID_MESSAGING_EXTERN Connection& operator=(const Connection&);
00092     QPID_MESSAGING_EXTERN void setOption(const std::string& name, const qpid::types::Variant& value);
00093     QPID_MESSAGING_EXTERN void open();
00094     QPID_MESSAGING_EXTERN bool isOpen();
00095     QPID_MESSAGING_EXTERN bool isOpen() const;
00101     QPID_MESSAGING_EXTERN void close();
00102     QPID_MESSAGING_EXTERN Session createTransactionalSession(const std::string& name = std::string());
00103     QPID_MESSAGING_EXTERN Session createSession(const std::string& name = std::string());
00104 
00105     QPID_MESSAGING_EXTERN Session getSession(const std::string& name) const;
00106     QPID_MESSAGING_EXTERN std::string getAuthenticatedUsername();
00107 
00108 #ifndef SWIG
00109   private:
00110   friend class qpid::messaging::PrivateImplRef<Connection>;
00111 #endif
00112 };
00113 
00114 }} // namespace qpid::messaging
00115 
00116 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x64.html0000664000076400007640000002513311752725720023602 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- d -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00558_source.html0000664000076400007640000001774211752725717020722 0ustar00jrossjross00000000000000 qpid/sys/Monitor.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Monitor.h
Go to the documentation of this file.
00001 #ifndef _sys_Monitor_h
00002 #define _sys_Monitor_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/sys/Condition.h"
00026 
00027 namespace qpid {
00028 namespace sys {
00029 
00033 class Monitor : public Mutex, public Condition {
00034   public:
00035     inline void wait();
00036     inline bool wait(const AbsTime& absoluteTime);
00037 };
00038 
00039 
00040 void Monitor::wait() {
00041     Condition::wait(*this);
00042 }
00043 
00044 bool Monitor::wait(const AbsTime& absoluteTime) {
00045     return Condition::wait(*this, absoluteTime);
00046 }
00047 
00048 }}
00049 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x64.html0000664000076400007640000002724411752725720022600 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- d -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00422.html0000664000076400007640000001455111752725717017323 0ustar00jrossjross00000000000000 qpid/console/Object.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Object.h File Reference
#include "qpid/console/ConsoleImportExport.h"
#include "qpid/console/ObjectId.h"
#include "qpid/framing/Uuid.h"
#include "qpid/framing/FieldTable.h"
#include <boost/shared_ptr.hpp>
#include <map>
#include <set>
#include <vector>

Go to the source code of this file.

Classes

struct  qpid::console::MethodResponse
class  qpid::console::Object
struct  qpid::console::Object::AttributeMap

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  qpid::console

Functions

std::ostreamqpid::console::operator<< (std::ostream &o, const Object &object)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00141.html0000664000076400007640000003731611752725717017325 0ustar00jrossjross00000000000000 qmf::Handle Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

A handle is like a pointer: refers to an underlying implementation object. More...

#include <qmf/Handle.h>

List of all members.

Public Member Functions

QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Member Functions

QMF_INLINE_EXTERN Handle ()
 Handle (const Handle &)
Handleoperator= (const Handle &)

Protected Attributes

Implimpl

Detailed Description

A handle is like a pointer: refers to an underlying implementation object.

Copying the handle does not copy the object.

Handles can be null, like a 0 pointer. Use isValid(), isNull() or the conversion to bool to test for a null handle.


Member Typedef Documentation

typedef T qmf::Handle::Impl [protected]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

QMF_INLINE_EXTERN qmf::Handle::Handle ( ) [inline, protected]

Definition at line 57 of file Handle.h.

qmf::Handle::Handle ( const Handle ) [protected]

Member Function Documentation

QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

Handle& qmf::Handle::operator= ( const Handle ) [protected]
void qmf::Handle::swap ( Handle< T > &  h) [inline]

Definition at line 53 of file Handle.h.


Member Data Documentation


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00588.html0000664000076400007640000001436511752725720017335 0ustar00jrossjross00000000000000 qpid::framing::stream Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::stream Namespace Reference

Enumerations

enum  ReturnCode { RETURN_CODE_CONTENT_TOO_LARGE = 311, RETURN_CODE_NO_ROUTE = 312, RETURN_CODE_NO_CONSUMERS = 313 }

Enumeration Type Documentation

Enumerator:
RETURN_CODE_CONTENT_TOO_LARGE 
RETURN_CODE_NO_ROUTE 
RETURN_CODE_NO_CONSUMERS 

Definition at line 163 of file enum.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00757.html0000664000076400007640000001720011752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::EncodedValue Member List
This is the complete list of members for qpid::framing::EncodedValue, including all inherited members.
convertsToInt() const qpid::framing::FieldValue::Data [inline, virtual]
convertsToString() const qpid::framing::FieldValue::Data [inline, virtual]
decode(Buffer &buffer)qpid::framing::EncodedValue [inline, virtual]
encode(Buffer &buffer)qpid::framing::EncodedValue [inline, virtual]
encodedSize() const qpid::framing::EncodedValue [inline, virtual]
EncodedValue()qpid::framing::EncodedValue [inline]
EncodedValue(const T &v)qpid::framing::EncodedValue [inline]
getInt() const qpid::framing::FieldValue::Data [inline, virtual]
getString() const qpid::framing::FieldValue::Data [inline, virtual]
getValue()qpid::framing::EncodedValue [inline]
getValue() const qpid::framing::EncodedValue [inline]
operator==(const Data &d) const qpid::framing::EncodedValue [inline]
qpid::framing::FieldValue::Data::operator==(const Data &) const =0qpid::framing::FieldValue::Data [pure virtual]
print(std::ostream &o) const qpid::framing::EncodedValue [inline, virtual]
~Data()qpid::framing::FieldValue::Data [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00884.html0000664000076400007640000001522711752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Condition Member List
This is the complete list of members for qpid::sys::Condition, including all inherited members.
Condition()qpid::sys::Condition [inline]
Condition()qpid::sys::Condition [inline]
notify()qpid::sys::Condition [inline]
notify()qpid::sys::Condition [inline]
notifyAll()qpid::sys::Condition [inline]
notifyAll()qpid::sys::Condition [inline]
wait(Mutex &)qpid::sys::Condition [inline]
wait(Mutex &, const AbsTime &absoluteTime)qpid::sys::Condition [inline]
wait(Mutex &)qpid::sys::Condition [inline]
wait(Mutex &, const AbsTime &absoluteTime)qpid::sys::Condition [inline]
~Condition()qpid::sys::Condition [inline]
~Condition()qpid::sys::Condition [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00046.html0000664000076400007640000013026111752725720017314 0ustar00jrossjross00000000000000 qpid::management::Buffer Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::Buffer Class Reference

This class is a wrapper around qpid::framing::Buffer that does not include any dependencies from boost or from qpid::framing. More...

#include <qpid/management/Buffer.h>

List of all members.

Public Member Functions

 Buffer (char *data=0, uint32_t size=0)
 ~Buffer ()
void record ()
void restore (bool reRecord=false)
void reset ()
uint32_t available ()
uint32_t getSize ()
uint32_t getPosition ()
char * getPointer ()
void putOctet (uint8_t i)
void putShort (uint16_t i)
void putLong (uint32_t i)
void putLongLong (uint64_t i)
void putInt8 (int8_t i)
void putInt16 (int16_t i)
void putInt32 (int32_t i)
void putInt64 (int64_t i)
void putFloat (float f)
void putDouble (double f)
void putBin128 (const uint8_t *b)
uint8_t getOctet ()
uint16_t getShort ()
uint32_t getLong ()
uint64_t getLongLong ()
int8_t getInt8 ()
int16_t getInt16 ()
int32_t getInt32 ()
int64_t getInt64 ()
float getFloat ()
double getDouble ()
void putShortString (const std::string &s)
void putMediumString (const std::string &s)
void putLongString (const std::string &s)
void getShortString (std::string &s)
void getMediumString (std::string &s)
void getLongString (std::string &s)
void getBin128 (uint8_t *b)
void putMap (const types::Variant::Map &map)
void putList (const types::Variant::List &list)
void getMap (types::Variant::Map &map)
void getList (types::Variant::List &list)
void putRawData (const std::string &s)
void getRawData (std::string &s, uint32_t size)
void putRawData (const uint8_t *data, size_t size)
void getRawData (uint8_t *data, size_t size)

Detailed Description

This class is a wrapper around qpid::framing::Buffer that does not include any dependencies from boost or from qpid::framing.


Constructor & Destructor Documentation

qpid::management::Buffer::Buffer ( char *  data = 0,
uint32_t  size = 0 
)
qpid::management::Buffer::~Buffer ( )

Member Function Documentation

uint32_t qpid::management::Buffer::available ( )
void qpid::management::Buffer::getBin128 ( uint8_t b)
double qpid::management::Buffer::getDouble ( )
float qpid::management::Buffer::getFloat ( )
int16_t qpid::management::Buffer::getInt16 ( )
int32_t qpid::management::Buffer::getInt32 ( )
int64_t qpid::management::Buffer::getInt64 ( )
int8_t qpid::management::Buffer::getInt8 ( )
void qpid::management::Buffer::getList ( types::Variant::List list)
uint32_t qpid::management::Buffer::getLong ( )
uint64_t qpid::management::Buffer::getLongLong ( )
void qpid::management::Buffer::getLongString ( std::string s)
void qpid::management::Buffer::getMap ( types::Variant::Map map)
void qpid::management::Buffer::getMediumString ( std::string s)
uint8_t qpid::management::Buffer::getOctet ( )
char* qpid::management::Buffer::getPointer ( )
uint32_t qpid::management::Buffer::getPosition ( )
void qpid::management::Buffer::getRawData ( std::string s,
uint32_t  size 
)
void qpid::management::Buffer::getRawData ( uint8_t data,
size_t  size 
)
uint16_t qpid::management::Buffer::getShort ( )
void qpid::management::Buffer::getShortString ( std::string s)
uint32_t qpid::management::Buffer::getSize ( )
void qpid::management::Buffer::putBin128 ( const uint8_t b)
void qpid::management::Buffer::putDouble ( double  f)
void qpid::management::Buffer::putFloat ( float  f)
void qpid::management::Buffer::putInt16 ( int16_t  i)
void qpid::management::Buffer::putInt32 ( int32_t  i)
void qpid::management::Buffer::putInt64 ( int64_t  i)
void qpid::management::Buffer::putInt8 ( int8_t  i)
void qpid::management::Buffer::putList ( const types::Variant::List list)
void qpid::management::Buffer::putLong ( uint32_t  i)
void qpid::management::Buffer::putLongLong ( uint64_t  i)
void qpid::management::Buffer::putLongString ( const std::string s)
void qpid::management::Buffer::putMap ( const types::Variant::Map map)
void qpid::management::Buffer::putMediumString ( const std::string s)
void qpid::management::Buffer::putOctet ( uint8_t  i)
void qpid::management::Buffer::putRawData ( const std::string s)
void qpid::management::Buffer::putRawData ( const uint8_t data,
size_t  size 
)
void qpid::management::Buffer::putShort ( uint16_t  i)
void qpid::management::Buffer::putShortString ( const std::string s)
void qpid::management::Buffer::record ( )
void qpid::management::Buffer::reset ( )
void qpid::management::Buffer::restore ( bool  reRecord = false)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00391.html0000664000076400007640000001017611752725720017321 0ustar00jrossjross00000000000000 std::wios Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wios Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00885.html0000664000076400007640000001636511752725720017337 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Mutex Member List
This is the complete list of members for qpid::sys::Mutex, including all inherited members.
lock()qpid::sys::Mutex [inline]
lock()qpid::sys::Mutex [inline]
mutexqpid::sys::Mutex [protected]
mutexqpid::sys::Mutex [protected]
Mutex()qpid::sys::Mutex [inline]
Mutex()qpid::sys::Mutex [inline]
ScopedLock typedefqpid::sys::Mutex
ScopedLock typedefqpid::sys::Mutex
ScopedUnlock typedefqpid::sys::Mutex
ScopedUnlock typedefqpid::sys::Mutex
trylock()qpid::sys::Mutex [inline]
trylock()qpid::sys::Mutex [inline]
unlock()qpid::sys::Mutex [inline]
unlock()qpid::sys::Mutex [inline]
~Mutex()qpid::sys::Mutex [inline]
~Mutex()qpid::sys::Mutex [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00346.html0000664000076400007640000001024411752725720017315 0ustar00jrossjross00000000000000 std::stringstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::stringstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00563.html0000664000076400007640000002666311752725717017340 0ustar00jrossjross00000000000000 qpid/sys/Time.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Time.h File Reference
#include "qpid/sys/IntegerTypes.h"
#include "posix/Time.h"
#include "qpid/CommonImportExport.h"
#include <limits>
#include <iosfwd>

Go to the source code of this file.

Classes

class  qpid::sys::AbsTime
 Class to represent an instant in time. More...
class  qpid::sys::Duration
 Class to represent the duration between instants of time. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Functions

std::ostreamqpid::sys::operator<< (std::ostream &, const AbsTime &)
std::ostreamqpid::sys::operator<< (std::ostream &, const Duration &)
AbsTime qpid::sys::now ()
bool qpid::sys::operator< (const AbsTime &a, const AbsTime &b)
bool qpid::sys::operator> (const AbsTime &a, const AbsTime &b)
void qpid::sys::sleep (int secs)
 Portable sleep for a number of seconds.
void qpid::sys::usleep (uint64_t usecs)
 Portable sleep for a number of microseconds.
void qpid::sys::outputFormattedNow (std::ostream &)
 Output formatted date/time for now.
void qpid::sys::outputHiresNow (std::ostream &)
 Output unformatted nanosecond-resolution time for now.

Variables

const Duration qpid::sys::TIME_SEC = 1000*1000*1000
 Nanoseconds per second.
const Duration qpid::sys::TIME_MSEC = 1000*1000
 Nanoseconds per millisecond.
const Duration qpid::sys::TIME_USEC = 1000
 Nanoseconds per microseconds.
const Duration qpid::sys::TIME_NSEC = 1
 Nanoseconds per nanosecond.
const Duration qpid::sys::TIME_INFINITE = std::numeric_limits<int64_t>::max()
 Value to represent an infinite timeout.
const AbsTime qpid::sys::EPOCH = AbsTime::Epoch()
 Absolute time point for the Unix epoch: 1970-01-01T00:00:00.
const AbsTime qpid::sys::FAR_FUTURE = AbsTime::FarFuture()
 Time greater than any other time.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00290.html0000664000076400007640000001037211752725720017315 0ustar00jrossjross00000000000000 std::multimap::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multimap::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00868.html0000664000076400007640000001442511752725720017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Handle Member List
This is the complete list of members for qpid::messaging::Handle, including all inherited members.
Handle()qpid::messaging::Handle [inline, protected]
Handle(const Handle &)qpid::messaging::Handle [protected]
Impl typedefqpid::messaging::Handle [protected]
implqpid::messaging::Handle [protected]
isNull() const qpid::messaging::Handle [inline]
isValid() const qpid::messaging::Handle [inline]
operator bool() const qpid::messaging::Handle [inline]
operator!() const qpid::messaging::Handle [inline]
operator=(const Handle &)qpid::messaging::Handle [protected]
swap(Handle< T > &h)qpid::messaging::Handle [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00783.html0000664000076400007640000002152611752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::List Member List
This is the complete list of members for qpid::framing::List, including all inherited members.
back() const qpid::framing::List [inline]
begin() const qpid::framing::List [inline]
begin()qpid::framing::List [inline]
const_iterator typedefqpid::framing::List
const_reference typedefqpid::framing::List
decode(Buffer &buffer)qpid::framing::List
encode(Buffer &buffer) const qpid::framing::List
encodedSize() const qpid::framing::List
end() const qpid::framing::List [inline]
end()qpid::framing::List [inline]
erase(iterator i)qpid::framing::List [inline]
front() const qpid::framing::List [inline]
insert(iterator i, ValuePtr value)qpid::framing::List [inline]
iterator typedefqpid::framing::List
operator<<(std::ostream &out, const List &list)qpid::framing::List [friend]
operator==(const List &other) const qpid::framing::List
pop_back()qpid::framing::List [inline]
push_back(ValuePtr value)qpid::framing::List [inline]
reference typedefqpid::framing::List
size() const qpid::framing::List [inline]
value_type typedefqpid::framing::List
ValuePtr typedefqpid::framing::List
Values typedefqpid::framing::List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00403_source.html0000664000076400007640000004212511752725717020700 0ustar00jrossjross00000000000000 qmf/Agent.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Agent.h
Go to the documentation of this file.
00001 #ifndef QMF_AGENT_H
00002 #define QMF_AGENT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 //#include "qmf/Subscription.h"
00027 #include "qmf/exceptions.h"
00028 #include "qpid/messaging/Duration.h"
00029 #include "qpid/types/Variant.h"
00030 #include <string>
00031 
00032 namespace qmf {
00033 
00034 #ifndef SWIG
00035     template <class> class PrivateImplRef;
00036 #endif
00037 
00038     class AgentImpl;
00039     class ConsoleEvent;
00040     class Query;
00041     class DataAddr;
00042     class SchemaId;
00043     class Schema;
00044 
00045     class QMF_CLASS_EXTERN Agent : public qmf::Handle<AgentImpl> {
00046     public:
00047         QMF_EXTERN Agent(AgentImpl* impl = 0);
00048         QMF_EXTERN Agent(const Agent&);
00049         QMF_EXTERN Agent& operator=(const Agent&);
00050         QMF_EXTERN ~Agent();
00051 
00052         QMF_EXTERN std::string getName() const;
00053         QMF_EXTERN uint32_t getEpoch() const;
00054         QMF_EXTERN std::string getVendor() const;
00055         QMF_EXTERN std::string getProduct() const;
00056         QMF_EXTERN std::string getInstance() const;
00057         QMF_EXTERN const qpid::types::Variant& getAttribute(const std::string&) const;
00058         QMF_EXTERN const qpid::types::Variant::Map& getAttributes() const;
00059 
00060         QMF_EXTERN ConsoleEvent query(const Query&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
00061         QMF_EXTERN ConsoleEvent query(const std::string&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
00062         QMF_EXTERN uint32_t queryAsync(const Query&);
00063         QMF_EXTERN uint32_t queryAsync(const std::string&);
00064 
00068         //QMF_EXTERN Subscription subscribe(const Query&, const std::string& options = "");
00069         //QMF_EXTERN Subscription subscribe(const std::string&, const std::string& options = "");
00070 
00071         QMF_EXTERN ConsoleEvent callMethod(const std::string&, const qpid::types::Variant::Map&, const DataAddr&,
00072                                            qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
00073         QMF_EXTERN uint32_t callMethodAsync(const std::string&, const qpid::types::Variant::Map&, const DataAddr&);
00074 
00085         QMF_EXTERN ConsoleEvent querySchema(qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
00086         QMF_EXTERN uint32_t querySchemaAsync();
00087 
00098         QMF_EXTERN uint32_t getPackageCount() const;
00099         QMF_EXTERN const std::string& getPackage(uint32_t) const;
00100 
00111         QMF_EXTERN uint32_t getSchemaIdCount(const std::string&) const;
00112         QMF_EXTERN SchemaId getSchemaId(const std::string&, uint32_t) const;
00113 
00121         QMF_EXTERN Schema getSchema(const SchemaId&, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE);
00122 
00123 
00124 #ifndef SWIG
00125     private:
00126         friend class qmf::PrivateImplRef<Agent>;
00127         friend struct AgentImplAccess;
00128 #endif
00129     };
00130 
00131 }
00132 
00133 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00214.html0000664000076400007640000002130011752725717017310 0ustar00jrossjross00000000000000 qmf::engine::MethodResponse Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::MethodResponse Class Reference

#include <qmf/engine/Console.h>

List of all members.

Public Member Functions

 MethodResponse (const MethodResponse &from)
 ~MethodResponse ()
uint32_t getStatus () const
const ValuegetException () const
const ValuegetArgs () const

Constructor & Destructor Documentation

qmf::engine::MethodResponse::MethodResponse ( const MethodResponse from)
qmf::engine::MethodResponse::~MethodResponse ( )

Member Function Documentation

const Value* qmf::engine::MethodResponse::getArgs ( ) const
const Value* qmf::engine::MethodResponse::getException ( ) const
uint32_t qmf::engine::MethodResponse::getStatus ( ) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00404_source.html0000664000076400007640000005214611752725717020705 0ustar00jrossjross00000000000000 qmf/engine/Agent.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Agent.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineAgent_
00002 #define _QmfEngineAgent_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <qmf/engine/Schema.h>
00024 #include <qmf/engine/ObjectId.h>
00025 #include <qmf/engine/Object.h>
00026 #include <qmf/engine/Event.h>
00027 #include <qmf/engine/Query.h>
00028 #include <qmf/engine/Value.h>
00029 #include <qmf/engine/Message.h>
00030 
00031 namespace qmf {
00032 namespace engine {
00033 
00040     struct AgentEvent {
00041         enum EventKind {
00042             GET_QUERY      = 1,
00043             START_SYNC     = 2,
00044             END_SYNC       = 3,
00045             METHOD_CALL    = 4,
00046             DECLARE_QUEUE  = 5,
00047             DELETE_QUEUE   = 6,
00048             BIND           = 7,
00049             UNBIND         = 8,
00050             SETUP_COMPLETE = 9
00051         };
00052 
00053         EventKind    kind;
00054         uint32_t     sequence;    // Protocol sequence (for all kinds)
00055         char*        authUserId;  // Authenticated user ID (for all kinds)
00056         char*        authToken;   // Authentication token if issued (for all kinds)
00057         char*        name;        // Name of the method/sync query
00058                                   //    (METHOD_CALL, START_SYNC, END_SYNC, DECLARE_QUEUE, BIND, UNBIND)
00059         Object*      object;      // Object involved in method call (METHOD_CALL)
00060         ObjectId*    objectId;    // ObjectId for method call (METHOD_CALL)
00061         Query*       query;       // Query parameters (GET_QUERY, START_SYNC)
00062         Value*       arguments;   // Method parameters (METHOD_CALL)
00063         char*        exchange;    // Exchange for bind (BIND, UNBIND)
00064         char*        bindingKey;  // Key for bind (BIND, UNBIND)
00065         const SchemaObjectClass* objectClass; // (METHOD_CALL)
00066     };
00067 
00068     class AgentImpl;
00069 
00073     class Agent {
00074     public:
00075         Agent(char* label, bool internalStore=true);
00076         ~Agent();
00077 
00084         void setStoreDir(const char* path);
00085 
00092         void setTransferDir(const char* path);
00093 
00098         void handleRcvMessage(Message& message);
00099 
00105         bool getXmtMessage(Message& item) const;
00106 
00110         void popXmt();
00111 
00117         bool getEvent(AgentEvent& event) const;
00118 
00122         void popEvent();
00123 
00127         void newSession();
00128 
00133         void startProtocol();
00134 
00138         void heartbeat();
00139 
00147         void methodResponse(uint32_t sequence, uint32_t status, char* text, const Value& arguments);
00148 
00158         void queryResponse(uint32_t sequence, Object& object, bool prop = true, bool stat = true);
00159 
00164         void queryComplete(uint32_t sequence);
00165 
00170         void registerClass(SchemaObjectClass* cls);
00171 
00176         void registerClass(SchemaEventClass* cls);
00177 
00185         const ObjectId* addObject(Object& obj, uint64_t persistId);
00186         //        const ObjectId* addObject(Object& obj, uint32_t persistIdLo, uint32_t persistIdHi);
00187 
00193         const ObjectId* allocObjectId(uint64_t persistId);
00194         const ObjectId* allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi);
00195 
00200         void raiseEvent(Event& event);
00201 
00202     private:
00203         AgentImpl* impl;
00204     };
00205 }
00206 }
00207 
00208 #endif
00209 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00390.html0000664000076400007640000001445211752725720017321 0ustar00jrossjross00000000000000 qpid::framing::Window Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Window Struct Reference

#include <qpid/framing/SequenceNumber.h>

List of all members.

Public Attributes

SequenceNumber hwm
SequenceNumber lwm

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x6a.html0000664000076400007640000001447111752725717022375 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- j -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00184.html0000664000076400007640000001764411752725720017330 0ustar00jrossjross00000000000000 qpid::messaging::KeyError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::KeyError Struct Reference

Thrown to indicate a failed lookup of some local object. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 KeyError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown to indicate a failed lookup of some local object.

For example when attempting to retrieve a session, sender or receiver by name.


Constructor & Destructor Documentation

qpid::messaging::KeyError::KeyError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00831.html0000664000076400007640000001174011752725720017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::OutOfBounds Member List
This is the complete list of members for qpid::management::OutOfBounds, including all inherited members.
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
OutOfBounds()qpid::management::OutOfBounds [inline]
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00080.html0000664000076400007640000001033611752725720017312 0ustar00jrossjross00000000000000 std::set::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::set::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00482.html0000664000076400007640000001457411752725717017336 0ustar00jrossjross00000000000000 qpid/CommonImportExport.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/CommonImportExport.h File Reference

Go to the source code of this file.

Defines

#define QPID_COMMON_EXTERN   QPID_IMPORT
#define QPID_COMMON_CLASS_EXTERN   QPID_CLASS_IMPORT
#define QPID_COMMON_INLINE_EXTERN   QPID_INLINE_IMPORT

Define Documentation

#define QPID_COMMON_CLASS_EXTERN   QPID_CLASS_IMPORT

Definition at line 31 of file CommonImportExport.h.

#define QPID_COMMON_EXTERN   QPID_IMPORT

Definition at line 30 of file CommonImportExport.h.

#define QPID_COMMON_INLINE_EXTERN   QPID_INLINE_IMPORT

Definition at line 32 of file CommonImportExport.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00501.html0000664000076400007640000001202411752725717017312 0ustar00jrossjross00000000000000 qpid/framing/DtxRecoverResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/DtxRecoverResult.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::DtxRecoverResult

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00795.html0000664000076400007640000001373211752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::CommandInvalidException Member List
This is the complete list of members for qpid::framing::CommandInvalidException, including all inherited members.
codeqpid::SessionException
CommandInvalidException(const std::string &msg=std::string())qpid::framing::CommandInvalidException [inline]
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::CommandInvalidException [inline, virtual]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00592.html0000664000076400007640000011002311752725720017314 0ustar00jrossjross00000000000000 qpid::sys Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys Namespace Reference

Namespaces

namespace  SystemInfo
 

Retrieve information about the system we are running on.


Classes

struct  Raisable
class  ExceptionHolder
 Holder for exceptions. More...
class  IOHandle
class  Monitor
 A monitor is a condition variable and a mutex. More...
class  ScopedLock
 Scoped lock template: calls lock() in ctor, unlock() in dtor. More...
class  ScopedUnlock
class  ScopedRlock
class  ScopedWlock
class  ConditionalScopedLock
class  Condition
 A condition variable for thread synchronization. More...
class  Mutex
 Mutex lock. More...
class  RWlock
 RW lock. More...
struct  PODMutex
 PODMutex is a POD, can be static-initialized with PODMutex m = QPID_PODMUTEX_INITIALIZER. More...
class  IOHandlePrivate
class  PosixIOHandle
class  NullIOHandle
class  Runnable
 Interface for objects that can be run, e.g. More...
class  Thread
class  AbsTime
 Class to represent an instant in time. More...
class  Duration
 Class to represent the duration between instants of time. More...

Typedefs

typedef int64_t TimePrivate
 Class to represent an instant in time.

Functions

struct timespec & toTimespec (struct timespec &ts, const Duration &t)
struct timeval & toTimeval (struct timeval &tv, const Duration &t)
Duration toTime (const struct timespec &ts)
struct addrinfo & getAddrInfo (const SocketAddress &)
int toFd (const IOHandlePrivate *h)
std::string strError (int err)
 Get the error message for a system number err, e.g.
std::ostreamoperator<< (std::ostream &, const AbsTime &)
std::ostreamoperator<< (std::ostream &, const Duration &)
AbsTime now ()
bool operator< (const AbsTime &a, const AbsTime &b)
bool operator> (const AbsTime &a, const AbsTime &b)
void sleep (int secs)
 Portable sleep for a number of seconds.
void usleep (uint64_t usecs)
 Portable sleep for a number of microseconds.
void outputFormattedNow (std::ostream &)
 Output formatted date/time for now.
void outputHiresNow (std::ostream &)
 Output unformatted nanosecond-resolution time for now.

Variables

NullIOHandle DummyIOHandle
const Duration TIME_SEC = 1000*1000*1000
 Nanoseconds per second.
const Duration TIME_MSEC = 1000*1000
 Nanoseconds per millisecond.
const Duration TIME_USEC = 1000
 Nanoseconds per microseconds.
const Duration TIME_NSEC = 1
 Nanoseconds per nanosecond.
const Duration TIME_INFINITE = std::numeric_limits<int64_t>::max()
 Value to represent an infinite timeout.
const AbsTime EPOCH = AbsTime::Epoch()
 Absolute time point for the Unix epoch: 1970-01-01T00:00:00.
const AbsTime FAR_FUTURE = AbsTime::FarFuture()
 Time greater than any other time.

Typedef Documentation

typedef boost::posix_time::ptime qpid::sys::TimePrivate

Class to represent an instant in time.

Boost has this stuff already done so just reuse it. We can also grab this for quick use with the Condition wait operations.

Definition at line 30 of file Time.h.


Function Documentation

struct addrinfo& qpid::sys::getAddrInfo ( const SocketAddress &  ) [read]
AbsTime qpid::sys::now ( ) [inline]

Definition at line 129 of file Time.h.

References qpid::sys::AbsTime::now().

bool qpid::sys::operator< ( const AbsTime &  a,
const AbsTime &  b 
) [inline]

Definition at line 131 of file Time.h.

std::ostream& qpid::sys::operator<< ( std::ostream ,
const AbsTime &   
)
std::ostream& qpid::sys::operator<< ( std::ostream ,
const Duration &   
)
bool qpid::sys::operator> ( const AbsTime &  a,
const AbsTime &  b 
) [inline]

Definition at line 133 of file Time.h.

void qpid::sys::outputFormattedNow ( std::ostream )

Output formatted date/time for now.

void qpid::sys::outputHiresNow ( std::ostream )

Output unformatted nanosecond-resolution time for now.

void qpid::sys::sleep ( int  secs)

Portable sleep for a number of seconds.

std::string qpid::sys::strError ( int  err)

Get the error message for a system number err, e.g.

errno.

int qpid::sys::toFd ( const IOHandlePrivate *  h)
Duration qpid::sys::toTime ( const struct timespec &  ts)
struct timespec& qpid::sys::toTimespec ( struct timespec &  ts,
const Duration &  t 
) [read]
struct timeval& qpid::sys::toTimeval ( struct timeval &  tv,
const Duration &  t 
) [read]
void qpid::sys::usleep ( uint64_t  usecs)

Portable sleep for a number of microseconds.


Variable Documentation

const AbsTime qpid::sys::EPOCH = AbsTime::Epoch()

Absolute time point for the Unix epoch: 1970-01-01T00:00:00.

Definition at line 156 of file Time.h.

Referenced by qpid::sys::Condition::wait().

const AbsTime qpid::sys::FAR_FUTURE = AbsTime::FarFuture()

Time greater than any other time.

Definition at line 159 of file Time.h.

const Duration qpid::sys::TIME_INFINITE = std::numeric_limits<int64_t>::max()

Value to represent an infinite timeout.

Definition at line 153 of file Time.h.

const Duration qpid::sys::TIME_MSEC = 1000*1000

Nanoseconds per millisecond.

Definition at line 146 of file Time.h.

Nanoseconds per nanosecond.

Definition at line 150 of file Time.h.

const Duration qpid::sys::TIME_SEC = 1000*1000*1000

Nanoseconds per second.

Definition at line 144 of file Time.h.

Nanoseconds per microseconds.

Definition at line 148 of file Time.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00367.html0000664000076400007640000001024211752725720017316 0ustar00jrossjross00000000000000 std::underflow_error Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::underflow_error Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00835.html0000664000076400007640000003253211752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ManagementEvent Member List
This is the complete list of members for qpid::management::ManagementEvent, including all inherited members.
ACCESS_RCqpid::management::ManagementItem [static]
ACCESS_ROqpid::management::ManagementItem [static]
ACCESS_RWqpid::management::ManagementItem [static]
CLASS_KIND_EVENTqpid::management::ManagementItem [static]
CLASS_KIND_TABLEqpid::management::ManagementItem [static]
DIR_Iqpid::management::ManagementItem [static]
DIR_IOqpid::management::ManagementItem [static]
DIR_Oqpid::management::ManagementItem [static]
encode(std::string &) const =0qpid::management::ManagementEvent [pure virtual]
FLAG_CONFIGqpid::management::ManagementItem [static]
FLAG_ENDqpid::management::ManagementItem [static]
FLAG_INDEXqpid::management::ManagementItem [static]
getEventName() const =0qpid::management::ManagementEvent [pure virtual]
getMd5Sum() const =0qpid::management::ManagementEvent [pure virtual]
getPackageName() const =0qpid::management::ManagementEvent [pure virtual]
getSeverity() const =0qpid::management::ManagementEvent [pure virtual]
getWriteSchemaCall(void)=0qpid::management::ManagementEvent [pure virtual]
mapEncode(qpid::types::Variant::Map &) const =0qpid::management::ManagementEvent [pure virtual]
MD5_LENqpid::management::ManagementEvent [static]
TYPE_ABSTIMEqpid::management::ManagementItem [static]
TYPE_BOOLqpid::management::ManagementItem [static]
TYPE_DELTATIMEqpid::management::ManagementItem [static]
TYPE_DOUBLEqpid::management::ManagementItem [static]
TYPE_FLOATqpid::management::ManagementItem [static]
TYPE_FTABLEqpid::management::ManagementItem [static]
TYPE_LISTqpid::management::ManagementItem [static]
TYPE_LSTRqpid::management::ManagementItem [static]
TYPE_REFqpid::management::ManagementItem [static]
TYPE_S16qpid::management::ManagementItem [static]
TYPE_S32qpid::management::ManagementItem [static]
TYPE_S64qpid::management::ManagementItem [static]
TYPE_S8qpid::management::ManagementItem [static]
TYPE_SSTRqpid::management::ManagementItem [static]
TYPE_U16qpid::management::ManagementItem [static]
TYPE_U32qpid::management::ManagementItem [static]
TYPE_U64qpid::management::ManagementItem [static]
TYPE_U8qpid::management::ManagementItem [static]
TYPE_UUIDqpid::management::ManagementItem [static]
writeSchemaCall_t typedefqpid::management::ManagementEvent
~ManagementEvent()qpid::management::ManagementEvent [inline, virtual]
~ManagementItem()qpid::management::ManagementItem [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00186.html0000664000076400007640000001022411752725720017315 0ustar00jrossjross00000000000000 std::length_error Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::length_error Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00036.html0000664000076400007640000001027311752725720017313 0ustar00jrossjross00000000000000 std::basic_ostringstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_ostringstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00223.html0000664000076400007640000001436011752725720017312 0ustar00jrossjross00000000000000 qpid::console::Package::NameHashComp Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Package::NameHashComp Struct Reference

List of all members.

Public Member Functions

bool operator() (const NameHash &lhs, const NameHash &rhs) const

Member Function Documentation

bool qpid::console::Package::NameHashComp::operator() ( const NameHash lhs,
const NameHash rhs 
) const [inline]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00265.html0000664000076400007640000012061311752725720017317 0ustar00jrossjross00000000000000 qpid::framing::QueueQueryResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::QueueQueryResult Class Reference

#include <qpid/framing/QueueQueryResult.h>

List of all members.

Public Member Functions

 QueueQueryResult (const std::string &_queue, const std::string &_alternateExchange, bool _durable, bool _exclusive, bool _autoDelete, const FieldTable &_arguments, uint32_t _messageCount, uint32_t _subscriberCount)
 QueueQueryResult ()
void setQueue (const std::string &_queue)
const std::stringgetQueue () const
bool hasQueue () const
void clearQueueFlag ()
void setAlternateExchange (const std::string &_alternateExchange)
const std::stringgetAlternateExchange () const
bool hasAlternateExchange () const
void clearAlternateExchangeFlag ()
void setDurable (bool _durable)
bool getDurable () const
void setExclusive (bool _exclusive)
bool getExclusive () const
void setAutoDelete (bool _autoDelete)
bool getAutoDelete () const
void setArguments (const FieldTable &_arguments)
const FieldTablegetArguments () const
FieldTablegetArguments ()
bool hasArguments () const
void clearArgumentsFlag ()
void setMessageCount (uint32_t _messageCount)
uint32_t getMessageCount () const
bool hasMessageCount () const
void clearMessageCountFlag ()
void setSubscriberCount (uint32_t _subscriberCount)
uint32_t getSubscriberCount () const
bool hasSubscriberCount () const
void clearSubscriberCountFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 2049

Friends

std::ostreamoperator<< (std::ostream &, const QueueQueryResult &)

Constructor & Destructor Documentation

qpid::framing::QueueQueryResult::QueueQueryResult ( const std::string _queue,
const std::string _alternateExchange,
bool  _durable,
bool  _exclusive,
bool  _autoDelete,
const FieldTable _arguments,
uint32_t  _messageCount,
uint32_t  _subscriberCount 
) [inline]

Definition at line 47 of file QueueQueryResult.h.

qpid::framing::QueueQueryResult::QueueQueryResult ( ) [inline]

Definition at line 71 of file QueueQueryResult.h.


Member Function Documentation

uint32_t qpid::framing::QueueQueryResult::bodySize ( ) const
void qpid::framing::QueueQueryResult::clearAlternateExchangeFlag ( )
void qpid::framing::QueueQueryResult::clearArgumentsFlag ( )
void qpid::framing::QueueQueryResult::clearMessageCountFlag ( )
void qpid::framing::QueueQueryResult::clearQueueFlag ( )
void qpid::framing::QueueQueryResult::clearSubscriberCountFlag ( )
void qpid::framing::QueueQueryResult::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::QueueQueryResult::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::QueueQueryResult::encode ( Buffer ) const
uint32_t qpid::framing::QueueQueryResult::encodedSize ( ) const
void qpid::framing::QueueQueryResult::encodeStructBody ( Buffer ) const
const std::string& qpid::framing::QueueQueryResult::getAlternateExchange ( ) const
const FieldTable& qpid::framing::QueueQueryResult::getArguments ( ) const
FieldTable& qpid::framing::QueueQueryResult::getArguments ( )
bool qpid::framing::QueueQueryResult::getAutoDelete ( ) const
bool qpid::framing::QueueQueryResult::getDurable ( ) const
bool qpid::framing::QueueQueryResult::getExclusive ( ) const
uint32_t qpid::framing::QueueQueryResult::getMessageCount ( ) const
const std::string& qpid::framing::QueueQueryResult::getQueue ( ) const
uint32_t qpid::framing::QueueQueryResult::getSubscriberCount ( ) const
bool qpid::framing::QueueQueryResult::hasAlternateExchange ( ) const
bool qpid::framing::QueueQueryResult::hasArguments ( ) const
bool qpid::framing::QueueQueryResult::hasMessageCount ( ) const
bool qpid::framing::QueueQueryResult::hasQueue ( ) const
bool qpid::framing::QueueQueryResult::hasSubscriberCount ( ) const
void qpid::framing::QueueQueryResult::print ( std::ostream out) const
void qpid::framing::QueueQueryResult::setAlternateExchange ( const std::string _alternateExchange)
void qpid::framing::QueueQueryResult::setArguments ( const FieldTable _arguments)
void qpid::framing::QueueQueryResult::setAutoDelete ( bool  _autoDelete)
void qpid::framing::QueueQueryResult::setDurable ( bool  _durable)
void qpid::framing::QueueQueryResult::setExclusive ( bool  _exclusive)
void qpid::framing::QueueQueryResult::setMessageCount ( uint32_t  _messageCount)
void qpid::framing::QueueQueryResult::setQueue ( const std::string _queue)
void qpid::framing::QueueQueryResult::setSubscriberCount ( uint32_t  _subscriberCount)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const QueueQueryResult  
) [friend]

Member Data Documentation

Definition at line 46 of file QueueQueryResult.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_func.html0000664000076400007640000003130211752725720023020 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- a -

- c -

- d -

- e -

- f -

- g -

- i -

- n -

- o -

- p -

  • prettyArg() : qpid

- s -

- t -

- u -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00151.html0000664000076400007640000003121511752725717017316 0ustar00jrossjross00000000000000 qpid::InlineVector Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineVector Class Reference

A vector that stores up to Max elements in inline storage, otherwise uses normal vector allocation. More...

#include <qpid/InlineVector.h>

List of all members.

Public Types

typedef Base::allocator_type allocator_type
typedef Base::value_type value_type
typedef Base::size_type size_type

Public Member Functions

 InlineVector (const allocator_type &a=allocator_type())
 InlineVector (size_type n, const value_type &x=value_type(), const allocator_type &a=allocator_type())
 InlineVector (const InlineVector &x)

Detailed Description

A vector that stores up to Max elements in inline storage, otherwise uses normal vector allocation.

NOTE: depends on some non-standard but highly probably assumptions about how std::vector uses its allocator, they are true for g++.

  • default constructor does not allocate.
  • reserve(N) does not allocate more than N elements.
  • vector never re-allocates when size() < capacity()

Member Typedef Documentation

typedef Base::allocator_type qpid::InlineVector::allocator_type

Definition at line 45 of file InlineVector.h.

typedef Base::size_type qpid::InlineVector::size_type

Definition at line 47 of file InlineVector.h.

typedef Base::value_type qpid::InlineVector::value_type

Definition at line 46 of file InlineVector.h.


Constructor & Destructor Documentation

qpid::InlineVector::InlineVector ( const allocator_type a = allocator_type()) [inline, explicit]

Definition at line 49 of file InlineVector.h.

qpid::InlineVector::InlineVector ( size_type  n,
const value_type x = value_type(),
const allocator_type a = allocator_type() 
) [inline, explicit]

Definition at line 53 of file InlineVector.h.

qpid::InlineVector::InlineVector ( const InlineVector x) [inline]

Definition at line 60 of file InlineVector.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_enum.html0000664000076400007640000001157011752725717021545 0ustar00jrossjross00000000000000 Class Members - Enumerations
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00705.html0000664000076400007640000001257211752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Agent Member List
This is the complete list of members for qpid::console::Agent, including all inherited members.
Agent(Broker *_broker, uint32_t _bank, const std::string &_label)qpid::console::Agent [inline]
getAgentBank() const qpid::console::Agent [inline]
getBroker() const qpid::console::Agent [inline]
getBrokerBank() const qpid::console::Agent [inline]
getLabel() const qpid::console::Agent [inline]
Vector typedefqpid::console::Agent

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00491_source.html0000664000076400007640000001757311752725717020720 0ustar00jrossjross00000000000000 qpid/types/Exception.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/types/Exception.h
Go to the documentation of this file.
00001 #ifndef QPID_TYPES_EXCEPTION_H
00002 #define QPID_TYPES_EXCEPTION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include <string>
00026 #include "qpid/types/ImportExport.h"
00027 
00028 namespace qpid {
00029 namespace types {
00030 
00031 class QPID_TYPES_CLASS_EXTERN Exception : public std::exception
00032 {
00033   public:
00034     QPID_TYPES_EXTERN explicit Exception(const std::string& message=std::string()) throw();
00035     QPID_TYPES_EXTERN virtual ~Exception() throw();
00036     QPID_TYPES_EXTERN virtual const char* what() const throw();
00037 
00038   private:
00039     const std::string message;
00040 };
00041 
00042 }} // namespace qpid::types
00043 
00044 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00099.html0000664000076400007640000006126011752725720017326 0ustar00jrossjross00000000000000 qpid::framing::DoubleValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::DoubleValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 DoubleValue (double f)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::DoubleValue::DoubleValue ( double  f)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00197.html0000664000076400007640000005467611752725720017342 0ustar00jrossjross00000000000000 qpid::management::Manageable Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

#include <qpid/management/Manageable.h>

List of all members.

Public Types

typedef uint32_t status_t

Public Member Functions

virtual ~Manageable (void)=0
virtual ManagementObjectGetManagementObject (void) const =0
virtual status_t ManagementMethod (uint32_t methodId, Args &args, std::string &text)
virtual bool AuthorizeMethod (uint32_t methodId, Args &args, const std::string &userId)

Static Public Member Functions

static std::string StatusText (status_t status, std::string text=std::string())

Static Public Attributes

static const status_t STATUS_OK = 0
static const status_t STATUS_UNKNOWN_OBJECT = 1
static const status_t STATUS_UNKNOWN_METHOD = 2
static const status_t STATUS_NOT_IMPLEMENTED = 3
static const status_t STATUS_PARAMETER_INVALID = 4
static const status_t STATUS_FEATURE_NOT_IMPLEMENTED = 5
static const status_t STATUS_FORBIDDEN = 6
static const status_t STATUS_EXCEPTION = 7
static const status_t STATUS_USER = 0x00010000

Member Typedef Documentation

Definition at line 39 of file Manageable.h.


Constructor & Destructor Documentation

qpid::management::Manageable::~Manageable ( void  ) [inline, pure virtual]

Definition at line 73 of file Manageable.h.


Member Function Documentation

virtual bool qpid::management::Manageable::AuthorizeMethod ( uint32_t  methodId,
Args args,
const std::string userId 
) [virtual]
virtual ManagementObject* qpid::management::Manageable::GetManagementObject ( void  ) const [pure virtual]
virtual status_t qpid::management::Manageable::ManagementMethod ( uint32_t  methodId,
Args args,
std::string text 
) [virtual]
static std::string qpid::management::Manageable::StatusText ( status_t  status,
std::string  text = std::string() 
) [static]

Member Data Documentation

Definition at line 49 of file Manageable.h.

Definition at line 48 of file Manageable.h.

Definition at line 45 of file Manageable.h.

Definition at line 42 of file Manageable.h.

Definition at line 46 of file Manageable.h.

Definition at line 44 of file Manageable.h.

Definition at line 43 of file Manageable.h.

Definition at line 50 of file Manageable.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00415_source.html0000664000076400007640000011253311752725717020704 0ustar00jrossjross00000000000000 qmf/engine/Console.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Console.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineConsole_
00002 #define _QmfEngineConsole_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <qmf/engine/ResilientConnection.h>
00024 #include <qmf/engine/Schema.h>
00025 #include <qmf/engine/ObjectId.h>
00026 #include <qmf/engine/Object.h>
00027 #include <qmf/engine/Event.h>
00028 #include <qmf/engine/Query.h>
00029 #include <qmf/engine/Value.h>
00030 #include <qmf/engine/Message.h>
00031 
00032 namespace qmf {
00033 namespace engine {
00034 
00035     class Console;
00036     class ConsoleImpl;
00037     class BrokerProxyImpl;
00038     class AgentProxy;
00039     struct AgentProxyImpl;
00040     struct MethodResponseImpl;
00041     struct QueryResponseImpl;
00042     struct QueryContext;
00043 
00047     class MethodResponse {
00048     public:
00049         MethodResponse(const MethodResponse& from);
00050         ~MethodResponse();
00051         uint32_t getStatus() const;
00052         const Value* getException() const;
00053         const Value* getArgs() const;
00054 
00055     private:
00056         friend struct MethodResponseImpl;
00057         friend class ConsoleImpl;
00058         MethodResponse(MethodResponseImpl* impl);
00059         MethodResponseImpl* impl;
00060     };
00061 
00065     class QueryResponse {
00066     public:
00067         ~QueryResponse();
00068         uint32_t getStatus() const;
00069         const Value* getException() const;
00070         uint32_t getObjectCount() const;
00071         const Object* getObject(uint32_t idx) const;
00072 
00073     private:
00074         friend struct QueryResponseImpl;
00075         friend struct QueryContext;
00076         QueryResponse(QueryResponseImpl* impl);
00077         QueryResponseImpl *impl;
00078     };
00079 
00083     struct ConsoleEvent {
00084         enum EventKind {
00085             AGENT_ADDED     = 1,
00086             AGENT_DELETED   = 2,
00087             NEW_PACKAGE     = 3,
00088             NEW_CLASS       = 4,
00089             OBJECT_UPDATE   = 5,
00090             EVENT_RECEIVED  = 7,
00091             AGENT_HEARTBEAT = 8
00092         };
00093 
00094         EventKind       kind;
00095         AgentProxy*     agent;          // (AGENT_[ADDED|DELETED|HEARTBEAT])
00096         char*           name;           // (NEW_PACKAGE)
00097         const SchemaClassKey* classKey; // (NEW_CLASS)
00098         Object*         object;         // (OBJECT_UPDATE)
00099         void*           context;        // (OBJECT_UPDATE)
00100         Event*          event;          // (EVENT_RECEIVED)
00101         uint64_t        timestamp;      // (AGENT_HEARTBEAT)
00102         QueryResponse*  queryResponse;  // (QUERY_COMPLETE)
00103         bool            hasProps;
00104         bool            hasStats;
00105     };
00106 
00110     struct BrokerEvent {
00111         enum EventKind {
00112             BROKER_INFO     = 10,
00113             DECLARE_QUEUE   = 11,
00114             DELETE_QUEUE    = 12,
00115             BIND            = 13,
00116             UNBIND          = 14,
00117             SETUP_COMPLETE  = 15,
00118             STABLE          = 16,
00119             QUERY_COMPLETE  = 17,
00120             METHOD_RESPONSE = 18
00121         };
00122 
00123         EventKind kind;
00124         char*           name;           // ([DECLARE|DELETE]_QUEUE, [UN]BIND)
00125         char*           exchange;       // ([UN]BIND)
00126         char*           bindingKey;     // ([UN]BIND)
00127         void*           context;        // (QUERY_COMPLETE, METHOD_RESPONSE)
00128         QueryResponse*  queryResponse;  // (QUERY_COMPLETE)
00129         MethodResponse* methodResponse; // (METHOD_RESPONSE)
00130     };
00131 
00135     class AgentProxy {
00136     public:
00137         AgentProxy(const AgentProxy& from);
00138         ~AgentProxy();
00139         const char* getLabel() const;
00140         uint32_t getBrokerBank() const;
00141         uint32_t getAgentBank() const;
00142 
00143     private:
00144         friend struct StaticContext;
00145         friend struct QueryContext;
00146         friend struct AgentProxyImpl;
00147         friend class BrokerProxyImpl;
00148         AgentProxy(AgentProxyImpl* impl);
00149         AgentProxyImpl* impl;
00150     };
00151 
00155     class BrokerProxy {
00156     public:
00157         BrokerProxy(Console& console);
00158         ~BrokerProxy();
00159 
00160         void sessionOpened(SessionHandle& sh);
00161         void sessionClosed();
00162         void startProtocol();
00163 
00164         void handleRcvMessage(Message& message);
00165         bool getXmtMessage(Message& item) const;
00166         void popXmt();
00167 
00168         bool getEvent(BrokerEvent& event) const;
00169         void popEvent();
00170 
00171         uint32_t agentCount() const;
00172         const AgentProxy* getAgent(uint32_t idx) const;
00173         void sendQuery(const Query& query, void* context, const AgentProxy* agent = 0);
00174 
00175     private:
00176         friend class ConsoleImpl;
00177         friend struct StaticContext;
00178         BrokerProxyImpl* impl;
00179     };
00180 
00181     // TODO - move this to a public header
00182     struct ConsoleSettings {
00183         bool rcvObjects;
00184         bool rcvEvents;
00185         bool rcvHeartbeats;
00186         bool userBindings;
00187 
00188         ConsoleSettings() :
00189             rcvObjects(true),
00190             rcvEvents(true),
00191             rcvHeartbeats(true),
00192             userBindings(false) {}
00193     };
00194 
00195     class Console {
00196     public:
00197         Console(const ConsoleSettings& settings = ConsoleSettings());
00198         ~Console();
00199 
00200         bool getEvent(ConsoleEvent& event) const;
00201         void popEvent();
00202 
00203         void addConnection(BrokerProxy& broker, void* context);
00204         void delConnection(BrokerProxy& broker);
00205 
00206         uint32_t packageCount() const;
00207         const char* getPackageName(uint32_t idx) const;
00208 
00209         uint32_t classCount(const char* packageName) const;
00210         const SchemaClassKey* getClass(const char* packageName, uint32_t idx) const;
00211 
00212         ClassKind getClassKind(const SchemaClassKey* key) const;
00213         const SchemaObjectClass* getObjectClass(const SchemaClassKey* key) const;
00214         const SchemaEventClass* getEventClass(const SchemaClassKey* key) const;
00215 
00216         void bindPackage(const char* packageName);
00217         void bindClass(const SchemaClassKey* key);
00218         void bindClass(const char* packageName, const char* className);
00219 
00220         void bindEvent(const SchemaClassKey *key);
00221         void bindEvent(const char* packageName, const char* eventName);
00222 
00223         /*
00224         void startSync(const Query& query, void* context, SyncQuery& sync);
00225         void touchSync(SyncQuery& sync);
00226         void endSync(SyncQuery& sync);
00227         */
00228 
00229     private:
00230         friend class BrokerProxyImpl;
00231         friend struct AgentProxyImpl;
00232         friend struct StaticContext;
00233         ConsoleImpl* impl;
00234     };
00235 }
00236 }
00237 
00238 #endif
00239 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00315.html0000664000076400007640000001447411752725720017322 0ustar00jrossjross00000000000000 qpid::sys::ScopedUnlock Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ScopedUnlock Class Reference

#include <qpid/sys/Mutex.h>

List of all members.

Public Member Functions

 ScopedUnlock (L &l)
 ~ScopedUnlock ()

Constructor & Destructor Documentation

qpid::sys::ScopedUnlock::ScopedUnlock ( L &  l) [inline]

Definition at line 43 of file Mutex.h.

qpid::sys::ScopedUnlock::~ScopedUnlock ( ) [inline]

Definition at line 44 of file Mutex.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00425_source.html0000664000076400007640000002023411752725717020701 0ustar00jrossjross00000000000000 qmf/engine/QmfEngineImportExport.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/QmfEngineImportExport.h
Go to the documentation of this file.
00001 #ifndef QMF_ENGINE_IMPORT_EXPORT_H
00002 #define QMF_ENGINE_IMPORT_EXPORT_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #if defined(WIN32) && !defined(QPID_DECLARE_STATIC)
00024 #  if defined(QMF_EXPORT) || defined (qmfengine_EXPORTS)
00025 #    define QMFE_EXTERN __declspec(dllexport)
00026 #  else
00027 #    define QMFE_EXTERN __declspec(dllimport)
00028 #  endif
00029 #  ifdef _MSC_VER
00030 #    define QMFE_CLASS_EXTERN
00031 #    define QMFE_INLINE_EXTERN QMFE_EXTERN
00032 #  else
00033 #    define QMFE_CLASS_EXTERN QMFE_EXTERN
00034 #    define QMFE_INLINE_EXTERN
00035 #  endif
00036 #else
00037 #  define QMFE_EXTERN
00038 #  define QMFE_CLASS_EXTERN
00039 #  define QMFE_INLINE_EXTERN
00040 #endif
00041 
00042 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00401.html0000664000076400007640000006375211752725720017321 0ustar00jrossjross00000000000000 qpid::framing::Xid Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Xid Class Reference

#include <qpid/framing/Xid.h>

List of all members.

Public Member Functions

 Xid (uint32_t _format, const std::string &_globalId, const std::string &_branchId)
 Xid ()
void setFormat (uint32_t _format)
uint32_t getFormat () const
bool hasFormat () const
void clearFormatFlag ()
void setGlobalId (const std::string &_globalId)
const std::stringgetGlobalId () const
bool hasGlobalId () const
void clearGlobalIdFlag ()
void setBranchId (const std::string &_branchId)
const std::stringgetBranchId () const
bool hasBranchId () const
void clearBranchIdFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1540

Friends

std::ostreamoperator<< (std::ostream &, const Xid &)

Constructor & Destructor Documentation

qpid::framing::Xid::Xid ( uint32_t  _format,
const std::string _globalId,
const std::string _branchId 
) [inline]

Definition at line 45 of file Xid.h.

qpid::framing::Xid::Xid ( ) [inline]

Definition at line 57 of file Xid.h.


Member Function Documentation

uint32_t qpid::framing::Xid::bodySize ( ) const
void qpid::framing::Xid::clearBranchIdFlag ( )
void qpid::framing::Xid::clearFormatFlag ( )
void qpid::framing::Xid::clearGlobalIdFlag ( )
void qpid::framing::Xid::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::Xid::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::Xid::encode ( Buffer ) const
uint32_t qpid::framing::Xid::encodedSize ( ) const
void qpid::framing::Xid::encodeStructBody ( Buffer ) const
const std::string& qpid::framing::Xid::getBranchId ( ) const
uint32_t qpid::framing::Xid::getFormat ( ) const
const std::string& qpid::framing::Xid::getGlobalId ( ) const
bool qpid::framing::Xid::hasBranchId ( ) const
bool qpid::framing::Xid::hasFormat ( ) const
bool qpid::framing::Xid::hasGlobalId ( ) const
void qpid::framing::Xid::print ( std::ostream out) const
void qpid::framing::Xid::setBranchId ( const std::string _branchId)
void qpid::framing::Xid::setFormat ( uint32_t  _format)
void qpid::framing::Xid::setGlobalId ( const std::string _globalId)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const Xid  
) [friend]

Member Data Documentation

const uint16_t qpid::framing::Xid::TYPE = 1540 [static]

Definition at line 44 of file Xid.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00430.html0000664000076400007640000001116111752725717017314 0ustar00jrossjross00000000000000 qmf/Schema.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Schema.h File Reference
#include <qmf/ImportExport.h>
#include "qpid/sys/IntegerTypes.h"
#include "qmf/Handle.h"
#include "qmf/SchemaTypes.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::Schema

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00386.html0000664000076400007640000001304711752725720017325 0ustar00jrossjross00000000000000 std::vector Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::vector Class Reference

STL class. More...

List of all members.

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00431_source.html0000664000076400007640000004441011752725717020700 0ustar00jrossjross00000000000000 qpid/console/Schema.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Schema.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_SCHEMA_H_
00022 #define _QPID_CONSOLE_SCHEMA_H_
00023 
00024 #include "qpid/console/ClassKey.h"
00025 #include <boost/shared_ptr.hpp>
00026 #include <vector>
00027 
00028 namespace qpid {
00029 namespace framing {
00030     class Buffer;
00031 }
00032 namespace console {
00033     class Value;
00034 
00035     struct SchemaArgument {
00036         SchemaArgument(framing::Buffer& buffer, bool forMethod = false);
00037         boost::shared_ptr<Value> decodeValue(framing::Buffer& buffer);
00038 
00039         std::string name;
00040         uint8_t typeCode;
00041         bool dirInput;
00042         bool dirOutput;
00043         std::string unit;
00044         int min;
00045         int max;
00046         int maxLen;
00047         std::string desc;
00048         std::string defaultVal;
00049     };
00050 
00051     struct SchemaProperty {
00052         SchemaProperty(framing::Buffer& buffer);
00053         boost::shared_ptr<Value> decodeValue(framing::Buffer& buffer);
00054 
00055         std::string name;
00056         uint8_t typeCode;
00057         uint8_t accessCode;
00058         bool isIndex;
00059         bool isOptional;
00060         std::string unit;
00061         int min;
00062         int max;
00063         int maxLen;
00064         std::string desc;
00065     };
00066 
00067     struct SchemaStatistic {
00068         SchemaStatistic(framing::Buffer& buffer);
00069         boost::shared_ptr<Value> decodeValue(framing::Buffer& buffer);
00070 
00071         std::string name;
00072         uint8_t typeCode;
00073         std::string unit;
00074         std::string desc;
00075     };
00076 
00077     struct SchemaMethod {
00078         SchemaMethod(framing::Buffer& buffer);
00079         ~SchemaMethod();
00080 
00081         std::string name;
00082         std::string desc;
00083         std::vector<SchemaArgument*> arguments;
00084     };
00085 
00086     struct SchemaClass {
00087         static const uint8_t KIND_TABLE = 1;
00088         static const uint8_t KIND_EVENT = 2;
00089 
00090         SchemaClass(const uint8_t kind, const ClassKey& key, framing::Buffer& buffer);
00091         ~SchemaClass();
00092         const ClassKey& getClassKey() const { return key; }
00093 
00094         const uint8_t kind;
00095         const ClassKey key;
00096         std::vector<SchemaProperty*> properties;
00097         std::vector<SchemaStatistic*> statistics;
00098         std::vector<SchemaMethod*> methods;
00099         std::vector<SchemaArgument*> arguments;
00100     };
00101 }
00102 }
00103 
00104 
00105 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00436.html0000664000076400007640000002732311752725717017331 0ustar00jrossjross00000000000000 qpid/messaging/exceptions.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/exceptions.h File Reference

Go to the source code of this file.

Classes

struct  qpid::messaging::MessagingException
 This is the base class for all messaging related exceptions thrown by this API. More...
struct  qpid::messaging::InvalidOptionString
 Thrown when the syntax of the option string used to configure a connection in not valid. More...
struct  qpid::messaging::KeyError
 Thrown to indicate a failed lookup of some local object. More...
struct  qpid::messaging::LinkError
struct  qpid::messaging::AddressError
struct  qpid::messaging::ResolutionError
 Thrown when a syntactically correct address cannot be resolved or used. More...
struct  qpid::messaging::AssertionFailed
 Thrown when creating a sender or receiver for an address for which some asserted property of the node is not matched. More...
struct  qpid::messaging::NotFound
 Thrown on attempts to create a sender or receiver to a non-existent node. More...
struct  qpid::messaging::MalformedAddress
 Thrown when an address string with invalid syntax is used. More...
struct  qpid::messaging::ReceiverError
struct  qpid::messaging::FetchError
struct  qpid::messaging::NoMessageAvailable
 Thrown by Receiver::fetch(), Receiver::get() and Session::nextReceiver() to indicate that there no message was available before the timeout specified. More...
struct  qpid::messaging::SenderError
struct  qpid::messaging::SendError
struct  qpid::messaging::TargetCapacityExceeded
 Thrown to indicate that the sender attempted to send a message that would result in the target node on the peer exceeding a preconfigured capacity. More...
struct  qpid::messaging::SessionError
struct  qpid::messaging::TransactionError
struct  qpid::messaging::TransactionAborted
 Thrown on Session::commit() if reconnection results in the transaction being automatically aborted. More...
struct  qpid::messaging::UnauthorizedAccess
 Thrown to indicate that the application attempted to do something for which it was not authorised by its peer. More...
struct  qpid::messaging::ConnectionError
struct  qpid::messaging::TransportFailure
 Thrown to indicate loss of underlying connection. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00730.html0000664000076400007640000002407511752725720017321 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::IntValue Member List
This is the complete list of members for qpid::console::IntValue, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::IntValue [inline, virtual]
asInt64() const qpid::console::IntValue [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
IntValue(int32_t v)qpid::console::IntValue [inline]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::IntValue [inline, virtual]
isInt64() const qpid::console::IntValue [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
str() const qpid::console::IntValue [virtual]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00594.html0000664000076400007640000007370311752725720017333 0ustar00jrossjross00000000000000 qpid::types Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::types Namespace Reference

Classes

class  Exception
class  Uuid
struct  InvalidConversion
 Thrown when an illegal conversion of a variant is attempted. More...
class  Variant
 Represents a value of variable type. More...

Enumerations

enum  VariantType {
  VAR_VOID = 0, VAR_BOOL, VAR_UINT8, VAR_UINT16,
  VAR_UINT32, VAR_UINT64, VAR_INT8, VAR_INT16,
  VAR_INT32, VAR_INT64, VAR_FLOAT, VAR_DOUBLE,
  VAR_STRING, VAR_MAP, VAR_LIST, VAR_UUID
}

Functions

QPID_TYPES_EXTERN bool operator== (const Uuid &, const Uuid &)
 Returns true if the uuids are equal, false otherwise.
QPID_TYPES_EXTERN bool operator!= (const Uuid &, const Uuid &)
 Returns true if the uuids are NOT equal, false if they are.
QPID_TYPES_EXTERN bool operator< (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN bool operator> (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN bool operator<= (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN bool operator>= (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN std::ostreamoperator<< (std::ostream &, Uuid)
 Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.
QPID_TYPES_EXTERN std::istreamoperator>> (std::istream &, Uuid &)
 Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.
QPID_TYPES_EXTERN std::string getTypeName (VariantType type)
QPID_TYPES_EXTERN bool isIntegerType (VariantType type)
QPID_TYPES_EXTERN std::ostreamoperator<< (std::ostream &out, const Variant &value)
QPID_TYPES_EXTERN std::ostreamoperator<< (std::ostream &out, const Variant::Map &map)
QPID_TYPES_EXTERN std::ostreamoperator<< (std::ostream &out, const Variant::List &list)
QPID_TYPES_EXTERN bool operator== (const Variant &a, const Variant &b)

Enumeration Type Documentation

Enumerator:
VAR_VOID 
VAR_BOOL 
VAR_UINT8 
VAR_UINT16 
VAR_UINT32 
VAR_UINT64 
VAR_INT8 
VAR_INT16 
VAR_INT32 
VAR_INT64 
VAR_FLOAT 
VAR_DOUBLE 
VAR_STRING 
VAR_MAP 
VAR_LIST 
VAR_UUID 

Definition at line 44 of file Variant.h.


Function Documentation

QPID_TYPES_EXTERN std::string qpid::types::getTypeName ( VariantType  type)
QPID_TYPES_EXTERN bool qpid::types::isIntegerType ( VariantType  type)
QPID_TYPES_EXTERN bool qpid::types::operator!= ( const Uuid &  ,
const Uuid &   
)

Returns true if the uuids are NOT equal, false if they are.

QPID_TYPES_EXTERN bool qpid::types::operator< ( const Uuid &  ,
const Uuid &   
)
QPID_TYPES_EXTERN std::ostream& qpid::types::operator<< ( std::ostream ,
Uuid   
)

Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.

QPID_TYPES_EXTERN std::ostream& qpid::types::operator<< ( std::ostream out,
const Variant &  value 
)
QPID_TYPES_EXTERN std::ostream& qpid::types::operator<< ( std::ostream out,
const Variant::Map &  map 
)
QPID_TYPES_EXTERN std::ostream& qpid::types::operator<< ( std::ostream out,
const Variant::List &  list 
)
QPID_TYPES_EXTERN bool qpid::types::operator<= ( const Uuid &  ,
const Uuid &   
)
QPID_TYPES_EXTERN bool qpid::types::operator== ( const Uuid &  ,
const Uuid &   
)

Returns true if the uuids are equal, false otherwise.

QPID_TYPES_EXTERN bool qpid::types::operator== ( const Variant &  a,
const Variant &  b 
)
QPID_TYPES_EXTERN bool qpid::types::operator> ( const Uuid &  ,
const Uuid &   
)
QPID_TYPES_EXTERN bool qpid::types::operator>= ( const Uuid &  ,
const Uuid &   
)
QPID_TYPES_EXTERN std::istream& qpid::types::operator>> ( std::istream ,
Uuid &   
)

Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions.html0000664000076400007640000006237311752725717020530 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- a -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00514.html0000664000076400007640000001174111752725717017323 0ustar00jrossjross00000000000000 qpid/framing/ProtocolVersion.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/ProtocolVersion.h File Reference

Go to the source code of this file.

Classes

class  qpid::framing::ProtocolVersion

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00175.html0000664000076400007640000001032211752725720017312 0ustar00jrossjross00000000000000 std::string::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::string::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00562.html0000664000076400007640000001152711752725717017330 0ustar00jrossjross00000000000000 qpid/sys/posix/Time.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/Time.h File Reference

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Typedefs

typedef int64_t qpid::sys::TimePrivate
 Class to represent an instant in time.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00369.html0000664000076400007640000006164211752725720017332 0ustar00jrossjross00000000000000 qpid::framing::Unsigned16Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Unsigned16Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Unsigned16Value (uint16_t)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Unsigned16Value::Unsigned16Value ( uint16_t  )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x78.html0000664000076400007640000001465711752725717022333 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- x -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00479_source.html0000664000076400007640000004770111752725717020722 0ustar00jrossjross00000000000000 qpid/client/SubscriptionManager.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/SubscriptionManager.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_SUBSCRIPTIONMANAGER_H
00002 #define QPID_CLIENT_SUBSCRIPTIONMANAGER_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/client/Session.h"
00026 #include "qpid/client/Subscription.h"
00027 #include "qpid/sys/Runnable.h"
00028 #include "qpid/sys/Thread.h"
00029 #include "qpid/client/ClientImportExport.h"
00030 #include "qpid/client/MessageListener.h"
00031 #include "qpid/client/LocalQueue.h"
00032 #include "qpid/client/Handle.h"
00033 #include <string>
00034 
00035 namespace qpid {
00036 namespace client {
00037 
00038 class SubscriptionManagerImpl;
00039 
00097 class QPID_CLIENT_CLASS_EXTERN SubscriptionManager : public sys::Runnable, public Handle<SubscriptionManagerImpl>
00098 {
00099   public:
00101     QPID_CLIENT_EXTERN SubscriptionManager(const Session& session);
00102     QPID_CLIENT_EXTERN SubscriptionManager(const SubscriptionManager&);
00103     QPID_CLIENT_EXTERN ~SubscriptionManager();
00104     QPID_CLIENT_EXTERN SubscriptionManager& operator=(const SubscriptionManager&);
00105 
00117     QPID_CLIENT_EXTERN Subscription subscribe(MessageListener& listener,
00118                            const std::string& queue,
00119                            const SubscriptionSettings& settings,
00120                            const std::string& name=std::string());
00121 
00132     QPID_CLIENT_EXTERN Subscription subscribe(LocalQueue& localQueue,
00133                            const std::string& queue,
00134                            const SubscriptionSettings& settings,
00135                            const std::string& name=std::string());
00136 
00148     QPID_CLIENT_EXTERN Subscription subscribe(MessageListener& listener,
00149                            const std::string& queue,
00150                            const std::string& name=std::string());
00151 
00161     QPID_CLIENT_EXTERN Subscription subscribe(LocalQueue& localQueue,
00162                            const std::string& queue,
00163                            const std::string& name=std::string());
00164 
00165 
00174     QPID_CLIENT_EXTERN bool get(Message& result, const std::string& queue, sys::Duration timeout=0);
00175 
00184     QPID_CLIENT_EXTERN Message get(const std::string& queue, sys::Duration timeout=sys::TIME_INFINITE);
00185 
00189     QPID_CLIENT_EXTERN Subscription getSubscription(const std::string& name) const;
00190 
00192     QPID_CLIENT_EXTERN void cancel(const std::string& name);
00193 
00198     QPID_CLIENT_EXTERN void run();
00199 
00204     QPID_CLIENT_EXTERN void start();
00205 
00209     QPID_CLIENT_EXTERN void wait();
00210 
00215     QPID_CLIENT_EXTERN void setAutoStop(bool set=true);
00216 
00218     QPID_CLIENT_EXTERN void stop();
00219 
00220     static const uint32_t UNLIMITED=0xFFFFFFFF;
00221 
00223     QPID_CLIENT_EXTERN void setFlowControl(const std::string& name, const FlowControl& flow);
00224 
00231     QPID_CLIENT_EXTERN void setFlowControl(const std::string& name, uint32_t messages,  uint32_t bytes, bool window=true);
00232 
00236     QPID_CLIENT_EXTERN void setDefaultSettings(const SubscriptionSettings& s);
00237 
00241     QPID_CLIENT_EXTERN const SubscriptionSettings& getDefaultSettings() const;
00242 
00246     QPID_CLIENT_EXTERN SubscriptionSettings& getDefaultSettings();
00247 
00256     QPID_CLIENT_EXTERN void setFlowControl(uint32_t messages,  uint32_t bytes, bool window=true);
00257 
00262     QPID_CLIENT_EXTERN void setAcceptMode(AcceptMode mode);
00263 
00267     QPID_CLIENT_EXTERN void setAcquireMode(AcquireMode mode);
00268 
00269     QPID_CLIENT_EXTERN void registerFailoverHandler ( boost::function<void ()> fh );
00270 
00271     QPID_CLIENT_EXTERN Session getSession() const;
00272 
00273     SubscriptionManager(SubscriptionManagerImpl*); 
00274 
00275   private:
00276     typedef SubscriptionManagerImpl Impl;
00277     friend class PrivateImplRef<SubscriptionManager>;
00278 };
00279 
00281 class AutoCancel {
00282   public:
00283     AutoCancel(SubscriptionManager& sm_, const std::string& tag_) : sm(sm_), tag(tag_) {}
00284     ~AutoCancel() { sm.cancel(tag); }
00285   private:
00286     SubscriptionManager& sm;
00287     std::string tag;
00288 };
00289 
00290 }} // namespace qpid::client
00291 
00292 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00759.html0000664000076400007640000002133711752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Str16Value Member List
This is the complete list of members for qpid::framing::Str16Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
Str16Value(const std::string &v)qpid::framing::Str16Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00234.html0000664000076400007640000010002311752725720017304 0ustar00jrossjross00000000000000 qpid::console::Object Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Object Class Reference

#include <qpid/console/Object.h>

List of all members.

Classes

struct  AttributeMap

Public Types

typedef std::vector< ObjectVector

Public Member Functions

 Object (Broker *broker, SchemaClass *schemaClass, framing::Buffer &buffer, bool prop, bool stat)
 ~Object ()
BrokergetBroker () const
const ObjectIdgetObjectId () const
const ClassKeygetClassKey () const
SchemaClassgetSchema () const
uint64_t getCurrentTime () const
uint64_t getCreateTime () const
uint64_t getDeleteTime () const
bool isDeleted () const
std::string getIndex () const
void mergeUpdate (const Object &updated)
const AttributeMapgetAttributes () const
void invokeMethod (const std::string name, const AttributeMap &args, MethodResponse &result)
void handleMethodResp (framing::Buffer &buffer, uint32_t sequence)
ObjectId attrRef (const std::string &key) const
uint32_t attrUint (const std::string &key) const
int32_t attrInt (const std::string &key) const
uint64_t attrUint64 (const std::string &key) const
int64_t attrInt64 (const std::string &key) const
std::string attrString (const std::string &key) const
bool attrBool (const std::string &key) const
float attrFloat (const std::string &key) const
double attrDouble (const std::string &key) const
framing::Uuid attrUuid (const std::string &key) const
framing::FieldTable attrMap (const std::string &key) const

Member Typedef Documentation

Definition at line 57 of file Object.h.


Constructor & Destructor Documentation

qpid::console::Object::Object ( Broker broker,
SchemaClass schemaClass,
framing::Buffer buffer,
bool  prop,
bool  stat 
)
qpid::console::Object::~Object ( )

Member Function Documentation

bool qpid::console::Object::attrBool ( const std::string key) const
double qpid::console::Object::attrDouble ( const std::string key) const
float qpid::console::Object::attrFloat ( const std::string key) const
int32_t qpid::console::Object::attrInt ( const std::string key) const
int64_t qpid::console::Object::attrInt64 ( const std::string key) const
framing::FieldTable qpid::console::Object::attrMap ( const std::string key) const
ObjectId qpid::console::Object::attrRef ( const std::string key) const
std::string qpid::console::Object::attrString ( const std::string key) const
uint32_t qpid::console::Object::attrUint ( const std::string key) const
uint64_t qpid::console::Object::attrUint64 ( const std::string key) const
framing::Uuid qpid::console::Object::attrUuid ( const std::string key) const
const AttributeMap& qpid::console::Object::getAttributes ( ) const [inline]

Definition at line 85 of file Object.h.

Broker* qpid::console::Object::getBroker ( ) const [inline]

Definition at line 75 of file Object.h.

const ClassKey& qpid::console::Object::getClassKey ( ) const
uint64_t qpid::console::Object::getCreateTime ( ) const [inline]

Definition at line 80 of file Object.h.

uint64_t qpid::console::Object::getCurrentTime ( ) const [inline]

Definition at line 79 of file Object.h.

uint64_t qpid::console::Object::getDeleteTime ( ) const [inline]

Definition at line 81 of file Object.h.

std::string qpid::console::Object::getIndex ( ) const
const ObjectId& qpid::console::Object::getObjectId ( ) const [inline]

Definition at line 76 of file Object.h.

SchemaClass* qpid::console::Object::getSchema ( ) const [inline]

Definition at line 78 of file Object.h.

void qpid::console::Object::handleMethodResp ( framing::Buffer buffer,
uint32_t  sequence 
)
void qpid::console::Object::invokeMethod ( const std::string  name,
const AttributeMap args,
MethodResponse result 
)
bool qpid::console::Object::isDeleted ( ) const [inline]

Definition at line 82 of file Object.h.

void qpid::console::Object::mergeUpdate ( const Object updated)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00472_source.html0000664000076400007640000002761311752725717020713 0ustar00jrossjross00000000000000 qpid/client/MessageReplayTracker.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/MessageReplayTracker.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_MESSAGEREPLAYTRACKER_H
00002 #define QPID_CLIENT_MESSAGEREPLAYTRACKER_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/client/AsyncSession.h"
00025 #include "qpid/client/Message.h"
00026 #include "qpid/client/ClientImportExport.h"
00027 #include <list>
00028 #include <string>
00029 
00030 namespace qpid {
00031 namespace client {
00032 
00037 class QPID_CLIENT_CLASS_EXTERN MessageReplayTracker
00038 {
00039   public:
00040     QPID_CLIENT_EXTERN MessageReplayTracker(uint flushInterval);
00041     QPID_CLIENT_EXTERN void send(const Message& message, const std::string& destination = "");
00042     QPID_CLIENT_EXTERN void init(AsyncSession session);
00043     QPID_CLIENT_EXTERN void replay(AsyncSession session);
00044     QPID_CLIENT_EXTERN void setFlushInterval(uint interval);
00045     QPID_CLIENT_EXTERN uint getFlushInterval();
00046     QPID_CLIENT_EXTERN void checkCompletion();
00047 
00048     template <class F> void foreach(F& f) {
00049         for (std::list<ReplayRecord>::const_iterator i = buffer.begin(); i != buffer.end(); i++) {
00050             f(i->message);
00051         }
00052     }
00053 
00054   private:
00055     struct ReplayRecord
00056     {
00057         Completion status;
00058         Message message;
00059         std::string destination;
00060 
00061         ReplayRecord(const Message& message, const std::string& destination);
00062         void send(MessageReplayTracker&);
00063         bool isComplete();
00064     };
00065 
00066     AsyncSession session;
00067     uint flushInterval;
00068     uint count;
00069     std::list<ReplayRecord> buffer;
00070 };
00071 }} // namespace qpid::client
00072 
00073 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00764.html0000664000076400007640000002132411752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::DoubleValue Member List
This is the complete list of members for qpid::framing::DoubleValue, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
DoubleValue(double f)qpid::framing::DoubleValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00664.html0000664000076400007640000001064511752725717017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::OptionValue Member List
This is the complete list of members for qpid::OptionValue, including all inherited members.
name() const qpid::OptionValue [inline]
OptionValue(T &value, const std::string &arg)qpid::OptionValue [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00897.html0000664000076400007640000001175611752725720017341 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::types::InvalidConversion Member List
This is the complete list of members for qpid::types::InvalidConversion, including all inherited members.
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
InvalidConversion(const std::string &msg)qpid::types::InvalidConversion
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00204.html0000664000076400007640000010210211752725720017301 0ustar00jrossjross00000000000000 qpid::console::MapValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::MapValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 MapValue (const framing::FieldTable &v)
 MapValue (framing::Buffer &buffer)
std::string str () const
bool isMap () const
framing::FieldTable asMap () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::MapValue::MapValue ( const framing::FieldTable v) [inline]

Definition at line 196 of file Value.h.

qpid::console::MapValue::MapValue ( framing::Buffer buffer)

Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

framing::FieldTable qpid::console::MapValue::asMap ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 200 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

bool qpid::console::MapValue::isMap ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 199 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::MapValue::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00404.html0000664000076400007640000001323211752725717017316 0ustar00jrossjross00000000000000 qmf/engine/Agent.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Agent.h File Reference

Go to the source code of this file.

Classes

struct  qmf::engine::AgentEvent
 AgentEvent. More...
class  qmf::engine::Agent
 Agent - Protocol engine for the QMF agent. More...

Namespaces

namespace  qmf
namespace  qmf::engine

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00470.html0000664000076400007640000001221111752725717017315 0ustar00jrossjross00000000000000 qpid/client/LocalQueue.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/LocalQueue.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::LocalQueue
 A local queue to collect messages retrieved from a remote broker queue. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00030.html0000664000076400007640000001020511752725720017300 0ustar00jrossjross00000000000000 std::basic_ios Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_ios Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00356.html0000664000076400007640000006120011752725720017314 0ustar00jrossjross00000000000000 qpid::framing::TimeValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::TimeValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 TimeValue (uint64_t v)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::TimeValue::TimeValue ( uint64_t  v)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00154.html0000664000076400007640000006140411752725720017316 0ustar00jrossjross00000000000000 qpid::framing::Integer64Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Integer64Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Integer64Value (int64_t v)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Integer64Value::Integer64Value ( int64_t  v)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00786.html0000664000076400007640000001672311752725720017335 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::MessageResumeResult Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00878.html0000664000076400007640000002360111752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Monitor Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00648.html0000664000076400007640000002016511752725717017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::posix::EventNotifier Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00371.html0000664000076400007640000006144211752725720017321 0ustar00jrossjross00000000000000 qpid::framing::Unsigned64Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Unsigned64Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Unsigned64Value (uint64_t v)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Unsigned64Value::Unsigned64Value ( uint64_t  v)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x6d.html0000664000076400007640000003174211752725717022400 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- m -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x69.html0000664000076400007640000001440311752725720022576 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- i -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00311.html0000664000076400007640000002456011752725720017313 0ustar00jrossjross00000000000000 qpid::console::SchemaStatistic Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaStatistic Struct Reference

#include <qpid/console/Schema.h>

List of all members.

Public Member Functions

 SchemaStatistic (framing::Buffer &buffer)
boost::shared_ptr< ValuedecodeValue (framing::Buffer &buffer)

Public Attributes

std::string name
uint8_t typeCode
std::string unit
std::string desc

Constructor & Destructor Documentation

qpid::console::SchemaStatistic::SchemaStatistic ( framing::Buffer buffer)

Member Function Documentation

boost::shared_ptr<Value> qpid::console::SchemaStatistic::decodeValue ( framing::Buffer buffer)

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00643.html0000664000076400007640000001372711752725717017334 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaStatistic Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x71.html0000664000076400007640000001573511752725720023607 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- q -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00617.html0000664000076400007640000002050211752725717017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::Subscription Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00443.html0000664000076400007640000001451711752725717017330 0ustar00jrossjross00000000000000 qpid/types/ImportExport.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/types/ImportExport.h File Reference

Go to the source code of this file.

Defines

#define QPID_TYPES_EXTERN   QPID_IMPORT
#define QPID_TYPES_CLASS_EXTERN   QPID_CLASS_IMPORT
#define QPID_TYPES_INLINE_EXTERN   QPID_INLINE_IMPORT

Define Documentation

#define QPID_TYPES_CLASS_EXTERN   QPID_CLASS_IMPORT

Definition at line 31 of file ImportExport.h.

#define QPID_TYPES_EXTERN   QPID_IMPORT

Definition at line 30 of file ImportExport.h.

#define QPID_TYPES_INLINE_EXTERN   QPID_INLINE_IMPORT

Definition at line 32 of file ImportExport.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00445_source.html0000664000076400007640000002452711752725717020714 0ustar00jrossjross00000000000000 qmf/SchemaId.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/SchemaId.h
Go to the documentation of this file.
00001 #ifndef QMF_SCHEMA_ID_H
00002 #define QMF_SCHEMA_ID_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qpid/types/Uuid.h"
00027 #include "qmf/SchemaTypes.h"
00028 #include <string>
00029 
00030 namespace qmf {
00031 
00032 #ifndef SWIG
00033     template <class> class PrivateImplRef;
00034 #endif
00035 
00036     class SchemaIdImpl;
00037 
00038     class QMF_CLASS_EXTERN SchemaId : public qmf::Handle<SchemaIdImpl> {
00039     public:
00040         QMF_EXTERN SchemaId(SchemaIdImpl* impl = 0);
00041         QMF_EXTERN SchemaId(const SchemaId&);
00042         QMF_EXTERN SchemaId& operator=(const SchemaId&);
00043         QMF_EXTERN ~SchemaId();
00044 
00045         QMF_EXTERN SchemaId(int, const std::string&, const std::string&);
00046         QMF_EXTERN void setHash(const qpid::types::Uuid&);
00047         QMF_EXTERN int getType() const;
00048         QMF_EXTERN const std::string& getPackageName() const;
00049         QMF_EXTERN const std::string& getName() const;
00050         QMF_EXTERN const qpid::types::Uuid& getHash() const;
00051 
00052 #ifndef SWIG
00053     private:
00054         friend class qmf::PrivateImplRef<SchemaId>;
00055         friend struct SchemaIdImplAccess;
00056 #endif
00057     };
00058 
00059 }
00060 
00061 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00421.html0000664000076400007640000001124511752725717017317 0ustar00jrossjross00000000000000 qmf/engine/Object.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Object.h File Reference

Go to the source code of this file.

Classes

class  qmf::engine::Object

Namespaces

namespace  qmf
namespace  qmf::engine

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00761.html0000664000076400007640000002135511752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Var32Value Member List
This is the complete list of members for qpid::framing::Var32Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
Var32Value(const std::string &v, uint8_t code)qpid::framing::Var32Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00460.html0000664000076400007640000001461211752725717017323 0ustar00jrossjross00000000000000 qpid/client/ClientImportExport.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/ClientImportExport.h File Reference

Go to the source code of this file.

Defines

#define QPID_CLIENT_EXTERN   QPID_IMPORT
#define QPID_CLIENT_CLASS_EXTERN   QPID_CLASS_IMPORT
#define QPID_CLIENT_INLINE_EXTERN   QPID_INLINE_IMPORT

Define Documentation

#define QPID_CLIENT_CLASS_EXTERN   QPID_CLASS_IMPORT

Definition at line 31 of file ClientImportExport.h.

#define QPID_CLIENT_EXTERN   QPID_IMPORT

Definition at line 30 of file ClientImportExport.h.

#define QPID_CLIENT_INLINE_EXTERN   QPID_INLINE_IMPORT

Definition at line 32 of file ClientImportExport.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00667.html0000664000076400007640000001277511752725717017344 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::CommonOptions Member List
This is the complete list of members for qpid::CommonOptions, including all inherited members.
addOptions()qpid::Options [inline]
CommonOptions(const std::string &name=std::string(), const std::string &configfile=std::string())qpid::CommonOptions
configqpid::CommonOptions
helpqpid::CommonOptions
Options(const std::string &name=std::string())qpid::Options
parse(int argc, char const *const *argv, const std::string &configfile=std::string(), bool allowUnknown=false)qpid::Options
versionqpid::CommonOptions

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00814.html0000664000076400007640000001106311752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::StructHelper Member List
This is the complete list of members for qpid::framing::StructHelper, including all inherited members.
decode(T &t, const std::string &data)qpid::framing::StructHelper [inline]
encode(const T t, std::string &data)qpid::framing::StructHelper [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00641.html0000664000076400007640000001367311752725717017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaMethod Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00713.html0000664000076400007640000001555511752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Object::AttributeMap Member List
This is the complete list of members for qpid::console::Object::AttributeMap, including all inherited members.
addBool(const std::string &key, bool val)qpid::console::Object::AttributeMap
addDouble(const std::string &key, double val)qpid::console::Object::AttributeMap
addFloat(const std::string &key, float val)qpid::console::Object::AttributeMap
addInt(const std::string &key, int32_t val)qpid::console::Object::AttributeMap
addInt64(const std::string &key, int64_t val)qpid::console::Object::AttributeMap
addMap(const std::string &key, const framing::FieldTable &val)qpid::console::Object::AttributeMap
addRef(const std::string &key, const ObjectId &val)qpid::console::Object::AttributeMap
addString(const std::string &key, const std::string &val)qpid::console::Object::AttributeMap
addUint(const std::string &key, uint32_t val)qpid::console::Object::AttributeMap
addUint64(const std::string &key, uint64_t val)qpid::console::Object::AttributeMap
addUuid(const std::string &key, const framing::Uuid &val)qpid::console::Object::AttributeMap

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00495_source.html0000664000076400007640000004452111752725717020715 0ustar00jrossjross00000000000000 qpid/framing/Array.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Array.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #include "qpid/framing/amqp_types.h"
00022 #include "qpid/framing/FieldValue.h"
00023 #include "qpid/framing/TypeCode.h"
00024 #include <boost/shared_ptr.hpp>
00025 #include <iostream>
00026 #include <vector>
00027 #include "qpid/CommonImportExport.h"
00028 
00029 #ifndef _Array_
00030 #define _Array_
00031 
00032 namespace qpid {
00033 namespace framing {
00034 
00035 class Buffer;
00036 
00037 class QPID_COMMON_CLASS_EXTERN Array
00038 {
00039   public:
00040     typedef boost::shared_ptr<FieldValue> ValuePtr;
00041     typedef std::vector<ValuePtr> ValueVector;
00042     typedef ValueVector::const_iterator const_iterator;
00043     typedef ValueVector::iterator iterator;
00044 
00045     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00046     QPID_COMMON_EXTERN void encode(Buffer& buffer) const;
00047     QPID_COMMON_EXTERN void decode(Buffer& buffer);
00048 
00049     QPID_COMMON_EXTERN int count() const;
00050     QPID_COMMON_EXTERN bool operator==(const Array& other) const;
00051 
00052     QPID_COMMON_EXTERN Array();
00053     QPID_COMMON_EXTERN Array(TypeCode type);
00054     QPID_COMMON_EXTERN Array(uint8_t type);
00055     //creates a longstr array
00056     QPID_COMMON_EXTERN Array(const std::vector<std::string>& in);
00057 
00058     QPID_COMMON_INLINE_EXTERN TypeCode getType() const { return type; }
00059 
00060     // std collection interface.
00061     QPID_COMMON_INLINE_EXTERN const_iterator begin() const { return values.begin(); }
00062     QPID_COMMON_INLINE_EXTERN const_iterator end() const { return values.end(); }
00063     QPID_COMMON_INLINE_EXTERN iterator begin() { return values.begin(); }
00064     QPID_COMMON_INLINE_EXTERN iterator end(){ return values.end(); }
00065 
00066     QPID_COMMON_INLINE_EXTERN ValuePtr front() const { return values.front(); }
00067     QPID_COMMON_INLINE_EXTERN ValuePtr back() const { return values.back(); }
00068     QPID_COMMON_INLINE_EXTERN size_t size() const { return values.size(); }
00069 
00070     QPID_COMMON_EXTERN void insert(iterator i, ValuePtr value);
00071     QPID_COMMON_INLINE_EXTERN void erase(iterator i) { values.erase(i); }
00072     QPID_COMMON_INLINE_EXTERN void push_back(ValuePtr value) { values.insert(end(), value); }
00073     QPID_COMMON_INLINE_EXTERN void pop_back() { values.pop_back(); }
00074 
00075     // Non-std interface
00076     QPID_COMMON_INLINE_EXTERN void add(ValuePtr value) { push_back(value); }
00077 
00078     template <class T>
00079     void collect(std::vector<T>& out) const
00080     {
00081         for (ValueVector::const_iterator i = values.begin(); i != values.end(); ++i) {
00082             out.push_back((*i)->get<T>());
00083         }
00084     }
00085 
00086   private:
00087     TypeCode type;
00088     ValueVector values;
00089 
00090     friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& out, const Array& body);
00091 };
00092 
00093 }
00094 }
00095 
00096 
00097 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00420_source.html0000664000076400007640000004741011752725717020701 0ustar00jrossjross00000000000000 qpid/messaging/Message.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Message.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_MESSAGE_H
00002 #define QPID_MESSAGING_MESSAGE_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/messaging/ImportExport.h"
00025 
00026 #include "qpid/messaging/Duration.h"
00027 #include "qpid/types/Exception.h"
00028 #include "qpid/types/Variant.h"
00029 
00030 #include <string>
00031 
00032 namespace qpid {
00033 namespace messaging {
00034 
00035 class Address;
00036 class Codec;
00037 struct MessageImpl;
00038 
00042 class QPID_MESSAGING_CLASS_EXTERN Message
00043 {
00044   public:
00045     QPID_MESSAGING_EXTERN Message(const std::string& bytes = std::string());
00046     QPID_MESSAGING_EXTERN Message(const char*, size_t);
00047     QPID_MESSAGING_EXTERN Message(const Message&);
00048     QPID_MESSAGING_EXTERN ~Message();
00049 
00050     QPID_MESSAGING_EXTERN Message& operator=(const Message&);
00051 
00052     QPID_MESSAGING_EXTERN void setReplyTo(const Address&);
00053     QPID_MESSAGING_EXTERN const Address& getReplyTo() const;
00054 
00055     QPID_MESSAGING_EXTERN void setSubject(const std::string&);
00056     QPID_MESSAGING_EXTERN const std::string& getSubject() const;
00057 
00063     QPID_MESSAGING_EXTERN void setContentType(const std::string&);
00069     QPID_MESSAGING_EXTERN const std::string& getContentType() const;
00070 
00076     QPID_MESSAGING_EXTERN void setMessageId(const std::string&);
00077     QPID_MESSAGING_EXTERN const std::string& getMessageId() const;
00078 
00085     QPID_MESSAGING_EXTERN void setUserId(const std::string&);
00086     QPID_MESSAGING_EXTERN const std::string& getUserId() const;
00087 
00095     QPID_MESSAGING_EXTERN void setCorrelationId(const std::string&);
00096     QPID_MESSAGING_EXTERN const std::string& getCorrelationId() const;
00097 
00103     QPID_MESSAGING_EXTERN void setPriority(uint8_t);
00104     QPID_MESSAGING_EXTERN uint8_t getPriority() const;
00105 
00111     QPID_MESSAGING_EXTERN void setTtl(Duration ttl);
00115     QPID_MESSAGING_EXTERN Duration getTtl() const;
00116 
00123     QPID_MESSAGING_EXTERN void setDurable(bool durable);
00124     QPID_MESSAGING_EXTERN bool getDurable() const;
00125 
00133     QPID_MESSAGING_EXTERN bool getRedelivered() const;
00139     QPID_MESSAGING_EXTERN void setRedelivered(bool);
00140 
00149     QPID_MESSAGING_EXTERN const qpid::types::Variant::Map& getProperties() const;
00150     QPID_MESSAGING_EXTERN qpid::types::Variant::Map& getProperties();
00151 
00158     QPID_MESSAGING_EXTERN void setContent(const std::string&);
00163     QPID_MESSAGING_EXTERN void setContent(const char* chars, size_t count);
00164 
00166     QPID_MESSAGING_EXTERN std::string getContent() const;
00173     QPID_MESSAGING_EXTERN const char* getContentPtr() const;
00175     QPID_MESSAGING_EXTERN size_t getContentSize() const;
00176 
00177     QPID_MESSAGING_EXTERN void setProperty(const std::string&, const qpid::types::Variant&);
00178   private:
00179     MessageImpl* impl;
00180     friend struct MessageImplAccess;
00181 };
00182 
00183 struct QPID_MESSAGING_CLASS_EXTERN EncodingException : qpid::types::Exception
00184 {
00185     QPID_MESSAGING_EXTERN EncodingException(const std::string& msg);
00186 };
00187 
00197 QPID_MESSAGING_EXTERN void decode(const Message& message,
00198                                   qpid::types::Variant::Map& map,
00199                                   const std::string& encoding = std::string());
00209 QPID_MESSAGING_EXTERN void decode(const Message& message,
00210                                   qpid::types::Variant::List& list,
00211                                   const std::string& encoding = std::string());
00221 QPID_MESSAGING_EXTERN void encode(const qpid::types::Variant::Map& map,
00222                                   Message& message,
00223                                   const std::string& encoding = std::string());
00233 QPID_MESSAGING_EXTERN void encode(const qpid::types::Variant::List& list,
00234                                   Message& message,
00235                                   const std::string& encoding = std::string());
00236 
00237 }} // namespace qpid::messaging
00238 
00239 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00430_source.html0000664000076400007640000003074511752725717020705 0ustar00jrossjross00000000000000 qmf/Schema.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Schema.h
Go to the documentation of this file.
00001 #ifndef QMF_SCHEMA_H
00002 #define QMF_SCHEMA_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qpid/sys/IntegerTypes.h"
00026 #include "qmf/Handle.h"
00027 #include "qmf/SchemaTypes.h"
00028 #include <string>
00029 
00030 namespace qmf {
00031 
00032 #ifndef SWIG
00033     template <class> class PrivateImplRef;
00034 #endif
00035 
00036     class SchemaImpl;
00037     class SchemaId;
00038     class SchemaProperty;
00039     class SchemaMethod;
00040 
00041     class QMF_CLASS_EXTERN Schema : public qmf::Handle<SchemaImpl> {
00042     public:
00043         QMF_EXTERN Schema(SchemaImpl* impl = 0);
00044         QMF_EXTERN Schema(const Schema&);
00045         QMF_EXTERN Schema& operator=(const Schema&);
00046         QMF_EXTERN ~Schema();
00047 
00048         QMF_EXTERN Schema(int, const std::string&, const std::string&);
00049         QMF_EXTERN const SchemaId& getSchemaId() const;
00050 
00051         QMF_EXTERN void finalize();
00052         QMF_EXTERN bool isFinalized() const;
00053         QMF_EXTERN void addProperty(const SchemaProperty&);
00054         QMF_EXTERN void addMethod(const SchemaMethod&);
00055         QMF_EXTERN void setDesc(const std::string&);
00056         QMF_EXTERN const std::string& getDesc() const;
00057 
00058         QMF_EXTERN void setDefaultSeverity(int);
00059         QMF_EXTERN int getDefaultSeverity() const;
00060 
00061         QMF_EXTERN uint32_t getPropertyCount() const;
00062         QMF_EXTERN SchemaProperty getProperty(uint32_t) const;
00063 
00064         QMF_EXTERN uint32_t getMethodCount() const;
00065         QMF_EXTERN SchemaMethod getMethod(uint32_t) const;
00066 
00067 #ifndef SWIG
00068     private:
00069         friend class qmf::PrivateImplRef<Schema>;
00070         friend struct SchemaImplAccess;
00071 #endif
00072     };
00073 
00074 }
00075 
00076 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00657.html0000664000076400007640000001274211752725717017335 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineAllocator Member List
This is the complete list of members for qpid::InlineAllocator, including all inherited members.
allocate(size_type n)qpid::InlineAllocator [inline]
deallocate(pointer p, size_type n)qpid::InlineAllocator [inline]
InlineAllocator()qpid::InlineAllocator [inline]
InlineAllocator(const InlineAllocator &x)qpid::InlineAllocator [inline]
pointer typedefqpid::InlineAllocator
size_type typedefqpid::InlineAllocator
value_type typedefqpid::InlineAllocator

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00432_source.html0000664000076400007640000002745111752725717020707 0ustar00jrossjross00000000000000 qmf/engine/Typecode.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Typecode.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineTypecode_
00002 #define _QmfEngineTypecode_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 namespace qmf {
00024 namespace engine {
00025 
00026     enum Typecode {
00027         TYPE_UINT8      = 1,
00028         TYPE_UINT16     = 2,
00029         TYPE_UINT32     = 3,
00030         TYPE_UINT64     = 4,
00031         TYPE_SSTR       = 6,
00032         TYPE_LSTR       = 7,
00033         TYPE_ABSTIME    = 8,
00034         TYPE_DELTATIME  = 9,
00035         TYPE_REF        = 10,
00036         TYPE_BOOL       = 11,
00037         TYPE_FLOAT      = 12,
00038         TYPE_DOUBLE     = 13,
00039         TYPE_UUID       = 14,
00040         TYPE_MAP        = 15,
00041         TYPE_INT8       = 16,
00042         TYPE_INT16      = 17,
00043         TYPE_INT32      = 18,
00044         TYPE_INT64      = 19,
00045         TYPE_OBJECT     = 20,
00046         TYPE_LIST       = 21,
00047         TYPE_ARRAY      = 22
00048     };
00049 }
00050 }
00051 
00052 #endif
00053 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x65.html0000664000076400007640000002637511752725720022605 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- e -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00500.html0000664000076400007640000001203511752725717017313 0ustar00jrossjross00000000000000 qpid/framing/DtxGetTimeoutResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/DtxGetTimeoutResult.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::DtxGetTimeoutResult

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00418.html0000664000076400007640000001075211752725717017327 0ustar00jrossjross00000000000000 qmf/engine/Message.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Message.h File Reference

Go to the source code of this file.

Classes

struct  qmf::engine::Message

Namespaces

namespace  qmf
namespace  qmf::engine

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00011.html0000664000076400007640000002114211752725717017307 0ustar00jrossjross00000000000000 qmf::engine::AgentProxy Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::AgentProxy Class Reference

#include <qmf/engine/Console.h>

List of all members.

Public Member Functions

 AgentProxy (const AgentProxy &from)
 ~AgentProxy ()
const char * getLabel () const
uint32_t getBrokerBank () const
uint32_t getAgentBank () const

Constructor & Destructor Documentation

qmf::engine::AgentProxy::AgentProxy ( const AgentProxy from)
qmf::engine::AgentProxy::~AgentProxy ( )

Member Function Documentation

uint32_t qmf::engine::AgentProxy::getAgentBank ( ) const
uint32_t qmf::engine::AgentProxy::getBrokerBank ( ) const
const char* qmf::engine::AgentProxy::getLabel ( ) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00411_source.html0000664000076400007640000002705711752725717020706 0ustar00jrossjross00000000000000 qmf/DataAddr.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/DataAddr.h
Go to the documentation of this file.
00001 #ifndef QMF_DATA_ADDR_H
00002 #define QMF_DATA_ADDR_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qpid/types/Variant.h"
00027 #include <string>
00028 
00029 namespace qmf {
00030 
00031 #ifndef SWIG
00032     template <class> class PrivateImplRef;
00033 #endif
00034 
00035     class DataAddrImpl;
00036 
00037     class QMF_CLASS_EXTERN DataAddr : public qmf::Handle<DataAddrImpl> {
00038     public:
00039         QMF_EXTERN DataAddr(DataAddrImpl* impl = 0);
00040         QMF_EXTERN DataAddr(const DataAddr&);
00041         QMF_EXTERN DataAddr& operator=(const DataAddr&);
00042         QMF_EXTERN ~DataAddr();
00043 
00044         QMF_EXTERN bool operator==(const DataAddr&);
00045         QMF_EXTERN bool operator<(const DataAddr&);
00046 
00047         QMF_EXTERN DataAddr(const qpid::types::Variant::Map&);
00048         QMF_EXTERN DataAddr(const std::string& name, const std::string& agentName, uint32_t agentEpoch=0);
00049         QMF_EXTERN const std::string& getName() const;
00050         QMF_EXTERN const std::string& getAgentName() const;
00051         QMF_EXTERN uint32_t getAgentEpoch() const;
00052         QMF_EXTERN qpid::types::Variant::Map asMap() const;
00053 
00054         QMF_EXTERN bool operator==(const DataAddr&) const;
00055         QMF_EXTERN bool operator<(const DataAddr&) const;
00056 
00057 #ifndef SWIG
00058     private:
00059         friend class qmf::PrivateImplRef<DataAddr>;
00060         friend struct DataAddrImplAccess;
00061 #endif
00062     };
00063 
00064 }
00065 
00066 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/modules.html0000664000076400007640000000663311752725717020165 0ustar00jrossjross00000000000000 Modules
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Modules

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x6e.html0000664000076400007640000002232411752725717022375 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x6d.html0000664000076400007640000004133111752725717021360 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- m -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00357.html0000664000076400007640000002036111752725720017320 0ustar00jrossjross00000000000000 qpid::messaging::TransactionAborted Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::TransactionAborted Struct Reference

Thrown on Session::commit() if reconnection results in the transaction being automatically aborted. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 TransactionAborted (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown on Session::commit() if reconnection results in the transaction being automatically aborted.


Constructor & Destructor Documentation

qpid::messaging::TransactionAborted::TransactionAborted ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00465.html0000664000076400007640000001441411752725717017330 0ustar00jrossjross00000000000000 qpid/client/FailoverManager.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FailoverManager.h File Reference

Go to the source code of this file.

Classes

struct  qpid::client::CannotConnectException
class  qpid::client::FailoverManager
 Utility to manage failover. More...
struct  qpid::client::FailoverManager::Command
 Interface to implement for doing work that can be resumed on failover. More...
struct  qpid::client::FailoverManager::ReconnectionStrategy

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00060.html0000664000076400007640000001721011752725720017306 0ustar00jrossjross00000000000000 qpid::messaging::ConnectionError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::ConnectionError Struct Reference

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 ConnectionError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qpid::messaging::ConnectionError::ConnectionError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00281.html0000664000076400007640000002440511752725720017317 0ustar00jrossjross00000000000000 qpid::framing::ResourceLimitExceededException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ResourceLimitExceededException Struct Reference

The client exceeded its resource allocation. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 ResourceLimitExceededException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The client exceeded its resource allocation.


Constructor & Destructor Documentation

qpid::framing::ResourceLimitExceededException::ResourceLimitExceededException ( const std::string msg = std::string()) [inline]

Definition at line 134 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::ResourceLimitExceededException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 133 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00906.html0000664000076400007640000000764511752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multiset Member List
This is the complete list of members for std::multiset, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00392.html0000664000076400007640000001022211752725720017312 0ustar00jrossjross00000000000000 std::wistream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wistream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00802.html0000664000076400007640000001376011752725720017320 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ConnectionForcedException Member List
This is the complete list of members for qpid::framing::ConnectionForcedException, including all inherited members.
codeqpid::ConnectionException
ConnectionException(framing::connection::CloseCode _code, const std::string &message)qpid::ConnectionException [inline]
ConnectionForcedException(const std::string &msg=std::string())qpid::framing::ConnectionForcedException [inline]
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::ConnectionForcedException [inline, virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x66.html0000664000076400007640000002204311752725720022572 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- f -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00572.html0000664000076400007640000011110111752725717017316 0ustar00jrossjross00000000000000 qmf::engine Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine Namespace Reference

Classes

struct  AgentEvent
 AgentEvent. More...
class  Agent
 Agent - Protocol engine for the QMF agent. More...
class  ConnectionSettings
 Settings for AMQP connections to the broker. More...
class  MethodResponse
class  QueryResponse
struct  ConsoleEvent
struct  BrokerEvent
class  AgentProxy
class  BrokerProxy
struct  ConsoleSettings
class  Console
class  Event
struct  Message
class  Object
class  ObjectId
struct  QueryOperand
struct  QueryElement
struct  QueryExpression
class  Query
struct  ResilientConnectionEvent
 Represents events that occur, unsolicited, from ResilientConnection. More...
class  SessionHandle
class  ResilientConnection
 ResilientConnection represents a Qpid connection that is resilient. More...
class  SchemaArgument
class  SchemaMethod
class  SchemaProperty
class  SchemaStatistic
class  SchemaClassKey
class  SchemaObjectClass
class  SchemaEventClass
class  Value

Enumerations

enum  ValueOper {
  O_EQ = 1, O_NE = 2, O_LT = 3, O_LE = 4,
  O_GT = 5, O_GE = 6, O_RE_MATCH = 7, O_RE_NOMATCH = 8,
  O_PRESENT = 9, O_NOT_PRESENT = 10
}
enum  ExprOper { E_NOT = 1, E_AND = 2, E_OR = 3, E_XOR = 4 }
enum  Access { ACCESS_READ_CREATE = 1, ACCESS_READ_WRITE = 2, ACCESS_READ_ONLY = 3 }
enum  Direction { DIR_IN = 1, DIR_OUT = 2, DIR_IN_OUT = 3 }
enum  ClassKind { CLASS_OBJECT = 1, CLASS_EVENT = 2 }
enum  Severity {
  SEV_EMERG = 0, SEV_ALERT = 1, SEV_CRIT = 2, SEV_ERROR = 3,
  SEV_WARN = 4, SEV_NOTICE = 5, SEV_INFORM = 6, SEV_DEBUG = 7
}
enum  Typecode {
  TYPE_UINT8 = 1, TYPE_UINT16 = 2, TYPE_UINT32 = 3, TYPE_UINT64 = 4,
  TYPE_SSTR = 6, TYPE_LSTR = 7, TYPE_ABSTIME = 8, TYPE_DELTATIME = 9,
  TYPE_REF = 10, TYPE_BOOL = 11, TYPE_FLOAT = 12, TYPE_DOUBLE = 13,
  TYPE_UUID = 14, TYPE_MAP = 15, TYPE_INT8 = 16, TYPE_INT16 = 17,
  TYPE_INT32 = 18, TYPE_INT64 = 19, TYPE_OBJECT = 20, TYPE_LIST = 21,
  TYPE_ARRAY = 22
}

Enumeration Type Documentation

Enumerator:
ACCESS_READ_CREATE 
ACCESS_READ_WRITE 
ACCESS_READ_ONLY 

Definition at line 29 of file Schema.h.

Enumerator:
CLASS_OBJECT 
CLASS_EVENT 

Definition at line 31 of file Schema.h.

Enumerator:
DIR_IN 
DIR_OUT 
DIR_IN_OUT 

Definition at line 30 of file Schema.h.

Enumerator:
E_NOT 
E_AND 
E_OR 
E_XOR 

Definition at line 62 of file Query.h.

Enumerator:
SEV_EMERG 
SEV_ALERT 
SEV_CRIT 
SEV_ERROR 
SEV_WARN 
SEV_NOTICE 
SEV_INFORM 
SEV_DEBUG 

Definition at line 32 of file Schema.h.

Enumerator:
TYPE_UINT8 
TYPE_UINT16 
TYPE_UINT32 
TYPE_UINT64 
TYPE_SSTR 
TYPE_LSTR 
TYPE_ABSTIME 
TYPE_DELTATIME 
TYPE_REF 
TYPE_BOOL 
TYPE_FLOAT 
TYPE_DOUBLE 
TYPE_UUID 
TYPE_MAP 
TYPE_INT8 
TYPE_INT16 
TYPE_INT32 
TYPE_INT64 
TYPE_OBJECT 
TYPE_LIST 
TYPE_ARRAY 

Definition at line 26 of file Typecode.h.

Enumerator:
O_EQ 
O_NE 
O_LT 
O_LE 
O_GT 
O_GE 
O_RE_MATCH 
O_RE_NOMATCH 
O_PRESENT 
O_NOT_PRESENT 

Definition at line 35 of file Query.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00749.html0000664000076400007640000003531711752725720017334 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FieldTable Member List
This is the complete list of members for qpid::framing::FieldTable, including all inherited members.
begin() const qpid::framing::FieldTable
begin()qpid::framing::FieldTable
clear()qpid::framing::FieldTable
const_iterator typedefqpid::framing::FieldTable
const_reference typedefqpid::framing::FieldTable
count() const qpid::framing::FieldTable
decode(Buffer &buffer)qpid::framing::FieldTable
empty()qpid::framing::FieldTable [inline]
encode(Buffer &buffer) const qpid::framing::FieldTable
encodedSize() const qpid::framing::FieldTable
end() const qpid::framing::FieldTable
end()qpid::framing::FieldTable
erase(const std::string &name)qpid::framing::FieldTable
FieldTable()qpid::framing::FieldTable
FieldTable(const FieldTable &)qpid::framing::FieldTable
find(const std::string &s) const qpid::framing::FieldTable
find(const std::string &s)qpid::framing::FieldTable
get(const std::string &name) const qpid::framing::FieldTable
getArray(const std::string &name, Array &value) const qpid::framing::FieldTable
getAsInt(const std::string &name) const qpid::framing::FieldTable
getAsInt64(const std::string &name) const qpid::framing::FieldTable
getAsString(const std::string &name) const qpid::framing::FieldTable
getAsUInt64(const std::string &name) const qpid::framing::FieldTable
getDouble(const std::string &name, double &value) const qpid::framing::FieldTable
getFloat(const std::string &name, float &value) const qpid::framing::FieldTable
getTable(const std::string &name, FieldTable &value) const qpid::framing::FieldTable
insert(const ValueMap::value_type &)qpid::framing::FieldTable
insert(ValueMap::iterator, const ValueMap::value_type &)qpid::framing::FieldTable
isSet(const std::string &name) const qpid::framing::FieldTable [inline]
iterator typedefqpid::framing::FieldTable
operator<<(std::ostream &out, const FieldTable &body)qpid::framing::FieldTable [friend]
operator=(const FieldTable &)qpid::framing::FieldTable
operator==(const FieldTable &other) const qpid::framing::FieldTable
reference typedefqpid::framing::FieldTable
set(const std::string &name, const ValuePtr &value)qpid::framing::FieldTable
setArray(const std::string &name, const Array &value)qpid::framing::FieldTable
setDouble(const std::string &name, const double value)qpid::framing::FieldTable
setFloat(const std::string &name, const float value)qpid::framing::FieldTable
setInt(const std::string &name, const int value)qpid::framing::FieldTable
setInt64(const std::string &name, const int64_t value)qpid::framing::FieldTable
setString(const std::string &name, const std::string &value)qpid::framing::FieldTable
setTable(const std::string &name, const FieldTable &value)qpid::framing::FieldTable
setTimestamp(const std::string &name, const uint64_t value)qpid::framing::FieldTable
setUInt64(const std::string &name, const uint64_t value)qpid::framing::FieldTable
size() const qpid::framing::FieldTable [inline]
value_type typedefqpid::framing::FieldTable
ValueMap typedefqpid::framing::FieldTable
ValuePtr typedefqpid::framing::FieldTable

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00146.html0000664000076400007640000001775111752725717017333 0ustar00jrossjross00000000000000 qmf::IndexOutOfRange Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::IndexOutOfRange Struct Reference

#include <qmf/exceptions.h>

List of all members.

Public Member Functions

 IndexOutOfRange ()
virtual ~IndexOutOfRange () throw ()
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qmf::IndexOutOfRange::IndexOutOfRange ( )
virtual qmf::IndexOutOfRange::~IndexOutOfRange ( ) throw () [virtual]

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 38 of file exceptions.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00239.html0000664000076400007640000002001111752725717017315 0ustar00jrossjross00000000000000 qmf::OperationTimedOut Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::OperationTimedOut Struct Reference

#include <qmf/exceptions.h>

List of all members.

Public Member Functions

 OperationTimedOut ()
virtual ~OperationTimedOut () throw ()
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qmf::OperationTimedOut::OperationTimedOut ( )
virtual qmf::OperationTimedOut::~OperationTimedOut ( ) throw () [virtual]

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 38 of file exceptions.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00306.html0000664000076400007640000003760311752725717017327 0ustar00jrossjross00000000000000 qmf::engine::SchemaObjectClass Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaObjectClass Class Reference

#include <qmf/engine/Schema.h>

List of all members.

Public Member Functions

 SchemaObjectClass (const char *package, const char *name)
 SchemaObjectClass (const SchemaObjectClass &from)
 ~SchemaObjectClass ()
void addProperty (const SchemaProperty *property)
void addStatistic (const SchemaStatistic *statistic)
void addMethod (const SchemaMethod *method)
const SchemaClassKeygetClassKey () const
int getPropertyCount () const
int getStatisticCount () const
int getMethodCount () const
const SchemaPropertygetProperty (int idx) const
const SchemaStatisticgetStatistic (int idx) const
const SchemaMethodgetMethod (int idx) const

Constructor & Destructor Documentation

qmf::engine::SchemaObjectClass::SchemaObjectClass ( const char *  package,
const char *  name 
)
qmf::engine::SchemaObjectClass::SchemaObjectClass ( const SchemaObjectClass from)
qmf::engine::SchemaObjectClass::~SchemaObjectClass ( )

Member Function Documentation

void qmf::engine::SchemaObjectClass::addMethod ( const SchemaMethod method)
void qmf::engine::SchemaObjectClass::addProperty ( const SchemaProperty property)
void qmf::engine::SchemaObjectClass::addStatistic ( const SchemaStatistic statistic)
const SchemaClassKey* qmf::engine::SchemaObjectClass::getClassKey ( ) const
const SchemaMethod* qmf::engine::SchemaObjectClass::getMethod ( int  idx) const
int qmf::engine::SchemaObjectClass::getMethodCount ( ) const
const SchemaProperty* qmf::engine::SchemaObjectClass::getProperty ( int  idx) const
int qmf::engine::SchemaObjectClass::getPropertyCount ( ) const
const SchemaStatistic* qmf::engine::SchemaObjectClass::getStatistic ( int  idx) const
int qmf::engine::SchemaObjectClass::getStatisticCount ( ) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00426.html0000664000076400007640000001702211752725717017323 0ustar00jrossjross00000000000000 qmf/engine/Query.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Query.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00564.html0000664000076400007640000001047611752725717017334 0ustar00jrossjross00000000000000 qpid/sys/windows/Time.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/Time.h File Reference
#include <boost/date_time/posix_time/posix_time_types.hpp>

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00521.html0000664000076400007640000001214411752725717017317 0ustar00jrossjross00000000000000 qpid/framing/StructHelper.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/StructHelper.h File Reference
#include "qpid/Exception.h"
#include "qpid/CommonImportExport.h"
#include "qpid/framing/Buffer.h"
#include <stdlib.h>

Go to the source code of this file.

Classes

class  qpid::framing::StructHelper

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00776.html0000664000076400007640000002133411752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Integer8Value Member List
This is the complete list of members for qpid::framing::Integer8Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
Integer8Value(int8_t)qpid::framing::Integer8Value
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00399.html0000664000076400007640000001025311752725720017325 0ustar00jrossjross00000000000000 std::wstringstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wstringstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00325.html0000664000076400007640000013513311752725720017317 0ustar00jrossjross00000000000000 qpid::messaging::Session Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

A session represents a distinct 'conversation' which can involve sending and receiving messages to and from different addresses. More...

#include <qpid/messaging/Session.h>

List of all members.

Public Member Functions

 Session (SessionImpl *impl=0)
 Session (const Session &)
 ~Session ()
Sessionoperator= (const Session &)
void close ()
 Closes a session and all associated senders and receivers.
void commit ()
 Commits the sessions transaction.
void rollback ()
void acknowledge (bool sync=false)
 Acknowledges all outstanding messages that have been received by the application on this session.
void acknowledge (Message &, bool sync=false)
 Acknowledges the specified message.
void acknowledgeUpTo (Message &, bool sync=false)
 Acknowledges all message up to the specified message.
void reject (Message &)
 Rejects the specified message.
void release (Message &)
 Releases the specified message.
void sync (bool block=true)
 Request synchronisation with the server.
uint32_t getReceivable ()
 Returns the total number of messages received and waiting to be fetched by all Receivers belonging to this session.
uint32_t getUnsettledAcks ()
 Returns a count of the number of messages received this session that have been acknowledged, but for which that acknowledgement has not yet been confirmed as processed by the server.
bool nextReceiver (Receiver &, Duration timeout=Duration::FOREVER)
 Retrieves the receiver for the next available message.
Receiver nextReceiver (Duration timeout=Duration::FOREVER)
 Returns the receiver for the next available message.
Sender createSender (const Address &address)
 Create a new sender through which messages can be sent to the specified address.
Sender createSender (const std::string &address)
 Create a new sender through which messages can be sent to the specified address.
Receiver createReceiver (const Address &address)
 Create a new receiver through which messages can be received from the specified address.
Receiver createReceiver (const std::string &address)
 Create a new receiver through which messages can be received from the specified address.
Sender getSender (const std::string &name) const
 Returns the sender with the specified name.
Receiver getReceiver (const std::string &name) const
 Returns the receiver with the specified name.
Connection getConnection () const
 Returns a handle to the connection this session is associated with.
bool hasError ()
void checkError ()
 If the session has been rendered invalid by some exception, this method will result in that exception being thrown on calling this method.
QPID_MESSAGING_INLINE_EXTERN bool isValid () const
QPID_MESSAGING_INLINE_EXTERN bool isNull () const
QPID_MESSAGING_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_MESSAGING_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Detailed Description

A session represents a distinct 'conversation' which can involve sending and receiving messages to and from different addresses.


Member Typedef Documentation

typedef T qpid::messaging::Handle::Impl [protected, inherited]

Definition at line 57 of file Handle.h.


Constructor & Destructor Documentation

qpid::messaging::Session::Session ( SessionImpl *  impl = 0)
qpid::messaging::Session::Session ( const Session )
qpid::messaging::Session::~Session ( )

Member Function Documentation

void qpid::messaging::Session::acknowledge ( bool  sync = false)

Acknowledges all outstanding messages that have been received by the application on this session.

Parameters:
syncif true, blocks until the acknowledgement has been processed by the server
void qpid::messaging::Session::acknowledge ( Message ,
bool  sync = false 
)

Acknowledges the specified message.

void qpid::messaging::Session::acknowledgeUpTo ( Message ,
bool  sync = false 
)

Acknowledges all message up to the specified message.

void qpid::messaging::Session::checkError ( )

If the session has been rendered invalid by some exception, this method will result in that exception being thrown on calling this method.

void qpid::messaging::Session::close ( )

Closes a session and all associated senders and receivers.

An opened session should be closed before the last handle to it goes out of scope. All a connections sessions can be closed by a call to Connection::close().

void qpid::messaging::Session::commit ( )

Commits the sessions transaction.

Exceptions:
TransactionAbortedif the original session is lost forcing an automatic rollback.
Receiver qpid::messaging::Session::createReceiver ( const Address address)

Create a new receiver through which messages can be received from the specified address.

Exceptions:
ResolutionErrorif there is an error in resolving the address
Receiver qpid::messaging::Session::createReceiver ( const std::string address)

Create a new receiver through which messages can be received from the specified address.

Exceptions:
ResolutionErrorif there is an error in resolving the address
MalformedAddressif the syntax of address is not valid
Sender qpid::messaging::Session::createSender ( const Address address)

Create a new sender through which messages can be sent to the specified address.

Exceptions:
ResolutionErrorif there is an error in resolving the address
Sender qpid::messaging::Session::createSender ( const std::string address)

Create a new sender through which messages can be sent to the specified address.

Exceptions:
ResolutionErrorif there is an error in resolving the address
MalformedAddressif the syntax of address is not valid
Connection qpid::messaging::Session::getConnection ( ) const

Returns a handle to the connection this session is associated with.

uint32_t qpid::messaging::Session::getReceivable ( )

Returns the total number of messages received and waiting to be fetched by all Receivers belonging to this session.

This is the total number of available messages across all receivers on this session.

Receiver qpid::messaging::Session::getReceiver ( const std::string name) const

Returns the receiver with the specified name.

Exceptions:
KeyErrorif there is none for that name.
Sender qpid::messaging::Session::getSender ( const std::string name) const

Returns the sender with the specified name.

Exceptions:
KeyErrorif there is none for that name.
uint32_t qpid::messaging::Session::getUnsettledAcks ( )

Returns a count of the number of messages received this session that have been acknowledged, but for which that acknowledgement has not yet been confirmed as processed by the server.

bool qpid::messaging::Session::hasError ( )
Returns:
true if the session has been rendered invalid by some exception, false if it is valid for use.
QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

References qpid::messaging::Handle::impl.

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

References qpid::messaging::Handle::impl.

bool qpid::messaging::Session::nextReceiver ( Receiver ,
Duration  timeout = Duration::FOREVER 
)

Retrieves the receiver for the next available message.

If there are no available messages at present the call will block for up to the specified timeout waiting for one to arrive. Returns true if a message was available at the point of return, in which case the passed in receiver reference will be set to the receiver for that message or false if no message was available.

Receiver qpid::messaging::Session::nextReceiver ( Duration  timeout = Duration::FOREVER)

Returns the receiver for the next available message.

If there are no available messages at present the call will block for up to the specified timeout waiting for one to arrive.

Exceptions:
Receiver::NoMessageAvailableif no message became available in time.
QPID_MESSAGING_INLINE_EXTERN qpid::messaging::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

References qpid::messaging::Handle::impl.

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

References qpid::messaging::Handle::impl.

Session& qpid::messaging::Session::operator= ( const Session )
void qpid::messaging::Session::reject ( Message )

Rejects the specified message.

The broker does not redeliver a message that has been rejected. Once a message has been acknowledged, it can no longer be rejected.

void qpid::messaging::Session::release ( Message )

Releases the specified message.

The broker may redeliver the message. Once a message has been acknowledged, it can no longer be released.

void qpid::messaging::Session::rollback ( )
void qpid::messaging::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.

References qpid::messaging::Handle::impl.

void qpid::messaging::Session::sync ( bool  block = true)

Request synchronisation with the server.

Parameters:
blockif true, this call will block until the server confirms completion of all pending operations; if false the call will request notification from the server but will return before receiving it.

Member Data Documentation

Impl* qpid::messaging::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00535_source.html0000664000076400007640000001577211752725717020716 0ustar00jrossjross00000000000000 qpid/management/Args.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/Args.h
Go to the documentation of this file.
00001 #ifndef _Args_
00002 #define _Args_
00003 
00004 //
00005 // Licensed to the Apache Software Foundation (ASF) under one
00006 // or more contributor license agreements.  See the NOTICE file
00007 // distributed with this work for additional information
00008 // regarding copyright ownership.  The ASF licenses this file
00009 // to you under the Apache License, Version 2.0 (the
00010 // "License"); you may not use this file except in compliance
00011 // with the License.  You may obtain a copy of the License at
00012 //
00013 //   http://www.apache.org/licenses/LICENSE-2.0
00014 //
00015 // Unless required by applicable law or agreed to in writing,
00016 // software distributed under the License is distributed on an
00017 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018 // KIND, either express or implied.  See the License for the
00019 // specific language governing permissions and limitations
00020 // under the License.
00021 //
00022 
00023 
00024 namespace qpid {
00025 namespace management {
00026 
00027 class Args
00028 {
00029   public:
00030 
00031     virtual ~Args (void) = 0;
00032 
00033 };
00034 
00035 inline Args::~Args (void) {}
00036 
00037 class ArgsNone : public Args
00038 {
00039 };
00040 
00041 }}
00042 
00043 
00044 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x6c.html0000664000076400007640000001425211752725720022652 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- l -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x6f.html0000664000076400007640000001603511752725720023665 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- o -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00583.html0000664000076400007640000002047511752725720017327 0ustar00jrossjross00000000000000 qpid::framing::dtx Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::dtx Namespace Reference

Enumerations

enum  XaStatus {
  XA_STATUS_XA_OK = 0, XA_STATUS_XA_RBROLLBACK = 1, XA_STATUS_XA_RBTIMEOUT = 2, XA_STATUS_XA_HEURHAZ = 3,
  XA_STATUS_XA_HEURCOM = 4, XA_STATUS_XA_HEURRB = 5, XA_STATUS_XA_HEURMIX = 6, XA_STATUS_XA_RDONLY = 7
}

Enumeration Type Documentation

Enumerator:
XA_STATUS_XA_OK 
XA_STATUS_XA_RBROLLBACK 
XA_STATUS_XA_RBTIMEOUT 
XA_STATUS_XA_HEURHAZ 
XA_STATUS_XA_HEURCOM 
XA_STATUS_XA_HEURRB 
XA_STATUS_XA_HEURMIX 
XA_STATUS_XA_RDONLY 

Definition at line 136 of file enum.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00566_source.html0000664000076400007640000001531411752725717020712 0ustar00jrossjross00000000000000 qpid/sys/StrError.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/StrError.h
Go to the documentation of this file.
00001 #ifndef _sys_StrError_h
00002 #define _sys_StrError_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include <string>
00026 #include "qpid/CommonImportExport.h"
00027 
00028 namespace qpid {
00029 namespace sys {
00030 
00032 QPID_COMMON_EXTERN std::string strError(int err);
00033 
00034 }} // namespace qpid
00035 
00036 #endif  // _sys_StrError_h

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00055.html0000664000076400007640000001012311752725720017306 0ustar00jrossjross00000000000000 std::complex Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::complex Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00834.html0000664000076400007640000001717111752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::Manageable Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00179.html0000664000076400007640000001030611752725720017320 0ustar00jrossjross00000000000000 std::map::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::map::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/index.html0000664000076400007640000003147511752725717017626 0ustar00jrossjross00000000000000 Qpid C++ API Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Qpid C++ API Reference

Messaging Client API classes

Code for common tasks

Includes and Namespaces

 #include <qpid/messaging/Connection.h>
 #include <qpid/messaging/Message.h>
 #include <qpid/messaging/Receiver.h>
 #include <qpid/messaging/Sender.h>
 #include <qpid/messaging/Session.h>
 #include <iostream>
 using namespace qpid::messaging;
 

Opening Sessions and Connections

 int main(int argc, char** argv) {
     std::string broker = argc > 1 ? argv[1] : "localhost:5672";
     std::string address = argc > 2 ? argv[2] : "amq.topic";
     Connection connection(broker);
     try {
         connection.open();
         Session session = connection.createSession();
 	// ### Your Code Here ###
         connection.close();
         return 0;
     } catch(const std::exception& error) {
         std::cerr << error.what() << std::endl;
         connection.close();
         return 1;   
     }
 }
 

Creating and Sending a Message

 Sender sender = session.createSender(address);
 sender.send(Message("Hello world!"));
 

Setting Message Content

 Message message;
 message.setContent("Hello world!");
 // In some applications, you should also set the content type,
 // which is a MIME type
 message.setContentType("text/plain");
 

Receiving a Message

 Receiver receiver = session.createReceiver(address);
 Message message = receiver.fetch(Duration::SECOND * 1); // timeout is optional
 session.acknowledge(); // acknowledge message receipt
 std::cout << message.getContent() << std::endl;
 

Receiving Messages from Multiple Sources

To receive messages from multiple sources, create a receiver for each source, and use session.nextReceiver().fetch() to fetch messages. session.nextReceiver() is guaranteed to return the receiver responsible for the first available message on the session.

 Receiver receiver1 = session.createReceiver(address1);
 Receiver receiver2 = session.createReceiver(address2);
 Message message =  session.nextReceiver().fetch();
 session.acknowledge(); // acknowledge message receipt
 std::cout << message.getContent() << std::endl;
 

Replying to a message:

 // Server creates a service queue and waits for messages
 // If it gets a request, it sends a response to the reply to address
 Receiver receiver = session.createReceiver("service_queue; {create: always}");
 Message request = receiver.fetch();
 const Address& address = request.getReplyTo(); // Get "reply-to" from request ...
 if (address) {
   Sender sender = session.createSender(address); // ... send response to "reply-to"
   Message response("pong!");
   sender.send(response);
   session.acknowledge();
 }
 // Client creates a private response queue - the # gets converted
 // to a unique string for the response queue name. Client uses the
 // name of this queue as its reply-to.
 Sender sender = session.createSender("service_queue");
 Address responseQueue("#response-queue; {create:always, delete:always}");
 Receiver receiver = session.createReceiver(responseQueue);
 Message request;
 request.setReplyTo(responseQueue);
 request.setContent("ping");
 sender.send(request);
 Message response = receiver.fetch();
 std::cout << request.getContent() << " -> " << response.getContent() << std::endl;
 

Getting and Setting Standard Message Properties

This shows some of the most commonly used message properties, it is not complete.

 Message message("Hello world!");
 message.setContentType("text/plain");
 message.setSubject("greeting");
 message.setReplyTo("response-queue");
 message.setTtl(100); // milliseconds
 message.setDurable(1);
 std::cout << "Content: " << message.getContent() << std::endl
           << "Content Type: " << message.getContentType()
           << "Subject: " << message.getSubject()
 	  << "ReplyTo: " << message.getReplyTo()
 	  << "Time To Live (in milliseconds) " << message.getTtl()
 	  << "Durability: " << message.getDurable();
 

Getting and Setting Application-Defined Message Properties

 std::string name = "weekday";
 std::string value = "Thursday";
 message.getProperties()[name] = value;
 std:string s = message.getProperties()["weekday"];
 

Transparent Failover

If a connection opened using the reconnect option, it will transparently reconnect if the connection is lost.

 Connection connection(broker);
 connection.setOption("reconnect", true);
 try {
     connection.open();
     ....
 

Maps

Maps provide a simple way to exchange binary data portably, across languages and platforms. Maps can contain simple types, lists, or maps.

 // Sender
 Variant::Map content;
 content["id"] = 987654321;
 content["name"] = "Widget";
 content["probability"] = 0.43;
 Variant::List colours;
 colours.push_back(Variant("red"));
 colours.push_back(Variant("green"));
 colours.push_back(Variant("white"));
 content["colours"] = colours;
 content["uuid"] = Uuid(true);
 Message message;
 encode(content, message);
 sender.send(message);
 
 // Receiver
 Variant::Map content;
 decode(receiver.fetch(), content);
 

Guaranteed Delivery

If a queue is durable, the queue survives a messaging broker crash, as well as any durable messages that have been placed on the queue. These messages will be delivered when the messaging broker is restarted. Delivery is not guaranteed unless both the message and the queue are durable.

 Sender sender = session.createSender("durable-queue");
 Message message("Hello world!");
 message.setDurable(1);
 sender.send(Message("Hello world!"));
 

Transactions

Transactions cover enqueues and dequeues.

When sending messages, a transaction tracks enqueues without actually delivering the messages, a commit places messages on their queues, and a rollback discards the enqueues.

When receiving messages, a transaction tracks dequeues without actually removing acknowledged messages, a commit removes all acknowledged messages, and a rollback discards acknowledgements. A rollback does not release the message, it must be explicitly released to return it to the queue.

 Connection connection(broker);
 Session session =  connection.createTransactionalSession();
 ...
 if (looksOk)
    session.commit();
 else 
    session.rollback();
 

Exceptions

All exceptions for the messaging API have MessagingException as their base class.

A common class of exception are those related to processing addresses used to create senders and/or receivers. These all have AddressError as their base class.

Where there is a syntax error in the address itself, a MalformedAddress will be thrown. Where the address is valid, but there is an error in interpreting (i.e. resolving) it, a ResolutionError - or a sub-class of it - will be thrown. If the address has assertions enabled for a given context and the asserted node properties are not in fact correct then AssertionFailed will be thrown. If the node is not found, NotFound will be thrown.

The loss of the underlying connection (e.g. the TCP connection) results in TransportFailure being thrown. If automatic reconnect is enabled, this will be caught be the library which will then try to reconnect. If reconnection - as configured by the connection options - fails, then TransportFailure will be thrown. This can occur on any call to the messaging API.

Sending a message may also result in an exception (e.g. TargetCapacityExceeded if a queue to which the message is delivered cannot enqueue it due to lack of capacity). For asynchronous send the exception may not be thrown on the send invocation that actually triggers it, but on a subsequent method call on the API.

Certain exceptions may render the session invalid; once these occur, subsequent calls on the session will throw the same class of exception. This is not an intrinsic property of the class of exception, but is a result of the current mapping of the API to the underlying AMQP 0-10 protocol. You can test whether the session is valid at any time using the hasError() and/or checkError() methods on Session.

Logging

The Qpidd broker and C++ clients can both use environment variables to enable logging. Use QPID_LOG_ENABLE to set the level of logging you are interested in (trace, debug, info, notice, warning, error, or critical):

 export QPID_LOG_ENABLE="warning+"
 

Use QPID_LOG_OUTPUT to determine where logging output should be sent. This is either a file name or the special values stderr, stdout, or syslog:

 export QPID_LOG_TO_FILE="/tmp/myclient.out"
 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00252.html0000664000076400007640000001522711752725720017317 0ustar00jrossjross00000000000000 qpid::sys::PosixIOHandle Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::PosixIOHandle Class Reference

#include <qpid/sys/posix/PrivatePosix.h>

List of all members.

Public Member Functions

 PosixIOHandle (int fd)

Protected Attributes

IOHandlePrivate *const impl

Constructor & Destructor Documentation

qpid::sys::PosixIOHandle::PosixIOHandle ( int  fd) [inline]

Definition at line 59 of file PrivatePosix.h.


Member Data Documentation

IOHandlePrivate* const qpid::sys::IOHandle::impl [protected, inherited]

Definition at line 41 of file IOHandle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00469.html0000664000076400007640000001157411752725717017340 0ustar00jrossjross00000000000000 qpid/client/FutureResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FutureResult.h File Reference
#include <string>
#include "qpid/client/ClientImportExport.h"
#include "qpid/framing/amqp_framing.h"
#include "qpid/client/FutureCompletion.h"

Go to the source code of this file.

Classes

class  qpid::client::FutureResult

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x74.html0000664000076400007640000003732011752725720023604 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- t -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00614.html0000664000076400007640000002044211752725717017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::SchemaId Member List
This is the complete list of members for qmf::SchemaId, including all inherited members.
getHash() const qmf::SchemaId
getName() const qmf::SchemaId
getPackageName() const qmf::SchemaId
getType() const qmf::SchemaId
Handle()qmf::Handle< SchemaIdImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< SchemaIdImpl > [protected]
Impl typedefqmf::Handle< SchemaIdImpl > [protected]
implqmf::Handle< SchemaIdImpl > [protected]
isNull() const qmf::Handle< SchemaIdImpl > [inline]
isValid() const qmf::Handle< SchemaIdImpl > [inline]
operator bool() const qmf::Handle< SchemaIdImpl > [inline]
operator!() const qmf::Handle< SchemaIdImpl > [inline]
operator=(const SchemaId &)qmf::SchemaId
Handle< SchemaIdImpl >::operator=(const Handle &)qmf::Handle< SchemaIdImpl > [protected]
SchemaId(SchemaIdImpl *impl=0)qmf::SchemaId
SchemaId(const SchemaId &)qmf::SchemaId
SchemaId(int, const std::string &, const std::string &)qmf::SchemaId
setHash(const qpid::types::Uuid &)qmf::SchemaId
swap(Handle< T > &h)qmf::Handle< SchemaIdImpl > [inline]
~SchemaId()qmf::SchemaId

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00813.html0000664000076400007640000002632211752725720017320 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::StreamProperties Member List
This is the complete list of members for qpid::framing::StreamProperties, including all inherited members.
bodySize() const qpid::framing::StreamProperties
clearContentEncodingFlag()qpid::framing::StreamProperties
clearContentTypeFlag()qpid::framing::StreamProperties
clearHeadersFlag()qpid::framing::StreamProperties
clearPriorityFlag()qpid::framing::StreamProperties
clearTimestampFlag()qpid::framing::StreamProperties
decode(Buffer &, uint32_t=0)qpid::framing::StreamProperties
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::StreamProperties
encode(Buffer &) const qpid::framing::StreamProperties
encodedSize() const qpid::framing::StreamProperties
encodeStructBody(Buffer &) const qpid::framing::StreamProperties
getContentEncoding() const qpid::framing::StreamProperties
getContentType() const qpid::framing::StreamProperties
getHeaders() const qpid::framing::StreamProperties
getHeaders()qpid::framing::StreamProperties
getPriority() const qpid::framing::StreamProperties
getTimestamp() const qpid::framing::StreamProperties
hasContentEncoding() const qpid::framing::StreamProperties
hasContentType() const qpid::framing::StreamProperties
hasHeaders() const qpid::framing::StreamProperties
hasPriority() const qpid::framing::StreamProperties
hasTimestamp() const qpid::framing::StreamProperties
operator<<(std::ostream &, const StreamProperties &)qpid::framing::StreamProperties [friend]
print(std::ostream &out) const qpid::framing::StreamProperties
setContentEncoding(const std::string &_contentEncoding)qpid::framing::StreamProperties
setContentType(const std::string &_contentType)qpid::framing::StreamProperties
setHeaders(const FieldTable &_headers)qpid::framing::StreamProperties
setPriority(uint8_t _priority)qpid::framing::StreamProperties
setTimestamp(uint64_t _timestamp)qpid::framing::StreamProperties
StreamProperties(const std::string &_contentType, const std::string &_contentEncoding, const FieldTable &_headers, uint8_t _priority, uint64_t _timestamp)qpid::framing::StreamProperties [inline]
StreamProperties()qpid::framing::StreamProperties [inline]
TYPEqpid::framing::StreamProperties [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00616.html0000664000076400007640000002521511752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::SchemaProperty Member List
This is the complete list of members for qmf::SchemaProperty, including all inherited members.
getAccess() const qmf::SchemaProperty
getDesc() const qmf::SchemaProperty
getDirection() const qmf::SchemaProperty
getName() const qmf::SchemaProperty
getSubtype() const qmf::SchemaProperty
getType() const qmf::SchemaProperty
getUnit() const qmf::SchemaProperty
Handle()qmf::Handle< SchemaPropertyImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< SchemaPropertyImpl > [protected]
Impl typedefqmf::Handle< SchemaPropertyImpl > [protected]
implqmf::Handle< SchemaPropertyImpl > [protected]
isIndex() const qmf::SchemaProperty
isNull() const qmf::Handle< SchemaPropertyImpl > [inline]
isOptional() const qmf::SchemaProperty
isValid() const qmf::Handle< SchemaPropertyImpl > [inline]
operator bool() const qmf::Handle< SchemaPropertyImpl > [inline]
operator!() const qmf::Handle< SchemaPropertyImpl > [inline]
operator=(const SchemaProperty &)qmf::SchemaProperty
Handle< SchemaPropertyImpl >::operator=(const Handle &)qmf::Handle< SchemaPropertyImpl > [protected]
SchemaProperty(SchemaPropertyImpl *impl=0)qmf::SchemaProperty
SchemaProperty(const SchemaProperty &)qmf::SchemaProperty
SchemaProperty(const std::string &, int, const std::string &o="")qmf::SchemaProperty
setAccess(int)qmf::SchemaProperty
setDesc(const std::string &)qmf::SchemaProperty
setDirection(int)qmf::SchemaProperty
setIndex(bool)qmf::SchemaProperty
setOptional(bool)qmf::SchemaProperty
setSubtype(const std::string &)qmf::SchemaProperty
setUnit(const std::string &)qmf::SchemaProperty
swap(Handle< T > &h)qmf::Handle< SchemaPropertyImpl > [inline]
~SchemaProperty()qmf::SchemaProperty

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00532.html0000664000076400007640000001167711752725717017333 0ustar00jrossjross00000000000000 qpid/log/Selector.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/Selector.h File Reference
#include "qpid/log/Statement.h"
#include "qpid/CommonImportExport.h"
#include <vector>

Go to the source code of this file.

Classes

class  qpid::log::Selector
 A selector identifies the set of log messages to enable. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::log

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00426_source.html0000664000076400007640000004701711752725717020712 0ustar00jrossjross00000000000000 qmf/engine/Query.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Query.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineQuery_
00002 #define _QmfEngineQuery_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <qmf/engine/ObjectId.h>
00024 #include <qmf/engine/Value.h>
00025 
00026 namespace qmf {
00027 namespace engine {
00028 
00029     class Object;
00030     struct QueryElementImpl;
00031     struct QueryImpl;
00032     struct QueryExpressionImpl;
00033     class  SchemaClassKey;
00034 
00035     enum ValueOper {
00036         O_EQ = 1,
00037         O_NE = 2,
00038         O_LT = 3,
00039         O_LE = 4,
00040         O_GT = 5,
00041         O_GE = 6,
00042         O_RE_MATCH = 7,
00043         O_RE_NOMATCH = 8,
00044         O_PRESENT = 9,
00045         O_NOT_PRESENT = 10
00046     };
00047 
00048     struct QueryOperand {
00049         virtual ~QueryOperand() {}
00050         virtual bool evaluate(const Object* object) const = 0;
00051     };
00052 
00053     struct QueryElement : public QueryOperand {
00054         QueryElement(const char* attrName, const Value* value, ValueOper oper);
00055         QueryElement(QueryElementImpl* impl);
00056         virtual ~QueryElement();
00057         bool evaluate(const Object* object) const;
00058 
00059         QueryElementImpl* impl;
00060     };
00061 
00062     enum ExprOper {
00063         E_NOT = 1,
00064         E_AND = 2,
00065         E_OR  = 3,
00066         E_XOR = 4
00067     };
00068 
00069     struct QueryExpression : public QueryOperand {
00070         QueryExpression(ExprOper oper, const QueryOperand* operand1, const QueryOperand* operand2);
00071         QueryExpression(QueryExpressionImpl* impl);
00072         virtual ~QueryExpression();
00073         bool evaluate(const Object* object) const;
00074         
00075         QueryExpressionImpl* impl;
00076     };
00077 
00078     class Query {
00079     public:
00080         Query(const char* className, const char* packageName);
00081         Query(const SchemaClassKey* key);
00082         Query(const ObjectId* oid);
00083         Query(const Query& from);
00084         ~Query();
00085 
00086         void setSelect(const QueryOperand* criterion);
00087         void setLimit(uint32_t maxResults);
00088         void setOrderBy(const char* attrName, bool decreasing);
00089 
00090         const char* getPackage() const;
00091         const char* getClass() const;
00092         const ObjectId* getObjectId() const;
00093 
00094         bool haveSelect() const;
00095         bool haveLimit() const;
00096         bool haveOrderBy() const;
00097         const QueryOperand* getSelect() const;
00098         uint32_t getLimit() const;
00099         const char* getOrderBy() const;
00100         bool getDecreasing() const;
00101 
00102     private:
00103         friend struct QueryImpl;
00104         friend class BrokerProxyImpl;
00105         Query(QueryImpl* impl);
00106         QueryImpl* impl;
00107     };
00108 }
00109 }
00110 
00111 #endif
00112 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00551.html0000664000076400007640000001222111752725717017316 0ustar00jrossjross00000000000000 qpid/sys/posix/Condition.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/Condition.h File Reference
#include "qpid/sys/posix/PrivatePosix.h"
#include "qpid/sys/Mutex.h"
#include "qpid/sys/Time.h"
#include <time.h>
#include <sys/errno.h>
#include <boost/noncopyable.hpp>

Go to the source code of this file.

Classes

class  qpid::sys::Condition
 A condition variable for thread synchronization. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x7e.html0000664000076400007640000004436411752725717021373 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- ~ -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00107.html0000664000076400007640000003002711752725717017317 0ustar00jrossjross00000000000000 qpid::ErrnoException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::ErrnoException Struct Reference

Exception that includes an errno message. More...

#include <qpid/Exception.h>

List of all members.

Public Member Functions

 ErrnoException (const std::string &msg, int err)
 ErrnoException (const std::string &msg)
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Detailed Description

Exception that includes an errno message.


Constructor & Destructor Documentation

qpid::ErrnoException::ErrnoException ( const std::string msg,
int  err 
) [inline]

Definition at line 55 of file Exception.h.

qpid::ErrnoException::ErrnoException ( const std::string msg) [inline]

Definition at line 56 of file Exception.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00886.html0000664000076400007640000002102311752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::RWlock Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00460_source.html0000664000076400007640000001655311752725717020711 0ustar00jrossjross00000000000000 qpid/client/ClientImportExport.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/ClientImportExport.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_IMPORT_EXPORT_H
00002 #define QPID_CLIENT_IMPORT_EXPORT_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include "qpid/ImportExport.h"
00024 
00025 #if defined(CLIENT_EXPORT) || defined (qpidclient_EXPORTS)
00026 #  define QPID_CLIENT_EXTERN QPID_EXPORT
00027 #  define QPID_CLIENT_CLASS_EXTERN QPID_CLASS_EXPORT
00028 #  define QPID_CLIENT_INLINE_EXTERN QPID_INLINE_EXPORT
00029 #else
00030 #  define QPID_CLIENT_EXTERN QPID_IMPORT
00031 #  define QPID_CLIENT_CLASS_EXTERN QPID_CLASS_IMPORT
00032 #  define QPID_CLIENT_INLINE_EXTERN QPID_INLINE_IMPORT
00033 #endif
00034 
00035 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00521_source.html0000664000076400007640000002246011752725717020701 0ustar00jrossjross00000000000000 qpid/framing/StructHelper.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/StructHelper.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _StructHelper_
00022 #define _StructHelper_
00023 
00024 #include "qpid/Exception.h"
00025 #include "qpid/CommonImportExport.h"
00026 #include "qpid/framing/Buffer.h"
00027 
00028 #include <stdlib.h> // For alloca
00029 
00030 namespace qpid {
00031 namespace framing {
00032 
00033 class QPID_COMMON_CLASS_EXTERN StructHelper
00034 {
00035 public:
00036 
00037     template <class T> void encode(const T t, std::string& data) {
00038         uint32_t size = t.bodySize() + 2/*type*/;
00039         data.resize(size);
00040         Buffer wbuffer(const_cast<char*>(data.data()), size);
00041         wbuffer.putShort(T::TYPE);
00042         t.encodeStructBody(wbuffer);
00043     }
00044 
00045     template <class T> void decode(T& t, const std::string& data) {
00046         Buffer rbuffer(const_cast<char*>(data.data()), data.length());
00047         uint16_t type = rbuffer.getShort();
00048         if (type == T::TYPE) {
00049             t.decodeStructBody(rbuffer);
00050         } else {
00051             throw Exception("Type code does not match");
00052         }
00053     }
00054 };
00055 
00056 }}
00057 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00522_source.html0000664000076400007640000004570011752725717020704 0ustar00jrossjross00000000000000 qpid/framing/TypeCode.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/TypeCode.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_TYPECODE_H
00002 #define QPID_FRAMING_TYPECODE_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include <iosfwd>
00031 #include "qpid/sys/IntegerTypes.h"
00032 
00033 namespace qpid {
00034 namespace framing {
00035 
00036 enum TypeCode {
00037     TYPE_CODE_BIN8 = 0x00,
00038     TYPE_CODE_INT8 = 0x01,
00039     TYPE_CODE_UINT8 = 0x02,
00040     TYPE_CODE_CHAR = 0x04,
00041     TYPE_CODE_BOOLEAN = 0x08,
00042     TYPE_CODE_BIN16 = 0x10,
00043     TYPE_CODE_INT16 = 0x11,
00044     TYPE_CODE_UINT16 = 0x12,
00045     TYPE_CODE_BIN32 = 0x20,
00046     TYPE_CODE_INT32 = 0x21,
00047     TYPE_CODE_UINT32 = 0x22,
00048     TYPE_CODE_FLOAT = 0x23,
00049     TYPE_CODE_CHAR_UTF32 = 0x27,
00050     TYPE_CODE_BIN64 = 0x30,
00051     TYPE_CODE_INT64 = 0x31,
00052     TYPE_CODE_UINT64 = 0x32,
00053     TYPE_CODE_DOUBLE = 0x33,
00054     TYPE_CODE_DATETIME = 0x38,
00055     TYPE_CODE_BIN128 = 0x40,
00056     TYPE_CODE_UUID = 0x48,
00057     TYPE_CODE_BIN256 = 0x50,
00058     TYPE_CODE_BIN512 = 0x60,
00059     TYPE_CODE_BIN1024 = 0x70,
00060     TYPE_CODE_VBIN8 = 0x80,
00061     TYPE_CODE_STR8_LATIN = 0x84,
00062     TYPE_CODE_STR8 = 0x85,
00063     TYPE_CODE_STR8_UTF16 = 0x86,
00064     TYPE_CODE_VBIN16 = 0x90,
00065     TYPE_CODE_STR16_LATIN = 0x94,
00066     TYPE_CODE_STR16 = 0x95,
00067     TYPE_CODE_STR16_UTF16 = 0x96,
00068     TYPE_CODE_VBIN32 = 0xa0,
00069     TYPE_CODE_MAP = 0xa8,
00070     TYPE_CODE_LIST = 0xa9,
00071     TYPE_CODE_ARRAY = 0xaa,
00072     TYPE_CODE_STRUCT32 = 0xab,
00073     TYPE_CODE_BIN40 = 0xc0,
00074     TYPE_CODE_DEC32 = 0xc8,
00075     TYPE_CODE_BIN72 = 0xd0,
00076     TYPE_CODE_DEC64 = 0xd8,
00077     TYPE_CODE_VOID = 0xf0,
00078     TYPE_CODE_BIT = 0xf1
00079 };
00080 
00082 bool isTypeCode(uint8_t t);
00083 
00085 TypeCode typeCode(uint8_t);
00086 
00088 const char* typeName(TypeCode t);
00089 
00090 std::ostream& operator<<(std::ostream&, TypeCode);
00091 
00092 
00093 }} // namespace qpid::framing
00094 
00095 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00899.html0000664000076400007640000000765011752725720017341 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::allocator Member List
This is the complete list of members for std::allocator, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00434.html0000664000076400007640000001734311752725717017330 0ustar00jrossjross00000000000000 qpid/console/Value.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Value.h File Reference
#include "qpid/Exception.h"
#include "qpid/framing/Uuid.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/console/ObjectId.h"
#include <boost/shared_ptr.hpp>

Go to the source code of this file.

Classes

class  qpid::console::Value
class  qpid::console::NullValue
class  qpid::console::RefValue
class  qpid::console::UintValue
class  qpid::console::IntValue
class  qpid::console::Uint64Value
class  qpid::console::Int64Value
class  qpid::console::StringValue
class  qpid::console::BoolValue
class  qpid::console::FloatValue
class  qpid::console::DoubleValue
class  qpid::console::UuidValue
class  qpid::console::MapValue
class  qpid::console::ValueFactory

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  qpid::console

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00019.html0000664000076400007640000042140411752725720017316 0ustar00jrossjross00000000000000 qpid::client::no_keyword::AsyncSession_0_10 Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::no_keyword::AsyncSession_0_10 Class Reference

AMQP 0-10 asynchronous session API. More...

#include <qpid/client/no_keyword/AsyncSession_0_10.h>

List of all members.

Public Member Functions

 AsyncSession_0_10 ()
QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10 (const SessionBase_0_10 &other)
QPID_CLIENT_INLINE_EXTERN
AsyncSession_0_10
operator= (const SessionBase_0_10 &other)
Completion executionSync (bool sync=false)
 This command is complete when all prior commands are completed.
Completion executionResult (const SequenceNumber &commandId=SequenceNumber(), const std::string &value=std::string(), bool sync=false)
 This command carries data resulting from the execution of a command.
Completion executionException (uint16_t errorCode=0, const SequenceNumber &commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string &description=std::string(), const FieldTable &errorInfo=FieldTable(), bool sync=false)
 This command informs a peer of an execution exception.
Completion messageTransfer (const std::string &destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message &content=Message(std::string()), bool sync=false)
 This command transfers a message between two peers.
Completion messageAccept (const SequenceSet &transfers=SequenceSet(), bool sync=false)
 Accepts the message.
Completion messageReject (const SequenceSet &transfers=SequenceSet(), uint16_t code=0, const std::string &text=std::string(), bool sync=false)
 Indicates that the message transfers are unprocessable in some way.
Completion messageRelease (const SequenceSet &transfers=SequenceSet(), bool setRedelivered=false, bool sync=false)
 Release previously transferred messages.
TypedResult
< qpid::framing::MessageAcquireResult
messageAcquire (const SequenceSet &transfers=SequenceSet(), bool sync=false)
 Acquires previously transferred messages for consumption.
TypedResult
< qpid::framing::MessageResumeResult
messageResume (const std::string &destination=std::string(), const std::string &resumeId=std::string(), bool sync=false)
 This command resumes an interrupted transfer.
Completion messageSubscribe (const std::string &queue=std::string(), const std::string &destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string &resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable &arguments=FieldTable(), bool sync=false)
 This command asks the server to start a "subscription", which is a request for messages from a specific queue.
Completion messageCancel (const std::string &destination=std::string(), bool sync=false)
 This command cancels a subscription.
Completion messageSetFlowMode (const std::string &destination=std::string(), uint8_t flowMode=0, bool sync=false)
 Sets the mode of flow control used for a given destination to either window or credit based flow control.
Completion messageFlow (const std::string &destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=false)
 This command controls the flow of message data to a given destination.
Completion messageFlush (const std::string &destination=std::string(), bool sync=false)
 Forces the sender to exhaust his credit supply.
Completion messageStop (const std::string &destination=std::string(), bool sync=false)
 On receipt of this command, a producer of messages MUST set his credit to zero for the given destination.
Completion txSelect (bool sync=false)
 This command sets the session to use standard transactions.
Completion txCommit (bool sync=false)
 This command commits all messages published and accepted in the current transaction.
Completion txRollback (bool sync=false)
 This command abandons the current transaction.
Completion dtxSelect (bool sync=false)
 This command sets the session to use distributed transactions.
TypedResult
< qpid::framing::XaResult
dtxStart (const Xid &xid=Xid(), bool join=false, bool resume=false, bool sync=false)
 This command is called when messages should be produced and consumed on behalf a transaction branch identified by xid.
TypedResult
< qpid::framing::XaResult
dtxEnd (const Xid &xid=Xid(), bool fail=false, bool suspend=false, bool sync=false)
 This command is called when the work done on behalf a transaction branch finishes or needs to be suspended.
TypedResult
< qpid::framing::XaResult
dtxCommit (const Xid &xid=Xid(), bool onePhase=false, bool sync=false)
 Commit the work done on behalf a transaction branch.
Completion dtxForget (const Xid &xid=Xid(), bool sync=false)
 This command is called to forget about a heuristically completed transaction branch.
TypedResult
< qpid::framing::DtxGetTimeoutResult
dtxGetTimeout (const Xid &xid=Xid(), bool sync=false)
 This command obtains the current transaction timeout value in seconds.
TypedResult
< qpid::framing::XaResult
dtxPrepare (const Xid &xid=Xid(), bool sync=false)
 This command prepares for commitment any message produced or consumed on behalf of xid.
TypedResult
< qpid::framing::DtxRecoverResult
dtxRecover (bool sync=false)
 This command is called to obtain a list of transaction branches that are in a prepared or heuristically completed state.
TypedResult
< qpid::framing::XaResult
dtxRollback (const Xid &xid=Xid(), bool sync=false)
 This command rolls back the work associated with xid.
Completion dtxSetTimeout (const Xid &xid=Xid(), uint32_t timeout=0, bool sync=false)
 Sets the specified transaction branch timeout value in seconds.
Completion exchangeDeclare (const std::string &exchange=std::string(), const std::string &type=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=false)
 This command creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.
Completion exchangeDelete (const std::string &exchange=std::string(), bool ifUnused=false, bool sync=false)
 This command deletes an exchange.
TypedResult
< qpid::framing::ExchangeQueryResult
exchangeQuery (const std::string &name=std::string(), bool sync=false)
 This command is used to request information on a particular exchange.
Completion exchangeBind (const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=false)
 This command binds a queue to an exchange.
Completion exchangeUnbind (const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), bool sync=false)
 This command unbinds a queue from an exchange.
TypedResult
< qpid::framing::ExchangeBoundResult
exchangeBound (const std::string &exchange=std::string(), const std::string &queue=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=false)
 This command is used to request information on the bindings to a particular exchange.
Completion queueDeclare (const std::string &queue=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=false)
 This command creates or checks a queue.
Completion queueDelete (const std::string &queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=false)
 This command deletes a queue.
Completion queuePurge (const std::string &queue=std::string(), bool sync=false)
 This command removes all messages from a queue.
TypedResult
< qpid::framing::QueueQueryResult
queueQuery (const std::string &queue=std::string(), bool sync=false)
 This command requests information about a queue.
SessionId getId () const
 Get the session ID.
void close ()
 Close the session.
void sync ()
 Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.
uint32_t timeout (uint32_t seconds)
 Set the timeout for this session.
void suspend ()
 Suspend the session - detach it from its connection.
void resume (Connection)
 Resume a suspended session with a new connection.
uint16_t getChannel () const
 Get the channel associated with this session.
void flush ()
void markCompleted (const framing::SequenceSet &ids, bool notifyPeer)
void markCompleted (const framing::SequenceNumber &id, bool cumulative, bool notifyPeer)
void sendCompletion ()
bool isValid () const
Connection getConnection ()

Protected Attributes

boost::shared_ptr< SessionImpl > impl

Detailed Description

AMQP 0-10 asynchronous session API.

A session is a named interaction between two peers. Session names are chosen by the upper layers and may be used indefinitely. The model layer may associate long-lived or durable state with a given session name. The session layer provides transport of commands associated with this interaction.


Constructor & Destructor Documentation

qpid::client::no_keyword::AsyncSession_0_10::AsyncSession_0_10 ( )
QPID_CLIENT_INLINE_EXTERN qpid::client::no_keyword::AsyncSession_0_10::AsyncSession_0_10 ( const SessionBase_0_10 other)

Member Function Documentation

void qpid::client::SessionBase_0_10::close ( ) [inherited]

Close the session.

A session is automatically closed when all handles to it are destroyed.

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxCommit ( const Xid &  xid = Xid(),
bool  onePhase = false,
bool  sync = false 
)

Commit the work done on behalf a transaction branch.

This command commits the work associated with xid. Any produced messages are made available and any consumed messages are discarded.

Parameters:
xidSpecifies the xid of the transaction branch to be committed.
onePhaseUsed to indicate whether one-phase or two-phase commit is used.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxEnd ( const Xid &  xid = Xid(),
bool  fail = false,
bool  suspend = false,
bool  sync = false 
)

This command is called when the work done on behalf a transaction branch finishes or needs to be suspended.

Parameters:
xidSpecifies the xid of the transaction branch to be ended.
failIf set, indicates that this portion of work has failed; otherwise this portion of work has completed successfully.
suspendIndicates that the transaction branch is temporarily suspended in an incomplete state.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::dtxForget ( const Xid &  xid = Xid(),
bool  sync = false 
)

This command is called to forget about a heuristically completed transaction branch.

Parameters:
xidSpecifies the xid of the transaction branch to be forgotten.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::DtxGetTimeoutResult> qpid::client::no_keyword::AsyncSession_0_10::dtxGetTimeout ( const Xid &  xid = Xid(),
bool  sync = false 
)

This command obtains the current transaction timeout value in seconds.

If set-timeout was not used prior to invoking this command, the return value is the default timeout; otherwise, the value used in the previous set-timeout call is returned.

Parameters:
xidSpecifies the xid of the transaction branch for getting the timeout.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxPrepare ( const Xid &  xid = Xid(),
bool  sync = false 
)

This command prepares for commitment any message produced or consumed on behalf of xid.

Parameters:
xidSpecifies the xid of the transaction branch that can be prepared.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::DtxRecoverResult> qpid::client::no_keyword::AsyncSession_0_10::dtxRecover ( bool  sync = false)

This command is called to obtain a list of transaction branches that are in a prepared or heuristically completed state.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxRollback ( const Xid &  xid = Xid(),
bool  sync = false 
)

This command rolls back the work associated with xid.

Any produced messages are discarded and any consumed messages are re-enqueued.

Parameters:
xidSpecifies the xid of the transaction branch that can be rolled back.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::dtxSelect ( bool  sync = false)

This command sets the session to use distributed transactions.

The client must use this command at least once on a session before using XA demarcation operations.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::dtxSetTimeout ( const Xid &  xid = Xid(),
uint32_t  timeout = 0,
bool  sync = false 
)

Sets the specified transaction branch timeout value in seconds.

Parameters:
xidSpecifies the xid of the transaction branch for setting the timeout.
timeoutThe transaction timeout value in seconds.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxStart ( const Xid &  xid = Xid(),
bool  join = false,
bool  resume = false,
bool  sync = false 
)

This command is called when messages should be produced and consumed on behalf a transaction branch identified by xid.

Parameters:
xidSpecifies the xid of the transaction branch to be started.
joinIndicate whether this is joining an already associated xid. Indicate that the start applies to joining a transaction previously seen.
resumeIndicate that the start applies to resuming a suspended transaction branch specified.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::exchangeBind ( const std::string queue = std::string(),
const std::string exchange = std::string(),
const std::string bindingKey = std::string(),
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
)

This command binds a queue to an exchange.

Until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a direct exchange and subscription queues are bound to a topic exchange.

Parameters:
queueSpecifies the name of the queue to bind.
exchange
bindingKeyThe binding-key uniquely identifies a binding between a given (exchange, queue) pair. Depending on the exchange configuration, the binding key may be matched against the message routing key in order to make routing decisions. The match algorithm depends on the exchange type. Some exchange types may ignore the binding key when making routing decisions. Refer to the specific exchange type documentation. The meaning of an empty binding key depends on the exchange implementation.
argumentsA set of arguments for the binding. The syntax and semantics of these arguments depends on the exchange class.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::ExchangeBoundResult> qpid::client::no_keyword::AsyncSession_0_10::exchangeBound ( const std::string exchange = std::string(),
const std::string queue = std::string(),
const std::string bindingKey = std::string(),
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
)

This command is used to request information on the bindings to a particular exchange.

Parameters:
exchangeThe name of the exchange for which binding information is being requested. If not specified explicitly the default exchange is implied.
queueIf populated then determine whether the given queue is bound to the exchange.
bindingKeyIf populated defines the binding-key of the binding of interest, if not populated the request will ignore the binding-key on bindings when searching for a match.
argumentsIf populated defines the arguments of the binding of interest if not populated the request will ignore the arguments on bindings when searching for a match
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::exchangeDeclare ( const std::string exchange = std::string(),
const std::string type = std::string(),
const std::string alternateExchange = std::string(),
bool  passive = false,
bool  durable = false,
bool  autoDelete = false,
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
)

This command creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.

Parameters:
exchange
typeEach exchange belongs to one of a set of exchange types implemented by the server. The exchange types define the functionality of the exchange - i.e. how messages are routed through it. It is not valid or meaningful to attempt to change the type of an existing exchange.
alternateExchangeIn the event that a message cannot be routed, this is the name of the exchange to which the message will be sent. Messages transferred using message.transfer will be routed to the alternate-exchange only if they are sent with the "none" accept-mode, and the discard-unroutable delivery property is set to false, and there is no queue to route to for the given message according to the bindings on this exchange.
passiveIf set, the server will not create the exchange. The client can use this to check whether an exchange exists without modifying the server state.
durableIf set when creating a new exchange, the exchange will be marked as durable. Durable exchanges remain active when a server restarts. Non-durable exchanges (transient exchanges) are purged if/when a server restarts.
autoDeleteIf set, the exchange is deleted automatically when there remain no bindings between the exchange and any queue. Such an exchange will not be automatically deleted until at least one binding has been made to prevent the immediate deletion of the exchange upon creation.
argumentsA set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored if passive is 1.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::exchangeDelete ( const std::string exchange = std::string(),
bool  ifUnused = false,
bool  sync = false 
)

This command deletes an exchange.

When an exchange is deleted all queue bindings on the exchange are cancelled.

Parameters:
exchange
ifUnusedIf set, the server will only delete the exchange if it has no queue bindings. If the exchange has queue bindings the server does not delete it but raises an exception instead.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::ExchangeQueryResult> qpid::client::no_keyword::AsyncSession_0_10::exchangeQuery ( const std::string name = std::string(),
bool  sync = false 
)

This command is used to request information on a particular exchange.

Parameters:
nameThe name of the exchange for which information is requested. If not specified explicitly the default exchange is implied.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::exchangeUnbind ( const std::string queue = std::string(),
const std::string exchange = std::string(),
const std::string bindingKey = std::string(),
bool  sync = false 
)

This command unbinds a queue from an exchange.

Parameters:
queueSpecifies the name of the queue to unbind.
exchangeThe name of the exchange to unbind from.
bindingKeySpecifies the binding-key of the binding to unbind.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::executionException ( uint16_t  errorCode = 0,
const SequenceNumber &  commandId = SequenceNumber(),
uint8_t  classCode = 0,
uint8_t  commandCode = 0,
uint8_t  fieldIndex = 0,
const std::string description = std::string(),
const FieldTable &  errorInfo = FieldTable(),
bool  sync = false 
)

This command informs a peer of an execution exception.

The command-id, when given, correlates the error to a specific command.

Parameters:
errorCode
commandIdThe command-id of the command which caused the exception. If the exception was not caused by a specific command, this value is not set.
classCode
commandCode
fieldIndexThe zero based index of the exceptional field within the arguments to the exceptional command. If the exception was not caused by a specific field, this value is not set.
descriptionThe description provided is implementation defined, but MUST be in the language appropriate for the selected locale. The intention is that this description is suitable for logging or alerting output.
errorInfo
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::executionResult ( const SequenceNumber &  commandId = SequenceNumber(),
const std::string value = std::string(),
bool  sync = false 
)

This command carries data resulting from the execution of a command.

Parameters:
commandId
value
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::executionSync ( bool  sync = false)

This command is complete when all prior commands are completed.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::SessionBase_0_10::flush ( ) [inherited]
uint16_t qpid::client::SessionBase_0_10::getChannel ( ) const [inherited]

Get the channel associated with this session.

Connection qpid::client::SessionBase_0_10::getConnection ( ) [inherited]
SessionId qpid::client::SessionBase_0_10::getId ( ) const [inherited]

Get the session ID.

bool qpid::client::SessionBase_0_10::isValid ( ) const [inherited]
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceSet ids,
bool  notifyPeer 
) [inherited]
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceNumber id,
bool  cumulative,
bool  notifyPeer 
) [inherited]
Completion qpid::client::no_keyword::AsyncSession_0_10::messageAccept ( const SequenceSet &  transfers = SequenceSet(),
bool  sync = false 
)

Accepts the message.

Once a transfer is accepted, the command-id may no longer be referenced from other commands.

Parameters:
transfersIdentifies the messages previously transferred that should be accepted.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::MessageAcquireResult> qpid::client::no_keyword::AsyncSession_0_10::messageAcquire ( const SequenceSet &  transfers = SequenceSet(),
bool  sync = false 
)

Acquires previously transferred messages for consumption.

The acquired ids (if any) are sent via message.acquired.

Parameters:
transfersIndicates the messages to be acquired.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageCancel ( const std::string destination = std::string(),
bool  sync = false 
)

This command cancels a subscription.

This does not affect already delivered messages, but it does mean the server will not send any more messages for that subscription. The client may receive an arbitrary number of messages in between sending the cancel command and receiving notification that the cancel command is complete.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageFlow ( const std::string destination = std::string(),
uint8_t  unit = 0,
uint32_t  value = 0,
bool  sync = false 
)

This command controls the flow of message data to a given destination.

It is used by the recipient of messages to dynamically match the incoming rate of message flow to its processing or forwarding capacity. Upon receipt of this command, the sender must add "value" number of the specified unit to the available credit balance for the specified destination. A value of (0xFFFFFFFF) indicates an infinite amount of credit. This disables any limit for the given unit until the credit balance is zeroed with message.stop or message.flush.

Parameters:
destination
unitThe unit of value.
valueIf the value is not set then this indicates an infinite amount of credit.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageFlush ( const std::string destination = std::string(),
bool  sync = false 
)

Forces the sender to exhaust his credit supply.

The sender's credit will always be zero when this command completes. The command completes when immediately available message data has been transferred, or when the credit supply is exhausted.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageReject ( const SequenceSet &  transfers = SequenceSet(),
uint16_t  code = 0,
const std::string text = std::string(),
bool  sync = false 
)

Indicates that the message transfers are unprocessable in some way.

A server may reject a message if it is unroutable. A client may reject a message if it is invalid. A message may be rejected for other reasons as well. Once a transfer is rejected, the command-id may no longer be referenced from other commands.

Parameters:
transfersIdentifies the messages previously transferred that should be rejected.
codeCode describing the reason for rejection.
textText describing the reason for rejection.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageRelease ( const SequenceSet &  transfers = SequenceSet(),
bool  setRedelivered = false,
bool  sync = false 
)

Release previously transferred messages.

When acquired messages are released, they become available for acquisition by any subscriber. Once a transfer is released, the command-id may no longer be referenced from other commands.

Parameters:
transfersIndicates the messages to be released.
setRedeliveredBy setting set-redelivered to true, any acquired messages released to a queue with this command will be marked as redelivered on their next transfer from that queue. If this flag is not set, then an acquired message will retain its original redelivered status on the queue. Messages that are not acquired are unaffected by the value of this flag.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::MessageResumeResult> qpid::client::no_keyword::AsyncSession_0_10::messageResume ( const std::string destination = std::string(),
const std::string resumeId = std::string(),
bool  sync = false 
)

This command resumes an interrupted transfer.

The recipient should return the amount of partially transferred data associated with the given resume-id, or zero if there is no data at all. If a non-zero result is returned, the recipient should expect to receive message fragment(s) containing the remainder of the interrupted message.

Parameters:
destinationThe destination to which the remaining message fragments are transferred.
resumeIdThe name of the transfer being resumed.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageSetFlowMode ( const std::string destination = std::string(),
uint8_t  flowMode = 0,
bool  sync = false 
)

Sets the mode of flow control used for a given destination to either window or credit based flow control.

With credit based flow control, the sender of messages continually maintains its current credit balance with the recipient. The credit balance consists of two values, a message count, and a byte count. Whenever message data is sent, both counts must be decremented. If either value reaches zero, the flow of message data must stop. Additional credit is received via the message.flow command.

The sender MUST NOT send partial assemblies. This means that if there is not enough byte credit available to send a complete message, the sender must either wait or use message fragmentation (see the fragment-properties header struct) to send the first part of the message data in a complete assembly.

Window based flow control is identical to credit based flow control, however message transfer completion implicitly grants a single unit of message credit, and the size of the message in byte credits for each completed message transfer. Completion of the transfer command with session.completed is the only way credit is implicitly updated; message.accept, message.release, message.reject, tx.commit and tx.rollback have no effect on the outstanding credit balances.

Parameters:
destination
flowModeThe new flow control mode.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageStop ( const std::string destination = std::string(),
bool  sync = false 
)

On receipt of this command, a producer of messages MUST set his credit to zero for the given destination.

When notifying of completion, credit MUST be zero and no further messages will be sent until such a time as further credit is received.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageSubscribe ( const std::string queue = std::string(),
const std::string destination = std::string(),
uint8_t  acceptMode = 0,
uint8_t  acquireMode = 0,
bool  exclusive = false,
const std::string resumeId = std::string(),
uint64_t  resumeTtl = 0,
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
)

This command asks the server to start a "subscription", which is a request for messages from a specific queue.

Subscriptions last as long as the session they were created on, or until the client cancels them.

Parameters:
queueSpecifies the name of the subscribed queue.
destinationThe client specified name for the subscription. This is used as the destination for all messages transferred from this subscription. The destination is scoped to the session.
acceptModeThe accept-mode to use for messages transferred from this subscription.
acquireModeThe acquire-mode to use for messages transferred from this subscription.
exclusiveRequest an exclusive subscription. This prevents other subscribers from subscribing to the queue.
resumeIdRequests that the broker use the supplied resume-id when transferring messages for this subscription.
resumeTtlRequested duration in milliseconds for the broker use as resume-ttl when transferring messages for this subscription.
argumentsThe syntax and semantics of these arguments depends on the providers implementation.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageTransfer ( const std::string destination = std::string(),
uint8_t  acceptMode = 1,
uint8_t  acquireMode = 0,
const Message content = Message(std::string()),
bool  sync = false 
)

This command transfers a message between two peers.

When a client uses this command to publish a message to a broker, the destination identifies a specific exchange. The message will then be routed to queues as defined by the exchange configuration.

The client may request a broker to transfer messages to it, from a particular queue, by issuing a subscribe command. The subscribe command specifies the destination that the broker should use for any resulting transfers.

Parameters:
destinationSpecifies the destination to which the message is to be transferred.
acceptModeIndicates whether message.accept, session.complete, or nothing at all is required to indicate successful transfer of the message.
acquireModeIndicates whether or not the transferred message has been acquired.
contentMessage content
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10& qpid::client::no_keyword::AsyncSession_0_10::operator= ( const SessionBase_0_10 other)
Completion qpid::client::no_keyword::AsyncSession_0_10::queueDeclare ( const std::string queue = std::string(),
const std::string alternateExchange = std::string(),
bool  passive = false,
bool  durable = false,
bool  exclusive = false,
bool  autoDelete = false,
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
)

This command creates or checks a queue.

When creating a new queue the client can specify various properties that control the durability of the queue and its contents, and the level of sharing for the queue.

Parameters:
queue
alternateExchangeThe alternate-exchange field specifies how messages on this queue should be treated when they are rejected by a subscriber, or when they are orphaned by queue deletion. When present, rejected or orphaned messages MUST be routed to the alternate-exchange. In all cases the messages MUST be removed from the queue.
passiveIf set, the server will not create the queue. This field allows the client to assert the presence of a queue without modifying the server state.
durableIf set when creating a new queue, the queue will be marked as durable. Durable queues remain active when a server restarts. Non-durable queues (transient queues) are purged if/when a server restarts. Note that durable queues do not necessarily hold persistent messages, although it does not make sense to send persistent messages to a transient queue.
exclusiveExclusive queues can only be used from one session at a time. Once a session declares an exclusive queue, that queue cannot be used by any other session until the declaring session closes.
autoDeleteIf this field is set and the exclusive field is also set, then the queue MUST be deleted when the session closes.

If this field is set and the exclusive field is not set the queue is deleted when all the consumers have finished using it. Last consumer can be cancelled either explicitly or because its session is closed. If there was no consumer ever on the queue, it won't be deleted.

Parameters:
argumentsA set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored if passive is 1.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::queueDelete ( const std::string queue = std::string(),
bool  ifUnused = false,
bool  ifEmpty = false,
bool  sync = false 
)

This command deletes a queue.

When a queue is deleted any pending messages are sent to the alternate-exchange if defined, or discarded if it is not.

Parameters:
queueSpecifies the name of the queue to delete.
ifUnusedIf set, the server will only delete the queue if it has no consumers. If the queue has consumers the server does does not delete it but raises an exception instead.
ifEmptyIf set, the server will only delete the queue if it has no messages.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::queuePurge ( const std::string queue = std::string(),
bool  sync = false 
)

This command removes all messages from a queue.

It does not cancel subscribers. Purged messages are deleted without any formal "undo" mechanism.

Parameters:
queueSpecifies the name of the queue to purge.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::QueueQueryResult> qpid::client::no_keyword::AsyncSession_0_10::queueQuery ( const std::string queue = std::string(),
bool  sync = false 
)

This command requests information about a queue.

Parameters:
queue
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::SessionBase_0_10::resume ( Connection  ) [inherited]

Resume a suspended session with a new connection.

void qpid::client::SessionBase_0_10::sendCompletion ( ) [inherited]
void qpid::client::SessionBase_0_10::suspend ( ) [inherited]

Suspend the session - detach it from its connection.

void qpid::client::SessionBase_0_10::sync ( ) [inherited]

Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.

Note sync() is always synchronous, even on an AsyncSession object because that's almost always what you want. You can call AsyncSession::executionSync() directly in the unusual event that you want to do an asynchronous sync.

uint32_t qpid::client::SessionBase_0_10::timeout ( uint32_t  seconds) [inherited]

Set the timeout for this session.

Completion qpid::client::no_keyword::AsyncSession_0_10::txCommit ( bool  sync = false)

This command commits all messages published and accepted in the current transaction.

A new transaction starts immediately after a commit.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::txRollback ( bool  sync = false)

This command abandons the current transaction.

In particular the transfers from Client to Server (publishes) and accepts of transfers from Server to Client which occurred in the current transaction are discarded. A new transaction starts immediately after a rollback.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::txSelect ( bool  sync = false)

This command sets the session to use standard transactions.

The client must use this command exactly once on a session before using the Commit or Rollback commands.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN().


Member Data Documentation

boost::shared_ptr<SessionImpl> qpid::client::SessionBase_0_10::impl [protected, inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00440_source.html0000664000076400007640000001640611752725717020704 0ustar00jrossjross00000000000000 qmf/ImportExport.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/ImportExport.h
Go to the documentation of this file.
00001 #ifndef QMF_IMPORT_EXPORT_H
00002 #define QMF_IMPORT_EXPORT_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include "qpid/ImportExport.h"
00024 
00025 #if defined(QMF_EXPORT) || defined (qmf2_EXPORTS)
00026 #  define QMF_EXTERN QPID_EXPORT
00027 #  define QMF_CLASS_EXTERN QPID_CLASS_EXPORT
00028 #  define QMF_INLINE_EXTERN QPID_INLINE_EXPORT
00029 #else
00030 #  define QMF_EXTERN QPID_IMPORT
00031 #  define QMF_CLASS_EXTERN QPID_CLASS_IMPORT
00032 #  define QMF_INLINE_EXTERN QPID_INLINE_IMPORT
00033 #endif
00034 
00035 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00744.html0000664000076400007640000003766111752725720017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::DeliveryProperties Member List
This is the complete list of members for qpid::framing::DeliveryProperties, including all inherited members.
bodySize() const qpid::framing::DeliveryProperties
clearDeliveryModeFlag()qpid::framing::DeliveryProperties
clearExchangeFlag()qpid::framing::DeliveryProperties
clearExpirationFlag()qpid::framing::DeliveryProperties
clearPriorityFlag()qpid::framing::DeliveryProperties
clearResumeIdFlag()qpid::framing::DeliveryProperties
clearResumeTtlFlag()qpid::framing::DeliveryProperties
clearRoutingKeyFlag()qpid::framing::DeliveryProperties
clearTimestampFlag()qpid::framing::DeliveryProperties
clearTtlFlag()qpid::framing::DeliveryProperties
decode(Buffer &, uint32_t=0)qpid::framing::DeliveryProperties
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::DeliveryProperties
DeliveryProperties(bool _discardUnroutable, bool _immediate, bool _redelivered, uint8_t _priority, uint8_t _deliveryMode, uint64_t _ttl, uint64_t _timestamp, uint64_t _expiration, const std::string &_exchange, const std::string &_routingKey, const std::string &_resumeId, uint64_t _resumeTtl)qpid::framing::DeliveryProperties [inline]
DeliveryProperties()qpid::framing::DeliveryProperties [inline]
encode(Buffer &) const qpid::framing::DeliveryProperties
encodedSize() const qpid::framing::DeliveryProperties
encodeStructBody(Buffer &) const qpid::framing::DeliveryProperties
getDeliveryMode() const qpid::framing::DeliveryProperties
getDiscardUnroutable() const qpid::framing::DeliveryProperties
getExchange() const qpid::framing::DeliveryProperties
getExpiration() const qpid::framing::DeliveryProperties
getImmediate() const qpid::framing::DeliveryProperties
getPriority() const qpid::framing::DeliveryProperties
getRedelivered() const qpid::framing::DeliveryProperties
getResumeId() const qpid::framing::DeliveryProperties
getResumeTtl() const qpid::framing::DeliveryProperties
getRoutingKey() const qpid::framing::DeliveryProperties
getTimestamp() const qpid::framing::DeliveryProperties
getTtl() const qpid::framing::DeliveryProperties
hasDeliveryMode() const qpid::framing::DeliveryProperties
hasExchange() const qpid::framing::DeliveryProperties
hasExpiration() const qpid::framing::DeliveryProperties
hasPriority() const qpid::framing::DeliveryProperties
hasResumeId() const qpid::framing::DeliveryProperties
hasResumeTtl() const qpid::framing::DeliveryProperties
hasRoutingKey() const qpid::framing::DeliveryProperties
hasTimestamp() const qpid::framing::DeliveryProperties
hasTtl() const qpid::framing::DeliveryProperties
operator<<(std::ostream &, const DeliveryProperties &)qpid::framing::DeliveryProperties [friend]
print(std::ostream &out) const qpid::framing::DeliveryProperties
setDeliveryMode(uint8_t _deliveryMode)qpid::framing::DeliveryProperties
setDiscardUnroutable(bool _discardUnroutable)qpid::framing::DeliveryProperties
setExchange(const std::string &_exchange)qpid::framing::DeliveryProperties
setExpiration(uint64_t _expiration)qpid::framing::DeliveryProperties
setImmediate(bool _immediate)qpid::framing::DeliveryProperties
setPriority(uint8_t _priority)qpid::framing::DeliveryProperties
setRedelivered(bool _redelivered)qpid::framing::DeliveryProperties
setResumeId(const std::string &_resumeId)qpid::framing::DeliveryProperties
setResumeTtl(uint64_t _resumeTtl)qpid::framing::DeliveryProperties
setRoutingKey(const std::string &_routingKey)qpid::framing::DeliveryProperties
setTimestamp(uint64_t _timestamp)qpid::framing::DeliveryProperties
setTtl(uint64_t _ttl)qpid::framing::DeliveryProperties
TYPEqpid::framing::DeliveryProperties [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00337.html0000664000076400007640000001700311752725720017315 0ustar00jrossjross00000000000000 qpid::management::ManagementAgent::Singleton Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ManagementAgent::Singleton Class Reference

#include <qpid/agent/ManagementAgent.h>

List of all members.

Public Member Functions

QMF_AGENT_EXTERN Singleton (bool disableManagement=false)
QMF_AGENT_EXTERN ~Singleton ()

Static Public Member Functions

static QMF_AGENT_EXTERN
ManagementAgent
getInstance ()

Constructor & Destructor Documentation

QMF_AGENT_EXTERN qpid::management::ManagementAgent::Singleton::Singleton ( bool  disableManagement = false)
QMF_AGENT_EXTERN qpid::management::ManagementAgent::Singleton::~Singleton ( )

Member Function Documentation

static QMF_AGENT_EXTERN ManagementAgent* qpid::management::ManagementAgent::Singleton::getInstance ( ) [static]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x66.html0000664000076400007640000001644711752725717022347 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00508.html0000664000076400007640000001203211752725717017320 0ustar00jrossjross00000000000000 qpid/framing/FragmentProperties.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/FragmentProperties.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::FragmentProperties

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00251.html0000664000076400007640000003555111752725720017320 0ustar00jrossjross00000000000000 qpid::sys::PODMutex Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::PODMutex Struct Reference

PODMutex is a POD, can be static-initialized with PODMutex m = QPID_PODMUTEX_INITIALIZER. More...

#include <qpid/sys/posix/Mutex.h>

List of all members.

Public Types

typedef
::qpid::sys::ScopedLock
< PODMutex
ScopedLock
typedef
::qpid::sys::ScopedLock
< PODMutex
ScopedLock

Public Member Functions

void lock ()
void unlock ()
bool trylock ()
void lock ()
void unlock ()
bool trylock ()

Public Attributes

pthread_mutex_t mutex
boost::recursive_mutex mutex

Detailed Description

PODMutex is a POD, can be static-initialized with PODMutex m = QPID_PODMUTEX_INITIALIZER.

Definition at line 91 of file Mutex.h.


Member Typedef Documentation


Member Function Documentation

void qpid::sys::PODMutex::lock ( ) [inline]

Definition at line 95 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and mutex.

void qpid::sys::PODMutex::lock ( ) [inline]
bool qpid::sys::PODMutex::trylock ( ) [inline]

Definition at line 103 of file Mutex.h.

References mutex.

bool qpid::sys::PODMutex::trylock ( ) [inline]
void qpid::sys::PODMutex::unlock ( ) [inline]

Definition at line 99 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and mutex.

void qpid::sys::PODMutex::unlock ( ) [inline]

Member Data Documentation

pthread_mutex_t qpid::sys::PODMutex::mutex

Definition at line 90 of file Mutex.h.

Referenced by lock(), unlock(), and trylock().

boost::recursive_mutex qpid::sys::PODMutex::mutex

Definition at line 100 of file Mutex.h.


The documentation for this struct was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00504.html0000664000076400007640000001203511752725717017317 0ustar00jrossjross00000000000000 qpid/framing/ExchangeQueryResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/ExchangeQueryResult.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::ExchangeQueryResult

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00770.html0000664000076400007640000002133011752725720017314 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ArrayValue Member List
This is the complete list of members for qpid::framing::ArrayValue, including all inherited members.
ArrayValue(const Array &)qpid::framing::ArrayValue
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00050.html0000664000076400007640000002013211752725717017310 0ustar00jrossjross00000000000000 qpid::ClosedException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::ClosedException Struct Reference

#include <qpid/Exception.h>

List of all members.

Public Member Functions

 ClosedException (const std::string &msg=std::string())
std::string getPrefix () const
virtual const char * what () const throw ()
virtual std::string getMessage () const

Constructor & Destructor Documentation

qpid::ClosedException::ClosedException ( const std::string msg = std::string())

Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::ClosedException::getPrefix ( ) const [virtual]

Reimplemented from qpid::Exception.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00205.html0000664000076400007640000011753511752725720017322 0ustar00jrossjross00000000000000 qpid::messaging::Message Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Message Class Reference

Representation of a message. More...

#include <qpid/messaging/Message.h>

List of all members.

Public Member Functions

 Message (const std::string &bytes=std::string())
 Message (const char *, size_t)
 Message (const Message &)
 ~Message ()
Messageoperator= (const Message &)
void setReplyTo (const Address &)
const AddressgetReplyTo () const
void setSubject (const std::string &)
const std::stringgetSubject () const
void setContentType (const std::string &)
 Set the content type (i.e.
const std::stringgetContentType () const
 Returns the content type (i.e.
void setMessageId (const std::string &)
 Set an application defined identifier for the message.
const std::stringgetMessageId () const
void setUserId (const std::string &)
 Sets the user id of the message.
const std::stringgetUserId () const
void setCorrelationId (const std::string &)
 Can be used to set application specific correlation identifiers as part of a protocol for message exchange patterns.
const std::stringgetCorrelationId () const
void setPriority (uint8_t)
 Sets a priority level on the message.
uint8_t getPriority () const
void setTtl (Duration ttl)
 Set the time to live for this message in milliseconds.
Duration getTtl () const
 Get the time to live for this message in milliseconds.
void setDurable (bool durable)
 Mark the message as durable.
bool getDurable () const
bool getRedelivered () const
 The redelivered flag if set implies that the message *may* have been previously delivered and thus is a hint to the application or messaging infrastructure that if de-duplication is required this message should be examined to determine if it is a duplicate.
void setRedelivered (bool)
 Can be used to provide a hint to the application or messaging infrastructure that if de-duplication is required this message should be examined to determine if it is a duplicate.
const qpid::types::Variant::MapgetProperties () const
 In addition to a payload (i.e.
qpid::types::Variant::MapgetProperties ()
void setContent (const std::string &)
 Set the content to the data held in the string parameter.
void setContent (const char *chars, size_t count)
 Copy count bytes from the region pointed to by chars as the message content.
std::string getContent () const
 Get the content as a std::string.
const char * getContentPtr () const
 Get a const pointer to the start of the content data.
size_t getContentSize () const
 Get the size of content in bytes.
void setProperty (const std::string &, const qpid::types::Variant &)

Detailed Description

Representation of a message.


Constructor & Destructor Documentation

qpid::messaging::Message::Message ( const std::string bytes = std::string())
qpid::messaging::Message::Message ( const char *  ,
size_t   
)
qpid::messaging::Message::Message ( const Message )
qpid::messaging::Message::~Message ( )

Member Function Documentation

std::string qpid::messaging::Message::getContent ( ) const

Get the content as a std::string.

const char* qpid::messaging::Message::getContentPtr ( ) const

Get a const pointer to the start of the content data.

The memory pointed to is owned by the message. The getContentSize() method indicates how much data there is (i.e. the extent of the memory region pointed to by the return value of this method).

size_t qpid::messaging::Message::getContentSize ( ) const

Get the size of content in bytes.

const std::string& qpid::messaging::Message::getContentType ( ) const

Returns the content type (i.e.

the MIME type) for the message. This can be used to determine how to decode the message content.

const std::string& qpid::messaging::Message::getCorrelationId ( ) const
bool qpid::messaging::Message::getDurable ( ) const
const std::string& qpid::messaging::Message::getMessageId ( ) const
uint8_t qpid::messaging::Message::getPriority ( ) const
const qpid::types::Variant::Map& qpid::messaging::Message::getProperties ( ) const

In addition to a payload (i.e.

the content), messages can include annotations describing aspectf of the message. In addition to the standard annotations such as TTL and content type, application- or context- specific properties can also be defined. Each message has a map of name values for such custom properties. The value is specified as a Variant.

qpid::types::Variant::Map& qpid::messaging::Message::getProperties ( )
bool qpid::messaging::Message::getRedelivered ( ) const

The redelivered flag if set implies that the message *may* have been previously delivered and thus is a hint to the application or messaging infrastructure that if de-duplication is required this message should be examined to determine if it is a duplicate.

const Address& qpid::messaging::Message::getReplyTo ( ) const
const std::string& qpid::messaging::Message::getSubject ( ) const
Duration qpid::messaging::Message::getTtl ( ) const

Get the time to live for this message in milliseconds.

const std::string& qpid::messaging::Message::getUserId ( ) const
Message& qpid::messaging::Message::operator= ( const Message )
void qpid::messaging::Message::setContent ( const std::string )

Set the content to the data held in the string parameter.

Note: this is treated as raw bytes and need not be text. Consider setting the content-type to indicate how the data should be interpreted by recipients.

void qpid::messaging::Message::setContent ( const char *  chars,
size_t  count 
)

Copy count bytes from the region pointed to by chars as the message content.

void qpid::messaging::Message::setContentType ( const std::string )

Set the content type (i.e.

the MIME type) for the message. This should be set by the sending application and indicates to recipients of message how to interpret or decode the content.

void qpid::messaging::Message::setCorrelationId ( const std::string )

Can be used to set application specific correlation identifiers as part of a protocol for message exchange patterns.

E.g. a request-reponse pattern might require the correlation-id of the request and response to match, or might use the message-id of the request as the correlation-id on the response etc.

void qpid::messaging::Message::setDurable ( bool  durable)

Mark the message as durable.

This is a hint to the messaging infrastructure that the message should be persisted or otherwise stored such that failoures or shutdown do not cause it to be lost.

void qpid::messaging::Message::setMessageId ( const std::string )

Set an application defined identifier for the message.

At present this must be a stringfied UUID (support for less restrictive IDs is anticipated however).

void qpid::messaging::Message::setPriority ( uint8_t  )

Sets a priority level on the message.

This may be used by the messaging infrastructure to prioritise delivery of higher priority messages.

void qpid::messaging::Message::setProperty ( const std::string ,
const qpid::types::Variant  
)
void qpid::messaging::Message::setRedelivered ( bool  )

Can be used to provide a hint to the application or messaging infrastructure that if de-duplication is required this message should be examined to determine if it is a duplicate.

void qpid::messaging::Message::setReplyTo ( const Address )
void qpid::messaging::Message::setSubject ( const std::string )
void qpid::messaging::Message::setTtl ( Duration  ttl)

Set the time to live for this message in milliseconds.

This can be used by the messaging infrastructure to discard messages that are no longer of relevance.

void qpid::messaging::Message::setUserId ( const std::string )

Sets the user id of the message.

This should in general be the user-id as which the sending connection authenticated itself as the messaging infrastructure will verify this. See Connection::getAuthenticatedUsername()


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00070.html0000664000076400007640000004705111752725720017315 0ustar00jrossjross00000000000000 qpid::console::ConsoleListener Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::ConsoleListener Class Reference

Implement a subclass of ConsoleListener and subscribe it using the SessionManager to receive indications. More...

#include <qpid/console/ConsoleListener.h>

List of all members.

Public Member Functions

virtual ~ConsoleListener ()
virtual void brokerConnected (const Broker &)
 Invoked when a connection is established to a broker.
virtual void brokerDisconnected (const Broker &)
 Invoked when the connection to a broker is lost.
virtual void newPackage (const std::string &)
 Invoked when a QMF package is discovered.
virtual void newClass (const ClassKey &)
 Invoked when a new class is discovered.
virtual void newAgent (const Agent &)
 Invoked when a QMF agent is discovered.
virtual void delAgent (const Agent &)
 Invoked when a QMF agent disconects.
virtual void objectProps (Broker &, Object &)
 Invoked when an object is updated.
virtual void objectStats (Broker &, Object &)
 Invoked when an object is updated.
virtual void event (Event &)
 Invoked when an event is raised.
virtual void brokerInfo (Broker &)

Detailed Description

Implement a subclass of ConsoleListener and subscribe it using the SessionManager to receive indications.


Constructor & Destructor Documentation

virtual qpid::console::ConsoleListener::~ConsoleListener ( ) [inline, virtual]

Definition at line 42 of file ConsoleListener.h.


Member Function Documentation

virtual void qpid::console::ConsoleListener::brokerConnected ( const Broker ) [inline, virtual]

Invoked when a connection is established to a broker.

Definition at line 46 of file ConsoleListener.h.

virtual void qpid::console::ConsoleListener::brokerDisconnected ( const Broker ) [inline, virtual]

Invoked when the connection to a broker is lost.

Definition at line 50 of file ConsoleListener.h.

virtual void qpid::console::ConsoleListener::brokerInfo ( Broker ) [inline, virtual]

Definition at line 87 of file ConsoleListener.h.

virtual void qpid::console::ConsoleListener::delAgent ( const Agent ) [inline, virtual]

Invoked when a QMF agent disconects.

Definition at line 67 of file ConsoleListener.h.

virtual void qpid::console::ConsoleListener::event ( Event ) [inline, virtual]

Invoked when an event is raised.

Definition at line 79 of file ConsoleListener.h.

virtual void qpid::console::ConsoleListener::newAgent ( const Agent ) [inline, virtual]

Invoked when a QMF agent is discovered.

Definition at line 63 of file ConsoleListener.h.

virtual void qpid::console::ConsoleListener::newClass ( const ClassKey ) [inline, virtual]

Invoked when a new class is discovered.

Session.getSchema can be used to obtain details about the class.

Definition at line 59 of file ConsoleListener.h.

virtual void qpid::console::ConsoleListener::newPackage ( const std::string ) [inline, virtual]

Invoked when a QMF package is discovered.

Definition at line 54 of file ConsoleListener.h.

virtual void qpid::console::ConsoleListener::objectProps ( Broker ,
Object  
) [inline, virtual]

Invoked when an object is updated.

Definition at line 71 of file ConsoleListener.h.

virtual void qpid::console::ConsoleListener::objectStats ( Broker ,
Object  
) [inline, virtual]

Invoked when an object is updated.

Definition at line 75 of file ConsoleListener.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00534.html0000664000076400007640000004014011752725717017320 0ustar00jrossjross00000000000000 qpid/log/Statement.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/Statement.h File Reference
#include "qpid/Msg.h"
#include "qpid/CommonImportExport.h"
#include <boost/current_function.hpp>

Go to the source code of this file.

Classes

struct  qpid::log::LevelTraits
struct  qpid::log::Statement
 POD struct representing a logging statement in source code. More...
struct  qpid::log::Statement::Initializer

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::log

Defines

#define QPID_LOG_STATEMENT_INIT(level)   { 0, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, (::qpid::log::level) }
#define QPID_LOG_IF(LEVEL, TEST, MESSAGE)
 Like QPID_LOG but computes an additional boolean test expression to determine if the message should be logged.
#define QPID_LOG_TEST(LEVEL, FLAG)
 FLAG must be a boolean variable.
#define QPID_LOG(LEVEL, MESSAGE)   QPID_LOG_IF(LEVEL, true, MESSAGE);
 Macro for log statements.

Enumerations

enum  qpid::log::Level {
  qpid::log::trace, qpid::log::debug, qpid::log::info, qpid::log::notice,
  qpid::log::warning, qpid::log::error, qpid::log::critical
}
 Debugging severity levels. More...

Define Documentation

#define QPID_LOG (   LEVEL,
  MESSAGE 
)    QPID_LOG_IF(LEVEL, true, MESSAGE);

Macro for log statements.

Example of use:

 QPID_LOG(debug, "There are " << foocount << " foos in the bar.");
 QPID_LOG(error, boost::format("Dohickey %s exploded") % dohicky.name());

You can subscribe to log messages by level, by component, by filename or a combination

See also:
Configuration.
Parameters:
LEVELseverity Level for message, should be one of: debug, info, notice, warning, error, critical. NB no qpid::log:: prefix.
MESSAGEany object with an operator<<, or a sequence like of ostreamable objects separated by <<.

Definition at line 131 of file Statement.h.

#define QPID_LOG_IF (   LEVEL,
  TEST,
  MESSAGE 
)
Value:
do {                                                        \
        using ::qpid::log::Statement;                           \
        static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \
        static Statement::Initializer init_(stmt_);             \
        if (stmt_.enabled && (TEST))                            \
            stmt_.log(::qpid::Msg() << MESSAGE);                \
    } while(0)

Like QPID_LOG but computes an additional boolean test expression to determine if the message should be logged.

Evaluation of both the test and message expressions occurs only if the requested log level is enabled.

Parameters:
LEVELseverity Level for message, should be one of: debug, info, notice, warning, error, critical. NB no qpid::log:: prefix.
TESTmessage is logged only if expression TEST evaluates to true.
MESSAGEany object with an operator<<, or a sequence like of ostreamable objects separated by <<.

Definition at line 89 of file Statement.h.

#define QPID_LOG_STATEMENT_INIT (   level)    { 0, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, (::qpid::log::level) }

Definition at line 75 of file Statement.h.

#define QPID_LOG_TEST (   LEVEL,
  FLAG 
)
Value:
do {                                                        \
        using ::qpid::log::Statement;                           \
        static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \
        static Statement::Initializer init_(stmt_);             \
        FLAG = stmt_.enabled;                                   \
    } while(0)

FLAG must be a boolean variable.

Assigns FLAG to true iff logging is enabled for LEVEL in the calling context. Use when extra support code is needed to generate log messages, to ensure that it is only run if the logging level is enabled. e.g. bool logWarning; QPID_LOG_TEST(LEVEL, logWarning); if (logWarning) { do stuff needed for warning log messages }

Definition at line 108 of file Statement.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers.html0000664000076400007640000002243111752725720022010 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- a -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00564_source.html0000664000076400007640000001425011752725717020706 0ustar00jrossjross00000000000000 qpid/sys/windows/Time.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/Time.h
Go to the documentation of this file.
00001 #ifndef QPID_SYS_WINDOWS_TIME_H
00002 #define QPID_SYS_WINDOWS_TIME_H
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include <boost/date_time/posix_time/posix_time_types.hpp>
00023 
00024 namespace qpid {
00025 namespace sys {
00026 
00032 typedef boost::posix_time::ptime TimePrivate;
00033 
00034 }} // namespace qpid::sys
00035 
00036 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00528_source.html0000664000076400007640000002464411752725717020716 0ustar00jrossjross00000000000000 qpid/InlineVector.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/InlineVector.h
Go to the documentation of this file.
00001 #ifndef QPID_INLINEVECTOR_H
00002 #define QPID_INLINEVECTOR_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/InlineAllocator.h"
00026 #include <vector>
00027 
00028 namespace qpid {
00029 
00040 template <class T, size_t Max, class Alloc=std::allocator<T> >
00041 class InlineVector : public std::vector<T, InlineAllocator<Alloc, Max> >
00042 {
00043     typedef std::vector<T, InlineAllocator<Alloc, Max> > Base;
00044   public:
00045     typedef typename Base::allocator_type allocator_type;
00046     typedef typename Base::value_type value_type;
00047     typedef typename Base::size_type size_type;
00048 
00049     explicit InlineVector(const allocator_type& a=allocator_type()) : Base(a) {
00050         this->reserve(Max);
00051     }
00052 
00053     explicit InlineVector(size_type n, const value_type& x = value_type(),
00054                           const allocator_type& a=allocator_type()) : Base(a)
00055     {
00056         this->reserve(std::max(n, Max));
00057         this->insert(this->end(), n, x);
00058     }
00059 
00060     InlineVector(const InlineVector& x) : Base() {
00061         this->reserve(std::max(x.size(), Max));
00062         *this = x;
00063     }
00064 };
00065 
00066 } // namespace qpid
00067 
00068 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00563_source.html0000664000076400007640000005330311752725717020707 0ustar00jrossjross00000000000000 qpid/sys/Time.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Time.h
Go to the documentation of this file.
00001 #ifndef _sys_Time_h
00002 #define _sys_Time_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/sys/IntegerTypes.h"
00026 /*
00027  * The platform defines its notion of time as a TimePrivate type. The
00028  * platform's implementation knows how to handle this type.
00029  */
00030 #if defined (_WIN32)
00031 #  include "windows/Time.h"
00032 #else
00033 #  include "posix/Time.h"
00034 #endif
00035 
00036 #include "qpid/CommonImportExport.h"
00037 
00038 #include <limits>
00039 #include <iosfwd>
00040 
00041 namespace qpid {
00042 namespace sys {
00043 
00044 class Duration;
00045 
00080 class AbsTime {
00081     friend class Duration;
00082     friend class Condition;
00083 
00084     TimePrivate timepoint;
00085 
00086 public:
00087 
00088     inline AbsTime() : timepoint() {}
00089     QPID_COMMON_EXTERN AbsTime(const AbsTime& time0, const Duration& duration);
00090     // Default assignment operation fine
00091     // Default copy constructor fine
00092 
00093     QPID_COMMON_EXTERN static AbsTime now();
00094     QPID_COMMON_EXTERN static AbsTime FarFuture();
00095     QPID_COMMON_EXTERN static AbsTime Epoch();
00096 
00097     bool operator==(const AbsTime& t) const { return t.timepoint == timepoint; }
00098 
00099     friend bool operator<(const AbsTime& a, const AbsTime& b);
00100     friend bool operator>(const AbsTime& a, const AbsTime& b);
00101     QPID_COMMON_EXTERN friend std::ostream& operator << (std::ostream&, const AbsTime&);
00102 };
00103 
00104 QPID_COMMON_EXTERN std::ostream& operator << (std::ostream&, const AbsTime&);
00105 
00115 class Duration {
00116     static int64_t max() { return std::numeric_limits<int64_t>::max(); }
00117     int64_t nanosecs;
00118 
00119     friend class AbsTime;
00120 
00121 public:
00122     QPID_COMMON_INLINE_EXTERN inline Duration(int64_t time0 = 0);
00123     QPID_COMMON_EXTERN explicit Duration(const AbsTime& start, const AbsTime& finish);
00124     inline operator int64_t() const;
00125 };
00126 
00127 std::ostream& operator << (std::ostream&, const Duration&);
00128 
00129 inline AbsTime now() { return AbsTime::now(); }
00130 
00131 inline bool operator<(const AbsTime& a, const AbsTime& b)
00132 { return a.timepoint < b.timepoint; }
00133 inline bool operator>(const AbsTime& a, const AbsTime& b)
00134 { return a.timepoint > b.timepoint; }
00135 
00136 Duration::Duration(int64_t time0) :
00137     nanosecs(time0)
00138 {}
00139 
00140 Duration::operator int64_t() const
00141 { return nanosecs; }
00142 
00144 const Duration TIME_SEC  = 1000*1000*1000;
00146 const Duration TIME_MSEC = 1000*1000;
00148 const Duration TIME_USEC = 1000;
00150 const Duration TIME_NSEC = 1;
00151 
00153 const Duration TIME_INFINITE = std::numeric_limits<int64_t>::max();
00154 
00156 const AbsTime EPOCH = AbsTime::Epoch();
00157 
00159 const AbsTime FAR_FUTURE = AbsTime::FarFuture();
00160 
00162 QPID_COMMON_EXTERN void sleep(int secs);
00163 
00165 QPID_COMMON_EXTERN void usleep(uint64_t usecs);
00166 
00168 void outputFormattedNow(std::ostream&);
00169 
00171 void outputHiresNow(std::ostream&);
00172 
00173 }}
00174 
00175 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00890.html0000664000076400007640000001165011752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::NullIOHandle Member List
This is the complete list of members for qpid::sys::NullIOHandle, including all inherited members.
implqpid::sys::IOHandle [protected]
IOHandle(IOHandlePrivate *)qpid::sys::IOHandle [protected]
NullIOHandle()qpid::sys::NullIOHandle [inline]
~IOHandle()qpid::sys::IOHandle [protected, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00877.html0000664000076400007640000001127611752725720017334 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::IOHandle Member List
This is the complete list of members for qpid::sys::IOHandle, including all inherited members.
implqpid::sys::IOHandle [protected]
IOHandle(IOHandlePrivate *)qpid::sys::IOHandle [protected]
~IOHandle()qpid::sys::IOHandle [protected, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00702.html0000664000076400007640000002024711752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::TypedResult Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00317.html0000664000076400007640000001445611752725720017324 0ustar00jrossjross00000000000000 qpid::sys::ScopedWlock Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ScopedWlock Class Reference

#include <qpid/sys/Mutex.h>

List of all members.

Public Member Functions

 ScopedWlock (L &l)
 ~ScopedWlock ()

Constructor & Destructor Documentation

qpid::sys::ScopedWlock::ScopedWlock ( L &  l) [inline]

Definition at line 63 of file Mutex.h.

qpid::sys::ScopedWlock::~ScopedWlock ( ) [inline]

Definition at line 64 of file Mutex.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00853.html0000664000076400007640000001446511752725720017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::NotFound Member List
This is the complete list of members for qpid::messaging::NotFound, including all inherited members.
AddressError(const std::string &)qpid::messaging::AddressError
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
LinkError(const std::string &)qpid::messaging::LinkError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
NotFound(const std::string &msg)qpid::messaging::NotFound
ResolutionError(const std::string &msg)qpid::messaging::ResolutionError
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00522.html0000664000076400007640000003131411752725717017320 0ustar00jrossjross00000000000000 qpid/framing/TypeCode.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/TypeCode.h File Reference
#include <iosfwd>
#include "qpid/sys/IntegerTypes.h"

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


Enumerations

enum  qpid::framing::TypeCode {
  qpid::framing::TYPE_CODE_BIN8 = 0x00, qpid::framing::TYPE_CODE_INT8 = 0x01, qpid::framing::TYPE_CODE_UINT8 = 0x02, qpid::framing::TYPE_CODE_CHAR = 0x04,
  qpid::framing::TYPE_CODE_BOOLEAN = 0x08, qpid::framing::TYPE_CODE_BIN16 = 0x10, qpid::framing::TYPE_CODE_INT16 = 0x11, qpid::framing::TYPE_CODE_UINT16 = 0x12,
  qpid::framing::TYPE_CODE_BIN32 = 0x20, qpid::framing::TYPE_CODE_INT32 = 0x21, qpid::framing::TYPE_CODE_UINT32 = 0x22, qpid::framing::TYPE_CODE_FLOAT = 0x23,
  qpid::framing::TYPE_CODE_CHAR_UTF32 = 0x27, qpid::framing::TYPE_CODE_BIN64 = 0x30, qpid::framing::TYPE_CODE_INT64 = 0x31, qpid::framing::TYPE_CODE_UINT64 = 0x32,
  qpid::framing::TYPE_CODE_DOUBLE = 0x33, qpid::framing::TYPE_CODE_DATETIME = 0x38, qpid::framing::TYPE_CODE_BIN128 = 0x40, qpid::framing::TYPE_CODE_UUID = 0x48,
  qpid::framing::TYPE_CODE_BIN256 = 0x50, qpid::framing::TYPE_CODE_BIN512 = 0x60, qpid::framing::TYPE_CODE_BIN1024 = 0x70, qpid::framing::TYPE_CODE_VBIN8 = 0x80,
  qpid::framing::TYPE_CODE_STR8_LATIN = 0x84, qpid::framing::TYPE_CODE_STR8 = 0x85, qpid::framing::TYPE_CODE_STR8_UTF16 = 0x86, qpid::framing::TYPE_CODE_VBIN16 = 0x90,
  qpid::framing::TYPE_CODE_STR16_LATIN = 0x94, qpid::framing::TYPE_CODE_STR16 = 0x95, qpid::framing::TYPE_CODE_STR16_UTF16 = 0x96, qpid::framing::TYPE_CODE_VBIN32 = 0xa0,
  qpid::framing::TYPE_CODE_MAP = 0xa8, qpid::framing::TYPE_CODE_LIST = 0xa9, qpid::framing::TYPE_CODE_ARRAY = 0xaa, qpid::framing::TYPE_CODE_STRUCT32 = 0xab,
  qpid::framing::TYPE_CODE_BIN40 = 0xc0, qpid::framing::TYPE_CODE_DEC32 = 0xc8, qpid::framing::TYPE_CODE_BIN72 = 0xd0, qpid::framing::TYPE_CODE_DEC64 = 0xd8,
  qpid::framing::TYPE_CODE_VOID = 0xf0, qpid::framing::TYPE_CODE_BIT = 0xf1
}

Functions

bool qpid::framing::isTypeCode (uint8_t t)
 True if t is a valid TypeCode value.
TypeCode qpid::framing::typeCode (uint8_t)
 Throw exception if not a valid TypeCode.
const char * qpid::framing::typeName (TypeCode t)
std::ostreamqpid::framing::operator<< (std::ostream &, TypeCode)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00018.html0000664000076400007640000002004311752725720017307 0ustar00jrossjross00000000000000 qpid::messaging::AssertionFailed Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::AssertionFailed Struct Reference

Thrown when creating a sender or receiver for an address for which some asserted property of the node is not matched. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 AssertionFailed (const std::string &msg)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown when creating a sender or receiver for an address for which some asserted property of the node is not matched.


Constructor & Destructor Documentation

qpid::messaging::AssertionFailed::AssertionFailed ( const std::string msg)

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00815.html0000664000076400007640000001530111752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Uuid Member List
This is the complete list of members for qpid::framing::Uuid, including all inherited members.
assign(const uint8_t *data)qpid::framing::Uuid
clear()qpid::framing::Uuid
decode(framing::Buffer &buf)qpid::framing::Uuid
encode(framing::Buffer &buf) const qpid::framing::Uuid
encodedSize() const qpid::framing::Uuid [inline]
generate()qpid::framing::Uuid
isNull() const qpid::framing::Uuid
operator bool() const qpid::framing::Uuid [inline]
operator!() const qpid::framing::Uuid [inline]
serialize(S &s)qpid::framing::Uuid [inline]
str() const qpid::framing::Uuid
Uuid(bool unique=false)qpid::framing::Uuid
Uuid(const uint8_t *data)qpid::framing::Uuid

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00230.html0000664000076400007640000002434111752725720017310 0ustar00jrossjross00000000000000 qpid::framing::NotImplementedException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::NotImplementedException Struct Reference

The peer tried to use functionality that is not implemented in its partner. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 NotImplementedException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The peer tried to use functionality that is not implemented in its partner.


Constructor & Destructor Documentation

qpid::framing::NotImplementedException::NotImplementedException ( const std::string msg = std::string()) [inline]

Definition at line 173 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::NotImplementedException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 172 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00849.html0000664000076400007640000001320511752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::LinkError Member List
This is the complete list of members for qpid::messaging::LinkError, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
LinkError(const std::string &)qpid::messaging::LinkError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00137.html0000664000076400007640000002460511752725717017327 0ustar00jrossjross00000000000000 qpid::client::FutureCompletion Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FutureCompletion Class Reference

#include <qpid/client/FutureCompletion.h>

List of all members.

Public Member Functions

 FutureCompletion ()
virtual ~FutureCompletion ()
bool isComplete () const
void waitForCompletion () const
void completed ()

Protected Attributes

sys::Monitor lock
bool complete

Constructor & Destructor Documentation

qpid::client::FutureCompletion::FutureCompletion ( )
virtual qpid::client::FutureCompletion::~FutureCompletion ( ) [inline, virtual]

Definition at line 40 of file FutureCompletion.h.


Member Function Documentation

void qpid::client::FutureCompletion::completed ( )
bool qpid::client::FutureCompletion::isComplete ( ) const
void qpid::client::FutureCompletion::waitForCompletion ( ) const

Member Data Documentation

Definition at line 36 of file FutureCompletion.h.

Definition at line 35 of file FutureCompletion.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00778.html0000664000076400007640000002163611752725720017335 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ListValue Member List
This is the complete list of members for qpid::framing::ListValue, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
ListValue(const List &)qpid::framing::ListValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
ValueType typedefqpid::framing::ListValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x75.html0000664000076400007640000001405311752725720022574 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- u -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00168.html0000664000076400007640000001016711752725720017323 0ustar00jrossjross00000000000000 std::ios Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::ios Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00400.html0000664000076400007640000004634611752725720017320 0ustar00jrossjross00000000000000 qpid::framing::XaResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::XaResult Class Reference

#include <qpid/framing/XaResult.h>

List of all members.

Public Member Functions

 XaResult (uint16_t _status)
 XaResult ()
void setStatus (uint16_t _status)
uint16_t getStatus () const
bool hasStatus () const
void clearStatusFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1537

Friends

std::ostreamoperator<< (std::ostream &, const XaResult &)

Constructor & Destructor Documentation

qpid::framing::XaResult::XaResult ( uint16_t  _status) [inline]

Definition at line 43 of file XaResult.h.

qpid::framing::XaResult::XaResult ( ) [inline]

Definition at line 49 of file XaResult.h.


Member Function Documentation

uint32_t qpid::framing::XaResult::bodySize ( ) const
void qpid::framing::XaResult::clearStatusFlag ( )
void qpid::framing::XaResult::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::XaResult::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::XaResult::encode ( Buffer ) const
uint32_t qpid::framing::XaResult::encodedSize ( ) const
void qpid::framing::XaResult::encodeStructBody ( Buffer ) const
uint16_t qpid::framing::XaResult::getStatus ( ) const
bool qpid::framing::XaResult::hasStatus ( ) const
void qpid::framing::XaResult::print ( std::ostream out) const
void qpid::framing::XaResult::setStatus ( uint16_t  _status)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const XaResult  
) [friend]

Member Data Documentation

const uint16_t qpid::framing::XaResult::TYPE = 1537 [static]

Definition at line 42 of file XaResult.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00582.html0000664000076400007640000001526211752725720017324 0ustar00jrossjross00000000000000 qpid::framing::connection Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::connection Namespace Reference

Enumerations

enum  CloseCode { CLOSE_CODE_NORMAL = 200, CLOSE_CODE_CONNECTION_FORCED = 320, CLOSE_CODE_INVALID_PATH = 402, CLOSE_CODE_FRAMING_ERROR = 501 }

Enumeration Type Documentation

Enumerator:
CLOSE_CODE_NORMAL 
CLOSE_CODE_CONNECTION_FORCED 
CLOSE_CODE_INVALID_PATH 
CLOSE_CODE_FRAMING_ERROR 

Definition at line 47 of file enum.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00331.html0000664000076400007640000002775711752725717017336 0ustar00jrossjross00000000000000 qpid::SessionException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::SessionException Struct Reference

#include <qpid/Exception.h>

List of all members.

Public Member Functions

 SessionException (framing::execution::ErrorCode code_, const std::string &message)
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Public Attributes

const framing::execution::ErrorCode code

Constructor & Destructor Documentation

qpid::SessionException::SessionException ( framing::execution::ErrorCode  code_,
const std::string message 
) [inline]

Definition at line 61 of file Exception.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00182.html0000664000076400007640000001033211752725720017311 0ustar00jrossjross00000000000000 std::multiset::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multiset::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00887.html0000664000076400007640000001403211752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::PODMutex Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00062.html0000664000076400007640000002446611752725720017323 0ustar00jrossjross00000000000000 qpid::framing::ConnectionForcedException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ConnectionForcedException Struct Reference

An operator intervened to close the connection for some reason. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 ConnectionForcedException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const
framing::connection::CloseCode 
code

Detailed Description

An operator intervened to close the connection for some reason.

The client may retry at some later date.


Constructor & Destructor Documentation

qpid::framing::ConnectionForcedException::ConnectionForcedException ( const std::string msg = std::string()) [inline]

Definition at line 215 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::ConnectionForcedException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 214 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 72 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00162.html0000664000076400007640000001531211752725720017312 0ustar00jrossjross00000000000000 qpid::types::InvalidConversion Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::types::InvalidConversion Struct Reference

Thrown when an illegal conversion of a variant is attempted. More...

#include <qpid/types/Variant.h>

List of all members.

Public Member Functions

 InvalidConversion (const std::string &msg)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Detailed Description

Thrown when an illegal conversion of a variant is attempted.


Constructor & Destructor Documentation

qpid::types::InvalidConversion::InvalidConversion ( const std::string msg)

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00525_source.html0000664000076400007640000002706711752725717020715 0ustar00jrossjross00000000000000 qpid/framing/XaResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/XaResult.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_XARESULT_H
00002 #define QPID_FRAMING_XARESULT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN XaResult  {
00039     uint16_t status;
00040     uint16_t flags;
00041 public:
00042     static const uint16_t TYPE = 1537;
00043     XaResult(
00044         uint16_t _status) : 
00045         status(_status),
00046         flags(0){
00047         flags |= (1 << 8);
00048     }
00049     XaResult()  : status(0), flags(0) {}
00050     
00051     QPID_COMMON_EXTERN void setStatus(uint16_t _status);
00052     QPID_COMMON_EXTERN uint16_t getStatus() const;
00053     QPID_COMMON_EXTERN bool hasStatus() const;
00054     QPID_COMMON_EXTERN void clearStatusFlag();
00055     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const XaResult&);
00056     QPID_COMMON_EXTERN void encode(Buffer&) const;
00057     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00058     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00059     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00060     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00061     QPID_COMMON_EXTERN uint32_t bodySize() const;
00062     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00063 }; /* class XaResult */
00064 
00065 }}
00066 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00747.html0000664000076400007640000002170611752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ExchangeBoundResult Member List
This is the complete list of members for qpid::framing::ExchangeBoundResult, including all inherited members.
bodySize() const qpid::framing::ExchangeBoundResult
decode(Buffer &, uint32_t=0)qpid::framing::ExchangeBoundResult
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::ExchangeBoundResult
encode(Buffer &) const qpid::framing::ExchangeBoundResult
encodedSize() const qpid::framing::ExchangeBoundResult
encodeStructBody(Buffer &) const qpid::framing::ExchangeBoundResult
ExchangeBoundResult(bool _exchangeNotFound, bool _queueNotFound, bool _queueNotMatched, bool _keyNotMatched, bool _argsNotMatched)qpid::framing::ExchangeBoundResult [inline]
ExchangeBoundResult()qpid::framing::ExchangeBoundResult [inline]
getArgsNotMatched() const qpid::framing::ExchangeBoundResult
getExchangeNotFound() const qpid::framing::ExchangeBoundResult
getKeyNotMatched() const qpid::framing::ExchangeBoundResult
getQueueNotFound() const qpid::framing::ExchangeBoundResult
getQueueNotMatched() const qpid::framing::ExchangeBoundResult
operator<<(std::ostream &, const ExchangeBoundResult &)qpid::framing::ExchangeBoundResult [friend]
print(std::ostream &out) const qpid::framing::ExchangeBoundResult
setArgsNotMatched(bool _argsNotMatched)qpid::framing::ExchangeBoundResult
setExchangeNotFound(bool _exchangeNotFound)qpid::framing::ExchangeBoundResult
setKeyNotMatched(bool _keyNotMatched)qpid::framing::ExchangeBoundResult
setQueueNotFound(bool _queueNotFound)qpid::framing::ExchangeBoundResult
setQueueNotMatched(bool _queueNotMatched)qpid::framing::ExchangeBoundResult
TYPEqpid::framing::ExchangeBoundResult [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00875.html0000664000076400007640000001407411752725720017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ExceptionHolder Member List
This is the complete list of members for qpid::sys::ExceptionHolder, including all inherited members.
empty() const qpid::sys::ExceptionHolder [inline]
ExceptionHolder()qpid::sys::ExceptionHolder [inline]
ExceptionHolder(Ex *ex)qpid::sys::ExceptionHolder [inline]
operator bool() const qpid::sys::ExceptionHolder [inline]
operator=(Ex *ex)qpid::sys::ExceptionHolder [inline]
raise() const qpid::sys::ExceptionHolder [inline, virtual]
reset()qpid::sys::ExceptionHolder [inline]
what() const qpid::sys::ExceptionHolder [inline, virtual]
~Raisable()qpid::sys::Raisable [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00633.html0000664000076400007640000001103111752725717017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::QueryOperand Member List
This is the complete list of members for qmf::engine::QueryOperand, including all inherited members.
evaluate(const Object *object) const =0qmf::engine::QueryOperand [pure virtual]
~QueryOperand()qmf::engine::QueryOperand [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00680.html0000664000076400007640000001443311752725717017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FailoverListener Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x75.html0000664000076400007640000002530311752725717021303 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- u -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x75.html0000664000076400007640000002206111752725717022314 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00537_source.html0000664000076400007640000002344011752725717020707 0ustar00jrossjross00000000000000 qpid/management/ManagementEvent.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/ManagementEvent.h
Go to the documentation of this file.
00001 #ifndef _ManagementEvent_
00002 #define _ManagementEvent_
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/management/ManagementObject.h"
00026 #include "qpid/types/Variant.h"
00027 #include <string>
00028 
00029 namespace qpid {
00030 namespace management {
00031 
00032 class ManagementAgent;
00033 
00034 class ManagementEvent : public ManagementItem {
00035  public:
00036     static const uint8_t MD5_LEN = 16;
00037     //typedef void (*writeSchemaCall_t)(qpid::framing::Buffer&);
00038     typedef void (*writeSchemaCall_t)(std::string&);
00039     virtual ~ManagementEvent() {}
00040 
00041     virtual writeSchemaCall_t getWriteSchemaCall(void) = 0;
00042     //virtual mapEncodeSchemaCall_t getMapEncodeSchemaCall(void) = 0;
00043     virtual std::string& getEventName() const = 0;
00044     virtual std::string& getPackageName() const = 0;
00045     virtual uint8_t* getMd5Sum() const = 0;
00046     virtual uint8_t getSeverity() const = 0;
00047     virtual void encode(std::string&) const = 0;
00048     virtual void mapEncode(qpid::types::Variant::Map&) const = 0;
00049 };
00050 
00051 }}
00052 
00053 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x6d.html0000664000076400007640000002014711752725720023662 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- m -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00907.html0000664000076400007640000000763711752725720017334 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::vector Member List
This is the complete list of members for std::vector, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00512.html0000664000076400007640000001220111752725717017311 0ustar00jrossjross00000000000000 qpid/framing/MessageProperties.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/MessageProperties.h File Reference
#include "qpid/framing/ReplyTo.h"
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::MessageProperties

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00414_source.html0000664000076400007640000002770611752725717020712 0ustar00jrossjross00000000000000 qpid/management/ConnectionSettings.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/ConnectionSettings.h
Go to the documentation of this file.
00001 #ifndef _management_ConnectionSettings_h
00002 #define _management_ConnectionSettings_h
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include "qpid/CommonImportExport.h"
00025 #include "qpid/types/Variant.h"
00026 #include <string>
00027 
00028 namespace qpid {
00029 namespace management {
00030 
00034 struct ConnectionSettings {
00035 
00036     QPID_COMMON_EXTERN ConnectionSettings();
00037     QPID_COMMON_EXTERN virtual ~ConnectionSettings();
00038 
00042     std::string protocol;
00043 
00047     std::string host;
00051     uint16_t port;
00056     std::string virtualhost;
00057 
00062     std::string username;
00066     std::string password;
00071     std::string mechanism;
00075     std::string locale;
00079     uint16_t heartbeat;
00084     uint16_t maxChannels;
00089     uint16_t maxFrameSize;
00094     unsigned int bounds;
00098     bool tcpNoDelay;
00102     std::string service;
00107     unsigned int minSsf;
00112     unsigned int maxSsf;
00113 };
00114 
00115 }}
00116 
00117 #endif
00118 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00699.html0000664000076400007640000003406011752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::SubscriptionManager Member List
This is the complete list of members for qpid::client::SubscriptionManager, including all inherited members.
cancel(const std::string &name)qpid::client::SubscriptionManager
Functor typedefqpid::sys::Runnable
functor()qpid::sys::Runnable
get(Message &result, const std::string &queue, sys::Duration timeout=0)qpid::client::SubscriptionManager
get(const std::string &queue, sys::Duration timeout=sys::TIME_INFINITE)qpid::client::SubscriptionManager
getDefaultSettings() const qpid::client::SubscriptionManager
getDefaultSettings()qpid::client::SubscriptionManager
getSession() const qpid::client::SubscriptionManager
getSubscription(const std::string &name) const qpid::client::SubscriptionManager
Handle()qpid::client::Handle< SubscriptionManagerImpl > [inline, protected]
Handle(const Handle &)qpid::client::Handle< SubscriptionManagerImpl > [protected]
implqpid::client::Handle< SubscriptionManagerImpl > [protected]
isNull() const qpid::client::Handle< SubscriptionManagerImpl > [inline]
isValid() const qpid::client::Handle< SubscriptionManagerImpl > [inline]
operator bool() const qpid::client::Handle< SubscriptionManagerImpl > [inline]
operator!() const qpid::client::Handle< SubscriptionManagerImpl > [inline]
operator=(const SubscriptionManager &)qpid::client::SubscriptionManager
Handle< SubscriptionManagerImpl >::operator=(const Handle &)qpid::client::Handle< SubscriptionManagerImpl > [protected]
registerFailoverHandler(boost::function< void()> fh)qpid::client::SubscriptionManager
run()qpid::client::SubscriptionManager [virtual]
setAcceptMode(AcceptMode mode)qpid::client::SubscriptionManager
setAcquireMode(AcquireMode mode)qpid::client::SubscriptionManager
setAutoStop(bool set=true)qpid::client::SubscriptionManager
setDefaultSettings(const SubscriptionSettings &s)qpid::client::SubscriptionManager
setFlowControl(const std::string &name, const FlowControl &flow)qpid::client::SubscriptionManager
setFlowControl(const std::string &name, uint32_t messages, uint32_t bytes, bool window=true)qpid::client::SubscriptionManager
setFlowControl(uint32_t messages, uint32_t bytes, bool window=true)qpid::client::SubscriptionManager
start()qpid::client::SubscriptionManager
stop()qpid::client::SubscriptionManager
subscribe(MessageListener &listener, const std::string &queue, const SubscriptionSettings &settings, const std::string &name=std::string())qpid::client::SubscriptionManager
subscribe(LocalQueue &localQueue, const std::string &queue, const SubscriptionSettings &settings, const std::string &name=std::string())qpid::client::SubscriptionManager
subscribe(MessageListener &listener, const std::string &queue, const std::string &name=std::string())qpid::client::SubscriptionManager
subscribe(LocalQueue &localQueue, const std::string &queue, const std::string &name=std::string())qpid::client::SubscriptionManager
SubscriptionManager(const Session &session)qpid::client::SubscriptionManager
SubscriptionManager(const SubscriptionManager &)qpid::client::SubscriptionManager
SubscriptionManager(SubscriptionManagerImpl *)qpid::client::SubscriptionManager
swap(Handle< T > &h)qpid::client::Handle< SubscriptionManagerImpl > [inline]
UNLIMITEDqpid::client::SubscriptionManager [static]
wait()qpid::client::SubscriptionManager
~Runnable()qpid::sys::Runnable [virtual]
~SubscriptionManager()qpid::client::SubscriptionManager

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00166.html0000664000076400007640000001631411752725720017321 0ustar00jrossjross00000000000000 qpid::sys::IOHandle Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::IOHandle Class Reference

#include <qpid/sys/IOHandle.h>

List of all members.

Protected Member Functions

 IOHandle (IOHandlePrivate *)
virtual ~IOHandle ()

Protected Attributes

IOHandlePrivate *const impl

Constructor & Destructor Documentation

qpid::sys::IOHandle::IOHandle ( IOHandlePrivate ) [protected]
virtual qpid::sys::IOHandle::~IOHandle ( ) [protected, virtual]

Member Data Documentation

Definition at line 41 of file IOHandle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/jquery.js0000664000076400007640000024562211752725717017507 0ustar00jrossjross00000000000000/* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); /* * Sizzle CSS Selector Engine - v0.9.3 * Copyright 2009, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0) {I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function() {G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); /* * jQuery UI 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI */ jQuery.ui||(function(c){var i=c.fn.remove,d=c.browser.mozilla&&(parseFloat(c.browser.version)<1.9);c.ui={version:"1.7.2",plugin:{add:function(k,l,n){var m=c.ui[k].prototype;for(var j in n){m.plugins[j]=m.plugins[j]||[];m.plugins[j].push([l,n[j]])}},call:function(j,l,k){var n=j.plugins[l];if(!n||!j.element[0].parentNode){return}for(var m=0;m0){return true}m[j]=1;l=(m[j]>0);m[j]=0;return l},isOverAxis:function(k,j,l){return(k>j)&&(k<(j+l))},isOver:function(o,k,n,m,j,l){return c.ui.isOverAxis(o,n,j)&&c.ui.isOverAxis(k,m,l)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};if(d){var f=c.attr,e=c.fn.removeAttr,h="http://www.w3.org/2005/07/aaa",a=/^aria-/,b=/^wairole:/;c.attr=function(k,j,l){var m=l!==undefined;return(j=="role"?(m?f.call(this,k,j,"wairole:"+l):(f.apply(this,arguments)||"").replace(b,"")):(a.test(j)?(m?k.setAttributeNS(h,j.replace(a,"aaa:"),l):f.call(this,k,j.replace(a,"aaa:"))):f.apply(this,arguments)))};c.fn.removeAttr=function(j){return(a.test(j)?this.each(function(){this.removeAttributeNS(h,j.replace(a,""))}):e.call(this,j))}}c.fn.extend({remove:function(){c("*",this).add(this).each(function(){c(this).triggerHandler("remove")});return i.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var j;if((c.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){j=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(c.curCSS(this,"position",1))&&(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}else{j=this.parents().filter(function(){return(/(auto|scroll)/).test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!j.length?c(document):j}});c.extend(c.expr[":"],{data:function(l,k,j){return !!c.data(l,j[3])},focusable:function(k){var l=k.nodeName.toLowerCase(),j=c.attr(k,"tabindex");return(/input|select|textarea|button|object/.test(l)?!k.disabled:"a"==l||"area"==l?k.href||!isNaN(j):!isNaN(j))&&!c(k)["area"==l?"parents":"closest"](":hidden").length},tabbable:function(k){var j=c.attr(k,"tabindex");return(isNaN(j)||j>=0)&&c(k).is(":focusable")}});function g(m,n,o,l){function k(q){var p=c[m][n][q]||[];return(typeof p=="string"?p.split(/,?\s+/):p)}var j=k("getter");if(l.length==1&&typeof l[0]=="string"){j=j.concat(k("getterSetter"))}return(c.inArray(o,j)!=-1)}c.widget=function(k,j){var l=k.split(".")[0];k=k.split(".")[1];c.fn[k]=function(p){var n=(typeof p=="string"),o=Array.prototype.slice.call(arguments,1);if(n&&p.substring(0,1)=="_"){return this}if(n&&g(l,k,p,o)){var m=c.data(this[0],k);return(m?m[p].apply(m,o):undefined)}return this.each(function(){var q=c.data(this,k);(!q&&!n&&c.data(this,k,new c[l][k](this,p))._init());(q&&n&&c.isFunction(q[p])&&q[p].apply(q,o))})};c[l]=c[l]||{};c[l][k]=function(o,n){var m=this;this.namespace=l;this.widgetName=k;this.widgetEventPrefix=c[l][k].eventPrefix||k;this.widgetBaseClass=l+"-"+k;this.options=c.extend({},c.widget.defaults,c[l][k].defaults,c.metadata&&c.metadata.get(o)[k],n);this.element=c(o).bind("setData."+k,function(q,p,r){if(q.target==o){return m._setData(p,r)}}).bind("getData."+k,function(q,p){if(q.target==o){return m._getData(p)}}).bind("remove",function(){return m.destroy()})};c[l][k].prototype=c.extend({},c.widget.prototype,j);c[l][k].getterSetter="option"};c.widget.prototype={_init:function(){},destroy:function(){this.element.removeData(this.widgetName).removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").removeAttr("aria-disabled")},option:function(l,m){var k=l,j=this;if(typeof l=="string"){if(m===undefined){return this._getData(l)}k={};k[l]=m}c.each(k,function(n,o){j._setData(n,o)})},_getData:function(j){return this.options[j]},_setData:function(j,k){this.options[j]=k;if(j=="disabled"){this.element[k?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",k)}},enable:function(){this._setData("disabled",false)},disable:function(){this._setData("disabled",true)},_trigger:function(l,m,n){var p=this.options[l],j=(l==this.widgetEventPrefix?l:this.widgetEventPrefix+l);m=c.Event(m);m.type=j;if(m.originalEvent){for(var k=c.event.props.length,o;k;){o=c.event.props[--k];m[o]=m.originalEvent[o]}}this.element.trigger(m,n);return !(c.isFunction(p)&&p.call(this.element[0],m,n)===false||m.isDefaultPrevented())}};c.widget.defaults={disabled:false};c.ui.mouse={_mouseInit:function(){var j=this;this.element.bind("mousedown."+this.widgetName,function(k){return j._mouseDown(k)}).bind("click."+this.widgetName,function(k){if(j._preventClickEvent){j._preventClickEvent=false;k.stopImmediatePropagation();return false}});if(c.browser.msie){this._mouseUnselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);(c.browser.msie&&this.element.attr("unselectable",this._mouseUnselectable))},_mouseDown:function(l){l.originalEvent=l.originalEvent||{};if(l.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(l));this._mouseDownEvent=l;var k=this,m=(l.which==1),j=(typeof this.options.cancel=="string"?c(l.target).parents().add(l.target).filter(this.options.cancel).length:false);if(!m||j||!this._mouseCapture(l)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){k.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(l)&&this._mouseDelayMet(l)){this._mouseStarted=(this._mouseStart(l)!==false);if(!this._mouseStarted){l.preventDefault();return true}}this._mouseMoveDelegate=function(n){return k._mouseMove(n)};this._mouseUpDelegate=function(n){return k._mouseUp(n)};c(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(c.browser.safari||l.preventDefault());l.originalEvent.mouseHandled=true;return true},_mouseMove:function(j){if(c.browser.msie&&!j.button){return this._mouseUp(j)}if(this._mouseStarted){this._mouseDrag(j);return j.preventDefault()}if(this._mouseDistanceMet(j)&&this._mouseDelayMet(j)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,j)!==false);(this._mouseStarted?this._mouseDrag(j):this._mouseUp(j))}return !this._mouseStarted},_mouseUp:function(j){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(j.target==this._mouseDownEvent.target);this._mouseStop(j)}return false},_mouseDistanceMet:function(j){return(Math.max(Math.abs(this._mouseDownEvent.pageX-j.pageX),Math.abs(this._mouseDownEvent.pageY-j.pageY))>=this.options.distance)},_mouseDelayMet:function(j){return this.mouseDelayMet},_mouseStart:function(j){},_mouseDrag:function(j){},_mouseStop:function(j){},_mouseCapture:function(j){return true}};c.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jQuery);;/* * jQuery UI Resizable 1.7.2 * * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * http://docs.jquery.com/UI/Resizables * * Depends: * ui.core.js */ (function(c){c.widget("ui.resizable",c.extend({},c.ui.mouse,{_init:function(){var e=this,j=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(j.aspectRatio),aspectRatio:j.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:j.helper||j.ghost||j.animate?j.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){if(/relative/.test(this.element.css("position"))&&c.browser.opera){this.element.css({position:"relative",top:"auto",left:"auto"})}this.element.wrap(c('
').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=j.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var k=this.handles.split(",");this.handles={};for(var f=0;f
');if(/sw|se|ne|nw/.test(h)){g.css({zIndex:++j.zIndex})}if("se"==h){g.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[h]=".ui-resizable-"+h;this.element.append(g)}}this._renderAxis=function(p){p=p||this.element;for(var m in this.handles){if(this.handles[m].constructor==String){this.handles[m]=c(this.handles[m],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var n=c(this.handles[m],this.element),o=0;o=/sw|ne|nw|se|n|s/.test(m)?n.outerHeight():n.outerWidth();var l=["padding",/ne|nw|n/.test(m)?"Top":/se|sw|s/.test(m)?"Bottom":/^e$/.test(m)?"Right":"Left"].join("");p.css(l,o);this._proportionallyResize()}if(!c(this.handles[m]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!e.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}e.axis=i&&i[1]?i[1]:"se"}});if(j.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){c(this).removeClass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addClass("ui-resizable-autohide");e._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var d=function(f){c(f).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){d(this.element);var e=this.element;e.parent().append(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).end().remove()}this.originalElement.css("resize",this.originalResizeStyle);d(this.originalElement)},_mouseCapture:function(e){var f=false;for(var d in this.handles){if(c(this.handles[d])[0]==e.target){f=true}}return this.options.disabled||!!f},_mouseStart:function(f){var i=this.options,e=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(d.is(".ui-draggable")||(/absolute/).test(d.css("position"))){d.css({position:"absolute",top:e.top,left:e.left})}if(c.browser.opera&&(/relative/).test(d.css("position"))){d.css({position:"relative",top:"auto",left:"auto"})}this._renderProxy();var j=b(this.helper.css("left")),g=b(this.helper.css("top"));if(i.containment){j+=c(i.containment).scrollLeft()||0;g+=c(i.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:j,top:g};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:j,top:g};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:f.pageX,top:f.pageY};this.aspectRatio=(typeof i.aspectRatio=="number")?i.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var h=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",h=="auto"?this.axis+"-resize":h);d.addClass("ui-resizable-resizing");this._propagate("start",f);return true},_mouseDrag:function(d){var g=this.helper,f=this.options,l={},p=this,i=this.originalMousePosition,m=this.axis;var q=(d.pageX-i.left)||0,n=(d.pageY-i.top)||0;var h=this._change[m];if(!h){return false}var k=h.apply(this,[d,q,n]),j=c.browser.msie&&c.browser.version<7,e=this.sizeDiff;if(this._aspectRatio||d.shiftKey){k=this._updateRatio(k,d)}k=this._respectSize(k,d);this._propagate("resize",d);g.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(k);this._trigger("resize",d,this.ui());return false},_mouseStop:function(g){this.resizing=false;var h=this.options,l=this;if(this._helper){var f=this._proportionallyResizeElements,d=f.length&&(/textarea/i).test(f[0].nodeName),e=d&&c.ui.hasScroll(f[0],"left")?0:l.sizeDiff.height,j=d?0:l.sizeDiff.width;var m={width:(l.size.width-j),height:(l.size.height-e)},i=(parseInt(l.element.css("left"),10)+(l.position.left-l.originalPosition.left))||null,k=(parseInt(l.element.css("top"),10)+(l.position.top-l.originalPosition.top))||null;if(!h.animate){this.element.css(c.extend(m,{top:k,left:i}))}l.helper.height(l.size.height);l.helper.width(l.size.width);if(this._helper&&!h.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",g);if(this._helper){this.helper.remove()}return false},_updateCache:function(d){var e=this.options;this.offset=this.helper.offset();if(a(d.left)){this.position.left=d.left}if(a(d.top)){this.position.top=d.top}if(a(d.height)){this.size.height=d.height}if(a(d.width)){this.size.width=d.width}},_updateRatio:function(g,f){var h=this.options,i=this.position,e=this.size,d=this.axis;if(g.height){g.width=(e.height*this.aspectRatio)}else{if(g.width){g.height=(e.width/this.aspectRatio)}}if(d=="sw"){g.left=i.left+(e.width-g.width);g.top=null}if(d=="nw"){g.top=i.top+(e.height-g.height);g.left=i.left+(e.width-g.width)}return g},_respectSize:function(k,f){var i=this.helper,h=this.options,q=this._aspectRatio||f.shiftKey,p=this.axis,s=a(k.width)&&h.maxWidth&&(h.maxWidthk.width),r=a(k.height)&&h.minHeight&&(h.minHeight>k.height);if(g){k.width=h.minWidth}if(r){k.height=h.minHeight}if(s){k.width=h.maxWidth}if(l){k.height=h.maxHeight}var e=this.originalPosition.left+this.originalSize.width,n=this.position.top+this.size.height;var j=/sw|nw|w/.test(p),d=/nw|ne|n/.test(p);if(g&&j){k.left=e-h.minWidth}if(s&&j){k.left=e-h.maxWidth}if(r&&d){k.top=n-h.minHeight}if(l&&d){k.top=n-h.maxHeight}var m=!k.width&&!k.height;if(m&&!k.left&&k.top){k.top=null}else{if(m&&!k.top&&k.left){k.left=null}}return k},_proportionallyResize:function(){var j=this.options;if(!this._proportionallyResizeElements.length){return}var f=this.helper||this.element;for(var e=0;e');var d=c.browser.msie&&c.browser.version<7,f=(d?1:0),g=(d?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+g,height:this.element.outerHeight()+g,position:"absolute",left:this.elementOffset.left-f+"px",top:this.elementOffset.top-f+"px",zIndex:++h.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(f,e,d){return{width:this.originalSize.width+e}},w:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{left:h.left+e,width:f.width-e}},n:function(g,e,d){var i=this.options,f=this.originalSize,h=this.originalPosition;return{top:h.top+d,height:f.height-d}},s:function(f,e,d){return{height:this.originalSize.height+d}},se:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},sw:function(f,e,d){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[f,e,d]))},ne:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[f,e,d]))},nw:function(f,e,d){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[f,e,d]))}},_propagate:function(e,d){c.ui.plugin.call(this,e,[d,this.ui()]);(e!="resize"&&this._trigger(e,d,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}));c.extend(c.ui.resizable,{version:"1.7.2",eventPrefix:"resize",defaults:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,cancel:":input,option",containment:false,delay:0,distance:1,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000}});c.ui.plugin.add("resizable","alsoResize",{start:function(e,f){var d=c(this).data("resizable"),g=d.options;_store=function(h){c(h).each(function(){c(this).data("resizable-alsoresize",{width:parseInt(c(this).width(),10),height:parseInt(c(this).height(),10),left:parseInt(c(this).css("left"),10),top:parseInt(c(this).css("top"),10)})})};if(typeof(g.alsoResize)=="object"&&!g.alsoResize.parentNode){if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];_store(g.alsoResize)}else{c.each(g.alsoResize,function(h,i){_store(h)})}}else{_store(g.alsoResize)}},resize:function(f,h){var e=c(this).data("resizable"),i=e.options,g=e.originalSize,k=e.originalPosition;var j={height:(e.size.height-g.height)||0,width:(e.size.width-g.width)||0,top:(e.position.top-k.top)||0,left:(e.position.left-k.left)||0},d=function(l,m){c(l).each(function(){var p=c(this),q=c(this).data("resizable-alsoresize"),o={},n=m&&m.length?m:["width","height","top","left"];c.each(n||["width","height","top","left"],function(r,t){var s=(q[t]||0)+(j[t]||0);if(s&&s>=0){o[t]=s||null}});if(/relative/.test(p.css("position"))&&c.browser.opera){e._revertToRelativePosition=true;p.css({position:"absolute",top:"auto",left:"auto"})}p.css(o)})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.nodeType){c.each(i.alsoResize,function(l,m){d(l,m)})}else{d(i.alsoResize)}},stop:function(e,f){var d=c(this).data("resizable");if(d._revertToRelativePosition&&c.browser.opera){d._revertToRelativePosition=false;el.css({position:"relative"})}c(this).removeData("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(h,m){var n=c(this).data("resizable"),i=n.options;var g=n._proportionallyResizeElements,d=g.length&&(/textarea/i).test(g[0].nodeName),e=d&&c.ui.hasScroll(g[0],"left")?0:n.sizeDiff.height,k=d?0:n.sizeDiff.width;var f={width:(n.size.width-k),height:(n.size.height-e)},j=(parseInt(n.element.css("left"),10)+(n.position.left-n.originalPosition.left))||null,l=(parseInt(n.element.css("top"),10)+(n.position.top-n.originalPosition.top))||null;n.element.animate(c.extend(f,l&&j?{top:l,left:j}:{}),{duration:i.animateDuration,easing:i.animateEasing,step:function(){var o={width:parseInt(n.element.css("width"),10),height:parseInt(n.element.css("height"),10),top:parseInt(n.element.css("top"),10),left:parseInt(n.element.css("left"),10)};if(g&&g.length){c(g[0]).css({width:o.width,height:o.height})}n._updateCache(o);n._propagate("resize",h)}})}});c.ui.plugin.add("resizable","containment",{start:function(e,q){var s=c(this).data("resizable"),i=s.options,k=s.element;var f=i.containment,j=(f instanceof c)?f.get(0):(/parent/.test(f))?k.parent().get(0):f;if(!j){return}s.containerElement=c(j);if(/document/.test(f)||f==document){s.containerOffset={left:0,top:0};s.containerPosition={left:0,top:0};s.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var m=c(j),h=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){h[p]=b(m.css("padding"+o))});s.containerOffset=m.offset();s.containerPosition=m.position();s.containerSize={height:(m.innerHeight()-h[3]),width:(m.innerWidth()-h[1])};var n=s.containerOffset,d=s.containerSize.height,l=s.containerSize.width,g=(c.ui.hasScroll(j,"left")?j.scrollWidth:l),r=(c.ui.hasScroll(j)?j.scrollHeight:d);s.parentData={element:j,left:n.left,top:n.top,width:g,height:r}}},resize:function(f,p){var s=c(this).data("resizable"),h=s.options,e=s.containerSize,n=s.containerOffset,l=s.size,m=s.position,q=s._aspectRatio||f.shiftKey,d={top:0,left:0},g=s.containerElement;if(g[0]!=document&&(/static/).test(g.css("position"))){d=n}if(m.left<(s._helper?n.left:0)){s.size.width=s.size.width+(s._helper?(s.position.left-n.left):(s.position.left-d.left));if(q){s.size.height=s.size.width/h.aspectRatio}s.position.left=h.helper?n.left:0}if(m.top<(s._helper?n.top:0)) {s.size.height=s.size.height+(s._helper?(s.position.top-n.top):s.position.top);if(q){s.size.width=s.size.height*h.aspectRatio}s.position.top=s._helper?n.top:0}s.offset.left=s.parentData.left+s.position.left;s.offset.top=s.parentData.top+s.position.top;var k=Math.abs((s._helper?s.offset.left-d.left:(s.offset.left-d.left))+s.sizeDiff.width),r=Math.abs((s._helper?s.offset.top-d.top:(s.offset.top-n.top))+s.sizeDiff.height);var j=s.containerElement.get(0)==s.element.parent().get(0),i=/relative|absolute/.test(s.containerElement.css("position"));if(j&&i){k-=s.parentData.left}if(k+s.size.width>=s.parentData.width){s.size.width=s.parentData.width-k;if(q){s.size.height=s.size.width/s.aspectRatio}}if(r+s.size.height>=s.parentData.height){s.size.height=s.parentData.height-r;if(q){s.size.width=s.size.height*s.aspectRatio}}},stop:function(e,m){var p=c(this).data("resizable"),f=p.options,k=p.position,l=p.containerOffset,d=p.containerPosition,g=p.containerElement;var i=c(p.helper),q=i.offset(),n=i.outerWidth()-p.sizeDiff.width,j=i.outerHeight()-p.sizeDiff.height;if(p._helper&&!f.animate&&(/relative/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}if(p._helper&&!f.animate&&(/static/).test(g.css("position"))){c(this).css({left:q.left-d.left-l.left,width:n,height:j})}}});c.ui.plugin.add("resizable","ghost",{start:function(f,g){var d=c(this).data("resizable"),h=d.options,e=d.size;d.ghost=d.originalElement.clone();d.ghost.css({opacity:0.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof h.ghost=="string"?h.ghost:"");d.ghost.appendTo(d.helper)},resize:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost){d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})}},stop:function(e,f){var d=c(this).data("resizable"),g=d.options;if(d.ghost&&d.helper){d.helper.get(0).removeChild(d.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(d,l){var n=c(this).data("resizable"),g=n.options,j=n.size,h=n.originalSize,i=n.originalPosition,m=n.axis,k=g._aspectRatio||d.shiftKey;g.grid=typeof g.grid=="number"?[g.grid,g.grid]:g.grid;var f=Math.round((j.width-h.width)/(g.grid[0]||1))*(g.grid[0]||1),e=Math.round((j.height-h.height)/(g.grid[1]||1))*(g.grid[1]||1);if(/^(se|s|e)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e}else{if(/^(ne)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e}else{if(/^(sw)$/.test(m)){n.size.width=h.width+f;n.size.height=h.height+e;n.position.left=i.left-f}else{n.size.width=h.width+f;n.size.height=h.height+e;n.position.top=i.top-e;n.position.left=i.left-f}}}}});var b=function(d){return parseInt(d,10)||0};var a=function(d){return !isNaN(parseInt(d,10))}})(jQuery);; /** * jQuery.ScrollTo - Easy element scrolling using jQuery. * Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com * Licensed under GPL license (http://www.opensource.org/licenses/gpl-license.php). * Date: 2/8/2008 * @author Ariel Flesler * @version 1.3.2 */ ;(function($){var o=$.scrollTo=function(a,b,c){o.window().scrollTo(a,b,c)};o.defaults={axis:'y',duration:1};o.window=function(){return $($.browser.safari?'body':'html')};$.fn.scrollTo=function(l,m,n){if(typeof m=='object'){n=m;m=0}n=$.extend({},o.defaults,n);m=m||n.speed||n.duration;n.queue=n.queue&&n.axis.length>1;if(n.queue)m/=2;n.offset=j(n.offset);n.over=j(n.over);return this.each(function(){var a=this,b=$(a),t=l,c,d={},w=b.is('html,body');switch(typeof t){case'number':case'string':if(/^([+-]=)?\d+(px)?$/.test(t)){t=j(t);break}t=$(t,this);case'object':if(t.is||t.style)c=(t=$(t)).offset()}$.each(n.axis.split(''),function(i,f){var P=f=='x'?'Left':'Top',p=P.toLowerCase(),k='scroll'+P,e=a[k],D=f=='x'?'Width':'Height';if(c){d[k]=c[p]+(w?0:e-b.offset()[p]);if(n.margin){d[k]-=parseInt(t.css('margin'+P))||0;d[k]-=parseInt(t.css('border'+P+'Width'))||0}d[k]+=n.offset[p]||0;if(n.over[p])d[k]+=t[D.toLowerCase()]()*n.over[p]}else d[k]=t[p];if(/^\d+$/.test(d[k]))d[k]=d[k]<=0?0:Math.min(d[k],h(D));if(!i&&n.queue){if(e!=d[k])g(n.onAfterFirst);delete d[k]}});g(n.onAfter);function g(a){b.animate(d,m,n.easing,a&&function(){a.call(this,l)})};function h(D){var b=w?$.browser.opera?document.body:document.documentElement:a;return b['scroll'+D]-b['client'+D]}})};function j(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); qpidc-0.16/docs/api/html/a00035.html0000664000076400007640000001023711752725720017312 0ustar00jrossjross00000000000000 std::basic_ostream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_ostream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00064.html0000664000076400007640000006265411752725720017326 0ustar00jrossjross00000000000000 qpid::management::ConnectionSettings Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ConnectionSettings Struct Reference

Settings for a Connection. More...

#include <qpid/management/ConnectionSettings.h>

List of all members.

Public Member Functions

 ConnectionSettings ()
virtual ~ConnectionSettings ()

Public Attributes

std::string protocol
 The protocol used for the connection (defaults to 'tcp')
std::string host
 The host (or ip address) to connect to (defaults to 'localhost').
uint16_t port
 The port to connect to (defaults to 5672).
std::string virtualhost
 Allows an AMQP 'virtual host' to be specified for the connection.
std::string username
 The username to use when authenticating the connection.
std::string password
 The password to use when authenticating the connection.
std::string mechanism
 The SASL mechanism to use when authenticating the connection; the options are currently PLAIN or ANONYMOUS.
std::string locale
 Allows a locale to be specified for the connection.
uint16_t heartbeat
 Allows a heartbeat frequency to be specified.
uint16_t maxChannels
 The maximum number of channels that the client will request for use on this connection.
uint16_t maxFrameSize
 The maximum frame size that the client will request for this connection.
unsigned int bounds
 Limit the size of the connections send buffer .
bool tcpNoDelay
 If true, TCP_NODELAY will be set for the connection.
std::string service
 SASL service name.
unsigned int minSsf
 Minimum acceptable strength of any SASL negotiated security layer.
unsigned int maxSsf
 Maximum acceptable strength of any SASL negotiated security layer.

Detailed Description

Settings for a Connection.


Constructor & Destructor Documentation

qpid::management::ConnectionSettings::ConnectionSettings ( )
virtual qpid::management::ConnectionSettings::~ConnectionSettings ( ) [virtual]

Member Data Documentation

Limit the size of the connections send buffer .

The buffer is limited to bounds * maxFrameSize.

Definition at line 94 of file ConnectionSettings.h.

Allows a heartbeat frequency to be specified.

Definition at line 79 of file ConnectionSettings.h.

The host (or ip address) to connect to (defaults to 'localhost').

Definition at line 47 of file ConnectionSettings.h.

Allows a locale to be specified for the connection.

Definition at line 75 of file ConnectionSettings.h.

The maximum number of channels that the client will request for use on this connection.

Definition at line 84 of file ConnectionSettings.h.

The maximum frame size that the client will request for this connection.

Definition at line 89 of file ConnectionSettings.h.

Maximum acceptable strength of any SASL negotiated security layer.

0 means no security layer allowed.

Definition at line 112 of file ConnectionSettings.h.

The SASL mechanism to use when authenticating the connection; the options are currently PLAIN or ANONYMOUS.

Definition at line 71 of file ConnectionSettings.h.

Minimum acceptable strength of any SASL negotiated security layer.

0 means no security layer required.

Definition at line 107 of file ConnectionSettings.h.

The password to use when authenticating the connection.

Definition at line 66 of file ConnectionSettings.h.

The port to connect to (defaults to 5672).

Definition at line 51 of file ConnectionSettings.h.

The protocol used for the connection (defaults to 'tcp')

Definition at line 42 of file ConnectionSettings.h.

If true, TCP_NODELAY will be set for the connection.

Definition at line 98 of file ConnectionSettings.h.

The username to use when authenticating the connection.

If not specified the current users login is used if available.

Definition at line 62 of file ConnectionSettings.h.

Allows an AMQP 'virtual host' to be specified for the connection.

Definition at line 56 of file ConnectionSettings.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00235.html0000664000076400007640000005111111752725720017310 0ustar00jrossjross00000000000000 qpid::console::ObjectId Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::ObjectId Class Reference

#include <qpid/console/ObjectId.h>

List of all members.

Public Member Functions

 ObjectId ()
 ObjectId (framing::Buffer &buffer)
uint8_t getFlags () const
uint16_t getSequence () const
uint32_t getBrokerBank () const
uint32_t getAgentBank () const
uint64_t getObject () const
bool isDurable () const
void decode (framing::Buffer &buffer)
void encode (framing::Buffer &buffer)
void setValue (uint64_t f, uint64_t s)
bool operator== (const ObjectId &other) const
bool operator!= (const ObjectId &other) const
bool operator< (const ObjectId &other) const
bool operator> (const ObjectId &other) const
bool operator<= (const ObjectId &other) const
bool operator>= (const ObjectId &other) const

Constructor & Destructor Documentation

qpid::console::ObjectId::ObjectId ( ) [inline]

Definition at line 40 of file ObjectId.h.

qpid::console::ObjectId::ObjectId ( framing::Buffer buffer)

Member Function Documentation

void qpid::console::ObjectId::decode ( framing::Buffer buffer)
void qpid::console::ObjectId::encode ( framing::Buffer buffer)
uint32_t qpid::console::ObjectId::getAgentBank ( ) const [inline]

Definition at line 46 of file ObjectId.h.

uint32_t qpid::console::ObjectId::getBrokerBank ( ) const [inline]

Definition at line 45 of file ObjectId.h.

uint8_t qpid::console::ObjectId::getFlags ( ) const [inline]

Definition at line 43 of file ObjectId.h.

uint64_t qpid::console::ObjectId::getObject ( ) const [inline]

Definition at line 47 of file ObjectId.h.

uint16_t qpid::console::ObjectId::getSequence ( ) const [inline]

Definition at line 44 of file ObjectId.h.

bool qpid::console::ObjectId::isDurable ( ) const [inline]

Definition at line 48 of file ObjectId.h.

bool qpid::console::ObjectId::operator!= ( const ObjectId other) const
bool qpid::console::ObjectId::operator< ( const ObjectId other) const
bool qpid::console::ObjectId::operator<= ( const ObjectId other) const
bool qpid::console::ObjectId::operator== ( const ObjectId other) const
bool qpid::console::ObjectId::operator> ( const ObjectId other) const
bool qpid::console::ObjectId::operator>= ( const ObjectId other) const
void qpid::console::ObjectId::setValue ( uint64_t  f,
uint64_t  s 
) [inline]

Definition at line 51 of file ObjectId.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00552.html0000664000076400007640000001224011752725717017320 0ustar00jrossjross00000000000000 qpid/sys/windows/Condition.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/Condition.h File Reference
#include "qpid/sys/Mutex.h"
#include "qpid/sys/Time.h"
#include <time.h>
#include <boost/noncopyable.hpp>
#include <boost/thread/condition.hpp>
#include <boost/thread/thread_time.hpp>
#include <windows.h>

Go to the source code of this file.

Classes

class  qpid::sys::Condition
 A condition variable for thread synchronization. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00264.html0000664000076400007640000022333711752725717017333 0ustar00jrossjross00000000000000 qpid::client::QueueOptions Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::QueueOptions Class Reference

A help class to set options on the Queue. More...

#include <qpid/client/QueueOptions.h>

List of all members.

Public Types

typedef boost::shared_ptr
< FieldValue > 
ValuePtr
typedef std::map< std::string,
ValuePtr
ValueMap
typedef ValueMap::iterator iterator
typedef ValueMap::const_iterator const_iterator
typedef ValueMap::const_reference const_reference
typedef ValueMap::reference reference
typedef ValueMap::value_type value_type

Public Member Functions

 QueueOptions ()
virtual ~QueueOptions ()
void setSizePolicy (QueueSizePolicy sp, uint64_t maxSize, uint32_t maxCount)
 Sets the queue sizing policy.
void setPersistLastNode ()
 Enables the persisting of a queue to the store module when a cluster fails down to it's last node.
void setOrdering (QueueOrderingPolicy op)
 Sets the odering policy on the Queue, default ordering is FIFO.
void clearSizePolicy ()
 Use broker defualt sizing ploicy.
void clearPersistLastNode ()
 Clear Persist Last Node Policy.
void getLVQKey (std::string &key)
 get the key used match LVQ in args for message transfer
void clearOrdering ()
 Use default odering policy.
void enableQueueEvents (bool enqueueOnly)
 Turns on event generation for this queue (either enqueue only or for enqueue and dequeue events); the events can then be processed by a regsitered broker plugin.
uint32_t encodedSize () const
void encode (Buffer &buffer) const
void decode (Buffer &buffer)
int count () const
QPID_COMMON_INLINE_EXTERN size_t size () const
QPID_COMMON_INLINE_EXTERN bool empty ()
void set (const std::string &name, const ValuePtr &value)
ValuePtr get (const std::string &name) const
QPID_COMMON_INLINE_EXTERN bool isSet (const std::string &name) const
void setString (const std::string &name, const std::string &value)
void setInt (const std::string &name, const int value)
void setInt64 (const std::string &name, const int64_t value)
void setTimestamp (const std::string &name, const uint64_t value)
void setUInt64 (const std::string &name, const uint64_t value)
void setTable (const std::string &name, const FieldTable &value)
void setArray (const std::string &name, const Array &value)
void setFloat (const std::string &name, const float value)
void setDouble (const std::string &name, const double value)
int getAsInt (const std::string &name) const
uint64_t getAsUInt64 (const std::string &name) const
int64_t getAsInt64 (const std::string &name) const
std::string getAsString (const std::string &name) const
bool getTable (const std::string &name, FieldTable &value) const
bool getArray (const std::string &name, Array &value) const
bool getFloat (const std::string &name, float &value) const
bool getDouble (const std::string &name, double &value) const
void erase (const std::string &name)
bool operator== (const FieldTable &other) const
ValueMap::const_iterator begin () const
ValueMap::iterator begin ()
ValueMap::const_iterator end () const
ValueMap::iterator end ()
ValueMap::const_iterator find (const std::string &s) const
ValueMap::iterator find (const std::string &s)
std::pair< ValueMap::iterator,
bool > 
insert (const ValueMap::value_type &)
ValueMap::iterator insert (ValueMap::iterator, const ValueMap::value_type &)
void clear ()

Static Public Attributes

static const std::string strMaxCountKey
static const std::string strMaxSizeKey
static const std::string strTypeKey
static const std::string strREJECT
static const std::string strFLOW_TO_DISK
static const std::string strRING
static const std::string strRING_STRICT
static const std::string strLastValueQueue
static const std::string strPersistLastNode
static const std::string strLVQMatchProperty
static const std::string strLastValueQueueNoBrowse
static const std::string strQueueEventMode

Detailed Description

A help class to set options on the Queue.

Create a configured args while still allowing any custom configuration via the FieldTable base class


Member Typedef Documentation

typedef ValueMap::const_iterator qpid::framing::FieldTable::const_iterator [inherited]

Definition at line 59 of file FieldTable.h.

typedef ValueMap::const_reference qpid::framing::FieldTable::const_reference [inherited]

Definition at line 60 of file FieldTable.h.

typedef ValueMap::iterator qpid::framing::FieldTable::iterator [inherited]

Definition at line 58 of file FieldTable.h.

typedef ValueMap::reference qpid::framing::FieldTable::reference [inherited]

Definition at line 61 of file FieldTable.h.

typedef ValueMap::value_type qpid::framing::FieldTable::value_type [inherited]

Definition at line 62 of file FieldTable.h.

Definition at line 57 of file FieldTable.h.

typedef boost::shared_ptr<FieldValue> qpid::framing::FieldTable::ValuePtr [inherited]

Definition at line 56 of file FieldTable.h.


Constructor & Destructor Documentation

qpid::client::QueueOptions::QueueOptions ( )
virtual qpid::client::QueueOptions::~QueueOptions ( ) [virtual]

Member Function Documentation

ValueMap::const_iterator qpid::framing::FieldTable::begin ( ) const [inherited]
ValueMap::iterator qpid::framing::FieldTable::begin ( ) [inherited]
void qpid::framing::FieldTable::clear ( ) [inherited]
void qpid::client::QueueOptions::clearOrdering ( )

Use default odering policy.

void qpid::client::QueueOptions::clearPersistLastNode ( )

Clear Persist Last Node Policy.

void qpid::client::QueueOptions::clearSizePolicy ( )

Use broker defualt sizing ploicy.

int qpid::framing::FieldTable::count ( ) const [inherited]
void qpid::framing::FieldTable::decode ( Buffer buffer) [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldTable::empty ( ) [inline, inherited]

Definition at line 74 of file FieldTable.h.

References qpid::framing::FieldTable::size().

void qpid::client::QueueOptions::enableQueueEvents ( bool  enqueueOnly)

Turns on event generation for this queue (either enqueue only or for enqueue and dequeue events); the events can then be processed by a regsitered broker plugin.

DEPRECATED

This is confusing to anyone who sees only the function call and not the variable name / doxygen. Consider the following call:

options.enableQueueEvents(false);

It looks like it disables queue events, but what it really does is enable both enqueue and dequeue events.

Use setInt() instead:

options.setInt("qpid.queue_event_generation", 2);

void qpid::framing::FieldTable::encode ( Buffer buffer) const [inherited]
uint32_t qpid::framing::FieldTable::encodedSize ( ) const [inherited]
ValueMap::const_iterator qpid::framing::FieldTable::end ( ) const [inherited]
ValueMap::iterator qpid::framing::FieldTable::end ( ) [inherited]
void qpid::framing::FieldTable::erase ( const std::string name) [inherited]
ValueMap::const_iterator qpid::framing::FieldTable::find ( const std::string s) const [inherited]
ValueMap::iterator qpid::framing::FieldTable::find ( const std::string s) [inherited]
ValuePtr qpid::framing::FieldTable::get ( const std::string name) const [inherited]
bool qpid::framing::FieldTable::getArray ( const std::string name,
Array value 
) const [inherited]
int qpid::framing::FieldTable::getAsInt ( const std::string name) const [inherited]
int64_t qpid::framing::FieldTable::getAsInt64 ( const std::string name) const [inherited]
std::string qpid::framing::FieldTable::getAsString ( const std::string name) const [inherited]
uint64_t qpid::framing::FieldTable::getAsUInt64 ( const std::string name) const [inherited]
bool qpid::framing::FieldTable::getDouble ( const std::string name,
double &  value 
) const [inherited]
bool qpid::framing::FieldTable::getFloat ( const std::string name,
float &  value 
) const [inherited]
void qpid::client::QueueOptions::getLVQKey ( std::string key)

get the key used match LVQ in args for message transfer

bool qpid::framing::FieldTable::getTable ( const std::string name,
FieldTable value 
) const [inherited]
std::pair<ValueMap::iterator, bool> qpid::framing::FieldTable::insert ( const ValueMap::value_type &  ) [inherited]
ValueMap::iterator qpid::framing::FieldTable::insert ( ValueMap::iterator  ,
const ValueMap::value_type &   
) [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldTable::isSet ( const std::string name) const [inline, inherited]

Definition at line 77 of file FieldTable.h.

bool qpid::framing::FieldTable::operator== ( const FieldTable other) const [inherited]
void qpid::framing::FieldTable::set ( const std::string name,
const ValuePtr value 
) [inherited]
void qpid::framing::FieldTable::setArray ( const std::string name,
const Array value 
) [inherited]
void qpid::framing::FieldTable::setDouble ( const std::string name,
const double  value 
) [inherited]
void qpid::framing::FieldTable::setFloat ( const std::string name,
const float  value 
) [inherited]
void qpid::framing::FieldTable::setInt ( const std::string name,
const int  value 
) [inherited]
void qpid::framing::FieldTable::setInt64 ( const std::string name,
const int64_t  value 
) [inherited]
void qpid::client::QueueOptions::setOrdering ( QueueOrderingPolicy  op)

Sets the odering policy on the Queue, default ordering is FIFO.

void qpid::client::QueueOptions::setPersistLastNode ( )

Enables the persisting of a queue to the store module when a cluster fails down to it's last node.

Does so optimistically. Will start persisting when cluster count >1 again.

void qpid::client::QueueOptions::setSizePolicy ( QueueSizePolicy  sp,
uint64_t  maxSize,
uint32_t  maxCount 
)

Sets the queue sizing policy.

Parameters:
spSizePolicy REJECT - reject if queue greater than size/count FLOW_TO_DISK - page messages to disk from this point is greater than size/count RING - limit the queue to size/count and over-write old messages round a ring RING_STRICT - limit the queue to size/count and reject is head == tail NONE - Use default broker sizing policy
maxSizeSet the max number of bytes for the sizing policies
setMaxCountSet the max number of messages for the sizing policies
void qpid::framing::FieldTable::setString ( const std::string name,
const std::string value 
) [inherited]
void qpid::framing::FieldTable::setTable ( const std::string name,
const FieldTable value 
) [inherited]
void qpid::framing::FieldTable::setTimestamp ( const std::string name,
const uint64_t  value 
) [inherited]
void qpid::framing::FieldTable::setUInt64 ( const std::string name,
const uint64_t  value 
) [inherited]
QPID_COMMON_INLINE_EXTERN size_t qpid::framing::FieldTable::size ( ) const [inline, inherited]

Definition at line 73 of file FieldTable.h.

Referenced by qpid::framing::FieldTable::empty().


Member Data Documentation

Definition at line 115 of file QueueOptions.h.

Definition at line 111 of file QueueOptions.h.

Definition at line 112 of file QueueOptions.h.

Definition at line 114 of file QueueOptions.h.

Definition at line 116 of file QueueOptions.h.

Definition at line 117 of file QueueOptions.h.

Definition at line 113 of file QueueOptions.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x75.html0000664000076400007640000001354111752725720023604 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- u -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00808.html0000664000076400007640000001370111752725720017321 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::UnknownIdsException Member List
This is the complete list of members for qpid::framing::UnknownIdsException, including all inherited members.
ChannelException(framing::session::DetachCode _code, const std::string &message)qpid::ChannelException [inline]
codeqpid::ChannelException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::UnknownIdsException [inline, virtual]
UnknownIdsException(const std::string &msg=std::string())qpid::framing::UnknownIdsException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00026.html0000664000076400007640000001022611752725720017310 0ustar00jrossjross00000000000000 std::bad_exception Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::bad_exception Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x78.html0000664000076400007640000001565511752725720023617 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- x -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00518.html0000664000076400007640000001433311752725717017327 0ustar00jrossjross00000000000000 qpid/framing/SequenceNumber.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/SequenceNumber.h File Reference
#include "qpid/framing/amqp_types.h"
#include <boost/operators.hpp>
#include <iosfwd>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::SequenceNumber
 4-byte sequence number that 'wraps around'. More...
struct  qpid::framing::Window

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


Functions

int32_t qpid::framing::operator- (const SequenceNumber &a, const SequenceNumber &b)
std::ostreamqpid::framing::operator<< (std::ostream &o, const SequenceNumber &n)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00455.html0000664000076400007640000001515411752725717017331 0ustar00jrossjross00000000000000 qpid/amqp_0_10/Codecs.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/amqp_0_10/Codecs.h File Reference

Go to the source code of this file.

Classes

class  qpid::amqp_0_10::MapCodec
 Codec for encoding/decoding a map of Variants using the AMQP 0-10 map encoding. More...
class  qpid::amqp_0_10::ListCodec
 Codec for encoding/decoding a list of Variants using the AMQP 0-10 list encoding. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  qpid::amqp_0_10

Functions

void qpid::amqp_0_10::translate (const qpid::types::Variant::Map &from, qpid::framing::FieldTable &to)
void qpid::amqp_0_10::translate (const qpid::framing::FieldTable &from, qpid::types::Variant::Map &to)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00851.html0000664000076400007640000001415211752725720017320 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::ResolutionError Member List
This is the complete list of members for qpid::messaging::ResolutionError, including all inherited members.
AddressError(const std::string &)qpid::messaging::AddressError
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
LinkError(const std::string &)qpid::messaging::LinkError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
ResolutionError(const std::string &msg)qpid::messaging::ResolutionError
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00525.html0000664000076400007640000001177411752725717017333 0ustar00jrossjross00000000000000 qpid/framing/XaResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/XaResult.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::XaResult

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00450_source.html0000664000076400007640000003563211752725717020707 0ustar00jrossjross00000000000000 qpid/client/Subscription.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Subscription.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_SUBSCRIPTION_H
00002 #define QPID_CLIENT_SUBSCRIPTION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/client/Handle.h"
00026 #include "qpid/client/Session.h"
00027 #include "qpid/client/SubscriptionSettings.h"
00028 #include "qpid/client/Message.h"
00029 #include "qpid/client/ClientImportExport.h"
00030 
00031 namespace qpid {
00032 namespace client {
00033 
00034 template <class> class PrivateImplRef;
00035 class SubscriptionImpl;
00036 class SubscriptionManager;
00037 
00042 class QPID_CLIENT_CLASS_EXTERN Subscription : public Handle<SubscriptionImpl> {
00043   public:
00044     QPID_CLIENT_EXTERN Subscription(SubscriptionImpl* = 0);
00045     QPID_CLIENT_EXTERN Subscription(const Subscription&);
00046     QPID_CLIENT_EXTERN ~Subscription();
00047     QPID_CLIENT_EXTERN Subscription& operator=(const Subscription&);
00048 
00049 
00053     QPID_CLIENT_EXTERN std::string getName() const;
00054 
00056     QPID_CLIENT_EXTERN std::string getQueue() const;
00057 
00059     QPID_CLIENT_EXTERN const SubscriptionSettings& getSettings() const;
00060 
00062     QPID_CLIENT_EXTERN void setFlowControl(const FlowControl&);
00063 
00068     QPID_CLIENT_EXTERN void setAutoAck(unsigned int n);
00069 
00073     QPID_CLIENT_EXTERN SequenceSet getUnacquired() const;
00074 
00076     QPID_CLIENT_EXTERN SequenceSet getUnaccepted() const;
00077 
00081     QPID_CLIENT_EXTERN void acquire(const SequenceSet& messageIds);
00082 
00086     QPID_CLIENT_EXTERN void accept(const SequenceSet& messageIds);
00087 
00091     QPID_CLIENT_EXTERN void release(const SequenceSet& messageIds);
00092 
00093     /* Acquire a single message */
00094     QPID_CLIENT_INLINE_EXTERN void acquire(const Message& m) { acquire(SequenceSet(m.getId())); }
00095 
00096     /* Accept a single message */
00097     QPID_CLIENT_INLINE_EXTERN void accept(const Message& m) { accept(SequenceSet(m.getId())); }
00098 
00099     /* Release a single message */
00100     QPID_CLIENT_INLINE_EXTERN void release(const Message& m) { release(SequenceSet(m.getId())); }
00101 
00103     QPID_CLIENT_EXTERN Session getSession() const;
00104 
00106     QPID_CLIENT_EXTERN SubscriptionManager getSubscriptionManager();
00107 
00109     QPID_CLIENT_EXTERN void cancel();
00110 
00112     QPID_CLIENT_EXTERN void grantMessageCredit(uint32_t);
00113 
00115     QPID_CLIENT_EXTERN void grantByteCredit(uint32_t);
00116 
00117   private:
00118   friend class PrivateImplRef<Subscription>;
00119   friend class SubscriptionManager;
00120 };
00121 }} // namespace qpid::client
00122 
00123 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00806.html0000664000076400007640000001372311752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::TransportBusyException Member List
This is the complete list of members for qpid::framing::TransportBusyException, including all inherited members.
ChannelException(framing::session::DetachCode _code, const std::string &message)qpid::ChannelException [inline]
codeqpid::ChannelException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::TransportBusyException [inline, virtual]
TransportBusyException(const std::string &msg=std::string())qpid::framing::TransportBusyException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00109.html0000664000076400007640000006647711752725720017335 0ustar00jrossjross00000000000000 qpid::console::Event Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Event Class Reference

#include <qpid/console/Event.h>

List of all members.

Public Types

enum  Severity {
  SEV_EMERGENCY = 0, SEV_ALERT = 1, SEV_CRITICAL = 2, SEV_ERROR = 3,
  SEV_WARNING = 4, SEV_NOTICE = 5, SEV_INFO = 6, SEV_DEBUG = 7
}

Public Member Functions

 Event (Broker *broker, SchemaClass *schemaClass, framing::Buffer &buffer)
BrokergetBroker () const
const ClassKeygetClassKey () const
SchemaClassgetSchema () const
const Object::AttributeMapgetAttributes () const
uint64_t getTimestamp () const
uint8_t getSeverity () const
std::string getSeverityString () const
ObjectId attrRef (const std::string &key) const
uint32_t attrUint (const std::string &key) const
int32_t attrInt (const std::string &key) const
uint64_t attrUint64 (const std::string &key) const
int64_t attrInt64 (const std::string &key) const
std::string attrString (const std::string &key) const
bool attrBool (const std::string &key) const
float attrFloat (const std::string &key) const
double attrDouble (const std::string &key) const
framing::Uuid attrUuid (const std::string &key) const
framing::FieldTable attrMap (const std::string &key) const

Member Enumeration Documentation

Enumerator:
SEV_EMERGENCY 
SEV_ALERT 
SEV_CRITICAL 
SEV_ERROR 
SEV_WARNING 
SEV_NOTICE 
SEV_INFO 
SEV_DEBUG 

Definition at line 45 of file Event.h.


Constructor & Destructor Documentation

qpid::console::Event::Event ( Broker broker,
SchemaClass schemaClass,
framing::Buffer buffer 
)

Member Function Documentation

bool qpid::console::Event::attrBool ( const std::string key) const
double qpid::console::Event::attrDouble ( const std::string key) const
float qpid::console::Event::attrFloat ( const std::string key) const
int32_t qpid::console::Event::attrInt ( const std::string key) const
int64_t qpid::console::Event::attrInt64 ( const std::string key) const
framing::FieldTable qpid::console::Event::attrMap ( const std::string key) const
ObjectId qpid::console::Event::attrRef ( const std::string key) const
std::string qpid::console::Event::attrString ( const std::string key) const
uint32_t qpid::console::Event::attrUint ( const std::string key) const
uint64_t qpid::console::Event::attrUint64 ( const std::string key) const
framing::Uuid qpid::console::Event::attrUuid ( const std::string key) const
const Object::AttributeMap& qpid::console::Event::getAttributes ( ) const [inline]

Definition at line 56 of file Event.h.

Broker* qpid::console::Event::getBroker ( ) const [inline]

Definition at line 53 of file Event.h.

const ClassKey& qpid::console::Event::getClassKey ( ) const
SchemaClass* qpid::console::Event::getSchema ( ) const [inline]

Definition at line 55 of file Event.h.

uint8_t qpid::console::Event::getSeverity ( ) const [inline]

Definition at line 58 of file Event.h.

std::string qpid::console::Event::getSeverityString ( ) const
uint64_t qpid::console::Event::getTimestamp ( ) const [inline]

Definition at line 57 of file Event.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00704.html0000664000076400007640000004731011752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::no_keyword::Session_0_10 Member List
This is the complete list of members for qpid::client::no_keyword::Session_0_10, including all inherited members.
close()qpid::client::SessionBase_0_10
dtxCommit(const Xid &xid=Xid(), bool onePhase=false, bool sync=true)qpid::client::no_keyword::Session_0_10
dtxEnd(const Xid &xid=Xid(), bool fail=false, bool suspend=false, bool sync=true)qpid::client::no_keyword::Session_0_10
dtxForget(const Xid &xid=Xid(), bool sync=true)qpid::client::no_keyword::Session_0_10
dtxGetTimeout(const Xid &xid=Xid(), bool sync=true)qpid::client::no_keyword::Session_0_10
dtxPrepare(const Xid &xid=Xid(), bool sync=true)qpid::client::no_keyword::Session_0_10
dtxRecover(bool sync=true)qpid::client::no_keyword::Session_0_10
dtxRollback(const Xid &xid=Xid(), bool sync=true)qpid::client::no_keyword::Session_0_10
dtxSelect(bool sync=true)qpid::client::no_keyword::Session_0_10
dtxSetTimeout(const Xid &xid=Xid(), uint32_t timeout=0, bool sync=true)qpid::client::no_keyword::Session_0_10
dtxStart(const Xid &xid=Xid(), bool join=false, bool resume=false, bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeBind(const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeBound(const std::string &exchange=std::string(), const std::string &queue=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeDeclare(const std::string &exchange=std::string(), const std::string &type=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeDelete(const std::string &exchange=std::string(), bool ifUnused=false, bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeQuery(const std::string &name=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeUnbind(const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
executionException(uint16_t errorCode=0, const SequenceNumber &commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string &description=std::string(), const FieldTable &errorInfo=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
executionResult(const SequenceNumber &commandId=SequenceNumber(), const std::string &value=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
executionSync(bool sync=true)qpid::client::no_keyword::Session_0_10
flush()qpid::client::SessionBase_0_10
getChannel() const qpid::client::SessionBase_0_10
getConnection()qpid::client::SessionBase_0_10
getId() const qpid::client::SessionBase_0_10
implqpid::client::SessionBase_0_10 [protected]
isValid() const qpid::client::SessionBase_0_10
markCompleted(const framing::SequenceSet &ids, bool notifyPeer)qpid::client::SessionBase_0_10
markCompleted(const framing::SequenceNumber &id, bool cumulative, bool notifyPeer)qpid::client::SessionBase_0_10
messageAccept(const SequenceSet &transfers=SequenceSet(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageAcquire(const SequenceSet &transfers=SequenceSet(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageCancel(const std::string &destination=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageFlow(const std::string &destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=true)qpid::client::no_keyword::Session_0_10
messageFlush(const std::string &destination=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageReject(const SequenceSet &transfers=SequenceSet(), uint16_t code=0, const std::string &text=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageRelease(const SequenceSet &transfers=SequenceSet(), bool setRedelivered=false, bool sync=true)qpid::client::no_keyword::Session_0_10
messageResume(const std::string &destination=std::string(), const std::string &resumeId=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageSetFlowMode(const std::string &destination=std::string(), uint8_t flowMode=0, bool sync=true)qpid::client::no_keyword::Session_0_10
messageStop(const std::string &destination=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageSubscribe(const std::string &queue=std::string(), const std::string &destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string &resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageTransfer(const std::string &destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message &content=Message(std::string()), bool sync=true)qpid::client::no_keyword::Session_0_10
operator=(const SessionBase_0_10 &other)qpid::client::no_keyword::Session_0_10
queueDeclare(const std::string &queue=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
queueDelete(const std::string &queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=true)qpid::client::no_keyword::Session_0_10
queuePurge(const std::string &queue=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
queueQuery(const std::string &queue=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
resume(Connection)qpid::client::SessionBase_0_10
sendCompletion()qpid::client::SessionBase_0_10
Session_0_10()qpid::client::no_keyword::Session_0_10
Session_0_10(const SessionBase_0_10 &other)qpid::client::no_keyword::Session_0_10
SessionBase_0_10()qpid::client::SessionBase_0_10
suspend()qpid::client::SessionBase_0_10
sync()qpid::client::SessionBase_0_10
timeout(uint32_t seconds)qpid::client::SessionBase_0_10
txCommit(bool sync=true)qpid::client::no_keyword::Session_0_10
txRollback(bool sync=true)qpid::client::no_keyword::Session_0_10
txSelect(bool sync=true)qpid::client::no_keyword::Session_0_10
~SessionBase_0_10()qpid::client::SessionBase_0_10

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00489.html0000664000076400007640000001430311752725717017333 0ustar00jrossjross00000000000000 qpid/console/SessionManager.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/SessionManager.h File Reference

Go to the source code of this file.

Classes

class  qpid::console::SessionManager
struct  qpid::console::SessionManager::Settings

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::console

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00428.html0000664000076400007640000001317011752725717017325 0ustar00jrossjross00000000000000 qmf/engine/ResilientConnection.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/ResilientConnection.h File Reference
#include <qmf/engine/Message.h>
#include <qmf/engine/ConnectionSettings.h>
#include <string>

Go to the source code of this file.

Classes

struct  qmf::engine::ResilientConnectionEvent
 Represents events that occur, unsolicited, from ResilientConnection. More...
class  qmf::engine::SessionHandle
class  qmf::engine::ResilientConnection
 ResilientConnection represents a Qpid connection that is resilient. More...

Namespaces

namespace  qmf
namespace  qmf::engine

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00193.html0000664000076400007640000006234011752725717017327 0ustar00jrossjross00000000000000 qpid::client::LocalQueue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::LocalQueue Class Reference

A local queue to collect messages retrieved from a remote broker queue. More...

#include <qpid/client/LocalQueue.h>

List of all members.

Public Member Functions

 LocalQueue ()
 Create a local queue.
 LocalQueue (const LocalQueue &)
 ~LocalQueue ()
LocalQueueoperator= (const LocalQueue &)
bool get (Message &result, sys::Duration timeout=0)
 Wait up to timeout for the next message from the local queue.
Message get (sys::Duration timeout=sys::TIME_INFINITE)
 Get the next message off the local queue, or wait up to the timeout for message from the broker queue.
Message pop (sys::Duration timeout=sys::TIME_INFINITE)
 Synonym for get()
bool empty () const
 Return true if local queue is empty.
size_t size () const
 Number of messages on the local queue.
 LocalQueue (LocalQueueImpl *)
QPID_CLIENT_INLINE_EXTERN bool isValid () const
QPID_CLIENT_INLINE_EXTERN bool isNull () const
QPID_CLIENT_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_CLIENT_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Attributes

Impl * impl

Detailed Description

A local queue to collect messages retrieved from a remote broker queue.

Create a queue and subscribe it using the SubscriptionManager. Messages from the remote queue on the broker will be stored in the local queue until you retrieve them.

Using a Local Queue

 LocalQueue local_queue;
 subscriptions.subscribe(local_queue, string("message_queue"));
 for (int i=0; i<10; i++) {
   Message message = local_queue.get();
   std::cout << message.getData() << std::endl;
 }
 

Getting Messages

  • get()

    Message message = local_queue.get();
    // Specifying timeouts (TIME_SEC, TIME_MSEC, TIME_USEC, TIME_NSEC)
    #include <qpid/sys/Time.h>
    Message message;
    local_queue.get(message, 5*sys::TIME_SEC);

Checking size

  • empty()

    if (local_queue.empty()) { ... }
  • size()

    std::cout << local_queue.size();

Constructor & Destructor Documentation

qpid::client::LocalQueue::LocalQueue ( )

Create a local queue.

Subscribe the local queue to a remote broker queue with a SubscriptionManager.

LocalQueue is an alternative to implementing a MessageListener.

qpid::client::LocalQueue::LocalQueue ( const LocalQueue )
qpid::client::LocalQueue::~LocalQueue ( )
qpid::client::LocalQueue::LocalQueue ( LocalQueueImpl *  )

Member Function Documentation

bool qpid::client::LocalQueue::empty ( ) const

Return true if local queue is empty.

bool qpid::client::LocalQueue::get ( Message result,
sys::Duration  timeout = 0 
)

Wait up to timeout for the next message from the local queue.

Parameters:
resultSet to the message from the queue.
timeoutwait up this timeout for a message to appear.
Returns:
true if result was set, false if queue was empty after timeout.
Message qpid::client::LocalQueue::get ( sys::Duration  timeout = sys::TIME_INFINITE)

Get the next message off the local queue, or wait up to the timeout for message from the broker queue.

Parameters:
timeoutwait up this timeout for a message to appear.
Returns:
message from the queue.
Exceptions:
ClosedExceptionif subscription is closed or timeout exceeded.
QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN qpid::client::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

LocalQueue& qpid::client::LocalQueue::operator= ( const LocalQueue )
Message qpid::client::LocalQueue::pop ( sys::Duration  timeout = sys::TIME_INFINITE)

Synonym for get()

size_t qpid::client::LocalQueue::size ( ) const

Number of messages on the local queue.

void qpid::client::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.


Member Data Documentation

Impl* qpid::client::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00158.html0000664000076400007640000007770111752725720017331 0ustar00jrossjross00000000000000 qpid::console::IntValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::IntValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 IntValue (int32_t v)
std::string str () const
bool isInt () const
int32_t asInt () const
bool isInt64 () const
int64_t asInt64 () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isUint64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual uint64_t asUint64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::IntValue::IntValue ( int32_t  v) [inline]

Definition at line 109 of file Value.h.


Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

int32_t qpid::console::IntValue::asInt ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 112 of file Value.h.

int64_t qpid::console::IntValue::asInt64 ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 114 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

bool qpid::console::IntValue::isInt ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 111 of file Value.h.

bool qpid::console::IntValue::isInt64 ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 113 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::IntValue::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00438_source.html0000664000076400007640000002724411752725717020715 0ustar00jrossjross00000000000000 qpid/client/Handle.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Handle.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_HANDLE_H
00002 #define QPID_CLIENT_HANDLE_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/client/ClientImportExport.h"
00026 
00027 namespace qpid {
00028 namespace client {
00029 
00030 template <class> class PrivateImplRef;
00031 
00039 template <class T> class Handle {
00040   public:
00041 
00043     QPID_CLIENT_INLINE_EXTERN bool isValid() const { return impl; }
00044 
00046     QPID_CLIENT_INLINE_EXTERN bool isNull() const { return !impl; }
00047 
00049     QPID_CLIENT_INLINE_EXTERN operator bool() const { return impl; }
00050 
00052     QPID_CLIENT_INLINE_EXTERN bool operator !() const { return !impl; }
00053 
00054     void swap(Handle<T>& h) { T* t = h.impl; h.impl = impl; impl = t; }
00055 
00056   protected:
00057     typedef T Impl;
00058     QPID_CLIENT_INLINE_EXTERN Handle() :impl() {}
00059 
00060     // Not implemented,subclasses must implement.
00061     QPID_CLIENT_EXTERN Handle(const Handle&);
00062     QPID_CLIENT_EXTERN Handle& operator=(const Handle&);
00063 
00064     Impl* impl;
00065 
00066   friend class PrivateImplRef<T>; // FIXME aconway 2009-04-30: Specify
00067 };
00068 
00069 }} // namespace qpid::client
00070 
00071 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x71.html0000664000076400007640000002230511752725717022311 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00318.html0000664000076400007640000003542411752725720017323 0ustar00jrossjross00000000000000 qpid::log::Selector Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Selector Class Reference

A selector identifies the set of log messages to enable. More...

#include <qpid/log/Selector.h>

List of all members.

Public Member Functions

 Selector ()
 Empty selector selects nothing.
 Selector (const Options &)
 Set selector from Options.
 Selector (Level l, const std::string &s=std::string())
 Equavlient to: Selector s; s.enable(l, s)
 Selector (const std::string &enableStr)
void enable (Level level, const std::string &substring=std::string())
 Enable messages with level in levels where the file name contains substring.
void enable (const std::string &enableStr)
 Enable based on a 'level[+]:file' string.
bool isEnabled (Level level, const char *function)
 True if level is enabled for file.

Detailed Description

A selector identifies the set of log messages to enable.

Thread object unsafe, pass-by-value type.


Constructor & Destructor Documentation

qpid::log::Selector::Selector ( ) [inline]

Empty selector selects nothing.

Definition at line 38 of file Selector.h.

qpid::log::Selector::Selector ( const Options )

Set selector from Options.

qpid::log::Selector::Selector ( Level  l,
const std::string s = std::string() 
) [inline]

Equavlient to: Selector s; s.enable(l, s)

Definition at line 44 of file Selector.h.

References enable().

qpid::log::Selector::Selector ( const std::string enableStr) [inline]

Definition at line 48 of file Selector.h.

References enable().


Member Function Documentation

void qpid::log::Selector::enable ( Level  level,
const std::string substring = std::string() 
) [inline]

Enable messages with level in levels where the file name contains substring.

Empty string matches all.

Definition at line 53 of file Selector.h.

Referenced by Selector().

void qpid::log::Selector::enable ( const std::string enableStr)

Enable based on a 'level[+]:file' string.

bool qpid::log::Selector::isEnabled ( Level  level,
const char *  function 
)

True if level is enabled for file.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00423_source.html0000664000076400007640000003176711752725717020714 0ustar00jrossjross00000000000000 qmf/engine/ObjectId.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/ObjectId.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineObjectId_
00002 #define _QmfEngineObjectId_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <qpid/sys/IntegerTypes.h>
00024 
00025 namespace qmf {
00026 namespace engine {
00027 
00028     // TODO: Add to/from string and << operator
00029 
00030     struct ObjectIdImpl;
00031     class ObjectId {
00032     public:
00033         ObjectId();
00034         ObjectId(const ObjectId& from);
00035         ~ObjectId();
00036 
00037         uint64_t getObjectNum() const;
00038         uint32_t getObjectNumHi() const;
00039         uint32_t getObjectNumLo() const;
00040         bool isDurable() const;
00041         const char* str() const;
00042         uint8_t getFlags() const;
00043         uint16_t getSequence() const;
00044         uint32_t getBrokerBank() const;
00045         uint32_t getAgentBank() const;
00046 
00047         bool operator==(const ObjectId& other) const;
00048         bool operator<(const ObjectId& other) const;
00049         bool operator>(const ObjectId& other) const;
00050         bool operator<=(const ObjectId& other) const;
00051         bool operator>=(const ObjectId& other) const;
00052         ObjectId& operator=(const ObjectId &other);
00053 
00054     private:
00055         friend struct ObjectIdImpl;
00056         friend struct ObjectImpl;
00057         friend class  BrokerProxyImpl;
00058         friend struct QueryImpl;
00059         friend struct ValueImpl;
00060         friend class  AgentImpl;
00061         ObjectId(ObjectIdImpl* impl);
00062         ObjectIdImpl* impl;
00063     };
00064 }
00065 }
00066 
00067 #endif
00068 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00729.html0000664000076400007640000002411011752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::UintValue Member List
This is the complete list of members for qpid::console::UintValue, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::UintValue [inline, virtual]
asUint64() const qpid::console::UintValue [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::UintValue [inline, virtual]
isUint64() const qpid::console::UintValue [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
str() const qpid::console::UintValue [virtual]
UintValue(uint32_t v)qpid::console::UintValue [inline]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00711.html0000664000076400007640000001121511752725720017310 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::MethodResponse Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00873.html0000664000076400007640000002777111752725720017337 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Session Member List
This is the complete list of members for qpid::messaging::Session, including all inherited members.
acknowledge(bool sync=false)qpid::messaging::Session
acknowledge(Message &, bool sync=false)qpid::messaging::Session
acknowledgeUpTo(Message &, bool sync=false)qpid::messaging::Session
checkError()qpid::messaging::Session
close()qpid::messaging::Session
commit()qpid::messaging::Session
createReceiver(const Address &address)qpid::messaging::Session
createReceiver(const std::string &address)qpid::messaging::Session
createSender(const Address &address)qpid::messaging::Session
createSender(const std::string &address)qpid::messaging::Session
getConnection() const qpid::messaging::Session
getReceivable()qpid::messaging::Session
getReceiver(const std::string &name) const qpid::messaging::Session
getSender(const std::string &name) const qpid::messaging::Session
getUnsettledAcks()qpid::messaging::Session
Handle()qpid::messaging::Handle< SessionImpl > [inline, protected]
Handle(const Handle &)qpid::messaging::Handle< SessionImpl > [protected]
hasError()qpid::messaging::Session
implqpid::messaging::Handle< SessionImpl > [protected]
Impl typedefqpid::messaging::Handle< SessionImpl > [protected]
isNull() const qpid::messaging::Handle< SessionImpl > [inline]
isValid() const qpid::messaging::Handle< SessionImpl > [inline]
nextReceiver(Receiver &, Duration timeout=Duration::FOREVER)qpid::messaging::Session
nextReceiver(Duration timeout=Duration::FOREVER)qpid::messaging::Session
operator bool() const qpid::messaging::Handle< SessionImpl > [inline]
operator!() const qpid::messaging::Handle< SessionImpl > [inline]
operator=(const Session &)qpid::messaging::Session
Handle< SessionImpl >::operator=(const Handle &)qpid::messaging::Handle< SessionImpl > [protected]
reject(Message &)qpid::messaging::Session
release(Message &)qpid::messaging::Session
rollback()qpid::messaging::Session
Session(SessionImpl *impl=0)qpid::messaging::Session
Session(const Session &)qpid::messaging::Session
swap(Handle< T > &h)qpid::messaging::Handle< SessionImpl > [inline]
sync(bool block=true)qpid::messaging::Session
~Session()qpid::messaging::Session

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00071.html0000664000076400007640000010252611752725717017323 0ustar00jrossjross00000000000000 qmf::ConsoleSession Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::ConsoleSession Class Reference

#include <qmf/ConsoleSession.h>

List of all members.

Public Member Functions

 ConsoleSession (ConsoleSessionImpl *impl=0)
 ConsoleSession (const ConsoleSession &)
ConsoleSessionoperator= (const ConsoleSession &)
 ~ConsoleSession ()
 ConsoleSession (qpid::messaging::Connection &conn, const std::string &options="")
 ConsoleSession A session that runs over an AMQP connection for QMF console operation.
void setDomain (const std::string &domain)
 setDomain - Change the QMF domain that this console will operate in.
void setAgentFilter (const std::string &filter)
void open ()
 Open the console session.
void close ()
 Close the session.
bool nextEvent (ConsoleEvent &outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER)
 Get the next event from the console session.
int pendingEvents () const
 Return the number of events pending for nextEvent.
uint32_t getAgentCount () const
 getAgentCount, getAgent - Retrieve the set of agents that match the console session's agent filter.
Agent getAgent (uint32_t agentIndex) const
Agent getConnectedBrokerAgent () const
 Get the agent for the connected broker (i.e.
Subscription subscribe (const Query &query, const std::string &agentFilter="", const std::string &options="")
 Create a subscription that involves a subset of the known agents.
Subscription subscribe (const std::string &query, const std::string &agentFilter="", const std::string &options="")
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::ConsoleSession::ConsoleSession ( ConsoleSessionImpl *  impl = 0)
qmf::ConsoleSession::ConsoleSession ( const ConsoleSession )
qmf::ConsoleSession::~ConsoleSession ( )
qmf::ConsoleSession::ConsoleSession ( qpid::messaging::Connection conn,
const std::string options = "" 
)

ConsoleSession A session that runs over an AMQP connection for QMF console operation.

Parameters:
connection- An opened qpid::messaging::Connection
options- An optional string containing options

The options string is of the form "{key:value,key:value}". The following keys are supported:

domain:NAME - QMF Domain to join [default: "default"] max-agent-age:N - Maximum time, in minutes, that we will tolerate not hearing from an agent before deleting it [default: 5] listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default] If False: Listen only on the routable direct address strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network

  • If False: Operate more flexibly with regard to use of messaging facilities [default] max-thread-wait-time:N - Time (in seconds) the session thread will wait for messages from the network between periodic background processing passes. Must not be greater than 60. Larger numbers will cause fewer wake-ups but will increase the time it takes to shut down the process. [default: 5]

Member Function Documentation

void qmf::ConsoleSession::close ( )

Close the session.

Once closed, the session no longer communicates on the messaging network.

Agent qmf::ConsoleSession::getAgent ( uint32_t  agentIndex) const
uint32_t qmf::ConsoleSession::getAgentCount ( ) const

getAgentCount, getAgent - Retrieve the set of agents that match the console session's agent filter.

Agent qmf::ConsoleSession::getConnectedBrokerAgent ( ) const

Get the agent for the connected broker (i.e.

the agent embedded in the broker to which we have a connection).

QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

bool qmf::ConsoleSession::nextEvent ( ConsoleEvent outEvent,
qpid::messaging::Duration  timeout = qpid::messaging::Duration::FOREVER 
)

Get the next event from the console session.

Events represent actions that must be acted upon by the console application. This method blocks for up to the timeout if there are no events to be handled. This method will typically be the focus of the console application's main execution loop. If the timeout is set to Duration::IMMEDIATE, the call will not block.

void qmf::ConsoleSession::open ( )

Open the console session.

After opening the session, the domain cannot be changed.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

ConsoleSession& qmf::ConsoleSession::operator= ( const ConsoleSession )
int qmf::ConsoleSession::pendingEvents ( ) const

Return the number of events pending for nextEvent.

This method will never block.

void qmf::ConsoleSession::setAgentFilter ( const std::string filter)
void qmf::ConsoleSession::setDomain ( const std::string domain)

setDomain - Change the QMF domain that this console will operate in.

If this is not called, the domain will be "default". Agents in a domain can be seen only by consoles in the same domain. This must be called prior to opening the console session.

Subscription qmf::ConsoleSession::subscribe ( const Query query,
const std::string agentFilter = "",
const std::string options = "" 
)

Create a subscription that involves a subset of the known agents.

The set of known agents is defined by the session's agent-filter (see setAgentFilter). The agentFilter argument to the subscribe method is used to further refine the set of agents. If agentFilter is the empty string (i.e. match-all) the subscription will involve all known agents. If agentFilter is non-empty, it will be applied only to the set of known agents. A subscription cannot be created that involves an agent not known by the session.

Subscription qmf::ConsoleSession::subscribe ( const std::string query,
const std::string agentFilter = "",
const std::string options = "" 
)
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00542_source.html0000664000076400007640000005411411752725717020705 0ustar00jrossjross00000000000000 qpid/sys/windows/Mutex.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/Mutex.h
Go to the documentation of this file.
00001 #ifndef _sys_windows_Mutex_h
00002 #define _sys_windows_Mutex_h
00003 
00004 /*
00005  *
00006  * Copyright (c) 2008 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/sys/windows/check.h"
00023 
00024 #include <boost/version.hpp>
00025 #if (BOOST_VERSION < 103500)
00026 #error The Windows port requires Boost version 1.35.0 or later
00027 #endif
00028 
00029 #include <boost/noncopyable.hpp>
00030 #include <boost/thread/recursive_mutex.hpp>
00031 #include <boost/thread/shared_mutex.hpp>
00032 #include <boost/thread/thread_time.hpp>
00033 #include <boost/thread/tss.hpp>
00034 
00035 namespace qpid {
00036 namespace sys {
00037 
00038 class Condition;
00039 
00043 class Mutex : private boost::noncopyable {
00044     friend class Condition;
00045 
00046 public:
00047     typedef ::qpid::sys::ScopedLock<Mutex> ScopedLock;
00048     typedef ::qpid::sys::ScopedUnlock<Mutex> ScopedUnlock;
00049      
00050     inline Mutex();
00051     inline ~Mutex();
00052     inline void lock();  
00053     inline void unlock();
00054     inline bool trylock();  
00055 
00056 
00057 protected:
00058     boost::recursive_mutex mutex;
00059 };
00060 
00064 class RWlock : private boost::noncopyable {
00065     friend class Condition;
00066 
00067 public:
00068     typedef ::qpid::sys::ScopedRlock<RWlock> ScopedRlock;
00069     typedef ::qpid::sys::ScopedWlock<RWlock> ScopedWlock;
00070     
00071     inline RWlock();
00072     inline ~RWlock();
00073     inline void wlock();  // will write-lock
00074     inline void rlock();  // will read-lock
00075     inline void unlock();
00076     inline void trywlock();  // will write-try
00077     inline void tryrlock();  // will read-try
00078 
00079 protected:
00080     boost::shared_mutex rwMutex;
00081     boost::thread_specific_ptr<bool> haveWrite;
00082 
00083     inline bool &write (void);
00084 };
00085 
00086 
00091 struct PODMutex 
00092 {
00093     typedef ::qpid::sys::ScopedLock<PODMutex> ScopedLock;
00094 
00095     inline void lock();  
00096     inline void unlock();
00097     inline bool trylock();  
00098 
00099     // Must be public to be a POD:
00100     boost::recursive_mutex mutex;
00101 };
00102 
00103 #define QPID_MUTEX_INITIALIZER 0
00104 
00105 void PODMutex::lock() {
00106     mutex.lock();
00107 }
00108 
00109 void PODMutex::unlock() {
00110     mutex.unlock();
00111 }
00112 
00113 bool PODMutex::trylock() {
00114     return mutex.try_lock();
00115 }
00116 
00117 Mutex::Mutex() {
00118 }
00119 
00120 Mutex::~Mutex(){
00121 }
00122 
00123 void Mutex::lock() {
00124     mutex.lock();
00125 }
00126 
00127 void Mutex::unlock() {
00128     mutex.unlock();
00129 }
00130 
00131 bool Mutex::trylock() {
00132     return mutex.try_lock();
00133 }
00134 
00135 
00136 RWlock::RWlock() {
00137 }
00138 
00139 RWlock::~RWlock(){
00140 }
00141 
00142 void RWlock::wlock() {
00143     bool &writer = write();
00144     rwMutex.lock();
00145     writer = true;    // Remember this thread has write lock held.
00146 }
00147 
00148 void RWlock::rlock() {
00149     bool &writer = write();
00150     rwMutex.lock_shared();
00151     writer = false;   // Remember this thread has shared lock held.
00152 }
00153 
00154 void RWlock::unlock() {
00155     bool &writer = write();
00156     if (writer)
00157         rwMutex.unlock();
00158     else
00159         rwMutex.unlock_shared();
00160 }
00161 
00162 void RWlock::trywlock() {
00163     bool &writer = write();
00164     // shared_mutex::try_lock() seems to not be available... emulate it with
00165     // a timed lock().
00166     boost::system_time now = boost::get_system_time();
00167     if (rwMutex.timed_lock(now))
00168         writer = true;
00169 }
00170 
00171 void RWlock::tryrlock() {
00172     bool &writer = write();
00173     if (rwMutex.try_lock_shared())
00174         writer = false;
00175 }
00176 
00177 bool & RWlock::write (void) {
00178     // Accessing thread-specific and stack-local info, so no locks needed.
00179     bool *writePtr = haveWrite.get();
00180     if (writePtr == 0) {
00181         writePtr = new bool(false);
00182         haveWrite.reset(writePtr);
00183     }
00184     return *writePtr;
00185 }
00186 
00187 }}
00188 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00481_source.html0000664000076400007640000002022211752725717020700 0ustar00jrossjross00000000000000 qpid/client/TypedResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/TypedResult.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 
00022 #ifndef _TypedResult_
00023 #define _TypedResult_
00024 
00025 #include "qpid/client/Completion.h"
00026 #include "qpid/framing/StructHelper.h"
00027 
00028 namespace qpid {
00029 namespace client {
00030 
00036 template <class T> class TypedResult : public Completion
00037 {
00038     T result;
00039     bool decoded;
00040 
00041 public:
00043     TypedResult(const Completion& c) : Completion(c), decoded(false) {}
00044 
00053     T& get() {
00054         if (!decoded) {
00055             framing::StructHelper helper;
00056             helper.decode(result, getResult());
00057             decoded = true;
00058         }
00059         return result;
00060     }
00061 };
00062 
00063 }}
00064 
00065 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00736.html0000664000076400007640000002411611752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::DoubleValue Member List
This is the complete list of members for qpid::console::DoubleValue, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::DoubleValue [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
DoubleValue(double v)qpid::console::DoubleValue [inline]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::DoubleValue [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
str() const qpid::console::DoubleValue [virtual]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00374.html0000664000076400007640000004407711752725720017331 0ustar00jrossjross00000000000000 qpid::framing::Uuid Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Uuid Struct Reference

A UUID is represented as a boost::array of 16 bytes. More...

#include <qpid/framing/Uuid.h>

List of all members.

Public Member Functions

 Uuid (bool unique=false)
 If unique is true, generate a unique ID else a null ID.
 Uuid (const uint8_t *data)
 Copy from 16 bytes of data.
void assign (const uint8_t *data)
 Copy from 16 bytes of data.
void generate ()
 Set to a new unique identifier.
void clear ()
 Set to all zeros.
bool isNull () const
 Test for null (all zeros).
QPID_COMMON_INLINE_EXTERN operator bool () const
QPID_COMMON_INLINE_EXTERN bool operator! () const
void encode (framing::Buffer &buf) const
void decode (framing::Buffer &buf)
QPID_COMMON_INLINE_EXTERN uint32_t encodedSize () const
std::string str () const
 String value in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.
template<class S >
void serialize (S &s)

Detailed Description

A UUID is represented as a boost::array of 16 bytes.

Full value semantics, operators ==, < etc. are provided by boost::array so Uuid can be the key type in a map etc.

TODO: change this implementation as it leaks boost into the client API


Constructor & Destructor Documentation

qpid::framing::Uuid::Uuid ( bool  unique = false)

If unique is true, generate a unique ID else a null ID.

qpid::framing::Uuid::Uuid ( const uint8_t data)

Copy from 16 bytes of data.


Member Function Documentation

void qpid::framing::Uuid::assign ( const uint8_t data)

Copy from 16 bytes of data.

void qpid::framing::Uuid::clear ( )

Set to all zeros.

void qpid::framing::Uuid::decode ( framing::Buffer buf)
void qpid::framing::Uuid::encode ( framing::Buffer buf) const
QPID_COMMON_INLINE_EXTERN uint32_t qpid::framing::Uuid::encodedSize ( ) const [inline]

Definition at line 70 of file Uuid.h.

void qpid::framing::Uuid::generate ( )

Set to a new unique identifier.

bool qpid::framing::Uuid::isNull ( ) const

Test for null (all zeros).

Referenced by operator bool(), and operator!().

QPID_COMMON_INLINE_EXTERN qpid::framing::Uuid::operator bool ( ) const [inline]

Definition at line 65 of file Uuid.h.

References isNull().

QPID_COMMON_INLINE_EXTERN bool qpid::framing::Uuid::operator! ( ) const [inline]

Definition at line 66 of file Uuid.h.

References isNull().

template<class S >
void qpid::framing::Uuid::serialize ( S &  s) [inline]

Definition at line 76 of file Uuid.h.

std::string qpid::framing::Uuid::str ( ) const

String value in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.

Referenced by qpid::console::UuidValue::str().


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00682.html0000664000076400007640000001230511752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FailoverManager Member List
This is the complete list of members for qpid::client::FailoverManager, including all inherited members.
close()qpid::client::FailoverManager
connect(std::vector< Url > brokers=std::vector< Url >())qpid::client::FailoverManager
execute(Command &)qpid::client::FailoverManager
FailoverManager(const ConnectionSettings &settings, ReconnectionStrategy *strategy=0)qpid::client::FailoverManager
getConnection()qpid::client::FailoverManager

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00481.html0000664000076400007640000001165711752725717017334 0ustar00jrossjross00000000000000 qpid/client/TypedResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/TypedResult.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::TypedResult
 Returned by asynchronous commands that return a result. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00370.html0000664000076400007640000006164211752725720017322 0ustar00jrossjross00000000000000 qpid::framing::Unsigned32Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Unsigned32Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Unsigned32Value (uint32_t)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Unsigned32Value::Unsigned32Value ( uint32_t  )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00535.html0000664000076400007640000001127711752725717017332 0ustar00jrossjross00000000000000 qpid/management/Args.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/Args.h File Reference

Go to the source code of this file.

Classes

class  qpid::management::Args
class  qpid::management::ArgsNone

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::management

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00045.html0000664000076400007640000014107211752725720017315 0ustar00jrossjross00000000000000 qpid::framing::Buffer Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Buffer Class Reference

#include <qpid/framing/Buffer.h>

List of all members.

Classes

class  Iterator
 Buffer input/output iterator. More...

Public Member Functions

void checkAvailable (uint32_t count)
 Buffer (char *data=0, uint32_t size=0)
void record ()
void restore (bool reRecord=false)
void reset ()
QPID_COMMON_INLINE_EXTERN uint32_t available ()
QPID_COMMON_INLINE_EXTERN uint32_t getSize ()
QPID_COMMON_INLINE_EXTERN uint32_t getPosition ()
QPID_COMMON_INLINE_EXTERN void setPosition (uint32_t p)
QPID_COMMON_INLINE_EXTERN Iterator getIterator ()
QPID_COMMON_INLINE_EXTERN char * getPointer ()
void putOctet (uint8_t i)
void putShort (uint16_t i)
void putLong (uint32_t i)
void putLongLong (uint64_t i)
void putInt8 (int8_t i)
void putInt16 (int16_t i)
void putInt32 (int32_t i)
void putInt64 (int64_t i)
void putFloat (float f)
void putDouble (double f)
void putBin128 (const uint8_t *b)
uint8_t getOctet ()
uint16_t getShort ()
uint32_t getLong ()
uint64_t getLongLong ()
int8_t getInt8 ()
int16_t getInt16 ()
int32_t getInt32 ()
int64_t getInt64 ()
float getFloat ()
double getDouble ()
template<int n>
uint64_t getUInt ()
template<int n>
void putUInt (uint64_t)
void putShortString (const string &s)
void putMediumString (const string &s)
void putLongString (const string &s)
void getShortString (string &s)
void getMediumString (string &s)
void getLongString (string &s)
void getBin128 (uint8_t *b)
void putRawData (const string &s)
void getRawData (string &s, uint32_t size)
void putRawData (const uint8_t *data, size_t size)
void getRawData (uint8_t *data, size_t size)
template<class T >
void put (const T &data)
template<class T >
void get (T &data)
void dump (std::ostream &) const

Constructor & Destructor Documentation

qpid::framing::Buffer::Buffer ( char *  data = 0,
uint32_t  size = 0 
)

Member Function Documentation

QPID_COMMON_INLINE_EXTERN uint32_t qpid::framing::Buffer::available ( ) [inline]

Definition at line 75 of file Buffer.h.

void qpid::framing::Buffer::checkAvailable ( uint32_t  count) [inline]

Definition at line 47 of file Buffer.h.

void qpid::framing::Buffer::dump ( std::ostream ) const
template<class T >
void qpid::framing::Buffer::get ( T &  data) [inline]

Definition at line 126 of file Buffer.h.

void qpid::framing::Buffer::getBin128 ( uint8_t b)
double qpid::framing::Buffer::getDouble ( )
float qpid::framing::Buffer::getFloat ( )
int16_t qpid::framing::Buffer::getInt16 ( )
int32_t qpid::framing::Buffer::getInt32 ( )
int64_t qpid::framing::Buffer::getInt64 ( )
int8_t qpid::framing::Buffer::getInt8 ( )
QPID_COMMON_INLINE_EXTERN Iterator qpid::framing::Buffer::getIterator ( ) [inline]

Definition at line 79 of file Buffer.h.

uint32_t qpid::framing::Buffer::getLong ( )
uint64_t qpid::framing::Buffer::getLongLong ( )
void qpid::framing::Buffer::getLongString ( string s)
void qpid::framing::Buffer::getMediumString ( string s)
uint8_t qpid::framing::Buffer::getOctet ( )
QPID_COMMON_INLINE_EXTERN char* qpid::framing::Buffer::getPointer ( ) [inline]

Definition at line 80 of file Buffer.h.

QPID_COMMON_INLINE_EXTERN uint32_t qpid::framing::Buffer::getPosition ( ) [inline]

Definition at line 77 of file Buffer.h.

void qpid::framing::Buffer::getRawData ( string s,
uint32_t  size 
)
void qpid::framing::Buffer::getRawData ( uint8_t data,
size_t  size 
)
uint16_t qpid::framing::Buffer::getShort ( )
void qpid::framing::Buffer::getShortString ( string s)
QPID_COMMON_INLINE_EXTERN uint32_t qpid::framing::Buffer::getSize ( ) [inline]

Definition at line 76 of file Buffer.h.

template<int n>
uint64_t qpid::framing::Buffer::getUInt ( )
template<class T >
void qpid::framing::Buffer::put ( const T &  data) [inline]

Definition at line 125 of file Buffer.h.

void qpid::framing::Buffer::putBin128 ( const uint8_t b)
void qpid::framing::Buffer::putDouble ( double  f)
void qpid::framing::Buffer::putFloat ( float  f)
void qpid::framing::Buffer::putInt16 ( int16_t  i)
void qpid::framing::Buffer::putInt32 ( int32_t  i)
void qpid::framing::Buffer::putInt64 ( int64_t  i)
void qpid::framing::Buffer::putInt8 ( int8_t  i)
void qpid::framing::Buffer::putLong ( uint32_t  i)
void qpid::framing::Buffer::putLongLong ( uint64_t  i)
void qpid::framing::Buffer::putLongString ( const string s)
void qpid::framing::Buffer::putMediumString ( const string s)
void qpid::framing::Buffer::putOctet ( uint8_t  i)
void qpid::framing::Buffer::putRawData ( const string s)
void qpid::framing::Buffer::putRawData ( const uint8_t data,
size_t  size 
)
void qpid::framing::Buffer::putShort ( uint16_t  i)
void qpid::framing::Buffer::putShortString ( const string s)
template<int n>
void qpid::framing::Buffer::putUInt ( uint64_t  )
void qpid::framing::Buffer::record ( )
void qpid::framing::Buffer::reset ( )
void qpid::framing::Buffer::restore ( bool  reRecord = false)
QPID_COMMON_INLINE_EXTERN void qpid::framing::Buffer::setPosition ( uint32_t  p) [inline]

Definition at line 78 of file Buffer.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00893.html0000664000076400007640000001412711752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::AbsTime Member List
This is the complete list of members for qpid::sys::AbsTime, including all inherited members.
AbsTime()qpid::sys::AbsTime [inline]
AbsTime(const AbsTime &time0, const Duration &duration)qpid::sys::AbsTime
Epoch()qpid::sys::AbsTime [static]
FarFuture()qpid::sys::AbsTime [static]
now()qpid::sys::AbsTime [static]
operator<(const AbsTime &a, const AbsTime &b)qpid::sys::AbsTime [friend]
operator<<(std::ostream &, const AbsTime &)qpid::sys::AbsTime [friend]
operator==(const AbsTime &t) const qpid::sys::AbsTime [inline]
operator>(const AbsTime &a, const AbsTime &b)qpid::sys::AbsTime [friend]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00801.html0000664000076400007640000001374011752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::InvalidArgumentException Member List
This is the complete list of members for qpid::framing::InvalidArgumentException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::InvalidArgumentException [inline, virtual]
InvalidArgumentException(const std::string &msg=std::string())qpid::framing::InvalidArgumentException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00297.html0000664000076400007640000003712611752725720017332 0ustar00jrossjross00000000000000 qpid::console::SchemaArgument Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaArgument Struct Reference

#include <qpid/console/Schema.h>

List of all members.

Public Member Functions

 SchemaArgument (framing::Buffer &buffer, bool forMethod=false)
boost::shared_ptr< ValuedecodeValue (framing::Buffer &buffer)

Public Attributes

std::string name
uint8_t typeCode
bool dirInput
bool dirOutput
std::string unit
int min
int max
int maxLen
std::string desc
std::string defaultVal

Constructor & Destructor Documentation

qpid::console::SchemaArgument::SchemaArgument ( framing::Buffer buffer,
bool  forMethod = false 
)

Member Function Documentation

boost::shared_ptr<Value> qpid::console::SchemaArgument::decodeValue ( framing::Buffer buffer)

Member Data Documentation

Definition at line 41 of file Schema.h.

Definition at line 42 of file Schema.h.

Definition at line 45 of file Schema.h.

Definition at line 46 of file Schema.h.

Definition at line 44 of file Schema.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00269.html0000664000076400007640000012672311752725717017341 0ustar00jrossjross00000000000000 qpid::RangeSet Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::RangeSet Class Reference

A set implemented as a list of [begin, end) ranges. More...

#include <qpid/RangeSet.h>

List of all members.

Classes

class  iterator

Public Types

typedef iterator const_iterator
typedef Ranges::const_iterator RangeIterator

Public Member Functions

 RangeSet ()
 RangeSet (const Range< T > &r)
 RangeSet (const T &a, const T &b)
bool contiguous () const
bool contains (const T &t) const
bool contains (const Range< T > &) const
Range< T > toRange () const
bool operator== (const RangeSet< T > &) const
void addRange (const Range< T > &)
void addSet (const RangeSet< T > &)
RangeSet< T > & operator+= (const T &t)
RangeSet< T > & operator+= (const Range< T > &r)
RangeSet< T > & operator+= (const RangeSet< T > &s)
void removeRange (const Range< T > &)
void removeSet (const RangeSet< T > &)
RangeSet< T > & operator-= (const T &t)
RangeSet< T > & operator-= (const Range< T > &r)
RangeSet< T > & operator-= (const RangeSet< T > &s)
front () const
back () const
iterator begin () const
iterator end () const
RangeIterator rangesBegin () const
RangeIterator rangesEnd () const
size_t rangesSize () const
uint32_t span () const
size_t size () const
bool empty () const
void clear ()
Range< T > rangeContaining (const T &) const
 Return the largest contiguous range containing x.
template<class S >
void serialize (S &s)
template<class S >
void encode (S &s) const
template<class S >
void decode (S &s)

Friends

template<class U >
std::ostreamoperator<< (std::ostream &o, const RangeSet< U > &r)

Detailed Description

A set implemented as a list of [begin, end) ranges.

T must be LessThanComparable and Incrementable. RangeSet only provides const iterators.


Member Typedef Documentation

Definition at line 130 of file RangeSet.h.

typedef Ranges::const_iterator qpid::RangeSet::RangeIterator

Definition at line 168 of file RangeSet.h.


Constructor & Destructor Documentation

qpid::RangeSet::RangeSet ( ) [inline]

Definition at line 132 of file RangeSet.h.

qpid::RangeSet::RangeSet ( const Range< T > &  r) [inline, explicit]

Definition at line 133 of file RangeSet.h.

qpid::RangeSet::RangeSet ( const T &  a,
const T &  b 
) [inline]

Definition at line 134 of file RangeSet.h.


Member Function Documentation

void qpid::RangeSet::addRange ( const Range< T > &  r)

Definition at line 225 of file RangeSet.h.

Referenced by qpid::RangeSet< SequenceNumber >::operator+=().

void qpid::RangeSet::addSet ( const RangeSet< T > &  s)

Definition at line 242 of file RangeSet.h.

Referenced by qpid::RangeSet< SequenceNumber >::operator+=().

T qpid::RangeSet::back ( ) const [inline]

Definition at line 161 of file RangeSet.h.

RangeSet< T >::iterator qpid::RangeSet::begin ( ) const

Definition at line 300 of file RangeSet.h.

References empty(), end(), iterator, and front().

void qpid::RangeSet::clear ( ) [inline]

Definition at line 178 of file RangeSet.h.

bool qpid::RangeSet::contains ( const T &  t) const

Definition at line 212 of file RangeSet.h.

bool qpid::RangeSet::contains ( const Range< T > &  r) const

Definition at line 219 of file RangeSet.h.

bool qpid::RangeSet::contiguous ( ) const [inline]

Definition at line 136 of file RangeSet.h.

template<class S >
void qpid::RangeSet::decode ( S &  s) [inline]

Definition at line 187 of file RangeSet.h.

bool qpid::RangeSet::empty ( ) const [inline]

Definition at line 177 of file RangeSet.h.

Referenced by begin().

template<class S >
void qpid::RangeSet::encode ( S &  s) const [inline]

Definition at line 186 of file RangeSet.h.

RangeSet< T >::iterator qpid::RangeSet::end ( ) const

Definition at line 304 of file RangeSet.h.

References iterator.

Referenced by begin().

T qpid::RangeSet::front ( ) const [inline]

Definition at line 160 of file RangeSet.h.

Referenced by begin().

RangeSet<T>& qpid::RangeSet::operator+= ( const T &  t) [inline]

Definition at line 149 of file RangeSet.h.

RangeSet<T>& qpid::RangeSet::operator+= ( const Range< T > &  r) [inline]

Definition at line 150 of file RangeSet.h.

RangeSet<T>& qpid::RangeSet::operator+= ( const RangeSet< T > &  s) [inline]

Definition at line 151 of file RangeSet.h.

RangeSet<T>& qpid::RangeSet::operator-= ( const T &  t) [inline]

Definition at line 156 of file RangeSet.h.

RangeSet<T>& qpid::RangeSet::operator-= ( const Range< T > &  r) [inline]

Definition at line 157 of file RangeSet.h.

RangeSet<T>& qpid::RangeSet::operator-= ( const RangeSet< T > &  s) [inline]

Definition at line 158 of file RangeSet.h.

bool qpid::RangeSet::operator== ( const RangeSet< T > &  r) const

Definition at line 296 of file RangeSet.h.

Range< T > qpid::RangeSet::rangeContaining ( const T &  t) const

Return the largest contiguous range containing x.

Returns the empty range [x,x) if x is not in the set.

Definition at line 312 of file RangeSet.h.

RangeIterator qpid::RangeSet::rangesBegin ( ) const [inline]

Definition at line 169 of file RangeSet.h.

Referenced by size().

RangeIterator qpid::RangeSet::rangesEnd ( ) const [inline]

Definition at line 170 of file RangeSet.h.

Referenced by size().

size_t qpid::RangeSet::rangesSize ( ) const [inline]

Definition at line 171 of file RangeSet.h.

void qpid::RangeSet::removeRange ( const Range< T > &  r)

Definition at line 248 of file RangeSet.h.

References qpid::Range::end().

Referenced by qpid::RangeSet< SequenceNumber >::operator-=().

void qpid::RangeSet::removeSet ( const RangeSet< T > &  r)

Definition at line 274 of file RangeSet.h.

Referenced by qpid::RangeSet< SequenceNumber >::operator-=().

template<class S >
void qpid::RangeSet::serialize ( S &  s) [inline]

Definition at line 185 of file RangeSet.h.

size_t qpid::RangeSet::size ( ) const

Definition at line 323 of file RangeSet.h.

References rangesBegin(), and rangesEnd().

uint32_t qpid::RangeSet::span ( ) const

Definition at line 318 of file RangeSet.h.

Range< T > qpid::RangeSet::toRange ( ) const
Precondition:
contiguous()

Definition at line 280 of file RangeSet.h.


Friends And Related Function Documentation

template<class U >
std::ostream& operator<< ( std::ostream o,
const RangeSet< U > &  r 
) [friend]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00499.html0000664000076400007640000001203211752725717017331 0ustar00jrossjross00000000000000 qpid/framing/DeliveryProperties.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/DeliveryProperties.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::DeliveryProperties

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x7e.html0000664000076400007640000004443611752725717022406 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- ~ -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00896.html0000664000076400007640000002076511752725720017340 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::types::Uuid Member List
This is the complete list of members for qpid::types::Uuid, including all inherited members.
clear()qpid::types::Uuid
data() const qpid::types::Uuid
generate()qpid::types::Uuid
isNull() const qpid::types::Uuid
operator bool() const qpid::types::Uuid
operator!() const qpid::types::Uuid
operator!=(const Uuid &, const Uuid &)qpid::types::Uuid [friend]
operator<(const Uuid &, const Uuid &)qpid::types::Uuid [friend]
operator<<(std::ostream &, Uuid)qpid::types::Uuid [friend]
operator<=(const Uuid &, const Uuid &)qpid::types::Uuid [friend]
operator=(const Uuid &)qpid::types::Uuid
operator==(const Uuid &, const Uuid &)qpid::types::Uuid [friend]
operator>(const Uuid &, const Uuid &)qpid::types::Uuid [friend]
operator>=(const Uuid &, const Uuid &)qpid::types::Uuid [friend]
operator>>(std::istream &, Uuid &)qpid::types::Uuid [friend]
SIZEqpid::types::Uuid [static]
size() const qpid::types::Uuid
str() const qpid::types::Uuid
Uuid(bool unique=false)qpid::types::Uuid
Uuid(const Uuid &)qpid::types::Uuid
Uuid(const unsigned char *data16)qpid::types::Uuid

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00076.html0000664000076400007640000001034611752725720017320 0ustar00jrossjross00000000000000 std::deque::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::deque::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00199.html0000664000076400007640000013330511752725720017327 0ustar00jrossjross00000000000000 qpid::management::ManagementEvent Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ManagementEvent Class Reference

#include <qpid/management/ManagementEvent.h>

List of all members.

Public Types

typedef void(* writeSchemaCall_t )(std::string &)

Public Member Functions

virtual ~ManagementEvent ()
virtual writeSchemaCall_t getWriteSchemaCall (void)=0
virtual std::stringgetEventName () const =0
virtual std::stringgetPackageName () const =0
virtual uint8_tgetMd5Sum () const =0
virtual uint8_t getSeverity () const =0
virtual void encode (std::string &) const =0
virtual void mapEncode (qpid::types::Variant::Map &) const =0

Static Public Attributes

static const uint8_t MD5_LEN = 16
static const uint8_t TYPE_U8 = 1
static const uint8_t TYPE_U16 = 2
static const uint8_t TYPE_U32 = 3
static const uint8_t TYPE_U64 = 4
static const uint8_t TYPE_SSTR = 6
static const uint8_t TYPE_LSTR = 7
static const uint8_t TYPE_ABSTIME = 8
static const uint8_t TYPE_DELTATIME = 9
static const uint8_t TYPE_REF = 10
static const uint8_t TYPE_BOOL = 11
static const uint8_t TYPE_FLOAT = 12
static const uint8_t TYPE_DOUBLE = 13
static const uint8_t TYPE_UUID = 14
static const uint8_t TYPE_FTABLE = 15
static const uint8_t TYPE_S8 = 16
static const uint8_t TYPE_S16 = 17
static const uint8_t TYPE_S32 = 18
static const uint8_t TYPE_S64 = 19
static const uint8_t TYPE_LIST = 21
static const uint8_t ACCESS_RC = 1
static const uint8_t ACCESS_RW = 2
static const uint8_t ACCESS_RO = 3
static const uint8_t DIR_I = 1
static const uint8_t DIR_O = 2
static const uint8_t DIR_IO = 3
static const uint8_t FLAG_CONFIG = 0x01
static const uint8_t FLAG_INDEX = 0x02
static const uint8_t FLAG_END = 0x80
static const uint8_t CLASS_KIND_TABLE = 1
static const uint8_t CLASS_KIND_EVENT = 2

Member Typedef Documentation


Constructor & Destructor Documentation

virtual qpid::management::ManagementEvent::~ManagementEvent ( ) [inline, virtual]

Definition at line 39 of file ManagementEvent.h.


Member Function Documentation

virtual void qpid::management::ManagementEvent::encode ( std::string ) const [pure virtual]
virtual std::string& qpid::management::ManagementEvent::getEventName ( ) const [pure virtual]
virtual uint8_t* qpid::management::ManagementEvent::getMd5Sum ( ) const [pure virtual]
virtual std::string& qpid::management::ManagementEvent::getPackageName ( ) const [pure virtual]
virtual uint8_t qpid::management::ManagementEvent::getSeverity ( ) const [pure virtual]
virtual writeSchemaCall_t qpid::management::ManagementEvent::getWriteSchemaCall ( void  ) [pure virtual]
virtual void qpid::management::ManagementEvent::mapEncode ( qpid::types::Variant::Map ) const [pure virtual]

Member Data Documentation

Definition at line 113 of file ManagementObject.h.

Definition at line 115 of file ManagementObject.h.

Definition at line 114 of file ManagementObject.h.

Definition at line 126 of file ManagementObject.h.

Definition at line 125 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::DIR_I = 1 [static, inherited]

Definition at line 117 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::DIR_IO = 3 [static, inherited]

Definition at line 119 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::DIR_O = 2 [static, inherited]

Definition at line 118 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::FLAG_CONFIG = 0x01 [static, inherited]

Definition at line 121 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::FLAG_END = 0x80 [static, inherited]

Definition at line 123 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::FLAG_INDEX = 0x02 [static, inherited]

Definition at line 122 of file ManagementObject.h.

Definition at line 36 of file ManagementEvent.h.

Definition at line 99 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_BOOL = 11 [static, inherited]

Definition at line 102 of file ManagementObject.h.

Definition at line 100 of file ManagementObject.h.

Definition at line 104 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_FLOAT = 12 [static, inherited]

Definition at line 103 of file ManagementObject.h.

Definition at line 106 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_LIST = 21 [static, inherited]

Definition at line 111 of file ManagementObject.h.

Definition at line 98 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_REF = 10 [static, inherited]

Definition at line 101 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_S16 = 17 [static, inherited]

Definition at line 108 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_S32 = 18 [static, inherited]

Definition at line 109 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_S64 = 19 [static, inherited]

Definition at line 110 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_S8 = 16 [static, inherited]

Definition at line 107 of file ManagementObject.h.

Definition at line 97 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_U16 = 2 [static, inherited]

Definition at line 94 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_U32 = 3 [static, inherited]

Definition at line 95 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_U64 = 4 [static, inherited]

Definition at line 96 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_U8 = 1 [static, inherited]

Definition at line 93 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_UUID = 14 [static, inherited]

Definition at line 105 of file ManagementObject.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00860.html0000664000076400007640000001454711752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::TargetCapacityExceeded Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00278.html0000664000076400007640000002661511752725717017340 0ustar00jrossjross00000000000000 qmf::engine::ResilientConnectionEvent Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ResilientConnectionEvent Struct Reference

Represents events that occur, unsolicited, from ResilientConnection. More...

#include <qmf/engine/ResilientConnection.h>

List of all members.

Public Types

enum  EventKind { CONNECTED = 1, DISCONNECTED = 2, SESSION_CLOSED = 3, RECV = 4 }

Public Attributes

EventKind kind
void * sessionContext
char * errorText
Message message

Detailed Description

Represents events that occur, unsolicited, from ResilientConnection.


Member Enumeration Documentation

Enumerator:
CONNECTED 
DISCONNECTED 
SESSION_CLOSED 
RECV 

Definition at line 36 of file ResilientConnection.h.


Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00545.html0000664000076400007640000001220611752725717017324 0ustar00jrossjross00000000000000 qpid/messaging/Receiver.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Receiver.h File Reference

Go to the source code of this file.

Classes

class  qpid::messaging::Receiver
 Interface through which messages are received. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00189.html0000664000076400007640000007027411752725720017333 0ustar00jrossjross00000000000000 qpid::framing::List Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::List Class Reference

Representation of an AMQP 0-10 list. More...

#include <qpid/framing/List.h>

List of all members.

Public Types

typedef boost::shared_ptr
< FieldValue
ValuePtr
typedef ValuePtr value_type
typedef std::list< ValuePtrValues
typedef Values::const_iterator const_iterator
typedef Values::iterator iterator
typedef Values::const_reference const_reference
typedef Values::reference reference

Public Member Functions

uint32_t encodedSize () const
void encode (Buffer &buffer) const
void decode (Buffer &buffer)
bool operator== (const List &other) const
QPID_COMMON_INLINE_EXTERN
const_iterator 
begin () const
QPID_COMMON_INLINE_EXTERN
const_iterator 
end () const
QPID_COMMON_INLINE_EXTERN iterator begin ()
QPID_COMMON_INLINE_EXTERN iterator end ()
QPID_COMMON_INLINE_EXTERN ValuePtr front () const
QPID_COMMON_INLINE_EXTERN ValuePtr back () const
QPID_COMMON_INLINE_EXTERN size_t size () const
QPID_COMMON_INLINE_EXTERN iterator insert (iterator i, ValuePtr value)
QPID_COMMON_INLINE_EXTERN void erase (iterator i)
QPID_COMMON_INLINE_EXTERN void push_back (ValuePtr value)
QPID_COMMON_INLINE_EXTERN void pop_back ()

Friends

std::ostreamoperator<< (std::ostream &out, const List &list)

Detailed Description

Representation of an AMQP 0-10 list.


Member Typedef Documentation

typedef Values::const_iterator qpid::framing::List::const_iterator

Definition at line 45 of file List.h.

typedef Values::const_reference qpid::framing::List::const_reference

Definition at line 47 of file List.h.

typedef Values::iterator qpid::framing::List::iterator

Definition at line 46 of file List.h.

typedef Values::reference qpid::framing::List::reference

Definition at line 48 of file List.h.

Definition at line 43 of file List.h.

typedef boost::shared_ptr<FieldValue> qpid::framing::List::ValuePtr

Definition at line 42 of file List.h.

Definition at line 44 of file List.h.


Member Function Documentation

QPID_COMMON_INLINE_EXTERN ValuePtr qpid::framing::List::back ( ) const [inline]

Definition at line 63 of file List.h.

QPID_COMMON_INLINE_EXTERN const_iterator qpid::framing::List::begin ( ) const [inline]

Definition at line 57 of file List.h.

QPID_COMMON_INLINE_EXTERN iterator qpid::framing::List::begin ( ) [inline]

Definition at line 59 of file List.h.

void qpid::framing::List::decode ( Buffer buffer)
void qpid::framing::List::encode ( Buffer buffer) const
uint32_t qpid::framing::List::encodedSize ( ) const
QPID_COMMON_INLINE_EXTERN const_iterator qpid::framing::List::end ( ) const [inline]

Definition at line 58 of file List.h.

QPID_COMMON_INLINE_EXTERN iterator qpid::framing::List::end ( ) [inline]

Definition at line 60 of file List.h.

QPID_COMMON_INLINE_EXTERN void qpid::framing::List::erase ( iterator  i) [inline]

Definition at line 67 of file List.h.

QPID_COMMON_INLINE_EXTERN ValuePtr qpid::framing::List::front ( ) const [inline]

Definition at line 62 of file List.h.

QPID_COMMON_INLINE_EXTERN iterator qpid::framing::List::insert ( iterator  i,
ValuePtr  value 
) [inline]

Definition at line 66 of file List.h.

bool qpid::framing::List::operator== ( const List other) const
QPID_COMMON_INLINE_EXTERN void qpid::framing::List::pop_back ( ) [inline]

Definition at line 69 of file List.h.

QPID_COMMON_INLINE_EXTERN void qpid::framing::List::push_back ( ValuePtr  value) [inline]

Definition at line 68 of file List.h.

QPID_COMMON_INLINE_EXTERN size_t qpid::framing::List::size ( ) const [inline]

Definition at line 64 of file List.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream out,
const List list 
) [friend]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x66.html0000664000076400007640000002054211752725720023603 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- f -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00577.html0000664000076400007640000000744311752725720017332 0ustar00jrossjross00000000000000 qpid::client::arg Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::arg Namespace Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00354.html0000664000076400007640000002022411752725720017313 0ustar00jrossjross00000000000000 qpid::messaging::TargetCapacityExceeded Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::TargetCapacityExceeded Struct Reference

Thrown to indicate that the sender attempted to send a message that would result in the target node on the peer exceeding a preconfigured capacity. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 TargetCapacityExceeded (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown to indicate that the sender attempted to send a message that would result in the target node on the peer exceeding a preconfigured capacity.


Constructor & Destructor Documentation

qpid::messaging::TargetCapacityExceeded::TargetCapacityExceeded ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00504_source.html0000664000076400007640000003446211752725717020707 0ustar00jrossjross00000000000000 qpid/framing/ExchangeQueryResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/ExchangeQueryResult.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_EXCHANGEQUERYRESULT_H
00002 #define QPID_FRAMING_EXCHANGEQUERYRESULT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN ExchangeQueryResult  {
00039     std::string type;
00040     FieldTable arguments;
00041     uint16_t flags;
00042 public:
00043     static const uint16_t TYPE = 1793;
00044     ExchangeQueryResult(
00045         const std::string& _type,
00046         bool _durable,
00047         bool _notFound,
00048         const FieldTable& _arguments) : 
00049         type(_type),
00050         arguments(_arguments),
00051         flags(0){
00052         setDurable(_durable);
00053         setNotFound(_notFound);
00054         flags |= (1 << 8);
00055         flags |= (1 << 11);
00056     }
00057     ExchangeQueryResult()  : flags(0) {}
00058     
00059     QPID_COMMON_EXTERN void setType(const std::string& _type);
00060     QPID_COMMON_EXTERN const std::string& getType() const;
00061     QPID_COMMON_EXTERN bool hasType() const;
00062     QPID_COMMON_EXTERN void clearTypeFlag();
00063     QPID_COMMON_EXTERN void setDurable(bool _durable);
00064     QPID_COMMON_EXTERN bool getDurable() const;
00065     QPID_COMMON_EXTERN void setNotFound(bool _notFound);
00066     QPID_COMMON_EXTERN bool getNotFound() const;
00067     QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments);
00068     QPID_COMMON_EXTERN const FieldTable& getArguments() const;
00069     QPID_COMMON_EXTERN FieldTable& getArguments();
00070     QPID_COMMON_EXTERN bool hasArguments() const;
00071     QPID_COMMON_EXTERN void clearArgumentsFlag();
00072     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const ExchangeQueryResult&);
00073     QPID_COMMON_EXTERN void encode(Buffer&) const;
00074     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00075     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00076     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00077     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00078     QPID_COMMON_EXTERN uint32_t bodySize() const;
00079     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00080 }; /* class ExchangeQueryResult */
00081 
00082 }}
00083 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00790.html0000664000076400007640000001366611752725720017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::NotFoundException Member List
This is the complete list of members for qpid::framing::NotFoundException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::NotFoundException [inline, virtual]
NotFoundException(const std::string &msg=std::string())qpid::framing::NotFoundException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00044.html0000664000076400007640000003756511752725717017335 0ustar00jrossjross00000000000000 qmf::engine::BrokerProxy Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::BrokerProxy Class Reference

#include <qmf/engine/Console.h>

List of all members.

Public Member Functions

 BrokerProxy (Console &console)
 ~BrokerProxy ()
void sessionOpened (SessionHandle &sh)
void sessionClosed ()
void startProtocol ()
void handleRcvMessage (Message &message)
bool getXmtMessage (Message &item) const
void popXmt ()
bool getEvent (BrokerEvent &event) const
void popEvent ()
uint32_t agentCount () const
const AgentProxygetAgent (uint32_t idx) const
void sendQuery (const Query &query, void *context, const AgentProxy *agent=0)

Constructor & Destructor Documentation

qmf::engine::BrokerProxy::BrokerProxy ( Console console)
qmf::engine::BrokerProxy::~BrokerProxy ( )

Member Function Documentation

uint32_t qmf::engine::BrokerProxy::agentCount ( ) const
const AgentProxy* qmf::engine::BrokerProxy::getAgent ( uint32_t  idx) const
bool qmf::engine::BrokerProxy::getEvent ( BrokerEvent event) const
bool qmf::engine::BrokerProxy::getXmtMessage ( Message item) const
void qmf::engine::BrokerProxy::handleRcvMessage ( Message message)
void qmf::engine::BrokerProxy::popEvent ( )
void qmf::engine::BrokerProxy::popXmt ( )
void qmf::engine::BrokerProxy::sendQuery ( const Query query,
void *  context,
const AgentProxy agent = 0 
)
void qmf::engine::BrokerProxy::sessionClosed ( )
void qmf::engine::BrokerProxy::sessionOpened ( SessionHandle sh)
void qmf::engine::BrokerProxy::startProtocol ( )

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00626.html0000664000076400007640000001543611752725717017334 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::BrokerProxy Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00557.html0000664000076400007640000001117611752725717017334 0ustar00jrossjross00000000000000 qpid/sys/IOHandle.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/IOHandle.h File Reference

Go to the source code of this file.

Classes

class  qpid::sys::IOHandle

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00610.html0000664000076400007640000001327711752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::OperationTimedOut Member List
This is the complete list of members for qmf::OperationTimedOut, including all inherited members.
detailqmf::QmfException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
OperationTimedOut()qmf::OperationTimedOut
QmfException(const std::string &msg)qmf::QmfException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~OperationTimedOut()qmf::OperationTimedOut [virtual]
~QmfException()qmf::QmfException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00543.html0000664000076400007640000001412711752725717017326 0ustar00jrossjross00000000000000 qpid/messaging/Duration.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Duration.h File Reference

Go to the source code of this file.

Classes

class  qpid::messaging::Duration
 A duration is a time in milliseconds. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Functions

Duration qpid::messaging::operator* (const Duration &duration, uint64_t multiplier)
Duration qpid::messaging::operator* (uint64_t multiplier, const Duration &duration)
bool qpid::messaging::operator== (const Duration &a, const Duration &b)
bool qpid::messaging::operator!= (const Duration &a, const Duration &b)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00732.html0000664000076400007640000002410711752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Int64Value Member List
This is the complete list of members for qpid::console::Int64Value, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Int64Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
Int64Value(int64_t v)qpid::console::Int64Value [inline]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Int64Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
str() const qpid::console::Int64Value [virtual]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00145.html0000664000076400007640000002432311752725720017315 0ustar00jrossjross00000000000000 qpid::framing::IllegalStateException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::IllegalStateException Struct Reference

The peer sent a command that is not permitted in the current state of the session. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 IllegalStateException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The peer sent a command that is not permitted in the current state of the session.


Constructor & Destructor Documentation

qpid::framing::IllegalStateException::IllegalStateException ( const std::string msg = std::string()) [inline]

Definition at line 110 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::IllegalStateException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 109 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00476.html0000664000076400007640000001167311752725717017336 0ustar00jrossjross00000000000000 qpid/client/Session.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Session.h File Reference

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Typedefs

typedef Session_0_10 qpid::client::Session
 Session is an alias for Session_0_10.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/open.png0000664000076400007640000000016611752725717017271 0ustar00jrossjross00000000000000‰PNG  IHDR à‘=IDATxí1 “ت¦@@   ]01ÀQXY~Jr?D>„¥¶þ’n¼ áFÍ  }ÈúÂéãÏ\ ÄáÿòIEND®B`‚qpidc-0.16/docs/api/html/a00538_source.html0000664000076400007640000014342011752725717020711 0ustar00jrossjross00000000000000 qpid/management/ManagementObject.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/ManagementObject.h
Go to the documentation of this file.
00001 #ifndef _ManagementObject_
00002 #define _ManagementObject_
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/CommonImportExport.h"
00025 
00026 #include "qpid/management/Mutex.h"
00027 #include "qpid/types/Variant.h"
00028 
00029 #include <map>
00030 #include <vector>
00031 
00032 namespace qpid {
00033 namespace management {
00034 
00035 class Manageable;
00036 class ObjectId;
00037 class ManagementObject;
00038 
00039 
00040 class AgentAttachment {
00041     friend class ObjectId;
00042 private:
00043     uint64_t first;
00044 public:
00045     AgentAttachment() : first(0) {}
00046     QPID_COMMON_EXTERN void setBanks(uint32_t broker, uint32_t bank);
00047     uint64_t getFirst() const { return first; }
00048 };
00049 
00050 
00051 class ObjectId {
00052 protected:
00053     const AgentAttachment* agent;
00054     uint64_t first;
00055     uint64_t second;
00056     uint64_t agentEpoch;
00057     std::string v2Key;
00058     std::string agentName;
00059     void fromString(const std::string&);
00060 public:
00061     QPID_COMMON_INLINE_EXTERN ObjectId() : agent(0), first(0), second(0), agentEpoch(0) {}
00062     QPID_COMMON_INLINE_EXTERN ObjectId(const types::Variant& map) :
00063     agent(0), first(0), second(0), agentEpoch(0) { mapDecode(map.asMap()); }
00064     QPID_COMMON_EXTERN ObjectId(uint8_t flags, uint16_t seq, uint32_t broker);
00065     QPID_COMMON_EXTERN ObjectId(AgentAttachment* _agent, uint8_t flags, uint16_t seq);
00066     QPID_COMMON_EXTERN ObjectId(std::istream&);
00067     QPID_COMMON_EXTERN ObjectId(const std::string&);
00068     QPID_COMMON_INLINE_EXTERN ObjectId(const std::string& agentAddress, const std::string& key,
00069                                 uint64_t epoch=0) : agent(0), first(0), second(0),
00070       agentEpoch(epoch), v2Key(key), agentName(agentAddress) {}
00071 
00072     // Deprecated:
00073     QPID_COMMON_EXTERN ObjectId(uint8_t flags, uint16_t seq, uint32_t broker, uint64_t object);
00074     QPID_COMMON_EXTERN bool operator==(const ObjectId &other) const;
00075     QPID_COMMON_EXTERN bool operator<(const ObjectId &other) const;
00076     QPID_COMMON_EXTERN void mapEncode(types::Variant::Map& map) const;
00077     QPID_COMMON_EXTERN void mapDecode(const types::Variant::Map& map);
00078     QPID_COMMON_EXTERN operator types::Variant::Map() const;
00079     QPID_COMMON_INLINE_EXTERN uint32_t encodedSize() const { return 16; };
00080     QPID_COMMON_EXTERN void encode(std::string& buffer) const;
00081     QPID_COMMON_EXTERN void decode(const std::string& buffer);
00082     QPID_COMMON_EXTERN bool equalV1(const ObjectId &other) const;
00083     QPID_COMMON_INLINE_EXTERN void setV2Key(const std::string& _key) { v2Key = _key; }
00084     QPID_COMMON_EXTERN void setV2Key(const ManagementObject& object);
00085     QPID_COMMON_INLINE_EXTERN void setAgentName(const std::string& _name) { agentName = _name; }
00086     QPID_COMMON_INLINE_EXTERN const std::string& getAgentName() const { return agentName; }
00087     QPID_COMMON_INLINE_EXTERN const std::string& getV2Key() const { return v2Key; }
00088     friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const ObjectId&);
00089 };
00090 
00091 class ManagementItem {
00092 public:
00093     static const uint8_t TYPE_U8        = 1;
00094     static const uint8_t TYPE_U16       = 2;
00095     static const uint8_t TYPE_U32       = 3;
00096     static const uint8_t TYPE_U64       = 4;
00097     static const uint8_t TYPE_SSTR      = 6;
00098     static const uint8_t TYPE_LSTR      = 7;
00099     static const uint8_t TYPE_ABSTIME   = 8;
00100     static const uint8_t TYPE_DELTATIME = 9;
00101     static const uint8_t TYPE_REF       = 10;
00102     static const uint8_t TYPE_BOOL      = 11;
00103     static const uint8_t TYPE_FLOAT     = 12;
00104     static const uint8_t TYPE_DOUBLE    = 13;
00105     static const uint8_t TYPE_UUID      = 14;
00106     static const uint8_t TYPE_FTABLE    = 15;
00107     static const uint8_t TYPE_S8        = 16;
00108     static const uint8_t TYPE_S16       = 17;
00109     static const uint8_t TYPE_S32       = 18;
00110     static const uint8_t TYPE_S64       = 19;
00111     static const uint8_t TYPE_LIST      = 21;
00112 
00113     static const uint8_t ACCESS_RC = 1;
00114     static const uint8_t ACCESS_RW = 2;
00115     static const uint8_t ACCESS_RO = 3;
00116 
00117     static const uint8_t DIR_I     = 1;
00118     static const uint8_t DIR_O     = 2;
00119     static const uint8_t DIR_IO    = 3;
00120 
00121     static const uint8_t FLAG_CONFIG = 0x01;
00122     static const uint8_t FLAG_INDEX  = 0x02;
00123     static const uint8_t FLAG_END    = 0x80;
00124 
00125     const static uint8_t CLASS_KIND_TABLE = 1;
00126     const static uint8_t CLASS_KIND_EVENT = 2;
00127 
00128 
00129 
00130 public:
00131     virtual ~ManagementItem() {}
00132 };
00133 
00134 class QPID_COMMON_CLASS_EXTERN ManagementObject : public ManagementItem
00135 {
00136 protected:
00137 
00138     uint64_t         createTime;
00139     uint64_t         destroyTime;
00140     uint64_t         updateTime;
00141     ObjectId         objectId;
00142     mutable bool     configChanged;
00143     mutable bool     instChanged;
00144     bool             deleted;
00145     Manageable*      coreObject;
00146     mutable Mutex    accessLock;
00147     uint32_t         flags;
00148 
00149     static int nextThreadIndex;
00150     bool             forcePublish;
00151 
00152     QPID_COMMON_EXTERN int  getThreadIndex();
00153     QPID_COMMON_EXTERN void writeTimestamps(std::string& buf) const;
00154     QPID_COMMON_EXTERN void readTimestamps(const std::string& buf);
00155     QPID_COMMON_EXTERN uint32_t writeTimestampsSize() const;
00156 
00157   public:
00158     QPID_COMMON_EXTERN static const uint8_t MD5_LEN = 16;
00159     QPID_COMMON_EXTERN static int maxThreads;
00160     //typedef void (*writeSchemaCall_t) (qpid::framing::Buffer&);
00161     typedef void (*writeSchemaCall_t) (std::string&);
00162 
00163     QPID_COMMON_EXTERN ManagementObject(Manageable* _core);
00164     virtual ~ManagementObject() {}
00165 
00166     virtual writeSchemaCall_t getWriteSchemaCall() = 0;
00167     virtual std::string getKey() const = 0;
00168 
00169     // Encode & Decode the property and statistics values
00170     // for this object.
00171     virtual void mapEncodeValues(types::Variant::Map& map,
00172                                  bool includeProperties,
00173                                  bool includeStatistics) = 0;
00174     virtual void mapDecodeValues(const types::Variant::Map& map) = 0;
00175     virtual void doMethod(std::string&           methodName,
00176                           const types::Variant::Map& inMap,
00177                           types::Variant::Map& outMap,
00178                           const std::string& userId) = 0;
00179     QPID_COMMON_EXTERN void writeTimestamps(types::Variant::Map& map) const;
00180     QPID_COMMON_EXTERN void readTimestamps(const types::Variant::Map& buf);
00181 
00186     virtual uint32_t writePropertiesSize() const { return 0; }
00187     virtual void readProperties(const std::string&) {}
00188     virtual void writeProperties(std::string&) const {}
00189     virtual void writeStatistics(std::string&, bool = false) {}
00190     virtual void doMethod(std::string&, const std::string&, std::string&, const std::string&) {}
00191 
00192     QPID_COMMON_EXTERN virtual void setReference(ObjectId objectId);
00193 
00194     virtual std::string& getClassName() const = 0;
00195     virtual std::string& getPackageName() const = 0;
00196     virtual uint8_t*     getMd5Sum() const = 0;
00197 
00198     void         setObjectId(ObjectId oid) { objectId = oid; }
00199     ObjectId     getObjectId() { return objectId; }
00200     inline  bool getConfigChanged() { return configChanged; }
00201     virtual bool getInstChanged() { return instChanged; }
00202     virtual bool hasInst() { return true; }
00203     inline  void setForcePublish(bool f) { forcePublish = f; }
00204     inline  bool getForcePublish() { return forcePublish; }
00205     QPID_COMMON_EXTERN void setUpdateTime();
00206     QPID_COMMON_EXTERN void resourceDestroy();
00207     inline bool isDeleted() { return deleted; }
00208     inline void setFlags(uint32_t f) { flags = f; }
00209     inline uint32_t getFlags() { return flags; }
00210     bool isSameClass(ManagementObject& other) {
00211         for (int idx = 0; idx < MD5_LEN; idx++)
00212             if (other.getMd5Sum()[idx] != getMd5Sum()[idx])
00213                 return false;
00214         return other.getClassName() == getClassName() &&
00215             other.getPackageName() == getPackageName();
00216     }
00217 
00218     // QPID_COMMON_EXTERN void encode(qpid::framing::Buffer& buf) const { writeProperties(buf); }
00219     // QPID_COMMON_EXTERN void decode(qpid::framing::Buffer& buf) { readProperties(buf); }
00220     //QPID_COMMON_EXTERN uint32_t encodedSize() const { return writePropertiesSize(); }
00221 
00222     // Encode/Decode the entire object as a map
00223     //QPID_COMMON_EXTERN void mapEncode(types::Variant::Map& map,
00224     //bool includeProperties=true,
00225     //bool includeStatistics=true);
00226 
00227     //QPID_COMMON_EXTERN void mapDecode(const types::Variant::Map& map);
00228 };
00229 
00230 typedef std::map<ObjectId, ManagementObject*> ManagementObjectMap;
00231 typedef std::vector<ManagementObject*> ManagementObjectVector;
00232 
00233 }}
00234 
00235 
00236 
00237 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00101.html0000664000076400007640000004737511752725720017321 0ustar00jrossjross00000000000000 qpid::framing::DtxGetTimeoutResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::DtxGetTimeoutResult Class Reference

#include <qpid/framing/DtxGetTimeoutResult.h>

List of all members.

Public Member Functions

 DtxGetTimeoutResult (uint32_t _timeout)
 DtxGetTimeoutResult ()
void setTimeout (uint32_t _timeout)
uint32_t getTimeout () const
bool hasTimeout () const
void clearTimeoutFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1538

Friends

std::ostreamoperator<< (std::ostream &, const DtxGetTimeoutResult &)

Constructor & Destructor Documentation

qpid::framing::DtxGetTimeoutResult::DtxGetTimeoutResult ( uint32_t  _timeout) [inline]

Definition at line 43 of file DtxGetTimeoutResult.h.

qpid::framing::DtxGetTimeoutResult::DtxGetTimeoutResult ( ) [inline]

Definition at line 49 of file DtxGetTimeoutResult.h.


Member Function Documentation

uint32_t qpid::framing::DtxGetTimeoutResult::bodySize ( ) const
void qpid::framing::DtxGetTimeoutResult::clearTimeoutFlag ( )
void qpid::framing::DtxGetTimeoutResult::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::DtxGetTimeoutResult::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::DtxGetTimeoutResult::encode ( Buffer ) const
uint32_t qpid::framing::DtxGetTimeoutResult::encodedSize ( ) const
void qpid::framing::DtxGetTimeoutResult::encodeStructBody ( Buffer ) const
uint32_t qpid::framing::DtxGetTimeoutResult::getTimeout ( ) const
bool qpid::framing::DtxGetTimeoutResult::hasTimeout ( ) const
void qpid::framing::DtxGetTimeoutResult::print ( std::ostream out) const
void qpid::framing::DtxGetTimeoutResult::setTimeout ( uint32_t  _timeout)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const DtxGetTimeoutResult  
) [friend]

Member Data Documentation

Definition at line 42 of file DtxGetTimeoutResult.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00149.html0000664000076400007640000001302511752725717017324 0ustar00jrossjross00000000000000 qpid::InlineRebind Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineRebind Struct Reference

#include <qpid/InlineAllocator.h>

List of all members.

Public Types

typedef
BaseAllocator::template rebind
< RequestedType >::other 
other

Member Typedef Documentation

typedef BaseAllocator::template rebind<RequestedType>::other qpid::InlineRebind::other

Definition at line 91 of file InlineAllocator.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00541_source.html0000664000076400007640000005333211752725717020705 0ustar00jrossjross00000000000000 qpid/sys/posix/Mutex.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/Mutex.h
Go to the documentation of this file.
00001 #ifndef _sys_posix_Mutex_h
00002 #define _sys_posix_Mutex_h
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/sys/posix/check.h"
00023 
00024 #include <pthread.h>
00025 #include <boost/noncopyable.hpp>
00026 
00027 namespace qpid {
00028 namespace sys {
00029 
00030 class Condition;
00031 
00035 class Mutex : private boost::noncopyable {
00036     friend class Condition;
00037     static const pthread_mutexattr_t* getAttribute();
00038 
00039 public:
00040     typedef ::qpid::sys::ScopedLock<Mutex> ScopedLock;
00041     typedef ::qpid::sys::ScopedUnlock<Mutex> ScopedUnlock;
00042 
00043     inline Mutex();
00044     inline ~Mutex();
00045     inline void lock();
00046     inline void unlock();
00047     inline bool trylock();
00048 
00049 
00050 protected:
00051     pthread_mutex_t mutex;
00052 };
00053 
00057 class RWlock : private boost::noncopyable {
00058     friend class Condition;
00059 
00060 public:
00061     typedef ::qpid::sys::ScopedRlock<RWlock> ScopedRlock;
00062     typedef ::qpid::sys::ScopedWlock<RWlock> ScopedWlock;
00063 
00064     inline RWlock();
00065     inline ~RWlock();
00066     inline void wlock();  // will write-lock
00067     inline void rlock();  // will read-lock
00068     inline void unlock();
00069     inline void trywlock();  // will write-try
00070     inline void tryrlock();  // will read-try
00071 
00072 protected:
00073     pthread_rwlock_t rwlock;
00074 };
00075 
00076 
00081 struct PODMutex
00082 {
00083     typedef ::qpid::sys::ScopedLock<PODMutex> ScopedLock;
00084 
00085     inline void lock();
00086     inline void unlock();
00087     inline bool trylock();
00088 
00089     // Must be public to be a POD:
00090     pthread_mutex_t mutex;
00091 };
00092 
00093 #define QPID_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER }
00094 
00095 void PODMutex::lock() {
00096     QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_lock(&mutex));
00097 }
00098 
00099 void PODMutex::unlock() {
00100     QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_unlock(&mutex));
00101 }
00102 
00103 bool PODMutex::trylock() {
00104     return pthread_mutex_trylock(&mutex) == 0;
00105 }
00106 
00107 Mutex::Mutex() {
00108     QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_init(&mutex, getAttribute()));
00109 }
00110 
00111 Mutex::~Mutex(){
00112     QPID_POSIX_ABORT_IF(pthread_mutex_destroy(&mutex));
00113 }
00114 
00115 void Mutex::lock() {
00116     QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_lock(&mutex));
00117 }
00118 
00119 void Mutex::unlock() {
00120     QPID_POSIX_ASSERT_THROW_IF(pthread_mutex_unlock(&mutex));
00121 }
00122 
00123 bool Mutex::trylock() {
00124     return pthread_mutex_trylock(&mutex) == 0;
00125 }
00126 
00127 
00128 RWlock::RWlock() {
00129     QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_init(&rwlock, NULL));
00130 }
00131 
00132 RWlock::~RWlock(){
00133     QPID_POSIX_ABORT_IF(pthread_rwlock_destroy(&rwlock));
00134 }
00135 
00136 void RWlock::wlock() {
00137     QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_wrlock(&rwlock));
00138 }
00139 
00140 void RWlock::rlock() {
00141     QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_rdlock(&rwlock));
00142 }
00143 
00144 void RWlock::unlock() {
00145     QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_unlock(&rwlock));
00146 }
00147 
00148 void RWlock::trywlock() {
00149     QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_trywrlock(&rwlock));
00150 }
00151 
00152 void RWlock::tryrlock() {
00153     QPID_POSIX_ASSERT_THROW_IF(pthread_rwlock_tryrdlock(&rwlock));
00154 }
00155 
00156 
00157 }}
00158 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00489_source.html0000664000076400007640000006031311752725717020715 0ustar00jrossjross00000000000000 qpid/console/SessionManager.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/SessionManager.h
Go to the documentation of this file.
00001 #ifndef _QPID_CONSOLE_SESSION_MANAGER_H
00002 #define _QPID_CONSOLE_SESSION_MANAGER_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/console/ConsoleImportExport.h"
00026 #include "qpid/console/Broker.h"
00027 #include "qpid/console/Package.h"
00028 #include "qpid/console/SequenceManager.h"
00029 #include "qpid/console/ClassKey.h"
00030 #include "qpid/console/Schema.h"
00031 #include "qpid/console/Agent.h"
00032 #include "qpid/console/Object.h"
00033 #include "qpid/console/ObjectId.h"
00034 #include "qpid/console/Value.h"
00035 #include "qpid/sys/Mutex.h"
00036 #include "qpid/sys/Condition.h"
00037 #include "qpid/client/ConnectionSettings.h"
00038 #include <string>
00039 #include <vector>
00040 
00041 namespace qpid {
00042 namespace console {
00043 
00044 class ConsoleListener;
00045 
00050 class SessionManager
00051 {
00052   public:
00053     typedef std::vector<std::string> NameVector;
00054     typedef std::vector<ClassKey> KeyVector;
00055     QPID_CONSOLE_EXTERN ~SessionManager();
00056 
00057     struct Settings {
00058         bool rcvObjects;
00059         bool rcvEvents;
00060         bool rcvHeartbeats;
00061         bool userBindings;
00062         uint32_t methodTimeout;
00063         uint32_t getTimeout;
00064 
00065         Settings() : rcvObjects(true), rcvEvents(true), rcvHeartbeats(true),
00066                      userBindings(false), methodTimeout(20), getTimeout(20)
00067         {}
00068     };
00069 
00084     QPID_CONSOLE_EXTERN SessionManager(ConsoleListener* listener = 0,
00085                                        Settings settings = Settings());
00086 
00093     QPID_CONSOLE_EXTERN Broker* addBroker(client::ConnectionSettings& settings);
00094 
00099     QPID_CONSOLE_EXTERN void delBroker(Broker* broker);
00100 
00105     QPID_CONSOLE_EXTERN void getPackages(NameVector& packages);
00106 
00112     QPID_CONSOLE_EXTERN void getClasses(KeyVector& classKeys,
00113                                         const std::string& packageName);
00114 
00119     QPID_CONSOLE_EXTERN SchemaClass& getSchema(const ClassKey& classKey);
00120 
00128     QPID_CONSOLE_EXTERN void bindPackage(const std::string& packageName);
00129 
00137     QPID_CONSOLE_EXTERN void bindClass(const ClassKey& classKey);
00138     QPID_CONSOLE_EXTERN void bindClass(const std::string& packageName,
00139                                        const std::string& className);
00140 
00150     QPID_CONSOLE_EXTERN void bindEvent(const ClassKey& classKey);
00151     QPID_CONSOLE_EXTERN void bindEvent(const std::string& packageName,
00152                                        const std::string& eventName="");
00153 
00154 
00161     QPID_CONSOLE_EXTERN void getAgents(Agent::Vector& agents,
00162                                        Broker* broker = 0);
00163 
00174     QPID_CONSOLE_EXTERN void getObjects(Object::Vector& objects,
00175                                         const std::string& className,
00176                                         Broker* broker = 0,
00177                                         Agent* agent = 0);
00178     //void getObjects(Object::Vector& objects, const ClassKey& classKey,
00179     //                Broker* broker = 0, Agent* agent = 0);
00180     //void getObjects(Object::Vector& objects, const ObjectId& objectId,
00181     //                Broker* broker = 0, Agent* agent = 0);
00182 
00183 private:
00184     friend class Broker;
00185     friend class Broker::ConnectionThread;
00186     friend class Object;
00187     sys::Mutex lock;
00188     sys::Mutex brokerListLock;
00189     ConsoleListener* listener;
00190     std::vector<Broker*> brokers;
00191     std::map<std::string, Package*> packages;
00192     SequenceManager sequenceManager;
00193     sys::Condition cv;
00194     SequenceManager::set syncSequenceList;
00195     Object::Vector getResult;
00196     std::string error;
00197     Settings settings;
00198     NameVector bindingKeyList;
00199 
00200     void bindingKeys();
00201     void allBrokersStable();
00202     void startProtocol(Broker* broker);
00203     void handleBrokerResp(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence);
00204     void handlePackageInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence);
00205     void handleCommandComplete(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence);
00206     void handleClassInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence);
00207     void handleMethodResp(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence);
00208     void handleHeartbeatInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence);
00209     void handleEventInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence);
00210     void handleSchemaResp(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence);
00211     void handleContentInd(Broker* broker, framing::Buffer& inBuffer, uint32_t sequence, bool prop, bool stat);
00212     void handleBrokerConnect(Broker* broker);
00213     void handleBrokerDisconnect(Broker* broker);
00214 
00215 };
00216 
00217 }} // namespace qpid::console
00218 
00219 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00327.html0000664000076400007640000066424211752725717017337 0ustar00jrossjross00000000000000 qpid::client::Session_0_10 Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Session_0_10 Class Reference

AMQP 0-10 session API with keyword arguments. More...

#include <qpid/client/Session_0_10.h>

List of all members.

Public Member Functions

 Session_0_10 ()
QPID_CLIENT_INLINE_EXTERN Session_0_10 (const SessionBase_0_10 &other)
QPID_CLIENT_INLINE_EXTERN
Session_0_10
operator= (const SessionBase_0_10 &other)
 BOOST_PARAMETER_MEMFUN (void, executionSync, 0, 1, ExecutionSyncParameters)
 BOOST_PARAMETER_MEMFUN (void, executionResult, 0, 3, ExecutionResultParameters)
 BOOST_PARAMETER_MEMFUN (void, executionException, 0, 8, ExecutionExceptionParameters)
 BOOST_PARAMETER_MEMFUN (void, messageTransfer, 0, 5, MessageTransferParameters)
 BOOST_PARAMETER_MEMFUN (void, messageAccept, 0, 2, MessageAcceptParameters)
 BOOST_PARAMETER_MEMFUN (void, messageReject, 0, 4, MessageRejectParameters)
 BOOST_PARAMETER_MEMFUN (void, messageRelease, 0, 3, MessageReleaseParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::MessageAcquireResult, messageAcquire, 0, 2, MessageAcquireParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::MessageResumeResult, messageResume, 0, 3, MessageResumeParameters)
 BOOST_PARAMETER_MEMFUN (void, messageSubscribe, 0, 9, MessageSubscribeParameters)
 BOOST_PARAMETER_MEMFUN (void, messageCancel, 0, 2, MessageCancelParameters)
 BOOST_PARAMETER_MEMFUN (void, messageSetFlowMode, 0, 3, MessageSetFlowModeParameters)
 BOOST_PARAMETER_MEMFUN (void, messageFlow, 0, 4, MessageFlowParameters)
 BOOST_PARAMETER_MEMFUN (void, messageFlush, 0, 2, MessageFlushParameters)
 BOOST_PARAMETER_MEMFUN (void, messageStop, 0, 2, MessageStopParameters)
 BOOST_PARAMETER_MEMFUN (void, txSelect, 0, 1, TxSelectParameters)
 BOOST_PARAMETER_MEMFUN (void, txCommit, 0, 1, TxCommitParameters)
 BOOST_PARAMETER_MEMFUN (void, txRollback, 0, 1, TxRollbackParameters)
 BOOST_PARAMETER_MEMFUN (void, dtxSelect, 0, 1, DtxSelectParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::XaResult, dtxStart, 0, 4, DtxStartParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::XaResult, dtxEnd, 0, 4, DtxEndParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::XaResult, dtxCommit, 0, 3, DtxCommitParameters)
 BOOST_PARAMETER_MEMFUN (void, dtxForget, 0, 2, DtxForgetParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::DtxGetTimeoutResult, dtxGetTimeout, 0, 2, DtxGetTimeoutParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::XaResult, dtxPrepare, 0, 2, DtxPrepareParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::DtxRecoverResult, dtxRecover, 0, 1, DtxRecoverParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::XaResult, dtxRollback, 0, 2, DtxRollbackParameters)
 BOOST_PARAMETER_MEMFUN (void, dtxSetTimeout, 0, 3, DtxSetTimeoutParameters)
 BOOST_PARAMETER_MEMFUN (void, exchangeDeclare, 0, 8, ExchangeDeclareParameters)
 BOOST_PARAMETER_MEMFUN (void, exchangeDelete, 0, 3, ExchangeDeleteParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::ExchangeQueryResult, exchangeQuery, 0, 2, ExchangeQueryParameters)
 BOOST_PARAMETER_MEMFUN (void, exchangeBind, 0, 5, ExchangeBindParameters)
 BOOST_PARAMETER_MEMFUN (void, exchangeUnbind, 0, 4, ExchangeUnbindParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::ExchangeBoundResult, exchangeBound, 0, 5, ExchangeBoundParameters)
 BOOST_PARAMETER_MEMFUN (void, queueDeclare, 0, 8, QueueDeclareParameters)
 BOOST_PARAMETER_MEMFUN (void, queueDelete, 0, 4, QueueDeleteParameters)
 BOOST_PARAMETER_MEMFUN (void, queuePurge, 0, 2, QueuePurgeParameters)
 BOOST_PARAMETER_MEMFUN (qpid::framing::QueueQueryResult, queueQuery, 0, 2, QueueQueryParameters)
void executionSync (bool sync=true)
 This command is complete when all prior commands are completed.
void executionResult (const SequenceNumber &commandId=SequenceNumber(), const std::string &value=std::string(), bool sync=true)
 This command carries data resulting from the execution of a command.
void executionException (uint16_t errorCode=0, const SequenceNumber &commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string &description=std::string(), const FieldTable &errorInfo=FieldTable(), bool sync=true)
 This command informs a peer of an execution exception.
void messageTransfer (const std::string &destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message &content=Message(std::string()), bool sync=true)
 This command transfers a message between two peers.
void messageAccept (const SequenceSet &transfers=SequenceSet(), bool sync=true)
 Accepts the message.
void messageReject (const SequenceSet &transfers=SequenceSet(), uint16_t code=0, const std::string &text=std::string(), bool sync=true)
 Indicates that the message transfers are unprocessable in some way.
void messageRelease (const SequenceSet &transfers=SequenceSet(), bool setRedelivered=false, bool sync=true)
 Release previously transferred messages.
qpid::framing::MessageAcquireResult messageAcquire (const SequenceSet &transfers=SequenceSet(), bool sync=true)
 Acquires previously transferred messages for consumption.
qpid::framing::MessageResumeResult messageResume (const std::string &destination=std::string(), const std::string &resumeId=std::string(), bool sync=true)
 This command resumes an interrupted transfer.
void messageSubscribe (const std::string &queue=std::string(), const std::string &destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string &resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable &arguments=FieldTable(), bool sync=true)
 This command asks the server to start a "subscription", which is a request for messages from a specific queue.
void messageCancel (const std::string &destination=std::string(), bool sync=true)
 This command cancels a subscription.
void messageSetFlowMode (const std::string &destination=std::string(), uint8_t flowMode=0, bool sync=true)
 Sets the mode of flow control used for a given destination to either window or credit based flow control.
void messageFlow (const std::string &destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=true)
 This command controls the flow of message data to a given destination.
void messageFlush (const std::string &destination=std::string(), bool sync=true)
 Forces the sender to exhaust his credit supply.
void messageStop (const std::string &destination=std::string(), bool sync=true)
 On receipt of this command, a producer of messages MUST set his credit to zero for the given destination.
void txSelect (bool sync=true)
 This command sets the session to use standard transactions.
void txCommit (bool sync=true)
 This command commits all messages published and accepted in the current transaction.
void txRollback (bool sync=true)
 This command abandons the current transaction.
void dtxSelect (bool sync=true)
 This command sets the session to use distributed transactions.
qpid::framing::XaResult dtxStart (const Xid &xid=Xid(), bool join=false, bool resume=false, bool sync=true)
 This command is called when messages should be produced and consumed on behalf a transaction branch identified by xid.
qpid::framing::XaResult dtxEnd (const Xid &xid=Xid(), bool fail=false, bool suspend=false, bool sync=true)
 This command is called when the work done on behalf a transaction branch finishes or needs to be suspended.
qpid::framing::XaResult dtxCommit (const Xid &xid=Xid(), bool onePhase=false, bool sync=true)
 Commit the work done on behalf a transaction branch.
void dtxForget (const Xid &xid=Xid(), bool sync=true)
 This command is called to forget about a heuristically completed transaction branch.
qpid::framing::DtxGetTimeoutResult dtxGetTimeout (const Xid &xid=Xid(), bool sync=true)
 This command obtains the current transaction timeout value in seconds.
qpid::framing::XaResult dtxPrepare (const Xid &xid=Xid(), bool sync=true)
 This command prepares for commitment any message produced or consumed on behalf of xid.
qpid::framing::DtxRecoverResult dtxRecover (bool sync=true)
 This command is called to obtain a list of transaction branches that are in a prepared or heuristically completed state.
qpid::framing::XaResult dtxRollback (const Xid &xid=Xid(), bool sync=true)
 This command rolls back the work associated with xid.
void dtxSetTimeout (const Xid &xid=Xid(), uint32_t timeout=0, bool sync=true)
 Sets the specified transaction branch timeout value in seconds.
void exchangeDeclare (const std::string &exchange=std::string(), const std::string &type=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=true)
 This command creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.
void exchangeDelete (const std::string &exchange=std::string(), bool ifUnused=false, bool sync=true)
 This command deletes an exchange.
qpid::framing::ExchangeQueryResult exchangeQuery (const std::string &name=std::string(), bool sync=true)
 This command is used to request information on a particular exchange.
void exchangeBind (const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=true)
 This command binds a queue to an exchange.
void exchangeUnbind (const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), bool sync=true)
 This command unbinds a queue from an exchange.
qpid::framing::ExchangeBoundResult exchangeBound (const std::string &exchange=std::string(), const std::string &queue=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=true)
 This command is used to request information on the bindings to a particular exchange.
void queueDeclare (const std::string &queue=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=true)
 This command creates or checks a queue.
void queueDelete (const std::string &queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=true)
 This command deletes a queue.
void queuePurge (const std::string &queue=std::string(), bool sync=true)
 This command removes all messages from a queue.
qpid::framing::QueueQueryResult queueQuery (const std::string &queue=std::string(), bool sync=true)
 This command requests information about a queue.
SessionId getId () const
 Get the session ID.
void close ()
 Close the session.
void sync ()
 Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.
uint32_t timeout (uint32_t seconds)
 Set the timeout for this session.
void suspend ()
 Suspend the session - detach it from its connection.
void resume (Connection)
 Resume a suspended session with a new connection.
uint16_t getChannel () const
 Get the channel associated with this session.
void flush ()
void markCompleted (const framing::SequenceSet &ids, bool notifyPeer)
void markCompleted (const framing::SequenceNumber &id, bool cumulative, bool notifyPeer)
void sendCompletion ()
bool isValid () const
Connection getConnection ()

Protected Attributes

boost::shared_ptr< SessionImpl > impl

Detailed Description

AMQP 0-10 session API with keyword arguments.

This class provides the same set of functions as no_keyword::Session_0_10, but also allows parameters be passed using keywords. The keyword is the parameter name in the namespace "arg".

For example given the normal function "foo(int x=0, int y=0, int z=0)" you could call it in either of the following ways:

 session.foo(1,2,3);             // Normal no keywords
 session.foo(arg::z=3, arg::x=1); // Keywords and a default

The keyword functions are easy to use but their declarations are hard to read. You may find it easier to read the documentation for no_keyword::Session_0_10 which provides the same set of functions using normal non-keyword declarations.

Publishing Messages

Exchanges

  • exchangeBind()

    session.exchangeBind(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=routing_key);
  • exchangeUnbind()

    session.exchangeUnBind(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=routing_key);
  • exchangeBound()

    if (session.exchangeBound(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=rk)){...}
    if (session.exchangeBound(arg::exchange="amq.topic", arg::queue=queue)){...}
  • exchangeDeclare()

    session.exchangeDeclare(arg::exchange="my.topic", arg::type="topic");
    session.exchangeDeclare(arg::exchange="xml", arg::type="xml");
  • exchangeDelete()

    session.exchangeDeclare(arg::exchange="my.topic");
    session.exchangeDeclare(arg::exchange="xml", arg::ifUnused=true);
  • exchangeQuery()

    ExchangeQueryResult eqr = session.exchangeQuery(arg::exchange="my.topic");

Configuring exchanges in session.exchangeDeclare

arg::durable=true

Default: false.

If durable=true, an exchange remains active even if the server is restarted. If durable=false, an exchange is purged when a server restarts.

arg::autoDelete=true

Default: false.

If autoDelete=true, deleting the last binding for an exchange also deletes the exchange.

arg::alternatExchange="my.exchange"

Default: none.

If an alternate exchange is specified, messages that can not be delivered to any queue are sent to the alternate exchange.

Queues

  • queueDeclare()

    session.queueDeclare(arg::queue="message_queue");
  • queueDelete()

    session.queueDelete(arg::queue="message_queue");
  • queuePurge()

    session.queuePurge(arg::queue="message_queue");
  • queueQuery()

    QueueQueryResult qqr = session.queueQuery(arg::queue="message_queue");

Configuring queues with session.queueDeclare

arg::durable=true

Default: false.

If durable=true, a queue remains active if the server is restarted. If durable=false, a queue and its contents are lost when a server restarts.

arg::autoDelete=true

Default: false.

If autoDelete=true, the queue is deleted when the last active Subscription to the Queue is canceled.

arg::exclusive=true

Default: false.

If exclusive=true, only the Session that created a queue can access it.

arg::alternateExchange="my.exchange"

Default: none.

If an alternate exchange is specified, messages are routed to it if (1) they are rejected by a client, or (2) they remain on the queue when it is deleted.

Accepting, Acquiring, Rejecting, or Releasing Messages

  • messageAccept() — acknowledges messages

    SequenceSet tobeAccepted; 
     toAccepted.add(msg.getId()); 
     session.messageAccept(toBeAccepted);
  • messageAcquire()

    SequenceSet tobeAcquired;
     toBeAcquired.add(msg.getId()); 
     session.messageAcquire(toBeAcquired);
  • messageReject()

    SequenceSet tobeRejected; 
     toRejected.add(msg.getId()); 
     session.messageReject(toBeRejected);
  • messageRelease()

    SequenceSet tobeReleased; 
     toReleased.add(msg.getId()); 
     session.messageRelease(toBeReleased);

Transactions


Constructor & Destructor Documentation

qpid::client::Session_0_10::Session_0_10 ( ) [inline]

Reimplemented from qpid::client::no_keyword::Session_0_10.

Definition at line 555 of file Session_0_10.h.

qpid::client::Session_0_10::Session_0_10 ( const SessionBase_0_10 other) [inline]

Reimplemented from qpid::client::no_keyword::Session_0_10.

Definition at line 556 of file Session_0_10.h.


Member Function Documentation

qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
executionSync  ,
,
,
ExecutionSyncParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
executionResult  ,
,
,
ExecutionResultParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
executionException  ,
,
,
ExecutionExceptionParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageTransfer  ,
,
,
MessageTransferParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageAccept  ,
,
,
MessageAcceptParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageReject  ,
,
,
MessageRejectParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageRelease  ,
,
,
MessageReleaseParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::MessageAcquireResult  ,
messageAcquire  ,
,
,
MessageAcquireParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::MessageResumeResult  ,
messageResume  ,
,
,
MessageResumeParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageSubscribe  ,
,
,
MessageSubscribeParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageCancel  ,
,
,
MessageCancelParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageSetFlowMode  ,
,
,
MessageSetFlowModeParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageFlow  ,
,
,
MessageFlowParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageFlush  ,
,
,
MessageFlushParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
messageStop  ,
,
,
MessageStopParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
txSelect  ,
,
,
TxSelectParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
txCommit  ,
,
,
TxCommitParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
txRollback  ,
,
,
TxRollbackParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
dtxSelect  ,
,
,
DtxSelectParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::XaResult  ,
dtxStart  ,
,
,
DtxStartParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::XaResult  ,
dtxEnd  ,
,
,
DtxEndParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::XaResult  ,
dtxCommit  ,
,
,
DtxCommitParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
dtxForget  ,
,
,
DtxForgetParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::DtxGetTimeoutResult  ,
dtxGetTimeout  ,
,
,
DtxGetTimeoutParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::XaResult  ,
dtxPrepare  ,
,
,
DtxPrepareParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::DtxRecoverResult  ,
dtxRecover  ,
,
,
DtxRecoverParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::XaResult  ,
dtxRollback  ,
,
,
DtxRollbackParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
dtxSetTimeout  ,
,
,
DtxSetTimeoutParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
exchangeDeclare  ,
,
,
ExchangeDeclareParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
exchangeDelete  ,
,
,
ExchangeDeleteParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::ExchangeQueryResult  ,
exchangeQuery  ,
,
,
ExchangeQueryParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
exchangeBind  ,
,
,
ExchangeBindParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
exchangeUnbind  ,
,
,
ExchangeUnbindParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::ExchangeBoundResult  ,
exchangeBound  ,
,
,
ExchangeBoundParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
queueDeclare  ,
,
,
QueueDeclareParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
queueDelete  ,
,
,
QueueDeleteParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( void  ,
queuePurge  ,
,
,
QueuePurgeParameters   
) [inline]
qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN ( qpid::framing::QueueQueryResult  ,
queueQuery  ,
,
,
QueueQueryParameters   
) [inline]
void qpid::client::SessionBase_0_10::close ( ) [inherited]

Close the session.

A session is automatically closed when all handles to it are destroyed.

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxCommit ( const Xid &  xid = Xid(),
bool  onePhase = false,
bool  sync = true 
) [inherited]

Commit the work done on behalf a transaction branch.

This command commits the work associated with xid. Any produced messages are made available and any consumed messages are discarded.

Parameters:
xidSpecifies the xid of the transaction branch to be committed.
onePhaseUsed to indicate whether one-phase or two-phase commit is used.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxEnd ( const Xid &  xid = Xid(),
bool  fail = false,
bool  suspend = false,
bool  sync = true 
) [inherited]

This command is called when the work done on behalf a transaction branch finishes or needs to be suspended.

Parameters:
xidSpecifies the xid of the transaction branch to be ended.
failIf set, indicates that this portion of work has failed; otherwise this portion of work has completed successfully.
suspendIndicates that the transaction branch is temporarily suspended in an incomplete state.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::dtxForget ( const Xid &  xid = Xid(),
bool  sync = true 
) [inherited]

This command is called to forget about a heuristically completed transaction branch.

Parameters:
xidSpecifies the xid of the transaction branch to be forgotten.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::DtxGetTimeoutResult qpid::client::no_keyword::Session_0_10::dtxGetTimeout ( const Xid &  xid = Xid(),
bool  sync = true 
) [inherited]

This command obtains the current transaction timeout value in seconds.

If set-timeout was not used prior to invoking this command, the return value is the default timeout; otherwise, the value used in the previous set-timeout call is returned.

Parameters:
xidSpecifies the xid of the transaction branch for getting the timeout.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxPrepare ( const Xid &  xid = Xid(),
bool  sync = true 
) [inherited]

This command prepares for commitment any message produced or consumed on behalf of xid.

Parameters:
xidSpecifies the xid of the transaction branch that can be prepared.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::DtxRecoverResult qpid::client::no_keyword::Session_0_10::dtxRecover ( bool  sync = true) [inherited]

This command is called to obtain a list of transaction branches that are in a prepared or heuristically completed state.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxRollback ( const Xid &  xid = Xid(),
bool  sync = true 
) [inherited]

This command rolls back the work associated with xid.

Any produced messages are discarded and any consumed messages are re-enqueued.

Parameters:
xidSpecifies the xid of the transaction branch that can be rolled back.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::dtxSelect ( bool  sync = true) [inherited]

This command sets the session to use distributed transactions.

The client must use this command at least once on a session before using XA demarcation operations.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::dtxSetTimeout ( const Xid &  xid = Xid(),
uint32_t  timeout = 0,
bool  sync = true 
) [inherited]

Sets the specified transaction branch timeout value in seconds.

Parameters:
xidSpecifies the xid of the transaction branch for setting the timeout.
timeoutThe transaction timeout value in seconds.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxStart ( const Xid &  xid = Xid(),
bool  join = false,
bool  resume = false,
bool  sync = true 
) [inherited]

This command is called when messages should be produced and consumed on behalf a transaction branch identified by xid.

Parameters:
xidSpecifies the xid of the transaction branch to be started.
joinIndicate whether this is joining an already associated xid. Indicate that the start applies to joining a transaction previously seen.
resumeIndicate that the start applies to resuming a suspended transaction branch specified.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::exchangeBind ( const std::string queue = std::string(),
const std::string exchange = std::string(),
const std::string bindingKey = std::string(),
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
) [inherited]

This command binds a queue to an exchange.

Until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a direct exchange and subscription queues are bound to a topic exchange.

Parameters:
queueSpecifies the name of the queue to bind.
exchange
bindingKeyThe binding-key uniquely identifies a binding between a given (exchange, queue) pair. Depending on the exchange configuration, the binding key may be matched against the message routing key in order to make routing decisions. The match algorithm depends on the exchange type. Some exchange types may ignore the binding key when making routing decisions. Refer to the specific exchange type documentation. The meaning of an empty binding key depends on the exchange implementation.
argumentsA set of arguments for the binding. The syntax and semantics of these arguments depends on the exchange class.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::ExchangeBoundResult qpid::client::no_keyword::Session_0_10::exchangeBound ( const std::string exchange = std::string(),
const std::string queue = std::string(),
const std::string bindingKey = std::string(),
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
) [inherited]

This command is used to request information on the bindings to a particular exchange.

Parameters:
exchangeThe name of the exchange for which binding information is being requested. If not specified explicitly the default exchange is implied.
queueIf populated then determine whether the given queue is bound to the exchange.
bindingKeyIf populated defines the binding-key of the binding of interest, if not populated the request will ignore the binding-key on bindings when searching for a match.
argumentsIf populated defines the arguments of the binding of interest if not populated the request will ignore the arguments on bindings when searching for a match
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::exchangeDeclare ( const std::string exchange = std::string(),
const std::string type = std::string(),
const std::string alternateExchange = std::string(),
bool  passive = false,
bool  durable = false,
bool  autoDelete = false,
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
) [inherited]

This command creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.

Parameters:
exchange
typeEach exchange belongs to one of a set of exchange types implemented by the server. The exchange types define the functionality of the exchange - i.e. how messages are routed through it. It is not valid or meaningful to attempt to change the type of an existing exchange.
alternateExchangeIn the event that a message cannot be routed, this is the name of the exchange to which the message will be sent. Messages transferred using message.transfer will be routed to the alternate-exchange only if they are sent with the "none" accept-mode, and the discard-unroutable delivery property is set to false, and there is no queue to route to for the given message according to the bindings on this exchange.
passiveIf set, the server will not create the exchange. The client can use this to check whether an exchange exists without modifying the server state.
durableIf set when creating a new exchange, the exchange will be marked as durable. Durable exchanges remain active when a server restarts. Non-durable exchanges (transient exchanges) are purged if/when a server restarts.
autoDeleteIf set, the exchange is deleted automatically when there remain no bindings between the exchange and any queue. Such an exchange will not be automatically deleted until at least one binding has been made to prevent the immediate deletion of the exchange upon creation.
argumentsA set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored if passive is 1.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::exchangeDelete ( const std::string exchange = std::string(),
bool  ifUnused = false,
bool  sync = true 
) [inherited]

This command deletes an exchange.

When an exchange is deleted all queue bindings on the exchange are cancelled.

Parameters:
exchange
ifUnusedIf set, the server will only delete the exchange if it has no queue bindings. If the exchange has queue bindings the server does not delete it but raises an exception instead.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::ExchangeQueryResult qpid::client::no_keyword::Session_0_10::exchangeQuery ( const std::string name = std::string(),
bool  sync = true 
) [inherited]

This command is used to request information on a particular exchange.

Parameters:
nameThe name of the exchange for which information is requested. If not specified explicitly the default exchange is implied.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::exchangeUnbind ( const std::string queue = std::string(),
const std::string exchange = std::string(),
const std::string bindingKey = std::string(),
bool  sync = true 
) [inherited]

This command unbinds a queue from an exchange.

Parameters:
queueSpecifies the name of the queue to unbind.
exchangeThe name of the exchange to unbind from.
bindingKeySpecifies the binding-key of the binding to unbind.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::executionException ( uint16_t  errorCode = 0,
const SequenceNumber &  commandId = SequenceNumber(),
uint8_t  classCode = 0,
uint8_t  commandCode = 0,
uint8_t  fieldIndex = 0,
const std::string description = std::string(),
const FieldTable &  errorInfo = FieldTable(),
bool  sync = true 
) [inherited]

This command informs a peer of an execution exception.

The command-id, when given, correlates the error to a specific command.

Parameters:
errorCode
commandIdThe command-id of the command which caused the exception. If the exception was not caused by a specific command, this value is not set.
classCode
commandCode
fieldIndexThe zero based index of the exceptional field within the arguments to the exceptional command. If the exception was not caused by a specific field, this value is not set.
descriptionThe description provided is implementation defined, but MUST be in the language appropriate for the selected locale. The intention is that this description is suitable for logging or alerting output.
errorInfo
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::executionResult ( const SequenceNumber &  commandId = SequenceNumber(),
const std::string value = std::string(),
bool  sync = true 
) [inherited]

This command carries data resulting from the execution of a command.

Parameters:
commandId
value
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::executionSync ( bool  sync = true) [inherited]

This command is complete when all prior commands are completed.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::SessionBase_0_10::flush ( ) [inherited]
uint16_t qpid::client::SessionBase_0_10::getChannel ( ) const [inherited]

Get the channel associated with this session.

Connection qpid::client::SessionBase_0_10::getConnection ( ) [inherited]
SessionId qpid::client::SessionBase_0_10::getId ( ) const [inherited]

Get the session ID.

bool qpid::client::SessionBase_0_10::isValid ( ) const [inherited]
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceSet ids,
bool  notifyPeer 
) [inherited]
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceNumber id,
bool  cumulative,
bool  notifyPeer 
) [inherited]
void qpid::client::no_keyword::Session_0_10::messageAccept ( const SequenceSet &  transfers = SequenceSet(),
bool  sync = true 
) [inherited]

Accepts the message.

Once a transfer is accepted, the command-id may no longer be referenced from other commands.

Parameters:
transfersIdentifies the messages previously transferred that should be accepted.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::MessageAcquireResult qpid::client::no_keyword::Session_0_10::messageAcquire ( const SequenceSet &  transfers = SequenceSet(),
bool  sync = true 
) [inherited]

Acquires previously transferred messages for consumption.

The acquired ids (if any) are sent via message.acquired.

Parameters:
transfersIndicates the messages to be acquired.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageCancel ( const std::string destination = std::string(),
bool  sync = true 
) [inherited]

This command cancels a subscription.

This does not affect already delivered messages, but it does mean the server will not send any more messages for that subscription. The client may receive an arbitrary number of messages in between sending the cancel command and receiving notification that the cancel command is complete.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageFlow ( const std::string destination = std::string(),
uint8_t  unit = 0,
uint32_t  value = 0,
bool  sync = true 
) [inherited]

This command controls the flow of message data to a given destination.

It is used by the recipient of messages to dynamically match the incoming rate of message flow to its processing or forwarding capacity. Upon receipt of this command, the sender must add "value" number of the specified unit to the available credit balance for the specified destination. A value of (0xFFFFFFFF) indicates an infinite amount of credit. This disables any limit for the given unit until the credit balance is zeroed with message.stop or message.flush.

Parameters:
destination
unitThe unit of value.
valueIf the value is not set then this indicates an infinite amount of credit.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageFlush ( const std::string destination = std::string(),
bool  sync = true 
) [inherited]

Forces the sender to exhaust his credit supply.

The sender's credit will always be zero when this command completes. The command completes when immediately available message data has been transferred, or when the credit supply is exhausted.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageReject ( const SequenceSet &  transfers = SequenceSet(),
uint16_t  code = 0,
const std::string text = std::string(),
bool  sync = true 
) [inherited]

Indicates that the message transfers are unprocessable in some way.

A server may reject a message if it is unroutable. A client may reject a message if it is invalid. A message may be rejected for other reasons as well. Once a transfer is rejected, the command-id may no longer be referenced from other commands.

Parameters:
transfersIdentifies the messages previously transferred that should be rejected.
codeCode describing the reason for rejection.
textText describing the reason for rejection.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageRelease ( const SequenceSet &  transfers = SequenceSet(),
bool  setRedelivered = false,
bool  sync = true 
) [inherited]

Release previously transferred messages.

When acquired messages are released, they become available for acquisition by any subscriber. Once a transfer is released, the command-id may no longer be referenced from other commands.

Parameters:
transfersIndicates the messages to be released.
setRedeliveredBy setting set-redelivered to true, any acquired messages released to a queue with this command will be marked as redelivered on their next transfer from that queue. If this flag is not set, then an acquired message will retain its original redelivered status on the queue. Messages that are not acquired are unaffected by the value of this flag.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::MessageResumeResult qpid::client::no_keyword::Session_0_10::messageResume ( const std::string destination = std::string(),
const std::string resumeId = std::string(),
bool  sync = true 
) [inherited]

This command resumes an interrupted transfer.

The recipient should return the amount of partially transferred data associated with the given resume-id, or zero if there is no data at all. If a non-zero result is returned, the recipient should expect to receive message fragment(s) containing the remainder of the interrupted message.

Parameters:
destinationThe destination to which the remaining message fragments are transferred.
resumeIdThe name of the transfer being resumed.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageSetFlowMode ( const std::string destination = std::string(),
uint8_t  flowMode = 0,
bool  sync = true 
) [inherited]

Sets the mode of flow control used for a given destination to either window or credit based flow control.

With credit based flow control, the sender of messages continually maintains its current credit balance with the recipient. The credit balance consists of two values, a message count, and a byte count. Whenever message data is sent, both counts must be decremented. If either value reaches zero, the flow of message data must stop. Additional credit is received via the message.flow command.

The sender MUST NOT send partial assemblies. This means that if there is not enough byte credit available to send a complete message, the sender must either wait or use message fragmentation (see the fragment-properties header struct) to send the first part of the message data in a complete assembly.

Window based flow control is identical to credit based flow control, however message transfer completion implicitly grants a single unit of message credit, and the size of the message in byte credits for each completed message transfer. Completion of the transfer command with session.completed is the only way credit is implicitly updated; message.accept, message.release, message.reject, tx.commit and tx.rollback have no effect on the outstanding credit balances.

Parameters:
destination
flowModeThe new flow control mode.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageStop ( const std::string destination = std::string(),
bool  sync = true 
) [inherited]

On receipt of this command, a producer of messages MUST set his credit to zero for the given destination.

When notifying of completion, credit MUST be zero and no further messages will be sent until such a time as further credit is received.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageSubscribe ( const std::string queue = std::string(),
const std::string destination = std::string(),
uint8_t  acceptMode = 0,
uint8_t  acquireMode = 0,
bool  exclusive = false,
const std::string resumeId = std::string(),
uint64_t  resumeTtl = 0,
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
) [inherited]

This command asks the server to start a "subscription", which is a request for messages from a specific queue.

Subscriptions last as long as the session they were created on, or until the client cancels them.

Parameters:
queueSpecifies the name of the subscribed queue.
destinationThe client specified name for the subscription. This is used as the destination for all messages transferred from this subscription. The destination is scoped to the session.
acceptModeThe accept-mode to use for messages transferred from this subscription.
acquireModeThe acquire-mode to use for messages transferred from this subscription.
exclusiveRequest an exclusive subscription. This prevents other subscribers from subscribing to the queue.
resumeIdRequests that the broker use the supplied resume-id when transferring messages for this subscription.
resumeTtlRequested duration in milliseconds for the broker use as resume-ttl when transferring messages for this subscription.
argumentsThe syntax and semantics of these arguments depends on the providers implementation.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageTransfer ( const std::string destination = std::string(),
uint8_t  acceptMode = 1,
uint8_t  acquireMode = 0,
const Message content = Message(std::string()),
bool  sync = true 
) [inherited]

This command transfers a message between two peers.

When a client uses this command to publish a message to a broker, the destination identifies a specific exchange. The message will then be routed to queues as defined by the exchange configuration.

The client may request a broker to transfer messages to it, from a particular queue, by issuing a subscribe command. The subscribe command specifies the destination that the broker should use for any resulting transfers.

Parameters:
destinationSpecifies the destination to which the message is to be transferred.
acceptModeIndicates whether message.accept, session.complete, or nothing at all is required to indicate successful transfer of the message.
acquireModeIndicates whether or not the transferred message has been acquired.
contentMessage content
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Session_0_10 & qpid::client::Session_0_10::operator= ( const SessionBase_0_10 other) [inline]

Reimplemented from qpid::client::no_keyword::Session_0_10.

Definition at line 559 of file Session_0_10.h.

References qpid::client::SessionBase_0_10::impl.

void qpid::client::no_keyword::Session_0_10::queueDeclare ( const std::string queue = std::string(),
const std::string alternateExchange = std::string(),
bool  passive = false,
bool  durable = false,
bool  exclusive = false,
bool  autoDelete = false,
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
) [inherited]

This command creates or checks a queue.

When creating a new queue the client can specify various properties that control the durability of the queue and its contents, and the level of sharing for the queue.

Parameters:
queue
alternateExchangeThe alternate-exchange field specifies how messages on this queue should be treated when they are rejected by a subscriber, or when they are orphaned by queue deletion. When present, rejected or orphaned messages MUST be routed to the alternate-exchange. In all cases the messages MUST be removed from the queue.
passiveIf set, the server will not create the queue. This field allows the client to assert the presence of a queue without modifying the server state.
durableIf set when creating a new queue, the queue will be marked as durable. Durable queues remain active when a server restarts. Non-durable queues (transient queues) are purged if/when a server restarts. Note that durable queues do not necessarily hold persistent messages, although it does not make sense to send persistent messages to a transient queue.
exclusiveExclusive queues can only be used from one session at a time. Once a session declares an exclusive queue, that queue cannot be used by any other session until the declaring session closes.
autoDeleteIf this field is set and the exclusive field is also set, then the queue MUST be deleted when the session closes.

If this field is set and the exclusive field is not set the queue is deleted when all the consumers have finished using it. Last consumer can be cancelled either explicitly or because its session is closed. If there was no consumer ever on the queue, it won't be deleted.

Parameters:
argumentsA set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored if passive is 1.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::queueDelete ( const std::string queue = std::string(),
bool  ifUnused = false,
bool  ifEmpty = false,
bool  sync = true 
) [inherited]

This command deletes a queue.

When a queue is deleted any pending messages are sent to the alternate-exchange if defined, or discarded if it is not.

Parameters:
queueSpecifies the name of the queue to delete.
ifUnusedIf set, the server will only delete the queue if it has no consumers. If the queue has consumers the server does does not delete it but raises an exception instead.
ifEmptyIf set, the server will only delete the queue if it has no messages.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::queuePurge ( const std::string queue = std::string(),
bool  sync = true 
) [inherited]

This command removes all messages from a queue.

It does not cancel subscribers. Purged messages are deleted without any formal "undo" mechanism.

Parameters:
queueSpecifies the name of the queue to purge.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

qpid::framing::QueueQueryResult qpid::client::no_keyword::Session_0_10::queueQuery ( const std::string queue = std::string(),
bool  sync = true 
) [inherited]

This command requests information about a queue.

Parameters:
queue
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::SessionBase_0_10::resume ( Connection  ) [inherited]

Resume a suspended session with a new connection.

void qpid::client::SessionBase_0_10::sendCompletion ( ) [inherited]
void qpid::client::SessionBase_0_10::suspend ( ) [inherited]

Suspend the session - detach it from its connection.

void qpid::client::SessionBase_0_10::sync ( ) [inherited]

Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.

Note sync() is always synchronous, even on an AsyncSession object because that's almost always what you want. You can call AsyncSession::executionSync() directly in the unusual event that you want to do an asynchronous sync.

uint32_t qpid::client::SessionBase_0_10::timeout ( uint32_t  seconds) [inherited]

Set the timeout for this session.

void qpid::client::no_keyword::Session_0_10::txCommit ( bool  sync = true) [inherited]

This command commits all messages published and accepted in the current transaction.

A new transaction starts immediately after a commit.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::txRollback ( bool  sync = true) [inherited]

This command abandons the current transaction.

In particular the transfers from Client to Server (publishes) and accepts of transfers from Server to Client which occurred in the current transaction are discarded. A new transaction starts immediately after a rollback.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::txSelect ( bool  sync = true) [inherited]

This command sets the session to use standard transactions.

The client must use this command exactly once on a session before using the Commit or Rollback commands.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().


Member Data Documentation

boost::shared_ptr<SessionImpl> qpid::client::SessionBase_0_10::impl [protected, inherited]

Definition at line 104 of file SessionBase_0_10.h.

Referenced by qpid::client::AsyncSession_0_10::operator=(), and operator=().


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x68.html0000664000076400007640000003471511752725717022327 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- h -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00464.html0000664000076400007640000001330511752725717017325 0ustar00jrossjross00000000000000 qpid/client/FailoverListener.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FailoverListener.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::FailoverListener
 Listen for updates from the amq.failover exchange. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x73.html0000664000076400007640000011705611752725717022323 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- s -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00405.html0000664000076400007640000001232711752725717017323 0ustar00jrossjross00000000000000 qpid/console/Agent.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Agent.h File Reference

Go to the source code of this file.

Classes

class  qpid::console::Agent

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::console

Functions

std::ostreamqpid::console::operator<< (std::ostream &o, const Agent &agent)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00624.html0000664000076400007640000001732211752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::BrokerEvent Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00037.html0000664000076400007640000001300711752725720017312 0ustar00jrossjross00000000000000 std::basic_string Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_string Class Reference

STL class. More...

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x6a.html0000664000076400007640000001441711752725717021362 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- j -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00056.html0000664000076400007640000004106711752725720017322 0ustar00jrossjross00000000000000 qpid::sys::Condition Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Condition Class Reference

A condition variable for thread synchronization. More...

#include <qpid/sys/posix/Condition.h>

List of all members.

Public Member Functions

 Condition ()
 ~Condition ()
void wait (Mutex &)
bool wait (Mutex &, const AbsTime &absoluteTime)
void notify ()
void notifyAll ()
 Condition ()
 ~Condition ()
void wait (Mutex &)
bool wait (Mutex &, const AbsTime &absoluteTime)
void notify ()
void notifyAll ()

Detailed Description

A condition variable for thread synchronization.

Definition at line 40 of file Condition.h.


Constructor & Destructor Documentation

qpid::sys::Condition::Condition ( ) [inline]

Definition at line 54 of file Condition.h.

References QPID_POSIX_ASSERT_THROW_IF.

qpid::sys::Condition::~Condition ( ) [inline]

Definition at line 58 of file Condition.h.

References QPID_POSIX_ABORT_IF.

qpid::sys::Condition::Condition ( ) [inline]
qpid::sys::Condition::~Condition ( ) [inline]

Member Function Documentation

void qpid::sys::Condition::notify ( ) [inline]

Definition at line 77 of file Condition.h.

References QPID_POSIX_ASSERT_THROW_IF.

void qpid::sys::Condition::notify ( ) [inline]
void qpid::sys::Condition::notifyAll ( ) [inline]

Definition at line 81 of file Condition.h.

References QPID_POSIX_ASSERT_THROW_IF.

void qpid::sys::Condition::notifyAll ( ) [inline]
void qpid::sys::Condition::wait ( Mutex ) [inline]
void qpid::sys::Condition::wait ( Mutex mutex) [inline]

Definition at line 62 of file Condition.h.

References QPID_POSIX_ASSERT_THROW_IF, and qpid::sys::Mutex::mutex.

bool qpid::sys::Condition::wait ( Mutex mutex,
const AbsTime absoluteTime 
) [inline]
bool qpid::sys::Condition::wait ( Mutex ,
const AbsTime absoluteTime 
) [inline]

The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/nav_f.png0000664000076400007640000000023711752725717017420 0ustar00jrossjross00000000000000‰PNG  IHDR8³»fIDATxíÝIB1 Q;uÛ¿@ÑÏh;áÚ ±aË !ŽÐ‹V½CÈíþ âŠÅÆ|c±˜¾™¶¶3èsÑFÐFP»S{PšSšsVãlN®F.F.“ã2’ˆüµ¤ï_U¿Œ¾˜Ïþ«‰ÈH Ým”°•IEND®B`‚qpidc-0.16/docs/api/html/a00405_source.html0000664000076400007640000002441111752725717020700 0ustar00jrossjross00000000000000 qpid/console/Agent.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Agent.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_AGENT_H_
00022 #define _QPID_CONSOLE_AGENT_H_
00023 
00024 #include "qpid/console/Broker.h"
00025 #include "qpid/console/ConsoleImportExport.h"
00026 
00027 namespace qpid {
00028 namespace console {
00029 
00034     class QPID_CONSOLE_CLASS_EXTERN Agent {
00035     public:
00036         typedef std::vector<Agent*> Vector;
00037 
00038         QPID_CONSOLE_INLINE_EXTERN Agent(Broker* _broker, uint32_t _bank, const std::string& _label) :
00039             broker(_broker), brokerBank(broker->getBrokerBank()),
00040             agentBank(_bank), label(_label) {}
00041         QPID_CONSOLE_INLINE_EXTERN Broker* getBroker() const { return broker; }
00042         QPID_CONSOLE_INLINE_EXTERN uint32_t getBrokerBank() const { return brokerBank; }
00043         QPID_CONSOLE_INLINE_EXTERN uint32_t getAgentBank() const { return agentBank; }
00044         QPID_CONSOLE_INLINE_EXTERN const std::string& getLabel() const { return label; }
00045 
00046     private:
00047         Broker* broker;
00048         const uint32_t brokerBank;
00049         const uint32_t agentBank;
00050         const std::string label;
00051     };
00052 
00053     std::ostream& operator<<(std::ostream& o, const Agent& agent);
00054 }
00055 }
00056 
00057 
00058 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00758.html0000664000076400007640000002133211752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Str8Value Member List
This is the complete list of members for qpid::framing::Str8Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
Str8Value(const std::string &v)qpid::framing::Str8Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00084.html0000664000076400007640000001041211752725720017311 0ustar00jrossjross00000000000000 std::string::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::string::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00570_source.html0000664000076400007640000004533011752725717020706 0ustar00jrossjross00000000000000 qpid/Url.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Url.h
Go to the documentation of this file.
00001 #ifndef QPID_URL_H
00002 #define QPID_URL_H
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/Address.h"
00023 #include "qpid/Exception.h"
00024 #include <string>
00025 #include <vector>
00026 #include <new>
00027 #include <ostream>
00028 #include "qpid/CommonImportExport.h"
00029 
00030 namespace qpid {
00031 
00033 struct Url : public std::vector<Address> {
00034 
00036     QPID_COMMON_EXTERN static Url getHostNameUrl(uint16_t port);
00037 
00040     QPID_COMMON_EXTERN static Url getIpAddressesUrl(uint16_t port);
00041 
00042     struct Invalid : public Exception { Invalid(const std::string& s); };
00043 
00045     QPID_COMMON_EXTERN std::string str() const;
00046 
00048     Url() {}
00049 
00051     explicit Url(const Address& addr) { push_back(addr); }
00052 
00054     explicit Url(const std::string& url) { parse(url.c_str()); }
00056     explicit Url(const std::string& url, const std::string& defaultProtocol) { parse(url.c_str(), defaultProtocol); }
00057 
00059     explicit Url(const char* url) { parse(url); }
00060 
00061     Url& operator=(const char* s) { parse(s); return *this; }
00062     Url& operator=(const std::string& s) { parse(s); return *this; }
00063 
00065     QPID_COMMON_EXTERN void throwIfEmpty() const;
00066 
00070     QPID_COMMON_EXTERN void parse(const char* url);
00071     QPID_COMMON_EXTERN void parse(const char* url, const std::string& defaultProtocol);
00072     QPID_COMMON_INLINE_EXTERN void parse(const std::string& url) { parse(url.c_str()); }
00073 
00075     QPID_COMMON_EXTERN void parseNoThrow(const char* url);
00076     QPID_COMMON_EXTERN void parseNoThrow(const char* url, const std::string& defaultProtocol);
00077 
00081     QPID_COMMON_EXTERN static void addProtocol(const std::string& tag);
00082 
00083     QPID_COMMON_EXTERN void setUser(const std::string&);
00084     QPID_COMMON_EXTERN void setPass(const std::string&);
00085     QPID_COMMON_EXTERN std::string getUser() const;
00086     QPID_COMMON_EXTERN std::string getPass() const;
00087 
00088   private:
00089     mutable std::string cache;  // cache string form for efficiency.
00090     std::string user, pass;
00091 
00092   friend class UrlParser;
00093 };
00094 
00095 inline bool operator==(const Url& a, const Url& b) { return a.str()==b.str(); }
00096 inline bool operator!=(const Url& a, const Url& b) { return a.str()!=b.str(); }
00097 
00098 QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& os, const Url& url);
00099 QPID_COMMON_EXTERN std::istream& operator>>(std::istream& is, Url& url);
00100 
00101 } // namespace qpid
00102 
00103 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00309.html0000664000076400007640000007224711752725717017335 0ustar00jrossjross00000000000000 qmf::SchemaProperty Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::SchemaProperty Class Reference

#include <qmf/SchemaProperty.h>

List of all members.

Public Member Functions

 SchemaProperty (SchemaPropertyImpl *impl=0)
 SchemaProperty (const SchemaProperty &)
SchemaPropertyoperator= (const SchemaProperty &)
 ~SchemaProperty ()
 SchemaProperty (const std::string &, int, const std::string &o="")
void setAccess (int)
void setIndex (bool)
void setOptional (bool)
void setUnit (const std::string &)
void setDesc (const std::string &)
void setSubtype (const std::string &)
void setDirection (int)
const std::stringgetName () const
int getType () const
int getAccess () const
bool isIndex () const
bool isOptional () const
const std::stringgetUnit () const
const std::stringgetDesc () const
const std::stringgetSubtype () const
int getDirection () const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::SchemaProperty::SchemaProperty ( SchemaPropertyImpl *  impl = 0)
qmf::SchemaProperty::SchemaProperty ( const SchemaProperty )
qmf::SchemaProperty::~SchemaProperty ( )
qmf::SchemaProperty::SchemaProperty ( const std::string ,
int  ,
const std::string o = "" 
)

Member Function Documentation

int qmf::SchemaProperty::getAccess ( ) const
const std::string& qmf::SchemaProperty::getDesc ( ) const
int qmf::SchemaProperty::getDirection ( ) const
const std::string& qmf::SchemaProperty::getName ( ) const
const std::string& qmf::SchemaProperty::getSubtype ( ) const
int qmf::SchemaProperty::getType ( ) const
const std::string& qmf::SchemaProperty::getUnit ( ) const
bool qmf::SchemaProperty::isIndex ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

bool qmf::SchemaProperty::isOptional ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

SchemaProperty& qmf::SchemaProperty::operator= ( const SchemaProperty )
void qmf::SchemaProperty::setAccess ( int  )
void qmf::SchemaProperty::setDesc ( const std::string )
void qmf::SchemaProperty::setDirection ( int  )
void qmf::SchemaProperty::setIndex ( bool  )
void qmf::SchemaProperty::setOptional ( bool  )
void qmf::SchemaProperty::setSubtype ( const std::string )
void qmf::SchemaProperty::setUnit ( const std::string )
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00322.html0000664000076400007640000002156111752725720017313 0ustar00jrossjross00000000000000 qpid::console::SequenceManager Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SequenceManager Class Reference

#include <qpid/console/SequenceManager.h>

List of all members.

Public Types

typedef std::set< uint32_tset

Public Member Functions

 SequenceManager ()
uint32_t reserve (const std::string &context="")
std::string release (uint32_t seq)

Member Typedef Documentation


Constructor & Destructor Documentation

qpid::console::SequenceManager::SequenceManager ( ) [inline]

Definition at line 41 of file SequenceManager.h.


Member Function Documentation

std::string qpid::console::SequenceManager::release ( uint32_t  seq)
uint32_t qpid::console::SequenceManager::reserve ( const std::string context = "")

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00243.html0000664000076400007640000001021311752725720017305 0ustar00jrossjross00000000000000 std::ostream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::ostream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00566.html0000664000076400007640000001166011752725717017332 0ustar00jrossjross00000000000000 qpid/sys/StrError.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/StrError.h File Reference
#include <string>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Functions

std::string qpid::sys::strError (int err)
 Get the error message for a system number err, e.g.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00800.html0000664000076400007640000001372411752725720017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::InternalErrorException Member List
This is the complete list of members for qpid::framing::InternalErrorException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::InternalErrorException [inline, virtual]
InternalErrorException(const std::string &msg=std::string())qpid::framing::InternalErrorException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x78.html0000664000076400007640000001460511752725717021311 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- x -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00447.html0000664000076400007640000001135311752725717017327 0ustar00jrossjross00000000000000 qmf/SchemaProperty.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/SchemaProperty.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qpid/types/Uuid.h"
#include "qpid/types/Variant.h"
#include "qmf/SchemaTypes.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::SchemaProperty

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x6d.html0000664000076400007640000002105011752725720022645 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- m -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00320.html0000664000076400007640000001712311752725720017310 0ustar00jrossjross00000000000000 qpid::messaging::SenderError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::SenderError Struct Reference

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 SenderError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qpid::messaging::SenderError::SenderError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/globals.html0000664000076400007640000002531611752725720020131 0ustar00jrossjross00000000000000 File Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all file members with links to the files they belong to:

- b -

  • BOOST_PARAMETER_MAX_ARITY : arg.h

- i -

- q -

- u -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00206.html0000664000076400007640000007023011752725717017317 0ustar00jrossjross00000000000000 qpid::client::Message Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Message Class Reference

A message sent to or received from the broker. More...

#include <qpid/client/Message.h>

List of all members.

Public Member Functions

 Message (const std::string &data=std::string(), const std::string &routingKey=std::string())
 Create a Message.
 Message (MessageImpl *)
 Message (const Message &)
 ~Message ()
Messageoperator= (const Message &)
void swap (Message &)
void setData (const std::string &)
const std::stringgetData () const
std::stringgetData ()
void appendData (const std::string &)
bool hasMessageProperties () const
framing::MessagePropertiesgetMessageProperties ()
const framing::MessagePropertiesgetMessageProperties () const
bool hasDeliveryProperties () const
framing::DeliveryPropertiesgetDeliveryProperties ()
const framing::DeliveryPropertiesgetDeliveryProperties () const
std::string getDestination () const
 The destination of messages sent to the broker is the exchange name.
bool isRedelivered () const
 Check the redelivered flag.
void setRedelivered (bool redelivered)
 Set the redelivered flag.
framing::FieldTablegetHeaders ()
 Get a modifyable reference to the message headers.
const framing::FieldTablegetHeaders () const
 Get a non-modifyable reference to the message headers.
const framing::SequenceNumbergetId () const

Detailed Description

A message sent to or received from the broker.

Getting and setting message contents

  • getData()

    std::cout << "Response: " << message.getData() << std::endl;
  • setData()

    message.setData("That's all, folks!");
  • appendData()

    message.appendData(" ... let's add a bit more ...");

Getting and Setting Delivery Properties

  • getDeliveryProperties()

    message.getDeliveryProperties().setRoutingKey("control");
    message.getDeliveryProperties().setDeliveryMode(PERSISTENT);
    message.getDeliveryProperties().setPriority(9);
    message.getDeliveryProperties().setTtl(100);

  • hasDeliveryProperties()

    if (! message.hasDeliveryProperties()) {
      ...
    }

Getting and Setting Message Properties

  • getMessageProperties()

    request.getMessageProperties().setReplyTo(ReplyTo("amq.direct", response_queue.str()));
     
    routingKey = request.getMessageProperties().getReplyTo().getRoutingKey();
    exchange = request.getMessageProperties().getReplyTo().getExchange();
     
    message.getMessageProperties().setContentType("text/plain");
    message.getMessageProperties().setContentEncoding("text/plain");
  • hasMessageProperties()

    request.getMessageProperties().hasReplyTo();

Getting and Setting Application Headers

  • getHeaders()

    message.getHeaders().getString("control");
     
    message.getHeaders().setString("control","continue");
     

Constructor & Destructor Documentation

qpid::client::Message::Message ( const std::string data = std::string(),
const std::string routingKey = std::string() 
)

Create a Message.

Parameters:
dataData for the message body.
routingKeyPassed to the exchange that routes the message.
qpid::client::Message::Message ( MessageImpl *  )
qpid::client::Message::Message ( const Message )
qpid::client::Message::~Message ( )

Member Function Documentation

void qpid::client::Message::appendData ( const std::string )
const std::string& qpid::client::Message::getData ( ) const
std::string& qpid::client::Message::getData ( )
framing::DeliveryProperties& qpid::client::Message::getDeliveryProperties ( )
const framing::DeliveryProperties& qpid::client::Message::getDeliveryProperties ( ) const
std::string qpid::client::Message::getDestination ( ) const

The destination of messages sent to the broker is the exchange name.

The destination of messages received from the broker is the delivery tag identifyig the local subscription (often this is the name of the subscribed queue.)

framing::FieldTable& qpid::client::Message::getHeaders ( )

Get a modifyable reference to the message headers.

const framing::FieldTable& qpid::client::Message::getHeaders ( ) const

Get a non-modifyable reference to the message headers.

framing::MessageProperties& qpid::client::Message::getMessageProperties ( )
const framing::MessageProperties& qpid::client::Message::getMessageProperties ( ) const
bool qpid::client::Message::hasDeliveryProperties ( ) const
bool qpid::client::Message::hasMessageProperties ( ) const
bool qpid::client::Message::isRedelivered ( ) const

Check the redelivered flag.

Message& qpid::client::Message::operator= ( const Message )
void qpid::client::Message::setData ( const std::string )
void qpid::client::Message::setRedelivered ( bool  redelivered)

Set the redelivered flag.

void qpid::client::Message::swap ( Message )

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x7a.html0000664000076400007640000001442711752725717021364 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- z -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x68.html0000664000076400007640000001652011752725717022341 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00432.html0000664000076400007640000001644111752725717017324 0ustar00jrossjross00000000000000 qmf/engine/Typecode.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Typecode.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00461_source.html0000664000076400007640000002165311752725717020707 0ustar00jrossjross00000000000000 qpid/client/Completion.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Completion.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_COMPLETION_H
00002 #define QPID_CLIENT_COMPLETION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/client/Handle.h"
00026 #include "qpid/client/ClientImportExport.h"
00027 #include <string>
00028 
00029 namespace qpid {
00030 namespace client {
00031 
00032 class CompletionImpl;
00033 template <class T> class PrivateImplRef;
00034 
00044 class QPID_CLIENT_CLASS_EXTERN Completion : public Handle<CompletionImpl>
00045 {
00046 public:
00047     QPID_CLIENT_EXTERN Completion(CompletionImpl* = 0);
00048     QPID_CLIENT_EXTERN Completion(const Completion&);
00049     QPID_CLIENT_EXTERN ~Completion();
00050     QPID_CLIENT_EXTERN Completion& operator=(const Completion&);
00051 
00057     QPID_CLIENT_EXTERN void wait();
00058     QPID_CLIENT_EXTERN bool isComplete();
00059 
00060   protected:
00061     QPID_CLIENT_EXTERN std::string getResult();
00062 
00063   private:
00064     typedef CompletionImpl Impl;
00065     friend class PrivateImplRef<Completion>;
00066 };
00067 
00068 }}
00069 
00070 
00071 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00483.html0000664000076400007640000001553011752725717017330 0ustar00jrossjross00000000000000 qpid/console/Broker.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Broker.h File Reference

Go to the source code of this file.

Classes

class  qpid::console::Broker
class  qpid::console::Broker::ConnectionThread

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::console

Functions

std::ostreamqpid::console::operator<< (std::ostream &o, const Broker &k)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00273.html0000664000076400007640000001713311752725717017326 0ustar00jrossjross00000000000000 qpid::client::FailoverManager::ReconnectionStrategy Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FailoverManager::ReconnectionStrategy Struct Reference

#include <qpid/client/FailoverManager.h>

List of all members.

Public Member Functions

virtual void editUrlList (std::vector< Url > &urls)=0
 This method is called by the FailoverManager prior to establishing a connection (or re-connection) and can be used if the application wishes to edit or re-order the list which will default to the list of known brokers for the last connection.
virtual ~ReconnectionStrategy ()

Constructor & Destructor Documentation

virtual qpid::client::FailoverManager::ReconnectionStrategy::~ReconnectionStrategy ( ) [inline, virtual]

Definition at line 78 of file FailoverManager.h.


Member Function Documentation

virtual void qpid::client::FailoverManager::ReconnectionStrategy::editUrlList ( std::vector< Url > &  urls) [pure virtual]

This method is called by the FailoverManager prior to establishing a connection (or re-connection) and can be used if the application wishes to edit or re-order the list which will default to the list of known brokers for the last connection.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00724.html0000664000076400007640000001754211752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SessionManager Member List
This is the complete list of members for qpid::console::SessionManager, including all inherited members.
addBroker(client::ConnectionSettings &settings)qpid::console::SessionManager
bindClass(const ClassKey &classKey)qpid::console::SessionManager
bindClass(const std::string &packageName, const std::string &className)qpid::console::SessionManager
bindEvent(const ClassKey &classKey)qpid::console::SessionManager
bindEvent(const std::string &packageName, const std::string &eventName="")qpid::console::SessionManager
bindPackage(const std::string &packageName)qpid::console::SessionManager
delBroker(Broker *broker)qpid::console::SessionManager
getAgents(Agent::Vector &agents, Broker *broker=0)qpid::console::SessionManager
getClasses(KeyVector &classKeys, const std::string &packageName)qpid::console::SessionManager
getObjects(Object::Vector &objects, const std::string &className, Broker *broker=0, Agent *agent=0)qpid::console::SessionManager
getPackages(NameVector &packages)qpid::console::SessionManager
getSchema(const ClassKey &classKey)qpid::console::SessionManager
KeyVector typedefqpid::console::SessionManager
NameVector typedefqpid::console::SessionManager
SessionManager(ConsoleListener *listener=0, Settings settings=Settings())qpid::console::SessionManager
~SessionManager()qpid::console::SessionManager

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00232.html0000664000076400007640000010003111752725720017301 0ustar00jrossjross00000000000000 qpid::console::NullValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::NullValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 NullValue ()
std::string str () const
bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::NullValue::NullValue ( ) [inline]

Definition at line 79 of file Value.h.


Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

bool qpid::console::NullValue::isNull ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 81 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::NullValue::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00495.html0000664000076400007640000001245111752725717017332 0ustar00jrossjross00000000000000 qpid/framing/Array.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Array.h File Reference
#include "qpid/framing/amqp_types.h"
#include "qpid/framing/FieldValue.h"
#include "qpid/framing/TypeCode.h"
#include <boost/shared_ptr.hpp>
#include <iostream>
#include <vector>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::Array

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00446_source.html0000664000076400007640000002560311752725717020711 0ustar00jrossjross00000000000000 qmf/SchemaMethod.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/SchemaMethod.h
Go to the documentation of this file.
00001 #ifndef QMF_SCHEMA_METHOD_H
00002 #define QMF_SCHEMA_METHOD_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include "qmf/ImportExport.h"
00025 #include "qpid/sys/IntegerTypes.h"
00026 #include "qmf/Handle.h"
00027 #include "qmf/SchemaTypes.h"
00028 #include <string>
00029 
00030 namespace qmf {
00031 
00032 #ifndef SWIG
00033     template <class> class PrivateImplRef;
00034 #endif
00035 
00036     class SchemaMethodImpl;
00037     class SchemaProperty;
00038 
00039     class QMF_CLASS_EXTERN SchemaMethod : public qmf::Handle<SchemaMethodImpl> {
00040     public:
00041         QMF_EXTERN SchemaMethod(SchemaMethodImpl* impl = 0);
00042         QMF_EXTERN SchemaMethod(const SchemaMethod&);
00043         QMF_EXTERN SchemaMethod& operator=(const SchemaMethod&);
00044         QMF_EXTERN ~SchemaMethod();
00045 
00046         QMF_EXTERN SchemaMethod(const std::string&, const std::string& o="");
00047 
00048         QMF_EXTERN void setDesc(const std::string&);
00049         QMF_EXTERN void addArgument(const SchemaProperty&);
00050 
00051         QMF_EXTERN const std::string& getName() const;
00052         QMF_EXTERN const std::string& getDesc() const;
00053         QMF_EXTERN uint32_t getArgumentCount() const;
00054         QMF_EXTERN SchemaProperty getArgument(uint32_t) const;
00055 
00056 #ifndef SWIG
00057     private:
00058         friend class qmf::PrivateImplRef<SchemaMethod>;
00059         friend struct SchemaMethodImplAccess;
00060 #endif
00061     };
00062 
00063 }
00064 
00065 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_vars.html0000664000076400007640000002025211752725720023042 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- a -

  • ACCESS_READ_CREATE : qmf
  • ACCESS_READ_ONLY : qmf
  • ACCESS_READ_WRITE : qmf

- c -

- d -

- e -

- f -

- s -

  • SCHEMA_DATA_BOOL : qmf
  • SCHEMA_DATA_FLOAT : qmf
  • SCHEMA_DATA_INT : qmf
  • SCHEMA_DATA_LIST : qmf
  • SCHEMA_DATA_MAP : qmf
  • SCHEMA_DATA_STRING : qmf
  • SCHEMA_DATA_UUID : qmf
  • SCHEMA_DATA_VOID : qmf
  • SCHEMA_TYPE_DATA : qmf
  • SCHEMA_TYPE_EVENT : qmf
  • SEV_ALERT : qmf
  • SEV_CRIT : qmf
  • SEV_DEBUG : qmf
  • SEV_EMERG : qmf
  • SEV_ERROR : qmf
  • SEV_INFORM : qmf
  • SEV_NOTICE : qmf
  • SEV_WARN : qmf

- t -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00721.html0000664000076400007640000001206511752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaMethod Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00900.html0000664000076400007640000000764511752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::auto_ptr Member List
This is the complete list of members for std::auto_ptr, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00727.html0000664000076400007640000002406211752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::NullValue Member List
This is the complete list of members for qpid::console::NullValue, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::NullValue [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
NullValue()qpid::console::NullValue [inline]
Ptr typedefqpid::console::Value
str() const qpid::console::NullValue [virtual]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00846.html0000664000076400007640000001270111752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::MessagingException Member List
This is the complete list of members for qpid::messaging::MessagingException, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
MessagingException(const std::string &msg)qpid::messaging::MessagingException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00017.html0000664000076400007640000006136211752725720017317 0ustar00jrossjross00000000000000 qpid::framing::ArrayValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ArrayValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 ArrayValue (const Array &)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::ArrayValue::ArrayValue ( const Array )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/tab_h.png0000664000076400007640000000030011752725717017373 0ustar00jrossjross00000000000000‰PNG  IHDR$ÇÇ[‡IDATxíÝÛ ‚`€áÿ¥ºˆFŠ¢‚hšYÒ ÿÌ26@c´HwÍñì!ïÏ—K1ê^‰©HtO’÷ÄyG˜µD׎ k9¦ç?iðâ7zá„vPaŸž˜þãÏðJŒ}ÉÆ)غwV»‚õ®`ai–Ö¥¥™›Z‰ˆšŒP³éøC"àèP=€IEND®B`‚qpidc-0.16/docs/api/html/a00124.html0000664000076400007640000006373411752725720017323 0ustar00jrossjross00000000000000 qpid::framing::FieldTableValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FieldTableValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Types

typedef FieldTable ValueType

Public Member Functions

 FieldTableValue (const FieldTable &)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Member Typedef Documentation


Constructor & Destructor Documentation

qpid::framing::FieldTableValue::FieldTableValue ( const FieldTable )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00067.html0000664000076400007640000005363011752725717017331 0ustar00jrossjross00000000000000 qmf::engine::Console Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Console Class Reference

#include <qmf/engine/Console.h>

List of all members.

Public Member Functions

 Console (const ConsoleSettings &settings=ConsoleSettings())
 ~Console ()
bool getEvent (ConsoleEvent &event) const
void popEvent ()
void addConnection (BrokerProxy &broker, void *context)
void delConnection (BrokerProxy &broker)
uint32_t packageCount () const
const char * getPackageName (uint32_t idx) const
uint32_t classCount (const char *packageName) const
const SchemaClassKeygetClass (const char *packageName, uint32_t idx) const
ClassKind getClassKind (const SchemaClassKey *key) const
const SchemaObjectClassgetObjectClass (const SchemaClassKey *key) const
const SchemaEventClassgetEventClass (const SchemaClassKey *key) const
void bindPackage (const char *packageName)
void bindClass (const SchemaClassKey *key)
void bindClass (const char *packageName, const char *className)
void bindEvent (const SchemaClassKey *key)
void bindEvent (const char *packageName, const char *eventName)

Constructor & Destructor Documentation

qmf::engine::Console::Console ( const ConsoleSettings settings = ConsoleSettings())
qmf::engine::Console::~Console ( )

Member Function Documentation

void qmf::engine::Console::addConnection ( BrokerProxy broker,
void *  context 
)
void qmf::engine::Console::bindClass ( const SchemaClassKey key)
void qmf::engine::Console::bindClass ( const char *  packageName,
const char *  className 
)
void qmf::engine::Console::bindEvent ( const SchemaClassKey key)
void qmf::engine::Console::bindEvent ( const char *  packageName,
const char *  eventName 
)
void qmf::engine::Console::bindPackage ( const char *  packageName)
uint32_t qmf::engine::Console::classCount ( const char *  packageName) const
void qmf::engine::Console::delConnection ( BrokerProxy broker)
const SchemaClassKey* qmf::engine::Console::getClass ( const char *  packageName,
uint32_t  idx 
) const
ClassKind qmf::engine::Console::getClassKind ( const SchemaClassKey key) const
bool qmf::engine::Console::getEvent ( ConsoleEvent event) const
const SchemaEventClass* qmf::engine::Console::getEventClass ( const SchemaClassKey key) const
const SchemaObjectClass* qmf::engine::Console::getObjectClass ( const SchemaClassKey key) const
const char* qmf::engine::Console::getPackageName ( uint32_t  idx) const
uint32_t qmf::engine::Console::packageCount ( ) const
void qmf::engine::Console::popEvent ( )

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00493_source.html0000664000076400007640000002614211752725717020712 0ustar00jrossjross00000000000000 qpid/framing/amqp_types.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/amqp_types.h
Go to the documentation of this file.
00001 #ifndef AMQP_TYPES_H
00002 #define AMQP_TYPES_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00029 #include "qpid/sys/IntegerTypes.h"
00030 #include <string>
00031 
00032 namespace qpid {
00033 namespace framing {
00034 
00035 using std::string;
00036 typedef uint8_t FrameType;
00037 typedef uint16_t ChannelId;
00038 typedef uint32_t BatchOffset;
00039 typedef uint8_t ClassId;
00040 typedef uint8_t MethodId;
00041 typedef uint16_t ReplyCode;
00042 
00043 // Types represented by classes.
00044 class Content;
00045 class FieldTable;
00046 class SequenceNumberSet;
00047 struct Uuid;
00048 
00049 // Useful constants
00050 
00052 const ChannelId CHANNEL_MAX=(ChannelId(~1))>>1;
00053 const ChannelId CHANNEL_HIGH_BIT= ChannelId(~CHANNEL_MAX);
00054 
00055 // Forward declare class types
00056 class FramingContent;
00057 class FieldTable;
00058 class SequenceNumberSet;
00059 class SequenceSet;
00060 struct Uuid;
00061 
00062 // Enum types
00063 enum DeliveryMode { TRANSIENT = 1, PERSISTENT = 2};
00064 
00065 }} // namespace qpid::framing
00066 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x75.html0000664000076400007640000001620611752725717022340 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00308.html0000664000076400007640000003651211752725720017321 0ustar00jrossjross00000000000000 qpid::console::SchemaProperty Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaProperty Struct Reference

#include <qpid/console/Schema.h>

List of all members.

Public Member Functions

 SchemaProperty (framing::Buffer &buffer)
boost::shared_ptr< ValuedecodeValue (framing::Buffer &buffer)

Public Attributes

std::string name
uint8_t typeCode
uint8_t accessCode
bool isIndex
bool isOptional
std::string unit
int min
int max
int maxLen
std::string desc

Constructor & Destructor Documentation

qpid::console::SchemaProperty::SchemaProperty ( framing::Buffer buffer)

Member Function Documentation

boost::shared_ptr<Value> qpid::console::SchemaProperty::decodeValue ( framing::Buffer buffer)

Member Data Documentation

Definition at line 58 of file Schema.h.

Definition at line 59 of file Schema.h.

Definition at line 62 of file Schema.h.

Definition at line 63 of file Schema.h.

Definition at line 61 of file Schema.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00673.html0000664000076400007640000001252411752725717017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Url::Invalid Member List
This is the complete list of members for qpid::Url::Invalid, including all inherited members.
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
Invalid(const std::string &s)qpid::Url::Invalid
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00302.html0000664000076400007640000005106411752725717017320 0ustar00jrossjross00000000000000 qmf::SchemaId Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

#include <qmf/SchemaId.h>

List of all members.

Public Member Functions

 SchemaId (SchemaIdImpl *impl=0)
 SchemaId (const SchemaId &)
SchemaIdoperator= (const SchemaId &)
 ~SchemaId ()
 SchemaId (int, const std::string &, const std::string &)
void setHash (const qpid::types::Uuid &)
int getType () const
const std::stringgetPackageName () const
const std::stringgetName () const
const qpid::types::UuidgetHash () const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::SchemaId::SchemaId ( SchemaIdImpl *  impl = 0)
qmf::SchemaId::SchemaId ( const SchemaId )
qmf::SchemaId::~SchemaId ( )
qmf::SchemaId::SchemaId ( int  ,
const std::string ,
const std::string  
)

Member Function Documentation

const qpid::types::Uuid& qmf::SchemaId::getHash ( ) const
const std::string& qmf::SchemaId::getName ( ) const
const std::string& qmf::SchemaId::getPackageName ( ) const
int qmf::SchemaId::getType ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

SchemaId& qmf::SchemaId::operator= ( const SchemaId )
void qmf::SchemaId::setHash ( const qpid::types::Uuid )
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00618.html0000664000076400007640000002117011752725717017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::AgentEvent Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00750.html0000664000076400007640000001225611752725720017321 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FieldValueException Member List
This is the complete list of members for qpid::framing::FieldValueException, including all inherited members.
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00842.html0000664000076400007640000001231111752725720017313 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::Mutex Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00526_source.html0000664000076400007640000003405311752725717020707 0ustar00jrossjross00000000000000 qpid/framing/Xid.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Xid.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_XID_H
00002 #define QPID_FRAMING_XID_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN Xid  {
00039     uint32_t format;
00040     std::string globalId;
00041     std::string branchId;
00042     uint16_t flags;
00043 public:
00044     static const uint16_t TYPE = 1540;
00045     Xid(
00046         uint32_t _format,
00047         const std::string& _globalId,
00048         const std::string& _branchId) : 
00049         format(_format),
00050         globalId(_globalId),
00051         branchId(_branchId),
00052         flags(0){
00053         flags |= (1 << 8);
00054         flags |= (1 << 9);
00055         flags |= (1 << 10);
00056     }
00057     Xid()  : format(0), flags(0) {}
00058     
00059     QPID_COMMON_EXTERN void setFormat(uint32_t _format);
00060     QPID_COMMON_EXTERN uint32_t getFormat() const;
00061     QPID_COMMON_EXTERN bool hasFormat() const;
00062     QPID_COMMON_EXTERN void clearFormatFlag();
00063     QPID_COMMON_EXTERN void setGlobalId(const std::string& _globalId);
00064     QPID_COMMON_EXTERN const std::string& getGlobalId() const;
00065     QPID_COMMON_EXTERN bool hasGlobalId() const;
00066     QPID_COMMON_EXTERN void clearGlobalIdFlag();
00067     QPID_COMMON_EXTERN void setBranchId(const std::string& _branchId);
00068     QPID_COMMON_EXTERN const std::string& getBranchId() const;
00069     QPID_COMMON_EXTERN bool hasBranchId() const;
00070     QPID_COMMON_EXTERN void clearBranchIdFlag();
00071     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const Xid&);
00072     QPID_COMMON_EXTERN void encode(Buffer&) const;
00073     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00074     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00075     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00076     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00077     QPID_COMMON_EXTERN uint32_t bodySize() const;
00078     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00079 }; /* class Xid */
00080 
00081 }}
00082 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00523.html0000664000076400007640000001460211752725717017322 0ustar00jrossjross00000000000000 qpid/framing/Uuid.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Uuid.h File Reference
#include "qpid/CommonImportExport.h"
#include "qpid/sys/IntegerTypes.h"
#include <boost/array.hpp>
#include <ostream>
#include <istream>

Go to the source code of this file.

Classes

struct  qpid::framing::Uuid
 A UUID is represented as a boost::array of 16 bytes. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


Functions

std::ostreamqpid::framing::operator<< (std::ostream &, Uuid)
 Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.
std::istreamqpid::framing::operator>> (std::istream &, Uuid &)
 Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00459.html0000664000076400007640000001222711752725717017333 0ustar00jrossjross00000000000000 qpid/client/no_keyword/AsyncSession_0_10.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/no_keyword/AsyncSession_0_10.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::no_keyword::AsyncSession_0_10
 AMQP 0-10 asynchronous session API. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client
namespace  qpid::client::no_keyword

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x6e.html0000664000076400007640000001424111752725720022652 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- n -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x6c.html0000664000076400007640000002027411752725717022375 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00812.html0000664000076400007640000004057111752725720017321 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::SequenceSet Member List
This is the complete list of members for qpid::framing::SequenceSet, including all inherited members.
add(const SequenceNumber &s)qpid::framing::SequenceSet
add(const SequenceNumber &start, const SequenceNumber &finish)qpid::framing::SequenceSet
add(const SequenceSet &set)qpid::framing::SequenceSet
addRange(const Range< T > &)qpid::RangeSet< SequenceNumber >
addSet(const RangeSet< T > &)qpid::RangeSet< SequenceNumber >
back() const qpid::RangeSet< SequenceNumber > [inline]
begin() const qpid::RangeSet< SequenceNumber >
clear()qpid::RangeSet< SequenceNumber > [inline]
const_iterator typedefqpid::RangeSet< SequenceNumber >
contains(const SequenceNumber &s) const qpid::framing::SequenceSet
RangeSet< SequenceNumber >::contains(const T &t) const qpid::RangeSet< SequenceNumber >
RangeSet< SequenceNumber >::contains(const Range< T > &) const qpid::RangeSet< SequenceNumber >
contiguous() const qpid::RangeSet< SequenceNumber > [inline]
decode(Buffer &buffer)qpid::framing::SequenceSet
RangeSet< SequenceNumber >::decode(S &s)qpid::RangeSet< SequenceNumber > [inline]
empty() const qpid::RangeSet< SequenceNumber > [inline]
encode(Buffer &buffer) const qpid::framing::SequenceSet
RangeSet< SequenceNumber >::encode(S &s) const qpid::RangeSet< SequenceNumber > [inline]
encodedSize() const qpid::framing::SequenceSet
end() const qpid::RangeSet< SequenceNumber >
for_each(T &t) const qpid::framing::SequenceSet [inline]
for_each(const T &t) const qpid::framing::SequenceSet [inline]
front() const qpid::RangeSet< SequenceNumber > [inline]
operator+=(const T &t)qpid::RangeSet< SequenceNumber > [inline]
operator+=(const Range< T > &r)qpid::RangeSet< SequenceNumber > [inline]
operator+=(const RangeSet< T > &s)qpid::RangeSet< SequenceNumber > [inline]
operator-=(const T &t)qpid::RangeSet< SequenceNumber > [inline]
operator-=(const Range< T > &r)qpid::RangeSet< SequenceNumber > [inline]
operator-=(const RangeSet< T > &s)qpid::RangeSet< SequenceNumber > [inline]
operator<<(std::ostream &, const SequenceSet &)qpid::framing::SequenceSet [friend]
operator==(const RangeSet< T > &) const qpid::RangeSet< SequenceNumber >
rangeContaining(const T &) const qpid::RangeSet< SequenceNumber >
RangeIterator typedefqpid::RangeSet< SequenceNumber >
rangesBegin() const qpid::RangeSet< SequenceNumber > [inline]
rangesEnd() const qpid::RangeSet< SequenceNumber > [inline]
RangeSet()qpid::RangeSet< SequenceNumber > [inline]
RangeSet(const Range< T > &r)qpid::RangeSet< SequenceNumber > [inline, explicit]
RangeSet(const T &a, const T &b)qpid::RangeSet< SequenceNumber > [inline]
rangesSize() const qpid::RangeSet< SequenceNumber > [inline]
remove(const SequenceNumber &s)qpid::framing::SequenceSet
remove(const SequenceNumber &start, const SequenceNumber &finish)qpid::framing::SequenceSet
remove(const SequenceSet &set)qpid::framing::SequenceSet
removeRange(const Range< T > &)qpid::RangeSet< SequenceNumber >
removeSet(const RangeSet< T > &)qpid::RangeSet< SequenceNumber >
SequenceSet()qpid::framing::SequenceSet [inline]
SequenceSet(const RangeSet< SequenceNumber > &r)qpid::framing::SequenceSet [inline]
SequenceSet(const SequenceNumber &s)qpid::framing::SequenceSet [inline]
SequenceSet(const SequenceNumber &start, const SequenceNumber finish)qpid::framing::SequenceSet [inline]
serialize(S &s)qpid::RangeSet< SequenceNumber > [inline]
size() const qpid::RangeSet< SequenceNumber >
span() const qpid::RangeSet< SequenceNumber >
toRange() const qpid::RangeSet< SequenceNumber >

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00653.html0000664000076400007640000001304111752725717017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::ChannelException Member List
This is the complete list of members for qpid::ChannelException, including all inherited members.
ChannelException(framing::session::DetachCode _code, const std::string &message)qpid::ChannelException [inline]
codeqpid::ChannelException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00510_source.html0000664000076400007640000004073011752725717020677 0ustar00jrossjross00000000000000 qpid/framing/List.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/List.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_LIST_H
00002 #define QPID_FRAMING_LIST_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/CommonImportExport.h"
00025 #include "qpid/framing/amqp_types.h"
00026 #include <iostream>
00027 #include <list>
00028 #include <boost/shared_ptr.hpp>
00029 
00030 namespace qpid {
00031 namespace framing {
00032 
00033 class Buffer;
00034 class FieldValue;
00035 
00039 class QPID_COMMON_CLASS_EXTERN List
00040 {
00041   public:
00042     typedef boost::shared_ptr<FieldValue> ValuePtr;
00043     typedef ValuePtr value_type;
00044     typedef std::list<ValuePtr> Values;
00045     typedef Values::const_iterator const_iterator;
00046     typedef Values::iterator iterator;
00047     typedef Values::const_reference const_reference;
00048     typedef Values::reference reference;
00049 
00050     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00051     QPID_COMMON_EXTERN void encode(Buffer& buffer) const;
00052     QPID_COMMON_EXTERN void decode(Buffer& buffer);
00053 
00054     QPID_COMMON_EXTERN bool operator==(const List& other) const;
00055 
00056     // std collection interface.
00057     QPID_COMMON_INLINE_EXTERN const_iterator begin() const { return values.begin(); }
00058     QPID_COMMON_INLINE_EXTERN const_iterator end() const { return values.end(); }
00059     QPID_COMMON_INLINE_EXTERN iterator begin() { return values.begin(); }
00060     QPID_COMMON_INLINE_EXTERN iterator end(){ return values.end(); }
00061 
00062     QPID_COMMON_INLINE_EXTERN ValuePtr front() const { return values.front(); }
00063     QPID_COMMON_INLINE_EXTERN ValuePtr back() const { return values.back(); }
00064     QPID_COMMON_INLINE_EXTERN size_t size() const { return values.size(); }
00065 
00066     QPID_COMMON_INLINE_EXTERN iterator insert(iterator i, ValuePtr value) { return values.insert(i, value); }
00067     QPID_COMMON_INLINE_EXTERN void erase(iterator i) { values.erase(i); }
00068     QPID_COMMON_INLINE_EXTERN void push_back(ValuePtr value) { values.insert(end(), value); }
00069     QPID_COMMON_INLINE_EXTERN void pop_back() { values.pop_back(); }
00070 
00071   private:
00072     Values values;
00073 
00074     friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& out, const List& list);
00075 };
00076 }} // namespace qpid::framing
00077 
00078 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00072.html0000664000076400007640000002161611752725717017324 0ustar00jrossjross00000000000000 qmf::engine::ConsoleSettings Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ConsoleSettings Struct Reference

#include <qmf/engine/Console.h>

List of all members.

Public Member Functions

 ConsoleSettings ()

Public Attributes

bool rcvObjects
bool rcvEvents
bool rcvHeartbeats
bool userBindings

Constructor & Destructor Documentation

qmf::engine::ConsoleSettings::ConsoleSettings ( ) [inline]

Definition at line 188 of file Console.h.


Member Data Documentation

Definition at line 184 of file Console.h.

Definition at line 185 of file Console.h.

Definition at line 183 of file Console.h.

Definition at line 186 of file Console.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00431.html0000664000076400007640000001355411752725717017325 0ustar00jrossjross00000000000000 qpid/console/Schema.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Schema.h File Reference
#include "qpid/console/ClassKey.h"
#include <boost/shared_ptr.hpp>
#include <vector>

Go to the source code of this file.

Classes

struct  qpid::console::SchemaArgument
struct  qpid::console::SchemaProperty
struct  qpid::console::SchemaStatistic
struct  qpid::console::SchemaMethod
struct  qpid::console::SchemaClass

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  qpid::console

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00754.html0000664000076400007640000002025611752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FixedWidthValue Member List
This is the complete list of members for qpid::framing::FixedWidthValue, including all inherited members.
convertsToInt() const qpid::framing::FixedWidthValue [inline, virtual]
convertsToString() const qpid::framing::FieldValue::Data [inline, virtual]
decode(Buffer &buffer)qpid::framing::FixedWidthValue [inline, virtual]
encode(Buffer &buffer)qpid::framing::FixedWidthValue [inline, virtual]
encodedSize() const qpid::framing::FixedWidthValue [inline, virtual]
FixedWidthValue()qpid::framing::FixedWidthValue [inline]
FixedWidthValue(const uint8_t(&data)[width])qpid::framing::FixedWidthValue [inline]
FixedWidthValue(const uint8_t *const data)qpid::framing::FixedWidthValue [inline]
FixedWidthValue(uint64_t v)qpid::framing::FixedWidthValue [inline]
getInt() const qpid::framing::FixedWidthValue [inline, virtual]
getString() const qpid::framing::FieldValue::Data [inline, virtual]
operator==(const Data &d) const qpid::framing::FixedWidthValue [inline]
qpid::framing::FieldValue::Data::operator==(const Data &) const =0qpid::framing::FieldValue::Data [pure virtual]
print(std::ostream &o) const qpid::framing::FixedWidthValue [inline, virtual]
rawOctets()qpid::framing::FixedWidthValue [inline]
rawOctets() const qpid::framing::FixedWidthValue [inline]
~Data()qpid::framing::FieldValue::Data [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00733.html0000664000076400007640000002452311752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::StringValue Member List
This is the complete list of members for qpid::console::StringValue, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::StringValue [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::StringValue [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
str() const qpid::console::StringValue [inline, virtual]
StringValue(const std::string &v)qpid::console::StringValue [inline]
StringValue(framing::Buffer &buffer, int tc)qpid::console::StringValue
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00048.html0000664000076400007640000002775211752725717017336 0ustar00jrossjross00000000000000 qpid::ChannelException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::ChannelException Struct Reference

#include <qpid/Exception.h>

List of all members.

Public Member Functions

 ChannelException (framing::session::DetachCode _code, const std::string &message)
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Public Attributes

const framing::session::DetachCode code

Constructor & Destructor Documentation

qpid::ChannelException::ChannelException ( framing::session::DetachCode  _code,
const std::string message 
) [inline]

Definition at line 67 of file Exception.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00135.html0000664000076400007640000001021311752725720017305 0ustar00jrossjross00000000000000 std::fstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::fstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00855.html0000664000076400007640000001357011752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::ReceiverError Member List
This is the complete list of members for qpid::messaging::ReceiverError, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
LinkError(const std::string &)qpid::messaging::LinkError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
ReceiverError(const std::string &)qpid::messaging::ReceiverError
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00090.html0000664000076400007640000001037611752725720017317 0ustar00jrossjross00000000000000 std::set::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::set::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00665.html0000664000076400007640000001123111752725717017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Options Member List
This is the complete list of members for qpid::Options, including all inherited members.
addOptions()qpid::Options [inline]
Options(const std::string &name=std::string())qpid::Options
parse(int argc, char const *const *argv, const std::string &configfile=std::string(), bool allowUnknown=false)qpid::Options

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x6d.html0000664000076400007640000002226511752725717022420 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x6f.html0000664000076400007640000005427511752725717022410 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- o -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00159.html0000664000076400007640000002423311752725717017330 0ustar00jrossjross00000000000000 qpid::Url::Invalid Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Url::Invalid Struct Reference

#include <qpid/Url.h>

List of all members.

Public Member Functions

 Invalid (const std::string &s)
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Constructor & Destructor Documentation

qpid::Url::Invalid::Invalid ( const std::string s)

Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x76.html0000664000076400007640000002141711752725717021306 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00057.html0000664000076400007640000001654411752725720017325 0ustar00jrossjross00000000000000 qpid::sys::ConditionalScopedLock Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ConditionalScopedLock Class Reference

#include <qpid/sys/Mutex.h>

List of all members.

Public Member Functions

 ConditionalScopedLock (L &l)
 ~ConditionalScopedLock ()
bool lockAcquired ()

Constructor & Destructor Documentation

qpid::sys::ConditionalScopedLock::ConditionalScopedLock ( L &  l) [inline]

Definition at line 73 of file Mutex.h.

qpid::sys::ConditionalScopedLock::~ConditionalScopedLock ( ) [inline]

Definition at line 74 of file Mutex.h.


Member Function Documentation

bool qpid::sys::ConditionalScopedLock::lockAcquired ( ) [inline]

Definition at line 75 of file Mutex.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00409_source.html0000664000076400007640000003244011752725717020705 0ustar00jrossjross00000000000000 qmf/ConsoleSession.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/ConsoleSession.h
Go to the documentation of this file.
00001 #ifndef QMF_CONSOLE_SESSION_H
00002 #define QMF_CONSOLE_SESSION_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qmf/Agent.h"
00027 #include "qmf/Subscription.h"
00028 #include "qpid/messaging/Duration.h"
00029 #include "qpid/messaging/Connection.h"
00030 #include <string>
00031 
00032 namespace qmf {
00033 
00034 #ifndef SWIG
00035     template <class> class PrivateImplRef;
00036 #endif
00037 
00038     class ConsoleSessionImpl;
00039     class ConsoleEvent;
00040 
00041     class QMF_CLASS_EXTERN ConsoleSession : public qmf::Handle<ConsoleSessionImpl> {
00042     public:
00043         QMF_EXTERN ConsoleSession(ConsoleSessionImpl* impl = 0);
00044         QMF_EXTERN ConsoleSession(const ConsoleSession&);
00045         QMF_EXTERN ConsoleSession& operator=(const ConsoleSession&);
00046         QMF_EXTERN ~ConsoleSession();
00047 
00069         QMF_EXTERN ConsoleSession(qpid::messaging::Connection& conn, const std::string& options="");
00070 
00076         QMF_EXTERN void setDomain(const std::string& domain);
00077         QMF_EXTERN void setAgentFilter(const std::string& filter);
00078 
00082         QMF_EXTERN void open();
00083 
00087         QMF_EXTERN void close();
00088 
00095         QMF_EXTERN bool nextEvent(ConsoleEvent& outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER);
00096 
00100         QMF_EXTERN int pendingEvents() const;
00101 
00105         QMF_EXTERN uint32_t getAgentCount() const;
00106         QMF_EXTERN Agent getAgent(uint32_t agentIndex) const;
00107 
00111         QMF_EXTERN Agent getConnectedBrokerAgent() const;
00112 
00120         QMF_EXTERN Subscription subscribe(const Query& query,       const std::string& agentFilter = "", const std::string& options = "");
00121         QMF_EXTERN Subscription subscribe(const std::string& query, const std::string& agentFilter = "", const std::string& options = "");
00122 
00123 #ifndef SWIG
00124     private:
00125         friend class qmf::PrivateImplRef<ConsoleSession>;
00126         friend struct ConsoleSessionImplAccess;
00127 #endif
00128     };
00129 
00130 }
00131 
00132 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00604.html0000664000076400007640000002402111752725717017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::ConsoleSession Member List
This is the complete list of members for qmf::ConsoleSession, including all inherited members.
close()qmf::ConsoleSession
ConsoleSession(ConsoleSessionImpl *impl=0)qmf::ConsoleSession
ConsoleSession(const ConsoleSession &)qmf::ConsoleSession
ConsoleSession(qpid::messaging::Connection &conn, const std::string &options="")qmf::ConsoleSession
getAgent(uint32_t agentIndex) const qmf::ConsoleSession
getAgentCount() const qmf::ConsoleSession
getConnectedBrokerAgent() const qmf::ConsoleSession
Handle()qmf::Handle< ConsoleSessionImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< ConsoleSessionImpl > [protected]
Impl typedefqmf::Handle< ConsoleSessionImpl > [protected]
implqmf::Handle< ConsoleSessionImpl > [protected]
isNull() const qmf::Handle< ConsoleSessionImpl > [inline]
isValid() const qmf::Handle< ConsoleSessionImpl > [inline]
nextEvent(ConsoleEvent &outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER)qmf::ConsoleSession
open()qmf::ConsoleSession
operator bool() const qmf::Handle< ConsoleSessionImpl > [inline]
operator!() const qmf::Handle< ConsoleSessionImpl > [inline]
operator=(const ConsoleSession &)qmf::ConsoleSession
Handle< ConsoleSessionImpl >::operator=(const Handle &)qmf::Handle< ConsoleSessionImpl > [protected]
pendingEvents() const qmf::ConsoleSession
setAgentFilter(const std::string &filter)qmf::ConsoleSession
setDomain(const std::string &domain)qmf::ConsoleSession
subscribe(const Query &query, const std::string &agentFilter="", const std::string &options="")qmf::ConsoleSession
subscribe(const std::string &query, const std::string &agentFilter="", const std::string &options="")qmf::ConsoleSession
swap(Handle< T > &h)qmf::Handle< ConsoleSessionImpl > [inline]
~ConsoleSession()qmf::ConsoleSession

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00283.html0000664000076400007640000001036211752725720017316 0ustar00jrossjross00000000000000 std::string::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::string::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_type.html0000664000076400007640000001232411752725720023051 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00539_source.html0000664000076400007640000002366011752725717020715 0ustar00jrossjross00000000000000 qpid/management/Mutex.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/Mutex.h
Go to the documentation of this file.
00001 #ifndef _management_Mutex_h
00002 #define _management_Mutex_h
00003 
00004 /*
00005  *
00006  * Copyright (c) 2008 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/CommonImportExport.h"
00023 
00024 namespace qpid {
00025     namespace sys {
00026         class Mutex;
00027     }
00028 
00029     namespace management {
00030 
00035         template <class L> class ScopedLockTemplate {
00036         public:
00037             ScopedLockTemplate(L& l) : mutex(l) { mutex.lock(); }
00038             ~ScopedLockTemplate() { mutex.unlock(); }
00039         private:
00040             L& mutex;
00041         };
00042 
00043         template <class L> class ScopedUnlockTemplate {
00044         public:
00045             ScopedUnlockTemplate(L& l) : mutex(l) { mutex.unlock(); }
00046             ~ScopedUnlockTemplate() { mutex.lock(); }
00047         private:
00048             L& mutex;
00049         };
00050 
00051         class Mutex {
00052         public:
00053             typedef ScopedLockTemplate<Mutex> ScopedLock;
00054             typedef ScopedUnlockTemplate<Mutex> ScopedUnlock;
00055 
00056             QPID_COMMON_EXTERN Mutex();
00057             QPID_COMMON_EXTERN ~Mutex();
00058             QPID_COMMON_EXTERN void lock();
00059             QPID_COMMON_EXTERN void unlock();
00060         private:
00061             sys::Mutex* impl;
00062         };
00063     }
00064 }
00065 
00066 #endif
00067 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00301.html0000664000076400007640000003142611752725717017317 0ustar00jrossjross00000000000000 qmf::engine::SchemaEventClass Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaEventClass Class Reference

#include <qmf/engine/Schema.h>

List of all members.

Public Member Functions

 SchemaEventClass (const char *package, const char *name, Severity severity)
 SchemaEventClass (const SchemaEventClass &from)
 ~SchemaEventClass ()
void addArgument (const SchemaArgument *argument)
void setDesc (const char *desc)
const SchemaClassKeygetClassKey () const
Severity getSeverity () const
int getArgumentCount () const
const SchemaArgumentgetArgument (int idx) const

Constructor & Destructor Documentation

qmf::engine::SchemaEventClass::SchemaEventClass ( const char *  package,
const char *  name,
Severity  severity 
)
qmf::engine::SchemaEventClass::SchemaEventClass ( const SchemaEventClass from)
qmf::engine::SchemaEventClass::~SchemaEventClass ( )

Member Function Documentation

void qmf::engine::SchemaEventClass::addArgument ( const SchemaArgument argument)
const SchemaArgument* qmf::engine::SchemaEventClass::getArgument ( int  idx) const
int qmf::engine::SchemaEventClass::getArgumentCount ( ) const
const SchemaClassKey* qmf::engine::SchemaEventClass::getClassKey ( ) const
Severity qmf::engine::SchemaEventClass::getSeverity ( ) const
void qmf::engine::SchemaEventClass::setDesc ( const char *  desc)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x78.html0000664000076400007640000001620011752725720022573 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- x -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00380.html0000664000076400007640000010131711752725720017315 0ustar00jrossjross00000000000000 qpid::console::Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Value Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

virtual ~Value ()
virtual std::string str () const =0
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

virtual qpid::console::Value::~Value ( ) [inline, virtual]

Definition at line 43 of file Value.h.


Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00139.html0000664000076400007640000004047411752725720017325 0ustar00jrossjross00000000000000 qpid::messaging::Handle Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

A handle is like a pointer: refers to an underlying implementation object. More...

#include <qpid/messaging/Handle.h>

List of all members.

Public Member Functions

QPID_MESSAGING_INLINE_EXTERN bool isValid () const
QPID_MESSAGING_INLINE_EXTERN bool isNull () const
QPID_MESSAGING_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_MESSAGING_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Member Functions

QPID_MESSAGING_INLINE_EXTERN Handle ()
 Handle (const Handle &)
Handleoperator= (const Handle &)

Protected Attributes

Implimpl

Detailed Description

A handle is like a pointer: refers to an underlying implementation object.

Copying the handle does not copy the object.

Handles can be null, like a 0 pointer. Use isValid(), isNull() or the conversion to bool to test for a null handle.


Member Typedef Documentation

typedef T qpid::messaging::Handle::Impl [protected]

Definition at line 57 of file Handle.h.


Constructor & Destructor Documentation

QPID_MESSAGING_INLINE_EXTERN qpid::messaging::Handle::Handle ( ) [inline, protected]

Definition at line 58 of file Handle.h.

qpid::messaging::Handle::Handle ( const Handle ) [protected]

Member Function Documentation

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isNull ( ) const [inline]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isValid ( ) const [inline]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN qpid::messaging::Handle::operator bool ( ) const [inline]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::operator! ( ) const [inline]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

Handle& qpid::messaging::Handle::operator= ( const Handle ) [protected]
void qpid::messaging::Handle::swap ( Handle< T > &  h) [inline]

Definition at line 54 of file Handle.h.


Member Data Documentation


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00092.html0000664000076400007640000001041211752725720017310 0ustar00jrossjross00000000000000 std::vector::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::vector::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00385.html0000664000076400007640000021746611752725720017337 0ustar00jrossjross00000000000000 qpid::types::Variant Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::types::Variant Class Reference

Represents a value of variable type. More...

#include <qpid/types/Variant.h>

List of all members.

Public Types

typedef std::map< std::string,
Variant
Map
typedef std::list< VariantList

Public Member Functions

QPID_TYPES_EXTERN Variant ()
QPID_TYPES_EXTERN Variant (bool)
QPID_TYPES_EXTERN Variant (uint8_t)
QPID_TYPES_EXTERN Variant (uint16_t)
QPID_TYPES_EXTERN Variant (uint32_t)
QPID_TYPES_EXTERN Variant (uint64_t)
QPID_TYPES_EXTERN Variant (int8_t)
QPID_TYPES_EXTERN Variant (int16_t)
QPID_TYPES_EXTERN Variant (int32_t)
QPID_TYPES_EXTERN Variant (int64_t)
QPID_TYPES_EXTERN Variant (float)
QPID_TYPES_EXTERN Variant (double)
QPID_TYPES_EXTERN Variant (const std::string &)
QPID_TYPES_EXTERN Variant (const char *)
QPID_TYPES_EXTERN Variant (const Map &)
QPID_TYPES_EXTERN Variant (const List &)
QPID_TYPES_EXTERN Variant (const Variant &)
QPID_TYPES_EXTERN Variant (const Uuid &)
QPID_TYPES_EXTERN ~Variant ()
QPID_TYPES_EXTERN VariantType getType () const
QPID_TYPES_EXTERN bool isVoid () const
QPID_TYPES_EXTERN Variantoperator= (bool)
QPID_TYPES_EXTERN Variantoperator= (uint8_t)
QPID_TYPES_EXTERN Variantoperator= (uint16_t)
QPID_TYPES_EXTERN Variantoperator= (uint32_t)
QPID_TYPES_EXTERN Variantoperator= (uint64_t)
QPID_TYPES_EXTERN Variantoperator= (int8_t)
QPID_TYPES_EXTERN Variantoperator= (int16_t)
QPID_TYPES_EXTERN Variantoperator= (int32_t)
QPID_TYPES_EXTERN Variantoperator= (int64_t)
QPID_TYPES_EXTERN Variantoperator= (float)
QPID_TYPES_EXTERN Variantoperator= (double)
QPID_TYPES_EXTERN Variantoperator= (const std::string &)
QPID_TYPES_EXTERN Variantoperator= (const char *)
QPID_TYPES_EXTERN Variantoperator= (const Map &)
QPID_TYPES_EXTERN Variantoperator= (const List &)
QPID_TYPES_EXTERN Variantoperator= (const Variant &)
QPID_TYPES_EXTERN Variantoperator= (const Uuid &)
QPID_TYPES_EXTERN Variantparse (const std::string &)
 Parses the argument and assigns itself the appropriate value.
QPID_TYPES_EXTERN bool asBool () const
QPID_TYPES_EXTERN uint8_t asUint8 () const
QPID_TYPES_EXTERN uint16_t asUint16 () const
QPID_TYPES_EXTERN uint32_t asUint32 () const
QPID_TYPES_EXTERN uint64_t asUint64 () const
QPID_TYPES_EXTERN int8_t asInt8 () const
QPID_TYPES_EXTERN int16_t asInt16 () const
QPID_TYPES_EXTERN int32_t asInt32 () const
QPID_TYPES_EXTERN int64_t asInt64 () const
QPID_TYPES_EXTERN float asFloat () const
QPID_TYPES_EXTERN double asDouble () const
QPID_TYPES_EXTERN std::string asString () const
QPID_TYPES_EXTERN Uuid asUuid () const
QPID_TYPES_EXTERN operator bool () const
QPID_TYPES_EXTERN operator uint8_t () const
QPID_TYPES_EXTERN operator uint16_t () const
QPID_TYPES_EXTERN operator uint32_t () const
QPID_TYPES_EXTERN operator uint64_t () const
QPID_TYPES_EXTERN operator int8_t () const
QPID_TYPES_EXTERN operator int16_t () const
QPID_TYPES_EXTERN operator int32_t () const
QPID_TYPES_EXTERN operator int64_t () const
QPID_TYPES_EXTERN operator float () const
QPID_TYPES_EXTERN operator double () const
QPID_TYPES_EXTERN operator std::string () const
QPID_TYPES_EXTERN operator Uuid () const
QPID_TYPES_EXTERN const MapasMap () const
QPID_TYPES_EXTERN MapasMap ()
QPID_TYPES_EXTERN const ListasList () const
QPID_TYPES_EXTERN ListasList ()
QPID_TYPES_EXTERN const
std::string
getString () const
 Unlike asString(), getString() will not do any conversions and will throw InvalidConversion if the type is not STRING.
QPID_TYPES_EXTERN std::stringgetString ()
QPID_TYPES_EXTERN void setEncoding (const std::string &)
QPID_TYPES_EXTERN const
std::string
getEncoding () const
QPID_TYPES_EXTERN bool isEqualTo (const Variant &a) const
QPID_TYPES_EXTERN void reset ()

Detailed Description

Represents a value of variable type.


Member Typedef Documentation

Definition at line 76 of file Variant.h.

Definition at line 75 of file Variant.h.


Constructor & Destructor Documentation

QPID_TYPES_EXTERN qpid::types::Variant::Variant ( )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( bool  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( uint8_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( uint16_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( uint32_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( uint64_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( int8_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( int16_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( int32_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( int64_t  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( float  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( double  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const std::string )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const char *  )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const Map )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const List )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const Variant )
QPID_TYPES_EXTERN qpid::types::Variant::Variant ( const Uuid )
QPID_TYPES_EXTERN qpid::types::Variant::~Variant ( )

Member Function Documentation

QPID_TYPES_EXTERN bool qpid::types::Variant::asBool ( ) const
QPID_TYPES_EXTERN double qpid::types::Variant::asDouble ( ) const
QPID_TYPES_EXTERN float qpid::types::Variant::asFloat ( ) const
QPID_TYPES_EXTERN int16_t qpid::types::Variant::asInt16 ( ) const
QPID_TYPES_EXTERN int32_t qpid::types::Variant::asInt32 ( ) const
QPID_TYPES_EXTERN int64_t qpid::types::Variant::asInt64 ( ) const
QPID_TYPES_EXTERN int8_t qpid::types::Variant::asInt8 ( ) const
QPID_TYPES_EXTERN const List& qpid::types::Variant::asList ( ) const
QPID_TYPES_EXTERN List& qpid::types::Variant::asList ( )
QPID_TYPES_EXTERN const Map& qpid::types::Variant::asMap ( ) const
QPID_TYPES_EXTERN Map& qpid::types::Variant::asMap ( )
QPID_TYPES_EXTERN std::string qpid::types::Variant::asString ( ) const
QPID_TYPES_EXTERN uint16_t qpid::types::Variant::asUint16 ( ) const
QPID_TYPES_EXTERN uint32_t qpid::types::Variant::asUint32 ( ) const
QPID_TYPES_EXTERN uint64_t qpid::types::Variant::asUint64 ( ) const
QPID_TYPES_EXTERN uint8_t qpid::types::Variant::asUint8 ( ) const
QPID_TYPES_EXTERN Uuid qpid::types::Variant::asUuid ( ) const
QPID_TYPES_EXTERN const std::string& qpid::types::Variant::getEncoding ( ) const
QPID_TYPES_EXTERN const std::string& qpid::types::Variant::getString ( ) const

Unlike asString(), getString() will not do any conversions and will throw InvalidConversion if the type is not STRING.

QPID_TYPES_EXTERN std::string& qpid::types::Variant::getString ( )
QPID_TYPES_EXTERN VariantType qpid::types::Variant::getType ( ) const
QPID_TYPES_EXTERN bool qpid::types::Variant::isEqualTo ( const Variant a) const
QPID_TYPES_EXTERN bool qpid::types::Variant::isVoid ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator bool ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator double ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator float ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator int16_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator int32_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator int64_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator int8_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator std::string ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator uint16_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator uint32_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator uint64_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator uint8_t ( ) const
QPID_TYPES_EXTERN qpid::types::Variant::operator Uuid ( ) const
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( bool  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( uint8_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( uint16_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( uint32_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( uint64_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( int8_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( int16_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( int32_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( int64_t  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( float  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( double  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const std::string )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const char *  )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const Map )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const List )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const Variant )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::operator= ( const Uuid )
QPID_TYPES_EXTERN Variant& qpid::types::Variant::parse ( const std::string )

Parses the argument and assigns itself the appropriate value.

Recognises integers, doubles and booleans.

QPID_TYPES_EXTERN void qpid::types::Variant::reset ( )
QPID_TYPES_EXTERN void qpid::types::Variant::setEncoding ( const std::string )

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00506.html0000664000076400007640000003254611752725717017332 0ustar00jrossjross00000000000000 qpid/framing/FieldValue.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/FieldValue.h File Reference
#include "qpid/Exception.h"
#include "qpid/framing/amqp_types.h"
#include "qpid/framing/Buffer.h"
#include "qpid/framing/FieldTable.h"
#include "qpid/CommonImportExport.h"
#include <iostream>
#include <memory>
#include <vector>
#include <assert.h>

Go to the source code of this file.

Classes

class  qpid::framing::FieldValueException
 Exception that is the base exception for all field table errors. More...
struct  qpid::framing::InvalidConversionException
 Exception thrown when we can't perform requested conversion. More...
class  qpid::framing::FieldValue
 Value that can appear in an AMQP field table. More...
class  qpid::framing::FieldValue::Data
class  qpid::framing::FixedWidthValue
class  qpid::framing::FixedWidthValue< 0 >
class  qpid::framing::VariableWidthValue
class  qpid::framing::EncodedValue
class  qpid::framing::Str8Value
class  qpid::framing::Str16Value
class  qpid::framing::Var16Value
class  qpid::framing::Var32Value
class  qpid::framing::Struct32Value
class  qpid::framing::FloatValue
class  qpid::framing::DoubleValue
class  qpid::framing::IntegerValue
class  qpid::framing::TimeValue
class  qpid::framing::Integer64Value
class  qpid::framing::Unsigned64Value
class  qpid::framing::FieldTableValue
class  qpid::framing::ArrayValue
class  qpid::framing::VoidValue
class  qpid::framing::BoolValue
class  qpid::framing::Unsigned8Value
class  qpid::framing::Unsigned16Value
class  qpid::framing::Unsigned32Value
class  qpid::framing::Integer8Value
class  qpid::framing::Integer16Value
class  qpid::framing::ListValue
class  qpid::framing::UuidValue

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


Typedefs

typedef IntegerValue qpid::framing::Integer32Value

Functions

template<>
bool qpid::framing::FieldValue::convertsTo< std::string > () const
template<>
std::string qpid::framing::FieldValue::get< std::string > () const
std::ostreamqpid::framing::operator<< (std::ostream &out, const FieldValue &v)
template<class T >
bool qpid::framing::getEncodedValue (FieldTable::ValuePtr vptr, T &value)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00321.html0000664000076400007640000001707711752725720017321 0ustar00jrossjross00000000000000 qpid::messaging::SendError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::SendError Struct Reference

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 SendError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qpid::messaging::SendError::SendError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00472.html0000664000076400007640000001263011752725717017324 0ustar00jrossjross00000000000000 qpid/client/MessageReplayTracker.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/MessageReplayTracker.h File Reference
#include "qpid/client/AsyncSession.h"
#include "qpid/client/Message.h"
#include "qpid/client/ClientImportExport.h"
#include <list>
#include <string>

Go to the source code of this file.

Classes

class  qpid::client::MessageReplayTracker
 Utility to track messages sent asynchronously, allowing those that are indoubt to be replayed over a new session. More...
struct  qpid::client::MessageReplayTracker::ReplayRecord

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x77.html0000664000076400007640000001352511752725720023610 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- w -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00351.html0000664000076400007640000011404211752725717017320 0ustar00jrossjross00000000000000 qpid::client::Subscription Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Subscription Class Reference

A handle to an active subscription. More...

#include <qpid/client/Subscription.h>

List of all members.

Public Member Functions

 Subscription (SubscriptionImpl *=0)
 Subscription (const Subscription &)
 ~Subscription ()
Subscriptionoperator= (const Subscription &)
std::string getName () const
 The name of the subscription, used as the "destination" for messages from the broker.
std::string getQueue () const
 Name of the queue this subscription subscribes to.
const SubscriptionSettingsgetSettings () const
 Get the flow control and acknowledgement settings for this subscription.
void setFlowControl (const FlowControl &)
 Set the flow control parameters.
void setAutoAck (unsigned int n)
 Automatically acknowledge (acquire and accept) batches of n messages.
SequenceSet getUnacquired () const
 Get the set of ID's for messages received by this subscription but not yet acquired.
SequenceSet getUnaccepted () const
 Get the set of ID's for messages received by this subscription but not yet accepted.
void acquire (const SequenceSet &messageIds)
 Acquire messageIds and remove them from the unacquired set.
void accept (const SequenceSet &messageIds)
 Accept messageIds and remove them from the unaccepted set.
void release (const SequenceSet &messageIds)
 Release messageIds and remove them from the unaccepted set.
QPID_CLIENT_INLINE_EXTERN void acquire (const Message &m)
QPID_CLIENT_INLINE_EXTERN void accept (const Message &m)
QPID_CLIENT_INLINE_EXTERN void release (const Message &m)
Session getSession () const
 Get the session associated with this subscription.
SubscriptionManager getSubscriptionManager ()
 Get the subscription manager associated with this subscription.
void cancel ()
 Cancel the subscription.
void grantMessageCredit (uint32_t)
 Grant the specified amount of message credit.
void grantByteCredit (uint32_t)
 Grant the specified amount of byte credit.
QPID_CLIENT_INLINE_EXTERN bool isValid () const
QPID_CLIENT_INLINE_EXTERN bool isNull () const
QPID_CLIENT_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_CLIENT_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Detailed Description

A handle to an active subscription.

Provides methods to query the subscription status and control acknowledgement (acquire and accept) of messages.


Member Typedef Documentation

typedef T qpid::client::Handle::Impl [protected, inherited]

Definition at line 57 of file Handle.h.


Constructor & Destructor Documentation

qpid::client::Subscription::Subscription ( SubscriptionImpl *  = 0)
qpid::client::Subscription::Subscription ( const Subscription )
qpid::client::Subscription::~Subscription ( )

Member Function Documentation

void qpid::client::Subscription::accept ( const SequenceSet &  messageIds)

Accept messageIds and remove them from the unaccepted set.

Precondition:
messageIds is a subset of getUnaccepted()
QPID_CLIENT_INLINE_EXTERN void qpid::client::Subscription::accept ( const Message m) [inline]

Definition at line 97 of file Subscription.h.

References accept(), and qpid::client::Message::getId().

Referenced by accept().

void qpid::client::Subscription::acquire ( const SequenceSet &  messageIds)

Acquire messageIds and remove them from the unacquired set.

oAdd them to the unaccepted set if getSettings().acceptMode == ACCEPT_MODE_EXPLICIT.

QPID_CLIENT_INLINE_EXTERN void qpid::client::Subscription::acquire ( const Message m) [inline]

Definition at line 94 of file Subscription.h.

References acquire(), and qpid::client::Message::getId().

Referenced by acquire().

void qpid::client::Subscription::cancel ( )

Cancel the subscription.

std::string qpid::client::Subscription::getName ( ) const

The name of the subscription, used as the "destination" for messages from the broker.

Usually the same as the queue name but can be set differently.

std::string qpid::client::Subscription::getQueue ( ) const

Name of the queue this subscription subscribes to.

Session qpid::client::Subscription::getSession ( ) const

Get the session associated with this subscription.

const SubscriptionSettings& qpid::client::Subscription::getSettings ( ) const

Get the flow control and acknowledgement settings for this subscription.

SubscriptionManager qpid::client::Subscription::getSubscriptionManager ( )

Get the subscription manager associated with this subscription.

SequenceSet qpid::client::Subscription::getUnaccepted ( ) const

Get the set of ID's for messages received by this subscription but not yet accepted.

SequenceSet qpid::client::Subscription::getUnacquired ( ) const

Get the set of ID's for messages received by this subscription but not yet acquired.

This will always be empty if getSettings().acquireMode=ACQUIRE_MODE_PRE_ACQUIRED

void qpid::client::Subscription::grantByteCredit ( uint32_t  )

Grant the specified amount of byte credit.

void qpid::client::Subscription::grantMessageCredit ( uint32_t  )

Grant the specified amount of message credit.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

References qpid::client::Handle::impl.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

References qpid::client::Handle::impl.

QPID_CLIENT_INLINE_EXTERN qpid::client::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

References qpid::client::Handle::impl.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

References qpid::client::Handle::impl.

Subscription& qpid::client::Subscription::operator= ( const Subscription )
void qpid::client::Subscription::release ( const SequenceSet &  messageIds)

Release messageIds and remove them from the unaccepted set.

Precondition:
messageIds is a subset of getUnaccepted()
QPID_CLIENT_INLINE_EXTERN void qpid::client::Subscription::release ( const Message m) [inline]

Definition at line 100 of file Subscription.h.

References release(), and qpid::client::Message::getId().

Referenced by release().

void qpid::client::Subscription::setAutoAck ( unsigned int  n)

Automatically acknowledge (acquire and accept) batches of n messages.

You can disable auto-acknowledgement by setting n=0, and use acquire() and accept() to manually acquire and accept messages.

void qpid::client::Subscription::setFlowControl ( const FlowControl )

Set the flow control parameters.

void qpid::client::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.

References qpid::client::Handle::impl.


Member Data Documentation

Impl* qpid::client::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00513.html0000664000076400007640000001203511752725717017317 0ustar00jrossjross00000000000000 qpid/framing/MessageResumeResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/MessageResumeResult.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::MessageResumeResult

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00082.html0000664000076400007640000001035211752725720017312 0ustar00jrossjross00000000000000 std::vector::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::vector::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00348.html0000664000076400007640000006154111752725720017325 0ustar00jrossjross00000000000000 qpid::framing::Struct32Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Struct32Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Struct32Value (const std::string &v)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Struct32Value::Struct32Value ( const std::string v)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00720.html0000664000076400007640000001245511752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaStatistic Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00028.html0000664000076400007640000001024411752725720017312 0ustar00jrossjross00000000000000 std::basic_fstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_fstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00268.html0000664000076400007640000001022211752725720017314 0ustar00jrossjross00000000000000 std::range_error Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::range_error Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00611.html0000664000076400007640000001406011752725717017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::Handle Member List
This is the complete list of members for qmf::Handle, including all inherited members.
Handle()qmf::Handle [inline, protected]
Handle(const Handle &)qmf::Handle [protected]
Impl typedefqmf::Handle [protected]
implqmf::Handle [protected]
isNull() const qmf::Handle [inline]
isValid() const qmf::Handle [inline]
operator bool() const qmf::Handle [inline]
operator!() const qmf::Handle [inline]
operator=(const Handle &)qmf::Handle [protected]
swap(Handle< T > &h)qmf::Handle [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00509.html0000664000076400007640000001176611752725717017336 0ustar00jrossjross00000000000000 qpid/framing/Header.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Header.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::Header

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00658.html0000664000076400007640000001041111752725717017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineAllocator::rebind Member List
This is the complete list of members for qpid::InlineAllocator::rebind, including all inherited members.
other typedefqpid::InlineAllocator::rebind

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x74.html0000664000076400007640000003566311752725717021314 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- t -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00584.html0000664000076400007640000002540311752725720017324 0ustar00jrossjross00000000000000 qpid::framing::execution Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::execution Namespace Reference

Enumerations

enum  ErrorCode {
  ERROR_CODE_UNAUTHORIZED_ACCESS = 403, ERROR_CODE_NOT_FOUND = 404, ERROR_CODE_RESOURCE_LOCKED = 405, ERROR_CODE_PRECONDITION_FAILED = 406,
  ERROR_CODE_RESOURCE_DELETED = 408, ERROR_CODE_ILLEGAL_STATE = 409, ERROR_CODE_COMMAND_INVALID = 503, ERROR_CODE_RESOURCE_LIMIT_EXCEEDED = 506,
  ERROR_CODE_NOT_ALLOWED = 530, ERROR_CODE_ILLEGAL_ARGUMENT = 531, ERROR_CODE_NOT_IMPLEMENTED = 540, ERROR_CODE_INTERNAL_ERROR = 541,
  ERROR_CODE_INVALID_ARGUMENT = 542
}

Enumeration Type Documentation

Enumerator:
ERROR_CODE_UNAUTHORIZED_ACCESS 
ERROR_CODE_NOT_FOUND 
ERROR_CODE_RESOURCE_LOCKED 
ERROR_CODE_PRECONDITION_FAILED 
ERROR_CODE_RESOURCE_DELETED 
ERROR_CODE_ILLEGAL_STATE 
ERROR_CODE_COMMAND_INVALID 
ERROR_CODE_RESOURCE_LIMIT_EXCEEDED 
ERROR_CODE_NOT_ALLOWED 
ERROR_CODE_ILLEGAL_ARGUMENT 
ERROR_CODE_NOT_IMPLEMENTED 
ERROR_CODE_INTERNAL_ERROR 
ERROR_CODE_INVALID_ARGUMENT 

Definition at line 72 of file enum.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00685.html0000664000076400007640000001540711752725717017337 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FlowControl Member List
This is the complete list of members for qpid::client::FlowControl, including all inherited members.
byteCredit(uint32_t bytes_)qpid::client::FlowControl [inline, static]
bytesqpid::client::FlowControl
byteWindow(uint32_t bytes_)qpid::client::FlowControl [inline, static]
FlowControl(uint32_t messages_=0, uint32_t bytes_=0, bool window_=false)qpid::client::FlowControl [inline]
messageCredit(uint32_t messages_)qpid::client::FlowControl [inline, static]
messagesqpid::client::FlowControl
messageWindow(uint32_t messages_)qpid::client::FlowControl [inline, static]
operator==(const FlowControl &x)qpid::client::FlowControl [inline]
UNLIMITEDqpid::client::FlowControl [static]
unlimited()qpid::client::FlowControl [inline, static]
windowqpid::client::FlowControl
zero()qpid::client::FlowControl [inline, static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00752.html0000664000076400007640000002077711752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FieldValue Member List
This is the complete list of members for qpid::framing::FieldValue, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00608.html0000664000076400007640000001325711752725717017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::KeyNotFound Member List
This is the complete list of members for qmf::KeyNotFound, including all inherited members.
detailqmf::QmfException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
KeyNotFound(const std::string &msg)qmf::KeyNotFound
QmfException(const std::string &msg)qmf::QmfException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~KeyNotFound()qmf::KeyNotFound [virtual]
~QmfException()qmf::QmfException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00554.html0000664000076400007640000000727011752725717017331 0ustar00jrossjross00000000000000 qpid/sys/IntegerTypes.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/IntegerTypes.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00222.html0000664000076400007640000002071511752725720017312 0ustar00jrossjross00000000000000 qpid::console::Package::NameHash Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Package::NameHash Struct Reference

List of all members.

Public Member Functions

 NameHash (const std::string &n, const uint8_t *h)

Public Attributes

std::string name
uint8_t hash [16]

Constructor & Destructor Documentation

qpid::console::Package::NameHash::NameHash ( const std::string n,
const uint8_t h 
) [inline]

Definition at line 47 of file Package.h.

References hash.


Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00085.html0000664000076400007640000001041611752725720017316 0ustar00jrossjross00000000000000 std::wstring::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wstring::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00328.html0000664000076400007640000005276411752725717017340 0ustar00jrossjross00000000000000 qpid::client::SessionBase_0_10 Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::SessionBase_0_10 Class Reference

Base class for handles to an AMQP session. More...

#include <qpid/client/SessionBase_0_10.h>

List of all members.

Public Member Functions

 SessionBase_0_10 ()
 ~SessionBase_0_10 ()
SessionId getId () const
 Get the session ID.
void close ()
 Close the session.
void sync ()
 Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.
uint32_t timeout (uint32_t seconds)
 Set the timeout for this session.
void suspend ()
 Suspend the session - detach it from its connection.
void resume (Connection)
 Resume a suspended session with a new connection.
uint16_t getChannel () const
 Get the channel associated with this session.
void flush ()
void markCompleted (const framing::SequenceSet &ids, bool notifyPeer)
void markCompleted (const framing::SequenceNumber &id, bool cumulative, bool notifyPeer)
void sendCompletion ()
bool isValid () const
Connection getConnection ()

Protected Attributes

boost::shared_ptr< SessionImpl > impl

Detailed Description

Base class for handles to an AMQP session.

Subclasses provide the AMQP commands for a given version of the protocol.


Constructor & Destructor Documentation

qpid::client::SessionBase_0_10::SessionBase_0_10 ( )
qpid::client::SessionBase_0_10::~SessionBase_0_10 ( )

Member Function Documentation

void qpid::client::SessionBase_0_10::close ( )

Close the session.

A session is automatically closed when all handles to it are destroyed.

void qpid::client::SessionBase_0_10::flush ( )
uint16_t qpid::client::SessionBase_0_10::getChannel ( ) const

Get the channel associated with this session.

Connection qpid::client::SessionBase_0_10::getConnection ( )
SessionId qpid::client::SessionBase_0_10::getId ( ) const

Get the session ID.

bool qpid::client::SessionBase_0_10::isValid ( ) const
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceSet ids,
bool  notifyPeer 
)
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceNumber id,
bool  cumulative,
bool  notifyPeer 
)
void qpid::client::SessionBase_0_10::resume ( Connection  )

Resume a suspended session with a new connection.

void qpid::client::SessionBase_0_10::sendCompletion ( )
void qpid::client::SessionBase_0_10::suspend ( )

Suspend the session - detach it from its connection.

void qpid::client::SessionBase_0_10::sync ( )

Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.

Note sync() is always synchronous, even on an AsyncSession object because that's almost always what you want. You can call AsyncSession::executionSync() directly in the unusual event that you want to do an asynchronous sync.

uint32_t qpid::client::SessionBase_0_10::timeout ( uint32_t  seconds)

Set the timeout for this session.


Member Data Documentation

boost::shared_ptr<SessionImpl> qpid::client::SessionBase_0_10::impl [protected]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00449.html0000664000076400007640000001103311752725717017324 0ustar00jrossjross00000000000000 qmf/Subscription.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Subscription.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::Subscription

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00471.html0000664000076400007640000001241711752725717017326 0ustar00jrossjross00000000000000 qpid/client/MessageListener.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/MessageListener.h File Reference
#include <string>
#include "qpid/client/ClientImportExport.h"
#include "qpid/client/Message.h"

Go to the source code of this file.

Classes

class  qpid::client::MessageListener
 Implement a subclass of MessageListener and subscribe it using the SubscriptionManager to receive messages. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00550.html0000664000076400007640000000724611752725717017330 0ustar00jrossjross00000000000000 qpid/sys/Condition.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Condition.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00492_source.html0000664000076400007640000002040711752725717020707 0ustar00jrossjross00000000000000 qpid/framing/amqp_structs.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/amqp_structs.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_AMQP_STRUCTS_H
00002 #define QPID_FRAMING_AMQP_STRUCTS_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/framing/Header.h"
00031 #include "qpid/framing/DeliveryProperties.h"
00032 #include "qpid/framing/FragmentProperties.h"
00033 #include "qpid/framing/ReplyTo.h"
00034 #include "qpid/framing/MessageProperties.h"
00035 #include "qpid/framing/MessageAcquireResult.h"
00036 #include "qpid/framing/MessageResumeResult.h"
00037 #include "qpid/framing/XaResult.h"
00038 #include "qpid/framing/Xid.h"
00039 #include "qpid/framing/DtxGetTimeoutResult.h"
00040 #include "qpid/framing/DtxRecoverResult.h"
00041 #include "qpid/framing/ExchangeQueryResult.h"
00042 #include "qpid/framing/ExchangeBoundResult.h"
00043 #include "qpid/framing/QueueQueryResult.h"
00044 #include "qpid/framing/FileProperties.h"
00045 #include "qpid/framing/StreamProperties.h"
00046 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00398.html0000664000076400007640000001305511752725720017327 0ustar00jrossjross00000000000000 std::wstring Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wstring Class Reference

STL class. More...

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00394.html0000664000076400007640000001022711752725720017321 0ustar00jrossjross00000000000000 std::wofstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wofstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00112.html0000664000076400007640000001650111752725720017306 0ustar00jrossjross00000000000000 qpid::types::Exception Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::types::Exception Class Reference

#include <qpid/types/Exception.h>

List of all members.

Public Member Functions

QPID_TYPES_EXTERN Exception (const std::string &message=std::string()) throw ()
virtual QPID_TYPES_EXTERN ~Exception () throw ()
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Constructor & Destructor Documentation

QPID_TYPES_EXTERN qpid::types::Exception::Exception ( const std::string message = std::string()) throw () [explicit]
virtual QPID_TYPES_EXTERN qpid::types::Exception::~Exception ( ) throw () [virtual]

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00519_source.html0000664000076400007640000003425411752725717020714 0ustar00jrossjross00000000000000 qpid/framing/SequenceSet.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/SequenceSet.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _framing_SequenceSet_h
00022 #define _framing_SequenceSet_h
00023 
00024 #include "qpid/framing/SequenceNumber.h"
00025 #include "qpid/RangeSet.h"
00026 #include "qpid/CommonImportExport.h"
00027 
00028 namespace qpid {
00029 namespace framing {
00030 class Buffer;
00031 
00032 class QPID_COMMON_CLASS_EXTERN SequenceSet : public RangeSet<SequenceNumber> {
00033   public:
00034     SequenceSet() {}
00035     SequenceSet(const RangeSet<SequenceNumber>& r)
00036         : RangeSet<SequenceNumber>(r) {}
00037     SequenceSet(const SequenceNumber& s) { add(s); }
00038     SequenceSet(const SequenceNumber& start, const SequenceNumber finish) { add(start,finish); }
00039 
00040 
00041     QPID_COMMON_EXTERN void encode(Buffer& buffer) const;
00042     QPID_COMMON_EXTERN void decode(Buffer& buffer);
00043     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00044 
00045     QPID_COMMON_EXTERN bool contains(const SequenceNumber& s) const;
00046     QPID_COMMON_EXTERN void add(const SequenceNumber& s);
00047     QPID_COMMON_EXTERN void add(const SequenceNumber& start, const SequenceNumber& finish); // Closed range
00048     QPID_COMMON_EXTERN void add(const SequenceSet& set);
00049     QPID_COMMON_EXTERN void remove(const SequenceNumber& s);
00050     QPID_COMMON_EXTERN void remove(const SequenceNumber& start, const SequenceNumber& finish); // Closed range
00051     QPID_COMMON_EXTERN void remove(const SequenceSet& set);
00052 
00053     template <class T> void for_each(T& t) const {
00054         for (RangeIterator i = rangesBegin(); i != rangesEnd(); i++)
00055             t(i->first(), i->last());
00056         }
00057 
00058     template <class T> void for_each(const T& t) const {
00059         for (RangeIterator i = rangesBegin(); i != rangesEnd(); i++)
00060             t(i->first(), i->last());
00061     }
00062 
00063   friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SequenceSet&);
00064 };
00065 
00066 }} // namespace qpid::framing
00067 
00068 
00069 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00502.html0000664000076400007640000005211711752725717017322 0ustar00jrossjross00000000000000 qpid/framing/enum.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/enum.h File Reference

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  qpid::framing::connection
namespace  qpid::framing::session
namespace  qpid::framing::execution
namespace  qpid::framing::message
namespace  qpid::framing::dtx
namespace  qpid::framing::file
namespace  qpid::framing::stream
namespace  qpid::framing::cluster

Enumerations

enum  qpid::framing::SegmentType { qpid::framing::SEGMENT_TYPE_CONTROL = 0, qpid::framing::SEGMENT_TYPE_COMMAND = 1, qpid::framing::SEGMENT_TYPE_HEADER = 2, qpid::framing::SEGMENT_TYPE_BODY = 3 }
enum  qpid::framing::Track { qpid::framing::TRACK_CONTROL = 0, qpid::framing::TRACK_COMMAND = 1 }
enum  qpid::framing::connection::CloseCode { qpid::framing::connection::CLOSE_CODE_NORMAL = 200, qpid::framing::connection::CLOSE_CODE_CONNECTION_FORCED = 320, qpid::framing::connection::CLOSE_CODE_INVALID_PATH = 402, qpid::framing::connection::CLOSE_CODE_FRAMING_ERROR = 501 }
enum  qpid::framing::session::DetachCode {
  qpid::framing::session::DETACH_CODE_NORMAL = 0, qpid::framing::session::DETACH_CODE_SESSION_BUSY = 1, qpid::framing::session::DETACH_CODE_TRANSPORT_BUSY = 2, qpid::framing::session::DETACH_CODE_NOT_ATTACHED = 3,
  qpid::framing::session::DETACH_CODE_UNKNOWN_IDS = 4
}
enum  qpid::framing::execution::ErrorCode {
  qpid::framing::execution::ERROR_CODE_UNAUTHORIZED_ACCESS = 403, qpid::framing::execution::ERROR_CODE_NOT_FOUND = 404, qpid::framing::execution::ERROR_CODE_RESOURCE_LOCKED = 405, qpid::framing::execution::ERROR_CODE_PRECONDITION_FAILED = 406,
  qpid::framing::execution::ERROR_CODE_RESOURCE_DELETED = 408, qpid::framing::execution::ERROR_CODE_ILLEGAL_STATE = 409, qpid::framing::execution::ERROR_CODE_COMMAND_INVALID = 503, qpid::framing::execution::ERROR_CODE_RESOURCE_LIMIT_EXCEEDED = 506,
  qpid::framing::execution::ERROR_CODE_NOT_ALLOWED = 530, qpid::framing::execution::ERROR_CODE_ILLEGAL_ARGUMENT = 531, qpid::framing::execution::ERROR_CODE_NOT_IMPLEMENTED = 540, qpid::framing::execution::ERROR_CODE_INTERNAL_ERROR = 541,
  qpid::framing::execution::ERROR_CODE_INVALID_ARGUMENT = 542
}
enum  qpid::framing::message::AcceptMode { qpid::framing::message::ACCEPT_MODE_EXPLICIT = 0, qpid::framing::message::ACCEPT_MODE_NONE = 1 }
enum  qpid::framing::message::AcquireMode { qpid::framing::message::ACQUIRE_MODE_PRE_ACQUIRED = 0, qpid::framing::message::ACQUIRE_MODE_NOT_ACQUIRED = 1 }
enum  qpid::framing::message::RejectCode { qpid::framing::message::REJECT_CODE_UNSPECIFIED = 0, qpid::framing::message::REJECT_CODE_UNROUTABLE = 1, qpid::framing::message::REJECT_CODE_IMMEDIATE = 2 }
enum  qpid::framing::message::DeliveryMode { qpid::framing::message::DELIVERY_MODE_NON_PERSISTENT = 1, qpid::framing::message::DELIVERY_MODE_PERSISTENT = 2 }
enum  qpid::framing::message::DeliveryPriority {
  qpid::framing::message::DELIVERY_PRIORITY_LOWEST = 0, qpid::framing::message::DELIVERY_PRIORITY_LOWER = 1, qpid::framing::message::DELIVERY_PRIORITY_LOW = 2, qpid::framing::message::DELIVERY_PRIORITY_BELOW_AVERAGE = 3,
  qpid::framing::message::DELIVERY_PRIORITY_MEDIUM = 4, qpid::framing::message::DELIVERY_PRIORITY_ABOVE_AVERAGE = 5, qpid::framing::message::DELIVERY_PRIORITY_HIGH = 6, qpid::framing::message::DELIVERY_PRIORITY_HIGHER = 7,
  qpid::framing::message::DELIVERY_PRIORITY_VERY_HIGH = 8, qpid::framing::message::DELIVERY_PRIORITY_HIGHEST = 9
}
enum  qpid::framing::message::FlowMode { qpid::framing::message::FLOW_MODE_CREDIT = 0, qpid::framing::message::FLOW_MODE_WINDOW = 1 }
enum  qpid::framing::message::CreditUnit { qpid::framing::message::CREDIT_UNIT_MESSAGE = 0, qpid::framing::message::CREDIT_UNIT_BYTE = 1 }
enum  qpid::framing::dtx::XaStatus {
  qpid::framing::dtx::XA_STATUS_XA_OK = 0, qpid::framing::dtx::XA_STATUS_XA_RBROLLBACK = 1, qpid::framing::dtx::XA_STATUS_XA_RBTIMEOUT = 2, qpid::framing::dtx::XA_STATUS_XA_HEURHAZ = 3,
  qpid::framing::dtx::XA_STATUS_XA_HEURCOM = 4, qpid::framing::dtx::XA_STATUS_XA_HEURRB = 5, qpid::framing::dtx::XA_STATUS_XA_HEURMIX = 6, qpid::framing::dtx::XA_STATUS_XA_RDONLY = 7
}
enum  qpid::framing::file::ReturnCode { qpid::framing::file::RETURN_CODE_CONTENT_TOO_LARGE = 311, qpid::framing::file::RETURN_CODE_NO_ROUTE = 312, qpid::framing::file::RETURN_CODE_NO_CONSUMERS = 313 }
enum  qpid::framing::stream::ReturnCode { qpid::framing::stream::RETURN_CODE_CONTENT_TOO_LARGE = 311, qpid::framing::stream::RETURN_CODE_NO_ROUTE = 312, qpid::framing::stream::RETURN_CODE_NO_CONSUMERS = 313 }
enum  qpid::framing::cluster::StoreState { qpid::framing::cluster::STORE_STATE_NO_STORE = 0, qpid::framing::cluster::STORE_STATE_EMPTY_STORE = 1, qpid::framing::cluster::STORE_STATE_CLEAN_STORE = 2, qpid::framing::cluster::STORE_STATE_DIRTY_STORE = 3 }
enum  qpid::framing::cluster::ErrorType { qpid::framing::cluster::ERROR_TYPE_NONE = 0, qpid::framing::cluster::ERROR_TYPE_SESSION = 1, qpid::framing::cluster::ERROR_TYPE_CONNECTION = 2 }

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00121.html0000664000076400007640000001035711752725720017311 0ustar00jrossjross00000000000000 std::ios_base::failure Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::ios_base::failure Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00285.html0000664000076400007640000001041211752725720017314 0ustar00jrossjross00000000000000 std::basic_string::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_string::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00444.html0000664000076400007640000001143411752725717017324 0ustar00jrossjross00000000000000 qmf/posix/EventNotifier.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/posix/EventNotifier.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qmf/AgentSession.h"
#include "qmf/ConsoleSession.h"

Go to the source code of this file.

Classes

class  qmf::posix::EventNotifier

Namespaces

namespace  qmf
namespace  qmf::posix

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00529_source.html0000664000076400007640000003124211752725717020707 0ustar00jrossjross00000000000000 qpid/log/Logger.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/Logger.h
Go to the documentation of this file.
00001 #ifndef QPID_LOG_LOGGER_H
00002 #define QPID_LOG_LOGGER_H
00003 
00004 /*
00005  *    http://www.apache.org/licenses/LICENSE-2.0
00006  *
00007  * Unless required by applicable law or agreed to in writing, software
00008  * distributed under the License is distributed on an "AS IS" BASIS,
00009  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00010  * See the License for the specific language governing permissions and
00011  * limitations under the License.
00012  *
00013  */
00014 
00015 #include "qpid/log/Selector.h"
00016 #include "qpid/log/Options.h"
00017 #include "qpid/sys/Mutex.h"
00018 #include <boost/ptr_container/ptr_vector.hpp>
00019 #include <boost/noncopyable.hpp>
00020 #include <set>
00021 #include "qpid/CommonImportExport.h"
00022 
00023 namespace qpid {
00024 namespace log {
00025 
00036 class QPID_COMMON_CLASS_EXTERN Logger : private boost::noncopyable {
00037   public:
00039     enum FormatFlag { FILE=1, LINE=2, FUNCTION=4, LEVEL=8, TIME=16, THREAD=32, HIRES=64};
00040 
00050     class Output {
00051       public:
00052         QPID_COMMON_EXTERN Output();
00053         QPID_COMMON_EXTERN virtual ~Output();
00055         virtual void log(const Statement&, const std::string&) =0;
00056     };
00057 
00058     QPID_COMMON_EXTERN static Logger& instance();
00059 
00060     QPID_COMMON_EXTERN Logger();
00061     QPID_COMMON_EXTERN ~Logger();
00062 
00064     QPID_COMMON_EXTERN void select(const Selector& s);
00065 
00067     QPID_COMMON_EXTERN void format(int formatFlags);
00068 
00072     QPID_COMMON_EXTERN int format(const Options&);
00073 
00075     QPID_COMMON_EXTERN void configure(const Options& o);
00076 
00078     QPID_COMMON_EXTERN void reconfigure(const std::vector<std::string>& selectors);
00079 
00081     QPID_COMMON_EXTERN void add(Statement& s);
00082 
00084     QPID_COMMON_EXTERN void log(const Statement&, const std::string&);
00085 
00087     QPID_COMMON_EXTERN void output(std::auto_ptr<Output> out);
00088 
00090     QPID_COMMON_EXTERN void setPrefix(const std::string& prefix);
00091 
00093     QPID_COMMON_EXTERN void clear();
00094 
00096     QPID_COMMON_INLINE_EXTERN const Options& getOptions() const { return options; }
00097 
00098 
00099   private:
00100     typedef boost::ptr_vector<Output> Outputs;
00101     typedef std::set<Statement*> Statements;
00102 
00103     sys::Mutex lock;
00104     inline void enable_unlocked(Statement* s);
00105 
00106     Statements statements;
00107     Outputs outputs;
00108     Selector selector;
00109     int flags;
00110     std::string prefix;
00111     Options options;
00112 };
00113 
00114 }} // namespace qpid::log
00115 
00116 
00117 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/globals_defs.html0000664000076400007640000002341411752725720021127 0ustar00jrossjross00000000000000 File Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- b -

  • BOOST_PARAMETER_MAX_ARITY : arg.h

- q -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00032.html0000664000076400007640000001023711752725720017307 0ustar00jrossjross00000000000000 std::basic_istream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_istream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00707.html0000664000076400007640000001410011752725720017311 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Broker::ConnectionThread Member List
This is the complete list of members for qpid::console::Broker::ConnectionThread, including all inherited members.
bindExchange(const std::string &exchange, const std::string &key)qpid::console::Broker::ConnectionThread
ConnectionThread(Broker &_broker)qpid::console::Broker::ConnectionThread [inline]
Functor typedefqpid::sys::Runnable
functor()qpid::sys::Runnable
sendBuffer(qpid::framing::Buffer &buf, uint32_t length, const std::string &exchange="qpid.management", const std::string &routingKey="broker")qpid::console::Broker::ConnectionThread
shutdown()qpid::console::Broker::ConnectionThread
~ConnectionThread()qpid::console::Broker::ConnectionThread
~Runnable()qpid::sys::Runnable [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/tab_b.png0000664000076400007640000000026211752725717017374 0ustar00jrossjross00000000000000‰PNG  IHDR$ÇÇ[yIDATxíÝÛ Â €Ñ?|SVÓˆ´bB#P®½8³‰O¾:É™D>ßm{SûIí'¹äz(!•TBÞ‰y#¤WìJDp¾ã|Ã…†ó »ìR˜]áá æ™Ð6q·‰›]ç•qŠŒÓÊÕD.&0èÀ =ƒJD”ˆü=@*é*ç×IEND®B`‚qpidc-0.16/docs/api/html/a00544_source.html0000664000076400007640000001707111752725717020710 0ustar00jrossjross00000000000000 qpid/messaging/FailoverUpdates.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/FailoverUpdates.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_AMQP0_10_FAILOVERUPDATES_H
00002 #define QPID_CLIENT_AMQP0_10_FAILOVERUPDATES_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/messaging/ImportExport.h"
00025 
00026 namespace qpid {
00027 namespace messaging {
00028 class Connection;
00029 struct FailoverUpdatesImpl;
00030 
00035 class QPID_MESSAGING_CLASS_EXTERN FailoverUpdates
00036 {
00037   public:
00038     QPID_MESSAGING_EXTERN FailoverUpdates(Connection& connection);
00039     QPID_MESSAGING_EXTERN ~FailoverUpdates();
00040   private:
00041     FailoverUpdatesImpl* impl;
00042 
00043     //no need to copy instances of this class
00044     FailoverUpdates(const FailoverUpdates&);
00045     FailoverUpdates& operator=(const FailoverUpdates&);
00046 };
00047 }} // namespace qpid::messaging
00048 
00049 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00326.html0000664000076400007640000041015111752725720017314 0ustar00jrossjross00000000000000 qpid::client::no_keyword::Session_0_10 Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::no_keyword::Session_0_10 Class Reference

AMQP 0-10 synchronous session API. More...

#include <qpid/client/no_keyword/Session_0_10.h>

List of all members.

Public Member Functions

 Session_0_10 ()
QPID_CLIENT_INLINE_EXTERN Session_0_10 (const SessionBase_0_10 &other)
QPID_CLIENT_INLINE_EXTERN
Session_0_10
operator= (const SessionBase_0_10 &other)
void executionSync (bool sync=true)
 This command is complete when all prior commands are completed.
void executionResult (const SequenceNumber &commandId=SequenceNumber(), const std::string &value=std::string(), bool sync=true)
 This command carries data resulting from the execution of a command.
void executionException (uint16_t errorCode=0, const SequenceNumber &commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string &description=std::string(), const FieldTable &errorInfo=FieldTable(), bool sync=true)
 This command informs a peer of an execution exception.
void messageTransfer (const std::string &destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message &content=Message(std::string()), bool sync=true)
 This command transfers a message between two peers.
void messageAccept (const SequenceSet &transfers=SequenceSet(), bool sync=true)
 Accepts the message.
void messageReject (const SequenceSet &transfers=SequenceSet(), uint16_t code=0, const std::string &text=std::string(), bool sync=true)
 Indicates that the message transfers are unprocessable in some way.
void messageRelease (const SequenceSet &transfers=SequenceSet(), bool setRedelivered=false, bool sync=true)
 Release previously transferred messages.
qpid::framing::MessageAcquireResult messageAcquire (const SequenceSet &transfers=SequenceSet(), bool sync=true)
 Acquires previously transferred messages for consumption.
qpid::framing::MessageResumeResult messageResume (const std::string &destination=std::string(), const std::string &resumeId=std::string(), bool sync=true)
 This command resumes an interrupted transfer.
void messageSubscribe (const std::string &queue=std::string(), const std::string &destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string &resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable &arguments=FieldTable(), bool sync=true)
 This command asks the server to start a "subscription", which is a request for messages from a specific queue.
void messageCancel (const std::string &destination=std::string(), bool sync=true)
 This command cancels a subscription.
void messageSetFlowMode (const std::string &destination=std::string(), uint8_t flowMode=0, bool sync=true)
 Sets the mode of flow control used for a given destination to either window or credit based flow control.
void messageFlow (const std::string &destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=true)
 This command controls the flow of message data to a given destination.
void messageFlush (const std::string &destination=std::string(), bool sync=true)
 Forces the sender to exhaust his credit supply.
void messageStop (const std::string &destination=std::string(), bool sync=true)
 On receipt of this command, a producer of messages MUST set his credit to zero for the given destination.
void txSelect (bool sync=true)
 This command sets the session to use standard transactions.
void txCommit (bool sync=true)
 This command commits all messages published and accepted in the current transaction.
void txRollback (bool sync=true)
 This command abandons the current transaction.
void dtxSelect (bool sync=true)
 This command sets the session to use distributed transactions.
qpid::framing::XaResult dtxStart (const Xid &xid=Xid(), bool join=false, bool resume=false, bool sync=true)
 This command is called when messages should be produced and consumed on behalf a transaction branch identified by xid.
qpid::framing::XaResult dtxEnd (const Xid &xid=Xid(), bool fail=false, bool suspend=false, bool sync=true)
 This command is called when the work done on behalf a transaction branch finishes or needs to be suspended.
qpid::framing::XaResult dtxCommit (const Xid &xid=Xid(), bool onePhase=false, bool sync=true)
 Commit the work done on behalf a transaction branch.
void dtxForget (const Xid &xid=Xid(), bool sync=true)
 This command is called to forget about a heuristically completed transaction branch.
qpid::framing::DtxGetTimeoutResult dtxGetTimeout (const Xid &xid=Xid(), bool sync=true)
 This command obtains the current transaction timeout value in seconds.
qpid::framing::XaResult dtxPrepare (const Xid &xid=Xid(), bool sync=true)
 This command prepares for commitment any message produced or consumed on behalf of xid.
qpid::framing::DtxRecoverResult dtxRecover (bool sync=true)
 This command is called to obtain a list of transaction branches that are in a prepared or heuristically completed state.
qpid::framing::XaResult dtxRollback (const Xid &xid=Xid(), bool sync=true)
 This command rolls back the work associated with xid.
void dtxSetTimeout (const Xid &xid=Xid(), uint32_t timeout=0, bool sync=true)
 Sets the specified transaction branch timeout value in seconds.
void exchangeDeclare (const std::string &exchange=std::string(), const std::string &type=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=true)
 This command creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.
void exchangeDelete (const std::string &exchange=std::string(), bool ifUnused=false, bool sync=true)
 This command deletes an exchange.
qpid::framing::ExchangeQueryResult exchangeQuery (const std::string &name=std::string(), bool sync=true)
 This command is used to request information on a particular exchange.
void exchangeBind (const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=true)
 This command binds a queue to an exchange.
void exchangeUnbind (const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), bool sync=true)
 This command unbinds a queue from an exchange.
qpid::framing::ExchangeBoundResult exchangeBound (const std::string &exchange=std::string(), const std::string &queue=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=true)
 This command is used to request information on the bindings to a particular exchange.
void queueDeclare (const std::string &queue=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=true)
 This command creates or checks a queue.
void queueDelete (const std::string &queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=true)
 This command deletes a queue.
void queuePurge (const std::string &queue=std::string(), bool sync=true)
 This command removes all messages from a queue.
qpid::framing::QueueQueryResult queueQuery (const std::string &queue=std::string(), bool sync=true)
 This command requests information about a queue.
SessionId getId () const
 Get the session ID.
void close ()
 Close the session.
void sync ()
 Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.
uint32_t timeout (uint32_t seconds)
 Set the timeout for this session.
void suspend ()
 Suspend the session - detach it from its connection.
void resume (Connection)
 Resume a suspended session with a new connection.
uint16_t getChannel () const
 Get the channel associated with this session.
void flush ()
void markCompleted (const framing::SequenceSet &ids, bool notifyPeer)
void markCompleted (const framing::SequenceNumber &id, bool cumulative, bool notifyPeer)
void sendCompletion ()
bool isValid () const
Connection getConnection ()

Protected Attributes

boost::shared_ptr< SessionImpl > impl

Detailed Description

AMQP 0-10 synchronous session API.

A session is a named interaction between two peers. Session names are chosen by the upper layers and may be used indefinitely. The model layer may associate long-lived or durable state with a given session name. The session layer provides transport of commands associated with this interaction.


Constructor & Destructor Documentation

qpid::client::no_keyword::Session_0_10::Session_0_10 ( )

Reimplemented in qpid::client::Session_0_10.

QPID_CLIENT_INLINE_EXTERN qpid::client::no_keyword::Session_0_10::Session_0_10 ( const SessionBase_0_10 other)

Reimplemented in qpid::client::Session_0_10.


Member Function Documentation

void qpid::client::SessionBase_0_10::close ( ) [inherited]

Close the session.

A session is automatically closed when all handles to it are destroyed.

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxCommit ( const Xid &  xid = Xid(),
bool  onePhase = false,
bool  sync = true 
)

Commit the work done on behalf a transaction branch.

This command commits the work associated with xid. Any produced messages are made available and any consumed messages are discarded.

Parameters:
xidSpecifies the xid of the transaction branch to be committed.
onePhaseUsed to indicate whether one-phase or two-phase commit is used.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxEnd ( const Xid &  xid = Xid(),
bool  fail = false,
bool  suspend = false,
bool  sync = true 
)

This command is called when the work done on behalf a transaction branch finishes or needs to be suspended.

Parameters:
xidSpecifies the xid of the transaction branch to be ended.
failIf set, indicates that this portion of work has failed; otherwise this portion of work has completed successfully.
suspendIndicates that the transaction branch is temporarily suspended in an incomplete state.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::dtxForget ( const Xid &  xid = Xid(),
bool  sync = true 
)

This command is called to forget about a heuristically completed transaction branch.

Parameters:
xidSpecifies the xid of the transaction branch to be forgotten.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::DtxGetTimeoutResult qpid::client::no_keyword::Session_0_10::dtxGetTimeout ( const Xid &  xid = Xid(),
bool  sync = true 
)

This command obtains the current transaction timeout value in seconds.

If set-timeout was not used prior to invoking this command, the return value is the default timeout; otherwise, the value used in the previous set-timeout call is returned.

Parameters:
xidSpecifies the xid of the transaction branch for getting the timeout.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxPrepare ( const Xid &  xid = Xid(),
bool  sync = true 
)

This command prepares for commitment any message produced or consumed on behalf of xid.

Parameters:
xidSpecifies the xid of the transaction branch that can be prepared.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::DtxRecoverResult qpid::client::no_keyword::Session_0_10::dtxRecover ( bool  sync = true)

This command is called to obtain a list of transaction branches that are in a prepared or heuristically completed state.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxRollback ( const Xid &  xid = Xid(),
bool  sync = true 
)

This command rolls back the work associated with xid.

Any produced messages are discarded and any consumed messages are re-enqueued.

Parameters:
xidSpecifies the xid of the transaction branch that can be rolled back.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::dtxSelect ( bool  sync = true)

This command sets the session to use distributed transactions.

The client must use this command at least once on a session before using XA demarcation operations.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::dtxSetTimeout ( const Xid &  xid = Xid(),
uint32_t  timeout = 0,
bool  sync = true 
)

Sets the specified transaction branch timeout value in seconds.

Parameters:
xidSpecifies the xid of the transaction branch for setting the timeout.
timeoutThe transaction timeout value in seconds.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::XaResult qpid::client::no_keyword::Session_0_10::dtxStart ( const Xid &  xid = Xid(),
bool  join = false,
bool  resume = false,
bool  sync = true 
)

This command is called when messages should be produced and consumed on behalf a transaction branch identified by xid.

Parameters:
xidSpecifies the xid of the transaction branch to be started.
joinIndicate whether this is joining an already associated xid. Indicate that the start applies to joining a transaction previously seen.
resumeIndicate that the start applies to resuming a suspended transaction branch specified.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::exchangeBind ( const std::string queue = std::string(),
const std::string exchange = std::string(),
const std::string bindingKey = std::string(),
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
)

This command binds a queue to an exchange.

Until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a direct exchange and subscription queues are bound to a topic exchange.

Parameters:
queueSpecifies the name of the queue to bind.
exchange
bindingKeyThe binding-key uniquely identifies a binding between a given (exchange, queue) pair. Depending on the exchange configuration, the binding key may be matched against the message routing key in order to make routing decisions. The match algorithm depends on the exchange type. Some exchange types may ignore the binding key when making routing decisions. Refer to the specific exchange type documentation. The meaning of an empty binding key depends on the exchange implementation.
argumentsA set of arguments for the binding. The syntax and semantics of these arguments depends on the exchange class.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::ExchangeBoundResult qpid::client::no_keyword::Session_0_10::exchangeBound ( const std::string exchange = std::string(),
const std::string queue = std::string(),
const std::string bindingKey = std::string(),
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
)

This command is used to request information on the bindings to a particular exchange.

Parameters:
exchangeThe name of the exchange for which binding information is being requested. If not specified explicitly the default exchange is implied.
queueIf populated then determine whether the given queue is bound to the exchange.
bindingKeyIf populated defines the binding-key of the binding of interest, if not populated the request will ignore the binding-key on bindings when searching for a match.
argumentsIf populated defines the arguments of the binding of interest if not populated the request will ignore the arguments on bindings when searching for a match
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::exchangeDeclare ( const std::string exchange = std::string(),
const std::string type = std::string(),
const std::string alternateExchange = std::string(),
bool  passive = false,
bool  durable = false,
bool  autoDelete = false,
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
)

This command creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.

Parameters:
exchange
typeEach exchange belongs to one of a set of exchange types implemented by the server. The exchange types define the functionality of the exchange - i.e. how messages are routed through it. It is not valid or meaningful to attempt to change the type of an existing exchange.
alternateExchangeIn the event that a message cannot be routed, this is the name of the exchange to which the message will be sent. Messages transferred using message.transfer will be routed to the alternate-exchange only if they are sent with the "none" accept-mode, and the discard-unroutable delivery property is set to false, and there is no queue to route to for the given message according to the bindings on this exchange.
passiveIf set, the server will not create the exchange. The client can use this to check whether an exchange exists without modifying the server state.
durableIf set when creating a new exchange, the exchange will be marked as durable. Durable exchanges remain active when a server restarts. Non-durable exchanges (transient exchanges) are purged if/when a server restarts.
autoDeleteIf set, the exchange is deleted automatically when there remain no bindings between the exchange and any queue. Such an exchange will not be automatically deleted until at least one binding has been made to prevent the immediate deletion of the exchange upon creation.
argumentsA set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored if passive is 1.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::exchangeDelete ( const std::string exchange = std::string(),
bool  ifUnused = false,
bool  sync = true 
)

This command deletes an exchange.

When an exchange is deleted all queue bindings on the exchange are cancelled.

Parameters:
exchange
ifUnusedIf set, the server will only delete the exchange if it has no queue bindings. If the exchange has queue bindings the server does not delete it but raises an exception instead.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::ExchangeQueryResult qpid::client::no_keyword::Session_0_10::exchangeQuery ( const std::string name = std::string(),
bool  sync = true 
)

This command is used to request information on a particular exchange.

Parameters:
nameThe name of the exchange for which information is requested. If not specified explicitly the default exchange is implied.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::exchangeUnbind ( const std::string queue = std::string(),
const std::string exchange = std::string(),
const std::string bindingKey = std::string(),
bool  sync = true 
)

This command unbinds a queue from an exchange.

Parameters:
queueSpecifies the name of the queue to unbind.
exchangeThe name of the exchange to unbind from.
bindingKeySpecifies the binding-key of the binding to unbind.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::executionException ( uint16_t  errorCode = 0,
const SequenceNumber &  commandId = SequenceNumber(),
uint8_t  classCode = 0,
uint8_t  commandCode = 0,
uint8_t  fieldIndex = 0,
const std::string description = std::string(),
const FieldTable &  errorInfo = FieldTable(),
bool  sync = true 
)

This command informs a peer of an execution exception.

The command-id, when given, correlates the error to a specific command.

Parameters:
errorCode
commandIdThe command-id of the command which caused the exception. If the exception was not caused by a specific command, this value is not set.
classCode
commandCode
fieldIndexThe zero based index of the exceptional field within the arguments to the exceptional command. If the exception was not caused by a specific field, this value is not set.
descriptionThe description provided is implementation defined, but MUST be in the language appropriate for the selected locale. The intention is that this description is suitable for logging or alerting output.
errorInfo
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::executionResult ( const SequenceNumber &  commandId = SequenceNumber(),
const std::string value = std::string(),
bool  sync = true 
)

This command carries data resulting from the execution of a command.

Parameters:
commandId
value
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::executionSync ( bool  sync = true)

This command is complete when all prior commands are completed.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::SessionBase_0_10::flush ( ) [inherited]
uint16_t qpid::client::SessionBase_0_10::getChannel ( ) const [inherited]

Get the channel associated with this session.

Connection qpid::client::SessionBase_0_10::getConnection ( ) [inherited]
SessionId qpid::client::SessionBase_0_10::getId ( ) const [inherited]

Get the session ID.

bool qpid::client::SessionBase_0_10::isValid ( ) const [inherited]
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceSet ids,
bool  notifyPeer 
) [inherited]
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceNumber id,
bool  cumulative,
bool  notifyPeer 
) [inherited]
void qpid::client::no_keyword::Session_0_10::messageAccept ( const SequenceSet &  transfers = SequenceSet(),
bool  sync = true 
)

Accepts the message.

Once a transfer is accepted, the command-id may no longer be referenced from other commands.

Parameters:
transfersIdentifies the messages previously transferred that should be accepted.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::MessageAcquireResult qpid::client::no_keyword::Session_0_10::messageAcquire ( const SequenceSet &  transfers = SequenceSet(),
bool  sync = true 
)

Acquires previously transferred messages for consumption.

The acquired ids (if any) are sent via message.acquired.

Parameters:
transfersIndicates the messages to be acquired.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageCancel ( const std::string destination = std::string(),
bool  sync = true 
)

This command cancels a subscription.

This does not affect already delivered messages, but it does mean the server will not send any more messages for that subscription. The client may receive an arbitrary number of messages in between sending the cancel command and receiving notification that the cancel command is complete.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageFlow ( const std::string destination = std::string(),
uint8_t  unit = 0,
uint32_t  value = 0,
bool  sync = true 
)

This command controls the flow of message data to a given destination.

It is used by the recipient of messages to dynamically match the incoming rate of message flow to its processing or forwarding capacity. Upon receipt of this command, the sender must add "value" number of the specified unit to the available credit balance for the specified destination. A value of (0xFFFFFFFF) indicates an infinite amount of credit. This disables any limit for the given unit until the credit balance is zeroed with message.stop or message.flush.

Parameters:
destination
unitThe unit of value.
valueIf the value is not set then this indicates an infinite amount of credit.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageFlush ( const std::string destination = std::string(),
bool  sync = true 
)

Forces the sender to exhaust his credit supply.

The sender's credit will always be zero when this command completes. The command completes when immediately available message data has been transferred, or when the credit supply is exhausted.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageReject ( const SequenceSet &  transfers = SequenceSet(),
uint16_t  code = 0,
const std::string text = std::string(),
bool  sync = true 
)

Indicates that the message transfers are unprocessable in some way.

A server may reject a message if it is unroutable. A client may reject a message if it is invalid. A message may be rejected for other reasons as well. Once a transfer is rejected, the command-id may no longer be referenced from other commands.

Parameters:
transfersIdentifies the messages previously transferred that should be rejected.
codeCode describing the reason for rejection.
textText describing the reason for rejection.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageRelease ( const SequenceSet &  transfers = SequenceSet(),
bool  setRedelivered = false,
bool  sync = true 
)

Release previously transferred messages.

When acquired messages are released, they become available for acquisition by any subscriber. Once a transfer is released, the command-id may no longer be referenced from other commands.

Parameters:
transfersIndicates the messages to be released.
setRedeliveredBy setting set-redelivered to true, any acquired messages released to a queue with this command will be marked as redelivered on their next transfer from that queue. If this flag is not set, then an acquired message will retain its original redelivered status on the queue. Messages that are not acquired are unaffected by the value of this flag.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::MessageResumeResult qpid::client::no_keyword::Session_0_10::messageResume ( const std::string destination = std::string(),
const std::string resumeId = std::string(),
bool  sync = true 
)

This command resumes an interrupted transfer.

The recipient should return the amount of partially transferred data associated with the given resume-id, or zero if there is no data at all. If a non-zero result is returned, the recipient should expect to receive message fragment(s) containing the remainder of the interrupted message.

Parameters:
destinationThe destination to which the remaining message fragments are transferred.
resumeIdThe name of the transfer being resumed.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageSetFlowMode ( const std::string destination = std::string(),
uint8_t  flowMode = 0,
bool  sync = true 
)

Sets the mode of flow control used for a given destination to either window or credit based flow control.

With credit based flow control, the sender of messages continually maintains its current credit balance with the recipient. The credit balance consists of two values, a message count, and a byte count. Whenever message data is sent, both counts must be decremented. If either value reaches zero, the flow of message data must stop. Additional credit is received via the message.flow command.

The sender MUST NOT send partial assemblies. This means that if there is not enough byte credit available to send a complete message, the sender must either wait or use message fragmentation (see the fragment-properties header struct) to send the first part of the message data in a complete assembly.

Window based flow control is identical to credit based flow control, however message transfer completion implicitly grants a single unit of message credit, and the size of the message in byte credits for each completed message transfer. Completion of the transfer command with session.completed is the only way credit is implicitly updated; message.accept, message.release, message.reject, tx.commit and tx.rollback have no effect on the outstanding credit balances.

Parameters:
destination
flowModeThe new flow control mode.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageStop ( const std::string destination = std::string(),
bool  sync = true 
)

On receipt of this command, a producer of messages MUST set his credit to zero for the given destination.

When notifying of completion, credit MUST be zero and no further messages will be sent until such a time as further credit is received.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageSubscribe ( const std::string queue = std::string(),
const std::string destination = std::string(),
uint8_t  acceptMode = 0,
uint8_t  acquireMode = 0,
bool  exclusive = false,
const std::string resumeId = std::string(),
uint64_t  resumeTtl = 0,
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
)

This command asks the server to start a "subscription", which is a request for messages from a specific queue.

Subscriptions last as long as the session they were created on, or until the client cancels them.

Parameters:
queueSpecifies the name of the subscribed queue.
destinationThe client specified name for the subscription. This is used as the destination for all messages transferred from this subscription. The destination is scoped to the session.
acceptModeThe accept-mode to use for messages transferred from this subscription.
acquireModeThe acquire-mode to use for messages transferred from this subscription.
exclusiveRequest an exclusive subscription. This prevents other subscribers from subscribing to the queue.
resumeIdRequests that the broker use the supplied resume-id when transferring messages for this subscription.
resumeTtlRequested duration in milliseconds for the broker use as resume-ttl when transferring messages for this subscription.
argumentsThe syntax and semantics of these arguments depends on the providers implementation.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::messageTransfer ( const std::string destination = std::string(),
uint8_t  acceptMode = 1,
uint8_t  acquireMode = 0,
const Message content = Message(std::string()),
bool  sync = true 
)

This command transfers a message between two peers.

When a client uses this command to publish a message to a broker, the destination identifies a specific exchange. The message will then be routed to queues as defined by the exchange configuration.

The client may request a broker to transfer messages to it, from a particular queue, by issuing a subscribe command. The subscribe command specifies the destination that the broker should use for any resulting transfers.

Parameters:
destinationSpecifies the destination to which the message is to be transferred.
acceptModeIndicates whether message.accept, session.complete, or nothing at all is required to indicate successful transfer of the message.
acquireModeIndicates whether or not the transferred message has been acquired.
contentMessage content
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

QPID_CLIENT_INLINE_EXTERN Session_0_10& qpid::client::no_keyword::Session_0_10::operator= ( const SessionBase_0_10 other)

Reimplemented in qpid::client::Session_0_10.

void qpid::client::no_keyword::Session_0_10::queueDeclare ( const std::string queue = std::string(),
const std::string alternateExchange = std::string(),
bool  passive = false,
bool  durable = false,
bool  exclusive = false,
bool  autoDelete = false,
const FieldTable &  arguments = FieldTable(),
bool  sync = true 
)

This command creates or checks a queue.

When creating a new queue the client can specify various properties that control the durability of the queue and its contents, and the level of sharing for the queue.

Parameters:
queue
alternateExchangeThe alternate-exchange field specifies how messages on this queue should be treated when they are rejected by a subscriber, or when they are orphaned by queue deletion. When present, rejected or orphaned messages MUST be routed to the alternate-exchange. In all cases the messages MUST be removed from the queue.
passiveIf set, the server will not create the queue. This field allows the client to assert the presence of a queue without modifying the server state.
durableIf set when creating a new queue, the queue will be marked as durable. Durable queues remain active when a server restarts. Non-durable queues (transient queues) are purged if/when a server restarts. Note that durable queues do not necessarily hold persistent messages, although it does not make sense to send persistent messages to a transient queue.
exclusiveExclusive queues can only be used from one session at a time. Once a session declares an exclusive queue, that queue cannot be used by any other session until the declaring session closes.
autoDeleteIf this field is set and the exclusive field is also set, then the queue MUST be deleted when the session closes.

If this field is set and the exclusive field is not set the queue is deleted when all the consumers have finished using it. Last consumer can be cancelled either explicitly or because its session is closed. If there was no consumer ever on the queue, it won't be deleted.

Parameters:
argumentsA set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored if passive is 1.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::queueDelete ( const std::string queue = std::string(),
bool  ifUnused = false,
bool  ifEmpty = false,
bool  sync = true 
)

This command deletes a queue.

When a queue is deleted any pending messages are sent to the alternate-exchange if defined, or discarded if it is not.

Parameters:
queueSpecifies the name of the queue to delete.
ifUnusedIf set, the server will only delete the queue if it has no consumers. If the queue has consumers the server does does not delete it but raises an exception instead.
ifEmptyIf set, the server will only delete the queue if it has no messages.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::queuePurge ( const std::string queue = std::string(),
bool  sync = true 
)

This command removes all messages from a queue.

It does not cancel subscribers. Purged messages are deleted without any formal "undo" mechanism.

Parameters:
queueSpecifies the name of the queue to purge.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

qpid::framing::QueueQueryResult qpid::client::no_keyword::Session_0_10::queueQuery ( const std::string queue = std::string(),
bool  sync = true 
)

This command requests information about a queue.

Parameters:
queue
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::SessionBase_0_10::resume ( Connection  ) [inherited]

Resume a suspended session with a new connection.

void qpid::client::SessionBase_0_10::sendCompletion ( ) [inherited]
void qpid::client::SessionBase_0_10::suspend ( ) [inherited]

Suspend the session - detach it from its connection.

void qpid::client::SessionBase_0_10::sync ( ) [inherited]

Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.

Note sync() is always synchronous, even on an AsyncSession object because that's almost always what you want. You can call AsyncSession::executionSync() directly in the unusual event that you want to do an asynchronous sync.

uint32_t qpid::client::SessionBase_0_10::timeout ( uint32_t  seconds) [inherited]

Set the timeout for this session.

void qpid::client::no_keyword::Session_0_10::txCommit ( bool  sync = true)

This command commits all messages published and accepted in the current transaction.

A new transaction starts immediately after a commit.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::txRollback ( bool  sync = true)

This command abandons the current transaction.

In particular the transfers from Client to Server (publishes) and accepts of transfers from Server to Client which occurred in the current transaction are discarded. A new transaction starts immediately after a rollback.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().

void qpid::client::no_keyword::Session_0_10::txSelect ( bool  sync = true)

This command sets the session to use standard transactions.

The client must use this command exactly once on a session before using the Commit or Rollback commands.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().


Member Data Documentation

boost::shared_ptr<SessionImpl> qpid::client::SessionBase_0_10::impl [protected, inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x62.html0000664000076400007640000001506711752725717022340 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00508_source.html0000664000076400007640000003100211752725717020676 0ustar00jrossjross00000000000000 qpid/framing/FragmentProperties.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/FragmentProperties.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_FRAGMENTPROPERTIES_H
00002 #define QPID_FRAMING_FRAGMENTPROPERTIES_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN FragmentProperties  {
00039     uint64_t fragmentSize;
00040     uint16_t flags;
00041 public:
00042     static const uint16_t TYPE = 1026;
00043     FragmentProperties(
00044         bool _first,
00045         bool _last,
00046         uint64_t _fragmentSize) : 
00047         fragmentSize(_fragmentSize),
00048         flags(0){
00049         setFirst(_first);
00050         setLast(_last);
00051         flags |= (1 << 10);
00052     }
00053     FragmentProperties()  : fragmentSize(0), flags(0) {}
00054     
00055     QPID_COMMON_EXTERN void setFirst(bool _first);
00056     QPID_COMMON_EXTERN bool getFirst() const;
00057     QPID_COMMON_EXTERN void setLast(bool _last);
00058     QPID_COMMON_EXTERN bool getLast() const;
00059     QPID_COMMON_EXTERN void setFragmentSize(uint64_t _fragmentSize);
00060     QPID_COMMON_EXTERN uint64_t getFragmentSize() const;
00061     QPID_COMMON_EXTERN bool hasFragmentSize() const;
00062     QPID_COMMON_EXTERN void clearFragmentSizeFlag();
00063     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const FragmentProperties&);
00064     QPID_COMMON_EXTERN void encode(Buffer&) const;
00065     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00066     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00067     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00068     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00069     QPID_COMMON_EXTERN uint32_t bodySize() const;
00070     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00071 }; /* class FragmentProperties */
00072 
00073 }}
00074 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00540.html0000664000076400007640000001301111752725717017312 0ustar00jrossjross00000000000000 qpid/sys/Mutex.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Mutex.h File Reference
#include "posix/Mutex.h"

Go to the source code of this file.

Classes

class  qpid::sys::ScopedLock
 Scoped lock template: calls lock() in ctor, unlock() in dtor. More...
class  qpid::sys::ScopedUnlock
class  qpid::sys::ScopedRlock
class  qpid::sys::ScopedWlock
class  qpid::sys::ConditionalScopedLock

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x66.html0000664000076400007640000002333311752725717022317 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x69.html0000664000076400007640000001622711752725717022346 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00477_source.html0000664000076400007640000003760611752725717020723 0ustar00jrossjross00000000000000 qpid/messaging/Session.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Session.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_SESSION_H
00002 #define QPID_MESSAGING_SESSION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/messaging/ImportExport.h"
00025 
00026 #include "qpid/messaging/exceptions.h"
00027 #include "qpid/messaging/Duration.h"
00028 #include "qpid/messaging/Handle.h"
00029 
00030 #include <string>
00031 
00032 namespace qpid {
00033 namespace messaging {
00034 
00035 #ifndef SWIG
00036 template <class> class PrivateImplRef;
00037 #endif
00038 class Address;
00039 class Connection;
00040 class Message;
00041 class Sender;
00042 class Receiver;
00043 class SessionImpl;
00044 
00049 class QPID_MESSAGING_CLASS_EXTERN Session : public qpid::messaging::Handle<SessionImpl>
00050 {
00051   public:
00052     QPID_MESSAGING_EXTERN Session(SessionImpl* impl = 0);
00053     QPID_MESSAGING_EXTERN Session(const Session&);
00054     QPID_MESSAGING_EXTERN ~Session();
00055     QPID_MESSAGING_EXTERN Session& operator=(const Session&);
00056 
00063     QPID_MESSAGING_EXTERN void close();
00064 
00071     QPID_MESSAGING_EXTERN void commit();
00072     QPID_MESSAGING_EXTERN void rollback();
00073 
00081     QPID_MESSAGING_EXTERN void acknowledge(bool sync=false);
00085     QPID_MESSAGING_EXTERN void acknowledge(Message&, bool sync=false);
00089     QPID_MESSAGING_EXTERN void acknowledgeUpTo(Message&, bool sync=false);
00095     QPID_MESSAGING_EXTERN void reject(Message&);
00101     QPID_MESSAGING_EXTERN void release(Message&);
00102 
00111     QPID_MESSAGING_EXTERN void sync(bool block=true);
00112 
00119     QPID_MESSAGING_EXTERN uint32_t getReceivable();
00125     QPID_MESSAGING_EXTERN uint32_t getUnsettledAcks();
00134     QPID_MESSAGING_EXTERN bool nextReceiver(Receiver&, Duration timeout=Duration::FOREVER);
00143     QPID_MESSAGING_EXTERN Receiver nextReceiver(Duration timeout=Duration::FOREVER);
00144     
00152     QPID_MESSAGING_EXTERN Sender createSender(const Address& address);
00163     QPID_MESSAGING_EXTERN Sender createSender(const std::string& address);
00164 
00172     QPID_MESSAGING_EXTERN Receiver createReceiver(const Address& address);
00183     QPID_MESSAGING_EXTERN Receiver createReceiver(const std::string& address);
00184 
00189     QPID_MESSAGING_EXTERN Sender getSender(const std::string& name) const;
00194     QPID_MESSAGING_EXTERN Receiver getReceiver(const std::string& name) const;
00199     QPID_MESSAGING_EXTERN Connection getConnection() const;
00200 
00205     QPID_MESSAGING_EXTERN bool hasError();
00211     QPID_MESSAGING_EXTERN void checkError();
00212 
00213 #ifndef SWIG
00214   private:
00215   friend class qpid::messaging::PrivateImplRef<Session>;
00216 #endif
00217 };
00218 }} // namespace qpid::messaging
00219 
00220 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00411.html0000664000076400007640000001101711752725717017313 0ustar00jrossjross00000000000000 qmf/DataAddr.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/DataAddr.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::DataAddr

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00192.html0000664000076400007640000006342011752725720017320 0ustar00jrossjross00000000000000 qpid::framing::ListValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ListValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Types

typedef List ValueType

Public Member Functions

 ListValue (const List &)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Member Typedef Documentation

Definition at line 450 of file FieldValue.h.


Constructor & Destructor Documentation

qpid::framing::ListValue::ListValue ( const List )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00485_source.html0000664000076400007640000001657011752725717020717 0ustar00jrossjross00000000000000 qpid/console/ConsoleImportExport.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/ConsoleImportExport.h
Go to the documentation of this file.
00001 #ifndef QPID_CONSOLE_IMPORT_EXPORT_H
00002 #define QPID_CONSOLE_IMPORT_EXPORT_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include "qpid/ImportExport.h"
00024 
00025 #if defined(CONSOLE_EXPORT) || defined (qmfconsole_EXPORTS)
00026 #  define QPID_CONSOLE_EXTERN QPID_EXPORT
00027 #  define QPID_CONSOLE_CLASS_EXTERN QPID_CLASS_EXPORT
00028 #  define QPID_CONSOLE_INLINE_EXTERN QPID_INLINE_EXPORT
00029 #else
00030 #  define QPID_CONSOLE_EXTERN QPID_IMPORT
00031 #  define QPID_CONSOLE_CLASS_EXTERN QPID_CLASS_IMPORT
00032 #  define QPID_CONSOLE_INLINE_EXTERN QPID_INLINE_IMPORT
00033 #endif
00034 
00035 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00291.html0000664000076400007640000001036211752725720017315 0ustar00jrossjross00000000000000 std::vector::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::vector::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00856.html0000664000076400007640000001412011752725720017320 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::FetchError Member List
This is the complete list of members for qpid::messaging::FetchError, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
FetchError(const std::string &)qpid::messaging::FetchError
LinkError(const std::string &)qpid::messaging::LinkError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
ReceiverError(const std::string &)qpid::messaging::ReceiverError
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00406_source.html0000664000076400007640000003243011752725717020701 0ustar00jrossjross00000000000000 qmf/AgentEvent.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/AgentEvent.h
Go to the documentation of this file.
00001 #ifndef QMF_AGENT_EVENT_H
00002 #define QMF_AGENT_EVENT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qpid/types/Variant.h"
00027 
00028 namespace qmf {
00029 
00030 #ifndef SWIG
00031     template <class> class PrivateImplRef;
00032 #endif
00033 
00034     class AgentEventImpl;
00035     class Query;
00036     class DataAddr;
00037 
00038     enum AgentEventCode {
00039     AGENT_AUTH_QUERY      = 1,
00040     AGENT_AUTH_SUBSCRIBE  = 2,
00041     AGENT_QUERY           = 3,
00042     AGENT_METHOD          = 4,
00043     AGENT_SUBSCRIBE_BEGIN = 5,
00044     AGENT_SUBSCRIBE_TOUCH = 6,
00045     AGENT_SUBSCRIBE_END   = 7,
00046     AGENT_THREAD_FAILED   = 8
00047     };
00048 
00049     class QMF_CLASS_EXTERN AgentEvent : public qmf::Handle<AgentEventImpl> {
00050     public:
00051         QMF_EXTERN AgentEvent(AgentEventImpl* impl = 0);
00052         QMF_EXTERN AgentEvent(const AgentEvent&);
00053         QMF_EXTERN AgentEvent& operator=(const AgentEvent&);
00054         QMF_EXTERN ~AgentEvent();
00055 
00056         QMF_EXTERN AgentEventCode getType() const;
00057         QMF_EXTERN const std::string& getUserId() const;
00058         QMF_EXTERN Query getQuery() const;
00059         QMF_EXTERN bool hasDataAddr() const;
00060         QMF_EXTERN DataAddr getDataAddr() const;
00061         QMF_EXTERN const std::string& getMethodName() const;
00062         QMF_EXTERN qpid::types::Variant::Map& getArguments();
00063         QMF_EXTERN qpid::types::Variant::Map& getArgumentSubtypes();
00064         QMF_EXTERN void addReturnArgument(const std::string&, const qpid::types::Variant&, const std::string& st="");
00065 
00066 #ifndef SWIG
00067     private:
00068         friend class qmf::PrivateImplRef<AgentEvent>;
00069         friend struct AgentEventImplAccess;
00070 #endif
00071     };
00072 }
00073 
00074 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00073.html0000664000076400007640000001040211752725720017306 0ustar00jrossjross00000000000000 std::basic_string::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_string::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00531_source.html0000664000076400007640000004071011752725717020700 0ustar00jrossjross00000000000000 qpid/Options.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Options.h
Go to the documentation of this file.
00001 #ifndef QPID_COMMONOPTIONS_H
00002 #define QPID_COMMONOPTIONS_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/Exception.h"
00026 
00027 // Disable warnings triggered by boost.
00028 #ifdef _MSC_VER
00029 #  pragma warning(push)
00030 #  pragma warning(disable : 4251 4275)
00031 #endif
00032 
00033 #include <boost/program_options.hpp>
00034 #include <boost/format.hpp>
00035 
00036 #ifdef _MSC_VER
00037 #  pragma warning(pop)
00038 #endif
00039 
00040 #include <sstream>
00041 #include <iterator>
00042 #include <algorithm>
00043 #include <string>
00044 #include "qpid/CommonImportExport.h"
00045 
00046 namespace qpid {
00047 namespace po=boost::program_options;
00048 
00049 
00050 
00052 QPID_COMMON_EXTERN std::string prettyArg(const std::string&, const std::string&);
00053 
00055 template <class T>
00056 class OptionValue : public po::typed_value<T> {
00057   public:
00058     OptionValue(T& value, const std::string& arg)
00059         : po::typed_value<T>(&value), argName(arg) {}
00060     std::string name() const { return argName; }
00061 
00062   private:
00063     std::string argName;
00064 };
00065 
00066 
00073 template<class T>
00074 po::value_semantic* optValue(T& value, const char* name) {
00075     std::string valstr(boost::lexical_cast<std::string>(value));
00076     return new OptionValue<T>(value, prettyArg(name, valstr));
00077 }
00078 
00082 template <class T>
00083 po::value_semantic* optValue(std::vector<T>& value, const char* name) {
00084     using namespace std;
00085     ostringstream os;
00086     copy(value.begin(), value.end(), ostream_iterator<T>(os, " "));
00087     string val=os.str();
00088     if (!val.empty())
00089         val.erase(val.end()-1); // Remove trailing " "
00090     return (new OptionValue<vector<T> >(value, prettyArg(name, val)));
00091 }
00092 
00094 inline po::value_semantic* optValue(bool& value) { return po::bool_switch(&value); }
00095 
00136 struct Options : public po::options_description {
00137 
00138     struct Exception : public qpid::Exception {
00139         Exception(const std::string& msg) : qpid::Exception(msg) {}
00140     };
00141 
00142     QPID_COMMON_EXTERN Options(const std::string& name=std::string());
00143 
00149     QPID_COMMON_EXTERN void parse(int argc, char const* const* argv,
00150                const std::string& configfile=std::string(),
00151                bool  allowUnknown = false);
00152 
00153 
00154   boost::program_options::options_description_easy_init addOptions() {
00155       return add_options();
00156   }
00157 };
00158 
00159 
00160 
00164 struct CommonOptions : public Options {
00165     QPID_COMMON_EXTERN CommonOptions(const std::string& name=std::string(),
00166                   const std::string& configfile=std::string());
00167     bool help;
00168     bool version;
00169     std::string config;
00170 };
00171 
00172 
00173 
00174 
00175 } // namespace qpid
00176 
00177 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00010.html0000664000076400007640000004755411752725717017325 0ustar00jrossjross00000000000000 qmf::engine::AgentEvent Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::AgentEvent Struct Reference

AgentEvent. More...

#include <qmf/engine/Agent.h>

List of all members.

Public Types

enum  EventKind {
  GET_QUERY = 1, START_SYNC = 2, END_SYNC = 3, METHOD_CALL = 4,
  DECLARE_QUEUE = 5, DELETE_QUEUE = 6, BIND = 7, UNBIND = 8,
  SETUP_COMPLETE = 9
}

Public Attributes

EventKind kind
uint32_t sequence
char * authUserId
char * authToken
char * name
Objectobject
ObjectIdobjectId
Queryquery
Valuearguments
char * exchange
char * bindingKey
const SchemaObjectClassobjectClass

Detailed Description

AgentEvent.

This structure represents a QMF event coming from the agent to the application.


Member Enumeration Documentation

Enumerator:
GET_QUERY 
START_SYNC 
END_SYNC 
METHOD_CALL 
DECLARE_QUEUE 
DELETE_QUEUE 
BIND 
UNBIND 
SETUP_COMPLETE 

Definition at line 41 of file Agent.h.


Member Data Documentation

Definition at line 62 of file Agent.h.

Definition at line 56 of file Agent.h.

Definition at line 55 of file Agent.h.

Definition at line 64 of file Agent.h.

Definition at line 63 of file Agent.h.

Definition at line 53 of file Agent.h.

Definition at line 57 of file Agent.h.

Definition at line 59 of file Agent.h.

Definition at line 60 of file Agent.h.

Definition at line 61 of file Agent.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00114.html0000664000076400007640000002646211752725717017325 0ustar00jrossjross00000000000000 qpid::Exception Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Exception Class Reference

Base class for Qpid runtime exceptions. More...

#include <qpid/Exception.h>

List of all members.

Public Member Functions

 Exception (const std::string &message=std::string()) throw ()
virtual ~Exception () throw ()
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Detailed Description

Base class for Qpid runtime exceptions.


Constructor & Destructor Documentation

qpid::Exception::Exception ( const std::string message = std::string()) throw () [explicit]

Reimplemented in qpid::Options::Exception.

virtual qpid::Exception::~Exception ( ) throw () [virtual]

Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual]
virtual const char* qpid::Exception::what ( ) const throw () [virtual]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00550_source.html0000664000076400007640000001523211752725717020702 0ustar00jrossjross00000000000000 qpid/sys/Condition.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Condition.h
Go to the documentation of this file.
00001 #ifndef _sys_Condition_h
00002 #define _sys_Condition_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #ifdef USE_APR_PLATFORM
00026 #include "apr/Condition.h"
00027 #elif defined (_WIN32)
00028 #include "windows/Condition.h"
00029 #else
00030 #include "posix/Condition.h"
00031 #endif
00032 
00033 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00692.html0000664000076400007640000001103511752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::MessageListener Member List
This is the complete list of members for qpid::client::MessageListener, including all inherited members.
received(Message &msg)=0qpid::client::MessageListener [pure virtual]
~MessageListener()qpid::client::MessageListener [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00006.html0000664000076400007640000002732011752725720017311 0ustar00jrossjross00000000000000 qpid::console::Agent Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Agent Class Reference

#include <qpid/console/Agent.h>

List of all members.

Public Types

typedef std::vector< Agent * > Vector

Public Member Functions

QPID_CONSOLE_INLINE_EXTERN Agent (Broker *_broker, uint32_t _bank, const std::string &_label)
QPID_CONSOLE_INLINE_EXTERN BrokergetBroker () const
QPID_CONSOLE_INLINE_EXTERN uint32_t getBrokerBank () const
QPID_CONSOLE_INLINE_EXTERN uint32_t getAgentBank () const
QPID_CONSOLE_INLINE_EXTERN
const std::string
getLabel () const

Member Typedef Documentation

Definition at line 36 of file Agent.h.


Constructor & Destructor Documentation

QPID_CONSOLE_INLINE_EXTERN qpid::console::Agent::Agent ( Broker _broker,
uint32_t  _bank,
const std::string _label 
) [inline]

Definition at line 38 of file Agent.h.


Member Function Documentation

QPID_CONSOLE_INLINE_EXTERN uint32_t qpid::console::Agent::getAgentBank ( ) const [inline]

Definition at line 43 of file Agent.h.

QPID_CONSOLE_INLINE_EXTERN Broker* qpid::console::Agent::getBroker ( ) const [inline]

Definition at line 41 of file Agent.h.

QPID_CONSOLE_INLINE_EXTERN uint32_t qpid::console::Agent::getBrokerBank ( ) const [inline]

Definition at line 42 of file Agent.h.

QPID_CONSOLE_INLINE_EXTERN const std::string& qpid::console::Agent::getLabel ( ) const [inline]

Definition at line 44 of file Agent.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00008.html0000664000076400007640000001746511752725720017324 0ustar00jrossjross00000000000000 qpid::management::AgentAttachment Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::AgentAttachment Class Reference

#include <qpid/management/ManagementObject.h>

List of all members.

Public Member Functions

 AgentAttachment ()
void setBanks (uint32_t broker, uint32_t bank)
uint64_t getFirst () const

Constructor & Destructor Documentation

qpid::management::AgentAttachment::AgentAttachment ( ) [inline]

Definition at line 45 of file ManagementObject.h.


Member Function Documentation

uint64_t qpid::management::AgentAttachment::getFirst ( ) const [inline]

Definition at line 47 of file ManagementObject.h.

void qpid::management::AgentAttachment::setBanks ( uint32_t  broker,
uint32_t  bank 
)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_type.html0000664000076400007640000002721011752725717021560 0ustar00jrossjross00000000000000 Class Members - Typedefs
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- a -

- c -

- f -

- i -

- k -

- l -

- m -

- n -

- o -

- p -

- r -

- s -

- v -

- w -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00571.html0000664000076400007640000012325511752725717017332 0ustar00jrossjross00000000000000 qmf Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf Namespace Reference

Namespaces

namespace  engine
namespace  posix

Classes

class  Agent
class  AgentEvent
class  AgentSession
class  ConsoleEvent
class  ConsoleSession
class  Data
class  DataAddr
struct  QmfException
struct  KeyNotFound
struct  IndexOutOfRange
struct  OperationTimedOut
class  Handle
 A handle is like a pointer: refers to an underlying implementation object. More...
class  Query
class  Schema
class  SchemaId
class  SchemaMethod
class  SchemaProperty
class  Subscription

Enumerations

enum  AgentEventCode {
  AGENT_AUTH_QUERY = 1, AGENT_AUTH_SUBSCRIBE = 2, AGENT_QUERY = 3, AGENT_METHOD = 4,
  AGENT_SUBSCRIBE_BEGIN = 5, AGENT_SUBSCRIBE_TOUCH = 6, AGENT_SUBSCRIBE_END = 7, AGENT_THREAD_FAILED = 8
}
enum  ConsoleEventCode {
  CONSOLE_AGENT_ADD = 1, CONSOLE_AGENT_DEL = 2, CONSOLE_AGENT_RESTART = 3, CONSOLE_AGENT_SCHEMA_UPDATE = 4,
  CONSOLE_AGENT_SCHEMA_RESPONSE = 5, CONSOLE_EVENT = 6, CONSOLE_QUERY_RESPONSE = 7, CONSOLE_METHOD_RESPONSE = 8,
  CONSOLE_EXCEPTION = 9, CONSOLE_SUBSCRIBE_ADD = 10, CONSOLE_SUBSCRIBE_UPDATE = 11, CONSOLE_SUBSCRIBE_DEL = 12,
  CONSOLE_THREAD_FAILED = 13
}
enum  AgentDelReason { AGENT_DEL_AGED = 1, AGENT_DEL_FILTER = 2 }
enum  QueryTarget { QUERY_OBJECT = 1, QUERY_OBJECT_ID = 2, QUERY_SCHEMA = 3, QUERY_SCHEMA_ID = 4 }

Variables

const int SCHEMA_TYPE_DATA = 1
const int SCHEMA_TYPE_EVENT = 2
const int SCHEMA_DATA_VOID = 1
const int SCHEMA_DATA_BOOL = 2
const int SCHEMA_DATA_INT = 3
const int SCHEMA_DATA_FLOAT = 4
const int SCHEMA_DATA_STRING = 5
const int SCHEMA_DATA_MAP = 6
const int SCHEMA_DATA_LIST = 7
const int SCHEMA_DATA_UUID = 8
const int ACCESS_READ_CREATE = 1
const int ACCESS_READ_WRITE = 2
const int ACCESS_READ_ONLY = 3
const int DIR_IN = 1
const int DIR_OUT = 2
const int DIR_IN_OUT = 3
const int SEV_EMERG = 0
const int SEV_ALERT = 1
const int SEV_CRIT = 2
const int SEV_ERROR = 3
const int SEV_WARN = 4
const int SEV_NOTICE = 5
const int SEV_INFORM = 6
const int SEV_DEBUG = 7

Enumeration Type Documentation

Enumerator:
AGENT_DEL_AGED 
AGENT_DEL_FILTER 

Definition at line 55 of file ConsoleEvent.h.

Enumerator:
AGENT_AUTH_QUERY 
AGENT_AUTH_SUBSCRIBE 
AGENT_QUERY 
AGENT_METHOD 
AGENT_SUBSCRIBE_BEGIN 
AGENT_SUBSCRIBE_TOUCH 
AGENT_SUBSCRIBE_END 
AGENT_THREAD_FAILED 

Definition at line 38 of file AgentEvent.h.

Enumerator:
CONSOLE_AGENT_ADD 
CONSOLE_AGENT_DEL 
CONSOLE_AGENT_RESTART 
CONSOLE_AGENT_SCHEMA_UPDATE 
CONSOLE_AGENT_SCHEMA_RESPONSE 
CONSOLE_EVENT 
CONSOLE_QUERY_RESPONSE 
CONSOLE_METHOD_RESPONSE 
CONSOLE_EXCEPTION 
CONSOLE_SUBSCRIBE_ADD 
CONSOLE_SUBSCRIBE_UPDATE 
CONSOLE_SUBSCRIBE_DEL 
CONSOLE_THREAD_FAILED 

Definition at line 39 of file ConsoleEvent.h.

Enumerator:
QUERY_OBJECT 
QUERY_OBJECT_ID 
QUERY_SCHEMA 
QUERY_SCHEMA_ID 

Definition at line 39 of file Query.h.


Variable Documentation

const int qmf::ACCESS_READ_CREATE = 1

Definition at line 38 of file SchemaTypes.h.

const int qmf::ACCESS_READ_ONLY = 3

Definition at line 40 of file SchemaTypes.h.

const int qmf::ACCESS_READ_WRITE = 2

Definition at line 39 of file SchemaTypes.h.

const int qmf::DIR_IN = 1

Definition at line 42 of file SchemaTypes.h.

const int qmf::DIR_IN_OUT = 3

Definition at line 44 of file SchemaTypes.h.

const int qmf::DIR_OUT = 2

Definition at line 43 of file SchemaTypes.h.

const int qmf::SCHEMA_DATA_BOOL = 2

Definition at line 30 of file SchemaTypes.h.

const int qmf::SCHEMA_DATA_FLOAT = 4

Definition at line 32 of file SchemaTypes.h.

const int qmf::SCHEMA_DATA_INT = 3

Definition at line 31 of file SchemaTypes.h.

const int qmf::SCHEMA_DATA_LIST = 7

Definition at line 35 of file SchemaTypes.h.

const int qmf::SCHEMA_DATA_MAP = 6

Definition at line 34 of file SchemaTypes.h.

const int qmf::SCHEMA_DATA_STRING = 5

Definition at line 33 of file SchemaTypes.h.

const int qmf::SCHEMA_DATA_UUID = 8

Definition at line 36 of file SchemaTypes.h.

const int qmf::SCHEMA_DATA_VOID = 1

Definition at line 29 of file SchemaTypes.h.

const int qmf::SCHEMA_TYPE_DATA = 1

Definition at line 26 of file SchemaTypes.h.

const int qmf::SCHEMA_TYPE_EVENT = 2

Definition at line 27 of file SchemaTypes.h.

const int qmf::SEV_ALERT = 1

Definition at line 47 of file SchemaTypes.h.

const int qmf::SEV_CRIT = 2

Definition at line 48 of file SchemaTypes.h.

const int qmf::SEV_DEBUG = 7

Definition at line 53 of file SchemaTypes.h.

const int qmf::SEV_EMERG = 0

Definition at line 46 of file SchemaTypes.h.

const int qmf::SEV_ERROR = 3

Definition at line 49 of file SchemaTypes.h.

const int qmf::SEV_INFORM = 6

Definition at line 52 of file SchemaTypes.h.

const int qmf::SEV_NOTICE = 5

Definition at line 51 of file SchemaTypes.h.

const int qmf::SEV_WARN = 4

Definition at line 50 of file SchemaTypes.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_eval.html0000664000076400007640000003345311752725717021534 0ustar00jrossjross00000000000000 Class Members - Enumerator
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- a -

- b -

- c -

- d -

- e -

- f -

- g -

- h -

- l -

- m -

- n -

- o -

- q -

- r -

- s -

- t -

- u -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00646.html0000664000076400007640000001405311752725717017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaEventClass Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00332.html0000664000076400007640000001050711752725717017320 0ustar00jrossjross00000000000000 qmf::engine::SessionHandle Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SessionHandle Class Reference

#include <qmf/engine/ResilientConnection.h>

List of all members.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00448_source.html0000664000076400007640000003052711752725717020714 0ustar00jrossjross00000000000000 qmf/SchemaTypes.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/SchemaTypes.h
Go to the documentation of this file.
00001 #ifndef QMF_SCHEMA_TYPES_H
00002 #define QMF_SCHEMA_TYPES_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 namespace qmf {
00025 
00026     const int SCHEMA_TYPE_DATA = 1;
00027     const int SCHEMA_TYPE_EVENT = 2;
00028 
00029     const int SCHEMA_DATA_VOID = 1;
00030     const int SCHEMA_DATA_BOOL = 2;
00031     const int SCHEMA_DATA_INT = 3;
00032     const int SCHEMA_DATA_FLOAT = 4;
00033     const int SCHEMA_DATA_STRING = 5;
00034     const int SCHEMA_DATA_MAP = 6;
00035     const int SCHEMA_DATA_LIST = 7;
00036     const int SCHEMA_DATA_UUID = 8;
00037 
00038     const int ACCESS_READ_CREATE = 1;
00039     const int ACCESS_READ_WRITE = 2;
00040     const int ACCESS_READ_ONLY = 3;
00041 
00042     const int DIR_IN = 1;
00043     const int DIR_OUT = 2;
00044     const int DIR_IN_OUT = 3;
00045 
00046     const int SEV_EMERG = 0;
00047     const int SEV_ALERT = 1;
00048     const int SEV_CRIT = 2;
00049     const int SEV_ERROR = 3;
00050     const int SEV_WARN = 4;
00051     const int SEV_NOTICE = 5;
00052     const int SEV_INFORM = 6;
00053     const int SEV_DEBUG = 7;
00054 }
00055 
00056 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00848.html0000664000076400007640000001320011752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::KeyError Member List
This is the complete list of members for qpid::messaging::KeyError, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
KeyError(const std::string &)qpid::messaging::KeyError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00450.html0000664000076400007640000001234711752725717017325 0ustar00jrossjross00000000000000 qpid/client/Subscription.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Subscription.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::Subscription
 A handle to an active subscription. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00330.html0000664000076400007640000001714711752725720017317 0ustar00jrossjross00000000000000 qpid::messaging::SessionError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::SessionError Struct Reference

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 SessionError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qpid::messaging::SessionError::SessionError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00536.html0000664000076400007640000001165211752725717017330 0ustar00jrossjross00000000000000 qpid/management/Manageable.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/Manageable.h File Reference
#include "qpid/management/ManagementObject.h"
#include "qpid/management/Args.h"
#include <string>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::management::Manageable

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::management

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00129.html0000664000076400007640000003753211752725720017325 0ustar00jrossjross00000000000000 qpid::framing::FixedWidthValue< 0 > Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FixedWidthValue< 0 > Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

uint32_t encodedSize () const
void encode (Buffer &)
void decode (Buffer &)
bool operator== (const Data &d) const
void print (std::ostream &o) const
virtual bool operator== (const Data &) const =0
virtual bool convertsToInt () const
virtual bool convertsToString () const
virtual int64_t getInt () const
virtual std::string getString () const

Member Function Documentation

virtual bool qpid::framing::FieldValue::Data::convertsToInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::FixedWidthValue.

Definition at line 75 of file FieldValue.h.

virtual bool qpid::framing::FieldValue::Data::convertsToString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::VariableWidthValue.

Definition at line 76 of file FieldValue.h.

void qpid::framing::FixedWidthValue< 0 >::decode ( Buffer ) [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 252 of file FieldValue.h.

void qpid::framing::FixedWidthValue< 0 >::encode ( Buffer ) [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 251 of file FieldValue.h.

uint32_t qpid::framing::FixedWidthValue< 0 >::encodedSize ( ) const [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 250 of file FieldValue.h.

virtual int64_t qpid::framing::FieldValue::Data::getInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::FixedWidthValue.

Definition at line 77 of file FieldValue.h.

virtual std::string qpid::framing::FieldValue::Data::getString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::VariableWidthValue.

Definition at line 78 of file FieldValue.h.

virtual bool qpid::framing::FieldValue::Data::operator== ( const Data ) const [pure virtual, inherited]
bool qpid::framing::FixedWidthValue< 0 >::operator== ( const Data &  d) const [inline]

Definition at line 253 of file FieldValue.h.

void qpid::framing::FixedWidthValue< 0 >::print ( std::ostream o) const [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 257 of file FieldValue.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00787.html0000664000076400007640000001421611752725720017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ProtocolVersion Member List
This is the complete list of members for qpid::framing::ProtocolVersion, including all inherited members.
getMajor() const qpid::framing::ProtocolVersion [inline]
getMinor() const qpid::framing::ProtocolVersion [inline]
operator!=(ProtocolVersion p) const qpid::framing::ProtocolVersion [inline]
operator=(ProtocolVersion p)qpid::framing::ProtocolVersion
operator==(ProtocolVersion p) const qpid::framing::ProtocolVersion
ProtocolVersion(uint8_t _major=0, uint8_t _minor=0)qpid::framing::ProtocolVersion [inline, explicit]
setMajor(uint8_t major)qpid::framing::ProtocolVersion [inline]
setMinor(uint8_t minor)qpid::framing::ProtocolVersion [inline]
toString() const qpid::framing::ProtocolVersion

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00615.html0000664000076400007640000002121211752725717017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::SchemaMethod Member List
This is the complete list of members for qmf::SchemaMethod, including all inherited members.
addArgument(const SchemaProperty &)qmf::SchemaMethod
getArgument(uint32_t) const qmf::SchemaMethod
getArgumentCount() const qmf::SchemaMethod
getDesc() const qmf::SchemaMethod
getName() const qmf::SchemaMethod
Handle()qmf::Handle< SchemaMethodImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< SchemaMethodImpl > [protected]
Impl typedefqmf::Handle< SchemaMethodImpl > [protected]
implqmf::Handle< SchemaMethodImpl > [protected]
isNull() const qmf::Handle< SchemaMethodImpl > [inline]
isValid() const qmf::Handle< SchemaMethodImpl > [inline]
operator bool() const qmf::Handle< SchemaMethodImpl > [inline]
operator!() const qmf::Handle< SchemaMethodImpl > [inline]
operator=(const SchemaMethod &)qmf::SchemaMethod
Handle< SchemaMethodImpl >::operator=(const Handle &)qmf::Handle< SchemaMethodImpl > [protected]
SchemaMethod(SchemaMethodImpl *impl=0)qmf::SchemaMethod
SchemaMethod(const SchemaMethod &)qmf::SchemaMethod
SchemaMethod(const std::string &, const std::string &o="")qmf::SchemaMethod
setDesc(const std::string &)qmf::SchemaMethod
swap(Handle< T > &h)qmf::Handle< SchemaMethodImpl > [inline]
~SchemaMethod()qmf::SchemaMethod

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00822.html0000664000076400007640000001430611752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::SinkOptions Member List
This is the complete list of members for qpid::log::SinkOptions, including all inherited members.
addOptions()qpid::Options [inline]
create(const std::string &argv0=std::string())qpid::log::SinkOptions [static]
detached(void)=0qpid::log::SinkOptions [pure virtual]
operator=(const SinkOptions &)=0qpid::log::SinkOptions [pure virtual]
Options(const std::string &name=std::string())qpid::Options
parse(int argc, char const *const *argv, const std::string &configfile=std::string(), bool allowUnknown=false)qpid::Options
setup(Logger *logger)=0qpid::log::SinkOptions [pure virtual]
SinkOptions(const std::string &name="Logging sink options")qpid::log::SinkOptions [inline]
~SinkOptions()qpid::log::SinkOptions [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00202.html0000664000076400007640000001303311752725720017303 0ustar00jrossjross00000000000000 std::map Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::map Class Reference

STL class. More...

List of all members.

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00581.html0000664000076400007640000002146111752725720017321 0ustar00jrossjross00000000000000 qpid::framing::cluster Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::cluster Namespace Reference

Enumerations

enum  StoreState { STORE_STATE_NO_STORE = 0, STORE_STATE_EMPTY_STORE = 1, STORE_STATE_CLEAN_STORE = 2, STORE_STATE_DIRTY_STORE = 3 }
enum  ErrorType { ERROR_TYPE_NONE = 0, ERROR_TYPE_SESSION = 1, ERROR_TYPE_CONNECTION = 2 }

Enumeration Type Documentation

Enumerator:
ERROR_TYPE_NONE 
ERROR_TYPE_SESSION 
ERROR_TYPE_CONNECTION 

Definition at line 180 of file enum.h.

Enumerator:
STORE_STATE_NO_STORE 
STORE_STATE_EMPTY_STORE 
STORE_STATE_CLEAN_STORE 
STORE_STATE_DIRTY_STORE 

Definition at line 174 of file enum.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00697.html0000664000076400007640000001670211752725717017341 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::SessionBase_0_10 Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00839.html0000664000076400007640000005604011752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ManagementObject Member List
This is the complete list of members for qpid::management::ManagementObject, including all inherited members.
ACCESS_RCqpid::management::ManagementItem [static]
ACCESS_ROqpid::management::ManagementItem [static]
ACCESS_RWqpid::management::ManagementItem [static]
accessLockqpid::management::ManagementObject [mutable, protected]
CLASS_KIND_EVENTqpid::management::ManagementItem [static]
CLASS_KIND_TABLEqpid::management::ManagementItem [static]
configChangedqpid::management::ManagementObject [mutable, protected]
coreObjectqpid::management::ManagementObject [protected]
createTimeqpid::management::ManagementObject [protected]
deletedqpid::management::ManagementObject [protected]
destroyTimeqpid::management::ManagementObject [protected]
DIR_Iqpid::management::ManagementItem [static]
DIR_IOqpid::management::ManagementItem [static]
DIR_Oqpid::management::ManagementItem [static]
doMethod(std::string &methodName, const types::Variant::Map &inMap, types::Variant::Map &outMap, const std::string &userId)=0qpid::management::ManagementObject [pure virtual]
doMethod(std::string &, const std::string &, std::string &, const std::string &)qpid::management::ManagementObject [inline, virtual]
FLAG_CONFIGqpid::management::ManagementItem [static]
FLAG_ENDqpid::management::ManagementItem [static]
FLAG_INDEXqpid::management::ManagementItem [static]
flagsqpid::management::ManagementObject [protected]
forcePublishqpid::management::ManagementObject [protected]
getClassName() const =0qpid::management::ManagementObject [pure virtual]
getConfigChanged()qpid::management::ManagementObject [inline]
getFlags()qpid::management::ManagementObject [inline]
getForcePublish()qpid::management::ManagementObject [inline]
getInstChanged()qpid::management::ManagementObject [inline, virtual]
getKey() const =0qpid::management::ManagementObject [pure virtual]
getMd5Sum() const =0qpid::management::ManagementObject [pure virtual]
getObjectId()qpid::management::ManagementObject [inline]
getPackageName() const =0qpid::management::ManagementObject [pure virtual]
getThreadIndex()qpid::management::ManagementObject [protected]
getWriteSchemaCall()=0qpid::management::ManagementObject [pure virtual]
hasInst()qpid::management::ManagementObject [inline, virtual]
instChangedqpid::management::ManagementObject [mutable, protected]
isDeleted()qpid::management::ManagementObject [inline]
isSameClass(ManagementObject &other)qpid::management::ManagementObject [inline]
ManagementObject(Manageable *_core)qpid::management::ManagementObject
mapDecodeValues(const types::Variant::Map &map)=0qpid::management::ManagementObject [pure virtual]
mapEncodeValues(types::Variant::Map &map, bool includeProperties, bool includeStatistics)=0qpid::management::ManagementObject [pure virtual]
maxThreadsqpid::management::ManagementObject [static]
MD5_LENqpid::management::ManagementObject [static]
nextThreadIndexqpid::management::ManagementObject [protected, static]
objectIdqpid::management::ManagementObject [protected]
readProperties(const std::string &)qpid::management::ManagementObject [inline, virtual]
readTimestamps(const std::string &buf)qpid::management::ManagementObject [protected]
readTimestamps(const types::Variant::Map &buf)qpid::management::ManagementObject
resourceDestroy()qpid::management::ManagementObject
setFlags(uint32_t f)qpid::management::ManagementObject [inline]
setForcePublish(bool f)qpid::management::ManagementObject [inline]
setObjectId(ObjectId oid)qpid::management::ManagementObject [inline]
setReference(ObjectId objectId)qpid::management::ManagementObject [virtual]
setUpdateTime()qpid::management::ManagementObject
TYPE_ABSTIMEqpid::management::ManagementItem [static]
TYPE_BOOLqpid::management::ManagementItem [static]
TYPE_DELTATIMEqpid::management::ManagementItem [static]
TYPE_DOUBLEqpid::management::ManagementItem [static]
TYPE_FLOATqpid::management::ManagementItem [static]
TYPE_FTABLEqpid::management::ManagementItem [static]
TYPE_LISTqpid::management::ManagementItem [static]
TYPE_LSTRqpid::management::ManagementItem [static]
TYPE_REFqpid::management::ManagementItem [static]
TYPE_S16qpid::management::ManagementItem [static]
TYPE_S32qpid::management::ManagementItem [static]
TYPE_S64qpid::management::ManagementItem [static]
TYPE_S8qpid::management::ManagementItem [static]
TYPE_SSTRqpid::management::ManagementItem [static]
TYPE_U16qpid::management::ManagementItem [static]
TYPE_U32qpid::management::ManagementItem [static]
TYPE_U64qpid::management::ManagementItem [static]
TYPE_U8qpid::management::ManagementItem [static]
TYPE_UUIDqpid::management::ManagementItem [static]
updateTimeqpid::management::ManagementObject [protected]
writeProperties(std::string &) const qpid::management::ManagementObject [inline, virtual]
writePropertiesSize() const qpid::management::ManagementObject [inline, virtual]
writeSchemaCall_t typedefqpid::management::ManagementObject
writeStatistics(std::string &, bool=false)qpid::management::ManagementObject [inline, virtual]
writeTimestamps(std::string &buf) const qpid::management::ManagementObject [protected]
writeTimestamps(types::Variant::Map &map) const qpid::management::ManagementObject
writeTimestampsSize() const qpid::management::ManagementObject [protected]
~ManagementItem()qpid::management::ManagementItem [inline, virtual]
~ManagementObject()qpid::management::ManagementObject [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/annotated.html0000664000076400007640000020116511752725717020467 0ustar00jrossjross00000000000000 Class List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
qpid::sys::AbsTimeClass to represent an instant in time
qpid::AddressContains the protocol address of an AMQP broker
qpid::messaging::AddressRepresents an address to which messages can be sent and from which messages can be received
qpid::messaging::AddressError
qmf::engine::AgentAgent - Protocol engine for the QMF agent
qpid::console::Agent
qmf::Agent
qpid::management::AgentAttachment
qmf::AgentEvent
qmf::engine::AgentEventAgentEvent
qmf::engine::AgentProxy
qmf::AgentSession
std::allocatorSTL class
qpid::management::Args
qpid::management::ArgsNone
qpid::framing::Array
qpid::framing::ArrayValue
qpid::messaging::AssertionFailedThrown when creating a sender or receiver for an address for which some asserted property of the node is not matched
qpid::client::no_keyword::AsyncSession_0_10AMQP 0-10 asynchronous session API
qpid::client::AsyncSession_0_10AMQP 0-10 session API with keyword arguments
qpid::console::Object::AttributeMap
std::auto_ptrSTL class
qpid::client::AutoCancelAutoCancel cancels a subscription in its destructor
std::bad_allocSTL class
std::bad_castSTL class
std::bad_exceptionSTL class
std::bad_typeidSTL class
std::basic_fstreamSTL class
std::basic_ifstreamSTL class
std::basic_iosSTL class
std::basic_iostreamSTL class
std::basic_istreamSTL class
std::basic_istringstreamSTL class
std::basic_ofstreamSTL class
std::basic_ostreamSTL class
std::basic_ostringstreamSTL class
std::basic_stringSTL class
std::basic_stringstreamSTL class
std::bitsetSTL class
qpid::framing::BoolValue
qpid::console::BoolValue
qpid::console::Broker
qmf::engine::BrokerEvent
qmf::engine::BrokerProxy
qpid::framing::Buffer
qpid::management::BufferThis class is a wrapper around qpid::framing::Buffer that does not include any dependencies from boost or from qpid::framing
qpid::client::CannotConnectException
qpid::ChannelException
qpid::console::ClassKey
qpid::ClosedException
qpid::client::FailoverManager::CommandInterface to implement for doing work that can be resumed on failover
qpid::framing::CommandInvalidExceptionThe command segments could not be decoded
qpid::CommonOptionsStandard options for configuration
qpid::client::CompletionAsynchronous commands that do not return a result will return a Completion
std::complexSTL class
qpid::sys::ConditionA condition variable for thread synchronization
qpid::sys::ConditionalScopedLock
qpid::client::ConnectionRepresents a connection to an AMQP broker
qpid::messaging::ConnectionA connection represents a network connection to a remote endpoint
qpid::messaging::ConnectionError
qpid::ConnectionException
qpid::framing::ConnectionForcedExceptionAn operator intervened to close the connection for some reason
qmf::engine::ConnectionSettingsSettings for AMQP connections to the broker
qpid::management::ConnectionSettingsSettings for a Connection
qpid::client::ConnectionSettingsSettings for a Connection
qpid::console::Broker::ConnectionThread
qmf::engine::Console
qmf::ConsoleEvent
qmf::engine::ConsoleEvent
qpid::console::ConsoleListenerImplement a subclass of ConsoleListener and subscribe it using the SessionManager to receive indications
qmf::ConsoleSession
qmf::engine::ConsoleSettings
std::basic_string::const_iteratorSTL iterator class
std::string::const_iteratorSTL iterator class
std::wstring::const_iteratorSTL iterator class
std::deque::const_iteratorSTL iterator class
std::list::const_iteratorSTL iterator class
std::map::const_iteratorSTL iterator class
std::multimap::const_iteratorSTL iterator class
std::set::const_iteratorSTL iterator class
std::multiset::const_iteratorSTL iterator class
std::vector::const_iteratorSTL iterator class
std::basic_string::const_reverse_iteratorSTL iterator class
std::string::const_reverse_iteratorSTL iterator class
std::wstring::const_reverse_iteratorSTL iterator class
std::deque::const_reverse_iteratorSTL iterator class
std::list::const_reverse_iteratorSTL iterator class
std::map::const_reverse_iteratorSTL iterator class
std::multimap::const_reverse_iteratorSTL iterator class
std::set::const_reverse_iteratorSTL iterator class
std::multiset::const_reverse_iteratorSTL iterator class
std::vector::const_reverse_iteratorSTL iterator class
qpid::framing::FieldValue::Data
qmf::Data
qmf::DataAddr
qpid::framing::DeliveryProperties
std::dequeSTL class
std::domain_errorSTL class
qpid::framing::DoubleValue
qpid::console::DoubleValue
qpid::framing::DtxGetTimeoutResult
qpid::framing::DtxRecoverResult
qpid::sys::DurationClass to represent the duration between instants of time
qpid::messaging::DurationA duration is a time in milliseconds
qpid::framing::EncodedValue
qpid::messaging::EncodingException
qpid::ErrnoExceptionException that includes an errno message
qmf::engine::Event
qpid::console::Event
qmf::posix::EventNotifier
qpid::Options::Exception
qpid::types::Exception
std::exceptionSTL class
qpid::ExceptionBase class for Qpid runtime exceptions
qpid::sys::ExceptionHolderHolder for exceptions
qpid::framing::ExchangeBoundResult
qpid::framing::ExchangeQueryResult
qpid::client::FailoverListenerListen for updates from the amq.failover exchange
qpid::client::FailoverManagerUtility to manage failover
qpid::messaging::FailoverUpdatesA utility to listen for updates on cluster membership and update the list of known urls for a connection accordingly
std::ios_base::failureSTL class
qpid::messaging::FetchError
qpid::framing::FieldTableA set of name-value pairs
qpid::framing::FieldTableValue
qpid::framing::FieldValueValue that can appear in an AMQP field table
qpid::framing::FieldValueExceptionException that is the base exception for all field table errors
qpid::framing::FileProperties
qpid::framing::FixedWidthValue
qpid::framing::FixedWidthValue< 0 >
qpid::framing::FloatValue
qpid::console::FloatValue
qpid::client::FlowControlFlow control works by associating a finite amount of "credit" with a subscription
qpid::framing::FragmentProperties
qpid::framing::FramingErrorExceptionA valid frame header cannot be formed from the incoming byte stream
std::fstreamSTL class
qpid::client::Future
qpid::client::FutureCompletion
qpid::client::FutureResult
qpid::messaging::HandleA handle is like a pointer: refers to an underlying implementation object
qpid::client::HandleA handle is like a pointer: refers to an underlying implementation object
qmf::HandleA handle is like a pointer: refers to an underlying implementation object
qpid::framing::Header
std::ifstreamSTL class
qpid::framing::IllegalArgumentExceptionThe command argument is malformed, i.e
qpid::framing::IllegalStateExceptionThe peer sent a command that is not permitted in the current state of the session
qmf::IndexOutOfRange
qpid::log::Statement::Initializer
qpid::InlineAllocatorAn allocator that has inline storage for up to Max objects of type BaseAllocator::value_type
qpid::InlineRebind
qpid::InlineRebind< T, T, BaseAllocator, Max >
qpid::InlineVectorA vector that stores up to Max elements in inline storage, otherwise uses normal vector allocation
qpid::console::Int64Value
qpid::framing::Integer16Value
qpid::framing::Integer64Value
qpid::framing::Integer8Value
qpid::framing::IntegerValue
qpid::framing::InternalErrorExceptionThe peer could not complete the command because of an internal error
qpid::console::IntValue
qpid::Url::Invalid
std::invalid_argumentSTL class
qpid::framing::InvalidArgumentExceptionAn invalid argument was passed to a command, and the operation could not proceed
qpid::types::InvalidConversionThrown when an illegal conversion of a variant is attempted
qpid::framing::InvalidConversionExceptionException thrown when we can't perform requested conversion
qpid::messaging::InvalidOptionStringThrown when the syntax of the option string used to configure a connection in not valid
qpid::framing::InvalidPathExceptionThe client tried to work with an unknown virtual host
qpid::sys::IOHandle
qpid::sys::IOHandlePrivate
std::iosSTL class
std::ios_baseSTL class
std::istreamSTL class
std::istringstreamSTL class
qpid::framing::Buffer::IteratorBuffer input/output iterator
qpid::RangeSet::iterator
std::basic_string::iteratorSTL iterator class
std::string::iteratorSTL iterator class
std::wstring::iteratorSTL iterator class
std::deque::iteratorSTL iterator class
std::list::iteratorSTL iterator class
std::map::iteratorSTL iterator class
std::multimap::iteratorSTL iterator class
std::set::iteratorSTL iterator class
std::multiset::iteratorSTL iterator class
std::vector::iteratorSTL iterator class
qpid::messaging::KeyErrorThrown to indicate a failed lookup of some local object
qmf::KeyNotFound
std::length_errorSTL class
qpid::log::LevelTraits
qpid::messaging::LinkError
qpid::framing::ListRepresentation of an AMQP 0-10 list
std::listSTL class
qpid::amqp_0_10::ListCodecCodec for encoding/decoding a list of Variants using the AMQP 0-10 list encoding
qpid::framing::ListValue
qpid::client::LocalQueueA local queue to collect messages retrieved from a remote broker queue
qpid::log::LoggerCentral logging agent
std::logic_errorSTL class
qpid::messaging::MalformedAddressThrown when an address string with invalid syntax is used
qpid::management::Manageable
qpid::management::ManagementAgent
qpid::management::ManagementEvent
qpid::management::ManagementItem
qpid::management::ManagementObject
std::mapSTL class
qpid::amqp_0_10::MapCodecCodec for encoding/decoding a map of Variants using the AMQP 0-10 map encoding
qpid::console::MapValue
qpid::messaging::MessageRepresentation of a message
qpid::client::MessageA message sent to or received from the broker
qmf::engine::Message
qpid::framing::MessageAcquireResult
qpid::client::MessageListenerImplement a subclass of MessageListener and subscribe it using the SubscriptionManager to receive messages
qpid::framing::MessageProperties
qpid::client::MessageReplayTrackerUtility to track messages sent asynchronously, allowing those that are indoubt to be replayed over a new session
qpid::framing::MessageResumeResult
qpid::messaging::MessagingExceptionThis is the base class for all messaging related exceptions thrown by this API
qmf::engine::MethodResponse
qpid::console::MethodResponse
qpid::sys::MonitorA monitor is a condition variable and a mutex
qpid::MsgA simple wrapper for std::ostringstream that allows in place construction of a message and automatic conversion to string
std::multimapSTL class
std::multisetSTL class
qpid::sys::MutexMutex lock
qpid::management::Mutex
qpid::console::Package::NameHash
qpid::console::Package::NameHashComp
qpid::messaging::NoMessageAvailableThrown by Receiver::fetch(), Receiver::get() and Session::nextReceiver() to indicate that there no message was available before the timeout specified
qpid::framing::NotAllowedExceptionThe peer tried to use a command a manner that is inconsistent with the rules described in the specification
qpid::framing::NotAttachedExceptionThe transport is not currently attached to any session
qpid::messaging::NotFoundThrown on attempts to create a sender or receiver to a non-existent node
qpid::framing::NotFoundExceptionThe client attempted to work with a server entity that does not exist
qpid::management::Notifyable
qpid::framing::NotImplementedExceptionThe peer tried to use functionality that is not implemented in its partner
qpid::sys::NullIOHandle
qpid::console::NullValue
qmf::engine::Object
qpid::console::Object
qpid::console::ObjectId
qmf::engine::ObjectId
qpid::management::ObjectId
std::ofstreamSTL class
qmf::OperationTimedOut
qpid::OptionsBase class for options
qpid::log::OptionsLogging options for config parser
qpid::OptionValue
std::ostreamSTL class
std::ostringstreamSTL class
std::out_of_rangeSTL class
qpid::framing::OutOfBounds
qpid::management::OutOfBounds
qpid::log::Logger::OutputLogging output sink
std::overflow_errorSTL class
qpid::console::Package
qpid::sys::PODMutexPODMutex is a POD, can be static-initialized with PODMutex m = QPID_PODMUTEX_INITIALIZER
qpid::sys::PosixIOHandle
qpid::framing::PreconditionFailedExceptionThe client requested a command that was not allowed because some precondition failed
std::priority_queueSTL class
qpid::framing::ProtocolVersion
qmf::QmfException
qmf::Query
qmf::engine::Query
qmf::engine::QueryElement
qmf::engine::QueryExpression
qmf::engine::QueryOperand
qmf::engine::QueryResponse
std::queueSTL class
qpid::client::QueueOptionsA help class to set options on the Queue
qpid::framing::QueueQueryResult
qpid::sys::Raisable
qpid::RangeA range of values, used in RangeSet
std::range_errorSTL class
qpid::RangeSetA set implemented as a list of [begin, end) ranges
qpid::InlineAllocator::rebind
qpid::messaging::ReceiverInterface through which messages are received
qpid::messaging::ReceiverError
qpid::client::FailoverManager::ReconnectionStrategy
qpid::console::RefValue
qpid::client::MessageReplayTracker::ReplayRecord
qpid::framing::ReplyTo
qmf::engine::ResilientConnectionResilientConnection represents a Qpid connection that is resilient
qmf::engine::ResilientConnectionEventRepresents events that occur, unsolicited, from ResilientConnection
qpid::messaging::ResolutionErrorThrown when a syntactically correct address cannot be resolved or used
qpid::framing::ResourceDeletedExceptionA server entity the client is working with has been deleted
qpid::framing::ResourceLimitExceededExceptionThe client exceeded its resource allocation
qpid::framing::ResourceLockedExceptionThe client attempted to work with a server entity to which it has no access because another client is working with it
std::string::reverse_iteratorSTL iterator class
std::set::reverse_iteratorSTL iterator class
std::basic_string::reverse_iteratorSTL iterator class
std::multiset::reverse_iteratorSTL iterator class
std::wstring::reverse_iteratorSTL iterator class
std::map::reverse_iteratorSTL iterator class
std::deque::reverse_iteratorSTL iterator class
std::multimap::reverse_iteratorSTL iterator class
std::vector::reverse_iteratorSTL iterator class
std::list::reverse_iteratorSTL iterator class
qpid::sys::RunnableInterface for objects that can be run, e.g
std::runtime_errorSTL class
qpid::sys::RWlockRW lock
qmf::Schema
qpid::console::SchemaArgument
qmf::engine::SchemaArgument
qpid::console::SchemaClass
qmf::engine::SchemaClassKey
qmf::engine::SchemaEventClass
qmf::SchemaId
qpid::console::SchemaMethod
qmf::SchemaMethod
qmf::engine::SchemaMethod
qmf::engine::SchemaObjectClass
qmf::engine::SchemaProperty
qpid::console::SchemaProperty
qmf::SchemaProperty
qmf::engine::SchemaStatistic
qpid::console::SchemaStatistic
qpid::sys::ScopedLockScoped lock template: calls lock() in ctor, unlock() in dtor
qpid::management::ScopedLockTemplateScoped lock template: calls lock() in ctor, unlock() in dtor
qpid::sys::ScopedRlock
qpid::sys::ScopedUnlock
qpid::management::ScopedUnlockTemplate
qpid::sys::ScopedWlock
qpid::log::SelectorA selector identifies the set of log messages to enable
qpid::messaging::SenderInterface through which messages are sent
qpid::messaging::SenderError
qpid::messaging::SendError
qpid::console::SequenceManager
qpid::framing::SequenceNumber4-byte sequence number that 'wraps around'
qpid::framing::SequenceSet
qpid::messaging::SessionA session represents a distinct 'conversation' which can involve sending and receiving messages to and from different addresses
qpid::client::no_keyword::Session_0_10AMQP 0-10 synchronous session API
qpid::client::Session_0_10AMQP 0-10 session API with keyword arguments
qpid::client::SessionBase_0_10Base class for handles to an AMQP session
qpid::framing::SessionBusyExceptionThe session is currently attached to another transport
qpid::messaging::SessionError
qpid::SessionException
qmf::engine::SessionHandle
qpid::SessionIdIdentifier for a session
qpid::console::SessionManager
std::setSTL class
qpid::console::SessionManager::Settings
qpid::management::ManagementAgent::Singleton
qpid::log::SinkOptionsLogging sink options
std::stackSTL class
qpid::log::StatementPOD struct representing a logging statement in source code
qpid::InlineAllocator::Store
qpid::framing::Str16Value
qpid::framing::Str8Value
qpid::framing::StreamProperties
std::stringSTL class
std::stringstreamSTL class
qpid::console::StringValue
qpid::framing::Struct32Value
qpid::framing::StructHelper
qmf::Subscription
qpid::client::SubscriptionA handle to an active subscription
qpid::client::SubscriptionManagerA class to help create and manage subscriptions
qpid::client::SubscriptionSettingsSettings for a subscription
qpid::messaging::TargetCapacityExceededThrown to indicate that the sender attempted to send a message that would result in the target node on the peer exceeding a preconfigured capacity
qpid::sys::Thread
qpid::framing::TimeValue
qpid::messaging::TransactionAbortedThrown on Session::commit() if reconnection results in the transaction being automatically aborted
qpid::messaging::TransactionError
qpid::framing::TransportBusyExceptionThe transport is currently attached to another session
qpid::messaging::TransportFailureThrown to indicate loss of underlying connection
qpid::TransportFailureException representing transport failure
qpid::client::TypedResultReturned by asynchronous commands that return a result
qpid::console::Uint64Value
qpid::console::UintValue
qpid::messaging::UnauthorizedAccessThrown to indicate that the application attempted to do something for which it was not authorised by its peer
qpid::framing::UnauthorizedAccessExceptionThe client attempted to work with a server entity to which it has no access due to security settings
std::underflow_errorSTL class
qpid::framing::UnknownIdsExceptionCommand data was received prior to any use of the command-point control
qpid::framing::Unsigned16Value
qpid::framing::Unsigned32Value
qpid::framing::Unsigned64Value
qpid::framing::Unsigned8Value
qpid::UrlAn AMQP URL contains a list of addresses
qpid::framing::UuidA UUID is represented as a boost::array of 16 bytes
qpid::types::Uuid
qpid::framing::UuidValue
qpid::console::UuidValue
std::valarraySTL class
qmf::engine::Value
qpid::console::Value
qpid::console::ValueFactory
qpid::framing::Var16Value
qpid::framing::Var32Value
qpid::framing::VariableWidthValue
qpid::types::VariantRepresents a value of variable type
std::vectorSTL class
qpid::framing::VoidValue
std::wfstreamSTL class
std::wifstreamSTL class
qpid::framing::Window
std::wiosSTL class
std::wistreamSTL class
std::wistringstreamSTL class
std::wofstreamSTL class
std::wostreamSTL class
std::wostringstreamSTL class
qpid::sys::ExceptionHolder::Wrapper
std::wstringSTL class
std::wstringstreamSTL class
qpid::framing::XaResult
qpid::framing::Xid

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00003.html0000664000076400007640000006117111752725720017310 0ustar00jrossjross00000000000000 qpid::messaging::Address Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Address Class Reference

Represents an address to which messages can be sent and from which messages can be received. More...

#include <qpid/messaging/Address.h>

List of all members.

Public Member Functions

 Address ()
 Address (const std::string &address)
 Address (const std::string &name, const std::string &subject, const qpid::types::Variant::Map &options, const std::string &type="")
 Address (const Address &address)
 ~Address ()
Addressoperator= (const Address &)
const std::stringgetName () const
void setName (const std::string &)
const std::stringgetSubject () const
void setSubject (const std::string &)
const qpid::types::Variant::MapgetOptions () const
qpid::types::Variant::MapgetOptions ()
void setOptions (const qpid::types::Variant::Map &)
std::string getType () const
void setType (const std::string &)
 The type of and addressed node influences how receivers and senders are constructed for it.
std::string str () const
 operator bool () const
bool operator! () const

Detailed Description

Represents an address to which messages can be sent and from which messages can be received.

Often a simple name is sufficient for this, however this can be augmented with a subject pattern and options.

All parts of an address can be specified in a string of the following form:

<address> [ / <subject> ] ; [ { <key> : <value> , ... } ]

Here the <address> is a simple name for the addressed entity and <subject> is a subject or subject pattern for messages sent to or received from this address. The options are specified as a series of key value pairs enclosed in curly brackets (denoting a map). Values can be nested maps, or lists (which are denoted as a comma separated list of values inside square brackets, e.g. [a, b, c]).

The currently supported options are as follows:

create

Indicate whether the address should be automatically created or not. Can be one of always, never, sender or receiver. The properties of the node to be created can be specified via the node options (see below).

assert

Indicate whether or not to assert any specified node properties(see below) match the address. Can be one of always, never, sender or receiver.

delete

Indicate whether or not to delete the addressed node when a sender or receiver is cancelled. Can be one of always, never, sender or receiver.

node

A nested map describing properties of the addressed node. Current properties supported are type (topic or queue), durable (boolean), x-declare and x-bindings. The x-declare option is a nested map in whcih protocol amqp 0-10 specific options for queue or exchange declare can be specified. The x-bindings option is a nested list, each element of which can specify a queue, an exchange, a binding-key and arguments, which are used to establish a binding on create. The node will be used if queue or exchange values are not specified.

link

A nested map through which properties of the 'link' from sender/receiver to node can be configured. Current propeties are name, durable, realiability, x-declare, x-subscribe and x-bindings.

For receivers there is one other option of interest:

mode(only relevant for queues) indicates whether the subscribe should consume (the default) or merely browse the messages. Valid values are 'consume' and 'browse'

An address has value semantics.


Constructor & Destructor Documentation

qpid::messaging::Address::Address ( )
qpid::messaging::Address::Address ( const std::string address)
qpid::messaging::Address::Address ( const std::string name,
const std::string subject,
const qpid::types::Variant::Map options,
const std::string type = "" 
)
qpid::messaging::Address::Address ( const Address address)
qpid::messaging::Address::~Address ( )

Member Function Documentation

const std::string& qpid::messaging::Address::getName ( ) const
const qpid::types::Variant::Map& qpid::messaging::Address::getOptions ( ) const
qpid::types::Variant::Map& qpid::messaging::Address::getOptions ( )
const std::string& qpid::messaging::Address::getSubject ( ) const
std::string qpid::messaging::Address::getType ( ) const
qpid::messaging::Address::operator bool ( ) const
bool qpid::messaging::Address::operator! ( ) const
Address& qpid::messaging::Address::operator= ( const Address )
void qpid::messaging::Address::setName ( const std::string )
void qpid::messaging::Address::setOptions ( const qpid::types::Variant::Map )
void qpid::messaging::Address::setSubject ( const std::string )
void qpid::messaging::Address::setType ( const std::string )

The type of and addressed node influences how receivers and senders are constructed for it.

It also affects how a reply-to address is encoded. If the type is not specified in the address itself, it will be automatically determined by querying the broker. The type can be explicitly set to prevent this if needed.

std::string qpid::messaging::Address::str ( ) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00512_source.html0000664000076400007640000005424711752725717020711 0ustar00jrossjross00000000000000 qpid/framing/MessageProperties.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/MessageProperties.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_MESSAGEPROPERTIES_H
00002 #define QPID_FRAMING_MESSAGEPROPERTIES_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/framing/ReplyTo.h"
00031 
00032 #include <ostream>
00033 #include "qpid/framing/amqp_types_full.h"
00034 #include "qpid/CommonImportExport.h"
00035 
00036 namespace qpid {
00037 namespace framing {
00038 
00039 class QPID_COMMON_CLASS_EXTERN MessageProperties  {
00040     uint64_t contentLength;
00041     Uuid messageId;
00042     std::string correlationId;
00043     ReplyTo replyTo;
00044     std::string contentType;
00045     std::string contentEncoding;
00046     std::string userId;
00047     std::string appId;
00048     FieldTable applicationHeaders;
00049     uint16_t flags;
00050 public:
00051     static const uint16_t TYPE = 1027;
00052     MessageProperties(
00053         uint64_t _contentLength,
00054         const Uuid& _messageId,
00055         const std::string& _correlationId,
00056         const ReplyTo& _replyTo,
00057         const std::string& _contentType,
00058         const std::string& _contentEncoding,
00059         const std::string& _userId,
00060         const std::string& _appId,
00061         const FieldTable& _applicationHeaders) : 
00062         contentLength(_contentLength),
00063         messageId(_messageId),
00064         correlationId(_correlationId),
00065         replyTo(_replyTo),
00066         contentType(_contentType),
00067         contentEncoding(_contentEncoding),
00068         userId(_userId),
00069         appId(_appId),
00070         applicationHeaders(_applicationHeaders),
00071         flags(0){
00072         flags |= (1 << 8);
00073         flags |= (1 << 9);
00074         flags |= (1 << 10);
00075         flags |= (1 << 11);
00076         flags |= (1 << 12);
00077         flags |= (1 << 13);
00078         flags |= (1 << 14);
00079         flags |= (1 << 15);
00080         flags |= (1 << 0);
00081     }
00082     MessageProperties()  : contentLength(0), flags(0) {}
00083     
00084     QPID_COMMON_EXTERN void setContentLength(uint64_t _contentLength);
00085     QPID_COMMON_EXTERN uint64_t getContentLength() const;
00086     QPID_COMMON_EXTERN bool hasContentLength() const;
00087     QPID_COMMON_EXTERN void clearContentLengthFlag();
00088     QPID_COMMON_EXTERN void setMessageId(const Uuid& _messageId);
00089     QPID_COMMON_EXTERN const Uuid& getMessageId() const;
00090     QPID_COMMON_EXTERN bool hasMessageId() const;
00091     QPID_COMMON_EXTERN void clearMessageIdFlag();
00092     QPID_COMMON_EXTERN void setCorrelationId(const std::string& _correlationId);
00093     QPID_COMMON_EXTERN const std::string& getCorrelationId() const;
00094     QPID_COMMON_EXTERN bool hasCorrelationId() const;
00095     QPID_COMMON_EXTERN void clearCorrelationIdFlag();
00096     QPID_COMMON_EXTERN void setReplyTo(const ReplyTo& _replyTo);
00097     QPID_COMMON_EXTERN const ReplyTo& getReplyTo() const;
00098     QPID_COMMON_EXTERN bool hasReplyTo() const;
00099     QPID_COMMON_EXTERN void clearReplyToFlag();
00100     QPID_COMMON_EXTERN void setContentType(const std::string& _contentType);
00101     QPID_COMMON_EXTERN const std::string& getContentType() const;
00102     QPID_COMMON_EXTERN bool hasContentType() const;
00103     QPID_COMMON_EXTERN void clearContentTypeFlag();
00104     QPID_COMMON_EXTERN void setContentEncoding(const std::string& _contentEncoding);
00105     QPID_COMMON_EXTERN const std::string& getContentEncoding() const;
00106     QPID_COMMON_EXTERN bool hasContentEncoding() const;
00107     QPID_COMMON_EXTERN void clearContentEncodingFlag();
00108     QPID_COMMON_EXTERN void setUserId(const std::string& _userId);
00109     QPID_COMMON_EXTERN const std::string& getUserId() const;
00110     QPID_COMMON_EXTERN bool hasUserId() const;
00111     QPID_COMMON_EXTERN void clearUserIdFlag();
00112     QPID_COMMON_EXTERN void setAppId(const std::string& _appId);
00113     QPID_COMMON_EXTERN const std::string& getAppId() const;
00114     QPID_COMMON_EXTERN bool hasAppId() const;
00115     QPID_COMMON_EXTERN void clearAppIdFlag();
00116     QPID_COMMON_EXTERN void setApplicationHeaders(const FieldTable& _applicationHeaders);
00117     QPID_COMMON_EXTERN const FieldTable& getApplicationHeaders() const;
00118     QPID_COMMON_EXTERN FieldTable& getApplicationHeaders();
00119     QPID_COMMON_EXTERN bool hasApplicationHeaders() const;
00120     QPID_COMMON_EXTERN void clearApplicationHeadersFlag();
00121     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const MessageProperties&);
00122     QPID_COMMON_EXTERN void encode(Buffer&) const;
00123     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00124     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00125     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00126     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00127     QPID_COMMON_EXTERN uint32_t bodySize() const;
00128     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00129 }; /* class MessageProperties */
00130 
00131 }}
00132 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00453.html0000664000076400007640000001301211752725717017316 0ustar00jrossjross00000000000000 qpid/agent/ManagementAgent.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/agent/ManagementAgent.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00606.html0000664000076400007640000002223611752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::DataAddr Member List
This is the complete list of members for qmf::DataAddr, including all inherited members.
asMap() const qmf::DataAddr
DataAddr(DataAddrImpl *impl=0)qmf::DataAddr
DataAddr(const DataAddr &)qmf::DataAddr
DataAddr(const qpid::types::Variant::Map &)qmf::DataAddr
DataAddr(const std::string &name, const std::string &agentName, uint32_t agentEpoch=0)qmf::DataAddr
getAgentEpoch() const qmf::DataAddr
getAgentName() const qmf::DataAddr
getName() const qmf::DataAddr
Handle()qmf::Handle< DataAddrImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< DataAddrImpl > [protected]
Impl typedefqmf::Handle< DataAddrImpl > [protected]
implqmf::Handle< DataAddrImpl > [protected]
isNull() const qmf::Handle< DataAddrImpl > [inline]
isValid() const qmf::Handle< DataAddrImpl > [inline]
operator bool() const qmf::Handle< DataAddrImpl > [inline]
operator!() const qmf::Handle< DataAddrImpl > [inline]
operator<(const DataAddr &)qmf::DataAddr
operator<(const DataAddr &) const qmf::DataAddr
operator=(const DataAddr &)qmf::DataAddr
Handle< DataAddrImpl >::operator=(const Handle &)qmf::Handle< DataAddrImpl > [protected]
operator==(const DataAddr &)qmf::DataAddr
operator==(const DataAddr &) const qmf::DataAddr
swap(Handle< T > &h)qmf::Handle< DataAddrImpl > [inline]
~DataAddr()qmf::DataAddr

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x71.html0000664000076400007640000001661011752725720022571 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- q -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00435.html0000664000076400007640000001203411752725717017321 0ustar00jrossjross00000000000000 qmf/exceptions.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/exceptions.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00490.html0000664000076400007640000001523211752725717017325 0ustar00jrossjross00000000000000 qpid/Exception.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Exception.h File Reference
#include "qpid/framing/amqp_types.h"
#include "qpid/framing/constants.h"
#include "qpid/framing/enum.h"
#include "qpid/sys/StrError.h"
#include "qpid/CommonImportExport.h"
#include <string>
#include <errno.h>

Go to the source code of this file.

Classes

class  qpid::Exception
 Base class for Qpid runtime exceptions. More...
struct  qpid::ErrnoException
 Exception that includes an errno message. More...
struct  qpid::SessionException
struct  qpid::ChannelException
struct  qpid::ConnectionException
struct  qpid::ClosedException
struct  qpid::TransportFailure
 Exception representing transport failure. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00891.html0000664000076400007640000001152311752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Runnable Member List
This is the complete list of members for qpid::sys::Runnable, including all inherited members.
Functor typedefqpid::sys::Runnable
functor()qpid::sys::Runnable
run()=0qpid::sys::Runnable [pure virtual]
~Runnable()qpid::sys::Runnable [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00319.html0000664000076400007640000006212511752725720017322 0ustar00jrossjross00000000000000 qpid::messaging::Sender Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Interface through which messages are sent. More...

#include <qpid/messaging/Sender.h>

List of all members.

Public Member Functions

 Sender (SenderImpl *impl=0)
 Sender (const Sender &)
 ~Sender ()
Senderoperator= (const Sender &)
void send (const Message &message, bool sync=false)
 Sends a message.
void close ()
void setCapacity (uint32_t)
 Sets the capacity for the sender.
uint32_t getCapacity ()
 Returns the capacity of the sender.
uint32_t getUnsettled ()
 Returns the number of sent messages pending confirmation of receipt by the broker.
uint32_t getAvailable ()
 Returns the number of messages for which there is available capacity.
const std::stringgetName () const
 Returns the name of this sender.
Session getSession () const
 Returns a handle to the session associated with this sender.
QPID_MESSAGING_INLINE_EXTERN bool isValid () const
QPID_MESSAGING_INLINE_EXTERN bool isNull () const
QPID_MESSAGING_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_MESSAGING_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Detailed Description

Interface through which messages are sent.


Member Typedef Documentation

typedef T qpid::messaging::Handle::Impl [protected, inherited]

Definition at line 57 of file Handle.h.


Constructor & Destructor Documentation

qpid::messaging::Sender::Sender ( SenderImpl *  impl = 0)
qpid::messaging::Sender::Sender ( const Sender )
qpid::messaging::Sender::~Sender ( )

Member Function Documentation

void qpid::messaging::Sender::close ( )
uint32_t qpid::messaging::Sender::getAvailable ( )

Returns the number of messages for which there is available capacity.

uint32_t qpid::messaging::Sender::getCapacity ( )

Returns the capacity of the sender.

See also:
setCapacity
const std::string& qpid::messaging::Sender::getName ( ) const

Returns the name of this sender.

Session qpid::messaging::Sender::getSession ( ) const

Returns a handle to the session associated with this sender.

uint32_t qpid::messaging::Sender::getUnsettled ( )

Returns the number of sent messages pending confirmation of receipt by the broker.

(These are the 'in-doubt' messages).

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN qpid::messaging::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

Sender& qpid::messaging::Sender::operator= ( const Sender )
void qpid::messaging::Sender::send ( const Message message,
bool  sync = false 
)

Sends a message.

Parameters:
messagethe message to send
syncif true the call will block until the server confirms receipt of the messages; if false will only block for available capacity (i.e. pending == capacity)
void qpid::messaging::Sender::setCapacity ( uint32_t  )

Sets the capacity for the sender.

The capacity determines how many outgoing messages can be held pending confirmation of receipt by the broker.

void qpid::messaging::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.


Member Data Documentation

Impl* qpid::messaging::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00568_source.html0000664000076400007640000002630111752725717020712 0ustar00jrossjross00000000000000 qpid/sys/Thread.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Thread.h
Go to the documentation of this file.
00001 #ifndef _sys_Thread_h
00002 #define _sys_Thread_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include <boost/shared_ptr.hpp>
00025 #include "qpid/CommonImportExport.h"
00026 
00027 #ifdef _WIN32
00028 #  ifdef _MSC_VER
00029 #    define QPID_TSS __declspec(thread)
00030 #  else
00031 #    define QPID_TSS __thread
00032 #  endif
00033 #elif defined (__GNUC__)
00034 #  define QPID_TSS __thread
00035 #elif defined (__SUNPRO_CC)
00036 #  define QPID_TSS __thread
00037 #else
00038 #  error "Dont know how to define QPID_TSS for this platform"
00039 #endif
00040 
00041 namespace qpid {
00042 namespace sys {
00043 
00044 class Runnable;
00045 class ThreadPrivate;
00046 
00047 class Thread
00048 {
00049     boost::shared_ptr<ThreadPrivate> impl;
00050 
00051   public:
00052     QPID_COMMON_EXTERN Thread();
00053     QPID_COMMON_EXTERN explicit Thread(qpid::sys::Runnable*);
00054     QPID_COMMON_EXTERN explicit Thread(qpid::sys::Runnable&);
00055 
00056     QPID_COMMON_EXTERN operator bool();
00057     QPID_COMMON_EXTERN bool operator==(const Thread&) const;
00058     QPID_COMMON_EXTERN bool operator!=(const Thread&) const;
00059 
00060     QPID_COMMON_EXTERN void join();
00061 
00062     QPID_COMMON_EXTERN static Thread current();
00063 
00067     QPID_COMMON_EXTERN static unsigned long logId();
00068 };
00069 
00070 }}
00071 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00039.html0000664000076400007640000001011711752725720017313 0ustar00jrossjross00000000000000 std::bitset Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::bitset Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00437_source.html0000664000076400007640000002664611752725717020721 0ustar00jrossjross00000000000000 qmf/Handle.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Handle.h
Go to the documentation of this file.
00001 #ifndef QMF_HANDLE_H
00002 #define QMF_HANDLE_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qmf/ImportExport.h"
00026 
00027 namespace qmf {
00028 
00029 template <class> class PrivateImplRef;
00030 
00038 template <class T> class Handle {
00039   public:
00040 
00042     QMF_INLINE_EXTERN bool isValid() const { return impl; }
00043 
00045     QMF_INLINE_EXTERN bool isNull() const { return !impl; }
00046 
00048     QMF_INLINE_EXTERN operator bool() const { return impl; }
00049 
00051     QMF_INLINE_EXTERN bool operator !() const { return !impl; }
00052 
00053     void swap(Handle<T>& h) { T* t = h.impl; h.impl = impl; impl = t; }
00054 
00055   protected:
00056     typedef T Impl;
00057     QMF_INLINE_EXTERN Handle() :impl() {}
00058 
00059     // Not implemented,subclasses must implement.
00060     QMF_EXTERN Handle(const Handle&);
00061     QMF_EXTERN Handle& operator=(const Handle&);
00062 
00063     Impl* impl;
00064 
00065   friend class PrivateImplRef<T>;
00066 };
00067 
00068 } // namespace qmf
00069 
00070 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00323.html0000664000076400007640000004316011752725720017313 0ustar00jrossjross00000000000000 qpid::framing::SequenceNumber Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::SequenceNumber Class Reference

4-byte sequence number that 'wraps around'. More...

#include <qpid/framing/SequenceNumber.h>

List of all members.

Public Member Functions

 SequenceNumber (uint32_t v=0)
SequenceNumberoperator++ ()
SequenceNumberoperator-- ()
bool operator== (const SequenceNumber &other) const
bool operator< (const SequenceNumber &other) const
uint32_t getValue () const
 operator uint32_t () const
void encode (Buffer &buffer) const
void decode (Buffer &buffer)
uint32_t encodedSize () const
template<class S >
void serialize (S &s)

Friends

int32_t operator- (const SequenceNumber &a, const SequenceNumber &b)

Detailed Description

4-byte sequence number that 'wraps around'.


Constructor & Destructor Documentation

qpid::framing::SequenceNumber::SequenceNumber ( uint32_t  v = 0) [inline]

Definition at line 46 of file SequenceNumber.h.


Member Function Documentation

void qpid::framing::SequenceNumber::decode ( Buffer buffer)
void qpid::framing::SequenceNumber::encode ( Buffer buffer) const
uint32_t qpid::framing::SequenceNumber::encodedSize ( ) const
uint32_t qpid::framing::SequenceNumber::getValue ( ) const [inline]

Definition at line 52 of file SequenceNumber.h.

qpid::framing::SequenceNumber::operator uint32_t ( ) const [inline]

Definition at line 53 of file SequenceNumber.h.

SequenceNumber& qpid::framing::SequenceNumber::operator++ ( ) [inline]

Definition at line 48 of file SequenceNumber.h.

SequenceNumber& qpid::framing::SequenceNumber::operator-- ( ) [inline]

Definition at line 49 of file SequenceNumber.h.

bool qpid::framing::SequenceNumber::operator< ( const SequenceNumber other) const [inline]

Definition at line 51 of file SequenceNumber.h.

bool qpid::framing::SequenceNumber::operator== ( const SequenceNumber other) const [inline]

Definition at line 50 of file SequenceNumber.h.

template<class S >
void qpid::framing::SequenceNumber::serialize ( S &  s) [inline]

Definition at line 59 of file SequenceNumber.h.


Friends And Related Function Documentation

int32_t operator- ( const SequenceNumber a,
const SequenceNumber b 
) [friend]

Definition at line 64 of file SequenceNumber.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00106.html0000664000076400007640000001472411752725720017316 0ustar00jrossjross00000000000000 qpid::messaging::EncodingException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::EncodingException Struct Reference

#include <qpid/messaging/Message.h>

List of all members.

Public Member Functions

 EncodingException (const std::string &msg)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Constructor & Destructor Documentation

qpid::messaging::EncodingException::EncodingException ( const std::string msg)

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00446.html0000664000076400007640000001120711752725717017324 0ustar00jrossjross00000000000000 qmf/SchemaMethod.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/SchemaMethod.h File Reference
#include "qmf/ImportExport.h"
#include "qpid/sys/IntegerTypes.h"
#include "qmf/Handle.h"
#include "qmf/SchemaTypes.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::SchemaMethod

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00515_source.html0000664000076400007640000004554211752725717020712 0ustar00jrossjross00000000000000 qpid/framing/QueueQueryResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/QueueQueryResult.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_QUEUEQUERYRESULT_H
00002 #define QPID_FRAMING_QUEUEQUERYRESULT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN QueueQueryResult  {
00039     std::string queue;
00040     std::string alternateExchange;
00041     FieldTable arguments;
00042     uint32_t messageCount;
00043     uint32_t subscriberCount;
00044     uint16_t flags;
00045 public:
00046     static const uint16_t TYPE = 2049;
00047     QueueQueryResult(
00048         const std::string& _queue,
00049         const std::string& _alternateExchange,
00050         bool _durable,
00051         bool _exclusive,
00052         bool _autoDelete,
00053         const FieldTable& _arguments,
00054         uint32_t _messageCount,
00055         uint32_t _subscriberCount) : 
00056         queue(_queue),
00057         alternateExchange(_alternateExchange),
00058         arguments(_arguments),
00059         messageCount(_messageCount),
00060         subscriberCount(_subscriberCount),
00061         flags(0){
00062         setDurable(_durable);
00063         setExclusive(_exclusive);
00064         setAutoDelete(_autoDelete);
00065         flags |= (1 << 8);
00066         flags |= (1 << 9);
00067         flags |= (1 << 13);
00068         flags |= (1 << 14);
00069         flags |= (1 << 15);
00070     }
00071     QueueQueryResult()  : messageCount(0), subscriberCount(0), flags(0) {}
00072     
00073     QPID_COMMON_EXTERN void setQueue(const std::string& _queue);
00074     QPID_COMMON_EXTERN const std::string& getQueue() const;
00075     QPID_COMMON_EXTERN bool hasQueue() const;
00076     QPID_COMMON_EXTERN void clearQueueFlag();
00077     QPID_COMMON_EXTERN void setAlternateExchange(const std::string& _alternateExchange);
00078     QPID_COMMON_EXTERN const std::string& getAlternateExchange() const;
00079     QPID_COMMON_EXTERN bool hasAlternateExchange() const;
00080     QPID_COMMON_EXTERN void clearAlternateExchangeFlag();
00081     QPID_COMMON_EXTERN void setDurable(bool _durable);
00082     QPID_COMMON_EXTERN bool getDurable() const;
00083     QPID_COMMON_EXTERN void setExclusive(bool _exclusive);
00084     QPID_COMMON_EXTERN bool getExclusive() const;
00085     QPID_COMMON_EXTERN void setAutoDelete(bool _autoDelete);
00086     QPID_COMMON_EXTERN bool getAutoDelete() const;
00087     QPID_COMMON_EXTERN void setArguments(const FieldTable& _arguments);
00088     QPID_COMMON_EXTERN const FieldTable& getArguments() const;
00089     QPID_COMMON_EXTERN FieldTable& getArguments();
00090     QPID_COMMON_EXTERN bool hasArguments() const;
00091     QPID_COMMON_EXTERN void clearArgumentsFlag();
00092     QPID_COMMON_EXTERN void setMessageCount(uint32_t _messageCount);
00093     QPID_COMMON_EXTERN uint32_t getMessageCount() const;
00094     QPID_COMMON_EXTERN bool hasMessageCount() const;
00095     QPID_COMMON_EXTERN void clearMessageCountFlag();
00096     QPID_COMMON_EXTERN void setSubscriberCount(uint32_t _subscriberCount);
00097     QPID_COMMON_EXTERN uint32_t getSubscriberCount() const;
00098     QPID_COMMON_EXTERN bool hasSubscriberCount() const;
00099     QPID_COMMON_EXTERN void clearSubscriberCountFlag();
00100     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const QueueQueryResult&);
00101     QPID_COMMON_EXTERN void encode(Buffer&) const;
00102     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00103     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00104     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00105     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00106     QPID_COMMON_EXTERN uint32_t bodySize() const;
00107     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00108 }; /* class QueueQueryResult */
00109 
00110 }}
00111 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00640.html0000664000076400007640000001456311752725717017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaArgument Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/doxygen.png0000664000076400007640000000754611752725717020016 0ustar00jrossjross00000000000000‰PNG  IHDRh ;ˆØ-IDATxí]{XŒyÿ¾sZ%Ê”NF:¨´FåЪքbÝè@;~ÓŽÃ"DH‘ÚZ•ð–m_Œéè4ÄÙÚ!ë-‡2«U«Ce[Š"§š_ñÌ3óLSìõ¾ï¾öº|®««y>§ïý¹ïïá_ ™L†öþZ·¼ß¦ajëñ®¹L•oñúþ}«.Íë2Þãû$Zöå);*.d¥~Ûìß³wˆ—·'ˆâ0³Ëâþ@áû!ZZeÊÿÁÞͺwÓøÏÔÚ‰ù?ØO =\Lâ[òg²dxr0Ð —€¤Rrj·Jž€‘*í.WJN5¨äÉqÈMªÔ[mºÞ•’Sb58™Ä¼RB5½¥•’SRus[2<ÙÄ %·˜˜•²V'˜ê+%§$fv˜ØÄºR»«Kó$ ¡¥C 4ã+xº˜£½sQÙ}f¶ðÀ[²vôZ €ç6c}”½!,Lt×ï<ÂÅ«µ°dx†H)/ÎÙfí襧¥C«1¶v£ôº[~– ÏÑåÅ9%DÏDKgžrN}M9úY««3*/Îi謷%ÓU^œ#¶vôr'p²=]ÌÑ_§7®ßy„ìS¸ª½ëkÊaÉð´-/Î!E²vôâà902œíÁÉ–FæŸ*¸Å,ý­– O!1k>QÓÓ³¦°dx¦X:ûð¼=GÃÂD×ï<ÂþÃ'¸fvRªKó‚UZjbóièþ¤`èõýˆtº9cùœ‘xÕÚªV W­­°sžabóièw1ó1x%îæhŒ¹Þ¶¸9׉>oÕ®hkG¯~¥—Nl°sž"^™ÀdŽ2%sw…ø¨•¼W­­‹ìœ§D¸z¯àí W †Æç˜8c>‚í1”ô‡m·Bvêî«ÖÖ8܉ÞAˆZò þT…u—r­½ª´th9kÂÖRêåŸSfÛþ/d§–°‰¾äœ1kçb„A.ܸ@ø“+;:j ÛÚÑË«ôÒ‰|#­Ýp4i®â¨]¼â߯óV~éØÇŒ…xfv$Õ¥y| S[ö;BOK‡V“ÅßÖàÎÌa 4x0¶Ï:ÂßDN54>Çgœõxp÷ªo;Z:´¬œÃÉ”º€ÕÇðë™ïbÛ‡ªöü|Ñ^TŠ7=$4)L!Ü/åuü’#)9/rqÃ%îØÅï¬~a”çŽÅ-à¸poE ‚”®,|gŽ¥m /9/ŠsÃâ˜Ø|šœ±c Ó/åu¨ü Êë€P\…aÁÂ’ó¢‡1,¦¥Ó¢Ã;ueòyªKó\ä…°üÃ"7-K!3>õ2ÊËËamm åÚÈr7M.(~[2ÓÝÉ„Œ]©¨C<¿í»b9Ç[)v[~Ñ,_º@\|î8ËqÜ´{· Ð}QÞ”ugr7àÛÈJ]|Úe¤ïÚ`ƒ–­æçÿ¤à™4s5Ü+µÕÒ¡•©Æ\§áéãû¶Ù•ýxàJ,ûÌudùùs&@yŽõI…eD…Ÿ;ç8nZÁž={ʘfóQU|X ÞØÚ)ض˜"ÞtîVÜ-ÏwÐo¨ãç¢ý‰œöJy>¶6è°¹ ÌFrÊf¥ÑÍú’ KbÏà¼(!@~»ó³) F¹{€í€Ave'3£Hÿ£¦˜î»Íu @³¯Aò±¬$èj÷"s&û…½&ób~¶t”»w¢ÿ¼¼¥þŠ·öQÓ J~Iå âJÚö½˜Ÿ]=ÊÝ;=|S{ºû™Éç‘“nçÊÜ9ôË¿ÈõË„.{ù®‰Ü´`Œb³ßÅÊå ÅâÚž)†j\Þ€ÔΕ›ÞY_ÂE_¸â.gÚ0uõ‹‘Ÿ‰2ݪiDàWËÐÜX'ÖìkÀÌÿº©ü–ñqýòV¶gDO³¯Ý„¦âÁÔôçE 6È ä1cZŒ¦ÄÄ—n£¹±NXxú(¿] ±ãgL_ºM!ÓÐb4Ü+e´´Ê¤âŽdüƒç62[é£]Am­ž,b÷@Jáé£Õ„ÿð‘Ü_Ù,Wºˆr€‘®Îèr_g8ÕÕ&(ÁQAäÛ4·­Ÿò.«ö—¯­ajëAïghS–öÝFJËÛhheg©‹³;Lýcs é/¼RƒÈõËÄ¢ì,‘—¾84†íõ‰9™óõ:n–œ`‰²³Ä,o_ï~†6YIqaÐÑî¥vÊèã¸v>=V”E¹æXÞ¾5™é=uu›^À/ °A”eD䆸ÍX¹j®S¬‘#§Ï^Ëžç3œŒÇì-ÂÙ£[Ã@µövmæÏ ’X ÊÎÊW¤×vú9šÚúѽµõQ_{ͽ3žäW\ø¦æØ:p¤ajëeIÉ)tšâîŽåáܱ8Iû£>xødÆöEóöëd:ÛŒ4µõk¾OŽƒNI¼‰¨½q>m•á1!)[©›Vàb47ýa @æšṉ̃ p…%5Pþ~üä¾Z‚æ¦?| 3³•0DN  á}® Unû¬@ú® » 3¹ÌÁÃ'‹Tç(,©ÁÏ—ïÂÁÊ^.ŠM¤ÄA8a?šUÙ¾äJ<§à2S÷ þ~…@=hjë3-GÍÄ|ŸÈ8Y.¯—¨®]XRƒèËIT9X²A€›¿ž$ÚéÇÛÈõ™hIPvã!ÀvHÿ°}Úo)Ͷ‡8rŠßš ¶=…Ч*^÷˜éiEïŸÂ«8‘"<˜Ìö Ht™¶œ·"Б²æ–͘á¿Êx.üZ‹˜M!b~ƒé Ã!c ’bwÀ·zëqT\È L*a.ˆŒÙÁP7:Û*(FÁñøpáÁô8¶O@â¿5<å9•17>yö“1z¸a‡zs{/Q†9æ‘ ´j}S¹vYD*n]Í!rÐhyakÔj ™Ê„«úgúÍ‘ d¦©­_¾*llé]^&}ˆ˜¨ÍhnúÃÛpȨèí[¨ä.Y»µ7..ÐÔÖOŽÚ²ÆµÉX|Úeœ%¤ÈL%äL¿9e ‰Étå¼ÇO^ (ˆÛp 3U±%ßär ‡ŒJŽ ›§vÎ2éCÊ Äzá2SãfúÍ1êÃ]Ïõ™@ÝÈ™¼€ÄÜn’èÛp%®Ö"nËJR µß2GÛ+Z™Š[¥?’@„½[PèâÙcÐWKþÂÕZìÛó=’â×Q÷ŸšiøÏäôîÓ?yê¬E`3‡ª+Wá‡ý;ñìÉÃŽöîÓ¿fóæHŠÛÒ%¸x2!%#Mì?;p)î°™*à²u;p_zÉ%#M !pˆ‚WÇR†Š«phϦÝi‚Eª8ügFôîÓ?ÔÁíKÈïü²ëp)_+Ç©XÀPÅž‘&ˆ#jðÌí&q=˜n˜0ÚLí¬×n>Dá•\Ê¢á÷J[ts»I¢è5³)¼&~J ¤:Úè´µAB„î@‹PKÆ´×doCú)ñÑaSteLgÓ.㦶襩›Àÿ?MàÙ¿|Ö¸bÙšs+s’¤Ÿ¸†ÑtïÙ›À@€<öòyÓ¶_=ï ‡žok®Ô‡Û¶½ÚžŸ¿x¾Œª¢Ã=ä_C?ÝlÐßB™«WŠp·òœ‰ÙcK3=hh(b%ùÐ7u@}mEû»ÃtØxØØØâRÁ)ÔUÿ¢%“2™ ݺ)©Ø™¢;¸œŸnÝ{†®ÃÆÎ†‰¡î_2Ÿ´úªŠ ý‘ýLKϲַÆöEe÷¡A(ô¤ù%ž?iÀÓÆßÓ¸›`N·zýàëÑ,ñðÞo´w¯ÊNõ{elЧ‡òÉ«}ð·êq¥ì&ªKsñüÉÃän=>º`á°±³Ýÿ*q:½âht§¿Õw_Z”ÞòòÙ^š:cå¾nÝ{âùÓ†‹Ýº÷Ì`N£;‘×›Üj*ÿµ½¥å¥K¯Þ}^4?&ý=zi¡—¦zkõCcýPBht'×ÿÑ|UE‡ä1 ý;ž&5v›øßõëÛµ]@kS}ðÿpŽªª¢ÃâÕ¥y &þ>Ø{fÝ>Pð~ÛÿÞžk˜^œIEND®B`‚qpidc-0.16/docs/api/html/a00087.html0000664000076400007640000001040211752725720017313 0ustar00jrossjross00000000000000 std::list::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::list::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00153.html0000664000076400007640000006160411752725720017317 0ustar00jrossjross00000000000000 qpid::framing::Integer16Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Integer16Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Integer16Value (int16_t)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Integer16Value::Integer16Value ( int16_t  )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x6c.html0000664000076400007640000002257211752725717021365 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x65.html0000664000076400007640000005546211752725717021313 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- e -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00510.html0000664000076400007640000001234711752725717017322 0ustar00jrossjross00000000000000 qpid/framing/List.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/List.h File Reference
#include "qpid/CommonImportExport.h"
#include "qpid/framing/amqp_types.h"
#include <iostream>
#include <list>
#include <boost/shared_ptr.hpp>

Go to the source code of this file.

Classes

class  qpid::framing::List
 Representation of an AMQP 0-10 list. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00459_source.html0000664000076400007640000013326711752725717020723 0ustar00jrossjross00000000000000 qpid/client/no_keyword/AsyncSession_0_10.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/no_keyword/AsyncSession_0_10.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_NO_KEYWORD_ASYNCSESSION_0_10_H
00002 #define QPID_CLIENT_NO_KEYWORD_ASYNCSESSION_0_10_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/client/SessionBase_0_10.h"
00031 #include "qpid/client/ClientImportExport.h"
00032 
00033 namespace qpid {
00034 namespace client {
00035 namespace no_keyword {
00036 
00046 class AsyncSession_0_10:
00047     public SessionBase_0_10
00048 {
00049   public:
00050     
00051     QPID_CLIENT_EXTERN AsyncSession_0_10();
00052     QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10(const SessionBase_0_10& other);
00053     QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10& operator=(const SessionBase_0_10& other);
00054     
00064     QPID_CLIENT_EXTERN Completion executionSync(bool sync=false);
00065     
00079     QPID_CLIENT_EXTERN Completion executionResult(const SequenceNumber& commandId=SequenceNumber(), const std::string& value=std::string(), bool sync=false);
00080     
00118     QPID_CLIENT_EXTERN Completion executionException(uint16_t errorCode=0, const SequenceNumber& commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string& description=std::string(), const FieldTable& errorInfo=FieldTable(), bool sync=false);
00119     
00154     QPID_CLIENT_EXTERN Completion messageTransfer(const std::string& destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message& content=Message(std::string()), bool sync=false);
00155     
00171     QPID_CLIENT_EXTERN Completion messageAccept(const SequenceSet& transfers=SequenceSet(), bool sync=false);
00172     
00200     QPID_CLIENT_EXTERN Completion messageReject(const SequenceSet& transfers=SequenceSet(), uint16_t code=0, const std::string& text=std::string(), bool sync=false);
00201     
00226     QPID_CLIENT_EXTERN Completion messageRelease(const SequenceSet& transfers=SequenceSet(), bool setRedelivered=false, bool sync=false);
00227     
00243     QPID_CLIENT_EXTERN TypedResult<qpid::framing::MessageAcquireResult> messageAcquire(const SequenceSet& transfers=SequenceSet(), bool sync=false);
00244     
00267     QPID_CLIENT_EXTERN TypedResult<qpid::framing::MessageResumeResult> messageResume(const std::string& destination=std::string(), const std::string& resumeId=std::string(), bool sync=false);
00268     
00308     QPID_CLIENT_EXTERN Completion messageSubscribe(const std::string& queue=std::string(), const std::string& destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string& resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable& arguments=FieldTable(), bool sync=false);
00309     
00324     QPID_CLIENT_EXTERN Completion messageCancel(const std::string& destination=std::string(), bool sync=false);
00325     
00361     QPID_CLIENT_EXTERN Completion messageSetFlowMode(const std::string& destination=std::string(), uint8_t flowMode=0, bool sync=false);
00362     
00389     QPID_CLIENT_EXTERN Completion messageFlow(const std::string& destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=false);
00390     
00404     QPID_CLIENT_EXTERN Completion messageFlush(const std::string& destination=std::string(), bool sync=false);
00405     
00419     QPID_CLIENT_EXTERN Completion messageStop(const std::string& destination=std::string(), bool sync=false);
00420     
00431     QPID_CLIENT_EXTERN Completion txSelect(bool sync=false);
00432     
00443     QPID_CLIENT_EXTERN Completion txCommit(bool sync=false);
00444     
00456     QPID_CLIENT_EXTERN Completion txRollback(bool sync=false);
00457     
00468     QPID_CLIENT_EXTERN Completion dtxSelect(bool sync=false);
00469     
00496     QPID_CLIENT_EXTERN TypedResult<qpid::framing::XaResult> dtxStart(const Xid& xid=Xid(), bool join=false, bool resume=false, bool sync=false);
00497     
00524     QPID_CLIENT_EXTERN TypedResult<qpid::framing::XaResult> dtxEnd(const Xid& xid=Xid(), bool fail=false, bool suspend=false, bool sync=false);
00525     
00547     QPID_CLIENT_EXTERN TypedResult<qpid::framing::XaResult> dtxCommit(const Xid& xid=Xid(), bool onePhase=false, bool sync=false);
00548     
00563     QPID_CLIENT_EXTERN Completion dtxForget(const Xid& xid=Xid(), bool sync=false);
00564     
00581     QPID_CLIENT_EXTERN TypedResult<qpid::framing::DtxGetTimeoutResult> dtxGetTimeout(const Xid& xid=Xid(), bool sync=false);
00582     
00597     QPID_CLIENT_EXTERN TypedResult<qpid::framing::XaResult> dtxPrepare(const Xid& xid=Xid(), bool sync=false);
00598     
00609     QPID_CLIENT_EXTERN TypedResult<qpid::framing::DtxRecoverResult> dtxRecover(bool sync=false);
00610     
00626     QPID_CLIENT_EXTERN TypedResult<qpid::framing::XaResult> dtxRollback(const Xid& xid=Xid(), bool sync=false);
00627     
00647     QPID_CLIENT_EXTERN Completion dtxSetTimeout(const Xid& xid=Xid(), uint32_t timeout=0, bool sync=false);
00648     
00704     QPID_CLIENT_EXTERN Completion exchangeDeclare(const std::string& exchange=std::string(), const std::string& type=std::string(), const std::string& alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable& arguments=FieldTable(), bool sync=false);
00705     
00725     QPID_CLIENT_EXTERN Completion exchangeDelete(const std::string& exchange=std::string(), bool ifUnused=false, bool sync=false);
00726     
00742     QPID_CLIENT_EXTERN TypedResult<qpid::framing::ExchangeQueryResult> exchangeQuery(const std::string& name=std::string(), bool sync=false);
00743     
00770     QPID_CLIENT_EXTERN Completion exchangeBind(const std::string& queue=std::string(), const std::string& exchange=std::string(), const std::string& bindingKey=std::string(), const FieldTable& arguments=FieldTable(), bool sync=false);
00771     
00796     QPID_CLIENT_EXTERN Completion exchangeUnbind(const std::string& queue=std::string(), const std::string& exchange=std::string(), const std::string& bindingKey=std::string(), bool sync=false);
00797     
00830     QPID_CLIENT_EXTERN TypedResult<qpid::framing::ExchangeBoundResult> exchangeBound(const std::string& exchange=std::string(), const std::string& queue=std::string(), const std::string& bindingKey=std::string(), const FieldTable& arguments=FieldTable(), bool sync=false);
00831     
00892     QPID_CLIENT_EXTERN Completion queueDeclare(const std::string& queue=std::string(), const std::string& alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable& arguments=FieldTable(), bool sync=false);
00893     
00920     QPID_CLIENT_EXTERN Completion queueDelete(const std::string& queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=false);
00921     
00937     QPID_CLIENT_EXTERN Completion queuePurge(const std::string& queue=std::string(), bool sync=false);
00938     
00950     QPID_CLIENT_EXTERN TypedResult<qpid::framing::QueueQueryResult> queueQuery(const std::string& queue=std::string(), bool sync=false);
00951 };
00952 
00953 }}} // namespace qpid::client::no_keyword
00954 
00955 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00857.html0000664000076400007640000001450211752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::NoMessageAvailable Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00591.html0000664000076400007640000007530111752725720017324 0ustar00jrossjross00000000000000 qpid::messaging Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging Namespace Reference

Classes

class  Address
 Represents an address to which messages can be sent and from which messages can be received. More...
class  Connection
 A connection represents a network connection to a remote endpoint. More...
class  Duration
 A duration is a time in milliseconds. More...
struct  MessagingException
 This is the base class for all messaging related exceptions thrown by this API. More...
struct  InvalidOptionString
 Thrown when the syntax of the option string used to configure a connection in not valid. More...
struct  KeyError
 Thrown to indicate a failed lookup of some local object. More...
struct  LinkError
struct  AddressError
struct  ResolutionError
 Thrown when a syntactically correct address cannot be resolved or used. More...
struct  AssertionFailed
 Thrown when creating a sender or receiver for an address for which some asserted property of the node is not matched. More...
struct  NotFound
 Thrown on attempts to create a sender or receiver to a non-existent node. More...
struct  MalformedAddress
 Thrown when an address string with invalid syntax is used. More...
struct  ReceiverError
struct  FetchError
struct  NoMessageAvailable
 Thrown by Receiver::fetch(), Receiver::get() and Session::nextReceiver() to indicate that there no message was available before the timeout specified. More...
struct  SenderError
struct  SendError
struct  TargetCapacityExceeded
 Thrown to indicate that the sender attempted to send a message that would result in the target node on the peer exceeding a preconfigured capacity. More...
struct  SessionError
struct  TransactionError
struct  TransactionAborted
 Thrown on Session::commit() if reconnection results in the transaction being automatically aborted. More...
struct  UnauthorizedAccess
 Thrown to indicate that the application attempted to do something for which it was not authorised by its peer. More...
struct  ConnectionError
struct  TransportFailure
 Thrown to indicate loss of underlying connection. More...
class  FailoverUpdates
 A utility to listen for updates on cluster membership and update the list of known urls for a connection accordingly. More...
class  Handle
 A handle is like a pointer: refers to an underlying implementation object. More...
class  Message
 Representation of a message. More...
struct  EncodingException
class  Receiver
 Interface through which messages are received. More...
class  Sender
 Interface through which messages are sent. More...
class  Session
 A session represents a distinct 'conversation' which can involve sending and receiving messages to and from different addresses. More...

Functions

std::ostreamoperator<< (std::ostream &out, const Address &address)
Duration operator* (const Duration &duration, uint64_t multiplier)
Duration operator* (uint64_t multiplier, const Duration &duration)
bool operator== (const Duration &a, const Duration &b)
bool operator!= (const Duration &a, const Duration &b)
void decode (const Message &message, qpid::types::Variant::Map &map, const std::string &encoding=std::string())
 Decodes message content into a Variant::Map.
void decode (const Message &message, qpid::types::Variant::List &list, const std::string &encoding=std::string())
 Decodes message content into a Variant::List.
void encode (const qpid::types::Variant::Map &map, Message &message, const std::string &encoding=std::string())
 Encodes a Variant::Map into a message.
void encode (const qpid::types::Variant::List &list, Message &message, const std::string &encoding=std::string())
 Encodes a Variant::List into a message.

Function Documentation

void qpid::messaging::decode ( const Message &  message,
qpid::types::Variant::Map map,
const std::string encoding = std::string() 
)

Decodes message content into a Variant::Map.

Parameters:
messagethe message whose content should be decoded
mapthe map into which the message contents will be decoded
encodingif specified, the encoding to use - this overrides any encoding specified by the content-type of the message
Exceptions:
EncodingException
void qpid::messaging::decode ( const Message &  message,
qpid::types::Variant::List list,
const std::string encoding = std::string() 
)

Decodes message content into a Variant::List.

Parameters:
messagethe message whose content should be decoded
listthe list into which the message contents will be decoded
encodingif specified, the encoding to use - this overrides any encoding specified by the content-type of the message
Exceptions:
EncodingException
void qpid::messaging::encode ( const qpid::types::Variant::Map map,
Message &  message,
const std::string encoding = std::string() 
)

Encodes a Variant::Map into a message.

Parameters:
mapthe map to be encoded
messagethe message whose content should be set to the encoded map
encodingif specified, the encoding to use - this overrides any encoding specified by the content-type of the message
Exceptions:
EncodingException
void qpid::messaging::encode ( const qpid::types::Variant::List list,
Message &  message,
const std::string encoding = std::string() 
)

Encodes a Variant::List into a message.

Parameters:
listthe list to be encoded
messagethe message whose content should be set to the encoded list
encodingif specified, the encoding to use - this overrides any encoding specified by the content-type of the message
Exceptions:
EncodingException
bool qpid::messaging::operator!= ( const Duration &  a,
const Duration &  b 
)
Duration qpid::messaging::operator* ( const Duration &  duration,
uint64_t  multiplier 
)
Duration qpid::messaging::operator* ( uint64_t  multiplier,
const Duration &  duration 
)
std::ostream& qpid::messaging::operator<< ( std::ostream out,
const Address &  address 
)
bool qpid::messaging::operator== ( const Duration &  a,
const Duration &  b 
)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00527_source.html0000664000076400007640000003631511752725717020713 0ustar00jrossjross00000000000000 qpid/InlineAllocator.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/InlineAllocator.h
Go to the documentation of this file.
00001 #ifndef QPID_INLINEALLOCATOR_H
00002 #define QPID_INLINEALLOCATOR_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include <memory>
00026 #include <assert.h>
00027 #include <boost/type_traits/type_with_alignment.hpp>
00028 #include <boost/type_traits/alignment_of.hpp>
00029 
00030 namespace qpid {
00031 
00032 template <typename RequestedType, typename InlineType, typename BaseAllocator, size_t Max>
00033 struct InlineRebind;
00034 
00035 
00040 template <class BaseAllocator, size_t Max>
00041 class InlineAllocator : public BaseAllocator {
00042   public:
00043     typedef typename BaseAllocator::pointer pointer;
00044     typedef typename BaseAllocator::size_type size_type;
00045     typedef typename BaseAllocator::value_type value_type;
00046 
00047     InlineAllocator() : allocated(false) {}
00048     InlineAllocator(const InlineAllocator& x) : BaseAllocator(x), allocated(false) {}
00049 
00050     pointer allocate(size_type n) {
00051         if (n <= Max && !allocated) {
00052             allocated=true;
00053             return reinterpret_cast<value_type*>(address());
00054         }
00055         else
00056             return BaseAllocator::allocate(n, 0);
00057     }
00058 
00059     void deallocate(pointer p, size_type n) {
00060         if (p == address()) {
00061             assert(allocated);
00062             allocated=false;
00063         }
00064         else
00065             BaseAllocator::deallocate(p, n);
00066     }
00067 
00068     template<typename T1>
00069     struct rebind {
00070         typedef typename InlineRebind<T1, value_type, BaseAllocator, Max>::other other;
00071     };
00072 
00073   private:
00074     // POD object with alignment and size to hold Max value_types.
00075     static const size_t ALIGNMENT=boost::alignment_of<value_type>::value;
00076     typedef typename boost::type_with_alignment<ALIGNMENT>::type Aligner;
00077     union Store {
00078       Aligner aligner_;
00079       char sizer_[sizeof(value_type)*Max];
00080     } store;
00081     value_type* address() { return reinterpret_cast<value_type*>(&store); }
00082     bool allocated;
00083 };
00084 
00085 
00086 // Rebind: if RequestedType == InlineType, use the InlineAllocator,
00087 // otherwise, use the BaseAllocator without any inlining.
00088 
00089 template <typename RequestedType, typename InlineType, typename BaseAllocator, size_t Max>
00090 struct InlineRebind {
00091     typedef typename BaseAllocator::template rebind<RequestedType>::other other;
00092 };
00093 
00094 template <typename T, typename BaseAllocator, size_t Max>
00095 struct InlineRebind<T, T, BaseAllocator, Max> {
00096     typedef typename qpid::InlineAllocator<BaseAllocator, Max> other;
00097 };
00098 
00099 } // namespace qpid
00100 
00101 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00843.html0000664000076400007640000001760411752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Address Member List
This is the complete list of members for qpid::messaging::Address, including all inherited members.
Address()qpid::messaging::Address
Address(const std::string &address)qpid::messaging::Address
Address(const std::string &name, const std::string &subject, const qpid::types::Variant::Map &options, const std::string &type="")qpid::messaging::Address
Address(const Address &address)qpid::messaging::Address
getName() const qpid::messaging::Address
getOptions() const qpid::messaging::Address
getOptions()qpid::messaging::Address
getSubject() const qpid::messaging::Address
getType() const qpid::messaging::Address
operator bool() const qpid::messaging::Address
operator!() const qpid::messaging::Address
operator=(const Address &)qpid::messaging::Address
setName(const std::string &)qpid::messaging::Address
setOptions(const qpid::types::Variant::Map &)qpid::messaging::Address
setSubject(const std::string &)qpid::messaging::Address
setType(const std::string &)qpid::messaging::Address
str() const qpid::messaging::Address
~Address()qpid::messaging::Address

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00247.html0000664000076400007640000001456711752725720017331 0ustar00jrossjross00000000000000 qpid::management::OutOfBounds Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::OutOfBounds Struct Reference

#include <qpid/management/Buffer.h>

List of all members.

Public Member Functions

 OutOfBounds ()
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Constructor & Destructor Documentation

qpid::management::OutOfBounds::OutOfBounds ( ) [inline]

Definition at line 35 of file Buffer.h.


Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00523_source.html0000664000076400007640000003165611752725717020712 0ustar00jrossjross00000000000000 qpid/framing/Uuid.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Uuid.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_UUID_H
00002 #define QPID_FRAMING_UUID_H
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/CommonImportExport.h"
00023 #include "qpid/sys/IntegerTypes.h"
00024 
00025 #include <boost/array.hpp>
00026 
00027 #include <ostream>
00028 #include <istream>
00029 
00030 namespace qpid {
00031 namespace framing {
00032 
00033 class Buffer;
00034 
00044 struct Uuid : public boost::array<uint8_t, 16> {
00046     QPID_COMMON_EXTERN Uuid(bool unique=false);
00047 
00049     QPID_COMMON_EXTERN Uuid(const uint8_t* data);
00050 
00051     // Default op= and copy ctor are fine.
00052     // boost::array gives us ==, < etc.
00053 
00055     QPID_COMMON_EXTERN void assign(const uint8_t* data);
00056 
00058     QPID_COMMON_EXTERN void generate();
00059 
00061     QPID_COMMON_EXTERN void clear();
00062 
00064     QPID_COMMON_EXTERN bool isNull() const;
00065     QPID_COMMON_INLINE_EXTERN operator bool() const { return !isNull(); }
00066     QPID_COMMON_INLINE_EXTERN bool operator!() const { return isNull(); }
00067 
00068     QPID_COMMON_EXTERN void encode(framing::Buffer& buf) const;
00069     QPID_COMMON_EXTERN void decode(framing::Buffer& buf);
00070     QPID_COMMON_INLINE_EXTERN uint32_t encodedSize() const
00071         { return static_cast<uint32_t>(size()); }
00072 
00074     QPID_COMMON_EXTERN std::string str() const;
00075 
00076     template <class S> void serialize(S& s) {
00077         s.raw(begin(), size());
00078     }
00079 };
00080 
00082 QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, Uuid);
00083 
00085 QPID_COMMON_EXTERN std::istream& operator>>(std::istream&, Uuid&);
00086 
00087 }} // namespace qpid::framing
00088 
00089 
00090 
00091 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00312.html0000664000076400007640000001517311752725720017314 0ustar00jrossjross00000000000000 qpid::sys::ScopedLock Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ScopedLock Class Reference

Scoped lock template: calls lock() in ctor, unlock() in dtor. More...

#include <qpid/sys/Mutex.h>

List of all members.

Public Member Functions

 ScopedLock (L &l)
 ~ScopedLock ()

Detailed Description

Scoped lock template: calls lock() in ctor, unlock() in dtor.

L can be any class with lock() and unlock() functions.


Constructor & Destructor Documentation

qpid::sys::ScopedLock::ScopedLock ( L &  l) [inline]

Definition at line 33 of file Mutex.h.

qpid::sys::ScopedLock::~ScopedLock ( ) [inline]

Definition at line 34 of file Mutex.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00215.html0000664000076400007640000001705511752725720017317 0ustar00jrossjross00000000000000 qpid::console::MethodResponse Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::MethodResponse Struct Reference

#include <qpid/console/Object.h>

List of all members.

Public Attributes

uint32_t code
std::string text
std::map< std::string,
boost::shared_ptr< Value > > 
arguments

Member Data Documentation

Definition at line 52 of file Object.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00569_source.html0000664000076400007640000010377511752725717020726 0ustar00jrossjross00000000000000 qpid/types/Variant.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/types/Variant.h
Go to the documentation of this file.
00001 #ifndef QPID_TYPES_VARIANT_H
00002 #define QPID_TYPES_VARIANT_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include <list>
00025 #include <map>
00026 #include <ostream>
00027 #include <string>
00028 #include "Uuid.h"
00029 #include "qpid/types/Exception.h"
00030 #include "qpid/sys/IntegerTypes.h"
00031 #include "qpid/types/ImportExport.h"
00032 
00033 namespace qpid {
00034 namespace types {
00035 
00039 struct QPID_TYPES_CLASS_EXTERN InvalidConversion : public Exception 
00040 {
00041     InvalidConversion(const std::string& msg);
00042 };
00043 
00044 enum VariantType {
00045     VAR_VOID = 0,
00046     VAR_BOOL,
00047     VAR_UINT8,
00048     VAR_UINT16,
00049     VAR_UINT32,
00050     VAR_UINT64,
00051     VAR_INT8,
00052     VAR_INT16,
00053     VAR_INT32,
00054     VAR_INT64,
00055     VAR_FLOAT,
00056     VAR_DOUBLE,
00057     VAR_STRING,
00058     VAR_MAP,
00059     VAR_LIST,
00060     VAR_UUID
00061 };
00062 
00063 QPID_TYPES_EXTERN std::string getTypeName(VariantType type);
00064 
00065 QPID_TYPES_EXTERN bool isIntegerType(VariantType type);
00066 
00067 class VariantImpl;
00068 
00072 class QPID_TYPES_CLASS_EXTERN Variant
00073 {
00074   public:
00075     typedef std::map<std::string, Variant> Map;
00076     typedef std::list<Variant> List;
00077 
00078     QPID_TYPES_EXTERN Variant();
00079     QPID_TYPES_EXTERN Variant(bool);
00080     QPID_TYPES_EXTERN Variant(uint8_t);
00081     QPID_TYPES_EXTERN Variant(uint16_t);
00082     QPID_TYPES_EXTERN Variant(uint32_t);
00083     QPID_TYPES_EXTERN Variant(uint64_t);
00084     QPID_TYPES_EXTERN Variant(int8_t);
00085     QPID_TYPES_EXTERN Variant(int16_t);
00086     QPID_TYPES_EXTERN Variant(int32_t);
00087     QPID_TYPES_EXTERN Variant(int64_t);
00088     QPID_TYPES_EXTERN Variant(float);
00089     QPID_TYPES_EXTERN Variant(double);
00090     QPID_TYPES_EXTERN Variant(const std::string&);
00091     QPID_TYPES_EXTERN Variant(const char*);
00092     QPID_TYPES_EXTERN Variant(const Map&);
00093     QPID_TYPES_EXTERN Variant(const List&);
00094     QPID_TYPES_EXTERN Variant(const Variant&);
00095     QPID_TYPES_EXTERN Variant(const Uuid&);
00096 
00097     QPID_TYPES_EXTERN ~Variant();
00098 
00099     QPID_TYPES_EXTERN VariantType getType() const;
00100     QPID_TYPES_EXTERN bool isVoid() const;
00101     
00102     QPID_TYPES_EXTERN Variant& operator=(bool);
00103     QPID_TYPES_EXTERN Variant& operator=(uint8_t);
00104     QPID_TYPES_EXTERN Variant& operator=(uint16_t);
00105     QPID_TYPES_EXTERN Variant& operator=(uint32_t);
00106     QPID_TYPES_EXTERN Variant& operator=(uint64_t);
00107     QPID_TYPES_EXTERN Variant& operator=(int8_t);
00108     QPID_TYPES_EXTERN Variant& operator=(int16_t);
00109     QPID_TYPES_EXTERN Variant& operator=(int32_t);
00110     QPID_TYPES_EXTERN Variant& operator=(int64_t);
00111     QPID_TYPES_EXTERN Variant& operator=(float);
00112     QPID_TYPES_EXTERN Variant& operator=(double);
00113     QPID_TYPES_EXTERN Variant& operator=(const std::string&);
00114     QPID_TYPES_EXTERN Variant& operator=(const char*);
00115     QPID_TYPES_EXTERN Variant& operator=(const Map&);
00116     QPID_TYPES_EXTERN Variant& operator=(const List&);
00117     QPID_TYPES_EXTERN Variant& operator=(const Variant&);
00118     QPID_TYPES_EXTERN Variant& operator=(const Uuid&);
00119 
00124     QPID_TYPES_EXTERN Variant& parse(const std::string&);
00125 
00126     QPID_TYPES_EXTERN bool asBool() const;
00127     QPID_TYPES_EXTERN uint8_t asUint8() const;
00128     QPID_TYPES_EXTERN uint16_t asUint16() const;
00129     QPID_TYPES_EXTERN uint32_t asUint32() const;
00130     QPID_TYPES_EXTERN uint64_t asUint64() const;
00131     QPID_TYPES_EXTERN int8_t asInt8() const;
00132     QPID_TYPES_EXTERN int16_t asInt16() const;
00133     QPID_TYPES_EXTERN int32_t asInt32() const;
00134     QPID_TYPES_EXTERN int64_t asInt64() const;
00135     QPID_TYPES_EXTERN float asFloat() const;
00136     QPID_TYPES_EXTERN double asDouble() const;
00137     QPID_TYPES_EXTERN std::string asString() const;
00138     QPID_TYPES_EXTERN Uuid asUuid() const;
00139 
00140     QPID_TYPES_EXTERN operator bool() const;
00141     QPID_TYPES_EXTERN operator uint8_t() const;
00142     QPID_TYPES_EXTERN operator uint16_t() const;
00143     QPID_TYPES_EXTERN operator uint32_t() const;
00144     QPID_TYPES_EXTERN operator uint64_t() const;
00145     QPID_TYPES_EXTERN operator int8_t() const;
00146     QPID_TYPES_EXTERN operator int16_t() const;
00147     QPID_TYPES_EXTERN operator int32_t() const;
00148     QPID_TYPES_EXTERN operator int64_t() const;
00149     QPID_TYPES_EXTERN operator float() const;
00150     QPID_TYPES_EXTERN operator double() const;
00151     QPID_TYPES_EXTERN operator std::string() const;
00152     QPID_TYPES_EXTERN operator Uuid() const;
00153 
00154     QPID_TYPES_EXTERN const Map& asMap() const;
00155     QPID_TYPES_EXTERN Map& asMap();
00156     QPID_TYPES_EXTERN const List& asList() const;
00157     QPID_TYPES_EXTERN List& asList();
00162     QPID_TYPES_EXTERN const std::string& getString() const;
00163     QPID_TYPES_EXTERN std::string& getString();
00164 
00165     QPID_TYPES_EXTERN void setEncoding(const std::string&);
00166     QPID_TYPES_EXTERN const std::string& getEncoding() const;
00167 
00168     QPID_TYPES_EXTERN bool isEqualTo(const Variant& a) const;
00169 
00170     QPID_TYPES_EXTERN void reset();
00171   private:
00172     VariantImpl* impl;
00173 };
00174 
00175 #ifndef SWIG
00176 QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream& out, const Variant& value);
00177 QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream& out, const Variant::Map& map);
00178 QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream& out, const Variant::List& list);
00179 QPID_TYPES_EXTERN bool operator==(const Variant& a, const Variant& b);
00180 #endif
00181 }} // namespace qpid::types
00182 
00183 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00187.html0000664000076400007640000002332311752725720017322 0ustar00jrossjross00000000000000 qpid::log::LevelTraits Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::LevelTraits Struct Reference

#include <qpid/log/Statement.h>

List of all members.

Static Public Member Functions

static Level level (const char *name)
 Get level from string name.
static Level level (const std::string &name)
 Get level from string name.
static const char * name (Level)
 String name of level.

Static Public Attributes

static const int COUNT = critical+1

Member Function Documentation

static Level qpid::log::LevelTraits::level ( const char *  name) [static]

Get level from string name.

Exceptions:
ifname invalid.

Referenced by level().

static Level qpid::log::LevelTraits::level ( const std::string name) [inline, static]

Get level from string name.

Exceptions:
ifname invalid.

Definition at line 50 of file Statement.h.

References level().

static const char* qpid::log::LevelTraits::name ( Level  ) [static]

String name of level.


Member Data Documentation

const int qpid::log::LevelTraits::COUNT = critical+1 [static]

Definition at line 40 of file Statement.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x6f.html0000664000076400007640000006600011752725717021362 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- o -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00160.html0000664000076400007640000001024411752725720017307 0ustar00jrossjross00000000000000 std::invalid_argument Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::invalid_argument Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00742.html0000664000076400007640000003346611752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Buffer Member List
This is the complete list of members for qpid::framing::Buffer, including all inherited members.
available()qpid::framing::Buffer [inline]
Buffer(char *data=0, uint32_t size=0)qpid::framing::Buffer
checkAvailable(uint32_t count)qpid::framing::Buffer [inline]
dump(std::ostream &) const qpid::framing::Buffer
get(T &data)qpid::framing::Buffer [inline]
getBin128(uint8_t *b)qpid::framing::Buffer
getDouble()qpid::framing::Buffer
getFloat()qpid::framing::Buffer
getInt16()qpid::framing::Buffer
getInt32()qpid::framing::Buffer
getInt64()qpid::framing::Buffer
getInt8()qpid::framing::Buffer
getIterator()qpid::framing::Buffer [inline]
getLong()qpid::framing::Buffer
getLongLong()qpid::framing::Buffer
getLongString(string &s)qpid::framing::Buffer
getMediumString(string &s)qpid::framing::Buffer
getOctet()qpid::framing::Buffer
getPointer()qpid::framing::Buffer [inline]
getPosition()qpid::framing::Buffer [inline]
getRawData(string &s, uint32_t size)qpid::framing::Buffer
getRawData(uint8_t *data, size_t size)qpid::framing::Buffer
getShort()qpid::framing::Buffer
getShortString(string &s)qpid::framing::Buffer
getSize()qpid::framing::Buffer [inline]
getUInt()qpid::framing::Buffer
put(const T &data)qpid::framing::Buffer [inline]
putBin128(const uint8_t *b)qpid::framing::Buffer
putDouble(double f)qpid::framing::Buffer
putFloat(float f)qpid::framing::Buffer
putInt16(int16_t i)qpid::framing::Buffer
putInt32(int32_t i)qpid::framing::Buffer
putInt64(int64_t i)qpid::framing::Buffer
putInt8(int8_t i)qpid::framing::Buffer
putLong(uint32_t i)qpid::framing::Buffer
putLongLong(uint64_t i)qpid::framing::Buffer
putLongString(const string &s)qpid::framing::Buffer
putMediumString(const string &s)qpid::framing::Buffer
putOctet(uint8_t i)qpid::framing::Buffer
putRawData(const string &s)qpid::framing::Buffer
putRawData(const uint8_t *data, size_t size)qpid::framing::Buffer
putShort(uint16_t i)qpid::framing::Buffer
putShortString(const string &s)qpid::framing::Buffer
putUInt(uint64_t)qpid::framing::Buffer
record()qpid::framing::Buffer
reset()qpid::framing::Buffer
restore(bool reRecord=false)qpid::framing::Buffer
setPosition(uint32_t p)qpid::framing::Buffer [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00465_source.html0000664000076400007640000002746111752725717020716 0ustar00jrossjross00000000000000 qpid/client/FailoverManager.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FailoverManager.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_FAILOVERMANAGER_H
00002 #define QPID_CLIENT_FAILOVERMANAGER_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/Exception.h"
00026 #include "qpid/client/AsyncSession.h"
00027 #include "qpid/client/ClientImportExport.h"
00028 #include "qpid/client/Connection.h"
00029 #include "qpid/client/ConnectionSettings.h"
00030 #include "qpid/client/FailoverListener.h"
00031 #include "qpid/sys/Monitor.h"
00032 #include <vector>
00033 
00034 namespace qpid {
00035 namespace client {
00036 
00037 struct CannotConnectException : qpid::Exception
00038 {
00039     CannotConnectException(const std::string& m) : qpid::Exception(m) {}
00040 };
00041 
00045 class QPID_CLIENT_CLASS_EXTERN FailoverManager
00046 {
00047   public:
00052     struct Command
00053     {
00064         virtual void execute(AsyncSession& session, bool isRetry) = 0;
00065         virtual ~Command() {}
00066     };
00067 
00068     struct ReconnectionStrategy
00069     {
00077         virtual void editUrlList(std::vector<Url>&  urls) = 0;
00078         virtual ~ReconnectionStrategy() {}
00079     };
00080 
00089     QPID_CLIENT_EXTERN FailoverManager(const ConnectionSettings& settings, ReconnectionStrategy* strategy = 0);
00100     QPID_CLIENT_EXTERN Connection& connect(std::vector<Url> brokers = std::vector<Url>());
00104     QPID_CLIENT_EXTERN Connection& getConnection();
00108     QPID_CLIENT_EXTERN void close();
00121     QPID_CLIENT_EXTERN void execute(Command&);
00122   private:
00123     enum State {IDLE, CONNECTING, CANT_CONNECT};
00124 
00125     qpid::sys::Monitor lock;
00126     Connection connection;
00127     std::auto_ptr<FailoverListener> failoverListener;
00128     ConnectionSettings settings;
00129     ReconnectionStrategy* strategy;
00130     State state;
00131 
00132     void attempt(Connection&, ConnectionSettings settings, std::vector<Url> urls);
00133     void attempt(Connection&, ConnectionSettings settings);
00134 };
00135 }} // namespace qpid::client
00136 
00137 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00558.html0000664000076400007640000001143311752725717017331 0ustar00jrossjross00000000000000 qpid/sys/Monitor.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Monitor.h File Reference

Go to the source code of this file.

Classes

class  qpid::sys::Monitor
 A monitor is a condition variable and a mutex. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00456.html0000664000076400007640000001325311752725717017330 0ustar00jrossjross00000000000000 qpid/client/arg.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/arg.h File Reference
#include <boost/parameter.hpp>

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client
namespace  qpid::client::arg

Defines

#define BOOST_PARAMETER_MAX_ARITY   9
 This file was automatically generated from the AMQP specification.

Define Documentation

#define BOOST_PARAMETER_MAX_ARITY   9

This file was automatically generated from the AMQP specification.

Do not edit.

Definition at line 30 of file arg.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00722.html0000664000076400007640000001451211752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaClass Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00177.html0000664000076400007640000001031611752725720017317 0ustar00jrossjross00000000000000 std::deque::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::deque::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00836.html0000664000076400007640000001141211752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::AgentAttachment Member List
This is the complete list of members for qpid::management::AgentAttachment, including all inherited members.
AgentAttachment()qpid::management::AgentAttachment [inline]
getFirst() const qpid::management::AgentAttachment [inline]
setBanks(uint32_t broker, uint32_t bank)qpid::management::AgentAttachment

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00195.html0000664000076400007640000001021611752725720017316 0ustar00jrossjross00000000000000 std::logic_error Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::logic_error Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00580.html0000664000076400007640000044015311752725720017323 0ustar00jrossjross00000000000000 qpid::framing Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing Namespace Reference

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built. More...

Namespaces

namespace  cluster
namespace  connection
namespace  dtx
namespace  execution
namespace  file
namespace  message
namespace  session
namespace  stream

Classes

class  Array
struct  OutOfBounds
class  Buffer
class  DeliveryProperties
class  DtxGetTimeoutResult
class  DtxRecoverResult
class  ExchangeBoundResult
class  ExchangeQueryResult
class  FieldTable
 A set of name-value pairs. More...
class  FieldValueException
 Exception that is the base exception for all field table errors. More...
struct  InvalidConversionException
 Exception thrown when we can't perform requested conversion. More...
class  FieldValue
 Value that can appear in an AMQP field table. More...
class  FixedWidthValue
class  FixedWidthValue< 0 >
class  VariableWidthValue
class  EncodedValue
class  Str8Value
class  Str16Value
class  Var16Value
class  Var32Value
class  Struct32Value
class  FloatValue
class  DoubleValue
class  IntegerValue
class  TimeValue
class  Integer64Value
class  Unsigned64Value
class  FieldTableValue
class  ArrayValue
class  VoidValue
class  BoolValue
class  Unsigned8Value
class  Unsigned16Value
class  Unsigned32Value
class  Integer8Value
class  Integer16Value
class  ListValue
class  UuidValue
class  FileProperties
class  FragmentProperties
class  Header
class  List
 Representation of an AMQP 0-10 list. More...
class  MessageAcquireResult
class  MessageProperties
class  MessageResumeResult
class  ProtocolVersion
class  QueueQueryResult
struct  UnauthorizedAccessException
 The client attempted to work with a server entity to which it has no access due to security settings. More...
struct  NotFoundException
 The client attempted to work with a server entity that does not exist. More...
struct  ResourceLockedException
 The client attempted to work with a server entity to which it has no access because another client is working with it. More...
struct  PreconditionFailedException
 The client requested a command that was not allowed because some precondition failed. More...
struct  ResourceDeletedException
 A server entity the client is working with has been deleted. More...
struct  IllegalStateException
 The peer sent a command that is not permitted in the current state of the session. More...
struct  CommandInvalidException
 The command segments could not be decoded. More...
struct  ResourceLimitExceededException
 The client exceeded its resource allocation. More...
struct  NotAllowedException
 The peer tried to use a command a manner that is inconsistent with the rules described in the specification. More...
struct  IllegalArgumentException
 The command argument is malformed, i.e. More...
struct  NotImplementedException
 The peer tried to use functionality that is not implemented in its partner. More...
struct  InternalErrorException
 The peer could not complete the command because of an internal error. More...
struct  InvalidArgumentException
 An invalid argument was passed to a command, and the operation could not proceed. More...
struct  ConnectionForcedException
 An operator intervened to close the connection for some reason. More...
struct  InvalidPathException
 The client tried to work with an unknown virtual host. More...
struct  FramingErrorException
 A valid frame header cannot be formed from the incoming byte stream. More...
struct  SessionBusyException
 The session is currently attached to another transport. More...
struct  TransportBusyException
 The transport is currently attached to another session. More...
struct  NotAttachedException
 The transport is not currently attached to any session. More...
struct  UnknownIdsException
 Command data was received prior to any use of the command-point control. More...
class  ReplyTo
class  SequenceNumber
 4-byte sequence number that 'wraps around'. More...
struct  Window
class  SequenceSet
class  StreamProperties
class  StructHelper
struct  Uuid
 A UUID is represented as a boost::array of 16 bytes. More...
class  XaResult
class  Xid

Typedefs

typedef uint8_t FrameType
typedef uint16_t ChannelId
typedef uint32_t BatchOffset
typedef uint8_t ClassId
typedef uint8_t MethodId
typedef uint16_t ReplyCode
typedef IntegerValue Integer32Value

Enumerations

enum  DeliveryMode { TRANSIENT = 1, PERSISTENT = 2 }
enum  AmqpConstant {
  MIN_MAX_FRAME_SIZE = 4096, CONNECTION_CLASS_ID = 0x1, CONNECTION_START_METHOD_ID = 0x1, CONNECTION_START_OK_METHOD_ID = 0x2,
  CONNECTION_SECURE_METHOD_ID = 0x3, CONNECTION_SECURE_OK_METHOD_ID = 0x4, CONNECTION_TUNE_METHOD_ID = 0x5, CONNECTION_TUNE_OK_METHOD_ID = 0x6,
  CONNECTION_OPEN_METHOD_ID = 0x7, CONNECTION_OPEN_OK_METHOD_ID = 0x8, CONNECTION_REDIRECT_METHOD_ID = 0x9, CONNECTION_HEARTBEAT_METHOD_ID = 0xa,
  CONNECTION_CLOSE_METHOD_ID = 0xb, CONNECTION_CLOSE_OK_METHOD_ID = 0xc, SESSION_CLASS_ID = 0x2, SESSION_ATTACH_METHOD_ID = 0x1,
  SESSION_ATTACHED_METHOD_ID = 0x2, SESSION_DETACH_METHOD_ID = 0x3, SESSION_DETACHED_METHOD_ID = 0x4, SESSION_REQUEST_TIMEOUT_METHOD_ID = 0x5,
  SESSION_TIMEOUT_METHOD_ID = 0x6, SESSION_COMMAND_POINT_METHOD_ID = 0x7, SESSION_EXPECTED_METHOD_ID = 0x8, SESSION_CONFIRMED_METHOD_ID = 0x9,
  SESSION_COMPLETED_METHOD_ID = 0xa, SESSION_KNOWN_COMPLETED_METHOD_ID = 0xb, SESSION_FLUSH_METHOD_ID = 0xc, SESSION_GAP_METHOD_ID = 0xd,
  EXECUTION_CLASS_ID = 0x3, EXECUTION_SYNC_METHOD_ID = 0x1, EXECUTION_RESULT_METHOD_ID = 0x2, EXECUTION_EXCEPTION_METHOD_ID = 0x3,
  MESSAGE_CLASS_ID = 0x4, MESSAGE_TRANSFER_METHOD_ID = 0x1, MESSAGE_ACCEPT_METHOD_ID = 0x2, MESSAGE_REJECT_METHOD_ID = 0x3,
  MESSAGE_RELEASE_METHOD_ID = 0x4, MESSAGE_ACQUIRE_METHOD_ID = 0x5, MESSAGE_RESUME_METHOD_ID = 0x6, MESSAGE_SUBSCRIBE_METHOD_ID = 0x7,
  MESSAGE_CANCEL_METHOD_ID = 0x8, MESSAGE_SET_FLOW_MODE_METHOD_ID = 0x9, MESSAGE_FLOW_METHOD_ID = 0xa, MESSAGE_FLUSH_METHOD_ID = 0xb,
  MESSAGE_STOP_METHOD_ID = 0xc, TX_CLASS_ID = 0x5, TX_SELECT_METHOD_ID = 0x1, TX_COMMIT_METHOD_ID = 0x2,
  TX_ROLLBACK_METHOD_ID = 0x3, DTX_CLASS_ID = 0x6, DTX_SELECT_METHOD_ID = 0x1, DTX_START_METHOD_ID = 0x2,
  DTX_END_METHOD_ID = 0x3, DTX_COMMIT_METHOD_ID = 0x4, DTX_FORGET_METHOD_ID = 0x5, DTX_GET_TIMEOUT_METHOD_ID = 0x6,
  DTX_PREPARE_METHOD_ID = 0x7, DTX_RECOVER_METHOD_ID = 0x8, DTX_ROLLBACK_METHOD_ID = 0x9, DTX_SET_TIMEOUT_METHOD_ID = 0xa,
  EXCHANGE_CLASS_ID = 0x7, EXCHANGE_DECLARE_METHOD_ID = 0x1, EXCHANGE_DELETE_METHOD_ID = 0x2, EXCHANGE_QUERY_METHOD_ID = 0x3,
  EXCHANGE_BIND_METHOD_ID = 0x4, EXCHANGE_UNBIND_METHOD_ID = 0x5, EXCHANGE_BOUND_METHOD_ID = 0x6, QUEUE_CLASS_ID = 0x8,
  QUEUE_DECLARE_METHOD_ID = 0x1, QUEUE_DELETE_METHOD_ID = 0x2, QUEUE_PURGE_METHOD_ID = 0x3, QUEUE_QUERY_METHOD_ID = 0x4,
  FILE_CLASS_ID = 0x9, FILE_QOS_METHOD_ID = 0x1, FILE_QOS_OK_METHOD_ID = 0x2, FILE_CONSUME_METHOD_ID = 0x3,
  FILE_CONSUME_OK_METHOD_ID = 0x4, FILE_CANCEL_METHOD_ID = 0x5, FILE_OPEN_METHOD_ID = 0x6, FILE_OPEN_OK_METHOD_ID = 0x7,
  FILE_STAGE_METHOD_ID = 0x8, FILE_PUBLISH_METHOD_ID = 0x9, FILE_RETURN_METHOD_ID = 0xa, FILE_DELIVER_METHOD_ID = 0xb,
  FILE_ACK_METHOD_ID = 0xc, FILE_REJECT_METHOD_ID = 0xd, STREAM_CLASS_ID = 0xa, STREAM_QOS_METHOD_ID = 0x1,
  STREAM_QOS_OK_METHOD_ID = 0x2, STREAM_CONSUME_METHOD_ID = 0x3, STREAM_CONSUME_OK_METHOD_ID = 0x4, STREAM_CANCEL_METHOD_ID = 0x5,
  STREAM_PUBLISH_METHOD_ID = 0x6, STREAM_RETURN_METHOD_ID = 0x7, STREAM_DELIVER_METHOD_ID = 0x8, CLUSTER_CLASS_ID = 0x80,
  CLUSTER_UPDATE_REQUEST_METHOD_ID = 0x1, CLUSTER_UPDATE_OFFER_METHOD_ID = 0x2, CLUSTER_RETRACT_OFFER_METHOD_ID = 0x3, CLUSTER_INITIAL_STATUS_METHOD_ID = 0x5,
  CLUSTER_READY_METHOD_ID = 0x10, CLUSTER_CONFIG_CHANGE_METHOD_ID = 0x11, CLUSTER_ERROR_CHECK_METHOD_ID = 0x14, CLUSTER_TIMER_WAKEUP_METHOD_ID = 0x15,
  CLUSTER_TIMER_DROP_METHOD_ID = 0x16, CLUSTER_SHUTDOWN_METHOD_ID = 0x20, CLUSTER_DELIVER_TO_QUEUE_METHOD_ID = 0x21, CLUSTER_CLOCK_METHOD_ID = 0x22,
  CLUSTER_CONNECTION_CLASS_ID = 0x81, CLUSTER_CONNECTION_ANNOUNCE_METHOD_ID = 0x1, CLUSTER_CONNECTION_DELIVER_CLOSE_METHOD_ID = 0x2, CLUSTER_CONNECTION_DELIVER_DO_OUTPUT_METHOD_ID = 0x3,
  CLUSTER_CONNECTION_ABORT_METHOD_ID = 0x4, CLUSTER_CONNECTION_SHADOW_SET_USER_METHOD_ID = 0x0E, CLUSTER_CONNECTION_SHADOW_PREPARE_METHOD_ID = 0x0F, CLUSTER_CONNECTION_CONSUMER_STATE_METHOD_ID = 0x10,
  CLUSTER_CONNECTION_DELIVERY_RECORD_METHOD_ID = 0x11, CLUSTER_CONNECTION_TX_START_METHOD_ID = 0x12, CLUSTER_CONNECTION_TX_ACCEPT_METHOD_ID = 0x13, CLUSTER_CONNECTION_TX_DEQUEUE_METHOD_ID = 0x14,
  CLUSTER_CONNECTION_TX_ENQUEUE_METHOD_ID = 0x15, CLUSTER_CONNECTION_TX_PUBLISH_METHOD_ID = 0x16, CLUSTER_CONNECTION_TX_END_METHOD_ID = 0x17, CLUSTER_CONNECTION_ACCUMULATED_ACK_METHOD_ID = 0x18,
  CLUSTER_CONNECTION_OUTPUT_TASK_METHOD_ID = 0x19, CLUSTER_CONNECTION_DTX_START_METHOD_ID = 0x1A, CLUSTER_CONNECTION_DTX_END_METHOD_ID = 0x1B, CLUSTER_CONNECTION_DTX_ACK_METHOD_ID = 0x1C,
  CLUSTER_CONNECTION_DTX_BUFFER_REF_METHOD_ID = 0x1D, CLUSTER_CONNECTION_DTX_WORK_RECORD_METHOD_ID = 0x1E, CLUSTER_CONNECTION_SESSION_STATE_METHOD_ID = 0x1F, CLUSTER_CONNECTION_SHADOW_READY_METHOD_ID = 0x20,
  CLUSTER_CONNECTION_MEMBERSHIP_METHOD_ID = 0x21, CLUSTER_CONNECTION_RETRACT_OFFER_METHOD_ID = 0x22, CLUSTER_CONNECTION_QUEUE_POSITION_METHOD_ID = 0x30, CLUSTER_CONNECTION_EXCHANGE_METHOD_ID = 0x31,
  CLUSTER_CONNECTION_ADD_QUEUE_LISTENER_METHOD_ID = 0x34, CLUSTER_CONNECTION_MANAGEMENT_SETUP_STATE_METHOD_ID = 0x36, CLUSTER_CONNECTION_CONFIG_METHOD_ID = 0x37, CLUSTER_CONNECTION_QUEUE_FAIRSHARE_STATE_METHOD_ID = 0x38,
  CLUSTER_CONNECTION_QUEUE_OBSERVER_STATE_METHOD_ID = 0x39, CLUSTER_CONNECTION_CLOCK_METHOD_ID = 0x40, CLUSTER_CONNECTION_QUEUE_DEQUEUE_SINCE_PURGE_STATE_METHOD_ID = 0x41
}
enum  SegmentType { SEGMENT_TYPE_CONTROL = 0, SEGMENT_TYPE_COMMAND = 1, SEGMENT_TYPE_HEADER = 2, SEGMENT_TYPE_BODY = 3 }
enum  Track { TRACK_CONTROL = 0, TRACK_COMMAND = 1 }
enum  TypeCode {
  TYPE_CODE_BIN8 = 0x00, TYPE_CODE_INT8 = 0x01, TYPE_CODE_UINT8 = 0x02, TYPE_CODE_CHAR = 0x04,
  TYPE_CODE_BOOLEAN = 0x08, TYPE_CODE_BIN16 = 0x10, TYPE_CODE_INT16 = 0x11, TYPE_CODE_UINT16 = 0x12,
  TYPE_CODE_BIN32 = 0x20, TYPE_CODE_INT32 = 0x21, TYPE_CODE_UINT32 = 0x22, TYPE_CODE_FLOAT = 0x23,
  TYPE_CODE_CHAR_UTF32 = 0x27, TYPE_CODE_BIN64 = 0x30, TYPE_CODE_INT64 = 0x31, TYPE_CODE_UINT64 = 0x32,
  TYPE_CODE_DOUBLE = 0x33, TYPE_CODE_DATETIME = 0x38, TYPE_CODE_BIN128 = 0x40, TYPE_CODE_UUID = 0x48,
  TYPE_CODE_BIN256 = 0x50, TYPE_CODE_BIN512 = 0x60, TYPE_CODE_BIN1024 = 0x70, TYPE_CODE_VBIN8 = 0x80,
  TYPE_CODE_STR8_LATIN = 0x84, TYPE_CODE_STR8 = 0x85, TYPE_CODE_STR8_UTF16 = 0x86, TYPE_CODE_VBIN16 = 0x90,
  TYPE_CODE_STR16_LATIN = 0x94, TYPE_CODE_STR16 = 0x95, TYPE_CODE_STR16_UTF16 = 0x96, TYPE_CODE_VBIN32 = 0xa0,
  TYPE_CODE_MAP = 0xa8, TYPE_CODE_LIST = 0xa9, TYPE_CODE_ARRAY = 0xaa, TYPE_CODE_STRUCT32 = 0xab,
  TYPE_CODE_BIN40 = 0xc0, TYPE_CODE_DEC32 = 0xc8, TYPE_CODE_BIN72 = 0xd0, TYPE_CODE_DEC64 = 0xd8,
  TYPE_CODE_VOID = 0xf0, TYPE_CODE_BIT = 0xf1
}

Functions

std::ostreamoperator<< (std::ostream &, const Buffer &)
template<>
bool FieldValue::convertsTo< std::string > () const
template<>
std::string FieldValue::get< std::string > () const
std::ostreamoperator<< (std::ostream &out, const FieldValue &v)
template<class T >
bool getEncodedValue (FieldTable::ValuePtr vptr, T &value)
sys::ExceptionHolder createSessionException (int code, const std::string &text)
sys::ExceptionHolder createConnectionException (int code, const std::string &text)
sys::ExceptionHolder createChannelException (int code, const std::string &text)
int32_t operator- (const SequenceNumber &a, const SequenceNumber &b)
std::ostreamoperator<< (std::ostream &o, const SequenceNumber &n)
bool isTypeCode (uint8_t t)
 True if t is a valid TypeCode value.
TypeCode typeCode (uint8_t)
 Throw exception if not a valid TypeCode.
const char * typeName (TypeCode t)
std::ostreamoperator<< (std::ostream &, TypeCode)
std::ostreamoperator<< (std::ostream &, Uuid)
 Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.
std::istreamoperator>> (std::istream &, Uuid &)
 Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.

Variables

const ChannelId CHANNEL_MAX = (ChannelId(~1))>>1
 Maximum channel ID used by broker.
const ChannelId CHANNEL_HIGH_BIT = ChannelId(~CHANNEL_MAX)

Detailed Description

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


Typedef Documentation

Definition at line 38 of file amqp_types.h.

Definition at line 37 of file amqp_types.h.

Definition at line 39 of file amqp_types.h.

Definition at line 36 of file amqp_types.h.

Definition at line 446 of file FieldValue.h.

Definition at line 40 of file amqp_types.h.

Definition at line 41 of file amqp_types.h.


Enumeration Type Documentation

Enumerator:
MIN_MAX_FRAME_SIZE 
CONNECTION_CLASS_ID 
CONNECTION_START_METHOD_ID 
CONNECTION_START_OK_METHOD_ID 
CONNECTION_SECURE_METHOD_ID 
CONNECTION_SECURE_OK_METHOD_ID 
CONNECTION_TUNE_METHOD_ID 
CONNECTION_TUNE_OK_METHOD_ID 
CONNECTION_OPEN_METHOD_ID 
CONNECTION_OPEN_OK_METHOD_ID 
CONNECTION_REDIRECT_METHOD_ID 
CONNECTION_HEARTBEAT_METHOD_ID 
CONNECTION_CLOSE_METHOD_ID 
CONNECTION_CLOSE_OK_METHOD_ID 
SESSION_CLASS_ID 
SESSION_ATTACH_METHOD_ID 
SESSION_ATTACHED_METHOD_ID 
SESSION_DETACH_METHOD_ID 
SESSION_DETACHED_METHOD_ID 
SESSION_REQUEST_TIMEOUT_METHOD_ID 
SESSION_TIMEOUT_METHOD_ID 
SESSION_COMMAND_POINT_METHOD_ID 
SESSION_EXPECTED_METHOD_ID 
SESSION_CONFIRMED_METHOD_ID 
SESSION_COMPLETED_METHOD_ID 
SESSION_KNOWN_COMPLETED_METHOD_ID 
SESSION_FLUSH_METHOD_ID 
SESSION_GAP_METHOD_ID 
EXECUTION_CLASS_ID 
EXECUTION_SYNC_METHOD_ID 
EXECUTION_RESULT_METHOD_ID 
EXECUTION_EXCEPTION_METHOD_ID 
MESSAGE_CLASS_ID 
MESSAGE_TRANSFER_METHOD_ID 
MESSAGE_ACCEPT_METHOD_ID 
MESSAGE_REJECT_METHOD_ID 
MESSAGE_RELEASE_METHOD_ID 
MESSAGE_ACQUIRE_METHOD_ID 
MESSAGE_RESUME_METHOD_ID 
MESSAGE_SUBSCRIBE_METHOD_ID 
MESSAGE_CANCEL_METHOD_ID 
MESSAGE_SET_FLOW_MODE_METHOD_ID 
MESSAGE_FLOW_METHOD_ID 
MESSAGE_FLUSH_METHOD_ID 
MESSAGE_STOP_METHOD_ID 
TX_CLASS_ID 
TX_SELECT_METHOD_ID 
TX_COMMIT_METHOD_ID 
TX_ROLLBACK_METHOD_ID 
DTX_CLASS_ID 
DTX_SELECT_METHOD_ID 
DTX_START_METHOD_ID 
DTX_END_METHOD_ID 
DTX_COMMIT_METHOD_ID 
DTX_FORGET_METHOD_ID 
DTX_GET_TIMEOUT_METHOD_ID 
DTX_PREPARE_METHOD_ID 
DTX_RECOVER_METHOD_ID 
DTX_ROLLBACK_METHOD_ID 
DTX_SET_TIMEOUT_METHOD_ID 
EXCHANGE_CLASS_ID 
EXCHANGE_DECLARE_METHOD_ID 
EXCHANGE_DELETE_METHOD_ID 
EXCHANGE_QUERY_METHOD_ID 
EXCHANGE_BIND_METHOD_ID 
EXCHANGE_UNBIND_METHOD_ID 
EXCHANGE_BOUND_METHOD_ID 
QUEUE_CLASS_ID 
QUEUE_DECLARE_METHOD_ID 
QUEUE_DELETE_METHOD_ID 
QUEUE_PURGE_METHOD_ID 
QUEUE_QUERY_METHOD_ID 
FILE_CLASS_ID 
FILE_QOS_METHOD_ID 
FILE_QOS_OK_METHOD_ID 
FILE_CONSUME_METHOD_ID 
FILE_CONSUME_OK_METHOD_ID 
FILE_CANCEL_METHOD_ID 
FILE_OPEN_METHOD_ID 
FILE_OPEN_OK_METHOD_ID 
FILE_STAGE_METHOD_ID 
FILE_PUBLISH_METHOD_ID 
FILE_RETURN_METHOD_ID 
FILE_DELIVER_METHOD_ID 
FILE_ACK_METHOD_ID 
FILE_REJECT_METHOD_ID 
STREAM_CLASS_ID 
STREAM_QOS_METHOD_ID 
STREAM_QOS_OK_METHOD_ID 
STREAM_CONSUME_METHOD_ID 
STREAM_CONSUME_OK_METHOD_ID 
STREAM_CANCEL_METHOD_ID 
STREAM_PUBLISH_METHOD_ID 
STREAM_RETURN_METHOD_ID 
STREAM_DELIVER_METHOD_ID 
CLUSTER_CLASS_ID 
CLUSTER_UPDATE_REQUEST_METHOD_ID 
CLUSTER_UPDATE_OFFER_METHOD_ID 
CLUSTER_RETRACT_OFFER_METHOD_ID 
CLUSTER_INITIAL_STATUS_METHOD_ID 
CLUSTER_READY_METHOD_ID 
CLUSTER_CONFIG_CHANGE_METHOD_ID 
CLUSTER_ERROR_CHECK_METHOD_ID 
CLUSTER_TIMER_WAKEUP_METHOD_ID 
CLUSTER_TIMER_DROP_METHOD_ID 
CLUSTER_SHUTDOWN_METHOD_ID 
CLUSTER_DELIVER_TO_QUEUE_METHOD_ID 
CLUSTER_CLOCK_METHOD_ID 
CLUSTER_CONNECTION_CLASS_ID 
CLUSTER_CONNECTION_ANNOUNCE_METHOD_ID 
CLUSTER_CONNECTION_DELIVER_CLOSE_METHOD_ID 
CLUSTER_CONNECTION_DELIVER_DO_OUTPUT_METHOD_ID 
CLUSTER_CONNECTION_ABORT_METHOD_ID 
CLUSTER_CONNECTION_SHADOW_SET_USER_METHOD_ID 
CLUSTER_CONNECTION_SHADOW_PREPARE_METHOD_ID 
CLUSTER_CONNECTION_CONSUMER_STATE_METHOD_ID 
CLUSTER_CONNECTION_DELIVERY_RECORD_METHOD_ID 
CLUSTER_CONNECTION_TX_START_METHOD_ID 
CLUSTER_CONNECTION_TX_ACCEPT_METHOD_ID 
CLUSTER_CONNECTION_TX_DEQUEUE_METHOD_ID 
CLUSTER_CONNECTION_TX_ENQUEUE_METHOD_ID 
CLUSTER_CONNECTION_TX_PUBLISH_METHOD_ID 
CLUSTER_CONNECTION_TX_END_METHOD_ID 
CLUSTER_CONNECTION_ACCUMULATED_ACK_METHOD_ID 
CLUSTER_CONNECTION_OUTPUT_TASK_METHOD_ID 
CLUSTER_CONNECTION_DTX_START_METHOD_ID 
CLUSTER_CONNECTION_DTX_END_METHOD_ID 
CLUSTER_CONNECTION_DTX_ACK_METHOD_ID 
CLUSTER_CONNECTION_DTX_BUFFER_REF_METHOD_ID 
CLUSTER_CONNECTION_DTX_WORK_RECORD_METHOD_ID 
CLUSTER_CONNECTION_SESSION_STATE_METHOD_ID 
CLUSTER_CONNECTION_SHADOW_READY_METHOD_ID 
CLUSTER_CONNECTION_MEMBERSHIP_METHOD_ID 
CLUSTER_CONNECTION_RETRACT_OFFER_METHOD_ID 
CLUSTER_CONNECTION_QUEUE_POSITION_METHOD_ID 
CLUSTER_CONNECTION_EXCHANGE_METHOD_ID 
CLUSTER_CONNECTION_ADD_QUEUE_LISTENER_METHOD_ID 
CLUSTER_CONNECTION_MANAGEMENT_SETUP_STATE_METHOD_ID 
CLUSTER_CONNECTION_CONFIG_METHOD_ID 
CLUSTER_CONNECTION_QUEUE_FAIRSHARE_STATE_METHOD_ID 
CLUSTER_CONNECTION_QUEUE_OBSERVER_STATE_METHOD_ID 
CLUSTER_CONNECTION_CLOCK_METHOD_ID 
CLUSTER_CONNECTION_QUEUE_DEQUEUE_SINCE_PURGE_STATE_METHOD_ID 

Definition at line 34 of file constants.h.

Enumerator:
TRANSIENT 
PERSISTENT 

Definition at line 63 of file amqp_types.h.

Enumerator:
SEGMENT_TYPE_CONTROL 
SEGMENT_TYPE_COMMAND 
SEGMENT_TYPE_HEADER 
SEGMENT_TYPE_BODY 

Definition at line 34 of file enum.h.

Enumerator:
TRACK_CONTROL 
TRACK_COMMAND 

Definition at line 40 of file enum.h.

Enumerator:
TYPE_CODE_BIN8 
TYPE_CODE_INT8 
TYPE_CODE_UINT8 
TYPE_CODE_CHAR 
TYPE_CODE_BOOLEAN 
TYPE_CODE_BIN16 
TYPE_CODE_INT16 
TYPE_CODE_UINT16 
TYPE_CODE_BIN32 
TYPE_CODE_INT32 
TYPE_CODE_UINT32 
TYPE_CODE_FLOAT 
TYPE_CODE_CHAR_UTF32 
TYPE_CODE_BIN64 
TYPE_CODE_INT64 
TYPE_CODE_UINT64 
TYPE_CODE_DOUBLE 
TYPE_CODE_DATETIME 
TYPE_CODE_BIN128 
TYPE_CODE_UUID 
TYPE_CODE_BIN256 
TYPE_CODE_BIN512 
TYPE_CODE_BIN1024 
TYPE_CODE_VBIN8 
TYPE_CODE_STR8_LATIN 
TYPE_CODE_STR8 
TYPE_CODE_STR8_UTF16 
TYPE_CODE_VBIN16 
TYPE_CODE_STR16_LATIN 
TYPE_CODE_STR16 
TYPE_CODE_STR16_UTF16 
TYPE_CODE_VBIN32 
TYPE_CODE_MAP 
TYPE_CODE_LIST 
TYPE_CODE_ARRAY 
TYPE_CODE_STRUCT32 
TYPE_CODE_BIN40 
TYPE_CODE_DEC32 
TYPE_CODE_BIN72 
TYPE_CODE_DEC64 
TYPE_CODE_VOID 
TYPE_CODE_BIT 

Definition at line 36 of file TypeCode.h.


Function Documentation

sys::ExceptionHolder qpid::framing::createChannelException ( int  code,
const std::string text 
)
sys::ExceptionHolder qpid::framing::createConnectionException ( int  code,
const std::string text 
)
sys::ExceptionHolder qpid::framing::createSessionException ( int  code,
const std::string text 
)
template<>
bool qpid::framing::FieldValue::convertsTo< std::string > ( ) const [inline]

Definition at line 124 of file FieldValue.h.

template<>
std::string qpid::framing::FieldValue::get< std::string > ( ) const [inline]

Definition at line 133 of file FieldValue.h.

template<class T >
bool qpid::framing::getEncodedValue ( FieldTable::ValuePtr  vptr,
T &  value 
)

Definition at line 460 of file FieldValue.h.

bool qpid::framing::isTypeCode ( uint8_t  t)

True if t is a valid TypeCode value.

int32_t qpid::framing::operator- ( const SequenceNumber &  a,
const SequenceNumber &  b 
) [inline]

Definition at line 64 of file SequenceNumber.h.

std::ostream& qpid::framing::operator<< ( std::ostream o,
const SequenceNumber &  n 
)
std::ostream& qpid::framing::operator<< ( std::ostream ,
Uuid   
)

Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.

std::ostream& qpid::framing::operator<< ( std::ostream ,
TypeCode   
)
std::ostream& qpid::framing::operator<< ( std::ostream ,
const Buffer &   
)
std::ostream& qpid::framing::operator<< ( std::ostream out,
const FieldValue &  v 
) [inline]

Definition at line 135 of file FieldValue.h.

References qpid::framing::FieldValue::print().

std::istream& qpid::framing::operator>> ( std::istream ,
Uuid &   
)

Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.

TypeCode qpid::framing::typeCode ( uint8_t  )

Throw exception if not a valid TypeCode.

const char* qpid::framing::typeName ( TypeCode  t)
Returns:
0 if t is not a valid enum TypeCode value.

Variable Documentation

Maximum channel ID used by broker.

Reserve high bit for internal use.

Definition at line 52 of file amqp_types.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00656.html0000664000076400007640000001251211752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::TransportFailure Member List
This is the complete list of members for qpid::TransportFailure, including all inherited members.
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
TransportFailure(const std::string &msg=std::string())qpid::TransportFailure [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00818.html0000664000076400007640000002124611752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Logger Member List
This is the complete list of members for qpid::log::Logger, including all inherited members.
add(Statement &s)qpid::log::Logger
clear()qpid::log::Logger
configure(const Options &o)qpid::log::Logger
FILE enum valueqpid::log::Logger
format(int formatFlags)qpid::log::Logger
format(const Options &)qpid::log::Logger
FormatFlag enum nameqpid::log::Logger
FUNCTION enum valueqpid::log::Logger
getOptions() const qpid::log::Logger [inline]
HIRES enum valueqpid::log::Logger
instance()qpid::log::Logger [static]
LEVEL enum valueqpid::log::Logger
LINE enum valueqpid::log::Logger
log(const Statement &, const std::string &)qpid::log::Logger
Logger()qpid::log::Logger
output(std::auto_ptr< Output > out)qpid::log::Logger
reconfigure(const std::vector< std::string > &selectors)qpid::log::Logger
select(const Selector &s)qpid::log::Logger
setPrefix(const std::string &prefix)qpid::log::Logger
THREAD enum valueqpid::log::Logger
TIME enum valueqpid::log::Logger
~Logger()qpid::log::Logger

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00148.html0000664000076400007640000003126311752725717017327 0ustar00jrossjross00000000000000 qpid::InlineAllocator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineAllocator Class Reference

An allocator that has inline storage for up to Max objects of type BaseAllocator::value_type. More...

#include <qpid/InlineAllocator.h>

List of all members.

Classes

struct  rebind
union  Store

Public Types

typedef BaseAllocator::pointer pointer
typedef BaseAllocator::size_type size_type
typedef BaseAllocator::value_type value_type

Public Member Functions

 InlineAllocator ()
 InlineAllocator (const InlineAllocator &x)
pointer allocate (size_type n)
void deallocate (pointer p, size_type n)

Detailed Description

An allocator that has inline storage for up to Max objects of type BaseAllocator::value_type.


Member Typedef Documentation

typedef BaseAllocator::pointer qpid::InlineAllocator::pointer

Definition at line 43 of file InlineAllocator.h.

typedef BaseAllocator::size_type qpid::InlineAllocator::size_type

Definition at line 44 of file InlineAllocator.h.

typedef BaseAllocator::value_type qpid::InlineAllocator::value_type

Definition at line 45 of file InlineAllocator.h.


Constructor & Destructor Documentation

qpid::InlineAllocator::InlineAllocator ( ) [inline]

Definition at line 47 of file InlineAllocator.h.

qpid::InlineAllocator::InlineAllocator ( const InlineAllocator x) [inline]

Definition at line 48 of file InlineAllocator.h.


Member Function Documentation

pointer qpid::InlineAllocator::allocate ( size_type  n) [inline]

Definition at line 50 of file InlineAllocator.h.

void qpid::InlineAllocator::deallocate ( pointer  p,
size_type  n 
) [inline]

Definition at line 59 of file InlineAllocator.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00548_source.html0000664000076400007640000014602611752725717020717 0ustar00jrossjross00000000000000 qpid/RangeSet.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/RangeSet.h
Go to the documentation of this file.
00001 #ifndef QPID_RANGESET_H
00002 #define QPID_RANGESET_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/InlineVector.h"
00026 #include <boost/iterator/iterator_facade.hpp>
00027 #include <boost/operators.hpp>
00028 #include <boost/bind.hpp>
00029 #include <algorithm>
00030 #include <numeric>
00031 
00032 namespace qpid {
00033 
00038 template <class T>
00039 class Range {
00040   public:
00041     static Range makeClosed(const T& first, T last) { return Range(first, ++last); }
00042 
00043     Range() : begin_(), end_() {}
00044     explicit Range(const T& t) : begin_(t), end_(t) { ++end_; }
00045     Range(const T& b, const T& e) : begin_(b), end_(e) { assert(b <= e); }
00046 
00047     T begin() const { return begin_; }
00049     T end() const { return end_; }
00050 
00051     T first() const { assert(!empty()); return begin_; }
00053     T last() const { assert(!empty()); T ret=end_; return --ret; }
00054 
00055     void begin(const T& t) { begin_ = t; }
00056     void end(const T& t) { end_ = t; }
00057     size_t size() const { return end_ - begin_; }
00058     bool empty() const { return begin_ == end_; }
00059 
00060     bool contains(const T& x) const { return begin_ <= x && x < end_; }
00061     bool contains(const Range& r) const { return begin_ <= r.begin_ && r.end_ <= end_; }
00062     bool strictContains(const Range& r) const { return begin_ < r.begin_ && r.end_ < end_; }
00063 
00064     bool operator==(const Range& x) { return begin_ == x.begin_ && end_== x.end_; }
00065 
00066     bool operator<(const T& t) const { return end_ < t; }
00067     bool operator<(const Range<T>& r) const { return end_ < r.begin_; }
00068 
00070     bool touching(const Range& r) const {
00071         return std::max(begin_, r.begin_) <= std::min(end_, r.end_);
00072     }
00073 
00075     void merge(const Range& r) {
00076         assert(touching(r));
00077         begin_ = std::min(begin_, r.begin_);
00078         end_ = std::max(end_, r.end_);
00079     }
00080 
00081     operator bool() const { return !empty(); }
00082 
00083     template <class S> void serialize(S& s) { s(begin_)(end_); }
00084 
00085   private:
00086     T begin_, end_;
00087 };
00088 
00089 
00095 template <class T>
00096 class RangeSet
00097     : boost::additive1<RangeSet<T>,
00098                        boost::additive2<RangeSet<T>, Range<T>,
00099                                         boost::additive2<RangeSet<T>, T> > >
00100 {
00101     typedef InlineVector<Range<T>, 3> Ranges; // TODO aconway 2008-04-21: what's the optimial inlined value?
00102 
00103   public:
00104 
00105     class iterator : public boost::iterator_facade<
00106         iterator,
00107         const T,
00108         boost::forward_traversal_tag>
00109     {
00110       public:
00111         iterator() : ranges(), iter(), value() {}
00112 
00113       private:
00114         typedef typename Ranges::const_iterator RangesIter;
00115         iterator(const Ranges& r, const RangesIter& i, const T& t)
00116             : ranges(&r), iter(i), value(t) {}
00117 
00118         void increment();
00119         bool equal(const iterator& i) const;
00120         const T& dereference() const { return value; }
00121 
00122         const Ranges* ranges;
00123         RangesIter iter;
00124         T value;
00125 
00126       friend class RangeSet<T>;
00127       friend class boost::iterator_core_access;
00128     };
00129 
00130     typedef iterator const_iterator;
00131 
00132     RangeSet() {}
00133     explicit RangeSet(const Range<T>& r) { *this += r; }
00134     RangeSet(const T& a, const T& b) { *this += Range<T>(a,b); }
00135 
00136     bool contiguous() const { return ranges.size() <= 1; }
00137 
00138     bool contains(const T& t) const;
00139     bool contains(const Range<T>&) const;
00140 
00142     Range<T> toRange() const;
00143 
00144     bool operator==(const RangeSet<T>&) const;
00145 
00146     void addRange (const Range<T>&);
00147     void addSet (const RangeSet<T>&);
00148 
00149     RangeSet<T>& operator+=(const T& t) { return *this += Range<T>(t); }
00150     RangeSet<T>& operator+=(const Range<T>& r) { addRange(r); return *this; }
00151     RangeSet<T>& operator+=(const RangeSet<T>& s) { addSet(s); return *this; }
00152 
00153     void removeRange (const Range<T>&);
00154     void removeSet (const RangeSet<T>&);
00155 
00156     RangeSet<T>& operator-=(const T& t)  { return *this -= Range<T>(t); }
00157     RangeSet<T>& operator-=(const Range<T>& r) { removeRange(r); return *this; }
00158     RangeSet<T>& operator-=(const RangeSet<T>& s) { removeSet(s); return *this; }
00159 
00160     T front() const { return ranges.front().begin(); }
00161     T back() const { return ranges.back().end(); }
00162 
00163     // Iterate over elements in the set.
00164     iterator begin() const;
00165     iterator end() const;
00166 
00167     // Iterate over ranges in the set.
00168     typedef typename Ranges::const_iterator RangeIterator;
00169     RangeIterator rangesBegin() const { return ranges.begin(); }
00170     RangeIterator rangesEnd() const { return ranges.end(); }
00171     size_t rangesSize() const { return ranges.size(); }
00172 
00173     // The difference between the start and end of this range set
00174     uint32_t span() const;
00175 
00176     size_t size() const;
00177     bool empty() const { return ranges.empty(); }
00178     void clear() { ranges.clear(); }
00179 
00183     Range<T> rangeContaining(const T&) const;
00184 
00185     template <class S> void serialize(S& s) { s.split(*this); s(ranges.begin(), ranges.end()); }
00186     template <class S> void encode(S& s) const { s(uint16_t(ranges.size()*sizeof(Range<T>))); }
00187     template <class S> void decode(S& s) { uint16_t sz; s(sz); ranges.resize(sz/sizeof(Range<T>)); }
00188 
00189  private:
00190     static size_t accumulateSize(size_t s, const Range<T>& r) { return s+r.size(); }
00191     Ranges ranges;
00192 
00193   template <class U> friend std::ostream& operator<<(std::ostream& o, const RangeSet<U>& r);
00194 
00195   friend class iterator;
00196 };
00197 
00198 template <class T>
00199 std::ostream& operator<<(std::ostream& o, const Range<T>& r) {
00200     return o << "[" << r.begin() << "," << r.end() << ")";
00201 }
00202 
00203 template <class T>
00204 std::ostream& operator<<(std::ostream& o, const RangeSet<T>& rs) {
00205     std::ostream_iterator<Range<T> > i(o, " ");
00206     o << "{ ";
00207     std::copy(rs.ranges.begin(), rs.ranges.end(), i);
00208     return o << "}";
00209 }
00210 
00211 template <class T>
00212 bool RangeSet<T>::contains(const T& t) const {
00213     typename Ranges::const_iterator i =
00214         std::lower_bound(ranges.begin(), ranges.end(), Range<T>(t));
00215     return i != ranges.end() && i->contains(t);
00216 }
00217 
00218 template <class T>
00219 bool RangeSet<T>::contains(const Range<T>& r) const {
00220     typename Ranges::const_iterator i =
00221         std::lower_bound(ranges.begin(), ranges.end(), r);
00222     return i != ranges.end() && i->contains(r);
00223 }
00224 
00225 template <class T> void RangeSet<T>::addRange(const Range<T>& r) {
00226     if (r.empty()) return;
00227     typename Ranges::iterator i =
00228         std::lower_bound(ranges.begin(), ranges.end(), r);
00229     if (i == ranges.end() || !i->touching(r))
00230         ranges.insert(i, r);
00231     else {
00232         i->merge(r);
00233         typename Ranges::iterator j = i;
00234         if (++j != ranges.end() && i->touching(*j)) {
00235             i->merge(*j);
00236             ranges.erase(j);
00237         }
00238     }
00239 }
00240 
00241 
00242 template <class T> void RangeSet<T>::addSet(const RangeSet<T>& s) {
00243     typedef RangeSet<T>& (RangeSet<T>::*RangeSetRangeOp)(const Range<T>&);
00244     std::for_each(s.ranges.begin(), s.ranges.end(),
00245                   boost::bind((RangeSetRangeOp)&RangeSet<T>::operator+=, this, _1));
00246 }
00247 
00248 template <class T> void RangeSet<T>::removeRange(const Range<T>& r) {
00249     if (r.empty()) return;
00250     typename Ranges::iterator i,j;
00251     i = std::lower_bound(ranges.begin(), ranges.end(), r);
00252     if (i == ranges.end() || i->begin() >= r.end())
00253         return;                 // Outside of set
00254     if (*i == r)                // Erase i
00255         ranges.erase(i);
00256     else if (i->strictContains(r)) {  // Split i
00257         Range<T> i1(i->begin(), r.begin());
00258         Range<T> i2(r.end(), i->end());
00259         *i = i2;
00260         ranges.insert(i, i1);
00261     } else {
00262         if (i->begin() < r.begin()) { // Truncate i
00263             i->end(r.begin());
00264             ++i;
00265         }
00266         for (j = i; j != ranges.end() && r.contains(*j); ++j)
00267             ;                   // Ranges to erase.
00268         if (j != ranges.end() && r.end() > j->begin())
00269             j->begin(r.end()); // Truncate j
00270         ranges.erase(i,j);
00271     }
00272 }
00273 
00274 template <class T> void RangeSet<T>::removeSet(const RangeSet<T>& r) {
00275     std::for_each(
00276         r.ranges.begin(), r.ranges.end(),
00277         boost::bind(&RangeSet<T>::removeRange, this, _1));
00278 }
00279 
00280 template <class T> Range<T> RangeSet<T>::toRange() const {
00281     assert(contiguous());
00282     return empty() ? Range<T>() :  ranges.front();
00283 }
00284 
00285 template <class T> void RangeSet<T>::iterator::increment() {
00286     assert(ranges && iter != ranges->end());
00287     if (!iter->contains(++value)) {
00288         ++iter;
00289         if (iter == ranges->end())
00290             *this=iterator();   // end() iterator
00291         else
00292             value=iter->begin();
00293     }
00294 }
00295 
00296 template <class T> bool RangeSet<T>::operator==(const RangeSet<T>& r) const {
00297     return ranges.size() == r.ranges.size() && std::equal(ranges.begin(), ranges.end(), r.ranges.begin());
00298 }
00299 
00300 template <class T> typename RangeSet<T>::iterator RangeSet<T>::begin() const {
00301     return empty() ? end() : iterator(ranges, ranges.begin(), front());
00302 }
00303 
00304 template <class T> typename RangeSet<T>::iterator RangeSet<T>::end() const {
00305     return iterator();
00306 }
00307 
00308 template <class T> bool RangeSet<T>::iterator::equal(const iterator& i) const {
00309     return ranges==i.ranges && (ranges==0 || value==i.value);
00310 }
00311 
00312 template <class T> Range<T> RangeSet<T>::rangeContaining(const T& t) const {
00313     typename Ranges::const_iterator i =
00314         std::lower_bound(ranges.begin(), ranges.end(), Range<T>(t));
00315     return (i != ranges.end() && i->contains(t)) ? *i : Range<T>(t,t);
00316 }
00317 
00318 template <class T> uint32_t RangeSet<T>::span() const {
00319     if (ranges.empty()) return 0;
00320     return ranges.back().last() - ranges.front().first();
00321 }
00322 
00323 template <class T> size_t RangeSet<T>::size() const {
00324     return std::accumulate(rangesBegin(), rangesEnd(), 0, &RangeSet<T>::accumulateSize);
00325 }
00326 
00327 } // namespace qpid
00328 
00329 
00330 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x65.html0000664000076400007640000001532311752725717022336 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00457.html0000664000076400007640000001173111752725717017330 0ustar00jrossjross00000000000000 qpid/client/AsyncSession.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/AsyncSession.h File Reference

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Typedefs

typedef AsyncSession_0_10 qpid::client::AsyncSession
 AsyncSession is an alias for Session_0_10.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00473_source.html0000664000076400007640000012261011752725717020705 0ustar00jrossjross00000000000000 qpid/client/no_keyword/Session_0_10.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/no_keyword/Session_0_10.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_NO_KEYWORD_SESSION_0_10_H
00002 #define QPID_CLIENT_NO_KEYWORD_SESSION_0_10_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/client/SessionBase_0_10.h"
00031 #include "qpid/client/ClientImportExport.h"
00032 
00033 namespace qpid {
00034 namespace client {
00035 namespace no_keyword {
00036 
00046 class Session_0_10:
00047     public SessionBase_0_10
00048 {
00049   public:
00050     
00051     QPID_CLIENT_EXTERN Session_0_10();
00052     QPID_CLIENT_INLINE_EXTERN Session_0_10(const SessionBase_0_10& other);
00053     QPID_CLIENT_INLINE_EXTERN Session_0_10& operator=(const SessionBase_0_10& other);
00054     
00064     QPID_CLIENT_EXTERN void executionSync(bool sync=true);
00065     
00079     QPID_CLIENT_EXTERN void executionResult(const SequenceNumber& commandId=SequenceNumber(), const std::string& value=std::string(), bool sync=true);
00080     
00118     QPID_CLIENT_EXTERN void executionException(uint16_t errorCode=0, const SequenceNumber& commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string& description=std::string(), const FieldTable& errorInfo=FieldTable(), bool sync=true);
00119     
00154     QPID_CLIENT_EXTERN void messageTransfer(const std::string& destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message& content=Message(std::string()), bool sync=true);
00155     
00171     QPID_CLIENT_EXTERN void messageAccept(const SequenceSet& transfers=SequenceSet(), bool sync=true);
00172     
00200     QPID_CLIENT_EXTERN void messageReject(const SequenceSet& transfers=SequenceSet(), uint16_t code=0, const std::string& text=std::string(), bool sync=true);
00201     
00226     QPID_CLIENT_EXTERN void messageRelease(const SequenceSet& transfers=SequenceSet(), bool setRedelivered=false, bool sync=true);
00227     
00243     QPID_CLIENT_EXTERN qpid::framing::MessageAcquireResult messageAcquire(const SequenceSet& transfers=SequenceSet(), bool sync=true);
00244     
00267     QPID_CLIENT_EXTERN qpid::framing::MessageResumeResult messageResume(const std::string& destination=std::string(), const std::string& resumeId=std::string(), bool sync=true);
00268     
00308     QPID_CLIENT_EXTERN void messageSubscribe(const std::string& queue=std::string(), const std::string& destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string& resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable& arguments=FieldTable(), bool sync=true);
00309     
00324     QPID_CLIENT_EXTERN void messageCancel(const std::string& destination=std::string(), bool sync=true);
00325     
00361     QPID_CLIENT_EXTERN void messageSetFlowMode(const std::string& destination=std::string(), uint8_t flowMode=0, bool sync=true);
00362     
00389     QPID_CLIENT_EXTERN void messageFlow(const std::string& destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=true);
00390     
00404     QPID_CLIENT_EXTERN void messageFlush(const std::string& destination=std::string(), bool sync=true);
00405     
00419     QPID_CLIENT_EXTERN void messageStop(const std::string& destination=std::string(), bool sync=true);
00420     
00431     QPID_CLIENT_EXTERN void txSelect(bool sync=true);
00432     
00443     QPID_CLIENT_EXTERN void txCommit(bool sync=true);
00444     
00456     QPID_CLIENT_EXTERN void txRollback(bool sync=true);
00457     
00468     QPID_CLIENT_EXTERN void dtxSelect(bool sync=true);
00469     
00496     QPID_CLIENT_EXTERN qpid::framing::XaResult dtxStart(const Xid& xid=Xid(), bool join=false, bool resume=false, bool sync=true);
00497     
00524     QPID_CLIENT_EXTERN qpid::framing::XaResult dtxEnd(const Xid& xid=Xid(), bool fail=false, bool suspend=false, bool sync=true);
00525     
00547     QPID_CLIENT_EXTERN qpid::framing::XaResult dtxCommit(const Xid& xid=Xid(), bool onePhase=false, bool sync=true);
00548     
00563     QPID_CLIENT_EXTERN void dtxForget(const Xid& xid=Xid(), bool sync=true);
00564     
00581     QPID_CLIENT_EXTERN qpid::framing::DtxGetTimeoutResult dtxGetTimeout(const Xid& xid=Xid(), bool sync=true);
00582     
00597     QPID_CLIENT_EXTERN qpid::framing::XaResult dtxPrepare(const Xid& xid=Xid(), bool sync=true);
00598     
00609     QPID_CLIENT_EXTERN qpid::framing::DtxRecoverResult dtxRecover(bool sync=true);
00610     
00626     QPID_CLIENT_EXTERN qpid::framing::XaResult dtxRollback(const Xid& xid=Xid(), bool sync=true);
00627     
00647     QPID_CLIENT_EXTERN void dtxSetTimeout(const Xid& xid=Xid(), uint32_t timeout=0, bool sync=true);
00648     
00704     QPID_CLIENT_EXTERN void exchangeDeclare(const std::string& exchange=std::string(), const std::string& type=std::string(), const std::string& alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable& arguments=FieldTable(), bool sync=true);
00705     
00725     QPID_CLIENT_EXTERN void exchangeDelete(const std::string& exchange=std::string(), bool ifUnused=false, bool sync=true);
00726     
00742     QPID_CLIENT_EXTERN qpid::framing::ExchangeQueryResult exchangeQuery(const std::string& name=std::string(), bool sync=true);
00743     
00770     QPID_CLIENT_EXTERN void exchangeBind(const std::string& queue=std::string(), const std::string& exchange=std::string(), const std::string& bindingKey=std::string(), const FieldTable& arguments=FieldTable(), bool sync=true);
00771     
00796     QPID_CLIENT_EXTERN void exchangeUnbind(const std::string& queue=std::string(), const std::string& exchange=std::string(), const std::string& bindingKey=std::string(), bool sync=true);
00797     
00830     QPID_CLIENT_EXTERN qpid::framing::ExchangeBoundResult exchangeBound(const std::string& exchange=std::string(), const std::string& queue=std::string(), const std::string& bindingKey=std::string(), const FieldTable& arguments=FieldTable(), bool sync=true);
00831     
00892     QPID_CLIENT_EXTERN void queueDeclare(const std::string& queue=std::string(), const std::string& alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable& arguments=FieldTable(), bool sync=true);
00893     
00920     QPID_CLIENT_EXTERN void queueDelete(const std::string& queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=true);
00921     
00937     QPID_CLIENT_EXTERN void queuePurge(const std::string& queue=std::string(), bool sync=true);
00938     
00950     QPID_CLIENT_EXTERN qpid::framing::QueueQueryResult queueQuery(const std::string& queue=std::string(), bool sync=true);
00951 };
00952 
00953 }}} // namespace qpid::client::no_keyword
00954 
00955 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x67.html0000664000076400007640000015752211752725717021315 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- g -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00777.html0000664000076400007640000002134211752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Integer16Value Member List
This is the complete list of members for qpid::framing::Integer16Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
Integer16Value(int16_t)qpid::framing::Integer16Value
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00498_source.html0000664000076400007640000013225311752725717020720 0ustar00jrossjross00000000000000 qpid/framing/constants.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/constants.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_CONSTANTS_H
00002 #define QPID_FRAMING_CONSTANTS_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 namespace qpid {
00032 namespace framing {
00033 
00034 enum AmqpConstant {
00035     MIN_MAX_FRAME_SIZE=4096,
00036     CONNECTION_CLASS_ID=0x1,
00037     CONNECTION_START_METHOD_ID=0x1,
00038     CONNECTION_START_OK_METHOD_ID=0x2,
00039     CONNECTION_SECURE_METHOD_ID=0x3,
00040     CONNECTION_SECURE_OK_METHOD_ID=0x4,
00041     CONNECTION_TUNE_METHOD_ID=0x5,
00042     CONNECTION_TUNE_OK_METHOD_ID=0x6,
00043     CONNECTION_OPEN_METHOD_ID=0x7,
00044     CONNECTION_OPEN_OK_METHOD_ID=0x8,
00045     CONNECTION_REDIRECT_METHOD_ID=0x9,
00046     CONNECTION_HEARTBEAT_METHOD_ID=0xa,
00047     CONNECTION_CLOSE_METHOD_ID=0xb,
00048     CONNECTION_CLOSE_OK_METHOD_ID=0xc,
00049     SESSION_CLASS_ID=0x2,
00050     SESSION_ATTACH_METHOD_ID=0x1,
00051     SESSION_ATTACHED_METHOD_ID=0x2,
00052     SESSION_DETACH_METHOD_ID=0x3,
00053     SESSION_DETACHED_METHOD_ID=0x4,
00054     SESSION_REQUEST_TIMEOUT_METHOD_ID=0x5,
00055     SESSION_TIMEOUT_METHOD_ID=0x6,
00056     SESSION_COMMAND_POINT_METHOD_ID=0x7,
00057     SESSION_EXPECTED_METHOD_ID=0x8,
00058     SESSION_CONFIRMED_METHOD_ID=0x9,
00059     SESSION_COMPLETED_METHOD_ID=0xa,
00060     SESSION_KNOWN_COMPLETED_METHOD_ID=0xb,
00061     SESSION_FLUSH_METHOD_ID=0xc,
00062     SESSION_GAP_METHOD_ID=0xd,
00063     EXECUTION_CLASS_ID=0x3,
00064     EXECUTION_SYNC_METHOD_ID=0x1,
00065     EXECUTION_RESULT_METHOD_ID=0x2,
00066     EXECUTION_EXCEPTION_METHOD_ID=0x3,
00067     MESSAGE_CLASS_ID=0x4,
00068     MESSAGE_TRANSFER_METHOD_ID=0x1,
00069     MESSAGE_ACCEPT_METHOD_ID=0x2,
00070     MESSAGE_REJECT_METHOD_ID=0x3,
00071     MESSAGE_RELEASE_METHOD_ID=0x4,
00072     MESSAGE_ACQUIRE_METHOD_ID=0x5,
00073     MESSAGE_RESUME_METHOD_ID=0x6,
00074     MESSAGE_SUBSCRIBE_METHOD_ID=0x7,
00075     MESSAGE_CANCEL_METHOD_ID=0x8,
00076     MESSAGE_SET_FLOW_MODE_METHOD_ID=0x9,
00077     MESSAGE_FLOW_METHOD_ID=0xa,
00078     MESSAGE_FLUSH_METHOD_ID=0xb,
00079     MESSAGE_STOP_METHOD_ID=0xc,
00080     TX_CLASS_ID=0x5,
00081     TX_SELECT_METHOD_ID=0x1,
00082     TX_COMMIT_METHOD_ID=0x2,
00083     TX_ROLLBACK_METHOD_ID=0x3,
00084     DTX_CLASS_ID=0x6,
00085     DTX_SELECT_METHOD_ID=0x1,
00086     DTX_START_METHOD_ID=0x2,
00087     DTX_END_METHOD_ID=0x3,
00088     DTX_COMMIT_METHOD_ID=0x4,
00089     DTX_FORGET_METHOD_ID=0x5,
00090     DTX_GET_TIMEOUT_METHOD_ID=0x6,
00091     DTX_PREPARE_METHOD_ID=0x7,
00092     DTX_RECOVER_METHOD_ID=0x8,
00093     DTX_ROLLBACK_METHOD_ID=0x9,
00094     DTX_SET_TIMEOUT_METHOD_ID=0xa,
00095     EXCHANGE_CLASS_ID=0x7,
00096     EXCHANGE_DECLARE_METHOD_ID=0x1,
00097     EXCHANGE_DELETE_METHOD_ID=0x2,
00098     EXCHANGE_QUERY_METHOD_ID=0x3,
00099     EXCHANGE_BIND_METHOD_ID=0x4,
00100     EXCHANGE_UNBIND_METHOD_ID=0x5,
00101     EXCHANGE_BOUND_METHOD_ID=0x6,
00102     QUEUE_CLASS_ID=0x8,
00103     QUEUE_DECLARE_METHOD_ID=0x1,
00104     QUEUE_DELETE_METHOD_ID=0x2,
00105     QUEUE_PURGE_METHOD_ID=0x3,
00106     QUEUE_QUERY_METHOD_ID=0x4,
00107     FILE_CLASS_ID=0x9,
00108     FILE_QOS_METHOD_ID=0x1,
00109     FILE_QOS_OK_METHOD_ID=0x2,
00110     FILE_CONSUME_METHOD_ID=0x3,
00111     FILE_CONSUME_OK_METHOD_ID=0x4,
00112     FILE_CANCEL_METHOD_ID=0x5,
00113     FILE_OPEN_METHOD_ID=0x6,
00114     FILE_OPEN_OK_METHOD_ID=0x7,
00115     FILE_STAGE_METHOD_ID=0x8,
00116     FILE_PUBLISH_METHOD_ID=0x9,
00117     FILE_RETURN_METHOD_ID=0xa,
00118     FILE_DELIVER_METHOD_ID=0xb,
00119     FILE_ACK_METHOD_ID=0xc,
00120     FILE_REJECT_METHOD_ID=0xd,
00121     STREAM_CLASS_ID=0xa,
00122     STREAM_QOS_METHOD_ID=0x1,
00123     STREAM_QOS_OK_METHOD_ID=0x2,
00124     STREAM_CONSUME_METHOD_ID=0x3,
00125     STREAM_CONSUME_OK_METHOD_ID=0x4,
00126     STREAM_CANCEL_METHOD_ID=0x5,
00127     STREAM_PUBLISH_METHOD_ID=0x6,
00128     STREAM_RETURN_METHOD_ID=0x7,
00129     STREAM_DELIVER_METHOD_ID=0x8,
00130     CLUSTER_CLASS_ID=0x80,
00131     CLUSTER_UPDATE_REQUEST_METHOD_ID=0x1,
00132     CLUSTER_UPDATE_OFFER_METHOD_ID=0x2,
00133     CLUSTER_RETRACT_OFFER_METHOD_ID=0x3,
00134     CLUSTER_INITIAL_STATUS_METHOD_ID=0x5,
00135     CLUSTER_READY_METHOD_ID=0x10,
00136     CLUSTER_CONFIG_CHANGE_METHOD_ID=0x11,
00137     CLUSTER_ERROR_CHECK_METHOD_ID=0x14,
00138     CLUSTER_TIMER_WAKEUP_METHOD_ID=0x15,
00139     CLUSTER_TIMER_DROP_METHOD_ID=0x16,
00140     CLUSTER_SHUTDOWN_METHOD_ID=0x20,
00141     CLUSTER_DELIVER_TO_QUEUE_METHOD_ID=0x21,
00142     CLUSTER_CLOCK_METHOD_ID=0x22,
00143     CLUSTER_CONNECTION_CLASS_ID=0x81,
00144     CLUSTER_CONNECTION_ANNOUNCE_METHOD_ID=0x1,
00145     CLUSTER_CONNECTION_DELIVER_CLOSE_METHOD_ID=0x2,
00146     CLUSTER_CONNECTION_DELIVER_DO_OUTPUT_METHOD_ID=0x3,
00147     CLUSTER_CONNECTION_ABORT_METHOD_ID=0x4,
00148     CLUSTER_CONNECTION_SHADOW_SET_USER_METHOD_ID=0x0E,
00149     CLUSTER_CONNECTION_SHADOW_PREPARE_METHOD_ID=0x0F,
00150     CLUSTER_CONNECTION_CONSUMER_STATE_METHOD_ID=0x10,
00151     CLUSTER_CONNECTION_DELIVERY_RECORD_METHOD_ID=0x11,
00152     CLUSTER_CONNECTION_TX_START_METHOD_ID=0x12,
00153     CLUSTER_CONNECTION_TX_ACCEPT_METHOD_ID=0x13,
00154     CLUSTER_CONNECTION_TX_DEQUEUE_METHOD_ID=0x14,
00155     CLUSTER_CONNECTION_TX_ENQUEUE_METHOD_ID=0x15,
00156     CLUSTER_CONNECTION_TX_PUBLISH_METHOD_ID=0x16,
00157     CLUSTER_CONNECTION_TX_END_METHOD_ID=0x17,
00158     CLUSTER_CONNECTION_ACCUMULATED_ACK_METHOD_ID=0x18,
00159     CLUSTER_CONNECTION_OUTPUT_TASK_METHOD_ID=0x19,
00160     CLUSTER_CONNECTION_DTX_START_METHOD_ID=0x1A,
00161     CLUSTER_CONNECTION_DTX_END_METHOD_ID=0x1B,
00162     CLUSTER_CONNECTION_DTX_ACK_METHOD_ID=0x1C,
00163     CLUSTER_CONNECTION_DTX_BUFFER_REF_METHOD_ID=0x1D,
00164     CLUSTER_CONNECTION_DTX_WORK_RECORD_METHOD_ID=0x1E,
00165     CLUSTER_CONNECTION_SESSION_STATE_METHOD_ID=0x1F,
00166     CLUSTER_CONNECTION_SHADOW_READY_METHOD_ID=0x20,
00167     CLUSTER_CONNECTION_MEMBERSHIP_METHOD_ID=0x21,
00168     CLUSTER_CONNECTION_RETRACT_OFFER_METHOD_ID=0x22,
00169     CLUSTER_CONNECTION_QUEUE_POSITION_METHOD_ID=0x30,
00170     CLUSTER_CONNECTION_EXCHANGE_METHOD_ID=0x31,
00171     CLUSTER_CONNECTION_ADD_QUEUE_LISTENER_METHOD_ID=0x34,
00172     CLUSTER_CONNECTION_MANAGEMENT_SETUP_STATE_METHOD_ID=0x36,
00173     CLUSTER_CONNECTION_CONFIG_METHOD_ID=0x37,
00174     CLUSTER_CONNECTION_QUEUE_FAIRSHARE_STATE_METHOD_ID=0x38,
00175     CLUSTER_CONNECTION_QUEUE_OBSERVER_STATE_METHOD_ID=0x39,
00176     CLUSTER_CONNECTION_CLOCK_METHOD_ID=0x40,
00177     CLUSTER_CONNECTION_QUEUE_DEQUEUE_SINCE_PURGE_STATE_METHOD_ID=0x41
00178 };
00179 
00180 }} // namespace qpid::framing
00181 
00182 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00221.html0000664000076400007640000002301411752725720017304 0ustar00jrossjross00000000000000 qpid::management::Mutex Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::Mutex Class Reference

#include <qpid/management/Mutex.h>

List of all members.

Public Types

typedef ScopedLockTemplate< MutexScopedLock
typedef ScopedUnlockTemplate
< Mutex
ScopedUnlock

Public Member Functions

 Mutex ()
 ~Mutex ()
void lock ()
void unlock ()

Member Typedef Documentation


Constructor & Destructor Documentation

qpid::management::Mutex::Mutex ( )
qpid::management::Mutex::~Mutex ( )

Member Function Documentation

void qpid::management::Mutex::lock ( )
void qpid::management::Mutex::unlock ( )

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00395.html0000664000076400007640000001022211752725720017315 0ustar00jrossjross00000000000000 std::wostream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wostream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x6e.html0000664000076400007640000002514311752725717021364 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- n -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00098.html0000664000076400007640000001022411752725720017317 0ustar00jrossjross00000000000000 std::domain_error Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::domain_error Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00501_source.html0000664000076400007640000002707211752725717020703 0ustar00jrossjross00000000000000 qpid/framing/DtxRecoverResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/DtxRecoverResult.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_DTXRECOVERRESULT_H
00002 #define QPID_FRAMING_DTXRECOVERRESULT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN DtxRecoverResult  {
00039     Array inDoubt;
00040     uint16_t flags;
00041 public:
00042     static const uint16_t TYPE = 1539;
00043     DtxRecoverResult(
00044         const Array& _inDoubt) : 
00045         inDoubt(_inDoubt),
00046         flags(0){
00047         flags |= (1 << 8);
00048     }
00049     DtxRecoverResult()  : flags(0) {}
00050     
00051     QPID_COMMON_EXTERN void setInDoubt(const Array& _inDoubt);
00052     QPID_COMMON_EXTERN const Array& getInDoubt() const;
00053     QPID_COMMON_EXTERN bool hasInDoubt() const;
00054     QPID_COMMON_EXTERN void clearInDoubtFlag();
00055     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const DtxRecoverResult&);
00056     QPID_COMMON_EXTERN void encode(Buffer&) const;
00057     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00058     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00059     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00060     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00061     QPID_COMMON_EXTERN uint32_t bodySize() const;
00062     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00063 }; /* class DtxRecoverResult */
00064 
00065 }}
00066 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00444_source.html0000664000076400007640000002357611752725717020716 0ustar00jrossjross00000000000000 qmf/posix/EventNotifier.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/posix/EventNotifier.h
Go to the documentation of this file.
00001 #ifndef __QMF_POSIX_EVENT_NOTIFIER_H
00002 #define __QMF_POSIX_EVENT_NOTIFIER_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <qmf/ImportExport.h>
00024 #include "qmf/Handle.h"
00025 #include "qmf/AgentSession.h"
00026 #include "qmf/ConsoleSession.h"
00027 
00028 namespace qmf {
00029 
00030     class PosixEventNotifierImpl;
00031     class PosixEventNotifierImplAccess;
00032 
00033 namespace posix {
00034 
00035 #ifndef SWIG
00036   template <class> class PrivateImplRef;
00037 #endif
00038 
00039   class QMF_CLASS_EXTERN EventNotifier : public qmf::Handle<qmf::PosixEventNotifierImpl> {
00040   public:
00041       QMF_EXTERN EventNotifier(PosixEventNotifierImpl* impl = 0);
00042       QMF_EXTERN EventNotifier(::qmf::AgentSession& agentSession);
00043       QMF_EXTERN EventNotifier(::qmf::ConsoleSession& consoleSession);
00044       QMF_EXTERN EventNotifier(const EventNotifier& that);
00045 
00046       QMF_EXTERN ~EventNotifier();
00047 
00048       QMF_EXTERN EventNotifier& operator=(const EventNotifier& that);
00049 
00050       QMF_EXTERN int getHandle() const;
00051 
00052 #ifndef SWIG
00053   private:
00054       friend class qmf::PrivateImplRef<EventNotifier>;
00055       friend struct qmf::PosixEventNotifierImplAccess;
00056 #endif
00057 
00058   };
00059 
00060 }}
00061 
00062 #endif
00063 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/closed.png0000664000076400007640000000017611752725717017602 0ustar00jrossjross00000000000000‰PNG  IHDR à‘EIDATxíÝA @! PŠ­iš/`Є.È?,!ƒu zlÞ–Jh1ߘ+výRLé§x@‘Ù (*79HÑ þl)¡ó²‰IEND®B`‚qpidc-0.16/docs/api/html/a00147.html0000664000076400007640000001517511752725720017324 0ustar00jrossjross00000000000000 qpid::log::Statement::Initializer Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Statement::Initializer Struct Reference

#include <qpid/log/Statement.h>

List of all members.

Public Member Functions

 Initializer (Statement &s)

Public Attributes

Statementstatement

Constructor & Destructor Documentation

qpid::log::Statement::Initializer::Initializer ( Statement s)

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00185.html0000664000076400007640000002016611752725717017330 0ustar00jrossjross00000000000000 qmf::KeyNotFound Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::KeyNotFound Struct Reference

#include <qmf/exceptions.h>

List of all members.

Public Member Functions

 KeyNotFound (const std::string &msg)
virtual ~KeyNotFound () throw ()
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qmf::KeyNotFound::KeyNotFound ( const std::string msg)
virtual qmf::KeyNotFound::~KeyNotFound ( ) throw () [virtual]

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 38 of file exceptions.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00200.html0000664000076400007640000011074211752725720017306 0ustar00jrossjross00000000000000 qpid::management::ManagementItem Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ManagementItem Class Reference

#include <qpid/management/ManagementObject.h>

List of all members.

Public Member Functions

virtual ~ManagementItem ()

Static Public Attributes

static const uint8_t TYPE_U8 = 1
static const uint8_t TYPE_U16 = 2
static const uint8_t TYPE_U32 = 3
static const uint8_t TYPE_U64 = 4
static const uint8_t TYPE_SSTR = 6
static const uint8_t TYPE_LSTR = 7
static const uint8_t TYPE_ABSTIME = 8
static const uint8_t TYPE_DELTATIME = 9
static const uint8_t TYPE_REF = 10
static const uint8_t TYPE_BOOL = 11
static const uint8_t TYPE_FLOAT = 12
static const uint8_t TYPE_DOUBLE = 13
static const uint8_t TYPE_UUID = 14
static const uint8_t TYPE_FTABLE = 15
static const uint8_t TYPE_S8 = 16
static const uint8_t TYPE_S16 = 17
static const uint8_t TYPE_S32 = 18
static const uint8_t TYPE_S64 = 19
static const uint8_t TYPE_LIST = 21
static const uint8_t ACCESS_RC = 1
static const uint8_t ACCESS_RW = 2
static const uint8_t ACCESS_RO = 3
static const uint8_t DIR_I = 1
static const uint8_t DIR_O = 2
static const uint8_t DIR_IO = 3
static const uint8_t FLAG_CONFIG = 0x01
static const uint8_t FLAG_INDEX = 0x02
static const uint8_t FLAG_END = 0x80
static const uint8_t CLASS_KIND_TABLE = 1
static const uint8_t CLASS_KIND_EVENT = 2

Constructor & Destructor Documentation

virtual qpid::management::ManagementItem::~ManagementItem ( ) [inline, virtual]

Definition at line 131 of file ManagementObject.h.


Member Data Documentation

Definition at line 113 of file ManagementObject.h.

Definition at line 115 of file ManagementObject.h.

Definition at line 114 of file ManagementObject.h.

Definition at line 126 of file ManagementObject.h.

Definition at line 125 of file ManagementObject.h.

Definition at line 117 of file ManagementObject.h.

Definition at line 119 of file ManagementObject.h.

Definition at line 118 of file ManagementObject.h.

Definition at line 121 of file ManagementObject.h.

Definition at line 123 of file ManagementObject.h.

Definition at line 122 of file ManagementObject.h.

Definition at line 99 of file ManagementObject.h.

Definition at line 102 of file ManagementObject.h.

Definition at line 100 of file ManagementObject.h.

Definition at line 104 of file ManagementObject.h.

Definition at line 103 of file ManagementObject.h.

Definition at line 106 of file ManagementObject.h.

Definition at line 111 of file ManagementObject.h.

Definition at line 98 of file ManagementObject.h.

Definition at line 101 of file ManagementObject.h.

Definition at line 108 of file ManagementObject.h.

Definition at line 109 of file ManagementObject.h.

Definition at line 110 of file ManagementObject.h.

Definition at line 107 of file ManagementObject.h.

Definition at line 97 of file ManagementObject.h.

Definition at line 94 of file ManagementObject.h.

Definition at line 95 of file ManagementObject.h.

Definition at line 96 of file ManagementObject.h.

Definition at line 93 of file ManagementObject.h.

Definition at line 105 of file ManagementObject.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00384.html0000664000076400007640000004743711752725720017335 0ustar00jrossjross00000000000000 qpid::framing::VariableWidthValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::VariableWidthValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 VariableWidthValue ()
 VariableWidthValue (const std::vector< uint8_t > &data)
 VariableWidthValue (const uint8_t *start, const uint8_t *end)
uint32_t encodedSize () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const Data &d) const
bool convertsToString () const
std::string getString () const
void print (std::ostream &o) const
virtual bool operator== (const Data &) const =0
virtual bool convertsToInt () const
virtual int64_t getInt () const

Constructor & Destructor Documentation

qpid::framing::VariableWidthValue::VariableWidthValue ( ) [inline]

Definition at line 265 of file FieldValue.h.

qpid::framing::VariableWidthValue::VariableWidthValue ( const std::vector< uint8_t > &  data) [inline]

Definition at line 266 of file FieldValue.h.

qpid::framing::VariableWidthValue::VariableWidthValue ( const uint8_t start,
const uint8_t end 
) [inline]

Definition at line 267 of file FieldValue.h.


Member Function Documentation

virtual bool qpid::framing::FieldValue::Data::convertsToInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::FixedWidthValue.

Definition at line 75 of file FieldValue.h.

bool qpid::framing::VariableWidthValue::convertsToString ( ) const [inline, virtual]

Reimplemented from qpid::framing::FieldValue::Data.

Definition at line 286 of file FieldValue.h.

void qpid::framing::VariableWidthValue::decode ( Buffer buffer) [inline, virtual]
void qpid::framing::VariableWidthValue::encode ( Buffer buffer) [inline, virtual]
uint32_t qpid::framing::VariableWidthValue::encodedSize ( ) const [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 268 of file FieldValue.h.

virtual int64_t qpid::framing::FieldValue::Data::getInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::FixedWidthValue.

Definition at line 77 of file FieldValue.h.

std::string qpid::framing::VariableWidthValue::getString ( ) const [inline, virtual]

Reimplemented from qpid::framing::FieldValue::Data.

Definition at line 287 of file FieldValue.h.

virtual bool qpid::framing::FieldValue::Data::operator== ( const Data ) const [pure virtual, inherited]
bool qpid::framing::VariableWidthValue::operator== ( const Data &  d) const [inline]

Definition at line 280 of file FieldValue.h.

void qpid::framing::VariableWidthValue::print ( std::ostream o) const [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 289 of file FieldValue.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00561.html0000664000076400007640000001551311752725717017326 0ustar00jrossjross00000000000000 qpid/sys/posix/PrivatePosix.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/PrivatePosix.h File Reference
#include "qpid/sys/Time.h"
#include "qpid/sys/IOHandle.h"

Go to the source code of this file.

Classes

class  qpid::sys::IOHandlePrivate
class  qpid::sys::PosixIOHandle
class  qpid::sys::NullIOHandle

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Functions

struct timespec & qpid::sys::toTimespec (struct timespec &ts, const Duration &t)
struct timeval & qpid::sys::toTimeval (struct timeval &tv, const Duration &t)
Duration qpid::sys::toTime (const struct timespec &ts)
struct addrinfo & qpid::sys::getAddrInfo (const SocketAddress &)
int qpid::sys::toFd (const IOHandlePrivate *h)

Variables

NullIOHandle qpid::sys::DummyIOHandle

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00503.html0000664000076400007640000001203511752725717017316 0ustar00jrossjross00000000000000 qpid/framing/ExchangeBoundResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/ExchangeBoundResult.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::ExchangeBoundResult

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00881.html0000664000076400007640000001075011752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ScopedRlock Member List
This is the complete list of members for qpid::sys::ScopedRlock, including all inherited members.
ScopedRlock(L &l)qpid::sys::ScopedRlock [inline]
~ScopedRlock()qpid::sys::ScopedRlock [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x73.html0000664000076400007640000014042711752725717021306 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- s -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00075.html0000664000076400007640000001035611752725720017320 0ustar00jrossjross00000000000000 std::wstring::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wstring::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00911.html0000664000076400007640000000764511752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::valarray Member List
This is the complete list of members for std::valarray, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00663.html0000664000076400007640000001647311752725717017337 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Msg Member List
This is the complete list of members for qpid::Msg, including all inherited members.
Msg()qpid::Msg [inline]
Msg(const Msg &m)qpid::Msg [inline]
operator std::string() const qpid::Msg [inline]
operator<<(long n)qpid::Msg [inline]
operator<<(unsigned long n)qpid::Msg [inline]
operator<<(bool n)qpid::Msg [inline]
operator<<(short n)qpid::Msg [inline]
operator<<(unsigned short n)qpid::Msg [inline]
operator<<(int n)qpid::Msg [inline]
operator<<(unsigned int n)qpid::Msg [inline]
operator<<(double n)qpid::Msg [inline]
operator<<(float n)qpid::Msg [inline]
operator<<(long double n)qpid::Msg [inline]
operator<<(const T &t)qpid::Msg [inline]
osqpid::Msg
str() const qpid::Msg [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00863.html0000664000076400007640000001420411752725720017321 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::TransactionAborted Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00417_source.html0000664000076400007640000004153611752725717020712 0ustar00jrossjross00000000000000 qpid/console/Event.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Event.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_EVENT_H_
00022 #define _QPID_CONSOLE_EVENT_H_
00023 
00024 #include "qpid/console/ConsoleImportExport.h"
00025 #include "qpid/console/Object.h"
00026 #include "qpid/framing/Uuid.h"
00027 #include "qpid/framing/FieldTable.h"
00028 
00029 namespace qpid {
00030 namespace framing {
00031     class Buffer;
00032 }
00033 namespace console {
00034 
00035     class  Broker;
00036     struct SchemaClass;
00037     class  ClassKey;
00038 
00043     class Event {
00044     public:
00045         typedef enum {
00046         SEV_EMERGENCY = 0, SEV_ALERT = 1, SEV_CRITICAL = 2, SEV_ERROR = 3,
00047         SEV_WARNING = 4, SEV_NOTICE = 5, SEV_INFO = 6, SEV_DEBUG = 7
00048         } Severity;
00049 
00050         QPID_CONSOLE_EXTERN Event(Broker* broker,
00051                                   SchemaClass* schemaClass,
00052                                   framing::Buffer& buffer);
00053         Broker* getBroker() const { return broker; }
00054         QPID_CONSOLE_EXTERN const ClassKey& getClassKey() const;
00055         SchemaClass* getSchema() const { return schema; }
00056         const Object::AttributeMap& getAttributes() const { return attributes; }
00057         uint64_t getTimestamp() const { return timestamp; }
00058         uint8_t getSeverity() const { return severity; }
00059         QPID_CONSOLE_EXTERN std::string getSeverityString() const;
00060 
00061         QPID_CONSOLE_EXTERN ObjectId attrRef(const std::string& key) const;
00062         QPID_CONSOLE_EXTERN uint32_t attrUint(const std::string& key) const;
00063         QPID_CONSOLE_EXTERN int32_t attrInt(const std::string& key) const;
00064         QPID_CONSOLE_EXTERN uint64_t attrUint64(const std::string& key) const;
00065         QPID_CONSOLE_EXTERN int64_t attrInt64(const std::string& key) const;
00066         QPID_CONSOLE_EXTERN std::string attrString(const std::string& key) const;
00067         QPID_CONSOLE_EXTERN bool attrBool(const std::string& key) const;
00068         QPID_CONSOLE_EXTERN float attrFloat(const std::string& key) const;
00069         QPID_CONSOLE_EXTERN double attrDouble(const std::string& key) const;
00070         QPID_CONSOLE_EXTERN framing::Uuid attrUuid(const std::string& key) const;
00071         QPID_CONSOLE_EXTERN framing::FieldTable attrMap(const std::string& key) const;
00072 
00073     private:
00074         Broker* broker;
00075         SchemaClass* schema;
00076         uint64_t timestamp;
00077         Severity severity;
00078         Object::AttributeMap attributes;
00079     };
00080 
00081     QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const Event& event);
00082 }
00083 }
00084 
00085 
00086 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00316.html0000664000076400007640000001476211752725720017323 0ustar00jrossjross00000000000000 qpid::management::ScopedUnlockTemplate Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ScopedUnlockTemplate Class Reference

#include <qpid/management/Mutex.h>

List of all members.

Public Member Functions

 ScopedUnlockTemplate (L &l)
 ~ScopedUnlockTemplate ()

Constructor & Destructor Documentation

qpid::management::ScopedUnlockTemplate::ScopedUnlockTemplate ( L &  l) [inline]

Definition at line 45 of file Mutex.h.

qpid::management::ScopedUnlockTemplate::~ScopedUnlockTemplate ( ) [inline]

Definition at line 46 of file Mutex.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00625.html0000664000076400007640000001207311752725717017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::AgentProxy Member List
This is the complete list of members for qmf::engine::AgentProxy, including all inherited members.
AgentProxy(const AgentProxy &from)qmf::engine::AgentProxy
getAgentBank() const qmf::engine::AgentProxy
getBrokerBank() const qmf::engine::AgentProxy
getLabel() const qmf::engine::AgentProxy
~AgentProxy()qmf::engine::AgentProxy

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00381.html0000664000076400007640000001702411752725720017317 0ustar00jrossjross00000000000000 qpid::console::ValueFactory Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::ValueFactory Class Reference

#include <qpid/console/Value.h>

List of all members.

Static Public Member Functions

static Value::Ptr newValue (int typeCode, framing::Buffer &buffer)
static void encodeValue (int typeCode, Value::Ptr value, framing::Buffer &buffer)

Member Function Documentation

static void qpid::console::ValueFactory::encodeValue ( int  typeCode,
Value::Ptr  value,
framing::Buffer buffer 
) [static]
static Value::Ptr qpid::console::ValueFactory::newValue ( int  typeCode,
framing::Buffer buffer 
) [static]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00089.html0000664000076400007640000001042211752725720017317 0ustar00jrossjross00000000000000 std::multimap::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multimap::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x6c.html0000664000076400007640000001374311752725720023665 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- l -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00590.html0000664000076400007640000002337111752725720017323 0ustar00jrossjross00000000000000 qpid::management Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management Namespace Reference

Classes

class  Notifyable
class  ManagementAgent
class  Args
class  ArgsNone
struct  OutOfBounds
class  Buffer
 This class is a wrapper around qpid::framing::Buffer that does not include any dependencies from boost or from qpid::framing. More...
struct  ConnectionSettings
 Settings for a Connection. More...
class  Manageable
class  ManagementEvent
class  AgentAttachment
class  ObjectId
class  ManagementItem
class  ManagementObject
class  ScopedLockTemplate
 Scoped lock template: calls lock() in ctor, unlock() in dtor. More...
class  ScopedUnlockTemplate
class  Mutex

Typedefs

typedef std::map< ObjectId,
ManagementObject * > 
ManagementObjectMap
typedef std::vector
< ManagementObject * > 
ManagementObjectVector

Typedef Documentation


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00310.html0000664000076400007640000003012011752725717017305 0ustar00jrossjross00000000000000 qmf::engine::SchemaStatistic Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaStatistic Class Reference

#include <qmf/engine/Schema.h>

List of all members.

Public Member Functions

 SchemaStatistic (const char *name, Typecode typecode)
 SchemaStatistic (const SchemaStatistic &from)
 ~SchemaStatistic ()
void setUnit (const char *val)
void setDesc (const char *desc)
const char * getName () const
Typecode getType () const
const char * getUnit () const
const char * getDesc () const

Constructor & Destructor Documentation

qmf::engine::SchemaStatistic::SchemaStatistic ( const char *  name,
Typecode  typecode 
)
qmf::engine::SchemaStatistic::SchemaStatistic ( const SchemaStatistic from)
qmf::engine::SchemaStatistic::~SchemaStatistic ( )

Member Function Documentation

const char* qmf::engine::SchemaStatistic::getDesc ( ) const
const char* qmf::engine::SchemaStatistic::getName ( ) const
Typecode qmf::engine::SchemaStatistic::getType ( ) const
const char* qmf::engine::SchemaStatistic::getUnit ( ) const
void qmf::engine::SchemaStatistic::setDesc ( const char *  desc)
void qmf::engine::SchemaStatistic::setUnit ( const char *  val)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x74.html0000664000076400007640000004270011752725720022573 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- t -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00798.html0000664000076400007640000001374011752725720017334 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::IllegalArgumentException Member List
This is the complete list of members for qpid::framing::IllegalArgumentException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::IllegalArgumentException [inline, virtual]
IllegalArgumentException(const std::string &msg=std::string())qpid::framing::IllegalArgumentException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00587.html0000664000076400007640000001617711752725720017337 0ustar00jrossjross00000000000000 qpid::framing::session Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::session Namespace Reference

Enumerations

enum  DetachCode {
  DETACH_CODE_NORMAL = 0, DETACH_CODE_SESSION_BUSY = 1, DETACH_CODE_TRANSPORT_BUSY = 2, DETACH_CODE_NOT_ATTACHED = 3,
  DETACH_CODE_UNKNOWN_IDS = 4
}

Enumeration Type Documentation

Enumerator:
DETACH_CODE_NORMAL 
DETACH_CODE_SESSION_BUSY 
DETACH_CODE_TRANSPORT_BUSY 
DETACH_CODE_NOT_ATTACHED 
DETACH_CODE_UNKNOWN_IDS 

Definition at line 59 of file enum.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00690.html0000664000076400007640000002060211752725717017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::LocalQueue Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00002.html0000664000076400007640000002723311752725717017316 0ustar00jrossjross00000000000000 qpid::Address Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Contains the protocol address of an AMQP broker. More...

#include <qpid/Address.h>

List of all members.

Public Member Functions

QPID_COMMON_INLINE_EXTERN Address (const std::string &protocol_=std::string(), const std::string &host_=std::string(), uint16_t port_=0)

Public Attributes

std::string protocol
std::string host
uint16_t port

Static Public Attributes

static const std::string TCP
static const uint16_t AMQP_PORT = 5672

Detailed Description

Contains the protocol address of an AMQP broker.


Constructor & Destructor Documentation

QPID_COMMON_INLINE_EXTERN qpid::Address::Address ( const std::string protocol_ = std::string(),
const std::string host_ = std::string(),
uint16_t  port_ = 0 
) [inline, explicit]

Definition at line 39 of file Address.h.


Member Data Documentation

const uint16_t qpid::Address::AMQP_PORT = 5672 [static]

Definition at line 37 of file Address.h.

Definition at line 46 of file Address.h.

Definition at line 47 of file Address.h.

Definition at line 45 of file Address.h.

Definition at line 36 of file Address.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00061.html0000664000076400007640000003006611752725717017321 0ustar00jrossjross00000000000000 qpid::ConnectionException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::ConnectionException Struct Reference

#include <qpid/Exception.h>

List of all members.

Public Member Functions

 ConnectionException (framing::connection::CloseCode _code, const std::string &message)
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Public Attributes

const
framing::connection::CloseCode 
code

Constructor & Destructor Documentation

qpid::ConnectionException::ConnectionException ( framing::connection::CloseCode  _code,
const std::string message 
) [inline]

Definition at line 73 of file Exception.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00497_source.html0000664000076400007640000005267011752725717020723 0ustar00jrossjross00000000000000 qpid/management/Buffer.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/Buffer.h
Go to the documentation of this file.
00001 #ifndef _Management_Buffer_
00002 #define _Management_Buffer_
00003 /*
00004  * Licensed to the Apache Software Foundation (ASF) under one
00005  * or more contributor license agreements.  See the NOTICE file
00006  * distributed with this work for additional information
00007  * regarding copyright ownership.  The ASF licenses this file
00008  * to you under the Apache License, Version 2.0 (the
00009  * "License"); you may not use this file except in compliance
00010  * with the License.  You may obtain a copy of the License at
00011  *
00012  *   http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing,
00015  * software distributed under the License is distributed on an
00016  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00017  * KIND, either express or implied.  See the License for the
00018  * specific language governing permissions and limitations
00019  * under the License.
00020  *
00021  */
00022 #include "qpid/CommonImportExport.h"
00023 #include "qpid/types/Exception.h"
00024 #include "qpid/types/Variant.h"
00025 #include <string>
00026 
00027 namespace qpid {
00028 namespace framing {
00029     class Buffer;
00030 }
00031 
00032 namespace management {
00033 
00034 struct OutOfBounds : qpid::types::Exception {
00035     OutOfBounds() : qpid::types::Exception(std::string("Out of Bounds")) {}
00036 };
00037 
00038 
00043 class Buffer
00044 {
00045 public:
00046     QPID_COMMON_EXTERN Buffer(char* data=0, uint32_t size=0);
00047     QPID_COMMON_EXTERN ~Buffer();
00048 
00049     QPID_COMMON_EXTERN void record();
00050     QPID_COMMON_EXTERN void restore(bool reRecord = false);
00051     QPID_COMMON_EXTERN void reset();
00052 
00053     QPID_COMMON_EXTERN uint32_t available();
00054     QPID_COMMON_EXTERN uint32_t getSize();
00055     QPID_COMMON_EXTERN uint32_t getPosition();
00056     QPID_COMMON_EXTERN char* getPointer();
00057 
00058     QPID_COMMON_EXTERN void putOctet(uint8_t i);
00059     QPID_COMMON_EXTERN void putShort(uint16_t i);
00060     QPID_COMMON_EXTERN void putLong(uint32_t i);
00061     QPID_COMMON_EXTERN void putLongLong(uint64_t i);
00062     QPID_COMMON_EXTERN void putInt8(int8_t i);
00063     QPID_COMMON_EXTERN void putInt16(int16_t i);
00064     QPID_COMMON_EXTERN void putInt32(int32_t i);
00065     QPID_COMMON_EXTERN void putInt64(int64_t i);
00066     QPID_COMMON_EXTERN void putFloat(float f);
00067     QPID_COMMON_EXTERN void putDouble(double f);
00068     QPID_COMMON_EXTERN void putBin128(const uint8_t* b);
00069 
00070     QPID_COMMON_EXTERN uint8_t  getOctet();
00071     QPID_COMMON_EXTERN uint16_t getShort();
00072     QPID_COMMON_EXTERN uint32_t getLong();
00073     QPID_COMMON_EXTERN uint64_t getLongLong();
00074     QPID_COMMON_EXTERN int8_t   getInt8();
00075     QPID_COMMON_EXTERN int16_t  getInt16();
00076     QPID_COMMON_EXTERN int32_t  getInt32();
00077     QPID_COMMON_EXTERN int64_t  getInt64();
00078     QPID_COMMON_EXTERN float    getFloat();
00079     QPID_COMMON_EXTERN double   getDouble();
00080 
00081     QPID_COMMON_EXTERN void putShortString(const std::string& s);
00082     QPID_COMMON_EXTERN void putMediumString(const std::string& s);
00083     QPID_COMMON_EXTERN void putLongString(const std::string& s);
00084     QPID_COMMON_EXTERN void getShortString(std::string& s);
00085     QPID_COMMON_EXTERN void getMediumString(std::string& s);
00086     QPID_COMMON_EXTERN void getLongString(std::string& s);
00087     QPID_COMMON_EXTERN void getBin128(uint8_t* b);
00088 
00089     QPID_COMMON_EXTERN void putMap(const types::Variant::Map& map);
00090     QPID_COMMON_EXTERN void putList(const types::Variant::List& list);
00091     QPID_COMMON_EXTERN void getMap(types::Variant::Map& map);
00092     QPID_COMMON_EXTERN void getList(types::Variant::List& list);
00093 
00094     QPID_COMMON_EXTERN void putRawData(const std::string& s);
00095     QPID_COMMON_EXTERN void getRawData(std::string& s, uint32_t size);
00096 
00097     QPID_COMMON_EXTERN void putRawData(const uint8_t* data, size_t size);
00098     QPID_COMMON_EXTERN void getRawData(uint8_t* data, size_t size);
00099 
00100 private:
00101     framing::Buffer* impl;
00102 };
00103 
00104 }} // namespace qpid::management
00105 
00106 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00406.html0000664000076400007640000001364011752725717017323 0ustar00jrossjross00000000000000 qmf/AgentEvent.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/AgentEvent.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00097.html0000664000076400007640000001304311752725720017320 0ustar00jrossjross00000000000000 std::deque Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::deque Class Reference

STL class. More...

List of all members.

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00449_source.html0000664000076400007640000002412411752725717020711 0ustar00jrossjross00000000000000 qmf/Subscription.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Subscription.h
Go to the documentation of this file.
00001 #ifndef QMF_SUBSCRIPTION_H
00002 #define QMF_SUBSCRIPTION_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qpid/types/Variant.h"
00027 #include <string>
00028 
00029 namespace qmf {
00030 
00031 #ifndef SWIG
00032     template <class> class PrivateImplRef;
00033 #endif
00034 
00035     class SubscriptionImpl;
00036     class Data;
00037 
00038     class QMF_CLASS_EXTERN Subscription : public qmf::Handle<SubscriptionImpl> {
00039     public:
00040         QMF_EXTERN Subscription(SubscriptionImpl* impl = 0);
00041         QMF_EXTERN Subscription(const Subscription&);
00042         QMF_EXTERN Subscription& operator=(const Subscription&);
00043         QMF_EXTERN ~Subscription();
00044 
00053         QMF_EXTERN void cancel();
00054 
00060         QMF_EXTERN bool isActive() const;
00061 
00068         QMF_EXTERN void lock();
00069         QMF_EXTERN void unlock();
00070         QMF_EXTERN uint32_t getDataCount() const;
00071         QMF_EXTERN Data getData(uint32_t) const;
00072 
00073 #ifndef SWIG
00074     private:
00075         friend class qmf::PrivateImplRef<Subscription>;
00076         friend struct SubscriptionImplAccess;
00077 #endif
00078     };
00079 
00080 }
00081 
00082 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00133.html0000664000076400007640000005556711752725720017330 0ustar00jrossjross00000000000000 qpid::framing::FragmentProperties Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FragmentProperties Class Reference

#include <qpid/framing/FragmentProperties.h>

List of all members.

Public Member Functions

 FragmentProperties (bool _first, bool _last, uint64_t _fragmentSize)
 FragmentProperties ()
void setFirst (bool _first)
bool getFirst () const
void setLast (bool _last)
bool getLast () const
void setFragmentSize (uint64_t _fragmentSize)
uint64_t getFragmentSize () const
bool hasFragmentSize () const
void clearFragmentSizeFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1026

Friends

std::ostreamoperator<< (std::ostream &, const FragmentProperties &)

Constructor & Destructor Documentation

qpid::framing::FragmentProperties::FragmentProperties ( bool  _first,
bool  _last,
uint64_t  _fragmentSize 
) [inline]

Definition at line 43 of file FragmentProperties.h.

qpid::framing::FragmentProperties::FragmentProperties ( ) [inline]

Definition at line 53 of file FragmentProperties.h.


Member Function Documentation

uint32_t qpid::framing::FragmentProperties::bodySize ( ) const
void qpid::framing::FragmentProperties::clearFragmentSizeFlag ( )
void qpid::framing::FragmentProperties::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::FragmentProperties::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::FragmentProperties::encode ( Buffer ) const
uint32_t qpid::framing::FragmentProperties::encodedSize ( ) const
void qpid::framing::FragmentProperties::encodeStructBody ( Buffer ) const
bool qpid::framing::FragmentProperties::getFirst ( ) const
uint64_t qpid::framing::FragmentProperties::getFragmentSize ( ) const
bool qpid::framing::FragmentProperties::getLast ( ) const
bool qpid::framing::FragmentProperties::hasFragmentSize ( ) const
void qpid::framing::FragmentProperties::print ( std::ostream out) const
void qpid::framing::FragmentProperties::setFirst ( bool  _first)
void qpid::framing::FragmentProperties::setFragmentSize ( uint64_t  _fragmentSize)
void qpid::framing::FragmentProperties::setLast ( bool  _last)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const FragmentProperties  
) [friend]

Member Data Documentation

Definition at line 42 of file FragmentProperties.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00344.html0000664000076400007640000010507511752725720017322 0ustar00jrossjross00000000000000 qpid::framing::StreamProperties Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::StreamProperties Class Reference

#include <qpid/framing/StreamProperties.h>

List of all members.

Public Member Functions

 StreamProperties (const std::string &_contentType, const std::string &_contentEncoding, const FieldTable &_headers, uint8_t _priority, uint64_t _timestamp)
 StreamProperties ()
void setContentType (const std::string &_contentType)
const std::stringgetContentType () const
bool hasContentType () const
void clearContentTypeFlag ()
void setContentEncoding (const std::string &_contentEncoding)
const std::stringgetContentEncoding () const
bool hasContentEncoding () const
void clearContentEncodingFlag ()
void setHeaders (const FieldTable &_headers)
const FieldTablegetHeaders () const
FieldTablegetHeaders ()
bool hasHeaders () const
void clearHeadersFlag ()
void setPriority (uint8_t _priority)
uint8_t getPriority () const
bool hasPriority () const
void clearPriorityFlag ()
void setTimestamp (uint64_t _timestamp)
uint64_t getTimestamp () const
bool hasTimestamp () const
void clearTimestampFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 2561

Friends

std::ostreamoperator<< (std::ostream &, const StreamProperties &)

Constructor & Destructor Documentation

qpid::framing::StreamProperties::StreamProperties ( const std::string _contentType,
const std::string _contentEncoding,
const FieldTable _headers,
uint8_t  _priority,
uint64_t  _timestamp 
) [inline]

Definition at line 47 of file StreamProperties.h.

qpid::framing::StreamProperties::StreamProperties ( ) [inline]

Definition at line 65 of file StreamProperties.h.


Member Function Documentation

uint32_t qpid::framing::StreamProperties::bodySize ( ) const
void qpid::framing::StreamProperties::clearContentEncodingFlag ( )
void qpid::framing::StreamProperties::clearContentTypeFlag ( )
void qpid::framing::StreamProperties::clearHeadersFlag ( )
void qpid::framing::StreamProperties::clearPriorityFlag ( )
void qpid::framing::StreamProperties::clearTimestampFlag ( )
void qpid::framing::StreamProperties::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::StreamProperties::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::StreamProperties::encode ( Buffer ) const
uint32_t qpid::framing::StreamProperties::encodedSize ( ) const
void qpid::framing::StreamProperties::encodeStructBody ( Buffer ) const
const std::string& qpid::framing::StreamProperties::getContentEncoding ( ) const
const std::string& qpid::framing::StreamProperties::getContentType ( ) const
const FieldTable& qpid::framing::StreamProperties::getHeaders ( ) const
FieldTable& qpid::framing::StreamProperties::getHeaders ( )
uint8_t qpid::framing::StreamProperties::getPriority ( ) const
uint64_t qpid::framing::StreamProperties::getTimestamp ( ) const
bool qpid::framing::StreamProperties::hasContentEncoding ( ) const
bool qpid::framing::StreamProperties::hasContentType ( ) const
bool qpid::framing::StreamProperties::hasHeaders ( ) const
bool qpid::framing::StreamProperties::hasPriority ( ) const
bool qpid::framing::StreamProperties::hasTimestamp ( ) const
void qpid::framing::StreamProperties::print ( std::ostream out) const
void qpid::framing::StreamProperties::setContentEncoding ( const std::string _contentEncoding)
void qpid::framing::StreamProperties::setContentType ( const std::string _contentType)
void qpid::framing::StreamProperties::setHeaders ( const FieldTable _headers)
void qpid::framing::StreamProperties::setPriority ( uint8_t  _priority)
void qpid::framing::StreamProperties::setTimestamp ( uint64_t  _timestamp)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const StreamProperties  
) [friend]

Member Data Documentation

Definition at line 46 of file StreamProperties.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00904.html0000664000076400007640000000764511752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multimap Member List
This is the complete list of members for std::multimap, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00267.html0000664000076400007640000006753211752725717017341 0ustar00jrossjross00000000000000 qpid::Range Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

A range of values, used in RangeSet. More...

#include <qpid/RangeSet.h>

List of all members.

Public Member Functions

 Range ()
 Range (const T &t)
 Range (const T &b, const T &e)
begin () const
end () const
 End of _open_ range, i.e.
first () const
last () const
 Last in closed range, i.e.
void begin (const T &t)
void end (const T &t)
size_t size () const
bool empty () const
bool contains (const T &x) const
bool contains (const Range &r) const
bool strictContains (const Range &r) const
bool operator== (const Range &x)
bool operator< (const T &t) const
bool operator< (const Range< T > &r) const
bool touching (const Range &r) const
 touching ranges can be merged into a single range.
void merge (const Range &r)
 operator bool () const
template<class S >
void serialize (S &s)

Static Public Member Functions

static Range makeClosed (const T &first, T last)

Detailed Description

A range of values, used in RangeSet.

Range(begin, end) includes begin but excludes end. Range::makeClosed(first,last) includes both first and last.


Constructor & Destructor Documentation

qpid::Range::Range ( ) [inline]

Definition at line 43 of file RangeSet.h.

Referenced by makeClosed().

qpid::Range::Range ( const T &  t) [inline, explicit]

Definition at line 44 of file RangeSet.h.

qpid::Range::Range ( const T &  b,
const T &  e 
) [inline]

Definition at line 45 of file RangeSet.h.


Member Function Documentation

T qpid::Range::begin ( ) const [inline]

Definition at line 47 of file RangeSet.h.

void qpid::Range::begin ( const T &  t) [inline]

Definition at line 55 of file RangeSet.h.

bool qpid::Range::contains ( const T &  x) const [inline]

Definition at line 60 of file RangeSet.h.

bool qpid::Range::contains ( const Range r) const [inline]

Definition at line 61 of file RangeSet.h.

bool qpid::Range::empty ( ) const [inline]

Definition at line 58 of file RangeSet.h.

Referenced by first(), last(), and operator bool().

T qpid::Range::end ( ) const [inline]

End of _open_ range, i.e.

!contains(end())

Definition at line 49 of file RangeSet.h.

Referenced by qpid::RangeSet::removeRange().

void qpid::Range::end ( const T &  t) [inline]

Definition at line 56 of file RangeSet.h.

T qpid::Range::first ( ) const [inline]

Definition at line 51 of file RangeSet.h.

References empty().

T qpid::Range::last ( ) const [inline]

Last in closed range, i.e.

contains(end())

Definition at line 53 of file RangeSet.h.

References empty().

static Range qpid::Range::makeClosed ( const T &  first,
last 
) [inline, static]

Definition at line 41 of file RangeSet.h.

References Range().

void qpid::Range::merge ( const Range r) [inline]
Precondition:
touching

Definition at line 75 of file RangeSet.h.

References touching().

qpid::Range::operator bool ( ) const [inline]

Definition at line 81 of file RangeSet.h.

References empty().

bool qpid::Range::operator< ( const T &  t) const [inline]

Definition at line 66 of file RangeSet.h.

bool qpid::Range::operator< ( const Range< T > &  r) const [inline]

Definition at line 67 of file RangeSet.h.

bool qpid::Range::operator== ( const Range x) [inline]

Definition at line 64 of file RangeSet.h.

template<class S >
void qpid::Range::serialize ( S &  s) [inline]

Definition at line 83 of file RangeSet.h.

size_t qpid::Range::size ( ) const [inline]

Definition at line 57 of file RangeSet.h.

bool qpid::Range::strictContains ( const Range r) const [inline]

Definition at line 62 of file RangeSet.h.

bool qpid::Range::touching ( const Range r) const [inline]

touching ranges can be merged into a single range.

Definition at line 70 of file RangeSet.h.

Referenced by merge().


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00292.html0000664000076400007640000001035211752725720017315 0ustar00jrossjross00000000000000 std::list::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::list::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00788.html0000664000076400007640000003112711752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::QueueQueryResult Member List
This is the complete list of members for qpid::framing::QueueQueryResult, including all inherited members.
bodySize() const qpid::framing::QueueQueryResult
clearAlternateExchangeFlag()qpid::framing::QueueQueryResult
clearArgumentsFlag()qpid::framing::QueueQueryResult
clearMessageCountFlag()qpid::framing::QueueQueryResult
clearQueueFlag()qpid::framing::QueueQueryResult
clearSubscriberCountFlag()qpid::framing::QueueQueryResult
decode(Buffer &, uint32_t=0)qpid::framing::QueueQueryResult
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::QueueQueryResult
encode(Buffer &) const qpid::framing::QueueQueryResult
encodedSize() const qpid::framing::QueueQueryResult
encodeStructBody(Buffer &) const qpid::framing::QueueQueryResult
getAlternateExchange() const qpid::framing::QueueQueryResult
getArguments() const qpid::framing::QueueQueryResult
getArguments()qpid::framing::QueueQueryResult
getAutoDelete() const qpid::framing::QueueQueryResult
getDurable() const qpid::framing::QueueQueryResult
getExclusive() const qpid::framing::QueueQueryResult
getMessageCount() const qpid::framing::QueueQueryResult
getQueue() const qpid::framing::QueueQueryResult
getSubscriberCount() const qpid::framing::QueueQueryResult
hasAlternateExchange() const qpid::framing::QueueQueryResult
hasArguments() const qpid::framing::QueueQueryResult
hasMessageCount() const qpid::framing::QueueQueryResult
hasQueue() const qpid::framing::QueueQueryResult
hasSubscriberCount() const qpid::framing::QueueQueryResult
operator<<(std::ostream &, const QueueQueryResult &)qpid::framing::QueueQueryResult [friend]
print(std::ostream &out) const qpid::framing::QueueQueryResult
QueueQueryResult(const std::string &_queue, const std::string &_alternateExchange, bool _durable, bool _exclusive, bool _autoDelete, const FieldTable &_arguments, uint32_t _messageCount, uint32_t _subscriberCount)qpid::framing::QueueQueryResult [inline]
QueueQueryResult()qpid::framing::QueueQueryResult [inline]
setAlternateExchange(const std::string &_alternateExchange)qpid::framing::QueueQueryResult
setArguments(const FieldTable &_arguments)qpid::framing::QueueQueryResult
setAutoDelete(bool _autoDelete)qpid::framing::QueueQueryResult
setDurable(bool _durable)qpid::framing::QueueQueryResult
setExclusive(bool _exclusive)qpid::framing::QueueQueryResult
setMessageCount(uint32_t _messageCount)qpid::framing::QueueQueryResult
setQueue(const std::string &_queue)qpid::framing::QueueQueryResult
setSubscriberCount(uint32_t _subscriberCount)qpid::framing::QueueQueryResult
TYPEqpid::framing::QueueQueryResult [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00224.html0000664000076400007640000002164011752725720017312 0ustar00jrossjross00000000000000 qpid::messaging::NoMessageAvailable Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::NoMessageAvailable Struct Reference

Thrown by Receiver::fetch(), Receiver::get() and Session::nextReceiver() to indicate that there no message was available before the timeout specified. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 NoMessageAvailable ()
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown by Receiver::fetch(), Receiver::get() and Session::nextReceiver() to indicate that there no message was available before the timeout specified.


Constructor & Destructor Documentation

qpid::messaging::NoMessageAvailable::NoMessageAvailable ( )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00372.html0000664000076400007640000006160411752725720017322 0ustar00jrossjross00000000000000 qpid::framing::Unsigned8Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Unsigned8Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Unsigned8Value (uint8_t)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Unsigned8Value::Unsigned8Value ( uint8_t  )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00173.html0000664000076400007640000001260511752725717017324 0ustar00jrossjross00000000000000 qpid::RangeSet::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::RangeSet::iterator Class Reference

#include <qpid/RangeSet.h>

List of all members.

Public Member Functions

 iterator ()

Constructor & Destructor Documentation

qpid::RangeSet::iterator::iterator ( ) [inline]

Definition at line 111 of file RangeSet.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00397.html0000664000076400007640000002205611752725720017327 0ustar00jrossjross00000000000000 qpid::sys::ExceptionHolder::Wrapper Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ExceptionHolder::Wrapper Struct Reference

List of all members.

Public Member Functions

 Wrapper (Ex *ptr)
void raise () const
std::string what () const

Public Attributes

boost::shared_ptr< Ex > exception

Constructor & Destructor Documentation

qpid::sys::ExceptionHolder::Wrapper::Wrapper ( Ex *  ptr) [inline]

Definition at line 58 of file ExceptionHolder.h.


Member Function Documentation

void qpid::sys::ExceptionHolder::Wrapper::raise ( ) const [inline, virtual]

Implements qpid::sys::Raisable.

Definition at line 59 of file ExceptionHolder.h.

References exception.

std::string qpid::sys::ExceptionHolder::Wrapper::what ( ) const [inline, virtual]

Implements qpid::sys::Raisable.

Definition at line 60 of file ExceptionHolder.h.

References exception.


Member Data Documentation

Definition at line 61 of file ExceptionHolder.h.

Referenced by raise(), and what().


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00110.html0000664000076400007640000004442711752725717017322 0ustar00jrossjross00000000000000 qmf::posix::EventNotifier Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::posix::EventNotifier Class Reference

#include <qmf/posix/EventNotifier.h>

List of all members.

Public Member Functions

 EventNotifier (PosixEventNotifierImpl *impl=0)
 EventNotifier (::qmf::AgentSession &agentSession)
 EventNotifier (::qmf::ConsoleSession &consoleSession)
 EventNotifier (const EventNotifier &that)
 ~EventNotifier ()
EventNotifieroperator= (const EventNotifier &that)
int getHandle () const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::posix::EventNotifier::EventNotifier ( PosixEventNotifierImpl *  impl = 0)
qmf::posix::EventNotifier::EventNotifier ( ::qmf::AgentSession agentSession)
qmf::posix::EventNotifier::EventNotifier ( ::qmf::ConsoleSession consoleSession)
qmf::posix::EventNotifier::EventNotifier ( const EventNotifier that)
qmf::posix::EventNotifier::~EventNotifier ( )

Member Function Documentation

int qmf::posix::EventNotifier::getHandle ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

EventNotifier& qmf::posix::EventNotifier::operator= ( const EventNotifier that)
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x74.html0000664000076400007640000002561111752725717022337 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- t -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00718.html0000664000076400007640000001474011752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaArgument Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00629.html0000664000076400007640000001203411752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Event Member List
This is the complete list of members for qmf::engine::Event, including all inherited members.
Event(const SchemaEventClass *type)qmf::engine::Event
Event(const Event &from)qmf::engine::Event
getClass() const qmf::engine::Event
getValue(const char *key) const qmf::engine::Event
~Event()qmf::engine::Event

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00613.html0000664000076400007640000002345311752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::Schema Member List
This is the complete list of members for qmf::Schema, including all inherited members.
addMethod(const SchemaMethod &)qmf::Schema
addProperty(const SchemaProperty &)qmf::Schema
finalize()qmf::Schema
getDefaultSeverity() const qmf::Schema
getDesc() const qmf::Schema
getMethod(uint32_t) const qmf::Schema
getMethodCount() const qmf::Schema
getProperty(uint32_t) const qmf::Schema
getPropertyCount() const qmf::Schema
getSchemaId() const qmf::Schema
Handle()qmf::Handle< SchemaImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< SchemaImpl > [protected]
Impl typedefqmf::Handle< SchemaImpl > [protected]
implqmf::Handle< SchemaImpl > [protected]
isFinalized() const qmf::Schema
isNull() const qmf::Handle< SchemaImpl > [inline]
isValid() const qmf::Handle< SchemaImpl > [inline]
operator bool() const qmf::Handle< SchemaImpl > [inline]
operator!() const qmf::Handle< SchemaImpl > [inline]
operator=(const Schema &)qmf::Schema
Handle< SchemaImpl >::operator=(const Handle &)qmf::Handle< SchemaImpl > [protected]
Schema(SchemaImpl *impl=0)qmf::Schema
Schema(const Schema &)qmf::Schema
Schema(int, const std::string &, const std::string &)qmf::Schema
setDefaultSeverity(int)qmf::Schema
setDesc(const std::string &)qmf::Schema
swap(Handle< T > &h)qmf::Handle< SchemaImpl > [inline]
~Schema()qmf::Schema

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00681.html0000664000076400007640000001270111752725717017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::CannotConnectException Member List
This is the complete list of members for qpid::client::CannotConnectException, including all inherited members.
CannotConnectException(const std::string &m)qpid::client::CannotConnectException [inline]
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00300.html0000664000076400007640000002624311752725717017317 0ustar00jrossjross00000000000000 qmf::engine::SchemaClassKey Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaClassKey Class Reference

#include <qmf/engine/Schema.h>

List of all members.

Public Member Functions

 SchemaClassKey (const SchemaClassKey &from)
 ~SchemaClassKey ()
const char * getPackageName () const
const char * getClassName () const
const uint8_tgetHash () const
const char * asString () const
bool operator== (const SchemaClassKey &other) const
bool operator< (const SchemaClassKey &other) const

Constructor & Destructor Documentation

qmf::engine::SchemaClassKey::SchemaClassKey ( const SchemaClassKey from)
qmf::engine::SchemaClassKey::~SchemaClassKey ( )

Member Function Documentation

const char* qmf::engine::SchemaClassKey::asString ( ) const
const char* qmf::engine::SchemaClassKey::getClassName ( ) const
const uint8_t* qmf::engine::SchemaClassKey::getHash ( ) const
const char* qmf::engine::SchemaClassKey::getPackageName ( ) const
bool qmf::engine::SchemaClassKey::operator< ( const SchemaClassKey other) const
bool qmf::engine::SchemaClassKey::operator== ( const SchemaClassKey other) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00579.html0000664000076400007640000004252511752725720017334 0ustar00jrossjross00000000000000 qpid::console Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console Namespace Reference

Classes

class  Agent
class  Broker
class  ClassKey
class  ConsoleListener
 Implement a subclass of ConsoleListener and subscribe it using the SessionManager to receive indications. More...
class  Event
struct  MethodResponse
class  Object
class  ObjectId
class  Package
struct  SchemaArgument
struct  SchemaProperty
struct  SchemaStatistic
struct  SchemaMethod
struct  SchemaClass
class  SequenceManager
class  SessionManager
class  Value
class  NullValue
class  RefValue
class  UintValue
class  IntValue
class  Uint64Value
class  Int64Value
class  StringValue
class  BoolValue
class  FloatValue
class  DoubleValue
class  UuidValue
class  MapValue
class  ValueFactory

Functions

std::ostreamoperator<< (std::ostream &o, const Agent &agent)
std::ostreamoperator<< (std::ostream &o, const Broker &k)
std::ostreamoperator<< (std::ostream &o, const ClassKey &k)
std::ostreamoperator<< (std::ostream &o, const Event &event)
std::ostreamoperator<< (std::ostream &o, const Object &object)
std::ostreamoperator<< (std::ostream &o, const ObjectId &id)

Function Documentation

std::ostream& qpid::console::operator<< ( std::ostream o,
const Agent &  agent 
)
std::ostream& qpid::console::operator<< ( std::ostream o,
const ClassKey &  k 
)
std::ostream& qpid::console::operator<< ( std::ostream o,
const ObjectId &  id 
)
std::ostream& qpid::console::operator<< ( std::ostream o,
const Event &  event 
)
std::ostream& qpid::console::operator<< ( std::ostream o,
const Object &  object 
)
std::ostream& qpid::console::operator<< ( std::ostream o,
const Broker &  k 
)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00627.html0000664000076400007640000001210711752725717017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ConsoleSettings Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00324.html0000664000076400007640000015231111752725720017313 0ustar00jrossjross00000000000000 qpid::framing::SequenceSet Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::SequenceSet Class Reference

#include <qpid/framing/SequenceSet.h>

List of all members.

Public Types

typedef iterator const_iterator
typedef Ranges::const_iterator RangeIterator

Public Member Functions

 SequenceSet ()
 SequenceSet (const RangeSet< SequenceNumber > &r)
 SequenceSet (const SequenceNumber &s)
 SequenceSet (const SequenceNumber &start, const SequenceNumber finish)
void encode (Buffer &buffer) const
void decode (Buffer &buffer)
uint32_t encodedSize () const
bool contains (const SequenceNumber &s) const
void add (const SequenceNumber &s)
void add (const SequenceNumber &start, const SequenceNumber &finish)
void add (const SequenceSet &set)
void remove (const SequenceNumber &s)
void remove (const SequenceNumber &start, const SequenceNumber &finish)
void remove (const SequenceSet &set)
template<class T >
void for_each (T &t) const
template<class T >
void for_each (const T &t) const
bool contiguous () const
bool contains (const T &t) const
bool contains (const Range< T > &) const
Range< T > toRange () const
bool operator== (const RangeSet< T > &) const
void addRange (const Range< T > &)
void addSet (const RangeSet< T > &)
RangeSet< T > & operator+= (const T &t)
RangeSet< T > & operator+= (const Range< T > &r)
RangeSet< T > & operator+= (const RangeSet< T > &s)
void removeRange (const Range< T > &)
void removeSet (const RangeSet< T > &)
RangeSet< T > & operator-= (const T &t)
RangeSet< T > & operator-= (const Range< T > &r)
RangeSet< T > & operator-= (const RangeSet< T > &s)
front () const
back () const
iterator begin () const
iterator end () const
RangeIterator rangesBegin () const
RangeIterator rangesEnd () const
size_t rangesSize () const
uint32_t span () const
size_t size () const
bool empty () const
void clear ()
Range< T > rangeContaining (const T &) const
 Return the largest contiguous range containing x.
void serialize (S &s)
void encode (S &s) const
void decode (S &s)

Friends

std::ostreamoperator<< (std::ostream &, const SequenceSet &)

Member Typedef Documentation

typedef iterator qpid::RangeSet::const_iterator [inherited]

Definition at line 130 of file RangeSet.h.

typedef Ranges::const_iterator qpid::RangeSet::RangeIterator [inherited]

Definition at line 168 of file RangeSet.h.


Constructor & Destructor Documentation

qpid::framing::SequenceSet::SequenceSet ( ) [inline]

Definition at line 34 of file SequenceSet.h.

qpid::framing::SequenceSet::SequenceSet ( const RangeSet< SequenceNumber > &  r) [inline]

Definition at line 35 of file SequenceSet.h.

qpid::framing::SequenceSet::SequenceSet ( const SequenceNumber s) [inline]

Definition at line 37 of file SequenceSet.h.

qpid::framing::SequenceSet::SequenceSet ( const SequenceNumber start,
const SequenceNumber  finish 
) [inline]

Definition at line 38 of file SequenceSet.h.


Member Function Documentation

void qpid::framing::SequenceSet::add ( const SequenceNumber s)
void qpid::framing::SequenceSet::add ( const SequenceNumber start,
const SequenceNumber finish 
)
void qpid::framing::SequenceSet::add ( const SequenceSet set)
void qpid::RangeSet::addRange ( const Range< T > &  ) [inherited]
void qpid::RangeSet::addSet ( const RangeSet< T > &  ) [inherited]
T qpid::RangeSet::back ( ) const [inline, inherited]

Definition at line 161 of file RangeSet.h.

iterator qpid::RangeSet::begin ( ) const [inherited]
void qpid::RangeSet::clear ( ) [inline, inherited]

Definition at line 178 of file RangeSet.h.

bool qpid::framing::SequenceSet::contains ( const SequenceNumber s) const
bool qpid::RangeSet::contains ( const T &  t) const [inherited]
bool qpid::RangeSet::contains ( const Range< T > &  ) const [inherited]
bool qpid::RangeSet::contiguous ( ) const [inline, inherited]

Definition at line 136 of file RangeSet.h.

void qpid::framing::SequenceSet::decode ( Buffer buffer)
void qpid::RangeSet::decode ( S &  s) [inline, inherited]

Definition at line 187 of file RangeSet.h.

bool qpid::RangeSet::empty ( ) const [inline, inherited]

Definition at line 177 of file RangeSet.h.

void qpid::framing::SequenceSet::encode ( Buffer buffer) const
void qpid::RangeSet::encode ( S &  s) const [inline, inherited]

Definition at line 186 of file RangeSet.h.

uint32_t qpid::framing::SequenceSet::encodedSize ( ) const
iterator qpid::RangeSet::end ( ) const [inherited]
template<class T >
void qpid::framing::SequenceSet::for_each ( T &  t) const [inline]

Definition at line 53 of file SequenceSet.h.

template<class T >
void qpid::framing::SequenceSet::for_each ( const T &  t) const [inline]

Definition at line 58 of file SequenceSet.h.

T qpid::RangeSet::front ( ) const [inline, inherited]

Definition at line 160 of file RangeSet.h.

RangeSet<T>& qpid::RangeSet::operator+= ( const T &  t) [inline, inherited]

Definition at line 149 of file RangeSet.h.

RangeSet<T>& qpid::RangeSet::operator+= ( const Range< T > &  r) [inline, inherited]

Definition at line 150 of file RangeSet.h.

References qpid::RangeSet::addRange().

RangeSet<T>& qpid::RangeSet::operator+= ( const RangeSet< T > &  s) [inline, inherited]

Definition at line 151 of file RangeSet.h.

References qpid::RangeSet::addSet().

RangeSet<T>& qpid::RangeSet::operator-= ( const T &  t) [inline, inherited]

Definition at line 156 of file RangeSet.h.

RangeSet<T>& qpid::RangeSet::operator-= ( const Range< T > &  r) [inline, inherited]

Definition at line 157 of file RangeSet.h.

References qpid::RangeSet::removeRange().

RangeSet<T>& qpid::RangeSet::operator-= ( const RangeSet< T > &  s) [inline, inherited]

Definition at line 158 of file RangeSet.h.

References qpid::RangeSet::removeSet().

bool qpid::RangeSet::operator== ( const RangeSet< T > &  ) const [inherited]
Range<T> qpid::RangeSet::rangeContaining ( const T &  ) const [inherited]

Return the largest contiguous range containing x.

Returns the empty range [x,x) if x is not in the set.

RangeIterator qpid::RangeSet::rangesBegin ( ) const [inline, inherited]

Definition at line 169 of file RangeSet.h.

RangeIterator qpid::RangeSet::rangesEnd ( ) const [inline, inherited]

Definition at line 170 of file RangeSet.h.

size_t qpid::RangeSet::rangesSize ( ) const [inline, inherited]

Definition at line 171 of file RangeSet.h.

void qpid::framing::SequenceSet::remove ( const SequenceNumber s)
void qpid::framing::SequenceSet::remove ( const SequenceNumber start,
const SequenceNumber finish 
)
void qpid::framing::SequenceSet::remove ( const SequenceSet set)
void qpid::RangeSet::removeRange ( const Range< T > &  ) [inherited]
void qpid::RangeSet::removeSet ( const RangeSet< T > &  ) [inherited]
void qpid::RangeSet::serialize ( S &  s) [inline, inherited]

Definition at line 185 of file RangeSet.h.

size_t qpid::RangeSet::size ( ) const [inherited]
uint32_t qpid::RangeSet::span ( ) const [inherited]
Range<T> qpid::RangeSet::toRange ( ) const [inherited]
Precondition:
contiguous()

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const SequenceSet  
) [friend]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00537.html0000664000076400007640000001151211752725717017324 0ustar00jrossjross00000000000000 qpid/management/ManagementEvent.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/ManagementEvent.h File Reference
#include "qpid/management/ManagementObject.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

class  qpid::management::ManagementEvent

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::management

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x72.html0000664000076400007640000001666411752725720023612 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- r -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00275.html0000664000076400007640000002551411752725717017332 0ustar00jrossjross00000000000000 qpid::client::MessageReplayTracker::ReplayRecord Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::MessageReplayTracker::ReplayRecord Struct Reference

List of all members.

Public Member Functions

 ReplayRecord (const Message &message, const std::string &destination)
void send (MessageReplayTracker &)
bool isComplete ()

Public Attributes

Completion status
Message message
std::string destination

Constructor & Destructor Documentation

qpid::client::MessageReplayTracker::ReplayRecord::ReplayRecord ( const Message message,
const std::string destination 
)

Member Function Documentation

bool qpid::client::MessageReplayTracker::ReplayRecord::isComplete ( )
void qpid::client::MessageReplayTracker::ReplayRecord::send ( MessageReplayTracker )

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x67.html0000664000076400007640000001403411752725717022336 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/hierarchy.html0000664000076400007640000011252511752725717020471 0ustar00jrossjross00000000000000 Class Hierarchy
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00009.html0000664000076400007640000005753311752725717017333 0ustar00jrossjross00000000000000 qmf::AgentEvent Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::AgentEvent Class Reference

#include <qmf/AgentEvent.h>

List of all members.

Public Member Functions

 AgentEvent (AgentEventImpl *impl=0)
 AgentEvent (const AgentEvent &)
AgentEventoperator= (const AgentEvent &)
 ~AgentEvent ()
AgentEventCode getType () const
const std::stringgetUserId () const
Query getQuery () const
bool hasDataAddr () const
DataAddr getDataAddr () const
const std::stringgetMethodName () const
qpid::types::Variant::MapgetArguments ()
qpid::types::Variant::MapgetArgumentSubtypes ()
void addReturnArgument (const std::string &, const qpid::types::Variant &, const std::string &st="")
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::AgentEvent::AgentEvent ( AgentEventImpl *  impl = 0)
qmf::AgentEvent::AgentEvent ( const AgentEvent )
qmf::AgentEvent::~AgentEvent ( )

Member Function Documentation

void qmf::AgentEvent::addReturnArgument ( const std::string ,
const qpid::types::Variant ,
const std::string st = "" 
)
qpid::types::Variant::Map& qmf::AgentEvent::getArguments ( )
qpid::types::Variant::Map& qmf::AgentEvent::getArgumentSubtypes ( )
DataAddr qmf::AgentEvent::getDataAddr ( ) const
const std::string& qmf::AgentEvent::getMethodName ( ) const
Query qmf::AgentEvent::getQuery ( ) const
AgentEventCode qmf::AgentEvent::getType ( ) const
const std::string& qmf::AgentEvent::getUserId ( ) const
bool qmf::AgentEvent::hasDataAddr ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

References qmf::Handle::impl.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

References qmf::Handle::impl.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

References qmf::Handle::impl.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

References qmf::Handle::impl.

AgentEvent& qmf::AgentEvent::operator= ( const AgentEvent )
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.

References qmf::Handle::impl.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/globals_type.html0000664000076400007640000001040211752725720021160 0ustar00jrossjross00000000000000 File Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00760.html0000664000076400007640000002135511752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Var16Value Member List
This is the complete list of members for qpid::framing::Var16Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
Var16Value(const std::string &v, uint8_t code)qpid::framing::Var16Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00335.html0000664000076400007640000001303311752725720017312 0ustar00jrossjross00000000000000 std::set Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::set Class Reference

STL class. More...

List of all members.

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00527.html0000664000076400007640000001305611752725717017330 0ustar00jrossjross00000000000000 qpid/InlineAllocator.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/InlineAllocator.h File Reference
#include <memory>
#include <assert.h>
#include <boost/type_traits/type_with_alignment.hpp>
#include <boost/type_traits/alignment_of.hpp>

Go to the source code of this file.

Classes

class  qpid::InlineAllocator
 An allocator that has inline storage for up to Max objects of type BaseAllocator::value_type. More...
struct  qpid::InlineAllocator::rebind
union  qpid::InlineAllocator::Store
struct  qpid::InlineRebind
struct  qpid::InlineRebind< T, T, BaseAllocator, Max >

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00212.html0000664000076400007640000004650111752725720017312 0ustar00jrossjross00000000000000 qpid::framing::MessageResumeResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::MessageResumeResult Class Reference

#include <qpid/framing/MessageResumeResult.h>

List of all members.

Public Member Functions

 MessageResumeResult (uint64_t _offset)
 MessageResumeResult ()
void setOffset (uint64_t _offset)
uint64_t getOffset () const
bool hasOffset () const
void clearOffsetFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1029

Friends

std::ostreamoperator<< (std::ostream &, const MessageResumeResult &)

Constructor & Destructor Documentation

qpid::framing::MessageResumeResult::MessageResumeResult ( uint64_t  _offset) [inline]

Definition at line 43 of file MessageResumeResult.h.

qpid::framing::MessageResumeResult::MessageResumeResult ( ) [inline]

Definition at line 49 of file MessageResumeResult.h.


Member Function Documentation

uint32_t qpid::framing::MessageResumeResult::bodySize ( ) const
void qpid::framing::MessageResumeResult::clearOffsetFlag ( )
void qpid::framing::MessageResumeResult::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::MessageResumeResult::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::MessageResumeResult::encode ( Buffer ) const
uint32_t qpid::framing::MessageResumeResult::encodedSize ( ) const
void qpid::framing::MessageResumeResult::encodeStructBody ( Buffer ) const
uint64_t qpid::framing::MessageResumeResult::getOffset ( ) const
bool qpid::framing::MessageResumeResult::hasOffset ( ) const
void qpid::framing::MessageResumeResult::print ( std::ostream out) const
void qpid::framing::MessageResumeResult::setOffset ( uint64_t  _offset)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const MessageResumeResult  
) [friend]

Member Data Documentation

Definition at line 42 of file MessageResumeResult.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00455_source.html0000664000076400007640000003126411752725717020711 0ustar00jrossjross00000000000000 qpid/amqp_0_10/Codecs.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/amqp_0_10/Codecs.h
Go to the documentation of this file.
00001 #ifndef QPID_AMQP_0_10_CODECS_H
00002 #define QPID_AMQP_0_10_CODECS_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/CommonImportExport.h"
00026 #include "qpid/types/Variant.h"
00027 
00028 namespace qpid {
00029 namespace framing {
00030 class FieldTable;
00031 }
00032 namespace amqp_0_10 {
00037 class QPID_COMMON_CLASS_EXTERN MapCodec
00038 {
00039   public:
00040     typedef qpid::types::Variant::Map ObjectType;
00041     static void   QPID_COMMON_EXTERN encode(const ObjectType&, std::string&);
00042     static void   QPID_COMMON_EXTERN decode(const std::string&, ObjectType&);
00043     static size_t QPID_COMMON_EXTERN encodedSize(const ObjectType&);
00044     static const  QPID_COMMON_EXTERN std::string contentType;
00045   private:
00046 };
00047 
00052 class QPID_COMMON_CLASS_EXTERN ListCodec
00053 {
00054   public:
00055     typedef qpid::types::Variant::List ObjectType;
00056     static void   QPID_COMMON_EXTERN encode(const ObjectType&, std::string&);
00057     static void   QPID_COMMON_EXTERN decode(const std::string&, ObjectType&);
00058     static size_t QPID_COMMON_EXTERN encodedSize(const ObjectType&);
00059     static const  QPID_COMMON_EXTERN std::string contentType;
00060   private:
00061 };
00062 
00070 QPID_COMMON_EXTERN void translate(const qpid::types::Variant::Map& from,
00071                                   qpid::framing::FieldTable& to);
00072 QPID_COMMON_EXTERN void translate(const qpid::framing::FieldTable& from,
00073                                   qpid::types::Variant::Map& to);
00074 
00075 }} // namespace qpid::amqp_0_10
00076 
00077 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00854.html0000664000076400007640000001415711752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::MalformedAddress Member List
This is the complete list of members for qpid::messaging::MalformedAddress, including all inherited members.
AddressError(const std::string &)qpid::messaging::AddressError
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
LinkError(const std::string &)qpid::messaging::LinkError
MalformedAddress(const std::string &msg)qpid::messaging::MalformedAddress
MessagingException(const std::string &msg)qpid::messaging::MessagingException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00586.html0000664000076400007640000005052511752725720017331 0ustar00jrossjross00000000000000 qpid::framing::message Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::message Namespace Reference

Enumerations

enum  AcceptMode { ACCEPT_MODE_EXPLICIT = 0, ACCEPT_MODE_NONE = 1 }
enum  AcquireMode { ACQUIRE_MODE_PRE_ACQUIRED = 0, ACQUIRE_MODE_NOT_ACQUIRED = 1 }
enum  RejectCode { REJECT_CODE_UNSPECIFIED = 0, REJECT_CODE_UNROUTABLE = 1, REJECT_CODE_IMMEDIATE = 2 }
enum  DeliveryMode { DELIVERY_MODE_NON_PERSISTENT = 1, DELIVERY_MODE_PERSISTENT = 2 }
enum  DeliveryPriority {
  DELIVERY_PRIORITY_LOWEST = 0, DELIVERY_PRIORITY_LOWER = 1, DELIVERY_PRIORITY_LOW = 2, DELIVERY_PRIORITY_BELOW_AVERAGE = 3,
  DELIVERY_PRIORITY_MEDIUM = 4, DELIVERY_PRIORITY_ABOVE_AVERAGE = 5, DELIVERY_PRIORITY_HIGH = 6, DELIVERY_PRIORITY_HIGHER = 7,
  DELIVERY_PRIORITY_VERY_HIGH = 8, DELIVERY_PRIORITY_HIGHEST = 9
}
enum  FlowMode { FLOW_MODE_CREDIT = 0, FLOW_MODE_WINDOW = 1 }
enum  CreditUnit { CREDIT_UNIT_MESSAGE = 0, CREDIT_UNIT_BYTE = 1 }

Enumeration Type Documentation

Enumerator:
ACCEPT_MODE_EXPLICIT 
ACCEPT_MODE_NONE 

Definition at line 93 of file enum.h.

Enumerator:
ACQUIRE_MODE_PRE_ACQUIRED 
ACQUIRE_MODE_NOT_ACQUIRED 

Definition at line 97 of file enum.h.

Enumerator:
CREDIT_UNIT_MESSAGE 
CREDIT_UNIT_BYTE 

Definition at line 126 of file enum.h.

Enumerator:
DELIVERY_MODE_NON_PERSISTENT 
DELIVERY_MODE_PERSISTENT 

Definition at line 106 of file enum.h.

Enumerator:
DELIVERY_PRIORITY_LOWEST 
DELIVERY_PRIORITY_LOWER 
DELIVERY_PRIORITY_LOW 
DELIVERY_PRIORITY_BELOW_AVERAGE 
DELIVERY_PRIORITY_MEDIUM 
DELIVERY_PRIORITY_ABOVE_AVERAGE 
DELIVERY_PRIORITY_HIGH 
DELIVERY_PRIORITY_HIGHER 
DELIVERY_PRIORITY_VERY_HIGH 
DELIVERY_PRIORITY_HIGHEST 

Definition at line 110 of file enum.h.

Enumerator:
FLOW_MODE_CREDIT 
FLOW_MODE_WINDOW 

Definition at line 122 of file enum.h.

Enumerator:
REJECT_CODE_UNSPECIFIED 
REJECT_CODE_UNROUTABLE 
REJECT_CODE_IMMEDIATE 

Definition at line 101 of file enum.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/classes.html0000664000076400007640000017375311752725717020162 0ustar00jrossjross00000000000000 Class Index
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Class Index
A | B | C | D | E | F | H | I | K | L | M | N | O | P | Q | R | S | T | U | V | W | X
  A  
multiset::const_reverse_iterator (std)   InvalidConversionException (qpid::framing)   OptionValue (qpid)   SequenceNumber (qpid::framing)   
set::const_reverse_iterator (std)   InvalidOptionString (qpid::messaging)   ostream (std)   SequenceSet (qpid::framing)   
AbsTime (qpid::sys)   multimap::const_reverse_iterator (std)   InvalidPathException (qpid::framing)   ostringstream (std)   Session (qpid::messaging)   
Address (qpid::messaging)   map::const_reverse_iterator (std)   IOHandle (qpid::sys)   out_of_range (std)   Session_0_10 (qpid::client)   
Address (qpid)   list::const_reverse_iterator (std)   IOHandlePrivate (qpid::sys)   OutOfBounds (qpid::management)   Session_0_10 (qpid::client::no_keyword)   
AddressError (qpid::messaging)   deque::const_reverse_iterator (std)   ios (std)   OutOfBounds (qpid::framing)   SessionBase_0_10 (qpid::client)   
Agent (qmf)   wstring::const_reverse_iterator (std)   ios_base (std)   Logger::Output (qpid::log)   SessionBusyException (qpid::framing)   
Agent (qpid::console)   string::const_reverse_iterator (std)   istream (std)   overflow_error (std)   SessionError (qpid::messaging)   
Agent (qmf::engine)   basic_string::const_reverse_iterator (std)   istringstream (std)   
  P  
SessionException (qpid)   
AgentAttachment (qpid::management)   
  D  
vector::iterator (std)   SessionHandle (qmf::engine)   
AgentEvent (qmf::engine)   multiset::iterator (std)   Package (qpid::console)   SessionId (qpid)   
AgentEvent (qmf)   Data (qmf)   set::iterator (std)   PODMutex (qpid::sys)   SessionManager (qpid::console)   
AgentProxy (qmf::engine)   FieldValue::Data (qpid::framing)   multimap::iterator (std)   PosixIOHandle (qpid::sys)   set (std)   
AgentSession (qmf)   DataAddr (qmf)   map::iterator (std)   PreconditionFailedException (qpid::framing)   SessionManager::Settings (qpid::console)   
allocator (std)   DeliveryProperties (qpid::framing)   list::iterator (std)   priority_queue (std)   ManagementAgent::Singleton (qpid::management)   
Args (qpid::management)   deque (std)   deque::iterator (std)   ProtocolVersion (qpid::framing)   SinkOptions (qpid::log)   
ArgsNone (qpid::management)   domain_error (std)   wstring::iterator (std)   
  Q  
stack (std)   
Array (qpid::framing)   DoubleValue (qpid::console)   string::iterator (std)   Statement (qpid::log)   
ArrayValue (qpid::framing)   DoubleValue (qpid::framing)   basic_string::iterator (std)   QmfException (qmf)   InlineAllocator::Store (qpid)   
AssertionFailed (qpid::messaging)   DtxGetTimeoutResult (qpid::framing)   RangeSet::iterator (qpid)   Query (qmf::engine)   Str16Value (qpid::framing)   
AsyncSession_0_10 (qpid::client)   DtxRecoverResult (qpid::framing)   Buffer::Iterator (qpid::framing)   Query (qmf)   Str8Value (qpid::framing)   
AsyncSession_0_10 (qpid::client::no_keyword)   Duration (qpid::messaging)   
  K  
QueryElement (qmf::engine)   StreamProperties (qpid::framing)   
Object::AttributeMap (qpid::console)   Duration (qpid::sys)   QueryExpression (qmf::engine)   string (std)   
auto_ptr (std)   
  E  
KeyError (qpid::messaging)   QueryOperand (qmf::engine)   stringstream (std)   
AutoCancel (qpid::client)   KeyNotFound (qmf)   QueryResponse (qmf::engine)   StringValue (qpid::console)   
  B  
EncodedValue (qpid::framing)   
  L  
queue (std)   Struct32Value (qpid::framing)   
EncodingException (qpid::messaging)   QueueOptions (qpid::client)   StructHelper (qpid::framing)   
bad_alloc (std)   ErrnoException (qpid)   length_error (std)   QueueQueryResult (qpid::framing)   Subscription (qpid::client)   
bad_cast (std)   Event (qpid::console)   LevelTraits (qpid::log)   
  R  
Subscription (qmf)   
bad_exception (std)   Event (qmf::engine)   LinkError (qpid::messaging)   SubscriptionManager (qpid::client)   
bad_typeid (std)   EventNotifier (qmf::posix)   list (std)   Raisable (qpid::sys)   SubscriptionSettings (qpid::client)   
basic_fstream (std)   Exception (qpid)   List (qpid::framing)   Range (qpid)   
  T  
basic_ifstream (std)   exception (std)   ListCodec (qpid::amqp_0_10)   range_error (std)   
basic_ios (std)   Exception (qpid::types)   ListValue (qpid::framing)   RangeSet (qpid)   TargetCapacityExceeded (qpid::messaging)   
basic_iostream (std)   Options::Exception (qpid)   LocalQueue (qpid::client)   InlineAllocator::rebind (qpid)   Thread (qpid::sys)   
basic_istream (std)   ExceptionHolder (qpid::sys)   Logger (qpid::log)   Receiver (qpid::messaging)   TimeValue (qpid::framing)   
basic_istringstream (std)   ExchangeBoundResult (qpid::framing)   logic_error (std)   ReceiverError (qpid::messaging)   TransactionAborted (qpid::messaging)   
basic_ofstream (std)   ExchangeQueryResult (qpid::framing)   
  M  
FailoverManager::ReconnectionStrategy (qpid::client)   TransactionError (qpid::messaging)   
basic_ostream (std)   
  F  
RefValue (qpid::console)   TransportBusyException (qpid::framing)   
basic_ostringstream (std)   MalformedAddress (qpid::messaging)   MessageReplayTracker::ReplayRecord (qpid::client)   TransportFailure (qpid)   
basic_string (std)   FailoverListener (qpid::client)   Manageable (qpid::management)   ReplyTo (qpid::framing)   TransportFailure (qpid::messaging)   
basic_stringstream (std)   FailoverManager (qpid::client)   ManagementAgent (qpid::management)   ResilientConnection (qmf::engine)   TypedResult (qpid::client)   
bitset (std)   FailoverUpdates (qpid::messaging)   ManagementEvent (qpid::management)   ResilientConnectionEvent (qmf::engine)   
  U  
BoolValue (qpid::console)   ios_base::failure (std)   ManagementItem (qpid::management)   ResolutionError (qpid::messaging)   
BoolValue (qpid::framing)   FetchError (qpid::messaging)   ManagementObject (qpid::management)   ResourceDeletedException (qpid::framing)   Uint64Value (qpid::console)   
Broker (qpid::console)   FieldTable (qpid::framing)   map (std)   ResourceLimitExceededException (qpid::framing)   UintValue (qpid::console)   
BrokerEvent (qmf::engine)   FieldTableValue (qpid::framing)   MapCodec (qpid::amqp_0_10)   ResourceLockedException (qpid::framing)   UnauthorizedAccess (qpid::messaging)   
BrokerProxy (qmf::engine)   FieldValue (qpid::framing)   MapValue (qpid::console)   list::reverse_iterator (std)   UnauthorizedAccessException (qpid::framing)   
Buffer (qpid::management)   FieldValueException (qpid::framing)   Message (qmf::engine)   vector::reverse_iterator (std)   underflow_error (std)   
Buffer (qpid::framing)   FileProperties (qpid::framing)   Message (qpid::client)   multimap::reverse_iterator (std)   UnknownIdsException (qpid::framing)   
  C  
FixedWidthValue (qpid::framing)   Message (qpid::messaging)   deque::reverse_iterator (std)   Unsigned16Value (qpid::framing)   
FixedWidthValue< 0 > (qpid::framing)   MessageAcquireResult (qpid::framing)   map::reverse_iterator (std)   Unsigned32Value (qpid::framing)   
CannotConnectException (qpid::client)   FloatValue (qpid::console)   MessageListener (qpid::client)   wstring::reverse_iterator (std)   Unsigned64Value (qpid::framing)   
ChannelException (qpid)   FloatValue (qpid::framing)   MessageProperties (qpid::framing)   multiset::reverse_iterator (std)   Unsigned8Value (qpid::framing)   
ClassKey (qpid::console)   FlowControl (qpid::client)   MessageReplayTracker (qpid::client)   basic_string::reverse_iterator (std)   Url (qpid)   
ClosedException (qpid)   FragmentProperties (qpid::framing)   MessageResumeResult (qpid::framing)   set::reverse_iterator (std)   Uuid (qpid::types)   
FailoverManager::Command (qpid::client)   FramingErrorException (qpid::framing)   MessagingException (qpid::messaging)   string::reverse_iterator (std)   Uuid (qpid::framing)   
CommandInvalidException (qpid::framing)   fstream (std)   MethodResponse (qpid::console)   Runnable (qpid::sys)   UuidValue (qpid::console)   
CommonOptions (qpid)   Future (qpid::client)   MethodResponse (qmf::engine)   runtime_error (std)   UuidValue (qpid::framing)   
Completion (qpid::client)   FutureCompletion (qpid::client)   Monitor (qpid::sys)   RWlock (qpid::sys)   
  V  
complex (std)   FutureResult (qpid::client)   Msg (qpid)   
  S  
Condition (qpid::sys)   
  H  
multimap (std)   valarray (std)   
ConditionalScopedLock (qpid::sys)   multiset (std)   Schema (qmf)   Value (qpid::console)   
Connection (qpid::messaging)   Handle (qmf)   Mutex (qpid::management)   SchemaArgument (qmf::engine)   Value (qmf::engine)   
Connection (qpid::client)   Handle (qpid::client)   Mutex (qpid::sys)   SchemaArgument (qpid::console)   ValueFactory (qpid::console)   
ConnectionError (qpid::messaging)   Handle (qpid::messaging)   
  N  
SchemaClass (qpid::console)   Var16Value (qpid::framing)   
ConnectionException (qpid)   Header (qpid::framing)   SchemaClassKey (qmf::engine)   Var32Value (qpid::framing)   
ConnectionForcedException (qpid::framing)   
  I  
Package::NameHash (qpid::console)   SchemaEventClass (qmf::engine)   VariableWidthValue (qpid::framing)   
ConnectionSettings (qpid::client)   Package::NameHashComp (qpid::console)   SchemaId (qmf)   Variant (qpid::types)   
ConnectionSettings (qpid::management)   ifstream (std)   NoMessageAvailable (qpid::messaging)   SchemaMethod (qmf::engine)   vector (std)   
ConnectionSettings (qmf::engine)   IllegalArgumentException (qpid::framing)   NotAllowedException (qpid::framing)   SchemaMethod (qmf)   VoidValue (qpid::framing)   
Broker::ConnectionThread (qpid::console)   IllegalStateException (qpid::framing)   NotAttachedException (qpid::framing)   SchemaMethod (qpid::console)   
  W  
Console (qmf::engine)   IndexOutOfRange (qmf)   NotFound (qpid::messaging)   SchemaObjectClass (qmf::engine)   
ConsoleEvent (qmf::engine)   Statement::Initializer (qpid::log)   NotFoundException (qpid::framing)   SchemaProperty (qmf)   wfstream (std)   
ConsoleEvent (qmf)   InlineAllocator (qpid)   Notifyable (qpid::management)   SchemaProperty (qpid::console)   wifstream (std)   
ConsoleListener (qpid::console)   InlineRebind (qpid)   NotImplementedException (qpid::framing)   SchemaProperty (qmf::engine)   Window (qpid::framing)   
ConsoleSession (qmf)   InlineRebind< T, T, BaseAllocator, Max > (qpid)   NullIOHandle (qpid::sys)   SchemaStatistic (qpid::console)   wios (std)   
ConsoleSettings (qmf::engine)   InlineVector (qpid)   NullValue (qpid::console)   SchemaStatistic (qmf::engine)   wistream (std)   
vector::const_iterator (std)   Int64Value (qpid::console)   
  O  
ScopedLock (qpid::sys)   wistringstream (std)   
multiset::const_iterator (std)   Integer16Value (qpid::framing)   ScopedLockTemplate (qpid::management)   wofstream (std)   
set::const_iterator (std)   Integer64Value (qpid::framing)   Object (qpid::console)   ScopedRlock (qpid::sys)   wostream (std)   
multimap::const_iterator (std)   Integer8Value (qpid::framing)   Object (qmf::engine)   ScopedUnlock (qpid::sys)   wostringstream (std)   
map::const_iterator (std)   IntegerValue (qpid::framing)   ObjectId (qpid::management)   ScopedUnlockTemplate (qpid::management)   ExceptionHolder::Wrapper (qpid::sys)   
list::const_iterator (std)   InternalErrorException (qpid::framing)   ObjectId (qmf::engine)   ScopedWlock (qpid::sys)   wstring (std)   
deque::const_iterator (std)   IntValue (qpid::console)   ObjectId (qpid::console)   Selector (qpid::log)   wstringstream (std)   
wstring::const_iterator (std)   Url::Invalid (qpid)   ofstream (std)   Sender (qpid::messaging)   
  X  
string::const_iterator (std)   invalid_argument (std)   OperationTimedOut (qmf)   SenderError (qpid::messaging)   
basic_string::const_iterator (std)   InvalidArgumentException (qpid::framing)   Options (qpid::log)   SendError (qpid::messaging)   XaResult (qpid::framing)   
vector::const_reverse_iterator (std)   InvalidConversion (qpid::types)   Options (qpid)   SequenceManager (qpid::console)   Xid (qpid::framing)   
A | B | C | D | E | F | H | I | K | L | M | N | O | P | Q | R | S | T | U | V | W | X

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00735.html0000664000076400007640000002411711752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::FloatValue Member List
This is the complete list of members for qpid::console::FloatValue, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::FloatValue [inline, virtual]
asFloat() const qpid::console::FloatValue [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
FloatValue(float v)qpid::console::FloatValue [inline]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::FloatValue [inline, virtual]
isFloat() const qpid::console::FloatValue [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
str() const qpid::console::FloatValue [virtual]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00844.html0000664000076400007640000002417111752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Connection Member List
This is the complete list of members for qpid::messaging::Connection, including all inherited members.
close()qpid::messaging::Connection
Connection(ConnectionImpl *impl)qpid::messaging::Connection
Connection(const Connection &)qpid::messaging::Connection
Connection()qpid::messaging::Connection
Connection(const std::string &url, const qpid::types::Variant::Map &options=qpid::types::Variant::Map())qpid::messaging::Connection
Connection(const std::string &url, const std::string &options)qpid::messaging::Connection
createSession(const std::string &name=std::string())qpid::messaging::Connection
createTransactionalSession(const std::string &name=std::string())qpid::messaging::Connection
getAuthenticatedUsername()qpid::messaging::Connection
getSession(const std::string &name) const qpid::messaging::Connection
Handle()qpid::messaging::Handle< ConnectionImpl > [inline, protected]
Handle(const Handle &)qpid::messaging::Handle< ConnectionImpl > [protected]
Impl typedefqpid::messaging::Handle< ConnectionImpl > [protected]
implqpid::messaging::Handle< ConnectionImpl > [protected]
isNull() const qpid::messaging::Handle< ConnectionImpl > [inline]
isOpen()qpid::messaging::Connection
isOpen() const qpid::messaging::Connection
isValid() const qpid::messaging::Handle< ConnectionImpl > [inline]
open()qpid::messaging::Connection
operator bool() const qpid::messaging::Handle< ConnectionImpl > [inline]
operator!() const qpid::messaging::Handle< ConnectionImpl > [inline]
operator=(const Connection &)qpid::messaging::Connection
Handle< ConnectionImpl >::operator=(const Handle &)qpid::messaging::Handle< ConnectionImpl > [protected]
setOption(const std::string &name, const qpid::types::Variant &value)qpid::messaging::Connection
swap(Handle< T > &h)qpid::messaging::Handle< ConnectionImpl > [inline]
~Connection()qpid::messaging::Connection

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00600.html0000664000076400007640000002662611752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::Agent Member List
This is the complete list of members for qmf::Agent, including all inherited members.
Agent(AgentImpl *impl=0)qmf::Agent
Agent(const Agent &)qmf::Agent
callMethod(const std::string &, const qpid::types::Variant::Map &, const DataAddr &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)qmf::Agent
callMethodAsync(const std::string &, const qpid::types::Variant::Map &, const DataAddr &)qmf::Agent
getAttribute(const std::string &) const qmf::Agent
getAttributes() const qmf::Agent
getEpoch() const qmf::Agent
getInstance() const qmf::Agent
getName() const qmf::Agent
getPackage(uint32_t) const qmf::Agent
getPackageCount() const qmf::Agent
getProduct() const qmf::Agent
getSchema(const SchemaId &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)qmf::Agent
getSchemaId(const std::string &, uint32_t) const qmf::Agent
getSchemaIdCount(const std::string &) const qmf::Agent
getVendor() const qmf::Agent
Handle()qmf::Handle< AgentImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< AgentImpl > [protected]
implqmf::Handle< AgentImpl > [protected]
Impl typedefqmf::Handle< AgentImpl > [protected]
isNull() const qmf::Handle< AgentImpl > [inline]
isValid() const qmf::Handle< AgentImpl > [inline]
operator bool() const qmf::Handle< AgentImpl > [inline]
operator!() const qmf::Handle< AgentImpl > [inline]
operator=(const Agent &)qmf::Agent
Handle< AgentImpl >::operator=(const Handle &)qmf::Handle< AgentImpl > [protected]
query(const Query &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)qmf::Agent
query(const std::string &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)qmf::Agent
queryAsync(const Query &)qmf::Agent
queryAsync(const std::string &)qmf::Agent
querySchema(qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)qmf::Agent
querySchemaAsync()qmf::Agent
swap(Handle< T > &h)qmf::Handle< AgentImpl > [inline]
~Agent()qmf::Agent

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00593.html0000664000076400007640000003451111752725720017324 0ustar00jrossjross00000000000000 qpid::sys::SystemInfo Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::SystemInfo Namespace Reference

Retrieve information about the system we are running on. More...

Functions

long concurrency ()
 Estimate available concurrency, e.g.
bool getLocalHostname (Address &address)
 Get the local host name and set it in the specified.
void getLocalIpAddresses (uint16_t port, std::vector< Address > &addrList)
void getSystemId (std::string &osName, std::string &nodeName, std::string &release, std::string &version, std::string &machine)
 Retrieve system identifiers and versions.
uint32_t getProcessId ()
 Get the process ID of the current process.
uint32_t getParentProcessId ()
 Get the process ID of the parent of the current process.
std::string getProcessName ()
 Get the name of the current process (i.e.

Detailed Description

Retrieve information about the system we are running on.

Results may be dependent on OS/hardware.


Function Documentation

long qpid::sys::SystemInfo::concurrency ( )

Estimate available concurrency, e.g.

number of CPU cores. -1 means estimate not available on this platform.

bool qpid::sys::SystemInfo::getLocalHostname ( Address &  address)

Get the local host name and set it in the specified.

Returns false if it can't be obtained and sets errno to any error value.

void qpid::sys::SystemInfo::getLocalIpAddresses ( uint16_t  port,
std::vector< Address > &  addrList 
)
uint32_t qpid::sys::SystemInfo::getParentProcessId ( )

Get the process ID of the parent of the current process.

uint32_t qpid::sys::SystemInfo::getProcessId ( )

Get the process ID of the current process.

std::string qpid::sys::SystemInfo::getProcessName ( )

Get the name of the current process (i.e.

the name of the executable)

void qpid::sys::SystemInfo::getSystemId ( std::string osName,
std::string nodeName,
std::string release,
std::string version,
std::string machine 
)

Retrieve system identifiers and versions.

This is information that can generally be retrieved via POSIX uname().

Parameters:
osNameReceives the OS name; e.g., GNU/Linux or Windows
nodeNameReceives the nodename. This may or may not match the set hostname from getLocalHostname().
releaseReceives the OS release identifier.
versionReceives the OS release version (kernel, build, sp, etc.)
machineReceives the hardware type.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00872.html0000664000076400007640000002164411752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Sender Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00442_source.html0000664000076400007640000001660011752725717020702 0ustar00jrossjross00000000000000 qpid/messaging/ImportExport.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/ImportExport.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_IMPORTEXPORT_H
00002 #define QPID_MESSAGING_IMPORTEXPORT_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include "qpid/ImportExport.h"
00024 
00025 #if defined(CLIENT_EXPORT) || defined (qpidmessaging_EXPORTS)
00026 #  define QPID_MESSAGING_EXTERN QPID_EXPORT
00027 #  define QPID_MESSAGING_CLASS_EXTERN QPID_CLASS_EXPORT
00028 #  define QPID_MESSAGING_INLINE_EXTERN QPID_INLINE_EXPORT
00029 #else
00030 #  define QPID_MESSAGING_EXTERN QPID_IMPORT
00031 #  define QPID_MESSAGING_CLASS_EXTERN QPID_CLASS_IMPORT
00032 #  define QPID_MESSAGING_INLINE_EXTERN QPID_INLINE_IMPORT
00033 #endif
00034 
00035 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00248.html0000664000076400007640000002015411752725720017317 0ustar00jrossjross00000000000000 qpid::log::Logger::Output Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Logger::Output Class Reference

Logging output sink. More...

#include <qpid/log/Logger.h>

List of all members.

Public Member Functions

 Output ()
virtual ~Output ()
virtual void log (const Statement &, const std::string &)=0
 Receives the statemnt of origin and formatted message to log.

Detailed Description

Logging output sink.

The Output sink provides an interface to direct logging output to. Logging sinks are primarily platform-specific as provided for on each platform.

Implementations of Output must be thread safe.


Constructor & Destructor Documentation

qpid::log::Logger::Output::Output ( )
virtual qpid::log::Logger::Output::~Output ( ) [virtual]

Member Function Documentation

virtual void qpid::log::Logger::Output::log ( const Statement ,
const std::string  
) [pure virtual]

Receives the statemnt of origin and formatted message to log.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x72.html0000664000076400007640000003555211752725717021307 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- r -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00338.html0000664000076400007640000003444211752725720017324 0ustar00jrossjross00000000000000 qpid::log::SinkOptions Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::SinkOptions Struct Reference

Logging sink options. More...

#include <qpid/log/SinkOptions.h>

List of all members.

Public Member Functions

 SinkOptions (const std::string &name="Logging sink options")
virtual ~SinkOptions ()
virtual SinkOptionsoperator= (const SinkOptions &)=0
virtual void detached (void)=0
virtual void setup (Logger *logger)=0
void parse (int argc, char const *const *argv, const std::string &configfile=std::string(), bool allowUnknown=false)
 Parses options from argc/argv, environment variables and config file.
boost::program_options::options_description_easy_init addOptions ()

Static Public Member Functions

static SinkOptionscreate (const std::string &argv0=std::string())

Detailed Description

Logging sink options.

Most logging sink options will be platform-specific, even if some are duplicated. The range of platforms to which this code may be ported can't be assumed to all have C++ iostreams or files. Thus, this class is primarily for implementing in a platform-specific way.


Constructor & Destructor Documentation

qpid::log::SinkOptions::SinkOptions ( const std::string name = "Logging sink options") [inline]

Definition at line 44 of file SinkOptions.h.

virtual qpid::log::SinkOptions::~SinkOptions ( ) [inline, virtual]

Definition at line 47 of file SinkOptions.h.


Member Function Documentation

boost::program_options::options_description_easy_init qpid::Options::addOptions ( ) [inline, inherited]

Definition at line 154 of file Options.h.

static SinkOptions* qpid::log::SinkOptions::create ( const std::string argv0 = std::string()) [static]
virtual void qpid::log::SinkOptions::detached ( void  ) [pure virtual]
virtual SinkOptions& qpid::log::SinkOptions::operator= ( const SinkOptions ) [pure virtual]
void qpid::Options::parse ( int  argc,
char const *const *  argv,
const std::string configfile = std::string(),
bool  allowUnknown = false 
) [inherited]

Parses options from argc/argv, environment variables and config file.

Note the filename argument can reference an options variable that is updated by argc/argv or environment variable parsing.

virtual void qpid::log::SinkOptions::setup ( Logger logger) [pure virtual]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00516_source.html0000664000076400007640000010314411752725717020704 0ustar00jrossjross00000000000000 qpid/framing/reply_exceptions.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/reply_exceptions.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_REPLY_EXCEPTIONS_H
00002 #define QPID_FRAMING_REPLY_EXCEPTIONS_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/Exception.h"
00031 #include "qpid/sys/ExceptionHolder.h"
00032 #include "qpid/framing/enum.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 
00045 struct UnauthorizedAccessException:
00046     SessionException
00047 {
00048     std::string getPrefix() const { return "unauthorized-access"; }
00049     UnauthorizedAccessException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_UNAUTHORIZED_ACCESS, ""+msg) {}
00050 };
00051 
00057 struct NotFoundException:
00058     SessionException
00059 {
00060     std::string getPrefix() const { return "not-found"; }
00061     NotFoundException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_FOUND, ""+msg) {}
00062 };
00063 
00070 struct ResourceLockedException:
00071     SessionException
00072 {
00073     std::string getPrefix() const { return "resource-locked"; }
00074     ResourceLockedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LOCKED, ""+msg) {}
00075 };
00076 
00082 struct PreconditionFailedException:
00083     SessionException
00084 {
00085     std::string getPrefix() const { return "precondition-failed"; }
00086     PreconditionFailedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_PRECONDITION_FAILED, ""+msg) {}
00087 };
00088 
00094 struct ResourceDeletedException:
00095     SessionException
00096 {
00097     std::string getPrefix() const { return "resource-deleted"; }
00098     ResourceDeletedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_DELETED, ""+msg) {}
00099 };
00100 
00106 struct IllegalStateException:
00107     SessionException
00108 {
00109     std::string getPrefix() const { return "illegal-state"; }
00110     IllegalStateException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_STATE, ""+msg) {}
00111 };
00112 
00118 struct CommandInvalidException:
00119     SessionException
00120 {
00121     std::string getPrefix() const { return "command-invalid"; }
00122     CommandInvalidException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_COMMAND_INVALID, ""+msg) {}
00123 };
00124 
00130 struct ResourceLimitExceededException:
00131     SessionException
00132 {
00133     std::string getPrefix() const { return "resource-limit-exceeded"; }
00134     ResourceLimitExceededException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_RESOURCE_LIMIT_EXCEEDED, ""+msg) {}
00135 };
00136 
00143 struct NotAllowedException:
00144     SessionException
00145 {
00146     std::string getPrefix() const { return "not-allowed"; }
00147     NotAllowedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_ALLOWED, ""+msg) {}
00148 };
00149 
00157 struct IllegalArgumentException:
00158     SessionException
00159 {
00160     std::string getPrefix() const { return "illegal-argument"; }
00161     IllegalArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_ILLEGAL_ARGUMENT, ""+msg) {}
00162 };
00163 
00169 struct NotImplementedException:
00170     SessionException
00171 {
00172     std::string getPrefix() const { return "not-implemented"; }
00173     NotImplementedException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_NOT_IMPLEMENTED, ""+msg) {}
00174 };
00175 
00182 struct InternalErrorException:
00183     SessionException
00184 {
00185     std::string getPrefix() const { return "internal-error"; }
00186     InternalErrorException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INTERNAL_ERROR, ""+msg) {}
00187 };
00188 
00196 struct InvalidArgumentException:
00197     SessionException
00198 {
00199     std::string getPrefix() const { return "invalid-argument"; }
00200     InvalidArgumentException(const std::string& msg=std::string()) : SessionException(execution::ERROR_CODE_INVALID_ARGUMENT, ""+msg) {}
00201 };
00202 
00203 QPID_COMMON_EXTERN sys::ExceptionHolder createSessionException(int code, const std::string& text);
00204 
00211 struct ConnectionForcedException:
00212     ConnectionException
00213 {
00214     std::string getPrefix() const { return "connection-forced"; }
00215     ConnectionForcedException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_CONNECTION_FORCED, ""+msg) {}
00216 };
00217 
00223 struct InvalidPathException:
00224     ConnectionException
00225 {
00226     std::string getPrefix() const { return "invalid-path"; }
00227     InvalidPathException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_INVALID_PATH, ""+msg) {}
00228 };
00229 
00235 struct FramingErrorException:
00236     ConnectionException
00237 {
00238     std::string getPrefix() const { return "framing-error"; }
00239     FramingErrorException(const std::string& msg=std::string()) : ConnectionException(connection::CLOSE_CODE_FRAMING_ERROR, ""+msg) {}
00240 };
00241 
00242 QPID_COMMON_EXTERN sys::ExceptionHolder createConnectionException(int code, const std::string& text);
00243 
00249 struct SessionBusyException:
00250     ChannelException
00251 {
00252     std::string getPrefix() const { return "session-busy"; }
00253     SessionBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_SESSION_BUSY, ""+msg) {}
00254 };
00255 
00261 struct TransportBusyException:
00262     ChannelException
00263 {
00264     std::string getPrefix() const { return "transport-busy"; }
00265     TransportBusyException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_TRANSPORT_BUSY, ""+msg) {}
00266 };
00267 
00273 struct NotAttachedException:
00274     ChannelException
00275 {
00276     std::string getPrefix() const { return "not-attached"; }
00277     NotAttachedException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_NOT_ATTACHED, ""+msg) {}
00278 };
00279 
00285 struct UnknownIdsException:
00286     ChannelException
00287 {
00288     std::string getPrefix() const { return "unknown-ids"; }
00289     UnknownIdsException(const std::string& msg=std::string()) : ChannelException(session::DETACH_CODE_UNKNOWN_IDS, ""+msg) {}
00290 };
00291 
00292 QPID_COMMON_EXTERN sys::ExceptionHolder createChannelException(int code, const std::string& text);
00293 
00294 }} // namespace qpid::framing
00295 
00296 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00170.html0000664000076400007640000001021311752725720017304 0ustar00jrossjross00000000000000 std::istream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::istream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00240.html0000664000076400007640000002724011752725717017320 0ustar00jrossjross00000000000000 qpid::Options Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Options Struct Reference

Base class for options. More...

#include <qpid/Options.h>

List of all members.

Classes

struct  Exception

Public Member Functions

 Options (const std::string &name=std::string())
void parse (int argc, char const *const *argv, const std::string &configfile=std::string(), bool allowUnknown=false)
 Parses options from argc/argv, environment variables and config file.
boost::program_options::options_description_easy_init addOptions ()

Detailed Description

Base class for options.

Example of use:

 struct MySubOptions : public Options {
   int x;
   string y;
   MySubOptions() : Options("Sub options") {
     addOptions()
     ("x", optValue(x,"XUNIT"), "Option X")
     ("y", optValue(y, "YUNIT"), "Option Y");
   }
 };

 struct MyOptions : public Options {
   bool z;
   vector<string> foo;
   MySubOptions subOptions;
   MyOptions() : Options("My Options") {
    addOptions()
      ("z", boolSwitch(z), "Option Z")
      ("foo", optValue(foo), "Multiple option foo");
    add(subOptions);
 }

 main(int argc, char** argv) {
   Options opts;
   opts.parse(argc, char** argv);
   // Use values
   dosomething(opts.subOptions.x);
   if (error)
     cout << opts << end;       // Help message.
 }

Constructor & Destructor Documentation

qpid::Options::Options ( const std::string name = std::string())

Member Function Documentation

boost::program_options::options_description_easy_init qpid::Options::addOptions ( ) [inline]

Definition at line 154 of file Options.h.

void qpid::Options::parse ( int  argc,
char const *const *  argv,
const std::string configfile = std::string(),
bool  allowUnknown = false 
)

Parses options from argc/argv, environment variables and config file.

Note the filename argument can reference an options variable that is updated by argc/argv or environment variable parsing.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00765.html0000664000076400007640000002132611752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::IntegerValue Member List
This is the complete list of members for qpid::framing::IntegerValue, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
IntegerValue(int v)qpid::framing::IntegerValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00041.html0000664000076400007640000010220311752725720017302 0ustar00jrossjross00000000000000 qpid::console::BoolValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::BoolValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 BoolValue (bool v)
 BoolValue (uint8_t v)
std::string str () const
bool isBool () const
bool asBool () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::BoolValue::BoolValue ( bool  v) [inline]

Definition at line 152 of file Value.h.

qpid::console::BoolValue::BoolValue ( uint8_t  v) [inline]

Definition at line 153 of file Value.h.


Member Function Documentation

bool qpid::console::BoolValue::asBool ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 156 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

bool qpid::console::BoolValue::isBool ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 155 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::BoolValue::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00549_source.html0000664000076400007640000002260711752725717020716 0ustar00jrossjross00000000000000 qpid/SessionId.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/SessionId.h
Go to the documentation of this file.
00001 #ifndef QPID_SESSIONID_H
00002 #define QPID_SESSIONID_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include <boost/operators.hpp>
00026 #include <string>
00027 #include <qpid/CommonImportExport.h>
00028 
00029 namespace qpid {
00030 
00042 class SessionId : boost::totally_ordered1<SessionId> {
00043     std::string userId;
00044     std::string name;
00045   public:
00046     QPID_COMMON_EXTERN SessionId(const std::string& userId=std::string(), const std::string& name=std::string());
00047     std::string getUserId() const { return userId; }
00048     std::string getName() const { return name; }
00049     QPID_COMMON_EXTERN bool operator<(const SessionId&) const ;
00050     QPID_COMMON_EXTERN bool operator==(const SessionId& id) const;
00051     // Convert to a string
00052     QPID_COMMON_EXTERN std::string str() const;
00053 };
00054 
00055 QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SessionId&);
00056 
00057 
00058 } // namespace qpid
00059 
00060 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00552_source.html0000664000076400007640000002451111752725717020704 0ustar00jrossjross00000000000000 qpid/sys/windows/Condition.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/Condition.h
Go to the documentation of this file.
00001 #ifndef _sys_windows_Condition_h
00002 #define _sys_windows_Condition_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/sys/Mutex.h"
00026 #include "qpid/sys/Time.h"
00027 
00028 #include <time.h>
00029 #include <boost/noncopyable.hpp>
00030 #include <boost/thread/condition.hpp>
00031 #include <boost/thread/thread_time.hpp>
00032 #include <windows.h>
00033 
00034 namespace qpid {
00035 namespace sys {
00036 
00040 class Condition : private boost::noncopyable
00041 {
00042   public:
00043     inline Condition();
00044     inline ~Condition();
00045     inline void wait(Mutex&);
00046     inline bool wait(Mutex&, const AbsTime& absoluteTime);
00047     inline void notify();
00048     inline void notifyAll();
00049 
00050   private:
00051     boost::condition_variable_any condition;
00052 };
00053 
00054 Condition::Condition() {
00055 }
00056 
00057 Condition::~Condition() {
00058 }
00059 
00060 void Condition::wait(Mutex& mutex) {
00061     condition.wait(mutex.mutex);
00062 }
00063 
00064 bool Condition::wait(Mutex& mutex, const AbsTime& absoluteTime){
00065     return condition.timed_wait(mutex.mutex, absoluteTime.timepoint);
00066 }
00067 
00068 void Condition::notify(){
00069     condition.notify_one();
00070 }
00071 
00072 void Condition::notifyAll(){
00073     condition.notify_all();
00074 }
00075 
00076 }}
00077 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00829.html0000664000076400007640000001042111752725720017320 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::Args Member List
This is the complete list of members for qpid::management::Args, including all inherited members.
~Args(void)=0qpid::management::Args [inline, pure virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00833.html0000664000076400007640000001741411752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ConnectionSettings Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00020.html0000664000076400007640000070652411752725717017325 0ustar00jrossjross00000000000000 qpid::client::AsyncSession_0_10 Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::AsyncSession_0_10 Class Reference

AMQP 0-10 session API with keyword arguments. More...

#include <qpid/client/AsyncSession_0_10.h>

List of all members.

Public Member Functions

 AsyncSession_0_10 ()
QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10 (const SessionBase_0_10 &other)
QPID_CLIENT_INLINE_EXTERN
AsyncSession_0_10
operator= (const SessionBase_0_10 &other)
 BOOST_PARAMETER_MEMFUN (Completion, executionSync, 0, 1, ExecutionSyncParameters)
 BOOST_PARAMETER_MEMFUN (Completion, executionResult, 0, 3, ExecutionResultParameters)
 BOOST_PARAMETER_MEMFUN (Completion, executionException, 0, 8, ExecutionExceptionParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageTransfer, 0, 5, MessageTransferParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageAccept, 0, 2, MessageAcceptParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageReject, 0, 4, MessageRejectParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageRelease, 0, 3, MessageReleaseParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::MessageAcquireResult >, messageAcquire, 0, 2, MessageAcquireParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::MessageResumeResult >, messageResume, 0, 3, MessageResumeParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageSubscribe, 0, 9, MessageSubscribeParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageCancel, 0, 2, MessageCancelParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageSetFlowMode, 0, 3, MessageSetFlowModeParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageFlow, 0, 4, MessageFlowParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageFlush, 0, 2, MessageFlushParameters)
 BOOST_PARAMETER_MEMFUN (Completion, messageStop, 0, 2, MessageStopParameters)
 BOOST_PARAMETER_MEMFUN (Completion, txSelect, 0, 1, TxSelectParameters)
 BOOST_PARAMETER_MEMFUN (Completion, txCommit, 0, 1, TxCommitParameters)
 BOOST_PARAMETER_MEMFUN (Completion, txRollback, 0, 1, TxRollbackParameters)
 BOOST_PARAMETER_MEMFUN (Completion, dtxSelect, 0, 1, DtxSelectParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::XaResult >, dtxStart, 0, 4, DtxStartParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::XaResult >, dtxEnd, 0, 4, DtxEndParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::XaResult >, dtxCommit, 0, 3, DtxCommitParameters)
 BOOST_PARAMETER_MEMFUN (Completion, dtxForget, 0, 2, DtxForgetParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::DtxGetTimeoutResult >, dtxGetTimeout, 0, 2, DtxGetTimeoutParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::XaResult >, dtxPrepare, 0, 2, DtxPrepareParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::DtxRecoverResult >, dtxRecover, 0, 1, DtxRecoverParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::XaResult >, dtxRollback, 0, 2, DtxRollbackParameters)
 BOOST_PARAMETER_MEMFUN (Completion, dtxSetTimeout, 0, 3, DtxSetTimeoutParameters)
 BOOST_PARAMETER_MEMFUN (Completion, exchangeDeclare, 0, 8, ExchangeDeclareParameters)
 BOOST_PARAMETER_MEMFUN (Completion, exchangeDelete, 0, 3, ExchangeDeleteParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::ExchangeQueryResult >, exchangeQuery, 0, 2, ExchangeQueryParameters)
 BOOST_PARAMETER_MEMFUN (Completion, exchangeBind, 0, 5, ExchangeBindParameters)
 BOOST_PARAMETER_MEMFUN (Completion, exchangeUnbind, 0, 4, ExchangeUnbindParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::ExchangeBoundResult >, exchangeBound, 0, 5, ExchangeBoundParameters)
 BOOST_PARAMETER_MEMFUN (Completion, queueDeclare, 0, 8, QueueDeclareParameters)
 BOOST_PARAMETER_MEMFUN (Completion, queueDelete, 0, 4, QueueDeleteParameters)
 BOOST_PARAMETER_MEMFUN (Completion, queuePurge, 0, 2, QueuePurgeParameters)
 BOOST_PARAMETER_MEMFUN (TypedResult< qpid::framing::QueueQueryResult >, queueQuery, 0, 2, QueueQueryParameters)
Completion executionSync (bool sync=false)
 This command is complete when all prior commands are completed.
Completion executionResult (const SequenceNumber &commandId=SequenceNumber(), const std::string &value=std::string(), bool sync=false)
 This command carries data resulting from the execution of a command.
Completion executionException (uint16_t errorCode=0, const SequenceNumber &commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string &description=std::string(), const FieldTable &errorInfo=FieldTable(), bool sync=false)
 This command informs a peer of an execution exception.
Completion messageTransfer (const std::string &destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message &content=Message(std::string()), bool sync=false)
 This command transfers a message between two peers.
Completion messageAccept (const SequenceSet &transfers=SequenceSet(), bool sync=false)
 Accepts the message.
Completion messageReject (const SequenceSet &transfers=SequenceSet(), uint16_t code=0, const std::string &text=std::string(), bool sync=false)
 Indicates that the message transfers are unprocessable in some way.
Completion messageRelease (const SequenceSet &transfers=SequenceSet(), bool setRedelivered=false, bool sync=false)
 Release previously transferred messages.
TypedResult
< qpid::framing::MessageAcquireResult
messageAcquire (const SequenceSet &transfers=SequenceSet(), bool sync=false)
 Acquires previously transferred messages for consumption.
TypedResult
< qpid::framing::MessageResumeResult
messageResume (const std::string &destination=std::string(), const std::string &resumeId=std::string(), bool sync=false)
 This command resumes an interrupted transfer.
Completion messageSubscribe (const std::string &queue=std::string(), const std::string &destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string &resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable &arguments=FieldTable(), bool sync=false)
 This command asks the server to start a "subscription", which is a request for messages from a specific queue.
Completion messageCancel (const std::string &destination=std::string(), bool sync=false)
 This command cancels a subscription.
Completion messageSetFlowMode (const std::string &destination=std::string(), uint8_t flowMode=0, bool sync=false)
 Sets the mode of flow control used for a given destination to either window or credit based flow control.
Completion messageFlow (const std::string &destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=false)
 This command controls the flow of message data to a given destination.
Completion messageFlush (const std::string &destination=std::string(), bool sync=false)
 Forces the sender to exhaust his credit supply.
Completion messageStop (const std::string &destination=std::string(), bool sync=false)
 On receipt of this command, a producer of messages MUST set his credit to zero for the given destination.
Completion txSelect (bool sync=false)
 This command sets the session to use standard transactions.
Completion txCommit (bool sync=false)
 This command commits all messages published and accepted in the current transaction.
Completion txRollback (bool sync=false)
 This command abandons the current transaction.
Completion dtxSelect (bool sync=false)
 This command sets the session to use distributed transactions.
TypedResult
< qpid::framing::XaResult
dtxStart (const Xid &xid=Xid(), bool join=false, bool resume=false, bool sync=false)
 This command is called when messages should be produced and consumed on behalf a transaction branch identified by xid.
TypedResult
< qpid::framing::XaResult
dtxEnd (const Xid &xid=Xid(), bool fail=false, bool suspend=false, bool sync=false)
 This command is called when the work done on behalf a transaction branch finishes or needs to be suspended.
TypedResult
< qpid::framing::XaResult
dtxCommit (const Xid &xid=Xid(), bool onePhase=false, bool sync=false)
 Commit the work done on behalf a transaction branch.
Completion dtxForget (const Xid &xid=Xid(), bool sync=false)
 This command is called to forget about a heuristically completed transaction branch.
TypedResult
< qpid::framing::DtxGetTimeoutResult
dtxGetTimeout (const Xid &xid=Xid(), bool sync=false)
 This command obtains the current transaction timeout value in seconds.
TypedResult
< qpid::framing::XaResult
dtxPrepare (const Xid &xid=Xid(), bool sync=false)
 This command prepares for commitment any message produced or consumed on behalf of xid.
TypedResult
< qpid::framing::DtxRecoverResult
dtxRecover (bool sync=false)
 This command is called to obtain a list of transaction branches that are in a prepared or heuristically completed state.
TypedResult
< qpid::framing::XaResult
dtxRollback (const Xid &xid=Xid(), bool sync=false)
 This command rolls back the work associated with xid.
Completion dtxSetTimeout (const Xid &xid=Xid(), uint32_t timeout=0, bool sync=false)
 Sets the specified transaction branch timeout value in seconds.
Completion exchangeDeclare (const std::string &exchange=std::string(), const std::string &type=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=false)
 This command creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.
Completion exchangeDelete (const std::string &exchange=std::string(), bool ifUnused=false, bool sync=false)
 This command deletes an exchange.
TypedResult
< qpid::framing::ExchangeQueryResult
exchangeQuery (const std::string &name=std::string(), bool sync=false)
 This command is used to request information on a particular exchange.
Completion exchangeBind (const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=false)
 This command binds a queue to an exchange.
Completion exchangeUnbind (const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), bool sync=false)
 This command unbinds a queue from an exchange.
TypedResult
< qpid::framing::ExchangeBoundResult
exchangeBound (const std::string &exchange=std::string(), const std::string &queue=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=false)
 This command is used to request information on the bindings to a particular exchange.
Completion queueDeclare (const std::string &queue=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=false)
 This command creates or checks a queue.
Completion queueDelete (const std::string &queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=false)
 This command deletes a queue.
Completion queuePurge (const std::string &queue=std::string(), bool sync=false)
 This command removes all messages from a queue.
TypedResult
< qpid::framing::QueueQueryResult
queueQuery (const std::string &queue=std::string(), bool sync=false)
 This command requests information about a queue.
SessionId getId () const
 Get the session ID.
void close ()
 Close the session.
void sync ()
 Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.
uint32_t timeout (uint32_t seconds)
 Set the timeout for this session.
void suspend ()
 Suspend the session - detach it from its connection.
void resume (Connection)
 Resume a suspended session with a new connection.
uint16_t getChannel () const
 Get the channel associated with this session.
void flush ()
void markCompleted (const framing::SequenceSet &ids, bool notifyPeer)
void markCompleted (const framing::SequenceNumber &id, bool cumulative, bool notifyPeer)
void sendCompletion ()
bool isValid () const
Connection getConnection ()

Protected Attributes

boost::shared_ptr< SessionImpl > impl

Detailed Description

AMQP 0-10 session API with keyword arguments.

This class provides the same set of functions as no_keyword::AsyncSession_0_10, but also allows parameters be passed using keywords. The keyword is the parameter name in the namespace "arg".

For example given the normal function "foo(int x=0, int y=0, int z=0)" you could call it in either of the following ways:

 session.foo(1,2,3);             // Normal no keywords
 session.foo(arg::z=3, arg::x=1); // Keywords and a default

The keyword functions are easy to use but their declarations are hard to read. You may find it easier to read the documentation for no_keyword::AsyncSession_0_10 which provides the same set of functions using normal non-keyword declarations.

Publishing Messages

Exchanges

  • exchangeBind()

    session.exchangeBind(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=routing_key);
  • exchangeUnbind()

    session.exchangeUnBind(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=routing_key);
  • exchangeBound()

    if (session.exchangeBound(arg::exchange="amq.topic", arg::queue=queue, arg::bindingKey=rk)){...}
    if (session.exchangeBound(arg::exchange="amq.topic", arg::queue=queue)){...}
  • exchangeDeclare()

    session.exchangeDeclare(arg::exchange="my.topic", arg::type="topic");
    session.exchangeDeclare(arg::exchange="xml", arg::type="xml");
  • exchangeDelete()

    session.exchangeDeclare(arg::exchange="my.topic");
    session.exchangeDeclare(arg::exchange="xml", arg::ifUnused=true);
  • exchangeQuery()

    ExchangeQueryResult eqr = session.exchangeQuery(arg::exchange="my.topic");

Configuring exchanges in session.exchangeDeclare

arg::durable=true

Default: false.

If durable=true, an exchange remains active even if the server is restarted. If durable=false, an exchange is purged when a server restarts.

arg::autoDelete=true

Default: false.

If autoDelete=true, deleting the last binding for an exchange also deletes the exchange.

arg::alternatExchange="my.exchange"

Default: none.

If an alternate exchange is specified, messages that can not be delivered to any queue are sent to the alternate exchange.

Queues

  • queueDeclare()

    session.queueDeclare(arg::queue="message_queue");
  • queueDelete()

    session.queueDelete(arg::queue="message_queue");
  • queuePurge()

    session.queuePurge(arg::queue="message_queue");
  • queueQuery()

    QueueQueryResult qqr = session.queueQuery(arg::queue="message_queue");

Configuring queues with session.queueDeclare

arg::durable=true

Default: false.

If durable=true, a queue remains active if the server is restarted. If durable=false, a queue and its contents are lost when a server restarts.

arg::autoDelete=true

Default: false.

If autoDelete=true, the queue is deleted when the last active Subscription to the Queue is canceled.

arg::exclusive=true

Default: false.

If exclusive=true, only the Session that created a queue can access it.

arg::alternateExchange="my.exchange"

Default: none.

If an alternate exchange is specified, messages are routed to it if (1) they are rejected by a client, or (2) they remain on the queue when it is deleted.

Accepting, Acquiring, Rejecting, or Releasing Messages

  • messageAccept() — acknowledges messages

    SequenceSet tobeAccepted; 
     toAccepted.add(msg.getId()); 
     session.messageAccept(toBeAccepted);
  • messageAcquire()

    SequenceSet tobeAcquired;
     toBeAcquired.add(msg.getId()); 
     session.messageAcquire(toBeAcquired);
  • messageReject()

    SequenceSet tobeRejected; 
     toRejected.add(msg.getId()); 
     session.messageReject(toBeRejected);
  • messageRelease()

    SequenceSet tobeReleased; 
     toReleased.add(msg.getId()); 
     session.messageRelease(toBeReleased);

Transactions


Constructor & Destructor Documentation

qpid::client::AsyncSession_0_10::AsyncSession_0_10 ( ) [inline]

Reimplemented from qpid::client::no_keyword::AsyncSession_0_10.

Definition at line 555 of file AsyncSession_0_10.h.

qpid::client::AsyncSession_0_10::AsyncSession_0_10 ( const SessionBase_0_10 other) [inline]

Reimplemented from qpid::client::no_keyword::AsyncSession_0_10.

Definition at line 556 of file AsyncSession_0_10.h.


Member Function Documentation

qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
executionSync  ,
,
,
ExecutionSyncParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
executionResult  ,
,
,
ExecutionResultParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
executionException  ,
,
,
ExecutionExceptionParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageTransfer  ,
,
,
MessageTransferParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageAccept  ,
,
,
MessageAcceptParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageReject  ,
,
,
MessageRejectParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageRelease  ,
,
,
MessageReleaseParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::MessageAcquireResult ,
messageAcquire  ,
,
,
MessageAcquireParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::MessageResumeResult ,
messageResume  ,
,
,
MessageResumeParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageSubscribe  ,
,
,
MessageSubscribeParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageCancel  ,
,
,
MessageCancelParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageSetFlowMode  ,
,
,
MessageSetFlowModeParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageFlow  ,
,
,
MessageFlowParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageFlush  ,
,
,
MessageFlushParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
messageStop  ,
,
,
MessageStopParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
txSelect  ,
,
,
TxSelectParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
txCommit  ,
,
,
TxCommitParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
txRollback  ,
,
,
TxRollbackParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
dtxSelect  ,
,
,
DtxSelectParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::XaResult ,
dtxStart  ,
,
,
DtxStartParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::XaResult ,
dtxEnd  ,
,
,
DtxEndParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::XaResult ,
dtxCommit  ,
,
,
DtxCommitParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
dtxForget  ,
,
,
DtxForgetParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::DtxGetTimeoutResult ,
dtxGetTimeout  ,
,
,
DtxGetTimeoutParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::XaResult ,
dtxPrepare  ,
,
,
DtxPrepareParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::DtxRecoverResult ,
dtxRecover  ,
,
,
DtxRecoverParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::XaResult ,
dtxRollback  ,
,
,
DtxRollbackParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
dtxSetTimeout  ,
,
,
DtxSetTimeoutParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
exchangeDeclare  ,
,
,
ExchangeDeclareParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
exchangeDelete  ,
,
,
ExchangeDeleteParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::ExchangeQueryResult ,
exchangeQuery  ,
,
,
ExchangeQueryParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
exchangeBind  ,
,
,
ExchangeBindParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
exchangeUnbind  ,
,
,
ExchangeUnbindParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::ExchangeBoundResult ,
exchangeBound  ,
,
,
ExchangeBoundParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
queueDeclare  ,
,
,
QueueDeclareParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
queueDelete  ,
,
,
QueueDeleteParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( Completion  ,
queuePurge  ,
,
,
QueuePurgeParameters   
) [inline]
qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN ( TypedResult< qpid::framing::QueueQueryResult ,
queueQuery  ,
,
,
QueueQueryParameters   
) [inline]
void qpid::client::SessionBase_0_10::close ( ) [inherited]

Close the session.

A session is automatically closed when all handles to it are destroyed.

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxCommit ( const Xid &  xid = Xid(),
bool  onePhase = false,
bool  sync = false 
) [inherited]

Commit the work done on behalf a transaction branch.

This command commits the work associated with xid. Any produced messages are made available and any consumed messages are discarded.

Parameters:
xidSpecifies the xid of the transaction branch to be committed.
onePhaseUsed to indicate whether one-phase or two-phase commit is used.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxEnd ( const Xid &  xid = Xid(),
bool  fail = false,
bool  suspend = false,
bool  sync = false 
) [inherited]

This command is called when the work done on behalf a transaction branch finishes or needs to be suspended.

Parameters:
xidSpecifies the xid of the transaction branch to be ended.
failIf set, indicates that this portion of work has failed; otherwise this portion of work has completed successfully.
suspendIndicates that the transaction branch is temporarily suspended in an incomplete state.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::dtxForget ( const Xid &  xid = Xid(),
bool  sync = false 
) [inherited]

This command is called to forget about a heuristically completed transaction branch.

Parameters:
xidSpecifies the xid of the transaction branch to be forgotten.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::DtxGetTimeoutResult> qpid::client::no_keyword::AsyncSession_0_10::dtxGetTimeout ( const Xid &  xid = Xid(),
bool  sync = false 
) [inherited]

This command obtains the current transaction timeout value in seconds.

If set-timeout was not used prior to invoking this command, the return value is the default timeout; otherwise, the value used in the previous set-timeout call is returned.

Parameters:
xidSpecifies the xid of the transaction branch for getting the timeout.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxPrepare ( const Xid &  xid = Xid(),
bool  sync = false 
) [inherited]

This command prepares for commitment any message produced or consumed on behalf of xid.

Parameters:
xidSpecifies the xid of the transaction branch that can be prepared.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::DtxRecoverResult> qpid::client::no_keyword::AsyncSession_0_10::dtxRecover ( bool  sync = false) [inherited]

This command is called to obtain a list of transaction branches that are in a prepared or heuristically completed state.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxRollback ( const Xid &  xid = Xid(),
bool  sync = false 
) [inherited]

This command rolls back the work associated with xid.

Any produced messages are discarded and any consumed messages are re-enqueued.

Parameters:
xidSpecifies the xid of the transaction branch that can be rolled back.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::dtxSelect ( bool  sync = false) [inherited]

This command sets the session to use distributed transactions.

The client must use this command at least once on a session before using XA demarcation operations.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::dtxSetTimeout ( const Xid &  xid = Xid(),
uint32_t  timeout = 0,
bool  sync = false 
) [inherited]

Sets the specified transaction branch timeout value in seconds.

Parameters:
xidSpecifies the xid of the transaction branch for setting the timeout.
timeoutThe transaction timeout value in seconds.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::XaResult> qpid::client::no_keyword::AsyncSession_0_10::dtxStart ( const Xid &  xid = Xid(),
bool  join = false,
bool  resume = false,
bool  sync = false 
) [inherited]

This command is called when messages should be produced and consumed on behalf a transaction branch identified by xid.

Parameters:
xidSpecifies the xid of the transaction branch to be started.
joinIndicate whether this is joining an already associated xid. Indicate that the start applies to joining a transaction previously seen.
resumeIndicate that the start applies to resuming a suspended transaction branch specified.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::exchangeBind ( const std::string queue = std::string(),
const std::string exchange = std::string(),
const std::string bindingKey = std::string(),
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
) [inherited]

This command binds a queue to an exchange.

Until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a direct exchange and subscription queues are bound to a topic exchange.

Parameters:
queueSpecifies the name of the queue to bind.
exchange
bindingKeyThe binding-key uniquely identifies a binding between a given (exchange, queue) pair. Depending on the exchange configuration, the binding key may be matched against the message routing key in order to make routing decisions. The match algorithm depends on the exchange type. Some exchange types may ignore the binding key when making routing decisions. Refer to the specific exchange type documentation. The meaning of an empty binding key depends on the exchange implementation.
argumentsA set of arguments for the binding. The syntax and semantics of these arguments depends on the exchange class.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::ExchangeBoundResult> qpid::client::no_keyword::AsyncSession_0_10::exchangeBound ( const std::string exchange = std::string(),
const std::string queue = std::string(),
const std::string bindingKey = std::string(),
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
) [inherited]

This command is used to request information on the bindings to a particular exchange.

Parameters:
exchangeThe name of the exchange for which binding information is being requested. If not specified explicitly the default exchange is implied.
queueIf populated then determine whether the given queue is bound to the exchange.
bindingKeyIf populated defines the binding-key of the binding of interest, if not populated the request will ignore the binding-key on bindings when searching for a match.
argumentsIf populated defines the arguments of the binding of interest if not populated the request will ignore the arguments on bindings when searching for a match
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::exchangeDeclare ( const std::string exchange = std::string(),
const std::string type = std::string(),
const std::string alternateExchange = std::string(),
bool  passive = false,
bool  durable = false,
bool  autoDelete = false,
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
) [inherited]

This command creates an exchange if it does not already exist, and if the exchange exists, verifies that it is of the correct and expected class.

Parameters:
exchange
typeEach exchange belongs to one of a set of exchange types implemented by the server. The exchange types define the functionality of the exchange - i.e. how messages are routed through it. It is not valid or meaningful to attempt to change the type of an existing exchange.
alternateExchangeIn the event that a message cannot be routed, this is the name of the exchange to which the message will be sent. Messages transferred using message.transfer will be routed to the alternate-exchange only if they are sent with the "none" accept-mode, and the discard-unroutable delivery property is set to false, and there is no queue to route to for the given message according to the bindings on this exchange.
passiveIf set, the server will not create the exchange. The client can use this to check whether an exchange exists without modifying the server state.
durableIf set when creating a new exchange, the exchange will be marked as durable. Durable exchanges remain active when a server restarts. Non-durable exchanges (transient exchanges) are purged if/when a server restarts.
autoDeleteIf set, the exchange is deleted automatically when there remain no bindings between the exchange and any queue. Such an exchange will not be automatically deleted until at least one binding has been made to prevent the immediate deletion of the exchange upon creation.
argumentsA set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored if passive is 1.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::exchangeDelete ( const std::string exchange = std::string(),
bool  ifUnused = false,
bool  sync = false 
) [inherited]

This command deletes an exchange.

When an exchange is deleted all queue bindings on the exchange are cancelled.

Parameters:
exchange
ifUnusedIf set, the server will only delete the exchange if it has no queue bindings. If the exchange has queue bindings the server does not delete it but raises an exception instead.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::ExchangeQueryResult> qpid::client::no_keyword::AsyncSession_0_10::exchangeQuery ( const std::string name = std::string(),
bool  sync = false 
) [inherited]

This command is used to request information on a particular exchange.

Parameters:
nameThe name of the exchange for which information is requested. If not specified explicitly the default exchange is implied.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::exchangeUnbind ( const std::string queue = std::string(),
const std::string exchange = std::string(),
const std::string bindingKey = std::string(),
bool  sync = false 
) [inherited]

This command unbinds a queue from an exchange.

Parameters:
queueSpecifies the name of the queue to unbind.
exchangeThe name of the exchange to unbind from.
bindingKeySpecifies the binding-key of the binding to unbind.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::executionException ( uint16_t  errorCode = 0,
const SequenceNumber &  commandId = SequenceNumber(),
uint8_t  classCode = 0,
uint8_t  commandCode = 0,
uint8_t  fieldIndex = 0,
const std::string description = std::string(),
const FieldTable &  errorInfo = FieldTable(),
bool  sync = false 
) [inherited]

This command informs a peer of an execution exception.

The command-id, when given, correlates the error to a specific command.

Parameters:
errorCode
commandIdThe command-id of the command which caused the exception. If the exception was not caused by a specific command, this value is not set.
classCode
commandCode
fieldIndexThe zero based index of the exceptional field within the arguments to the exceptional command. If the exception was not caused by a specific field, this value is not set.
descriptionThe description provided is implementation defined, but MUST be in the language appropriate for the selected locale. The intention is that this description is suitable for logging or alerting output.
errorInfo
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::executionResult ( const SequenceNumber &  commandId = SequenceNumber(),
const std::string value = std::string(),
bool  sync = false 
) [inherited]

This command carries data resulting from the execution of a command.

Parameters:
commandId
value
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::executionSync ( bool  sync = false) [inherited]

This command is complete when all prior commands are completed.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::SessionBase_0_10::flush ( ) [inherited]
uint16_t qpid::client::SessionBase_0_10::getChannel ( ) const [inherited]

Get the channel associated with this session.

Connection qpid::client::SessionBase_0_10::getConnection ( ) [inherited]
SessionId qpid::client::SessionBase_0_10::getId ( ) const [inherited]

Get the session ID.

bool qpid::client::SessionBase_0_10::isValid ( ) const [inherited]
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceSet ids,
bool  notifyPeer 
) [inherited]
void qpid::client::SessionBase_0_10::markCompleted ( const framing::SequenceNumber id,
bool  cumulative,
bool  notifyPeer 
) [inherited]
Completion qpid::client::no_keyword::AsyncSession_0_10::messageAccept ( const SequenceSet &  transfers = SequenceSet(),
bool  sync = false 
) [inherited]

Accepts the message.

Once a transfer is accepted, the command-id may no longer be referenced from other commands.

Parameters:
transfersIdentifies the messages previously transferred that should be accepted.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::MessageAcquireResult> qpid::client::no_keyword::AsyncSession_0_10::messageAcquire ( const SequenceSet &  transfers = SequenceSet(),
bool  sync = false 
) [inherited]

Acquires previously transferred messages for consumption.

The acquired ids (if any) are sent via message.acquired.

Parameters:
transfersIndicates the messages to be acquired.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageCancel ( const std::string destination = std::string(),
bool  sync = false 
) [inherited]

This command cancels a subscription.

This does not affect already delivered messages, but it does mean the server will not send any more messages for that subscription. The client may receive an arbitrary number of messages in between sending the cancel command and receiving notification that the cancel command is complete.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageFlow ( const std::string destination = std::string(),
uint8_t  unit = 0,
uint32_t  value = 0,
bool  sync = false 
) [inherited]

This command controls the flow of message data to a given destination.

It is used by the recipient of messages to dynamically match the incoming rate of message flow to its processing or forwarding capacity. Upon receipt of this command, the sender must add "value" number of the specified unit to the available credit balance for the specified destination. A value of (0xFFFFFFFF) indicates an infinite amount of credit. This disables any limit for the given unit until the credit balance is zeroed with message.stop or message.flush.

Parameters:
destination
unitThe unit of value.
valueIf the value is not set then this indicates an infinite amount of credit.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageFlush ( const std::string destination = std::string(),
bool  sync = false 
) [inherited]

Forces the sender to exhaust his credit supply.

The sender's credit will always be zero when this command completes. The command completes when immediately available message data has been transferred, or when the credit supply is exhausted.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageReject ( const SequenceSet &  transfers = SequenceSet(),
uint16_t  code = 0,
const std::string text = std::string(),
bool  sync = false 
) [inherited]

Indicates that the message transfers are unprocessable in some way.

A server may reject a message if it is unroutable. A client may reject a message if it is invalid. A message may be rejected for other reasons as well. Once a transfer is rejected, the command-id may no longer be referenced from other commands.

Parameters:
transfersIdentifies the messages previously transferred that should be rejected.
codeCode describing the reason for rejection.
textText describing the reason for rejection.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageRelease ( const SequenceSet &  transfers = SequenceSet(),
bool  setRedelivered = false,
bool  sync = false 
) [inherited]

Release previously transferred messages.

When acquired messages are released, they become available for acquisition by any subscriber. Once a transfer is released, the command-id may no longer be referenced from other commands.

Parameters:
transfersIndicates the messages to be released.
setRedeliveredBy setting set-redelivered to true, any acquired messages released to a queue with this command will be marked as redelivered on their next transfer from that queue. If this flag is not set, then an acquired message will retain its original redelivered status on the queue. Messages that are not acquired are unaffected by the value of this flag.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::MessageResumeResult> qpid::client::no_keyword::AsyncSession_0_10::messageResume ( const std::string destination = std::string(),
const std::string resumeId = std::string(),
bool  sync = false 
) [inherited]

This command resumes an interrupted transfer.

The recipient should return the amount of partially transferred data associated with the given resume-id, or zero if there is no data at all. If a non-zero result is returned, the recipient should expect to receive message fragment(s) containing the remainder of the interrupted message.

Parameters:
destinationThe destination to which the remaining message fragments are transferred.
resumeIdThe name of the transfer being resumed.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageSetFlowMode ( const std::string destination = std::string(),
uint8_t  flowMode = 0,
bool  sync = false 
) [inherited]

Sets the mode of flow control used for a given destination to either window or credit based flow control.

With credit based flow control, the sender of messages continually maintains its current credit balance with the recipient. The credit balance consists of two values, a message count, and a byte count. Whenever message data is sent, both counts must be decremented. If either value reaches zero, the flow of message data must stop. Additional credit is received via the message.flow command.

The sender MUST NOT send partial assemblies. This means that if there is not enough byte credit available to send a complete message, the sender must either wait or use message fragmentation (see the fragment-properties header struct) to send the first part of the message data in a complete assembly.

Window based flow control is identical to credit based flow control, however message transfer completion implicitly grants a single unit of message credit, and the size of the message in byte credits for each completed message transfer. Completion of the transfer command with session.completed is the only way credit is implicitly updated; message.accept, message.release, message.reject, tx.commit and tx.rollback have no effect on the outstanding credit balances.

Parameters:
destination
flowModeThe new flow control mode.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageStop ( const std::string destination = std::string(),
bool  sync = false 
) [inherited]

On receipt of this command, a producer of messages MUST set his credit to zero for the given destination.

When notifying of completion, credit MUST be zero and no further messages will be sent until such a time as further credit is received.

Parameters:
destination
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageSubscribe ( const std::string queue = std::string(),
const std::string destination = std::string(),
uint8_t  acceptMode = 0,
uint8_t  acquireMode = 0,
bool  exclusive = false,
const std::string resumeId = std::string(),
uint64_t  resumeTtl = 0,
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
) [inherited]

This command asks the server to start a "subscription", which is a request for messages from a specific queue.

Subscriptions last as long as the session they were created on, or until the client cancels them.

Parameters:
queueSpecifies the name of the subscribed queue.
destinationThe client specified name for the subscription. This is used as the destination for all messages transferred from this subscription. The destination is scoped to the session.
acceptModeThe accept-mode to use for messages transferred from this subscription.
acquireModeThe acquire-mode to use for messages transferred from this subscription.
exclusiveRequest an exclusive subscription. This prevents other subscribers from subscribing to the queue.
resumeIdRequests that the broker use the supplied resume-id when transferring messages for this subscription.
resumeTtlRequested duration in milliseconds for the broker use as resume-ttl when transferring messages for this subscription.
argumentsThe syntax and semantics of these arguments depends on the providers implementation.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::messageTransfer ( const std::string destination = std::string(),
uint8_t  acceptMode = 1,
uint8_t  acquireMode = 0,
const Message content = Message(std::string()),
bool  sync = false 
) [inherited]

This command transfers a message between two peers.

When a client uses this command to publish a message to a broker, the destination identifies a specific exchange. The message will then be routed to queues as defined by the exchange configuration.

The client may request a broker to transfer messages to it, from a particular queue, by issuing a subscribe command. The subscribe command specifies the destination that the broker should use for any resulting transfers.

Parameters:
destinationSpecifies the destination to which the message is to be transferred.
acceptModeIndicates whether message.accept, session.complete, or nothing at all is required to indicate successful transfer of the message.
acquireModeIndicates whether or not the transferred message has been acquired.
contentMessage content
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

AsyncSession_0_10 & qpid::client::AsyncSession_0_10::operator= ( const SessionBase_0_10 other) [inline]
Completion qpid::client::no_keyword::AsyncSession_0_10::queueDeclare ( const std::string queue = std::string(),
const std::string alternateExchange = std::string(),
bool  passive = false,
bool  durable = false,
bool  exclusive = false,
bool  autoDelete = false,
const FieldTable &  arguments = FieldTable(),
bool  sync = false 
) [inherited]

This command creates or checks a queue.

When creating a new queue the client can specify various properties that control the durability of the queue and its contents, and the level of sharing for the queue.

Parameters:
queue
alternateExchangeThe alternate-exchange field specifies how messages on this queue should be treated when they are rejected by a subscriber, or when they are orphaned by queue deletion. When present, rejected or orphaned messages MUST be routed to the alternate-exchange. In all cases the messages MUST be removed from the queue.
passiveIf set, the server will not create the queue. This field allows the client to assert the presence of a queue without modifying the server state.
durableIf set when creating a new queue, the queue will be marked as durable. Durable queues remain active when a server restarts. Non-durable queues (transient queues) are purged if/when a server restarts. Note that durable queues do not necessarily hold persistent messages, although it does not make sense to send persistent messages to a transient queue.
exclusiveExclusive queues can only be used from one session at a time. Once a session declares an exclusive queue, that queue cannot be used by any other session until the declaring session closes.
autoDeleteIf this field is set and the exclusive field is also set, then the queue MUST be deleted when the session closes.

If this field is set and the exclusive field is not set the queue is deleted when all the consumers have finished using it. Last consumer can be cancelled either explicitly or because its session is closed. If there was no consumer ever on the queue, it won't be deleted.

Parameters:
argumentsA set of arguments for the declaration. The syntax and semantics of these arguments depends on the server implementation. This field is ignored if passive is 1.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::queueDelete ( const std::string queue = std::string(),
bool  ifUnused = false,
bool  ifEmpty = false,
bool  sync = false 
) [inherited]

This command deletes a queue.

When a queue is deleted any pending messages are sent to the alternate-exchange if defined, or discarded if it is not.

Parameters:
queueSpecifies the name of the queue to delete.
ifUnusedIf set, the server will only delete the queue if it has no consumers. If the queue has consumers the server does does not delete it but raises an exception instead.
ifEmptyIf set, the server will only delete the queue if it has no messages.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::queuePurge ( const std::string queue = std::string(),
bool  sync = false 
) [inherited]

This command removes all messages from a queue.

It does not cancel subscribers. Purged messages are deleted without any formal "undo" mechanism.

Parameters:
queueSpecifies the name of the queue to purge.
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

TypedResult<qpid::framing::QueueQueryResult> qpid::client::no_keyword::AsyncSession_0_10::queueQuery ( const std::string queue = std::string(),
bool  sync = false 
) [inherited]

This command requests information about a queue.

Parameters:
queue
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

void qpid::client::SessionBase_0_10::resume ( Connection  ) [inherited]

Resume a suspended session with a new connection.

void qpid::client::SessionBase_0_10::sendCompletion ( ) [inherited]
void qpid::client::SessionBase_0_10::suspend ( ) [inherited]

Suspend the session - detach it from its connection.

void qpid::client::SessionBase_0_10::sync ( ) [inherited]

Synchronize the session: sync() waits until all commands issued on this session so far have been completed by the broker.

Note sync() is always synchronous, even on an AsyncSession object because that's almost always what you want. You can call AsyncSession::executionSync() directly in the unusual event that you want to do an asynchronous sync.

uint32_t qpid::client::SessionBase_0_10::timeout ( uint32_t  seconds) [inherited]

Set the timeout for this session.

Completion qpid::client::no_keyword::AsyncSession_0_10::txCommit ( bool  sync = false) [inherited]

This command commits all messages published and accepted in the current transaction.

A new transaction starts immediately after a commit.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::txRollback ( bool  sync = false) [inherited]

This command abandons the current transaction.

In particular the transfers from Client to Server (publishes) and accepts of transfers from Server to Client which occurred in the current transaction are discarded. A new transaction starts immediately after a rollback.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().

Completion qpid::client::no_keyword::AsyncSession_0_10::txSelect ( bool  sync = false) [inherited]

This command sets the session to use standard transactions.

The client must use this command exactly once on a session before using the Commit or Rollback commands.

Parameters:
syncIf true the broker will respond with completion status as soon as possible.

Referenced by BOOST_PARAMETER_MEMFUN().


Member Data Documentation

boost::shared_ptr<SessionImpl> qpid::client::SessionBase_0_10::impl [protected, inherited]

Definition at line 104 of file SessionBase_0_10.h.

Referenced by operator=(), and qpid::client::Session_0_10::operator=().


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00634.html0000664000076400007640000001262611752725717017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::QueryElement Member List
This is the complete list of members for qmf::engine::QueryElement, including all inherited members.
evaluate(const Object *object) const qmf::engine::QueryElement [virtual]
implqmf::engine::QueryElement
QueryElement(const char *attrName, const Value *value, ValueOper oper)qmf::engine::QueryElement
QueryElement(QueryElementImpl *impl)qmf::engine::QueryElement
~QueryElement()qmf::engine::QueryElement [virtual]
~QueryOperand()qmf::engine::QueryOperand [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00412.html0000664000076400007640000001144311752725717017317 0ustar00jrossjross00000000000000 qmf/engine/ConnectionSettings.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/ConnectionSettings.h File Reference

Go to the source code of this file.

Classes

class  qmf::engine::ConnectionSettings
 Settings for AMQP connections to the broker. More...

Namespaces

namespace  qmf
namespace  qmf::engine

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00832.html0000664000076400007640000003241211752725720017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::Buffer Member List
This is the complete list of members for qpid::management::Buffer, including all inherited members.
available()qpid::management::Buffer
Buffer(char *data=0, uint32_t size=0)qpid::management::Buffer
getBin128(uint8_t *b)qpid::management::Buffer
getDouble()qpid::management::Buffer
getFloat()qpid::management::Buffer
getInt16()qpid::management::Buffer
getInt32()qpid::management::Buffer
getInt64()qpid::management::Buffer
getInt8()qpid::management::Buffer
getList(types::Variant::List &list)qpid::management::Buffer
getLong()qpid::management::Buffer
getLongLong()qpid::management::Buffer
getLongString(std::string &s)qpid::management::Buffer
getMap(types::Variant::Map &map)qpid::management::Buffer
getMediumString(std::string &s)qpid::management::Buffer
getOctet()qpid::management::Buffer
getPointer()qpid::management::Buffer
getPosition()qpid::management::Buffer
getRawData(std::string &s, uint32_t size)qpid::management::Buffer
getRawData(uint8_t *data, size_t size)qpid::management::Buffer
getShort()qpid::management::Buffer
getShortString(std::string &s)qpid::management::Buffer
getSize()qpid::management::Buffer
putBin128(const uint8_t *b)qpid::management::Buffer
putDouble(double f)qpid::management::Buffer
putFloat(float f)qpid::management::Buffer
putInt16(int16_t i)qpid::management::Buffer
putInt32(int32_t i)qpid::management::Buffer
putInt64(int64_t i)qpid::management::Buffer
putInt8(int8_t i)qpid::management::Buffer
putList(const types::Variant::List &list)qpid::management::Buffer
putLong(uint32_t i)qpid::management::Buffer
putLongLong(uint64_t i)qpid::management::Buffer
putLongString(const std::string &s)qpid::management::Buffer
putMap(const types::Variant::Map &map)qpid::management::Buffer
putMediumString(const std::string &s)qpid::management::Buffer
putOctet(uint8_t i)qpid::management::Buffer
putRawData(const std::string &s)qpid::management::Buffer
putRawData(const uint8_t *data, size_t size)qpid::management::Buffer
putShort(uint16_t i)qpid::management::Buffer
putShortString(const std::string &s)qpid::management::Buffer
record()qpid::management::Buffer
reset()qpid::management::Buffer
restore(bool reRecord=false)qpid::management::Buffer
~Buffer()qpid::management::Buffer

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00482_source.html0000664000076400007640000001653511752725717020715 0ustar00jrossjross00000000000000 qpid/CommonImportExport.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/CommonImportExport.h
Go to the documentation of this file.
00001 #ifndef QPID_COMMON_IMPORT_EXPORT_H
00002 #define QPID_COMMON_IMPORT_EXPORT_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include "qpid/ImportExport.h"
00024 
00025 #if defined(COMMON_EXPORT) || defined (qpidcommon_EXPORTS)
00026 #  define QPID_COMMON_EXTERN QPID_EXPORT
00027 #  define QPID_COMMON_CLASS_EXTERN QPID_CLASS_EXPORT
00028 #  define QPID_COMMON_INLINE_EXTERN QPID_INLINE_EXPORT
00029 #else
00030 #  define QPID_COMMON_EXTERN QPID_IMPORT
00031 #  define QPID_COMMON_CLASS_EXTERN QPID_CLASS_IMPORT
00032 #  define QPID_COMMON_INLINE_EXTERN QPID_INLINE_IMPORT
00033 #endif
00034 
00035 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00161.html0000664000076400007640000002463611752725720017322 0ustar00jrossjross00000000000000 qpid::framing::InvalidArgumentException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::InvalidArgumentException Struct Reference

An invalid argument was passed to a command, and the operation could not proceed. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 InvalidArgumentException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

An invalid argument was passed to a command, and the operation could not proceed.

An invalid argument is not illegal (see illegal-argument), i.e. it matches the domain definition; however the particular value is invalid in this context.


Constructor & Destructor Documentation

qpid::framing::InvalidArgumentException::InvalidArgumentException ( const std::string msg = std::string()) [inline]

Definition at line 200 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::InvalidArgumentException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 199 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00772.html0000664000076400007640000002130611752725720017321 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::BoolValue Member List
This is the complete list of members for qpid::framing::BoolValue, including all inherited members.
BoolValue(bool)qpid::framing::BoolValue
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00181.html0000664000076400007640000001030611752725720017311 0ustar00jrossjross00000000000000 std::set::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::set::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00825.html0000664000076400007640000001107711752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Statement::Initializer Member List
This is the complete list of members for qpid::log::Statement::Initializer, including all inherited members.
Initializer(Statement &s)qpid::log::Statement::Initializer
statementqpid::log::Statement::Initializer

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00349.html0000664000076400007640000001753011752725720017325 0ustar00jrossjross00000000000000 qpid::framing::StructHelper Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::StructHelper Class Reference

#include <qpid/framing/StructHelper.h>

List of all members.

Public Member Functions

template<class T >
void encode (const T t, std::string &data)
template<class T >
void decode (T &t, const std::string &data)

Member Function Documentation

template<class T >
void qpid::framing::StructHelper::decode ( T &  t,
const std::string data 
) [inline]

Definition at line 45 of file StructHelper.h.

References qpid::framing::Buffer::getShort().

Referenced by qpid::client::TypedResult::get().

template<class T >
void qpid::framing::StructHelper::encode ( const T  t,
std::string data 
) [inline]

Definition at line 37 of file StructHelper.h.

References qpid::framing::Buffer::putShort().


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x63.html0000664000076400007640000005130411752725720022571 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- c -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00217.html0000664000076400007640000005446211752725717017332 0ustar00jrossjross00000000000000 qpid::Msg Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Msg Struct Reference

A simple wrapper for std::ostringstream that allows in place construction of a message and automatic conversion to string. More...

#include <qpid/Msg.h>

List of all members.

Public Member Functions

 Msg ()
 Msg (const Msg &m)
std::string str () const
 operator std::string () const
Msgoperator<< (long n)
Msgoperator<< (unsigned long n)
Msgoperator<< (bool n)
Msgoperator<< (short n)
Msgoperator<< (unsigned short n)
Msgoperator<< (int n)
Msgoperator<< (unsigned int n)
Msgoperator<< (double n)
Msgoperator<< (float n)
Msgoperator<< (long double n)
template<class T >
Msgoperator<< (const T &t)

Public Attributes

std::ostringstream os

Detailed Description

A simple wrapper for std::ostringstream that allows in place construction of a message and automatic conversion to string.

E.g.

 void foo(const std::string&);
 foo(Msg() << "hello " << 32);
 *

Will construct the string "hello 32" and pass it to foo()


Constructor & Destructor Documentation

qpid::Msg::Msg ( ) [inline]

Definition at line 43 of file Msg.h.

qpid::Msg::Msg ( const Msg m) [inline]

Definition at line 44 of file Msg.h.


Member Function Documentation

qpid::Msg::operator std::string ( ) const [inline]

Definition at line 46 of file Msg.h.

References str().

Msg& qpid::Msg::operator<< ( long  n) [inline]

Definition at line 48 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( unsigned long  n) [inline]

Definition at line 49 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( bool  n) [inline]

Definition at line 50 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( short  n) [inline]

Definition at line 51 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( unsigned short  n) [inline]

Definition at line 52 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( int  n) [inline]

Definition at line 53 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( unsigned int  n) [inline]

Definition at line 54 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( double  n) [inline]

Definition at line 59 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( float  n) [inline]

Definition at line 60 of file Msg.h.

References os.

Msg& qpid::Msg::operator<< ( long double  n) [inline]

Definition at line 61 of file Msg.h.

References os.

template<class T >
Msg& qpid::Msg::operator<< ( const T &  t) [inline]

Definition at line 63 of file Msg.h.

References os.

std::string qpid::Msg::str ( ) const [inline]

Definition at line 45 of file Msg.h.

References os.

Referenced by operator std::string().


Member Data Documentation

Definition at line 42 of file Msg.h.

Referenced by str(), and operator<<().


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00123.html0000664000076400007640000015256511752725720017323 0ustar00jrossjross00000000000000 qpid::framing::FieldTable Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FieldTable Class Reference

A set of name-value pairs. More...

#include <qpid/framing/FieldTable.h>

List of all members.

Public Types

typedef boost::shared_ptr
< FieldValue
ValuePtr
typedef std::map< std::string,
ValuePtr
ValueMap
typedef ValueMap::iterator iterator
typedef ValueMap::const_iterator const_iterator
typedef ValueMap::const_reference const_reference
typedef ValueMap::reference reference
typedef ValueMap::value_type value_type

Public Member Functions

 FieldTable ()
 FieldTable (const FieldTable &)
FieldTableoperator= (const FieldTable &)
uint32_t encodedSize () const
void encode (Buffer &buffer) const
void decode (Buffer &buffer)
int count () const
QPID_COMMON_INLINE_EXTERN size_t size () const
QPID_COMMON_INLINE_EXTERN bool empty ()
void set (const std::string &name, const ValuePtr &value)
ValuePtr get (const std::string &name) const
QPID_COMMON_INLINE_EXTERN bool isSet (const std::string &name) const
void setString (const std::string &name, const std::string &value)
void setInt (const std::string &name, const int value)
void setInt64 (const std::string &name, const int64_t value)
void setTimestamp (const std::string &name, const uint64_t value)
void setUInt64 (const std::string &name, const uint64_t value)
void setTable (const std::string &name, const FieldTable &value)
void setArray (const std::string &name, const Array &value)
void setFloat (const std::string &name, const float value)
void setDouble (const std::string &name, const double value)
int getAsInt (const std::string &name) const
uint64_t getAsUInt64 (const std::string &name) const
int64_t getAsInt64 (const std::string &name) const
std::string getAsString (const std::string &name) const
bool getTable (const std::string &name, FieldTable &value) const
bool getArray (const std::string &name, Array &value) const
bool getFloat (const std::string &name, float &value) const
bool getDouble (const std::string &name, double &value) const
void erase (const std::string &name)
bool operator== (const FieldTable &other) const
ValueMap::const_iterator begin () const
ValueMap::const_iterator end () const
ValueMap::const_iterator find (const std::string &s) const
ValueMap::iterator begin ()
ValueMap::iterator end ()
ValueMap::iterator find (const std::string &s)
std::pair< ValueMap::iterator,
bool > 
insert (const ValueMap::value_type &)
ValueMap::iterator insert (ValueMap::iterator, const ValueMap::value_type &)
void clear ()

Friends

std::ostreamoperator<< (std::ostream &out, const FieldTable &body)

Detailed Description

A set of name-value pairs.

(See the AMQP spec for more details on AMQP field tables).


Member Typedef Documentation

typedef ValueMap::const_iterator qpid::framing::FieldTable::const_iterator

Definition at line 59 of file FieldTable.h.

typedef ValueMap::const_reference qpid::framing::FieldTable::const_reference

Definition at line 60 of file FieldTable.h.

typedef ValueMap::iterator qpid::framing::FieldTable::iterator

Definition at line 58 of file FieldTable.h.

typedef ValueMap::reference qpid::framing::FieldTable::reference

Definition at line 61 of file FieldTable.h.

typedef ValueMap::value_type qpid::framing::FieldTable::value_type

Definition at line 62 of file FieldTable.h.

typedef boost::shared_ptr<FieldValue> qpid::framing::FieldTable::ValuePtr

Definition at line 56 of file FieldTable.h.


Constructor & Destructor Documentation

qpid::framing::FieldTable::FieldTable ( )
qpid::framing::FieldTable::FieldTable ( const FieldTable )

Member Function Documentation

ValueMap::const_iterator qpid::framing::FieldTable::begin ( ) const
ValueMap::iterator qpid::framing::FieldTable::begin ( )
void qpid::framing::FieldTable::clear ( )
int qpid::framing::FieldTable::count ( ) const
void qpid::framing::FieldTable::decode ( Buffer buffer)
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldTable::empty ( ) [inline]

Definition at line 74 of file FieldTable.h.

References size().

void qpid::framing::FieldTable::encode ( Buffer buffer) const
uint32_t qpid::framing::FieldTable::encodedSize ( ) const
ValueMap::const_iterator qpid::framing::FieldTable::end ( ) const
ValueMap::iterator qpid::framing::FieldTable::end ( )
void qpid::framing::FieldTable::erase ( const std::string name)
ValueMap::const_iterator qpid::framing::FieldTable::find ( const std::string s) const
ValueMap::iterator qpid::framing::FieldTable::find ( const std::string s)
ValuePtr qpid::framing::FieldTable::get ( const std::string name) const
bool qpid::framing::FieldTable::getArray ( const std::string name,
Array value 
) const
int qpid::framing::FieldTable::getAsInt ( const std::string name) const
int64_t qpid::framing::FieldTable::getAsInt64 ( const std::string name) const
std::string qpid::framing::FieldTable::getAsString ( const std::string name) const
uint64_t qpid::framing::FieldTable::getAsUInt64 ( const std::string name) const
bool qpid::framing::FieldTable::getDouble ( const std::string name,
double &  value 
) const
bool qpid::framing::FieldTable::getFloat ( const std::string name,
float &  value 
) const
bool qpid::framing::FieldTable::getTable ( const std::string name,
FieldTable value 
) const
std::pair<ValueMap::iterator, bool> qpid::framing::FieldTable::insert ( const ValueMap::value_type &  )
ValueMap::iterator qpid::framing::FieldTable::insert ( ValueMap::iterator  ,
const ValueMap::value_type &   
)
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldTable::isSet ( const std::string name) const [inline]

Definition at line 77 of file FieldTable.h.

FieldTable& qpid::framing::FieldTable::operator= ( const FieldTable )
bool qpid::framing::FieldTable::operator== ( const FieldTable other) const
void qpid::framing::FieldTable::set ( const std::string name,
const ValuePtr value 
)
void qpid::framing::FieldTable::setArray ( const std::string name,
const Array value 
)
void qpid::framing::FieldTable::setDouble ( const std::string name,
const double  value 
)
void qpid::framing::FieldTable::setFloat ( const std::string name,
const float  value 
)
void qpid::framing::FieldTable::setInt ( const std::string name,
const int  value 
)
void qpid::framing::FieldTable::setInt64 ( const std::string name,
const int64_t  value 
)
void qpid::framing::FieldTable::setString ( const std::string name,
const std::string value 
)
void qpid::framing::FieldTable::setTable ( const std::string name,
const FieldTable value 
)
void qpid::framing::FieldTable::setTimestamp ( const std::string name,
const uint64_t  value 
)
void qpid::framing::FieldTable::setUInt64 ( const std::string name,
const uint64_t  value 
)
QPID_COMMON_INLINE_EXTERN size_t qpid::framing::FieldTable::size ( ) const [inline]

Definition at line 73 of file FieldTable.h.

Referenced by empty().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream out,
const FieldTable body 
) [friend]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x76.html0000664000076400007640000002024511752725720022575 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- v -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00731.html0000664000076400007640000002412011752725720017311 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Uint64Value Member List
This is the complete list of members for qpid::console::Uint64Value, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Uint64Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Uint64Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
str() const qpid::console::Uint64Value [virtual]
Uint64Value(uint64_t v)qpid::console::Uint64Value [inline]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00670.html0000664000076400007640000001041011752725717017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::RangeSet::iterator Member List
This is the complete list of members for qpid::RangeSet::iterator, including all inherited members.
iterator()qpid::RangeSet::iterator [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00738.html0000664000076400007640000002445511752725720017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::MapValue Member List
This is the complete list of members for qpid::console::MapValue, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::MapValue [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::MapValue [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
MapValue(const framing::FieldTable &v)qpid::console::MapValue [inline]
MapValue(framing::Buffer &buffer)qpid::console::MapValue
Ptr typedefqpid::console::Value
str() const qpid::console::MapValue [virtual]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00773.html0000664000076400007640000002134211752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Unsigned8Value Member List
This is the complete list of members for qpid::framing::Unsigned8Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
Unsigned8Value(uint8_t)qpid::framing::Unsigned8Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00824.html0000664000076400007640000001225211752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Statement Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00710.html0000664000076400007640000002442111752725720017312 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Event Member List
This is the complete list of members for qpid::console::Event, including all inherited members.
attrBool(const std::string &key) const qpid::console::Event
attrDouble(const std::string &key) const qpid::console::Event
attrFloat(const std::string &key) const qpid::console::Event
attrInt(const std::string &key) const qpid::console::Event
attrInt64(const std::string &key) const qpid::console::Event
attrMap(const std::string &key) const qpid::console::Event
attrRef(const std::string &key) const qpid::console::Event
attrString(const std::string &key) const qpid::console::Event
attrUint(const std::string &key) const qpid::console::Event
attrUint64(const std::string &key) const qpid::console::Event
attrUuid(const std::string &key) const qpid::console::Event
Event(Broker *broker, SchemaClass *schemaClass, framing::Buffer &buffer)qpid::console::Event
getAttributes() const qpid::console::Event [inline]
getBroker() const qpid::console::Event [inline]
getClassKey() const qpid::console::Event
getSchema() const qpid::console::Event [inline]
getSeverity() const qpid::console::Event [inline]
getSeverityString() const qpid::console::Event
getTimestamp() const qpid::console::Event [inline]
SEV_ALERT enum valueqpid::console::Event
SEV_CRITICAL enum valueqpid::console::Event
SEV_DEBUG enum valueqpid::console::Event
SEV_EMERGENCY enum valueqpid::console::Event
SEV_ERROR enum valueqpid::console::Event
SEV_INFO enum valueqpid::console::Event
SEV_NOTICE enum valueqpid::console::Event
SEV_WARNING enum valueqpid::console::Event
Severity enum nameqpid::console::Event

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00864.html0000664000076400007640000001362711752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::UnauthorizedAccess Member List
This is the complete list of members for qpid::messaging::UnauthorizedAccess, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
MessagingException(const std::string &msg)qpid::messaging::MessagingException
SessionError(const std::string &)qpid::messaging::SessionError
UnauthorizedAccess(const std::string &)qpid::messaging::UnauthorizedAccess
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00053.html0000664000076400007640000003012711752725717017320 0ustar00jrossjross00000000000000 qpid::CommonOptions Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::CommonOptions Struct Reference

Standard options for configuration. More...

#include <qpid/Options.h>

List of all members.

Public Member Functions

 CommonOptions (const std::string &name=std::string(), const std::string &configfile=std::string())
void parse (int argc, char const *const *argv, const std::string &configfile=std::string(), bool allowUnknown=false)
 Parses options from argc/argv, environment variables and config file.
boost::program_options::options_description_easy_init addOptions ()

Public Attributes

bool help
bool version
std::string config

Detailed Description

Standard options for configuration.


Constructor & Destructor Documentation

qpid::CommonOptions::CommonOptions ( const std::string name = std::string(),
const std::string configfile = std::string() 
)

Member Function Documentation

boost::program_options::options_description_easy_init qpid::Options::addOptions ( ) [inline, inherited]

Definition at line 154 of file Options.h.

void qpid::Options::parse ( int  argc,
char const *const *  argv,
const std::string configfile = std::string(),
bool  allowUnknown = false 
) [inherited]

Parses options from argc/argv, environment variables and config file.

Note the filename argument can reference an options variable that is updated by argc/argv or environment variable parsing.


Member Data Documentation

Definition at line 167 of file Options.h.

Definition at line 168 of file Options.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00276.html0000664000076400007640000005304311752725720017323 0ustar00jrossjross00000000000000 qpid::framing::ReplyTo Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ReplyTo Class Reference

#include <qpid/framing/ReplyTo.h>

List of all members.

Public Member Functions

 ReplyTo (const std::string &_exchange, const std::string &_routingKey)
 ReplyTo ()
void setExchange (const std::string &_exchange)
const std::stringgetExchange () const
bool hasExchange () const
void clearExchangeFlag ()
void setRoutingKey (const std::string &_routingKey)
const std::stringgetRoutingKey () const
bool hasRoutingKey () const
void clearRoutingKeyFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Friends

std::ostreamoperator<< (std::ostream &, const ReplyTo &)

Constructor & Destructor Documentation

qpid::framing::ReplyTo::ReplyTo ( const std::string _exchange,
const std::string _routingKey 
) [inline]

Definition at line 43 of file ReplyTo.h.

qpid::framing::ReplyTo::ReplyTo ( ) [inline]

Definition at line 52 of file ReplyTo.h.


Member Function Documentation

uint32_t qpid::framing::ReplyTo::bodySize ( ) const
void qpid::framing::ReplyTo::clearExchangeFlag ( )
void qpid::framing::ReplyTo::clearRoutingKeyFlag ( )
void qpid::framing::ReplyTo::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::ReplyTo::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::ReplyTo::encode ( Buffer ) const
uint32_t qpid::framing::ReplyTo::encodedSize ( ) const
void qpid::framing::ReplyTo::encodeStructBody ( Buffer ) const
const std::string& qpid::framing::ReplyTo::getExchange ( ) const
const std::string& qpid::framing::ReplyTo::getRoutingKey ( ) const
bool qpid::framing::ReplyTo::hasExchange ( ) const
bool qpid::framing::ReplyTo::hasRoutingKey ( ) const
void qpid::framing::ReplyTo::print ( std::ostream out) const
void qpid::framing::ReplyTo::setExchange ( const std::string _exchange)
void qpid::framing::ReplyTo::setRoutingKey ( const std::string _routingKey)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const ReplyTo  
) [friend]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00779.html0000664000076400007640000002132711752725720017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::UuidValue Member List
This is the complete list of members for qpid::framing::UuidValue, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
UuidValue(const unsigned char *)qpid::framing::UuidValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00794.html0000664000076400007640000001371611752725720017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::IllegalStateException Member List
This is the complete list of members for qpid::framing::IllegalStateException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::IllegalStateException [inline, virtual]
IllegalStateException(const std::string &msg=std::string())qpid::framing::IllegalStateException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00361.html0000664000076400007640000002555411752725717017332 0ustar00jrossjross00000000000000 qpid::TransportFailure Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::TransportFailure Struct Reference

Exception representing transport failure. More...

#include <qpid/Exception.h>

List of all members.

Public Member Functions

 TransportFailure (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Detailed Description

Exception representing transport failure.


Constructor & Destructor Documentation

qpid::TransportFailure::TransportFailure ( const std::string msg = std::string()) [inline]

Definition at line 86 of file Exception.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x73.html0000664000076400007640000002677211752725720023614 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- s -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00164.html0000664000076400007640000002003011752725720017305 0ustar00jrossjross00000000000000 qpid::messaging::InvalidOptionString Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::InvalidOptionString Struct Reference

Thrown when the syntax of the option string used to configure a connection in not valid. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 InvalidOptionString (const std::string &msg)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown when the syntax of the option string used to configure a connection in not valid.


Constructor & Destructor Documentation

qpid::messaging::InvalidOptionString::InvalidOptionString ( const std::string msg)

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00828.html0000664000076400007640000001156511752725720017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ManagementAgent::Singleton Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00714.html0000664000076400007640000001751711752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::ObjectId Member List
This is the complete list of members for qpid::console::ObjectId, including all inherited members.
decode(framing::Buffer &buffer)qpid::console::ObjectId
encode(framing::Buffer &buffer)qpid::console::ObjectId
getAgentBank() const qpid::console::ObjectId [inline]
getBrokerBank() const qpid::console::ObjectId [inline]
getFlags() const qpid::console::ObjectId [inline]
getObject() const qpid::console::ObjectId [inline]
getSequence() const qpid::console::ObjectId [inline]
isDurable() const qpid::console::ObjectId [inline]
ObjectId()qpid::console::ObjectId [inline]
ObjectId(framing::Buffer &buffer)qpid::console::ObjectId
operator!=(const ObjectId &other) const qpid::console::ObjectId
operator<(const ObjectId &other) const qpid::console::ObjectId
operator<=(const ObjectId &other) const qpid::console::ObjectId
operator==(const ObjectId &other) const qpid::console::ObjectId
operator>(const ObjectId &other) const qpid::console::ObjectId
operator>=(const ObjectId &other) const qpid::console::ObjectId
setValue(uint64_t f, uint64_t s)qpid::console::ObjectId [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00342.html0000664000076400007640000006142011752725720017313 0ustar00jrossjross00000000000000 qpid::framing::Str16Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Str16Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Str16Value (const std::string &v)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Str16Value::Str16Value ( const std::string v)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_rela.html0000664000076400007640000001754711752725717021536 0ustar00jrossjross00000000000000 Class Members - Related Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00421_source.html0000664000076400007640000002402411752725717020676 0ustar00jrossjross00000000000000 qmf/engine/Object.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Object.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineObject_
00002 #define _QmfEngineObject_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <qmf/engine/Schema.h>
00024 #include <qmf/engine/ObjectId.h>
00025 #include <qmf/engine/Value.h>
00026 
00027 namespace qmf {
00028 namespace engine {
00029 
00030     struct ObjectImpl;
00031     class Object {
00032     public:
00033         Object(const SchemaObjectClass* type);
00034         Object(const Object& from);
00035         virtual ~Object();
00036 
00037         void destroy();
00038         const ObjectId* getObjectId() const;
00039         void setObjectId(ObjectId* oid);
00040         const SchemaObjectClass* getClass() const;
00041         Value* getValue(const char* key) const;
00042         void invokeMethod(const char* methodName, const Value* inArgs, void* context) const;
00043         bool isDeleted() const;
00044         void merge(const Object& from);
00045 
00046     private:
00047         friend struct ObjectImpl;
00048         friend class  AgentImpl;
00049         Object(ObjectImpl* impl);
00050         ObjectImpl* impl;
00051     };
00052 }
00053 }
00054 
00055 #endif
00056 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00463.html0000664000076400007640000001230511752725717017323 0ustar00jrossjross00000000000000 qpid/messaging/Connection.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Connection.h File Reference
#include "qpid/messaging/ImportExport.h"
#include "qpid/messaging/Handle.h"
#include "qpid/messaging/exceptions.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

class  qpid::messaging::Connection
 A connection represents a network connection to a remote endpoint. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00810.html0000664000076400007640000001555411752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::SequenceNumber Member List
This is the complete list of members for qpid::framing::SequenceNumber, including all inherited members.
decode(Buffer &buffer)qpid::framing::SequenceNumber
encode(Buffer &buffer) const qpid::framing::SequenceNumber
encodedSize() const qpid::framing::SequenceNumber
getValue() const qpid::framing::SequenceNumber [inline]
operator uint32_t() const qpid::framing::SequenceNumber [inline]
operator++()qpid::framing::SequenceNumber [inline]
operator-(const SequenceNumber &a, const SequenceNumber &b)qpid::framing::SequenceNumber [friend]
operator--()qpid::framing::SequenceNumber [inline]
operator<(const SequenceNumber &other) const qpid::framing::SequenceNumber [inline]
operator==(const SequenceNumber &other) const qpid::framing::SequenceNumber [inline]
SequenceNumber(uint32_t v=0)qpid::framing::SequenceNumber [inline]
serialize(S &s)qpid::framing::SequenceNumber [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00555.html0000664000076400007640000000717711752725717017340 0ustar00jrossjross00000000000000 qpid/sys/posix/IntegerTypes.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/IntegerTypes.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00447_source.html0000664000076400007640000003205311752725717020707 0ustar00jrossjross00000000000000 qmf/SchemaProperty.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/SchemaProperty.h
Go to the documentation of this file.
00001 #ifndef QMF_SCHEMA_PROPERTY_H
00002 #define QMF_SCHEMA_PROPERTY_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qpid/types/Uuid.h"
00027 #include "qpid/types/Variant.h"
00028 #include "qmf/SchemaTypes.h"
00029 #include <string>
00030 
00031 namespace qmf {
00032 
00033 #ifndef SWIG
00034     template <class> class PrivateImplRef;
00035 #endif
00036 
00037     class SchemaPropertyImpl;
00038 
00039     class QMF_CLASS_EXTERN SchemaProperty : public Handle<SchemaPropertyImpl> {
00040     public:
00041         QMF_EXTERN SchemaProperty(SchemaPropertyImpl* impl = 0);
00042         QMF_EXTERN SchemaProperty(const SchemaProperty&);
00043         QMF_EXTERN SchemaProperty& operator=(const SchemaProperty&);
00044         QMF_EXTERN ~SchemaProperty();
00045 
00046         QMF_EXTERN SchemaProperty(const std::string&, int, const std::string& o="");
00047 
00048         QMF_EXTERN void setAccess(int);
00049         QMF_EXTERN void setIndex(bool);
00050         QMF_EXTERN void setOptional(bool);
00051         QMF_EXTERN void setUnit(const std::string&);
00052         QMF_EXTERN void setDesc(const std::string&);
00053         QMF_EXTERN void setSubtype(const std::string&);
00054         QMF_EXTERN void setDirection(int);
00055 
00056         QMF_EXTERN const std::string& getName() const;
00057         QMF_EXTERN int getType() const;
00058         QMF_EXTERN int getAccess() const;
00059         QMF_EXTERN bool isIndex() const;
00060         QMF_EXTERN bool isOptional() const;
00061         QMF_EXTERN const std::string& getUnit() const;
00062         QMF_EXTERN const std::string& getDesc() const;
00063         QMF_EXTERN const std::string& getSubtype() const;
00064         QMF_EXTERN int getDirection() const;
00065 
00066 #ifndef SWIG
00067     private:
00068         friend class qmf::PrivateImplRef<SchemaProperty>;
00069         friend struct SchemaPropertyImplAccess;
00070 #endif
00071     };
00072 
00073 }
00074 
00075 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x6b.html0000664000076400007640000001726211752725717021364 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00303.html0000664000076400007640000002216311752725720017311 0ustar00jrossjross00000000000000 qpid::console::SchemaMethod Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaMethod Struct Reference

#include <qpid/console/Schema.h>

List of all members.

Public Member Functions

 SchemaMethod (framing::Buffer &buffer)
 ~SchemaMethod ()

Public Attributes

std::string name
std::string desc
std::vector< SchemaArgument * > arguments

Constructor & Destructor Documentation

qpid::console::SchemaMethod::SchemaMethod ( framing::Buffer buffer)
qpid::console::SchemaMethod::~SchemaMethod ( )

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x69.html0000664000076400007640000004420411752725717022322 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- i -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00096.html0000664000076400007640000015120211752725720017317 0ustar00jrossjross00000000000000 qpid::framing::DeliveryProperties Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::DeliveryProperties Class Reference

#include <qpid/framing/DeliveryProperties.h>

List of all members.

Public Member Functions

 DeliveryProperties (bool _discardUnroutable, bool _immediate, bool _redelivered, uint8_t _priority, uint8_t _deliveryMode, uint64_t _ttl, uint64_t _timestamp, uint64_t _expiration, const std::string &_exchange, const std::string &_routingKey, const std::string &_resumeId, uint64_t _resumeTtl)
 DeliveryProperties ()
void setDiscardUnroutable (bool _discardUnroutable)
bool getDiscardUnroutable () const
void setImmediate (bool _immediate)
bool getImmediate () const
void setRedelivered (bool _redelivered)
bool getRedelivered () const
void setPriority (uint8_t _priority)
uint8_t getPriority () const
bool hasPriority () const
void clearPriorityFlag ()
void setDeliveryMode (uint8_t _deliveryMode)
uint8_t getDeliveryMode () const
bool hasDeliveryMode () const
void clearDeliveryModeFlag ()
void setTtl (uint64_t _ttl)
uint64_t getTtl () const
bool hasTtl () const
void clearTtlFlag ()
void setTimestamp (uint64_t _timestamp)
uint64_t getTimestamp () const
bool hasTimestamp () const
void clearTimestampFlag ()
void setExpiration (uint64_t _expiration)
uint64_t getExpiration () const
bool hasExpiration () const
void clearExpirationFlag ()
void setExchange (const std::string &_exchange)
const std::stringgetExchange () const
bool hasExchange () const
void clearExchangeFlag ()
void setRoutingKey (const std::string &_routingKey)
const std::stringgetRoutingKey () const
bool hasRoutingKey () const
void clearRoutingKeyFlag ()
void setResumeId (const std::string &_resumeId)
const std::stringgetResumeId () const
bool hasResumeId () const
void clearResumeIdFlag ()
void setResumeTtl (uint64_t _resumeTtl)
uint64_t getResumeTtl () const
bool hasResumeTtl () const
void clearResumeTtlFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1025

Friends

std::ostreamoperator<< (std::ostream &, const DeliveryProperties &)

Constructor & Destructor Documentation

qpid::framing::DeliveryProperties::DeliveryProperties ( bool  _discardUnroutable,
bool  _immediate,
bool  _redelivered,
uint8_t  _priority,
uint8_t  _deliveryMode,
uint64_t  _ttl,
uint64_t  _timestamp,
uint64_t  _expiration,
const std::string _exchange,
const std::string _routingKey,
const std::string _resumeId,
uint64_t  _resumeTtl 
) [inline]

Definition at line 51 of file DeliveryProperties.h.

qpid::framing::DeliveryProperties::DeliveryProperties ( ) [inline]

Definition at line 87 of file DeliveryProperties.h.


Member Function Documentation

uint32_t qpid::framing::DeliveryProperties::bodySize ( ) const
void qpid::framing::DeliveryProperties::clearDeliveryModeFlag ( )
void qpid::framing::DeliveryProperties::clearExchangeFlag ( )
void qpid::framing::DeliveryProperties::clearExpirationFlag ( )
void qpid::framing::DeliveryProperties::clearPriorityFlag ( )
void qpid::framing::DeliveryProperties::clearResumeIdFlag ( )
void qpid::framing::DeliveryProperties::clearResumeTtlFlag ( )
void qpid::framing::DeliveryProperties::clearRoutingKeyFlag ( )
void qpid::framing::DeliveryProperties::clearTimestampFlag ( )
void qpid::framing::DeliveryProperties::clearTtlFlag ( )
void qpid::framing::DeliveryProperties::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::DeliveryProperties::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::DeliveryProperties::encode ( Buffer ) const
uint32_t qpid::framing::DeliveryProperties::encodedSize ( ) const
void qpid::framing::DeliveryProperties::encodeStructBody ( Buffer ) const
uint8_t qpid::framing::DeliveryProperties::getDeliveryMode ( ) const
bool qpid::framing::DeliveryProperties::getDiscardUnroutable ( ) const
const std::string& qpid::framing::DeliveryProperties::getExchange ( ) const
uint64_t qpid::framing::DeliveryProperties::getExpiration ( ) const
bool qpid::framing::DeliveryProperties::getImmediate ( ) const
uint8_t qpid::framing::DeliveryProperties::getPriority ( ) const
bool qpid::framing::DeliveryProperties::getRedelivered ( ) const
const std::string& qpid::framing::DeliveryProperties::getResumeId ( ) const
uint64_t qpid::framing::DeliveryProperties::getResumeTtl ( ) const
const std::string& qpid::framing::DeliveryProperties::getRoutingKey ( ) const
uint64_t qpid::framing::DeliveryProperties::getTimestamp ( ) const
uint64_t qpid::framing::DeliveryProperties::getTtl ( ) const
bool qpid::framing::DeliveryProperties::hasDeliveryMode ( ) const
bool qpid::framing::DeliveryProperties::hasExchange ( ) const
bool qpid::framing::DeliveryProperties::hasExpiration ( ) const
bool qpid::framing::DeliveryProperties::hasPriority ( ) const
bool qpid::framing::DeliveryProperties::hasResumeId ( ) const
bool qpid::framing::DeliveryProperties::hasResumeTtl ( ) const
bool qpid::framing::DeliveryProperties::hasRoutingKey ( ) const
bool qpid::framing::DeliveryProperties::hasTimestamp ( ) const
bool qpid::framing::DeliveryProperties::hasTtl ( ) const
void qpid::framing::DeliveryProperties::print ( std::ostream out) const
void qpid::framing::DeliveryProperties::setDeliveryMode ( uint8_t  _deliveryMode)
void qpid::framing::DeliveryProperties::setDiscardUnroutable ( bool  _discardUnroutable)
void qpid::framing::DeliveryProperties::setExchange ( const std::string _exchange)
void qpid::framing::DeliveryProperties::setExpiration ( uint64_t  _expiration)
void qpid::framing::DeliveryProperties::setImmediate ( bool  _immediate)
void qpid::framing::DeliveryProperties::setPriority ( uint8_t  _priority)
void qpid::framing::DeliveryProperties::setRedelivered ( bool  _redelivered)
void qpid::framing::DeliveryProperties::setResumeId ( const std::string _resumeId)
void qpid::framing::DeliveryProperties::setResumeTtl ( uint64_t  _resumeTtl)
void qpid::framing::DeliveryProperties::setRoutingKey ( const std::string _routingKey)
void qpid::framing::DeliveryProperties::setTimestamp ( uint64_t  _timestamp)
void qpid::framing::DeliveryProperties::setTtl ( uint64_t  _ttl)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const DeliveryProperties  
) [friend]

Member Data Documentation

Definition at line 50 of file DeliveryProperties.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00458_source.html0000664000076400007640000021056711752725717020721 0ustar00jrossjross00000000000000 qpid/client/AsyncSession_0_10.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/AsyncSession_0_10.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_ASYNCSESSION_0_10_H
00002 #define QPID_CLIENT_ASYNCSESSION_0_10_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/client/no_keyword/AsyncSession_0_10.h"
00031 #include "qpid/client/arg.h"
00032 #include "qpid/client/ClientImportExport.h"
00033 
00034 namespace qpid {
00035 namespace client {
00036 
00189 class AsyncSession_0_10:
00190     public no_keyword::AsyncSession_0_10
00191 {
00192   public:
00193     
00194     QPID_CLIENT_EXTERN AsyncSession_0_10();
00195     QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10(const SessionBase_0_10& other);
00196     QPID_CLIENT_INLINE_EXTERN AsyncSession_0_10& operator=(const SessionBase_0_10& other);
00197   private:
00198     typedef boost::parameter::parameters<arg::keyword_tags::sync> ExecutionSyncParameters;
00199     
00200     typedef boost::parameter::parameters<arg::keyword_tags::commandId,arg::keyword_tags::value,arg::keyword_tags::sync> ExecutionResultParameters;
00201     
00202     typedef boost::parameter::parameters<arg::keyword_tags::errorCode,arg::keyword_tags::commandId,arg::keyword_tags::classCode,arg::keyword_tags::commandCode,arg::keyword_tags::fieldIndex,arg::keyword_tags::description,arg::keyword_tags::errorInfo,arg::keyword_tags::sync> ExecutionExceptionParameters;
00203     
00204     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::acceptMode,arg::keyword_tags::acquireMode,arg::keyword_tags::content,arg::keyword_tags::sync> MessageTransferParameters;
00205     
00206     typedef boost::parameter::parameters<arg::keyword_tags::transfers,arg::keyword_tags::sync> MessageAcceptParameters;
00207     
00208     typedef boost::parameter::parameters<arg::keyword_tags::transfers,arg::keyword_tags::code,arg::keyword_tags::text,arg::keyword_tags::sync> MessageRejectParameters;
00209     
00210     typedef boost::parameter::parameters<arg::keyword_tags::transfers,arg::keyword_tags::setRedelivered,arg::keyword_tags::sync> MessageReleaseParameters;
00211     
00212     typedef boost::parameter::parameters<arg::keyword_tags::transfers,arg::keyword_tags::sync> MessageAcquireParameters;
00213     
00214     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::resumeId,arg::keyword_tags::sync> MessageResumeParameters;
00215     
00216     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::destination,arg::keyword_tags::acceptMode,arg::keyword_tags::acquireMode,arg::keyword_tags::exclusive,arg::keyword_tags::resumeId,arg::keyword_tags::resumeTtl,arg::keyword_tags::arguments,arg::keyword_tags::sync> MessageSubscribeParameters;
00217     
00218     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::sync> MessageCancelParameters;
00219     
00220     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::flowMode,arg::keyword_tags::sync> MessageSetFlowModeParameters;
00221     
00222     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::unit,arg::keyword_tags::value,arg::keyword_tags::sync> MessageFlowParameters;
00223     
00224     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::sync> MessageFlushParameters;
00225     
00226     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::sync> MessageStopParameters;
00227     
00228     typedef boost::parameter::parameters<arg::keyword_tags::sync> TxSelectParameters;
00229     
00230     typedef boost::parameter::parameters<arg::keyword_tags::sync> TxCommitParameters;
00231     
00232     typedef boost::parameter::parameters<arg::keyword_tags::sync> TxRollbackParameters;
00233     
00234     typedef boost::parameter::parameters<arg::keyword_tags::sync> DtxSelectParameters;
00235     
00236     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::join,arg::keyword_tags::resume,arg::keyword_tags::sync> DtxStartParameters;
00237     
00238     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::fail,arg::keyword_tags::suspend,arg::keyword_tags::sync> DtxEndParameters;
00239     
00240     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::onePhase,arg::keyword_tags::sync> DtxCommitParameters;
00241     
00242     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::sync> DtxForgetParameters;
00243     
00244     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::sync> DtxGetTimeoutParameters;
00245     
00246     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::sync> DtxPrepareParameters;
00247     
00248     typedef boost::parameter::parameters<arg::keyword_tags::sync> DtxRecoverParameters;
00249     
00250     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::sync> DtxRollbackParameters;
00251     
00252     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::timeout,arg::keyword_tags::sync> DtxSetTimeoutParameters;
00253     
00254     typedef boost::parameter::parameters<arg::keyword_tags::exchange,arg::keyword_tags::type,arg::keyword_tags::alternateExchange,arg::keyword_tags::passive,arg::keyword_tags::durable,arg::keyword_tags::autoDelete,arg::keyword_tags::arguments,arg::keyword_tags::sync> ExchangeDeclareParameters;
00255     
00256     typedef boost::parameter::parameters<arg::keyword_tags::exchange,arg::keyword_tags::ifUnused,arg::keyword_tags::sync> ExchangeDeleteParameters;
00257     
00258     typedef boost::parameter::parameters<arg::keyword_tags::name,arg::keyword_tags::sync> ExchangeQueryParameters;
00259     
00260     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::exchange,arg::keyword_tags::bindingKey,arg::keyword_tags::arguments,arg::keyword_tags::sync> ExchangeBindParameters;
00261     
00262     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::exchange,arg::keyword_tags::bindingKey,arg::keyword_tags::sync> ExchangeUnbindParameters;
00263     
00264     typedef boost::parameter::parameters<arg::keyword_tags::exchange,arg::keyword_tags::queue,arg::keyword_tags::bindingKey,arg::keyword_tags::arguments,arg::keyword_tags::sync> ExchangeBoundParameters;
00265     
00266     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::alternateExchange,arg::keyword_tags::passive,arg::keyword_tags::durable,arg::keyword_tags::exclusive,arg::keyword_tags::autoDelete,arg::keyword_tags::arguments,arg::keyword_tags::sync> QueueDeclareParameters;
00267     
00268     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::ifUnused,arg::keyword_tags::ifEmpty,arg::keyword_tags::sync> QueueDeleteParameters;
00269     
00270     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::sync> QueuePurgeParameters;
00271     
00272     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::sync> QueueQueryParameters;
00273     
00274     friend class Connection;
00275   public:
00276     BOOST_PARAMETER_MEMFUN(Completion, executionSync, 0, 1, ExecutionSyncParameters) {
00277         return no_keyword::AsyncSession_0_10::executionSync(
00278             p[arg::sync|false]);
00279     }
00280     
00281     BOOST_PARAMETER_MEMFUN(Completion, executionResult, 0, 3, ExecutionResultParameters) {
00282         return no_keyword::AsyncSession_0_10::executionResult(
00283             p[arg::commandId|SequenceNumber()],
00284             p[arg::value|std::string()],
00285             p[arg::sync|false]);
00286     }
00287     
00288     BOOST_PARAMETER_MEMFUN(Completion, executionException, 0, 8, ExecutionExceptionParameters) {
00289         return no_keyword::AsyncSession_0_10::executionException(
00290             p[arg::errorCode|0],
00291             p[arg::commandId|SequenceNumber()],
00292             p[arg::classCode|0],
00293             p[arg::commandCode|0],
00294             p[arg::fieldIndex|0],
00295             p[arg::description|std::string()],
00296             p[arg::errorInfo|FieldTable()],
00297             p[arg::sync|false]);
00298     }
00299     
00300     BOOST_PARAMETER_MEMFUN(Completion, messageTransfer, 0, 5, MessageTransferParameters) {
00301         return no_keyword::AsyncSession_0_10::messageTransfer(
00302             p[arg::destination|std::string()],
00303             p[arg::acceptMode|1],
00304             p[arg::acquireMode|0],
00305             p[arg::content|Message(std::string())],
00306             p[arg::sync|false]);
00307     }
00308     
00309     BOOST_PARAMETER_MEMFUN(Completion, messageAccept, 0, 2, MessageAcceptParameters) {
00310         return no_keyword::AsyncSession_0_10::messageAccept(
00311             p[arg::transfers|SequenceSet()],
00312             p[arg::sync|false]);
00313     }
00314     
00315     BOOST_PARAMETER_MEMFUN(Completion, messageReject, 0, 4, MessageRejectParameters) {
00316         return no_keyword::AsyncSession_0_10::messageReject(
00317             p[arg::transfers|SequenceSet()],
00318             p[arg::code|0],
00319             p[arg::text|std::string()],
00320             p[arg::sync|false]);
00321     }
00322     
00323     BOOST_PARAMETER_MEMFUN(Completion, messageRelease, 0, 3, MessageReleaseParameters) {
00324         return no_keyword::AsyncSession_0_10::messageRelease(
00325             p[arg::transfers|SequenceSet()],
00326             p[arg::setRedelivered|false],
00327             p[arg::sync|false]);
00328     }
00329     
00330     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::MessageAcquireResult>, messageAcquire, 0, 2, MessageAcquireParameters) {
00331         return no_keyword::AsyncSession_0_10::messageAcquire(
00332             p[arg::transfers|SequenceSet()],
00333             p[arg::sync|false]);
00334     }
00335     
00336     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::MessageResumeResult>, messageResume, 0, 3, MessageResumeParameters) {
00337         return no_keyword::AsyncSession_0_10::messageResume(
00338             p[arg::destination|std::string()],
00339             p[arg::resumeId|std::string()],
00340             p[arg::sync|false]);
00341     }
00342     
00343     BOOST_PARAMETER_MEMFUN(Completion, messageSubscribe, 0, 9, MessageSubscribeParameters) {
00344         return no_keyword::AsyncSession_0_10::messageSubscribe(
00345             p[arg::queue|std::string()],
00346             p[arg::destination|std::string()],
00347             p[arg::acceptMode|0],
00348             p[arg::acquireMode|0],
00349             p[arg::exclusive|false],
00350             p[arg::resumeId|std::string()],
00351             p[arg::resumeTtl|0],
00352             p[arg::arguments|FieldTable()],
00353             p[arg::sync|false]);
00354     }
00355     
00356     BOOST_PARAMETER_MEMFUN(Completion, messageCancel, 0, 2, MessageCancelParameters) {
00357         return no_keyword::AsyncSession_0_10::messageCancel(
00358             p[arg::destination|std::string()],
00359             p[arg::sync|false]);
00360     }
00361     
00362     BOOST_PARAMETER_MEMFUN(Completion, messageSetFlowMode, 0, 3, MessageSetFlowModeParameters) {
00363         return no_keyword::AsyncSession_0_10::messageSetFlowMode(
00364             p[arg::destination|std::string()],
00365             p[arg::flowMode|0],
00366             p[arg::sync|false]);
00367     }
00368     
00369     BOOST_PARAMETER_MEMFUN(Completion, messageFlow, 0, 4, MessageFlowParameters) {
00370         return no_keyword::AsyncSession_0_10::messageFlow(
00371             p[arg::destination|std::string()],
00372             p[arg::unit|0],
00373             p[arg::value|0],
00374             p[arg::sync|false]);
00375     }
00376     
00377     BOOST_PARAMETER_MEMFUN(Completion, messageFlush, 0, 2, MessageFlushParameters) {
00378         return no_keyword::AsyncSession_0_10::messageFlush(
00379             p[arg::destination|std::string()],
00380             p[arg::sync|false]);
00381     }
00382     
00383     BOOST_PARAMETER_MEMFUN(Completion, messageStop, 0, 2, MessageStopParameters) {
00384         return no_keyword::AsyncSession_0_10::messageStop(
00385             p[arg::destination|std::string()],
00386             p[arg::sync|false]);
00387     }
00388     
00389     BOOST_PARAMETER_MEMFUN(Completion, txSelect, 0, 1, TxSelectParameters) {
00390         return no_keyword::AsyncSession_0_10::txSelect(
00391             p[arg::sync|false]);
00392     }
00393     
00394     BOOST_PARAMETER_MEMFUN(Completion, txCommit, 0, 1, TxCommitParameters) {
00395         return no_keyword::AsyncSession_0_10::txCommit(
00396             p[arg::sync|false]);
00397     }
00398     
00399     BOOST_PARAMETER_MEMFUN(Completion, txRollback, 0, 1, TxRollbackParameters) {
00400         return no_keyword::AsyncSession_0_10::txRollback(
00401             p[arg::sync|false]);
00402     }
00403     
00404     BOOST_PARAMETER_MEMFUN(Completion, dtxSelect, 0, 1, DtxSelectParameters) {
00405         return no_keyword::AsyncSession_0_10::dtxSelect(
00406             p[arg::sync|false]);
00407     }
00408     
00409     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::XaResult>, dtxStart, 0, 4, DtxStartParameters) {
00410         return no_keyword::AsyncSession_0_10::dtxStart(
00411             p[arg::xid|Xid()],
00412             p[arg::join|false],
00413             p[arg::resume|false],
00414             p[arg::sync|false]);
00415     }
00416     
00417     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::XaResult>, dtxEnd, 0, 4, DtxEndParameters) {
00418         return no_keyword::AsyncSession_0_10::dtxEnd(
00419             p[arg::xid|Xid()],
00420             p[arg::fail|false],
00421             p[arg::suspend|false],
00422             p[arg::sync|false]);
00423     }
00424     
00425     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::XaResult>, dtxCommit, 0, 3, DtxCommitParameters) {
00426         return no_keyword::AsyncSession_0_10::dtxCommit(
00427             p[arg::xid|Xid()],
00428             p[arg::onePhase|false],
00429             p[arg::sync|false]);
00430     }
00431     
00432     BOOST_PARAMETER_MEMFUN(Completion, dtxForget, 0, 2, DtxForgetParameters) {
00433         return no_keyword::AsyncSession_0_10::dtxForget(
00434             p[arg::xid|Xid()],
00435             p[arg::sync|false]);
00436     }
00437     
00438     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::DtxGetTimeoutResult>, dtxGetTimeout, 0, 2, DtxGetTimeoutParameters) {
00439         return no_keyword::AsyncSession_0_10::dtxGetTimeout(
00440             p[arg::xid|Xid()],
00441             p[arg::sync|false]);
00442     }
00443     
00444     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::XaResult>, dtxPrepare, 0, 2, DtxPrepareParameters) {
00445         return no_keyword::AsyncSession_0_10::dtxPrepare(
00446             p[arg::xid|Xid()],
00447             p[arg::sync|false]);
00448     }
00449     
00450     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::DtxRecoverResult>, dtxRecover, 0, 1, DtxRecoverParameters) {
00451         return no_keyword::AsyncSession_0_10::dtxRecover(
00452             p[arg::sync|false]);
00453     }
00454     
00455     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::XaResult>, dtxRollback, 0, 2, DtxRollbackParameters) {
00456         return no_keyword::AsyncSession_0_10::dtxRollback(
00457             p[arg::xid|Xid()],
00458             p[arg::sync|false]);
00459     }
00460     
00461     BOOST_PARAMETER_MEMFUN(Completion, dtxSetTimeout, 0, 3, DtxSetTimeoutParameters) {
00462         return no_keyword::AsyncSession_0_10::dtxSetTimeout(
00463             p[arg::xid|Xid()],
00464             p[arg::timeout|0],
00465             p[arg::sync|false]);
00466     }
00467     
00468     BOOST_PARAMETER_MEMFUN(Completion, exchangeDeclare, 0, 8, ExchangeDeclareParameters) {
00469         return no_keyword::AsyncSession_0_10::exchangeDeclare(
00470             p[arg::exchange|std::string()],
00471             p[arg::type|std::string()],
00472             p[arg::alternateExchange|std::string()],
00473             p[arg::passive|false],
00474             p[arg::durable|false],
00475             p[arg::autoDelete|false],
00476             p[arg::arguments|FieldTable()],
00477             p[arg::sync|false]);
00478     }
00479     
00480     BOOST_PARAMETER_MEMFUN(Completion, exchangeDelete, 0, 3, ExchangeDeleteParameters) {
00481         return no_keyword::AsyncSession_0_10::exchangeDelete(
00482             p[arg::exchange|std::string()],
00483             p[arg::ifUnused|false],
00484             p[arg::sync|false]);
00485     }
00486     
00487     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::ExchangeQueryResult>, exchangeQuery, 0, 2, ExchangeQueryParameters) {
00488         return no_keyword::AsyncSession_0_10::exchangeQuery(
00489             p[arg::name|std::string()],
00490             p[arg::sync|false]);
00491     }
00492     
00493     BOOST_PARAMETER_MEMFUN(Completion, exchangeBind, 0, 5, ExchangeBindParameters) {
00494         return no_keyword::AsyncSession_0_10::exchangeBind(
00495             p[arg::queue|std::string()],
00496             p[arg::exchange|std::string()],
00497             p[arg::bindingKey|std::string()],
00498             p[arg::arguments|FieldTable()],
00499             p[arg::sync|false]);
00500     }
00501     
00502     BOOST_PARAMETER_MEMFUN(Completion, exchangeUnbind, 0, 4, ExchangeUnbindParameters) {
00503         return no_keyword::AsyncSession_0_10::exchangeUnbind(
00504             p[arg::queue|std::string()],
00505             p[arg::exchange|std::string()],
00506             p[arg::bindingKey|std::string()],
00507             p[arg::sync|false]);
00508     }
00509     
00510     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::ExchangeBoundResult>, exchangeBound, 0, 5, ExchangeBoundParameters) {
00511         return no_keyword::AsyncSession_0_10::exchangeBound(
00512             p[arg::exchange|std::string()],
00513             p[arg::queue|std::string()],
00514             p[arg::bindingKey|std::string()],
00515             p[arg::arguments|FieldTable()],
00516             p[arg::sync|false]);
00517     }
00518     
00519     BOOST_PARAMETER_MEMFUN(Completion, queueDeclare, 0, 8, QueueDeclareParameters) {
00520         return no_keyword::AsyncSession_0_10::queueDeclare(
00521             p[arg::queue|std::string()],
00522             p[arg::alternateExchange|std::string()],
00523             p[arg::passive|false],
00524             p[arg::durable|false],
00525             p[arg::exclusive|false],
00526             p[arg::autoDelete|false],
00527             p[arg::arguments|FieldTable()],
00528             p[arg::sync|false]);
00529     }
00530     
00531     BOOST_PARAMETER_MEMFUN(Completion, queueDelete, 0, 4, QueueDeleteParameters) {
00532         return no_keyword::AsyncSession_0_10::queueDelete(
00533             p[arg::queue|std::string()],
00534             p[arg::ifUnused|false],
00535             p[arg::ifEmpty|false],
00536             p[arg::sync|false]);
00537     }
00538     
00539     BOOST_PARAMETER_MEMFUN(Completion, queuePurge, 0, 2, QueuePurgeParameters) {
00540         return no_keyword::AsyncSession_0_10::queuePurge(
00541             p[arg::queue|std::string()],
00542             p[arg::sync|false]);
00543     }
00544     
00545     BOOST_PARAMETER_MEMFUN(TypedResult<qpid::framing::QueueQueryResult>, queueQuery, 0, 2, QueueQueryParameters) {
00546         return no_keyword::AsyncSession_0_10::queueQuery(
00547             p[arg::queue|std::string()],
00548             p[arg::sync|false]);
00549     }
00550     
00551 };
00553 inline AsyncSession_0_10 async(const SessionBase_0_10& other) { return (other); }
00554 
00555 inline AsyncSession_0_10::AsyncSession_0_10() {}
00556 inline AsyncSession_0_10::AsyncSession_0_10(const SessionBase_0_10& other) {
00557     *this = other;
00558 }
00559 inline AsyncSession_0_10& AsyncSession_0_10::operator=(const SessionBase_0_10& other) {
00560     impl = static_cast<const AsyncSession_0_10&>(other).impl;
00561     return *this;
00562 }
00563 
00564 }} // namespace qpid::client
00565 
00566 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00837.html0000664000076400007640000002573211752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ObjectId Member List
This is the complete list of members for qpid::management::ObjectId, including all inherited members.
agentqpid::management::ObjectId [protected]
agentEpochqpid::management::ObjectId [protected]
agentNameqpid::management::ObjectId [protected]
decode(const std::string &buffer)qpid::management::ObjectId
encode(std::string &buffer) const qpid::management::ObjectId
encodedSize() const qpid::management::ObjectId [inline]
equalV1(const ObjectId &other) const qpid::management::ObjectId
firstqpid::management::ObjectId [protected]
fromString(const std::string &)qpid::management::ObjectId [protected]
getAgentName() const qpid::management::ObjectId [inline]
getV2Key() const qpid::management::ObjectId [inline]
mapDecode(const types::Variant::Map &map)qpid::management::ObjectId
mapEncode(types::Variant::Map &map) const qpid::management::ObjectId
ObjectId()qpid::management::ObjectId [inline]
ObjectId(const types::Variant &map)qpid::management::ObjectId [inline]
ObjectId(uint8_t flags, uint16_t seq, uint32_t broker)qpid::management::ObjectId
ObjectId(AgentAttachment *_agent, uint8_t flags, uint16_t seq)qpid::management::ObjectId
ObjectId(std::istream &)qpid::management::ObjectId
ObjectId(const std::string &)qpid::management::ObjectId
ObjectId(const std::string &agentAddress, const std::string &key, uint64_t epoch=0)qpid::management::ObjectId [inline]
ObjectId(uint8_t flags, uint16_t seq, uint32_t broker, uint64_t object)qpid::management::ObjectId
operator types::Variant::Map() const qpid::management::ObjectId
operator<(const ObjectId &other) const qpid::management::ObjectId
operator<<(std::ostream &, const ObjectId &)qpid::management::ObjectId [friend]
operator==(const ObjectId &other) const qpid::management::ObjectId
secondqpid::management::ObjectId [protected]
setAgentName(const std::string &_name)qpid::management::ObjectId [inline]
setV2Key(const std::string &_key)qpid::management::ObjectId [inline]
setV2Key(const ManagementObject &object)qpid::management::ObjectId
v2Keyqpid::management::ObjectId [protected]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00237.html0000664000076400007640000011400211752725720017311 0ustar00jrossjross00000000000000 qpid::management::ObjectId Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ObjectId Class Reference

#include <qpid/management/ManagementObject.h>

List of all members.

Public Member Functions

QPID_COMMON_INLINE_EXTERN ObjectId ()
QPID_COMMON_INLINE_EXTERN ObjectId (const types::Variant &map)
 ObjectId (uint8_t flags, uint16_t seq, uint32_t broker)
 ObjectId (AgentAttachment *_agent, uint8_t flags, uint16_t seq)
 ObjectId (std::istream &)
 ObjectId (const std::string &)
QPID_COMMON_INLINE_EXTERN ObjectId (const std::string &agentAddress, const std::string &key, uint64_t epoch=0)
 ObjectId (uint8_t flags, uint16_t seq, uint32_t broker, uint64_t object)
bool operator== (const ObjectId &other) const
bool operator< (const ObjectId &other) const
void mapEncode (types::Variant::Map &map) const
void mapDecode (const types::Variant::Map &map)
 operator types::Variant::Map () const
QPID_COMMON_INLINE_EXTERN uint32_t encodedSize () const
void encode (std::string &buffer) const
void decode (const std::string &buffer)
bool equalV1 (const ObjectId &other) const
QPID_COMMON_INLINE_EXTERN void setV2Key (const std::string &_key)
void setV2Key (const ManagementObject &object)
QPID_COMMON_INLINE_EXTERN void setAgentName (const std::string &_name)
QPID_COMMON_INLINE_EXTERN
const std::string
getAgentName () const
QPID_COMMON_INLINE_EXTERN
const std::string
getV2Key () const

Protected Member Functions

void fromString (const std::string &)

Protected Attributes

const AgentAttachmentagent
uint64_t first
uint64_t second
uint64_t agentEpoch
std::string v2Key
std::string agentName

Friends

std::ostreamoperator<< (std::ostream &, const ObjectId &)

Constructor & Destructor Documentation

QPID_COMMON_INLINE_EXTERN qpid::management::ObjectId::ObjectId ( ) [inline]

Definition at line 61 of file ManagementObject.h.

QPID_COMMON_INLINE_EXTERN qpid::management::ObjectId::ObjectId ( const types::Variant map) [inline]

Definition at line 62 of file ManagementObject.h.

References mapDecode(), and qpid::types::Variant::asMap().

qpid::management::ObjectId::ObjectId ( uint8_t  flags,
uint16_t  seq,
uint32_t  broker 
)
qpid::management::ObjectId::ObjectId ( AgentAttachment _agent,
uint8_t  flags,
uint16_t  seq 
)
qpid::management::ObjectId::ObjectId ( std::istream )
qpid::management::ObjectId::ObjectId ( const std::string )
QPID_COMMON_INLINE_EXTERN qpid::management::ObjectId::ObjectId ( const std::string agentAddress,
const std::string key,
uint64_t  epoch = 0 
) [inline]

Definition at line 68 of file ManagementObject.h.

qpid::management::ObjectId::ObjectId ( uint8_t  flags,
uint16_t  seq,
uint32_t  broker,
uint64_t  object 
)

Member Function Documentation

void qpid::management::ObjectId::decode ( const std::string buffer)
void qpid::management::ObjectId::encode ( std::string buffer) const
QPID_COMMON_INLINE_EXTERN uint32_t qpid::management::ObjectId::encodedSize ( ) const [inline]

Definition at line 79 of file ManagementObject.h.

bool qpid::management::ObjectId::equalV1 ( const ObjectId other) const
void qpid::management::ObjectId::fromString ( const std::string ) [protected]
QPID_COMMON_INLINE_EXTERN const std::string& qpid::management::ObjectId::getAgentName ( ) const [inline]

Definition at line 86 of file ManagementObject.h.

References agentName.

QPID_COMMON_INLINE_EXTERN const std::string& qpid::management::ObjectId::getV2Key ( ) const [inline]

Definition at line 87 of file ManagementObject.h.

References v2Key.

void qpid::management::ObjectId::mapDecode ( const types::Variant::Map map)

Referenced by ObjectId().

void qpid::management::ObjectId::mapEncode ( types::Variant::Map map) const
qpid::management::ObjectId::operator types::Variant::Map ( ) const
bool qpid::management::ObjectId::operator< ( const ObjectId other) const
bool qpid::management::ObjectId::operator== ( const ObjectId other) const
QPID_COMMON_INLINE_EXTERN void qpid::management::ObjectId::setAgentName ( const std::string _name) [inline]

Definition at line 85 of file ManagementObject.h.

References agentName.

QPID_COMMON_INLINE_EXTERN void qpid::management::ObjectId::setV2Key ( const std::string _key) [inline]

Definition at line 83 of file ManagementObject.h.

References v2Key.

void qpid::management::ObjectId::setV2Key ( const ManagementObject object)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const ObjectId  
) [friend]

Member Data Documentation

Definition at line 53 of file ManagementObject.h.

Definition at line 56 of file ManagementObject.h.

Definition at line 58 of file ManagementObject.h.

Referenced by setAgentName(), and getAgentName().

uint64_t qpid::management::ObjectId::first [protected]

Definition at line 54 of file ManagementObject.h.

uint64_t qpid::management::ObjectId::second [protected]

Definition at line 55 of file ManagementObject.h.

Definition at line 57 of file ManagementObject.h.

Referenced by setV2Key(), and getV2Key().


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00461.html0000664000076400007640000001214411752725717017322 0ustar00jrossjross00000000000000 qpid/client/Completion.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Completion.h File Reference
#include "qpid/client/Handle.h"
#include "qpid/client/ClientImportExport.h"
#include <string>

Go to the source code of this file.

Classes

class  qpid::client::Completion
 Asynchronous commands that do not return a result will return a Completion. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x71.html0000664000076400007640000001434411752725717022335 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00561_source.html0000664000076400007640000002565711752725717020720 0ustar00jrossjross00000000000000 qpid/sys/posix/PrivatePosix.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/PrivatePosix.h
Go to the documentation of this file.
00001 #ifndef _sys_posix_PrivatePosix_h
00002 #define _sys_posix_PrivatePosix_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/sys/Time.h"
00026 #include "qpid/sys/IOHandle.h"
00027 
00028 struct timespec;
00029 struct timeval;
00030 struct addrinfo;
00031 
00032 namespace qpid {
00033 namespace sys {
00034 
00035 // Private Time related implementation details
00036 struct timespec& toTimespec(struct timespec& ts, const Duration& t);
00037 struct timeval& toTimeval(struct timeval& tv, const Duration& t);
00038 Duration toTime(const struct timespec& ts);
00039 
00040 // Private SocketAddress details
00041 class SocketAddress;
00042 const struct addrinfo& getAddrInfo(const SocketAddress&);
00043 
00044 // Private fd related implementation details
00045 class IOHandlePrivate {
00046 public:
00047     IOHandlePrivate(int f = -1) :
00048             fd(f)
00049     {}
00050 
00051     int fd;
00052 };
00053 
00054 int toFd(const IOHandlePrivate* h);
00055 
00056 // Posix fd as an IOHandle
00057 class PosixIOHandle : public IOHandle {
00058 public:
00059     PosixIOHandle(int fd) :
00060         IOHandle(new IOHandlePrivate(fd))
00061     {}
00062 };
00063 
00064 // Dummy IOHandle for places it's required in the API
00065 // but we promise not to actually try to do any operations on the IOHandle
00066 class NullIOHandle : public IOHandle {
00067 public:
00068     NullIOHandle() :
00069         IOHandle(new IOHandlePrivate)
00070     {}
00071 };
00072 
00073 extern NullIOHandle DummyIOHandle;
00074 
00075 }}
00076 
00077 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00253.html0000664000076400007640000002445311752725720017321 0ustar00jrossjross00000000000000 qpid::framing::PreconditionFailedException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::PreconditionFailedException Struct Reference

The client requested a command that was not allowed because some precondition failed. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 PreconditionFailedException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The client requested a command that was not allowed because some precondition failed.


Constructor & Destructor Documentation

qpid::framing::PreconditionFailedException::PreconditionFailedException ( const std::string msg = std::string()) [inline]

Definition at line 86 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::PreconditionFailedException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 85 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00574.html0000664000076400007640000007713711752725717017344 0ustar00jrossjross00000000000000 qpid Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid Namespace Reference

This file was automatically generated from the AMQP specification. More...

Namespaces

namespace  amqp_0_10
namespace  client
namespace  console
namespace  framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  log
namespace  management
namespace  messaging
namespace  sys
namespace  types

Classes

struct  Address
 Contains the protocol address of an AMQP broker. More...
class  Exception
 Base class for Qpid runtime exceptions. More...
struct  ErrnoException
 Exception that includes an errno message. More...
struct  SessionException
struct  ChannelException
struct  ConnectionException
struct  ClosedException
struct  TransportFailure
 Exception representing transport failure. More...
class  InlineAllocator
 An allocator that has inline storage for up to Max objects of type BaseAllocator::value_type. More...
struct  InlineRebind
struct  InlineRebind< T, T, BaseAllocator, Max >
class  InlineVector
 A vector that stores up to Max elements in inline storage, otherwise uses normal vector allocation. More...
struct  Msg
 A simple wrapper for std::ostringstream that allows in place construction of a message and automatic conversion to string. More...
class  OptionValue
struct  Options
 Base class for options. More...
struct  CommonOptions
 Standard options for configuration. More...
class  Range
 A range of values, used in RangeSet. More...
class  RangeSet
 A set implemented as a list of [begin, end) ranges. More...
class  SessionId
 Identifier for a session. More...
struct  Url
 An AMQP URL contains a list of addresses. More...

Functions

std::ostreamoperator<< (std::ostream &os, const Address &addr)
bool operator== (const Address &x, const Address &y)
std::ostreamoperator<< (std::ostream &o, const Msg &m)
std::string prettyArg (const std::string &, const std::string &)
template<class T >
po::value_semantic * optValue (T &value, const char *name)
 Create an option value.
template<class T >
po::value_semantic * optValue (std::vector< T > &value, const char *name)
 Create a vector value.
po::value_semantic * optValue (bool &value)
 Create a boolean switch value.
template<class T >
std::ostreamoperator<< (std::ostream &o, const Range< T > &r)
template<class T >
std::ostreamoperator<< (std::ostream &o, const RangeSet< T > &rs)
std::ostreamoperator<< (std::ostream &, const SessionId &)
bool operator== (const Url &a, const Url &b)
bool operator!= (const Url &a, const Url &b)
std::ostreamoperator<< (std::ostream &os, const Url &url)
std::istreamoperator>> (std::istream &is, Url &url)

Detailed Description

This file was automatically generated from the AMQP specification.

Do not edit.


Function Documentation

bool qpid::operator!= ( const Url &  a,
const Url &  b 
) [inline]

Definition at line 96 of file Url.h.

std::ostream& qpid::operator<< ( std::ostream os,
const Address &  addr 
)
std::ostream& qpid::operator<< ( std::ostream ,
const SessionId &   
)
std::ostream& qpid::operator<< ( std::ostream o,
const Msg &  m 
) [inline]

Definition at line 68 of file Msg.h.

std::ostream& qpid::operator<< ( std::ostream os,
const Url &  url 
)
template<class T >
std::ostream& qpid::operator<< ( std::ostream o,
const Range< T > &  r 
)

Definition at line 199 of file RangeSet.h.

template<class T >
std::ostream& qpid::operator<< ( std::ostream o,
const RangeSet< T > &  rs 
)

Definition at line 204 of file RangeSet.h.

bool qpid::operator== ( const Address &  x,
const Address &  y 
)
bool qpid::operator== ( const Url &  a,
const Url &  b 
) [inline]

Definition at line 95 of file Url.h.

std::istream& qpid::operator>> ( std::istream is,
Url &  url 
)
template<class T >
po::value_semantic* qpid::optValue ( T &  value,
const char *  name 
)

Create an option value.

name, value appear after the option name in help like this: <name> (=

) T must support operator <<.

See also:
Options for example of use.

Definition at line 74 of file Options.h.

References prettyArg().

template<class T >
po::value_semantic* qpid::optValue ( std::vector< T > &  value,
const char *  name 
)

Create a vector value.

Multiple occurences of the option are accumulated into the vector

Definition at line 83 of file Options.h.

References prettyArg().

po::value_semantic* qpid::optValue ( bool &  value) [inline]

Create a boolean switch value.

Presence of the option sets the value.

Definition at line 94 of file Options.h.

std::string qpid::prettyArg ( const std::string ,
const std::string  
)

Referenced by optValue().


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00602.html0000664000076400007640000003046311752725717017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::AgentSession Member List
This is the complete list of members for qmf::AgentSession, including all inherited members.
addData(Data &data, const std::string &name="", bool persistent=false)qmf::AgentSession
AgentSession(AgentSessionImpl *impl=0)qmf::AgentSession
AgentSession(const AgentSession &)qmf::AgentSession
AgentSession(qpid::messaging::Connection &conn, const std::string &options="")qmf::AgentSession
authAccept(AgentEvent &event)qmf::AgentSession
authReject(AgentEvent &event, const std::string &diag="")qmf::AgentSession
close()qmf::AgentSession
complete(AgentEvent &event)qmf::AgentSession
delData(const DataAddr &dataAddr)qmf::AgentSession
getName() const qmf::AgentSession
Handle()qmf::Handle< AgentSessionImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< AgentSessionImpl > [protected]
Impl typedefqmf::Handle< AgentSessionImpl > [protected]
implqmf::Handle< AgentSessionImpl > [protected]
isNull() const qmf::Handle< AgentSessionImpl > [inline]
isValid() const qmf::Handle< AgentSessionImpl > [inline]
methodSuccess(AgentEvent &event)qmf::AgentSession
nextEvent(AgentEvent &outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER)qmf::AgentSession
open()qmf::AgentSession
operator bool() const qmf::Handle< AgentSessionImpl > [inline]
operator!() const qmf::Handle< AgentSessionImpl > [inline]
operator=(const AgentSession &)qmf::AgentSession
Handle< AgentSessionImpl >::operator=(const Handle &)qmf::Handle< AgentSessionImpl > [protected]
pendingEvents() const qmf::AgentSession
raiseEvent(const Data &data)qmf::AgentSession
raiseEvent(const Data &data, int severity)qmf::AgentSession
raiseException(AgentEvent &event, const std::string &errorText)qmf::AgentSession
raiseException(AgentEvent &event, const Data &errorData)qmf::AgentSession
registerSchema(Schema &schema)qmf::AgentSession
response(AgentEvent &event, const Data &responseData)qmf::AgentSession
setAttribute(const std::string &key, const qpid::types::Variant &value)qmf::AgentSession
setDomain(const std::string &domain)qmf::AgentSession
setInstance(const std::string &instance)qmf::AgentSession
setProduct(const std::string &product)qmf::AgentSession
setVendor(const std::string &vendor)qmf::AgentSession
swap(Handle< T > &h)qmf::Handle< AgentSessionImpl > [inline]
~AgentSession()qmf::AgentSession

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00488_source.html0000664000076400007640000002071111752725717020712 0ustar00jrossjross00000000000000 qpid/console/SequenceManager.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/SequenceManager.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_SEQUENCEMANAGER_H_
00022 #define _QPID_CONSOLE_SEQUENCEMANAGER_H_
00023 
00024 #include "qpid/console/ConsoleImportExport.h"
00025 #include "qpid/sys/Mutex.h"
00026 #include <map>
00027 #include <string>
00028 #include <set>
00029 
00030 namespace qpid {
00031 namespace console {
00032 
00037     class SequenceManager {
00038     public:
00039         typedef std::set<uint32_t> set;
00040 
00041         SequenceManager() : sequence(0) {}
00042         QPID_CONSOLE_EXTERN uint32_t reserve(const std::string& context = "");
00043         QPID_CONSOLE_EXTERN std::string release(uint32_t seq);
00044 
00045     private:
00046         sys::Mutex lock;
00047         uint32_t sequence;
00048         std::map<uint32_t, std::string> pending;
00049     };
00050 }
00051 }
00052 
00053 
00054 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00012.html0000664000076400007640000013624211752725717017320 0ustar00jrossjross00000000000000 qmf::AgentSession Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::AgentSession Class Reference

#include <qmf/AgentSession.h>

List of all members.

Public Member Functions

 AgentSession (AgentSessionImpl *impl=0)
 AgentSession (const AgentSession &)
AgentSessionoperator= (const AgentSession &)
 ~AgentSession ()
 AgentSession (qpid::messaging::Connection &conn, const std::string &options="")
 AgentSession A session that runs over an AMQP connection for QMF agent operation.
void setDomain (const std::string &domain)
 setDomain - Change the QMF domain that this agent will operate in.
void setVendor (const std::string &vendor)
 Set identifying attributes of this agent.
void setProduct (const std::string &product)
void setInstance (const std::string &instance)
void setAttribute (const std::string &key, const qpid::types::Variant &value)
 setAttribute - Set an arbitrary attribute for this agent.
const std::stringgetName () const
 Get the identifying name of the agent.
void open ()
 Open the agent session.
void close ()
 Close the session.
bool nextEvent (AgentEvent &outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER)
 Get the next event from the agent session.
int pendingEvents () const
 Return the number of events pending for nextEvent.
void registerSchema (Schema &schema)
 Register a schema to be exposed by this agent.
DataAddr addData (Data &data, const std::string &name="", bool persistent=false)
 Add data to be managed internally by the agent.
void delData (const DataAddr &dataAddr)
 Delete data from internal agent management.
void authAccept (AgentEvent &event)
 The following methods are used to respond to events received in nextEvent.
void authReject (AgentEvent &event, const std::string &diag="")
void raiseException (AgentEvent &event, const std::string &errorText)
void raiseException (AgentEvent &event, const Data &errorData)
void response (AgentEvent &event, const Data &responseData)
void complete (AgentEvent &event)
void methodSuccess (AgentEvent &event)
void raiseEvent (const Data &data)
 Raise an event to be sent into the QMF network.
void raiseEvent (const Data &data, int severity)
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::AgentSession::AgentSession ( AgentSessionImpl *  impl = 0)
qmf::AgentSession::AgentSession ( const AgentSession )
qmf::AgentSession::~AgentSession ( )
qmf::AgentSession::AgentSession ( qpid::messaging::Connection conn,
const std::string options = "" 
)

AgentSession A session that runs over an AMQP connection for QMF agent operation.

Parameters:
connection- An opened qpid::messaging::Connection
options- An optional string containing options

The options string is of the form "{key:value,key:value}". The following keys are supported:

interval:N - Heartbeat interval in seconds [default: 60] external:{True,False} - Use external data storage (queries and subscriptions are pass-through) [default: False] allow-queries:{True,False} - If True: automatically allow all queries [default] If False: generate an AUTH_QUERY event to allow per-query authorization allow-methods:{True,False} - If True: automatically allow all methods [default] If False: generate an AUTH_METHOD event to allow per-method authorization max-subscriptions:N - Maximum number of concurrent subscription queries permitted [default: 64] min-sub-interval:N - Minimum publish interval (in milliseconds) permitted for a subscription [default: 3000] sub-lifetime:N - Lifetime (in seconds with no keepalive) for a subscription [default: 300] public-events:{True,False} - If True: QMF events are sent to the topic exchange [default] If False: QMF events are only sent to authorized subscribers listen-on-direct:{True,False} - If True: Listen on legacy direct-exchange address for backward compatibility [default] If False: Listen only on the routable direct address strict-security:{True,False} - If True: Cooperate with the broker to enforce strict access control to the network

  • If False: Operate more flexibly with regard to use of messaging facilities [default] max-thread-wait-time:N - Time (in seconds) the session thread will wait for messages from the network between periodic background processing passes. [default: 5] Must not be greater than 'interval'. Larger numbers will cause fewer wake-ups but will increase the time it takes to shut down the process. This setting will not affect the agent's response time for queries or method invocation.

Member Function Documentation

DataAddr qmf::AgentSession::addData ( Data data,
const std::string name = "",
bool  persistent = false 
)

Add data to be managed internally by the agent.

If the option external:True is selected, this call should not be used.

Parameters:
data- The data object being managed by the agent.
name- A name unique to this object to be used to address the object. If left default, a unique name will be assigned by the agent.
persistent- Set this to true if the data object is to be considered persistent across different sessions. If persistent, it is the agent application's responsibility to ensure the name is the same each time it is added.
void qmf::AgentSession::authAccept ( AgentEvent event)

The following methods are used to respond to events received in nextEvent.

authAccept - Accept an authorization request. authReject - Reject/forbid an authorization request. raiseException - indicate failure of an operation (i.e. query or method call). response - Provide data in response to a query (only for option: external:True) complete - Indicate that the response to a query is complete (external:True only) methodSuccess - Indicate the successful completion of a method call.

void qmf::AgentSession::authReject ( AgentEvent event,
const std::string diag = "" 
)
void qmf::AgentSession::close ( )

Close the session.

Once closed, the session no longer communicates on the messaging network.

void qmf::AgentSession::complete ( AgentEvent event)
void qmf::AgentSession::delData ( const DataAddr dataAddr)

Delete data from internal agent management.

const std::string& qmf::AgentSession::getName ( ) const

Get the identifying name of the agent.

QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

void qmf::AgentSession::methodSuccess ( AgentEvent event)
bool qmf::AgentSession::nextEvent ( AgentEvent outEvent,
qpid::messaging::Duration  timeout = qpid::messaging::Duration::FOREVER 
)

Get the next event from the agent session.

Events represent actions that must be acted upon by the agent application. This method blocks for up to the timeout if there are no events to be handled. This method will typically be the focus of the agent application's main execution loop. If the timeout is set to Duration::IMMEDIATE, the call will not block.

void qmf::AgentSession::open ( )

Open the agent session.

After opening the session, the domain, identifying strings, and attributes cannot be changed.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

AgentSession& qmf::AgentSession::operator= ( const AgentSession )
int qmf::AgentSession::pendingEvents ( ) const

Return the number of events pending for nextEvent.

This method will never block.

void qmf::AgentSession::raiseEvent ( const Data data)

Raise an event to be sent into the QMF network.

Parameters:
data- A data object that contains the event contents.
severity- Explicit severity (from qmf/SchemaTypes.h). If omitted, the severity is set to the default severity for the data's schema. If the data has no schema, the severity defaults to SEV_NOTICE.
void qmf::AgentSession::raiseEvent ( const Data data,
int  severity 
)
void qmf::AgentSession::raiseException ( AgentEvent event,
const std::string errorText 
)
void qmf::AgentSession::raiseException ( AgentEvent event,
const Data errorData 
)
void qmf::AgentSession::registerSchema ( Schema schema)

Register a schema to be exposed by this agent.

void qmf::AgentSession::response ( AgentEvent event,
const Data responseData 
)
void qmf::AgentSession::setAttribute ( const std::string key,
const qpid::types::Variant value 
)

setAttribute - Set an arbitrary attribute for this agent.

The attributes are not used to uniquely identify the agent but can be used as a search criteria when looking for agents. This must be called prior to opening the agent session.

void qmf::AgentSession::setDomain ( const std::string domain)

setDomain - Change the QMF domain that this agent will operate in.

If this is not called, the domain will be "default". Agents in a domain can be seen only by consoles in the same domain. This must be called prior to opening the agent session.

void qmf::AgentSession::setInstance ( const std::string instance)
void qmf::AgentSession::setProduct ( const std::string product)
void qmf::AgentSession::setVendor ( const std::string vendor)

Set identifying attributes of this agent.

setVendor - Set the vendor string setProduct - Set the product name string setInstance - Set the unique instance name (if not set, a UUID will be assigned) These must be called prior to opening the agent session.

void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00672.html0000664000076400007640000002057711752725717017337 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Url Member List
This is the complete list of members for qpid::Url, including all inherited members.
addProtocol(const std::string &tag)qpid::Url [static]
getHostNameUrl(uint16_t port)qpid::Url [static]
getIpAddressesUrl(uint16_t port)qpid::Url [static]
getPass() const qpid::Url
getUser() const qpid::Url
operator=(const char *s)qpid::Url [inline]
operator=(const std::string &s)qpid::Url [inline]
parse(const char *url)qpid::Url
parse(const char *url, const std::string &defaultProtocol)qpid::Url
parse(const std::string &url)qpid::Url [inline]
parseNoThrow(const char *url)qpid::Url
parseNoThrow(const char *url, const std::string &defaultProtocol)qpid::Url
setPass(const std::string &)qpid::Url
setUser(const std::string &)qpid::Url
str() const qpid::Url
throwIfEmpty() const qpid::Url
Url()qpid::Url [inline]
Url(const Address &addr)qpid::Url [inline, explicit]
Url(const std::string &url)qpid::Url [inline, explicit]
Url(const std::string &url, const std::string &defaultProtocol)qpid::Url [inline, explicit]
Url(const char *url)qpid::Url [inline, explicit]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x63.html0000664000076400007640000005161111752725717022314 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- c -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00478_source.html0000664000076400007640000003211411752725717020711 0ustar00jrossjross00000000000000 qpid/client/SessionBase_0_10.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/SessionBase_0_10.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_SESSIONBASE_H
00002 #define QPID_CLIENT_SESSIONBASE_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/SessionId.h"
00026 #include "qpid/framing/amqp_structs.h"
00027 #include "qpid/client/Message.h"
00028 #include "qpid/client/Completion.h"
00029 #include "qpid/client/TypedResult.h"
00030 #include "qpid/client/ClientImportExport.h"
00031 #include <string>
00032 
00033 namespace qpid {
00034 namespace client {
00035 
00036 class Connection;
00037 class SessionImpl;
00038 
00039 using std::string;
00040 using framing::Content;
00041 using framing::FieldTable;
00042 using framing::SequenceNumber;
00043 using framing::SequenceSet;
00044 using framing::SequenceNumberSet;
00045 using qpid::SessionId;
00046 using framing::Xid;
00047 
00049 enum CreditUnit { MESSAGE_CREDIT=0, BYTE_CREDIT=1, UNLIMITED_CREDIT=0xFFFFFFFF };
00050 
00057 class QPID_CLIENT_CLASS_EXTERN SessionBase_0_10 {
00058   public:
00059 
00061     QPID_CLIENT_EXTERN SessionBase_0_10();
00062     QPID_CLIENT_EXTERN ~SessionBase_0_10();
00063 
00065     QPID_CLIENT_EXTERN SessionId getId() const;
00066 
00070     QPID_CLIENT_EXTERN void close();
00071 
00081     QPID_CLIENT_EXTERN void sync();
00082 
00084     QPID_CLIENT_EXTERN uint32_t timeout(uint32_t seconds);
00085 
00087     QPID_CLIENT_EXTERN void suspend();
00088 
00090     QPID_CLIENT_EXTERN void resume(Connection);
00091 
00093     QPID_CLIENT_EXTERN uint16_t getChannel() const;
00094 
00095     QPID_CLIENT_EXTERN void flush();
00096     QPID_CLIENT_EXTERN void markCompleted(const framing::SequenceSet& ids, bool notifyPeer);
00097     QPID_CLIENT_EXTERN void markCompleted(const framing::SequenceNumber& id, bool cumulative, bool notifyPeer);
00098     QPID_CLIENT_EXTERN void sendCompletion();
00099 
00100     QPID_CLIENT_EXTERN bool isValid() const;
00101 
00102     QPID_CLIENT_EXTERN Connection getConnection();
00103   protected:
00104     boost::shared_ptr<SessionImpl> impl;
00105   friend class SessionBase_0_10Access;
00106 };
00107 
00108 }} // namespace qpid::client
00109 
00110 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00023.html0000664000076400007640000001675411752725720017321 0ustar00jrossjross00000000000000 qpid::client::AutoCancel Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::AutoCancel Class Reference

AutoCancel cancels a subscription in its destructor. More...

#include <qpid/client/SubscriptionManager.h>

List of all members.

Public Member Functions

 AutoCancel (SubscriptionManager &sm_, const std::string &tag_)
 ~AutoCancel ()

Detailed Description

AutoCancel cancels a subscription in its destructor.


Constructor & Destructor Documentation

qpid::client::AutoCancel::AutoCancel ( SubscriptionManager sm_,
const std::string tag_ 
) [inline]

Definition at line 283 of file SubscriptionManager.h.

qpid::client::AutoCancel::~AutoCancel ( ) [inline]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00767.html0000664000076400007640000002134411752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Integer64Value Member List
This is the complete list of members for qpid::framing::Integer64Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
Integer64Value(int64_t v)qpid::framing::Integer64Value
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00474.html0000664000076400007640000001324711752725717017333 0ustar00jrossjross00000000000000 qpid/client/Session_0_10.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Session_0_10.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::Session_0_10
 AMQP 0-10 session API with keyword arguments. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Functions

Session_0_10 qpid::client::sync (const SessionBase_0_10 &other)
 Conversion to Session_0_10 from another session type.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00157.html0000664000076400007640000002444611752725720017326 0ustar00jrossjross00000000000000 qpid::framing::InternalErrorException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::InternalErrorException Struct Reference

The peer could not complete the command because of an internal error. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 InternalErrorException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The peer could not complete the command because of an internal error.

The peer may require intervention by an operator in order to resume normal operations.


Constructor & Destructor Documentation

qpid::framing::InternalErrorException::InternalErrorException ( const std::string msg = std::string()) [inline]

Definition at line 186 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::InternalErrorException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 185 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00134.html0000664000076400007640000002432711752725720017317 0ustar00jrossjross00000000000000 qpid::framing::FramingErrorException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FramingErrorException Struct Reference

A valid frame header cannot be formed from the incoming byte stream. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 FramingErrorException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const
framing::connection::CloseCode 
code

Detailed Description

A valid frame header cannot be formed from the incoming byte stream.


Constructor & Destructor Documentation

qpid::framing::FramingErrorException::FramingErrorException ( const std::string msg = std::string()) [inline]

Definition at line 239 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::FramingErrorException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 238 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 72 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00382.html0000664000076400007640000006227711752725720017332 0ustar00jrossjross00000000000000 qpid::framing::Var16Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Var16Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Var16Value (const std::string &v, uint8_t code)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Var16Value::Var16Value ( const std::string v,
uint8_t  code 
)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00119.html0000664000076400007640000003160411752725717017324 0ustar00jrossjross00000000000000 qpid::client::FailoverManager Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FailoverManager Class Reference

Utility to manage failover. More...

#include <qpid/client/FailoverManager.h>

List of all members.

Classes

struct  Command
 Interface to implement for doing work that can be resumed on failover. More...
struct  ReconnectionStrategy

Public Member Functions

 FailoverManager (const ConnectionSettings &settings, ReconnectionStrategy *strategy=0)
 Create a manager to control failover for a logical connection.
Connectionconnect (std::vector< Url > brokers=std::vector< Url >())
 Return the current connection if open or attept to reconnect to the specified list of urls.
ConnectiongetConnection ()
 Return the current connection whether open or not.
void close ()
 Close the current connection.
void execute (Command &)
 Reliably execute the specified command.

Detailed Description

Utility to manage failover.


Constructor & Destructor Documentation

qpid::client::FailoverManager::FailoverManager ( const ConnectionSettings settings,
ReconnectionStrategy strategy = 0 
)

Create a manager to control failover for a logical connection.

Parameters:
settingsthe initial connection settings
strategyoptional stratgey callback allowing application to edit or reorder the list of urls to which reconnection is attempted

Member Function Documentation

void qpid::client::FailoverManager::close ( )

Close the current connection.

Connection& qpid::client::FailoverManager::connect ( std::vector< Url brokers = std::vectorUrl >())

Return the current connection if open or attept to reconnect to the specified list of urls.

If no list is specified the list of known brokers from the last connection will be used. If no list is specified and this is the first connect attempt, the host and port from the initial settings will be used.

If the full list is tried and all attempts fail, CannotConnectException is thrown.

void qpid::client::FailoverManager::execute ( Command )

Reliably execute the specified command.

This involves creating a session on which to carry out the work of the command, handling failover occuring while exeuting that command and re-starting the work.

Multiple concurrent threads can call execute with different commands; each thread will be allocated its own session. FailoverManager will coordinate the different threads on failover to ensure they continue to use the same logical connection.

Connection& qpid::client::FailoverManager::getConnection ( )

Return the current connection whether open or not.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x77.html0000664000076400007640000001401211752725717022333 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- w -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00748.html0000664000076400007640000002274611752725720017335 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ExchangeQueryResult Member List
This is the complete list of members for qpid::framing::ExchangeQueryResult, including all inherited members.
bodySize() const qpid::framing::ExchangeQueryResult
clearArgumentsFlag()qpid::framing::ExchangeQueryResult
clearTypeFlag()qpid::framing::ExchangeQueryResult
decode(Buffer &, uint32_t=0)qpid::framing::ExchangeQueryResult
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::ExchangeQueryResult
encode(Buffer &) const qpid::framing::ExchangeQueryResult
encodedSize() const qpid::framing::ExchangeQueryResult
encodeStructBody(Buffer &) const qpid::framing::ExchangeQueryResult
ExchangeQueryResult(const std::string &_type, bool _durable, bool _notFound, const FieldTable &_arguments)qpid::framing::ExchangeQueryResult [inline]
ExchangeQueryResult()qpid::framing::ExchangeQueryResult [inline]
getArguments() const qpid::framing::ExchangeQueryResult
getArguments()qpid::framing::ExchangeQueryResult
getDurable() const qpid::framing::ExchangeQueryResult
getNotFound() const qpid::framing::ExchangeQueryResult
getType() const qpid::framing::ExchangeQueryResult
hasArguments() const qpid::framing::ExchangeQueryResult
hasType() const qpid::framing::ExchangeQueryResult
operator<<(std::ostream &, const ExchangeQueryResult &)qpid::framing::ExchangeQueryResult [friend]
print(std::ostream &out) const qpid::framing::ExchangeQueryResult
setArguments(const FieldTable &_arguments)qpid::framing::ExchangeQueryResult
setDurable(bool _durable)qpid::framing::ExchangeQueryResult
setNotFound(bool _notFound)qpid::framing::ExchangeQueryResult
setType(const std::string &_type)qpid::framing::ExchangeQueryResult
TYPEqpid::framing::ExchangeQueryResult [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00108.html0000664000076400007640000002114411752725717017320 0ustar00jrossjross00000000000000 qmf::engine::Event Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Event Class Reference

#include <qmf/engine/Event.h>

List of all members.

Public Member Functions

 Event (const SchemaEventClass *type)
 Event (const Event &from)
 ~Event ()
const SchemaEventClassgetClass () const
ValuegetValue (const char *key) const

Constructor & Destructor Documentation

qmf::engine::Event::Event ( const SchemaEventClass type)
qmf::engine::Event::Event ( const Event from)
qmf::engine::Event::~Event ( )

Member Function Documentation

const SchemaEventClass* qmf::engine::Event::getClass ( ) const
Value* qmf::engine::Event::getValue ( const char *  key) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00005.html0000664000076400007640000010564211752725717017322 0ustar00jrossjross00000000000000 qmf::engine::Agent Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Agent Class Reference

Agent - Protocol engine for the QMF agent. More...

#include <qmf/engine/Agent.h>

List of all members.

Public Member Functions

 Agent (char *label, bool internalStore=true)
 ~Agent ()
void setStoreDir (const char *path)
 Configure the directory path for storing persistent data.
void setTransferDir (const char *path)
 Configure the directory path for files transferred over QMF.
void handleRcvMessage (Message &message)
 Pass messages received from the AMQP session to the Agent engine.
bool getXmtMessage (Message &item) const
 Get the next message to be sent to the AMQP network.
void popXmt ()
 Remove and discard one message from the head of the transmit queue.
bool getEvent (AgentEvent &event) const
 Get the next application event from the agent engine.
void popEvent ()
 Remove and discard one event from the head of the event queue.
void newSession ()
 A new AMQP session has been established for Agent communication.
void startProtocol ()
 Start the QMF Agent protocol.
void heartbeat ()
 This method is called periodically so the agent can supply a heartbeat.
void methodResponse (uint32_t sequence, uint32_t status, char *text, const Value &arguments)
 Respond to a method request.
void queryResponse (uint32_t sequence, Object &object, bool prop=true, bool stat=true)
 Send a content indication to the QMF bus.
void queryComplete (uint32_t sequence)
 Indicate the completion of a query.
void registerClass (SchemaObjectClass *cls)
 Register a schema class with the Agent.
void registerClass (SchemaEventClass *cls)
 Register a schema class with the Agent.
const ObjectIdaddObject (Object &obj, uint64_t persistId)
 Give an object to the Agent for storage and management.
const ObjectIdallocObjectId (uint64_t persistId)
 Allocate an object-id for an object that will be managed by the application.
const ObjectIdallocObjectId (uint32_t persistIdLo, uint32_t persistIdHi)
void raiseEvent (Event &event)
 Raise an event into the QMF network.

Detailed Description

Agent - Protocol engine for the QMF agent.


Constructor & Destructor Documentation

qmf::engine::Agent::Agent ( char *  label,
bool  internalStore = true 
)
qmf::engine::Agent::~Agent ( )

Member Function Documentation

const ObjectId* qmf::engine::Agent::addObject ( Object obj,
uint64_t  persistId 
)

Give an object to the Agent for storage and management.

Once added, the agent takes responsibility for the life cycle of the object.

Parameters:
objThe object to be managed by the Agent.
persistIdA unique non-zero value if the object-id is to be persistent.
Returns:
The objectId of the managed object.
const ObjectId* qmf::engine::Agent::allocObjectId ( uint64_t  persistId)

Allocate an object-id for an object that will be managed by the application.

Parameters:
persistIdA unique non-zero value if the object-id is to be persistent.
Returns:
The objectId structure for the allocated ID.
const ObjectId* qmf::engine::Agent::allocObjectId ( uint32_t  persistIdLo,
uint32_t  persistIdHi 
)
bool qmf::engine::Agent::getEvent ( AgentEvent event) const

Get the next application event from the agent engine.

Parameters:
eventThe event iff the return value is true
Returns:
true if event is valid, false if there are no events to process
bool qmf::engine::Agent::getXmtMessage ( Message item) const

Get the next message to be sent to the AMQP network.

Parameters:
itemThe Message structure describing the message to be produced.
Returns:
true if the Message is valid, false if there are no messages to send.
void qmf::engine::Agent::handleRcvMessage ( Message message)

Pass messages received from the AMQP session to the Agent engine.

Parameters:
messageAMQP messages received on the agent session.
void qmf::engine::Agent::heartbeat ( )

This method is called periodically so the agent can supply a heartbeat.

void qmf::engine::Agent::methodResponse ( uint32_t  sequence,
uint32_t  status,
char *  text,
const Value arguments 
)

Respond to a method request.

Parameters:
sequenceThe sequence number from the method request event.
statusThe method's completion status.
textStatus text ("OK" or an error message)
argumentsThe list of output arguments from the method call.
void qmf::engine::Agent::newSession ( )

A new AMQP session has been established for Agent communication.

void qmf::engine::Agent::popEvent ( )

Remove and discard one event from the head of the event queue.

void qmf::engine::Agent::popXmt ( )

Remove and discard one message from the head of the transmit queue.

void qmf::engine::Agent::queryComplete ( uint32_t  sequence)

Indicate the completion of a query.

This is not used for SYNC_START requests.

Parameters:
sequenceThe sequence number of the GET request.
void qmf::engine::Agent::queryResponse ( uint32_t  sequence,
Object object,
bool  prop = true,
bool  stat = true 
)

Send a content indication to the QMF bus.

This is only needed for objects that are managed by the application. This is *NOT* needed for objects managed by the Agent (inserted using addObject).

Parameters:
sequenceThe sequence number of the GET request or the SYNC_START request.
objectThe object (annotated with "changed" flags) for publication.
propIf true, changed object properties are transmitted.
statIf true, changed object statistics are transmitted.
void qmf::engine::Agent::raiseEvent ( Event event)

Raise an event into the QMF network.

Parameters:
eventThe event object for the event to be raised.
void qmf::engine::Agent::registerClass ( SchemaObjectClass cls)

Register a schema class with the Agent.

Parameters:
clsA SchemaObejctClass object that defines data managed by the agent.
void qmf::engine::Agent::registerClass ( SchemaEventClass cls)

Register a schema class with the Agent.

Parameters:
clsA SchemaEventClass object that defines events sent by the agent.
void qmf::engine::Agent::setStoreDir ( const char *  path)

Configure the directory path for storing persistent data.

Parameters:
pathNull-terminated string containing a directory path where files can be created, written, and read. If NULL, no persistent storage will be attempted.
void qmf::engine::Agent::setTransferDir ( const char *  path)

Configure the directory path for files transferred over QMF.

Parameters:
pathNull-terminated string containing a directory path where files can be created, deleted, written, and read. If NULL, file transfers shall not be permitted.
void qmf::engine::Agent::startProtocol ( )

Start the QMF Agent protocol.

This should be invoked after a SETUP_COMPLETE event is received from the Agent engine.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00830.html0000664000076400007640000001043511752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ArgsNone Member List
This is the complete list of members for qpid::management::ArgsNone, including all inherited members.
~Args(void)=0qpid::management::Args [inline, pure virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00468.html0000664000076400007640000001133611752725717017333 0ustar00jrossjross00000000000000 qpid/client/FutureCompletion.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FutureCompletion.h File Reference
#include "qpid/framing/amqp_framing.h"
#include "qpid/sys/Monitor.h"

Go to the source code of this file.

Classes

class  qpid::client::FutureCompletion

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00136.html0000664000076400007640000002405311752725717017323 0ustar00jrossjross00000000000000 qpid::client::Future Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Future Class Reference

#include <qpid/client/Future.h>

List of all members.

Public Member Functions

 Future ()
 Future (const framing::SequenceNumber &id)
std::string getResult (SessionImpl &session)
void wait (SessionImpl &session)
bool isComplete (SessionImpl &session)
void setFutureResult (boost::shared_ptr< FutureResult > r)

Constructor & Destructor Documentation

qpid::client::Future::Future ( ) [inline]

Definition at line 44 of file Future.h.

qpid::client::Future::Future ( const framing::SequenceNumber id) [inline]

Definition at line 45 of file Future.h.


Member Function Documentation

std::string qpid::client::Future::getResult ( SessionImpl &  session) [inline]

Definition at line 47 of file Future.h.

bool qpid::client::Future::isComplete ( SessionImpl &  session)
void qpid::client::Future::setFutureResult ( boost::shared_ptr< FutureResult r)
void qpid::client::Future::wait ( SessionImpl &  session)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00546.html0000664000076400007640000001206511752725717017330 0ustar00jrossjross00000000000000 qpid/messaging/Sender.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Sender.h File Reference
#include "qpid/messaging/ImportExport.h"
#include "qpid/messaging/Handle.h"
#include "qpid/sys/IntegerTypes.h"
#include <string>

Go to the source code of this file.

Classes

class  qpid::messaging::Sender
 Interface through which messages are sent. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00353.html0000664000076400007640000004401711752725720017320 0ustar00jrossjross00000000000000 qpid::client::SubscriptionSettings Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::SubscriptionSettings Struct Reference

Settings for a subscription. More...

#include <qpid/client/SubscriptionSettings.h>

List of all members.

Public Member Functions

 SubscriptionSettings (FlowControl flow=FlowControl::unlimited(), AcceptMode accept=ACCEPT_MODE_EXPLICIT, AcquireMode acquire=ACQUIRE_MODE_PRE_ACQUIRED, unsigned int autoAck_=1, CompletionMode completion=COMPLETE_ON_DELIVERY)

Public Attributes

FlowControl flowControl
AcceptMode acceptMode
 < Flow control settings.
AcquireMode acquireMode
 < ACCEPT_MODE_EXPLICIT or ACCEPT_MODE_NONE
unsigned int autoAck
 < ACQUIRE_MODE_PRE_ACQUIRED or ACQUIRE_MODE_NOT_ACQUIRED
CompletionMode completionMode
 In windowing mode, completion of a message will cause the credit used up by that message to be reallocated.
bool exclusive
 If set, requests that no other subscriber be allowed to access the queue while this subscription is active.

Detailed Description

Settings for a subscription.


Constructor & Destructor Documentation

qpid::client::SubscriptionSettings::SubscriptionSettings ( FlowControl  flow = FlowControl::unlimited(),
AcceptMode  accept = ACCEPT_MODE_EXPLICIT,
AcquireMode  acquire = ACQUIRE_MODE_PRE_ACQUIRED,
unsigned int  autoAck_ = 1,
CompletionMode  completion = COMPLETE_ON_DELIVERY 
) [inline]

Definition at line 43 of file SubscriptionSettings.h.


Member Data Documentation

< Flow control settings.

See also:
FlowControl The acceptMode determines whether the broker should expect delivery of messages to be acknowledged by the client indicating that it accepts them. A value of ACCEPT_MODE_EXPLICIT means that messages must be accepted (note: this may be done automatically by the library - see autoAck - or through an explicit call be the application - see Subscription::accept()) before they can be dequeued. A value of ACCEPT_MODE_NONE means that the broker can dequeue a message as soon as it is acquired.

Definition at line 63 of file SubscriptionSettings.h.

< ACCEPT_MODE_EXPLICIT or ACCEPT_MODE_NONE

The acquireMode determines whether messages are locked for the subscriber when delivered, and thus are not delivered to any other subscriber unless this subscriber releases them.

The default is ACQUIRE_MODE_PRE_ACQUIRED meaning that the subscriber expects to have been given that message exclusively (i.e. the message will not be given to any other subscriber unless released explicitly or by this subscribers session failing without having accepted the message).

Delivery of message in ACQUIRE_MODE_NOT_ACQUIRED mode means the message will still be available for other subscribers to receive. The application can if desired acquire a (set of) messages through an explicit acquire call - see Subscription::acquire().

Definition at line 81 of file SubscriptionSettings.h.

< ACQUIRE_MODE_PRE_ACQUIRED or ACQUIRE_MODE_NOT_ACQUIRED

Configures the frequency at which messages are automatically accepted (e.g. a value of 5 means that messages are accepted in batches of 5). A value of 0 means no automatic acknowledgement will occur and the application will itself be responsible for accepting messages.

Definition at line 90 of file SubscriptionSettings.h.

In windowing mode, completion of a message will cause the credit used up by that message to be reallocated.

The subscriptions completion mode controls how completion is managed.

If set to COMPLETE_ON_DELIVERY (which is the default), messages will be marked as completed once they have been received. The server will be explicitly notified of all completed messages for the session when the next accept is sent through the subscription (either explictly or through autAck). However the server may also periodically request information on the completed messages.

If set to COMPLETE_ON_ACCEPT, messages will be marked as completed once they are accepted (via the Subscription class) and the server will also be notified of all completed messages for the session.

If set to MANUAL_COMPLETION the application is responsible for completing messages (

See also:
Session::markCompleted()).

Definition at line 113 of file SubscriptionSettings.h.

If set, requests that no other subscriber be allowed to access the queue while this subscription is active.

Definition at line 118 of file SubscriptionSettings.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00172.html0000664000076400007640000001406511752725720017317 0ustar00jrossjross00000000000000 qpid::framing::Buffer::Iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Buffer::Iterator Class Reference

Buffer input/output iterator. More...

#include <qpid/framing/Buffer.h>

List of all members.

Public Member Functions

 Iterator (Buffer &b)

Detailed Description

Buffer input/output iterator.

Supports using an amqp_0_10::Codec with a framing::Buffer.


Constructor & Destructor Documentation

qpid::framing::Buffer::Iterator::Iterator ( Buffer b) [inline]

Definition at line 56 of file Buffer.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00225.html0000664000076400007640000002435311752725720017317 0ustar00jrossjross00000000000000 qpid::framing::NotAllowedException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::NotAllowedException Struct Reference

The peer tried to use a command a manner that is inconsistent with the rules described in the specification. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 NotAllowedException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The peer tried to use a command a manner that is inconsistent with the rules described in the specification.


Constructor & Destructor Documentation

qpid::framing::NotAllowedException::NotAllowedException ( const std::string msg = std::string()) [inline]

Definition at line 147 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::NotAllowedException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 146 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00336.html0000664000076400007640000002620311752725720017316 0ustar00jrossjross00000000000000 qpid::console::SessionManager::Settings Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SessionManager::Settings Struct Reference

#include <qpid/console/SessionManager.h>

List of all members.

Public Member Functions

 Settings ()

Public Attributes

bool rcvObjects
bool rcvEvents
bool rcvHeartbeats
bool userBindings
uint32_t methodTimeout
uint32_t getTimeout

Constructor & Destructor Documentation

qpid::console::SessionManager::Settings::Settings ( ) [inline]

Definition at line 65 of file SessionManager.h.


Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00389.html0000664000076400007640000001022711752725720017325 0ustar00jrossjross00000000000000 std::wifstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wifstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00491.html0000664000076400007640000001126311752725717017326 0ustar00jrossjross00000000000000 qpid/types/Exception.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/types/Exception.h File Reference
#include <string>
#include "qpid/types/ImportExport.h"

Go to the source code of this file.

Classes

class  qpid::types::Exception

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::types

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/bc_s.png0000664000076400007640000000124511752725717017235 0ustar00jrossjross00000000000000‰PNG  IHDR /ð9ÐlIDATxíÝKHTmðÿóžwfÎgæÌ¯å8ŽÓ˜—Š6ñ-BÚ´‘]d–VZMa…D}ßg¸háB¤¶*Ñýbå¥U9Š—3ƒŽFy<£‹ šaæè²í³yøÿÎóžÅóî©ýÁÇåþtðªÚ %”8Vj•LÜlø·ÅCF@mÃÿˆÞ[”ïü À7ªj¿RÀ•ûC0TâU‹Y¸øYÕú’ÿsv~Æî,Ûi)€.w €™ˆæwø\cT i Ðúÿ`¼owgÛö»âH0¤5%À¥ÿ>Äû\.°ÉÒ×*O0¬-c}BàÞûä+msË…VÑÔ5Ö:€Îß}— *l’©Çç–cÁV¸€OÅ^ÅaâìÔXxñ)µÜ0‚ãé²xrKfÚÜxx±Ššo½5Ièk±WaŒÑjºùÆà¶;ÛVá´[¨ñÆ«Í@¥ÃfnöäØ¿°ÍRÕ.‡¨¬®B¥×_C™ˆæK|.¬ý²Ÿ®½0‚3ŠTŸ¥H¡‰½†Ž¶=7‚ ßã´™8k˜œÑ_Ó‘«Ï’Ã2«Èz·:V&fôBv—Ní9iVÎY— Õµ>‰‡.Qx{¾E“³ú»Ê‡˜'‰|dj6ÚØ‡ÚÀãx?åÏsJ‚@uÓ‘hbI„Ò½‡Ö2ì“,¼F¶[bÓ‘h e'«Ïõ@;Û^d•x·‰þ›¶ôg2Fa¿G^ÿ @,é) êlß… §Të’-ãêÜRý†—UÙÜ*È•EΩ64·4lÜÄÙ #èjDßþú Ųo{”N IEND®B`‚qpidc-0.16/docs/api/html/a00605.html0000664000076400007640000002254411752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::Data Member List
This is the complete list of members for qmf::Data, including all inherited members.
Data(DataImpl *impl=0)qmf::Data
Data(const Data &)qmf::Data
Data(const Schema &)qmf::Data
getAddr() const qmf::Data
getAgent() const qmf::Data
getProperties() const qmf::Data
getProperty(const std::string &) const qmf::Data
getSchemaId() const qmf::Data
Handle()qmf::Handle< DataImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< DataImpl > [protected]
hasAddr() const qmf::Data
hasAgent() const qmf::Data
hasSchema() const qmf::Data
implqmf::Handle< DataImpl > [protected]
Impl typedefqmf::Handle< DataImpl > [protected]
isNull() const qmf::Handle< DataImpl > [inline]
isValid() const qmf::Handle< DataImpl > [inline]
operator bool() const qmf::Handle< DataImpl > [inline]
operator!() const qmf::Handle< DataImpl > [inline]
operator=(const Data &)qmf::Data
Handle< DataImpl >::operator=(const Handle &)qmf::Handle< DataImpl > [protected]
overwriteProperties(const qpid::types::Variant::Map &)qmf::Data
setAddr(const DataAddr &)qmf::Data
setProperty(const std::string &, const qpid::types::Variant &)qmf::Data
swap(Handle< T > &h)qmf::Handle< DataImpl > [inline]
~Data()qmf::Data

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00102.html0000664000076400007640000004674711752725720017324 0ustar00jrossjross00000000000000 qpid::framing::DtxRecoverResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::DtxRecoverResult Class Reference

#include <qpid/framing/DtxRecoverResult.h>

List of all members.

Public Member Functions

 DtxRecoverResult (const Array &_inDoubt)
 DtxRecoverResult ()
void setInDoubt (const Array &_inDoubt)
const ArraygetInDoubt () const
bool hasInDoubt () const
void clearInDoubtFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1539

Friends

std::ostreamoperator<< (std::ostream &, const DtxRecoverResult &)

Constructor & Destructor Documentation

qpid::framing::DtxRecoverResult::DtxRecoverResult ( const Array _inDoubt) [inline]

Definition at line 43 of file DtxRecoverResult.h.

qpid::framing::DtxRecoverResult::DtxRecoverResult ( ) [inline]

Definition at line 49 of file DtxRecoverResult.h.


Member Function Documentation

uint32_t qpid::framing::DtxRecoverResult::bodySize ( ) const
void qpid::framing::DtxRecoverResult::clearInDoubtFlag ( )
void qpid::framing::DtxRecoverResult::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::DtxRecoverResult::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::DtxRecoverResult::encode ( Buffer ) const
uint32_t qpid::framing::DtxRecoverResult::encodedSize ( ) const
void qpid::framing::DtxRecoverResult::encodeStructBody ( Buffer ) const
const Array& qpid::framing::DtxRecoverResult::getInDoubt ( ) const
bool qpid::framing::DtxRecoverResult::hasInDoubt ( ) const
void qpid::framing::DtxRecoverResult::print ( std::ostream out) const
void qpid::framing::DtxRecoverResult::setInDoubt ( const Array _inDoubt)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const DtxRecoverResult  
) [friend]

Member Data Documentation

Definition at line 42 of file DtxRecoverResult.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00362.html0000664000076400007640000004363411752725720017324 0ustar00jrossjross00000000000000 qpid::client::TypedResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::TypedResult Class Reference

Returned by asynchronous commands that return a result. More...

#include <qpid/client/TypedResult.h>

List of all members.

Public Member Functions

 TypedResult (const Completion &c)
T & get ()
 Wait for the asynchronous command that returned this TypedResult to complete and return its result.
void wait ()
 Wait for the asynchronous command that returned this Completion to complete.
bool isComplete ()
QPID_CLIENT_INLINE_EXTERN bool isValid () const
QPID_CLIENT_INLINE_EXTERN bool isNull () const
QPID_CLIENT_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_CLIENT_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Member Functions

std::string getResult ()

Protected Attributes

Impl * impl

Detailed Description

Returned by asynchronous commands that return a result.

You can use get() to wait for completion and get the result value.


Constructor & Destructor Documentation

qpid::client::TypedResult::TypedResult ( const Completion c) [inline]

Definition at line 43 of file TypedResult.h.


Member Function Documentation

T& qpid::client::TypedResult::get ( ) [inline]

Wait for the asynchronous command that returned this TypedResult to complete and return its result.

Returns:
The result returned by the command.
Exceptions:
Ifthe command returns an error, get() throws an exception.

Definition at line 53 of file TypedResult.h.

References qpid::framing::StructHelper::decode(), and qpid::client::Completion::getResult().

std::string qpid::client::Completion::getResult ( ) [protected, inherited]

Referenced by get().

bool qpid::client::Completion::isComplete ( ) [inherited]
QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN qpid::client::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

void qpid::client::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.

void qpid::client::Completion::wait ( ) [inherited]

Wait for the asynchronous command that returned this Completion to complete.

Exceptions:
Ifthe command returns an error.

Member Data Documentation

Impl* qpid::client::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00630.html0000664000076400007640000001253411752725717017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Message Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00024.html0000664000076400007640000001020611752725720017304 0ustar00jrossjross00000000000000 std::bad_alloc Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::bad_alloc Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00652.html0000664000076400007640000001304211752725717017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::SessionException Member List
This is the complete list of members for qpid::SessionException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00425.html0000664000076400007640000001402511752725717017322 0ustar00jrossjross00000000000000 qmf/engine/QmfEngineImportExport.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/QmfEngineImportExport.h File Reference

Go to the source code of this file.

Defines

#define QMFE_EXTERN
#define QMFE_CLASS_EXTERN
#define QMFE_INLINE_EXTERN

Define Documentation

#define QMFE_CLASS_EXTERN

Definition at line 38 of file QmfEngineImportExport.h.

#define QMFE_EXTERN

Definition at line 37 of file QmfEngineImportExport.h.

#define QMFE_INLINE_EXTERN

Definition at line 39 of file QmfEngineImportExport.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00245.html0000664000076400007640000001022411752725720017311 0ustar00jrossjross00000000000000 std::out_of_range Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::out_of_range Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00258.html0000664000076400007640000004615111752725717017333 0ustar00jrossjross00000000000000 qmf::engine::Query Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Query Class Reference

#include <qmf/engine/Query.h>

List of all members.

Public Member Functions

 Query (const char *className, const char *packageName)
 Query (const SchemaClassKey *key)
 Query (const ObjectId *oid)
 Query (const Query &from)
 ~Query ()
void setSelect (const QueryOperand *criterion)
void setLimit (uint32_t maxResults)
void setOrderBy (const char *attrName, bool decreasing)
const char * getPackage () const
const char * getClass () const
const ObjectIdgetObjectId () const
bool haveSelect () const
bool haveLimit () const
bool haveOrderBy () const
const QueryOperandgetSelect () const
uint32_t getLimit () const
const char * getOrderBy () const
bool getDecreasing () const

Constructor & Destructor Documentation

qmf::engine::Query::Query ( const char *  className,
const char *  packageName 
)
qmf::engine::Query::Query ( const SchemaClassKey key)
qmf::engine::Query::Query ( const ObjectId oid)
qmf::engine::Query::Query ( const Query from)
qmf::engine::Query::~Query ( )

Member Function Documentation

const char* qmf::engine::Query::getClass ( ) const
bool qmf::engine::Query::getDecreasing ( ) const
uint32_t qmf::engine::Query::getLimit ( ) const
const ObjectId* qmf::engine::Query::getObjectId ( ) const
const char* qmf::engine::Query::getOrderBy ( ) const
const char* qmf::engine::Query::getPackage ( ) const
const QueryOperand* qmf::engine::Query::getSelect ( ) const
bool qmf::engine::Query::haveLimit ( ) const
bool qmf::engine::Query::haveOrderBy ( ) const
bool qmf::engine::Query::haveSelect ( ) const
void qmf::engine::Query::setLimit ( uint32_t  maxResults)
void qmf::engine::Query::setOrderBy ( const char *  attrName,
bool  decreasing 
)
void qmf::engine::Query::setSelect ( const QueryOperand criterion)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00475.html0000664000076400007640000001503511752725717017331 0ustar00jrossjross00000000000000 qpid/client/QueueOptions.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/QueueOptions.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::QueueOptions
 A help class to set options on the Queue. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Enumerations

enum  qpid::client::QueueSizePolicy {
  qpid::client::NONE, qpid::client::REJECT, qpid::client::FLOW_TO_DISK, qpid::client::RING,
  qpid::client::RING_STRICT
}
enum  qpid::client::QueueOrderingPolicy { qpid::client::FIFO, qpid::client::LVQ, qpid::client::LVQ_NO_BROWSE }

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00468_source.html0000664000076400007640000002002511752725717020706 0ustar00jrossjross00000000000000 qpid/client/FutureCompletion.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FutureCompletion.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 
00022 #ifndef _FutureCompletion_
00023 #define _FutureCompletion_
00024 
00025 #include "qpid/framing/amqp_framing.h"
00026 #include "qpid/sys/Monitor.h"
00027 
00028 namespace qpid {
00029 namespace client {
00030 
00032 class FutureCompletion
00033 {
00034 protected:
00035     mutable sys::Monitor lock;
00036     bool complete;
00037 
00038 public:
00039     FutureCompletion();
00040     virtual ~FutureCompletion(){}
00041     bool isComplete() const;
00042     void waitForCompletion() const;
00043     void completed();
00044 };
00045 
00046 }}
00047 
00048 
00049 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x68.html0000664000076400007640000003772311752725717021316 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- h -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x73.html0000664000076400007640000003367611752725720022606 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- s -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x63.html0000664000076400007640000004610311752725720023601 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- c -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00712.html0000664000076400007640000002404011752725720017311 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Object Member List
This is the complete list of members for qpid::console::Object, including all inherited members.
attrBool(const std::string &key) const qpid::console::Object
attrDouble(const std::string &key) const qpid::console::Object
attrFloat(const std::string &key) const qpid::console::Object
attrInt(const std::string &key) const qpid::console::Object
attrInt64(const std::string &key) const qpid::console::Object
attrMap(const std::string &key) const qpid::console::Object
attrRef(const std::string &key) const qpid::console::Object
attrString(const std::string &key) const qpid::console::Object
attrUint(const std::string &key) const qpid::console::Object
attrUint64(const std::string &key) const qpid::console::Object
attrUuid(const std::string &key) const qpid::console::Object
getAttributes() const qpid::console::Object [inline]
getBroker() const qpid::console::Object [inline]
getClassKey() const qpid::console::Object
getCreateTime() const qpid::console::Object [inline]
getCurrentTime() const qpid::console::Object [inline]
getDeleteTime() const qpid::console::Object [inline]
getIndex() const qpid::console::Object
getObjectId() const qpid::console::Object [inline]
getSchema() const qpid::console::Object [inline]
handleMethodResp(framing::Buffer &buffer, uint32_t sequence)qpid::console::Object
invokeMethod(const std::string name, const AttributeMap &args, MethodResponse &result)qpid::console::Object
isDeleted() const qpid::console::Object [inline]
mergeUpdate(const Object &updated)qpid::console::Object
Object(Broker *broker, SchemaClass *schemaClass, framing::Buffer &buffer, bool prop, bool stat)qpid::console::Object
Vector typedefqpid::console::Object
~Object()qpid::console::Object

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00100.html0000664000076400007640000007771111752725720017315 0ustar00jrossjross00000000000000 qpid::console::DoubleValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::DoubleValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 DoubleValue (double v)
std::string str () const
bool isDouble () const
double asDouble () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::DoubleValue::DoubleValue ( double  v) [inline]

Definition at line 175 of file Value.h.


Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

double qpid::console::DoubleValue::asDouble ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 178 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

bool qpid::console::DoubleValue::isDouble ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 177 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::DoubleValue::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00088.html0000664000076400007640000001037611752725720017326 0ustar00jrossjross00000000000000 std::map::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::map::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00289.html0000664000076400007640000001035611752725720017327 0ustar00jrossjross00000000000000 std::deque::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::deque::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00304.html0000664000076400007640000005355711752725717017333 0ustar00jrossjross00000000000000 qmf::SchemaMethod Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::SchemaMethod Class Reference

#include <qmf/SchemaMethod.h>

List of all members.

Public Member Functions

 SchemaMethod (SchemaMethodImpl *impl=0)
 SchemaMethod (const SchemaMethod &)
SchemaMethodoperator= (const SchemaMethod &)
 ~SchemaMethod ()
 SchemaMethod (const std::string &, const std::string &o="")
void setDesc (const std::string &)
void addArgument (const SchemaProperty &)
const std::stringgetName () const
const std::stringgetDesc () const
uint32_t getArgumentCount () const
SchemaProperty getArgument (uint32_t) const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::SchemaMethod::SchemaMethod ( SchemaMethodImpl *  impl = 0)
qmf::SchemaMethod::SchemaMethod ( const SchemaMethod )
qmf::SchemaMethod::~SchemaMethod ( )
qmf::SchemaMethod::SchemaMethod ( const std::string ,
const std::string o = "" 
)

Member Function Documentation

void qmf::SchemaMethod::addArgument ( const SchemaProperty )
SchemaProperty qmf::SchemaMethod::getArgument ( uint32_t  ) const
uint32_t qmf::SchemaMethod::getArgumentCount ( ) const
const std::string& qmf::SchemaMethod::getDesc ( ) const
const std::string& qmf::SchemaMethod::getName ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

SchemaMethod& qmf::SchemaMethod::operator= ( const SchemaMethod )
void qmf::SchemaMethod::setDesc ( const std::string )
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00454.html0000664000076400007640000001460611752725717017331 0ustar00jrossjross00000000000000 qpid/agent/QmfAgentImportExport.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/agent/QmfAgentImportExport.h File Reference

Go to the source code of this file.

Defines

#define QMF_AGENT_EXTERN   QPID_IMPORT
#define QMF_AGENT_CLASS_EXTERN   QPID_CLASS_IMPORT
#define QMF_AGENT_INLINE_EXTERN   QPID_INLINE_IMPORT

Define Documentation

#define QMF_AGENT_CLASS_EXTERN   QPID_CLASS_IMPORT

Definition at line 31 of file QmfAgentImportExport.h.

#define QMF_AGENT_EXTERN   QPID_IMPORT

Definition at line 30 of file QmfAgentImportExport.h.

#define QMF_AGENT_INLINE_EXTERN   QPID_INLINE_IMPORT

Definition at line 32 of file QmfAgentImportExport.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00862.html0000664000076400007640000001361511752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::TransactionError Member List
This is the complete list of members for qpid::messaging::TransactionError, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
MessagingException(const std::string &msg)qpid::messaging::MessagingException
SessionError(const std::string &)qpid::messaging::SessionError
TransactionError(const std::string &)qpid::messaging::TransactionError
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x63.html0000664000076400007640000005740211752725717021305 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- c -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00804.html0000664000076400007640000001373011752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FramingErrorException Member List
This is the complete list of members for qpid::framing::FramingErrorException, including all inherited members.
codeqpid::ConnectionException
ConnectionException(framing::connection::CloseCode _code, const std::string &message)qpid::ConnectionException [inline]
Exception(const std::string &message=std::string())qpid::Exception [explicit]
FramingErrorException(const std::string &msg=std::string())qpid::framing::FramingErrorException [inline]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::FramingErrorException [inline, virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00176.html0000664000076400007640000001032611752725720017317 0ustar00jrossjross00000000000000 std::wstring::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wstring::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00741.html0000664000076400007640000001256611752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::OutOfBounds Member List
This is the complete list of members for qpid::framing::OutOfBounds, including all inherited members.
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
OutOfBounds()qpid::framing::OutOfBounds [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00474_source.html0000664000076400007640000020121711752725717020707 0ustar00jrossjross00000000000000 qpid/client/Session_0_10.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Session_0_10.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_SESSION_0_10_H
00002 #define QPID_CLIENT_SESSION_0_10_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #include "qpid/client/no_keyword/Session_0_10.h"
00031 #include "qpid/client/arg.h"
00032 #include "qpid/client/ClientImportExport.h"
00033 
00034 namespace qpid {
00035 namespace client {
00036 
00189 class Session_0_10:
00190     public no_keyword::Session_0_10
00191 {
00192   public:
00193     
00194     QPID_CLIENT_EXTERN Session_0_10();
00195     QPID_CLIENT_INLINE_EXTERN Session_0_10(const SessionBase_0_10& other);
00196     QPID_CLIENT_INLINE_EXTERN Session_0_10& operator=(const SessionBase_0_10& other);
00197   private:
00198     typedef boost::parameter::parameters<arg::keyword_tags::sync> ExecutionSyncParameters;
00199     
00200     typedef boost::parameter::parameters<arg::keyword_tags::commandId,arg::keyword_tags::value,arg::keyword_tags::sync> ExecutionResultParameters;
00201     
00202     typedef boost::parameter::parameters<arg::keyword_tags::errorCode,arg::keyword_tags::commandId,arg::keyword_tags::classCode,arg::keyword_tags::commandCode,arg::keyword_tags::fieldIndex,arg::keyword_tags::description,arg::keyword_tags::errorInfo,arg::keyword_tags::sync> ExecutionExceptionParameters;
00203     
00204     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::acceptMode,arg::keyword_tags::acquireMode,arg::keyword_tags::content,arg::keyword_tags::sync> MessageTransferParameters;
00205     
00206     typedef boost::parameter::parameters<arg::keyword_tags::transfers,arg::keyword_tags::sync> MessageAcceptParameters;
00207     
00208     typedef boost::parameter::parameters<arg::keyword_tags::transfers,arg::keyword_tags::code,arg::keyword_tags::text,arg::keyword_tags::sync> MessageRejectParameters;
00209     
00210     typedef boost::parameter::parameters<arg::keyword_tags::transfers,arg::keyword_tags::setRedelivered,arg::keyword_tags::sync> MessageReleaseParameters;
00211     
00212     typedef boost::parameter::parameters<arg::keyword_tags::transfers,arg::keyword_tags::sync> MessageAcquireParameters;
00213     
00214     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::resumeId,arg::keyword_tags::sync> MessageResumeParameters;
00215     
00216     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::destination,arg::keyword_tags::acceptMode,arg::keyword_tags::acquireMode,arg::keyword_tags::exclusive,arg::keyword_tags::resumeId,arg::keyword_tags::resumeTtl,arg::keyword_tags::arguments,arg::keyword_tags::sync> MessageSubscribeParameters;
00217     
00218     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::sync> MessageCancelParameters;
00219     
00220     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::flowMode,arg::keyword_tags::sync> MessageSetFlowModeParameters;
00221     
00222     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::unit,arg::keyword_tags::value,arg::keyword_tags::sync> MessageFlowParameters;
00223     
00224     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::sync> MessageFlushParameters;
00225     
00226     typedef boost::parameter::parameters<arg::keyword_tags::destination,arg::keyword_tags::sync> MessageStopParameters;
00227     
00228     typedef boost::parameter::parameters<arg::keyword_tags::sync> TxSelectParameters;
00229     
00230     typedef boost::parameter::parameters<arg::keyword_tags::sync> TxCommitParameters;
00231     
00232     typedef boost::parameter::parameters<arg::keyword_tags::sync> TxRollbackParameters;
00233     
00234     typedef boost::parameter::parameters<arg::keyword_tags::sync> DtxSelectParameters;
00235     
00236     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::join,arg::keyword_tags::resume,arg::keyword_tags::sync> DtxStartParameters;
00237     
00238     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::fail,arg::keyword_tags::suspend,arg::keyword_tags::sync> DtxEndParameters;
00239     
00240     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::onePhase,arg::keyword_tags::sync> DtxCommitParameters;
00241     
00242     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::sync> DtxForgetParameters;
00243     
00244     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::sync> DtxGetTimeoutParameters;
00245     
00246     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::sync> DtxPrepareParameters;
00247     
00248     typedef boost::parameter::parameters<arg::keyword_tags::sync> DtxRecoverParameters;
00249     
00250     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::sync> DtxRollbackParameters;
00251     
00252     typedef boost::parameter::parameters<arg::keyword_tags::xid,arg::keyword_tags::timeout,arg::keyword_tags::sync> DtxSetTimeoutParameters;
00253     
00254     typedef boost::parameter::parameters<arg::keyword_tags::exchange,arg::keyword_tags::type,arg::keyword_tags::alternateExchange,arg::keyword_tags::passive,arg::keyword_tags::durable,arg::keyword_tags::autoDelete,arg::keyword_tags::arguments,arg::keyword_tags::sync> ExchangeDeclareParameters;
00255     
00256     typedef boost::parameter::parameters<arg::keyword_tags::exchange,arg::keyword_tags::ifUnused,arg::keyword_tags::sync> ExchangeDeleteParameters;
00257     
00258     typedef boost::parameter::parameters<arg::keyword_tags::name,arg::keyword_tags::sync> ExchangeQueryParameters;
00259     
00260     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::exchange,arg::keyword_tags::bindingKey,arg::keyword_tags::arguments,arg::keyword_tags::sync> ExchangeBindParameters;
00261     
00262     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::exchange,arg::keyword_tags::bindingKey,arg::keyword_tags::sync> ExchangeUnbindParameters;
00263     
00264     typedef boost::parameter::parameters<arg::keyword_tags::exchange,arg::keyword_tags::queue,arg::keyword_tags::bindingKey,arg::keyword_tags::arguments,arg::keyword_tags::sync> ExchangeBoundParameters;
00265     
00266     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::alternateExchange,arg::keyword_tags::passive,arg::keyword_tags::durable,arg::keyword_tags::exclusive,arg::keyword_tags::autoDelete,arg::keyword_tags::arguments,arg::keyword_tags::sync> QueueDeclareParameters;
00267     
00268     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::ifUnused,arg::keyword_tags::ifEmpty,arg::keyword_tags::sync> QueueDeleteParameters;
00269     
00270     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::sync> QueuePurgeParameters;
00271     
00272     typedef boost::parameter::parameters<arg::keyword_tags::queue,arg::keyword_tags::sync> QueueQueryParameters;
00273     
00274     friend class Connection;
00275   public:
00276     BOOST_PARAMETER_MEMFUN(void, executionSync, 0, 1, ExecutionSyncParameters) {
00277         return no_keyword::Session_0_10::executionSync(
00278             p[arg::sync|true]);
00279     }
00280     
00281     BOOST_PARAMETER_MEMFUN(void, executionResult, 0, 3, ExecutionResultParameters) {
00282         return no_keyword::Session_0_10::executionResult(
00283             p[arg::commandId|SequenceNumber()],
00284             p[arg::value|std::string()],
00285             p[arg::sync|true]);
00286     }
00287     
00288     BOOST_PARAMETER_MEMFUN(void, executionException, 0, 8, ExecutionExceptionParameters) {
00289         return no_keyword::Session_0_10::executionException(
00290             p[arg::errorCode|0],
00291             p[arg::commandId|SequenceNumber()],
00292             p[arg::classCode|0],
00293             p[arg::commandCode|0],
00294             p[arg::fieldIndex|0],
00295             p[arg::description|std::string()],
00296             p[arg::errorInfo|FieldTable()],
00297             p[arg::sync|true]);
00298     }
00299     
00300     BOOST_PARAMETER_MEMFUN(void, messageTransfer, 0, 5, MessageTransferParameters) {
00301         return no_keyword::Session_0_10::messageTransfer(
00302             p[arg::destination|std::string()],
00303             p[arg::acceptMode|1],
00304             p[arg::acquireMode|0],
00305             p[arg::content|Message(std::string())],
00306             p[arg::sync|true]);
00307     }
00308     
00309     BOOST_PARAMETER_MEMFUN(void, messageAccept, 0, 2, MessageAcceptParameters) {
00310         return no_keyword::Session_0_10::messageAccept(
00311             p[arg::transfers|SequenceSet()],
00312             p[arg::sync|true]);
00313     }
00314     
00315     BOOST_PARAMETER_MEMFUN(void, messageReject, 0, 4, MessageRejectParameters) {
00316         return no_keyword::Session_0_10::messageReject(
00317             p[arg::transfers|SequenceSet()],
00318             p[arg::code|0],
00319             p[arg::text|std::string()],
00320             p[arg::sync|true]);
00321     }
00322     
00323     BOOST_PARAMETER_MEMFUN(void, messageRelease, 0, 3, MessageReleaseParameters) {
00324         return no_keyword::Session_0_10::messageRelease(
00325             p[arg::transfers|SequenceSet()],
00326             p[arg::setRedelivered|false],
00327             p[arg::sync|true]);
00328     }
00329     
00330     BOOST_PARAMETER_MEMFUN(qpid::framing::MessageAcquireResult, messageAcquire, 0, 2, MessageAcquireParameters) {
00331         return no_keyword::Session_0_10::messageAcquire(
00332             p[arg::transfers|SequenceSet()],
00333             p[arg::sync|true]);
00334     }
00335     
00336     BOOST_PARAMETER_MEMFUN(qpid::framing::MessageResumeResult, messageResume, 0, 3, MessageResumeParameters) {
00337         return no_keyword::Session_0_10::messageResume(
00338             p[arg::destination|std::string()],
00339             p[arg::resumeId|std::string()],
00340             p[arg::sync|true]);
00341     }
00342     
00343     BOOST_PARAMETER_MEMFUN(void, messageSubscribe, 0, 9, MessageSubscribeParameters) {
00344         return no_keyword::Session_0_10::messageSubscribe(
00345             p[arg::queue|std::string()],
00346             p[arg::destination|std::string()],
00347             p[arg::acceptMode|0],
00348             p[arg::acquireMode|0],
00349             p[arg::exclusive|false],
00350             p[arg::resumeId|std::string()],
00351             p[arg::resumeTtl|0],
00352             p[arg::arguments|FieldTable()],
00353             p[arg::sync|true]);
00354     }
00355     
00356     BOOST_PARAMETER_MEMFUN(void, messageCancel, 0, 2, MessageCancelParameters) {
00357         return no_keyword::Session_0_10::messageCancel(
00358             p[arg::destination|std::string()],
00359             p[arg::sync|true]);
00360     }
00361     
00362     BOOST_PARAMETER_MEMFUN(void, messageSetFlowMode, 0, 3, MessageSetFlowModeParameters) {
00363         return no_keyword::Session_0_10::messageSetFlowMode(
00364             p[arg::destination|std::string()],
00365             p[arg::flowMode|0],
00366             p[arg::sync|true]);
00367     }
00368     
00369     BOOST_PARAMETER_MEMFUN(void, messageFlow, 0, 4, MessageFlowParameters) {
00370         return no_keyword::Session_0_10::messageFlow(
00371             p[arg::destination|std::string()],
00372             p[arg::unit|0],
00373             p[arg::value|0],
00374             p[arg::sync|true]);
00375     }
00376     
00377     BOOST_PARAMETER_MEMFUN(void, messageFlush, 0, 2, MessageFlushParameters) {
00378         return no_keyword::Session_0_10::messageFlush(
00379             p[arg::destination|std::string()],
00380             p[arg::sync|true]);
00381     }
00382     
00383     BOOST_PARAMETER_MEMFUN(void, messageStop, 0, 2, MessageStopParameters) {
00384         return no_keyword::Session_0_10::messageStop(
00385             p[arg::destination|std::string()],
00386             p[arg::sync|true]);
00387     }
00388     
00389     BOOST_PARAMETER_MEMFUN(void, txSelect, 0, 1, TxSelectParameters) {
00390         return no_keyword::Session_0_10::txSelect(
00391             p[arg::sync|true]);
00392     }
00393     
00394     BOOST_PARAMETER_MEMFUN(void, txCommit, 0, 1, TxCommitParameters) {
00395         return no_keyword::Session_0_10::txCommit(
00396             p[arg::sync|true]);
00397     }
00398     
00399     BOOST_PARAMETER_MEMFUN(void, txRollback, 0, 1, TxRollbackParameters) {
00400         return no_keyword::Session_0_10::txRollback(
00401             p[arg::sync|true]);
00402     }
00403     
00404     BOOST_PARAMETER_MEMFUN(void, dtxSelect, 0, 1, DtxSelectParameters) {
00405         return no_keyword::Session_0_10::dtxSelect(
00406             p[arg::sync|true]);
00407     }
00408     
00409     BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxStart, 0, 4, DtxStartParameters) {
00410         return no_keyword::Session_0_10::dtxStart(
00411             p[arg::xid|Xid()],
00412             p[arg::join|false],
00413             p[arg::resume|false],
00414             p[arg::sync|true]);
00415     }
00416     
00417     BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxEnd, 0, 4, DtxEndParameters) {
00418         return no_keyword::Session_0_10::dtxEnd(
00419             p[arg::xid|Xid()],
00420             p[arg::fail|false],
00421             p[arg::suspend|false],
00422             p[arg::sync|true]);
00423     }
00424     
00425     BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxCommit, 0, 3, DtxCommitParameters) {
00426         return no_keyword::Session_0_10::dtxCommit(
00427             p[arg::xid|Xid()],
00428             p[arg::onePhase|false],
00429             p[arg::sync|true]);
00430     }
00431     
00432     BOOST_PARAMETER_MEMFUN(void, dtxForget, 0, 2, DtxForgetParameters) {
00433         return no_keyword::Session_0_10::dtxForget(
00434             p[arg::xid|Xid()],
00435             p[arg::sync|true]);
00436     }
00437     
00438     BOOST_PARAMETER_MEMFUN(qpid::framing::DtxGetTimeoutResult, dtxGetTimeout, 0, 2, DtxGetTimeoutParameters) {
00439         return no_keyword::Session_0_10::dtxGetTimeout(
00440             p[arg::xid|Xid()],
00441             p[arg::sync|true]);
00442     }
00443     
00444     BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxPrepare, 0, 2, DtxPrepareParameters) {
00445         return no_keyword::Session_0_10::dtxPrepare(
00446             p[arg::xid|Xid()],
00447             p[arg::sync|true]);
00448     }
00449     
00450     BOOST_PARAMETER_MEMFUN(qpid::framing::DtxRecoverResult, dtxRecover, 0, 1, DtxRecoverParameters) {
00451         return no_keyword::Session_0_10::dtxRecover(
00452             p[arg::sync|true]);
00453     }
00454     
00455     BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxRollback, 0, 2, DtxRollbackParameters) {
00456         return no_keyword::Session_0_10::dtxRollback(
00457             p[arg::xid|Xid()],
00458             p[arg::sync|true]);
00459     }
00460     
00461     BOOST_PARAMETER_MEMFUN(void, dtxSetTimeout, 0, 3, DtxSetTimeoutParameters) {
00462         return no_keyword::Session_0_10::dtxSetTimeout(
00463             p[arg::xid|Xid()],
00464             p[arg::timeout|0],
00465             p[arg::sync|true]);
00466     }
00467     
00468     BOOST_PARAMETER_MEMFUN(void, exchangeDeclare, 0, 8, ExchangeDeclareParameters) {
00469         return no_keyword::Session_0_10::exchangeDeclare(
00470             p[arg::exchange|std::string()],
00471             p[arg::type|std::string()],
00472             p[arg::alternateExchange|std::string()],
00473             p[arg::passive|false],
00474             p[arg::durable|false],
00475             p[arg::autoDelete|false],
00476             p[arg::arguments|FieldTable()],
00477             p[arg::sync|true]);
00478     }
00479     
00480     BOOST_PARAMETER_MEMFUN(void, exchangeDelete, 0, 3, ExchangeDeleteParameters) {
00481         return no_keyword::Session_0_10::exchangeDelete(
00482             p[arg::exchange|std::string()],
00483             p[arg::ifUnused|false],
00484             p[arg::sync|true]);
00485     }
00486     
00487     BOOST_PARAMETER_MEMFUN(qpid::framing::ExchangeQueryResult, exchangeQuery, 0, 2, ExchangeQueryParameters) {
00488         return no_keyword::Session_0_10::exchangeQuery(
00489             p[arg::name|std::string()],
00490             p[arg::sync|true]);
00491     }
00492     
00493     BOOST_PARAMETER_MEMFUN(void, exchangeBind, 0, 5, ExchangeBindParameters) {
00494         return no_keyword::Session_0_10::exchangeBind(
00495             p[arg::queue|std::string()],
00496             p[arg::exchange|std::string()],
00497             p[arg::bindingKey|std::string()],
00498             p[arg::arguments|FieldTable()],
00499             p[arg::sync|true]);
00500     }
00501     
00502     BOOST_PARAMETER_MEMFUN(void, exchangeUnbind, 0, 4, ExchangeUnbindParameters) {
00503         return no_keyword::Session_0_10::exchangeUnbind(
00504             p[arg::queue|std::string()],
00505             p[arg::exchange|std::string()],
00506             p[arg::bindingKey|std::string()],
00507             p[arg::sync|true]);
00508     }
00509     
00510     BOOST_PARAMETER_MEMFUN(qpid::framing::ExchangeBoundResult, exchangeBound, 0, 5, ExchangeBoundParameters) {
00511         return no_keyword::Session_0_10::exchangeBound(
00512             p[arg::exchange|std::string()],
00513             p[arg::queue|std::string()],
00514             p[arg::bindingKey|std::string()],
00515             p[arg::arguments|FieldTable()],
00516             p[arg::sync|true]);
00517     }
00518     
00519     BOOST_PARAMETER_MEMFUN(void, queueDeclare, 0, 8, QueueDeclareParameters) {
00520         return no_keyword::Session_0_10::queueDeclare(
00521             p[arg::queue|std::string()],
00522             p[arg::alternateExchange|std::string()],
00523             p[arg::passive|false],
00524             p[arg::durable|false],
00525             p[arg::exclusive|false],
00526             p[arg::autoDelete|false],
00527             p[arg::arguments|FieldTable()],
00528             p[arg::sync|true]);
00529     }
00530     
00531     BOOST_PARAMETER_MEMFUN(void, queueDelete, 0, 4, QueueDeleteParameters) {
00532         return no_keyword::Session_0_10::queueDelete(
00533             p[arg::queue|std::string()],
00534             p[arg::ifUnused|false],
00535             p[arg::ifEmpty|false],
00536             p[arg::sync|true]);
00537     }
00538     
00539     BOOST_PARAMETER_MEMFUN(void, queuePurge, 0, 2, QueuePurgeParameters) {
00540         return no_keyword::Session_0_10::queuePurge(
00541             p[arg::queue|std::string()],
00542             p[arg::sync|true]);
00543     }
00544     
00545     BOOST_PARAMETER_MEMFUN(qpid::framing::QueueQueryResult, queueQuery, 0, 2, QueueQueryParameters) {
00546         return no_keyword::Session_0_10::queueQuery(
00547             p[arg::queue|std::string()],
00548             p[arg::sync|true]);
00549     }
00550     
00551 };
00553 inline Session_0_10 sync(const SessionBase_0_10& other) { return (other); }
00554 
00555 inline Session_0_10::Session_0_10() {}
00556 inline Session_0_10::Session_0_10(const SessionBase_0_10& other) {
00557     *this = other;
00558 }
00559 inline Session_0_10& Session_0_10::operator=(const SessionBase_0_10& other) {
00560     impl = static_cast<const Session_0_10&>(other).impl;
00561     return *this;
00562 }
00563 
00564 }} // namespace qpid::client
00565 
00566 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00661.html0000664000076400007640000001043411752725717017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineRebind< T, T, BaseAllocator, Max > Member List
This is the complete list of members for qpid::InlineRebind< T, T, BaseAllocator, Max >, including all inherited members.
other typedefqpid::InlineRebind< T, T, BaseAllocator, Max >

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00078.html0000664000076400007640000001033611752725720017321 0ustar00jrossjross00000000000000 std::map::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::map::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00143.html0000664000076400007640000001022011752725720017302 0ustar00jrossjross00000000000000 std::ifstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::ifstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00476_source.html0000664000076400007640000001527011752725717020713 0ustar00jrossjross00000000000000 qpid/client/Session.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Session.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_SESSION_H
00002 #define QPID_CLIENT_SESSION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/client/Session_0_10.h"
00025 
00026 namespace qpid {
00027 namespace client {
00028 
00034 typedef Session_0_10 Session;
00035 
00036 
00037 }} // namespace qpid::client
00038 
00039 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00861.html0000664000076400007640000001322411752725720017320 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::SessionError Member List
This is the complete list of members for qpid::messaging::SessionError, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
MessagingException(const std::string &msg)qpid::messaging::MessagingException
SessionError(const std::string &)qpid::messaging::SessionError
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00792.html0000664000076400007640000001376211752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::PreconditionFailedException Member List
This is the complete list of members for qpid::framing::PreconditionFailedException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::PreconditionFailedException [inline, virtual]
PreconditionFailedException(const std::string &msg=std::string())qpid::framing::PreconditionFailedException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00467_source.html0000664000076400007640000002302411752725717020707 0ustar00jrossjross00000000000000 qpid/client/Future.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Future.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 
00022 #ifndef _Future_
00023 #define _Future_
00024 
00025 #include <boost/bind.hpp>
00026 #include <boost/shared_ptr.hpp>
00027 #include "qpid/Exception.h"
00028 #include "qpid/framing/SequenceNumber.h"
00029 #include "qpid/client/FutureCompletion.h"
00030 #include "qpid/client/FutureResult.h"
00031 #include "qpid/client/ClientImportExport.h"
00032 
00033 namespace qpid {
00034 namespace client {
00035 
00037 class QPID_CLIENT_CLASS_EXTERN Future
00038 {
00039     framing::SequenceNumber command;
00040     boost::shared_ptr<FutureResult> result;
00041     bool complete;
00042 
00043 public:
00044     Future() : complete(false) {}
00045     Future(const framing::SequenceNumber& id) : command(id), complete(false) {}
00046 
00047     std::string getResult(SessionImpl& session) {
00048         if (result) return result->getResult(session);
00049         else throw Exception("Result not expected");
00050     }
00051 
00052     QPID_CLIENT_EXTERN void wait(SessionImpl& session);
00053     QPID_CLIENT_EXTERN bool isComplete(SessionImpl& session);
00054     QPID_CLIENT_EXTERN void setFutureResult(boost::shared_ptr<FutureResult> r);
00055 };
00056 
00057 }}
00058 
00059 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00560_source.html0000664000076400007640000002146711752725717020712 0ustar00jrossjross00000000000000 qpid/sys/windows/check.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/check.h
Go to the documentation of this file.
00001 #ifndef _windows_check_h
00002 #define _windows_check_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/Exception.h"
00026 #include "qpid/Msg.h"
00027 #include "qpid/sys/StrError.h"
00028 
00029 #define QPID_WINDOWS_ERROR(ERRVAL) qpid::Exception(QPID_MSG(qpid::sys::strError(ERRVAL)))
00030 #define QPID_WINDOWS_CRT_ERROR(ERRNO) qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO)))
00031 
00033 #define QPID_WINDOWS_CHECK_NULL(RESULT)                        \
00034     if ((RESULT) == NULL) throw QPID_WINDOWS_ERROR((::GetLastError()))
00035 
00036 #define QPID_WINDOWS_CHECK_NOT(RESULT,VAL)                                 \
00037   if ((RESULT) == (VAL)) throw QPID_WINDOWS_ERROR((::GetLastError()))
00038 
00039 #define QPID_WINDOWS_CHECK_ASYNC_START(STATUS)                 \
00040     if (!(STATUS) && ::WSAGetLastError() != ERROR_IO_PENDING)  \
00041         throw QPID_WINDOWS_ERROR((::WSAGetLastError()))
00042 
00043 #define QPID_WINDOWS_CHECK_CRT_NZ(VAL)   \
00044     if ((VAL) == 0) throw QPID_WINDOWS_CRT_ERROR(errno)
00045 
00046 #define QPID_WINSOCK_CHECK(OP)                        \
00047     if ((OP) == SOCKET_ERROR) throw QPID_WINDOWS_ERROR((::WSAGetLastError()))
00048 
00049 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00487_source.html0000664000076400007640000003045711752725717020721 0ustar00jrossjross00000000000000 qpid/console/Package.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Package.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_PACKAGE_H_
00022 #define _QPID_CONSOLE_PACKAGE_H_
00023 
00024 #include <string>
00025 #include <map>
00026 #include "qpid/console/ConsoleImportExport.h"
00027 #include "qpid/sys/IntegerTypes.h"
00028 
00029 namespace qpid {
00030 namespace console {
00031     struct SchemaClass;
00032 
00037     class Package {
00038     public:
00039         Package(const std::string& n) : name(n) {}
00040         const std::string& getName() const { return name; }
00041 
00042     private:
00043         friend class SessionManager;
00044         struct NameHash {
00045             std::string name;
00046             uint8_t     hash[16];
00047             NameHash(const std::string& n, const uint8_t* h) : name(n) {
00048                 for (int i = 0; i < 16; i++)
00049                     hash[i] = h[i];
00050             }
00051         };
00052 
00053         struct NameHashComp {
00054             bool operator() (const NameHash& lhs, const NameHash& rhs) const
00055             {
00056                 if (lhs.name != rhs.name)
00057                     return lhs.name < rhs.name;
00058                 else
00059                     for (int i = 0; i < 16; i++)
00060                         if (lhs.hash[i] != rhs.hash[i])
00061                             return lhs.hash[i] < rhs.hash[i];
00062                 return false;
00063             }
00064         };
00065 
00066         typedef std::map<NameHash, SchemaClass*, NameHashComp> ClassMap;
00067 
00068         const std::string name;
00069         ClassMap classes;
00070 
00071         SchemaClass* getClass(const std::string& className, uint8_t* hash);
00072         void addClass(const std::string& className, uint8_t* hash,
00073                       SchemaClass* schemaClass);
00074     };
00075 }
00076 }
00077 
00078 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00412_source.html0000664000076400007640000003121311752725717020674 0ustar00jrossjross00000000000000 qmf/engine/ConnectionSettings.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/ConnectionSettings.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineConnectionSettings_
00002 #define _QmfEngineConnectionSettings_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include "qmf/engine/QmfEngineImportExport.h"
00024 #include "qpid/sys/IntegerTypes.h"
00025 
00026 namespace qmf {
00027 namespace engine {
00028 
00029     class ConnectionSettingsImpl;
00030     class Value;
00031 
00037     class ConnectionSettings {
00038     public:
00039 
00048         QMFE_EXTERN ConnectionSettings();
00049 
00063         QMFE_EXTERN ConnectionSettings(const char* url);
00064 
00068         ConnectionSettings(const ConnectionSettings& from);
00069 
00073         QMFE_EXTERN ~ConnectionSettings();
00074 
00085         QMFE_EXTERN bool setAttr(const char* key, const Value& value);
00086 
00094         QMFE_EXTERN Value getAttr(const char* key) const;
00095 
00103         QMFE_EXTERN const char* getAttrString() const;
00104 
00110         QMFE_EXTERN void transportTcp(uint16_t port = 5672);
00111         QMFE_EXTERN void transportSsl(uint16_t port = 5671);
00112         QMFE_EXTERN void transportRdma(uint16_t port = 5672);
00113 
00127         QMFE_EXTERN void authAnonymous(const char* username = 0);
00128         QMFE_EXTERN void authPlain(const char* username = 0, const char* password = 0);
00129         QMFE_EXTERN void authGssapi(const char* serviceName, uint32_t minSsf = 0, uint32_t maxSsf = 256);
00130 
00140         QMFE_EXTERN void setRetry(int delayMin = 1, int delayMax = 128, int delayFactor = 2);
00141 
00142     private:
00143         friend class ResilientConnectionImpl;
00144         ConnectionSettingsImpl* impl;
00145     };
00146 
00147 }
00148 }
00149 
00150 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00393.html0000664000076400007640000001026011752725720017315 0ustar00jrossjross00000000000000 std::wistringstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wistringstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00517_source.html0000664000076400007640000003112711752725717020706 0ustar00jrossjross00000000000000 qpid/framing/ReplyTo.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/ReplyTo.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_REPLYTO_H
00002 #define QPID_FRAMING_REPLYTO_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN ReplyTo  {
00039     std::string exchange;
00040     std::string routingKey;
00041     uint16_t flags;
00042 public:
00043     ReplyTo(
00044         const std::string& _exchange,
00045         const std::string& _routingKey) : 
00046         exchange(_exchange),
00047         routingKey(_routingKey),
00048         flags(0){
00049         flags |= (1 << 8);
00050         flags |= (1 << 9);
00051     }
00052     ReplyTo()  : flags(0) {}
00053     
00054     QPID_COMMON_EXTERN void setExchange(const std::string& _exchange);
00055     QPID_COMMON_EXTERN const std::string& getExchange() const;
00056     QPID_COMMON_EXTERN bool hasExchange() const;
00057     QPID_COMMON_EXTERN void clearExchangeFlag();
00058     QPID_COMMON_EXTERN void setRoutingKey(const std::string& _routingKey);
00059     QPID_COMMON_EXTERN const std::string& getRoutingKey() const;
00060     QPID_COMMON_EXTERN bool hasRoutingKey() const;
00061     QPID_COMMON_EXTERN void clearRoutingKeyFlag();
00062     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const ReplyTo&);
00063     QPID_COMMON_EXTERN void encode(Buffer&) const;
00064     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00065     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00066     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00067     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00068     QPID_COMMON_EXTERN uint32_t bodySize() const;
00069     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00070 }; /* class ReplyTo */
00071 
00072 }}
00073 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x6b.html0000664000076400007640000001540511752725717022374 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- k -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00287.html0000664000076400007640000001036611752725720017326 0ustar00jrossjross00000000000000 std::wstring::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wstring::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00295.html0000664000076400007640000006273611752725720017335 0ustar00jrossjross00000000000000 qpid::sys::RWlock Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

RW lock. More...

#include <qpid/sys/posix/Mutex.h>

List of all members.

Public Types

typedef
::qpid::sys::ScopedRlock
< RWlock
ScopedRlock
typedef
::qpid::sys::ScopedWlock
< RWlock
ScopedWlock
typedef
::qpid::sys::ScopedRlock
< RWlock
ScopedRlock
typedef
::qpid::sys::ScopedWlock
< RWlock
ScopedWlock

Public Member Functions

 RWlock ()
 ~RWlock ()
void wlock ()
void rlock ()
void unlock ()
void trywlock ()
void tryrlock ()
 RWlock ()
 ~RWlock ()
void wlock ()
void rlock ()
void unlock ()
void trywlock ()
void tryrlock ()

Protected Member Functions

bool & write (void)

Protected Attributes

pthread_rwlock_t rwlock
boost::shared_mutex rwMutex
boost::thread_specific_ptr< bool > haveWrite

Detailed Description

RW lock.

Definition at line 64 of file Mutex.h.


Member Typedef Documentation

Definition at line 61 of file Mutex.h.

Definition at line 68 of file Mutex.h.

Definition at line 62 of file Mutex.h.

Definition at line 69 of file Mutex.h.


Constructor & Destructor Documentation

qpid::sys::RWlock::RWlock ( ) [inline]

Definition at line 128 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and rwlock.

qpid::sys::RWlock::~RWlock ( ) [inline]

Definition at line 132 of file Mutex.h.

References QPID_POSIX_ABORT_IF, and rwlock.

qpid::sys::RWlock::RWlock ( ) [inline]
qpid::sys::RWlock::~RWlock ( ) [inline]

Member Function Documentation

void qpid::sys::RWlock::rlock ( ) [inline]

Definition at line 140 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and rwlock.

void qpid::sys::RWlock::rlock ( ) [inline]
void qpid::sys::RWlock::tryrlock ( ) [inline]

Definition at line 152 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and rwlock.

void qpid::sys::RWlock::tryrlock ( ) [inline]
void qpid::sys::RWlock::trywlock ( ) [inline]

Definition at line 148 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and rwlock.

void qpid::sys::RWlock::trywlock ( ) [inline]
void qpid::sys::RWlock::unlock ( ) [inline]

Definition at line 144 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and rwlock.

void qpid::sys::RWlock::unlock ( ) [inline]
void qpid::sys::RWlock::wlock ( ) [inline]

Definition at line 136 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and rwlock.

void qpid::sys::RWlock::wlock ( ) [inline]
bool & qpid::sys::RWlock::write ( void  ) [inline, protected]

Definition at line 177 of file Mutex.h.

References haveWrite.


Member Data Documentation

boost::thread_specific_ptr<bool> qpid::sys::RWlock::haveWrite [protected]

Definition at line 81 of file Mutex.h.

Referenced by write().

pthread_rwlock_t qpid::sys::RWlock::rwlock [protected]

Definition at line 73 of file Mutex.h.

Referenced by RWlock(), ~RWlock(), wlock(), rlock(), unlock(), trywlock(), and tryrlock().

boost::shared_mutex qpid::sys::RWlock::rwMutex [protected]

Definition at line 80 of file Mutex.h.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x64.html0000664000076400007640000001734711752725717022345 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00781.html0000664000076400007640000002052411752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FragmentProperties Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00256.html0000664000076400007640000002016211752725717017323 0ustar00jrossjross00000000000000 qmf::QmfException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::QmfException Struct Reference

#include <qmf/exceptions.h>

List of all members.

Public Member Functions

 QmfException (const std::string &msg)
virtual ~QmfException () throw ()
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qmf::QmfException::QmfException ( const std::string msg)
virtual qmf::QmfException::~QmfException ( ) throw () [virtual]

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00548.html0000664000076400007640000001470711752725717017337 0ustar00jrossjross00000000000000 qpid/RangeSet.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/RangeSet.h File Reference
#include "qpid/InlineVector.h"
#include <boost/iterator/iterator_facade.hpp>
#include <boost/operators.hpp>
#include <boost/bind.hpp>
#include <algorithm>
#include <numeric>

Go to the source code of this file.

Classes

class  qpid::Range
 A range of values, used in RangeSet. More...
class  qpid::RangeSet
 A set implemented as a list of [begin, end) ranges. More...
class  qpid::RangeSet::iterator

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


Functions

template<class T >
std::ostreamqpid::operator<< (std::ostream &o, const Range< T > &r)
template<class T >
std::ostreamqpid::operator<< (std::ostream &o, const RangeSet< T > &rs)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00807.html0000664000076400007640000001370711752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::NotAttachedException Member List
This is the complete list of members for qpid::framing::NotAttachedException, including all inherited members.
ChannelException(framing::session::DetachCode _code, const std::string &message)qpid::ChannelException [inline]
codeqpid::ChannelException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::NotAttachedException [inline, virtual]
NotAttachedException(const std::string &msg=std::string())qpid::framing::NotAttachedException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00845.html0000664000076400007640000001253311752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Duration Member List
This is the complete list of members for qpid::messaging::Duration, including all inherited members.
Duration(uint64_t milliseconds)qpid::messaging::Duration [explicit]
FOREVERqpid::messaging::Duration [static]
getMilliseconds() const qpid::messaging::Duration
IMMEDIATEqpid::messaging::Duration [static]
MINUTEqpid::messaging::Duration [static]
SECONDqpid::messaging::Duration [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00578.html0000664000076400007640000001120211752725720017317 0ustar00jrossjross00000000000000 qpid::client::no_keyword Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::no_keyword Namespace Reference

Classes

class  AsyncSession_0_10
 AMQP 0-10 asynchronous session API. More...
class  Session_0_10
 AMQP 0-10 synchronous session API. More...

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00047.html0000664000076400007640000002507611752725717017332 0ustar00jrossjross00000000000000 qpid::client::CannotConnectException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::CannotConnectException Struct Reference

#include <qpid/client/FailoverManager.h>

List of all members.

Public Member Functions

 CannotConnectException (const std::string &m)
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Constructor & Destructor Documentation

qpid::client::CannotConnectException::CannotConnectException ( const std::string m) [inline]

Definition at line 39 of file FailoverManager.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00042.html0000664000076400007640000004043611752725720017314 0ustar00jrossjross00000000000000 qpid::console::Broker Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Broker Class Reference

#include <qpid/console/Broker.h>

List of all members.

Classes

class  ConnectionThread

Public Member Functions

 Broker (SessionManager &sm, client::ConnectionSettings &settings)
 ~Broker ()
QPID_CONSOLE_INLINE_EXTERN bool isConnected () const
QPID_CONSOLE_INLINE_EXTERN
const std::string
getError () const
QPID_CONSOLE_INLINE_EXTERN
const std::string
getSessionId () const
QPID_CONSOLE_INLINE_EXTERN
const framing::Uuid
getBrokerId () const
QPID_CONSOLE_INLINE_EXTERN uint32_t getBrokerBank () const
QPID_CONSOLE_INLINE_EXTERN void addBinding (const std::string &key)
std::string getUrl () const
void waitForStable ()

Friends

std::ostreamoperator<< (std::ostream &o, const Broker &k)

Constructor & Destructor Documentation

qpid::console::Broker::Broker ( SessionManager sm,
client::ConnectionSettings settings 
)
qpid::console::Broker::~Broker ( )

Member Function Documentation

QPID_CONSOLE_INLINE_EXTERN void qpid::console::Broker::addBinding ( const std::string key) [inline]

Definition at line 63 of file Broker.h.

References qpid::console::Broker::ConnectionThread::bindExchange().

QPID_CONSOLE_INLINE_EXTERN uint32_t qpid::console::Broker::getBrokerBank ( ) const [inline]

Definition at line 62 of file Broker.h.

QPID_CONSOLE_INLINE_EXTERN const framing::Uuid& qpid::console::Broker::getBrokerId ( ) const [inline]

Definition at line 61 of file Broker.h.

QPID_CONSOLE_INLINE_EXTERN const std::string& qpid::console::Broker::getError ( ) const [inline]

Definition at line 59 of file Broker.h.

QPID_CONSOLE_INLINE_EXTERN const std::string& qpid::console::Broker::getSessionId ( ) const [inline]

Definition at line 60 of file Broker.h.

std::string qpid::console::Broker::getUrl ( ) const
QPID_CONSOLE_INLINE_EXTERN bool qpid::console::Broker::isConnected ( ) const [inline]

Definition at line 58 of file Broker.h.

void qpid::console::Broker::waitForStable ( )

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream o,
const Broker k 
) [friend]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00530.html0000664000076400007640000001206511752725717017321 0ustar00jrossjross00000000000000 qpid/log/Options.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/Options.h File Reference
#include "qpid/Options.h"
#include "qpid/CommonImportExport.h"
#include "qpid/log/SinkOptions.h"
#include <iosfwd>
#include <memory>

Go to the source code of this file.

Classes

struct  qpid::log::Options
 Logging options for config parser. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::log

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00603.html0000664000076400007640000002304711752725717017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::ConsoleEvent Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00174.html0000664000076400007640000001035211752725720017314 0ustar00jrossjross00000000000000 std::basic_string::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_string::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00081.html0000664000076400007640000001036211752725720017312 0ustar00jrossjross00000000000000 std::multiset::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multiset::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00728.html0000664000076400007640000002442711752725720017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::RefValue Member List
This is the complete list of members for qpid::console::RefValue, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::RefValue [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::RefValue [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
RefValue(ObjectId v)qpid::console::RefValue [inline]
RefValue(framing::Buffer &buffer)qpid::console::RefValue
str() const qpid::console::RefValue [virtual]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00518_source.html0000664000076400007640000003470611752725717020715 0ustar00jrossjross00000000000000 qpid/framing/SequenceNumber.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/SequenceNumber.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _framing_SequenceNumber_h
00022 #define _framing_SequenceNumber_h
00023 
00024 #include "qpid/framing/amqp_types.h"
00025 #include <boost/operators.hpp>
00026 #include <iosfwd>
00027 #include "qpid/CommonImportExport.h"
00028 
00029 namespace qpid {
00030 namespace framing {
00031 
00032 class Buffer;
00033 
00037 class QPID_COMMON_CLASS_EXTERN SequenceNumber : public
00038 boost::equality_comparable<
00039     SequenceNumber, boost::less_than_comparable<
00040         SequenceNumber, boost::incrementable<
00041         SequenceNumber, boost::decrementable<SequenceNumber> > > >
00042 {
00043     int32_t value;
00044 
00045   public:
00046     SequenceNumber(uint32_t v=0) : value(v) {}
00047 
00048     SequenceNumber& operator++() { ++value; return *this; }
00049     SequenceNumber& operator--() { --value; return *this; }
00050     bool operator==(const SequenceNumber& other) const { return value == other.value; }
00051     bool operator<(const SequenceNumber& other) const { return (value - other.value) < 0; }
00052     uint32_t getValue() const { return uint32_t(value); }
00053     operator uint32_t() const { return uint32_t(value); }
00054 
00055     QPID_COMMON_EXTERN void encode(Buffer& buffer) const;
00056     QPID_COMMON_EXTERN void decode(Buffer& buffer);
00057     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00058 
00059     template <class S> void serialize(S& s) { s(value); }
00060 
00061   friend inline int32_t operator-(const SequenceNumber& a, const SequenceNumber& b);
00062 };
00063 
00064 inline int32_t operator-(const SequenceNumber& a, const SequenceNumber& b) {
00065     return int32_t(a.value - b.value);
00066 }
00067 
00068 struct Window
00069 {
00070     SequenceNumber hwm;
00071     SequenceNumber lwm;
00072 };
00073 
00074 QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& o, const SequenceNumber& n);
00075 
00076 }} // namespace qpid::framing
00077 
00078 
00079 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00809.html0000664000076400007640000001764611752725720017336 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ReplyTo Member List
This is the complete list of members for qpid::framing::ReplyTo, including all inherited members.
bodySize() const qpid::framing::ReplyTo
clearExchangeFlag()qpid::framing::ReplyTo
clearRoutingKeyFlag()qpid::framing::ReplyTo
decode(Buffer &, uint32_t=0)qpid::framing::ReplyTo
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::ReplyTo
encode(Buffer &) const qpid::framing::ReplyTo
encodedSize() const qpid::framing::ReplyTo
encodeStructBody(Buffer &) const qpid::framing::ReplyTo
getExchange() const qpid::framing::ReplyTo
getRoutingKey() const qpid::framing::ReplyTo
hasExchange() const qpid::framing::ReplyTo
hasRoutingKey() const qpid::framing::ReplyTo
operator<<(std::ostream &, const ReplyTo &)qpid::framing::ReplyTo [friend]
print(std::ostream &out) const qpid::framing::ReplyTo
ReplyTo(const std::string &_exchange, const std::string &_routingKey)qpid::framing::ReplyTo [inline]
ReplyTo()qpid::framing::ReplyTo [inline]
setExchange(const std::string &_exchange)qpid::framing::ReplyTo
setRoutingKey(const std::string &_routingKey)qpid::framing::ReplyTo

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00246.html0000664000076400007640000002434311752725720017321 0ustar00jrossjross00000000000000 qpid::framing::OutOfBounds Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::OutOfBounds Struct Reference

#include <qpid/framing/Buffer.h>

List of all members.

Public Member Functions

 OutOfBounds ()
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Constructor & Destructor Documentation

qpid::framing::OutOfBounds::OutOfBounds ( ) [inline]

Definition at line 33 of file Buffer.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00142.html0000664000076400007640000004011611752725720017310 0ustar00jrossjross00000000000000 qpid::framing::Header Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Header Class Reference

#include <qpid/framing/Header.h>

List of all members.

Public Member Functions

 Header (bool _sync)
 Header ()
void setSync (bool _sync)
bool getSync () const
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Friends

std::ostreamoperator<< (std::ostream &, const Header &)

Constructor & Destructor Documentation

qpid::framing::Header::Header ( bool  _sync) [inline]

Definition at line 41 of file Header.h.

qpid::framing::Header::Header ( ) [inline]

Definition at line 46 of file Header.h.


Member Function Documentation

uint32_t qpid::framing::Header::bodySize ( ) const
void qpid::framing::Header::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::Header::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::Header::encode ( Buffer ) const
uint32_t qpid::framing::Header::encodedSize ( ) const
void qpid::framing::Header::encodeStructBody ( Buffer ) const
bool qpid::framing::Header::getSync ( ) const
void qpid::framing::Header::print ( std::ostream out) const
void qpid::framing::Header::setSync ( bool  _sync)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const Header  
) [friend]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00567.html0000664000076400007640000002045011752725717017330 0ustar00jrossjross00000000000000 qpid/sys/SystemInfo.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/SystemInfo.h File Reference
#include "qpid/sys/IntegerTypes.h"
#include "qpid/Address.h"
#include "qpid/CommonImportExport.h"
#include <vector>

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys
namespace  qpid::sys::SystemInfo
 

Retrieve information about the system we are running on.


Functions

long qpid::sys::SystemInfo::concurrency ()
 Estimate available concurrency, e.g.
bool qpid::sys::SystemInfo::getLocalHostname (Address &address)
 Get the local host name and set it in the specified.
void qpid::sys::SystemInfo::getLocalIpAddresses (uint16_t port, std::vector< Address > &addrList)
void qpid::sys::SystemInfo::getSystemId (std::string &osName, std::string &nodeName, std::string &release, std::string &version, std::string &machine)
 Retrieve system identifiers and versions.
uint32_t qpid::sys::SystemInfo::getProcessId ()
 Get the process ID of the current process.
uint32_t qpid::sys::SystemInfo::getParentProcessId ()
 Get the process ID of the parent of the current process.
std::string qpid::sys::SystemInfo::getProcessName ()
 Get the name of the current process (i.e.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00797.html0000664000076400007640000001370211752725720017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::NotAllowedException Member List
This is the complete list of members for qpid::framing::NotAllowedException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::NotAllowedException [inline, virtual]
NotAllowedException(const std::string &msg=std::string())qpid::framing::NotAllowedException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00506_source.html0000664000076400007640000020112311752725717020677 0ustar00jrossjross00000000000000 qpid/framing/FieldValue.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/FieldValue.h
Go to the documentation of this file.
00001 #ifndef _framing_FieldValue_h
00002 #define _framing_FieldValue_h
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include "qpid/Exception.h"
00025 #include "qpid/framing/amqp_types.h"
00026 #include "qpid/framing/Buffer.h"
00027 #include "qpid/framing/FieldTable.h"
00028 #include "qpid/CommonImportExport.h"
00029 
00030 #include <iostream>
00031 #include <memory>
00032 #include <vector>
00033 
00034 #include <assert.h>
00035 
00036 namespace qpid {
00037 namespace framing {
00038 
00044 class QPID_COMMON_CLASS_EXTERN FieldValueException : public qpid::Exception {};
00045 
00051 struct QPID_COMMON_CLASS_EXTERN InvalidConversionException : public FieldValueException {
00052     InvalidConversionException() {}
00053 };
00054 
00055 class List;
00056 
00062 class QPID_COMMON_CLASS_EXTERN FieldValue {
00063   public:
00064     /*
00065      * Abstract type for content of different types
00066      */
00067     class Data {
00068       public:
00069         virtual ~Data() {};
00070         virtual uint32_t encodedSize() const = 0;
00071         virtual void encode(Buffer& buffer) = 0;
00072         virtual void decode(Buffer& buffer) = 0;
00073         virtual bool operator==(const Data&) const = 0;
00074 
00075         virtual bool convertsToInt() const { return false; }
00076         virtual bool convertsToString() const { return false; }
00077         virtual int64_t getInt() const { throw InvalidConversionException();}
00078         virtual std::string getString() const { throw InvalidConversionException(); }
00079 
00080         virtual void print(std::ostream& out) const = 0;
00081     };
00082 
00083     FieldValue(): data(0) {};
00084     // Default assignment operator is fine
00085     void setType(uint8_t type);
00086     QPID_COMMON_EXTERN uint8_t getType() const;
00087     Data& getData() { return *data; }
00088     uint32_t encodedSize() const { return 1 + data->encodedSize(); };
00089     bool empty() const { return data.get() == 0; }
00090     void encode(Buffer& buffer);
00091     void decode(Buffer& buffer);
00092     QPID_COMMON_EXTERN bool operator==(const FieldValue&) const;
00093     QPID_COMMON_INLINE_EXTERN bool operator!=(const FieldValue& v) const { return !(*this == v); }
00094 
00095     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00096 
00097     template <typename T> bool convertsTo() const { return false; }
00098     template <typename T> T get() const { throw InvalidConversionException(); }
00099 
00100     template <class T, int W> T getIntegerValue() const;
00101     template <class T> T getIntegerValue() const;
00102     template <class T, int W> T getFloatingPointValue() const;
00103     template <int W> void getFixedWidthValue(unsigned char*) const;
00104     template <class T> bool get(T&) const;
00105 
00106   protected:
00107     FieldValue(uint8_t t, Data* d): typeOctet(t), data(d) {}
00108 
00109     QPID_COMMON_EXTERN static uint8_t* convertIfRequired(uint8_t* const octets, int width);
00110 
00111   private:
00112     uint8_t typeOctet;
00113     std::auto_ptr<Data> data;
00114 
00115 };
00116 
00117 template <>
00118 inline bool FieldValue::convertsTo<int>() const { return data->convertsToInt(); }
00119 
00120 template <>
00121 inline bool FieldValue::convertsTo<int64_t>() const { return data->convertsToInt(); }
00122 
00123 template <>
00124 inline bool FieldValue::convertsTo<std::string>() const { return data->convertsToString(); }
00125 
00126 template <>
00127 inline int FieldValue::get<int>() const { return static_cast<int>(data->getInt()); }
00128 
00129 template <>
00130 inline int64_t FieldValue::get<int64_t>() const { return data->getInt(); }
00131 
00132 template <>
00133 inline std::string FieldValue::get<std::string>() const { return data->getString(); }
00134 
00135 inline std::ostream& operator<<(std::ostream& out, const FieldValue& v) {
00136     v.print(out);
00137     return out;
00138 }
00139 
00140 template <int width>
00141 class FixedWidthValue : public FieldValue::Data {
00142     uint8_t octets[width];
00143 
00144   public:
00145     FixedWidthValue() {}
00146     FixedWidthValue(const uint8_t (&data)[width]) : octets(data) {}
00147     FixedWidthValue(const uint8_t* const data)
00148     {
00149         for (int i = 0; i < width; i++) octets[i] = data[i];
00150     }
00151     FixedWidthValue(uint64_t v)
00152     {
00153         for (int i = width; i > 1; --i) {
00154             octets[i-1] = (uint8_t) (0xFF & v); v >>= 8;
00155         }
00156         octets[0] = (uint8_t) (0xFF & v);
00157     }
00158     uint32_t encodedSize() const { return width; }
00159     void encode(Buffer& buffer) { buffer.putRawData(octets, width); }
00160     void decode(Buffer& buffer) { buffer.getRawData(octets, width); }
00161     bool operator==(const Data& d) const {
00162         const FixedWidthValue<width>* rhs = dynamic_cast< const FixedWidthValue<width>* >(&d);
00163         if (rhs == 0) return false;
00164         else return std::equal(&octets[0], &octets[width], &rhs->octets[0]);
00165     }
00166 
00167     bool convertsToInt() const { return true; }
00168     int64_t getInt() const
00169     {
00170         int64_t v = 0;
00171         for (int i = 0; i < width-1; ++i) {
00172             v |= octets[i]; v <<= 8;
00173         }
00174         v |= octets[width-1];
00175         return v;
00176     }
00177     uint8_t* rawOctets() { return octets; }
00178     uint8_t* rawOctets() const { return octets; }
00179 
00180     void print(std::ostream& o) const { o << "F" << width << ":"; };
00181 };
00182 
00183 template <class T, int W>
00184 inline T FieldValue::getIntegerValue() const
00185 {
00186     FixedWidthValue<W>* const fwv = dynamic_cast< FixedWidthValue<W>* const>(data.get());
00187     if (fwv) {
00188         uint8_t* octets = fwv->rawOctets();
00189         T v = 0;
00190         for (int i = 0; i < W-1; ++i) {
00191             v |= octets[i]; v <<= 8;
00192         }
00193         v |= octets[W-1];
00194         return v;
00195     } else {
00196         throw InvalidConversionException();
00197     }
00198 }
00199 
00200 template <class T>
00201 inline T FieldValue::getIntegerValue() const
00202 {
00203     FixedWidthValue<1>* const fwv = dynamic_cast< FixedWidthValue<1>* const>(data.get());
00204     if (fwv) {
00205         uint8_t* octets = fwv->rawOctets();
00206         return octets[0];
00207     } else {
00208         throw InvalidConversionException();
00209     }
00210 }
00211 
00212 template <class T, int W>
00213 inline T FieldValue::getFloatingPointValue() const {
00214     FixedWidthValue<W>* const fwv = dynamic_cast< FixedWidthValue<W>* const>(data.get());
00215     if (fwv) {
00216         T value;
00217         uint8_t* const octets = convertIfRequired(fwv->rawOctets(), W);
00218         uint8_t* const target = reinterpret_cast<uint8_t*>(&value);
00219         for (size_t i = 0; i < W; ++i) target[i] = octets[i];
00220         return value;
00221     } else {
00222         throw InvalidConversionException();
00223     }
00224 }
00225 
00226 template <int W> void FieldValue::getFixedWidthValue(unsigned char* value) const
00227 {
00228     FixedWidthValue<W>* const fwv = dynamic_cast< FixedWidthValue<W>* const>(data.get());
00229     if (fwv) {
00230         for (size_t i = 0; i < W; ++i) value[i] = fwv->rawOctets()[i];
00231     } else {
00232         throw InvalidConversionException();
00233     }
00234 }
00235 
00236 template <>
00237 inline float FieldValue::get<float>() const {
00238     return getFloatingPointValue<float, 4>();
00239 }
00240 
00241 template <>
00242 inline double FieldValue::get<double>() const {
00243     return getFloatingPointValue<double, 8>();
00244 }
00245 
00246 template <>
00247 class FixedWidthValue<0> : public FieldValue::Data {
00248   public:
00249     // Implicit default constructor is fine
00250     uint32_t encodedSize() const { return 0; }
00251     void encode(Buffer&) {};
00252     void decode(Buffer&) {};
00253     bool operator==(const Data& d) const {
00254         const FixedWidthValue<0>* rhs = dynamic_cast< const FixedWidthValue<0>* >(&d);
00255         return rhs != 0;
00256     }
00257     void print(std::ostream& o) const { o << "F0"; };
00258 };
00259 
00260 template <int lenwidth>
00261 class VariableWidthValue : public FieldValue::Data {
00262     std::vector<uint8_t> octets;
00263 
00264   public:
00265     VariableWidthValue() {}
00266     VariableWidthValue(const std::vector<uint8_t>& data) : octets(data) {}
00267     VariableWidthValue(const uint8_t* start, const uint8_t* end) : octets(start, end) {}
00268     uint32_t encodedSize() const { return lenwidth + octets.size(); }
00269     void encode(Buffer& buffer) {
00270         buffer.putUInt<lenwidth>(octets.size());
00271         if (octets.size() > 0)
00272             buffer.putRawData(&octets[0], octets.size());
00273     };
00274     void decode(Buffer& buffer) {
00275         uint32_t len = buffer.getUInt<lenwidth>();
00276         octets.resize(len);
00277         if (len > 0)
00278             buffer.getRawData(&octets[0], len);
00279     }
00280     bool operator==(const Data& d) const {
00281         const VariableWidthValue<lenwidth>* rhs = dynamic_cast< const VariableWidthValue<lenwidth>* >(&d);
00282         if (rhs == 0) return false;
00283         else return octets==rhs->octets;
00284     }
00285 
00286     bool convertsToString() const { return true; }
00287     std::string getString() const { return std::string(octets.begin(), octets.end()); }
00288 
00289     void print(std::ostream& o) const { o << "V" << lenwidth << ":" << octets.size() << ":"; };
00290 };
00291 
00292 template <class T>
00293 class EncodedValue : public FieldValue::Data {
00294     T value;
00295   public:
00296 
00297     EncodedValue() {}
00298     EncodedValue(const T& v) : value(v) {}
00299 
00300     T& getValue() { return value; }
00301     const T& getValue() const { return value; }
00302 
00303     uint32_t encodedSize() const { return value.encodedSize(); }
00304 
00305     void encode(Buffer& buffer) {
00306         value.encode(buffer);
00307     };
00308     void decode(Buffer& buffer) {
00309         value.decode(buffer);
00310     }
00311     bool operator==(const Data& d) const {
00312         const EncodedValue<T>* rhs = dynamic_cast< const EncodedValue<T>* >(&d);
00313         if (rhs == 0) return false;
00314         else return value==rhs->value;
00315     }
00316 
00317     void print(std::ostream& o) const { o << "[" << value << "]"; };
00318 };
00319 
00324 template <class T>
00325 inline bool FieldValue::get(T& t) const
00326 {
00327     const EncodedValue<T>* v = dynamic_cast< EncodedValue<T>* >(data.get());    
00328     if (v != 0) {
00329         t = v->getValue();
00330         return true;
00331     } else {
00332         try {
00333             t = get<T>();
00334             return true;
00335         } catch (const InvalidConversionException&) {
00336             return false;
00337         }
00338     }
00339 }
00340 
00341 class Str8Value : public FieldValue {
00342   public:
00343     QPID_COMMON_EXTERN Str8Value(const std::string& v);
00344 };
00345 
00346 class Str16Value : public FieldValue {
00347   public:
00348     QPID_COMMON_EXTERN Str16Value(const std::string& v);
00349 };
00350 
00351 class Var16Value : public FieldValue {
00352   public:
00353     QPID_COMMON_EXTERN Var16Value(const std::string& v, uint8_t code);
00354 };
00355 
00356 class Var32Value : public FieldValue {
00357   public:
00358     QPID_COMMON_EXTERN Var32Value(const std::string& v, uint8_t code);
00359 };
00360 
00361 class Struct32Value : public FieldValue {
00362   public:
00363     QPID_COMMON_EXTERN Struct32Value(const std::string& v);
00364 };
00365 
00366 class FloatValue : public FieldValue
00367 {
00368   public:
00369     QPID_COMMON_EXTERN FloatValue(float f);
00370 };
00371 class DoubleValue : public FieldValue
00372 {
00373   public:
00374     QPID_COMMON_EXTERN DoubleValue(double f);
00375 };
00376 
00377 /*
00378  * Basic integer value encodes as signed 32 bit
00379  */
00380 class IntegerValue : public FieldValue {
00381   public:
00382     QPID_COMMON_EXTERN IntegerValue(int v);
00383 };
00384 
00385 class TimeValue : public FieldValue {
00386   public:
00387     QPID_COMMON_EXTERN TimeValue(uint64_t v);
00388 };
00389 
00390 class Integer64Value : public FieldValue {
00391   public:
00392     QPID_COMMON_EXTERN Integer64Value(int64_t v);
00393 };
00394 
00395 class Unsigned64Value : public FieldValue {
00396   public:
00397     QPID_COMMON_EXTERN Unsigned64Value(uint64_t v);
00398 };
00399 
00400 class FieldTableValue : public FieldValue {
00401   public:
00402     typedef FieldTable ValueType;
00403     QPID_COMMON_EXTERN FieldTableValue(const FieldTable&);
00404 };
00405 
00406 class ArrayValue : public FieldValue {
00407   public:
00408     QPID_COMMON_EXTERN ArrayValue(const Array&);
00409 };
00410 
00411 class VoidValue : public FieldValue {
00412   public:
00413     QPID_COMMON_EXTERN VoidValue();
00414 };
00415 
00416 class BoolValue : public FieldValue {
00417   public:
00418     QPID_COMMON_EXTERN BoolValue(bool);
00419 };
00420 
00421 class Unsigned8Value : public FieldValue {
00422   public:
00423     QPID_COMMON_EXTERN Unsigned8Value(uint8_t);
00424 };
00425 
00426 class Unsigned16Value : public FieldValue {
00427   public:
00428     QPID_COMMON_EXTERN Unsigned16Value(uint16_t);
00429 };
00430 
00431 class Unsigned32Value : public FieldValue {
00432   public:
00433     QPID_COMMON_EXTERN Unsigned32Value(uint32_t);
00434 };
00435 
00436 class Integer8Value : public FieldValue {
00437   public:
00438     QPID_COMMON_EXTERN Integer8Value(int8_t);
00439 };
00440 
00441 class Integer16Value : public FieldValue {
00442   public:
00443     QPID_COMMON_EXTERN Integer16Value(int16_t);
00444 };
00445 
00446 typedef IntegerValue Integer32Value;
00447 
00448 class ListValue : public FieldValue {
00449   public:
00450     typedef List ValueType;
00451     QPID_COMMON_EXTERN ListValue(const List&);
00452 };
00453 
00454 class UuidValue : public FieldValue {
00455   public:
00456     QPID_COMMON_EXTERN UuidValue(const unsigned char*);
00457 };
00458 
00459 template <class T>
00460 bool getEncodedValue(FieldTable::ValuePtr vptr, T& value)
00461 {
00462     if (vptr) {
00463         const EncodedValue<T>* ev = dynamic_cast< EncodedValue<T>* >(&(vptr->getData()));
00464         if (ev != 0) {
00465             value = ev->getValue();
00466             return true;
00467         }
00468     }
00469     return false;
00470 }
00471 
00472 }} // qpid::framing
00473 
00474 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00519.html0000664000076400007640000001207411752725717017330 0ustar00jrossjross00000000000000 qpid/framing/SequenceSet.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/SequenceSet.h File Reference

Go to the source code of this file.

Classes

class  qpid::framing::SequenceSet

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00433_source.html0000664000076400007640000005363511752725717020713 0ustar00jrossjross00000000000000 qmf/engine/Value.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Value.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineValue_
00002 #define _QmfEngineValue_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <qmf/engine/ObjectId.h>
00024 #include <qmf/engine/Typecode.h>
00025 
00026 namespace qmf {
00027 namespace engine {
00028 
00029     class Object;
00030     struct ValueImpl;
00031 
00032     class Value {
00033     public:
00034         //        Value();
00035         Value(const Value& from);
00036         Value(Typecode t, Typecode arrayType = TYPE_UINT8);
00037         ~Value();
00038 
00039         Typecode getType() const;
00040         bool isNull() const;
00041         void setNull();
00042 
00043         bool isObjectId() const;
00044         const ObjectId& asObjectId() const;
00045         void setObjectId(const ObjectId& oid);
00046 
00047         bool isUint() const;
00048         uint32_t asUint() const;
00049         void setUint(uint32_t val);
00050 
00051         bool isInt() const;
00052         int32_t asInt() const;
00053         void setInt(int32_t val);
00054 
00055         bool isUint64() const;
00056         uint64_t asUint64() const;
00057         void setUint64(uint64_t val);
00058 
00059         bool isInt64() const;
00060         int64_t asInt64() const;
00061         void setInt64(int64_t val);
00062 
00063         bool isString() const;
00064         const char* asString() const;
00065         void setString(const char* val);
00066 
00067         bool isBool() const;
00068         bool asBool() const;
00069         void setBool(bool val);
00070 
00071         bool isFloat() const;
00072         float asFloat() const;
00073         void setFloat(float val);
00074 
00075         bool isDouble() const;
00076         double asDouble() const;
00077         void setDouble(double val);
00078 
00079         bool isUuid() const;
00080         const uint8_t* asUuid() const;
00081         void setUuid(const uint8_t* val);
00082 
00083         bool isObject() const;
00084         const Object* asObject() const;
00085         void setObject(Object* val);
00086 
00087         bool isMap() const;
00088         bool keyInMap(const char* key) const;
00089         Value* byKey(const char* key);
00090         const Value* byKey(const char* key) const;
00091         void deleteKey(const char* key);
00092         void insert(const char* key, Value* val);
00093         uint32_t keyCount() const;
00094         const char* key(uint32_t idx) const;
00095 
00096         bool isList() const;
00097         uint32_t listItemCount() const;
00098         Value* listItem(uint32_t idx);
00099         void appendToList(Value* val);
00100         void deleteListItem(uint32_t idx);
00101 
00102         bool isArray() const;
00103         Typecode arrayType() const;
00104         uint32_t arrayItemCount() const;
00105         Value* arrayItem(uint32_t idx);
00106         void appendToArray(Value* val);
00107         void deleteArrayItem(uint32_t idx);
00108 
00109     private:
00110         friend struct ValueImpl;
00111         friend class  BrokerProxyImpl;
00112         friend struct ObjectImpl;
00113         friend struct EventImpl;
00114         friend class  AgentImpl;
00115         Value(ValueImpl* impl);
00116         ValueImpl* impl;
00117     };
00118 }
00119 }
00120 
00121 #endif
00122 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00091.html0000664000076400007640000001042211752725720017310 0ustar00jrossjross00000000000000 std::multiset::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multiset::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00532_source.html0000664000076400007640000002446111752725717020706 0ustar00jrossjross00000000000000 qpid/log/Selector.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/Selector.h
Go to the documentation of this file.
00001 #ifndef SELECTOR_H
00002 #define SELECTOR_H
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/log/Statement.h"
00023 #include "qpid/CommonImportExport.h"
00024 #include <vector>
00025 
00026 namespace qpid {
00027 namespace log {
00028 struct Options;
00029 
00035 class Selector {
00036   public:
00038     Selector() {}
00039 
00041     QPID_COMMON_EXTERN Selector(const Options&);
00042 
00044     Selector(Level l, const std::string& s=std::string()) {
00045         enable(l,s);
00046     }
00047 
00048     Selector(const std::string& enableStr) { enable(enableStr); }
00053     void enable(Level level, const std::string& substring=std::string()) {
00054         substrings[level].push_back(substring);
00055     }
00056 
00058     QPID_COMMON_EXTERN void enable(const std::string& enableStr);
00059 
00061     QPID_COMMON_EXTERN bool isEnabled(Level level, const char* function);
00062 
00063   private:
00064     std::vector<std::string> substrings[LevelTraits::COUNT];
00065 };
00066 
00067 
00068 }} // namespace qpid::log
00069 
00070 
00071 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00140.html0000664000076400007640000004020611752725717017314 0ustar00jrossjross00000000000000 qpid::client::Handle Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

A handle is like a pointer: refers to an underlying implementation object. More...

#include <qpid/client/Handle.h>

List of all members.

Public Member Functions

QPID_CLIENT_INLINE_EXTERN bool isValid () const
QPID_CLIENT_INLINE_EXTERN bool isNull () const
QPID_CLIENT_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_CLIENT_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Member Functions

QPID_CLIENT_INLINE_EXTERN Handle ()
 Handle (const Handle &)
Handleoperator= (const Handle &)

Protected Attributes

Implimpl

Detailed Description

A handle is like a pointer: refers to an underlying implementation object.

Copying the handle does not copy the object.

Handles can be null, like a 0 pointer. Use isValid(), isNull() or the conversion to bool to test for a null handle.


Member Typedef Documentation

typedef T qpid::client::Handle::Impl [protected]

Definition at line 57 of file Handle.h.


Constructor & Destructor Documentation

QPID_CLIENT_INLINE_EXTERN qpid::client::Handle::Handle ( ) [inline, protected]

Definition at line 58 of file Handle.h.

qpid::client::Handle::Handle ( const Handle ) [protected]

Member Function Documentation

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isNull ( ) const [inline]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isValid ( ) const [inline]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN qpid::client::Handle::operator bool ( ) const [inline]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::operator! ( ) const [inline]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

Handle& qpid::client::Handle::operator= ( const Handle ) [protected]
void qpid::client::Handle::swap ( Handle< T > &  h) [inline]

Definition at line 54 of file Handle.h.


Member Data Documentation


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00059.html0000664000076400007640000007461511752725720017332 0ustar00jrossjross00000000000000 qpid::messaging::Connection Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Connection Class Reference

A connection represents a network connection to a remote endpoint. More...

#include <qpid/messaging/Connection.h>

List of all members.

Public Member Functions

 Connection (ConnectionImpl *impl)
 Connection (const Connection &)
 Connection ()
 Connection (const std::string &url, const qpid::types::Variant::Map &options=qpid::types::Variant::Map())
 Current implementation supports the following options:
 Connection (const std::string &url, const std::string &options)
 Creates a connection using an option string of the form {name:value,name2:value2...}, see above for options supported.
 ~Connection ()
Connectionoperator= (const Connection &)
void setOption (const std::string &name, const qpid::types::Variant &value)
void open ()
bool isOpen ()
bool isOpen () const
void close ()
 Closes a connection and all sessions associated with it.
Session createTransactionalSession (const std::string &name=std::string())
Session createSession (const std::string &name=std::string())
Session getSession (const std::string &name) const
std::string getAuthenticatedUsername ()
QPID_MESSAGING_INLINE_EXTERN bool isValid () const
QPID_MESSAGING_INLINE_EXTERN bool isNull () const
QPID_MESSAGING_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_MESSAGING_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Detailed Description

A connection represents a network connection to a remote endpoint.


Member Typedef Documentation

typedef T qpid::messaging::Handle::Impl [protected, inherited]

Definition at line 57 of file Handle.h.


Constructor & Destructor Documentation

qpid::messaging::Connection::Connection ( ConnectionImpl *  impl)
qpid::messaging::Connection::Connection ( const Connection )
qpid::messaging::Connection::Connection ( )
qpid::messaging::Connection::Connection ( const std::string url,
const qpid::types::Variant::Map options = qpid::types::Variant::Map() 
)

Current implementation supports the following options:

  • username
  • password
  • heartbeat
  • tcp_nodelay
  • sasl_mechanisms
  • sasl_service
  • sasl_min_ssf
  • sasl_max_ssf
  • transport

Reconnect behaviour can be controlled through the following options:

  • reconnect: true/false (enables/disables reconnect entirely)
  • reconnect_timeout: seconds (give up and report failure after specified time)
  • reconnect_limit: n (give up and report failure after specified number of attempts)
  • reconnect_interval_min: seconds (initial delay between failed reconnection attempts)
  • reconnect_interval_max: seconds (maximum delay between failed reconnection attempts)
  • reconnect_interval: shorthand for setting the same reconnect_interval_min/max
  • reconnect_urls: list of alternate urls to try when connecting

The reconnect_interval is the time that the client waits for after a failed attempt to reconnect before retrying. It starts at the value of the min_retry_interval and is doubled every failure until the value of max_retry_interval is reached.

Values in seconds can be fractional, for example 0.001 is a millisecond delay.

qpid::messaging::Connection::Connection ( const std::string url,
const std::string options 
)

Creates a connection using an option string of the form {name:value,name2:value2...}, see above for options supported.

Exceptions:
InvalidOptionStringif the string does not match the correct syntax
qpid::messaging::Connection::~Connection ( )

Member Function Documentation

void qpid::messaging::Connection::close ( )

Closes a connection and all sessions associated with it.

An opened connection must be closed before the last handle is allowed to go out of scope.

Session qpid::messaging::Connection::createSession ( const std::string name = std::string())
Session qpid::messaging::Connection::createTransactionalSession ( const std::string name = std::string())
std::string qpid::messaging::Connection::getAuthenticatedUsername ( )
Session qpid::messaging::Connection::getSession ( const std::string name) const
QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

bool qpid::messaging::Connection::isOpen ( )
bool qpid::messaging::Connection::isOpen ( ) const
QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

void qpid::messaging::Connection::open ( )
QPID_MESSAGING_INLINE_EXTERN qpid::messaging::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

Connection& qpid::messaging::Connection::operator= ( const Connection )
void qpid::messaging::Connection::setOption ( const std::string name,
const qpid::types::Variant value 
)
void qpid::messaging::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.


Member Data Documentation

Impl* qpid::messaging::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00259.html0000664000076400007640000002346211752725717017334 0ustar00jrossjross00000000000000 qmf::engine::QueryElement Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::QueryElement Struct Reference

#include <qmf/engine/Query.h>

List of all members.

Public Member Functions

 QueryElement (const char *attrName, const Value *value, ValueOper oper)
 QueryElement (QueryElementImpl *impl)
virtual ~QueryElement ()
bool evaluate (const Object *object) const

Public Attributes

QueryElementImpl * impl

Constructor & Destructor Documentation

qmf::engine::QueryElement::QueryElement ( const char *  attrName,
const Value value,
ValueOper  oper 
)
qmf::engine::QueryElement::QueryElement ( QueryElementImpl *  impl)
virtual qmf::engine::QueryElement::~QueryElement ( ) [virtual]

Member Function Documentation

bool qmf::engine::QueryElement::evaluate ( const Object object) const [virtual]

Member Data Documentation

Definition at line 59 of file Query.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00165.html0000664000076400007640000002425511752725720017323 0ustar00jrossjross00000000000000 qpid::framing::InvalidPathException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::InvalidPathException Struct Reference

The client tried to work with an unknown virtual host. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 InvalidPathException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const
framing::connection::CloseCode 
code

Detailed Description

The client tried to work with an unknown virtual host.


Constructor & Destructor Documentation

qpid::framing::InvalidPathException::InvalidPathException ( const std::string msg = std::string()) [inline]

Definition at line 227 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::InvalidPathException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 226 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 72 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x71.html0000664000076400007640000002325511752725717021303 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00130.html0000664000076400007640000006122211752725720017306 0ustar00jrossjross00000000000000 qpid::framing::FloatValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FloatValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 FloatValue (float f)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::FloatValue::FloatValue ( float  f)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00679.html0000664000076400007640000002021711752725717017335 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::ConnectionSettings Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00419.html0000664000076400007640000001271111752725717017325 0ustar00jrossjross00000000000000 qpid/client/Message.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Message.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::Message
 A message sent to or received from the broker. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00689.html0000664000076400007640000001435611752725717017345 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Handle Member List
This is the complete list of members for qpid::client::Handle, including all inherited members.
Handle()qpid::client::Handle [inline, protected]
Handle(const Handle &)qpid::client::Handle [protected]
Impl typedefqpid::client::Handle [protected]
implqpid::client::Handle [protected]
isNull() const qpid::client::Handle [inline]
isValid() const qpid::client::Handle [inline]
operator bool() const qpid::client::Handle [inline]
operator!() const qpid::client::Handle [inline]
operator=(const Handle &)qpid::client::Handle [protected]
swap(Handle< T > &h)qpid::client::Handle [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00669.html0000664000076400007640000002715011752725717017337 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::RangeSet Member List
This is the complete list of members for qpid::RangeSet, including all inherited members.
addRange(const Range< T > &)qpid::RangeSet
addSet(const RangeSet< T > &)qpid::RangeSet
back() const qpid::RangeSet [inline]
begin() const qpid::RangeSet
clear()qpid::RangeSet [inline]
const_iterator typedefqpid::RangeSet
contains(const T &t) const qpid::RangeSet
contains(const Range< T > &) const qpid::RangeSet
contiguous() const qpid::RangeSet [inline]
decode(S &s)qpid::RangeSet [inline]
empty() const qpid::RangeSet [inline]
encode(S &s) const qpid::RangeSet [inline]
end() const qpid::RangeSet
front() const qpid::RangeSet [inline]
operator+=(const T &t)qpid::RangeSet [inline]
operator+=(const Range< T > &r)qpid::RangeSet [inline]
operator+=(const RangeSet< T > &s)qpid::RangeSet [inline]
operator-=(const T &t)qpid::RangeSet [inline]
operator-=(const Range< T > &r)qpid::RangeSet [inline]
operator-=(const RangeSet< T > &s)qpid::RangeSet [inline]
operator<<(std::ostream &o, const RangeSet< U > &r)qpid::RangeSet [friend]
operator==(const RangeSet< T > &) const qpid::RangeSet
rangeContaining(const T &) const qpid::RangeSet
RangeIterator typedefqpid::RangeSet
rangesBegin() const qpid::RangeSet [inline]
rangesEnd() const qpid::RangeSet [inline]
RangeSet()qpid::RangeSet [inline]
RangeSet(const Range< T > &r)qpid::RangeSet [inline, explicit]
RangeSet(const T &a, const T &b)qpid::RangeSet [inline]
rangesSize() const qpid::RangeSet [inline]
removeRange(const Range< T > &)qpid::RangeSet
removeSet(const RangeSet< T > &)qpid::RangeSet
serialize(S &s)qpid::RangeSet [inline]
size() const qpid::RangeSet
span() const qpid::RangeSet
toRange() const qpid::RangeSet

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00420.html0000664000076400007640000001773311752725717017326 0ustar00jrossjross00000000000000 qpid/messaging/Message.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Message.h File Reference
#include "qpid/messaging/ImportExport.h"
#include "qpid/messaging/Duration.h"
#include "qpid/types/Exception.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

class  qpid::messaging::Message
 Representation of a message. More...
struct  qpid::messaging::EncodingException

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Functions

void qpid::messaging::decode (const Message &message, qpid::types::Variant::Map &map, const std::string &encoding=std::string())
 Decodes message content into a Variant::Map.
void qpid::messaging::decode (const Message &message, qpid::types::Variant::List &list, const std::string &encoding=std::string())
 Decodes message content into a Variant::List.
void qpid::messaging::encode (const qpid::types::Variant::Map &map, Message &message, const std::string &encoding=std::string())
 Encodes a Variant::Map into a message.
void qpid::messaging::encode (const qpid::types::Variant::List &list, Message &message, const std::string &encoding=std::string())
 Encodes a Variant::List into a message.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x62.html0000664000076400007640000001353411752725720023602 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- b -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00299.html0000664000076400007640000004072011752725720017326 0ustar00jrossjross00000000000000 qpid::console::SchemaClass Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaClass Struct Reference

#include <qpid/console/Schema.h>

List of all members.

Public Member Functions

 SchemaClass (const uint8_t kind, const ClassKey &key, framing::Buffer &buffer)
 ~SchemaClass ()
const ClassKeygetClassKey () const

Public Attributes

const uint8_t kind
const ClassKey key
std::vector< SchemaProperty * > properties
std::vector< SchemaStatistic * > statistics
std::vector< SchemaMethod * > methods
std::vector< SchemaArgument * > arguments

Static Public Attributes

static const uint8_t KIND_TABLE = 1
static const uint8_t KIND_EVENT = 2

Constructor & Destructor Documentation

qpid::console::SchemaClass::SchemaClass ( const uint8_t  kind,
const ClassKey key,
framing::Buffer buffer 
)
qpid::console::SchemaClass::~SchemaClass ( )

Member Function Documentation

const ClassKey& qpid::console::SchemaClass::getClassKey ( ) const [inline]

Definition at line 92 of file Schema.h.

References key.


Member Data Documentation

Definition at line 95 of file Schema.h.

Referenced by getClassKey().

Definition at line 94 of file Schema.h.

Definition at line 88 of file Schema.h.

Definition at line 87 of file Schema.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00538.html0000664000076400007640000001447011752725717017333 0ustar00jrossjross00000000000000 qpid/management/ManagementObject.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/ManagementObject.h File Reference
#include "qpid/CommonImportExport.h"
#include "qpid/management/Mutex.h"
#include "qpid/types/Variant.h"
#include <map>
#include <vector>

Go to the source code of this file.

Classes

class  qpid::management::AgentAttachment
class  qpid::management::ObjectId
class  qpid::management::ManagementItem
class  qpid::management::ManagementObject

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::management

Typedefs

typedef std::map< ObjectId,
ManagementObject * > 
qpid::management::ManagementObjectMap
typedef std::vector
< ManagementObject * > 
qpid::management::ManagementObjectVector

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00427.html0000664000076400007640000001254511752725717017331 0ustar00jrossjross00000000000000 qmf/Query.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Query.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::Query

Namespaces

namespace  qmf

Enumerations

enum  qmf::QueryTarget { qmf::QUERY_OBJECT = 1, qmf::QUERY_OBJECT_ID = 2, qmf::QUERY_SCHEMA = 3, qmf::QUERY_SCHEMA_ID = 4 }

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00509_source.html0000664000076400007640000002510411752725717020705 0ustar00jrossjross00000000000000 qpid/framing/Header.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Header.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_HEADER_H
00002 #define QPID_FRAMING_HEADER_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN Header  {
00039     uint8_t flags;
00040 public:
00041     Header(
00042         bool _sync) : 
00043         flags(0){
00044         setSync(_sync);
00045     }
00046     Header()  : flags(0) {}
00047     
00048     QPID_COMMON_EXTERN void setSync(bool _sync);
00049     QPID_COMMON_EXTERN bool getSync() const;
00050     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const Header&);
00051     QPID_COMMON_EXTERN void encode(Buffer&) const;
00052     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00053     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00054     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00055     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00056     QPID_COMMON_EXTERN uint32_t bodySize() const;
00057     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00058 }; /* class Header */
00059 
00060 }}
00061 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00515.html0000664000076400007640000001202411752725717017317 0ustar00jrossjross00000000000000 qpid/framing/QueueQueryResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/QueueQueryResult.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::QueueQueryResult

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00879.html0000664000076400007640000001074111752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ScopedLock Member List
This is the complete list of members for qpid::sys::ScopedLock, including all inherited members.
ScopedLock(L &l)qpid::sys::ScopedLock [inline]
~ScopedLock()qpid::sys::ScopedLock [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x6f.html0000664000076400007640000001504211752725717022415 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x70.html0000664000076400007640000001404411752725720022567 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- p -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00556_source.html0000664000076400007640000002073711752725717020716 0ustar00jrossjross00000000000000 qpid/sys/windows/IntegerTypes.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/IntegerTypes.h
Go to the documentation of this file.
00001 #ifndef QPID_SYS_WINDOWS_INTEGERTYPES_H
00002 #define QPID_SYS_WINDOWS_INTEGERTYPES_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 typedef unsigned char    uint8_t;
00025 typedef unsigned short   uint16_t;
00026 typedef short            int16_t;
00027 typedef unsigned int     uint32_t;
00028 typedef int              int32_t;
00029 #if defined(_MSC_VER)
00030 typedef signed char      int8_t;
00031 typedef unsigned __int64 uint64_t;
00032 typedef          __int64 int64_t;
00033 #else
00034 #include <stdint.h>
00035 #endif
00036 
00037 // Visual Studio doesn't define other common types, so set them up here too.
00038 typedef unsigned int     uint;
00039 
00040 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00477.html0000664000076400007640000001237711752725717017341 0ustar00jrossjross00000000000000 qpid/messaging/Session.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Session.h File Reference

Go to the source code of this file.

Classes

class  qpid::messaging::Session
 A session represents a distinct 'conversation' which can involve sending and receiving messages to and from different addresses. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00520.html0000664000076400007640000001202411752725717017313 0ustar00jrossjross00000000000000 qpid/framing/StreamProperties.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/StreamProperties.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::StreamProperties

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00636.html0000664000076400007640000001723311752725717017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Query Member List
This is the complete list of members for qmf::engine::Query, including all inherited members.
getClass() const qmf::engine::Query
getDecreasing() const qmf::engine::Query
getLimit() const qmf::engine::Query
getObjectId() const qmf::engine::Query
getOrderBy() const qmf::engine::Query
getPackage() const qmf::engine::Query
getSelect() const qmf::engine::Query
haveLimit() const qmf::engine::Query
haveOrderBy() const qmf::engine::Query
haveSelect() const qmf::engine::Query
Query(const char *className, const char *packageName)qmf::engine::Query
Query(const SchemaClassKey *key)qmf::engine::Query
Query(const ObjectId *oid)qmf::engine::Query
Query(const Query &from)qmf::engine::Query
setLimit(uint32_t maxResults)qmf::engine::Query
setOrderBy(const char *attrName, bool decreasing)qmf::engine::Query
setSelect(const QueryOperand *criterion)qmf::engine::Query
~Query()qmf::engine::Query

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00413.html0000664000076400007640000001233411752725717017320 0ustar00jrossjross00000000000000 qpid/client/ConnectionSettings.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/ConnectionSettings.h File Reference
#include "qpid/client/ClientImportExport.h"
#include "qpid/sys/IntegerTypes.h"
#include <string>

Go to the source code of this file.

Classes

struct  qpid::client::ConnectionSettings
 Settings for a Connection. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys
namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00531.html0000664000076400007640000001704511752725717017325 0ustar00jrossjross00000000000000 qpid/Options.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Options.h File Reference
#include "qpid/Exception.h"
#include <boost/program_options.hpp>
#include <boost/format.hpp>
#include <sstream>
#include <iterator>
#include <algorithm>
#include <string>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::OptionValue
struct  qpid::Options
 Base class for options. More...
struct  qpid::Options::Exception
struct  qpid::CommonOptions
 Standard options for configuration. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


Functions

std::string qpid::prettyArg (const std::string &, const std::string &)
template<class T >
po::value_semantic * qpid::optValue (T &value, const char *name)
 Create an option value.
template<class T >
po::value_semantic * qpid::optValue (std::vector< T > &value, const char *name)
 Create a vector value.
po::value_semantic * qpid::optValue (bool &value)
 Create a boolean switch value.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00191.html0000664000076400007640000002553311752725717017330 0ustar00jrossjross00000000000000 qpid::amqp_0_10::ListCodec Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::amqp_0_10::ListCodec Class Reference

Codec for encoding/decoding a list of Variants using the AMQP 0-10 list encoding. More...

#include <qpid/amqp_0_10/Codecs.h>

List of all members.

Public Types

typedef qpid::types::Variant::List ObjectType

Static Public Member Functions

static void encode (const ObjectType &, std::string &)
static void decode (const std::string &, ObjectType &)
static size_t encodedSize (const ObjectType &)

Static Public Attributes

static const std::string contentType

Detailed Description

Codec for encoding/decoding a list of Variants using the AMQP 0-10 list encoding.


Member Typedef Documentation


Member Function Documentation

static void qpid::amqp_0_10::ListCodec::decode ( const std::string ,
ObjectType  
) [static]
static void qpid::amqp_0_10::ListCodec::encode ( const ObjectType ,
std::string  
) [static]
static size_t qpid::amqp_0_10::ListCodec::encodedSize ( const ObjectType ) [static]

Member Data Documentation

Definition at line 59 of file Codecs.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00341.html0000664000076400007640000001444311752725717017323 0ustar00jrossjross00000000000000 qpid::InlineAllocator::Store Union Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineAllocator::Store Union Reference

List of all members.

Public Attributes

Aligner aligner_
char sizer_ [sizeof(value_type)*Max]

Member Data Documentation

Definition at line 78 of file InlineAllocator.h.

Definition at line 79 of file InlineAllocator.h.


The documentation for this union was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00483_source.html0000664000076400007640000005176211752725717020717 0ustar00jrossjross00000000000000 qpid/console/Broker.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Broker.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_BROKER_H_
00022 #define _QPID_CONSOLE_BROKER_H_
00023 
00024 #include "qpid/console/ConsoleImportExport.h"
00025 #include "qpid/client/Connection.h"
00026 #include "qpid/client/ConnectionSettings.h"
00027 #include "qpid/client/SubscriptionManager.h"
00028 #include "qpid/client/Session.h"
00029 #include "qpid/client/AsyncSession.h"
00030 #include "qpid/client/Message.h"
00031 #include "qpid/client/MessageListener.h"
00032 #include "qpid/sys/Thread.h"
00033 #include "qpid/sys/Runnable.h"
00034 #include "qpid/sys/Mutex.h"
00035 #include "qpid/sys/Condition.h"
00036 #include "qpid/Url.h"
00037 #include "qpid/framing/Buffer.h"
00038 #include "qpid/framing/Uuid.h"
00039 #include <string>
00040 #include <iostream>
00041 
00042 namespace qpid {
00043 namespace console {
00044     class SessionManager;
00045     class Agent;
00046     class Object;
00047 
00052     class Broker : public client::MessageListener {
00053     public:
00054         QPID_CONSOLE_EXTERN Broker(SessionManager& sm,
00055                                    client::ConnectionSettings& settings);
00056         QPID_CONSOLE_EXTERN ~Broker();
00057 
00058         QPID_CONSOLE_INLINE_EXTERN bool isConnected() const { return connected; }
00059         QPID_CONSOLE_INLINE_EXTERN const std::string& getError() const { return error; }
00060         QPID_CONSOLE_INLINE_EXTERN const std::string& getSessionId() const { return amqpSessionId; }
00061         QPID_CONSOLE_INLINE_EXTERN const framing::Uuid& getBrokerId() const { return brokerId; }
00062         QPID_CONSOLE_INLINE_EXTERN uint32_t getBrokerBank() const { return 1; }
00063         QPID_CONSOLE_INLINE_EXTERN void addBinding(const std::string& key) {
00064             connThreadBody.bindExchange("qpid.management", key);
00065         }
00066         QPID_CONSOLE_EXTERN std::string getUrl() const;
00067         QPID_CONSOLE_EXTERN void waitForStable();
00068 
00069     private:
00070         friend class SessionManager;
00071         friend class Object;
00072         typedef std::map<uint64_t,Agent*> AgentMap;
00073         static const int SYNC_TIME = 60;
00074 
00075         SessionManager& sessionManager;
00076         AgentMap agents;
00077         bool connected;
00078         std::string error;
00079         std::string amqpSessionId;
00080         client::ConnectionSettings connectionSettings;
00081         sys::Mutex lock;
00082         sys::Condition cond;
00083         framing::Uuid brokerId;
00084         uint32_t reqsOutstanding;
00085         bool syncInFlight;
00086         bool topicBound;
00087         Object* methodObject;
00088 
00089         friend class ConnectionThread;
00090         class ConnectionThread : public sys::Runnable {
00091             bool operational;
00092             bool shuttingDown;
00093             Broker&              broker;
00094             framing::Uuid        sessionId;
00095             client::Connection   connection;
00096             client::Session      session;
00097             client::SubscriptionManager* subscriptions;
00098             std::stringstream queueName;
00099             sys::Mutex        connLock;
00100             void run();
00101         public:
00102             ConnectionThread(Broker& _broker) :
00103                 operational(false), shuttingDown(false), broker(_broker), subscriptions(0) {}
00104             ~ConnectionThread();
00105             void sendBuffer(qpid::framing::Buffer& buf,
00106                             uint32_t               length,
00107                             const std::string&     exchange = "qpid.management",
00108                             const std::string&     routingKey = "broker");
00109             void bindExchange(const std::string& exchange, const std::string& key);
00110             void shutdown();
00111         };
00112 
00113         ConnectionThread connThreadBody;
00114         sys::Thread      connThread;
00115 
00116         void encodeHeader(framing::Buffer& buf, uint8_t opcode, uint32_t seq = 0) const;
00117         bool checkHeader(framing::Buffer& buf, uint8_t *opcode, uint32_t *seq) const;
00118         void received(client::Message& msg);
00119         void resetAgents();
00120         void updateAgent(const Object& object);
00121         void incOutstanding();
00122         void decOutstanding();
00123         void setBrokerId(const framing::Uuid& id) { brokerId = id; }
00124         void appendAgents(std::vector<Agent*>& agents) const;
00125 
00126         friend std::ostream& operator<<(std::ostream& o, const Broker& k);
00127     };
00128 
00129     std::ostream& operator<<(std::ostream& o, const Broker& k);
00130 }
00131 }
00132 
00133 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00441_source.html0000664000076400007640000002560111752725717020702 0ustar00jrossjross00000000000000 qpid/ImportExport.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/ImportExport.h
Go to the documentation of this file.
00001 #ifndef QPID_IMPORTEXPORT_H
00002 #define QPID_IMPORTEXPORT_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 //
00024 // This header file defines the following macros for the control of library/DLL
00025 // import and export:
00026 //
00027 // QPID_EXPORT         - Export declaration for Methods
00028 // QPID_CLASS_EXPORT   - Export declaration for Classes
00029 // QPID_INLINE_EXPORT  - Export declaration for Inline methods
00030 //
00031 // QPID_IMPORT         - Import declaration for Methods
00032 // QPID_CLASS_IMPORT   - Import declaration for Classes
00033 // QPID_INLINE_IMPORT  - Import declaration for Inline methods
00034 //
00035 
00036 #if defined(WIN32) && !defined(QPID_DECLARE_STATIC)
00037    //
00038    // Import and Export definitions for Windows:
00039    //
00040 #  define QPID_EXPORT __declspec(dllexport)
00041 #  define QPID_IMPORT __declspec(dllimport)
00042 #  ifdef _MSC_VER
00043      //
00044      // Specific to the Microsoft compiler:
00045      //
00046 #    define QPID_CLASS_EXPORT
00047 #    define QPID_CLASS_IMPORT
00048 #    define QPID_INLINE_EXPORT QPID_EXPORT
00049 #    define QPID_INLINE_IMPORT QPID_IMPORT
00050 #  else
00051      //
00052      // Specific to non-Microsoft compilers (mingw32):
00053      //
00054 #    define QPID_CLASS_EXPORT QPID_EXPORT
00055 #    define QPID_CLASS_IMPORT QPID_IMPORT
00056 #    define QPID_INLINE_EXPORT
00057 #    define QPID_INLINE_IMPORT
00058 #  endif
00059 #else
00060    //
00061    // Non-Windows (Linux, etc.) definitions:
00062    //
00063 #  define QPID_EXPORT
00064 #  define QPID_IMPORT
00065 #  define QPID_CLASS_EXPORT
00066 #  define QPID_CLASS_IMPORT
00067 #  define QPID_INLINE_EXPORT
00068 #  define QPID_INLINE_IMPORT
00069 #endif
00070 
00071 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00526.html0000664000076400007640000001175511752725717017333 0ustar00jrossjross00000000000000 qpid/framing/Xid.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Xid.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::Xid

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00631.html0000664000076400007640000001447111752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Object Member List
This is the complete list of members for qmf::engine::Object, including all inherited members.
destroy()qmf::engine::Object
getClass() const qmf::engine::Object
getObjectId() const qmf::engine::Object
getValue(const char *key) const qmf::engine::Object
invokeMethod(const char *methodName, const Value *inArgs, void *context) const qmf::engine::Object
isDeleted() const qmf::engine::Object
merge(const Object &from)qmf::engine::Object
Object(const SchemaObjectClass *type)qmf::engine::Object
Object(const Object &from)qmf::engine::Object
setObjectId(ObjectId *oid)qmf::engine::Object
~Object()qmf::engine::Object [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00427_source.html0000664000076400007640000003233311752725717020706 0ustar00jrossjross00000000000000 qmf/Query.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Query.h
Go to the documentation of this file.
00001 #ifndef QMF_QUERY_H
00002 #define QMF_QUERY_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qpid/types/Variant.h"
00027 #include <string>
00028 
00029 namespace qmf {
00030 
00031 #ifndef SWIG
00032     template <class> class PrivateImplRef;
00033 #endif
00034 
00035     class QueryImpl;
00036     class SchemaId;
00037     class DataAddr;
00038 
00039     enum QueryTarget {
00040     QUERY_OBJECT    = 1,
00041     QUERY_OBJECT_ID = 2,
00042     QUERY_SCHEMA    = 3,
00043     QUERY_SCHEMA_ID = 4
00044     };
00045 
00046     class QMF_CLASS_EXTERN Query : public qmf::Handle<QueryImpl> {
00047     public:
00048         QMF_EXTERN Query(QueryImpl* impl = 0);
00049         QMF_EXTERN Query(const Query&);
00050         QMF_EXTERN Query& operator=(const Query&);
00051         QMF_EXTERN ~Query();
00052 
00053         QMF_EXTERN Query(QueryTarget, const std::string& predicate="");
00054         QMF_EXTERN Query(QueryTarget, const std::string& className, const std::string& package, const std::string& predicate="");
00055         QMF_EXTERN Query(QueryTarget, const SchemaId&, const std::string& predicate="");
00056         QMF_EXTERN Query(const DataAddr&);
00057 
00058         QMF_EXTERN QueryTarget getTarget() const;
00059         QMF_EXTERN const DataAddr& getDataAddr() const;
00060         QMF_EXTERN const SchemaId& getSchemaId() const;
00061         QMF_EXTERN void setPredicate(const qpid::types::Variant::List&);
00062         QMF_EXTERN const qpid::types::Variant::List& getPredicate() const;
00063         QMF_EXTERN bool matchesPredicate(const qpid::types::Variant::Map& map) const;
00064 
00065 #ifndef SWIG
00066     private:
00067         friend class qmf::PrivateImplRef<Query>;
00068         friend struct QueryImplAccess;
00069 #endif
00070     };
00071 
00072 }
00073 
00074 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00517.html0000664000076400007640000001177111752725717017331 0ustar00jrossjross00000000000000 qpid/framing/ReplyTo.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/ReplyTo.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::ReplyTo

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00231.html0000664000076400007640000001510711752725720017311 0ustar00jrossjross00000000000000 qpid::sys::NullIOHandle Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::NullIOHandle Class Reference

#include <qpid/sys/posix/PrivatePosix.h>

List of all members.

Public Member Functions

 NullIOHandle ()

Protected Attributes

IOHandlePrivate *const impl

Constructor & Destructor Documentation

qpid::sys::NullIOHandle::NullIOHandle ( ) [inline]

Definition at line 68 of file PrivatePosix.h.


Member Data Documentation

IOHandlePrivate* const qpid::sys::IOHandle::impl [protected, inherited]

Definition at line 41 of file IOHandle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00171.html0000664000076400007640000001025111752725720017307 0ustar00jrossjross00000000000000 std::istringstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::istringstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00540_source.html0000664000076400007640000002641711752725717020710 0ustar00jrossjross00000000000000 qpid/sys/Mutex.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Mutex.h
Go to the documentation of this file.
00001 #ifndef _sys_Mutex_h
00002 #define _sys_Mutex_h
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 namespace qpid {
00023 namespace sys {
00024 
00029 template <class L>
00030 class ScopedLock
00031 {
00032   public:
00033     ScopedLock(L& l) : mutex(l) { l.lock(); }
00034     ~ScopedLock() { mutex.unlock(); }
00035   private:
00036     L& mutex;
00037 };
00038 
00039 template <class L>
00040 class ScopedUnlock
00041 {
00042   public:
00043     ScopedUnlock(L& l) : mutex(l) { l.unlock(); }
00044     ~ScopedUnlock() { mutex.lock(); }
00045   private:
00046     L& mutex;
00047 };
00048 
00049 template <class L>
00050 class ScopedRlock
00051 {
00052   public:
00053     ScopedRlock(L& l) : mutex(l) { l.rlock(); }
00054     ~ScopedRlock() { mutex.unlock(); }
00055   private:
00056     L& mutex;
00057 };
00058 
00059 template <class L>
00060 class ScopedWlock
00061 {
00062   public:
00063     ScopedWlock(L& l) : mutex(l) { l.wlock(); }
00064     ~ScopedWlock() { mutex.unlock(); }
00065   private:
00066     L& mutex;
00067 };
00068 
00069 template <class L>
00070 class ConditionalScopedLock
00071 {
00072   public:
00073     ConditionalScopedLock(L& l) : mutex(l) { acquired = l.trylock(); }
00074     ~ConditionalScopedLock() { if (acquired) mutex.unlock(); }
00075     bool lockAcquired() { return acquired; }
00076   private:
00077     L& mutex;
00078     bool acquired;
00079 };
00080 
00081 }}
00082 
00083 #ifdef USE_APR_PLATFORM
00084 #include "apr/Mutex.h"
00085 #elif defined (_WIN32)
00086 #include "windows/Mutex.h"
00087 #else
00088 #include "posix/Mutex.h"
00089 #endif
00090 
00091 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00892.html0000664000076400007640000001357511752725720017335 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Thread Member List
This is the complete list of members for qpid::sys::Thread, including all inherited members.
current()qpid::sys::Thread [static]
join()qpid::sys::Thread
logId()qpid::sys::Thread [static]
operator bool()qpid::sys::Thread
operator!=(const Thread &) const qpid::sys::Thread
operator==(const Thread &) const qpid::sys::Thread
Thread()qpid::sys::Thread
Thread(qpid::sys::Runnable *)qpid::sys::Thread [explicit]
Thread(qpid::sys::Runnable &)qpid::sys::Thread [explicit]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00423.html0000664000076400007640000001075011752725717017321 0ustar00jrossjross00000000000000 qmf/engine/ObjectId.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/ObjectId.h File Reference

Go to the source code of this file.

Classes

class  qmf::engine::ObjectId

Namespaces

namespace  qmf
namespace  qmf::engine

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00419_source.html0000664000076400007640000003172611752725717020714 0ustar00jrossjross00000000000000 qpid/client/Message.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Message.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_MESSAGE_H
00002 #define QPID_CLIENT_MESSAGE_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/client/ClientImportExport.h"
00026 #include "qpid/framing/MessageProperties.h"
00027 #include "qpid/framing/DeliveryProperties.h"
00028 #include <string>
00029 
00030 namespace qpid {
00031 
00032 namespace framing {
00033 class FieldTable;
00034 class SequenceNumber;           // FIXME aconway 2009-04-17: remove with getID?
00035 }
00036 
00037 namespace client {
00038 
00039 class MessageImpl;
00040 
00115 class QPID_CLIENT_CLASS_EXTERN Message
00116 {
00117 public:
00122     QPID_CLIENT_EXTERN Message(
00123         const std::string& data=std::string(),
00124         const std::string& routingKey=std::string());
00125     Message(MessageImpl*);    
00126     QPID_CLIENT_EXTERN Message(const Message&);
00127     QPID_CLIENT_EXTERN ~Message();
00128     QPID_CLIENT_EXTERN Message& operator=(const Message&);
00129     QPID_CLIENT_EXTERN void swap(Message&);
00130 
00131     QPID_CLIENT_EXTERN void setData(const std::string&);
00132     QPID_CLIENT_EXTERN const std::string& getData() const;
00133     QPID_CLIENT_EXTERN std::string& getData();
00134 
00135     QPID_CLIENT_EXTERN void appendData(const std::string&);
00136 
00137     QPID_CLIENT_EXTERN bool hasMessageProperties() const;
00138     QPID_CLIENT_EXTERN framing::MessageProperties& getMessageProperties();
00139     QPID_CLIENT_EXTERN const framing::MessageProperties& getMessageProperties() const;
00140 
00141     QPID_CLIENT_EXTERN bool hasDeliveryProperties() const;
00142     QPID_CLIENT_EXTERN framing::DeliveryProperties& getDeliveryProperties();
00143     QPID_CLIENT_EXTERN const framing::DeliveryProperties& getDeliveryProperties() const;
00144 
00145 
00151     QPID_CLIENT_EXTERN std::string getDestination() const;
00152 
00154     QPID_CLIENT_EXTERN bool isRedelivered() const;
00156     QPID_CLIENT_EXTERN void setRedelivered(bool redelivered);
00157 
00159     QPID_CLIENT_EXTERN framing::FieldTable& getHeaders();
00160 
00162     QPID_CLIENT_EXTERN const framing::FieldTable& getHeaders() const;
00163 
00164     // FIXME aconway 2009-04-17: does this need to be in public API?
00166     QPID_CLIENT_EXTERN const framing::SequenceNumber& getId() const;
00167 
00168   private:
00169     MessageImpl* impl;
00170     friend class MessageImpl; // Helper template for implementation
00171 };
00172 
00173 }}
00174 
00175 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00880.html0000664000076400007640000001075711752725720017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ScopedUnlock Member List
This is the complete list of members for qpid::sys::ScopedUnlock, including all inherited members.
ScopedUnlock(L &l)qpid::sys::ScopedUnlock [inline]
~ScopedUnlock()qpid::sys::ScopedUnlock [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00769.html0000664000076400007640000002171011752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FieldTableValue Member List
This is the complete list of members for qpid::framing::FieldTableValue, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldTableValue(const FieldTable &)qpid::framing::FieldTableValue
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
ValueType typedefqpid::framing::FieldTableValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/tabs.css0000664000076400007640000000210711752725717017262 0ustar00jrossjross00000000000000.tabs, .tabs2, .tabs3 { background-image: url('tab_b.png'); width: 100%; z-index: 101; font-size: 13px; } .tabs2 { font-size: 10px; } .tabs3 { font-size: 9px; } .tablist { margin: 0; padding: 0; display: table; } .tablist li { float: left; display: table-cell; background-image: url('tab_b.png'); line-height: 36px; list-style: none; } .tablist a { display: block; padding: 0 20px; font-weight: bold; background-image:url('tab_s.png'); background-repeat:no-repeat; background-position:right; color: #283A5D; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); text-decoration: none; outline: none; } .tabs3 .tablist a { padding: 0 10px; } .tablist a:hover { background-image: url('tab_h.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); text-decoration: none; } .tablist li.current a { background-image: url('tab_a.png'); background-repeat:repeat-x; color: #fff; text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); } qpidc-0.16/docs/api/html/a00313.html0000664000076400007640000001546111752725720017315 0ustar00jrossjross00000000000000 qpid::management::ScopedLockTemplate Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ScopedLockTemplate Class Reference

Scoped lock template: calls lock() in ctor, unlock() in dtor. More...

#include <qpid/management/Mutex.h>

List of all members.

Public Member Functions

 ScopedLockTemplate (L &l)
 ~ScopedLockTemplate ()

Detailed Description

Scoped lock template: calls lock() in ctor, unlock() in dtor.

L can be any class with lock() and unlock() functions.


Constructor & Destructor Documentation

qpid::management::ScopedLockTemplate::ScopedLockTemplate ( L &  l) [inline]

Definition at line 37 of file Mutex.h.

qpid::management::ScopedLockTemplate::~ScopedLockTemplate ( ) [inline]

Definition at line 38 of file Mutex.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00120.html0000664000076400007640000001517211752725720017310 0ustar00jrossjross00000000000000 qpid::messaging::FailoverUpdates Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::FailoverUpdates Class Reference

A utility to listen for updates on cluster membership and update the list of known urls for a connection accordingly. More...

#include <qpid/messaging/FailoverUpdates.h>

List of all members.

Public Member Functions

 FailoverUpdates (Connection &connection)
 ~FailoverUpdates ()

Detailed Description

A utility to listen for updates on cluster membership and update the list of known urls for a connection accordingly.


Constructor & Destructor Documentation

qpid::messaging::FailoverUpdates::FailoverUpdates ( Connection connection)
qpid::messaging::FailoverUpdates::~FailoverUpdates ( )

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00454_source.html0000664000076400007640000001652311752725717020711 0ustar00jrossjross00000000000000 qpid/agent/QmfAgentImportExport.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/agent/QmfAgentImportExport.h
Go to the documentation of this file.
00001 #ifndef QMF_AGENT_IMPORT_EXPORT_H
00002 #define QMF_AGENT_IMPORT_EXPORT_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include "qpid/ImportExport.h"
00024 
00025 #if defined(QMF_EXPORT) || defined (qmf_EXPORTS)
00026 #  define QMF_AGENT_EXTERN QPID_EXPORT
00027 #  define QMF_AGENT_CLASS_EXTERN QPID_CLASS_EXPORT
00028 #  define QMF_AGENT_INLINE_EXTERN QPID_INLINE_EXPORT
00029 #else
00030 #  define QMF_AGENT_EXTERN QPID_IMPORT
00031 #  define QMF_AGENT_CLASS_EXTERN QPID_CLASS_IMPORT
00032 #  define QMF_AGENT_INLINE_EXTERN QPID_INLINE_IMPORT
00033 #endif
00034 
00035 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00494_source.html0000664000076400007640000001451711752725717020716 0ustar00jrossjross00000000000000 qpid/framing/amqp_types_full.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/amqp_types_full.h
Go to the documentation of this file.
00001 #ifndef _framing_amqp_types_decl_h
00002 #define _framing_amqp_types_decl_h
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00032 #include "qpid/framing/amqp_types.h"
00033 #include "qpid/framing/Array.h"
00034 #include "qpid/framing/FieldTable.h"
00035 #include "qpid/framing/SequenceSet.h"
00036 #include "qpid/framing/Uuid.h"
00037 
00038 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00533_source.html0000664000076400007640000002263211752725717020705 0ustar00jrossjross00000000000000 qpid/log/SinkOptions.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/SinkOptions.h
Go to the documentation of this file.
00001 #ifndef QPID_LOG_SINKOPTIONS_H
00002 #define QPID_LOG_SINKOPTIONS_H
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/Options.h"
00023 #include <string>
00024 
00025 namespace qpid {
00026 namespace log {
00027 
00028 class Logger;
00029 
00038 struct SinkOptions : public qpid::Options {
00039 
00040     // Create a platform's SinkOptions. Pass argv0 as the program name,
00041     // useful for syslog-type logging.
00042     static SinkOptions *create(const std::string& argv0=std::string());
00043 
00044     SinkOptions(const std::string& name="Logging sink options")
00045         : qpid::Options(name)
00046     {}
00047     virtual ~SinkOptions() {}
00048 
00049     virtual SinkOptions& operator=(const SinkOptions&) = 0;
00050 
00051     // This allows the caller to indicate that there's no normal outputs
00052     // available. For example, when running as a daemon. In these cases, the
00053     // platform's "syslog"-type output should replace the default stderr
00054     // unless some other sink has been selected.
00055     virtual void detached(void) = 0;
00056 
00057     // The Logger acting on these options calls setup() to request any
00058     // Sinks be set up and fed back to the logger.
00059     virtual void setup(Logger *logger) = 0;
00060 };
00061 
00062 }} // namespace qpid::log
00063 
00064 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00623.html0000664000076400007640000002001611752725717017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ConsoleEvent Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00677.html0000664000076400007640000001732711752725717017343 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Completion Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00716.html0000664000076400007640000001145111752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Package::NameHash Member List
This is the complete list of members for qpid::console::Package::NameHash, including all inherited members.
hashqpid::console::Package::NameHash
nameqpid::console::Package::NameHash
NameHash(const std::string &n, const uint8_t *h)qpid::console::Package::NameHash [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00113.html0000664000076400007640000001013311752725720017302 0ustar00jrossjross00000000000000 std::exception Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::exception Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00183.html0000664000076400007640000001032211752725720017311 0ustar00jrossjross00000000000000 std::vector::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::vector::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00373.html0000664000076400007640000007247711752725717017343 0ustar00jrossjross00000000000000 qpid::Url Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

An AMQP URL contains a list of addresses. More...

#include <qpid/Url.h>

List of all members.

Classes

struct  Invalid

Public Member Functions

std::string str () const
 Convert to string form.
 Url ()
 Empty URL.
 Url (const Address &addr)
 URL containing a single address.
 Url (const std::string &url)
 Parse url, throw Invalid if invalid.
 Url (const std::string &url, const std::string &defaultProtocol)
 Parse url, throw Invalid if invalid.
 Url (const char *url)
 Parse url, throw Invalid if invalid.
Urloperator= (const char *s)
Urloperator= (const std::string &s)
void throwIfEmpty () const
 Throw Invalid if the URL does not contain any addresses.
void parse (const char *url)
 Replace contents with parsed url

Exceptions:
Invalidif the url is invalid.

void parse (const char *url, const std::string &defaultProtocol)
QPID_COMMON_INLINE_EXTERN void parse (const std::string &url)
void parseNoThrow (const char *url)
 Replace contesnts with parsed URL.
void parseNoThrow (const char *url, const std::string &defaultProtocol)
void setUser (const std::string &)
void setPass (const std::string &)
std::string getUser () const
std::string getPass () const

Static Public Member Functions

static Url getHostNameUrl (uint16_t port)
 Url with the hostname as returned by gethostname(2)
static Url getIpAddressesUrl (uint16_t port)
 Url with local IP address(es), may be more than one address on a multi-homed host.
static void addProtocol (const std::string &tag)
 Add a protocol tag to be recognzed in URLs.

Detailed Description

An AMQP URL contains a list of addresses.


Constructor & Destructor Documentation

qpid::Url::Url ( ) [inline]

Empty URL.

Definition at line 48 of file Url.h.

qpid::Url::Url ( const Address addr) [inline, explicit]

URL containing a single address.

Definition at line 51 of file Url.h.

qpid::Url::Url ( const std::string url) [inline, explicit]

Parse url, throw Invalid if invalid.

Definition at line 54 of file Url.h.

References parse().

qpid::Url::Url ( const std::string url,
const std::string defaultProtocol 
) [inline, explicit]

Parse url, throw Invalid if invalid.

Definition at line 56 of file Url.h.

References parse().

qpid::Url::Url ( const char *  url) [inline, explicit]

Parse url, throw Invalid if invalid.

Definition at line 59 of file Url.h.

References parse().


Member Function Documentation

static void qpid::Url::addProtocol ( const std::string tag) [static]

Add a protocol tag to be recognzed in URLs.

Only for use by protcol plug-in initializers.

static Url qpid::Url::getHostNameUrl ( uint16_t  port) [static]

Url with the hostname as returned by gethostname(2)

static Url qpid::Url::getIpAddressesUrl ( uint16_t  port) [static]

Url with local IP address(es), may be more than one address on a multi-homed host.

std::string qpid::Url::getPass ( ) const
std::string qpid::Url::getUser ( ) const
Url& qpid::Url::operator= ( const char *  s) [inline]

Definition at line 61 of file Url.h.

References parse().

Url& qpid::Url::operator= ( const std::string s) [inline]

Definition at line 62 of file Url.h.

References parse().

void qpid::Url::parse ( const char *  url)

Replace contents with parsed url

Exceptions:
Invalidif the url is invalid.

Referenced by Url(), and operator=().

void qpid::Url::parse ( const char *  url,
const std::string defaultProtocol 
)
QPID_COMMON_INLINE_EXTERN void qpid::Url::parse ( const std::string url) [inline]

Definition at line 72 of file Url.h.

References parse().

Referenced by parse().

void qpid::Url::parseNoThrow ( const char *  url)

Replace contesnts with parsed URL.

Replace with empty URL if invalid.

void qpid::Url::parseNoThrow ( const char *  url,
const std::string defaultProtocol 
)
void qpid::Url::setPass ( const std::string )
void qpid::Url::setUser ( const std::string )
std::string qpid::Url::str ( ) const

Convert to string form.

void qpid::Url::throwIfEmpty ( ) const

Throw Invalid if the URL does not contain any addresses.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00882.html0000664000076400007640000001075011752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ScopedWlock Member List
This is the complete list of members for qpid::sys::ScopedWlock, including all inherited members.
ScopedWlock(L &l)qpid::sys::ScopedWlock [inline]
~ScopedWlock()qpid::sys::ScopedWlock [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00128.html0000664000076400007640000005367411752725720017331 0ustar00jrossjross00000000000000 qpid::framing::FixedWidthValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FixedWidthValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 FixedWidthValue ()
 FixedWidthValue (const uint8_t(&data)[width])
 FixedWidthValue (const uint8_t *const data)
 FixedWidthValue (uint64_t v)
uint32_t encodedSize () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const Data &d) const
bool convertsToInt () const
int64_t getInt () const
uint8_trawOctets ()
uint8_trawOctets () const
void print (std::ostream &o) const
virtual bool operator== (const Data &) const =0
virtual bool convertsToString () const
virtual std::string getString () const

Constructor & Destructor Documentation

qpid::framing::FixedWidthValue::FixedWidthValue ( ) [inline]

Definition at line 145 of file FieldValue.h.

qpid::framing::FixedWidthValue::FixedWidthValue ( const uint8_t(&)  data[width]) [inline]

Definition at line 146 of file FieldValue.h.

qpid::framing::FixedWidthValue::FixedWidthValue ( const uint8_t *const  data) [inline]

Definition at line 147 of file FieldValue.h.

qpid::framing::FixedWidthValue::FixedWidthValue ( uint64_t  v) [inline]

Definition at line 151 of file FieldValue.h.


Member Function Documentation

bool qpid::framing::FixedWidthValue::convertsToInt ( ) const [inline, virtual]

Reimplemented from qpid::framing::FieldValue::Data.

Definition at line 167 of file FieldValue.h.

virtual bool qpid::framing::FieldValue::Data::convertsToString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::VariableWidthValue.

Definition at line 76 of file FieldValue.h.

void qpid::framing::FixedWidthValue::decode ( Buffer buffer) [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 160 of file FieldValue.h.

References qpid::framing::Buffer::getRawData().

void qpid::framing::FixedWidthValue::encode ( Buffer buffer) [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 159 of file FieldValue.h.

References qpid::framing::Buffer::putRawData().

uint32_t qpid::framing::FixedWidthValue::encodedSize ( ) const [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 158 of file FieldValue.h.

int64_t qpid::framing::FixedWidthValue::getInt ( ) const [inline, virtual]

Reimplemented from qpid::framing::FieldValue::Data.

Definition at line 168 of file FieldValue.h.

virtual std::string qpid::framing::FieldValue::Data::getString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::VariableWidthValue.

Definition at line 78 of file FieldValue.h.

virtual bool qpid::framing::FieldValue::Data::operator== ( const Data ) const [pure virtual, inherited]
bool qpid::framing::FixedWidthValue::operator== ( const Data &  d) const [inline]

Definition at line 161 of file FieldValue.h.

void qpid::framing::FixedWidthValue::print ( std::ostream o) const [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 180 of file FieldValue.h.

uint8_t* qpid::framing::FixedWidthValue::rawOctets ( ) [inline]

Definition at line 177 of file FieldValue.h.

uint8_t* qpid::framing::FixedWidthValue::rawOctets ( ) const [inline]

Definition at line 178 of file FieldValue.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00739.html0000664000076400007640000001113111752725720017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::ValueFactory Member List
This is the complete list of members for qpid::console::ValueFactory, including all inherited members.
encodeValue(int typeCode, Value::Ptr value, framing::Buffer &buffer)qpid::console::ValueFactory [static]
newValue(int typeCode, framing::Buffer &buffer)qpid::console::ValueFactory [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00194.html0000664000076400007640000006021111752725720017315 0ustar00jrossjross00000000000000 qpid::log::Logger Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Central logging agent. More...

#include <qpid/log/Logger.h>

List of all members.

Classes

class  Output
 Logging output sink. More...

Public Types

enum  FormatFlag {
  FILE = 1, LINE = 2, FUNCTION = 4, LEVEL = 8,
  TIME = 16, THREAD = 32, HIRES = 64
}
 Flags indicating what to include in the log output. More...

Public Member Functions

 Logger ()
 ~Logger ()
void select (const Selector &s)
 Select the messages to be logged.
void format (int formatFlags)
 Set the formatting flags, bitwise OR of FormatFlag values.
int format (const Options &)
 Set format flags from options object.
void configure (const Options &o)
 Configure logger from Options.
void reconfigure (const std::vector< std::string > &selectors)
 Reset the log selectors.
void add (Statement &s)
 Add a statement.
void log (const Statement &, const std::string &)
 Log a message.
void output (std::auto_ptr< Output > out)
 Add an output destination for messages.
void setPrefix (const std::string &prefix)
 Set a prefix for all messages.
void clear ()
 Reset the logger.
QPID_COMMON_INLINE_EXTERN
const Options
getOptions () const
 Get the options used to configure the logger.

Static Public Member Functions

static Loggerinstance ()

Detailed Description

Central logging agent.

Thread safe, singleton.

The Logger provides all needed functionality for selecting and formatting logging output. The actual outputting of log records is handled by Logger::Output-derived classes instantiated by the platform's sink-related options.


Member Enumeration Documentation

Flags indicating what to include in the log output.

Enumerator:
FILE 
LINE 
FUNCTION 
LEVEL 
TIME 
THREAD 
HIRES 

Definition at line 39 of file Logger.h.


Constructor & Destructor Documentation

qpid::log::Logger::Logger ( )
qpid::log::Logger::~Logger ( )

Member Function Documentation

void qpid::log::Logger::add ( Statement s)

Add a statement.

void qpid::log::Logger::clear ( )

Reset the logger.

void qpid::log::Logger::configure ( const Options o)

Configure logger from Options.

void qpid::log::Logger::format ( int  formatFlags)

Set the formatting flags, bitwise OR of FormatFlag values.

int qpid::log::Logger::format ( const Options )

Set format flags from options object.

Returns:
computed flags.
QPID_COMMON_INLINE_EXTERN const Options& qpid::log::Logger::getOptions ( ) const [inline]

Get the options used to configure the logger.

Definition at line 96 of file Logger.h.

static Logger& qpid::log::Logger::instance ( ) [static]
void qpid::log::Logger::log ( const Statement ,
const std::string  
)

Log a message.

void qpid::log::Logger::output ( std::auto_ptr< Output out)

Add an output destination for messages.

void qpid::log::Logger::reconfigure ( const std::vector< std::string > &  selectors)

Reset the log selectors.

void qpid::log::Logger::select ( const Selector s)

Select the messages to be logged.

void qpid::log::Logger::setPrefix ( const std::string prefix)

Set a prefix for all messages.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00445.html0000664000076400007640000001116111752725717017322 0ustar00jrossjross00000000000000 qmf/SchemaId.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/SchemaId.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qpid/types/Uuid.h"
#include "qmf/SchemaTypes.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::SchemaId

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00493.html0000664000076400007640000002034611752725717017332 0ustar00jrossjross00000000000000 qpid/framing/amqp_types.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/amqp_types.h File Reference

Definitions and forward declarations of all types used in AMQP messages. More...

#include "qpid/sys/IntegerTypes.h"
#include <string>

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


Typedefs

typedef uint8_t qpid::framing::FrameType
typedef uint16_t qpid::framing::ChannelId
typedef uint32_t qpid::framing::BatchOffset
typedef uint8_t qpid::framing::ClassId
typedef uint8_t qpid::framing::MethodId
typedef uint16_t qpid::framing::ReplyCode

Enumerations

enum  qpid::framing::DeliveryMode { qpid::framing::TRANSIENT = 1, qpid::framing::PERSISTENT = 2 }

Variables

const ChannelId qpid::framing::CHANNEL_MAX = (ChannelId(~1))>>1
 Maximum channel ID used by broker.
const ChannelId qpid::framing::CHANNEL_HIGH_BIT = ChannelId(~CHANNEL_MAX)

Detailed Description

Definitions and forward declarations of all types used in AMQP messages.

Definition in file amqp_types.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00553_source.html0000664000076400007640000002760611752725717020715 0ustar00jrossjross00000000000000 qpid/sys/ExceptionHolder.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/ExceptionHolder.h
Go to the documentation of this file.
00001 #ifndef QPID_EXCEPTIONHOLDER_H
00002 #define QPID_EXCEPTIONHOLDER_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include <boost/shared_ptr.hpp>
00026 
00027 
00028 namespace qpid {
00029 namespace sys {
00030 
00031 struct Raisable {
00032     virtual ~Raisable() {};
00033     virtual void raise() const=0;
00034     virtual std::string what() const=0;
00035 };
00036 
00041 class ExceptionHolder : public Raisable {
00042   public:
00043     ExceptionHolder() {}
00044     // Use default copy & assign.
00045 
00047     template <class Ex> ExceptionHolder(Ex* ex) { wrap(ex); }
00048     template <class Ex> ExceptionHolder& operator=(Ex* ex) { wrap(ex); return *this; }
00049 
00050     void raise() const { if (wrapper.get()) wrapper->raise() ; }
00051     std::string what() const { return wrapper.get() ? wrapper->what() : std::string(); }
00052     bool empty() const { return !wrapper.get(); }
00053     operator bool() const { return !empty(); }
00054     void reset() { wrapper.reset(); }
00055 
00056   private:
00057     template <class Ex> struct Wrapper : public Raisable {
00058         Wrapper(Ex* ptr) : exception(ptr) {}
00059         void raise() const { throw *exception; }
00060         std::string what() const { return exception->what(); }
00061         boost::shared_ptr<Ex> exception;
00062     };
00063     template <class Ex> void wrap(Ex* ex) { wrapper.reset(new Wrapper<Ex>(ex)); }
00064     boost::shared_ptr<Raisable> wrapper;
00065 };
00066 
00067 
00068 }} // namespace qpid::sys
00069 
00070 
00071 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00144.html0000664000076400007640000002450611752725720017317 0ustar00jrossjross00000000000000 qpid::framing::IllegalArgumentException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::IllegalArgumentException Struct Reference

The command argument is malformed, i.e. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 IllegalArgumentException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The command argument is malformed, i.e.

it does not fall within the specified domain. The illegal-argument exception can be raised on execution of any command which has domain valued fields.


Constructor & Destructor Documentation

qpid::framing::IllegalArgumentException::IllegalArgumentException ( const std::string msg = std::string()) [inline]

Definition at line 161 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::IllegalArgumentException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 160 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00086.html0000664000076400007640000001040611752725720017316 0ustar00jrossjross00000000000000 std::deque::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::deque::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00709.html0000664000076400007640000001545111752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::ConsoleListener Member List
This is the complete list of members for qpid::console::ConsoleListener, including all inherited members.
brokerConnected(const Broker &)qpid::console::ConsoleListener [inline, virtual]
brokerDisconnected(const Broker &)qpid::console::ConsoleListener [inline, virtual]
brokerInfo(Broker &)qpid::console::ConsoleListener [inline, virtual]
delAgent(const Agent &)qpid::console::ConsoleListener [inline, virtual]
event(Event &)qpid::console::ConsoleListener [inline, virtual]
newAgent(const Agent &)qpid::console::ConsoleListener [inline, virtual]
newClass(const ClassKey &)qpid::console::ConsoleListener [inline, virtual]
newPackage(const std::string &)qpid::console::ConsoleListener [inline, virtual]
objectProps(Broker &, Object &)qpid::console::ConsoleListener [inline, virtual]
objectStats(Broker &, Object &)qpid::console::ConsoleListener [inline, virtual]
~ConsoleListener()qpid::console::ConsoleListener [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00785.html0000664000076400007640000003567511752725720017343 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::MessageProperties Member List
This is the complete list of members for qpid::framing::MessageProperties, including all inherited members.
bodySize() const qpid::framing::MessageProperties
clearAppIdFlag()qpid::framing::MessageProperties
clearApplicationHeadersFlag()qpid::framing::MessageProperties
clearContentEncodingFlag()qpid::framing::MessageProperties
clearContentLengthFlag()qpid::framing::MessageProperties
clearContentTypeFlag()qpid::framing::MessageProperties
clearCorrelationIdFlag()qpid::framing::MessageProperties
clearMessageIdFlag()qpid::framing::MessageProperties
clearReplyToFlag()qpid::framing::MessageProperties
clearUserIdFlag()qpid::framing::MessageProperties
decode(Buffer &, uint32_t=0)qpid::framing::MessageProperties
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::MessageProperties
encode(Buffer &) const qpid::framing::MessageProperties
encodedSize() const qpid::framing::MessageProperties
encodeStructBody(Buffer &) const qpid::framing::MessageProperties
getAppId() const qpid::framing::MessageProperties
getApplicationHeaders() const qpid::framing::MessageProperties
getApplicationHeaders()qpid::framing::MessageProperties
getContentEncoding() const qpid::framing::MessageProperties
getContentLength() const qpid::framing::MessageProperties
getContentType() const qpid::framing::MessageProperties
getCorrelationId() const qpid::framing::MessageProperties
getMessageId() const qpid::framing::MessageProperties
getReplyTo() const qpid::framing::MessageProperties
getUserId() const qpid::framing::MessageProperties
hasAppId() const qpid::framing::MessageProperties
hasApplicationHeaders() const qpid::framing::MessageProperties
hasContentEncoding() const qpid::framing::MessageProperties
hasContentLength() const qpid::framing::MessageProperties
hasContentType() const qpid::framing::MessageProperties
hasCorrelationId() const qpid::framing::MessageProperties
hasMessageId() const qpid::framing::MessageProperties
hasReplyTo() const qpid::framing::MessageProperties
hasUserId() const qpid::framing::MessageProperties
MessageProperties(uint64_t _contentLength, const Uuid &_messageId, const std::string &_correlationId, const ReplyTo &_replyTo, const std::string &_contentType, const std::string &_contentEncoding, const std::string &_userId, const std::string &_appId, const FieldTable &_applicationHeaders)qpid::framing::MessageProperties [inline]
MessageProperties()qpid::framing::MessageProperties [inline]
operator<<(std::ostream &, const MessageProperties &)qpid::framing::MessageProperties [friend]
print(std::ostream &out) const qpid::framing::MessageProperties
setAppId(const std::string &_appId)qpid::framing::MessageProperties
setApplicationHeaders(const FieldTable &_applicationHeaders)qpid::framing::MessageProperties
setContentEncoding(const std::string &_contentEncoding)qpid::framing::MessageProperties
setContentLength(uint64_t _contentLength)qpid::framing::MessageProperties
setContentType(const std::string &_contentType)qpid::framing::MessageProperties
setCorrelationId(const std::string &_correlationId)qpid::framing::MessageProperties
setMessageId(const Uuid &_messageId)qpid::framing::MessageProperties
setReplyTo(const ReplyTo &_replyTo)qpid::framing::MessageProperties
setUserId(const std::string &_userId)qpid::framing::MessageProperties
TYPEqpid::framing::MessageProperties [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval.html0000664000076400007640000002015611752725720023021 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- a -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00414.html0000664000076400007640000001173411752725717017324 0ustar00jrossjross00000000000000 qpid/management/ConnectionSettings.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/ConnectionSettings.h File Reference
#include "qpid/CommonImportExport.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

struct  qpid::management::ConnectionSettings
 Settings for a Connection. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::management

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00827.html0000664000076400007640000002755711752725720017340 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ManagementAgent Member List
This is the complete list of members for qpid::management::ManagementAgent, including all inherited members.
addObject(ManagementObject *objectPtr, uint64_t persistId=0)=0qpid::management::ManagementAgent [pure virtual]
addObject(ManagementObject *objectPtr, const std::string &key, bool persistent=true)=0qpid::management::ManagementAgent [pure virtual]
cb_t typedefqpid::management::ManagementAgent
getAddress()=0qpid::management::ManagementAgent [pure virtual]
getMaxThreads()=0qpid::management::ManagementAgent [pure virtual]
getName(std::string &vendor, std::string &product, std::string &instance)=0qpid::management::ManagementAgent [pure virtual]
getSignalFd()=0qpid::management::ManagementAgent [pure virtual]
init(const std::string &brokerHost="localhost", uint16_t brokerPort=5672, uint16_t intervalSeconds=10, bool useExternalThread=false, const std::string &storeFile="", const std::string &uid="", const std::string &pwd="", const std::string &mech="PLAIN", const std::string &proto="tcp")=0qpid::management::ManagementAgent [pure virtual]
init(const management::ConnectionSettings &settings, uint16_t intervalSeconds=10, bool useExternalThread=false, const std::string &storeFile="")=0qpid::management::ManagementAgent [pure virtual]
ManagementAgent()qpid::management::ManagementAgent [inline]
pollCallbacks(uint32_t callLimit=0)=0qpid::management::ManagementAgent [pure virtual]
raiseEvent(const ManagementEvent &event, severity_t severity=SEV_DEFAULT)=0qpid::management::ManagementAgent [pure virtual]
registerClass(const std::string &packageName, const std::string &className, uint8_t *md5Sum, management::ManagementObject::writeSchemaCall_t schemaCall)=0qpid::management::ManagementAgent [pure virtual]
registerEvent(const std::string &packageName, const std::string &eventName, uint8_t *md5Sum, management::ManagementEvent::writeSchemaCall_t schemaCall)=0qpid::management::ManagementAgent [pure virtual]
setName(const std::string &vendor, const std::string &product, const std::string &instance="")=0qpid::management::ManagementAgent [pure virtual]
setSignalCallback(cb_t callback, void *context)=0qpid::management::ManagementAgent [pure virtual]
setSignalCallback(Notifyable &notifyable)=0qpid::management::ManagementAgent [pure virtual]
SEV_ALERT enum valueqpid::management::ManagementAgent
SEV_CRIT enum valueqpid::management::ManagementAgent
SEV_DEBUG enum valueqpid::management::ManagementAgent
SEV_DEFAULT enum valueqpid::management::ManagementAgent
SEV_EMERG enum valueqpid::management::ManagementAgent
SEV_ERROR enum valueqpid::management::ManagementAgent
SEV_INFO enum valueqpid::management::ManagementAgent
SEV_NOTE enum valueqpid::management::ManagementAgent
SEV_WARN enum valueqpid::management::ManagementAgent
severity_t enum nameqpid::management::ManagementAgent
~ManagementAgent()qpid::management::ManagementAgent [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00274.html0000664000076400007640000010177411752725720017326 0ustar00jrossjross00000000000000 qpid::console::RefValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::RefValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 RefValue (ObjectId v)
 RefValue (framing::Buffer &buffer)
std::string str () const
bool isObjectId () const
ObjectId asObjectId () const
virtual bool isNull () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual bool isMap () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::RefValue::RefValue ( ObjectId  v) [inline]

Definition at line 86 of file Value.h.

qpid::console::RefValue::RefValue ( framing::Buffer buffer)

Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

ObjectId qpid::console::RefValue::asObjectId ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 90 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

bool qpid::console::RefValue::isObjectId ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 89 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::RefValue::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00775.html0000664000076400007640000002135011752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Unsigned32Value Member List
This is the complete list of members for qpid::framing::Unsigned32Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
Unsigned32Value(uint32_t)qpid::framing::Unsigned32Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00585.html0000664000076400007640000001435311752725720017327 0ustar00jrossjross00000000000000 qpid::framing::file Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::file Namespace Reference

Enumerations

enum  ReturnCode { RETURN_CODE_CONTENT_TOO_LARGE = 311, RETURN_CODE_NO_ROUTE = 312, RETURN_CODE_NO_CONSUMERS = 313 }

Enumeration Type Documentation

Enumerator:
RETURN_CODE_CONTENT_TOO_LARGE 
RETURN_CODE_NO_ROUTE 
RETURN_CODE_NO_CONSUMERS 

Definition at line 152 of file enum.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00516.html0000664000076400007640000003321511752725717017325 0ustar00jrossjross00000000000000 qpid/framing/reply_exceptions.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/reply_exceptions.h File Reference

Go to the source code of this file.

Classes

struct  qpid::framing::UnauthorizedAccessException
 The client attempted to work with a server entity to which it has no access due to security settings. More...
struct  qpid::framing::NotFoundException
 The client attempted to work with a server entity that does not exist. More...
struct  qpid::framing::ResourceLockedException
 The client attempted to work with a server entity to which it has no access because another client is working with it. More...
struct  qpid::framing::PreconditionFailedException
 The client requested a command that was not allowed because some precondition failed. More...
struct  qpid::framing::ResourceDeletedException
 A server entity the client is working with has been deleted. More...
struct  qpid::framing::IllegalStateException
 The peer sent a command that is not permitted in the current state of the session. More...
struct  qpid::framing::CommandInvalidException
 The command segments could not be decoded. More...
struct  qpid::framing::ResourceLimitExceededException
 The client exceeded its resource allocation. More...
struct  qpid::framing::NotAllowedException
 The peer tried to use a command a manner that is inconsistent with the rules described in the specification. More...
struct  qpid::framing::IllegalArgumentException
 The command argument is malformed, i.e. More...
struct  qpid::framing::NotImplementedException
 The peer tried to use functionality that is not implemented in its partner. More...
struct  qpid::framing::InternalErrorException
 The peer could not complete the command because of an internal error. More...
struct  qpid::framing::InvalidArgumentException
 An invalid argument was passed to a command, and the operation could not proceed. More...
struct  qpid::framing::ConnectionForcedException
 An operator intervened to close the connection for some reason. More...
struct  qpid::framing::InvalidPathException
 The client tried to work with an unknown virtual host. More...
struct  qpid::framing::FramingErrorException
 A valid frame header cannot be formed from the incoming byte stream. More...
struct  qpid::framing::SessionBusyException
 The session is currently attached to another transport. More...
struct  qpid::framing::TransportBusyException
 The transport is currently attached to another session. More...
struct  qpid::framing::NotAttachedException
 The transport is not currently attached to any session. More...
struct  qpid::framing::UnknownIdsException
 Command data was received prior to any use of the command-point control. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


Functions

sys::ExceptionHolder qpid::framing::createSessionException (int code, const std::string &text)
sys::ExceptionHolder qpid::framing::createConnectionException (int code, const std::string &text)
sys::ExceptionHolder qpid::framing::createChannelException (int code, const std::string &text)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x67.html0000664000076400007640000001554011752725720022577 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- g -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00703.html0000664000076400007640000004772411752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::no_keyword::AsyncSession_0_10 Member List
This is the complete list of members for qpid::client::no_keyword::AsyncSession_0_10, including all inherited members.
AsyncSession_0_10()qpid::client::no_keyword::AsyncSession_0_10
AsyncSession_0_10(const SessionBase_0_10 &other)qpid::client::no_keyword::AsyncSession_0_10
close()qpid::client::SessionBase_0_10
dtxCommit(const Xid &xid=Xid(), bool onePhase=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxEnd(const Xid &xid=Xid(), bool fail=false, bool suspend=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxForget(const Xid &xid=Xid(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxGetTimeout(const Xid &xid=Xid(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxPrepare(const Xid &xid=Xid(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxRecover(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxRollback(const Xid &xid=Xid(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxSelect(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxSetTimeout(const Xid &xid=Xid(), uint32_t timeout=0, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxStart(const Xid &xid=Xid(), bool join=false, bool resume=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeBind(const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeBound(const std::string &exchange=std::string(), const std::string &queue=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeDeclare(const std::string &exchange=std::string(), const std::string &type=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeDelete(const std::string &exchange=std::string(), bool ifUnused=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeQuery(const std::string &name=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeUnbind(const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
executionException(uint16_t errorCode=0, const SequenceNumber &commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string &description=std::string(), const FieldTable &errorInfo=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
executionResult(const SequenceNumber &commandId=SequenceNumber(), const std::string &value=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
executionSync(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
flush()qpid::client::SessionBase_0_10
getChannel() const qpid::client::SessionBase_0_10
getConnection()qpid::client::SessionBase_0_10
getId() const qpid::client::SessionBase_0_10
implqpid::client::SessionBase_0_10 [protected]
isValid() const qpid::client::SessionBase_0_10
markCompleted(const framing::SequenceSet &ids, bool notifyPeer)qpid::client::SessionBase_0_10
markCompleted(const framing::SequenceNumber &id, bool cumulative, bool notifyPeer)qpid::client::SessionBase_0_10
messageAccept(const SequenceSet &transfers=SequenceSet(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageAcquire(const SequenceSet &transfers=SequenceSet(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageCancel(const std::string &destination=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageFlow(const std::string &destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageFlush(const std::string &destination=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageReject(const SequenceSet &transfers=SequenceSet(), uint16_t code=0, const std::string &text=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageRelease(const SequenceSet &transfers=SequenceSet(), bool setRedelivered=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageResume(const std::string &destination=std::string(), const std::string &resumeId=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageSetFlowMode(const std::string &destination=std::string(), uint8_t flowMode=0, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageStop(const std::string &destination=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageSubscribe(const std::string &queue=std::string(), const std::string &destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string &resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageTransfer(const std::string &destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message &content=Message(std::string()), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
operator=(const SessionBase_0_10 &other)qpid::client::no_keyword::AsyncSession_0_10
queueDeclare(const std::string &queue=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
queueDelete(const std::string &queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
queuePurge(const std::string &queue=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
queueQuery(const std::string &queue=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
resume(Connection)qpid::client::SessionBase_0_10
sendCompletion()qpid::client::SessionBase_0_10
SessionBase_0_10()qpid::client::SessionBase_0_10
suspend()qpid::client::SessionBase_0_10
sync()qpid::client::SessionBase_0_10
timeout(uint32_t seconds)qpid::client::SessionBase_0_10
txCommit(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
txRollback(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
txSelect(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
~SessionBase_0_10()qpid::client::SessionBase_0_10

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00068.html0000664000076400007640000006262111752725717017332 0ustar00jrossjross00000000000000 qmf::ConsoleEvent Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::ConsoleEvent Class Reference

#include <qmf/ConsoleEvent.h>

List of all members.

Public Member Functions

 ConsoleEvent (ConsoleEventImpl *impl=0)
 ConsoleEvent (const ConsoleEvent &)
ConsoleEventoperator= (const ConsoleEvent &)
 ~ConsoleEvent ()
ConsoleEventCode getType () const
uint32_t getCorrelator () const
Agent getAgent () const
AgentDelReason getAgentDelReason () const
uint32_t getSchemaIdCount () const
SchemaId getSchemaId (uint32_t) const
uint32_t getDataCount () const
Data getData (uint32_t) const
bool isFinal () const
const qpid::types::Variant::MapgetArguments () const
int getSeverity () const
uint64_t getTimestamp () const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::ConsoleEvent::ConsoleEvent ( ConsoleEventImpl *  impl = 0)
qmf::ConsoleEvent::ConsoleEvent ( const ConsoleEvent )
qmf::ConsoleEvent::~ConsoleEvent ( )

Member Function Documentation

Agent qmf::ConsoleEvent::getAgent ( ) const
AgentDelReason qmf::ConsoleEvent::getAgentDelReason ( ) const
const qpid::types::Variant::Map& qmf::ConsoleEvent::getArguments ( ) const
uint32_t qmf::ConsoleEvent::getCorrelator ( ) const
Data qmf::ConsoleEvent::getData ( uint32_t  ) const
uint32_t qmf::ConsoleEvent::getDataCount ( ) const
SchemaId qmf::ConsoleEvent::getSchemaId ( uint32_t  ) const
uint32_t qmf::ConsoleEvent::getSchemaIdCount ( ) const
int qmf::ConsoleEvent::getSeverity ( ) const
uint64_t qmf::ConsoleEvent::getTimestamp ( ) const
ConsoleEventCode qmf::ConsoleEvent::getType ( ) const
bool qmf::ConsoleEvent::isFinal ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

ConsoleEvent& qmf::ConsoleEvent::operator= ( const ConsoleEvent )
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00723.html0000664000076400007640000001167611752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SequenceManager Member List
This is the complete list of members for qpid::console::SequenceManager, including all inherited members.
release(uint32_t seq)qpid::console::SequenceManager
reserve(const std::string &context="")qpid::console::SequenceManager
SequenceManager()qpid::console::SequenceManager [inline]
set typedefqpid::console::SequenceManager

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00888.html0000664000076400007640000001073611752725720017336 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::IOHandlePrivate Member List
This is the complete list of members for qpid::sys::IOHandlePrivate, including all inherited members.
fdqpid::sys::IOHandlePrivate
IOHandlePrivate(int f=-1)qpid::sys::IOHandlePrivate [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00203.html0000664000076400007640000002550711752725717017323 0ustar00jrossjross00000000000000 qpid::amqp_0_10::MapCodec Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::amqp_0_10::MapCodec Class Reference

Codec for encoding/decoding a map of Variants using the AMQP 0-10 map encoding. More...

#include <qpid/amqp_0_10/Codecs.h>

List of all members.

Public Types

typedef qpid::types::Variant::Map ObjectType

Static Public Member Functions

static void encode (const ObjectType &, std::string &)
static void decode (const std::string &, ObjectType &)
static size_t encodedSize (const ObjectType &)

Static Public Attributes

static const std::string contentType

Detailed Description

Codec for encoding/decoding a map of Variants using the AMQP 0-10 map encoding.


Member Typedef Documentation


Member Function Documentation

static void qpid::amqp_0_10::MapCodec::decode ( const std::string ,
ObjectType  
) [static]
static void qpid::amqp_0_10::MapCodec::encode ( const ObjectType ,
std::string  
) [static]
static size_t qpid::amqp_0_10::MapCodec::encodedSize ( const ObjectType ) [static]

Member Data Documentation

Definition at line 44 of file Codecs.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00889.html0000664000076400007640000001166311752725720017337 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::PosixIOHandle Member List
This is the complete list of members for qpid::sys::PosixIOHandle, including all inherited members.
implqpid::sys::IOHandle [protected]
IOHandle(IOHandlePrivate *)qpid::sys::IOHandle [protected]
PosixIOHandle(int fd)qpid::sys::PosixIOHandle [inline]
~IOHandle()qpid::sys::IOHandle [protected, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00589.html0000664000076400007640000002357111752725720017335 0ustar00jrossjross00000000000000 qpid::log Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log Namespace Reference

Classes

class  Logger
 Central logging agent. More...
struct  Options
 Logging options for config parser. More...
class  Selector
 A selector identifies the set of log messages to enable. More...
struct  SinkOptions
 Logging sink options. More...
struct  LevelTraits
struct  Statement
 POD struct representing a logging statement in source code. More...

Enumerations

enum  Level {
  trace, debug, info, notice,
  warning, error, critical
}
 Debugging severity levels. More...

Enumeration Type Documentation

Debugging severity levels.

  • trace: High-volume debugging messages.
  • debug: Debugging messages.
  • info: Informational messages.
  • notice: Normal but significant condition.
  • warning: Warn of a possible problem.
  • error: A definite error has occured.
  • critical: System in danger of severe failure.
Enumerator:
trace 
debug 
info 
notice 
warning 
error 
critical 

Definition at line 38 of file Statement.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00565_source.html0000664000076400007640000001704311752725717020712 0ustar00jrossjross00000000000000 qpid/sys/Runnable.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Runnable.h
Go to the documentation of this file.
00001 #ifndef _Runnable_
00002 #define _Runnable_
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <boost/function.hpp>
00025 #include "qpid/CommonImportExport.h"
00026 
00027 namespace qpid {
00028 namespace sys {
00029 
00033 class QPID_COMMON_CLASS_EXTERN Runnable
00034 {
00035   public:
00037     typedef boost::function0<void> Functor;
00038 
00039     QPID_COMMON_EXTERN virtual ~Runnable();
00040 
00042     virtual void run() = 0;
00043 
00045     Functor functor();
00046 };
00047 
00048 }}
00049 
00050 
00051 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00040.html0000664000076400007640000006114611752725720017313 0ustar00jrossjross00000000000000 qpid::framing::BoolValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::BoolValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 BoolValue (bool)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::BoolValue::BoolValue ( bool  )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00597.html0000664000076400007640000000740211752725717017335 0ustar00jrossjross00000000000000 Qpid Management Framework C++ API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Qpid Management Framework C++ API

Classes

class  qmf::engine::ConnectionSettings
 Settings for AMQP connections to the broker. More...

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00507.html0000664000076400007640000001201611752725717017321 0ustar00jrossjross00000000000000 qpid/framing/FileProperties.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/FileProperties.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::FileProperties

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00366.html0000664000076400007640000002451311752725720017323 0ustar00jrossjross00000000000000 qpid::framing::UnauthorizedAccessException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::UnauthorizedAccessException Struct Reference

The client attempted to work with a server entity to which it has no access due to security settings. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 UnauthorizedAccessException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The client attempted to work with a server entity to which it has no access due to security settings.


Constructor & Destructor Documentation

qpid::framing::UnauthorizedAccessException::UnauthorizedAccessException ( const std::string msg = std::string()) [inline]

Definition at line 49 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::UnauthorizedAccessException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 48 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00451.html0000664000076400007640000001325711752725717017327 0ustar00jrossjross00000000000000 qpid/Address.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Address.h File Reference
#include "qpid/sys/IntegerTypes.h"
#include "qpid/CommonImportExport.h"
#include <iosfwd>
#include <string>

Go to the source code of this file.

Classes

struct  qpid::Address
 Contains the protocol address of an AMQP broker. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Functions

std::ostreamqpid::operator<< (std::ostream &os, const Address &addr)
bool qpid::operator== (const Address &x, const Address &y)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00261.html0000664000076400007640000001520411752725717017320 0ustar00jrossjross00000000000000 qmf::engine::QueryOperand Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::QueryOperand Struct Reference

#include <qmf/engine/Query.h>

List of all members.

Public Member Functions

virtual ~QueryOperand ()
virtual bool evaluate (const Object *object) const =0

Constructor & Destructor Documentation

virtual qmf::engine::QueryOperand::~QueryOperand ( ) [inline, virtual]

Definition at line 49 of file Query.h.


Member Function Documentation

virtual bool qmf::engine::QueryOperand::evaluate ( const Object object) const [pure virtual]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00746.html0000664000076400007640000001665211752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::DtxRecoverResult Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00708.html0000664000076400007640000001625311752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::ClassKey Member List
This is the complete list of members for qpid::console::ClassKey, including all inherited members.
ClassKey(const std::string &package, const std::string &name, const uint8_t *hash)qpid::console::ClassKey
encode(framing::Buffer &buffer) const qpid::console::ClassKey
getClassName() const qpid::console::ClassKey [inline]
getHash() const qpid::console::ClassKey [inline]
getHashString() const qpid::console::ClassKey
getPackageName() const qpid::console::ClassKey [inline]
HASH_SIZEqpid::console::ClassKey [static]
operator!=(const ClassKey &other) const qpid::console::ClassKey
operator<(const ClassKey &other) const qpid::console::ClassKey
operator<=(const ClassKey &other) const qpid::console::ClassKey
operator==(const ClassKey &other) const qpid::console::ClassKey
operator>(const ClassKey &other) const qpid::console::ClassKey
operator>=(const ClassKey &other) const qpid::console::ClassKey
str() const qpid::console::ClassKey

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00029.html0000664000076400007640000001024711752725720017316 0ustar00jrossjross00000000000000 std::basic_ifstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_ifstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00043.html0000664000076400007640000003631111752725717017320 0ustar00jrossjross00000000000000 qmf::engine::BrokerEvent Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::BrokerEvent Struct Reference

#include <qmf/engine/Console.h>

List of all members.

Public Types

enum  EventKind {
  BROKER_INFO = 10, DECLARE_QUEUE = 11, DELETE_QUEUE = 12, BIND = 13,
  UNBIND = 14, SETUP_COMPLETE = 15, STABLE = 16, QUERY_COMPLETE = 17,
  METHOD_RESPONSE = 18
}

Public Attributes

EventKind kind
char * name
char * exchange
char * bindingKey
void * context
QueryResponsequeryResponse
MethodResponsemethodResponse

Member Enumeration Documentation

Enumerator:
BROKER_INFO 
DECLARE_QUEUE 
DELETE_QUEUE 
BIND 
UNBIND 
SETUP_COMPLETE 
STABLE 
QUERY_COMPLETE 
METHOD_RESPONSE 

Definition at line 111 of file Console.h.


Member Data Documentation

Definition at line 126 of file Console.h.

Definition at line 127 of file Console.h.

Definition at line 125 of file Console.h.

Definition at line 124 of file Console.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00562_source.html0000664000076400007640000001435311752725717020710 0ustar00jrossjross00000000000000 qpid/sys/posix/Time.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/Time.h
Go to the documentation of this file.
00001 #ifndef QPID_SYS_POSIX_TIME_H
00002 #define QPID_SYS_POSIX_TIME_H
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/sys/IntegerTypes.h"
00023 
00024 namespace qpid {
00025 namespace sys {
00026 
00030 typedef int64_t TimePrivate;
00031 
00032 }} // namespace qpid::sys
00033 
00034 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00343.html0000664000076400007640000006136511752725720017324 0ustar00jrossjross00000000000000 qpid::framing::Str8Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Str8Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Str8Value (const std::string &v)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Str8Value::Str8Value ( const std::string v)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00621.html0000664000076400007640000001214211752725717017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::MethodResponse Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00817.html0000664000076400007640000002147711752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Xid Member List
This is the complete list of members for qpid::framing::Xid, including all inherited members.
bodySize() const qpid::framing::Xid
clearBranchIdFlag()qpid::framing::Xid
clearFormatFlag()qpid::framing::Xid
clearGlobalIdFlag()qpid::framing::Xid
decode(Buffer &, uint32_t=0)qpid::framing::Xid
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::Xid
encode(Buffer &) const qpid::framing::Xid
encodedSize() const qpid::framing::Xid
encodeStructBody(Buffer &) const qpid::framing::Xid
getBranchId() const qpid::framing::Xid
getFormat() const qpid::framing::Xid
getGlobalId() const qpid::framing::Xid
hasBranchId() const qpid::framing::Xid
hasFormat() const qpid::framing::Xid
hasGlobalId() const qpid::framing::Xid
operator<<(std::ostream &, const Xid &)qpid::framing::Xid [friend]
print(std::ostream &out) const qpid::framing::Xid
setBranchId(const std::string &_branchId)qpid::framing::Xid
setFormat(uint32_t _format)qpid::framing::Xid
setGlobalId(const std::string &_globalId)qpid::framing::Xid
TYPEqpid::framing::Xid [static]
Xid(uint32_t _format, const std::string &_globalId, const std::string &_branchId)qpid::framing::Xid [inline]
Xid()qpid::framing::Xid [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00051.html0000664000076400007640000002005411752725717017314 0ustar00jrossjross00000000000000 qpid::client::FailoverManager::Command Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FailoverManager::Command Struct Reference

Interface to implement for doing work that can be resumed on failover. More...

#include <qpid/client/FailoverManager.h>

List of all members.

Public Member Functions

virtual void execute (AsyncSession &session, bool isRetry)=0
 This method will be called with isRetry=false when the command is first executed.
virtual ~Command ()

Detailed Description

Interface to implement for doing work that can be resumed on failover.


Constructor & Destructor Documentation

virtual qpid::client::FailoverManager::Command::~Command ( ) [inline, virtual]

Definition at line 65 of file FailoverManager.h.


Member Function Documentation

virtual void qpid::client::FailoverManager::Command::execute ( AsyncSession session,
bool  isRetry 
) [pure virtual]

This method will be called with isRetry=false when the command is first executed.

The session to use for the work will be passed to the implementing class. If the connection fails while the execute call is in progress, the FailoverManager controlling the execution will re-establish a connection, open a new session and call back to the Command implementations execute method with the new session and isRetry=true.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00870.html0000664000076400007640000001177611752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::EncodingException Member List
This is the complete list of members for qpid::messaging::EncodingException, including all inherited members.
EncodingException(const std::string &msg)qpid::messaging::EncodingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00701.html0000664000076400007640000001334111752725720017311 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::SubscriptionSettings Member List
This is the complete list of members for qpid::client::SubscriptionSettings, including all inherited members.
acceptModeqpid::client::SubscriptionSettings
acquireModeqpid::client::SubscriptionSettings
autoAckqpid::client::SubscriptionSettings
completionModeqpid::client::SubscriptionSettings
exclusiveqpid::client::SubscriptionSettings
flowControlqpid::client::SubscriptionSettings
SubscriptionSettings(FlowControl flow=FlowControl::unlimited(), AcceptMode accept=ACCEPT_MODE_EXPLICIT, AcquireMode acquire=ACQUIRE_MODE_PRE_ACQUIRED, unsigned int autoAck_=1, CompletionMode completion=COMPLETE_ON_DELIVERY)qpid::client::SubscriptionSettings [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x70.html0000664000076400007640000001353411752725720023601 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- p -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00544.html0000664000076400007640000001163311752725717017326 0ustar00jrossjross00000000000000 qpid/messaging/FailoverUpdates.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/FailoverUpdates.h File Reference

Go to the source code of this file.

Classes

class  qpid::messaging::FailoverUpdates
 A utility to listen for updates on cluster membership and update the list of known urls for a connection accordingly. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00820.html0000664000076400007640000001721711752725720017321 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Options Member List
This is the complete list of members for qpid::log::Options, including all inherited members.
addOptions()qpid::Options [inline]
argv0qpid::log::Options
functionqpid::log::Options
hiresTsqpid::log::Options
levelqpid::log::Options
nameqpid::log::Options
operator=(const Options &)qpid::log::Options
Options(const std::string &argv0_=std::string(), const std::string &name_="Logging options")qpid::log::Options
Options(const Options &)qpid::log::Options
qpid::Options::Options(const std::string &name=std::string())qpid::Options
parse(int argc, char const *const *argv, const std::string &configfile=std::string(), bool allowUnknown=false)qpid::Options
prefixqpid::log::Options
selectorsqpid::log::Options
sinkOptionsqpid::log::Options
sourceqpid::log::Options
threadqpid::log::Options
timeqpid::log::Options
traceqpid::log::Options

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00554_source.html0000664000076400007640000001512611752725717020710 0ustar00jrossjross00000000000000 qpid/sys/IntegerTypes.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/IntegerTypes.h
Go to the documentation of this file.
00001 #ifndef QPID_SYS_INTEGERTYPES_H
00002 #define QPID_SYS_INTEGERTYPES_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #if (defined(_WINDOWS) || defined (WIN32))
00025 #include "qpid/sys/windows/IntegerTypes.h"
00026 #endif
00027 #if !defined _WINDOWS && !defined WIN32
00028 #include "qpid/sys/posix/IntegerTypes.h"
00029 #endif
00030 
00031 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00260.html0000664000076400007640000002400311752725717017314 0ustar00jrossjross00000000000000 qmf::engine::QueryExpression Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::QueryExpression Struct Reference

#include <qmf/engine/Query.h>

List of all members.

Public Member Functions

 QueryExpression (ExprOper oper, const QueryOperand *operand1, const QueryOperand *operand2)
 QueryExpression (QueryExpressionImpl *impl)
virtual ~QueryExpression ()
bool evaluate (const Object *object) const

Public Attributes

QueryExpressionImpl * impl

Constructor & Destructor Documentation

qmf::engine::QueryExpression::QueryExpression ( ExprOper  oper,
const QueryOperand operand1,
const QueryOperand operand2 
)
qmf::engine::QueryExpression::QueryExpression ( QueryExpressionImpl *  impl)
virtual qmf::engine::QueryExpression::~QueryExpression ( ) [virtual]

Member Function Documentation

bool qmf::engine::QueryExpression::evaluate ( const Object object) const [virtual]

Member Data Documentation

QueryExpressionImpl* qmf::engine::QueryExpression::impl

Definition at line 75 of file Query.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00422_source.html0000664000076400007640000006221611752725717020704 0ustar00jrossjross00000000000000 qpid/console/Object.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Object.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_OBJECT_H_
00022 #define _QPID_CONSOLE_OBJECT_H_
00023 
00024 #include "qpid/console/ConsoleImportExport.h"
00025 #include "qpid/console/ObjectId.h"
00026 #include "qpid/framing/Uuid.h"
00027 #include "qpid/framing/FieldTable.h"
00028 #include <boost/shared_ptr.hpp>
00029 #include <map>
00030 #include <set>
00031 #include <vector>
00032 
00033 namespace qpid {
00034 namespace framing {
00035     class Buffer;
00036 }
00037 namespace console {
00038 
00039     class  Broker;
00040     struct SchemaClass;
00041     struct SchemaMethod;
00042     class  ObjectId;
00043     class  ClassKey;
00044     class  Value;
00045 
00049     struct MethodResponse {
00050         uint32_t code;
00051         std::string text;
00052         std::map<std::string, boost::shared_ptr<Value> > arguments;
00053     };
00054 
00055     class Object {
00056     public:
00057         typedef std::vector<Object> Vector;
00058         struct AttributeMap : public std::map<std::string, boost::shared_ptr<Value> > {
00059             QPID_CONSOLE_EXTERN void addRef(const std::string& key, const ObjectId& val);
00060             QPID_CONSOLE_EXTERN void addUint(const std::string& key, uint32_t val);
00061             QPID_CONSOLE_EXTERN void addInt(const std::string& key, int32_t val);
00062             QPID_CONSOLE_EXTERN void addUint64(const std::string& key, uint64_t val);
00063             QPID_CONSOLE_EXTERN void addInt64(const std::string& key, int64_t val);
00064             QPID_CONSOLE_EXTERN void addString(const std::string& key, const std::string& val);
00065             QPID_CONSOLE_EXTERN void addBool(const std::string& key, bool val);
00066             QPID_CONSOLE_EXTERN void addFloat(const std::string& key, float val);
00067             QPID_CONSOLE_EXTERN void addDouble(const std::string& key, double val);
00068             QPID_CONSOLE_EXTERN void addUuid(const std::string& key, const framing::Uuid& val);
00069             QPID_CONSOLE_EXTERN void addMap(const std::string& key, const framing::FieldTable& val);
00070         };
00071 
00072         QPID_CONSOLE_EXTERN Object(Broker* broker, SchemaClass* schemaClass, framing::Buffer& buffer, bool prop, bool stat);
00073         QPID_CONSOLE_EXTERN ~Object();
00074 
00075         Broker* getBroker() const { return broker; }
00076         const ObjectId& getObjectId() const { return objectId; }
00077         QPID_CONSOLE_EXTERN const ClassKey& getClassKey() const;
00078         SchemaClass* getSchema() const { return schema; }
00079         uint64_t getCurrentTime() const { return currentTime; }
00080         uint64_t getCreateTime() const { return createTime; }
00081         uint64_t getDeleteTime() const { return deleteTime; }
00082         bool isDeleted() const { return deleteTime != 0; }
00083         QPID_CONSOLE_EXTERN std::string getIndex() const;
00084         QPID_CONSOLE_EXTERN void mergeUpdate(const Object& updated);
00085         const AttributeMap& getAttributes() const { return attributes; }
00086         QPID_CONSOLE_EXTERN void invokeMethod(const std::string name,
00087                                               const AttributeMap& args,
00088                                               MethodResponse& result);
00089         QPID_CONSOLE_EXTERN void handleMethodResp(framing::Buffer& buffer,
00090                                                   uint32_t sequence);
00091 
00092         QPID_CONSOLE_EXTERN ObjectId attrRef(const std::string& key) const;
00093         QPID_CONSOLE_EXTERN uint32_t attrUint(const std::string& key) const;
00094         QPID_CONSOLE_EXTERN int32_t attrInt(const std::string& key) const;
00095         QPID_CONSOLE_EXTERN uint64_t attrUint64(const std::string& key) const;
00096         QPID_CONSOLE_EXTERN int64_t attrInt64(const std::string& key) const;
00097         QPID_CONSOLE_EXTERN std::string attrString(const std::string& key) const;
00098         QPID_CONSOLE_EXTERN bool attrBool(const std::string& key) const;
00099         QPID_CONSOLE_EXTERN float attrFloat(const std::string& key) const;
00100         QPID_CONSOLE_EXTERN double attrDouble(const std::string& key) const;
00101         QPID_CONSOLE_EXTERN framing::Uuid attrUuid(const std::string& key) const;
00102         QPID_CONSOLE_EXTERN framing::FieldTable attrMap(const std::string& key) const;
00103 
00104     private:
00105         Broker* broker;
00106         SchemaClass* schema;
00107         ObjectId objectId;
00108         uint64_t currentTime;
00109         uint64_t createTime;
00110         uint64_t deleteTime;
00111         AttributeMap attributes;
00112         SchemaMethod* pendingMethod;
00113         MethodResponse methodResponse;
00114 
00115         void parsePresenceMasks(framing::Buffer& buffer, std::set<std::string>& excludeList);
00116     };
00117 
00118     QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const Object& object);
00119 }
00120 }
00121 
00122 
00123 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x74.html0000664000076400007640000002314411752725717022316 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00696.html0000664000076400007640000007465111752725717017347 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Session_0_10 Member List
This is the complete list of members for qpid::client::Session_0_10, including all inherited members.
BOOST_PARAMETER_MEMFUN(void, executionSync, 0, 1, ExecutionSyncParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, executionResult, 0, 3, ExecutionResultParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, executionException, 0, 8, ExecutionExceptionParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageTransfer, 0, 5, MessageTransferParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageAccept, 0, 2, MessageAcceptParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageReject, 0, 4, MessageRejectParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageRelease, 0, 3, MessageReleaseParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::MessageAcquireResult, messageAcquire, 0, 2, MessageAcquireParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::MessageResumeResult, messageResume, 0, 3, MessageResumeParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageSubscribe, 0, 9, MessageSubscribeParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageCancel, 0, 2, MessageCancelParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageSetFlowMode, 0, 3, MessageSetFlowModeParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageFlow, 0, 4, MessageFlowParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageFlush, 0, 2, MessageFlushParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, messageStop, 0, 2, MessageStopParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, txSelect, 0, 1, TxSelectParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, txCommit, 0, 1, TxCommitParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, txRollback, 0, 1, TxRollbackParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, dtxSelect, 0, 1, DtxSelectParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxStart, 0, 4, DtxStartParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxEnd, 0, 4, DtxEndParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxCommit, 0, 3, DtxCommitParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, dtxForget, 0, 2, DtxForgetParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::DtxGetTimeoutResult, dtxGetTimeout, 0, 2, DtxGetTimeoutParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxPrepare, 0, 2, DtxPrepareParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::DtxRecoverResult, dtxRecover, 0, 1, DtxRecoverParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::XaResult, dtxRollback, 0, 2, DtxRollbackParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, dtxSetTimeout, 0, 3, DtxSetTimeoutParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, exchangeDeclare, 0, 8, ExchangeDeclareParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, exchangeDelete, 0, 3, ExchangeDeleteParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::ExchangeQueryResult, exchangeQuery, 0, 2, ExchangeQueryParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, exchangeBind, 0, 5, ExchangeBindParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, exchangeUnbind, 0, 4, ExchangeUnbindParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::ExchangeBoundResult, exchangeBound, 0, 5, ExchangeBoundParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, queueDeclare, 0, 8, QueueDeclareParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, queueDelete, 0, 4, QueueDeleteParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(void, queuePurge, 0, 2, QueuePurgeParameters)qpid::client::Session_0_10 [inline]
BOOST_PARAMETER_MEMFUN(qpid::framing::QueueQueryResult, queueQuery, 0, 2, QueueQueryParameters)qpid::client::Session_0_10 [inline]
close()qpid::client::SessionBase_0_10
dtxCommit(const Xid &xid=Xid(), bool onePhase=false, bool sync=true)qpid::client::no_keyword::Session_0_10
dtxEnd(const Xid &xid=Xid(), bool fail=false, bool suspend=false, bool sync=true)qpid::client::no_keyword::Session_0_10
dtxForget(const Xid &xid=Xid(), bool sync=true)qpid::client::no_keyword::Session_0_10
dtxGetTimeout(const Xid &xid=Xid(), bool sync=true)qpid::client::no_keyword::Session_0_10
dtxPrepare(const Xid &xid=Xid(), bool sync=true)qpid::client::no_keyword::Session_0_10
dtxRecover(bool sync=true)qpid::client::no_keyword::Session_0_10
dtxRollback(const Xid &xid=Xid(), bool sync=true)qpid::client::no_keyword::Session_0_10
dtxSelect(bool sync=true)qpid::client::no_keyword::Session_0_10
dtxSetTimeout(const Xid &xid=Xid(), uint32_t timeout=0, bool sync=true)qpid::client::no_keyword::Session_0_10
dtxStart(const Xid &xid=Xid(), bool join=false, bool resume=false, bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeBind(const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeBound(const std::string &exchange=std::string(), const std::string &queue=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeDeclare(const std::string &exchange=std::string(), const std::string &type=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeDelete(const std::string &exchange=std::string(), bool ifUnused=false, bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeQuery(const std::string &name=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
exchangeUnbind(const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
executionException(uint16_t errorCode=0, const SequenceNumber &commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string &description=std::string(), const FieldTable &errorInfo=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
executionResult(const SequenceNumber &commandId=SequenceNumber(), const std::string &value=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
executionSync(bool sync=true)qpid::client::no_keyword::Session_0_10
flush()qpid::client::SessionBase_0_10
getChannel() const qpid::client::SessionBase_0_10
getConnection()qpid::client::SessionBase_0_10
getId() const qpid::client::SessionBase_0_10
implqpid::client::SessionBase_0_10 [protected]
isValid() const qpid::client::SessionBase_0_10
markCompleted(const framing::SequenceSet &ids, bool notifyPeer)qpid::client::SessionBase_0_10
markCompleted(const framing::SequenceNumber &id, bool cumulative, bool notifyPeer)qpid::client::SessionBase_0_10
messageAccept(const SequenceSet &transfers=SequenceSet(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageAcquire(const SequenceSet &transfers=SequenceSet(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageCancel(const std::string &destination=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageFlow(const std::string &destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=true)qpid::client::no_keyword::Session_0_10
messageFlush(const std::string &destination=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageReject(const SequenceSet &transfers=SequenceSet(), uint16_t code=0, const std::string &text=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageRelease(const SequenceSet &transfers=SequenceSet(), bool setRedelivered=false, bool sync=true)qpid::client::no_keyword::Session_0_10
messageResume(const std::string &destination=std::string(), const std::string &resumeId=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageSetFlowMode(const std::string &destination=std::string(), uint8_t flowMode=0, bool sync=true)qpid::client::no_keyword::Session_0_10
messageStop(const std::string &destination=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageSubscribe(const std::string &queue=std::string(), const std::string &destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string &resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
messageTransfer(const std::string &destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message &content=Message(std::string()), bool sync=true)qpid::client::no_keyword::Session_0_10
operator=(const SessionBase_0_10 &other)qpid::client::Session_0_10 [inline]
queueDeclare(const std::string &queue=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=true)qpid::client::no_keyword::Session_0_10
queueDelete(const std::string &queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=true)qpid::client::no_keyword::Session_0_10
queuePurge(const std::string &queue=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
queueQuery(const std::string &queue=std::string(), bool sync=true)qpid::client::no_keyword::Session_0_10
resume(Connection)qpid::client::SessionBase_0_10
sendCompletion()qpid::client::SessionBase_0_10
Session_0_10()qpid::client::Session_0_10 [inline]
Session_0_10(const SessionBase_0_10 &other)qpid::client::Session_0_10 [inline]
SessionBase_0_10()qpid::client::SessionBase_0_10
suspend()qpid::client::SessionBase_0_10
sync()qpid::client::SessionBase_0_10
timeout(uint32_t seconds)qpid::client::SessionBase_0_10
txCommit(bool sync=true)qpid::client::no_keyword::Session_0_10
txRollback(bool sync=true)qpid::client::no_keyword::Session_0_10
txSelect(bool sync=true)qpid::client::no_keyword::Session_0_10
~SessionBase_0_10()qpid::client::SessionBase_0_10

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x65.html0000664000076400007640000005234111752725717022317 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- e -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00462.html0000664000076400007640000001242211752725717017322 0ustar00jrossjross00000000000000 qpid/client/Connection.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Connection.h File Reference
#include <map>
#include <string>
#include "qpid/client/Session.h"
#include "qpid/client/ClientImportExport.h"
#include "qpid/client/ConnectionSettings.h"
#include "qpid/framing/ProtocolVersion.h"
#include "boost/function.hpp"

Go to the source code of this file.

Classes

class  qpid::client::Connection
 Represents a connection to an AMQP broker. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00132.html0000664000076400007640000005507711752725717017331 0ustar00jrossjross00000000000000 qpid::client::FlowControl Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Flow control works by associating a finite amount of "credit" with a subscription. More...

#include <qpid/client/FlowControl.h>

List of all members.

Public Member Functions

 FlowControl (uint32_t messages_=0, uint32_t bytes_=0, bool window_=false)
bool operator== (const FlowControl &x)

Static Public Member Functions

static FlowControl messageCredit (uint32_t messages_)
static FlowControl messageWindow (uint32_t messages_)
static FlowControl byteCredit (uint32_t bytes_)
static FlowControl byteWindow (uint32_t bytes_)
static FlowControl unlimited ()
static FlowControl zero ()

Public Attributes

uint32_t messages
 Message credit: subscription can accept up to this many messages.
uint32_t bytes
 Byte credit: subscription can accept up to this many bytes of message content.
bool window
 Window mode.

Static Public Attributes

static const uint32_t UNLIMITED = 0xFFFFFFFF

Detailed Description

Flow control works by associating a finite amount of "credit" with a subscription.

Credit includes a message count and a byte count. Each message received decreases the message count by one, and the byte count by the size of the message. Either count can have the special value UNLIMITED which is never decreased.

A subscription's credit is exhausted when the message count is 0 or the byte count is too small for the next available message. The subscription will not receive any further messages until is credit is renewed.

In "window mode" credit is automatically renewed when a message is completed (which by default happens when it is accepted). In non-window mode credit is not automatically renewed, it must be explicitly re-set (

See also:
Subscription)

Constructor & Destructor Documentation

qpid::client::FlowControl::FlowControl ( uint32_t  messages_ = 0,
uint32_t  bytes_ = 0,
bool  window_ = false 
) [inline]

Definition at line 51 of file FlowControl.h.

Referenced by messageCredit(), messageWindow(), byteCredit(), byteWindow(), unlimited(), and zero().


Member Function Documentation

static FlowControl qpid::client::FlowControl::byteCredit ( uint32_t  bytes_) [inline, static]

Definition at line 56 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

static FlowControl qpid::client::FlowControl::byteWindow ( uint32_t  bytes_) [inline, static]

Definition at line 57 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

static FlowControl qpid::client::FlowControl::messageCredit ( uint32_t  messages_) [inline, static]

Definition at line 54 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

static FlowControl qpid::client::FlowControl::messageWindow ( uint32_t  messages_) [inline, static]

Definition at line 55 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

bool qpid::client::FlowControl::operator== ( const FlowControl x) [inline]

Definition at line 68 of file FlowControl.h.

References messages, bytes, and window.

static FlowControl qpid::client::FlowControl::unlimited ( ) [inline, static]

Definition at line 58 of file FlowControl.h.

References FlowControl(), and UNLIMITED.

static FlowControl qpid::client::FlowControl::zero ( ) [inline, static]

Definition at line 59 of file FlowControl.h.

References FlowControl().


Member Data Documentation

Byte credit: subscription can accept up to this many bytes of message content.

Definition at line 64 of file FlowControl.h.

Referenced by operator==().

Message credit: subscription can accept up to this many messages.

Definition at line 62 of file FlowControl.h.

Referenced by operator==().

const uint32_t qpid::client::FlowControl::UNLIMITED = 0xFFFFFFFF [static]

Definition at line 50 of file FlowControl.h.

Referenced by messageCredit(), messageWindow(), byteCredit(), byteWindow(), and unlimited().

Window mode.

If true credit is automatically renewed as messages are acknowledged.

Definition at line 66 of file FlowControl.h.

Referenced by operator==().


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00513_source.html0000664000076400007640000002656611752725717020715 0ustar00jrossjross00000000000000 qpid/framing/MessageResumeResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/MessageResumeResult.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_MESSAGERESUMERESULT_H
00002 #define QPID_FRAMING_MESSAGERESUMERESULT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN MessageResumeResult  {
00039     uint64_t offset;
00040     uint16_t flags;
00041 public:
00042     static const uint16_t TYPE = 1029;
00043     MessageResumeResult(
00044         uint64_t _offset) : 
00045         offset(_offset),
00046         flags(0){
00047         flags |= (1 << 8);
00048     }
00049     MessageResumeResult()  : offset(0), flags(0) {}
00050     
00051     QPID_COMMON_EXTERN void setOffset(uint64_t _offset);
00052     QPID_COMMON_EXTERN uint64_t getOffset() const;
00053     QPID_COMMON_EXTERN bool hasOffset() const;
00054     QPID_COMMON_EXTERN void clearOffsetFlag();
00055     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const MessageResumeResult&);
00056     QPID_COMMON_EXTERN void encode(Buffer&) const;
00057     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00058     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00059     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00060     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00061     QPID_COMMON_EXTERN uint32_t bodySize() const;
00062     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00063 }; /* class MessageResumeResult */
00064 
00065 }}
00066 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00573.html0000664000076400007640000001005311752725717017323 0ustar00jrossjross00000000000000 qmf::posix Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::posix Namespace Reference

Classes

class  EventNotifier

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00150.html0000664000076400007640000001322411752725717017315 0ustar00jrossjross00000000000000 qpid::InlineRebind< T, T, BaseAllocator, Max > Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineRebind< T, T, BaseAllocator, Max > Struct Reference

#include <qpid/InlineAllocator.h>

List of all members.

Public Types

typedef qpid::InlineAllocator
< BaseAllocator, Max > 
other

Member Typedef Documentation

typedef qpid::InlineAllocator<BaseAllocator, Max> qpid::InlineRebind< T, T, BaseAllocator, Max >::other

Definition at line 96 of file InlineAllocator.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x6c.html0000664000076400007640000001541111752725717022412 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00083.html0000664000076400007640000001044211752725720017313 0ustar00jrossjross00000000000000 std::basic_string::const_reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_string::const_reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00016.html0000664000076400007640000010112211752725720017303 0ustar00jrossjross00000000000000 qpid::framing::Array Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Array Class Reference

#include <qpid/framing/Array.h>

List of all members.

Public Types

typedef boost::shared_ptr
< FieldValue
ValuePtr
typedef std::vector< ValuePtrValueVector
typedef ValueVector::const_iterator const_iterator
typedef ValueVector::iterator iterator

Public Member Functions

uint32_t encodedSize () const
void encode (Buffer &buffer) const
void decode (Buffer &buffer)
int count () const
bool operator== (const Array &other) const
 Array ()
 Array (TypeCode type)
 Array (uint8_t type)
 Array (const std::vector< std::string > &in)
QPID_COMMON_INLINE_EXTERN TypeCode getType () const
QPID_COMMON_INLINE_EXTERN
const_iterator 
begin () const
QPID_COMMON_INLINE_EXTERN
const_iterator 
end () const
QPID_COMMON_INLINE_EXTERN iterator begin ()
QPID_COMMON_INLINE_EXTERN iterator end ()
QPID_COMMON_INLINE_EXTERN ValuePtr front () const
QPID_COMMON_INLINE_EXTERN ValuePtr back () const
QPID_COMMON_INLINE_EXTERN size_t size () const
void insert (iterator i, ValuePtr value)
QPID_COMMON_INLINE_EXTERN void erase (iterator i)
QPID_COMMON_INLINE_EXTERN void push_back (ValuePtr value)
QPID_COMMON_INLINE_EXTERN void pop_back ()
QPID_COMMON_INLINE_EXTERN void add (ValuePtr value)
template<class T >
void collect (std::vector< T > &out) const

Friends

std::ostreamoperator<< (std::ostream &out, const Array &body)

Member Typedef Documentation

typedef ValueVector::const_iterator qpid::framing::Array::const_iterator

Definition at line 42 of file Array.h.

typedef ValueVector::iterator qpid::framing::Array::iterator

Definition at line 43 of file Array.h.

typedef boost::shared_ptr<FieldValue> qpid::framing::Array::ValuePtr

Definition at line 40 of file Array.h.

Definition at line 41 of file Array.h.


Constructor & Destructor Documentation

qpid::framing::Array::Array ( )
qpid::framing::Array::Array ( TypeCode  type)
qpid::framing::Array::Array ( uint8_t  type)
qpid::framing::Array::Array ( const std::vector< std::string > &  in)

Member Function Documentation

QPID_COMMON_INLINE_EXTERN void qpid::framing::Array::add ( ValuePtr  value) [inline]

Definition at line 76 of file Array.h.

QPID_COMMON_INLINE_EXTERN ValuePtr qpid::framing::Array::back ( ) const [inline]

Definition at line 67 of file Array.h.

QPID_COMMON_INLINE_EXTERN const_iterator qpid::framing::Array::begin ( ) const [inline]

Definition at line 61 of file Array.h.

QPID_COMMON_INLINE_EXTERN iterator qpid::framing::Array::begin ( ) [inline]

Definition at line 63 of file Array.h.

template<class T >
void qpid::framing::Array::collect ( std::vector< T > &  out) const [inline]

Definition at line 79 of file Array.h.

int qpid::framing::Array::count ( ) const
void qpid::framing::Array::decode ( Buffer buffer)
void qpid::framing::Array::encode ( Buffer buffer) const
uint32_t qpid::framing::Array::encodedSize ( ) const
QPID_COMMON_INLINE_EXTERN const_iterator qpid::framing::Array::end ( ) const [inline]

Definition at line 62 of file Array.h.

QPID_COMMON_INLINE_EXTERN iterator qpid::framing::Array::end ( ) [inline]

Definition at line 64 of file Array.h.

QPID_COMMON_INLINE_EXTERN void qpid::framing::Array::erase ( iterator  i) [inline]

Definition at line 71 of file Array.h.

QPID_COMMON_INLINE_EXTERN ValuePtr qpid::framing::Array::front ( ) const [inline]

Definition at line 66 of file Array.h.

QPID_COMMON_INLINE_EXTERN TypeCode qpid::framing::Array::getType ( ) const [inline]

Definition at line 58 of file Array.h.

void qpid::framing::Array::insert ( iterator  i,
ValuePtr  value 
)
bool qpid::framing::Array::operator== ( const Array other) const
QPID_COMMON_INLINE_EXTERN void qpid::framing::Array::pop_back ( ) [inline]

Definition at line 73 of file Array.h.

QPID_COMMON_INLINE_EXTERN void qpid::framing::Array::push_back ( ValuePtr  value) [inline]

Definition at line 72 of file Array.h.

QPID_COMMON_INLINE_EXTERN size_t qpid::framing::Array::size ( ) const [inline]

Definition at line 68 of file Array.h.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream out,
const Array body 
) [friend]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00074.html0000664000076400007640000001035211752725720017313 0ustar00jrossjross00000000000000 std::string::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::string::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00639.html0000664000076400007640000001646411752725717017342 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ResilientConnection Member List
This is the complete list of members for qmf::engine::ResilientConnection, including all inherited members.
bind(SessionHandle handle, char *exchange, char *queue, char *key)qmf::engine::ResilientConnection
createSession(const char *name, void *sessionContext, SessionHandle &handle)qmf::engine::ResilientConnection
declareQueue(SessionHandle handle, char *queue)qmf::engine::ResilientConnection
deleteQueue(SessionHandle handle, char *queue)qmf::engine::ResilientConnection
destroySession(SessionHandle handle)qmf::engine::ResilientConnection
getEvent(ResilientConnectionEvent &event)qmf::engine::ResilientConnection
isConnected() const qmf::engine::ResilientConnection
notify()qmf::engine::ResilientConnection
popEvent()qmf::engine::ResilientConnection
ResilientConnection(const ConnectionSettings &settings)qmf::engine::ResilientConnection
sendMessage(SessionHandle handle, Message &message)qmf::engine::ResilientConnection
setNotifyFd(int fd)qmf::engine::ResilientConnection
unbind(SessionHandle handle, char *exchange, char *queue, char *key)qmf::engine::ResilientConnection
~ResilientConnection()qmf::engine::ResilientConnection

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x72.html0000664000076400007640000001621711752725717022337 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00334.html0000664000076400007640000007573511752725720017332 0ustar00jrossjross00000000000000 qpid::console::SessionManager Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SessionManager Class Reference

#include <qpid/console/SessionManager.h>

List of all members.

Classes

struct  Settings

Public Types

typedef std::vector< std::stringNameVector
typedef std::vector< ClassKeyKeyVector

Public Member Functions

 ~SessionManager ()
 SessionManager (ConsoleListener *listener=0, Settings settings=Settings())
 Create a new SessionManager.
BrokeraddBroker (client::ConnectionSettings &settings)
 Connect a broker to the console session.
void delBroker (Broker *broker)
 Disconnect a broker from the console session.
void getPackages (NameVector &packages)
 Get a list of known management packages.
void getClasses (KeyVector &classKeys, const std::string &packageName)
 Get a list of class keys associated with a package.
SchemaClassgetSchema (const ClassKey &classKey)
 Get the schema of a class given its class key.
void bindPackage (const std::string &packageName)
 Request that updates be received for all classes within a package.
void bindClass (const ClassKey &classKey)
 Request update to be received for a particular class.
void bindClass (const std::string &packageName, const std::string &className)
void bindEvent (const ClassKey &classKey)
 Request events from a particular package.
void bindEvent (const std::string &packageName, const std::string &eventName="")
void getAgents (Agent::Vector &agents, Broker *broker=0)
 Get a list of qmf agents known to the session manager.
void getObjects (Object::Vector &objects, const std::string &className, Broker *broker=0, Agent *agent=0)
 Get objects from agents.

Member Typedef Documentation


Constructor & Destructor Documentation

qpid::console::SessionManager::~SessionManager ( )
qpid::console::SessionManager::SessionManager ( ConsoleListener listener = 0,
Settings  settings = Settings() 
)

Create a new SessionManager.

Provide your own subclass of ConsoleListener to receive updates and indications asynchronously or leave it as its default and use only synchronous methods.

Parameters:
listenerListener object to receive asynchronous indications.
settings.rcvObjectsListener wishes to receive managed object data.
settings.rcvEventsListener wishes to receive events.
settings.rcvHeartbeatsListener wishes to receive agent heartbeats.
settings.userBindingsIf rcvObjects is true, userBindings allows the console client to control which object classes are received. See the bindPackage and bindClass methods. If userBindings is false, the listener will receive updates for all object classes.

Member Function Documentation

Broker* qpid::console::SessionManager::addBroker ( client::ConnectionSettings settings)

Connect a broker to the console session.

Parameters:
settingsConnection settings for client access
Returns:
broker object if operation is successful an exception shall be thrown.
void qpid::console::SessionManager::bindClass ( const ClassKey classKey)

Request update to be received for a particular class.

Note that this method is only meaningful if a ConsoleListener was provided at session creation and if the 'userBindings' flag was set to true.

Parameters:
classKeyClass key of class to which to bind.
void qpid::console::SessionManager::bindClass ( const std::string packageName,
const std::string className 
)
void qpid::console::SessionManager::bindEvent ( const ClassKey classKey)

Request events from a particular package.

Note that this method is only meaningful if a ConsoleListener was provided at session creation and if the 'userBindings' flag was set to true.

Parameters:
classKeyClass key of event of interest
packageNameName of package of event of interest.
eventNameName of event of interest. Default=All events defined by package.
void qpid::console::SessionManager::bindEvent ( const std::string packageName,
const std::string eventName = "" 
)
void qpid::console::SessionManager::bindPackage ( const std::string packageName)

Request that updates be received for all classes within a package.

Note that this method is only meaningful if a ConsoleListener was provided at session creation and if the 'userBindings' flag was set to true.

Parameters:
packageNameName of the package to which to bind.
void qpid::console::SessionManager::delBroker ( Broker broker)

Disconnect a broker from the console session.

Parameters:
brokerThe broker object returned from an earlier call to addBroker.
void qpid::console::SessionManager::getAgents ( Agent::Vector agents,
Broker broker = 0 
)

Get a list of qmf agents known to the session manager.

Parameters:
agentsVector of Agent objects returned by the session manager.
brokerReturn agents registered with this broker only. If NULL, return agents from all connected brokers.
void qpid::console::SessionManager::getClasses ( KeyVector classKeys,
const std::string packageName 
)

Get a list of class keys associated with a package.

Parameters:
classKeysList of class keys returned by the session manager.
packageNameName of package being queried.
void qpid::console::SessionManager::getObjects ( Object::Vector objects,
const std::string className,
Broker broker = 0,
Agent agent = 0 
)

Get objects from agents.

There are four variants of this method with different ways of specifying from which class objects are being queried.

Parameters:
objectsList of objects received.
classKeyClassKey object identifying class to be queried.
classNameClass name identifying class to be queried.
objectIdObject Id of the single object to be queried.
brokerRestrict the query to this broker, or all brokers if NULL.
agentRestrict the query to this agent, or all agents if NULL.
void qpid::console::SessionManager::getPackages ( NameVector packages)

Get a list of known management packages.

Parameters:
packagesVector of package names returned by the session manager.
SchemaClass& qpid::console::SessionManager::getSchema ( const ClassKey classKey)

Get the schema of a class given its class key.

Parameters:
classKeyClass key of the desired schema.

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00543_source.html0000664000076400007640000002617511752725717020714 0ustar00jrossjross00000000000000 qpid/messaging/Duration.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Duration.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_DURATION_H
00002 #define QPID_MESSAGING_DURATION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/messaging/ImportExport.h"
00026 
00027 #include "qpid/sys/IntegerTypes.h"
00028 
00029 namespace qpid {
00030 namespace messaging {
00031 
00035 class QPID_MESSAGING_CLASS_EXTERN Duration
00036 {
00037   public:
00038     QPID_MESSAGING_EXTERN explicit Duration(uint64_t milliseconds);
00039     QPID_MESSAGING_EXTERN uint64_t getMilliseconds() const;
00040     QPID_MESSAGING_EXTERN static const Duration FOREVER;
00041     QPID_MESSAGING_EXTERN static const Duration IMMEDIATE;
00042     QPID_MESSAGING_EXTERN static const Duration SECOND;
00043     QPID_MESSAGING_EXTERN static const Duration MINUTE;
00044   private:
00045     uint64_t milliseconds;
00046 };
00047 
00048 QPID_MESSAGING_EXTERN Duration operator*(const Duration& duration,
00049                                          uint64_t multiplier);
00050 QPID_MESSAGING_EXTERN Duration operator*(uint64_t multiplier,
00051                                          const Duration& duration);
00052 QPID_MESSAGING_EXTERN bool operator==(const Duration& a, const Duration& b);
00053 QPID_MESSAGING_EXTERN bool operator!=(const Duration& a, const Duration& b);
00054 
00055 }} // namespace qpid::messaging
00056 
00057 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00743.html0000664000076400007640000001057211752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Buffer::Iterator Member List
This is the complete list of members for qpid::framing::Buffer::Iterator, including all inherited members.
Iterator(Buffer &b)qpid::framing::Buffer::Iterator [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00440.html0000664000076400007640000001440211752725717017316 0ustar00jrossjross00000000000000 qmf/ImportExport.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/ImportExport.h File Reference

Go to the source code of this file.

Defines

#define QMF_EXTERN   QPID_IMPORT
#define QMF_CLASS_EXTERN   QPID_CLASS_IMPORT
#define QMF_INLINE_EXTERN   QPID_INLINE_IMPORT

Define Documentation

#define QMF_CLASS_EXTERN   QPID_CLASS_IMPORT

Definition at line 31 of file ImportExport.h.

#define QMF_EXTERN   QPID_IMPORT

Definition at line 30 of file ImportExport.h.

#define QMF_INLINE_EXTERN   QPID_INLINE_IMPORT

Definition at line 32 of file ImportExport.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x76.html0000664000076400007640000001564311752725717022325 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- v -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00155.html0000664000076400007640000006133011752725720017315 0ustar00jrossjross00000000000000 qpid::framing::Integer8Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Integer8Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Integer8Value (int8_t)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Integer8Value::Integer8Value ( int8_t  )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00908.html0000664000076400007640000000763411752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::queue Member List
This is the complete list of members for std::queue, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00534_source.html0000664000076400007640000003531411752725717020707 0ustar00jrossjross00000000000000 qpid/log/Statement.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/Statement.h
Go to the documentation of this file.
00001 #ifndef STATEMENT_H
00002 #define STATEMENT_H
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/Msg.h"
00023 #include "qpid/CommonImportExport.h"
00024 #include <boost/current_function.hpp>
00025 
00026 namespace qpid {
00027 namespace log {
00028 
00038 enum Level { trace, debug, info, notice, warning, error, critical };
00039 struct LevelTraits {
00040     static const int COUNT=critical+1;
00041 
00045     static Level level(const char* name);
00046 
00050     static  Level level(const std::string& name) {
00051         return level(name.c_str());
00052     }
00053 
00055     static const char* name(Level);
00056 };
00057 
00059 struct Statement {
00060     bool enabled;
00061     const char* file;
00062     int line;
00063     const char* function;
00064     Level level;
00065 
00066     QPID_COMMON_EXTERN void log(const std::string& message);
00067 
00068     struct Initializer {
00069         QPID_COMMON_EXTERN Initializer(Statement& s);
00070         Statement& statement;
00071     };
00072 };
00073 
00075 #define QPID_LOG_STATEMENT_INIT(level) \
00076     { 0, __FILE__, __LINE__,  BOOST_CURRENT_FUNCTION, (::qpid::log::level) }
00077 
00089 #define QPID_LOG_IF(LEVEL, TEST, MESSAGE)                       \
00090     do {                                                        \
00091         using ::qpid::log::Statement;                           \
00092         static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \
00093         static Statement::Initializer init_(stmt_);             \
00094         if (stmt_.enabled && (TEST))                            \
00095             stmt_.log(::qpid::Msg() << MESSAGE);                \
00096     } while(0)
00097 
00108 #define QPID_LOG_TEST(LEVEL, FLAG)                              \
00109     do {                                                        \
00110         using ::qpid::log::Statement;                           \
00111         static Statement stmt_= QPID_LOG_STATEMENT_INIT(LEVEL); \
00112         static Statement::Initializer init_(stmt_);             \
00113         FLAG = stmt_.enabled;                                   \
00114     } while(0)
00115 
00131 #define QPID_LOG(LEVEL, MESSAGE) QPID_LOG_IF(LEVEL, true, MESSAGE);
00132 
00133 }} // namespace qpid::log
00134 
00135 
00136 
00137 
00138 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00280.html0000664000076400007640000002431711752725720017320 0ustar00jrossjross00000000000000 qpid::framing::ResourceDeletedException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ResourceDeletedException Struct Reference

A server entity the client is working with has been deleted. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 ResourceDeletedException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

A server entity the client is working with has been deleted.


Constructor & Destructor Documentation

qpid::framing::ResourceDeletedException::ResourceDeletedException ( const std::string msg = std::string()) [inline]

Definition at line 98 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::ResourceDeletedException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 97 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00612.html0000664000076400007640000002231211752725717017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::Query Member List
This is the complete list of members for qmf::Query, including all inherited members.
getDataAddr() const qmf::Query
getPredicate() const qmf::Query
getSchemaId() const qmf::Query
getTarget() const qmf::Query
Handle()qmf::Handle< QueryImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< QueryImpl > [protected]
Impl typedefqmf::Handle< QueryImpl > [protected]
implqmf::Handle< QueryImpl > [protected]
isNull() const qmf::Handle< QueryImpl > [inline]
isValid() const qmf::Handle< QueryImpl > [inline]
matchesPredicate(const qpid::types::Variant::Map &map) const qmf::Query
operator bool() const qmf::Handle< QueryImpl > [inline]
operator!() const qmf::Handle< QueryImpl > [inline]
operator=(const Query &)qmf::Query
Handle< QueryImpl >::operator=(const Handle &)qmf::Handle< QueryImpl > [protected]
Query(QueryImpl *impl=0)qmf::Query
Query(const Query &)qmf::Query
Query(QueryTarget, const std::string &predicate="")qmf::Query
Query(QueryTarget, const std::string &className, const std::string &package, const std::string &predicate="")qmf::Query
Query(QueryTarget, const SchemaId &, const std::string &predicate="")qmf::Query
Query(const DataAddr &)qmf::Query
setPredicate(const qpid::types::Variant::List &)qmf::Query
swap(Handle< T > &h)qmf::Handle< QueryImpl > [inline]
~Query()qmf::Query

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00218.html0000664000076400007640000001305711752725720017320 0ustar00jrossjross00000000000000 std::multimap Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multimap Class Reference

STL class. More...

List of all members.

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00683.html0000664000076400007640000001125111752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FailoverManager::Command Member List
This is the complete list of members for qpid::client::FailoverManager::Command, including all inherited members.
execute(AsyncSession &session, bool isRetry)=0qpid::client::FailoverManager::Command [pure virtual]
~Command()qpid::client::FailoverManager::Command [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00377.html0000664000076400007640000010254511752725720017327 0ustar00jrossjross00000000000000 qpid::console::UuidValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::UuidValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 UuidValue (const framing::Uuid &v)
 UuidValue (framing::Buffer &buffer)
std::string str () const
bool isUuid () const
framing::Uuid asUuid () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::UuidValue::UuidValue ( const framing::Uuid v) [inline]

Definition at line 185 of file Value.h.

qpid::console::UuidValue::UuidValue ( framing::Buffer buffer)

Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

framing::Uuid qpid::console::UuidValue::asUuid ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 189 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

bool qpid::console::UuidValue::isUuid ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 188 of file Value.h.

std::string qpid::console::UuidValue::str ( ) const [inline, virtual]

Implements qpid::console::Value.

Definition at line 187 of file Value.h.

References qpid::framing::Uuid::str().


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00756.html0000664000076400007640000001707511752725720017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::VariableWidthValue Member List
This is the complete list of members for qpid::framing::VariableWidthValue, including all inherited members.
convertsToInt() const qpid::framing::FieldValue::Data [inline, virtual]
convertsToString() const qpid::framing::VariableWidthValue [inline, virtual]
decode(Buffer &buffer)qpid::framing::VariableWidthValue [inline, virtual]
encode(Buffer &buffer)qpid::framing::VariableWidthValue [inline, virtual]
encodedSize() const qpid::framing::VariableWidthValue [inline, virtual]
getInt() const qpid::framing::FieldValue::Data [inline, virtual]
getString() const qpid::framing::VariableWidthValue [inline, virtual]
operator==(const Data &d) const qpid::framing::VariableWidthValue [inline]
qpid::framing::FieldValue::Data::operator==(const Data &) const =0qpid::framing::FieldValue::Data [pure virtual]
print(std::ostream &o) const qpid::framing::VariableWidthValue [inline, virtual]
VariableWidthValue()qpid::framing::VariableWidthValue [inline]
VariableWidthValue(const std::vector< uint8_t > &data)qpid::framing::VariableWidthValue [inline]
VariableWidthValue(const uint8_t *start, const uint8_t *end)qpid::framing::VariableWidthValue [inline]
~Data()qpid::framing::FieldValue::Data [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00462_source.html0000664000076400007640000003404511752725717020707 0ustar00jrossjross00000000000000 qpid/client/Connection.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Connection.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_CONNECTION_H
00002 #define QPID_CLIENT_CONNECTION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include <map>
00025 #include <string>
00026 #include "qpid/client/Session.h"
00027 #include "qpid/client/ClientImportExport.h"
00028 #include "qpid/client/ConnectionSettings.h"
00029 #include "qpid/framing/ProtocolVersion.h"
00030 
00031 #include "boost/function.hpp"
00032 
00033 namespace qpid {
00034 
00035 struct Url;
00036 
00037 namespace client {
00038 
00039 class ConnectionImpl;
00040 
00063 class QPID_CLIENT_CLASS_EXTERN Connection
00064 {
00065     framing::ProtocolVersion version;
00066 
00067     boost::function<void ()> failureCallback;
00068 
00069 
00070   protected:
00071     boost::shared_ptr<ConnectionImpl> impl;
00072 
00073 
00074   public:
00079     QPID_CLIENT_EXTERN Connection();
00080 
00085     QPID_CLIENT_EXTERN ~Connection();
00086 
00104     QPID_CLIENT_EXTERN void open(const std::string& host, int port = 5672,
00105               const std::string& uid = "",
00106               const std::string& pwd = "",
00107               const std::string& virtualhost = "/", uint16_t maxFrameSize=65535);
00108 
00126     QPID_CLIENT_EXTERN void open(const Url& url,
00127               const std::string& uid = "",
00128               const std::string& pwd = "",
00129               const std::string& virtualhost = "/", uint16_t maxFrameSize=65535);
00130 
00141     QPID_CLIENT_EXTERN void open(const Url& url, const ConnectionSettings& settings);
00142 
00148     QPID_CLIENT_EXTERN void open(const ConnectionSettings& settings);
00149 
00156     QPID_CLIENT_EXTERN void close();
00157 
00199     QPID_CLIENT_EXTERN Session newSession(const std::string& name=std::string(), uint32_t timeoutSeconds = 0);
00200 
00205     QPID_CLIENT_EXTERN void resume(Session& session);
00206 
00207     QPID_CLIENT_EXTERN bool isOpen() const;
00208 
00212     QPID_CLIENT_EXTERN std::vector<Url> getInitialBrokers();
00213 
00214     QPID_CLIENT_EXTERN void registerFailureCallback ( boost::function<void ()> fn );
00215 
00219     QPID_CLIENT_EXTERN const ConnectionSettings& getNegotiatedSettings();
00220 
00221   friend struct ConnectionAccess; 
00222   friend class SessionBase_0_10; 
00223 };
00224 
00225 }} // namespace qpid::client
00226 
00227 
00228 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/files.html0000664000076400007640000007635411752725720017620 0ustar00jrossjross00000000000000 File List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
File List
Here is a list of all files with brief descriptions:
/home/jross/code/mrg-team/people/jross/manhole/qpid-0.16/cpp/docs/api/doxygen_mainpage.h [code]
qmf/Agent.h [code]
qmf/AgentEvent.h [code]
qmf/AgentSession.h [code]
qmf/ConsoleEvent.h [code]
qmf/ConsoleSession.h [code]
qmf/Data.h [code]
qmf/DataAddr.h [code]
qmf/exceptions.h [code]
qmf/Handle.h [code]
qmf/ImportExport.h [code]
qmf/Query.h [code]
qmf/Schema.h [code]
qmf/SchemaId.h [code]
qmf/SchemaMethod.h [code]
qmf/SchemaProperty.h [code]
qmf/SchemaTypes.h [code]
qmf/Subscription.h [code]
qmf/engine/Agent.h [code]
qmf/engine/ConnectionSettings.h [code]
qmf/engine/Console.h [code]
qmf/engine/Event.h [code]
qmf/engine/Message.h [code]
qmf/engine/Object.h [code]
qmf/engine/ObjectId.h [code]
qmf/engine/QmfEngineImportExport.h [code]
qmf/engine/Query.h [code]
qmf/engine/ResilientConnection.h [code]
qmf/engine/Schema.h [code]
qmf/engine/Typecode.h [code]
qmf/engine/Value.h [code]
qmf/posix/EventNotifier.h [code]
qpid/Address.h [code]
qpid/CommonImportExport.h [code]
qpid/Exception.h [code]
qpid/ImportExport.h [code]
qpid/InlineAllocator.h [code]
qpid/InlineVector.h [code]
qpid/Msg.h [code]
qpid/Options.h [code]
qpid/RangeSet.h [code]
qpid/SessionId.h [code]
qpid/Url.h [code]
qpid/agent/ManagementAgent.h [code]
qpid/agent/QmfAgentImportExport.h [code]
qpid/amqp_0_10/Codecs.h [code]
qpid/client/arg.h [code]
qpid/client/AsyncSession.h [code]
qpid/client/AsyncSession_0_10.h [code]
qpid/client/ClientImportExport.h [code]
qpid/client/Completion.h [code]
qpid/client/Connection.h [code]
qpid/client/ConnectionSettings.h [code]
qpid/client/FailoverListener.h [code]
qpid/client/FailoverManager.h [code]
qpid/client/FlowControl.h [code]
qpid/client/Future.h [code]
qpid/client/FutureCompletion.h [code]
qpid/client/FutureResult.h [code]
qpid/client/Handle.h [code]
qpid/client/LocalQueue.h [code]
qpid/client/Message.h [code]
qpid/client/MessageListener.h [code]
qpid/client/MessageReplayTracker.h [code]
qpid/client/QueueOptions.h [code]
qpid/client/Session.h [code]
qpid/client/Session_0_10.h [code]
qpid/client/SessionBase_0_10.h [code]
qpid/client/Subscription.h [code]
qpid/client/SubscriptionManager.h [code]
qpid/client/SubscriptionSettings.h [code]
qpid/client/TypedResult.h [code]
qpid/client/no_keyword/AsyncSession_0_10.h [code]
qpid/client/no_keyword/Session_0_10.h [code]
qpid/console/Agent.h [code]
qpid/console/Broker.h [code]
qpid/console/ClassKey.h [code]
qpid/console/ConsoleImportExport.h [code]
qpid/console/ConsoleListener.h [code]
qpid/console/Event.h [code]
qpid/console/Object.h [code]
qpid/console/ObjectId.h [code]
qpid/console/Package.h [code]
qpid/console/Schema.h [code]
qpid/console/SequenceManager.h [code]
qpid/console/SessionManager.h [code]
qpid/console/Value.h [code]
qpid/framing/amqp_structs.h [code]
qpid/framing/amqp_types.h [code]Definitions and forward declarations of all types used in AMQP messages
qpid/framing/amqp_types_full.h [code]Definitions and full declarations of all types used in AMQP messages
qpid/framing/Array.h [code]
qpid/framing/Buffer.h [code]
qpid/framing/constants.h [code]
qpid/framing/DeliveryProperties.h [code]
qpid/framing/DtxGetTimeoutResult.h [code]
qpid/framing/DtxRecoverResult.h [code]
qpid/framing/enum.h [code]
qpid/framing/ExchangeBoundResult.h [code]
qpid/framing/ExchangeQueryResult.h [code]
qpid/framing/FieldTable.h [code]
qpid/framing/FieldValue.h [code]
qpid/framing/FileProperties.h [code]
qpid/framing/FragmentProperties.h [code]
qpid/framing/Header.h [code]
qpid/framing/List.h [code]
qpid/framing/MessageAcquireResult.h [code]
qpid/framing/MessageProperties.h [code]
qpid/framing/MessageResumeResult.h [code]
qpid/framing/ProtocolVersion.h [code]
qpid/framing/QueueQueryResult.h [code]
qpid/framing/reply_exceptions.h [code]
qpid/framing/ReplyTo.h [code]
qpid/framing/SequenceNumber.h [code]
qpid/framing/SequenceSet.h [code]
qpid/framing/StreamProperties.h [code]
qpid/framing/StructHelper.h [code]
qpid/framing/TypeCode.h [code]
qpid/framing/Uuid.h [code]
qpid/framing/XaResult.h [code]
qpid/framing/Xid.h [code]
qpid/log/Logger.h [code]
qpid/log/Options.h [code]
qpid/log/Selector.h [code]
qpid/log/SinkOptions.h [code]
qpid/log/Statement.h [code]
qpid/management/Args.h [code]
qpid/management/Buffer.h [code]
qpid/management/ConnectionSettings.h [code]
qpid/management/Manageable.h [code]
qpid/management/ManagementEvent.h [code]
qpid/management/ManagementObject.h [code]
qpid/management/Mutex.h [code]
qpid/messaging/Address.h [code]
qpid/messaging/Connection.h [code]
qpid/messaging/Duration.h [code]
qpid/messaging/exceptions.h [code]
qpid/messaging/FailoverUpdates.h [code]
qpid/messaging/Handle.h [code]
qpid/messaging/ImportExport.h [code]
qpid/messaging/Message.h [code]
qpid/messaging/Receiver.h [code]
qpid/messaging/Sender.h [code]
qpid/messaging/Session.h [code]
qpid/sys/Condition.h [code]
qpid/sys/ExceptionHolder.h [code]
qpid/sys/IntegerTypes.h [code]
qpid/sys/IOHandle.h [code]
qpid/sys/Monitor.h [code]
qpid/sys/Mutex.h [code]
qpid/sys/Runnable.h [code]
qpid/sys/StrError.h [code]
qpid/sys/SystemInfo.h [code]
qpid/sys/Thread.h [code]
qpid/sys/Time.h [code]
qpid/sys/posix/check.h [code]
qpid/sys/posix/Condition.h [code]
qpid/sys/posix/IntegerTypes.h [code]
qpid/sys/posix/Mutex.h [code]
qpid/sys/posix/PrivatePosix.h [code]
qpid/sys/posix/Time.h [code]
qpid/sys/windows/check.h [code]
qpid/sys/windows/Condition.h [code]
qpid/sys/windows/IntegerTypes.h [code]
qpid/sys/windows/Mutex.h [code]
qpid/sys/windows/Time.h [code]
qpid/types/Exception.h [code]
qpid/types/ImportExport.h [code]
qpid/types/Uuid.h [code]
qpid/types/Variant.h [code]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00784.html0000664000076400007640000001702611752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::MessageAcquireResult Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00407_source.html0000664000076400007640000003754511752725717020716 0ustar00jrossjross00000000000000 qmf/AgentSession.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/AgentSession.h
Go to the documentation of this file.
00001 #ifndef QMF_AGENT_SESSION_H
00002 #define QMF_AGENT_SESSION_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qpid/messaging/Duration.h"
00027 #include "qpid/messaging/Connection.h"
00028 #include "qpid/types/Variant.h"
00029 #include <string>
00030 
00031 namespace qmf {
00032 
00033 #ifndef SWIG
00034     template <class> class PrivateImplRef;
00035 #endif
00036 
00037     class AgentSessionImpl;
00038     class AgentEvent;
00039     class Schema;
00040     class Data;
00041     class DataAddr;
00042 
00043     class QMF_CLASS_EXTERN AgentSession : public qmf::Handle<AgentSessionImpl> {
00044     public:
00045         QMF_EXTERN AgentSession(AgentSessionImpl* impl = 0);
00046         QMF_EXTERN AgentSession(const AgentSession&);
00047         QMF_EXTERN AgentSession& operator=(const AgentSession&);
00048         QMF_EXTERN ~AgentSession();
00049 
00080         QMF_EXTERN AgentSession(qpid::messaging::Connection& conn, const std::string& options="");
00081 
00087         QMF_EXTERN void setDomain(const std::string& domain);
00088 
00096         QMF_EXTERN void setVendor(const std::string& vendor);
00097         QMF_EXTERN void setProduct(const std::string& product);
00098         QMF_EXTERN void setInstance(const std::string& instance);
00099 
00105         QMF_EXTERN void setAttribute(const std::string& key, const qpid::types::Variant& value);
00106 
00110         QMF_EXTERN const std::string& getName() const;
00111 
00116         QMF_EXTERN void open();
00117 
00121         QMF_EXTERN void close();
00122 
00129         QMF_EXTERN bool nextEvent(AgentEvent& outEvent, qpid::messaging::Duration timeout=qpid::messaging::Duration::FOREVER);
00130 
00134         QMF_EXTERN int pendingEvents() const;
00135 
00139         QMF_EXTERN void registerSchema(Schema& schema);
00140 
00152         QMF_EXTERN DataAddr addData(Data& data, const std::string& name="", bool persistent=false);
00153 
00157         QMF_EXTERN void delData(const DataAddr& dataAddr);
00158 
00169         QMF_EXTERN void authAccept(AgentEvent& event);
00170         QMF_EXTERN void authReject(AgentEvent& event, const std::string& diag="");
00171         QMF_EXTERN void raiseException(AgentEvent& event, const std::string& errorText);
00172         QMF_EXTERN void raiseException(AgentEvent& event, const Data& errorData);
00173         QMF_EXTERN void response(AgentEvent& event, const Data& responseData);
00174         QMF_EXTERN void complete(AgentEvent& event);
00175         QMF_EXTERN void methodSuccess(AgentEvent& event);
00176 
00185         QMF_EXTERN void raiseEvent(const Data& data);
00186         QMF_EXTERN void raiseEvent(const Data& data, int severity);
00187 
00188 #ifndef SWIG
00189     private:
00190         friend class qmf::PrivateImplRef<AgentSession>;
00191         friend struct AgentSessionImplAccess;
00192 #endif
00193     };
00194 
00195 }
00196 
00197 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00503_source.html0000664000076400007640000003263611752725717020707 0ustar00jrossjross00000000000000 qpid/framing/ExchangeBoundResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/ExchangeBoundResult.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_EXCHANGEBOUNDRESULT_H
00002 #define QPID_FRAMING_EXCHANGEBOUNDRESULT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN ExchangeBoundResult  {
00039     uint16_t flags;
00040 public:
00041     static const uint16_t TYPE = 1794;
00042     ExchangeBoundResult(
00043         bool _exchangeNotFound,
00044         bool _queueNotFound,
00045         bool _queueNotMatched,
00046         bool _keyNotMatched,
00047         bool _argsNotMatched) : 
00048         flags(0){
00049         setExchangeNotFound(_exchangeNotFound);
00050         setQueueNotFound(_queueNotFound);
00051         setQueueNotMatched(_queueNotMatched);
00052         setKeyNotMatched(_keyNotMatched);
00053         setArgsNotMatched(_argsNotMatched);
00054     }
00055     ExchangeBoundResult()  : flags(0) {}
00056     
00057     QPID_COMMON_EXTERN void setExchangeNotFound(bool _exchangeNotFound);
00058     QPID_COMMON_EXTERN bool getExchangeNotFound() const;
00059     QPID_COMMON_EXTERN void setQueueNotFound(bool _queueNotFound);
00060     QPID_COMMON_EXTERN bool getQueueNotFound() const;
00061     QPID_COMMON_EXTERN void setQueueNotMatched(bool _queueNotMatched);
00062     QPID_COMMON_EXTERN bool getQueueNotMatched() const;
00063     QPID_COMMON_EXTERN void setKeyNotMatched(bool _keyNotMatched);
00064     QPID_COMMON_EXTERN bool getKeyNotMatched() const;
00065     QPID_COMMON_EXTERN void setArgsNotMatched(bool _argsNotMatched);
00066     QPID_COMMON_EXTERN bool getArgsNotMatched() const;
00067     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const ExchangeBoundResult&);
00068     QPID_COMMON_EXTERN void encode(Buffer&) const;
00069     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00070     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00071     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00072     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00073     QPID_COMMON_EXTERN uint32_t bodySize() const;
00074     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00075 }; /* class ExchangeBoundResult */
00076 
00077 }}
00078 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00428_source.html0000664000076400007640000003514411752725717020712 0ustar00jrossjross00000000000000 qmf/engine/ResilientConnection.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/ResilientConnection.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineResilientConnection_
00002 #define _QmfEngineResilientConnection_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <qmf/engine/Message.h>
00024 #include <qmf/engine/ConnectionSettings.h>
00025 #include <string>
00026 
00027 namespace qmf {
00028 namespace engine {
00029 
00030     class ResilientConnectionImpl;
00031 
00035     struct ResilientConnectionEvent {
00036         enum EventKind {
00037             CONNECTED      = 1,
00038             DISCONNECTED   = 2,
00039             SESSION_CLOSED = 3,
00040             RECV           = 4
00041         };
00042 
00043         EventKind kind;
00044         void*     sessionContext; // SESSION_CLOSED, RECV
00045         char*     errorText;      // DISCONNECTED, SESSION_CLOSED
00046         Message   message;        // RECV
00047     };
00048 
00049     class SessionHandle {
00050         friend class ResilientConnectionImpl;
00051         void* impl;
00052     };
00053 
00062     class ResilientConnection {
00063     public:
00064 
00072         ResilientConnection(const ConnectionSettings& settings);
00073         ~ResilientConnection();
00074 
00079         bool isConnected() const;
00080 
00086         bool getEvent(ResilientConnectionEvent& event);
00087 
00092         void popEvent();
00093 
00103         bool createSession(const char* name, void* sessionContext, SessionHandle& handle);
00104 
00109         void destroySession(SessionHandle handle);
00110 
00116         void sendMessage(SessionHandle handle, Message& message);
00117 
00123         void declareQueue(SessionHandle handle, char* queue);
00124 
00130         void deleteQueue(SessionHandle handle, char* queue);
00131 
00139         void bind(SessionHandle handle, char* exchange, char* queue, char* key);
00140 
00148         void unbind(SessionHandle handle, char* exchange, char* queue, char* key);
00149 
00156         void setNotifyFd(int fd);
00157 
00164         void notify();
00165 
00166     private:
00167         ResilientConnectionImpl* impl;
00168     };
00169 }
00170 }
00171 
00172 #endif
00173 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00305.html0000664000076400007640000002734511752725717017330 0ustar00jrossjross00000000000000 qmf::engine::SchemaMethod Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaMethod Class Reference

#include <qmf/engine/Schema.h>

List of all members.

Public Member Functions

 SchemaMethod (const char *name)
 SchemaMethod (const SchemaMethod &from)
 ~SchemaMethod ()
void addArgument (const SchemaArgument *argument)
void setDesc (const char *desc)
const char * getName () const
const char * getDesc () const
int getArgumentCount () const
const SchemaArgumentgetArgument (int idx) const

Constructor & Destructor Documentation

qmf::engine::SchemaMethod::SchemaMethod ( const char *  name)
qmf::engine::SchemaMethod::SchemaMethod ( const SchemaMethod from)
qmf::engine::SchemaMethod::~SchemaMethod ( )

Member Function Documentation

void qmf::engine::SchemaMethod::addArgument ( const SchemaArgument argument)
const SchemaArgument* qmf::engine::SchemaMethod::getArgument ( int  idx) const
int qmf::engine::SchemaMethod::getArgumentCount ( ) const
const char* qmf::engine::SchemaMethod::getDesc ( ) const
const char* qmf::engine::SchemaMethod::getName ( ) const
void qmf::engine::SchemaMethod::setDesc ( const char *  desc)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00717.html0000664000076400007640000001067211752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Package::NameHashComp Member List
This is the complete list of members for qpid::console::Package::NameHashComp, including all inherited members.
operator()(const NameHash &lhs, const NameHash &rhs) const qpid::console::Package::NameHashComp [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00511.html0000664000076400007640000001204011752725717017311 0ustar00jrossjross00000000000000 qpid/framing/MessageAcquireResult.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/MessageAcquireResult.h File Reference
#include <ostream>
#include "qpid/framing/amqp_types_full.h"
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::MessageAcquireResult

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x77.html0000664000076400007640000001367111752725720022603 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- w -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00866.html0000664000076400007640000001325011752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::TransportFailure Member List
This is the complete list of members for qpid::messaging::TransportFailure, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
MessagingException(const std::string &msg)qpid::messaging::MessagingException
TransportFailure(const std::string &)qpid::messaging::TransportFailure
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00662.html0000664000076400007640000001255511752725717017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineVector Member List
This is the complete list of members for qpid::InlineVector, including all inherited members.
allocator_type typedefqpid::InlineVector
InlineVector(const allocator_type &a=allocator_type())qpid::InlineVector [inline, explicit]
InlineVector(size_type n, const value_type &x=value_type(), const allocator_type &a=allocator_type())qpid::InlineVector [inline, explicit]
InlineVector(const InlineVector &x)qpid::InlineVector [inline]
size_type typedefqpid::InlineVector
value_type typedefqpid::InlineVector

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/nav_h.png0000664000076400007640000000014111752725717017414 0ustar00jrossjross00000000000000‰PNG  IHDR ,é@(IDATxíݱ 0 A½2°ÁU¶— !kÜJrª¯ƒžZýÿÆo‡üèIEND®B`‚qpidc-0.16/docs/api/html/a00190.html0000664000076400007640000001303711752725720017315 0ustar00jrossjross00000000000000 std::list Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::list Class Reference

STL class. More...

List of all members.

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00840.html0000664000076400007640000001107411752725720017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ScopedLockTemplate Member List
This is the complete list of members for qpid::management::ScopedLockTemplate, including all inherited members.
ScopedLockTemplate(L &l)qpid::management::ScopedLockTemplate [inline]
~ScopedLockTemplate()qpid::management::ScopedLockTemplate [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x76.html0000664000076400007640000001454711752725717022347 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00429_source.html0000664000076400007640000011072611752725717020713 0ustar00jrossjross00000000000000 qmf/engine/Schema.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Schema.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineSchema_
00002 #define _QmfEngineSchema_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include <qmf/engine/Typecode.h>
00024 #include <qpid/sys/IntegerTypes.h>
00025 
00026 namespace qmf {
00027 namespace engine {
00028 
00029     enum Access { ACCESS_READ_CREATE = 1, ACCESS_READ_WRITE = 2, ACCESS_READ_ONLY = 3 };
00030     enum Direction { DIR_IN = 1, DIR_OUT = 2, DIR_IN_OUT = 3 };
00031     enum ClassKind { CLASS_OBJECT = 1, CLASS_EVENT = 2 };
00032     enum Severity { SEV_EMERG = 0, SEV_ALERT = 1, SEV_CRIT = 2, SEV_ERROR = 3, SEV_WARN = 4, SEV_NOTICE = 5, SEV_INFORM = 6, SEV_DEBUG = 7 };
00033 
00034     struct SchemaArgumentImpl;
00035     struct SchemaMethodImpl;
00036     struct SchemaPropertyImpl;
00037     struct SchemaStatisticImpl;
00038     struct SchemaObjectClassImpl;
00039     struct SchemaEventClassImpl;
00040     struct SchemaClassKeyImpl;
00041 
00044     class SchemaArgument {
00045     public:
00046         SchemaArgument(const char* name, Typecode typecode);
00047         SchemaArgument(const SchemaArgument& from);
00048         ~SchemaArgument();
00049         void setDirection(Direction dir);
00050         void setUnit(const char* val);
00051         void setDesc(const char* desc);
00052         const char* getName() const;
00053         Typecode getType() const;
00054         Direction getDirection() const;
00055         const char* getUnit() const;
00056         const char* getDesc() const;
00057 
00058     private:
00059         friend struct SchemaArgumentImpl;
00060         friend struct SchemaMethodImpl;
00061         friend struct SchemaEventClassImpl;
00062         SchemaArgument(SchemaArgumentImpl* impl);
00063         SchemaArgumentImpl* impl;
00064     };
00065 
00068     class SchemaMethod {
00069     public:
00070         SchemaMethod(const char* name);
00071         SchemaMethod(const SchemaMethod& from);
00072         ~SchemaMethod();
00073         void addArgument(const SchemaArgument* argument);
00074         void setDesc(const char* desc);
00075         const char* getName() const;
00076         const char* getDesc() const;
00077         int getArgumentCount() const;
00078         const SchemaArgument* getArgument(int idx) const;
00079 
00080     private:
00081         friend struct SchemaMethodImpl;
00082         friend struct SchemaObjectClassImpl;
00083         friend class  AgentImpl;
00084         SchemaMethod(SchemaMethodImpl* impl);
00085         SchemaMethodImpl* impl;
00086     };
00087 
00090     class SchemaProperty {
00091     public:
00092         SchemaProperty(const char* name, Typecode typecode);
00093         SchemaProperty(const SchemaProperty& from);
00094         ~SchemaProperty();
00095         void setAccess(Access access);
00096         void setIndex(bool val);
00097         void setOptional(bool val);
00098         void setUnit(const char* val);
00099         void setDesc(const char* desc);
00100         const char* getName() const;
00101         Typecode getType() const;
00102         Access getAccess() const;
00103         bool isIndex() const;
00104         bool isOptional() const;
00105         const char* getUnit() const;
00106         const char* getDesc() const;
00107 
00108     private:
00109         friend struct SchemaPropertyImpl;
00110         friend struct SchemaObjectClassImpl;
00111         SchemaProperty(SchemaPropertyImpl* impl);
00112         SchemaPropertyImpl* impl;
00113     };
00114 
00117     class SchemaStatistic {
00118     public:
00119         SchemaStatistic(const char* name, Typecode typecode);
00120         SchemaStatistic(const SchemaStatistic& from);
00121         ~SchemaStatistic();
00122         void setUnit(const char* val);
00123         void setDesc(const char* desc);
00124         const char* getName() const;
00125         Typecode getType() const;
00126         const char* getUnit() const;
00127         const char* getDesc() const;
00128 
00129     private:
00130         friend struct SchemaStatisticImpl;
00131         friend struct SchemaObjectClassImpl;
00132         SchemaStatistic(SchemaStatisticImpl* impl);
00133         SchemaStatisticImpl* impl;
00134     };
00135 
00138     class SchemaClassKey {
00139     public:
00140         SchemaClassKey(const SchemaClassKey& from);
00141         ~SchemaClassKey();
00142 
00143         const char* getPackageName() const;
00144         const char* getClassName() const;
00145         const uint8_t* getHash() const;
00146         const char* asString() const;
00147 
00148         bool operator==(const SchemaClassKey& other) const;
00149         bool operator<(const SchemaClassKey& other) const;
00150 
00151     private:
00152         friend struct SchemaClassKeyImpl;
00153         friend class BrokerProxyImpl;
00154         friend class ConsoleImpl;
00155         SchemaClassKey(SchemaClassKeyImpl* impl);
00156         SchemaClassKeyImpl* impl;
00157     };
00158 
00161     class SchemaObjectClass {
00162     public:
00163         SchemaObjectClass(const char* package, const char* name);
00164         SchemaObjectClass(const SchemaObjectClass& from);
00165         ~SchemaObjectClass();
00166         void addProperty(const SchemaProperty* property);
00167         void addStatistic(const SchemaStatistic* statistic);
00168         void addMethod(const SchemaMethod* method);
00169 
00170         const SchemaClassKey* getClassKey() const;
00171         int getPropertyCount() const;
00172         int getStatisticCount() const;
00173         int getMethodCount() const;
00174         const SchemaProperty* getProperty(int idx) const;
00175         const SchemaStatistic* getStatistic(int idx) const;
00176         const SchemaMethod* getMethod(int idx) const;
00177 
00178     private:
00179         friend struct SchemaObjectClassImpl;
00180         friend class  BrokerProxyImpl;
00181         friend class  AgentImpl;
00182         SchemaObjectClass(SchemaObjectClassImpl* impl);
00183         SchemaObjectClassImpl* impl;
00184     };
00185 
00188     class SchemaEventClass {
00189     public:
00190         SchemaEventClass(const char* package, const char* name, Severity severity);
00191         SchemaEventClass(const SchemaEventClass& from);
00192         ~SchemaEventClass();
00193         void addArgument(const SchemaArgument* argument);
00194         void setDesc(const char* desc);
00195 
00196         const SchemaClassKey* getClassKey() const;
00197         Severity getSeverity() const;
00198         int getArgumentCount() const;
00199         const SchemaArgument* getArgument(int idx) const;
00200 
00201     private:
00202         friend struct SchemaEventClassImpl;
00203         friend class  BrokerProxyImpl;
00204         friend class  AgentImpl;
00205         SchemaEventClass(SchemaEventClassImpl* impl);
00206         SchemaEventClassImpl* impl;
00207     };
00208 }
00209 }
00210 
00211 #endif
00212 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00207.html0000664000076400007640000002437011752725717017324 0ustar00jrossjross00000000000000 qmf::engine::Message Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Message Struct Reference

#include <qmf/engine/Message.h>

List of all members.

Public Attributes

char * body
uint32_t length
char * destination
char * routingKey
char * replyExchange
char * replyKey
char * userId

Member Data Documentation

Definition at line 29 of file Message.h.

Definition at line 31 of file Message.h.

Definition at line 30 of file Message.h.

Definition at line 33 of file Message.h.

Definition at line 34 of file Message.h.

Definition at line 32 of file Message.h.

Definition at line 35 of file Message.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00620.html0000664000076400007640000001641411752725717017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ConnectionSettings Member List
This is the complete list of members for qmf::engine::ConnectionSettings, including all inherited members.
authAnonymous(const char *username=0)qmf::engine::ConnectionSettings
authGssapi(const char *serviceName, uint32_t minSsf=0, uint32_t maxSsf=256)qmf::engine::ConnectionSettings
authPlain(const char *username=0, const char *password=0)qmf::engine::ConnectionSettings
ConnectionSettings()qmf::engine::ConnectionSettings
ConnectionSettings(const char *url)qmf::engine::ConnectionSettings
ConnectionSettings(const ConnectionSettings &from)qmf::engine::ConnectionSettings
getAttr(const char *key) const qmf::engine::ConnectionSettings
getAttrString() const qmf::engine::ConnectionSettings
setAttr(const char *key, const Value &value)qmf::engine::ConnectionSettings
setRetry(int delayMin=1, int delayMax=128, int delayFactor=2)qmf::engine::ConnectionSettings
transportRdma(uint16_t port=5672)qmf::engine::ConnectionSettings
transportSsl(uint16_t port=5671)qmf::engine::ConnectionSettings
transportTcp(uint16_t port=5672)qmf::engine::ConnectionSettings
~ConnectionSettings()qmf::engine::ConnectionSettings

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00417.html0000664000076400007640000001345611752725717017332 0ustar00jrossjross00000000000000 qpid/console/Event.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Event.h File Reference

Go to the source code of this file.

Classes

class  qpid::console::Event

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  qpid::console

Functions

std::ostreamqpid::console::operator<< (std::ostream &o, const Event &event)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00894.html0000664000076400007640000001136311752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Duration Member List
This is the complete list of members for qpid::sys::Duration, including all inherited members.
Duration(int64_t time0=0)qpid::sys::Duration [inline]
Duration(const AbsTime &start, const AbsTime &finish)qpid::sys::Duration [explicit]
operator int64_t() const qpid::sys::Duration [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00415.html0000664000076400007640000001467611752725717017335 0ustar00jrossjross00000000000000 qmf/engine/Console.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Console.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00236.html0000664000076400007640000004710411752725717017326 0ustar00jrossjross00000000000000 qmf::engine::ObjectId Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ObjectId Class Reference

#include <qmf/engine/ObjectId.h>

List of all members.

Public Member Functions

 ObjectId ()
 ObjectId (const ObjectId &from)
 ~ObjectId ()
uint64_t getObjectNum () const
uint32_t getObjectNumHi () const
uint32_t getObjectNumLo () const
bool isDurable () const
const char * str () const
uint8_t getFlags () const
uint16_t getSequence () const
uint32_t getBrokerBank () const
uint32_t getAgentBank () const
bool operator== (const ObjectId &other) const
bool operator< (const ObjectId &other) const
bool operator> (const ObjectId &other) const
bool operator<= (const ObjectId &other) const
bool operator>= (const ObjectId &other) const
ObjectIdoperator= (const ObjectId &other)

Constructor & Destructor Documentation

qmf::engine::ObjectId::ObjectId ( )
qmf::engine::ObjectId::ObjectId ( const ObjectId from)
qmf::engine::ObjectId::~ObjectId ( )

Member Function Documentation

uint32_t qmf::engine::ObjectId::getAgentBank ( ) const
uint32_t qmf::engine::ObjectId::getBrokerBank ( ) const
uint8_t qmf::engine::ObjectId::getFlags ( ) const
uint64_t qmf::engine::ObjectId::getObjectNum ( ) const
uint32_t qmf::engine::ObjectId::getObjectNumHi ( ) const
uint32_t qmf::engine::ObjectId::getObjectNumLo ( ) const
uint16_t qmf::engine::ObjectId::getSequence ( ) const
bool qmf::engine::ObjectId::isDurable ( ) const
bool qmf::engine::ObjectId::operator< ( const ObjectId other) const
bool qmf::engine::ObjectId::operator<= ( const ObjectId other) const
ObjectId& qmf::engine::ObjectId::operator= ( const ObjectId other)
bool qmf::engine::ObjectId::operator== ( const ObjectId other) const
bool qmf::engine::ObjectId::operator> ( const ObjectId other) const
bool qmf::engine::ObjectId::operator>= ( const ObjectId other) const
const char* qmf::engine::ObjectId::str ( ) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x62.html0000664000076400007640000003620711752725717021304 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- b -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00340.html0000664000076400007640000002437711752725720017323 0ustar00jrossjross00000000000000 qpid::log::Statement Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Statement Struct Reference

POD struct representing a logging statement in source code. More...

#include <qpid/log/Statement.h>

List of all members.

Classes

struct  Initializer

Public Member Functions

void log (const std::string &message)

Public Attributes

bool enabled
const char * file
int line
const char * function
Level level

Detailed Description

POD struct representing a logging statement in source code.


Member Function Documentation

void qpid::log::Statement::log ( const std::string message)

Member Data Documentation

Definition at line 60 of file Statement.h.

Definition at line 61 of file Statement.h.

Definition at line 63 of file Statement.h.

Definition at line 64 of file Statement.h.

Definition at line 62 of file Statement.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00539.html0000664000076400007640000001257711752725717017342 0ustar00jrossjross00000000000000 qpid/management/Mutex.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/Mutex.h File Reference

Go to the source code of this file.

Classes

class  qpid::management::ScopedLockTemplate
 Scoped lock template: calls lock() in ctor, unlock() in dtor. More...
class  qpid::management::ScopedUnlockTemplate
class  qpid::management::Mutex

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys
namespace  qpid::management

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00219.html0000664000076400007640000001305711752725720017321 0ustar00jrossjross00000000000000 std::multiset Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multiset Class Reference

STL class. More...

List of all members.

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00167.html0000664000076400007640000001477711752725720017335 0ustar00jrossjross00000000000000 qpid::sys::IOHandlePrivate Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::IOHandlePrivate Class Reference

#include <qpid/sys/posix/PrivatePosix.h>

List of all members.

Public Member Functions

 IOHandlePrivate (int f=-1)

Public Attributes

int fd

Constructor & Destructor Documentation

qpid::sys::IOHandlePrivate::IOHandlePrivate ( int  f = -1) [inline]

Definition at line 47 of file PrivatePosix.h.


Member Data Documentation

Definition at line 51 of file PrivatePosix.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x63.html0000664000076400007640000001770711752725717022344 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00388.html0000664000076400007640000001022211752725720017317 0ustar00jrossjross00000000000000 std::wfstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wfstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00469_source.html0000664000076400007640000001716211752725717020717 0ustar00jrossjross00000000000000 qpid/client/FutureResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FutureResult.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 
00022 #ifndef _FutureResult_
00023 #define _FutureResult_
00024 
00025 #include <string>
00026 
00027 #include "qpid/client/ClientImportExport.h"
00028 #include "qpid/framing/amqp_framing.h"
00029 #include "qpid/client/FutureCompletion.h"
00030 
00031 namespace qpid {
00032 namespace client {
00033 
00034 class SessionImpl;
00035 
00037 class QPID_CLIENT_CLASS_EXTERN FutureResult : public FutureCompletion
00038 {
00039     std::string result;
00040 public:
00041     QPID_CLIENT_EXTERN const std::string& getResult(SessionImpl& session) const;
00042     void received(const std::string& result);
00043 };
00044 
00045 }}
00046 
00047 
00048 
00049 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00530_source.html0000664000076400007640000002365011752725717020703 0ustar00jrossjross00000000000000 qpid/log/Options.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/Options.h
Go to the documentation of this file.
00001 #ifndef QPID_LOG_OPTIONS_H
00002 #define QPID_LOG_OPTIONS_H
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 #include "qpid/Options.h"
00022 #include "qpid/CommonImportExport.h"
00023 #include "qpid/log/SinkOptions.h"
00024 #include <iosfwd>
00025 #include <memory>
00026 
00027 namespace qpid {
00028 namespace log {
00029 
00031 struct Options : public qpid::Options {
00033     QPID_COMMON_EXTERN Options(const std::string& argv0_=std::string(),
00034             const std::string& name_="Logging options");
00035     QPID_COMMON_EXTERN Options(const Options &);
00036 
00037     QPID_COMMON_EXTERN Options& operator=(const Options&);
00038 
00039     std::string argv0;
00040     std::string name;
00041     std::vector<std::string> selectors;
00042     bool time, level, thread, source, function, hiresTs;
00043     bool trace;
00044     std::string prefix;
00045     std::auto_ptr<SinkOptions> sinkOptions;
00046 };
00047 
00048 }} // namespace qpid::log
00049 
00050 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00466.html0000664000076400007640000001152711752725717017333 0ustar00jrossjross00000000000000 qpid/client/FlowControl.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FlowControl.h File Reference

Go to the source code of this file.

Classes

struct  qpid::client::FlowControl
 Flow control works by associating a finite amount of "credit" with a subscription. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00811.html0000664000076400007640000001063211752725720017313 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Window Member List
This is the complete list of members for qpid::framing::Window, including all inherited members.
hwmqpid::framing::Window
lwmqpid::framing::Window

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00678.html0000664000076400007640000001657111752725717017344 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Connection Member List
This is the complete list of members for qpid::client::Connection, including all inherited members.
close()qpid::client::Connection
Connection()qpid::client::Connection
getInitialBrokers()qpid::client::Connection
getNegotiatedSettings()qpid::client::Connection
implqpid::client::Connection [protected]
isOpen() const qpid::client::Connection
newSession(const std::string &name=std::string(), uint32_t timeoutSeconds=0)qpid::client::Connection
open(const std::string &host, int port=5672, const std::string &uid="", const std::string &pwd="", const std::string &virtualhost="/", uint16_t maxFrameSize=65535)qpid::client::Connection
open(const Url &url, const std::string &uid="", const std::string &pwd="", const std::string &virtualhost="/", uint16_t maxFrameSize=65535)qpid::client::Connection
open(const Url &url, const ConnectionSettings &settings)qpid::client::Connection
open(const ConnectionSettings &settings)qpid::client::Connection
registerFailureCallback(boost::function< void()> fn)qpid::client::Connection
resume(Session &session)qpid::client::Connection
~Connection()qpid::client::Connection

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00876.html0000664000076400007640000001242711752725720017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ExceptionHolder::Wrapper Member List
This is the complete list of members for qpid::sys::ExceptionHolder::Wrapper, including all inherited members.
exceptionqpid::sys::ExceptionHolder::Wrapper
raise() const qpid::sys::ExceptionHolder::Wrapper [inline, virtual]
what() const qpid::sys::ExceptionHolder::Wrapper [inline, virtual]
Wrapper(Ex *ptr)qpid::sys::ExceptionHolder::Wrapper [inline]
~Raisable()qpid::sys::Raisable [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00551_source.html0000664000076400007640000003120511752725717020701 0ustar00jrossjross00000000000000 qpid/sys/posix/Condition.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/Condition.h
Go to the documentation of this file.
00001 #ifndef _sys_posix_Condition_h
00002 #define _sys_posix_Condition_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/sys/posix/PrivatePosix.h"
00026 
00027 #include "qpid/sys/Mutex.h"
00028 #include "qpid/sys/Time.h"
00029 
00030 #include <time.h>
00031 #include <sys/errno.h>
00032 #include <boost/noncopyable.hpp>
00033 
00034 namespace qpid {
00035 namespace sys {
00036 
00040 class Condition
00041 {
00042   public:
00043     inline Condition();
00044     inline ~Condition();
00045     inline void wait(Mutex&);
00046     inline bool wait(Mutex&, const AbsTime& absoluteTime);
00047     inline void notify();
00048     inline void notifyAll();
00049 
00050   private:
00051     pthread_cond_t condition;
00052 };
00053 
00054 Condition::Condition() {
00055     QPID_POSIX_ASSERT_THROW_IF(pthread_cond_init(&condition, 0));
00056 }
00057 
00058 Condition::~Condition() {
00059     QPID_POSIX_ABORT_IF(pthread_cond_destroy(&condition));
00060 }
00061 
00062 void Condition::wait(Mutex& mutex) {
00063     QPID_POSIX_ASSERT_THROW_IF(pthread_cond_wait(&condition, &mutex.mutex));
00064 }
00065 
00066 bool Condition::wait(Mutex& mutex, const AbsTime& absoluteTime){
00067     struct timespec ts;
00068     toTimespec(ts, Duration(EPOCH, absoluteTime));
00069     int status = pthread_cond_timedwait(&condition, &mutex.mutex, &ts);
00070     if (status != 0) {
00071         if (status == ETIMEDOUT) return false;
00072         throw QPID_POSIX_ERROR(status);
00073     }
00074     return true;
00075 }
00076 
00077 void Condition::notify(){
00078     QPID_POSIX_ASSERT_THROW_IF(pthread_cond_signal(&condition));
00079 }
00080 
00081 void Condition::notifyAll(){
00082     QPID_POSIX_ASSERT_THROW_IF(pthread_cond_broadcast(&condition));
00083 }
00084 
00085 }}
00086 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00413_source.html0000664000076400007640000003234111752725717020700 0ustar00jrossjross00000000000000 qpid/client/ConnectionSettings.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/ConnectionSettings.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_CONNECTIONSETTINGS_H
00002 #define QPID_CLIENT_CONNECTIONSETTINGS_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/client/ClientImportExport.h"
00026 #include "qpid/sys/IntegerTypes.h"
00027 #include <string>
00028 
00029 namespace qpid {
00030 
00031 namespace sys {
00032 class Socket;
00033 }
00034 
00035 namespace client {
00036 
00040 struct QPID_CLIENT_CLASS_EXTERN ConnectionSettings {
00041 
00042     QPID_CLIENT_EXTERN ConnectionSettings();
00043     QPID_CLIENT_EXTERN virtual ~ConnectionSettings();
00044 
00049     QPID_CLIENT_EXTERN virtual void configureSocket(qpid::sys::Socket&) const;
00050 
00054     std::string protocol;
00055 
00059     std::string host;
00063     uint16_t port;
00068     std::string virtualhost;
00069 
00074     std::string username;
00078     std::string password;
00083     std::string mechanism;
00087     std::string locale;
00091     uint16_t heartbeat;
00096     uint16_t maxChannels;
00101     uint16_t maxFrameSize;
00106     unsigned int bounds;
00110     bool tcpNoDelay;
00114     std::string service;
00119     unsigned int minSsf;
00124     unsigned int maxSsf;
00129     std::string sslCertName;
00130 };
00131 
00132 }} // namespace qpid::client
00133 
00134 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00642.html0000664000076400007640000001625711752725717017334 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaProperty Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00416_source.html0000664000076400007640000002056511752725717020710 0ustar00jrossjross00000000000000 qmf/engine/Event.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Event.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineEvent_
00002 #define _QmfEngineEvent_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 namespace qmf {
00024 namespace engine {
00025 
00026     class SchemaEventClass;
00027     class Value;
00028     struct EventImpl;
00029 
00030     class Event {
00031     public:
00032         Event(const SchemaEventClass* type);
00033         Event(const Event& from);
00034         ~Event();
00035 
00036         const SchemaEventClass* getClass() const;
00037         Value* getValue(const char* key) const;
00038 
00039     private:
00040         friend struct EventImpl;
00041         friend class AgentImpl;
00042         Event(EventImpl* impl);
00043         EventImpl* impl;
00044     };
00045 }
00046 }
00047 
00048 #endif
00049 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00780.html0000664000076400007640000003526411752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FileProperties Member List
This is the complete list of members for qpid::framing::FileProperties, including all inherited members.
bodySize() const qpid::framing::FileProperties
clearClusterIdFlag()qpid::framing::FileProperties
clearContentEncodingFlag()qpid::framing::FileProperties
clearContentTypeFlag()qpid::framing::FileProperties
clearFilenameFlag()qpid::framing::FileProperties
clearHeadersFlag()qpid::framing::FileProperties
clearMessageIdFlag()qpid::framing::FileProperties
clearPriorityFlag()qpid::framing::FileProperties
clearReplyToFlag()qpid::framing::FileProperties
clearTimestampFlag()qpid::framing::FileProperties
decode(Buffer &, uint32_t=0)qpid::framing::FileProperties
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::FileProperties
encode(Buffer &) const qpid::framing::FileProperties
encodedSize() const qpid::framing::FileProperties
encodeStructBody(Buffer &) const qpid::framing::FileProperties
FileProperties(const std::string &_contentType, const std::string &_contentEncoding, const FieldTable &_headers, uint8_t _priority, const std::string &_replyTo, const std::string &_messageId, const std::string &_filename, uint64_t _timestamp, const std::string &_clusterId)qpid::framing::FileProperties [inline]
FileProperties()qpid::framing::FileProperties [inline]
getClusterId() const qpid::framing::FileProperties
getContentEncoding() const qpid::framing::FileProperties
getContentType() const qpid::framing::FileProperties
getFilename() const qpid::framing::FileProperties
getHeaders() const qpid::framing::FileProperties
getHeaders()qpid::framing::FileProperties
getMessageId() const qpid::framing::FileProperties
getPriority() const qpid::framing::FileProperties
getReplyTo() const qpid::framing::FileProperties
getTimestamp() const qpid::framing::FileProperties
hasClusterId() const qpid::framing::FileProperties
hasContentEncoding() const qpid::framing::FileProperties
hasContentType() const qpid::framing::FileProperties
hasFilename() const qpid::framing::FileProperties
hasHeaders() const qpid::framing::FileProperties
hasMessageId() const qpid::framing::FileProperties
hasPriority() const qpid::framing::FileProperties
hasReplyTo() const qpid::framing::FileProperties
hasTimestamp() const qpid::framing::FileProperties
operator<<(std::ostream &, const FileProperties &)qpid::framing::FileProperties [friend]
print(std::ostream &out) const qpid::framing::FileProperties
setClusterId(const std::string &_clusterId)qpid::framing::FileProperties
setContentEncoding(const std::string &_contentEncoding)qpid::framing::FileProperties
setContentType(const std::string &_contentType)qpid::framing::FileProperties
setFilename(const std::string &_filename)qpid::framing::FileProperties
setHeaders(const FieldTable &_headers)qpid::framing::FileProperties
setMessageId(const std::string &_messageId)qpid::framing::FileProperties
setPriority(uint8_t _priority)qpid::framing::FileProperties
setReplyTo(const std::string &_replyTo)qpid::framing::FileProperties
setTimestamp(uint64_t _timestamp)qpid::framing::FileProperties
TYPEqpid::framing::FileProperties [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00715.html0000664000076400007640000001076611752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Package Member List
This is the complete list of members for qpid::console::Package, including all inherited members.
getName() const qpid::console::Package [inline]
Package(const std::string &n)qpid::console::Package [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00238.html0000664000076400007640000001022011752725720017307 0ustar00jrossjross00000000000000 std::ofstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::ofstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00529.html0000664000076400007640000001304111752725717017324 0ustar00jrossjross00000000000000 qpid/log/Logger.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/Logger.h File Reference
#include "qpid/log/Selector.h"
#include "qpid/log/Options.h"
#include "qpid/sys/Mutex.h"
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/noncopyable.hpp>
#include <set>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::log::Logger
 Central logging agent. More...
class  qpid::log::Logger::Output
 Logging output sink. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::log

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars.html0000664000076400007640000002066511752725717021561 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00439.html0000664000076400007640000001152511752725717017331 0ustar00jrossjross00000000000000 qpid/messaging/Handle.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Handle.h File Reference

Go to the source code of this file.

Classes

class  qpid::messaging::Handle
 A handle is like a pointer: refers to an underlying implementation object. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00496.html0000664000076400007640000001420011752725717017325 0ustar00jrossjross00000000000000 qpid/framing/Buffer.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Buffer.h File Reference
#include "qpid/framing/amqp_types.h"
#include "qpid/Exception.h"
#include "qpid/CommonImportExport.h"
#include <boost/iterator/iterator_facade.hpp>

Go to the source code of this file.

Classes

struct  qpid::framing::OutOfBounds
class  qpid::framing::Buffer
class  qpid::framing::Buffer::Iterator
 Buffer input/output iterator. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


Functions

std::ostreamqpid::framing::operator<< (std::ostream &, const Buffer &)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00402.html0000664000076400007640000000725411752725717017323 0ustar00jrossjross00000000000000 /home/jross/code/mrg-team/people/jross/manhole/qpid-0.16/cpp/docs/api/doxygen_mainpage.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
/home/jross/code/mrg-team/people/jross/manhole/qpid-0.16/cpp/docs/api/doxygen_mainpage.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00507_source.html0000664000076400007640000005352111752725717020707 0ustar00jrossjross00000000000000 qpid/framing/FileProperties.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/FileProperties.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_FILEPROPERTIES_H
00002 #define QPID_FRAMING_FILEPROPERTIES_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN FileProperties  {
00039     std::string contentType;
00040     std::string contentEncoding;
00041     FieldTable headers;
00042     uint8_t priority;
00043     std::string replyTo;
00044     std::string messageId;
00045     std::string filename;
00046     uint64_t timestamp;
00047     std::string clusterId;
00048     uint16_t flags;
00049 public:
00050     static const uint16_t TYPE = 2305;
00051     FileProperties(
00052         const std::string& _contentType,
00053         const std::string& _contentEncoding,
00054         const FieldTable& _headers,
00055         uint8_t _priority,
00056         const std::string& _replyTo,
00057         const std::string& _messageId,
00058         const std::string& _filename,
00059         uint64_t _timestamp,
00060         const std::string& _clusterId) : 
00061         contentType(_contentType),
00062         contentEncoding(_contentEncoding),
00063         headers(_headers),
00064         priority(_priority),
00065         replyTo(_replyTo),
00066         messageId(_messageId),
00067         filename(_filename),
00068         timestamp(_timestamp),
00069         clusterId(_clusterId),
00070         flags(0){
00071         flags |= (1 << 8);
00072         flags |= (1 << 9);
00073         flags |= (1 << 10);
00074         flags |= (1 << 11);
00075         flags |= (1 << 12);
00076         flags |= (1 << 13);
00077         flags |= (1 << 14);
00078         flags |= (1 << 15);
00079         flags |= (1 << 0);
00080     }
00081     FileProperties()  : priority(0), timestamp(0), flags(0) {}
00082     
00083     QPID_COMMON_EXTERN void setContentType(const std::string& _contentType);
00084     QPID_COMMON_EXTERN const std::string& getContentType() const;
00085     QPID_COMMON_EXTERN bool hasContentType() const;
00086     QPID_COMMON_EXTERN void clearContentTypeFlag();
00087     QPID_COMMON_EXTERN void setContentEncoding(const std::string& _contentEncoding);
00088     QPID_COMMON_EXTERN const std::string& getContentEncoding() const;
00089     QPID_COMMON_EXTERN bool hasContentEncoding() const;
00090     QPID_COMMON_EXTERN void clearContentEncodingFlag();
00091     QPID_COMMON_EXTERN void setHeaders(const FieldTable& _headers);
00092     QPID_COMMON_EXTERN const FieldTable& getHeaders() const;
00093     QPID_COMMON_EXTERN FieldTable& getHeaders();
00094     QPID_COMMON_EXTERN bool hasHeaders() const;
00095     QPID_COMMON_EXTERN void clearHeadersFlag();
00096     QPID_COMMON_EXTERN void setPriority(uint8_t _priority);
00097     QPID_COMMON_EXTERN uint8_t getPriority() const;
00098     QPID_COMMON_EXTERN bool hasPriority() const;
00099     QPID_COMMON_EXTERN void clearPriorityFlag();
00100     QPID_COMMON_EXTERN void setReplyTo(const std::string& _replyTo);
00101     QPID_COMMON_EXTERN const std::string& getReplyTo() const;
00102     QPID_COMMON_EXTERN bool hasReplyTo() const;
00103     QPID_COMMON_EXTERN void clearReplyToFlag();
00104     QPID_COMMON_EXTERN void setMessageId(const std::string& _messageId);
00105     QPID_COMMON_EXTERN const std::string& getMessageId() const;
00106     QPID_COMMON_EXTERN bool hasMessageId() const;
00107     QPID_COMMON_EXTERN void clearMessageIdFlag();
00108     QPID_COMMON_EXTERN void setFilename(const std::string& _filename);
00109     QPID_COMMON_EXTERN const std::string& getFilename() const;
00110     QPID_COMMON_EXTERN bool hasFilename() const;
00111     QPID_COMMON_EXTERN void clearFilenameFlag();
00112     QPID_COMMON_EXTERN void setTimestamp(uint64_t _timestamp);
00113     QPID_COMMON_EXTERN uint64_t getTimestamp() const;
00114     QPID_COMMON_EXTERN bool hasTimestamp() const;
00115     QPID_COMMON_EXTERN void clearTimestampFlag();
00116     QPID_COMMON_EXTERN void setClusterId(const std::string& _clusterId);
00117     QPID_COMMON_EXTERN const std::string& getClusterId() const;
00118     QPID_COMMON_EXTERN bool hasClusterId() const;
00119     QPID_COMMON_EXTERN void clearClusterIdFlag();
00120     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const FileProperties&);
00121     QPID_COMMON_EXTERN void encode(Buffer&) const;
00122     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00123     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00124     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00125     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00126     QPID_COMMON_EXTERN uint32_t bodySize() const;
00127     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00128 }; /* class FileProperties */
00129 
00130 }}
00131 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00565.html0000664000076400007640000001152611752725717017332 0ustar00jrossjross00000000000000 qpid/sys/Runnable.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Runnable.h File Reference
#include <boost/function.hpp>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::sys::Runnable
 Interface for objects that can be run, e.g. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00272.html0000664000076400007640000001715111752725720017317 0ustar00jrossjross00000000000000 qpid::messaging::ReceiverError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::ReceiverError Struct Reference

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 ReceiverError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qpid::messaging::ReceiverError::ReceiverError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00486_source.html0000664000076400007640000002771111752725717020717 0ustar00jrossjross00000000000000 qpid/console/ConsoleListener.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/ConsoleListener.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_CONSOLE_LISTENER_H_
00022 #define _QPID_CONSOLE_CONSOLE_LISTENER_H_
00023 
00024 #include <string>
00025 #include "qpid/console/ConsoleImportExport.h"
00026 #include "qpid/console/Broker.h"
00027 #include "qpid/console/ClassKey.h"
00028 #include "qpid/console/Object.h"
00029 #include "qpid/console/Event.h"
00030 
00031 namespace qpid {
00032 namespace console {
00033 
00040     class QPID_CONSOLE_EXTERN ConsoleListener{
00041     public:
00042         virtual ~ConsoleListener() {};
00043 
00046         virtual void brokerConnected(const Broker&) {}
00047 
00050         virtual void brokerDisconnected(const Broker&) {}
00051 
00054         virtual void newPackage(const std::string&) {}
00055 
00059         virtual void newClass(const ClassKey&) {}
00060 
00063         virtual void newAgent(const Agent&) {}
00064 
00067         virtual void delAgent(const Agent&) {}
00068 
00071         virtual void objectProps(Broker&, Object&) {}
00072 
00075         virtual void objectStats(Broker&, Object&) {}
00076 
00079         virtual void event(Event&) {}
00080 
00083         //virtual void heartbeat(Agent&, uint64_t) {}
00084 
00087         virtual void brokerInfo(Broker&) {}
00088 
00091         //virtual void methodResponse(Broker&, uint32_t seq, MethodResponse&) {}
00092     };
00093 }
00094 }
00095 
00096 
00097 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00271.html0000664000076400007640000010274211752725720017317 0ustar00jrossjross00000000000000 qpid::messaging::Receiver Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Interface through which messages are received. More...

#include <qpid/messaging/Receiver.h>

List of all members.

Public Member Functions

 Receiver (ReceiverImpl *impl=0)
 Receiver (const Receiver &)
 ~Receiver ()
Receiveroperator= (const Receiver &)
bool get (Message &message, Duration timeout=Duration::FOREVER)
 Retrieves a message from this receivers local queue, or waits for upto the specified timeout for a message to become available.
Message get (Duration timeout=Duration::FOREVER)
 Retrieves a message from this receivers local queue, or waits for up to the specified timeout for a message to become available.
bool fetch (Message &message, Duration timeout=Duration::FOREVER)
 Retrieves a message for this receivers subscription or waits for up to the specified timeout for one to become available.
Message fetch (Duration timeout=Duration::FOREVER)
 Retrieves a message for this receivers subscription or waits for up to the specified timeout for one to become available.
void setCapacity (uint32_t)
 Sets the capacity for the receiver.
uint32_t getCapacity ()
uint32_t getAvailable ()
uint32_t getUnsettled ()
void close ()
 Cancels this receiver.
bool isClosed () const
 Return true if the receiver was closed by a call to close()
const std::stringgetName () const
 Returns the name of this receiver.
Session getSession () const
 Returns a handle to the session associated with this receiver.
QPID_MESSAGING_INLINE_EXTERN bool isValid () const
QPID_MESSAGING_INLINE_EXTERN bool isNull () const
QPID_MESSAGING_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_MESSAGING_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Detailed Description

Interface through which messages are received.


Member Typedef Documentation

typedef T qpid::messaging::Handle::Impl [protected, inherited]

Definition at line 57 of file Handle.h.


Constructor & Destructor Documentation

qpid::messaging::Receiver::Receiver ( ReceiverImpl *  impl = 0)
qpid::messaging::Receiver::Receiver ( const Receiver )
qpid::messaging::Receiver::~Receiver ( )

Member Function Documentation

void qpid::messaging::Receiver::close ( )

Cancels this receiver.

bool qpid::messaging::Receiver::fetch ( Message message,
Duration  timeout = Duration::FOREVER 
)

Retrieves a message for this receivers subscription or waits for up to the specified timeout for one to become available.

Unlike get() this method will check with the server that there is no message for the subscription this receiver is serving before returning false.

Returns:
false if there is no message to give after waiting for the specified timeout, or if the Receiver is closed, in which case isClose() will be true.
Message qpid::messaging::Receiver::fetch ( Duration  timeout = Duration::FOREVER)

Retrieves a message for this receivers subscription or waits for up to the specified timeout for one to become available.

Unlike get() this method will check with the server that there is no message for the subscription this receiver is serving before throwing an exception.

Exceptions:
NoMessageAvailableif there is no message to give after waiting for the specified timeout, or if the Receiver is closed, in which case isClose() will be true.
bool qpid::messaging::Receiver::get ( Message message,
Duration  timeout = Duration::FOREVER 
)

Retrieves a message from this receivers local queue, or waits for upto the specified timeout for a message to become available.

Message qpid::messaging::Receiver::get ( Duration  timeout = Duration::FOREVER)

Retrieves a message from this receivers local queue, or waits for up to the specified timeout for a message to become available.

Exceptions:
NoMessageAvailableif there is no message to give after waiting for the specified timeout, or if the Receiver is closed, in which case isClose() will be true.
uint32_t qpid::messaging::Receiver::getAvailable ( )
Returns:
the number of messages received and waiting to be fetched.
uint32_t qpid::messaging::Receiver::getCapacity ( )
Returns:
the capacity of the receiver. The capacity determines how many incoming messages can be held in the receiver before being requested by a client via fetch() (or pushed to a listener).
const std::string& qpid::messaging::Receiver::getName ( ) const

Returns the name of this receiver.

Session qpid::messaging::Receiver::getSession ( ) const

Returns a handle to the session associated with this receiver.

uint32_t qpid::messaging::Receiver::getUnsettled ( )
Returns:
a count of the number of messages received on this receiver that have been acknowledged, but for which that acknowledgement has not yet been confirmed as processed by the server.
bool qpid::messaging::Receiver::isClosed ( ) const

Return true if the receiver was closed by a call to close()

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN qpid::messaging::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_MESSAGING_INLINE_EXTERN bool qpid::messaging::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

Receiver& qpid::messaging::Receiver::operator= ( const Receiver )
void qpid::messaging::Receiver::setCapacity ( uint32_t  )

Sets the capacity for the receiver.

The capacity determines how many incoming messages can be held in the receiver before being requested by a client via fetch() (or pushed to a listener).

void qpid::messaging::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.


Member Data Documentation

Impl* qpid::messaging::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00094.html0000664000076400007640000006225011752725717017327 0ustar00jrossjross00000000000000 qmf::Data Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

#include <qmf/Data.h>

List of all members.

Public Member Functions

 Data (DataImpl *impl=0)
 Data (const Data &)
Dataoperator= (const Data &)
 ~Data ()
 Data (const Schema &)
void setAddr (const DataAddr &)
void setProperty (const std::string &, const qpid::types::Variant &)
void overwriteProperties (const qpid::types::Variant::Map &)
bool hasSchema () const
bool hasAddr () const
const SchemaIdgetSchemaId () const
const DataAddrgetAddr () const
const qpid::types::VariantgetProperty (const std::string &) const
const qpid::types::Variant::MapgetProperties () const
bool hasAgent () const
const AgentgetAgent () const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::Data::Data ( DataImpl *  impl = 0)
qmf::Data::Data ( const Data )
qmf::Data::~Data ( )
qmf::Data::Data ( const Schema )

Member Function Documentation

const DataAddr& qmf::Data::getAddr ( ) const
const Agent& qmf::Data::getAgent ( ) const
const qpid::types::Variant::Map& qmf::Data::getProperties ( ) const
const qpid::types::Variant& qmf::Data::getProperty ( const std::string ) const
const SchemaId& qmf::Data::getSchemaId ( ) const
bool qmf::Data::hasAddr ( ) const
bool qmf::Data::hasAgent ( ) const
bool qmf::Data::hasSchema ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

Data& qmf::Data::operator= ( const Data )
void qmf::Data::overwriteProperties ( const qpid::types::Variant::Map )
void qmf::Data::setAddr ( const DataAddr )
void qmf::Data::setProperty ( const std::string ,
const qpid::types::Variant  
)
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00307.html0000664000076400007640000004144711752725717017331 0ustar00jrossjross00000000000000 qmf::engine::SchemaProperty Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaProperty Class Reference

#include <qmf/engine/Schema.h>

List of all members.

Public Member Functions

 SchemaProperty (const char *name, Typecode typecode)
 SchemaProperty (const SchemaProperty &from)
 ~SchemaProperty ()
void setAccess (Access access)
void setIndex (bool val)
void setOptional (bool val)
void setUnit (const char *val)
void setDesc (const char *desc)
const char * getName () const
Typecode getType () const
Access getAccess () const
bool isIndex () const
bool isOptional () const
const char * getUnit () const
const char * getDesc () const

Constructor & Destructor Documentation

qmf::engine::SchemaProperty::SchemaProperty ( const char *  name,
Typecode  typecode 
)
qmf::engine::SchemaProperty::SchemaProperty ( const SchemaProperty from)
qmf::engine::SchemaProperty::~SchemaProperty ( )

Member Function Documentation

Access qmf::engine::SchemaProperty::getAccess ( ) const
const char* qmf::engine::SchemaProperty::getDesc ( ) const
const char* qmf::engine::SchemaProperty::getName ( ) const
Typecode qmf::engine::SchemaProperty::getType ( ) const
const char* qmf::engine::SchemaProperty::getUnit ( ) const
bool qmf::engine::SchemaProperty::isIndex ( ) const
bool qmf::engine::SchemaProperty::isOptional ( ) const
void qmf::engine::SchemaProperty::setAccess ( Access  access)
void qmf::engine::SchemaProperty::setDesc ( const char *  desc)
void qmf::engine::SchemaProperty::setIndex ( bool  val)
void qmf::engine::SchemaProperty::setOptional ( bool  val)
void qmf::engine::SchemaProperty::setUnit ( const char *  val)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00015.html0000664000076400007640000001054611752725720017313 0ustar00jrossjross00000000000000 qpid::management::ArgsNone Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ArgsNone Class Reference

#include <qpid/management/Args.h>

List of all members.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00632.html0000664000076400007640000001740611752725717017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ObjectId Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00528.html0000664000076400007640000001132011752725717017321 0ustar00jrossjross00000000000000 qpid/InlineVector.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/InlineVector.h File Reference
#include "qpid/InlineAllocator.h"
#include <vector>

Go to the source code of this file.

Classes

class  qpid::InlineVector
 A vector that stores up to Max elements in inline storage, otherwise uses normal vector allocation. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00079.html0000664000076400007640000001036211752725720017321 0ustar00jrossjross00000000000000 std::multimap::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multimap::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00296.html0000664000076400007640000006614211752725717017337 0ustar00jrossjross00000000000000 qmf::Schema Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

#include <qmf/Schema.h>

List of all members.

Public Member Functions

 Schema (SchemaImpl *impl=0)
 Schema (const Schema &)
Schemaoperator= (const Schema &)
 ~Schema ()
 Schema (int, const std::string &, const std::string &)
const SchemaIdgetSchemaId () const
void finalize ()
bool isFinalized () const
void addProperty (const SchemaProperty &)
void addMethod (const SchemaMethod &)
void setDesc (const std::string &)
const std::stringgetDesc () const
void setDefaultSeverity (int)
int getDefaultSeverity () const
uint32_t getPropertyCount () const
SchemaProperty getProperty (uint32_t) const
uint32_t getMethodCount () const
SchemaMethod getMethod (uint32_t) const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::Schema::Schema ( SchemaImpl *  impl = 0)
qmf::Schema::Schema ( const Schema )
qmf::Schema::~Schema ( )
qmf::Schema::Schema ( int  ,
const std::string ,
const std::string  
)

Member Function Documentation

void qmf::Schema::addMethod ( const SchemaMethod )
void qmf::Schema::addProperty ( const SchemaProperty )
void qmf::Schema::finalize ( )
int qmf::Schema::getDefaultSeverity ( ) const
const std::string& qmf::Schema::getDesc ( ) const
SchemaMethod qmf::Schema::getMethod ( uint32_t  ) const
uint32_t qmf::Schema::getMethodCount ( ) const
SchemaProperty qmf::Schema::getProperty ( uint32_t  ) const
uint32_t qmf::Schema::getPropertyCount ( ) const
const SchemaId& qmf::Schema::getSchemaId ( ) const
bool qmf::Schema::isFinalized ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

Schema& qmf::Schema::operator= ( const Schema )
void qmf::Schema::setDefaultSeverity ( int  )
void qmf::Schema::setDesc ( const std::string )
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00014.html0000664000076400007640000001271211752725720017307 0ustar00jrossjross00000000000000 qpid::management::Args Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::Args Class Reference

#include <qpid/management/Args.h>

List of all members.

Public Member Functions

virtual ~Args (void)=0

Constructor & Destructor Documentation

qpid::management::Args::~Args ( void  ) [inline, pure virtual]

Definition at line 35 of file Args.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00409.html0000664000076400007640000001153211752725717017324 0ustar00jrossjross00000000000000 qmf/ConsoleSession.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/ConsoleSession.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qmf/Agent.h"
#include "qmf/Subscription.h"
#include "qpid/messaging/Duration.h"
#include "qpid/messaging/Connection.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::ConsoleSession

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00249.html0000664000076400007640000001023611752725720017320 0ustar00jrossjross00000000000000 std::overflow_error Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::overflow_error Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00443_source.html0000664000076400007640000001652311752725717020707 0ustar00jrossjross00000000000000 qpid/types/ImportExport.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/types/ImportExport.h
Go to the documentation of this file.
00001 #ifndef QPID_TYPES_IMPORTEXPORT_H
00002 #define QPID_TYPES_IMPORTEXPORT_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include "qpid/ImportExport.h"
00024 
00025 #if defined(TYPES_EXPORT) || defined (qpidtypes_EXPORTS)
00026 #  define QPID_TYPES_EXTERN QPID_EXPORT
00027 #  define QPID_TYPES_CLASS_EXTERN QPID_CLASS_EXPORT
00028 #  define QPID_TYPES_INLINE_EXTERN QPID_INLINE_EXPORT
00029 #else
00030 #  define QPID_TYPES_EXTERN QPID_IMPORT
00031 #  define QPID_TYPES_CLASS_EXTERN QPID_CLASS_IMPORT
00032 #  define QPID_TYPES_INLINE_EXTERN QPID_INLINE_IMPORT
00033 #endif
00034 
00035 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00570.html0000664000076400007640000001461111752725717017324 0ustar00jrossjross00000000000000 qpid/Url.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Url.h File Reference
#include "qpid/Address.h"
#include "qpid/Exception.h"
#include <string>
#include <vector>
#include <new>
#include <ostream>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

struct  qpid::Url
 An AMQP URL contains a list of addresses. More...
struct  qpid::Url::Invalid

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


Functions

bool qpid::operator== (const Url &a, const Url &b)
bool qpid::operator!= (const Url &a, const Url &b)
std::ostreamqpid::operator<< (std::ostream &os, const Url &url)
std::istreamqpid::operator>> (std::istream &is, Url &url)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00498.html0000664000076400007640000006632111752725717017342 0ustar00jrossjross00000000000000 qpid/framing/constants.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/constants.h File Reference

Go to the source code of this file.

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


Enumerations

enum  qpid::framing::AmqpConstant {
  qpid::framing::MIN_MAX_FRAME_SIZE = 4096, qpid::framing::CONNECTION_CLASS_ID = 0x1, qpid::framing::CONNECTION_START_METHOD_ID = 0x1, qpid::framing::CONNECTION_START_OK_METHOD_ID = 0x2,
  qpid::framing::CONNECTION_SECURE_METHOD_ID = 0x3, qpid::framing::CONNECTION_SECURE_OK_METHOD_ID = 0x4, qpid::framing::CONNECTION_TUNE_METHOD_ID = 0x5, qpid::framing::CONNECTION_TUNE_OK_METHOD_ID = 0x6,
  qpid::framing::CONNECTION_OPEN_METHOD_ID = 0x7, qpid::framing::CONNECTION_OPEN_OK_METHOD_ID = 0x8, qpid::framing::CONNECTION_REDIRECT_METHOD_ID = 0x9, qpid::framing::CONNECTION_HEARTBEAT_METHOD_ID = 0xa,
  qpid::framing::CONNECTION_CLOSE_METHOD_ID = 0xb, qpid::framing::CONNECTION_CLOSE_OK_METHOD_ID = 0xc, qpid::framing::SESSION_CLASS_ID = 0x2, qpid::framing::SESSION_ATTACH_METHOD_ID = 0x1,
  qpid::framing::SESSION_ATTACHED_METHOD_ID = 0x2, qpid::framing::SESSION_DETACH_METHOD_ID = 0x3, qpid::framing::SESSION_DETACHED_METHOD_ID = 0x4, qpid::framing::SESSION_REQUEST_TIMEOUT_METHOD_ID = 0x5,
  qpid::framing::SESSION_TIMEOUT_METHOD_ID = 0x6, qpid::framing::SESSION_COMMAND_POINT_METHOD_ID = 0x7, qpid::framing::SESSION_EXPECTED_METHOD_ID = 0x8, qpid::framing::SESSION_CONFIRMED_METHOD_ID = 0x9,
  qpid::framing::SESSION_COMPLETED_METHOD_ID = 0xa, qpid::framing::SESSION_KNOWN_COMPLETED_METHOD_ID = 0xb, qpid::framing::SESSION_FLUSH_METHOD_ID = 0xc, qpid::framing::SESSION_GAP_METHOD_ID = 0xd,
  qpid::framing::EXECUTION_CLASS_ID = 0x3, qpid::framing::EXECUTION_SYNC_METHOD_ID = 0x1, qpid::framing::EXECUTION_RESULT_METHOD_ID = 0x2, qpid::framing::EXECUTION_EXCEPTION_METHOD_ID = 0x3,
  qpid::framing::MESSAGE_CLASS_ID = 0x4, qpid::framing::MESSAGE_TRANSFER_METHOD_ID = 0x1, qpid::framing::MESSAGE_ACCEPT_METHOD_ID = 0x2, qpid::framing::MESSAGE_REJECT_METHOD_ID = 0x3,
  qpid::framing::MESSAGE_RELEASE_METHOD_ID = 0x4, qpid::framing::MESSAGE_ACQUIRE_METHOD_ID = 0x5, qpid::framing::MESSAGE_RESUME_METHOD_ID = 0x6, qpid::framing::MESSAGE_SUBSCRIBE_METHOD_ID = 0x7,
  qpid::framing::MESSAGE_CANCEL_METHOD_ID = 0x8, qpid::framing::MESSAGE_SET_FLOW_MODE_METHOD_ID = 0x9, qpid::framing::MESSAGE_FLOW_METHOD_ID = 0xa, qpid::framing::MESSAGE_FLUSH_METHOD_ID = 0xb,
  qpid::framing::MESSAGE_STOP_METHOD_ID = 0xc, qpid::framing::TX_CLASS_ID = 0x5, qpid::framing::TX_SELECT_METHOD_ID = 0x1, qpid::framing::TX_COMMIT_METHOD_ID = 0x2,
  qpid::framing::TX_ROLLBACK_METHOD_ID = 0x3, qpid::framing::DTX_CLASS_ID = 0x6, qpid::framing::DTX_SELECT_METHOD_ID = 0x1, qpid::framing::DTX_START_METHOD_ID = 0x2,
  qpid::framing::DTX_END_METHOD_ID = 0x3, qpid::framing::DTX_COMMIT_METHOD_ID = 0x4, qpid::framing::DTX_FORGET_METHOD_ID = 0x5, qpid::framing::DTX_GET_TIMEOUT_METHOD_ID = 0x6,
  qpid::framing::DTX_PREPARE_METHOD_ID = 0x7, qpid::framing::DTX_RECOVER_METHOD_ID = 0x8, qpid::framing::DTX_ROLLBACK_METHOD_ID = 0x9, qpid::framing::DTX_SET_TIMEOUT_METHOD_ID = 0xa,
  qpid::framing::EXCHANGE_CLASS_ID = 0x7, qpid::framing::EXCHANGE_DECLARE_METHOD_ID = 0x1, qpid::framing::EXCHANGE_DELETE_METHOD_ID = 0x2, qpid::framing::EXCHANGE_QUERY_METHOD_ID = 0x3,
  qpid::framing::EXCHANGE_BIND_METHOD_ID = 0x4, qpid::framing::EXCHANGE_UNBIND_METHOD_ID = 0x5, qpid::framing::EXCHANGE_BOUND_METHOD_ID = 0x6, qpid::framing::QUEUE_CLASS_ID = 0x8,
  qpid::framing::QUEUE_DECLARE_METHOD_ID = 0x1, qpid::framing::QUEUE_DELETE_METHOD_ID = 0x2, qpid::framing::QUEUE_PURGE_METHOD_ID = 0x3, qpid::framing::QUEUE_QUERY_METHOD_ID = 0x4,
  qpid::framing::FILE_CLASS_ID = 0x9, qpid::framing::FILE_QOS_METHOD_ID = 0x1, qpid::framing::FILE_QOS_OK_METHOD_ID = 0x2, qpid::framing::FILE_CONSUME_METHOD_ID = 0x3,
  qpid::framing::FILE_CONSUME_OK_METHOD_ID = 0x4, qpid::framing::FILE_CANCEL_METHOD_ID = 0x5, qpid::framing::FILE_OPEN_METHOD_ID = 0x6, qpid::framing::FILE_OPEN_OK_METHOD_ID = 0x7,
  qpid::framing::FILE_STAGE_METHOD_ID = 0x8, qpid::framing::FILE_PUBLISH_METHOD_ID = 0x9, qpid::framing::FILE_RETURN_METHOD_ID = 0xa, qpid::framing::FILE_DELIVER_METHOD_ID = 0xb,
  qpid::framing::FILE_ACK_METHOD_ID = 0xc, qpid::framing::FILE_REJECT_METHOD_ID = 0xd, qpid::framing::STREAM_CLASS_ID = 0xa, qpid::framing::STREAM_QOS_METHOD_ID = 0x1,
  qpid::framing::STREAM_QOS_OK_METHOD_ID = 0x2, qpid::framing::STREAM_CONSUME_METHOD_ID = 0x3, qpid::framing::STREAM_CONSUME_OK_METHOD_ID = 0x4, qpid::framing::STREAM_CANCEL_METHOD_ID = 0x5,
  qpid::framing::STREAM_PUBLISH_METHOD_ID = 0x6, qpid::framing::STREAM_RETURN_METHOD_ID = 0x7, qpid::framing::STREAM_DELIVER_METHOD_ID = 0x8, qpid::framing::CLUSTER_CLASS_ID = 0x80,
  qpid::framing::CLUSTER_UPDATE_REQUEST_METHOD_ID = 0x1, qpid::framing::CLUSTER_UPDATE_OFFER_METHOD_ID = 0x2, qpid::framing::CLUSTER_RETRACT_OFFER_METHOD_ID = 0x3, qpid::framing::CLUSTER_INITIAL_STATUS_METHOD_ID = 0x5,
  qpid::framing::CLUSTER_READY_METHOD_ID = 0x10, qpid::framing::CLUSTER_CONFIG_CHANGE_METHOD_ID = 0x11, qpid::framing::CLUSTER_ERROR_CHECK_METHOD_ID = 0x14, qpid::framing::CLUSTER_TIMER_WAKEUP_METHOD_ID = 0x15,
  qpid::framing::CLUSTER_TIMER_DROP_METHOD_ID = 0x16, qpid::framing::CLUSTER_SHUTDOWN_METHOD_ID = 0x20, qpid::framing::CLUSTER_DELIVER_TO_QUEUE_METHOD_ID = 0x21, qpid::framing::CLUSTER_CLOCK_METHOD_ID = 0x22,
  qpid::framing::CLUSTER_CONNECTION_CLASS_ID = 0x81, qpid::framing::CLUSTER_CONNECTION_ANNOUNCE_METHOD_ID = 0x1, qpid::framing::CLUSTER_CONNECTION_DELIVER_CLOSE_METHOD_ID = 0x2, qpid::framing::CLUSTER_CONNECTION_DELIVER_DO_OUTPUT_METHOD_ID = 0x3,
  qpid::framing::CLUSTER_CONNECTION_ABORT_METHOD_ID = 0x4, qpid::framing::CLUSTER_CONNECTION_SHADOW_SET_USER_METHOD_ID = 0x0E, qpid::framing::CLUSTER_CONNECTION_SHADOW_PREPARE_METHOD_ID = 0x0F, qpid::framing::CLUSTER_CONNECTION_CONSUMER_STATE_METHOD_ID = 0x10,
  qpid::framing::CLUSTER_CONNECTION_DELIVERY_RECORD_METHOD_ID = 0x11, qpid::framing::CLUSTER_CONNECTION_TX_START_METHOD_ID = 0x12, qpid::framing::CLUSTER_CONNECTION_TX_ACCEPT_METHOD_ID = 0x13, qpid::framing::CLUSTER_CONNECTION_TX_DEQUEUE_METHOD_ID = 0x14,
  qpid::framing::CLUSTER_CONNECTION_TX_ENQUEUE_METHOD_ID = 0x15, qpid::framing::CLUSTER_CONNECTION_TX_PUBLISH_METHOD_ID = 0x16, qpid::framing::CLUSTER_CONNECTION_TX_END_METHOD_ID = 0x17, qpid::framing::CLUSTER_CONNECTION_ACCUMULATED_ACK_METHOD_ID = 0x18,
  qpid::framing::CLUSTER_CONNECTION_OUTPUT_TASK_METHOD_ID = 0x19, qpid::framing::CLUSTER_CONNECTION_DTX_START_METHOD_ID = 0x1A, qpid::framing::CLUSTER_CONNECTION_DTX_END_METHOD_ID = 0x1B, qpid::framing::CLUSTER_CONNECTION_DTX_ACK_METHOD_ID = 0x1C,
  qpid::framing::CLUSTER_CONNECTION_DTX_BUFFER_REF_METHOD_ID = 0x1D, qpid::framing::CLUSTER_CONNECTION_DTX_WORK_RECORD_METHOD_ID = 0x1E, qpid::framing::CLUSTER_CONNECTION_SESSION_STATE_METHOD_ID = 0x1F, qpid::framing::CLUSTER_CONNECTION_SHADOW_READY_METHOD_ID = 0x20,
  qpid::framing::CLUSTER_CONNECTION_MEMBERSHIP_METHOD_ID = 0x21, qpid::framing::CLUSTER_CONNECTION_RETRACT_OFFER_METHOD_ID = 0x22, qpid::framing::CLUSTER_CONNECTION_QUEUE_POSITION_METHOD_ID = 0x30, qpid::framing::CLUSTER_CONNECTION_EXCHANGE_METHOD_ID = 0x31,
  qpid::framing::CLUSTER_CONNECTION_ADD_QUEUE_LISTENER_METHOD_ID = 0x34, qpid::framing::CLUSTER_CONNECTION_MANAGEMENT_SETUP_STATE_METHOD_ID = 0x36, qpid::framing::CLUSTER_CONNECTION_CONFIG_METHOD_ID = 0x37, qpid::framing::CLUSTER_CONNECTION_QUEUE_FAIRSHARE_STATE_METHOD_ID = 0x38,
  qpid::framing::CLUSTER_CONNECTION_QUEUE_OBSERVER_STATE_METHOD_ID = 0x39, qpid::framing::CLUSTER_CONNECTION_CLOCK_METHOD_ID = 0x40, qpid::framing::CLUSTER_CONNECTION_QUEUE_DEQUEUE_SINCE_PURGE_STATE_METHOD_ID = 0x41
}

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00751.html0000664000076400007640000001270111752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::InvalidConversionException Member List
This is the complete list of members for qpid::framing::InvalidConversionException, including all inherited members.
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
InvalidConversionException()qpid::framing::InvalidConversionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00567_source.html0000664000076400007640000002364311752725717020717 0ustar00jrossjross00000000000000 qpid/sys/SystemInfo.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/SystemInfo.h
Go to the documentation of this file.
00001 #ifndef QPID_SYS_SYSTEMINFO_H
00002 #define QPID_SYS_SYSTEMINFO_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include "qpid/sys/IntegerTypes.h"
00025 #include "qpid/Address.h"
00026 #include "qpid/CommonImportExport.h"
00027 #include <vector>
00028 
00029 namespace qpid {
00030 namespace sys {
00031 
00036 namespace SystemInfo {
00041     QPID_COMMON_EXTERN long concurrency();
00042 
00047     QPID_COMMON_EXTERN bool getLocalHostname (Address &address);
00048 
00049     QPID_COMMON_EXTERN void getLocalIpAddresses (uint16_t port, std::vector<Address> &addrList);
00050 
00062     QPID_COMMON_EXTERN void getSystemId (std::string &osName,
00063                       std::string &nodeName,
00064                       std::string &release,
00065                       std::string &version,
00066                       std::string &machine);
00067 
00071     QPID_COMMON_EXTERN uint32_t getProcessId();
00072 
00076     QPID_COMMON_EXTERN uint32_t getParentProcessId();
00077 
00081     QPID_COMMON_EXTERN std::string getProcessName();
00082 
00083 
00084 }}} // namespace qpid::sys::SystemInfo
00085 
00086 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00480_source.html0000664000076400007640000002664511752725717020716 0ustar00jrossjross00000000000000 qpid/client/SubscriptionSettings.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/SubscriptionSettings.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_SUBSCRIPTIONSETTINGS_H
00002 #define QPID_CLIENT_SUBSCRIPTIONSETTINGS_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/client/FlowControl.h"
00025 #include "qpid/framing/enum.h"
00026 
00027 namespace qpid {
00028 namespace client {
00029 
00031 using namespace qpid::framing::message;
00032 
00033 enum CompletionMode {
00034     MANUAL_COMPLETION = 0,
00035     COMPLETE_ON_DELIVERY = 1,
00036     COMPLETE_ON_ACCEPT = 2
00037 };
00041 struct SubscriptionSettings
00042 {
00043     SubscriptionSettings(
00044         FlowControl flow=FlowControl::unlimited(),
00045         AcceptMode accept=ACCEPT_MODE_EXPLICIT,
00046         AcquireMode acquire=ACQUIRE_MODE_PRE_ACQUIRED,
00047         unsigned int autoAck_=1,
00048         CompletionMode completion=COMPLETE_ON_DELIVERY
00049     ) : flowControl(flow), acceptMode(accept), acquireMode(acquire), autoAck(autoAck_), completionMode(completion), exclusive(false) {}
00050 
00051     FlowControl flowControl;    
00052 
00063     AcceptMode acceptMode;      
00064 
00081     AcquireMode acquireMode;    
00082 
00090     unsigned int autoAck;
00113     CompletionMode completionMode;
00118     bool exclusive;
00119 };
00120 
00121 }} // namespace qpid::client
00122 
00123 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00255.html0000664000076400007640000003475411752725720017330 0ustar00jrossjross00000000000000 qpid::framing::ProtocolVersion Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ProtocolVersion Class Reference

#include <qpid/framing/ProtocolVersion.h>

List of all members.

Public Member Functions

 ProtocolVersion (uint8_t _major=0, uint8_t _minor=0)
QPID_COMMON_INLINE_EXTERN uint8_t getMajor () const
QPID_COMMON_INLINE_EXTERN void setMajor (uint8_t major)
QPID_COMMON_INLINE_EXTERN uint8_t getMinor () const
QPID_COMMON_INLINE_EXTERN void setMinor (uint8_t minor)
const std::string toString () const
ProtocolVersionoperator= (ProtocolVersion p)
bool operator== (ProtocolVersion p) const
QPID_COMMON_INLINE_EXTERN bool operator!= (ProtocolVersion p) const

Constructor & Destructor Documentation

qpid::framing::ProtocolVersion::ProtocolVersion ( uint8_t  _major = 0,
uint8_t  _minor = 0 
) [inline, explicit]

Definition at line 39 of file ProtocolVersion.h.


Member Function Documentation

QPID_COMMON_INLINE_EXTERN uint8_t qpid::framing::ProtocolVersion::getMajor ( ) const [inline]

Definition at line 42 of file ProtocolVersion.h.

QPID_COMMON_INLINE_EXTERN uint8_t qpid::framing::ProtocolVersion::getMinor ( ) const [inline]

Definition at line 44 of file ProtocolVersion.h.

QPID_COMMON_INLINE_EXTERN bool qpid::framing::ProtocolVersion::operator!= ( ProtocolVersion  p) const [inline]

Definition at line 51 of file ProtocolVersion.h.

ProtocolVersion& qpid::framing::ProtocolVersion::operator= ( ProtocolVersion  p)
bool qpid::framing::ProtocolVersion::operator== ( ProtocolVersion  p) const
QPID_COMMON_INLINE_EXTERN void qpid::framing::ProtocolVersion::setMajor ( uint8_t  major) [inline]

Definition at line 43 of file ProtocolVersion.h.

QPID_COMMON_INLINE_EXTERN void qpid::framing::ProtocolVersion::setMinor ( uint8_t  minor) [inline]

Definition at line 45 of file ProtocolVersion.h.

const std::string qpid::framing::ProtocolVersion::toString ( ) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00363.html0000664000076400007640000007772111752725720017331 0ustar00jrossjross00000000000000 qpid::console::Uint64Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Uint64Value Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 Uint64Value (uint64_t v)
std::string str () const
bool isUint64 () const
uint64_t asUint64 () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::Uint64Value::Uint64Value ( uint64_t  v) [inline]

Definition at line 121 of file Value.h.


Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

uint64_t qpid::console::Uint64Value::asUint64 ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 124 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

bool qpid::console::Uint64Value::isUint64 ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 123 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::Uint64Value::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00038.html0000664000076400007640000001027011752725720017312 0ustar00jrossjross00000000000000 std::basic_stringstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_stringstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00684.html0000664000076400007640000001136611752725717017336 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FailoverManager::ReconnectionStrategy Member List
This is the complete list of members for qpid::client::FailoverManager::ReconnectionStrategy, including all inherited members.
editUrlList(std::vector< Url > &urls)=0qpid::client::FailoverManager::ReconnectionStrategy [pure virtual]
~ReconnectionStrategy()qpid::client::FailoverManager::ReconnectionStrategy [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00452.html0000664000076400007640000001317611752725717017330 0ustar00jrossjross00000000000000 qpid/messaging/Address.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Address.h File Reference
#include "qpid/messaging/ImportExport.h"
#include "qpid/messaging/exceptions.h"
#include "qpid/types/Variant.h"
#include <string>
#include <ostream>

Go to the source code of this file.

Classes

class  qpid::messaging::Address
 Represents an address to which messages can be sent and from which messages can be received. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::messaging

Functions

std::ostreamqpid::messaging::operator<< (std::ostream &out, const Address &address)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00453_source.html0000664000076400007640000007331311752725717020710 0ustar00jrossjross00000000000000 qpid/agent/ManagementAgent.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/agent/ManagementAgent.h
Go to the documentation of this file.
00001 #ifndef _qpid_agent_ManagementAgent_
00002 #define _qpid_agent_ManagementAgent_
00003 
00004 //
00005 // Licensed to the Apache Software Foundation (ASF) under one
00006 // or more contributor license agreements.  See the NOTICE file
00007 // distributed with this work for additional information
00008 // regarding copyright ownership.  The ASF licenses this file
00009 // to you under the Apache License, Version 2.0 (the
00010 // "License"); you may not use this file except in compliance
00011 // with the License.  You may obtain a copy of the License at
00012 //
00013 //   http://www.apache.org/licenses/LICENSE-2.0
00014 //
00015 // Unless required by applicable law or agreed to in writing,
00016 // software distributed under the License is distributed on an
00017 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018 // KIND, either express or implied.  See the License for the
00019 // specific language governing permissions and limitations
00020 // under the License.
00021 //
00022 
00023 #include "qpid/agent/QmfAgentImportExport.h"
00024 #include "qpid/management/ManagementObject.h"
00025 #include "qpid/management/ManagementEvent.h"
00026 #include "qpid/management/Manageable.h"
00027 #include "qpid/management/ConnectionSettings.h"
00028 
00029 namespace qpid {
00030 namespace management {
00031 
00032 class Notifyable {
00033 public:
00034     virtual ~Notifyable() {}
00035     virtual void notify() = 0;
00036 };
00037 
00038 class ManagementAgent
00039 {
00040   public:
00041 
00042     class Singleton {
00043     public:
00044         QMF_AGENT_EXTERN Singleton(bool disableManagement = false);
00045         QMF_AGENT_EXTERN ~Singleton();
00046         QMF_AGENT_EXTERN static ManagementAgent* getInstance();
00047     };
00048 
00049     typedef enum {
00050     SEV_EMERG = 0,
00051     SEV_ALERT = 1,
00052     SEV_CRIT  = 2,
00053     SEV_ERROR = 3,
00054     SEV_WARN  = 4,
00055     SEV_NOTE  = 5,
00056     SEV_INFO  = 6,
00057     SEV_DEBUG = 7,
00058     SEV_DEFAULT = 8
00059     } severity_t;
00060 
00061     ManagementAgent() {}
00062     virtual ~ManagementAgent() {}
00063 
00064     virtual int getMaxThreads() = 0;
00065 
00066     // Set the name of the agent
00067     //
00068     //   vendor   - Vendor name or domain (i.e. "apache.org")
00069     //   product  - Product name (i.e. "qpid")
00070     //   instance - A unique identifier for this instance of the agent.
00071     //              If empty, the agent will create a GUID for the instance.
00072     //   Note: the ":" character is reserved - do no use it in the vendor or product name.
00073     //
00074     virtual void setName(const std::string& vendor,
00075                          const std::string& product,
00076                          const std::string& instance="") = 0;
00077 
00078     // Retrieve the name of the agent as assigned by setName()
00079     //
00080     virtual void getName(std::string& vendor,
00081                          std::string& product,
00082                          std::string& instance) = 0;
00083 
00084     // Obtain the fully qualified name of the agent
00085     //
00086     virtual const std::string& getAddress() = 0;
00087 
00088     // Connect to a management broker
00089     //
00090     //   brokerHost        - Hostname or IP address (dotted-quad) of broker.
00091     //
00092     //   brokerPort        - TCP port of broker.
00093     //
00094     //   intervalSeconds   - The interval (in seconds) that this agent shall use
00095     //                       between broadcast updates to the broker.
00096     //
00097     //   useExternalThread - If true, the thread of control used for callbacks
00098     //                       must be supplied by the user of the object (via the
00099     //                       pollCallbacks method).
00100     //
00101     //                       If false, callbacks shall be invoked on the management
00102     //                       agent's thread.  In this case, the callback implementations
00103     //                       MUST be thread safe.
00104     //
00105     //   storeFile         - File where this process has read and write access.  This
00106     //                       file shall be used to store persistent state.
00107     //
00108     virtual void init(const std::string& brokerHost = "localhost",
00109                       uint16_t brokerPort = 5672,
00110                       uint16_t intervalSeconds = 10,
00111                       bool useExternalThread = false,
00112                       const std::string& storeFile = "",
00113                       const std::string& uid = "",
00114                       const std::string& pwd = "",
00115                       const std::string& mech = "PLAIN",
00116                       const std::string& proto = "tcp") = 0;
00117 
00118     virtual void init(const management::ConnectionSettings& settings,
00119                       uint16_t intervalSeconds = 10,
00120                       bool useExternalThread = false,
00121                       const std::string& storeFile = "") = 0;
00122 
00123 
00124     // Register a schema with the management agent.  This is normally called by the
00125     // package initializer generated by the management code generator.
00126     //
00127     virtual void
00128     registerClass(const std::string& packageName,
00129                   const std::string& className,
00130                   uint8_t*    md5Sum,
00131                   management::ManagementObject::writeSchemaCall_t schemaCall) = 0;
00132 
00133     virtual void
00134     registerEvent(const std::string& packageName,
00135                   const std::string& eventName,
00136                   uint8_t*    md5Sum,
00137                   management::ManagementEvent::writeSchemaCall_t schemaCall) = 0;
00138 
00139     // Add a management object to the agent.  Once added, this object shall be visible
00140     // in the greater management context.
00141     //
00142     // Please note that ManagementObject instances are not explicitly deleted from
00143     // the management agent.  When the core object represented by a management object
00144     // is deleted, the "resourceDestroy" method on the management object must be called.
00145     // It will then be reclaimed in due course by the management agent.
00146     //
00147     // Once a ManagementObject instance is added to the agent, the agent then owns the
00148     // instance.  The caller MUST NOT free the resources of the instance at any time.
00149     // When it is no longer needed, invoke its "resourceDestroy" method and discard the
00150     // pointer.  This allows the management agent to report the deletion of the object
00151     // in an orderly way.
00152     //
00153     virtual ObjectId addObject(ManagementObject* objectPtr, uint64_t persistId = 0) = 0;
00154     virtual ObjectId addObject(ManagementObject* objectPtr,
00155                                const std::string& key,
00156                                bool persistent = true) = 0;
00157 
00158     //
00159     //
00160     virtual void raiseEvent(const ManagementEvent& event,
00161                             severity_t severity = SEV_DEFAULT) = 0;
00162 
00163     // If "useExternalThread" was set to true in init, this method must
00164     // be called to provide a thread for any pending method calls that have arrived.
00165     // The method calls for ManagementObject instances shall be invoked synchronously
00166     // during the execution of this method.
00167     //
00168     // callLimit may optionally be used to limit the number of callbacks invoked.
00169     // if 0, no limit is imposed.
00170     //
00171     // The return value is the number of callbacks that remain queued after this
00172     // call is complete.  It can be used to determine whether or not further calls
00173     // to pollCallbacks are necessary to clear the backlog.  If callLimit is zero,
00174     // the return value will also be zero.
00175     //
00176     virtual uint32_t pollCallbacks(uint32_t callLimit = 0) = 0;
00177 
00178     // In the "useExternalThread" scenario, there are three ways that an application can
00179     // use to be notified that there is work to do.  Of course the application may periodically
00180     // call pollCallbacks if it wishes, but this will cause long latencies in the responses
00181     // to method calls.
00182     //
00183     // The notification methods are:
00184     //
00185     //  1) Register a C-style callback by providing a pointer to a function
00186     //  2) Register a C++-style callback by providing an object of a class that is derived
00187     //     from Notifyable
00188     //  3) Call getSignalFd() to get a file descriptor that can be used in a select
00189     //     call.  The file descriptor shall become readable when the agent has work to
00190     //     do.  Note that this mechanism is specific to Posix-based operating environments.
00191     //     getSignalFd will probably not function correctly on Windows.
00192     //
00193     // If a callback is registered, the callback function will be called on the agent's
00194     // thread.  The callback function must perform no work other than to signal the application
00195     // thread to call pollCallbacks.
00196     //
00197     typedef void (*cb_t)(void*);
00198     virtual void setSignalCallback(cb_t callback, void* context) = 0;
00199     virtual void setSignalCallback(Notifyable& notifyable) = 0;
00200     virtual int getSignalFd() = 0;
00201 };
00202 
00203 }}
00204 
00205 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00628.html0000664000076400007640000001772711752725717017343 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Console Member List
This is the complete list of members for qmf::engine::Console, including all inherited members.
addConnection(BrokerProxy &broker, void *context)qmf::engine::Console
bindClass(const SchemaClassKey *key)qmf::engine::Console
bindClass(const char *packageName, const char *className)qmf::engine::Console
bindEvent(const SchemaClassKey *key)qmf::engine::Console
bindEvent(const char *packageName, const char *eventName)qmf::engine::Console
bindPackage(const char *packageName)qmf::engine::Console
classCount(const char *packageName) const qmf::engine::Console
Console(const ConsoleSettings &settings=ConsoleSettings())qmf::engine::Console
delConnection(BrokerProxy &broker)qmf::engine::Console
getClass(const char *packageName, uint32_t idx) const qmf::engine::Console
getClassKind(const SchemaClassKey *key) const qmf::engine::Console
getEvent(ConsoleEvent &event) const qmf::engine::Console
getEventClass(const SchemaClassKey *key) const qmf::engine::Console
getObjectClass(const SchemaClassKey *key) const qmf::engine::Console
getPackageName(uint32_t idx) const qmf::engine::Console
packageCount() const qmf::engine::Console
popEvent()qmf::engine::Console
~Console()qmf::engine::Console

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00883.html0000664000076400007640000001142511752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ConditionalScopedLock Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00674.html0000664000076400007640000001232611752725717017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::amqp_0_10::MapCodec Member List
This is the complete list of members for qpid::amqp_0_10::MapCodec, including all inherited members.
contentTypeqpid::amqp_0_10::MapCodec [static]
decode(const std::string &, ObjectType &)qpid::amqp_0_10::MapCodec [static]
encode(const ObjectType &, std::string &)qpid::amqp_0_10::MapCodec [static]
encodedSize(const ObjectType &)qpid::amqp_0_10::MapCodec [static]
ObjectType typedefqpid::amqp_0_10::MapCodec

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00895.html0000664000076400007640000001135011752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::types::Exception Member List
This is the complete list of members for qpid::types::Exception, including all inherited members.
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00763.html0000664000076400007640000002131611752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FloatValue Member List
This is the complete list of members for qpid::framing::FloatValue, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
FloatValue(float f)qpid::framing::FloatValue
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00424.html0000664000076400007640000001322111752725717017316 0ustar00jrossjross00000000000000 qpid/console/ObjectId.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/ObjectId.h File Reference
#include <iostream>
#include "qpid/console/ConsoleImportExport.h"
#include "qpid/sys/IntegerTypes.h"

Go to the source code of this file.

Classes

class  qpid::console::ObjectId

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  qpid::console

Functions

std::ostreamqpid::console::operator<< (std::ostream &o, const ObjectId &id)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00451_source.html0000664000076400007640000002447111752725717020707 0ustar00jrossjross00000000000000 qpid/Address.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Address.h
Go to the documentation of this file.
00001 #ifndef QPID_ADDRESS_H
00002 #define QPID_ADDRESS_H
00003 
00004 /*
00005  *
00006  * Copyright (c) 2006 The Apache Software Foundation
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *    http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  *
00020  */
00021 
00022 #include "qpid/sys/IntegerTypes.h"
00023 #include "qpid/CommonImportExport.h"
00024 #include <iosfwd>
00025 #include <string>
00026 
00027 namespace qpid {
00028 namespace client { struct ConnectionSettings; }
00029 
00030 
00034 struct Address  {
00035 public:
00036     static const std::string TCP; // Default TCP protocol tag.
00037     static const uint16_t AMQP_PORT=5672; // Default AMQP port.
00038     
00039     QPID_COMMON_INLINE_EXTERN explicit Address(
00040         const std::string& protocol_=std::string(),
00041         const std::string& host_=std::string(),
00042         uint16_t port_=0
00043     ) : protocol(protocol_), host(host_), port(port_) {}
00044 
00045     std::string protocol;
00046     std::string host;
00047     uint16_t port;
00048 };
00049 
00050 QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& os, const Address& addr);
00051 QPID_COMMON_EXTERN bool operator==(const Address& x, const Address& y);
00052 
00053 } // namespace qpid
00054 
00055 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/tab_s.png0000664000076400007640000000027511752725717017421 0ustar00jrossjross00000000000000‰PNG  IHDR$ÇÇ[„IDATxíÝë ‚P@áKg"%(IE|¡%¦I¡7iÚlmÐ" ÓäÛC¼ÞòÛ“\.dåOZ̤ÅBr‰/¿‰(ŸˆÎ#a6⟂ôŽ› 8q÷ØÇëÐaF-û°Et¿Aó4¯fçÖlŠ]±¶äJjJC¢%Š!¿<Å#üÀÄ«IEND®B`‚qpidc-0.16/docs/api/html/a00452_source.html0000664000076400007640000003070111752725717020701 0ustar00jrossjross00000000000000 qpid/messaging/Address.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Address.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_ADDRESS_H
00002 #define QPID_MESSAGING_ADDRESS_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/messaging/ImportExport.h"
00025 
00026 #include "qpid/messaging/exceptions.h"
00027 #include "qpid/types/Variant.h"
00028 
00029 #include <string>
00030 #include <ostream>
00031 
00032 namespace qpid {
00033 namespace messaging {
00034 
00035 class AddressImpl;
00036 
00122 class QPID_MESSAGING_CLASS_EXTERN Address
00123 {
00124   public:
00125     QPID_MESSAGING_EXTERN Address();
00126     QPID_MESSAGING_EXTERN Address(const std::string& address);
00127     QPID_MESSAGING_EXTERN Address(const std::string& name, const std::string& subject,
00128                                const qpid::types::Variant::Map& options, const std::string& type = "");
00129     QPID_MESSAGING_EXTERN Address(const Address& address);
00130     QPID_MESSAGING_EXTERN ~Address();
00131     QPID_MESSAGING_EXTERN Address& operator=(const Address&);
00132     QPID_MESSAGING_EXTERN const std::string& getName() const;
00133     QPID_MESSAGING_EXTERN void setName(const std::string&);
00134     QPID_MESSAGING_EXTERN const std::string& getSubject() const;
00135     QPID_MESSAGING_EXTERN void setSubject(const std::string&);
00136     QPID_MESSAGING_EXTERN const qpid::types::Variant::Map& getOptions() const;
00137     QPID_MESSAGING_EXTERN qpid::types::Variant::Map& getOptions();
00138     QPID_MESSAGING_EXTERN void setOptions(const qpid::types::Variant::Map&);
00139 
00140     QPID_MESSAGING_EXTERN std::string getType() const;
00149     QPID_MESSAGING_EXTERN void setType(const std::string&);
00150 
00151     QPID_MESSAGING_EXTERN std::string str() const;
00152     QPID_MESSAGING_EXTERN operator bool() const;
00153     QPID_MESSAGING_EXTERN bool operator !() const;
00154   private:
00155     AddressImpl* impl;
00156 };
00157 
00158 #ifndef SWIG
00159 QPID_MESSAGING_EXTERN std::ostream& operator<<(std::ostream& out, const Address& address);
00160 #endif
00161 
00162 }} // namespace qpid::messaging
00163 
00164 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00737.html0000664000076400007640000002447111752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::UuidValue Member List
This is the complete list of members for qpid::console::UuidValue, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::UuidValue [inline, virtual]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::UuidValue [inline, virtual]
Ptr typedefqpid::console::Value
str() const qpid::console::UuidValue [inline, virtual]
UuidValue(const framing::Uuid &v)qpid::console::UuidValue [inline]
UuidValue(framing::Buffer &buffer)qpid::console::UuidValue
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00152.html0000664000076400007640000007765511752725720017333 0ustar00jrossjross00000000000000 qpid::console::Int64Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Int64Value Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 Int64Value (int64_t v)
std::string str () const
bool isInt64 () const
int64_t asInt64 () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::Int64Value::Int64Value ( int64_t  v) [inline]

Definition at line 131 of file Value.h.


Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

int64_t qpid::console::Int64Value::asInt64 ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 134 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

bool qpid::console::Int64Value::isInt64 ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 133 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::Int64Value::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00456_source.html0000664000076400007640000002334211752725717020710 0ustar00jrossjross00000000000000 qpid/client/arg.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/arg.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_ARG_H
00002 #define QPID_CLIENT_ARG_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 #define BOOST_PARAMETER_MAX_ARITY 9
00031 #include <boost/parameter.hpp>
00032 
00033 namespace qpid {
00034 namespace client {
00035 namespace arg {
00036 
00037 BOOST_PARAMETER_KEYWORD(keyword_tags, sync)
00038 BOOST_PARAMETER_KEYWORD(keyword_tags, commandId)
00039 BOOST_PARAMETER_KEYWORD(keyword_tags, value)
00040 BOOST_PARAMETER_KEYWORD(keyword_tags, errorCode)
00041 BOOST_PARAMETER_KEYWORD(keyword_tags, classCode)
00042 BOOST_PARAMETER_KEYWORD(keyword_tags, commandCode)
00043 BOOST_PARAMETER_KEYWORD(keyword_tags, fieldIndex)
00044 BOOST_PARAMETER_KEYWORD(keyword_tags, description)
00045 BOOST_PARAMETER_KEYWORD(keyword_tags, errorInfo)
00046 BOOST_PARAMETER_KEYWORD(keyword_tags, destination)
00047 BOOST_PARAMETER_KEYWORD(keyword_tags, acceptMode)
00048 BOOST_PARAMETER_KEYWORD(keyword_tags, acquireMode)
00049 BOOST_PARAMETER_KEYWORD(keyword_tags, content)
00050 BOOST_PARAMETER_KEYWORD(keyword_tags, transfers)
00051 BOOST_PARAMETER_KEYWORD(keyword_tags, code)
00052 BOOST_PARAMETER_KEYWORD(keyword_tags, text)
00053 BOOST_PARAMETER_KEYWORD(keyword_tags, setRedelivered)
00054 BOOST_PARAMETER_KEYWORD(keyword_tags, resumeId)
00055 BOOST_PARAMETER_KEYWORD(keyword_tags, queue)
00056 BOOST_PARAMETER_KEYWORD(keyword_tags, exclusive)
00057 BOOST_PARAMETER_KEYWORD(keyword_tags, resumeTtl)
00058 BOOST_PARAMETER_KEYWORD(keyword_tags, arguments)
00059 BOOST_PARAMETER_KEYWORD(keyword_tags, flowMode)
00060 BOOST_PARAMETER_KEYWORD(keyword_tags, unit)
00061 BOOST_PARAMETER_KEYWORD(keyword_tags, xid)
00062 BOOST_PARAMETER_KEYWORD(keyword_tags, join)
00063 BOOST_PARAMETER_KEYWORD(keyword_tags, resume)
00064 BOOST_PARAMETER_KEYWORD(keyword_tags, fail)
00065 BOOST_PARAMETER_KEYWORD(keyword_tags, suspend)
00066 BOOST_PARAMETER_KEYWORD(keyword_tags, onePhase)
00067 BOOST_PARAMETER_KEYWORD(keyword_tags, timeout)
00068 BOOST_PARAMETER_KEYWORD(keyword_tags, exchange)
00069 BOOST_PARAMETER_KEYWORD(keyword_tags, type)
00070 BOOST_PARAMETER_KEYWORD(keyword_tags, alternateExchange)
00071 BOOST_PARAMETER_KEYWORD(keyword_tags, passive)
00072 BOOST_PARAMETER_KEYWORD(keyword_tags, durable)
00073 BOOST_PARAMETER_KEYWORD(keyword_tags, autoDelete)
00074 BOOST_PARAMETER_KEYWORD(keyword_tags, ifUnused)
00075 BOOST_PARAMETER_KEYWORD(keyword_tags, name)
00076 BOOST_PARAMETER_KEYWORD(keyword_tags, bindingKey)
00077 BOOST_PARAMETER_KEYWORD(keyword_tags, ifEmpty)
00078 
00079 }}} // namespace qpid::client::arg
00080 
00081 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00345.html0000664000076400007640000001304611752725720017317 0ustar00jrossjross00000000000000 std::string Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::string Class Reference

STL class. More...

Classes

class  const_iterator
 STL iterator class. More...
class  const_reverse_iterator
 STL iterator class. More...
class  iterator
 STL iterator class. More...
class  reverse_iterator
 STL iterator class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00198.html0000664000076400007640000011135311752725720017325 0ustar00jrossjross00000000000000 qpid::management::ManagementAgent Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ManagementAgent Class Reference

#include <qpid/agent/ManagementAgent.h>

List of all members.

Classes

class  Singleton

Public Types

enum  severity_t {
  SEV_EMERG = 0, SEV_ALERT = 1, SEV_CRIT = 2, SEV_ERROR = 3,
  SEV_WARN = 4, SEV_NOTE = 5, SEV_INFO = 6, SEV_DEBUG = 7,
  SEV_DEFAULT = 8
}
typedef void(* cb_t )(void *)

Public Member Functions

 ManagementAgent ()
virtual ~ManagementAgent ()
virtual int getMaxThreads ()=0
virtual void setName (const std::string &vendor, const std::string &product, const std::string &instance="")=0
virtual void getName (std::string &vendor, std::string &product, std::string &instance)=0
virtual const std::stringgetAddress ()=0
virtual void init (const std::string &brokerHost="localhost", uint16_t brokerPort=5672, uint16_t intervalSeconds=10, bool useExternalThread=false, const std::string &storeFile="", const std::string &uid="", const std::string &pwd="", const std::string &mech="PLAIN", const std::string &proto="tcp")=0
virtual void init (const management::ConnectionSettings &settings, uint16_t intervalSeconds=10, bool useExternalThread=false, const std::string &storeFile="")=0
virtual void registerClass (const std::string &packageName, const std::string &className, uint8_t *md5Sum, management::ManagementObject::writeSchemaCall_t schemaCall)=0
virtual void registerEvent (const std::string &packageName, const std::string &eventName, uint8_t *md5Sum, management::ManagementEvent::writeSchemaCall_t schemaCall)=0
virtual ObjectId addObject (ManagementObject *objectPtr, uint64_t persistId=0)=0
virtual ObjectId addObject (ManagementObject *objectPtr, const std::string &key, bool persistent=true)=0
virtual void raiseEvent (const ManagementEvent &event, severity_t severity=SEV_DEFAULT)=0
virtual uint32_t pollCallbacks (uint32_t callLimit=0)=0
virtual void setSignalCallback (cb_t callback, void *context)=0
virtual void setSignalCallback (Notifyable &notifyable)=0
virtual int getSignalFd ()=0

Member Typedef Documentation

typedef void(* qpid::management::ManagementAgent::cb_t)(void *)

Definition at line 197 of file ManagementAgent.h.


Member Enumeration Documentation

Enumerator:
SEV_EMERG 
SEV_ALERT 
SEV_CRIT 
SEV_ERROR 
SEV_WARN 
SEV_NOTE 
SEV_INFO 
SEV_DEBUG 
SEV_DEFAULT 

Definition at line 49 of file ManagementAgent.h.


Constructor & Destructor Documentation

qpid::management::ManagementAgent::ManagementAgent ( ) [inline]

Definition at line 61 of file ManagementAgent.h.

virtual qpid::management::ManagementAgent::~ManagementAgent ( ) [inline, virtual]

Definition at line 62 of file ManagementAgent.h.


Member Function Documentation

virtual ObjectId qpid::management::ManagementAgent::addObject ( ManagementObject objectPtr,
uint64_t  persistId = 0 
) [pure virtual]
virtual ObjectId qpid::management::ManagementAgent::addObject ( ManagementObject objectPtr,
const std::string key,
bool  persistent = true 
) [pure virtual]
virtual const std::string& qpid::management::ManagementAgent::getAddress ( ) [pure virtual]
virtual int qpid::management::ManagementAgent::getMaxThreads ( ) [pure virtual]
virtual void qpid::management::ManagementAgent::getName ( std::string vendor,
std::string product,
std::string instance 
) [pure virtual]
virtual int qpid::management::ManagementAgent::getSignalFd ( ) [pure virtual]
virtual void qpid::management::ManagementAgent::init ( const std::string brokerHost = "localhost",
uint16_t  brokerPort = 5672,
uint16_t  intervalSeconds = 10,
bool  useExternalThread = false,
const std::string storeFile = "",
const std::string uid = "",
const std::string pwd = "",
const std::string mech = "PLAIN",
const std::string proto = "tcp" 
) [pure virtual]
virtual void qpid::management::ManagementAgent::init ( const management::ConnectionSettings settings,
uint16_t  intervalSeconds = 10,
bool  useExternalThread = false,
const std::string storeFile = "" 
) [pure virtual]
virtual uint32_t qpid::management::ManagementAgent::pollCallbacks ( uint32_t  callLimit = 0) [pure virtual]
virtual void qpid::management::ManagementAgent::raiseEvent ( const ManagementEvent event,
severity_t  severity = SEV_DEFAULT 
) [pure virtual]
virtual void qpid::management::ManagementAgent::registerClass ( const std::string packageName,
const std::string className,
uint8_t md5Sum,
management::ManagementObject::writeSchemaCall_t  schemaCall 
) [pure virtual]
virtual void qpid::management::ManagementAgent::registerEvent ( const std::string packageName,
const std::string eventName,
uint8_t md5Sum,
management::ManagementEvent::writeSchemaCall_t  schemaCall 
) [pure virtual]
virtual void qpid::management::ManagementAgent::setName ( const std::string vendor,
const std::string product,
const std::string instance = "" 
) [pure virtual]
virtual void qpid::management::ManagementAgent::setSignalCallback ( cb_t  callback,
void *  context 
) [pure virtual]
virtual void qpid::management::ManagementAgent::setSignalCallback ( Notifyable notifyable) [pure virtual]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00556.html0000664000076400007640000002117611752725717017334 0ustar00jrossjross00000000000000 qpid/sys/windows/IntegerTypes.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/IntegerTypes.h File Reference
#include <stdint.h>

Go to the source code of this file.

Typedefs

typedef unsigned char uint8_t
typedef unsigned short uint16_t
typedef short int16_t
typedef unsigned int uint32_t
typedef int int32_t
typedef unsigned int uint

Typedef Documentation

typedef short int16_t

Definition at line 26 of file IntegerTypes.h.

typedef int int32_t

Definition at line 28 of file IntegerTypes.h.

typedef unsigned int uint

Definition at line 38 of file IntegerTypes.h.

typedef unsigned short uint16_t

Definition at line 25 of file IntegerTypes.h.

typedef unsigned int uint32_t

Definition at line 27 of file IntegerTypes.h.

typedef unsigned char uint8_t

Definition at line 24 of file IntegerTypes.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00694.html0000664000076400007640000001310011752725717017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::MessageReplayTracker::ReplayRecord Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00464_source.html0000664000076400007640000002632111752725717020707 0ustar00jrossjross00000000000000 qpid/client/FailoverListener.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FailoverListener.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_FAILOVERLISTENER_H
00002 #define QPID_CLIENT_FAILOVERLISTENER_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/client/ClientImportExport.h"
00026 #include "qpid/client/MessageListener.h"
00027 #include "qpid/client/Connection.h"
00028 #include "qpid/client/Session.h"
00029 #include "qpid/client/SubscriptionManager.h"
00030 #include "qpid/Url.h"
00031 #include "qpid/sys/Mutex.h"
00032 #include "qpid/sys/Runnable.h"
00033 #include "qpid/sys/Thread.h"
00034 #include <vector>
00035 
00036 namespace qpid {
00037 namespace client {
00038 
00039 
00051 class QPID_CLIENT_CLASS_EXTERN FailoverListener : private MessageListener, private qpid::sys::Runnable 
00052 {
00053   public:
00055     static QPID_CLIENT_EXTERN const std::string AMQ_FAILOVER;
00056 
00058     static QPID_CLIENT_EXTERN std::vector<Url> getKnownBrokers(const Message& m);
00059     
00061     QPID_CLIENT_EXTERN FailoverListener(Connection);
00062 
00067     QPID_CLIENT_EXTERN FailoverListener(Connection, bool useInitial);
00068 
00069     QPID_CLIENT_EXTERN ~FailoverListener();
00070 
00072     QPID_CLIENT_EXTERN std::vector<Url> getKnownBrokers() const;
00073     
00074   private:
00075     void received(Message& msg);
00076     void run();
00077     void init(bool);
00078     
00079     mutable sys::Mutex lock;
00080     Connection connection;
00081     Session session;
00082     SubscriptionManager subscriptions;
00083     sys::Thread thread;
00084     std::vector<Url> knownBrokers;
00085 };
00086 }} // namespace qpid::client
00087 
00088 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00609.html0000664000076400007640000001326111752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::IndexOutOfRange Member List
This is the complete list of members for qmf::IndexOutOfRange, including all inherited members.
detailqmf::QmfException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
IndexOutOfRange()qmf::IndexOutOfRange
QmfException(const std::string &msg)qmf::QmfException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~IndexOutOfRange()qmf::IndexOutOfRange [virtual]
~QmfException()qmf::QmfException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00115.html0000664000076400007640000003264211752725720017315 0ustar00jrossjross00000000000000 qpid::sys::ExceptionHolder Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ExceptionHolder Class Reference

Holder for exceptions. More...

#include <qpid/sys/ExceptionHolder.h>

List of all members.

Classes

struct  Wrapper

Public Member Functions

 ExceptionHolder ()
template<class Ex >
 ExceptionHolder (Ex *ex)
 Take ownership of ex.
template<class Ex >
ExceptionHolderoperator= (Ex *ex)
void raise () const
std::string what () const
bool empty () const
 operator bool () const
void reset ()

Detailed Description

Holder for exceptions.

Allows the thread that notices an error condition to create an exception and store it to be thrown by another thread.


Constructor & Destructor Documentation

qpid::sys::ExceptionHolder::ExceptionHolder ( ) [inline]

Definition at line 43 of file ExceptionHolder.h.

template<class Ex >
qpid::sys::ExceptionHolder::ExceptionHolder ( Ex *  ex) [inline]

Take ownership of ex.

Definition at line 47 of file ExceptionHolder.h.


Member Function Documentation

bool qpid::sys::ExceptionHolder::empty ( ) const [inline]

Definition at line 52 of file ExceptionHolder.h.

Referenced by operator bool().

qpid::sys::ExceptionHolder::operator bool ( ) const [inline]

Definition at line 53 of file ExceptionHolder.h.

References empty().

template<class Ex >
ExceptionHolder& qpid::sys::ExceptionHolder::operator= ( Ex *  ex) [inline]

Definition at line 48 of file ExceptionHolder.h.

void qpid::sys::ExceptionHolder::raise ( ) const [inline, virtual]

Implements qpid::sys::Raisable.

Definition at line 50 of file ExceptionHolder.h.

void qpid::sys::ExceptionHolder::reset ( ) [inline]

Definition at line 54 of file ExceptionHolder.h.

std::string qpid::sys::ExceptionHolder::what ( ) const [inline, virtual]

Implements qpid::sys::Raisable.

Definition at line 51 of file ExceptionHolder.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00645.html0000664000076400007640000001567011752725717017335 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaObjectClass Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00063.html0000664000076400007640000006021611752725717017323 0ustar00jrossjross00000000000000 qmf::engine::ConnectionSettings Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ConnectionSettings Class Reference

Settings for AMQP connections to the broker. More...

#include <qmf/engine/ConnectionSettings.h>

List of all members.

Public Member Functions

 ConnectionSettings ()
 Create a set of default connection settings.
 ConnectionSettings (const char *url)
 Create a set of connection settings by URL.
 ConnectionSettings (const ConnectionSettings &from)
 Copy Constructor.
 ~ConnectionSettings ()
 Destroy the connection settings object.
bool setAttr (const char *key, const Value &value)
 Set an attribute to control connection setup.
Value getAttr (const char *key) const
 Get the value of an attribute.
const char * getAttrString () const
 Get the attribute string (the portion of the URL following the '?') for the settings.
void transportTcp (uint16_t port=5672)
 Shortcuts for setting the transport for the connection.
void transportSsl (uint16_t port=5671)
void transportRdma (uint16_t port=5672)
void authAnonymous (const char *username=0)
 Shortcuts for setting authentication mechanisms.
void authPlain (const char *username=0, const char *password=0)
void authGssapi (const char *serviceName, uint32_t minSsf=0, uint32_t maxSsf=256)
void setRetry (int delayMin=1, int delayMax=128, int delayFactor=2)
 Shortcut for setting connection retry attributes.

Detailed Description

Settings for AMQP connections to the broker.


Constructor & Destructor Documentation

qmf::engine::ConnectionSettings::ConnectionSettings ( )

Create a set of default connection settings.

If no further attributes are set, the settings will cause a connection to be made to the default broker (on localhost or at a host/port supplied by service discovery) and authentication will be the best-available (GSSAPI/Kerberos, Anonymous, Plain with prompts for username and password).

qmf::engine::ConnectionSettings::ConnectionSettings ( const char *  url)

Create a set of connection settings by URL.

Parameters:
urlUniversal resource locator describing the broker address and additional attributes.

The URL is of the form: amqp[s]://host[:port][?key=value[&key=value]*]

For example: amqp://localhost amqp://broker?transport=rdma&authmech=GSSAPI&authservice=qpidd amqps://broker?authmech=PLAIN&authuser=guest&authpass=guest

qmf::engine::ConnectionSettings::ConnectionSettings ( const ConnectionSettings from)

Copy Constructor.

qmf::engine::ConnectionSettings::~ConnectionSettings ( )

Destroy the connection settings object.


Member Function Documentation

void qmf::engine::ConnectionSettings::authAnonymous ( const char *  username = 0)

Shortcuts for setting authentication mechanisms.

Parameters:
usernameNull-terminated authentication user name.
passwordNull-terminated authentication password.
serviceNameNull-terminated GSSAPI service name (Kerberos service principal)
minSsfMinimum security factor for connections. 0 = encryption not required.
maxSsfMaximum security factor for connections. 0 = encryption not permitted.
void qmf::engine::ConnectionSettings::authGssapi ( const char *  serviceName,
uint32_t  minSsf = 0,
uint32_t  maxSsf = 256 
)
void qmf::engine::ConnectionSettings::authPlain ( const char *  username = 0,
const char *  password = 0 
)
Value qmf::engine::ConnectionSettings::getAttr ( const char *  key) const

Get the value of an attribute.

Parameters:
keyA null-terminated attribute name.
Returns:
The value associated with the attribute name.
const char* qmf::engine::ConnectionSettings::getAttrString ( ) const

Get the attribute string (the portion of the URL following the '?') for the settings.

Returns:
A pointer to the attribute string. If the content of this string needs to be available beyond the scope of the calling function, it should be copied. The returned pointer may become invalid if the set of attributes is changed.
bool qmf::engine::ConnectionSettings::setAttr ( const char *  key,
const Value value 
)

Set an attribute to control connection setup.

Parameters:
keyA null-terminated string that is an attribute name.
valueReference to a value to be stored as the attribute. The type of the value is specific to the key.
Returns:
True if success, False if invalid attribute
void qmf::engine::ConnectionSettings::setRetry ( int  delayMin = 1,
int  delayMax = 128,
int  delayFactor = 2 
)

Shortcut for setting connection retry attributes.

Parameters:
delayMinMinimum delay (in seconds) between connection attempts.
delaxMaxMaximum delay (in seconds) between connection attempts.
delayFactorFactor to multiply the delay by between failed connection attempts.
void qmf::engine::ConnectionSettings::transportRdma ( uint16_t  port = 5672)
void qmf::engine::ConnectionSettings::transportSsl ( uint16_t  port = 5671)
void qmf::engine::ConnectionSettings::transportTcp ( uint16_t  port = 5672)

Shortcuts for setting the transport for the connection.

Parameters:
portThe port value for the connection address.

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x69.html0000664000076400007640000004751011752725717021312 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- i -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00649.html0000664000076400007640000001230011752725717017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Address Member List
This is the complete list of members for qpid::Address, including all inherited members.
Address(const std::string &protocol_=std::string(), const std::string &host_=std::string(), uint16_t port_=0)qpid::Address [inline, explicit]
AMQP_PORTqpid::Address [static]
hostqpid::Address
portqpid::Address
protocolqpid::Address
TCPqpid::Address [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00467.html0000664000076400007640000001225211752725717017330 0ustar00jrossjross00000000000000 qpid/client/Future.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Future.h File Reference
#include <boost/bind.hpp>
#include <boost/shared_ptr.hpp>
#include "qpid/Exception.h"
#include "qpid/framing/SequenceNumber.h"
#include "qpid/client/FutureCompletion.h"
#include "qpid/client/FutureResult.h"
#include "qpid/client/ClientImportExport.h"

Go to the source code of this file.

Classes

class  qpid::client::Future

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00859.html0000664000076400007640000001410711752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::SendError Member List
This is the complete list of members for qpid::messaging::SendError, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
LinkError(const std::string &)qpid::messaging::LinkError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
SenderError(const std::string &)qpid::messaging::SenderError
SendError(const std::string &)qpid::messaging::SendError
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00671.html0000664000076400007640000001240411752725717017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::SessionId Member List
This is the complete list of members for qpid::SessionId, including all inherited members.
getName() const qpid::SessionId [inline]
getUserId() const qpid::SessionId [inline]
operator<(const SessionId &) const qpid::SessionId
operator==(const SessionId &id) const qpid::SessionId
SessionId(const std::string &userId=std::string(), const std::string &name=std::string())qpid::SessionId
str() const qpid::SessionId

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00497.html0000664000076400007640000001360111752725717017332 0ustar00jrossjross00000000000000 qpid/management/Buffer.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/Buffer.h File Reference
#include "qpid/CommonImportExport.h"
#include "qpid/types/Exception.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

struct  qpid::management::OutOfBounds
class  qpid::management::Buffer
 This class is a wrapper around qpid::framing::Buffer that does not include any dependencies from boost or from qpid::framing. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.


namespace  qpid::management

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00686.html0000664000076400007640000001260111752725717017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Future Member List
This is the complete list of members for qpid::client::Future, including all inherited members.
Future()qpid::client::Future [inline]
Future(const framing::SequenceNumber &id)qpid::client::Future [inline]
getResult(SessionImpl &session)qpid::client::Future [inline]
isComplete(SessionImpl &session)qpid::client::Future
setFutureResult(boost::shared_ptr< FutureResult > r)qpid::client::Future
wait(SessionImpl &session)qpid::client::Future

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00698.html0000664000076400007640000002637511752725717017351 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Subscription Member List
This is the complete list of members for qpid::client::Subscription, including all inherited members.
accept(const SequenceSet &messageIds)qpid::client::Subscription
accept(const Message &m)qpid::client::Subscription [inline]
acquire(const SequenceSet &messageIds)qpid::client::Subscription
acquire(const Message &m)qpid::client::Subscription [inline]
cancel()qpid::client::Subscription
getName() const qpid::client::Subscription
getQueue() const qpid::client::Subscription
getSession() const qpid::client::Subscription
getSettings() const qpid::client::Subscription
getSubscriptionManager()qpid::client::Subscription
getUnaccepted() const qpid::client::Subscription
getUnacquired() const qpid::client::Subscription
grantByteCredit(uint32_t)qpid::client::Subscription
grantMessageCredit(uint32_t)qpid::client::Subscription
Handle()qpid::client::Handle< SubscriptionImpl > [inline, protected]
Handle(const Handle &)qpid::client::Handle< SubscriptionImpl > [protected]
Impl typedefqpid::client::Handle< SubscriptionImpl > [protected]
implqpid::client::Handle< SubscriptionImpl > [protected]
isNull() const qpid::client::Handle< SubscriptionImpl > [inline]
isValid() const qpid::client::Handle< SubscriptionImpl > [inline]
operator bool() const qpid::client::Handle< SubscriptionImpl > [inline]
operator!() const qpid::client::Handle< SubscriptionImpl > [inline]
operator=(const Subscription &)qpid::client::Subscription
Handle< SubscriptionImpl >::operator=(const Handle &)qpid::client::Handle< SubscriptionImpl > [protected]
release(const SequenceSet &messageIds)qpid::client::Subscription
release(const Message &m)qpid::client::Subscription [inline]
setAutoAck(unsigned int n)qpid::client::Subscription
setFlowControl(const FlowControl &)qpid::client::Subscription
Subscription(SubscriptionImpl *=0)qpid::client::Subscription
Subscription(const Subscription &)qpid::client::Subscription
swap(Handle< T > &h)qpid::client::Handle< SubscriptionImpl > [inline]
~Subscription()qpid::client::Subscription

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00379.html0000664000076400007640000014526611752725717017346 0ustar00jrossjross00000000000000 qmf::engine::Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Value Class Reference

#include <qmf/engine/Value.h>

List of all members.

Public Member Functions

 Value (const Value &from)
 Value (Typecode t, Typecode arrayType=TYPE_UINT8)
 ~Value ()
Typecode getType () const
bool isNull () const
void setNull ()
bool isObjectId () const
const ObjectIdasObjectId () const
void setObjectId (const ObjectId &oid)
bool isUint () const
uint32_t asUint () const
void setUint (uint32_t val)
bool isInt () const
int32_t asInt () const
void setInt (int32_t val)
bool isUint64 () const
uint64_t asUint64 () const
void setUint64 (uint64_t val)
bool isInt64 () const
int64_t asInt64 () const
void setInt64 (int64_t val)
bool isString () const
const char * asString () const
void setString (const char *val)
bool isBool () const
bool asBool () const
void setBool (bool val)
bool isFloat () const
float asFloat () const
void setFloat (float val)
bool isDouble () const
double asDouble () const
void setDouble (double val)
bool isUuid () const
const uint8_tasUuid () const
void setUuid (const uint8_t *val)
bool isObject () const
const ObjectasObject () const
void setObject (Object *val)
bool isMap () const
bool keyInMap (const char *key) const
ValuebyKey (const char *key)
const ValuebyKey (const char *key) const
void deleteKey (const char *key)
void insert (const char *key, Value *val)
uint32_t keyCount () const
const char * key (uint32_t idx) const
bool isList () const
uint32_t listItemCount () const
ValuelistItem (uint32_t idx)
void appendToList (Value *val)
void deleteListItem (uint32_t idx)
bool isArray () const
Typecode arrayType () const
uint32_t arrayItemCount () const
ValuearrayItem (uint32_t idx)
void appendToArray (Value *val)
void deleteArrayItem (uint32_t idx)

Constructor & Destructor Documentation

qmf::engine::Value::Value ( const Value from)
qmf::engine::Value::Value ( Typecode  t,
Typecode  arrayType = TYPE_UINT8 
)
qmf::engine::Value::~Value ( )

Member Function Documentation

void qmf::engine::Value::appendToArray ( Value val)
void qmf::engine::Value::appendToList ( Value val)
Value* qmf::engine::Value::arrayItem ( uint32_t  idx)
uint32_t qmf::engine::Value::arrayItemCount ( ) const
Typecode qmf::engine::Value::arrayType ( ) const
bool qmf::engine::Value::asBool ( ) const
double qmf::engine::Value::asDouble ( ) const
float qmf::engine::Value::asFloat ( ) const
int32_t qmf::engine::Value::asInt ( ) const
int64_t qmf::engine::Value::asInt64 ( ) const
const Object* qmf::engine::Value::asObject ( ) const
const ObjectId& qmf::engine::Value::asObjectId ( ) const
const char* qmf::engine::Value::asString ( ) const
uint32_t qmf::engine::Value::asUint ( ) const
uint64_t qmf::engine::Value::asUint64 ( ) const
const uint8_t* qmf::engine::Value::asUuid ( ) const
Value* qmf::engine::Value::byKey ( const char *  key)
const Value* qmf::engine::Value::byKey ( const char *  key) const
void qmf::engine::Value::deleteArrayItem ( uint32_t  idx)
void qmf::engine::Value::deleteKey ( const char *  key)
void qmf::engine::Value::deleteListItem ( uint32_t  idx)
Typecode qmf::engine::Value::getType ( ) const
void qmf::engine::Value::insert ( const char *  key,
Value val 
)
bool qmf::engine::Value::isArray ( ) const
bool qmf::engine::Value::isBool ( ) const
bool qmf::engine::Value::isDouble ( ) const
bool qmf::engine::Value::isFloat ( ) const
bool qmf::engine::Value::isInt ( ) const
bool qmf::engine::Value::isInt64 ( ) const
bool qmf::engine::Value::isList ( ) const
bool qmf::engine::Value::isMap ( ) const
bool qmf::engine::Value::isNull ( ) const
bool qmf::engine::Value::isObject ( ) const
bool qmf::engine::Value::isObjectId ( ) const
bool qmf::engine::Value::isString ( ) const
bool qmf::engine::Value::isUint ( ) const
bool qmf::engine::Value::isUint64 ( ) const
bool qmf::engine::Value::isUuid ( ) const
const char* qmf::engine::Value::key ( uint32_t  idx) const
uint32_t qmf::engine::Value::keyCount ( ) const
bool qmf::engine::Value::keyInMap ( const char *  key) const
Value* qmf::engine::Value::listItem ( uint32_t  idx)
uint32_t qmf::engine::Value::listItemCount ( ) const
void qmf::engine::Value::setBool ( bool  val)
void qmf::engine::Value::setDouble ( double  val)
void qmf::engine::Value::setFloat ( float  val)
void qmf::engine::Value::setInt ( int32_t  val)
void qmf::engine::Value::setInt64 ( int64_t  val)
void qmf::engine::Value::setNull ( )
void qmf::engine::Value::setObject ( Object val)
void qmf::engine::Value::setObjectId ( const ObjectId oid)
void qmf::engine::Value::setString ( const char *  val)
void qmf::engine::Value::setUint ( uint32_t  val)
void qmf::engine::Value::setUint64 ( uint64_t  val)
void qmf::engine::Value::setUuid ( const uint8_t val)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x65.html0000664000076400007640000002517011752725720023604 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- e -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00768.html0000664000076400007640000002135211752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Unsigned64Value Member List
This is the complete list of members for qpid::framing::Unsigned64Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
Unsigned64Value(uint64_t v)qpid::framing::Unsigned64Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00549.html0000664000076400007640000001221011752725717017323 0ustar00jrossjross00000000000000 qpid/SessionId.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/SessionId.h File Reference
#include <boost/operators.hpp>
#include <string>
#include <qpid/CommonImportExport.h>

Go to the source code of this file.

Classes

class  qpid::SessionId
 Identifier for a session. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


Functions

std::ostreamqpid::operator<< (std::ostream &, const SessionId &)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00355.html0000664000076400007640000003000011752725720017305 0ustar00jrossjross00000000000000 qpid::sys::Thread Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Thread Class Reference

#include <qpid/sys/Thread.h>

List of all members.

Public Member Functions

 Thread ()
 Thread (qpid::sys::Runnable *)
 Thread (qpid::sys::Runnable &)
 operator bool ()
bool operator== (const Thread &) const
bool operator!= (const Thread &) const
void join ()

Static Public Member Functions

static Thread current ()
static unsigned long logId ()
 ID of current thread for logging.

Constructor & Destructor Documentation

qpid::sys::Thread::Thread ( )
qpid::sys::Thread::Thread ( qpid::sys::Runnable ) [explicit]
qpid::sys::Thread::Thread ( qpid::sys::Runnable ) [explicit]

Member Function Documentation

static Thread qpid::sys::Thread::current ( ) [static]
void qpid::sys::Thread::join ( )
static unsigned long qpid::sys::Thread::logId ( ) [static]

ID of current thread for logging.

Workaround for broken Thread::current() in APR

qpid::sys::Thread::operator bool ( )
bool qpid::sys::Thread::operator!= ( const Thread ) const
bool qpid::sys::Thread::operator== ( const Thread ) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00871.html0000664000076400007640000002360011752725720017320 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Receiver Member List
This is the complete list of members for qpid::messaging::Receiver, including all inherited members.
close()qpid::messaging::Receiver
fetch(Message &message, Duration timeout=Duration::FOREVER)qpid::messaging::Receiver
fetch(Duration timeout=Duration::FOREVER)qpid::messaging::Receiver
get(Message &message, Duration timeout=Duration::FOREVER)qpid::messaging::Receiver
get(Duration timeout=Duration::FOREVER)qpid::messaging::Receiver
getAvailable()qpid::messaging::Receiver
getCapacity()qpid::messaging::Receiver
getName() const qpid::messaging::Receiver
getSession() const qpid::messaging::Receiver
getUnsettled()qpid::messaging::Receiver
Handle()qpid::messaging::Handle< ReceiverImpl > [inline, protected]
Handle(const Handle &)qpid::messaging::Handle< ReceiverImpl > [protected]
Impl typedefqpid::messaging::Handle< ReceiverImpl > [protected]
implqpid::messaging::Handle< ReceiverImpl > [protected]
isClosed() const qpid::messaging::Receiver
isNull() const qpid::messaging::Handle< ReceiverImpl > [inline]
isValid() const qpid::messaging::Handle< ReceiverImpl > [inline]
operator bool() const qpid::messaging::Handle< ReceiverImpl > [inline]
operator!() const qpid::messaging::Handle< ReceiverImpl > [inline]
operator=(const Receiver &)qpid::messaging::Receiver
Handle< ReceiverImpl >::operator=(const Handle &)qpid::messaging::Handle< ReceiverImpl > [protected]
Receiver(ReceiverImpl *impl=0)qpid::messaging::Receiver
Receiver(const Receiver &)qpid::messaging::Receiver
setCapacity(uint32_t)qpid::messaging::Receiver
swap(Handle< T > &h)qpid::messaging::Handle< ReceiverImpl > [inline]
~Receiver()qpid::messaging::Receiver

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00093.html0000664000076400007640000004034611752725720017322 0ustar00jrossjross00000000000000 qpid::framing::FieldValue::Data Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FieldValue::Data Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

virtual ~Data ()
virtual uint32_t encodedSize () const =0
virtual void encode (Buffer &buffer)=0
virtual void decode (Buffer &buffer)=0
virtual bool operator== (const Data &) const =0
virtual bool convertsToInt () const
virtual bool convertsToString () const
virtual int64_t getInt () const
virtual std::string getString () const
virtual void print (std::ostream &out) const =0

Constructor & Destructor Documentation

virtual qpid::framing::FieldValue::Data::~Data ( ) [inline, virtual]

Definition at line 69 of file FieldValue.h.


Member Function Documentation

virtual bool qpid::framing::FieldValue::Data::convertsToInt ( ) const [inline, virtual]

Reimplemented in qpid::framing::FixedWidthValue.

Definition at line 75 of file FieldValue.h.

virtual bool qpid::framing::FieldValue::Data::convertsToString ( ) const [inline, virtual]

Reimplemented in qpid::framing::VariableWidthValue.

Definition at line 76 of file FieldValue.h.

virtual void qpid::framing::FieldValue::Data::decode ( Buffer buffer) [pure virtual]
virtual void qpid::framing::FieldValue::Data::encode ( Buffer buffer) [pure virtual]
virtual uint32_t qpid::framing::FieldValue::Data::encodedSize ( ) const [pure virtual]
virtual int64_t qpid::framing::FieldValue::Data::getInt ( ) const [inline, virtual]

Reimplemented in qpid::framing::FixedWidthValue.

Definition at line 77 of file FieldValue.h.

virtual std::string qpid::framing::FieldValue::Data::getString ( ) const [inline, virtual]

Reimplemented in qpid::framing::VariableWidthValue.

Definition at line 78 of file FieldValue.h.

virtual bool qpid::framing::FieldValue::Data::operator== ( const Data ) const [pure virtual]
virtual void qpid::framing::FieldValue::Data::print ( std::ostream out) const [pure virtual]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00277.html0000664000076400007640000006535711752725717017345 0ustar00jrossjross00000000000000 qmf::engine::ResilientConnection Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ResilientConnection Class Reference

ResilientConnection represents a Qpid connection that is resilient. More...

#include <qmf/engine/ResilientConnection.h>

List of all members.

Public Member Functions

 ResilientConnection (const ConnectionSettings &settings)
 Create a new resilient connection.
 ~ResilientConnection ()
bool isConnected () const
 Get the connected status of the resilient connection.
bool getEvent (ResilientConnectionEvent &event)
 Get the next event (if present) from the connection.
void popEvent ()
 Discard the event on the front of the queue.
bool createSession (const char *name, void *sessionContext, SessionHandle &handle)
 Create a new AMQP session.
void destroySession (SessionHandle handle)
 Destroy a created session.
void sendMessage (SessionHandle handle, Message &message)
 Send a message into the AMQP broker via a session.
void declareQueue (SessionHandle handle, char *queue)
 Declare an exclusive, auto-delete queue for a session.
void deleteQueue (SessionHandle handle, char *queue)
 Delete a queue.
void bind (SessionHandle handle, char *exchange, char *queue, char *key)
 Bind a queue to an exchange.
void unbind (SessionHandle handle, char *exchange, char *queue, char *key)
 Remove a binding.
void setNotifyFd (int fd)
 Establish a file descriptor for event notification.
void notify ()
 Send a byte into the notify file descriptor.

Detailed Description

ResilientConnection represents a Qpid connection that is resilient.

Upon creation, ResilientConnection attempts to establish a connection to the messaging broker. If it fails, it will continue to retry at an interval that increases over time (to a maximum interval). If an extablished connection is dropped, a reconnect will be attempted.


Constructor & Destructor Documentation

qmf::engine::ResilientConnection::ResilientConnection ( const ConnectionSettings settings)

Create a new resilient connection.

Parameters:
settingsSettings that define how the connection is to be made.
delayMinMinimum delay (in seconds) between retries.
delayMaxMaximum delay (in seconds) between retries.
delayFactorFactor to multiply retry delay by after each failure.
qmf::engine::ResilientConnection::~ResilientConnection ( )

Member Function Documentation

void qmf::engine::ResilientConnection::bind ( SessionHandle  handle,
char *  exchange,
char *  queue,
char *  key 
)

Bind a queue to an exchange.

Parameters:
handleThe session handle of the session to use for binding.
exchangeThe name of the exchange for binding.
queueThe name of the queue for binding.
keyThe binding key.
bool qmf::engine::ResilientConnection::createSession ( const char *  name,
void *  sessionContext,
SessionHandle handle 
)

Create a new AMQP session.

Parameters:
nameUnique name for the session.
sessionContextOptional user-context value that will be provided in events pertaining to this session.
handleOutput handle to be stored and used in subsequent calls pertaining to this session.
Returns:
true iff the session was successfully created.
void qmf::engine::ResilientConnection::declareQueue ( SessionHandle  handle,
char *  queue 
)

Declare an exclusive, auto-delete queue for a session.

Parameters:
handleThe session handle for the owner of the queue.
queueThe name of the queue.
void qmf::engine::ResilientConnection::deleteQueue ( SessionHandle  handle,
char *  queue 
)

Delete a queue.

Parameters:
handleThe session handle for the owner of the queue.
queueThe name of the queue.
void qmf::engine::ResilientConnection::destroySession ( SessionHandle  handle)

Destroy a created session.

Parameters:
handleSessionHandle returned by createSession.
bool qmf::engine::ResilientConnection::getEvent ( ResilientConnectionEvent event)

Get the next event (if present) from the connection.

Parameters:
eventReturned event if one is available.
Returns:
true if event is valid, false if there are no more events to handle.
bool qmf::engine::ResilientConnection::isConnected ( ) const

Get the connected status of the resilient connection.

Returns:
true iff the connection is established.
void qmf::engine::ResilientConnection::notify ( )

Send a byte into the notify file descriptor.

This can be used to wake up the event processing portion of the engine from either the wrapped implementation or the engine itself.

void qmf::engine::ResilientConnection::popEvent ( )

Discard the event on the front of the queue.

This should be invoked after processing the event from getEvent.

void qmf::engine::ResilientConnection::sendMessage ( SessionHandle  handle,
Message message 
)

Send a message into the AMQP broker via a session.

Parameters:
handleThe session handle of the session to transmit through.
messageThe QMF message to transmit.
void qmf::engine::ResilientConnection::setNotifyFd ( int  fd)

Establish a file descriptor for event notification.

Parameters:
fdA file descriptor into which the connection shall write a character each time an event is enqueued. This fd may be in a pair, the other fd of which is used in a select loop to control execution.
void qmf::engine::ResilientConnection::unbind ( SessionHandle  handle,
char *  exchange,
char *  queue,
char *  key 
)

Remove a binding.

Parameters:
handleThe session handle of the session to use for un-binding.
exchangeThe name of the exchange.
queueThe name of the queue.
keyThe binding key.

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00441.html0000664000076400007640000002020511752725717017315 0ustar00jrossjross00000000000000 qpid/ImportExport.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/ImportExport.h File Reference

Go to the source code of this file.

Defines

#define QPID_EXPORT
#define QPID_IMPORT
#define QPID_CLASS_EXPORT
#define QPID_CLASS_IMPORT
#define QPID_INLINE_EXPORT
#define QPID_INLINE_IMPORT

Define Documentation

#define QPID_CLASS_EXPORT

Definition at line 65 of file ImportExport.h.

#define QPID_CLASS_IMPORT

Definition at line 66 of file ImportExport.h.

#define QPID_EXPORT

Definition at line 63 of file ImportExport.h.

#define QPID_IMPORT

Definition at line 64 of file ImportExport.h.

#define QPID_INLINE_EXPORT

Definition at line 67 of file ImportExport.h.

#define QPID_INLINE_IMPORT

Definition at line 68 of file ImportExport.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00054.html0000664000076400007640000004453511752725717017331 0ustar00jrossjross00000000000000 qpid::client::Completion Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Completion Class Reference

Asynchronous commands that do not return a result will return a Completion. More...

#include <qpid/client/Completion.h>

List of all members.

Public Member Functions

 Completion (CompletionImpl *=0)
 Completion (const Completion &)
 ~Completion ()
Completionoperator= (const Completion &)
void wait ()
 Wait for the asynchronous command that returned this Completion to complete.
bool isComplete ()
QPID_CLIENT_INLINE_EXTERN bool isValid () const
QPID_CLIENT_INLINE_EXTERN bool isNull () const
QPID_CLIENT_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_CLIENT_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Member Functions

std::string getResult ()

Protected Attributes

Impl * impl

Detailed Description

Asynchronous commands that do not return a result will return a Completion.

You can use the completion to wait for that specific command to complete.

See also:
TypedResult

Constructor & Destructor Documentation

qpid::client::Completion::Completion ( CompletionImpl *  = 0)
qpid::client::Completion::Completion ( const Completion )
qpid::client::Completion::~Completion ( )

Member Function Documentation

std::string qpid::client::Completion::getResult ( ) [protected]
bool qpid::client::Completion::isComplete ( )
QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN qpid::client::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

Completion& qpid::client::Completion::operator= ( const Completion )
void qpid::client::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.

void qpid::client::Completion::wait ( )

Wait for the asynchronous command that returned this Completion to complete.

Exceptions:
Ifthe command returns an error.

Member Data Documentation

Impl* qpid::client::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x70.html0000664000076400007640000003773011752725717021305 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- p -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00448.html0000664000076400007640000002222011752725717017323 0ustar00jrossjross00000000000000 qmf/SchemaTypes.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/SchemaTypes.h File Reference

Go to the source code of this file.

Namespaces

namespace  qmf

Variables

const int qmf::SCHEMA_TYPE_DATA = 1
const int qmf::SCHEMA_TYPE_EVENT = 2
const int qmf::SCHEMA_DATA_VOID = 1
const int qmf::SCHEMA_DATA_BOOL = 2
const int qmf::SCHEMA_DATA_INT = 3
const int qmf::SCHEMA_DATA_FLOAT = 4
const int qmf::SCHEMA_DATA_STRING = 5
const int qmf::SCHEMA_DATA_MAP = 6
const int qmf::SCHEMA_DATA_LIST = 7
const int qmf::SCHEMA_DATA_UUID = 8
const int qmf::ACCESS_READ_CREATE = 1
const int qmf::ACCESS_READ_WRITE = 2
const int qmf::ACCESS_READ_ONLY = 3
const int qmf::DIR_IN = 1
const int qmf::DIR_OUT = 2
const int qmf::DIR_IN_OUT = 3
const int qmf::SEV_EMERG = 0
const int qmf::SEV_ALERT = 1
const int qmf::SEV_CRIT = 2
const int qmf::SEV_ERROR = 3
const int qmf::SEV_WARN = 4
const int qmf::SEV_NOTICE = 5
const int qmf::SEV_INFORM = 6
const int qmf::SEV_DEBUG = 7

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00442.html0000664000076400007640000001457311752725717017331 0ustar00jrossjross00000000000000 qpid/messaging/ImportExport.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/ImportExport.h File Reference

Go to the source code of this file.

Defines

#define QPID_MESSAGING_EXTERN   QPID_IMPORT
#define QPID_MESSAGING_CLASS_EXTERN   QPID_CLASS_IMPORT
#define QPID_MESSAGING_INLINE_EXTERN   QPID_INLINE_IMPORT

Define Documentation

#define QPID_MESSAGING_CLASS_EXTERN   QPID_CLASS_IMPORT

Definition at line 31 of file ImportExport.h.

#define QPID_MESSAGING_EXTERN   QPID_IMPORT

Definition at line 30 of file ImportExport.h.

#define QPID_MESSAGING_INLINE_EXTERN   QPID_INLINE_IMPORT

Definition at line 32 of file ImportExport.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00635.html0000664000076400007640000001271311752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::QueryExpression Member List
This is the complete list of members for qmf::engine::QueryExpression, including all inherited members.
evaluate(const Object *object) const qmf::engine::QueryExpression [virtual]
implqmf::engine::QueryExpression
QueryExpression(ExprOper oper, const QueryOperand *operand1, const QueryOperand *operand2)qmf::engine::QueryExpression
QueryExpression(QueryExpressionImpl *impl)qmf::engine::QueryExpression
~QueryExpression()qmf::engine::QueryExpression [virtual]
~QueryOperand()qmf::engine::QueryOperand [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00396.html0000664000076400007640000001026011752725720017320 0ustar00jrossjross00000000000000 std::wostringstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::wostringstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00244.html0000664000076400007640000001025111752725720017310 0ustar00jrossjross00000000000000 std::ostringstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::ostringstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x70.html0000664000076400007640000001574711752725717022344 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00270.html0000664000076400007640000001357611752725717017332 0ustar00jrossjross00000000000000 qpid::InlineAllocator::rebind Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineAllocator::rebind Struct Reference

#include <qpid/InlineAllocator.h>

List of all members.

Public Types

typedef InlineRebind< T1,
value_type, BaseAllocator, Max >
::other 
other

Member Typedef Documentation

Definition at line 70 of file InlineAllocator.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00339.html0000664000076400007640000001020311752725720017312 0ustar00jrossjross00000000000000 std::stack Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::stack Class Reference

STL class. More...

List of all members.


Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00220.html0000664000076400007640000004762111752725720017315 0ustar00jrossjross00000000000000 qpid::sys::Mutex Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Mutex Class Reference

Mutex lock. More...

#include <qpid/sys/posix/Mutex.h>

List of all members.

Public Types

typedef
::qpid::sys::ScopedLock< Mutex
ScopedLock
typedef
::qpid::sys::ScopedUnlock
< Mutex
ScopedUnlock
typedef
::qpid::sys::ScopedLock< Mutex
ScopedLock
typedef
::qpid::sys::ScopedUnlock
< Mutex
ScopedUnlock

Public Member Functions

 Mutex ()
 ~Mutex ()
void lock ()
void unlock ()
bool trylock ()
 Mutex ()
 ~Mutex ()
void lock ()
void unlock ()
bool trylock ()

Protected Attributes

pthread_mutex_t mutex
boost::recursive_mutex mutex

Detailed Description

Mutex lock.

Definition at line 43 of file Mutex.h.


Member Typedef Documentation

Definition at line 40 of file Mutex.h.

Definition at line 47 of file Mutex.h.

Definition at line 41 of file Mutex.h.

Definition at line 48 of file Mutex.h.


Constructor & Destructor Documentation

qpid::sys::Mutex::Mutex ( ) [inline]

Definition at line 107 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and mutex.

qpid::sys::Mutex::~Mutex ( ) [inline]

Definition at line 111 of file Mutex.h.

References QPID_POSIX_ABORT_IF, and mutex.

qpid::sys::Mutex::Mutex ( ) [inline]
qpid::sys::Mutex::~Mutex ( ) [inline]

Member Function Documentation

void qpid::sys::Mutex::lock ( ) [inline]

Definition at line 115 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and mutex.

void qpid::sys::Mutex::lock ( ) [inline]
bool qpid::sys::Mutex::trylock ( ) [inline]

Definition at line 123 of file Mutex.h.

References mutex.

bool qpid::sys::Mutex::trylock ( ) [inline]
void qpid::sys::Mutex::unlock ( ) [inline]

Definition at line 119 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and mutex.

void qpid::sys::Mutex::unlock ( ) [inline]

Member Data Documentation

pthread_mutex_t qpid::sys::Mutex::mutex [protected]

Definition at line 51 of file Mutex.h.

Referenced by Mutex(), ~Mutex(), lock(), unlock(), trylock(), and qpid::sys::Condition::wait().

boost::recursive_mutex qpid::sys::Mutex::mutex [protected]

Definition at line 58 of file Mutex.h.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00233.html0000664000076400007640000003372011752725717017322 0ustar00jrossjross00000000000000 qmf::engine::Object Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Object Class Reference

#include <qmf/engine/Object.h>

List of all members.

Public Member Functions

 Object (const SchemaObjectClass *type)
 Object (const Object &from)
virtual ~Object ()
void destroy ()
const ObjectIdgetObjectId () const
void setObjectId (ObjectId *oid)
const SchemaObjectClassgetClass () const
ValuegetValue (const char *key) const
void invokeMethod (const char *methodName, const Value *inArgs, void *context) const
bool isDeleted () const
void merge (const Object &from)

Constructor & Destructor Documentation

qmf::engine::Object::Object ( const SchemaObjectClass type)
qmf::engine::Object::Object ( const Object from)
virtual qmf::engine::Object::~Object ( ) [virtual]

Member Function Documentation

void qmf::engine::Object::destroy ( )
const SchemaObjectClass* qmf::engine::Object::getClass ( ) const
const ObjectId* qmf::engine::Object::getObjectId ( ) const
Value* qmf::engine::Object::getValue ( const char *  key) const
void qmf::engine::Object::invokeMethod ( const char *  methodName,
const Value inArgs,
void *  context 
) const
bool qmf::engine::Object::isDeleted ( ) const
void qmf::engine::Object::merge ( const Object from)
void qmf::engine::Object::setObjectId ( ObjectId oid)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00156.html0000664000076400007640000006130211752725720017315 0ustar00jrossjross00000000000000 qpid::framing::IntegerValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::IntegerValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 IntegerValue (int v)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::IntegerValue::IntegerValue ( int  v)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00439_source.html0000664000076400007640000002720611752725717020714 0ustar00jrossjross00000000000000 qpid/messaging/Handle.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Handle.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_HANDLE_H
00002 #define QPID_MESSAGING_HANDLE_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/messaging/ImportExport.h"
00026 
00027 namespace qpid {
00028 namespace messaging {
00029 
00030 template <class> class PrivateImplRef;
00031 
00039 template <class T> class Handle {
00040   public:
00041 
00043     QPID_MESSAGING_INLINE_EXTERN bool isValid() const { return impl; }
00044 
00046     QPID_MESSAGING_INLINE_EXTERN bool isNull() const { return !impl; }
00047 
00049     QPID_MESSAGING_INLINE_EXTERN operator bool() const { return impl; }
00050 
00052     QPID_MESSAGING_INLINE_EXTERN bool operator !() const { return !impl; }
00053 
00054     void swap(Handle<T>& h) { T* t = h.impl; h.impl = impl; impl = t; }
00055 
00056   protected:
00057     typedef T Impl;
00058     QPID_MESSAGING_INLINE_EXTERN Handle() :impl() {}
00059 
00060     // Not implemented,subclasses must implement.
00061     QPID_MESSAGING_EXTERN Handle(const Handle&);
00062     QPID_MESSAGING_EXTERN Handle& operator=(const Handle&);
00063 
00064     Impl* impl;
00065 
00066   friend class PrivateImplRef<T>;
00067 };
00068 
00069 }} // namespace qpid::messaging
00070 
00071 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00025.html0000664000076400007640000001020211752725720017301 0ustar00jrossjross00000000000000 std::bad_cast Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::bad_cast Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00502_source.html0000664000076400007640000007732511752725717020712 0ustar00jrossjross00000000000000 qpid/framing/enum.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/enum.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_ENUM_H
00002 #define QPID_FRAMING_ENUM_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 namespace qpid {
00032 namespace framing {
00033 
00034 enum SegmentType {
00035     SEGMENT_TYPE_CONTROL=0,
00036     SEGMENT_TYPE_COMMAND=1,
00037     SEGMENT_TYPE_HEADER=2,
00038     SEGMENT_TYPE_BODY=3
00039 };
00040 enum Track {
00041     TRACK_CONTROL=0,
00042     TRACK_COMMAND=1
00043 };
00044 
00045 namespace connection {
00046 
00047 enum CloseCode {
00048     CLOSE_CODE_NORMAL=200,
00049     CLOSE_CODE_CONNECTION_FORCED=320,
00050     CLOSE_CODE_INVALID_PATH=402,
00051     CLOSE_CODE_FRAMING_ERROR=501
00052 };
00053 
00054 } // namespace connection
00055 
00056 
00057 namespace session {
00058 
00059 enum DetachCode {
00060     DETACH_CODE_NORMAL=0,
00061     DETACH_CODE_SESSION_BUSY=1,
00062     DETACH_CODE_TRANSPORT_BUSY=2,
00063     DETACH_CODE_NOT_ATTACHED=3,
00064     DETACH_CODE_UNKNOWN_IDS=4
00065 };
00066 
00067 } // namespace session
00068 
00069 
00070 namespace execution {
00071 
00072 enum ErrorCode {
00073     ERROR_CODE_UNAUTHORIZED_ACCESS=403,
00074     ERROR_CODE_NOT_FOUND=404,
00075     ERROR_CODE_RESOURCE_LOCKED=405,
00076     ERROR_CODE_PRECONDITION_FAILED=406,
00077     ERROR_CODE_RESOURCE_DELETED=408,
00078     ERROR_CODE_ILLEGAL_STATE=409,
00079     ERROR_CODE_COMMAND_INVALID=503,
00080     ERROR_CODE_RESOURCE_LIMIT_EXCEEDED=506,
00081     ERROR_CODE_NOT_ALLOWED=530,
00082     ERROR_CODE_ILLEGAL_ARGUMENT=531,
00083     ERROR_CODE_NOT_IMPLEMENTED=540,
00084     ERROR_CODE_INTERNAL_ERROR=541,
00085     ERROR_CODE_INVALID_ARGUMENT=542
00086 };
00087 
00088 } // namespace execution
00089 
00090 
00091 namespace message {
00092 
00093 enum AcceptMode {
00094     ACCEPT_MODE_EXPLICIT=0,
00095     ACCEPT_MODE_NONE=1
00096 };
00097 enum AcquireMode {
00098     ACQUIRE_MODE_PRE_ACQUIRED=0,
00099     ACQUIRE_MODE_NOT_ACQUIRED=1
00100 };
00101 enum RejectCode {
00102     REJECT_CODE_UNSPECIFIED=0,
00103     REJECT_CODE_UNROUTABLE=1,
00104     REJECT_CODE_IMMEDIATE=2
00105 };
00106 enum DeliveryMode {
00107     DELIVERY_MODE_NON_PERSISTENT=1,
00108     DELIVERY_MODE_PERSISTENT=2
00109 };
00110 enum DeliveryPriority {
00111     DELIVERY_PRIORITY_LOWEST=0,
00112     DELIVERY_PRIORITY_LOWER=1,
00113     DELIVERY_PRIORITY_LOW=2,
00114     DELIVERY_PRIORITY_BELOW_AVERAGE=3,
00115     DELIVERY_PRIORITY_MEDIUM=4,
00116     DELIVERY_PRIORITY_ABOVE_AVERAGE=5,
00117     DELIVERY_PRIORITY_HIGH=6,
00118     DELIVERY_PRIORITY_HIGHER=7,
00119     DELIVERY_PRIORITY_VERY_HIGH=8,
00120     DELIVERY_PRIORITY_HIGHEST=9
00121 };
00122 enum FlowMode {
00123     FLOW_MODE_CREDIT=0,
00124     FLOW_MODE_WINDOW=1
00125 };
00126 enum CreditUnit {
00127     CREDIT_UNIT_MESSAGE=0,
00128     CREDIT_UNIT_BYTE=1
00129 };
00130 
00131 } // namespace message
00132 
00133 
00134 namespace dtx {
00135 
00136 enum XaStatus {
00137     XA_STATUS_XA_OK=0,
00138     XA_STATUS_XA_RBROLLBACK=1,
00139     XA_STATUS_XA_RBTIMEOUT=2,
00140     XA_STATUS_XA_HEURHAZ=3,
00141     XA_STATUS_XA_HEURCOM=4,
00142     XA_STATUS_XA_HEURRB=5,
00143     XA_STATUS_XA_HEURMIX=6,
00144     XA_STATUS_XA_RDONLY=7
00145 };
00146 
00147 } // namespace dtx
00148 
00149 
00150 namespace file {
00151 
00152 enum ReturnCode {
00153     RETURN_CODE_CONTENT_TOO_LARGE=311,
00154     RETURN_CODE_NO_ROUTE=312,
00155     RETURN_CODE_NO_CONSUMERS=313
00156 };
00157 
00158 } // namespace file
00159 
00160 
00161 namespace stream {
00162 
00163 enum ReturnCode {
00164     RETURN_CODE_CONTENT_TOO_LARGE=311,
00165     RETURN_CODE_NO_ROUTE=312,
00166     RETURN_CODE_NO_CONSUMERS=313
00167 };
00168 
00169 } // namespace stream
00170 
00171 
00172 namespace cluster {
00173 
00174 enum StoreState {
00175     STORE_STATE_NO_STORE=0,
00176     STORE_STATE_EMPTY_STORE=1,
00177     STORE_STATE_CLEAN_STORE=2,
00178     STORE_STATE_DIRTY_STORE=3
00179 };
00180 enum ErrorType {
00181     ERROR_TYPE_NONE=0,
00182     ERROR_TYPE_SESSION=1,
00183     ERROR_TYPE_CONNECTION=2
00184 };
00185 
00186 } // namespace cluster
00187 
00188 
00189 }} // namespace qpid::framing
00190 
00191 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00909.html0000664000076400007640000000766711752725720017341 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::priority_queue Member List
This is the complete list of members for std::priority_queue, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func.html0000664000076400007640000005456411752725717021546 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- a -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00793.html0000664000076400007640000001374011752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ResourceDeletedException Member List
This is the complete list of members for qpid::framing::ResourceDeletedException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::ResourceDeletedException [inline, virtual]
ResourceDeletedException(const std::string &msg=std::string())qpid::framing::ResourceDeletedException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00122.html0000664000076400007640000001711411752725720017310 0ustar00jrossjross00000000000000 qpid::messaging::FetchError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::FetchError Struct Reference

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 FetchError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qpid::messaging::FetchError::FetchError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/tab_a.png0000664000076400007640000000021411752725717017370 0ustar00jrossjross00000000000000‰PNG  IHDR$ÇÇ[SIDATxí» €@wçÉ¡œˆ˜*æ‚M˜ØIïÎF†ýL :®‡±nÌëN™ ¶±Á’„ØN&â¼_ ɭɾ}Õ¶8~î¾îOwv-ÿêA4Y)Ñ}IEND®B`‚qpidc-0.16/docs/api/html/a00789.html0000664000076400007640000001376211752725720017340 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::UnauthorizedAccessException Member List
This is the complete list of members for qpid::framing::UnauthorizedAccessException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::UnauthorizedAccessException [inline, virtual]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
UnauthorizedAccessException(const std::string &msg=std::string())qpid::framing::UnauthorizedAccessException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00358.html0000664000076400007640000001721511752725720017325 0ustar00jrossjross00000000000000 qpid::messaging::TransactionError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::TransactionError Struct Reference

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 TransactionError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qpid::messaging::TransactionError::TransactionError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00486.html0000664000076400007640000001302611752725717017331 0ustar00jrossjross00000000000000 qpid/console/ConsoleListener.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/ConsoleListener.h File Reference

Go to the source code of this file.

Classes

class  qpid::console::ConsoleListener
 Implement a subclass of ConsoleListener and subscribe it using the SessionManager to receive indications. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::console

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00654.html0000664000076400007640000001306511752725717017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::ConnectionException Member List
This is the complete list of members for qpid::ConnectionException, including all inherited members.
codeqpid::ConnectionException
ConnectionException(framing::connection::CloseCode _code, const std::string &message)qpid::ConnectionException [inline]
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00282.html0000664000076400007640000002446511752725720017326 0ustar00jrossjross00000000000000 qpid::framing::ResourceLockedException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ResourceLockedException Struct Reference

The client attempted to work with a server entity to which it has no access because another client is working with it. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 ResourceLockedException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The client attempted to work with a server entity to which it has no access because another client is working with it.


Constructor & Destructor Documentation

qpid::framing::ResourceLockedException::ResourceLockedException ( const std::string msg = std::string()) [inline]

Definition at line 74 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::ResourceLockedException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 73 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00226.html0000664000076400007640000002421511752725720017315 0ustar00jrossjross00000000000000 qpid::framing::NotAttachedException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::NotAttachedException Struct Reference

The transport is not currently attached to any session. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 NotAttachedException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::session::DetachCode code

Detailed Description

The transport is not currently attached to any session.


Constructor & Destructor Documentation

qpid::framing::NotAttachedException::NotAttachedException ( const std::string msg = std::string()) [inline]

Definition at line 277 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::NotAttachedException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 276 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 66 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00499_source.html0000664000076400007640000005471611752725717020730 0ustar00jrossjross00000000000000 qpid/framing/DeliveryProperties.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/DeliveryProperties.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_DELIVERYPROPERTIES_H
00002 #define QPID_FRAMING_DELIVERYPROPERTIES_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN DeliveryProperties  {
00039     uint8_t priority;
00040     uint8_t deliveryMode;
00041     uint64_t ttl;
00042     uint64_t timestamp;
00043     uint64_t expiration;
00044     std::string exchange;
00045     std::string routingKey;
00046     std::string resumeId;
00047     uint64_t resumeTtl;
00048     uint16_t flags;
00049 public:
00050     static const uint16_t TYPE = 1025;
00051     DeliveryProperties(
00052         bool _discardUnroutable,
00053         bool _immediate,
00054         bool _redelivered,
00055         uint8_t _priority,
00056         uint8_t _deliveryMode,
00057         uint64_t _ttl,
00058         uint64_t _timestamp,
00059         uint64_t _expiration,
00060         const std::string& _exchange,
00061         const std::string& _routingKey,
00062         const std::string& _resumeId,
00063         uint64_t _resumeTtl) : 
00064         priority(_priority),
00065         deliveryMode(_deliveryMode),
00066         ttl(_ttl),
00067         timestamp(_timestamp),
00068         expiration(_expiration),
00069         exchange(_exchange),
00070         routingKey(_routingKey),
00071         resumeId(_resumeId),
00072         resumeTtl(_resumeTtl),
00073         flags(0){
00074         setDiscardUnroutable(_discardUnroutable);
00075         setImmediate(_immediate);
00076         setRedelivered(_redelivered);
00077         flags |= (1 << 11);
00078         flags |= (1 << 12);
00079         flags |= (1 << 13);
00080         flags |= (1 << 14);
00081         flags |= (1 << 15);
00082         flags |= (1 << 0);
00083         flags |= (1 << 1);
00084         flags |= (1 << 2);
00085         flags |= (1 << 3);
00086     }
00087     DeliveryProperties()  : priority(0), deliveryMode(0), ttl(0), timestamp(0), expiration(0), resumeTtl(0), flags(0) {}
00088     
00089     QPID_COMMON_EXTERN void setDiscardUnroutable(bool _discardUnroutable);
00090     QPID_COMMON_EXTERN bool getDiscardUnroutable() const;
00091     QPID_COMMON_EXTERN void setImmediate(bool _immediate);
00092     QPID_COMMON_EXTERN bool getImmediate() const;
00093     QPID_COMMON_EXTERN void setRedelivered(bool _redelivered);
00094     QPID_COMMON_EXTERN bool getRedelivered() const;
00095     QPID_COMMON_EXTERN void setPriority(uint8_t _priority);
00096     QPID_COMMON_EXTERN uint8_t getPriority() const;
00097     QPID_COMMON_EXTERN bool hasPriority() const;
00098     QPID_COMMON_EXTERN void clearPriorityFlag();
00099     QPID_COMMON_EXTERN void setDeliveryMode(uint8_t _deliveryMode);
00100     QPID_COMMON_EXTERN uint8_t getDeliveryMode() const;
00101     QPID_COMMON_EXTERN bool hasDeliveryMode() const;
00102     QPID_COMMON_EXTERN void clearDeliveryModeFlag();
00103     QPID_COMMON_EXTERN void setTtl(uint64_t _ttl);
00104     QPID_COMMON_EXTERN uint64_t getTtl() const;
00105     QPID_COMMON_EXTERN bool hasTtl() const;
00106     QPID_COMMON_EXTERN void clearTtlFlag();
00107     QPID_COMMON_EXTERN void setTimestamp(uint64_t _timestamp);
00108     QPID_COMMON_EXTERN uint64_t getTimestamp() const;
00109     QPID_COMMON_EXTERN bool hasTimestamp() const;
00110     QPID_COMMON_EXTERN void clearTimestampFlag();
00111     QPID_COMMON_EXTERN void setExpiration(uint64_t _expiration);
00112     QPID_COMMON_EXTERN uint64_t getExpiration() const;
00113     QPID_COMMON_EXTERN bool hasExpiration() const;
00114     QPID_COMMON_EXTERN void clearExpirationFlag();
00115     QPID_COMMON_EXTERN void setExchange(const std::string& _exchange);
00116     QPID_COMMON_EXTERN const std::string& getExchange() const;
00117     QPID_COMMON_EXTERN bool hasExchange() const;
00118     QPID_COMMON_EXTERN void clearExchangeFlag();
00119     QPID_COMMON_EXTERN void setRoutingKey(const std::string& _routingKey);
00120     QPID_COMMON_EXTERN const std::string& getRoutingKey() const;
00121     QPID_COMMON_EXTERN bool hasRoutingKey() const;
00122     QPID_COMMON_EXTERN void clearRoutingKeyFlag();
00123     QPID_COMMON_EXTERN void setResumeId(const std::string& _resumeId);
00124     QPID_COMMON_EXTERN const std::string& getResumeId() const;
00125     QPID_COMMON_EXTERN bool hasResumeId() const;
00126     QPID_COMMON_EXTERN void clearResumeIdFlag();
00127     QPID_COMMON_EXTERN void setResumeTtl(uint64_t _resumeTtl);
00128     QPID_COMMON_EXTERN uint64_t getResumeTtl() const;
00129     QPID_COMMON_EXTERN bool hasResumeTtl() const;
00130     QPID_COMMON_EXTERN void clearResumeTtlFlag();
00131     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const DeliveryProperties&);
00132     QPID_COMMON_EXTERN void encode(Buffer&) const;
00133     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00134     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00135     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00136     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00137     QPID_COMMON_EXTERN uint32_t bodySize() const;
00138     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00139 }; /* class DeliveryProperties */
00140 
00141 }}
00142 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00457_source.html0000664000076400007640000001530411752725717020710 0ustar00jrossjross00000000000000 qpid/client/AsyncSession.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/AsyncSession.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_ASYNCSESSION_H
00002 #define QPID_CLIENT_ASYNCSESSION_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/client/AsyncSession_0_10.h"
00025 
00026 namespace qpid {
00027 namespace client {
00028 
00034 typedef AsyncSession_0_10 AsyncSession;
00035 
00036 }} // namespace qpid::client
00037 
00038 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00821.html0000664000076400007640000001322111752725720017311 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Selector Member List
This is the complete list of members for qpid::log::Selector, including all inherited members.
enable(Level level, const std::string &substring=std::string())qpid::log::Selector [inline]
enable(const std::string &enableStr)qpid::log::Selector
isEnabled(Level level, const char *function)qpid::log::Selector
Selector()qpid::log::Selector [inline]
Selector(const Options &)qpid::log::Selector
Selector(Level l, const std::string &s=std::string())qpid::log::Selector [inline]
Selector(const std::string &enableStr)qpid::log::Selector [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00286.html0000664000076400007640000001037211752725720017322 0ustar00jrossjross00000000000000 std::multiset::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multiset::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00027.html0000664000076400007640000001021211752725720017304 0ustar00jrossjross00000000000000 std::bad_typeid Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::bad_typeid Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x64.html0000664000076400007640000004220411752725717022313 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- d -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00575.html0000664000076400007640000001707411752725717017337 0ustar00jrossjross00000000000000 qpid::amqp_0_10 Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::amqp_0_10 Namespace Reference

Classes

class  MapCodec
 Codec for encoding/decoding a map of Variants using the AMQP 0-10 map encoding. More...
class  ListCodec
 Codec for encoding/decoding a list of Variants using the AMQP 0-10 list encoding. More...

Functions

void translate (const qpid::types::Variant::Map &from, qpid::framing::FieldTable &to)
void translate (const qpid::framing::FieldTable &from, qpid::types::Variant::Map &to)

Function Documentation

void qpid::amqp_0_10::translate ( const qpid::types::Variant::Map from,
qpid::framing::FieldTable to 
)
void qpid::amqp_0_10::translate ( const qpid::framing::FieldTable from,
qpid::types::Variant::Map to 
)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00169.html0000664000076400007640000001107011752725720017316 0ustar00jrossjross00000000000000 std::ios_base Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::ios_base Class Reference

STL class. More...

Classes

class  failure
 STL class. More...

Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00847.html0000664000076400007640000001327211752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::InvalidOptionString Member List
This is the complete list of members for qpid::messaging::InvalidOptionString, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
InvalidOptionString(const std::string &msg)qpid::messaging::InvalidOptionString
MessagingException(const std::string &msg)qpid::messaging::MessagingException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00541.html0000664000076400007640000001552011752725717017322 0ustar00jrossjross00000000000000 qpid/sys/posix/Mutex.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/Mutex.h File Reference
#include "qpid/sys/posix/check.h"
#include <pthread.h>
#include <boost/noncopyable.hpp>

Go to the source code of this file.

Classes

class  qpid::sys::Mutex
 Mutex lock. More...
class  qpid::sys::RWlock
 RW lock. More...
struct  qpid::sys::PODMutex
 PODMutex is a POD, can be static-initialized with PODMutex m = QPID_PODMUTEX_INITIALIZER. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Defines

#define QPID_MUTEX_INITIALIZER   { PTHREAD_MUTEX_INITIALIZER }

Define Documentation

#define QPID_MUTEX_INITIALIZER   { PTHREAD_MUTEX_INITIALIZER }

Definition at line 93 of file Mutex.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00294.html0000664000076400007640000001022611752725720017317 0ustar00jrossjross00000000000000 std::runtime_error Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::runtime_error Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00228.html0000664000076400007640000002420111752725720017312 0ustar00jrossjross00000000000000 qpid::framing::NotFoundException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::NotFoundException Struct Reference

The client attempted to work with a server entity that does not exist. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 NotFoundException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The client attempted to work with a server entity that does not exist.


Constructor & Destructor Documentation

qpid::framing::NotFoundException::NotFoundException ( const std::string msg = std::string()) [inline]

Definition at line 61 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::NotFoundException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 60 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x69.html0000664000076400007640000001352211752725720023606 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- i -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00496_source.html0000664000076400007640000005662711752725717020730 0ustar00jrossjross00000000000000 qpid/framing/Buffer.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/Buffer.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #include "qpid/framing/amqp_types.h"
00022 #include "qpid/Exception.h"
00023 #include "qpid/CommonImportExport.h"
00024 #include <boost/iterator/iterator_facade.hpp>
00025 
00026 #ifndef _Buffer_
00027 #define _Buffer_
00028 
00029 namespace qpid {
00030 namespace framing {
00031 
00032 struct QPID_COMMON_CLASS_EXTERN OutOfBounds : qpid::Exception {
00033     OutOfBounds() : qpid::Exception(std::string("Out of Bounds")) {}
00034 };
00035 
00036 class Content;
00037 class FieldTable;
00038 
00039 class QPID_COMMON_CLASS_EXTERN Buffer
00040 {
00041     uint32_t size;
00042     char* data;
00043     uint32_t position;
00044     uint32_t r_position;
00045 
00046   public:
00047     void checkAvailable(uint32_t count) { if (position + count > size) throw OutOfBounds(); }
00048 
00052     class Iterator  : public boost::iterator_facade<
00053       Iterator, char, boost::random_access_traversal_tag>
00054     {
00055       public:
00056         Iterator(Buffer& b) : buffer(&b) {}
00057 
00058       private:
00059       friend class boost::iterator_core_access;
00060         char& dereference() const { return buffer->data[buffer->position]; }
00061         void increment() { ++buffer->position; }
00062         bool equal(const Iterator& x) const { return buffer == x.buffer; }
00063 
00064         Buffer* buffer;
00065     };
00066 
00067   friend class Iterator;
00068 
00069     QPID_COMMON_EXTERN Buffer(char* data=0, uint32_t size=0);
00070 
00071     QPID_COMMON_EXTERN void record();
00072     QPID_COMMON_EXTERN void restore(bool reRecord = false);
00073     QPID_COMMON_EXTERN void reset();
00074 
00075     QPID_COMMON_INLINE_EXTERN uint32_t available() { return size - position; }
00076     QPID_COMMON_INLINE_EXTERN uint32_t getSize() { return size; }
00077     QPID_COMMON_INLINE_EXTERN uint32_t getPosition() { return position; }
00078     QPID_COMMON_INLINE_EXTERN void setPosition(uint32_t p) { position = p; }
00079     QPID_COMMON_INLINE_EXTERN Iterator getIterator() { return Iterator(*this); }
00080     QPID_COMMON_INLINE_EXTERN char* getPointer() { return data; }
00081 
00082     QPID_COMMON_EXTERN void putOctet(uint8_t i);
00083     QPID_COMMON_EXTERN void putShort(uint16_t i);
00084     QPID_COMMON_EXTERN void putLong(uint32_t i);
00085     QPID_COMMON_EXTERN void putLongLong(uint64_t i);
00086     QPID_COMMON_EXTERN void putInt8(int8_t i);
00087     QPID_COMMON_EXTERN void putInt16(int16_t i);
00088     QPID_COMMON_EXTERN void putInt32(int32_t i);
00089     QPID_COMMON_EXTERN void putInt64(int64_t i);
00090     QPID_COMMON_EXTERN void putFloat(float f);
00091     QPID_COMMON_EXTERN void putDouble(double f);
00092     QPID_COMMON_EXTERN void putBin128(const uint8_t* b);
00093 
00094     QPID_COMMON_EXTERN uint8_t  getOctet();
00095     QPID_COMMON_EXTERN uint16_t getShort();
00096     QPID_COMMON_EXTERN uint32_t getLong();
00097     QPID_COMMON_EXTERN uint64_t getLongLong();
00098     QPID_COMMON_EXTERN int8_t   getInt8();
00099     QPID_COMMON_EXTERN int16_t  getInt16();
00100     QPID_COMMON_EXTERN int32_t  getInt32();
00101     QPID_COMMON_EXTERN int64_t  getInt64();
00102     QPID_COMMON_EXTERN float    getFloat();
00103     QPID_COMMON_EXTERN double   getDouble();
00104 
00105     template <int n>
00106     QPID_COMMON_EXTERN uint64_t getUInt();
00107 
00108     template <int n>
00109     QPID_COMMON_EXTERN void putUInt(uint64_t);
00110 
00111     QPID_COMMON_EXTERN void putShortString(const string& s);
00112     QPID_COMMON_EXTERN void putMediumString(const string& s);
00113     QPID_COMMON_EXTERN void putLongString(const string& s);
00114     QPID_COMMON_EXTERN void getShortString(string& s);
00115     QPID_COMMON_EXTERN void getMediumString(string& s);
00116     QPID_COMMON_EXTERN void getLongString(string& s);
00117     QPID_COMMON_EXTERN void getBin128(uint8_t* b);
00118 
00119     QPID_COMMON_EXTERN void putRawData(const string& s);
00120     QPID_COMMON_EXTERN void getRawData(string& s, uint32_t size);
00121 
00122     QPID_COMMON_EXTERN void putRawData(const uint8_t* data, size_t size);
00123     QPID_COMMON_EXTERN void getRawData(uint8_t* data, size_t size);
00124 
00125     template <class T> void put(const T& data) { data.encode(*this); }
00126     template <class T> void get(T& data) { data.decode(*this); }
00127 
00128     QPID_COMMON_EXTERN void dump(std::ostream&) const;
00129 };
00130 
00131 std::ostream& operator<<(std::ostream&, const Buffer&);
00132 
00133 }} // namespace qpid::framing
00134 
00135 
00136 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x6f.html0000664000076400007640000002423311752725720022655 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- o -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x73.html0000664000076400007640000002444111752725717022336 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- s -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00466_source.html0000664000076400007640000003340611752725717020713 0ustar00jrossjross00000000000000 qpid/client/FlowControl.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/FlowControl.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_FLOWCONTROL_H
00002 #define QPID_CLIENT_FLOWCONTROL_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include <qpid/sys/IntegerTypes.h>
00026 
00027 namespace qpid {
00028 namespace client {
00029 
00049 struct FlowControl {
00050     static const uint32_t UNLIMITED=0xFFFFFFFF;
00051     FlowControl(uint32_t messages_=0, uint32_t bytes_=0, bool window_=false)
00052         : messages(messages_), bytes(bytes_), window(window_) {}
00053 
00054     static FlowControl messageCredit(uint32_t messages_) { return FlowControl(messages_,UNLIMITED,false); }
00055     static FlowControl messageWindow(uint32_t messages_) { return FlowControl(messages_,UNLIMITED,true); }
00056     static FlowControl byteCredit(uint32_t bytes_) { return FlowControl(UNLIMITED,bytes_,false); }
00057     static FlowControl byteWindow(uint32_t bytes_) { return FlowControl(UNLIMITED,bytes_,true); }
00058     static FlowControl unlimited() { return FlowControl(UNLIMITED, UNLIMITED, false); }
00059     static FlowControl zero() { return FlowControl(0, 0, false); }
00060 
00062     uint32_t messages;
00064     uint32_t bytes;
00066     bool window;
00067 
00068     bool operator==(const FlowControl& x) {
00069         return messages == x.messages && bytes == x.bytes && window == x.window;
00070     };
00071 };
00072 
00073 }} // namespace qpid::client
00074 
00075 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00791.html0000664000076400007640000001373211752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ResourceLockedException Member List
This is the complete list of members for qpid::framing::ResourceLockedException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::ResourceLockedException [inline, virtual]
ResourceLockedException(const std::string &msg=std::string())qpid::framing::ResourceLockedException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00576.html0000664000076400007640000007016111752725717017334 0ustar00jrossjross00000000000000 qpid::client Namespace Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client Namespace Reference

Namespaces

namespace  arg
namespace  no_keyword

Classes

class  AsyncSession_0_10
 AMQP 0-10 session API with keyword arguments. More...
class  Completion
 Asynchronous commands that do not return a result will return a Completion. More...
class  Connection
 Represents a connection to an AMQP broker. More...
struct  ConnectionSettings
 Settings for a Connection. More...
class  FailoverListener
 Listen for updates from the amq.failover exchange. More...
struct  CannotConnectException
class  FailoverManager
 Utility to manage failover. More...
struct  FlowControl
 Flow control works by associating a finite amount of "credit" with a subscription. More...
class  Future
class  FutureCompletion
class  FutureResult
class  Handle
 A handle is like a pointer: refers to an underlying implementation object. More...
class  LocalQueue
 A local queue to collect messages retrieved from a remote broker queue. More...
class  Message
 A message sent to or received from the broker. More...
class  MessageListener
 Implement a subclass of MessageListener and subscribe it using the SubscriptionManager to receive messages. More...
class  MessageReplayTracker
 Utility to track messages sent asynchronously, allowing those that are indoubt to be replayed over a new session. More...
class  QueueOptions
 A help class to set options on the Queue. More...
class  Session_0_10
 AMQP 0-10 session API with keyword arguments. More...
class  SessionBase_0_10
 Base class for handles to an AMQP session. More...
class  Subscription
 A handle to an active subscription. More...
class  SubscriptionManager
 A class to help create and manage subscriptions. More...
class  AutoCancel
 AutoCancel cancels a subscription in its destructor. More...
struct  SubscriptionSettings
 Settings for a subscription. More...
class  TypedResult
 Returned by asynchronous commands that return a result. More...

Typedefs

typedef AsyncSession_0_10 AsyncSession
 AsyncSession is an alias for Session_0_10.
typedef Session_0_10 Session
 Session is an alias for Session_0_10.

Enumerations

enum  QueueSizePolicy {
  NONE, REJECT, FLOW_TO_DISK, RING,
  RING_STRICT
}
enum  QueueOrderingPolicy { FIFO, LVQ, LVQ_NO_BROWSE }
enum  CreditUnit { MESSAGE_CREDIT = 0, BYTE_CREDIT = 1, UNLIMITED_CREDIT = 0xFFFFFFFF }
 Unit of message credit: messages or bytes. More...
enum  CompletionMode { MANUAL_COMPLETION = 0, COMPLETE_ON_DELIVERY = 1, COMPLETE_ON_ACCEPT = 2 }

Functions

AsyncSession_0_10 async (const SessionBase_0_10 &other)
 Conversion to AsyncSession_0_10 from another session type.
Session_0_10 sync (const SessionBase_0_10 &other)
 Conversion to Session_0_10 from another session type.

Typedef Documentation

AsyncSession is an alias for Session_0_10.

Definition at line 34 of file AsyncSession.h.

Session is an alias for Session_0_10.

Definition at line 34 of file Session.h.


Enumeration Type Documentation

Enumerator:
MANUAL_COMPLETION 
COMPLETE_ON_DELIVERY 
COMPLETE_ON_ACCEPT 

Definition at line 33 of file SubscriptionSettings.h.

Unit of message credit: messages or bytes.

Enumerator:
MESSAGE_CREDIT 
BYTE_CREDIT 
UNLIMITED_CREDIT 

Definition at line 49 of file SessionBase_0_10.h.

Enumerator:
FIFO 
LVQ 
LVQ_NO_BROWSE 

Definition at line 32 of file QueueOptions.h.

Enumerator:
NONE 
REJECT 
FLOW_TO_DISK 
RING 
RING_STRICT 

Definition at line 31 of file QueueOptions.h.


Function Documentation

AsyncSession_0_10 qpid::client::async ( const SessionBase_0_10 &  other) [inline]

Conversion to AsyncSession_0_10 from another session type.

Definition at line 553 of file AsyncSession_0_10.h.

Session_0_10 qpid::client::sync ( const SessionBase_0_10 &  other) [inline]

Conversion to Session_0_10 from another session type.

Definition at line 553 of file Session_0_10.h.

Referenced by qpid::client::AsyncSession_0_10::BOOST_PARAMETER_MEMFUN(), and qpid::client::Session_0_10::BOOST_PARAMETER_MEMFUN().


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00052.html0000664000076400007640000002423711752725720017316 0ustar00jrossjross00000000000000 qpid::framing::CommandInvalidException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::CommandInvalidException Struct Reference

The command segments could not be decoded. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 CommandInvalidException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::execution::ErrorCode code

Detailed Description

The command segments could not be decoded.


Constructor & Destructor Documentation

qpid::framing::CommandInvalidException::CommandInvalidException ( const std::string msg = std::string()) [inline]

Definition at line 122 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::CommandInvalidException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 121 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 60 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00490_source.html0000664000076400007640000003574611752725717020721 0ustar00jrossjross00000000000000 qpid/Exception.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Exception.h
Go to the documentation of this file.
00001 #ifndef _Exception_
00002 #define _Exception_
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/framing/amqp_types.h"
00026 #include "qpid/framing/constants.h"
00027 #include "qpid/framing/enum.h"
00028 #include "qpid/sys/StrError.h"
00029 #include "qpid/CommonImportExport.h"
00030 #include <string>
00031 #include <errno.h>
00032 
00033 namespace qpid
00034 {
00035 
00039 class QPID_COMMON_CLASS_EXTERN Exception : public std::exception
00040 {
00041   public:
00042     QPID_COMMON_EXTERN explicit Exception(const std::string& message=std::string()) throw();
00043     QPID_COMMON_EXTERN virtual ~Exception() throw();
00044     QPID_COMMON_EXTERN virtual const char* what() const throw(); // prefix: message
00045     QPID_COMMON_EXTERN virtual std::string getMessage() const; // Unprefixed message
00046     QPID_COMMON_EXTERN virtual std::string getPrefix() const;  // Prefix
00047 
00048   private:
00049     std::string message;
00050     mutable std::string whatStr;
00051 };
00052 
00054 struct QPID_COMMON_CLASS_EXTERN ErrnoException : public Exception {
00055     ErrnoException(const std::string& msg, int err) : Exception(msg+": "+qpid::sys::strError(err)) {}
00056     ErrnoException(const std::string& msg) : Exception(msg+": "+qpid::sys::strError(errno)) {}
00057 };
00058 
00059 struct QPID_COMMON_CLASS_EXTERN SessionException : public Exception {
00060     const framing::execution::ErrorCode code;
00061     SessionException(framing::execution::ErrorCode code_, const std::string& message)
00062         : Exception(message), code(code_) {}
00063 };
00064 
00065 struct QPID_COMMON_CLASS_EXTERN ChannelException : public Exception {
00066     const framing::session::DetachCode code;
00067     ChannelException(framing::session::DetachCode _code, const std::string& message)
00068         : Exception(message), code(_code) {}
00069 };
00070 
00071 struct QPID_COMMON_CLASS_EXTERN ConnectionException : public Exception {
00072     const framing::connection::CloseCode code;
00073     ConnectionException(framing::connection::CloseCode _code, const std::string& message)
00074         : Exception(message), code(_code) {}
00075 };
00076 
00077 struct QPID_COMMON_CLASS_EXTERN ClosedException : public Exception {
00078     QPID_COMMON_EXTERN ClosedException(const std::string& msg=std::string());
00079     QPID_COMMON_EXTERN std::string getPrefix() const;
00080 };
00081 
00085 struct TransportFailure : public Exception {
00086     TransportFailure(const std::string& msg=std::string()) : Exception(msg) {}
00087 };
00088 
00089 } // namespace qpid
00090 
00091 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00514_source.html0000664000076400007640000002564011752725717020706 0ustar00jrossjross00000000000000 qpid/framing/ProtocolVersion.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/ProtocolVersion.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _ProtocolVersion_
00022 #define _ProtocolVersion_
00023 
00024 #include "qpid/framing/amqp_types.h"
00025 #include "qpid/CommonImportExport.h"
00026 
00027 namespace qpid
00028 {
00029 namespace framing
00030 {
00031 
00032 class QPID_COMMON_CLASS_EXTERN ProtocolVersion
00033 {
00034 private:
00035     uint8_t major_;
00036     uint8_t minor_;
00037 
00038 public:
00039     explicit ProtocolVersion(uint8_t _major=0, uint8_t _minor=0)
00040         : major_(_major), minor_(_minor) {}
00041 
00042     QPID_COMMON_INLINE_EXTERN uint8_t getMajor() const { return major_; }
00043     QPID_COMMON_INLINE_EXTERN void setMajor(uint8_t major) { major_ = major; }
00044     QPID_COMMON_INLINE_EXTERN uint8_t getMinor() const { return minor_; }
00045     QPID_COMMON_INLINE_EXTERN void setMinor(uint8_t minor) { minor_ = minor; }
00046     QPID_COMMON_EXTERN const std::string toString() const;
00047 
00048     QPID_COMMON_EXTERN ProtocolVersion& operator=(ProtocolVersion p);
00049 
00050     QPID_COMMON_EXTERN bool operator==(ProtocolVersion p) const;
00051     QPID_COMMON_INLINE_EXTERN bool operator!=(ProtocolVersion p) const { return ! (*this == p); }
00052 };
00053 
00054 } // namespace framing
00055 } // namespace qpid
00056 
00057 
00058 #endif // ifndef _ProtocolVersion_

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00242.html0000664000076400007640000001535011752725717017321 0ustar00jrossjross00000000000000 qpid::OptionValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::OptionValue Class Reference

#include <qpid/Options.h>

List of all members.

Public Member Functions

 OptionValue (T &value, const std::string &arg)
std::string name () const

Constructor & Destructor Documentation

qpid::OptionValue::OptionValue ( T &  value,
const std::string arg 
) [inline]

Definition at line 58 of file Options.h.


Member Function Documentation

std::string qpid::OptionValue::name ( ) const [inline]

Definition at line 60 of file Options.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00364.html0000664000076400007640000007774311752725720017336 0ustar00jrossjross00000000000000 qpid::console::UintValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::UintValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 UintValue (uint32_t v)
std::string str () const
bool isUint () const
uint32_t asUint () const
bool isUint64 () const
uint64_t asUint64 () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isInt () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual int32_t asInt () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::UintValue::UintValue ( uint32_t  v) [inline]

Definition at line 97 of file Value.h.


Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

uint32_t qpid::console::UintValue::asUint ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 100 of file Value.h.

uint64_t qpid::console::UintValue::asUint64 ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 102 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

bool qpid::console::UintValue::isUint ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 99 of file Value.h.

bool qpid::console::UintValue::isUint64 ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 101 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::UintValue::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00103.html0000664000076400007640000002040611752725720017305 0ustar00jrossjross00000000000000 qpid::sys::Duration Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Duration Class Reference

Class to represent the duration between instants of time. More...

#include <qpid/sys/Time.h>

List of all members.

Public Member Functions

QPID_COMMON_INLINE_EXTERN Duration (int64_t time0=0)
 Duration (const AbsTime &start, const AbsTime &finish)
 operator int64_t () const

Detailed Description

Class to represent the duration between instants of time.

As AbsTime, this class also uses nanosecs for its time resolution where possible. For the most part a duration can be dealt with like a 64 bit integer, and indeed there is an implicit conversion which makes this quite convenient.


Constructor & Destructor Documentation

qpid::sys::Duration::Duration ( int64_t  time0 = 0) [inline]

Definition at line 136 of file Time.h.

qpid::sys::Duration::Duration ( const AbsTime start,
const AbsTime finish 
) [explicit]

Member Function Documentation

qpid::sys::Duration::operator int64_t ( ) const [inline]

Definition at line 140 of file Time.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00178.html0000664000076400007640000001031211752725720017314 0ustar00jrossjross00000000000000 std::list::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::list::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00816.html0000664000076400007640000001635411752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::XaResult Member List
This is the complete list of members for qpid::framing::XaResult, including all inherited members.
bodySize() const qpid::framing::XaResult
clearStatusFlag()qpid::framing::XaResult
decode(Buffer &, uint32_t=0)qpid::framing::XaResult
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::XaResult
encode(Buffer &) const qpid::framing::XaResult
encodedSize() const qpid::framing::XaResult
encodeStructBody(Buffer &) const qpid::framing::XaResult
getStatus() const qpid::framing::XaResult
hasStatus() const qpid::framing::XaResult
operator<<(std::ostream &, const XaResult &)qpid::framing::XaResult [friend]
print(std::ostream &out) const qpid::framing::XaResult
setStatus(uint16_t _status)qpid::framing::XaResult
TYPEqpid::framing::XaResult [static]
XaResult(uint16_t _status)qpid::framing::XaResult [inline]
XaResult()qpid::framing::XaResult [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00774.html0000664000076400007640000002135011752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Unsigned16Value Member List
This is the complete list of members for qpid::framing::Unsigned16Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
Unsigned16Value(uint16_t)qpid::framing::Unsigned16Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00755.html0000664000076400007640000001551711752725720017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FixedWidthValue< 0 > Member List
This is the complete list of members for qpid::framing::FixedWidthValue< 0 >, including all inherited members.
convertsToInt() const qpid::framing::FieldValue::Data [inline, virtual]
convertsToString() const qpid::framing::FieldValue::Data [inline, virtual]
decode(Buffer &)qpid::framing::FixedWidthValue< 0 > [inline, virtual]
encode(Buffer &)qpid::framing::FixedWidthValue< 0 > [inline, virtual]
encodedSize() const qpid::framing::FixedWidthValue< 0 > [inline, virtual]
getInt() const qpid::framing::FieldValue::Data [inline, virtual]
getString() const qpid::framing::FieldValue::Data [inline, virtual]
operator==(const Data &d) const qpid::framing::FixedWidthValue< 0 > [inline]
qpid::framing::FieldValue::Data::operator==(const Data &) const =0qpid::framing::FieldValue::Data [pure virtual]
print(std::ostream &o) const qpid::framing::FixedWidthValue< 0 > [inline, virtual]
~Data()qpid::framing::FieldValue::Data [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00410_source.html0000664000076400007640000002773211752725717020705 0ustar00jrossjross00000000000000 qmf/Data.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Data.h
Go to the documentation of this file.
00001 #ifndef QMF_DATA_H
00002 #define QMF_DATA_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qmf/exceptions.h"
00027 #include "qpid/types/Variant.h"
00028 #include <string>
00029 
00030 namespace qmf {
00031 
00032 #ifndef SWIG
00033     template <class> class PrivateImplRef;
00034 #endif
00035 
00036     class DataImpl;
00037     class Schema;
00038     class SchemaId;
00039     class DataAddr;
00040     class Agent;
00041 
00042     class QMF_CLASS_EXTERN Data : public qmf::Handle<DataImpl> {
00043     public:
00044         QMF_EXTERN Data(DataImpl* impl = 0);
00045         QMF_EXTERN Data(const Data&);
00046         QMF_EXTERN Data& operator=(const Data&);
00047         QMF_EXTERN ~Data();
00048 
00049         QMF_EXTERN Data(const Schema&);
00050         QMF_EXTERN void setAddr(const DataAddr&);
00051         QMF_EXTERN void setProperty(const std::string&, const qpid::types::Variant&);
00052         QMF_EXTERN void overwriteProperties(const qpid::types::Variant::Map&);
00053         QMF_EXTERN bool hasSchema() const;
00054         QMF_EXTERN bool hasAddr() const;
00055         QMF_EXTERN const SchemaId& getSchemaId() const;
00056         QMF_EXTERN const DataAddr& getAddr() const;
00057         QMF_EXTERN const qpid::types::Variant& getProperty(const std::string&) const;
00058         QMF_EXTERN const qpid::types::Variant::Map& getProperties() const;
00059         QMF_EXTERN bool hasAgent() const;
00060         QMF_EXTERN const Agent& getAgent() const;
00061 
00062 #ifndef SWIG
00063     private:
00064         friend class qmf::PrivateImplRef<Data>;
00065         friend struct DataImplAccess;
00066 #endif
00067     };
00068 
00069 }
00070 
00071 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00858.html0000664000076400007640000001355611752725720017336 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::SenderError Member List
This is the complete list of members for qpid::messaging::SenderError, including all inherited members.
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
LinkError(const std::string &)qpid::messaging::LinkError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
SenderError(const std::string &)qpid::messaging::SenderError
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00201.html0000664000076400007640000025757311752725720017325 0ustar00jrossjross00000000000000 qpid::management::ManagementObject Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

#include <qpid/management/ManagementObject.h>

List of all members.

Public Types

typedef void(* writeSchemaCall_t )(std::string &)

Public Member Functions

 ManagementObject (Manageable *_core)
virtual ~ManagementObject ()
virtual writeSchemaCall_t getWriteSchemaCall ()=0
virtual std::string getKey () const =0
virtual void mapEncodeValues (types::Variant::Map &map, bool includeProperties, bool includeStatistics)=0
virtual void mapDecodeValues (const types::Variant::Map &map)=0
virtual void doMethod (std::string &methodName, const types::Variant::Map &inMap, types::Variant::Map &outMap, const std::string &userId)=0
void writeTimestamps (types::Variant::Map &map) const
void readTimestamps (const types::Variant::Map &buf)
virtual uint32_t writePropertiesSize () const
 The following five methods are not pure-virtual because they will only be overridden in cases where QMFv1 is to be supported.
virtual void readProperties (const std::string &)
virtual void writeProperties (std::string &) const
virtual void writeStatistics (std::string &, bool=false)
virtual void doMethod (std::string &, const std::string &, std::string &, const std::string &)
virtual void setReference (ObjectId objectId)
virtual std::stringgetClassName () const =0
virtual std::stringgetPackageName () const =0
virtual uint8_tgetMd5Sum () const =0
void setObjectId (ObjectId oid)
ObjectId getObjectId ()
bool getConfigChanged ()
virtual bool getInstChanged ()
virtual bool hasInst ()
void setForcePublish (bool f)
bool getForcePublish ()
void setUpdateTime ()
void resourceDestroy ()
bool isDeleted ()
void setFlags (uint32_t f)
uint32_t getFlags ()
bool isSameClass (ManagementObject &other)

Static Public Attributes

static const uint8_t MD5_LEN = 16
static int maxThreads
static const uint8_t TYPE_U8 = 1
static const uint8_t TYPE_U16 = 2
static const uint8_t TYPE_U32 = 3
static const uint8_t TYPE_U64 = 4
static const uint8_t TYPE_SSTR = 6
static const uint8_t TYPE_LSTR = 7
static const uint8_t TYPE_ABSTIME = 8
static const uint8_t TYPE_DELTATIME = 9
static const uint8_t TYPE_REF = 10
static const uint8_t TYPE_BOOL = 11
static const uint8_t TYPE_FLOAT = 12
static const uint8_t TYPE_DOUBLE = 13
static const uint8_t TYPE_UUID = 14
static const uint8_t TYPE_FTABLE = 15
static const uint8_t TYPE_S8 = 16
static const uint8_t TYPE_S16 = 17
static const uint8_t TYPE_S32 = 18
static const uint8_t TYPE_S64 = 19
static const uint8_t TYPE_LIST = 21
static const uint8_t ACCESS_RC = 1
static const uint8_t ACCESS_RW = 2
static const uint8_t ACCESS_RO = 3
static const uint8_t DIR_I = 1
static const uint8_t DIR_O = 2
static const uint8_t DIR_IO = 3
static const uint8_t FLAG_CONFIG = 0x01
static const uint8_t FLAG_INDEX = 0x02
static const uint8_t FLAG_END = 0x80
static const uint8_t CLASS_KIND_TABLE = 1
static const uint8_t CLASS_KIND_EVENT = 2

Protected Member Functions

int getThreadIndex ()
void writeTimestamps (std::string &buf) const
void readTimestamps (const std::string &buf)
uint32_t writeTimestampsSize () const

Protected Attributes

uint64_t createTime
uint64_t destroyTime
uint64_t updateTime
ObjectId objectId
bool configChanged
bool instChanged
bool deleted
ManageablecoreObject
Mutex accessLock
uint32_t flags
bool forcePublish

Static Protected Attributes

static int nextThreadIndex

Member Typedef Documentation


Constructor & Destructor Documentation

qpid::management::ManagementObject::ManagementObject ( Manageable _core)
virtual qpid::management::ManagementObject::~ManagementObject ( ) [inline, virtual]

Definition at line 164 of file ManagementObject.h.


Member Function Documentation

virtual void qpid::management::ManagementObject::doMethod ( std::string methodName,
const types::Variant::Map inMap,
types::Variant::Map outMap,
const std::string userId 
) [pure virtual]
virtual void qpid::management::ManagementObject::doMethod ( std::string ,
const std::string ,
std::string ,
const std::string  
) [inline, virtual]

Definition at line 190 of file ManagementObject.h.

virtual std::string& qpid::management::ManagementObject::getClassName ( ) const [pure virtual]

Referenced by isSameClass().

bool qpid::management::ManagementObject::getConfigChanged ( ) [inline]

Definition at line 200 of file ManagementObject.h.

uint32_t qpid::management::ManagementObject::getFlags ( ) [inline]

Definition at line 209 of file ManagementObject.h.

bool qpid::management::ManagementObject::getForcePublish ( ) [inline]

Definition at line 204 of file ManagementObject.h.

virtual bool qpid::management::ManagementObject::getInstChanged ( ) [inline, virtual]

Definition at line 201 of file ManagementObject.h.

virtual std::string qpid::management::ManagementObject::getKey ( ) const [pure virtual]
virtual uint8_t* qpid::management::ManagementObject::getMd5Sum ( ) const [pure virtual]

Referenced by isSameClass().

ObjectId qpid::management::ManagementObject::getObjectId ( ) [inline]

Definition at line 199 of file ManagementObject.h.

virtual std::string& qpid::management::ManagementObject::getPackageName ( ) const [pure virtual]

Referenced by isSameClass().

int qpid::management::ManagementObject::getThreadIndex ( ) [protected]
virtual writeSchemaCall_t qpid::management::ManagementObject::getWriteSchemaCall ( ) [pure virtual]
virtual bool qpid::management::ManagementObject::hasInst ( ) [inline, virtual]

Definition at line 202 of file ManagementObject.h.

bool qpid::management::ManagementObject::isDeleted ( ) [inline]

Definition at line 207 of file ManagementObject.h.

bool qpid::management::ManagementObject::isSameClass ( ManagementObject other) [inline]

Definition at line 210 of file ManagementObject.h.

References getMd5Sum(), getClassName(), and getPackageName().

virtual void qpid::management::ManagementObject::mapDecodeValues ( const types::Variant::Map map) [pure virtual]
virtual void qpid::management::ManagementObject::mapEncodeValues ( types::Variant::Map map,
bool  includeProperties,
bool  includeStatistics 
) [pure virtual]
virtual void qpid::management::ManagementObject::readProperties ( const std::string ) [inline, virtual]

Definition at line 187 of file ManagementObject.h.

void qpid::management::ManagementObject::readTimestamps ( const std::string buf) [protected]
void qpid::management::ManagementObject::readTimestamps ( const types::Variant::Map buf)
void qpid::management::ManagementObject::resourceDestroy ( )
void qpid::management::ManagementObject::setFlags ( uint32_t  f) [inline]

Definition at line 208 of file ManagementObject.h.

void qpid::management::ManagementObject::setForcePublish ( bool  f) [inline]

Definition at line 203 of file ManagementObject.h.

void qpid::management::ManagementObject::setObjectId ( ObjectId  oid) [inline]

Definition at line 198 of file ManagementObject.h.

virtual void qpid::management::ManagementObject::setReference ( ObjectId  objectId) [virtual]
void qpid::management::ManagementObject::setUpdateTime ( )
virtual void qpid::management::ManagementObject::writeProperties ( std::string ) const [inline, virtual]

Definition at line 188 of file ManagementObject.h.

virtual uint32_t qpid::management::ManagementObject::writePropertiesSize ( ) const [inline, virtual]

The following five methods are not pure-virtual because they will only be overridden in cases where QMFv1 is to be supported.

Definition at line 186 of file ManagementObject.h.

virtual void qpid::management::ManagementObject::writeStatistics ( std::string ,
bool  = false 
) [inline, virtual]

Definition at line 189 of file ManagementObject.h.

void qpid::management::ManagementObject::writeTimestamps ( std::string buf) const [protected]
void qpid::management::ManagementObject::writeTimestamps ( types::Variant::Map map) const
uint32_t qpid::management::ManagementObject::writeTimestampsSize ( ) const [protected]

Member Data Documentation

Definition at line 113 of file ManagementObject.h.

Definition at line 115 of file ManagementObject.h.

Definition at line 114 of file ManagementObject.h.

Definition at line 146 of file ManagementObject.h.

Definition at line 126 of file ManagementObject.h.

Definition at line 125 of file ManagementObject.h.

Definition at line 142 of file ManagementObject.h.

Definition at line 138 of file ManagementObject.h.

Definition at line 144 of file ManagementObject.h.

Definition at line 139 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::DIR_I = 1 [static, inherited]

Definition at line 117 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::DIR_IO = 3 [static, inherited]

Definition at line 119 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::DIR_O = 2 [static, inherited]

Definition at line 118 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::FLAG_CONFIG = 0x01 [static, inherited]

Definition at line 121 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::FLAG_END = 0x80 [static, inherited]

Definition at line 123 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::FLAG_INDEX = 0x02 [static, inherited]

Definition at line 122 of file ManagementObject.h.

Definition at line 150 of file ManagementObject.h.

Definition at line 143 of file ManagementObject.h.

Definition at line 159 of file ManagementObject.h.

Definition at line 158 of file ManagementObject.h.

Definition at line 149 of file ManagementObject.h.

Definition at line 99 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_BOOL = 11 [static, inherited]

Definition at line 102 of file ManagementObject.h.

Definition at line 100 of file ManagementObject.h.

Definition at line 104 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_FLOAT = 12 [static, inherited]

Definition at line 103 of file ManagementObject.h.

Definition at line 106 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_LIST = 21 [static, inherited]

Definition at line 111 of file ManagementObject.h.

Definition at line 98 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_REF = 10 [static, inherited]

Definition at line 101 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_S16 = 17 [static, inherited]

Definition at line 108 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_S32 = 18 [static, inherited]

Definition at line 109 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_S64 = 19 [static, inherited]

Definition at line 110 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_S8 = 16 [static, inherited]

Definition at line 107 of file ManagementObject.h.

Definition at line 97 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_U16 = 2 [static, inherited]

Definition at line 94 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_U32 = 3 [static, inherited]

Definition at line 95 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_U64 = 4 [static, inherited]

Definition at line 96 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_U8 = 1 [static, inherited]

Definition at line 93 of file ManagementObject.h.

const uint8_t qpid::management::ManagementItem::TYPE_UUID = 14 [static, inherited]

Definition at line 105 of file ManagementObject.h.

Definition at line 140 of file ManagementObject.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00479.html0000664000076400007640000001406111752725717017333 0ustar00jrossjross00000000000000 qpid/client/SubscriptionManager.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/SubscriptionManager.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::SubscriptionManager
 A class to help create and manage subscriptions. More...
class  qpid::client::AutoCancel
 AutoCancel cancels a subscription in its destructor. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00596.html0000664000076400007640000001522211752725717017333 0ustar00jrossjross00000000000000 Qpid C++ Client API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Qpid C++ Client API

Classes

class  qpid::messaging::Address
 Represents an address to which messages can be sent and from which messages can be received. More...
class  qpid::messaging::Connection
 A connection represents a network connection to a remote endpoint. More...
class  qpid::messaging::Duration
 A duration is a time in milliseconds. More...
struct  qpid::messaging::MessagingException
 This is the base class for all messaging related exceptions thrown by this API. More...
class  qpid::messaging::Handle
 A handle is like a pointer: refers to an underlying implementation object. More...
class  qpid::messaging::Message
 Representation of a message. More...
class  qpid::messaging::Receiver
 Interface through which messages are received. More...
class  qpid::messaging::Sender
 Interface through which messages are sent. More...
class  qpid::messaging::Session
 A session represents a distinct 'conversation' which can involve sending and receiving messages to and from different addresses. More...

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00867.html0000664000076400007640000001101011752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::FailoverUpdates Member List
This is the complete list of members for qpid::messaging::FailoverUpdates, including all inherited members.
FailoverUpdates(Connection &connection)qpid::messaging::FailoverUpdates
~FailoverUpdates()qpid::messaging::FailoverUpdates

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00402_source.html0000664000076400007640000001343211752725717020676 0ustar00jrossjross00000000000000 /home/jross/code/mrg-team/people/jross/manhole/qpid-0.16/cpp/docs/api/doxygen_mainpage.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
/home/jross/code/mrg-team/people/jross/manhole/qpid-0.16/cpp/docs/api/doxygen_mainpage.h
Go to the documentation of this file.
00001 /*
00002  * 
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  * 
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  * 
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  * 
00020  */
00021 
00022 // This header file is just for doxygen documentation purposes.
00023 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00819.html0000664000076400007640000001144611752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Logger::Output Member List
This is the complete list of members for qpid::log::Logger::Output, including all inherited members.
log(const Statement &, const std::string &)=0qpid::log::Logger::Output [pure virtual]
Output()qpid::log::Logger::Output
~Output()qpid::log::Logger::Output [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00418_source.html0000664000076400007640000001764011752725717020712 0ustar00jrossjross00000000000000 qmf/engine/Message.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Message.h
Go to the documentation of this file.
00001 #ifndef _QmfEngineMessage_
00002 #define _QmfEngineMessage_
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  */
00022 
00023 #include "qpid/sys/IntegerTypes.h"
00024 
00025 namespace qmf {
00026 namespace engine {
00027 
00028     struct Message {
00029         char*    body;
00030         uint32_t length;
00031         char*    destination;
00032         char*    routingKey;
00033         char*    replyExchange;
00034         char*    replyKey;
00035         char*    userId;
00036     };
00037 
00038 }
00039 }
00040 
00041 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00077.html0000664000076400007640000001034211752725720017315 0ustar00jrossjross00000000000000 std::list::const_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::list::const_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00865.html0000664000076400007640000001324311752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::ConnectionError Member List
This is the complete list of members for qpid::messaging::ConnectionError, including all inherited members.
ConnectionError(const std::string &)qpid::messaging::ConnectionError
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
MessagingException(const std::string &msg)qpid::messaging::MessagingException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00700.html0000664000076400007640000001104111752725720017303 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::AutoCancel Member List
This is the complete list of members for qpid::client::AutoCancel, including all inherited members.
AutoCancel(SubscriptionManager &sm_, const std::string &tag_)qpid::client::AutoCancel [inline]
~AutoCancel()qpid::client::AutoCancel [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00213.html0000664000076400007640000002151711752725720017313 0ustar00jrossjross00000000000000 qpid::messaging::MessagingException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::MessagingException Struct Reference

This is the base class for all messaging related exceptions thrown by this API. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 MessagingException (const std::string &msg)
virtual ~MessagingException () throw ()
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

This is the base class for all messaging related exceptions thrown by this API.


Constructor & Destructor Documentation

qpid::messaging::MessagingException::MessagingException ( const std::string msg)
virtual qpid::messaging::MessagingException::~MessagingException ( ) throw () [virtual]

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00841.html0000664000076400007640000001111211752725720017310 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ScopedUnlockTemplate Member List
This is the complete list of members for qpid::management::ScopedUnlockTemplate, including all inherited members.
ScopedUnlockTemplate(L &l)qpid::management::ScopedUnlockTemplate [inline]
~ScopedUnlockTemplate()qpid::management::ScopedUnlockTemplate [inline]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00117.html0000664000076400007640000006712311752725720017321 0ustar00jrossjross00000000000000 qpid::framing::ExchangeQueryResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ExchangeQueryResult Class Reference

#include <qpid/framing/ExchangeQueryResult.h>

List of all members.

Public Member Functions

 ExchangeQueryResult (const std::string &_type, bool _durable, bool _notFound, const FieldTable &_arguments)
 ExchangeQueryResult ()
void setType (const std::string &_type)
const std::stringgetType () const
bool hasType () const
void clearTypeFlag ()
void setDurable (bool _durable)
bool getDurable () const
void setNotFound (bool _notFound)
bool getNotFound () const
void setArguments (const FieldTable &_arguments)
const FieldTablegetArguments () const
FieldTablegetArguments ()
bool hasArguments () const
void clearArgumentsFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1793

Friends

std::ostreamoperator<< (std::ostream &, const ExchangeQueryResult &)

Constructor & Destructor Documentation

qpid::framing::ExchangeQueryResult::ExchangeQueryResult ( const std::string _type,
bool  _durable,
bool  _notFound,
const FieldTable _arguments 
) [inline]

Definition at line 44 of file ExchangeQueryResult.h.

qpid::framing::ExchangeQueryResult::ExchangeQueryResult ( ) [inline]

Definition at line 57 of file ExchangeQueryResult.h.


Member Function Documentation

uint32_t qpid::framing::ExchangeQueryResult::bodySize ( ) const
void qpid::framing::ExchangeQueryResult::clearArgumentsFlag ( )
void qpid::framing::ExchangeQueryResult::clearTypeFlag ( )
void qpid::framing::ExchangeQueryResult::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::ExchangeQueryResult::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::ExchangeQueryResult::encode ( Buffer ) const
uint32_t qpid::framing::ExchangeQueryResult::encodedSize ( ) const
void qpid::framing::ExchangeQueryResult::encodeStructBody ( Buffer ) const
const FieldTable& qpid::framing::ExchangeQueryResult::getArguments ( ) const
FieldTable& qpid::framing::ExchangeQueryResult::getArguments ( )
bool qpid::framing::ExchangeQueryResult::getDurable ( ) const
bool qpid::framing::ExchangeQueryResult::getNotFound ( ) const
const std::string& qpid::framing::ExchangeQueryResult::getType ( ) const
bool qpid::framing::ExchangeQueryResult::hasArguments ( ) const
bool qpid::framing::ExchangeQueryResult::hasType ( ) const
void qpid::framing::ExchangeQueryResult::print ( std::ostream out) const
void qpid::framing::ExchangeQueryResult::setArguments ( const FieldTable _arguments)
void qpid::framing::ExchangeQueryResult::setDurable ( bool  _durable)
void qpid::framing::ExchangeQueryResult::setNotFound ( bool  _notFound)
void qpid::framing::ExchangeQueryResult::setType ( const std::string _type)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const ExchangeQueryResult  
) [friend]

Member Data Documentation

Definition at line 43 of file ExchangeQueryResult.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x64.html0000664000076400007640000004705611752725717021312 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- d -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00607.html0000664000076400007640000001240011752725717017317 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::QmfException Member List
This is the complete list of members for qmf::QmfException, including all inherited members.
detailqmf::QmfException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
QmfException(const std::string &msg)qmf::QmfException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~QmfException()qmf::QmfException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00473.html0000664000076400007640000001220711752725717017325 0ustar00jrossjross00000000000000 qpid/client/no_keyword/Session_0_10.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/no_keyword/Session_0_10.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::no_keyword::Session_0_10
 AMQP 0-10 synchronous session API. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client
namespace  qpid::client::no_keyword

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00546_source.html0000664000076400007640000002613411752725717020712 0ustar00jrossjross00000000000000 qpid/messaging/Sender.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Sender.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_SENDER_H
00002 #define QPID_MESSAGING_SENDER_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/messaging/ImportExport.h"
00025 
00026 #include "qpid/messaging/Handle.h"
00027 #include "qpid/sys/IntegerTypes.h"
00028 
00029 #include <string>
00030 
00031 namespace qpid {
00032 namespace messaging {
00033 
00034 #ifndef SWIG
00035 template <class> class PrivateImplRef;
00036 #endif
00037 class Message;
00038 class SenderImpl;
00039 class Session;
00043 class QPID_MESSAGING_CLASS_EXTERN Sender : public qpid::messaging::Handle<SenderImpl>
00044 {
00045   public:
00046     QPID_MESSAGING_EXTERN Sender(SenderImpl* impl = 0);
00047     QPID_MESSAGING_EXTERN Sender(const Sender&);
00048     QPID_MESSAGING_EXTERN ~Sender();
00049     QPID_MESSAGING_EXTERN Sender& operator=(const Sender&);
00050 
00059     QPID_MESSAGING_EXTERN void send(const Message& message, bool sync=false);
00060     QPID_MESSAGING_EXTERN void close();
00061 
00067     QPID_MESSAGING_EXTERN void setCapacity(uint32_t);
00072     QPID_MESSAGING_EXTERN uint32_t getCapacity();
00077     QPID_MESSAGING_EXTERN uint32_t getUnsettled();
00082     QPID_MESSAGING_EXTERN uint32_t getAvailable();
00086     QPID_MESSAGING_EXTERN const std::string& getName() const;
00087 
00091     QPID_MESSAGING_EXTERN Session getSession() const;
00092 #ifndef SWIG
00093   private:
00094   friend class qpid::messaging::PrivateImplRef<Sender>;
00095 #endif
00096 };
00097 }} // namespace qpid::messaging
00098 
00099 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00250.html0000664000076400007640000001604711752725720017316 0ustar00jrossjross00000000000000 qpid::console::Package Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Package Class Reference

#include <qpid/console/Package.h>

List of all members.

Classes

struct  NameHash
struct  NameHashComp

Public Member Functions

 Package (const std::string &n)
const std::stringgetName () const

Constructor & Destructor Documentation

qpid::console::Package::Package ( const std::string n) [inline]

Definition at line 39 of file Package.h.


Member Function Documentation

const std::string& qpid::console::Package::getName ( ) const [inline]

Definition at line 40 of file Package.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00022.html0000664000076400007640000001021711752725720017304 0ustar00jrossjross00000000000000 std::auto_ptr Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::auto_ptr Class Reference

STL class. More...

List of all members.


Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00408.html0000664000076400007640000001663611752725717017335 0ustar00jrossjross00000000000000 qmf/ConsoleEvent.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/ConsoleEvent.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00375.html0000664000076400007640000006674611752725720017341 0ustar00jrossjross00000000000000 qpid::types::Uuid Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::types::Uuid Class Reference

#include <qpid/types/Uuid.h>

List of all members.

Public Member Functions

QPID_TYPES_EXTERN Uuid (bool unique=false)
 If unique is true, this will generate a new unique uuid, if not it will construct a null uuid.
QPID_TYPES_EXTERN Uuid (const Uuid &)
QPID_TYPES_EXTERN Uuidoperator= (const Uuid &)
QPID_TYPES_EXTERN Uuid (const unsigned char *data16)
 Copy the UUID from data16, which must point to a 16-byte UUID.
QPID_TYPES_EXTERN void generate ()
 Set to a new unique identifier.
QPID_TYPES_EXTERN void clear ()
 Set to all zeros.
QPID_TYPES_EXTERN bool isNull () const
 Test for null (all zeros).
QPID_TYPES_EXTERN operator bool () const
QPID_TYPES_EXTERN bool operator! () const
QPID_TYPES_EXTERN std::string str () const
 String value in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.
QPID_TYPES_EXTERN size_t size () const
QPID_TYPES_EXTERN const
unsigned char * 
data () const

Static Public Attributes

static const size_t SIZE

Friends

QPID_TYPES_EXTERN bool operator== (const Uuid &, const Uuid &)
 Returns true if the uuids are equal, false otherwise.
QPID_TYPES_EXTERN bool operator!= (const Uuid &, const Uuid &)
 Returns true if the uuids are NOT equal, false if they are.
QPID_TYPES_EXTERN bool operator< (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN bool operator> (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN bool operator<= (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN bool operator>= (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN std::ostreamoperator<< (std::ostream &, Uuid)
 Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.
QPID_TYPES_EXTERN std::istreamoperator>> (std::istream &, Uuid &)
 Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.

Constructor & Destructor Documentation

QPID_TYPES_EXTERN qpid::types::Uuid::Uuid ( bool  unique = false)

If unique is true, this will generate a new unique uuid, if not it will construct a null uuid.

QPID_TYPES_EXTERN qpid::types::Uuid::Uuid ( const Uuid )
QPID_TYPES_EXTERN qpid::types::Uuid::Uuid ( const unsigned char *  data16)

Copy the UUID from data16, which must point to a 16-byte UUID.


Member Function Documentation

QPID_TYPES_EXTERN void qpid::types::Uuid::clear ( )

Set to all zeros.

QPID_TYPES_EXTERN const unsigned char* qpid::types::Uuid::data ( ) const
QPID_TYPES_EXTERN void qpid::types::Uuid::generate ( )

Set to a new unique identifier.

QPID_TYPES_EXTERN bool qpid::types::Uuid::isNull ( ) const

Test for null (all zeros).

QPID_TYPES_EXTERN qpid::types::Uuid::operator bool ( ) const
QPID_TYPES_EXTERN bool qpid::types::Uuid::operator! ( ) const
QPID_TYPES_EXTERN Uuid& qpid::types::Uuid::operator= ( const Uuid )
QPID_TYPES_EXTERN size_t qpid::types::Uuid::size ( ) const
QPID_TYPES_EXTERN std::string qpid::types::Uuid::str ( ) const

String value in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.


Friends And Related Function Documentation

QPID_TYPES_EXTERN bool operator!= ( const Uuid ,
const Uuid  
) [friend]

Returns true if the uuids are NOT equal, false if they are.

QPID_TYPES_EXTERN bool operator< ( const Uuid ,
const Uuid  
) [friend]
QPID_TYPES_EXTERN std::ostream& operator<< ( std::ostream ,
Uuid   
) [friend]

Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.

QPID_TYPES_EXTERN bool operator<= ( const Uuid ,
const Uuid  
) [friend]
QPID_TYPES_EXTERN bool operator== ( const Uuid ,
const Uuid  
) [friend]

Returns true if the uuids are equal, false otherwise.

QPID_TYPES_EXTERN bool operator> ( const Uuid ,
const Uuid  
) [friend]
QPID_TYPES_EXTERN bool operator>= ( const Uuid ,
const Uuid  
) [friend]
QPID_TYPES_EXTERN std::istream& operator>> ( std::istream ,
Uuid  
) [friend]

Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.


Member Data Documentation

const size_t qpid::types::Uuid::SIZE [static]

Definition at line 35 of file Uuid.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00796.html0000664000076400007640000001400411752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ResourceLimitExceededException Member List
This is the complete list of members for qpid::framing::ResourceLimitExceededException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::ResourceLimitExceededException [inline, virtual]
ResourceLimitExceededException(const std::string &msg=std::string())qpid::framing::ResourceLimitExceededException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00766.html0000664000076400007640000002131411752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::TimeValue Member List
This is the complete list of members for qpid::framing::TimeValue, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
TimeValue(uint64_t v)qpid::framing::TimeValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00484.html0000664000076400007640000001256311752725717017334 0ustar00jrossjross00000000000000 qpid/console/ClassKey.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/ClassKey.h File Reference
#include <string>
#include "qpid/console/ConsoleImportExport.h"
#include "qpid/console/Package.h"
#include "qpid/framing/Buffer.h"

Go to the source code of this file.

Classes

class  qpid::console::ClassKey

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::console

Functions

std::ostreamqpid::console::operator<< (std::ostream &o, const ClassKey &k)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00049.html0000664000076400007640000004437711752725720017333 0ustar00jrossjross00000000000000 qpid::console::ClassKey Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::ClassKey Class Reference

#include <qpid/console/ClassKey.h>

List of all members.

Public Member Functions

 ClassKey (const std::string &package, const std::string &name, const uint8_t *hash)
const std::stringgetPackageName () const
const std::stringgetClassName () const
const uint8_tgetHash () const
std::string getHashString () const
std::string str () const
bool operator== (const ClassKey &other) const
bool operator!= (const ClassKey &other) const
bool operator< (const ClassKey &other) const
bool operator> (const ClassKey &other) const
bool operator<= (const ClassKey &other) const
bool operator>= (const ClassKey &other) const
void encode (framing::Buffer &buffer) const

Static Public Attributes

static const int HASH_SIZE = 16

Constructor & Destructor Documentation

qpid::console::ClassKey::ClassKey ( const std::string package,
const std::string name,
const uint8_t hash 
)

Member Function Documentation

void qpid::console::ClassKey::encode ( framing::Buffer buffer) const
const std::string& qpid::console::ClassKey::getClassName ( ) const [inline]

Definition at line 43 of file ClassKey.h.

const uint8_t* qpid::console::ClassKey::getHash ( ) const [inline]

Definition at line 44 of file ClassKey.h.

std::string qpid::console::ClassKey::getHashString ( ) const
const std::string& qpid::console::ClassKey::getPackageName ( ) const [inline]

Definition at line 42 of file ClassKey.h.

bool qpid::console::ClassKey::operator!= ( const ClassKey other) const
bool qpid::console::ClassKey::operator< ( const ClassKey other) const
bool qpid::console::ClassKey::operator<= ( const ClassKey other) const
bool qpid::console::ClassKey::operator== ( const ClassKey other) const
bool qpid::console::ClassKey::operator> ( const ClassKey other) const
bool qpid::console::ClassKey::operator>= ( const ClassKey other) const
std::string qpid::console::ClassKey::str ( ) const

Member Data Documentation

const int qpid::console::ClassKey::HASH_SIZE = 16 [static]

Definition at line 38 of file ClassKey.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00350.html0000664000076400007640000005300711752725717017322 0ustar00jrossjross00000000000000 qmf::Subscription Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::Subscription Class Reference

#include <qmf/Subscription.h>

List of all members.

Public Member Functions

 Subscription (SubscriptionImpl *impl=0)
 Subscription (const Subscription &)
Subscriptionoperator= (const Subscription &)
 ~Subscription ()
void cancel ()
 Construction: A subscription is created by calling ConsoleSession::subscribe.
bool isActive () const
 Check to see if this subscription is active.
void lock ()
 lock and unlock should be used to bracket a traversal of the data set.
void unlock ()
uint32_t getDataCount () const
Data getData (uint32_t) const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::Subscription::Subscription ( SubscriptionImpl *  impl = 0)
qmf::Subscription::Subscription ( const Subscription )
qmf::Subscription::~Subscription ( )

Member Function Documentation

void qmf::Subscription::cancel ( )

Construction: A subscription is created by calling ConsoleSession::subscribe.

Cancel subscriptions to all subscribed agents. After this is called, the subscription shall be inactive.

Data qmf::Subscription::getData ( uint32_t  ) const
uint32_t qmf::Subscription::getDataCount ( ) const
bool qmf::Subscription::isActive ( ) const

Check to see if this subscription is active.

It is active if it has a live subscription on at least one agent. If it is not active, there is nothing that can be done to make it active, it can only be deleted.

QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

void qmf::Subscription::lock ( )

lock and unlock should be used to bracket a traversal of the data set.

After lock is called, the subscription will not change its set of available data objects. Between calls to getDataCount and getData, no data objects will be added or removed. After unlock is called, the set of data will catch up to any activity that occurred while the lock was in effect.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

Subscription& qmf::Subscription::operator= ( const Subscription )
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.

void qmf::Subscription::unlock ( )

Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00475_source.html0000664000076400007640000003712611752725717020716 0ustar00jrossjross00000000000000 qpid/client/QueueOptions.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/QueueOptions.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 
00022 #include "qpid/client/ClientImportExport.h"
00023 #include "qpid/framing/FieldTable.h"
00024 
00025 #ifndef _QueueOptions_
00026 #define _QueueOptions_
00027 
00028 namespace qpid {
00029 namespace client {
00030 
00031 enum QueueSizePolicy {NONE, REJECT, FLOW_TO_DISK, RING, RING_STRICT};
00032 enum QueueOrderingPolicy {FIFO, LVQ, LVQ_NO_BROWSE};
00033 
00038 class QPID_CLIENT_CLASS_EXTERN QueueOptions: public framing::FieldTable
00039 {
00040   public:
00041     QPID_CLIENT_EXTERN QueueOptions();
00042     QPID_CLIENT_EXTERN virtual ~QueueOptions();
00043 
00056     QPID_CLIENT_EXTERN void setSizePolicy(QueueSizePolicy sp, uint64_t maxSize, uint32_t maxCount );
00057 
00062     QPID_CLIENT_EXTERN void setPersistLastNode();
00063 
00067     QPID_CLIENT_EXTERN void setOrdering(QueueOrderingPolicy op);
00068 
00072     QPID_CLIENT_EXTERN void clearSizePolicy();
00073 
00077     QPID_CLIENT_EXTERN void clearPersistLastNode();
00078 
00082     QPID_CLIENT_EXTERN void getLVQKey(std::string& key);
00083 
00087     QPID_CLIENT_EXTERN void clearOrdering();
00088 
00109     QPID_CLIENT_EXTERN void enableQueueEvents(bool enqueueOnly);
00110 
00111     static QPID_CLIENT_EXTERN const std::string strMaxCountKey;
00112     static QPID_CLIENT_EXTERN const std::string strMaxSizeKey;
00113     static QPID_CLIENT_EXTERN const std::string strTypeKey;
00114     static QPID_CLIENT_EXTERN const std::string strREJECT;
00115     static QPID_CLIENT_EXTERN const std::string strFLOW_TO_DISK;
00116     static QPID_CLIENT_EXTERN const std::string strRING;
00117     static QPID_CLIENT_EXTERN const std::string strRING_STRICT;
00118     static QPID_CLIENT_EXTERN const std::string strLastValueQueue;
00119     static QPID_CLIENT_EXTERN const std::string strPersistLastNode;
00120     static QPID_CLIENT_EXTERN const std::string strLVQMatchProperty;
00121     static QPID_CLIENT_EXTERN const std::string strLastValueQueueNoBrowse;
00122     static QPID_CLIENT_EXTERN const std::string strQueueEventMode;
00123 };
00124 
00125 }
00126 }
00127 
00128 
00129 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00347.html0000664000076400007640000010311011752725720017311 0ustar00jrossjross00000000000000 qpid::console::StringValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::StringValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 StringValue (const std::string &v)
 StringValue (framing::Buffer &buffer, int tc)
std::string str () const
bool isString () const
std::string asString () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isInt64 () const
virtual bool isBool () const
virtual bool isFloat () const
virtual bool isDouble () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual int64_t asInt64 () const
virtual bool asBool () const
virtual float asFloat () const
virtual double asDouble () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::StringValue::StringValue ( const std::string v) [inline]

Definition at line 141 of file Value.h.

qpid::console::StringValue::StringValue ( framing::Buffer buffer,
int  tc 
)

Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

virtual double qpid::console::Value::asDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 67 of file Value.h.

virtual float qpid::console::Value::asFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 66 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

std::string qpid::console::StringValue::asString ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 145 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

virtual bool qpid::console::Value::isDouble ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::DoubleValue, and qpid::console::FloatValue.

Definition at line 55 of file Value.h.

virtual bool qpid::console::Value::isFloat ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::FloatValue.

Definition at line 54 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

bool qpid::console::StringValue::isString ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 144 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::StringValue::str ( ) const [inline, virtual]

Implements qpid::console::Value.

Definition at line 143 of file Value.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00545_source.html0000664000076400007640000003004211752725717020702 0ustar00jrossjross00000000000000 qpid/messaging/Receiver.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/Receiver.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_RECEIVER_H
00002 #define QPID_MESSAGING_RECEIVER_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include "qpid/messaging/ImportExport.h"
00025 
00026 #include "qpid/messaging/exceptions.h"
00027 #include "qpid/messaging/Handle.h"
00028 #include "qpid/messaging/Duration.h"
00029 
00030 namespace qpid {
00031 namespace messaging {
00032 
00033 #ifndef SWIG
00034 template <class> class PrivateImplRef;
00035 #endif
00036 
00037 class Message;
00038 class ReceiverImpl;
00039 class Session;
00040 
00044 class QPID_MESSAGING_CLASS_EXTERN Receiver : public qpid::messaging::Handle<ReceiverImpl>
00045 {
00046   public:
00047     QPID_MESSAGING_EXTERN Receiver(ReceiverImpl* impl = 0);
00048     QPID_MESSAGING_EXTERN Receiver(const Receiver&);
00049     QPID_MESSAGING_EXTERN ~Receiver();
00050     QPID_MESSAGING_EXTERN Receiver& operator=(const Receiver&);
00056     QPID_MESSAGING_EXTERN bool get(Message& message, Duration timeout=Duration::FOREVER);
00066     QPID_MESSAGING_EXTERN Message get(Duration timeout=Duration::FOREVER);
00078     QPID_MESSAGING_EXTERN bool fetch(Message& message, Duration timeout=Duration::FOREVER);
00090     QPID_MESSAGING_EXTERN Message fetch(Duration timeout=Duration::FOREVER);
00096     QPID_MESSAGING_EXTERN void setCapacity(uint32_t);
00103     QPID_MESSAGING_EXTERN uint32_t getCapacity();
00108     QPID_MESSAGING_EXTERN uint32_t getAvailable();
00115     QPID_MESSAGING_EXTERN uint32_t getUnsettled();
00116 
00120     QPID_MESSAGING_EXTERN void close();
00121 
00125     QPID_MESSAGING_EXTERN bool isClosed() const;
00126 
00130     QPID_MESSAGING_EXTERN const std::string& getName() const;
00131 
00135     QPID_MESSAGING_EXTERN Session getSession() const;
00136 
00137 #ifndef SWIG
00138   private:
00139   friend class qpid::messaging::PrivateImplRef<Receiver>;
00140 #endif
00141 };
00142 }} // namespace qpid::messaging
00143 
00144 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00547_source.html0000664000076400007640000004207011752725717020710 0ustar00jrossjross00000000000000 qpid/Msg.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Msg.h
Go to the documentation of this file.
00001 #ifndef QPID_MSG_H
00002 #define QPID_MSG_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include <sstream>
00026 #include <iostream>
00027 #include "qpid/types/ImportExport.h"
00028 
00029 namespace qpid {
00030 
00041 struct Msg {
00042     std::ostringstream os;
00043     Msg() {}
00044     Msg(const Msg& m) : os(m.str()) {}
00045     std::string str() const { return os.str(); }
00046     operator std::string() const { return str(); }
00047 
00048     Msg& operator<<(long n) { os << n; return *this; }
00049     Msg& operator<<(unsigned long n) { os << n; return *this; }
00050     Msg& operator<<(bool n) { os << n; return *this; }
00051     Msg& operator<<(short n) { os << n; return *this; }
00052     Msg& operator<<(unsigned short n) { os << n; return *this; }
00053     Msg& operator<<(int n) { os << n; return *this; }
00054     Msg& operator<<(unsigned int n) { os << n; return *this; }
00055 #ifdef _GLIBCXX_USE_LONG_LONG
00056     Msg& operator<<(long long n) { os << n; return *this; }
00057     Msg& operator<<(unsigned long long n) { os << n; return *this; }
00058 #endif
00059     Msg& operator<<(double n) { os << n; return *this; }
00060     Msg& operator<<(float n) { os << n; return *this; }
00061     Msg& operator<<(long double n) { os << n; return *this; }
00062 
00063     template <class T> Msg& operator<<(const T& t) { os <<t; return *this; }
00064 };
00065 
00066 
00067 
00068 inline std::ostream& operator<<(std::ostream& o, const Msg& m) {
00069     return o << m.str();
00070 }
00071 
00073 #define QUOTE_(x) #x
00074 #define QUOTE(x) QUOTE_(x)
00075 #define QPID_MSG(message) (::qpid::Msg() << message << " (" __FILE__ ":" QUOTE(__LINE__) ")")
00076 
00077 } // namespace qpid
00078 
00079 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00387.html0000664000076400007640000006105611752725720017331 0ustar00jrossjross00000000000000 qpid::framing::VoidValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::VoidValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 VoidValue ()
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::VoidValue::VoidValue ( )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00095.html0000664000076400007640000006105511752725717017332 0ustar00jrossjross00000000000000 qmf::DataAddr Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

#include <qmf/DataAddr.h>

List of all members.

Public Member Functions

 DataAddr (DataAddrImpl *impl=0)
 DataAddr (const DataAddr &)
DataAddroperator= (const DataAddr &)
 ~DataAddr ()
bool operator== (const DataAddr &)
bool operator< (const DataAddr &)
 DataAddr (const qpid::types::Variant::Map &)
 DataAddr (const std::string &name, const std::string &agentName, uint32_t agentEpoch=0)
const std::stringgetName () const
const std::stringgetAgentName () const
uint32_t getAgentEpoch () const
qpid::types::Variant::Map asMap () const
bool operator== (const DataAddr &) const
bool operator< (const DataAddr &) const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::DataAddr::DataAddr ( DataAddrImpl *  impl = 0)
qmf::DataAddr::DataAddr ( const DataAddr )
qmf::DataAddr::~DataAddr ( )
qmf::DataAddr::DataAddr ( const qpid::types::Variant::Map )
qmf::DataAddr::DataAddr ( const std::string name,
const std::string agentName,
uint32_t  agentEpoch = 0 
)

Member Function Documentation

qpid::types::Variant::Map qmf::DataAddr::asMap ( ) const
uint32_t qmf::DataAddr::getAgentEpoch ( ) const
const std::string& qmf::DataAddr::getAgentName ( ) const
const std::string& qmf::DataAddr::getName ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

bool qmf::DataAddr::operator< ( const DataAddr )
bool qmf::DataAddr::operator< ( const DataAddr ) const
DataAddr& qmf::DataAddr::operator= ( const DataAddr )
bool qmf::DataAddr::operator== ( const DataAddr )
bool qmf::DataAddr::operator== ( const DataAddr ) const
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x70.html0000664000076400007640000003532411752725717022315 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- p -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00553.html0000664000076400007640000001214511752725717017325 0ustar00jrossjross00000000000000 qpid/sys/ExceptionHolder.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/ExceptionHolder.h File Reference
#include <boost/shared_ptr.hpp>

Go to the source code of this file.

Classes

struct  qpid::sys::Raisable
class  qpid::sys::ExceptionHolder
 Holder for exceptions. More...
struct  qpid::sys::ExceptionHolder::Wrapper

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00492.html0000664000076400007640000001255211752725717017331 0ustar00jrossjross00000000000000 qpid/framing/amqp_structs.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/amqp_structs.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00799.html0000664000076400007640000001373211752725720017336 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::NotImplementedException Member List
This is the complete list of members for qpid::framing::NotImplementedException, including all inherited members.
codeqpid::SessionException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::NotImplementedException [inline, virtual]
NotImplementedException(const std::string &msg=std::string())qpid::framing::NotImplementedException [inline]
SessionException(framing::execution::ErrorCode code_, const std::string &message)qpid::SessionException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00211.html0000664000076400007640000003231411752725717017314 0ustar00jrossjross00000000000000 qpid::client::MessageReplayTracker Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::MessageReplayTracker Class Reference

Utility to track messages sent asynchronously, allowing those that are indoubt to be replayed over a new session. More...

#include <qpid/client/MessageReplayTracker.h>

List of all members.

Classes

struct  ReplayRecord

Public Member Functions

 MessageReplayTracker (uint flushInterval)
void send (const Message &message, const std::string &destination="")
void init (AsyncSession session)
void replay (AsyncSession session)
void setFlushInterval (uint interval)
uint getFlushInterval ()
void checkCompletion ()
template<class F >
void foreach (F &f)

Detailed Description

Utility to track messages sent asynchronously, allowing those that are indoubt to be replayed over a new session.


Constructor & Destructor Documentation

qpid::client::MessageReplayTracker::MessageReplayTracker ( uint  flushInterval)

Member Function Documentation

void qpid::client::MessageReplayTracker::checkCompletion ( )
template<class F >
void qpid::client::MessageReplayTracker::foreach ( F &  f) [inline]

Definition at line 48 of file MessageReplayTracker.h.

uint qpid::client::MessageReplayTracker::getFlushInterval ( )
void qpid::client::MessageReplayTracker::init ( AsyncSession  session)
void qpid::client::MessageReplayTracker::replay ( AsyncSession  session)
void qpid::client::MessageReplayTracker::send ( const Message message,
const std::string destination = "" 
)
void qpid::client::MessageReplayTracker::setFlushInterval ( uint  interval)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00376.html0000664000076400007640000006123111752725720017322 0ustar00jrossjross00000000000000 qpid::framing::UuidValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::UuidValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 UuidValue (const unsigned char *)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::UuidValue::UuidValue ( const unsigned char *  )

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00104.html0000664000076400007640000002455711752725720017321 0ustar00jrossjross00000000000000 qpid::messaging::Duration Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Duration Class Reference

A duration is a time in milliseconds. More...

#include <qpid/messaging/Duration.h>

List of all members.

Public Member Functions

 Duration (uint64_t milliseconds)
uint64_t getMilliseconds () const

Static Public Attributes

static const Duration FOREVER
static const Duration IMMEDIATE
static const Duration SECOND
static const Duration MINUTE

Detailed Description

A duration is a time in milliseconds.


Constructor & Destructor Documentation

qpid::messaging::Duration::Duration ( uint64_t  milliseconds) [explicit]

Member Function Documentation

uint64_t qpid::messaging::Duration::getMilliseconds ( ) const

Member Data Documentation

Definition at line 40 of file Duration.h.

Definition at line 41 of file Duration.h.

Definition at line 43 of file Duration.h.

Definition at line 42 of file Duration.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00227.html0000664000076400007640000001757611752725720017332 0ustar00jrossjross00000000000000 qpid::messaging::NotFound Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::NotFound Struct Reference

Thrown on attempts to create a sender or receiver to a non-existent node. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 NotFound (const std::string &msg)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown on attempts to create a sender or receiver to a non-existent node.


Constructor & Destructor Documentation

qpid::messaging::NotFound::NotFound ( const std::string msg)

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00659.html0000664000076400007640000001070511752725717017334 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineAllocator::Store Member List
This is the complete list of members for qpid::InlineAllocator::Store, including all inherited members.
aligner_qpid::InlineAllocator::Store
sizer_qpid::InlineAllocator::Store

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00480.html0000664000076400007640000001327311752725717017327 0ustar00jrossjross00000000000000 qpid/client/SubscriptionSettings.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/SubscriptionSettings.h File Reference

Go to the source code of this file.

Classes

struct  qpid::client::SubscriptionSettings
 Settings for a subscription. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Enumerations

enum  qpid::client::CompletionMode { qpid::client::MANUAL_COMPLETION = 0, qpid::client::COMPLETE_ON_DELIVERY = 1, qpid::client::COMPLETE_ON_ACCEPT = 2 }

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00262.html0000664000076400007640000002156711752725717017332 0ustar00jrossjross00000000000000 qmf::engine::QueryResponse Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::QueryResponse Class Reference

#include <qmf/engine/Console.h>

List of all members.

Public Member Functions

 ~QueryResponse ()
uint32_t getStatus () const
const ValuegetException () const
uint32_t getObjectCount () const
const ObjectgetObject (uint32_t idx) const

Constructor & Destructor Documentation

qmf::engine::QueryResponse::~QueryResponse ( )

Member Function Documentation

const Value* qmf::engine::QueryResponse::getException ( ) const
const Object* qmf::engine::QueryResponse::getObject ( uint32_t  idx) const
uint32_t qmf::engine::QueryResponse::getObjectCount ( ) const
uint32_t qmf::engine::QueryResponse::getStatus ( ) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00066.html0000664000076400007640000003270411752725720017321 0ustar00jrossjross00000000000000 qpid::console::Broker::ConnectionThread Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Broker::ConnectionThread Class Reference

List of all members.

Public Types

typedef boost::function0< void > Functor
 Type to represent a runnable as a Functor.

Public Member Functions

 ConnectionThread (Broker &_broker)
 ~ConnectionThread ()
void sendBuffer (qpid::framing::Buffer &buf, uint32_t length, const std::string &exchange="qpid.management", const std::string &routingKey="broker")
void bindExchange (const std::string &exchange, const std::string &key)
void shutdown ()
Functor functor ()
 Create a functor object that will call this->run().

Member Typedef Documentation

typedef boost::function0<void> qpid::sys::Runnable::Functor [inherited]

Type to represent a runnable as a Functor.

Definition at line 37 of file Runnable.h.


Constructor & Destructor Documentation

qpid::console::Broker::ConnectionThread::ConnectionThread ( Broker _broker) [inline]

Definition at line 102 of file Broker.h.

qpid::console::Broker::ConnectionThread::~ConnectionThread ( )

Member Function Documentation

void qpid::console::Broker::ConnectionThread::bindExchange ( const std::string exchange,
const std::string key 
)
Functor qpid::sys::Runnable::functor ( ) [inherited]

Create a functor object that will call this->run().

void qpid::console::Broker::ConnectionThread::sendBuffer ( qpid::framing::Buffer buf,
uint32_t  length,
const std::string exchange = "qpid.management",
const std::string routingKey = "broker" 
)
void qpid::console::Broker::ConnectionThread::shutdown ( )

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00434_source.html0000664000076400007640000011476011752725717020711 0ustar00jrossjross00000000000000 qpid/console/Value.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Value.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_VALUE_H_
00022 #define _QPID_CONSOLE_VALUE_H_
00023 
00024 #include "qpid/Exception.h"
00025 #include "qpid/framing/Uuid.h"
00026 #include "qpid/framing/FieldTable.h"
00027 #include "qpid/console/ObjectId.h"
00028 #include <boost/shared_ptr.hpp>
00029 
00030 namespace qpid {
00031 namespace framing {
00032     class Buffer;
00033 }
00034 namespace console {
00035 
00039     class Value {
00040 
00041     public:
00042         typedef boost::shared_ptr<Value> Ptr;
00043         virtual ~Value() {}
00044         virtual std::string str() const = 0;
00045 
00046         virtual bool isNull() const { return false; }
00047         virtual bool isObjectId() const { return false; }
00048         virtual bool isUint() const { return false; }
00049         virtual bool isInt() const { return false; }
00050         virtual bool isUint64() const { return false; }
00051         virtual bool isInt64() const { return false; }
00052         virtual bool isString() const { return false; }
00053         virtual bool isBool() const { return false; }
00054         virtual bool isFloat() const { return false; }
00055         virtual bool isDouble() const { return false; }
00056         virtual bool isUuid() const { return false; }
00057         virtual bool isMap() const { return false; }
00058 
00059         virtual ObjectId asObjectId() const { incompatible(); return ObjectId(); }
00060         virtual uint32_t asUint() const { incompatible(); return 0; }
00061         virtual int32_t asInt() const { incompatible(); return 0; }
00062         virtual uint64_t asUint64() const { incompatible(); return 0; }
00063         virtual int64_t asInt64() const { incompatible(); return 0; }
00064         virtual std::string asString() const { incompatible(); return std::string(); }
00065         virtual bool asBool() const { incompatible(); return false; }
00066         virtual float asFloat() const { incompatible(); return 0.0; }
00067         virtual double asDouble() const { incompatible(); return 0.0; }
00068         virtual framing::Uuid asUuid() const { incompatible(); return framing::Uuid(); }
00069         virtual framing::FieldTable asMap() const { incompatible(); return framing::FieldTable(); }
00070 
00071     private:
00072         void incompatible() const {
00073             throw Exception("Incompatible Type");
00074         }
00075     };
00076 
00077     class NullValue : public Value {
00078     public:
00079         NullValue() {}
00080         std::string str() const;
00081         bool isNull() const { return true; }
00082     };
00083 
00084     class RefValue : public Value {
00085     public:
00086         RefValue(ObjectId v) : value(v) {}
00087         RefValue(framing::Buffer& buffer);
00088         std::string str() const;
00089         bool isObjectId() const { return true; }
00090         ObjectId asObjectId() const { return value; }
00091     private:
00092         ObjectId value;
00093     };
00094 
00095     class UintValue : public Value {
00096     public:
00097         UintValue(uint32_t v) : value(v) {}
00098         std::string str() const;
00099         bool isUint() const { return true; }
00100         uint32_t asUint() const { return value; }
00101         bool isUint64() const { return true; }
00102         uint64_t asUint64() const { return (uint64_t) value; }
00103     private:
00104         uint32_t value;
00105     };
00106 
00107     class IntValue : public Value {
00108     public:
00109         IntValue(int32_t v) : value(v) {}
00110         std::string str() const;
00111         bool isInt() const { return true; }
00112         int32_t asInt() const { return value; }
00113         bool isInt64() const { return true; }
00114         int64_t asInt64() const { return (int64_t) value; }
00115     private:
00116         int32_t value;
00117     };
00118 
00119     class Uint64Value : public Value {
00120     public:
00121         Uint64Value(uint64_t v) : value(v) {}
00122         std::string str() const;
00123         bool isUint64() const { return true; }
00124         uint64_t asUint64() const { return value; }
00125     private:
00126         uint64_t value;
00127     };
00128 
00129     class Int64Value : public Value {
00130     public:
00131         Int64Value(int64_t v) : value(v) {}
00132         std::string str() const;
00133         bool isInt64() const { return true; }
00134         int64_t asInt64() const { return value; }
00135     private:
00136         int64_t value;
00137     };
00138 
00139     class StringValue : public Value {
00140     public:
00141         StringValue(const std::string& v) : value(v) {}
00142         StringValue(framing::Buffer& buffer, int tc);
00143         std::string str() const { return value; }
00144         bool isString() const { return true; }
00145         std::string asString() const { return value; }
00146     private:
00147         std::string value;
00148     };
00149 
00150     class BoolValue : public Value {
00151     public:
00152         BoolValue(bool v) : value(v) {}
00153         BoolValue(uint8_t v) : value(v != 0) {}
00154         std::string str() const;
00155         bool isBool() const { return true; }
00156         bool asBool() const { return value; }
00157     private:
00158         bool value;
00159     };
00160 
00161     class FloatValue : public Value {
00162     public:
00163         FloatValue(float v) : value(v) {}
00164         std::string str() const;
00165         bool isFloat() const { return true; }
00166         float asFloat() const { return value; }
00167         bool isDouble() const { return true; }
00168         double asDouble() const { return (double) value; }
00169     private:
00170         float value;
00171     };
00172 
00173     class DoubleValue : public Value {
00174     public:
00175         DoubleValue(double v) : value(v) {}
00176         std::string str() const;
00177         bool isDouble() const { return true; }
00178         double asDouble() const { return value; }
00179     private:
00180         double value;
00181     };
00182 
00183     class UuidValue : public Value {
00184     public:
00185         UuidValue(const framing::Uuid& v) : value(v) {}
00186         UuidValue(framing::Buffer& buffer);
00187         std::string str() const { return value.str(); }
00188         bool isUuid() const { return true; }
00189         framing::Uuid asUuid() const { return value; }
00190     private:
00191         framing::Uuid value;
00192     };
00193 
00194     class MapValue : public Value {
00195     public:
00196         MapValue(const framing::FieldTable& v) : value(v) {}
00197         MapValue(framing::Buffer& buffer);
00198         std::string str() const;
00199         bool isMap() const { return true; }
00200         framing::FieldTable asMap() const { return value; }
00201     private:
00202         framing::FieldTable value;
00203     };
00204 
00205     class ValueFactory {
00206     public:
00207         static Value::Ptr newValue(int typeCode, framing::Buffer& buffer);
00208         static void encodeValue(int typeCode, Value::Ptr value, framing::Buffer& buffer);
00209     };
00210 }
00211 }
00212 
00213 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00547.html0000664000076400007640000002117111752725717017327 0ustar00jrossjross00000000000000 qpid/Msg.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/Msg.h File Reference
#include <sstream>
#include <iostream>
#include "qpid/types/ImportExport.h"

Go to the source code of this file.

Classes

struct  qpid::Msg
 A simple wrapper for std::ostringstream that allows in place construction of a message and automatic conversion to string. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


Defines

#define QUOTE_(x)   #x
 Construct a message using operator << and append (file:line)
#define QUOTE(x)   QUOTE_(x)
#define QPID_MSG(message)   (::qpid::Msg() << message << " (" __FILE__ ":" QUOTE(__LINE__) ")")

Functions

std::ostreamqpid::operator<< (std::ostream &o, const Msg &m)

Define Documentation

#define QPID_MSG (   message)    (::qpid::Msg() << message << " (" __FILE__ ":" QUOTE(__LINE__) ")")

Definition at line 75 of file Msg.h.

#define QUOTE (   x)    QUOTE_(x)

Definition at line 74 of file Msg.h.

#define QUOTE_ (   x)    #x

Construct a message using operator << and append (file:line)

Definition at line 73 of file Msg.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00666.html0000664000076400007640000001220511752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Options::Exception Member List
This is the complete list of members for qpid::Options::Exception, including all inherited members.
Exception(const std::string &msg)qpid::Options::Exception [inline]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00740.html0000664000076400007640000002367711752725720017331 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Array Member List
This is the complete list of members for qpid::framing::Array, including all inherited members.
add(ValuePtr value)qpid::framing::Array [inline]
Array()qpid::framing::Array
Array(TypeCode type)qpid::framing::Array
Array(uint8_t type)qpid::framing::Array
Array(const std::vector< std::string > &in)qpid::framing::Array
back() const qpid::framing::Array [inline]
begin() const qpid::framing::Array [inline]
begin()qpid::framing::Array [inline]
collect(std::vector< T > &out) const qpid::framing::Array [inline]
const_iterator typedefqpid::framing::Array
count() const qpid::framing::Array
decode(Buffer &buffer)qpid::framing::Array
encode(Buffer &buffer) const qpid::framing::Array
encodedSize() const qpid::framing::Array
end() const qpid::framing::Array [inline]
end()qpid::framing::Array [inline]
erase(iterator i)qpid::framing::Array [inline]
front() const qpid::framing::Array [inline]
getType() const qpid::framing::Array [inline]
insert(iterator i, ValuePtr value)qpid::framing::Array
iterator typedefqpid::framing::Array
operator<<(std::ostream &out, const Array &body)qpid::framing::Array [friend]
operator==(const Array &other) const qpid::framing::Array
pop_back()qpid::framing::Array [inline]
push_back(ValuePtr value)qpid::framing::Array [inline]
size() const qpid::framing::Array [inline]
ValuePtr typedefqpid::framing::Array
ValueVector typedefqpid::framing::Array

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00782.html0000664000076400007640000001511511752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Header Member List
This is the complete list of members for qpid::framing::Header, including all inherited members.
bodySize() const qpid::framing::Header
decode(Buffer &, uint32_t=0)qpid::framing::Header
decodeStructBody(Buffer &, uint32_t=0)qpid::framing::Header
encode(Buffer &) const qpid::framing::Header
encodedSize() const qpid::framing::Header
encodeStructBody(Buffer &) const qpid::framing::Header
getSync() const qpid::framing::Header
Header(bool _sync)qpid::framing::Header [inline]
Header()qpid::framing::Header [inline]
operator<<(std::ostream &, const Header &)qpid::framing::Header [friend]
print(std::ostream &out) const qpid::framing::Header
setSync(bool _sync)qpid::framing::Header

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00210.html0000664000076400007640000014204011752725720017303 0ustar00jrossjross00000000000000 qpid::framing::MessageProperties Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::MessageProperties Class Reference

#include <qpid/framing/MessageProperties.h>

List of all members.

Public Member Functions

 MessageProperties (uint64_t _contentLength, const Uuid &_messageId, const std::string &_correlationId, const ReplyTo &_replyTo, const std::string &_contentType, const std::string &_contentEncoding, const std::string &_userId, const std::string &_appId, const FieldTable &_applicationHeaders)
 MessageProperties ()
void setContentLength (uint64_t _contentLength)
uint64_t getContentLength () const
bool hasContentLength () const
void clearContentLengthFlag ()
void setMessageId (const Uuid &_messageId)
const UuidgetMessageId () const
bool hasMessageId () const
void clearMessageIdFlag ()
void setCorrelationId (const std::string &_correlationId)
const std::stringgetCorrelationId () const
bool hasCorrelationId () const
void clearCorrelationIdFlag ()
void setReplyTo (const ReplyTo &_replyTo)
const ReplyTogetReplyTo () const
bool hasReplyTo () const
void clearReplyToFlag ()
void setContentType (const std::string &_contentType)
const std::stringgetContentType () const
bool hasContentType () const
void clearContentTypeFlag ()
void setContentEncoding (const std::string &_contentEncoding)
const std::stringgetContentEncoding () const
bool hasContentEncoding () const
void clearContentEncodingFlag ()
void setUserId (const std::string &_userId)
const std::stringgetUserId () const
bool hasUserId () const
void clearUserIdFlag ()
void setAppId (const std::string &_appId)
const std::stringgetAppId () const
bool hasAppId () const
void clearAppIdFlag ()
void setApplicationHeaders (const FieldTable &_applicationHeaders)
const FieldTablegetApplicationHeaders () const
FieldTablegetApplicationHeaders ()
bool hasApplicationHeaders () const
void clearApplicationHeadersFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1027

Friends

std::ostreamoperator<< (std::ostream &, const MessageProperties &)

Constructor & Destructor Documentation

qpid::framing::MessageProperties::MessageProperties ( uint64_t  _contentLength,
const Uuid _messageId,
const std::string _correlationId,
const ReplyTo _replyTo,
const std::string _contentType,
const std::string _contentEncoding,
const std::string _userId,
const std::string _appId,
const FieldTable _applicationHeaders 
) [inline]

Definition at line 52 of file MessageProperties.h.

qpid::framing::MessageProperties::MessageProperties ( ) [inline]

Definition at line 82 of file MessageProperties.h.


Member Function Documentation

uint32_t qpid::framing::MessageProperties::bodySize ( ) const
void qpid::framing::MessageProperties::clearAppIdFlag ( )
void qpid::framing::MessageProperties::clearApplicationHeadersFlag ( )
void qpid::framing::MessageProperties::clearContentEncodingFlag ( )
void qpid::framing::MessageProperties::clearContentLengthFlag ( )
void qpid::framing::MessageProperties::clearContentTypeFlag ( )
void qpid::framing::MessageProperties::clearCorrelationIdFlag ( )
void qpid::framing::MessageProperties::clearMessageIdFlag ( )
void qpid::framing::MessageProperties::clearReplyToFlag ( )
void qpid::framing::MessageProperties::clearUserIdFlag ( )
void qpid::framing::MessageProperties::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::MessageProperties::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::MessageProperties::encode ( Buffer ) const
uint32_t qpid::framing::MessageProperties::encodedSize ( ) const
void qpid::framing::MessageProperties::encodeStructBody ( Buffer ) const
const std::string& qpid::framing::MessageProperties::getAppId ( ) const
const FieldTable& qpid::framing::MessageProperties::getApplicationHeaders ( ) const
FieldTable& qpid::framing::MessageProperties::getApplicationHeaders ( )
const std::string& qpid::framing::MessageProperties::getContentEncoding ( ) const
uint64_t qpid::framing::MessageProperties::getContentLength ( ) const
const std::string& qpid::framing::MessageProperties::getContentType ( ) const
const std::string& qpid::framing::MessageProperties::getCorrelationId ( ) const
const Uuid& qpid::framing::MessageProperties::getMessageId ( ) const
const ReplyTo& qpid::framing::MessageProperties::getReplyTo ( ) const
const std::string& qpid::framing::MessageProperties::getUserId ( ) const
bool qpid::framing::MessageProperties::hasAppId ( ) const
bool qpid::framing::MessageProperties::hasApplicationHeaders ( ) const
bool qpid::framing::MessageProperties::hasContentEncoding ( ) const
bool qpid::framing::MessageProperties::hasContentLength ( ) const
bool qpid::framing::MessageProperties::hasContentType ( ) const
bool qpid::framing::MessageProperties::hasCorrelationId ( ) const
bool qpid::framing::MessageProperties::hasMessageId ( ) const
bool qpid::framing::MessageProperties::hasReplyTo ( ) const
bool qpid::framing::MessageProperties::hasUserId ( ) const
void qpid::framing::MessageProperties::print ( std::ostream out) const
void qpid::framing::MessageProperties::setAppId ( const std::string _appId)
void qpid::framing::MessageProperties::setApplicationHeaders ( const FieldTable _applicationHeaders)
void qpid::framing::MessageProperties::setContentEncoding ( const std::string _contentEncoding)
void qpid::framing::MessageProperties::setContentLength ( uint64_t  _contentLength)
void qpid::framing::MessageProperties::setContentType ( const std::string _contentType)
void qpid::framing::MessageProperties::setCorrelationId ( const std::string _correlationId)
void qpid::framing::MessageProperties::setMessageId ( const Uuid _messageId)
void qpid::framing::MessageProperties::setReplyTo ( const ReplyTo _replyTo)
void qpid::framing::MessageProperties::setUserId ( const std::string _userId)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const MessageProperties  
) [friend]

Member Data Documentation

Definition at line 51 of file MessageProperties.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00484_source.html0000664000076400007640000003152411752725717020712 0ustar00jrossjross00000000000000 qpid/console/ClassKey.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/ClassKey.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_CLASSKEY_H_
00022 #define _QPID_CONSOLE_CLASSKEY_H_
00023 
00024 #include <string>
00025 #include "qpid/console/ConsoleImportExport.h"
00026 #include "qpid/console/Package.h"
00027 #include "qpid/framing/Buffer.h"
00028 
00029 namespace qpid {
00030 namespace console {
00031 
00036     class QPID_CONSOLE_CLASS_EXTERN ClassKey {
00037     public:
00038         QPID_CONSOLE_EXTERN static const int HASH_SIZE = 16;
00039 
00040         QPID_CONSOLE_EXTERN ClassKey(const std::string& package, const std::string& name, const uint8_t* hash);
00041 
00042         const QPID_CONSOLE_EXTERN std::string& getPackageName() const { return package; }
00043         const QPID_CONSOLE_EXTERN std::string& getClassName() const { return name; }
00044         const QPID_CONSOLE_EXTERN uint8_t* getHash() const { return hash; }
00045         QPID_CONSOLE_EXTERN std::string getHashString() const;
00046         QPID_CONSOLE_EXTERN std::string str() const;
00047         QPID_CONSOLE_EXTERN bool operator==(const ClassKey& other) const;
00048         QPID_CONSOLE_EXTERN bool operator!=(const ClassKey& other) const;
00049         QPID_CONSOLE_EXTERN bool operator<(const ClassKey& other) const;
00050         QPID_CONSOLE_EXTERN bool operator>(const ClassKey& other) const;
00051         QPID_CONSOLE_EXTERN bool operator<=(const ClassKey& other) const;
00052         QPID_CONSOLE_EXTERN bool operator>=(const ClassKey& other) const;
00053         QPID_CONSOLE_EXTERN void encode(framing::Buffer& buffer) const;
00054 
00055     private:
00056         std::string package;
00057         std::string name;
00058         uint8_t hash[HASH_SIZE];
00059     };
00060 
00061     QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const ClassKey& k);
00062 }
00063 }
00064 
00065 
00066 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00352.html0000664000076400007640000020372711752725720017324 0ustar00jrossjross00000000000000 qpid::client::SubscriptionManager Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::SubscriptionManager Class Reference

A class to help create and manage subscriptions. More...

#include <qpid/client/SubscriptionManager.h>

List of all members.

Public Types

typedef boost::function0< void > Functor
 Type to represent a runnable as a Functor.

Public Member Functions

 SubscriptionManager (const Session &session)
 Create a new SubscriptionManager associated with a session.
 SubscriptionManager (const SubscriptionManager &)
 ~SubscriptionManager ()
SubscriptionManageroperator= (const SubscriptionManager &)
Subscription subscribe (MessageListener &listener, const std::string &queue, const SubscriptionSettings &settings, const std::string &name=std::string())
 Subscribe a MessagesListener to receive messages from queue.
Subscription subscribe (LocalQueue &localQueue, const std::string &queue, const SubscriptionSettings &settings, const std::string &name=std::string())
 Subscribe a LocalQueue to receive messages from queue.
Subscription subscribe (MessageListener &listener, const std::string &queue, const std::string &name=std::string())
 Subscribe a MessagesListener to receive messages from queue.
Subscription subscribe (LocalQueue &localQueue, const std::string &queue, const std::string &name=std::string())
 Subscribe a LocalQueue to receive messages from queue.
bool get (Message &result, const std::string &queue, sys::Duration timeout=0)
 Get a single message from a queue.
Message get (const std::string &queue, sys::Duration timeout=sys::TIME_INFINITE)
 Get a single message from a queue.
Subscription getSubscription (const std::string &name) const
 Get a subscription by name.
void cancel (const std::string &name)
 Cancel a subscription.
void run ()
 Deliver messages in the current thread until stop() is called.
void start ()
 Start a new thread to deliver messages.
void wait ()
 Wait for the thread started by a call to start() to complete.
void setAutoStop (bool set=true)
 If set true, run() will stop when all subscriptions are cancelled.
void stop ()
 Stop delivery.
void setFlowControl (const std::string &name, const FlowControl &flow)
 Set the flow control for a subscription.
void setFlowControl (const std::string &name, uint32_t messages, uint32_t bytes, bool window=true)
 Set the flow control for a subscription.
void setDefaultSettings (const SubscriptionSettings &s)
 Set the default settings for subscribe() calls that don't include a SubscriptionSettings parameter.
const SubscriptionSettingsgetDefaultSettings () const
 Get the default settings for subscribe() calls that don't include a SubscriptionSettings parameter.
SubscriptionSettingsgetDefaultSettings ()
 Get the default settings for subscribe() calls that don't include a SubscriptionSettings parameter.
void setFlowControl (uint32_t messages, uint32_t bytes, bool window=true)
 Set the default flow control settings for subscribe() calls that don't include a SubscriptionSettings parameter.
void setAcceptMode (AcceptMode mode)
 Set the default accept-mode for subscribe() calls that don't include a SubscriptionSettings parameter.
void setAcquireMode (AcquireMode mode)
 Set the default acquire-mode subscribe()s that don't specify SubscriptionSettings.
void registerFailoverHandler (boost::function< void()> fh)
Session getSession () const
 SubscriptionManager (SubscriptionManagerImpl *)
Functor functor ()
 Create a functor object that will call this->run().
QPID_CLIENT_INLINE_EXTERN bool isValid () const
QPID_CLIENT_INLINE_EXTERN bool isNull () const
QPID_CLIENT_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QPID_CLIENT_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Static Public Attributes

static const uint32_t UNLIMITED = 0xFFFFFFFF

Protected Attributes

Impl * impl

Detailed Description

A class to help create and manage subscriptions.

Set up your subscriptions, then call run() to have messages delivered.

Subscribing and canceling subscriptions

Waiting for messages (and returning)

  • run()

     // Give up control to receive messages
     subscriptions.run();
  • stop()

    .// Use this code in a listener to return from run()
     subscriptions.stop();
  • setAutoStop()

    .// Return from subscriptions.run() when last subscription is cancelled
    .subscriptions.setAutoStop(true);
    .subscriptons.run();
     
  • Ending a subscription in a listener

     void Listener::received(Message& message) {
      if (message.getData() == "That's all, folks!") {
           subscriptions.cancel(message.getDestination());
       }
     }
     

Member Typedef Documentation

typedef boost::function0<void> qpid::sys::Runnable::Functor [inherited]

Type to represent a runnable as a Functor.

Definition at line 37 of file Runnable.h.


Constructor & Destructor Documentation

qpid::client::SubscriptionManager::SubscriptionManager ( const Session session)

Create a new SubscriptionManager associated with a session.

qpid::client::SubscriptionManager::SubscriptionManager ( const SubscriptionManager )
qpid::client::SubscriptionManager::~SubscriptionManager ( )
qpid::client::SubscriptionManager::SubscriptionManager ( SubscriptionManagerImpl *  )

Member Function Documentation

void qpid::client::SubscriptionManager::cancel ( const std::string name)

Cancel a subscription.

See also: Subscription.cancel()

Referenced by qpid::client::AutoCancel::~AutoCancel().

Functor qpid::sys::Runnable::functor ( ) [inherited]

Create a functor object that will call this->run().

bool qpid::client::SubscriptionManager::get ( Message result,
const std::string queue,
sys::Duration  timeout = 0 
)

Get a single message from a queue.

(Note: this currently uses a subscription per invocation and is thus relatively expensive. The subscription is cancelled as part of each call which can trigger auto-deletion).

Parameters:
resultis set to the message from the queue.
timeoutwait up this timeout for a message to appear.
Returns:
true if result was set, false if no message available after timeout.
Message qpid::client::SubscriptionManager::get ( const std::string queue,
sys::Duration  timeout = sys::TIME_INFINITE 
)

Get a single message from a queue.

(Note: this currently uses a subscription per invocation and is thus relatively expensive. The subscription is cancelled as part of each call which can trigger auto-deletion).

Parameters:
timeoutwait up this timeout for a message to appear.
Returns:
message from the queue.
Exceptions:
Exceptionif the timeout is exceeded.
const SubscriptionSettings& qpid::client::SubscriptionManager::getDefaultSettings ( ) const

Get the default settings for subscribe() calls that don't include a SubscriptionSettings parameter.

SubscriptionSettings& qpid::client::SubscriptionManager::getDefaultSettings ( )

Get the default settings for subscribe() calls that don't include a SubscriptionSettings parameter.

Session qpid::client::SubscriptionManager::getSession ( ) const
Subscription qpid::client::SubscriptionManager::getSubscription ( const std::string name) const

Get a subscription by name.

Exceptions:
Exceptionif not found.
QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 46 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 43 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN qpid::client::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 49 of file Handle.h.

QPID_CLIENT_INLINE_EXTERN bool qpid::client::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 52 of file Handle.h.

SubscriptionManager& qpid::client::SubscriptionManager::operator= ( const SubscriptionManager )
void qpid::client::SubscriptionManager::registerFailoverHandler ( boost::function< void()>  fh)
void qpid::client::SubscriptionManager::run ( ) [virtual]

Deliver messages in the current thread until stop() is called.

Only one thread may be running in a SubscriptionManager at a time.

See also:
run

Implements qpid::sys::Runnable.

void qpid::client::SubscriptionManager::setAcceptMode ( AcceptMode  mode)

Set the default accept-mode for subscribe() calls that don't include a SubscriptionSettings parameter.

void qpid::client::SubscriptionManager::setAcquireMode ( AcquireMode  mode)

Set the default acquire-mode subscribe()s that don't specify SubscriptionSettings.

void qpid::client::SubscriptionManager::setAutoStop ( bool  set = true)

If set true, run() will stop when all subscriptions are cancelled.

If false, run will only stop when stop() is called. True by default.

void qpid::client::SubscriptionManager::setDefaultSettings ( const SubscriptionSettings s)

Set the default settings for subscribe() calls that don't include a SubscriptionSettings parameter.

void qpid::client::SubscriptionManager::setFlowControl ( const std::string name,
const FlowControl flow 
)

Set the flow control for a subscription.

void qpid::client::SubscriptionManager::setFlowControl ( const std::string name,
uint32_t  messages,
uint32_t  bytes,
bool  window = true 
)

Set the flow control for a subscription.

Parameters:
name,:name of the subscription.
messages,:message credit.
bytes,:byte credit.
window,:if true use window-based flow control.
void qpid::client::SubscriptionManager::setFlowControl ( uint32_t  messages,
uint32_t  bytes,
bool  window = true 
)

Set the default flow control settings for subscribe() calls that don't include a SubscriptionSettings parameter.

Parameters:
messages,:message credit.
bytes,:byte credit.
window,:if true use window-based flow control.
void qpid::client::SubscriptionManager::start ( )

Start a new thread to deliver messages.

Only one thread may be running in a SubscriptionManager at a time.

See also:
start
void qpid::client::SubscriptionManager::stop ( )

Stop delivery.

Causes run() to return, or the thread started with start() to exit.

Subscription qpid::client::SubscriptionManager::subscribe ( MessageListener listener,
const std::string queue,
const SubscriptionSettings settings,
const std::string name = std::string() 
)

Subscribe a MessagesListener to receive messages from queue.

Provide your own subclass of MessagesListener to process incoming messages. It will be called for each message received.

Parameters:
listenerListener object to receive messages.
queueName of the queue to subscribe to.
settingssettings for the subscription.
nameunique destination name for the subscription, defaults to queue name.
Subscription qpid::client::SubscriptionManager::subscribe ( LocalQueue localQueue,
const std::string queue,
const SubscriptionSettings settings,
const std::string name = std::string() 
)

Subscribe a LocalQueue to receive messages from queue.

Incoming messages are stored in the queue for you to retrieve.

Parameters:
queueName of the queue to subscribe to.
flowinitial FlowControl for the subscription.
nameunique destination name for the subscription, defaults to queue name. If not specified, the queue name is used.
Subscription qpid::client::SubscriptionManager::subscribe ( MessageListener listener,
const std::string queue,
const std::string name = std::string() 
)

Subscribe a MessagesListener to receive messages from queue.

Provide your own subclass of MessagesListener to process incoming messages. It will be called for each message received.

Parameters:
listenerListener object to receive messages.
queueName of the queue to subscribe to.
nameunique destination name for the subscription, defaults to queue name. If not specified, the queue name is used.
Subscription qpid::client::SubscriptionManager::subscribe ( LocalQueue localQueue,
const std::string queue,
const std::string name = std::string() 
)

Subscribe a LocalQueue to receive messages from queue.

Incoming messages are stored in the queue for you to retrieve.

Parameters:
queueName of the queue to subscribe to.
nameunique destination name for the subscription, defaults to queue name. If not specified, the queue name is used.
void qpid::client::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 54 of file Handle.h.

void qpid::client::SubscriptionManager::wait ( )

Wait for the thread started by a call to start() to complete.


Member Data Documentation

Impl* qpid::client::Handle::impl [protected, inherited]

Definition at line 64 of file Handle.h.

Definition at line 220 of file SubscriptionManager.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00279.html0000664000076400007640000001770411752725720017332 0ustar00jrossjross00000000000000 qpid::messaging::ResolutionError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::ResolutionError Struct Reference

Thrown when a syntactically correct address cannot be resolved or used. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 ResolutionError (const std::string &msg)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown when a syntactically correct address cannot be resolved or used.


Constructor & Destructor Documentation

qpid::messaging::ResolutionError::ResolutionError ( const std::string msg)

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/doxygen.css0000664000076400007640000003500311752725717020007 0ustar00jrossjross00000000000000/* The standard CSS for doxygen */ body, table, div, p, dl { font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; font-size: 12px; } /* @group Heading Levels */ h1 { font-size: 150%; } .title { font-size: 150%; font-weight: bold; margin: 10px 2px; } h2 { font-size: 120%; } h3 { font-size: 100%; } dt { font-weight: bold; } div.multicol { -moz-column-gap: 1em; -webkit-column-gap: 1em; -moz-column-count: 3; -webkit-column-count: 3; } p.startli, p.startdd, p.starttd { margin-top: 2px; } p.endli { margin-bottom: 0px; } p.enddd { margin-bottom: 4px; } p.endtd { margin-bottom: 2px; } /* @end */ caption { font-weight: bold; } span.legend { font-size: 70%; text-align: center; } h3.version { font-size: 90%; text-align: center; } div.qindex, div.navtab{ background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; } div.qindex, div.navpath { width: 100%; line-height: 140%; } div.navtab { margin-right: 15px; } /* @group Link Styling */ a { color: #3D578C; font-weight: normal; text-decoration: none; } .contents a:visited { color: #4665A2; } a:hover { text-decoration: underline; } a.qindex { font-weight: bold; } a.qindexHL { font-weight: bold; background-color: #9CAFD4; color: #ffffff; border: 1px double #869DCA; } .contents a.qindexHL:visited { color: #ffffff; } a.el { font-weight: bold; } a.elRef { } a.code { color: #4665A2; } a.codeRef { color: #4665A2; } /* @end */ dl.el { margin-left: -1cm; } .fragment { font-family: monospace, fixed; font-size: 105%; } pre.fragment { border: 1px solid #C4CFE5; background-color: #FBFCFD; padding: 4px 6px; margin: 4px 8px 4px 2px; overflow: auto; word-wrap: break-word; font-size: 9pt; line-height: 125%; } div.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px; padding: 0.2em; border: solid thin #333; border-radius: 0.5em; -webkit-border-radius: .5em; -moz-border-radius: .5em; box-shadow: 2px 2px 3px #999; -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.groupHeader { margin-left: 16px; margin-top: 12px; font-weight: bold; } div.groupText { margin-left: 16px; font-style: italic; } body { background-color: white; color: black; margin: 0; } div.contents { margin-top: 10px; margin-left: 8px; margin-right: 8px; } td.indexkey { background-color: #EBEFF6; font-weight: bold; border: 1px solid #C4CFE5; margin: 2px 0px 2px 0; padding: 2px 10px; } td.indexvalue { background-color: #EBEFF6; border: 1px solid #C4CFE5; padding: 2px 10px; margin: 2px 0px; } tr.memlist { background-color: #EEF1F7; } p.formulaDsp { text-align: center; } img.formulaDsp { } img.formulaInl { vertical-align: middle; } div.center { text-align: center; margin-top: 0px; margin-bottom: 0px; padding: 0px; } div.center img { border: 0px; } address.footer { text-align: right; padding-right: 12px; } img.footer { border: 0px; vertical-align: middle; } /* @group Code Colorization */ 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 } span.vhdldigit { color: #ff00ff } span.vhdlchar { color: #000000 } span.vhdlkeyword { color: #700070 } span.vhdllogic { color: #ff0000 } /* @end */ /* .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%; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #A3B4D7; } th.dirtab { background: #EBEFF6; font-weight: bold; } hr { height: 0px; border: none; border-top: 1px solid #4A6AAA; } hr.footer { height: 1px; } /* @group Member Descriptions */ table.memberdecls { border-spacing: 0px; padding: 0px; } .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { background-color: #F9FAFC; border: none; margin: 4px; padding: 1px 0 0 8px; } .mdescLeft, .mdescRight { padding: 0px 8px 4px 8px; color: #555; } .memItemLeft, .memItemRight, .memTemplParams { border-top: 1px solid #C4CFE5; } .memItemLeft, .memTemplItemLeft { white-space: nowrap; } .memItemRight { width: 100%; } .memTemplParams { color: #4665A2; white-space: nowrap; } /* @end */ /* @group Member Details */ /* Styles for detailed member documentation */ .memtemplate { font-size: 80%; color: #4665A2; font-weight: normal; margin-left: 9px; } .memnav { background-color: #EBEFF6; border: 1px solid #A3B4D7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .mempage { width: 100%; } .memitem { padding: 0; margin-bottom: 10px; margin-right: 5px; } .memname { white-space: nowrap; font-weight: bold; margin-left: 6px; } .memproto, dl.reflist dt { border-top: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 6px 0px 6px 0px; color: #253555; font-weight: bold; text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); /* opera specific markup */ box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); border-top-right-radius: 8px; border-top-left-radius: 8px; /* firefox specific markup */ -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; -moz-border-radius-topright: 8px; -moz-border-radius-topleft: 8px; /* webkit specific markup */ -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); -webkit-border-top-right-radius: 8px; -webkit-border-top-left-radius: 8px; background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; } .memdoc, dl.reflist dd { border-bottom: 1px solid #A8B8D9; border-left: 1px solid #A8B8D9; border-right: 1px solid #A8B8D9; padding: 2px 5px; background-color: #FBFCFD; border-top-width: 0; /* opera specific markup */ border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); /* firefox specific markup */ -moz-border-radius-bottomleft: 8px; -moz-border-radius-bottomright: 8px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F7F8FB 95%, #EEF1F7); /* webkit specific markup */ -webkit-border-bottom-left-radius: 8px; -webkit-border-bottom-right-radius: 8px; -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F7F8FB), to(#EEF1F7)); } dl.reflist dt { padding: 5px; } dl.reflist dd { margin: 0px 0px 10px 0px; padding: 5px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; white-space: nowrap; } .paramname em { font-style: normal; } .params, .retval, .exception, .tparams { border-spacing: 6px 2px; } .params .paramname, .retval .paramname { font-weight: bold; vertical-align: top; } .params .paramtype { font-style: italic; vertical-align: top; } .params .paramdir { font-family: "courier new",courier,monospace; vertical-align: top; } /* @end */ /* @group Directory (tree) */ /* for the tree view */ .ftvtree { font-family: sans-serif; margin: 0px; } /* these are for tree view when used as main index */ .directory { font-size: 9pt; font-weight: bold; margin: 5px; } .directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } /* The following two styles can be used to replace the root node title with an image of your choice. Simply uncomment the next two styles, specify the name of your image and be sure to set 'height' to the proper pixel height of your image. */ /* .directory h3.swap { height: 61px; background-repeat: no-repeat; background-image: url("yourimage.gif"); } .directory h3.swap span { display: none; } */ .directory > h3 { margin-top: 0; } .directory p { margin: 0px; white-space: nowrap; } .directory div { display: none; margin: 0px; } .directory img { vertical-align: -30%; } /* these are for tree view when not used as main index */ .directory-alt { font-size: 100%; font-weight: bold; } .directory-alt h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } .directory-alt > h3 { margin-top: 0; } .directory-alt p { margin: 0px; white-space: nowrap; } .directory-alt div { display: none; margin: 0px; } .directory-alt img { vertical-align: -30%; } /* @end */ div.dynheader { margin-top: 8px; } address { font-style: normal; color: #2A3D61; } table.doxtable { border-collapse:collapse; } table.doxtable td, table.doxtable th { border: 1px solid #2D4068; padding: 3px 7px 2px; } table.doxtable th { background-color: #374F7F; color: #FFFFFF; font-size: 110%; padding-bottom: 4px; padding-top: 5px; text-align:left; } table.fieldtable { width: 100%; margin-bottom: 10px; border: 1px solid #A8B8D9; border-spacing: 0px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); } .fieldtable td, .fieldtable th { padding: 3px 7px 2px; } .fieldtable td.fieldtype, .fieldtable td.fieldname { white-space: nowrap; border-right: 1px solid #A8B8D9; border-bottom: 1px solid #A8B8D9; vertical-align: top; } .fieldtable td.fielddoc { border-bottom: 1px solid #A8B8D9; width: 100%; } .fieldtable tr:last-child td { border-bottom: none; } .fieldtable th { background-image:url('nav_f.png'); background-repeat:repeat-x; background-color: #E2E8F2; font-size: 90%; color: #253555; padding-bottom: 4px; padding-top: 5px; text-align:left; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom: 1px solid #A8B8D9; } .tabsearch { top: 0px; left: 10px; height: 36px; background-image: url('tab_b.png'); z-index: 101; overflow: hidden; font-size: 13px; } .navpath ul { font-size: 11px; background-image:url('tab_b.png'); background-repeat:repeat-x; height:30px; line-height:30px; color:#8AA0CC; border:solid 1px #C2CDE4; overflow:hidden; margin:0px; padding:0px; } .navpath li { list-style-type:none; float:left; padding-left:10px; padding-right:15px; background-image:url('bc_s.png'); background-repeat:no-repeat; background-position:right; color:#364D7C; } .navpath li.navelem a { height:32px; display:block; text-decoration: none; outline: none; } .navpath li.navelem a:hover { color:#6884BD; } .navpath li.footer { list-style-type:none; float:right; padding-left:10px; padding-right:15px; background-image:none; background-repeat:no-repeat; background-position:right; color:#364D7C; font-size: 8pt; } div.summary { float: right; font-size: 8pt; padding-right: 5px; width: 50%; text-align: right; } div.summary a { white-space: nowrap; } div.ingroups { margin-left: 5px; font-size: 8pt; padding-left: 5px; width: 50%; text-align: left; } div.ingroups a { white-space: nowrap; } div.header { background-image:url('nav_h.png'); background-repeat:repeat-x; background-color: #F9FAFC; margin: 0px; border-bottom: 1px solid #C4CFE5; } div.headertitle { padding: 5px 5px 5px 7px; } dl { padding: 0 0 0 10px; } dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug { border-left:4px solid; padding: 0 0 0 6px; } dl.note { border-color: #D0C000; } dl.warning, dl.attention { border-color: #FF0000; } dl.pre, dl.post, dl.invariant { border-color: #00D000; } dl.deprecated { border-color: #505050; } dl.todo { border-color: #00C0E0; } dl.test { border-color: #3030E0; } dl.bug { border-color: #C08050; } #projectlogo { text-align: center; vertical-align: bottom; border-collapse: separate; } #projectlogo img { border: 0px none; } #projectname { font: 300% Tahoma, Arial,sans-serif; margin: 0px; padding: 2px 0px; } #projectbrief { font: 120% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #projectnumber { font: 50% Tahoma, Arial,sans-serif; margin: 0px; padding: 0px; } #titlearea { padding: 0px; margin: 0px; width: 100%; border-bottom: 1px solid #5373B4; } .image { text-align: center; } .dotgraph { text-align: center; } .mscgraph { text-align: center; } .caption { font-weight: bold; } div.zoom { border: 1px solid #90A5CE; } dl.citelist { margin-bottom:50px; } dl.citelist dt { color:#334975; float:left; font-weight:bold; margin-right:10px; padding:5px; } dl.citelist dd { margin:2px 0; padding:5px 0; } @media print { #top { display: none; } #side-nav { display: none; } #nav-path { display: none; } body { overflow:visible; } h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } .summary { display: none; } .memitem { page-break-inside: avoid; } #doc-content { margin-left:0 !important; height:auto !important; width:auto !important; overflow:inherit; display:inline; } pre.fragment { overflow: visible; text-wrap: unrestricted; white-space: -moz-pre-wrap; /* Moz */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: pre-wrap; /* CSS3 */ word-wrap: break-word; /* IE 5.5+ */ } } qpidc-0.16/docs/api/html/a00869.html0000664000076400007640000002571411752725720017337 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::Message Member List
This is the complete list of members for qpid::messaging::Message, including all inherited members.
getContent() const qpid::messaging::Message
getContentPtr() const qpid::messaging::Message
getContentSize() const qpid::messaging::Message
getContentType() const qpid::messaging::Message
getCorrelationId() const qpid::messaging::Message
getDurable() const qpid::messaging::Message
getMessageId() const qpid::messaging::Message
getPriority() const qpid::messaging::Message
getProperties() const qpid::messaging::Message
getProperties()qpid::messaging::Message
getRedelivered() const qpid::messaging::Message
getReplyTo() const qpid::messaging::Message
getSubject() const qpid::messaging::Message
getTtl() const qpid::messaging::Message
getUserId() const qpid::messaging::Message
Message(const std::string &bytes=std::string())qpid::messaging::Message
Message(const char *, size_t)qpid::messaging::Message
Message(const Message &)qpid::messaging::Message
operator=(const Message &)qpid::messaging::Message
setContent(const std::string &)qpid::messaging::Message
setContent(const char *chars, size_t count)qpid::messaging::Message
setContentType(const std::string &)qpid::messaging::Message
setCorrelationId(const std::string &)qpid::messaging::Message
setDurable(bool durable)qpid::messaging::Message
setMessageId(const std::string &)qpid::messaging::Message
setPriority(uint8_t)qpid::messaging::Message
setProperty(const std::string &, const qpid::types::Variant &)qpid::messaging::Message
setRedelivered(bool)qpid::messaging::Message
setReplyTo(const Address &)qpid::messaging::Message
setSubject(const std::string &)qpid::messaging::Message
setTtl(Duration ttl)qpid::messaging::Message
setUserId(const std::string &)qpid::messaging::Message
~Message()qpid::messaging::Message

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00360.html0000664000076400007640000002022411752725720017310 0ustar00jrossjross00000000000000 qpid::messaging::TransportFailure Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::TransportFailure Struct Reference

Thrown to indicate loss of underlying connection. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 TransportFailure (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown to indicate loss of underlying connection.

When auto-reconnect is used this will be caught by the library and used to trigger reconnection attempts. If reconnection fails (according to whatever settings have been configured), then an instnace of this class will be thrown to signal that.


Constructor & Destructor Documentation

qpid::messaging::TransportFailure::TransportFailure ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00126.html0000664000076400007640000002351411752725720017315 0ustar00jrossjross00000000000000 qpid::framing::FieldValueException Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FieldValueException Class Reference

Exception that is the base exception for all field table errors. More...

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Detailed Description

Exception that is the base exception for all field table errors.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00524.html0000664000076400007640000001751711752725717017333 0ustar00jrossjross00000000000000 qpid/types/Uuid.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/types/Uuid.h File Reference
#include "qpid/types/ImportExport.h"
#include <iosfwd>
#include <string>

Go to the source code of this file.

Classes

class  qpid::types::Uuid

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::types

Functions

QPID_TYPES_EXTERN bool qpid::types::operator== (const Uuid &, const Uuid &)
 Returns true if the uuids are equal, false otherwise.
QPID_TYPES_EXTERN bool qpid::types::operator!= (const Uuid &, const Uuid &)
 Returns true if the uuids are NOT equal, false if they are.
QPID_TYPES_EXTERN bool qpid::types::operator< (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN bool qpid::types::operator> (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN bool qpid::types::operator<= (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN bool qpid::types::operator>= (const Uuid &, const Uuid &)
QPID_TYPES_EXTERN std::ostreamqpid::types::operator<< (std::ostream &, Uuid)
 Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.
QPID_TYPES_EXTERN std::istreamqpid::types::operator>> (std::istream &, Uuid &)
 Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00691.html0000664000076400007640000002107511752725717017332 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Message Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00805.html0000664000076400007640000001370711752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::SessionBusyException Member List
This is the complete list of members for qpid::framing::SessionBusyException, including all inherited members.
ChannelException(framing::session::DetachCode _code, const std::string &message)qpid::ChannelException [inline]
codeqpid::ChannelException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::framing::SessionBusyException [inline, virtual]
SessionBusyException(const std::string &msg=std::string())qpid::framing::SessionBusyException [inline]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00660.html0000664000076400007640000001022411752725717017320 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::InlineRebind Member List
This is the complete list of members for qpid::InlineRebind, including all inherited members.
other typedefqpid::InlineRebind

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00850.html0000664000076400007640000001356311752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::AddressError Member List
This is the complete list of members for qpid::messaging::AddressError, including all inherited members.
AddressError(const std::string &)qpid::messaging::AddressError
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
LinkError(const std::string &)qpid::messaging::LinkError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00902.html0000664000076400007640000000763111752725720017321 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::list Member List
This is the complete list of members for std::list, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00505_source.html0000664000076400007640000007060611752725717020710 0ustar00jrossjross00000000000000 qpid/framing/FieldTable.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/FieldTable.h
Go to the documentation of this file.
00001 #ifndef _FieldTable_
00002 #define _FieldTable_
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/framing/amqp_types.h"
00026 #include "qpid/sys/Mutex.h"
00027 
00028 #include <boost/shared_ptr.hpp>
00029 #include <boost/shared_array.hpp>
00030 
00031 #include <iosfwd>
00032 #include <map>
00033 
00034 #include "qpid/CommonImportExport.h"
00035 
00036 namespace qpid {
00041 namespace framing {
00042 
00043 class Array;
00044 class FieldValue;
00045 class Buffer;
00046 
00053 class FieldTable
00054 {
00055   public:
00056     typedef boost::shared_ptr<FieldValue> ValuePtr;
00057     typedef std::map<std::string, ValuePtr> ValueMap;
00058     typedef ValueMap::iterator iterator;
00059     typedef ValueMap::const_iterator const_iterator;
00060     typedef ValueMap::const_reference const_reference;
00061     typedef ValueMap::reference reference;
00062     typedef ValueMap::value_type value_type;
00063 
00064     QPID_COMMON_EXTERN FieldTable();
00065     QPID_COMMON_EXTERN FieldTable(const FieldTable&);
00066     QPID_COMMON_EXTERN FieldTable& operator=(const FieldTable&);
00067     // Compiler default destructor fine
00068     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00069     QPID_COMMON_EXTERN void encode(Buffer& buffer) const;
00070     QPID_COMMON_EXTERN void decode(Buffer& buffer);
00071 
00072     QPID_COMMON_EXTERN int count() const;
00073     QPID_COMMON_INLINE_EXTERN size_t size() const { return values.size(); }
00074     QPID_COMMON_INLINE_EXTERN bool empty() { return size() == 0; }
00075     QPID_COMMON_EXTERN void set(const std::string& name, const ValuePtr& value);
00076     QPID_COMMON_EXTERN ValuePtr get(const std::string& name) const;
00077     QPID_COMMON_INLINE_EXTERN bool isSet(const std::string& name) const { return get(name).get() != 0; }
00078 
00079     QPID_COMMON_EXTERN void setString(const std::string& name, const std::string& value);
00080     QPID_COMMON_EXTERN void setInt(const std::string& name, const int value);
00081     QPID_COMMON_EXTERN void setInt64(const std::string& name, const int64_t value);
00082     QPID_COMMON_EXTERN void setTimestamp(const std::string& name, const uint64_t value);
00083     QPID_COMMON_EXTERN void setUInt64(const std::string& name, const uint64_t value);
00084     QPID_COMMON_EXTERN void setTable(const std::string& name, const FieldTable& value);
00085     QPID_COMMON_EXTERN void setArray(const std::string& name, const Array& value);
00086     QPID_COMMON_EXTERN void setFloat(const std::string& name, const float value);
00087     QPID_COMMON_EXTERN void setDouble(const std::string& name, const double value);
00088     //void setDecimal(string& name, xxx& value);
00089 
00090     QPID_COMMON_EXTERN int getAsInt(const std::string& name) const;
00091     QPID_COMMON_EXTERN uint64_t getAsUInt64(const std::string& name) const;
00092     QPID_COMMON_EXTERN int64_t getAsInt64(const std::string& name) const;
00093     QPID_COMMON_EXTERN std::string getAsString(const std::string& name) const;
00094 
00095     QPID_COMMON_EXTERN bool getTable(const std::string& name, FieldTable& value) const;
00096     QPID_COMMON_EXTERN bool getArray(const std::string& name, Array& value) const;
00097     QPID_COMMON_EXTERN bool getFloat(const std::string& name, float& value) const;
00098     QPID_COMMON_EXTERN bool getDouble(const std::string& name, double& value) const;
00099     //QPID_COMMON_EXTERN bool getTimestamp(const std::string& name, uint64_t& value) const;
00100     //QPID_COMMON_EXTERN bool getDecimal(string& name, xxx& value);
00101     QPID_COMMON_EXTERN void erase(const std::string& name);
00102 
00103 
00104     QPID_COMMON_EXTERN bool operator==(const FieldTable& other) const;
00105 
00106     // Map-like interface.
00107     QPID_COMMON_EXTERN ValueMap::const_iterator begin() const;
00108     QPID_COMMON_EXTERN ValueMap::const_iterator end() const;
00109     QPID_COMMON_EXTERN ValueMap::const_iterator find(const std::string& s) const;
00110 
00111     QPID_COMMON_EXTERN ValueMap::iterator begin();
00112     QPID_COMMON_EXTERN ValueMap::iterator end();
00113     QPID_COMMON_EXTERN ValueMap::iterator find(const std::string& s);
00114 
00115     QPID_COMMON_EXTERN std::pair <ValueMap::iterator, bool> insert(const ValueMap::value_type&);
00116     QPID_COMMON_EXTERN ValueMap::iterator insert(ValueMap::iterator, const ValueMap::value_type&);
00117     QPID_COMMON_EXTERN void clear();
00118 
00119   private:
00120     void realDecode() const;
00121     void flushRawCache();
00122 
00123     mutable qpid::sys::Mutex lock;
00124     mutable ValueMap values;
00125     mutable boost::shared_array<uint8_t> cachedBytes;
00126     mutable uint32_t cachedSize; // if = 0 then non cached size as 0 is not a legal size
00127     mutable bool newBytes;
00128 
00129     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream& out, const FieldTable& body);
00130 };
00131 
00132 //class FieldNotFoundException{};
00133 //class UnknownFieldName : public FieldNotFoundException{};
00134 //class IncorrectFieldType : public FieldNotFoundException{};
00135 }
00136 }
00137 
00138 
00139 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00138.html0000664000076400007640000002523511752725717017330 0ustar00jrossjross00000000000000 qpid::client::FutureResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FutureResult Class Reference

#include <qpid/client/FutureResult.h>

List of all members.

Public Member Functions

const std::stringgetResult (SessionImpl &session) const
void received (const std::string &result)
bool isComplete () const
void waitForCompletion () const
void completed ()

Protected Attributes

sys::Monitor lock
bool complete

Member Function Documentation

void qpid::client::FutureCompletion::completed ( ) [inherited]
const std::string& qpid::client::FutureResult::getResult ( SessionImpl &  session) const
bool qpid::client::FutureCompletion::isComplete ( ) const [inherited]
void qpid::client::FutureResult::received ( const std::string result)
void qpid::client::FutureCompletion::waitForCompletion ( ) const [inherited]

Member Data Documentation

bool qpid::client::FutureCompletion::complete [protected, inherited]

Definition at line 36 of file FutureCompletion.h.

sys::Monitor qpid::client::FutureCompletion::lock [mutable, protected, inherited]

Definition at line 35 of file FutureCompletion.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00288.html0000664000076400007640000001034611752725720017325 0ustar00jrossjross00000000000000 std::map::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::map::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00500_source.html0000664000076400007640000002724411752725717020703 0ustar00jrossjross00000000000000 qpid/framing/DtxGetTimeoutResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/DtxGetTimeoutResult.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_DTXGETTIMEOUTRESULT_H
00002 #define QPID_FRAMING_DTXGETTIMEOUTRESULT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN DtxGetTimeoutResult  {
00039     uint32_t timeout;
00040     uint16_t flags;
00041 public:
00042     static const uint16_t TYPE = 1538;
00043     DtxGetTimeoutResult(
00044         uint32_t _timeout) : 
00045         timeout(_timeout),
00046         flags(0){
00047         flags |= (1 << 8);
00048     }
00049     DtxGetTimeoutResult()  : timeout(0), flags(0) {}
00050     
00051     QPID_COMMON_EXTERN void setTimeout(uint32_t _timeout);
00052     QPID_COMMON_EXTERN uint32_t getTimeout() const;
00053     QPID_COMMON_EXTERN bool hasTimeout() const;
00054     QPID_COMMON_EXTERN void clearTimeoutFlag();
00055     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const DtxGetTimeoutResult&);
00056     QPID_COMMON_EXTERN void encode(Buffer&) const;
00057     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00058     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00059     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00060     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00061     QPID_COMMON_EXTERN uint32_t bodySize() const;
00062     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00063 }; /* class DtxGetTimeoutResult */
00064 
00065 }}
00066 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00013.html0000664000076400007640000001022311752725720017301 0ustar00jrossjross00000000000000 std::allocator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::allocator Class Reference

STL class. More...

List of all members.


Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x72.html0000664000076400007640000001771111752725720022575 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- r -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00031.html0000664000076400007640000001030311752725720017300 0ustar00jrossjross00000000000000 std::basic_iostream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_iostream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00651.html0000664000076400007640000001306211752725717017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::ErrnoException Member List
This is the complete list of members for qpid::ErrnoException, including all inherited members.
ErrnoException(const std::string &msg, int err)qpid::ErrnoException [inline]
ErrnoException(const std::string &msg)qpid::ErrnoException [inline]
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00470_source.html0000664000076400007640000002376011752725717020710 0ustar00jrossjross00000000000000 qpid/client/LocalQueue.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/LocalQueue.h
Go to the documentation of this file.
00001 #ifndef QPID_CLIENT_LOCALQUEUE_H
00002 #define QPID_CLIENT_LOCALQUEUE_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/client/ClientImportExport.h"
00026 #include "qpid/client/Handle.h"
00027 #include "qpid/client/Message.h"
00028 #include "qpid/sys/Time.h"
00029 
00030 namespace qpid {
00031 namespace client {
00032 
00033 class LocalQueueImpl;
00034 template <class T> class PrivateImplRef;
00035 
00074 class QPID_CLIENT_CLASS_EXTERN LocalQueue : public Handle<LocalQueueImpl> {
00075   public:
00081     QPID_CLIENT_EXTERN LocalQueue();
00082     QPID_CLIENT_EXTERN LocalQueue(const LocalQueue&);
00083     QPID_CLIENT_EXTERN ~LocalQueue();
00084     QPID_CLIENT_EXTERN LocalQueue& operator=(const LocalQueue&);
00085 
00091     QPID_CLIENT_EXTERN bool get(Message& result, sys::Duration timeout=0);
00092 
00099     QPID_CLIENT_EXTERN Message get(sys::Duration timeout=sys::TIME_INFINITE);
00100 
00102     QPID_CLIENT_EXTERN Message pop(sys::Duration timeout=sys::TIME_INFINITE);
00103 
00105     QPID_CLIENT_EXTERN bool empty() const;
00106 
00108     QPID_CLIENT_EXTERN size_t size() const;
00109 
00110     LocalQueue(LocalQueueImpl*); 
00111 
00112 
00113   private:
00114     typedef LocalQueueImpl Impl;
00115     friend class PrivateImplRef<LocalQueue>;
00116 };
00117 
00118 }} // namespace qpid::client
00119 
00120 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00383.html0000664000076400007640000006227711752725720017333 0ustar00jrossjross00000000000000 qpid::framing::Var32Value Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Var32Value Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 Var32Value (const std::string &v, uint8_t code)
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Constructor & Destructor Documentation

qpid::framing::Var32Value::Var32Value ( const std::string v,
uint8_t  code 
)

Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected, inherited]
bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline, inherited]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer) [inherited]
bool qpid::framing::FieldValue::empty ( ) const [inline, inherited]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer) [inherited]
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline, inherited]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline, inherited]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline, inherited]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline, inherited]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const [inherited]

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline, inherited]

Definition at line 213 of file FieldValue.h.

References qpid::framing::FieldValue::convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline, inherited]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inherited]
uint8_t qpid::framing::FieldValue::getType ( ) const [inherited]
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline, inherited]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const [inherited]
void qpid::framing::FieldValue::print ( std::ostream out) const [inherited]
void qpid::framing::FieldValue::setType ( uint8_t  type) [inherited]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00021.html0000664000076400007640000004503611752725720017312 0ustar00jrossjross00000000000000 qpid::console::Object::AttributeMap Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Object::AttributeMap Struct Reference

#include <qpid/console/Object.h>

List of all members.

Public Member Functions

void addRef (const std::string &key, const ObjectId &val)
void addUint (const std::string &key, uint32_t val)
void addInt (const std::string &key, int32_t val)
void addUint64 (const std::string &key, uint64_t val)
void addInt64 (const std::string &key, int64_t val)
void addString (const std::string &key, const std::string &val)
void addBool (const std::string &key, bool val)
void addFloat (const std::string &key, float val)
void addDouble (const std::string &key, double val)
void addUuid (const std::string &key, const framing::Uuid &val)
void addMap (const std::string &key, const framing::FieldTable &val)

Member Function Documentation

void qpid::console::Object::AttributeMap::addBool ( const std::string key,
bool  val 
)
void qpid::console::Object::AttributeMap::addDouble ( const std::string key,
double  val 
)
void qpid::console::Object::AttributeMap::addFloat ( const std::string key,
float  val 
)
void qpid::console::Object::AttributeMap::addInt ( const std::string key,
int32_t  val 
)
void qpid::console::Object::AttributeMap::addInt64 ( const std::string key,
int64_t  val 
)
void qpid::console::Object::AttributeMap::addMap ( const std::string key,
const framing::FieldTable val 
)
void qpid::console::Object::AttributeMap::addRef ( const std::string key,
const ObjectId val 
)
void qpid::console::Object::AttributeMap::addString ( const std::string key,
const std::string val 
)
void qpid::console::Object::AttributeMap::addUint ( const std::string key,
uint32_t  val 
)
void qpid::console::Object::AttributeMap::addUint64 ( const std::string key,
uint64_t  val 
)
void qpid::console::Object::AttributeMap::addUuid ( const std::string key,
const framing::Uuid val 
)

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x7a.html0000664000076400007640000001450111752725717022370 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- z -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00111.html0000664000076400007640000002477711752725717017331 0ustar00jrossjross00000000000000 qpid::Options::Exception Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Options::Exception Struct Reference

#include <qpid/Options.h>

List of all members.

Public Member Functions

 Exception (const std::string &msg)
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Constructor & Destructor Documentation

qpid::Options::Exception::Exception ( const std::string msg) [inline]

Reimplemented from qpid::Exception.

Definition at line 139 of file Options.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00494.html0000664000076400007640000001147311752725717017334 0ustar00jrossjross00000000000000 qpid/framing/amqp_types_full.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/amqp_types_full.h File Reference

Definitions and full declarations of all types used in AMQP messages. More...

Go to the source code of this file.


Detailed Description

Definitions and full declarations of all types used in AMQP messages.

It's better to include amqp_types.h in another header instead of this file unless the header actually needs the full declarations. Including full declarations when forward declarations would increase compile times.

Definition in file amqp_types_full.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00416.html0000664000076400007640000001053311752725717017322 0ustar00jrossjross00000000000000 qmf/engine/Event.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Event.h File Reference

Go to the source code of this file.

Classes

class  qmf::engine::Event

Namespaces

namespace  qmf
namespace  qmf::engine

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00241.html0000664000076400007640000005334311752725720017316 0ustar00jrossjross00000000000000 qpid::log::Options Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::Options Struct Reference

Logging options for config parser. More...

#include <qpid/log/Options.h>

List of all members.

Public Member Functions

 Options (const std::string &argv0_=std::string(), const std::string &name_="Logging options")
 Pass argv[0] for use in syslog output.
 Options (const Options &)
Optionsoperator= (const Options &)
void parse (int argc, char const *const *argv, const std::string &configfile=std::string(), bool allowUnknown=false)
 Parses options from argc/argv, environment variables and config file.
boost::program_options::options_description_easy_init addOptions ()

Public Attributes

std::string argv0
std::string name
std::vector< std::stringselectors
bool time
bool level
bool thread
bool source
bool function
bool hiresTs
bool trace
std::string prefix
std::auto_ptr< SinkOptionssinkOptions

Detailed Description

Logging options for config parser.


Constructor & Destructor Documentation

qpid::log::Options::Options ( const std::string argv0_ = std::string(),
const std::string name_ = "Logging options" 
)

Pass argv[0] for use in syslog output.

qpid::log::Options::Options ( const Options )

Member Function Documentation

boost::program_options::options_description_easy_init qpid::Options::addOptions ( ) [inline, inherited]

Definition at line 154 of file Options.h.

Options& qpid::log::Options::operator= ( const Options )
void qpid::Options::parse ( int  argc,
char const *const *  argv,
const std::string configfile = std::string(),
bool  allowUnknown = false 
) [inherited]

Parses options from argc/argv, environment variables and config file.

Note the filename argument can reference an options variable that is updated by argc/argv or environment variable parsing.


Member Data Documentation

Definition at line 39 of file Options.h.

Definition at line 42 of file Options.h.

Definition at line 42 of file Options.h.

Definition at line 42 of file Options.h.

Definition at line 40 of file Options.h.

Definition at line 44 of file Options.h.

Definition at line 42 of file Options.h.

Definition at line 42 of file Options.h.

Definition at line 42 of file Options.h.

Definition at line 43 of file Options.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00726.html0000664000076400007640000002351111752725720017320 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Value Member List
This is the complete list of members for qpid::console::Value, including all inherited members.
asBool() const qpid::console::Value [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
isBool() const qpid::console::Value [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
str() const =0qpid::console::Value [pure virtual]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00284.html0000664000076400007640000001034611752725720017321 0ustar00jrossjross00000000000000 std::set::reverse_iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::set::reverse_iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00293.html0000664000076400007640000002245211752725720017322 0ustar00jrossjross00000000000000 qpid::sys::Runnable Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Runnable Class Reference

Interface for objects that can be run, e.g. More...

#include <qpid/sys/Runnable.h>

List of all members.

Public Types

typedef boost::function0< void > Functor
 Type to represent a runnable as a Functor.

Public Member Functions

virtual ~Runnable ()
virtual void run ()=0
 Derived classes override run().
Functor functor ()
 Create a functor object that will call this->run().

Detailed Description

Interface for objects that can be run, e.g.

in a thread.


Member Typedef Documentation

typedef boost::function0<void> qpid::sys::Runnable::Functor

Type to represent a runnable as a Functor.

Definition at line 37 of file Runnable.h.


Constructor & Destructor Documentation

virtual qpid::sys::Runnable::~Runnable ( ) [virtual]

Member Function Documentation

Functor qpid::sys::Runnable::functor ( )

Create a functor object that will call this->run().

virtual void qpid::sys::Runnable::run ( ) [pure virtual]

Derived classes override run().

Implemented in qpid::client::SubscriptionManager.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00125.html0000664000076400007640000006466111752725720017324 0ustar00jrossjross00000000000000 qpid::framing::FieldValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Value that can appear in an AMQP field table. More...

#include <qpid/framing/FieldValue.h>

List of all members.

Classes

class  Data

Public Member Functions

 FieldValue ()
void setType (uint8_t type)
uint8_t getType () const
DatagetData ()
uint32_t encodedSize () const
bool empty () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const FieldValue &) const
QPID_COMMON_INLINE_EXTERN bool operator!= (const FieldValue &v) const
void print (std::ostream &out) const
template<typename T >
bool convertsTo () const
template<typename T >
get () const
template<class T , int W>
getIntegerValue () const
template<class T >
getIntegerValue () const
template<class T , int W>
getFloatingPointValue () const
template<int W>
void getFixedWidthValue (unsigned char *) const
template<class T >
bool get (T &) const
 Accessor that can be used to get values of type FieldTable, Array and List.

Protected Member Functions

 FieldValue (uint8_t t, Data *d)

Static Protected Member Functions

static uint8_tconvertIfRequired (uint8_t *const octets, int width)

Detailed Description

Value that can appear in an AMQP field table.


Constructor & Destructor Documentation

qpid::framing::FieldValue::FieldValue ( ) [inline]

Definition at line 83 of file FieldValue.h.

qpid::framing::FieldValue::FieldValue ( uint8_t  t,
Data d 
) [inline, protected]

Definition at line 107 of file FieldValue.h.


Member Function Documentation

static uint8_t* qpid::framing::FieldValue::convertIfRequired ( uint8_t *const  octets,
int  width 
) [static, protected]

Referenced by getFloatingPointValue().

bool qpid::framing::FieldValue::convertsTo< int64_t > ( ) const [inline]

Definition at line 97 of file FieldValue.h.

void qpid::framing::FieldValue::decode ( Buffer buffer)
bool qpid::framing::FieldValue::empty ( ) const [inline]

Definition at line 89 of file FieldValue.h.

void qpid::framing::FieldValue::encode ( Buffer buffer)
uint32_t qpid::framing::FieldValue::encodedSize ( ) const [inline]

Definition at line 88 of file FieldValue.h.

double qpid::framing::FieldValue::get< double > ( ) const [inline]

Definition at line 98 of file FieldValue.h.

template<class T >
bool qpid::framing::FieldValue::get ( T &  t) const [inline]

Accessor that can be used to get values of type FieldTable, Array and List.

Definition at line 325 of file FieldValue.h.

Data& qpid::framing::FieldValue::getData ( ) [inline]

Definition at line 87 of file FieldValue.h.

template<int W>
void qpid::framing::FieldValue::getFixedWidthValue ( unsigned char *  value) const

Definition at line 226 of file FieldValue.h.

template<class T , int W>
T qpid::framing::FieldValue::getFloatingPointValue ( ) const [inline]

Definition at line 213 of file FieldValue.h.

References convertIfRequired().

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const [inline]

Definition at line 184 of file FieldValue.h.

template<class T >
T qpid::framing::FieldValue::getIntegerValue ( ) const
uint8_t qpid::framing::FieldValue::getType ( ) const
QPID_COMMON_INLINE_EXTERN bool qpid::framing::FieldValue::operator!= ( const FieldValue v) const [inline]

Definition at line 93 of file FieldValue.h.

bool qpid::framing::FieldValue::operator== ( const FieldValue ) const
void qpid::framing::FieldValue::print ( std::ostream out) const
void qpid::framing::FieldValue::setType ( uint8_t  type)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x77.html0000664000076400007640000002117711752725717022325 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00524_source.html0000664000076400007640000004220211752725717020700 0ustar00jrossjross00000000000000 qpid/types/Uuid.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/types/Uuid.h
Go to the documentation of this file.
00001 #ifndef QPID_TYPES_UUID_H
00002 #define QPID_TYPES_UUID_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/types/ImportExport.h"
00026 #include <iosfwd>
00027 #include <string>
00028 
00029 namespace qpid {
00030 namespace types {
00031 
00032 class QPID_TYPES_CLASS_EXTERN Uuid
00033 {
00034   public:
00035     static const size_t SIZE;
00040     QPID_TYPES_EXTERN Uuid(bool unique=false);
00041     QPID_TYPES_EXTERN Uuid(const Uuid&);
00042     QPID_TYPES_EXTERN Uuid& operator=(const Uuid&);
00044     QPID_TYPES_EXTERN Uuid(const unsigned char* data16);
00045 
00047     QPID_TYPES_EXTERN void generate();
00048 
00050     QPID_TYPES_EXTERN void clear();
00051 
00053     QPID_TYPES_EXTERN bool isNull() const;
00054     QPID_TYPES_EXTERN operator bool() const;
00055     QPID_TYPES_EXTERN bool operator!() const;
00056 
00058     QPID_TYPES_EXTERN std::string str() const;
00059 
00060     QPID_TYPES_EXTERN size_t size() const;
00061     QPID_TYPES_EXTERN const unsigned char* data() const;
00062 
00063     friend QPID_TYPES_EXTERN bool operator==(const Uuid&, const Uuid&);
00064     friend QPID_TYPES_EXTERN bool operator!=(const Uuid&, const Uuid&);
00065     friend QPID_TYPES_EXTERN bool operator<(const Uuid&, const Uuid&);
00066     friend QPID_TYPES_EXTERN bool operator>(const Uuid&, const Uuid&);
00067     friend QPID_TYPES_EXTERN bool operator<=(const Uuid&, const Uuid&);
00068     friend QPID_TYPES_EXTERN bool operator>=(const Uuid&, const Uuid&);
00069     friend QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream&, Uuid);
00070     friend QPID_TYPES_EXTERN std::istream& operator>>(std::istream&, Uuid&);
00071 
00072   private:
00073     unsigned char bytes[16];
00074 };
00075 
00077 QPID_TYPES_EXTERN bool operator==(const Uuid&, const Uuid&);
00079 QPID_TYPES_EXTERN bool operator!=(const Uuid&, const Uuid&);
00080 
00081 QPID_TYPES_EXTERN bool operator<(const Uuid&, const Uuid&);
00082 QPID_TYPES_EXTERN bool operator>(const Uuid&, const Uuid&);
00083 QPID_TYPES_EXTERN bool operator<=(const Uuid&, const Uuid&);
00084 QPID_TYPES_EXTERN bool operator>=(const Uuid&, const Uuid&);
00085 
00087 QPID_TYPES_EXTERN std::ostream& operator<<(std::ostream&, Uuid);
00088 
00090 QPID_TYPES_EXTERN std::istream& operator>>(std::istream&, Uuid&);
00091 
00092 }} // namespace qpid::types
00093 
00094 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00410.html0000664000076400007640000001114711752725717017316 0ustar00jrossjross00000000000000 qmf/Data.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Data.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qmf/exceptions.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::Data

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00838.html0000664000076400007640000002567311752725720017337 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::ManagementItem Member List
This is the complete list of members for qpid::management::ManagementItem, including all inherited members.
ACCESS_RCqpid::management::ManagementItem [static]
ACCESS_ROqpid::management::ManagementItem [static]
ACCESS_RWqpid::management::ManagementItem [static]
CLASS_KIND_EVENTqpid::management::ManagementItem [static]
CLASS_KIND_TABLEqpid::management::ManagementItem [static]
DIR_Iqpid::management::ManagementItem [static]
DIR_IOqpid::management::ManagementItem [static]
DIR_Oqpid::management::ManagementItem [static]
FLAG_CONFIGqpid::management::ManagementItem [static]
FLAG_ENDqpid::management::ManagementItem [static]
FLAG_INDEXqpid::management::ManagementItem [static]
TYPE_ABSTIMEqpid::management::ManagementItem [static]
TYPE_BOOLqpid::management::ManagementItem [static]
TYPE_DELTATIMEqpid::management::ManagementItem [static]
TYPE_DOUBLEqpid::management::ManagementItem [static]
TYPE_FLOATqpid::management::ManagementItem [static]
TYPE_FTABLEqpid::management::ManagementItem [static]
TYPE_LISTqpid::management::ManagementItem [static]
TYPE_LSTRqpid::management::ManagementItem [static]
TYPE_REFqpid::management::ManagementItem [static]
TYPE_S16qpid::management::ManagementItem [static]
TYPE_S32qpid::management::ManagementItem [static]
TYPE_S64qpid::management::ManagementItem [static]
TYPE_S8qpid::management::ManagementItem [static]
TYPE_SSTRqpid::management::ManagementItem [static]
TYPE_U16qpid::management::ManagementItem [static]
TYPE_U32qpid::management::ManagementItem [static]
TYPE_U64qpid::management::ManagementItem [static]
TYPE_U8qpid::management::ManagementItem [static]
TYPE_UUIDqpid::management::ManagementItem [static]
~ManagementItem()qpid::management::ManagementItem [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00058.html0000664000076400007640000007417711752725717017342 0ustar00jrossjross00000000000000 qpid::client::Connection Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::Connection Class Reference

Represents a connection to an AMQP broker. More...

#include <qpid/client/Connection.h>

List of all members.

Public Member Functions

 Connection ()
 Creates a Connection object, but does not open the connection.
 ~Connection ()
 Destroys a Connection object but does not close the connection if it was open.
void open (const std::string &host, int port=5672, const std::string &uid="", const std::string &pwd="", const std::string &virtualhost="/", uint16_t maxFrameSize=65535)
 Opens a connection to a broker.
void open (const Url &url, const std::string &uid="", const std::string &pwd="", const std::string &virtualhost="/", uint16_t maxFrameSize=65535)
 Opens a connection to a broker using a URL.
void open (const Url &url, const ConnectionSettings &settings)
 Opens a connection to a broker using a URL.
void open (const ConnectionSettings &settings)
 Opens a connection to a broker.
void close ()
 Close the connection.
Session newSession (const std::string &name=std::string(), uint32_t timeoutSeconds=0)
 Create a new session on this connection.
void resume (Session &session)
 Resume a suspended session.
bool isOpen () const
std::vector< UrlgetInitialBrokers ()
 In a cluster, returns the initial set of known broker URLs at the time of connection.
void registerFailureCallback (boost::function< void()> fn)
const ConnectionSettingsgetNegotiatedSettings ()
 Return the set of client negotiated settings.

Protected Attributes

boost::shared_ptr< ConnectionImpl > impl

Detailed Description

Represents a connection to an AMQP broker.

All communication is initiated by establishing a connection, then creating one or more Session objects using the connection.

See also:
newSession()

Some methods use an AMQP 0-10 URL to specify connection parameters. This is defined in the AMQP 0-10 specification (http://jira.amqp.org/confluence/display/AMQP/AMQP+Specification).

amqp_url = "amqp:" prot_addr_list prot_addr_list = [prot_addr ","]* prot_addr prot_addr = tcp_prot_addr | tls_prot_addr

tcp_prot_addr = tcp_id tcp_addr tcp_id = "tcp:" | "" tcp_addr = [host [":" port] ] host = <as per http://www.ietf.org/rfc/rfc3986.txt> port = number]]>


Constructor & Destructor Documentation

qpid::client::Connection::Connection ( )

Creates a Connection object, but does not open the connection.

See also:
open()
qpid::client::Connection::~Connection ( )

Destroys a Connection object but does not close the connection if it was open.

See also:
close()

Member Function Documentation

void qpid::client::Connection::close ( )

Close the connection.

Any further use of this connection (without reopening it) will not succeed.

std::vector<Url> qpid::client::Connection::getInitialBrokers ( )

In a cluster, returns the initial set of known broker URLs at the time of connection.

const ConnectionSettings& qpid::client::Connection::getNegotiatedSettings ( )

Return the set of client negotiated settings.

bool qpid::client::Connection::isOpen ( ) const
Session qpid::client::Connection::newSession ( const std::string name = std::string(),
uint32_t  timeoutSeconds = 0 
)

Create a new session on this connection.

Sessions allow multiple streams of work to be multiplexed over the same connection. The returned Session provides functions to send commands to the broker.

Session functions are synchronous. In other words, a Session function will send a command to the broker and does not return until it receives the broker's response confirming the command was executed.

AsyncSession provides asynchronous versions of the same functions. These functions send a command to the broker but do not wait for a response.

You can convert a Session s into an AsyncSession as follows:

You can execute a single command asynchronously will a Session s like ths:

  async(s).messageTransfer(...);

Using an AsyncSession is faster for sending large numbers of commands, since each command is sent as soon as possible without waiting for the previous command to be confirmed.

However with AsyncSession you cannot assume that a command has completed until you explicitly synchronize. The simplest way to do this is to call Session::sync() or AsyncSession::sync(). Both of these functions wait for the broker to confirm all commands issued so far on the session.

Parameters:
name,:A name to identify the session.
See also:
qpid::SessionId If the name is empty (the default) then a unique name will be chosen using a Universally-unique identifier (UUID) algorithm.
void qpid::client::Connection::open ( const std::string host,
int  port = 5672,
const std::string uid = "",
const std::string pwd = "",
const std::string virtualhost = "/",
uint16_t  maxFrameSize = 65535 
)

Opens a connection to a broker.

Parameters:
hostthe host on which the broker is running.
portthe port on the which the broker is listening.
uidthe userid to connect with.
pwdthe password to connect with (currently SASL PLAIN is the only authentication method supported so this is sent in clear text).
virtualhostthe AMQP virtual host to use (virtual hosts, where implemented(!), provide namespace partitioning within a single broker).
void qpid::client::Connection::open ( const Url url,
const std::string uid = "",
const std::string pwd = "",
const std::string virtualhost = "/",
uint16_t  maxFrameSize = 65535 
)

Opens a connection to a broker using a URL.

If the URL contains multiple addresses, try each in turn till connection is successful.

address of the broker to connect to.

Parameters:
uidthe userid to connect with.
pwdthe password to connect with (currently SASL PLAIN is the only authentication method supported so this is sent in clear text).
virtualhostthe AMQP virtual host to use (virtual hosts, where implemented(!), provide namespace partitioning within a single broker).
void qpid::client::Connection::open ( const Url url,
const ConnectionSettings settings 
)

Opens a connection to a broker using a URL.

If the URL contains multiple addresses, try each in turn till connection is successful.

address of the broker to connect to.

Parameters:
settingsused for any settings not provided by the URL. Settings provided by the url (e.g. host, port) are ignored.
void qpid::client::Connection::open ( const ConnectionSettings settings)

Opens a connection to a broker.

Parameters:
thesettings to use (host, port etc).
See also:
ConnectionSettings.
void qpid::client::Connection::registerFailureCallback ( boost::function< void()>  fn)
void qpid::client::Connection::resume ( Session session)

Resume a suspended session.

A session may be resumed on a different connection to the one that created it.


Member Data Documentation

boost::shared_ptr<ConnectionImpl> qpid::client::Connection::impl [protected]

Definition at line 71 of file Connection.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00647.html0000664000076400007640000003666511752725717017346 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Value Member List
This is the complete list of members for qmf::engine::Value, including all inherited members.
appendToArray(Value *val)qmf::engine::Value
appendToList(Value *val)qmf::engine::Value
arrayItem(uint32_t idx)qmf::engine::Value
arrayItemCount() const qmf::engine::Value
arrayType() const qmf::engine::Value
asBool() const qmf::engine::Value
asDouble() const qmf::engine::Value
asFloat() const qmf::engine::Value
asInt() const qmf::engine::Value
asInt64() const qmf::engine::Value
asObject() const qmf::engine::Value
asObjectId() const qmf::engine::Value
asString() const qmf::engine::Value
asUint() const qmf::engine::Value
asUint64() const qmf::engine::Value
asUuid() const qmf::engine::Value
byKey(const char *key)qmf::engine::Value
byKey(const char *key) const qmf::engine::Value
deleteArrayItem(uint32_t idx)qmf::engine::Value
deleteKey(const char *key)qmf::engine::Value
deleteListItem(uint32_t idx)qmf::engine::Value
getType() const qmf::engine::Value
insert(const char *key, Value *val)qmf::engine::Value
isArray() const qmf::engine::Value
isBool() const qmf::engine::Value
isDouble() const qmf::engine::Value
isFloat() const qmf::engine::Value
isInt() const qmf::engine::Value
isInt64() const qmf::engine::Value
isList() const qmf::engine::Value
isMap() const qmf::engine::Value
isNull() const qmf::engine::Value
isObject() const qmf::engine::Value
isObjectId() const qmf::engine::Value
isString() const qmf::engine::Value
isUint() const qmf::engine::Value
isUint64() const qmf::engine::Value
isUuid() const qmf::engine::Value
key(uint32_t idx) const qmf::engine::Value
keyCount() const qmf::engine::Value
keyInMap(const char *key) const qmf::engine::Value
listItem(uint32_t idx)qmf::engine::Value
listItemCount() const qmf::engine::Value
setBool(bool val)qmf::engine::Value
setDouble(double val)qmf::engine::Value
setFloat(float val)qmf::engine::Value
setInt(int32_t val)qmf::engine::Value
setInt64(int64_t val)qmf::engine::Value
setNull()qmf::engine::Value
setObject(Object *val)qmf::engine::Value
setObjectId(const ObjectId &oid)qmf::engine::Value
setString(const char *val)qmf::engine::Value
setUint(uint32_t val)qmf::engine::Value
setUint64(uint64_t val)qmf::engine::Value
setUuid(const uint8_t *val)qmf::engine::Value
Value(const Value &from)qmf::engine::Value
Value(Typecode t, Typecode arrayType=TYPE_UINT8)qmf::engine::Value
~Value()qmf::engine::Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00559_source.html0000664000076400007640000002120611752725717020711 0ustar00jrossjross00000000000000 qpid/sys/posix/check.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/check.h
Go to the documentation of this file.
00001 #ifndef _posix_check_h
00002 #define _posix_check_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/Exception.h"
00026 #include "qpid/Msg.h"
00027 
00028 #include <cerrno>
00029 #include <assert.h>
00030 #include <stdio.h>
00031 #include <stdlib.h>
00032 
00033 #define QPID_POSIX_ERROR(ERRNO) qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO)))
00034 
00036 #define QPID_POSIX_CHECK(RESULT)                        \
00037     if ((RESULT) < 0) throw QPID_POSIX_ERROR((errno))
00038 
00040 #define QPID_POSIX_THROW_IF(ERRNO)              \
00041     do { int e=(ERRNO); if (e) throw QPID_POSIX_ERROR(e); } while(0)
00042 
00044 #ifdef NDEBUG
00045 #define QPID_POSIX_ASSERT_THROW_IF(ERRNO) QPID_POSIX_THROW_IF(ERRNO)
00046 #else
00047 #define QPID_POSIX_ASSERT_THROW_IF(ERRNO)                               \
00048     do { int e=(ERRNO); if (e) { errno=e; ::perror(0); assert(0); } } while(0)
00049 #endif
00050 
00051 #define QPID_POSIX_ABORT_IF(ERRNO) if ((int) ERRNO) { errno=ERRNO; ::perror(0); abort(); }
00052 
00053 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00487.html0000664000076400007640000001233011752725717017327 0ustar00jrossjross00000000000000 qpid/console/Package.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/Package.h File Reference
#include <string>
#include <map>
#include "qpid/console/ConsoleImportExport.h"
#include "qpid/sys/IntegerTypes.h"

Go to the source code of this file.

Classes

class  qpid::console::Package
struct  qpid::console::Package::NameHash
struct  qpid::console::Package::NameHashComp

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::console

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00644.html0000664000076400007640000001343011752725717017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaClassKey Member List
This is the complete list of members for qmf::engine::SchemaClassKey, including all inherited members.
asString() const qmf::engine::SchemaClassKey
getClassName() const qmf::engine::SchemaClassKey
getHash() const qmf::engine::SchemaClassKey
getPackageName() const qmf::engine::SchemaClassKey
operator<(const SchemaClassKey &other) const qmf::engine::SchemaClassKey
operator==(const SchemaClassKey &other) const qmf::engine::SchemaClassKey
SchemaClassKey(const SchemaClassKey &from)qmf::engine::SchemaClassKey
~SchemaClassKey()qmf::engine::SchemaClassKey

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00208.html0000664000076400007640000004736711752725720017332 0ustar00jrossjross00000000000000 qpid::framing::MessageAcquireResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::MessageAcquireResult Class Reference

#include <qpid/framing/MessageAcquireResult.h>

List of all members.

Public Member Functions

 MessageAcquireResult (const SequenceSet &_transfers)
 MessageAcquireResult ()
void setTransfers (const SequenceSet &_transfers)
const SequenceSetgetTransfers () const
bool hasTransfers () const
void clearTransfersFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1028

Friends

std::ostreamoperator<< (std::ostream &, const MessageAcquireResult &)

Constructor & Destructor Documentation

qpid::framing::MessageAcquireResult::MessageAcquireResult ( const SequenceSet _transfers) [inline]

Definition at line 43 of file MessageAcquireResult.h.

qpid::framing::MessageAcquireResult::MessageAcquireResult ( ) [inline]

Definition at line 49 of file MessageAcquireResult.h.


Member Function Documentation

uint32_t qpid::framing::MessageAcquireResult::bodySize ( ) const
void qpid::framing::MessageAcquireResult::clearTransfersFlag ( )
void qpid::framing::MessageAcquireResult::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::MessageAcquireResult::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::MessageAcquireResult::encode ( Buffer ) const
uint32_t qpid::framing::MessageAcquireResult::encodedSize ( ) const
void qpid::framing::MessageAcquireResult::encodeStructBody ( Buffer ) const
const SequenceSet& qpid::framing::MessageAcquireResult::getTransfers ( ) const
bool qpid::framing::MessageAcquireResult::hasTransfers ( ) const
void qpid::framing::MessageAcquireResult::print ( std::ostream out) const
void qpid::framing::MessageAcquireResult::setTransfers ( const SequenceSet _transfers)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const MessageAcquireResult  
) [friend]

Member Data Documentation

Definition at line 42 of file MessageAcquireResult.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00359.html0000664000076400007640000002425111752725720017324 0ustar00jrossjross00000000000000 qpid::framing::TransportBusyException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::TransportBusyException Struct Reference

The transport is currently attached to another session. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 TransportBusyException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::session::DetachCode code

Detailed Description

The transport is currently attached to another session.


Constructor & Destructor Documentation

qpid::framing::TransportBusyException::TransportBusyException ( const std::string msg = std::string()) [inline]

Definition at line 265 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::TransportBusyException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 264 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 66 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00706.html0000664000076400007640000001530211752725720017315 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::Broker Member List
This is the complete list of members for qpid::console::Broker, including all inherited members.
addBinding(const std::string &key)qpid::console::Broker [inline]
Broker(SessionManager &sm, client::ConnectionSettings &settings)qpid::console::Broker
getBrokerBank() const qpid::console::Broker [inline]
getBrokerId() const qpid::console::Broker [inline]
getError() const qpid::console::Broker [inline]
getSessionId() const qpid::console::Broker [inline]
getUrl() const qpid::console::Broker
isConnected() const qpid::console::Broker [inline]
operator<<(std::ostream &o, const Broker &k)qpid::console::Broker [friend]
waitForStable()qpid::console::Broker
~Broker()qpid::console::Broker
~MessageListener()qpid::client::MessageListener [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_0x62.html0000664000076400007640000001405511752725720022572 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all namespace members with links to the namespace documentation for each member:

- b -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00329.html0000664000076400007640000002421511752725720017321 0ustar00jrossjross00000000000000 qpid::framing::SessionBusyException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::SessionBusyException Struct Reference

The session is currently attached to another transport. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 SessionBusyException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::session::DetachCode code

Detailed Description

The session is currently attached to another transport.


Constructor & Destructor Documentation

qpid::framing::SessionBusyException::SessionBusyException ( const std::string msg = std::string()) [inline]

Definition at line 253 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::SessionBusyException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 252 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 66 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00852.html0000664000076400007640000001453011752725720017321 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::AssertionFailed Member List
This is the complete list of members for qpid::messaging::AssertionFailed, including all inherited members.
AddressError(const std::string &)qpid::messaging::AddressError
AssertionFailed(const std::string &msg)qpid::messaging::AssertionFailed
detailqpid::messaging::MessagingException
Exception(const std::string &message=std::string())qpid::types::Exception [explicit]
LinkError(const std::string &)qpid::messaging::LinkError
MessagingException(const std::string &msg)qpid::messaging::MessagingException
ResolutionError(const std::string &msg)qpid::messaging::ResolutionError
what() const qpid::types::Exception [virtual]
~Exception()qpid::types::Exception [virtual]
~MessagingException()qpid::messaging::MessagingException [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00127.html0000664000076400007640000014113111752725720017312 0ustar00jrossjross00000000000000 qpid::framing::FileProperties Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FileProperties Class Reference

#include <qpid/framing/FileProperties.h>

List of all members.

Public Member Functions

 FileProperties (const std::string &_contentType, const std::string &_contentEncoding, const FieldTable &_headers, uint8_t _priority, const std::string &_replyTo, const std::string &_messageId, const std::string &_filename, uint64_t _timestamp, const std::string &_clusterId)
 FileProperties ()
void setContentType (const std::string &_contentType)
const std::stringgetContentType () const
bool hasContentType () const
void clearContentTypeFlag ()
void setContentEncoding (const std::string &_contentEncoding)
const std::stringgetContentEncoding () const
bool hasContentEncoding () const
void clearContentEncodingFlag ()
void setHeaders (const FieldTable &_headers)
const FieldTablegetHeaders () const
FieldTablegetHeaders ()
bool hasHeaders () const
void clearHeadersFlag ()
void setPriority (uint8_t _priority)
uint8_t getPriority () const
bool hasPriority () const
void clearPriorityFlag ()
void setReplyTo (const std::string &_replyTo)
const std::stringgetReplyTo () const
bool hasReplyTo () const
void clearReplyToFlag ()
void setMessageId (const std::string &_messageId)
const std::stringgetMessageId () const
bool hasMessageId () const
void clearMessageIdFlag ()
void setFilename (const std::string &_filename)
const std::stringgetFilename () const
bool hasFilename () const
void clearFilenameFlag ()
void setTimestamp (uint64_t _timestamp)
uint64_t getTimestamp () const
bool hasTimestamp () const
void clearTimestampFlag ()
void setClusterId (const std::string &_clusterId)
const std::stringgetClusterId () const
bool hasClusterId () const
void clearClusterIdFlag ()
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 2305

Friends

std::ostreamoperator<< (std::ostream &, const FileProperties &)

Constructor & Destructor Documentation

qpid::framing::FileProperties::FileProperties ( const std::string _contentType,
const std::string _contentEncoding,
const FieldTable _headers,
uint8_t  _priority,
const std::string _replyTo,
const std::string _messageId,
const std::string _filename,
uint64_t  _timestamp,
const std::string _clusterId 
) [inline]

Definition at line 51 of file FileProperties.h.

qpid::framing::FileProperties::FileProperties ( ) [inline]

Definition at line 81 of file FileProperties.h.


Member Function Documentation

uint32_t qpid::framing::FileProperties::bodySize ( ) const
void qpid::framing::FileProperties::clearClusterIdFlag ( )
void qpid::framing::FileProperties::clearContentEncodingFlag ( )
void qpid::framing::FileProperties::clearContentTypeFlag ( )
void qpid::framing::FileProperties::clearFilenameFlag ( )
void qpid::framing::FileProperties::clearHeadersFlag ( )
void qpid::framing::FileProperties::clearMessageIdFlag ( )
void qpid::framing::FileProperties::clearPriorityFlag ( )
void qpid::framing::FileProperties::clearReplyToFlag ( )
void qpid::framing::FileProperties::clearTimestampFlag ( )
void qpid::framing::FileProperties::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::FileProperties::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::FileProperties::encode ( Buffer ) const
uint32_t qpid::framing::FileProperties::encodedSize ( ) const
void qpid::framing::FileProperties::encodeStructBody ( Buffer ) const
const std::string& qpid::framing::FileProperties::getClusterId ( ) const
const std::string& qpid::framing::FileProperties::getContentEncoding ( ) const
const std::string& qpid::framing::FileProperties::getContentType ( ) const
const std::string& qpid::framing::FileProperties::getFilename ( ) const
const FieldTable& qpid::framing::FileProperties::getHeaders ( ) const
FieldTable& qpid::framing::FileProperties::getHeaders ( )
const std::string& qpid::framing::FileProperties::getMessageId ( ) const
uint8_t qpid::framing::FileProperties::getPriority ( ) const
const std::string& qpid::framing::FileProperties::getReplyTo ( ) const
uint64_t qpid::framing::FileProperties::getTimestamp ( ) const
bool qpid::framing::FileProperties::hasClusterId ( ) const
bool qpid::framing::FileProperties::hasContentEncoding ( ) const
bool qpid::framing::FileProperties::hasContentType ( ) const
bool qpid::framing::FileProperties::hasFilename ( ) const
bool qpid::framing::FileProperties::hasHeaders ( ) const
bool qpid::framing::FileProperties::hasMessageId ( ) const
bool qpid::framing::FileProperties::hasPriority ( ) const
bool qpid::framing::FileProperties::hasReplyTo ( ) const
bool qpid::framing::FileProperties::hasTimestamp ( ) const
void qpid::framing::FileProperties::print ( std::ostream out) const
void qpid::framing::FileProperties::setClusterId ( const std::string _clusterId)
void qpid::framing::FileProperties::setContentEncoding ( const std::string _contentEncoding)
void qpid::framing::FileProperties::setContentType ( const std::string _contentType)
void qpid::framing::FileProperties::setFilename ( const std::string _filename)
void qpid::framing::FileProperties::setHeaders ( const FieldTable _headers)
void qpid::framing::FileProperties::setMessageId ( const std::string _messageId)
void qpid::framing::FileProperties::setPriority ( uint8_t  _priority)
void qpid::framing::FileProperties::setReplyTo ( const std::string _replyTo)
void qpid::framing::FileProperties::setTimestamp ( uint64_t  _timestamp)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const FileProperties  
) [friend]

Member Data Documentation

Definition at line 50 of file FileProperties.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00488.html0000664000076400007640000001161011752725717017330 0ustar00jrossjross00000000000000 qpid/console/SequenceManager.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/SequenceManager.h File Reference
#include "qpid/console/ConsoleImportExport.h"
#include "qpid/sys/Mutex.h"
#include <map>
#include <string>
#include <set>

Go to the source code of this file.

Classes

class  qpid::console::SequenceManager

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::console

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00601.html0000664000076400007640000002172011752725717017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::AgentEvent Member List
This is the complete list of members for qmf::AgentEvent, including all inherited members.
addReturnArgument(const std::string &, const qpid::types::Variant &, const std::string &st="")qmf::AgentEvent
AgentEvent(AgentEventImpl *impl=0)qmf::AgentEvent
AgentEvent(const AgentEvent &)qmf::AgentEvent
getArguments()qmf::AgentEvent
getArgumentSubtypes()qmf::AgentEvent
getDataAddr() const qmf::AgentEvent
getMethodName() const qmf::AgentEvent
getQuery() const qmf::AgentEvent
getType() const qmf::AgentEvent
getUserId() const qmf::AgentEvent
Handle()qmf::Handle< AgentEventImpl > [inline, protected]
Handle(const Handle &)qmf::Handle< AgentEventImpl > [protected]
hasDataAddr() const qmf::AgentEvent
implqmf::Handle< AgentEventImpl > [protected]
Impl typedefqmf::Handle< AgentEventImpl > [protected]
isNull() const qmf::Handle< AgentEventImpl > [inline]
isValid() const qmf::Handle< AgentEventImpl > [inline]
operator bool() const qmf::Handle< AgentEventImpl > [inline]
operator!() const qmf::Handle< AgentEventImpl > [inline]
operator=(const AgentEvent &)qmf::AgentEvent
Handle< AgentEventImpl >::operator=(const Handle &)qmf::Handle< AgentEventImpl > [protected]
swap(Handle< T > &h)qmf::Handle< AgentEventImpl > [inline]
~AgentEvent()qmf::AgentEvent

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00511_source.html0000664000076400007640000002721011752725717020676 0ustar00jrossjross00000000000000 qpid/framing/MessageAcquireResult.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/MessageAcquireResult.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_MESSAGEACQUIRERESULT_H
00002 #define QPID_FRAMING_MESSAGEACQUIRERESULT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN MessageAcquireResult  {
00039     SequenceSet transfers;
00040     uint16_t flags;
00041 public:
00042     static const uint16_t TYPE = 1028;
00043     MessageAcquireResult(
00044         const SequenceSet& _transfers) : 
00045         transfers(_transfers),
00046         flags(0){
00047         flags |= (1 << 8);
00048     }
00049     MessageAcquireResult()  : flags(0) {}
00050     
00051     QPID_COMMON_EXTERN void setTransfers(const SequenceSet& _transfers);
00052     QPID_COMMON_EXTERN const SequenceSet& getTransfers() const;
00053     QPID_COMMON_EXTERN bool hasTransfers() const;
00054     QPID_COMMON_EXTERN void clearTransfersFlag();
00055     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const MessageAcquireResult&);
00056     QPID_COMMON_EXTERN void encode(Buffer&) const;
00057     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00058     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00059     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00060     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00061     QPID_COMMON_EXTERN uint32_t bodySize() const;
00062     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00063 }; /* class MessageAcquireResult */
00064 
00065 }}
00066 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00762.html0000664000076400007640000002135611752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::Struct32Value Member List
This is the complete list of members for qpid::framing::Struct32Value, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
Struct32Value(const std::string &v)qpid::framing::Struct32Value

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00034.html0000664000076400007640000001024711752725720017312 0ustar00jrossjross00000000000000 std::basic_ofstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_ofstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00438.html0000664000076400007640000001151411752725717017326 0ustar00jrossjross00000000000000 qpid/client/Handle.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/Handle.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::Handle
 A handle is like a pointer: refers to an underlying implementation object. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00675.html0000664000076400007640000001233611752725717017334 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::amqp_0_10::ListCodec Member List
This is the complete list of members for qpid::amqp_0_10::ListCodec, including all inherited members.
contentTypeqpid::amqp_0_10::ListCodec [static]
decode(const std::string &, ObjectType &)qpid::amqp_0_10::ListCodec [static]
encode(const ObjectType &, std::string &)qpid::amqp_0_10::ListCodec [static]
encodedSize(const ObjectType &)qpid::amqp_0_10::ListCodec [static]
ObjectType typedefqpid::amqp_0_10::ListCodec

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00619.html0000664000076400007640000002071211752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::Agent Member List
This is the complete list of members for qmf::engine::Agent, including all inherited members.
addObject(Object &obj, uint64_t persistId)qmf::engine::Agent
Agent(char *label, bool internalStore=true)qmf::engine::Agent
allocObjectId(uint64_t persistId)qmf::engine::Agent
allocObjectId(uint32_t persistIdLo, uint32_t persistIdHi)qmf::engine::Agent
getEvent(AgentEvent &event) const qmf::engine::Agent
getXmtMessage(Message &item) const qmf::engine::Agent
handleRcvMessage(Message &message)qmf::engine::Agent
heartbeat()qmf::engine::Agent
methodResponse(uint32_t sequence, uint32_t status, char *text, const Value &arguments)qmf::engine::Agent
newSession()qmf::engine::Agent
popEvent()qmf::engine::Agent
popXmt()qmf::engine::Agent
queryComplete(uint32_t sequence)qmf::engine::Agent
queryResponse(uint32_t sequence, Object &object, bool prop=true, bool stat=true)qmf::engine::Agent
raiseEvent(Event &event)qmf::engine::Agent
registerClass(SchemaObjectClass *cls)qmf::engine::Agent
registerClass(SchemaEventClass *cls)qmf::engine::Agent
setStoreDir(const char *path)qmf::engine::Agent
setTransferDir(const char *path)qmf::engine::Agent
startProtocol()qmf::engine::Agent
~Agent()qmf::engine::Agent

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00378.html0000664000076400007640000001021711752725720017322 0ustar00jrossjross00000000000000 std::valarray Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::valarray Class Reference

STL class. More...

List of all members.


Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00105.html0000664000076400007640000004611511752725720017314 0ustar00jrossjross00000000000000 qpid::framing::EncodedValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::EncodedValue Class Reference

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 EncodedValue ()
 EncodedValue (const T &v)
T & getValue ()
const T & getValue () const
uint32_t encodedSize () const
void encode (Buffer &buffer)
void decode (Buffer &buffer)
bool operator== (const Data &d) const
void print (std::ostream &o) const
virtual bool operator== (const Data &) const =0
virtual bool convertsToInt () const
virtual bool convertsToString () const
virtual int64_t getInt () const
virtual std::string getString () const

Constructor & Destructor Documentation

qpid::framing::EncodedValue::EncodedValue ( ) [inline]

Definition at line 297 of file FieldValue.h.

qpid::framing::EncodedValue::EncodedValue ( const T &  v) [inline]

Definition at line 298 of file FieldValue.h.


Member Function Documentation

virtual bool qpid::framing::FieldValue::Data::convertsToInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::FixedWidthValue.

Definition at line 75 of file FieldValue.h.

virtual bool qpid::framing::FieldValue::Data::convertsToString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::VariableWidthValue.

Definition at line 76 of file FieldValue.h.

void qpid::framing::EncodedValue::decode ( Buffer buffer) [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 308 of file FieldValue.h.

void qpid::framing::EncodedValue::encode ( Buffer buffer) [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 305 of file FieldValue.h.

uint32_t qpid::framing::EncodedValue::encodedSize ( ) const [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 303 of file FieldValue.h.

virtual int64_t qpid::framing::FieldValue::Data::getInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::FixedWidthValue.

Definition at line 77 of file FieldValue.h.

virtual std::string qpid::framing::FieldValue::Data::getString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::framing::VariableWidthValue.

Definition at line 78 of file FieldValue.h.

T& qpid::framing::EncodedValue::getValue ( ) [inline]

Definition at line 300 of file FieldValue.h.

const T& qpid::framing::EncodedValue::getValue ( ) const [inline]

Definition at line 301 of file FieldValue.h.

virtual bool qpid::framing::FieldValue::Data::operator== ( const Data ) const [pure virtual, inherited]
bool qpid::framing::EncodedValue::operator== ( const Data &  d) const [inline]

Definition at line 311 of file FieldValue.h.

void qpid::framing::EncodedValue::print ( std::ostream o) const [inline, virtual]

Implements qpid::framing::FieldValue::Data.

Definition at line 317 of file FieldValue.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x6b.html0000664000076400007640000001540211752725717022411 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00688.html0000664000076400007640000001401011752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FutureResult Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x76.html0000664000076400007640000001755511752725720023616 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- v -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00725.html0000664000076400007640000001321411752725720017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SessionManager::Settings Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00874.html0000664000076400007640000001130111752725720017316 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Raisable Member List
This is the complete list of members for qpid::sys::Raisable, including all inherited members.
raise() const =0qpid::sys::Raisable [pure virtual]
what() const =0qpid::sys::Raisable [pure virtual]
~Raisable()qpid::sys::Raisable [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00555_source.html0000664000076400007640000001366011752725717020712 0ustar00jrossjross00000000000000 qpid/sys/posix/IntegerTypes.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/IntegerTypes.h
Go to the documentation of this file.
00001 #ifndef QPID_SYS_POSIX_INTEGERTYPES_H
00002 #define QPID_SYS_POSIX_INTEGERTYPES_H
00003 
00004 /*
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <stdint.h>
00025 
00026 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00655.html0000664000076400007640000001246511752725717017335 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::ClosedException Member List
This is the complete list of members for qpid::ClosedException, including all inherited members.
ClosedException(const std::string &msg=std::string())qpid::ClosedException
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::ClosedException [virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00001.html0000664000076400007640000004240111752725720017301 0ustar00jrossjross00000000000000 qpid::sys::AbsTime Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::AbsTime Class Reference

Class to represent an instant in time. More...

#include <qpid/sys/Time.h>

List of all members.

Public Member Functions

 AbsTime ()
 AbsTime (const AbsTime &time0, const Duration &duration)
bool operator== (const AbsTime &t) const

Static Public Member Functions

static AbsTime now ()
static AbsTime FarFuture ()
static AbsTime Epoch ()

Friends

bool operator< (const AbsTime &a, const AbsTime &b)
bool operator> (const AbsTime &a, const AbsTime &b)
std::ostreamoperator<< (std::ostream &, const AbsTime &)

Detailed Description

Class to represent an instant in time.

The time resolution is in nanosecs, and this is held with 64 bits giving a total time span from about 25 million years ago to 25 million years hence. As an aside the internal time can sensibly be negative meaning before the epoch (probably 1/1/1970 although this class doesn't care).

The AbsTime class is a value class and so you don't need to add any accessors to its internal state. If you think you want to replace its value, you need to construct a new AbsTime and assign it, viz:

AbsTime when = now(); ... when = AbsTime(when, 2*TIME_SEC); // Advance timer 2 secs

AbsTime is not intended to be used to represent calendar dates/times but you can construct a Duration since the Unix Epoch, 1970-1-1-00:00, so that you can convert to a date/time if needed:

int64_t nanosec_since_epoch = Duration(EPOCH, now());

There are some sensible operations that are currently missing from AbsTime, but nearly all that's needed can be done with a mixture of AbsTimes and Durations.

For example, convenience operators to add a Duration and AbsTime returning an AbsTime would fit here (although you can already perform the operation with one of the AbsTime constructors). However trying to add 2 AbsTimes doesn't make sense.

Definition at line 44 of file Time.h.


Constructor & Destructor Documentation

qpid::sys::AbsTime::AbsTime ( ) [inline]

Definition at line 88 of file Time.h.

qpid::sys::AbsTime::AbsTime ( const AbsTime time0,
const Duration duration 
)

Member Function Documentation

static AbsTime qpid::sys::AbsTime::Epoch ( ) [static]
static AbsTime qpid::sys::AbsTime::FarFuture ( ) [static]
static AbsTime qpid::sys::AbsTime::now ( ) [static]

Referenced by qpid::sys::now().

bool qpid::sys::AbsTime::operator== ( const AbsTime t) const [inline]

Definition at line 97 of file Time.h.


Friends And Related Function Documentation

bool operator< ( const AbsTime a,
const AbsTime b 
) [friend]

Definition at line 131 of file Time.h.

std::ostream& operator<< ( std::ostream ,
const AbsTime  
) [friend]
bool operator> ( const AbsTime a,
const AbsTime b 
) [friend]

Definition at line 133 of file Time.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00216.html0000664000076400007640000006167511752725720017327 0ustar00jrossjross00000000000000 qpid::sys::Monitor Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Monitor Class Reference

A monitor is a condition variable and a mutex. More...

#include <qpid/sys/Monitor.h>

List of all members.

Public Types

typedef
::qpid::sys::ScopedLock< Mutex
ScopedLock
typedef
::qpid::sys::ScopedLock< Mutex
ScopedLock
typedef
::qpid::sys::ScopedUnlock
< Mutex
ScopedUnlock
typedef
::qpid::sys::ScopedUnlock
< Mutex
ScopedUnlock

Public Member Functions

void wait ()
bool wait (const AbsTime &absoluteTime)
void lock ()
void lock ()
void unlock ()
void unlock ()
bool trylock ()
bool trylock ()
void wait (Mutex &)
bool wait (Mutex &, const AbsTime &absoluteTime)
void notify ()
void notify ()
void notifyAll ()
void notifyAll ()

Protected Attributes

pthread_mutex_t mutex
boost::recursive_mutex mutex

Detailed Description

A monitor is a condition variable and a mutex.


Member Typedef Documentation

Definition at line 40 of file Mutex.h.

Definition at line 47 of file Mutex.h.

Definition at line 41 of file Mutex.h.

Definition at line 48 of file Mutex.h.


Member Function Documentation

void qpid::sys::Mutex::lock ( ) [inline, inherited]

Definition at line 115 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and qpid::sys::Mutex::mutex.

void qpid::sys::Mutex::lock ( ) [inline, inherited]
void qpid::sys::Condition::notify ( ) [inline, inherited]

Definition at line 77 of file Condition.h.

References QPID_POSIX_ASSERT_THROW_IF.

void qpid::sys::Condition::notify ( ) [inline, inherited]
void qpid::sys::Condition::notifyAll ( ) [inline, inherited]

Definition at line 81 of file Condition.h.

References QPID_POSIX_ASSERT_THROW_IF.

void qpid::sys::Condition::notifyAll ( ) [inline, inherited]
bool qpid::sys::Mutex::trylock ( ) [inline, inherited]

Definition at line 123 of file Mutex.h.

References qpid::sys::Mutex::mutex.

bool qpid::sys::Mutex::trylock ( ) [inline, inherited]
void qpid::sys::Mutex::unlock ( ) [inline, inherited]

Definition at line 119 of file Mutex.h.

References QPID_POSIX_ASSERT_THROW_IF, and qpid::sys::Mutex::mutex.

void qpid::sys::Mutex::unlock ( ) [inline, inherited]
void qpid::sys::Monitor::wait ( ) [inline]

Definition at line 40 of file Monitor.h.

Referenced by wait().

bool qpid::sys::Monitor::wait ( const AbsTime absoluteTime) [inline]

Definition at line 44 of file Monitor.h.

References wait().

void qpid::sys::Condition::wait ( Mutex mutex) [inline, inherited]

Definition at line 62 of file Condition.h.

References QPID_POSIX_ASSERT_THROW_IF, and qpid::sys::Mutex::mutex.

bool qpid::sys::Condition::wait ( Mutex mutex,
const AbsTime absoluteTime 
) [inline, inherited]

Member Data Documentation

boost::recursive_mutex qpid::sys::Mutex::mutex [protected, inherited]

Definition at line 58 of file Mutex.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespaces.html0000664000076400007640000001512211752725717020625 0ustar00jrossjross00000000000000 Namespace List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Namespace List
Here is a list of all namespaces with brief descriptions:
qmf
qmf::engine
qmf::posix
qpidThis file was automatically generated from the AMQP specification
qpid::amqp_0_10
qpid::client
qpid::client::arg
qpid::client::no_keyword
qpid::console
qpid::framingThe framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built
qpid::framing::cluster
qpid::framing::connection
qpid::framing::dtx
qpid::framing::execution
qpid::framing::file
qpid::framing::message
qpid::framing::session
qpid::framing::stream
qpid::log
qpid::management
qpid::messaging
qpid::sys
qpid::sys::SystemInfoRetrieve information about the system we are running on
qpid::types

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00719.html0000664000076400007640000001471211752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::SchemaProperty Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x77.html0000664000076400007640000002167411752725717021314 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00229.html0000664000076400007640000001437211752725720017323 0ustar00jrossjross00000000000000 qpid::management::Notifyable Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::Notifyable Class Reference

#include <qpid/agent/ManagementAgent.h>

List of all members.

Public Member Functions

virtual ~Notifyable ()
virtual void notify ()=0

Constructor & Destructor Documentation

virtual qpid::management::Notifyable::~Notifyable ( ) [inline, virtual]

Definition at line 34 of file ManagementAgent.h.


Member Function Documentation

virtual void qpid::management::Notifyable::notify ( ) [pure virtual]

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00163.html0000664000076400007640000002557211752725720017324 0ustar00jrossjross00000000000000 qpid::framing::InvalidConversionException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::InvalidConversionException Struct Reference

Exception thrown when we can't perform requested conversion. More...

#include <qpid/framing/FieldValue.h>

List of all members.

Public Member Functions

 InvalidConversionException ()
virtual const char * what () const throw ()
virtual std::string getMessage () const
virtual std::string getPrefix () const

Detailed Description

Exception thrown when we can't perform requested conversion.


Constructor & Destructor Documentation

qpid::framing::InvalidConversionException::InvalidConversionException ( ) [inline]

Definition at line 52 of file FieldValue.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00557_source.html0000664000076400007640000001745011752725717020715 0ustar00jrossjross00000000000000 qpid/sys/IOHandle.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/IOHandle.h
Go to the documentation of this file.
00001 #ifndef _sys_IOHandle_h
00002 #define _sys_IOHandle_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/CommonImportExport.h"
00026 
00027 namespace qpid {
00028 namespace sys {
00029 
00034 class PollerHandle;
00035 class IOHandlePrivate;
00036 class IOHandle {
00037     friend class PollerHandle;
00038     friend class IOHandlePrivate;
00039 
00040 protected:
00041     IOHandlePrivate* const impl;
00042 
00043     IOHandle(IOHandlePrivate*);
00044     QPID_COMMON_EXTERN virtual ~IOHandle();
00045 };
00046 
00047 }}
00048 
00049 #endif // _sys_IOHandle_h

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x72.html0000664000076400007640000003227011752725717022314 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- r -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00771.html0000664000076400007640000002130211752725720017314 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::VoidValue Member List
This is the complete list of members for qpid::framing::VoidValue, including all inherited members.
convertIfRequired(uint8_t *const octets, int width)qpid::framing::FieldValue [protected, static]
convertsTo() const qpid::framing::FieldValue [inline]
decode(Buffer &buffer)qpid::framing::FieldValue
empty() const qpid::framing::FieldValue [inline]
encode(Buffer &buffer)qpid::framing::FieldValue
encodedSize() const qpid::framing::FieldValue [inline]
FieldValue()qpid::framing::FieldValue [inline]
FieldValue(uint8_t t, Data *d)qpid::framing::FieldValue [inline, protected]
get() const qpid::framing::FieldValue [inline]
get(T &) const qpid::framing::FieldValue [inline]
getData()qpid::framing::FieldValue [inline]
getFixedWidthValue(unsigned char *) const qpid::framing::FieldValue
getFloatingPointValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue [inline]
getIntegerValue() const qpid::framing::FieldValue
getType() const qpid::framing::FieldValue
operator!=(const FieldValue &v) const qpid::framing::FieldValue [inline]
operator==(const FieldValue &) const qpid::framing::FieldValue
print(std::ostream &out) const qpid::framing::FieldValue
setType(uint8_t type)qpid::framing::FieldValue
VoidValue()qpid::framing::VoidValue

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00209.html0000664000076400007640000002416511752725717017330 0ustar00jrossjross00000000000000 qpid::client::MessageListener Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::MessageListener Class Reference

Implement a subclass of MessageListener and subscribe it using the SubscriptionManager to receive messages. More...

#include <qpid/client/MessageListener.h>

List of all members.

Public Member Functions

virtual ~MessageListener ()
virtual void received (Message &msg)=0
 Called for each message arriving from the broker.

Detailed Description

Implement a subclass of MessageListener and subscribe it using the SubscriptionManager to receive messages.

Another way to receive messages is by using a LocalQueue.

Using a MessageListener

  • The received() function is called when a message arrives:

    virtual void received(Message& message)=0;
  • Derive your own listener, implement the received() function:

     class Listener : public MessageListener {
      private:
        SubscriptionManager& subscriptions;
      public:
        Listener(SubscriptionManager& subscriptions);
        virtual void received(Message& message);
     };
     Listener::Listener(SubscriptionManager& subs) : subscriptions(subs)
     {}
     void Listener::received(Message& message) {
       std::cout << "Message: " << message.getData() << std::endl;
       if (message.getData() == "That's all, folks!") {
           std::cout << "Shutting down listener for " << message.getDestination()
                    << std::endl;
           subscriptions.cancel(message.getDestination());
       }
     }
    
     SubscriptionManager subscriptions(session);
     // Create a listener and subscribe it to the queue named "message_queue"
     Listener listener(subscriptions);
     subscriptions.subscribe(listener, "message_queue");
     // Receive messages until the subscription is cancelled
     // by Listener::received()
     subscriptions.run();
     

Constructor & Destructor Documentation

virtual qpid::client::MessageListener::~MessageListener ( ) [virtual]

Member Function Documentation

virtual void qpid::client::MessageListener::received ( Message msg) [pure virtual]

Called for each message arriving from the broker.

Override in your own subclass to process messages.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00196.html0000664000076400007640000001766511752725720017336 0ustar00jrossjross00000000000000 qpid::messaging::MalformedAddress Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::MalformedAddress Struct Reference

Thrown when an address string with invalid syntax is used. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 MalformedAddress (const std::string &msg)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown when an address string with invalid syntax is used.


Constructor & Destructor Documentation

qpid::messaging::MalformedAddress::MalformedAddress ( const std::string msg)

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00254.html0000664000076400007640000001024711752725720017316 0ustar00jrossjross00000000000000 std::priority_queue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::priority_queue Class Reference

STL class. More...

List of all members.


Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00734.html0000664000076400007640000002444111752725720017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::BoolValue Member List
This is the complete list of members for qpid::console::BoolValue, including all inherited members.
asBool() const qpid::console::BoolValue [inline, virtual]
asDouble() const qpid::console::Value [inline, virtual]
asFloat() const qpid::console::Value [inline, virtual]
asInt() const qpid::console::Value [inline, virtual]
asInt64() const qpid::console::Value [inline, virtual]
asMap() const qpid::console::Value [inline, virtual]
asObjectId() const qpid::console::Value [inline, virtual]
asString() const qpid::console::Value [inline, virtual]
asUint() const qpid::console::Value [inline, virtual]
asUint64() const qpid::console::Value [inline, virtual]
asUuid() const qpid::console::Value [inline, virtual]
BoolValue(bool v)qpid::console::BoolValue [inline]
BoolValue(uint8_t v)qpid::console::BoolValue [inline]
isBool() const qpid::console::BoolValue [inline, virtual]
isDouble() const qpid::console::Value [inline, virtual]
isFloat() const qpid::console::Value [inline, virtual]
isInt() const qpid::console::Value [inline, virtual]
isInt64() const qpid::console::Value [inline, virtual]
isMap() const qpid::console::Value [inline, virtual]
isNull() const qpid::console::Value [inline, virtual]
isObjectId() const qpid::console::Value [inline, virtual]
isString() const qpid::console::Value [inline, virtual]
isUint() const qpid::console::Value [inline, virtual]
isUint64() const qpid::console::Value [inline, virtual]
isUuid() const qpid::console::Value [inline, virtual]
Ptr typedefqpid::console::Value
str() const qpid::console::BoolValue [virtual]
~Value()qpid::console::Value [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00676.html0000664000076400007640000007641311752725717017343 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::AsyncSession_0_10 Member List
This is the complete list of members for qpid::client::AsyncSession_0_10, including all inherited members.
AsyncSession_0_10()qpid::client::AsyncSession_0_10 [inline]
AsyncSession_0_10(const SessionBase_0_10 &other)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, executionSync, 0, 1, ExecutionSyncParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, executionResult, 0, 3, ExecutionResultParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, executionException, 0, 8, ExecutionExceptionParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageTransfer, 0, 5, MessageTransferParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageAccept, 0, 2, MessageAcceptParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageReject, 0, 4, MessageRejectParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageRelease, 0, 3, MessageReleaseParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::MessageAcquireResult >, messageAcquire, 0, 2, MessageAcquireParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::MessageResumeResult >, messageResume, 0, 3, MessageResumeParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageSubscribe, 0, 9, MessageSubscribeParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageCancel, 0, 2, MessageCancelParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageSetFlowMode, 0, 3, MessageSetFlowModeParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageFlow, 0, 4, MessageFlowParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageFlush, 0, 2, MessageFlushParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, messageStop, 0, 2, MessageStopParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, txSelect, 0, 1, TxSelectParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, txCommit, 0, 1, TxCommitParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, txRollback, 0, 1, TxRollbackParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, dtxSelect, 0, 1, DtxSelectParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::XaResult >, dtxStart, 0, 4, DtxStartParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::XaResult >, dtxEnd, 0, 4, DtxEndParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::XaResult >, dtxCommit, 0, 3, DtxCommitParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, dtxForget, 0, 2, DtxForgetParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::DtxGetTimeoutResult >, dtxGetTimeout, 0, 2, DtxGetTimeoutParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::XaResult >, dtxPrepare, 0, 2, DtxPrepareParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::DtxRecoverResult >, dtxRecover, 0, 1, DtxRecoverParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::XaResult >, dtxRollback, 0, 2, DtxRollbackParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, dtxSetTimeout, 0, 3, DtxSetTimeoutParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, exchangeDeclare, 0, 8, ExchangeDeclareParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, exchangeDelete, 0, 3, ExchangeDeleteParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::ExchangeQueryResult >, exchangeQuery, 0, 2, ExchangeQueryParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, exchangeBind, 0, 5, ExchangeBindParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, exchangeUnbind, 0, 4, ExchangeUnbindParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::ExchangeBoundResult >, exchangeBound, 0, 5, ExchangeBoundParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, queueDeclare, 0, 8, QueueDeclareParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, queueDelete, 0, 4, QueueDeleteParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(Completion, queuePurge, 0, 2, QueuePurgeParameters)qpid::client::AsyncSession_0_10 [inline]
BOOST_PARAMETER_MEMFUN(TypedResult< qpid::framing::QueueQueryResult >, queueQuery, 0, 2, QueueQueryParameters)qpid::client::AsyncSession_0_10 [inline]
close()qpid::client::SessionBase_0_10
dtxCommit(const Xid &xid=Xid(), bool onePhase=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxEnd(const Xid &xid=Xid(), bool fail=false, bool suspend=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxForget(const Xid &xid=Xid(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxGetTimeout(const Xid &xid=Xid(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxPrepare(const Xid &xid=Xid(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxRecover(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxRollback(const Xid &xid=Xid(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxSelect(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxSetTimeout(const Xid &xid=Xid(), uint32_t timeout=0, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
dtxStart(const Xid &xid=Xid(), bool join=false, bool resume=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeBind(const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeBound(const std::string &exchange=std::string(), const std::string &queue=std::string(), const std::string &bindingKey=std::string(), const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeDeclare(const std::string &exchange=std::string(), const std::string &type=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeDelete(const std::string &exchange=std::string(), bool ifUnused=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeQuery(const std::string &name=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
exchangeUnbind(const std::string &queue=std::string(), const std::string &exchange=std::string(), const std::string &bindingKey=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
executionException(uint16_t errorCode=0, const SequenceNumber &commandId=SequenceNumber(), uint8_t classCode=0, uint8_t commandCode=0, uint8_t fieldIndex=0, const std::string &description=std::string(), const FieldTable &errorInfo=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
executionResult(const SequenceNumber &commandId=SequenceNumber(), const std::string &value=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
executionSync(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
flush()qpid::client::SessionBase_0_10
getChannel() const qpid::client::SessionBase_0_10
getConnection()qpid::client::SessionBase_0_10
getId() const qpid::client::SessionBase_0_10
implqpid::client::SessionBase_0_10 [protected]
isValid() const qpid::client::SessionBase_0_10
markCompleted(const framing::SequenceSet &ids, bool notifyPeer)qpid::client::SessionBase_0_10
markCompleted(const framing::SequenceNumber &id, bool cumulative, bool notifyPeer)qpid::client::SessionBase_0_10
messageAccept(const SequenceSet &transfers=SequenceSet(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageAcquire(const SequenceSet &transfers=SequenceSet(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageCancel(const std::string &destination=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageFlow(const std::string &destination=std::string(), uint8_t unit=0, uint32_t value=0, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageFlush(const std::string &destination=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageReject(const SequenceSet &transfers=SequenceSet(), uint16_t code=0, const std::string &text=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageRelease(const SequenceSet &transfers=SequenceSet(), bool setRedelivered=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageResume(const std::string &destination=std::string(), const std::string &resumeId=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageSetFlowMode(const std::string &destination=std::string(), uint8_t flowMode=0, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageStop(const std::string &destination=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageSubscribe(const std::string &queue=std::string(), const std::string &destination=std::string(), uint8_t acceptMode=0, uint8_t acquireMode=0, bool exclusive=false, const std::string &resumeId=std::string(), uint64_t resumeTtl=0, const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
messageTransfer(const std::string &destination=std::string(), uint8_t acceptMode=1, uint8_t acquireMode=0, const Message &content=Message(std::string()), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
operator=(const SessionBase_0_10 &other)qpid::client::AsyncSession_0_10 [inline]
queueDeclare(const std::string &queue=std::string(), const std::string &alternateExchange=std::string(), bool passive=false, bool durable=false, bool exclusive=false, bool autoDelete=false, const FieldTable &arguments=FieldTable(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
queueDelete(const std::string &queue=std::string(), bool ifUnused=false, bool ifEmpty=false, bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
queuePurge(const std::string &queue=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
queueQuery(const std::string &queue=std::string(), bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
resume(Connection)qpid::client::SessionBase_0_10
sendCompletion()qpid::client::SessionBase_0_10
SessionBase_0_10()qpid::client::SessionBase_0_10
suspend()qpid::client::SessionBase_0_10
sync()qpid::client::SessionBase_0_10
timeout(uint32_t seconds)qpid::client::SessionBase_0_10
txCommit(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
txRollback(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
txSelect(bool sync=false)qpid::client::no_keyword::AsyncSession_0_10
~SessionBase_0_10()qpid::client::SessionBase_0_10

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00622.html0000664000076400007640000001212011752725717017313 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::QueryResponse Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00898.html0000664000076400007640000004640511752725720017341 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::types::Variant Member List
This is the complete list of members for qpid::types::Variant, including all inherited members.
asBool() const qpid::types::Variant
asDouble() const qpid::types::Variant
asFloat() const qpid::types::Variant
asInt16() const qpid::types::Variant
asInt32() const qpid::types::Variant
asInt64() const qpid::types::Variant
asInt8() const qpid::types::Variant
asList() const qpid::types::Variant
asList()qpid::types::Variant
asMap() const qpid::types::Variant
asMap()qpid::types::Variant
asString() const qpid::types::Variant
asUint16() const qpid::types::Variant
asUint32() const qpid::types::Variant
asUint64() const qpid::types::Variant
asUint8() const qpid::types::Variant
asUuid() const qpid::types::Variant
getEncoding() const qpid::types::Variant
getString() const qpid::types::Variant
getString()qpid::types::Variant
getType() const qpid::types::Variant
isEqualTo(const Variant &a) const qpid::types::Variant
isVoid() const qpid::types::Variant
List typedefqpid::types::Variant
Map typedefqpid::types::Variant
operator bool() const qpid::types::Variant
operator double() const qpid::types::Variant
operator float() const qpid::types::Variant
operator int16_t() const qpid::types::Variant
operator int32_t() const qpid::types::Variant
operator int64_t() const qpid::types::Variant
operator int8_t() const qpid::types::Variant
operator std::string() const qpid::types::Variant
operator uint16_t() const qpid::types::Variant
operator uint32_t() const qpid::types::Variant
operator uint64_t() const qpid::types::Variant
operator uint8_t() const qpid::types::Variant
operator Uuid() const qpid::types::Variant
operator=(bool)qpid::types::Variant
operator=(uint8_t)qpid::types::Variant
operator=(uint16_t)qpid::types::Variant
operator=(uint32_t)qpid::types::Variant
operator=(uint64_t)qpid::types::Variant
operator=(int8_t)qpid::types::Variant
operator=(int16_t)qpid::types::Variant
operator=(int32_t)qpid::types::Variant
operator=(int64_t)qpid::types::Variant
operator=(float)qpid::types::Variant
operator=(double)qpid::types::Variant
operator=(const std::string &)qpid::types::Variant
operator=(const char *)qpid::types::Variant
operator=(const Map &)qpid::types::Variant
operator=(const List &)qpid::types::Variant
operator=(const Variant &)qpid::types::Variant
operator=(const Uuid &)qpid::types::Variant
parse(const std::string &)qpid::types::Variant
reset()qpid::types::Variant
setEncoding(const std::string &)qpid::types::Variant
Variant()qpid::types::Variant
Variant(bool)qpid::types::Variant
Variant(uint8_t)qpid::types::Variant
Variant(uint16_t)qpid::types::Variant
Variant(uint32_t)qpid::types::Variant
Variant(uint64_t)qpid::types::Variant
Variant(int8_t)qpid::types::Variant
Variant(int16_t)qpid::types::Variant
Variant(int32_t)qpid::types::Variant
Variant(int64_t)qpid::types::Variant
Variant(float)qpid::types::Variant
Variant(double)qpid::types::Variant
Variant(const std::string &)qpid::types::Variant
Variant(const char *)qpid::types::Variant
Variant(const Map &)qpid::types::Variant
Variant(const List &)qpid::types::Variant
Variant(const Variant &)qpid::types::Variant
Variant(const Uuid &)qpid::types::Variant
~Variant()qpid::types::Variant

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00435_source.html0000664000076400007640000002311611752725717020704 0ustar00jrossjross00000000000000 qmf/exceptions.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/exceptions.h
Go to the documentation of this file.
00001 #ifndef QMF_EXCEPTIONS_H
00002 #define QMF_EXCEPTIONS_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qmf/ImportExport.h"
00026 #include "qpid/types/Exception.h"
00027 #include "qpid/types/Variant.h"
00028 
00029 namespace qmf {
00030 
00034     struct QMF_CLASS_EXTERN QmfException : public qpid::types::Exception {
00035         QMF_EXTERN QmfException(const std::string& msg);
00036         QMF_EXTERN virtual ~QmfException() throw();
00037 
00038         qpid::types::Variant::Map detail;
00039     };
00040 
00041     struct QMF_CLASS_EXTERN KeyNotFound : public QmfException {
00042         QMF_EXTERN KeyNotFound(const std::string& msg);
00043         QMF_EXTERN virtual ~KeyNotFound() throw();
00044     };
00045 
00046     struct QMF_CLASS_EXTERN IndexOutOfRange : public QmfException {
00047         QMF_EXTERN IndexOutOfRange();
00048         QMF_EXTERN virtual ~IndexOutOfRange() throw();
00049     };
00050 
00051     struct QMF_CLASS_EXTERN OperationTimedOut : public QmfException {
00052         QMF_EXTERN OperationTimedOut();
00053         QMF_EXTERN virtual ~OperationTimedOut() throw();
00054     };
00055 
00056 }
00057 
00058 #endif
00059 

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00365.html0000664000076400007640000002004111752725720017312 0ustar00jrossjross00000000000000 qpid::messaging::UnauthorizedAccess Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::UnauthorizedAccess Struct Reference

Thrown to indicate that the application attempted to do something for which it was not authorised by its peer. More...

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 UnauthorizedAccess (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Detailed Description

Thrown to indicate that the application attempted to do something for which it was not authorised by its peer.


Constructor & Destructor Documentation

qpid::messaging::UnauthorizedAccess::UnauthorizedAccess ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00408_source.html0000664000076400007640000004061711752725717020711 0ustar00jrossjross00000000000000 qmf/ConsoleEvent.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/ConsoleEvent.h
Go to the documentation of this file.
00001 #ifndef QMF_CONSOLE_EVENT_H
00002 #define QMF_CONSOLE_EVENT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  * 
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  * 
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00024 #include <qmf/ImportExport.h>
00025 #include "qmf/Handle.h"
00026 #include "qmf/Agent.h"
00027 #include "qmf/Data.h"
00028 #include "qmf/SchemaId.h"
00029 #include "qpid/types/Variant.h"
00030 
00031 namespace qmf {
00032 
00033 #ifndef SWIG
00034     template <class> class PrivateImplRef;
00035 #endif
00036 
00037     class ConsoleEventImpl;
00038 
00039     enum ConsoleEventCode {
00040     CONSOLE_AGENT_ADD             = 1,
00041     CONSOLE_AGENT_DEL             = 2,
00042     CONSOLE_AGENT_RESTART         = 3,
00043     CONSOLE_AGENT_SCHEMA_UPDATE   = 4,
00044     CONSOLE_AGENT_SCHEMA_RESPONSE = 5,
00045     CONSOLE_EVENT                 = 6,
00046     CONSOLE_QUERY_RESPONSE        = 7,
00047     CONSOLE_METHOD_RESPONSE       = 8,
00048     CONSOLE_EXCEPTION             = 9,
00049     CONSOLE_SUBSCRIBE_ADD         = 10,
00050     CONSOLE_SUBSCRIBE_UPDATE      = 11,
00051     CONSOLE_SUBSCRIBE_DEL         = 12,
00052     CONSOLE_THREAD_FAILED         = 13
00053     };
00054 
00055     enum AgentDelReason {
00056     AGENT_DEL_AGED   = 1,
00057     AGENT_DEL_FILTER = 2 
00058     };
00059 
00060     class QMF_CLASS_EXTERN ConsoleEvent : public qmf::Handle<ConsoleEventImpl> {
00061     public:
00062         QMF_EXTERN ConsoleEvent(ConsoleEventImpl* impl = 0);
00063         QMF_EXTERN ConsoleEvent(const ConsoleEvent&);
00064         QMF_EXTERN ConsoleEvent& operator=(const ConsoleEvent&);
00065         QMF_EXTERN ~ConsoleEvent();
00066 
00067         QMF_EXTERN ConsoleEventCode getType() const;
00068         QMF_EXTERN uint32_t getCorrelator() const;
00069         QMF_EXTERN Agent getAgent() const;
00070         QMF_EXTERN AgentDelReason getAgentDelReason() const;
00071         QMF_EXTERN uint32_t getSchemaIdCount() const;
00072         QMF_EXTERN SchemaId getSchemaId(uint32_t) const;
00073         QMF_EXTERN uint32_t getDataCount() const;
00074         QMF_EXTERN Data getData(uint32_t) const;
00075         QMF_EXTERN bool isFinal() const;
00076         QMF_EXTERN const qpid::types::Variant::Map& getArguments() const;
00077         QMF_EXTERN int getSeverity() const;
00078         QMF_EXTERN uint64_t getTimestamp() const;
00079 
00080 #ifndef SWIG
00081     private:
00082         friend class qmf::PrivateImplRef<ConsoleEvent>;
00083         friend struct ConsoleEventImplAccess;
00084 #endif
00085     };
00086 
00087 }
00088 
00089 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00638.html0000664000076400007640000001006311752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SessionHandle Member List
This is the complete list of members for qmf::engine::SessionHandle, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00004.html0000664000076400007640000001713611752725720017313 0ustar00jrossjross00000000000000 qpid::messaging::AddressError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::AddressError Struct Reference

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 AddressError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qpid::messaging::AddressError::AddressError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_eval_0x6e.html0000664000076400007640000001373211752725720023665 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- n -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00424_source.html0000664000076400007640000003171211752725717020703 0ustar00jrossjross00000000000000 qpid/console/ObjectId.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/ObjectId.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #ifndef _QPID_CONSOLE_OBJECTID_H
00022 #define _QPID_CONSOLE_OBJECTID_H
00023 
00024 #include <iostream>
00025 #include "qpid/console/ConsoleImportExport.h"
00026 #include "qpid/sys/IntegerTypes.h"
00027 
00028 namespace qpid {
00029 namespace framing {
00030     class Buffer;
00031 }
00032 namespace console {
00033 
00038     class QPID_CONSOLE_EXTERN ObjectId {
00039     public:
00040         ObjectId() : first(0), second(0) {}
00041         ObjectId(framing::Buffer& buffer);
00042 
00043         uint8_t getFlags() const { return (uint8_t)((first & 0xF000000000000000LL) >> 60); }
00044         uint16_t getSequence() const { return (uint16_t)((first & 0x0FFF000000000000LL) >> 48); }
00045         uint32_t getBrokerBank() const { return (uint32_t)((first & 0x0000FFFFF0000000LL) >> 28); }
00046         uint32_t getAgentBank() const { return (uint32_t) (first & 0x000000000FFFFFFFLL); }
00047         uint64_t getObject() const { return second; }
00048         bool isDurable() const { return getSequence() == 0; }
00049         void decode(framing::Buffer& buffer);
00050         void encode(framing::Buffer& buffer);
00051         void setValue(uint64_t f, uint64_t s) { first = f; second = s; }
00052 
00053         bool operator==(const ObjectId& other) const;
00054         bool operator!=(const ObjectId& other) const;
00055         bool operator<(const ObjectId& other) const;
00056         bool operator>(const ObjectId& other) const;
00057         bool operator<=(const ObjectId& other) const;
00058         bool operator>=(const ObjectId& other) const;
00059 
00060     private:
00061         uint64_t first;
00062         uint64_t second;
00063     };
00064 
00065     QPID_CONSOLE_EXTERN std::ostream& operator<<(std::ostream& o, const ObjectId& id);
00066 }
00067 }
00068 
00069 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00116.html0000664000076400007640000006247611752725720017326 0ustar00jrossjross00000000000000 qpid::framing::ExchangeBoundResult Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::ExchangeBoundResult Class Reference

#include <qpid/framing/ExchangeBoundResult.h>

List of all members.

Public Member Functions

 ExchangeBoundResult (bool _exchangeNotFound, bool _queueNotFound, bool _queueNotMatched, bool _keyNotMatched, bool _argsNotMatched)
 ExchangeBoundResult ()
void setExchangeNotFound (bool _exchangeNotFound)
bool getExchangeNotFound () const
void setQueueNotFound (bool _queueNotFound)
bool getQueueNotFound () const
void setQueueNotMatched (bool _queueNotMatched)
bool getQueueNotMatched () const
void setKeyNotMatched (bool _keyNotMatched)
bool getKeyNotMatched () const
void setArgsNotMatched (bool _argsNotMatched)
bool getArgsNotMatched () const
void encode (Buffer &) const
void decode (Buffer &, uint32_t=0)
void encodeStructBody (Buffer &) const
void decodeStructBody (Buffer &, uint32_t=0)
uint32_t encodedSize () const
uint32_t bodySize () const
void print (std::ostream &out) const

Static Public Attributes

static const uint16_t TYPE = 1794

Friends

std::ostreamoperator<< (std::ostream &, const ExchangeBoundResult &)

Constructor & Destructor Documentation

qpid::framing::ExchangeBoundResult::ExchangeBoundResult ( bool  _exchangeNotFound,
bool  _queueNotFound,
bool  _queueNotMatched,
bool  _keyNotMatched,
bool  _argsNotMatched 
) [inline]

Definition at line 42 of file ExchangeBoundResult.h.

qpid::framing::ExchangeBoundResult::ExchangeBoundResult ( ) [inline]

Definition at line 55 of file ExchangeBoundResult.h.


Member Function Documentation

uint32_t qpid::framing::ExchangeBoundResult::bodySize ( ) const
void qpid::framing::ExchangeBoundResult::decode ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::ExchangeBoundResult::decodeStructBody ( Buffer ,
uint32_t  = 0 
)
void qpid::framing::ExchangeBoundResult::encode ( Buffer ) const
uint32_t qpid::framing::ExchangeBoundResult::encodedSize ( ) const
void qpid::framing::ExchangeBoundResult::encodeStructBody ( Buffer ) const
bool qpid::framing::ExchangeBoundResult::getArgsNotMatched ( ) const
bool qpid::framing::ExchangeBoundResult::getExchangeNotFound ( ) const
bool qpid::framing::ExchangeBoundResult::getKeyNotMatched ( ) const
bool qpid::framing::ExchangeBoundResult::getQueueNotFound ( ) const
bool qpid::framing::ExchangeBoundResult::getQueueNotMatched ( ) const
void qpid::framing::ExchangeBoundResult::print ( std::ostream out) const
void qpid::framing::ExchangeBoundResult::setArgsNotMatched ( bool  _argsNotMatched)
void qpid::framing::ExchangeBoundResult::setExchangeNotFound ( bool  _exchangeNotFound)
void qpid::framing::ExchangeBoundResult::setKeyNotMatched ( bool  _keyNotMatched)
void qpid::framing::ExchangeBoundResult::setQueueNotFound ( bool  _queueNotFound)
void qpid::framing::ExchangeBoundResult::setQueueNotMatched ( bool  _queueNotMatched)

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream ,
const ExchangeBoundResult  
) [friend]

Member Data Documentation

Definition at line 41 of file ExchangeBoundResult.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00069.html0000664000076400007640000004357011752725717017335 0ustar00jrossjross00000000000000 qmf::engine::ConsoleEvent Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ConsoleEvent Struct Reference

#include <qmf/engine/Console.h>

List of all members.

Public Types

enum  EventKind {
  AGENT_ADDED = 1, AGENT_DELETED = 2, NEW_PACKAGE = 3, NEW_CLASS = 4,
  OBJECT_UPDATE = 5, EVENT_RECEIVED = 7, AGENT_HEARTBEAT = 8
}

Public Attributes

EventKind kind
AgentProxyagent
char * name
const SchemaClassKeyclassKey
Objectobject
void * context
Eventevent
uint64_t timestamp
QueryResponsequeryResponse
bool hasProps
bool hasStats

Member Enumeration Documentation

Enumerator:
AGENT_ADDED 
AGENT_DELETED 
NEW_PACKAGE 
NEW_CLASS 
OBJECT_UPDATE 
EVENT_RECEIVED 
AGENT_HEARTBEAT 

Definition at line 84 of file Console.h.


Member Data Documentation

Definition at line 97 of file Console.h.

Definition at line 99 of file Console.h.

Definition at line 100 of file Console.h.

Definition at line 103 of file Console.h.

Definition at line 104 of file Console.h.

Definition at line 96 of file Console.h.

Definition at line 98 of file Console.h.

Definition at line 101 of file Console.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x67.html0000664000076400007640000015653011752725717022326 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- g -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00520_source.html0000664000076400007640000004142711752725717020704 0ustar00jrossjross00000000000000 qpid/framing/StreamProperties.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/StreamProperties.h
Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_STREAMPROPERTIES_H
00002 #define QPID_FRAMING_STREAMPROPERTIES_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 #include "qpid/CommonImportExport.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class QPID_COMMON_CLASS_EXTERN StreamProperties  {
00039     std::string contentType;
00040     std::string contentEncoding;
00041     FieldTable headers;
00042     uint8_t priority;
00043     uint64_t timestamp;
00044     uint16_t flags;
00045 public:
00046     static const uint16_t TYPE = 2561;
00047     StreamProperties(
00048         const std::string& _contentType,
00049         const std::string& _contentEncoding,
00050         const FieldTable& _headers,
00051         uint8_t _priority,
00052         uint64_t _timestamp) : 
00053         contentType(_contentType),
00054         contentEncoding(_contentEncoding),
00055         headers(_headers),
00056         priority(_priority),
00057         timestamp(_timestamp),
00058         flags(0){
00059         flags |= (1 << 8);
00060         flags |= (1 << 9);
00061         flags |= (1 << 10);
00062         flags |= (1 << 11);
00063         flags |= (1 << 12);
00064     }
00065     StreamProperties()  : priority(0), timestamp(0), flags(0) {}
00066     
00067     QPID_COMMON_EXTERN void setContentType(const std::string& _contentType);
00068     QPID_COMMON_EXTERN const std::string& getContentType() const;
00069     QPID_COMMON_EXTERN bool hasContentType() const;
00070     QPID_COMMON_EXTERN void clearContentTypeFlag();
00071     QPID_COMMON_EXTERN void setContentEncoding(const std::string& _contentEncoding);
00072     QPID_COMMON_EXTERN const std::string& getContentEncoding() const;
00073     QPID_COMMON_EXTERN bool hasContentEncoding() const;
00074     QPID_COMMON_EXTERN void clearContentEncodingFlag();
00075     QPID_COMMON_EXTERN void setHeaders(const FieldTable& _headers);
00076     QPID_COMMON_EXTERN const FieldTable& getHeaders() const;
00077     QPID_COMMON_EXTERN FieldTable& getHeaders();
00078     QPID_COMMON_EXTERN bool hasHeaders() const;
00079     QPID_COMMON_EXTERN void clearHeadersFlag();
00080     QPID_COMMON_EXTERN void setPriority(uint8_t _priority);
00081     QPID_COMMON_EXTERN uint8_t getPriority() const;
00082     QPID_COMMON_EXTERN bool hasPriority() const;
00083     QPID_COMMON_EXTERN void clearPriorityFlag();
00084     QPID_COMMON_EXTERN void setTimestamp(uint64_t _timestamp);
00085     QPID_COMMON_EXTERN uint64_t getTimestamp() const;
00086     QPID_COMMON_EXTERN bool hasTimestamp() const;
00087     QPID_COMMON_EXTERN void clearTimestampFlag();
00088     QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream&, const StreamProperties&);
00089     QPID_COMMON_EXTERN void encode(Buffer&) const;
00090     QPID_COMMON_EXTERN void decode(Buffer&, uint32_t=0);
00091     QPID_COMMON_EXTERN void encodeStructBody(Buffer&) const;
00092     QPID_COMMON_EXTERN void decodeStructBody(Buffer&, uint32_t=0);
00093     QPID_COMMON_EXTERN uint32_t encodedSize() const;
00094     QPID_COMMON_EXTERN uint32_t bodySize() const;
00095     QPID_COMMON_EXTERN void print(std::ostream& out) const;
00096 }; /* class StreamProperties */
00097 
00098 }}
00099 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00687.html0000664000076400007640000001311111752725717017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::FutureCompletion Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00695.html0000664000076400007640000004633611752725717017345 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::QueueOptions Member List
This is the complete list of members for qpid::client::QueueOptions, including all inherited members.
begin() const qpid::framing::FieldTable
begin()qpid::framing::FieldTable
clear()qpid::framing::FieldTable
clearOrdering()qpid::client::QueueOptions
clearPersistLastNode()qpid::client::QueueOptions
clearSizePolicy()qpid::client::QueueOptions
const_iterator typedefqpid::framing::FieldTable
const_reference typedefqpid::framing::FieldTable
count() const qpid::framing::FieldTable
decode(Buffer &buffer)qpid::framing::FieldTable
empty()qpid::framing::FieldTable [inline]
enableQueueEvents(bool enqueueOnly)qpid::client::QueueOptions
encode(Buffer &buffer) const qpid::framing::FieldTable
encodedSize() const qpid::framing::FieldTable
end() const qpid::framing::FieldTable
end()qpid::framing::FieldTable
erase(const std::string &name)qpid::framing::FieldTable
FieldTable()qpid::framing::FieldTable
FieldTable(const FieldTable &)qpid::framing::FieldTable
find(const std::string &s) const qpid::framing::FieldTable
find(const std::string &s)qpid::framing::FieldTable
get(const std::string &name) const qpid::framing::FieldTable
getArray(const std::string &name, Array &value) const qpid::framing::FieldTable
getAsInt(const std::string &name) const qpid::framing::FieldTable
getAsInt64(const std::string &name) const qpid::framing::FieldTable
getAsString(const std::string &name) const qpid::framing::FieldTable
getAsUInt64(const std::string &name) const qpid::framing::FieldTable
getDouble(const std::string &name, double &value) const qpid::framing::FieldTable
getFloat(const std::string &name, float &value) const qpid::framing::FieldTable
getLVQKey(std::string &key)qpid::client::QueueOptions
getTable(const std::string &name, FieldTable &value) const qpid::framing::FieldTable
insert(const ValueMap::value_type &)qpid::framing::FieldTable
insert(ValueMap::iterator, const ValueMap::value_type &)qpid::framing::FieldTable
isSet(const std::string &name) const qpid::framing::FieldTable [inline]
iterator typedefqpid::framing::FieldTable
operator=(const FieldTable &)qpid::framing::FieldTable
operator==(const FieldTable &other) const qpid::framing::FieldTable
QueueOptions()qpid::client::QueueOptions
reference typedefqpid::framing::FieldTable
set(const std::string &name, const ValuePtr &value)qpid::framing::FieldTable
setArray(const std::string &name, const Array &value)qpid::framing::FieldTable
setDouble(const std::string &name, const double value)qpid::framing::FieldTable
setFloat(const std::string &name, const float value)qpid::framing::FieldTable
setInt(const std::string &name, const int value)qpid::framing::FieldTable
setInt64(const std::string &name, const int64_t value)qpid::framing::FieldTable
setOrdering(QueueOrderingPolicy op)qpid::client::QueueOptions
setPersistLastNode()qpid::client::QueueOptions
setSizePolicy(QueueSizePolicy sp, uint64_t maxSize, uint32_t maxCount)qpid::client::QueueOptions
setString(const std::string &name, const std::string &value)qpid::framing::FieldTable
setTable(const std::string &name, const FieldTable &value)qpid::framing::FieldTable
setTimestamp(const std::string &name, const uint64_t value)qpid::framing::FieldTable
setUInt64(const std::string &name, const uint64_t value)qpid::framing::FieldTable
size() const qpid::framing::FieldTable [inline]
strFLOW_TO_DISKqpid::client::QueueOptions [static]
strLastValueQueueqpid::client::QueueOptions [static]
strLastValueQueueNoBrowseqpid::client::QueueOptions [static]
strLVQMatchPropertyqpid::client::QueueOptions [static]
strMaxCountKeyqpid::client::QueueOptions [static]
strMaxSizeKeyqpid::client::QueueOptions [static]
strPersistLastNodeqpid::client::QueueOptions [static]
strQueueEventModeqpid::client::QueueOptions [static]
strREJECTqpid::client::QueueOptions [static]
strRINGqpid::client::QueueOptions [static]
strRING_STRICTqpid::client::QueueOptions [static]
strTypeKeyqpid::client::QueueOptions [static]
value_type typedefqpid::framing::FieldTable
ValueMap typedefqpid::framing::FieldTable
ValuePtr typedefqpid::framing::FieldTable
~QueueOptions()qpid::client::QueueOptions [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00901.html0000664000076400007640000000763411752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::deque Member List
This is the complete list of members for std::deque, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00266.html0000664000076400007640000001672411752725720017327 0ustar00jrossjross00000000000000 qpid::sys::Raisable Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::Raisable Struct Reference

#include <qpid/sys/ExceptionHolder.h>

List of all members.

Public Member Functions

virtual ~Raisable ()
virtual void raise () const =0
virtual std::string what () const =0

Constructor & Destructor Documentation

virtual qpid::sys::Raisable::~Raisable ( ) [inline, virtual]

Definition at line 32 of file ExceptionHolder.h.


Member Function Documentation

virtual void qpid::sys::Raisable::raise ( ) const [pure virtual]
virtual std::string qpid::sys::Raisable::what ( ) const [pure virtual]

The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00536_source.html0000664000076400007640000003260311752725717020707 0ustar00jrossjross00000000000000 qpid/management/Manageable.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/management/Manageable.h
Go to the documentation of this file.
00001 #ifndef _Manageable_
00002 #define _Manageable_
00003 
00004 //
00005 // Licensed to the Apache Software Foundation (ASF) under one
00006 // or more contributor license agreements.  See the NOTICE file
00007 // distributed with this work for additional information
00008 // regarding copyright ownership.  The ASF licenses this file
00009 // to you under the Apache License, Version 2.0 (the
00010 // "License"); you may not use this file except in compliance
00011 // with the License.  You may obtain a copy of the License at
00012 //
00013 //   http://www.apache.org/licenses/LICENSE-2.0
00014 //
00015 // Unless required by applicable law or agreed to in writing,
00016 // software distributed under the License is distributed on an
00017 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018 // KIND, either express or implied.  See the License for the
00019 // specific language governing permissions and limitations
00020 // under the License.
00021 //
00022 
00023 #include "qpid/management/ManagementObject.h"
00024 #include "qpid/management/Args.h"
00025 #include <string>
00026 #include "qpid/CommonImportExport.h"
00027 
00028 namespace qpid {
00029 namespace management {
00030 
00031 class QPID_COMMON_EXTERN Manageable
00032 {
00033   public:
00034 
00035     virtual ~Manageable(void) = 0;
00036 
00037     //  status_t is a type used to pass completion status from the method handler.
00038     //
00039     typedef uint32_t status_t;
00040     static std::string StatusText(status_t status, std::string text = std::string());
00041 
00042     static const status_t STATUS_OK                      = 0;
00043     static const status_t STATUS_UNKNOWN_OBJECT          = 1;
00044     static const status_t STATUS_UNKNOWN_METHOD          = 2;
00045     static const status_t STATUS_NOT_IMPLEMENTED         = 3;
00046     static const status_t STATUS_PARAMETER_INVALID       = 4;
00047     static const status_t STATUS_FEATURE_NOT_IMPLEMENTED = 5;
00048     static const status_t STATUS_FORBIDDEN               = 6;
00049     static const status_t STATUS_EXCEPTION               = 7;
00050     static const status_t STATUS_USER                    = 0x00010000;
00051 
00052     //  Every "Manageable" object must hold a reference to exactly one
00053     //  management object.  This object is always of a class derived from
00054     //  the pure-virtual "ManagementObject".
00055     //
00056     //  This accessor function returns a pointer to the management object.
00057     //
00058     virtual ManagementObject* GetManagementObject(void) const = 0;
00059 
00060     //  Every "Manageable" object must implement ManagementMethod.  This
00061     //  function is called when a remote management client invokes a method
00062     //  on this object.  The input and output arguments are specific to the
00063     //  method being called and must be down-cast to the appropriate sub class
00064     //  before use.
00065     virtual status_t ManagementMethod(uint32_t methodId, Args& args, std::string& text);
00066 
00067     //  This optional method can be overridden to allow the agent application to
00068     //  authorize method invocations.  Return true iff the authenticated user identified
00069     //  in userId us authorized to execute the method.
00070     virtual bool AuthorizeMethod(uint32_t methodId, Args& args, const std::string& userId);
00071 };
00072 
00073 inline Manageable::~Manageable(void) {}
00074 
00075 }}
00076 
00077 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00298.html0000664000076400007640000003354311752725717017340 0ustar00jrossjross00000000000000 qmf::engine::SchemaArgument Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::SchemaArgument Class Reference

#include <qmf/engine/Schema.h>

List of all members.

Public Member Functions

 SchemaArgument (const char *name, Typecode typecode)
 SchemaArgument (const SchemaArgument &from)
 ~SchemaArgument ()
void setDirection (Direction dir)
void setUnit (const char *val)
void setDesc (const char *desc)
const char * getName () const
Typecode getType () const
Direction getDirection () const
const char * getUnit () const
const char * getDesc () const

Constructor & Destructor Documentation

qmf::engine::SchemaArgument::SchemaArgument ( const char *  name,
Typecode  typecode 
)
qmf::engine::SchemaArgument::SchemaArgument ( const SchemaArgument from)
qmf::engine::SchemaArgument::~SchemaArgument ( )

Member Function Documentation

const char* qmf::engine::SchemaArgument::getDesc ( ) const
Direction qmf::engine::SchemaArgument::getDirection ( ) const
const char* qmf::engine::SchemaArgument::getName ( ) const
Typecode qmf::engine::SchemaArgument::getType ( ) const
const char* qmf::engine::SchemaArgument::getUnit ( ) const
void qmf::engine::SchemaArgument::setDesc ( const char *  desc)
void qmf::engine::SchemaArgument::setDirection ( Direction  dir)
void qmf::engine::SchemaArgument::setUnit ( const char *  val)

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00650.html0000664000076400007640000001205411752725717017322 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::Exception Member List
This is the complete list of members for qpid::Exception, including all inherited members.
Exception(const std::string &message=std::string())qpid::Exception [explicit]
getMessage() const qpid::Exception [virtual]
getPrefix() const qpid::Exception [virtual]
what() const qpid::Exception [virtual]
~Exception()qpid::Exception [virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00131.html0000664000076400007640000007756111752725720017324 0ustar00jrossjross00000000000000 qpid::console::FloatValue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::console::FloatValue Class Reference

#include <qpid/console/Value.h>

List of all members.

Public Types

typedef boost::shared_ptr< ValuePtr

Public Member Functions

 FloatValue (float v)
std::string str () const
bool isFloat () const
float asFloat () const
bool isDouble () const
double asDouble () const
virtual bool isNull () const
virtual bool isObjectId () const
virtual bool isUint () const
virtual bool isInt () const
virtual bool isUint64 () const
virtual bool isInt64 () const
virtual bool isString () const
virtual bool isBool () const
virtual bool isUuid () const
virtual bool isMap () const
virtual ObjectId asObjectId () const
virtual uint32_t asUint () const
virtual int32_t asInt () const
virtual uint64_t asUint64 () const
virtual int64_t asInt64 () const
virtual std::string asString () const
virtual bool asBool () const
virtual framing::Uuid asUuid () const
virtual framing::FieldTable asMap () const

Member Typedef Documentation

typedef boost::shared_ptr<Value> qpid::console::Value::Ptr [inherited]

Definition at line 42 of file Value.h.


Constructor & Destructor Documentation

qpid::console::FloatValue::FloatValue ( float  v) [inline]

Definition at line 163 of file Value.h.


Member Function Documentation

virtual bool qpid::console::Value::asBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 65 of file Value.h.

double qpid::console::FloatValue::asDouble ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 168 of file Value.h.

float qpid::console::FloatValue::asFloat ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 166 of file Value.h.

virtual int32_t qpid::console::Value::asInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 61 of file Value.h.

virtual int64_t qpid::console::Value::asInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 63 of file Value.h.

virtual framing::FieldTable qpid::console::Value::asMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 69 of file Value.h.

virtual ObjectId qpid::console::Value::asObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 59 of file Value.h.

virtual std::string qpid::console::Value::asString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 64 of file Value.h.

virtual uint32_t qpid::console::Value::asUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 60 of file Value.h.

virtual uint64_t qpid::console::Value::asUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 62 of file Value.h.

virtual framing::Uuid qpid::console::Value::asUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 68 of file Value.h.

virtual bool qpid::console::Value::isBool ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::BoolValue.

Definition at line 53 of file Value.h.

bool qpid::console::FloatValue::isDouble ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 167 of file Value.h.

bool qpid::console::FloatValue::isFloat ( ) const [inline, virtual]

Reimplemented from qpid::console::Value.

Definition at line 165 of file Value.h.

virtual bool qpid::console::Value::isInt ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::IntValue.

Definition at line 49 of file Value.h.

virtual bool qpid::console::Value::isInt64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Int64Value, and qpid::console::IntValue.

Definition at line 51 of file Value.h.

virtual bool qpid::console::Value::isMap ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::MapValue.

Definition at line 57 of file Value.h.

virtual bool qpid::console::Value::isNull ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::NullValue.

Definition at line 46 of file Value.h.

virtual bool qpid::console::Value::isObjectId ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::RefValue.

Definition at line 47 of file Value.h.

virtual bool qpid::console::Value::isString ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::StringValue.

Definition at line 52 of file Value.h.

virtual bool qpid::console::Value::isUint ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UintValue.

Definition at line 48 of file Value.h.

virtual bool qpid::console::Value::isUint64 ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::Uint64Value, and qpid::console::UintValue.

Definition at line 50 of file Value.h.

virtual bool qpid::console::Value::isUuid ( ) const [inline, virtual, inherited]

Reimplemented in qpid::console::UuidValue.

Definition at line 56 of file Value.h.

std::string qpid::console::FloatValue::str ( ) const [virtual]

Implements qpid::console::Value.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00637.html0000664000076400007640000001415011752725717017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf::engine::ResilientConnectionEvent Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00505.html0000664000076400007640000001261211752725717017321 0ustar00jrossjross00000000000000 qpid/framing/FieldTable.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/framing/FieldTable.h File Reference
#include "qpid/framing/amqp_types.h"
#include "qpid/sys/Mutex.h"
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <iosfwd>
#include <map>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::framing::FieldTable
 A set of name-value pairs. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::framing
 

The framing namespace contains classes that are used to create, send and receive the basic packets from which AMQP is built.



Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00542.html0000664000076400007640000001604411752725717017325 0ustar00jrossjross00000000000000 qpid/sys/windows/Mutex.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/Mutex.h File Reference
#include "qpid/sys/windows/check.h"
#include <boost/version.hpp>
#include <boost/noncopyable.hpp>
#include <boost/thread/recursive_mutex.hpp>
#include <boost/thread/shared_mutex.hpp>
#include <boost/thread/thread_time.hpp>
#include <boost/thread/tss.hpp>

Go to the source code of this file.

Classes

class  qpid::sys::Mutex
 Mutex lock. More...
class  qpid::sys::RWlock
 RW lock. More...
struct  qpid::sys::PODMutex
 PODMutex is a POD, can be static-initialized with PODMutex m = QPID_PODMUTEX_INITIALIZER. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Defines

#define QPID_MUTEX_INITIALIZER   0

Define Documentation

#define QPID_MUTEX_INITIALIZER   0

Definition at line 103 of file Mutex.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00033.html0000664000076400007640000001027311752725720017310 0ustar00jrossjross00000000000000 std::basic_istringstream Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::basic_istringstream Class Reference

STL class. More...


Detailed Description

STL class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00436_source.html0000664000076400007640000004661011752725717020711 0ustar00jrossjross00000000000000 qpid/messaging/exceptions.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/messaging/exceptions.h
Go to the documentation of this file.
00001 #ifndef QPID_MESSAGING_EXCEPTIONS_H
00002 #define QPID_MESSAGING_EXCEPTIONS_H
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  *
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 
00025 #include "qpid/messaging/ImportExport.h"
00026 #include "qpid/types/Exception.h"
00027 #include "qpid/types/Variant.h"
00028 
00029 namespace qpid {
00030 namespace messaging {
00031 
00039 struct QPID_MESSAGING_CLASS_EXTERN MessagingException : public qpid::types::Exception
00040 {
00041     QPID_MESSAGING_EXTERN MessagingException(const std::string& msg);
00042     QPID_MESSAGING_EXTERN virtual ~MessagingException() throw();
00043 
00044     qpid::types::Variant::Map detail;
00045     //TODO: override what() to include detail if present
00046 };
00047 
00052 struct QPID_MESSAGING_CLASS_EXTERN InvalidOptionString : public MessagingException
00053 {
00054     QPID_MESSAGING_EXTERN InvalidOptionString(const std::string& msg);
00055 };
00056 
00062 struct QPID_MESSAGING_CLASS_EXTERN KeyError : public MessagingException
00063 {
00064     QPID_MESSAGING_EXTERN KeyError(const std::string&);
00065 };
00066 
00067 struct QPID_MESSAGING_CLASS_EXTERN LinkError : public MessagingException
00068 {
00069     QPID_MESSAGING_EXTERN LinkError(const std::string&);
00070 };
00071 
00072 struct QPID_MESSAGING_CLASS_EXTERN AddressError : public LinkError
00073 {
00074     QPID_MESSAGING_EXTERN AddressError(const std::string&);
00075 };
00076 
00081 struct QPID_MESSAGING_CLASS_EXTERN ResolutionError : public AddressError
00082 {
00083     QPID_MESSAGING_EXTERN ResolutionError(const std::string& msg);
00084 };
00085 
00090 struct QPID_MESSAGING_CLASS_EXTERN AssertionFailed : public ResolutionError
00091 {
00092     QPID_MESSAGING_EXTERN AssertionFailed(const std::string& msg);
00093 };
00094 
00099 struct QPID_MESSAGING_CLASS_EXTERN NotFound : public ResolutionError
00100 {
00101     QPID_MESSAGING_EXTERN NotFound(const std::string& msg);
00102 };
00103 
00107 struct QPID_MESSAGING_CLASS_EXTERN MalformedAddress : public AddressError
00108 {
00109     QPID_MESSAGING_EXTERN MalformedAddress(const std::string& msg);
00110 };
00111 
00112 struct QPID_MESSAGING_CLASS_EXTERN ReceiverError : public LinkError
00113 {
00114     QPID_MESSAGING_EXTERN ReceiverError(const std::string&);
00115 };
00116 
00117 struct QPID_MESSAGING_CLASS_EXTERN FetchError : public ReceiverError
00118 {
00119     QPID_MESSAGING_EXTERN FetchError(const std::string&);
00120 };
00121 
00127 struct QPID_MESSAGING_CLASS_EXTERN NoMessageAvailable : public FetchError
00128 {
00129     QPID_MESSAGING_EXTERN NoMessageAvailable();
00130 };
00131 
00132 struct QPID_MESSAGING_CLASS_EXTERN SenderError : public LinkError
00133 {
00134     QPID_MESSAGING_EXTERN SenderError(const std::string&);
00135 };
00136 
00137 struct QPID_MESSAGING_CLASS_EXTERN SendError : public SenderError
00138 {
00139     QPID_MESSAGING_EXTERN SendError(const std::string&);
00140 };
00141 
00147 struct QPID_MESSAGING_CLASS_EXTERN TargetCapacityExceeded : public SendError
00148 {
00149     QPID_MESSAGING_EXTERN TargetCapacityExceeded(const std::string&);
00150 };
00151 
00152 struct QPID_MESSAGING_CLASS_EXTERN SessionError : public MessagingException
00153 {
00154     QPID_MESSAGING_EXTERN SessionError(const std::string&);
00155 };
00156 
00157 struct QPID_MESSAGING_CLASS_EXTERN TransactionError : public SessionError
00158 {
00159     QPID_MESSAGING_EXTERN TransactionError(const std::string&);
00160 };
00161 
00166 struct QPID_MESSAGING_CLASS_EXTERN TransactionAborted : public TransactionError
00167 {
00168     QPID_MESSAGING_EXTERN TransactionAborted(const std::string&);
00169 };
00170 
00175 struct QPID_MESSAGING_CLASS_EXTERN UnauthorizedAccess : public SessionError
00176 {
00177     QPID_MESSAGING_EXTERN UnauthorizedAccess(const std::string&);
00178 };
00179 
00180 struct QPID_MESSAGING_CLASS_EXTERN ConnectionError : public MessagingException
00181 {
00182     QPID_MESSAGING_EXTERN ConnectionError(const std::string&);
00183 };
00184 
00192 struct QPID_MESSAGING_CLASS_EXTERN TransportFailure : public MessagingException
00193 {
00194     QPID_MESSAGING_EXTERN TransportFailure(const std::string&);
00195 };
00196 
00197 }} // namespace qpid::messaging
00198 
00199 #endif  

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00429.html0000664000076400007640000002150611752725717017330 0ustar00jrossjross00000000000000 qmf/engine/Schema.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Schema.h File Reference

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00333.html0000664000076400007640000002602211752725717017320 0ustar00jrossjross00000000000000 qpid::SessionId Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::SessionId Class Reference

Identifier for a session. More...

#include <qpid/SessionId.h>

List of all members.

Public Member Functions

 SessionId (const std::string &userId=std::string(), const std::string &name=std::string())
std::string getUserId () const
std::string getName () const
bool operator< (const SessionId &) const
bool operator== (const SessionId &id) const
std::string str () const

Detailed Description

Identifier for a session.

There are two parts to a session identifier:

getUserId() returns the authentication principal associated with the session's connection.

getName() returns the session name.

The name must be unique among sessions with the same authentication principal.


Constructor & Destructor Documentation

qpid::SessionId::SessionId ( const std::string userId = std::string(),
const std::string name = std::string() 
)

Member Function Documentation

std::string qpid::SessionId::getName ( ) const [inline]

Definition at line 48 of file SessionId.h.

std::string qpid::SessionId::getUserId ( ) const [inline]

Definition at line 47 of file SessionId.h.

bool qpid::SessionId::operator< ( const SessionId ) const
bool qpid::SessionId::operator== ( const SessionId id) const
std::string qpid::SessionId::str ( ) const

The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00569.html0000664000076400007640000002404711752725717017340 0ustar00jrossjross00000000000000 qpid/types/Variant.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/types/Variant.h File Reference
#include <list>
#include <map>
#include <ostream>
#include <string>
#include "Uuid.h"
#include "qpid/types/Exception.h"
#include "qpid/sys/IntegerTypes.h"
#include "qpid/types/ImportExport.h"

Go to the source code of this file.

Classes

struct  qpid::types::InvalidConversion
 Thrown when an illegal conversion of a variant is attempted. More...
class  qpid::types::Variant
 Represents a value of variable type. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::types

Enumerations

enum  qpid::types::VariantType {
  qpid::types::VAR_VOID = 0, qpid::types::VAR_BOOL, qpid::types::VAR_UINT8, qpid::types::VAR_UINT16,
  qpid::types::VAR_UINT32, qpid::types::VAR_UINT64, qpid::types::VAR_INT8, qpid::types::VAR_INT16,
  qpid::types::VAR_INT32, qpid::types::VAR_INT64, qpid::types::VAR_FLOAT, qpid::types::VAR_DOUBLE,
  qpid::types::VAR_STRING, qpid::types::VAR_MAP, qpid::types::VAR_LIST, qpid::types::VAR_UUID
}

Functions

QPID_TYPES_EXTERN std::string qpid::types::getTypeName (VariantType type)
QPID_TYPES_EXTERN bool qpid::types::isIntegerType (VariantType type)
QPID_TYPES_EXTERN std::ostreamqpid::types::operator<< (std::ostream &out, const Variant &value)
QPID_TYPES_EXTERN std::ostreamqpid::types::operator<< (std::ostream &out, const Variant::Map &map)
QPID_TYPES_EXTERN std::ostreamqpid::types::operator<< (std::ostream &out, const Variant::List &list)
QPID_TYPES_EXTERN bool qpid::types::operator== (const Variant &a, const Variant &b)

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_func_0x62.html0000664000076400007640000003414311752725717022314 0ustar00jrossjross00000000000000 Class Members - Functions
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- b -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00433.html0000664000076400007640000001110211752725717017312 0ustar00jrossjross00000000000000 qmf/engine/Value.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/engine/Value.h File Reference

Go to the source code of this file.

Classes

class  qmf::engine::Value

Namespaces

namespace  qmf
namespace  qmf::engine

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00903.html0000664000076400007640000000762611752725720017326 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::map Member List
This is the complete list of members for std::map, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00905.html0000664000076400007640000000762611752725720017330 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::set Member List
This is the complete list of members for std::set, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00403.html0000664000076400007640000001132711752725717017320 0ustar00jrossjross00000000000000 qmf/Agent.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Agent.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qmf/exceptions.h"
#include "qpid/messaging/Duration.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::Agent

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00478.html0000664000076400007640000001451211752725717017333 0ustar00jrossjross00000000000000 qpid/client/SessionBase_0_10.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/SessionBase_0_10.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::SessionBase_0_10
 Base class for handles to an AMQP session. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Enumerations

enum  qpid::client::CreditUnit { qpid::client::MESSAGE_CREDIT = 0, qpid::client::BYTE_CREDIT = 1, qpid::client::UNLIMITED_CREDIT = 0xFFFFFFFF }
 Unit of message credit: messages or bytes. More...

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00437.html0000664000076400007640000001073411752725717017330 0ustar00jrossjross00000000000000 qmf/Handle.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/Handle.h File Reference
#include "qmf/ImportExport.h"

Go to the source code of this file.

Classes

class  qmf::Handle
 A handle is like a pointer: refers to an underlying implementation object. More...

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00533.html0000664000076400007640000001146311752725717017325 0ustar00jrossjross00000000000000 qpid/log/SinkOptions.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/log/SinkOptions.h File Reference
#include "qpid/Options.h"
#include <string>

Go to the source code of this file.

Classes

struct  qpid::log::SinkOptions
 Logging sink options. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::log

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00826.html0000664000076400007640000001101111752725720017311 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::management::Notifyable Member List
This is the complete list of members for qpid::management::Notifyable, including all inherited members.
notify()=0qpid::management::Notifyable [pure virtual]
~Notifyable()qpid::management::Notifyable [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00560.html0000664000076400007640000003021511752725717017321 0ustar00jrossjross00000000000000 qpid/sys/windows/check.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/windows/check.h File Reference
#include "qpid/Exception.h"
#include "qpid/Msg.h"
#include "qpid/sys/StrError.h"

Go to the source code of this file.

Defines

#define QPID_WINDOWS_ERROR(ERRVAL)   qpid::Exception(QPID_MSG(qpid::sys::strError(ERRVAL)))
#define QPID_WINDOWS_CRT_ERROR(ERRNO)   qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO)))
#define QPID_WINDOWS_CHECK_NULL(RESULT)   if ((RESULT) == NULL) throw QPID_WINDOWS_ERROR((::GetLastError()))
 THROW QPID_WINDOWS_ERROR(::GetLastError()) if RESULT is NULL.
#define QPID_WINDOWS_CHECK_NOT(RESULT, VAL)   if ((RESULT) == (VAL)) throw QPID_WINDOWS_ERROR((::GetLastError()))
#define QPID_WINDOWS_CHECK_ASYNC_START(STATUS)
#define QPID_WINDOWS_CHECK_CRT_NZ(VAL)   if ((VAL) == 0) throw QPID_WINDOWS_CRT_ERROR(errno)
#define QPID_WINSOCK_CHECK(OP)   if ((OP) == SOCKET_ERROR) throw QPID_WINDOWS_ERROR((::WSAGetLastError()))

Define Documentation

#define QPID_WINDOWS_CHECK_ASYNC_START (   STATUS)
Value:
if (!(STATUS) && ::WSAGetLastError() != ERROR_IO_PENDING)  \
        throw QPID_WINDOWS_ERROR((::WSAGetLastError()))

Definition at line 39 of file check.h.

#define QPID_WINDOWS_CHECK_CRT_NZ (   VAL)    if ((VAL) == 0) throw QPID_WINDOWS_CRT_ERROR(errno)

Definition at line 43 of file check.h.

#define QPID_WINDOWS_CHECK_NOT (   RESULT,
  VAL 
)    if ((RESULT) == (VAL)) throw QPID_WINDOWS_ERROR((::GetLastError()))

Definition at line 36 of file check.h.

#define QPID_WINDOWS_CHECK_NULL (   RESULT)    if ((RESULT) == NULL) throw QPID_WINDOWS_ERROR((::GetLastError()))

THROW QPID_WINDOWS_ERROR(::GetLastError()) if RESULT is NULL.

Definition at line 33 of file check.h.

#define QPID_WINDOWS_CRT_ERROR (   ERRNO)    qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO)))

Definition at line 30 of file check.h.

#define QPID_WINDOWS_ERROR (   ERRVAL)    qpid::Exception(QPID_MSG(qpid::sys::strError(ERRVAL)))

Definition at line 29 of file check.h.

#define QPID_WINSOCK_CHECK (   OP)    if ((OP) == SOCKET_ERROR) throw QPID_WINDOWS_ERROR((::WSAGetLastError()))

Definition at line 46 of file check.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/namespacemembers_enum.html0000664000076400007640000002241111752725720023032 0ustar00jrossjross00000000000000 Namespace Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
 

- a -

- c -

- d -

- e -

- f -

- l -

- q -

- r -

- s -

- t -

- v -

- x -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00745.html0000664000076400007640000001673111752725720017327 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::DtxGetTimeoutResult Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_0x66.html0000664000076400007640000002705111752725717021305 0ustar00jrossjross00000000000000 Class Members
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Here is a list of all class members with links to the classes they belong to:

- f -


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00458.html0000664000076400007640000001330611752725717017331 0ustar00jrossjross00000000000000 qpid/client/AsyncSession_0_10.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/AsyncSession_0_10.h File Reference

Go to the source code of this file.

Classes

class  qpid::client::AsyncSession_0_10
 AMQP 0-10 session API with keyword arguments. More...

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::client

Functions

AsyncSession_0_10 qpid::client::async (const SessionBase_0_10 &other)
 Conversion to AsyncSession_0_10 from another session type.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00471_source.html0000664000076400007640000001626311752725717020711 0ustar00jrossjross00000000000000 qpid/client/MessageListener.h Source File
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/client/MessageListener.h
Go to the documentation of this file.
00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  *
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 #include <string>
00022 #include "qpid/client/ClientImportExport.h"
00023 
00024 #ifndef _MessageListener_
00025 #define _MessageListener_
00026 
00027 #include "qpid/client/Message.h"
00028 
00029 namespace qpid {
00030 namespace client {
00031 
00087     class QPID_CLIENT_CLASS_EXTERN MessageListener{
00088     public:
00089         QPID_CLIENT_EXTERN virtual ~MessageListener();
00090 
00094         virtual void received(Message& msg) = 0;
00095     };
00096 
00097 }
00098 }
00099 
00100 
00101 #endif

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00693.html0000664000076400007640000001361311752725717017333 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::MessageReplayTracker Member List

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00180.html0000664000076400007640000001033211752725720017307 0ustar00jrossjross00000000000000 std::multimap::iterator Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::multimap::iterator Class Reference

STL iterator class. More...


Detailed Description

STL iterator class.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00559.html0000664000076400007640000002744711752725717017346 0ustar00jrossjross00000000000000 qpid/sys/posix/check.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/posix/check.h File Reference
#include "qpid/Exception.h"
#include "qpid/Msg.h"
#include <cerrno>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.

Defines

#define QPID_POSIX_ERROR(ERRNO)   qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO)))
#define QPID_POSIX_CHECK(RESULT)   if ((RESULT) < 0) throw QPID_POSIX_ERROR((errno))
 THROW QPID_POSIX_ERROR(errno) if RESULT is less than zero.
#define QPID_POSIX_THROW_IF(ERRNO)   do { int e=(ERRNO); if (e) throw QPID_POSIX_ERROR(e); } while(0)
 Throw a posix error if ERRNO is non-zero.
#define QPID_POSIX_ASSERT_THROW_IF(ERRNO)   do { int e=(ERRNO); if (e) { errno=e; ::perror(0); assert(0); } } while(0)
 Same as _THROW_IF in a release build, but abort a debug build.
#define QPID_POSIX_ABORT_IF(ERRNO)   if ((int) ERRNO) { errno=ERRNO; ::perror(0); abort(); }

Define Documentation

#define QPID_POSIX_ABORT_IF (   ERRNO)    if ((int) ERRNO) { errno=ERRNO; ::perror(0); abort(); }
#define QPID_POSIX_CHECK (   RESULT)    if ((RESULT) < 0) throw QPID_POSIX_ERROR((errno))

THROW QPID_POSIX_ERROR(errno) if RESULT is less than zero.

Definition at line 36 of file check.h.

#define QPID_POSIX_ERROR (   ERRNO)    qpid::Exception(QPID_MSG(qpid::sys::strError(ERRNO)))

Definition at line 33 of file check.h.

Referenced by qpid::sys::Condition::wait().

#define QPID_POSIX_THROW_IF (   ERRNO)    do { int e=(ERRNO); if (e) throw QPID_POSIX_ERROR(e); } while(0)

Throw a posix error if ERRNO is non-zero.

Definition at line 40 of file check.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/functions_vars_0x6e.html0000664000076400007640000001566211752725717022424 0ustar00jrossjross00000000000000 Class Members - Variables
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00007.html0000664000076400007640000012150311752725717017316 0ustar00jrossjross00000000000000 qmf::Agent Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

#include <qmf/Agent.h>

List of all members.

Public Member Functions

 Agent (AgentImpl *impl=0)
 Agent (const Agent &)
Agentoperator= (const Agent &)
 ~Agent ()
std::string getName () const
uint32_t getEpoch () const
std::string getVendor () const
std::string getProduct () const
std::string getInstance () const
const qpid::types::VariantgetAttribute (const std::string &) const
const qpid::types::Variant::MapgetAttributes () const
ConsoleEvent query (const Query &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
ConsoleEvent query (const std::string &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
uint32_t queryAsync (const Query &)
uint32_t queryAsync (const std::string &)
ConsoleEvent callMethod (const std::string &, const qpid::types::Variant::Map &, const DataAddr &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
 Create a subscription to this agent.
uint32_t callMethodAsync (const std::string &, const qpid::types::Variant::Map &, const DataAddr &)
ConsoleEvent querySchema (qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
 Query the agent for a list of schema classes that it exposes.
uint32_t querySchemaAsync ()
uint32_t getPackageCount () const
 Get the list of schema packages exposed by the agent.
const std::stringgetPackage (uint32_t) const
uint32_t getSchemaIdCount (const std::string &) const
 Get the list of schema identifiers for a particular package.
SchemaId getSchemaId (const std::string &, uint32_t) const
Schema getSchema (const SchemaId &, qpid::messaging::Duration timeout=qpid::messaging::Duration::MINUTE)
 Get detailed schema information for a specified schema ID.
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::Agent::Agent ( AgentImpl *  impl = 0)
qmf::Agent::Agent ( const Agent )
qmf::Agent::~Agent ( )

Member Function Documentation

ConsoleEvent qmf::Agent::callMethod ( const std::string ,
const qpid::types::Variant::Map ,
const DataAddr ,
qpid::messaging::Duration  timeout = qpid::messaging::Duration::MINUTE 
)

Create a subscription to this agent.

uint32_t qmf::Agent::callMethodAsync ( const std::string ,
const qpid::types::Variant::Map ,
const DataAddr  
)
const qpid::types::Variant& qmf::Agent::getAttribute ( const std::string ) const
const qpid::types::Variant::Map& qmf::Agent::getAttributes ( ) const
uint32_t qmf::Agent::getEpoch ( ) const
std::string qmf::Agent::getInstance ( ) const
std::string qmf::Agent::getName ( ) const
const std::string& qmf::Agent::getPackage ( uint32_t  ) const
uint32_t qmf::Agent::getPackageCount ( ) const

Get the list of schema packages exposed by the agent.

getPackageCount returns the number of packages exposed. getPackage returns the name of the package by index (0..package-count)

Note that both of these calls are synchronous and non-blocking. They only return locally cached data and will not send any messages to the remote agent. Use querySchema[Async] to get the latest schema information from the remote agent.

std::string qmf::Agent::getProduct ( ) const
Schema qmf::Agent::getSchema ( const SchemaId ,
qpid::messaging::Duration  timeout = qpid::messaging::Duration::MINUTE 
)

Get detailed schema information for a specified schema ID.

This call will return cached information if it is available. If not, it will send a query message to the remote agent and block waiting for a response. The timeout argument specifies the maximum time to wait for a response from the agent.

SchemaId qmf::Agent::getSchemaId ( const std::string ,
uint32_t   
) const
uint32_t qmf::Agent::getSchemaIdCount ( const std::string ) const

Get the list of schema identifiers for a particular package.

getSchemaIdCount returns the number of IDs in the indicates package. getSchemaId returns the SchemaId by index (0..schema-id-count)

Note that both of these calls are synchronous and non-blocking. They only return locally cached data and will not send any messages to the remote agent. Use querySchema[Async] to get the latest schema information from the remote agent.

std::string qmf::Agent::getVendor ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

Agent& qmf::Agent::operator= ( const Agent )
ConsoleEvent qmf::Agent::query ( const Query ,
qpid::messaging::Duration  timeout = qpid::messaging::Duration::MINUTE 
)
uint32_t qmf::Agent::queryAsync ( const Query )
uint32_t qmf::Agent::queryAsync ( const std::string )

Query the agent for a list of schema classes that it exposes.

This operation comes in both synchronous (blocking) and asynchronous flavors.

This method will typically be used after receiving an AGENT_SCHEMA_UPDATE event from the console session. It may also be used on a newly discovered agent to learn what schemata are exposed.

querySchema returns a ConsoleEvent that contains a list of SchemaId objects exposed by the agent. This list is cached locally and can be locally queried using getPackage[Count] and getSchemaId[Count].

uint32_t qmf::Agent::querySchemaAsync ( )
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00314.html0000664000076400007640000001445611752725720017321 0ustar00jrossjross00000000000000 qpid::sys::ScopedRlock Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::sys::ScopedRlock Class Reference

#include <qpid/sys/Mutex.h>

List of all members.

Public Member Functions

 ScopedRlock (L &l)
 ~ScopedRlock ()

Constructor & Destructor Documentation

qpid::sys::ScopedRlock::ScopedRlock ( L &  l) [inline]

Definition at line 53 of file Mutex.h.

qpid::sys::ScopedRlock::~ScopedRlock ( ) [inline]

Definition at line 54 of file Mutex.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00568.html0000664000076400007640000001126011752725717017330 0ustar00jrossjross00000000000000 qpid/sys/Thread.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/sys/Thread.h File Reference
#include <boost/shared_ptr.hpp>
#include "qpid/CommonImportExport.h"

Go to the source code of this file.

Classes

class  qpid::sys::Thread

Namespaces

namespace  qpid
 

This file was automatically generated from the AMQP specification.


namespace  qpid::sys

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00065.html0000664000076400007640000006762311752725717017336 0ustar00jrossjross00000000000000 qpid::client::ConnectionSettings Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::client::ConnectionSettings Struct Reference

Settings for a Connection. More...

#include <qpid/client/ConnectionSettings.h>

List of all members.

Public Member Functions

 ConnectionSettings ()
virtual ~ConnectionSettings ()
virtual void configureSocket (qpid::sys::Socket &) const
 Allows socket to be configured; default only sets tcp-nodelay based on the flag set.

Public Attributes

std::string protocol
 The protocol used for the connection (defaults to 'tcp')
std::string host
 The host (or ip address) to connect to (defaults to 'localhost').
uint16_t port
 The port to connect to (defaults to 5672).
std::string virtualhost
 Allows an AMQP 'virtual host' to be specified for the connection.
std::string username
 The username to use when authenticating the connection.
std::string password
 The password to use when authenticating the connection.
std::string mechanism
 The SASL mechanism to use when authenticating the connection; the options are currently PLAIN or ANONYMOUS.
std::string locale
 Allows a locale to be specified for the connection.
uint16_t heartbeat
 Allows a heartbeat frequency to be specified.
uint16_t maxChannels
 The maximum number of channels that the client will request for use on this connection.
uint16_t maxFrameSize
 The maximum frame size that the client will request for this connection.
unsigned int bounds
 Limit the size of the connections send buffer .
bool tcpNoDelay
 If true, TCP_NODELAY will be set for the connection.
std::string service
 SASL service name.
unsigned int minSsf
 Minimum acceptable strength of any SASL negotiated security layer.
unsigned int maxSsf
 Maximum acceptable strength of any SASL negotiated security layer.
std::string sslCertName
 SSL cert-name for the connection.

Detailed Description

Settings for a Connection.


Constructor & Destructor Documentation

qpid::client::ConnectionSettings::ConnectionSettings ( )
virtual qpid::client::ConnectionSettings::~ConnectionSettings ( ) [virtual]

Member Function Documentation

virtual void qpid::client::ConnectionSettings::configureSocket ( qpid::sys::Socket &  ) const [virtual]

Allows socket to be configured; default only sets tcp-nodelay based on the flag set.

Can be overridden.


Member Data Documentation

Limit the size of the connections send buffer .

The buffer is limited to bounds * maxFrameSize.

Definition at line 106 of file ConnectionSettings.h.

Allows a heartbeat frequency to be specified.

Definition at line 91 of file ConnectionSettings.h.

The host (or ip address) to connect to (defaults to 'localhost').

Definition at line 59 of file ConnectionSettings.h.

Allows a locale to be specified for the connection.

Definition at line 87 of file ConnectionSettings.h.

The maximum number of channels that the client will request for use on this connection.

Definition at line 96 of file ConnectionSettings.h.

The maximum frame size that the client will request for this connection.

Definition at line 101 of file ConnectionSettings.h.

Maximum acceptable strength of any SASL negotiated security layer.

0 means no security layer allowed.

Definition at line 124 of file ConnectionSettings.h.

The SASL mechanism to use when authenticating the connection; the options are currently PLAIN or ANONYMOUS.

Definition at line 83 of file ConnectionSettings.h.

Minimum acceptable strength of any SASL negotiated security layer.

0 means no security layer required.

Definition at line 119 of file ConnectionSettings.h.

The password to use when authenticating the connection.

Definition at line 78 of file ConnectionSettings.h.

The port to connect to (defaults to 5672).

Definition at line 63 of file ConnectionSettings.h.

The protocol used for the connection (defaults to 'tcp')

Definition at line 54 of file ConnectionSettings.h.

SASL service name.

Definition at line 114 of file ConnectionSettings.h.

SSL cert-name for the connection.

Overrides global SSL settings. Used only when a client connects to the broker.

Definition at line 129 of file ConnectionSettings.h.

If true, TCP_NODELAY will be set for the connection.

Definition at line 110 of file ConnectionSettings.h.

The username to use when authenticating the connection.

If not specified the current users login is used if available.

Definition at line 74 of file ConnectionSettings.h.

Allows an AMQP 'virtual host' to be specified for the connection.

Definition at line 68 of file ConnectionSettings.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00910.html0000664000076400007640000000763411752725720017323 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::stack Member List
This is the complete list of members for std::stack, including all inherited members.

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00823.html0000664000076400007640000001166411752725720017324 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::log::LevelTraits Member List
This is the complete list of members for qpid::log::LevelTraits, including all inherited members.
COUNTqpid::log::LevelTraits [static]
level(const char *name)qpid::log::LevelTraits [static]
level(const std::string &name)qpid::log::LevelTraits [inline, static]
name(Level)qpid::log::LevelTraits [static]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00753.html0000664000076400007640000001506511752725720017325 0ustar00jrossjross00000000000000 Member List
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::FieldValue::Data Member List
This is the complete list of members for qpid::framing::FieldValue::Data, including all inherited members.
convertsToInt() const qpid::framing::FieldValue::Data [inline, virtual]
convertsToString() const qpid::framing::FieldValue::Data [inline, virtual]
decode(Buffer &buffer)=0qpid::framing::FieldValue::Data [pure virtual]
encode(Buffer &buffer)=0qpid::framing::FieldValue::Data [pure virtual]
encodedSize() const =0qpid::framing::FieldValue::Data [pure virtual]
getInt() const qpid::framing::FieldValue::Data [inline, virtual]
getString() const qpid::framing::FieldValue::Data [inline, virtual]
operator==(const Data &) const =0qpid::framing::FieldValue::Data [pure virtual]
print(std::ostream &out) const =0qpid::framing::FieldValue::Data [pure virtual]
~Data()qpid::framing::FieldValue::Data [inline, virtual]

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00263.html0000664000076400007640000001020311752725720017306 0ustar00jrossjross00000000000000 std::queue Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
std::queue Class Reference

STL class. More...

List of all members.


Detailed Description

STL class.


The documentation for this class was generated from the following files:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00257.html0000664000076400007640000006420311752725717017330 0ustar00jrossjross00000000000000 qmf::Query Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

#include <qmf/Query.h>

List of all members.

Public Member Functions

 Query (QueryImpl *impl=0)
 Query (const Query &)
Queryoperator= (const Query &)
 ~Query ()
 Query (QueryTarget, const std::string &predicate="")
 Query (QueryTarget, const std::string &className, const std::string &package, const std::string &predicate="")
 Query (QueryTarget, const SchemaId &, const std::string &predicate="")
 Query (const DataAddr &)
QueryTarget getTarget () const
const DataAddrgetDataAddr () const
const SchemaIdgetSchemaId () const
void setPredicate (const qpid::types::Variant::List &)
const qpid::types::Variant::ListgetPredicate () const
bool matchesPredicate (const qpid::types::Variant::Map &map) const
QMF_INLINE_EXTERN bool isValid () const
QMF_INLINE_EXTERN bool isNull () const
QMF_INLINE_EXTERN operator bool () const
 Conversion to bool supports idiom if (handle) { handle->...
QMF_INLINE_EXTERN bool operator! () const
 Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.
void swap (Handle< T > &h)

Protected Types

typedef T Impl

Protected Attributes

Implimpl

Member Typedef Documentation

typedef T qmf::Handle::Impl [protected, inherited]

Definition at line 56 of file Handle.h.


Constructor & Destructor Documentation

qmf::Query::Query ( QueryImpl *  impl = 0)
qmf::Query::Query ( const Query )
qmf::Query::~Query ( )
qmf::Query::Query ( QueryTarget  ,
const std::string predicate = "" 
)
qmf::Query::Query ( QueryTarget  ,
const std::string className,
const std::string package,
const std::string predicate = "" 
)
qmf::Query::Query ( QueryTarget  ,
const SchemaId ,
const std::string predicate = "" 
)
qmf::Query::Query ( const DataAddr )

Member Function Documentation

const DataAddr& qmf::Query::getDataAddr ( ) const
const qpid::types::Variant::List& qmf::Query::getPredicate ( ) const
const SchemaId& qmf::Query::getSchemaId ( ) const
QueryTarget qmf::Query::getTarget ( ) const
QMF_INLINE_EXTERN bool qmf::Handle::isNull ( ) const [inline, inherited]
Returns:
true if handle is null. It is an error to call any function on a null handle.

Definition at line 45 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::isValid ( ) const [inline, inherited]
Returns:
true if handle is valid, i.e. not null.

Definition at line 42 of file Handle.h.

bool qmf::Query::matchesPredicate ( const qpid::types::Variant::Map map) const
QMF_INLINE_EXTERN qmf::Handle::operator bool ( ) const [inline, inherited]

Conversion to bool supports idiom if (handle) { handle->...

}

Definition at line 48 of file Handle.h.

QMF_INLINE_EXTERN bool qmf::Handle::operator! ( ) const [inline, inherited]

Operator ! supports idiom if (!handle) { do_if_handle_is_null(); }.

Definition at line 51 of file Handle.h.

Query& qmf::Query::operator= ( const Query )
void qmf::Query::setPredicate ( const qpid::types::Variant::List )
void qmf::Handle::swap ( Handle< T > &  h) [inline, inherited]

Definition at line 53 of file Handle.h.


Member Data Documentation

Impl* qmf::Handle::impl [protected, inherited]

Definition at line 63 of file Handle.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00368.html0000664000076400007640000002424111752725720017323 0ustar00jrossjross00000000000000 qpid::framing::UnknownIdsException Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::framing::UnknownIdsException Struct Reference

Command data was received prior to any use of the command-point control. More...

#include <qpid/framing/reply_exceptions.h>

List of all members.

Public Member Functions

std::string getPrefix () const
 UnknownIdsException (const std::string &msg=std::string())
virtual const char * what () const throw ()
virtual std::string getMessage () const

Public Attributes

const framing::session::DetachCode code

Detailed Description

Command data was received prior to any use of the command-point control.


Constructor & Destructor Documentation

qpid::framing::UnknownIdsException::UnknownIdsException ( const std::string msg = std::string()) [inline]

Definition at line 289 of file reply_exceptions.h.


Member Function Documentation

virtual std::string qpid::Exception::getMessage ( ) const [virtual, inherited]
std::string qpid::framing::UnknownIdsException::getPrefix ( ) const [inline, virtual]

Reimplemented from qpid::Exception.

Definition at line 288 of file reply_exceptions.h.

virtual const char* qpid::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation

Definition at line 66 of file Exception.h.


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00118.html0000664000076400007640000003372511752725717017331 0ustar00jrossjross00000000000000 qpid::client::FailoverListener Class Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

Listen for updates from the amq.failover exchange. More...

#include <qpid/client/FailoverListener.h>

List of all members.

Public Member Functions

 FailoverListener (Connection)
 Subscribe to amq.failover exchange.
 FailoverListener (Connection, bool useInitial)
 Subscribe to amq.failover exchange.
 ~FailoverListener ()
std::vector< UrlgetKnownBrokers () const
 Returns the latest list of known broker URLs.

Static Public Member Functions

static std::vector< UrlgetKnownBrokers (const Message &m)
 Extract the broker list from a failover exchange message.

Static Public Attributes

static const std::string AMQ_FAILOVER
 The name of the standard failover exchange amq.failover.

Private Types

typedef boost::function0< void > Functor
 Type to represent a runnable as a Functor.

Private Member Functions

Functor functor ()
 Create a functor object that will call this->run().

Detailed Description

Listen for updates from the amq.failover exchange.

In a cluster, the amq.failover exchange provides updates whenever the cluster membership changes. This class subscribes to the failover exchange and providees the latest list of known brokers.

You can also subscribe to amq.failover yourself and use FailoverListener::decode to extract a list of broker URLs from a failover exchange message.


Constructor & Destructor Documentation

qpid::client::FailoverListener::FailoverListener ( Connection  )

Subscribe to amq.failover exchange.

qpid::client::FailoverListener::FailoverListener ( Connection  ,
bool  useInitial 
)

Subscribe to amq.failover exchange.

Parameters:
useInitialIf true use the connection's initial brokers as the initial value of getKnownBrokers
qpid::client::FailoverListener::~FailoverListener ( )

Member Function Documentation

static std::vector<Url> qpid::client::FailoverListener::getKnownBrokers ( const Message m) [static]

Extract the broker list from a failover exchange message.

std::vector<Url> qpid::client::FailoverListener::getKnownBrokers ( ) const

Returns the latest list of known broker URLs.


Member Data Documentation

The name of the standard failover exchange amq.failover.

Definition at line 55 of file FailoverListener.h.


The documentation for this class was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00188.html0000664000076400007640000001710611752725720017325 0ustar00jrossjross00000000000000 qpid::messaging::LinkError Struct Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid::messaging::LinkError Struct Reference

#include <qpid/messaging/exceptions.h>

List of all members.

Public Member Functions

 LinkError (const std::string &)
virtual QPID_TYPES_EXTERN
const char * 
what () const throw ()

Public Attributes

qpid::types::Variant::Map detail

Constructor & Destructor Documentation

qpid::messaging::LinkError::LinkError ( const std::string )

Member Function Documentation

virtual QPID_TYPES_EXTERN const char* qpid::types::Exception::what ( ) const throw () [virtual, inherited]

Member Data Documentation


The documentation for this struct was generated from the following file:

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00407.html0000664000076400007640000001136711752725717017330 0ustar00jrossjross00000000000000 qmf/AgentSession.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qmf/AgentSession.h File Reference
#include <qmf/ImportExport.h>
#include "qmf/Handle.h"
#include "qpid/messaging/Duration.h"
#include "qpid/messaging/Connection.h"
#include "qpid/types/Variant.h"
#include <string>

Go to the source code of this file.

Classes

class  qmf::AgentSession

Namespaces

namespace  qmf

Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/html/a00485.html0000664000076400007640000001463511752725717017337 0ustar00jrossjross00000000000000 qpid/console/ConsoleImportExport.h File Reference
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpid/console/ConsoleImportExport.h File Reference

Go to the source code of this file.

Defines

#define QPID_CONSOLE_EXTERN   QPID_IMPORT
#define QPID_CONSOLE_CLASS_EXTERN   QPID_CLASS_IMPORT
#define QPID_CONSOLE_INLINE_EXTERN   QPID_INLINE_IMPORT

Define Documentation

#define QPID_CONSOLE_CLASS_EXTERN   QPID_CLASS_IMPORT

Definition at line 31 of file ConsoleImportExport.h.

#define QPID_CONSOLE_EXTERN   QPID_IMPORT

Definition at line 30 of file ConsoleImportExport.h.

#define QPID_CONSOLE_INLINE_EXTERN   QPID_INLINE_IMPORT

Definition at line 32 of file ConsoleImportExport.h.


Qpid C++ API Reference
Generated on Thu May 10 2012 for Qpid C++ Client API by doxygen 1.7.5
qpidc-0.16/docs/api/header.html0000664000076400007640000000302111477007156016757 0ustar00jrossjross00000000000000 $title
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
qpidc-0.16/docs/api/footer.html0000664000076400007640000000216011556343460017027 0ustar00jrossjross00000000000000
Qpid C++ API Reference
Generated on $date for $projectname by doxygen $doxygenversion
qpidc-0.16/docs/api/user.doxygen.in0000664000076400007640000014421611563472770017643 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # ---------------------------------------------------------------- # Doxygen settings for Qpid user documentation. # # Note: Only public members of classes that are part of the public API # should be documented here. For complete developer documentation use # the developer.doxygen configuration. # ---------------------------------------------------------------- # Doxyfile 1.4.6 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "Qpid C++ Client API" # 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 = 0 # 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 = . # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, # Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, # Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, # Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # 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 = YES # 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 = @top_srcdir@/include @top_builddir@/include @top_builddir@/src/gen # 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 = @top_srcdir@/include @top_builddir@/include # 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 = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = YES # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # 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 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 = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = NO # 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 # jwr 2008-11-25 # 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 = YES # 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 = YES # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is 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 = doxygen.log #--------------------------------------------------------------------------- # 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 = @top_srcdir@/docs/api/doxygen_mainpage.h @top_srcdir@/include @top_builddir@/include # 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: FILE_PATTERNS = *.h # 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 = test tests broker amqp_0_10 log sys cluster management # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , 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 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 = NO #--------------------------------------------------------------------------- # 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 = YES # 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 = @srcdir@/header.html # 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 = @srcdir@/footer.html # 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 = YES # 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 = QPID_CLIENT_EXTERN= QPID_COMMON_EXTERN= QPID_CONSOLE_EXTERN= QPID_BROKER_EXTERN= QPID_MESSAGING_EXTERN= QMF_EXTERN= QMFE_EXTERN= # 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 = BOOST_PARAMETER_MEMFUN # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = NO # 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 = NO # 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 = NO # 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 = NO # 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 = NO # 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 = NO # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = NO # 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 = NO # 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_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that a graph may be further truncated if the graph's # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO qpidc-0.16/docs/api/CMakeLists.txt0000664000076400007640000000404111365547375017414 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # if (GEN_DOXYGEN) # The user.doxygen.in file was originally written for a # configure-generated situation so makes use of configure names that # need to be set from the CMake equivalents. set (top_builddir ${CMAKE_BINARY_DIR}) set (top_srcdir ${CMAKE_SOURCE_DIR}) set (srcdir ${CMAKE_CURRENT_SOURCE_DIR}) configure_file (${CMAKE_CURRENT_SOURCE_DIR}/user.doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/user.doxygen) configure_file (${CMAKE_CURRENT_SOURCE_DIR}/developer.doxygen.in ${CMAKE_CURRENT_BINARY_DIR}/developer.doxygen) add_custom_target (docs-user-api COMMAND ${DOXYGEN_EXECUTABLE} user.doxygen) add_custom_target (docs-developer COMMAND ${DOXYGEN_EXECUTABLE} developer.doxygen) # HTML files are generated to ./html - put those in the install. install (DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION ${QPID_INSTALL_HTMLDIR} COMPONENT ${QPID_COMPONENT_CLIENT_INCLUDE}) if (CPACK_GENERATOR STREQUAL "NSIS") set (CPACK_NSIS_MENU_LINKS "${QPID_INSTALL_HTMLDIR}/index.html" "Qpid C++ API Documentation" "https://issues.apache.org/jira/browse/QPID" "Report Qpid Problem") endif (CPACK_GENERATOR STREQUAL "NSIS") endif (GEN_DOXYGEN) qpidc-0.16/docs/api/developer.doxygen0000664000076400007640000014605311752725671020247 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # ---------------------------------------------------------------- # Doxygen settings for Qpid developer documentation. # # ---------------------------------------------------------------- # Doxyfile 1.4.6 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = Qpid # 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 = 0 # 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 = . # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, # Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, # Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, # Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # This tag can be used to specify the encoding used in the generated output. # The encoding is not always determined by the language that is chosen, # but also whether or not the output is meant for Windows or non-Windows users. # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES # forces the Windows encoding (this is the default for the Windows binary), # whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = YES # was NO - jwr # 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 = ../../src ../../ # 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 = YES # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = YES # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = YES # was 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 # was NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # 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 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 = YES # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # was YES # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = NO # was 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 # was YES # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = YES # 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 = YES # 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 = doxygen.log #--------------------------------------------------------------------------- # 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 = ../../docs/api/doxygen_developer_mainpage.h ../../include ../../src ../../include ../../src # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: FILE_PATTERNS = *.h *.cpp # 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 = test # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , 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 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-dev # 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 = YES # 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 = YES # 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 = QPID_CLIENT_EXTERN= QPID_COMMON_EXTERN= QPID_CONSOLE_EXTERN= QPID_BROKER_EXTERN= QPID_MESSAGING_EXTERN= QMF_EXTERN= QMFE_EXTERN= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = NO # 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 = YES # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that a graph may be further truncated if the graph's # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = YES qpidc-0.16/docs/man/0000775000076400007640000000000011752725720014647 5ustar00jrossjross00000000000000qpidc-0.16/docs/man/Makefile.in0000664000076400007640000004177611752725661016737 0ustar00jrossjross00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 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@ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Generate makefile from qpidd --help # # Note: qiddd.1 is normally a _checked in_ pre-generated file, so that # make dist does not have to build the entire source just for the man page. # # To update the checked-in file (e.g. for a new release) do the following: # # - start with a completely clean checkout. # - make sure there are no modules installed in your configured prefix, # we don't want to pick up configuration from optional modules # - do bootstrap; configure # - in build-dir: cd src; make # build the broker # - in source-dir: cd docs/man; rm qpidd.1 # remove checked-in man page. # - in build-dir: cd docs/man; make # make new man page # - edit qpidd.1 to remove all default values referring to file/directory locations. # these values will differ between builds depending on configuration. # - if source-dir != build-dir: copy qpidd.1 from build-dir/docs/man to source-dir/docs/man VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = docs/man DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_pkg_swig.m4 \ $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/compiler-flags.m4 \ $(top_srcdir)/m4/extensions.m4 $(top_srcdir)/m4/python.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(dist_man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMQP_FINAL_XML = @AMQP_FINAL_XML@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ COMPILER_FLAGS = @COMPILER_FLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOWNLOAD_URL = @DOWNLOAD_URL@ DOXYGEN = @DOXYGEN@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LIB_ACL = @LIB_ACL@ LIB_CLOCK_GETTIME = @LIB_CLOCK_GETTIME@ LIB_DLOPEN = @LIB_DLOPEN@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NSPR_CONFIG = @NSPR_CONFIG@ NSS_CONFIG = @NSS_CONFIG@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL_ARCHLIB = @PERL_ARCHLIB@ PERL_INC = @PERL_INC@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PYTHON = @PYTHON@ PYTHON_CFLAGS = @PYTHON_CFLAGS@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_LIBS = @PYTHON_LIBS@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RPMLINT = @RPMLINT@ RUBY = @RUBY@ RUBY_DLEXT = @RUBY_DLEXT@ RUBY_INC = @RUBY_INC@ RUBY_INC_ARCH = @RUBY_INC_ARCH@ RUBY_LIB = @RUBY_LIB@ RUBY_LIBS = @RUBY_LIBS@ RUBY_LIB_ARCH = @RUBY_LIB_ARCH@ SASL_PASSWD = @SASL_PASSWD@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOCKLIBS = @SOCKLIBS@ SSL_CFLAGS = @SSL_CFLAGS@ SSL_LDFLAGS = @SSL_LDFLAGS@ STRIP = @STRIP@ SUNCC_RUNTIME_LIBS = @SUNCC_RUNTIME_LIBS@ SWIG = @SWIG@ SWIG_LIB = @SWIG_LIB@ URL = @URL@ VALGRIND = @VALGRIND@ VERSION = @VERSION@ WARNING_CFLAGS = @WARNING_CFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ builddir = @builddir@ builddir_lib_suffix = @builddir_lib_suffix@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man_MANS = qpidd.1 man_aux = $(dist_man_MANS:.1=.x) EXTRA_DIST = $(man_aux) CMakeLists.txt generate_manpage groffify_options.sed groffify_template.sed DISTCLEANFILES = $(dist_man_MANS) CLEANFILES = qpidd.1 @HAVE_HELP2MAN_TRUE@SUFFIXES = .x .1 all: all-am .SUFFIXES: .SUFFIXES: .x .1 $(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 ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu docs/man/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 $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" @list=''; test -n "$(man1dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; 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: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) 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 dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: 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-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 dist-hook: $(man_aux) # Depend on configure.ac to get version number changes. $(dist_man_MANS): $(top_srcdir)/configure.ac @HAVE_HELP2MAN_TRUE@qpidd.1: $(srcdir)/qpidd.x $(top_builddir)/src/qpidd @HAVE_HELP2MAN_TRUE@.x.1: @HAVE_HELP2MAN_TRUE@ @rm -f $@ @HAVE_HELP2MAN_TRUE@ @echo "Updating man page $@" @HAVE_HELP2MAN_TRUE@ $(HELP2MAN) --no-info --include=$(srcdir)/$*.x --output=$@-t --help-option="--help --no-module-dir" --version-option="--version --no-module-dir" ../../src/$* @HAVE_HELP2MAN_TRUE@ @chmod a-w $@-t @HAVE_HELP2MAN_TRUE@ @mv $@-t $@ @HAVE_HELP2MAN_FALSE@qpidd.1: @HAVE_HELP2MAN_FALSE@ @echo "Warning: help2man not available, using sed script instead." @HAVE_HELP2MAN_FALSE@ $(srcdir)/generate_manpage $(srcdir)/qpidd.x $(top_builddir)/src/qpidd $@ # 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: qpidc-0.16/docs/man/Makefile.am0000664000076400007640000000472711656043025016707 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # # Generate makefile from qpidd --help # # Note: qiddd.1 is normally a _checked in_ pre-generated file, so that # make dist does not have to build the entire source just for the man page. # # To update the checked-in file (e.g. for a new release) do the following: # # - start with a completely clean checkout. # - make sure there are no modules installed in your configured prefix, # we don't want to pick up configuration from optional modules # - do bootstrap; configure # - in build-dir: cd src; make # build the broker # - in source-dir: cd docs/man; rm qpidd.1 # remove checked-in man page. # - in build-dir: cd docs/man; make # make new man page # - edit qpidd.1 to remove all default values referring to file/directory locations. # these values will differ between builds depending on configuration. # - if source-dir != build-dir: copy qpidd.1 from build-dir/docs/man to source-dir/docs/man dist_man_MANS = qpidd.1 man_aux = $(dist_man_MANS:.1=.x) EXTRA_DIST = $(man_aux) CMakeLists.txt generate_manpage groffify_options.sed groffify_template.sed DISTCLEANFILES = $(dist_man_MANS) CLEANFILES=qpidd.1 dist-hook: $(man_aux) # Depend on configure.ac to get version number changes. $(dist_man_MANS): $(top_srcdir)/configure.ac if HAVE_HELP2MAN SUFFIXES = .x .1 qpidd.1: $(srcdir)/qpidd.x $(top_builddir)/src/qpidd .x.1: @rm -f $@ @echo "Updating man page $@" $(HELP2MAN) --no-info --include=$(srcdir)/$*.x --output=$@-t --help-option="--help --no-module-dir" --version-option="--version --no-module-dir" ../../src/$* @chmod a-w $@-t @mv $@-t $@ else qpidd.1: @echo "Warning: help2man not available, using sed script instead." $(srcdir)/generate_manpage $(srcdir)/qpidd.x $(top_builddir)/src/qpidd $@ endif qpidc-0.16/docs/man/groffify_template.sed0000664000076400007640000000150311417652553021052 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # /\[FILES\]/ i\ .PP s/^\[\([A-Z ]*\)\]/.SH \1/ qpidc-0.16/docs/man/groffify_options.sed0000664000076400007640000000173311417652553020737 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # s/^\( \{2\}\)\(.*)\)\( \{2,\}\)/.TP\n\2\n/ s/^\( \{2\}\)\(.*\]\)\( \{2,\}\)/.TP\n\2\n/ s/^\( \{2\}\)\(.*\b\)\( \{2,\}\)/.TP\n\2\n/ s/^\([A-Z].*\):$/.SS \1/ s/-/\\-/g s/^ \{2,\}// s/\('.*'\)/\\\&\1/ qpidc-0.16/docs/man/generate_manpage0000775000076400007640000000212211417652553020055 0ustar00jrossjross00000000000000#!/bin/sh # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # $2 --help | grep -v 'Usage: ' | sed -f $(dirname $0)/groffify_options.sed > .temp.options.groff cat $1 | sed -f $(dirname $0)/groffify_template.sed | sed -e '/^\.PP$/ r .temp.options.groff' -e "/^.SH NAME/ i\ .TH QPIDD \"1\" \"$(date +'%B %Y')\" \"$($2 -v)\" \"User Commands\" " > $3 rm .temp.options.groff qpidc-0.16/docs/man/CMakeLists.txt0000664000076400007640000000153111654522741017406 0ustar00jrossjross00000000000000# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. # INSTALL (FILES qpidd.1 DESTINATION ${QPID_MAN_DIR}/man1) qpidc-0.16/docs/man/qpidd.x0000664000076400007640000000273711542164706016150 0ustar00jrossjross00000000000000[NAME] qpidd \- the Qpid AMQP Message Broker Daemon [SYNOPSIS] qpidd [-p port] [--config config_file] [--data-dir directory] [DESCRIPTION] An AMQP message broker daemon that stores, routes and forwards messages using the Advanced Message Queueing Protocol (AMQP). [OPTIONS] The options below are built-in to qpidd. Installing add-on modules provides additional options. To see the full set of options available type "qpidd --help" Options may be specified via command line, environment variable or configuration file. See FILES and ENVIRONMENT below for details. [FILES] .I /etc/qpidd.conf .RS Default configuration file. .RE Configuration file settings are over-ridden by command line or environment variable settings. '--config ' or 'export QPID_CONFIG=' specifies an alternate file. Each line is a name=value pair. Blank lines and lines beginning with # are ignored. For example: # My qpidd configuration file. port=6000 max-connections=10 log-to-file=/tmp/qpidd.log [ENVIRONMENT] .I QPID_